annotate static/js/2.eb2fd6ea.chunk.js.map @ 3:80102785f5ff draft default tip

planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/vitessce commit af71ccb3b89c9735c6f985a3e8ffe22cd14c0e04
author goeckslab
date Thu, 30 May 2024 17:24:31 +0000
parents 6df8d6e42152
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6df8d6e42152 planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/vitessce commit 9b2dc921e692af8045773013d9f87d4d790e2ea1
goeckslab
parents:
diff changeset
1 {"version":3,"sources":["../node_modules/react/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/regenerator/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/vega-util/build/vega-util.module.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../node_modules/prop-types/index.js","../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/defineProperty.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/get.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/superPropBase.js","../../../../src/utils/log.js","../../../../src/utils/device-pixels.js","../../../../src/context/context.js","../../../src/index.js","../node_modules/clsx/dist/clsx.m.js","../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../../src/utils/assert.js","../node_modules/gl-matrix/esm/mat4.js","../node_modules/@material-ui/styles/esm/withStyles/withStyles.js","../node_modules/@material-ui/core/esm/styles/withStyles.js","../node_modules/gl-matrix/esm/vec3.js","../node_modules/@math.gl/core/node_modules/gl-matrix/esm/common.js","../node_modules/gl-matrix/esm/common.js","../../../../src/lib/common.js","../../../../src/lib/validators.js","../node_modules/gl-matrix/esm/quat.js","../../../../../src/effects/lighting/point-light.js","../../../../../src/effects/lighting/camera-light.js","../../../../../src/effects/lighting/suncalc.js","../../../../../src/effects/lighting/sun-light.js","../../../../src/passes/screen-pass.js","../../../../src/effects/post-process-effect.js","../../../../src/viewports/globe-viewport.js","../../../../src/controllers/first-person-controller.js","../../../../src/views/first-person-view.js","../../../../src/controllers/globe-controller.js","../../../../src/views/globe-view.js","../../../../src/transitions/viewport-fly-to-interpolator.js","../../../../src/lib/constants.js","../node_modules/lodash/isEqual.js","../node_modules/react-dom/index.js","../node_modules/@material-ui/core/esm/utils/capitalize.js","../node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/common.js","../node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/vec4.js","../../../src/math-utils.js","../node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/mat4.js","../node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/vec2.js","../node_modules/@math.gl/web-mercator/node_modules/gl-matrix/esm/vec3.js","../../../src/assert.js","../../../src/web-mercator-utils.js","../../../src/fit-bounds.js","../../../src/get-bounds.js","../../../src/web-mercator-viewport.js","../../../src/normalize-viewport-props.js","../../../src/fly-to-viewport.js","../../../../src/geometries/truncated-cone-geometry.js","../../../../src/geometries/cone-geometry.js","../../../../src/geometries/cylinder-geometry.js","../../../../src/geometries/ico-sphere-geometry.js","../../../../src/geometries/plane-geometry.js","../../../../src/geometry/geometry-utils.js","../../../../src/geometries/sphere-geometry.js","../../../../../src/modules/fp64/fp64-utils.js","../../../../../src/modules/fp64/fp64-arithmetic.glsl.js","../../../../../src/modules/fp64/fp64.js","../../../../../src/modules/fp64/fp64-functions.glsl.js","../../../../../src/modules/project/project.js","../../../../../src/modules/dirlight/dirlight.js","../node_modules/@babel/runtime/helpers/classCallCheck.js","../node_modules/vega-time/node_modules/d3-time/src/interval.js","../node_modules/vega-time/node_modules/d3-time/src/duration.js","../node_modules/vega-time/node_modules/d3-time/src/day.js","../node_modules/vega-time/node_modules/d3-time/src/week.js","../node_modules/vega-time/node_modules/d3-time/src/utcDay.js","../node_modules/vega-time/node_modules/d3-time/src/utcWeek.js","../node_modules/vega-time/node_modules/d3-time/src/year.js","../node_modules/vega-time/node_modules/d3-time/src/month.js","../node_modules/vega-time/node_modules/d3-time/src/hour.js","../node_modules/vega-time/node_modules/d3-time/src/minute.js","../node_modules/vega-time/node_modules/d3-time/src/second.js","../node_modules/vega-time/node_modules/d3-time/src/millisecond.js","../node_modules/vega-time/node_modules/d3-time/src/utcYear.js","../node_modules/vega-time/node_modules/d3-time/src/utcMonth.js","../node_modules/vega-time/node_modules/d3-time/src/utcHour.js","../node_modules/vega-time/node_modules/d3-time/src/utcMinute.js","../node_modules/vega-time/node_modules/d3-array/src/bisector.js","../node_modules/vega-time/node_modules/d3-array/src/ascending.js","../node_modules/vega-time/node_modules/d3-array/src/ticks.js","../node_modules/vega-time/build/vega-time.module.js","../../src/core/indexing.ts","../../src/compression/registry.ts","../../src/mutableMapping.ts","../../src/errors.ts","../../src/core/slice.ts","../../src/util.ts","../../src/storage/index.ts","../../src/names.ts","../../src/metadata.ts","../../src/attributes.ts","../../src/nestedArray/types.ts","../../src/nestedArray/ops.ts","../../src/nestedArray/index.ts","../../src/rawArray/ops.ts","../../src/rawArray/index.ts","../../node_modules/eventemitter3/index.js","../../node_modules/p-timeout/index.js","../../node_modules/p-finally/index.js","../../node_modules/p-queue/dist/lower-bound.js","../../src/storage/httpStore.ts","../../node_modules/p-queue/dist/priority-queue.js","../../node_modules/p-queue/dist/index.js","../../src/core/index.ts","../../src/storage/memoryStore.ts","../../src/creation.ts","../../src/hierarchy.ts","../node_modules/reactcss/lib/index.js","../node_modules/@babel/runtime/helpers/createClass.js","../node_modules/@material-ui/core/esm/utils/useForkRef.js","../node_modules/rc-tree/es/util.js","../node_modules/@hms-dbmi/viv/node_modules/quickselect/index.js","../node_modules/@petamoriken/float16/src/is.js","../node_modules/@petamoriken/float16/src/lib.js","../node_modules/@petamoriken/float16/src/dataView.js","../node_modules/txml/dist/txml.mjs","../node_modules/geotiff/src/globals.js","../node_modules/geotiff/src/rgb.js","../node_modules/geotiff/src/predictor.js","../node_modules/lzw-tiff-decoder/index.mjs","../node_modules/geotiff/src/compression/basedecoder.js","../node_modules/geotiff/src/compression/raw.js","../node_modules/geotiff/src/compression/lzw.js","../node_modules/geotiff/src/compression/jpeg.js","../node_modules/geotiff/node_modules/pako/dist/pako.esm.mjs","../node_modules/geotiff/src/compression/deflate.js","../node_modules/geotiff/src/compression/packbits.js","../node_modules/geotiff/src/compression/lerc.js","../node_modules/geotiff/src/compression/index.js","../node_modules/geotiff/src/resample.js","../node_modules/geotiff/src/geotiffimage.js","../node_modules/geotiff/src/dataview64.js","../node_modules/geotiff/src/dataslice.js","../node_modules/geotiff/src/source/httputils.js","../node_modules/geotiff/src/source/blockedsource.js","../node_modules/geotiff/src/source/client/fetch.js","../node_modules/geotiff/src/source/client/xhr.js","../node_modules/geotiff/src/source/remote.js","../node_modules/geotiff/src/source/arraybuffer.js","../node_modules/geotiff/src/source/filereader.js","../node_modules/geotiff/src/geotiffwriter.js","../node_modules/geotiff/src/geotiff.js","../node_modules/@hms-dbmi/viv/dist/viv.es.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","../../../../src/javascript-utils/is-type.ts","../node_modules/gl-matrix/esm/vec4.js","../node_modules/geotiff/src/utils.js","../node_modules/gl-matrix/esm/mat3.js","../node_modules/@turf/helpers/index.js","../node_modules/@material-ui/core/esm/styles/colorManipulator.js","../node_modules/classnames/index.js","../node_modules/probe.gl/env.js","../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/inherits.js","../node_modules/@material-ui/core/esm/utils/useEventCallback.js","../node_modules/@math.gl/core/node_modules/gl-matrix/esm/vec3.js","../node_modules/@material-ui/core/esm/utils/ownerDocument.js","../node_modules/gl-matrix/esm/vec2.js","../../node_modules/numcodecs/pako.esm-9240ff4b.mjs","../../node_modules/numcodecs/gzip.mjs","../../node_modules/numcodecs/zlib.mjs","../../node_modules/numcodecs/utils-6b0080f1.mjs","../../node_modules/numcodecs/blosc.mjs","../../src/zarr.ts","../../../../src/utils/webgl-checks.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toArray.js","../node_modules/react-color/lib/components/common/index.js","../../../../src/column-layer/grid-cell-layer.js","../../../../../src/lib/path-utils/path.ts","../../../src/index.ts","../../../../src/debug/index.js","../../../../src/lifecycle/constants.js","../../../src/lib/geojson-edit-mode.ts","../../../../src/classes/buffer.js","../../../src/constants.js","../../../../src/lib/assert.js","../../../../../src/classes/base/math-array.js","../../../../../src/classes/base/vector.js","../../../../src/lib/gl-matrix-extras.js","../../../../src/classes/vector3.js","../../../../../src/lib/bounding-volumes/axis-aligned-bounding-box.js","../../../../../src/lib/bounding-volumes/bounding-sphere.js","../../../../../src/classes/base/matrix.js","../../../../src/classes/matrix3.js","../../../../src/classes/quaternion.js","../../../../../src/lib/bounding-volumes/oriented-bounding-box.js","../../../../src/lib/plane.js","../../../../src/lib/culling-volume.js","../../../../src/classes/matrix4.js","../../../../src/lib/perspective-off-center-frustum.js","../../../../../src/lib/algorithms/bounding-sphere-from-points.js","../../../../src/lib/math-utils.js","../../../../../src/lib/algorithms/compute-eigen-decomposition.js","../../../../../src/lib/algorithms/bounding-box-from-points.js","../node_modules/lodash/range.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../src/utils/math-utils.js","../node_modules/webpack/buildin/global.js","../node_modules/lodash/clamp.js","../../../src/polygon-utils.js","../../../src/earcut.js","../../../src/utils.js","../../../src/lineclip.js","../../../src/cut-by-grid.js","../../../src/cut-by-mercator-bounds.js","../node_modules/process/browser.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/construct.js","../../../../src/classes/resource.js","../node_modules/babel-runtime/helpers/extends.js","../node_modules/@math.gl/core/node_modules/gl-matrix/esm/vec4.js","../node_modules/@babel/runtime/helpers/interopRequireDefault.js","../../../../src/viewports/viewport.js","../node_modules/babel-runtime/helpers/defineProperty.js","../../src/utils.ts","../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/jss/dist/jss.esm.js","../node_modules/@babel/runtime/helpers/extends.js","../../../../src/utils/array-utils.js","../../../../../src/lib/attribute/attribute-transition-utils.js","../node_modules/@turf/invariant/index.js","../node_modules/vega-embed/node_modules/semver/classes/semver.js","../node_modules/lodash/debounce.js","../../../../src/utils/utils.js","../../../../src/webgl-utils/constants-to-keys.js","../node_modules/complex.js/complex.js","../node_modules/lodash/isArray.js","../node_modules/@turf/distance/index.js","../node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js","../node_modules/@material-ui/core/esm/utils/createSvgIcon.js","../node_modules/@material-ui/core/esm/styles/useTheme.js","../../../../../src/lib/env-utils/assert.ts","../../../../src/utils/iterable-utils.js","../node_modules/d3-time/src/interval.js","../../../../src/webgl-utils/typed-array-utils.js","../../../../src/tile-layer/tile-2d-traversal.js","../../../../src/tile-layer/utils.js","../node_modules/ajv/lib/ajv.js","../../libh3-browser.js","../../../lib/bindings.js","../../../lib/h3core.js","../node_modules/lodash/merge.js","../../../../src/classes/texture.js","../node_modules/@math.gl/core/node_modules/gl-matrix/esm/mat3.js","../node_modules/lodash/isObject.js","../node_modules/webpack/buildin/amd-define.js","../node_modules/@babel/runtime/helpers/interopRequireWildcard.js","../node_modules/@material-ui/icons/utils/createSvgIcon.js","../node_modules/vega-format/node_modules/d3-array/src/ticks.js","../node_modules/vega-format/node_modules/d3-format/src/formatSpecifier.js","../node_modules/vega-format/node_modules/d3-format/src/formatDecimal.js","../node_modules/vega-format/node_modules/d3-format/src/exponent.js","../node_modules/vega-format/node_modules/d3-format/src/formatPrefixAuto.js","../node_modules/vega-format/node_modules/d3-format/src/defaultLocale.js","../node_modules/vega-format/node_modules/d3-format/src/formatRounded.js","../node_modules/vega-format/node_modules/d3-format/src/formatTypes.js","../node_modules/vega-format/node_modules/d3-format/src/identity.js","../node_modules/vega-format/node_modules/d3-format/src/locale.js","../node_modules/vega-format/node_modules/d3-format/src/formatGroup.js","../node_modules/vega-format/node_modules/d3-format/src/formatNumerals.js","../node_modules/vega-format/node_modules/d3-format/src/formatTrim.js","../node_modules/vega-format/node_modules/d3-time-format/src/locale.js","../node_modules/vega-format/node_modules/d3-time-format/src/defaultLocale.js","../node_modules/vega-format/build/vega-format.module.js","../node_modules/vega-format/node_modules/d3-format/src/precisionPrefix.js","../node_modules/vega-format/node_modules/d3-format/src/precisionRound.js","../node_modules/vega-format/node_modules/d3-format/src/precisionFixed.js","../../../../src/env/globals.js","../../../../src/controllers/controller.js","../../../../src/utils/positions.js","../../../../src/views/view.js","../../../../src/geometry/geometry.js","../node_modules/@material-ui/core/esm/utils/setRef.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../../../../src/classes/accessor.js","../node_modules/lodash/_root.js","../node_modules/@turf/meta/index.js","../node_modules/react-color/lib/helpers/color.js","../node_modules/@turf/bearing/index.js","../node_modules/vega-embed/node_modules/semver/functions/compare.js","../node_modules/vega-embed/node_modules/semver/classes/range.js","../node_modules/fast-deep-equal/index.js","../../../../src/utils/flatten.js","../node_modules/@material-ui/core/esm/utils/debounce.js","../node_modules/uuid/v4.js","../../../../src/utils/typed-array-manager.js","../node_modules/@material-ui/core/esm/transitions/utils.js","../../../../src/state-tracker/webgl-parameter-tables.js","../node_modules/lodash/isObjectLike.js","../node_modules/webpack/buildin/module.js","../node_modules/@material-ui/core/esm/utils/deprecatedPropType.js","../../../src/lib/immutable-feature-collection.ts","../../../../src/state-tracker/track-context-state.js","../node_modules/@material-ui/core/esm/utils/useControlled.js","../../../../src/classes/framebuffer.js","../../../../src/transitions/transition.js","../../../../src/utils/deep-equal.js","../node_modules/geotiff/src/source/basesource.js","../node_modules/@material-ui/core/esm/utils/createChainedFunction.js","../node_modules/@material-ui/core/esm/FormControl/formControlState.js","../node_modules/@material-ui/core/esm/FormControl/useFormControl.js","../node_modules/d3-time/src/duration.js","../../../../../src/lib/env-utils/globals.ts","../node_modules/fast-xml-parser/src/util.js","../../../../src/utils/memoize.js","../node_modules/@material-ui/system/esm/merge.js","../../../../src/webgl-utils/attribute-utils.js","../../../../../src/lib/loader-utils/normalize-loader.ts","../node_modules/vega-loader/build/vega-loader.browser.module.js","../../../../../src/lib/fetch/fetch-file.ts","../../../../../src/lib/loader-utils/loggers.ts","../../../../../src/lib/loader-utils/option-defaults.ts","../../../../../src/lib/loader-utils/option-utils.ts","../node_modules/@turf/rhumb-destination/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/rhumb-destination/dist/es/index.js","../node_modules/@turf/rhumb-destination/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@math.gl/core/node_modules/gl-matrix/esm/vec2.js","../node_modules/geotiff/src/source/client/base.js","../node_modules/raf/index.js","../../../../src/classes/texture-formats.js","../../src/index.ts","../node_modules/buffer/index.js","../node_modules/core-js/library/modules/_global.js","../node_modules/core-js/library/modules/_core.js","../node_modules/core-js/library/modules/_descriptors.js","../node_modules/lodash/map.js","../../../../../src/lib/binary-utils/array-buffer-utils.ts","../node_modules/react-is/index.js","../../../../src/state-tracker/unified-parameter-api.js","../../../../src/classes/euler.js","../../../../src/lib/effect.js","../../../../src/passes/layers-pass.js","../node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js","../node_modules/@material-ui/core/esm/utils/ownerWindow.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@material-ui/core/esm/styles/defaultTheme.js","../node_modules/@material-ui/core/esm/utils/isMuiElement.js","../node_modules/@turf/clone/dist/es/index.js","../../../../../src/lib/utils/mime-type-utils.ts","../../../../../src/lib/utils/resource-utils.ts","../node_modules/lodash/_getNative.js","../node_modules/lodash/_baseGetTag.js","../node_modules/core-js/library/modules/_object-dp.js","../node_modules/core-js/library/modules/_has.js","../../../../../src/lib/binary-utils/buffer-utils.ts","../node_modules/@babel/runtime/helpers/esm/typeof.js","../../../../../src/effects/lighting/directional-light.js","../../../../../src/shaderlib/misc/geometry.js","../../../../../src/shaderlib/project/project.glsl.js","../../../../../src/shaderlib/project/project.js","../../../../src/tile-layer/tile-2d-header.js","../../../../src/tile-layer/tileset-2d.js","../../../../src/tile-layer/tile-layer.js","../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/@material-ui/core/esm/styles/transitions.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncIterator.js","../node_modules/rc-util/es/Children/toArray.js","../node_modules/@material-ui/core/esm/FormControl/FormControlContext.js","../node_modules/@material-ui/core/esm/InputBase/utils.js","../../../../src/utils/load-file.js","../../../../src/classes/texture-2d.js","../node_modules/is-in-browser/dist/module.js","../../../../../src/lib/utils/response-utils.ts","../node_modules/lodash/cloneDeep.js","../node_modules/@babel/runtime/helpers/objectWithoutProperties.js","../node_modules/warning/warning.js","../../../../src/classes/renderbuffer-formats.js","../../../../src/classes/renderbuffer.js","../node_modules/zustand/index.js","../../../../src/utils/globals.js","../node_modules/fraction.js/fraction.js","../node_modules/javascript-natural-sort/naturalSort.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/isArrayLike.js","../node_modules/react-grid-layout/build/utils.js","../node_modules/ajv/lib/compile/util.js","../node_modules/@babel/runtime/helpers/typeof.js","../../../../../src/lib/path-utils/file-aliases.ts","../node_modules/webpack/buildin/amd-options.js","../node_modules/core-js/library/modules/_export.js","../node_modules/core-js/library/modules/_hide.js","../node_modules/core-js/library/modules/_is-object.js","../node_modules/core-js/library/modules/_to-iobject.js","../node_modules/core-js/library/modules/_wks.js","../node_modules/@turf/bbox/index.js","../node_modules/vega-embed/node_modules/semver/internal/re.js","../node_modules/vega-embed/node_modules/semver/functions/parse.js","../node_modules/@turf/bbox-polygon/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/bbox-polygon/dist/es/index.js","../../../../src/viewports/web-mercator-viewport.js","../../../../src/controllers/orbit-controller.js","../../../../src/transitions/transition-interpolator.js","../../../../src/controllers/map-controller.js","../../../../src/solid-polygon-layer/polygon-tesselator.js","../../../../src/solid-polygon-layer/solid-polygon-layer-vertex-main.glsl.js","../../../../src/solid-polygon-layer/solid-polygon-layer-vertex-top.glsl.js","../../../../src/solid-polygon-layer/solid-polygon-layer-vertex-side.glsl.js","../../../../src/solid-polygon-layer/solid-polygon-layer.js","../../../../src/solid-polygon-layer/solid-polygon-layer-fragment.glsl.js","../../../../src/path-layer/path-tesselator.js","../../../../src/path-layer/path.js","../../../../src/path-layer/path-layer.js","../../../../src/path-layer/path-layer-vertex.glsl.js","../../../../src/path-layer/path-layer-fragment.glsl.js","../../../../src/icon-layer/icon-manager.js","../../../../src/icon-layer/icon-layer.js","../../../../src/icon-layer/icon-layer-vertex.glsl.js","../../../../src/icon-layer/icon-layer-fragment.glsl.js","../node_modules/@turf/center/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/center/node_modules/@turf/meta/dist/es/index.js","../node_modules/@turf/center/node_modules/@turf/bbox/dist/es/index.js","../node_modules/@turf/center/dist/es/index.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/fast-json-stable-stringify/index.js","../../../../../src/shaderlib/project/viewport-uniforms.js","../../../../src/controllers/view-state.js","../../../../../src/shaderlib/shadow/shadow.js","../node_modules/decimal.js/decimal.js","../node_modules/babel-runtime/helpers/classCallCheck.js","../node_modules/babel-runtime/helpers/createClass.js","../node_modules/babel-runtime/helpers/possibleConstructorReturn.js","../node_modules/babel-runtime/helpers/inherits.js","../node_modules/rc-util/es/Dom/findDOMNode.js","../node_modules/polygon-clipping/dist/polygon-clipping.umd.js","../node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js","../node_modules/@turf/rhumb-distance/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/rhumb-distance/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/rhumb-distance/dist/es/index.js","../node_modules/@math.gl/core/node_modules/gl-matrix/esm/mat4.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/@material-ui/core/esm/List/ListContext.js","../node_modules/long/dist/long.js","../../../../src/utils/matrix.js","../node_modules/react/jsx-dev-runtime.js","../../../../src/polyfill/get-parameter-polyfill.js","../../../../src/polyfill/polyfill-table.js","../node_modules/lodash/eq.js","../node_modules/lodash/keys.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/classCallCheck.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/createClass.js","../node_modules/lodash/_copyObject.js","../node_modules/core-js/library/modules/_an-object.js","../node_modules/core-js/library/modules/_fails.js","../node_modules/@turf/destination/index.js","../../../src/lib/nebula-layer.ts","../../../src/lib/two-click-polygon-mode.ts","../node_modules/@turf/centroid/index.js","../node_modules/@turf/boolean-point-in-polygon/index.js","../../../../../src/lib/binary-utils/get-first-characters.ts","../node_modules/tiny-warning/dist/tiny-warning.esm.js","../../../../src/utils/hi-res-timestamp.js","../../../../src/lifecycle/props.js","../../../../src/controllers/transition-manager.js","../../../../src/transitions/linear-interpolator.js","../node_modules/rc-animate/es/util/motion.js","../node_modules/rc-animate/es/CSSMotion.js","../node_modules/rc-tree/es/TreeNode.js","../../../../src/passes/shadow-pass.js","../../../../../src/effects/lighting/lighting-effect.js","../node_modules/@math.gl/core/node_modules/gl-matrix/esm/quat.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../../../../src/utils/check-props.js","../../../../../src/shaderlib/project/project-functions.js","../../../../../src/lib/utils/globals.ts","../../../../src/solid-polygon-layer/polygon.js","../node_modules/lodash/isNil.js","../node_modules/rc-tree/es/contextTypes.js","../../../../../src/modules/lights/lights.glsl.js","../../../../../src/modules/lights/lights.js","../../../src/init.js","../node_modules/hammerjs/hammer.js","../../node_modules/numcodecs/pako.esm-ef1fc3f4.mjs","../node_modules/lodash/_Stack.js","../node_modules/lodash/_ListCache.js","../node_modules/lodash/_assocIndexOf.js","../node_modules/lodash/_nativeCreate.js","../node_modules/lodash/_getMapData.js","../node_modules/lodash/isArguments.js","../node_modules/lodash/isBuffer.js","../node_modules/lodash/_baseUnary.js","../node_modules/lodash/_getTag.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/utils/shims.js","../node_modules/lodash/isSymbol.js","../../../../src/classes/spherical-coordinates.js","../../../../src/classes/pose.js","../node_modules/fast-xml-parser/src/xmlstr2xmlnode.js","../node_modules/lodash/keysIn.js","../node_modules/lodash/identity.js","../node_modules/core-js/library/modules/_property-desc.js","../node_modules/core-js/library/modules/_object-keys.js","../node_modules/core-js/library/modules/_library.js","../node_modules/core-js/library/modules/_uid.js","../node_modules/core-js/library/modules/_object-pie.js","../node_modules/lodash/_toKey.js","../node_modules/@turf/line-intersect/index.js","../../../../../src/lib/binary-utils/memory-copy-utils.ts","../../../src/lib/utils.ts","../node_modules/vega-embed/node_modules/semver/internal/constants.js","../node_modules/vega-embed/node_modules/semver/internal/debug.js","../node_modules/vega-embed/node_modules/semver/internal/parse-options.js","../node_modules/vega-embed/node_modules/semver/functions/gt.js","../node_modules/vega-embed/node_modules/semver/classes/comparator.js","../node_modules/vega-embed/node_modules/semver/functions/satisfies.js","../node_modules/@turf/difference/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/difference/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/difference/dist/es/index.js","../../../../../src/lib/env-utils/version.ts","../../../../src/utils/shader.js","../../../../src/utils/count.js","../../../../src/controllers/orthographic-controller.js","../../../../src/views/map-view.js","../../../../src/shaderlib/index.js","../../../../../src/effects/lighting/ambient-light.js","../../../../src/transitions/cpu-interpolation-transition.js","../../../../src/transitions/cpu-spring-transition.js","../../../../src/lib/uniform-transition-manager.js","../../../../src/utils/texture.js","../../../../src/lifecycle/prop-types.js","../../../../src/lifecycle/create-props.js","../../../../src/lifecycle/component-state.js","../../../../src/lifecycle/component.js","../../../../src/lib/layer-state.js","../../../../src/lib/layer.js","../../../../../src/lib/attribute/shader-attribute.js","../../../../../src/lib/attribute/data-column.js","../../../../../src/lib/attribute/gl-utils.js","../../../../src/utils/range.js","../../../../../src/lib/attribute/attribute.js","../../../../src/transitions/gpu-interpolation-transition.js","../../../../../src/lib/attribute/attribute-transition-manager.js","../../../../src/transitions/gpu-spring-transition.js","../../../../../src/lib/attribute/attribute-manager.js","../../../../src/text-layer/utils.js","../../../../src/text-layer/lru-cache.js","../../../../src/text-layer/font-atlas-manager.js","../../../../src/text-layer/text-layer.js","../../../../src/column-layer/column-geometry.js","../../../../src/column-layer/column-layer.js","../../../../src/column-layer/column-layer-vertex.glsl.js","../../../../src/column-layer/column-layer-fragment.glsl.js","../../../../src/scatterplot-layer/scatterplot-layer.js","../../../../src/scatterplot-layer/scatterplot-layer-vertex.glsl.js","../../../../src/scatterplot-layer/scatterplot-layer-fragment.glsl.js","../../../../../src/text-layer/text-background-layer/text-background-layer.js","../../../../../src/text-layer/text-background-layer/text-background-layer-vertex.glsl.js","../../../../../src/text-layer/text-background-layer/text-background-layer-fragment.glsl.js","../../../../../src/lib/resource/resource.js","../../../../../src/lib/resource/resource-manager.js","../../../../src/lib/layer-manager.js","../../../../../src/text-layer/multi-icon-layer/multi-icon-layer.js","../../../../../src/text-layer/multi-icon-layer/multi-icon-layer-fragment.glsl.js","../../../../src/passes/draw-layers-pass.js","../../../../src/lib/deck-renderer.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@material-ui/styles/esm/ThemeProvider/nested.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@material-ui/system/esm/breakpoints.js","../node_modules/@material-ui/core/esm/styles/zIndex.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../../../../src/env/is-browser.js","../../../../src/env/is-electron.js","../../../../src/utils/stub-methods.js","../../../../../src/lib/category-api/binary-image-api.ts","../../../../src/passes/pass.js","../../../../src/passes/pick-layers-pass.js","../node_modules/tinycolor2/tinycolor.js","../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../node_modules/@material-ui/core/esm/utils/getScrollbarSize.js","../node_modules/react-virtualized/dist/es/vendor/detectElementResize.js","../node_modules/babel-runtime/helpers/objectWithoutProperties.js","../node_modules/@material-ui/core/esm/Table/TableContext.js","../node_modules/@material-ui/core/esm/Accordion/AccordionContext.js","../node_modules/@material-ui/icons/Add.js","../node_modules/vega-tooltip/build/vega-tooltip.module.js","../../../src/draco-loader.ts","../../../../../src/lib/utils/version.ts","../../../../../src/category/mesh/mesh-utils.ts","../../../../../src/lib/schema/impl/schema.ts","../../../../../src/lib/utils/assert.ts","../../../../../src/lib/schema/impl/enum.ts","../../../../../src/lib/schema/impl/type.ts","../../../../../src/lib/schema/impl/field.ts","../../../../../src/lib/utils/schema-attribute-utils.ts","../../../../../src/lib/schema-utils/type-utils.ts","../../../../src/lib/draco-parser.ts","../../../../../src/lib/library-utils/library-utils.ts","../../../../src/lib/draco-module-loader.ts","../../../../src/utils/array-utils-flat.js","../../../../src/env/get-browser.js","../../../../src/classes/vertex-array-object.js","../../../../src/classes/vertex-array.js","../../../../src/utils/format-value.js","../../../../src/debug/debug-vertex-array.js","../../../../src/debug/debug-uniforms.js","../../../../src/debug/debug-program-configuration.js","../../../../src/lib/model-utils.js","../../../../src/lib/model.js","../../../../src/lib/stat.js","../../../../src/lib/stats.js","../node_modules/@turf/rhumb-bearing/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/rhumb-bearing/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/rhumb-bearing/dist/es/index.js","../node_modules/rc-tree/es/Tree.js","../node_modules/rc-tree/es/index.js","../node_modules/@material-ui/core/esm/colors/grey.js","../../../../src/features/webgl-features-table.js","../../../../src/classes/clear.js","../node_modules/turf-jsts/jsts.min.js","../node_modules/json-stringify-pretty-compact/index.js","../../../../src/lib/inject-shader.js","../../../../src/modules/module-injectors.js","../node_modules/react-transition-group/esm/utils/ChildMapping.js","../node_modules/react-transition-group/esm/TransitionGroup.js","../node_modules/@material-ui/core/esm/ButtonBase/Ripple.js","../node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js","../node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js","../node_modules/object-assign/index.js","../node_modules/lodash/_baseIsEqual.js","../node_modules/lodash/_Map.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/_MapCache.js","../node_modules/lodash/_SetCache.js","../node_modules/lodash/_cacheHas.js","../node_modules/lodash/_setToArray.js","../node_modules/lodash/_arrayPush.js","../node_modules/lodash/_getSymbols.js","../node_modules/lodash/_isIndex.js","../node_modules/lodash/isTypedArray.js","../node_modules/lodash/isLength.js","../node_modules/lodash/_nodeUtil.js","../node_modules/lodash/_isPrototype.js","../node_modules/lodash.isequal/index.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/utils/domFns.js","../node_modules/lodash/toNumber.js","../node_modules/ajv/lib/compile/resolve.js","../node_modules/ajv/lib/compile/error_classes.js","../../../../../src/lib/iterators/async-iteration.ts","../node_modules/lodash/_baseAssignValue.js","../node_modules/lodash/_getPrototype.js","../node_modules/lodash/_cloneArrayBuffer.js","../node_modules/@material-ui/core/esm/utils/requirePropFactory.js","../node_modules/@material-ui/core/esm/utils/unsupportedProp.js","../node_modules/lodash/_baseRest.js","../node_modules/lodash/isArrayLikeObject.js","../node_modules/lodash/_arrayMap.js","../node_modules/core-js/library/modules/_to-primitive.js","../node_modules/core-js/library/modules/_defined.js","../node_modules/core-js/library/modules/_to-integer.js","../node_modules/core-js/library/modules/_shared-key.js","../node_modules/core-js/library/modules/_shared.js","../node_modules/core-js/library/modules/_enum-bug-keys.js","../node_modules/core-js/library/modules/_object-gops.js","../node_modules/core-js/library/modules/_to-object.js","../node_modules/core-js/library/modules/_iterators.js","../node_modules/core-js/library/modules/_object-create.js","../node_modules/core-js/library/modules/_set-to-string-tag.js","../node_modules/core-js/library/modules/_wks-ext.js","../node_modules/core-js/library/modules/_wks-define.js","../node_modules/lodash/forOwn.js","../node_modules/lodash/_isKey.js","../node_modules/react-color/lib/components/common/Checkboard.js","../node_modules/@turf/boolean-point-on-line/index.js","../node_modules/@turf/nearest-point-on-line/index.js","../node_modules/function-bind/index.js","../node_modules/define-properties/index.js","../../../src/layers/editable-geojson-layer.ts","../../../src/lib/modify-mode.ts","../../../src/lib/translate-mode.ts","../../../src/lib/draw-polygon-mode.ts","../../../../src/lib/deck-renderer/deck-cache.ts","../node_modules/vega-embed/node_modules/semver/internal/identifiers.js","../node_modules/vega-embed/node_modules/semver/functions/eq.js","../node_modules/vega-embed/node_modules/semver/functions/compare-build.js","../node_modules/vega-embed/node_modules/semver/functions/lt.js","../node_modules/vega-embed/node_modules/semver/functions/gte.js","../node_modules/vega-embed/node_modules/semver/functions/lte.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js","../node_modules/vega-embed/node_modules/semver/ranges/outside.js","../node_modules/@turf/buffer/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/buffer/node_modules/@turf/meta/dist/es/index.js","../node_modules/d3-geo/src/adder.js","../node_modules/d3-geo/src/math.js","../node_modules/d3-geo/src/noop.js","../node_modules/d3-geo/src/stream.js","../node_modules/d3-geo/src/area.js","../node_modules/d3-geo/src/cartesian.js","../node_modules/d3-geo/src/bounds.js","../node_modules/d3-geo/src/centroid.js","../node_modules/d3-geo/src/compose.js","../node_modules/d3-geo/src/rotation.js","../node_modules/d3-geo/src/circle.js","../node_modules/d3-geo/src/clip/buffer.js","../node_modules/d3-geo/src/pointEqual.js","../node_modules/d3-geo/src/clip/polygon.js","../node_modules/d3-geo/node_modules/d3-array/src/ascending.js","../node_modules/d3-geo/node_modules/d3-array/src/bisect.js","../node_modules/d3-geo/node_modules/d3-array/src/bisector.js","../node_modules/d3-geo/node_modules/d3-array/src/cross.js","../node_modules/d3-geo/node_modules/d3-array/src/array.js","../node_modules/d3-geo/node_modules/d3-array/src/ticks.js","../node_modules/d3-geo/node_modules/d3-array/src/threshold/sturges.js","../node_modules/d3-geo/node_modules/d3-array/src/merge.js","../node_modules/d3-geo/src/clip/extent.js","../node_modules/d3-geo/src/clip/line.js","../node_modules/d3-geo/src/polygonContains.js","../node_modules/d3-geo/src/length.js","../node_modules/d3-geo/src/interpolate.js","../node_modules/d3-geo/src/identity.js","../node_modules/d3-geo/src/path/area.js","../node_modules/d3-geo/src/path/bounds.js","../node_modules/d3-geo/src/path/context.js","../node_modules/d3-geo/src/path/measure.js","../node_modules/d3-geo/src/path/string.js","../node_modules/d3-geo/src/path/index.js","../node_modules/d3-geo/src/clip/index.js","../node_modules/d3-geo/src/clip/antimeridian.js","../node_modules/d3-geo/src/clip/circle.js","../node_modules/d3-geo/src/transform.js","../node_modules/d3-geo/src/projection/fit.js","../node_modules/d3-geo/src/projection/resample.js","../node_modules/d3-geo/src/projection/index.js","../node_modules/d3-geo/src/projection/azimuthal.js","../node_modules/d3-geo/src/projection/azimuthalEqualArea.js","../node_modules/d3-geo/src/projection/azimuthalEquidistant.js","../node_modules/d3-geo/src/projection/mercator.js","../node_modules/d3-geo/src/projection/equirectangular.js","../node_modules/d3-geo/src/projection/gnomonic.js","../node_modules/d3-geo/src/projection/naturalEarth1.js","../node_modules/d3-geo/src/projection/orthographic.js","../node_modules/d3-geo/src/projection/stereographic.js","../node_modules/d3-geo/src/projection/transverseMercator.js","../node_modules/@turf/buffer/dist/es/index.js","../../../../../src/lib/worker-utils/get-loadable-worker-url.ts","../../../../../src/lib/worker-utils/get-transfer-list.ts","../../../../../src/lib/worker-farm/worker-thread.ts","../../../../../src/lib/worker-farm/worker-job.ts","../../../../../src/lib/worker-farm/worker-pool.ts","../../../../../src/lib/worker-farm/worker-farm.ts","../../../../../src/lib/worker-api/get-worker-url.ts","../../../../../src/lib/worker-loader-utils/parse-with-worker.ts","../node_modules/@turf/circle/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/circle/node_modules/@turf/destination/dist/es/index.js","../node_modules/@turf/circle/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/circle/dist/es/index.js","../node_modules/@turf/polygon-to-line/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/polygon-to-line/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/polygon-to-line/dist/es/index.js","../../../../src/lib/composite-layer.js","../node_modules/@turf/transform-rotate/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/transform-rotate/node_modules/@turf/meta/dist/es/index.js","../node_modules/@turf/transform-rotate/node_modules/@turf/centroid/dist/es/index.js","../node_modules/@turf/transform-rotate/dist/es/index.js","../node_modules/@turf/transform-rotate/node_modules/@turf/invariant/dist/es/index.js","../../../../src/utils/json-loader.js","../../../../src/lib/init.js","../node_modules/zustand/context.js","../node_modules/zustand/shallow.js","../node_modules/react-grid-layout/index.js","../node_modules/typed-function/typed-function.js","../node_modules/seedrandom/index.js","../node_modules/@material-ui/icons/ArrowDropUp.js","../node_modules/@material-ui/icons/ArrowDropDown.js","../node_modules/pbf/index.js","../node_modules/dynamic-import-polyfill/dist/dynamic-import-polyfill.mjs","../../src/ZarrMultivecDataFetcher.js","../node_modules/vega-embed/node_modules/semver/index.js","../node_modules/lz-string/libs/lz-string.js","../node_modules/react-virtualized/dist/es/Grid/utils/calculateSizeAndPositionDataAndUpdateScrollOffset.js","../node_modules/react-virtualized/dist/es/Grid/utils/CellSizeAndPositionManager.js","../node_modules/react-virtualized/dist/es/Grid/utils/maxElementSize.js","../node_modules/react-virtualized/dist/es/Grid/utils/ScalingCellSizeAndPositionManager.js","../node_modules/react-virtualized/dist/es/utils/createCallbackMemoizer.js","../node_modules/react-virtualized/dist/es/Grid/utils/updateScrollIndexHelper.js","../node_modules/dom-helpers/esm/canUseDOM.js","../node_modules/dom-helpers/esm/scrollbarSize.js","../node_modules/react-virtualized/dist/es/utils/animationFrame.js","../node_modules/react-virtualized/dist/es/Grid/Grid.js","../node_modules/react-virtualized/dist/es/utils/requestAnimationTimeout.js","../node_modules/react-virtualized/dist/es/Grid/defaultOverscanIndicesGetter.js","../node_modules/react-virtualized/dist/es/Grid/defaultCellRangeRenderer.js","../node_modules/react-virtualized/dist/es/Grid/accessibilityOverscanIndicesGetter.js","../node_modules/react-virtualized/dist/es/ArrowKeyStepper/types.js","../node_modules/react-virtualized/dist/es/ArrowKeyStepper/ArrowKeyStepper.js","../node_modules/react-virtualized/dist/es/AutoSizer/AutoSizer.js","../node_modules/react-virtualized/dist/es/CellMeasurer/CellMeasurer.js","../node_modules/react-virtualized/dist/es/Collection/CollectionView.js","../node_modules/react-virtualized/dist/es/Collection/Section.js","../node_modules/react-virtualized/dist/es/Collection/SectionManager.js","../node_modules/react-virtualized/dist/es/utils/getUpdatedOffsetForIndex.js","../node_modules/react-virtualized/dist/es/Collection/Collection.js","../node_modules/react-virtualized/dist/es/Collection/utils/calculateSizeAndPositionData.js","../node_modules/react-virtualized/dist/es/Collection/index.js","../node_modules/react-virtualized/dist/es/ColumnSizer/ColumnSizer.js","../node_modules/react-virtualized/dist/es/ColumnSizer/index.js","../node_modules/react-virtualized/dist/es/InfiniteLoader/InfiniteLoader.js","../node_modules/react-virtualized/dist/es/InfiniteLoader/index.js","../node_modules/react-virtualized/dist/es/List/List.js","../node_modules/react-virtualized/dist/es/vendor/binarySearchBounds.js","../node_modules/react-virtualized/dist/es/vendor/intervalTree.js","../node_modules/react-virtualized/dist/es/Masonry/PositionCache.js","../node_modules/react-virtualized/dist/es/Masonry/Masonry.js","../node_modules/react-virtualized/dist/es/Masonry/index.js","../node_modules/react-virtualized/dist/es/MultiGrid/CellMeasurerCacheDecorator.js","../node_modules/react-virtualized/dist/es/MultiGrid/MultiGrid.js","../node_modules/react-virtualized/dist/es/ScrollSync/ScrollSync.js","../node_modules/react-virtualized/dist/es/Table/defaultHeaderRowRenderer.js","../node_modules/react-virtualized/dist/es/Table/SortDirection.js","../node_modules/react-virtualized/dist/es/Table/SortIndicator.js","../node_modules/react-virtualized/dist/es/Table/defaultHeaderRenderer.js","../node_modules/react-virtualized/dist/es/Table/defaultRowRenderer.js","../node_modules/react-virtualized/dist/es/Table/Column.js","../node_modules/react-virtualized/dist/es/Table/Table.js","../node_modules/react-virtualized/dist/es/Table/defaultCellDataGetter.js","../node_modules/react-virtualized/dist/es/Table/defaultCellRenderer.js","../node_modules/react-virtualized/dist/es/Table/index.js","../node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js","../node_modules/react-virtualized/dist/es/WindowScroller/utils/dimensions.js","../node_modules/react-virtualized/dist/es/WindowScroller/WindowScroller.js","../node_modules/react-virtualized/dist/es/index.js","../node_modules/topojson-client/src/identity.js","../node_modules/topojson-client/src/transform.js","../node_modules/topojson-client/src/feature.js","../node_modules/topojson-client/src/reverse.js","../node_modules/topojson-client/src/stitch.js","../node_modules/topojson-client/src/mesh.js","../node_modules/topojson-client/src/index.js","../../../../src/lib/resolve-modules.js","../../../../src/utils/is-old-ie.js","../../../../src/utils/webgl-info.js","../../../../src/lib/transpile-shader.js","../../../../src/lib/assemble-shaders.js","../../../../src/lib/platform-defines.js","../../../../src/lib/program-manager.js","../node_modules/d3-dispatch/src/dispatch.js","../node_modules/d3-timer/src/timer.js","../node_modules/d3-force/src/lcg.js","../node_modules/d3-force/src/simulation.js","../../../../src/webgl-utils/format-utils.js","../../../../src/classes/copy-and-blit.js","../../../../../src/lib/filters/prop-types.js","../../../../src/lib/shader-module.js","../node_modules/@material-ui/styles/esm/useTheme/useTheme.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_toSource.js","../node_modules/lodash/_equalArrays.js","../node_modules/lodash/_Uint8Array.js","../node_modules/lodash/_getAllKeys.js","../node_modules/lodash/_baseGetAllKeys.js","../node_modules/lodash/stubArray.js","../node_modules/lodash/_arrayLikeKeys.js","../node_modules/lodash/_overArg.js","../node_modules/lodash/_Set.js","../node_modules/react-grid-layout/build/ReactGridLayout.js","../node_modules/react-grid-layout/build/calculateUtils.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/utils/positionFns.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/utils/log.js","../node_modules/react-resizable/build/Resizable.js","../node_modules/react-grid-layout/build/responsiveUtils.js","../node_modules/lodash/_isIterateeCall.js","../node_modules/ajv/lib/compile/schema_obj.js","../node_modules/ajv/lib/dotjs/validate.js","../node_modules/ajv/lib/dotjs/_limit.js","../node_modules/ajv/lib/dotjs/_limitItems.js","../node_modules/ajv/lib/dotjs/_limitLength.js","../node_modules/ajv/lib/dotjs/_limitProperties.js","../node_modules/ieee754/index.js","../../../../src/classes/vector2.js","../../../../src/classes/vector4.js","../../../../src/polyfill/polyfill-context.js","../../../../../src/shaderlib/project32/project32.js","../../../../../src/shaderlib/picking/picking.js","../../../../src/utils/tesselator.js","../../../../../src/lib/request-utils/request-scheduler.ts","../../../../src/lib/layer-extension.js","../../../../src/polygon-layer/polygon-layer.js","../../../../src/views/orthographic-view.js","../../../../src/views/orbit-view.js","../node_modules/lodash/_arrayEach.js","../node_modules/lodash/_assignValue.js","../node_modules/lodash/_defineProperty.js","../node_modules/lodash/_cloneBuffer.js","../node_modules/lodash/_copyArray.js","../node_modules/lodash/_getSymbolsIn.js","../node_modules/lodash/_cloneTypedArray.js","../node_modules/lodash/_initCloneObject.js","../node_modules/lodash/_baseFlatten.js","../node_modules/lodash/_arrayIncludes.js","../node_modules/lodash/_arrayIncludesWith.js","../node_modules/core-js/library/modules/_ctx.js","../node_modules/core-js/library/modules/_ie8-dom-define.js","../node_modules/core-js/library/modules/_dom-create.js","../node_modules/core-js/library/modules/_object-keys-internal.js","../node_modules/core-js/library/modules/_iobject.js","../node_modules/core-js/library/modules/_cof.js","../node_modules/babel-runtime/core-js/object/define-property.js","../node_modules/babel-runtime/helpers/typeof.js","../node_modules/core-js/library/modules/_iter-define.js","../node_modules/core-js/library/modules/_redefine.js","../node_modules/core-js/library/modules/_object-gopn.js","../node_modules/core-js/library/modules/_object-gopd.js","../node_modules/lodash/_baseForOwn.js","../node_modules/lodash/_baseFor.js","../node_modules/lodash/_castFunction.js","../node_modules/lodash/isPlainObject.js","../node_modules/lodash/_isStrictComparable.js","../node_modules/lodash/_matchesStrictComparable.js","../node_modules/lodash/_baseGet.js","../node_modules/lodash/_castPath.js","../node_modules/lodash/_baseEach.js","../node_modules/lodash/_assignMergeValue.js","../node_modules/lodash/_safeGet.js","../node_modules/react-color/lib/components/common/ColorWrap.js","../node_modules/material-colors/dist/colors.es2015.js","../node_modules/geojson-rbush/index.js","../node_modules/@turf/line-segment/index.js","../node_modules/deep-equal/index.js","../node_modules/object-keys/index.js","../node_modules/object-keys/isArguments.js","../node_modules/regexp.prototype.flags/implementation.js","../node_modules/regexp.prototype.flags/polyfill.js","../../../src/lib/style.ts","../../../../src/lib/deck-renderer/deck-drawer.ts","../../../src/lib/layer-mouse-event.ts","../node_modules/events/events.js","../node_modules/viewport-mercator-project/module.js","../../../src/lib/scale-mode.ts","../../../src/lib/rotate-mode.ts","../../../src/lib/composite-mode.ts","../../../src/lib/three-click-polygon-mode.ts","../../src/memoize.ts","../../../src/layers/editable-layer.ts","../../../../../src/lib/parser-utils/parse-json.ts","../../../../src/layers/path-outline-layer/path-outline-layer.ts","../node_modules/vega-embed/node_modules/semver/functions/neq.js","../node_modules/vega-embed/node_modules/semver/functions/cmp.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../../../../src/great-circle-layer/great-circle-layer.js","../../../../src/s2-layer/s2-geometry.js","../../../../src/s2-layer/s2-utils.js","../../../../src/s2-layer/s2-layer.js","../../../../src/trips-layer/trips-layer.js","../../../../src/h3-layers/h3-cluster-layer.js","../../../../src/h3-layers/h3-hexagon-layer.js","../../../../src/mesh-layer/mesh-layer.js","../../../../src/mesh-layer/mesh-layer-vertex.glsl.js","../../../../src/mesh-layer/mesh-layer-fragment.glsl.js","../node_modules/@loaders.gl/tiles/node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../../src/type-utils.js","../../../../../src/ellipsoid/helpers/scale-to-geodetic-surface.js","../../../../../src/ellipsoid/helpers/ellipsoid-transform.js","../../../../src/ellipsoid/ellipsoid.js","../../../../src/utils/doubly-linked-list-node.js","../../../../src/utils/doubly-linked-list.js","../../../../src/tileset/tileset-cache.ts","../../../../../src/tileset/helpers/frame-state.ts","../../../../../src/tileset/helpers/zoom.ts","../../../src/constants.ts","../../../../../src/tileset/helpers/bounding-volume.ts","../../../../../src/tileset/helpers/tiles-3d-lod.ts","../../../../../src/tileset/helpers/i3s-lod.ts","../../../../src/utils/managed-array.js","../../../../../src/tileset/traversers/tileset-traverser.ts","../../../../src/tileset/tile-3d.ts","../../../../../src/tileset/helpers/3d-tiles-options.ts","../../../../../src/tileset/traversers/tileset-3d-traverser.ts","../../../../../src/tileset/traversers/i3s-tile-manager.ts","../../../../../src/tileset/traversers/i3s-tileset-traverser.ts","../../../../src/tileset/tileset-3d.ts","../../../../../src/tileset/helpers/transform-utils.ts","../../../../../src/lib/utils/version.js","../../../../../src/lib/parsers/helpers/parse-utils.js","../../../../src/geometry/constants.ts","../../../../../src/geometry/gl/gl-type.ts","../../../../../src/lib/classes/tile-3d-feature-table.js","../../../../../src/lib/classes/helpers/tile-3d-accessor-utils.js","../../../../../src/lib/classes/tile-3d-batch-table-hierarchy.js","../../../../../src/lib/classes/tile-3d-batch-table.js","../../../../../src/lib/parsers/helpers/parse-3d-tile-header.js","../../../../../src/lib/parsers/helpers/parse-3d-tile-tables.js","../../../../../src/geometry/colors/rgb565.ts","../../../../../src/lib/parsers/helpers/normalize-3d-tile-colors.js","../../../../../src/geometry/utils/assert.ts","../../../../../src/geometry/compression/attribute-compression.ts","../../../../../src/lib/parsers/helpers/normalize-3d-tile-normals.js","../../../../../src/lib/parsers/helpers/normalize-3d-tile-positions.js","../../../../../src/lib/parsers/parse-3d-tile-point-cloud.js","../../../../../src/lib/parsers/helpers/parse-3d-tile-gltf-view.js","../../../../../src/lib/parsers/parse-3d-tile-batched-model.js","../../../../../src/lib/parsers/parse-3d-tile-instanced-model.js","../../../../../src/lib/parsers/parse-3d-tile-composite.js","../../../../../src/lib/parsers/parse-3d-tile.js","../../../../../src/lib/parsers/parse-3d-tile-header.js","../../../src/tiles-3d-loader.ts","../../../../src/tile-3d-layer/tile-3d-layer.js","../../../src/terrain-loader.ts","../../../../src/terrain-layer/terrain-layer.js","../../../../../src/lib/mapbox-vector-tile/vector-tile-feature.js","../../../../../src/lib/mapbox-vector-tile/vector-tile-layer.js","../../../../../src/lib/mapbox-vector-tile/vector-tile.js","../../../../../src/lib/binary-vector-tile/vector-tile-feature.js","../../../../../src/lib/binary-vector-tile/vector-tile-layer.js","../../../../../src/lib/binary-vector-tile/vector-tile.js","../../../../../src/lib/binary-vector-tile/features-to-binary.js","../../../../src/lib/parse-mvt.js","../../../src/mvt-loader.ts","../../../../src/lib/binary-to-geojson.ts","../../../../src/clip/clip.js","../../../../src/mvt-layer/coordinate-transform.js","../../../../src/mvt-layer/find-index-binary.js","../../../../src/mvt-layer/mvt-layer.js","../../../../src/lib/view-manager.js","../../../../src/lib/effect-manager.js","../../../../../src/lib/picking/query-object.js","../../../../../src/lib/picking/pick-info.js","../../../../src/lib/deck-picker.js","../../../../src/lib/tooltip.js","../../../../src/utils/hammer-overrides.js","../../../../src/utils/hammer.browser.js","../../../../src/inputs/wheel-input.js","../../../../src/inputs/move-input.js","../../../../src/inputs/key-input.js","../../../../src/inputs/contextmenu-input.js","../../../../src/utils/event-utils.js","../../../../src/utils/event-registrar.js","../../../src/event-manager.js","../../../../src/lib/deck.js","../../../../src/scenegraph/scenegraph-node.js","../../../../src/scenegraph/group-node.js","../../../../src/gltf/gltf-animator.js","../../../../src/scenegraph/model-node.js","../../../../src/gltf/create-gltf-model.js","../../../../src/gltf/gltf-instantiator.js","../../../../src/scenegraph-layer/gltf-utils.js","../../../../src/scenegraph-layer/scenegraph-layer.js","../../../../src/scenegraph-layer/scenegraph-layer-vertex.glsl.js","../../../../src/scenegraph-layer/scenegraph-layer-fragment.glsl.js","../../../../src/gltf/create-gltf-objects.js","../../../../src/geojson-layer/geojson-binary.js","../../../../src/geojson-layer/sub-layer-map.js","../../../../src/geojson-layer/geojson.js","../../../../src/geojson-layer/geojson-layer-props.js","../../../../src/geojson-layer/geojson-layer.js","../node_modules/@turf/point-to-line-distance/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/point-to-line-distance/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/point-to-line-distance/node_modules/@turf/distance/dist/es/index.js","../node_modules/@turf/point-to-line-distance/node_modules/@turf/meta/dist/es/index.js","../node_modules/@turf/point-to-line-distance/dist/es/index.js","../../../../src/bitmap-layer/create-mesh.js","../../../../src/bitmap-layer/bitmap-layer-vertex.js","../../../../src/bitmap-layer/bitmap-layer-fragment.js","../../../../src/bitmap-layer/bitmap-layer.js","../../../../src/line-layer/line-layer.js","../../../../src/line-layer/line-layer-vertex.glsl.js","../../../../src/line-layer/line-layer-fragment.glsl.js","../../../../src/arc-layer/arc-layer.js","../../../../src/arc-layer/arc-layer-vertex.glsl.js","../../../../src/arc-layer/arc-layer-fragment.glsl.js","../../../../src/point-cloud-layer/point-cloud-layer.js","../../../../src/point-cloud-layer/point-cloud-layer-vertex.glsl.js","../../../../src/point-cloud-layer/point-cloud-layer-fragment.glsl.js","../../../../src/simple-mesh-layer/simple-mesh-layer.js","../../../../src/simple-mesh-layer/simple-mesh-layer-vertex.glsl.js","../../../../src/simple-mesh-layer/simple-mesh-layer-fragment.glsl.js","../node_modules/@turf/ellipse/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/ellipse/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/ellipse/dist/es/index.js","../node_modules/@material-ui/core/esm/utils/unstable_useId.js","../node_modules/@material-ui/core/esm/utils/index.js","../../../../../src/modules/phong-lighting/phong-lighting.glsl.js","../../../../../src/modules/phong-lighting/phong-lighting.js","../node_modules/fast-xml-parser/src/parser.js","../../../../src/polyfill/polyfill-vertex-array-object.js","../../../../src/webgl-utils/texture-utils.js","../../../../src/classes/texture-cube.js","../../../../src/classes/texture-3d.js","../../../../../src/lib/api/register-loaders.ts","../node_modules/@mapbox/tiny-sdf/index.js","../node_modules/earcut/src/earcut.js","../node_modules/lerc/LercDecode.js","../node_modules/geotiff/node_modules/lru-cache/index.js","../node_modules/geotiff/src/source/client/http.js","../node_modules/geotiff/src/source/file.js","../node_modules/short-number/index.js","../node_modules/json2csv/dist/json2csv.umd.js","../node_modules/concaveman/index.js","../node_modules/internmap/src/index.js","../../../src/utils/isBrowser.js","../../../src/utils/debounce.js","../../../src/utils/isFunction.js","../../../src/utils/getStyleComputedProperty.js","../../../src/utils/getParentNode.js","../../../src/utils/getScrollParent.js","../../../src/utils/getReferenceNode.js","../../../src/utils/isIE.js","../../../src/utils/getOffsetParent.js","../../../src/utils/getRoot.js","../../../src/utils/findCommonOffsetParent.js","../../../src/utils/isOffsetContainer.js","../../../src/utils/getScroll.js","../../../src/utils/includeScroll.js","../../../src/utils/getBordersSize.js","../../../src/utils/getWindowSizes.js","../../../src/utils/getClientRect.js","../../../src/utils/getBoundingClientRect.js","../../../src/utils/getOffsetRectRelativeToArbitraryNode.js","../../../src/utils/getViewportOffsetRectRelativeToArtbitraryNode.js","../../../src/utils/isFixed.js","../../../src/utils/getFixedPositionOffsetParent.js","../../../src/utils/getBoundaries.js","../../../src/utils/computeAutoPlacement.js","../../../src/utils/getReferenceOffsets.js","../../../src/utils/getOuterSizes.js","../../../src/utils/getOppositePlacement.js","../../../src/utils/getPopperOffsets.js","../../../src/utils/find.js","../../../src/utils/runModifiers.js","../../../src/utils/findIndex.js","../../../src/methods/update.js","../../../src/utils/isModifierEnabled.js","../../../src/utils/getSupportedPropertyName.js","../../../src/methods/destroy.js","../../../src/utils/getWindow.js","../../../src/utils/setupEventListeners.js","../../../src/methods/enableEventListeners.js","../../../src/methods/disableEventListeners.js","../../../src/utils/removeEventListeners.js","../../../src/utils/isNumeric.js","../../../src/utils/setStyles.js","../../../src/modifiers/computeStyle.js","../../../src/utils/isModifierRequired.js","../../../src/methods/placements.js","../../../src/utils/clockwise.js","../../../src/modifiers/flip.js","../../../src/modifiers/offset.js","../../../src/modifiers/index.js","../../../src/methods/defaults.js","../../../src/modifiers/shift.js","../../../src/modifiers/preventOverflow.js","../../../src/modifiers/keepTogether.js","../../../src/modifiers/arrow.js","../../../src/utils/getOppositeVariation.js","../../../src/modifiers/inner.js","../../../src/modifiers/hide.js","../../../src/utils/getRoundedOffsets.js","../../../src/modifiers/applyStyle.js","../../../src/utils/setAttributes.js","../node_modules/@material-ui/icons/Settings.js","../node_modules/@material-ui/icons/CloudDownload.js","../node_modules/@material-ui/icons/Close.js","../node_modules/@babel/runtime/helpers/toConsumableArray.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../node_modules/lodash/union.js","../node_modules/lodash/difference.js","../node_modules/react-color/lib/index.js","../node_modules/add-dom-event-listener/lib/index.js","../node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","../node_modules/@turf/boolean-within/index.js","../node_modules/@turf/boolean-contains/index.js","../node_modules/@turf/boolean-overlap/index.js","../../../../src/gltf/gltf-material-parser.js","../node_modules/@material-ui/icons/Lens.js","../node_modules/@material-ui/icons/MoreVert.js","../node_modules/@material-ui/icons/RemoveCircle.js","../node_modules/@material-ui/icons/Visibility.js","../node_modules/@material-ui/icons/VisibilityOff.js","../node_modules/@material-ui/icons/ExpandMore.js","../node_modules/higlass-register/src/index.js","../node_modules/clone/clone.js","../node_modules/bowser/es5.js","../node_modules/rc-util/es/Dom/contains.js","../node_modules/rc-util/es/ref.js","../node_modules/rc-util/es/Dom/addEventListener.js","../node_modules/rc-util/es/Portal.js","../node_modules/rc-trigger/es/utils/alignUtil.js","../../../src/propertyUtils.js","../../../src/getOffsetParent.js","../../../src/isAncestorFixed.js","../../../src/getVisibleRectForElement.js","../../../src/getRegion.js","../../../src/getAlignOffset.js","../../../src/getElFuturePos.js","../../../src/align/align.js","../../../src/adjustForViewport.js","../../../src/align/alignElement.js","../../../src/align/alignPoint.js","../node_modules/rc-align/es/util.js","../node_modules/rc-align/es/Align.js","../node_modules/rc-align/es/hooks/useBuffer.js","../node_modules/rc-align/es/index.js","../node_modules/rc-trigger/node_modules/rc-animate/es/util/motion.js","../node_modules/rc-trigger/node_modules/rc-animate/es/CSSMotion.js","../node_modules/rc-trigger/es/PopupInner.js","../node_modules/rc-trigger/es/utils/legacyUtil.js","../node_modules/rc-trigger/es/Popup.js","../node_modules/rc-trigger/es/context.js","../node_modules/rc-trigger/es/index.js","../node_modules/rc-tooltip/es/placements.js","../node_modules/rc-tooltip/es/Content.js","../node_modules/rc-tooltip/es/Tooltip.js","../node_modules/rc-tooltip/es/index.js","../node_modules/@material-ui/core/esm/styles/createBreakpoints.js","../node_modules/@material-ui/core/esm/styles/createMixins.js","../node_modules/@material-ui/core/esm/colors/common.js","../node_modules/@material-ui/core/esm/colors/indigo.js","../node_modules/@material-ui/core/esm/colors/pink.js","../node_modules/@material-ui/core/esm/colors/red.js","../node_modules/@material-ui/core/esm/colors/orange.js","../node_modules/@material-ui/core/esm/colors/blue.js","../node_modules/@material-ui/core/esm/colors/green.js","../node_modules/@material-ui/core/esm/styles/createPalette.js","../node_modules/@material-ui/core/esm/styles/createTypography.js","../node_modules/@material-ui/core/esm/styles/shadows.js","../node_modules/@material-ui/core/esm/styles/shape.js","../node_modules/@material-ui/core/esm/styles/createSpacing.js","../node_modules/@material-ui/core/esm/styles/createTheme.js","../node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js","../../../../src/features/features.js","../node_modules/whatwg-fetch/fetch.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react-dom/node_modules/scheduler/index.js","../node_modules/react-dom/node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/lodash/_baseIsEqualDeep.js","../node_modules/lodash/_listCacheClear.js","../node_modules/lodash/_listCacheDelete.js","../node_modules/lodash/_listCacheGet.js","../node_modules/lodash/_listCacheHas.js","../node_modules/lodash/_listCacheSet.js","../node_modules/lodash/_stackClear.js","../node_modules/lodash/_stackDelete.js","../node_modules/lodash/_stackGet.js","../node_modules/lodash/_stackHas.js","../node_modules/lodash/_stackSet.js","../node_modules/lodash/_baseIsNative.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_isMasked.js","../node_modules/lodash/_coreJsData.js","../node_modules/lodash/_getValue.js","../node_modules/lodash/_mapCacheClear.js","../node_modules/lodash/_Hash.js","../node_modules/lodash/_hashClear.js","../node_modules/lodash/_hashDelete.js","../node_modules/lodash/_hashGet.js","../node_modules/lodash/_hashHas.js","../node_modules/lodash/_hashSet.js","../node_modules/lodash/_mapCacheDelete.js","../node_modules/lodash/_isKeyable.js","../node_modules/lodash/_mapCacheGet.js","../node_modules/lodash/_mapCacheHas.js","../node_modules/lodash/_mapCacheSet.js","../node_modules/lodash/_setCacheAdd.js","../node_modules/lodash/_setCacheHas.js","../node_modules/lodash/_arraySome.js","../node_modules/lodash/_equalByTag.js","../node_modules/lodash/_mapToArray.js","../node_modules/lodash/_equalObjects.js","../node_modules/lodash/_arrayFilter.js","../node_modules/lodash/_baseTimes.js","../node_modules/lodash/_baseIsArguments.js","../node_modules/lodash/stubFalse.js","../node_modules/lodash/_baseIsTypedArray.js","../node_modules/lodash/_baseKeys.js","../node_modules/lodash/_nativeKeys.js","../node_modules/lodash/_DataView.js","../node_modules/lodash/_Promise.js","../node_modules/lodash/_WeakMap.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/react-grid-layout/build/fastRGLPropsEqual.js","../node_modules/react-grid-layout/build/GridItem.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/cjs.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/Draggable.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/utils/getPrefix.js","../node_modules/react-grid-layout/node_modules/react-draggable/build/cjs/DraggableCore.js","../node_modules/react-resizable/index.js","../../webpack/universalModuleDefinition","../../webpack/bootstrap","../../node_modules/prop-types/index.js","../../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}","../../node_modules/classnames/index.js","../../lib/cjs.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../lib/utils/shims.js","../../lib/utils/getPrefix.js","../../lib/utils/domFns.js","../../lib/utils/positionFns.js","../../lib/DraggableCore.js","../../lib/Draggable.js","../node_modules/react-resizable/build/utils.js","../node_modules/react-resizable/build/ResizableBox.js","../node_modules/react-grid-layout/build/ReactGridLayoutPropTypes.js","../node_modules/react-grid-layout/build/ResponsiveReactGridLayout.js","../node_modules/react-grid-layout/build/components/WidthProvider.js","../node_modules/lodash/_createRange.js","../node_modules/lodash/_baseRange.js","../node_modules/lodash/toFinite.js","../node_modules/ajv/lib/compile/index.js","../../../src/util.ts","../../../src/regexps-uri.ts","../../../src/regexps-iri.ts","../../../node_modules/punycode/punycode.es6.js","../../../src/uri.ts","../../../src/schemes/http.ts","../../../src/schemes/https.ts","../../../src/schemes/mailto.ts","../../../src/schemes/urn.ts","../../../src/schemes/urn-uuid.ts","../node_modules/ajv/lib/compile/ucs2length.js","../node_modules/json-schema-traverse/index.js","../node_modules/ajv/lib/cache.js","../node_modules/ajv/lib/compile/formats.js","../node_modules/ajv/lib/compile/rules.js","../node_modules/ajv/lib/dotjs/index.js","../node_modules/ajv/lib/dotjs/ref.js","../node_modules/ajv/lib/dotjs/allOf.js","../node_modules/ajv/lib/dotjs/anyOf.js","../node_modules/ajv/lib/dotjs/comment.js","../node_modules/ajv/lib/dotjs/const.js","../node_modules/ajv/lib/dotjs/contains.js","../node_modules/ajv/lib/dotjs/dependencies.js","../node_modules/ajv/lib/dotjs/enum.js","../node_modules/ajv/lib/dotjs/format.js","../node_modules/ajv/lib/dotjs/if.js","../node_modules/ajv/lib/dotjs/items.js","../node_modules/ajv/lib/dotjs/multipleOf.js","../node_modules/ajv/lib/dotjs/not.js","../node_modules/ajv/lib/dotjs/oneOf.js","../node_modules/ajv/lib/dotjs/pattern.js","../node_modules/ajv/lib/dotjs/properties.js","../node_modules/ajv/lib/dotjs/propertyNames.js","../node_modules/ajv/lib/dotjs/required.js","../node_modules/ajv/lib/dotjs/uniqueItems.js","../node_modules/ajv/lib/data.js","../node_modules/ajv/lib/compile/async.js","../node_modules/ajv/lib/keyword.js","../node_modules/ajv/lib/dotjs/custom.js","../node_modules/ajv/lib/definition_schema.js","../node_modules/uuid/lib/rng-browser.js","../node_modules/uuid/lib/bytesToUuid.js","../node_modules/base64-js/index.js","../node_modules/isarray/index.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/react/cjs/react-jsx-dev-runtime.production.min.js","../node_modules/fast-xml-parser/src/node2json.js","../node_modules/fast-xml-parser/src/xmlNode.js","../node_modules/strnum/strnum.js","../node_modules/fast-xml-parser/src/validator.js","../node_modules/fast-xml-parser/src/nimndata.js","../node_modules/fast-xml-parser/src/node2json_str.js","../node_modules/fast-xml-parser/src/json2xml.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/defineProperty.js","../../../../src/env/index.js","../node_modules/geotiff/node_modules/yallist/yallist.js","../node_modules/geotiff/node_modules/yallist/iterator.js","../node_modules/seedrandom/lib/alea.js","../node_modules/seedrandom/lib/xor128.js","../node_modules/seedrandom/lib/xorwow.js","../node_modules/seedrandom/lib/xorshift7.js","../node_modules/seedrandom/lib/xor4096.js","../node_modules/seedrandom/lib/tychei.js","../node_modules/seedrandom/seedrandom.js","../node_modules/concaveman/node_modules/rbush/rbush.min.js","../node_modules/tinyqueue/tinyqueue.js","../node_modules/point-in-polygon/index.js","../node_modules/point-in-polygon/flat.js","../node_modules/point-in-polygon/nested.js","../node_modules/robust-predicates/umd/orient2d.min.js","../node_modules/lodash/now.js","../node_modules/lodash/_baseClone.js","../node_modules/lodash/_baseAssign.js","../node_modules/lodash/_baseAssignIn.js","../node_modules/lodash/_baseKeysIn.js","../node_modules/lodash/_nativeKeysIn.js","../node_modules/lodash/_copySymbols.js","../node_modules/lodash/_copySymbolsIn.js","../node_modules/lodash/_getAllKeysIn.js","../node_modules/lodash/_initCloneArray.js","../node_modules/lodash/_initCloneByTag.js","../node_modules/lodash/_cloneDataView.js","../node_modules/lodash/_cloneRegExp.js","../node_modules/lodash/_cloneSymbol.js","../node_modules/lodash/_baseCreate.js","../node_modules/lodash/isMap.js","../node_modules/lodash/_baseIsMap.js","../node_modules/lodash/isSet.js","../node_modules/lodash/_baseIsSet.js","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/lodash/_isFlattenable.js","../node_modules/lodash/_overRest.js","../node_modules/lodash/_apply.js","../node_modules/lodash/_setToString.js","../node_modules/lodash/_baseSetToString.js","../node_modules/lodash/constant.js","../node_modules/lodash/_shortOut.js","../node_modules/lodash/_baseUniq.js","../node_modules/lodash/_baseIndexOf.js","../node_modules/lodash/_baseFindIndex.js","../node_modules/lodash/_baseIsNaN.js","../node_modules/lodash/_strictIndexOf.js","../node_modules/lodash/_createSet.js","../node_modules/lodash/noop.js","../node_modules/lodash/_baseDifference.js","../node_modules/babel-runtime/core-js/object/assign.js","../node_modules/core-js/library/fn/object/assign.js","../node_modules/core-js/library/modules/es6.object.assign.js","../node_modules/core-js/library/modules/_a-function.js","../node_modules/core-js/library/modules/_object-assign.js","../node_modules/core-js/library/modules/_array-includes.js","../node_modules/core-js/library/modules/_to-length.js","../node_modules/core-js/library/modules/_to-absolute-index.js","../node_modules/core-js/library/fn/object/define-property.js","../node_modules/core-js/library/modules/es6.object.define-property.js","../node_modules/babel-runtime/core-js/symbol/iterator.js","../node_modules/core-js/library/fn/symbol/iterator.js","../node_modules/core-js/library/modules/es6.string.iterator.js","../node_modules/core-js/library/modules/_string-at.js","../node_modules/core-js/library/modules/_iter-create.js","../node_modules/core-js/library/modules/_object-dps.js","../node_modules/core-js/library/modules/_html.js","../node_modules/core-js/library/modules/_object-gpo.js","../node_modules/core-js/library/modules/web.dom.iterable.js","../node_modules/core-js/library/modules/es6.array.iterator.js","../node_modules/core-js/library/modules/_add-to-unscopables.js","../node_modules/core-js/library/modules/_iter-step.js","../node_modules/babel-runtime/core-js/symbol.js","../node_modules/core-js/library/fn/symbol/index.js","../node_modules/core-js/library/modules/es6.symbol.js","../node_modules/core-js/library/modules/_meta.js","../node_modules/core-js/library/modules/_enum-keys.js","../node_modules/core-js/library/modules/_is-array.js","../node_modules/core-js/library/modules/_object-gopn-ext.js","../node_modules/core-js/library/modules/es7.symbol.async-iterator.js","../node_modules/core-js/library/modules/es7.symbol.observable.js","../node_modules/babel-runtime/core-js/object/set-prototype-of.js","../node_modules/core-js/library/fn/object/set-prototype-of.js","../node_modules/core-js/library/modules/es6.object.set-prototype-of.js","../node_modules/core-js/library/modules/_set-proto.js","../node_modules/babel-runtime/core-js/object/create.js","../node_modules/core-js/library/fn/object/create.js","../node_modules/core-js/library/modules/es6.object.create.js","../../src/performance-now.coffee","../node_modules/react-color/lib/components/alpha/Alpha.js","../node_modules/reactcss/lib/flattenNames.js","../node_modules/lodash/isString.js","../node_modules/lodash/_createBaseFor.js","../node_modules/lodash/_baseIteratee.js","../node_modules/lodash/_baseMatches.js","../node_modules/lodash/_baseIsMatch.js","../node_modules/lodash/_getMatchData.js","../node_modules/lodash/_baseMatchesProperty.js","../node_modules/lodash/get.js","../node_modules/lodash/_stringToPath.js","../node_modules/lodash/_memoizeCapped.js","../node_modules/lodash/memoize.js","../node_modules/lodash/toString.js","../node_modules/lodash/_baseToString.js","../node_modules/lodash/hasIn.js","../node_modules/lodash/_baseHasIn.js","../node_modules/lodash/_hasPath.js","../node_modules/lodash/property.js","../node_modules/lodash/_baseProperty.js","../node_modules/lodash/_basePropertyDeep.js","../node_modules/lodash/_baseMap.js","../node_modules/lodash/_createBaseEach.js","../node_modules/reactcss/lib/mergeClasses.js","../node_modules/reactcss/lib/autoprefix.js","../node_modules/reactcss/lib/components/hover.js","../node_modules/reactcss/lib/components/active.js","../node_modules/reactcss/lib/loop.js","../node_modules/react-color/lib/components/common/Alpha.js","../node_modules/react-color/lib/helpers/alpha.js","../node_modules/react-color/lib/helpers/checkboard.js","../node_modules/react-color/lib/components/common/EditableInput.js","../node_modules/react-color/lib/components/common/Hue.js","../node_modules/react-color/lib/helpers/hue.js","../node_modules/react-color/lib/components/common/Raised.js","../node_modules/lodash/_baseMerge.js","../node_modules/lodash/_baseMergeDeep.js","../node_modules/lodash/toPlainObject.js","../node_modules/lodash/_createAssigner.js","../node_modules/react-color/lib/components/common/Saturation.js","../node_modules/lodash/throttle.js","../node_modules/react-color/lib/helpers/saturation.js","../node_modules/lodash/each.js","../node_modules/lodash/forEach.js","../node_modules/react-color/lib/components/common/Swatch.js","../node_modules/react-color/lib/helpers/interaction.js","../node_modules/react-color/lib/components/alpha/AlphaPointer.js","../node_modules/react-color/lib/components/block/Block.js","../node_modules/react-color/lib/components/block/BlockSwatches.js","../node_modules/react-color/lib/components/circle/Circle.js","../node_modules/react-color/lib/components/circle/CircleSwatch.js","../node_modules/react-color/lib/components/chrome/Chrome.js","../node_modules/react-color/lib/components/chrome/ChromeFields.js","../node_modules/@icons/material/UnfoldMoreHorizontalIcon.js","../node_modules/react-color/lib/components/chrome/ChromePointer.js","../node_modules/react-color/lib/components/chrome/ChromePointerCircle.js","../node_modules/react-color/lib/components/compact/Compact.js","../node_modules/react-color/lib/components/compact/CompactColor.js","../node_modules/react-color/lib/components/compact/CompactFields.js","../node_modules/react-color/lib/components/github/Github.js","../node_modules/react-color/lib/components/github/GithubSwatch.js","../node_modules/react-color/lib/components/hue/Hue.js","../node_modules/react-color/lib/components/hue/HuePointer.js","../node_modules/react-color/lib/components/material/Material.js","../node_modules/react-color/lib/components/photoshop/Photoshop.js","../node_modules/react-color/lib/components/photoshop/PhotoshopFields.js","../node_modules/react-color/lib/components/photoshop/PhotoshopPointerCircle.js","../node_modules/react-color/lib/components/photoshop/PhotoshopPointer.js","../node_modules/react-color/lib/components/photoshop/PhotoshopButton.js","../node_modules/react-color/lib/components/photoshop/PhotoshopPreviews.js","../node_modules/react-color/lib/components/sketch/Sketch.js","../node_modules/react-color/lib/components/sketch/SketchFields.js","../node_modules/react-color/lib/components/sketch/SketchPresetColors.js","../node_modules/react-color/lib/components/slider/Slider.js","../node_modules/react-color/lib/components/slider/SliderSwatches.js","../node_modules/react-color/lib/components/slider/SliderSwatch.js","../node_modules/react-color/lib/components/slider/SliderPointer.js","../node_modules/react-color/lib/components/swatches/Swatches.js","../node_modules/react-color/lib/components/swatches/SwatchesGroup.js","../node_modules/react-color/lib/components/swatches/SwatchesColor.js","../node_modules/@icons/material/CheckIcon.js","../node_modules/react-color/lib/components/twitter/Twitter.js","../node_modules/add-dom-event-listener/lib/EventObject.js","../node_modules/add-dom-event-listener/lib/EventBaseObject.js","../node_modules/@turf/line-overlap/index.js","../node_modules/rbush/index.js","../node_modules/quickselect/quickselect.js","../node_modules/object-keys/implementation.js","../node_modules/is-arguments/index.js","../node_modules/object-is/index.js","../node_modules/is-regex/index.js","../node_modules/has/src/index.js","../node_modules/function-bind/implementation.js","../node_modules/regexp.prototype.flags/index.js","../node_modules/es-abstract/helpers/callBind.js","../node_modules/es-abstract/GetIntrinsic.js","../node_modules/has-symbols/index.js","../node_modules/has-symbols/shams.js","../node_modules/regexp.prototype.flags/shim.js","../node_modules/is-date-object/index.js","../node_modules/geojson-equality/index.js","../../../src/lib/feature.ts","../../../../src/lib/layers/junctions-layer.ts","../../src/style.ts","../../../src/lib/resize-circle-mode.ts","../../../src/lib/duplicate-mode.ts","../../../src/lib/extend-line-string-mode.ts","../../../src/lib/split-polygon-mode.ts","../../../src/lib/extrude-mode.ts","../../../src/lib/elevation-mode.ts","../../../src/lib/transform-mode.ts","../../../src/lib/draw-point-mode.ts","../../../src/lib/draw-line-string-mode.ts","../../../src/lib/draw-rectangle-mode.ts","../../../src/lib/draw-square-from-center-mode.ts","../../../src/lib/draw-circle-by-diameter-mode.ts","../../../src/lib/draw-circle-from-center-mode.ts","../../../src/lib/draw-ellipse-by-bounding-box-mode.ts","../../../src/lib/draw-ellipse-using-three-points-mode.ts","../../../src/lib/draw-rectangle-using-three-points-mode.ts","../../../src/lib/draw-90degree-polygon-mode.ts","../../../src/lib/draw-polygon-by-dragging-mode.ts","../node_modules/lodash.throttle/index.js","../../../src/lib/view-mode.ts","../../../src/lib/measure-distance-mode.ts","../../../src/lib/measure-area-mode.ts","../../../src/lib/measure-angle-mode.ts","../../../src/lib/snappable-mode.ts","../../../src/layers/editable-h3-cluster-layer.ts","../../../src/layers/selection-layer.ts","../../../src/layers/elevated-edit-handle-layer.ts","../../../../src/shaderlib/outline/outline.ts","../../../../src/layers/path-marker-layer/path-marker-layer.ts","../../../../src/layers/path-marker-layer/arrow-2d-geometry.ts","../../../../src/layers/path-marker-layer/create-path-markers.ts","../../../../src/layers/path-marker-layer/polyline.ts","../../../src/layers/junction-scatterplot-layer.ts","../../../../src/lib/layers/texts-layer.ts","../../../../src/lib/layers/segments-layer.ts","../../../src/lib/nebula.ts","../node_modules/global/document.js","../node_modules/lodash/_baseClamp.js","../node_modules/worker-loader/dist/workers/InlineWorker.js","../node_modules/vega-embed/node_modules/semver/functions/valid.js","../node_modules/vega-embed/node_modules/semver/functions/clean.js","../node_modules/vega-embed/node_modules/semver/functions/inc.js","../node_modules/vega-embed/node_modules/semver/functions/diff.js","../node_modules/vega-embed/node_modules/semver/functions/major.js","../node_modules/vega-embed/node_modules/semver/functions/minor.js","../node_modules/vega-embed/node_modules/semver/functions/patch.js","../node_modules/vega-embed/node_modules/semver/functions/prerelease.js","../node_modules/vega-embed/node_modules/semver/functions/rcompare.js","../node_modules/vega-embed/node_modules/semver/functions/compare-loose.js","../node_modules/vega-embed/node_modules/semver/functions/sort.js","../node_modules/vega-embed/node_modules/semver/functions/rsort.js","../node_modules/vega-embed/node_modules/semver/functions/coerce.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/toConsumableArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/vega-embed/node_modules/lru-cache/index.js","../node_modules/vega-embed/node_modules/yallist/yallist.js","../node_modules/vega-embed/node_modules/yallist/iterator.js","../node_modules/vega-embed/node_modules/semver/ranges/to-comparators.js","../node_modules/vega-embed/node_modules/semver/ranges/max-satisfying.js","../node_modules/vega-embed/node_modules/semver/ranges/min-satisfying.js","../node_modules/vega-embed/node_modules/semver/ranges/min-version.js","../node_modules/vega-embed/node_modules/semver/ranges/valid.js","../node_modules/vega-embed/node_modules/semver/ranges/gtr.js","../node_modules/vega-embed/node_modules/semver/ranges/ltr.js","../node_modules/vega-embed/node_modules/semver/ranges/intersects.js","../node_modules/vega-embed/node_modules/semver/ranges/simplify.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/slicedToArray.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/vega-embed/node_modules/semver/ranges/subset.js","../node_modules/array-flat-polyfill/index.mjs","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/rng.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/bytesToUuid.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/v1.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/v35.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/md5.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/v3.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/v4.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/sha1.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/v5.js","../node_modules/nebula.gl/node_modules/uuid/dist/esm-browser/index.js","../node_modules/@turf/boolean-clockwise/dist/es/index.js","../node_modules/@turf/boolean-clockwise/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/rewind/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/rewind/node_modules/@turf/meta/dist/es/index.js","../node_modules/@turf/rewind/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/rewind/dist/es/index.js","../node_modules/@turf/transform-scale/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/transform-scale/node_modules/@turf/meta/dist/es/index.js","../node_modules/@turf/transform-scale/node_modules/@turf/centroid/dist/es/index.js","../node_modules/@turf/transform-scale/node_modules/@turf/bbox/dist/es/index.js","../node_modules/@turf/transform-scale/dist/es/index.js","../node_modules/@turf/transform-scale/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/along/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/along/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/along/node_modules/@turf/bearing/dist/es/index.js","../node_modules/@turf/along/node_modules/@turf/destination/dist/es/index.js","../node_modules/@turf/along/node_modules/@turf/distance/dist/es/index.js","../node_modules/@turf/along/dist/es/index.js","../node_modules/@turf/transform-translate/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/transform-translate/node_modules/@turf/meta/dist/es/index.js","../node_modules/@turf/transform-translate/dist/es/index.js","../node_modules/@turf/transform-translate/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/union/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/union/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/union/dist/es/index.js","../node_modules/@turf/intersect/node_modules/@turf/helpers/dist/es/index.js","../node_modules/@turf/intersect/node_modules/@turf/invariant/dist/es/index.js","../node_modules/@turf/intersect/dist/es/index.js","../node_modules/@turf/area/node_modules/@turf/meta/dist/es/index.js","../node_modules/@turf/area/dist/es/index.js","../node_modules/@material-ui/utils/esm/deepmerge.js","../../../../../src/modules/picking/picking.js","../node_modules/@material-ui/core/esm/IconButton/IconButton.js","../node_modules/@material-ui/core/esm/Portal/Portal.js","../node_modules/@material-ui/core/esm/Typography/Typography.js","../node_modules/vega-loader/node_modules/d3-dsv/src/dsv.js","../../../../src/utils/local-storage.js","../../../../src/utils/formatters.js","../../../../src/utils/color.js","../../../../src/utils/autobind.js","../../../../src/lib/log.js","../node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js","../node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js","../node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js","../node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js","../node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js","../node_modules/react-transition-group/esm/config.js","../node_modules/react-transition-group/esm/Transition.js","../node_modules/@material-ui/core/esm/styles/makeStyles.js","../node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js","../node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js","../node_modules/d3-array/src/extent.js","../../../../../src/modules/fp32/fp32.js","../../../../src/classes/transform-feedback.js","../../../../src/animation/timeline.js","../node_modules/d3-dsv/src/dsv.js","../node_modules/@material-ui/core/esm/CircularProgress/CircularProgress.js","../node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js","../node_modules/@material-ui/core/esm/Popper/Popper.js","../node_modules/@material-ui/core/esm/ClickAwayListener/ClickAwayListener.js","../node_modules/@material-ui/core/esm/Fade/Fade.js","../node_modules/@material-ui/core/esm/Paper/Paper.js","../node_modules/@material-ui/core/esm/Link/Link.js","../../../../src/geometries/cube-geometry.js","../../../../src/utils/clip-space.js","../node_modules/@material-ui/core/esm/TableContainer/TableContainer.js","../node_modules/@material-ui/core/esm/Table/Table.js","../node_modules/@material-ui/core/esm/TableBody/TableBody.js","../node_modules/@material-ui/core/esm/TableRow/TableRow.js","../node_modules/@material-ui/core/esm/TableCell/TableCell.js","../node_modules/d3-array/src/max.js","../node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js","../node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js","../node_modules/@material-ui/core/esm/Grid/Grid.js","../node_modules/@material-ui/core/esm/FormControl/FormControl.js","../node_modules/@material-ui/core/esm/Button/Button.js","../node_modules/@material-ui/core/esm/Tab/Tab.js","../node_modules/d3-time/src/utcWeek.js","../node_modules/d3-time/src/utcDay.js","../node_modules/d3-time/src/week.js","../node_modules/d3-time/src/day.js","../node_modules/d3-time/src/year.js","../node_modules/d3-time/src/utcYear.js","../node_modules/d3-array/src/sum.js","../node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js","../node_modules/react-vega/esm/utils/shallowEqual.js","../node_modules/fast-json-patch/module/helpers.mjs","../node_modules/fast-json-patch/module/core.mjs","../node_modules/fast-json-patch/module/duplex.mjs","../node_modules/fast-json-patch/index.mjs","../node_modules/vega-dataflow/build/vega-dataflow.module.js","../node_modules/vega-statistics/node_modules/d3-array/src/ascending.js","../node_modules/vega-statistics/node_modules/d3-array/src/max.js","../node_modules/vega-statistics/node_modules/d3-array/src/min.js","../node_modules/vega-statistics/node_modules/d3-array/src/quickselect.js","../node_modules/vega-statistics/node_modules/d3-array/src/number.js","../node_modules/vega-statistics/node_modules/d3-array/src/quantile.js","../node_modules/vega-statistics/node_modules/d3-array/src/deviation.js","../node_modules/vega-statistics/node_modules/d3-array/src/variance.js","../node_modules/vega-statistics/node_modules/d3-array/src/median.js","../node_modules/vega-statistics/build/vega-statistics.module.js","../node_modules/vega-transforms/node_modules/d3-array/src/max.js","../node_modules/vega-transforms/node_modules/d3-array/src/min.js","../node_modules/vega-transforms/node_modules/d3-array/src/ascending.js","../node_modules/vega-transforms/node_modules/d3-array/src/quickselect.js","../node_modules/vega-transforms/node_modules/d3-array/src/number.js","../node_modules/vega-transforms/node_modules/d3-array/src/quantile.js","../node_modules/vega-transforms/node_modules/d3-array/src/range.js","../node_modules/vega-transforms/node_modules/d3-array/src/bisector.js","../node_modules/vega-transforms/build/vega-transforms.module.js","../node_modules/vega-transforms/node_modules/d3-array/src/median.js","../node_modules/vega-transforms/node_modules/d3-array/src/mean.js","../node_modules/d3-shape/src/curve/basis.js","../node_modules/d3-shape/src/noop.js","../node_modules/d3-shape/src/curve/basisClosed.js","../node_modules/d3-shape/src/curve/basisOpen.js","../node_modules/d3-shape/src/curve/bundle.js","../node_modules/d3-shape/src/curve/cardinal.js","../node_modules/d3-shape/src/curve/cardinalOpen.js","../node_modules/d3-shape/src/curve/cardinalClosed.js","../node_modules/d3-shape/src/math.js","../node_modules/d3-shape/src/curve/catmullRom.js","../node_modules/d3-shape/src/curve/catmullRomClosed.js","../node_modules/d3-shape/src/curve/catmullRomOpen.js","../node_modules/d3-shape/src/curve/linear.js","../node_modules/d3-shape/src/curve/linearClosed.js","../node_modules/d3-shape/src/curve/monotone.js","../node_modules/d3-shape/src/curve/natural.js","../node_modules/d3-shape/src/curve/step.js","../node_modules/d3-path/src/path.js","../node_modules/d3-shape/src/constant.js","../node_modules/d3-shape/src/arc.js","../node_modules/d3-shape/src/array.js","../node_modules/d3-shape/src/point.js","../node_modules/d3-shape/src/line.js","../node_modules/d3-shape/src/area.js","../node_modules/d3-shape/src/symbol/circle.js","../node_modules/d3-shape/src/symbol/star.js","../node_modules/d3-shape/src/symbol/diamond.js","../node_modules/d3-shape/src/symbol/triangle.js","../node_modules/d3-shape/src/symbol/wye.js","../node_modules/vega-canvas/src/domCanvas.js","../node_modules/vega-scale/node_modules/d3-array/src/ascending.js","../node_modules/vega-scale/node_modules/d3-array/src/bisector.js","../node_modules/vega-scale/node_modules/d3-array/src/number.js","../node_modules/vega-scale/node_modules/d3-array/src/bisect.js","../node_modules/vega-scale/node_modules/d3-scale/src/init.js","../node_modules/vega-scale/node_modules/d3-scale/src/ordinal.js","../node_modules/vega-scale/node_modules/d3-array/src/ticks.js","../node_modules/d3-format/src/formatSpecifier.js","../node_modules/d3-format/src/formatDecimal.js","../node_modules/d3-format/src/formatPrefixAuto.js","../node_modules/d3-format/src/defaultLocale.js","../node_modules/d3-format/src/exponent.js","../node_modules/d3-format/src/formatRounded.js","../node_modules/d3-format/src/formatTypes.js","../node_modules/d3-format/src/identity.js","../node_modules/d3-format/src/locale.js","../node_modules/d3-format/src/formatGroup.js","../node_modules/d3-format/src/formatNumerals.js","../node_modules/d3-format/src/formatTrim.js","../node_modules/vega-scale/node_modules/d3-scale/src/tickFormat.js","../node_modules/d3-format/src/precisionPrefix.js","../node_modules/d3-format/src/precisionRound.js","../node_modules/d3-format/src/precisionFixed.js","../node_modules/d3-color/src/define.js","../node_modules/d3-color/src/color.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/basis.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/basisClosed.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/constant.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/color.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/rgb.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/numberArray.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/array.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/date.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/number.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/object.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/string.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/value.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/round.js","../node_modules/vega-scale/node_modules/d3-scale/src/number.js","../node_modules/vega-scale/node_modules/d3-scale/src/continuous.js","../node_modules/vega-scale/node_modules/d3-scale/src/constant.js","../node_modules/vega-scale/node_modules/d3-scale/src/linear.js","../node_modules/vega-scale/node_modules/d3-scale/src/nice.js","../node_modules/vega-scale/node_modules/d3-scale/src/log.js","../node_modules/vega-scale/node_modules/d3-scale/src/pow.js","../node_modules/vega-scale/node_modules/d3-scale/src/symlog.js","../node_modules/vega-scale/node_modules/d3-time/src/duration.js","../node_modules/vega-scale/node_modules/d3-time/src/interval.js","../node_modules/vega-scale/node_modules/d3-time/src/millisecond.js","../node_modules/vega-scale/node_modules/d3-time/src/second.js","../node_modules/vega-scale/node_modules/d3-time/src/minute.js","../node_modules/vega-scale/node_modules/d3-time/src/hour.js","../node_modules/vega-scale/node_modules/d3-time/src/day.js","../node_modules/vega-scale/node_modules/d3-time/src/week.js","../node_modules/vega-scale/node_modules/d3-time/src/month.js","../node_modules/vega-scale/node_modules/d3-time/src/year.js","../node_modules/vega-scale/node_modules/d3-time/src/utcMinute.js","../node_modules/vega-scale/node_modules/d3-time/src/utcHour.js","../node_modules/vega-scale/node_modules/d3-time/src/utcDay.js","../node_modules/vega-scale/node_modules/d3-time/src/utcWeek.js","../node_modules/vega-scale/node_modules/d3-time/src/utcMonth.js","../node_modules/vega-scale/node_modules/d3-time/src/utcYear.js","../node_modules/vega-scale/node_modules/d3-time/src/ticks.js","../node_modules/d3-time-format/src/locale.js","../node_modules/d3-time-format/src/defaultLocale.js","../node_modules/vega-scale/node_modules/d3-scale/src/time.js","../node_modules/vega-scale/node_modules/d3-scale/src/sequential.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/piecewise.js","../node_modules/vega-scale/node_modules/d3-scale/src/diverging.js","../node_modules/vega-scale/node_modules/d3-array/src/quantile.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/discrete.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/transform/parse.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/hue.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/transform/decompose.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/transform/index.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/zoom.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/hsl.js","../node_modules/d3-color/src/math.js","../node_modules/d3-color/src/lab.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/lab.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/hcl.js","../node_modules/d3-color/src/cubehelix.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/cubehelix.js","../node_modules/vega-scale/node_modules/d3-interpolate/src/quantize.js","../node_modules/vega-scale/build/vega-scale.module.js","../node_modules/vega-scale/node_modules/d3-array/src/range.js","../node_modules/vega-scale/node_modules/d3-scale/src/identity.js","../node_modules/vega-scale/node_modules/d3-scale/src/utcTime.js","../node_modules/vega-scale/node_modules/d3-scale/src/quantile.js","../node_modules/vega-scale/node_modules/d3-scale/src/quantize.js","../node_modules/vega-scale/node_modules/d3-scale/src/threshold.js","../node_modules/vega-scenegraph/build/vega-scenegraph.module.js","../node_modules/d3-shape/src/symbol.js","../node_modules/vega-view-transforms/build/vega-view-transforms.module.js","../node_modules/vega-encode/node_modules/d3-array/src/range.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/round.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/basis.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/constant.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/color.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/rgb.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/basisClosed.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/numberArray.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/array.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/date.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/number.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/object.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/string.js","../node_modules/vega-encode/node_modules/d3-interpolate/src/value.js","../node_modules/vega-encode/build/vega-encode.module.js","../node_modules/vega-encode/node_modules/d3-array/src/sum.js","../node_modules/vega-geo/node_modules/d3-array/src/ticks.js","../node_modules/vega-geo/node_modules/d3-array/src/range.js","../node_modules/vega-geo/node_modules/d3-array/src/max.js","../node_modules/vega-projection/node_modules/d3-geo/src/identity.js","../node_modules/vega-projection/node_modules/d3-geo/src/stream.js","../node_modules/vega-projection/node_modules/d3-array/src/fsum.js","../node_modules/vega-projection/node_modules/d3-geo/src/math.js","../node_modules/vega-projection/node_modules/d3-geo/src/noop.js","../node_modules/vega-projection/node_modules/d3-geo/src/path/area.js","../node_modules/vega-projection/node_modules/d3-geo/src/path/bounds.js","../node_modules/vega-projection/node_modules/d3-geo/src/path/centroid.js","../node_modules/vega-projection/node_modules/d3-geo/src/path/context.js","../node_modules/vega-projection/node_modules/d3-geo/src/path/measure.js","../node_modules/vega-projection/node_modules/d3-geo/src/path/string.js","../node_modules/vega-projection/node_modules/d3-geo/src/path/index.js","../node_modules/vega-projection/node_modules/d3-geo/src/clip/buffer.js","../node_modules/vega-projection/node_modules/d3-geo/src/pointEqual.js","../node_modules/vega-projection/node_modules/d3-geo/src/clip/rejoin.js","../node_modules/vega-projection/node_modules/d3-geo/src/cartesian.js","../node_modules/vega-projection/node_modules/d3-geo/src/polygonContains.js","../node_modules/vega-projection/node_modules/d3-array/src/merge.js","../node_modules/vega-projection/node_modules/d3-geo/src/clip/index.js","../node_modules/vega-projection/node_modules/d3-geo/src/clip/antimeridian.js","../node_modules/vega-projection/node_modules/d3-geo/src/constant.js","../node_modules/vega-projection/node_modules/d3-geo/src/compose.js","../node_modules/vega-projection/node_modules/d3-geo/src/rotation.js","../node_modules/vega-projection/node_modules/d3-geo/src/circle.js","../node_modules/vega-projection/node_modules/d3-geo/src/clip/circle.js","../node_modules/vega-projection/node_modules/d3-geo/src/clip/rectangle.js","../node_modules/vega-projection/node_modules/d3-geo/src/clip/line.js","../node_modules/vega-projection/node_modules/d3-geo/src/transform.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/fit.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/resample.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/index.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/conic.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/conicEqualArea.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/cylindricalEqualArea.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/albers.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/azimuthal.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/azimuthalEqualArea.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/azimuthalEquidistant.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/mercator.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/conicConformal.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/equirectangular.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/conicEquidistant.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/equalEarth.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/gnomonic.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/naturalEarth1.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/orthographic.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/stereographic.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/transverseMercator.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/noop.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/clip/buffer.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/math.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/pointEqual.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/clip/rejoin.js","../node_modules/d3-geo-projection/node_modules/d3-geo/node_modules/d3-array/src/fsum.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/cartesian.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/polygonContains.js","../node_modules/d3-geo-projection/node_modules/d3-geo/node_modules/d3-array/src/merge.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/clip/index.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/clip/antimeridian.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/constant.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/compose.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/rotation.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/circle.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/clip/circle.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/clip/rectangle.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/clip/line.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/identity.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/transform.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/stream.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/path/bounds.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/projection/fit.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/projection/resample.js","../node_modules/d3-geo-projection/node_modules/d3-geo/src/projection/index.js","../node_modules/d3-geo-projection/src/math.js","../node_modules/d3-geo-projection/src/mollweide.js","../node_modules/vega-projection/build/vega-projection.module.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/albersUsa.js","../node_modules/vega-projection/node_modules/d3-geo/src/projection/identity.js","../node_modules/vega-geo/node_modules/d3-geo/src/math.js","../node_modules/vega-geo/node_modules/d3-geo/src/graticule.js","../node_modules/vega-geo/node_modules/d3-color/src/define.js","../node_modules/vega-geo/node_modules/d3-color/src/color.js","../node_modules/vega-geo/build/vega-geo.module.js","../node_modules/vega-geo/node_modules/d3-array/src/sum.js","../node_modules/d3-force/src/center.js","../node_modules/d3-force/src/constant.js","../node_modules/d3-force/src/jiggle.js","../node_modules/d3-force/src/collide.js","../node_modules/d3-force/src/link.js","../node_modules/vega-force/build/vega-force.module.js","../node_modules/d3-force/src/manyBody.js","../node_modules/d3-force/src/x.js","../node_modules/d3-force/src/y.js","../node_modules/d3-hierarchy/src/hierarchy/count.js","../node_modules/d3-hierarchy/src/hierarchy/ancestors.js","../node_modules/d3-hierarchy/src/hierarchy/iterator.js","../node_modules/d3-hierarchy/src/hierarchy/index.js","../node_modules/d3-hierarchy/src/hierarchy/each.js","../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js","../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js","../node_modules/d3-hierarchy/src/hierarchy/find.js","../node_modules/d3-hierarchy/src/hierarchy/sum.js","../node_modules/d3-hierarchy/src/hierarchy/sort.js","../node_modules/d3-hierarchy/src/hierarchy/path.js","../node_modules/d3-hierarchy/src/hierarchy/descendants.js","../node_modules/d3-hierarchy/src/hierarchy/leaves.js","../node_modules/d3-hierarchy/src/hierarchy/links.js","../node_modules/d3-hierarchy/src/pack/enclose.js","../node_modules/d3-hierarchy/src/array.js","../node_modules/d3-hierarchy/src/pack/siblings.js","../node_modules/d3-hierarchy/src/accessors.js","../node_modules/d3-hierarchy/src/constant.js","../node_modules/d3-hierarchy/src/pack/index.js","../node_modules/d3-hierarchy/src/treemap/round.js","../node_modules/d3-hierarchy/src/treemap/dice.js","../node_modules/d3-hierarchy/src/stratify.js","../node_modules/d3-hierarchy/src/tree.js","../node_modules/d3-hierarchy/src/cluster.js","../node_modules/d3-hierarchy/src/treemap/slice.js","../node_modules/d3-hierarchy/src/treemap/squarify.js","../node_modules/d3-hierarchy/src/treemap/resquarify.js","../node_modules/vega-hierarchy/build/vega-hierarchy.module.js","../node_modules/d3-hierarchy/src/partition.js","../node_modules/d3-hierarchy/src/treemap/binary.js","../node_modules/d3-hierarchy/src/treemap/sliceDice.js","../node_modules/d3-hierarchy/src/treemap/index.js","../node_modules/vega-label/build/vega-label.module.js","../node_modules/vega-regression/build/vega-regression.module.js","../node_modules/delaunator/index.js","../node_modules/d3-delaunay/src/path.js","../node_modules/d3-delaunay/src/polygon.js","../node_modules/d3-delaunay/src/voronoi.js","../node_modules/d3-delaunay/src/delaunay.js","../node_modules/vega-voronoi/build/vega-voronoi.module.js","../node_modules/vega-wordcloud/build/vega-wordcloud.module.js","../node_modules/vega-crossfilter/node_modules/d3-array/src/ascending.js","../node_modules/vega-crossfilter/node_modules/d3-array/src/bisector.js","../node_modules/vega-crossfilter/node_modules/d3-array/src/bisect.js","../node_modules/vega-crossfilter/build/vega-crossfilter.module.js","../node_modules/vega-crossfilter/node_modules/d3-array/src/number.js","../node_modules/vega-crossfilter/node_modules/d3-array/src/permute.js","../node_modules/vega-view/node_modules/d3-array/src/ticks.js","../node_modules/vega-expression/build/vega-expression.module.js","../node_modules/vega-functions/node_modules/d3-array/src/fsum.js","../node_modules/vega-functions/node_modules/d3-geo/src/math.js","../node_modules/vega-functions/node_modules/d3-geo/src/noop.js","../node_modules/vega-functions/node_modules/d3-geo/src/stream.js","../node_modules/vega-functions/node_modules/d3-geo/src/area.js","../node_modules/vega-functions/node_modules/d3-geo/src/bounds.js","../node_modules/vega-functions/node_modules/d3-geo/src/cartesian.js","../node_modules/vega-functions/node_modules/d3-geo/src/centroid.js","../node_modules/vega-functions/node_modules/d3-color/src/define.js","../node_modules/vega-functions/node_modules/d3-color/src/color.js","../node_modules/vega-functions/node_modules/d3-color/src/math.js","../node_modules/vega-functions/node_modules/d3-color/src/lab.js","../node_modules/vega-selections/build/vega-selection.module.js","../node_modules/vega-functions/build/vega-functions.module.js","../node_modules/vega-functions/node_modules/d3-array/src/range.js","../node_modules/vega-runtime/build/vega-runtime.module.js","../node_modules/vega-view/node_modules/d3-timer/src/timer.js","../node_modules/vega-view/build/vega-view.module.js","../node_modules/vega-view/node_modules/d3-timer/src/interval.js","../node_modules/vega-event-selector/build/vega-event-selector.module.js","../node_modules/vega-parser/build/vega-parser.module.js","../node_modules/vega/build/vega.module.js","../node_modules/vega-interpreter/build/vega-interpreter.module.js","../node_modules/vega-lite/node_modules/vega-util/build/vega-util.module.js","../../../src/logical.ts","../../../src/channel.ts","../../../src/aggregate.ts","../../../src/bin.ts","../../../src/expr.ts","../../../src/title.ts","../../../src/vega.schema.ts","../../../../src/compile/common.ts","../../../../src/log/message.ts","../../../../src/log/index.ts","../../../src/datetime.ts","../../../src/timeunit.ts","../../../src/predicate.ts","../../../src/type.ts","../../../src/scale.ts","../../../src/mark.ts","../../../../../src/compile/mark/encode/valueref.ts","../../../../src/compile/format.ts","../../../src/sort.ts","../../../../src/spec/facet.ts","../../../src/channeldef.ts","../../../src/axis.ts","../../../../src/spec/unit.ts","../../../../src/compositemark/base.ts","../../../src/encoding.ts","../../../../src/compositemark/common.ts","../../../../src/compositemark/boxplot.ts","../../../../src/compositemark/errorbar.ts","../../../../src/compositemark/errorband.ts","../../../../src/compositemark/index.ts","../../../src/guide.ts","../../../src/header.ts","../../../src/legend.ts","../../../src/selection.ts","../../../src/parameter.ts","../../../../src/spec/concat.ts","../../../../src/spec/base.ts","../../../src/config.ts","../../../../src/spec/layer.ts","../../../../src/spec/map.ts","../../../../src/spec/repeat.ts","../../../src/stack.ts","../../../../src/normalize/pathoverlay.ts","../../../../src/normalize/repeater.ts","../../../../src/normalize/ruleforrangedline.ts","../../../../src/normalize/core.ts","../../../src/transform.ts","../../../../src/normalize/selectioncompat.ts","../../../../src/normalize/toplevelselection.ts","../../../../src/normalize/index.ts","../../../../src/spec/toplevel.ts","../../../../src/compile/split.ts","../../../../../src/compile/data/index.ts","../../../src/data.ts","../node_modules/vega-lite/node_modules/vega-event-selector/build/vega-event-selector.module.js","../../../../../src/compile/selection/assemble.ts","../../../../../src/compile/data/dataflow.ts","../../../../../src/compile/data/timeunit.ts","../../../../../src/compile/selection/project.ts","../../../../../src/compile/selection/scales.ts","../../../../../src/compile/selection/interval.ts","../../../../../src/compile/selection/point.ts","../../../../../src/compile/mark/encode/conditional.ts","../../../../../src/compile/mark/encode/text.ts","../../../../../src/compile/mark/encode/tooltip.ts","../../../../../src/compile/mark/encode/aria.ts","../../../../../src/compile/mark/encode/nonposition.ts","../../../../../src/compile/mark/encode/color.ts","../../../../../src/compile/mark/encode/offset.ts","../../../../../src/compile/mark/encode/position-point.ts","../../../../../src/compile/mark/encode/position-align.ts","../../../../../src/compile/mark/encode/position-range.ts","../../../../../src/compile/mark/encode/position-rect.ts","../../../../../src/compile/mark/encode/base.ts","../../../../../src/compile/mark/encode/zindex.ts","../../../../../src/compile/mark/encode/defined.ts","../../../../../src/compile/selection/nearest.ts","../../../../../src/compile/selection/inputs.ts","../../../../../src/compile/selection/toggle.ts","../../../../../src/compile/selection/clear.ts","../../../../../src/compile/selection/legends.ts","../../../../../src/compile/selection/translate.ts","../../../../../src/compile/selection/zoom.ts","../../../../../src/compile/selection/index.ts","../node_modules/vega-lite/node_modules/vega-expression/build/vega-expression.module.js","../../../../../src/compile/data/expressions.ts","../../../../../src/compile/data/filter.ts","../../../../../src/compile/selection/parse.ts","../../../../src/compile/predicate.ts","../../../../../src/compile/axis/assemble.ts","../../../../../src/compile/axis/config.ts","../../../../../src/compile/axis/properties.ts","../../../../../src/compile/data/calculate.ts","../../../../../src/compile/header/common.ts","../../../../../src/compile/header/component.ts","../../../../../src/compile/header/assemble.ts","../../../../../src/compile/layoutsize/assemble.ts","../../../../../src/compile/layoutsize/component.ts","../../../../src/compile/guide.ts","../../../../src/compile/resolve.ts","../../../../../src/compile/legend/component.ts","../../../../../src/compile/legend/encode.ts","../../../../../src/compile/legend/properties.ts","../../../../../src/compile/legend/parse.ts","../../../../../src/compile/legend/assemble.ts","../../../../../src/compile/projection/assemble.ts","../../../src/projection.ts","../../../../../src/compile/projection/component.ts","../../../../../src/compile/projection/parse.ts","../../../../../src/compile/data/bin.ts","../../../../../src/compile/data/aggregate.ts","../../../../../src/compile/data/facet.ts","../../../../../src/compile/data/formatparse.ts","../../../../../src/compile/data/identifier.ts","../../../../../src/compile/data/graticule.ts","../../../../../src/compile/data/sequence.ts","../../../../../src/compile/data/source.ts","../../../../../src/compile/data/optimizer.ts","../../../../../src/compile/data/optimizers.ts","../../../../../src/compile/data/joinaggregate.ts","../../../../../src/compile/data/stack.ts","../../../../../src/compile/data/window.ts","../../../../../src/compile/data/subtree.ts","../../../../../src/compile/data/optimize.ts","../../../../src/compile/signal.ts","../../../../../src/compile/scale/domain.ts","../../../../../src/compile/scale/assemble.ts","../../../../../src/compile/scale/component.ts","../../../../../src/compile/scale/range.ts","../../../../../src/compile/scale/properties.ts","../../../../../src/compile/scale/type.ts","../../../../../src/compile/scale/parse.ts","../../../../src/compile/model.ts","../../../../../src/compile/data/density.ts","../../../../../src/compile/data/filterinvalid.ts","../../../../../src/compile/data/flatten.ts","../../../../../src/compile/data/fold.ts","../../../../../src/compile/data/geojson.ts","../../../../../src/compile/data/geopoint.ts","../../../../../src/compile/data/impute.ts","../../../../../src/compile/data/loess.ts","../../../../../src/compile/data/lookup.ts","../../../../../src/compile/data/quantile.ts","../../../../../src/compile/data/regression.ts","../../../../../src/compile/data/pivot.ts","../../../../../src/compile/data/sample.ts","../../../../../src/compile/data/assemble.ts","../../../../../src/compile/header/parse.ts","../../../../../src/compile/layoutsize/parse.ts","../../../../src/compile/facet.ts","../../../../../src/compile/data/parse.ts","../../../../../src/compile/data/joinaggregatefacet.ts","../../../../src/compile/concat.ts","../../../../../src/compile/axis/component.ts","../../../../../src/compile/axis/parse.ts","../../../../../src/compile/axis/encode.ts","../../../../../src/compile/layoutsize/init.ts","../../../../../src/compile/mark/init.ts","../../../../../src/compile/mark/point.ts","../../../../../src/compile/mark/tick.ts","../../../../../src/compile/mark/mark.ts","../../../../../src/compile/mark/arc.ts","../../../../../src/compile/mark/area.ts","../../../../../src/compile/mark/bar.ts","../../../../../src/compile/mark/geoshape.ts","../../../../../src/compile/mark/image.ts","../../../../../src/compile/mark/line.ts","../../../../../src/compile/mark/rect.ts","../../../../../src/compile/mark/rule.ts","../../../../../src/compile/mark/text.ts","../../../../src/compile/unit.ts","../../../../src/compile/layer.ts","../../../../src/compile/buildmodel.ts","../../../../src/compile/compile.ts","../../parser.ts","../node_modules/vega-themes/build/vega-themes.module.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../../node_modules/@babel/runtime/regenerator/index.js","../../src/post.ts","../../src/embed.ts","../node_modules/react-vega/esm/utils/updateMultipleDatasetsInView.js","../node_modules/react-vega/esm/utils/updateSingleDatasetInView.js","../node_modules/react-vega/esm/utils/isFunction.js","../node_modules/react-vega/esm/utils/getUniqueFieldNames.js","../node_modules/react-vega/esm/constants.js","../node_modules/react-vega/esm/utils/addSignalListenersToView.js","../node_modules/react-vega/esm/utils/removeSignalListenersFromView.js","../node_modules/react-vega/esm/utils/combineSpecWithDimension.js","../node_modules/react-vega/esm/VegaEmbed.js","../node_modules/react-vega/esm/utils/computeSpecChanges.js","../node_modules/react-vega/esm/Vega.js","../node_modules/mathjs/lib/esm/core/config.js","../node_modules/mathjs/lib/esm/utils/is.js","../node_modules/mathjs/lib/esm/utils/object.js","../node_modules/mathjs/lib/esm/core/function/config.js","../node_modules/mathjs/lib/esm/entry/configReadonly.js","../node_modules/mathjs/lib/esm/utils/number.js","../node_modules/mathjs/lib/esm/utils/bignumber/formatter.js","../node_modules/mathjs/lib/esm/utils/string.js","../node_modules/mathjs/lib/esm/error/DimensionError.js","../node_modules/mathjs/lib/esm/error/IndexError.js","../node_modules/mathjs/lib/esm/utils/array.js","../node_modules/mathjs/lib/esm/utils/factory.js","../node_modules/mathjs/lib/esm/type/resultset/ResultSet.js","../node_modules/mathjs/lib/esm/type/complex/Complex.js","../node_modules/mathjs/lib/esm/utils/lruQueue.js","../node_modules/mathjs/lib/esm/utils/function.js","../node_modules/mathjs/lib/esm/utils/bignumber/constants.js","../node_modules/mathjs/lib/esm/plain/number/constants.js","../node_modules/mathjs/lib/esm/type/bignumber/BigNumber.js","../node_modules/mathjs/lib/esm/type/matrix/Matrix.js","../node_modules/mathjs/lib/esm/type/unit/physicalConstants.js","../node_modules/mathjs/lib/esm/type/fraction/Fraction.js","../node_modules/mathjs/lib/esm/type/matrix/DenseMatrix.js","../node_modules/mathjs/lib/esm/core/function/typed.js","../node_modules/mathjs/lib/esm/utils/collection.js","../node_modules/mathjs/lib/esm/function/utils/isInteger.js","../node_modules/mathjs/lib/esm/function/utils/isNumeric.js","../node_modules/mathjs/lib/esm/plain/number/utils.js","../node_modules/mathjs/lib/esm/utils/bignumber/nearlyEqual.js","../node_modules/mathjs/lib/esm/function/relational/equalScalar.js","../node_modules/mathjs/lib/esm/utils/complex.js","../node_modules/mathjs/lib/esm/type/number.js","../node_modules/mathjs/lib/esm/plain/number/arithmetic.js","../node_modules/mathjs/lib/esm/function/arithmetic/cube.js","../node_modules/mathjs/lib/esm/function/arithmetic/multiplyScalar.js","../node_modules/mathjs/lib/esm/plain/number/bitwise.js","../node_modules/mathjs/lib/esm/plain/number/logical.js","../node_modules/mathjs/lib/esm/function/special/erf.js","../node_modules/mathjs/lib/esm/function/string/format.js","../node_modules/mathjs/lib/esm/function/string/oct.js","../node_modules/mathjs/lib/esm/plain/number/trigonometry.js","../node_modules/mathjs/lib/esm/utils/product.js","../node_modules/mathjs/lib/esm/plain/number/combinations.js","../node_modules/mathjs/lib/esm/function/probability/util/seededRNG.js","../node_modules/mathjs/lib/esm/function/probability/randomInt.js","../node_modules/mathjs/lib/esm/type/fraction/function/fraction.js","../node_modules/mathjs/lib/esm/function/arithmetic/unaryMinus.js","../node_modules/mathjs/lib/esm/function/arithmetic/addScalar.js","../node_modules/mathjs/lib/esm/function/complex/conj.js","../node_modules/mathjs/lib/esm/function/string/bin.js","../node_modules/mathjs/lib/esm/function/probability/random.js","../node_modules/mathjs/lib/esm/type/matrix/SparseMatrix.js","../node_modules/mathjs/lib/esm/type/matrix/function/matrix.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm01.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm10.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm13.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm14.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm03.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm05.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm11.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm12.js","../node_modules/mathjs/lib/esm/type/matrix/utils/algorithm07.js","../node_modules/mathjs/lib/esm/function/matrix/diag.js","../node_modules/mathjs/lib/esm/function/matrix/identity.js","../node_modules/mathjs/lib/esm/utils/noop.js","../node_modules/mathjs/lib/esm/function/matrix/size.js","../node_modules/mathjs/lib/esm/function/matrix/zeros.js","../node_modules/mathjs/lib/esm/function/string/hex.js","../node_modules/mathjs/lib/esm/function/arithmetic/round.js","../node_modules/mathjs/lib/esm/function/relational/compare.js","../node_modules/mathjs/lib/esm/function/relational/smaller.js","../node_modules/mathjs/lib/esm/function/relational/larger.js","../node_modules/mathjs/lib/esm/type/matrix/FibonacciHeap.js","../node_modules/mathjs/lib/esm/function/relational/unequal.js","../node_modules/mathjs/lib/esm/function/matrix/dot.js","../node_modules/mathjs/lib/esm/function/arithmetic/abs.js","../node_modules/mathjs/lib/esm/function/arithmetic/floor.js","../node_modules/mathjs/lib/esm/function/arithmetic/multiply.js","../node_modules/mathjs/lib/esm/error/ArgumentsError.js","../node_modules/mathjs/lib/esm/function/matrix/resize.js","../node_modules/mathjs/lib/esm/function/arithmetic/pow.js","../node_modules/mathjs/lib/esm/plain/number/probability.js","../node_modules/mathjs/lib/esm/type/bignumber/function/bignumber.js","../node_modules/mathjs/lib/esm/function/utils/numeric.js","../node_modules/mathjs/lib/esm/function/arithmetic/ceil.js","../node_modules/mathjs/lib/esm/function/arithmetic/subtract.js","../node_modules/mathjs/lib/esm/function/matrix/cross.js","../node_modules/mathjs/lib/esm/function/relational/equal.js","../node_modules/mathjs/lib/esm/function/arithmetic/fix.js","../node_modules/mathjs/lib/esm/function/arithmetic/divideScalar.js","../node_modules/mathjs/lib/esm/function/algebra/solver/lsolve.js","../node_modules/mathjs/lib/esm/type/matrix/Spa.js","../node_modules/mathjs/lib/esm/function/algebra/decomposition/lup.js","../node_modules/mathjs/lib/esm/function/algebra/sparse/csSpsolve.js","../node_modules/mathjs/lib/esm/function/matrix/det.js","../node_modules/mathjs/lib/esm/function/algebra/decomposition/qr.js","../node_modules/mathjs/lib/esm/function/matrix/inv.js","../node_modules/mathjs/lib/esm/function/arithmetic/divide.js","../node_modules/mathjs/lib/esm/type/unit/Unit.js","../node_modules/mathjs/lib/esm/function/algebra/solver/lusolve.js","../node_modules/mathjs/lib/esm/type/unit/function/unit.js","../node_modules/mathjs/lib/esm/entry/pureFunctionsAny.generated.js","../node_modules/@material-ui/core/esm/Modal/ModalManager.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@material-ui/core/esm/Unstable_TrapFocus/Unstable_TrapFocus.js","../node_modules/@material-ui/core/esm/Modal/SimpleBackdrop.js","../node_modules/@material-ui/core/esm/Modal/Modal.js","../node_modules/@material-ui/core/esm/Grow/Grow.js","../node_modules/@material-ui/core/esm/Popover/Popover.js","../node_modules/@material-ui/core/esm/Menu/Menu.js","../node_modules/@material-ui/core/esm/Select/SelectInput.js","../node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDropDown.js","../node_modules/@material-ui/core/esm/TextareaAutosize/TextareaAutosize.js","../node_modules/@material-ui/core/esm/InputBase/InputBase.js","../node_modules/@material-ui/core/esm/Input/Input.js","../node_modules/@material-ui/core/esm/NativeSelect/NativeSelectInput.js","../node_modules/@material-ui/core/esm/NativeSelect/NativeSelect.js","../node_modules/@material-ui/core/esm/FilledInput/FilledInput.js","../node_modules/@material-ui/core/esm/OutlinedInput/NotchedOutline.js","../node_modules/@material-ui/core/esm/OutlinedInput/OutlinedInput.js","../node_modules/@material-ui/core/esm/Select/Select.js","../../../../../src/lib/utils/assert.js","../../../../../src/lib/gltf-utils/resolve-url.ts","../../../../../src/lib/gltf-utils/get-typed-array.ts","../../../../../src/lib/gltf-utils/gltf-utils.ts","../../../../../src/lib/api/gltf-scenegraph.ts","../../../../../src/lib/gltf-utils/gltf-attribute-utils.ts","../../../../../src/lib/extensions/KHR_draco_mesh_compression.ts","../../../../../src/lib/gltf-utils/gltf-constants.ts","../../../../../src/lib/extensions/KHR_materials_unlit.ts","../../../../../src/lib/extensions/KHR_lights_punctual.ts","../../../../../src/lib/extensions/KHR_techniques_webgl.ts","../../../../../src/lib/extensions/gltf-extensions.ts","../../../../../src/lib/api/normalize-gltf-v1.js","../../../../../src/lib/extensions/KHR_binary_gltf.ts","../../../../../src/lib/api/post-process-gltf.js","../../../../../src/lib/parsers/parse-glb.ts","../../../../../src/lib/parsers/parse-gltf.ts","../../../src/gltf-loader.ts","../node_modules/@material-ui/system/esm/styleFunctionSx.js","../node_modules/@material-ui/system/esm/compose.js","../node_modules/@material-ui/system/esm/style.js","../node_modules/@material-ui/system/esm/borders.js","../node_modules/@material-ui/system/esm/display.js","../node_modules/@material-ui/system/esm/flexbox.js","../node_modules/@material-ui/system/esm/grid.js","../node_modules/@material-ui/system/esm/positions.js","../node_modules/@material-ui/system/esm/palette.js","../node_modules/@material-ui/system/esm/shadows.js","../node_modules/@material-ui/system/esm/sizing.js","../node_modules/@material-ui/system/esm/typography.js","../node_modules/@material-ui/styles/esm/styled/styled.js","../node_modules/@material-ui/core/esm/styles/styled.js","../node_modules/@material-ui/core/esm/Box/Box.js","../../../../../src/lib/worker-api/validate-worker-version.ts","../../../../../src/iterators/make-iterator/make-string-iterator.ts","../../../../../src/iterators/make-iterator/make-array-buffer-iterator.ts","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/AwaitValue.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/awaitAsyncGenerator.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js","../../../../../src/iterators/make-iterator/make-blob-iterator.ts","../../../../../src/iterators/make-iterator/make-stream-iterator.ts","../../../../../src/iterators/make-iterator/make-iterator.ts","../../../../../src/lib/loader-utils/get-data.ts","../../../../../src/lib/loader-utils/loader-context.ts","../../../../../src/lib/api/select-loader.ts","../../../../../src/lib/api/parse.ts","../../../../../src/lib/api/load.ts","../node_modules/d3-quadtree/src/add.js","../node_modules/d3-quadtree/src/cover.js","../node_modules/d3-quadtree/src/quad.js","../node_modules/d3-quadtree/src/x.js","../node_modules/d3-quadtree/src/y.js","../node_modules/d3-quadtree/src/quadtree.js","../node_modules/d3-quadtree/src/data.js","../node_modules/d3-quadtree/src/extent.js","../node_modules/d3-quadtree/src/find.js","../node_modules/d3-quadtree/src/remove.js","../node_modules/d3-quadtree/src/root.js","../node_modules/d3-quadtree/src/size.js","../node_modules/d3-quadtree/src/visit.js","../node_modules/d3-quadtree/src/visitAfter.js","../node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js","../node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js","../node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js","../node_modules/hyphenate-style-name/index.js","../node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js","../node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js","../node_modules/css-vendor/dist/css-vendor.esm.js","../node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js","../node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js","../node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js","../node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js","../../../../../src/lib/category-api/image-type.ts","../../../../../src/lib/category-api/parsed-image-api.ts","../../../../../src/lib/parsers/svg-utils.ts","../../../../../src/lib/parsers/parse-to-image.ts","../../../../../src/lib/parsers/parse-to-image-bitmap.ts","../../../../../src/lib/parsers/parse-to-node-image.ts","../../../../../src/lib/parsers/parse-image.ts","../../../src/image-loader.ts","../node_modules/@material-ui/core/esm/utils/scrollLeft.js","../node_modules/@material-ui/core/esm/internal/animate.js","../node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js","../node_modules/@material-ui/core/esm/Tabs/TabIndicator.js","../node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js","../node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js","../node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js","../node_modules/@material-ui/core/esm/Tabs/Tabs.js","../../../../src/classes/uniforms.js","../../../../src/glsl-utils/get-shader-name.js","../../../../src/glsl-utils/format-glsl-error.js","../../../../src/glsl-utils/get-shader-type-name.js","../../../../src/classes/shader.js","../../../../src/classes/program-configuration.js","../../../../src/classes/program.js","../../../../src/utils/shader-utils.js","../../../../src/transform/buffer-transform.js","../../../../src/glsl-utils/get-shader-version.js","../../../../../src/modules/transform/transform.js","../../../../src/transform/transform-shader-utils.js","../../../../src/transform/texture-transform.js","../../../../src/transform/transform.js","../../../../src/utils/use-isomorphic-layout-effect.js","../../../../src/utils/inherits-from.js","../../../../src/utils/extract-jsx-layers.js","../../../../src/utils/evaluate-children.js","../../../../src/utils/extract-styles.js","../../../src/deckgl.js","../../../../src/utils/position-children-under-views.js","../node_modules/@material-ui/core/esm/internal/SwitchBase.js","../node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js","../node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js","../node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js","../node_modules/@material-ui/core/esm/Checkbox/Checkbox.js","../node_modules/@material-ui/core/esm/Collapse/Collapse.js","../node_modules/@material-ui/core/esm/Accordion/Accordion.js","../node_modules/@babel/runtime/helpers/esm/toArray.js","../../../../src/classes/query.js","../../../../src/lib/animation-loop.js","../../../../src/webgl-utils/request-animation-frame.js","../../../../src/data-filter/shader-module.js","../../../../src/data-filter/aggregator.js","../../../../src/data-filter/data-filter.js","../../../../../src/modules/pbr/pbr.js","../../../../../src/modules/pbr/pbr-vertex.glsl.js","../../../../../src/modules/pbr/pbr-fragment.glsl.js","../node_modules/@material-ui/core/esm/styles/createStyles.js","../node_modules/@material-ui/system/esm/spacing.js","../node_modules/@material-ui/system/esm/memoize.js","../node_modules/@material-ui/core/esm/ListItem/ListItem.js","../node_modules/@material-ui/core/esm/MenuItem/MenuItem.js","../node_modules/@material-ui/core/esm/Slider/ValueLabel.js","../node_modules/@material-ui/core/esm/Slider/Slider.js","../node_modules/@material-ui/core/esm/List/List.js","../node_modules/@material-ui/core/esm/MenuList/MenuList.js","../node_modules/@material-ui/core/esm/FormLabel/FormLabel.js","../node_modules/@material-ui/core/esm/InputLabel/InputLabel.js"],"names":["module","exports","require","_classCallCheck","instance","Constructor","TypeError","_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","_defineProperties","target","props","i","length","descriptor","_createClass","protoProps","staticProps","prototype","accessor","fn","fields","name","fname","accessorName","accessorFields","getter","path","get1","getN","field","len","error","message","Error","splitAccessPath","p","j","c","n","q","b","s","push","substring","opt","get","id","identity","_","zero","one","truthy","falsy","log$1","method","level","input","args","concat","slice","call","console","apply","None","Error$1","Warn","Info","Debug","logger","handler","arguments","this","warn","info","debug","isArray","Array","isObject","isLegalKey","mergeConfig","configs","reduce","out","source","signals","mergeNamed","r","layout","writeConfig","output","recurse","k","o","a","map","add","forEach","peek","array","toNumber","exp","sign","x","Math","log","symlog","log1p","abs","symexp","expm1","pow","exponent","pan","domain","delta","lift","ground","d0","d1","dd","panLinear","panLog","panPow","panSymlog","constant","zoom","anchor","scale","da","zoomLinear","zoomLog","zoomPow","zoomSymlog","quarter","date","Date","getMonth","utcquarter","getUTCMonth","clampRange","range","min","max","span","lo","hi","isFunction","compare","orders","ord","fmap","gen","comparator","f","keys","ascending","u","v","compare1","compareN","order","debounce","delay","tid","e","clearTimeout","setTimeout","extend","extent","extentIndex","hop","hasOwnProperty","has","object","property","NULL","fastmap","test","has$1","size","empty","undefined","set","delete","clear","clean","next","flush","threshold","left","right","center","l","t","inherits","child","parent","members","proto","create","inrange","r0","r1","isBoolean","isDate","toString","isIterable","Symbol","iterator","isNumber","isRegExp","isString","flat","replace","lerp","frac","lruCache","maxsize","curr","prev","update","merge","array0","array1","n0","n1","merged","constructor","i0","i1","repeat","str","reps","pad","padchar","align","ceil","$","JSON","stringify","toBoolean","defaultParser","parse","toDate","parser","toSet","truncate","ellipsis","visitArray","filter","visitor","_createForOfIteratorHelper","F","done","_e","it","err","normalCompletion","didErr","step","_e2","ownKeys","enumerableOnly","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","_objectSpread2","getOwnPropertyDescriptors","defineProperties","_slicedToArray","arr","arrayWithHoles","_arr","_n","_d","_s","_i","unsupportedIterableToArray","nonIterableRest","_inherits","subClass","superClass","_typeof","_possibleConstructorReturn","self","assertThisInitialized","_createSuper","Derived","result","Super","getPrototypeOf","isNativeReflectConstruct","NewTarget","Reflect","construct","_toConsumableArray","arrayLikeToArray","iterableToArray","asyncGeneratorStep","resolve","reject","_next","_throw","arg","Promise","then","_asyncToGenerator","_extends","assign","_getPrototypeOf","setPrototypeOf","__proto__","receiver","base","desc","cssToDeviceRatio","gl","luma","clientWidth","cssToDevicePixels","cssPixel","yInvert","ratio","width","height","scalePixels","getDevicePixelRatio","useDevicePixels","windowRatio","window","Number","pixel","scaleX","y","scaleY","xHigh","yHigh","isBrowser","getIsBrowser","isPage","document","CONTEXT_DEFAULTS","webgl2","webgl1","throwOnError","manageState","canvas","createGLContext","options","assert","targetCanvas","getCanvas","onError","createBrowserContext","logInfo","instrumentGLContext","getVersion","trackContextState","copyState","global","resizeGLContext","devicePixelRatio","setDevicePixelRatio","ext","errorMessage","onCreateError","webGL","isWebGL2","vendorMasked","rendererMasked","vendor","renderer","version","shadingLanguageVersion","getContextDebugInfo","driver","WebGL2RenderingContext","clientHeight","cachedSize","clampedPixelRatio","canvasWidth","canvasHeight","toVal","mix","tmp","ReferenceError","_objectWithoutProperties","excluded","sourceSymbolKeys","indexOf","propertyIsEnumerable","DEPTH_BUFFER_BIT","STENCIL_BUFFER_BIT","COLOR_BUFFER_BIT","POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN","ZERO","ONE","SRC_COLOR","ONE_MINUS_SRC_COLOR","SRC_ALPHA","ONE_MINUS_SRC_ALPHA","DST_ALPHA","ONE_MINUS_DST_ALPHA","DST_COLOR","ONE_MINUS_DST_COLOR","SRC_ALPHA_SATURATE","CONSTANT_COLOR","ONE_MINUS_CONSTANT_COLOR","CONSTANT_ALPHA","ONE_MINUS_CONSTANT_ALPHA","FUNC_ADD","FUNC_SUBTRACT","FUNC_REVERSE_SUBTRACT","BLEND_EQUATION","BLEND_EQUATION_RGB","BLEND_EQUATION_ALPHA","BLEND_DST_RGB","BLEND_SRC_RGB","BLEND_DST_ALPHA","BLEND_SRC_ALPHA","BLEND_COLOR","ARRAY_BUFFER_BINDING","ELEMENT_ARRAY_BUFFER_BINDING","LINE_WIDTH","ALIASED_POINT_SIZE_RANGE","ALIASED_LINE_WIDTH_RANGE","CULL_FACE_MODE","FRONT_FACE","DEPTH_RANGE","DEPTH_WRITEMASK","DEPTH_CLEAR_VALUE","DEPTH_FUNC","STENCIL_CLEAR_VALUE","STENCIL_FUNC","STENCIL_FAIL","STENCIL_PASS_DEPTH_FAIL","STENCIL_PASS_DEPTH_PASS","STENCIL_REF","STENCIL_VALUE_MASK","STENCIL_WRITEMASK","STENCIL_BACK_FUNC","STENCIL_BACK_FAIL","STENCIL_BACK_PASS_DEPTH_FAIL","STENCIL_BACK_PASS_DEPTH_PASS","STENCIL_BACK_REF","STENCIL_BACK_VALUE_MASK","STENCIL_BACK_WRITEMASK","VIEWPORT","SCISSOR_BOX","COLOR_CLEAR_VALUE","COLOR_WRITEMASK","UNPACK_ALIGNMENT","PACK_ALIGNMENT","MAX_TEXTURE_SIZE","MAX_VIEWPORT_DIMS","SUBPIXEL_BITS","RED_BITS","GREEN_BITS","BLUE_BITS","ALPHA_BITS","DEPTH_BITS","STENCIL_BITS","POLYGON_OFFSET_UNITS","POLYGON_OFFSET_FACTOR","TEXTURE_BINDING_2D","SAMPLE_BUFFERS","SAMPLES","SAMPLE_COVERAGE_VALUE","SAMPLE_COVERAGE_INVERT","COMPRESSED_TEXTURE_FORMATS","VENDOR","RENDERER","VERSION","IMPLEMENTATION_COLOR_READ_TYPE","IMPLEMENTATION_COLOR_READ_FORMAT","BROWSER_DEFAULT_WEBGL","STATIC_DRAW","STREAM_DRAW","DYNAMIC_DRAW","ARRAY_BUFFER","ELEMENT_ARRAY_BUFFER","BUFFER_SIZE","BUFFER_USAGE","CURRENT_VERTEX_ATTRIB","VERTEX_ATTRIB_ARRAY_ENABLED","VERTEX_ATTRIB_ARRAY_SIZE","VERTEX_ATTRIB_ARRAY_STRIDE","VERTEX_ATTRIB_ARRAY_TYPE","VERTEX_ATTRIB_ARRAY_NORMALIZED","VERTEX_ATTRIB_ARRAY_POINTER","VERTEX_ATTRIB_ARRAY_BUFFER_BINDING","CULL_FACE","FRONT","BACK","FRONT_AND_BACK","BLEND","DEPTH_TEST","DITHER","POLYGON_OFFSET_FILL","SAMPLE_ALPHA_TO_COVERAGE","SAMPLE_COVERAGE","SCISSOR_TEST","STENCIL_TEST","NO_ERROR","INVALID_ENUM","INVALID_VALUE","INVALID_OPERATION","OUT_OF_MEMORY","CONTEXT_LOST_WEBGL","CW","CCW","DONT_CARE","FASTEST","NICEST","GENERATE_MIPMAP_HINT","BYTE","UNSIGNED_BYTE","SHORT","UNSIGNED_SHORT","INT","UNSIGNED_INT","FLOAT","DOUBLE","DEPTH_COMPONENT","ALPHA","RGB","RGBA","LUMINANCE","LUMINANCE_ALPHA","UNSIGNED_SHORT_4_4_4_4","UNSIGNED_SHORT_5_5_5_1","UNSIGNED_SHORT_5_6_5","FRAGMENT_SHADER","VERTEX_SHADER","COMPILE_STATUS","DELETE_STATUS","LINK_STATUS","VALIDATE_STATUS","ATTACHED_SHADERS","ACTIVE_ATTRIBUTES","ACTIVE_UNIFORMS","MAX_VERTEX_ATTRIBS","MAX_VERTEX_UNIFORM_VECTORS","MAX_VARYING_VECTORS","MAX_COMBINED_TEXTURE_IMAGE_UNITS","MAX_VERTEX_TEXTURE_IMAGE_UNITS","MAX_TEXTURE_IMAGE_UNITS","MAX_FRAGMENT_UNIFORM_VECTORS","SHADER_TYPE","SHADING_LANGUAGE_VERSION","CURRENT_PROGRAM","NEVER","ALWAYS","LESS","EQUAL","LEQUAL","GREATER","GEQUAL","NOTEQUAL","KEEP","REPLACE","INCR","DECR","INVERT","INCR_WRAP","DECR_WRAP","NEAREST","LINEAR","NEAREST_MIPMAP_NEAREST","LINEAR_MIPMAP_NEAREST","NEAREST_MIPMAP_LINEAR","LINEAR_MIPMAP_LINEAR","TEXTURE_MAG_FILTER","TEXTURE_MIN_FILTER","TEXTURE_WRAP_S","TEXTURE_WRAP_T","TEXTURE_2D","TEXTURE","TEXTURE_CUBE_MAP","TEXTURE_BINDING_CUBE_MAP","TEXTURE_CUBE_MAP_POSITIVE_X","TEXTURE_CUBE_MAP_NEGATIVE_X","TEXTURE_CUBE_MAP_POSITIVE_Y","TEXTURE_CUBE_MAP_NEGATIVE_Y","TEXTURE_CUBE_MAP_POSITIVE_Z","TEXTURE_CUBE_MAP_NEGATIVE_Z","MAX_CUBE_MAP_TEXTURE_SIZE","TEXTURE0","ACTIVE_TEXTURE","REPEAT","CLAMP_TO_EDGE","MIRRORED_REPEAT","TEXTURE_WIDTH","TEXTURE_HEIGHT","FLOAT_VEC2","FLOAT_VEC3","FLOAT_VEC4","INT_VEC2","INT_VEC3","INT_VEC4","BOOL","BOOL_VEC2","BOOL_VEC3","BOOL_VEC4","FLOAT_MAT2","FLOAT_MAT3","FLOAT_MAT4","SAMPLER_2D","SAMPLER_CUBE","LOW_FLOAT","MEDIUM_FLOAT","HIGH_FLOAT","LOW_INT","MEDIUM_INT","HIGH_INT","FRAMEBUFFER","RENDERBUFFER","RGBA4","RGB5_A1","RGB565","DEPTH_COMPONENT16","STENCIL_INDEX","STENCIL_INDEX8","DEPTH_STENCIL","RENDERBUFFER_WIDTH","RENDERBUFFER_HEIGHT","RENDERBUFFER_INTERNAL_FORMAT","RENDERBUFFER_RED_SIZE","RENDERBUFFER_GREEN_SIZE","RENDERBUFFER_BLUE_SIZE","RENDERBUFFER_ALPHA_SIZE","RENDERBUFFER_DEPTH_SIZE","RENDERBUFFER_STENCIL_SIZE","FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE","FRAMEBUFFER_ATTACHMENT_OBJECT_NAME","FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL","FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE","COLOR_ATTACHMENT0","DEPTH_ATTACHMENT","STENCIL_ATTACHMENT","DEPTH_STENCIL_ATTACHMENT","NONE","FRAMEBUFFER_COMPLETE","FRAMEBUFFER_INCOMPLETE_ATTACHMENT","FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT","FRAMEBUFFER_INCOMPLETE_DIMENSIONS","FRAMEBUFFER_UNSUPPORTED","FRAMEBUFFER_BINDING","RENDERBUFFER_BINDING","READ_FRAMEBUFFER","DRAW_FRAMEBUFFER","MAX_RENDERBUFFER_SIZE","INVALID_FRAMEBUFFER_OPERATION","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","UNPACK_COLORSPACE_CONVERSION_WEBGL","READ_BUFFER","UNPACK_ROW_LENGTH","UNPACK_SKIP_ROWS","UNPACK_SKIP_PIXELS","PACK_ROW_LENGTH","PACK_SKIP_ROWS","PACK_SKIP_PIXELS","TEXTURE_BINDING_3D","UNPACK_SKIP_IMAGES","UNPACK_IMAGE_HEIGHT","MAX_3D_TEXTURE_SIZE","MAX_ELEMENTS_VERTICES","MAX_ELEMENTS_INDICES","MAX_TEXTURE_LOD_BIAS","MAX_FRAGMENT_UNIFORM_COMPONENTS","MAX_VERTEX_UNIFORM_COMPONENTS","MAX_ARRAY_TEXTURE_LAYERS","MIN_PROGRAM_TEXEL_OFFSET","MAX_PROGRAM_TEXEL_OFFSET","MAX_VARYING_COMPONENTS","FRAGMENT_SHADER_DERIVATIVE_HINT","RASTERIZER_DISCARD","VERTEX_ARRAY_BINDING","MAX_VERTEX_OUTPUT_COMPONENTS","MAX_FRAGMENT_INPUT_COMPONENTS","MAX_SERVER_WAIT_TIMEOUT","MAX_ELEMENT_INDEX","RED","RGB8","RGBA8","RGB10_A2","TEXTURE_3D","TEXTURE_WRAP_R","TEXTURE_MIN_LOD","TEXTURE_MAX_LOD","TEXTURE_BASE_LEVEL","TEXTURE_MAX_LEVEL","TEXTURE_COMPARE_MODE","TEXTURE_COMPARE_FUNC","SRGB","SRGB8","SRGB8_ALPHA8","COMPARE_REF_TO_TEXTURE","RGBA32F","RGB32F","RGBA16F","RGB16F","TEXTURE_2D_ARRAY","TEXTURE_BINDING_2D_ARRAY","R11F_G11F_B10F","RGB9_E5","RGBA32UI","RGB32UI","RGBA16UI","RGB16UI","RGBA8UI","RGB8UI","RGBA32I","RGB32I","RGBA16I","RGB16I","RGBA8I","RGB8I","RED_INTEGER","RGB_INTEGER","RGBA_INTEGER","R8","RG8","R16F","R32F","RG16F","RG32F","R8I","R8UI","R16I","R16UI","R32I","R32UI","RG8I","RG8UI","RG16I","RG16UI","RG32I","RG32UI","R8_SNORM","RG8_SNORM","RGB8_SNORM","RGBA8_SNORM","RGB10_A2UI","TEXTURE_IMMUTABLE_FORMAT","TEXTURE_IMMUTABLE_LEVELS","UNSIGNED_INT_2_10_10_10_REV","UNSIGNED_INT_10F_11F_11F_REV","UNSIGNED_INT_5_9_9_9_REV","FLOAT_32_UNSIGNED_INT_24_8_REV","UNSIGNED_INT_24_8","HALF_FLOAT","RG","RG_INTEGER","INT_2_10_10_10_REV","CURRENT_QUERY","QUERY_RESULT","QUERY_RESULT_AVAILABLE","ANY_SAMPLES_PASSED","ANY_SAMPLES_PASSED_CONSERVATIVE","MAX_DRAW_BUFFERS","DRAW_BUFFER0","DRAW_BUFFER1","DRAW_BUFFER2","DRAW_BUFFER3","DRAW_BUFFER4","DRAW_BUFFER5","DRAW_BUFFER6","DRAW_BUFFER7","DRAW_BUFFER8","DRAW_BUFFER9","DRAW_BUFFER10","DRAW_BUFFER11","DRAW_BUFFER12","DRAW_BUFFER13","DRAW_BUFFER14","DRAW_BUFFER15","MAX_COLOR_ATTACHMENTS","COLOR_ATTACHMENT1","COLOR_ATTACHMENT2","COLOR_ATTACHMENT3","COLOR_ATTACHMENT4","COLOR_ATTACHMENT5","COLOR_ATTACHMENT6","COLOR_ATTACHMENT7","COLOR_ATTACHMENT8","COLOR_ATTACHMENT9","COLOR_ATTACHMENT10","COLOR_ATTACHMENT11","COLOR_ATTACHMENT12","COLOR_ATTACHMENT13","COLOR_ATTACHMENT14","COLOR_ATTACHMENT15","SAMPLER_3D","SAMPLER_2D_SHADOW","SAMPLER_2D_ARRAY","SAMPLER_2D_ARRAY_SHADOW","SAMPLER_CUBE_SHADOW","INT_SAMPLER_2D","INT_SAMPLER_3D","INT_SAMPLER_CUBE","INT_SAMPLER_2D_ARRAY","UNSIGNED_INT_SAMPLER_2D","UNSIGNED_INT_SAMPLER_3D","UNSIGNED_INT_SAMPLER_CUBE","UNSIGNED_INT_SAMPLER_2D_ARRAY","MAX_SAMPLES","SAMPLER_BINDING","PIXEL_PACK_BUFFER","PIXEL_UNPACK_BUFFER","PIXEL_PACK_BUFFER_BINDING","PIXEL_UNPACK_BUFFER_BINDING","COPY_READ_BUFFER","COPY_WRITE_BUFFER","COPY_READ_BUFFER_BINDING","COPY_WRITE_BUFFER_BINDING","FLOAT_MAT2x3","FLOAT_MAT2x4","FLOAT_MAT3x2","FLOAT_MAT3x4","FLOAT_MAT4x2","FLOAT_MAT4x3","UNSIGNED_INT_VEC2","UNSIGNED_INT_VEC3","UNSIGNED_INT_VEC4","UNSIGNED_NORMALIZED","SIGNED_NORMALIZED","VERTEX_ATTRIB_ARRAY_INTEGER","VERTEX_ATTRIB_ARRAY_DIVISOR","TRANSFORM_FEEDBACK_BUFFER_MODE","MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS","TRANSFORM_FEEDBACK_VARYINGS","TRANSFORM_FEEDBACK_BUFFER_START","TRANSFORM_FEEDBACK_BUFFER_SIZE","TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN","MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS","MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS","INTERLEAVED_ATTRIBS","SEPARATE_ATTRIBS","TRANSFORM_FEEDBACK_BUFFER","TRANSFORM_FEEDBACK_BUFFER_BINDING","TRANSFORM_FEEDBACK","TRANSFORM_FEEDBACK_PAUSED","TRANSFORM_FEEDBACK_ACTIVE","TRANSFORM_FEEDBACK_BINDING","FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING","FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE","FRAMEBUFFER_ATTACHMENT_RED_SIZE","FRAMEBUFFER_ATTACHMENT_GREEN_SIZE","FRAMEBUFFER_ATTACHMENT_BLUE_SIZE","FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE","FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE","FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE","FRAMEBUFFER_DEFAULT","DEPTH24_STENCIL8","DRAW_FRAMEBUFFER_BINDING","READ_FRAMEBUFFER_BINDING","RENDERBUFFER_SAMPLES","FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER","FRAMEBUFFER_INCOMPLETE_MULTISAMPLE","UNIFORM_BUFFER","UNIFORM_BUFFER_BINDING","UNIFORM_BUFFER_START","UNIFORM_BUFFER_SIZE","MAX_VERTEX_UNIFORM_BLOCKS","MAX_FRAGMENT_UNIFORM_BLOCKS","MAX_COMBINED_UNIFORM_BLOCKS","MAX_UNIFORM_BUFFER_BINDINGS","MAX_UNIFORM_BLOCK_SIZE","MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS","MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS","UNIFORM_BUFFER_OFFSET_ALIGNMENT","ACTIVE_UNIFORM_BLOCKS","UNIFORM_TYPE","UNIFORM_SIZE","UNIFORM_BLOCK_INDEX","UNIFORM_OFFSET","UNIFORM_ARRAY_STRIDE","UNIFORM_MATRIX_STRIDE","UNIFORM_IS_ROW_MAJOR","UNIFORM_BLOCK_BINDING","UNIFORM_BLOCK_DATA_SIZE","UNIFORM_BLOCK_ACTIVE_UNIFORMS","UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES","UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER","UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER","OBJECT_TYPE","SYNC_CONDITION","SYNC_STATUS","SYNC_FLAGS","SYNC_FENCE","SYNC_GPU_COMMANDS_COMPLETE","UNSIGNALED","SIGNALED","ALREADY_SIGNALED","TIMEOUT_EXPIRED","CONDITION_SATISFIED","WAIT_FAILED","SYNC_FLUSH_COMMANDS_BIT","COLOR","DEPTH","STENCIL","MIN","MAX","DEPTH_COMPONENT24","STREAM_READ","STREAM_COPY","STATIC_READ","STATIC_COPY","DYNAMIC_READ","DYNAMIC_COPY","DEPTH_COMPONENT32F","DEPTH32F_STENCIL8","INVALID_INDEX","TIMEOUT_IGNORED","MAX_CLIENT_WAIT_TIMEOUT_WEBGL","VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE","UNMASKED_VENDOR_WEBGL","UNMASKED_RENDERER_WEBGL","MAX_TEXTURE_MAX_ANISOTROPY_EXT","TEXTURE_MAX_ANISOTROPY_EXT","COMPRESSED_RGB_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT1_EXT","COMPRESSED_RGBA_S3TC_DXT3_EXT","COMPRESSED_RGBA_S3TC_DXT5_EXT","COMPRESSED_R11_EAC","COMPRESSED_SIGNED_R11_EAC","COMPRESSED_RG11_EAC","COMPRESSED_SIGNED_RG11_EAC","COMPRESSED_RGB8_ETC2","COMPRESSED_RGBA8_ETC2_EAC","COMPRESSED_SRGB8_ETC2","COMPRESSED_SRGB8_ALPHA8_ETC2_EAC","COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2","COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2","COMPRESSED_RGB_PVRTC_4BPPV1_IMG","COMPRESSED_RGBA_PVRTC_4BPPV1_IMG","COMPRESSED_RGB_PVRTC_2BPPV1_IMG","COMPRESSED_RGBA_PVRTC_2BPPV1_IMG","COMPRESSED_RGB_ETC1_WEBGL","COMPRESSED_RGB_ATC_WEBGL","COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL","COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL","UNSIGNED_INT_24_8_WEBGL","HALF_FLOAT_OES","RGBA32F_EXT","RGB32F_EXT","FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT","UNSIGNED_NORMALIZED_EXT","MIN_EXT","MAX_EXT","SRGB_EXT","SRGB_ALPHA_EXT","SRGB8_ALPHA8_EXT","FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT","FRAGMENT_SHADER_DERIVATIVE_HINT_OES","COLOR_ATTACHMENT0_WEBGL","COLOR_ATTACHMENT1_WEBGL","COLOR_ATTACHMENT2_WEBGL","COLOR_ATTACHMENT3_WEBGL","COLOR_ATTACHMENT4_WEBGL","COLOR_ATTACHMENT5_WEBGL","COLOR_ATTACHMENT6_WEBGL","COLOR_ATTACHMENT7_WEBGL","COLOR_ATTACHMENT8_WEBGL","COLOR_ATTACHMENT9_WEBGL","COLOR_ATTACHMENT10_WEBGL","COLOR_ATTACHMENT11_WEBGL","COLOR_ATTACHMENT12_WEBGL","COLOR_ATTACHMENT13_WEBGL","COLOR_ATTACHMENT14_WEBGL","COLOR_ATTACHMENT15_WEBGL","DRAW_BUFFER0_WEBGL","DRAW_BUFFER1_WEBGL","DRAW_BUFFER2_WEBGL","DRAW_BUFFER3_WEBGL","DRAW_BUFFER4_WEBGL","DRAW_BUFFER5_WEBGL","DRAW_BUFFER6_WEBGL","DRAW_BUFFER7_WEBGL","DRAW_BUFFER8_WEBGL","DRAW_BUFFER9_WEBGL","DRAW_BUFFER10_WEBGL","DRAW_BUFFER11_WEBGL","DRAW_BUFFER12_WEBGL","DRAW_BUFFER13_WEBGL","DRAW_BUFFER14_WEBGL","DRAW_BUFFER15_WEBGL","MAX_COLOR_ATTACHMENTS_WEBGL","MAX_DRAW_BUFFERS_WEBGL","VERTEX_ARRAY_BINDING_OES","QUERY_COUNTER_BITS_EXT","CURRENT_QUERY_EXT","QUERY_RESULT_EXT","QUERY_RESULT_AVAILABLE_EXT","TIME_ELAPSED_EXT","TIMESTAMP_EXT","GPU_DISJOINT_EXT","_assertThisInitialized","transpose","a01","a02","a03","a12","a13","a23","invert","a00","a10","a11","a20","a21","a22","a30","a31","a32","a33","b00","b01","b02","b03","b04","b05","b06","b07","b08","b09","b10","b11","det","determinant","multiply","b0","b1","b2","b3","translate","z","rotate","rad","axis","b12","b20","b21","b22","hypot","glMatrix","sin","cos","rotateX","rotateY","rotateZ","getScaling","mat","m11","m12","m13","m21","m22","m23","m31","m32","m33","fromQuat","w","x2","y2","z2","xx","yx","yy","zx","zy","zz","wx","wy","wz","frustum","bottom","top","near","far","rl","tb","nf","perspective","fovy","aspect","tan","Infinity","ortho","lr","bt","lookAt","eye","up","x0","x1","y0","y1","z0","z1","eyex","eyey","eyez","upx","upy","upz","centerx","centery","centerz","withStyles","stylesOrCreator","Component","defaultTheme","_options$withTheme","withTheme","stylesOptions","classNamePrefix","useStyles","makeStyles","displayName","WithStyles","React","forwardRef","ref","classes","theme","innerRef","other","defaultProps","more","useTheme","getThemeProps","createElement","hoistNonReactStatics","withStylesWithoutDefault","Float32Array","fromValues","normalize","sqrt","dot","cross","ax","ay","az","bx","by","bz","transformMat4","m","transformMat3","transformQuat","qx","qy","qz","qw","uvx","uvy","uvz","uuvx","uuvy","uuvz","w2","angle","mag","cosine","acos","sub","sqrLen","vec","EPSILON","ARRAY_TYPE","RANDOM","random","PI","RADIANS_TO_DEGREES","DEGREES_TO_RADIANS","config","configure","round","formatValue","precision","parseFloat","ArrayBuffer","clone","func","toRadians","degrees","radians","toDegrees","asin","atan","clamp","ai","equals","epsilon","oldEpsilon","exactEquals","withEpsilon","oldPrecision","validateVector","checkNumber","checkVector","callerName","deprecated","setAxisAngle","aw","bw","calculateW","slerp","omega","cosom","sinom","scale0","scale1","a0","a1","a2","a3","invDot","conjugate","fromMat3","fRoot","fTrace","vec4","squaredLength","rotationTo","tmpvec3","vec3","xUnitVec3","yUnitVec3","temp1","temp2","matr","mat3","DEFAULT_LIGHT_COLOR","DEFAULT_ATTENUATION","DEFAULT_LIGHT_POSITION","idCount","color","intensity","position","getAttenuation","layer","projectedLight","viewport","coordinateOrigin","projectPosition","coordinateSystem","fromCoordinateSystem","COORDINATE_SYSTEM","fromCoordinateOrigin","modelMatrix","project_uCameraPosition","getUniformsFromViewport","getSolarPosition","timestamp","latitude","longitude","longitudeWestInRadians","phi","d","toJulianDay","toDays","dates","L","meanAnomaly","M","C","getEclipticLongitude","days","declination","getDeclination","rightAscension","getRightAscension","getSunCoords","H","getSiderealTime","azimuth","getAzimuth","altitude","getAltitude","getSunlightDirection","eclipticLongitude","lambda","hourAngle","latitudeInRadians","others","fs","modules","setParameters","withParameters","framebuffer","params","clearColor","outputBuffer","moduleSettings","uniforms","texture","texSize","inputBuffer","parameters","depthWrite","depthTest","normalizeShaderModule","getFragmentShaderForRenderPass","idn","createPasses","index","passes","switchBuffer","pass","FILTER_FS_TEMPLATE","SAMPLER_FS_TEMPLATE","getDistanceScales","unitsPerDegree","unitsPerMeter","unitsPerMeter2","metersPerUnit","unitsPerDegree2","degreesPerUnit","opts","nearZMultiplier","farZMultiplier","resolution","viewMatrix","halfFov","relativeScale","GLOBE_RADIUS","fovyRadians","focalDistance","unprojectOption","targetZ","unproject","topLeft","pixelUnprojectionMatrix","coord","transformVector","coord0","coord1","lt","lSqr","l0Sqr","l1Sqr","sSqr","dSqr","dr","unprojectPosition","X","Y","Z","lng","lat","cosPhi","D","fromPosition","coords","PROJECTION_MODE","matrix","vector","DEFAULT_STATE","pitch","bearing","maxPitch","minPitch","startZoom","startRotatePos","startBearing","startPitch","startZoomPosition","use2D","spherical","_viewportProps","direction","pos","_getUpdatedState","deltaAngleX","deltaAngleY","newRotation","_move","speed","getDirection","fromProps","viewState","FirstPersonState","newProps","mod","dir","getDirectionFromBearingAndPitch","getMeterZoom","type","FirstPersonViewport","_getControllerProps","FirstPersonController","FirstPersonView","minZoom","GlobeViewport","GlobeController","GlobeView","LINEARLY_INTERPOLATED_PROPS","DEFAULT_OPTS","curve","extract","required","flyToViewport","startProps","endProps","transitionDuration","getFlyToDuration","DEFAULT","LNGLAT","METER_OFFSETS","LNGLAT_OFFSETS","CARTESIAN","WEB_MERCATOR","GLOBE","WEB_MERCATOR_AUTO_OFFSET","IDENTITY","UNIT","common","meters","pixels","EVENTS","click","panstart","panmove","panend","baseIsEqual","checkDCE","__REACT_DEVTOOLS_GLOBAL_HOOK__","process","capitalize","string","_formatMuiErrorMessage","charAt","toUpperCase","divisor","modulus","log2","a4","a5","a6","a7","a8","a9","a14","a15","b4","b5","b6","b7","b8","b9","b13","b14","b15","mul","condition","PI_4","zoomToScale","scaleToZoom","lngLatToWorld","phi2","worldToLngLat","lambda2","highPrecision","latCosine","unitsPerDegreeY","altUnitsPerMeter","latCosine2","unitsPerDegreeY2","altUnitsPerDegree2","altUnitsPerMeter2","addMetersToLngLat","lngLatZ","xyz","worldspace","newLngLat","newZ","getViewMatrix","vm","mat4","getProjectionParameters","altitudeToFovy","fovyToAltitude","pitchRadians","topHalfSurfaceDistance","fov","getProjectionMatrix","worldToPixels","pixelProjectionMatrix","pixelsToWorld","vec2","minExtent","maxZoom","padding","offset","nw","west","se","east","targetSize","offsetX","offsetY","centerLngLat","unprojectOps","bottomLeft","bottomRight","angleToGround","unprojectOnFarPlane","topRight","distanceScales","bind","project","vpm","mInverse","worldPosition","targetZWorld","fromLocation","getMapCenterByLngLatPosition","lngLat","fitBounds","bounds","WebMercatorViewport","corners","getBoundingRegion","getBounds","normalizeViewportProps","halfHeightPixels","minLatitude","maxLatitude","VIEWPORT_TRANSITION_PROPS","getFlyToTransitionParams","u1","startValue","endValue","rho","w0","scaleIncrement","newZoom","newCenterWorld","newCenter","maxDuration","duration","screenSpeed","startCenter","startScale","endZoom","endCenter","startCenterXY","endCenterXY","uDelta","w1","_u1","rho2","S","INDEX_OFFSETS","uid","tesselateTruncatedCone","attributes","indices","bottomRadius","topRadius","nradial","nvertical","verticalAxis","topCap","bottomCap","extra","numVertices","slant","msin","mcos","mpi","cosSlant","sinSlant","start","end","vertsAroundEdge","Uint16Array","indexOffset","positions","normals","texCoords","i3","i2","ringRadius","POSITION","NORMAL","TEXCOORD_0","radius","cap","Boolean","ICO_POSITIONS","ICO_INDICES","tesselateIcosaHedron","iterations","PI2","getMiddlePoint","pointMemo","maxi","xm","ym","zm","indices2","in1","in2","in3","iu1","iu2","iu3","v1","v2","u2","x3","y3","z3","v3","u3","vec1","normal","newIndex","tesselatePlane","flipCull","unpack","c1len","c2len","subdivisions1","subdivisions2","numVertsAcross","geometry","vertexCount","unpackedAttributes","attribute","unpackedValue","unpackIndexedGeometry","tesselateSphere","nlat","nlong","latRange","longRange","theta","sinTheta","cosTheta","sinPhi","ux","uy","uz","numVertsAround","fp64ify","startIndex","hiPart","loPart","fp64LowPart","fp64ifyMatrix4","matrixFP64","CONST_UNIFORMS","fp64","vs","dependencies","getUniforms","IDENTITY_MATRIX","DEFAULT_MODULE_OPTIONS","projectionMatrix","cameraPositionWorld","lightDirection","dirlight","t0","t1","newInterval","floori","offseti","count","interval","floor","stop","previous","setTime","every","isFinite","day","setHours","setDate","getDate","durationSecond","getTimezoneOffset","durationHour","weekday","getDay","durationDay","sunday","monday","tuesday","wednesday","thursday","friday","saturday","utcDay","setUTCHours","setUTCDate","getUTCDate","utcWeekday","getUTCDay","utcSunday","utcMonday","utcTuesday","utcWednesday","utcThursday","utcFriday","utcSaturday","year","setMonth","setFullYear","getFullYear","month","hour","getMilliseconds","getSeconds","getMinutes","durationMinute","getHours","minute","second","getUTCSeconds","millisecond","utcYear","setUTCMonth","setUTCFullYear","getUTCFullYear","utcMonth","utcHour","setUTCMinutes","getUTCHours","utcMinute","setUTCSeconds","getUTCMinutes","mid","NaN","ascendingComparator","e10","e5","e2","tickStep","step0","step1","LN10","YEAR","QUARTER","MONTH","WEEK","DATE","DAY","DAYOFYEAR","HOURS","MINUTES","SECONDS","MILLISECONDS","TIME_UNITS","UNITS","timeUnits","units","unit","sort","defaultSpecifiers","timeUnitSpecifier","specifiers","fmt","join","trim","localYear","dayofyear","localDayOfYear","week","localWeekNum","timeDay","timeWeek","localFirst","localDate","utcdayofyear","utcDayOfYear","utcweek","utcWeekNum","UTC","utcWeek","utcFirst","utcDate","inv","newDate","phase","getUnit","firstDay","localGet","localInv","timeFloor","utcGet","getUTCMilliseconds","utcInv","utcFloor","timeIntervals","timeYear","timeMonth","timeHour","timeMinute","timeSecond","timeMillisecond","utcIntervals","utcSecond","utcMillisecond","timeInterval","utcInterval","ival","timeOffset","utcOffset","sequence","timeSequence","utcSequence","Milli","Seconds","Minutes","Hours","Day","Month","Year","intervals","bin","maxbins","bisector","product","createProxy","mapping","Proxy","_receiver","setItem","getItem","deleteProperty","deleteItem","containsItem","isKeyError","__zarr__","ContainsArrayError","ContainsGroupError","ArrayNotFoundError","GroupNotFoundError","PermissionError","KeyError","TooManyIndicesError","selection","shape","RangeError","BoundsCheckError","InvalidSliceError","from","to","stepSize","reason","NegativeStepError","ValueError","HTTPError","code","_slice","sliceIndices","MAX_SAFE_INTEGER","adjustIndices","ensureArray","selectionToSliceIndices","sliceIndicesResult","outShape","dimLength","normalizeArraySelection","convertIntegerSelectionToSlices","replaceEllipsis","dimSelection","normalizeIntegerSelection","isIntegerArray","ellipsisIndex","numEllipsis","numItemsLeft","numItemsRight","numItems","numNewItems","newItem","fill","numMissing","checkSelectionLength","isSlice","isContiguousSlice","isContiguousSelection","iterables","iterators","results","BasicIndexer","dimIndexers","arrayShape","dimChunkLength","chunks","IntDimIndexer","SliceDimIndexer","dropAxes","dimIndexerIterables","iter","dimIndexerProduct","dimProjections","chunkCoords","chunkSelection","outSelection","dimChunkIndex","dimChunkSelection","dimOutSelection","dimOffset","numChunks","dimChunkIndexFrom","dimChunkIndexTo","dimLimit","dimChunkSelStart","dimChunkSelStop","dimOutOffset","remainder","dimChunkNumItems","containsArray","store","normalizeStoragePath","prefix","pathToPrefix","containsGroup","requireParentGroup","chunkStore","overwrite","segments","split","initGroupMetadata","metadata","zarr_format","initGroup","initArrayMetadata","dtype","compressor","fillValue","filters","serializedFillValue","parseMetadata","IS_NODE","Buffer","isBuffer","utf8Decoder","TextDecoder","bytes","Uint8Array","decode","Attributes","readOnly","cache","cachedValue","getNoSync","data","putNoSync","setNoSync","asObject","delNoSync","getNestedArrayConstructor","byteLength","sliceNestedArray","_sliceNestedArray","currentSlice","outputSize","newArrData","newArr","typedArrayConstructor","setNestedArrayToScalar","destShape","_setNestedArrayToScalar","dstArr","setNestedArray","sourceShape","_setNestedArray","sourceArr","flattenNestedArray","constr","outArr","_flattenNestedArray","nextShape","mult","NestedArray","dataIsTypedArray","BYTES_PER_ELEMENT","getTypedArrayDtypeString","normalizeShape","buffer","startsWith","numShapeElements","parseInt","numDataElements","typeConstructor","createNestedArray","sliceResult","rangeTypedArray","tContructor","setRawArrayToScalar","dstStrides","dstShape","dstSelection","_setRawArrayToScalar","dstSliceIndices","currentDstSlice","nextDstSliceIndices","currentDstStride","nextDstStrides","subarray","setRawArray","sourceStrides","_setRawArray","currentSourceStride","nextSourceStrides","setRawArrayFromChunkItem","sourceSelection","_setRawArrayFromChunkItem","sourceSliceIndices","currentSourceSlice","nextSourceSliceIndices","sfrom","sstep","RawArray","strides","getStrides","Events","EE","context","once","addListener","emitter","event","listener","evt","_events","_eventsCount","clearEvent","EventEmitter","eventNames","events","names","listeners","handlers","ee","listenerCount","emit","removeListener","on","removeAllListeners","off","prefixed","TimeoutError","pTimeout","promise","milliseconds","fallback","timer","timeoutError","cancel","onFinally","val","pFinally","HTTPMethod","first","_queue","run","element","priority","lower_bound_1","default","splice","item","shift","p_timeout_1","_intervalCount","_intervalEnd","_pendingCount","_resolveEmpty","_resolveIdle","carryoverConcurrencyCount","intervalCap","concurrency","autoStart","queueClass","priority_queue_1","_carryoverConcurrencyCount","_isIntervalIgnored","_intervalCap","_interval","_queueClass","_timeout","timeout","_throwOnTimeout","throwOnTimeout","_isPaused","_tryToStartAnother","_onInterval","_initializeIntervalIfNeeded","_timeoutId","now","_intervalId","_onResumeInterval","clearInterval","_resolvePromises","canInitializeInterval","_isIntervalPaused","_doesIntervalAllowAnother","_doesConcurrentAllowAnother","dequeue","setInterval","_processQueue","operation","enqueue","functions","all","function_","existingResolve","_concurrency","newConcurrency","ZarrArray","cacheMetadata","cacheAttrs","_chunkStore","keyPrefix","meta","getCodec","attrKey","attrs","metaKey","metaStoreValue","reloadMetadata","getBasicSelection","asRaw","concurrencyLimit","progressCallback","getBasicSelectionND","indexer","getSelection","outDtype","outSize","chunkSize","itr","proj","chunkProjection","decodeDirectToRawArray","queue","PQueue","progress","queueSize","chunkGetItem","onIdle","_chunkDataShape","chunkDataShape","cKey","chunkKey","cdata","decodeChunk","decodedChunk","isTotalSlice","toNestedArray","chunk","chunkBufferToRawArray","storeOptions","parts","fillTypeValue","fill_value","loadMetadataForConstructor","MemoryStore","root","getParent","requireParent","DEFAULT_METHODS","HEAD","GET","PUT","HTTPStore","url","fetchOptions","supportedMethods","Set","joinUrlParts","fetch","status","String","arrayBuffer","TextEncoder","encode","body","_item","Group","absolute","itemPath","getOptsForArrayCreation","openGroup","mode","normalizeStoreArgument","registry","Map","addCodec","importFn","codec","fromConfig","normalizeChunks","normalizeOrder","isNaN","POSITIVE_INFINITY","NEGATIVE_INFINITY","initArray","DTYPE_TYPEDARRAY_MAPPING","Int8Array","Int16Array","Uint32Array","Int32Array","Float64Array","PriorityQueue","chunkData","ensureByteArray","includes","byteSwapInplace","toTypedArray","setBasicSelection","setBasicSelectionND","setSelection","selectionShape","chunkValue","arrayEquals1D","getChunkValue","chunkSetItem","dtypeConstr","flatten","chunkStoreData","dBytes","chunkNestedArray","encodeChunk","byteSwap","cbytes","openArray","ReactCSS","loop","handleActive","handleHover","hover","_flattenNames2","_interopRequireDefault","_mergeClasses2","_autoprefix2","_hover3","_active2","_loop3","__esModule","_len","activations","_key","activeNames","useForkRef","refA","refB","refValue","setRef","onlyTreeNodeWarned","warnOnlyTreeNode","warning","arrDel","list","arrAdd","posToArr","getPosition","isTreeNode","node","getNodeChildren","children","toArray","isCheckDisabled","_ref","disabled","disableCheckbox","traverseTreeNodes","treeNodes","callback","processNode","childList","parentPos","Children","subNode","subIndex","mapChildren","getDragNodesKeys","_node$props","eventKey","dragNodesKeys","_ref2","calcDropPosition","treeNode","clientY","_treeNode$selectHandl","selectHandle","getBoundingClientRect","des","calcSelectedKeys","selectedKeys","multiple","keyListToString","keyList","internalProcessProps","convertDataToTree","treeData","processer","_ref3$processProps","processProps","_ref4","childrenNodes","TreeNode","convertTreeToEntities","_ref5","initWrapper","processEntity","onProcessFinished","posEntities","keyEntities","wrapper","entity","parseCheckedKeys","keyProps","checkedKeys","halfCheckedKeys","checked","halfChecked","conductCheck","isCheck","checkStatus","conductUp","everyChildChecked","someChildChecked","_ref6","childKey","childChecked","childHalfChecked","conductDown","conduct","checkedKeyList","halfCheckedKeyList","conductExpandParent","expandedKeys","getDataAndAria","substr","quickselect","quickselectStep","sd","newLeft","newRight","swap","defaultCompare","isDataView","view","DataView","floatView","uint32View","baseTable","shiftTable","mantissaTable","exponentTable","offsetTable","convertToNumber","float16bits","getFloat16","dataView","byteOffset","getUint16","keepComments","keepWhitespace","openBracketCC","charCodeAt","closeBracketCC","minusCC","slashCC","exclamationCC","singleQuoteCC","doubleQuoteCC","openCornerBracketCC","closeCornerBracketCC","parseChildren","tagName","closeStart","parsedText","startCommentPos","toLowerCase","cdataEndIndex","startDoctype","encapsuled","parseNode","text","parseText","trimmed","parseName","NoChildNodes","noChildNodes","parseString","startChar","startpos","findElements","RegExp","attrName","attrValue","exec","lastIndexOf","dept","kids","simplify","_attributes","setPos","fieldTagNames","fieldTags","arrayFields","BitsPerSample","ExtraSamples","SampleFormat","StripByteCounts","StripOffsets","StripRowCounts","TileByteCounts","TileOffsets","SubIFDs","fieldTypeNames","fieldTypes","photometricInterpretations","ExtraSamplesValues","LercParameters","LercAddCompression","geoKeyNames","1024","1025","1026","2048","2049","2050","2051","2052","2053","2054","2055","2056","2057","2058","2059","2060","2061","2062","3072","3073","3074","3075","3076","3077","3078","3079","3080","3081","3082","3083","3084","3085","3086","3087","3088","3089","3090","3091","3092","3093","3094","3095","3096","4096","4097","4098","4099","geoKeys","fromWhiteIsZero","raster","rgbRaster","fromBlackIsZero","fromPalette","colorMap","greenOffset","blueOffset","mapIndex","fromCMYK","cmykRaster","fromYCbCr","yCbCrRaster","Uint8ClampedArray","cb","cr","fromCIELab","cieLabRaster","g","decodeRowAcc","row","stride","decodeRowFloatingPoint","bytesPerSample","wc","copy","applyPredictor","block","predictor","bitsPerSample","planarConfiguration","A","BaseDecoder","fileDirectory","decodeBlock","decoded","Predictor","isTiled","tileWidth","TileWidth","ImageWidth","tileHeight","TileLength","RowsPerStrip","ImageLength","PlanarConfiguration","RawDecoder","I","memory","B","Q","E","Request","URL","Response","WebAssembly","instantiateStreaming","headers","instantiate","Instance","__wbindgen_wasm_module","freeze","decompress","__wbindgen_add_to_stack_pointer","__wbindgen_malloc","G","N","__wbindgen_free","endsWith","LZWDecoder","nbytes","maxUncompressedSize","dctZigZag","buildHuffmanTable","codeLengths","values","pop","decodeScan","initialOffset","frame","components","resetInterval","spectralStart","spectralEnd","successivePrev","successive","mcusPerLine","progressive","startOffset","bitsData","bitsCount","readBit","nextByte","decodeHuffman","tree","bit","receive","initialLength","receiveAndExtend","eobrun","successiveACNextValue","successiveACState","decodeMcu","component","decodeFunction","mcu","col","mcuCol","blockRow","blockCol","h","blocks","blocksPerLine","decodeFn","componentsLength","huffmanTableDC","diff","pred","rs","huffmanTableAC","marker","mcuExpected","blocksPerColumn","mcusPerColumn","usedResetInterval","buildComponentData","lines","samplesPerLine","R","quantizeAndInverse","dataOut","dataIn","v0","v4","v5","v6","v7","qt","quantizationTable","sample","scanLine","line","JpegStreamReader","jfif","adobe","quantizationTables","huffmanTablesAC","huffmanTablesDC","resetFrames","frames","readUint16","readDataBlock","prepareComponents","componentId","maxH","maxV","scanLines","blocksPerLineForMcu","blocksPerColumnForMcu","fileMarker","appData","major","minor","densityUnits","xDensity","yDensity","thumbWidth","thumbHeight","thumbData","flags0","flags1","transformCode","quantizationTablesEnd","quantizationTableSpec","tableData","extended","componentsOrder","componentsCount","qId","quantizationIdx","huffmanLength","huffmanTableSpec","codeLengthSum","huffmanValues","selectorsCount","tableSpec","successiveApproximation","processed","cp","outComponents","oi","JpegDecoder","reader","JPEGTables","getResult","zero$1","buf","extra_lbits","extra_dbits","extra_blbits","bl_order","static_ltree","static_dtree","D_CODES$1","_dist_code","_length_code","MAX_MATCH$1","base_length","static_l_desc","static_d_desc","static_bl_desc","base_dist","StaticTreeDesc","static_tree","extra_bits","extra_base","elems","max_length","has_stree","TreeDesc","dyn_tree","stat_desc","max_code","d_code","dist","put_short","pending_buf","pending","send_bits","bi_valid","bi_buf","send_code","bi_reverse","res","gen_codes","bl_count","bits","next_code","MAX_BITS$1","init_block","LITERALS$1","dyn_ltree","dyn_dtree","bl_tree","END_BLOCK","opt_len","static_len","last_lit","matches","bi_windup","smaller","depth","_n2","_m2","pqdownheap","heap","heap_len","compress_block","ltree","dtree","lc","lx","d_buf","l_buf","build_tree","stree","heap_max","xbits","overflow","gen_bitlen","scan_tree","curlen","prevlen","nextlen","max_count","min_count","REP_3_6","REPZ_3_10","REPZ_11_138","send_tree","static_init_done","_tr_stored_block$1","stored_len","last","header","copy_block","trees","_tr_init","LENGTH_CODES$1","L_CODES$1","tr_static_init","l_desc","d_desc","bl_desc","_tr_stored_block","_tr_flush_block","opt_lenb","static_lenb","max_blindex","strm","data_type","black_mask","detect_data_type","BL_CODES$1","build_bl_tree","strategy","lcodes","dcodes","blcodes","rank","send_all_trees","_tr_tally","lit_bufsize","_tr_align","STATIC_TREES","bi_flush","adler32_1","adler","s1","s2","crcTable","table","makeTable","crc32_1","crc","messages","2","1","0","constants$2","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_BLOCK","Z_TREES","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_MEM_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_BINARY","Z_TEXT","Z_UNKNOWN","Z_DEFLATED","Z_NO_FLUSH$2","Z_FULL_FLUSH$1","Z_FINISH$3","Z_BLOCK$1","Z_OK$3","Z_STREAM_END$3","Z_STREAM_ERROR$2","Z_DATA_ERROR$2","Z_BUF_ERROR$1","Z_DEFAULT_COMPRESSION$1","Z_DEFAULT_STRATEGY$1","Z_DEFLATED$2","errorCode","msg","HASH","hash_shift","hash_mask","flush_pending","state","avail_out","pending_out","next_out","total_out","flush_block_only","block_start","strstart","put_byte","putShortMSB","read_buf","avail_in","next_in","wrap","total_in","longest_match","cur_match","match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","limit","w_size","MAX_MATCH","_win","wmask","w_mask","strend","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","_w_size","window_size","hash_size","head","insert","ins_h","deflate_fast","hash_head","bflush","match_length","max_lazy_match","MIN_MATCH","deflate_slow","max_insert","prev_match","match_available","Config","good_length","max_lazy","nice_length","max_chain","configuration_table","max_block_size","pending_buf_size","max_start","DeflateState","gzhead","gzindex","last_flush","w_bits","hash_bits","HEAP_SIZE","MAX_BITS","deflateResetKeep","deflateReset","ret","deflateInit2","windowBits","memLevel","deflate_1$2","deflateInit","deflateSetHeader","deflate","beg","old_flush","hcrc","comment","time","os","bstate","deflate_huff","deflate_rle","deflateEnd","deflateSetDictionary","dictionary","dictLength","tmpDict","avail","deflateInfo","_has","sources","STR_APPLY_UIA_OK","fromCharCode","__","_utf8len","strings","c2","m_pos","str_len","buf_len","utf16buf","c_len","buf2binstring","zstream","toString$1","Z_NO_FLUSH$1","Z_FINISH$2","Z_OK$2","Z_STREAM_END$2","Z_DEFLATED$1","Deflate$1","raw","gzip","ended","dict","_dict_set","flush_mode","_flush_mode","onData","onEnd","inffast","_in","_out","dmax","wsize","whave","wnext","s_window","hold","lcode","dcode","lmask","dmask","here","op","from_source","lencode","distcode","lenbits","distbits","dolen","dodist","sane","lbase","lext","dbase","dext","inftrees","lens","lens_index","codes","table_index","work","incr","low","mask","here_bits","here_op","here_val","drop","used","huff","base_index","MAXBITS","offs","extra_index","Z_FINISH$1","Z_OK$1","Z_STREAM_END$1","Z_NEED_DICT$1","Z_STREAM_ERROR$1","Z_DATA_ERROR$1","Z_MEM_ERROR$1","zswap32","InflateState","havedict","flags","check","total","wbits","ncode","nlen","ndist","have","lendyn","distdyn","back","was","lenfix","distfix","inflateResetKeep","inflateReset","inflateReset2","inflateInit2","virgin","fixedtables","updatewindow","src","inflate_1$2","inflateInit","inflate","put","last_bits","last_op","last_val","hbuf","inf_leave","xflags","extra_len","inflateEnd","inflateGetHeader","inflateSetDictionary","inflateInfo","gzheader","Inflate$1","inflate$1","inflator","last_avail_out","next_out_utf8","tail","utf8str","inflate_1$1","Inflate","inflateRaw","ungzip","constants","inflate_1","DeflateDecoder","PackbitsDecoder","getInt8","getUint8","LercDecoder","samplesPerPixel","SamplesPerPixel","addCompression","bandInterleavedData","pixelInterleavedData","lengthPerSample","lercData","Lerc","interleavePixels","getDecoder","Compression","copyNewSize","resampleNearest","valueArrays","inWidth","inHeight","outWidth","outHeight","relX","relY","newArray","cy","cx","resampleBilinear","rawY","yl","yh","rawX","tx","xl","xh","ll","hl","lh","hh","resample","resampleNearestInterleaved","valueArray","samples","resampleBilinearInterleaved","resampleInterleaved","sum","arrayForType","format","needsNormalization","normalizeArray","inBuffer","samplesToTransfer","outArray","bitMask","bitsPerLine","lineBitOffset","pixelBitOffset","bitOffset","outIndex","innerBitOffset","getUint32","GeoTIFFImage","littleEndian","tiles","getWidth","getHeight","getTileWidth","getTileHeight","getSampleByteSize","sampleIndex","getInt16","getInt32","getFloat32","getFloat64","getSampleFormat","getBitsPerSample","poolOrDecoder","signal","numTilesPerRow","numTilesPerCol","byteCount","request","sampleFormat","getSamplesPerPixel","getBlockHeight","imageWindow","interleave","resampleMethod","minXTile","maxXTile","minYTile","maxYTile","windowWidth","bytesPerPixel","getBytesPerPixel","srcSampleOffsets","sampleReaders","getReaderForSample","promises","yTile","xTile","si","getTileOrStrip","tile","blockHeight","firstLine","firstCol","lastLine","lastCol","ymax","xmax","pixelOffset","windowCoordinate","resampled","wnd","pool","imageWindowWidth","imageWindowHeight","numPixels","getArrayForSample","_readRaster","enableAlpha","pi","PhotometricInterpretation","readRasters","subOptions","ColorMap","ModelTiepoint","tiePoints","GDAL_METADATA","xmlDom","items","GDAL_NODATA","modelTransformation","ModelTransformation","referenceImage","modelPixelScale","ModelPixelScale","getResolution","refResX","refResY","refResZ","GTRasterTypeGeoKey","origin","getOrigin","DataView64","_dataView","combined","isSafeInteger","isNegative","carrying","byte","DataSlice","sliceOffset","bigTiff","_sliceOffset","_littleEndian","_bigTiff","sliceTop","readUint32","readUint64","itemsToObject","fromEntries","parseHeaders","kv","parseContentType","rawContentType","param","parseContentRange","rawContentRange","parseByteRanges","responseArrayBuffer","boundary","decoder","startBoundary","endBoundary","innerText","endOfHeaders","startOfData","fileSize","Block","BlockGroup","blockIds","BlockedSource","blockSize","cacheSize","blockCache","LRUCache","blockRequests","blockIdsToFetch","abortedBlockIds","slices","missingBlockIds","allBlockIds","firstBlockOffset","current","blockId","wait","fetchBlocks","missingRequests","allSettled","abortedBlockRequests","aborted","AbortError","failedBlocks","AggregateError","requiredBlocks","zip","readSliceData","groups","groupBlocks","groupRequests","groupIndex","group","response","blockOffset","del","sortedBlockIds","lastBlockId","blockIdLow","blockIdHigh","sliceData","sliceView","blockInnerOffset","rangeInnerOffset","usedBlockLength","blockView","BaseSource","FetchResponse","BaseResponse","FetchClient","credentials","BaseClient","XHRResponse","xhr","getResponseHeader","XHRClient","XMLHttpRequest","open","responseType","entries","setRequestHeader","onload","onerror","onabort","send","abort","addEventListener","constructRequest","RemoteSource","client","maxRanges","allowFullFile","_fileSize","fetchSlices","fetchSlice","Range","ok","getHeader","getData","byteRanges","maybeWrapInBlockedSource","makeFetchSource","blockOptions","makeXHRSource","makeHttpSource","HttpClient","makeRemoteSource","forceXHR","clientOptions","FileReaderSource","file","blob","FileReader","readAsArrayBuffer","makeFileReaderSource","tagName2Code","geoKeyName2Code","name2code","_binBE","nextZero","oincr","readUshort","buff","readShort","ui8","i16","readInt","i32","readUint","ui32","readASCII","readFloat","times","fl32","readDouble","fl64","writeUshort","writeUint","writeASCII","writeDouble","getFieldTypeLength","fieldType","ASCII","SBYTE","UNDEFINED","SSHORT","LONG","SLONG","IFD","RATIONAL","SRATIONAL","LONG8","SLONG8","IFD8","parseGeoKeyDirectory","rawGeoKeyDirectory","GeoKeyDirectory","geoKeyDirectory","location","getValues","dataSlice","readMethod","fieldTypeLength","readUint8","readInt8","readInt16","readInt32","readInt64","readFloat32","readFloat64","ImageFileDirectory","nextIFDByteOffset","GeoTIFFImageIndexError","GeoTIFFBase","resX","resY","bbox","getImage","firstImage","usedImage","getImageCount","imageCount","imgBBox","getBoundingBox","oX","oY","rX","rY","usedBBox","allImages","image","subfileType","SubfileType","newSubfileType","NewSubfileType","imgResX","imgResY","imageResX","imageResY","GeoTIFF","firstIFDOffset","ifdRequests","ghostValues","fallbackSize","entrySize","offsetSize","getSlice","numDirEntries","byteSize","covers","entryCount","fieldTag","typeCount","fieldValues","valueOffset","actualOffset","readOffset","fieldDataSlice","parseFileDirectoryAt","requestIFD","previousIfd","ifd","hasNext","heuristicAreaSize","detectionString","valuesString","metadataSize","fullString","close","headerData","BOM","magicNumber","getUint64","fromUrl","fromSource","fromBlob","RENDERING_MODES","RENDERING_MODES2","channels$1","defines","SAMPLER_TYPE","COLORMAP_FUNCTION","DEFAULT_COLOR_OFF","MAX_CHANNELS","DTYPE_VALUES","Uint8","GL","dataFormat","sampler","Uint16","Uint32","Float32","Int8","Int16","Int32","Float64","cast","COLORMAPS","padWithDefault","defaultValue","padWidth","getDtypeValues","valid","padContrastLimits","contrastLimits","channelsVisible","maxSliderValue","newContrastLimits","slider","padSize","lengths","acc","getPhysicalSizeScalingMatrix","loader","physicalSizes","Matrix4","coreShaderModule","validateWebGL2Filter","interpolation","canShowFloat","hasFeature","FEATURES","TEXTURE_FLOAT","canShowLinear","TEXTURE_FILTER_LINEAR_FLOAT","getRenderingAttrs$1","shaderModule","isLinear","upgradedShaderModule","defaultProps$b","pickable","channelData","XRLayer","extensionDefinesDeckglProcessIntensity","_isHookDefinedByExtensions","newChannelsModule","inject","project32","picking","hookName","extensions","some","shaders","getShaders","definesInjection","moduleDefinesInjection","pixelStorei","getAttributeManager","use64bitPositions","calculatePositions","noAlloc","setState","numInstances","programManager","ProgramManager","getDefaultProgramManager","mutateStr","processStr","_hookFunctions","addShaderHook","textures","tex","oldProps","changeFlags","rest","extensionsChanged","model","_getModel","invalidateAll","loadChannelTextures","attributeManager","invalidate","Model","Geometry","drawMode","isInstanced","numTextures","paddedContrastLimits","setUniforms","draw","channel0","channel1","channel2","channel3","channel4","channel5","dataToTexture","Texture2D","mipmaps","Layer","layerName","PHOTOMETRIC_INTERPRETATIONS","WhiteIsZero","BlackIsZero","Palette","TransparencyMask","CMYK","YCbCr","CIELab","ICCLab","defaultProps$a","BitmapLayer$1","BitmapLayerWrapper","photometricInterpretationShader","photometricInterpretation","transparentColorInHook","useTransparentColor","transparentColorVector","getPhotometricInterpretationShader","BitmapLayer","transparentColor","getTransparentColor","CompositeLayer","getChannelStats","mean","sumSquared","firstQuartileLocation","thirdQuartileLocation","median","q1","q3","cutoffArr","topCutoffLocation","bottomCutoffLocation","intToRgba","int","isInteger","setInt32","isInterleaved","lastDimSize","getLabels","dimOrder","reverse","getDims","labels","lookup","getImageSize","interleaved","prevPowerOf2","defaultProps$9","renderSubLayers","tileSize","tileId","viewportId","MultiscaleImageLayerBase","tileset","_viewport","TileLayer","COLOR_PALETTE","getDefaultPalette","padColors","colors","newColors","defaultProps$8","lensEnabled","lensSelection","lensRadius","lensBorderColor","lensBorderRadius","LensExtension","getCurrentLayer","isComposite","onMouseMove","mousePosition","layerView","deck","viewManager","views","makeViewport","containsPixel","offsetMousePosition","unprojectLensBounds","eventManager","pointermove","pointerleave","wheel","leftMouseBound","bottomMouseBound","rightMouseBound","topMouseBound","leftMouseBoundScaled","bottomMouseBoundScaled","rightMouseBoundScaled","topMouseBoundScaled","majorLensAxis","minorLensAxis","lensCenter","selections","LayerExtension","extensionName","colorPalette","defaultProps$7","opacity","ColorPaletteExtension","additiveColormap","defaultProps$6","colormap","AdditiveColormapExtension","defaultProps$5","getRaster","onClick","onViewportLoad","ImageLayer","abortController","loaderChanged","selectionsChanged","AbortController","dataPromises","rasters","catch","sourceLayer","defaultProps$4","onHover","maxRequests","refinementStrategy","excludeBackground","MultiscaleImageLayer","onTileError","getTileData","getTile","tiledLayer","zoomOffset","getScale","updateTriggers","lowestResolution","implementsGetRaster","layerModelMatrix","visible","defaultProps$3","getRasterSize","boundingBox","boundingBoxColor","boundingBoxOutlineWidth","viewportOutlineColor","viewportOutlineWidth","overviewScale","OverviewLayer","PolygonLayer","getPolygon","filled","stroked","getLineColor","getLineWidth","getVivId","makeBoundingBox","OrthographicView","getDefaultInitialViewState","viewSize","zoomBackOff","use3d","physicalSizeScalingMatrix","loaderInitialViewState","transformPoint","ScaleBarLayer","barLength","barHeight","numUnits","viewLength","yCoord","xLeftCoord","LineLayer","getSourcePosition","getTargetPosition","getColor","TextLayer","getSize","fontFamily","sizeUnits","sizeScale","characterSet","channels","RENDERING_MODES_BLEND","MAX_INTENSITY_PROJECTION","_BEFORE_RENDER","_RENDER","_AFTER_RENDER","MIN_INTENSITY_PROJECTION","ADDITIVE","RENDERING_MODES_COLORMAP","CUBE_STRIP","defaultProps$1","xSlice","ySlice","zSlice","clippingPlanes","renderingMode","resolutionMatrix","getRenderingAttrs","XR3DLayer","channelsModules","discardColormaps","discardRegex","removeExtraColormapFunctionsFromShader","NUM_PLANES","loadTexture","scaleMatrix","viewMatrixInverse","paddedColors","invertedScaleMatrix","invertedResolutionMatrix","paddedClippingPlanes","transform","Plane","plane","distances","distance","eye_pos","volume0","volume1","volume2","volume3","volume4","volume5","Texture3D","onUpdate","downsampleDepth","depthDownsampled","rasterSize","TypedArray","globalThis","volumeData","depthSelection","rasterData","volIndex","rasterIndex","getTextLayer","useProgressIndicator","useWebGL1Warning","VolumeLayer","resolutionChanged","clearState","totalRequests","volumePromises","getVolume","volumes","volume","_jsxFileName$3","OverviewState","PureComponent","OFFSETS_PROXY_KEY","Controller","checkProxies","tiff","proxyFlag","isProxy","createOffsetsProxy","offsets","encodedJs","Blob","atob","WorkerWrapper","objURL","webkitURL","createObjectURL","Worker","revokeObjectURL","defaultPoolSize","navigator","hardwareConcurrency","Pool","workers","idleWorkers","waitQueue","waitForWorker","currentWorker","onmessage","finishTask","postMessage","idleWorker","waiter","terminate","PARSER_OPTIONS","attributeNamePrefix","attrNodeName","parseNodeValue","parseAttributeValue","ignoreAttributes","fromString","OME","Image","img","Channels","Pixels","Channel","attr","Color","AquisitionDate","Description","sizes","SizeX","SizeY","Type","SizeZ","SizeT","SizeC","TiffPixelSource","_indexer","_readRasters","_getTileExtent","zoomLevelHeight","zoomLevelWidth","maxXTileCoord","maxYTileCoord","getOmeLegacyIndexer","rootMeta","imgMeta","ifdIndexer","getOmeIFDIndexer","sel","pyramidLevel","pyramidIndex","getOmeSubIFDIndexer","ifdCache","baseImage","subIfdOffset","DimensionOrder","DTYPE_LOOKUP$1","uint8","uint16","uint32","float","double","int8","int16","int32","getOmePixelSourceMeta","dims","Interleaved","getShape","PhysicalSizeX","PhysicalSizeY","PhysicalSizeXUnit","PhysicalSizeYUnit","PhysicalSizeZ","PhysicalSizeZUnit","guessTileSize$1","load$2","ImageDescription","omexml","levels","pyramidIndexer","loadOmeTiff","loadMultiscales","grp","rootAttrs","paths","multiscales","datasets","axes","path2","guessTileSize","yChunk","xChunk","DTYPE_LOOKUP","u4","f4","f8","i4","ZarrPixelSource","getIndexer","_data","xChunkSize","_xIndex","yChunkSize","_readChunks","xStart","xStop","yStart","yStop","_chunkIndex","getRaw","getRawChunk","_getSlices","suffix","load","pyramid","loadOmeZarr","Class","_cache","Function","Wrapper","isPureObject","isAsyncIterable","isIterator","isResponse","isBlob","isReadableStream","ReadableStream","isReadableDOMStream","isReadableNodeStream","ix","iy","iz","iw","expectedEnding","iterable","oldObj","newObj","numTimes","captureStackTrace","errors","feature","geom","properties","feat","point","coordinates","polygon","coordinates_1","ring","lineString","featureCollection","features","fc","multiLineString","multiPoint","multiPolygon","radiansToLength","factor","factors","lengthToRadians","radiansToDegrees","num","earthRadius","centimeters","centimetres","feet","inches","kilometers","kilometres","metres","miles","millimeters","millimetres","nauticalmiles","yards","unitsFactors","areaFactors","acres","points","polygons","lineStrings","geometryCollection","geometries","multiplier","lengthToDegrees","bearingToAzimuth","degreesToRadians","convertLength","originalUnit","finalUnit","convertArea","area","startFactor","finalFactor","validateBBox","validateId","radians2degrees","degrees2radians","distanceToDegrees","distanceToRadians","radiansToDistance","bearingToAngle","convertDistance","decomposeColor","re","hexToRgb","recomposeColor","getContrastRatio","foreground","background","lumA","getLuminance","lumB","rgb","hslToRgb","toFixed","alpha","darken","coefficient","lighten","hasOwn","classNames","argType","inner","useEnhancedEffect","useEventCallback","ownerDocument","negate","transformMat2","transformMat2d","D_CODES","LITERALS","LENGTH_CODES","L_CODES","BL_CODES","_tr_init$1","_tr_flush_block$1","_tr_tally$1","_tr_align$1","Z_FIXED$1","Z_UNKNOWN$1","MIN_MATCH$1","HEAP_SIZE$1","deflate_1","Deflate","deflate$1","deflator","deflate_1$1","deflateRaw","_a","pako","__toBinary","versions","base64","c0","c1","c3","initEmscriptenModule","moduleFactory","noInitialRun","wasmBinary","blosc_codec","aa","ba","ready","ca","print","printErr","thisProgram","noExitRuntime","ea","fa","ha","qa","ra","ja","ka","la","ma","na","oa","pa","sa","HEAP8","HEAP16","HEAP32","HEAPU8","HEAPU16","HEAPU32","HEAPF32","HEAPF64","ta","INITIAL_MEMORY","wasmMemory","Memory","initial","maximum","ua","va","wa","xa","ya","preRun","unshift","J","K","onAbort","RuntimeError","Aa","Ba","preloadedImages","preloadedAudios","Ca","locateFile","Da","T","O","Ea","W","V","Fa","Ga","P","Ha","Ia","Ja","stack","Ka","La","U","Na","Qa","Ra","Sa","fromWireType","Ta","Ua","Wa","Ya","Xa","ab","$a","bb","db","fb","gb","hb","ib","USER","LOGNAME","PATH","PWD","HOME","LANG","languages","jb","kb","BindingError","InternalError","count_emval_handles","get_first_emval","UnboundTypeError","lb","mb","toWireType","argPackAdvance","readValueFromPointer","Za","eb","Ma","Oa","Pa","Va","ia","copyWithin","grow","asm","monitorRunDependencies","instantiateWasm","___wasm_call_ctors","_malloc","_free","___getTypeName","ob","calledRun","onRuntimeInitialized","postRun","setStatus","___embind_register_native_and_builtin_types","dynCall_jiiiii","dynCall_jiji","nb","preInit","wasmSrc","BloscShuffle","Zlib","codecId","GZip","Blosc","isWebGL","WebGLRenderingContext","getWebGL2Context","assertWebGLContext","assertWebGL2Context","_toArray","_Alpha","_Checkboard","_EditableInput","_Hue","_Raised","_Saturation","_ColorWrap","_Swatch","radiusUnits","cellSize","extruded","coverage","elevationScale","edgeDistance","isWireframe","GridCellLayer","dirname","slashIndex","separator","part","loggers","register","eventType","deckLog","LIFECYCLE","NO_STATE","MATCHED","INITIALIZED","AWAITING_GC","AWAITING_FINALIZATION","FINALIZED","PROP_SYMBOLS","COMPONENT","ASYNC_DEFAULTS","ASYNC_ORIGINAL","ASYNC_RESOLVED","position1","position2","DEFAULT_GUIDES","DEFAULT_TOOLTIPS","GeoJsonEditMode","getSelectedFeature","mapCoords","getGuides","picks","pickedFeatures","getNonGuidePicks","pickedHandles","getPickedEditHandles","pickedIndexes","featureOrGeometry","featureOrGeometryAsAny","rewindFeature","rewindPolygon","updatedData","ImmutableFeatureCollection","editType","editContext","featureIndexes","featuresToAdd","initialIndex","updatedIndexes","geometryAsAny","selectedFeature","modeConfig","updatedGeometry","featureIndex","getAddFeatureAction","tentativeFeature","createTentativeFeature","DEPRECATED_PROPS","normalized","integer","instanced","PROP_CHECKS_INITIALIZE","removedProps","replacedProps","deprecatedProps","PROP_CHECKS_SET_PROPS","Accessor","checkProps","initialize","srcOffset","writeOffset","sourceBuffer","dstData","srcByteOffset","dstOffset","ArrayType","getTypedArrayFromGLType","clamped","sourceAvailableElementCount","_getAvailableElementCount","dstElementOffset","dstAvailableElementCount","dstElementCount","copyElementCount","isIndexedBuffer","changed","getGLTypeFromTypedArray","usage","sourceElementOffset","getElementCount","getBufferParameter","reallocate","INTERSECTION","OUTSIDE","INTERSECTING","INSIDE","fromObject","arrayOrObject","toObject","formatString","minVector","maxVector","subtract","addScalar","distanceSquared","mathArray","vec3_transformMat4AsVector","ORIGIN","Vector3","transformAsPoint","vec3_transformMat2","scratchVector","scratchNormal","minimum","AxisAlignedBoundingBox","halfDiagonal","distanceSquaredTo","scratchVector2","oppositeCorner","BoundingSphere","leftCenter","leftRadius","rightCenter","boundingSphere","rightRadius","toRightCenter","centerSeparation","halfDistanceBetweenTangentPoints","distanceTo","distanceToPlane","firstIndex","columnIndex","columnVector","INDICES","COL0ROW0","COL0ROW1","COL0ROW2","COL1ROW0","COL1ROW1","COL1ROW2","COL2ROW0","COL2ROW1","COL2ROW2","Matrix3","vec4_transformMat3","IDENTITY_QUATERNION","quat","fromAxisRotation","multiplyLeft","multiplyRight","scratchVector3","scratchOffset","scratchVectorU","scratchVectorV","scratchVectorW","scratchCorner","scratchToCenter","MATRIX3","halfAxes","quaternionObject","directionsMatrix","halfSize","OrientedBoundingBox","cornerVector","normalX","normalY","normalZ","radEffective","uHalf","vHalf","wHalf","minDist","maxDist","corner","toCenter","xAxis","getColumn","yAxis","zAxis","normXAxis","normYAxis","normZAxis","scratchPosition","fromPointNormal","pointDistance","getPointDistance","scaledNormal","faces","scratchPlaneCenter","scratchPlaneNormal","planes","planeIndex","plane0","plane1","plane0Center","faceNormal","plane1Center","negatedFaceNormal","intersect","boundingVolume","parentPlaneMask","CullingVolume","flag","COL0ROW3","COL1ROW3","COL2ROW3","COL3ROW0","COL3ROW1","COL3ROW2","COL3ROW3","scratchMatrix","scratchUnitary","scratchDiagonal","jMatrix","jMatrixTranspose","computeEigenDecomposition","EIGEN_TOLERANCE","_MathUtils","EIGEN_MAX_SWEEPS","sweep","unitaryMatrix","diagonalMatrix","computeFrobeniusNorm","offDiagonalFrobeniusNorm","shurDecomposition","norm","temp","rowVal","colVal","tolerance","maxDiagonal","rotAxis","tau","scratchVector4","scratchVector5","scratchVector6","scratchCovarianceResult","scratchEigenResult","diagonal","unitary","makeOrientedBoundingBoxFromPoints","meanPoint","invLength","exx","exy","exz","eyy","eyz","ezz","covarianceMatrix","rotation","l1","l2","l3","createRange","sourceKeys","createMat4","getCameraPosition","getFrustumPlanes","viewProjectionMatrix","getFrustumPlane","toDoublePrecisionArray","typedArray","endIndex","scratchArray","sourceIndex","targetIndex","baseClamp","number","lower","upper","WINDING","CLOCKWISE","COUNTER_CLOCKWISE","modifyPolygonWindingDirection","windingDirection","getPolygonWindingDirection","reversePolygon","getPolygonSignedArea","dim","numPoints","numSwaps","earcut","holeIndices","areas","hasHoles","outerLen","outerNode","linkedList","triangles","getLeftmost","eliminateHole","filterPoints","eliminateHoles","minX","maxX","minY","maxY","invSize","earcutLinked","clockwise","insertNode","removeNode","again","ear","zOrder","inSize","numMerges","pSize","qSize","sortLinked","indexCurve","isEarHashed","isEar","cureLocalIntersections","splitEarcut","pointInTriangle","minTX","minTY","maxTX","maxTY","minZ","maxZ","intersects","locallyInside","isValidDiagonal","splitPolygon","compareX","hole","hx","hy","mx","my","tanMin","sectorContainsSector","findHoleBridge","leftmost","px","py","intersectsPolygon","inside","middleInside","p1","p2","q2","o1","o2","o3","o4","onSegment","Node","an","bp","isDuplicate","startI","edge","snap","bitCode","cutPolylineByGrid","broken","gridResolution","gridOffset","getPointAtIndex","cell","getGridCell","scratchPoint","codeB","codeAlt","moveToNeighborCell","concatInPlace","arr1","arr2","cutPolygonByGrid","edgeTypes","types","holes","bisectPolygon","polygonLow","polygonHigh","resultLow","resultHigh","typesLow","typesHigh","prevSide","prevType","lowPointCount","highPointCount","side","cutPolylineByMercatorBounds","newPositions","wrapLongitudesForShortestPath","shiftLongitudesIntoRange","cutPolygonByMercatorBounds","newHoleIndices","srcStartIndex","ringIndex","srcEndIndex","targetStartIndex","splitIndex","findSplitIndex","insertPoleVertices","maxLat","pointIndex","firstLng","lastLng","prevLng","pointCount","refLng","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","fun","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","runClearTimeout","Item","noop","nextTick","title","browser","env","argv","prependListener","prependOnceListener","binding","cwd","chdir","umask","_construct","Parent","ERR_RESOURCE_METHOD_UNDEFINED","userData","_handle","deleteChildren","_deleteHandle","funcOrHandle","pname","getKeyValue","PARAMETERS","parameter","isWebgl2","parameterAvailable","getExtension","webgl1Default","webgl2Default","_getParameter","parameterKeys","getKey","getParameter","stubRemovedMethods","className","stats","lumaStats","_assign","_assign2","ZERO_VECTOR","DEFAULT_DISTANCE_SCALES","projectFlat","unprojectFlat","_frustumPlanes","orthographic","isGeospatial","_getCenterInWorld","commonPosition","_createProjectionMatrix","viewportMatrix","Viewport","_defineProperty2","defaultColor","recursivelyTraverseNestedArrays","pt","ddistance","lineBearing","orthogonalBearing","isPointToLeftOfLine","p3","p4","wmViewport","projectedCoords","inPoint","minDistance","minPointInfo","div","lineLength","distance2d","startToPointLength","mercator","closestPoint","pointCoords","lineCoordinates","pointCoordinate","slope","inverseSlope","rl2","ln2","lnm12","dist2","calcrl2","segmentIdx","dx","dy","snapPoint","idx","pixelToLatLong","handles","handle","pick","editHandleType","guideType","positionIndexes","getEditHandlesForCoordinates","editHandles","componentWillMount","getDerivedStateFromProps","componentWillReceiveProps","nextProps","prevState","componentWillUpdate","nextState","prevProps","__reactInternalSnapshotFlag","__reactInternalSnapshot","getSnapshotBeforeUpdate","polyfill","isReactComponent","foundWillMountName","foundWillReceivePropsName","foundWillUpdateName","UNSAFE_componentWillMount","UNSAFE_componentWillReceiveProps","UNSAFE_componentWillUpdate","componentName","newApiName","componentDidUpdate","maybeSnapshot","snapshot","__suppressDeprecationWarning","plainObjectConstrurctor","cloneStyle","style","newStyle","createRule","decl","jss","declCopy","rule","plugins","onCreateRule","toCssValue","ignoreImportant","cssValue","getWhitespaceSymbols","linebreak","space","indentStr","indent","toCss","selector","_options$indent","fallbacks","_getWhitespaceSymbols","prop","_prop","_value","_prop2","_value2","allowEmpty","escapeRegex","nativeEscape","CSS","escape","BaseStyleRule","isProcessed","sheet","Renderer","force","newValue","onChangeValue","isEmpty","isDefined","remove","renderable","removeProperty","setProperty","attached","StyleRule","_BaseStyleRule","_this","scoped","generateId","selectorText","_inheritsLoose","_proto2","applyTo","json","toJSON","link","setSelector","replaceRule","pluginStyleRule","defaultToStringOptions","atRegExp","ConditionalRule","styles","atMatch","at","query","rules","RuleList","_proto","getRule","addRule","onProcessRule","keyRegExp","pluginConditionalRule","defaultToStringOptions$1","nameRegExp","KeyframesRule","nameMatch","keyRegExp$1","refRegExp","findReferencedKeyframe","keyframes","replaceRef","refKeyframe","pluginKeyframesRule","onProcessStyle","KeyframeRule","pluginKeyframeRule","FontFaceRule","keyRegExp$2","pluginFontFaceRule","ViewportRule","pluginViewportRule","SimpleRule","keysMap","defaultUpdateOptions","forceUpdateOptions","counter","ruleOptions","_this$options","unregister","updateOne","_this$options2","nextValue","_nextValue","_prevValue","css","StyleSheet","deployed","attach","deploy","detach","insertRule","addRules","added","deleteRule","_this$rules","PluginsRegistry","internal","external","onProcessSheet","processedValue","use","newPlugin","plugin","sheets","SheetsRegistry","reset","_temp","_objectWithoutPropertiesLoose","globalThis$1","ns","moduleId","createGenerateId","ruleCounter","jssId","minify","memoize","getPropertyValue","cssRule","attributeStyleMap","getHead","querySelector","findPrevNode","insertionPoint","findHigherSheet","parentNode","findHighestSheet","nextSibling","childNodes","nodeType","nodeValue","findCommentNode","getNonce","getAttribute","_insertRule","container","appendRule","cssRules","getValidRuleInsertionIndex","maxIndex","DomRenderer","hasInsertedRules","media","el","textContent","createStyle","setAttribute","nonce","nextNode","insertBefore","insertionPointElement","appendChild","insertStyle","removeChild","insertRules","nativeParent","latestNativeParent","_insertionIndex","refCssRule","ruleStr","insertionIndex","nativeRule","getRules","instanceCounter","Jss","isInBrowser","setup","createStyleSheet","removeStyleSheet","createJss","hasCSSTOMSupport","getDynamicStyles","extracted","padArrayChunk","sourceLength","targetLength","datum","DEFAULT_TRANSITION_SETTINGS","easing","spring","stiffness","damping","normalizeTransitionSettings","userSettings","layerSettings","getSourceBufferAttribute","getAttributeTypeFromSize","cycleBuffers","buffers","getAttributeBufferLength","doublePrecision","settings","padBuffer","precisionMultiplier","toStartIndices","hasStartIndices","fromStartIndices","toLength","isConstant","fromLength","toData","getMissingData","targetStartIndices","getChunkData","sourceStartIndices","nextSourceIndex","nextTargetIndex","padArray","helpers_1","getCoord","getCoords","containsNumber","geojsonType","featureOf","collectionOf","getGeom","geojson","getType","MAX_LENGTH","parseOptions","compareIdentifiers","SemVer","loose","includePrerelease","LOOSE","FULL","patch","prerelease","build","compareMain","comparePre","release","identifier","inc","nativeMax","nativeMin","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","thisArg","leadingEdge","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","uidCounters","cosh","sinh","parser_exit","SyntaxError","logHypot","_b","atan2","Complex","tokens","plus","minus","loh","im","cosm1","t2","noIM","oneMinus","onePlus","atanh","asinh","acosh","places","invariant_1","coordinates1","coordinates2","dLat","dLon","lat1","lat2","SvgIcon","_props$color","_props$component","_props$fontSize","fontSize","htmlColor","titleAccess","_props$viewBox","viewBox","clsx","focusable","role","muiName","userSelect","display","flexShrink","typography","pxToRem","transition","transitions","shorter","colorPrimary","palette","primary","main","colorSecondary","secondary","colorAction","action","active","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeLarge","createSvgIcon","memo","useThemeWithoutDefault","EMPTY_ARRAY","placeholderArray","createIterable","startRow","endRow","objectInfo","getAccessorFromBuffer","nested","bytesPerElement","elementStride","elementOffset","startIndices","arrayOrType","glType","flipRows","bytesPerRow","topOffset","bottomOffset","newWidth","newHeight","newData","REF_POINTS_5","REF_POINTS_9","REF_POINTS_11","getBoundingVolume","elevationBounds","insideBounds","cullingVolume","refPoints","refPointPositions","osmTile2lngLat","zRange","originX","worldOffset","originY","OSMNode","DEFAULT_EXTENT","urlType","validate","propType","value1","value2","transformBox","transformedCoords","getURLFromTemplate","template","tile2XY","tileToBoundingBox","north","south","getIdentityTileIndices","modelMatrixInverse","getIndexingCoords","bounds0","bounds1","getTileIndices","transformedExtent","elevationMin","elevationMax","minLng","maxLng","traversalParams","getOSMTileIndices","isURLTemplate","compileSchema","Cache","SchemaObject","stableStringify","formats","$dataMetaSchema","util","Ajv","schemaKeyRef","getSchema","schemaObj","_addSchema","_compile","$async","compile","schema","_meta","addSchema","_skipValidation","_getId","checkUnique","normalizeId","_schemas","addMetaSchema","skipValidation","validateSchema","throwOrLogError","$schema","_opts","defaultMeta","META_SCHEMA_ID","errorsText","keyRef","_getSchemaObj","baseId","_fragments","fragment","_getSchemaFragment","removeSchema","_removeAllSchemas","_refs","cacheKey","serialize","addFormat","_formats","dataVar","dataPath","shouldAddSchema","cached","addUsedSchema","recursiveMeta","willValidate","localRefs","ids","compiling","callValidate","currentOpts","_metaOpts","refs","refVal","_validate","compileAsync","customKeyword","addKeyword","getKeyword","removeKeyword","validateKeyword","errorClasses","ValidationError","Validation","MissingRefError","MissingRef","META_IGNORE_OPTIONS","META_SUPPORT_DATA","setLogger","_loadingSchemas","_compilations","RULES","schemaId","_get$IdOrId","_get$Id","chooseGetId","loopRequired","errorDataPath","_errorDataPathProperty","metaOpts","getMetaSchemaOptions","addInitialFormats","keywords","keyword","addInitialKeywords","$dataSchema","$data","$id","metaSchema","addDefaultMetaSchema","nullable","optsSchemas","schemas","addInitialSchemas","regex","libh3","Module","moduleOverrides","arguments_","scriptDirectory","readAsync","tryParseAsDataURI","tempRet0","getTempRet0","ABORT","toC","maxBytesToWrite","startIdx","endIdx","outIdx","outU8Array","stringToUTF8Array","stringToUTF8","stackAlloc","writeArrayToMemory","getCFunc","cArgs","converter","argTypes","stackSave","returnType","UTF8ToString","convertReturnValue","stackRestore","UTF8Decoder","ptr","endPtr","u8Array","u0","ch","UTF8ArrayToString","INITIAL_TOTAL_MEMORY","callbacks","updateGlobalBufferAndViews","DYNAMICTOP_PTR","__ATPRERUN__","__ATINIT__","__ATMAIN__","__ATPOSTRUN__","Math_abs","Math_ceil","Math_floor","Math_min","runDependencies","runDependencyWatcher","dependenciesFulfilled","memoryInitializer","dataURIPrefix","filename","newBuffer","_emscripten_replace_memory","decodeBase64","keyStr","chr1","enc1","enc2","chr2","enc3","chr3","enc4","isDataURI","intArrayFromBase64","gd","Xc","Wc","Eb","ad","bd","Kb","Qb","cd","Mb","Ob","Lb","za","Rb","Zb","Ub","Vb","Zc","Uc","Ic","Hc","Ec","Fc","Gc","sc","Db","Pb","Sb","Tb","Bb","zb","Jc","Kc","Vc","kc","Nb","tc","hd","Tc","Sc","_c","Yc","$c","___uremdi3","_bitshift64Lshr","_bitshift64Shl","_calloc","_cellAreaKm2","sb","_cellAreaM2","_cellAreaRads2","_compact","fd","_destroyLinkedPolygon","_edgeLengthKm","_edgeLengthM","_exactEdgeLengthKm","_exactEdgeLengthM","_exactEdgeLengthRads","_experimentalH3ToLocalIj","_experimentalLocalIjToH3","mc","_geoToH3","_getDestinationH3IndexFromUnidirectionalEdge","_getH3IndexesFromUnidirectionalEdge","_getH3UnidirectionalEdge","_getH3UnidirectionalEdgeBoundary","_getH3UnidirectionalEdgesFromHexagon","_getOriginH3IndexFromUnidirectionalEdge","_getPentagonIndexes","_getRes0Indexes","_h3Distance","_h3GetBaseCell","_h3GetFaces","Xb","_h3IndexesAreNeighbors","_h3IsPentagon","_h3IsResClassIII","_h3IsValid","_h3Line","ed","_h3LineSize","_h3SetToLinkedGeo","Lc","Qc","Oc","Pc","Nc","jc","Mc","gc","hc","Rc","_h3ToCenterChild","_h3ToChildren","_h3ToGeo","_h3ToGeoBoundary","_h3ToParent","_h3UnidirectionalEdgeIsValid","Ab","_hexAreaKm2","_hexAreaM2","_hexRing","_i64Subtract","_kRing","_kRingDistances","_llvm_minnum_f64","_llvm_round_f64","_maxFaceCount","_maxH3ToChildrenSize","_maxKringSize","_maxPolyfillSize","uc","_maxUncompactSize","_memcpy","_memset","_numHexagons","_pentagonIndexCount","_pointDistKm","_pointDistM","_pointDistRads","_polyfill","vc","_res0IndexCount","_round","_sbrk","_sizeOfCoordIJ","_sizeOfGeoBoundary","_sizeOfGeoCoord","_sizeOfGeoPolygon","_sizeOfGeofence","_sizeOfH3Index","_sizeOfLinkedGeoPolygon","_uncompact","establishStackSpace","oldSize","_emscripten_get_heap_size","requestedSize","newSize","alignUp","emscripten_realloc_buffer","js","jsStackTrace","demangleAll","numericArgs","numericRet","ccall","ident","tempI64","tempDouble","applyMemoryInitializer","removeRunDependency","doBrowserLoad","memoryInitializerBytes","useRequest","callRuntimeCallbacks","addOnPostRun","addOnPreRun","doRun","what","runCaller","NUMBER","const","H3","BINDINGS","def","cwrap","SZ_H3INDEX","SZ_GEOCOORD","SZ_GEOBOUNDARY","SZ_GEOPOLYGON","SZ_GEOFENCE","SZ_LINKED_GEOPOLYGON","SZ_COORDIJ","m2","km","km2","rads","rads2","validateRes","INVALID_HEXIDECIMAL_CHAR","h3IndexToSplitLong","h3Index","hexFrom32Bit","tempStr","zeroPad","splitLongToh3Index","fullLen","numStr","numZeroes","outStr","polygonArrayToGeofence","polygonArray","geofence","isGeoJson","numVerts","geoCoordArray","latIndex","lngIndex","readLong","invocation","readH3Index","readH3IndexFromPointer","cAddress","SZ_INT","storeH3Index","readArrayOfHexagons","maxCount","storeArrayOfHexagons","hexagons","storeGeoCoord","geoCoord","readSingleCoord","radsToDegs","readGeoCoord","readGeoCoordGeoJson","readGeoBoundary","geoBoundary","geoJsonCoords","closedLoop","vertsPos","readCoord","h3IsValid","h3IsPentagon","h3IsResClassIII","h3GetBaseCell","h3GetFaces","readArrayOfPositiveIntegers","h3GetResolution","geoToH3","latlng","h3ToGeo","h3ToGeoBoundary","formatAsGeoJson","h3ToParent","h3ToChildren","h3ToCenterChild","kRing","ringSize","kRingDistances","kRings","let","hexLower","hexUpper","hexRing","geoPolygon","numHoles","numHolesOffset","holesOffset","coordinatesToGeoPolygon","arrayLen","destroyGeoPolygon","h3SetToMultiPolygon","h3Indexes","indexCount","originalPolygon","loops","SZ_DBL","SZ_PTR","readMultiPolygon","compact","h3Set","compactedSet","uncompact","maxUncompactedNum","uncompactedSet","h3IndexesAreNeighbors","destination","oLower","oUpper","dLower","dUpper","getH3UnidirectionalEdge","getOriginH3IndexFromUnidirectionalEdge","edgeIndex","getDestinationH3IndexFromUnidirectionalEdge","h3UnidirectionalEdgeIsValid","getH3IndexesFromUnidirectionalEdge","getH3UnidirectionalEdgesFromHexagon","edges","getH3UnidirectionalEdgeBoundary","h3Distance","h3Line","experimentalH3ToLocalIj","ij","retVal","experimentalLocalIjToH3","storeCoordIJ","pointDist","latlng1","latlng2","coord2","cellArea","exactEdgeLength","hexArea","edgeLength","numHexagons","getRes0Indexes","getPentagonIndexes","degsToRads","deg","baseMerge","createAssigner","srcIndex","NPOT_MIN_FILTERS","WebGLBuffer","linearFiltering","supported","isFormatSupported","isLinearFilteringSupported","resolvedImageData","isVideo","HTMLVideoElement","border","recreate","pixelStore","textureUnit","compressed","_deduceParameters","video","lastTime","dataType","_getDataType","gl2","levelData","DATA_FORMAT_CHANNELS","channelSize","TYPE_SIZES","ndarray","textureFormat","TEXTURE_FORMATS","_deduceImageSize","ImageData","HTMLImageElement","naturalHeight","HTMLCanvasElement","ImageBitmap","videoHeight","getTexParameter","_getNPOTParam","isPowerOfTwo","vec2_transformMat4AsVector","vec4_transformMat2","_getRequireWildcardCache","WeakMap","hasPropertyDescriptor","_utils","formatSpecifier","specifier","FormatSpecifier","symbol","comma","formatDecimalParts","toExponential","prefixExponent","locale","formatPrefix","toLocaleString","toPrecision","formatRounded","prefixes","grouping","thousands","currencyPrefix","currency","currencySuffix","decimal","numerals","formatNumerals","percent","nan","newFormat","formatTypes","formatType","maybeSuffix","valuePrefix","valueSuffix","valueNegative","formatTrim","formatLocale","locale_dateTime","dateTime","locale_date","locale_time","locale_periods","periods","locale_weekdays","locale_shortWeekdays","shortDays","locale_months","months","locale_shortMonths","shortMonths","periodRe","formatRe","periodLookup","formatLookup","weekdayRe","weekdayLookup","shortWeekdayRe","shortWeekdayLookup","monthRe","monthLookup","shortMonthRe","shortMonthLookup","formatDayOfMonth","formatMicroseconds","formatYearISO","formatFullYearISO","formatHour24","formatHour12","formatDayOfYear","formatMilliseconds","formatMonthNumber","formatMinutes","formatUnixTimestamp","formatUnixTimestampSeconds","formatSeconds","formatWeekdayNumberMonday","formatWeekNumberSunday","formatWeekNumberISO","formatWeekdayNumberSunday","formatWeekNumberMonday","formatYear","formatFullYear","formatZone","formatLiteralPercent","utcFormats","formatUTCDayOfMonth","formatUTCMicroseconds","formatUTCYearISO","formatUTCFullYearISO","formatUTCHour24","formatUTCHour12","formatUTCDayOfYear","formatUTCMilliseconds","formatUTCMonthNumber","formatUTCMinutes","formatUTCSeconds","formatUTCWeekdayNumberMonday","formatUTCWeekNumberSunday","formatUTCWeekNumberISO","formatUTCWeekdayNumberSunday","formatUTCWeekNumberMonday","formatUTCYear","formatUTCFullYear","formatUTCZone","parses","parseSpecifier","parseDayOfMonth","parseMicroseconds","parseYear","parseFullYear","parseHour24","parseDayOfYear","parseMilliseconds","parseMonthNumber","parseMinutes","parseQuarter","parseUnixTimestamp","parseUnixTimestampSeconds","parseSeconds","parseWeekdayNumberMonday","parseWeekNumberSunday","parseWeekNumberISO","parseWeekdayNumberSunday","parseWeekNumberMonday","parseZone","parseLiteralPercent","pads","newParse","timeMonday","utcFormat","utcParse","timeFormat","timeParse","defaultNumberLocale","defaultTimeLocale","numberRe","percentRe","requoteRe","requote","timeSunday","dISO","timeThursday","dow","UTCdISO","spec","numberLocale","formatFloat","numberFormat","decimalChar","dec","rightmostDigit","formatSpan","precisionPrefix","precisionRound","precisionFixed","resetNumberFormatDefaultLocale","numberFormatLocale","definition","numberFormatDefaultLocale","timeMultiFormat","timeLocale","resetTimeFormatDefaultLocale","timeFormatLocale","timeFormatLocale$1","timeFormatDefaultLocale","defaultLocale","createLocale","numberSpec","timeSpec","resetDefaultLocale","globals","window_","process_","NO_TRANSITION_PROPS","LINEAR_TRANSITION_PROPS","transitionEasing","transitionInterruption","TRANSITION_EVENTS","BREAK","INERTIA_EASING","EVENT_TYPES","onViewStateChange","_onTransition","onStateChange","_setInteractionState","linearTransitionProps","transitionInterpolator","transitionProps","isDragging","handleEvent","ControllerState","_state","eventStartBlocked","_onPanStart","_onPan","_onPanEnd","_onPinchStart","_onPinch","_onPinchEnd","_onTriplePanStart","_onTriplePan","_onTriplePanEnd","_onDoubleTap","_onWheel","_onKeyDown","offsetCenter","srcEvent","_interactionState","_getTransitionProps","inertia","scrollZoom","dragPan","dragRotate","doubleClickZoom","touchZoom","touchRotate","keyboard","isInteractive","eventName","extraProps","interactionState","newControllerState","controllerState","oldViewState","getCenter","isPointInBounds","alternateMode","isFunctionKeyPressed","invertPan","dragMode","_panMove","_onPanMove","_onPanRotate","_onPanMoveEnd","_onPanRotateEnd","isPanning","endPos","isRotating","smooth","around","isZooming","rotateStart","zoomStart","_startPinchRotation","_lastPinchEvent","velocityZ","endScale","zoomEnd","isZoomOut","funcKey","rotateSpeedY","_transition","PERCENT_OR_PIXELS_REGEX","parsePosition","relative","viewportInstance","deepEqual","filterViewState","viewportDimensions","getDimensions","_getViewport","newViewState","ViewportType","DRAW_MODE","_calculateVertexCount","_print","attributeName","isIndexed","DEFAULT_ACCESSOR_VALUES","PROP_CHECKS","accessors","freeGlobal","freeSelf","helpers","coordEach","excludeWrapCoord","stopG","geometryMaybeCollection","isGeometryCollection","wrapShrink","coordIndex","isFeatureCollection","isFeature","geomIndex","multiFeatureIndex","geometryIndex","geomType","propEach","featureEach","geomEach","featureProperties","featureBBox","featureId","flattenEach","segmentEach","segmentIndex","previousCoords","previousFeatureIndex","previousMultiIndex","prevGeomIndex","currentCoord","featureIndexCoord","multiPartIndexCoord","currentSegment","lineEach","coordReduce","initialValue","previousValue","propReduce","currentProperties","featureReduce","currentFeature","coordAll","geomReduce","currentGeometry","flattenReduce","segmentReduce","started","lineReduce","currentLine","findSegment","findPoint","red","getContrastingColor","isValidHex","toState","simpleCheckForValidColor","_each2","_tinycolor2","passed","letter","oldHue","hex","hsl","toHsl","hsv","toHsv","toRgb","toHex","isValid","final","bear","calculateFinalBearing","lon1","lon2","Comparator","parseRange","isNullSet","isAny","comps","memoOpts","memoKey","hr","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","comparatorTrimReplace","TILDETRIM","tildeTrimReplace","CARETTRIM","caretTrimReplace","compRe","COMPARATORLOOSE","COMPARATOR","rangeList","comp","parseComparator","replaceGTE0","rangeMap","thisComparators","isSatisfiable","rangeComparators","thisComparator","rangeComparator","er","testSet","comparators","remainingComparators","testComparator","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","TILDELOOSE","TILDE","pr","replaceCaret","CARETLOOSE","CARET","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xp","anyX","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","tM","tm","tp","tpr","semver","ANY","allowed","equal","valueOf","flattenArray","fillArray","copied","that","later","rng","bytesToUuid","rnds","ii","overAlloc","poolSize","maxSize","_allocate","sizeToAllocate","reflow","scrollTop","getTransitionProps","_props$style","transitionDelay","GL_PARAMETER_DEFAULTS","enable","hint","GL_PARAMETER_SETTERS","getValue","glEnum","GL_COMPOSITE_PARAMETER_SETTERS","blendEquation","blendFunc","polygonOffset","sampleCoverage","stencilFuncFront","stencilFuncBack","stencilOpFront","stencilOpBack","GL_HOOKED_SETTERS","disable","bindFramebuffer","blendColor","blendEquationSeparate","modeAlpha","dst","blendFuncSeparate","dstAlpha","clearDepth","clearStencil","colorMask","cullFace","depthFunc","depthRange","zNear","depthMask","frontFace","face","lineWidth","scissor","stencilMask","stencilMaskSeparate","stencilFunc","stencilFuncSeparate","stencilOp","zpass","stencilOpSeparate","isEnabled","GL_PARAMETER_GETTERS","webpackPolyfill","deprecate","global_","deprecatedPropType","validator","updatedPosition","isPolygonal","immutablyReplacePosition","replaceGeometry","immutablyRemovePosition","holeIndex","removeHoleIfNecessary","prunePolygonIfNecessary","lineStringIndex","pruneMultiLineStringIfNecessary","polygonIndex","outerRing","pruneMultiPolygonIfNecessary","pruneGeometryIfNecessary","positionToAdd","immutablyAddPosition","updatedFeature","addFeatures","deleteFeatures","getUpdatedPosition","previousPosition","elevation","updated","installGetterOverride","functionName","originalGetterFunc","installSetterSpy","setter","originalSetterFunc","oldValue","installProgramSpy","originalUseProgram","getParameters","_updateCache","stateStack","oldValues","valueChanged","deepArrayEqual","polyfillContext","GLState","pushContextState","popContextState","useControlled","controlled","defaultProp","isControlled","_React$useState","valueState","setValue","colorBufferHalfFloat","Framebuffer","attachments","stencil","readBuffer","drawBuffers","_createDefaultAttachments","clearAttachments","resource","resizeAttachments","prevHandle","newAttachments","attachment","renderbuffer","_getFrameBufferStatus","clearBuffer","drawBuffer","_getAttachmentParameterFallback","getFramebufferAttachmentParameter","ATTACHMENT_PARAMETERS","getAttachmentParameter","attachmentName","getAttachmentParameters","copyToDataUrl","logLevel","targetMaxHeight","defaultAttachments","oldAttachment","mapIndexToCubeMapFace","caps","getFeatures","STATUS","DEFAULT_SETTINGS","onStart","onInterrupt","timeline","getTime","isFinished","aValue","bValue","createChainedFunction","funcs","_len2","_key2","formControlState","states","muiFormControl","useFormControl","FormControlContext","durationWeek","isWorker","isMobile","nameStartChar","nameRegexp","regexName","isExist","isEmptyObject","arrayMode","buildOptions","defaultOptions","newOptions","isTagNameInArrayMode","parentTagName","isName","getAllMatches","allmatches","lastIndex","isEqual","compute","cachedArgs","cachedResult","deepmerge","COMPOSITE_GL_TYPES","getPrimitiveDrawMode","decomposeCompositeGLType","compositeGLType","typeAndSize","getCompositeGLType","compType","compComponents","isLoaderObject","normalizeLoader","protocol_re","allowed_re","whitespace_re","uri","sanitize","href","localFile","http","fileAccess","isAllowed","stringValue","hasProtocol","baseURL","loadFile","isFile","defaultProtocol","rel","crossOrigin","fileLoader","accept","readFile","fileReject","httpLoader","statusText","httpReject","typeParsers","boolean","unknown","typeTests","typeList","inferType","inferTypes","delimitedFormat","delimiter","delim","dsv","dsvFormat","parseJSON","interior","exterior","topojson","mesh","objects","csv","tsv","read","timeParser","utcParser","columns","parsers","pattern","loaderFactory","resolvePath","makeResponse","probeLog","DEFAULT_LOADER_OPTIONS","mimeType","nothrow","CDN","worker","maxConcurrency","maxMobileConcurrency","reuseWorkers","_workerType","_limitMB","batchSize","batchDebounceMs","transforms","REMOVED_LOADER_OPTIONS","throws","redirect","referrer","referrerPolicy","integrity","keepalive","getGlobalLoaderState","loaders","getGlobalLoaderOptions","normalizeOptions","validateOptionsObject","idOptions","loaderOptions","deprecatedOptions","validateOptions","normalizeOptionsInternal","getFetchFunction","globalOptions","fetchFile","loaderName","isSubOptions","suggestion","findSimilarOption","optionKey","lowerCaseOptionKey","bestSuggestion","lowerCaseKey","loaderDefaultOptions","mergedOptions","addUrlOptions","mergeNestedFields","rhumbDestination","wasNegativeDistance","distanceInMeters","lambda1","phi1","DeltaPhi","DeltaPsi","DeltaLambda","calculateRhumbDestination","headerName","vendors","raf","caf","_now","cancelled","requestAnimationFrame","cancelAnimationFrame","ieee754","kMaxLength","TYPED_ARRAY_SUPPORT","createBuffer","encodingOrOffset","allocUnsafe","fromArrayLike","fromArrayBuffer","encoding","isEncoding","actual","write","assertSize","isView","loweredCase","utf8ToBytes","base64ToBytes","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","bidirectionalIndexOf","arrayIndexOf","indexSize","arrLength","valLength","readUInt16BE","foundIndex","found","hexWrite","remaining","strLen","parsed","utf8Write","blitBuffer","asciiWrite","byteArray","asciiToBytes","latin1Write","base64Write","ucs2Write","utf16leToBytes","fromByteArray","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","typedArraySupport","_augment","species","allocUnsafeSlow","_isBuffer","swap16","swap32","swap64","inspect","thisStart","thisEnd","thisCopy","targetCopy","checkOffset","checkInt","objectWriteUInt16","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","newBuf","sliceLen","readUIntLE","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","readIntBE","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","INVALID_BASE64_RE","leadSurrogate","toByteArray","stringtrim","base64clean","__g","core","__e","arrayMap","baseIteratee","baseMap","collection","iteratee","toArrayBuffer","compareArrayBuffers","arrayBuffer1","arrayBuffer2","array2","concatenateArrayBuffers","sourceArrays","source2","sourceArray","sliceArrayBuffer","subArray","isObjectEmpty","compositeSetters","glConstant","compositeSetter","resetParameters","nocatch","ERR_UNKNOWN_ORDER","Euler","ysqr","t3","t4","validateOrder","roll","yaw","_getRotationMatrix","te","ae","af","be","bf","ce","cf","de","df","ac","bc","sy","sr","sp","checkOrder","_drawLayers","clearCanvas","clearGLCanvas","renderStats","viewportOrDescriptor","onViewportActive","drawLayerParams","_getDrawLayerParams","subViewports","_drawLayersInViewport","moduleParameters","indexResolver","layerIndexResolver","layerIndices","resolvers","resolveLayerIndex","isDrawn","indexOverride","layerId","parentId","resolver","drawContext","isPicking","renderPass","layerFilterCache","layerIndex","layers","shouldDrawLayer","_shouldDrawLayer","layerParam","layerRenderIndex","_getModuleParameters","getLayerParameters","glViewport","dimensions","pixelRatio","getGLViewport","clearOpts","scissorTest","renderStatus","totalCount","visibleCount","compositeCount","pickableCount","layerParameters","rootLayerId","layerFilter","autoWrapLongitude","pickingActive","effect","getModuleParameters","hadKeyboardEvent","hadFocusVisibleRecently","hadFocusVisibleRecentlyTimeout","inputTypesWhitelist","search","tel","email","password","datetime","handleKeyDown","altKey","ctrlKey","handlePointerDown","handleVisibilityChange","visibilityState","isFocusVisible","isContentEditable","focusTriggersKeyboardModality","handleBlurVisible","useIsFocusVisible","onBlurVisible","doc","ReactDOM","ownerWindow","defaultView","_unsupportedIterableToArray","minLen","createTheme","isMuiElement","muiNames","cloneFeature","cloned","cloneProperties","cloneGeometry","deepSlice","cloneFeatureCollection","DATA_URL_PATTERN","MIME_TYPE_PATTERN","parseMIMEType","mimeString","parseMIMETypeFromURL","QUERY_STRING_PATTERN","getResourceUrlAndType","stripQueryString","getResourceContentLength","baseIsNative","getRawTag","objectToString","symToStringTag","toStringTag","anObject","IE8_DOM_DEFINE","toPrimitive","dP","bufferToArrayBuffer","DEFAULT_LIGHT_DIRECTION","_shadow","COORDINATE_SYSTEM_GLSL_CONSTANTS","PROJECTION_MODE_GLSL_CONSTANTS","UNIT_GLSL_CONSTANTS","INITIAL_MODULE_OPTIONS","fp32","loaderId","requestScheduler","requestToken","tileData","_isCancelled","onLoad","_loadData","isLoading","_loader","_isLoaded","_needsReload","content","throttleRequests","_selectedTiles","modelMatrixAsMatrix4","isModelMatrixNew","tileIndices","_modelMatrixInverse","tileIndex","abortCandidates","ongoingRequestCount","isVisible","_getNearestAncestor","getPlaceholderInAncestors","needsPlaceholder","getPlaceholderInChildren","maxCacheSize","selectedTiles","maxCacheByteSize","_cacheByteSize","needsReload","getTileMetadata","_minZoom","getParentIndex","_getTile","TILE_STATE_VISIBLE","dataComparator","optional","onTileLoad","onTileUnload","isLoaded","propsChanged","dataChanged","_getTilesetOptions","_onTileLoad","_onTileError","_onTileUnload","frameNumber","loadingStateChanged","tilesetChanged","propName","highlightedObjectIndex","_offset","easeInOut","easeOut","easeIn","sharp","shortest","short","standard","complex","enteringScreen","leavingScreen","formatMs","_options$duration","durationOption","_options$easing","easingOption","_options$delay","animatedProp","getAutoHeightDuration","_asyncIterator","asyncIterator","isFragment","hasValue","isFilled","SSR","isAdornedStart","startAdornment","pathPrefix","loadImage","Texture","contentLength","getInitialDataUrl","initialDataUrl","getResponseError","contentType","INITIAL_DATA_LENGTH","blobSlice","arrayBufferToBase64","binary","btoa","baseClone","CLONE_DEEP_FLAG","objectWithoutPropertiesLoose","EXT_FLOAT_WEBGL2","bpp","RENDERBUFFER_FORMATS","getRenderbufferParameter","react","create$1","createState","partial","_previousState","getState","api","subscribe","equalityFn","is","listenerToAdd","nextSlice","_previousSlice","subscribeWithSelector","destroy","useIsomorphicLayoutEffect","userAgent","useEffect","useLayoutEffect","useStore","newStateSlice","forceUpdate","useReducer","stateRef","useRef","selectorRef","equalityFnRef","erroredRef","currentSliceRef","hasNewStateSlice","stateBeforeSubscriptionRef","nextStateSlice","unsubscribe","passiveSupported","createError","errorConstructor","IntermediateInheritor","DivisionByZero","Fraction","InvalidParameter","throwInvalidParam","gcd","eps","cont","rec","excludeWhole","whole","cycLen","rem","cycleLen","cycOff","rem1","rem2","modpow","cycleStart","naturalSort","oFxNcL","oFyNcL","sre","dre","hre","ore","insensitive","xN","yN","xD","yD","cLoc","numS","isLength","cloneLayout","newLayout","cloneLayoutItem","childrenEqual","_lodash","_react","fastPositionEqual","collides","compactItem","correctBounds","getLayoutItem","getFirstCollision","getAllCollisions","getStatics","moveElement","moveElementAwayFromCollision","perc","setTransform","WebkitTransform","MozTransform","msTransform","OTransform","setTopLeft","sortLayoutItems","sortLayoutItemsByRowCol","sortLayoutItemsByColRow","synchronizeLayoutWithChildren","initialLayout","cols","compactType","exists","_grid","_objectSpread","validateLayout","_ref3","verticalCompact","autoBindHandlers","fns","fastRGLPropsEqual","bottomY","layoutItem","minW","maxW","minH","moved","static","isDraggable","isResizable","resizeHandles","isBounded","compareWith","sorted","heightWidth","resolveCompactionCollision","moveToCoord","sizeProp","otherItem","fullLayout","compactH","collidesWith","isUserAction","preventCollision","oldX","oldY","collisions","collision","itemToMove","compactV","fakeItem","contextName","subProps","checkDataType","AND","OK","NOT","checkDataTypes","dataTypes","toHash","null","coerceToTypes","optionCoerceTypes","COERCE_TO_TYPES","getProperty","escapeQuotes","ucs2length","varOccurences","varReplace","expr","cleanUpCode","EMPTY_ELSE","EMPTY_IF_NO_ELSE","EMPTY_IF_WITH_ELSE","finalCleanUpCode","async","ERRORS_REGEXP","REMOVE_ERRORS_ASYNC","RETURN_ASYNC","REMOVE_ERRORS","ROOTDATA_REGEXP","REMOVE_ROOTDATA","schemaHasRules","schemaHasRulesExcept","exceptKeyword","schemaUnknownRules","toQuotedString","getPathExpr","currentPath","jsonPointers","joinPaths","getPath","escapeJsonPointer","lvl","jsonPointer","JSON_POINTER","RELATIVE_JSON_POINTER","segment","unescapeJsonPointer","unescapeFragment","decodeURIComponent","escapeFragment","encodeURIComponent","hash","IDENTIFIER","SINGLE_QUOTE","fileAliases","replacement","__webpack_amd_options__","ctx","hide","$export","own","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","IS_WRAP","expProto","virtual","createDesc","IObject","defined","USE_SYMBOL","meta_1","MAX_SAFE_COMPONENT_LENGTH","createToken","isGlobal","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCE","LONETILDE","LONECARET","bboxPolygon","lowLeft","legacyMeterSizes","projectionParameters","viewMatrixUncentered","viewOffset","toLocation","_subViewports","minOffset","maxOffset","offsetViewport","rotationX","rotationOrbit","minRotationX","maxRotationX","startPanPosition","startRotationX","startRotationOrbit","_unproject","startPosition","deltaScaleX","startPos","_calculateNewZoom","zoomedViewport","_panFromCenter","_propsToCompare","currentProps","startViewStateProps","endViewStateProps","startPanLngLat","startZoomLngLat","_calculateNewPitchAndBearing","_getRotationParams","_zoomFromCenter","deltaScaleY","deltaX","deltaY","centerY","startY","IndexType","vertexValid","externalIndices","Polygon","getGeometrySize","geometrySize","indexStarts","vertexStart","indexStart","typedArrayManager","positionSize","polygonPositions","DEFAULT_COLOR","wireframe","_normalize","_windingOrder","getElevation","getFillColor","material","ATTRIBUTE_TRANSITION","enter","RING_WINDING_ORDER_CW","polygonTesselator","preproject","hasFeatures","shaderAttributes","vertexOffset","instancePositions","nextPositions","elevations","instanceElevations","fillColors","alias","colorFormat","instanceFillColors","lineColors","instanceLineColors","pickingColors","instancePickingColors","renderUniforms","sideModel","topModel","_getModels","geometryBuffer","getGeometry","positionFormat","wrapLongitude","vertexStarts","vertexPositions","isSideVertex","instanceCount","models","SolidPolygonLayer","segmentTypes","flatPath","normalizePath","getPathLength","isClosed","isPathClosed","ptIndex","lastPointIndex","widthUnits","widthScale","widthMinPixels","widthMaxPixels","jointRounded","capRounded","miterLimit","billboard","_pathType","rounded","deprecatedFor","instanceLeftPositions","instanceStartPositions","instanceEndPositions","instanceRightPositions","instanceTypes","instanceStrokeWidths","instanceColors","pathTesselator","getDashArray","jointType","capType","PathLayer","DEFAULT_TEXTURE_PARAMETERS","getIconId","icon","buildRowMapping","yOffset","xOffset","_texture","_autoPacking","_mapping","getIcon","autoPacking","_canvas","icons","cachedIcons","getDiffIcons","rowHeight","buildMapping","_yOffset","oldWidth","oldHeight","newTexture","cloneTextureFrom","copyToTexture","targetY","resizeTexture","getContext","imageData","resizeImage","loadOptions","iconAtlas","iconMapping","sizeMinPixels","sizeMaxPixels","alphaCutoff","getAngle","getPixelOffset","onIconError","iconManager","_onUpdate","_onError","instanceSizes","instanceOffsets","getInstanceOffset","instanceIconFrames","getInstanceIconFrame","instanceColorModes","getInstanceColorMode","instanceAngles","instancePixelOffset","iconMappingChanged","internalState","isAsyncPropLoading","iconsTexture","iconsTextureDim","rect","getIconMapping","IconLayer","_setPrototypeOf","cmp","cycles","aobj","bobj","seen","seenIndex","VECTOR_TO_POINT_MATRIX","DEFAULT_PIXELS_PER_UNIT2","DEFAULT_COORDINATE_ORIGIN","getMemoizedViewportUniforms","projectionCenter","originCommon","cameraPosCommon","getOffsetOrigin","offsetMode","geospatialOrigin","shaderCoordinateOrigin","calculateMatrixAndOffset","viewportSize","project_uCoordinateSystem","project_uProjectionMode","project_uCoordinateOrigin","project_uCommonOrigin","project_uCenter","project_uPseudoMeters","project_uViewportSize","project_uDevicePixelRatio","project_uFocalDistance","project_uCommonUnitsPerMeter","project_uCommonUnitsPerWorldUnit","project_uCommonUnitsPerWorldUnit2","project_uScale","project_uViewProjectionMatrix","distanceScalesAtOrigin","_applyConstraints","getMemoizedViewportCenterPosition","getMemoizedViewProjectionMatrices","shadowMatrices","projectionMatrices","farZ","screenToCommonSpace","shadowMatrix","DEFAULT_SHADOW_COLOR","createShadowUniforms","shadow_uDrawShadowMap","shadow_uUseShadowMap","shadow_uColor","shadow_uLightId","shadow_uLightCount","projectCenters","viewProjectionMatrices","viewProjectionMatrixCentered","shadowEnabled","globalScope","Decimal","inexact","quadrant","EXP_LIMIT","NUMERALS","DEFAULTS","rounding","modulo","toExpNeg","toExpPos","minE","maxE","crypto","invalidArgument","decimalError","mathfloor","mathpow","isBinary","isHex","isOctal","isDecimal","BASE","LN10_PRECISION","PI_PRECISION","digitsToString","ws","indexOfLastWord","getZeroString","checkInt32","checkRoundingDigits","rm","repeating","di","rd","convertBase","baseIn","baseOut","arrL","strL","absoluteValue","finalise","comparedTo","xdL","ydL","xd","yd","xs","ys","Ctor","tinyPow","taylorSeries","cos2x","toLessThanHalfPi","neg","cubeRoot","cbrt","rep","t3plusx","isZero","divide","eq","decimalPlaces","dp","dividedBy","dividedToIntegerBy","divToInt","greaterThan","gt","greaterThanOrEqualTo","gte","hyperbolicCosine","cosh2_x","d8","hyperbolicSine","sinh2_x","d5","d16","d20","hyperbolicTangent","tanh","inverseCosine","halfPi","isNeg","getPi","inverseHyperbolicCosine","lte","ln","inverseHyperbolicSine","inverseHyperbolicTangent","wpr","xsd","inverseSine","inverseTangent","isInt","isPositive","isPos","lessThan","lessThanOrEqualTo","logarithm","isBase10","denominator","inf","naturalLogarithm","getLn10","xe","xLTy","getBase10Exponent","naturalExponential","negated","carry","getPrecision","sine","sin2_x","squareRoot","tangent","rL","toBinary","toStringBinary","toDecimalPlaces","toDP","finiteToString","toFraction","maxD","d2","toHexadecimal","toNearest","toOctal","toPower","yn","intPow","toSignificantDigits","toSD","truncated","trunc","multiplyInteger","aL","bL","logBase","prod","prodL","qd","remL","rem0","xi","xL","yd0","yL","yz","isTruncated","digits","roundUp","xdi","isExp","nonFiniteToString","zs","isOdd","maxOrMin","ltgt","guard","numerator","parseDecimal","parseOther","isFloat","isHyperbolic","useDefaults","defaults","ps","getRandomValues","randomBytes","isDecimalInstance","log10","ROUND_UP","ROUND_DOWN","ROUND_CEIL","ROUND_FLOOR","ROUND_HALF_UP","ROUND_HALF_DOWN","ROUND_HALF_EVEN","ROUND_HALF_CEIL","ROUND_HALF_FLOOR","EUCLID","define","_typeof2","_typeof3","_setPrototypeOf2","_create2","findDOMNode","HTMLElement","DEFAULT_COMPARE","splay","Tree","_root","_size","_comparator","_remove","findStatic","find","contains","high","minNode","maxNode","successor","predecessor","toList","presort","pivot","loadRecursive","middle","mergedList","mergeLists","createList","sortedListToBST","printNode","printRow","isTail","newKey","isInBbox","ur","getBboxOverlap","lowerX","upperX","EPSILON_SQ","PtRounder","xRounder","CoordRounder","yRounder","prevNode","rounder","crossProduct","dotProduct","compareVectorAngles","basePt","endPt1","endPt2","kross","sineOfAngle","pShared","pBase","pAngle","vBase","vAngle","cosineOfAngle","horizontalIntersection","verticalIntersection","SweepEvent","isLeft","ptCmp","comparePoints","Segment","aPt","bPt","otherEvents","iMax","checkForConsuming","numEvents","evt1","consumedBy","evt2","otherSE","consume","ringOut","isInResult","baseEvent","fillCache","linkedEvent","nextEvent","_cache$get","asine","acosine","_cache$get2","bsine","bcosine","segmentId","leftSE","rightSE","rings","windings","alx","blx","arx","brx","aly","bly","ary","bry","aCmpBLeft","comparePoint","bCmpARight","bCmpALeft","aCmpBRight","_bCmpARight","_aCmpBRight","newRightSE","isAnEndpoint","lPt","rPt","yDist","xFromYDist","xDist","yFromXDist","tBbox","oBbox","bboxOverlap","tlp","trp","olp","orp","touchesOtherLSE","touchesThisLSE","touchesOtherRSE","touchesThisRSE","pt1","pt2","ve","intersection","newEvents","alreadyLinked","newLeftSE","oldRightSE","replaceRightSE","newSeg","swapEvents","tmpEvt","consumer","consumee","_tmp","winding","_prevInResult","prevInResult","_beforeState","seg","afterState","multiPolys","_afterState","beforeState","ringsAfter","windingsAfter","mpsAfter","polysAfter","polysExclude","_iMax","_ring","poly","isExterior","_index","_i2","_iMax2","mp","multiPoly","_isInResult","mpsBefore","noBefores","noAfters","least","most","numMultiPolys","isJustSubject","mps","isSubject","leftPt","rightPt","cmpPts","RingIn","geomRing","firstPoint","prevPoint","fromRing","sweepEvents","PolyIn","geomPoly","exteriorRing","interiorRings","getSweepEvents","ringSweepEvents","jMax","MultiPolyIn","ex","polys","polySweepEvents","RingOut","allSegments","ringsOut","prevEvent","startingPoint","intersectionLEs","availableLEs","getAvailableLinkedEvents","firstPt","lastPt","indexLE","getLeftmostComparator","intersectionLE","ringEvents","prevPt","_pt","_nextPt","nextPt","isExteriorRing","iStart","iEnd","orderedPoints","_isExteriorRing","enclosing","enclosingRing","_enclosingRing","_calcEnclosingRing","leftMostEvt","prevSeg","prevPrevSeg","PolyOut","ringGeom","MultiPolyOut","_composePolys","polyGeom","addInterior","SweepLine","nextSeg","prevMySplitter","prevInter","getIntersection","newEventsFromSplit","_splitSafely","nextMySplitter","nextInter","_newEventsFromSplit","mySplitter","_newEventsFromSplit2","inter","_newEventsFromSplit3","_i3","_iMax3","_newEventsFromSplit4","_i4","_iMax4","POLYGON_CLIPPING_MAX_QUEUE_SIZE","POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS","Operation","moreGeoms","multipolys","subject","mpA","_j","_jMax","sweepLine","prevQueueSize","_evt","factory","union","xor","_len3","_key3","difference","subjectGeom","_len4","clippingGeoms","_key4","Tablelvl2Context","rhumbDistance","calculateRhumbDistance","halfY","scaleResult","inverseScale0","inverseScale1","inverseScale2","rx","ry","transformAsVector","column0Row0","column1Row1","column2Row0","column2Row1","column3Row2","createContext","ListContext","Long","unsigned","isLong","__isLong__","INT_CACHE","UINT_CACHE","fromInt","cachedObj","fromBits","fromNumber","UZERO","TWO_PWR_64_DBL","MAX_UNSIGNED_VALUE","TWO_PWR_63_DBL","MIN_VALUE","MAX_VALUE","TWO_PWR_32_DBL","lowBits","highBits","pow_dbl","radix","radixToPower","power","fromValue","TWO_PWR_16_DBL","TWO_PWR_24","UONE","NEG_ONE","LongPrototype","toInt","radixLong","remDiv","getHighBits","getHighBitsUnsigned","getLowBits","getLowBitsUnsigned","getNumBitsAbs","isEven","notEquals","neq","lessThanOrEqual","greaterThanOrEqual","thisNeg","otherNeg","not","addend","a48","a16","b48","b32","b16","c48","c32","c16","c00","subtrahend","approx","toUnsigned","shru","shr","shl","LN2","approxRes","approxRem","and","or","shiftLeft","numBits","shiftRight","shiftRightUnsigned","toSigned","toBytes","le","toBytesLE","toBytesBE","RADIAN_PER_DEGREE","calculateTransformMatrix","targetMatrix","orientation","sw","cw","scx","scy","scz","getExtendedMat3FromMat4","MATRIX_ATTRIBUTES","instanceModelMatrix__LOCATION_0","instanceModelMatrix__LOCATION_1","instanceModelMatrix__LOCATION_2","instanceTranslation","getTransformMatrix","arrayMatrix","constantMatrix","constantScale","constantOrientation","constantTranslation","hasMatrix","instanceModelMatrixData","getOrientation","getTranslation","shouldComposeModelMatrix","getWebGL2ValueOrZero","WEBGL_PARAMETERS","WEBGL2_CONTEXT_POLYFILLS","createVertexArray","deleteVertexArray","bindVertexArray","isVertexArray","vertexAttribDivisor","drawElementsInstanced","drawArraysInstanced","createQuery","deleteQuery","beginQuery","endQuery","getQuery","getQueryObject","getQueryParameter","WEBGL2_CONTEXT_OVERRIDES","originalFunc","getVertexAttrib","extension","getExtensionData","getProgramParameter","program","getInternalformatParameter","originalGetParameter","arrayLikeKeys","baseKeys","isArrayLike","assignValue","baseAssignValue","customizer","isNew","longitude1","latitude1","bearingRad","latitude2","longitude2","NebulaLayer","toNebulaFeature","uuid","Event","TwoClickPolygonMode","clickSequence","getTentativeGuide","editAction","getAddFeatureOrBooleanPolygonAction","lastPointerMoveEvent","guides","corner1","corner2","getTwoClickPolygon","lastCoords","xSum","ySum","inRing","ignoreBoundary","isInside","yi","xj","yj","inBBox","insidePoly","inHole","getFirstCharacters","getMagicString","magic","timeParts","validateProps","propTypes","getPropTypes","diffProps","propsChangedReason","compareProps","ignoreProps","dataChangedReason","_dataDiff","diffDataProps","updateTriggersChangedReason","diffUpdateTrigger","triggerChanged","triggerName","diffUpdateTriggers","updateTriggersChanged","diffExtensions","transitionsChanged","diffTransitions","comparePropValues","newProp","oldProp","oldExtensions","newTriggers","oldTriggers","LayerType","SNAP_TO_END","IGNORE","DEFAULT_PROPS","onTransitionStart","onTransitionInterrupt","onTransitionEnd","_onTransitionUpdate","transitionTriggered","_shouldIgnoreViewportChange","_isTransitionEnabled","interruption","propsInTransition","interpolator","arePropsEqual","_isUpdateDueToCurrentTransition","startViewstate","initialProps","_onTransitionEnd","inTransition","DEFAULT_REQUIRED_PROPS","startViewport","endViewport","aroundPosition","canUseDOM","makePrefixMap","styleProp","vendorPrefixes","domSupport","win","animationend","transitionend","animation","getVendorPrefixes","prefixedEventNames","getVendorPrefixedEventName","prefixMap","stylePropList","animationEndName","transitionEndName","supportTransition","getTransitionName","transitionName","transitionType","MotionPropTypes","eventProps","PropTypes","bool","motionName","oneOfType","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd","genCSSMotion","transitionSupport","isSupportTransition","CSSMotion","_React$Component","onDomUpdate","_this$state","newStatus","_this$props","$ele","getElement","$cacheEle","removeEventListener","updateStatus","updateActiveStatus","onMotionEnd","_this$state2","statusActive","_this$props2","setNodeRef","internalRef","styleFunc","additionalState","statusStyle","_destroyed","nextStep","nextFrame","currentStatus","cancelNextFrame","_classNames","_props","prevStatus","newState","_initialiseProps","dragNodeHighlight","rcTreeNode","registerTreeNode","rcTree","syncLoadData","selectable","treeSelectable","loading","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","expanded","selected","otherProps","_context$rcTree","prefixCls","filterTreeNode","draggable","isDisabled","dataOrAriaAttributeProps","onDragEnter","onDragOver","onDragLeave","onDrop","onDragEnd","renderSwitcher","renderCheckbox","renderSelector","renderChildren","onSelect","loaded","checkable","switcherIcon","contextTypes","nodeContextTypes","childContextTypes","_this2","onSelectorClick","onNodeClick","isSelectable","onCheck","onSelectorDoubleClick","onNodeDoubleClick","onNodeSelect","preventDefault","_props2","onNodeCheck","isCheckable","onMouseEnter","onNodeMouseEnter","onMouseLeave","onNodeMouseLeave","onContextMenu","onNodeContextMenu","onDragStart","onNodeDragStart","stopPropagation","dataTransfer","setData","onNodeDragEnter","onNodeDragOver","onNodeDragLeave","onNodeDragEnd","onNodeDrop","onExpand","onNodeExpand","setSelectHandle","originList","targetList","getNodeState","_props3","loadData","hasChildren","treeDisabled","treeCheckable","_context$rcTree2","onNodeLoad","_props4","switcherIconFromProps","_context$rcTree3","switcherIconFromCtx","switcherCls","_props5","$custom","renderIcon","_props6","_context$rcTree4","showIcon","treeIcon","wrapClass","$icon","currentIcon","$title","onDoubleClick","_props7","_context$rcTree5","motion","renderTreeNode","nodeList","depthBuffer","blend","drawToShadowMap","DEFAULT_AMBIENT_LIGHT_PROPS","DEFAULT_DIRECTIONAL_LIGHT_PROPS","lightSource","light","shadowPasses","shadowPass","viewports","shadowLightId","dummyShadowMap","shadow","shadowMaps","shadowColor","ambientLight","directionalLights","directionalLight","pointLights","pointLight","lightMatrices","_arrayLikeToArray","isArrayX","isArrayY","propChecks","replacementProp","lngLatZToWorldPosition","getWorldPosition","normalizedParams","normalizeParameters","positionCommonSpace","OUTER_POLYGON_WINDING","HOLE_POLYGON_WINDING","windingOptions","isFlatRingClosed","copyNestedRing","simplePolygon","p0","isNestedRingClosed","copyFlatRing","srcLength","srcHoleIndices","isSimple","getSurfaceIndices","normalizedPolygon","positionIndex","xy","treeContextTypes","checkStrictly","openTransitionName","openAnimation","isKeyChecked","onUpCheckConduct","lightSources","convertColor","getLightSourceUniforms","lightSourceUniforms","lights","hasLights","lighting_uEnabled","MAX_LIGHTS","nodeIO","exportName","VENDOR_PREFIXES","TEST_ELEMENT","setTimeoutContext","bindFn","invokeArrayArg","each","deprecationMessage","nextKey","dest","inherit","childP","baseP","_super","boolOrFn","ifUndefined","val1","val2","addEventListeners","splitStr","removeEventListeners","hasParent","inStr","inArray","findByKey","uniqueArray","camelProp","_uniqueId","getWindowForElement","parentWindow","SUPPORT_TOUCH","SUPPORT_POINTER_EVENTS","SUPPORT_ONLY_TOUCH","PROPS_XY","PROPS_CLIENT_XY","Input","manager","inputTarget","domHandler","ev","init","inputHandler","pointersLen","pointers","changedPointersLen","changedPointers","isFirst","isFinal","session","pointersLength","firstInput","simpleCloneInputData","firstMultiple","timeStamp","deltaTime","getDistance","offsetDelta","prevDelta","prevInput","computeDeltaXY","offsetDirection","overallVelocity","getVelocity","overallVelocityX","overallVelocityY","getRotation","maxPointers","velocity","velocityX","velocityY","lastInterval","computeIntervalInputData","computeInputData","recognize","clientX","evEl","evTarget","evWin","MOUSE_INPUT_MAP","mousedown","mousemove","mouseup","MouseInput","pressed","button","which","pointerType","POINTER_INPUT_MAP","pointerdown","pointerup","pointercancel","pointerout","IE10_POINTER_TYPE_ENUM","3","4","5","POINTER_ELEMENT_EVENTS","POINTER_WINDOW_EVENTS","PointerEventInput","pointerEvents","MSPointerEvent","PointerEvent","removePointer","eventTypeNormalized","isTouch","storeIndex","pointerId","SINGLE_TOUCH_INPUT_MAP","touchstart","touchmove","touchend","touchcancel","SingleTouchInput","normalizeSingleTouches","touches","changedTouches","TOUCH_INPUT_MAP","TouchInput","targetIds","getTouches","allTouches","targetTouches","changedTargetTouches","touch","TouchMouseInput","mouse","primaryTouch","lastTouches","recordTouches","eventData","setLastTouch","lastTouch","lts","isSyntheticEvent","inputEvent","inputData","isMouse","sourceCapabilities","firesTouchEvents","PREFIXED_TOUCH_ACTION","NATIVE_TOUCH_ACTION","TOUCH_ACTION_MAP","touchMap","cssSupports","supports","getTouchActionProps","TouchAction","actions","touchAction","recognizers","recognizer","getTouchAction","hasPanX","hasPanY","cleanTouchActions","preventDefaults","prevented","hasNone","isTapPointer","isTapMovement","isTapTouchTime","DIRECTION_LEFT","DIRECTION_UP","preventSrc","Recognizer","simultaneous","requireFail","stateStr","directionStr","getRecognizerByNameIfManager","otherRecognizer","AttrRecognizer","PanRecognizer","pX","pY","PinchRecognizer","PressRecognizer","_timer","_input","RotateRecognizer","SwipeRecognizer","TapRecognizer","pTime","pCenter","Hammer","preset","Manager","recognizeWith","dropRecognizeWith","requireFailure","dropRequireFailure","hasRequireFailures","canRecognizeWith","additionalEvent","tryEmit","canEmit","inputDataClone","attrTest","optionPointers","isRecognized","DIRECTION_HORIZONTAL","directionTest","hasMoved","inOut","validPointers","validMovement","validTime","taps","posThreshold","validTouchTime","failTimeout","validInterval","validMultiTap","tapCount","domEvents","inputClass","cssProps","touchSelect","touchCallout","contentZooming","userDrag","tapHighlightColor","oldCssProps","createInputInstance","toggleCssProps","stopped","curRecognizer","existing","gestureEvent","createEvent","initEvent","gesture","dispatchEvent","triggerDomEvent","INPUT_START","INPUT_MOVE","INPUT_END","INPUT_CANCEL","STATE_POSSIBLE","STATE_BEGAN","STATE_CHANGED","STATE_ENDED","STATE_RECOGNIZED","STATE_CANCELLED","STATE_FAILED","DIRECTION_NONE","DIRECTION_RIGHT","DIRECTION_DOWN","DIRECTION_VERTICAL","DIRECTION_ALL","Tap","Pan","Swipe","Pinch","Rotate","Press","uncompressed","currentScript","emscriptenModule","COMPRESSORS","clevel","cname","shuffle","SHUFFLE","blocksize","compress","free_result","NOSHUFFLE","BITSHUFFLE","AUTOSHUFFLE","ListCache","stackClear","stackDelete","stackGet","stackHas","stackSet","Stack","__data__","listCacheClear","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","entry","nativeCreate","getNative","isKeyable","baseIsArguments","isObjectLike","objectProto","isArguments","stubFalse","freeExports","freeModule","baseGetTag","toSource","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","getTag","ctorString","findInArray","isNum","dontSetMe","radiusScale","printTypes","SphericalCoordinates","pose","getTransformationMatrix","xmlNode","textNodeName","ignoreNameSpace","allowBooleanAttributes","trimValues","cdataTagName","cdataPositionChar","numParseOptions","leadingZeros","tagValueProcessor","attrValueProcessor","stopNodes","alwaysCreateTextNode","processTagValue","parseValue","resolveNameSpace","tagname","tags","shouldParse","newval","attrsRegx","buildAttributesMap","attrStr","attrCollection","closingIndexForOpeningTag","attrBoundary","tagExp","findClosingIndex","xmlData","errMsg","closingIndex","getTraversalObj","xmlObj","currentNode","textData","closeIndex","colonIndex","attrsMap","childNode","addChild","separatorIndex","shouldBuildAttributesMap","baseKeysIn","bitmap","$keys","enumBugKeys","isSymbol","__importDefault","line_segment_1","geojson_rbush_1","line1","line2","coords1","coords2","x4","y4","denom","numeA","numeB","uA","uB","unique","padToNBytes","copyToArray","srcByteLength","targetOffset","SEMVER_SPEC_VERSION","NODE_DEBUG","operator","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","polygon1","polygon2","geom1","geom2","differenced","polygonClipping","mergeShaders","mergedInjection","isPlainObject","deltaZoom","newZoomX","newZoomY","MapController","MapView","DEFAULT_MODULES","SHADER_HOOKS","createProgramManager","toValue","updateSpringElement","cur","distanceSquare","_currValue","updateSpring","TRANSITION_TYPES","CPUSpringTransition","TransitionType","internalTextures","TYPE_DEFINITIONS","arrayEqual","valueType","getTypeOf","function","dataTransform","specialTextureParameters","textureParameters","createTexture","destroyTexture","parsePropType","propDef","normalizePropDefinition","createProps","propsPrototype","getPropsPrototype","propsInstance","componentClass","getOwnProperty","parentClass","parentDefaultProps","componentPropDefs","propDefs","parsePropTypes","parentProps","getComponentName","createPropsPrototype","defaultValues","descriptors","getDescriptorForAsyncProp","addAsyncPropsToPropPrototype","nameStr","addDeprecatedPropsToPropPrototype","createPropsPrototypeAndTypes","EMPTY_PROPS","asyncProp","asyncProps","oldAsyncProps","resolvedValues","originalValues","getAsyncProp","_didAsyncInputValueChange","_postProcessValue","loadCount","onDataLoad","lastValue","resolvedValue","pendingLoadCount","resolvedLoadCount","MAX_PICKING_COLOR_CACHE_SIZE","areViewportsEqual","oldViewport","pickingColorCache","resourceManager","inResourceManager","resourceId","persistent","onChange","consumerId","requestId","onDrag","getPolygonOffset","autoHighlight","highlightColor","stateChanged","redraw","clearRedrawFlags","_getNeedsRedraw","needsUpdate","shouldUpdateState","uniformTransitions","neededPickingBuffer","needPickingBuffer","pickingColorsAttribute","viewportChanged","getNumInstances","getStartIndices","ignoreUnknownAttributes","changedAttributes","clearChangedFlags","newCacheSize","pickingColor","excludeAttributes","objectIndex","usesPickingColorCache","stateNeedsUpdate","currentViewport","updateParams","oldModels","modelChanged","getModels","flagChanged","propsOrDataChanged","somethingChanged","setChangeFlags","pickingModuleParameters","pickingSelectedColor","encodePickingColor","needsRedraw","attributeManagerNeedsRedraw","calculateInstancePickingColors","_onAsyncPropUpdated","constantValue","getStride","resolveShaderAttribute","baseAccessor","shaderAttributeOptions","logicalType","bufferType","defaultType","glArrayFromType","externalBuffer","bufferAccessor","allocatedValue","isBuffer64Bit","doubleShaderAttributeDefs","resolvedOptions","resolveDoublePrecisionShaderAttributes","shaderAttributeDef","_normalizeValue","_normalizeConstant","_areValuesEqual","requiredBufferSize","endOffset","illegalArrayType","EMPTY","newRangeList","insertPosition","range0","lastExternalBuffer","binaryValue","binaryAccessor","updateRanges","getVertexOffset","needsNormalize","shaderAttributeDefs","accessorFunc","objectValue","attributeType","ATTRIBUTE_TYPE","varyings","getTransform","bufferOpts","transitionSettings","padBufferOpts","elementCount","currentLength","sourceBuffers","aFrom","aTo","feedbackBuffers","vCurrent","getTexture","getFramebuffer","aPrev","aCur","vNext","discard","clearRenderTarget","readPixelsToArray","Transform","animatedAttributes","attributeNameArray","invalidatedAttributes","_invalidateTrigger","transitionUpdated","attributeTransitionManager","_createAttribute","triggers","SINGLE_LINE","getTextWidth","character","frameWidth","breakAll","maxWidth","rowStartCharIndex","rowOffsetLeft","textWidth","breakWord","groupStartCharIndex","groupEndCharIndex","groupWidth","autoWrapping","wordBreak","transformRow","leftOffsets","rowSize","transformParagraph","paragraph","lineHeight","numCharacters","rowWidth","autoWrappingEnabled","rowOffsetTop","lineStartIndex","lineEndIndex","char","rows","rowIndex","rowStart","rowEnd","_order","findIndex","DEFAULT_CHAR_SET","charSet","getDefaultCharacterSet","VALID_PROPS","getNewChars","cachedFontAtlas","newChars","cachedMapping","cachedCharSet","populateAlphaChannel","alphaChannel","setTextStyle","fontWeight","sdf","cutoff","oldKey","fontAtlas","_generateFontAtlas","getFontWidth","fontHeight","maxCanvasWidth","tinySDF","_atlas","DEFAULT_FONT_SETTINGS","smoothing","TEXT_ANCHOR","ALIGNMENT_BASELINE","FONT_SETTINGS_PROPS","getBackgroundColor","getBorderColor","getBorderWidth","backgroundPadding","outlineWidth","outlineColor","fontSettings","getText","getTextAnchor","getAlignmentBaseline","backgroundColor","styleVersion","fontAtlasManager","textChanged","oldCharacterSet","fontChanged","_fontChanged","oldFontSettings","textBuffer","autoCharacterSet","characterCount","texts","codesAtIndex","getTextFromBuffer","anchorX","anchorY","rowOffset","CharactersLayerClass","getSubLayerClass","BackgroundLayerClass","getSubLayerProps","getBoundingRect","getIconOffsets","tesselateColumn","vertices","isExtruded","stepAngle","vertexIndex","diskResolution","lineWidthUnits","lineWidthScale","lineWidthMinPixels","lineWidthMaxPixels","regenerateModels","hasThinkness","meanVertexDistance","fillVertexCount","wireframeVertexCount","isStroke","ColumnLayer","radiusMinPixels","radiusMaxPixels","antialiasing","getRadius","strokeWidth","outline","instanceRadius","instanceLineWidths","ScatterplotLayer","instanceRects","instancePixelOffsets","TextBackgroundLayer","_subscribers","_error","subscriber","protocol","_resources","_consumers","resources","consumers","INITIAL_CONTEXT","layerManager","shaderCache","pickingFBO","activateViewport","layerNeedsRedraw","_nextLayers","_needsRedraw","_needsUpdate","layerIds","newLayers","oldLayerMap","oldLayer","generatedLayers","newLayer","sublayers","_debug","outlineBuffer","gamma","MultiIconLayer","drawPickingColors","layerPass","lastPostProcessEffect","renderBuffers","swapBuffer","_arrayWithHoles","_nonIterableRest","_iterableToArray","ThemeContext","hasSymbol","for","sm","md","lg","defaultBreakpoints","handleBreakpoints","propValue","styleFromPropValue","themeBreakpoints","breakpoints","_themeBreakpoints","breakpoint","zIndex","mobileStepper","speedDial","appBar","drawer","modal","snackbar","tooltip","_isNativeReflectConstruct","sham","isElectron","mockUserAgent","realUserAgent","methodNames","upgradeMessage","methodName","getBinaryImageMetadata","toDataView","binaryData","getPngMetadata","tableMarkers","sofMarkers","getJpegMarkers","getJpegMetadata","getGifMetadata","getBmpMetadata","replaceStart","replaceEnd","getIndex","dataLengthChanged","endChunk","PICKING_PARAMETERS","_drawPickingBuffer","deviceRect","pickZ","encodedColors","byLayer","byAlpha","redrawReason","decodePickingColor","decodeColor","pickingAttribute","pickParameters","encoded","encodeColor","pickedColor","pickedLayer","pickedViewports","pickedObjectIndex","trimLeft","trimRight","tinyCounter","mathRound","mathMin","mathMax","mathRandom","tinycolor","named","matchers","rgba","hsla","hsva","hex8","parseIntFromHex","convertHexToDecimal","hex6","hex4","hex3","stringInputToObject","isValidCSSUnit","bound01","convertToPercentage","hsvToRgb","hue2rgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_roundA","_format","_gradientType","gradientType","_ok","_tc_id","rgbToHsl","rgbToHsv","rgbToHex","allow3Char","pad2","rgbaToArgbHex","convertDecimalToHex","desaturate","amount","clamp01","saturate","greyscale","brighten","spin","hue","complement","triad","tetrad","splitcomplement","analogous","monochromatic","modification","isDark","getBrightness","isLight","getOriginalInput","getFormat","getAlpha","RsRGB","GsRGB","BsRGB","setAlpha","toHsvString","toHslString","toHexString","toHex8","allow4Char","rgbaToHex","toHex8String","toRgbString","toPercentageRgb","toPercentageRgbString","toName","hexNames","toFilter","secondColor","hex8String","secondHex8String","formatSet","formattedString","hasAlpha","_applyModification","_applyCombination","fromRatio","newColor","color1","color2","rgb1","rgb2","readability","isReadable","wcag2","wcag2Parms","parms","validateWCAG2Parms","mostReadable","baseColor","colorList","includeFallbackColors","bestColor","bestScore","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","flipped","flip","isOnePointZero","processPercent","isPercentage","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","reactIs","REACT_STATICS","contextType","getDefaultProps","getDerivedStateFromError","mixins","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","TYPE_STATICS","isMemo","ForwardRef","render","Memo","getOwnPropertyNames","objectPrototype","targetComponent","sourceComponent","blacklist","inheritedComponent","targetStatics","sourceStatics","getScrollbarSize","scrollDiv","scrollbarSize","offsetWidth","createDetectElementResize","hostWindow","_window","attachEvent","requestFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","cancelFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","resetTriggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollHeight","offsetHeight","scrollListener","__resizeRAF__","__resizeLast__","checkTriggers","__resizeListeners__","keyframeprefix","animationstartevent","domPrefixes","startEvents","elm","animationName","animationKeyframes","animationStyle","addResizeListener","elementStyle","getComputedStyle","getElementById","getElementsByTagName","styleSheet","cssText","createTextNode","createStyles","innerHTML","__animationListener__","removeResizeListener","detachEvent","TableContext","AccordionContext","_interopRequireWildcard","_default","maxDepth","replacer","EL_ID","DEFAULT_OPTIONS","styleId","disableDefaultStyle","formatTooltip","valueToHtml","__rest","Handler","elementId","tooltipHandler","createDefaultStyle","classList","fullscreenElement","tooltipBox","innerWidth","innerHeight","calculatePosition","DracoLoader","mimeTypes","tests","draco","decoderType","libraryPath","extraAttributes","attributeNameEntry","getMeshBoundingBox","usedNames","checkNames","compareTo","nameMap","selectedFields","Schema","columnIndices","schemaOrFields","otherSchema","mergeMaps","fieldMap","m1","isSigned","Precision","listSize","Field","makeSchemaFromAttributes","metadataMap","makeMetadata","loaderData","namedLoaderDataAttributes","dracoAttribute","transformAttributesLoaderData","getArrowFieldFromAttribute","indicesField","getArrowTypeFromTypedArray","DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP","TEX_COORD","DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP","6","9","geometry_type","GetEncodedGeometryType","dracoGeometry","dracoStatus","DecodeBufferToMesh","DecodeBufferToPointCloud","_getDracoLoaderData","_getMeshData","_getTopLevelMetadata","_getDracoAttributes","num_attributes","num_points","num_faces","dracoAttributes","attributeId","GetAttribute","_getAttributeMetadata","unique_id","attribute_type","num_components","byte_offset","byte_stride","attribute_index","quantization","_getQuantizationTransform","octahedron","_getOctahedronTransform","_getMeshAttributes","topology","_getTriangleStripIndices","_getTriangleListIndices","loaderAttribute","_deduceAttributeName","_getAttributeValues","byteStride","numIndices","dracoArray","numValues","intArray","getUint32Array","TypedArrayCtor","numComponents","getDracoDataType","uniqueId","thisAttributeType","entryName","dracoMetadata","GetMetadata","_getDracoMetadata","GetAttributeMetadata","numEntries","metadataQuerier","NumEntries","entryIndex","GetEntryName","_getDracoMetadataField","getInt32Array","GetIntEntry","GetStringEntry","GetDoubleEntry","quantizedAttributes","octahedronAttributes","skipAttributes","quantization_bits","min_values","loadLibraryPromises","moduleName","libraryUrl","getLibraryUrl","loadLibraryFromFile","library","importScripts","scriptSource","loadLibraryFromString","eval","script","DRACO_JS_DECODER_URL","DRACO_WASM_WRAPPER_URL","DRACO_WASM_DECODER_URL","loadDecoderPromise","loadDracoDecoder","loadLibrary","DracoDecoderModule","initializeDracoDecoder","onModuleLoaded","loadDracoDecoderModule","dracoParser","getScratchArray","getBrowser","navigator_","isMSIE","isTrident","ERR_ELEMENTS","VertexArrayObject","isDefaultArray","setProps","elementBuffer","setElementBuffer","disablingAttributeZero","constantAttributeZero","_normalizeConstantArrayValue","updateNeeded","_compareConstantArrayValues","MULTI_LOCATION_ATTRIBUTE_REGEXP","DEPRECATIONS_V6","MAX_ATTRIBUTES","drawParams","appAccessor","_resolveLocationAndAccessor","arrayValue","vertexArrayObject","INVALID_RESULT","_getAttributeIndex","locationOrName","accessInfo","_getAttributeInfo","currentAccessor","configuration","getAttributeInfo","multiLocation","locationOffset","getAttributeLocation","getConstantBuffer","elements","elementsAccessor","formatArrayValue","maxElts","terminator","getDebugTableRow","vertexArray","verts","getGLSLDeclaration","typeAndName","getDebugTableForUniforms","undefinedOnly","uniformLocations","uniformNames","uniformName","addUniformToTable","unusedCount","unusedTable","uniform","isUniformDefined","attributeInfo","GLTF_TO_LUMA_ATTRIBUTE_MAP","COLOR_0","TEXCOORD_1","TEXCOORD_2","mapAttributeName","attributeMap","inferAttributeAccessor","category","NOOP","DRAW_PARAMS","transpileToGLSL100","bufferMode","getModuleUniforms","remappedName","getBuffersFromGeometry","normalizedAttributes","transformFeedback","logPriority","_logDrawCallStart","indexType","vertexArrayInstanced","onBeforeRender","onAfterRender","didDraw","unbindModels","_programDirty","stateHash","geometryBuffers","animationProps","logDrawTimeout","collapsed","attributeTable","rowHeader","attributeLocation","getDebugTableForVertexArray","configTable","glslDeclaration","varyingInfo","getDebugTableForProgramConfiguration","getHiResTimestamp","sampleSize","lastSampleCount","lastSampleTime","_samples","_getOrCreate","stat","average","hz","calculateRhumbBearing","deltaLambda","deltaPsi","rhumbBearing","bear360","dragNode","_node$props2","dropPosition","dragOverNodeKey","delayedDragEnterLogic","newExpandedKeys","_this$state$dragNodes","_node$props3","posArr","dropResult","dropToGap","_treeNode$props","targetSelected","selectedNodes","setUncontrolledState","nativeEvent","oriCheckedKeys","oriHalfCheckedKeys","checkedObj","eventObj","checkedNodes","_conductCheck","_checkedKeys","_halfCheckedKeys","checkedNodesPositions","_ref$loadedKeys","loadedKeys","_ref$loadingKeys","loadingKeys","_this$props3","newLoadedKeys","newLoadingKeys","_this$props4","_treeNode$props2","targetExpanded","loadPromise","onRightClick","needSync","domTreeNodes","_this$state$checkedKe","_this$state3","_this$state3$expanded","_this$state3$selected","_this$state3$halfChec","_this$state3$loadedKe","_this$state3$loadingK","cloneElement","showLine","_props2$tabIndex","tabIndex","domProps","onKeyDown","unselectable","entitiesMap","autoExpandParent","defaultExpandParent","defaultExpandAll","defaultExpandedKeys","defaultSelectedKeys","checkedKeyEntity","defaultCheckedKeys","_checkedKeyEntity","_checkedKeyEntity$che","_checkedKeyEntity$hal","conductKeys","any","arrayOf","50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700","WEBGL2","VERTEX_ARRAY_OBJECT","TIMER_QUERY","INSTANCED_RENDERING","MULTIPLE_RENDER_TARGETS","ELEMENT_INDEX_UINT32","BLEND_EQUATION_MINMAX","FLOAT_BLEND","COLOR_ENCODING_SRGB","TEXTURE_DEPTH","TEXTURE_HALF_FLOAT","TEXTURE_FILTER_LINEAR_HALF_FLOAT","TEXTURE_FILTER_ANISOTROPIC","COLOR_ATTACHMENT_RGBA32F","COLOR_ATTACHMENT_FLOAT","COLOR_ATTACHMENT_HALF_FLOAT","GLSL_FRAG_DATA","GLSL_FRAG_DEPTH","GLSL_DERIVATIVES","GLSL_TEXTURE_LOD","testTexture","testFb","clearFlags","Mt","root_","size_","array_","It","addAll","interfaces_","getClass","equalsWithTolerance","doubleToLongBits","longBitsToDouble","isInfinite","NULL_ORDINATE","DimensionalComparator","serialVersionUID","setOrdinate","equals2D","getOrdinate","equals3D","equalInZ","distance3D","hashCode","setCoordinate","_dimensionsToTest","INTERIOR","BOUNDARY","EXTERIOR","toLocationSymbol","LOG_10","append","setCharAt","intValue","isWhitespace","_hi","_lo","TWO_PI","PI_2","EPS","SPLIT","MAX_PRINT_DIGITS","TEN","SCI_NOT_EXPONENT_CHAR","SCI_NOT_ZERO","extractSignificantDigits","magnitude","selfAdd","sqr","doubleValue","selfSubtract","getSpecialNumberString","selfDivide","dump","createNaN","ge","selfMultiply","reciprocal","rint","selfSqr","toStandardNotation","toSciNotation","stringOfChar","signum","isDigit","DP_SAFE_EPSILON","orientationIndex","orientationIndexFilter","signOfDet2x2","getCoordinate","getCoordinateCopy","getDimension","getX","expandEnvelope","getY","toCoordinateArray","arraycopy","_minx","_maxx","_miny","_maxy","getArea","isNull","getMaxX","getMaxY","getMinX","getMinY","expandToInclude","setToNull","maxExtent","expandBy","centre","typeStr","emptyTypeStr","spaces","parenComma","doubleParenComma","trimParens","geometryFactory","extractGeometry","getGeometryType","coordinate","_coordinates","multipoint","_geometries","linestring","_points","linearring","multilinestring","_shell","_holes","multipolygon","geometrycollection","createPoint","createMultiPoint","createLineString","createLinearRing","createMultiLineString","createPolygon","createMultiPolygon","createGeometryCollection","toLineString","tt","et","shouldNeverReachHere","isTrue","nt","_result","_inputLines","_intPt","_intLineIndex","_isProper","_pa","_pb","_precisionModel","DONT_INTERSECT","DO_INTERSECT","COLLINEAR","NO_INTERSECTION","POINT_INTERSECTION","COLLINEAR_INTERSECTION","getIndexAlongSegment","computeIntLineIndex","getTopologySummary","isEndPoint","isCollinear","computeIntersection","computeIntersect","getIntersectionNum","getEdgeDistance","isProper","hasIntersection","setPrecisionModel","isInteriorIntersection","computeEdgeDistance","getEndpoint","isIntersection","getIntersectionAlongSegment","nonRobustComputeEdgeDistance","rt","isInSegmentEnvelopes","normalizeToMinimum","smallestInAbsValue","safeHCoordinateIntersection","nearestEndpoint","intersectionWithNormalization","makePrecise","checkDD","println","normalizeToEnvCentre","computeCollinearIntersection","distancePointLine","ot","st","_p","_crossingCount","_isPointOnSegment","countSegment","isPointInPolygon","getLocation","isOnSegment","locatePointInRing","ut","RIGHT","COUNTERCLOCKWISE","LEFT","STRAIGHT","signedArea","distanceLineLine","isPointInRing","computeLength","isCCW","computeOrientation","distancePointLinePerpendicular","isOnLine","ct","_envelope","_factory","_SRID","_userData","getSRID","SORTINDEX_POINT","SORTINDEX_MULTIPOINT","SORTINDEX_LINESTRING","SORTINDEX_LINEARRING","SORTINDEX_MULTILINESTRING","SORTINDEX_POLYGON","SORTINDEX_MULTIPOLYGON","SORTINDEX_GEOMETRYCOLLECTION","geometryChangedFilter","getSortIndex","getFactory","getGeometryN","isRectangle","equalsTopo","equalsExact","geometryChanged","geometryChangedAction","equalsNorm","getLength","getNumGeometries","compareToSameClass","getUserData","getEnvelope","toGeometry","getEnvelopeInternal","checkNotGeometryCollection","getPrecisionModel","computeEnvelopeInternal","setSRID","setUserData","isGeometryCollectionOrDerived","hasNonEmptyElements","hasNullElements","ht","ft","dt","Mod2BoundaryNodeRule","EndPointBoundaryNodeRule","MultiValentEndPointBoundaryNodeRule","MonoValentEndPointBoundaryNodeRule","MOD2_BOUNDARY_RULE","ENDPOINT_BOUNDARY_RULE","MULTIVALENT_ENDPOINT_BOUNDARY_RULE","MONOVALENT_ENDPOINT_BOUNDARY_RULE","OGC_SFS_BOUNDARY_RULE","isInBoundary","yt","_t","mt","vt","Et","xt","Nt","ensureCapacity","Ct","arrayList_","position_","St","coordArrayType","closeRing","Lt","ForwardComparator","BidirectionalComparator","wt","Ot","isRing","ptNotInList","scroll","hasRepeatedPoints","removeRepeatedPoints","removeNull","copyDeep","isEqualReversed","envelope","atLeastNCoordinatesOrNothing","increasingDirection","minCoordinate","OLDcompare","Tt","entrySet","Rt","Pt","Dt","hashSet_","fixAfterInsertion","rotateLeft","rotateRight","getFirstEntry","At","Ft","treeSet_","Gt","asList","Bt","FALSE","TRUE","DONTCARE","SYM_FALSE","SYM_TRUE","SYM_DONTCARE","SYM_P","SYM_L","SYM_A","toDimensionSymbol","toDimensionValue","Vt","Ut","isDone","isGeometryChanged","zt","getCoordinates","getNumPoints","isEquivalentClass","getBoundaryDimension","getBoundary","Xt","Yt","_geom","_geomFact","_bnRule","_endpointMap","boundaryMultiLineString","getEmptyMultiPoint","computeBoundaryCoordinates","createMultiPointFromCoords","Kt","boundaryLineString","getStartPoint","getEndPoint","addEndpoint","getCoordinateN","kt","jt","Ht","NEWLINE","SIMPLE_ORDINATE_FORMAT","chars","getStackTrace","printStackTrace","readLine","Wt","copyCoord","ensureValidRing","createClosedRing","getPointN","getCoordinateSequence","getCoordinateSequenceFactory","isCoordinate","Jt","Qt","Zt","$t","getNumInteriorRing","convexHull","getExteriorRing","getInteriorRingN","validateConstruction","MINIMUM_VALID_SIZE","ne","ie","_isUserDataCopied","NoOpGeometryOperation","CoordinateOperation","CoordinateSequenceOperation","setCopyUserData","edit","editInternal","editGeometryCollection","editPolygon","getName","GeometryEditorOperation","oe","editCoordinates","ue","_dimension","pe","instanceObject","readResolve","he","map_","fe","_modelType","_scale","FLOATING","FIXED","setScale","maximumPreciseValue","getMaximumSignificantDigits","isFloating","FLOATING_SINGLE","mostPrecise","_name","nameToTypeMap","ye","_coordinateSequenceFactory","getDefaultCoordinateSequenceFactory","me","buildGeometry","toGeometryArray","toPolygonArray","toLineStringArray","toPointArray","createGeometry","toMultiPolygonArray","toMultiLineStringArray","toMultiPointArray","toLinearRingArray","createPointFromInternalCoord","Ie","Ee","Feature","FeatureCollection","Point","MultiPoint","LineString","MultiLineString","MultiPolygon","GeometryCollection","Ne","precisionModel","reducePrecision","Ce","Se","Le","ON","opposite","_minIndex","_minCoord","_minDe","_orientedDe","getRightmostSide","getRightmostSideOfSegment","checkForRightmostCoordinate","findRightmostEdgeAtVertex","getEdge","findRightmostEdgeAtNode","getNode","getEdges","getRightmostEdge","isForward","getSym","findEdge","we","msgWithCoord","Oe","addLast","removeFirst","Te","_finder","_dirEdgeList","_nodes","_rightMostCoord","_env","clearVisitedEdges","setVisited","getRightmostCoordinate","computeNodeDepth","isVisited","computeDepths","copySymDepths","computeDepth","setEdgeDepths","addReachable","findResultEdges","getDepth","isInteriorAreaEdge","setInResult","setDepth","getNodes","getDirectedEdges","Re","setAllLocations","setAllLocationsIfNull","isLine","getLocations","setLocations","isArea","isAnyNull","setLocation","isEqualOnSide","allPositionsEqual","Pe","elt","getGeometryCount","toLine","toLineLabel","De","_startDe","_maxNodeDegree","_edges","_pts","_label","_isHole","_geometryFactory","computePoints","computeRing","isIsolated","getEdgeRing","getLabel","mergeLabel","addPoints","setEdgeRing","getNext","getLinearRing","computeMaxNodeDegree","getOutgoingDegree","isHole","containsPoint","addHole","isShell","getMaxNodeDegree","getShell","setShell","toPolygon","Me","setMinEdgeRing","getNextMin","Ae","buildMinimalRings","getMinEdgeRing","linkDirectedEdgesForMinimalEdgeRings","linkMinimalDirectedEdges","Fe","_isCovered","_isCoveredSet","_isVisited","isCovered","isCoveredSet","setLabel","setCovered","updateIM","computeIM","Ge","_coord","isIncidentEdgeInResult","computeMergedLocation","setNode","setLabelBoundary","qe","nodeMap","nodeFact","addNode","createNode","getBoundaryNodes","Be","Ve","NE","NW","SW","SE","isNorthern","isOpposite","commonHalfPlane","isInHalfPlane","Ue","_edge","_node","_p0","_p1","_dx","_dy","_quadrant","compareDirection","getDy","getDirectedCoordinate","getDx","getQuadrant","computeLabel","ze","_isForward","_sym","_nextMin","_edgeRing","_minEdgeRing","_depth","computeDirectedLabel","setNextMin","getDepthDelta","isLineEdge","printEdge","printReverse","setSym","setVisitedEdge","setNext","depthFactor","Xe","Ye","_edgeEndList","printEdges","eiList","getNodeIterator","linkResultDirectedEdges","debugPrintln","isBoundaryNode","linkAllDirectedEdges","matchInSameDirection","getEdgeEnds","debugPrint","getEdgeIterator","findEdgeInSameDirection","insertEdge","findEdgeEnd","addEdges","ke","_shellList","sortShellsAndHoles","computePolygons","placeFreeHoles","findEdgeRingContaining","buildMinimalEdgeRings","findShell","placePolygonHoles","buildMaximalEdgeRings","getPolygons","je","He","_bounds","We","_items","poll","reorder","Ke","visitItem","Je","Qe","_childBoundables","_level","Ze","getLevel","getChildBoundables","addChildBoundable","computeBounds","$e","reverseOrder","singletonList","tn","_boundable1","_boundable2","_distance","_itemDistance","expandToQueue","isLeaves","getBoundable","en","_built","_itemBoundables","_nodeCapacity","DEFAULT_NODE_CAPACITY","nn","IntersectsOp","getNodeCapacity","lastNode","removeItem","itemsTree","boundablesAtLevel","getIntersectsOp","createHigherLevels","getRoot","createParentBoundables","getComparator","compareDoubles","rn","sn","STRtreeNode","xComparator","yComparator","intersectsOp","createParentBoundablesFromVerticalSlices","createParentBoundablesFromVerticalSlice","verticalSlices","nearestNeighbour","centreX","avg","centreY","un","relativeSign","compareValue","_segString","_segmentOctant","_isInterior","isInterior","cn","_nodeMap","getSplitCoordinates","addEndpoints","addEdgeCoordinates","addCollapsedNodes","findCollapsesFromInsertedNodes","findCollapsesFromExistingVertices","addSplitEdges","createSplitEdge","findCollapseIndex","gn","getSegmentOctant","checkSplitEdgesCorrectness","pn","octant","hn","addIntersection","_nodeList","safeOctant","addIntersectionNode","getNodeList","addIntersections","getNodedSubstrings","dn","isVertical","projectionFactor","distancePerpendicular","midPoint","closestPoints","lineIntersection","pointAlongOffset","setCoordinates","segmentFraction","isHorizontal","pointAlong","tempEnv1","tempEnv2","_overlapSeg1","_overlapSeg2","overlap","getLineSegment","mn","_start","_end","_context","_id","computeSelect","select","computeOverlaps","computeOverlapsInternal","setId","getEndIndex","getStartIndex","getId","vn","getChainStartIndices","findChainEnd","toIntArray","getChains","In","computeNodes","En","_segInt","setSegmentIntersector","xn","_monoChains","_idCounter","_nodedSegStrings","_nOverlaps","SegmentOverlapAction","getMonotoneChains","intersectChains","Nn","_si","processIntersections","Cn","_quadrantSegments","DEFAULT_QUADRANT_SEGMENTS","_endCapStyle","CAP_ROUND","_joinStyle","JOIN_ROUND","_mitreLimit","DEFAULT_MITRE_LIMIT","_isSingleSided","_simplifyFactor","DEFAULT_SIMPLIFY_FACTOR","setQuadrantSegments","setEndCapStyle","setJoinStyle","setMitreLimit","Sn","CAP_FLAT","CAP_SQUARE","JOIN_MITRE","JOIN_BEVEL","getEndCapStyle","isSingleSided","getJoinStyle","setSimplifyFactor","getSimplifyFactor","getQuadrantSegments","getMitreLimit","setSingleSided","bufferDistanceError","Ln","_distanceTol","_isDeleted","_angleOrientation","_inputLine","bn","INIT","DELETE","NUM_PTS_TO_CHECK","isDeletable","isConcave","isShallow","isShallowSampled","deleteShallowConcavities","findNextNonDeletedIndex","isShallowConcavity","collapseLine","wn","_ptList","_minimimVertexDistance","On","COORDINATE_ARRAY_TYPE","addPt","isRedundant","revere","addPts","setMinimumVertexDistance","Tn","Rn","PI_TIMES_2","PI_OVER_2","PI_OVER_4","isAcute","isObtuse","interiorAngle","normalizePositive","angleBetween","getTurn","angleBetweenOriented","Pn","_maxCurveSegmentError","_filletAngleQuantum","_closingSegLengthFactor","_segList","_bufParams","_li","_s0","_s1","_s2","_seg0","_seg1","_offset0","_offset1","_side","_hasNarrowConcaveAngle","MAX_CLOSING_SEG_LEN_FACTOR","Dn","OFFSET_SEGMENT_SEPARATION_FACTOR","INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR","CURVE_VERTEX_SNAP_DISTANCE_FACTOR","addNextSegment","computeOffsetSegment","addCollinear","addOutsideTurn","addInsideTurn","addLineEndCap","addFilletArc","addMitreJoin","addLimitedMitreJoin","addFilletCorner","addBevelJoin","createSquare","addSegments","addFirstSegment","addLastSegment","initSideSegments","createCircle","hasNarrowConcaveAngle","Mn","getOffsetCurve","getSegGen","computePointCurve","computeOffsetCurve","computeSingleSidedBufferCurve","simplifyTolerance","computeRingBufferCurve","computeLineBufferCurve","getLineCurve","getBufferParameters","getRingCurve","copyCoordinates","An","_subgraphs","_seg","_cga","Fn","DepthSegment","findStabbedSegments","Gn","_leftDepth","_upwardSeg","qn","interpolateZ","longestSideLength","circumcentre","area3D","centroid","inCentre","perpendicularBisector","angleBisector","Bn","_inputGeom","_curveBuilder","_curveList","addPoint","addCurve","addPolygon","isErodedCompletely","addPolygonRing","isTriangleErodedCompletely","addLineString","getCurves","addCollection","Vn","locate","Un","_parent","_atStart","_max","_subcollectionIterator","isAtomic","zn","containsPointInPolygon","Xn","_edgeMap","_edgeList","_ptInAreaLocation","getNextCW","propagateSideLabels","isAreaLabelsConsistent","computeEdgeEndLabels","getBoundaryNodeRule","checkAreaLabelsConsistent","computeLabelling","getDegree","insertEdgeEnd","Yn","_resultAreaEdgeList","_SCANNING_FOR_INCOMING","_LINKING_TO_OUTGOING","getResultAreaEdges","updateLabelling","mergeSymLabels","findCoveredLineEdges","kn","jn","_orientation","compareOriented","Hn","_ocaMap","findEdgeIndex","findEqualEdge","Wn","Kn","_hasIntersection","_hasProper","_hasProperInterior","_hasInterior","_properIntersectionPoint","_isSelfIntersection","numIntersections","numInteriorIntersections","numProperIntersections","numTests","isTrivialIntersection","isAdjacentSegments","getProperIntersectionPoint","hasProperInteriorIntersection","getLineIntersector","hasProperIntersection","hasInteriorIntersection","Jn","getSegmentIndex","Qn","pts","ni","Zn","$n","env1","env2","computeIntersectsForChain","getStartIndexes","computeIntersects","ti","NULL_VALUE","ei","getDelta","depthAtLocation","_mce","_isIsolated","_depthDelta","getCollapsedEdge","setIsolated","setName","isCollapsed","getMaximumSegmentIndex","getMonotoneChainEdge","isPointwiseEqual","setDepthDelta","getEdgeIntersectionList","setAtLeastIfValid","_workingPrecisionModel","_workingNoder","_graph","setWorkingPrecisionModel","insertUniqueEdge","depthDelta","buildSubgraphs","createSubgraphs","createEmptyResultGeometry","getNoder","computeNodedEdges","setNoder","convertSegStrings","ri","_noder","_scaleFactor","_offsetX","_offsetY","_isScaled","isIntegerPrecision","rescale","_segStrings","fact","checkEndPtVertexIntersections","checkInteriorIntersections","checkValid","checkCollapses","checkCollapse","_originalPt","_ptScaled","_p0Scaled","_p1Scaled","_corner","_safeEnv","initCorners","ui","SAFE_ENV_EXPANSION_FACTOR","intersectsScaled","intersectsToleranceSquare","copyScaled","getSafeEnvelope","intersectsPixelClosure","addSnappedNode","li","selectedSegment","ci","HotPixelSnapAction","isNodeAdded","_hotPixel","_parentEdge","_hotPixelVertexIndex","_isNodeAdded","fi","_interiorIntersections","getInteriorIntersections","gi","_pm","_pointSnapper","checkCorrectness","snapRound","findInteriorIntersections","computeIntersectionSnaps","computeVertexSnaps","_argGeom","_resultGeometry","_saveException","CAP_BUTT","MAX_PRECISION_DIGITS","bufferFixedPrecision","bufferReducedPrecision","precisionScaleFactor","computeGeometry","bufferOriginalPrecision","getResultGeometry","bufferOp","_isNull","setMinimum","setMaximum","mi","computeDistance","vi","_maxPtDist","Ii","MaxPointDistanceFilter","MaxMidpointDistanceFilter","computeMaxMidpointDistance","getMaxPointDistance","computeMaxVertexDistance","Ei","findDistance","getDistancePoints","_minPtDist","Ni","_comps","Ci","_lines","_isForcedToLineString","setForceToLineString","getLines","Si","_boundaryRule","_isIn","_numBoundaries","locateInternal","locateInPolygonRing","updateLocationInfo","computeLocation","Li","_component","_segIndex","INSIDE_AREA","bi","isInsideArea","getGeometryComponent","wi","getPoints","Oi","_locations","Ti","_terminateDistance","_ptLocator","_minDistanceLocation","_minDistance","computeContainmentDistance","computeMinDistanceLinesPoints","computeMinDistance","computeFacetDistance","computeMinDistanceLines","updateMinDistance","computeMinDistancePoints","nearestLocations","nearestPoints","isWithinDistance","Ri","Pi","Di","_g0","_g1","_ptDist","_densifyFrac","Mi","MaxDensifiedByFractionDistanceFilter","setDensifyFraction","computeOrientedDistance","Ai","Fi","orientedDistance","_euclideanDist","_numSubSegs","Gi","_minValidDistance","_maxValidDistance","_minDistanceFound","_maxDistanceFound","_isValid","_errMsg","_errorLocation","_errorIndicator","_bufDistance","qi","VERBOSE","MAX_DISTANCE_DIFF_FRAC","checkMaximumDistance","checkPositiveValid","checkNegativeValid","getPolygonLines","checkMinimumDistance","getErrorIndicator","getErrorLocation","getErrorMessage","Bi","_errorMsg","Vi","MAX_ENV_DIFF_FRAC","checkPolygonal","checkExpectedEmpty","checkEnvelope","checkArea","checkDistance","report","isValidMsg","Ui","zi","_findAllIntersections","_isCheckEndSegmentsOnly","_interiorIntersection","_intSegments","_intersections","_intersectionCount","_keepIntersections","getInteriorIntersection","setCheckEndSegmentsOnly","getIntersectionSegments","getIntersections","setFindAllIntersections","setKeepIntersections","isEndSegment","createAllIntersectionsFinder","createAnyIntersectionFinder","createIntersectionCounter","Xi","execute","computeIntersections","Yi","_nv","toSegmentStrings","ki","_mapOp","ji","_op","_lineEdgesList","_resultLineList","collectLines","getGraph","collectLineEdge","collectBoundaryTouchEdge","labelIsolatedLine","getArgGeometry","buildLines","Lr","isResultOfOp","isCoveredByA","labelIsolatedLines","Hi","_resultPointList","filterCoveredNodeToPoint","isCoveredByLA","extractNonCoveredResultNodes","Wi","_pruneEmptyGeometry","_preserveGeometryCollectionType","_preserveCollections","_preserveType","transformCoordinates","transformPolygon","transformLinearRing","createCoordinateSequence","getInputGeometry","transformMultiLineString","transformLineString","transformMultiPoint","transformMultiPolygon","transformGeometryCollection","Ki","_snapTolerance","_srcPts","_allowSnappingToSourceVertices","_isClosed","snapVertices","findSnapForVertex","snapTo","snapSegments","findSegmentIndexToSnap","setAllowSnappingToSourceVertices","Ji","_srcGeom","Qi","SNAP_PRECISION_FACTOR","extractTargetCoordinates","Zi","snapToSelf","computeSnapTolerance","computeMinimumSegmentLength","computeOverlaySnapTolerance","computeSizeBasedSnapTolerance","_snapPts","_isSelfSnap","snapLine","$i","_isFirst","_commonMantissaBitsCount","_commonBits","_commonSignExp","getCommon","signExpBits","numCommonMostSigMantissaBits","zeroLowerBits","toBinaryString","getBit","tr","_commonCoord","_ccFilter","nr","CommonCoordinateFilter","Translater","addCommonBits","ir","removeCommonBits","getCommonCoordinate","_commonBitsX","_commonBitsY","trans","rr","_cbr","selfSnap","prepareResult","overlayOp","UNION","symDifference","SYMDIFFERENCE","DIFFERENCE","mce","chainIndex","ar","_xValue","_eventType","_insertEvent","_deleteEventIndex","_obj","INSERT","isDelete","setDeleteEventIndex","getObject","getInsertEvent","isInsert","isSameLabel","getDeleteEventIndex","_includeProper","_recordIsolated","_numIntersections","_bdyNodes","_isDone","_isDoneWhenProperInt","setIsDoneIfProperInt","isBoundaryPointInternal","isBoundaryPoint","setBoundaryNodes","nOverlaps","prepareEvents","processOverlaps","addEdge","_min","fr","NodeComparator","getMin","getMax","gr","yr","_node1","_node2","buildExtent","_leaves","buildTree","buildLevel","buildRoot","mr","getItems","vr","xr","Ir","SegmentVisitor","IntervalIndexedGeometry","Er","_counter","addLine","Nr","_parentGeom","_lineEdgeMap","_boundaryNodeRule","_useBoundaryDeterminationRule","_argIndex","_boundaryNodes","_hasTooFewPoints","_invalidPoint","_areaPtLocator","insertBoundaryPoint","determineBoundary","computeSelfNodes","createEdgeSetIntersector","addSelfIntersectionNodes","computeSplitEdges","computeEdgeIntersections","hasTooFewPoints","insertPoint","getInvalidPoint","getBoundaryPoints","addSelfIntersectionNode","Cr","_resultPrecisionModel","_arg","setComputationPrecision","Sr","MapOp","_resultGeom","_resultPolyList","cancelDuplicateResultEdges","createEmptyResult","replaceCollapsedEdges","updateNodeLabelling","computeOverlay","insertUniqueEdges","copyPoints","computeLabelsFromDepths","labelIncompleteNodes","findResultAreaEdges","labelIncompleteNode","resultDimension","br","_boundaryDistanceTolerance","_linework","extractLinework","isWithinToleranceOfBoundary","wr","getLinework","Or","_doLeft","_doRight","extractPoints","computeOffsetPoints","setSidesToGenerate","Tr","_locFinder","_location","_invalidLocation","TOLERANCE","_testCoords","computeBoundaryDistanceTolerance","Rr","reportResult","addTestPts","hasLocation","isValidResult","getInvalidLocation","Pr","_geomFactory","_skipEmpty","_inputGeoms","extractFactory","extractElements","combine","Dr","_inputPolys","Mr","STRTREE_NODE_CAPACITY","reduceToGeometries","unionTree","extractByEnvelope","unionOptimized","unionActual","unionUsingEnvelopeIntersection","binaryUnion","unionSafe","repeatedUnion","restrictToPolygons","bufferUnion","Ar","GeoJSONReader","GeoJSONWriter","OverlayOp","UnionOp","BufferOp","stringOrChar","passedObj","maxLength","_stringify","currentIndent","reserved","keyPart","nextIndent","prettified","stringLiteral","MODULE_INJECTORS","DECLARATION_INJECT_MARKER","REGEX_START_OF_MAIN","REGEX_END_OF_MAIN","fragments","injectShader","injectStandardStubs","isVertex","fragmentData","fragmentString","combineInjects","injects","getChildMapping","mapFn","isValidElement","mapper","getProp","getNextChildMapping","prevChildMapping","onExited","nextChildMapping","getValueForKey","nextKeysPending","pendingKeys","prevKey","childMapping","pendingNextKey","mergeChildMappings","hasPrev","prevChild","isLeaving","in","exit","TransitionGroup","handleExited","contextValue","isMounting","firstRender","componentDidMount","mounted","componentWillUnmount","appear","currentChildMapping","childFactory","TransitionGroupContext","Provider","Ripple","_props$pulsate","pulsate","rippleX","rippleY","rippleSize","inProp","_props$onExited","leaving","setLeaving","rippleClassName","ripple","rippleVisible","ripplePulsate","rippleStyles","childClassName","childLeaving","childPulsate","timeoutId","TouchRipple","_props$center","centerProp","ripples","setRipples","rippleCallback","ignoringMouseDown","startTimer","startTimerCommit","startCommit","oldRipples","_options$pulsate","_options$center","_options$fakeElement","fakeElement","sizeX","sizeY","persist","borderRadius","animationDuration","ButtonBase","buttonRefProp","buttonRef","_props$centerRipple","centerRipple","_props$disabled","_props$disableRipple","disableRipple","_props$disableTouchRi","disableTouchRipple","_props$focusRipple","focusRipple","focusVisibleClassName","onBlur","onFocus","onFocusVisible","onKeyUp","onMouseDown","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","_props$tabIndex","TouchRippleProps","_props$type","rippleRef","focusVisible","setFocusVisible","_useIsFocusVisible","focusVisibleRef","useRippleHandler","rippleAction","eventCallback","skipRippleAction","focus","handleMouseDown","handleDragLeave","handleMouseUp","handleMouseLeave","handleTouchStart","handleTouchEnd","handleTouchMove","handleBlur","handleFocus","currentTarget","isNonNativeButton","keydownRef","handleKeyUp","defaultPrevented","ComponentProp","buttonProps","handleUserRef","handleOwnRef","handleRef","_React$useState2","mountedState","setMountedState","enableTouchRipple","alignItems","justifyContent","WebkitTapHighlightColor","margin","cursor","verticalAlign","textDecoration","borderStyle","colorAdjust","propIsEnumerable","test1","test2","test3","shouldUseNative","baseIsEqualDeep","bitmask","tag","mapCacheClear","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","setCacheAdd","setCacheHas","SetCache","arrayFilter","stubArray","nativeGetSymbols","getSymbols","reIsUint","baseIsTypedArray","baseUnary","nodeUtil","nodeIsTypedArray","isTypedArray","freeProcess","argsTag","mapTag","objectTag","setTag","reIsHostCtor","typedArrayTags","moduleExports","arraySome","predicate","mapToArray","setToArray","arrayProto","funcProto","coreJsData","funcToString","maskSrcKey","IE_PROTO","nativeObjectToString","reIsNative","nativeIsBuffer","nativeKeys","symbolProto","symbolValueOf","Hash","inherited","isArr","isArg","isBuff","isType","skipIndexes","baseTimes","isIndex","assocIndexOf","isOwn","unmasked","equalFunc","objIsArr","othIsArr","objTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","convert","isPartial","stacked","equalByTag","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","objProps","getAllKeys","objLength","othLength","skipCtor","objValue","othValue","compared","objCtor","othCtor","equalObjects","isMasked","isPrototype","arrValue","othIndex","keysFunc","symbolsFunc","arrayPush","baseGetAllKeys","getMapData","pairs","LARGE_ARRAY_SIZE","resIndex","matchesSelector","matchesSelectorAndParentsTo","baseNode","addEvent","inputOptions","capture","removeEvent","outerHeight","computedStyle","_shims","borderTopWidth","borderBottomWidth","outerWidth","borderLeftWidth","borderRightWidth","paddingTop","paddingBottom","paddingLeft","paddingRight","offsetXYFromParent","offsetParent","offsetParentRect","createCSSTransform","controlPos","positionOffset","translation","_getPrefix","browserPrefixToKey","createSVGTransform","getTouch","getTouchIdentifier","addUserSelectStyles","styleEl","addClassName","removeUserSelectStyles","removeClassName","removeAllRanges","matchesSelectorFunc","unitSuffix","defaultX","defaultY","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","URI","traverse","inlineRef","inlineRefs","resolveSchema","refPath","_getFullPath","getFullPath","resolveRecursive","getJsonPointer","parsedRef","resolveUrl","fullPath","baseIds","fullPaths","allKeys","sch","jsonPtr","rootSchema","parentJsonPtr","parentKeyword","parentSchema","keyIndex","PREVENT_SCOPE_CHANGE","$ref","SIMPLE_INLINED","checkNoRef","countKeys","TRAILING_SLASH_HASH","missingRef","missingSchema","errorSubclass","Subclass","ajv","validation","arrayBuffers","getPrototype","overArg","requirePropFactory","componentNameInError","unsupportedProp","propFullName","overRest","setToString","shared","copyright","dPs","Empty","createDict","iframeDocument","iframe","contentWindow","Properties","TAG","LIBRARY","wksExt","$Symbol","baseForOwn","castFunction","reIsDeepProp","reIsPlainProp","Checkboard","_react2","_reactcss2","checkboard","renderers","boxShadow","grid","isPointOnLineSegment","lineSegmentStart","lineSegmentEnd","excludeBoundary","dxl","dyl","ptCoords","lineCoords","ignoreEndVertices","bearing_1","distance_1","destination_1","line_intersect_1","closestPt","stop_1","sectionLength","heightDistance","perpendicularPt1","perpendicularPt2","intersectPt","implementation","hasSymbols","toStr","origDefineProperty","supportsDescriptors","arePropertyDescriptorsSupported","predicates","DEFAULT_LINE_COLOR","DEFAULT_FILL_COLOR","DEFAULT_SELECTED_LINE_COLOR","DEFAULT_SELECTED_FILL_COLOR","DEFAULT_TENTATIVE_LINE_COLOR","DEFAULT_TENTATIVE_FILL_COLOR","DEFAULT_EDITING_EXISTING_POINT_COLOR","DEFAULT_EDITING_INTERMEDIATE_POINT_COLOR","DEFAULT_EDITING_SNAP_POINT_COLOR","DEFAULT_EDITING_POINT_OUTLINE_COLOR","DEFAULT_EDIT_MODE","DrawPolygonMode","guideAccessor","guideMaybeWrapped","unwrapGuide","getEditHandleColor","onEdit","pickingRadius","pickingDepth","lineJointRounded","lineMiterLimit","pointRadiusScale","pointRadiusMinPixels","pointRadiusMaxPixels","isSelected","getTentativeLineColor","getTentativeFillColor","getTentativeLineWidth","editHandlePointRadiusScale","editHandlePointOutline","editHandlePointStrokeWidth","editHandlePointRadiusMinPixels","editHandlePointRadiusMaxPixels","getEditHandlePointColor","getEditHandlePointOutlineColor","getEditHandlePointRadius","editHandleIconAtlas","editHandleIconMapping","editHandleIconSizeScale","getEditHandleIcon","getEditHandleIconSize","getEditHandleIconColor","getEditHandleIconAngle","modeNameMapping","ViewMode","modify","ModifyMode","SnappableMode","TranslateMode","TransformMode","ScaleMode","RotateMode","duplicate","DuplicateMode","SplitPolygonMode","extrude","ExtrudeMode","ElevationMode","drawPoint","DrawPointMode","drawLineString","DrawLineStringMode","drawPolygon","drawRectangle","DrawRectangleMode","drawSquareFromCenter","DrawSquareFromCenterMode","drawCircleFromCenter","DrawCircleFromCenterMode","drawCircleByBoundingBox","DrawCircleByDiameterMode","drawEllipseByBoundingBox","DrawEllipseByBoundingBoxMode","drawRectangleUsing3Points","DrawRectangleUsingThreePointsMode","drawEllipseUsing3Points","DrawEllipseUsingThreePointsMode","draw90DegreePolygon","Draw90DegreePolygonMode","drawPolygonByDragging","DrawPolygonByDraggingMode","EditableGeoJsonLayer","subLayerProps","selectionAwareAccessor","_subLayerProps","GeoJsonLayer","selectedFeatures","selectedIndexes","onUpdateCursor","selectedFeatureIndexes","getModeProps","pointLayerProps","tooltips","EditableLayer","getEditHandlesForGeometry","featureAsPick","getPickedExistingEditHandle","intermediatePoint","positionIndexPrefix","referencePoint","lineStringFeature","candidateIntermediatePoint","nearestPointOnProjectedLine","nearestPointOnLine","pickedExistingHandle","pickedIntermediateHandle","getPickedIntermediateEditHandle","ignored","editHandle","getPickedEditHandle","editHandleProperties","getCursor","getTranslateAction","isSelectionPicked","getSelectedFeaturesAsFeatureCollection","startDragPoint","currentPoint","distanceMoved","movedFeatures","selectedIndex","movedFeature","clickedCoord","clickedEditHandle","positionAdded","polygonToAdd","DeckCache","_idToPosition","originals","numeric","anum","bnum","rcompareIdentifiers","versionA","versionB","compareBuild","satisfies","hilo","gtfn","ltefn","ltfn","ecomp","Adder","adder","bv","av","quarterPi","streamGeometry","stream","streamGeometryType","streamObjectType","Sphere","sphere","streamLine","streamPolygon","closed","lineStart","lineEnd","polygonStart","polygonEnd","cartesian","cartesianDot","cartesianCross","cartesianAddInPlace","cartesianScale","cartesianNormalizeInPlace","compose","rotationIdentity","rotateRadians","deltaPhi","deltaGamma","rotationLambda","rotationPhiGamma","forwardRotationLambda","cosDeltaPhi","sinDeltaPhi","cosDeltaGamma","sinDeltaGamma","circleStream","cosRadius","sinRadius","circleRadius","rejoin","Intersection","compareIntersection","startInside","interpolate","clip","pointEqual","ascendingBisect","arrays","clipExtent","x__","y__","v__","x_","y_","v_","activeStream","bufferStream","clipBuffer","clipStream","linePoint","polygonInside","cleanInside","clipPolygon","clipLine","point0","lambda0","phi0","sinPhi0","cosPhi0","sinPhi1","cosPhi1","point1","absDelta","antimeridian","arc","phiArc","areaStream","boundsStream","PathContext","_radius","pointRadius","_line","_point","closePath","moveTo","lineTo","PathString","_string","circle","_circle","pointVisible","sink","rotatedStart","ringBuffer","ringSink","polygonStarted","pointRing","ringStart","ringEnd","polygonContains","pointLine","ringSegments","validSegment","sign0","sign1","sinLambda0Lambda1","clipAntimeridianIntersect","smallRadius","notHemisphere","two","n2","n2n2","n1n2","n1xn2","uu","polar","v00","point2","transformer","methods","TransformStream","fitExtent","projection","geoStream","fitSize","cosMinDistance","delta2","resampleLineTo","dx2","dy2","dz","lambda00","x00","y00","resampleStream","ringPoint","resampleNone","transformRadians","projectionMutator","projectAt","projectRotate","cacheStream","preclip","clipAntimeridian","postclip","projectResample","projectTransform","recenter","clipAngle","clipCircle","azimuthalRaw","azimuthalInvert","cc","azimuthalEqualAreaRaw","cxcy","azimuthalEquidistantRaw","mercatorRaw","equirectangularRaw","gnomonicRaw","naturalEarth1Raw","phi4","orthographicRaw","stereographicRaw","transverseMercatorRaw","bufferFeature","steps","buffered","defineProjection","projected","projectCoords","coordsIsNaN","unprojectCoords","multiBuffered","workerURLCache","getLoadableWorkerURL","workerURL","getLoadableWorkerURLFromSource","workerUrl","getLoadableWorkerURLFromURL","workerSource","isTransferable","MessagePort","OffscreenCanvas","transferList","getTransferList","recursive","transfersSet","transfers","lineno","payload","onMessage","job","startPromise","jobQueue","workerThread","queuedJob","backlog","isDestroyed","idleQueue","onDebug","WorkerThread","WorkerFarm","workerPools","workerPool","getWorkerURL","workerOptions","workerFile","versionTag","canParseWithWorker","workerFarm","parseOnMainThread","polygonToLine","multiPolygonToLine","coordsToLine","overridingProps","sourceObjectIndex","sublayerProps","overridingSublayerProps","overridingSublayerTriggers","sublayerId","subLayerPropTypes","getSubLayerAccessor","passThroughProps","subLayers","shouldUpdate","getSubLayers","transformRotate","mutate","finalAngle","newCoords","testText","firstChar","lastChar","parseTextSync","existingVersion","_registerLoggers","registerLoaders","imagebitmap","premultiplyAlpha","ZustandContext","initialStore","createStore","storeRef","useProviderStore","useContext","useStoreApi","useMemo","objA","objB","keysA","utils","Responsive","WidthProvider","notOk","undef","_types","anyType","_ignore","_conversions","typed","conversions","ignore","findTypeByName","typeName","findTypeIndex","findTypeName","stringifyParams","typeNames","getTypeName","restParam","parseParam","notEmpty","notIgnore","matchingConversions","conversion","filterConversions","exactTypes","typeIndex","conversionIndex","convertibleTypes","hasRestParam","hasConversions","compileTest","test0","compileTests","varIndex","lastTest","testRestParam","getParamAtIndex","signature","getExpectedTypeNames","excludeConversions","isExactType","mergeExpectedParams","signatures","uniq","flatMap","expected","matchingSignatures","nextMatchingDefs","actualType","expectedLength","getLowestTypeIndex","getLowestConversionIndex","compareParams","param1","param2","compareSignatures","signature1","signature2","compileArgConversion","conversion0","conversion1","splitParams","ignoreConversionTypes","_splitParams","typeGroups","filteredTypes","typeGroup","createTypedFunction","signaturesMap","parsedSignatures","parsedParam","isInvalidParam","parseSignature","notNull","parsedSignature","conflictingSignature","hasOverlap","len1","len2","restParam1","restParam2","hasConflictingParams","ok0","ok1","ok2","ok3","ok4","ok5","allOk","test00","test10","test20","test30","test40","test50","test01","test11","test21","test31","test41","test51","fnConvert","compiledConversions","fnPreprocess","compileArgsPreprocessing","fn0","fn1","fn2","fn3","fn4","fn5","len0","len3","len4","len5","generic","arg0","arg1","createSignaturesMap","extractSignatures","validateUnique","_signature","_fn","addType","beforeObjectTest","addConversion","alea","xor128","xorwow","xorshift7","xor4096","tychei","Pbf","Varint","Fixed64","Bytes","Fixed32","utf8TextDecoder","readPackedEnd","pbf","readVarint","toNum","makeRoomForExtraLength","extraLen","realloc","writePackedVarint","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writePackedDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","readFields","readField","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","readVarintRemainder","readVarint64","readSVarint","readBoolean","readString","readUtf8TextDecoder","readUtf8","readBytes","readPackedVarint","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","finish","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","writeUtf8","writeBytes","writeRawMessage","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","modulePath","importFunctionName","moduleMap","multivecChunksToTileDenseArray","tileShape","isRow","fullTileLength","fullTileArray","numSamples","sampleI","ZarrMultivecDataFetcher","HGC","slugid","absToChr","parseChromsizesRows","genomicRangeToChromosomeChunks","DenseDataExtrema1D","minNonZero","maxNonZero","ZarrMultivecDataFetcherClass","dataConfig","chromSizes","finalChrom","maxPos","tile_size","max_width","min_pos","max_pos","max_zoom","validTileIds","tilePromises","validTileId","receivedTiles","tilesetInfo","tsInfo","binSize","tileStart","tileEnd","chromInfo","chrStart","chrStartPos","chrEnd","chrEndPos","chrChunks","chr","chrName","zStart","zEnd","dense","denseDataExtrema","min_value","max_value","server","tilePos","tilePositionId","tilesetUid","zoomLevel","internalRe","rcompare","compareLoose","rsort","coerce","toComparators","maxSatisfying","minSatisfying","minVersion","validRange","outside","gtr","ltr","simplifyRange","subset","LZString","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","compressToBase64","_compress","decompressFromBase64","_decompress","compressToUTF16","decompressFromUTF16","compressToUint8Array","TotalLen","current_value","decompressFromUint8Array","compressToEncodedURIComponent","decompressFromEncodedURIComponent","bitsPerChar","getCharFromInt","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","resetValue","getNextValue","resb","maxpower","enlargeIn","dictSize","calculateSizeAndPositionDataAndUpdateScrollOffset","cellCount","computeMetadataCallback","computeMetadataCallbackProps","nextCellsCount","nextCellSize","nextScrollToIndex","scrollToIndex","updateScrollOffsetForScrollToIndex","CellSizeAndPositionManager","cellSizeGetter","estimatedCellSize","_cellSizeGetter","_cellCount","_estimatedCellSize","_lastMeasuredIndex","lastMeasuredCellSizeAndPosition","getSizeAndPositionOfLastMeasuredCell","_cellSizeAndPositionData","_lastBatchedIndex","_ref3$align","containerSize","currentOffset","idealOffset","getSizeAndPositionOfCell","totalSize","getTotalSize","_findNearestCell","_binarySearch","lastMeasuredIndex","_exponentialSearch","getMaxElementSize","chrome","ScalingCellSizeAndPositionManager","_ref$maxScrollSize","maxScrollSize","_cellSizeAndPositionManager","_maxScrollSize","getCellCount","getEstimatedCellSize","getLastMeasuredIndex","safeTotalSize","offsetPercentage","_getOffsetPercentage","_safeOffsetToOffset","getUpdatedOffsetForIndex","_offsetToSafeOffset","getVisibleCellRange","resetCell","_ref7","createCallbackMemoizer","requireAllKeys","cachedIndices","allInitialized","indexChanged","updateScrollIndexHelper","cellSizeAndPositionManager","previousCellsCount","previousCellSize","previousScrollToAlignment","previousScrollToIndex","previousSize","scrollOffset","scrollToAlignment","sizeJustIncreasedFromZero","updateScrollIndexCallback","hasScrollToIndex","recalc","_class","oRequestAnimationFrame","msRequestAnimationFrame","oCancelAnimationFrame","msCancelAnimationFrame","cancelAnimationTimeout","requestAnimationTimeout","SCROLL_POSITION_CHANGE_REASONS","Grid","_React$PureComponent","_disablePointerEventsTimeoutId","isScrolling","needToResetStyleCache","onSectionRendered","_onGridRenderedMemoizer","columnOverscanStartIndex","_columnStartIndex","columnOverscanStopIndex","_columnStopIndex","columnStartIndex","_renderedColumnStartIndex","columnStopIndex","_renderedColumnStopIndex","rowOverscanStartIndex","_rowStartIndex","rowOverscanStopIndex","_rowStopIndex","rowStartIndex","_renderedRowStartIndex","rowStopIndex","_renderedRowStopIndex","_scrollingContainer","handleScrollEvent","columnSizeAndPositionManager","columnCount","_wrapSizeGetter","columnWidth","_getEstimatedColumnSize","rowSizeAndPositionManager","rowCount","_getEstimatedRowSize","instanceProps","prevColumnWidth","prevRowHeight","prevColumnCount","prevRowCount","prevIsScrolling","prevScrollToColumn","scrollToColumn","prevScrollToRow","scrollToRow","scrollbarSizeMeasured","scrollDirectionHorizontal","scrollDirectionVertical","scrollPositionChangeReason","_initialScrollTop","_getCalculatedScrollTop","_initialScrollLeft","_getCalculatedScrollLeft","_ref$alignment","alignment","_ref$columnIndex","_ref$rowIndex","offsetProps","_ref2$scrollLeft","scrollLeftParam","_ref2$scrollTop","scrollTopParam","_debounceScrollEnded","autoHeight","autoWidth","totalRowsHeight","totalColumnsWidth","_invokeOnScrollMemoizer","_deferredInvalidateColumnIndex","_deferredInvalidateRowIndex","_ref4$columnIndex","_ref4$rowIndex","_recomputeScrollLeftFlag","_recomputeScrollTopFlag","_styleCache","_cellCache","_updateScrollLeftForScrollToColumn","_updateScrollTopForScrollToRow","_handleInvalidatedGridSize","stateUpdate","_getScrollToPositionStateUpdate","sizeIsBiggerThanZero","_invokeOnGridRenderedHelper","_maybeCallOnScrollbarPresenceChange","_this$props5","columnOrRowCountJustIncreasedFromZero","_this$props6","autoContainerWidth","containerProps","containerRole","containerStyle","noContentRenderer","_isScrolling","gridStyle","boxSizing","WebkitOverflowScrolling","willChange","_resetStyleCache","_calculateChildrenToRender","verticalScrollBarSize","horizontalScrollBarSize","_horizontalScrollBarSize","_verticalScrollBarSize","_scrollbarPresenceChanged","overflowX","overflowY","childrenToDisplay","_childrenToDisplay","showNoContentRenderer","_setScrollingContainerRef","onScroll","_onScroll","maxHeight","cellRenderer","cellRangeRenderer","deferredMeasurementCache","overscanColumnCount","overscanIndicesGetter","overscanRowCount","isScrollingOptOut","visibleColumnIndices","visibleRowIndices","horizontalOffsetAdjustment","getOffsetAdjustment","verticalOffsetAdjustment","overscanColumnIndices","overscanCellsCount","scrollDirection","stopIndex","overscanRowIndices","overscanStartIndex","overscanStopIndex","hasFixedHeight","hasFixedWidth","cellCache","styleCache","scrollingResetTimeInterval","_debounceScrollEndedCallback","recomputeGridSize","_this3","_onScrollMemoizer","_this3$props","onScrollbarPresenceChange","horizontal","vertical","_ref8","_getScrollLeftForScrollToColumnStateUpdate","_getScrollTopForScrollToRowStateUpdate","maybeStateA","maybeStateB","estimatedColumnSize","estimatedRowSize","_ref9","finalColumn","scrollBarSize","calculatedScrollLeft","finalRow","calculatedScrollTop","renderedCells","areOffsetsAdjusted","canCacheStyle","rowDatum","columnDatum","cellRendererParams","renderedCell","defaultOverscanIndicesGetter","ArrowKeyStepper","_getPrototypeOf2","_this$_getScrollState","_getScrollState","scrollToColumnPrevious","scrollToRowPrevious","_this$_getScrollState2","_updateScrollState","_this$_getScrollState3","_onSectionRendered","onScrollToChange","AutoSizer","defaultHeight","defaultWidth","disableHeight","disableWidth","onResize","_parentNode","autoSizer","_autoSizer","_detectElementResize","_onResize","outerStyle","childParams","_setRef","CellMeasurer","_this$props$columnInd","_this$props$rowIndex","_this$_getCellMeasure","_getCellMeasurements","Element","_child","_maybeMeasureCell","measure","_measure","registerChild","_registerChild","styleWidth","styleHeight","_this$props2$columnIn","_this$props2$rowIndex","_this$_getCellMeasure2","invalidateCellSizeAfterRender","CollectionView","cellLayoutManager","_onSectionRenderedMemoizer","getLastRenderedIndices","scrollToCell","scrollPosition","getScrollPositionForCell","cellIndex","_setScrollPosition","_enablePointerEventsAfterDelay","isScrollingChange","_scrollbarSize","_cellLayoutManager$ge","totalHeight","totalWidth","cancelable","_scrollbarSizeMeasured","_calculateSizeAndPositionDataOnNextUpdate","_updateScrollPositionForScrollToCell","_invokeOnSectionRenderedHelper","_cellLayoutManager$ge2","horizontalOverscanSize","verticalOverscanSize","_lastRenderedCellCount","_lastRenderedCellLayoutManager","calculateSizeAndPositionData","_cellLayoutManager$ge3","cellRenderers","collectionStyle","Section","_indexMap","_indices","SectionManager","sectionSize","_sectionSize","_cellMetadata","_sections","getSections","section","getCellIndices","sectionXStart","sectionXStop","sectionYStart","sectionYStop","sections","sectionX","sectionY","cellMetadatum","addCellIndex","_ref$align","cellOffset","Collection","_lastRenderedCellIndices","_isScrollingChange","_setCollectionViewRef","_collectionView","recomputeCellSizesAndPositions","cellSizeAndPositionGetter","cellMetadata","sectionManager","registerCell","_calculateSizeAndPositionData","_sectionManager","_height","_width","cellGroupRenderer","getCellMetadata","cellRendererProps","ColumnSizer","columnMaxWidth","columnMinWidth","_registeredChild","safeColumnMinWidth","safeColumnMaxWidth","adjustedWidth","getColumnWidth","InfiniteLoader","_loadMoreRowsMemoizer","_onRowsRendered","autoReload","_doStuff","_lastRenderedStartIndex","_lastRenderedStopIndex","onRowsRendered","unloadedRanges","loadMoreRows","unloadedRange","lastRenderedStartIndex","lastRenderedStopIndex","isRangeVisible","currentIndex","recomputeSize","recomputeRowHeights","forceUpdateReactVirtualizedComponent","isRowLoaded","minimumBatchSize","rangeStartIndex","rangeStopIndex","potentialStopIndex","firstUnloadedRange","_index2","scanForUnloadedRanges","squashedUnloadedRanges","_loadUnloadedRanges","registeredChild","List","rowRenderer","widthDescriptor","getOffsetForCell","measureAllCells","_ref6$columnIndex","_ref6$rowIndex","scrollToPosition","noRowsRenderer","_cellRenderer","accessibilityOverscanIndicesGetter","_GEP","_GEA","_GTP","_GTA","_LTP","_LTA","_LEP","_LEA","_EQP","_EQA","IntervalTreeNode","leftPoints","rightPoints","rebuild","ntree","createIntervalTree","rebuildWithInterval","rebuildWithoutInterval","reportLeftRange","reportRightRange","reportRange","compareNumbers","compareBegin","compareEnd","leftIntervals","rightIntervals","centerIntervals","IntervalTree","weight","queryPoint","queryInterval","tproto","PositionCache","defaultCellHeight","unmeasuredCellCount","tallestColumnSize","renderCallback","_intervalTree","_leftMap","columnSizeMap","_columnSizeMap","columnHeight","Masonry","eventScrollTop","_getEstimatedTotalHeight","_debounceResetIsScrolling","_positionCache","_invalidateOnUpdateStartIndex","_invalidateOnUpdateStopIndex","_populatePositionCache","_checkInvalidateOnUpdate","_invokeOnScrollCallback","_invokeOnCellsRenderedCallback","_debounceResetIsScrollingId","cellMeasurerCache","keyMapper","overscanByPixels","rowDirection","estimateTotalHeight","shortestColumnSize","measuredCellCount","_style","_startIndex","_stopIndex","_debounceResetIsScrollingCallback","estimatedColumnCount","_onScrollMemoized","_startIndexMemoized","_stopIndexMemoized","onCellsRendered","cellPositioner","_cellPositioner","setPosition","CellMeasurerCacheDecorator","_cellMeasurerCache","_columnIndexOffset","_rowIndexOffset","_params$columnIndexOf","columnIndexOffset","_params$rowIndexOffse","rowIndexOffset","clearAll","MultiGrid","showHorizontalScrollbar","showVerticalScrollbar","_bottomLeftGrid","_bottomRightGrid","fixedRowCount","fixedColumnCount","scrollInfo","_topLeftGrid","_topRightGrid","_fixedColumnCount","_fixedRowCount","_maybeCalculateCachedStyles","_deferredMeasurementCacheBottomLeftGrid","_deferredMeasurementCacheBottomRightGrid","_deferredMeasurementCacheTopRightGrid","_ref7$columnIndex","_ref7$rowIndex","_ref8$columnIndex","_ref8$rowIndex","adjustedColumnIndex","adjustedRowIndex","_leftGridWidth","_topGridHeight","_this$props7","_this$props8","_prepareForRender","_this$state4","_containerOuterStyle","_containerTopStyle","_renderTopLeftGrid","_renderTopRightGrid","_containerBottomStyle","_renderBottomLeftGrid","_renderBottomRightGrid","_getTopGridHeight","leftGridWidth","_getLeftGridWidth","topGridHeight","resetAll","_this$props9","enableFixedColumnScroll","enableFixedRowScroll","styleBottomLeftGrid","styleBottomRightGrid","styleTopLeftGrid","styleTopRightGrid","sizeChange","_lastRenderedHeight","_lastRenderedWidth","leftSizeChange","_lastRenderedColumnWidth","_lastRenderedFixedColumnCount","topSizeChange","_lastRenderedFixedRowCount","_lastRenderedRowHeight","_lastRenderedStyle","_lastRenderedStyleBottomLeftGrid","_bottomLeftGridStyle","_lastRenderedStyleBottomRightGrid","_bottomRightGridStyle","_lastRenderedStyleTopLeftGrid","_topLeftGridStyle","_lastRenderedStyleTopRightGrid","_topRightGridStyle","hideBottomLeftGridScrollbar","additionalRowCount","_getBottomGridHeight","gridWidth","bottomLeftGrid","_cellRendererBottomLeftGrid","classNameBottomLeftGrid","_onScrollTop","_bottomLeftGridRef","_rowHeightBottomGrid","_cellRendererBottomRightGrid","classNameBottomRightGrid","_columnWidthRightGrid","_onScrollbarPresenceChange","_bottomRightGridRef","_getRightGridWidth","classNameTopLeftGrid","_topLeftGridRef","hideTopRightGridScrollbar","_this$state5","additionalColumnCount","additionalHeight","gridHeight","topRightGrid","_cellRendererTopRightGrid","classNameTopRightGrid","_onScrollLeft","_topRightGridRef","ScrollSync","defaultHeaderRowRenderer","SortDirection","ASC","DESC","SortIndicator","sortDirection","defaultHeaderRenderer","dataKey","label","sortBy","showSortIndicator","defaultRowRenderer","onRowClick","onRowDoubleClick","onRowMouseOut","onRowMouseOver","onRowRightClick","rowData","a11yProps","onMouseOut","onMouseOver","Column","cellDataGetter","cellData","defaultSortDirection","flexGrow","headerRenderer","Table","scrollbarWidth","_createColumn","_createRow","_ref3$columnIndex","_ref3$rowIndex","_Grid","_setScrollbarWidth","disableHeader","gridClassName","headerHeight","headerRowRenderer","rowClassName","rowStyle","availableRowsHeight","rowClass","rowStyleObject","_cachedColumnStyles","column","flexStyles","_getFlexStyleForColumn","_getHeaderColumns","onColumnClick","_column$props","columnData","headerOnClick","headerOnKeyDown","headerTabIndex","headerAriaSort","headerAriaLabel","headerClassName","headerStyle","onHeaderClick","_column$props2","disableSort","sortEnabled","ReactVirtualized__Table__sortableHeaderColumn","renderedHeader","newSortDirection","rowGetter","flattenedStyle","_getRowHeight","customStyle","flexValue","flex","msFlex","WebkitFlex","minWidth","_this4","_createHeader","getScrollbarWidth","mountedInstances","originalBodyPointerEvents","disablePointerEventsTimeoutId","enablePointerEventsIfDisabled","enablePointerEventsAfterDelayCallback","__resetIsScrolling","onScrollWindow","maximumTimeout","enablePointerEventsAfterDelay","scrollElement","__handleWindowScrollEvent","registerScrollListener","unregisterScrollListener","isWindow","serverHeight","serverWidth","getPositionOffset","documentElement","containerElement","elementRect","containerRect","getScrollOffset","_elementRect","_containerRect","scrollY","scrollX","getWindow","WindowScroller","updatePosition","scrollTo","_positionFromTop","_isMounted","_positionFromLeft","thisNode","_registerResizeListener","prevScrollElement","_unregisterResizeListener","onChildScroll","_onChildScroll","kx","ky","arcs","stitchedArcs","fragmentByStart","fragmentByEnd","emptyIndex","ends","fg","gf","meshArcs","extractArcs","stitch","geomsByArc","extract0","extract1","extract2","extract3","geoms","resolveModules","getShaderDependencies","instantiateModules","moduleDepth","getDependencyGraph","isOldIE","WEBGL_FEATURES","compiledGlslExtensions","canCompileGLGSExtension","behavior","shader","canCompile","getFeature","testVariable","qualifier","ES300_REPLACEMENTS","ES300_VERTEX_REPLACEMENTS","ES300_FRAGMENT_REPLACEMENTS","ES100_REPLACEMENTS","ES100_VERTEX_REPLACEMENTS","ES100_FRAGMENT_REPLACEMENTS","ES300_FRAGMENT_OUTPUT_REGEX","transpileShader","targetGLSLVersion","convertShader","outputMatch","outputName","convertFragmentShaderTo300","convertFragmentShaderTo100","replacements","INJECT_SHADER_DECLARATIONS","assembleShaders","assembleShader","assembleGetUniforms","hookFunctions","prologue","sourceLines","glslVersion","versionLine","coreSource","allDefines","assembledSource","getShaderName","getShaderType","gpuVendor","identifyGPUVendor","getContextInfo","debugInfo","getPlatformShaderDefines","versionDefines","getVersionDefines","sourceText","getApplicationDefines","hookFunctionMap","hook","normalizeHookFunctions","hookInjections","declInjections","mainInjections","injection","injections","injectionType","hookFunction","getHookFunctions","moduleUniforms","_defaultModules","_getModuleList","vsHash","_getHash","fsHash","moduleHashes","varyingHashes","defineKeys","injectKeys","defineHashes","injectHashes","_programCache","assembled","_getUniforms","_useCounts","_hashes","appModules","dispatch","Dispatch","parseTypenames","typenames","typename","taskHead","taskTail","clockLast","clockNow","clockSkew","clock","performance","setFrame","clearNow","Timer","_call","_time","restart","wake","timerFlush","sleep","nap","poke","initialAngle","nodes","simulation","alphaMin","alphaDecay","alphaTarget","velocityDecay","forces","stepper","lcg","tick","fx","vx","fy","vy","initializeNodes","initializeForce","randomSource","closest","glFormatToComponents","sourceX","sourceY","sourceFormat","sourceAttachment","sourceType","deleteFramebuffer","sourceWidth","sourceHeight","getPixelArray","readPixelsToBuffer","targetByteOffset","glTypeToBytes","targetMipmaplevel","targetInternalFormat","isSubCopy","targetX","toFramebuffer","pixelArray","deprecations","fragmentShader","_parseDeprecationDefinitions","stage","normalizeInjections","moduleSource","_defaultGetUniforms","cacheHas","_classnames","_calculateUtils","_GridItem","_ReactGridLayoutPropTypes","_arrayWithoutHoles","_nonIterableSpread","hasNativeReflectConstruct","isFirefox","ReactGridLayout","activeDrag","oldDragItem","oldLayout","oldResizeItem","droppingDOMNode","droppingItem","maxRows","containerPadding","_e$nativeEvent","layerX","layerY","droppingPosition","_this$state$droppingP","positionParams","containerWidth","calculatedPosition","calcXY","dragEnterCounter","removeDroppingPlaceholder","newLayoutBase","propsLayout","onLayoutMaybeChanged","autoSize","nbRow","containerPaddingY","placeholder","onDragStop","onLayoutChange","onResizeStart","hasCollisions","leastX","leastY","onResizeStop","useCSSTransforms","transformScale","isDroppingItem","draggableCancel","draggableHandle","resizable","resizeHandlesOptions","bounded","usePercentages","isDroppable","mergedClassName","mergedStyle","containerHeight","processGridItem","calcGridColWidth","calcGridItemWHPx","gridUnits","colOrRowSize","marginPx","lowerBound","upperBound","calcGridItemPosition","colWidth","resizing","dragging","calcWH","getBoundPosition","cloneBounds","boundNode","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","_domFns","marginRight","marginBottom","snapToGrid","pendingX","pendingY","canDragX","canDragY","getControlPosition","touchIdentifier","draggableCore","touchObj","createCoreData","isStart","lastX","lastY","createDraggableData","coreData","_propTypes","_reactDraggable","Resizable","slackW","slackH","lockAspectRatio","aspectRatio","runConstraints","minConstraints","maxConstraints","_ratio","oldW","oldH","resizeHandler","handlerName","widthChanged","heightChanged","_this2$runConstraints","renderResizeHandle","resizeHandle","draggableOpts","handleSize","DraggableCore","onStop","isRequired","oneOf","getBreakpointFromWidth","sortBreakpoints","matching","breakpointName","getColsFromBreakpoint","findOrGenerateResponsiveLayout","layouts","lastBreakpoint","breakpointsSorted","breakpointsAbove","$keyword","$ruleType","$refKeywords","strictKeywords","$unknownKwd","$keywordsMsg","isTop","sourceCode","processCode","$lvl","$dataLvl","dataLevel","$schemaPath","schemaPath","$errSchemaPath","errSchemaPath","$breakOnError","allErrors","$valid","$$outStack","createErrors","errorPath","verbose","__err","compositeRule","$top","rootId","dataPathArr","strictDefaults","$defaultMsg","$closingBraces1","$closingBraces2","$typeSchema","$typeIsArray","extendRefs","$comment","coerceTypes","$coerceToTypes","$rulesGroup","$shouldUseGroup","$method","$dataType","$coerced","$bracesCoercion","$type","$parentData","arr3","$propertyKey","$sch","$passData","useDefault","arr4","l4","arr5","$rule","i5","l5","$shouldUseRule","$code","implements","impl","$ruleImplementsSomeKeyword","$schemaValue","$isData","$isMax","$exclusiveKeyword","$schemaExcl","$isDataExcl","$op","$notOp","$errorKeyword","$schemaValueExcl","$exclusive","$exclType","$exclIsNumber","$opStr","$opExpr","unicode","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","Vector4","EPSILON1","EPSILON2","EPSILON3","EPSILON4","EPSILON5","EPSILON6","EPSILON7","EPSILON8","EPSILON9","EPSILON10","EPSILON11","EPSILON12","EPSILON13","EPSILON14","EPSILON15","EPSILON16","EPSILON17","EPSILON18","EPSILON19","EPSILON20","PI_OVER_TWO","PI_OVER_FOUR","PI_OVER_SIX","polyfillExtension","target2","extKey","polyfillVertexArrayObject","EXTENSIONS","initializeExtensions","polyfills","installPolyfills","installOverrides","self_","document_","console_","getGeometryFromBuffer","_attributeDefs","dataRange","normalizedData","dataIndex","bufferValue","vertexEnd","getPriority","requestMap","freeSlots","requestQueue","_updateRequest","defaultLineColor","pathsDiff","replaceInRange","getSubLayerRow","lineDashJustified","FillLayer","StrokeLayer","polygonLayer","shouldRenderSubLayer","dashJustified","getLineDashArray","flipY","zoomX","zoomY","zoom_","OrthographicViewport","OrthographicController","orbitAxis","projectionScale","projectedCenter","nextCenter","OrbitViewport","OrbitController","OrbitView","isDeep","getSymbolsIn","cloneArrayBuffer","baseCreate","isFlattenable","baseFlatten","isStrict","baseIndexOf","aFunction","toIObject","cof","_iterator2","_symbol2","redefine","Iterators","$iterCreate","setToStringTag","ITERATOR","BUGGY","returnThis","Base","NAME","IS_SET","FORCED","IteratorPrototype","getMethod","kind","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","hiddenKeys","pIE","gOPD","baseFor","createBaseFor","objectCtorString","srcValue","castPath","toKey","isKey","stringToPath","baseEach","createBaseEach","ColorWrap","_debounce2","_color2","Picker","ColorPicker","handleChange","onChangeComplete","handleSwatchHover","onSwatchHover","optionalEvents","deepPurple","lightBlue","lightGreen","amber","deepOrange","blueGrey","darkText","lightText","darkIcons","lightIcons","rbush","turfBBox","geojsonRbush","maxEntries","toBBox","fromJSON","currentCoords","createSegments","lineSegmentFeature","objectKeys","isRegex","strict","isUndefinedOrNull","aIsRegex","bIsRegex","aIsBuffer","bIsBuffer","objEquiv","isArgs","origKeys","keysShim","originalKeys","shim","$Object","$TypeError","ignoreCase","multiline","dotAll","sticky","$gOPD","ArrowStyles","FORWARD","BACKWARD","BOTH","DEFAULT_STYLE","arrowColor","arrowCount","arrowStyle","fillColor","lineColor","lineWidthMeters","outlineRadiusMeters","zLevel","POLYGON_LINE_COLOR","POLYGON_FILL_COLOR","POLYGON_DASHES","LAYER_ID_PICK","SELECTION_TYPE","RECTANGLE","POLYGON","DeckDrawer","nebula","deckgl","pickingInfos","mousePoints","allX","mousePoint","allY","landPoints","pickObjects","_getLayerIds","selectionType","deactivate","usePolygon","_getMousePosFromEvent","POLYGON_THRESHOLD","dataPick","landPointsPoly","bigBuffer","bigPolygon","selPolygon","_makeStartPointHighlight","LayerMouseEvent","groundPoint","ReflectOwnKeys","ReflectApply","NumberIsNaN","_maxListeners","defaultMaxListeners","checkListener","_getMaxListeners","_addListener","prepend","newListener","warned","onceWrapper","fired","wrapFn","_onceWrap","wrapped","_listeners","unwrap","evlistener","unwrapListeners","arrayClone","setMaxListeners","getMaxListeners","doError","originalListener","spliceOne","rawListeners","selectedHandleIndex","selectedHandle","guidePointCount","oppositeIndex","editedData","oppositeHandle","scaleFactor","getScaleFactor","scaledFeatures","cursorGeometry","positiveBearing","selectedEditHandle","scaleAction","getScaleAction","selectedGeometry","_isSinglePointGeometrySelected","cornerGuidePoints","cornerPoint","startDistance","_geometryBeingRotated","previousCoord","topEdgeMidpointCoords","longestEdgeLength","edgeMidpoint","getIntermediatePosition","rotateHandleCoords","lineFromEnvelopeToRotateHandle","rotateHandle","rotateAction","getRotateAction","bearing1","getRotationAngle","rotatedFeatures","CompositeMode","resultEval","_modes","_coalesce","allGuides","ThreeClickPolygonMode","hoveredCoord","getThreeClickPolygon","coord3","_editableLayerState","pointerDownPicks","pointerDownScreenCoords","pointerDownMapCoords","eventHandler","_forwardEventToCurrentLayer","currentLayer","screenCoords","getScreenCoords","getMapCoords","getPicks","sourceEvent","cancelPan","pickMultipleObjects","pointerEvent","injectShaderCode","PathOutlineLayer","outlineFramebuffer","dummyTexture","instanceZLevel","alignMode","outlineEnabled","outlineRenderShadowmap","outlineShadowmap","getZLevel","GreatCircleLayer","greatCircle","RADIAN_TO_DEGREE","IJToST","singleSTtoUV","STToUV","FaceUVToXYZ","XYZToLngLat","rotateAndFlipQuadrant","getS2QuadKey","token","paddedToken","getIdFromToken","idS","FACE_BITS","lsbIndex","faceB","posB","levelN","faceS","posS","toHilbertQuadkey","getS2Polygon","nextOffset","stepI","stepJ","deltaLng","getGeoBounds","hilbertQuadkey","maxLevel","FromHilbertQuadKey","getS2Token","S2Layer","timestamps","instanceTimestamps","instanceNextTimestamps","currentTime","fadeTrail","trailLength","TripsLayer","getTimestamps","getHexagons","H3ClusterLayer","normalizeLongitudes","scalePolygon","hexId","actualCount","getHexagonCentroid","getHexagon","hexagonId","h3ToPolygon","centerHexagon","hexagon","_shouldUseHighPrecision","dataProps","_calculateH3DataProps","hasPentagon","hasMultipleRes","hexResolution","edgeLengthKM","centerHex","centerLng","SubLayerClass","forwardProps","trigger","mergeTriggers","H3HexagonLayer","featureIds","featureIdsPickingColors","calculateFeatureIdsPickingColors","u_Camera","u_pickFeatureIds","pbrMaterial","materialParser","parseMaterial","validateGeometryAttributes","unlit","pbrDebug","imageBasedLightingEnvironment","useTangents","_MeshLayer","fromCartographic","cartographic","fromCartographicToRadians","toCartographic","toCartographicFromRadians","scaleToGeodeticSurfaceIntersection","scaleToGeodeticSurfaceGradient","scratchOrigin","VECTOR_PRODUCT_LOCAL_FRAME","down","degeneratePositionLocalFrame","scratchAxisVectors","scratchVector1","thirdAxisInferred","thirdAxis","equalsEpsilon","firstAxisVector","firstAxis","secondAxisVector","secondAxis","thirdAxisVector","ellipsoid","scratchK","scratchHeight","scratchCartesian","radiiSquared","wgs84","Ellipsoid","radii","scaleToGeodeticSurface","geodeticSurfaceNormal","localFrameToFixedFrame","cartographicVectorRadians","cosLatitude","centerToleranceSquared","positionX","positionY","positionZ","oneOverRadiiX","oneOverRadii","oneOverRadiiY","oneOverRadiiZ","squaredNorm","oneOverRadiiSquaredX","oneOverRadiiSquared","oneOverRadiiSquaredY","oneOverRadiiSquaredZ","gradient","correction","xMultiplier2","xMultiplier","yMultiplier2","yMultiplier","zMultiplier2","zMultiplier","xMultiplier3","yMultiplier3","zMultiplier3","derivative","beta","oldNodeNext","_list","addCallback","unloadCallback","trimTiles","maximumMemoryUsageInBytes","sentinel","getFrameState","viewportCenterCartographic","viewportCenterCartesian","enuToFixedTransform","cameraPositionCartographic","cameraPositionCartesian","cameraDirectionCartesian","cameraUpCartesian","frustumPlanes","distanceToCenter","cartographicPos","cartesianPos","commonSpacePlanesToWGS84","camera","sseDenominator","getZoomFromBoundingVolume","obbSize","axeY","axeZ","getObbSize","TILE_CONTENT_STATE","TILE_REFINEMENT","TILE_TYPE","TILESET_TYPE","LOD_METRIC_TYPE","TILE3D_OPTIMIZATION_HINT","scratchScale","scratchNorthWest","scratchSouthEast","createBoundingVolume","boundingVolumeHeader","box","quaternion","createBox","northWest","southEast","centerInCartesian","createSphere","uniformScale","getDynamicScreenSpaceError","distanceToCamera","density","scalar","fog","qualityFactor","projectVertexToSphere","azim","incl","radCosInc","getDistanceFromLatLon","observer","observerZ","centerLon","centerLat","projectedObserver","observerLon","observerLat","getI3ScreenSize","frameState","mbsLat","mbsCenter","mbsRNormalized","getTanOfHalfVFAngle","_array","_map","_length","loadSiblings","skipLevelOfDetail","maximumScreenSpaceError","updateTransforms","onTraversalEnd","viewportTraversersMap","basePath","shouldRefine","canTraverse","updateAndPushChildren","parentRefines","stoppedRefining","compareDistanceToCamera","checkRefines","hasVisibleChild","refines","childRefines","executeEmptyTraversal","shouldSelectTile","shouldLoadTile","useParentMetric","ignoreVisibility","screenSpaceError","viewportIds","anyVisible","allDescendantsLoaded","extendedId","_getRefine","useParentLodMetric","parentLodMetricValue","lodMetricValue","viewDistanceScale","getTiles3DScreenSpaceError","traverser","maySkipTile","refine","_visible","_frameNumber","contentState","_screenSpaceError","rootScreenSpaceError","_requestScheduler","scheduleRequest","_getPriority","contentUrl","getTileUrl","isTileset","_getLoaderSpecificOptions","contentLoader","parentVisibilityPlaneMask","_traverser","parentTransform","distanceToTile","getScreenSpaceError","visibility","_visibilityPlaneMask","insideViewerRequestVolume","viewerRequestVolume","tileHeader","parentInitialTransform","_tileset","_tile","computedTransform","didTransformChange","isTileHeader","assetGltfUpAxis","_selectedFrame","contentReady","_expiredContent","hasRenderContent","firstChild","meetsScreenSpaceErrorEarly","useOptimization","anyChildrenVisible","_statusMap","metersPerPixel","mbsLon","mbsZ","mbsR","viewportCenter","mbsLatProjected","mbsLonProjected","diagonalInMeters","visibleHeight","visibleWidth","screenSize","lodJudge","childTiles","childTile","nodeUrl","i3s","loadContent","_tileManager","description","maximumMemoryUsage","onTraversalComplete","loadTiles","attributions","tilePath","_extensionsUsed","traverseCounter","viewportsToTraverse","_needTraverse","roots","_initializeTileHeaders","traverserId","frameStateData","_requestedTiles","_emptyTiles","currentFrameStateData","frameStateDataValue","oldSelectedTiles","set1","set2","tilesRenderable","pointsRenderable","tilesetJson","rootTile","parentTileHeader","TraverserClass","_onTraversalEnd","gltfUpAxis","rotationY","cartesianOrigin","cartographicOrigin","toFixedFrameMatrix","calculateTransformProps","asset","queryParams","queryParamStrings","getQueryParamString","TILE3D_TYPE","COMPOSITE","POINT_CLOUD","BATCHED_3D_MODEL","INSTANCED_3D_MODEL","GEOMETRY","VECTOR","getStringFromArrayBuffer","textDecoder","GL_TYPE","GL_TYPE_TO_ARRAY_TYPE","NAME_TO_GL_TYPE","GLType","componentType","componentLength","jsonValue","_getTypedArrayFromBinary","_getTypedArrayFromArray","propertyName","getPropertyArray","cachedTypedArrays","COMPONENTS_PER_ATTRIBUTE","SCALAR","VEC2","VEC3","VEC4","MAT2","MAT3","MAT4","UNPACKER","PACKER","initializeHierarchy","batchTable","jsonHeader","binaryBody","hierarchy","legacyHierarchy","hierarchyJson","instancesLength","classIds","parentCounts","parentIds","parentIdsLength","AttributeType","getBinaryAccessor","parentIndexes","classesLength","classInstancesLength","binaryProperties","getBinaryProperties","classCounts","classIndexes","classId","validateInstance","validateHierarchy","initializeHierarchyValues","traverseHierarchy","instanceIndex","endConditionCallback","visited","visitedMarker","parentCount","parentIndex","traverseHierarchyMultipleParents","traverseHierarchySingleParent","IGNORED_PROPERTY_FIELDS","HIERARCHY","extras","featureCount","instanceClass","getExactClassName","batchId","_hierarchy","_properties","_hasPropertyInHierarchy","propertyNames","binaryProperty","_binaryProperties","_getBinaryProperty","propertyValues","hierarchyProperty","_getHierarchyProperty","_setHierarchyProperty","_initializeBinaryProperty","tile3DAccessor","unpacker","packer","createTypedArrayFromAccessor","componentCount","pack","instances","indexInClass","parse3DTileHeaderSync","parse3DTileTablesHeaderSync","featureTableJsonByteLength","featureTableBinaryByteLength","batchTableJsonByteLength","batchTableBinaryByteLength","SIZEOF_UINT32","batchLength","parse3DTileTablesSync","BATCH_LENGTH","featureTableString","parse3DTileFeatureTable","batchTableString","parse3DTileBatchTable","decodeRGB565","rgb565","r5","g6","normalize3DTileColorAttribute","batchIds","colorArray","fromSNorm","rangeMaximum","signNotZero","octDecodeInRange","oldVX","octDecode","normalize3DTilePositionAttribute","decodedArray","decodeQuantizedPositions","initializeTile","parsePointCloudTables","parseDraco","featureTable","parsePositions","parseColors","parseNormals","pointsLength","batchFeatureLength","batchTableBinary","parseBatchIds","normalize3DTileNormalAttribute","batchTableDraco","dracoBatchTableProperties","featureTableDraco","dracoFeatureTableProperties","dracoByteOffset","dracoByteLength","dracoBuffer","dracoData","featureTableProperties","batchTableProperties","dequantizeInShader","loadDraco","dracoOptions","decodedPositions","decodedColors","decodedNormals","decodedBatchIds","isQuantizedDraco","isOctEncodedDraco","batchTableAttributes","GLTF_FORMAT","parse3DTileGLTFViewSync","gltfByteLength","tile3DOptions","extractGLTFBufferOrURL","gltfFormat","gltfUrlBytes","gltfUrl","parseBatchedModel","extractGLTF","parseInstancedModel","collectionOptions","instancePosition","instanceRotation","instanceQuaternion","instanceScale","instanceTranslationRotationScale","instanceTransform","scratch1","scratch2","quantizedVolumeOffset","quantizedVolumeScale","nonUniformScale","rotationMatrix","extractInstancedAttributes","subtile","parse3DTile","parseComposite3DTile","parseBatchedModel3DTile","parseInstancedModel3DTile","parsePointCloud3DTile","normalizeTileData","contentUri","fileExtension","getTileType","getRefine","normalizeTileHeaders","childHeader","Tiles3DLoader","loadGLTF","getBaseUri","parseTileset","parseTile","SINGLE_DATA","getPointColor","pointSize","onTilesetLoad","tileset3d","_getMeshColor","layerMap","activeViewports","lastUpdatedViewports","lastViewport","preloadOptions","tilesetUrl","onTileLoadFail","viewportsNumber","_makePointCloudLayer","_make3DModelLayer","_makeSimpleMeshLayer","constantRGBA","_lighting","scenegraph","getMeshGeometry","layerCache","contentAttributes","Tile3DLayer","TerrainLoader","terrain","tesselator","meshMaxError","elevationDecoder","rScaler","gScaler","bScaler","skirtHeight","DUMMY_DATA","elevationData","urlTemplateToUpdateTrigger","elevationDataChanged","shouldReload","loadTerrain","dataUrl","textureUrl","surface","ranges","bound","getTiledTerrainData","_instanced","TerrainLayer","cmd","cmdLen","VectorTileFeature","ccw","classifyRings","_toGeoJSON","readFeature","readTag","_features","_pbf","readLayer","readValueMessage","readTile","classified","_toBinaryCoordinates","jl","ringAreas","before","after","extractNumericPropKeys","numericPropKeys","numericSoFar","fillArrays","firstPassData","polygonFeaturesCount","PositionDataType","hasGlobalId","coordLength","GlobalFeatureIdsDataType","pointPositionsCount","globalFeatureIds","pointFeaturesCount","numericProps","pathIndices","linePositionsCount","linePathsCount","lineFeaturesCount","polygonIndices","polygonPositionsCount","polygonObjectsCount","primitivePolygonIndices","polygonRingsCount","indexMap","pointPosition","pointFeature","linePosition","linePath","lineFeature","polygonPosition","polygonObject","polygonRing","polygonFeature","handlePoint","keepStringProperties","handleLineString","handlePolygon","makeAccessorObjects","nPositions","fillNumericProperties","il","nextLines","triangulatePolygon","endPosition","tl","returnObj","numericPropName","numericKeys","parseMVT","wgs84Coordinates","mvt","gis","hasTileIndex","selectedLayers","vectorTileLayer","featureOptions","vectorTileFeature","decodedFeature","getDecodedFeatureBinary","getDecodedFeature","featuresToBinary","transformToLocalCoordinates","transformToLocalCoordinatesBinary","MVTWorkerLoader","layerProperty","parseSync","binaryToGeojson","globalFeatureId","dataArray","normalizeInput","currValue","parseFeature","getSingleFeature","parseFeatures","parseFeatureCollection","binaryToGeometry","ringToGeoJson","pointToGeoJson","multi","ringCoordinates","lineStringToGeoJson","polygonToGeoJson","startRingIndex","endRingIndex","startPolygonIndex","endPolygonIndex","polygonCoordinates","parseType","parseProperties","parseFields","clipBounds","shaderFunction","shaderModuleVs","injectionVs","shaderModuleFs","injectionFs","clipByInstance","corner0","ClipExtension","availableTransformations","GEOM_TYPES","findIndexByType","geomData","uniqueIdProperty","startFeatureIndex","endFeatureIndex","layerRange","layerNames","getLayerRange","elem","getGlobalFeatureId","highlightedFeatureId","tileJSON","worldScale","xScale","yScale","hoveredFeatureLayerName","hoveredFeature","newHoveredFeatureId","getFeatureUniqueId","newHoveredFeatureLayerName","getFeatureLayerName","hoveredFeatureId","isWGS84","transformTileCoordsToWGS84","isHighlighted","isFeatureIdDefined","featureIdToHighlight","isMatchingId","isMatchingLayer","findIndexBinary","maxObjects","maxFeatures","_pickObjects","featureCache","renderedFeatures","projectedBbox","MVTLayer","onInteractionStateChange","controllers","controller","_viewports","viewMap","viewOrViewId","getView","_viewportMap","_diffViews","_eventCallbacks","_onViewStateChange","controllerProps","_createController","oldControllers","invalidateControllers","getViewState","oldController","_updateController","newViews","oldViews","DEFAULT_LIGHTING_EFFECT","effects","NO_PICKED_OBJECT","getClosestObject","minSquareDistanceToCenter","deviceRadius","closestPixelIndex","pickedColors","pickedObject","pickedX","pickedY","getEmptyPickingInfo","pickedViewport","getViewportFromCoordinates","pickInfo","picked","devicePixel","processPickInfo","affectedLayers","lastPickedObjectIndex","lastPickedInfo","lastPickedLayerId","pickedLayerId","lastPickedLayer","baseInfo","infos","getLayerPickingInfo","_pickClosestObject","_pickVisibleObjects","lastPickedViewportId","colorBufferFloat","_pickable","pickableLayers","_getPickable","emptyInfo","devicePixelRange","_getPickingRect","deviceX","deviceY","deviceWidth","deviceHeight","pickedResult","_drawAndSample","pickedResultPass2","leftTop","deviceLeft","deviceTop","rightBottom","deviceRight","deviceBottom","pickInfos","uniqueColors","colorKey","getUniqueObjects","uniqueInfos","isMaxObjects","pickLayersPass","defaultStyle","canvasParent","displayInfo","oldHandler","predict","enhancePointerEventInput","hammerjs","enhanceMouseInput","RECOGNIZERS","RECOGNIZER_COMPATIBLE_MAP","tripan","pinch","doubletap","anytap","RECOGNIZER_FALLBACK_MAP","BASIC_EVENT_ALIASES","INPUT_EVENT_TYPES","EVENT_RECOGNIZER_MAP","tap","press","pinchin","pinchout","pinchstart","pinchmove","pinchend","pinchcancel","rotatestart","rotatemove","rotateend","rotatecancel","tripanstart","tripanmove","tripanup","tripandown","tripanleft","tripanright","tripanend","tripancancel","panup","pandown","panleft","panright","pancancel","swipe","swipeleft","swiperight","swipeup","swipedown","GESTURE_EVENT_ALIASES","anyclick","dblclick","mouseover","mouseout","mouseleave","firefox","WHEEL_EVENTS","passive","wheelPosition","MOUSE_EVENTS","KEY_EVENTS","targetElement","enableDownEvent","enableUpEvent","srcElement","handlersByElement","_active","mjolnirEvent","_normalizeEvent","immediatePropagationStopped","stopImmediatePropagation","entriesToRemove","rootElement","leftButton","middleButton","rightButton","buttons","whichButtons","getOffsetPosition","handled","recognizerOptions","_onBasicInput","_onOtherEvent","ManagerClass","otherName","recognizerOption","eventRegistrar","enabled","fallbackRecognizers","eventAlias","recognizerName","isRecognizerUsed","eh","glOptions","eventRecognizerOptions","_framebuffer","_animate","_typedArrayManagerProps","onWebGLInitialized","_onMetrics","isHovering","_onEvent","_onPointerDown","_onPointerMove","_createCanvas","_createAnimationLoop","fps","setPropsTime","updateAttributesTime","framesRedrawn","pickTime","pickCount","gpuTime","gpuTimePerFrame","cpuTime","cpuTimePerFrame","bufferMemory","textureMemory","renderbufferMemory","gpuMemory","resolvedProps","_getViewState","getViewports","viewManagerNeedsRedraw","layerManagerNeedsRedraw","effectManagerNeedsRedraw","effectManager","deckRendererNeedsRedraw","deckRenderer","_pick","deckPicker","getLayers","autoResizeDrawingBuffer","autoResizeViewport","onCreateContext","onContextLost","onInitialize","onRender","_onRenderFrame","animationLoop","_pickRequest","pickedInfo","getTooltip","polygonOffsetFill","_onInteractionStateChange","renderOptions","_metricsCounter","eventOptions","getLastPickedObject","layerHandler","rootHandler","pickObject","animationLoopStats","metrics","memoryStats","Deck","deckGlobal","copyMatrix","rot","worldMatrix","worldInverse","worldInverseTranspose","objectMatrix","worldInverseMatrix","worldInverseTransposeMatrix","ATTRIBUTE_TYPE_TO_COMPONENTS","ATTRIBUTE_COMPONENT_TYPE_TO_ARRAY","5120","5121","5122","5123","5125","5126","accessorToJsArray","slicedArray","helperMatrix","animationTime","nextIndex","previousIndex","previousTime","nextTime","stepInterpolate","linearInterpolate","tDiff","m0","outTangent0","inTangent1","cubicsplineInterpolate","timeMs","gltfNode","applyTranslationRotationScale","gltf","samplers","addVersionToShader","modelOptions","scene","gltfScene","gltfNodes","gltfChildren","createMesh","gltfMesh","primitives","gltfPrimitives","managedResources","createGLTFModel","gltfPrimitive","getVertexCount","createAttributes","loadedAttributes","createAccessor","generated","bufferView","gltfObjects","waitWhileCondition","getScene","getAnimator","_animations","_imageBasedLightingEnvironment","instanceModelMatrix","scenegraphData","scenes","instantiator","animator","createGLTFObjects","waitForGLTFAssets","allAttributes","animations","animationsProp","findResult","waitForFullLoad","attributesAvailable","composeModelMatrix","sceneModelMatrix","ScenegraphLayer","binaryToFeatureForAccesor","propertiesIndex","numericPropsIndex","getPropertiesForIndex","POINT_LAYER","pointRadiusUnits","pointAntialiasing","getPointRadius","iconSizeMaxPixels","iconSizeMinPixels","iconSizeScale","iconSizeUnits","getIconAngle","getIconColor","getIconPixelOffset","getIconSize","textSizeMaxPixels","textSizeMinPixels","textSizeScale","textSizeUnits","textBackground","textBackgroundPadding","textFontFamily","textFontWeight","textLineHeight","textMaxWidth","textOutlineColor","textOutlineWidth","textWordBreak","textCharacterSet","getTextAngle","getTextColor","getTextPixelOffset","getTextSize","getTextAlignmentBaseline","getTextBackgroundColor","getTextBorderColor","getTextBorderWidth","LINE_LAYER","lineCapRounded","POLYGON_LAYER","targetKey","sourceKey","separateGeojsonFeatures","wrapFeature","separated","pointFeatures","lineFeatures","polygonFeatures","polygonOutlineFeatures","subGeometry","separateGeometry","sourceFeature","sourceFeatureIndex","nestLevel","COORDINATE_NEST_LEVEL","validateGeometry","createLayerPropsFromBinary","geojsonBinary","layerProps","polygonsOutline","customPickingColors","calculatePickingColors","pointType","getGeojsonFeatures","newFeatures","featuresDiff","oldFeatures","partialFeatures","createLayerPropsFromFeatures","pointLayerIdPrefix","sourceIsPoints","PolygonFillLayer","forwardedProps","useLineColor","PolygonStrokeLayer","LineStringsLayer","pointLayers","PointLayerMapping","PointsLayer","polygonFillLayer","calcDistance","getPlanarDistance","pointToLineDistance","distanceToSegment","DEFAULT_INDICES","DEFAULT_TEX_COORDS","createQuad","maxXSpan","maxYSpan","uCount","vCount","vertex","interpolateQuad","quad","_imageCoordinateSystem","tintColor","oldMesh","_getCoordinateUniforms","uv","fracUV","unpackUVsFromRGB","disablePicking","normalizedBounds","bitmapTexture","coordinateConversion","imageCoordinateSystem","defaultImageCoordinateSystem","sourcePosition","targetPosition","instanceSourcePositions","instanceTargetPositions","instanceWidths","useShortestPath","getSourceColor","getTargetColor","getTilt","instanceSourceColors","instanceTargetColors","instanceHeights","instanceTilts","numSegments","ArcLayer","DEFAULT_NORMAL","getNormal","radiusPixels","instanceNormals","normalizeData","PointCloudLayer","useMeshColors","_useMeshColors","emptyTexture","getModel","hasNormals","flatShading","hasTexture","SimpleMeshLayer","getTanDeg","ellipse","xSemiAxis","ySemiAxis","centerCoords","angleRad","newx","newy","useId","idOverride","defaultId","setDefaultId","getMaterialUniforms","ambient","diffuse","shininess","specularColor","lighting_uAmbient","lighting_uDiffuse","lighting_uShininess","lighting_uSpecularColor","gouraudLighting","LIGHTING_VERTEX","phongLighting","LIGHTING_FRAGMENT","nodeToJson","xmlToNodeobj","x2xmlnode","givenOptions","validationOption","parseTrueNumberOnly","traversableObj","convertToJson","convertTonimn","convert2nimn","convertToJsonString","j2xParser","parseToNimn","glErrorShadow","synthesizeGLError","opt_msg","WebGLVertexArrayObjectOES","attribs","attrib","OESVertexArrayObject","wrapGLError","original","enableVertexAttribArray","disableVertexAttribArray","bindBuffer","vertexAttribPointer","vao","original_getSupportedExtensions","original_getExtension","vertexArrayObjects","arrayObject","currentVertexArrayObject","oldVAO","newVAO","currentBinding","maxAttrib","oldAttrib","bufferChanged","currentArrayBuffer","refTexture","overrides","TextureType","FACES","mipmapLevel","_subImage","imageDataMap","facePixels","resolvedFaces","TextureCube","unpackFlipY","getGlobalLoaderRegistry","loaderRegistry","normalizedLoader","registeredLoader","getRegisteredLoaders","TinySDF","INF","gridSize","font","textAlign","fillStyle","gridOuter","gridInner","useMetrics","measureText","actualBoundingBoxLeft","edt","edt1d","_draw","getMetrics","glyphWidth","glyphHeight","imgTop","imgLeft","baselinePosition","imgData","textMetrics","advance","doubleBuffer","actualBoundingBoxAscent","actualBoundingBoxRight","actualBoundingBoxDescent","textBaseline","clearRect","fillText","getImageData","prepareGrids","extractAlpha","sdfWidth","sdfHeight","drawWithMetrics","steiner","prevZ","nextZ","bridge","bridgeReverse","filteredBridge","deviation","polygonArea","trianglesArea","LercDecode","CntZImage","skipMask","encodedMaskData","parsedData","inputOffset","noDataValue","defaultNoDataValue","uncompressedData","uncompressPixelValues","pixelType","returnMask","pixelData","resultPixels","minValue","maxValue","resultMask","maskData","returnEncodedMask","bitset","returnFileInfo","fileInfo","formatFileInfo","computeUsedBitDepths","bitDepths","TypedArrayClass","maskBitset","storeDecodedMask","currentValue","blockIdx","numX","numBlocksX","numY","numBlocksY","blockWidth","maxZError","blockDataBuffer","thisBlockHeight","thisBlockWidth","blockData","blockPtr","constValue","maskByte","outPtr","outStride","rawData","unstuff","stuffedData","bitsPerPixel","numValidPixels","fileIdentifierString","fileVersion","imageType","eofOffset","numBytes","numBlocks","float32","fileIdView","cnt","ip","actualNumBlocksX","actualNumBlocksY","blockI","blockY","blockX","bytesLeft","headerByte","offsetType","numValidPixelsType","arrayBuf","dataBytes","dataWords","bitsLeft","nmax","numInvalidTailBytes","missingBits","Lerc2Decode","BitStuffer","lutArr","bitPos","Lerc2Helpers","HUFFMAN_LUT_BITS_MAX","computeChecksumFletcher32","sum1","sum2","words","tlen","readHeaderInfo","headerInfo","keyLength","checksum","numDims","numValidPixel","microBlockSize","blobSize","zMin","zMax","checkMinMaxRanges","OutPixelTypeArray","getDataTypeArray","rangeBytes","getDataTypeSize","minValues","readSubArray","maxValues","readMask","readDataOneSweep","nStart","readHuffmanTree","BITS_MAX","decodeBits","codeTable","word","srcPtr","numBitsLUT","numBitsLUTQick","jj","decodeLut","readHuffman","valTmp","valTmpQuick","huffmanInfo","prevVal","iDim","deltaEncode","encodeMode","resultPixelsAllDim","bits67","doLut","numElements","store8","lutData","lutBytes","lut","bitstuffer","readTiles","dataTypeSize","blockEncoding","bytesleft","lastBlockHeight","lastBlockWidth","getDataTypeUsed","getOnePixel","constantoffset","getPixelType","constructConstantSurface","numPixelAllDims","isValidPixelValue","getUInt32","onesweep","bReadDataOneSweep","flagHuffman","validPixelCount","dimCount","dimStats","getBandCount","isPlatformLittleEndian","encodedData","lerc","majorVersion","bandMask","iPlane","eof","bandMasks","decodedPixelBlock","statistics","Yallist","LENGTH","LENGTH_CALCULATOR","ALLOW_STALE","MAX_AGE","DISPOSE","NO_DISPOSE_ON_SET","LRU_LIST","CACHE","UPDATE_AGE_ON_GET","naiveLength","stale","maxAge","dispose","noDisposeOnSet","updateAgeOnGet","thisp","walker","forEachStep","hit","isStale","Entry","expiresAt","mL","allowStale","mA","lC","doUse","unshiftNode","HttpResponse","dataPromise","statusCode","parsedUrl","urlMod","httpApi","https","closeAsync","bytesRead","FileSource","openRequest","openAsync","makeFileSource","shortNumber","suffixes","EventHandlers","$getMaxListeners","emitNone","isFn","emitOne","emitTwo","arg2","emitThree","arg3","emitMany","usingDomains","Domain","domainEmitter","domainThrown","global$1","revLookup","Arr","inited","extraBytes","internalIsBuffer","b64","placeHolders","isFastBuffer","isSlowBuffer","performanceNow","mozNow","msNow","oNow","webkitNow","startTime","hrtime","previousTimestamp","clocktime","seconds","nanoseconds","platform","uptime","inherits$1","ctor","superCtor","super_","TempCtor","formatRegExp","isUndefined","debugEnviron","debugs","stylize","stylizeNoColor","showHidden","_extend","customInspect","stylizeWithColor","styleType","recurseTimes","primitive","simple","formatPrimitive","visibleKeys","arrayToHash","isError","formatError","braces","toUTCString","formatProperty","formatArray","reduceToSingleString","BufferList","isBufferEncoding","StringDecoder","assertEncoding","surrogateSize","detectIncompleteChar","utf16DetectIncompleteChar","base64DetectIncompleteChar","passThroughWrite","charBuffer","charReceived","charLength","charStr","available","charCode","enc","Readable","ReadableState","objectMode","Duplex","readableObjectMode","hwm","highWaterMark","defaultHwm","pipes","pipesCount","flowing","endEmitted","reading","sync","needReadable","emittedReadable","readableListening","resumeScheduled","defaultEncoding","ranOut","awaitDrain","readingMore","_readableState","readable","_read","readableAddChunk","addToFront","chunkInvalid","emitReadable","onEofChunk","skipAdd","maybeReadMore_","maybeReadMore","needMoreData","howMuchToRead","computeNewHighWaterMark","emitReadable_","flow","nReadingNextTick","resume_","fromList","hasStrings","copyFromBufferString","copyFromBuffer","fromListPartial","endReadable","endReadableNT","nop","WriteReq","WritableState","getBuffer","writableObjectMode","needDrain","ending","finished","noDecode","decodeStrings","writing","corked","bufferProcessing","onwrite","_writableState","writecb","writelen","onwriteStateUpdate","pendingcb","errorEmitted","onwriteError","needFinish","bufferedRequest","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","corkedRequestsFree","CorkedRequest","Writable","_write","writev","_writev","doWrite","onwriteDrain","finishMaybe","holder","prefinish","need","isPaused","setEncoding","nOrig","doRead","pipe","pipeOpts","endFn","cleanup","onend","onunpipe","ondrain","pipeOnDrain","cleanedUp","onclose","onfinish","ondata","increasedAwaitDrain","pause","unpipe","listenerCount$1","resume","dests","paused","_fromList","writeAfterEnd","validChunk","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","allowHalfOpen","onEndNT","TransformState","afterTransform","ts","_transformState","transforming","writechunk","needTransform","writeencoding","_transform","_flush","PassThrough","Stream","_isStdio","didOnEnd","commonjsGlobal","reLeadingDot","rePropName","reEscapeChar","hasOwnProperty$1","objectToString$1","Symbol$1","symbolToString","baseGet","isArray$2","isObject$1","isFunction$1","isHostObject","baseToString","quote","memoized","lodash_get","getProp$1","setProp$1","setProp","pathArray","fastJoin$1","flattenReducer$1","JSON2CSVBase_1","JSON2CSVBase","preprocessOpts","preprocessRow","memoizePreprocessRow","processedOpts","unwind","flattenSeparator","eol","doubleQuote","includeEmptyRows","withBOM","fieldInfo","processValue","unwindData","processedRow","processCell","excelStrings","dataRow","flatDataRow","newPath","unwindPaths","_this5","unwindPath","unwindArray","unwindRow","clonedRow","unwindBlank","fastJoin$2","flattenReducer$2","JSON2CSVParser_1","_JSON2CSVBase","JSON2CSVParser","preprocessFieldsInfo","processedData","preprocessData","processData","processRow","LEFT_BRACE","RIGHT_BRACE","LEFT_BRACKET","RIGHT_BRACKET","COLON","COMMA","STRING","START","STOP","TRUE1","TRUE2","TRUE3","FALSE1","FALSE2","FALSE3","FALSE4","NULL1","NULL2","NULL3","NUMBER1","NUMBER3","STRING1","STRING2","STRING3","STRING4","STRING5","STRING6","VALUE","KEY","OBJECT","ARRAY","BACK_SLASH","FORWARD_SLASH","BACKSPACE","FORM_FEED","CARRIAGE_RETURN","TAB","Parser","tState","stringBuffer","stringBufferOffset","highSurrogate","bytes_remaining","bytes_in_sequence","temp_buffs","toknam","charError","appendStringChar","appendStringBuf","onToken","intVal","parseError","onValue","jsonparse","JSON2CSVTransform_1","_Transform","JSON2CSVTransform","transformOpts","_hasWritten","initObjectModeParse","ndjson","initNDJSONParse","initJSONParser","pushHeader","pushLine","getPendingData","pendingData","depthToEmit","_onToken","Transform$2","fastJoin$3","JSON2CSVAsyncParser_1","JSON2CSVAsyncParser","processor","_output","csvBuffer","Readable$1","Parser$1","AsyncParser","Transform$3","parseAsync","asyncParser","fromInput","json2csv","RBush","Queue","pointInPolygon","orient","orient2d","concaveman","concavity","lengthThreshold","hull","cull","filtered","compareByX","fastConvexHull","compareMinX","compareMinY","segTree","updateBBox","sqConcavity","sqLenThreshold","sqLen","getSqDist","maxSqLen","findCandidate","concave","compareDist","leaf","sqSegDist","sqSegBoxDist","noIntersections","sqSegSegDist","d3","d4","sN","tN","sD","tD","InternMap","keyof","_intern","intern_get","intern_set","intern_delete","timeoutDuration","longerTimeoutBrowsers","called","scheduled","functionToCheck","getStyleComputedProperty","getParentNode","getScrollParent","getReferenceNode","reference","isIE11","isIE10","isIE","getOffsetParent","noOffsetParent","nodeName","findCommonOffsetParent","element1","element2","commonAncestorContainer","isOffsetContainer","element1root","getScroll","upperSide","html","scrollingElement","includeScroll","modifier","getBordersSize","sideA","sideB","getWindowSizes","getClientRect","horizScrollbar","vertScrollbar","getOffsetRectRelativeToArbitraryNode","fixedPosition","runIsIE","isHTML","childrenRect","parentRect","scrollParent","getViewportOffsetRectRelativeToArtbitraryNode","excludeScroll","relativeOffset","isFixed","getFixedPositionOffsetParent","getBoundaries","boundaries","boundariesElement","boundariesNode","popper","isPaddingNumber","computeAutoPlacement","placement","rects","refRect","sortedAreas","filteredAreas","computedPlacement","variation","getReferenceOffsets","commonOffsetParent","getOuterSizes","getOppositePlacement","matched","getPopperOffsets","referenceOffsets","popperRect","popperOffsets","isHoriz","mainSide","secondarySide","measurement","secondaryMeasurement","runModifiers","modifiers","positionFixed","isModifierEnabled","modifierName","getSupportedPropertyName","upperProp","toCheck","setupEventListeners","attachToScrollParents","scrollParents","isBody","enableEventListeners","disableEventListeners","isNumeric","setStyles","isModifierRequired","requesting","requested","validPlacements","placements","BEHAVIORS","parseOffset","useHeight","basePlacement","frag","divider","splitRegex","ops","mergeWithPrevious","index2","shiftvariation","shiftOffsets","transformProp","popperStyles","opSide","arrowElement","sideCapitalized","altSide","arrowElementSize","popperMarginSide","popperBorderSide","sideValue","placementOpposite","flipOrder","refOffsets","overlapsRef","overflowsLeft","overflowsRight","overflowsTop","overflowsBottom","overflowsBoundaries","flippedVariationByRef","flippedVariationByContent","flippedVariation","getOppositeVariation","subtractLength","legacyGpuAccelerationOption","gpuAcceleration","shouldRound","noRound","referenceWidth","popperWidth","isVariation","horizontalToInteger","verticalToInteger","bothOddWidth","getRoundedOffsets","prefixedProperty","invertTop","invertLeft","Popper","modifierOptions","eventsEnabled","Utils","PopperUtils","Defaults","arrayWithoutHoles","nonIterableSpread","iterableToArrayLimit","baseRest","baseUniq","isArrayLikeObject","baseDifference","CustomPicker","TwitterPicker","SwatchesPicker","SliderPicker","SketchPicker","PhotoshopPicker","MaterialPicker","HuePicker","GithubPicker","CompactPicker","ChromePicker","CirclePicker","BlockPicker","AlphaPicker","_Block","_Circle","_Chrome","_Compact","_Github","_Material","_Photoshop","_Sketch","_Slider","_Swatches","_Twitter","_Chrome2","option","wrapCallback","_EventObject2","_ret","useCapture","_EventObject","MapShim","class_1","__entries__","requestAnimationFrame$1","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","leadingCall","trailingCall","resolvePending","proxy","timeoutCallback","throttle","addObserver","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","observe","characterData","subtree","disconnect","getInstance","instance_","defineConfigurable","getWindowOf","emptyRect","createRectInit","toFloat","getHTMLElementContentRect","paddings","positions_1","getPaddings","horizPad","vertPad","isDocumentElement","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","getSVGContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","broadcastRect","ResizeObserverEntry","rectInit","contentRect","Constr","DOMRectReadOnly","createReadOnlyRect","ResizeObserverSPI","callbackCtx","activeObservations_","observations_","callback_","controller_","callbackCtx_","observations","unobserve","clearActive","observation","ResizeObserver","bbox_1","boolean_point_on_line_1","boolean_point_in_polygon_1","doBBoxOverlap","bbox1","bbox2","compareCoords","pair1","pair2","feature1","feature2","type1","type2","isPointInMultiPoint","multiPoint1","multiPoint2","anyMatch","isMultiPointInMultiPoint","foundInsidePoint","isMultiPointOnLine","isMultiPointInPoly","lineString1","lineString2","isLineOnLine","polyBbox","lineBbox","midpoint","isLineInPoly","poly1Bbox","isPolyInPoly","matchFound","haveFoundInteriorPoint","getMidpoint","coords_1","ring_1","line_overlap_1","GeojsonEquality","segment1","segment2","MANUAL_SRGB","SRGB_FAST_APPROXIMATION","u_MetallicRoughnessValues","gltfTexture","textureOptions","pbrMetallicRoughness","metallicFactor","roughnessFactor","strength","higlassTracks","higlassTracksByType","higlassDataFetchersByType","getRandomName","registerTrack","trackDef","registerDataFetcher","dataFetcherDef","pluginType","_instanceof","nativeMap","nativeSet","nativePromise","circular","includeNonEnumerable","allParents","allChildren","useBuffer","_clone","__isArray","__isRegExp","__getRegExpFlags","__isDate","keyChild","valueChild","entryChild","allPropertyNames","__objToStr","clonePrototype","17","getFirstMatch","getSecondMatch","matchAndReturnConst","getWindowsVersionName","getMacOSVersionName","getAndroidVersionName","getVersionPrecision","compareVersions","getBrowserAlias","BROWSER_ALIASES_MAP","getBrowserTypeByAlias","BROWSER_MAP","18","ENGINE_MAP","OS_MAP","PLATFORMS_MAP","Bada","BlackBerry","Chrome","Chromium","Electron","Epiphany","Firefox","Focus","Generic","Googlebot","Maxthon","Opera","PhantomJS","Puffin","QupZilla","QQ","QQLite","Safari","Sailfish","SeaMonkey","Sleipnir","Swing","Tizen","Vivaldi","WeChat","Roku","amazon_silk","android","bada","blackberry","chromium","electron","epiphany","googlebot","google_search","k_meleon","maxthon","mz","naver","opera","opera_coast","phantomjs","puffin","qupzilla","qq","qqlite","safari","sailfish","samsung_internet","seamonkey","sleipnir","swing","tizen","vivaldi","webos","wechat","yandex","tablet","mobile","desktop","tv","WindowsPhone","Windows","MacOS","iOS","Android","WebOS","Linux","ChromeOS","PlayStation4","EdgeHTML","Blink","Trident","Presto","Gecko","WebKit","90","getParser","91","_ua","parsedResult","getUA","parseBrowser","describe","getBrowserName","getBrowserVersion","getOS","parseOS","getOSName","getOSVersion","getPlatform","parsePlatform","getPlatformType","getEngine","engine","parseEngine","getEngineName","isOS","isPlatform","compareVersion","isEngine","92","93","versionName","94","95","fillRef","composeRef","addEventListenerWrap","unstable_batchedUpdates","addDOMEventListener","Portal","createContainer","didUpdate","removeContainer","_container","getContainer","createPortal","isPointsEq","isAlignPoint","jsCssMap","Webkit","Moz","ms","getVendorPrefix","vendorPrefix","getTransformName","setTransitionProperty","matrix2d","matrix3d","forceRelayout","originalStyle","getComputedStyleX","getScrollLeft","getScrollTop","getOffset","docElem","getClientPosition","getDocument","_RE_NUM_NO_PX","RE_POS","getOffsetDirection","oppositeOffsetDirection","setLeftTop","presetH","presetV","horizontalProperty","verticalProperty","oppositeHorizontalProperty","oppositeVerticalProperty","originalTransition","originalOffset","getTransitionProperty","old","originalXY","getTransformXY","resultXY","match2d","setTransformXY","isBorderBoxFn","cs","rsLeft","BOX_MODELS","getPBMWidth","cssProp","domUtils","getWH","borderBoxValue","isBorderBox","cssBoxValue","borderBoxValueOrIsBorderBox","refWin","documentElementProp","cssShow","getWHIgnoreDisplay","includeMargin","oriOffset","oLeft","oTop","tLeft","tTop","setOffset","getWindowScrollLeft","getWindowScrollTop","viewportWidth","viewportHeight","positionStyle","getVisibleRectForElement","alwaysByViewport","visibleRect","originalPosition","documentWidth","documentHeight","bodyStyle","isAncestorFixed","maxVisibleWidth","maxVisibleHeight","getRegion","getAlignOffset","region","getElFuturePos","elRegion","refNodeRegion","isFailX","elFuturePos","isFailY","reg","flipOffset","convertOffset","offsetLen","normalizeOffset","doAlign","tgtRegion","isTgtRegionVisible","newOverflowCfg","fail","newElRegion","newPoints","newOffset","newTargetOffset","isCompleteFailX","isCompleteFailY","isStillFailX","isStillFailY","adjustForViewport","useCssRight","useCssBottom","useCssTransform","ignoreShake","alignElement","refNode","targetRegion","isOutOfVisibleRect","pageX","tgtPoint","pageY","pointInView","_iterableToArrayLimit","monitorResize","prevWidth","prevHeight","resizeObserver","_target$getBoundingCl","fixedWidth","fixedHeight","getPoint","RefAlign","onAlign","monitorWindowResize","_ref$monitorBufferTim","monitorBufferTime","cacheRef","nodeRef","only","forceAlignPropsRef","_useBuffer2","calledRef","timeoutRef","cancelTrigger","_forceAlignPropsRef$c","latestDisabled","latestTarget","activeElement","alignPoint","restoreFocus","_forceAlign","cancelForceAlign","resizeMonitor","sourceResizeMonitor","winResizeRef","useImperativeHandle","forceAlign","Align","motionDeadline","deadline","RefPopupInner","hiddenClassName","getMotion","RawCSSMotion","supportMotion","Popup","_Component","targetWidth","targetHeight","prevVisible","alignClassName","popupRef","createRef","alignRef","nextFrameState","nextFrameId","popupDomNode","getClassNameFromAlign","setStateOnNextFrame","cancelFrameState","submitState","getAlignTarget","getRootDomNode","renderPopupElement","stretch","destroyPopupOnHide","sizeStyle","minHeight","getZIndexStyle","mergedMotion","mergedMotionVisible","mergedAlignDisabled","mergedPopupVisible","motionRef","motionStyle","motionClassName","PopupInner","renderMaskElement","maskMotion","maskTransitionName","maskAnimation","nextStatus","TriggerContext","returnEmptyString","returnDocument","ALL_HANDLERS","generateTrigger","PortalComponent","Trigger","popupVisible","triggerRef","mouseEnterDelay","fireEvents","delaySetPopupVisible","setPoint","mouseLeaveDelay","onPopupMouseEnter","clearDelayTimer","onPopupMouseLeave","relatedTarget","isFocusToShow","focusTime","focusDelay","preClickTime","preTouchTime","isBlurToHide","blurDelay","setPopupVisible","onContextMenuClose","isContextMenuToShow","preTime","isClickToShow","isClickToHide","nextVisible","onPopupMouseDown","_this$context","hasPopupMouseDown","mouseDownTimeout","onDocumentClick","maskClosable","popupNode","getPopupDomNode","getTriggerDOMNode","domNode","getPopupClassNameFromAlign","popupPlacement","builtinPlacements","getAlignPopupClassName","getComponent","popupClassName","onPopupAlign","popupMotion","popupAnimation","popupTransitionName","popupStyle","popup","getPopupAlign","mouseProps","isMouseEnterToShow","isMouseLeaveToHide","popupContainer","getPopupContainer","handlePortalUpdate","prevPopupVisible","afterPopupVisibleChange","defaultPopupVisible","currentDocument","clickOutsideHandler","touchOutsideHandler","contextMenuOutsideHandler1","contextMenuOutsideHandler2","clearOutsideHandler","popupAlign","placementStr","getAlignFromPlacement","onPopupVisibleChange","delayS","delayTimer","childPros","showAction","hideAction","childCallback","_this$props10","forceRender","newChildProps","createTwoChains","childrenClassName","nodeOrComponent","cloneProps","portal","autoAdjustOverflow","adjustX","adjustY","rightTop","leftBottom","Content","overlay","overlayClassName","_props$trigger","_props$mouseEnterDela","_props$mouseLeaveDela","overlayStyle","_props$prefixCls","onVisibleChange","afterVisibleChange","_props$placement","_props$align","_props$destroyTooltip","destroyTooltipOnHide","defaultVisible","getTooltipContainer","restProps","domRef","_props$arrowContent","arrowContent","Tooltip","createBreakpoints","_breakpoints$values","_breakpoints$unit","_breakpoints$step","between","upperbound","createMixins","spacing","_toolbar","gutters","toolbar","paper","hoverOpacity","selectedOpacity","disabledBackground","disabledOpacity","focusOpacity","activatedOpacity","dark","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","createPalette","_palette$primary","_palette$secondary","_palette$error","_palette$warning","_palette$info","_palette$success","success","_palette$type","_palette$contrastThre","contrastThreshold","_palette$tonalOffset","getContrastText","augmentColor","mainShade","lightShade","darkShade","contrastText","roundWithDeprecationWarning","caseAllCaps","textTransform","createTypography","_ref$fontFamily","_ref$fontSize","_ref$fontWeightLight","fontWeightLight","_ref$fontWeightRegula","fontWeightRegular","_ref$fontWeightMedium","fontWeightMedium","_ref$fontWeightBold","fontWeightBold","_ref$htmlFontSize","htmlFontSize","allVariants","pxToRem2","coef","buildVariant","letterSpacing","casing","variants","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","overline","createShadow","shadows","createSpacing","spacingInput","mui","createUnarySpacing","argument","_options$breakpoints","breakpointsInput","_options$mixins","mixinsInput","_options$palette","paletteInput","_options$typography","typographyInput","muiTheme","formatMuiErrorMessage","isFeatureSupported","featureDefinition","isSupported","queryFeature","support","viewClasses","isArrayBufferView","normalizeName","normalizeValue","iteratorFor","Headers","consumed","bodyUsed","fileReaderReady","readBlobAsArrayBuffer","bufferClone","Body","_initBody","_bodyInit","_bodyText","isPrototypeOf","_bodyBlob","FormData","_bodyFormData","URLSearchParams","_bodyArrayBuffer","rejected","readAsText","readBlobAsText","readArrayBufferAsText","formData","upcased","normalizeMethod","form","rawHeaders","bodyInit","redirectStatuses","DOMException","abortXhr","getAllResponseHeaders","responseURL","responseText","ontimeout","withCredentials","onreadystatechange","readyState","extractEvents","eventTypes","phasedRegistrationNames","registrationName","stateNode","acceptsBooleans","attributeNamespace","mustUseProperty","sanitizeURL","xlinkHref","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","removeAttribute","setAttributeNS","ReactCurrentDispatcher","ReactCurrentBatchConfig","suspense","pb","$$typeof","_status","qb","_debugOwner","_debugSource","fileName","lineNumber","return","rb","xb","_valueTracker","stopTracking","yb","defaultChecked","_wrapperState","initialChecked","Cb","Gb","Fb","Hb","defaultSelected","Ib","dangerouslySetInnerHTML","Jb","MSApp","execUnsafeLocalFunction","namespaceURI","lastChild","animationiteration","animationstart","Wb","Yb","$b","dc","alternate","effectTag","ec","memoizedState","dehydrated","sibling","ic","_dispatchListeners","_dispatchInstances","isPropagationStopped","isPersistent","nc","correspondingUseElement","oc","pc","qc","topLevelType","targetInst","ancestors","rc","eventSystemFlags","containerInfo","xc","yc","zc","Ac","Bc","Cc","Dc","blockedOn","unstable_runWithPriority","hydrate","unstable_scheduleCallback","unstable_NormalPriority","bubbled","captured","eventPriority","unstable_UserBlockingPriority","jd","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","flexPositive","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","lineClamp","orphans","tabSize","widows","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","kd","ld","nd","menuitem","embed","keygen","track","wbr","od","pd","td","ud","vd","HTMLIFrameElement","contentEditable","Dd","Ed","Fd","autoFocus","Gd","__html","Hd","Id","Jd","Kd","previousSibling","Ld","Md","Nd","Od","Pd","Qd","Rd","Sd","Td","dispatchConfig","Ud","_targetInst","Vd","Wd","Xd","Yd","Zd","$d","Interface","isDefaultPrevented","returnValue","eventPool","destructor","getPooled","cancelBubble","eventPhase","bubbles","isTrusted","documentMode","beforeInput","compositionEnd","compositionStart","compositionUpdate","keyCode","detail","change","_isInputEventSupported","Alt","Control","Meta","Shift","getModifierState","screenX","screenY","shiftKey","fromElement","toElement","movementX","movementY","pressure","tangentialPressure","tiltX","tiltY","twist","isPrimary","mouseEnter","mouseLeave","pointerEnter","pointerLeave","ef","ff","hf","jf","selectionStart","selectionEnd","anchorNode","anchorOffset","focusNode","focusOffset","kf","lf","elapsedTime","pseudoElement","mf","clipboardData","of","pf","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","qf","8","12","13","16","19","20","27","32","33","34","35","36","37","38","39","40","45","46","112","113","114","115","116","117","118","119","120","121","122","123","144","145","224","rf","sf","tf","uf","vf","wheelDeltaX","wheelDeltaY","wheelDelta","deltaZ","deltaMode","wf","SimpleEventPlugin","EnterLeaveEventPlugin","ChangeEventPlugin","SelectEventPlugin","BeforeInputEventPlugin","yf","zf","Af","Bf","Cf","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Df","Ef","Ff","getChildContext","Gf","__reactInternalMemoizedMergedChildContext","Hf","If","Jf","Kf","unstable_cancelCallback","Lf","unstable_requestPaint","Mf","unstable_now","Nf","unstable_getCurrentPriorityLevel","Of","unstable_ImmediatePriority","Pf","Qf","Rf","unstable_LowPriority","Sf","unstable_IdlePriority","Tf","Uf","unstable_shouldYield","Vf","Wf","Xf","Yf","Zf","$f","ag","bg","cg","dg","eg","gg","hg","ig","jg","kg","mg","ng","og","_currentValue","pg","childExpirationTime","qg","firstContext","expirationTime","rg","sg","observedBits","responders","tg","ug","updateQueue","baseState","baseQueue","vg","wg","suspenseConfig","xg","yg","zg","Ag","Bg","Cg","Dg","Eg","Fg","Jg","isMounted","_reactInternalFiber","enqueueSetState","Gg","Hg","Ig","enqueueReplaceState","enqueueForceUpdate","Kg","shouldComponentUpdate","isPureReactComponent","Lg","updater","Mg","Ng","Og","Pg","_owner","_stringRef","Qg","Rg","lastEffect","nextEffect","firstEffect","Sg","Tg","elementType","Ug","Vg","Wg","Xg","Yg","Zg","$g","ah","bh","dh","fh","gh","memoizedProps","revealOrder","ih","responder","jh","kh","mh","nh","oh","ph","qh","rh","sh","th","uh","vh","wh","lastRenderedReducer","eagerReducer","eagerState","lastRenderedState","zh","Ah","deps","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","Jh","Kh","Lh","Mh","Nh","readContext","useCallback","useState","useDebugValue","useResponder","useDeferredValue","useTransition","Oh","Ph","Qh","Rh","Sh","Th","pendingProps","Uh","Vh","Wh","Xh","Yh","ReactCurrentOwner","Zh","$h","pendingContext","retryTime","unstable_avoidThisFallback","isBackwards","rendering","renderingStartTime","tailExpiration","tailMode","wasMultiple","onclick","createElementNS","WeakSet","__reactInternalSnapshotBeforeUpdate","_reactRootContainer","componentDidCatch","aj","componentStack","Rj","bj","cj","dj","kj","lj","mj","nj","oj","qj","rj","sj","tj","uj","vj","wj","timeoutMs","zj","lastExpiredTime","Aj","firstPendingTime","lastPingedTime","nextKnownPendingLevel","callbackExpirationTime","callbackPriority","callbackNode","Bj","Cj","Dj","Ej","Fj","Gj","Hj","finishedWork","finishedExpirationTime","lastSuspendedTime","Ij","timeoutHandle","Jj","busyMinDurationMs","busyDelayMs","Kj","Mj","Nj","pingCache","Oj","ub","Pj","Qj","Sj","firstSuspendedTime","rangeCount","wb","activeElementDetached","focusedElem","selectionRange","Tj","wd","compareDocumentPosition","setStart","addRange","setEnd","vb","Uj","Vj","Wj","hidden","_ctor","Xj","_calculateChangedBits","unstable_observedBits","Zj","pendingChildren","ak","bk","ck","dk","ek","fk","_internalRoot","gk","ik","hasAttribute","hk","jk","kk","unmount","querySelectorAll","Lj","lk","findFiberByHostInstance","supportsFiber","onCommitFiberRoot","onCommitFiberUnmount","Yj","overrideHookState","overrideProps","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","bundleType","rendererPackageName","flushSync","unmountComponentAtNode","unstable_createPortal","unstable_renderSubtreeIntoContainer","__self","__source","IsSomeRendererActing","Fragment","Profiler","StrictMode","Suspense","_currentValue2","_threadCount","Consumer","createFactory","lazy","MessageChannel","unstable_forceFrameRate","port2","port1","sortIndex","priorityLevel","unstable_Profiling","unstable_continueExecution","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_wrapCallback","hashClear","hashDelete","hashGet","hashHas","hashSet","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","secret","getShim","ReactPropTypes","instanceOf","objectOf","exact","checkPropTypes","isEqualImpl","_reactDom","_reactResizable","GridItem","newPosition","clientRect","cLeft","pLeft","cTop","pTop","_calcXY","getPositionParams","bottomBoundary","rightBoundary","_calcXY2","_this$state$dragging","_calcXY3","callbackData","onResizeHandler","oldPosition","moveDroppingItem","prevDroppingPosition","shouldDrag","mins","maxes","_calcWH","newChild","dropping","cssTransforms","mixinResizable","mixinDraggable","_require","Draggable","_DraggableCore","_positionFns","_log","dragged","uiData","slackX","slackY","_getBoundPosition2","newStateX","newStateY","_this$props$position","defaultPosition","prevPropsPosition","isElementSVG","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","draggableCoreProps","svgTransform","validPosition","getPrefix","browserPrefixToStyle","shouldCapitalize","kebabToTitleCase","eventsFor","move","dragEventFor","allowAnyClick","coreEvent","enableUserSelectHack","handleDrag","handleDragStop","_snapToGrid2","MouseEvent","initMouseEvent","handleDragStart","ResizableBox","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__2__","installedModules","__webpack_require__","styleHacks","browserPrefix","_Resizable","propsWidth","propsHeight","_responsiveUtils","_ReactGridLayout","getIndentationValue","ResponsiveReactGridLayout","generateInitialState","_cols","colNo","onWidthChange","newBreakpoint","newCols","newLayouts","onBreakpointChange","xxs","ComposedComponent","onWindowResize","measureBeforeMount","baseRange","isIterateeCall","toFinite","fromRight","nativeCeil","validateGenerator","checkCompiling","compIndex","endCompiling","patternCode","patterns","defaultCode","refValCode","customRuleCode","vars","statement","patternsHash","defaultsHash","customRules","compilation","localCompile","cv","_schema","isRoot","resolveRef","usePattern","useCustomRule","makeValidate","_refVal","refCode","refIndex","resolvedRef","rootRefId","addLocalRef","localSchema","refId","replaceLocalRef","removeLocalRef","inline","regexStr","valueStr","macro","sets","HEXDIG$$","PCT_ENCODED$","subexp","SUB_DELIMS$$","RESERVED$$","isIRI","SCHEME$","ALPHA$$","USERINFO$","DEC_OCTET_RELAXED$","H16$","LS32$","IPV6ADDRESS1$","IPV6ADDRESS2$","IPV6ADDRESS3$","IPV6ADDRESS4$","IPV6ADDRESS5$","IPV6ADDRESS6$","IPV6ADDRESS7$","IPV6ADDRESS8$","IPV6ADDRESS9$","ZONEID$","UNRESERVED$$","IPV6ADDRESS$","IP_LITERAL$","IPV6ADDRZ_RELAXED$","HOST$","PORT$","DIGIT$$","AUTHORITY$","PCHAR$","SEGMENT$","SEGMENT_NZ$","SEGMENT_NZ_NC$","PATH_ABEMPTY$","PATH_ABSOLUTE$","QUERY$","FRAGMENT$","HIER_PART$","URI$","RELATIVE_PART$","RELATIVE$","IPV4ADDRESS$","buildExps","maxInt","regexPunycode","regexNonASCII","regexSeparators","stringFromCharCode","digitToBasic","digit","adapt","firstTime","baseMinusTMin","inputLength","bias","basic","oldi","baseMinusT","ucs2decode","basicLength","handledCPCount","handledCPCountPlusOne","qMinusT","punycode","mapDomain","SCHEMES","newStr","decodeUnreserved","decStr","pctDecChars","host","address","zone","firstFields","lastFields","isLastFieldIPv4Address","fieldCount","lastFieldsStart","_normalizeIPv4","longestZeroFields","lastLongest","newHost","newFirst","newLast","URI_PARSE","NO_MATCH_IS_UNDEFINED","uriString","_normalizeIPv6","schemeHandler","uriTokens","$1","$2","RDS1","RDS2","RDS3","RDS5","authority","_recomposeAuthority","removeDotSegments","skipNormalization","IRI_PROTOCOL","URI_PROTOCOL","VCHAR$$","UNRESERVED","PCT_ENCODED","NOT_LOCAL_PART","NOT_HFNAME","NOT_HFVALUE","mailtoComponents","unknownHeaders","hfields","hfield","toAddrs","unescapeComponent","addr","toAddr","atIdx","localPart","URN_PARSE","urnComponents","scheme","nid","nss","urnScheme","uriComponents","UUID","uuidComponents","mailto","urn","schemelessOptions","resolveComponents","typeOf","uriA","uriB","_traverse","pre","post","arrayKeywords","propsKeywords","skipKeywords","additionalItems","additionalProperties","allOf","anyOf","definitions","patternProperties","enum","exclusiveMaximum","exclusiveMinimum","multipleOf","minLength","maxItems","minItems","uniqueItems","maxProperties","minProperties","DAYS","TIME","HOSTNAME","URITEMPLATE","JSON_POINTER_URI_FRAGMENT","isLeapYear","full","timeZone","fast","hostname","ipv4","ipv6","DATE_TIME_SEPARATOR","NOT_URI_FRAGMENT","Z_ANCHOR","ruleModules","ALL","implKeywords","custom","$refCode","$refVal","$message","missingRefs","$it","$nextValid","passContext","__callValidate","$closingBraces","$currentBaseId","$allSchemasEmpty","$errs","$wasComposite","$idx","$dataNxt","$nextData","$nonEmptySchema","$schemaDeps","$propertyDeps","$ownProperties","ownProperties","$property","$deps","$currentErrorPath","$useData","$prop","$propertyPath","$missingProperty","$vSchema","$unknownFormats","unknownFormats","$allowUnknown","$format","$isObject","$formatType","$formatRef","$thenSch","$elseSch","$thenPresent","$elsePresent","$ifClause","$additionalItems","$currErrSchemaPath","multipleOfPrecision","$allErrorsOption","$prevValid","$passingSchemas","$key","$dataProperties","$schemaKeys","$pProperties","$pPropertyKeys","$aProperties","$someProperties","$noAdditional","$additionalIsSchema","$removeAdditional","removeAdditional","$checkAdditional","$required","$requiredHash","$pProperty","$additionalProperty","$useDefaults","$hasDefault","$invalidName","$propertySch","$loopRequired","$itemType","KEYWORDS","keywordsJsonPointers","loadSchema","loadMetaSchemaOf","_compileAsync","loadMissingSchema","schemaPromise","removePromise","definitionSchema","_addRule","ruleGroup","throwError","_validateKeyword","$compile","$inline","$macro","$ruleValidate","$validateCode","$definition","$rDef","$validateSchema","$ruleErrs","$ruleErr","$asyncKeyword","statements","$parentDataProperty","def_callRuleValidate","modifying","def_customError","simpleTypes","msCrypto","rnds8","byteToHex","bth","getLens","validLen","placeHoldersLen","_byteLength","curByte","runtime","Op","iteratorSymbol","asyncIteratorSymbol","toStringTagSymbol","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","_invoke","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","__await","unwrapped","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iteratorMethod","isGeneratorFunction","genFun","mark","awrap","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","complete","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","jsxDEV","jObj","asArray","hexRegex","numRegex","consider","decimalPoint","eNotation","trimZeros","trimmedStr","skipLike","numTrimmedByZeros","readPI","getErrorObject","getLineNumberForPosition","readCommentAndCDATA","angleBracketsCount","tagFound","reachedRoot","tagStartPos","closingTag","readAttributeStr","attrStrStart","validateAttributeString","tagClosed","otg","openPos","afterAmp","validateAmpersand","validAttrStrRegxp","attrNames","getPositionFromMatch","validateAttrName","validateNumberAmpersand","nilChar","missingChar","nilPremitive","missingPremitive","emptyChar","emptyValue","boundryChar","objStart","arrStart","arrayEnd","charsArr","e_schema","hasValidData","itemSchema","arr_len","arr_i","isAppChar","x2j","_cToJsonStr","indentBy","supressEmptyNode","isAttribute","attrPrefixLen","isCDATA","replaceCDATAstr","replaceCDATAarr","processTextOrObjNode","indentate","tagEndChar","newLine","buildTextNode","buildEmptyTextNode","buildObjNode","buildEmptyObjNode","buildTextValNode","buildObjectNode","j2x","rootNodeName","arrLen","Ks","inserted","pushNode","forEachReverse","getReverse","mapReverse","reduceReverse","toArrayReverse","sliceReverse","deleteCount","Alea","seed","mash","Mash","s0","prng","quick","XorGen","strseed","math","nodecrypto","startdenom","significance","seedrandom","shortseed","mixkey","typ","entropy","tostring","screen","autoseed","arc4","ARC4","is_math_call","keylen","smear","stringseed","_maxEntries","_minEntries","_all","_build","_splitRoot","_insert","_condense","_chooseSubtree","_split","_adjustParentBBoxes","_chooseSplitAxis","_chooseSplitIndex","_allDistMargin","TinyQueue","_down","_up","halfLength","best","pointInPolygonFlat","pointInPolygonNested","orient2dfast","arrayEach","baseAssign","baseAssignIn","cloneBuffer","copyArray","copySymbols","copySymbolsIn","getAllKeysIn","initCloneArray","initCloneByTag","initCloneObject","isMap","isSet","cloneableTags","isFlat","isFull","isFunc","subValue","keysIn","copyObject","nativeKeysIn","isProto","cloneDataView","cloneRegExp","cloneSymbol","cloneTypedArray","reFlags","regexp","objectCreate","baseIsMap","nodeIsMap","baseIsSet","nodeIsSet","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Lazy","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","spreadableSymbol","isConcatSpreadable","otherArgs","baseSetToString","shortOut","nativeNow","lastCalled","stamp","arrayIncludes","arrayIncludesWith","createSet","isCommon","outer","computed","baseFindIndex","baseIsNaN","strictIndexOf","fromIndex","valuesLength","valuesIndex","DESCRIPTORS","getKeys","gOPS","$assign","aLen","isEnum","toAbsoluteIndex","IS_INCLUDES","$this","toInteger","$at","iterated","TO_STRING","ObjectProto","TO_STRING_TAG","DOMIterables","addToUnscopables","_k","Arguments","META","$fails","wks","wksDefine","enumKeys","_create","gOPNExt","$GOPD","$GOPS","$DP","gOPN","$JSON","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","findChild","setSymbolDesc","protoDesc","$defineProperty","$defineProperties","$propertyIsEnumerable","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","es6Symbols","wellKnownSymbols","keyFor","useSetter","useSimple","FAILS_ON_PRIMITIVES","$replacer","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","NEED","fastKey","getWeak","onFreeze","windowNames","getWindowNames","buggy","_common","_AlphaPointer2","pointer","_ref$className","picker","Alpha","flattenNames","_isString3","_forOwn3","_isPlainObject3","_map3","things","thing","baseMatches","baseMatchesProperty","baseIsMatch","getMatchData","matchesStrictComparable","matchData","noCustomizer","COMPARE_PARTIAL_FLAG","isStrictComparable","hasIn","memoizeCapped","subString","baseHasIn","hasPath","hasFunc","baseProperty","basePropertyDeep","eachFunc","mergeClasses","_cloneDeep3","toMerge","autoprefix","_forOwn2","msBorderRadius","MozBorderRadius","OBorderRadius","WebkitBorderRadius","msBoxShadow","MozBoxShadow","OBoxShadow","WebkitBoxShadow","WebkitTouchCallout","KhtmlUserSelect","MozUserSelect","msUserSelect","WebkitUserSelect","WebkitBoxFlex","MozBoxFlex","flexBasis","WebkitFlexBasis","WebkitJustifyContent","msTransition","MozTransition","OTransition","WebkitTransition","otherElementStyles","otherStyle","Span","Hover","handleMouseOver","handleMouseOut","Active","_Checkboard2","calculateChange","unbindEventListeners","initialA","pageXOffset","pageYOffset","checkboardCache","serverCanvas","fillRect","toDataURL","EditableInput","VALID_KEY_CODES","blurValue","setUpdatedValue","getNumberValue","getArrowOffset","updatedValue","dragLabel","dragMax","getValueObjectWithLabel","arrowOffset","getIsPercentage","spellCheck","hideLabel","Hue","_props$direction","_h","Raised","_propTypes2","_merge2","zDepth","_ref$styles","passedStyles","assignMergeValue","baseMergeDeep","safeGet","toPlainObject","mergeFunc","isTyped","assigner","Saturation","_throttle2","saturation","_container$getBoundin","bright","Swatch","_interaction","_ref$onClick","_ref$title","_ref$focusStyle","focusStyle","transparent","swatch","AlphaPointer","_BlockSwatches2","triangle","hexCode","card","borderWidth","borderColor","BlockSwatches","_map2","swatches","Circle","_CircleSwatch2","circleSize","circleSpacing","flexWrap","CircleSwatch","_reactcss","_ChromeFields2","_ChromePointer2","_ChromePointerCircle2","disableAlpha","controls","toggles","ChromeFields","_UnfoldMoreHorizontalIcon2","toggleViews","showHighlight","hideHighlight","toggle","iconHighlight","svg","_ref$fill","_ref$width","_ref$height","_ref$style","ChromePointer","ChromePointerCircle","Compact","_CompactColor2","_CompactFields2","CompactColor","CompactFields","HEXwrap","HEXinput","HEXlabel","RGBwrap","RGBinput","RGBlabel","Github","_GithubSwatch2","borderBottomColor","triangleShadow","GithubSwatch","hoverSwatch","_HuePointer2","SliderPointer","Material","borderBottom","Hex","third","Photoshop","_PhotoshopFields2","_PhotoshopPointerCircle2","_PhotoshopPointer2","_PhotoshopButton2","_PhotoshopPreviews2","currentColor","_props$styles","_props$className","backgroundImage","previews","onAccept","onCancel","fieldSymbols","PhotoshopPointerCircle","triangleBorder","Extend","leftInside","rightInside","PhotoshopButton","PhotoshopPreviews","new","Sketch","_SketchFields2","_SketchPresetColors2","presetColors","sliders","activeColor","SketchFields","single","SketchPresetColors","borderTop","swatchWrap","handleClick","colorObjOrString","Slider","_SliderSwatches2","_SliderPointer2","SliderSwatches","_SliderSwatch2","SliderSwatch","Swatches","_SwatchesGroup2","SwatchesGroup","_SwatchesColor2","SwatchesColor","_CheckIcon2","Twitter","hexcode","_EventBaseObject2","_objectAssign2","commonProps","isNullOrUndefined","eventNormalizers","fix","HORIZONTAL_AXIS","VERTICAL_AXIS","eventDoc","clientLeft","clientTop","retTrue","retFalse","DomEventObject","isNative","getPreventDefault","fixFns","normalizer","fixFn","EventBaseObjectProto","returnFalse","returnTrue","EventBaseObject","isEventObject","isImmediatePropagationStopped","halt","immediate","nearest_point_on_line_1","concatSegment","overlapSegment","doesOverlaps","coordsSegment","coordsMatch","_initFormat","findItem","equalsFn","calcBBox","distBBox","destNode","compareNodeMinX","compareNodeMinY","bboxArea","bboxMargin","intersectionArea","multiSelect","childBBox","nodesToSearch","tmpNode","goingUp","indexes","right2","right3","N2","N1","targetNode","enlargement","minArea","minEnlargement","isNode","insertPath","newNode","minOverlap","leftBBox","rightBBox","siblings","compareArr","isEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","hasToStringTag","isStandardArguments","isLegacyArguments","supportsStandardArguments","numberIsNaN","regexExec","tryRegexExecCall","ERROR_MESSAGE","binder","boundLength","boundArgs","callBind","getPolyfill","flagsBound","$Function","GetIntrinsic","$apply","$call","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","asyncGenIterator","INTRINSICS","Atomics","decodeURI","encodeURI","EvalError","SharedArrayBuffer","URIError","$replace","getBaseIntrinsic","allowMissing","origSymbol","hasSymbolSham","symObj","syms","TypeErr","tryDateObject","Equality","pseudoNode","objectComparator","explode","sameLength","g1","g2","obj1","obj2","compareCoord","compareLine","comparePolygon","compareFeature","g1s","g2s","g1part","g2part","path1","ind","isPoly","removePseudo","fixStartIndex","sameDirection","comparePath","sourcePath","targetPath","correctPath","holes1","holes2","compareBBox","geoJson","JunctionsLayer","updateTrigger","JunctionScatterplotLayer","toDeckColor","getStrokeColor","getInnerRadius","nebulaLayer","ResizeCircleMode","numberOfSteps","getAddManyFeaturesAction","ExtendLineStringMode","getSelectedGeometry","selectedLineString","getSingleSelectedLineString","distanceFromOrigin","lastBearing","currentDistance","lastPoint","approximatePoint","generatePointsParallelToLinePoints","calculateMapCoords","isLineInterectingWithPolygon","gap","updatedCoordinates","agg","coordinatesSize","isPointAdded","nextPositionIndexes","getPointForPositionIndexes","prevPositionIndexes","isOrthogonal","nextPoint","prevAngle","getBearing","nextAngle","defaultCalculateElevationChange","minElevation","maxElevation","calculateElevationChange","makeElevatedEvent","updatedCursor","scaleMode","translateMode","filteredModes","compositeGuides","rotateMode","nonEnvelopeGuides","guide","guidesToFilterOut","lineStringToAdd","rectangle","coord4","distance1","distance2","shortestDistance","newPoint","square","centerCoordinates","polygonPoints","finalizedCoordinates","fakePointerMoveEvent","getIntermediatePoint","angle1","angle2","angles","newAngle1","newAngle2","handleDraggingThrottled","MeasureDistanceMode","positionA","positionB","turfOptions","measurementCallback","_calculateDistanceForTooltip","_formatTooltip","clickSequenceLength","getClickSequence","_currentDistance","MeasureAreaMode","propsWithoutEdit","tentativeGuide","MeasureAngleMode","_getTooltips","snapSource","snapTarget","getPickedSnapSourceEditHandle","snapSourceHandle","snapSourceFeature","additionalSnapTargets","_getSnapTargets","enableSnapping","_handler","_getPickedSnapSource","_getSnapTargetHandles","_getUpdatedSnapSourceHandle","_getPickedSnapTarget","_getSnappedMouseEvent","_getSnapAwareEvent","EMPTY_FEATURE_COLLECTION","getEditedCluster","hexIds","updatedHexagons","EditableH3ClusterLayer","tentativeHexagonIDs","hexIDs","hexID","committedHexagonIDs","finalHexagonIDs","existingCluster","cumulativeHexIDs","selectedCluster","MODE_MAP","MODE_CONFIG_MAP","dragToDraw","EMPTY_DATA","PASS_THROUGH_PROPS","SelectionLayer","pendingPolygonSelection","blockerId","inheritedProps","ElevatedEditHandleLayer","getStrokeWidth","INITIAL_STATE","DEFAULT_MARKER_LAYER","DEFAULT_MARKER_LAYER_PROPS","Arrow2DGeometry","headSize","tailWidth","MarkerLayer","markerLayerProps","hightlightIndex","highlightPoint","getMarkerColor","getMarkerPercentages","PathMarkerLayer","markers","highlightIndex","getClosestPointOnPolyline","getArrowAttributes","tailStart","vPoints","Vector2","vPointsReverse","getLineLength","percentage","createMarkerAlongPath","DEFAULT_DIRECTION","forward","backward","distanceAlong","previousDistance","along","vCenter","vDirection","vDirection2","pClosest","pClosestOnLine","getClosestPointOnLine","distanceToLineSquared","clampToLine","lineVector","pointVector","groundCoords","TextsLayer","NEBULA_TO_DECK_DIRECTIONS","SegmentsLayer","enablePicking","noBlend","dashed","arrowPercentages","MAX_ARROWS","deckglMouseOverInfo","originalLayer","arrowSize","_getHighlightedObjectIndex","Nebula","proxyEvent","_mouseWasDown","onMapMouseEvent","eventFilter","sendMapEvent","_deckDrawer","getMouseGroundPosition","pickingInfo","deckLayer","nebulaMouseEvent","getAllLayers","mainContainer","doccy","topLevel","minDoc","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","getBlob","version1","version2","hasPre","defaultResult","rtl","COERCERTL","maxSV","rangeObj","minSV","minver","setMin","compver","r2","simplified","simpleSubset","dom","gtltComp","eqSet","higherGT","lowerLT","higher","hasDomLT","hasDomGT","needDomLTPre","needDomGTPre","sawNonNull","OUTER","simpleSub","simpleDom","isSub","_nodeId","_clockseq","_lastMSecs","_lastNSecs","clockseq","seedBytes","msecs","nsecs","tmh","hashfunc","generateUUID","namespace","unescape","stringToBytes","uuidToBytes","DNS","safeAdd","lsw","md5cmn","md5ff","md5gg","md5hh","md5ii","md5","v35","length32","md5ToHexEncodedArray","olda","oldb","oldc","oldd","wordsToMd5","length8","bytesToWords","ROTL","sha1","booleanClockwise","rewindLineString","rewind","isPoint","defineOrigin","originalDistance","newDistance","newCoord","originIsPoint","travelled","overshot","measureDistance","transformTranslate","zTranslation","poly1","poly2","unioned","calculateArea","ringArea","lowerIndex","middleIndex","upperIndex","coordsLength","pickingHighlightColor","selectedColor","IconButton","_props$edge","_props$disableFocusRi","disableFocusRipple","_props$size","edgeStart","edgeEnd","colorInherit","sizeSmall","_props$disablePortal","disablePortal","onRendered","mountNode","setMountNode","defaultVariantMapping","Typography","_props$display","_props$gutterBottom","gutterBottom","_props$noWrap","noWrap","_props$paragraph","_props$variant","variant","_props$variantMapping","variantMapping","srOnly","alignLeft","alignCenter","alignRight","alignJustify","textOverflow","whiteSpace","colorTextPrimary","colorTextSecondary","displayInline","displayBlock","EOL","EOF","objectConverter","inferColumns","columnSet","formatDate","hours","minutes","reFormat","DELIMITER","parseRows","preformatBody","formatRow","customConverter","formatBody","formatRows","__VERSION__","checkIfBrowser","getStorage","storage","updateConfiguration","serialized","serializedConfiguration","formatImage","imageUrl","BLACK","GREEN","YELLOW","BLUE","MAGENTA","CYAN","WHITE","BRIGHT_BLACK","BRIGHT_RED","BRIGHT_GREEN","BRIGHT_YELLOW","BRIGHT_BLUE","BRIGHT_MAGENTA","BRIGHT_CYAN","BRIGHT_WHITE","autobind","predefined","propNames","originalConsole","ONCE","getTableHeader","_storage","_getLogFunction","_shouldLog","logImageInBrowser","asciify","fit","logImageInNode","normalizeArguments","normalizeLogLevel","decorateMessage","resolvedLevel","messageType","padLength","leftPad","formatted","Log","multiKeyStore","key1","key2","subCache","indexCounter","increment","getStylesCreator","themingEnabled","stylesWithOverrides","noopTheme","getClasses","disableGeneration","cacheClasses","lastProp","lastJSS","generate","baseClasses","newClasses","stylesCreator","sheetManager","sheetsManager","staticSheet","dynamicStyles","serverGenerateClassName","generateClassName","sheetsRegistry","sheetsCache","dynamicSheet","useSynchronousEffect","currentKey","classNamePrefixOption","_options$defaultTheme","stylesOptions2","StylesContext","Transition","initialStatus","appearStatus","unmountOnExit","mountOnEnter","nextCallback","cancelNextCallback","getTimeouts","mounting","performEnter","performExit","appearing","maybeNode","maybeAppearing","timeouts","enterTimeout","safeSetState","onEntered","onEnter","onEntering","onExit","onExiting","setNextCallback","doesNotHaveTimeoutOrListener","addEndListener","maybeNextCallback","childProps","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","makeStylesWithoutDefault","nextClasses","pseudoClasses","createGenerateClassName","_options$disableGloba","disableGlobal","_options$productionPr","productionPrefix","_options$seed","seedPrefix","getNextCounterId","valueof","_getVaryingIndex","_getBufferParams","primitiveMode","bufferOrParams","getVaryingInfo","channelHandles","animationHandles","rate","channel","animationHandle","channelHandle","lastEngineTime","engineTime","offsetTime","CircularProgress","_props$disableShrink","disableShrink","_props$thickness","thickness","_props$value","circleStyle","rootStyle","rootProps","circumference","determinate","indeterminate","SIZE","circleDisableShrink","circleDeterminate","circleIndeterminate","circleStatic","stroke","transformOrigin","getAnchorEl","anchorEl","defaultPopperOptions","_props$keepMounted","keepMounted","initialPlacement","_props$popperOptions","popperOptions","popperRefProp","popperRef","_props$transition","tooltipRef","ownRef","handlePopperRef","handlePopperRefRef","exited","setExited","rtlPlacement","flipPlacement","setPlacement","handleOpen","handlePopperUpdate","PopperJs","preventOverflow","onCreate","handleClose","TransitionProps","mapEventPropToEvent","eventProp","ClickAwayListener","_props$disableReactTr","disableReactTree","_props$mouseEvent","mouseEvent","onClickAway","_props$touchEvent","touchEvent","movedRef","activatedRef","syntheticEventRef","handleClickAway","insideReactTree","clickedRootScrollbar","insideDOM","composedPath","createHandleSynthetic","childrenPropsHandler","childrenProps","mappedTouchEvent","mappedMouseEvent","entering","entered","defaultTimeout","Fade","_props$disableStrictM","disableStrictModeCompat","_props$TransitionComp","TransitionComponent","_props$timeout","enableStrictModeCompat","unstable_strictMode","foreignRef","normalizedTransitionCallback","nodeOrAppearing","isAppearing","handleEntering","handleEnter","webkitTransition","handleEntered","handleExiting","handleExit","Paper","_props$square","_props$elevation","outlined","Link","TypographyClasses","_props$underline","underline","handlerRef","underlineNone","underlineHover","underlineAlways","CUBE_INDICES","CUBE_POSITIONS","CUBE_NORMALS","CUBE_TEX_COORDS","ATTRIBUTES","POSITIONS","TEX_COORDS","aClipSpacePosition","aTexCoord","aCoordinate","TableContainer","_props$padding","_props$stickyHeader","stickyHeader","borderCollapse","borderSpacing","captionSide","tablelvl2","TableBody","TableRow","_props$hover","_props$selected","footer","TableCell","paddingProp","scopeProp","scope","variantProp","isHeadCell","ariaSort","paddingCheckbox","paddingNone","flexDirection","AccordionDetails","AccordionSummary","expandIcon","_props$IconButtonProp","IconButtonProps","_React$useContext","_React$useContext$dis","focused","SPACINGS","GRID_SIZES","_props$alignContent","alignContent","_props$alignItems","classNameProp","_props$container","_props$item","justify","_props$justifyContent","_props$lg","_props$md","_props$sm","_props$spacing","_props$wrap","_props$xl","_props$xs","_props$zeroMinWidth","zeroMinWidth","StyledGrid","themeSpacing","generateGutter","accumulator","globalStyles","generateGrid","FormControl","_props$error","_props$fullWidth","fullWidth","visuallyFocused","_props$hiddenLabel","hiddenLabel","_props$margin","_props$required","initialAdornedStart","adornedStart","setAdornedStart","initialFilled","setFilled","_React$useState3","_focused","setFocused","onFilled","childContext","onEmpty","registerEffect","marginNormal","marginDense","Button","_props$disableElevati","disableElevation","endIconProp","endIcon","startIconProp","startIcon","textPrimary","textSecondary","outlinedPrimary","outlinedSecondary","contained","containedPrimary","containedSecondary","textSizeSmall","textSizeLarge","outlinedSizeSmall","outlinedSizeLarge","containedSizeSmall","containedSizeLarge","sizeLarge","iconSizeSmall","iconSizeMedium","iconSizeLarge","Tab","indicator","selectionFollowsFocus","_props$textColor","textColor","_props$wrapped","labelIcon","_extends2","textColorInherit","textColorPrimary","textColorSecondary","ThemeProvider","localTheme","outerTheme","mergeOuterLocalTheme","shallowEqual","aKeys","bKeys","__extends","extendStatics","_hasOwnProperty","_objectKeys","_deepClone","escapePathComponent","unescapePathComponent","patchErrorMessageFormatter","messageParts","PatchError","_newTarget","JsonPatchError","deepClone","objOps","newDocument","removed","getValueByPointer","originalValue","applyOperation","valueToCopy","_areEquals","_get","arrOps","getOriginalDestination","validateOperation","mutateDocument","banPrototypeModifications","existingPathFragment","validateFunction","applyPatch","length_1","applyReducer","operationResult","hasUndefined","objKeys","objKeysLength","pathLen","existingPathLen","externalValidator","arrA","arrB","beforeDict","Mirror","ObserverInfo","mirror","getMirror","observerInfo","getObserverFromMirror","dirtyCheck","fastCheck","patches","removeObserverFromMirror","invertible","_generate","newKeys","oldKeys","deleted","oldVal","newVal","tree1","tree2","duplex","UniqueList","idFunc","asyncCallback","TUPLE_ID_KEY","TUPLE_ID","isTuple","tupleid","setid","ingest$1","derive","rederive","stableCompare","isChangeSet","changeset","remp","modp","tuple","pulse","tuples","modifies","Parameters","modified","OP_ID","NO_PARAMS","Operator","qrank","_update","targets","_targets","initonly","argval","_argval","argops","_argops","marshall","evaluate","StopPropagation","rv","STREAM_ID","EventStream","_filter","_apply","_pending","loadPending","requests","_consume","trg","dataflow","SKIP","onStream","onOperator","connect","Pulse","materialize","visit","addFilter","MultiPulse","pulses","ADD","REM","MOD","changes","prerun","postrun","_pulse","reentrant","_touched","_clock","_enqueue","_heap","_getPulse","_postrun","runAsync","_running","ADD_REM","ADD_MOD","REFLOW","SOURCE","NO_SOURCE","NO_FIELDS","fork","addF","remF","modF","srcF","cleans","runAfter","nomod","NO_OPT","Heap","siftdown","ridx","cidx","siftup","pidx","Dataflow","_rank","_locale","logMethod","cleanThreshold","targetRank","rerank","ingest","preload","singlePulse","Definition","numbers","quantile","value0","variance","quantiles","quantileSorted","quartiles","estimateBandwidth","minstep","maxb","logb","nice","setRandom","bootstrapCI","mu","dotbin","thresh","pdf","cdf","icdf","SQRT2PI","SQRT2","nextSample","sampleNormal","stdev","rds","densityNormal","cumulativeNormal","quantileNormal","erfinv","gaussian","sigma","kde","bandwidth","kernel","sampleLogNormal","densityLogNormal","cumulativeLogNormal","quantileLogNormal","lognormal","mixture","dists","weights","distributions","sampleUniform","densityUniform","cumulativeUniform","quantileUniform","ols","uX","uY","uXY","uX2","xv","yv","visitPoints","rSquared","SSE","SST","sse","sst","linear","XY","X2","ly","YL","XYL","X2Y","YS","X3","X4","X2X2","lhs","rhs","gaussianElimination","uncenter","loess","yhat","residuals","robustWeights","xk","yk","tricube","xkw","updateInterval","medianResidual","MIN_RADIANS","sampleCurve","minSteps","maxSteps","sx","ymin","pm","angleDelta","groupkey","measureName","as","base_op","AggregateOps","__count__","missing","mean_d","req","dev","variancep","stdevp","stderr","distinct","ci0","ci1","argmin","argmax","ValidAggregateOps","createMeasure","compareIndex","_ops","compileMeasures","getreqs","ctr","TupleStore","prototype$1","Aggregate","_adds","_mods","_alen","_mlen","_drop","_cross","_dims","_dnames","_measures","_countOnly","_counts","_prev","_inputs","_outputs","_add","_rem","_ext","_q","quartile","_ci","aggr","vals","collect","cells","inputs","outputs","inputMap","inputVisit","groupby","dname","cellkey","mname","outname","newcell","newtuple","measures","celltuple","counts","adds","mods","Bin","SortedList","resort","Collect","Compare","update$5","CountPattern","Cross","band","bins","_bins","tcase","tokenize","case","_parameterCheck","_match","_stop","_finish","stopwords","_tuples","Distributions","randomKDE","randomMixture","randomNormal","randomLogNormal","randomUniform","Density","fieldNames","partition$1","distribution","minsteps","maxsteps","DotBin","Expression","update$4","Extent","Subflow","Facet","_keys","update$3","Filter","Flatten","Fold","Formula","Generate","autostep","detachSubflow","activate","subflow","flows","_group","detached","initTargets","act","rekey","k0","k1","isMod","revisit","maxlen","fnames","Methods","Impute","JoinAggregate","KDE","Key","update$2","Load","Lookup","MultiExtent","update$1","extents","MultiValues","Params","Pivot","PreFacet","Project","Quantile","gVals","kVal","impute","getField","fName","kName","gNames","keyvals","gKey","kMap","gMap","partition","_impute","cumulative","pivotKeys","aggregateParams","Relay","Sample","Sequence","Sieve","TimeUnit","probs","OUTPUT","TupleIndex","Values","utc","timezone","_floor","timeBin","tunits","WindowOps","row_number","dense_rank","drank","percent_rank","cume_dist","cume","ntile","lag","first_value","last_value","nth_value","nth","prev_value","next_value","ValidWindowOps","WindowState","windows","countOnly","visitInputs","WindowOp","Window","processPartition","ignorePeers","setWindow","adjustRange","bisect","wind","bezierCurveTo","_x0","_x1","_y0","_y1","Basis","areaStart","areaEnd","BasisClosed","_x2","_x3","_x4","_y2","_y3","_y4","BasisOpen","Bundle","_basis","_beta","_x","_y","bundle","Cardinal","tension","cardinal","CardinalOpen","CardinalClosed","_x5","_y5","_l01_a","_l01_2a","_l12_a","_l12_2a","_l23_a","_l23_2a","CatmullRom","_alpha","x23","y23","catmullRom","CatmullRomClosed","CatmullRomOpen","Linear","LinearClosed","slope3","h0","slope2","MonotoneX","MonotoneY","ReflectContext","Natural","controlPoints","_t0","Step","tauEpsilon","Path","quadraticCurveTo","arcTo","x21","y21","x01","y01","l01_2","x20","y20","l21_2","l20_2","l21","l01","t01","t21","arcInnerRadius","innerRadius","arcOuterRadius","outerRadius","arcStartAngle","startAngle","arcEndAngle","endAngle","arcPadAngle","padAngle","x10","y10","x32","y32","cornerTangents","ox","oy","x11","y11","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","curveLinear","defined0","pointX","pointY","x0z","y0z","arealine","lineX0","lineY0","lineY1","lineX1","kr","domCanvas","domImage","bisectRight","initRange","initInterpolator","implicit","ordinal","ticks","tickIncrement","formatDecimal","tickFormat","reI","reN","reP","reHex","reRgbInteger","reRgbPercent","reRgbaInteger","reRgbaPercent","reHslPercent","reHslaPercent","color_formatHex","formatHex","color_formatRgb","formatRgb","rgbn","Rgb","rgbConvert","rgb_formatHex","rgb_formatRgb","Hsl","hslConvert","hsl2rgb","basis","displayable","formatHsl","brighter","darker","nogamma","exponential","rgbGamma","colorRgb","rgbSpline","spline","rgbBasis","rgbBasisClosed","basisClosed","isNumberArray","numberArray","genericArray","reA","reB","am","bm","bs","bimap","polymap","untransform","piecewise","interpolateValue","clamper","interpolateNumber","rangeRound","interpolateRound","continuous","linearish","prestep","maxIter","transformLog","transformExp","transformLogn","transformExpn","pow10","reflect","loggish","logs","pows","logp","powp","transformPow","transformSqrt","transformSquare","powish","transformSymlog","transformSymexp","symlogish","ticker","tickIntervals","tickInterval","utcTicks","utcTickInterval","timeTicks","timeTickInterval","calendar","formatMillisecond","formatSecond","formatMinute","formatHour","formatDay","formatWeek","formatMonth","k10","sequential","sequentialPow","k21","divergingPow","svgNode","translateX","translateY","skewX","interpolateTransform","pxComma","pxParen","degParen","interpolateTransformCss","DOMMatrix","WebKitCSSMatrix","isIdentity","decompose","interpolateTransformSvg","baseVal","consolidate","zoomRho","rho4","ux0","uy0","ux1","uy1","coshr0","_1","_2","colorHsl","hslLong","deg2rad","rad2deg","labConvert","Lab","Hcl","hcl2lab","rgb2lrgb","xyz2lab","lab","lab2xyz","lrgb2rgb","hclConvert","hcl","colorLab","colorHcl","hclLong","ED","EB","BC_DA","cubehelixConvert","Cubehelix","bl","cubehelix","cubehelixGamma","colorCubehelix","cubehelixLong","bandSpace","paddingInner","paddingOuter","Time","Continuous","scaleOrdinal","ordinalRange","range$1","invertRange","scales","invertExtent","invertRangeExtent","isValidScaleType","hasType","isContinuous","isDiscrete","isDiscretizing","isLogarithmic","isInterpolating","isQuantile","scalePow","scaleSequential","sequentialLog","scaleSequentialPow","sequentialSymlog","diverging","divergingLog","scaleDivergingPow","divergingSymlog","thresholds","quantize","scaleBinOrdinal","tickFormat$1","pointish","scaleProps","interpolateRange","interpolateColors","quantizeInterpolator","scaleFraction","scale$1","interp","schemes","category10","category20","category20b","category20c","tableau10","tableau20","accent","dark2","paired","pastel1","pastel2","set3","blues","greens","greys","oranges","purples","reds","blueGreen","bluePurple","greenBlue","orangeRed","purpleBlue","purpleBlueGreen","purpleRed","redPurple","yellowGreen","yellowOrangeBrown","yellowOrangeRed","blueOrange","brownBlueGreen","purpleGreen","purpleOrange","redBlue","redGrey","yellowGreenBlue","redYellowBlue","redYellowGreen","pinkYellowGreen","spectral","viridis","magma","inferno","plasma","cividis","rainbow","sinebow","turbo","browns","tealBlues","teals","warmGreys","goldGreen","goldOrange","goldRed","lightGreyRed","lightGreyTeal","lightMulti","lightOrange","lightTealBlue","darkBlue","darkGold","darkGreen","darkMulti","darkRed","defaultFormatter","descending","tickCount","minStep","validTicks","endpoints","tickValues","noSkip","varfmt","tickLog","labelValues","binValues","thresholdValues","labelFormat","thresholdFormat","isDiscreteRange","formatRange","formatDiscrete","formatPoint","dflt","domainCaption","gradient_id","isGradient","gradientRef","defs","Gradient","stops","curveBundle","curveCardinal","curveCardinalOpen","curveCardinalClosed","curveCatmullRom","curveCatmullRomClosed","curveCatmullRomOpen","curves","cmdlen","pathParse","pathstr","DegToRad","HalfPi","Tau","HalfSqrt3","segmentCache","bezierCache","bezier","th0","th1","sin_th","cos_th","cos_th0","sin_th0","cos_th1","sin_th1","th_half","sin_th_h2","sX","sY","pathRender","tempX","tempY","tempControlX","tempControlY","controlX","controlY","beginPath","drawArc","large","pl","sfactor_sq","sfactor","th_arc","segs","th2","th3","bez","Tan30","builtins","customSymbol","rectangleX","rectangleY","rectangleWidth","rectangleHeight","vg_rect","crTL","crTR","crBL","crBR","path$3","cornerRadius","vg_trail","trail","value$1","arcShape","padRadius","da0","da1","ap","rp","rc0","rc1","arc$2","areavShape","area$2","areahShape","lineShape","line$2","rectShape","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomRight","cornerRadiusBottomLeft","symbolShape","symbol$2","trailShape","hasCornerRadius","clip_id","resetSVGClipId","clip$1","_defs","clipping","Bounds","GroupItem","ResourceLoader","customLoader","decrement","boundStroke","miter","strokeJoin","miterAdjustment","rotatedPoints","encloses","alignsWith","image$1","cors","circleThreshold","addL","addX","addY","addp","addpL","boundContext","context$1","px1","py1","px2","py2","quadExtrema","px3","py3","cubicExtrema","cubic","intersectPath","brush","isPointInPath","intersectPoint","intersectRect","intersectRule","intersectBoxLine","globalCompositeOperation","addStops","addColorStop","createRadialGradient","ictx","createLinearGradient","createPattern","globalAlpha","lw","strokeStyle","lineCap","strokeCap","lineJoin","strokeMiterLimit","setLineDash","strokeDash","lineDashOffset","strokeDashOffset","zindex","zorder","zdirty","zitems","pickVisit","drawAll","drawPath","pick$1","gx","gy","hitPath","isPointInStroke","pickPath","translateItem","markItemPath","isect","rotateItem","markMultiItemPath","tip","clipGroup","offset$1","strokeOffset","emitRectangle","rectanglePath","hitBackground","hitForeground","hitCorner","noBound","fore","strokeForeground","save","restore","dw","interactive","marktype","pickMark","imageWidth","imageHeight","imageXOffset","imageYOffset","baseline","ar0","ar1","imageSmoothingEnabled","drawImage","path$1","pathCache","path$2","transformItem","draw$2","widthCache","measureWidth","estimateWidth","useCanvas","_estimateWidth","textValue","currentFontHeight","_measureWidth","currentFont","textLines","lineBreak","multiLineOffset","widthGetter","fontStyle","fontVariant","tempBounds","anchorPoint","Marks","strokeText","boundItem","DUMMY","boundMark","hasItems","sceneToJSON","sceneFromJSON","Scenegraph","createMark","aria","domCreate","domFind","domChild","domClear","cssClass","customTooltip","_handlers","_tooltip","defaultTooltip","_el","_bgcolor","markdef","_origin","_scene","_handlerIndex","handleHref","handleTooltip","show","mdef","resolveItem","getItemBoundingClientRect","resize","bgcolor","dirty","_render","renderAsync","_ready","_load","DragLeaveEvent","MouseDownEvent","MouseMoveEvent","MouseOutEvent","ClickEvent","TooltipShowEvent","TooltipHideEvent","HrefEvent","CanvasHandler","_touch","_first","eventListenerCheck","eventBundle","fire","moveEvent","overEvent","outEvent","pickEvent","inactive","DOMMouseScroll","dragover","dragleave","vegaType","CanvasRenderer","_options","_redraw","_dirty","_tempb","base$1","SVGHandler","_hrefHandler","_tooltipHandler","externalContext","inDOM","clipToBounds","_svg","roledesc","AriaIgnore","AriaGuides","extractTitle","channelCaption","titleCaption","AriaEncode","ariaRole","ariaRoleDescription","ariaItemAttributes","ariaMarkAttributes","ariaGuide","ariaMark","markup","serializeXML","_serialize","hasAttributes","hasChildNodes","rootAttributes","xmlns","svgns","SVGRenderer","_dirtyID","dirtyParents","updateGradient","grad","setAttributes","preserveAspectRatio","updateClipping","__values__","ownerSVGElement","siblingCheck","_clearDefs","RootIndex","_dirtyCheck","_dirtyAll","isDirty","isGroup","mark_extras","setStyle","removeAttributeNS","SVGStringRenderer","_text","class","attrList","_hrefs","RenderType","Canvas","PNG","SVG","renderModule","hits","intersectMark","intersectGroup","visitMark","intersectItem","marks","headless","boundClip","sceneEqual","pathEqual","objectEqual","resetSVGDefIds","Top","End","Row","Bound","rebound","markBounds","Identifier","Mark","Overlap","_signals","Init","parity","greedy","sep","hasBounds","Render","separation","boundScale","boundTolerance","boundTest","boundOrient","isYAxis","axisLayout","axisIndices","titlePadding","dl","axisTitleLayout","auto","bboxFlush","bboxFull","offsetValue","gridLayout","nodirty","alignCol","alignRow","padCol","padRow","ncols","nrows","xExtent","xMax","yExtent","yMax","boxes","trellisLayout","rowheaders","rowfooters","colheaders","colfooters","rowtitle","coltitle","gridLayoutGroups","boundFlush","boundFull","headerBand","layoutHeaders","footerBand","titleAnchor","titleBand","layoutTitle","legendParams","lookup$1","legends","legendLayout","legend","ey","tpad","ty","legendTitleOffset","legendGroupLayout","legendBounds","widths","legendEntryLayout","noBar","vgrad","ViewLayout","viewBounds","xBounds","yBounds","autosize","subtitle","titleLayout","_autosize","viewWidth","viewHeight","_resizeView","viewSizeLayout","layoutGroup","AxisTicks","DataJoin","defaultItemCreate","Encode","LegendEntries","newMap","fmod","encoders","reenter","fraction","lskip","adjust","labelFraction","perc2","LinkPath","Paths","ss","Pie","includePad","Scale","domainCheck","adjustScheme","SortItems","Sequential","isContinuousColor","rawDomain","domainMid","Diverging","scaleKey","rangeStep","configureRangeStep","scheme$1","schemeExtent","interpolateGamma","schemeCount","configureScheme","interpolate$1","configureRange","domainRaw","configureBins","includeZero","padDomain","domainMin","domainMax","domainImplicit","scaleImplicit","configureDomain","DefOutput","stackCenter","stackNormalize","stackZero","lastPos","lastNeg","_partials","areaSum","areaRingSum","areaRingStart","areaRingEnd","areaPointFirst","areaPoint","X0","Y0","Z0","X1","Y1","Z1","Y2","Z2","centroidStream","centroidPoint","centroidLineStart","centroidLineEnd","centroidRingStart","centroidRingEnd","centroidPointFirstLine","centroidPointLine","centroidPointFirstRing","centroidPointRing","lengthRing","lengthSum","lengthStream","lengthPointFirst","lengthPoint","projectionStream","contextStream","pathArea","pathMeasure","pathBounds","pathCentroid","clipRejoin","clipRectangle","fitWidth","fitHeight","scaleTranslateRotate","scaleTranslate","cosAlpha","sinAlpha","projectRotateTransform","reflectX","reflectY","conicProjection","parallels","conicEqualAreaRaw","sy0","cylindricalEqualAreaRaw","r0y","conicEqualArea","mercatorProjection","reclip","tany","conicConformalRaw","conicEquidistantRaw","nx","A1","A2","A3","A4","equalEarthRaw","l6","sqrt2","SQRT1_2","mollweideBromleyTheta","cpsinPhi","mollweideRaw","mollweideBromleyRaw","defaultPath","geoPath","projectionProperties","projections","getProjectionPath","albers","geoAlbers","albersusa","lower48Point","alaskaPoint","hawaiiPoint","lower48","alaska","hawaii","pointStream","albersUsa","streams","multiplex","azimuthalequalarea","azimuthalequidistant","conicconformal","conicequalarea","geoConicEqualArea","conicequidistant","equalEarth","equirectangular","gnomonic","mollweide","naturalEarth1","stereographic","transversemercator","graticuleX","graticuleY","graticule","DX","DY","extentMajor","extentMinor","stepMajor","stepMinor","cases","contours","smoothLinear","tz","contour","isorings","_0","ringContains","pj","segmentContains","collinear","Isocontour","transformRing","bandwidthNRD","density2D","values0","values1","blurX","blurY","sz","KDE2D","transformPaths","PARAMS","Contour","GeoJSON","GeoPath","GeoPoint","GeoShape","Graticule","geoGraticule","Heatmap","dependency","$x","$y","$value","$max","Projection","lon","initPath","shapeGenerator","dep","opacity_","color_","can","pix","putImageData","toCanvas","featurize","collectGeoJSON","nodeById","nodeId","ForceMap","collide","ri2","quadtree","visitAfter","prepare","jiggle","_random","nbody","strengths","distanceMin2","distanceMax2","theta2","accumulate","distanceMin","distanceMax","links","initializeStrength","initializeDistance","xz","ForceParams","ForceConfig","ForceOutput","Force","sim","getForce","numForces","setForceParam","iters","forceSimulation","objectChildren","childs","eachBefore","computeHeight","copyData","eachAfter","ancestor","aNodes","bNodes","leastCommonAncestor","descendants","leaves","node_iterator","circles","enclosesWeak","encloseBasis","extendBasis","enclosesWeakAll","enclosesNot","encloseBasis2","encloseBasis3","r21","r3","place","score","packEnclose","sk","enclose","constantZero","defaultRadius","radiusLeaf","packChildren","translateChild","preroot","ambiguous","defaultParentId","stratify","nodeKey","nodeByKey","defaultSeparation","nextLeft","nextRight","moveSubtree","wm","wp","nextAncestor","vim","meanXReduce","maxYReduce","squarifyRatio","sumValue","newRatio","minRatio","dice","treemapDice","treemapSlice","squarify","resquarify","_squarify","Nest","nest","keyValue","valuesByKey","HierarchyLayout","setParams","setFields","Output","Pack","Output$1","Partition","Stratify","positionNode","roundNode","parentKey","Layouts","tidy","nodeSize","treeRoot","firstWalk","secondWalk","sizeNode","executeShifts","vip","vop","vom","sip","sop","som","apportion","cluster","previousNode","meanX","leafLeft","leafRight","Output$2","TreeLinks","Tiles","sums","valueTarget","valueLeft","valueRight","slicedice","treemapSquarify","treemapResquarify","Output$3","Treemap","paddingStack","treemap","markBitmaps","avoidMarks","labelInside","isGroupArea","layer1","layer2","RIGHT0","RIGHT1","scaler","_set","_clear","getRange","indexEnd","setRange","clearRange","outOfBounds","Bitmap","textHeight","_outOfBounds","bm0","bm1","_collision","getTests","infPadding","X_DIR","Y_DIR","Aligns","Baselines","isInMarkBound","anchorCode","TOP","MIDDLE","BOTTOM","placeAreaLabel","bitmaps","avoidBaseMark","markIndex","areaWidth","maxAreaWidth","tryLabel","_xMid","_yMid","swapTmp","labelPlaced","labelPlaced2","bm2","labelLayout","lineAnchor","getOffsets","anchors","getAnchors","grouptype","markBoundary","isNaiveGroupArea","baseBitmaps","sizeFactor","insideFactor","placeMarkLabel","Anchors","Label","Loess","regressionLoess","regressionLinear","regressionLog","regressionExp","regressionPow","regressionQuad","regressionPoly","Regression","dof","degreesOfFreedom","EDGE_STACK","Delaunator","maxTriangles","_triangles","_halfedges","_hashSize","_hullPrev","_hullNext","_hullTri","_hullHash","_ids","_dists","defaultGetX","defaultGetY","hullPrev","hullNext","hullTri","hullHash","i0x","i0y","i1x","i1y","minRadius","circumradius","i2x","i2y","quicksort","halfedges","cl","circumcenter","_cx","_cy","_hullStart","hullSize","_hashKey","trianglesLen","_addTriangle","yp","_legalize","pseudoAngle","al","inCircle","hbl","_link","orientIfSure","tempDist","Voronoi","delaunay","xmin","_circumcenters","vectors","_init","circumcenters","inedges","_renderSegment","_project","_clip","cellPolygon","renderCell","_regioncode","_clipSegment","_step","neighbors","e0","_cell","_clipInfinite","_clipFinite","e1","sx0","sx1","sy1","_edgecode","vx0","vy0","vxn","vyn","flatIterable","jitter","Delaunay","_delaunator","_hullIndex","flatArray","hullIndex","renderHull","trianglePolygon","renderTriangle","defaultExtent","toPathString","voronoi","cloudRadians","cloud","spiral","archimedeanSpiral","board","dxdy","startX","maxDelta","cloudCollide","sprite","msx","contextAndRatio","zeroArray","xoff","yoff","hasText","cloudSprite","cloudBounds","functor","spirals","w32","maxh","wcr","wsr","hcr","hsr","seenRow","archimedean","rectangular","Wordcloud","fontSizeRange","fsize","bisectLeft","array8","array16","array32","Dimension","onAdd","SortedIndex","oldv","addi","addv","index0","index1","reindex","CrossFilter","Bitmaps","ResolveFilter","reinit","remMap","modMap","incrementOne","incrementAll","lo1","hi1","lo0","hi0","TokenName","ASTNode","consequent","ILLEGAL","RegexNonAsciiIdentifierStart","RegexNonAsciiIdentifierPart","isDecimalDigit","isHexDigit","isOctalDigit","isWhiteSpace","isLineTerminator","isIdentifierStart","isIdentifierPart","skipComment","scanHexEscape","scanUnicodeCodePointEscape","cu1","cu2","getEscapedIdentifier","scanIdentifier","getIdentifier","scanPunctuator","code2","ch2","ch3","ch4","ch1","scanNumericLiteral","scanHexLiteral","octal","scanOctalLiteral","scanRegExp","classMarker","terminated","literal","scanRegExpBody","scanRegExpFlags","testRegExp","scanStringLiteral","lex","finishBinaryExpression","finishCallExpression","finishIdentifier","finishLiteral","finishMemberExpression","member","finishProperty","messageFormat","throwUnexpected","expect","matchKeyword","parseArrayInitialiser","parseConditionalExpression","finishArrayExpression","parseObjectPropertyKey","parseObjectProperty","parseObjectInitialiser","finishObjectExpression","legalKeywords","parsePrimaryExpression","parseExpression","parseGroupExpression","parseArguments","parseNonComputedMember","isIdentifierName","parseNonComputedProperty","parseComputedMember","parsePostfixExpression","parseLeftHandSideExpressionAllowCall","parseUnaryExpression","finishUnaryExpression","binaryPrecedence","prec","parseBinaryExpression","finishConditionalExpression","Constants","LOG2E","LOG10E","Functions","codegen","fncall","timezoneoffset","utcdate","utcday","utcyear","utcmonth","utchours","utcminutes","utcseconds","utcmilliseconds","if","forbidden","globalvar","fieldvar","outputGlobal","memberDepth","ast","Generators","Literal","MemberExpression","stripQuotes","CallExpression","ArrayExpression","BinaryExpression","UnaryExpression","ConditionalExpression","LogicalExpression","ObjectExpression","Property","phi00","areaRing","dLambda","sdLambda","adLambda","deltaSum","boundsPoint","boundsLineStart","boundsLineEnd","boundsRingPoint","boundsRingStart","boundsRingEnd","inflection","phii","lambdai","rangeCompare","rangeContains","W0","W1","centroidPointCartesian","centroidLinePointFirst","centroidLinePoint","centroidRingPointFirst","centroidRingPoint","cz","testPoint","dval","selectionId","E_union","E_intersect","R_union","R_intersect","selectionVisitor","dataName","IndexPrefix","indataRef","tuplesRef","dateObj","setYear","dataVisitor","scaleVisitor","addScaleDependency","scaleName","scaleRef","internalScaleFunctions","fnctx","visitors","__bandwidth","_bandwidth","_range","geoMethod","globalMethod","geoArea","geoBounds","deltaMax","geoCentroid","channel_luminance_value","channelValue","luminance","equalArray","equalObject","removePredicate","seq","functionContext","indexof","lastindexof","repl","pluck","contrast","lum1","lum2","monthFormat","monthAbbrevFormat","dayFormat","dayAbbrevFormat","inScope","intersect$1","array$1","markname","pinchDistance","pinchAngle","windowSize","bandspace","setdata","pathShape","retval","_trigger","eventFunctions","astVisitors","codegenParams","codeGenerator","codegenExpression","expressionFunction","signalName","getSignal","signalRef","$expr","$fields","$params","indexName","miss","unitIdx","isMulti","vl5","resUnit","resolved","multiRes","Skip","Swap","canonicalType","expression","expressionCodegen","adjustSpatial","_compare","parseParameter","PARSERS","$flat","parseParameters","$name","parameterExpression","$field","$encode","encodeExpression","$output","$compare","$order","$tupleid","$subflow","subctx","operators","Subcontext","subcontext","$ingest","$request","unresolved","operatorExpression","eventExpression","handlerExpression","eventConfig","parseOperator","parseOperatorParameters","parseStream","updates","parseUpdate","srcid","dataset","substate","ariaLabel","setCursor","globalCursor","dataref","_runtime","_viewWidth","_viewHeight","resizeRenderer","_renderer","_resizeListeners","eventExtend","vega","itemGroup","NO_TRAP","trap","trackEventListener","_eventListeners","permit","_eventConfig","itemFilter","markTarget","checkbox","radio","valuesEqual","initializeRenderer","paddingObject","renderHeadless","_scenegraph","toBlobURL","mime","dataTest","signalTest","View","_elBind","_renderType","_globalCursor","_preventDefault","_timers","initializeEventConfig","_bind","bindings","_resize","resetSize","_resizeWidth","_resizeHeight","resizePadding","initializeResize","_background","user","lookupSignal","findOperatorHandler","addOperatorListener","removeOperatorListener","_desc","_resetRenderer","rerun","addSignalListener","removeSignalListener","addDataListener","removeDataListener","_restart","elapsed","prevent","allow","finalize","timers","hoverSet","leaveSet","elBind","initializeAria","prevHandler","initializeHandler","toImageURL","toSVG","DEFAULT_SOURCE","MARKS","DEFAULT_MARKS","eventSelector","parseMerge","parseSelector","endChar","pushChar","popChar","LBRACK","RBRACK","parseBetween","parseThrottle","parseAutosize","parsePadding","encoder","addEncode","addEncoders","extendEncode","applyDefault","entry$1","_color","resolveField","parseEncode","applyDefaults","parseBlock","parse$1","OUTER_INVALID","outerError","parseSignal","addSignal","addBinding","fieldRef$1","keyFieldRef","compareRef","aggrField","isSignal","hasSignal","specValue","deref","mergeStream","nestedStream","eventStream","streamParameters","addStream","markrole","filterMark","OP_VALUE_EXPR","isSubscope","mergeSources","addUpdate","streamSource","FIELD_REF_ID","MULTIDOMAIN_SORT_OPS","parseScale","parseScaleDomain","parseScaleRange","parseArray","parseLiteral","parseScaleInterpolate","objectProperty","parseScaleBins","dataLookupError","explicitDomain","multipleDomain","singularDomain","valuesRef","parseSort","domainRef","extentRef","coll","addDataPipeline","fieldRef","ordinalMultipleDomain","quantileMultipleDomain","numericMultipleDomain","countsRef","sortRef","multidomain","parseParameter$1","Value","LegendScales","guideGroup","symbolDirection","gradientDirection","gradientLength","gradientWidth","gradientThickness","gradientHeight","entryColumns","getEncoding","anchorExpr","alignExpr$1","extendOffset","guideMark","legendGradient","userEncode","legendGradientDiscrete","dataRef","vv","alignExpr","baselineExpr","legendGradientLabels","labelLimit","gradientLabelLimit","labelOffset","gradientLabelOffset","legendSymbolGroups","symbolOffset","valueRef","xSignal","yEncode","baseFill","baseStroke","symbolBaseFillColor","symbolBaseStrokeColor","facet","isL","isR","isLR","isVG","alignFlip","exprAlign","exprAnchor","exprAngle","exprBaseline","getRole","parseTransform","definition$1","pdef","lookupRef","parseIndexParameter","parseSubParameter","parseSubParameters","projectionRef","parameterValue","isExpr","isField","isCompare","outerExpr","exprRef","outerField","isData","getDataRef","DataScope","aggregate","fieldKey","addSortField","ds","optype","sortKey","parseTrigger","parseMark","layoutRef","boundRef","parseData$1","joinRef","$context","markpath","markRef","generates","encodeRef","pushState","subscope","addData","toRuntime","parseFacet","parseSubflow","popState","tol","parseOverlap","sieve","parseLegend","entryLayout","legendEncode","scaleType","scaleCount","legendType","entryRef","tickMinStep","legendSymbolLayout","getChannel","getStyle","getFontSize","sizeExpression","_anchor","legendTitle","buildLegendEncode","angleExpr","parseTitle","buildTitle","titleEncode","buildSubTitle","groupEncode","parseData","upstream","analyze","getSign","ifLeftTopExpr","ifX","ifXEnc","ifY","ifYEnc","ifTop","ifTopExpr","$orient","ifEnc","ifExpr","ifRightExpr","toExpr","axisConfig","axisGrid","vscale","gridScale","tickPos","gridStart","gridEnd","flushExpr","axisLabels","flushOffset","labelAlign","labelBaseline","flushOn","tickSize","ifRight","offsetExpr","axisTitle","titlePos","autoY","autoX","autoLayout","parseAxis","axisBand","xyKeys","axisX","axisY","orientKeys","axisTop","axisBottom","axisLeft","axisRight","axisEncode","tickBand","ticksRef","axisTicks","pos0","pos1","axisDomain","buildAxisEncode","parseScope","preprocessed","addProjection","parseProjection","addScale","initScale","parseSignalUpdates","parseLambdas","parseView","signalObject","collectSignals","rootEncode","Scope","lambdas","_subid","_nextsub","_encode","_lookup","_markpath","Subscope","propertyLambda","arrayLambda","objectLambda","subtitlePadding","bandPosition","domainWidth","domainColor","gridColor","labelAngle","labelPadding","tickColor","tickOffset","tickRound","tickWidth","gridAlign","columnPadding","rowPadding","gradientStrokeColor","gradientStrokeWidth","labelOverlap","symbolLimit","symbolType","symbolSize","symbolStrokeWidth","titleLimit","titleOrient","heatmap","ramp","vref","annotate","isExpr$1","sig","hasOwnSignal","addScaleProj","projectionType","dataScope","pkg","vtx","geo","wordcloud","xf","Ops","Unary","EventFunctions","Visitors","interpret","RADIUS","THETA","isDateTime","dataSignals","channelDef","selCmpt","isConcatModel","getBinSignalName","hashes","scaleRange","markDef","darkTheme","subtitleColor","excelTheme","gridOpacity","tickExtra","labelFontSize","fiveThirtyEightTheme","labelColor","titleColor","titleFontSize","bar","binSpacing","ggplot2Theme","titleFontWeight","titleFont","colorSchemes","latimesTheme","labelFont","labelFontWeight","titleAlign","titleAngle","titleX","titleY","quartzTheme","voxTheme","gridDash","colorSchemes$1","urbanInstituteTheme","googlechartsTheme","version$1","editor","DEFAULT_ACTIONS","export","png","compiled","I18N","CLICK_TO_VIEW_ACTIONS","COMPILED_ACTION","EDITOR_ACTION","PNG_ACTION","SOURCE_ACTION","SVG_ACTION","NAMES","PREPROCESSOR","vgSpec","SVG_CIRCLES","isTooltipHandler","viewSource","providedMode","createLoader","embedOptionsFromUsermeta","parsedSpec","usermetaLoader","loadOpts","usermetaOpts","parsedOpts","mergedOpts","_embed","possibleRoot","rootContainer","i18n","downloadFileName","ID","guessMode","chartWrapper","updateSet","details","summary","documentClickHandler","ctrl","i18nExportAction","exportLink","viewSourceLink","compileLink","editorUrl","editorLink","updateMultipleDatasetsInView","updateSingleDatasetInView","getUniqueFieldNames","addSignalListenersToView","signalListeners","signalNames","removeSignalListenersFromView","combineSpecWithDimension","VegaEmbed","resultPromise","handleError","createView","fieldSet","clearView","specChanges","newSpec","oldSpec","isExpensive","computeSpecChanges","newSignalListeners","oldSignalListeners","areSignalListenersChanged","modifyView","onNewView","containerRef","finalSpec","vegaEmbed","Vega","handleNewView","DEFAULT_CONFIG","predictable","randomSeed","isBigNumber","isComplex","isFraction","isUnit","isMatrix","isCollection","isDenseMatrix","isSparseMatrix","isRange","isResultSet","isHelp","isAccessorNode","isArrayNode","isAssignmentNode","isBlockNode","isConditionalNode","isConstantNode","isFunctionAssignmentNode","isFunctionNode","isIndexNode","isObjectNode","isOperatorNode","isParenthesisNode","isRangeNode","isSymbolNode","isChain","mapObject","deepStrictEqual","MATRIX_OPTIONS","NUMBER_OPTIONS","formatNumberToBase","wordSize","notation","roundDigits","splitNumber","coefficients","newExp","missingZeros","expDiff","decimalIdx","decimals","decimalVal","toEngineering","lowerExp","upperExp","zeros","splitValue","pp","DBL_EPSILON","nearlyEqual","formatBigNumberToBase","big2","BigNumberCtor","valueWithoutExp","formatNumber","formatBigNumber","looksLikeFraction","syntax","DimensionError","relation","IndexError","arraySize","dimNext","validateIndex","oldLen","newLen","reshape","newLength","processSizesWildcard","tmpArray2","tmpArray","sizeIndex","_reshape","processedSizes","wildCardIndex","unsqueeze","_unsqueeze","getArrayDataType","itemType","assertAndCreate","pickShallow","stripOptionalNotation","isOptionalDependency","missingDependencies","assertDependencies","isFactory","isDimensionError","isIndexError","createComplexClass","mathjs","toPolar","strRe","strIm","fromPolar","hasBase","isClass","lruQueue","oldIndex","nuIndex","hasher","lru","BigNumber","createBigNumberPi","createBigNumberClass","createMatrixClass","Matrix","datatype","skipZeros","numberFactory","createFractionClass","createDenseMatrixClass","DenseMatrix","_datatype","preprocess","isScalar","_getSubmatrix","dimension","submatrix","sSize","iSize","_fit","_setSubmatrix","createDenseMatrix","getDataType","indexI","sizeArray","kSuper","kSub","swapRows","_swapRows","_createTyped2","typedFunction","createTyped","throwNoBignumber","throwNoComplex","throwNoFraction","throwNoMatrix","deepMap","createIsNumeric","isNegativeNumber","isPositiveNumber","isZeroNumber","isNaNNumber","createEqualScalar","bigNearlyEqual","complexEquals","equalBase","createNumber","boxMatch","Unit","valuelessUnit","absNumber","addNumber","multiplyNumber","unaryMinusNumber","unaryPlusNumber","cbrtNumber","ceilNumber","cubeNumber","expNumber","expm1Number","gcdNumber","lcmNumber","logNumber","log10Number","log2Number","modNumber","nthRootNumber","signNumber","squareNumber","xgcdNumber","lastx","lasty","powNumber","roundNumber","createMultiplyScalar","bitAndNumber","bitNotNumber","bitOrNumber","bitXorNumber","leftShiftNumber","rightArithShiftNumber","rightLogShiftNumber","notNumber","orNumber","xorNumber","andNumber","createFormat","acoshNumber","acotNumber","acothNumber","acscNumber","acschNumber","xInv","asecNumber","asechNumber","asinhNumber","atanhNumber","cotNumber","cothNumber","cscNumber","cschNumber","secNumber","sechNumber","sinhNumber","half","combinationsNumber","nMinusk","createFraction","createUnaryMinus","createAddScalar","fixPrefix","createConj","createSparseMatrixClass","equalScalar","SparseMatrix","_values","_ptr","_createFromArray","_createFromMatrix","_getsubset","mvalues","mindex","mptr","pv","_setsubset","_getValueIndex","ins","createSparseMatrix","colIndex","minRow","maxRow","minColumn","maxColumn","_i5","_k2","_i7","_forEachRow","createMatrix","createAlgorithm01","denseMatrix","sparseMatrix","inverse","adata","asize","adt","bvalues","bindex","bptr","bsize","bdt","createAlgorithm10","avalues","aindex","aptr","createAlgorithm13","bdata","csize","_iterate","createAlgorithm14","createAlgorithm03","createAlgorithm05","cvalues","cindex","cptr","wai","wbi","createAlgorithm11","createAlgorithm12","createAlgorithm07","_scatter","createIdentity","_identity","_identityVector","Big","noBignumber","noFraction","noMatrix","createSize","createZeros","_zeros","hasBigNumbers","NO_INT","createRound","algorithm11","algorithm12","algorithm14","roundNumberSignatures","createCompare","algorithm03","algorithm05","algorithm13","createSmaller","algorithm07","createLarger","createFibonacciHeapClass","larger","oneOverLogPhi","FibonacciHeap","_minimum","_cut","degree","isFibonacciHeap","extractMinimum","numberOfChildren","tempRight","numRoots","_linkNodes","_findMinimumNode","_cascadingCut","_decreaseKey","createDot","multiplyScalar","conj","_validateDim","aIsColumn","bIsColumn","_c2","_c3","xindex","xvalues","yindex","yvalues","xLen","yLen","xSize","ySize","createAbs","createFloor","createMultiply","_validateMatrixDimensions","size1","size2","_multiplyVectorMatrix","alength","bcolumns","_multiplyVectorDenseMatrix","_multiplyMatrixVector","arows","acolumns","brows","vbi","ka0","ka1","_multiplyMatrixMatrix","kb0","kb1","cij","vbij","xsize","ysize","_multiplyVectorVector","ArgumentsError","isArgumentsError","createPow","_pow","_powArray","_powMatrix","yFrac","yNum","gammaNumber","twoN","threeN","fourN","fiveN","gammaP","gammaG","createBignumber","twoPowSize","twoPowSizeSubOne","createNumeric","_number","bignumber","validInputTypes","validOutputTypes","outputType","inputType","createCeil","createSubtract","unaryMinus","algorithm01","algorithm10","checkEqualDimensions","createEqual","createFix","_Complex","createDivideScalar","createSpaClass","Spa","isSpa","nodei","nodej","createLup","divideScalar","_denseLUP","_sparseLUP","ldata","lsize","udata","usize","pabsv","vjj","absv","vij","lvalues","lindex","lptr","uvalues","uindex","uptr","pvCo","pvOc","_loop","spa","vkj","vik","swapIndeces","createDet","lup","decomp","evenCycles","_det","createInv","_inv","ABig","rBig","Br","createDivide","createUnitClass","_BigNumber","_Fraction","UNIT_NONE","PREFIXES","BASE_DIMENSIONS","skipAutomaticSimplification","skipWhitespace","revert","parseNumber","isDigitDot","tentativeNumber","tentativeIndex","parseUnit","unitName","isValidAlpha","firstC","parseCharacter","toFind","powerMultiplierCurrent","expectingUnit","powerMultiplierStack","powerMultiplierStackProduct","uStr","oldC","_findUnit","baseDim","UNIT_SYSTEMS","allowNoUnits","_isDerived","unitValue","unitOffset","unitPower","unitPrefixValue","_getNumberConverter","_denormalize","prefixValue","_unit","prefixLen","prefixName","_prefix","getNumericIfUnitless","BASE_UNITS","isValuelessUnit","inverted","valThis","valOther","toNumeric","formatUnits","matchingBase","matchingUnit","proposedUnitList","currentUnitSystem","missingBaseDim","toSI","strNum","strDen","nNum","nDen","simp","isImaginary","VAR","VA","_bestPrefix","unitStr","absValue","absUnitValue","bestPrefix","bestDiff","scientific","splitUnit","xNumeric","xRounded","testSum","deca","hecto","kilo","mega","giga","tera","peta","exa","zetta","yotta","deci","centi","milli","micro","nano","pico","femto","atto","zepto","yocto","SQUARED","CUBIC","BINARY_SHORT_SI","BINARY_SHORT_IEC","BINARY_LONG_SI","BINARY_LONG_IEC","kibi","mebi","gibi","tebi","pebi","exi","zebi","yobi","BTU","MM","SHORTLONG","BINARY_SHORT","BINARY_LONG","MASS","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","FORCE","SURFACE","VOLUME","ENERGY","POWER","PRESSURE","ELECTRIC_CHARGE","ELECTRIC_CAPACITANCE","ELECTRIC_POTENTIAL","ELECTRIC_RESISTANCE","ELECTRIC_INDUCTANCE","ELECTRIC_CONDUCTANCE","MAGNETIC_FLUX","MAGNETIC_FLUX_DENSITY","FREQUENCY","ANGLE","BIT","meter","inch","foot","yard","mile","rod","chain","angstrom","mil","sqin","sqft","sqyd","sqmi","sqrd","sqch","sqmil","acre","hectare","m3","litre","cuin","cuft","cuyd","teaspoon","tablespoon","gtt","minim","fluiddram","fluidounce","gill","cup","pint","quart","gallon","beerbarrel","oilbarrel","hogshead","fldr","floz","gal","bbl","obl","gram","ton","tonne","grain","dram","ounce","poundmass","hundredweight","stick","stone","oz","lbm","cwt","sec","decade","century","millennium","hertz","Hz","radian","gradian","cycle","arcsec","arcmin","ampere","degC","degF","degR","kelvin","celsius","fahrenheit","rankine","mol","mole","candela","newton","dyn","dyne","lbf","poundforce","kip","kilogramforce","joule","erg","eV","electronvolt","watt","hp","psi","atm","torr","mmHg","mmH2O","cmH2O","coulomb","farad","volt","ohm","henry","siemens","weber","tesla","ALIASES","rods","chains","angstroms","litres","liter","liters","teaspoons","tablespoons","minims","fluiddrams","fluidounces","gills","cups","pints","quarts","gallons","beerbarrels","oilbarrels","hogsheads","gtts","grams","tons","tonnes","grains","drams","ounces","poundmasses","hundredweights","sticks","lbs","kips","kgf","hectares","sqfeet","sqyard","sqmile","sqmiles","mmhg","mmh2o","cmh2o","secs","hrs","weeks","years","decades","centuries","millennia","gradians","arcsecond","arcseconds","arcminute","arcminutes","BTUs","watts","joules","amperes","coulombs","volts","ohms","farads","webers","teslas","electronvolts","moles","calculateAngleValues","createPi","cgs","us","setUnitSystem","getUnitSystem","typeConverters","_name2","_unit2","createUnit","override","deleteUnit","aliases","lastUnit","_key5","createUnitSingle","assertUnitNameIsValid","baseName","defUnit","newUnit","_newBaseUnit","newBaseUnit","_i6","_i8","aliasName","_alias","_key6","createUnitFunction","ariaHidden","getPaddingRight","ariaHiddenSiblings","nodesToExclude","blacklistTagNames","findIndexOf","handleContainer","fixedNodes","restoreStyle","restorePaddings","disableScrollLock","isOverflowing","parentElement","scrollContainer","ModalManager","modals","containers","modalIndex","modalRef","hiddenSiblingNodes","hiddenSiblings","getHiddenSiblings","containerIndex","nextTop","Unstable_TrapFocus","_props$disableAutoFoc","disableAutoFocus","_props$disableEnforce","disableEnforceFocus","_props$disableRestore","disableRestoreFocus","getDoc","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","rootRef","prevOpenRef","contain","hasFocus","loopFocus","invisible","SimpleBackdrop","_props$invisible","defaultManager","Modal","inProps","_props$BackdropCompon","BackdropComponent","BackdropProps","_props$closeAfterTran","closeAfterTransition","_props$disableBackdro","disableBackdropClick","_props$disableEscapeK","disableEscapeKeyDown","_props$disableScrollL","_props$hideBackdrop","hideBackdrop","_props$manager","onBackdropClick","onClose","onEscapeKeyDown","mountNodeRef","hasTransition","getHasTransition","getModal","handleMounted","mount","resolvedContainer","isTopModal","handlePortalRef","inlineStyle","TrapFocus","Grow","autoTimeout","_getTransitionProps2","nodeOrNext","maybeNext","muiSupportAuto","getOffsetTop","getOffsetLeft","getTransformOriginValue","Popover","_props$anchorOrigin","anchorOrigin","anchorPosition","_props$anchorReferenc","anchorReference","containerProp","getContentAnchorEl","_props$marginThreshol","marginThreshold","_props$PaperProps","PaperProps","_props$transformOrigi","_props$transitionDura","transitionDurationProp","_props$TransitionProp","paperRef","getAnchorOffset","contentAnchorOffset","resolvedAnchorEl","anchorRect","anchorVertical","getContentAnchorOffset","contentAnchorEl","getTransformOrigin","elemRect","getPositioningStyle","elemTransformOrigin","containerWindow","heightThreshold","widthThreshold","_diff","_diff2","_diff3","setPositioningStyles","positioning","handlePaperRef","handleResize","RTL_ORIGIN","LTR_ORIGIN","_props$autoFocus","disableAutoFocusItem","_props$MenuListProps","MenuListProps","onEnteringProp","PopoverClasses","autoFocusItem","menuListActionsRef","contentAnchorRef","activeItemIndex","adjustStyleForScrollbar","MenuList","areEqualValues","SelectInput","displayEmpty","IconComponent","inputRefProp","inputRef","labelId","_props$MenuProps","MenuProps","onOpen","openProp","renderValue","_props$SelectDisplayP","SelectDisplayProps","tabIndexProp","valueProp","_useControlled","_useControlled2","displayNode","setDisplayNode","isOpenControlled","menuMinWidthState","setMenuMinWidthState","openState","setOpenState","displaySingle","childrenArray","handleItemClick","itemIndex","displayMultiple","computeDisplay","menuMinWidth","buttonId","selectMenu","nativeInput","iconOpen","disableListWrap","getStyleValue","TextareaAutosize","rowsMax","rowsMinProp","rowsMin","maxRowsProp","_props$minRows","minRows","minRowsProp","shadowRef","renders","syncHeight","inputShallow","singleRowHeight","outerHeightStyle","InputBase","ariaDescribedby","autoComplete","endAdornment","_props$inputComponent","inputComponent","_props$inputProps","inputProps","inputPropsProp","_props$multiline","renderSuffix","handleInputRefWarning","handleInputPropsRefProp","handleInputRefProp","handleInputRef","fcs","checkDirty","InputComponent","formControl","adornedEnd","onAnimationStart","inputMultiline","inputHiddenLabel","inputAdornedStart","inputAdornedEnd","inputTypeSearch","inputMarginDense","placeholderHidden","placeholderVisible","disableUnderline","bottomLineColor","borderBottomStyle","NativeSelectInput","iconFilled","iconOutlined","defaultInput","NativeSelect","_props$IconComponent","ArrowDropDownIcon","_props$input","FilledInput","borderTopLeftRadius","borderTopRightRadius","WebkitTextFillColor","caretColor","NotchedOutline","labelWidthProp","labelWidth","notched","legendLabelled","legendNotched","OutlinedInput","_props$labelWidth","notchedOutline","nativeSelectStyles","Select","_props$autoWidth","_props$displayEmpty","_props$multiple","_props$native","native","variantProps","baseUrl","binChunk","TYPES","ARRAY_CONSTRUCTOR_TO_WEBGL_CONSTANT","ARRAY_TO_COMPONENT_TYPE","ATTRIBUTE_COMPONENT_TYPE_TO_BYTE_SIZE","getAccessorTypeFromSize","getComponentTypeFromArray","getAccessorArrayTypeAndLength","bytesPerComponent","DEFAULT_GLTF_JSON","isExtension","getUsedExtensions","getRequiredExtensions","extensionsRequired","extensionsUsed","bufferIndex","getBufferView","getAccessor","extensionData","nodeIndices","nodeData","meshIndex","glTFMesh","_addAttributes","indicesAccessor","_addIndices","meshes","mimeTypeOpt","glTFImage","addBufferView","images","glTFBufferView","bufferViews","glTFAccessor","bufferViewIndex","minMax","_getAccessorMinMax","accessorDefaults","addAccessor","glTFTexture","imageIndex","materials","totalByteLength","targetArray","dstByteOffset","attributeData","_getGltfAttributeName","addBinaryBuffer","initValues","componentIndex","getGLTFAccessors","getGLTFAccessor","convertTypedArrays","getAccessorData","makeMeshPrimitiveIterator","decompressPrimitive","gltfData","compressMesh","dracoExtension","bufferCopy","decodedData","decodedAttributes","accessorIndex","decodedAttribute","checkPrimitive","compressedData","fauxAccessors","gltfScenegraph","nodeExtension","techniques","resolveTechniques","materialExtension","resolveValues","programs","technique","KHR_draco_mesh_compression","KHR_materials_unlit","KHR_lights_punctual","KHR_techniques_webgl","excludes","GLTF_ARRAYS","skins","GLTF_KEYS","skin","KHR_binary_glTF","objectMap","_convertIdToIndex","arrayName","idToIndexMap","baseColorFactor","textureId","textureIndex","normalizeGLTFV1","COMPONENTS","BYTES","GL_SAMPLER","SAMPLER_PARAMETER_GLTF_TO_GL","magFilter","minFilter","wrapS","wrapT","DEFAULT_SAMPLER","baseUri","getMesh","accum","getCamera","getSkin","normalTexture","occlustionTexture","emmisiveTexture","baseColorTexture","metallicRoughnessTexture","cutBufffer","getSampler","_enumSamplerParameter","preloadedImage","postProcessGLTF","isGLB","magic1","parseGLBV1","glb","GLB_FILE_HEADER_SIZE","contentFormat","parseJSONChunk","parseBINChunk","parseGLBV2","chunkLength","chunkFormat","parseGLBChunksSync","jsonChunk","jsonText","parseGLTFContainerSync","arrayBufferOrString","loadBuffers","loadImages","decodeExtensions","hasBinChunk","binChunks","parseGLBSync","getTypedArrayForBufferView","parsedImage","GLTFLoader","decompressMeshes","postProcess","fetchImages","createImages","parseGLTF","omit","styleFunctionSx","styleFunction","newStyleFunction","filterProps","_options$cssProperty","cssProperty","themeKey","themeMapping","propValueFinal","getBorder","borders","flexbox","sizing","styled","componentCreator","StyledComponent","spread","FinalComponent","styledWithoutDefault","Box","validateWorkerVersion","coreVersion","workerVersion","textEncoder","chunkByteLength","chunkArray","_AwaitValue","_awaitAsyncGenerator","AsyncGenerator","front","wrappedAwait","settle","_wrapAsyncGenerator","makeStreamIterator","makeBrowserStreamIterator","makeNodeStreamIterator","currentBatchPromise","nextBatchPromise","makeIterator","makeStringIterator","makeArrayBufferIterator","makeBlobIterator","ERR_DATA","getArrayBufferOrStringFromDataSync","isArrayBuffer","checkResponse","concatenateArrayBuffersAsync","getLoaderContext","previousContext","resolvedContext","getLoadersFromContext","candidateLoaders","contextLoaders","EXT_PATTERN","validHTTPResponse","selectLoaderSync","getNoValidLoaderMessage","normalizeLoaders","selectLoaderInternal","testUrl","findLoaderByMIMEType","loaderExtension","findLoaderByExtension","findLoaderByUrl","testDataAgainstText","testDataAgainstBinary","findLoaderByInitialBytes","testBinary","selectLoader","parseWithLoader","getArrayBufferOrStringFromData","parseWithWorker","Quadtree","leaf_copy","treeProto","cover","quads","Quad","retainer","removeAll","fnValuesNs","fnRuleNs","functionPlugin","fnValues","styleRule","fnRule","GlobalContainerRule","GlobalPrefixedRule","separatorRegExp","addScope","jssGlobal","handleNestedGlobalContainerRule","handlePrefixedGlobalRule","parentRegExp","jssNested","getReplaceRef","replaceParentRefs","nestedProp","parentProp","parentSelectors","nestedSelectors","getOptions","prevOptions","nestingLevel","isNested","isNestedConditional","uppercasePattern","msPattern","toHyphenLower","hyphenateStyleName","hName","convertCase","converted","hyphenate","camelCase","hyphenatedProp","addCamelCasedVersion","regExp","inset","iterate","innerProp","_innerProp","defaultUnit","camelCasedOptions","appearence","noPrefill","supportedProperty","toUpper","camelize","pascalize","textOrientation","writingMode","breakPropsOld","inlineLogicalOld","unprefixed","pascalized","scrollSnap","overscrollBehavior","propMap","flex2012","propMap$1","propKeys","prefixCss","propertyDetectors","key$1","el$1","cache$1","transitionProperties","transPropsRegExp","prefixTransitionCallback","prefixedValue","supportedValue","jssVendorPrefixer","prefixStyle","changeProp","supportedProp","changeValue","supportedValue$1","atRule","jssPropsSort","prop0","prop1","jssPreset","vendorPrefixer","propsSort","injectFirstNode","StylesProvider","_props$injectFirst","injectFirst","_props$disableGenerat","localOptions","outerOptions","createComment","_parseImageNode","IMAGE_SUPPORTED","IMAGE_BITMAP_SUPPORTED","NODE_IMAGE_SUPPORTED","DATA_SUPPORTED","getImageType","getImageTypeOrNull","SVG_DATA_URL_PATTERN","SVG_URL_PATTERN","isSVG","getBlobOrSVGDataUrl","xmlText","blobOrDataUrl","objectUrl","loadToImage","EMPTY_OBJECT","imagebitmapOptionsSupported","parseToImage","imagebitmapOptions","safeCreateImageBitmap","createImageBitmap","parseToNodeImage","imageOptions","loadType","getLoadableImageType","parseToImageBitmap","getDefaultImageType","isImageTypeSupported","ImageLoader","cachedType","detectScrollType","dummy","getNormalizedScrollLeft","easeInOutSin","ScrollbarSize","scrollbarHeight","setMeasurements","TabIndicator","KeyboardArrowLeft","KeyboardArrowRight","TabScrollButton","Tabs","ariaLabelledBy","_props$centered","centered","childrenProp","_props$indicatorColor","indicatorColor","_props$orientation","_props$ScrollButtonCo","ScrollButtonComponent","_props$scrollButtons","scrollButtons","_props$TabIndicatorPr","TabIndicatorProps","TabScrollButtonProps","scrollable","isRtl","scrollStart","clientSize","setMounted","indicatorStyle","setIndicatorStyle","displayScroll","setDisplayScroll","_React$useState4","scrollerStyle","setScrollerStyle","valueToIndex","tabsRef","tabListRef","getTabsMeta","tabsMeta","tabMeta","tabsNode","scrollLeftNormalized","_children","tab","updateIndicatorState","_newIndicatorStyle","_getTabsMeta","newIndicatorStyle","dStart","dSize","scrollValue","_options$ease","ease","animate","moveTabsScroll","handleStartScrollClick","handleEndScrollClick","handleScrollbarSizeChange","scrollSelectedIntoView","_getTabsMeta2","nextScrollStart","_nextScrollStart","updateScrollButtonState","showStartScroll","showEndScroll","_tabsRef$current","handleTabsScroll","updateIndicator","updateScrollButtons","childIndex","childValue","conditionalElements","scrollbarSizeListener","scrollButtonsActive","showScrollButtons","scrollButtonStart","scrollButtonsDesktop","scrollButtonEnd","getConditionalElements","scroller","fixed","flexContainer","flexContainerVertical","newFocusTarget","previousItemKey","nextItemKey","previousElementSibling","nextElementSibling","UNIFORM_SETTERS","getArraySetter","getSamplerSetter","FLOAT_ARRAY","INT_ARRAY","UINT_ARRAY","uniformLength","toFloatArray","toUIntArray","getUniformSetter","parseUniformName","checkUniformValues","uniformMap","checkUniformValue","checkLength","checkUniformArray","copyUniform","uniformSetter","cacheLength","setVectorUniform","setMatrixUniform","defaultName","SHADER_NAME_REGEXP","parseGLSLCompilerError","errLog","shaderType","shaderName","errorStrings","warnings","shaderDescription","getShaderTypeName","errorString","maxDigits","padLeft","addLineNumbers","formatErrors","Shader","getShaderParameter","getShaderSource","compileStatus","infoLog","getShaderInfoLog","getSource","createShader","attributeInfosByLocation","attributeInfosByName","varyingInfos","varyingInfosByName","varying","V6_DEPRECATED_METHODS","_uniformSetters","textureUpdate","_textureUniforms","texturesRenderable","shaderHandles","getAttachedShaders","shaderHandle","programName","getActiveUniform","getActiveUniforms","getUniformBlockIndex","getActiveUniformBlockParameter","FS100","FS_GLES","FS300","getQualifierDetails","qualifiers","getPassthroughFS","outputValue","convertToVec4","typeToChannelCount","variable","varyingName","feedbackName","feedbackMap","sourceName","bufferOrRef","_createNewBuffer","bufferName","_getFeedbackBuffers","_updateBinding","_swapBuffers","dstName","getShaderVersion","updateForTextures","targetTexture","sourceCount","targetTextureType","samplerTextureMap","updatedVs","finalInject","vsLines","updateVsLines","textureMap","getAttributeDefinition","updatedLine","textureName","samplerName","sizeName","uniformDeclerations","getSamplerDeclerations","typeToChannelSuffix","sampleInstruction","processAttributeDefinition","targetTextureVarying","qualaiferDetails","getVaryingType","getSizeUniforms","sourceTextureMap","SRC_TEX_PARAMETER_OVERRIDES","updatedModelProps","_processVertexShader","hasSourceTextures","sourceTextures","sizeUniforms","packed","channelCount","packedPixels","packCount","_swapTexture","textureOrReference","_createNewTexture","_sourceTextures","_targetTexture","_createTargetTexture","elementIds","_swapTextures","combinedInject","textureTransform","bufferTransform","updatedOpts","_updateDrawOptions","swapped","resourceTransforms","resourceTransform","_updateModelProps","setupResources","updatedProps","canCreateBufferTransform","canCreateTextureTransform","inheritsFrom","ParentType","wrapInView","MAP_STYLE","evaluateChildren","componentProps","isReactMap","needsDeckGLViewProps","CANVAS_ONLY_STYLES","mixBlendMode","redrawDeck","thisRef","DeckGL","canvasRef","jsxProps","reactChildren","jsxLayers","jsxViews","reactElement","ElementType","reactProps","createLayer","extractJSXLayers","inRender","handleViewStateChange","handleInteractionStateChange","deckProps","_customRender","createDeckInstance","interactionStateUpdateRequested","getRefHandles","currentViewports","canvasStyle","extractStyles","childrenUnderViews","defaultViewId","viewId","viewChildren","viewElement","positionChildrenUnderViews","SwitchBase","checkedProp","checkedIcon","disabledProp","setCheckedState","hasLabelFor","newChecked","defaultCheckedIcon","CheckBoxIcon","defaultIcon","CheckBoxOutlineBlankIcon","defaultIndeterminateIcon","IndeterminateCheckBoxIcon","Checkbox","_props$checkedIcon","_props$icon","iconProp","_props$indeterminate","_props$indeterminateI","indeterminateIcon","indeterminateIconProp","Collapse","collapsedHeight","_props$collapsedSize","collapsedSize","collapsedSizeProp","wrapperRef","autoTransitionDuration","wrapperHeight","duration2","wrapperInner","Accordion","_props$defaultExpande","defaultExpanded","expandedProp","setExpandedState","_React$Children$toArr","_React$Children$toArr2","borderBottomLeftRadius","borderBottomRightRadius","hasTimerQuery","begin","conservative","resultAvailable","Query","statIdCounter","onAddHTML","onFinalize","createFramebuffer","_onMousemove","_onMouseleave","_getPageLoadPromise","appContext","offScreen","_requestAnimationFrame","renderFrame","tock","_timeline","_animationLoop","_mousePosition","wrapperDiv","drawingBufferHeight","_gpuTimeQuery","filterRange","filterEnabled","filterTransformSize","filterTransformColor","filterSoftRange","filter_min","filter_softMin","filter_softMax","filter_max","shaderModule64","min64High","max64High","DATA_TYPE_FROM_SIZE","filterSize","countItems","DATAFILTER_TYPE","DATAFILTER_DOUBLE","filterValues","instanceFilterValues","useFloatTarget","aggregator","filterIndices","filterPrevIndices","filterFBO","filterModel","shaderOptions","filterNeedsUpdate","onFilteredItemsChange","DataFilterExtension","getFilterValue","pbr","directions","marginX","marginY","paddingX","paddingY","getCssProperties","_prop$split","_prop$split2","spacingKeys","getStyleFromPropValue","cssProperties","transformed","ListItem","_props$button","componentProp","_props$ContainerCompo","ContainerComponent","_props$ContainerProps","ContainerProps","ContainerClassName","_props$dense","_props$disableGutters","disableGutters","_props$divider","listItemRef","hasSecondaryAction","alignItemsFlexStart","secondaryAction","backgroundClip","MenuItem","ListItemClasses","_props$role","thumb","valueLabelDisplay","asc","findClosest","trackFinger","touchId","valueToPercent","roundValueToStep","nearest","matissaDecimalPart","decimalPart","getDecimalPrecision","setValueIndex","focusThumb","sliderRef","activeIndex","setActive","axisProps","leap","Identity","ariaLabelledby","ariaValuetext","getAriaLabel","getAriaValueText","_props$marks","marksProp","_props$max","_props$min","onChangeCommitted","_props$scale","_props$step","_props$ThumbComponent","ThumbComponent","_props$track","_props$ValueLabelComp","ValueLabelComponent","ValueLabel","_props$valueLabelDisp","_props$valueLabelForm","valueLabelFormat","setOpen","valueDerived","setValueState","handleFocusRef","tenPercents","marksValues","marksIndex","increaseKey","decreaseKey","getFingerNewValue","finger","_ref3$move","values2","_slider$getBoundingCl","percentToValue","_getFingerNewValue","_getFingerNewValue3","_getFingerNewValue4","trackOffset","trackLeap","trackStyle","marked","trackFalse","trackInverted","rail","markActive","markLabel","markLabelActive","valueLabel","thumbColorPrimary","thumbColorSecondary","_props$disablePadding","disablePadding","subheader","listStyle","nextItem","previousItem","textCriteriaMatches","nextFocus","textCriteria","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","_props$autoFocusItem","_props$disabledItemsF","_props$disableListWra","listRef","textCriteriaRef","previousKeyMatched","noExplicitWidth","criteria","lowerKey","currTime","keepFocusOnCurrent","FormLabel","asterisk","InputLabel","_props$disableAnimati","disableAnimation","shrinkProp","shrink","animated"],"mappings":";kGAGEA,EAAOC,QAAUC,EAAQ,M,6BCHZ,SAASC,EAAgBC,EAAUC,GAChD,KAAMD,aAAoBC,GACxB,MAAM,IAAIC,UAAU,qCAFxB,mC,6BCAe,SAASC,EAAgBC,EAAKC,EAAKC,GAYhD,OAXID,KAAOD,EACTG,OAAOC,eAAeJ,EAAKC,EAAK,CAC9BC,MAAOA,EACPG,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZP,EAAIC,GAAOC,EAGNF,EAZT,mC,gBCAAR,EAAOC,QAAU,EAAQ,M,6BCAzB,SAASe,EAAkBC,EAAQC,GACjC,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CACrC,IAAIE,EAAaH,EAAMC,GACvBE,EAAWR,WAAaQ,EAAWR,aAAc,EACjDQ,EAAWP,cAAe,EACtB,UAAWO,IAAYA,EAAWN,UAAW,GACjDJ,OAAOC,eAAeK,EAAQI,EAAWZ,IAAKY,IAInC,SAASC,EAAajB,EAAakB,EAAYC,GAG5D,OAFID,GAAYP,EAAkBX,EAAYoB,UAAWF,GACrDC,GAAa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KAAM,OACNnB,MAAO,IACPqurB,YAAY,GAEdQ,KAAM,CACJ1trB,KAAM,OACNnB,MAAO,IACPqurB,YAAY,GAEdS,KAAM,CACJ3trB,KAAM,OACNnB,MAAO,IACPqurB,YAAY,GAEdU,KAAM,CACJ5trB,KAAM,OACNnB,MAAO,KACPqurB,YAAY,GAEdW,KAAM,CACJ7trB,KAAM,OACNnB,MAAO,KACPqurB,YAAY,GAEdY,IAAK,CACH9trB,KAAM,MACNnB,MAAO,KACPqurB,YAAY,GAEda,MAAO,CACL/trB,KAAM,QACNnB,MAAO,KACPqurB,YAAY,GAEdc,MAAO,CACLhurB,KAAM,QACNnB,MAAO,KACPqurB,YAAY,GAEde,KAAM,CACJjurB,KAAM,OACNnB,MAAO,GACPqurB,YAAY,GAEdgB,MAAO,CACLlurB,KAAM,QACNnB,MAAO,IACPqurB,YAAY,GAEdiB,MAAO,CACLnurB,KAAM,QACNnB,MAAO,KACPqurB,YAAY,GAEdkB,MAAO,CACLpurB,KAAM,QACNnB,MAAO,KACPqurB,YAAY,GAEdmB,KAAM,CACJrurB,KAAM,OACNnB,MAAO,KACPqurB,YAAY,GAEdoB,KAAM,CACJturB,KAAM,OACNnB,MAAO,MACPqurB,YAAY,GAEdqB,MAAO,CACLvurB,KAAM,QACNnB,MAAO,MACPqurB,YAAY,GAEdsB,KAAM,CACJxurB,KAAM,OACNnB,MAAO,MACPqurB,YAAY,GAEduB,MAAO,CACLzurB,KAAM,QACNnB,MAAO,MACPqurB,YAAY,GAEdwB,MAAO,CACL1urB,KAAM,QACNnB,MAAO,MACPqurB,YAAY,IAGhByB,QAAS,CACP,GAAI,CACF3urB,KAAM,GACNnB,MAAO,EACPqurB,YAAY,GAEdvmrB,GAAI,CACF3G,KAAM,KACNnB,MAAO,IACPqurB,YAAY,GAEdrsmB,EAAG,CACD7gF,KAAM,IACNnB,MAAO,IACPqurB,YAAY,GAEd5orB,EAAG,CACDtE,KAAM,IACNnB,MAAO,IACPqurB,YAAY,GAEd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uB0O,GAAY,CAC5ClL,aACAzroB,SACAqL,UACAk7U,WAMSrmV,GAAuB62oB,GAAY,CAC5CtL,aACAU,eACAuG,eACArnoB,UACAk7U,SACA0hT,WAgBShpqB,GAAyBm4qB,GAAc,CAChD3L,aACAU,eACAjmd,YACAlmL,SACA0yoB,eACArnoB,UACAk7U,WAMS3lS,GAAyB42lB,GAAc,CAChDrL,eACAnsoB,SACAqL,UACAk7U,WAESqxT,GAAwBF,GAAa,CAC9CvL,eACAnsoB,SACAqL,UACAk7U,WAaSuxT,GAA+BH,GAAyB,CACjEC,UACAh3lB,aA+BSjjD,GAAqBg7oB,GAAU,CACxC/viB,aACAiwiB,QACAD,kBACA33qB,QACAslX,WAcS9pX,GAAqBk9qB,GAAU,CACxCpzT,WAEStnU,GAAuB26nB,GAAY,CAC5C55oB,SACA0yoB,eACArnoB,UACAnL,SACAqmV,WAES1vV,GAA0BgjpB,GAAe,CAClDjxiB,aACAjrG,OACA+0oB,eACArnoB,UACAutoB,kBACAryT,WA2BS3pX,GAAqB0+qB,GAAU,CACxCllhB,WACAp2H,SACAsylB,YACAz5nB,YACAwyC,UACAxU,YACAo8G,UACAszO,WAgGSi2T,GAA2BL,GAAgB,CACpD1Q,aACAllT,WAsBSjR,GAAyBgnU,GAAc,CAChDE,aACAlqD,YACAr/e,YAgESvuI,GAAsBm4qB,GAAW,CAC1C78oB,SACA0yoB,eACArnoB,UACAnL,SACAqmV,WAES59O,GAA0Bm0iB,GAAe,CAClD3Q,eACAvjiB,aACA8piB,eACArnoB,UACAk7U,SACAw2T,gBA8BShlf,GAAuBolf,GAAY,CAC5ChR,eACAuG,eACArnoB,UACAk7U,WAwBS2iM,GAAqBk0H,GAAU,CACxChnhB,WACA1xJ,QACAu6C,SACA5T,UACAk7U,WAmCSs3T,GAA8BP,GAAmB,CAC1DhoU,WACAiR,WA0BSi3T,GAAqBD,GAAe,CAC7CzF,iBACAlviB,aACA8piB,iBAWS4M,GAAqB1B,GAAU,CACxCzR,eAC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AASgiH,QACrChI,OAAQj0H,EAAMg8H,YAAY/H,OAAOiwD,WAKrCtgG,OAAQ,CAKNiqK,OAAQ,EACRjpB,cAAe,OACfl9I,UAAW,iCACX,gBAAiB,CACfA,UAAW,kCAEb,WAAY,CACVA,UAAW,oCACX,gBAAiB,CACfA,UAAW,sCAMjB2yd,SAAU,CAERxsT,OAAQ,EACRjpB,cAAe,OACfl9I,UAAW,iCACX,gBAAiB,CACfA,UAAW,kCAEb,WAAY,CACVA,UAAW,yCA+Ge,CAChCptH,KAAM,iBADO0kC,CAEZy9rB","file":"static/js/2.eb2fd6ea.chunk.js","sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.min.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","module.exports = require(\"regenerator-runtime\");\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","function accessor (fn, fields, name) {\n fn.fields = fields || [];\n fn.fname = name;\n return fn;\n}\nfunction accessorName(fn) {\n return fn == null ? null : fn.fname;\n}\nfunction accessorFields(fn) {\n return fn == null ? null : fn.fields;\n}\n\nfunction getter (path) {\n return path.length === 1 ? get1(path[0]) : getN(path);\n}\n\nconst get1 = field => function (obj) {\n return obj[field];\n};\n\nconst getN = path => {\n const len = path.length;\n return function (obj) {\n for (let i = 0; i < len; ++i) {\n obj = obj[path[i]];\n }\n\n return obj;\n };\n};\n\nfunction error (message) {\n throw Error(message);\n}\n\nfunction splitAccessPath (p) {\n const path = [],\n n = p.length;\n let q = null,\n b = 0,\n s = '',\n i,\n j,\n c;\n p = p + '';\n\n function push() {\n path.push(s + p.substring(i, j));\n s = '';\n i = j + 1;\n }\n\n for (i = j = 0; j < n; ++j) {\n c = p[j];\n\n if (c === '\\\\') {\n s += p.substring(i, j);\n s += p.substring(++j, ++j);\n i = j;\n } else if (c === q) {\n push();\n q = null;\n b = -1;\n } else if (q) {\n continue;\n } else if (i === b && c === '\"') {\n i = j + 1;\n q = c;\n } else if (i === b && c === \"'\") {\n i = j + 1;\n q = c;\n } else if (c === '.' && !b) {\n if (j > i) {\n push();\n } else {\n i = j + 1;\n }\n } else if (c === '[') {\n if (j > i) push();\n b = i = j + 1;\n } else if (c === ']') {\n if (!b) error('Access path missing open bracket: ' + p);\n if (b > 0) push();\n b = 0;\n i = j + 1;\n }\n }\n\n if (b) error('Access path missing closing bracket: ' + p);\n if (q) error('Access path missing closing quote: ' + p);\n\n if (j > i) {\n j++;\n push();\n }\n\n return path;\n}\n\nfunction field (field, name, opt) {\n const path = splitAccessPath(field);\n field = path.length === 1 ? path[0] : field;\n return accessor((opt && opt.get || getter)(path), [field], name || field);\n}\n\nconst id = field('id');\nconst identity = accessor(_ => _, [], 'identity');\nconst zero = accessor(() => 0, [], 'zero');\nconst one = accessor(() => 1, [], 'one');\nconst truthy = accessor(() => true, [], 'true');\nconst falsy = accessor(() => false, [], 'false');\n\nfunction log$1(method, level, input) {\n const args = [level].concat([].slice.call(input));\n console[method].apply(console, args); // eslint-disable-line no-console\n}\n\nconst None = 0;\nconst Error$1 = 1;\nconst Warn = 2;\nconst Info = 3;\nconst Debug = 4;\nfunction logger (_, method, handler = log$1) {\n let level = _ || None;\n return {\n level(_) {\n if (arguments.length) {\n level = +_;\n return this;\n } else {\n return level;\n }\n },\n\n error() {\n if (level >= Error$1) handler(method || 'error', 'ERROR', arguments);\n return this;\n },\n\n warn() {\n if (level >= Warn) handler(method || 'warn', 'WARN', arguments);\n return this;\n },\n\n info() {\n if (level >= Info) handler(method || 'log', 'INFO', arguments);\n return this;\n },\n\n debug() {\n if (level >= Debug) handler(method || 'log', 'DEBUG', arguments);\n return this;\n }\n\n };\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (_) {\n return _ === Object(_);\n}\n\nconst isLegalKey = key => key !== '__proto__';\n\nfunction mergeConfig(...configs) {\n return configs.reduce((out, source) => {\n for (const key in source) {\n if (key === 'signals') {\n // for signals, we merge the signals arrays\n // source signals take precedence over\n // existing signals with the same name\n out.signals = mergeNamed(out.signals, source.signals);\n } else {\n // otherwise, merge objects subject to recursion constraints\n // for legend block, recurse for the layout entry only\n // for style block, recurse for all properties\n // otherwise, no recursion: objects overwrite, no merging\n const r = key === 'legend' ? {\n layout: 1\n } : key === 'style' ? true : null;\n writeConfig(out, key, source[key], r);\n }\n }\n\n return out;\n }, {});\n}\nfunction writeConfig(output, key, value, recurse) {\n if (!isLegalKey(key)) return;\n let k, o;\n\n if (isObject(value) && !isArray(value)) {\n o = isObject(output[key]) ? output[key] : output[key] = {};\n\n for (k in value) {\n if (recurse && (recurse === true || recurse[k])) {\n writeConfig(o, k, value[k]);\n } else if (isLegalKey(k)) {\n o[k] = value[k];\n }\n }\n } else {\n output[key] = value;\n }\n}\n\nfunction mergeNamed(a, b) {\n if (a == null) return b;\n const map = {},\n out = [];\n\n function add(_) {\n if (!map[_.name]) {\n map[_.name] = 1;\n out.push(_);\n }\n }\n\n b.forEach(add);\n a.forEach(add);\n return out;\n}\n\nfunction peek (array) {\n return array[array.length - 1];\n}\n\nfunction toNumber (_) {\n return _ == null || _ === '' ? null : +_;\n}\n\nconst exp = sign => x => sign * Math.exp(x);\n\nconst log = sign => x => Math.log(sign * x);\n\nconst symlog = c => x => Math.sign(x) * Math.log1p(Math.abs(x / c));\n\nconst symexp = c => x => Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n\nconst pow = exponent => x => x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n\nfunction pan(domain, delta, lift, ground) {\n const d0 = lift(domain[0]),\n d1 = lift(peek(domain)),\n dd = (d1 - d0) * delta;\n return [ground(d0 - dd), ground(d1 - dd)];\n}\n\nfunction panLinear(domain, delta) {\n return pan(domain, delta, toNumber, identity);\n}\nfunction panLog(domain, delta) {\n var sign = Math.sign(domain[0]);\n return pan(domain, delta, log(sign), exp(sign));\n}\nfunction panPow(domain, delta, exponent) {\n return pan(domain, delta, pow(exponent), pow(1 / exponent));\n}\nfunction panSymlog(domain, delta, constant) {\n return pan(domain, delta, symlog(constant), symexp(constant));\n}\n\nfunction zoom(domain, anchor, scale, lift, ground) {\n const d0 = lift(domain[0]),\n d1 = lift(peek(domain)),\n da = anchor != null ? lift(anchor) : (d0 + d1) / 2;\n return [ground(da + (d0 - da) * scale), ground(da + (d1 - da) * scale)];\n}\n\nfunction zoomLinear(domain, anchor, scale) {\n return zoom(domain, anchor, scale, toNumber, identity);\n}\nfunction zoomLog(domain, anchor, scale) {\n const sign = Math.sign(domain[0]);\n return zoom(domain, anchor, scale, log(sign), exp(sign));\n}\nfunction zoomPow(domain, anchor, scale, exponent) {\n return zoom(domain, anchor, scale, pow(exponent), pow(1 / exponent));\n}\nfunction zoomSymlog(domain, anchor, scale, constant) {\n return zoom(domain, anchor, scale, symlog(constant), symexp(constant));\n}\n\nfunction quarter(date) {\n return 1 + ~~(new Date(date).getMonth() / 3);\n}\nfunction utcquarter(date) {\n return 1 + ~~(new Date(date).getUTCMonth() / 3);\n}\n\nfunction array (_) {\n return _ != null ? isArray(_) ? _ : [_] : [];\n}\n\n/**\n * Span-preserving range clamp. If the span of the input range is less\n * than (max - min) and an endpoint exceeds either the min or max value,\n * the range is translated such that the span is preserved and one\n * endpoint touches the boundary of the min/max range.\n * If the span exceeds (max - min), the range [min, max] is returned.\n */\nfunction clampRange (range, min, max) {\n let lo = range[0],\n hi = range[1],\n span;\n\n if (hi < lo) {\n span = hi;\n hi = lo;\n lo = span;\n }\n\n span = hi - lo;\n return span >= max - min ? [min, max] : [lo = Math.min(Math.max(lo, min), max - span), lo + span];\n}\n\nfunction isFunction (_) {\n return typeof _ === 'function';\n}\n\nconst DESCENDING = 'descending';\nfunction compare (fields, orders, opt) {\n opt = opt || {};\n orders = array(orders) || [];\n const ord = [],\n get = [],\n fmap = {},\n gen = opt.comparator || comparator;\n array(fields).forEach((f, i) => {\n if (f == null) return;\n ord.push(orders[i] === DESCENDING ? -1 : 1);\n get.push(f = isFunction(f) ? f : field(f, null, opt));\n (accessorFields(f) || []).forEach(_ => fmap[_] = 1);\n });\n return get.length === 0 ? null : accessor(gen(get, ord), Object.keys(fmap));\n}\nconst ascending = (u, v) => (u < v || u == null) && v != null ? -1 : (u > v || v == null) && u != null ? 1 : (v = v instanceof Date ? +v : v, u = u instanceof Date ? +u : u) !== u && v === v ? -1 : v !== v && u === u ? 1 : 0;\n\nconst comparator = (fields, orders) => fields.length === 1 ? compare1(fields[0], orders[0]) : compareN(fields, orders, fields.length);\n\nconst compare1 = (field, order) => function (a, b) {\n return ascending(field(a), field(b)) * order;\n};\n\nconst compareN = (fields, orders, n) => {\n orders.push(0); // pad zero for convenient lookup\n\n return function (a, b) {\n let f,\n c = 0,\n i = -1;\n\n while (c === 0 && ++i < n) {\n f = fields[i];\n c = ascending(f(a), f(b));\n }\n\n return c * orders[i];\n };\n};\n\nfunction constant (_) {\n return isFunction(_) ? _ : () => _;\n}\n\nfunction debounce (delay, handler) {\n let tid;\n return e => {\n if (tid) clearTimeout(tid);\n tid = setTimeout(() => (handler(e), tid = null), delay);\n };\n}\n\nfunction extend (_) {\n for (let x, k, i = 1, len = arguments.length; i < len; ++i) {\n x = arguments[i];\n\n for (k in x) {\n _[k] = x[k];\n }\n }\n\n return _;\n}\n\n/**\n * Return an array with minimum and maximum values, in the\n * form [min, max]. Ignores null, undefined, and NaN values.\n */\nfunction extent (array, f) {\n let i = 0,\n n,\n v,\n min,\n max;\n\n if (array && (n = array.length)) {\n if (f == null) {\n // find first valid value\n for (v = array[i]; i < n && (v == null || v !== v); v = array[++i]);\n\n min = max = v; // visit all other values\n\n for (; i < n; ++i) {\n v = array[i]; // skip null/undefined; NaN will fail all comparisons\n\n if (v != null) {\n if (v < min) min = v;\n if (v > max) max = v;\n }\n }\n } else {\n // find first valid value\n for (v = f(array[i]); i < n && (v == null || v !== v); v = f(array[++i]));\n\n min = max = v; // visit all other values\n\n for (; i < n; ++i) {\n v = f(array[i]); // skip null/undefined; NaN will fail all comparisons\n\n if (v != null) {\n if (v < min) min = v;\n if (v > max) max = v;\n }\n }\n }\n }\n\n return [min, max];\n}\n\nfunction extentIndex (array, f) {\n const n = array.length;\n let i = -1,\n a,\n b,\n c,\n u,\n v;\n\n if (f == null) {\n while (++i < n) {\n b = array[i];\n\n if (b != null && b >= b) {\n a = c = b;\n break;\n }\n }\n\n if (i === n) return [-1, -1];\n u = v = i;\n\n while (++i < n) {\n b = array[i];\n\n if (b != null) {\n if (a > b) {\n a = b;\n u = i;\n }\n\n if (c < b) {\n c = b;\n v = i;\n }\n }\n }\n } else {\n while (++i < n) {\n b = f(array[i], i, array);\n\n if (b != null && b >= b) {\n a = c = b;\n break;\n }\n }\n\n if (i === n) return [-1, -1];\n u = v = i;\n\n while (++i < n) {\n b = f(array[i], i, array);\n\n if (b != null) {\n if (a > b) {\n a = b;\n u = i;\n }\n\n if (c < b) {\n c = b;\n v = i;\n }\n }\n }\n }\n\n return [u, v];\n}\n\nconst hop = Object.prototype.hasOwnProperty;\nfunction has (object, property) {\n return hop.call(object, property);\n}\n\nconst NULL = {};\nfunction fastmap (input) {\n let obj = {},\n test;\n\n function has$1(key) {\n return has(obj, key) && obj[key] !== NULL;\n }\n\n const map = {\n size: 0,\n empty: 0,\n object: obj,\n has: has$1,\n\n get(key) {\n return has$1(key) ? obj[key] : undefined;\n },\n\n set(key, value) {\n if (!has$1(key)) {\n ++map.size;\n if (obj[key] === NULL) --map.empty;\n }\n\n obj[key] = value;\n return this;\n },\n\n delete(key) {\n if (has$1(key)) {\n --map.size;\n ++map.empty;\n obj[key] = NULL;\n }\n\n return this;\n },\n\n clear() {\n map.size = map.empty = 0;\n map.object = obj = {};\n },\n\n test(_) {\n if (arguments.length) {\n test = _;\n return map;\n } else {\n return test;\n }\n },\n\n clean() {\n const next = {};\n let size = 0;\n\n for (const key in obj) {\n const value = obj[key];\n\n if (value !== NULL && (!test || !test(value))) {\n next[key] = value;\n ++size;\n }\n }\n\n map.size = size;\n map.empty = 0;\n map.object = obj = next;\n }\n\n };\n if (input) Object.keys(input).forEach(key => {\n map.set(key, input[key]);\n });\n return map;\n}\n\nfunction flush (range, value, threshold, left, right, center) {\n if (!threshold && threshold !== 0) return center;\n const t = +threshold;\n let a = range[0],\n b = peek(range),\n l; // swap endpoints if range is reversed\n\n if (b < a) {\n l = a;\n a = b;\n b = l;\n } // compare value to endpoints\n\n\n l = Math.abs(value - a);\n const r = Math.abs(b - value); // adjust if value is within threshold distance of endpoint\n\n return l < r && l <= t ? left : r <= t ? right : center;\n}\n\nfunction inherits (child, parent, members) {\n const proto = child.prototype = Object.create(parent.prototype);\n Object.defineProperty(proto, 'constructor', {\n value: child,\n writable: true,\n enumerable: true,\n configurable: true\n });\n return extend(proto, members);\n}\n\n/**\n * Predicate that returns true if the value lies within the span\n * of the given range. The left and right flags control the use\n * of inclusive (true) or exclusive (false) comparisons.\n */\nfunction inrange (value, range, left, right) {\n let r0 = range[0],\n r1 = range[range.length - 1],\n t;\n\n if (r0 > r1) {\n t = r0;\n r0 = r1;\n r1 = t;\n }\n\n left = left === undefined || left;\n right = right === undefined || right;\n return (left ? r0 <= value : r0 < value) && (right ? value <= r1 : value < r1);\n}\n\nfunction isBoolean (_) {\n return typeof _ === 'boolean';\n}\n\nfunction isDate (_) {\n return Object.prototype.toString.call(_) === '[object Date]';\n}\n\nfunction isIterable (_) {\n return _ && isFunction(_[Symbol.iterator]);\n}\n\nfunction isNumber (_) {\n return typeof _ === 'number';\n}\n\nfunction isRegExp (_) {\n return Object.prototype.toString.call(_) === '[object RegExp]';\n}\n\nfunction isString (_) {\n return typeof _ === 'string';\n}\n\nfunction key (fields, flat, opt) {\n if (fields) {\n fields = flat ? array(fields).map(f => f.replace(/\\\\(.)/g, '$1')) : array(fields);\n }\n\n const len = fields && fields.length,\n gen = opt && opt.get || getter,\n map = f => gen(flat ? [f] : splitAccessPath(f));\n\n let fn;\n\n if (!len) {\n fn = function () {\n return '';\n };\n } else if (len === 1) {\n const get = map(fields[0]);\n\n fn = function (_) {\n return '' + get(_);\n };\n } else {\n const get = fields.map(map);\n\n fn = function (_) {\n let s = '' + get[0](_),\n i = 0;\n\n while (++i < len) s += '|' + get[i](_);\n\n return s;\n };\n }\n\n return accessor(fn, fields, 'key');\n}\n\nfunction lerp (array, frac) {\n const lo = array[0],\n hi = peek(array),\n f = +frac;\n return !f ? lo : f === 1 ? hi : lo + f * (hi - lo);\n}\n\nconst DEFAULT_MAX_SIZE = 10000; // adapted from https://github.com/dominictarr/hashlru/ (MIT License)\n\nfunction lruCache (maxsize) {\n maxsize = +maxsize || DEFAULT_MAX_SIZE;\n let curr, prev, size;\n\n const clear = () => {\n curr = {};\n prev = {};\n size = 0;\n };\n\n const update = (key, value) => {\n if (++size > maxsize) {\n prev = curr;\n curr = {};\n size = 1;\n }\n\n return curr[key] = value;\n };\n\n clear();\n return {\n clear,\n has: key => has(curr, key) || has(prev, key),\n get: key => has(curr, key) ? curr[key] : has(prev, key) ? update(key, prev[key]) : undefined,\n set: (key, value) => has(curr, key) ? curr[key] = value : update(key, value)\n };\n}\n\nfunction merge (compare, array0, array1, output) {\n const n0 = array0.length,\n n1 = array1.length;\n if (!n1) return array0;\n if (!n0) return array1;\n const merged = output || new array0.constructor(n0 + n1);\n let i0 = 0,\n i1 = 0,\n i = 0;\n\n for (; i0 < n0 && i1 < n1; ++i) {\n merged[i] = compare(array0[i0], array1[i1]) > 0 ? array1[i1++] : array0[i0++];\n }\n\n for (; i0 < n0; ++i0, ++i) {\n merged[i] = array0[i0];\n }\n\n for (; i1 < n1; ++i1, ++i) {\n merged[i] = array1[i1];\n }\n\n return merged;\n}\n\nfunction repeat (str, reps) {\n let s = '';\n\n while (--reps >= 0) s += str;\n\n return s;\n}\n\nfunction pad (str, length, padchar, align) {\n const c = padchar || ' ',\n s = str + '',\n n = length - s.length;\n return n <= 0 ? s : align === 'left' ? repeat(c, n) + s : align === 'center' ? repeat(c, ~~(n / 2)) + s + repeat(c, Math.ceil(n / 2)) : s + repeat(c, n);\n}\n\n/**\n * Return the numerical span of an array: the difference between\n * the last and first values.\n */\n\nfunction span (array) {\n return array && peek(array) - array[0] || 0;\n}\n\nfunction $(x) {\n return isArray(x) ? '[' + x.map($) + ']' : isObject(x) || isString(x) ? // Output valid JSON and JS source strings.\n // See http://timelessrepo.com/json-isnt-a-javascript-subset\n JSON.stringify(x).replace('\\u2028', '\\\\u2028').replace('\\u2029', '\\\\u2029') : x;\n}\n\nfunction toBoolean (_) {\n return _ == null || _ === '' ? null : !_ || _ === 'false' || _ === '0' ? false : !!_;\n}\n\nconst defaultParser = _ => isNumber(_) ? _ : isDate(_) ? _ : Date.parse(_);\n\nfunction toDate (_, parser) {\n parser = parser || defaultParser;\n return _ == null || _ === '' ? null : parser(_);\n}\n\nfunction toString (_) {\n return _ == null || _ === '' ? null : _ + '';\n}\n\nfunction toSet (_) {\n const s = {},\n n = _.length;\n\n for (let i = 0; i < n; ++i) s[_[i]] = true;\n\n return s;\n}\n\nfunction truncate (str, length, align, ellipsis) {\n const e = ellipsis != null ? ellipsis : '\\u2026',\n s = str + '',\n n = s.length,\n l = Math.max(0, length - e.length);\n return n <= length ? s : align === 'left' ? e + s.slice(n - l) : align === 'center' ? s.slice(0, Math.ceil(l / 2)) + e + s.slice(n - ~~(l / 2)) : s.slice(0, l) + e;\n}\n\nfunction visitArray (array, filter, visitor) {\n if (array) {\n if (filter) {\n const n = array.length;\n\n for (let i = 0; i < n; ++i) {\n const t = filter(array[i]);\n if (t) visitor(t, i, array);\n }\n } else {\n array.forEach(visitor);\n }\n }\n}\n\nexport { Debug, Error$1 as Error, Info, None, Warn, accessor, accessorFields, accessorName, array, ascending, clampRange, compare, constant, debounce, error, extend, extent, extentIndex, falsy, fastmap, field, flush, has as hasOwnProperty, id, identity, inherits, inrange, isArray, isBoolean, isDate, isFunction, isIterable, isNumber, isObject, isRegExp, isString, key, lerp, logger, lruCache, merge, mergeConfig, one, pad, panLinear, panLog, panPow, panSymlog, peek, quarter, repeat, span, splitAccessPath, $ as stringValue, toBoolean, toDate, toNumber, toSet, toString, truncate, truthy, utcquarter, visitArray, writeConfig, zero, zoomLinear, zoomLog, zoomPow, zoomSymlog };\n","import unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nexport default function _createForOfIteratorHelper(o) {\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (o = unsupportedIterableToArray(o))) {\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var it,\n normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = o[Symbol.iterator]();\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","import defineProperty from \"./defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","import setPrototypeOf from \"./setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import _typeof from \"../../helpers/esm/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct\";\nimport possibleConstructorReturn from \"./possibleConstructorReturn\";\nexport default function _createSuper(Derived) {\n return function () {\n var Super = getPrototypeOf(Derived),\n result;\n\n if (isNativeReflectConstruct()) {\n var NewTarget = getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return possibleConstructorReturn(this, result);\n };\n}","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default 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}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import superPropBase from \"./superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","import {Log} from 'probe.gl';\n\nexport default new Log({id: 'deck'});\n","/** @typedef {import('./device-pixels')} types */\n\n/**\n * Returns multiplier need to convert CSS size to Device size\n * @type {types['cssToDeviceRatio']}\n */\nexport function cssToDeviceRatio(gl) {\n // @ts-ignore\n const {luma} = gl;\n\n if (gl.canvas && luma) {\n // For headless gl we might have used custom width and height\n // hence use cached clientWidth\n const {clientWidth} = luma.canvasSizeInfo;\n return clientWidth ? gl.drawingBufferWidth / clientWidth : 1;\n }\n // use default device pixel ratio\n return 1;\n}\n\n/**\n * Maps CSS pixel position to device pixel position\n * @type {types['cssToDevicePixels']}\n */\nexport function cssToDevicePixels(gl, cssPixel, yInvert = true) {\n const ratio = cssToDeviceRatio(gl);\n const width = gl.drawingBufferWidth;\n const height = gl.drawingBufferHeight;\n return scalePixels(cssPixel, ratio, width, height, yInvert);\n}\n\n// HELPER METHOD\n\n/**\n * Calulates device pixel ratio, used during context creation\n * @type {types['getDevicePixelRatio']}\n */\nexport function getDevicePixelRatio(useDevicePixels) {\n const windowRatio = typeof window === 'undefined' ? 1 : window.devicePixelRatio || 1;\n if (Number.isFinite(useDevicePixels)) {\n // @ts-ignore Can no longer be boolean after previous line\n return useDevicePixels <= 0 ? 1 : useDevicePixels;\n }\n return useDevicePixels ? windowRatio : 1;\n}\n\n// PRIVATE\n\nfunction scalePixels(pixel, ratio, width, height, yInvert) {\n const x = scaleX(pixel[0], ratio, width);\n let y = scaleY(pixel[1], ratio, height, yInvert);\n\n // Find boundaries of next pixel to provide valid range of device pixel locaitons\n\n let t = scaleX(pixel[0] + 1, ratio, width);\n // If next pixel's position is clamped to boundary, use it as is, otherwise subtract 1 for current pixel boundary\n const xHigh = t === width - 1 ? t : t - 1;\n\n t = scaleY(pixel[1] + 1, ratio, height, yInvert);\n let yHigh;\n if (yInvert) {\n // If next pixel's position is clamped to boundary, use it as is, otherwise clamp it to valid range\n t = t === 0 ? t : t + 1;\n // swap y and yHigh\n yHigh = y;\n y = t;\n } else {\n // If next pixel's position is clamped to boundary, use it as is, otherwise clamp it to valid range\n yHigh = t === height - 1 ? t : t - 1;\n // y remains same\n }\n return {\n x,\n y,\n // when ratio < 1, current css pixel and next css pixel may point to same device pixel, set width/height to 1 in those cases.\n width: Math.max(xHigh - x + 1, 1),\n height: Math.max(yHigh - y + 1, 1)\n };\n}\n\nfunction scaleX(x, ratio, width) {\n // since we are rounding to nearest, when ratio > 1, edge pixels may point to out of bounds value, clamp to the limit\n const r = Math.min(Math.round(x * ratio), width - 1);\n return r;\n}\n\nfunction scaleY(y, ratio, height, yInvert) {\n // since we are rounding to nearest, when ratio > 1, edge pixels may point to out of bounds value, clamp to the limit\n return yInvert\n ? Math.max(0, height - 1 - Math.round(y * ratio))\n : Math.min(Math.round(y * ratio), height - 1);\n}\n","// WebGLRenderingContext related methods\n\n/** @typedef {import('./context')} types */\n\n/* eslint-disable quotes */\nimport GL from '@luma.gl/constants';\nimport {global, isBrowser as getIsBrowser} from 'probe.gl/env';\nimport {trackContextState} from '../state-tracker/track-context-state';\n\nimport {log} from '../utils/log';\nimport {assert} from '../utils/assert';\nimport {getDevicePixelRatio} from '../utils/device-pixels';\nimport {isWebGL2} from '../utils/webgl-checks';\n\nconst isBrowser = getIsBrowser();\nconst isPage = isBrowser && typeof document !== 'undefined';\n\nconst CONTEXT_DEFAULTS = {\n // COMMON CONTEXT PARAMETERS\n // Attempt to allocate WebGL2 context\n webgl2: true, // Attempt to create a WebGL2 context (false to force webgl1)\n webgl1: true, // Attempt to create a WebGL1 context (false to fail if webgl2 not available)\n throwOnError: true,\n manageState: true,\n // BROWSER CONTEXT PARAMETERS\n canvas: null, // A canvas element or a canvas string id\n debug: false, // Instrument context (at the expense of performance)\n // HEADLESS CONTEXT PARAMETERS\n width: 800, // width are height are only used by headless gl\n height: 600\n // WEBGL/HEADLESS CONTEXT PARAMETERS\n // Remaining options are passed through to context creator\n};\n\n/**\n * Creates a context giving access to the WebGL API\n * @type {types['createGLContext']}\n */\n/* eslint-disable complexity, max-statements */\nexport function createGLContext(options = {}) {\n assert(\n isBrowser,\n \"createGLContext only available in the browser.\\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils\"\n );\n\n options = Object.assign({}, CONTEXT_DEFAULTS, options);\n const {width, height} = options;\n\n // Error reporting function, enables exceptions to be disabled\n function onError(message) {\n if (options.throwOnError) {\n throw new Error(message);\n }\n // eslint-disable-next-line\n console.error(message);\n return null;\n }\n options.onError = onError;\n\n let gl;\n // Get or create a canvas\n const {canvas} = options;\n const targetCanvas = getCanvas({canvas, width, height, onError});\n // Create a WebGL context in the canvas\n gl = createBrowserContext(targetCanvas, options);\n\n if (!gl) {\n return null;\n }\n\n gl = instrumentGLContext(gl, options);\n\n // Log some debug info about the newly created context\n logInfo(gl);\n\n // Add to seer integration\n return gl;\n}\n\n/**\n * Creates a context giving access to the WebGL API\n * @type {types['instrumentGLContext']}\n */\nexport function instrumentGLContext(gl, options = {}) {\n // Avoid multiple instrumentations\n // @ts-ignore\n if (!gl || gl._instrumented) {\n return gl;\n }\n\n // @ts-ignore\n gl._version = gl._version || getVersion(gl);\n\n // Cache canvas size information to avoid setting it on every frame.\n // @ts-ignore\n gl.luma = gl.luma || {};\n // @ts-ignore\n gl.luma.canvasSizeInfo = gl.luma.canvasSizeInfo || {};\n\n options = Object.assign({}, CONTEXT_DEFAULTS, options);\n const {manageState, debug} = options;\n\n // Install context state tracking\n if (manageState) {\n trackContextState(gl, {\n copyState: false,\n log: (...args) => log.log(1, ...args)()\n });\n }\n\n // Add debug instrumentation to the context\n if (isBrowser && debug) {\n // @ts-ignore\n if (!global.makeDebugContext) {\n log.warn('WebGL debug mode not activated. import \"@luma.gl/debug\" to enable.')();\n } else {\n // @ts-ignore\n gl = global.makeDebugContext(gl, options);\n // Debug forces log level to at least 1\n log.level = Math.max(log.level, 1);\n }\n }\n\n // @ts-ignore\n gl._instrumented = true;\n\n return gl;\n}\n\n/**\n * Provides strings identifying the GPU vendor and driver.\n * @type {types['getContextDebugInfo']}\n */\nexport function getContextDebugInfo(gl) {\n const vendorMasked = gl.getParameter(GL.VENDOR);\n const rendererMasked = gl.getParameter(GL.RENDERER);\n const ext = gl.getExtension('WEBGL_debug_renderer_info');\n const vendorUnmasked = ext && gl.getParameter(ext.UNMASKED_VENDOR_WEBGL || GL.VENDOR);\n const rendererUnmasked = ext && gl.getParameter(ext.UNMASKED_RENDERER_WEBGL || GL.RENDERER);\n return {\n vendor: vendorUnmasked || vendorMasked,\n renderer: rendererUnmasked || rendererMasked,\n vendorMasked,\n rendererMasked,\n version: gl.getParameter(GL.VERSION),\n shadingLanguageVersion: gl.getParameter(GL.SHADING_LANGUAGE_VERSION)\n };\n}\n\n/**\n * Resize the canvas' drawing buffer.\n * @type {types['resizeGLContext']}\n */\nexport function resizeGLContext(gl, options = {}) {\n // Resize browser context\n if (gl.canvas) {\n const devicePixelRatio = getDevicePixelRatio(options.useDevicePixels);\n setDevicePixelRatio(gl, devicePixelRatio, options);\n return;\n }\n\n // Resize headless gl context\n const ext = gl.getExtension('STACKGL_resize_drawingbuffer');\n if (ext && `width` in options && `height` in options) {\n ext.resize(options.width, options.height);\n }\n}\n\n// HELPER METHODS\n\n/**\n * Create a WebGL context for a canvas\n * Note calling this multiple time on the same canvas does return the same context\n */\n\nfunction createBrowserContext(canvas, options) {\n const {onError} = options;\n\n // Try to extract any extra information about why context creation failed\n let errorMessage = null;\n const onCreateError = error => (errorMessage = error.statusMessage || errorMessage);\n canvas.addEventListener('webglcontextcreationerror', onCreateError, false);\n\n const {webgl1 = true, webgl2 = true} = options;\n let gl = null;\n // Prefer webgl2 over webgl1, prefer conformant over experimental\n if (webgl2) {\n gl = gl || canvas.getContext('webgl2', options);\n gl = gl || canvas.getContext('experimental-webgl2', options);\n }\n if (webgl1) {\n gl = gl || canvas.getContext('webgl', options);\n gl = gl || canvas.getContext('experimental-webgl', options);\n }\n\n canvas.removeEventListener('webglcontextcreationerror', onCreateError, false);\n\n if (!gl) {\n return onError(\n `Failed to create ${webgl2 && !webgl1 ? 'WebGL2' : 'WebGL'} context: ${errorMessage ||\n 'Unknown error'}`\n );\n }\n\n if (options.onContextLost) {\n canvas.addEventListener('webglcontextlost', options.onContextLost, false);\n }\n\n if (options.onContextRestored) {\n canvas.addEventListener('webglcontextrestored', options.onContextRestored, false);\n }\n\n return gl;\n}\n\nfunction getCanvas({canvas, width = 800, height = 600, onError}) {\n let targetCanvas;\n if (typeof canvas === 'string') {\n const isPageLoaded = isPage && document.readyState === 'complete';\n if (!isPageLoaded) {\n onError(`createGLContext called on canvas '${canvas}' before page was loaded`);\n }\n targetCanvas = document.getElementById(canvas);\n } else if (canvas) {\n targetCanvas = canvas;\n } else {\n targetCanvas = document.createElement('canvas');\n targetCanvas.id = 'lumagl-canvas';\n targetCanvas.style.width = Number.isFinite(width) ? `${width}px` : '100%';\n targetCanvas.style.height = Number.isFinite(height) ? `${height}px` : '100%';\n document.body.insertBefore(targetCanvas, document.body.firstChild);\n }\n\n return targetCanvas;\n}\n\nfunction logInfo(gl) {\n const webGL = isWebGL2(gl) ? 'WebGL2' : 'WebGL1';\n const info = getContextDebugInfo(gl);\n const driver = info ? `(${info.vendor},${info.renderer})` : '';\n const debug = gl.debug ? ' debug' : '';\n log.info(1, `${webGL}${debug} context ${driver}`)();\n}\n\nfunction getVersion(gl) {\n if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {\n // WebGL2 context.\n return 2;\n }\n // Must be a WebGL1 context.\n return 1;\n}\n\n// use devicePixelRatio to set canvas width and height\nfunction setDevicePixelRatio(gl, devicePixelRatio, options) {\n // NOTE: if options.width and options.height not used remove in v8\n let clientWidth = 'width' in options ? options.width : gl.canvas.clientWidth;\n let clientHeight = 'height' in options ? options.height : gl.canvas.clientHeight;\n\n if (!clientWidth || !clientHeight) {\n log.log(1, 'Canvas clientWidth/clientHeight is 0')();\n // by forcing devicePixel ratio to 1, we do not scale gl.canvas.width and height in each frame.\n devicePixelRatio = 1;\n clientWidth = gl.canvas.width || 1;\n clientHeight = gl.canvas.height || 1;\n }\n\n gl.luma = gl.luma || {};\n gl.luma.canvasSizeInfo = gl.luma.canvasSizeInfo || {};\n const cachedSize = gl.luma.canvasSizeInfo;\n // Check if canvas needs to be resized\n if (\n cachedSize.clientWidth !== clientWidth ||\n cachedSize.clientHeight !== clientHeight ||\n cachedSize.devicePixelRatio !== devicePixelRatio\n ) {\n let clampedPixelRatio = devicePixelRatio;\n\n const canvasWidth = Math.floor(clientWidth * clampedPixelRatio);\n const canvasHeight = Math.floor(clientHeight * clampedPixelRatio);\n gl.canvas.width = canvasWidth;\n gl.canvas.height = canvasHeight;\n\n // Note: when devicePixelRatio is too high, it is possible we might hit system limit for\n // drawing buffer width and hight, in those cases they get clamped and resulting aspect ration may not be maintained\n // for those cases, reduce devicePixelRatio.\n if (gl.drawingBufferWidth !== canvasWidth || gl.drawingBufferHeight !== canvasHeight) {\n log.warn(`Device pixel ratio clamped`)();\n clampedPixelRatio = Math.min(\n gl.drawingBufferWidth / clientWidth,\n gl.drawingBufferHeight / clientHeight\n );\n\n gl.canvas.width = Math.floor(clientWidth * clampedPixelRatio);\n gl.canvas.height = Math.floor(clientHeight * clampedPixelRatio);\n }\n\n Object.assign(gl.luma.canvasSizeInfo, {clientWidth, clientHeight, devicePixelRatio});\n }\n}\n","// STATS (PERFORMANCE PROFILING)\nexport {default as Stats} from './lib/stats';\nexport {default as Stat} from './lib/stat';\n\n// UTILITIES\nexport {default as _getHiResTimestamp} from './utils/hi-res-timestamp';\n","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","export default function assert(condition, message) {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {mat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {mat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to translate\r\n * @param {vec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to scale\r\n * @param {vec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {vec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {vec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {vec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {vec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {vec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {quat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslation,\r\n * the returned vector will be the same as the translation vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive translation component\r\n * @param {mat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslationScale\r\n * with a normalized Quaternion paramter, the returned vector will be\r\n * the same as the scaling vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive scaling factor component\r\n * @param {mat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n * of a transformation matrix. If a matrix is built with\r\n * fromRotationTranslation, the returned quaternion will be the\r\n * same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {mat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {vec3} v Translation vector\r\n * @param {vec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * mat4.translate(dest, origin);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n * mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {vec3} v Translation vector\r\n * @param {vec3} s Scaling vector\r\n * @param {vec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nexport function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {vec3} eye Position of the viewer\r\n * @param {vec3} center Point the viewer is looking at\r\n * @param {vec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {vec3} eye Position of the viewer\r\n * @param {vec3} center Point the viewer is looking at\r\n * @param {vec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {mat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {mat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {mat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {mat4} a the first operand\r\n * @param {mat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {mat4} a The first matrix.\r\n * @param {mat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {mat4} a The first matrix.\r\n * @param {mat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport makeStyles from '../makeStyles';\nimport getThemeProps from '../getThemeProps';\nimport useTheme from '../useTheme'; // Link a style sheet with a component.\n// It does not modify the component passed to it;\n// instead, it returns a new component, with a `classes` property.\n\nvar withStyles = function withStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return function (Component) {\n var defaultTheme = options.defaultTheme,\n _options$withTheme = options.withTheme,\n withTheme = _options$withTheme === void 0 ? false : _options$withTheme,\n name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"defaultTheme\", \"withTheme\", \"name\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (Component === undefined) {\n throw new Error(['You are calling withStyles(styles)(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var useStyles = makeStyles(stylesOrCreator, _extends({\n defaultTheme: defaultTheme,\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var WithStyles = /*#__PURE__*/React.forwardRef(function WithStyles(props, ref) {\n var classesProp = props.classes,\n innerRef = props.innerRef,\n other = _objectWithoutProperties(props, [\"classes\", \"innerRef\"]); // The wrapper receives only user supplied props, which could be a subset of\n // the actual props Component might receive due to merging with defaultProps.\n // So copying it here would give us the same result in the wrapper as well.\n\n\n var classes = useStyles(_extends({}, Component.defaultProps, props));\n var theme;\n var more = other;\n\n if (typeof name === 'string' || withTheme) {\n // name and withTheme are invariant in the outer scope\n // eslint-disable-next-line react-hooks/rules-of-hooks\n theme = useTheme() || defaultTheme;\n\n if (name) {\n more = getThemeProps({\n theme: theme,\n name: name,\n props: other\n });\n } // Provide the theme to the wrapped component.\n // So we don't have to use the `withTheme()` Higher-order Component.\n\n\n if (withTheme && !more.theme) {\n more.theme = theme;\n }\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: innerRef || ref,\n classes: classes\n }, more));\n });\n process.env.NODE_ENV !== \"production\" ? WithStyles.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * Use that prop to pass a ref to the decorated component.\n * @deprecated\n */\n innerRef: chainPropTypes(PropTypes.oneOfType([PropTypes.func, PropTypes.object]), function (props) {\n if (props.innerRef == null) {\n return null;\n }\n\n return null; // return new Error(\n // 'Material-UI: The `innerRef` prop is deprecated and will be removed in v5. ' +\n // 'Refs are now automatically forwarded to the inner component.',\n // );\n })\n } : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n WithStyles.displayName = \"WithStyles(\".concat(getDisplayName(Component), \")\");\n }\n\n hoistNonReactStatics(WithStyles, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // Exposed for test purposes.\n WithStyles.Naked = Component;\n WithStyles.options = options;\n WithStyles.useStyles = useStyles;\n }\n\n return WithStyles;\n };\n};\n\nexport default withStyles;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { withStyles as withStylesWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\n\nfunction withStyles(stylesOrCreator, options) {\n return withStylesWithoutDefault(stylesOrCreator, _extends({\n defaultTheme: defaultTheme\n }, options));\n}\n\nexport default withStyles;","import * as glMatrix from \"./common.js\";\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {vec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {vec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {vec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {vec3} c the third operand\r\n * @param {vec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the first operand\r\n * @param {vec3} b the second operand\r\n * @param {vec3} c the third operand\r\n * @param {vec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to transform\r\n * @param {mat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to transform\r\n * @param {mat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec3} a the vector to transform\r\n * @param {quat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {vec3} a The vec3 point to rotate\r\n * @param {vec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {vec3} a The vec3 point to rotate\r\n * @param {vec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {vec3} a The vec3 point to rotate\r\n * @param {vec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {vec3} a The first operand\r\n * @param {vec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {vec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {vec3} a The first vector.\r\n * @param {vec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {vec3} a The first vector.\r\n * @param {vec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\r\n * Sets the type of array used when creating new vectors and matrices\r\n *\r\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\r\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\r\n * Tests whether or not the arguments have approximately the same value, within an absolute\r\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\r\n * than or equal to 1.0, and a relative tolerance is used for larger values)\r\n *\r\n * @param {Number} a The first number to test.\r\n * @param {Number} b The second number to test.\r\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\r\n * Sets the type of array used when creating new vectors and matrices\r\n *\r\n * @param {Type} type Array type, such as Float32Array or Array\r\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\r\n * Tests whether or not the arguments have approximately the same value, within an absolute\r\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\r\n * than or equal to 1.0, and a relative tolerance is used for larger values)\r\n *\r\n * @param {Number} a The first number to test.\r\n * @param {Number} b The second number to test.\r\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport assert from './assert';\n\nconst RADIANS_TO_DEGREES = (1 / Math.PI) * 180;\nconst DEGREES_TO_RADIANS = (1 / 180) * Math.PI;\n\n// TODO - remove\n/* eslint-disable no-shadow */\nconst config = {};\nconfig.EPSILON = 1e-12;\nconfig.debug = false;\nconfig.precision = 4;\nconfig.printTypes = false;\nconfig.printDegrees = false;\nconfig.printRowMajor = true;\n\nexport {config};\n\nexport function configure(options = {}) {\n // Only copy existing keys\n for (const key in options) {\n assert(key in config);\n config[key] = options[key];\n }\n return config;\n}\n\nfunction round(value) {\n return Math.round(value / config.EPSILON) * config.EPSILON;\n}\n\nexport function formatValue(value, {precision = config.precision || 4} = {}) {\n value = round(value);\n // get rid of trailing zeros\n return `${parseFloat(value.toPrecision(precision))}`;\n}\n\n// Returns true if value is either an array or a typed array\n// Note: does not return true for ArrayBuffers and DataViews\nexport function isArray(value) {\n return Array.isArray(value) || (ArrayBuffer.isView(value) && !(value instanceof DataView));\n}\n\n// If the array has a clone function, calls it, otherwise returns a copy\nfunction duplicateArray(array) {\n return array.clone ? array.clone() : new Array(array.length);\n}\n\nexport function clone(array) {\n return array.clone ? array.clone() : new Array(...array);\n}\n\n// If the argument value is an array, applies the func element wise,\n// otherwise applies func to the argument value\nfunction map(value, func, result) {\n if (isArray(value)) {\n result = result || duplicateArray(value);\n for (let i = 0; i < result.length && i < value.length; ++i) {\n result[i] = func(value[i], i, result);\n }\n return result;\n }\n return func(value);\n}\n\nexport function toRadians(degrees) {\n return radians(degrees);\n}\n\nexport function toDegrees(radians) {\n return degrees(radians);\n}\n\n//\n// GLSL math function equivalents\n// Works on both single values and vectors\n//\n\nexport function radians(degrees, result) {\n return map(degrees, (degrees) => degrees * DEGREES_TO_RADIANS, result);\n}\n\nexport function degrees(radians, result) {\n return map(radians, (radians) => radians * RADIANS_TO_DEGREES, result);\n}\n\n// GLSL equivalent: Works on single values and vectors\nexport function sin(radians) {\n return map(radians, (angle) => Math.sin(angle));\n}\n\n// GLSL equivalent: Works on single values and vectors\nexport function cos(radians) {\n return map(radians, (angle) => Math.cos(angle));\n}\n\n// GLSL equivalent: Works on single values and vectors\nexport function tan(radians) {\n return map(radians, (angle) => Math.tan(angle));\n}\n\n// GLSL equivalent: Works on single values and vectors\nexport function asin(radians) {\n return map(radians, (angle) => Math.asin(angle));\n}\n\n// GLSL equivalent: Works on single values and vectors\nexport function acos(radians) {\n return map(radians, (angle) => Math.acos(angle));\n}\n\n// GLSL equivalent: Works on single values and vectors\nexport function atan(radians) {\n return map(radians, (angle) => Math.atan(angle));\n}\n\nexport function clamp(value, min, max) {\n return map(value, (value) => Math.max(min, Math.min(max, value)));\n}\n\n// Interpolate between two numbers or two arrays\nexport function lerp(a, b, t) {\n if (isArray(a)) {\n return a.map((ai, i) => lerp(ai, b[i], t));\n }\n return t * b + (1 - t) * a;\n}\n\n// eslint-disable-next-line complexity\nexport function equals(a, b, epsilon) {\n const oldEpsilon = config.EPSILON;\n if (epsilon) {\n config.EPSILON = epsilon;\n }\n try {\n if (a === b) {\n return true;\n }\n if (isArray(a) && isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n // eslint-disable-next-line max-depth\n if (!equals(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (a && a.equals) {\n return a.equals(b);\n }\n if (b && b.equals) {\n return b.equals(a);\n }\n if (Number.isFinite(a) && Number.isFinite(b)) {\n return Math.abs(a - b) <= config.EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n }\n return false;\n } finally {\n config.EPSILON = oldEpsilon;\n }\n}\n\n// eslint-disable-next-line complexity\nexport function exactEquals(a, b) {\n if (a === b) {\n return true;\n }\n if (a && typeof a === 'object' && b && typeof b === 'object') {\n if (a.constructor !== b.constructor) {\n return false;\n }\n if (a.exactEquals) {\n return a.exactEquals(b);\n }\n }\n if (isArray(a) && isArray(b)) {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; ++i) {\n if (!exactEquals(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n\nexport function withEpsilon(EPSILON, func) {\n const oldPrecision = config.EPSILON;\n config.EPSILON = EPSILON;\n let value;\n try {\n value = func();\n } finally {\n config.EPSILON = oldPrecision;\n }\n return value;\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {config} from './common';\n\nexport function validateVector(v, length) {\n if (v.length !== length) {\n return false;\n }\n // Could be arguments \"array\" (v.every not availasble)\n for (let i = 0; i < v.length; ++i) {\n if (!Number.isFinite(v[i])) {\n return false;\n }\n }\n return true;\n}\n\nexport function checkNumber(value) {\n if (!Number.isFinite(value)) {\n throw new Error(`Invalid number ${value}`);\n }\n return value;\n}\n\nexport function checkVector(v, length, callerName = '') {\n if (config.debug && !validateVector(v, length)) {\n throw new Error(`math.gl: ${callerName} some fields set to invalid numbers'`);\n }\n return v;\n}\n\nconst map = {};\n\nexport function deprecated(method, version) {\n if (!map[method]) {\n map[method] = true;\n // eslint-disable-next-line\n console.warn(\n `${method} has been removed in version ${version}, see upgrade guide for more information`\n );\n }\n}\n","import * as glMatrix from \"./common.js\";\nimport * as mat3 from \"./mat3.js\";\nimport * as vec3 from \"./vec3.js\";\nimport * as vec4 from \"./vec4.js\";\n/**\r\n * Quaternion\r\n * @module quat\r\n */\n\n/**\r\n * Creates a new identity quat\r\n *\r\n * @returns {quat} a new quaternion\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n out[3] = 1;\n return out;\n}\n/**\r\n * Set a quat to the identity quaternion\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @returns {quat} out\r\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\r\n * Sets a quat from the given angle and rotation axis,\r\n * then returns it.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {vec3} axis the axis around which to rotate\r\n * @param {Number} rad the angle in radians\r\n * @returns {quat} out\r\n **/\n\nexport function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n/**\r\n * Gets the rotation axis and angle for a given\r\n * quaternion. If a quaternion is created with\r\n * setAxisAngle, this method will return the same\r\n * values as providied in the original parameter list\r\n * OR functionally equivalent values.\r\n * Example: The quaternion formed by axis [0, 0, 1] and\r\n * angle -90 is the same as the quaternion formed by\r\n * [0, 0, 1] and 270. This method favors the latter.\r\n * @param {vec3} out_axis Vector receiving the axis of rotation\r\n * @param {quat} q Quaternion to be decomposed\r\n * @return {Number} Angle, in radians, of the rotation\r\n */\n\nexport function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n\n return rad;\n}\n/**\r\n * Gets the angular distance between two unit quaternions\r\n *\r\n * @param {quat} a Origin unit quaternion\r\n * @param {quat} b Destination unit quaternion\r\n * @return {Number} Angle, in radians, between the two quaternions\r\n */\n\nexport function getAngle(a, b) {\n var dotproduct = dot(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n/**\r\n * Multiplies two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @returns {quat} out\r\n */\n\nexport function multiply(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the X axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {quat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the Y axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {quat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var by = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the Z axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {quat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bz = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n/**\r\n * Calculates the W component of a quat from the X, Y, and Z components.\r\n * Assumes that quaternion is 1 unit in length.\r\n * Any existing W component will be ignored.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate W component of\r\n * @returns {quat} out\r\n */\n\nexport function calculateW(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n/**\r\n * Calculate the exponential of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate the exponential of\r\n * @returns {quat} out\r\n */\n\nexport function exp(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\n/**\r\n * Calculate the natural logarithm of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate the exponential of\r\n * @returns {quat} out\r\n */\n\nexport function ln(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\n/**\r\n * Calculate the scalar power of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate the exponential of\r\n * @param {Number} b amount to scale the quaternion by\r\n * @returns {quat} out\r\n */\n\nexport function pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n/**\r\n * Performs a spherical linear interpolation between two quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\nexport function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n\n\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\n/**\r\n * Generates a random unit quaternion\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @returns {quat} out\r\n */\n\nexport function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\n/**\r\n * Calculates the inverse of a quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate inverse of\r\n * @returns {quat} out\r\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n/**\r\n * Calculates the conjugate of a quat\r\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quat to calculate conjugate of\r\n * @returns {quat} out\r\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Creates a quaternion from the given 3x3 rotation matrix.\r\n *\r\n * NOTE: The resultant quaternion is not normalized, so you should be sure\r\n * to renormalize the quaternion yourself where necessary.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {mat3} m rotation matrix\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n\n return out;\n}\n/**\r\n * Creates a quaternion from the given euler angle x, y, z.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {x} Angle to rotate around X axis in degrees.\r\n * @param {y} Angle to rotate around Y axis in degrees.\r\n * @param {z} Angle to rotate around Z axis in degrees.\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport function fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n}\n/**\r\n * Returns a string representation of a quatenion\r\n *\r\n * @param {quat} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\r\n * Creates a new quat initialized with values from an existing quaternion\r\n *\r\n * @param {quat} a quaternion to clone\r\n * @returns {quat} a new quaternion\r\n * @function\r\n */\n\nexport var clone = vec4.clone;\n/**\r\n * Creates a new quat initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {quat} a new quaternion\r\n * @function\r\n */\n\nexport var fromValues = vec4.fromValues;\n/**\r\n * Copy the values from one quat to another\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the source quaternion\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var copy = vec4.copy;\n/**\r\n * Set the components of a quat to the given values\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var set = vec4.set;\n/**\r\n * Adds two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var add = vec4.add;\n/**\r\n * Alias for {@link quat.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Scales a quat by a scalar number\r\n *\r\n * @param {quat} out the receiving vector\r\n * @param {quat} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var scale = vec4.scale;\n/**\r\n * Calculates the dot product of two quat's\r\n *\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @returns {Number} dot product of a and b\r\n * @function\r\n */\n\nexport var dot = vec4.dot;\n/**\r\n * Performs a linear interpolation between two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var lerp = vec4.lerp;\n/**\r\n * Calculates the length of a quat\r\n *\r\n * @param {quat} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport var length = vec4.length;\n/**\r\n * Alias for {@link quat.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Calculates the squared length of a quat\r\n *\r\n * @param {quat} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n * @function\r\n */\n\nexport var squaredLength = vec4.squaredLength;\n/**\r\n * Alias for {@link quat.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Normalize a quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a quaternion to normalize\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var normalize = vec4.normalize;\n/**\r\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {quat} a The first quaternion.\r\n * @param {quat} b The second quaternion.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport var exactEquals = vec4.exactEquals;\n/**\r\n * Returns whether or not the quaternions have approximately the same elements in the same position.\r\n *\r\n * @param {quat} a The first vector.\r\n * @param {quat} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport var equals = vec4.equals;\n/**\r\n * Sets a quaternion to represent the shortest rotation from one\r\n * vector to another.\r\n *\r\n * Both vectors are assumed to be unit length.\r\n *\r\n * @param {quat} out the receiving quaternion.\r\n * @param {vec3} a the initial vector\r\n * @param {vec3} b the destination vector\r\n * @returns {quat} out\r\n */\n\nexport var rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n }\n };\n}();\n/**\r\n * Performs a spherical linear interpolation with two control points\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {quat} a the first operand\r\n * @param {quat} b the second operand\r\n * @param {quat} c the third operand\r\n * @param {quat} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\nexport var sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\n/**\r\n * Sets the specified quaternion with values corresponding to the given\r\n * axes. Each axis is a vec3 and is expected to be unit length and\r\n * perpendicular to all other specified axes.\r\n *\r\n * @param {vec3} view the vector representing the viewing direction\r\n * @param {vec3} right the vector representing the local \"right\" direction\r\n * @param {vec3} up the vector representing the local \"up\" direction\r\n * @returns {quat} out\r\n */\n\nexport var setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return normalize(out, fromMat3(out, matr));\n };\n}();","import {projectPosition} from '../../shaderlib/project/project-functions';\nimport {COORDINATE_SYSTEM} from '../../lib';\n\nconst DEFAULT_LIGHT_COLOR = [255, 255, 255];\nconst DEFAULT_LIGHT_INTENSITY = 1.0;\nconst DEFAULT_ATTENUATION = [0, 0, 1];\nconst DEFAULT_LIGHT_POSITION = [0.0, 0.0, 1.0];\n\nlet idCount = 0;\n\nexport class PointLight {\n constructor(props = {}) {\n const {color = DEFAULT_LIGHT_COLOR} = props;\n const {intensity = DEFAULT_LIGHT_INTENSITY} = props;\n const {position = DEFAULT_LIGHT_POSITION} = props;\n\n this.id = props.id || `point-${idCount++}`;\n this.color = color;\n this.intensity = intensity;\n this.type = 'point';\n this.position = position;\n this.attenuation = getAttenuation(props);\n this.projectedLight = {...this};\n }\n\n getProjectedLight({layer}) {\n const {projectedLight} = this;\n const viewport = layer.context.viewport;\n const {coordinateSystem, coordinateOrigin} = layer.props;\n const position = projectPosition(this.position, {\n viewport,\n coordinateSystem,\n coordinateOrigin,\n fromCoordinateSystem: viewport.isGeospatial\n ? COORDINATE_SYSTEM.LNGLAT\n : COORDINATE_SYSTEM.CARTESIAN,\n fromCoordinateOrigin: [0, 0, 0]\n });\n projectedLight.color = this.color;\n projectedLight.intensity = this.intensity;\n projectedLight.position = position;\n return projectedLight;\n }\n}\n\nfunction getAttenuation(props) {\n if ('attenuation' in props) {\n return props.attenuation;\n }\n if ('intensity' in props) {\n return [0, 0, props.intensity];\n }\n return DEFAULT_ATTENUATION;\n}\n","import {PointLight} from './point-light';\nimport {getUniformsFromViewport} from '../../shaderlib/project/viewport-uniforms';\n\nexport default class CameraLight extends PointLight {\n getProjectedLight({layer}) {\n const {projectedLight} = this;\n const viewport = layer.context.viewport;\n const {coordinateSystem, coordinateOrigin, modelMatrix} = layer.props;\n const {project_uCameraPosition} = getUniformsFromViewport({\n viewport,\n modelMatrix,\n coordinateSystem,\n coordinateOrigin\n });\n projectedLight.color = this.color;\n projectedLight.intensity = this.intensity;\n projectedLight.position = project_uCameraPosition;\n return projectedLight;\n }\n}\n","// sun position calculations are based on http://aa.quae.nl/en/reken/zonpositie.html formulas\n// and inspired by https://github.com/mourner/suncalc/blob/master/suncalc.js\nconst DEGREES_TO_RADIANS = Math.PI / 180;\n\nconst DAY_IN_MS = 1000 * 60 * 60 * 24;\nconst JD1970 = 2440588; // Julian Day year 1970\nconst JD2000 = 2451545; // Julian Day year 2000\n\n// This angle ε [epsilon] is called the obliquity of the ecliptic and its value at the beginning of 2000 was 23.4397°\nconst e = DEGREES_TO_RADIANS * 23.4397; // obliquity of the Earth\n\n// Refer https://www.aa.quae.nl/en/reken/zonpositie.html\n// \"The Mean Anomaly\" section for explanation\nconst M0 = 357.5291; // Earth mean anomaly on start day\nconst M1 = 0.98560028; // Earth angle traverses on average per day seen from the sun\n\nconst THETA0 = 280.147; // The sidereal time (in degrees) at longitude 0° at the instant defined by JD2000\nconst THETA1 = 360.9856235; // The rate of change of the sidereal time, in degrees per day.\n\nexport function getSolarPosition(timestamp, latitude, longitude) {\n const longitudeWestInRadians = DEGREES_TO_RADIANS * -longitude;\n const phi = DEGREES_TO_RADIANS * latitude;\n const d = toDays(timestamp);\n\n const c = getSunCoords(d);\n // hour angle\n const H = getSiderealTime(d, longitudeWestInRadians) - c.rightAscension;\n\n // https://www.aa.quae.nl/en/reken/zonpositie.html\n // The altitude is 0° at the horizon, +90° in the zenith (straight over your head), and −90° in the nadir (straight down).\n // The azimuth is the direction along the horizon, which we measure from south to west.\n // South has azimuth 0°, west +90°, north +180°, and east +270° (or −90°, that's the same thing).\n return {\n azimuth: getAzimuth(H, phi, c.declination),\n altitude: getAltitude(H, phi, c.declination)\n };\n}\n\nexport function getSunlightDirection(timestamp, latitude, longitude) {\n const {azimuth, altitude} = getSolarPosition(timestamp, latitude, longitude);\n\n // solar position to light direction\n return [\n Math.sin(azimuth) * Math.cos(altitude),\n Math.cos(azimuth) * Math.cos(altitude),\n -Math.sin(altitude)\n ];\n}\n\nfunction toJulianDay(timestamp) {\n return timestamp / DAY_IN_MS - 0.5 + JD1970;\n}\n\nfunction toDays(timestamp) {\n return toJulianDay(timestamp) - JD2000;\n}\n\nfunction getRightAscension(eclipticLongitude, b) {\n const lambda = eclipticLongitude;\n return Math.atan2(Math.sin(lambda) * Math.cos(e) - Math.tan(b) * Math.sin(e), Math.cos(lambda));\n}\n\nfunction getDeclination(eclipticLongitude, b) {\n const lambda = eclipticLongitude;\n return Math.asin(Math.sin(b) * Math.cos(e) + Math.cos(b) * Math.sin(e) * Math.sin(lambda));\n}\n\nfunction getAzimuth(hourAngle, latitudeInRadians, declination) {\n const H = hourAngle;\n const phi = latitudeInRadians;\n const delta = declination;\n return Math.atan2(Math.sin(H), Math.cos(H) * Math.sin(phi) - Math.tan(delta) * Math.cos(phi));\n}\n\nfunction getAltitude(hourAngle, latitudeInRadians, declination) {\n const H = hourAngle;\n const phi = latitudeInRadians;\n const delta = declination;\n return Math.asin(Math.sin(phi) * Math.sin(delta) + Math.cos(phi) * Math.cos(delta) * Math.cos(H));\n}\n\n// https://www.aa.quae.nl/en/reken/zonpositie.html\n// \"The Observer section\"\nfunction getSiderealTime(dates, longitudeWestInRadians) {\n return DEGREES_TO_RADIANS * (THETA0 + THETA1 * dates) - longitudeWestInRadians;\n}\n\nfunction getSolarMeanAnomaly(days) {\n return DEGREES_TO_RADIANS * (M0 + M1 * days);\n}\n\nfunction getEclipticLongitude(meanAnomaly) {\n const M = meanAnomaly;\n // equation of center\n const C =\n DEGREES_TO_RADIANS * (1.9148 * Math.sin(M) + 0.02 * Math.sin(2 * M) + 0.0003 * Math.sin(3 * M));\n // perihelion of the Earth\n const P = DEGREES_TO_RADIANS * 102.9372;\n\n return M + C + P + Math.PI;\n}\n\nfunction getSunCoords(dates) {\n const M = getSolarMeanAnomaly(dates);\n const L = getEclipticLongitude(M);\n\n return {\n declination: getDeclination(L, 0),\n rightAscension: getRightAscension(L, 0)\n };\n}\n","import {DirectionalLight} from './directional-light';\nimport {getSunlightDirection} from './suncalc';\n\nexport default class SunLight extends DirectionalLight {\n constructor({timestamp, ...others}) {\n super(others);\n\n this.timestamp = timestamp;\n }\n\n getProjectedLight({layer}) {\n const {viewport} = layer.context;\n const isGlobe = viewport.resolution > 0;\n\n if (isGlobe) {\n // Rotate vector to align with the direction of the globe projection (up at lon:0,lat:0 is [0, -1, 0])\n const [x, y, z] = getSunlightDirection(this.timestamp, 0, 0);\n this.direction = [x, -z, y];\n } else {\n const {latitude, longitude} = viewport;\n this.direction = getSunlightDirection(this.timestamp, latitude, longitude);\n }\n\n return this;\n }\n}\n","//\n// A base render pass.\n//\n// Attribution: This class and the multipass system were inspired by\n// the THREE.js EffectComposer and *Pass classes\n\nimport {ClipSpace, setParameters, withParameters, clear} from '@luma.gl/core';\nimport Pass from './pass';\n\nexport default class ScreenPass extends Pass {\n constructor(gl, props = {}) {\n super(gl, props);\n const {module, fs, id} = props;\n this.model = new ClipSpace(gl, {id, fs, modules: [module]});\n }\n\n render(params) {\n const gl = this.gl;\n\n setParameters(gl, {viewport: [0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight]});\n\n withParameters(gl, {framebuffer: params.outputBuffer, clearColor: [0, 0, 0, 0]}, () =>\n this._renderPass(gl, params)\n );\n }\n\n delete() {\n this.model.delete();\n this.model = null;\n }\n\n // Private methods\n\n /**\n * Renders the pass.\n * This is an abstract method that should be overridden.\n * @param {Framebuffer} inputBuffer - Frame buffer that contains the result of the previous pass\n * @param {Framebuffer} outputBuffer - Frame buffer that serves as the output render target\n */\n _renderPass(gl, {inputBuffer, outputBuffer}) {\n clear(gl, {color: true});\n this.model.draw({\n moduleSettings: this.props.moduleSettings,\n uniforms: {\n texture: inputBuffer,\n texSize: [inputBuffer.width, inputBuffer.height]\n },\n parameters: {\n depthWrite: false,\n depthTest: false\n }\n });\n }\n}\n","import Effect from '../lib/effect';\nimport ScreenPass from '../passes/screen-pass';\nimport {normalizeShaderModule} from '@luma.gl/core';\n\nexport default class PostProcessEffect extends Effect {\n constructor(module, props = {}) {\n super(props);\n this.id = `${module.name}-pass`;\n normalizeShaderModule(module);\n this.module = module;\n }\n\n postRender(gl, params) {\n if (!this.passes) {\n this.passes = createPasses(gl, this.module, this.id, this.props);\n }\n\n const {target} = params;\n let inputBuffer = params.inputBuffer;\n let outputBuffer = params.swapBuffer;\n\n for (let index = 0; index < this.passes.length; index++) {\n if (target && index === this.passes.length - 1) {\n outputBuffer = target;\n }\n this.passes[index].render({inputBuffer, outputBuffer});\n const switchBuffer = outputBuffer;\n outputBuffer = inputBuffer;\n inputBuffer = switchBuffer;\n }\n return inputBuffer;\n }\n\n cleanup() {\n if (this.passes) {\n for (const pass of this.passes) {\n pass.delete();\n }\n this.passes = null;\n }\n }\n}\n\nfunction createPasses(gl, module, id, moduleSettings) {\n if (module.filter || module.sampler) {\n const fs = getFragmentShaderForRenderPass(module);\n const pass = new ScreenPass(gl, {\n id,\n module,\n fs,\n moduleSettings\n });\n return [pass];\n }\n\n const passes = module.passes || [];\n return passes.map((pass, index) => {\n const fs = getFragmentShaderForRenderPass(module, pass);\n const idn = `${id}-${index}`;\n\n return new ScreenPass(gl, {\n id: idn,\n module,\n fs,\n moduleSettings\n });\n });\n}\n\nconst FILTER_FS_TEMPLATE = func => `\\\nuniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n vec2 texCoord = coordinate;\n\n gl_FragColor = texture2D(texture, texCoord);\n gl_FragColor = ${func}(gl_FragColor, texSize, texCoord);\n}\n`;\n\nconst SAMPLER_FS_TEMPLATE = func => `\\\nuniform sampler2D texture;\nuniform vec2 texSize;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main() {\n vec2 texCoord = coordinate;\n\n gl_FragColor = ${func}(texture, texSize, texCoord);\n}\n`;\n\nfunction getFragmentShaderForRenderPass(module, pass = module) {\n if (pass.filter) {\n const func = typeof pass.filter === 'string' ? pass.filter : `${module.name}_filterColor`;\n return FILTER_FS_TEMPLATE(func);\n }\n\n if (pass.sampler) {\n const func = typeof pass.sampler === 'string' ? pass.sampler : `${module.name}_sampleColor`;\n return SAMPLER_FS_TEMPLATE(func);\n }\n\n // console.error(`${module.name} no fragment shader generated`);\n return null;\n}\n","import {Matrix4} from 'math.gl';\nimport Viewport from './viewport';\nimport {PROJECTION_MODE} from '../lib/constants';\n\nimport * as vec3 from 'gl-matrix/vec3';\nimport * as vec4 from 'gl-matrix/vec4';\n\nconst DEGREES_TO_RADIANS = Math.PI / 180;\nconst RADIANS_TO_DEGREES = 180 / Math.PI;\nconst EARTH_RADIUS = 6370972;\nconst GLOBE_RADIUS = 256;\n\nfunction getDistanceScales() {\n const unitsPerMeter = GLOBE_RADIUS / EARTH_RADIUS;\n const unitsPerDegree = (Math.PI / 180) * GLOBE_RADIUS;\n\n return {\n unitsPerMeter: [unitsPerMeter, unitsPerMeter, unitsPerMeter],\n unitsPerMeter2: [0, 0, 0],\n metersPerUnit: [1 / unitsPerMeter, 1 / unitsPerMeter, 1 / unitsPerMeter],\n unitsPerDegree: [unitsPerDegree, unitsPerDegree, unitsPerMeter],\n unitsPerDegree2: [0, 0, 0],\n degreesPerUnit: [1 / unitsPerDegree, 1 / unitsPerDegree, 1 / unitsPerMeter]\n };\n}\n\nexport default class GlobeViewport extends Viewport {\n constructor(opts = {}) {\n const {\n latitude = 0,\n longitude = 0,\n zoom = 11,\n nearZMultiplier = 0.1,\n farZMultiplier = 2,\n resolution = 10\n } = opts;\n\n let {width, height, altitude = 1.5} = opts;\n\n width = width || 1;\n height = height || 1;\n altitude = Math.max(0.75, altitude);\n\n // Calculate view matrix\n const viewMatrix = new Matrix4().lookAt({eye: [0, -altitude, 0], up: [0, 0, 1]});\n const scale = Math.pow(2, zoom);\n viewMatrix.rotateX(latitude * DEGREES_TO_RADIANS);\n viewMatrix.rotateZ(-longitude * DEGREES_TO_RADIANS);\n viewMatrix.scale(scale / height);\n\n const halfFov = Math.atan(0.5 / altitude);\n const relativeScale = (GLOBE_RADIUS * 2 * scale) / height;\n\n super({\n ...opts,\n // x, y,\n width,\n height,\n\n // view matrix\n viewMatrix,\n longitude,\n latitude,\n zoom,\n\n // projection matrix parameters\n fovyRadians: halfFov * 2,\n aspect: width / height,\n focalDistance: altitude,\n near: nearZMultiplier,\n far: Math.min(2, 1 / relativeScale + 1) * altitude * farZMultiplier\n });\n\n this.resolution = resolution;\n this.distanceScales = getDistanceScales();\n }\n\n get projectionMode() {\n return PROJECTION_MODE.GLOBE;\n }\n\n getDistanceScales() {\n return this.distanceScales;\n }\n\n getBounds(options = {}) {\n const unprojectOption = {targetZ: options.z || 0};\n\n const left = this.unproject([0, this.height / 2], unprojectOption);\n const top = this.unproject([this.width / 2, 0], unprojectOption);\n const right = this.unproject([this.width, this.height / 2], unprojectOption);\n const bottom = this.unproject([this.width / 2, this.height], unprojectOption);\n\n if (right[0] < this.longitude) right[0] += 360;\n if (left[0] > this.longitude) left[0] -= 360;\n\n return [\n Math.min(left[0], right[0], top[0], bottom[0]),\n Math.min(left[1], right[1], top[1], bottom[1]),\n Math.max(left[0], right[0], top[0], bottom[0]),\n Math.max(left[1], right[1], top[1], bottom[1])\n ];\n }\n\n unproject(xyz, {topLeft = true, targetZ} = {}) {\n const [x, y, z] = xyz;\n\n const y2 = topLeft ? y : this.height - y;\n const {pixelUnprojectionMatrix} = this;\n\n let coord;\n if (Number.isFinite(z)) {\n // Has depth component\n coord = transformVector(pixelUnprojectionMatrix, [x, y2, z, 1]);\n } else {\n // since we don't know the correct projected z value for the point,\n // unproject two points to get a line and then find the point on that line that intersects with the sphere\n const coord0 = transformVector(pixelUnprojectionMatrix, [x, y2, -1, 1]);\n const coord1 = transformVector(pixelUnprojectionMatrix, [x, y2, 1, 1]);\n\n const lt = ((targetZ || 0) / EARTH_RADIUS + 1) * GLOBE_RADIUS;\n const lSqr = vec3.sqrLen(vec3.sub([], coord0, coord1));\n const l0Sqr = vec3.sqrLen(coord0);\n const l1Sqr = vec3.sqrLen(coord1);\n const sSqr = (4 * l0Sqr * l1Sqr - (lSqr - l0Sqr - l1Sqr) ** 2) / 16;\n const dSqr = (4 * sSqr) / lSqr;\n const r0 = Math.sqrt(l0Sqr - dSqr);\n const dr = Math.sqrt(Math.max(0, lt * lt - dSqr));\n const t = (r0 - dr) / Math.sqrt(lSqr);\n\n coord = vec3.lerp([], coord0, coord1, t);\n }\n const [X, Y, Z] = this.unprojectPosition(coord);\n\n if (Number.isFinite(z)) {\n return [X, Y, Z];\n }\n return Number.isFinite(targetZ) ? [X, Y, targetZ] : [X, Y];\n }\n\n projectPosition(xyz) {\n const [lng, lat, Z = 0] = xyz;\n const lambda = lng * DEGREES_TO_RADIANS;\n const phi = lat * DEGREES_TO_RADIANS;\n const cosPhi = Math.cos(phi);\n const D = (Z / EARTH_RADIUS + 1) * GLOBE_RADIUS;\n\n return [Math.sin(lambda) * cosPhi * D, -Math.cos(lambda) * cosPhi * D, Math.sin(phi) * D];\n }\n\n unprojectPosition(xyz) {\n const [x, y, z] = xyz;\n const D = vec3.len(xyz);\n const phi = Math.asin(z / D);\n const lambda = Math.atan2(x, -y);\n\n const lng = lambda * RADIANS_TO_DEGREES;\n const lat = phi * RADIANS_TO_DEGREES;\n const Z = (D / GLOBE_RADIUS - 1) * EARTH_RADIUS;\n return [lng, lat, Z];\n }\n\n projectFlat(xyz) {\n return xyz;\n }\n\n unprojectFlat(xyz) {\n return xyz;\n }\n\n panByPosition(coords, pixel) {\n const fromPosition = this.unproject(pixel);\n return {\n longitude: coords[0] - fromPosition[0] + this.longitude,\n latitude: coords[1] - fromPosition[1] + this.latitude\n };\n }\n}\n\nfunction transformVector(matrix, vector) {\n const result = vec4.transformMat4([], vector, matrix);\n vec4.scale(result, result, 1 / result[3]);\n return result;\n}\n","import Controller from './controller';\nimport ViewState from './view-state';\nimport {mod} from '../utils/math-utils';\n\nimport {Vector3, _SphericalCoordinates as SphericalCoordinates, clamp} from 'math.gl';\n\nconst MOVEMENT_SPEED = 20;\nconst DEFAULT_STATE = {\n position: [0, 0, 0],\n pitch: 0,\n bearing: 0,\n maxPitch: 90,\n minPitch: -90\n};\n\nclass FirstPersonState extends ViewState {\n constructor({\n /* Viewport arguments */\n width, // Width of viewport\n height, // Height of viewport\n\n // Position and orientation\n position = DEFAULT_STATE.position, // typically in meters from anchor point\n\n bearing = DEFAULT_STATE.bearing, // Rotation around y axis\n pitch = DEFAULT_STATE.pitch, // Rotation around x axis\n\n // Geospatial anchor\n longitude,\n latitude,\n\n maxPitch = DEFAULT_STATE.maxPitch,\n minPitch = DEFAULT_STATE.minPitch,\n\n // Model state when the rotate operation first started\n startRotatePos,\n startBearing,\n startPitch,\n startZoomPosition,\n startZoom\n }) {\n super({\n width,\n height,\n position,\n bearing,\n pitch,\n longitude,\n latitude,\n maxPitch,\n minPitch\n });\n\n this._state = {\n startRotatePos,\n startBearing,\n startPitch,\n startZoomPosition,\n startZoom\n };\n }\n\n /* Public API */\n\n getDirection(use2D = false) {\n const spherical = new SphericalCoordinates({\n bearing: this._viewportProps.bearing,\n pitch: use2D ? 90 : 90 + this._viewportProps.pitch\n });\n const direction = spherical.toVector3().normalize();\n return direction;\n }\n\n /**\n * Start panning\n * @param {[Number, Number]} pos - position on screen where the pointer grabs\n */\n panStart() {\n return this;\n }\n\n /**\n * Pan\n * @param {[Number, Number]} pos - position on screen where the pointer is\n */\n pan() {\n return this;\n }\n\n /**\n * End panning\n * Must call if `panStart()` was called\n */\n panEnd() {\n return this;\n }\n\n /**\n * Start rotating\n * @param {[Number, Number]} pos - position on screen where the pointer grabs\n */\n rotateStart({pos}) {\n return this._getUpdatedState({\n startRotatePos: pos,\n startBearing: this._viewportProps.bearing,\n startPitch: this._viewportProps.pitch\n });\n }\n\n /**\n * Rotate\n * @param {[Number, Number]} pos - position on screen where the pointer is\n */\n rotate({pos, deltaAngleX = 0, deltaAngleY = 0}) {\n const {startRotatePos, startBearing, startPitch} = this._state;\n const {width, height} = this._viewportProps;\n\n if (!startRotatePos || !Number.isFinite(startBearing) || !Number.isFinite(startPitch)) {\n return this;\n }\n\n let newRotation;\n if (pos) {\n const deltaScaleX = (pos[0] - startRotatePos[0]) / width;\n const deltaScaleY = (pos[1] - startRotatePos[1]) / height;\n newRotation = {\n bearing: startBearing - deltaScaleX * 180,\n pitch: startPitch - deltaScaleY * 90\n };\n } else {\n newRotation = {\n bearing: startBearing - deltaAngleX,\n pitch: startPitch - deltaAngleY\n };\n }\n\n return this._getUpdatedState(newRotation);\n }\n\n /**\n * End rotating\n * Must call if `rotateStart()` was called\n */\n rotateEnd() {\n return this._getUpdatedState({\n startRotatePos: null,\n startBearing: null,\n startPitch: null\n });\n }\n\n /**\n * Start zooming\n * @param {[Number, Number]} pos - position on screen where the pointer grabs\n */\n zoomStart() {\n return this._getUpdatedState({\n startZoomPosition: this._viewportProps.position,\n startZoom: this._viewportProps.zoom\n });\n }\n\n /**\n * Zoom\n * @param {[Number, Number]} pos - position on screen where the current center is\n * @param {[Number, Number]} startPos - the center position at\n * the start of the operation. Must be supplied of `zoomStart()` was not called\n * @param {Number} scale - a number between [0, 1] specifying the accumulated\n * relative scale.\n */\n zoom({scale}) {\n let {startZoomPosition} = this._state;\n if (!startZoomPosition) {\n startZoomPosition = this._viewportProps.position;\n }\n\n const direction = this.getDirection();\n return this._move(direction, Math.log2(scale) * MOVEMENT_SPEED, startZoomPosition);\n }\n\n /**\n * End zooming\n * Must call if `zoomStart()` was called\n */\n zoomEnd() {\n return this._getUpdatedState({\n startZoomPosition: null,\n startZoom: null\n });\n }\n\n moveLeft(speed = MOVEMENT_SPEED) {\n const direction = this.getDirection(true);\n return this._move(direction.rotateZ({radians: Math.PI / 2}), speed);\n }\n\n moveRight(speed = MOVEMENT_SPEED) {\n const direction = this.getDirection(true);\n return this._move(direction.rotateZ({radians: -Math.PI / 2}), speed);\n }\n\n // forward\n moveUp(speed = MOVEMENT_SPEED) {\n const direction = this.getDirection(true);\n return this._move(direction, speed);\n }\n\n // backward\n moveDown(speed = MOVEMENT_SPEED) {\n const direction = this.getDirection(true);\n return this._move(direction.negate(), speed);\n }\n\n rotateLeft(speed = 15) {\n return this._getUpdatedState({\n bearing: this._viewportProps.bearing - speed\n });\n }\n\n rotateRight(speed = 15) {\n return this._getUpdatedState({\n bearing: this._viewportProps.bearing + speed\n });\n }\n\n rotateUp(speed = 10) {\n return this._getUpdatedState({\n pitch: this._viewportProps.pitch + speed\n });\n }\n\n rotateDown(speed = 10) {\n return this._getUpdatedState({\n pitch: this._viewportProps.pitch - speed\n });\n }\n\n zoomIn(speed = 2) {\n return this.zoom({scale: speed});\n }\n\n zoomOut(speed = 2) {\n return this.zoom({scale: 1 / speed});\n }\n\n // shortest path between two view states\n shortestPathFrom(viewState) {\n const fromProps = viewState.getViewportProps();\n const props = {...this._viewportProps};\n const {bearing, longitude} = props;\n\n if (Math.abs(bearing - fromProps.bearing) > 180) {\n props.bearing = bearing < 0 ? bearing + 360 : bearing - 360;\n }\n if (Math.abs(longitude - fromProps.longitude) > 180) {\n props.longitude = longitude < 0 ? longitude + 360 : longitude - 360;\n }\n return props;\n }\n\n /* Private methods */\n _move(direction, speed, fromPosition = this._viewportProps.position) {\n const delta = direction.scale(speed);\n return this._getUpdatedState({\n position: new Vector3(fromPosition).add(delta)\n });\n }\n\n _getUpdatedState(newProps) {\n // Update _viewportProps\n return new FirstPersonState({...this._viewportProps, ...this._state, ...newProps});\n }\n\n // Apply any constraints (mathematical or defined by _viewportProps) to map state\n _applyConstraints(props) {\n // Ensure pitch and zoom are within specified range\n const {pitch, maxPitch, minPitch, longitude, bearing} = props;\n props.pitch = clamp(pitch, minPitch, maxPitch);\n\n // Normalize degrees\n if (longitude < -180 || longitude > 180) {\n props.longitude = mod(longitude + 180, 360) - 180;\n }\n if (bearing < -180 || bearing > 180) {\n props.bearing = mod(bearing + 180, 360) - 180;\n }\n\n return props;\n }\n}\n\nexport default class FirstPersonController extends Controller {\n constructor(props) {\n super(FirstPersonState, props);\n }\n\n get linearTransitionProps() {\n return ['position', 'pitch', 'bearing'];\n }\n}\n","import View from './view';\nimport Viewport from '../viewports/viewport';\nimport {getMeterZoom} from '@math.gl/web-mercator';\nimport {Matrix4, _SphericalCoordinates as SphericalCoordinates} from 'math.gl';\nimport FirstPersonController from '../controllers/first-person-controller';\n\nfunction getDirectionFromBearingAndPitch({bearing, pitch}) {\n const spherical = new SphericalCoordinates({bearing, pitch});\n const direction = spherical.toVector3().normalize();\n return direction;\n}\n\nclass FirstPersonViewport extends Viewport {\n constructor(props) {\n // TODO - push direction handling into Matrix4.lookAt\n const {\n // view matrix arguments\n modelMatrix = null,\n bearing = 0,\n pitch = 0,\n up = [0, 0, 1] // Defines up direction, default positive z axis,\n } = props;\n\n // Always calculate direction from bearing and pitch\n const dir = getDirectionFromBearingAndPitch({\n bearing,\n // Avoid \"pixel project matrix not invertible\" error\n pitch: pitch === -90 ? 0.0001 : 90 + pitch\n });\n\n // Direction is relative to model coordinates, of course\n const center = modelMatrix ? modelMatrix.transformDirection(dir) : dir;\n\n // Just the direction. All the positioning is done in viewport.js\n const zoom = getMeterZoom(props);\n const scale = Math.pow(2, zoom);\n const viewMatrix = new Matrix4().lookAt({eye: [0, 0, 0], center, up}).scale(scale);\n\n super({\n ...props,\n zoom,\n viewMatrix\n });\n }\n}\n\nexport default class FirstPersonView extends View {\n constructor(props) {\n super({\n ...props,\n type: FirstPersonViewport\n });\n }\n\n get controller() {\n return this._getControllerProps({\n type: FirstPersonController\n });\n }\n}\n\nFirstPersonView.displayName = 'FirstPersonView';\n","import {clamp} from 'math.gl';\nimport Controller from './controller';\n\nimport {MapState} from './map-controller';\nimport {mod} from '../utils/math-utils';\n\nclass GlobeState extends MapState {\n // Apply any constraints (mathematical or defined by _viewportProps) to map state\n _applyConstraints(props) {\n // Ensure zoom is within specified range\n const {maxZoom, minZoom, zoom} = props;\n props.zoom = clamp(zoom, minZoom, maxZoom);\n\n const {longitude, latitude} = props;\n if (longitude < -180 || longitude > 180) {\n props.longitude = mod(longitude + 180, 360) - 180;\n }\n props.latitude = clamp(latitude, -89, 89);\n\n return props;\n }\n}\n\nexport default class GlobeController extends Controller {\n constructor(props) {\n props.dragMode = props.dragMode || 'pan';\n super(GlobeState, props);\n }\n\n setProps(props) {\n super.setProps(props);\n\n // TODO - support pitching?\n this.dragRotate = false;\n this.touchRotate = false;\n }\n\n get linearTransitionProps() {\n return ['longitude', 'latitude', 'zoom'];\n }\n}\n","import View from './view';\nimport GlobeViewport from '../viewports/globe-viewport';\nimport GlobeController from '../controllers/globe-controller';\n\nexport default class GlobeView extends View {\n constructor(props) {\n super({...props, type: GlobeViewport});\n }\n\n get controller() {\n return this._getControllerProps({\n type: GlobeController\n });\n }\n}\n\nGlobeView.displayName = 'GlobeView';\n","import TransitionInterpolator from './transition-interpolator';\nimport {lerp} from 'math.gl';\n\nimport {flyToViewport, getFlyToDuration} from '@math.gl/web-mercator';\n\nconst LINEARLY_INTERPOLATED_PROPS = ['bearing', 'pitch'];\nconst DEFAULT_OPTS = {\n speed: 1.2,\n curve: 1.414\n // screenSpeed and maxDuration are used only if specified\n};\n\n/**\n * This class adapts mapbox-gl-js Map#flyTo animation so it can be used in\n * react/redux architecture.\n * mapbox-gl-js flyTo : https://www.mapbox.com/mapbox-gl-js/api/#map#flyto.\n * It implements “Smooth and efficient zooming and panning.” algorithm by\n * \"Jarke J. van Wijk and Wim A.A. Nuij\"\n */\nexport default class FlyToInterpolator extends TransitionInterpolator {\n /**\n * @param props {Object}\n - `props.curve` (Number, optional, default: 1.414) - The zooming \"curve\" that will occur along the flight path.\n - `props.speed` (Number, optional, default: 1.2) - The average speed of the animation defined in relation to `options.curve`, it linearly affects the duration, higher speed returns smaller durations and vice versa.\n - `props.screenSpeed` (Number, optional) - The average speed of the animation measured in screenfuls per second. Similar to `opts.speed` it linearly affects the duration, when specified `opts.speed` is ignored.\n - `props.maxDuration` (Number, optional) - Maximum duration in milliseconds, if calculated duration exceeds this value, `0` is returned.\n */\n constructor(props = {}) {\n super({\n compare: ['longitude', 'latitude', 'zoom', 'bearing', 'pitch'],\n extract: ['width', 'height', 'longitude', 'latitude', 'zoom', 'bearing', 'pitch'],\n required: ['width', 'height', 'latitude', 'longitude', 'zoom']\n });\n this.props = {...DEFAULT_OPTS, ...props};\n }\n\n interpolateProps(startProps, endProps, t) {\n const viewport = flyToViewport(startProps, endProps, t, this.props);\n\n // Linearly interpolate 'bearing' and 'pitch'.\n // If pitch/bearing are not supplied, they are interpreted as zeros in viewport calculation\n // (fallback defined in WebMercatorViewport)\n // Because there is no guarantee that the current controller's ViewState normalizes\n // these props, safe guard is needed to avoid generating NaNs\n for (const key of LINEARLY_INTERPOLATED_PROPS) {\n viewport[key] = lerp(startProps[key] || 0, endProps[key] || 0, t);\n }\n\n return viewport;\n }\n\n // computes the transition duration\n getDuration(startProps, endProps) {\n let {transitionDuration} = endProps;\n if (transitionDuration === 'auto') {\n // auto calculate duration based on start and end props\n transitionDuration = getFlyToDuration(startProps, endProps, this.props);\n }\n return transitionDuration;\n }\n}\n","// TILE TYPES\n\nexport const TILE3D_TYPE = {\n COMPOSITE: 'cmpt',\n POINT_CLOUD: 'pnts',\n BATCHED_3D_MODEL: 'b3dm',\n INSTANCED_3D_MODEL: 'i3dm',\n GEOMETRY: 'geom',\n VECTOR: 'vect'\n};\n\nexport const TILE3D_TYPES = Object.keys(TILE3D_TYPE);\n\nexport const MAGIC_ARRAY = {\n BATCHED_MODEL: [98, 51, 100, 109],\n INSTANCED_MODEL: [105, 51, 100, 109],\n POINT_CLOUD: [112, 110, 116, 115],\n COMPOSITE: [99, 109, 112, 116]\n};\n\n// TILE CONSTANTS\nexport const TILE3D_OPTIMIZATION_HINT = {\n NOT_COMPUTED: -1,\n USE_OPTIMIZATION: 1,\n SKIP_OPTIMIZATION: 0\n};\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.min.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word a the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: capitalize(string) expects a string argument.\" : _formatMuiErrorMessage(7));\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","/**\r\n * Common utilities\r\n * @module glMatrix\r\n */\n// Configuration Constants\nexport var EPSILON = 0.000001;\nexport var ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\nexport var RANDOM = Math.random;\n/**\r\n * Sets the type of array used when creating new vectors and matrices\r\n *\r\n * @param {Float32ArrayConstructor | ArrayConstructor} type Array type, such as Float32Array or Array\r\n */\n\nexport function setMatrixArrayType(type) {\n ARRAY_TYPE = type;\n}\nvar degree = Math.PI / 180;\n/**\r\n * Convert Degree To Radian\r\n *\r\n * @param {Number} a Angle in Degrees\r\n */\n\nexport function toRadian(a) {\n return a * degree;\n}\n/**\r\n * Tests whether or not the arguments have approximately the same value, within an absolute\r\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\r\n * than or equal to 1.0, and a relative tolerance is used for larger values)\r\n *\r\n * @param {Number} a The first number to test.\r\n * @param {Number} b The second number to test.\r\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n return Math.abs(a - b) <= EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n}\nif (!Math.hypot) Math.hypot = function () {\n var y = 0,\n i = arguments.length;\n\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n\n return Math.sqrt(y);\n};","import * as glMatrix from \"./common.js\";\n/**\r\n * 4 Dimensional Vector\r\n * @module vec4\r\n */\n\n/**\r\n * Creates a new, empty vec4\r\n *\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec4} a vector to clone\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Copy the values from one vec4 to another\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the source vector\r\n * @returns {vec4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to the given values\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} out\r\n */\n\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Adds two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\r\n * Multiplies two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n/**\r\n * Divides two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to ceil\r\n * @returns {vec4} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to floor\r\n * @returns {vec4} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n/**\r\n * Math.round the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to round\r\n * @returns {vec4} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\n/**\r\n * Scales a vec4 by a scalar number\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec4} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\r\n * Adds two vec4's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec4} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec4's\r\n *\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec4's\r\n *\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Calculates the length of a vec4\r\n *\r\n * @param {ReadonlyVec4} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared length of a vec4\r\n *\r\n * @param {ReadonlyVec4} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Negates the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to negate\r\n * @returns {vec4} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to invert\r\n * @returns {vec4} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n/**\r\n * Normalize a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to normalize\r\n * @returns {vec4} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec4's\r\n *\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n/**\r\n * Returns the cross-product of three vectors in a 4-dimensional space\r\n *\r\n * @param {ReadonlyVec4} result the receiving vector\r\n * @param {ReadonlyVec4} U the first vector\r\n * @param {ReadonlyVec4} V the second vector\r\n * @param {ReadonlyVec4} W the third vector\r\n * @returns {vec4} result\r\n */\n\nexport function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec4} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec4} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n\n var v1, v2, v3, v4;\n var s1, s2;\n\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n/**\r\n * Transforms the vec4 with a mat4.\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n/**\r\n * Transforms the vec4 with a quat\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformQuat(out, a, q) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3]; // calculate quat * vec\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to zero\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @returns {vec4} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec4} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec4} a The first vector.\r\n * @param {ReadonlyVec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec4} a The first vector.\r\n * @param {ReadonlyVec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\r\n * Alias for {@link vec4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec4.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec4.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec4.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec4.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec4.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec4s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n}();","import * as vec4 from 'gl-matrix/vec4';\n\n// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create()\nexport function createMat4() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// Transforms a vec4 with a projection matrix\nexport function transformVector(matrix, vector) {\n const result = vec4.transformMat4([], vector, matrix);\n vec4.scale(result, result, 1 / result[3]);\n return result;\n}\n\nexport function mod(value, divisor) {\n const modulus = value % divisor;\n return modulus < 0 ? divisor + modulus : modulus;\n}\n\nexport function lerp(start, end, step) {\n return step * end + (1 - step) * start;\n}\n\nfunction ieLog2(x) {\n return Math.log(x) * Math.LOG2E;\n}\n// Handle missing log2 in IE 11\nexport const log2 = Math.log2 || ieLog2;\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to translate\r\n * @param {ReadonlyVec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {ReadonlyQuat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslation,\r\n * the returned vector will be the same as the translation vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive translation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslationScale\r\n * with a normalized Quaternion paramter, the returned vector will be\r\n * the same as the scaling vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive scaling factor component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n * of a transformation matrix. If a matrix is built with\r\n * fromRotationTranslation, the returned quaternion will be the\r\n * same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * mat4.translate(dest, origin);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n * mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nexport function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {ReadonlyMat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","import * as glMatrix from \"./common.js\";\n/**\r\n * 2 Dimensional Vector\r\n * @module vec2\r\n */\n\n/**\r\n * Creates a new, empty vec2\r\n *\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec2} a vector to clone\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Copy the values from one vec2 to another\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the source vector\r\n * @returns {vec2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Set the components of a vec2 to the given values\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} out\r\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Adds two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\r\n * Multiplies two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\r\n * Divides two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to ceil\r\n * @returns {vec2} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to floor\r\n * @returns {vec2} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\r\n * Math.round the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to round\r\n * @returns {vec2} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\r\n * Scales a vec2 by a scalar number\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec2} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\r\n * Adds two vec2's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec2} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\r\n * Calculates the length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\r\n * Negates the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to negate\r\n * @returns {vec2} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to invert\r\n * @returns {vec2} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\r\n * Normalize a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to normalize\r\n * @returns {vec2} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\r\n * Computes the cross product of two vec2's\r\n * Note that the cross product must by definition produce a 3D vector\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec2} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2d\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2d} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat3\r\n * 3rd vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat3} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat4\r\n * 3rd vector component is implicitly '0'\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\r\n * Rotate a 2D vector\r\n * @param {vec2} out The receiving vec2\r\n * @param {ReadonlyVec2} a The vec2 point to rotate\r\n * @param {ReadonlyVec2} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec2} out\r\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\r\n * Get the angle between two 2D vectors\r\n * @param {ReadonlyVec2} a The first operand\r\n * @param {ReadonlyVec2} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec2 to zero\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @returns {vec2} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec2} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\r\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\r\n * Alias for {@link vec2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec2.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec2.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec2.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec2s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","import * as glMatrix from \"./common.js\";\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {ReadonlyVec3} a The first operand\r\n * @param {ReadonlyVec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","// Replacement for the external assert method to reduce bundle size\n// Note: We don't use the second \"message\" argument in calling code,\n// so no need to support it here\nexport default function assert(condition, message) {\n if (!condition) {\n throw new Error(message || '@math.gl/web-mercator: assertion failed.');\n }\n}\n","// TODO - THE UTILITIES IN THIS FILE SHOULD BE IMPORTED FROM WEB-MERCATOR-VIEWPORT MODULE\n\nimport {createMat4, transformVector, log2} from './math-utils';\n\nimport * as mat4 from 'gl-matrix/mat4';\nimport * as vec2 from 'gl-matrix/vec2';\nimport * as vec3 from 'gl-matrix/vec3';\nimport assert from './assert';\n\n// CONSTANTS\nconst PI = Math.PI;\nconst PI_4 = PI / 4;\nconst DEGREES_TO_RADIANS = PI / 180;\nconst RADIANS_TO_DEGREES = 180 / PI;\nconst TILE_SIZE = 512;\n// Average circumference (40075 km equatorial, 40007 km meridional)\nconst EARTH_CIRCUMFERENCE = 40.03e6;\n\n// Mapbox default altitude\nexport const DEFAULT_ALTITUDE = 1.5;\n\n/** Util functions **/\nexport function zoomToScale(zoom) {\n return Math.pow(2, zoom);\n}\n\nexport function scaleToZoom(scale) {\n return log2(scale);\n}\n\n/**\n * Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.\n * Performs the nonlinear part of the web mercator projection.\n * Remaining projection is done with 4x4 matrices which also handles\n * perspective.\n *\n * @param lngLat - [lng, lat] coordinates\n * Specifies a point on the sphere to project onto the map.\n * @return [x,y] coordinates.\n */\nexport function lngLatToWorld([lng, lat]) {\n assert(Number.isFinite(lng));\n assert(Number.isFinite(lat) && lat >= -90 && lat <= 90, 'invalid latitude');\n\n const lambda2 = lng * DEGREES_TO_RADIANS;\n const phi2 = lat * DEGREES_TO_RADIANS;\n const x = (TILE_SIZE * (lambda2 + PI)) / (2 * PI);\n const y = (TILE_SIZE * (PI + Math.log(Math.tan(PI_4 + phi2 * 0.5)))) / (2 * PI);\n return [x, y];\n}\n\n// Unproject world point [x,y] on map onto {lat, lon} on sphere\nexport function worldToLngLat([x, y]) {\n const lambda2 = (x / TILE_SIZE) * (2 * PI) - PI;\n const phi2 = 2 * (Math.atan(Math.exp((y / TILE_SIZE) * (2 * PI) - PI)) - PI_4);\n return [lambda2 * RADIANS_TO_DEGREES, phi2 * RADIANS_TO_DEGREES];\n}\n\n// Returns the zoom level that gives a 1 meter pixel at a certain latitude\n// 1 = C*cos(y)/2^z/TILE_SIZE = C*cos(y)/2^(z+9)\nexport function getMeterZoom({latitude}) {\n assert(Number.isFinite(latitude));\n const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);\n return scaleToZoom(EARTH_CIRCUMFERENCE * latCosine) - 9;\n}\n\n/**\n * Calculate distance scales in meters around current lat/lon, both for\n * degrees and pixels.\n * In mercator projection mode, the distance scales vary significantly\n * with latitude.\n */\n\nexport function getDistanceScales({latitude, longitude, highPrecision = false}) {\n assert(Number.isFinite(latitude) && Number.isFinite(longitude));\n\n const result = {};\n const worldSize = TILE_SIZE;\n const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);\n\n /**\n * Number of pixels occupied by one degree longitude around current lat/lon:\n unitsPerDegreeX = d(lngLatToWorld([lng, lat])[0])/d(lng)\n = scale * TILE_SIZE * DEGREES_TO_RADIANS / (2 * PI)\n unitsPerDegreeY = d(lngLatToWorld([lng, lat])[1])/d(lat)\n = -scale * TILE_SIZE * DEGREES_TO_RADIANS / cos(lat * DEGREES_TO_RADIANS) / (2 * PI)\n */\n const unitsPerDegreeX = worldSize / 360;\n const unitsPerDegreeY = unitsPerDegreeX / latCosine;\n\n /**\n * Number of pixels occupied by one meter around current lat/lon:\n */\n const altUnitsPerMeter = worldSize / EARTH_CIRCUMFERENCE / latCosine;\n\n /**\n * LngLat: longitude -> east and latitude -> north (bottom left)\n * UTM meter offset: x -> east and y -> north (bottom left)\n * World space: x -> east and y -> south (top left)\n *\n * Y needs to be flipped when converting delta degree/meter to delta pixels\n */\n result.unitsPerMeter = [altUnitsPerMeter, altUnitsPerMeter, altUnitsPerMeter];\n result.metersPerUnit = [1 / altUnitsPerMeter, 1 / altUnitsPerMeter, 1 / altUnitsPerMeter];\n\n result.unitsPerDegree = [unitsPerDegreeX, unitsPerDegreeY, altUnitsPerMeter];\n result.degreesPerUnit = [1 / unitsPerDegreeX, 1 / unitsPerDegreeY, 1 / altUnitsPerMeter];\n\n /**\n * Taylor series 2nd order for 1/latCosine\n f'(a) * (x - a)\n = d(1/cos(lat * DEGREES_TO_RADIANS))/d(lat) * dLat\n = DEGREES_TO_RADIANS * tan(lat * DEGREES_TO_RADIANS) / cos(lat * DEGREES_TO_RADIANS) * dLat\n */\n if (highPrecision) {\n const latCosine2 = (DEGREES_TO_RADIANS * Math.tan(latitude * DEGREES_TO_RADIANS)) / latCosine;\n const unitsPerDegreeY2 = (unitsPerDegreeX * latCosine2) / 2;\n const altUnitsPerDegree2 = (worldSize / EARTH_CIRCUMFERENCE) * latCosine2;\n const altUnitsPerMeter2 = (altUnitsPerDegree2 / unitsPerDegreeY) * altUnitsPerMeter;\n\n result.unitsPerDegree2 = [0, unitsPerDegreeY2, altUnitsPerDegree2];\n result.unitsPerMeter2 = [altUnitsPerMeter2, 0, altUnitsPerMeter2];\n }\n\n // Main results, used for converting meters to latlng deltas and scaling offsets\n return result;\n}\n\n/**\n * Offset a lng/lat position by meterOffset (northing, easting)\n */\nexport function addMetersToLngLat(lngLatZ, xyz) {\n const [longitude, latitude, z0] = lngLatZ;\n const [x, y, z] = xyz;\n\n const {unitsPerMeter, unitsPerMeter2} = getDistanceScales({\n longitude,\n latitude,\n highPrecision: true\n });\n\n const worldspace = lngLatToWorld(lngLatZ);\n worldspace[0] += x * (unitsPerMeter[0] + unitsPerMeter2[0] * y);\n worldspace[1] += y * (unitsPerMeter[1] + unitsPerMeter2[1] * y);\n\n // @ts-ignore\n const newLngLat = worldToLngLat(worldspace);\n const newZ = (z0 || 0) + (z || 0);\n\n return Number.isFinite(z0) || Number.isFinite(z) ? [newLngLat[0], newLngLat[1], newZ] : newLngLat;\n}\n\n// ATTRIBUTION:\n// view and projection matrix creation is intentionally kept compatible with\n// mapbox-gl's implementation to ensure that seamless interoperation\n// with mapbox and react-map-gl. See: https://github.com/mapbox/mapbox-gl-js\n\nexport function getViewMatrix({\n // Viewport props\n height,\n pitch,\n bearing,\n altitude,\n // Pre-calculated parameters\n scale,\n center = null\n}) {\n // VIEW MATRIX: PROJECTS MERCATOR WORLD COORDINATES\n // Note that mercator world coordinates typically need to be flipped\n //\n // Note: As usual, matrix operation orders should be read in reverse\n // since vectors will be multiplied from the right during transformation\n const vm = createMat4();\n\n // Move camera to altitude (along the pitch & bearing direction)\n mat4.translate(vm, vm, [0, 0, -altitude]);\n\n // Rotate by bearing, and then by pitch (which tilts the view)\n mat4.rotateX(vm, vm, -pitch * DEGREES_TO_RADIANS);\n mat4.rotateZ(vm, vm, bearing * DEGREES_TO_RADIANS);\n\n scale /= height;\n mat4.scale(vm, vm, [scale, scale, scale]);\n\n if (center) {\n mat4.translate(vm, vm, vec3.negate([], center));\n }\n\n return vm;\n}\n\n// PROJECTION MATRIX PARAMETERS\n// Variable fov (in radians)\nexport function getProjectionParameters({\n width,\n height,\n fovy = altitudeToFovy(DEFAULT_ALTITUDE),\n altitude,\n pitch = 0,\n nearZMultiplier = 1,\n farZMultiplier = 1\n}) {\n // For back-compatibility allow field of view to be\n // derived from altitude\n if (altitude !== undefined) {\n fovy = altitudeToFovy(altitude);\n }\n const halfFov = 0.5 * fovy * DEGREES_TO_RADIANS;\n const focalDistance = fovyToAltitude(fovy);\n\n // Find the distance from the center point to the center top\n // in focal distance units using law of sines.\n const pitchRadians = pitch * DEGREES_TO_RADIANS;\n const topHalfSurfaceDistance =\n (Math.sin(halfFov) * focalDistance) /\n Math.sin(Math.min(Math.max(Math.PI / 2 - pitchRadians - halfFov, 0.01), Math.PI - 0.01));\n\n // Calculate z value of the farthest fragment that should be rendered.\n const farZ = Math.sin(pitchRadians) * topHalfSurfaceDistance + focalDistance;\n\n return {\n fov: 2 * halfFov,\n aspect: width / height,\n focalDistance,\n near: nearZMultiplier,\n far: farZ * farZMultiplier\n };\n}\n\n// PROJECTION MATRIX: PROJECTS FROM CAMERA (VIEW) SPACE TO CLIPSPACE\n// To match mapbox's z buffer:\n// <= 0.28 - nearZMultiplier: 0.1, farZmultiplier: 1\n// >= 0.29 - nearZMultiplier: 1 / height, farZMultiplier: 1.01\nexport function getProjectionMatrix({\n width,\n height,\n pitch,\n altitude,\n fovy,\n nearZMultiplier,\n farZMultiplier\n}) {\n const {fov, aspect, near, far} = getProjectionParameters({\n width,\n height,\n altitude,\n fovy,\n pitch,\n nearZMultiplier,\n farZMultiplier\n });\n\n const projectionMatrix = mat4.perspective(\n [],\n fov, // fov in radians\n aspect, // aspect ratio\n near, // near plane\n far // far plane\n );\n\n return projectionMatrix;\n}\n\n// Utility function to calculate the field of view such that\n// the focal distance is equal to the ground distance. This\n// is how mapbox's z fov is calculated\nexport function altitudeToFovy(altitude) {\n return 2 * Math.atan(0.5 / altitude) * RADIANS_TO_DEGREES;\n}\n\nexport function fovyToAltitude(fovy) {\n return 0.5 / Math.tan(0.5 * fovy * DEGREES_TO_RADIANS);\n}\n\n// Project flat coordinates to pixels on screen.\nexport function worldToPixels(xyz, pixelProjectionMatrix) {\n const [x, y, z = 0] = xyz;\n assert(Number.isFinite(x) && Number.isFinite(y) && Number.isFinite(z));\n\n return transformVector(pixelProjectionMatrix, [x, y, z, 1]);\n}\n\n// Unproject pixels on screen to flat coordinates.\nexport function pixelsToWorld(xyz, pixelUnprojectionMatrix, targetZ = 0) {\n const [x, y, z] = xyz;\n assert(Number.isFinite(x) && Number.isFinite(y), 'invalid pixel coordinate');\n\n if (Number.isFinite(z)) {\n // Has depth component\n const coord = transformVector(pixelUnprojectionMatrix, [x, y, z, 1]);\n return coord;\n }\n\n // since we don't know the correct projected z value for the point,\n // unproject two points to get a line and then find the point on that line with z=0\n const coord0 = transformVector(pixelUnprojectionMatrix, [x, y, 0, 1]);\n const coord1 = transformVector(pixelUnprojectionMatrix, [x, y, 1, 1]);\n\n const z0 = coord0[2];\n const z1 = coord1[2];\n\n const t = z0 === z1 ? 0 : ((targetZ || 0) - z0) / (z1 - z0);\n return vec2.lerp([], coord0, coord1, t);\n}\n","// @ts-nocheck TODO padding\nimport WebMercatorViewport from './web-mercator-viewport';\nimport assert from './assert';\nimport {log2} from './math-utils';\n\n// Returns map settings {latitude, longitude, zoom}\n// that will contain the provided corners within the provided width.\n// Only supports non-perspective mode.\n\nexport default function fitBounds({\n width,\n height,\n bounds,\n minExtent = 0, // 0.01 would be about 1000 meters (degree is ~110KM)\n maxZoom = 24, // ~x4,000,000 => About 10 meter extents\n // options\n padding = 0,\n offset = [0, 0]\n}) {\n const [[west, south], [east, north]] = bounds;\n\n if (Number.isFinite(padding)) {\n const p = padding;\n padding = {\n top: p,\n bottom: p,\n left: p,\n right: p\n };\n } else {\n // Make sure all the required properties are set\n assert(\n Number.isFinite(padding.top) &&\n Number.isFinite(padding.bottom) &&\n Number.isFinite(padding.left) &&\n Number.isFinite(padding.right)\n );\n }\n\n const viewport = new WebMercatorViewport({\n width,\n height,\n longitude: 0,\n latitude: 0,\n zoom: 0\n });\n\n const nw = viewport.project([west, north]);\n const se = viewport.project([east, south]);\n\n // width/height on the Web Mercator plane\n const size = [\n Math.max(Math.abs(se[0] - nw[0]), minExtent),\n Math.max(Math.abs(se[1] - nw[1]), minExtent)\n ];\n\n const targetSize = [\n width - padding.left - padding.right - Math.abs(offset[0]) * 2,\n height - padding.top - padding.bottom - Math.abs(offset[1]) * 2\n ];\n\n assert(targetSize[0] > 0 && targetSize[1] > 0);\n\n // scale = screen pixels per unit on the Web Mercator plane\n const scaleX = targetSize[0] / size[0];\n const scaleY = targetSize[1] / size[1];\n\n // Find how much we need to shift the center\n const offsetX = (padding.right - padding.left) / 2 / scaleX;\n const offsetY = (padding.bottom - padding.top) / 2 / scaleY;\n\n const center = [(se[0] + nw[0]) / 2 + offsetX, (se[1] + nw[1]) / 2 + offsetY];\n\n const centerLngLat = viewport.unproject(center);\n const zoom = Math.min(maxZoom, viewport.zoom + log2(Math.abs(Math.min(scaleX, scaleY))));\n\n assert(Number.isFinite(zoom));\n\n return {\n longitude: centerLngLat[0],\n latitude: centerLngLat[1],\n zoom\n };\n}\n","import {worldToLngLat} from './web-mercator-utils';\nimport * as vec2 from 'gl-matrix/vec2';\nimport {transformVector} from './math-utils';\n\nconst DEGREES_TO_RADIANS = Math.PI / 180;\n\n/*\n * Returns the quad at the intersection of the frustum and the given z plane\n * @param {WebMercatorViewport} viewport\n * @param {Number} z - elevation in meters\n */\nexport default function getBounds(viewport, z = 0) {\n const {width, height, unproject} = viewport;\n const unprojectOps = {targetZ: z};\n const bottomLeft = unproject([0, height], unprojectOps);\n const bottomRight = unproject([width, height], unprojectOps);\n let topLeft;\n let topRight;\n\n const halfFov = viewport.fovy\n ? 0.5 * viewport.fovy * DEGREES_TO_RADIANS\n : Math.atan(0.5 / viewport.altitude);\n const angleToGround = (90 - viewport.pitch) * DEGREES_TO_RADIANS;\n // The top plane is parallel to the ground if halfFov == angleToGround\n if (halfFov > angleToGround - 0.01) {\n // intersect with the far plane\n topLeft = unprojectOnFarPlane(viewport, 0, z);\n topRight = unprojectOnFarPlane(viewport, width, z);\n } else {\n // intersect with the top plane\n topLeft = unproject([0, 0], unprojectOps);\n topRight = unproject([width, 0], unprojectOps);\n }\n\n return [bottomLeft, bottomRight, topRight, topLeft];\n}\n\n/*\n * Find a point on the far clipping plane of the viewport\n * @param {WebMercatorViewport} viewport\n * @param {Number} x - projected x in screen space\n * @param {Number} targetZ - the elevation of the point in meters\n */\nfunction unprojectOnFarPlane(viewport, x, targetZ) {\n const {pixelUnprojectionMatrix} = viewport;\n const coord0 = transformVector(pixelUnprojectionMatrix, [x, 0, 1, 1]);\n const coord1 = transformVector(pixelUnprojectionMatrix, [x, viewport.height, 1, 1]);\n\n const z = targetZ * viewport.distanceScales.unitsPerMeter[2];\n const t = (z - coord0[2]) / (coord1[2] - coord0[2]);\n const coord = vec2.lerp([], coord0, coord1, t);\n\n const result = worldToLngLat(coord);\n result[2] = targetZ;\n return result;\n}\n","// View and Projection Matrix calculations for mapbox-js style map view properties\nimport {createMat4} from './math-utils';\n\nimport {\n zoomToScale,\n pixelsToWorld,\n lngLatToWorld,\n worldToLngLat,\n worldToPixels,\n altitudeToFovy,\n fovyToAltitude,\n DEFAULT_ALTITUDE,\n getProjectionMatrix,\n getDistanceScales,\n getViewMatrix\n} from './web-mercator-utils';\nimport fitBounds from './fit-bounds';\nimport getBounds from './get-bounds';\n\nimport * as mat4 from 'gl-matrix/mat4';\nimport * as vec2 from 'gl-matrix/vec2';\nimport * as vec3 from 'gl-matrix/vec3';\n\nexport default class WebMercatorViewport {\n // eslint-disable-next-line max-statements\n constructor(\n {\n // Map state\n width,\n height,\n latitude = 0,\n longitude = 0,\n zoom = 0,\n pitch = 0,\n bearing = 0,\n altitude = null,\n fovy = null,\n position = null,\n nearZMultiplier = 0.02,\n farZMultiplier = 1.01\n } = {width: 1, height: 1}\n ) {\n // Silently allow apps to send in 0,0 to facilitate isomorphic render etc\n width = width || 1;\n height = height || 1;\n\n // `fovy` & `altitude` are independent parameters, one for the\n // projection and the latter for the view matrix. In the past,\n // the `fovy` was always derived from the `altitude`\n if (fovy === null && altitude === null) {\n altitude = DEFAULT_ALTITUDE;\n fovy = altitudeToFovy(altitude);\n } else if (fovy === null) {\n fovy = altitudeToFovy(altitude);\n } else if (altitude === null) {\n altitude = fovyToAltitude(fovy);\n }\n\n const scale = zoomToScale(zoom);\n // Altitude - prevent division by 0\n // TODO - just throw an Error instead?\n altitude = Math.max(0.75, altitude);\n\n const distanceScales = getDistanceScales({longitude, latitude});\n\n const center = lngLatToWorld([longitude, latitude]);\n center[2] = 0;\n\n if (position) {\n vec3.add(center, center, vec3.mul([], position, distanceScales.unitsPerMeter));\n }\n\n this.projectionMatrix = getProjectionMatrix({\n width,\n height,\n pitch,\n fovy,\n nearZMultiplier,\n farZMultiplier\n });\n\n this.viewMatrix = getViewMatrix({\n height,\n scale,\n center,\n pitch,\n bearing,\n altitude\n });\n\n // Save parameters\n this.width = width;\n this.height = height;\n this.scale = scale;\n\n this.latitude = latitude;\n this.longitude = longitude;\n this.zoom = zoom;\n this.pitch = pitch;\n this.bearing = bearing;\n this.altitude = altitude;\n this.fovy = fovy;\n this.center = center;\n this.meterOffset = position || [0, 0, 0];\n\n this.distanceScales = distanceScales;\n\n this._initMatrices();\n\n // Bind methods for easy access\n this.equals = this.equals.bind(this);\n this.project = this.project.bind(this);\n this.unproject = this.unproject.bind(this);\n this.projectPosition = this.projectPosition.bind(this);\n this.unprojectPosition = this.unprojectPosition.bind(this);\n\n Object.freeze(this);\n }\n\n _initMatrices() {\n const {width, height, projectionMatrix, viewMatrix} = this;\n\n // Note: As usual, matrix operations should be applied in \"reverse\" order\n // since vectors will be multiplied in from the right during transformation\n const vpm = createMat4();\n mat4.multiply(vpm, vpm, projectionMatrix);\n mat4.multiply(vpm, vpm, viewMatrix);\n this.viewProjectionMatrix = vpm;\n\n // Calculate matrices and scales needed for projection\n /**\n * Builds matrices that converts preprojected lngLats to screen pixels\n * and vice versa.\n * Note: Currently returns bottom-left coordinates!\n * Note: Starts with the GL projection matrix and adds steps to the\n * scale and translate that matrix onto the window.\n * Note: WebGL controls clip space to screen projection with gl.viewport\n * and does not need this step.\n */\n const m = createMat4();\n\n // matrix for conversion from location to screen coordinates\n mat4.scale(m, m, [width / 2, -height / 2, 1]);\n mat4.translate(m, m, [1, -1, 0]);\n mat4.multiply(m, m, vpm);\n\n const mInverse = mat4.invert(createMat4(), m);\n if (!mInverse) {\n throw new Error('Pixel project matrix not invertible');\n }\n\n this.pixelProjectionMatrix = m;\n this.pixelUnprojectionMatrix = mInverse;\n }\n\n // Two viewports are equal if width and height are identical, and if\n // their view and projection matrices are (approximately) equal.\n equals(viewport) {\n if (!(viewport instanceof WebMercatorViewport)) {\n return false;\n }\n\n return (\n viewport.width === this.width &&\n viewport.height === this.height &&\n mat4.equals(viewport.projectionMatrix, this.projectionMatrix) &&\n mat4.equals(viewport.viewMatrix, this.viewMatrix)\n );\n }\n\n // Projects xyz (possibly latitude and longitude) to pixel coordinates in window\n // using viewport projection parameters\n project(xyz, {topLeft = true} = {}) {\n const worldPosition = this.projectPosition(xyz);\n const coord = worldToPixels(worldPosition, this.pixelProjectionMatrix);\n\n const [x, y] = coord;\n const y2 = topLeft ? y : this.height - y;\n return xyz.length === 2 ? [x, y2] : [x, y2, coord[2]];\n }\n\n // Unproject pixel coordinates on screen onto world coordinates,\n // (possibly [lon, lat]) on map.\n unproject(xyz, {topLeft = true, targetZ = undefined} = {}) {\n const [x, y, z] = xyz;\n\n const y2 = topLeft ? y : this.height - y;\n const targetZWorld = targetZ && targetZ * this.distanceScales.unitsPerMeter[2];\n const coord = pixelsToWorld([x, y2, z], this.pixelUnprojectionMatrix, targetZWorld);\n const [X, Y, Z] = this.unprojectPosition(coord);\n\n if (Number.isFinite(z)) {\n return [X, Y, Z];\n }\n return Number.isFinite(targetZ) ? [X, Y, targetZ] : [X, Y];\n }\n\n // NON_LINEAR PROJECTION HOOKS\n // Used for web meractor projection\n\n projectPosition(xyz) {\n const [X, Y] = lngLatToWorld(xyz);\n const Z = (xyz[2] || 0) * this.distanceScales.unitsPerMeter[2];\n return [X, Y, Z];\n }\n\n unprojectPosition(xyz) {\n const [X, Y] = worldToLngLat(xyz);\n const Z = (xyz[2] || 0) * this.distanceScales.metersPerUnit[2];\n return [X, Y, Z];\n }\n\n // Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.\n projectFlat(lngLat) {\n return lngLatToWorld(lngLat);\n }\n\n // Unproject world point [x,y] on map onto {lat, lon} on sphere\n unprojectFlat(xy) {\n return worldToLngLat(xy);\n }\n\n // Get the map center that place a given [lng, lat] coordinate at screen point [x, y]\n getMapCenterByLngLatPosition({lngLat, pos}) {\n const fromLocation = pixelsToWorld(pos, this.pixelUnprojectionMatrix);\n const toLocation = lngLatToWorld(lngLat);\n\n const translate = vec2.add([], toLocation, vec2.negate([], fromLocation));\n const newCenter = vec2.add([], this.center, translate);\n\n return worldToLngLat(newCenter);\n }\n\n // Legacy method name\n getLocationAtPoint({lngLat, pos}) {\n return this.getMapCenterByLngLatPosition({lngLat, pos});\n }\n\n // Returns a new viewport that fit around the given rectangle.\n fitBounds(bounds, options = {}) {\n const {width, height} = this;\n const {longitude, latitude, zoom} = fitBounds(Object.assign({width, height, bounds}, options));\n return new WebMercatorViewport({width, height, longitude, latitude, zoom});\n }\n\n getBounds(options) {\n const corners = this.getBoundingRegion(options);\n\n const west = Math.min(...corners.map((p) => p[0]));\n const east = Math.max(...corners.map((p) => p[0]));\n const south = Math.min(...corners.map((p) => p[1]));\n const north = Math.max(...corners.map((p) => p[1]));\n return [\n [west, south],\n [east, north]\n ];\n }\n\n getBoundingRegion(options = {}) {\n return getBounds(this, options.z || 0);\n }\n}\n","import {worldToLngLat} from './web-mercator-utils';\nimport {mod, log2} from './math-utils';\n\n// defined by mapbox-gl\nconst TILE_SIZE = 512;\n\n// Apply mathematical constraints to viewport props\n// eslint-disable-next-line complexity\nexport default function normalizeViewportProps({\n width,\n height,\n longitude,\n latitude,\n zoom,\n pitch = 0,\n bearing = 0\n}) {\n // Normalize degrees\n if (longitude < -180 || longitude > 180) {\n longitude = mod(longitude + 180, 360) - 180;\n }\n if (bearing < -180 || bearing > 180) {\n bearing = mod(bearing + 180, 360) - 180;\n }\n\n // Constrain zoom and shift center at low zoom levels\n const minZoom = log2(height / TILE_SIZE);\n if (zoom <= minZoom) {\n zoom = minZoom;\n latitude = 0;\n } else {\n // Eliminate white space above and below the map\n const halfHeightPixels = height / 2 / Math.pow(2, zoom);\n const minLatitude = worldToLngLat([0, halfHeightPixels])[1];\n if (latitude < minLatitude) {\n latitude = minLatitude;\n } else {\n const maxLatitude = worldToLngLat([0, TILE_SIZE - halfHeightPixels])[1];\n if (latitude > maxLatitude) {\n latitude = maxLatitude;\n }\n }\n }\n\n return {width, height, longitude, latitude, zoom, pitch, bearing};\n}\n","import {lerp} from './math-utils';\nimport {scaleToZoom, zoomToScale, lngLatToWorld, worldToLngLat} from './web-mercator-utils';\nimport * as vec2 from 'gl-matrix/vec2';\n\nconst EPSILON = 0.01;\nconst VIEWPORT_TRANSITION_PROPS = ['longitude', 'latitude', 'zoom'];\nconst DEFAULT_OPTS = {\n curve: 1.414,\n speed: 1.2\n // screenSpeed and maxDuration are used only if specified\n};\n\n/**\n * mapbox-gl-js flyTo : https://www.mapbox.com/mapbox-gl-js/api/#map#flyto.\n * It implements “Smooth and efficient zooming and panning.” algorithm by\n * \"Jarke J. van Wijk and Wim A.A. Nuij\"\n */\nexport default function flyToViewport(startProps, endProps, t, opts = {}) {\n // Equations from above paper are referred where needed.\n\n const viewport = {};\n\n const {startZoom, startCenterXY, uDelta, w0, u1, S, rho, rho2, r0} = getFlyToTransitionParams(\n startProps,\n endProps,\n opts\n );\n\n // If change in center is too small, do linear interpolaiton.\n if (u1 < EPSILON) {\n for (const key of VIEWPORT_TRANSITION_PROPS) {\n const startValue = startProps[key];\n const endValue = endProps[key];\n viewport[key] = lerp(startValue, endValue, t);\n }\n return viewport;\n }\n\n const s = t * S;\n\n const w = Math.cosh(r0) / Math.cosh(r0 + rho * s);\n const u = (w0 * ((Math.cosh(r0) * Math.tanh(r0 + rho * s) - Math.sinh(r0)) / rho2)) / u1;\n\n const scaleIncrement = 1 / w; // Using w method for scaling.\n const newZoom = startZoom + scaleToZoom(scaleIncrement);\n\n const newCenterWorld = vec2.scale([], uDelta, u);\n vec2.add(newCenterWorld, newCenterWorld, startCenterXY);\n\n const newCenter = worldToLngLat(newCenterWorld);\n viewport.longitude = newCenter[0];\n viewport.latitude = newCenter[1];\n viewport.zoom = newZoom;\n return viewport;\n}\n\n// returns transition duration in milliseconds\nexport function getFlyToDuration(startProps, endProps, opts = {}) {\n opts = Object.assign({}, DEFAULT_OPTS, opts);\n const {screenSpeed, speed, maxDuration} = opts;\n const {S, rho} = getFlyToTransitionParams(startProps, endProps, opts);\n const length = 1000 * S;\n let duration;\n if (Number.isFinite(screenSpeed)) {\n duration = length / (screenSpeed / rho);\n } else {\n duration = length / speed;\n }\n\n return Number.isFinite(maxDuration) && duration > maxDuration ? 0 : duration;\n}\n\n// Private Methods\n\n// Calculate all parameters that are static for given startProps and endProps\nfunction getFlyToTransitionParams(startProps, endProps, opts) {\n opts = Object.assign({}, DEFAULT_OPTS, opts);\n const rho = opts.curve;\n const startZoom = startProps.zoom;\n const startCenter = [startProps.longitude, startProps.latitude];\n const startScale = zoomToScale(startZoom);\n const endZoom = endProps.zoom;\n const endCenter = [endProps.longitude, endProps.latitude];\n const scale = zoomToScale(endZoom - startZoom);\n\n const startCenterXY = lngLatToWorld(startCenter);\n const endCenterXY = lngLatToWorld(endCenter);\n const uDelta = vec2.sub([], endCenterXY, startCenterXY);\n\n const w0 = Math.max(startProps.width, startProps.height);\n const w1 = w0 / scale;\n const u1 = vec2.length(uDelta) * startScale;\n // u0 is treated as '0' in Eq (9).\n\n // If u1 is too small, will generate invalid number\n const _u1 = Math.max(u1, EPSILON);\n\n // Implement Equation (9) from above algorithm.\n const rho2 = rho * rho;\n const b0 = (w1 * w1 - w0 * w0 + rho2 * rho2 * _u1 * _u1) / (2 * w0 * rho2 * _u1);\n const b1 = (w1 * w1 - w0 * w0 - rho2 * rho2 * _u1 * _u1) / (2 * w1 * rho2 * _u1);\n const r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0);\n const r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n const S = (r1 - r0) / rho;\n\n return {startZoom, startCenterXY, uDelta, w0, u1, S, rho, rho2, r0, r1};\n}\n","import Geometry from '../geometry/geometry';\nimport {uid} from '@luma.gl/webgl';\n\nconst INDEX_OFFSETS = {\n x: [2, 0, 1],\n y: [0, 1, 2],\n z: [1, 2, 0]\n};\n\nexport default class TruncatedConeGeometry extends Geometry {\n constructor(props = {}) {\n const {id = uid('truncated-code-geometry')} = props;\n const {indices, attributes} = tesselateTruncatedCone(props);\n super({\n ...props,\n id,\n indices,\n attributes: {...attributes, ...props.attributes}\n });\n }\n}\n\n// Primitives inspired by TDL http://code.google.com/p/webglsamples/,\n// copyright 2011 Google Inc. new BSD License\n// (http://www.opensource.org/licenses/bsd-license.php).\n/* eslint-disable max-statements, complexity */\nfunction tesselateTruncatedCone(props) {\n const {\n bottomRadius = 0,\n topRadius = 0,\n height = 1,\n nradial = 10,\n nvertical = 10,\n verticalAxis = 'y',\n topCap = false,\n bottomCap = false\n } = props;\n\n const extra = (topCap ? 2 : 0) + (bottomCap ? 2 : 0);\n const numVertices = (nradial + 1) * (nvertical + 1 + extra);\n\n const slant = Math.atan2(bottomRadius - topRadius, height);\n const msin = Math.sin;\n const mcos = Math.cos;\n const mpi = Math.PI;\n const cosSlant = mcos(slant);\n const sinSlant = msin(slant);\n const start = topCap ? -2 : 0;\n const end = nvertical + (bottomCap ? 2 : 0);\n const vertsAroundEdge = nradial + 1;\n\n const indices = new Uint16Array(nradial * (nvertical + extra) * 6);\n const indexOffset = INDEX_OFFSETS[verticalAxis];\n\n const positions = new Float32Array(numVertices * 3);\n const normals = new Float32Array(numVertices * 3);\n const texCoords = new Float32Array(numVertices * 2);\n\n let i3 = 0;\n let i2 = 0;\n for (let i = start; i <= end; i++) {\n let v = i / nvertical;\n let y = height * v;\n let ringRadius;\n\n if (i < 0) {\n y = 0;\n v = 1;\n ringRadius = bottomRadius;\n } else if (i > nvertical) {\n y = height;\n v = 1;\n ringRadius = topRadius;\n } else {\n ringRadius = bottomRadius + (topRadius - bottomRadius) * (i / nvertical);\n }\n if (i === -2 || i === nvertical + 2) {\n ringRadius = 0;\n v = 0;\n }\n y -= height / 2;\n for (let j = 0; j < vertsAroundEdge; j++) {\n const sin = msin((j * mpi * 2) / nradial);\n const cos = mcos((j * mpi * 2) / nradial);\n\n positions[i3 + indexOffset[0]] = sin * ringRadius;\n positions[i3 + indexOffset[1]] = y;\n positions[i3 + indexOffset[2]] = cos * ringRadius;\n\n normals[i3 + indexOffset[0]] = i < 0 || i > nvertical ? 0 : sin * cosSlant;\n normals[i3 + indexOffset[1]] = i < 0 ? -1 : i > nvertical ? 1 : sinSlant;\n normals[i3 + indexOffset[2]] = i < 0 || i > nvertical ? 0 : cos * cosSlant;\n\n texCoords[i2 + 0] = j / nradial;\n texCoords[i2 + 1] = v;\n\n i2 += 2;\n i3 += 3;\n }\n }\n\n for (let i = 0; i < nvertical + extra; i++) {\n for (let j = 0; j < nradial; j++) {\n const index = (i * nradial + j) * 6;\n indices[index + 0] = vertsAroundEdge * (i + 0) + 0 + j;\n indices[index + 1] = vertsAroundEdge * (i + 0) + 1 + j;\n indices[index + 2] = vertsAroundEdge * (i + 1) + 1 + j;\n indices[index + 3] = vertsAroundEdge * (i + 0) + 0 + j;\n indices[index + 4] = vertsAroundEdge * (i + 1) + 1 + j;\n indices[index + 5] = vertsAroundEdge * (i + 1) + 0 + j;\n }\n }\n\n return {\n indices,\n attributes: {\n POSITION: {size: 3, value: positions},\n NORMAL: {size: 3, value: normals},\n TEXCOORD_0: {size: 2, value: texCoords}\n }\n };\n}\n","import TruncatedConeGeometry from './truncated-cone-geometry';\nimport {uid} from '@luma.gl/webgl';\n\nexport default class ConeGeometry extends TruncatedConeGeometry {\n constructor(props = {}) {\n const {id = uid('cone-geometry'), radius = 1, cap = true} = props;\n super({\n ...props,\n id,\n topRadius: 0,\n topCap: Boolean(cap),\n bottomCap: Boolean(cap),\n bottomRadius: radius\n });\n }\n}\n","import TruncatedConeGeometry from './truncated-cone-geometry';\nimport {uid} from '@luma.gl/webgl';\n\nexport default class CylinderGeometry extends TruncatedConeGeometry {\n constructor(props = {}) {\n const {id = uid('cylinder-geometry'), radius = 1} = props;\n super({\n ...props,\n id,\n bottomRadius: radius,\n topRadius: radius\n });\n }\n}\n","import {Vector3} from '@math.gl/core';\nimport Geometry from '../geometry/geometry';\nimport {uid} from '@luma.gl/webgl';\n\n/* eslint-disable comma-spacing, max-statements, complexity */\n\nconst ICO_POSITIONS = [-1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 1, 0, -1, 0, 1, 0, 0];\nconst ICO_INDICES = [3, 4, 5, 3, 5, 1, 3, 1, 0, 3, 0, 4, 4, 0, 2, 4, 2, 5, 2, 0, 1, 5, 2, 1];\n\nexport default class IcoSphereGeometry extends Geometry {\n constructor(props = {}) {\n const {id = uid('ico-sphere-geometry')} = props;\n const {indices, attributes} = tesselateIcosaHedron(props);\n super({\n ...props,\n id,\n indices,\n attributes: {...attributes, ...props.attributes}\n });\n }\n}\n\nfunction tesselateIcosaHedron(props) {\n const {iterations = 0} = props;\n\n const PI = Math.PI;\n const PI2 = PI * 2;\n\n const positions = [...ICO_POSITIONS];\n let indices = [...ICO_INDICES];\n\n positions.push();\n indices.push();\n\n const getMiddlePoint = (() => {\n const pointMemo = {};\n\n return (i1, i2) => {\n i1 *= 3;\n i2 *= 3;\n const mini = i1 < i2 ? i1 : i2;\n const maxi = i1 > i2 ? i1 : i2;\n const key = `${mini}|${maxi}`;\n\n if (key in pointMemo) {\n return pointMemo[key];\n }\n\n const x1 = positions[i1];\n const y1 = positions[i1 + 1];\n const z1 = positions[i1 + 2];\n const x2 = positions[i2];\n const y2 = positions[i2 + 1];\n const z2 = positions[i2 + 2];\n let xm = (x1 + x2) / 2;\n let ym = (y1 + y2) / 2;\n let zm = (z1 + z2) / 2;\n const len = Math.sqrt(xm * xm + ym * ym + zm * zm);\n\n xm /= len;\n ym /= len;\n zm /= len;\n\n positions.push(xm, ym, zm);\n\n return (pointMemo[key] = positions.length / 3 - 1);\n };\n })();\n\n for (let i = 0; i < iterations; i++) {\n const indices2 = [];\n for (let j = 0; j < indices.length; j += 3) {\n const a = getMiddlePoint(indices[j + 0], indices[j + 1]);\n const b = getMiddlePoint(indices[j + 1], indices[j + 2]);\n const c = getMiddlePoint(indices[j + 2], indices[j + 0]);\n\n indices2.push(c, indices[j + 0], a, a, indices[j + 1], b, b, indices[j + 2], c, a, b, c);\n }\n indices = indices2;\n }\n\n // Calculate texCoords and normals\n const normals = new Array(positions.length);\n const texCoords = new Array((positions.length / 3) * 2);\n\n const l = indices.length;\n for (let i = l - 3; i >= 0; i -= 3) {\n const i1 = indices[i + 0];\n const i2 = indices[i + 1];\n const i3 = indices[i + 2];\n const in1 = i1 * 3;\n const in2 = i2 * 3;\n const in3 = i3 * 3;\n const iu1 = i1 * 2;\n const iu2 = i2 * 2;\n const iu3 = i3 * 2;\n const x1 = positions[in1 + 0];\n const y1 = positions[in1 + 1];\n const z1 = positions[in1 + 2];\n const theta1 = Math.acos(z1 / Math.sqrt(x1 * x1 + y1 * y1 + z1 * z1));\n const phi1 = Math.atan2(y1, x1) + PI;\n const v1 = theta1 / PI;\n const u1 = 1 - phi1 / PI2;\n const x2 = positions[in2 + 0];\n const y2 = positions[in2 + 1];\n const z2 = positions[in2 + 2];\n const theta2 = Math.acos(z2 / Math.sqrt(x2 * x2 + y2 * y2 + z2 * z2));\n const phi2 = Math.atan2(y2, x2) + PI;\n const v2 = theta2 / PI;\n const u2 = 1 - phi2 / PI2;\n const x3 = positions[in3 + 0];\n const y3 = positions[in3 + 1];\n const z3 = positions[in3 + 2];\n const theta3 = Math.acos(z3 / Math.sqrt(x3 * x3 + y3 * y3 + z3 * z3));\n const phi3 = Math.atan2(y3, x3) + PI;\n const v3 = theta3 / PI;\n const u3 = 1 - phi3 / PI2;\n const vec1 = [x3 - x2, y3 - y2, z3 - z2];\n const vec2 = [x1 - x2, y1 - y2, z1 - z2];\n const normal = new Vector3(vec1).cross(vec2).normalize();\n let newIndex;\n\n if (\n (u1 === 0 || u2 === 0 || u3 === 0) &&\n (u1 === 0 || u1 > 0.5) &&\n (u2 === 0 || u2 > 0.5) &&\n (u3 === 0 || u3 > 0.5)\n ) {\n positions.push(positions[in1 + 0], positions[in1 + 1], positions[in1 + 2]);\n newIndex = positions.length / 3 - 1;\n indices.push(newIndex);\n texCoords[newIndex * 2 + 0] = 1;\n texCoords[newIndex * 2 + 1] = v1;\n normals[newIndex * 3 + 0] = normal.x;\n normals[newIndex * 3 + 1] = normal.y;\n normals[newIndex * 3 + 2] = normal.z;\n\n positions.push(positions[in2 + 0], positions[in2 + 1], positions[in2 + 2]);\n newIndex = positions.length / 3 - 1;\n indices.push(newIndex);\n texCoords[newIndex * 2 + 0] = 1;\n texCoords[newIndex * 2 + 1] = v2;\n normals[newIndex * 3 + 0] = normal.x;\n normals[newIndex * 3 + 1] = normal.y;\n normals[newIndex * 3 + 2] = normal.z;\n\n positions.push(positions[in3 + 0], positions[in3 + 1], positions[in3 + 2]);\n newIndex = positions.length / 3 - 1;\n indices.push(newIndex);\n texCoords[newIndex * 2 + 0] = 1;\n texCoords[newIndex * 2 + 1] = v3;\n normals[newIndex * 3 + 0] = normal.x;\n normals[newIndex * 3 + 1] = normal.y;\n normals[newIndex * 3 + 2] = normal.z;\n }\n\n normals[in1 + 0] = normals[in2 + 0] = normals[in3 + 0] = normal.x;\n normals[in1 + 1] = normals[in2 + 1] = normals[in3 + 1] = normal.y;\n normals[in1 + 2] = normals[in2 + 2] = normals[in3 + 2] = normal.z;\n\n texCoords[iu1 + 0] = u1;\n texCoords[iu1 + 1] = v1;\n\n texCoords[iu2 + 0] = u2;\n texCoords[iu2 + 1] = v2;\n\n texCoords[iu3 + 0] = u3;\n texCoords[iu3 + 1] = v3;\n }\n\n return {\n indices: {size: 1, value: new Uint16Array(indices)},\n attributes: {\n POSITION: {size: 3, value: new Float32Array(positions)},\n NORMAL: {size: 3, value: new Float32Array(normals)},\n TEXCOORD_0: {size: 2, value: new Float32Array(texCoords)}\n }\n };\n}\n","import Geometry from '../geometry/geometry';\nimport {unpackIndexedGeometry} from '../geometry/geometry-utils';\nimport {uid} from '@luma.gl/webgl';\n\nexport default class PlaneGeometry extends Geometry {\n constructor(props = {}) {\n const {id = uid('plane-geometry')} = props;\n\n const {indices, attributes} = tesselatePlane(props);\n super({\n ...props,\n id,\n indices,\n attributes: {...attributes, ...props.attributes}\n });\n }\n}\n\n// Primitives inspired by TDL http://code.google.com/p/webglsamples/,\n// copyright 2011 Google Inc. new BSD License\n// (http://www.opensource.org/licenses/bsd-license.php).\n/* eslint-disable max-statements, complexity */\n/* eslint-disable complexity, max-statements */\nfunction tesselatePlane(props) {\n const {type = 'x,y', offset = 0, flipCull = false, unpack = false} = props;\n\n const coords = type.split(',');\n // width, height\n let c1len = props[`${coords[0]}len`] || 1;\n const c2len = props[`${coords[1]}len`] || 1;\n // subdivisionsWidth, subdivisionsDepth\n const subdivisions1 = props[`n${coords[0]}`] || 1;\n const subdivisions2 = props[`n${coords[1]}`] || 1;\n const numVertices = (subdivisions1 + 1) * (subdivisions2 + 1);\n\n const positions = new Float32Array(numVertices * 3);\n const normals = new Float32Array(numVertices * 3);\n const texCoords = new Float32Array(numVertices * 2);\n\n if (flipCull) {\n c1len = -c1len;\n }\n\n let i2 = 0;\n let i3 = 0;\n for (let z = 0; z <= subdivisions2; z++) {\n for (let x = 0; x <= subdivisions1; x++) {\n const u = x / subdivisions1;\n const v = z / subdivisions2;\n texCoords[i2 + 0] = flipCull ? 1 - u : u;\n texCoords[i2 + 1] = v;\n\n switch (type) {\n case 'x,y':\n positions[i3 + 0] = c1len * u - c1len * 0.5;\n positions[i3 + 1] = c2len * v - c2len * 0.5;\n positions[i3 + 2] = offset;\n\n normals[i3 + 0] = 0;\n normals[i3 + 1] = 0;\n normals[i3 + 2] = flipCull ? 1 : -1;\n break;\n\n case 'x,z':\n positions[i3 + 0] = c1len * u - c1len * 0.5;\n positions[i3 + 1] = offset;\n positions[i3 + 2] = c2len * v - c2len * 0.5;\n\n normals[i3 + 0] = 0;\n normals[i3 + 1] = flipCull ? 1 : -1;\n normals[i3 + 2] = 0;\n break;\n\n case 'y,z':\n positions[i3 + 0] = offset;\n positions[i3 + 1] = c1len * u - c1len * 0.5;\n positions[i3 + 2] = c2len * v - c2len * 0.5;\n\n normals[i3 + 0] = flipCull ? 1 : -1;\n normals[i3 + 1] = 0;\n normals[i3 + 2] = 0;\n break;\n\n default:\n throw new Error('PlaneGeometry: unknown type');\n }\n\n i2 += 2;\n i3 += 3;\n }\n }\n\n const numVertsAcross = subdivisions1 + 1;\n const indices = new Uint16Array(subdivisions1 * subdivisions2 * 6);\n\n for (let z = 0; z < subdivisions2; z++) {\n for (let x = 0; x < subdivisions1; x++) {\n const index = (z * subdivisions1 + x) * 6;\n // Make triangle 1 of quad.\n indices[index + 0] = (z + 0) * numVertsAcross + x;\n indices[index + 1] = (z + 1) * numVertsAcross + x;\n indices[index + 2] = (z + 0) * numVertsAcross + x + 1;\n\n // Make triangle 2 of quad.\n indices[index + 3] = (z + 1) * numVertsAcross + x;\n indices[index + 4] = (z + 1) * numVertsAcross + x + 1;\n indices[index + 5] = (z + 0) * numVertsAcross + x + 1;\n }\n }\n\n const geometry = {\n indices: {size: 1, value: indices},\n attributes: {\n POSITION: {size: 3, value: positions},\n NORMAL: {size: 3, value: normals},\n TEXCOORD_0: {size: 2, value: texCoords}\n }\n };\n\n // Optionally, unpack indexed geometry\n return unpack ? unpackIndexedGeometry(geometry) : geometry;\n}\n","export function unpackIndexedGeometry(geometry) {\n const {indices, attributes} = geometry;\n if (!indices) {\n return geometry;\n }\n\n const vertexCount = indices.value.length;\n const unpackedAttributes = {};\n\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n const {constant, value, size} = attribute;\n if (constant || !size) {\n continue; // eslint-disable-line\n }\n const unpackedValue = new value.constructor(vertexCount * size);\n for (let x = 0; x < vertexCount; ++x) {\n const index = indices.value[x];\n for (let i = 0; i < size; i++) {\n unpackedValue[x * size + i] = value[index * size + i];\n }\n }\n unpackedAttributes[attributeName] = {size, value: unpackedValue};\n }\n\n return {\n attributes: Object.assign({}, attributes, unpackedAttributes)\n };\n}\n","import Geometry from '../geometry/geometry';\nimport {uid} from '@luma.gl/webgl';\n\nexport default class SphereGeometry extends Geometry {\n constructor(props = {}) {\n const {id = uid('sphere-geometry')} = props;\n const {indices, attributes} = tesselateSphere(props);\n super({\n ...props,\n id,\n indices,\n attributes: {...attributes, ...props.attributes}\n });\n }\n}\n\n// Primitives inspired by TDL http://code.google.com/p/webglsamples/,\n// copyright 2011 Google Inc. new BSD License\n// (http://www.opensource.org/licenses/bsd-license.php).\n/* eslint-disable max-statements, complexity */\nfunction tesselateSphere(props) {\n const {nlat = 10, nlong = 10} = props;\n let {radius = 1} = props;\n\n const startLat = 0;\n const endLat = Math.PI;\n const latRange = endLat - startLat;\n const startLong = 0;\n const endLong = 2 * Math.PI;\n const longRange = endLong - startLong;\n const numVertices = (nlat + 1) * (nlong + 1);\n\n if (typeof radius === 'number') {\n const value = radius;\n radius = (n1, n2, n3, u, v) => value;\n }\n\n const positions = new Float32Array(numVertices * 3);\n const normals = new Float32Array(numVertices * 3);\n const texCoords = new Float32Array(numVertices * 2);\n\n const IndexType = numVertices > 0xffff ? Uint32Array : Uint16Array;\n const indices = new IndexType(nlat * nlong * 6);\n\n // Create positions, normals and texCoords\n for (let y = 0; y <= nlat; y++) {\n for (let x = 0; x <= nlong; x++) {\n const u = x / nlong;\n const v = y / nlat;\n\n const index = x + y * (nlong + 1);\n const i2 = index * 2;\n const i3 = index * 3;\n\n const theta = longRange * u;\n const phi = latRange * v;\n const sinTheta = Math.sin(theta);\n const cosTheta = Math.cos(theta);\n const sinPhi = Math.sin(phi);\n const cosPhi = Math.cos(phi);\n const ux = cosTheta * sinPhi;\n const uy = cosPhi;\n const uz = sinTheta * sinPhi;\n\n const r = radius(ux, uy, uz, u, v);\n\n positions[i3 + 0] = r * ux;\n positions[i3 + 1] = r * uy;\n positions[i3 + 2] = r * uz;\n\n normals[i3 + 0] = ux;\n normals[i3 + 1] = uy;\n normals[i3 + 2] = uz;\n\n texCoords[i2 + 0] = u;\n texCoords[i2 + 1] = 1 - v;\n }\n }\n\n // Create indices\n const numVertsAround = nlong + 1;\n for (let x = 0; x < nlong; x++) {\n for (let y = 0; y < nlat; y++) {\n const index = (x * nlat + y) * 6;\n\n indices[index + 0] = y * numVertsAround + x;\n indices[index + 1] = y * numVertsAround + x + 1;\n indices[index + 2] = (y + 1) * numVertsAround + x;\n\n indices[index + 3] = (y + 1) * numVertsAround + x;\n indices[index + 4] = y * numVertsAround + x + 1;\n indices[index + 5] = (y + 1) * numVertsAround + x + 1;\n }\n }\n\n return {\n indices: {size: 1, value: indices},\n attributes: {\n POSITION: {size: 3, value: positions},\n NORMAL: {size: 3, value: normals},\n TEXCOORD_0: {size: 2, value: texCoords}\n }\n };\n}\n","/** @typedef {import('./fp64-utils')} types */\n\n/**\n * Calculate WebGL 64 bit float\n * @type {types['fp64ify']}\n */\nexport function fp64ify(a, out = [], startIndex = 0) {\n const hiPart = Math.fround(a);\n const loPart = a - hiPart;\n out[startIndex] = hiPart;\n out[startIndex + 1] = loPart;\n return out;\n}\n\n/** @type {types['fp64LowPart']} */\nexport function fp64LowPart(a) {\n return a - Math.fround(a);\n}\n\n/**\n * Calculate WebGL 64 bit matrix (transposed \"Float64Array\")\n * @type {types['fp64ifyMatrix4']}\n * */\nexport function fp64ifyMatrix4(matrix) {\n // Transpose the projection matrix to column major for GLSL.\n const matrixFP64 = new Float32Array(32);\n for (let i = 0; i < 4; ++i) {\n for (let j = 0; j < 4; ++j) {\n const index = i * 4 + j;\n fp64ify(matrix[j * 4 + i], matrixFP64, index * 2);\n }\n }\n return matrixFP64;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\nuniform float ONE;\n\n/*\nAbout LUMA_FP64_CODE_ELIMINATION_WORKAROUND\n\nThe purpose of this workaround is to prevent shader compilers from\noptimizing away necessary arithmetic operations by swapping their sequences\nor transform the equation to some 'equivalent' from.\n\nThe method is to multiply an artifical variable, ONE, which will be known to\nthe compiler to be 1 only at runtime. The whole expression is then represented\nas a polynomial with respective to ONE. In the coefficients of all terms, only one a\nand one b should appear\n\nerr = (a + b) * ONE^6 - a * ONE^5 - (a + b) * ONE^4 + a * ONE^3 - b - (a + b) * ONE^2 + a * ONE\n*/\n\n// Divide float number to high and low floats to extend fraction bits\nvec2 split(float a) {\n const float SPLIT = 4097.0;\n float t = a * SPLIT;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float a_hi = t * ONE - (t - a);\n float a_lo = a * ONE - a_hi;\n#else\n float a_hi = t - (t - a);\n float a_lo = a - a_hi;\n#endif\n return vec2(a_hi, a_lo);\n}\n\n// Divide float number again when high float uses too many fraction bits\nvec2 split2(vec2 a) {\n vec2 b = split(a.x);\n b.y += a.y;\n return b;\n}\n\n// Special sum operation when a > b\nvec2 quickTwoSum(float a, float b) {\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float sum = (a + b) * ONE;\n float err = b - (sum - a) * ONE;\n#else\n float sum = a + b;\n float err = b - (sum - a);\n#endif\n return vec2(sum, err);\n}\n\n// General sum operation\nvec2 twoSum(float a, float b) {\n float s = (a + b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float v = (s * ONE - a) * ONE;\n float err = (a - (s - v) * ONE) * ONE * ONE * ONE + (b - v);\n#else\n float v = s - a;\n float err = (a - (s - v)) + (b - v);\n#endif\n return vec2(s, err);\n}\n\nvec2 twoSub(float a, float b) {\n float s = (a - b);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float v = (s * ONE - a) * ONE;\n float err = (a - (s - v) * ONE) * ONE * ONE * ONE - (b + v);\n#else\n float v = s - a;\n float err = (a - (s - v)) - (b + v);\n#endif\n return vec2(s, err);\n}\n\nvec2 twoSqr(float a) {\n float prod = a * a;\n vec2 a_fp64 = split(a);\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n float err = ((a_fp64.x * a_fp64.x - prod) * ONE + 2.0 * a_fp64.x *\n a_fp64.y * ONE * ONE) + a_fp64.y * a_fp64.y * ONE * ONE * ONE;\n#else\n float err = ((a_fp64.x * a_fp64.x - prod) + 2.0 * a_fp64.x * a_fp64.y) + a_fp64.y * a_fp64.y;\n#endif\n return vec2(prod, err);\n}\n\nvec2 twoProd(float a, float b) {\n float prod = a * b;\n vec2 a_fp64 = split(a);\n vec2 b_fp64 = split(b);\n float err = ((a_fp64.x * b_fp64.x - prod) + a_fp64.x * b_fp64.y +\n a_fp64.y * b_fp64.x) + a_fp64.y * b_fp64.y;\n return vec2(prod, err);\n}\n\nvec2 sum_fp64(vec2 a, vec2 b) {\n vec2 s, t;\n s = twoSum(a.x, b.x);\n t = twoSum(a.y, b.y);\n s.y += t.x;\n s = quickTwoSum(s.x, s.y);\n s.y += t.y;\n s = quickTwoSum(s.x, s.y);\n return s;\n}\n\nvec2 sub_fp64(vec2 a, vec2 b) {\n vec2 s, t;\n s = twoSub(a.x, b.x);\n t = twoSub(a.y, b.y);\n s.y += t.x;\n s = quickTwoSum(s.x, s.y);\n s.y += t.y;\n s = quickTwoSum(s.x, s.y);\n return s;\n}\n\nvec2 mul_fp64(vec2 a, vec2 b) {\n vec2 prod = twoProd(a.x, b.x);\n // y component is for the error\n prod.y += a.x * b.y;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n prod = split2(prod);\n#endif\n prod = quickTwoSum(prod.x, prod.y);\n prod.y += a.y * b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n prod = split2(prod);\n#endif\n prod = quickTwoSum(prod.x, prod.y);\n return prod;\n}\n\nvec2 div_fp64(vec2 a, vec2 b) {\n float xn = 1.0 / b.x;\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n vec2 yn = mul_fp64(a, vec2(xn, 0));\n#else\n vec2 yn = a * xn;\n#endif\n float diff = (sub_fp64(a, mul_fp64(b, yn))).x;\n vec2 prod = twoProd(xn, diff);\n return sum_fp64(yn, prod);\n}\n\nvec2 sqrt_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) return vec2(0.0, 0.0);\n if (a.x < 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n\n float x = 1.0 / sqrt(a.x);\n float yn = a.x * x;\n#if defined(LUMA_FP64_CODE_ELIMINATION_WORKAROUND)\n vec2 yn_sqr = twoSqr(yn) * ONE;\n#else\n vec2 yn_sqr = twoSqr(yn);\n#endif\n float diff = sub_fp64(a, yn_sqr).x;\n vec2 prod = twoProd(x * 0.5, diff);\n#if defined(LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND)\n return sum_fp64(split(yn), prod);\n#else\n return sum_fp64(vec2(yn, 0.0), prod);\n#endif\n}\n`;\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nimport {fp64ify, fp64LowPart, fp64ifyMatrix4} from './fp64-utils';\n\nimport fp64arithmeticShader from './fp64-arithmetic.glsl';\nimport fp64functionShader from './fp64-functions.glsl';\n\nconst CONST_UNIFORMS = {\n // Used in LUMA_FP64_CODE_ELIMINATION_WORKAROUND\n ONE: 1.0\n};\nexport {fp64ify, fp64LowPart, fp64ifyMatrix4};\n\nfunction getUniforms() {\n return CONST_UNIFORMS;\n}\n\n// Arithmetic only\nexport const fp64arithmetic = {\n name: 'fp64-arithmetic',\n vs: fp64arithmeticShader,\n fs: null,\n getUniforms,\n fp64ify,\n fp64LowPart,\n fp64ifyMatrix4\n};\n\n// Full fp64 shader\nexport const fp64 = {\n name: 'fp64',\n vs: fp64functionShader,\n fs: null,\n dependencies: [fp64arithmetic],\n fp64ify,\n fp64LowPart,\n fp64ifyMatrix4\n};\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\nconst vec2 E_FP64 = vec2(2.7182817459106445e+00, 8.254840366817007e-08);\nconst vec2 LOG2_FP64 = vec2(0.6931471824645996e+00, -1.9046542121259336e-09);\nconst vec2 PI_FP64 = vec2(3.1415927410125732, -8.742278012618954e-8);\nconst vec2 TWO_PI_FP64 = vec2(6.2831854820251465, -1.7484556025237907e-7);\nconst vec2 PI_2_FP64 = vec2(1.5707963705062866, -4.371139006309477e-8);\nconst vec2 PI_4_FP64 = vec2(0.7853981852531433, -2.1855695031547384e-8);\nconst vec2 PI_16_FP64 = vec2(0.19634954631328583, -5.463923757886846e-9);\nconst vec2 PI_16_2_FP64 = vec2(0.39269909262657166, -1.0927847515773692e-8);\nconst vec2 PI_16_3_FP64 = vec2(0.5890486240386963, -1.4906100798128818e-9);\nconst vec2 PI_180_FP64 = vec2(0.01745329238474369, 1.3519960498364902e-10);\n\nconst vec2 SIN_TABLE_0_FP64 = vec2(0.19509032368659973, -1.6704714833615242e-9);\nconst vec2 SIN_TABLE_1_FP64 = vec2(0.3826834261417389, 6.22335089017767e-9);\nconst vec2 SIN_TABLE_2_FP64 = vec2(0.5555702447891235, -1.1769521357507529e-8);\nconst vec2 SIN_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617041793133e-8);\n\nconst vec2 COS_TABLE_0_FP64 = vec2(0.9807852506637573, 2.9739473106360492e-8);\nconst vec2 COS_TABLE_1_FP64 = vec2(0.9238795042037964, 2.8307490351764386e-8);\nconst vec2 COS_TABLE_2_FP64 = vec2(0.8314695954322815, 1.6870263741530778e-8);\nconst vec2 COS_TABLE_3_FP64 = vec2(0.7071067690849304, 1.2101617152815436e-8);\n\nconst vec2 INVERSE_FACTORIAL_3_FP64 = vec2(1.666666716337204e-01, -4.967053879312289e-09); // 1/3!\nconst vec2 INVERSE_FACTORIAL_4_FP64 = vec2(4.16666679084301e-02, -1.2417634698280722e-09); // 1/4!\nconst vec2 INVERSE_FACTORIAL_5_FP64 = vec2(8.333333767950535e-03, -4.34617203337595e-10); // 1/5!\nconst vec2 INVERSE_FACTORIAL_6_FP64 = vec2(1.3888889225199819e-03, -3.3631094437103215e-11); // 1/6!\nconst vec2 INVERSE_FACTORIAL_7_FP64 = vec2(1.9841270113829523e-04, -2.725596874933456e-12); // 1/7!\nconst vec2 INVERSE_FACTORIAL_8_FP64 = vec2(2.4801587642286904e-05, -3.406996025904184e-13); // 1/8!\nconst vec2 INVERSE_FACTORIAL_9_FP64 = vec2(2.75573188446287533e-06, 3.7935713937038186e-14); // 1/9!\nconst vec2 INVERSE_FACTORIAL_10_FP64 = vec2(2.755731998149713e-07, -7.575112367869873e-15); // 1/10!\n\nfloat nint(float d) {\n if (d == floor(d)) return d;\n return floor(d + 0.5);\n}\n\nvec2 nint_fp64(vec2 a) {\n float hi = nint(a.x);\n float lo;\n vec2 tmp;\n if (hi == a.x) {\n lo = nint(a.y);\n tmp = quickTwoSum(hi, lo);\n } else {\n lo = 0.0;\n if (abs(hi - a.x) == 0.5 && a.y < 0.0) {\n hi -= 1.0;\n }\n tmp = vec2(hi, lo);\n }\n return tmp;\n}\n\n/* k_power controls how much range reduction we would like to have\nRange reduction uses the following method:\nassume a = k_power * r + m * log(2), k and m being integers.\nSet k_power = 4 (we can choose other k to trade accuracy with performance.\nwe only need to calculate exp(r) and using exp(a) = 2^m * exp(r)^k_power;\n*/\n\nvec2 exp_fp64(vec2 a) {\n // We need to make sure these two numbers match\n // as bit-wise shift is not available in GLSL 1.0\n const int k_power = 4;\n const float k = 16.0;\n\n const float inv_k = 1.0 / k;\n\n if (a.x <= -88.0) return vec2(0.0, 0.0);\n if (a.x >= 88.0) return vec2(1.0 / 0.0, 1.0 / 0.0);\n if (a.x == 0.0 && a.y == 0.0) return vec2(1.0, 0.0);\n if (a.x == 1.0 && a.y == 0.0) return E_FP64;\n\n float m = floor(a.x / LOG2_FP64.x + 0.5);\n vec2 r = sub_fp64(a, mul_fp64(LOG2_FP64, vec2(m, 0.0))) * inv_k;\n vec2 s, t, p;\n\n p = mul_fp64(r, r);\n s = sum_fp64(r, p * 0.5);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_3_FP64);\n\n s = sum_fp64(s, t);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_4_FP64);\n\n s = sum_fp64(s, t);\n p = mul_fp64(p, r);\n t = mul_fp64(p, INVERSE_FACTORIAL_5_FP64);\n\n // s = sum_fp64(s, t);\n // p = mul_fp64(p, r);\n // t = mul_fp64(p, INVERSE_FACTORIAL_6_FP64);\n\n // s = sum_fp64(s, t);\n // p = mul_fp64(p, r);\n // t = mul_fp64(p, INVERSE_FACTORIAL_7_FP64);\n\n s = sum_fp64(s, t);\n\n\n // At this point, s = exp(r) - 1; but after following 4 recursions, we will get exp(r) ^ 512 - 1.\n for (int i = 0; i < k_power; i++) {\n s = sum_fp64(s * 2.0, mul_fp64(s, s));\n }\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n s = sum_fp64(s, vec2(ONE, 0.0));\n#else\n s = sum_fp64(s, vec2(1.0, 0.0));\n#endif\n\n return s * pow(2.0, m);\n// return r;\n}\n\nvec2 log_fp64(vec2 a)\n{\n if (a.x == 1.0 && a.y == 0.0) return vec2(0.0, 0.0);\n if (a.x <= 0.0) return vec2(0.0 / 0.0, 0.0 / 0.0);\n vec2 x = vec2(log(a.x), 0.0);\n vec2 s;\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n s = vec2(ONE, 0.0);\n#else\n s = vec2(1.0, 0.0);\n#endif\n\n x = sub_fp64(sum_fp64(x, mul_fp64(a, exp_fp64(-x))), s);\n return x;\n}\n\nvec2 sin_taylor_fp64(vec2 a) {\n vec2 r, s, t, x;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n\n x = -mul_fp64(a, a);\n s = a;\n r = a;\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_3_FP64);\n s = sum_fp64(s, t);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_5_FP64);\n s = sum_fp64(s, t);\n\n /* keep the following commented code in case we need them\n for extra accuracy from the Taylor expansion*/\n\n // r = mul_fp64(r, x);\n // t = mul_fp64(r, INVERSE_FACTORIAL_7_FP64);\n // s = sum_fp64(s, t);\n\n // r = mul_fp64(r, x);\n // t = mul_fp64(r, INVERSE_FACTORIAL_9_FP64);\n // s = sum_fp64(s, t);\n\n return s;\n}\n\nvec2 cos_taylor_fp64(vec2 a) {\n vec2 r, s, t, x;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(1.0, 0.0);\n }\n\n x = -mul_fp64(a, a);\n r = x;\n s = sum_fp64(vec2(1.0, 0.0), r * 0.5);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_4_FP64);\n s = sum_fp64(s, t);\n\n r = mul_fp64(r, x);\n t = mul_fp64(r, INVERSE_FACTORIAL_6_FP64);\n s = sum_fp64(s, t);\n\n /* keep the following commented code in case we need them\n for extra accuracy from the Taylor expansion*/\n\n // r = mul_fp64(r, x);\n // t = mul_fp64(r, INVERSE_FACTORIAL_8_FP64);\n // s = sum_fp64(s, t);\n\n // r = mul_fp64(r, x);\n // t = mul_fp64(r, INVERSE_FACTORIAL_10_FP64);\n // s = sum_fp64(s, t);\n\n return s;\n}\n\nvoid sincos_taylor_fp64(vec2 a, out vec2 sin_t, out vec2 cos_t) {\n if (a.x == 0.0 && a.y == 0.0) {\n sin_t = vec2(0.0, 0.0);\n cos_t = vec2(1.0, 0.0);\n }\n\n sin_t = sin_taylor_fp64(a);\n cos_t = sqrt_fp64(sub_fp64(vec2(1.0, 0.0), mul_fp64(sin_t, sin_t)));\n}\n\nvec2 sin_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n\n // 2pi range reduction\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n\n if (k == 0) {\n if (j == 0) {\n return sin_taylor_fp64(t);\n } else if (j == 1) {\n return cos_taylor_fp64(t);\n } else if (j == -1) {\n return -cos_taylor_fp64(t);\n } else {\n return -sin_taylor_fp64(t);\n }\n }\n\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n\n vec2 sin_t, cos_t;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n\n\n vec2 result = vec2(0.0, 0.0);\n if (j == 0) {\n if (k > 0) {\n result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n }\n } else if (j == 1) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n } else if (j == -1) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n } else {\n result = -sum_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n }\n } else {\n if (k > 0) {\n result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n }\n }\n\n return result;\n}\n\nvec2 cos_fp64(vec2 a) {\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(1.0, 0.0);\n }\n\n // 2pi range reduction\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n\n if (k == 0) {\n if (j == 0) {\n return cos_taylor_fp64(t);\n } else if (j == 1) {\n return -sin_taylor_fp64(t);\n } else if (j == -1) {\n return sin_taylor_fp64(t);\n } else {\n return -cos_taylor_fp64(t);\n }\n }\n\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n\n vec2 sin_t, cos_t;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n vec2 result = vec2(0.0, 0.0);\n if (j == 0) {\n if (k > 0) {\n result = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n result = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n } else if (j == 1) {\n if (k > 0) {\n result = -sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(v, cos_t), mul_fp64(u, sin_t));\n }\n } else if (j == -1) {\n if (k > 0) {\n result = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n } else {\n result = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n }\n } else {\n if (k > 0) {\n result = sub_fp64(mul_fp64(v, sin_t), mul_fp64(u, cos_t));\n } else {\n result = -sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n }\n\n return result;\n}\n\nvec2 tan_fp64(vec2 a) {\n vec2 sin_a;\n vec2 cos_a;\n\n if (a.x == 0.0 && a.y == 0.0) {\n return vec2(0.0, 0.0);\n }\n\n // 2pi range reduction\n vec2 z = nint_fp64(div_fp64(a, TWO_PI_FP64));\n vec2 r = sub_fp64(a, mul_fp64(TWO_PI_FP64, z));\n\n vec2 t;\n float q = floor(r.x / PI_2_FP64.x + 0.5);\n int j = int(q);\n\n\n if (j < -2 || j > 2) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n }\n\n t = sub_fp64(r, mul_fp64(PI_2_FP64, vec2(q, 0.0)));\n\n q = floor(t.x / PI_16_FP64.x + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n // We just can't get PI/16 * 3.0 very accurately.\n // so let's just store it\n if (abs_k > 4) {\n return vec2(0.0 / 0.0, 0.0 / 0.0);\n } else {\n t = sub_fp64(t, mul_fp64(PI_16_FP64, vec2(q, 0.0)));\n }\n\n\n vec2 u = vec2(0.0, 0.0);\n vec2 v = vec2(0.0, 0.0);\n\n vec2 sin_t, cos_t;\n vec2 s, c;\n sincos_taylor_fp64(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n#if defined(NVIDIA_FP64_WORKAROUND) || defined(INTEL_FP64_WORKAROUND)\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#else\n if (abs_k == 1) {\n u = COS_TABLE_0_FP64;\n v = SIN_TABLE_0_FP64;\n } else if (abs_k == 2) {\n u = COS_TABLE_1_FP64;\n v = SIN_TABLE_1_FP64;\n } else if (abs_k == 3) {\n u = COS_TABLE_2_FP64;\n v = SIN_TABLE_2_FP64;\n } else if (abs_k == 4) {\n u = COS_TABLE_3_FP64;\n v = SIN_TABLE_3_FP64;\n }\n#endif\n if (k > 0) {\n s = sum_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n c = sub_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n } else {\n s = sub_fp64(mul_fp64(u, sin_t), mul_fp64(v, cos_t));\n c = sum_fp64(mul_fp64(u, cos_t), mul_fp64(v, sin_t));\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }\n return div_fp64(sin_a, cos_a);\n}\n\nvec2 radians_fp64(vec2 degree) {\n return mul_fp64(degree, PI_180_FP64);\n}\n\nvec2 mix_fp64(vec2 a, vec2 b, float x) {\n vec2 range = sub_fp64(b, a);\n return sum_fp64(a, mul_fp64(range, vec2(x, 0.0)));\n}\n\n// Vector functions\n// vec2 functions\nvoid vec2_sum_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = sum_fp64(a[0], b[0]);\n out_val[1] = sum_fp64(a[1], b[1]);\n}\n\nvoid vec2_sub_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = sub_fp64(a[0], b[0]);\n out_val[1] = sub_fp64(a[1], b[1]);\n}\n\nvoid vec2_mul_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = mul_fp64(a[0], b[0]);\n out_val[1] = mul_fp64(a[1], b[1]);\n}\n\nvoid vec2_div_fp64(vec2 a[2], vec2 b[2], out vec2 out_val[2]) {\n out_val[0] = div_fp64(a[0], b[0]);\n out_val[1] = div_fp64(a[1], b[1]);\n}\n\nvoid vec2_mix_fp64(vec2 x[2], vec2 y[2], float a, out vec2 out_val[2]) {\n vec2 range[2];\n vec2_sub_fp64(y, x, range);\n vec2 portion[2];\n portion[0] = range[0] * a;\n portion[1] = range[1] * a;\n vec2_sum_fp64(x, portion, out_val);\n}\n\nvec2 vec2_length_fp64(vec2 x[2]) {\n return sqrt_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])));\n}\n\nvoid vec2_normalize_fp64(vec2 x[2], out vec2 out_val[2]) {\n vec2 length = vec2_length_fp64(x);\n vec2 length_vec2[2];\n length_vec2[0] = length;\n length_vec2[1] = length;\n\n vec2_div_fp64(x, length_vec2, out_val);\n}\n\nvec2 vec2_distance_fp64(vec2 x[2], vec2 y[2]) {\n vec2 diff[2];\n vec2_sub_fp64(x, y, diff);\n return vec2_length_fp64(diff);\n}\n\nvec2 vec2_dot_fp64(vec2 a[2], vec2 b[2]) {\n vec2 v[2];\n\n v[0] = mul_fp64(a[0], b[0]);\n v[1] = mul_fp64(a[1], b[1]);\n\n return sum_fp64(v[0], v[1]);\n}\n\n// vec3 functions\nvoid vec3_sub_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n for (int i = 0; i < 3; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvoid vec3_sum_fp64(vec2 a[3], vec2 b[3], out vec2 out_val[3]) {\n for (int i = 0; i < 3; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvec2 vec3_length_fp64(vec2 x[3]) {\n return sqrt_fp64(sum_fp64(sum_fp64(mul_fp64(x[0], x[0]), mul_fp64(x[1], x[1])),\n mul_fp64(x[2], x[2])));\n}\n\nvec2 vec3_distance_fp64(vec2 x[3], vec2 y[3]) {\n vec2 diff[3];\n vec3_sub_fp64(x, y, diff);\n return vec3_length_fp64(diff);\n}\n\n// vec4 functions\nvoid vec4_fp64(vec4 a, out vec2 out_val[4]) {\n out_val[0].x = a[0];\n out_val[0].y = 0.0;\n\n out_val[1].x = a[1];\n out_val[1].y = 0.0;\n\n out_val[2].x = a[2];\n out_val[2].y = 0.0;\n\n out_val[3].x = a[3];\n out_val[3].y = 0.0;\n}\n\nvoid vec4_scalar_mul_fp64(vec2 a[4], vec2 b, out vec2 out_val[4]) {\n out_val[0] = mul_fp64(a[0], b);\n out_val[1] = mul_fp64(a[1], b);\n out_val[2] = mul_fp64(a[2], b);\n out_val[3] = mul_fp64(a[3], b);\n}\n\nvoid vec4_sum_fp64(vec2 a[4], vec2 b[4], out vec2 out_val[4]) {\n for (int i = 0; i < 4; i++) {\n out_val[i] = sum_fp64(a[i], b[i]);\n }\n}\n\nvoid vec4_dot_fp64(vec2 a[4], vec2 b[4], out vec2 out_val) {\n vec2 v[4];\n\n v[0] = mul_fp64(a[0], b[0]);\n v[1] = mul_fp64(a[1], b[1]);\n v[2] = mul_fp64(a[2], b[2]);\n v[3] = mul_fp64(a[3], b[3]);\n\n out_val = sum_fp64(sum_fp64(v[0], v[1]), sum_fp64(v[2], v[3]));\n}\n\nvoid mat4_vec4_mul_fp64(vec2 b[16], vec2 a[4], out vec2 out_val[4]) {\n vec2 tmp[4];\n\n for (int i = 0; i < 4; i++)\n {\n for (int j = 0; j < 4; j++)\n {\n tmp[j] = b[j + i * 4];\n }\n vec4_dot_fp64(a, tmp, out_val[i]);\n }\n}\n`;\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nimport {Matrix4} from '@math.gl/core';\n\nconst IDENTITY_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n\nconst DEFAULT_MODULE_OPTIONS = {\n modelMatrix: IDENTITY_MATRIX,\n viewMatrix: IDENTITY_MATRIX,\n projectionMatrix: IDENTITY_MATRIX,\n cameraPositionWorld: [0, 0, 0]\n};\n\nfunction getUniforms(opts = DEFAULT_MODULE_OPTIONS, prevUniforms = {}) {\n // const viewProjectionInverse = viewProjection.invert();\n // viewInverseMatrix: view.invert(),\n // viewProjectionInverseMatrix: viewProjectionInverse\n\n const uniforms = {};\n if (opts.modelMatrix !== undefined) {\n uniforms.modelMatrix = opts.modelMatrix;\n }\n if (opts.viewMatrix !== undefined) {\n uniforms.viewMatrix = opts.viewMatrix;\n }\n if (opts.projectionMatrix !== undefined) {\n uniforms.projectionMatrix = opts.projectionMatrix;\n }\n if (opts.cameraPositionWorld !== undefined) {\n uniforms.cameraPositionWorld = opts.cameraPositionWorld;\n }\n\n // COMPOSITE UNIFORMS\n if (opts.projectionMatrix !== undefined || opts.viewMatrix !== undefined) {\n uniforms.viewProjectionMatrix = new Matrix4(opts.projectionMatrix).multiplyRight(\n opts.viewMatrix\n );\n }\n\n return uniforms;\n}\n\nconst common = `\\\nvarying vec4 project_vPositionWorld;\nvarying vec3 project_vNormalWorld;\n\nvec4 project_getPosition_World() {\n return project_vPositionWorld;\n}\n\nvec3 project_getNormal_World() {\n return project_vNormalWorld;\n}\n`;\n\nconst vs = `\\\n${common}\n\n// Unprefixed uniforms\nuniform mat4 modelMatrix;\nuniform mat4 viewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat4 viewProjectionMatrix;\nuniform vec3 cameraPositionWorld;\n\nstruct World {\n vec3 position;\n vec3 normal;\n};\n\nWorld world;\n\nvoid project_setPosition(vec4 position) {\n project_vPositionWorld = position;\n}\n\nvoid project_setNormal(vec3 normal) {\n project_vNormalWorld = normal;\n}\n\nvoid project_setPositionAndNormal_World(vec3 position, vec3 normal) {\n world.position = position;\n world.normal = normal;\n}\n\nvoid project_setPositionAndNormal_Model(vec3 position, vec3 normal) {\n world.position = (modelMatrix * vec4(position, 1.)).xyz;\n world.normal = mat3(modelMatrix) * normal;\n}\n\nvec4 project_model_to_clipspace(vec4 position) {\n return viewProjectionMatrix * modelMatrix * position;\n}\n\nvec4 project_model_to_clipspace(vec3 position) {\n return viewProjectionMatrix * modelMatrix * vec4(position, 1.);\n}\n\nvec4 project_world_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_view_to_clipspace(vec3 position) {\n return projectionMatrix * vec4(position, 1.);\n}\n\nvec4 project_to_clipspace(vec3 position) {\n return viewProjectionMatrix * vec4(position, 1.);\n}\n`;\n\nconst fs = `\n${common}\\\n`;\n\n/** @type {ShaderModule} */\nexport const project = {\n name: 'project',\n getUniforms,\n vs,\n fs\n};\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\n// Cheap lighting - single directional light, single dot product, one uniform\n\nimport {project} from '../project/project';\n\n/* eslint-disable camelcase */\nconst DEFAULT_LIGHT_DIRECTION = new Float32Array([1, 1, 2]);\n\nconst DEFAULT_MODULE_OPTIONS = {\n lightDirection: DEFAULT_LIGHT_DIRECTION\n};\n\nfunction getUniforms(opts = DEFAULT_MODULE_OPTIONS) {\n const uniforms = {};\n if (opts.lightDirection) {\n uniforms.dirlight_uLightDirection = opts.lightDirection;\n }\n return uniforms;\n}\n\n// TODO - reuse normal from geometry module\nconst vs = null;\n\nconst fs = `\\\nuniform vec3 dirlight_uLightDirection;\n\n/*\n * Returns color attenuated by angle from light source\n */\nvec4 dirlight_filterColor(vec4 color) {\n vec3 normal = project_getNormal_World();\n float d = abs(dot(normalize(normal), normalize(dirlight_uLightDirection)));\n return vec4(color.rgb * d, color.a);\n}\n`;\n\nexport const dirlight = {\n name: 'dirlight',\n vs,\n fs,\n getUniforms,\n dependencies: [project]\n};\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","var t0 = new Date,\n t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n}\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","import interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport default day;\nexport var days = day.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\n\nvar utcDay = interval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n return (end - start) / durationDay;\n}, function(date) {\n return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval.js\";\nimport {durationWeek} from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval.js\";\n\nvar year = interval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function(date) {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;\n","import interval from \"./interval.js\";\n\nvar month = interval(function(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n","import interval from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nvar hour = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nvar minute = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n","import interval from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nvar second = interval(function(date) {\n date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n return (end - start) / durationSecond;\n}, function(date) {\n return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n","import interval from \"./interval.js\";\n\nvar millisecond = interval(function() {\n // noop\n}, function(date, step) {\n date.setTime(+date + step);\n}, function(start, end) {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function(date) {\n date.setTime(Math.floor(date / k) * k);\n }, function(date, step) {\n date.setTime(+date + step * k);\n }, function(start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n","import interval from \"./interval.js\";\n\nvar utcYear = interval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","import interval from \"./interval.js\";\n\nvar utcMonth = interval(function(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n","import interval from \"./interval.js\";\nimport {durationHour} from \"./duration.js\";\n\nvar utcHour = interval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n","import interval from \"./interval.js\";\nimport {durationMinute} from \"./duration.js\";\n\nvar utcMinute = interval(function(date) {\n date.setUTCSeconds(0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n","import ascending from \"./ascending.js\";\n\nexport default function(f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n if (r0 * step < start) ++r0;\n if (r1 * step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) * step;\n } else {\n step = -step;\n let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n if (r0 / step < start) ++r0;\n if (r1 / step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","import { array, error, hasOwnProperty, extend, peek, toSet, constant, zero, one, span } from 'vega-util';\nimport { timeDay, timeWeek, utcDay, utcWeek, timeYear, timeMonth, timeHour, timeMinute, timeSecond, timeMillisecond, utcYear, utcMonth, utcHour, utcMinute, utcSecond, utcMillisecond } from 'd3-time';\nimport { bisector, tickStep } from 'd3-array';\n\nconst YEAR = 'year';\nconst QUARTER = 'quarter';\nconst MONTH = 'month';\nconst WEEK = 'week';\nconst DATE = 'date';\nconst DAY = 'day';\nconst DAYOFYEAR = 'dayofyear';\nconst HOURS = 'hours';\nconst MINUTES = 'minutes';\nconst SECONDS = 'seconds';\nconst MILLISECONDS = 'milliseconds';\nconst TIME_UNITS = [YEAR, QUARTER, MONTH, WEEK, DATE, DAY, DAYOFYEAR, HOURS, MINUTES, SECONDS, MILLISECONDS];\nconst UNITS = TIME_UNITS.reduce((o, u, i) => (o[u] = 1 + i, o), {});\nfunction timeUnits(units) {\n const u = array(units).slice(),\n m = {}; // check validity\n\n if (!u.length) error('Missing time unit.');\n u.forEach(unit => {\n if (hasOwnProperty(UNITS, unit)) {\n m[unit] = 1;\n } else {\n error(\"Invalid time unit: \".concat(unit, \".\"));\n }\n });\n const numTypes = (m[WEEK] || m[DAY] ? 1 : 0) + (m[QUARTER] || m[MONTH] || m[DATE] ? 1 : 0) + (m[DAYOFYEAR] ? 1 : 0);\n\n if (numTypes > 1) {\n error(\"Incompatible time units: \".concat(units));\n } // ensure proper sort order\n\n\n u.sort((a, b) => UNITS[a] - UNITS[b]);\n return u;\n}\nconst defaultSpecifiers = {\n [YEAR]: '%Y ',\n [QUARTER]: 'Q%q ',\n [MONTH]: '%b ',\n [DATE]: '%d ',\n [WEEK]: 'W%U ',\n [DAY]: '%a ',\n [DAYOFYEAR]: '%j ',\n [HOURS]: '%H:00',\n [MINUTES]: '00:%M',\n [SECONDS]: ':%S',\n [MILLISECONDS]: '.%L',\n [\"\".concat(YEAR, \"-\").concat(MONTH)]: '%Y-%m ',\n [\"\".concat(YEAR, \"-\").concat(MONTH, \"-\").concat(DATE)]: '%Y-%m-%d ',\n [\"\".concat(HOURS, \"-\").concat(MINUTES)]: '%H:%M'\n};\nfunction timeUnitSpecifier(units, specifiers) {\n const s = extend({}, defaultSpecifiers, specifiers),\n u = timeUnits(units),\n n = u.length;\n let fmt = '',\n start = 0,\n end,\n key;\n\n for (start = 0; start < n;) {\n for (end = u.length; end > start; --end) {\n key = u.slice(start, end).join('-');\n\n if (s[key] != null) {\n fmt += s[key];\n start = end;\n break;\n }\n }\n }\n\n return fmt.trim();\n}\n\nconst t0 = new Date();\n\nfunction localYear(y) {\n t0.setFullYear(y);\n t0.setMonth(0);\n t0.setDate(1);\n t0.setHours(0, 0, 0, 0);\n return t0;\n}\n\nfunction dayofyear(d) {\n return localDayOfYear(new Date(d));\n}\nfunction week(d) {\n return localWeekNum(new Date(d));\n}\nfunction localDayOfYear(d) {\n return timeDay.count(localYear(d.getFullYear()) - 1, d);\n}\nfunction localWeekNum(d) {\n return timeWeek.count(localYear(d.getFullYear()) - 1, d);\n}\nfunction localFirst(y) {\n return localYear(y).getDay();\n}\nfunction localDate(y, m, d, H, M, S, L) {\n if (0 <= y && y < 100) {\n const date = new Date(-1, m, d, H, M, S, L);\n date.setFullYear(y);\n return date;\n }\n\n return new Date(y, m, d, H, M, S, L);\n}\nfunction utcdayofyear(d) {\n return utcDayOfYear(new Date(d));\n}\nfunction utcweek(d) {\n return utcWeekNum(new Date(d));\n}\nfunction utcDayOfYear(d) {\n const y = Date.UTC(d.getUTCFullYear(), 0, 1);\n return utcDay.count(y - 1, d);\n}\nfunction utcWeekNum(d) {\n const y = Date.UTC(d.getUTCFullYear(), 0, 1);\n return utcWeek.count(y - 1, d);\n}\nfunction utcFirst(y) {\n t0.setTime(Date.UTC(y, 0, 1));\n return t0.getUTCDay();\n}\nfunction utcDate(y, m, d, H, M, S, L) {\n if (0 <= y && y < 100) {\n const date = new Date(Date.UTC(-1, m, d, H, M, S, L));\n date.setUTCFullYear(d.y);\n return date;\n }\n\n return new Date(Date.UTC(y, m, d, H, M, S, L));\n}\n\nfunction floor(units, step, get, inv, newDate) {\n const s = step || 1,\n b = peek(units),\n _ = (unit, p, key) => {\n key = key || unit;\n return getUnit(get[key], inv[key], unit === b && s, p);\n };\n\n const t = new Date(),\n u = toSet(units),\n y = u[YEAR] ? _(YEAR) : constant(2012),\n m = u[MONTH] ? _(MONTH) : u[QUARTER] ? _(QUARTER) : zero,\n d = u[WEEK] && u[DAY] ? _(DAY, 1, WEEK + DAY) : u[WEEK] ? _(WEEK, 1) : u[DAY] ? _(DAY, 1) : u[DATE] ? _(DATE, 1) : u[DAYOFYEAR] ? _(DAYOFYEAR, 1) : one,\n H = u[HOURS] ? _(HOURS) : zero,\n M = u[MINUTES] ? _(MINUTES) : zero,\n S = u[SECONDS] ? _(SECONDS) : zero,\n L = u[MILLISECONDS] ? _(MILLISECONDS) : zero;\n return function (v) {\n t.setTime(+v);\n const year = y(t);\n return newDate(year, m(t), d(t, year), H(t), M(t), S(t), L(t));\n };\n}\n\nfunction getUnit(f, inv, step, phase) {\n const u = step <= 1 ? f : phase ? (d, y) => phase + step * Math.floor((f(d, y) - phase) / step) : (d, y) => step * Math.floor(f(d, y) / step);\n return inv ? (d, y) => inv(u(d, y), y) : u;\n} // returns the day of the year based on week number, day of week,\n// and the day of the week for the first day of the year\n\n\nfunction weekday(week, day, firstDay) {\n return day + week * 7 - (firstDay + 6) % 7;\n} // -- LOCAL TIME --\n\n\nconst localGet = {\n [YEAR]: d => d.getFullYear(),\n [QUARTER]: d => Math.floor(d.getMonth() / 3),\n [MONTH]: d => d.getMonth(),\n [DATE]: d => d.getDate(),\n [HOURS]: d => d.getHours(),\n [MINUTES]: d => d.getMinutes(),\n [SECONDS]: d => d.getSeconds(),\n [MILLISECONDS]: d => d.getMilliseconds(),\n [DAYOFYEAR]: d => localDayOfYear(d),\n [WEEK]: d => localWeekNum(d),\n [WEEK + DAY]: (d, y) => weekday(localWeekNum(d), d.getDay(), localFirst(y)),\n [DAY]: (d, y) => weekday(1, d.getDay(), localFirst(y))\n};\nconst localInv = {\n [QUARTER]: q => 3 * q,\n [WEEK]: (w, y) => weekday(w, 0, localFirst(y))\n};\nfunction timeFloor(units, step) {\n return floor(units, step || 1, localGet, localInv, localDate);\n} // -- UTC TIME --\n\nconst utcGet = {\n [YEAR]: d => d.getUTCFullYear(),\n [QUARTER]: d => Math.floor(d.getUTCMonth() / 3),\n [MONTH]: d => d.getUTCMonth(),\n [DATE]: d => d.getUTCDate(),\n [HOURS]: d => d.getUTCHours(),\n [MINUTES]: d => d.getUTCMinutes(),\n [SECONDS]: d => d.getUTCSeconds(),\n [MILLISECONDS]: d => d.getUTCMilliseconds(),\n [DAYOFYEAR]: d => utcDayOfYear(d),\n [WEEK]: d => utcWeekNum(d),\n [DAY]: (d, y) => weekday(1, d.getUTCDay(), utcFirst(y)),\n [WEEK + DAY]: (d, y) => weekday(utcWeekNum(d), d.getUTCDay(), utcFirst(y))\n};\nconst utcInv = {\n [QUARTER]: q => 3 * q,\n [WEEK]: (w, y) => weekday(w, 0, utcFirst(y))\n};\nfunction utcFloor(units, step) {\n return floor(units, step || 1, utcGet, utcInv, utcDate);\n}\n\nconst timeIntervals = {\n [YEAR]: timeYear,\n [QUARTER]: timeMonth.every(3),\n [MONTH]: timeMonth,\n [WEEK]: timeWeek,\n [DATE]: timeDay,\n [DAY]: timeDay,\n [DAYOFYEAR]: timeDay,\n [HOURS]: timeHour,\n [MINUTES]: timeMinute,\n [SECONDS]: timeSecond,\n [MILLISECONDS]: timeMillisecond\n};\nconst utcIntervals = {\n [YEAR]: utcYear,\n [QUARTER]: utcMonth.every(3),\n [MONTH]: utcMonth,\n [WEEK]: utcWeek,\n [DATE]: utcDay,\n [DAY]: utcDay,\n [DAYOFYEAR]: utcDay,\n [HOURS]: utcHour,\n [MINUTES]: utcMinute,\n [SECONDS]: utcSecond,\n [MILLISECONDS]: utcMillisecond\n};\nfunction timeInterval(unit) {\n return timeIntervals[unit];\n}\nfunction utcInterval(unit) {\n return utcIntervals[unit];\n}\n\nfunction offset(ival, date, step) {\n return ival ? ival.offset(date, step) : undefined;\n}\n\nfunction timeOffset(unit, date, step) {\n return offset(timeInterval(unit), date, step);\n}\nfunction utcOffset(unit, date, step) {\n return offset(utcInterval(unit), date, step);\n}\n\nfunction sequence(ival, start, stop, step) {\n return ival ? ival.range(start, stop, step) : undefined;\n}\n\nfunction timeSequence(unit, start, stop, step) {\n return sequence(timeInterval(unit), start, stop, step);\n}\nfunction utcSequence(unit, start, stop, step) {\n return sequence(utcInterval(unit), start, stop, step);\n}\n\nconst durationSecond = 1000,\n durationMinute = durationSecond * 60,\n durationHour = durationMinute * 60,\n durationDay = durationHour * 24,\n durationWeek = durationDay * 7,\n durationMonth = durationDay * 30,\n durationYear = durationDay * 365;\nconst Milli = [YEAR, MONTH, DATE, HOURS, MINUTES, SECONDS, MILLISECONDS],\n Seconds = Milli.slice(0, -1),\n Minutes = Seconds.slice(0, -1),\n Hours = Minutes.slice(0, -1),\n Day = Hours.slice(0, -1),\n Week = [YEAR, WEEK],\n Month = [YEAR, MONTH],\n Year = [YEAR];\nconst intervals = [[Seconds, 1, durationSecond], [Seconds, 5, 5 * durationSecond], [Seconds, 15, 15 * durationSecond], [Seconds, 30, 30 * durationSecond], [Minutes, 1, durationMinute], [Minutes, 5, 5 * durationMinute], [Minutes, 15, 15 * durationMinute], [Minutes, 30, 30 * durationMinute], [Hours, 1, durationHour], [Hours, 3, 3 * durationHour], [Hours, 6, 6 * durationHour], [Hours, 12, 12 * durationHour], [Day, 1, durationDay], [Week, 1, durationWeek], [Month, 1, durationMonth], [Month, 3, 3 * durationMonth], [Year, 1, durationYear]];\nfunction bin (opt) {\n const ext = opt.extent,\n max = opt.maxbins || 40,\n target = Math.abs(span(ext)) / max;\n let i = bisector(i => i[2]).right(intervals, target),\n units,\n step;\n\n if (i === intervals.length) {\n units = Year, step = tickStep(ext[0] / durationYear, ext[1] / durationYear, max);\n } else if (i) {\n i = intervals[target / intervals[i - 1][2] < intervals[i][2] / target ? i - 1 : i];\n units = i[0];\n step = i[1];\n } else {\n units = Milli;\n step = Math.max(tickStep(ext[0], ext[1], max), 1);\n }\n\n return {\n units,\n step\n };\n}\n\nexport { DATE, DAY, DAYOFYEAR, HOURS, MILLISECONDS, MINUTES, MONTH, QUARTER, SECONDS, TIME_UNITS, WEEK, YEAR, dayofyear, bin as timeBin, timeFloor, timeInterval, timeOffset, timeSequence, timeUnitSpecifier, timeUnits, utcFloor, utcInterval, utcOffset, utcSequence, utcdayofyear, utcweek, week };\n","import { TooManyIndicesError, BoundsCheckError, NegativeStepError } from '../errors';\nimport { ZarrArray } from './index';\nimport { Slice, ArraySelection, ChunkDimProjection, Indexer, DimIndexer, ChunkProjection, NormalizedArraySelection, SliceIndices, DimensionArraySelection } from './types';\nimport { sliceIndices, slice } from \"./slice\";\n\nfunction ensureArray(selection: ArraySelection): DimensionArraySelection[] {\n if (!Array.isArray(selection)) {\n return [selection];\n }\n return selection;\n}\n\nfunction checkSelectionLength(selection: DimensionArraySelection[], shape: number[]) {\n if (selection.length > shape.length) {\n throw new TooManyIndicesError(selection, shape);\n }\n}\n\n/**\n * Returns both the sliceIndices per dimension and the output shape after slicing.\n */\nexport function selectionToSliceIndices(selection: NormalizedArraySelection, shape: number[]): [(number | SliceIndices)[], number[]] {\n const sliceIndicesResult = [];\n const outShape = [];\n\n for (let i = 0; i < selection.length; i++) {\n const s = selection[i];\n if (typeof s === \"number\") {\n sliceIndicesResult.push(s);\n } else {\n const x = sliceIndices(s, shape[i]);\n const dimLength = x[3];\n\n outShape.push(dimLength);\n sliceIndicesResult.push(x);\n }\n }\n\n return [sliceIndicesResult, outShape];\n}\n\n/**\n * This translates \"...\", \":\", null into a list of slices or non-negative integer selections of length shape\n */\nexport function normalizeArraySelection(selection: ArraySelection | number, shape: number[], convertIntegerSelectionToSlices = false): NormalizedArraySelection {\n selection = replaceEllipsis(selection, shape);\n\n for (let i = 0; i < selection.length; i++) {\n const dimSelection = selection[i];\n\n if (typeof dimSelection === \"number\") {\n if (convertIntegerSelectionToSlices) {\n selection[i] = slice(dimSelection, dimSelection + 1, 1);\n } else {\n selection[i] = normalizeIntegerSelection(dimSelection, shape[i]);\n }\n } else if (isIntegerArray(dimSelection)) {\n throw new TypeError(\"Integer array selections are not supported (yet)\");\n } else if (dimSelection === \":\" || dimSelection === null) {\n selection[i] = slice(null, null, 1);\n }\n }\n\n return selection as NormalizedArraySelection;\n}\n\nexport function replaceEllipsis(selection: ArraySelection | number, shape: number[]) {\n selection = ensureArray(selection);\n\n let ellipsisIndex = -1;\n let numEllipsis = 0;\n for (let i = 0; i < selection.length; i++) {\n if (selection[i] === \"...\") {\n ellipsisIndex = i;\n numEllipsis += 1;\n }\n }\n\n if (numEllipsis > 1) {\n throw new RangeError(\"an index can only have a single ellipsis ('...')\");\n }\n if (numEllipsis === 1) {\n // count how many items to left and right of ellipsis\n const numItemsLeft = ellipsisIndex;\n const numItemsRight = selection.length - (numItemsLeft + 1);\n const numItems = selection.length - 1; // All non-ellipsis items\n if (numItems >= shape.length) {\n // Ellipsis does nothing, just remove it\n selection = selection.filter((x) => x !== \"...\");\n } else {\n // Replace ellipsis with as many slices are needed for number of dims\n const numNewItems = shape.length - numItems;\n let newItem = selection.slice(0, numItemsLeft).concat(new Array(numNewItems).fill(null));\n if (numItemsRight > 0) {\n newItem = newItem.concat(selection.slice(selection.length - numItemsRight));\n }\n selection = newItem;\n }\n }\n // Fill out selection if not completely specified\n if (selection.length < shape.length) {\n const numMissing = shape.length - selection.length;\n selection = selection.concat(new Array(numMissing).fill(null));\n }\n\n checkSelectionLength(selection, shape);\n return selection;\n}\n\nexport function normalizeIntegerSelection(dimSelection: number, dimLength: number): number {\n // Note: Maybe we should convert to integer or warn if dimSelection is not an integer\n\n // handle wraparound\n if (dimSelection < 0) {\n dimSelection = dimLength + dimSelection;\n }\n\n // handle out of bounds\n if (dimSelection >= dimLength || dimSelection < 0) {\n throw new BoundsCheckError(`index out of bounds for dimension with length ${dimLength}`);\n }\n\n return dimSelection;\n}\n\nfunction isInteger(s: any) {\n return typeof s === \"number\";\n}\n\nexport function isIntegerArray(s: any) {\n if (!Array.isArray(s)) {\n return false;\n }\n for (const e of s) {\n if (typeof e !== \"number\") {\n return false;\n }\n }\n return true;\n}\n\nexport function isSlice(s: (Slice | number | number[] | \"...\" | \":\" | null)): boolean {\n if (s !== null && (s as any)[\"_slice\"] === true) {\n return true;\n }\n return false;\n}\n\nfunction isContiguousSlice(s: (Slice | number | number[] | \"...\" | \":\" | null)): boolean {\n return isSlice(s) && ((s as Slice).step === null || (s as Slice).step === 1);\n}\n\nfunction isPositiveSlice(s: (Slice | number | number[] | \"...\" | \":\" | null)): boolean {\n return isSlice(s) && ((s as Slice).step === null || ((s as Slice).step as number) >= 1);\n}\n\nexport function isContiguousSelection(selection: ArraySelection) {\n selection = ensureArray(selection);\n\n for (let i = 0; i < selection.length; i++) {\n const s = selection[i];\n if (!(isIntegerArray(s) || isContiguousSlice(s) || s === \"...\")) {\n return false;\n }\n }\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction isBasicSelection(selection: ArraySelection): boolean {\n selection = ensureArray(selection);\n\n for (let i = 0; i < selection.length; i++) {\n const s = selection[i];\n if (!(isInteger(s) || isPositiveSlice(s))) {\n return false;\n }\n }\n return true;\n}\nfunction* product<T>(...iterables: (() => IterableIterator<T>)[]): IterableIterator<T[]> {\n if (iterables.length === 0) { return; }\n // make a list of iterators from the iterables\n const iterators = iterables.map(it => it());\n const results = iterators.map(it => it.next());\n\n // Disabled to allow empty inputs\n // if (results.some(r => r.done)) {\n // throw new Error(\"Input contains an empty iterator.\");\n // }\n\n for (let i = 0; ;) {\n if (results[i].done) {\n // reset the current iterator\n iterators[i] = iterables[i]();\n results[i] = iterators[i].next();\n // advance, and exit if we've reached the end\n if (++i >= iterators.length) { return; }\n } else {\n yield results.map(({ value }) => value);\n i = 0;\n }\n results[i] = iterators[i].next();\n }\n}\n\nexport class BasicIndexer implements Indexer {\n dimIndexers: DimIndexer[];\n shape: number[];\n dropAxes: null;\n\n constructor(selection: ArraySelection, array: ZarrArray) {\n selection = normalizeArraySelection(selection, array.shape);\n\n // Setup per-dimension indexers\n this.dimIndexers = [];\n const arrayShape = array.shape;\n for (let i = 0; i < arrayShape.length; i++) {\n let dimSelection = selection[i];\n const dimLength = arrayShape[i];\n const dimChunkLength = array.chunks[i];\n\n if (dimSelection === null) {\n dimSelection = slice(null);\n }\n\n\n if (isInteger(dimSelection)) {\n this.dimIndexers.push(new IntDimIndexer(dimSelection as number, dimLength, dimChunkLength));\n } else if (isSlice(dimSelection)) {\n this.dimIndexers.push(new SliceDimIndexer(dimSelection as Slice, dimLength, dimChunkLength));\n } else {\n throw new RangeError(`Unspported selection item for basic indexing; expected integer or slice, got ${dimSelection}`);\n }\n }\n\n this.shape = [];\n for (const d of this.dimIndexers) {\n if (d instanceof SliceDimIndexer) {\n this.shape.push(d.numItems);\n }\n }\n this.dropAxes = null;\n }\n\n * iter() {\n const dimIndexerIterables = this.dimIndexers.map(x => (() => x.iter()));\n const dimIndexerProduct = product(...dimIndexerIterables);\n\n for (const dimProjections of dimIndexerProduct) {\n // TODO fix this, I think the product outputs too many combinations\n const chunkCoords = [];\n const chunkSelection = [];\n const outSelection = [];\n\n for (const p of dimProjections) {\n chunkCoords.push((p).dimChunkIndex);\n chunkSelection.push((p).dimChunkSelection);\n if ((p).dimOutSelection !== null) {\n outSelection.push((p).dimOutSelection);\n }\n }\n\n yield ({\n chunkCoords,\n chunkSelection,\n outSelection,\n } as ChunkProjection);\n }\n\n }\n}\n\nclass IntDimIndexer implements DimIndexer {\n dimSelection: number;\n dimLength: number;\n dimChunkLength: number;\n numItems: number;\n\n constructor(dimSelection: number, dimLength: number, dimChunkLength: number) {\n dimSelection = normalizeIntegerSelection(dimSelection, dimLength);\n this.dimSelection = dimSelection;\n this.dimLength = dimLength;\n this.dimChunkLength = dimChunkLength;\n this.numItems = 1;\n }\n\n * iter() {\n const dimChunkIndex = Math.floor(this.dimSelection / this.dimChunkLength);\n const dimOffset = dimChunkIndex * this.dimChunkLength;\n const dimChunkSelection = this.dimSelection - dimOffset;\n const dimOutSelection = null;\n yield {\n dimChunkIndex,\n dimChunkSelection,\n dimOutSelection,\n } as ChunkDimProjection;\n }\n}\n\nclass SliceDimIndexer implements DimIndexer {\n dimLength: number;\n dimChunkLength: number;\n numItems: number;\n numChunks: number;\n\n start: number;\n stop: number;\n step: number;\n\n constructor(dimSelection: Slice, dimLength: number, dimChunkLength: number) {\n // Normalize\n const [start, stop, step] = sliceIndices(dimSelection, dimLength);\n this.start = start;\n this.stop = stop;\n this.step = step;\n if (this.step < 1) {\n throw new NegativeStepError();\n }\n\n this.dimLength = dimLength;\n this.dimChunkLength = dimChunkLength;\n this.numItems = Math.max(0, Math.ceil((this.stop - this.start) / this.step));\n this.numChunks = Math.ceil(this.dimLength / this.dimChunkLength);\n }\n\n *iter() {\n const dimChunkIndexFrom = Math.floor(this.start / this.dimChunkLength);\n const dimChunkIndexTo = Math.ceil(this.stop / this.dimChunkLength);\n\n // Iterate over chunks in range\n for (let dimChunkIndex = dimChunkIndexFrom; dimChunkIndex < dimChunkIndexTo; dimChunkIndex++) {\n\n // Compute offsets for chunk within overall array\n const dimOffset = dimChunkIndex * this.dimChunkLength;\n const dimLimit = Math.min(this.dimLength, (dimChunkIndex + 1) * this.dimChunkLength);\n\n // Determine chunk length, accounting for trailing chunk\n const dimChunkLength = dimLimit - dimOffset;\n\n let dimChunkSelStart: number;\n let dimChunkSelStop: number;\n let dimOutOffset: number;\n\n if (this.start < dimOffset) {\n // Selection starts before current chunk\n\n dimChunkSelStart = 0;\n const remainder = (dimOffset - this.start) % this.step;\n if (remainder > 0) {\n dimChunkSelStart += this.step - remainder;\n }\n // Compute number of previous items, provides offset into output array\n dimOutOffset = Math.ceil((dimOffset - this.start) / this.step);\n } else {\n // Selection starts within current chunk\n dimChunkSelStart = this.start - dimOffset;\n dimOutOffset = 0;\n }\n\n if (this.stop > dimLimit) {\n // Selection ends after current chunk\n dimChunkSelStop = dimChunkLength;\n } else {\n // Selection ends within current chunk\n dimChunkSelStop = this.stop - dimOffset;\n }\n\n const dimChunkSelection = slice(dimChunkSelStart, dimChunkSelStop, this.step);\n const dimChunkNumItems = Math.ceil((dimChunkSelStop - dimChunkSelStart) / this.step);\n const dimOutSelection = slice(dimOutOffset, dimOutOffset + dimChunkNumItems);\n yield {\n dimChunkIndex,\n dimChunkSelection,\n dimOutSelection,\n } as ChunkDimProjection;\n }\n\n }\n\n}\n","import type { Codec, CompressorConfig } from 'numcodecs';\n\n// TODO: This interface is tied to compressors in numcodecs..\n// might be better to just use 'any' or have numcodecs export complete \n// (optional) config? \ninterface Options {\n level?: number;\n cname?: string;\n blocksize?: number;\n clevel?: number;\n shuffle?: number;\n}\n\ntype CodecConstructor = { fromConfig(config: Options & CompressorConfig): Codec };\ntype CodecImporter = () => CodecConstructor | Promise<CodecConstructor>;\n\nconst registry: Map<string, CodecImporter> = new Map();\n\nexport function addCodec(id: string, importFn: CodecImporter) {\n registry.set(id, importFn);\n}\n\nexport async function getCodec<T extends Codec>(config: Options & CompressorConfig): Promise<T> {\n if (!registry.has(config.id)) {\n throw new Error(`Compression codec ${config.id} is not supported by Zarr.js yet.`);\n }\n const codec = await (registry.get(config.id) as CodecImporter)();\n return codec.fromConfig(config) as T;\n}\n","/**\n * Closely resembles the functions on the MutableMapping type in Python.\n */\nexport interface MutableMapping<T, O=any> {\n getItem(item: string, opts?: O): T;\n setItem(item: string, value: T): boolean;\n deleteItem(item: string): boolean;\n containsItem(item: string): boolean;\n\n proxy(): MutableMappingProxy<T>;\n\n // length(): number;\n}\n\n/**\n * Closely resembles the functions on the MutableMapping type in Python.\n */\nexport interface AsyncMutableMapping<T, O=any> {\n getItem(item: string, opts?: O): Promise<T>;\n setItem(item: string, value: T): Promise<boolean>;\n deleteItem(item: string): Promise<boolean>;\n containsItem(item: string): Promise<boolean>;\n // length(): number;\n}\n\nexport interface MutableMappingProxy<T> {\n [key: string]: T;\n}\n\nexport interface AsyncMutableMappingProxy<T> {\n [key: string]: T | Promise<T>;\n}\n\n\n/**\n * A proxy allows for accessing, setting and deleting the keys in the mutable mapping using\n * m[\"a\"] or even m.a notation.\n */\nexport function createProxy<S, T>(mapping: S & MutableMapping<T>): (S & MutableMappingProxy<T>);\nexport function createProxy<S, T>(mapping: S & AsyncMutableMapping<T>): (S & AsyncMutableMappingProxy<T>);\nexport function createProxy<S, T>(mapping: (S & MutableMapping<T>) | (S & AsyncMutableMapping<T>)): (S & MutableMappingProxy<T>) | (S & AsyncMutableMappingProxy<T>) {\n return new Proxy(mapping as any, {\n set(target, key, value, _receiver) {\n return target.setItem(key as string, value);\n },\n get(target, key, _receiver) {\n return target.getItem(key as string);\n },\n deleteProperty(target, key) {\n return target.deleteItem(key as string);\n },\n has(target, key) {\n return target.containsItem(key as string);\n }\n });\n}","export interface ZarrError {\n __zarr__: string;\n}\n\nfunction isZarrError(err: unknown): err is ZarrError {\n return typeof err === 'object' && err !== null && '__zarr__' in err;\n}\n\nexport function isKeyError(o: unknown) {\n return isZarrError(o) && o.__zarr__ === 'KeyError';\n}\n\n// Custom error messages, note we have to patch the prototype of the\n// errors to fix `instanceof` calls, see:\n// https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work\nexport class ContainsArrayError extends Error implements ZarrError {\n __zarr__ = 'ContainsArrayError';\n constructor(path: string) {\n super(`path ${path} contains an array`);\n Object.setPrototypeOf(this, ContainsArrayError.prototype);\n }\n}\n\nexport class ContainsGroupError extends Error implements ZarrError {\n __zarr__ = 'ContainsGroupError';\n constructor(path: string) {\n super(`path ${path} contains a group`);\n Object.setPrototypeOf(this, ContainsGroupError.prototype);\n }\n}\n\nexport class ArrayNotFoundError extends Error implements ZarrError {\n __zarr__ = 'ArrayNotFoundError';\n constructor(path: string) {\n super(`array not found at path ${path}`);\n Object.setPrototypeOf(this, ArrayNotFoundError.prototype);\n }\n}\n\nexport class GroupNotFoundError extends Error implements ZarrError {\n __zarr__ = 'GroupNotFoundError';\n constructor(path: string) {\n super(`ground not found at path ${path}`);\n Object.setPrototypeOf(this, GroupNotFoundError.prototype);\n }\n}\n\nexport class PathNotFoundError extends Error implements ZarrError {\n __zarr__ = 'PathNotFoundError';\n constructor(path: string) {\n super(`nothing not found at path ${path}`);\n Object.setPrototypeOf(this, PathNotFoundError.prototype);\n }\n}\n\nexport class PermissionError extends Error implements ZarrError {\n __zarr__ = 'PermissionError';\n constructor(message: string) {\n super(message);\n Object.setPrototypeOf(this, PermissionError.prototype);\n }\n}\n\nexport class KeyError extends Error implements ZarrError {\n __zarr__ = 'KeyError';\n constructor(key: string) {\n super(`key ${key} not present`);\n Object.setPrototypeOf(this, KeyError.prototype);\n }\n}\n\nexport class TooManyIndicesError extends RangeError implements ZarrError {\n __zarr__ = 'TooManyIndicesError';\n constructor(selection: any[], shape: number[]) {\n super(`too many indices for array; expected ${shape.length}, got ${selection.length}`);\n Object.setPrototypeOf(this, TooManyIndicesError.prototype);\n }\n}\n\nexport class BoundsCheckError extends RangeError implements ZarrError {\n __zarr__ = 'BoundsCheckError';\n constructor(message: string) {\n super(message);\n Object.setPrototypeOf(this, BoundsCheckError.prototype);\n }\n}\n\nexport class InvalidSliceError extends RangeError implements ZarrError {\n __zarr__ = 'InvalidSliceError';\n constructor(from: any, to: any, stepSize: any, reason: any) {\n super(`slice arguments slice(${from}, ${to}, ${stepSize}) invalid: ${reason}`);\n Object.setPrototypeOf(this, InvalidSliceError.prototype);\n }\n}\n\nexport class NegativeStepError extends Error implements ZarrError {\n __zarr__ = 'NegativeStepError';\n constructor() {\n super(`Negative step size is not supported when indexing.`);\n Object.setPrototypeOf(this, NegativeStepError.prototype);\n }\n}\n\nexport class ValueError extends Error implements ZarrError {\n __zarr__ = 'ValueError';\n constructor(message: string) {\n super(message);\n Object.setPrototypeOf(this, ValueError.prototype);\n }\n}\n\nexport class HTTPError extends Error implements ZarrError {\n __zarr__ = 'HTTPError';\n constructor(code: string) {\n super(code);\n Object.setPrototypeOf(this, HTTPError.prototype);\n }\n}\n","\nimport { InvalidSliceError } from '../errors';\nimport { Slice, SliceArgument, SliceIndices } from \"./types\";\n\nexport function slice(start: SliceArgument, stop: SliceArgument | undefined = undefined, step: number | null = null): Slice {\n // tslint:disable-next-line: strict-type-predicates\n if (start === undefined) { // Not possible in typescript\n throw new InvalidSliceError(start, stop, step, \"The first argument must not be undefined\");\n }\n\n if ((typeof start === \"string\" && start !== \":\") || (typeof stop === \"string\" && stop !== \":\")) { // Note in typescript this will never happen with type checking.\n throw new InvalidSliceError(start, stop, step, \"Arguments can only be integers, \\\":\\\" or null\");\n }\n\n // slice(5) === slice(null, 5)\n if (stop === undefined) {\n stop = start;\n start = null;\n }\n\n // if (start !== null && stop !== null && start > stop) {\n // throw new InvalidSliceError(start, stop, step, \"to is higher than from\");\n // }\n\n return {\n start: start === \":\" ? null : start,\n stop: stop === \":\" ? null : stop,\n step,\n _slice: true,\n };\n}\n\n\n/**\n * Port of adjustIndices\n * https://github.com/python/cpython/blob/master/Objects/sliceobject.c#L243\n */\nfunction adjustIndices(start: number, stop: number, step: number, length: number) {\n if (start < 0) {\n start += length;\n if (start < 0) {\n start = (step < 0) ? -1 : 0;\n }\n } else if (start >= length) {\n start = (step < 0) ? length - 1 : length;\n }\n\n if (stop < 0) {\n stop += length;\n if (stop < 0) {\n stop = (step < 0) ? -1 : 0;\n }\n } else if (stop >= length) {\n stop = (step < 0) ? length - 1 : length;\n }\n\n if (step < 0) {\n if (stop < start) {\n const length = Math.floor((start - stop - 1) / (-step) + 1);\n return [start, stop, step, length];\n }\n } else {\n if (start < stop) {\n const length = Math.floor((stop - start - 1) / step + 1);\n return [start, stop, step, length];\n }\n }\n return [start, stop, step, 0];\n}\n\n/**\n * Port of slice.indices(n) and PySlice_Unpack\n * https://github.com/python/cpython/blob/master/Objects/sliceobject.c#L166\n * https://github.com/python/cpython/blob/master/Objects/sliceobject.c#L198 \n * \n * Behaviour might be slightly different as it's a weird hybrid implementation.\n */\nexport function sliceIndices(slice: Slice, length: number): SliceIndices {\n let start: number;\n let stop: number;\n let step: number;\n\n if (slice.step === null) {\n step = 1;\n } else {\n step = slice.step;\n }\n\n if (slice.start === null) {\n start = step < 0 ? Number.MAX_SAFE_INTEGER : 0;\n } else {\n start = slice.start;\n if (start < 0) {\n start += length;\n }\n }\n\n if (slice.stop === null) {\n stop = step < 0 ? -Number.MAX_SAFE_INTEGER : Number.MAX_SAFE_INTEGER;\n } else {\n stop = slice.stop;\n if (stop < 0) {\n stop += length;\n }\n }\n\n // This clips out of bounds slices\n const s = adjustIndices(start, stop, step, length);\n start = s[0];\n stop = s[1];\n step = s[2];\n // The output length\n length = s[3];\n\n\n // With out of bounds slicing these two assertions are not useful.\n // if (stop > length) throw new Error(\"Stop greater than length\");\n // if (start >= length) throw new Error(\"Start greater than or equal to length\");\n\n if (step === 0) throw new Error(\"Step size 0 is invalid\");\n\n return [start, stop, step, length];\n}","import {writeConfig} from 'vega';\n\n// polyfill for IE\nif (!String.prototype.startsWith) {\n // eslint-disable-next-line no-extend-native,func-names\n String.prototype.startsWith = function (search, pos) {\n return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n };\n}\n\nexport function isURL(s: string): boolean {\n return s.startsWith('http://') || s.startsWith('https://') || s.startsWith('//');\n}\n\nexport type DeepPartial<T> = {[P in keyof T]?: P extends unknown ? unknown : DeepPartial<T[P]>};\n\nexport function mergeDeep<T>(dest: T, ...src: readonly DeepPartial<T>[]): T {\n for (const s of src) {\n deepMerge_(dest, s);\n }\n return dest;\n}\n\nfunction deepMerge_(dest: any, src: any) {\n for (const property of Object.keys(src)) {\n writeConfig(dest, property, src[property], true);\n }\n}\n","import { normalizeStoragePath, normalizeChunks, normalizeDtype, normalizeShape, normalizeOrder, normalizeFillValue } from '../util';\nimport { Store } from './types';\nimport { ARRAY_META_KEY, GROUP_META_KEY } from '../names';\nimport { FillType, Order, Filter, CompressorConfig, ZarrGroupMetadata, ChunksArgument, DtypeString, ZarrArrayMetadata, FillTypeSerialized } from '../types';\nimport { ContainsArrayError, ContainsGroupError } from '../errors';\n\n\n/**\n * Return true if the store contains an array at the given logical path.\n */\nexport async function containsArray(store: Store, path: string | null = null) {\n path = normalizeStoragePath(path);\n const prefix = pathToPrefix(path);\n const key = prefix + ARRAY_META_KEY;\n return store.containsItem(key);\n}\n\n/**\n * Return true if the store contains a group at the given logical path.\n */\nexport async function containsGroup<T>(store: Store, path: string | null = null) {\n path = normalizeStoragePath(path);\n const prefix = pathToPrefix(path);\n const key = prefix + GROUP_META_KEY;\n return store.containsItem(key);\n}\n\n\nexport function pathToPrefix(path: string): string {\n // assume path already normalized\n if (path.length > 0) {\n return path + '/';\n }\n return '';\n}\n\nasync function listDirFromKeys(store: Store, path: string) {\n // assume path already normalized\n const prefix = pathToPrefix(path);\n const children = new Set<string>();\n\n for (const key in await store.keys()) {\n if (key.startsWith(prefix) && key.length > prefix.length) {\n const suffix = key.slice(prefix.length);\n const child = suffix.split('/')[0];\n children.add(child);\n }\n }\n return Array.from(children).sort();\n}\n\nasync function requireParentGroup(store: Store, path: string, chunkStore: Store | null, overwrite: boolean) {\n // Assume path is normalized\n if (path.length === 0) {\n return;\n }\n\n const segments = path.split(\"/\");\n let p = \"\";\n for (const s of segments.slice(0, segments.length - 1)) {\n p += s;\n if (await containsArray(store, p)) {\n await initGroupMetadata(store, p, overwrite);\n } else if (!await containsGroup(store, p)) {\n await initGroupMetadata(store, p);\n }\n p += \"/\";\n }\n}\n\n/**\n * Obtain a directory listing for the given path. If `store` provides a `listDir`\n * method, this will be called, otherwise will fall back to implementation via the\n * `MutableMapping` interface.\n * @param store \n */\nexport async function listDir(store: Store, path: string | null = null) {\n path = normalizeStoragePath(path);\n if (store.listDir) {\n return store.listDir(path);\n } else {\n return listDirFromKeys(store, path);\n }\n}\n\nasync function initGroupMetadata(store: Store, path: string | null = null,overwrite = false) {\n path = normalizeStoragePath(path);\n\n // Guard conditions\n if (overwrite) {\n throw Error(\"Group overwriting not implemented yet :(\");\n } else if (await containsArray(store, path)) {\n throw new ContainsArrayError(path);\n } else if (await containsGroup(store, path)) {\n throw new ContainsGroupError(path);\n }\n\n const metadata: ZarrGroupMetadata = { zarr_format: 2 };\n const key = pathToPrefix(path) + GROUP_META_KEY;\n await store.setItem(key, JSON.stringify(metadata));\n}\n/**\n * Initialize a group store. Note that this is a low-level function and there should be no\n * need to call this directly from user code.\n */\nexport async function initGroup(store: Store, path: string | null = null, chunkStore: null | Store = null, overwrite = false) {\n path = normalizeStoragePath(path);\n await requireParentGroup(store, path, chunkStore, overwrite);\n await initGroupMetadata(store, path, overwrite);\n}\n\nasync function initArrayMetadata(\n store: Store,\n shape: number | number[],\n chunks: ChunksArgument,\n dtype: DtypeString,\n path: string,\n compressor: null | CompressorConfig,\n fillValue: FillType,\n order: Order,\n overwrite: boolean,\n chunkStore: null | Store,\n filters: null | Filter[]\n) {\n // Guard conditions\n if (overwrite) {\n throw Error(\"Array overwriting not implemented yet :(\");\n } else if (await containsArray(store, path)) {\n throw new ContainsArrayError(path);\n } else if (await containsGroup(store, path)) {\n throw new ContainsGroupError(path);\n }\n\n // Normalize metadata, does type checking too.\n dtype = normalizeDtype(dtype);\n shape = normalizeShape(shape);\n chunks = normalizeChunks(chunks, shape);\n order = normalizeOrder(order);\n fillValue = normalizeFillValue(fillValue);\n\n if (filters !== null && filters.length > 0) {\n throw Error(\"Filters are not supported yet\");\n }\n\n let serializedFillValue: FillTypeSerialized = fillValue;\n\n if (typeof fillValue === \"number\") {\n if (Number.isNaN(fillValue)) serializedFillValue = \"NaN\";\n if (Number.POSITIVE_INFINITY === fillValue) serializedFillValue = \"Infinity\";\n if (Number.NEGATIVE_INFINITY === fillValue) serializedFillValue = \"-Infinity\";\n }\n\n filters = null;\n\n const metadata: ZarrArrayMetadata = {\n zarr_format: 2,\n\n shape: shape,\n chunks: chunks as number[],\n\n dtype: dtype,\n fill_value: serializedFillValue,\n order: order,\n compressor: compressor,\n filters: filters,\n };\n const metaKey = pathToPrefix(path) + ARRAY_META_KEY;\n await store.setItem(metaKey, JSON.stringify(metadata));\n}\n\n/**\n * \n * Initialize an array store with the given configuration. Note that this is a low-level\n * function and there should be no need to call this directly from user code\n */\nexport async function initArray(\n store: Store,\n shape: number | number[],\n chunks: ChunksArgument,\n dtype: DtypeString,\n path: string | null = null,\n compressor: null | CompressorConfig = null,\n fillValue: FillType = null,\n order: Order = \"C\",\n overwrite = false,\n chunkStore: null | Store = null,\n filters: null | Filter[] = null\n) {\n\n path = normalizeStoragePath(path);\n await requireParentGroup(store, path, chunkStore, overwrite);\n await initArrayMetadata(store, shape, chunks, dtype, path, compressor, fillValue, order, overwrite, chunkStore, filters);\n}\n","export const ARRAY_META_KEY = \".zarray\";\nexport const GROUP_META_KEY = \".zgroup\";\nexport const ATTRS_META_KEY = \".zattrs\";\n","import { ZarrMetadataType, UserAttributes } from './types';\nimport { ValidStoreType } from './storage/types';\nimport { IS_NODE } from './util';\n\nexport function parseMetadata(\n s: ValidStoreType | ZarrMetadataType\n): ZarrMetadataType | UserAttributes {\n // Here we allow that a store may return an already-parsed metadata object,\n // or a string of JSON that we will parse here. We allow for an already-parsed\n // object to accommodate a consolidated metadata store, where all the metadata for\n // all groups and arrays will already have been parsed from JSON.\n if (typeof s !== 'string') {\n // tslint:disable-next-line: strict-type-predicates\n if (IS_NODE && Buffer.isBuffer(s)) {\n return JSON.parse(s.toString());\n } else if (s instanceof ArrayBuffer) {\n const utf8Decoder = new TextDecoder();\n const bytes = new Uint8Array(s);\n return JSON.parse(utf8Decoder.decode(bytes));\n } else {\n return s;\n }\n }\n return JSON.parse(s);\n}\n","import { createProxy, AsyncMutableMapping, AsyncMutableMappingProxy } from './mutableMapping';\nimport { Store } from './storage/types';\nimport { parseMetadata } from './metadata';\nimport { UserAttributes } from './types';\nimport { PermissionError } from './errors';\n\n/**\n * Class providing access to user attributes on an array or group. Should not be\n * instantiated directly, will be available via the `.attrs` property of an array or\n * group.\n */\nexport class Attributes<M extends UserAttributes> implements AsyncMutableMapping<any> {\n store: Store;\n key: string;\n readOnly: boolean;\n cache: boolean;\n private cachedValue: M | null;\n\n constructor(store: Store, key: string, readOnly: boolean, cache = true) {\n this.store = store;\n this.key = key;\n this.readOnly = readOnly;\n this.cache = cache;\n this.cachedValue = null;\n }\n\n /**\n * Retrieve all attributes as a JSON object.\n */\n public async asObject() {\n if (this.cache && this.cachedValue !== null) {\n return this.cachedValue;\n }\n const o = await this.getNoSync();\n if (this.cache) {\n this.cachedValue = o;\n }\n return o;\n }\n\n private async getNoSync(): Promise<M> {\n try {\n const data = await this.store.getItem(this.key);\n // TODO fix typing?\n return parseMetadata(data) as M;\n } catch (error) {\n return {} as M;\n }\n }\n\n private async setNoSync(key: string, value: any) {\n const d = await this.getNoSync();\n (d as any)[key] = value;\n await this.putNoSync(d);\n return true;\n }\n\n private async putNoSync(m: M) {\n await this.store.setItem(this.key, JSON.stringify(m));\n if (this.cache) {\n this.cachedValue = m;\n }\n }\n\n private async delNoSync(key: string): Promise<boolean> {\n const d = await this.getNoSync();\n delete (d as any)[key];\n await this.putNoSync(d);\n return true;\n }\n\n /**\n * Overwrite all attributes with the provided object in a single operation\n */\n async put(d: M) {\n if (this.readOnly) {\n throw new PermissionError(\"attributes are read-only\");\n }\n return this.putNoSync(d);\n }\n\n async setItem(key: string, value: any): Promise<boolean> {\n if (this.readOnly) {\n throw new PermissionError(\"attributes are read-only\");\n }\n return this.setNoSync(key, value);\n }\n\n async getItem(key: string) {\n return ((await this.asObject()) as any)[key];\n }\n\n async deleteItem(key: string) {\n if (this.readOnly) {\n throw new PermissionError(\"attributes are read-only\");\n }\n return this.delNoSync(key);\n }\n\n async containsItem(key: string) {\n return ((await this.asObject()) as any)[key] !== undefined;\n }\n\n proxy(): AsyncMutableMappingProxy<any> {\n return createProxy(this);\n }\n}","import { DtypeString } from '../types';\nimport { ValueError } from '../errors';\n\nexport type NestedArrayData = TypedArray | NDNestedArrayData;\nexport type NDNestedArrayData =\n | TypedArray[]\n | TypedArray[][]\n | TypedArray[][][]\n | TypedArray[][][][]\n | TypedArray[][][][][]\n | TypedArray[][][][][][];\n\nexport type TypedArray =\n | Uint8Array\n | Int8Array\n | Uint16Array\n | Int16Array\n | Uint32Array\n | Int32Array\n | Float32Array\n | Float64Array;\n\n// ArrayLike<any> & {\n// BYTES_PER_ELEMENT: number;\n// set(array: ArrayLike<number>, offset?: number): void;\n// slice(start?: number, end?: number): TypedArray;\n// subarray(start?: number, end?: number): TypedArray;\n// buffer: Buffer | ArrayBuffer;\n// constructor: TypedArrayConstructor<TypedArray>;\n// };\nexport type TypedArrayConstructor<TypedArray> = {\n new(): TypedArray;\n // tslint:disable-next-line: unified-signatures\n new(size: number): TypedArray;\n // tslint:disable-next-line: unified-signatures\n new(buffer: ArrayBuffer): TypedArray;\n BYTES_PER_ELEMENT: number;\n};\n\nexport const DTYPE_TYPEDARRAY_MAPPING: { [A in DtypeString]: TypedArrayConstructor<TypedArray> } = {\n '|b': Int8Array,\n '|B': Uint8Array,\n '|u1': Uint8Array,\n '|i1': Int8Array,\n '<b': Int8Array,\n '<B': Uint8Array,\n '<u1': Uint8Array,\n '<i1': Int8Array,\n '<u2': Uint16Array,\n '<i2': Int16Array,\n '<u4': Uint32Array,\n '<i4': Int32Array,\n '<f4': Float32Array,\n '<f8': Float64Array,\n '>b': Int8Array,\n '>B': Uint8Array,\n '>u1': Uint8Array,\n '>i1': Int8Array,\n '>u2': Uint16Array,\n '>i2': Int16Array,\n '>u4': Uint32Array,\n '>i4': Int32Array,\n '>f4': Float32Array,\n '>f8': Float64Array\n};\n\n/*\n * Called by NestedArray and RawArray constructors only.\n * We byte-swap the buffer of a store after decoding\n * since TypedArray views are little endian only.\n *\n * This means NestedArrays and RawArrays will always be little endian,\n * unless a numpy-like library comes around and can handle endianess\n * for buffer views.\n */\nexport function getTypedArrayDtypeString(t: TypedArray): DtypeString {\n // Favour the types below instead of small and big B\n if (t instanceof Uint8Array) return '|u1';\n if (t instanceof Int8Array) return '|i1';\n if (t instanceof Uint16Array) return '<u2';\n if (t instanceof Int16Array) return '<i2';\n if (t instanceof Uint32Array) return '<u4';\n if (t instanceof Int32Array) return '<i4';\n if (t instanceof Float32Array) return '<f4';\n if (t instanceof Float64Array) return '<f8';\n throw new ValueError('Mapping for TypedArray to Dtypestring not known');\n}\n","import { ArraySelection, SliceIndices } from '../core/types';\nimport { ValueError } from '../errors';\nimport { TypedArray, TypedArrayConstructor, NestedArrayData, NDNestedArrayData } from './types';\nimport { normalizeArraySelection, selectionToSliceIndices } from '../core/indexing';\n\n/**\n * Digs down into the dimensions of given array to find the TypedArray and returns its constructor.\n * Better to use sparingly.\n */\nexport function getNestedArrayConstructor<T extends TypedArray>(arr: any): TypedArrayConstructor<T> {\n // TODO fix typing\n // tslint:disable-next-line: strict-type-predicates\n if ((arr as TypedArray).byteLength !== undefined) {\n return (arr).constructor;\n }\n return getNestedArrayConstructor(arr[0]);\n}\n\n/**\n * Returns both the slice result and new output shape\n * @param arr NestedArray to slice\n * @param shape The shape of the NestedArray\n * @param selection\n */\nexport function sliceNestedArray<T extends TypedArray>(arr: NestedArrayData, shape: number[], selection: number | ArraySelection): [NestedArrayData | number, number[]] {\n // This translates \"...\", \":\", null into a list of slices or integer selections\n const normalizedSelection = normalizeArraySelection(selection, shape);\n const [sliceIndices, outShape] = selectionToSliceIndices(normalizedSelection, shape);\n const outArray = _sliceNestedArray(arr, shape, sliceIndices);\n return [outArray, outShape];\n}\n\nfunction _sliceNestedArray<T extends TypedArray>(arr: NestedArrayData, shape: number[], selection: (SliceIndices | number)[]): NestedArrayData | number {\n const currentSlice = selection[0];\n\n // Is this necessary?\n // // This is possible when a slice list is passed shorter than the amount of dimensions\n // // tslint:disable-next-line: strict-type-predicates\n // if (currentSlice === undefined) {\n // return arr.slice();\n // }\n\n // When a number is passed that dimension is squeezed\n if (typeof currentSlice === \"number\") {\n // Assume already normalized integer selection here.\n if (shape.length === 1) {\n return arr[currentSlice];\n } else {\n return _sliceNestedArray(arr[currentSlice] as NestedArrayData, shape.slice(1), selection.slice(1));\n }\n }\n const [from, to, step, outputSize] = currentSlice;\n\n if (outputSize === 0) {\n return new (getNestedArrayConstructor(arr))(0);\n }\n\n if (shape.length === 1) {\n if (step === 1) {\n return (arr as TypedArray).slice(from, to);\n }\n\n const newArrData = new (arr.constructor as TypedArrayConstructor<T>)(outputSize);\n for (let i = 0; i < outputSize; i++) {\n newArrData[i] = (arr as TypedArray)[from + i * step];\n }\n return newArrData;\n }\n\n let newArr = new Array(outputSize);\n\n for (let i = 0; i < outputSize; i++) {\n newArr[i] = _sliceNestedArray(arr[from + i * step] as NestedArrayData, shape.slice(1), selection.slice(1));\n }\n\n // This is necessary to ensure that the return value is a NestedArray if the last dimension is squeezed\n // e.g. shape [2,1] with slice [:, 0] would otherwise result in a list of numbers instead of a valid NestedArray\n if (outputSize > 0 && typeof newArr[0] === \"number\") {\n const typedArrayConstructor = (arr[0] as TypedArray).constructor;\n newArr = (typedArrayConstructor as any).from(newArr);\n }\n\n return newArr;\n}\n\n\n\n\nexport function setNestedArrayToScalar<T extends TypedArray>(dstArr: NestedArrayData, value: number, destShape: number[], selection: number | ArraySelection) {\n // This translates \"...\", \":\", null, etc into a list of slices.\n const normalizedSelection = normalizeArraySelection(selection, destShape, true);\n\n // Above we force the results to be SliceIndicesIndices only, without integer selections making this cast is safe.\n const [sliceIndices, _outShape] = selectionToSliceIndices(normalizedSelection, destShape) as [SliceIndices[], number[]];\n _setNestedArrayToScalar(dstArr, value, destShape, sliceIndices);\n}\n\nexport function setNestedArray<T extends TypedArray>(dstArr: NestedArrayData, sourceArr: NestedArrayData, destShape: number[], sourceShape: number[], selection: number | ArraySelection) {\n // This translates \"...\", \":\", null, etc into a list of slices.\n const normalizedSelection = normalizeArraySelection(selection, destShape, false);\n const [sliceIndices, outShape] = selectionToSliceIndices(normalizedSelection, destShape);\n\n // TODO: replace with non stringify equality check\n if (JSON.stringify(outShape) !== JSON.stringify(sourceShape)) {\n throw new ValueError(`Shape mismatch in target and source NestedArray: ${outShape} and ${sourceShape}`);\n }\n\n _setNestedArray(dstArr, sourceArr, destShape, sliceIndices);\n}\n\n\nfunction _setNestedArray<T extends TypedArray>(dstArr: NestedArrayData, sourceArr: NestedArrayData | number, shape: number[], selection: (SliceIndices | number)[]) {\n\n const currentSlice = selection[0];\n\n if (typeof sourceArr === \"number\") {\n _setNestedArrayToScalar(dstArr, sourceArr, shape, selection.map(x => typeof x === \"number\" ? [x, x + 1, 1, 1] : x));\n return;\n }\n\n // This dimension is squeezed.\n if (typeof currentSlice === \"number\") {\n _setNestedArray((dstArr as NDNestedArrayData)[currentSlice], sourceArr, shape.slice(1), selection.slice(1));\n return;\n }\n\n const [from, _to, step, outputSize] = currentSlice;\n\n if (shape.length === 1) {\n if (step === 1) {\n (dstArr as TypedArray).set(sourceArr as TypedArray, from);\n } else {\n for (let i = 0; i < outputSize; i++) {\n dstArr[from + i * step] = (sourceArr)[i];\n }\n }\n return;\n }\n\n for (let i = 0; i < outputSize; i++) {\n _setNestedArray((dstArr as NDNestedArrayData)[from + i * step], (sourceArr as NDNestedArrayData)[i], shape.slice(1), selection.slice(1));\n }\n}\n\nfunction _setNestedArrayToScalar<T extends TypedArray>(dstArr: NestedArrayData, value: number, shape: number[], selection: SliceIndices[]) {\n const currentSlice = selection[0];\n\n const [from, to, step, outputSize] = currentSlice;\n\n if (shape.length === 1) {\n if (step === 1) {\n (dstArr as TypedArray).fill(value, from, to);\n } else {\n for (let i = 0; i < outputSize; i++) {\n dstArr[from + i * step] = value;\n }\n }\n return;\n }\n\n for (let i = 0; i < outputSize; i++) {\n _setNestedArrayToScalar((dstArr as NDNestedArrayData)[from + i * step], value, shape.slice(1), selection.slice(1));\n }\n}\n\nexport function flattenNestedArray(arr: NestedArrayData, shape: number[], constr?: TypedArrayConstructor<TypedArray>): TypedArray {\n if (constr === undefined) {\n constr = getNestedArrayConstructor(arr);\n }\n const size = shape.reduce((x, y) => x * y, 1);\n const outArr = new constr(size);\n\n _flattenNestedArray(arr, shape, outArr, 0);\n\n return outArr;\n}\n\nfunction _flattenNestedArray(arr: NestedArrayData, shape: number[], outArr: TypedArray, offset: number) {\n if (shape.length === 1) {\n // This is only ever reached if called with rank 1 shape, never reached through recursion.\n // We just slice set the array directly from one level above to save some function calls.\n outArr.set((arr as TypedArray), offset);\n return;\n }\n\n if (shape.length === 2) {\n for (let i = 0; i < shape[0]; i++) {\n outArr.set((arr as TypedArray[])[i], offset + shape[1] * i);\n }\n return arr;\n }\n\n const nextShape = shape.slice(1);\n // Small optimization possible here: this can be precomputed for different levels of depth and passed on.\n const mult = nextShape.reduce((x, y) => x * y, 1);\n\n for (let i = 0; i < shape[0]; i++) {\n _flattenNestedArray((arr as NDNestedArrayData)[i], nextShape, outArr, offset + mult * i);\n }\n return arr;\n}\n","import { DtypeString } from '../types';\nimport { NestedArrayData, TypedArray, TypedArrayConstructor, DTYPE_TYPEDARRAY_MAPPING, getTypedArrayDtypeString } from './types';\nimport { ArraySelection, Slice } from '../core/types';\nimport { slice } from '../core/slice';\nimport { ValueError } from '../errors';\nimport { normalizeShape, IS_NODE } from '../util';\nimport { setNestedArray, setNestedArrayToScalar, flattenNestedArray, sliceNestedArray } from './ops';\n\nexport class NestedArray<T extends TypedArray> {\n dtype: DtypeString;\n shape: number[];\n data: NestedArrayData;\n\n constructor(data: TypedArray, shape?: number | number[], dtype?: DtypeString)\n constructor(data: Buffer | ArrayBuffer | NestedArrayData | null, shape: number | number[], dtype: DtypeString)\n constructor(data: Buffer | ArrayBuffer | NestedArrayData | TypedArray | null, shape?: number | number[], dtype?: DtypeString) {\n const dataIsTypedArray = data !== null && !!(data as TypedArray).BYTES_PER_ELEMENT;\n\n if (shape === undefined) {\n if (!dataIsTypedArray) {\n throw new ValueError(\"Shape argument is required unless you pass in a TypedArray\");\n }\n shape = [(data as TypedArray).length];\n }\n\n if (dtype === undefined) {\n if (!dataIsTypedArray) {\n throw new ValueError(\"Dtype argument is required unless you pass in a TypedArray\");\n }\n dtype = getTypedArrayDtypeString(data as TypedArray);\n }\n\n shape = normalizeShape(shape);\n this.shape = shape;\n this.dtype = dtype;\n\n if (dataIsTypedArray && shape.length !== 1) {\n data = (data as TypedArray).buffer;\n }\n\n // Zero dimension array.. they are a bit weirdly represented now, they will only ever occur internally\n if (this.shape.length === 0) {\n this.data = new DTYPE_TYPEDARRAY_MAPPING[dtype](1);\n }\n else if (\n // tslint:disable-next-line: strict-type-predicates\n (IS_NODE && Buffer.isBuffer(data))\n || data instanceof ArrayBuffer\n || data === null\n || data.toString().startsWith(\"[object ArrayBuffer]\") // Necessary for Node.js for some reason..\n ) {\n // Create from ArrayBuffer or Buffer\n const numShapeElements = shape.reduce((x, y) => x * y, 1);\n\n if (data === null) {\n data = new ArrayBuffer(numShapeElements * parseInt(dtype[dtype.length - 1], 10));\n }\n\n const numDataElements = (data as ArrayBuffer).byteLength / parseInt(dtype[dtype.length - 1], 10);\n if (numShapeElements !== numDataElements) {\n throw new Error(`Buffer has ${numDataElements} of dtype ${dtype}, shape is too large or small ${shape} (flat=${numShapeElements})`);\n }\n const typeConstructor: TypedArrayConstructor<TypedArray> = DTYPE_TYPEDARRAY_MAPPING[dtype];\n this.data = createNestedArray((data as ArrayBuffer), typeConstructor, shape);\n } else {\n this.data = data;\n }\n }\n\n public get(selection: Slice | \":\" | \"...\" | null | (Slice | null | \":\" | \"...\")[]): NestedArray<T>;\n public get(selection: ArraySelection): NestedArray<T> | number;\n public get(selection: ArraySelection): NestedArray<T> | number {\n const [sliceResult, outShape] = sliceNestedArray(this.data, this.shape, selection);\n if (outShape.length === 0) {\n return sliceResult as number;\n } else {\n return new NestedArray(sliceResult as NestedArrayData, outShape, this.dtype);\n }\n }\n\n public set(selection: ArraySelection = null, value: NestedArray<T> | number) {\n if (selection === null) {\n selection = [slice(null)];\n }\n if (typeof value === \"number\") {\n if (this.shape.length === 0) {\n // Zero dimension array..\n this.data[0] = value;\n } else {\n setNestedArrayToScalar(this.data, value, this.shape, selection);\n }\n } else {\n setNestedArray(this.data, value.data, this.shape, value.shape, selection);\n }\n }\n\n public flatten(): T {\n if (this.shape.length === 1) {\n return this.data as T;\n }\n return flattenNestedArray(this.data, this.shape, DTYPE_TYPEDARRAY_MAPPING[this.dtype]) as T;\n }\n\n /**\n * Currently only supports a single integer as the size, TODO: support start, stop, step.\n */\n public static arange(size: number, dtype: DtypeString = \"<i4\"): NestedArray<TypedArray> {\n const constr = DTYPE_TYPEDARRAY_MAPPING[dtype];\n const data = rangeTypedArray([size], constr);\n return new NestedArray(data, [size], dtype);\n }\n}\n\n\n\n/**\n * Creates a TypedArray with values 0 through N where N is the product of the shape.\n */\nexport function rangeTypedArray<T extends TypedArray>(shape: number[], tContructor: TypedArrayConstructor<T>) {\n const size = shape.reduce((x, y) => x * y, 1);\n const data = new tContructor(size);\n data.set([...Array(size).keys()]); // Sets range 0,1,2,3,4,5\n return data;\n}\n\n/**\n * Creates multi-dimensional (rank > 1) array given input data and shape recursively.\n * What it does is create a Array<Array<...<Array<Uint8Array>>> or some other typed array.\n * This is for internal use, there should be no need to call this from user code.\n * @param data a buffer containing the data for this array.\n * @param t constructor for the datatype of choice\n * @param shape list of numbers describing the size in each dimension\n * @param offset in bytes for this dimension\n */\nexport function createNestedArray<T extends TypedArray>(data: Buffer | ArrayBuffer, t: TypedArrayConstructor<T>, shape: number[], offset = 0): NestedArrayData {\n if (shape.length === 1) {\n // This is only ever reached if called with rank 1 shape, never reached through recursion.\n // We just slice set the array directly from one level above to save some function calls.\n return new t(data.slice(offset, offset + shape[0] * t.BYTES_PER_ELEMENT));\n }\n\n const arr = new Array<any>(shape[0]);\n if (shape.length === 2) {\n for (let i = 0; i < shape[0]; i++) {\n arr[i] = new t(data.slice(offset + shape[1] * i * t.BYTES_PER_ELEMENT, offset + shape[1] * (i + 1) * t.BYTES_PER_ELEMENT));\n }\n return arr;\n }\n\n const nextShape = shape.slice(1);\n // Small optimization possible here: this can be precomputed for different levels of depth and passed on.\n const mult = nextShape.reduce((x, y) => x * y, 1);\n\n for (let i = 0; i < shape[0]; i++) {\n arr[i] = createNestedArray(data, t, nextShape, offset + mult * i * t.BYTES_PER_ELEMENT);\n }\n return arr;\n}\n","import { ArraySelection, SliceIndices } from '../core/types';\nimport { normalizeArraySelection, selectionToSliceIndices } from '../core/indexing';\nimport { ValueError } from '../errors';\nimport { TypedArray } from '../nestedArray/types';\n\nexport function setRawArrayToScalar(dstArr: TypedArray, dstStrides: number[], dstShape: number[], dstSelection: number | ArraySelection, value: number) {\n // This translates \"...\", \":\", null, etc into a list of slices.\n const normalizedSelection = normalizeArraySelection(dstSelection, dstShape, true);\n const [sliceIndices] = selectionToSliceIndices(normalizedSelection, dstShape);\n // Above we force the results to be SliceIndicesIndices only, without integer selections making this cast is safe.\n _setRawArrayToScalar(value, dstArr, dstStrides, sliceIndices as SliceIndices[]);\n}\n\nexport function setRawArray(dstArr: TypedArray, dstStrides: number[], dstShape: number[], dstSelection: number | ArraySelection, sourceArr: TypedArray, sourceStrides: number[], sourceShape: number[]): void {\n // This translates \"...\", \":\", null, etc into a list of slices.\n const normalizedDstSelection = normalizeArraySelection(dstSelection, dstShape, false);\n const [dstSliceIndices, outShape] = selectionToSliceIndices(normalizedDstSelection, dstShape);\n\n // TODO: replace with non stringify equality check\n if (JSON.stringify(outShape) !== JSON.stringify(sourceShape)) {\n throw new ValueError(`Shape mismatch in target and source RawArray: ${outShape} and ${sourceShape}`);\n }\n\n _setRawArray(dstArr, dstStrides, dstSliceIndices, sourceArr, sourceStrides);\n}\n\nexport function setRawArrayFromChunkItem(dstArr: TypedArray, dstStrides: number[], dstShape: number[], dstSelection: number | ArraySelection, sourceArr: TypedArray, sourceStrides: number[], sourceShape: number[], sourceSelection: number | ArraySelection) {\n // This translates \"...\", \":\", null, etc into a list of slices.\n const normalizedDstSelection = normalizeArraySelection(dstSelection, dstShape, true);\n // Above we force the results to be dstSliceIndices only, without integer selections making this cast is safe.\n const [dstSliceIndices] = selectionToSliceIndices(normalizedDstSelection, dstShape);\n\n const normalizedSourceSelection = normalizeArraySelection(sourceSelection, sourceShape, false);\n const [sourceSliceIndicies] = selectionToSliceIndices(normalizedSourceSelection, sourceShape);\n\n // TODO check to ensure chunk and dest selection are same shape?\n // As is, this only gets called in ZarrArray.getRaw where this condition should be ensured, and check might hinder performance.\n\n _setRawArrayFromChunkItem(dstArr, dstStrides, dstSliceIndices as SliceIndices[], sourceArr, sourceStrides, sourceSliceIndicies);\n}\n\nfunction _setRawArrayToScalar(value: number, dstArr: TypedArray, dstStrides: number[], dstSliceIndices: SliceIndices[]) {\n const [currentDstSlice, ...nextDstSliceIndices] = dstSliceIndices;\n const [currentDstStride, ...nextDstStrides] = dstStrides;\n\n const [from, _to, step, outputSize] = currentDstSlice;\n\n if (dstStrides.length === 1) {\n if (step === 1 && currentDstStride === 1) {\n dstArr.fill(value, from, from + outputSize);\n } else {\n for (let i = 0; i < outputSize; i++) {\n dstArr[currentDstStride * (from + (step * i))] = value;\n }\n }\n return;\n }\n\n for (let i = 0; i < outputSize; i++) {\n _setRawArrayToScalar(\n value,\n dstArr.subarray(currentDstStride * (from + (step * i))),\n nextDstStrides,\n nextDstSliceIndices,\n );\n }\n}\n\nfunction _setRawArray(dstArr: TypedArray, dstStrides: number[], dstSliceIndices: (number | SliceIndices)[], sourceArr: TypedArray, sourceStrides: number[]) {\n if (dstSliceIndices.length === 0) {\n dstArr.set(sourceArr);\n return;\n }\n\n const [currentDstSlice, ...nextDstSliceIndices] = dstSliceIndices;\n const [currentDstStride, ...nextDstStrides] = dstStrides;\n\n // This dimension is squeezed.\n if (typeof currentDstSlice === \"number\") {\n _setRawArray(\n dstArr.subarray(currentDstSlice * currentDstStride),\n nextDstStrides,\n nextDstSliceIndices,\n sourceArr,\n sourceStrides\n );\n return;\n }\n\n const [currentSourceStride, ...nextSourceStrides] = sourceStrides;\n const [from, _to, step, outputSize] = currentDstSlice;\n\n if (dstStrides.length === 1) {\n if (step === 1 && currentDstStride === 1 && currentSourceStride === 1) {\n dstArr.set(sourceArr.subarray(0, outputSize), from);\n } else {\n for (let i = 0; i < outputSize; i++) {\n dstArr[currentDstStride * (from + (step * i))] = sourceArr[currentSourceStride * i];\n }\n }\n return;\n }\n\n for (let i = 0; i < outputSize; i++) {\n // Apply strides as above, using both destination and source-specific strides.\n _setRawArray(\n dstArr.subarray(currentDstStride * (from + (i * step))),\n nextDstStrides,\n nextDstSliceIndices,\n sourceArr.subarray(currentSourceStride * i),\n nextSourceStrides\n );\n }\n}\n\nfunction _setRawArrayFromChunkItem(dstArr: TypedArray, dstStrides: number[], dstSliceIndices: SliceIndices[], sourceArr: TypedArray, sourceStrides: number[], sourceSliceIndices: (SliceIndices | number)[]) {\n if (sourceSliceIndices.length === 0) {\n // Case when last source dimension is squeezed\n dstArr.set(sourceArr.subarray(0, dstArr.length));\n return;\n }\n\n // Get current indicies and strides for both destination and source arrays\n const [currentDstSlice, ...nextDstSliceIndices] = dstSliceIndices;\n const [currentSourceSlice, ...nextSourceSliceIndices] = sourceSliceIndices;\n\n const [currentDstStride, ...nextDstStrides] = dstStrides;\n const [currentSourceStride, ...nextSourceStrides] = sourceStrides;\n\n // This source dimension is squeezed\n if (typeof currentSourceSlice === \"number\") {\n /*\n Sets dimension offset for squeezed dimension.\n\n Ex. if 0th dimension is squeezed to 2nd index (numpy : arr[2,i])\n\n sourceArr[stride[0]* 2 + i] --> sourceArr.subarray(stride[0] * 2)[i] (sourceArr[i] in next call)\n\n Thus, subsequent squeezed dims are appended to the source offset.\n */\n _setRawArrayFromChunkItem(\n // Don't update destination offset/slices, just source\n dstArr, dstStrides, dstSliceIndices,\n sourceArr.subarray(currentSourceStride * currentSourceSlice),\n nextSourceStrides,\n nextSourceSliceIndices,\n );\n return;\n }\n\n const [from, _to, step, outputSize] = currentDstSlice; // just need start and size\n const [sfrom, _sto, sstep, _soutputSize] = currentSourceSlice; // Will always be subset of dst, so don't need output size just start\n\n if (dstStrides.length === 1 && sourceStrides.length === 1) {\n if (step === 1 && currentDstStride === 1 && sstep === 1 && currentSourceStride === 1) {\n dstArr.set(sourceArr.subarray(sfrom, sfrom + outputSize), from);\n } else {\n for (let i = 0; i < outputSize; i++) {\n dstArr[currentDstStride * (from + (step * i))] = sourceArr[currentSourceStride * (sfrom + (sstep * i))];\n }\n }\n return;\n }\n\n for (let i = 0; i < outputSize; i++) {\n // Apply strides as above, using both destination and source-specific strides.\n _setRawArrayFromChunkItem(\n dstArr.subarray(currentDstStride * (from + (i * step))),\n nextDstStrides,\n nextDstSliceIndices,\n sourceArr.subarray(currentSourceStride * (sfrom + (i * sstep))),\n nextSourceStrides,\n nextSourceSliceIndices,\n );\n }\n}\n","import { DtypeString } from '../types';\nimport { ArraySelection } from '../core/types';\nimport { slice } from '../core/slice';\nimport { ValueError } from '../errors';\nimport { normalizeShape, IS_NODE, getStrides } from '../util';\nimport { TypedArray, DTYPE_TYPEDARRAY_MAPPING, getTypedArrayDtypeString, TypedArrayConstructor } from '../nestedArray/types';\nimport { setRawArrayFromChunkItem, setRawArrayToScalar, setRawArray } from './ops';\n\nexport class RawArray {\n dtype: DtypeString;\n shape: number[];\n strides: number[];\n data: TypedArray;\n\n constructor(data: TypedArray, shape?: number | number[], dtype?: DtypeString, strides?: number[])\n constructor(data: Buffer | ArrayBuffer | null, shape?: number | number[], dtype?: DtypeString, strides?: number[])\n constructor(data: Buffer | ArrayBuffer | TypedArray | null, shape?: number | number[], dtype?: DtypeString, strides?: number[]) {\n const dataIsTypedArray = data !== null && !!(data as TypedArray).BYTES_PER_ELEMENT;\n\n if (shape === undefined) {\n if (!dataIsTypedArray) {\n throw new ValueError(\"Shape argument is required unless you pass in a TypedArray\");\n }\n shape = [(data as TypedArray).length];\n }\n shape = normalizeShape(shape);\n\n if (dtype === undefined) {\n if (!dataIsTypedArray) {\n throw new ValueError(\"Dtype argument is required unless you pass in a TypedArray\");\n }\n dtype = getTypedArrayDtypeString(data as TypedArray);\n }\n\n if (strides === undefined) {\n strides = getStrides(shape);\n }\n\n this.shape = shape;\n this.dtype = dtype;\n this.strides = strides;\n\n if (dataIsTypedArray && shape.length !== 1) {\n data = (data as TypedArray).buffer;\n }\n\n // Zero dimension array.. they are a bit weirdly represented now, they will only ever occur internally\n if (this.shape.length === 0) {\n this.data = new DTYPE_TYPEDARRAY_MAPPING[dtype](1);\n } else if (\n // tslint:disable-next-line: strict-type-predicates\n (IS_NODE && Buffer.isBuffer(data))\n || data instanceof ArrayBuffer\n || data === null\n || data.toString().startsWith(\"[object ArrayBuffer]\") // Necessary for Node.js for some reason..\n ) {\n // Create from ArrayBuffer or Buffer\n const numShapeElements = shape.reduce((x, y) => x * y, 1);\n\n if (data === null) {\n data = new ArrayBuffer(numShapeElements * parseInt(dtype[dtype.length - 1], 10));\n }\n\n const numDataElements = (data as ArrayBuffer).byteLength / parseInt(dtype[dtype.length - 1], 10);\n if (numShapeElements !== numDataElements) {\n throw new Error(`Buffer has ${numDataElements} of dtype ${dtype}, shape is too large or small ${shape} (flat=${numShapeElements})`);\n }\n const typeConstructor: TypedArrayConstructor<TypedArray> = DTYPE_TYPEDARRAY_MAPPING[dtype];\n this.data = new typeConstructor(data as ArrayBuffer);\n } else {\n this.data = data;\n }\n }\n\n public set(selection: ArraySelection, value: RawArray | number): void;\n public set(selection: ArraySelection, chunk: RawArray, chunkSelection: ArraySelection): void;\n public set(selection: ArraySelection = null, value: RawArray | number, chunkSelection?: ArraySelection) {\n if (selection === null) {\n selection = [slice(null)];\n }\n if (typeof value === \"number\") {\n if (this.shape.length === 0) {\n // Zero dimension array..\n this.data[0] = value;\n } else {\n setRawArrayToScalar(this.data, this.strides, this.shape, selection, value);\n }\n } else if (value instanceof RawArray && chunkSelection) {\n // Copy directly from decoded chunk to destination array\n setRawArrayFromChunkItem(this.data, this.strides, this.shape, selection, value.data, value.strides, value.shape, chunkSelection);\n } else {\n setRawArray(this.data, this.strides, this.shape, selection, value.data, value.strides, value.shape);\n }\n }\n}\n\n\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","'use strict';\n\nconst pFinally = require('p-finally');\n\nclass TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\nconst pTimeout = (promise, milliseconds, fallback) => new Promise((resolve, reject) => {\n\tif (typeof milliseconds !== 'number' || milliseconds < 0) {\n\t\tthrow new TypeError('Expected `milliseconds` to be a positive number');\n\t}\n\n\tif (milliseconds === Infinity) {\n\t\tresolve(promise);\n\t\treturn;\n\t}\n\n\tconst timer = setTimeout(() => {\n\t\tif (typeof fallback === 'function') {\n\t\t\ttry {\n\t\t\t\tresolve(fallback());\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst message = typeof fallback === 'string' ? fallback : `Promise timed out after ${milliseconds} milliseconds`;\n\t\tconst timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message);\n\n\t\tif (typeof promise.cancel === 'function') {\n\t\t\tpromise.cancel();\n\t\t}\n\n\t\treject(timeoutError);\n\t}, milliseconds);\n\n\t// TODO: Use native `finally` keyword when targeting Node.js 10\n\tpFinally(\n\t\t// eslint-disable-next-line promise/prefer-await-to-then\n\t\tpromise.then(resolve, reject),\n\t\t() => {\n\t\t\tclearTimeout(timer);\n\t\t}\n\t);\n});\n\nmodule.exports = pTimeout;\n// TODO: Remove this for the next major release\nmodule.exports.default = pTimeout;\n\nmodule.exports.TimeoutError = TimeoutError;\n","'use strict';\nmodule.exports = (promise, onFinally) => {\n\tonFinally = onFinally || (() => {});\n\n\treturn promise.then(\n\t\tval => new Promise(resolve => {\n\t\t\tresolve(onFinally());\n\t\t}).then(() => val),\n\t\terr => new Promise(resolve => {\n\t\t\tresolve(onFinally());\n\t\t}).then(() => {\n\t\t\tthrow err;\n\t\t})\n\t);\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// Port of lower_bound from http://en.cppreference.com/w/cpp/algorithm/lower_bound\n// Used to compute insertion index to keep queue sorted after insertion\nfunction lowerBound(array, value, comparator) {\n let first = 0;\n let count = array.length;\n while (count > 0) {\n const step = (count / 2) | 0;\n let it = first + step;\n if (comparator(array[it], value) <= 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n}\nexports.default = lowerBound;\n","import { ValidStoreType, AsyncStore } from './types';\nimport { IS_NODE, joinUrlParts } from '../util';\nimport { KeyError, HTTPError } from '../errors';\n\nenum HTTPMethod {\n HEAD = 'HEAD',\n GET = 'GET',\n PUT = 'PUT',\n}\n\nconst DEFAULT_METHODS = [HTTPMethod.HEAD, HTTPMethod.GET, HTTPMethod.PUT];\n\ninterface HTTPStoreOptions {\n fetchOptions?: RequestInit;\n supportedMethods?: HTTPMethod[];\n}\n\nexport class HTTPStore implements AsyncStore<ArrayBuffer> {\n listDir?: undefined;\n rmDir?: undefined;\n getSize?: undefined;\n rename?: undefined;\n\n public url: string;\n public fetchOptions: RequestInit;\n private supportedMethods: Set<HTTPMethod>;\n\n constructor(url: string, options: HTTPStoreOptions = {}) {\n this.url = url;\n const { fetchOptions = {}, supportedMethods = DEFAULT_METHODS } = options;\n this.fetchOptions = fetchOptions;\n this.supportedMethods = new Set(supportedMethods);\n }\n\n keys(): Promise<string[]> {\n throw new Error('Method not implemented.');\n }\n\n async getItem(item: string, opts?: RequestInit) {\n const url = joinUrlParts(this.url, item);\n const value = await fetch(url, { ...this.fetchOptions, ...opts });\n\n if (value.status === 404) {\n // Item is not found\n throw new KeyError(item);\n } else if (value.status !== 200) {\n throw new HTTPError(String(value.status));\n }\n\n // only decode if 200\n if (IS_NODE) {\n return Buffer.from(await value.arrayBuffer());\n } else {\n return value.arrayBuffer(); // Browser\n }\n }\n\n async setItem(item: string, value: ValidStoreType): Promise<boolean> {\n if (!this.supportedMethods.has(HTTPMethod.PUT)) {\n throw new Error('HTTP PUT no a supported method for store.');\n }\n const url = joinUrlParts(this.url, item);\n if (typeof value === 'string') {\n value = new TextEncoder().encode(value).buffer;\n }\n const set = await fetch(url, { ...this.fetchOptions, method: HTTPMethod.PUT, body: value });\n return set.status.toString()[0] === '2';\n }\n\n deleteItem(_item: string): Promise<boolean> {\n throw new Error('Method not implemented.');\n }\n\n async containsItem(item: string): Promise<boolean> {\n const url = joinUrlParts(this.url, item);\n // Just check headers if HEAD method supported\n const method = this.supportedMethods.has(HTTPMethod.HEAD) ? HTTPMethod.HEAD : HTTPMethod.GET;\n const value = await fetch(url, { ...this.fetchOptions, method });\n return value.status === 200;\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst lower_bound_1 = require(\"./lower-bound\");\nclass PriorityQueue {\n constructor() {\n this._queue = [];\n }\n enqueue(run, options) {\n options = Object.assign({ priority: 0 }, options);\n const element = {\n priority: options.priority,\n run\n };\n if (this.size && this._queue[this.size - 1].priority >= options.priority) {\n this._queue.push(element);\n return;\n }\n const index = lower_bound_1.default(this._queue, element, (a, b) => b.priority - a.priority);\n this._queue.splice(index, 0, element);\n }\n dequeue() {\n const item = this._queue.shift();\n return item && item.run;\n }\n get size() {\n return this._queue.length;\n }\n}\nexports.default = PriorityQueue;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst EventEmitter = require(\"eventemitter3\");\nconst p_timeout_1 = require(\"p-timeout\");\nconst priority_queue_1 = require(\"./priority-queue\");\nconst empty = () => { };\nconst timeoutError = new p_timeout_1.default.TimeoutError();\n/**\nPromise queue with concurrency control.\n*/\nclass PQueue extends EventEmitter {\n constructor(options) {\n super();\n this._intervalCount = 0;\n this._intervalEnd = 0;\n this._pendingCount = 0;\n this._resolveEmpty = empty;\n this._resolveIdle = empty;\n // eslint-disable-next-line @typescript-eslint/no-object-literal-type-assertion\n options = Object.assign({ carryoverConcurrencyCount: false, intervalCap: Infinity, interval: 0, concurrency: Infinity, autoStart: true, queueClass: priority_queue_1.default }, options\n // TODO: Remove this `as`.\n );\n if (!(typeof options.intervalCap === 'number' && options.intervalCap >= 1)) {\n throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${options.intervalCap}\\` (${typeof options.intervalCap})`);\n }\n if (options.interval === undefined || !(Number.isFinite(options.interval) && options.interval >= 0)) {\n throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${options.interval}\\` (${typeof options.interval})`);\n }\n this._carryoverConcurrencyCount = options.carryoverConcurrencyCount;\n this._isIntervalIgnored = options.intervalCap === Infinity || options.interval === 0;\n this._intervalCap = options.intervalCap;\n this._interval = options.interval;\n this._queue = new options.queueClass();\n this._queueClass = options.queueClass;\n this.concurrency = options.concurrency;\n this._timeout = options.timeout;\n this._throwOnTimeout = options.throwOnTimeout === true;\n this._isPaused = options.autoStart === false;\n }\n get _doesIntervalAllowAnother() {\n return this._isIntervalIgnored || this._intervalCount < this._intervalCap;\n }\n get _doesConcurrentAllowAnother() {\n return this._pendingCount < this._concurrency;\n }\n _next() {\n this._pendingCount--;\n this._tryToStartAnother();\n }\n _resolvePromises() {\n this._resolveEmpty();\n this._resolveEmpty = empty;\n if (this._pendingCount === 0) {\n this._resolveIdle();\n this._resolveIdle = empty;\n }\n }\n _onResumeInterval() {\n this._onInterval();\n this._initializeIntervalIfNeeded();\n this._timeoutId = undefined;\n }\n _isIntervalPaused() {\n const now = Date.now();\n if (this._intervalId === undefined) {\n const delay = this._intervalEnd - now;\n if (delay < 0) {\n // Act as the interval was done\n // We don't need to resume it here because it will be resumed on line 160\n this._intervalCount = (this._carryoverConcurrencyCount) ? this._pendingCount : 0;\n }\n else {\n // Act as the interval is pending\n if (this._timeoutId === undefined) {\n this._timeoutId = setTimeout(() => {\n this._onResumeInterval();\n }, delay);\n }\n return true;\n }\n }\n return false;\n }\n _tryToStartAnother() {\n if (this._queue.size === 0) {\n // We can clear the interval (\"pause\")\n // Because we can redo it later (\"resume\")\n if (this._intervalId) {\n clearInterval(this._intervalId);\n }\n this._intervalId = undefined;\n this._resolvePromises();\n return false;\n }\n if (!this._isPaused) {\n const canInitializeInterval = !this._isIntervalPaused();\n if (this._doesIntervalAllowAnother && this._doesConcurrentAllowAnother) {\n this.emit('active');\n this._queue.dequeue()();\n if (canInitializeInterval) {\n this._initializeIntervalIfNeeded();\n }\n return true;\n }\n }\n return false;\n }\n _initializeIntervalIfNeeded() {\n if (this._isIntervalIgnored || this._intervalId !== undefined) {\n return;\n }\n this._intervalId = setInterval(() => {\n this._onInterval();\n }, this._interval);\n this._intervalEnd = Date.now() + this._interval;\n }\n _onInterval() {\n if (this._intervalCount === 0 && this._pendingCount === 0 && this._intervalId) {\n clearInterval(this._intervalId);\n this._intervalId = undefined;\n }\n this._intervalCount = this._carryoverConcurrencyCount ? this._pendingCount : 0;\n this._processQueue();\n }\n /**\n Executes all queued functions until it reaches the limit.\n */\n _processQueue() {\n // eslint-disable-next-line no-empty\n while (this._tryToStartAnother()) { }\n }\n get concurrency() {\n return this._concurrency;\n }\n set concurrency(newConcurrency) {\n if (!(typeof newConcurrency === 'number' && newConcurrency >= 1)) {\n throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${newConcurrency}\\` (${typeof newConcurrency})`);\n }\n this._concurrency = newConcurrency;\n this._processQueue();\n }\n /**\n Adds a sync or async task to the queue. Always returns a promise.\n */\n async add(fn, options = {}) {\n return new Promise((resolve, reject) => {\n const run = async () => {\n this._pendingCount++;\n this._intervalCount++;\n try {\n const operation = (this._timeout === undefined && options.timeout === undefined) ? fn() : p_timeout_1.default(Promise.resolve(fn()), (options.timeout === undefined ? this._timeout : options.timeout), () => {\n if (options.throwOnTimeout === undefined ? this._throwOnTimeout : options.throwOnTimeout) {\n reject(timeoutError);\n }\n return undefined;\n });\n resolve(await operation);\n }\n catch (error) {\n reject(error);\n }\n this._next();\n };\n this._queue.enqueue(run, options);\n this._tryToStartAnother();\n });\n }\n /**\n Same as `.add()`, but accepts an array of sync or async functions.\n\n @returns A promise that resolves when all functions are resolved.\n */\n async addAll(functions, options) {\n return Promise.all(functions.map(async (function_) => this.add(function_, options)));\n }\n /**\n Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)\n */\n start() {\n if (!this._isPaused) {\n return this;\n }\n this._isPaused = false;\n this._processQueue();\n return this;\n }\n /**\n Put queue execution on hold.\n */\n pause() {\n this._isPaused = true;\n }\n /**\n Clear the queue.\n */\n clear() {\n this._queue = new this._queueClass();\n }\n /**\n Can be called multiple times. Useful if you for example add additional items at a later time.\n\n @returns A promise that settles when the queue becomes empty.\n */\n async onEmpty() {\n // Instantly resolve if the queue is empty\n if (this._queue.size === 0) {\n return;\n }\n return new Promise(resolve => {\n const existingResolve = this._resolveEmpty;\n this._resolveEmpty = () => {\n existingResolve();\n resolve();\n };\n });\n }\n /**\n The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.\n\n @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.\n */\n async onIdle() {\n // Instantly resolve if none pending and if nothing else is queued\n if (this._pendingCount === 0 && this._queue.size === 0) {\n return;\n }\n return new Promise(resolve => {\n const existingResolve = this._resolveIdle;\n this._resolveIdle = () => {\n existingResolve();\n resolve();\n };\n });\n }\n /**\n Size of the queue.\n */\n get size() {\n return this._queue.size;\n }\n /**\n Number of pending promises.\n */\n get pending() {\n return this._pendingCount;\n }\n /**\n Whether the queue is currently paused.\n */\n get isPaused() {\n return this._isPaused;\n }\n /**\n Set the timeout for future operations.\n */\n set timeout(milliseconds) {\n this._timeout = milliseconds;\n }\n get timeout() {\n return this._timeout;\n }\n}\nexports.default = PQueue;\n","import { Store, ValidStoreType } from \"../storage/types\";\n\nimport { containsGroup, pathToPrefix } from '../storage/index';\nimport { normalizeStoragePath, isTotalSlice, arrayEquals1D, byteSwap, byteSwapInplace } from '../util';\nimport { ZarrArrayMetadata, UserAttributes, FillType } from '../types';\nimport { ARRAY_META_KEY, ATTRS_META_KEY } from '../names';\nimport { Attributes } from \"../attributes\";\nimport { parseMetadata } from \"../metadata\";\nimport { ArraySelection, DimensionSelection, Indexer, Slice, ChunkProjection } from \"./types\";\nimport { BasicIndexer, isContiguousSelection, normalizeIntegerSelection } from './indexing';\nimport { NestedArray } from \"../nestedArray\";\nimport { RawArray } from \"../rawArray\";\nimport { TypedArray, DTYPE_TYPEDARRAY_MAPPING } from '../nestedArray/types';\nimport { ValueError, PermissionError, BoundsCheckError, ContainsGroupError, isKeyError } from '../errors';\nimport { getCodec } from \"../compression/registry\";\n\n\nimport type { Codec } from 'numcodecs';\nimport PQueue from 'p-queue';\n\nexport interface GetOptions {\n concurrencyLimit?: number;\n progressCallback?: (progressUpdate: {\n progress: number;\n queueSize: number;\n }) => void;\n}\n\nexport interface SetOptions {\n concurrencyLimit?: number;\n progressCallback?: (progressUpdate: {\n progress: number;\n queueSize: number;\n }) => void;\n}\n\nexport interface GetRawChunkOptions<O> {\n storeOptions: O;\n}\n\nexport class ZarrArray {\n\n public store: Store;\n private compressor: Promise<Codec> | null;\n\n private _chunkStore: Store | null;\n /**\n * A `Store` providing the underlying storage for array chunks.\n */\n public get chunkStore(): Store {\n if (this._chunkStore) {\n return this._chunkStore;\n }\n return this.store;\n }\n public path: string;\n public keyPrefix: string;\n public readOnly: boolean;\n public cacheMetadata: boolean;\n public cacheAttrs: boolean;\n public meta: ZarrArrayMetadata;\n public attrs: Attributes<UserAttributes>;\n\n /**\n * Array name following h5py convention.\n */\n public get name(): string | null {\n if (this.path.length > 0) {\n if (this.path[0] !== \"/\") {\n return \"/\" + this.path;\n }\n return this.path;\n }\n return null;\n }\n\n /**\n * Final component of name.\n */\n public get basename(): string | null {\n const name = this.name;\n if (name === null) {\n return null;\n }\n const parts = name.split(\"/\");\n return parts[parts.length - 1];\n }\n\n /**\n * \"A list of integers describing the length of each dimension of the array.\n */\n public get shape(): number[] {\n // this.refreshMetadata();\n return this.meta.shape;\n }\n\n /**\n * A list of integers describing the length of each dimension of a chunk of the array.\n */\n public get chunks(): number[] {\n return this.meta.chunks;\n }\n\n /**\n * Integer describing how many element a chunk contains\n */\n private get chunkSize(): number {\n return this.chunks.reduce((x, y) => x * y, 1);\n }\n\n /**\n * The NumPy data type.\n */\n public get dtype() {\n return this.meta.dtype;\n }\n\n /**\n * A value used for uninitialized portions of the array.\n */\n public get fillValue(): FillType {\n\n const fillTypeValue = this.meta.fill_value;\n\n // TODO extract into function\n if (fillTypeValue === \"NaN\") {\n return NaN;\n } else if (fillTypeValue === \"Infinity\") {\n return Infinity;\n } else if (fillTypeValue === \"-Infinity\") {\n return -Infinity;\n }\n\n return this.meta.fill_value as FillType;\n }\n\n /**\n * Number of dimensions.\n */\n public get nDims() {\n return this.meta.shape.length;\n }\n\n /**\n * The total number of elements in the array.\n */\n public get size() {\n // this.refreshMetadata()\n return this.meta.shape.reduce((x, y) => x * y, 1);\n }\n\n public get length() {\n return this.shape[0];\n }\n\n\n private get _chunkDataShape() {\n if (this.shape === []) {\n return [1];\n } else {\n const s = [];\n for (let i = 0; i < this.shape.length; i++) {\n s[i] = Math.ceil(this.shape[i] / this.chunks[i]);\n }\n return s;\n }\n }\n /**\n * A tuple of integers describing the number of chunks along each\n * dimension of the array.\n */\n public get chunkDataShape() {\n // this.refreshMetadata();\n return this._chunkDataShape;\n }\n\n /**\n * Total number of chunks.\n */\n public get numChunks() {\n // this.refreshMetadata();\n return this.chunkDataShape.reduce((x, y) => x * y, 1);\n }\n\n /**\n * Instantiate an array from an initialized store.\n * @param store Array store, already initialized.\n * @param path Storage path.\n * @param readOnly True if array should be protected against modification.\n * @param chunkStore Separate storage for chunks. If not provided, `store` will be used for storage of both chunks and metadata.\n * @param cacheMetadata If true (default), array configuration metadata will be cached for the lifetime of the object.\n * If false, array metadata will be reloaded prior to all data access and modification operations (may incur overhead depending on storage and data access pattern).\n * @param cacheAttrs If true (default), user attributes will be cached for attribute read operations.\n * If false, user attributes are reloaded from the store prior to all attribute read operations.\n */\n public static async create(store: Store, path: null | string = null, readOnly = false, chunkStore: Store | null = null, cacheMetadata = true, cacheAttrs = true) {\n const metadata = await this.loadMetadataForConstructor(store, path);\n return new ZarrArray(store, path, metadata as ZarrArrayMetadata, readOnly, chunkStore, cacheMetadata, cacheAttrs);\n }\n\n private static async loadMetadataForConstructor(store: Store, path: null | string) {\n try {\n path = normalizeStoragePath(path);\n const keyPrefix = pathToPrefix(path);\n const metaStoreValue = await store.getItem(keyPrefix + ARRAY_META_KEY);\n return parseMetadata(metaStoreValue);\n } catch (error) {\n if (await containsGroup(store, path)) {\n throw new ContainsGroupError(path ?? '');\n }\n throw new Error(\"Failed to load metadata for ZarrArray:\" + error.toString());\n }\n }\n\n /**\n * Instantiate an array from an initialized store.\n * @param store Array store, already initialized.\n * @param path Storage path.\n * @param metadata The initial value for the metadata\n * @param readOnly True if array should be protected against modification.\n * @param chunkStore Separate storage for chunks. If not provided, `store` will be used for storage of both chunks and metadata.\n * @param cacheMetadata If true (default), array configuration metadata will be cached for the lifetime of the object.\n * If false, array metadata will be reloaded prior to all data access and modification operations (may incur overhead depending on storage and data access pattern).\n * @param cacheAttrs If true (default), user attributes will be cached for attribute read operations.\n * If false, user attributes are reloaded from the store prior to all attribute read operations.\n */\n private constructor(store: Store, path: null | string = null, metadata: ZarrArrayMetadata, readOnly = false, chunkStore: Store | null = null, cacheMetadata = true, cacheAttrs = true) {\n // N.B., expect at this point store is fully initialized with all\n // configuration metadata fully specified and normalized\n\n this.store = store;\n this._chunkStore = chunkStore;\n this.path = normalizeStoragePath(path);\n this.keyPrefix = pathToPrefix(this.path);\n this.readOnly = readOnly;\n this.cacheMetadata = cacheMetadata;\n this.cacheAttrs = cacheAttrs;\n this.meta = metadata;\n if (this.meta.compressor !== null) {\n this.compressor = getCodec(this.meta.compressor);\n } else {\n this.compressor = null;\n }\n\n\n const attrKey = this.keyPrefix + ATTRS_META_KEY;\n this.attrs = new Attributes<UserAttributes>(this.store, attrKey, this.readOnly, cacheAttrs);\n }\n\n /**\n * (Re)load metadata from store\n */\n public async reloadMetadata() {\n const metaKey = this.keyPrefix + ARRAY_META_KEY;\n const metaStoreValue = this.store.getItem(metaKey);\n this.meta = parseMetadata(await metaStoreValue) as ZarrArrayMetadata;\n return this.meta;\n }\n\n private async refreshMetadata() {\n if (!this.cacheMetadata) {\n await this.reloadMetadata();\n }\n }\n\n public get(selection?: undefined | Slice | \":\" | \"...\" | null | (Slice | null | \":\" | \"...\")[], opts?: GetOptions): Promise<NestedArray<TypedArray> | number>;\n public get(selection?: ArraySelection, opts?: GetOptions): Promise<NestedArray<TypedArray> | number>;\n public get(selection: ArraySelection = null, opts: GetOptions = {}): Promise<NestedArray<TypedArray> | number> {\n return this.getBasicSelection(selection, false, opts);\n }\n\n public getRaw(selection?: undefined | Slice | \":\" | \"...\" | null | (Slice | null | \":\" | \"...\")[], opts?: GetOptions): Promise<RawArray | number>;\n public getRaw(selection?: ArraySelection, opts?: GetOptions): Promise<RawArray | number>;\n public getRaw(selection: ArraySelection = null, opts: GetOptions = {}): Promise<RawArray | number> {\n return this.getBasicSelection(selection, true, opts);\n }\n\n // asRaw = false\n public async getBasicSelection(selection: Slice | \":\" | \"...\" | null | (Slice | null | \":\" | \"...\")[], asRaw?: false, opts?: GetOptions): Promise<NestedArray<TypedArray> | number>;\n public async getBasicSelection(selection: ArraySelection, asRaw?: false, opts?: GetOptions): Promise<NestedArray<TypedArray> | number>;\n // asRaw = true\n public async getBasicSelection(selection: Slice | \":\" | \"...\" | null | (Slice | null | \":\" | \"...\")[], asRaw?: true, opts?: GetOptions): Promise<RawArray | number>;\n public async getBasicSelection(selection: ArraySelection, asRaw?: true, opts?: GetOptions): Promise<RawArray | number>;\n\n public async getBasicSelection(selection: ArraySelection, asRaw = false, { concurrencyLimit = 10, progressCallback }: GetOptions = {}): Promise<NestedArray<TypedArray> | RawArray | number> {\n // Refresh metadata\n if (!this.cacheMetadata) {\n await this.reloadMetadata();\n }\n\n // Check fields (TODO?)\n if (this.shape === []) {\n throw new Error(\"Shape [] indexing is not supported yet\");\n } else {\n return this.getBasicSelectionND(selection, asRaw, concurrencyLimit, progressCallback);\n }\n }\n\n private getBasicSelectionND(selection: ArraySelection, asRaw: boolean, concurrencyLimit: number, progressCallback?: (progressUpdate: { progress: number; queueSize: number }) => void): Promise<number | NestedArray<TypedArray> | RawArray> {\n const indexer = new BasicIndexer(selection, this);\n return this.getSelection(indexer, asRaw, concurrencyLimit, progressCallback);\n }\n\n private async getSelection(indexer: BasicIndexer, asRaw: boolean, concurrencyLimit: number, progressCallback?: (progressUpdate: { progress: number; queueSize: number }) => void): Promise<number | NestedArray<TypedArray> | RawArray> {\n // We iterate over all chunks which overlap the selection and thus contain data\n // that needs to be extracted. Each chunk is processed in turn, extracting the\n // necessary data and storing into the correct location in the output array.\n\n // N.B., it is an important optimisation that we only visit chunks which overlap\n // the selection. This minimises the number of iterations in the main for loop.\n\n // check fields are sensible (TODO?)\n\n const outDtype = this.dtype;\n const outShape = indexer.shape;\n const outSize = indexer.shape.reduce((x, y) => x * y, 1);\n\n if (asRaw && (outSize === this.chunkSize)) {\n // Optimization: if output strided array _is_ chunk exactly,\n // decode directly as new TypedArray and return\n const itr = indexer.iter();\n const proj = itr.next(); // ensure there is only one projection\n if (proj.done === false && itr.next().done === true) {\n const chunkProjection = proj.value as ChunkProjection;\n const out = await this.decodeDirectToRawArray(chunkProjection, outShape, outSize);\n return out;\n }\n }\n\n const out = asRaw\n ? new RawArray(null, outShape, outDtype)\n : new NestedArray(null, outShape, outDtype);\n\n if (outSize === 0) {\n return out;\n }\n\n // create promise queue with concurrency control\n const queue = new PQueue({ concurrency: concurrencyLimit });\n\n if (progressCallback) {\n\n let progress = 0;\n let queueSize = 0;\n for (const _ of indexer.iter()) queueSize += 1;\n progressCallback({ progress: 0, queueSize: queueSize });\n for (const proj of indexer.iter()) {\n (async () => {\n await queue.add(() => this.chunkGetItem(proj.chunkCoords, proj.chunkSelection, out, proj.outSelection, indexer.dropAxes));\n progress += 1;\n progressCallback({ progress: progress, queueSize: queueSize });\n })();\n }\n\n } else {\n for (const proj of indexer.iter()) {\n queue.add(() => this.chunkGetItem(proj.chunkCoords, proj.chunkSelection, out, proj.outSelection, indexer.dropAxes));\n }\n }\n\n // guarantees that all work on queue has finished\n await queue.onIdle();\n\n // Return scalar instead of zero-dimensional array.\n if (out.shape.length === 0) {\n return out.data[0] as number;\n }\n\n return out;\n }\n\n /**\n * Obtain part or whole of a chunk.\n * @param chunkCoords Indices of the chunk.\n * @param chunkSelection Location of region within the chunk to extract.\n * @param out Array to store result in.\n * @param outSelection Location of region within output array to store results in.\n * @param dropAxes Axes to squeeze out of the chunk.\n */\n private async chunkGetItem<T extends TypedArray>(chunkCoords: number[], chunkSelection: DimensionSelection[], out: NestedArray<T> | RawArray, outSelection: DimensionSelection[], dropAxes: null | number[]) {\n if (chunkCoords.length !== this._chunkDataShape.length) {\n throw new ValueError(`Inconsistent shapes: chunkCoordsLength: ${chunkCoords.length}, cDataShapeLength: ${this.chunkDataShape.length}`);\n }\n\n const cKey = this.chunkKey(chunkCoords);\n try {\n const cdata = await this.chunkStore.getItem(cKey);\n const decodedChunk = await this.decodeChunk(cdata);\n\n if (out instanceof NestedArray) {\n\n if (isContiguousSelection(outSelection) && isTotalSlice(chunkSelection, this.chunks) && !this.meta.filters) {\n // Optimization: we want the whole chunk, and the destination is\n // contiguous, so we can decompress directly from the chunk\n // into the destination array\n\n // TODO check order\n // TODO filters..\n out.set(outSelection, this.toNestedArray<T>(decodedChunk));\n return;\n }\n\n // Decode chunk\n const chunk = this.toNestedArray(decodedChunk);\n const tmp = chunk.get(chunkSelection);\n\n if (dropAxes !== null) {\n throw new Error(\"Drop axes is not supported yet\");\n }\n\n out.set(outSelection, tmp as NestedArray<T>);\n\n } else {\n /* RawArray\n Copies chunk by index directly into output. Doesn't matter if selection is contiguous\n since store/output are different shapes/strides.\n */\n out.set(outSelection, this.chunkBufferToRawArray(decodedChunk), chunkSelection);\n }\n\n } catch (error) {\n if (isKeyError(error)) {\n // fill with scalar if cKey doesn't exist in store\n if (this.fillValue !== null) {\n out.set(outSelection, this.fillValue);\n }\n } else {\n // Different type of error - rethrow\n throw error;\n }\n }\n }\n\n public async getRawChunk<O>(chunkCoords: number[], opts?: GetRawChunkOptions<O>): Promise<RawArray> {\n if (chunkCoords.length !== this.shape.length) {\n throw new Error(`Chunk coordinates ${chunkCoords.join(\".\")} do not correspond to shape ${this.shape}.`);\n }\n try {\n for (let i = 0; i < chunkCoords.length; i++) {\n const dimLength = Math.ceil(this.shape[i] / this.chunks[i]);\n chunkCoords[i] = normalizeIntegerSelection(chunkCoords[i], dimLength);\n }\n } catch (error) {\n if (error instanceof BoundsCheckError) {\n throw new BoundsCheckError(`index ${chunkCoords.join(\".\")} is out of bounds for shape: ${this.shape} and chunks ${this.chunks}`);\n } else {\n throw error;\n }\n }\n const cKey = this.chunkKey(chunkCoords);\n const cdata = this.chunkStore.getItem(cKey, opts?.storeOptions);\n const buffer = await this.decodeChunk(await cdata);\n const outShape = this.chunks.filter(d => d !== 1); // squeeze chunk dim if 1\n return new RawArray(buffer, outShape, this.dtype);\n }\n\n private chunkKey(chunkCoords: number[]) {\n return this.keyPrefix + chunkCoords.join(\".\");\n }\n\n private ensureByteArray(chunkData: ValidStoreType): Uint8Array {\n if (typeof chunkData === \"string\") {\n return new Uint8Array(Buffer.from(chunkData).buffer);\n }\n return new Uint8Array(chunkData);\n }\n\n private toTypedArray(buffer: Buffer | ArrayBuffer) {\n return new DTYPE_TYPEDARRAY_MAPPING[this.dtype](buffer);\n }\n\n private toNestedArray<T extends TypedArray>(data: ValidStoreType) {\n const buffer = this.ensureByteArray(data).buffer;\n\n return new NestedArray<T>(buffer, this.chunks, this.dtype);\n }\n\n private async decodeChunk(chunkData: ValidStoreType) {\n let bytes = this.ensureByteArray(chunkData);\n\n if (this.compressor !== null) {\n bytes = await (await this.compressor).decode(bytes);\n }\n\n if (this.dtype.includes('>')) {\n // Need to flip bytes for Javascript TypedArrays\n // We flip bytes in-place to avoid creating an extra copy of the decoded buffer.\n byteSwapInplace(this.toTypedArray(bytes.buffer));\n }\n\n // TODO filtering etc\n return bytes.buffer;\n }\n\n private chunkBufferToRawArray(buffer: Buffer | ArrayBuffer) {\n return new RawArray(buffer, this.chunks, this.dtype);\n }\n\n private async decodeDirectToRawArray({ chunkCoords }: ChunkProjection, outShape: number[], outSize: number): Promise<RawArray> {\n const cKey = this.chunkKey(chunkCoords);\n try {\n const cdata = await this.chunkStore.getItem(cKey);\n return new RawArray(await this.decodeChunk(cdata), outShape, this.dtype);\n } catch (error) {\n if (isKeyError(error)) {\n // fill with scalar if item doesn't exist\n const data = new DTYPE_TYPEDARRAY_MAPPING[this.dtype](outSize);\n return new RawArray(data.fill(this.fillValue as number), outShape);\n } else {\n // Different type of error - rethrow\n throw error;\n }\n }\n }\n\n public async set(selection: ArraySelection = null, value: any, opts: SetOptions = {}) {\n await this.setBasicSelection(selection, value, opts);\n }\n\n public async setBasicSelection(selection: ArraySelection, value: any, { concurrencyLimit = 10, progressCallback }: SetOptions = {}) {\n if (this.readOnly) {\n throw new PermissionError(\"Object is read only\");\n }\n\n if (!this.cacheMetadata) {\n await this.reloadMetadata();\n }\n\n if (this.shape === []) {\n throw new Error(\"Shape [] indexing is not supported yet\");\n } else {\n await this.setBasicSelectionND(selection, value, concurrencyLimit, progressCallback);\n }\n }\n\n private async setBasicSelectionND(selection: ArraySelection, value: any, concurrencyLimit: number, progressCallback?: (progressUpdate: { progress: number; queueSize: number }) => void) {\n const indexer = new BasicIndexer(selection, this);\n await this.setSelection(indexer, value, concurrencyLimit, progressCallback);\n }\n\n private getChunkValue(proj: ChunkProjection, indexer: Indexer, value: number | NestedArray<TypedArray>, selectionShape: number[]): number | NestedArray<TypedArray> {\n let chunkValue: number | NestedArray<TypedArray>;\n if (selectionShape === []) {\n chunkValue = value;\n } else if (typeof value === \"number\") {\n chunkValue = value;\n } else {\n chunkValue = value.get(proj.outSelection);\n // tslint:disable-next-line: strict-type-predicates\n if (indexer.dropAxes !== null) {\n throw new Error(\"Handling drop axes not supported yet\");\n }\n }\n return chunkValue;\n }\n\n private async setSelection(indexer: Indexer, value: number | NestedArray<TypedArray>, concurrencyLimit: number, progressCallback?: (progressUpdate: { progress: number; queueSize: number }) => void) {\n // We iterate over all chunks which overlap the selection and thus contain data\n // that needs to be replaced. Each chunk is processed in turn, extracting the\n // necessary data from the value array and storing into the chunk array.\n\n // N.B., it is an important optimisation that we only visit chunks which overlap\n // the selection. This minimises the number of iterations in the main for loop.\n\n // TODO? check fields are sensible\n\n // Determine indices of chunks overlapping the selection\n const selectionShape = indexer.shape;\n\n // Check value shape\n if (selectionShape === []) {\n // Setting a single value\n } else if (typeof value === \"number\") {\n // Setting a scalar value\n } else if (value instanceof NestedArray) {\n // TODO: non stringify equality check\n if (!arrayEquals1D(value.shape, selectionShape)) {\n throw new ValueError(`Shape mismatch in source NestedArray and set selection: ${value.shape} and ${selectionShape}`);\n }\n } else {\n // TODO support TypedArrays, buffers, etc\n throw new Error(\"Unknown data type for setting :(\");\n }\n\n const queue = new PQueue({ concurrency: concurrencyLimit });\n\n if (progressCallback) {\n\n let queueSize = 0;\n for (const _ of indexer.iter()) queueSize += 1;\n\n let progress = 0;\n progressCallback({ progress: 0, queueSize: queueSize });\n for (const proj of indexer.iter()) {\n const chunkValue = this.getChunkValue(proj, indexer, value, selectionShape);\n (async () => {\n await queue.add(() => this.chunkSetItem(proj.chunkCoords, proj.chunkSelection, chunkValue));\n progress += 1;\n progressCallback({ progress: progress, queueSize: queueSize });\n })();\n }\n\n } else {\n\n for (const proj of indexer.iter()) {\n const chunkValue = this.getChunkValue(proj, indexer, value, selectionShape);\n queue.add(() => this.chunkSetItem(proj.chunkCoords, proj.chunkSelection, chunkValue));\n }\n\n }\n\n // guarantees that all work on queue has finished\n await queue.onIdle();\n }\n\n private async chunkSetItem<T extends TypedArray>(chunkCoords: number[], chunkSelection: DimensionSelection[], value: number | NestedArray<TypedArray>) {\n // Obtain key for chunk storage\n const chunkKey = this.chunkKey(chunkCoords);\n\n let chunk: null | TypedArray = null;\n\n const dtypeConstr = DTYPE_TYPEDARRAY_MAPPING[this.dtype];\n const chunkSize = this.chunkSize;\n\n if (isTotalSlice(chunkSelection, this.chunks)) {\n // Totally replace chunk\n\n // Optimization: we are completely replacing the chunk, so no need\n // to access the existing chunk data\n\n if (typeof value === \"number\") {\n // TODO get the right type here\n chunk = new dtypeConstr(chunkSize);\n chunk.fill(value);\n } else {\n chunk = value.flatten();\n }\n } else {\n\n // partially replace the contents of this chunk\n\n // Existing chunk data\n let chunkData: TypedArray;\n\n try {\n // Chunk is initialized if this does not error\n const chunkStoreData = await this.chunkStore.getItem(chunkKey);\n const dBytes = await this.decodeChunk(chunkStoreData);\n chunkData = this.toTypedArray(dBytes);\n } catch (error) {\n if (isKeyError(error)) {\n // Chunk is not initialized\n chunkData = new dtypeConstr(chunkSize);\n if (this.fillValue !== null) {\n chunkData.fill(this.fillValue);\n }\n } else {\n // Different type of error - rethrow\n throw error;\n }\n }\n\n const chunkNestedArray = new NestedArray(\n chunkData,\n this.chunks,\n this.dtype,\n );\n chunkNestedArray.set(chunkSelection, value);\n chunk = chunkNestedArray.flatten();\n }\n const chunkData = await this.encodeChunk(chunk);\n this.chunkStore.setItem(chunkKey, chunkData);\n }\n\n private async encodeChunk(chunk: TypedArray) {\n if (this.dtype.includes('>')) {\n /*\n * If big endian, flip bytes before applying compression and setting store.\n *\n * Here we create a copy (not in-place byteswapping) to avoid flipping the\n * bytes in the buffers of user-created Raw- and NestedArrays.\n */\n chunk = byteSwap(chunk);\n }\n\n if (this.compressor !== null) {\n const bytes = new Uint8Array(chunk.buffer);\n const cbytes = await (await this.compressor).encode(bytes);\n return cbytes.buffer;\n }\n\n // TODO: filters, etc\n return chunk.buffer;\n }\n}","import { SyncStore, ValidStoreType } from \"./types\";\nimport { createProxy, MutableMappingProxy } from \"../mutableMapping\";\nimport { KeyError } from \"../errors\";\n\nexport class MemoryStore<T extends ValidStoreType> implements SyncStore<T> {\n listDir?: undefined;\n rmDir?: undefined;\n getSize?: undefined;\n rename?: undefined;\n\n root: { [key: string]: any };\n\n constructor(root = {}) {\n this.root = root;\n }\n\n public proxy(): MutableMappingProxy<T> {\n return createProxy(this);\n }\n\n private getParent(item: string): [any, string] {\n let parent = this.root;\n const segments = item.split('/');\n // find the parent container\n for (const k of segments.slice(0, segments.length - 1)) {\n parent = parent[k];\n if (!parent) {\n throw Error(item);\n }\n // if not isinstance(parent, self.cls):\n // raise KeyError(item)\n }\n return [parent, segments[segments.length - 1]];\n }\n\n private requireParent(item: string): [any, string] {\n let parent = this.root;\n const segments = item.split('/');\n\n // require the parent container\n for (const k of segments.slice(0, segments.length - 1)) {\n // TODO: verify correct implementation\n if (parent[k] === undefined) {\n parent[k] = {};\n }\n parent = parent[k];\n }\n\n return [parent, segments[segments.length - 1]];\n }\n\n getItem(item: string) {\n const [parent, key] = this.getParent(item);\n const value = parent[key];\n if (value === undefined) {\n throw new KeyError(item);\n }\n return value;\n }\n\n setItem(item: string, value: any): boolean {\n const [parent, key] = this.requireParent(item);\n parent[key] = value;\n return true;\n }\n\n deleteItem(item: string): boolean {\n const [parent, key] = this.getParent(item);\n return delete parent[key];\n }\n\n containsItem(item: string): boolean {\n // TODO: more sane implementation\n try {\n return this.getItem(item) !== undefined;\n } catch (e) {\n return false;\n }\n }\n\n keys(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n\n\n}","import { ChunksArgument, DtypeString, CompressorConfig, Order, Filter, FillType, PersistenceMode } from './types';\nimport { Store } from './storage/types';\nimport { ZarrArray } from './core/index';\nimport { MemoryStore } from './storage/memoryStore';\nimport { initArray, containsArray, containsGroup } from './storage/index';\nimport { TypedArray } from './nestedArray/types';\nimport { NestedArray } from './nestedArray/index';\nimport { normalizeStoragePath } from './util';\nimport { ContainsArrayError, ValueError, ArrayNotFoundError, ContainsGroupError } from './errors';\nimport { HTTPStore } from './storage/httpStore';\n\n/**\n * See `create` function for type signature of these values\n */\nexport interface CreateArrayOptionsWithoutShape {\n chunks?: ChunksArgument;\n dtype?: DtypeString;\n compressor?: CompressorConfig | null;\n fillValue?: FillType;\n order?: Order;\n store?: Store;\n overwrite?: boolean;\n path?: string;\n chunkStore?: Store;\n filters?: Filter[];\n cacheMetadata?: boolean;\n cacheAttrs?: boolean;\n readOnly?: boolean;\n}\n\nexport type CreateArrayOptions = {\n shape: number | number[];\n chunks?: ChunksArgument;\n dtype?: DtypeString;\n compressor?: CompressorConfig | null;\n fillValue?: FillType;\n order?: Order;\n store?: Store;\n overwrite?: boolean;\n path?: string;\n chunkStore?: Store;\n filters?: Filter[];\n cacheMetadata?: boolean;\n cacheAttrs?: boolean;\n readOnly?: boolean;\n};\n\n/**\n * \n * @param shape Array shape.\n * @param chunks Chunk shape. If `true`, will be guessed from `shape` and `dtype`. If\n * `false`, will be set to `shape`, i.e., single chunk for the whole array.\n * If an int, the chunk size in each dimension will be given by the value\n * of `chunks`. Default is `true`.\n * @param dtype NumPy dtype.\n * @param compressor Primary compressor.\n * @param fillValue Default value to use for uninitialized portions of the array.\n * @param order Memory layout to be used within each chunk.\n * @param store Store or path to directory in file system or name of zip file.\n * @param overwrite If True, delete all pre-existing data in `store` at `path` before creating the array.\n * @param path Path under which array is stored.\n * @param chunkStore Separate storage for chunks. If not provided, `store` will be used for storage of both chunks and metadata.\n * @param filters Sequence of filters to use to encode chunk data prior to compression.\n * @param cacheMetadata If `true` (default), array configuration metadata will be cached for the\n * lifetime of the object. If `false`, array metadata will be reloaded\n * prior to all data access and modification operations (may incur\n * overhead depending on storage and data access pattern).\n * @param cacheAttrs If `true` (default), user attributes will be cached for attribute read\n * operations. If `false`, user attributes are reloaded from the store prior\n * to all attribute read operations.\n * @param readOnly `true` if array should be protected against modification, defaults to `false`.\n */\nexport async function create(\n { shape, chunks = true, dtype = \"<i4\", compressor = null, fillValue = null, order = \"C\", store, overwrite = false, path, chunkStore, filters, cacheMetadata = true, cacheAttrs = true, readOnly = false }: CreateArrayOptions,\n): Promise<ZarrArray> {\n\n store = normalizeStoreArgument(store);\n\n await initArray(store, shape, chunks, dtype, path, compressor, fillValue, order, overwrite, chunkStore, filters);\n const z = await ZarrArray.create(store, path, readOnly, chunkStore, cacheMetadata, cacheAttrs);\n\n return z;\n}\n\n\n/**\n * Create an empty array.\n */\nexport async function empty(shape: number | number[], opts: CreateArrayOptionsWithoutShape = {}) {\n opts.fillValue = null;\n return create({ shape, ...opts });\n}\n\n/**\n * Create an array, with zero being used as the default value for\n * uninitialized portions of the array.\n */\nexport async function zeros(shape: number | number[], opts: CreateArrayOptionsWithoutShape = {}) {\n opts.fillValue = 0;\n return create({ shape, ...opts });\n}\n\n/**\n * Create an array, with one being used as the default value for\n * uninitialized portions of the array.\n */\nexport async function ones(shape: number | number[], opts: CreateArrayOptionsWithoutShape = {}) {\n opts.fillValue = 1;\n return create({ shape, ...opts });\n}\n\n/**\n * Create an array, with `fill_value` being used as the default value for\n * uninitialized portions of the array\n */\nexport async function full(shape: number | number[], fillValue: FillType, opts: CreateArrayOptionsWithoutShape = {}) {\n opts.fillValue = fillValue;\n return create({ shape, ...opts });\n}\n\nexport async function array(data: Buffer | ArrayBuffer | NestedArray<TypedArray>, opts: CreateArrayOptionsWithoutShape = {}) {\n // TODO: infer chunks?\n\n let shape = null;\n if (data instanceof NestedArray) {\n shape = data.shape;\n opts.dtype = opts.dtype === undefined ? data.dtype : opts.dtype;\n } else {\n shape = data.byteLength;\n // TODO: infer datatype\n }\n // TODO: support TypedArray\n\n const wasReadOnly = opts.readOnly === undefined ? false : opts.readOnly;\n opts.readOnly = false;\n\n const z = await create({ shape, ...opts });\n await z.set(null, data);\n z.readOnly = wasReadOnly;\n\n return z;\n}\n\nexport async function openArray(\n { shape, mode = \"a\", chunks = true, dtype = \"<i4\", compressor = null, fillValue = null, order = \"C\", store, overwrite = false, path = null, chunkStore, filters, cacheMetadata = true, cacheAttrs = true }: { shape?: number | number[]; mode?: PersistenceMode; chunks?: ChunksArgument; dtype?: DtypeString; compressor?: CompressorConfig | null; fillValue?: FillType; order?: Order; store?: Store; overwrite?: boolean; path?: string | null; chunkStore?: Store; filters?: Filter[]; cacheMetadata?: boolean; cacheAttrs?: boolean } = {},\n) {\n store = normalizeStoreArgument(store);\n if (chunkStore === undefined) {\n chunkStore = normalizeStoreArgument(store);\n }\n path = normalizeStoragePath(path);\n\n if (mode === \"r\" || mode === \"r+\") {\n if (!await containsArray(store, path)) {\n if (await containsGroup(store, path)) {\n throw new ContainsGroupError(path);\n }\n throw new ArrayNotFoundError(path);\n }\n } else if (mode === \"w\") {\n\n if (shape === undefined) {\n throw new ValueError(\"Shape can not be undefined when creating a new array\");\n }\n await initArray(store, shape, chunks, dtype, path, compressor, fillValue, order, overwrite, chunkStore, filters);\n\n } else if (mode === \"a\") {\n if (!await containsArray(store, path)) {\n if (await containsGroup(store, path)) {\n throw new ContainsGroupError(path);\n }\n if (shape === undefined) {\n throw new ValueError(\"Shape can not be undefined when creating a new array\");\n }\n await initArray(store, shape, chunks, dtype, path, compressor, fillValue, order, overwrite, chunkStore, filters);\n }\n } else if (mode === \"w-\" || (mode as any) === \"x\") {\n if (await containsArray(store, path)) {\n throw new ContainsArrayError(path);\n } else if (await containsGroup(store, path)) {\n throw new ContainsGroupError(path);\n } else {\n if (shape === undefined) {\n throw new ValueError(\"Shape can not be undefined when creating a new array\");\n }\n await initArray(store, shape, chunks, dtype, path, compressor, fillValue, order, overwrite, chunkStore, filters);\n }\n } else {\n throw new ValueError(`Invalid mode argument: ${mode}`);\n }\n\n const readOnly = mode === \"r\";\n return ZarrArray.create(store, path, readOnly, chunkStore, cacheMetadata, cacheAttrs);\n}\n\n\nexport function normalizeStoreArgument(store?: Store | string): Store {\n if (store === undefined) {\n return new MemoryStore();\n } else if (typeof store === \"string\") {\n return new HTTPStore(store);\n }\n return store;\n}","import { createProxy, AsyncMutableMapping, AsyncMutableMappingProxy } from './mutableMapping';\nimport { Store, } from './storage/types';\nimport { normalizeStoragePath } from './util';\nimport { containsArray, pathToPrefix, containsGroup, initGroup } from './storage/index';\nimport { ContainsArrayError, GroupNotFoundError, PermissionError, KeyError, ValueError, ContainsGroupError } from './errors';\nimport { ZarrGroupMetadata, UserAttributes, PersistenceMode } from './types';\nimport { GROUP_META_KEY, ATTRS_META_KEY } from './names';\nimport { parseMetadata } from './metadata';\nimport { Attributes } from './attributes';\nimport { array, empty, zeros, ones, full, create, normalizeStoreArgument, CreateArrayOptionsWithoutShape } from './creation';\nimport { NestedArray } from './nestedArray';\nimport { TypedArray } from './nestedArray/types';\nimport { ZarrArray } from './core';\n\n\nexport class Group implements AsyncMutableMapping<Group | ZarrArray> {\n /**\n * A `Store` providing the underlying storage for the group.\n */\n public store: Store;\n\n /**\n * Storage path.\n */\n public path: string;\n\n /**\n * Group name following h5py convention.\n */\n public get name(): string {\n if (this.path.length > 0) {\n if (this.path[0] !== \"/\") {\n return \"/\" + this.path;\n }\n return this.path;\n }\n return \"/\";\n }\n\n /**\n * Final component of name.\n */\n public get basename(): string {\n const parts = this.name.split(\"/\");\n return parts[parts.length - 1];\n }\n\n /**\n * An object containing user-defined attributes. Note that\n * attribute values are stored as a JSON string in a store.\n */\n public attrs: Attributes<UserAttributes>;\n\n\n private _chunkStore: Store | null;\n /**\n * A `Store` providing the underlying storage for array chunks.\n */\n public get chunkStore(): Store {\n if (this._chunkStore) {\n return this._chunkStore;\n }\n return this.store;\n }\n\n private keyPrefix: string;\n public readOnly: boolean;\n private meta: ZarrGroupMetadata;\n\n public static async create(store: Store, path: string | null = null, readOnly = false, chunkStore: Store | null = null, cacheAttrs = true) {\n const metadata = await this.loadMetadataForConstructor(store, path);\n return new Group(store, path, metadata as ZarrGroupMetadata, readOnly, chunkStore, cacheAttrs);\n }\n\n private static async loadMetadataForConstructor(store: Store, path: null | string) {\n path = normalizeStoragePath(path);\n const keyPrefix = pathToPrefix(path);\n try {\n const metaStoreValue = await store.getItem(keyPrefix + GROUP_META_KEY);\n return parseMetadata(metaStoreValue);\n } catch (error) {\n if (await containsArray(store, path)) {\n throw new ContainsArrayError(path);\n }\n throw new GroupNotFoundError(path);\n }\n }\n\n private constructor(store: Store, path: string | null = null, metadata: ZarrGroupMetadata, readOnly = false, chunkStore: Store | null = null, cacheAttrs = true) {\n this.store = store;\n this._chunkStore = chunkStore;\n this.path = normalizeStoragePath(path);\n this.keyPrefix = pathToPrefix(this.path);\n this.readOnly = readOnly;\n this.meta = metadata;\n\n // Initialize attributes\n const attrKey = this.keyPrefix + ATTRS_META_KEY;\n this.attrs = new Attributes<UserAttributes>(this.store, attrKey, this.readOnly, cacheAttrs);\n }\n\n private itemPath(item: string | null) {\n const absolute = typeof item === \"string\" && item.length > 0 && item[0] === '/';\n const path = normalizeStoragePath(item);\n // Absolute path\n if (!absolute && this.path.length > 0) {\n return this.keyPrefix + path;\n }\n return path;\n }\n\n /**\n * Create a sub-group.\n */\n public async createGroup(name: string, overwrite = false) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n const path = this.itemPath(name);\n await initGroup(this.store, path, this._chunkStore, overwrite);\n return Group.create(this.store, path, this.readOnly, this._chunkStore, this.attrs.cache);\n }\n\n /**\n * Obtain a sub-group, creating one if it doesn't exist.\n */\n public async requireGroup(name: string, overwrite = false) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n const path = this.itemPath(name);\n if (!await containsGroup(this.store, path)) {\n await initGroup(this.store, path, this._chunkStore, overwrite);\n }\n return Group.create(this.store, path, this.readOnly, this._chunkStore, this.attrs.cache);\n }\n\n private getOptsForArrayCreation(name: string, opts: CreateArrayOptionsWithoutShape = {}) {\n const path = this.itemPath(name);\n opts.path = path;\n\n if (opts.cacheAttrs === undefined) {\n opts.cacheAttrs = this.attrs.cache;\n }\n opts.store = this.store;\n opts.chunkStore = this.chunkStore;\n return opts;\n }\n\n /**\n * Creates an array\n */\n public array(name: string, data: Buffer | ArrayBuffer | NestedArray<TypedArray>, opts?: CreateArrayOptionsWithoutShape, overwrite?: boolean) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n opts = this.getOptsForArrayCreation(name, opts);\n opts.overwrite = overwrite === undefined ? opts.overwrite : overwrite;\n\n return array(data, opts);\n }\n\n public empty(name: string, shape: number | number[], opts: CreateArrayOptionsWithoutShape = {}) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n opts = this.getOptsForArrayCreation(name, opts);\n\n return empty(shape, opts);\n }\n\n public zeros(name: string, shape: number | number[], opts: CreateArrayOptionsWithoutShape = {}) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n opts = this.getOptsForArrayCreation(name, opts);\n\n return zeros(shape, opts);\n }\n\n public ones(name: string, shape: number | number[], opts: CreateArrayOptionsWithoutShape = {}) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n opts = this.getOptsForArrayCreation(name, opts);\n\n return ones(shape, opts);\n }\n\n public full(name: string, shape: number | number[], fillValue: number | null, opts: CreateArrayOptionsWithoutShape = {}) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n opts = this.getOptsForArrayCreation(name, opts);\n\n return full(shape, fillValue, opts);\n }\n\n public createDataset(name: string, shape?: number | number[], data?: Buffer | ArrayBuffer | NestedArray<TypedArray>, opts?: CreateArrayOptionsWithoutShape) {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n opts = this.getOptsForArrayCreation(name, opts);\n\n let z: Promise<ZarrArray>;\n if (data === undefined) {\n if (shape === undefined) {\n throw new ValueError(\"Shape must be set if no data is passed to CreateDataset\");\n }\n z = create({ shape, ...opts });\n } else {\n z = array(data, opts);\n }\n return z;\n }\n\n async getItem(item: string) {\n const path = this.itemPath(item);\n if (await containsArray(this.store, path)) {\n return ZarrArray.create(this.store, path, this.readOnly, this.chunkStore, undefined, this.attrs.cache);\n } else if (await containsGroup(this.store, path)) {\n return Group.create(this.store, path, this.readOnly, this._chunkStore, this.attrs.cache);\n }\n throw new KeyError(item);\n }\n\n async setItem(item: string, value: any) {\n await this.array(item, value, {}, true);\n return true;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async deleteItem(_item: string): Promise<boolean> {\n if (this.readOnly) {\n throw new PermissionError(\"group is read only\");\n }\n throw new Error(\"Method not implemented.\");\n }\n\n async containsItem(item: string) {\n const path = this.itemPath(item);\n return await containsArray(this.store, path) || containsGroup(this.store, path);\n }\n\n proxy(): AsyncMutableMappingProxy<Group> {\n return createProxy(this);\n }\n}\n\n/**\n * Create a group.\n * @param store Store or path to directory in file system.\n * @param path Group path within store.\n * @param chunkStore Separate storage for chunks. If not provided, `store` will be used for storage of both chunks and metadata.\n * @param overwrite If `true`, delete any pre-existing data in `store` at `path` before creating the group.\n * @param cacheAttrs If `true` (default), user attributes will be cached for attribute read operations.\n * If `false`, user attributes are reloaded from the store prior to all attribute read operations.\n */\nexport async function group(store?: Store | string, path: string | null = null, chunkStore?: Store, overwrite = false, cacheAttrs = true) {\n store = normalizeStoreArgument(store);\n path = normalizeStoragePath(path);\n\n if (overwrite || await containsGroup(store)) {\n await initGroup(store, path, chunkStore, overwrite);\n }\n\n return Group.create(store, path, false, chunkStore, cacheAttrs);\n}\n\n/**\n * Open a group using file-mode-like semantics.\n * @param store Store or path to directory in file system or name of zip file.\n * @param path Group path within store.\n * @param mode Persistence mode, see `PersistenceMode` type.\n * @param chunkStore Store or path to directory in file system or name of zip file.\n * @param cacheAttrs If `true` (default), user attributes will be cached for attribute read operations\n * If False, user attributes are reloaded from the store prior to all attribute read operations.\n *\n */\nexport async function openGroup(store?: Store | string, path: string | null = null, mode: PersistenceMode = \"a\", chunkStore?: Store, cacheAttrs = true) {\n store = normalizeStoreArgument(store);\n if (chunkStore !== undefined) {\n chunkStore = normalizeStoreArgument(store);\n }\n path = normalizeStoragePath(path);\n\n if (mode === \"r\" || mode === \"r+\") {\n if (!await containsGroup(store, path)) {\n if (await containsArray(store, path)) {\n throw new ContainsArrayError(path);\n }\n throw new GroupNotFoundError(path);\n }\n } else if (mode === \"w\") {\n await initGroup(store, path, chunkStore, true);\n } else if (mode === \"a\") {\n if (!await containsGroup(store, path)) {\n if (await containsArray(store, path)) {\n throw new ContainsArrayError(path);\n }\n await initGroup(store, path, chunkStore);\n }\n } else if (mode === \"w-\" || (mode as any) === \"x\") {\n if (await containsArray(store, path)) {\n throw new ContainsArrayError(path);\n } else if (await containsGroup(store, path)) {\n throw new ContainsGroupError(path);\n } else {\n await initGroup(store, path, chunkStore);\n }\n } else {\n throw new ValueError(`Invalid mode argument: ${mode}`);\n }\n\n const readOnly = mode === \"r\";\n return Group.create(store, path, readOnly, chunkStore, cacheAttrs);\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ReactCSS = exports.loop = exports.handleActive = exports.handleHover = exports.hover = undefined;\n\nvar _flattenNames = require('./flattenNames');\n\nvar _flattenNames2 = _interopRequireDefault(_flattenNames);\n\nvar _mergeClasses = require('./mergeClasses');\n\nvar _mergeClasses2 = _interopRequireDefault(_mergeClasses);\n\nvar _autoprefix = require('./autoprefix');\n\nvar _autoprefix2 = _interopRequireDefault(_autoprefix);\n\nvar _hover2 = require('./components/hover');\n\nvar _hover3 = _interopRequireDefault(_hover2);\n\nvar _active = require('./components/active');\n\nvar _active2 = _interopRequireDefault(_active);\n\nvar _loop2 = require('./loop');\n\nvar _loop3 = _interopRequireDefault(_loop2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.hover = _hover3.default;\nexports.handleHover = _hover3.default;\nexports.handleActive = _active2.default;\nexports.loop = _loop3.default;\nvar ReactCSS = exports.ReactCSS = function ReactCSS(classes) {\n for (var _len = arguments.length, activations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n activations[_key - 1] = arguments[_key];\n }\n\n var activeNames = (0, _flattenNames2.default)(activations);\n var merged = (0, _mergeClasses2.default)(classes, activeNames);\n return (0, _autoprefix2.default)(merged);\n};\n\nexports.default = ReactCSS;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","import * as React from 'react';\nimport setRef from './setRef';\nexport default function useForkRef(refA, refB) {\n /**\n * This will create a new function if the ref props change and are defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior\n */\n return React.useMemo(function () {\n if (refA == null && refB == null) {\n return null;\n }\n\n return function (refValue) {\n setRef(refA, refValue);\n setRef(refB, refValue);\n };\n }, [refA, refB]);\n}","import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport React, { Children } from 'react';\nimport toArray from 'rc-util/es/Children/toArray';\nimport warning from 'warning';\nimport TreeNode from './TreeNode';\n\nvar DRAG_SIDE_RANGE = 0.25;\nvar DRAG_MIN_GAP = 2;\n\nvar onlyTreeNodeWarned = false;\n\nexport function warnOnlyTreeNode() {\n if (onlyTreeNodeWarned) return;\n\n onlyTreeNodeWarned = true;\n warning(false, 'Tree only accept TreeNode as children.');\n}\n\nexport function arrDel(list, value) {\n var clone = list.slice();\n var index = clone.indexOf(value);\n if (index >= 0) {\n clone.splice(index, 1);\n }\n return clone;\n}\n\nexport function arrAdd(list, value) {\n var clone = list.slice();\n if (clone.indexOf(value) === -1) {\n clone.push(value);\n }\n return clone;\n}\n\nexport function posToArr(pos) {\n return pos.split('-');\n}\n\nexport function getPosition(level, index) {\n return level + '-' + index;\n}\n\nexport function isTreeNode(node) {\n return node && node.type && node.type.isTreeNode;\n}\n\nexport function getNodeChildren(children) {\n return toArray(children).filter(isTreeNode);\n}\n\nexport function isCheckDisabled(node) {\n var _ref = node.props || {},\n disabled = _ref.disabled,\n disableCheckbox = _ref.disableCheckbox;\n\n return !!(disabled || disableCheckbox);\n}\n\nexport function traverseTreeNodes(treeNodes, callback) {\n function processNode(node, index, parent) {\n var children = node ? node.props.children : treeNodes;\n var pos = node ? getPosition(parent.pos, index) : 0;\n\n // Filter children\n var childList = getNodeChildren(children);\n\n // Process node if is not root\n if (node) {\n var data = {\n node: node,\n index: index,\n pos: pos,\n key: node.key || pos,\n parentPos: parent.node ? parent.pos : null\n };\n\n callback(data);\n }\n\n // Process children node\n Children.forEach(childList, function (subNode, subIndex) {\n processNode(subNode, subIndex, { node: node, pos: pos });\n });\n }\n\n processNode(null);\n}\n\n/**\n * Use `rc-util` `toArray` to get the children list which keeps the key.\n * And return single node if children is only one(This can avoid `key` missing check).\n */\nexport function mapChildren(children, func) {\n var list = toArray(children).map(func);\n if (list.length === 1) {\n return list[0];\n }\n return list;\n}\n\nexport function getDragNodesKeys(treeNodes, node) {\n var _node$props = node.props,\n eventKey = _node$props.eventKey,\n pos = _node$props.pos;\n\n var dragNodesKeys = [];\n\n traverseTreeNodes(treeNodes, function (_ref2) {\n var key = _ref2.key;\n\n dragNodesKeys.push(key);\n });\n dragNodesKeys.push(eventKey || pos);\n return dragNodesKeys;\n}\n\n// Only used when drag, not affect SSR.\nexport function calcDropPosition(event, treeNode) {\n var clientY = event.clientY;\n\n var _treeNode$selectHandl = treeNode.selectHandle.getBoundingClientRect(),\n top = _treeNode$selectHandl.top,\n bottom = _treeNode$selectHandl.bottom,\n height = _treeNode$selectHandl.height;\n\n var des = Math.max(height * DRAG_SIDE_RANGE, DRAG_MIN_GAP);\n\n if (clientY <= top + des) {\n return -1;\n } else if (clientY >= bottom - des) {\n return 1;\n }\n\n return 0;\n}\n\n/**\n * Return selectedKeys according with multiple prop\n * @param selectedKeys\n * @param props\n * @returns [string]\n */\nexport function calcSelectedKeys(selectedKeys, props) {\n if (!selectedKeys) return undefined;\n\n var multiple = props.multiple;\n\n if (multiple) {\n return selectedKeys.slice();\n }\n\n if (selectedKeys.length) {\n return [selectedKeys[0]];\n }\n return selectedKeys;\n}\n\n/**\n * Since React internal will convert key to string,\n * we need do this to avoid `checkStrictly` use number match\n */\nfunction keyListToString(keyList) {\n if (!keyList) return keyList;\n return keyList.map(function (key) {\n return String(key);\n });\n}\n\nvar internalProcessProps = function internalProcessProps(props) {\n return props;\n};\nexport function convertDataToTree(treeData, processer) {\n if (!treeData) return [];\n\n var _ref3 = processer || {},\n _ref3$processProps = _ref3.processProps,\n processProps = _ref3$processProps === undefined ? internalProcessProps : _ref3$processProps;\n\n var list = Array.isArray(treeData) ? treeData : [treeData];\n return list.map(function (_ref4) {\n var children = _ref4.children,\n props = _objectWithoutProperties(_ref4, ['children']);\n\n var childrenNodes = convertDataToTree(children, processer);\n\n return React.createElement(\n TreeNode,\n processProps(props),\n childrenNodes\n );\n });\n}\n\n// TODO: ========================= NEW LOGIC =========================\n/**\n * Calculate treeNodes entities. `processTreeEntity` is used for `rc-tree-select`\n * @param treeNodes\n * @param processTreeEntity User can customize the entity\n */\nexport function convertTreeToEntities(treeNodes) {\n var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n initWrapper = _ref5.initWrapper,\n processEntity = _ref5.processEntity,\n onProcessFinished = _ref5.onProcessFinished;\n\n var posEntities = {};\n var keyEntities = {};\n var wrapper = {\n posEntities: posEntities,\n keyEntities: keyEntities\n };\n\n if (initWrapper) {\n wrapper = initWrapper(wrapper) || wrapper;\n }\n\n traverseTreeNodes(treeNodes, function (item) {\n var node = item.node,\n index = item.index,\n pos = item.pos,\n key = item.key,\n parentPos = item.parentPos;\n\n var entity = { node: node, index: index, key: key, pos: pos };\n\n posEntities[pos] = entity;\n keyEntities[key] = entity;\n\n // Fill children\n entity.parent = posEntities[parentPos];\n if (entity.parent) {\n entity.parent.children = entity.parent.children || [];\n entity.parent.children.push(entity);\n }\n\n if (processEntity) {\n processEntity(entity, wrapper);\n }\n });\n\n if (onProcessFinished) {\n onProcessFinished(wrapper);\n }\n\n return wrapper;\n}\n\n/**\n * Parse `checkedKeys` to { checkedKeys, halfCheckedKeys } style\n */\nexport function parseCheckedKeys(keys) {\n if (!keys) {\n return null;\n }\n\n // Convert keys to object format\n var keyProps = void 0;\n if (Array.isArray(keys)) {\n // [Legacy] Follow the api doc\n keyProps = {\n checkedKeys: keys,\n halfCheckedKeys: undefined\n };\n } else if (typeof keys === 'object') {\n keyProps = {\n checkedKeys: keys.checked || undefined,\n halfCheckedKeys: keys.halfChecked || undefined\n };\n } else {\n warning(false, '`checkedKeys` is not an array or an object');\n return null;\n }\n\n keyProps.checkedKeys = keyListToString(keyProps.checkedKeys);\n keyProps.halfCheckedKeys = keyListToString(keyProps.halfCheckedKeys);\n\n return keyProps;\n}\n\n/**\n * Conduct check state by the keyList. It will conduct up & from the provided key.\n * If the conduct path reach the disabled or already checked / unchecked node will stop conduct.\n * @param keyList list of keys\n * @param isCheck is check the node or not\n * @param keyEntities parsed by `convertTreeToEntities` function in Tree\n * @param checkStatus Can pass current checked status for process (usually for uncheck operation)\n * @returns {{checkedKeys: [], halfCheckedKeys: []}}\n */\nexport function conductCheck(keyList, isCheck, keyEntities) {\n var checkStatus = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n var checkedKeys = {};\n var halfCheckedKeys = {}; // Record the key has some child checked (include child half checked)\n\n (checkStatus.checkedKeys || []).forEach(function (key) {\n checkedKeys[key] = true;\n });\n\n (checkStatus.halfCheckedKeys || []).forEach(function (key) {\n halfCheckedKeys[key] = true;\n });\n\n // Conduct up\n function conductUp(key) {\n if (checkedKeys[key] === isCheck) return;\n\n var entity = keyEntities[key];\n if (!entity) return;\n\n var children = entity.children,\n parent = entity.parent,\n node = entity.node;\n\n\n if (isCheckDisabled(node)) return;\n\n // Check child node checked status\n var everyChildChecked = true;\n var someChildChecked = false; // Child checked or half checked\n\n (children || []).filter(function (child) {\n return !isCheckDisabled(child.node);\n }).forEach(function (_ref6) {\n var childKey = _ref6.key;\n\n var childChecked = checkedKeys[childKey];\n var childHalfChecked = halfCheckedKeys[childKey];\n\n if (childChecked || childHalfChecked) someChildChecked = true;\n if (!childChecked) everyChildChecked = false;\n });\n\n // Update checked status\n if (isCheck) {\n checkedKeys[key] = everyChildChecked;\n } else {\n checkedKeys[key] = false;\n }\n halfCheckedKeys[key] = someChildChecked;\n\n if (parent) {\n conductUp(parent.key);\n }\n }\n\n // Conduct down\n function conductDown(key) {\n if (checkedKeys[key] === isCheck) return;\n\n var entity = keyEntities[key];\n if (!entity) return;\n\n var children = entity.children,\n node = entity.node;\n\n\n if (isCheckDisabled(node)) return;\n\n checkedKeys[key] = isCheck;\n\n (children || []).forEach(function (child) {\n conductDown(child.key);\n });\n }\n\n function conduct(key) {\n var entity = keyEntities[key];\n\n if (!entity) {\n warning(false, '\\'' + key + '\\' does not exist in the tree.');\n return;\n }\n\n var children = entity.children,\n parent = entity.parent,\n node = entity.node;\n\n checkedKeys[key] = isCheck;\n\n if (isCheckDisabled(node)) return;\n\n // Conduct down\n (children || []).filter(function (child) {\n return !isCheckDisabled(child.node);\n }).forEach(function (child) {\n conductDown(child.key);\n });\n\n // Conduct up\n if (parent) {\n conductUp(parent.key);\n }\n }\n\n (keyList || []).forEach(function (key) {\n conduct(key);\n });\n\n var checkedKeyList = [];\n var halfCheckedKeyList = [];\n\n // Fill checked list\n Object.keys(checkedKeys).forEach(function (key) {\n if (checkedKeys[key]) {\n checkedKeyList.push(key);\n }\n });\n\n // Fill half checked list\n Object.keys(halfCheckedKeys).forEach(function (key) {\n if (!checkedKeys[key] && halfCheckedKeys[key]) {\n halfCheckedKeyList.push(key);\n }\n });\n\n return {\n checkedKeys: checkedKeyList,\n halfCheckedKeys: halfCheckedKeyList\n };\n}\n\n/**\n * If user use `autoExpandParent` we should get the list of parent node\n * @param keyList\n * @param keyEntities\n */\nexport function conductExpandParent(keyList, keyEntities) {\n var expandedKeys = {};\n\n function conductUp(key) {\n if (expandedKeys[key]) return;\n\n var entity = keyEntities[key];\n if (!entity) return;\n\n expandedKeys[key] = true;\n\n var parent = entity.parent,\n node = entity.node;\n\n\n if (isCheckDisabled(node)) return;\n\n if (parent) {\n conductUp(parent.key);\n }\n }\n\n (keyList || []).forEach(function (key) {\n conductUp(key);\n });\n\n return Object.keys(expandedKeys);\n}\n\n/**\n * Returns only the data- and aria- key/value pairs\n * @param {object} props \n */\nexport function getDataAndAria(props) {\n return Object.keys(props).reduce(function (prev, key) {\n if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-') {\n prev[key] = props[key];\n }\n return prev;\n }, {});\n}","\nexport default function quickselect(arr, k, left, right, compare) {\n quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselectStep(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n","import { ToInteger } from \"./spec\";\n\n\nexport { default as isArrayBuffer } from \"lodash-es/isArrayBuffer\";\n\nexport function isDataView(view) {\n return view instanceof DataView;\n}\n\nexport function isStringNumberKey(key) {\n return typeof key === \"string\" && key === ToInteger(key) + \"\";\n}\n","// algorithm: ftp://ftp.fox-toolkit.org/pub/fasthalffloatconversion.pdf\n\nconst buffer = new ArrayBuffer(4);\nconst floatView = new Float32Array(buffer);\nconst uint32View = new Uint32Array(buffer);\n\n\nconst baseTable = new Uint32Array(512);\nconst shiftTable = new Uint32Array(512);\n\nfor(let i = 0; i < 256; ++i) {\n const e = i - 127;\n\n // very small number (0, -0)\n if(e < -27) {\n baseTable[i | 0x000] = 0x0000;\n baseTable[i | 0x100] = 0x8000;\n shiftTable[i | 0x000] = 24;\n shiftTable[i | 0x100] = 24;\n\n // small number (denorm)\n } else if(e < -14) {\n baseTable[i | 0x000] = 0x0400 >> (-e - 14);\n baseTable[i | 0x100] = (0x0400 >> (-e - 14)) | 0x8000;\n shiftTable[i | 0x000] = -e - 1;\n shiftTable[i | 0x100] = -e - 1;\n\n // normal number\n } else if(e <= 15) {\n baseTable[i | 0x000] = (e + 15) << 10;\n baseTable[i | 0x100] = ((e + 15) << 10) | 0x8000;\n shiftTable[i | 0x000] = 13;\n shiftTable[i | 0x100] = 13;\n\n // large number (Infinity, -Infinity)\n } else if(e < 128) {\n baseTable[i | 0x000] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i | 0x000] = 24;\n shiftTable[i | 0x100] = 24;\n\n // stay (NaN, Infinity, -Infinity)\n } else {\n baseTable[i | 0x000] = 0x7c00;\n baseTable[i | 0x100] = 0xfc00;\n shiftTable[i | 0x000] = 13;\n shiftTable[i | 0x100] = 13;\n }\n}\n\n/**\n * round a number to a half float number bits.\n * @param {number} num\n */\nexport function roundToFloat16Bits(num) {\n floatView[0] = num;\n\n const f = uint32View[0];\n const e = (f >> 23) & 0x1ff;\n return baseTable[e] + ((f & 0x007fffff) >> shiftTable[e]);\n}\n\n\nconst mantissaTable = new Uint32Array(2048);\nconst exponentTable = new Uint32Array(64);\nconst offsetTable = new Uint32Array(64);\n\nmantissaTable[0] = 0;\nfor(let i = 1; i < 1024; ++i) {\n let m = i << 13; // zero pad mantissa bits\n let e = 0; // zero exponent\n\n // normalized\n while((m & 0x00800000) === 0) {\n e -= 0x00800000; // decrement exponent\n m <<= 1;\n }\n\n m &= ~0x00800000; // clear leading 1 bit\n e += 0x38800000; // adjust bias\n\n mantissaTable[i] = m | e;\n}\nfor(let i = 1024; i < 2048; ++i) {\n mantissaTable[i] = 0x38000000 + ((i - 1024) << 13);\n}\n\nexponentTable[0] = 0;\nfor(let i = 1; i < 31; ++i) {\n exponentTable[i] = i << 23;\n}\nexponentTable[31] = 0x47800000;\nexponentTable[32] = 0x80000000;\nfor(let i = 33; i < 63; ++i) {\n exponentTable[i] = 0x80000000 + ((i - 32) << 23);\n}\nexponentTable[63] = 0xc7800000;\n\noffsetTable[0] = 0;\nfor(let i = 1; i < 64; ++i) {\n if(i === 32) {\n offsetTable[i] = 0;\n } else {\n offsetTable[i] = 1024;\n }\n}\n\n/**\n * convert a half float number bits to a number.\n * @param {number} float16bits - half float number bits\n */\nexport function convertToNumber(float16bits) {\n const m = float16bits >> 10;\n uint32View[0] = mantissaTable[offsetTable[m] + (float16bits & 0x3ff)] + exponentTable[m];\n return floatView[0];\n}\n","import { isDataView } from \"./is\";\nimport { roundToFloat16Bits, convertToNumber } from \"./lib\";\n\n/**\n * returns an unsigned 16-bit float at the specified byte offset from the start of the DataView.\n * @param {DataView} dataView\n * @param {nunmber} byteOffset\n * @param {*} opts\n */\nexport function getFloat16(dataView, byteOffset, ...opts) {\n if(!isDataView(dataView))\n throw new TypeError(\"First argument to getFloat16 function must be a DataView\");\n\n return convertToNumber( dataView.getUint16(byteOffset, ...opts) );\n}\n\n/**\n * stores an unsigned 16-bit float value at the specified byte offset from the start of the DataView.\n * @param {DataView} dataView\n * @param {number} byteOffset\n * @param {number} value\n * @param {*} opts\n */\nexport function setFloat16(dataView, byteOffset, value, ...opts) {\n if(!isDataView(dataView))\n throw new TypeError(\"First argument to setFloat16 function must be a DataView\");\n\n dataView.setUint16(byteOffset, roundToFloat16Bits(value), ...opts);\n}\n","// ==ClosureCompiler==\n// @output_file_name default.js\n// @compilation_level SIMPLE_OPTIMIZATIONS\n// ==/ClosureCompiler==\n// module.exports = {\n// parse: parse,\n// simplify: simplify,\n// simplifyLostLess: simplifyLostLess,\n// filter: filter,\n// stringify: stringify,\n// toContentString: toContentString,\n// getElementById: getElementById,\n// getElementsByClassName: getElementsByClassName,\n// transformStream: transformStream,\n// };\n\n/**\n * @author: Tobias Nickel\n * @created: 06.04.2015\n * I needed a small xmlparser chat can be used in a worker.\n */\n\n/**\n * @typedef tNode \n * @property {string} tagName \n * @property {object} attributes\n * @property {(tNode|string)[]} children \n **/\n\n/**\n * @typedef TParseOptions\n * @property {number} [pos]\n * @property {string[]} [noChildNodes]\n * @property {boolean} [setPos]\n * @property {boolean} [keepComments] \n * @property {boolean} [keepWhitespace]\n * @property {boolean} [simplify]\n * @property {(a: tNode, b: tNode) => boolean} [filter]\n */\n\n/**\n * parseXML / html into a DOM Object. with no validation and some failur tolerance\n * @param {string} S your XML to parse\n * @param {TParseOptions} [options] all other options:\n * @return {(tNode | string)[]}\n */\nfunction parse(S, options) {\n \"txml\";\n options = options || {};\n\n var pos = options.pos || 0;\n var keepComments = !!options.keepComments;\n var keepWhitespace = !!options.keepWhitespace;\n\n var openBracket = \"<\";\n var openBracketCC = \"<\".charCodeAt(0);\n var closeBracket = \">\";\n var closeBracketCC = \">\".charCodeAt(0);\n var minusCC = \"-\".charCodeAt(0);\n var slashCC = \"/\".charCodeAt(0);\n var exclamationCC = '!'.charCodeAt(0);\n var singleQuoteCC = \"'\".charCodeAt(0);\n var doubleQuoteCC = '\"'.charCodeAt(0);\n var openCornerBracketCC = '['.charCodeAt(0);\n var closeCornerBracketCC = ']'.charCodeAt(0);\n\n\n /**\n * parsing a list of entries\n */\n function parseChildren(tagName) {\n var children = [];\n while (S[pos]) {\n if (S.charCodeAt(pos) == openBracketCC) {\n if (S.charCodeAt(pos + 1) === slashCC) {\n var closeStart = pos + 2;\n pos = S.indexOf(closeBracket, pos);\n\n var closeTag = S.substring(closeStart, pos);\n if (closeTag.indexOf(tagName) == -1) {\n var parsedText = S.substring(0, pos).split('\\n');\n throw new Error(\n 'Unexpected close tag\\nLine: ' + (parsedText.length - 1) +\n '\\nColumn: ' + (parsedText[parsedText.length - 1].length + 1) +\n '\\nChar: ' + S[pos]\n );\n }\n\n if (pos + 1) pos += 1;\n\n return children;\n } else if (S.charCodeAt(pos + 1) === exclamationCC) {\n if (S.charCodeAt(pos + 2) == minusCC) {\n //comment support\n const startCommentPos = pos;\n while (pos !== -1 && !(S.charCodeAt(pos) === closeBracketCC && S.charCodeAt(pos - 1) == minusCC && S.charCodeAt(pos - 2) == minusCC && pos != -1)) {\n pos = S.indexOf(closeBracket, pos + 1);\n }\n if (pos === -1) {\n pos = S.length;\n }\n if (keepComments) {\n children.push(S.substring(startCommentPos, pos + 1));\n }\n } else if (\n S.charCodeAt(pos + 2) === openCornerBracketCC &&\n S.charCodeAt(pos + 8) === openCornerBracketCC &&\n S.substr(pos + 3, 5).toLowerCase() === 'cdata'\n ) {\n // cdata\n var cdataEndIndex = S.indexOf(']]>', pos);\n if (cdataEndIndex == -1) {\n children.push(S.substr(pos + 9));\n pos = S.length;\n } else {\n children.push(S.substring(pos + 9, cdataEndIndex));\n pos = cdataEndIndex + 3;\n }\n continue;\n } else {\n // doctypesupport\n const startDoctype = pos + 1;\n pos += 2;\n var encapsuled = false;\n while ((S.charCodeAt(pos) !== closeBracketCC || encapsuled === true) && S[pos]) {\n if (S.charCodeAt(pos) === openCornerBracketCC) {\n encapsuled = true;\n } else if (encapsuled === true && S.charCodeAt(pos) === closeCornerBracketCC) {\n encapsuled = false;\n }\n pos++;\n }\n children.push(S.substring(startDoctype, pos));\n }\n pos++;\n continue;\n }\n var node = parseNode();\n children.push(node);\n if (node.tagName[0] === '?') {\n children.push(...node.children);\n node.children = [];\n }\n } else {\n var text = parseText();\n if (keepWhitespace) {\n if (text.length > 0) {\n children.push(text);\n }\n } else {\n var trimmed = text.trim();\n if (trimmed.length > 0) {\n children.push(trimmed);\n }\n }\n pos++;\n }\n }\n return children;\n }\n\n /**\n * returns the text outside of texts until the first '<'\n */\n function parseText() {\n var start = pos;\n pos = S.indexOf(openBracket, pos) - 1;\n if (pos === -2)\n pos = S.length;\n return S.slice(start, pos + 1);\n }\n /**\n * returns text until the first nonAlphabetic letter\n */\n var nameSpacer = '\\r\\n\\t>/= ';\n\n function parseName() {\n var start = pos;\n while (nameSpacer.indexOf(S[pos]) === -1 && S[pos]) {\n pos++;\n }\n return S.slice(start, pos);\n }\n /**\n * is parsing a node, including tagName, Attributes and its children,\n * to parse children it uses the parseChildren again, that makes the parsing recursive\n */\n var NoChildNodes = options.noChildNodes || ['img', 'br', 'input', 'meta', 'link', 'hr'];\n\n function parseNode() {\n pos++;\n const tagName = parseName();\n const attributes = {};\n let children = [];\n\n // parsing attributes\n while (S.charCodeAt(pos) !== closeBracketCC && S[pos]) {\n var c = S.charCodeAt(pos);\n if ((c > 64 && c < 91) || (c > 96 && c < 123)) {\n //if('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.indexOf(S[pos])!==-1 ){\n var name = parseName();\n // search beginning of the string\n var code = S.charCodeAt(pos);\n while (code && code !== singleQuoteCC && code !== doubleQuoteCC && !((code > 64 && code < 91) || (code > 96 && code < 123)) && code !== closeBracketCC) {\n pos++;\n code = S.charCodeAt(pos);\n }\n if (code === singleQuoteCC || code === doubleQuoteCC) {\n var value = parseString();\n if (pos === -1) {\n return {\n tagName,\n attributes,\n children,\n };\n }\n } else {\n value = null;\n pos--;\n }\n attributes[name] = value;\n }\n pos++;\n }\n // optional parsing of children\n if (S.charCodeAt(pos - 1) !== slashCC) {\n if (tagName == \"script\") {\n var start = pos + 1;\n pos = S.indexOf('</script>', pos);\n children = [S.slice(start, pos)];\n pos += 9;\n } else if (tagName == \"style\") {\n var start = pos + 1;\n pos = S.indexOf('</style>', pos);\n children = [S.slice(start, pos)];\n pos += 8;\n } else if (NoChildNodes.indexOf(tagName) === -1) {\n pos++;\n children = parseChildren(tagName);\n } else {\n pos++;\n }\n } else {\n pos++;\n }\n return {\n tagName,\n attributes,\n children,\n };\n }\n\n /**\n * is parsing a string, that starts with a char and with the same usually ' or \"\n */\n\n function parseString() {\n var startChar = S[pos];\n var startpos = pos + 1;\n pos = S.indexOf(startChar, startpos);\n return S.slice(startpos, pos);\n }\n\n /**\n *\n */\n function findElements() {\n var r = new RegExp('\\\\s' + options.attrName + '\\\\s*=[\\'\"]' + options.attrValue + '[\\'\"]').exec(S);\n if (r) {\n return r.index;\n } else {\n return -1;\n }\n }\n\n var out = null;\n if (options.attrValue !== undefined) {\n options.attrName = options.attrName || 'id';\n var out = [];\n\n while ((pos = findElements()) !== -1) {\n pos = S.lastIndexOf('<', pos);\n if (pos !== -1) {\n out.push(parseNode());\n }\n S = S.substr(pos);\n pos = 0;\n }\n } else if (options.parseNode) {\n out = parseNode();\n } else {\n out = parseChildren('');\n }\n\n if (options.filter) {\n out = filter(out, options.filter);\n }\n\n if (options.simplify) {\n return simplify(Array.isArray(out) ? out : [out]);\n }\n\n if (options.setPos) {\n out.pos = pos;\n }\n\n return out;\n}\n\n/**\n * transform the DomObject to an object that is like the object of PHP`s simple_xmp_load_*() methods.\n * this format helps you to write that is more likely to keep your program working, even if there a small changes in the XML schema.\n * be aware, that it is not possible to reproduce the original xml from a simplified version, because the order of elements is not saved.\n * therefore your program will be more flexible and easier to read.\n *\n * @param {tNode[]} children the childrenList\n */\nfunction simplify(children) {\n var out = {};\n if (!children.length) {\n return '';\n }\n\n if (children.length === 1 && typeof children[0] == 'string') {\n return children[0];\n }\n // map each object\n children.forEach(function(child) {\n if (typeof child !== 'object') {\n return;\n }\n if (!out[child.tagName])\n out[child.tagName] = [];\n var kids = simplify(child.children);\n out[child.tagName].push(kids);\n if (Object.keys(child.attributes).length && typeof kids !== 'string') {\n kids._attributes = child.attributes;\n }\n });\n\n for (var i in out) {\n if (out[i].length == 1) {\n out[i] = out[i][0];\n }\n }\n\n return out;\n}\n\n/**\n * similar to simplify, but lost less\n *\n * @param {tNode[]} children the childrenList\n */\nfunction simplifyLostLess(children, parentAttributes = {}) {\n var out = {};\n if (!children.length) {\n return out;\n }\n\n if (children.length === 1 && typeof children[0] == 'string') {\n return Object.keys(parentAttributes).length ? {\n _attributes: parentAttributes,\n value: children[0]\n } : children[0];\n }\n // map each object\n children.forEach(function(child) {\n if (typeof child !== 'object') {\n return;\n }\n if (!out[child.tagName])\n out[child.tagName] = [];\n var kids = simplifyLostLess(child.children || [], child.attributes);\n out[child.tagName].push(kids);\n if (Object.keys(child.attributes).length) {\n kids._attributes = child.attributes;\n }\n });\n\n return out;\n}\n/**\n * behaves the same way as Array.filter, if the filter method return true, the element is in the resultList\n * @params children{Array} the children of a node\n * @param f{function} the filter method\n */\nfunction filter(children, f, dept = 0, path = '') {\n var out = [];\n children.forEach(function(child, i) {\n if (typeof(child) === 'object' && f(child, i, dept, path)) out.push(child);\n if (child.children) {\n var kids = filter(child.children, f, dept + 1, (path ? path + '.' : '') + i + '.' + child.tagName);\n out = out.concat(kids);\n }\n });\n return out;\n}\n/**\n * stringify a previously parsed string object.\n * this is useful,\n * 1. to remove whitespace\n * 2. to recreate xml data, with some changed data.\n * @param {tNode} O the object to Stringify\n */\nfunction stringify(O) {\n var out = '';\n\n function writeChildren(O) {\n if (O) {\n for (var i = 0; i < O.length; i++) {\n if (typeof O[i] == 'string') {\n out += O[i].trim();\n } else {\n writeNode(O[i]);\n }\n }\n }\n }\n\n function writeNode(N) {\n out += \"<\" + N.tagName;\n for (var i in N.attributes) {\n if (N.attributes[i] === null) {\n out += ' ' + i;\n } else if (N.attributes[i].indexOf('\"') === -1) {\n out += ' ' + i + '=\"' + N.attributes[i].trim() + '\"';\n } else {\n out += ' ' + i + \"='\" + N.attributes[i].trim() + \"'\";\n }\n }\n if (N.tagName[0] === '?') {\n out += '?>';\n return;\n }\n out += '>';\n writeChildren(N.children);\n out += '</' + N.tagName + '>';\n }\n writeChildren(O);\n\n return out;\n}\n\n/**\n * use this method to read the text content, of some node.\n * It is great if you have mixed content like:\n * this text has some <b>big</b> text and a <a href=''>link</a>\n * @return {string}\n */\nfunction toContentString(tDom) {\n if (Array.isArray(tDom)) {\n var out = '';\n tDom.forEach(function(e) {\n out += ' ' + toContentString(e);\n out = out.trim();\n });\n return out;\n } else if (typeof tDom === 'object') {\n return toContentString(tDom.children)\n } else {\n return ' ' + tDom;\n }\n}\nfunction getElementById(S, id, simplified) {\n var out = parse(S, {\n attrValue: id\n });\n return simplified ? tXml.simplify(out) : out[0];\n}\nfunction getElementsByClassName(S, classname, simplified) {\n const out = parse(S, {\n attrName: 'class',\n attrValue: '[a-zA-Z0-9- ]*' + classname + '[a-zA-Z0-9- ]*'\n });\n return simplified ? tXml.simplify(out) : out;\n}\n\nexport { filter, getElementById, getElementsByClassName, parse, simplify, simplifyLostLess, stringify, toContentString };\n","export const fieldTagNames = {\n // TIFF Baseline\n 0x013B: 'Artist',\n 0x0102: 'BitsPerSample',\n 0x0109: 'CellLength',\n 0x0108: 'CellWidth',\n 0x0140: 'ColorMap',\n 0x0103: 'Compression',\n 0x8298: 'Copyright',\n 0x0132: 'DateTime',\n 0x0152: 'ExtraSamples',\n 0x010A: 'FillOrder',\n 0x0121: 'FreeByteCounts',\n 0x0120: 'FreeOffsets',\n 0x0123: 'GrayResponseCurve',\n 0x0122: 'GrayResponseUnit',\n 0x013C: 'HostComputer',\n 0x010E: 'ImageDescription',\n 0x0101: 'ImageLength',\n 0x0100: 'ImageWidth',\n 0x010F: 'Make',\n 0x0119: 'MaxSampleValue',\n 0x0118: 'MinSampleValue',\n 0x0110: 'Model',\n 0x00FE: 'NewSubfileType',\n 0x0112: 'Orientation',\n 0x0106: 'PhotometricInterpretation',\n 0x011C: 'PlanarConfiguration',\n 0x0128: 'ResolutionUnit',\n 0x0116: 'RowsPerStrip',\n 0x0115: 'SamplesPerPixel',\n 0x0131: 'Software',\n 0x0117: 'StripByteCounts',\n 0x0111: 'StripOffsets',\n 0x00FF: 'SubfileType',\n 0x0107: 'Threshholding',\n 0x011A: 'XResolution',\n 0x011B: 'YResolution',\n\n // TIFF Extended\n 0x0146: 'BadFaxLines',\n 0x0147: 'CleanFaxData',\n 0x0157: 'ClipPath',\n 0x0148: 'ConsecutiveBadFaxLines',\n 0x01B1: 'Decode',\n 0x01B2: 'DefaultImageColor',\n 0x010D: 'DocumentName',\n 0x0150: 'DotRange',\n 0x0141: 'HalftoneHints',\n 0x015A: 'Indexed',\n 0x015B: 'JPEGTables',\n 0x011D: 'PageName',\n 0x0129: 'PageNumber',\n 0x013D: 'Predictor',\n 0x013F: 'PrimaryChromaticities',\n 0x0214: 'ReferenceBlackWhite',\n 0x0153: 'SampleFormat',\n 0x0154: 'SMinSampleValue',\n 0x0155: 'SMaxSampleValue',\n 0x022F: 'StripRowCounts',\n 0x014A: 'SubIFDs',\n 0x0124: 'T4Options',\n 0x0125: 'T6Options',\n 0x0145: 'TileByteCounts',\n 0x0143: 'TileLength',\n 0x0144: 'TileOffsets',\n 0x0142: 'TileWidth',\n 0x012D: 'TransferFunction',\n 0x013E: 'WhitePoint',\n 0x0158: 'XClipPathUnits',\n 0x011E: 'XPosition',\n 0x0211: 'YCbCrCoefficients',\n 0x0213: 'YCbCrPositioning',\n 0x0212: 'YCbCrSubSampling',\n 0x0159: 'YClipPathUnits',\n 0x011F: 'YPosition',\n\n // EXIF\n 0x9202: 'ApertureValue',\n 0xA001: 'ColorSpace',\n 0x9004: 'DateTimeDigitized',\n 0x9003: 'DateTimeOriginal',\n 0x8769: 'Exif IFD',\n 0x9000: 'ExifVersion',\n 0x829A: 'ExposureTime',\n 0xA300: 'FileSource',\n 0x9209: 'Flash',\n 0xA000: 'FlashpixVersion',\n 0x829D: 'FNumber',\n 0xA420: 'ImageUniqueID',\n 0x9208: 'LightSource',\n 0x927C: 'MakerNote',\n 0x9201: 'ShutterSpeedValue',\n 0x9286: 'UserComment',\n\n // IPTC\n 0x83BB: 'IPTC',\n\n // ICC\n 0x8773: 'ICC Profile',\n\n // XMP\n 0x02BC: 'XMP',\n\n // GDAL\n 0xA480: 'GDAL_METADATA',\n 0xA481: 'GDAL_NODATA',\n\n // Photoshop\n 0x8649: 'Photoshop',\n\n // GeoTiff\n 0x830E: 'ModelPixelScale',\n 0x8482: 'ModelTiepoint',\n 0x85D8: 'ModelTransformation',\n 0x87AF: 'GeoKeyDirectory',\n 0x87B0: 'GeoDoubleParams',\n 0x87B1: 'GeoAsciiParams',\n\n // LERC\n 0xC5F2: 'LercParameters',\n};\n\nexport const fieldTags = {};\nfor (const key in fieldTagNames) {\n if (fieldTagNames.hasOwnProperty(key)) {\n fieldTags[fieldTagNames[key]] = parseInt(key, 10);\n }\n}\n\nexport const fieldTagTypes = {\n 256: 'SHORT',\n 257: 'SHORT',\n 258: 'SHORT',\n 259: 'SHORT',\n 262: 'SHORT',\n 273: 'LONG',\n 274: 'SHORT',\n 277: 'SHORT',\n 278: 'LONG',\n 279: 'LONG',\n 282: 'RATIONAL',\n 283: 'RATIONAL',\n 284: 'SHORT',\n 286: 'SHORT',\n 287: 'RATIONAL',\n 296: 'SHORT',\n 305: 'ASCII',\n 306: 'ASCII',\n 338: 'SHORT',\n 339: 'SHORT',\n 513: 'LONG',\n 514: 'LONG',\n 1024: 'SHORT',\n 1025: 'SHORT',\n 2048: 'SHORT',\n 2049: 'ASCII',\n 33550: 'DOUBLE',\n 33922: 'DOUBLE',\n 34665: 'LONG',\n 34735: 'SHORT',\n 34737: 'ASCII',\n 42113: 'ASCII',\n};\n\nexport const arrayFields = [\n fieldTags.BitsPerSample,\n fieldTags.ExtraSamples,\n fieldTags.SampleFormat,\n fieldTags.StripByteCounts,\n fieldTags.StripOffsets,\n fieldTags.StripRowCounts,\n fieldTags.TileByteCounts,\n fieldTags.TileOffsets,\n fieldTags.SubIFDs,\n];\n\nexport const fieldTypeNames = {\n 0x0001: 'BYTE',\n 0x0002: 'ASCII',\n 0x0003: 'SHORT',\n 0x0004: 'LONG',\n 0x0005: 'RATIONAL',\n 0x0006: 'SBYTE',\n 0x0007: 'UNDEFINED',\n 0x0008: 'SSHORT',\n 0x0009: 'SLONG',\n 0x000A: 'SRATIONAL',\n 0x000B: 'FLOAT',\n 0x000C: 'DOUBLE',\n // IFD offset, suggested by https://owl.phy.queensu.ca/~phil/exiftool/standards.html\n 0x000D: 'IFD',\n // introduced by BigTIFF\n 0x0010: 'LONG8',\n 0x0011: 'SLONG8',\n 0x0012: 'IFD8',\n};\n\nexport const fieldTypes = {};\nfor (const key in fieldTypeNames) {\n if (fieldTypeNames.hasOwnProperty(key)) {\n fieldTypes[fieldTypeNames[key]] = parseInt(key, 10);\n }\n}\n\nexport const photometricInterpretations = {\n WhiteIsZero: 0,\n BlackIsZero: 1,\n RGB: 2,\n Palette: 3,\n TransparencyMask: 4,\n CMYK: 5,\n YCbCr: 6,\n\n CIELab: 8,\n ICCLab: 9,\n};\n\nexport const ExtraSamplesValues = {\n Unspecified: 0,\n Assocalpha: 1,\n Unassalpha: 2,\n};\n\nexport const LercParameters = {\n Version: 0,\n AddCompression: 1,\n};\n\nexport const LercAddCompression = {\n None: 0,\n Deflate: 1,\n};\n\n\nexport const geoKeyNames = {\n 1024: 'GTModelTypeGeoKey',\n 1025: 'GTRasterTypeGeoKey',\n 1026: 'GTCitationGeoKey',\n 2048: 'GeographicTypeGeoKey',\n 2049: 'GeogCitationGeoKey',\n 2050: 'GeogGeodeticDatumGeoKey',\n 2051: 'GeogPrimeMeridianGeoKey',\n 2052: 'GeogLinearUnitsGeoKey',\n 2053: 'GeogLinearUnitSizeGeoKey',\n 2054: 'GeogAngularUnitsGeoKey',\n 2055: 'GeogAngularUnitSizeGeoKey',\n 2056: 'GeogEllipsoidGeoKey',\n 2057: 'GeogSemiMajorAxisGeoKey',\n 2058: 'GeogSemiMinorAxisGeoKey',\n 2059: 'GeogInvFlatteningGeoKey',\n 2060: 'GeogAzimuthUnitsGeoKey',\n 2061: 'GeogPrimeMeridianLongGeoKey',\n 2062: 'GeogTOWGS84GeoKey',\n 3072: 'ProjectedCSTypeGeoKey',\n 3073: 'PCSCitationGeoKey',\n 3074: 'ProjectionGeoKey',\n 3075: 'ProjCoordTransGeoKey',\n 3076: 'ProjLinearUnitsGeoKey',\n 3077: 'ProjLinearUnitSizeGeoKey',\n 3078: 'ProjStdParallel1GeoKey',\n 3079: 'ProjStdParallel2GeoKey',\n 3080: 'ProjNatOriginLongGeoKey',\n 3081: 'ProjNatOriginLatGeoKey',\n 3082: 'ProjFalseEastingGeoKey',\n 3083: 'ProjFalseNorthingGeoKey',\n 3084: 'ProjFalseOriginLongGeoKey',\n 3085: 'ProjFalseOriginLatGeoKey',\n 3086: 'ProjFalseOriginEastingGeoKey',\n 3087: 'ProjFalseOriginNorthingGeoKey',\n 3088: 'ProjCenterLongGeoKey',\n 3089: 'ProjCenterLatGeoKey',\n 3090: 'ProjCenterEastingGeoKey',\n 3091: 'ProjCenterNorthingGeoKey',\n 3092: 'ProjScaleAtNatOriginGeoKey',\n 3093: 'ProjScaleAtCenterGeoKey',\n 3094: 'ProjAzimuthAngleGeoKey',\n 3095: 'ProjStraightVertPoleLongGeoKey',\n 3096: 'ProjRectifiedGridAngleGeoKey',\n 4096: 'VerticalCSTypeGeoKey',\n 4097: 'VerticalCitationGeoKey',\n 4098: 'VerticalDatumGeoKey',\n 4099: 'VerticalUnitsGeoKey',\n};\n\nexport const geoKeys = {};\nfor (const key in geoKeyNames) {\n if (geoKeyNames.hasOwnProperty(key)) {\n geoKeys[geoKeyNames[key]] = parseInt(key, 10);\n }\n}\n","export function fromWhiteIsZero(raster, max) {\n const { width, height } = raster;\n const rgbRaster = new Uint8Array(width * height * 3);\n let value;\n for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n value = 256 - (raster[i] / max * 256);\n rgbRaster[j] = value;\n rgbRaster[j + 1] = value;\n rgbRaster[j + 2] = value;\n }\n return rgbRaster;\n}\n\nexport function fromBlackIsZero(raster, max) {\n const { width, height } = raster;\n const rgbRaster = new Uint8Array(width * height * 3);\n let value;\n for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n value = raster[i] / max * 256;\n rgbRaster[j] = value;\n rgbRaster[j + 1] = value;\n rgbRaster[j + 2] = value;\n }\n return rgbRaster;\n}\n\nexport function fromPalette(raster, colorMap) {\n const { width, height } = raster;\n const rgbRaster = new Uint8Array(width * height * 3);\n const greenOffset = colorMap.length / 3;\n const blueOffset = colorMap.length / 3 * 2;\n for (let i = 0, j = 0; i < raster.length; ++i, j += 3) {\n const mapIndex = raster[i];\n rgbRaster[j] = colorMap[mapIndex] / 65536 * 256;\n rgbRaster[j + 1] = colorMap[mapIndex + greenOffset] / 65536 * 256;\n rgbRaster[j + 2] = colorMap[mapIndex + blueOffset] / 65536 * 256;\n }\n return rgbRaster;\n}\n\nexport function fromCMYK(cmykRaster) {\n const { width, height } = cmykRaster;\n const rgbRaster = new Uint8Array(width * height * 3);\n for (let i = 0, j = 0; i < cmykRaster.length; i += 4, j += 3) {\n const c = cmykRaster[i];\n const m = cmykRaster[i + 1];\n const y = cmykRaster[i + 2];\n const k = cmykRaster[i + 3];\n\n rgbRaster[j] = 255 * ((255 - c) / 256) * ((255 - k) / 256);\n rgbRaster[j + 1] = 255 * ((255 - m) / 256) * ((255 - k) / 256);\n rgbRaster[j + 2] = 255 * ((255 - y) / 256) * ((255 - k) / 256);\n }\n return rgbRaster;\n}\n\nexport function fromYCbCr(yCbCrRaster) {\n const { width, height } = yCbCrRaster;\n const rgbRaster = new Uint8ClampedArray(width * height * 3);\n for (let i = 0, j = 0; i < yCbCrRaster.length; i += 3, j += 3) {\n const y = yCbCrRaster[i];\n const cb = yCbCrRaster[i + 1];\n const cr = yCbCrRaster[i + 2];\n\n rgbRaster[j] = (y + (1.40200 * (cr - 0x80)));\n rgbRaster[j + 1] = (y - (0.34414 * (cb - 0x80)) - (0.71414 * (cr - 0x80)));\n rgbRaster[j + 2] = (y + (1.77200 * (cb - 0x80)));\n }\n return rgbRaster;\n}\n\nconst Xn = 0.95047;\nconst Yn = 1.00000;\nconst Zn = 1.08883;\n\n// from https://github.com/antimatter15/rgb-lab/blob/master/color.js\n\nexport function fromCIELab(cieLabRaster) {\n const { width, height } = cieLabRaster;\n const rgbRaster = new Uint8Array(width * height * 3);\n\n for (let i = 0, j = 0; i < cieLabRaster.length; i += 3, j += 3) {\n const L = cieLabRaster[i + 0];\n const a_ = cieLabRaster[i + 1] << 24 >> 24; // conversion from uint8 to int8\n const b_ = cieLabRaster[i + 2] << 24 >> 24; // same\n\n let y = (L + 16) / 116;\n let x = (a_ / 500) + y;\n let z = y - (b_ / 200);\n let r;\n let g;\n let b;\n\n x = Xn * ((x * x * x > 0.008856) ? x * x * x : (x - (16 / 116)) / 7.787);\n y = Yn * ((y * y * y > 0.008856) ? y * y * y : (y - (16 / 116)) / 7.787);\n z = Zn * ((z * z * z > 0.008856) ? z * z * z : (z - (16 / 116)) / 7.787);\n\n r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n r = (r > 0.0031308) ? ((1.055 * (r ** (1 / 2.4))) - 0.055) : 12.92 * r;\n g = (g > 0.0031308) ? ((1.055 * (g ** (1 / 2.4))) - 0.055) : 12.92 * g;\n b = (b > 0.0031308) ? ((1.055 * (b ** (1 / 2.4))) - 0.055) : 12.92 * b;\n\n rgbRaster[j] = Math.max(0, Math.min(1, r)) * 255;\n rgbRaster[j + 1] = Math.max(0, Math.min(1, g)) * 255;\n rgbRaster[j + 2] = Math.max(0, Math.min(1, b)) * 255;\n }\n return rgbRaster;\n}\n","\nfunction decodeRowAcc(row, stride) {\n let length = row.length - stride;\n let offset = 0;\n do {\n for (let i = stride; i > 0; i--) {\n row[offset + stride] += row[offset];\n offset++;\n }\n\n length -= stride;\n } while (length > 0);\n}\n\nfunction decodeRowFloatingPoint(row, stride, bytesPerSample) {\n let index = 0;\n let count = row.length;\n const wc = count / bytesPerSample;\n\n while (count > stride) {\n for (let i = stride; i > 0; --i) {\n row[index + stride] += row[index];\n ++index;\n }\n count -= stride;\n }\n\n const copy = row.slice();\n for (let i = 0; i < wc; ++i) {\n for (let b = 0; b < bytesPerSample; ++b) {\n row[(bytesPerSample * i) + b] = copy[((bytesPerSample - b - 1) * wc) + i];\n }\n }\n}\n\nexport function applyPredictor(block, predictor, width, height, bitsPerSample,\n planarConfiguration) {\n if (!predictor || predictor === 1) {\n return block;\n }\n\n for (let i = 0; i < bitsPerSample.length; ++i) {\n if (bitsPerSample[i] % 8 !== 0) {\n throw new Error('When decoding with predictor, only multiple of 8 bits are supported.');\n }\n if (bitsPerSample[i] !== bitsPerSample[0]) {\n throw new Error('When decoding with predictor, all samples must have the same size.');\n }\n }\n\n const bytesPerSample = bitsPerSample[0] / 8;\n const stride = planarConfiguration === 2 ? 1 : bitsPerSample.length;\n\n for (let i = 0; i < height; ++i) {\n // Last strip will be truncated if height % stripHeight != 0\n if (i * stride * width * bytesPerSample >= block.byteLength) {\n break;\n }\n let row;\n if (predictor === 2) { // horizontal prediction\n switch (bitsPerSample[0]) {\n case 8:\n row = new Uint8Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample,\n );\n break;\n case 16:\n row = new Uint16Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 2,\n );\n break;\n case 32:\n row = new Uint32Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample / 4,\n );\n break;\n default:\n throw new Error(`Predictor 2 not allowed with ${bitsPerSample[0]} bits per sample.`);\n }\n decodeRowAcc(row, stride, bytesPerSample);\n } else if (predictor === 3) { // horizontal floating point\n row = new Uint8Array(\n block, i * stride * width * bytesPerSample, stride * width * bytesPerSample,\n );\n decodeRowFloatingPoint(row, stride, bytesPerSample);\n }\n }\n return block;\n}\n","let A,I=null;function g(){return null!==I&&I.buffer===A.memory.buffer||(I=new Uint8Array(A.memory.buffer)),I}let B=0;let Q=null;function C(){return null!==Q&&Q.buffer===A.memory.buffer||(Q=new Int32Array(A.memory.buffer)),Q}async function E(I){void 0===I&&(I=\"\".replace(/\\.js$/,\"_bg.wasm\"));(\"string\"==typeof I||\"function\"==typeof Request&&I instanceof Request||\"function\"==typeof URL&&I instanceof URL)&&(I=fetch(I));const{instance:g,module:B}=await async function(A,I){if(\"function\"==typeof Response&&A instanceof Response){if(\"function\"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(A,I)}catch(I){if(\"application/wasm\"==A.headers.get(\"Content-Type\"))throw I;console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\",I)}const g=await A.arrayBuffer();return await WebAssembly.instantiate(g,I)}{const g=await WebAssembly.instantiate(A,I);return g instanceof WebAssembly.Instance?{instance:g,module:A}:g}}(await I,{});return A=g.exports,E.__wbindgen_wasm_module=B,A}var D=Object.freeze({__proto__:null,decompress:function(I,Q){try{const F=A.__wbindgen_add_to_stack_pointer(-16);var E=function(A,I){const Q=I(1*A.length);return g().set(A,Q/1),B=A.length,Q}(I,A.__wbindgen_malloc),D=B;A.decompress(F,E,D,Q);var i=C()[F/4+0],w=C()[F/4+1],G=(o=i,N=w,g().subarray(o/1,o/1+N)).slice();return A.__wbindgen_free(i,1*w),G}finally{A.__wbindgen_add_to_stack_pointer(16)}var o,N},default:E});const i=[62,0,0,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,0,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];function w(A){return i[A-43]}const G=function(A){let I,g=A.endsWith(\"==\")?2:A.endsWith(\"=\")?1:0,B=A.length,Q=new Uint8Array(B/4*3);for(let g=0,C=0;g<B;g+=4,C+=3)I=w(A.charCodeAt(g))<<18|w(A.charCodeAt(g+1))<<12|w(A.charCodeAt(g+2))<<6|w(A.charCodeAt(g+3)),Q[C]=I>>16,Q[C+1]=I>>8&255,Q[C+2]=255&I;return Q.subarray(0,Q.length-g)}(\"AGFzbQEAAAABWQ5gAn9/AX9gA39/fwF/YAJ/fwBgAX8AYAN/f38AYAF/AX9gBH9/f38AYAR/f39/AX9gBn9/f39/fwBgAX8BfmAAAGAFf39/f38AYAV/f39/fwF/YAJ+fwF/A21sBQgICwMBAgUMAQABAAIABQACAgYGDQYDAgACAAAEBAQCAgYGAAYBBgIHAwQDBAQDAwADBQMDBAQEBAQCAgAHAAQAAgMBAgcFBAIDAQUCAgIDAgIDAwcCAQAABAIACgAAAQAFAgADBQkJCQMCBAUBcAErKwUDAQARBgkBfwFBgIDAAAsHXwUGbWVtb3J5AgAKZGVjb21wcmVzcwAnH19fd2JpbmRnZW5fYWRkX3RvX3N0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QAhAgwBCyAEQRBqIAUgAxBaIAAgBCkDEDcCBAsgACACNgIAIARBQGskAAuuAgEIfyMAQTBrIgEkAEGAICECIAFBGGoQLyABKAIcIQQgASgCGCEFIAFBEGoQMiABKAIUIQYgASgCECEHIAFBCGpBgCBBARBAIAFBgCA2AiggASABKAIMIgg2AiQgASABKAIIIgM2AiAgCEGBIE8EQCABQSBqQYAgEEUgASgCICEDIAEoAighAgsgAEEAOwBHIABBADsBOCAAIAM2AiggACAFNgIQIABBCDoARiAAQQA6AAsgAEIANwMAIABBMGpCADcDACAAQSxqIAI2AgAgAEEkakEANgIAIABBIGogBjYCACAAQRxqIAc2AgAgAEEYakEANgIAIABBFGogBDYCACAAQQk6AAogAEGAAjsBQiAAQYECOwFEIABBggI7AUAgAEH/AzsBCCABQTBqJAALxwICBX8BfiMAQRBrIgMkACAALQALIQIgA0IANwMIIAEoAgAhBQJAAkAgAAJ/IAEoAgQiBEHAACACayIGQfgBcUEDdiICSQRAIARBCU8NAiADQQhqIAUgBBBLGiABQQA2AgQgAUGIg8AANgIAIARBA3QMAQsgBkH/AXFByABPDQIgA0EIaiAFIAIQSxogASAEIAJrNgIEIAEgAiAFajYCACAGQfgBcQsgAC0ACyIBajoACyAAIAApAwAgAykDCCIHQjiGIAdCKIZCgICAgICAwP8Ag4QgB0IYhkKAgICAgOA/gyAHQgiGQoCAgIDwH4OEhCAHQgiIQoCAgPgPgyAHQhiIQoCA/AeDhCAHQiiIQoD+A4MgB0I4iISEhCABQT9xrYiENwMAIANBEGokAA8LIARBCEHYhcAAEDcACyACQQhByIXAABA3AAuqAgEDfyMAQYABayIEJAACQAJAAn8CQCABKAIAIgNBEHFFBEAgACgCACECIANBIHENASACrSABEBUMAgsgACgCACECQQAhAANAIAAgBGpB/wBqIAJBD3EiA0EwciADQdcAaiADQQpJGzoAACAAQX9qIQAgAkEEdiICDQALIABBgAFqIgJBgQFPDQIgAUGkjsAAQQIgACAEakGAAWpBACAAaxAIDAELQQAhAANAIAAg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MAEBfwJAAkBBgIABQQIQWSIBDQEMAAtBgIABQQIQYwALIAAgATYCACAAQYAgNgIEC4YBAQF/IwBBQGoiASQAIAFBKzYCDCABQYCBwAA2AgggAUGsgcAANgIUIAEgADYCECABQSxqQQI2AgAgAUE8akEhNgIAIAFCAjcCHCABQayMwAA2AhggAUEdNgI0IAEgAUEwajYCKCABIAFBEGo2AjggASABQQhqNgIwIAFBGGpB8IDAABBRAAtxAQN/IwBBIGsiAiQAAkAgACABEBkNACABQRxqKAIAIQMgASgCGCACQRxqQQA2AgAgAkHwi8AANgIYIAJCATcCDCACQfSLwAA2AgggAyACQQhqEAkNACAAQQRqIAEQGSACQSBqJAAPCyACQSBqJABBAQswAQF/AkACQEGAwABBAhBZIgENAQwAC0GAwABBAhBjAAsgACABNgIAIABBgCA2AgQLewECfwJAAkAgACgCBCIBBEAgACgCDCICIAFPDQEgACgCACIBIAJqIAEtAAA6AAAgAEEANgIIIAAgACgCDEEBajYCDCAAKAIERQ0CIAAoAgAtAAAPC0EAQQBBiIbAABA2AAsgAiABQZiGwAAQNgALQQBBAEGohsAAEDYAC2gBAn8gACAALQBGIgFBAWoiAjoACiAAQQEgAUEPcXRBAmoiATsBQCAAQX8gAkEPcXRBf3M7AQggAEEYaigCACABQf//A3EiAU8EQCAAIAE2AhgLIABBJGooAgAgAU8EQCAAIAE2AiQLC1ABAX8gAEEUaigCACIBRSABQQJ0RXJFBEAgACgCEBAECyAAQSBqKAIAIgFFIAFBAXRFckUEQCAAKAIcEAQLIABBLGooAgAEQCAAKAIoEAQLC2wBAX8jAEEwayIDJAAgAyABNgIEIAMgADYCACADQRxqQQI2AgAgA0EsakEcNgIAIANCAjcCDCADQYCNwAA2AgggA0EcNgIkIAMgA0EgajYCGCADIAM2AiggAyADQQRqNgIgIANBCGogAhBRAAtsAQF/IwBBMGsiAyQAIAMgATYCBCADIAA2AgAgA0EcakECNgIAIANBLGpBHDYCACADQgI3AgwgA0HMkcAANgIIIANBHDYCJCADIANBIGo2AhggAyADQQRqNgIoIAMgAzYCICADQQhqIAIQUQALbAEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBHGpBAjYCACADQSxqQRw2AgAgA0ICNwIMIANBgJLAADYCCCADQRw2AiQgAyADQSBqNgIYIAMgA0EEajYCKCADIAM2AiAgA0EIaiACEFEAC2wBAX8jAEEwayIDJAAgAyABNgIEIAMgADYCACADQRxqQQI2AgAgA0EsakEcNgIAIANCAjcCDCADQayRwAA2AgggA0EcNgIkIAMgA0EgajYCGCADIANBBGo2AiggAyADNgIgIANBCGogAhBRAAtcAQF/IwBBEGsiAyQAAkAgACgCBCABayACTwRAIANBADYCAAwBCyADIAAgASACEBYgAygCAEEBRw0AIANBCGooAgAiAARAIAMoAgQgABBjAAsQXQALIANBEGokAAtaAQF/IwBBEGsiAiQAAkAgACgCBCABa0EBTwRAIAJBADYCAAwBCyACIAAgARAeIAIoAgBBAUcNACACQQhqKAIAIgAEQCACKAIEIAAQYwALEF0ACyACQRBqJAALWgEBfyMAQRBrIgIkAAJAIAAoAgQgAWtBAU8EQCACQQA2AgAMAQsgAiAAIAEQHSACKAIAQQFHDQAgAkEIaigCACIABEAgAigCBCAAEGMACxBdAAsgAkEQaiQAC1kBAX8jAEEgayICJAAgAiAAKAIANgIEIAJBGGogAUEQaikCADcDACACQRBqIAFBCGopAgA3AwAgAiABKQIANwMIIAJBBGpB2InAACACQQhqEAkgAkEgaiQAC0YAAkBBCCACSQRAAn9BCCACSQRAIAIgAxAQDAELIAMQAAsiAg0BQQAPCyAAIAMQCg8LIAIgACADIAEgASADSxsQSyAAEAQLWQEBfyMAQSBrIgIkACACIAAoAgA2AgQgAkEYaiABQRBqKQIANwMAIAJBEGogAUEIaikCADcDACACIAEpAgA3AwggAkEEakHwj8AAIAJBCGoQCSACQSBqJAALWQACQAJAAkAgAUF/SgRAAkAgAgRAIAENAQwECyABRQ0DIAFBARBZIgINBAwCCyABEEciAkUNAQwDCxBdAAsgAUEBEGMAC0EBIQILIAA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AAwCCyAAIABBfUlBAnQQWSIADQELAAsgAAsxAQF/IAEoAgQiAgRAIAAgAjYCBCAAQQhqQQE2AgAgACABKAIANgIADwsgAEEANgIACzEBAX8gACABKAIEIAEoAggiAksEfyABIAIQRSABKAIIBSACCzYCBCAAIAEoAgA2AgALKAEBfyAAKAIIIgIgAU8EQCAAKAIAGiAAIAE2AggPCyAAIAEgAmsQKAssAQF/IwBBEGsiASQAIAFBCGogAEEIaigCADYCACABIAApAgA3AwAgARAsAAs0AQF/IwBBEGsiAiQAIAIgATYCDCACIAA2AgggAkG8jMAANgIEIAJB8IvAADYCACACEEoACyEAIAEEQANAIABBADoAACAAQQFqIQAgAUF/aiIBDQALCwsgAQF/AkAgACgCACIBRQ0AIABBBGooAgBFDQAgARAECwsgAQF/AkAgACgCBCIBRQ0AIABBCGooAgBFDQAgARAECwsMACAAIAEgAiADED4LCwAgAQRAIAAQBAsLEgAgACgCACABIAEgAmoQH0EACxQAIAAoAgAgASAAKAIEKAIMEQAACxkAAn9BCCABSQRAIAEgABAQDAELIAAQAAsLEAAgACACNgIEIAAgATYCAAsTACAAQaCLwAA2AgQgACABNgIACxAAIAEgACgCACAAKAIEEAULEQBBzIvAAEERQeCLwAAQSAALDgAgACgCABoDQAwACwALCwAgADUCACABEBULDQAgACgCACABIAIQCwsLACAAMQAAIAEQFQsLACAAIwBqJAAjAAsZACAAIAFB+KbAACgCACIAQQ4gABsRAgAACw0AIAFBxJDAAEECEAULCQAgAEEAOgBHCwcAIAAtAEcLDQBC9Pme5u6jqvn+AAsNAEL3uO76qszV7uUACwwAQunQotvMouq7RgsDAAELAwABCwvfJgEAQYCAwAAL1SYvVXNlcnMvZm04MTMvLnJ1c3R1cC90b29sY2hhaW5zL3N0YWJsZS14ODZfNjQtYXBwbGUtZGFyd2luL2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvY29yZS9zcmMvYWxsb2MvbGF5b3V0LnJzAAAQAHAAAAALAQAAOQAAAGNhbGxlZCB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FuZ3VhZ2UBBFJ1c3QADHByb2Nlc3NlZC1ieQMFcnVzdGMdMS40OS4wIChlMTg4NGE4ZTMgMjAyMC0xMi0yOSkGd2FscnVzBjAuMTguMAx3YXNtLWJpbmRnZW4SMC4yLjcwIChiNjM1NWMyNzAp\");let o;async function N(A,I){o||(o=await(async()=>(await E(G),D))());const g=o.decompress(A,I);if(0===g.length)throw Error(\"Failed to decode with LZW decoder.\");return g}export{N as decompress};\n","import { applyPredictor } from '../predictor';\n\nexport default class BaseDecoder {\n async decode(fileDirectory, buffer) {\n const decoded = await this.decodeBlock(buffer);\n const predictor = fileDirectory.Predictor || 1;\n if (predictor !== 1) {\n const isTiled = !fileDirectory.StripOffsets;\n const tileWidth = isTiled ? fileDirectory.TileWidth : fileDirectory.ImageWidth;\n const tileHeight = isTiled ? fileDirectory.TileLength : (\n fileDirectory.RowsPerStrip || fileDirectory.ImageLength\n );\n return applyPredictor(\n decoded, predictor, tileWidth, tileHeight, fileDirectory.BitsPerSample,\n fileDirectory.PlanarConfiguration,\n );\n }\n return decoded;\n }\n}\n","import BaseDecoder from './basedecoder';\n\n\nexport default class RawDecoder extends BaseDecoder {\n decodeBlock(buffer) {\n return buffer;\n }\n}\n","import { decompress } from 'lzw-tiff-decoder';\n\nimport BaseDecoder from './basedecoder';\n\nexport default class LZWDecoder extends BaseDecoder {\n constructor(fileDirectory) {\n super();\n const width = fileDirectory.TileWidth || fileDirectory.ImageWidth;\n const height = fileDirectory.TileLength || fileDirectory.ImageLength;\n const nbytes = fileDirectory.BitsPerSample[0] / 8;\n this.maxUncompressedSize = width * height * nbytes;\n }\n\n async decodeBlock(buffer) {\n const bytes = new Uint8Array(buffer);\n const decoded = await decompress(bytes, this.maxUncompressedSize);\n return decoded.buffer;\n }\n}\n\n","import BaseDecoder from './basedecoder';\n\n/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n/*\n Copyright 2011 notmasteryet\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\n// - The JPEG specification can be found in the ITU CCITT Recommendation T.81\n// (www.w3.org/Graphics/JPEG/itu-t81.pdf)\n// - The JFIF specification can be found in the JPEG File Interchange Format\n// (www.w3.org/Graphics/JPEG/jfif3.pdf)\n// - The Adobe Application-Specific JPEG markers in the Supporting the DCT Filters\n// in PostScript Level 2, Technical Note #5116\n// (partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf)\n\n\nconst dctZigZag = new Int32Array([\n 0,\n 1, 8,\n 16, 9, 2,\n 3, 10, 17, 24,\n 32, 25, 18, 11, 4,\n 5, 12, 19, 26, 33, 40,\n 48, 41, 34, 27, 20, 13, 6,\n 7, 14, 21, 28, 35, 42, 49, 56,\n 57, 50, 43, 36, 29, 22, 15,\n 23, 30, 37, 44, 51, 58,\n 59, 52, 45, 38, 31,\n 39, 46, 53, 60,\n 61, 54, 47,\n 55, 62,\n 63,\n]);\n\nconst dctCos1 = 4017; // cos(pi/16)\nconst dctSin1 = 799; // sin(pi/16)\nconst dctCos3 = 3406; // cos(3*pi/16)\nconst dctSin3 = 2276; // sin(3*pi/16)\nconst dctCos6 = 1567; // cos(6*pi/16)\nconst dctSin6 = 3784; // sin(6*pi/16)\nconst dctSqrt2 = 5793; // sqrt(2)\nconst dctSqrt1d2 = 2896;// sqrt(2) / 2\n\nfunction buildHuffmanTable(codeLengths, values) {\n let k = 0;\n const code = [];\n let length = 16;\n while (length > 0 && !codeLengths[length - 1]) {\n --length;\n }\n code.push({ children: [], index: 0 });\n\n let p = code[0];\n let q;\n for (let i = 0; i < length; i++) {\n for (let j = 0; j < codeLengths[i]; j++) {\n p = code.pop();\n p.children[p.index] = values[k];\n while (p.index > 0) {\n p = code.pop();\n }\n p.index++;\n code.push(p);\n while (code.length <= i) {\n code.push(q = { children: [], index: 0 });\n p.children[p.index] = q.children;\n p = q;\n }\n k++;\n }\n if (i + 1 < length) {\n // p here points to last code\n code.push(q = { children: [], index: 0 });\n p.children[p.index] = q.children;\n p = q;\n }\n }\n return code[0].children;\n}\n\nfunction decodeScan(data, initialOffset,\n frame, components, resetInterval,\n spectralStart, spectralEnd,\n successivePrev, successive) {\n const { mcusPerLine, progressive } = frame;\n\n const startOffset = initialOffset;\n let offset = initialOffset;\n let bitsData = 0;\n let bitsCount = 0;\n function readBit() {\n if (bitsCount > 0) {\n bitsCount--;\n return (bitsData >> bitsCount) & 1;\n }\n bitsData = data[offset++];\n if (bitsData === 0xFF) {\n const nextByte = data[offset++];\n if (nextByte) {\n throw new Error(`unexpected marker: ${((bitsData << 8) | nextByte).toString(16)}`);\n }\n // unstuff 0\n }\n bitsCount = 7;\n return bitsData >>> 7;\n }\n function decodeHuffman(tree) {\n let node = tree;\n let bit;\n while ((bit = readBit()) !== null) { // eslint-disable-line no-cond-assign\n node = node[bit];\n if (typeof node === 'number') {\n return node;\n }\n if (typeof node !== 'object') {\n throw new Error('invalid huffman sequence');\n }\n }\n return null;\n }\n function receive(initialLength) {\n let length = initialLength;\n let n = 0;\n while (length > 0) {\n const bit = readBit();\n if (bit === null) {\n return undefined;\n }\n n = (n << 1) | bit;\n --length;\n }\n return n;\n }\n function receiveAndExtend(length) {\n const n = receive(length);\n if (n >= 1 << (length - 1)) {\n return n;\n }\n return n + (-1 << length) + 1;\n }\n function decodeBaseline(component, zz) {\n const t = decodeHuffman(component.huffmanTableDC);\n const diff = t === 0 ? 0 : receiveAndExtend(t);\n component.pred += diff;\n zz[0] = component.pred;\n let k = 1;\n while (k < 64) {\n const rs = decodeHuffman(component.huffmanTableAC);\n const s = rs & 15;\n const r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n break;\n }\n k += 16;\n } else {\n k += r;\n const z = dctZigZag[k];\n zz[z] = receiveAndExtend(s);\n k++;\n }\n }\n }\n function decodeDCFirst(component, zz) {\n const t = decodeHuffman(component.huffmanTableDC);\n const diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);\n component.pred += diff;\n zz[0] = component.pred;\n }\n function decodeDCSuccessive(component, zz) {\n zz[0] |= readBit() << successive;\n }\n let eobrun = 0;\n function decodeACFirst(component, zz) {\n if (eobrun > 0) {\n eobrun--;\n return;\n }\n let k = spectralStart;\n const e = spectralEnd;\n while (k <= e) {\n const rs = decodeHuffman(component.huffmanTableAC);\n const s = rs & 15;\n const r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n eobrun = receive(r) + (1 << r) - 1;\n break;\n }\n k += 16;\n } else {\n k += r;\n const z = dctZigZag[k];\n zz[z] = receiveAndExtend(s) * (1 << successive);\n k++;\n }\n }\n }\n let successiveACState = 0;\n let successiveACNextValue;\n function decodeACSuccessive(component, zz) {\n let k = spectralStart;\n const e = spectralEnd;\n let r = 0;\n while (k <= e) {\n const z = dctZigZag[k];\n const direction = zz[z] < 0 ? -1 : 1;\n switch (successiveACState) {\n case 0: { // initial state\n const rs = decodeHuffman(component.huffmanTableAC);\n const s = rs & 15;\n r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n eobrun = receive(r) + (1 << r);\n successiveACState = 4;\n } else {\n r = 16;\n successiveACState = 1;\n }\n } else {\n if (s !== 1) {\n throw new Error('invalid ACn encoding');\n }\n successiveACNextValue = receiveAndExtend(s);\n successiveACState = r ? 2 : 3;\n }\n continue; // eslint-disable-line no-continue\n }\n case 1: // skipping r zero items\n case 2:\n if (zz[z]) {\n zz[z] += (readBit() << successive) * direction;\n } else {\n r--;\n if (r === 0) {\n successiveACState = successiveACState === 2 ? 3 : 0;\n }\n }\n break;\n case 3: // set value for a zero item\n if (zz[z]) {\n zz[z] += (readBit() << successive) * direction;\n } else {\n zz[z] = successiveACNextValue << successive;\n successiveACState = 0;\n }\n break;\n case 4: // eob\n if (zz[z]) {\n zz[z] += (readBit() << successive) * direction;\n }\n break;\n default:\n break;\n }\n k++;\n }\n if (successiveACState === 4) {\n eobrun--;\n if (eobrun === 0) {\n successiveACState = 0;\n }\n }\n }\n function decodeMcu(component, decodeFunction, mcu, row, col) {\n const mcuRow = (mcu / mcusPerLine) | 0;\n const mcuCol = mcu % mcusPerLine;\n const blockRow = (mcuRow * component.v) + row;\n const blockCol = (mcuCol * component.h) + col;\n decodeFunction(component, component.blocks[blockRow][blockCol]);\n }\n function decodeBlock(component, decodeFunction, mcu) {\n const blockRow = (mcu / component.blocksPerLine) | 0;\n const blockCol = mcu % component.blocksPerLine;\n decodeFunction(component, component.blocks[blockRow][blockCol]);\n }\n\n const componentsLength = components.length;\n let component;\n let i;\n let j;\n let k;\n let n;\n let decodeFn;\n if (progressive) {\n if (spectralStart === 0) {\n decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;\n } else {\n decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;\n }\n } else {\n decodeFn = decodeBaseline;\n }\n\n let mcu = 0;\n let marker;\n let mcuExpected;\n if (componentsLength === 1) {\n mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;\n } else {\n mcuExpected = mcusPerLine * frame.mcusPerColumn;\n }\n\n const usedResetInterval = resetInterval || mcuExpected;\n\n while (mcu < mcuExpected) {\n // reset interval stuff\n for (i = 0; i < componentsLength; i++) {\n components[i].pred = 0;\n }\n eobrun = 0;\n\n if (componentsLength === 1) {\n component = components[0];\n for (n = 0; n < usedResetInterval; n++) {\n decodeBlock(component, decodeFn, mcu);\n mcu++;\n }\n } else {\n for (n = 0; n < usedResetInterval; n++) {\n for (i = 0; i < componentsLength; i++) {\n component = components[i];\n const { h, v } = component;\n for (j = 0; j < v; j++) {\n for (k = 0; k < h; k++) {\n decodeMcu(component, decodeFn, mcu, j, k);\n }\n }\n }\n mcu++;\n\n // If we've reached our expected MCU's, stop decoding\n if (mcu === mcuExpected) {\n break;\n }\n }\n }\n\n // find marker\n bitsCount = 0;\n marker = (data[offset] << 8) | data[offset + 1];\n if (marker < 0xFF00) {\n throw new Error('marker was not found');\n }\n\n if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx\n offset += 2;\n } else {\n break;\n }\n }\n\n return offset - startOffset;\n}\n\nfunction buildComponentData(frame, component) {\n const lines = [];\n const { blocksPerLine, blocksPerColumn } = component;\n const samplesPerLine = blocksPerLine << 3;\n const R = new Int32Array(64);\n const r = new Uint8Array(64);\n\n // A port of poppler's IDCT method which in turn is taken from:\n // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,\n // \"Practical Fast 1-D DCT Algorithms with 11 Multiplications\",\n // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,\n // 988-991.\n function quantizeAndInverse(zz, dataOut, dataIn) {\n const qt = component.quantizationTable;\n let v0;\n let v1;\n let v2;\n let v3;\n let v4;\n let v5;\n let v6;\n let v7;\n let t;\n const p = dataIn;\n let i;\n\n // dequant\n for (i = 0; i < 64; i++) {\n p[i] = zz[i] * qt[i];\n }\n\n // inverse DCT on rows\n for (i = 0; i < 8; ++i) {\n const row = 8 * i;\n\n // check for all-zero AC coefficients\n if (p[1 + row] === 0 && p[2 + row] === 0 && p[3 + row] === 0\n && p[4 + row] === 0 && p[5 + row] === 0 && p[6 + row] === 0\n && p[7 + row] === 0) {\n t = ((dctSqrt2 * p[0 + row]) + 512) >> 10;\n p[0 + row] = t;\n p[1 + row] = t;\n p[2 + row] = t;\n p[3 + row] = t;\n p[4 + row] = t;\n p[5 + row] = t;\n p[6 + row] = t;\n p[7 + row] = t;\n continue; // eslint-disable-line no-continue\n }\n\n // stage 4\n v0 = ((dctSqrt2 * p[0 + row]) + 128) >> 8;\n v1 = ((dctSqrt2 * p[4 + row]) + 128) >> 8;\n v2 = p[2 + row];\n v3 = p[6 + row];\n v4 = ((dctSqrt1d2 * (p[1 + row] - p[7 + row])) + 128) >> 8;\n v7 = ((dctSqrt1d2 * (p[1 + row] + p[7 + row])) + 128) >> 8;\n v5 = p[3 + row] << 4;\n v6 = p[5 + row] << 4;\n\n // stage 3\n t = (v0 - v1 + 1) >> 1;\n v0 = (v0 + v1 + 1) >> 1;\n v1 = t;\n t = ((v2 * dctSin6) + (v3 * dctCos6) + 128) >> 8;\n v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 128) >> 8;\n v3 = t;\n t = (v4 - v6 + 1) >> 1;\n v4 = (v4 + v6 + 1) >> 1;\n v6 = t;\n t = (v7 + v5 + 1) >> 1;\n v5 = (v7 - v5 + 1) >> 1;\n v7 = t;\n\n // stage 2\n t = (v0 - v3 + 1) >> 1;\n v0 = (v0 + v3 + 1) >> 1;\n v3 = t;\n t = (v1 - v2 + 1) >> 1;\n v1 = (v1 + v2 + 1) >> 1;\n v2 = t;\n t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\n v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\n v7 = t;\n t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\n v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\n v6 = t;\n\n // stage 1\n p[0 + row] = v0 + v7;\n p[7 + row] = v0 - v7;\n p[1 + row] = v1 + v6;\n p[6 + row] = v1 - v6;\n p[2 + row] = v2 + v5;\n p[5 + row] = v2 - v5;\n p[3 + row] = v3 + v4;\n p[4 + row] = v3 - v4;\n }\n\n // inverse DCT on columns\n for (i = 0; i < 8; ++i) {\n const col = i;\n\n // check for all-zero AC coefficients\n if (p[(1 * 8) + col] === 0 && p[(2 * 8) + col] === 0 && p[(3 * 8) + col] === 0\n && p[(4 * 8) + col] === 0 && p[(5 * 8) + col] === 0 && p[(6 * 8) + col] === 0\n && p[(7 * 8) + col] === 0) {\n t = ((dctSqrt2 * dataIn[i + 0]) + 8192) >> 14;\n p[(0 * 8) + col] = t;\n p[(1 * 8) + col] = t;\n p[(2 * 8) + col] = t;\n p[(3 * 8) + col] = t;\n p[(4 * 8) + col] = t;\n p[(5 * 8) + col] = t;\n p[(6 * 8) + col] = t;\n p[(7 * 8) + col] = t;\n continue; // eslint-disable-line no-continue\n }\n\n // stage 4\n v0 = ((dctSqrt2 * p[(0 * 8) + col]) + 2048) >> 12;\n v1 = ((dctSqrt2 * p[(4 * 8) + col]) + 2048) >> 12;\n v2 = p[(2 * 8) + col];\n v3 = p[(6 * 8) + col];\n v4 = ((dctSqrt1d2 * (p[(1 * 8) + col] - p[(7 * 8) + col])) + 2048) >> 12;\n v7 = ((dctSqrt1d2 * (p[(1 * 8) + col] + p[(7 * 8) + col])) + 2048) >> 12;\n v5 = p[(3 * 8) + col];\n v6 = p[(5 * 8) + col];\n\n // stage 3\n t = (v0 - v1 + 1) >> 1;\n v0 = (v0 + v1 + 1) >> 1;\n v1 = t;\n t = ((v2 * dctSin6) + (v3 * dctCos6) + 2048) >> 12;\n v2 = ((v2 * dctCos6) - (v3 * dctSin6) + 2048) >> 12;\n v3 = t;\n t = (v4 - v6 + 1) >> 1;\n v4 = (v4 + v6 + 1) >> 1;\n v6 = t;\n t = (v7 + v5 + 1) >> 1;\n v5 = (v7 - v5 + 1) >> 1;\n v7 = t;\n\n // stage 2\n t = (v0 - v3 + 1) >> 1;\n v0 = (v0 + v3 + 1) >> 1;\n v3 = t;\n t = (v1 - v2 + 1) >> 1;\n v1 = (v1 + v2 + 1) >> 1;\n v2 = t;\n t = ((v4 * dctSin3) + (v7 * dctCos3) + 2048) >> 12;\n v4 = ((v4 * dctCos3) - (v7 * dctSin3) + 2048) >> 12;\n v7 = t;\n t = ((v5 * dctSin1) + (v6 * dctCos1) + 2048) >> 12;\n v5 = ((v5 * dctCos1) - (v6 * dctSin1) + 2048) >> 12;\n v6 = t;\n\n // stage 1\n p[(0 * 8) + col] = v0 + v7;\n p[(7 * 8) + col] = v0 - v7;\n p[(1 * 8) + col] = v1 + v6;\n p[(6 * 8) + col] = v1 - v6;\n p[(2 * 8) + col] = v2 + v5;\n p[(5 * 8) + col] = v2 - v5;\n p[(3 * 8) + col] = v3 + v4;\n p[(4 * 8) + col] = v3 - v4;\n }\n\n // convert to 8-bit integers\n for (i = 0; i < 64; ++i) {\n const sample = 128 + ((p[i] + 8) >> 4);\n if (sample < 0) {\n dataOut[i] = 0;\n } else if (sample > 0XFF) {\n dataOut[i] = 0xFF;\n } else {\n dataOut[i] = sample;\n }\n }\n }\n\n for (let blockRow = 0; blockRow < blocksPerColumn; blockRow++) {\n const scanLine = blockRow << 3;\n for (let i = 0; i < 8; i++) {\n lines.push(new Uint8Array(samplesPerLine));\n }\n for (let blockCol = 0; blockCol < blocksPerLine; blockCol++) {\n quantizeAndInverse(component.blocks[blockRow][blockCol], r, R);\n\n let offset = 0;\n const sample = blockCol << 3;\n for (let j = 0; j < 8; j++) {\n const line = lines[scanLine + j];\n for (let i = 0; i < 8; i++) {\n line[sample + i] = r[offset++];\n }\n }\n }\n }\n return lines;\n}\n\nclass JpegStreamReader {\n constructor() {\n this.jfif = null;\n this.adobe = null;\n\n this.quantizationTables = [];\n this.huffmanTablesAC = [];\n this.huffmanTablesDC = [];\n this.resetFrames();\n }\n\n resetFrames() {\n this.frames = [];\n }\n\n parse(data) {\n let offset = 0;\n // const { length } = data;\n function readUint16() {\n const value = (data[offset] << 8) | data[offset + 1];\n offset += 2;\n return value;\n }\n function readDataBlock() {\n const length = readUint16();\n const array = data.subarray(offset, offset + length - 2);\n offset += array.length;\n return array;\n }\n function prepareComponents(frame) {\n let maxH = 0;\n let maxV = 0;\n let component;\n let componentId;\n for (componentId in frame.components) {\n if (frame.components.hasOwnProperty(componentId)) {\n component = frame.components[componentId];\n if (maxH < component.h) {\n maxH = component.h;\n }\n if (maxV < component.v) {\n maxV = component.v;\n }\n }\n }\n const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH);\n const mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV);\n for (componentId in frame.components) {\n if (frame.components.hasOwnProperty(componentId)) {\n component = frame.components[componentId];\n const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH);\n const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV);\n const blocksPerLineForMcu = mcusPerLine * component.h;\n const blocksPerColumnForMcu = mcusPerColumn * component.v;\n const blocks = [];\n for (let i = 0; i < blocksPerColumnForMcu; i++) {\n const row = [];\n for (let j = 0; j < blocksPerLineForMcu; j++) {\n row.push(new Int32Array(64));\n }\n blocks.push(row);\n }\n component.blocksPerLine = blocksPerLine;\n component.blocksPerColumn = blocksPerColumn;\n component.blocks = blocks;\n }\n }\n frame.maxH = maxH;\n frame.maxV = maxV;\n frame.mcusPerLine = mcusPerLine;\n frame.mcusPerColumn = mcusPerColumn;\n }\n\n let fileMarker = readUint16();\n if (fileMarker !== 0xFFD8) { // SOI (Start of Image)\n throw new Error('SOI not found');\n }\n\n fileMarker = readUint16();\n while (fileMarker !== 0xFFD9) { // EOI (End of image)\n switch (fileMarker) {\n case 0xFF00: break;\n case 0xFFE0: // APP0 (Application Specific)\n case 0xFFE1: // APP1\n case 0xFFE2: // APP2\n case 0xFFE3: // APP3\n case 0xFFE4: // APP4\n case 0xFFE5: // APP5\n case 0xFFE6: // APP6\n case 0xFFE7: // APP7\n case 0xFFE8: // APP8\n case 0xFFE9: // APP9\n case 0xFFEA: // APP10\n case 0xFFEB: // APP11\n case 0xFFEC: // APP12\n case 0xFFED: // APP13\n case 0xFFEE: // APP14\n case 0xFFEF: // APP15\n case 0xFFFE: { // COM (Comment)\n const appData = readDataBlock();\n\n if (fileMarker === 0xFFE0) {\n if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49\n && appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\\x00'\n this.jfif = {\n version: { major: appData[5], minor: appData[6] },\n densityUnits: appData[7],\n xDensity: (appData[8] << 8) | appData[9],\n yDensity: (appData[10] << 8) | appData[11],\n thumbWidth: appData[12],\n thumbHeight: appData[13],\n thumbData: appData.subarray(14, 14 + (3 * appData[12] * appData[13])),\n };\n }\n }\n // TODO APP1 - Exif\n if (fileMarker === 0xFFEE) {\n if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F\n && appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\\x00'\n this.adobe = {\n version: appData[6],\n flags0: (appData[7] << 8) | appData[8],\n flags1: (appData[9] << 8) | appData[10],\n transformCode: appData[11],\n };\n }\n }\n break;\n }\n\n case 0xFFDB: { // DQT (Define Quantization Tables)\n const quantizationTablesLength = readUint16();\n const quantizationTablesEnd = quantizationTablesLength + offset - 2;\n while (offset < quantizationTablesEnd) {\n const quantizationTableSpec = data[offset++];\n const tableData = new Int32Array(64);\n if ((quantizationTableSpec >> 4) === 0) { // 8 bit values\n for (let j = 0; j < 64; j++) {\n const z = dctZigZag[j];\n tableData[z] = data[offset++];\n }\n } else if ((quantizationTableSpec >> 4) === 1) { // 16 bit\n for (let j = 0; j < 64; j++) {\n const z = dctZigZag[j];\n tableData[z] = readUint16();\n }\n } else {\n throw new Error('DQT: invalid table spec');\n }\n this.quantizationTables[quantizationTableSpec & 15] = tableData;\n }\n break;\n }\n\n case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)\n case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)\n case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT)\n readUint16(); // skip data length\n const frame = {\n extended: (fileMarker === 0xFFC1),\n progressive: (fileMarker === 0xFFC2),\n precision: data[offset++],\n scanLines: readUint16(),\n samplesPerLine: readUint16(),\n components: {},\n componentsOrder: [],\n };\n\n const componentsCount = data[offset++];\n let componentId;\n // let maxH = 0;\n // let maxV = 0;\n for (let i = 0; i < componentsCount; i++) {\n componentId = data[offset];\n const h = data[offset + 1] >> 4;\n const v = data[offset + 1] & 15;\n const qId = data[offset + 2];\n frame.componentsOrder.push(componentId);\n frame.components[componentId] = {\n h,\n v,\n quantizationIdx: qId,\n };\n offset += 3;\n }\n prepareComponents(frame);\n this.frames.push(frame);\n break;\n }\n\n case 0xFFC4: { // DHT (Define Huffman Tables)\n const huffmanLength = readUint16();\n for (let i = 2; i < huffmanLength;) {\n const huffmanTableSpec = data[offset++];\n const codeLengths = new Uint8Array(16);\n let codeLengthSum = 0;\n for (let j = 0; j < 16; j++, offset++) {\n codeLengths[j] = data[offset];\n codeLengthSum += codeLengths[j];\n }\n const huffmanValues = new Uint8Array(codeLengthSum);\n for (let j = 0; j < codeLengthSum; j++, offset++) {\n huffmanValues[j] = data[offset];\n }\n i += 17 + codeLengthSum;\n\n if ((huffmanTableSpec >> 4) === 0) {\n this.huffmanTablesDC[huffmanTableSpec & 15] = buildHuffmanTable(\n codeLengths, huffmanValues,\n );\n } else {\n this.huffmanTablesAC[huffmanTableSpec & 15] = buildHuffmanTable(\n codeLengths, huffmanValues,\n );\n }\n }\n break;\n }\n\n case 0xFFDD: // DRI (Define Restart Interval)\n readUint16(); // skip data length\n this.resetInterval = readUint16();\n break;\n\n case 0xFFDA: { // SOS (Start of Scan)\n readUint16(); // skip length\n const selectorsCount = data[offset++];\n const components = [];\n const frame = this.frames[0];\n for (let i = 0; i < selectorsCount; i++) {\n const component = frame.components[data[offset++]];\n const tableSpec = data[offset++];\n component.huffmanTableDC = this.huffmanTablesDC[tableSpec >> 4];\n component.huffmanTableAC = this.huffmanTablesAC[tableSpec & 15];\n components.push(component);\n }\n const spectralStart = data[offset++];\n const spectralEnd = data[offset++];\n const successiveApproximation = data[offset++];\n const processed = decodeScan(data, offset,\n frame, components, this.resetInterval,\n spectralStart, spectralEnd,\n successiveApproximation >> 4, successiveApproximation & 15);\n offset += processed;\n break;\n }\n\n case 0xFFFF: // Fill bytes\n if (data[offset] !== 0xFF) { // Avoid skipping a valid marker.\n offset--;\n }\n break;\n\n default:\n if (data[offset - 3] === 0xFF\n && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {\n // could be incorrect encoding -- last 0xFF byte of the previous\n // block was eaten by the encoder\n offset -= 3;\n break;\n }\n throw new Error(`unknown JPEG marker ${fileMarker.toString(16)}`);\n }\n fileMarker = readUint16();\n }\n }\n\n getResult() {\n const { frames } = this;\n if (this.frames.length === 0) {\n throw new Error('no frames were decoded');\n } else if (this.frames.length > 1) {\n console.warn('more than one frame is not supported');\n }\n\n // set each frame's components quantization table\n for (let i = 0; i < this.frames.length; i++) {\n const cp = this.frames[i].components;\n for (const j of Object.keys(cp)) {\n cp[j].quantizationTable = this.quantizationTables[cp[j].quantizationIdx];\n delete cp[j].quantizationIdx;\n }\n }\n\n const frame = frames[0];\n const { components, componentsOrder } = frame;\n const outComponents = [];\n const width = frame.samplesPerLine;\n const height = frame.scanLines;\n\n for (let i = 0; i < componentsOrder.length; i++) {\n const component = components[componentsOrder[i]];\n outComponents.push({\n lines: buildComponentData(frame, component),\n scaleX: component.h / frame.maxH,\n scaleY: component.v / frame.maxV,\n });\n }\n\n const out = new Uint8Array(width * height * outComponents.length);\n let oi = 0;\n for (let y = 0; y < height; ++y) {\n for (let x = 0; x < width; ++x) {\n for (let i = 0; i < outComponents.length; ++i) {\n const component = outComponents[i];\n out[oi] = component.lines[0 | y * component.scaleY][0 | x * component.scaleX];\n ++oi;\n }\n }\n }\n return out;\n }\n}\n\nexport default class JpegDecoder extends BaseDecoder {\n constructor(fileDirectory) {\n super();\n this.reader = new JpegStreamReader();\n if (fileDirectory.JPEGTables) {\n this.reader.parse(fileDirectory.JPEGTables);\n }\n }\n\n decodeBlock(buffer) {\n this.reader.resetFrames();\n this.reader.parse(new Uint8Array(buffer));\n return this.reader.getResult().buffer;\n }\n}\n","\n/*! pako 2.0.4 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED$1 = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN$1 = 2;\n\n/*============================================================================*/\n\n\nfunction zero$1(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES$1 = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS$1 = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES$1 = 30;\n/* number of distance codes */\n\nconst BL_CODES$1 = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE$1 = 2 * L_CODES$1 + 1;\n/* maximum heap size */\n\nconst MAX_BITS$1 = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES$1 + 2) * 2);\nzero$1(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES$1 * 2);\nzero$1(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero$1(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH$1 - MIN_MATCH$1 + 1);\nzero$1(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES$1);\nzero$1(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES$1);\nzero$1(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE$1; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) =>\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n const next_code = new Array(MAX_BITS$1 + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS$1; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n let len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n};\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nconst tr_static_init = () => {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS$1 + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES$1 - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES$1; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS$1; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES$1 + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES$1; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS$1 + 1, L_CODES$1, MAX_BITS$1);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES$1, MAX_BITS$1);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES$1, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES$1; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES$1; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES$1; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nconst copy_block = (s, buf, len, header) =>\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending);\n s.pending += len;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) =>\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let lx = 0; /* running index in l_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS$1 + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE$1;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES$1 - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) =>\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let black_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS$1; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init$1 = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block$1 = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align$1 = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nconst _tr_flush_block$1 = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN$1) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block$1(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED$1 || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally$1 = (s, dist, lc) =>\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //let out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS$1 + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n};\n\nvar _tr_init_1 = _tr_init$1;\nvar _tr_stored_block_1 = _tr_stored_block$1;\nvar _tr_flush_block_1 = _tr_flush_block$1;\nvar _tr_tally_1 = _tr_tally$1;\nvar _tr_align_1 = _tr_align$1;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants$2 = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init, _tr_stored_block, _tr_flush_block, _tr_tally, _tr_align } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$2, Z_PARTIAL_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$3, Z_BLOCK: Z_BLOCK$1,\n Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_BUF_ERROR: Z_BUF_ERROR$1,\n Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED, Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n Z_UNKNOWN,\n Z_DEFLATED: Z_DEFLATED$2\n} = constants$2;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES = 30;\n/* number of distance codes */\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst EXTRA_STATE = 69;\nconst NAME_STATE = 73;\nconst COMMENT_STATE = 91;\nconst HCRC_STATE = 103;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = messages[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32_1(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32_1(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n let max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n const max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n};\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH$2) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH$3) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED$2; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nconst deflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH$2;\n _tr_init(s);\n return Z_OK$3;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK$3) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$2; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR$2; }\n strm.state.gzhead = head;\n return Z_OK$3;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR$2;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION$1) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED$2 ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED$2, MAX_WBITS$1, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY$1);\n};\n\n\nconst deflate$2 = (strm, flush) => {\n\n let beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK$1 || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR$2) : Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH$3)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR$1 : Z_STREAM_ERROR$2);\n }\n\n s.strm = strm; /* just in case */\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n let header = (Z_DEFLATED$2 + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK$3;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH$3) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR$1);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH$2 && s.status !== FINISH_STATE)) {\n let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK$3;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align(s);\n }\n else if (flush !== Z_BLOCK$1) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH$1) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK$3;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH$3) { return Z_OK$3; }\n if (s.wrap <= 0) { return Z_STREAM_END$3; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK$3 : Z_STREAM_END$3;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR$2;\n }\n\n const status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR$2);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR$2) : Z_OK$3;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR$2;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR$2;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK$3;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2$1 = deflate$2;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1$2 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2$1,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n if (typeof TextEncoder === 'function' && TextEncoder.prototype.encode) {\n return new TextEncoder().encode(str);\n }\n\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n const len = max || buf.length;\n\n if (typeof TextDecoder === 'function' && TextDecoder.prototype.decode) {\n return new TextDecoder().decode(buf.subarray(0, max));\n }\n\n let i, out;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH, Z_FINISH: Z_FINISH$2,\n Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2,\n Z_DEFAULT_COMPRESSION,\n Z_DEFAULT_STRATEGY,\n Z_DEFLATED: Z_DEFLATED$1\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate$1(options) {\n this.options = common.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED$1,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = deflate_1$2.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n if (opt.header) {\n deflate_1$2.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = deflate_1$2.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK$2) {\n throw new Error(messages[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$2 : Z_NO_FLUSH$1;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString$1.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = deflate_1$2.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END$2) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = deflate_1$2.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK$2;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$2) {\n this.result = common.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n const deflator = new Deflate$1(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip$1(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate$1(input, options);\n}\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_2 = deflate$1;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar constants$1 = constants$2;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD$1 = 30; /* got a data error -- remain here until reset */\nconst TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE$1;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n// let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES$1 || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES$1) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS$1) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS$1 && used > ENOUGH_LENS$1) ||\n (type === DISTS$1 && used > ENOUGH_DISTS$1)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH: Z_FINISH$1, Z_BLOCK, Z_TREES,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR: Z_MEM_ERROR$1, Z_BUF_ERROR,\n Z_DEFLATED\n} = constants$2;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 1; /* i: waiting for magic header */\nconst FLAGS = 2; /* i: waiting for method and flags (gzip) */\nconst TIME = 3; /* i: waiting for modification time (gzip) */\nconst OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 5; /* i: waiting for extra length (gzip) */\nconst EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nconst NAME = 7; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 8; /* i: waiting for end of comment (gzip) */\nconst HCRC = 9; /* i: waiting for header crc (gzip) */\nconst DICTID = 10; /* i: waiting for dictionary check value */\nconst DICT = 11; /* waiting for inflateSetDictionary() call */\nconst TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 14; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 17; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 18; /* i: waiting for code length code lengths */\nconst CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 20; /* i: same as LEN below, but only first time in */\nconst LEN = 21; /* i: waiting for length/lit/eob code */\nconst LENEXT = 22; /* i: waiting for length extra bits */\nconst DIST = 23; /* i: waiting for distance code */\nconst DISTEXT = 24; /* i: waiting for distance extra bits */\nconst MATCH = 25; /* o: waiting for output space to copy string */\nconst LIT = 26; /* o: waiting for output space to write literal */\nconst CHECK = 27; /* i: waiting for 32-bit check value */\nconst LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 29; /* finished check, done -- remain here until reset */\nconst BAD = 30; /* got a data error -- remain here until reset */\nconst MEM = 31; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK$1;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$1) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate$2 = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$1;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT$1;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$1;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR$1;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH$1))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$1) && ret === Z_OK$1) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$1;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$1;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR$1;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK$1;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2$1 = inflate$2;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\n*/\n\nvar inflate_1$2 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2$1,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_FINISH,\n Z_OK, Z_STREAM_END, Z_NEED_DICT, Z_STREAM_ERROR, Z_DATA_ERROR, Z_MEM_ERROR\n} = constants$2;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate$1(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1$2.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1$2.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1$2.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK) {\n throw new Error(messages[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate$1.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH : Z_NO_FLUSH;\n\n // Convert data if needed\n if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1$2.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT && dictionary) {\n status = inflate_1$2.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK) {\n status = inflate_1$2.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR) {\n // Replace code with more verbose\n status = Z_NEED_DICT;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1$2.inflateReset(strm);\n status = inflate_1$2.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR:\n case Z_DATA_ERROR:\n case Z_NEED_DICT:\n case Z_MEM_ERROR:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END) {\n status = inflate_1$2.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate$1.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate$1.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err) {\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n const inflator = new Inflate$1(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw$1(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1$1 = Inflate$1;\nvar inflate_2 = inflate$1;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip$1 = inflate$1;\nvar constants = constants$2;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1$1,\n\tinflate: inflate_2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip$1,\n\tconstants: constants\n};\n\nconst { Deflate, deflate, deflateRaw, gzip } = deflate_1$1;\n\nconst { Inflate, inflate, inflateRaw, ungzip } = inflate_1$1;\n\n\n\nvar Deflate_1 = Deflate;\nvar deflate_1 = deflate;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar Inflate_1 = Inflate;\nvar inflate_1 = inflate;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip_1 = ungzip;\nvar constants_1 = constants$2;\n\nvar pako = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tInflate: Inflate_1,\n\tinflate: inflate_1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\nexport { Deflate_1 as Deflate, Inflate_1 as Inflate, constants_1 as constants, pako as default, deflate_1 as deflate, deflateRaw_1 as deflateRaw, gzip_1 as gzip, inflate_1 as inflate, inflateRaw_1 as inflateRaw, ungzip_1 as ungzip };\n","import { inflate } from 'pako';\nimport BaseDecoder from './basedecoder';\n\nexport default class DeflateDecoder extends BaseDecoder {\n decodeBlock(buffer) {\n return inflate(new Uint8Array(buffer)).buffer;\n }\n}\n","import BaseDecoder from './basedecoder';\n\n\nexport default class PackbitsDecoder extends BaseDecoder {\n decodeBlock(buffer) {\n const dataView = new DataView(buffer);\n const out = [];\n\n for (let i = 0; i < buffer.byteLength; ++i) {\n let header = dataView.getInt8(i);\n if (header < 0) {\n const next = dataView.getUint8(i + 1);\n header = -header;\n for (let j = 0; j <= header; ++j) {\n out.push(next);\n }\n i += 1;\n } else {\n for (let j = 0; j <= header; ++j) {\n out.push(dataView.getUint8(i + j + 1));\n }\n i += header + 1;\n }\n }\n return new Uint8Array(out).buffer;\n }\n}\n","import { inflate } from 'pako';\nimport Lerc from 'lerc';\nimport BaseDecoder from './basedecoder';\nimport { LercParameters, LercAddCompression } from '../globals';\n\nexport default class LercDecoder extends BaseDecoder {\n constructor(fileDirectory) {\n super();\n\n this.planarConfiguration = typeof fileDirectory.PlanarConfiguration !== 'undefined' ? fileDirectory.PlanarConfiguration : 1;\n this.samplesPerPixel = typeof fileDirectory.SamplesPerPixel !== 'undefined' ? fileDirectory.SamplesPerPixel : 1;\n\n this.addCompression = fileDirectory.LercParameters[LercParameters.AddCompression];\n }\n\n interleavePixels(bandInterleavedData) {\n const pixelInterleavedData = new bandInterleavedData.constructor(bandInterleavedData.length);\n const lengthPerSample = bandInterleavedData.length / this.samplesPerPixel;\n for (let i = 0; i < lengthPerSample; i++) {\n for (let j = 0; j < this.samplesPerPixel; j++) {\n pixelInterleavedData[i * this.samplesPerPixel + j] = bandInterleavedData[i + j * lengthPerSample];\n }\n }\n return pixelInterleavedData;\n }\n\n decodeBlock(buffer) {\n switch (this.addCompression) {\n case LercAddCompression.None:\n break;\n case LercAddCompression.Deflate:\n buffer = inflate(new Uint8Array(buffer)).buffer;\n break;\n default:\n throw new Error(`Unsupported LERC additional compression method identifier: ${this.addCompression}`);\n }\n\n const lercResult = Lerc.decode(buffer);\n const lercData = lercResult.pixels[0]; // always band-interleaved\n const decodedData = this.planarConfiguration === 1 ? this.interleavePixels(lercData) : lercData; // transform to pixel-interleaved if expected\n return decodedData.buffer;\n }\n}\n","import RawDecoder from './raw';\nimport LZWDecoder from './lzw';\nimport JpegDecoder from './jpeg';\nimport DeflateDecoder from './deflate';\nimport PackbitsDecoder from './packbits';\nimport LercDecoder from './lerc';\n\nexport function getDecoder(fileDirectory) {\n switch (fileDirectory.Compression) {\n case undefined:\n case 1: // no compression\n return new RawDecoder();\n case 5: // LZW\n return new LZWDecoder(fileDirectory);\n case 6: // JPEG\n throw new Error('old style JPEG compression is not supported.');\n case 7: // JPEG\n return new JpegDecoder(fileDirectory);\n case 8: // Deflate as recognized by Adobe\n case 32946: // Deflate GDAL default\n return new DeflateDecoder();\n case 32773: // packbits\n return new PackbitsDecoder();\n case 34887: // LERC\n return new LercDecoder(fileDirectory);\n default:\n throw new Error(`Unknown compression method identifier: ${fileDirectory.Compression}`);\n }\n}\n","/**\n * @module resample\n */\n\nfunction copyNewSize(array, width, height, samplesPerPixel = 1) {\n return new (Object.getPrototypeOf(array).constructor)(width * height * samplesPerPixel);\n}\n\n/**\n * Resample the input arrays using nearest neighbor value selection.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n return valueArrays.map((array) => {\n const newArray = copyNewSize(array, outWidth, outHeight);\n for (let y = 0; y < outHeight; ++y) {\n const cy = Math.min(Math.round(relY * y), inHeight - 1);\n for (let x = 0; x < outWidth; ++x) {\n const cx = Math.min(Math.round(relX * x), inWidth - 1);\n const value = array[(cy * inWidth) + cx];\n newArray[(y * outWidth) + x] = value;\n }\n }\n return newArray;\n });\n}\n\n// simple linear interpolation, code from:\n// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support\nfunction lerp(v0, v1, t) {\n return ((1 - t) * v0) + (t * v1);\n}\n\n/**\n * Resample the input arrays using bilinear interpolation.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n\n return valueArrays.map((array) => {\n const newArray = copyNewSize(array, outWidth, outHeight);\n for (let y = 0; y < outHeight; ++y) {\n const rawY = relY * y;\n\n const yl = Math.floor(rawY);\n const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n for (let x = 0; x < outWidth; ++x) {\n const rawX = relX * x;\n const tx = rawX % 1;\n\n const xl = Math.floor(rawX);\n const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n const ll = array[(yl * inWidth) + xl];\n const hl = array[(yl * inWidth) + xh];\n const lh = array[(yh * inWidth) + xl];\n const hh = array[(yh * inWidth) + xh];\n\n const value = lerp(\n lerp(ll, hl, tx),\n lerp(lh, hh, tx),\n rawY % 1,\n );\n newArray[(y * outWidth) + x] = value;\n }\n }\n return newArray;\n });\n}\n\n/**\n * Resample the input arrays using the selected resampling method.\n * @param {TypedArray[]} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray[]} The resampled rasters\n */\nexport function resample(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {\n switch (method.toLowerCase()) {\n case 'nearest':\n return resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight);\n case 'bilinear':\n case 'linear':\n return resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight);\n default:\n throw new Error(`Unsupported resampling method: '${method}'`);\n }\n}\n\n/**\n * Resample the pixel interleaved input array using nearest neighbor value selection.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n * interleaved data\n * @returns {TypedArray} The resampled raster\n */\nexport function resampleNearestInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n\n const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n for (let y = 0; y < outHeight; ++y) {\n const cy = Math.min(Math.round(relY * y), inHeight - 1);\n for (let x = 0; x < outWidth; ++x) {\n const cx = Math.min(Math.round(relX * x), inWidth - 1);\n for (let i = 0; i < samples; ++i) {\n const value = valueArray[(cy * inWidth * samples) + (cx * samples) + i];\n newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n }\n }\n }\n return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using bilinear interpolation.\n * @param {TypedArray} valueArrays The input arrays to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n * interleaved data\n * @returns {TypedArray} The resampled raster\n */\nexport function resampleBilinearInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples) {\n const relX = inWidth / outWidth;\n const relY = inHeight / outHeight;\n const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);\n for (let y = 0; y < outHeight; ++y) {\n const rawY = relY * y;\n\n const yl = Math.floor(rawY);\n const yh = Math.min(Math.ceil(rawY), (inHeight - 1));\n\n for (let x = 0; x < outWidth; ++x) {\n const rawX = relX * x;\n const tx = rawX % 1;\n\n const xl = Math.floor(rawX);\n const xh = Math.min(Math.ceil(rawX), (inWidth - 1));\n\n for (let i = 0; i < samples; ++i) {\n const ll = valueArray[(yl * inWidth * samples) + (xl * samples) + i];\n const hl = valueArray[(yl * inWidth * samples) + (xh * samples) + i];\n const lh = valueArray[(yh * inWidth * samples) + (xl * samples) + i];\n const hh = valueArray[(yh * inWidth * samples) + (xh * samples) + i];\n\n const value = lerp(\n lerp(ll, hl, tx),\n lerp(lh, hh, tx),\n rawY % 1,\n );\n newArray[(y * outWidth * samples) + (x * samples) + i] = value;\n }\n }\n }\n return newArray;\n}\n\n/**\n * Resample the pixel interleaved input array using the selected resampling method.\n * @param {TypedArray} valueArray The input array to resample\n * @param {number} inWidth The width of the input rasters\n * @param {number} inHeight The height of the input rasters\n * @param {number} outWidth The desired width of the output rasters\n * @param {number} outHeight The desired height of the output rasters\n * @param {number} samples The number of samples per pixel for pixel\n * interleaved data\n * @param {string} [method = 'nearest'] The desired resampling method\n * @returns {TypedArray} The resampled rasters\n */\nexport function resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {\n switch (method.toLowerCase()) {\n case 'nearest':\n return resampleNearestInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n );\n case 'bilinear':\n case 'linear':\n return resampleBilinearInterleaved(\n valueArray, inWidth, inHeight, outWidth, outHeight, samples,\n );\n default:\n throw new Error(`Unsupported resampling method: '${method}'`);\n }\n}\n","/* eslint max-len: [\"error\", { \"code\": 120 }] */\n\nimport { getFloat16 } from '@petamoriken/float16';\nimport { parse } from 'txml/txml';\n\nimport { photometricInterpretations, ExtraSamplesValues } from './globals';\nimport { fromWhiteIsZero, fromBlackIsZero, fromPalette, fromCMYK, fromYCbCr, fromCIELab } from './rgb';\nimport { getDecoder } from './compression';\nimport { resample, resampleInterleaved } from './resample';\n\nfunction sum(array, start, end) {\n let s = 0;\n for (let i = start; i < end; ++i) {\n s += array[i];\n }\n return s;\n}\n\nfunction arrayForType(format, bitsPerSample, size) {\n switch (format) {\n case 1: // unsigned integer data\n if (bitsPerSample <= 8) {\n return new Uint8Array(size);\n } else if (bitsPerSample <= 16) {\n return new Uint16Array(size);\n } else if (bitsPerSample <= 32) {\n return new Uint32Array(size);\n }\n break;\n case 2: // twos complement signed integer data\n if (bitsPerSample === 8) {\n return new Int8Array(size);\n } else if (bitsPerSample === 16) {\n return new Int16Array(size);\n } else if (bitsPerSample === 32) {\n return new Int32Array(size);\n }\n break;\n case 3: // floating point data\n switch (bitsPerSample) {\n case 16:\n case 32:\n return new Float32Array(size);\n case 64:\n return new Float64Array(size);\n default:\n break;\n }\n break;\n default:\n break;\n }\n throw Error('Unsupported data format/bitsPerSample');\n}\n\nfunction needsNormalization(format, bitsPerSample) {\n if ((format === 1 || format === 2) && bitsPerSample <= 32 && bitsPerSample % 8 === 0) {\n return false;\n } else if (format === 3 && (bitsPerSample === 16 || bitsPerSample === 32 || bitsPerSample === 64)) {\n return false;\n }\n return true;\n}\n\nfunction normalizeArray(inBuffer, format, planarConfiguration, samplesPerPixel, bitsPerSample, tileWidth, tileHeight) {\n // const inByteArray = new Uint8Array(inBuffer);\n const view = new DataView(inBuffer);\n const outSize = planarConfiguration === 2\n ? tileHeight * tileWidth\n : tileHeight * tileWidth * samplesPerPixel;\n const samplesToTransfer = planarConfiguration === 2\n ? 1 : samplesPerPixel;\n const outArray = arrayForType(format, bitsPerSample, outSize);\n // let pixel = 0;\n\n const bitMask = parseInt('1'.repeat(bitsPerSample), 2);\n\n if (format === 1) { // unsigned integer\n // translation of https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/geotiff.cpp#L7337\n let pixelBitSkip;\n // let sampleBitOffset = 0;\n if (planarConfiguration === 1) {\n pixelBitSkip = samplesPerPixel * bitsPerSample;\n // sampleBitOffset = (samplesPerPixel - 1) * bitsPerSample;\n } else {\n pixelBitSkip = bitsPerSample;\n }\n\n // Bits per line rounds up to next byte boundary.\n let bitsPerLine = tileWidth * pixelBitSkip;\n if ((bitsPerLine & 7) !== 0) {\n bitsPerLine = (bitsPerLine + 7) & (~7);\n }\n\n for (let y = 0; y < tileHeight; ++y) {\n const lineBitOffset = y * bitsPerLine;\n for (let x = 0; x < tileWidth; ++x) {\n const pixelBitOffset = lineBitOffset + (x * samplesToTransfer * bitsPerSample);\n for (let i = 0; i < samplesToTransfer; ++i) {\n const bitOffset = pixelBitOffset + (i * bitsPerSample);\n const outIndex = (((y * tileWidth) + x) * samplesToTransfer) + i;\n\n const byteOffset = Math.floor(bitOffset / 8);\n const innerBitOffset = bitOffset % 8;\n if (innerBitOffset + bitsPerSample <= 8) {\n outArray[outIndex] = (view.getUint8(byteOffset) >> (8 - bitsPerSample) - innerBitOffset) & bitMask;\n } else if (innerBitOffset + bitsPerSample <= 16) {\n outArray[outIndex] = (view.getUint16(byteOffset) >> (16 - bitsPerSample) - innerBitOffset) & bitMask;\n } else if (innerBitOffset + bitsPerSample <= 24) {\n const raw = (view.getUint16(byteOffset) << 8) | (view.getUint8(byteOffset + 2));\n outArray[outIndex] = (raw >> (24 - bitsPerSample) - innerBitOffset) & bitMask;\n } else {\n outArray[outIndex] = (view.getUint32(byteOffset) >> (32 - bitsPerSample) - innerBitOffset) & bitMask;\n }\n\n\n // let outWord = 0;\n // for (let bit = 0; bit < bitsPerSample; ++bit) {\n // if (inByteArray[bitOffset >> 3]\n // & (0x80 >> (bitOffset & 7))) {\n // outWord |= (1 << (bitsPerSample - 1 - bit));\n // }\n // ++bitOffset;\n // }\n\n // outArray[outIndex] = outWord;\n // outArray[pixel] = outWord;\n // pixel += 1;\n }\n // bitOffset = bitOffset + pixelBitSkip - bitsPerSample;\n }\n }\n } else if (format === 3) { // floating point\n // Float16 is handled elsewhere\n // normalize 16/24 bit floats to 32 bit floats in the array\n // console.time();\n // if (bitsPerSample === 16) {\n // for (let byte = 0, outIndex = 0; byte < inBuffer.byteLength; byte += 2, ++outIndex) {\n // outArray[outIndex] = getFloat16(view, byte);\n // }\n // }\n // console.timeEnd()\n }\n\n return outArray.buffer;\n}\n\n/**\n * GeoTIFF sub-file image.\n */\nclass GeoTIFFImage {\n /**\n * @constructor\n * @param {Object} fileDirectory The parsed file directory\n * @param {Object} geoKeys The parsed geo-keys\n * @param {DataView} dataView The DataView for the underlying file.\n * @param {Boolean} littleEndian Whether the file is encoded in little or big endian\n * @param {Boolean} cache Whether or not decoded tiles shall be cached\n * @param {Source} source The datasource to read from\n */\n constructor(fileDirectory, geoKeys, dataView, littleEndian, cache, source) {\n this.fileDirectory = fileDirectory;\n this.geoKeys = geoKeys;\n this.dataView = dataView;\n this.littleEndian = littleEndian;\n this.tiles = cache ? {} : null;\n this.isTiled = !fileDirectory.StripOffsets;\n const planarConfiguration = fileDirectory.PlanarConfiguration;\n this.planarConfiguration = (typeof planarConfiguration === 'undefined') ? 1 : planarConfiguration;\n if (this.planarConfiguration !== 1 && this.planarConfiguration !== 2) {\n throw new Error('Invalid planar configuration.');\n }\n\n this.source = source;\n }\n\n /**\n * Returns the associated parsed file directory.\n * @returns {Object} the parsed file directory\n */\n getFileDirectory() {\n return this.fileDirectory;\n }\n\n /**\n * Returns the associated parsed geo keys.\n * @returns {Object} the parsed geo keys\n */\n getGeoKeys() {\n return this.geoKeys;\n }\n\n /**\n * Returns the width of the image.\n * @returns {Number} the width of the image\n */\n getWidth() {\n return this.fileDirectory.ImageWidth;\n }\n\n /**\n * Returns the height of the image.\n * @returns {Number} the height of the image\n */\n getHeight() {\n return this.fileDirectory.ImageLength;\n }\n\n /**\n * Returns the number of samples per pixel.\n * @returns {Number} the number of samples per pixel\n */\n getSamplesPerPixel() {\n return typeof this.fileDirectory.SamplesPerPixel !== 'undefined'\n ? this.fileDirectory.SamplesPerPixel : 1;\n }\n\n /**\n * Returns the width of each tile.\n * @returns {Number} the width of each tile\n */\n getTileWidth() {\n return this.isTiled ? this.fileDirectory.TileWidth : this.getWidth();\n }\n\n /**\n * Returns the height of each tile.\n * @returns {Number} the height of each tile\n */\n getTileHeight() {\n if (this.isTiled) {\n return this.fileDirectory.TileLength;\n }\n if (typeof this.fileDirectory.RowsPerStrip !== 'undefined') {\n return Math.min(this.fileDirectory.RowsPerStrip, this.getHeight());\n }\n return this.getHeight();\n }\n\n getBlockWidth() {\n return this.getTileWidth();\n }\n\n getBlockHeight(y) {\n if (this.isTiled || (y + 1) * this.getTileHeight() <= this.getHeight()) {\n return this.getTileHeight();\n } else {\n return this.getHeight() - (y * this.getTileHeight());\n }\n }\n\n /**\n * Calculates the number of bytes for each pixel across all samples. Only full\n * bytes are supported, an exception is thrown when this is not the case.\n * @returns {Number} the bytes per pixel\n */\n getBytesPerPixel() {\n let bytes = 0;\n for (let i = 0; i < this.fileDirectory.BitsPerSample.length; ++i) {\n bytes += this.getSampleByteSize(i);\n }\n return bytes;\n }\n\n getSampleByteSize(i) {\n if (i >= this.fileDirectory.BitsPerSample.length) {\n throw new RangeError(`Sample index ${i} is out of range.`);\n }\n return Math.ceil(this.fileDirectory.BitsPerSample[i] / 8);\n }\n\n getReaderForSample(sampleIndex) {\n const format = this.fileDirectory.SampleFormat\n ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n const bitsPerSample = this.fileDirectory.BitsPerSample[sampleIndex];\n switch (format) {\n case 1: // unsigned integer data\n if (bitsPerSample <= 8) {\n return DataView.prototype.getUint8;\n } else if (bitsPerSample <= 16) {\n return DataView.prototype.getUint16;\n } else if (bitsPerSample <= 32) {\n return DataView.prototype.getUint32;\n }\n break;\n case 2: // twos complement signed integer data\n if (bitsPerSample <= 8) {\n return DataView.prototype.getInt8;\n } else if (bitsPerSample <= 16) {\n return DataView.prototype.getInt16;\n } else if (bitsPerSample <= 32) {\n return DataView.prototype.getInt32;\n }\n break;\n case 3:\n switch (bitsPerSample) {\n case 16:\n return function (offset, littleEndian) {\n return getFloat16(this, offset, littleEndian);\n };\n case 32:\n return DataView.prototype.getFloat32;\n case 64:\n return DataView.prototype.getFloat64;\n default:\n break;\n }\n break;\n default:\n break;\n }\n throw Error('Unsupported data format/bitsPerSample');\n }\n\n getSampleFormat(sampleIndex = 0) {\n return this.fileDirectory.SampleFormat\n ? this.fileDirectory.SampleFormat[sampleIndex] : 1;\n }\n\n getBitsPerSample(sampleIndex = 0) {\n return this.fileDirectory.BitsPerSample[sampleIndex];\n }\n\n getArrayForSample(sampleIndex, size) {\n const format = this.getSampleFormat(sampleIndex);\n const bitsPerSample = this.getBitsPerSample(sampleIndex);\n return arrayForType(format, bitsPerSample, size);\n }\n\n /**\n * Returns the decoded strip or tile.\n * @param {Number} x the strip or tile x-offset\n * @param {Number} y the tile y-offset (0 for stripped images)\n * @param {Number} sample the sample to get for separated samples\n * @param {Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<ArrayBuffer>}\n */\n async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {\n const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());\n const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());\n let index;\n const { tiles } = this;\n if (this.planarConfiguration === 1) {\n index = (y * numTilesPerRow) + x;\n } else if (this.planarConfiguration === 2) {\n index = (sample * numTilesPerRow * numTilesPerCol) + (y * numTilesPerRow) + x;\n }\n\n let offset;\n let byteCount;\n if (this.isTiled) {\n offset = this.fileDirectory.TileOffsets[index];\n byteCount = this.fileDirectory.TileByteCounts[index];\n } else {\n offset = this.fileDirectory.StripOffsets[index];\n byteCount = this.fileDirectory.StripByteCounts[index];\n }\n const slice = (await this.source.fetch([{ offset, length: byteCount }], signal))[0];\n\n let request;\n if (tiles === null || !tiles[index]) {\n // resolve each request by potentially applying array normalization\n request = (async () => {\n let data = await poolOrDecoder.decode(this.fileDirectory, slice);\n const sampleFormat = this.getSampleFormat();\n const bitsPerSample = this.getBitsPerSample();\n if (needsNormalization(sampleFormat, bitsPerSample)) {\n data = normalizeArray(\n data,\n sampleFormat,\n this.planarConfiguration,\n this.getSamplesPerPixel(),\n bitsPerSample,\n this.getTileWidth(),\n this.getBlockHeight(y),\n );\n }\n return data;\n })();\n\n // set the cache\n if (tiles !== null) {\n tiles[index] = request;\n }\n } else {\n // get from the cache\n request = tiles[index];\n }\n\n // cache the tile request\n return { x, y, sample, data: await request };\n }\n\n /**\n * Internal read function.\n * @private\n * @param {Array} imageWindow The image window in pixel coordinates\n * @param {Array} samples The selected samples (0-based indices)\n * @param {TypedArray[]|TypedArray} valueArrays The array(s) to write into\n * @param {Boolean} interleave Whether or not to write in an interleaved manner\n * @param {Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool\n * @param {number} width the width of window to be read into\n * @param {number} height the height of window to be read into\n * @param {number} resampleMethod the resampling method to be used when interpolating\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise<TypedArray[]>|Promise<TypedArray>}\n */\n async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal) {\n const tileWidth = this.getTileWidth();\n const tileHeight = this.getTileHeight();\n\n const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);\n const maxXTile = Math.min(\n Math.ceil(imageWindow[2] / tileWidth),\n Math.ceil(this.getWidth() / this.getTileWidth()),\n );\n const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);\n const maxYTile = Math.min(\n Math.ceil(imageWindow[3] / tileHeight),\n Math.ceil(this.getHeight() / this.getTileHeight()),\n );\n const windowWidth = imageWindow[2] - imageWindow[0];\n\n let bytesPerPixel = this.getBytesPerPixel();\n\n const srcSampleOffsets = [];\n const sampleReaders = [];\n for (let i = 0; i < samples.length; ++i) {\n if (this.planarConfiguration === 1) {\n srcSampleOffsets.push(sum(this.fileDirectory.BitsPerSample, 0, samples[i]) / 8);\n } else {\n srcSampleOffsets.push(0);\n }\n sampleReaders.push(this.getReaderForSample(samples[i]));\n }\n\n const promises = [];\n const { littleEndian } = this;\n\n for (let yTile = minYTile; yTile < maxYTile; ++yTile) {\n for (let xTile = minXTile; xTile < maxXTile; ++xTile) {\n for (let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex) {\n const si = sampleIndex;\n const sample = samples[sampleIndex];\n if (this.planarConfiguration === 2) {\n bytesPerPixel = this.getSampleByteSize(sampleIndex);\n }\n const promise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder, signal).then((tile) => {\n const buffer = tile.data;\n const dataView = new DataView(buffer);\n const blockHeight = this.getBlockHeight(tile.y);\n const firstLine = tile.y * tileHeight;\n const firstCol = tile.x * tileWidth;\n const lastLine = firstLine + blockHeight;\n const lastCol = (tile.x + 1) * tileWidth;\n const reader = sampleReaders[si];\n\n const ymax = Math.min(blockHeight, blockHeight - (lastLine - imageWindow[3]));\n const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]));\n\n for (let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y) {\n for (let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x) {\n const pixelOffset = ((y * tileWidth) + x) * bytesPerPixel;\n const value = reader.call(\n dataView, pixelOffset + srcSampleOffsets[si], littleEndian,\n );\n let windowCoordinate;\n if (interleave) {\n windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth * samples.length)\n + ((x + firstCol - imageWindow[0]) * samples.length)\n + si;\n valueArrays[windowCoordinate] = value;\n } else {\n windowCoordinate = (\n (y + firstLine - imageWindow[1]) * windowWidth\n ) + x + firstCol - imageWindow[0];\n valueArrays[si][windowCoordinate] = value;\n }\n }\n }\n });\n promises.push(promise);\n }\n }\n }\n await Promise.all(promises);\n\n if ((width && (imageWindow[2] - imageWindow[0]) !== width)\n || (height && (imageWindow[3] - imageWindow[1]) !== height)) {\n let resampled;\n if (interleave) {\n resampled = resampleInterleaved(\n valueArrays,\n imageWindow[2] - imageWindow[0],\n imageWindow[3] - imageWindow[1],\n width, height,\n samples.length,\n resampleMethod,\n );\n } else {\n resampled = resample(\n valueArrays,\n imageWindow[2] - imageWindow[0],\n imageWindow[3] - imageWindow[1],\n width, height,\n resampleMethod,\n );\n }\n resampled.width = width;\n resampled.height = height;\n return resampled;\n }\n\n valueArrays.width = width || imageWindow[2] - imageWindow[0];\n valueArrays.height = height || imageWindow[3] - imageWindow[1];\n\n return valueArrays;\n }\n\n /**\n * Reads raster data from the image. This function reads all selected samples\n * into separate arrays of the correct type for that sample or into a single\n * combined array when `interleave` is set. When provided, only a subset\n * of the raster is read for each sample.\n *\n * @param {Object} [options={}] optional parameters\n * @param {Array} [options.window=whole image] the subset to read data from.\n * @param {Array} [options.samples=all samples] the selection of samples to read from.\n * @param {Boolean} [options.interleave=false] whether the data shall be read\n * in one single array or separate\n * arrays.\n * @param {Number} [options.pool=null] The optional decoder pool to use.\n * @param {number} [options.width] The desired width of the output. When the width is\n * not the same as the images, resampling will be\n * performed.\n * @param {number} [options.height] The desired height of the output. When the width\n * is not the same as the images, resampling will\n * be performed.\n * @param {string} [options.resampleMethod='nearest'] The desired resampling method.\n * @param {number|number[]} [options.fillValue] The value to use for parts of the image\n * outside of the images extent. When\n * multiple samples are requested, an\n * array of fill values can be passed.\n * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n */\n async readRasters({\n window: wnd, samples = [], interleave, pool = null,\n width, height, resampleMethod, fillValue, signal,\n } = {}) {\n const imageWindow = wnd || [0, 0, this.getWidth(), this.getHeight()];\n\n // check parameters\n if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n throw new Error('Invalid subsets');\n }\n\n const imageWindowWidth = imageWindow[2] - imageWindow[0];\n const imageWindowHeight = imageWindow[3] - imageWindow[1];\n const numPixels = imageWindowWidth * imageWindowHeight;\n const samplesPerPixel = this.getSamplesPerPixel();\n\n if (!samples || !samples.length) {\n for (let i = 0; i < samplesPerPixel; ++i) {\n samples.push(i);\n }\n } else {\n for (let i = 0; i < samples.length; ++i) {\n if (samples[i] >= samplesPerPixel) {\n return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));\n }\n }\n }\n let valueArrays;\n if (interleave) {\n const format = this.fileDirectory.SampleFormat\n ? Math.max.apply(null, this.fileDirectory.SampleFormat) : 1;\n const bitsPerSample = Math.max.apply(null, this.fileDirectory.BitsPerSample);\n valueArrays = arrayForType(format, bitsPerSample, numPixels * samples.length);\n if (fillValue) {\n valueArrays.fill(fillValue);\n }\n } else {\n valueArrays = [];\n for (let i = 0; i < samples.length; ++i) {\n const valueArray = this.getArrayForSample(samples[i], numPixels);\n if (Array.isArray(fillValue) && i < fillValue.length) {\n valueArray.fill(fillValue[i]);\n } else if (fillValue && !Array.isArray(fillValue)) {\n valueArray.fill(fillValue);\n }\n valueArrays.push(valueArray);\n }\n }\n\n const poolOrDecoder = pool || getDecoder(this.fileDirectory);\n\n const result = await this._readRaster(\n imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal,\n );\n return result;\n }\n\n /**\n * Reads raster data from the image as RGB. The result is always an\n * interleaved typed array.\n * Colorspaces other than RGB will be transformed to RGB, color maps expanded.\n * When no other method is applicable, the first sample is used to produce a\n * greayscale image.\n * When provided, only a subset of the raster is read for each sample.\n *\n * @param {Object} [options] optional parameters\n * @param {Array} [options.window=whole image] the subset to read data from.\n * @param {Number} [options.pool=null] The optional decoder pool to use.\n * @param {number} [options.width] The desired width of the output. When the width is no the\n * same as the images, resampling will be performed.\n * @param {number} [options.height] The desired height of the output. When the width is no the\n * same as the images, resampling will be performed.\n * @param {string} [options.resampleMethod='nearest'] The desired resampling method.\n * @param {bool} [options.enableAlpha=false] Enable reading alpha channel if present.\n * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<TypedArray|TypedArray[]>} the RGB array as a Promise\n */\n async readRGB({ window, pool = null, width, height, resampleMethod, enableAlpha = false, signal } = {}) {\n const imageWindow = window || [0, 0, this.getWidth(), this.getHeight()];\n\n // check parameters\n if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {\n throw new Error('Invalid subsets');\n }\n\n const pi = this.fileDirectory.PhotometricInterpretation;\n\n if (pi === photometricInterpretations.RGB) {\n let s = [0, 1, 2];\n if ((!(this.fileDirectory.ExtraSamples === ExtraSamplesValues.Unspecified)) && enableAlpha) {\n s = [];\n for (let i = 0; i < this.fileDirectory.BitsPerSample.length; i += 1) {\n s.push(i);\n }\n }\n return this.readRasters({\n window,\n interleave: true,\n samples: s,\n pool,\n width,\n height,\n resampleMethod,\n signal,\n });\n }\n\n let samples;\n switch (pi) {\n case photometricInterpretations.WhiteIsZero:\n case photometricInterpretations.BlackIsZero:\n case photometricInterpretations.Palette:\n samples = [0];\n break;\n case photometricInterpretations.CMYK:\n samples = [0, 1, 2, 3];\n break;\n case photometricInterpretations.YCbCr:\n case photometricInterpretations.CIELab:\n samples = [0, 1, 2];\n break;\n default:\n throw new Error('Invalid or unsupported photometric interpretation.');\n }\n\n const subOptions = {\n window: imageWindow,\n interleave: true,\n samples,\n pool,\n width,\n height,\n resampleMethod,\n signal,\n };\n const { fileDirectory } = this;\n const raster = await this.readRasters(subOptions);\n\n const max = 2 ** this.fileDirectory.BitsPerSample[0];\n let data;\n switch (pi) {\n case photometricInterpretations.WhiteIsZero:\n data = fromWhiteIsZero(raster, max);\n break;\n case photometricInterpretations.BlackIsZero:\n data = fromBlackIsZero(raster, max);\n break;\n case photometricInterpretations.Palette:\n data = fromPalette(raster, fileDirectory.ColorMap);\n break;\n case photometricInterpretations.CMYK:\n data = fromCMYK(raster);\n break;\n case photometricInterpretations.YCbCr:\n data = fromYCbCr(raster);\n break;\n case photometricInterpretations.CIELab:\n data = fromCIELab(raster);\n break;\n default:\n throw new Error('Unsupported photometric interpretation.');\n }\n data.width = raster.width;\n data.height = raster.height;\n return data;\n }\n\n /**\n * Returns an array of tiepoints.\n * @returns {Object[]}\n */\n getTiePoints() {\n if (!this.fileDirectory.ModelTiepoint) {\n return [];\n }\n\n const tiePoints = [];\n for (let i = 0; i < this.fileDirectory.ModelTiepoint.length; i += 6) {\n tiePoints.push({\n i: this.fileDirectory.ModelTiepoint[i],\n j: this.fileDirectory.ModelTiepoint[i + 1],\n k: this.fileDirectory.ModelTiepoint[i + 2],\n x: this.fileDirectory.ModelTiepoint[i + 3],\n y: this.fileDirectory.ModelTiepoint[i + 4],\n z: this.fileDirectory.ModelTiepoint[i + 5],\n });\n }\n return tiePoints;\n }\n\n /**\n * Returns the parsed GDAL metadata items.\n *\n * If sample is passed to null, dataset-level metadata will be returned.\n * Otherwise only metadata specific to the provided sample will be returned.\n *\n * @param {Number} [sample=null] The sample index.\n * @returns {Object}\n */\n getGDALMetadata(sample = null) {\n const metadata = {};\n if (!this.fileDirectory.GDAL_METADATA) {\n return null;\n }\n const string = this.fileDirectory.GDAL_METADATA;\n const xmlDom = parse(string.substring(0, string.length - 1));\n\n if (!xmlDom[0].tagName) {\n throw new Error('Failed to parse GDAL metadata XML.');\n }\n\n const root = xmlDom[0];\n if (root.tagName !== 'GDALMetadata') {\n throw new Error('Unexpected GDAL metadata XML tag.');\n }\n\n let items = root.children\n .filter((child) => child.tagName === 'Item');\n\n if (sample !== null) {\n items = items.filter((item) => Number(item.attributes.sample) === sample);\n }\n\n for (let i = 0; i < items.length; ++i) {\n const item = items[i];\n metadata[item.attributes.name] = item.children[0];\n }\n return metadata;\n }\n\n /**\n * Returns the GDAL nodata value\n * @returns {Number} or null\n */\n getGDALNoData() {\n if (!this.fileDirectory.GDAL_NODATA) {\n return null;\n }\n const string = this.fileDirectory.GDAL_NODATA;\n return Number(string.substring(0, string.length - 1));\n }\n\n /**\n * Returns the image origin as a XYZ-vector. When the image has no affine\n * transformation, then an exception is thrown.\n * @returns {Array} The origin as a vector\n */\n getOrigin() {\n const tiePoints = this.fileDirectory.ModelTiepoint;\n const modelTransformation = this.fileDirectory.ModelTransformation;\n if (tiePoints && tiePoints.length === 6) {\n return [\n tiePoints[3],\n tiePoints[4],\n tiePoints[5],\n ];\n }\n if (modelTransformation) {\n return [\n modelTransformation[3],\n modelTransformation[7],\n modelTransformation[11],\n ];\n }\n throw new Error('The image does not have an affine transformation.');\n }\n\n /**\n * Returns the image resolution as a XYZ-vector. When the image has no affine\n * transformation, then an exception is thrown.\n * @param {GeoTIFFImage} [referenceImage=null] A reference image to calculate the resolution from\n * in cases when the current image does not have the\n * required tags on its own.\n * @returns {Array} The resolution as a vector\n */\n getResolution(referenceImage = null) {\n const modelPixelScale = this.fileDirectory.ModelPixelScale;\n const modelTransformation = this.fileDirectory.ModelTransformation;\n\n if (modelPixelScale) {\n return [\n modelPixelScale[0],\n -modelPixelScale[1],\n modelPixelScale[2],\n ];\n }\n if (modelTransformation) {\n return [\n modelTransformation[0],\n modelTransformation[5],\n modelTransformation[10],\n ];\n }\n\n if (referenceImage) {\n const [refResX, refResY, refResZ] = referenceImage.getResolution();\n return [\n refResX * referenceImage.getWidth() / this.getWidth(),\n refResY * referenceImage.getHeight() / this.getHeight(),\n refResZ * referenceImage.getWidth() / this.getWidth(),\n ];\n }\n\n throw new Error('The image does not have an affine transformation.');\n }\n\n /**\n * Returns whether or not the pixels of the image depict an area (or point).\n * @returns {Boolean} Whether the pixels are a point\n */\n pixelIsArea() {\n return this.geoKeys.GTRasterTypeGeoKey === 1;\n }\n\n /**\n * Returns the image bounding box as an array of 4 values: min-x, min-y,\n * max-x and max-y. When the image has no affine transformation, then an\n * exception is thrown.\n * @returns {Array} The bounding box\n */\n getBoundingBox() {\n const origin = this.getOrigin();\n const resolution = this.getResolution();\n\n const x1 = origin[0];\n const y1 = origin[1];\n\n const x2 = x1 + (resolution[0] * this.getWidth());\n const y2 = y1 + (resolution[1] * this.getHeight());\n\n return [\n Math.min(x1, x2),\n Math.min(y1, y2),\n Math.max(x1, x2),\n Math.max(y1, y2),\n ];\n }\n}\n\nexport default GeoTIFFImage;\n","import { getFloat16 } from '@petamoriken/float16';\n\nexport default class DataView64 {\n constructor(arrayBuffer) {\n this._dataView = new DataView(arrayBuffer);\n }\n\n get buffer() {\n return this._dataView.buffer;\n }\n\n getUint64(offset, littleEndian) {\n const left = this.getUint32(offset, littleEndian);\n const right = this.getUint32(offset + 4, littleEndian);\n let combined;\n if (littleEndian) {\n combined = left + 2 ** 32 * right;\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`\n );\n }\n return combined;\n }\n combined = 2 ** 32 * left + right;\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`\n );\n }\n\n return combined;\n }\n\n // adapted from https://stackoverflow.com/a/55338384/8060591\n getInt64(offset, littleEndian) {\n let value = 0;\n const isNegative =\n (this._dataView.getUint8(offset + (littleEndian ? 7 : 0)) & 0x80) > 0;\n let carrying = true;\n for (let i = 0; i < 8; i++) {\n let byte = this._dataView.getUint8(offset + (littleEndian ? i : 7 - i));\n if (isNegative) {\n if (carrying) {\n if (byte !== 0x00) {\n byte = ~(byte - 1) & 0xff;\n carrying = false;\n }\n } else {\n byte = ~byte & 0xff;\n }\n }\n value += byte * 256 ** i;\n }\n if (isNegative) {\n value = -value;\n }\n return value;\n }\n\n getUint8(offset, littleEndian) {\n return this._dataView.getUint8(offset, littleEndian);\n }\n\n getInt8(offset, littleEndian) {\n return this._dataView.getInt8(offset, littleEndian);\n }\n\n getUint16(offset, littleEndian) {\n return this._dataView.getUint16(offset, littleEndian);\n }\n\n getInt16(offset, littleEndian) {\n return this._dataView.getInt16(offset, littleEndian);\n }\n\n getUint32(offset, littleEndian) {\n return this._dataView.getUint32(offset, littleEndian);\n }\n\n getInt32(offset, littleEndian) {\n return this._dataView.getInt32(offset, littleEndian);\n }\n\n getFloat16(offset, littleEndian) {\n return getFloat16(this._dataView, littleEndian);\n }\n\n getFloat32(offset, littleEndian) {\n return this._dataView.getFloat32(offset, littleEndian);\n }\n\n getFloat64(offset, littleEndian) {\n return this._dataView.getFloat64(offset, littleEndian);\n }\n}\n","export default class DataSlice {\n constructor(arrayBuffer, sliceOffset, littleEndian, bigTiff) {\n this._dataView = new DataView(arrayBuffer);\n this._sliceOffset = sliceOffset;\n this._littleEndian = littleEndian;\n this._bigTiff = bigTiff;\n }\n\n get sliceOffset() {\n return this._sliceOffset;\n }\n\n get sliceTop() {\n return this._sliceOffset + this.buffer.byteLength;\n }\n\n get littleEndian() {\n return this._littleEndian;\n }\n\n get bigTiff() {\n return this._bigTiff;\n }\n\n get buffer() {\n return this._dataView.buffer;\n }\n\n covers(offset, length) {\n return this.sliceOffset <= offset && this.sliceTop >= offset + length;\n }\n\n readUint8(offset) {\n return this._dataView.getUint8(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readInt8(offset) {\n return this._dataView.getInt8(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readUint16(offset) {\n return this._dataView.getUint16(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readInt16(offset) {\n return this._dataView.getInt16(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readUint32(offset) {\n return this._dataView.getUint32(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readInt32(offset) {\n return this._dataView.getInt32(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readFloat32(offset) {\n return this._dataView.getFloat32(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readFloat64(offset) {\n return this._dataView.getFloat64(\n offset - this._sliceOffset, this._littleEndian,\n );\n }\n\n readUint64(offset) {\n const left = this.readUint32(offset);\n const right = this.readUint32(offset + 4);\n let combined;\n if (this._littleEndian) {\n combined = left + 2 ** 32 * right;\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`,\n );\n }\n return combined;\n }\n combined = 2 ** 32 * left + right;\n if (!Number.isSafeInteger(combined)) {\n throw new Error(\n `${combined} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`,\n );\n }\n\n return combined;\n }\n\n // adapted from https://stackoverflow.com/a/55338384/8060591\n readInt64(offset) {\n let value = 0;\n const isNegative =\n (this._dataView.getUint8(offset + (this._littleEndian ? 7 : 0)) & 0x80) >\n 0;\n let carrying = true;\n for (let i = 0; i < 8; i++) {\n let byte = this._dataView.getUint8(\n offset + (this._littleEndian ? i : 7 - i)\n );\n if (isNegative) {\n if (carrying) {\n if (byte !== 0x00) {\n byte = ~(byte - 1) & 0xff;\n carrying = false;\n }\n } else {\n byte = ~byte & 0xff;\n }\n }\n value += byte * 256 ** i;\n }\n if (isNegative) {\n value = -value;\n }\n return value\n }\n\n readOffset(offset) {\n if (this._bigTiff) {\n return this.readUint64(offset);\n }\n return this.readUint32(offset);\n }\n}\n","\nconst CRLFCRLF = '\\r\\n\\r\\n';\n\n/*\n * Shim for 'Object.fromEntries'\n */\nfunction itemsToObject(items) {\n if (typeof Object.fromEntries !== 'undefined') {\n return Object.fromEntries(items);\n }\n const obj = {};\n for (const [key, value] of items) {\n obj[key.toLowerCase()] = value;\n }\n return obj;\n}\n\n/**\n * Parse HTTP headers from a given string.\n * @param {String} text the text to parse the headers from\n * @returns {Object} the parsed headers with lowercase keys\n */\nfunction parseHeaders(text) {\n const items = text\n .split('\\r\\n')\n .map(line => {\n const kv = line.split(':').map(str => str.trim());\n kv[0] = kv[0].toLowerCase();\n return kv\n });\n\n return itemsToObject(items);\n}\n\n/**\n * Parse a 'Content-Type' header value to the content-type and parameters\n * @param {String} rawContentType the raw string to parse from\n * @returns {Object} the parsed content type with the fields: type and params\n */\nexport function parseContentType(rawContentType) {\n const [type, ...rawParams] = rawContentType.split(';').map((s) => s.trim());\n const paramsItems = rawParams.map((param) => param.split('='));\n return { type, params: itemsToObject(paramsItems) };\n}\n\n/**\n * Parse a 'Content-Range' header value to its start, end, and total parts\n * @param {String} rawContentRange the raw string to parse from\n * @returns {Object} the parsed parts\n */\nexport function parseContentRange(rawContentRange) {\n let start;\n let end;\n let total;\n\n if (rawContentRange) {\n [, start, end, total] = rawContentRange.match(/bytes (\\d+)-(\\d+)\\/(\\d+)/);\n start = parseInt(start, 10);\n end = parseInt(end, 10);\n total = parseInt(total, 10);\n }\n\n return { start, end, total };\n}\n\n/**\n * Parses a list of byteranges from the given 'multipart/byteranges' HTTP response.\n * Each item in the list has the following properties:\n * - headers: the HTTP headers\n * - data: the sliced ArrayBuffer for that specific part\n * - offset: the offset of the byterange within its originating file\n * - length: the length of the byterange\n * @param {ArrayBuffer} responseArrayBuffer the response to be parsed and split\n * @param {String} boundary the boundary string used to split the sections\n * @returns {Object[]} the parsed byteranges\n */\nexport function parseByteRanges(responseArrayBuffer, boundary) {\n let offset = null;\n const decoder = new TextDecoder('ascii');\n const out = [];\n\n const startBoundary = `--${boundary}`;\n const endBoundary = `${startBoundary}--`;\n\n // search for the initial boundary, may be offset by some bytes\n // TODO: more efficient to check for `--` in bytes directly\n for (let i = 0; i < 10; ++i) {\n const text = decoder.decode(\n new Uint8Array(responseArrayBuffer, i, startBoundary.length)\n );\n if (text === startBoundary) {\n offset = i;\n }\n }\n\n if (offset === null) {\n throw new Error(\"Could not find initial boundary\");\n }\n\n while (offset < responseArrayBuffer.byteLength) {\n const text = decoder.decode(\n new Uint8Array(responseArrayBuffer, offset,\n Math.min(startBoundary.length + 1024, responseArrayBuffer.byteLength - offset),\n ),\n );\n\n // break if we arrived at the end\n if (text.length === 0 || text.startsWith(endBoundary)) {\n break;\n }\n\n // assert that we are actually dealing with a byterange and are at the correct offset\n if (!text.startsWith(startBoundary)) {\n throw new Error('Part does not start with boundary');\n }\n\n // get a substring from where we read the headers\n const innerText = text.substr(startBoundary.length + 2);\n\n if (innerText.length === 0) {\n break;\n }\n\n // find the double linebreak that denotes the end of the headers\n const endOfHeaders = innerText.indexOf(CRLFCRLF);\n\n // parse the headers to get the content range size\n const headers = parseHeaders(innerText.substr(0, endOfHeaders));\n const { start, end, total } = parseContentRange(headers['content-range']);\n\n // calculate the length of the slice and the next offset\n const startOfData = offset + startBoundary.length + endOfHeaders + CRLFCRLF.length;\n const length = parseInt(end, 10) + 1 - parseInt(start, 10);\n out.push({\n headers,\n data: responseArrayBuffer.slice(startOfData, startOfData + length),\n offset: start,\n length,\n fileSize: total,\n });\n\n offset = startOfData + length + 4;\n }\n\n return out;\n}\n","import LRUCache from 'lru-cache';\nimport { BaseSource } from './basesource';\nimport { AbortError, AggregateError, wait, zip } from '../utils';\n\nclass Block {\n /**\n *\n * @param {number} offset\n * @param {number} length\n * @param {ArrayBuffer} [data]\n */\n constructor(offset, length, data = null) {\n this.offset = offset;\n this.length = length;\n this.data = data;\n }\n\n /**\n * @returns {number} the top byte border\n */\n get top() {\n return this.offset + this.length;\n }\n}\n\n\nclass BlockGroup {\n /**\n *\n * @param {number} offset\n * @param {number} length\n * @param {number[]} blockIds\n */\n constructor(offset, length, blockIds) {\n this.offset = offset;\n this.length = length;\n this.blockIds = blockIds;\n }\n}\n\n\nexport class BlockedSource extends BaseSource {\n /**\n *\n * @param {Source} source The underlying source that shall be blocked and cached\n * @param {object} options\n */\n constructor(source, { blockSize = 65536, cacheSize = 100 } = {}) {\n super();\n this.source = source;\n this.blockSize = blockSize;\n\n this.blockCache = new LRUCache({ max: cacheSize });\n\n // mapping blockId -> Block instance\n this.blockRequests = new Map();\n\n // set of blockIds missing for the current requests\n this.blockIdsToFetch = new Set();\n\n this.abortedBlockIds = new Set();\n }\n\n get fileSize() {\n return this.source.fileSize;\n }\n\n /**\n *\n * @param {basesource/Slice[]} slices\n */\n async fetch(slices, signal) {\n const blockRequests = [];\n const missingBlockIds = [];\n const allBlockIds = []\n\n for (const { offset, length } of slices) {\n let top = offset + length;\n\n const { fileSize } = this;\n if (fileSize !== null) {\n top = Math.min(top, fileSize);\n }\n\n const firstBlockOffset = Math.floor(offset / this.blockSize) * this.blockSize;\n\n for (let current = firstBlockOffset; current < top; current += this.blockSize) {\n const blockId = Math.floor(current / this.blockSize);\n if (!this.blockCache.has(blockId) && !this.blockRequests.has(blockId)) {\n this.blockIdsToFetch.add(blockId);\n missingBlockIds.push(blockId);\n }\n if (this.blockRequests.has(blockId)) {\n blockRequests.push(this.blockRequests.get(blockId));\n }\n allBlockIds.push(blockId);\n }\n }\n\n // allow additional block requests to accumulate\n await wait();\n this.fetchBlocks(signal);\n\n // Gather all of the new requests that this fetch call is contributing to `fetch`.\n const missingRequests = [];\n for (const blockId of missingBlockIds) {\n // The requested missing block could already be in the cache\n // instead of having its request still be outstanding.\n if (this.blockRequests.has(blockId)) {\n missingRequests.push(this.blockRequests.get(blockId));\n }\n }\n\n // Actually await all pending requests that are needed for this `fetch`.\n await Promise.allSettled(blockRequests.values());\n await Promise.allSettled(missingRequests.values());\n\n // Perform retries if a block was interrupted by a previous signal\n const abortedBlockRequests = [];\n const abortedBlockIds = allBlockIds\n .filter(id => this.abortedBlockIds.has(id) || !this.blockCache.has(id));\n abortedBlockIds.forEach(id => this.blockIdsToFetch.add(id));\n // start the retry of some blocks if required\n if (abortedBlockIds.length > 0 && signal && !signal.aborted) {\n this.fetchBlocks(null);\n for (const blockId of abortedBlockIds) {\n const block = this.blockRequests.get(blockId);\n if (!block) {\n throw new Error(`Block ${blockId} is not in the block requests`);\n }\n abortedBlockRequests.push(block);\n }\n await Promise.allSettled(Array.from(abortedBlockRequests.values()));\n }\n\n // throw an abort error\n if (signal && signal.aborted) {\n throw new AbortError('Request was aborted');\n }\n\n const blocks = allBlockIds.map((id) => this.blockCache.get(id));\n const failedBlocks = blocks.filter((i) => !i);\n if (failedBlocks.length) {\n throw new AggregateError(failedBlocks, 'Request failed');\n }\n\n // create a final Map, with all required blocks for this request to satisfy\n const requiredBlocks = new Map(zip(allBlockIds, blocks));\n\n // TODO: satisfy each slice\n return this.readSliceData(slices, requiredBlocks);\n }\n\n /**\n *\n * @param {AbortSignal} signal\n */\n fetchBlocks(signal) {\n // check if we still need to\n if (this.blockIdsToFetch.size > 0) {\n const groups = this.groupBlocks(this.blockIdsToFetch);\n\n // start requesting slices of data\n const groupRequests = this.source.fetch(groups, signal);\n\n for (let groupIndex = 0; groupIndex < groups.length; ++groupIndex) {\n const group = groups[groupIndex];\n\n for (const blockId of group.blockIds) {\n // make an async IIFE for each block\n this.blockRequests.set(blockId, (async () => {\n try {\n const response = (await groupRequests)[groupIndex];\n const blockOffset = blockId * this.blockSize;\n const o = blockOffset - response.offset;\n const t = Math.min(o + this.blockSize, response.data.byteLength);\n const data = response.data.slice(o, t);\n const block = new Block(\n blockOffset,\n data.byteLength,\n data,\n blockId,\n );\n this.blockCache.set(blockId, block);\n this.abortedBlockIds.delete(blockId);\n } catch (err) {\n if (err.name === 'AbortError') {\n // store the signal here, we need it to determine later if an\n // error was caused by this signal\n err.signal = signal;\n this.blockCache.del(blockId);\n this.abortedBlockIds.add(blockId);\n } else {\n throw err;\n }\n } finally {\n this.blockRequests.delete(blockId);\n }\n })());\n }\n }\n this.blockIdsToFetch.clear();\n }\n }\n\n /**\n *\n * @param {Set} blockIds\n * @returns {BlockGroup[]}\n */\n groupBlocks(blockIds) {\n const sortedBlockIds = Array.from(blockIds).sort((a, b) => a - b);\n if (sortedBlockIds.length === 0) {\n return [];\n }\n let current = [];\n let lastBlockId = null;\n const groups = [];\n\n for (const blockId of sortedBlockIds) {\n if (lastBlockId === null || lastBlockId + 1 === blockId) {\n current.push(blockId);\n lastBlockId = blockId;\n } else {\n groups.push(new BlockGroup(\n current[0] * this.blockSize,\n current.length * this.blockSize,\n current,\n ));\n current = [blockId];\n lastBlockId = blockId;\n }\n }\n\n groups.push(new BlockGroup(\n current[0] * this.blockSize,\n current.length * this.blockSize,\n current,\n ));\n\n return groups;\n }\n\n /**\n *\n * @param {Slice[]} slices\n * @param {Map} blocks\n */\n readSliceData(slices, blocks) {\n return slices.map((slice) => {\n const top = slice.offset + slice.length;\n const blockIdLow = Math.floor(slice.offset / this.blockSize);\n const blockIdHigh = Math.floor((slice.offset + slice.length) / this.blockSize);\n const sliceData = new ArrayBuffer(slice.length);\n const sliceView = new Uint8Array(sliceData);\n\n for (let blockId = blockIdLow; blockId <= blockIdHigh; ++blockId) {\n const block = blocks.get(blockId);\n const delta = block.offset - slice.offset;\n const topDelta = block.top - top;\n let blockInnerOffset = 0;\n let rangeInnerOffset = 0;\n let usedBlockLength;\n\n if (delta < 0) {\n blockInnerOffset = -delta;\n } else if (delta > 0) {\n rangeInnerOffset = delta;\n }\n\n if (topDelta < 0) {\n usedBlockLength = block.length - blockInnerOffset;\n } else {\n usedBlockLength = top - block.offset - blockInnerOffset;\n }\n\n const blockView = new Uint8Array(block.data, blockInnerOffset, usedBlockLength);\n sliceView.set(blockView, rangeInnerOffset);\n }\n\n return sliceData;\n });\n }\n}\n","import { BaseClient, BaseResponse } from './base';\n\n\nclass FetchResponse extends BaseResponse {\n /**\n * BaseResponse facade for fetch API Response\n * @param {Response} response\n */\n constructor(response) {\n super();\n this.response = response;\n }\n\n get status() {\n return this.response.status;\n }\n\n getHeader(name) {\n return this.response.headers.get(name);\n }\n\n async getData() {\n const data = this.response.arrayBuffer\n ? await this.response.arrayBuffer()\n : (await this.response.buffer()).buffer;\n return data;\n }\n}\n\nexport class FetchClient extends BaseClient {\n constructor(url, credentials) {\n super(url);\n this.credentials = credentials;\n }\n\n async request({ headers, credentials, signal } = {}) {\n const response = await fetch(this.url, {\n headers, credentials, signal,\n });\n return new FetchResponse(response);\n }\n}\n","import { BaseClient, BaseResponse } from './base';\nimport { AbortError } from '../../utils';\n\n\nclass XHRResponse extends BaseResponse {\n /**\n * BaseResponse facade for XMLHttpRequest\n * @param {XMLHttpRequest} xhr\n * @param {ArrayBuffer} data\n */\n constructor(xhr, data) {\n super();\n this.xhr = xhr;\n this.data = data;\n }\n\n get status() {\n return this.xhr.status;\n }\n\n getHeader(name) {\n return this.xhr.getResponseHeader(name);\n }\n\n async getData() {\n return this.data;\n }\n}\n\nexport class XHRClient extends BaseClient {\n constructRequest(headers, signal) {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', this.url);\n xhr.responseType = 'arraybuffer';\n for (const [key, value] of Object.entries(headers)) {\n xhr.setRequestHeader(key, value);\n }\n\n // hook signals\n xhr.onload = () => {\n const data = xhr.response;\n resolve(new XHRResponse(xhr, data));\n };\n xhr.onerror = reject;\n xhr.onabort = () => reject(new AbortError('Request aborted'));\n xhr.send();\n\n if (signal) {\n if (signal.aborted) {\n xhr.abort();\n }\n signal.addEventListener('abort', () => xhr.abort());\n }\n });\n }\n\n async request({ headers, signal } = {}) {\n const response = await this.constructRequest(headers, signal);\n return response;\n }\n}\n","import { parseByteRanges, parseContentRange, parseContentType } from './httputils';\nimport { BaseSource } from './basesource';\nimport { BlockedSource } from './blockedsource';\n\nimport { FetchClient } from './client/fetch';\nimport { XHRClient } from './client/xhr';\nimport { HttpClient } from './client/http';\n\n\nclass RemoteSource extends BaseSource {\n /**\n *\n * @param {BaseClient} client\n * @param {object} headers\n * @param {numbers} maxRanges\n * @param {boolean} allowFullFile\n */\n constructor(client, headers, maxRanges, allowFullFile) {\n super();\n this.client = client;\n this.headers = headers;\n this.maxRanges = maxRanges;\n this.allowFullFile = allowFullFile;\n this._fileSize = null;\n }\n\n /**\n *\n * @param {Slice[]} slices\n */\n async fetch(slices, signal) {\n // if we allow multi-ranges, split the incoming request into that many sub-requests\n // and join them afterwards\n if (this.maxRanges >= slices.length) {\n return this.fetchSlices(slices, signal);\n } else if (this.maxRanges > 0 && slices.length > 1) {\n // TODO: split into multiple multi-range requests\n\n // const subSlicesRequests = [];\n // for (let i = 0; i < slices.length; i += this.maxRanges) {\n // subSlicesRequests.push(\n // this.fetchSlices(slices.slice(i, i + this.maxRanges), signal),\n // );\n // }\n // return (await Promise.all(subSlicesRequests)).flat();\n }\n\n // otherwise make a single request for each slice\n return await Promise.all(\n slices.map((slice) => this.fetchSlice(slice, signal)),\n );\n }\n\n async fetchSlices(slices, signal) {\n const response = await this.client.request({\n headers: {\n ...this.headers,\n Range: `bytes=${slices\n .map(({ offset, length }) => `${offset}-${offset + length}`)\n .join(',')\n }`,\n },\n signal,\n });\n\n if (!response.ok) {\n throw new Error('Error fetching data.');\n } else if (response.status === 206) {\n const { type, params } = parseContentType(response.getHeader('content-type'));\n if (type === 'multipart/byteranges') {\n const byteRanges = parseByteRanges(await response.getData(), params.boundary);\n this._fileSize = byteRanges[0].fileSize || null;\n return byteRanges;\n }\n\n const data = await response.getData();\n\n const { start, end, total } = parseContentRange(response.getHeader('content-range'));\n this._fileSize = total || null;\n const first = [{\n data,\n offset: start,\n length: end - start,\n }];\n\n if (slices.length > 1) {\n // we requested more than one slice, but got only the first\n // unfortunately, some HTTP Servers don't support multi-ranges\n // and return onyl the first\n\n // get the rest of the slices and fetch them iteratetively\n const others = await Promise.all(slices.slice(1).map((slice) => this.fetchSlice(slice, signal)));\n return first.concat(others);\n }\n return first;\n } else {\n if (!this.allowFullFile) {\n throw new Error('Server responded with full file');\n }\n const data = await response.getData();\n this._fileSize = data.byteLength;\n return [{\n data,\n offset: 0,\n length: data.byteLength,\n }];\n }\n }\n\n async fetchSlice(slice, signal) {\n const { offset, length } = slice;\n const response = await this.client.request({\n headers: {\n ...this.headers,\n Range: `bytes=${offset}-${offset + length}`,\n },\n signal,\n });\n\n // check the response was okay and if the server actually understands range requests\n if (!response.ok) {\n throw new Error('Error fetching data.');\n } else if (response.status === 206) {\n const data = await response.getData();\n\n const { total } = parseContentRange(response.getHeader('content-range'));\n this._fileSize = total || null;\n return {\n data,\n offset,\n length,\n };\n } else {\n if (!this.allowFullFile) {\n throw new Error('Server responded with full file');\n }\n\n const data = await response.getData();\n\n this._fileSize = data.byteLength;\n return {\n data,\n offset: 0,\n length: data.byteLength,\n };\n }\n }\n\n get fileSize() {\n return this._fileSize;\n }\n}\n\n\nfunction maybeWrapInBlockedSource(source, { blockSize, cacheSize }) {\n if (blockSize === null) {\n return source;\n }\n return new BlockedSource(source, { blockSize, cacheSize });\n}\n\nexport function makeFetchSource(url, { headers = {}, credentials, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n const client = new FetchClient(url, credentials);\n const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n return maybeWrapInBlockedSource(source, blockOptions);\n}\n\nexport function makeXHRSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n const client = new XHRClient(url);\n const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n return maybeWrapInBlockedSource(source, blockOptions);\n}\n\nexport function makeHttpSource(url, { headers = {}, maxRanges = 0, allowFullFile = false, ...blockOptions } = {}) {\n const client = new HttpClient(url);\n const source = new RemoteSource(client, headers, maxRanges, allowFullFile);\n return maybeWrapInBlockedSource(source, blockOptions);\n}\n\n/**\n *\n * @param {string} url\n * @param {object} options\n */\nexport function makeRemoteSource(url, { forceXHR = false, ...clientOptions } = {}) {\n\n if (typeof fetch === 'function' && !forceXHR) {\n return makeFetchSource(url, clientOptions);\n }\n if (typeof XMLHttpRequest !== 'undefined') {\n return makeXHRSource(url, clientOptions);\n }\n return makeHttpSource(url, clientOptions);\n}\n","import { BaseSource } from './basesource';\nimport { AbortError } from '../utils';\n\n\nclass ArrayBufferSource extends BaseSource {\n constructor(arrayBuffer) {\n super();\n this.arrayBuffer = arrayBuffer;\n }\n\n fetchSlice(slice, signal) {\n if (signal && signal.aborted) {\n throw new AbortError('Request aborted');\n }\n return this.arrayBuffer.slice(slice.offset, slice.offset + slice.length);\n }\n}\n\nexport function makeBufferSource(arrayBuffer) {\n return new ArrayBufferSource(arrayBuffer);\n}\n","import { BaseSource } from './basesource';\n\n\nclass FileReaderSource extends BaseSource {\n constructor(file) {\n super();\n this.file = file;\n }\n\n async fetchSlice(slice, signal) {\n return new Promise((resolve, reject) => {\n const blob = this.file.slice(slice.offset, slice.offset + slice.length);\n const reader = new FileReader();\n reader.onload = (event) => resolve(event.target.result);\n reader.onerror = reject;\n reader.onabort = reject;\n reader.readAsArrayBuffer(blob);\n\n if (signal) {\n signal.addEventListener('abort', () => reader.abort());\n }\n });\n }\n}\n\n/**\n * Create a new source from a given file/blob.\n * @param {Blob} file The file or blob to read from.\n * @returns The constructed source\n */\nexport function makeFileReaderSource(file) {\n return new FileReaderSource(file);\n}\n","/*\n Some parts of this file are based on UTIF.js,\n which was released under the MIT License.\n You can view that here:\n https://github.com/photopea/UTIF.js/blob/master/LICENSE\n*/\nimport { fieldTagNames, fieldTagTypes, fieldTypeNames, geoKeyNames } from './globals';\nimport { assign, endsWith, forEach, invert, times } from './utils';\n\nconst tagName2Code = invert(fieldTagNames);\nconst geoKeyName2Code = invert(geoKeyNames);\nconst name2code = {};\nassign(name2code, tagName2Code);\nassign(name2code, geoKeyName2Code);\nconst typeName2byte = invert(fieldTypeNames);\n\n// config variables\nconst numBytesInIfd = 1000;\n\nconst _binBE = {\n nextZero: (data, o) => {\n let oincr = o;\n while (data[oincr] !== 0) {\n oincr++;\n }\n return oincr;\n },\n readUshort: (buff, p) => {\n return (buff[p] << 8) | buff[p + 1];\n },\n readShort: (buff, p) => {\n const a = _binBE.ui8;\n a[0] = buff[p + 1];\n a[1] = buff[p + 0];\n return _binBE.i16[0];\n },\n readInt: (buff, p) => {\n const a = _binBE.ui8;\n a[0] = buff[p + 3];\n a[1] = buff[p + 2];\n a[2] = buff[p + 1];\n a[3] = buff[p + 0];\n return _binBE.i32[0];\n },\n readUint: (buff, p) => {\n const a = _binBE.ui8;\n a[0] = buff[p + 3];\n a[1] = buff[p + 2];\n a[2] = buff[p + 1];\n a[3] = buff[p + 0];\n return _binBE.ui32[0];\n },\n readASCII: (buff, p, l) => {\n return l.map((i) => String.fromCharCode(buff[p + i])).join('');\n },\n readFloat: (buff, p) => {\n const a = _binBE.ui8;\n times(4, (i) => {\n a[i] = buff[p + 3 - i];\n });\n return _binBE.fl32[0];\n },\n readDouble: (buff, p) => {\n const a = _binBE.ui8;\n times(8, (i) => {\n a[i] = buff[p + 7 - i];\n });\n return _binBE.fl64[0];\n },\n writeUshort: (buff, p, n) => {\n buff[p] = (n >> 8) & 255;\n buff[p + 1] = n & 255;\n },\n writeUint: (buff, p, n) => {\n buff[p] = (n >> 24) & 255;\n buff[p + 1] = (n >> 16) & 255;\n buff[p + 2] = (n >> 8) & 255;\n buff[p + 3] = (n >> 0) & 255;\n },\n writeASCII: (buff, p, s) => {\n times(s.length, (i) => {\n buff[p + i] = s.charCodeAt(i);\n });\n },\n ui8: new Uint8Array(8),\n};\n\n_binBE.fl64 = new Float64Array(_binBE.ui8.buffer);\n\n_binBE.writeDouble = (buff, p, n) => {\n _binBE.fl64[0] = n;\n times(8, (i) => {\n buff[p + i] = _binBE.ui8[7 - i];\n });\n};\n\n\nconst _writeIFD = (bin, data, _offset, ifd) => {\n let offset = _offset;\n\n const keys = Object.keys(ifd).filter((key) => {\n return key !== undefined && key !== null && key !== 'undefined';\n });\n\n bin.writeUshort(data, offset, keys.length);\n offset += 2;\n\n let eoff = offset + (12 * keys.length) + 4;\n\n for (const key of keys) {\n let tag = null;\n if (typeof key === 'number') {\n tag = key;\n } else if (typeof key === 'string') {\n tag = parseInt(key, 10);\n }\n\n const typeName = fieldTagTypes[tag];\n const typeNum = typeName2byte[typeName];\n\n if (typeName == null || typeName === undefined || typeof typeName === 'undefined') {\n throw new Error(`unknown type of tag: ${tag}`);\n }\n\n let val = ifd[key];\n\n if (typeof val === 'undefined') {\n throw new Error(`failed to get value for key ${key}`);\n }\n\n // ASCIIZ format with trailing 0 character\n // http://www.fileformat.info/format/tiff/corion.htm\n // https://stackoverflow.com/questions/7783044/whats-the-difference-between-asciiz-vs-ascii\n if (typeName === 'ASCII' && typeof val === 'string' && endsWith(val, '\\u0000') === false) {\n val += '\\u0000';\n }\n\n const num = val.length;\n\n bin.writeUshort(data, offset, tag);\n offset += 2;\n\n bin.writeUshort(data, offset, typeNum);\n offset += 2;\n\n bin.writeUint(data, offset, num);\n offset += 4;\n\n let dlen = [-1, 1, 1, 2, 4, 8, 0, 0, 0, 0, 0, 0, 8][typeNum] * num;\n let toff = offset;\n\n if (dlen > 4) {\n bin.writeUint(data, offset, eoff);\n toff = eoff;\n }\n\n if (typeName === 'ASCII') {\n bin.writeASCII(data, toff, val);\n } else if (typeName === 'SHORT') {\n times(num, (i) => {\n bin.writeUshort(data, toff + (2 * i), val[i]);\n });\n } else if (typeName === 'LONG') {\n times(num, (i) => {\n bin.writeUint(data, toff + (4 * i), val[i]);\n });\n } else if (typeName === 'RATIONAL') {\n times(num, (i) => {\n bin.writeUint(data, toff + (8 * i), Math.round(val[i] * 10000));\n bin.writeUint(data, toff + (8 * i) + 4, 10000);\n });\n } else if (typeName === 'DOUBLE') {\n times(num, (i) => {\n bin.writeDouble(data, toff + (8 * i), val[i]);\n });\n }\n\n if (dlen > 4) {\n dlen += (dlen & 1);\n eoff += dlen;\n }\n\n offset += 4;\n }\n\n return [offset, eoff];\n};\n\nconst encodeIfds = (ifds) => {\n const data = new Uint8Array(numBytesInIfd);\n let offset = 4;\n const bin = _binBE;\n\n // set big-endian byte-order\n // https://en.wikipedia.org/wiki/TIFF#Byte_order\n data[0] = 77;\n data[1] = 77;\n\n // set format-version number\n // https://en.wikipedia.org/wiki/TIFF#Byte_order\n data[3] = 42;\n\n let ifdo = 8;\n\n bin.writeUint(data, offset, ifdo);\n\n offset += 4;\n\n ifds.forEach((ifd, i) => {\n const noffs = _writeIFD(bin, data, ifdo, ifd);\n ifdo = noffs[1];\n if (i < ifds.length - 1) {\n bin.writeUint(data, noffs[0], ifdo);\n }\n });\n\n if (data.slice) {\n return data.slice(0, ifdo).buffer;\n }\n\n // node hasn't implemented slice on Uint8Array yet\n const result = new Uint8Array(ifdo);\n for (let i = 0; i < ifdo; i++) {\n result[i] = data[i];\n }\n return result.buffer;\n};\n\nconst encodeImage = (values, width, height, metadata) => {\n if (height === undefined || height === null) {\n throw new Error(`you passed into encodeImage a width of type ${height}`);\n }\n\n if (width === undefined || width === null) {\n throw new Error(`you passed into encodeImage a width of type ${width}`);\n }\n\n const ifd = {\n 256: [width], // ImageWidth\n 257: [height], // ImageLength\n 273: [numBytesInIfd], // strips offset\n 278: [height], // RowsPerStrip\n 305: 'geotiff.js', // no array for ASCII(Z)\n };\n\n if (metadata) {\n for (const i in metadata) {\n if (metadata.hasOwnProperty(i)) {\n ifd[i] = metadata[i];\n }\n }\n }\n\n const prfx = new Uint8Array(encodeIfds([ifd]));\n\n const img = new Uint8Array(values);\n\n const samplesPerPixel = ifd[277];\n\n const data = new Uint8Array(numBytesInIfd + (width * height * samplesPerPixel));\n times(prfx.length, (i) => {\n data[i] = prfx[i];\n });\n forEach(img, (value, i) => {\n data[numBytesInIfd + i] = value;\n });\n\n return data.buffer;\n};\n\nconst convertToTids = (input) => {\n const result = {};\n for (const key in input) {\n if (key !== 'StripOffsets') {\n if (!name2code[key]) {\n console.error(key, 'not in name2code:', Object.keys(name2code));\n }\n result[name2code[key]] = input[key];\n }\n }\n return result;\n};\n\nconst toArray = (input) => {\n if (Array.isArray(input)) {\n return input;\n }\n return [input];\n};\n\nconst metadataDefaults = [\n ['Compression', 1], // no compression\n ['PlanarConfiguration', 1],\n ['XPosition', 0],\n ['YPosition', 0],\n ['ResolutionUnit', 1], // Code 1 for actual pixel count or 2 for pixels per inch.\n ['ExtraSamples', 0], // should this be an array??\n ['GeoAsciiParams', 'WGS 84\\u0000'],\n ['ModelTiepoint', [0, 0, 0, -180, 90, 0]], // raster fits whole globe\n ['GTModelTypeGeoKey', 2],\n ['GTRasterTypeGeoKey', 1],\n ['GeographicTypeGeoKey', 4326],\n ['GeogCitationGeoKey', 'WGS 84'],\n];\n\nexport function writeGeotiff(data, metadata) {\n const isFlattened = typeof data[0] === 'number';\n\n let height;\n let numBands;\n let width;\n let flattenedValues;\n\n if (isFlattened) {\n height = metadata.height || metadata.ImageLength;\n width = metadata.width || metadata.ImageWidth;\n numBands = data.length / (height * width);\n flattenedValues = data;\n } else {\n numBands = data.length;\n height = data[0].length;\n width = data[0][0].length;\n flattenedValues = [];\n times(height, (rowIndex) => {\n times(width, (columnIndex) => {\n times(numBands, (bandIndex) => {\n flattenedValues.push(data[bandIndex][rowIndex][columnIndex]);\n });\n });\n });\n }\n\n metadata.ImageLength = height;\n delete metadata.height;\n metadata.ImageWidth = width;\n delete metadata.width;\n\n // consult https://www.loc.gov/preservation/digital/formats/content/tiff_tags.shtml\n\n if (!metadata.BitsPerSample) {\n metadata.BitsPerSample = times(numBands, () => 8);\n }\n\n metadataDefaults.forEach((tag) => {\n const key = tag[0];\n if (!metadata[key]) {\n const value = tag[1];\n metadata[key] = value;\n }\n });\n\n // The color space of the image data.\n // 1=black is zero and 2=RGB.\n if (!metadata.PhotometricInterpretation) {\n metadata.PhotometricInterpretation = metadata.BitsPerSample.length === 3 ? 2 : 1;\n }\n\n // The number of components per pixel.\n if (!metadata.SamplesPerPixel) {\n metadata.SamplesPerPixel = [numBands];\n }\n\n if (!metadata.StripByteCounts) {\n // we are only writing one strip\n metadata.StripByteCounts = [numBands * height * width];\n }\n\n if (!metadata.ModelPixelScale) {\n // assumes raster takes up exactly the whole globe\n metadata.ModelPixelScale = [360 / width, 180 / height, 0];\n }\n\n if (!metadata.SampleFormat) {\n metadata.SampleFormat = times(numBands, () => 1);\n }\n\n\n const geoKeys = Object.keys(metadata)\n .filter((key) => endsWith(key, 'GeoKey'))\n .sort((a, b) => name2code[a] - name2code[b]);\n\n if (!metadata.GeoKeyDirectory) {\n const NumberOfKeys = geoKeys.length;\n\n const GeoKeyDirectory = [1, 1, 0, NumberOfKeys];\n geoKeys.forEach((geoKey) => {\n const KeyID = Number(name2code[geoKey]);\n GeoKeyDirectory.push(KeyID);\n\n let Count;\n let TIFFTagLocation;\n let valueOffset;\n if (fieldTagTypes[KeyID] === 'SHORT') {\n Count = 1;\n TIFFTagLocation = 0;\n valueOffset = metadata[geoKey];\n } else if (geoKey === 'GeogCitationGeoKey') {\n Count = metadata.GeoAsciiParams.length;\n TIFFTagLocation = Number(name2code.GeoAsciiParams);\n valueOffset = 0;\n } else {\n console.log(`[geotiff.js] couldn't get TIFFTagLocation for ${geoKey}`);\n }\n GeoKeyDirectory.push(TIFFTagLocation);\n GeoKeyDirectory.push(Count);\n GeoKeyDirectory.push(valueOffset);\n });\n metadata.GeoKeyDirectory = GeoKeyDirectory;\n }\n\n // delete GeoKeys from metadata, because stored in GeoKeyDirectory tag\n for (const geoKey in geoKeys) {\n if (geoKeys.hasOwnProperty(geoKey)) {\n delete metadata[geoKey];\n }\n }\n\n [\n 'Compression',\n 'ExtraSamples',\n 'GeographicTypeGeoKey',\n 'GTModelTypeGeoKey',\n 'GTRasterTypeGeoKey',\n 'ImageLength', // synonym of ImageHeight\n 'ImageWidth',\n 'PhotometricInterpretation',\n 'PlanarConfiguration',\n 'ResolutionUnit',\n 'SamplesPerPixel',\n 'XPosition',\n 'YPosition',\n ].forEach((name) => {\n if (metadata[name]) {\n metadata[name] = toArray(metadata[name]);\n }\n });\n\n\n const encodedMetadata = convertToTids(metadata);\n\n const outputImage = encodeImage(flattenedValues, width, height, encodedMetadata);\n\n return outputImage;\n}\n","import GeoTIFFImage from './geotiffimage';\nimport DataView64 from './dataview64';\nimport DataSlice from './dataslice';\nimport Pool from './pool';\n\nimport { makeRemoteSource } from './source/remote';\nimport { makeBufferSource } from './source/arraybuffer';\nimport { makeFileReaderSource } from './source/filereader';\nimport { makeFileSource } from './source/file';\n\nimport { fieldTypes, fieldTagNames, arrayFields, geoKeyNames } from './globals';\nimport { writeGeotiff } from './geotiffwriter';\nimport * as globals from './globals';\nimport * as rgb from './rgb';\nimport { getDecoder } from './compression';\nimport { setLogger } from './logging';\n\nexport { globals };\nexport { rgb };\nexport { getDecoder };\nexport { setLogger };\n\nfunction getFieldTypeLength(fieldType) {\n switch (fieldType) {\n case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.SBYTE: case fieldTypes.UNDEFINED:\n return 1;\n case fieldTypes.SHORT: case fieldTypes.SSHORT:\n return 2;\n case fieldTypes.LONG: case fieldTypes.SLONG: case fieldTypes.FLOAT: case fieldTypes.IFD:\n return 4;\n case fieldTypes.RATIONAL: case fieldTypes.SRATIONAL: case fieldTypes.DOUBLE:\n case fieldTypes.LONG8: case fieldTypes.SLONG8: case fieldTypes.IFD8:\n return 8;\n default:\n throw new RangeError(`Invalid field type: ${fieldType}`);\n }\n}\n\nfunction parseGeoKeyDirectory(fileDirectory) {\n const rawGeoKeyDirectory = fileDirectory.GeoKeyDirectory;\n if (!rawGeoKeyDirectory) {\n return null;\n }\n\n const geoKeyDirectory = {};\n for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {\n const key = geoKeyNames[rawGeoKeyDirectory[i]];\n const location = (rawGeoKeyDirectory[i + 1])\n ? (fieldTagNames[rawGeoKeyDirectory[i + 1]]) : null;\n const count = rawGeoKeyDirectory[i + 2];\n const offset = rawGeoKeyDirectory[i + 3];\n\n let value = null;\n if (!location) {\n value = offset;\n } else {\n value = fileDirectory[location];\n if (typeof value === 'undefined' || value === null) {\n throw new Error(`Could not get value of geoKey '${key}'.`);\n } else if (typeof value === 'string') {\n value = value.substring(offset, offset + count - 1);\n } else if (value.subarray) {\n value = value.subarray(offset, offset + count);\n if (count === 1) {\n value = value[0];\n }\n }\n }\n geoKeyDirectory[key] = value;\n }\n return geoKeyDirectory;\n}\n\nfunction getValues(dataSlice, fieldType, count, offset) {\n let values = null;\n let readMethod = null;\n const fieldTypeLength = getFieldTypeLength(fieldType);\n\n switch (fieldType) {\n case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.UNDEFINED:\n values = new Uint8Array(count); readMethod = dataSlice.readUint8;\n break;\n case fieldTypes.SBYTE:\n values = new Int8Array(count); readMethod = dataSlice.readInt8;\n break;\n case fieldTypes.SHORT:\n values = new Uint16Array(count); readMethod = dataSlice.readUint16;\n break;\n case fieldTypes.SSHORT:\n values = new Int16Array(count); readMethod = dataSlice.readInt16;\n break;\n case fieldTypes.LONG: case fieldTypes.IFD:\n values = new Uint32Array(count); readMethod = dataSlice.readUint32;\n break;\n case fieldTypes.SLONG:\n values = new Int32Array(count); readMethod = dataSlice.readInt32;\n break;\n case fieldTypes.LONG8: case fieldTypes.IFD8:\n values = new Array(count); readMethod = dataSlice.readUint64;\n break;\n case fieldTypes.SLONG8:\n values = new Array(count); readMethod = dataSlice.readInt64;\n break;\n case fieldTypes.RATIONAL:\n values = new Uint32Array(count * 2); readMethod = dataSlice.readUint32;\n break;\n case fieldTypes.SRATIONAL:\n values = new Int32Array(count * 2); readMethod = dataSlice.readInt32;\n break;\n case fieldTypes.FLOAT:\n values = new Float32Array(count); readMethod = dataSlice.readFloat32;\n break;\n case fieldTypes.DOUBLE:\n values = new Float64Array(count); readMethod = dataSlice.readFloat64;\n break;\n default:\n throw new RangeError(`Invalid field type: ${fieldType}`);\n }\n\n // normal fields\n if (!(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n for (let i = 0; i < count; ++i) {\n values[i] = readMethod.call(\n dataSlice, offset + (i * fieldTypeLength),\n );\n }\n } else { // RATIONAL or SRATIONAL\n for (let i = 0; i < count; i += 2) {\n values[i] = readMethod.call(\n dataSlice, offset + (i * fieldTypeLength),\n );\n values[i + 1] = readMethod.call(\n dataSlice, offset + ((i * fieldTypeLength) + 4),\n );\n }\n }\n\n if (fieldType === fieldTypes.ASCII) {\n return new TextDecoder('utf-8').decode(values);\n }\n return values;\n}\n\n/**\n * Data class to store the parsed file directory, geo key directory and\n * offset to the next IFD\n */\nclass ImageFileDirectory {\n constructor(fileDirectory, geoKeyDirectory, nextIFDByteOffset) {\n this.fileDirectory = fileDirectory;\n this.geoKeyDirectory = geoKeyDirectory;\n this.nextIFDByteOffset = nextIFDByteOffset;\n }\n}\n\n/**\n * Error class for cases when an IFD index was requested, that does not exist\n * in the file.\n */\nclass GeoTIFFImageIndexError extends Error {\n constructor(index) {\n super(`No image at index ${index}`);\n this.index = index;\n }\n}\n\n\nclass GeoTIFFBase {\n /**\n * (experimental) Reads raster data from the best fitting image. This function uses\n * the image with the lowest resolution that is still a higher resolution than the\n * requested resolution.\n * When specified, the `bbox` option is translated to the `window` option and the\n * `resX` and `resY` to `width` and `height` respectively.\n * Then, the [readRasters]{@link GeoTIFFImage#readRasters} method of the selected\n * image is called and the result returned.\n * @see GeoTIFFImage.readRasters\n * @param {Object} [options={}] optional parameters\n * @param {Array} [options.window=whole image] the subset to read data from.\n * @param {Array} [options.bbox=whole image] the subset to read data from in\n * geographical coordinates.\n * @param {Array} [options.samples=all samples] the selection of samples to read from.\n * @param {Boolean} [options.interleave=false] whether the data shall be read\n * in one single array or separate\n * arrays.\n * @param {Number} [options.pool=null] The optional decoder pool to use.\n * @param {Number} [options.width] The desired width of the output. When the width is not the\n * same as the images, resampling will be performed.\n * @param {Number} [options.height] The desired height of the output. When the width is not the\n * same as the images, resampling will be performed.\n * @param {String} [options.resampleMethod='nearest'] The desired resampling method.\n * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @param {Number|Number[]} [options.fillValue] The value to use for parts of the image\n * outside of the images extent. When multiple\n * samples are requested, an array of fill values\n * can be passed.\n * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise\n */\n async readRasters(options = {}) {\n const { window: imageWindow, width, height } = options;\n let { resX, resY, bbox } = options;\n\n const firstImage = await this.getImage();\n let usedImage = firstImage;\n const imageCount = await this.getImageCount();\n const imgBBox = firstImage.getBoundingBox();\n\n if (imageWindow && bbox) {\n throw new Error('Both \"bbox\" and \"window\" passed.');\n }\n\n // if width/height is passed, transform it to resolution\n if (width || height) {\n // if we have an image window (pixel coordinates), transform it to a BBox\n // using the origin/resolution of the first image.\n if (imageWindow) {\n const [oX, oY] = firstImage.getOrigin();\n const [rX, rY] = firstImage.getResolution();\n\n bbox = [\n oX + (imageWindow[0] * rX),\n oY + (imageWindow[1] * rY),\n oX + (imageWindow[2] * rX),\n oY + (imageWindow[3] * rY),\n ];\n }\n\n // if we have a bbox (or calculated one)\n\n const usedBBox = bbox || imgBBox;\n\n if (width) {\n if (resX) {\n throw new Error('Both width and resX passed');\n }\n resX = (usedBBox[2] - usedBBox[0]) / width;\n }\n if (height) {\n if (resY) {\n throw new Error('Both width and resY passed');\n }\n resY = (usedBBox[3] - usedBBox[1]) / height;\n }\n }\n\n // if resolution is set or calculated, try to get the image with the worst acceptable resolution\n if (resX || resY) {\n const allImages = [];\n for (let i = 0; i < imageCount; ++i) {\n const image = await this.getImage(i);\n const { SubfileType: subfileType, NewSubfileType: newSubfileType } = image.fileDirectory;\n if (i === 0 || subfileType === 2 || newSubfileType & 1) {\n allImages.push(image);\n }\n }\n\n allImages.sort((a, b) => a.getWidth() - b.getWidth());\n for (let i = 0; i < allImages.length; ++i) {\n const image = allImages[i];\n const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();\n const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();\n\n usedImage = image;\n if ((resX && resX > imgResX) || (resY && resY > imgResY)) {\n break;\n }\n }\n }\n\n let wnd = imageWindow;\n if (bbox) {\n const [oX, oY] = firstImage.getOrigin();\n const [imageResX, imageResY] = usedImage.getResolution(firstImage);\n\n wnd = [\n Math.round((bbox[0] - oX) / imageResX),\n Math.round((bbox[1] - oY) / imageResY),\n Math.round((bbox[2] - oX) / imageResX),\n Math.round((bbox[3] - oY) / imageResY),\n ];\n wnd = [\n Math.min(wnd[0], wnd[2]),\n Math.min(wnd[1], wnd[3]),\n Math.max(wnd[0], wnd[2]),\n Math.max(wnd[1], wnd[3]),\n ];\n }\n\n return usedImage.readRasters({ ...options, window: wnd });\n }\n}\n\n\n/**\n * The abstraction for a whole GeoTIFF file.\n * @augments GeoTIFFBase\n */\nclass GeoTIFF extends GeoTIFFBase {\n /**\n * @constructor\n * @param {Source} source The datasource to read from.\n * @param {Boolean} littleEndian Whether the image uses little endian.\n * @param {Boolean} bigTiff Whether the image uses bigTIFF conventions.\n * @param {Number} firstIFDOffset The numeric byte-offset from the start of the image\n * to the first IFD.\n * @param {Object} [options] further options.\n * @param {Boolean} [options.cache=false] whether or not decoded tiles shall be cached.\n */\n constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {\n super();\n this.source = source;\n this.littleEndian = littleEndian;\n this.bigTiff = bigTiff;\n this.firstIFDOffset = firstIFDOffset;\n this.cache = options.cache || false;\n this.ifdRequests = [];\n this.ghostValues = null;\n }\n\n async getSlice(offset, size) {\n const fallbackSize = this.bigTiff ? 4048 : 1024;\n return new DataSlice(\n (await this.source.fetch([{\n offset,\n length: typeof size !== 'undefined' ? size : fallbackSize,\n }]))[0],\n offset,\n this.littleEndian,\n this.bigTiff,\n );\n }\n\n /**\n * Instructs to parse an image file directory at the given file offset.\n * As there is no way to ensure that a location is indeed the start of an IFD,\n * this function must be called with caution (e.g only using the IFD offsets from\n * the headers or other IFDs).\n * @param {number} offset the offset to parse the IFD at\n * @returns {ImageFileDirectory} the parsed IFD\n */\n async parseFileDirectoryAt(offset) {\n const entrySize = this.bigTiff ? 20 : 12;\n const offsetSize = this.bigTiff ? 8 : 2;\n\n let dataSlice = await this.getSlice(offset);\n const numDirEntries = this.bigTiff ?\n dataSlice.readUint64(offset) :\n dataSlice.readUint16(offset);\n\n // if the slice does not cover the whole IFD, request a bigger slice, where the\n // whole IFD fits: num of entries + n x tag length + offset to next IFD\n const byteSize = (numDirEntries * entrySize) + (this.bigTiff ? 16 : 6);\n if (!dataSlice.covers(offset, byteSize)) {\n dataSlice = await this.getSlice(offset, byteSize);\n }\n\n const fileDirectory = {};\n\n // loop over the IFD and create a file directory object\n let i = offset + (this.bigTiff ? 8 : 2);\n for (let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount) {\n const fieldTag = dataSlice.readUint16(i);\n const fieldType = dataSlice.readUint16(i + 2);\n const typeCount = this.bigTiff ?\n dataSlice.readUint64(i + 4) :\n dataSlice.readUint32(i + 4);\n\n let fieldValues;\n let value;\n const fieldTypeLength = getFieldTypeLength(fieldType);\n const valueOffset = i + (this.bigTiff ? 12 : 8);\n\n // check whether the value is directly encoded in the tag or refers to a\n // different external byte range\n if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {\n fieldValues = getValues(dataSlice, fieldType, typeCount, valueOffset);\n } else {\n // resolve the reference to the actual byte range\n const actualOffset = dataSlice.readOffset(valueOffset);\n const length = getFieldTypeLength(fieldType) * typeCount;\n\n // check, whether we actually cover the referenced byte range; if not,\n // request a new slice of bytes to read from it\n if (dataSlice.covers(actualOffset, length)) {\n fieldValues = getValues(dataSlice, fieldType, typeCount, actualOffset);\n } else {\n const fieldDataSlice = await this.getSlice(actualOffset, length);\n fieldValues = getValues(fieldDataSlice, fieldType, typeCount, actualOffset);\n }\n }\n\n // unpack single values from the array\n if (typeCount === 1 && arrayFields.indexOf(fieldTag) === -1 &&\n !(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {\n value = fieldValues[0];\n } else {\n value = fieldValues;\n }\n\n // write the tags value to the file directly\n fileDirectory[fieldTagNames[fieldTag]] = value;\n }\n const geoKeyDirectory = parseGeoKeyDirectory(fileDirectory);\n const nextIFDByteOffset = dataSlice.readOffset(\n offset + offsetSize + (entrySize * numDirEntries),\n );\n\n return new ImageFileDirectory(\n fileDirectory,\n geoKeyDirectory,\n nextIFDByteOffset,\n );\n }\n\n async requestIFD(index) {\n // see if we already have that IFD index requested.\n if (this.ifdRequests[index]) {\n // attach to an already requested IFD\n return this.ifdRequests[index];\n } else if (index === 0) {\n // special case for index 0\n this.ifdRequests[index] = this.parseFileDirectoryAt(this.firstIFDOffset);\n return this.ifdRequests[index];\n } else if (!this.ifdRequests[index - 1]) {\n // if the previous IFD was not yet loaded, load that one first\n // this is the recursive call.\n try {\n this.ifdRequests[index - 1] = this.requestIFD(index - 1);\n } catch (e) {\n // if the previous one already was an index error, rethrow\n // with the current index\n if (e instanceof GeoTIFFImageIndexError) {\n throw new GeoTIFFImageIndexError(index);\n }\n // rethrow anything else\n throw e;\n }\n }\n // if the previous IFD was loaded, we can finally fetch the one we are interested in.\n // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed\n this.ifdRequests[index] = (async () => {\n const previousIfd = await this.ifdRequests[index - 1];\n if (previousIfd.nextIFDByteOffset === 0) {\n throw new GeoTIFFImageIndexError(index);\n }\n return this.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);\n })();\n return this.ifdRequests[index];\n }\n\n /**\n * Get the n-th internal subfile of an image. By default, the first is returned.\n *\n * @param {Number} [index=0] the index of the image to return.\n * @returns {GeoTIFFImage} the image at the given index\n */\n async getImage(index = 0) {\n const ifd = await this.requestIFD(index);\n return new GeoTIFFImage(\n ifd.fileDirectory, ifd.geoKeyDirectory,\n this.dataView, this.littleEndian, this.cache, this.source,\n );\n }\n\n /**\n * Returns the count of the internal subfiles.\n *\n * @returns {Number} the number of internal subfile images\n */\n async getImageCount() {\n let index = 0;\n // loop until we run out of IFDs\n let hasNext = true;\n while (hasNext) {\n try {\n await this.requestIFD(index);\n ++index;\n } catch (e) {\n if (e instanceof GeoTIFFImageIndexError) {\n hasNext = false;\n } else {\n throw e;\n }\n }\n }\n return index;\n }\n\n /**\n * Get the values of the COG ghost area as a parsed map.\n * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference\n * @returns {Object} the parsed ghost area or null, if no such area was found\n */\n async getGhostValues() {\n const offset = this.bigTiff ? 16 : 8;\n if (this.ghostValues) {\n return this.ghostValues;\n }\n const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';\n const heuristicAreaSize = detectionString.length + 100;\n let slice = await this.getSlice(offset, heuristicAreaSize);\n if (detectionString === getValues(slice, fieldTypes.ASCII, detectionString.length, offset)) {\n const valuesString = getValues(slice, fieldTypes.ASCII, heuristicAreaSize, offset);\n const firstLine = valuesString.split('\\n')[0];\n const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;\n if (metadataSize > heuristicAreaSize) {\n slice = await this.getSlice(offset, metadataSize);\n }\n const fullString = getValues(slice, fieldTypes.ASCII, metadataSize, offset);\n this.ghostValues = {};\n fullString\n .split('\\n')\n .filter(line => line.length > 0)\n .map(line => line.split('='))\n .forEach(([key, value]) => {\n this.ghostValues[key] = value;\n });\n }\n return this.ghostValues;\n }\n\n /**\n * Parse a (Geo)TIFF file from the given source.\n *\n * @param {source~Source} source The source of data to parse from.\n * @param {object} options Additional options.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n */\n static async fromSource(source, options, signal) {\n const headerData = (await source.fetch([{ offset: 0, length: 1024 }], signal))[0];\n const dataView = new DataView64(headerData);\n\n const BOM = dataView.getUint16(0, 0);\n let littleEndian;\n if (BOM === 0x4949) {\n littleEndian = true;\n } else if (BOM === 0x4D4D) {\n littleEndian = false;\n } else {\n throw new TypeError('Invalid byte order value.');\n }\n\n const magicNumber = dataView.getUint16(2, littleEndian);\n let bigTiff;\n if (magicNumber === 42) {\n bigTiff = false;\n } else if (magicNumber === 43) {\n bigTiff = true;\n const offsetByteSize = dataView.getUint16(4, littleEndian);\n if (offsetByteSize !== 8) {\n throw new Error('Unsupported offset byte-size.');\n }\n } else {\n throw new TypeError('Invalid magic number.');\n }\n\n const firstIFDOffset = bigTiff\n ? dataView.getUint64(8, littleEndian)\n : dataView.getUint32(4, littleEndian);\n return new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);\n }\n\n /**\n * Closes the underlying file buffer\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n */\n close() {\n if (typeof this.source.close === 'function') {\n return this.source.close();\n }\n return false;\n }\n}\n\nexport { GeoTIFF };\nexport default GeoTIFF;\n\n/**\n * Wrapper for GeoTIFF files that have external overviews.\n * @augments GeoTIFFBase\n */\nclass MultiGeoTIFF extends GeoTIFFBase {\n /**\n * Construct a new MultiGeoTIFF from a main and several overview files.\n * @param {GeoTIFF} mainFile The main GeoTIFF file.\n * @param {GeoTIFF[]} overviewFiles An array of overview files.\n */\n constructor(mainFile, overviewFiles) {\n super();\n this.mainFile = mainFile;\n this.overviewFiles = overviewFiles;\n this.imageFiles = [mainFile].concat(overviewFiles);\n\n this.fileDirectoriesPerFile = null;\n this.fileDirectoriesPerFileParsing = null;\n this.imageCount = null;\n }\n\n async parseFileDirectoriesPerFile() {\n const requests = [this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]\n .concat(this.overviewFiles.map((file) => file.parseFileDirectoryAt(file.firstIFDOffset)));\n\n this.fileDirectoriesPerFile = await Promise.all(requests);\n return this.fileDirectoriesPerFile;\n }\n\n /**\n * Get the n-th internal subfile of an image. By default, the first is returned.\n *\n * @param {Number} [index=0] the index of the image to return.\n * @returns {GeoTIFFImage} the image at the given index\n */\n async getImage(index = 0) {\n await this.getImageCount();\n await this.parseFileDirectoriesPerFile();\n let visited = 0;\n let relativeIndex = 0;\n for (let i = 0; i < this.imageFiles.length; i++) {\n const imageFile = this.imageFiles[i];\n for (let ii = 0; ii < this.imageCounts[i]; ii++) {\n if (index === visited) {\n const ifd = await imageFile.requestIFD(relativeIndex);\n return new GeoTIFFImage(\n ifd.fileDirectory, ifd.geoKeyDirectory,\n imageFile.dataView, imageFile.littleEndian, imageFile.cache, imageFile.source,\n );\n }\n visited++;\n relativeIndex++;\n }\n relativeIndex = 0;\n }\n\n throw new RangeError('Invalid image index');\n }\n\n /**\n * Returns the count of the internal subfiles.\n *\n * @returns {Number} the number of internal subfile images\n */\n async getImageCount() {\n if (this.imageCount !== null) {\n return this.imageCount;\n }\n const requests = [this.mainFile.getImageCount()]\n .concat(this.overviewFiles.map((file) => file.getImageCount()));\n this.imageCounts = await Promise.all(requests);\n this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);\n return this.imageCount;\n }\n}\n\nexport { MultiGeoTIFF };\n\n/**\n * Creates a new GeoTIFF from a remote URL.\n * @param {string} url The URL to access the image from\n * @param {object} [options] Additional options to pass to the source.\n * See {@link makeRemoteSource} for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromUrl(url, options = {}, signal) {\n return GeoTIFF.fromSource(makeRemoteSource(url, options), signal);\n}\n\n/**\n * Construct a new GeoTIFF from an\n * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.\n * @param {ArrayBuffer} arrayBuffer The data to read the file from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromArrayBuffer(arrayBuffer, signal) {\n return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), signal);\n}\n\n/**\n * Construct a GeoTIFF from a local file path. This uses the node\n * [filesystem API]{@link https://nodejs.org/api/fs.html} and is\n * not available on browsers.\n *\n * N.B. After the GeoTIFF has been completely processed it needs\n * to be closed but only if it has been constructed from a file.\n * @param {string} path The file path to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromFile(path, signal) {\n return GeoTIFF.fromSource(makeFileSource(path), signal);\n}\n\n/**\n * Construct a GeoTIFF from an HTML\n * [Blob]{@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} or\n * [File]{@link https://developer.mozilla.org/en-US/docs/Web/API/File}\n * object.\n * @param {Blob|File} blob The Blob or File object to read from.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.\n */\nexport async function fromBlob(blob, signal) {\n return GeoTIFF.fromSource(makeFileReaderSource(blob), signal);\n}\n\n/**\n * Construct a MultiGeoTIFF from the given URLs.\n * @param {string} mainUrl The URL for the main file.\n * @param {string[]} overviewUrls An array of URLs for the overview images.\n * @param {object} [options] Additional options to pass to the source.\n * See [makeRemoteSource]{@link module:source.makeRemoteSource}\n * for details.\n * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is\n * to be aborted\n * @returns {Promise.<MultiGeoTIFF>} The resulting MultiGeoTIFF file.\n */\nexport async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) {\n const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, options), signal);\n const overviewFiles = await Promise.all(\n overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, options))),\n );\n\n return new MultiGeoTIFF(mainFile, overviewFiles);\n}\n\n/**\n * Main creating function for GeoTIFF files.\n * @param {(Array)} array of pixel values\n * @returns {metadata} metadata\n */\nexport async function writeArrayBuffer(values, metadata) {\n return writeGeotiff(values, metadata);\n}\n\nexport { Pool };\n","import { COORDINATE_SYSTEM, Layer, project32, picking, CompositeLayer, LayerExtension, OrthographicView, Controller, OrbitView } from '@deck.gl/core';\nimport { Matrix4 } from 'math.gl';\nimport GL from '@luma.gl/constants';\nimport { TileLayer } from '@deck.gl/geo-layers';\nimport { Model, Geometry, Texture2D, isWebGL2, Texture3D } from '@luma.gl/core';\nimport { ProgramManager } from '@luma.gl/engine';\nimport { hasFeature, FEATURES } from '@luma.gl/webgl';\nimport { BitmapLayer as BitmapLayer$1, PolygonLayer, LineLayer, TextLayer } from '@deck.gl/layers';\nimport quickselect from 'quickselect';\nimport { Plane } from '@math.gl/culling';\nimport { PureComponent, useMemo } from 'react';\nimport DeckGL from '@deck.gl/react';\nimport equal from 'fast-deep-equal';\nimport { jsxDEV } from 'react/jsx-dev-runtime';\nimport { fromUrl, fromBlob } from 'geotiff';\nimport parser from 'fast-xml-parser';\nimport { KeyError, openGroup, BoundsCheckError, slice, HTTPStore } from 'zarr';\n\nvar fs$6 = \"#define SHADER_NAME xr-layer-fragment-shader\\nprecision highp float;precision highp int;precision highp SAMPLER_TYPE;\\n#define GLSLIFY 1\\nuniform SAMPLER_TYPE channel0;uniform SAMPLER_TYPE channel1;uniform SAMPLER_TYPE channel2;uniform SAMPLER_TYPE channel3;uniform SAMPLER_TYPE channel4;uniform SAMPLER_TYPE channel5;in vec2 vTexCoord;uniform vec2 contrastLimits[6];void main(){float intensity0=float(texture(channel0,vTexCoord).r);DECKGL_PROCESS_INTENSITY(intensity0,contrastLimits[0],0);float intensity1=float(texture(channel1,vTexCoord).r);DECKGL_PROCESS_INTENSITY(intensity1,contrastLimits[1],1);float intensity2=float(texture(channel2,vTexCoord).r);DECKGL_PROCESS_INTENSITY(intensity2,contrastLimits[2],2);float intensity3=float(texture(channel3,vTexCoord).r);DECKGL_PROCESS_INTENSITY(intensity3,contrastLimits[3],3);float intensity4=float(texture(channel4,vTexCoord).r);DECKGL_PROCESS_INTENSITY(intensity4,contrastLimits[4],4);float intensity5=float(texture(channel5,vTexCoord).r);DECKGL_PROCESS_INTENSITY(intensity5,contrastLimits[5],5);DECKGL_MUTATE_COLOR(gl_FragColor,intensity0,intensity1,intensity2,intensity3,intensity4,intensity5,vTexCoord);geometry.uv=vTexCoord;DECKGL_FILTER_COLOR(gl_FragColor,geometry);}\"; // eslint-disable-line\n\nvar vs$1 = \"#define GLSLIFY 1\\n#define SHADER_NAME xr-layer-vertex-shader\\nattribute vec2 texCoords;attribute vec3 positions;attribute vec3 positions64Low;attribute vec3 instancePickingColors;varying vec2 vTexCoord;void main(void){geometry.worldPosition=positions;geometry.uv=texCoords;geometry.pickingColor=instancePickingColors;gl_Position=project_position_to_clipspace(positions,positions64Low,vec3(0.),geometry.position);DECKGL_FILTER_GL_POSITION(gl_Position,geometry);vTexCoord=texCoords;vec4 color=vec4(0.);DECKGL_FILTER_COLOR(color,geometry);}\"; // eslint-disable-line\n\nvar fs$5 = \"#define GLSLIFY 1\\nfloat apply_contrast_limits(float intensity,vec2 contrastLimits){return max(0.,(intensity-contrastLimits[0])/max(0.0005,(contrastLimits[1]-contrastLimits[0])));}\"; // eslint-disable-line\n\nvar channels$1 = {\n name: 'channel-intensity-module',\n defines: {\n SAMPLER_TYPE: 'usampler2D',\n COLORMAP_FUNCTION: ''\n },\n fs: fs$5\n};\n\nconst MAX_COLOR_INTENSITY = 255;\nconst DEFAULT_COLOR_OFF = [0, 0, 0];\nconst MAX_CHANNELS = 6;\nconst DEFAULT_FONT_FAMILY = \"-apple-system, 'Helvetica Neue', Arial, sans-serif\";\nconst DTYPE_VALUES = {\n Uint8: {\n format: GL.R8UI,\n dataFormat: GL.RED_INTEGER,\n type: GL.UNSIGNED_BYTE,\n max: 2 ** 8 - 1,\n sampler: \"usampler2D\"\n },\n Uint16: {\n format: GL.R16UI,\n dataFormat: GL.RED_INTEGER,\n type: GL.UNSIGNED_SHORT,\n max: 2 ** 16 - 1,\n sampler: \"usampler2D\"\n },\n Uint32: {\n format: GL.R32UI,\n dataFormat: GL.RED_INTEGER,\n type: GL.UNSIGNED_INT,\n max: 2 ** 32 - 1,\n sampler: \"usampler2D\"\n },\n Float32: {\n format: GL.R32F,\n dataFormat: GL.RED,\n type: GL.FLOAT,\n max: 3.4 * 10 ** 38,\n sampler: \"sampler2D\"\n },\n Int8: {\n format: GL.R8I,\n dataFormat: GL.RED_INTEGER,\n type: GL.BYTE,\n max: 2 ** (8 - 1) - 1,\n sampler: \"isampler2D\"\n },\n Int16: {\n format: GL.R16I,\n dataFormat: GL.RED_INTEGER,\n type: GL.SHORT,\n max: 2 ** (16 - 1) - 1,\n sampler: \"isampler2D\"\n },\n Int32: {\n format: GL.R32I,\n dataFormat: GL.RED_INTEGER,\n type: GL.INT,\n max: 2 ** (32 - 1) - 1,\n sampler: \"isampler2D\"\n },\n Float64: {\n format: GL.R32F,\n dataFormat: GL.RED,\n type: GL.FLOAT,\n max: 3.4 * 10 ** 38,\n sampler: \"sampler2D\",\n cast: (data) => new Float32Array(data)\n }\n};\nconst COLORMAPS = [\"jet\", \"hsv\", \"hot\", \"cool\", \"spring\", \"summer\", \"autumn\", \"winter\", \"bone\", \"copper\", \"greys\", \"yignbu\", \"greens\", \"yiorrd\", \"bluered\", \"rdbu\", \"picnic\", \"rainbow\", \"portland\", \"blackbody\", \"earth\", \"electric\", \"alpha\", \"viridis\", \"inferno\", \"magma\", \"plasma\", \"warm\", \"rainbow-soft\", \"bathymetry\", \"cdom\", \"chlorophyll\", \"density\", \"freesurface-blue\", \"freesurface-red\", \"oxygen\", \"par\", \"phase\", \"salinity\", \"temperature\", \"turbidity\", \"velocity-blue\", \"velocity-green\", \"cubehelix\"];\nvar RENDERING_MODES;\n(function(RENDERING_MODES2) {\n RENDERING_MODES2[\"MAX_INTENSITY_PROJECTION\"] = \"Maximum Intensity Projection\";\n RENDERING_MODES2[\"MIN_INTENSITY_PROJECTION\"] = \"Minimum Intensity Projection\";\n RENDERING_MODES2[\"ADDITIVE\"] = \"Additive\";\n})(RENDERING_MODES || (RENDERING_MODES = {}));\n\nfunction range(len) {\n return [...Array(len).keys()];\n}\nfunction padWithDefault(arr, defaultValue, padWidth) {\n for (let i = 0; i < padWidth; i += 1) {\n arr.push(defaultValue);\n }\n\n return arr;\n}\n/**\n * (Safely) get GL values for associated dtype.\n * @param {keyof typeof import('../constants').DTYPE_VALUES} dtype\n */\n\nfunction getDtypeValues(dtype) {\n const values = DTYPE_VALUES[dtype];\n\n if (!values) {\n const valid = Object.keys(DTYPE_VALUES);\n throw Error(`Dtype not supported, got ${dtype}. Must be one of ${valid}.`);\n }\n\n return values;\n}\nfunction padContrastLimits({\n contrastLimits = [],\n channelsVisible,\n domain,\n dtype\n}) {\n const maxSliderValue = domain && domain[1] || getDtypeValues(dtype).max;\n const newContrastLimits = contrastLimits.map((slider, i) => channelsVisible[i] ? slider : [maxSliderValue, maxSliderValue]); // Need to pad contrastLimits and colors with default values (required by shader)\n\n const padSize = MAX_CHANNELS - newContrastLimits.length;\n\n if (padSize < 0) {\n throw Error(`${newContrastLimits.lengths} channels passed in, but only 6 are allowed.`);\n }\n\n const paddedContrastLimits = padWithDefault(newContrastLimits, [maxSliderValue, maxSliderValue], padSize).reduce((acc, val) => acc.concat(val), []);\n return paddedContrastLimits;\n}\n/**\n * Get physical size scaling Matrix4\n * @param {Object} loader PixelSource\n */\n\nfunction getPhysicalSizeScalingMatrix(loader) {\n const {\n x,\n y,\n z\n } = loader?.meta?.physicalSizes ?? {};\n\n if (x?.size && y?.size && z?.size) {\n const min = Math.min(z.size, x.size, y.size);\n const ratio = [x.size / min, y.size / min, z.size / min];\n return new Matrix4().scale(ratio);\n }\n\n return new Matrix4().identity();\n}\n\n/* eslint-disable prefer-destructuring */\nconst coreShaderModule = {\n fs: fs$6,\n vs: vs$1\n};\n\nfunction validateWebGL2Filter(gl, interpolation) {\n const canShowFloat = hasFeature(gl, FEATURES.TEXTURE_FLOAT);\n const canShowLinear = hasFeature(gl, FEATURES.TEXTURE_FILTER_LINEAR_FLOAT);\n\n if (!canShowFloat) {\n throw new Error('WebGL1 context does not support floating point textures. Unable to display raster data.');\n }\n\n if (!canShowLinear && interpolation === GL.LINEAR) {\n console.warn('LINEAR filtering not supported in WebGL1 context. Falling back to NEAREST.');\n return GL.NEAREST;\n }\n\n return interpolation;\n}\n\nfunction getRenderingAttrs$1(dtype, gl, interpolation) {\n if (!isWebGL2(gl)) {\n return {\n format: GL.LUMINANCE,\n dataFormat: GL.LUMINANCE,\n type: GL.FLOAT,\n sampler: 'sampler2D',\n shaderModule: coreShaderModule,\n filter: validateWebGL2Filter(gl, interpolation),\n cast: data => new Float32Array(data)\n };\n } // Linear filtering only works when the data type is cast to Float32.\n\n\n const isLinear = interpolation === GL.LINEAR; // Need to add es version tag so that shaders work in WebGL2 since the tag is needed for using usampler2d with WebGL2.\n // Very cursed!\n\n const upgradedShaderModule = { ...coreShaderModule\n };\n const version300str = '#version 300 es\\n';\n upgradedShaderModule.fs = version300str.concat(upgradedShaderModule.fs);\n upgradedShaderModule.vs = version300str.concat(upgradedShaderModule.vs);\n const values = getDtypeValues(isLinear ? 'Float32' : dtype);\n return { ...values,\n shaderModule: upgradedShaderModule,\n filter: interpolation,\n cast: isLinear ? data => new Float32Array(data) : data => data\n };\n}\n\nconst defaultProps$b = {\n pickable: {\n type: 'boolean',\n value: true,\n compare: true\n },\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n channelData: {\n type: 'object',\n value: {},\n compare: true\n },\n bounds: {\n type: 'array',\n value: [0, 0, 1, 1],\n compare: true\n },\n contrastLimits: {\n type: 'array',\n value: [],\n compare: true\n },\n channelsVisible: {\n type: 'array',\n value: [],\n compare: true\n },\n dtype: {\n type: 'string',\n value: 'Uint16',\n compare: true\n },\n interpolation: {\n type: 'number',\n value: GL.NEAREST,\n compare: true\n }\n};\n/**\n * @typedef LayerProps\n * @type {object}\n * @property {Array.<Array.<number>>} contrastLimits List of [begin, end] values to control each channel's ramp function.\n * @property {Array.<boolean>} channelsVisible List of boolean values for each channel for whether or not it is visible.\n * @property {string} dtype Dtype for the layer.\n * @property {Array.<number>=} domain Override for the possible max/min values (i.e something different than 65535 for uint16/'<u2').\n * @property {String=} id Unique identifier for this layer.\n * @property {function=} onHover Hook function from deck.gl to handle hover objects.\n * @property {function=} onClick Hook function from deck.gl to handle clicked-on objects.\n * @property {Object=} modelMatrix Math.gl Matrix4 object containing an affine transformation to be applied to the image.\n * Thus setting this to a truthy value (with a colormap set) indicates that the shader should make that color transparent.\n * @property {number=} interpolation The TEXTURE_MIN_FILTER and TEXTURE_MAG_FILTER for WebGL rendering (see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texParameter) - default is GL.NEAREST\n */\n\n/**\n * @type {{ new (...props: import('../../types').Viv<LayerProps>[]) }}\n * @ignore\n */\n\nconst XRLayer = class extends Layer {\n /**\n * This function replaces `usampler` with `sampler` if the data is not an unsigned integer\n * and adds a standard ramp function default for DECKGL_PROCESS_INTENSITY.\n */\n getShaders() {\n const {\n dtype,\n interpolation\n } = this.props;\n const {\n shaderModule,\n sampler\n } = getRenderingAttrs$1(dtype, this.context.gl, interpolation);\n\n const extensionDefinesDeckglProcessIntensity = this._isHookDefinedByExtensions('fs:DECKGL_PROCESS_INTENSITY');\n\n const newChannelsModule = { ...channels$1,\n inject: {}\n };\n\n if (!extensionDefinesDeckglProcessIntensity) {\n newChannelsModule.inject['fs:DECKGL_PROCESS_INTENSITY'] = `\n intensity = apply_contrast_limits(intensity, contrastLimits);\n `;\n }\n\n return super.getShaders({ ...shaderModule,\n defines: {\n SAMPLER_TYPE: sampler\n },\n modules: [project32, picking, newChannelsModule]\n });\n }\n\n _isHookDefinedByExtensions(hookName) {\n const {\n extensions\n } = this.props;\n return extensions?.some(e => {\n const shaders = e.getShaders();\n const {\n inject = {},\n modules = []\n } = shaders;\n const definesInjection = inject[hookName];\n const moduleDefinesInjection = modules.some(m => m?.inject[hookName]);\n return definesInjection || moduleDefinesInjection;\n });\n }\n /**\n * This function initializes the internal state.\n */\n\n\n initializeState() {\n const {\n gl\n } = this.context; // This tells WebGL how to read row data from the texture. For example, the default here is 4 (i.e for RGBA, one byte per channel) so\n // each row of data is expected to be a multiple of 4. This setting (i.e 1) allows us to have non-multiple-of-4 row sizes. For example, for 2 byte (16 bit data),\n // we could use 2 as the value and it would still work, but 1 also works fine (and is more flexible for 8 bit - 1 byte - textures as well).\n // https://stackoverflow.com/questions/42789896/webgl-error-arraybuffer-not-big-enough-for-request-in-case-of-gl-luminance\n\n gl.pixelStorei(GL.UNPACK_ALIGNMENT, 1);\n gl.pixelStorei(GL.PACK_ALIGNMENT, 1);\n const attributeManager = this.getAttributeManager();\n attributeManager.add({\n positions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n update: this.calculatePositions,\n noAlloc: true\n }\n });\n this.setState({\n numInstances: 1,\n positions: new Float64Array(12)\n });\n const programManager = ProgramManager.getDefaultProgramManager(gl);\n const mutateStr = 'fs:DECKGL_MUTATE_COLOR(inout vec4 rgba, float intensity0, float intensity1, float intensity2, float intensity3, float intensity4, float intensity5, vec2 vTexCoord)';\n const processStr = `fs:DECKGL_PROCESS_INTENSITY(inout float intensity, vec2 contrastLimits, int channelIndex)`; // Only initialize shader hook functions _once globally_\n // Since the program manager is shared across all layers, but many layers\n // might be created, this solves the performance issue of always adding new\n // hook functions.\n // See https://github.com/kylebarron/deck.gl-raster/blob/2eb91626f0836558f0be4cd201ea18980d7f7f2d/src/deckgl/raster-layer/raster-layer.js#L21-L40\n\n if (!programManager._hookFunctions.includes(mutateStr)) {\n programManager.addShaderHook(mutateStr);\n }\n\n if (!programManager._hookFunctions.includes(processStr)) {\n programManager.addShaderHook(processStr);\n }\n }\n /**\n * This function finalizes state by clearing all textures from the WebGL context\n */\n\n\n finalizeState() {\n super.finalizeState();\n\n if (this.state.textures) {\n Object.values(this.state.textures).forEach(tex => tex && tex.delete());\n }\n }\n /**\n * This function updates state by retriggering model creation (shader compilation and attribute binding)\n * and loading any textures that need be loading.\n */\n\n\n updateState({\n props,\n oldProps,\n changeFlags,\n ...rest\n }) {\n super.updateState({\n props,\n oldProps,\n changeFlags,\n ...rest\n }); // setup model first\n\n if (changeFlags.extensionsChanged || props.interpolation !== oldProps.interpolation) {\n const {\n gl\n } = this.context;\n\n if (this.state.model) {\n this.state.model.delete();\n }\n\n this.setState({\n model: this._getModel(gl)\n });\n this.getAttributeManager().invalidateAll();\n }\n\n if (props.channelData !== oldProps.channelData && props.channelData?.data !== oldProps.channelData?.data || props.interpolation !== oldProps.interpolation) {\n this.loadChannelTextures(props.channelData);\n }\n\n const attributeManager = this.getAttributeManager();\n\n if (props.bounds !== oldProps.bounds) {\n attributeManager.invalidate('positions');\n }\n }\n /**\n * This function creates the luma.gl model.\n */\n\n\n _getModel(gl) {\n if (!gl) {\n return null;\n }\n /*\n 0,0 --- 1,0\n | |\n 0,1 --- 1,1\n */\n\n\n return new Model(gl, { ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_FAN,\n vertexCount: 4,\n attributes: {\n texCoords: new Float32Array([0, 1, 0, 0, 1, 0, 1, 1])\n }\n }),\n isInstanced: false\n });\n }\n /**\n * This function generates view positions for use as a vec3 in the shader\n */\n\n\n calculatePositions(attributes) {\n const {\n positions\n } = this.state;\n const {\n bounds\n } = this.props; // bounds as [minX, minY, maxX, maxY]\n\n /*\n (minX0, maxY3) ---- (maxX2, maxY3)\n | |\n | |\n | |\n (minX0, minY1) ---- (maxX2, minY1)\n */\n\n positions[0] = bounds[0];\n positions[1] = bounds[1];\n positions[2] = 0;\n positions[3] = bounds[0];\n positions[4] = bounds[3];\n positions[5] = 0;\n positions[6] = bounds[2];\n positions[7] = bounds[3];\n positions[8] = 0;\n positions[9] = bounds[2];\n positions[10] = bounds[1];\n positions[11] = 0; // eslint-disable-next-line no-param-reassign\n\n attributes.value = positions;\n }\n /**\n * This function runs the shaders and draws to the canvas\n */\n\n\n draw({\n uniforms\n }) {\n const {\n textures,\n model\n } = this.state;\n\n if (textures && model) {\n const {\n contrastLimits,\n domain,\n dtype,\n channelsVisible\n } = this.props; // Check number of textures not null.\n\n const numTextures = Object.values(textures).filter(t => t).length; // Slider values and color values can come in before textures since their data is async.\n // Thus we pad based on the number of textures bound.\n\n const paddedContrastLimits = padContrastLimits({\n contrastLimits: contrastLimits.slice(0, numTextures),\n channelsVisible: channelsVisible.slice(0, numTextures),\n domain,\n dtype\n });\n model.setUniforms({ ...uniforms,\n contrastLimits: paddedContrastLimits,\n ...textures\n }).draw();\n }\n }\n /**\n * This function loads all channel textures from incoming resolved promises/data from the loaders by calling `dataToTexture`\n */\n\n\n loadChannelTextures(channelData) {\n const textures = {\n channel0: null,\n channel1: null,\n channel2: null,\n channel3: null,\n channel4: null,\n channel5: null\n };\n\n if (this.state.textures) {\n Object.values(this.state.textures).forEach(tex => tex && tex.delete());\n }\n\n if (channelData && Object.keys(channelData).length > 0 && channelData.data) {\n channelData.data.forEach((d, i) => {\n textures[`channel${i}`] = this.dataToTexture(d, channelData.width, channelData.height);\n }, this);\n this.setState({\n textures\n });\n }\n }\n /**\n * This function creates textures from the data\n */\n\n\n dataToTexture(data, width, height) {\n const {\n interpolation\n } = this.props;\n const attrs = getRenderingAttrs$1(this.props.dtype, this.context.gl, interpolation);\n return new Texture2D(this.context.gl, {\n width,\n height,\n data: attrs.cast?.(data) ?? data,\n // we don't want or need mimaps\n mipmaps: false,\n parameters: {\n // NEAREST for integer data\n [GL.TEXTURE_MIN_FILTER]: attrs.filter,\n [GL.TEXTURE_MAG_FILTER]: attrs.filter,\n // CLAMP_TO_EDGE to remove tile artifacts\n [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE\n },\n format: attrs.format,\n dataFormat: attrs.dataFormat,\n type: attrs.type\n });\n }\n\n};\nXRLayer.layerName = 'XRLayer';\nXRLayer.defaultProps = defaultProps$b;\n\n// eslint-disable-next-line max-classes-per-file\nconst PHOTOMETRIC_INTERPRETATIONS = {\n WhiteIsZero: 0,\n BlackIsZero: 1,\n RGB: 2,\n Palette: 3,\n TransparencyMask: 4,\n CMYK: 5,\n YCbCr: 6,\n CIELab: 8,\n ICCLab: 9\n};\nconst defaultProps$a = { ...BitmapLayer$1.defaultProps,\n pickable: {\n type: 'boolean',\n value: true,\n compare: true\n },\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN\n};\n\nconst getPhotometricInterpretationShader = (photometricInterpretation, transparentColorInHook) => {\n const useTransparentColor = transparentColorInHook ? 'true' : 'false';\n const transparentColorVector = `vec3(${(transparentColorInHook || [0, 0, 0]).map(i => String(i / 255)).join(',')})`;\n\n switch (photometricInterpretation) {\n case PHOTOMETRIC_INTERPRETATIONS.RGB:\n return `color[3] = (${useTransparentColor} && (color.rgb == ${transparentColorVector})) ? 0.0 : color.a;`;\n\n case PHOTOMETRIC_INTERPRETATIONS.WhiteIsZero:\n return `\\\n float value = 1.0 - (color.r / 256.0);\n color = vec4(value, value, value, (${useTransparentColor} && vec3(value, value, value) == ${transparentColorVector}) ? 0.0 : color.a);\n `;\n\n case PHOTOMETRIC_INTERPRETATIONS.BlackIsZero:\n return `\\\n float value = (color.r / 256.0);\n color = vec4(value, value, value, (${useTransparentColor} && vec3(value, value, value) == ${transparentColorVector}) ? 0.0 : color.a);\n `;\n\n case PHOTOMETRIC_INTERPRETATIONS.YCbCr:\n // We need to use an epsilon because the conversion to RGB is not perfect.\n return `\\\n float y = color[0];\n float cb = color[1];\n float cr = color[2];\n color[0] = (y + (1.40200 * (cr - .5)));\n color[1] = (y - (0.34414 * (cb - .5)) - (0.71414 * (cr - .5)));\n color[2] = (y + (1.77200 * (cb - .5)));\n color[3] = (${useTransparentColor} && distance(color.rgb, ${transparentColorVector}) < 0.01) ? 0.0 : color.a;\n `;\n\n default:\n console.error('Unsupported photometric interpretation or none provided. No transformation will be done to image data');\n return '';\n }\n};\n\nconst getTransparentColor = photometricInterpretation => {\n switch (photometricInterpretation) {\n case PHOTOMETRIC_INTERPRETATIONS.RGB:\n return [0, 0, 0, 0];\n\n case PHOTOMETRIC_INTERPRETATIONS.WhiteIsZero:\n return [255, 255, 255, 0];\n\n case PHOTOMETRIC_INTERPRETATIONS.BlackIsZero:\n return [0, 0, 0, 0];\n\n case PHOTOMETRIC_INTERPRETATIONS.YCbCr:\n return [16, 128, 128, 0];\n\n default:\n console.error('Unsupported photometric interpretation or none provided. No transformation will be done to image data');\n return [0, 0, 0, 0];\n }\n};\n\nclass BitmapLayerWrapper extends BitmapLayer$1 {\n _getModel(gl) {\n const {\n photometricInterpretation,\n transparentColorInHook\n } = this.props; // This is a port to the GPU of a subset of https://github.com/geotiffjs/geotiff.js/blob/master/src/rgb.js\n // Safari was too slow doing this off of the GPU and it is noticably faster on other browsers as well.\n\n const photometricInterpretationShader = getPhotometricInterpretationShader(photometricInterpretation, transparentColorInHook);\n\n if (!gl) {\n return null;\n }\n /*\n 0,0 --- 1,0\n | |\n 0,1 --- 1,1\n */\n\n\n return new Model(gl, { ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLES,\n vertexCount: 6\n }),\n isInstanced: false,\n inject: {\n 'fs:DECKGL_FILTER_COLOR': photometricInterpretationShader\n }\n });\n }\n\n}\n/**\n * @typedef LayerProps\n * @type {object}\n * @property {number=} opacity Opacity of the layer.\n * @property {function=} onClick Hook function from deck.gl to handle clicked-on objects.\n * @property {Object=} modelMatrix Math.gl Matrix4 object containing an affine transformation to be applied to the image.\n * @property {number=} photometricInterpretation One of WhiteIsZero BlackIsZero YCbCr or RGB (default)\n * @property {Array.<number>=} transparentColor An RGB (0-255 range) color to be considered \"transparent\" if provided.\n * In other words, any fragment shader output equal transparentColor (before applying opacity) will have opacity 0.\n * This parameter only needs to be a truthy value when using colormaps because each colormap has its own transparent color that is calculated on the shader.\n * Thus setting this to a truthy value (with a colormap set) indicates that the shader should make that color transparent.\n * @property {String=} id Unique identifier for this layer.\n */\n\n/**\n * @type {{ new (...props: import('../types').Viv<LayerProps>[]) }}\n * @ignore\n */\n\n\nconst BitmapLayer = class extends CompositeLayer {\n initializeState(args) {\n const {\n gl\n } = this.context; // This tells WebGL how to read row data from the texture. For example, the default here is 4 (i.e for RGBA, one byte per channel) so\n // each row of data is expected to be a multiple of 4. This setting (i.e 1) allows us to have non-multiple-of-4 row sizes. For example, for 2 byte (16 bit data),\n // we could use 2 as the value and it would still work, but 1 also works fine (and is more flexible for 8 bit - 1 byte - textures as well).\n // https://stackoverflow.com/questions/42789896/webgl-error-arraybuffer-not-big-enough-for-request-in-case-of-gl-luminance\n // This needs to be called here and not in the BitmapLayerWrapper because the `image` prop is converted to a texture outside of the layer, as controlled by the `image` type.\n // See: https://github.com/visgl/deck.gl/pull/5197\n\n gl.pixelStorei(GL.UNPACK_ALIGNMENT, 1);\n gl.pixelStorei(GL.PACK_ALIGNMENT, 1);\n super.initializeState(args);\n }\n\n renderLayers() {\n const {\n photometricInterpretation,\n transparentColor: transparentColorInHook\n } = this.props;\n const transparentColor = getTransparentColor(photometricInterpretation);\n return new BitmapLayerWrapper(this.props, {\n // transparentColor is a prop applied to the original image data by deck.gl's\n // BitmapLayer and needs to be in the original colorspace. It is used to determine\n // what color is \"transparent\" in the original color space (i.e what shows when opacity is 0).\n transparentColor,\n // This is our transparentColor props which needs to be applied in the hook that converts to the RGB space.\n transparentColorInHook,\n id: `${this.props.id}-wrapped`\n });\n }\n\n};\nBitmapLayer.layerName = 'BitmapLayer'; // From https://github.com/geotiffjs/geotiff.js/blob/8ef472f41b51d18074aece2300b6a8ad91a21ae1/src/globals.js#L202-L213\n\nBitmapLayer.PHOTOMETRIC_INTERPRETATIONS = PHOTOMETRIC_INTERPRETATIONS;\nBitmapLayer.defaultProps = { ...defaultProps$a,\n // We don't want this layer to bind the texture so the type should not be `image`.\n image: {\n type: 'object',\n value: {},\n compare: true\n },\n transparentColor: {\n type: 'array',\n value: [0, 0, 0],\n compare: true\n },\n photometricInterpretation: {\n type: 'number',\n value: 2,\n compare: true\n }\n};\nBitmapLayerWrapper.defaultProps = defaultProps$a;\nBitmapLayerWrapper.layerName = 'BitmapLayerWrapper';\n\nfunction getChannelStats(arr) {\n let len = arr.length;\n let min = Infinity;\n let max = -Infinity;\n let total = 0;\n while (len--) {\n if (arr[len] < min) {\n min = arr[len];\n }\n if (arr[len] > max) {\n max = arr[len];\n }\n total += arr[len];\n }\n const mean = total / arr.length;\n len = arr.length;\n let sumSquared = 0;\n while (len--) {\n sumSquared += (arr[len] - mean) ** 2;\n }\n const sd = (sumSquared / arr.length) ** 0.5;\n const mid = Math.floor(arr.length / 2);\n const firstQuartileLocation = Math.floor(arr.length / 4);\n const thirdQuartileLocation = 3 * Math.floor(arr.length / 4);\n quickselect(arr, mid);\n const median = arr[mid];\n quickselect(arr, firstQuartileLocation, 0, mid);\n const q1 = arr[firstQuartileLocation];\n quickselect(arr, thirdQuartileLocation, mid, arr.length - 1);\n const q3 = arr[thirdQuartileLocation];\n const cutoffArr = arr.filter((i) => i > 0);\n const cutoffPercentile = 5e-4;\n const topCutoffLocation = Math.floor(cutoffArr.length * (1 - cutoffPercentile));\n const bottomCutoffLocation = Math.floor(cutoffArr.length * cutoffPercentile);\n quickselect(cutoffArr, topCutoffLocation);\n quickselect(cutoffArr, bottomCutoffLocation, 0, topCutoffLocation);\n const contrastLimits = [cutoffArr[bottomCutoffLocation] || 0, cutoffArr[topCutoffLocation] || 0];\n return {\n mean,\n sd,\n q1,\n q3,\n median,\n domain: [min, max],\n contrastLimits\n };\n}\nfunction ensureArray(x) {\n return Array.isArray(x) ? x : [x];\n}\nfunction intToRgba(int) {\n if (!Number.isInteger(int)) {\n throw Error(\"Not an integer.\");\n }\n const buffer = new ArrayBuffer(4);\n const view = new DataView(buffer);\n view.setInt32(0, int, false);\n const bytes = new Uint8Array(buffer);\n return Array.from(bytes);\n}\nfunction isInterleaved(shape) {\n const lastDimSize = shape[shape.length - 1];\n return lastDimSize === 3 || lastDimSize === 4;\n}\nfunction getLabels(dimOrder) {\n return dimOrder.toLowerCase().split(\"\").reverse();\n}\nfunction getDims(labels) {\n const lookup = new Map(labels.map((name, i) => [name, i]));\n if (lookup.size !== labels.length) {\n throw Error(\"Labels must be unique, found duplicated label.\");\n }\n return (name) => {\n const index = lookup.get(name);\n if (index === void 0) {\n throw Error(\"Invalid dimension.\");\n }\n return index;\n };\n}\nfunction getImageSize(source) {\n const interleaved = isInterleaved(source.shape);\n const [height, width] = source.shape.slice(interleaved ? -3 : -2);\n return {\n height,\n width\n };\n}\nfunction prevPowerOf2(x) {\n return 2 ** Math.floor(Math.log2(x));\n}\nconst SIGNAL_ABORTED = \"__vivSignalAborted\";\n\nfunction renderSubLayers(props) {\n const {\n bbox: {\n left,\n top,\n right,\n bottom\n },\n x,\n y,\n z\n } = props.tile;\n const {\n data,\n id,\n loader,\n maxZoom\n } = props; // Only render in positive coorinate system\n\n if ([left, bottom, right, top].some(v => v < 0) || !data) {\n return null;\n }\n\n const base = loader[0];\n const {\n height,\n width\n } = getImageSize(base); // Tiles are exactly fitted to have height and width such that their bounds match that of the actual image (not some padded version).\n // Thus the right/bottom given by deck.gl are incorrect since they assume tiles are of uniform sizes, which is not the case for us.\n\n const bounds = [left, data.height < base.tileSize ? height : bottom, data.width < base.tileSize ? width : right, top];\n\n if (isInterleaved(base.shape)) {\n const {\n photometricInterpretation = 2\n } = base.meta;\n return new BitmapLayer(props, {\n image: data,\n photometricInterpretation,\n // Shared props with XRLayer:\n bounds,\n id: `tile-sub-layer-${bounds}-${id}`,\n tileId: {\n x,\n y,\n z\n }\n });\n }\n\n return new XRLayer(props, {\n channelData: data,\n // Uncomment to help debugging - shades the tile being hovered over.\n // autoHighlight: true,\n // highlightColor: [80, 80, 80, 50],\n // Shared props with BitmapLayer:\n bounds,\n id: `tile-sub-layer-${bounds}-${id}`,\n tileId: {\n x,\n y,\n z\n },\n // The auto setting is NEAREST at the highest resolution but LINEAR otherwise.\n interpolation: z === maxZoom ? GL.NEAREST : GL.LINEAR\n });\n}\n\nconst defaultProps$9 = {\n pickable: {\n type: 'boolean',\n value: true,\n compare: true\n },\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n contrastLimits: {\n type: 'array',\n value: [],\n compare: true\n },\n channelsVisible: {\n type: 'array',\n value: [],\n compare: true\n },\n renderSubLayers: {\n type: 'function',\n value: renderSubLayers,\n compare: false\n },\n dtype: {\n type: 'string',\n value: 'Uint16',\n compare: true\n },\n domain: {\n type: 'array',\n value: [],\n compare: true\n },\n viewportId: {\n type: 'string',\n value: '',\n compare: true\n },\n interpolation: {\n type: 'number',\n value: null,\n compare: true\n }\n};\n/**\n * This layer serves as a proxy of sorts to the rendering done in renderSubLayers, reacting to viewport changes in a custom manner.\n */\n\nclass MultiscaleImageLayerBase extends TileLayer {\n /**\n * This function allows us to controls which viewport gets to update the Tileset2D.\n * This is a uniquely TileLayer issue since it updates based on viewport updates thanks\n * to its ability to handle zoom-pan loading. Essentially, with a picture-in-picture,\n * this prevents it from detecting the update of some other viewport that is unwanted.\n */\n _updateTileset() {\n if (!this.props.viewportId) {\n super._updateTileset();\n }\n\n if (this.props.viewportId && this.context.viewport.id === this.props.viewportId || // I don't know why, but DeckGL doesn't recognize multiple views on the first pass\n // so we force update on the first pass by checking if there is a viewport in the tileset.\n !this.state.tileset._viewport) {\n super._updateTileset();\n }\n }\n\n}\nMultiscaleImageLayerBase.layerName = 'MultiscaleImageLayerBase';\nMultiscaleImageLayerBase.defaultProps = defaultProps$9;\n\nvar fs$4 = \"#define GLSLIFY 1\\nuniform float majorLensAxis;uniform float minorLensAxis;uniform vec2 lensCenter;uniform bool lensEnabled;uniform int lensSelection;uniform vec3 lensBorderColor;uniform float lensBorderRadius;uniform vec3 colors[6];bool frag_in_lens_bounds(vec2 vTexCoord){return pow((lensCenter.x-vTexCoord.x)/majorLensAxis,2.)+pow((lensCenter.y-vTexCoord.y)/minorLensAxis,2.)<(1.-lensBorderRadius);}bool frag_on_lens_bounds(vec2 vTexCoord){float ellipseDistance=pow((lensCenter.x-vTexCoord.x)/majorLensAxis,2.)+pow((lensCenter.y-vTexCoord.y)/minorLensAxis,2.);return ellipseDistance<=1.&&ellipseDistance>=(1.-lensBorderRadius);}float get_use_color_float(vec2 vTexCoord,int channelIndex){bool isFragInLensBounds=frag_in_lens_bounds(vTexCoord);bool inLensAndUseLens=lensEnabled&&isFragInLensBounds;return float(int((inLensAndUseLens&&channelIndex==lensSelection)||(!inLensAndUseLens)));}void mutate_color(inout vec3 rgb,float intensity0,float intensity1,float intensity2,float intensity3,float intensity4,float intensity5,vec2 vTexCoord){float useColorValue=0.;useColorValue=get_use_color_float(vTexCoord,0);rgb+=max(0.,min(1.,intensity0))*max(vec3(colors[0]),(1.-useColorValue)*vec3(1.,1.,1.));useColorValue=get_use_color_float(vTexCoord,1);rgb+=max(0.,min(1.,intensity1))*max(vec3(colors[1]),(1.-useColorValue)*vec3(1.,1.,1.));useColorValue=get_use_color_float(vTexCoord,2);rgb+=max(0.,min(1.,intensity2))*max(vec3(colors[2]),(1.-useColorValue)*vec3(1.,1.,1.));useColorValue=get_use_color_float(vTexCoord,3);rgb+=max(0.,min(1.,intensity3))*max(vec3(colors[3]),(1.-useColorValue)*vec3(1.,1.,1.));useColorValue=get_use_color_float(vTexCoord,4);rgb+=max(0.,min(1.,intensity4))*max(vec3(colors[4]),(1.-useColorValue)*vec3(1.,1.,1.));useColorValue=get_use_color_float(vTexCoord,5);rgb+=max(0.,min(1.,intensity5))*max(vec3(colors[5]),(1.-useColorValue)*vec3(1.,1.,1.));}\"; // eslint-disable-line\n\nvar lens = {\n name: 'lens-module',\n fs: fs$4,\n inject: {\n 'fs:DECKGL_MUTATE_COLOR': `\n vec3 rgb = rgba.rgb;\n mutate_color(rgb, intensity0, intensity1, intensity2, intensity3, intensity4, intensity5, vTexCoord);\n rgba = vec4(rgb, 1.);\n `,\n 'fs:#main-end': `\n bool isFragOnLensBounds = frag_on_lens_bounds(vTexCoord);\n gl_FragColor = (lensEnabled && isFragOnLensBounds) ? vec4(lensBorderColor, 1.) : gl_FragColor;\n `\n }\n};\n\nconst COLOR_PALETTE = [[0, 0, 255], // blue\n[0, 255, 0], // green\n[255, 0, 255], // magenta\n[255, 255, 0], // yellow\n[255, 128, 0], // orange\n[0, 255, 255], // cyan\n[255, 255, 255], // white\n[255, 0, 0] // red\n];\nfunction getDefaultPalette(n) {\n if (n > COLOR_PALETTE.length) {\n throw new Error('Too many colors');\n }\n\n return COLOR_PALETTE.slice(0, n);\n}\nfunction padColors({\n colors,\n channelsVisible\n}) {\n const newColors = colors.map((color, i) => channelsVisible[i] ? color.map(c => c / MAX_COLOR_INTENSITY) : DEFAULT_COLOR_OFF);\n const padSize = MAX_CHANNELS - newColors.length;\n const paddedColors = padWithDefault(newColors, DEFAULT_COLOR_OFF, padSize).reduce((acc, val) => acc.concat(val), []);\n return paddedColors;\n}\n\nconst defaultProps$8 = {\n lensEnabled: {\n type: 'boolean',\n value: false,\n compare: true\n },\n lensSelection: {\n type: 'number',\n value: 0,\n compare: true\n },\n lensRadius: {\n type: 'number',\n value: 100,\n compare: true\n },\n lensBorderColor: {\n type: 'array',\n value: [255, 255, 255],\n compare: true\n },\n lensBorderRadius: {\n type: 'number',\n value: 0.02,\n compare: true\n },\n colors: {\n type: 'array',\n value: null,\n compare: true\n }\n};\n/**\n * This deck.gl extension allows for a lens that selectively shows one channel in its chosen color and then the others in white.\n * @typedef LayerProps\n * @type {Object}\n * @property {boolean=} lensEnabled Whether or not to use the lens.\n * @property {number=} lensSelection Numeric index of the channel to be focused on by the lens.\n * @property {number=} lensRadius Pixel radius of the lens (default: 100).\n * @property {Array.<number>=} lensBorderColor RGB color of the border of the lens (default [255, 255, 255]).\n * @property {number=} lensBorderRadius Percentage of the radius of the lens for a border (default 0.02).\n * @property {Array<Array.<number>>=} colors Color palette to pseudo-color channels as.\n * */\n\nconst LensExtension = class extends LayerExtension {\n getShaders() {\n return { ...super.getShaders(),\n modules: [lens]\n };\n }\n\n initializeState() {\n const layer = this.getCurrentLayer(); // No need to run this on layers that don't have a `draw` call.\n\n if (layer.isComposite) {\n return;\n }\n\n const onMouseMove = () => {\n const {\n viewportId\n } = layer.props;\n const {\n lensRadius = defaultProps$8.lensRadius.value\n } = this.props; // If there is no viewportId, don't try to do anything.\n\n if (!viewportId) {\n layer.setState({\n unprojectLensBounds: [0, 0, 0, 0]\n });\n return;\n }\n\n const {\n mousePosition\n } = layer.context;\n const layerView = layer.context.deck.viewManager.views.filter(view => view.id === viewportId)[0];\n const viewState = layer.context.deck.viewManager.viewState[viewportId];\n const viewport = layerView.makeViewport({ ...viewState,\n viewState\n }); // If the mouse is in the viewport and the mousePosition exists, set\n // the state with the bounding box of the circle that will render as a lens.\n\n if (mousePosition && viewport.containsPixel(mousePosition)) {\n const offsetMousePosition = {\n x: mousePosition.x - viewport.x,\n y: mousePosition.y - viewport.y\n };\n const mousePositionBounds = [// left\n [offsetMousePosition.x - lensRadius, offsetMousePosition.y], // bottom\n [offsetMousePosition.x, offsetMousePosition.y + lensRadius], // right\n [offsetMousePosition.x + lensRadius, offsetMousePosition.y], // top\n [offsetMousePosition.x, offsetMousePosition.y - lensRadius]]; // Unproject from screen to world coordinates.\n\n const unprojectLensBounds = mousePositionBounds.map((bounds, i) => viewport.unproject(bounds)[i % 2]);\n layer.setState({\n unprojectLensBounds\n });\n } else {\n layer.setState({\n unprojectLensBounds: [0, 0, 0, 0]\n });\n }\n };\n\n if (this.context.deck) {\n this.context.deck.eventManager.on({\n pointermove: onMouseMove,\n pointerleave: onMouseMove,\n wheel: onMouseMove\n });\n }\n\n this.setState({\n onMouseMove,\n unprojectLensBounds: [0, 0, 0, 0]\n });\n }\n\n draw() {\n const {\n unprojectLensBounds = [0, 0, 0, 0]\n } = this.state;\n const {\n bounds,\n lensEnabled = defaultProps$8.lensEnabled.value,\n lensSelection = defaultProps$8.lensSelection.value,\n lensBorderColor = defaultProps$8.lensBorderColor.value,\n lensBorderRadius = defaultProps$8.lensBorderRadius.value,\n colors,\n channelsVisible\n } = this.props; // Creating a unit-square scaled intersection box for rendering the lens.\n // It is ok if these coordinates are outside the unit square since\n // we check membership in or out of the lens on the fragment shader.\n\n const [leftMouseBound, bottomMouseBound, rightMouseBound, topMouseBound] = unprojectLensBounds;\n const [left, bottom, right, top] = bounds;\n const leftMouseBoundScaled = (leftMouseBound - left) / (right - left);\n const bottomMouseBoundScaled = (bottomMouseBound - top) / (bottom - top);\n const rightMouseBoundScaled = (rightMouseBound - left) / (right - left);\n const topMouseBoundScaled = (topMouseBound - top) / (bottom - top);\n const paddedColors = padColors({\n channelsVisible: channelsVisible || this.selections.map(() => true),\n colors: colors || getDefaultPalette(this.props.selections.length)\n });\n const uniforms = {\n majorLensAxis: (rightMouseBoundScaled - leftMouseBoundScaled) / 2,\n minorLensAxis: (bottomMouseBoundScaled - topMouseBoundScaled) / 2,\n lensCenter: [(rightMouseBoundScaled + leftMouseBoundScaled) / 2, (bottomMouseBoundScaled + topMouseBoundScaled) / 2],\n lensEnabled,\n lensSelection,\n lensBorderColor,\n lensBorderRadius,\n colors: paddedColors\n }; // eslint-disable-next-line no-unused-expressions\n\n this.state.model?.setUniforms(uniforms);\n }\n\n finalizeState() {\n // Remove event listeners\n if (this.context.deck) {\n this.context.deck.eventManager.off({\n pointermove: this.state?.onMouseMove,\n pointerleave: this.state?.onMouseMove,\n wheel: this.state?.onMouseMove\n });\n }\n }\n\n};\nLensExtension.extensionName = 'LensExtension';\nLensExtension.defaultProps = defaultProps$8;\n\nvar fs$3 = \"#define GLSLIFY 1\\nvec4 apply_transparent_color_1540259130(vec3 color,vec3 transparentColor,bool useTransparentColor,float opacity){return vec4(color,(color==transparentColor&&useTransparentColor)? 0. : opacity);}uniform vec3 transparentColor;uniform bool useTransparentColor;uniform float opacity;uniform vec3 colors[6];void mutate_color(inout vec3 rgb,float intensity0,float intensity1,float intensity2,float intensity3,float intensity4,float intensity5){rgb+=max(0.0,min(1.0,intensity0))*vec3(colors[0]);rgb+=max(0.0,min(1.0,intensity1))*vec3(colors[1]);rgb+=max(0.0,min(1.0,intensity2))*vec3(colors[2]);rgb+=max(0.0,min(1.0,intensity3))*vec3(colors[3]);rgb+=max(0.0,min(1.0,intensity4))*vec3(colors[4]);rgb+=max(0.0,min(1.0,intensity5))*vec3(colors[5]);}vec4 apply_opacity(vec3 rgb){return vec4(apply_transparent_color_1540259130(rgb,transparentColor,useTransparentColor,opacity));}\"; // eslint-disable-line\n\nvar colorPalette = {\n name: 'color-palette-module',\n fs: fs$3,\n inject: {\n 'fs:DECKGL_MUTATE_COLOR': `\n vec3 rgb = rgba.rgb;\n mutate_color(rgb, intensity0, intensity1, intensity2, intensity3, intensity4, intensity5);\n rgba = apply_opacity(rgb);\n `\n }\n};\n\nconst defaultProps$7 = {\n colors: {\n type: 'array',\n value: null,\n compare: true\n },\n opacity: {\n type: 'number',\n value: 1.0,\n compare: true\n },\n transparentColor: {\n type: 'array',\n value: null,\n compare: true\n },\n useTransparentColor: {\n type: 'boolean',\n value: false,\n compare: true\n }\n};\n/**\n * This deck.gl extension allows for a color palette to be used for pseudo-coloring channels.\n * @typedef LayerProps\n * @type {object}\n * @property {Array<Array<number>>=} colors Array of colors to map channels to (RGB).\n * @property {number=} opacity Opacity of the layer.\n * @property {Array.<number>=} transparentColor An RGB (0-255 range) color to be considered \"transparent\" if provided.\n * In other words, any fragment shader output equal transparentColor (before applying opacity) will have opacity 0.\n * @property {Boolean=} useTransparentColor Whether or not to use the value provided to transparentColor.\n * */\n\nconst ColorPaletteExtension = class extends LayerExtension {\n getShaders() {\n return { ...super.getShaders(),\n modules: [colorPalette]\n };\n }\n\n draw() {\n const {\n colors,\n channelsVisible,\n opacity = defaultProps$7.opacity.value,\n transparentColor = defaultProps$7.transparentColor.value,\n useTransparentColor = defaultProps$7.useTransparentColor.value\n } = this.props;\n const paddedColors = padColors({\n channelsVisible: channelsVisible || this.selections.map(() => true),\n colors: colors || getDefaultPalette(this.props.selections.length)\n });\n const uniforms = {\n colors: paddedColors,\n opacity,\n transparentColor: (transparentColor || [0, 0, 0]).map(i => i / 255),\n useTransparentColor: Boolean(useTransparentColor)\n }; // eslint-disable-next-line no-unused-expressions\n\n this.state.model?.setUniforms(uniforms);\n }\n\n};\nColorPaletteExtension.extensionName = 'ColorPaletteExtension';\nColorPaletteExtension.defaultProps = defaultProps$7;\n\nvar fs$2 = \"#define GLSLIFY 1\\nvec4 jet(float x_17){const float e0=0.0;const vec4 v0=vec4(0,0,0.5137254901960784,1);const float e1=0.125;const vec4 v1=vec4(0,0.23529411764705882,0.6666666666666666,1);const float e2=0.375;const vec4 v2=vec4(0.0196078431372549,1,1,1);const float e3=0.625;const vec4 v3=vec4(1,1,0,1);const float e4=0.875;const vec4 v4=vec4(0.9803921568627451,0,0,1);const float e5=1.0;const vec4 v5=vec4(0.5019607843137255,0,0,1);float a0=smoothstep(e0,e1,x_17);float a1=smoothstep(e1,e2,x_17);float a2=smoothstep(e2,e3,x_17);float a3=smoothstep(e3,e4,x_17);float a4=smoothstep(e4,e5,x_17);return max(mix(v0,v1,a0)*step(e0,x_17)*step(x_17,e1),max(mix(v1,v2,a1)*step(e1,x_17)*step(x_17,e2),max(mix(v2,v3,a2)*step(e2,x_17)*step(x_17,e3),max(mix(v3,v4,a3)*step(e3,x_17)*step(x_17,e4),mix(v4,v5,a4)*step(e4,x_17)*step(x_17,e5)))));}vec4 hsv(float x_18){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=0.169;const vec4 v1=vec4(0.9921568627450981,1,0.00784313725490196,1);const float e2=0.173;const vec4 v2=vec4(0.9686274509803922,1,0.00784313725490196,1);const float e3=0.337;const vec4 v3=vec4(0,0.9882352941176471,0.01568627450980392,1);const float e4=0.341;const vec4 v4=vec4(0,0.9882352941176471,0.0392156862745098,1);const float e5=0.506;const vec4 v5=vec4(0.00392156862745098,0.9764705882352941,1,1);const float e6=0.671;const vec4 v6=vec4(0.00784313725490196,0,0.9921568627450981,1);const float e7=0.675;const vec4 v7=vec4(0.03137254901960784,0,0.9921568627450981,1);const float e8=0.839;const vec4 v8=vec4(1,0,0.984313725490196,1);const float e9=0.843;const vec4 v9=vec4(1,0,0.9607843137254902,1);const float e10=1.0;const vec4 v10=vec4(1,0,0.023529411764705882,1);float a0=smoothstep(e0,e1,x_18);float a1=smoothstep(e1,e2,x_18);float a2=smoothstep(e2,e3,x_18);float a3=smoothstep(e3,e4,x_18);float a4=smoothstep(e4,e5,x_18);float a5=smoothstep(e5,e6,x_18);float a6=smoothstep(e6,e7,x_18);float a7=smoothstep(e7,e8,x_18);float a8=smoothstep(e8,e9,x_18);float a9=smoothstep(e9,e10,x_18);return max(mix(v0,v1,a0)*step(e0,x_18)*step(x_18,e1),max(mix(v1,v2,a1)*step(e1,x_18)*step(x_18,e2),max(mix(v2,v3,a2)*step(e2,x_18)*step(x_18,e3),max(mix(v3,v4,a3)*step(e3,x_18)*step(x_18,e4),max(mix(v4,v5,a4)*step(e4,x_18)*step(x_18,e5),max(mix(v5,v6,a5)*step(e5,x_18)*step(x_18,e6),max(mix(v6,v7,a6)*step(e6,x_18)*step(x_18,e7),max(mix(v7,v8,a7)*step(e7,x_18)*step(x_18,e8),max(mix(v8,v9,a8)*step(e8,x_18)*step(x_18,e9),mix(v9,v10,a9)*step(e9,x_18)*step(x_18,e10))))))))));}vec4 hot(float x_13){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.3;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.6;const vec4 v2=vec4(1,0.8235294117647058,0,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_13);float a1=smoothstep(e1,e2,x_13);float a2=smoothstep(e2,e3,x_13);return max(mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1),max(mix(v1,v2,a1)*step(e1,x_13)*step(x_13,e2),mix(v2,v3,a2)*step(e2,x_13)*step(x_13,e3)));}vec4 cool(float x_24){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.4549019607843137,0,0.8549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);const float e3=0.38;const vec4 v3=vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);const float e4=0.5;const vec4 v4=vec4(0,0.8,0.7725490196078432,1);const float e5=0.63;const vec4 v5=vec4(0,0.9686274509803922,0.5725490196078431,1);const float e6=0.75;const vec4 v6=vec4(0,1,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.1568627450980392,1,0.03137254901960784,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_24);float a1=smoothstep(e1,e2,x_24);float a2=smoothstep(e2,e3,x_24);float a3=smoothstep(e3,e4,x_24);float a4=smoothstep(e4,e5,x_24);float a5=smoothstep(e5,e6,x_24);float a6=smoothstep(e6,e7,x_24);float a7=smoothstep(e7,e8,x_24);return max(mix(v0,v1,a0)*step(e0,x_24)*step(x_24,e1),max(mix(v1,v2,a1)*step(e1,x_24)*step(x_24,e2),max(mix(v2,v3,a2)*step(e2,x_24)*step(x_24,e3),max(mix(v3,v4,a3)*step(e3,x_24)*step(x_24,e4),max(mix(v4,v5,a4)*step(e4,x_24)*step(x_24,e5),max(mix(v5,v6,a5)*step(e5,x_24)*step(x_24,e6),max(mix(v6,v7,a6)*step(e6,x_24)*step(x_24,e7),mix(v7,v8,a7)*step(e7,x_24)*step(x_24,e8))))))));}vec4 spring(float x_5){const float e0=0.0;const vec4 v0=vec4(1,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_5);return mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1);}vec4 summer(float x_12){const float e0=0.0;const vec4 v0=vec4(0,0.5019607843137255,0.4,1);const float e1=1.0;const vec4 v1=vec4(1,1,0.4,1);float a0=smoothstep(e0,e1,x_12);return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);}vec4 autumn(float x_25){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_25);return mix(v0,v1,a0)*step(e0,x_25)*step(x_25,e1);}vec4 winter(float x_16){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(0,1,0.5019607843137255,1);float a0=smoothstep(e0,e1,x_16);return mix(v0,v1,a0)*step(e0,x_16)*step(x_16,e1);}vec4 bone(float x_15){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.376;const vec4 v1=vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);const float e2=0.753;const vec4 v2=vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_15);float a1=smoothstep(e1,e2,x_15);float a2=smoothstep(e2,e3,x_15);return max(mix(v0,v1,a0)*step(e0,x_15)*step(x_15,e1),max(mix(v1,v2,a1)*step(e1,x_15)*step(x_15,e2),mix(v2,v3,a2)*step(e2,x_15)*step(x_15,e3)));}vec4 copper(float x_10){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.804;const vec4 v1=vec4(1,0.6274509803921569,0.4,1);const float e2=1.0;const vec4 v2=vec4(1,0.7803921568627451,0.4980392156862745,1);float a0=smoothstep(e0,e1,x_10);float a1=smoothstep(e1,e2,x_10);return max(mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1),mix(v1,v2,a1)*step(e1,x_10)*step(x_10,e2));}vec4 greys(float x_4){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_4);return mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1);}vec4 yignbu(float x_32){const float e0=0.0;const vec4 v0=vec4(0.03137254901960784,0.11372549019607843,0.34509803921568627,1);const float e1=0.125;const vec4 v1=vec4(0.1450980392156863,0.20392156862745098,0.5803921568627451,1);const float e2=0.25;const vec4 v2=vec4(0.13333333333333333,0.3686274509803922,0.6588235294117647,1);const float e3=0.375;const vec4 v3=vec4(0.11372549019607843,0.5686274509803921,0.7529411764705882,1);const float e4=0.5;const vec4 v4=vec4(0.2549019607843137,0.7137254901960784,0.7686274509803922,1);const float e5=0.625;const vec4 v5=vec4(0.4980392156862745,0.803921568627451,0.7333333333333333,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7058823529411765,1);const float e7=0.875;const vec4 v7=vec4(0.9294117647058824,0.9725490196078431,0.8509803921568627,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8509803921568627,1);float a0=smoothstep(e0,e1,x_32);float a1=smoothstep(e1,e2,x_32);float a2=smoothstep(e2,e3,x_32);float a3=smoothstep(e3,e4,x_32);float a4=smoothstep(e4,e5,x_32);float a5=smoothstep(e5,e6,x_32);float a6=smoothstep(e6,e7,x_32);float a7=smoothstep(e7,e8,x_32);return max(mix(v0,v1,a0)*step(e0,x_32)*step(x_32,e1),max(mix(v1,v2,a1)*step(e1,x_32)*step(x_32,e2),max(mix(v2,v3,a2)*step(e2,x_32)*step(x_32,e3),max(mix(v3,v4,a3)*step(e3,x_32)*step(x_32,e4),max(mix(v4,v5,a4)*step(e4,x_32)*step(x_32,e5),max(mix(v5,v6,a5)*step(e5,x_32)*step(x_32,e6),max(mix(v6,v7,a6)*step(e6,x_32)*step(x_32,e7),mix(v7,v8,a7)*step(e7,x_32)*step(x_32,e8))))))));}vec4 greens(float x_34){const float e0=0.0;const vec4 v0=vec4(0,0.26666666666666666,0.10588235294117647,1);const float e1=0.125;const vec4 v1=vec4(0,0.42745098039215684,0.17254901960784313,1);const float e2=0.25;const vec4 v2=vec4(0.13725490196078433,0.5450980392156862,0.27058823529411763,1);const float e3=0.375;const vec4 v3=vec4(0.2549019607843137,0.6705882352941176,0.36470588235294116,1);const float e4=0.5;const vec4 v4=vec4(0.4549019607843137,0.7686274509803922,0.4627450980392157,1);const float e5=0.625;const vec4 v5=vec4(0.6313725490196078,0.8509803921568627,0.6078431372549019,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7529411764705882,1);const float e7=0.875;const vec4 v7=vec4(0.8980392156862745,0.9607843137254902,0.8784313725490196,1);const float e8=1.0;const vec4 v8=vec4(0.9686274509803922,0.9882352941176471,0.9607843137254902,1);float a0=smoothstep(e0,e1,x_34);float a1=smoothstep(e1,e2,x_34);float a2=smoothstep(e2,e3,x_34);float a3=smoothstep(e3,e4,x_34);float a4=smoothstep(e4,e5,x_34);float a5=smoothstep(e5,e6,x_34);float a6=smoothstep(e6,e7,x_34);float a7=smoothstep(e7,e8,x_34);return max(mix(v0,v1,a0)*step(e0,x_34)*step(x_34,e1),max(mix(v1,v2,a1)*step(e1,x_34)*step(x_34,e2),max(mix(v2,v3,a2)*step(e2,x_34)*step(x_34,e3),max(mix(v3,v4,a3)*step(e3,x_34)*step(x_34,e4),max(mix(v4,v5,a4)*step(e4,x_34)*step(x_34,e5),max(mix(v5,v6,a5)*step(e5,x_34)*step(x_34,e6),max(mix(v6,v7,a6)*step(e6,x_34)*step(x_34,e7),mix(v7,v8,a7)*step(e7,x_34)*step(x_34,e8))))))));}vec4 yiorrd(float x_41){const float e0=0.0;const vec4 v0=vec4(0.5019607843137255,0,0.14901960784313725,1);const float e1=0.125;const vec4 v1=vec4(0.7411764705882353,0,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.8901960784313725,0.10196078431372549,0.10980392156862745,1);const float e3=0.375;const vec4 v3=vec4(0.9882352941176471,0.3058823529411765,0.16470588235294117,1);const float e4=0.5;const vec4 v4=vec4(0.9921568627450981,0.5529411764705883,0.23529411764705882,1);const float e5=0.625;const vec4 v5=vec4(0.996078431372549,0.6980392156862745,0.2980392156862745,1);const float e6=0.75;const vec4 v6=vec4(0.996078431372549,0.8509803921568627,0.4627450980392157,1);const float e7=0.875;const vec4 v7=vec4(1,0.9294117647058824,0.6274509803921569,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8,1);float a0=smoothstep(e0,e1,x_41);float a1=smoothstep(e1,e2,x_41);float a2=smoothstep(e2,e3,x_41);float a3=smoothstep(e3,e4,x_41);float a4=smoothstep(e4,e5,x_41);float a5=smoothstep(e5,e6,x_41);float a6=smoothstep(e6,e7,x_41);float a7=smoothstep(e7,e8,x_41);return max(mix(v0,v1,a0)*step(e0,x_41)*step(x_41,e1),max(mix(v1,v2,a1)*step(e1,x_41)*step(x_41,e2),max(mix(v2,v3,a2)*step(e2,x_41)*step(x_41,e3),max(mix(v3,v4,a3)*step(e3,x_41)*step(x_41,e4),max(mix(v4,v5,a4)*step(e4,x_41)*step(x_41,e5),max(mix(v5,v6,a5)*step(e5,x_41)*step(x_41,e6),max(mix(v6,v7,a6)*step(e6,x_41)*step(x_41,e7),mix(v7,v8,a7)*step(e7,x_41)*step(x_41,e8))))))));}vec4 bluered(float x_23){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_23);return mix(v0,v1,a0)*step(e0,x_23)*step(x_23,e1);}vec4 rdbu(float x_1){const float e0=0.0;const vec4 v0=vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);const float e1=0.35;const vec4 v1=vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);const float e2=0.5;const vec4 v2=vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);const float e3=0.6;const vec4 v3=vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);const float e4=0.7;const vec4 v4=vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);const float e5=1.0;const vec4 v5=vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);float a0=smoothstep(e0,e1,x_1);float a1=smoothstep(e1,e2,x_1);float a2=smoothstep(e2,e3,x_1);float a3=smoothstep(e3,e4,x_1);float a4=smoothstep(e4,e5,x_1);return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5)))));}vec4 picnic(float x_42){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=0.1;const vec4 v1=vec4(0.2,0.6,1,1);const float e2=0.2;const vec4 v2=vec4(0.4,0.8,1,1);const float e3=0.3;const vec4 v3=vec4(0.6,0.8,1,1);const float e4=0.4;const vec4 v4=vec4(0.8,0.8,1,1);const float e5=0.5;const vec4 v5=vec4(1,1,1,1);const float e6=0.6;const vec4 v6=vec4(1,0.8,1,1);const float e7=0.7;const vec4 v7=vec4(1,0.6,1,1);const float e8=0.8;const vec4 v8=vec4(1,0.4,0.8,1);const float e9=0.9;const vec4 v9=vec4(1,0.4,0.4,1);const float e10=1.0;const vec4 v10=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_42);float a1=smoothstep(e1,e2,x_42);float a2=smoothstep(e2,e3,x_42);float a3=smoothstep(e3,e4,x_42);float a4=smoothstep(e4,e5,x_42);float a5=smoothstep(e5,e6,x_42);float a6=smoothstep(e6,e7,x_42);float a7=smoothstep(e7,e8,x_42);float a8=smoothstep(e8,e9,x_42);float a9=smoothstep(e9,e10,x_42);return max(mix(v0,v1,a0)*step(e0,x_42)*step(x_42,e1),max(mix(v1,v2,a1)*step(e1,x_42)*step(x_42,e2),max(mix(v2,v3,a2)*step(e2,x_42)*step(x_42,e3),max(mix(v3,v4,a3)*step(e3,x_42)*step(x_42,e4),max(mix(v4,v5,a4)*step(e4,x_42)*step(x_42,e5),max(mix(v5,v6,a5)*step(e5,x_42)*step(x_42,e6),max(mix(v6,v7,a6)*step(e6,x_42)*step(x_42,e7),max(mix(v7,v8,a7)*step(e7,x_42)*step(x_42,e8),max(mix(v8,v9,a8)*step(e8,x_42)*step(x_42,e9),mix(v9,v10,a9)*step(e9,x_42)*step(x_42,e10))))))))));}vec4 rainbow(float x_31){const float e0=0.0;const vec4 v0=vec4(0.5882352941176471,0,0.35294117647058826,1);const float e1=0.125;const vec4 v1=vec4(0,0,0.7843137254901961,1);const float e2=0.25;const vec4 v2=vec4(0,0.09803921568627451,1,1);const float e3=0.375;const vec4 v3=vec4(0,0.596078431372549,1,1);const float e4=0.5;const vec4 v4=vec4(0.17254901960784313,1,0.5882352941176471,1);const float e5=0.625;const vec4 v5=vec4(0.592156862745098,1,0,1);const float e6=0.75;const vec4 v6=vec4(1,0.9176470588235294,0,1);const float e7=0.875;const vec4 v7=vec4(1,0.43529411764705883,0,1);const float e8=1.0;const vec4 v8=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_31);float a1=smoothstep(e1,e2,x_31);float a2=smoothstep(e2,e3,x_31);float a3=smoothstep(e3,e4,x_31);float a4=smoothstep(e4,e5,x_31);float a5=smoothstep(e5,e6,x_31);float a6=smoothstep(e6,e7,x_31);float a7=smoothstep(e7,e8,x_31);return max(mix(v0,v1,a0)*step(e0,x_31)*step(x_31,e1),max(mix(v1,v2,a1)*step(e1,x_31)*step(x_31,e2),max(mix(v2,v3,a2)*step(e2,x_31)*step(x_31,e3),max(mix(v3,v4,a3)*step(e3,x_31)*step(x_31,e4),max(mix(v4,v5,a4)*step(e4,x_31)*step(x_31,e5),max(mix(v5,v6,a5)*step(e5,x_31)*step(x_31,e6),max(mix(v6,v7,a6)*step(e6,x_31)*step(x_31,e7),mix(v7,v8,a7)*step(e7,x_31)*step(x_31,e8))))))));}vec4 portland(float x_21){const float e0=0.0;const vec4 v0=vec4(0.047058823529411764,0.2,0.5137254901960784,1);const float e1=0.25;const vec4 v1=vec4(0.0392156862745098,0.5333333333333333,0.7294117647058823,1);const float e2=0.5;const vec4 v2=vec4(0.9490196078431372,0.8274509803921568,0.2196078431372549,1);const float e3=0.75;const vec4 v3=vec4(0.9490196078431372,0.5607843137254902,0.2196078431372549,1);const float e4=1.0;const vec4 v4=vec4(0.8509803921568627,0.11764705882352941,0.11764705882352941,1);float a0=smoothstep(e0,e1,x_21);float a1=smoothstep(e1,e2,x_21);float a2=smoothstep(e2,e3,x_21);float a3=smoothstep(e3,e4,x_21);return max(mix(v0,v1,a0)*step(e0,x_21)*step(x_21,e1),max(mix(v1,v2,a1)*step(e1,x_21)*step(x_21,e2),max(mix(v2,v3,a2)*step(e2,x_21)*step(x_21,e3),mix(v3,v4,a3)*step(e3,x_21)*step(x_21,e4))));}vec4 blackbody(float x_38){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.2;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.4;const vec4 v2=vec4(0.9019607843137255,0.8235294117647058,0,1);const float e3=0.7;const vec4 v3=vec4(1,1,1,1);const float e4=1.0;const vec4 v4=vec4(0.6274509803921569,0.7843137254901961,1,1);float a0=smoothstep(e0,e1,x_38);float a1=smoothstep(e1,e2,x_38);float a2=smoothstep(e2,e3,x_38);float a3=smoothstep(e3,e4,x_38);return max(mix(v0,v1,a0)*step(e0,x_38)*step(x_38,e1),max(mix(v1,v2,a1)*step(e1,x_38)*step(x_38,e2),max(mix(v2,v3,a2)*step(e2,x_38)*step(x_38,e3),mix(v3,v4,a3)*step(e3,x_38)*step(x_38,e4))));}vec4 earth(float x_29){const float e0=0.0;const vec4 v0=vec4(0,0,0.5098039215686274,1);const float e1=0.1;const vec4 v1=vec4(0,0.7058823529411765,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(0.1568627450980392,0.8235294117647058,0.1568627450980392,1);const float e3=0.4;const vec4 v3=vec4(0.9019607843137255,0.9019607843137255,0.19607843137254902,1);const float e4=0.6;const vec4 v4=vec4(0.47058823529411764,0.27450980392156865,0.0784313725490196,1);const float e5=1.0;const vec4 v5=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_29);float a1=smoothstep(e1,e2,x_29);float a2=smoothstep(e2,e3,x_29);float a3=smoothstep(e3,e4,x_29);float a4=smoothstep(e4,e5,x_29);return max(mix(v0,v1,a0)*step(e0,x_29)*step(x_29,e1),max(mix(v1,v2,a1)*step(e1,x_29)*step(x_29,e2),max(mix(v2,v3,a2)*step(e2,x_29)*step(x_29,e3),max(mix(v3,v4,a3)*step(e3,x_29)*step(x_29,e4),mix(v4,v5,a4)*step(e4,x_29)*step(x_29,e5)))));}vec4 electric(float x_9){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.15;const vec4 v1=vec4(0.11764705882352941,0,0.39215686274509803,1);const float e2=0.4;const vec4 v2=vec4(0.47058823529411764,0,0.39215686274509803,1);const float e3=0.6;const vec4 v3=vec4(0.6274509803921569,0.35294117647058826,0,1);const float e4=0.8;const vec4 v4=vec4(0.9019607843137255,0.7843137254901961,0,1);const float e5=1.0;const vec4 v5=vec4(1,0.9803921568627451,0.8627450980392157,1);float a0=smoothstep(e0,e1,x_9);float a1=smoothstep(e1,e2,x_9);float a2=smoothstep(e2,e3,x_9);float a3=smoothstep(e3,e4,x_9);float a4=smoothstep(e4,e5,x_9);return max(mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1),max(mix(v1,v2,a1)*step(e1,x_9)*step(x_9,e2),max(mix(v2,v3,a2)*step(e2,x_9)*step(x_9,e3),max(mix(v3,v4,a3)*step(e3,x_9)*step(x_9,e4),mix(v4,v5,a4)*step(e4,x_9)*step(x_9,e5)))));}vec4 alpha(float x_0){const float e0=0.0;const vec4 v0=vec4(1,1,1,0);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_0);return mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1);}vec4 viridis(float x_22){const float e0=0.0;const vec4 v0=vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);const float e1=0.13;const vec4 v1=vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);const float e4=0.5;const vec4 v4=vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);const float e5=0.63;const vec4 v5=vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);const float e6=0.75;const vec4 v6=vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);const float e7=0.88;const vec4 v7=vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);float a0=smoothstep(e0,e1,x_22);float a1=smoothstep(e1,e2,x_22);float a2=smoothstep(e2,e3,x_22);float a3=smoothstep(e3,e4,x_22);float a4=smoothstep(e4,e5,x_22);float a5=smoothstep(e5,e6,x_22);float a6=smoothstep(e6,e7,x_22);float a7=smoothstep(e7,e8,x_22);return max(mix(v0,v1,a0)*step(e0,x_22)*step(x_22,e1),max(mix(v1,v2,a1)*step(e1,x_22)*step(x_22,e2),max(mix(v2,v3,a2)*step(e2,x_22)*step(x_22,e3),max(mix(v3,v4,a3)*step(e3,x_22)*step(x_22,e4),max(mix(v4,v5,a4)*step(e4,x_22)*step(x_22,e5),max(mix(v5,v6,a5)*step(e5,x_22)*step(x_22,e6),max(mix(v6,v7,a6)*step(e6,x_22)*step(x_22,e7),mix(v7,v8,a7)*step(e7,x_22)*step(x_22,e8))))))));}vec4 inferno(float x_30){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);const float e3=0.38;const vec4 v3=vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);const float e4=0.5;const vec4 v4=vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);const float e5=0.63;const vec4 v5=vec4(0.8901960784313725,0.34901960784313724,0.2,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,1,0.6431372549019608,1);float a0=smoothstep(e0,e1,x_30);float a1=smoothstep(e1,e2,x_30);float a2=smoothstep(e2,e3,x_30);float a3=smoothstep(e3,e4,x_30);float a4=smoothstep(e4,e5,x_30);float a5=smoothstep(e5,e6,x_30);float a6=smoothstep(e6,e7,x_30);float a7=smoothstep(e7,e8,x_30);return max(mix(v0,v1,a0)*step(e0,x_30)*step(x_30,e1),max(mix(v1,v2,a1)*step(e1,x_30)*step(x_30,e2),max(mix(v2,v3,a2)*step(e2,x_30)*step(x_30,e3),max(mix(v3,v4,a3)*step(e3,x_30)*step(x_30,e4),max(mix(v4,v5,a4)*step(e4,x_30)*step(x_30,e5),max(mix(v5,v6,a5)*step(e5,x_30)*step(x_30,e6),max(mix(v6,v7,a6)*step(e6,x_30)*step(x_30,e7),mix(v7,v8,a7)*step(e7,x_30)*step(x_30,e8))))))));}vec4 magma(float x_33){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);const float e2=0.25;const vec4 v2=vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);const float e4=0.5;const vec4 v4=vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);const float e6=0.75;const vec4 v6=vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);float a0=smoothstep(e0,e1,x_33);float a1=smoothstep(e1,e2,x_33);float a2=smoothstep(e2,e3,x_33);float a3=smoothstep(e3,e4,x_33);float a4=smoothstep(e4,e5,x_33);float a5=smoothstep(e5,e6,x_33);float a6=smoothstep(e6,e7,x_33);float a7=smoothstep(e7,e8,x_33);return max(mix(v0,v1,a0)*step(e0,x_33)*step(x_33,e1),max(mix(v1,v2,a1)*step(e1,x_33)*step(x_33,e2),max(mix(v2,v3,a2)*step(e2,x_33)*step(x_33,e3),max(mix(v3,v4,a3)*step(e3,x_33)*step(x_33,e4),max(mix(v4,v5,a4)*step(e4,x_33)*step(x_33,e5),max(mix(v5,v6,a5)*step(e5,x_33)*step(x_33,e6),max(mix(v6,v7,a6)*step(e6,x_33)*step(x_33,e7),mix(v7,v8,a7)*step(e7,x_33)*step(x_33,e8))))))));}vec4 plasma(float x_3){const float e0=0.0;const vec4 v0=vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);const float e1=0.13;const vec4 v1=vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);const float e2=0.25;const vec4 v2=vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);const float e4=0.5;const vec4 v4=vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);const float e6=0.75;const vec4 v6=vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);const float e7=0.88;const vec4 v7=vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);float a0=smoothstep(e0,e1,x_3);float a1=smoothstep(e1,e2,x_3);float a2=smoothstep(e2,e3,x_3);float a3=smoothstep(e3,e4,x_3);float a4=smoothstep(e4,e5,x_3);float a5=smoothstep(e5,e6,x_3);float a6=smoothstep(e6,e7,x_3);float a7=smoothstep(e7,e8,x_3);return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8))))))));}vec4 warm(float x_43){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.6745098039215687,0,0.7333333333333333,1);const float e2=0.25;const vec4 v2=vec4(0.8588235294117647,0,0.6666666666666666,1);const float e3=0.38;const vec4 v3=vec4(1,0,0.5098039215686274,1);const float e4=0.5;const vec4 v4=vec4(1,0.24705882352941178,0.2901960784313726,1);const float e5=0.63;const vec4 v5=vec4(1,0.4823529411764706,0,1);const float e6=0.75;const vec4 v6=vec4(0.9176470588235294,0.6901960784313725,0,1);const float e7=0.88;const vec4 v7=vec4(0.7450980392156863,0.8941176470588236,0,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_43);float a1=smoothstep(e1,e2,x_43);float a2=smoothstep(e2,e3,x_43);float a3=smoothstep(e3,e4,x_43);float a4=smoothstep(e4,e5,x_43);float a5=smoothstep(e5,e6,x_43);float a6=smoothstep(e6,e7,x_43);float a7=smoothstep(e7,e8,x_43);return max(mix(v0,v1,a0)*step(e0,x_43)*step(x_43,e1),max(mix(v1,v2,a1)*step(e1,x_43)*step(x_43,e2),max(mix(v2,v3,a2)*step(e2,x_43)*step(x_43,e3),max(mix(v3,v4,a3)*step(e3,x_43)*step(x_43,e4),max(mix(v4,v5,a4)*step(e4,x_43)*step(x_43,e5),max(mix(v5,v6,a5)*step(e5,x_43)*step(x_43,e6),max(mix(v6,v7,a6)*step(e6,x_43)*step(x_43,e7),mix(v7,v8,a7)*step(e7,x_43)*step(x_43,e8))))))));}vec4 rainbow_soft_1310269270(float x_14){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.1;const vec4 v1=vec4(0.7803921568627451,0,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(1,0,0.4745098039215686,1);const float e3=0.3;const vec4 v3=vec4(1,0.4235294117647059,0,1);const float e4=0.4;const vec4 v4=vec4(0.8705882352941177,0.7607843137254902,0,1);const float e5=0.5;const vec4 v5=vec4(0.5882352941176471,1,0,1);const float e6=0.6;const vec4 v6=vec4(0,1,0.21568627450980393,1);const float e7=0.7;const vec4 v7=vec4(0,0.9647058823529412,0.5882352941176471,1);const float e8=0.8;const vec4 v8=vec4(0.19607843137254902,0.6549019607843137,0.8705882352941177,1);const float e9=0.9;const vec4 v9=vec4(0.403921568627451,0.2,0.9215686274509803,1);const float e10=1.0;const vec4 v10=vec4(0.48627450980392156,0,0.7294117647058823,1);float a0=smoothstep(e0,e1,x_14);float a1=smoothstep(e1,e2,x_14);float a2=smoothstep(e2,e3,x_14);float a3=smoothstep(e3,e4,x_14);float a4=smoothstep(e4,e5,x_14);float a5=smoothstep(e5,e6,x_14);float a6=smoothstep(e6,e7,x_14);float a7=smoothstep(e7,e8,x_14);float a8=smoothstep(e8,e9,x_14);float a9=smoothstep(e9,e10,x_14);return max(mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1),max(mix(v1,v2,a1)*step(e1,x_14)*step(x_14,e2),max(mix(v2,v3,a2)*step(e2,x_14)*step(x_14,e3),max(mix(v3,v4,a3)*step(e3,x_14)*step(x_14,e4),max(mix(v4,v5,a4)*step(e4,x_14)*step(x_14,e5),max(mix(v5,v6,a5)*step(e5,x_14)*step(x_14,e6),max(mix(v6,v7,a6)*step(e6,x_14)*step(x_14,e7),max(mix(v7,v8,a7)*step(e7,x_14)*step(x_14,e8),max(mix(v8,v9,a8)*step(e8,x_14)*step(x_14,e9),mix(v9,v10,a9)*step(e9,x_14)*step(x_14,e10))))))))));}vec4 bathymetry(float x_36){const float e0=0.0;const vec4 v0=vec4(0.1568627450980392,0.10196078431372549,0.17254901960784313,1);const float e1=0.13;const vec4 v1=vec4(0.23137254901960785,0.19215686274509805,0.35294117647058826,1);const float e2=0.25;const vec4 v2=vec4(0.25098039215686274,0.2980392156862745,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.24705882352941178,0.43137254901960786,0.592156862745098,1);const float e4=0.5;const vec4 v4=vec4(0.2823529411764706,0.5568627450980392,0.6196078431372549,1);const float e5=0.63;const vec4 v5=vec4(0.3333333333333333,0.6823529411764706,0.6392156862745098,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.807843137254902,0.6392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.7333333333333333,0.9019607843137255,0.6745098039215687,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.996078431372549,0.8,1);float a0=smoothstep(e0,e1,x_36);float a1=smoothstep(e1,e2,x_36);float a2=smoothstep(e2,e3,x_36);float a3=smoothstep(e3,e4,x_36);float a4=smoothstep(e4,e5,x_36);float a5=smoothstep(e5,e6,x_36);float a6=smoothstep(e6,e7,x_36);float a7=smoothstep(e7,e8,x_36);return max(mix(v0,v1,a0)*step(e0,x_36)*step(x_36,e1),max(mix(v1,v2,a1)*step(e1,x_36)*step(x_36,e2),max(mix(v2,v3,a2)*step(e2,x_36)*step(x_36,e3),max(mix(v3,v4,a3)*step(e3,x_36)*step(x_36,e4),max(mix(v4,v5,a4)*step(e4,x_36)*step(x_36,e5),max(mix(v5,v6,a5)*step(e5,x_36)*step(x_36,e6),max(mix(v6,v7,a6)*step(e6,x_36)*step(x_36,e7),mix(v7,v8,a7)*step(e7,x_36)*step(x_36,e8))))))));}vec4 cdom(float x_7){const float e0=0.0;const vec4 v0=vec4(0.1843137254901961,0.058823529411764705,0.24313725490196078,1);const float e1=0.13;const vec4 v1=vec4(0.3411764705882353,0.09019607843137255,0.33725490196078434,1);const float e2=0.25;const vec4 v2=vec4(0.5098039215686274,0.10980392156862745,0.38823529411764707,1);const float e3=0.38;const vec4 v3=vec4(0.6705882352941176,0.1607843137254902,0.3764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.807843137254902,0.2627450980392157,0.33725490196078434,1);const float e5=0.63;const vec4 v5=vec4(0.9019607843137255,0.41568627450980394,0.32941176470588235,1);const float e6=0.75;const vec4 v6=vec4(0.9490196078431372,0.5843137254901961,0.403921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7568627450980392,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.9294117647058824,0.6901960784313725,1);float a0=smoothstep(e0,e1,x_7);float a1=smoothstep(e1,e2,x_7);float a2=smoothstep(e2,e3,x_7);float a3=smoothstep(e3,e4,x_7);float a4=smoothstep(e4,e5,x_7);float a5=smoothstep(e5,e6,x_7);float a6=smoothstep(e6,e7,x_7);float a7=smoothstep(e7,e8,x_7);return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8))))))));}vec4 chlorophyll(float x_6){const float e0=0.0;const vec4 v0=vec4(0.07058823529411765,0.1411764705882353,0.0784313725490196,1);const float e1=0.13;const vec4 v1=vec4(0.09803921568627451,0.24705882352941178,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.09411764705882353,0.3568627450980392,0.23137254901960785,1);const float e3=0.38;const vec4 v3=vec4(0.050980392156862744,0.4666666666666667,0.2823529411764706,1);const float e4=0.5;const vec4 v4=vec4(0.07058823529411765,0.5803921568627451,0.3137254901960784,1);const float e5=0.63;const vec4 v5=vec4(0.3137254901960784,0.6784313725490196,0.34901960784313724,1);const float e6=0.75;const vec4 v6=vec4(0.5176470588235295,0.7686274509803922,0.47843137254901963,1);const float e7=0.88;const vec4 v7=vec4(0.6862745098039216,0.8666666666666667,0.6352941176470588,1);const float e8=1.0;const vec4 v8=vec4(0.8431372549019608,0.9764705882352941,0.8156862745098039,1);float a0=smoothstep(e0,e1,x_6);float a1=smoothstep(e1,e2,x_6);float a2=smoothstep(e2,e3,x_6);float a3=smoothstep(e3,e4,x_6);float a4=smoothstep(e4,e5,x_6);float a5=smoothstep(e5,e6,x_6);float a6=smoothstep(e6,e7,x_6);float a7=smoothstep(e7,e8,x_6);return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),max(mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2),max(mix(v2,v3,a2)*step(e2,x_6)*step(x_6,e3),max(mix(v3,v4,a3)*step(e3,x_6)*step(x_6,e4),max(mix(v4,v5,a4)*step(e4,x_6)*step(x_6,e5),max(mix(v5,v6,a5)*step(e5,x_6)*step(x_6,e6),max(mix(v6,v7,a6)*step(e6,x_6)*step(x_6,e7),mix(v7,v8,a7)*step(e7,x_6)*step(x_6,e8))))))));}vec4 density(float x_19){const float e0=0.0;const vec4 v0=vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);const float e2=0.25;const vec4 v2=vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);const float e3=0.38;const vec4 v3=vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);const float e4=0.5;const vec4 v4=vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);const float e5=0.63;const vec4 v5=vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);const float e6=0.75;const vec4 v6=vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);const float e7=0.88;const vec4 v7=vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);const float e8=1.0;const vec4 v8=vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);float a0=smoothstep(e0,e1,x_19);float a1=smoothstep(e1,e2,x_19);float a2=smoothstep(e2,e3,x_19);float a3=smoothstep(e3,e4,x_19);float a4=smoothstep(e4,e5,x_19);float a5=smoothstep(e5,e6,x_19);float a6=smoothstep(e6,e7,x_19);float a7=smoothstep(e7,e8,x_19);return max(mix(v0,v1,a0)*step(e0,x_19)*step(x_19,e1),max(mix(v1,v2,a1)*step(e1,x_19)*step(x_19,e2),max(mix(v2,v3,a2)*step(e2,x_19)*step(x_19,e3),max(mix(v3,v4,a3)*step(e3,x_19)*step(x_19,e4),max(mix(v4,v5,a4)*step(e4,x_19)*step(x_19,e5),max(mix(v5,v6,a5)*step(e5,x_19)*step(x_19,e6),max(mix(v6,v7,a6)*step(e6,x_19)*step(x_19,e7),mix(v7,v8,a7)*step(e7,x_19)*step(x_19,e8))))))));}vec4 freesurface_blue_3154355989(float x_35){const float e0=0.0;const vec4 v0=vec4(0.11764705882352941,0.01568627450980392,0.43137254901960786,1);const float e1=0.13;const vec4 v1=vec4(0.1843137254901961,0.054901960784313725,0.6901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.1607843137254902,0.17647058823529413,0.9254901960784314,1);const float e3=0.38;const vec4 v3=vec4(0.09803921568627451,0.38823529411764707,0.8313725490196079,1);const float e4=0.5;const vec4 v4=vec4(0.26666666666666666,0.5137254901960784,0.7843137254901961,1);const float e5=0.63;const vec4 v5=vec4(0.4470588235294118,0.611764705882353,0.7725490196078432,1);const float e6=0.75;const vec4 v6=vec4(0.615686274509804,0.7098039215686275,0.796078431372549,1);const float e7=0.88;const vec4 v7=vec4(0.7843137254901961,0.8156862745098039,0.8470588235294118,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_35);float a1=smoothstep(e1,e2,x_35);float a2=smoothstep(e2,e3,x_35);float a3=smoothstep(e3,e4,x_35);float a4=smoothstep(e4,e5,x_35);float a5=smoothstep(e5,e6,x_35);float a6=smoothstep(e6,e7,x_35);float a7=smoothstep(e7,e8,x_35);return max(mix(v0,v1,a0)*step(e0,x_35)*step(x_35,e1),max(mix(v1,v2,a1)*step(e1,x_35)*step(x_35,e2),max(mix(v2,v3,a2)*step(e2,x_35)*step(x_35,e3),max(mix(v3,v4,a3)*step(e3,x_35)*step(x_35,e4),max(mix(v4,v5,a4)*step(e4,x_35)*step(x_35,e5),max(mix(v5,v6,a5)*step(e5,x_35)*step(x_35,e6),max(mix(v6,v7,a6)*step(e6,x_35)*step(x_35,e7),mix(v7,v8,a7)*step(e7,x_35)*step(x_35,e8))))))));}vec4 freesurface_red_1679163293(float x_20){const float e0=0.0;const vec4 v0=vec4(0.23529411764705882,0.03529411764705882,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.39215686274509803,0.06666666666666667,0.10588235294117647,1);const float e2=0.25;const vec4 v2=vec4(0.5568627450980392,0.0784313725490196,0.11372549019607843,1);const float e3=0.38;const vec4 v3=vec4(0.6941176470588235,0.16862745098039217,0.10588235294117647,1);const float e4=0.5;const vec4 v4=vec4(0.7529411764705882,0.3411764705882353,0.24705882352941178,1);const float e5=0.63;const vec4 v5=vec4(0.803921568627451,0.49019607843137253,0.4117647058823529,1);const float e6=0.75;const vec4 v6=vec4(0.8470588235294118,0.6352941176470588,0.5803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.8901960784313725,0.7803921568627451,0.7568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_20);float a1=smoothstep(e1,e2,x_20);float a2=smoothstep(e2,e3,x_20);float a3=smoothstep(e3,e4,x_20);float a4=smoothstep(e4,e5,x_20);float a5=smoothstep(e5,e6,x_20);float a6=smoothstep(e6,e7,x_20);float a7=smoothstep(e7,e8,x_20);return max(mix(v0,v1,a0)*step(e0,x_20)*step(x_20,e1),max(mix(v1,v2,a1)*step(e1,x_20)*step(x_20,e2),max(mix(v2,v3,a2)*step(e2,x_20)*step(x_20,e3),max(mix(v3,v4,a3)*step(e3,x_20)*step(x_20,e4),max(mix(v4,v5,a4)*step(e4,x_20)*step(x_20,e5),max(mix(v5,v6,a5)*step(e5,x_20)*step(x_20,e6),max(mix(v6,v7,a6)*step(e6,x_20)*step(x_20,e7),mix(v7,v8,a7)*step(e7,x_20)*step(x_20,e8))))))));}vec4 oxygen(float x_11){const float e0=0.0;const vec4 v0=vec4(0.25098039215686274,0.0196078431372549,0.0196078431372549,1);const float e1=0.13;const vec4 v1=vec4(0.41568627450980394,0.023529411764705882,0.058823529411764705,1);const float e2=0.25;const vec4 v2=vec4(0.5647058823529412,0.10196078431372549,0.027450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.25098039215686274,0.011764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.7372549019607844,0.39215686274509803,0.01568627450980392,1);const float e5=0.63;const vec4 v5=vec4(0.807843137254902,0.5333333333333333,0.043137254901960784,1);const float e6=0.75;const vec4 v6=vec4(0.8627450980392157,0.6823529411764706,0.09803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9058823529411765,0.8431372549019608,0.17254901960784313,1);const float e8=1.0;const vec4 v8=vec4(0.9725490196078431,0.996078431372549,0.4117647058823529,1);float a0=smoothstep(e0,e1,x_11);float a1=smoothstep(e1,e2,x_11);float a2=smoothstep(e2,e3,x_11);float a3=smoothstep(e3,e4,x_11);float a4=smoothstep(e4,e5,x_11);float a5=smoothstep(e5,e6,x_11);float a6=smoothstep(e6,e7,x_11);float a7=smoothstep(e7,e8,x_11);return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),max(mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3),max(mix(v3,v4,a3)*step(e3,x_11)*step(x_11,e4),max(mix(v4,v5,a4)*step(e4,x_11)*step(x_11,e5),max(mix(v5,v6,a5)*step(e5,x_11)*step(x_11,e6),max(mix(v6,v7,a6)*step(e6,x_11)*step(x_11,e7),mix(v7,v8,a7)*step(e7,x_11)*step(x_11,e8))))))));}vec4 par(float x_28){const float e0=0.0;const vec4 v0=vec4(0.2,0.0784313725490196,0.09411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.35294117647058826,0.12549019607843137,0.13725490196078433,1);const float e2=0.25;const vec4 v2=vec4(0.5058823529411764,0.17254901960784313,0.13333333333333333,1);const float e3=0.38;const vec4 v3=vec4(0.6235294117647059,0.26666666666666666,0.09803921568627451,1);const float e4=0.5;const vec4 v4=vec4(0.7137254901960784,0.38823529411764707,0.07450980392156863,1);const float e5=0.63;const vec4 v5=vec4(0.7803921568627451,0.5254901960784314,0.08627450980392157,1);const float e6=0.75;const vec4 v6=vec4(0.8313725490196079,0.6705882352941176,0.13725490196078433,1);const float e7=0.88;const vec4 v7=vec4(0.8666666666666667,0.8235294117647058,0.21176470588235294,1);const float e8=1.0;const vec4 v8=vec4(0.8823529411764706,0.9921568627450981,0.29411764705882354,1);float a0=smoothstep(e0,e1,x_28);float a1=smoothstep(e1,e2,x_28);float a2=smoothstep(e2,e3,x_28);float a3=smoothstep(e3,e4,x_28);float a4=smoothstep(e4,e5,x_28);float a5=smoothstep(e5,e6,x_28);float a6=smoothstep(e6,e7,x_28);float a7=smoothstep(e7,e8,x_28);return max(mix(v0,v1,a0)*step(e0,x_28)*step(x_28,e1),max(mix(v1,v2,a1)*step(e1,x_28)*step(x_28,e2),max(mix(v2,v3,a2)*step(e2,x_28)*step(x_28,e3),max(mix(v3,v4,a3)*step(e3,x_28)*step(x_28,e4),max(mix(v4,v5,a4)*step(e4,x_28)*step(x_28,e5),max(mix(v5,v6,a5)*step(e5,x_28)*step(x_28,e6),max(mix(v6,v7,a6)*step(e6,x_28)*step(x_28,e7),mix(v7,v8,a7)*step(e7,x_28)*step(x_28,e8))))))));}vec4 phase(float x_39){const float e0=0.0;const vec4 v0=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.7215686274509804,0.2784313725490196,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.7294117647058823,0.22745098039215686,0.45098039215686275,1);const float e3=0.38;const vec4 v3=vec4(0.6274509803921569,0.2784313725490196,0.7254901960784313,1);const float e4=0.5;const vec4 v4=vec4(0.43137254901960786,0.3803921568627451,0.8549019607843137,1);const float e5=0.63;const vec4 v5=vec4(0.19607843137254902,0.4823529411764706,0.6431372549019608,1);const float e6=0.75;const vec4 v6=vec4(0.12156862745098039,0.5137254901960784,0.43137254901960786,1);const float e7=0.88;const vec4 v7=vec4(0.30196078431372547,0.5058823529411764,0.13333333333333333,1);const float e8=1.0;const vec4 v8=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);float a0=smoothstep(e0,e1,x_39);float a1=smoothstep(e1,e2,x_39);float a2=smoothstep(e2,e3,x_39);float a3=smoothstep(e3,e4,x_39);float a4=smoothstep(e4,e5,x_39);float a5=smoothstep(e5,e6,x_39);float a6=smoothstep(e6,e7,x_39);float a7=smoothstep(e7,e8,x_39);return max(mix(v0,v1,a0)*step(e0,x_39)*step(x_39,e1),max(mix(v1,v2,a1)*step(e1,x_39)*step(x_39,e2),max(mix(v2,v3,a2)*step(e2,x_39)*step(x_39,e3),max(mix(v3,v4,a3)*step(e3,x_39)*step(x_39,e4),max(mix(v4,v5,a4)*step(e4,x_39)*step(x_39,e5),max(mix(v5,v6,a5)*step(e5,x_39)*step(x_39,e6),max(mix(v6,v7,a6)*step(e6,x_39)*step(x_39,e7),mix(v7,v8,a7)*step(e7,x_39)*step(x_39,e8))))))));}vec4 salinity(float x_26){const float e0=0.0;const vec4 v0=vec4(0.16470588235294117,0.09411764705882353,0.4235294117647059,1);const float e1=0.13;const vec4 v1=vec4(0.12941176470588237,0.19607843137254902,0.6352941176470588,1);const float e2=0.25;const vec4 v2=vec4(0.058823529411764705,0.35294117647058826,0.5686274509803921,1);const float e3=0.38;const vec4 v3=vec4(0.1568627450980392,0.4627450980392157,0.5372549019607843,1);const float e4=0.5;const vec4 v4=vec4(0.23137254901960785,0.5725490196078431,0.5294117647058824,1);const float e5=0.63;const vec4 v5=vec4(0.30980392156862746,0.6862745098039216,0.49411764705882355,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.796078431372549,0.40784313725490196,1);const float e7=0.88;const vec4 v7=vec4(0.7568627450980392,0.8666666666666667,0.39215686274509803,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9372549019607843,0.6039215686274509,1);float a0=smoothstep(e0,e1,x_26);float a1=smoothstep(e1,e2,x_26);float a2=smoothstep(e2,e3,x_26);float a3=smoothstep(e3,e4,x_26);float a4=smoothstep(e4,e5,x_26);float a5=smoothstep(e5,e6,x_26);float a6=smoothstep(e6,e7,x_26);float a7=smoothstep(e7,e8,x_26);return max(mix(v0,v1,a0)*step(e0,x_26)*step(x_26,e1),max(mix(v1,v2,a1)*step(e1,x_26)*step(x_26,e2),max(mix(v2,v3,a2)*step(e2,x_26)*step(x_26,e3),max(mix(v3,v4,a3)*step(e3,x_26)*step(x_26,e4),max(mix(v4,v5,a4)*step(e4,x_26)*step(x_26,e5),max(mix(v5,v6,a5)*step(e5,x_26)*step(x_26,e6),max(mix(v6,v7,a6)*step(e6,x_26)*step(x_26,e7),mix(v7,v8,a7)*step(e7,x_26)*step(x_26,e8))))))));}vec4 temperature(float x_8){const float e0=0.0;const vec4 v0=vec4(0.01568627450980392,0.13725490196078433,0.2,1);const float e1=0.13;const vec4 v1=vec4(0.09019607843137255,0.2,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.23137254901960785,0.615686274509804,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.30980392156862746,0.5607843137254902,1);const float e4=0.5;const vec4 v4=vec4(0.6862745098039216,0.37254901960784315,0.5098039215686274,1);const float e5=0.63;const vec4 v5=vec4(0.8705882352941177,0.4392156862745098,0.396078431372549,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5725490196078431,0.25882352941176473,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7686274509803922,0.2549019607843137,1);const float e8=1.0;const vec4 v8=vec4(0.9098039215686274,0.9803921568627451,0.3568627450980392,1);float a0=smoothstep(e0,e1,x_8);float a1=smoothstep(e1,e2,x_8);float a2=smoothstep(e2,e3,x_8);float a3=smoothstep(e3,e4,x_8);float a4=smoothstep(e4,e5,x_8);float a5=smoothstep(e5,e6,x_8);float a6=smoothstep(e6,e7,x_8);float a7=smoothstep(e7,e8,x_8);return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),max(mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5),max(mix(v5,v6,a5)*step(e5,x_8)*step(x_8,e6),max(mix(v6,v7,a6)*step(e6,x_8)*step(x_8,e7),mix(v7,v8,a7)*step(e7,x_8)*step(x_8,e8))))))));}vec4 turbidity(float x_40){const float e0=0.0;const vec4 v0=vec4(0.13333333333333333,0.12156862745098039,0.10588235294117647,1);const float e1=0.13;const vec4 v1=vec4(0.2549019607843137,0.19607843137254902,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.27058823529411763,0.20392156862745098,1);const float e3=0.38;const vec4 v3=vec4(0.5137254901960784,0.34901960784313724,0.2235294117647059,1);const float e4=0.5;const vec4 v4=vec4(0.6313725490196078,0.4392156862745098,0.23137254901960785,1);const float e5=0.63;const vec4 v5=vec4(0.7254901960784313,0.5490196078431373,0.25882352941176473,1);const float e6=0.75;const vec4 v6=vec4(0.792156862745098,0.6823529411764706,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.8470588235294118,0.8196078431372549,0.49411764705882355,1);const float e8=1.0;const vec4 v8=vec4(0.9137254901960784,0.9647058823529412,0.6705882352941176,1);float a0=smoothstep(e0,e1,x_40);float a1=smoothstep(e1,e2,x_40);float a2=smoothstep(e2,e3,x_40);float a3=smoothstep(e3,e4,x_40);float a4=smoothstep(e4,e5,x_40);float a5=smoothstep(e5,e6,x_40);float a6=smoothstep(e6,e7,x_40);float a7=smoothstep(e7,e8,x_40);return max(mix(v0,v1,a0)*step(e0,x_40)*step(x_40,e1),max(mix(v1,v2,a1)*step(e1,x_40)*step(x_40,e2),max(mix(v2,v3,a2)*step(e2,x_40)*step(x_40,e3),max(mix(v3,v4,a3)*step(e3,x_40)*step(x_40,e4),max(mix(v4,v5,a4)*step(e4,x_40)*step(x_40,e5),max(mix(v5,v6,a5)*step(e5,x_40)*step(x_40,e6),max(mix(v6,v7,a6)*step(e6,x_40)*step(x_40,e7),mix(v7,v8,a7)*step(e7,x_40)*step(x_40,e8))))))));}vec4 velocity_blue_297387650(float x_2){const float e0=0.0;const vec4 v0=vec4(0.06666666666666667,0.12549019607843137,0.25098039215686274,1);const float e1=0.13;const vec4 v1=vec4(0.13725490196078433,0.20392156862745098,0.4549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.11372549019607843,0.3176470588235294,0.611764705882353,1);const float e3=0.38;const vec4 v3=vec4(0.12156862745098039,0.44313725490196076,0.6352941176470588,1);const float e4=0.5;const vec4 v4=vec4(0.19607843137254902,0.5647058823529412,0.6627450980392157,1);const float e5=0.63;const vec4 v5=vec4(0.3411764705882353,0.6784313725490196,0.6901960784313725,1);const float e6=0.75;const vec4 v6=vec4(0.5843137254901961,0.7686274509803922,0.7411764705882353,1);const float e7=0.88;const vec4 v7=vec4(0.796078431372549,0.8666666666666667,0.8274509803921568,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.984313725490196,0.9019607843137255,1);float a0=smoothstep(e0,e1,x_2);float a1=smoothstep(e1,e2,x_2);float a2=smoothstep(e2,e3,x_2);float a3=smoothstep(e3,e4,x_2);float a4=smoothstep(e4,e5,x_2);float a5=smoothstep(e5,e6,x_2);float a6=smoothstep(e6,e7,x_2);float a7=smoothstep(e7,e8,x_2);return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8))))))));}vec4 velocity_green_2558432129(float x_27){const float e0=0.0;const vec4 v0=vec4(0.09019607843137255,0.13725490196078433,0.07450980392156863,1);const float e1=0.13;const vec4 v1=vec4(0.09411764705882353,0.25098039215686274,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.043137254901960784,0.37254901960784315,0.17647058823529413,1);const float e3=0.38;const vec4 v3=vec4(0.15294117647058825,0.4823529411764706,0.13725490196078433,1);const float e4=0.5;const vec4 v4=vec4(0.37254901960784315,0.5725490196078431,0.047058823529411764,1);const float e5=0.63;const vec4 v5=vec4(0.596078431372549,0.6470588235294118,0.07058823529411765,1);const float e6=0.75;const vec4 v6=vec4(0.788235294117647,0.7294117647058823,0.27058823529411763,1);const float e7=0.88;const vec4 v7=vec4(0.9137254901960784,0.8470588235294118,0.5372549019607843,1);const float e8=1.0;const vec4 v8=vec4(1,0.9921568627450981,0.803921568627451,1);float a0=smoothstep(e0,e1,x_27);float a1=smoothstep(e1,e2,x_27);float a2=smoothstep(e2,e3,x_27);float a3=smoothstep(e3,e4,x_27);float a4=smoothstep(e4,e5,x_27);float a5=smoothstep(e5,e6,x_27);float a6=smoothstep(e6,e7,x_27);float a7=smoothstep(e7,e8,x_27);return max(mix(v0,v1,a0)*step(e0,x_27)*step(x_27,e1),max(mix(v1,v2,a1)*step(e1,x_27)*step(x_27,e2),max(mix(v2,v3,a2)*step(e2,x_27)*step(x_27,e3),max(mix(v3,v4,a3)*step(e3,x_27)*step(x_27,e4),max(mix(v4,v5,a4)*step(e4,x_27)*step(x_27,e5),max(mix(v5,v6,a5)*step(e5,x_27)*step(x_27,e6),max(mix(v6,v7,a6)*step(e6,x_27)*step(x_27,e7),mix(v7,v8,a7)*step(e7,x_27)*step(x_27,e8))))))));}vec4 cubehelix(float x_37){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.07;const vec4 v1=vec4(0.08627450980392157,0.0196078431372549,0.23137254901960785,1);const float e2=0.13;const vec4 v2=vec4(0.23529411764705882,0.01568627450980392,0.4117647058823529,1);const float e3=0.2;const vec4 v3=vec4(0.42745098039215684,0.00392156862745098,0.5294117647058824,1);const float e4=0.27;const vec4 v4=vec4(0.6313725490196078,0,0.5764705882352941,1);const float e5=0.33;const vec4 v5=vec4(0.8235294117647058,0.00784313725490196,0.5568627450980392,1);const float e6=0.4;const vec4 v6=vec4(0.984313725490196,0.043137254901960784,0.4823529411764706,1);const float e7=0.47;const vec4 v7=vec4(1,0.11372549019607843,0.3803921568627451,1);const float e8=0.53;const vec4 v8=vec4(1,0.21176470588235294,0.27058823529411763,1);const float e9=0.6;const vec4 v9=vec4(1,0.3333333333333333,0.1803921568627451,1);const float e10=0.67;const vec4 v10=vec4(1,0.47058823529411764,0.13333333333333333,1);const float e11=0.73;const vec4 v11=vec4(1,0.615686274509804,0.1450980392156863,1);const float e12=0.8;const vec4 v12=vec4(0.9450980392156862,0.7490196078431373,0.2235294117647059,1);const float e13=0.87;const vec4 v13=vec4(0.8784313725490196,0.8627450980392157,0.36470588235294116,1);const float e14=0.93;const vec4 v14=vec4(0.8549019607843137,0.9450980392156862,0.5568627450980392,1);const float e15=1.0;const vec4 v15=vec4(0.8901960784313725,0.9921568627450981,0.7764705882352941,1);float a0=smoothstep(e0,e1,x_37);float a1=smoothstep(e1,e2,x_37);float a2=smoothstep(e2,e3,x_37);float a3=smoothstep(e3,e4,x_37);float a4=smoothstep(e4,e5,x_37);float a5=smoothstep(e5,e6,x_37);float a6=smoothstep(e6,e7,x_37);float a7=smoothstep(e7,e8,x_37);float a8=smoothstep(e8,e9,x_37);float a9=smoothstep(e9,e10,x_37);float a10=smoothstep(e10,e11,x_37);float a11=smoothstep(e11,e12,x_37);float a12=smoothstep(e12,e13,x_37);float a13=smoothstep(e13,e14,x_37);float a14=smoothstep(e14,e15,x_37);return max(mix(v0,v1,a0)*step(e0,x_37)*step(x_37,e1),max(mix(v1,v2,a1)*step(e1,x_37)*step(x_37,e2),max(mix(v2,v3,a2)*step(e2,x_37)*step(x_37,e3),max(mix(v3,v4,a3)*step(e3,x_37)*step(x_37,e4),max(mix(v4,v5,a4)*step(e4,x_37)*step(x_37,e5),max(mix(v5,v6,a5)*step(e5,x_37)*step(x_37,e6),max(mix(v6,v7,a6)*step(e6,x_37)*step(x_37,e7),max(mix(v7,v8,a7)*step(e7,x_37)*step(x_37,e8),max(mix(v8,v9,a8)*step(e8,x_37)*step(x_37,e9),max(mix(v9,v10,a9)*step(e9,x_37)*step(x_37,e10),max(mix(v10,v11,a10)*step(e10,x_37)*step(x_37,e11),max(mix(v11,v12,a11)*step(e11,x_37)*step(x_37,e12),max(mix(v12,v13,a12)*step(e12,x_37)*step(x_37,e13),max(mix(v13,v14,a13)*step(e13,x_37)*step(x_37,e14),mix(v14,v15,a14)*step(e14,x_37)*step(x_37,e15)))))))))))))));}vec4 apply_transparent_color_452471729(vec3 color,vec3 transparentColor,bool useTransparentColor,float opacity){return vec4(color,(color==transparentColor&&useTransparentColor)? 0. : opacity);}uniform float opacity;uniform bool useTransparentColor;vec4 colormap(float intensity){return vec4(apply_transparent_color_452471729(COLORMAP_FUNCTION(min(1.,intensity)).xyz,COLORMAP_FUNCTION(0.).xyz,useTransparentColor,opacity));}\"; // eslint-disable-line\n\nvar additiveColormap = {\n name: 'additive-colormap',\n fs: fs$2,\n inject: {\n 'fs:DECKGL_MUTATE_COLOR': `\n float intensityCombo = 0.;\n intensityCombo += max(0.,intensity0);\n intensityCombo += max(0.,intensity1);\n intensityCombo += max(0.,intensity2);\n intensityCombo += max(0.,intensity3);\n intensityCombo += max(0.,intensity4);\n intensityCombo += max(0.,intensity5);\n rgba = colormap(intensityCombo);\n`\n }\n};\n\nconst defaultProps$6 = {\n colormap: {\n type: 'string',\n value: 'viridis',\n compare: true\n },\n opacity: {\n type: 'number',\n value: 1.0,\n compare: true\n },\n useTransparentColor: {\n type: 'boolean',\n value: false,\n compare: true\n }\n};\n/**\n * This deck.gl extension allows for a color palette to be used for pseudo-coloring channels.\n * @typedef LayerProps\n * @type {object}\n * @property {number=} opacity Opacity of the layer.\n * @property {string=} colormap String indicating a colormap (default: ''). The full list of options is here: https://github.com/glslify/glsl-colormap#glsl-colormap\n * @property {boolean=} useTransparentColor Indicates whether the shader should make the output of colormap_function(0) color transparent\n * */\n\nconst AdditiveColormapExtension = class extends LayerExtension {\n getShaders() {\n return {\n defines: {\n COLORMAP_FUNCTION: this?.props?.colormap || defaultProps$6.colormap.value\n },\n modules: [additiveColormap]\n };\n }\n\n updateState({\n props,\n oldProps,\n changeFlags,\n ...rest\n }) {\n super.updateState({\n props,\n oldProps,\n changeFlags,\n ...rest\n });\n\n if (props.colormap !== oldProps.colormap) {\n const {\n gl\n } = this.context;\n\n if (this.state.model) {\n this.state.model.delete();\n this.setState({\n model: this._getModel(gl)\n });\n }\n }\n }\n\n draw() {\n const {\n useTransparentColor = defaultProps$6.useTransparentColor.value,\n opacity = defaultProps$6.opacity.value\n } = this.props;\n const uniforms = {\n opacity,\n useTransparentColor\n }; // eslint-disable-next-line no-unused-expressions\n\n this.state.model?.setUniforms(uniforms);\n }\n\n};\nAdditiveColormapExtension.extensionName = 'AdditiveColormapExtension';\nAdditiveColormapExtension.defaultProps = defaultProps$6;\n\nconst defaultProps$5 = {\n pickable: {\n type: 'boolean',\n value: true,\n compare: true\n },\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n contrastLimits: {\n type: 'array',\n value: [],\n compare: true\n },\n channelsVisible: {\n type: 'array',\n value: [],\n compare: true\n },\n selections: {\n type: 'array',\n value: [],\n compare: true\n },\n domain: {\n type: 'array',\n value: [],\n compare: true\n },\n viewportId: {\n type: 'string',\n value: '',\n compare: true\n },\n loader: {\n type: 'object',\n value: {\n getRaster: async () => ({\n data: [],\n height: 0,\n width: 0\n }),\n dtype: 'Uint16'\n },\n compare: true\n },\n onClick: {\n type: 'function',\n value: null,\n compare: true\n },\n onViewportLoad: {\n type: 'function',\n value: null,\n compare: true\n },\n interpolation: {\n type: 'number',\n value: GL.NEAREST,\n compare: true\n },\n extensions: {\n type: 'array',\n value: [new ColorPaletteExtension()],\n compare: true\n }\n};\n/**\n * @typedef LayerProps\n * @type {Object}\n * @property {Array.<Array.<number>>} contrastLimits List of [begin, end] values to control each channel's ramp function.\n * @property {Array.<boolean>} channelsVisible List of boolean values for each channel for whether or not it is visible.\n * @property {Object} loader PixelSource. Represents an N-dimensional image.\n * @property {Array} selections Selection to be used for fetching data.\n * @property {Array.<Array.<number>>=} domain Override for the possible max/min values (i.e something different than 65535 for uint16/'<u2').\n * @property {string=} viewportId Id for the current view. This needs to match the viewState id in deck.gl and is necessary for the lens.\n * @property {function=} onHover Hook function from deck.gl to handle hover objects.\n * @property {function=} onClick Hook function from deck.gl to handle clicked-on objects.\n * @property {Object=} modelMatrix Math.gl Matrix4 object containing an affine transformation to be applied to the image.\n * @property {function=} onViewportLoad Function that gets called when the data in the viewport loads.\n * @property {String=} id Unique identifier for this layer.\n * @property {Array=} extensions [deck.gl extensions](https://deck.gl/docs/developer-guide/custom-layers/layer-extensions) to add to the layers.\n */\n\n/**\n * @type {{ new <S extends string[]>(...props: import('../types').Viv<LayerProps, S>[]) }}\n * @ignore\n */\n\nconst ImageLayer = class extends CompositeLayer {\n finalizeState() {\n this.state.abortController.abort();\n }\n\n updateState({\n props,\n oldProps\n }) {\n const loaderChanged = props.loader !== oldProps.loader;\n const selectionsChanged = props.selections !== oldProps.selections;\n\n if (loaderChanged || selectionsChanged) {\n // Only fetch new data to render if loader has changed\n const {\n loader,\n selections = [],\n onViewportLoad\n } = this.props;\n const abortController = new AbortController();\n this.setState({\n abortController\n });\n const {\n signal\n } = abortController;\n\n const getRaster = selection => loader.getRaster({\n selection,\n signal\n });\n\n const dataPromises = selections.map(getRaster);\n Promise.all(dataPromises).then(rasters => {\n const raster = {\n data: rasters.map(d => d.data),\n width: rasters[0].width,\n height: rasters[0].height\n };\n\n if (isInterleaved(loader.shape)) {\n // data is for BitmapLayer and needs to be of form { data: Uint8Array, width, height };\n // eslint-disable-next-line prefer-destructuring\n raster.data = raster.data[0];\n\n if (raster.data.length === raster.width * raster.height * 3) {\n // data is RGB (not RGBA) and need to update texture formats\n raster.format = GL.RGB;\n raster.dataFormat = GL.RGB;\n }\n }\n\n if (onViewportLoad) {\n onViewportLoad(raster);\n }\n\n this.setState({ ...raster\n });\n }).catch(e => {\n if (e !== SIGNAL_ABORTED) {\n throw e; // re-throws error if not our signal\n }\n });\n }\n } // eslint-disable-next-line class-methods-use-this\n\n\n getPickingInfo({\n info,\n sourceLayer\n }) {\n // eslint-disable-next-line no-param-reassign\n info.sourceLayer = sourceLayer; // eslint-disable-next-line no-param-reassign\n\n info.tile = sourceLayer.props.tile;\n return info;\n }\n\n renderLayers() {\n const {\n loader,\n id\n } = this.props;\n const {\n dtype\n } = loader;\n const {\n width,\n height,\n data\n } = this.state;\n if (!(width && height)) return null;\n const bounds = [0, height, width, 0];\n\n if (isInterleaved(loader.shape)) {\n const {\n photometricInterpretation = 2\n } = loader.meta;\n return new BitmapLayer(this.props, {\n image: this.state,\n photometricInterpretation,\n // Shared props with XRLayer:\n bounds,\n id: `image-sub-layer-${bounds}-${id}`\n });\n }\n\n return new XRLayer(this.props, {\n channelData: {\n data,\n height,\n width\n },\n // Shared props with BitmapLayer:\n bounds,\n id: `image-sub-layer-${bounds}-${id}`,\n dtype\n });\n }\n\n};\nImageLayer.layerName = 'ImageLayer';\nImageLayer.defaultProps = defaultProps$5;\n\nconst defaultProps$4 = {\n pickable: {\n type: 'boolean',\n value: true,\n compare: true\n },\n onHover: {\n type: 'function',\n value: null,\n compare: false\n },\n contrastLimits: {\n type: 'array',\n value: [],\n compare: true\n },\n channelsVisible: {\n type: 'array',\n value: [],\n compare: true\n },\n domain: {\n type: 'array',\n value: [],\n compare: true\n },\n viewportId: {\n type: 'string',\n value: '',\n compare: true\n },\n maxRequests: {\n type: 'number',\n value: 10,\n compare: true\n },\n onClick: {\n type: 'function',\n value: null,\n compare: true\n },\n refinementStrategy: {\n type: 'string',\n value: null,\n compare: true\n },\n excludeBackground: {\n type: 'boolean',\n value: false,\n compare: true\n },\n extensions: {\n type: 'array',\n value: [new ColorPaletteExtension()],\n compare: true\n }\n};\n/**\n * @typedef LayerProps\n * @type {object}\n * @property {Array.<Array.<number>>} contrastLimits List of [begin, end] values to control each channel's ramp function.\n * @property {Array.<boolean>} channelsVisible List of boolean values for each channel for whether or not it is visible.\n * @property {Array} loader Image pyramid. PixelSource[], where each PixelSource is decreasing in shape.\n * @property {Array} selections Selection to be used for fetching data.\n * @property {Array.<Array.<number>>=} domain Override for the possible max/min values (i.e something different than 65535 for uint16/'<u2').\n * @property {string=} viewportId Id for the current view. This needs to match the viewState id in deck.gl and is necessary for the lens.\n * @property {String=} id Unique identifier for this layer.\n * @property {function=} onTileError Custom override for handle tile fetching errors.\n * @property {function=} onHover Hook function from deck.gl to handle hover objects.\n * @property {number=} maxRequests Maximum parallel ongoing requests allowed before aborting.\n * @property {function=} onClick Hook function from deck.gl to handle clicked-on objects.\n * @property {Object=} modelMatrix Math.gl Matrix4 object containing an affine transformation to be applied to the image.\n * @property {string=} refinementStrategy 'best-available' | 'no-overlap' | 'never' will be passed to TileLayer. A default will be chosen based on opacity.\n * @property {boolean=} excludeBackground Whether to exclude the background image. The background image is also excluded for opacity!=1.\n * @property {Array=} extensions [deck.gl extensions](https://deck.gl/docs/developer-guide/custom-layers/layer-extensions) to add to the layers.\n */\n\n/**\n * @type {{ new <S extends string[]>(...props: import('../../types').Viv<LayerProps, S>[]) }}\n * @ignore\n */\n\nconst MultiscaleImageLayer = class extends CompositeLayer {\n renderLayers() {\n const {\n loader,\n selections,\n opacity,\n viewportId,\n onTileError,\n onHover,\n id,\n onClick,\n modelMatrix,\n excludeBackground,\n refinementStrategy\n } = this.props; // Get properties from highest resolution\n\n const {\n tileSize,\n dtype\n } = loader[0]; // This is basically to invert:\n // https://github.com/visgl/deck.gl/pull/4616/files#diff-4d6a2e500c0e79e12e562c4f1217dc80R128\n // The z level can be wrong for showing the correct scales because of the calculation deck.gl does\n // so we need to invert it for fetching tiles and minZoom/maxZoom.\n\n const getTileData = async ({\n x,\n y,\n z,\n signal\n }) => {\n // Early return if no selections\n if (!selections || selections.length === 0) {\n return null;\n } // I don't fully undertstand why this works, but I have a sense.\n // It's basically to cancel out:\n // https://github.com/visgl/deck.gl/pull/4616/files#diff-4d6a2e500c0e79e12e562c4f1217dc80R128,\n // which felt odd to me to beign with.\n // The image-tile example works without, this but I have a feeling there is something\n // going on with our pyramids and/or rendering that is different.\n\n\n const resolution = Math.round(-z);\n\n const getTile = selection => {\n const config = {\n x,\n y,\n selection,\n signal\n };\n return loader[resolution].getTile(config);\n };\n\n try {\n /*\n * Try to request the tile data. The pixels sources can throw\n * special SIGNAL_ABORTED string that we pick up in the catch\n * block to return null to deck.gl.\n *\n * This means that our pixels sources _always_ have the same\n * return type, and optional throw for performance.\n */\n const tiles = await Promise.all(selections.map(getTile));\n const tile = {\n data: tiles.map(d => d.data),\n width: tiles[0].width,\n height: tiles[0].height\n };\n\n if (isInterleaved(loader[resolution].shape)) {\n // eslint-disable-next-line prefer-destructuring\n tile.data = tile.data[0];\n\n if (tile.data.length === tile.width * tile.height * 3) {\n tile.format = GL.RGB;\n tile.dataFormat = GL.RGB; // is this not properly inferred?\n } // can just return early, no need to check for webgl2\n\n\n return tile;\n }\n\n return tile;\n } catch (err) {\n /*\n * Signal is aborted. We handle the custom value thrown\n * by our pixel sources here and return falsy to deck.gl.\n */\n if (err === SIGNAL_ABORTED) {\n return null;\n } // We should propagate all other thrown values/errors\n\n\n throw err;\n }\n };\n\n const {\n height,\n width\n } = getImageSize(loader[0]);\n const tiledLayer = new MultiscaleImageLayerBase(this.props, {\n id: `Tiled-Image-${id}`,\n getTileData,\n dtype,\n tileSize,\n // If you scale a matrix up or down, that is like zooming in or out. zoomOffset controls\n // how the zoom level you fetch tiles at is offset, allowing us to fetch higher resolution tiles\n // while at a lower \"absolute\" zoom level. If you didn't use this prop, an image that is scaled\n // up would always look \"low resolution\" no matter the level of the image pyramid you are looking at.\n zoomOffset: Math.round(Math.log2(modelMatrix ? modelMatrix.getScale()[0] : 1)),\n extent: [0, 0, width, height],\n // See the above note within for why the use of zoomOffset and the rounding necessary.\n minZoom: Math.round(-(loader.length - 1)),\n maxZoom: 0,\n // We want a no-overlap caching strategy with an opacity < 1 to prevent\n // multiple rendered sublayers (some of which have been cached) from overlapping\n refinementStrategy: refinementStrategy || (opacity === 1 ? 'best-available' : 'no-overlap'),\n // TileLayer checks `changeFlags.updateTriggersChanged.getTileData` to see if tile cache\n // needs to be re-created. We want to trigger this behavior if the loader changes.\n // https://github.com/uber/deck.gl/blob/3f67ea6dfd09a4d74122f93903cb6b819dd88d52/modules/geo-layers/src/tile-layer/tile-layer.js#L50\n updateTriggers: {\n getTileData: [loader, selections]\n },\n onTileError: onTileError || loader[0].onTileError\n }); // This gives us a background image and also solves the current\n // minZoom funny business. We don't use it for the background if we have an opacity\n // paramteter set to anything but 1, but we always use it for situations where\n // we are zoomed out too far.\n\n const lowestResolution = loader[loader.length - 1];\n const implementsGetRaster = typeof lowestResolution.getRaster === 'function';\n const layerModelMatrix = modelMatrix ? modelMatrix.clone() : new Matrix4();\n const baseLayer = implementsGetRaster && !excludeBackground && new ImageLayer(this.props, {\n id: `Background-Image-${id}`,\n loader: lowestResolution,\n modelMatrix: layerModelMatrix.scale(2 ** (loader.length - 1)),\n visible: !viewportId || this.context.viewport.id === viewportId,\n onHover,\n onClick,\n // Background image is nicest when LINEAR in my opinion.\n interpolation: GL.LINEAR,\n onViewportLoad: null\n });\n const layers = [baseLayer, tiledLayer];\n return layers;\n }\n\n};\nMultiscaleImageLayer.layerName = 'MultiscaleImageLayer';\nMultiscaleImageLayer.defaultProps = defaultProps$4;\n\nconst defaultProps$3 = {\n pickable: {\n type: 'boolean',\n value: true,\n compare: true\n },\n loader: {\n type: 'object',\n value: {\n getRaster: async () => ({\n data: [],\n height: 0,\n width: 0\n }),\n getRasterSize: () => ({\n height: 0,\n width: 0\n }),\n dtype: '<u2'\n },\n compare: true\n },\n id: {\n type: 'string',\n value: '',\n compare: true\n },\n boundingBox: {\n type: 'array',\n value: [[0, 0], [0, 1], [1, 1], [1, 0]],\n compare: true\n },\n boundingBoxColor: {\n type: 'array',\n value: [255, 0, 0],\n compare: true\n },\n boundingBoxOutlineWidth: {\n type: 'number',\n value: 1,\n compare: true\n },\n viewportOutlineColor: {\n type: 'array',\n value: [255, 190, 0],\n compare: true\n },\n viewportOutlineWidth: {\n type: 'number',\n value: 2,\n compare: true\n },\n overviewScale: {\n type: 'number',\n value: 1,\n compare: true\n },\n zoom: {\n type: 'number',\n value: 1,\n compare: true\n }\n};\n/**\n * @typedef LayerProps\n * @type {Object}\n * @property {Array.<Array.<number>>} contrastLimits List of [begin, end] values to control each channel's ramp function.\n * @property {Array.<Array.<number>>} colors List of [r, g, b] values for each channel.\n * @property {Array.<boolean>} channelsVisible List of boolean values for each channel for whether or not it is visible.\n * @property {Array} loader PixelSource[]. Assumes multiscale if loader.length > 1.\n * @property {Array} selections Selection to be used for fetching data.\n * @property {number=} opacity Opacity of the layer.\n * @property {string=} colormap String indicating a colormap (default: ''). The full list of options is here: https://github.com/glslify/glsl-colormap#glsl-colormap\n * @property {Array.<Array.<number>>=} domain Override for the possible max/min values (i.e something different than 65535 for uint16/'<u2').\n * @property {Array.<number>=} boundingBoxColor [r, g, b] color of the bounding box (default: [255, 0, 0]).\n * @property {number=} boundingBoxOutlineWidth Width of the bounding box in px (default: 1).\n * @property {Array.<number>=} viewportOutlineColor [r, g, b] color of the outline (default: [255, 190, 0]).\n * @property {number=} viewportOutlineWidth Viewport outline width in px (default: 2).\n * @property {String=} id Unique identifier for this layer.\n */\n\n/**\n * @type {{ new <S extends string[]>(...props: import('../types').Viv<LayerProps, S>[]) }}\n * @ignore\n */\n\nconst OverviewLayer = class extends CompositeLayer {\n renderLayers() {\n const {\n loader,\n id,\n zoom,\n boundingBox,\n boundingBoxColor,\n boundingBoxOutlineWidth,\n viewportOutlineColor,\n viewportOutlineWidth,\n overviewScale\n } = this.props;\n const {\n width,\n height\n } = getImageSize(loader[0]);\n const z = loader.length - 1;\n const lowestResolution = loader[z];\n const overview = new ImageLayer(this.props, {\n id: `viewport-${id}`,\n modelMatrix: new Matrix4().scale(2 ** z * overviewScale),\n loader: lowestResolution\n });\n const boundingBoxOutline = new PolygonLayer({\n id: `bounding-box-overview-${id}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [boundingBox],\n getPolygon: f => f,\n filled: false,\n stroked: true,\n getLineColor: boundingBoxColor,\n getLineWidth: boundingBoxOutlineWidth * 2 ** zoom\n });\n const viewportOutline = new PolygonLayer({\n id: `viewport-outline-${id}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [[[0, 0], [width * overviewScale, 0], [width * overviewScale, height * overviewScale], [0, height * overviewScale]]],\n getPolygon: f => f,\n filled: false,\n stroked: true,\n getLineColor: viewportOutlineColor,\n getLineWidth: viewportOutlineWidth * 2 ** zoom\n });\n const layers = [overview, boundingBoxOutline, viewportOutline];\n return layers;\n }\n\n};\nOverviewLayer.layerName = 'OverviewLayer';\nOverviewLayer.defaultProps = defaultProps$3;\n\nfunction getVivId(id) {\n return `-#${id}#`;\n}\n/**\n * Create a boudning box from a viewport based on passed-in viewState.\n * @param {viewState} Object The viewState for a certain viewport.\n * @returns {View} The DeckGL View for this viewport.\n */\n\nfunction makeBoundingBox(viewState) {\n const viewport = new OrthographicView().makeViewport({\n // From the current `detail` viewState, we need its projection matrix (actually the inverse).\n viewState,\n height: viewState.height,\n width: viewState.width\n }); // Use the inverse of the projection matrix to map screen to the view space.\n\n return [viewport.unproject([0, 0]), viewport.unproject([viewport.width, 0]), viewport.unproject([viewport.width, viewport.height]), viewport.unproject([0, viewport.height])];\n}\n/**\n * Create an initial view state that centers the image in the viewport at the zoom level that fills the dimensions in `viewSize`.\n * @param {Object} loader (PixelSource[] | PixelSource)\n * @param {Object} viewSize { height, width } object giving dimensions of the viewport for deducing the right zoom level to center the image.\n * @param {Object=} zoomBackOff A positive number which controls how far zoomed out the view state is from filling the entire viewport (default is 0 so the image fully fills the view).\n * SideBySideViewer and PictureInPictureViewer use .5 when setting viewState automatically in their default behavior, so the viewport is slightly zoomed out from the image\n * filling the whole screen. 1 unit of zoomBackOff (so a passed-in value of 1) corresponds to a 2x zooming out.\n * @param {Boolean=} use3d Whether or not to return a view state that can be used with the 3d viewer\n * @param {Boolean=} modelMatrix If using a transformation matrix, passing it in here will allow this function to properly center the volume.\n * @returns {Object} A default initial view state that centers the image within the view: { target: [x, y, 0], zoom: -zoom }.\n */\n\nfunction getDefaultInitialViewState(loader, viewSize, zoomBackOff = 0, use3d = false, modelMatrix) {\n const source = Array.isArray(loader) ? loader[0] : loader;\n const {\n width,\n height\n } = getImageSize(source);\n const depth = source.shape[source.labels.indexOf('z')];\n const zoom = Math.log2(Math.min(viewSize.width / width, viewSize.height / height)) - zoomBackOff;\n const physicalSizeScalingMatrix = getPhysicalSizeScalingMatrix(source);\n const loaderInitialViewState = {\n target: (modelMatrix || new Matrix4()).transformPoint((use3d ? physicalSizeScalingMatrix : new Matrix4()).transformPoint([width / 2, height / 2, use3d ? depth / 2 : 0])),\n zoom\n };\n return loaderInitialViewState;\n}\n/**\n * Creates the layers for viewing an image in detail.\n * @param {String} id The identifier of the view.\n * @param {Object} props The layer properties.\n * @returns {Array} An array of layers.\n */\n\nfunction getImageLayer(id, props) {\n const {\n loader\n } = props; // Grab name of PixelSource if a class instance (works for Tiff & Zarr).\n\n const sourceName = loader[0]?.constructor?.name; // Create at least one layer even without selections so that the tests pass.\n\n const Layer = loader.length > 1 ? MultiscaleImageLayer : ImageLayer;\n const layerLoader = loader.length > 1 ? loader : loader[0];\n return new Layer({ ...props,\n id: `${sourceName}${getVivId(id)}`,\n viewportId: id,\n loader: layerLoader\n });\n}\n\nfunction getPosition(boundingBox, position, length) {\n const viewLength = boundingBox[2][0] - boundingBox[0][0];\n\n switch (position) {\n case 'bottom-right':\n {\n const yCoord = boundingBox[2][1] - (boundingBox[2][1] - boundingBox[0][1]) * length;\n const xLeftCoord = boundingBox[2][0] - viewLength * length;\n return [yCoord, xLeftCoord];\n }\n\n case 'top-right':\n {\n const yCoord = (boundingBox[2][1] - boundingBox[0][1]) * length;\n const xLeftCoord = boundingBox[2][0] - viewLength * length;\n return [yCoord, xLeftCoord];\n }\n\n case 'top-left':\n {\n const yCoord = (boundingBox[2][1] - boundingBox[0][1]) * length;\n const xLeftCoord = viewLength * length;\n return [yCoord, xLeftCoord];\n }\n\n case 'bottom-left':\n {\n const yCoord = boundingBox[2][1] - (boundingBox[2][1] - boundingBox[0][1]) * length;\n const xLeftCoord = viewLength * length;\n return [yCoord, xLeftCoord];\n }\n\n default:\n {\n throw new Error(`Position ${position} not found`);\n }\n }\n}\n\nconst defaultProps$2 = {\n pickable: {\n type: 'boolean',\n value: true,\n compare: true\n },\n viewState: {\n type: 'object',\n value: {\n zoom: 0,\n target: [0, 0, 0]\n },\n compare: true\n },\n unit: {\n type: 'string',\n value: '',\n compare: true\n },\n size: {\n type: 'number',\n value: 1,\n compare: true\n },\n position: {\n type: 'string',\n value: 'bottom-right',\n compare: true\n },\n length: {\n type: 'number',\n value: 0.085,\n compare: true\n }\n};\n/**\n * @typedef LayerProps\n * @type {Object}\n * @property {String} unit Physical unit size per pixel at full resolution.\n * @property {Number} size Physical size of a pixel.\n * @property {Object} viewState The current viewState for the desired view. We cannot internally use this.context.viewport because it is one frame behind:\n * https://github.com/visgl/deck.gl/issues/4504\n * @property {Array=} boundingBox Boudning box of the view in which this should render.\n * @property {string=} id Id from the parent layer.\n * @property {number=} length Value from 0 to 1 representing the portion of the view to be used for the length part of the scale bar.\n */\n\n/**\n * @type {{ new(...props: LayerProps[]) }}\n * @ignore\n */\n\nconst ScaleBarLayer = class extends CompositeLayer {\n renderLayers() {\n const {\n id,\n unit,\n size,\n position,\n viewState,\n length\n } = this.props;\n const boundingBox = makeBoundingBox(viewState);\n const {\n zoom\n } = viewState;\n const viewLength = boundingBox[2][0] - boundingBox[0][0];\n const barLength = viewLength * 0.05; // This is a good heuristic for stopping the bar tick marks from getting too small\n // and/or the text squishing up into the bar.\n\n const barHeight = Math.max(2 ** (-zoom + 1.5), (boundingBox[2][1] - boundingBox[0][1]) * 0.007);\n const numUnits = barLength * size;\n const [yCoord, xLeftCoord] = getPosition(boundingBox, position, length);\n const lengthBar = new LineLayer({\n id: `scale-bar-length-${id}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [[[xLeftCoord, yCoord], [xLeftCoord + barLength, yCoord]]],\n getSourcePosition: d => d[0],\n getTargetPosition: d => d[1],\n getWidth: 2,\n getColor: [220, 220, 220]\n });\n const tickBoundsLeft = new LineLayer({\n id: `scale-bar-height-left-${id}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [[[xLeftCoord, yCoord - barHeight], [xLeftCoord, yCoord + barHeight]]],\n getSourcePosition: d => d[0],\n getTargetPosition: d => d[1],\n getWidth: 2,\n getColor: [220, 220, 220]\n });\n const tickBoundsRight = new LineLayer({\n id: `scale-bar-height-right-${id}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [[[xLeftCoord + barLength, yCoord - barHeight], [xLeftCoord + barLength, yCoord + barHeight]]],\n getSourcePosition: d => d[0],\n getTargetPosition: d => d[1],\n getWidth: 2,\n getColor: [220, 220, 220]\n });\n const textLayer = new TextLayer({\n id: `units-label-layer-${id}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [{\n text: String(numUnits).slice(0, 5).replace(/\\.$/, '') + unit,\n position: [xLeftCoord + barLength * 0.5, yCoord + barHeight * 4]\n }],\n getColor: [220, 220, 220, 255],\n getSize: 12,\n fontFamily: DEFAULT_FONT_FAMILY,\n sizeUnits: 'meters',\n sizeScale: 2 ** -zoom,\n characterSet: [...unit.split(''), ...range(10).map(i => String(i)), '.']\n });\n return [lengthBar, tickBoundsLeft, tickBoundsRight, textLayer];\n }\n\n};\nScaleBarLayer.layerName = 'ScaleBarLayer';\nScaleBarLayer.defaultProps = defaultProps$2;\n\nvar vs = \"#version 300 es\\n#define GLSLIFY 1\\n#define SHADER_NAME xr-layer-vertex-shader\\nin vec3 positions;uniform vec3 eye_pos;uniform mat4 proj;uniform mat4 model;uniform mat4 view;uniform mat4 scale;uniform mat4 resolution;out vec3 vray_dir;flat out vec3 transformed_eye;void main(){gl_Position=proj*view*model*scale*resolution*vec4(positions,1.);/*This first diagram is a skewed volume(i.e a \\\"shear\\\" model matrix applied)top down with the eye marked as #,all in world space^___|__\\\\|\\\\\\\\|\\\\|____|||\\n#\\nThis next diagram shows the volume after the inverse model matrix has placed it back in model coordinates,but the eye still in world space.^___|___|||||||__|__||||\\n#\\nFinally,we apply the inverse model matrix transformation to the eye as well to bring it too into world space.Notice that the ray here matches the \\\"voxels\\\" through which the first ray also passes,as desired.^____/__|/||/||/____|///\\n#\\n*/transformed_eye=(inverse(resolution)*inverse(scale)*inverse(model)*(vec4(eye_pos,1.))).xyz;vray_dir=positions-transformed_eye;}\"; // eslint-disable-line\n\nvar fs$1 = \"#version 300 es\\nprecision highp int;precision highp float;precision highp SAMPLER_TYPE;\\n#define GLSLIFY 1\\nuniform highp SAMPLER_TYPE volume0;uniform highp SAMPLER_TYPE volume1;uniform highp SAMPLER_TYPE volume2;uniform highp SAMPLER_TYPE volume3;uniform highp SAMPLER_TYPE volume4;uniform highp SAMPLER_TYPE volume5;uniform vec3 scaledDimensions;uniform mat4 scale;uniform vec3 normals[NUM_PLANES];uniform float distances[NUM_PLANES];uniform vec3 colors[6];uniform vec2 xSlice;uniform vec2 ySlice;uniform vec2 zSlice;uniform vec2 contrastLimits[6];in vec3 vray_dir;flat in vec3 transformed_eye;out vec4 color;vec2 intersect_box(vec3 orig,vec3 dir){vec3 box_min=vec3(xSlice[0],ySlice[0],zSlice[0]);vec3 box_max=vec3(xSlice[1],ySlice[1],zSlice[1]);vec3 inv_dir=1./dir;vec3 tmin_tmp=(box_min-orig)*inv_dir;vec3 tmax_tmp=(box_max-orig)*inv_dir;vec3 tmin=min(tmin_tmp,tmax_tmp);vec3 tmax=max(tmin_tmp,tmax_tmp);float t0=max(tmin.x,max(tmin.y,tmin.z));float t1=min(tmax.x,min(tmax.y,tmax.z));vec2 val=vec2(t0,t1);return val;}float linear_to_srgb(float x){if(x<=0.0031308f){return 12.92f*x;}return 1.055f*pow(x,1.f/2.4f)-0.055f;}float wang_hash(int seed){seed=(seed ^ 61)^(seed>>16);seed*=9;seed=seed ^(seed>>4);seed*=0x27d4eb2d;seed=seed ^(seed>>15);return float(seed % 2147483647)/float(2147483647);}void main(void){vec3 ray_dir=normalize(vray_dir);vec2 t_hit=intersect_box(transformed_eye,ray_dir);if(t_hit.x>t_hit.y){discard;}t_hit.x=max(t_hit.x,0.);vec3 dt_vec=1./(scale*vec4(abs(ray_dir),1.)).xyz;float dt=1.*min(dt_vec.x,min(dt_vec.y,dt_vec.z));float offset=wang_hash(int(gl_FragCoord.x+640.*gl_FragCoord.y));vec3 p=transformed_eye+(t_hit.x+offset*dt)*ray_dir;_BEFORE_RENDERfor(float t=t_hit.x;t<t_hit.y;t+=dt){float canShow=1.;for(int i=0;i<NUM_PLANES;i+=1){canShow*=max(0.,sign(dot(normals[i],p)+distances[i]));}float canShowXCoordinate=max(p.x-0.,0.)*max(1.-p.x,0.);float canShowYCoordinate=max(p.y-0.,0.)*max(1.-p.y,0.);float canShowZCoordinate=max(p.z-0.,0.)*max(1.-p.z,0.);float canShowCoordinate=float(ceil(canShowXCoordinate*canShowYCoordinate*canShowZCoordinate));canShow=canShowCoordinate*canShow;float intensityValue0=float(texture(volume0,p).r);DECKGL_PROCESS_INTENSITY(intensityValue0,contrastLimits[0],0);intensityValue0=canShow*intensityValue0;float intensityValue1=float(texture(volume1,p).r);DECKGL_PROCESS_INTENSITY(intensityValue1,contrastLimits[1],1);intensityValue1=canShow*intensityValue1;float intensityValue2=float(texture(volume2,p).r);DECKGL_PROCESS_INTENSITY(intensityValue2,contrastLimits[2],2);intensityValue2=canShow*intensityValue2;float intensityValue3=float(texture(volume3,p).r);DECKGL_PROCESS_INTENSITY(intensityValue3,contrastLimits[3],3);intensityValue3=canShow*intensityValue3;float intensityValue4=float(texture(volume4,p).r);DECKGL_PROCESS_INTENSITY(intensityValue4,contrastLimits[4],4);intensityValue4=canShow*intensityValue4;float intensityValue5=float(texture(volume5,p).r);DECKGL_PROCESS_INTENSITY(intensityValue5,contrastLimits[5],5);intensityValue5=canShow*intensityValue5;_RENDERp+=ray_dir*dt;}_AFTER_RENDERcolor.r=linear_to_srgb(color.r);color.g=linear_to_srgb(color.g);color.b=linear_to_srgb(color.b);}\"; // eslint-disable-line\n\nvar fs = \"#define GLSLIFY 1\\nvec4 jet(float x_17){const float e0=0.0;const vec4 v0=vec4(0,0,0.5137254901960784,1);const float e1=0.125;const vec4 v1=vec4(0,0.23529411764705882,0.6666666666666666,1);const float e2=0.375;const vec4 v2=vec4(0.0196078431372549,1,1,1);const float e3=0.625;const vec4 v3=vec4(1,1,0,1);const float e4=0.875;const vec4 v4=vec4(0.9803921568627451,0,0,1);const float e5=1.0;const vec4 v5=vec4(0.5019607843137255,0,0,1);float a0=smoothstep(e0,e1,x_17);float a1=smoothstep(e1,e2,x_17);float a2=smoothstep(e2,e3,x_17);float a3=smoothstep(e3,e4,x_17);float a4=smoothstep(e4,e5,x_17);return max(mix(v0,v1,a0)*step(e0,x_17)*step(x_17,e1),max(mix(v1,v2,a1)*step(e1,x_17)*step(x_17,e2),max(mix(v2,v3,a2)*step(e2,x_17)*step(x_17,e3),max(mix(v3,v4,a3)*step(e3,x_17)*step(x_17,e4),mix(v4,v5,a4)*step(e4,x_17)*step(x_17,e5)))));}vec4 hsv(float x_18){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=0.169;const vec4 v1=vec4(0.9921568627450981,1,0.00784313725490196,1);const float e2=0.173;const vec4 v2=vec4(0.9686274509803922,1,0.00784313725490196,1);const float e3=0.337;const vec4 v3=vec4(0,0.9882352941176471,0.01568627450980392,1);const float e4=0.341;const vec4 v4=vec4(0,0.9882352941176471,0.0392156862745098,1);const float e5=0.506;const vec4 v5=vec4(0.00392156862745098,0.9764705882352941,1,1);const float e6=0.671;const vec4 v6=vec4(0.00784313725490196,0,0.9921568627450981,1);const float e7=0.675;const vec4 v7=vec4(0.03137254901960784,0,0.9921568627450981,1);const float e8=0.839;const vec4 v8=vec4(1,0,0.984313725490196,1);const float e9=0.843;const vec4 v9=vec4(1,0,0.9607843137254902,1);const float e10=1.0;const vec4 v10=vec4(1,0,0.023529411764705882,1);float a0=smoothstep(e0,e1,x_18);float a1=smoothstep(e1,e2,x_18);float a2=smoothstep(e2,e3,x_18);float a3=smoothstep(e3,e4,x_18);float a4=smoothstep(e4,e5,x_18);float a5=smoothstep(e5,e6,x_18);float a6=smoothstep(e6,e7,x_18);float a7=smoothstep(e7,e8,x_18);float a8=smoothstep(e8,e9,x_18);float a9=smoothstep(e9,e10,x_18);return max(mix(v0,v1,a0)*step(e0,x_18)*step(x_18,e1),max(mix(v1,v2,a1)*step(e1,x_18)*step(x_18,e2),max(mix(v2,v3,a2)*step(e2,x_18)*step(x_18,e3),max(mix(v3,v4,a3)*step(e3,x_18)*step(x_18,e4),max(mix(v4,v5,a4)*step(e4,x_18)*step(x_18,e5),max(mix(v5,v6,a5)*step(e5,x_18)*step(x_18,e6),max(mix(v6,v7,a6)*step(e6,x_18)*step(x_18,e7),max(mix(v7,v8,a7)*step(e7,x_18)*step(x_18,e8),max(mix(v8,v9,a8)*step(e8,x_18)*step(x_18,e9),mix(v9,v10,a9)*step(e9,x_18)*step(x_18,e10))))))))));}vec4 hot(float x_13){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.3;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.6;const vec4 v2=vec4(1,0.8235294117647058,0,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_13);float a1=smoothstep(e1,e2,x_13);float a2=smoothstep(e2,e3,x_13);return max(mix(v0,v1,a0)*step(e0,x_13)*step(x_13,e1),max(mix(v1,v2,a1)*step(e1,x_13)*step(x_13,e2),mix(v2,v3,a2)*step(e2,x_13)*step(x_13,e3)));}vec4 cool(float x_24){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.4549019607843137,0,0.8549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);const float e3=0.38;const vec4 v3=vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);const float e4=0.5;const vec4 v4=vec4(0,0.8,0.7725490196078432,1);const float e5=0.63;const vec4 v5=vec4(0,0.9686274509803922,0.5725490196078431,1);const float e6=0.75;const vec4 v6=vec4(0,1,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.1568627450980392,1,0.03137254901960784,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_24);float a1=smoothstep(e1,e2,x_24);float a2=smoothstep(e2,e3,x_24);float a3=smoothstep(e3,e4,x_24);float a4=smoothstep(e4,e5,x_24);float a5=smoothstep(e5,e6,x_24);float a6=smoothstep(e6,e7,x_24);float a7=smoothstep(e7,e8,x_24);return max(mix(v0,v1,a0)*step(e0,x_24)*step(x_24,e1),max(mix(v1,v2,a1)*step(e1,x_24)*step(x_24,e2),max(mix(v2,v3,a2)*step(e2,x_24)*step(x_24,e3),max(mix(v3,v4,a3)*step(e3,x_24)*step(x_24,e4),max(mix(v4,v5,a4)*step(e4,x_24)*step(x_24,e5),max(mix(v5,v6,a5)*step(e5,x_24)*step(x_24,e6),max(mix(v6,v7,a6)*step(e6,x_24)*step(x_24,e7),mix(v7,v8,a7)*step(e7,x_24)*step(x_24,e8))))))));}vec4 spring(float x_5){const float e0=0.0;const vec4 v0=vec4(1,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_5);return mix(v0,v1,a0)*step(e0,x_5)*step(x_5,e1);}vec4 summer(float x_12){const float e0=0.0;const vec4 v0=vec4(0,0.5019607843137255,0.4,1);const float e1=1.0;const vec4 v1=vec4(1,1,0.4,1);float a0=smoothstep(e0,e1,x_12);return mix(v0,v1,a0)*step(e0,x_12)*step(x_12,e1);}vec4 autumn(float x_25){const float e0=0.0;const vec4 v0=vec4(1,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,0,1);float a0=smoothstep(e0,e1,x_25);return mix(v0,v1,a0)*step(e0,x_25)*step(x_25,e1);}vec4 winter(float x_16){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(0,1,0.5019607843137255,1);float a0=smoothstep(e0,e1,x_16);return mix(v0,v1,a0)*step(e0,x_16)*step(x_16,e1);}vec4 bone(float x_15){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.376;const vec4 v1=vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);const float e2=0.753;const vec4 v2=vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);const float e3=1.0;const vec4 v3=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_15);float a1=smoothstep(e1,e2,x_15);float a2=smoothstep(e2,e3,x_15);return max(mix(v0,v1,a0)*step(e0,x_15)*step(x_15,e1),max(mix(v1,v2,a1)*step(e1,x_15)*step(x_15,e2),mix(v2,v3,a2)*step(e2,x_15)*step(x_15,e3)));}vec4 copper(float x_10){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.804;const vec4 v1=vec4(1,0.6274509803921569,0.4,1);const float e2=1.0;const vec4 v2=vec4(1,0.7803921568627451,0.4980392156862745,1);float a0=smoothstep(e0,e1,x_10);float a1=smoothstep(e1,e2,x_10);return max(mix(v0,v1,a0)*step(e0,x_10)*step(x_10,e1),mix(v1,v2,a1)*step(e1,x_10)*step(x_10,e2));}vec4 greys(float x_4){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_4);return mix(v0,v1,a0)*step(e0,x_4)*step(x_4,e1);}vec4 yignbu(float x_32){const float e0=0.0;const vec4 v0=vec4(0.03137254901960784,0.11372549019607843,0.34509803921568627,1);const float e1=0.125;const vec4 v1=vec4(0.1450980392156863,0.20392156862745098,0.5803921568627451,1);const float e2=0.25;const vec4 v2=vec4(0.13333333333333333,0.3686274509803922,0.6588235294117647,1);const float e3=0.375;const vec4 v3=vec4(0.11372549019607843,0.5686274509803921,0.7529411764705882,1);const float e4=0.5;const vec4 v4=vec4(0.2549019607843137,0.7137254901960784,0.7686274509803922,1);const float e5=0.625;const vec4 v5=vec4(0.4980392156862745,0.803921568627451,0.7333333333333333,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7058823529411765,1);const float e7=0.875;const vec4 v7=vec4(0.9294117647058824,0.9725490196078431,0.8509803921568627,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8509803921568627,1);float a0=smoothstep(e0,e1,x_32);float a1=smoothstep(e1,e2,x_32);float a2=smoothstep(e2,e3,x_32);float a3=smoothstep(e3,e4,x_32);float a4=smoothstep(e4,e5,x_32);float a5=smoothstep(e5,e6,x_32);float a6=smoothstep(e6,e7,x_32);float a7=smoothstep(e7,e8,x_32);return max(mix(v0,v1,a0)*step(e0,x_32)*step(x_32,e1),max(mix(v1,v2,a1)*step(e1,x_32)*step(x_32,e2),max(mix(v2,v3,a2)*step(e2,x_32)*step(x_32,e3),max(mix(v3,v4,a3)*step(e3,x_32)*step(x_32,e4),max(mix(v4,v5,a4)*step(e4,x_32)*step(x_32,e5),max(mix(v5,v6,a5)*step(e5,x_32)*step(x_32,e6),max(mix(v6,v7,a6)*step(e6,x_32)*step(x_32,e7),mix(v7,v8,a7)*step(e7,x_32)*step(x_32,e8))))))));}vec4 greens(float x_34){const float e0=0.0;const vec4 v0=vec4(0,0.26666666666666666,0.10588235294117647,1);const float e1=0.125;const vec4 v1=vec4(0,0.42745098039215684,0.17254901960784313,1);const float e2=0.25;const vec4 v2=vec4(0.13725490196078433,0.5450980392156862,0.27058823529411763,1);const float e3=0.375;const vec4 v3=vec4(0.2549019607843137,0.6705882352941176,0.36470588235294116,1);const float e4=0.5;const vec4 v4=vec4(0.4549019607843137,0.7686274509803922,0.4627450980392157,1);const float e5=0.625;const vec4 v5=vec4(0.6313725490196078,0.8509803921568627,0.6078431372549019,1);const float e6=0.75;const vec4 v6=vec4(0.7803921568627451,0.9137254901960784,0.7529411764705882,1);const float e7=0.875;const vec4 v7=vec4(0.8980392156862745,0.9607843137254902,0.8784313725490196,1);const float e8=1.0;const vec4 v8=vec4(0.9686274509803922,0.9882352941176471,0.9607843137254902,1);float a0=smoothstep(e0,e1,x_34);float a1=smoothstep(e1,e2,x_34);float a2=smoothstep(e2,e3,x_34);float a3=smoothstep(e3,e4,x_34);float a4=smoothstep(e4,e5,x_34);float a5=smoothstep(e5,e6,x_34);float a6=smoothstep(e6,e7,x_34);float a7=smoothstep(e7,e8,x_34);return max(mix(v0,v1,a0)*step(e0,x_34)*step(x_34,e1),max(mix(v1,v2,a1)*step(e1,x_34)*step(x_34,e2),max(mix(v2,v3,a2)*step(e2,x_34)*step(x_34,e3),max(mix(v3,v4,a3)*step(e3,x_34)*step(x_34,e4),max(mix(v4,v5,a4)*step(e4,x_34)*step(x_34,e5),max(mix(v5,v6,a5)*step(e5,x_34)*step(x_34,e6),max(mix(v6,v7,a6)*step(e6,x_34)*step(x_34,e7),mix(v7,v8,a7)*step(e7,x_34)*step(x_34,e8))))))));}vec4 yiorrd(float x_41){const float e0=0.0;const vec4 v0=vec4(0.5019607843137255,0,0.14901960784313725,1);const float e1=0.125;const vec4 v1=vec4(0.7411764705882353,0,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.8901960784313725,0.10196078431372549,0.10980392156862745,1);const float e3=0.375;const vec4 v3=vec4(0.9882352941176471,0.3058823529411765,0.16470588235294117,1);const float e4=0.5;const vec4 v4=vec4(0.9921568627450981,0.5529411764705883,0.23529411764705882,1);const float e5=0.625;const vec4 v5=vec4(0.996078431372549,0.6980392156862745,0.2980392156862745,1);const float e6=0.75;const vec4 v6=vec4(0.996078431372549,0.8509803921568627,0.4627450980392157,1);const float e7=0.875;const vec4 v7=vec4(1,0.9294117647058824,0.6274509803921569,1);const float e8=1.0;const vec4 v8=vec4(1,1,0.8,1);float a0=smoothstep(e0,e1,x_41);float a1=smoothstep(e1,e2,x_41);float a2=smoothstep(e2,e3,x_41);float a3=smoothstep(e3,e4,x_41);float a4=smoothstep(e4,e5,x_41);float a5=smoothstep(e5,e6,x_41);float a6=smoothstep(e6,e7,x_41);float a7=smoothstep(e7,e8,x_41);return max(mix(v0,v1,a0)*step(e0,x_41)*step(x_41,e1),max(mix(v1,v2,a1)*step(e1,x_41)*step(x_41,e2),max(mix(v2,v3,a2)*step(e2,x_41)*step(x_41,e3),max(mix(v3,v4,a3)*step(e3,x_41)*step(x_41,e4),max(mix(v4,v5,a4)*step(e4,x_41)*step(x_41,e5),max(mix(v5,v6,a5)*step(e5,x_41)*step(x_41,e6),max(mix(v6,v7,a6)*step(e6,x_41)*step(x_41,e7),mix(v7,v8,a7)*step(e7,x_41)*step(x_41,e8))))))));}vec4 bluered(float x_23){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=1.0;const vec4 v1=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_23);return mix(v0,v1,a0)*step(e0,x_23)*step(x_23,e1);}vec4 rdbu(float x_1){const float e0=0.0;const vec4 v0=vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);const float e1=0.35;const vec4 v1=vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);const float e2=0.5;const vec4 v2=vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);const float e3=0.6;const vec4 v3=vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);const float e4=0.7;const vec4 v4=vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);const float e5=1.0;const vec4 v5=vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);float a0=smoothstep(e0,e1,x_1);float a1=smoothstep(e1,e2,x_1);float a2=smoothstep(e2,e3,x_1);float a3=smoothstep(e3,e4,x_1);float a4=smoothstep(e4,e5,x_1);return max(mix(v0,v1,a0)*step(e0,x_1)*step(x_1,e1),max(mix(v1,v2,a1)*step(e1,x_1)*step(x_1,e2),max(mix(v2,v3,a2)*step(e2,x_1)*step(x_1,e3),max(mix(v3,v4,a3)*step(e3,x_1)*step(x_1,e4),mix(v4,v5,a4)*step(e4,x_1)*step(x_1,e5)))));}vec4 picnic(float x_42){const float e0=0.0;const vec4 v0=vec4(0,0,1,1);const float e1=0.1;const vec4 v1=vec4(0.2,0.6,1,1);const float e2=0.2;const vec4 v2=vec4(0.4,0.8,1,1);const float e3=0.3;const vec4 v3=vec4(0.6,0.8,1,1);const float e4=0.4;const vec4 v4=vec4(0.8,0.8,1,1);const float e5=0.5;const vec4 v5=vec4(1,1,1,1);const float e6=0.6;const vec4 v6=vec4(1,0.8,1,1);const float e7=0.7;const vec4 v7=vec4(1,0.6,1,1);const float e8=0.8;const vec4 v8=vec4(1,0.4,0.8,1);const float e9=0.9;const vec4 v9=vec4(1,0.4,0.4,1);const float e10=1.0;const vec4 v10=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_42);float a1=smoothstep(e1,e2,x_42);float a2=smoothstep(e2,e3,x_42);float a3=smoothstep(e3,e4,x_42);float a4=smoothstep(e4,e5,x_42);float a5=smoothstep(e5,e6,x_42);float a6=smoothstep(e6,e7,x_42);float a7=smoothstep(e7,e8,x_42);float a8=smoothstep(e8,e9,x_42);float a9=smoothstep(e9,e10,x_42);return max(mix(v0,v1,a0)*step(e0,x_42)*step(x_42,e1),max(mix(v1,v2,a1)*step(e1,x_42)*step(x_42,e2),max(mix(v2,v3,a2)*step(e2,x_42)*step(x_42,e3),max(mix(v3,v4,a3)*step(e3,x_42)*step(x_42,e4),max(mix(v4,v5,a4)*step(e4,x_42)*step(x_42,e5),max(mix(v5,v6,a5)*step(e5,x_42)*step(x_42,e6),max(mix(v6,v7,a6)*step(e6,x_42)*step(x_42,e7),max(mix(v7,v8,a7)*step(e7,x_42)*step(x_42,e8),max(mix(v8,v9,a8)*step(e8,x_42)*step(x_42,e9),mix(v9,v10,a9)*step(e9,x_42)*step(x_42,e10))))))))));}vec4 rainbow(float x_31){const float e0=0.0;const vec4 v0=vec4(0.5882352941176471,0,0.35294117647058826,1);const float e1=0.125;const vec4 v1=vec4(0,0,0.7843137254901961,1);const float e2=0.25;const vec4 v2=vec4(0,0.09803921568627451,1,1);const float e3=0.375;const vec4 v3=vec4(0,0.596078431372549,1,1);const float e4=0.5;const vec4 v4=vec4(0.17254901960784313,1,0.5882352941176471,1);const float e5=0.625;const vec4 v5=vec4(0.592156862745098,1,0,1);const float e6=0.75;const vec4 v6=vec4(1,0.9176470588235294,0,1);const float e7=0.875;const vec4 v7=vec4(1,0.43529411764705883,0,1);const float e8=1.0;const vec4 v8=vec4(1,0,0,1);float a0=smoothstep(e0,e1,x_31);float a1=smoothstep(e1,e2,x_31);float a2=smoothstep(e2,e3,x_31);float a3=smoothstep(e3,e4,x_31);float a4=smoothstep(e4,e5,x_31);float a5=smoothstep(e5,e6,x_31);float a6=smoothstep(e6,e7,x_31);float a7=smoothstep(e7,e8,x_31);return max(mix(v0,v1,a0)*step(e0,x_31)*step(x_31,e1),max(mix(v1,v2,a1)*step(e1,x_31)*step(x_31,e2),max(mix(v2,v3,a2)*step(e2,x_31)*step(x_31,e3),max(mix(v3,v4,a3)*step(e3,x_31)*step(x_31,e4),max(mix(v4,v5,a4)*step(e4,x_31)*step(x_31,e5),max(mix(v5,v6,a5)*step(e5,x_31)*step(x_31,e6),max(mix(v6,v7,a6)*step(e6,x_31)*step(x_31,e7),mix(v7,v8,a7)*step(e7,x_31)*step(x_31,e8))))))));}vec4 portland(float x_21){const float e0=0.0;const vec4 v0=vec4(0.047058823529411764,0.2,0.5137254901960784,1);const float e1=0.25;const vec4 v1=vec4(0.0392156862745098,0.5333333333333333,0.7294117647058823,1);const float e2=0.5;const vec4 v2=vec4(0.9490196078431372,0.8274509803921568,0.2196078431372549,1);const float e3=0.75;const vec4 v3=vec4(0.9490196078431372,0.5607843137254902,0.2196078431372549,1);const float e4=1.0;const vec4 v4=vec4(0.8509803921568627,0.11764705882352941,0.11764705882352941,1);float a0=smoothstep(e0,e1,x_21);float a1=smoothstep(e1,e2,x_21);float a2=smoothstep(e2,e3,x_21);float a3=smoothstep(e3,e4,x_21);return max(mix(v0,v1,a0)*step(e0,x_21)*step(x_21,e1),max(mix(v1,v2,a1)*step(e1,x_21)*step(x_21,e2),max(mix(v2,v3,a2)*step(e2,x_21)*step(x_21,e3),mix(v3,v4,a3)*step(e3,x_21)*step(x_21,e4))));}vec4 blackbody(float x_38){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.2;const vec4 v1=vec4(0.9019607843137255,0,0,1);const float e2=0.4;const vec4 v2=vec4(0.9019607843137255,0.8235294117647058,0,1);const float e3=0.7;const vec4 v3=vec4(1,1,1,1);const float e4=1.0;const vec4 v4=vec4(0.6274509803921569,0.7843137254901961,1,1);float a0=smoothstep(e0,e1,x_38);float a1=smoothstep(e1,e2,x_38);float a2=smoothstep(e2,e3,x_38);float a3=smoothstep(e3,e4,x_38);return max(mix(v0,v1,a0)*step(e0,x_38)*step(x_38,e1),max(mix(v1,v2,a1)*step(e1,x_38)*step(x_38,e2),max(mix(v2,v3,a2)*step(e2,x_38)*step(x_38,e3),mix(v3,v4,a3)*step(e3,x_38)*step(x_38,e4))));}vec4 earth(float x_29){const float e0=0.0;const vec4 v0=vec4(0,0,0.5098039215686274,1);const float e1=0.1;const vec4 v1=vec4(0,0.7058823529411765,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(0.1568627450980392,0.8235294117647058,0.1568627450980392,1);const float e3=0.4;const vec4 v3=vec4(0.9019607843137255,0.9019607843137255,0.19607843137254902,1);const float e4=0.6;const vec4 v4=vec4(0.47058823529411764,0.27450980392156865,0.0784313725490196,1);const float e5=1.0;const vec4 v5=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_29);float a1=smoothstep(e1,e2,x_29);float a2=smoothstep(e2,e3,x_29);float a3=smoothstep(e3,e4,x_29);float a4=smoothstep(e4,e5,x_29);return max(mix(v0,v1,a0)*step(e0,x_29)*step(x_29,e1),max(mix(v1,v2,a1)*step(e1,x_29)*step(x_29,e2),max(mix(v2,v3,a2)*step(e2,x_29)*step(x_29,e3),max(mix(v3,v4,a3)*step(e3,x_29)*step(x_29,e4),mix(v4,v5,a4)*step(e4,x_29)*step(x_29,e5)))));}vec4 electric(float x_9){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.15;const vec4 v1=vec4(0.11764705882352941,0,0.39215686274509803,1);const float e2=0.4;const vec4 v2=vec4(0.47058823529411764,0,0.39215686274509803,1);const float e3=0.6;const vec4 v3=vec4(0.6274509803921569,0.35294117647058826,0,1);const float e4=0.8;const vec4 v4=vec4(0.9019607843137255,0.7843137254901961,0,1);const float e5=1.0;const vec4 v5=vec4(1,0.9803921568627451,0.8627450980392157,1);float a0=smoothstep(e0,e1,x_9);float a1=smoothstep(e1,e2,x_9);float a2=smoothstep(e2,e3,x_9);float a3=smoothstep(e3,e4,x_9);float a4=smoothstep(e4,e5,x_9);return max(mix(v0,v1,a0)*step(e0,x_9)*step(x_9,e1),max(mix(v1,v2,a1)*step(e1,x_9)*step(x_9,e2),max(mix(v2,v3,a2)*step(e2,x_9)*step(x_9,e3),max(mix(v3,v4,a3)*step(e3,x_9)*step(x_9,e4),mix(v4,v5,a4)*step(e4,x_9)*step(x_9,e5)))));}vec4 alpha(float x_0){const float e0=0.0;const vec4 v0=vec4(1,1,1,0);const float e1=1.0;const vec4 v1=vec4(1,1,1,1);float a0=smoothstep(e0,e1,x_0);return mix(v0,v1,a0)*step(e0,x_0)*step(x_0,e1);}vec4 viridis(float x_22){const float e0=0.0;const vec4 v0=vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);const float e1=0.13;const vec4 v1=vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);const float e4=0.5;const vec4 v4=vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);const float e5=0.63;const vec4 v5=vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);const float e6=0.75;const vec4 v6=vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);const float e7=0.88;const vec4 v7=vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);float a0=smoothstep(e0,e1,x_22);float a1=smoothstep(e1,e2,x_22);float a2=smoothstep(e2,e3,x_22);float a3=smoothstep(e3,e4,x_22);float a4=smoothstep(e4,e5,x_22);float a5=smoothstep(e5,e6,x_22);float a6=smoothstep(e6,e7,x_22);float a7=smoothstep(e7,e8,x_22);return max(mix(v0,v1,a0)*step(e0,x_22)*step(x_22,e1),max(mix(v1,v2,a1)*step(e1,x_22)*step(x_22,e2),max(mix(v2,v3,a2)*step(e2,x_22)*step(x_22,e3),max(mix(v3,v4,a3)*step(e3,x_22)*step(x_22,e4),max(mix(v4,v5,a4)*step(e4,x_22)*step(x_22,e5),max(mix(v5,v6,a5)*step(e5,x_22)*step(x_22,e6),max(mix(v6,v7,a6)*step(e6,x_22)*step(x_22,e7),mix(v7,v8,a7)*step(e7,x_22)*step(x_22,e8))))))));}vec4 inferno(float x_30){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);const float e3=0.38;const vec4 v3=vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);const float e4=0.5;const vec4 v4=vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);const float e5=0.63;const vec4 v5=vec4(0.8901960784313725,0.34901960784313724,0.2,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,1,0.6431372549019608,1);float a0=smoothstep(e0,e1,x_30);float a1=smoothstep(e1,e2,x_30);float a2=smoothstep(e2,e3,x_30);float a3=smoothstep(e3,e4,x_30);float a4=smoothstep(e4,e5,x_30);float a5=smoothstep(e5,e6,x_30);float a6=smoothstep(e6,e7,x_30);float a7=smoothstep(e7,e8,x_30);return max(mix(v0,v1,a0)*step(e0,x_30)*step(x_30,e1),max(mix(v1,v2,a1)*step(e1,x_30)*step(x_30,e2),max(mix(v2,v3,a2)*step(e2,x_30)*step(x_30,e3),max(mix(v3,v4,a3)*step(e3,x_30)*step(x_30,e4),max(mix(v4,v5,a4)*step(e4,x_30)*step(x_30,e5),max(mix(v5,v6,a5)*step(e5,x_30)*step(x_30,e6),max(mix(v6,v7,a6)*step(e6,x_30)*step(x_30,e7),mix(v7,v8,a7)*step(e7,x_30)*step(x_30,e8))))))));}vec4 magma(float x_33){const float e0=0.0;const vec4 v0=vec4(0,0,0.01568627450980392,1);const float e1=0.13;const vec4 v1=vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);const float e2=0.25;const vec4 v2=vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);const float e4=0.5;const vec4 v4=vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);const float e6=0.75;const vec4 v6=vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);float a0=smoothstep(e0,e1,x_33);float a1=smoothstep(e1,e2,x_33);float a2=smoothstep(e2,e3,x_33);float a3=smoothstep(e3,e4,x_33);float a4=smoothstep(e4,e5,x_33);float a5=smoothstep(e5,e6,x_33);float a6=smoothstep(e6,e7,x_33);float a7=smoothstep(e7,e8,x_33);return max(mix(v0,v1,a0)*step(e0,x_33)*step(x_33,e1),max(mix(v1,v2,a1)*step(e1,x_33)*step(x_33,e2),max(mix(v2,v3,a2)*step(e2,x_33)*step(x_33,e3),max(mix(v3,v4,a3)*step(e3,x_33)*step(x_33,e4),max(mix(v4,v5,a4)*step(e4,x_33)*step(x_33,e5),max(mix(v5,v6,a5)*step(e5,x_33)*step(x_33,e6),max(mix(v6,v7,a6)*step(e6,x_33)*step(x_33,e7),mix(v7,v8,a7)*step(e7,x_33)*step(x_33,e8))))))));}vec4 plasma(float x_3){const float e0=0.0;const vec4 v0=vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);const float e1=0.13;const vec4 v1=vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);const float e2=0.25;const vec4 v2=vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);const float e4=0.5;const vec4 v4=vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);const float e5=0.63;const vec4 v5=vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);const float e6=0.75;const vec4 v6=vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);const float e7=0.88;const vec4 v7=vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);float a0=smoothstep(e0,e1,x_3);float a1=smoothstep(e1,e2,x_3);float a2=smoothstep(e2,e3,x_3);float a3=smoothstep(e3,e4,x_3);float a4=smoothstep(e4,e5,x_3);float a5=smoothstep(e5,e6,x_3);float a6=smoothstep(e6,e7,x_3);float a7=smoothstep(e7,e8,x_3);return max(mix(v0,v1,a0)*step(e0,x_3)*step(x_3,e1),max(mix(v1,v2,a1)*step(e1,x_3)*step(x_3,e2),max(mix(v2,v3,a2)*step(e2,x_3)*step(x_3,e3),max(mix(v3,v4,a3)*step(e3,x_3)*step(x_3,e4),max(mix(v4,v5,a4)*step(e4,x_3)*step(x_3,e5),max(mix(v5,v6,a5)*step(e5,x_3)*step(x_3,e6),max(mix(v6,v7,a6)*step(e6,x_3)*step(x_3,e7),mix(v7,v8,a7)*step(e7,x_3)*step(x_3,e8))))))));}vec4 warm(float x_43){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.13;const vec4 v1=vec4(0.6745098039215687,0,0.7333333333333333,1);const float e2=0.25;const vec4 v2=vec4(0.8588235294117647,0,0.6666666666666666,1);const float e3=0.38;const vec4 v3=vec4(1,0,0.5098039215686274,1);const float e4=0.5;const vec4 v4=vec4(1,0.24705882352941178,0.2901960784313726,1);const float e5=0.63;const vec4 v5=vec4(1,0.4823529411764706,0,1);const float e6=0.75;const vec4 v6=vec4(0.9176470588235294,0.6901960784313725,0,1);const float e7=0.88;const vec4 v7=vec4(0.7450980392156863,0.8941176470588236,0,1);const float e8=1.0;const vec4 v8=vec4(0.5764705882352941,1,0,1);float a0=smoothstep(e0,e1,x_43);float a1=smoothstep(e1,e2,x_43);float a2=smoothstep(e2,e3,x_43);float a3=smoothstep(e3,e4,x_43);float a4=smoothstep(e4,e5,x_43);float a5=smoothstep(e5,e6,x_43);float a6=smoothstep(e6,e7,x_43);float a7=smoothstep(e7,e8,x_43);return max(mix(v0,v1,a0)*step(e0,x_43)*step(x_43,e1),max(mix(v1,v2,a1)*step(e1,x_43)*step(x_43,e2),max(mix(v2,v3,a2)*step(e2,x_43)*step(x_43,e3),max(mix(v3,v4,a3)*step(e3,x_43)*step(x_43,e4),max(mix(v4,v5,a4)*step(e4,x_43)*step(x_43,e5),max(mix(v5,v6,a5)*step(e5,x_43)*step(x_43,e6),max(mix(v6,v7,a6)*step(e6,x_43)*step(x_43,e7),mix(v7,v8,a7)*step(e7,x_43)*step(x_43,e8))))))));}vec4 rainbow_soft_1310269270(float x_14){const float e0=0.0;const vec4 v0=vec4(0.49019607843137253,0,0.7019607843137254,1);const float e1=0.1;const vec4 v1=vec4(0.7803921568627451,0,0.7058823529411765,1);const float e2=0.2;const vec4 v2=vec4(1,0,0.4745098039215686,1);const float e3=0.3;const vec4 v3=vec4(1,0.4235294117647059,0,1);const float e4=0.4;const vec4 v4=vec4(0.8705882352941177,0.7607843137254902,0,1);const float e5=0.5;const vec4 v5=vec4(0.5882352941176471,1,0,1);const float e6=0.6;const vec4 v6=vec4(0,1,0.21568627450980393,1);const float e7=0.7;const vec4 v7=vec4(0,0.9647058823529412,0.5882352941176471,1);const float e8=0.8;const vec4 v8=vec4(0.19607843137254902,0.6549019607843137,0.8705882352941177,1);const float e9=0.9;const vec4 v9=vec4(0.403921568627451,0.2,0.9215686274509803,1);const float e10=1.0;const vec4 v10=vec4(0.48627450980392156,0,0.7294117647058823,1);float a0=smoothstep(e0,e1,x_14);float a1=smoothstep(e1,e2,x_14);float a2=smoothstep(e2,e3,x_14);float a3=smoothstep(e3,e4,x_14);float a4=smoothstep(e4,e5,x_14);float a5=smoothstep(e5,e6,x_14);float a6=smoothstep(e6,e7,x_14);float a7=smoothstep(e7,e8,x_14);float a8=smoothstep(e8,e9,x_14);float a9=smoothstep(e9,e10,x_14);return max(mix(v0,v1,a0)*step(e0,x_14)*step(x_14,e1),max(mix(v1,v2,a1)*step(e1,x_14)*step(x_14,e2),max(mix(v2,v3,a2)*step(e2,x_14)*step(x_14,e3),max(mix(v3,v4,a3)*step(e3,x_14)*step(x_14,e4),max(mix(v4,v5,a4)*step(e4,x_14)*step(x_14,e5),max(mix(v5,v6,a5)*step(e5,x_14)*step(x_14,e6),max(mix(v6,v7,a6)*step(e6,x_14)*step(x_14,e7),max(mix(v7,v8,a7)*step(e7,x_14)*step(x_14,e8),max(mix(v8,v9,a8)*step(e8,x_14)*step(x_14,e9),mix(v9,v10,a9)*step(e9,x_14)*step(x_14,e10))))))))));}vec4 bathymetry(float x_36){const float e0=0.0;const vec4 v0=vec4(0.1568627450980392,0.10196078431372549,0.17254901960784313,1);const float e1=0.13;const vec4 v1=vec4(0.23137254901960785,0.19215686274509805,0.35294117647058826,1);const float e2=0.25;const vec4 v2=vec4(0.25098039215686274,0.2980392156862745,0.5450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.24705882352941178,0.43137254901960786,0.592156862745098,1);const float e4=0.5;const vec4 v4=vec4(0.2823529411764706,0.5568627450980392,0.6196078431372549,1);const float e5=0.63;const vec4 v5=vec4(0.3333333333333333,0.6823529411764706,0.6392156862745098,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.807843137254902,0.6392156862745098,1);const float e7=0.88;const vec4 v7=vec4(0.7333333333333333,0.9019607843137255,0.6745098039215687,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.996078431372549,0.8,1);float a0=smoothstep(e0,e1,x_36);float a1=smoothstep(e1,e2,x_36);float a2=smoothstep(e2,e3,x_36);float a3=smoothstep(e3,e4,x_36);float a4=smoothstep(e4,e5,x_36);float a5=smoothstep(e5,e6,x_36);float a6=smoothstep(e6,e7,x_36);float a7=smoothstep(e7,e8,x_36);return max(mix(v0,v1,a0)*step(e0,x_36)*step(x_36,e1),max(mix(v1,v2,a1)*step(e1,x_36)*step(x_36,e2),max(mix(v2,v3,a2)*step(e2,x_36)*step(x_36,e3),max(mix(v3,v4,a3)*step(e3,x_36)*step(x_36,e4),max(mix(v4,v5,a4)*step(e4,x_36)*step(x_36,e5),max(mix(v5,v6,a5)*step(e5,x_36)*step(x_36,e6),max(mix(v6,v7,a6)*step(e6,x_36)*step(x_36,e7),mix(v7,v8,a7)*step(e7,x_36)*step(x_36,e8))))))));}vec4 cdom(float x_7){const float e0=0.0;const vec4 v0=vec4(0.1843137254901961,0.058823529411764705,0.24313725490196078,1);const float e1=0.13;const vec4 v1=vec4(0.3411764705882353,0.09019607843137255,0.33725490196078434,1);const float e2=0.25;const vec4 v2=vec4(0.5098039215686274,0.10980392156862745,0.38823529411764707,1);const float e3=0.38;const vec4 v3=vec4(0.6705882352941176,0.1607843137254902,0.3764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.807843137254902,0.2627450980392157,0.33725490196078434,1);const float e5=0.63;const vec4 v5=vec4(0.9019607843137255,0.41568627450980394,0.32941176470588235,1);const float e6=0.75;const vec4 v6=vec4(0.9490196078431372,0.5843137254901961,0.403921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7568627450980392,0.5294117647058824,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.9294117647058824,0.6901960784313725,1);float a0=smoothstep(e0,e1,x_7);float a1=smoothstep(e1,e2,x_7);float a2=smoothstep(e2,e3,x_7);float a3=smoothstep(e3,e4,x_7);float a4=smoothstep(e4,e5,x_7);float a5=smoothstep(e5,e6,x_7);float a6=smoothstep(e6,e7,x_7);float a7=smoothstep(e7,e8,x_7);return max(mix(v0,v1,a0)*step(e0,x_7)*step(x_7,e1),max(mix(v1,v2,a1)*step(e1,x_7)*step(x_7,e2),max(mix(v2,v3,a2)*step(e2,x_7)*step(x_7,e3),max(mix(v3,v4,a3)*step(e3,x_7)*step(x_7,e4),max(mix(v4,v5,a4)*step(e4,x_7)*step(x_7,e5),max(mix(v5,v6,a5)*step(e5,x_7)*step(x_7,e6),max(mix(v6,v7,a6)*step(e6,x_7)*step(x_7,e7),mix(v7,v8,a7)*step(e7,x_7)*step(x_7,e8))))))));}vec4 chlorophyll(float x_6){const float e0=0.0;const vec4 v0=vec4(0.07058823529411765,0.1411764705882353,0.0784313725490196,1);const float e1=0.13;const vec4 v1=vec4(0.09803921568627451,0.24705882352941178,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.09411764705882353,0.3568627450980392,0.23137254901960785,1);const float e3=0.38;const vec4 v3=vec4(0.050980392156862744,0.4666666666666667,0.2823529411764706,1);const float e4=0.5;const vec4 v4=vec4(0.07058823529411765,0.5803921568627451,0.3137254901960784,1);const float e5=0.63;const vec4 v5=vec4(0.3137254901960784,0.6784313725490196,0.34901960784313724,1);const float e6=0.75;const vec4 v6=vec4(0.5176470588235295,0.7686274509803922,0.47843137254901963,1);const float e7=0.88;const vec4 v7=vec4(0.6862745098039216,0.8666666666666667,0.6352941176470588,1);const float e8=1.0;const vec4 v8=vec4(0.8431372549019608,0.9764705882352941,0.8156862745098039,1);float a0=smoothstep(e0,e1,x_6);float a1=smoothstep(e1,e2,x_6);float a2=smoothstep(e2,e3,x_6);float a3=smoothstep(e3,e4,x_6);float a4=smoothstep(e4,e5,x_6);float a5=smoothstep(e5,e6,x_6);float a6=smoothstep(e6,e7,x_6);float a7=smoothstep(e7,e8,x_6);return max(mix(v0,v1,a0)*step(e0,x_6)*step(x_6,e1),max(mix(v1,v2,a1)*step(e1,x_6)*step(x_6,e2),max(mix(v2,v3,a2)*step(e2,x_6)*step(x_6,e3),max(mix(v3,v4,a3)*step(e3,x_6)*step(x_6,e4),max(mix(v4,v5,a4)*step(e4,x_6)*step(x_6,e5),max(mix(v5,v6,a5)*step(e5,x_6)*step(x_6,e6),max(mix(v6,v7,a6)*step(e6,x_6)*step(x_6,e7),mix(v7,v8,a7)*step(e7,x_6)*step(x_6,e8))))))));}vec4 density(float x_19){const float e0=0.0;const vec4 v0=vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);const float e2=0.25;const vec4 v2=vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);const float e3=0.38;const vec4 v3=vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);const float e4=0.5;const vec4 v4=vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);const float e5=0.63;const vec4 v5=vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);const float e6=0.75;const vec4 v6=vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);const float e7=0.88;const vec4 v7=vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);const float e8=1.0;const vec4 v8=vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);float a0=smoothstep(e0,e1,x_19);float a1=smoothstep(e1,e2,x_19);float a2=smoothstep(e2,e3,x_19);float a3=smoothstep(e3,e4,x_19);float a4=smoothstep(e4,e5,x_19);float a5=smoothstep(e5,e6,x_19);float a6=smoothstep(e6,e7,x_19);float a7=smoothstep(e7,e8,x_19);return max(mix(v0,v1,a0)*step(e0,x_19)*step(x_19,e1),max(mix(v1,v2,a1)*step(e1,x_19)*step(x_19,e2),max(mix(v2,v3,a2)*step(e2,x_19)*step(x_19,e3),max(mix(v3,v4,a3)*step(e3,x_19)*step(x_19,e4),max(mix(v4,v5,a4)*step(e4,x_19)*step(x_19,e5),max(mix(v5,v6,a5)*step(e5,x_19)*step(x_19,e6),max(mix(v6,v7,a6)*step(e6,x_19)*step(x_19,e7),mix(v7,v8,a7)*step(e7,x_19)*step(x_19,e8))))))));}vec4 freesurface_blue_3154355989(float x_35){const float e0=0.0;const vec4 v0=vec4(0.11764705882352941,0.01568627450980392,0.43137254901960786,1);const float e1=0.13;const vec4 v1=vec4(0.1843137254901961,0.054901960784313725,0.6901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.1607843137254902,0.17647058823529413,0.9254901960784314,1);const float e3=0.38;const vec4 v3=vec4(0.09803921568627451,0.38823529411764707,0.8313725490196079,1);const float e4=0.5;const vec4 v4=vec4(0.26666666666666666,0.5137254901960784,0.7843137254901961,1);const float e5=0.63;const vec4 v5=vec4(0.4470588235294118,0.611764705882353,0.7725490196078432,1);const float e6=0.75;const vec4 v6=vec4(0.615686274509804,0.7098039215686275,0.796078431372549,1);const float e7=0.88;const vec4 v7=vec4(0.7843137254901961,0.8156862745098039,0.8470588235294118,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_35);float a1=smoothstep(e1,e2,x_35);float a2=smoothstep(e2,e3,x_35);float a3=smoothstep(e3,e4,x_35);float a4=smoothstep(e4,e5,x_35);float a5=smoothstep(e5,e6,x_35);float a6=smoothstep(e6,e7,x_35);float a7=smoothstep(e7,e8,x_35);return max(mix(v0,v1,a0)*step(e0,x_35)*step(x_35,e1),max(mix(v1,v2,a1)*step(e1,x_35)*step(x_35,e2),max(mix(v2,v3,a2)*step(e2,x_35)*step(x_35,e3),max(mix(v3,v4,a3)*step(e3,x_35)*step(x_35,e4),max(mix(v4,v5,a4)*step(e4,x_35)*step(x_35,e5),max(mix(v5,v6,a5)*step(e5,x_35)*step(x_35,e6),max(mix(v6,v7,a6)*step(e6,x_35)*step(x_35,e7),mix(v7,v8,a7)*step(e7,x_35)*step(x_35,e8))))))));}vec4 freesurface_red_1679163293(float x_20){const float e0=0.0;const vec4 v0=vec4(0.23529411764705882,0.03529411764705882,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.39215686274509803,0.06666666666666667,0.10588235294117647,1);const float e2=0.25;const vec4 v2=vec4(0.5568627450980392,0.0784313725490196,0.11372549019607843,1);const float e3=0.38;const vec4 v3=vec4(0.6941176470588235,0.16862745098039217,0.10588235294117647,1);const float e4=0.5;const vec4 v4=vec4(0.7529411764705882,0.3411764705882353,0.24705882352941178,1);const float e5=0.63;const vec4 v5=vec4(0.803921568627451,0.49019607843137253,0.4117647058823529,1);const float e6=0.75;const vec4 v6=vec4(0.8470588235294118,0.6352941176470588,0.5803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.8901960784313725,0.7803921568627451,0.7568627450980392,1);const float e8=1.0;const vec4 v8=vec4(0.9450980392156862,0.9294117647058824,0.9254901960784314,1);float a0=smoothstep(e0,e1,x_20);float a1=smoothstep(e1,e2,x_20);float a2=smoothstep(e2,e3,x_20);float a3=smoothstep(e3,e4,x_20);float a4=smoothstep(e4,e5,x_20);float a5=smoothstep(e5,e6,x_20);float a6=smoothstep(e6,e7,x_20);float a7=smoothstep(e7,e8,x_20);return max(mix(v0,v1,a0)*step(e0,x_20)*step(x_20,e1),max(mix(v1,v2,a1)*step(e1,x_20)*step(x_20,e2),max(mix(v2,v3,a2)*step(e2,x_20)*step(x_20,e3),max(mix(v3,v4,a3)*step(e3,x_20)*step(x_20,e4),max(mix(v4,v5,a4)*step(e4,x_20)*step(x_20,e5),max(mix(v5,v6,a5)*step(e5,x_20)*step(x_20,e6),max(mix(v6,v7,a6)*step(e6,x_20)*step(x_20,e7),mix(v7,v8,a7)*step(e7,x_20)*step(x_20,e8))))))));}vec4 oxygen(float x_11){const float e0=0.0;const vec4 v0=vec4(0.25098039215686274,0.0196078431372549,0.0196078431372549,1);const float e1=0.13;const vec4 v1=vec4(0.41568627450980394,0.023529411764705882,0.058823529411764705,1);const float e2=0.25;const vec4 v2=vec4(0.5647058823529412,0.10196078431372549,0.027450980392156862,1);const float e3=0.38;const vec4 v3=vec4(0.6588235294117647,0.25098039215686274,0.011764705882352941,1);const float e4=0.5;const vec4 v4=vec4(0.7372549019607844,0.39215686274509803,0.01568627450980392,1);const float e5=0.63;const vec4 v5=vec4(0.807843137254902,0.5333333333333333,0.043137254901960784,1);const float e6=0.75;const vec4 v6=vec4(0.8627450980392157,0.6823529411764706,0.09803921568627451,1);const float e7=0.88;const vec4 v7=vec4(0.9058823529411765,0.8431372549019608,0.17254901960784313,1);const float e8=1.0;const vec4 v8=vec4(0.9725490196078431,0.996078431372549,0.4117647058823529,1);float a0=smoothstep(e0,e1,x_11);float a1=smoothstep(e1,e2,x_11);float a2=smoothstep(e2,e3,x_11);float a3=smoothstep(e3,e4,x_11);float a4=smoothstep(e4,e5,x_11);float a5=smoothstep(e5,e6,x_11);float a6=smoothstep(e6,e7,x_11);float a7=smoothstep(e7,e8,x_11);return max(mix(v0,v1,a0)*step(e0,x_11)*step(x_11,e1),max(mix(v1,v2,a1)*step(e1,x_11)*step(x_11,e2),max(mix(v2,v3,a2)*step(e2,x_11)*step(x_11,e3),max(mix(v3,v4,a3)*step(e3,x_11)*step(x_11,e4),max(mix(v4,v5,a4)*step(e4,x_11)*step(x_11,e5),max(mix(v5,v6,a5)*step(e5,x_11)*step(x_11,e6),max(mix(v6,v7,a6)*step(e6,x_11)*step(x_11,e7),mix(v7,v8,a7)*step(e7,x_11)*step(x_11,e8))))))));}vec4 par(float x_28){const float e0=0.0;const vec4 v0=vec4(0.2,0.0784313725490196,0.09411764705882353,1);const float e1=0.13;const vec4 v1=vec4(0.35294117647058826,0.12549019607843137,0.13725490196078433,1);const float e2=0.25;const vec4 v2=vec4(0.5058823529411764,0.17254901960784313,0.13333333333333333,1);const float e3=0.38;const vec4 v3=vec4(0.6235294117647059,0.26666666666666666,0.09803921568627451,1);const float e4=0.5;const vec4 v4=vec4(0.7137254901960784,0.38823529411764707,0.07450980392156863,1);const float e5=0.63;const vec4 v5=vec4(0.7803921568627451,0.5254901960784314,0.08627450980392157,1);const float e6=0.75;const vec4 v6=vec4(0.8313725490196079,0.6705882352941176,0.13725490196078433,1);const float e7=0.88;const vec4 v7=vec4(0.8666666666666667,0.8235294117647058,0.21176470588235294,1);const float e8=1.0;const vec4 v8=vec4(0.8823529411764706,0.9921568627450981,0.29411764705882354,1);float a0=smoothstep(e0,e1,x_28);float a1=smoothstep(e1,e2,x_28);float a2=smoothstep(e2,e3,x_28);float a3=smoothstep(e3,e4,x_28);float a4=smoothstep(e4,e5,x_28);float a5=smoothstep(e5,e6,x_28);float a6=smoothstep(e6,e7,x_28);float a7=smoothstep(e7,e8,x_28);return max(mix(v0,v1,a0)*step(e0,x_28)*step(x_28,e1),max(mix(v1,v2,a1)*step(e1,x_28)*step(x_28,e2),max(mix(v2,v3,a2)*step(e2,x_28)*step(x_28,e3),max(mix(v3,v4,a3)*step(e3,x_28)*step(x_28,e4),max(mix(v4,v5,a4)*step(e4,x_28)*step(x_28,e5),max(mix(v5,v6,a5)*step(e5,x_28)*step(x_28,e6),max(mix(v6,v7,a6)*step(e6,x_28)*step(x_28,e7),mix(v7,v8,a7)*step(e7,x_28)*step(x_28,e8))))))));}vec4 phase(float x_39){const float e0=0.0;const vec4 v0=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);const float e1=0.13;const vec4 v1=vec4(0.7215686274509804,0.2784313725490196,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.7294117647058823,0.22745098039215686,0.45098039215686275,1);const float e3=0.38;const vec4 v3=vec4(0.6274509803921569,0.2784313725490196,0.7254901960784313,1);const float e4=0.5;const vec4 v4=vec4(0.43137254901960786,0.3803921568627451,0.8549019607843137,1);const float e5=0.63;const vec4 v5=vec4(0.19607843137254902,0.4823529411764706,0.6431372549019608,1);const float e6=0.75;const vec4 v6=vec4(0.12156862745098039,0.5137254901960784,0.43137254901960786,1);const float e7=0.88;const vec4 v7=vec4(0.30196078431372547,0.5058823529411764,0.13333333333333333,1);const float e8=1.0;const vec4 v8=vec4(0.5686274509803921,0.4117647058823529,0.07058823529411765,1);float a0=smoothstep(e0,e1,x_39);float a1=smoothstep(e1,e2,x_39);float a2=smoothstep(e2,e3,x_39);float a3=smoothstep(e3,e4,x_39);float a4=smoothstep(e4,e5,x_39);float a5=smoothstep(e5,e6,x_39);float a6=smoothstep(e6,e7,x_39);float a7=smoothstep(e7,e8,x_39);return max(mix(v0,v1,a0)*step(e0,x_39)*step(x_39,e1),max(mix(v1,v2,a1)*step(e1,x_39)*step(x_39,e2),max(mix(v2,v3,a2)*step(e2,x_39)*step(x_39,e3),max(mix(v3,v4,a3)*step(e3,x_39)*step(x_39,e4),max(mix(v4,v5,a4)*step(e4,x_39)*step(x_39,e5),max(mix(v5,v6,a5)*step(e5,x_39)*step(x_39,e6),max(mix(v6,v7,a6)*step(e6,x_39)*step(x_39,e7),mix(v7,v8,a7)*step(e7,x_39)*step(x_39,e8))))))));}vec4 salinity(float x_26){const float e0=0.0;const vec4 v0=vec4(0.16470588235294117,0.09411764705882353,0.4235294117647059,1);const float e1=0.13;const vec4 v1=vec4(0.12941176470588237,0.19607843137254902,0.6352941176470588,1);const float e2=0.25;const vec4 v2=vec4(0.058823529411764705,0.35294117647058826,0.5686274509803921,1);const float e3=0.38;const vec4 v3=vec4(0.1568627450980392,0.4627450980392157,0.5372549019607843,1);const float e4=0.5;const vec4 v4=vec4(0.23137254901960785,0.5725490196078431,0.5294117647058824,1);const float e5=0.63;const vec4 v5=vec4(0.30980392156862746,0.6862745098039216,0.49411764705882355,1);const float e6=0.75;const vec4 v6=vec4(0.47058823529411764,0.796078431372549,0.40784313725490196,1);const float e7=0.88;const vec4 v7=vec4(0.7568627450980392,0.8666666666666667,0.39215686274509803,1);const float e8=1.0;const vec4 v8=vec4(0.9921568627450981,0.9372549019607843,0.6039215686274509,1);float a0=smoothstep(e0,e1,x_26);float a1=smoothstep(e1,e2,x_26);float a2=smoothstep(e2,e3,x_26);float a3=smoothstep(e3,e4,x_26);float a4=smoothstep(e4,e5,x_26);float a5=smoothstep(e5,e6,x_26);float a6=smoothstep(e6,e7,x_26);float a7=smoothstep(e7,e8,x_26);return max(mix(v0,v1,a0)*step(e0,x_26)*step(x_26,e1),max(mix(v1,v2,a1)*step(e1,x_26)*step(x_26,e2),max(mix(v2,v3,a2)*step(e2,x_26)*step(x_26,e3),max(mix(v3,v4,a3)*step(e3,x_26)*step(x_26,e4),max(mix(v4,v5,a4)*step(e4,x_26)*step(x_26,e5),max(mix(v5,v6,a5)*step(e5,x_26)*step(x_26,e6),max(mix(v6,v7,a6)*step(e6,x_26)*step(x_26,e7),mix(v7,v8,a7)*step(e7,x_26)*step(x_26,e8))))))));}vec4 temperature(float x_8){const float e0=0.0;const vec4 v0=vec4(0.01568627450980392,0.13725490196078433,0.2,1);const float e1=0.13;const vec4 v1=vec4(0.09019607843137255,0.2,0.47843137254901963,1);const float e2=0.25;const vec4 v2=vec4(0.3333333333333333,0.23137254901960785,0.615686274509804,1);const float e3=0.38;const vec4 v3=vec4(0.5058823529411764,0.30980392156862746,0.5607843137254902,1);const float e4=0.5;const vec4 v4=vec4(0.6862745098039216,0.37254901960784315,0.5098039215686274,1);const float e5=0.63;const vec4 v5=vec4(0.8705882352941177,0.4392156862745098,0.396078431372549,1);const float e6=0.75;const vec4 v6=vec4(0.9764705882352941,0.5725490196078431,0.25882352941176473,1);const float e7=0.88;const vec4 v7=vec4(0.9764705882352941,0.7686274509803922,0.2549019607843137,1);const float e8=1.0;const vec4 v8=vec4(0.9098039215686274,0.9803921568627451,0.3568627450980392,1);float a0=smoothstep(e0,e1,x_8);float a1=smoothstep(e1,e2,x_8);float a2=smoothstep(e2,e3,x_8);float a3=smoothstep(e3,e4,x_8);float a4=smoothstep(e4,e5,x_8);float a5=smoothstep(e5,e6,x_8);float a6=smoothstep(e6,e7,x_8);float a7=smoothstep(e7,e8,x_8);return max(mix(v0,v1,a0)*step(e0,x_8)*step(x_8,e1),max(mix(v1,v2,a1)*step(e1,x_8)*step(x_8,e2),max(mix(v2,v3,a2)*step(e2,x_8)*step(x_8,e3),max(mix(v3,v4,a3)*step(e3,x_8)*step(x_8,e4),max(mix(v4,v5,a4)*step(e4,x_8)*step(x_8,e5),max(mix(v5,v6,a5)*step(e5,x_8)*step(x_8,e6),max(mix(v6,v7,a6)*step(e6,x_8)*step(x_8,e7),mix(v7,v8,a7)*step(e7,x_8)*step(x_8,e8))))))));}vec4 turbidity(float x_40){const float e0=0.0;const vec4 v0=vec4(0.13333333333333333,0.12156862745098039,0.10588235294117647,1);const float e1=0.13;const vec4 v1=vec4(0.2549019607843137,0.19607843137254902,0.1607843137254902,1);const float e2=0.25;const vec4 v2=vec4(0.3843137254901961,0.27058823529411763,0.20392156862745098,1);const float e3=0.38;const vec4 v3=vec4(0.5137254901960784,0.34901960784313724,0.2235294117647059,1);const float e4=0.5;const vec4 v4=vec4(0.6313725490196078,0.4392156862745098,0.23137254901960785,1);const float e5=0.63;const vec4 v5=vec4(0.7254901960784313,0.5490196078431373,0.25882352941176473,1);const float e6=0.75;const vec4 v6=vec4(0.792156862745098,0.6823529411764706,0.34509803921568627,1);const float e7=0.88;const vec4 v7=vec4(0.8470588235294118,0.8196078431372549,0.49411764705882355,1);const float e8=1.0;const vec4 v8=vec4(0.9137254901960784,0.9647058823529412,0.6705882352941176,1);float a0=smoothstep(e0,e1,x_40);float a1=smoothstep(e1,e2,x_40);float a2=smoothstep(e2,e3,x_40);float a3=smoothstep(e3,e4,x_40);float a4=smoothstep(e4,e5,x_40);float a5=smoothstep(e5,e6,x_40);float a6=smoothstep(e6,e7,x_40);float a7=smoothstep(e7,e8,x_40);return max(mix(v0,v1,a0)*step(e0,x_40)*step(x_40,e1),max(mix(v1,v2,a1)*step(e1,x_40)*step(x_40,e2),max(mix(v2,v3,a2)*step(e2,x_40)*step(x_40,e3),max(mix(v3,v4,a3)*step(e3,x_40)*step(x_40,e4),max(mix(v4,v5,a4)*step(e4,x_40)*step(x_40,e5),max(mix(v5,v6,a5)*step(e5,x_40)*step(x_40,e6),max(mix(v6,v7,a6)*step(e6,x_40)*step(x_40,e7),mix(v7,v8,a7)*step(e7,x_40)*step(x_40,e8))))))));}vec4 velocity_blue_297387650(float x_2){const float e0=0.0;const vec4 v0=vec4(0.06666666666666667,0.12549019607843137,0.25098039215686274,1);const float e1=0.13;const vec4 v1=vec4(0.13725490196078433,0.20392156862745098,0.4549019607843137,1);const float e2=0.25;const vec4 v2=vec4(0.11372549019607843,0.3176470588235294,0.611764705882353,1);const float e3=0.38;const vec4 v3=vec4(0.12156862745098039,0.44313725490196076,0.6352941176470588,1);const float e4=0.5;const vec4 v4=vec4(0.19607843137254902,0.5647058823529412,0.6627450980392157,1);const float e5=0.63;const vec4 v5=vec4(0.3411764705882353,0.6784313725490196,0.6901960784313725,1);const float e6=0.75;const vec4 v6=vec4(0.5843137254901961,0.7686274509803922,0.7411764705882353,1);const float e7=0.88;const vec4 v7=vec4(0.796078431372549,0.8666666666666667,0.8274509803921568,1);const float e8=1.0;const vec4 v8=vec4(0.996078431372549,0.984313725490196,0.9019607843137255,1);float a0=smoothstep(e0,e1,x_2);float a1=smoothstep(e1,e2,x_2);float a2=smoothstep(e2,e3,x_2);float a3=smoothstep(e3,e4,x_2);float a4=smoothstep(e4,e5,x_2);float a5=smoothstep(e5,e6,x_2);float a6=smoothstep(e6,e7,x_2);float a7=smoothstep(e7,e8,x_2);return max(mix(v0,v1,a0)*step(e0,x_2)*step(x_2,e1),max(mix(v1,v2,a1)*step(e1,x_2)*step(x_2,e2),max(mix(v2,v3,a2)*step(e2,x_2)*step(x_2,e3),max(mix(v3,v4,a3)*step(e3,x_2)*step(x_2,e4),max(mix(v4,v5,a4)*step(e4,x_2)*step(x_2,e5),max(mix(v5,v6,a5)*step(e5,x_2)*step(x_2,e6),max(mix(v6,v7,a6)*step(e6,x_2)*step(x_2,e7),mix(v7,v8,a7)*step(e7,x_2)*step(x_2,e8))))))));}vec4 velocity_green_2558432129(float x_27){const float e0=0.0;const vec4 v0=vec4(0.09019607843137255,0.13725490196078433,0.07450980392156863,1);const float e1=0.13;const vec4 v1=vec4(0.09411764705882353,0.25098039215686274,0.14901960784313725,1);const float e2=0.25;const vec4 v2=vec4(0.043137254901960784,0.37254901960784315,0.17647058823529413,1);const float e3=0.38;const vec4 v3=vec4(0.15294117647058825,0.4823529411764706,0.13725490196078433,1);const float e4=0.5;const vec4 v4=vec4(0.37254901960784315,0.5725490196078431,0.047058823529411764,1);const float e5=0.63;const vec4 v5=vec4(0.596078431372549,0.6470588235294118,0.07058823529411765,1);const float e6=0.75;const vec4 v6=vec4(0.788235294117647,0.7294117647058823,0.27058823529411763,1);const float e7=0.88;const vec4 v7=vec4(0.9137254901960784,0.8470588235294118,0.5372549019607843,1);const float e8=1.0;const vec4 v8=vec4(1,0.9921568627450981,0.803921568627451,1);float a0=smoothstep(e0,e1,x_27);float a1=smoothstep(e1,e2,x_27);float a2=smoothstep(e2,e3,x_27);float a3=smoothstep(e3,e4,x_27);float a4=smoothstep(e4,e5,x_27);float a5=smoothstep(e5,e6,x_27);float a6=smoothstep(e6,e7,x_27);float a7=smoothstep(e7,e8,x_27);return max(mix(v0,v1,a0)*step(e0,x_27)*step(x_27,e1),max(mix(v1,v2,a1)*step(e1,x_27)*step(x_27,e2),max(mix(v2,v3,a2)*step(e2,x_27)*step(x_27,e3),max(mix(v3,v4,a3)*step(e3,x_27)*step(x_27,e4),max(mix(v4,v5,a4)*step(e4,x_27)*step(x_27,e5),max(mix(v5,v6,a5)*step(e5,x_27)*step(x_27,e6),max(mix(v6,v7,a6)*step(e6,x_27)*step(x_27,e7),mix(v7,v8,a7)*step(e7,x_27)*step(x_27,e8))))))));}vec4 cubehelix(float x_37){const float e0=0.0;const vec4 v0=vec4(0,0,0,1);const float e1=0.07;const vec4 v1=vec4(0.08627450980392157,0.0196078431372549,0.23137254901960785,1);const float e2=0.13;const vec4 v2=vec4(0.23529411764705882,0.01568627450980392,0.4117647058823529,1);const float e3=0.2;const vec4 v3=vec4(0.42745098039215684,0.00392156862745098,0.5294117647058824,1);const float e4=0.27;const vec4 v4=vec4(0.6313725490196078,0,0.5764705882352941,1);const float e5=0.33;const vec4 v5=vec4(0.8235294117647058,0.00784313725490196,0.5568627450980392,1);const float e6=0.4;const vec4 v6=vec4(0.984313725490196,0.043137254901960784,0.4823529411764706,1);const float e7=0.47;const vec4 v7=vec4(1,0.11372549019607843,0.3803921568627451,1);const float e8=0.53;const vec4 v8=vec4(1,0.21176470588235294,0.27058823529411763,1);const float e9=0.6;const vec4 v9=vec4(1,0.3333333333333333,0.1803921568627451,1);const float e10=0.67;const vec4 v10=vec4(1,0.47058823529411764,0.13333333333333333,1);const float e11=0.73;const vec4 v11=vec4(1,0.615686274509804,0.1450980392156863,1);const float e12=0.8;const vec4 v12=vec4(0.9450980392156862,0.7490196078431373,0.2235294117647059,1);const float e13=0.87;const vec4 v13=vec4(0.8784313725490196,0.8627450980392157,0.36470588235294116,1);const float e14=0.93;const vec4 v14=vec4(0.8549019607843137,0.9450980392156862,0.5568627450980392,1);const float e15=1.0;const vec4 v15=vec4(0.8901960784313725,0.9921568627450981,0.7764705882352941,1);float a0=smoothstep(e0,e1,x_37);float a1=smoothstep(e1,e2,x_37);float a2=smoothstep(e2,e3,x_37);float a3=smoothstep(e3,e4,x_37);float a4=smoothstep(e4,e5,x_37);float a5=smoothstep(e5,e6,x_37);float a6=smoothstep(e6,e7,x_37);float a7=smoothstep(e7,e8,x_37);float a8=smoothstep(e8,e9,x_37);float a9=smoothstep(e9,e10,x_37);float a10=smoothstep(e10,e11,x_37);float a11=smoothstep(e11,e12,x_37);float a12=smoothstep(e12,e13,x_37);float a13=smoothstep(e13,e14,x_37);float a14=smoothstep(e14,e15,x_37);return max(mix(v0,v1,a0)*step(e0,x_37)*step(x_37,e1),max(mix(v1,v2,a1)*step(e1,x_37)*step(x_37,e2),max(mix(v2,v3,a2)*step(e2,x_37)*step(x_37,e3),max(mix(v3,v4,a3)*step(e3,x_37)*step(x_37,e4),max(mix(v4,v5,a4)*step(e4,x_37)*step(x_37,e5),max(mix(v5,v6,a5)*step(e5,x_37)*step(x_37,e6),max(mix(v6,v7,a6)*step(e6,x_37)*step(x_37,e7),max(mix(v7,v8,a7)*step(e7,x_37)*step(x_37,e8),max(mix(v8,v9,a8)*step(e8,x_37)*step(x_37,e9),max(mix(v9,v10,a9)*step(e9,x_37)*step(x_37,e10),max(mix(v10,v11,a10)*step(e10,x_37)*step(x_37,e11),max(mix(v11,v12,a11)*step(e11,x_37)*step(x_37,e12),max(mix(v12,v13,a12)*step(e12,x_37)*step(x_37,e13),max(mix(v13,v14,a13)*step(e13,x_37)*step(x_37,e14),mix(v14,v15,a14)*step(e14,x_37)*step(x_37,e15)))))))))))))));}float apply_contrast_limits(float intensity,vec2 contrastLimits){float contrastLimitsAppliedToIntensity=(intensity-contrastLimits[0])/max(0.0005,(contrastLimits[1]-contrastLimits[0]));return max(0.,contrastLimitsAppliedToIntensity);}vec4 colormap(float intensity,float opacity){return vec4(COLORMAP_FUNCTION(min(1.,intensity)).xyz,opacity);}\"; // eslint-disable-line\n\nvar channels = {\n name: 'channel-intensity-module',\n fs\n};\n\nconst RENDERING_MODES_BLEND = {\n [RENDERING_MODES.MAX_INTENSITY_PROJECTION]: {\n _BEFORE_RENDER: `\\\n float maxVals[6] = float[6](-1.0, -1.0, -1.0, -1.0, -1.0, -1.0);\n `,\n _RENDER: `\\\n \n float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n for(int i = 0; i < 6; i++) {\n if(intensityArray[i] > maxVals[i]) {\n maxVals[i] = intensityArray[i];\n }\n }\n `,\n _AFTER_RENDER: `\\\n vec3 rgbCombo = vec3(0.0);\n for(int i = 0; i < 6; i++) {\n rgbCombo += max(0.0, min(1.0, maxVals[i])) * vec3(colors[i]);\n }\n color = vec4(rgbCombo, 1.0);\n `\n },\n [RENDERING_MODES.MIN_INTENSITY_PROJECTION]: {\n _BEFORE_RENDER: `\\\n float minVals[6] = float[6](1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0.);\n `,\n _RENDER: `\\\n \n float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n for(int i = 0; i < 6; i++) {\n if(intensityArray[i] < minVals[i]) {\n minVals[i] = intensityArray[i];\n }\n }\n `,\n _AFTER_RENDER: `\\\n vec3 rgbCombo = vec3(0.0);\n for(int i = 0; i < 6; i++) {\n rgbCombo += max(0.0, min(1.0, minVals[i])) * vec3(colors[i]);\n }\n color = vec4(rgbCombo, 1.0);\n `\n },\n [RENDERING_MODES.ADDITIVE]: {\n _BEFORE_RENDER: ``,\n _RENDER: `\\\n vec3 rgbCombo = vec3(0.0);\n vec3 hsvCombo = vec3(0.0);\n float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n float total = 0.0;\n for(int i = 0; i < 6; i++) {\n float intensityValue = intensityArray[i];\n rgbCombo += max(0.0, min(1.0, intensityValue)) * colors[i];\n total += intensityValue;\n }\n // Do not go past 1 in opacity.\n total = min(total, 1.0);\n vec4 val_color = vec4(rgbCombo, total);\n // Opacity correction\n val_color.a = 1.0 - pow(1.0 - val_color.a, 1.0);\n color.rgb += (1.0 - color.a) * val_color.a * val_color.rgb;\n color.a += (1.0 - color.a) * val_color.a;\n if (color.a >= 0.95) {\n break;\n }\n `,\n _AFTER_RENDER: ``\n }\n};\nconst RENDERING_MODES_COLORMAP = {\n [RENDERING_MODES.MAX_INTENSITY_PROJECTION]: {\n _BEFORE_RENDER: `\\\n float maxVals[6] = float[6](-1.0, -1.0, -1.0, -1.0, -1.0, -1.0);\n `,\n _RENDER: `\\\n \n float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n for(int i = 0; i < 6; i++) {\n if(intensityArray[i] > maxVals[i]) {\n maxVals[i] = intensityArray[i];\n }\n }\n `,\n _AFTER_RENDER: `\\\n float total = 0.0;\n for(int i = 0; i < 6; i++) {\n total += maxVals[i];\n }\n // Do not go past 1 in opacity/colormap value.\n total = min(total, 1.0);\n color = colormap(total, total);\n `\n },\n [RENDERING_MODES.MIN_INTENSITY_PROJECTION]: {\n _BEFORE_RENDER: `\\\n float minVals[6] = float[6](1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0., 1. / 0.);\n `,\n _RENDER: `\\\n \n float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\n for(int i = 0; i < 6; i++) {\n if(intensityArray[i] < minVals[i]) {\n minVals[i] = intensityArray[i];\n }\n }\n `,\n _AFTER_RENDER: `\\\n float total = 0.0;\n for(int i = 0; i < 6; i++) {\n total += minVals[i];\n }\n // Do not go past 1 in opacity/colormap value.\n total = min(total, 1.0);\n color = colormap(total, total);\n `\n },\n [RENDERING_MODES.ADDITIVE]: {\n _BEFORE_RENDER: ``,\n _RENDER: `\\\n float intensityArray[6] = float[6](intensityValue0, intensityValue1, intensityValue2, intensityValue3, intensityValue4, intensityValue5);\n\t\tfloat total = 0.0;\n\n\t\tfor(int i = 0; i < 6; i++) {\n\t\t\ttotal += intensityArray[i];\n\t\t}\n\t\t// Do not go past 1 in opacity/colormap value.\n\t\ttotal = min(total, 1.0);\n\n\t\tvec4 val_color = colormap(total, total);\n\n\t\t// Opacity correction\n\t\tval_color.a = 1.0 - pow(1.0 - val_color.a, 1.0);\n\t\tcolor.rgb += (1.0 - color.a) * val_color.a * val_color.rgb;\n\t\tcolor.a += (1.0 - color.a) * val_color.a;\n\t\tif (color.a >= 0.95) {\n\t\t\tbreak;\n\t\t}\n p += ray_dir * dt;\n `,\n _AFTER_RENDER: ``\n }\n};\n\n/* This is largely an adaptation of Will Usher's excellent blog post/code:\nhttps://github.com/Twinklebear/webgl-volume-raycaster\nWithout his app, this would have been exponentially more difficult to do, so we thank him dearly.\n\nThe major changes are:\n\n- Code has been adapted to the luma.gl/deck.gl framework instead of more-or-less pure WebGL.\n\n- We use a coordinate system that will allow overlays/other figures on our vertex shader/javascript via the `uniform mat4 scale` that matches raw pixel size multiplied by\nthe ratio of physical sizes (if present) to the world space, just like our 2D layers. Will implements everything in a unit cube (I think?) centered at the origin.\n\n- We use an OrbitView which is a similar camera to what Will has, but stops gimbal lock from happening\nby stopping full rotations whereas Will implements a camera that allows for full rotations without gimbal lock via quaternions.\nWe have an open issue for implementing this deck.gl: https://github.com/visgl/deck.gl/issues/5364\n\n- We have a multi-channel use case and have a few tweaks in the fragment shader to handle that.\n\n- We convert all of our data to Float32Array so we can use LINEAR sampling while also maintaing the dynamic range and integrity of the data.\n\n- Will uses a colormap via a sampled texture, which is a very good idea, but not something we are geared up for in 2D, so not something we will do in 3D either: \nhttps://github.com/visgl/luma.gl/issues/1415\n\n- We allow for multiple rendering settings (Max/Min Int. Proj., Additive, etc.)\n\n- We allow for arbtirary affine transformations via deck.gl's modelMatrix prop and have updated the vertex shader accordingly.\nMore information about that is detailed in the comments there.\n*/\n\nconst CUBE_STRIP = [1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0];\nconst NUM_PLANES_DEFAULT = 1;\nconst defaultProps$1 = {\n pickable: false,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n channelData: {\n type: 'object',\n value: {},\n compare: true\n },\n colors: {\n type: 'array',\n value: [],\n compare: true\n },\n contrastLimits: {\n type: 'array',\n value: [],\n compare: true\n },\n dtype: {\n type: 'string',\n value: 'Uint8',\n compare: true\n },\n colormap: {\n type: 'string',\n value: '',\n compare: true\n },\n xSlice: {\n type: 'array',\n value: null,\n compare: true\n },\n ySlice: {\n type: 'array',\n value: null,\n compare: true\n },\n zSlice: {\n type: 'array',\n value: null,\n compare: true\n },\n clippingPlanes: {\n type: 'array',\n value: [],\n compare: true\n },\n renderingMode: {\n type: 'string',\n value: RENDERING_MODES.ADDITIVE,\n compare: true\n },\n resolutionMatrix: {\n type: 'object',\n value: new Matrix4(),\n compare: true\n }\n};\n\nfunction getRenderingAttrs() {\n const values = getDtypeValues('Float32');\n return { ...values,\n sampler: values.sampler.replace('2D', '3D'),\n cast: data => new Float32Array(data)\n };\n}\n\nfunction removeExtraColormapFunctionsFromShader(colormap) {\n // Always include viridis so shaders compile,\n // but otherwise we discard all other colormaps via a regex.\n // With all the colormaps, the shaders were too large\n // and crashed our computers when we loaded volumes too large.\n const discardColormaps = COLORMAPS.filter(i => i !== (colormap || 'viridis')).map(i => i.replace(/-/g, '_'));\n const discardRegex = new RegExp(`vec4 (${discardColormaps.join('(_([0-9]*))?|')})\\\\(float x_[0-9]+\\\\){([^}]+)}`, 'g');\n const channelsModules = { ...channels,\n fs: channels.fs.replace(discardRegex, ''),\n defines: {\n COLORMAP_FUNCTION: colormap || 'viridis'\n }\n };\n return channelsModules;\n}\n/**\n * @typedef LayerProps\n * @type {Object}\n * @property {Array.<Array.<number>>} contrastLimits List of [begin, end] values to control each channel's ramp function.\n * @property {Array.<Array.<number>>} colors List of [r, g, b] values for each channel.\n * @property {Array.<boolean>} channelsVisible List of boolean values for each channel for whether or not it is visible.\n * @property {string} dtype Dtype for the layer.\n * @property {string=} colormap String indicating a colormap (default: ''). The full list of options is here: https://github.com/glslify/glsl-colormap#glsl-colormap\n * @property {Array.<Array.<number>>=} domain Override for the possible max/min values (i.e something different than 65535 for uint16/'<u2').\n * @property {string=} renderingMode One of Maximum Intensity Projection, Minimum Intensity Projection, or Additive\n * @property {Object=} modelMatrix A column major affine transformation to be applied to the volume.\n * @property {Array.<number>=} xSlice 0-width (physical coordinates) interval on which to slice the volume.\n * @property {Array.<number>=} ySlice 0-height (physical coordinates) interval on which to slice the volume.\n * @property {Array.<number>=} zSlice 0-depth (physical coordinates) interval on which to slice the volume.\n * @property {Array.<Object>=} clippingPlanes List of math.gl [Plane](https://math.gl/modules/culling/docs/api-reference/plane) objects.\n * @property {Object=} resolutionMatrix Matrix for scaling the volume based on the (downsampled) resolution being displayed.\n */\n\n/**\n * @type {{ new <S extends string[]>(...props: import('../../../types').Viv<LayerProps>[]) }}\n * @ignore\n */\n\n\nconst XR3DLayer = class extends Layer {\n initializeState() {\n const {\n gl\n } = this.context; // This tells WebGL how to read row data from the texture. For example, the default here is 4 (i.e for RGBA, one byte per channel) so\n // each row of data is expected to be a multiple of 4. This setting (i.e 1) allows us to have non-multiple-of-4 row sizes. For example, for 2 byte (16 bit data),\n // we could use 2 as the value and it would still work, but 1 also works fine (and is more flexible for 8 bit - 1 byte - textures as well).\n // https://stackoverflow.com/questions/42789896/webgl-error-arraybuffer-not-big-enough-for-request-in-case-of-gl-luminance\n\n gl.pixelStorei(GL.UNPACK_ALIGNMENT, 1);\n gl.pixelStorei(GL.PACK_ALIGNMENT, 1);\n const programManager = ProgramManager.getDefaultProgramManager(gl);\n const processStr = `fs:DECKGL_PROCESS_INTENSITY(inout float intensity, vec2 contrastLimits, int channelIndex)`;\n\n if (!programManager._hookFunctions.includes(processStr)) {\n programManager.addShaderHook(processStr);\n }\n }\n\n _isHookDefinedByExtensions(hookName) {\n const {\n extensions\n } = this.props;\n return extensions?.some(e => {\n const shaders = e.getShaders();\n const {\n inject = {},\n modules = []\n } = shaders;\n const definesInjection = inject[hookName];\n const moduleDefinesInjection = modules.some(m => m?.inject[hookName]);\n return definesInjection || moduleDefinesInjection;\n });\n }\n /**\n * This function compiles the shaders and the projection module.\n */\n\n\n getShaders() {\n const {\n colormap,\n renderingMode,\n clippingPlanes\n } = this.props;\n const {\n sampler\n } = getRenderingAttrs();\n const {\n _BEFORE_RENDER,\n _RENDER,\n _AFTER_RENDER\n } = colormap ? RENDERING_MODES_COLORMAP[renderingMode] : RENDERING_MODES_BLEND[renderingMode];\n const channelsModules = removeExtraColormapFunctionsFromShader(colormap);\n\n const extensionDefinesDeckglProcessIntensity = this._isHookDefinedByExtensions('fs:DECKGL_PROCESS_INTENSITY');\n\n const newChannelsModule = { ...channelsModules,\n inject: {}\n };\n\n if (!extensionDefinesDeckglProcessIntensity) {\n newChannelsModule.inject['fs:DECKGL_PROCESS_INTENSITY'] = `\n intensity = apply_contrast_limits(intensity, contrastLimits);\n `;\n }\n\n return super.getShaders({\n vs,\n fs: fs$1.replace('_BEFORE_RENDER', _BEFORE_RENDER).replace('_RENDER', _RENDER).replace('_AFTER_RENDER', _AFTER_RENDER),\n defines: {\n SAMPLER_TYPE: sampler,\n COLORMAP_FUNCTION: colormap || 'viridis',\n NUM_PLANES: String(clippingPlanes.length || NUM_PLANES_DEFAULT)\n },\n modules: [newChannelsModule]\n });\n }\n /**\n * This function finalizes state by clearing all textures from the WebGL context\n */\n\n\n finalizeState() {\n super.finalizeState();\n\n if (this.state.textures) {\n Object.values(this.state.textures).forEach(tex => tex && tex.delete());\n }\n }\n /**\n * This function updates state by retriggering model creation (shader compilation and attribute binding)\n * and loading any textures that need be loading.\n */\n\n\n updateState({\n props,\n oldProps,\n changeFlags\n }) {\n // setup model first\n if (changeFlags.extensionsChanged || props.colormap !== oldProps.colormap || props.renderingMode !== oldProps.renderingMode || props.clippingPlanes.length !== oldProps.clippingPlanes.length) {\n const {\n gl\n } = this.context;\n\n if (this.state.model) {\n this.state.model.delete();\n }\n\n this.setState({\n model: this._getModel(gl)\n });\n }\n\n if (props.channelData && props?.channelData?.data !== oldProps?.channelData?.data) {\n this.loadTexture(props.channelData);\n }\n }\n /**\n * This function creates the luma.gl model.\n */\n\n\n _getModel(gl) {\n if (!gl) {\n return null;\n }\n\n return new Model(gl, { ...this.getShaders(),\n geometry: new Geometry({\n drawMode: gl.TRIANGLE_STRIP,\n attributes: {\n positions: new Float32Array(CUBE_STRIP)\n }\n })\n });\n }\n /**\n * This function runs the shaders and draws to the canvas\n */\n\n\n draw({\n uniforms\n }) {\n const {\n textures,\n model,\n scaleMatrix\n } = this.state;\n const {\n contrastLimits,\n colors,\n xSlice,\n ySlice,\n zSlice,\n modelMatrix,\n channelsVisible,\n domain,\n dtype,\n clippingPlanes,\n resolutionMatrix\n } = this.props;\n const {\n viewMatrix,\n viewMatrixInverse,\n projectionMatrix\n } = this.context.viewport;\n\n if (textures && model && scaleMatrix) {\n const paddedContrastLimits = padContrastLimits({\n contrastLimits,\n channelsVisible,\n domain,\n dtype\n });\n const paddedColors = padColors({\n colors,\n channelsVisible\n });\n const invertedScaleMatrix = scaleMatrix.clone().invert();\n const invertedResolutionMatrix = resolutionMatrix.clone().invert();\n const paddedClippingPlanes = padWithDefault(clippingPlanes.map(p => p.clone().transform(invertedScaleMatrix).transform(invertedResolutionMatrix)), new Plane([1, 0, 0]), clippingPlanes.length || NUM_PLANES_DEFAULT); // Need to flatten for shaders.\n\n const normals = paddedClippingPlanes.map(plane => plane.normal).flat();\n const distances = paddedClippingPlanes.map(plane => plane.distance);\n model.setUniforms({ ...uniforms,\n ...textures,\n contrastLimits: paddedContrastLimits,\n colors: paddedColors,\n xSlice: new Float32Array(xSlice ? xSlice.map(i => i / scaleMatrix[0] / resolutionMatrix[0]) : [0, 1]),\n ySlice: new Float32Array(ySlice ? ySlice.map(i => i / scaleMatrix[5] / resolutionMatrix[5]) : [0, 1]),\n zSlice: new Float32Array(zSlice ? zSlice.map(i => i / scaleMatrix[10] / resolutionMatrix[10]) : [0, 1]),\n eye_pos: new Float32Array([viewMatrixInverse[12], viewMatrixInverse[13], viewMatrixInverse[14]]),\n view: viewMatrix,\n proj: projectionMatrix,\n scale: scaleMatrix,\n resolution: resolutionMatrix,\n model: modelMatrix || new Matrix4(),\n normals,\n distances\n }).draw();\n }\n }\n /**\n * This function loads all textures from incoming resolved promises/data from the loaders by calling `dataToTexture`\n */\n\n\n loadTexture(channelData) {\n const textures = {\n volume0: null,\n volume1: null,\n volume2: null,\n volume3: null,\n volume4: null,\n volume5: null\n };\n\n if (this.state.textures) {\n Object.values(this.state.textures).forEach(tex => tex && tex.delete());\n }\n\n if (channelData && Object.keys(channelData).length > 0 && channelData.data) {\n const {\n height,\n width,\n depth\n } = channelData;\n channelData.data.forEach((d, i) => {\n textures[`volume${i}`] = this.dataToTexture(d, width, height, depth);\n }, this);\n this.setState({\n textures,\n scaleMatrix: new Matrix4().scale(this.props.physicalSizeScalingMatrix.transformPoint([width, height, depth]))\n });\n }\n }\n /**\n * This function creates textures from the data\n */\n\n\n dataToTexture(data, width, height, depth) {\n const attrs = getRenderingAttrs();\n const texture = new Texture3D(this.context.gl, {\n width,\n height,\n depth,\n data: attrs.cast?.(data) ?? data,\n // ? Seems to be a luma.gl bug. Looks like Texture2D is wrong or this is but these are flipped somewhere.\n format: attrs.dataFormat,\n dataFormat: attrs.format,\n type: attrs.type,\n mipmaps: false,\n parameters: {\n [GL.TEXTURE_MIN_FILTER]: GL.LINEAR,\n [GL.TEXTURE_MAG_FILTER]: GL.LINEAR,\n [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_R]: GL.CLAMP_TO_EDGE\n }\n });\n return texture;\n }\n\n};\nXR3DLayer.layerName = 'XR3DLayer';\nXR3DLayer.defaultProps = defaultProps$1;\n\n/* global globalThis */\n/**\n * Creates a single continguous TypedArray that can visualized as a volume in 3D space where the y-axis going up is positive,\n * the x-axis going right is positive, and the z-axis coming out of the screen is positive.\n * To do this, and keep the orientation, we must anti-diagonally transpose each slice of raster data so that the (0, 0) data point is transformed\n * to the top right. If you start the camera looking at the 0th slice (or rotate from looking at the final slice) in 3D, this becomes more apparent.\n * Of note here is that in 2D rendering, the y-axis is positive in the downward direction.\n *\n * @param {object} props\n * @param {object} props.source PixelSource\n * @param {object} props.selection A single selection for the PixelSource\n * @param {object} props.onUpdate A callback for progress that is called twice during the loading of each plane, once when the promsie resolves and once when it is loaded into the final contiguous buffer.\n * @param {object} props.downsampleDepth This is the number by which to downsample on the z direction, usually `2 ** resolution` where `resolution` is that of the `PixelSource` in the image pyramid.\n * The idea here is to get every `downsampleDepth` raster slice so that proper scaling is maintained (just liek a 2D image pyramid).\n * @return {TypedArray}\n * @ignore\n */\n\nasync function getVolume({\n source,\n selection,\n onUpdate = () => {},\n downsampleDepth = 1,\n signal\n}) {\n const {\n shape,\n labels,\n dtype\n } = source;\n const {\n height,\n width\n } = getImageSize(source);\n const depth = shape[labels.indexOf('z')];\n const depthDownsampled = Math.max(1, Math.floor(depth / downsampleDepth));\n const rasterSize = height * width;\n const name = `${dtype}Array`;\n const TypedArray = globalThis[name];\n const volumeData = new TypedArray(rasterSize * depthDownsampled);\n await Promise.all(new Array(depthDownsampled).fill(0).map(async (_, z) => {\n const depthSelection = { ...selection,\n z: z * downsampleDepth\n };\n const {\n data: rasterData\n } = await source.getRaster({\n selection: depthSelection,\n signal\n });\n let r = 0;\n onUpdate(); // For now this process fills in each raster plane anti-diagonally transposed.\n // This is to ensure that the image looks right in three dimensional space.\n\n while (r < rasterSize) {\n const volIndex = z * rasterSize + (rasterSize - r - 1);\n const rasterIndex = (width - r - 1) % width + width * Math.floor(r / width);\n volumeData[volIndex] = rasterData[rasterIndex];\n r += 1;\n }\n\n onUpdate();\n }));\n return {\n data: volumeData,\n height,\n width,\n depth: depthDownsampled\n };\n}\nconst getTextLayer = (text, viewport, id) => {\n return new TextLayer({\n id: `text-${id}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [{\n text,\n position: viewport.position\n }],\n getColor: [220, 220, 220, 255],\n getSize: 25,\n sizeUnits: 'meters',\n sizeScale: 2 ** -viewport.zoom,\n fontFamily: 'Helvetica'\n });\n};\n\nconst defaultProps = {\n pickable: false,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n contrastLimits: {\n type: 'array',\n value: [],\n compare: true\n },\n channelsVisible: {\n type: 'array',\n value: [],\n compare: true\n },\n colors: {\n type: 'array',\n value: [],\n compare: true\n },\n colormap: {\n type: 'string',\n value: '',\n compare: true\n },\n selections: {\n type: 'array',\n value: [],\n compare: true\n },\n resolution: {\n type: 'number',\n value: 0,\n compare: true\n },\n domain: {\n type: 'array',\n value: [],\n compare: true\n },\n loader: {\n type: 'object',\n value: [{\n getRaster: async () => ({\n data: [],\n height: 0,\n width: 0\n }),\n dtype: 'Uint16',\n shape: [1],\n labels: ['z']\n }],\n compare: true\n },\n xSlice: {\n type: 'array',\n value: null,\n compare: true\n },\n ySlice: {\n type: 'array',\n value: null,\n compare: true\n },\n zSlice: {\n type: 'array',\n value: null,\n compare: true\n },\n clippingPlanes: {\n type: 'array',\n value: [],\n compare: true\n },\n renderingMode: {\n type: 'string',\n value: RENDERING_MODES.MAX_INTENSITY_PROJECTION,\n compare: true\n },\n onUpdate: {\n type: 'function',\n value: () => {},\n compare: true\n },\n useProgressIndicator: {\n type: 'boolean',\n value: true,\n compare: true\n },\n useWebGL1Warning: {\n type: 'boolean',\n value: true,\n compare: true\n }\n};\n/**\n * @typedef LayerProps\n * @type {Object}\n * @property {Array.<Array.<number>>} contrastLimits List of [begin, end] values to control each channel's ramp function.\n * @property {Array.<Array.<number>>} colors List of [r, g, b] values for each channel.\n * @property {Array.<boolean>} channelsVisible List of boolean values for each channel for whether or not it is visible.\n * @property {Array} loader PixelSource[]. Represents an N-dimensional image.\n * @property {Array} selections Selection to be used for fetching data.\n * @property {string=} colormap String indicating a colormap (default: ''). The full list of options is here: https://github.com/glslify/glsl-colormap#glsl-colormap\n * @property {Array.<Array.<number>>=} domain Override for the possible max/min values (i.e something different than 65535 for uint16/'<u2').\n * @property {number=} resolution Resolution at which you would like to see the volume and load it into memory (0 highest, loader.length -1 the lowest default 0)\n * @property {string=} renderingMode One of Maximum Intensity Projection, Minimum Intensity Projection, or Additive\n * @property {Object=} modelMatrix A column major affine transformation to be applied to the volume.\n * @property {Array.<number>=} xSlice 0-width (physical coordinates) interval on which to slice the volume.\n * @property {Array.<number>=} ySlice 0-height (physical coordinates) interval on which to slice the volume.\n * @property {Array.<number>=} zSlice 0-depth (physical coordinates) interval on which to slice the volume.\n * @property {function=} onViewportLoad Function that gets called when the data in the viewport loads.\n * @property {Array.<Object>=} clippingPlanes List of math.gl [Plane](https://math.gl/modules/culling/docs/api-reference/plane) objects.\n * @property {boolean=} useProgressIndicator Whether or not to use the default progress text + indicator (default is true)\n * @property {boolean=} useWebGL1Warning Whether or not to use the default WebGL1 warning (default is true)\n * @property {function=} onUpdate A callback to be used for getting updates of the progress, ({ progress }) => {}\n */\n\n/**\n * @type {{ new <S extends string[]>(...props: import('../../types').Viv<LayerProps, S>[]) }}\n * @ignore\n */\n\nconst VolumeLayer = class extends CompositeLayer {\n clearState() {\n this.setState({\n height: null,\n width: null,\n depth: null,\n data: null,\n physicalSizeScalingMatrix: null,\n resolutionMatrix: null,\n progress: 0,\n abortController: null\n });\n }\n\n finalizeState() {\n this.state.abortController.abort();\n }\n\n updateState({\n oldProps,\n props\n }) {\n const loaderChanged = props.loader !== oldProps.loader;\n const resolutionChanged = props.resolution !== oldProps.resolution;\n const selectionsChanged = props.selections !== oldProps.selections; // Only fetch new data to render if loader has changed\n\n if (resolutionChanged) {\n // Clear last volume.\n this.clearState();\n }\n\n if (loaderChanged || selectionsChanged || resolutionChanged) {\n const {\n loader,\n selections = [],\n resolution,\n onViewportLoad\n } = this.props;\n const source = loader[resolution];\n let progress = 0;\n const totalRequests = // eslint-disable-next-line no-bitwise\n (source.shape[source.labels.indexOf('z')] >> resolution) * selections.length;\n\n const onUpdate = () => {\n progress += 0.5 / totalRequests;\n\n if (this.props.onUpdate) {\n this.props.onUpdate({\n progress\n });\n }\n\n this.setState({\n progress\n });\n };\n\n const abortController = new AbortController();\n this.setState({\n abortController\n });\n const {\n signal\n } = abortController;\n const volumePromises = selections.map(selection => getVolume({\n selection,\n source,\n onUpdate,\n downsampleDepth: 2 ** resolution,\n signal\n }));\n const physicalSizeScalingMatrix = getPhysicalSizeScalingMatrix(loader[resolution]);\n Promise.all(volumePromises).then(volumes => {\n if (onViewportLoad) {\n onViewportLoad(volumes);\n }\n\n const volume = {\n data: volumes.map(d => d.data),\n width: volumes[0].width,\n height: volumes[0].height,\n depth: volumes[0].depth\n };\n this.setState({ ...volume,\n physicalSizeScalingMatrix,\n resolutionMatrix: new Matrix4().scale(2 ** resolution)\n });\n });\n }\n }\n\n renderLayers() {\n const {\n loader,\n id,\n resolution,\n useProgressIndicator,\n useWebGL1Warning\n } = this.props;\n const {\n dtype\n } = loader[resolution];\n const {\n data,\n width,\n height,\n depth,\n progress,\n physicalSizeScalingMatrix,\n resolutionMatrix\n } = this.state;\n const {\n gl\n } = this.context;\n\n if (!isWebGL2(gl) && useWebGL1Warning) {\n const {\n viewport\n } = this.context;\n return getTextLayer(['Volume rendering is only available on browsers that support WebGL2. If you', 'are using Safari, you can turn on WebGL2 by navigating in the top menubar', 'to check Develop > Experimental Features > WebGL 2.0 and then refreshing', 'the page.'].join('\\n'), viewport, id);\n }\n\n if (!(width && height) && useProgressIndicator) {\n const {\n viewport\n } = this.context;\n return getTextLayer(`Loading Volume ${String((progress || 0) * 100).slice(0, 5)}%...`, viewport, id);\n }\n\n return new XR3DLayer(this.props, {\n channelData: {\n data,\n width,\n height,\n depth\n },\n id: `XR3DLayer-${0}-${height}-${width}-${0}-${resolution}-${id}`,\n physicalSizeScalingMatrix,\n parameters: {\n [GL.CULL_FACE]: true,\n [GL.CULL_FACE_MODE]: GL.FRONT,\n [GL.DEPTH_TEST]: false,\n blendFunc: [GL.SRC_ALPHA, GL.ONE],\n blend: true\n },\n resolutionMatrix,\n dtype\n });\n }\n\n};\nVolumeLayer.layerName = 'VolumeLayer';\nVolumeLayer.defaultProps = defaultProps;\n\nvar _jsxFileName$3 = \"/Users/ilangold/Projects/Gehlenborg/viv/src/viewers/VivViewer.jsx\";\nconst areViewStatesEqual = (viewState, otherViewState) => {\n return otherViewState === viewState || viewState?.zoom === otherViewState?.zoom && viewState?.rotationX === otherViewState?.rotationX && viewState?.rotationOrbit === otherViewState?.rotationOrbit && equal(viewState?.target, otherViewState?.target);\n};\nclass VivViewerWrapper extends PureComponent {\n constructor(props) {\n super(props);\n this.state = {\n viewStates: {}\n };\n const {\n viewStates\n } = this.state;\n const {\n views,\n viewStates: initialViewStates\n } = this.props;\n views.forEach((view) => {\n viewStates[view.id] = view.filterViewState({\n viewState: initialViewStates.find((v) => v.id === view.id)\n });\n });\n this._onViewStateChange = this._onViewStateChange.bind(this);\n this.layerFilter = this.layerFilter.bind(this);\n this.onHover = this.onHover.bind(this);\n }\n layerFilter({\n layer,\n viewport\n }) {\n return layer.id.includes(getVivId(viewport.id));\n }\n _onViewStateChange({\n viewId,\n viewState,\n interactionState,\n oldViewState\n }) {\n const {\n views,\n onViewStateChange\n } = this.props;\n viewState = onViewStateChange && onViewStateChange({\n viewId,\n viewState,\n interactionState,\n oldViewState\n }) || viewState;\n this.setState((prevState) => {\n const viewStates = {};\n views.forEach((view) => {\n const currentViewState = prevState.viewStates[view.id];\n viewStates[view.id] = view.filterViewState({\n viewState: {\n ...viewState,\n id: viewId\n },\n oldViewState,\n currentViewState\n });\n });\n return {\n viewStates\n };\n });\n return viewState;\n }\n componentDidUpdate(prevProps) {\n const {\n props\n } = this;\n const {\n views\n } = props;\n const viewStates = {\n ...this.state.viewStates\n };\n let anyChanged = false;\n views.forEach((view) => {\n const currViewState = props.viewStates?.find((viewState) => viewState.id === view.id);\n if (!currViewState) {\n return;\n }\n const prevViewState = prevProps.viewStates?.find((viewState) => viewState.id === view.id);\n if (areViewStatesEqual(currViewState, prevViewState)) {\n return;\n }\n anyChanged = true;\n const {\n height,\n width\n } = view;\n viewStates[view.id] = view.filterViewState({\n viewState: {\n ...currViewState,\n height,\n width,\n id: view.id\n }\n });\n });\n if (anyChanged) {\n this.setState({\n viewStates\n });\n }\n }\n static getDerivedStateFromProps(props, prevState) {\n const {\n views,\n viewStates: viewStatesProps\n } = props;\n if (views.some((view) => !prevState.viewStates[view.id] || view.height !== prevState.viewStates[view.id].height || view.width !== prevState.viewStates[view.id].width)) {\n const viewStates = {};\n views.forEach((view) => {\n const {\n height,\n width\n } = view;\n const currentViewState = prevState.viewStates[view.id];\n viewStates[view.id] = view.filterViewState({\n viewState: {\n ...currentViewState || viewStatesProps.find((v) => v.id === view.id),\n height,\n width,\n id: view.id\n }\n });\n });\n return {\n viewStates\n };\n }\n return prevState;\n }\n onHover(info, event) {\n const {\n tile,\n coordinate,\n sourceLayer: layer\n } = info;\n const {\n onHover,\n hoverHooks\n } = this.props;\n if (onHover) {\n onHover(info, event);\n }\n if (!hoverHooks || !coordinate || !layer) {\n return null;\n }\n const {\n handleValue = () => {\n },\n handleCoordnate = () => {\n }\n } = hoverHooks;\n let hoverData;\n if (layer.id.includes(\"Tiled\")) {\n if (!tile?.content) {\n return null;\n }\n const {\n content,\n bbox,\n z\n } = tile;\n if (!content.data || !bbox) {\n return null;\n }\n const {\n data,\n width,\n height\n } = content;\n const {\n left,\n right,\n top,\n bottom\n } = bbox;\n const bounds = [left, data.height < layer.tileSize ? height : bottom, data.width < layer.tileSize ? width : right, top];\n if (!data) {\n return null;\n }\n const layerZoomScale = Math.max(1, 2 ** Math.round(-z));\n const dataCoords = [Math.floor((coordinate[0] - bounds[0]) / layerZoomScale), Math.floor((coordinate[1] - bounds[3]) / layerZoomScale)];\n const coords = dataCoords[1] * width + dataCoords[0];\n hoverData = data.map((d) => d[coords]);\n } else {\n const {\n channelData\n } = layer.props;\n if (!channelData) {\n return null;\n }\n const {\n data,\n width,\n height\n } = channelData;\n if (!data || !width || !height) {\n return null;\n }\n const bounds = [0, height, width, 0];\n const {\n zoom\n } = layer.context.viewport;\n const layerZoomScale = Math.max(1, 2 ** Math.floor(-zoom));\n const dataCoords = [Math.floor((coordinate[0] - bounds[0]) / layerZoomScale), Math.floor((coordinate[1] - bounds[3]) / layerZoomScale)];\n const coords = dataCoords[1] * width + dataCoords[0];\n hoverData = data.map((d) => d[coords]);\n }\n handleValue(hoverData);\n handleCoordnate(coordinate);\n }\n _renderLayers() {\n const {\n onHover\n } = this;\n const {\n viewStates\n } = this.state;\n const {\n views,\n layerProps\n } = this.props;\n return views.map((view, i) => view.getLayers({\n viewStates,\n props: {\n ...layerProps[i],\n onHover\n }\n }));\n }\n render() {\n const {\n views,\n randomize,\n useDevicePixels = true,\n deckProps\n } = this.props;\n const {\n viewStates\n } = this.state;\n const deckGLViews = views.map((view) => view.getDeckGlView());\n if (randomize) {\n const random = Math.random();\n const holdFirstElement = deckGLViews[0];\n const randomWieghted = random * 1.49;\n const randomizedIndex = Math.round(randomWieghted * (views.length - 1));\n deckGLViews[0] = deckGLViews[randomizedIndex];\n deckGLViews[randomizedIndex] = holdFirstElement;\n }\n return /* @__PURE__ */ jsxDEV(DeckGL, {\n ...deckProps ?? {},\n layerFilter: this.layerFilter,\n layers: this._renderLayers(),\n onViewStateChange: this._onViewStateChange,\n views: deckGLViews,\n viewState: viewStates,\n useDevicePixels,\n getCursor: ({\n isDragging\n }) => {\n return isDragging ? \"grabbing\" : \"crosshair\";\n }\n }, void 0, false, {\n fileName: _jsxFileName$3,\n lineNumber: 301,\n columnNumber: 7\n }, this);\n }\n}\nconst VivViewer = (props) => /* @__PURE__ */ jsxDEV(VivViewerWrapper, {\n ...props\n}, void 0, false, {\n fileName: _jsxFileName$3,\n lineNumber: 333,\n columnNumber: 28\n}, undefined);\n\n/**\n * This class generates a layer and a view for use in the VivViewer\n * @param {Object} args\n * @param {string} args.id id for this VivView.\n * @param {Object} args.height Width of the view.\n * @param {Object} args.width Height of the view.\n * @param {string} args.id Id for the current view\n * @param {number=} args.x X (top-left) location on the screen for the current view\n * @param {number=} args.y Y (top-left) location on the screen for the current view\n */\n\nclass VivView {\n constructor({\n id,\n x = 0,\n y = 0,\n height,\n width\n }) {\n this.width = width;\n this.height = height;\n this.id = id;\n this.x = x;\n this.y = y;\n }\n /**\n * Create a DeckGL view based on this class.\n * @returns {View} The DeckGL View for this class.\n */\n\n\n getDeckGlView() {\n return new OrthographicView({\n controller: true,\n id: this.id,\n height: this.height,\n width: this.width,\n x: this.x,\n y: this.y\n });\n }\n /**\n * Create a viewState for this class, checking the id to make sure this class and veiwState match.\n * @param {Object} args\n * @param {object} [args.viewState] incoming ViewState object from deck.gl update.\n * @param {object} [args.oldViewState] old ViewState object from deck.gl.\n * @param {object} [args.currentViewState] current ViewState object in react state.\n * @returns {?object} ViewState for this class (or null by default if the ids do not match).\n */\n\n\n filterViewState({\n viewState\n }) {\n const {\n id,\n height,\n width\n } = this;\n return viewState.id === id ? {\n height,\n width,\n ...viewState\n } : null;\n }\n /**\n * Create a layer for this instance.\n * @param {Object} args\n * @param {Object<string,Object>} args.viewStates ViewStates for all current views.\n * @param {Object} args.props Props for this instance.\n * @returns {Layer} Instance of a layer.\n */\n // eslint-disable-next-line class-methods-use-this,no-unused-vars\n\n\n getLayers({\n viewStates,\n props\n }) {}\n\n}\n\n/* eslint-disable max-classes-per-file */\nconst OVERVIEW_VIEW_ID = 'overview';\n\nclass OverviewState {}\n\nclass OverviewController extends Controller {\n constructor(props) {\n super(OverviewState, props);\n this.events = ['click'];\n }\n\n handleEvent(event) {\n if (event.type !== 'click') {\n return;\n }\n\n let [x, y] = this.getCenter(event);\n const {\n width,\n height,\n zoom,\n scale\n } = this.controllerStateProps;\n\n if (x < 0 || y < 0 || x > width || y > height) {\n return;\n }\n\n const scaleFactor = 1 / (2 ** zoom * scale);\n x *= scaleFactor;\n y *= scaleFactor;\n\n if (this.onViewStateChange) {\n this.onViewStateChange({\n viewState: {\n target: [x, y, 0]\n }\n });\n }\n }\n\n}\n/**\n * This class generates a OverviewLayer and a view for use in the VivViewer as an overview to a Detailview (they must be used in conjection).\n * From the base class VivView, only the initialViewState argument is used. This class uses private methods to position its x and y from the\n * additional arguments:\n * @param {Object} args\n * @param {Object} args.id for thie VivView\n * @param {Object} args.loader PixelSource[], where each PixelSource is decreasing in shape. If length == 1, not multiscale.\n * @param {number} args.detailHeight Height of the detail view.\n * @param {number} args.detailWidth Width of the detail view.\n * @param {number} [args.scale] Scale of this viewport relative to the detail. Default is .2.\n * @param {number} [args.margin] Margin to be offset from the the corner of the other viewport. Default is 25.\n * @param {string} [args.position] Location of the viewport - one of \"bottom-right\", \"top-right\", \"top-left\", \"bottom-left.\" Default is 'bottom-right'.\n * @param {number} [args.minimumWidth] Absolute lower bound for how small the viewport should scale. Default is 150.\n * @param {number} [args.maximumWidth] Absolute upper bound for how large the viewport should scale. Default is 350.\n * @param {number} [args.minimumHeight] Absolute lower bound for how small the viewport should scale. Default is 150.\n * @param {number} [args.maximumHeight] Absolute upper bound for how large the viewport should scale. Default is 350.\n * @param {Boolean} [args.clickCenter] Click to center the default view. Default is true.\n * */\n\n\nclass OverviewView extends VivView {\n constructor({\n id,\n loader,\n detailHeight,\n detailWidth,\n scale = 0.2,\n margin = 25,\n position = 'bottom-right',\n minimumWidth = 150,\n maximumWidth = 350,\n minimumHeight = 150,\n maximumHeight = 350,\n clickCenter = true\n }) {\n super({\n id\n });\n this.margin = margin;\n this.loader = loader;\n this.position = position;\n this.detailHeight = detailHeight;\n this.detailWidth = detailWidth;\n\n this._setHeightWidthScale({\n detailWidth,\n detailHeight,\n scale,\n minimumWidth,\n maximumWidth,\n minimumHeight,\n maximumHeight\n });\n\n this._setXY();\n\n this.clickCenter = clickCenter;\n }\n /**\n * Set the image-pixel scale and height and width based on detail view.\n */\n\n\n _setHeightWidthScale({\n detailWidth,\n detailHeight,\n scale,\n minimumWidth,\n maximumWidth,\n minimumHeight,\n maximumHeight\n }) {\n const numLevels = this.loader.length;\n const {\n width: rasterWidth,\n height: rasterHeight\n } = getImageSize(this.loader[0]);\n this._imageWidth = rasterWidth;\n this._imageHeight = rasterHeight;\n\n if (rasterWidth > rasterHeight) {\n const heightWidthRatio = rasterHeight / rasterWidth;\n this.width = Math.min(maximumWidth, Math.max(detailWidth * scale, minimumWidth));\n this.height = this.width * heightWidthRatio;\n this.scale = 2 ** (numLevels - 1) / rasterWidth * this.width;\n } else {\n const widthHeightRatio = rasterWidth / rasterHeight;\n this.height = Math.min(maximumHeight, Math.max(detailHeight * scale, minimumHeight));\n this.width = this.height * widthHeightRatio;\n this.scale = 2 ** (numLevels - 1) / rasterHeight * this.height;\n }\n }\n /**\n * Set the x and y (top left corner) of this overview relative to the detail.\n */\n\n\n _setXY() {\n const {\n height,\n width,\n margin,\n position,\n detailWidth,\n detailHeight\n } = this;\n\n switch (position) {\n case 'bottom-right':\n {\n this.x = detailWidth - width - margin;\n this.y = detailHeight - height - margin;\n break;\n }\n\n case 'top-right':\n {\n this.x = detailWidth - width - margin;\n this.y = margin;\n break;\n }\n\n case 'top-left':\n {\n this.x = margin;\n this.y = margin;\n break;\n }\n\n case 'bottom-left':\n {\n this.x = margin;\n this.y = detailHeight - height - margin;\n break;\n }\n\n default:\n {\n throw new Error(`overviewLocation prop needs to be one of ['bottom-right', 'top-right', 'top-left', 'bottom-left']`);\n }\n }\n }\n\n getDeckGlView() {\n const {\n scale,\n clickCenter\n } = this;\n const controller = clickCenter && {\n type: OverviewController,\n scale\n };\n return new OrthographicView({\n controller,\n id: this.id,\n height: this.height,\n width: this.width,\n x: this.x,\n y: this.y,\n clear: true\n });\n }\n\n filterViewState({\n viewState\n }) {\n // Scale the view as the overviewScale changes with screen resizing - basically, do not react to any view state changes.\n const {\n _imageWidth,\n _imageHeight,\n scale\n } = this;\n return { ...viewState,\n height: this.height,\n width: this.width,\n id: this.id,\n target: [_imageWidth * scale / 2, _imageHeight * scale / 2, 0],\n zoom: -(this.loader.length - 1)\n };\n }\n\n getLayers({\n viewStates,\n props\n }) {\n const {\n detail,\n overview\n } = viewStates;\n\n if (!detail) {\n throw new Error('Overview requires a viewState with id detail');\n } // Scale the bounding box.\n\n\n const boundingBox = makeBoundingBox(detail).map(coords => coords.map(e => e * this.scale));\n const overviewLayer = new OverviewLayer(props, {\n id: getVivId(this.id),\n boundingBox,\n overviewScale: this.scale,\n zoom: -overview.zoom\n });\n return [overviewLayer];\n }\n\n}\n\nconst DETAIL_VIEW_ID = 'detail';\n/**\n * This class generates a MultiscaleImageLayer and a view for use in the VivViewer as a detailed view.\n * It takes the same arguments for its constructor as its base class VivView.\n * */\n\nclass DetailView extends VivView {\n getLayers({\n props,\n viewStates\n }) {\n const {\n loader\n } = props;\n const {\n id,\n height,\n width\n } = this;\n const layerViewState = viewStates[id];\n const layers = [getImageLayer(id, props)]; // Inspect the first pixel source for physical sizes\n\n if (loader[0]?.meta?.physicalSizes?.x) {\n const {\n size,\n unit\n } = loader[0].meta.physicalSizes.x;\n layers.push(new ScaleBarLayer({\n id: getVivId(id),\n loader,\n unit,\n size,\n viewState: { ...layerViewState,\n height,\n width\n }\n }));\n }\n\n return layers;\n }\n\n filterViewState({\n viewState,\n currentViewState\n }) {\n if (viewState.id === OVERVIEW_VIEW_ID) {\n const {\n target\n } = viewState;\n\n if (target) {\n return { ...currentViewState,\n target\n };\n }\n }\n\n return super.filterViewState({\n viewState\n });\n }\n\n}\n\n/**\n * This class generates a MultiscaleImageLayer and a view for use in the SideBySideViewer.\n * It is linked with its other views as controlled by `linkedIds`, `zoomLock`, and `panLock` parameters.\n * It takes the same arguments for its constructor as its base class VivView plus the following:\n * @param {Object} args\n * @param {Array<String>} args.linkedIds Ids of the other views to which this could be locked via zoom/pan.\n * @param {Boolean} args.panLock Whether or not we lock pan.\n * @param {Boolean} args.zoomLock Whether or not we lock zoom.\n * @param {Array=} args.viewportOutlineColor Outline color of the border (default [255, 255, 255])\n * @param {number=} args.viewportOutlineWidth Default outline width (default 10)\n * @param {number=} args.x X (top-left) location on the screen for the current view\n * @param {number=} args.y Y (top-left) location on the screen for the current view\n * @param {number} args.height Width of the view.\n * @param {number} args.width Height of the view.\n * @param {string} args.id id of the View\n * */\n\nclass SideBySideView extends VivView {\n constructor({\n id,\n x = 0,\n y = 0,\n height,\n width,\n linkedIds = [],\n panLock = true,\n zoomLock = true,\n viewportOutlineColor = [255, 255, 255],\n viewportOutlineWidth = 10\n }) {\n super({\n id,\n x,\n y,\n height,\n width\n });\n this.linkedIds = linkedIds;\n this.panLock = panLock;\n this.zoomLock = zoomLock;\n this.viewportOutlineColor = viewportOutlineColor;\n this.viewportOutlineWidth = viewportOutlineWidth;\n }\n\n filterViewState({\n viewState,\n oldViewState,\n currentViewState\n }) {\n const {\n id: viewStateId\n } = viewState;\n const {\n id,\n linkedIds,\n panLock,\n zoomLock\n } = this;\n\n if (oldViewState && linkedIds.indexOf(viewStateId) !== -1 && (zoomLock || panLock)) {\n const thisViewState = {\n height: currentViewState.height,\n width: currentViewState.width,\n target: [],\n zoom: null\n };\n const [currentX, currentY] = currentViewState.target;\n\n if (zoomLock) {\n const dZoom = viewState.zoom - oldViewState.zoom;\n thisViewState.zoom = currentViewState.zoom + dZoom;\n } else {\n thisViewState.zoom = currentViewState.zoom;\n }\n\n if (panLock) {\n const [oldX, oldY] = oldViewState.target;\n const [newX, newY] = viewState.target;\n const dx = newX - oldX;\n const dy = newY - oldY;\n thisViewState.target.push(currentX + dx);\n thisViewState.target.push(currentY + dy);\n } else {\n thisViewState.target.push(currentX);\n thisViewState.target.push(currentY);\n }\n\n return {\n id,\n target: thisViewState.target,\n zoom: thisViewState.zoom,\n height: thisViewState.height,\n width: thisViewState.width\n };\n }\n\n return viewState.id === id ? {\n id,\n target: viewState.target,\n zoom: viewState.zoom,\n height: viewState.height,\n width: viewState.width\n } : {\n id,\n target: currentViewState.target,\n zoom: currentViewState.zoom,\n height: currentViewState.height,\n width: currentViewState.width\n };\n }\n\n getLayers({\n props,\n viewStates\n }) {\n const {\n loader\n } = props;\n const {\n id,\n viewportOutlineColor,\n viewportOutlineWidth,\n height,\n width\n } = this;\n const layerViewState = viewStates[id];\n const boundingBox = makeBoundingBox({ ...layerViewState,\n height,\n width\n });\n const layers = [getImageLayer(id, props)];\n const border = new PolygonLayer({\n id: `viewport-outline-${getVivId(id)}`,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n data: [boundingBox],\n getPolygon: f => f,\n filled: false,\n stroked: true,\n getLineColor: viewportOutlineColor,\n getLineWidth: viewportOutlineWidth * 2 ** -layerViewState.zoom\n });\n layers.push(border);\n\n if (loader[0]?.meta?.physicalSizes?.x) {\n const {\n size,\n unit\n } = loader[0].meta.physicalSizes.x;\n layers.push(new ScaleBarLayer({\n id: getVivId(id),\n loader,\n unit,\n size,\n viewState: { ...layerViewState,\n height,\n width\n }\n }));\n }\n\n return layers;\n }\n\n}\n\n/**\n * This class generates a VolumeLayer and a view for use in the VivViewer as volumetric rendering.\n * @param {Object} args\n * @param {Array<number>} args.target Centered target for the camera (used if useFixedAxis is true)\n * @param {Boolean} args.useFixedAxis Whether or not to fix the axis of the camera.\n * */\n\nclass VolumeView extends VivView {\n constructor({\n target,\n useFixedAxis,\n ...args\n }) {\n super(args);\n this.target = target;\n this.useFixedAxis = useFixedAxis;\n }\n\n getDeckGlView() {\n const {\n height,\n width,\n id,\n x,\n y\n } = this;\n return new OrbitView({\n id,\n controller: true,\n height,\n width,\n x,\n y,\n orbitAxis: 'Y'\n });\n }\n\n filterViewState({\n viewState\n }) {\n const {\n id,\n target,\n useFixedAxis\n } = this;\n return viewState.id === id ? { ...viewState,\n // fix the center of the camera if desired\n target: useFixedAxis ? target : viewState.target\n } : null;\n }\n\n getLayers({\n props\n }) {\n const {\n loader\n } = props;\n const {\n id\n } = this;\n const layers = [new VolumeLayer(props, {\n id: `${loader.type}${getVivId(id)}`\n })];\n return layers;\n }\n\n}\n\nvar _jsxFileName$2 = \"/Users/ilangold/Projects/Gehlenborg/viv/src/viewers/PictureInPictureViewer.jsx\";\nconst PictureInPictureViewer = (props) => {\n const {\n loader,\n contrastLimits,\n colors,\n channelsVisible,\n viewStates: viewStatesProp,\n colormap,\n overview,\n overviewOn,\n selections,\n hoverHooks = {\n handleValue: () => {\n },\n handleCoordinate: () => {\n }\n },\n height,\n width,\n lensEnabled = false,\n lensSelection = 0,\n lensRadius = 100,\n lensBorderColor = [255, 255, 255],\n lensBorderRadius = 0.02,\n clickCenter = true,\n transparentColor,\n onViewStateChange,\n onHover,\n onViewportLoad,\n extensions = [new ColorPaletteExtension()],\n deckProps\n } = props;\n const detailViewState = viewStatesProp?.find((v) => v.id === DETAIL_VIEW_ID);\n const baseViewState = useMemo(() => {\n return detailViewState || getDefaultInitialViewState(loader, {\n height,\n width\n }, 0.5);\n }, [loader, detailViewState]);\n const detailView = new DetailView({\n id: DETAIL_VIEW_ID,\n height,\n width\n });\n const layerConfig = {\n loader,\n contrastLimits,\n colors,\n channelsVisible,\n selections,\n onViewportLoad,\n colormap,\n lensEnabled,\n lensSelection,\n lensRadius,\n lensBorderColor,\n lensBorderRadius,\n extensions,\n transparentColor\n };\n const views = [detailView];\n const layerProps = [layerConfig];\n const viewStates = [{\n ...baseViewState,\n id: DETAIL_VIEW_ID\n }];\n if (overviewOn && loader) {\n const overviewViewState = viewStatesProp?.find((v) => v.id === OVERVIEW_VIEW_ID) || {\n ...baseViewState,\n id: OVERVIEW_VIEW_ID\n };\n const overviewView = new OverviewView({\n id: OVERVIEW_VIEW_ID,\n loader,\n detailHeight: height,\n detailWidth: width,\n clickCenter,\n ...overview\n });\n views.push(overviewView);\n layerProps.push({\n ...layerConfig,\n lensEnabled: false\n });\n viewStates.push(overviewViewState);\n }\n if (!loader)\n return null;\n return /* @__PURE__ */ jsxDEV(VivViewer, {\n layerProps,\n views,\n viewStates,\n hoverHooks,\n onViewStateChange,\n onHover,\n deckProps\n }, void 0, false, {\n fileName: _jsxFileName$2,\n lineNumber: 127,\n columnNumber: 5\n }, undefined);\n};\n\nvar _jsxFileName$1 = \"/Users/ilangold/Projects/Gehlenborg/viv/src/viewers/SideBySideViewer.jsx\";\nconst SideBySideViewer = (props) => {\n const {\n loader,\n contrastLimits,\n colors,\n channelsVisible,\n viewStates: viewStatesProp,\n colormap,\n panLock,\n selections,\n zoomLock,\n height,\n width,\n lensEnabled = false,\n lensSelection = 0,\n lensRadius = 100,\n lensBorderColor = [255, 255, 255],\n lensBorderRadius = 0.02,\n transparentColor,\n onViewStateChange,\n onHover,\n onViewportLoad,\n extensions = [new ColorPaletteExtension()],\n deckProps\n } = props;\n const leftViewState = viewStatesProp?.find((v) => v.id === \"left\");\n const rightViewState = viewStatesProp?.find((v) => v.id === \"right\");\n const viewStates = useMemo(() => {\n if (leftViewState && rightViewState) {\n return viewStatesProp;\n }\n const defaultViewState = getDefaultInitialViewState(loader, {\n height,\n width: width / 2\n }, 0.5);\n return [leftViewState || {\n ...defaultViewState,\n id: \"left\"\n }, rightViewState || {\n ...defaultViewState,\n id: \"right\"\n }];\n }, [loader, leftViewState, rightViewState]);\n const detailViewLeft = new SideBySideView({\n id: \"left\",\n linkedIds: [\"right\"],\n panLock,\n zoomLock,\n height,\n width: width / 2\n });\n const detailViewRight = new SideBySideView({\n id: \"right\",\n x: width / 2,\n linkedIds: [\"left\"],\n panLock,\n zoomLock,\n height,\n width: width / 2\n });\n const layerConfig = {\n loader,\n contrastLimits,\n colors,\n channelsVisible,\n selections,\n onViewportLoad,\n colormap,\n lensEnabled,\n lensSelection,\n lensRadius,\n lensBorderColor,\n lensBorderRadius,\n extensions,\n transparentColor\n };\n const views = [detailViewRight, detailViewLeft];\n const layerProps = [layerConfig, layerConfig];\n return loader ? /* @__PURE__ */ jsxDEV(VivViewer, {\n layerProps,\n views,\n randomize: true,\n onViewStateChange,\n onHover,\n viewStates,\n deckProps\n }, void 0, false, {\n fileName: _jsxFileName$1,\n lineNumber: 115,\n columnNumber: 5\n }, undefined) : null;\n};\n\nvar _jsxFileName = \"/Users/ilangold/Projects/Gehlenborg/viv/src/viewers/VolumeViewer.jsx\";\nconst VolumeViewer = (props) => {\n const {\n loader,\n contrastLimits,\n colors,\n channelsVisible,\n selections,\n colormap,\n resolution = Math.max(0, loader.length - 1),\n modelMatrix,\n onViewStateChange,\n renderingMode = RENDERING_MODES.ADDITIVE,\n xSlice = null,\n ySlice = null,\n zSlice = null,\n onViewportLoad,\n height: screenHeight,\n width: screenWidth,\n viewStates: viewStatesProp,\n clippingPlanes = [],\n useFixedAxis = true\n } = props;\n const volumeViewState = viewStatesProp?.find((state) => state?.id === \"3d\");\n const initialViewState = useMemo(() => {\n if (volumeViewState) {\n return volumeViewState;\n }\n const viewState = getDefaultInitialViewState(loader, {\n height: screenHeight,\n width: screenWidth\n }, 1, true, modelMatrix);\n return {\n ...viewState,\n rotationX: 0,\n rotationOrbit: 0\n };\n }, [loader, resolution, modelMatrix]);\n const viewStates = [volumeViewState || {\n ...initialViewState,\n id: \"3d\"\n }];\n const volumeView = new VolumeView({\n id: \"3d\",\n target: viewStates[0].target,\n useFixedAxis\n });\n const layerConfig = {\n loader,\n contrastLimits,\n colors,\n channelsVisible,\n selections,\n colormap,\n xSlice,\n ySlice,\n zSlice,\n resolution,\n renderingMode,\n modelMatrix,\n onViewportLoad: () => setTimeout(onViewportLoad, 0),\n clippingPlanes\n };\n const views = [volumeView];\n const layerProps = [layerConfig];\n return loader ? /* @__PURE__ */ jsxDEV(VivViewer, {\n layerProps,\n views,\n viewStates,\n onViewStateChange,\n useDevicePixels: false\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 100,\n columnNumber: 5\n }, undefined) : null;\n};\n\nconst VIV_PROXY_KEY = \"__viv\";\nconst OFFSETS_PROXY_KEY = `${VIV_PROXY_KEY}-offsets`;\nfunction checkProxies(tiff) {\n if (!isProxy(tiff, OFFSETS_PROXY_KEY)) {\n console.warn(\"GeoTIFF source is missing offsets proxy.\");\n }\n}\nfunction isProxy(tiff, proxyFlag) {\n return tiff[proxyFlag];\n}\nfunction createOffsetsProxy(tiff, offsets) {\n const get = (target, key) => {\n if (key === \"getImage\") {\n return (index) => {\n if (!(index in target.ifdRequests) && index in offsets) {\n const offset = offsets[index];\n target.ifdRequests[index] = target.parseFileDirectoryAt(offset);\n }\n return target.getImage(index);\n };\n }\n if (key === OFFSETS_PROXY_KEY) {\n return true;\n }\n return Reflect.get(target, key);\n };\n return new Proxy(tiff, {\n get\n });\n}\n\nconst encodedJs = \"KGZ1bmN0aW9uICgpIHsKICAndXNlIHN0cmljdCc7CgogIGZ1bmN0aW9uIGRlY29kZVJvd0FjYyhyb3csIHN0cmlkZSkgewogICAgbGV0IGxlbmd0aCA9IHJvdy5sZW5ndGggLSBzdHJpZGU7CiAgICBsZXQgb2Zmc2V0ID0gMDsKICAgIGRvIHsKICAgICAgZm9yIChsZXQgaSA9IHN0cmlkZTsgaSA+IDA7IGktLSkgewogICAgICAgIHJvd1tvZmZzZXQgKyBzdHJpZGVdICs9IHJvd1tvZmZzZXRdOwogICAgICAgIG9mZnNldCsrOwogICAgICB9CgogICAgICBsZW5ndGggLT0gc3RyaWRlOwogICAgfSB3aGlsZSAobGVuZ3RoID4gMCk7CiAgfQoKICBmdW5jdGlvbiBkZWNvZGVSb3dGbG9hdGluZ1BvaW50KHJvdywgc3RyaWRlLCBieXRlc1BlclNhbXBsZSkgewogICAgbGV0IGluZGV4ID0gMDsKICAgIGxldCBjb3VudCA9IHJvdy5sZW5ndGg7CiAgICBjb25zdCB3YyA9IGNvdW50IC8gYnl0ZXNQZXJTYW1wbGU7CgogICAgd2hpbGUgKGNvdW50ID4gc3RyaWRlKSB7CiAgICAgIGZvciAobGV0IGkgPSBzdHJpZGU7IGkgPiAwOyAtLWkpIHsKICAgICAgICByb3dbaW5kZXggKyBzdHJpZGVdIC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ZXJTYW1wbGUgPSBiaXRzUGVyU2FtcGxlWzBdIC8gODsKICAgIGNvbnN0IHN0cmlkZSA9IHBsYW5hckNvbmZpZ3VyYXRpb24gPT09IDIgPyAxIDogYml0c1BlclNhbXBsZS5sZW5ndGg7CgogICAgZm9yIChsZXQgaSA9IDA7IGkgPCBoZWlnaHQ7ICsraSkgewogICAgICAvLyBMYXN0IHN0cmlwIHdpbGwgYmUgdHJ1bmNhdGVkIGlmIGhlaWdodCAlIHN0cmlwSGVpZ2h0ICE9IDAKICAgICAgaWYgKGkgKiBzdHJpZGUgKiB3aWR0aCAqIGJ5dGVzUGVyU2FtcGxlID49IGJsb2NrLmJ5dGVMZW5ndGgpIHsKICAgICAgICBicmVhazsKICAgICAgfQogICAgICBsZXQgcm93OwogICAgICBpZiAocHJlZGljdG9yID09PSAyKSB7IC8vIGhvcml6b250YWwgcHJlZGljdGlvbgogICAgICAgIHN3aXRjaCAoYml0c1BlclNhbXBsZVswXSkgewogICAgICAgICAgY2FzZSA4OgogICAgICAgICAgICByb3cgPSBuZXcgVWludDhBcnJheSgKICAgICAgICAgICAgICBibG9jaywgaSAqIHN0cmlkZSAqIHdpZHRoICogYnl0ZXNQZXJTYW1wbGUsIHN0cmlkZSAqIHdpZHRoICogYnl0ZXNQZXJTYW1wbGUsCiAgICAgICAgICAgICk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAxNjoKICAgICAgICAgICAgcm93ID0gbmV3IFVpbnQxNkFycmF5KAogICAgICAgICAgICAgIGJsb2NrLCBpICogc3RyaWRlICogd2lkdGggKiBieXRlc1BlclNhbXBsZSwgc3RyaWRlICogd2lkdGggKiBieXRlc1BlclNhbXBsZSAvIDIsCiAgICAgICAgICAgICk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgY2FzZSAzMjoKICAgICAgICAgICAgcm93ID0gbmV3IFVpbnQzMkFycmF5KAogICAgICAgICAgICAgIGJsb2NrLCBpICogc3RyaWRlICogd2lkdG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zdCBkY3RTcXJ0MWQyID0gMjg5NjsvLyBzcXJ0KDIpIC8gMgoKICBmdW5jdGlvbiBidWlsZEh1ZmZtYW5UYWJsZShjb2RlTGVuZ3RocywgdmFsdWVzKSB7CiAgICBsZXQgayA9IDA7CiAgICBjb25zdCBjb2RlID0gW107CiAgICBsZXQgbGVuZ3RoID0gMTY7CiAgICB3aGlsZSAobGVuZ3RoID4gMCAmJiAhY29kZUxlbmd0aHNbbGVuZ3RoIC0gMV0pIHsKICAgICAgLS1sZW5ndGg7CiAgICB9CiAgICBjb2RlLnB1c2goeyBjaGlsZHJlbjogW10sIGluZGV4OiAwIH0pOwoKICAgIGxldCBwID0gY29kZVswXTsKICAgIGxldCBxOwogICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykgewogICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGNvZGVMZW5ndGhzW2ldOyBqKyspIHsKICAgICAgICBwID0gY29kZS5wb3AoKTsKICAgICAgICBwLmNoaWxkcmVuW3AuaW5kZXhdID0gdmFsdWVzW2tdOwogICAgICAgIHdoaWxlIChwLmluZGV4ID4gMCkgewogICAgICAgICAgcCA9IGNvZGUucG9wKCk7CiAgICAgICAgfQogICAgICAgIHAuaW5kZXgrKzsKICAgICAgICBjb2RlLnB1c2gocCk7CiAgICAgICAgd2hpbGUgKGNvZGUubGVuZ3RoIDw9IGkpIHsKICAgICAgICAgIGNvZGUucHVzaChxID0geyBjaGlsZHJlbjogW10sIGluZGV4OiAwIH0pOwogICAgICAgICAgcC5jaGlsZHJlbltwLmluZGV4XSA9IHEuY2hpbGRyZW47CiAgICAgICAgICBwID0gcTsKICAgICAgICB9CiAgICAgICAgaysrOwogICAgICB9CiAgICAgIGlmIChpICsgMSA8IGxlbmd0aCkgewogICAgICAgIC8vIHAgaGVyZSBwb2ludHMgdG8gbGFzdCBjb2RlCiAgICAgICAgY29kZS5wdXNoKHEgPSB7IGNoaWxkcmVuOiBbXSwgaW5kZXg6IDAgf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JldHVybiBiaXRzRGF0YSA+Pj4gNzsKICAgIH0KICAgIGZ1bmN0aW9uIGRlY29kZUh1ZmZtYW4odHJlZSkgewogICAgICBsZXQgbm9kZSA9IHRyZWU7CiAgICAgIGxldCBiaXQ7CiAgICAgIHdoaWxlICgoYml0ID0gcmVhZEJpdCgpKSAhPT0gbnVsbCkgeyAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLWNvbmQtYXNzaWduCiAgICAgICAgbm9kZSA9IG5vZGVbYml0XTsKICAgICAgICBpZiAodHlwZW9mIG5vZGUgPT09ICdudW1iZXInKSB7CiAgICAgICAgICByZXR1cm4gbm9kZTsKICAgICAgICB9CiAgICAgICAgaWYgKHR5cGVvZiBub2RlICE9PSAnb2JqZWN0JykgewogICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdpbnZhbGlkIGh1ZmZtYW4gc2VxdWVuY2UnKTsKICAgICAgICB9CiAgICAgIH0KICAgICAgcmV0dXJuIG51bGw7CiAgICB9CiAgICBmdW5jdGlvbiByZWNlaXZlKGluaXRpYWxMZW5ndGgpIHsKICAgICAgbGV0IGxlbmd0aCA9IGluaXRpYWxMZW5ndGg7CiAgICAgIGxldCBuID0gMDsKICAgICAgd2hpbGUgKGxlbmd0aCA+IDApIHsKICAgICAgICBjb25zdCBiaXQgPSByZWFkQml0KCk7CiAgICAgICAgaWYgKGJpdCA9PT0gbnVsbCkgewogICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDsKICAgICAgICB9CiAgICAgICAgbiA9IChuIDw8IDEpIHwgYml0OwogICAgICAgIC0tbGVuZ3RoOwogICAgICB9CiAgICAgIHJldHVybiBuOwogICAgfQogICAgZnVuY3Rpb24gcmVjZWl2ZUFuZEV4dGVuZChsZW5ndGgpIHsKICAgICAgY29uc3QgbiA9IHJlY2VpdmUobGVuZ3RoKTsKICAgICAgaWYgKG4gPj0gMSA8PCAobGVuZ3RoIC0gMSkpIHsKICAgICAgICByZXR1cm4gbjsKICAgICAgfQogICAgICByZXR1cm4gbiArICgtMSA8PCBsZW5ndGgpICsgMTsKICAgIH0KICAgIGZ1bmN0aW9uIGRlY29kZUJhc2VsaW5lKGNvbXBvbmVudCwgenopIHsKICAgICAgY29uc3QgdCA9IGRlY29kZUh1ZmZtYW4oY29tcG9uZW50Lmh1ZmZtYW5UYWJsZURDKTsKICAgICAgY29uc3QgZGlmZiA9IHQgPT09IDAgPyAwIDogcmVjZWl2ZUFuZEV4dGVuZCh0KTsKICAgICAgY29tcG9uZW50LnByZWQgKz0gZGlmZjsKICAgICAgenpbMF0gPSBjb21wb25lbnQucHJlZDsKICAgICAgbGV0IGsgPSAxOwogICAgICB3aGlsZSAoayA8IDY0KSB7CiAgICAgICAgY29uc3QgcnMgPSBkZWNvZGVIdWZmbWFuKGNvbXBvbmVudC5odWZmbWFuVGFibGVBQyk7CiAgICAgICAgY29uc3QgcyA9IHJzICYgMTU7CiAgICAgICAgY29uc3QgciA9IHJzID4+IDQ7CiAgICAgICAgaWYgKHMgPT09IDApIHsKICAgICAgICAgIGlmIChyIDwgMTUpIHsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBrICs9IDE2OwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICBrICs9IHI7CiAgICAgICAgICBjb25zdCB6ID0gZGN0WmlnWmFnW2tdOwogICAgICAgICAgenpbel0gPSByZWNlaXZlQW5kRXh0ZW5kKHMpOwogICAgICAgICAgaysrOwogICAgICAgIH0KICAgICAgfQogICAgfQogICAgZnVuY3Rpb24gZGVjb2RlRENGaXJzdChjb21wb25lbnQsIHp6KSB7CiAgICAgIGNvbnN0IHQgPSBkZWNvZGVIdWZmbWFuKGNvbXBvbmVudC5odWZmbWFuVGFibGVEQyk7CiAgICAgIGNvbnN0IGRpZmYgPSB0ID09PSAwID8gMCA6IChyZWNlaXZlQW5kRXh0ZW5kKHQpIDw8IHN1Y2Nlc3NpdmUpOwogICAgICBjb21wb25lbnQucHJlZCArPSBkaWZmOwogICAgICB6elswXSA9IGNvbXBvbmVudC5wcmVkOwogICAgfQogICAgZnVuY3Rpb24gZGVjb2RlRENTdWNjZXNzaXZlKGNvbXBvbmVudCwgenopIHsKICAgICAgenpbMF0gfD0gcmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmU7CiAgICB9CiAgICBsZXQgZW9icnVuID0gMDsKICAgIGZ1bmN0aW9uIGRlY29kZUFDRmlyc3QoY29tcG9uZW50LCB6eikgewogICAgICBpZiAoZW9icnVuID4gMCkgewogICAgICAgIGVvYnJ1bi0tOwogICAgICAgIHJldHVybjsKICAgICAgfQogICAgICBsZXQgayA9IHNwZWN0cmFsU3RhcnQ7CiAgICAgIGNvbnN0IGUgPSBzcGVjdHJhbEVuZDsKICAgICAgd2hpbGUgKGsgPD0gZSkgewogICAgICAgIGNvbnN0IHJzID0gZGVjb2RlSHVmZm1hbihjb21wb25lbnQuaHVmZm1hblRhYmxlQUMpOwogICAgICAgIGNvbnN0IHMgPSBycyAmIDE1OwogICAgICAgIGNvbnN0IHIgPSBycyA+PiA0OwogICAgICAgIGlmIChzID09PSAwKSB7CiAgICAgICAgICBpZiAociA8IDE1KSB7CiAgICAgICAgICAgIGVvYnJ1biA9IHJlY2VpdmUocikgKyAoMSA8PCByKSAtIDE7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgayArPSAxNjsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgayArPSByOwogICAgICAgICAgY29uc3QgeiA9IGRjdFppZ1phZ1trXTsKICAgICAgICAgIHp6W3pdID0gcmVjZWl2ZUFuZEV4dGVuZChzKSAqICgxIDw8IHN1Y2Nlc3NpdmUpOwogICAgICAgICAgaysrOwogICAgICAgIH0KICAgICAgfQogICAgfQogICAgbGV0IHN1Y2Nlc3NpdmVBQ1N0YXRlID0gMDsKICAgIGxldCBzdWNjZXNzaXZlQUNOZXh0VmFsdWU7CiAgICBmdW5jdGlvbiBkZWNvZGVBQ1N1Y2Nlc3NpdmUoY29tcG9uZW50LCB6eikgewogICAgICBsZXQgayA9IHNwZWN0cmFsU3RhcnQ7CiAgICAgIGNvbnN0IGUgPSBzcGVjdHJhbEVuZDsKICAgICAgbGV0IHIgPSAwOwogICAgICB3aGlsZSAoayA8PSBlKSB7CiAgICAgICAgY29uc3QgeiA9IGRjdFppZ1phZ1trXTsKICAgICAgICBjb25zdCBkaXJlY3Rpb24gPSB6elt6XSA8IDAgPyAtMSA6IDE7CiAgICAgICAgc3dpdGNoIChzdWNjZXNzaXZlQUNTdGF0ZSkgewogICAgICAgICAgY2FzZSAwOiB7IC8vIGluaXRpYWwgc3RhdGUKICAgICAgICAgICAgY29uc3QgcnMgPSBkZWNvZGVIdWZmbWFuKGNvbXBvbmVudC5odWZmbWFuVGFibGVBQyk7CiAgICAgICAgICAgIGNvbnN0IHMgPSBycyAmIDE1OwogICAgICAgICAgICByID0gcnMgPj4gNDsKICAgICAgICAgICAgaWYgKHMgPT09IDApIHsKICAgICAgICAgICAgICBpZiAociA8IDE1KSB7CiAgICAgICAgICAgICAgICBlb2JydW4gPSByZWNlaXZlKHIpICsgKDEgPDwgcik7CiAgICAgICAgICAgICAgICBzdWNjZXNzaXZlQUNTdGF0ZSA9IDQ7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHIgPSAxNjsKICAgICAgICAgICAgICAgIHN1Y2Nlc3NpdmVBQ1N0YXRlID0gMTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgaWYgKHMgIT09IDEpIHsKICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignaW52YWxpZCBBQ24gZW5jb2RpbmcnKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDTmV4dFZhbHVlID0gcmVjZWl2ZUFuZEV4dGVuZChzKTsKICAgICAgICAgICAgICBzdWNjZXNzaXZlQUNTdGF0ZSA9IHIgPyAyIDogMzsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb250aW51ZTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb250aW51ZQogICAgICAgICAgfQogICAgICAgICAgY2FzZSAxOiAvLyBza2lwcGluZyByIHplcm8gaXRlbXMKICAgICAgICAgIGNhc2UgMjoKICAgICAgICAgICAgaWYgKHp6W3pdKSB7CiAgICAgICAgICAgICAgenpbel0gKz0gKHJlYWRCaXQoKSA8PCBzdWNjZXNzaXZlKSAqIGRpcmVjdGlvbjsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICByLS07CiAgICAgICAgICAgICAgaWYgKHIgPT09IDApIHsKICAgICAgICAgICAgICAgIHN1Y2Nlc3NpdmVBQ1N0YXRlID0gc3VjY2Vzc2l2ZUFDU3RhdGUgPT09IDIgPyAzIDogMDsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICBjYXNlIDM6IC8vIHNldCB2YWx1ZSBmb3IgYSB6ZXJvIGl0ZW0KICAgICAgICAgICAgaWYgKHp6W3pdKSB7CiAgICAgICAgICAgICAgenpbel0gKz0gKHJlYWRCaXQoKSA8PCBzdWNjZXNzaXZlKSAqIGRpcmVjdGlvbjsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICB6elt6XSA9IHN1Y2Nlc3NpdmVBQ05leHRWYWx1ZSA8PCBzdWNjZXNzaXZlOwogICAgICAgICAgICAgIHN1Y2Nlc3NpdmVBQ1N0YXRlID0gMDsKICAgICAgICAgICAgfQogICAgICAgICAgICBicmVhazsKICAgICAgICAgIGNhc2UgNDogLy8gZW9iCiAgICAgICAgICAgIGlmICh6elt6XSkgewogICAgICAgICAgICAgIHp6W3pdICs9IChyZWFkQml0KCkgPDwgc3VjY2Vzc2l2ZSkgKiBkaXJlY3Rpb247CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICAgIGsrKzsKIC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vbXBvbmVudHNbMF07CiAgICAgICAgZm9yIChuID0gMDsgbiA8IHVzZWRSZXNldEludGVydmFsOyBuKyspIHsKICAgICAgICAgIGRlY29kZUJsb2NrKGNvbXBvbmVudCwgZGVjb2RlRm4sIG1jdSk7CiAgICAgICAgICBtY3UrKzsKICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgZm9yIChuID0gMDsgbiA8IHVzZWRSZXNldEludGVydmFsOyBuKyspIHsKICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb21wb25lbnRzTGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgY29tcG9uZW50ID0gY29tcG9uZW50c1tpXTsKICAgICAgICAgICAgY29uc3QgeyBoLCB2IH0gPSBjb21wb25lbnQ7CiAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCB2OyBqKyspIHsKICAgICAgICAgICAgICBmb3IgKGsgPSAwOyBrIDwgaDsgaysrKSB7CiAgICAgICAgICAgICAgICBkZWNvZGVNY3UoY29tcG9uZW50LCBkZWNvZGVGbiwgbWN1LCBqLCBrKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIG1jdSsrOwoKICAgICAgICAgIC8vIElmIHdlJ3ZlIHJlYWNoZWQgb3VyIGV4cGVjdGVkIE1DVSdzLCBzdG9wIGRlY29kaW5nCiAgICAgICAgICBpZiAobWN1ID09PSBtY3VFeHBlY3RlZCkgewogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgIH0KCiAgICAgIC8vIGZpbmQgbWFya2VyCiAgICAgIGJpdHNDb3VudCA9IDA7CiAgICAgIG1hcmtlciA9IChkYXRhW29mZnNldF0gPDwgOCkgfCBkYXRhW29mZnNldCArIDFdOwogICAgICBpZiAobWFya2VyIDwgMHhGRjAwKSB7CiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdtYXJrZXIgd2FzIG5vdCBmb3VuZCcpOwogICAgICB9Cg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gIGxldCB2MjsKICAgICAgbGV0IHYzOwogICAgICBsZXQgdjQ7CiAgICAgIGxldCB2NTsKICAgICAgbGV0IHY2OwogICAgICBsZXQgdjc7CiAgICAgIGxldCB0OwogICAgICBjb25zdCBwID0gZGF0YUluOwogICAgICBsZXQgaTsKCiAgICAgIC8vIGRlcXVhbnQKICAgICAgZm9yIChpID0gMDsgaSA8IDY0OyBpKyspIHsKICAgICAgICBwW2ldID0genpbaV0gKiBxdFtpXTsKICAgICAgfQoKICAgICAgLy8gaW52ZXJzZSBEQ1Qgb24gcm93cwogICAgICBmb3IgKGkgPSAwOyBpIDwgODsgKytpKSB7CiAgICAgICAgY29uc3Qgcm93ID0gOCAqIGk7CgogICAgICAgIC8vIGNoZWNrIGZvciBhbGwtemVybyBBQyBjb2VmZmljaWVudHMKICAgICAgICBpZiAocFsxICsgcm93XSA9PT0gMCAmJiBwWzIgKyByb3ddID09PSAwICYmIHBbMyArIHJvd10gPT09IDAKICAgICAgICAgICYmIHBbNCArIHJvd10gPT09IDAgJiYgcFs1ICsgcm93XSA9PT0gMCAmJiBwWzYgKyByb3ddID09PSAwCiAgICAgICAgICAmJiBwWzcgKyByb3ddID09PSAwKSB7CiAgICAgICAgICB0ID0gKChkY3RTcXJ0MiAqIHBbMCArIHJvd10pICsgNTEyKSA+PiAxMDsKICAgICAgICAgIHBbMCArIHJvd10gPSB0OwogICAgICAgICAgcFsxICsgcm93XSA9IHQ7CiAgICAgICAgICBwWzIgKyByb3ddID0gdDsKICAgICAgICAgIHBbMyArIHJvd10gPSB0OwogICAgICAgICAgcFs0ICsgcm93XSA9IHQ7CiAgICAgICAgICBwWzUgKyByb3ddID0gdDsKICAgICAgICAgIHBbNiArIHJvd10gPSB0OwogICAgICAgICAgcFs3ICsgcm93XSA9IHQ7CiAgICAgICAgICBjb250aW51ZTsgLy8gZXNsaW50LWRpc2FibGUtbGluZSBuby1jb250aW51ZQogICAgICAgIH0KCiAgICAgICAgLy8gc3RhZ2UgNAogICAgICAgIHYwID0gKChkY3RTcXJ0MiAqIHBbMCArIHJvd10pICsgMTI4KSA+PiA4OwogICAgICAgIHYxID0gKChkY3RTcXJ0MiAqIHBbNCArIHJvd10pICsgMTI4KSA+PiA4OwogICAgICAgIHYyID0gcFsyICsgcm93XTsKICAgICAgICB2MyA9IHBbNiArIHJvd107CiAgICAgICAgdjQgPSAoKGRjdFNxcnQxZDIgKiAocFsxICsgcm93XSAtIHBbNyArIHJvd10pKSArIDEyOCkgPj4gODsKICAgICAgICB2NyA9ICgoZGN0U3FydDFkMiAqIChwWzEgKyByb3ddICsgcFs3ICsgcm93XSkpICsgMTI4KSA+PiA4OwogICAgICAgIHY1ID0gcFszICsgcm93XSA8PCA0OwogICAgICAgIHY2ID0gcFs1ICsgcm93XSA8PCA0OwoKICAgICAgICAvLyBzdGFnZSAzCiAgICAgICAgdCA9ICh2MCAtIHYxICsgMSkgPj4gMTsKICAgICAgICB2MCA9ICh2MCArIHYxICsgMSkgPj4gMTsKICAgICAgICB2MSA9IHQ7CiAgICAgICAgdCA9ICgodjIgKiBkY3RTaW42KSArICh2MyAqIGRjdENvczYpICsgMTI4KSA+PiA4OwogICAgICAgIHYyID0gKCh2MiAqIGRjdENvczYpIC0gKHYzICogZGN0U2luNikgKyAxMjgpID4+IDg7CiAgICAgICAgdjMgPSB0OwogICAgICAgIHQgPSAodjQgLSB2NiArIDEpID4+IDE7CiAgICAgICAgdjQgPSAodjQgKyB2NiArIDEpID4+IDE7CiAgICAgICAgdjYgPSB0OwogICAgICAgIHQgPSAodjcgKyB2NSArIDEpID4+IDE7CiAgICAgICAgdjUgPSAodjcgLSB2NSArIDEpID4+IDE7CiAgICAgICAgdjcgPSB0OwoKICAgICAgICAvLyBzdGFnZSAyCiAgICAgICAgdCA9ICh2MCAtIHYzICsgMSkgPj4gMTsKICAgICAgICB2MCA9ICh2MCArIHYzICsgMSkgPj4gMTsKICAgICAgICB2MyA9IHQ7CiAgICAgICAgdCA9ICh2MSAtIHYyICsgMSkgPj4gMTsKICAgICAgICB2MSA9ICh2MSArIHYyICsgMSkgPj4gMTsKICAgICAgICB2MiA9IHQ7CiAgICAgICAgdCA9ICgodjQgKiBkY3RTaW4zKSArICh2NyAqIGRjdENvczMpICsgMjA0OCkgPj4gMTI7CiAgICAgICAgdjQgPSAoKHY0ICogZGN0Q29zMykgLSAodjcgKiBkY3RTaW4zKSArIDIwNDgpID4+IDEyOwogICAgICAgIHY3ID0gdDsKICAgICAgICB0ID0gKCh2NSAqIGRjdFNpbjEpICsgKHY2ICogZGN0Q29zMSkgKyAyMDQ4KSA+PiAxMjsKICAgICAgICB2NSA9ICgodjUgKiBkY3RDb3MxKSAtICh2NiAqIGRjdFNpbjEpICsgMjA0OCkgPj4gMTI7CiAgICAgICAgdjYgPSB0OwoKICAgICAgICAvLyBzdGFnZSAxCiAgICAgICAgcFswICsgcm93XSA9IHYwICsgdjc7CiAgICAgICAgcFs3ICsgcm93XSA9IHYwIC0gdjc7CiAgICAgICAgcFsxICsgcm93XSA9IHYxICsgdjY7CiAgICAgICAgcFs2ICsgcm93XSA9IHYxIC0gdjY7CiAgICAgICAgcFsyICsgcm93XSA9IHYyICsgdjU7CiAgICAgICAgcFs1ICsgcm93XSA9IHYyIC0gdjU7CiAgICAgICAgcFszICsgcm93XSA9IHYzICsgdjQ7CiAgICAgICAgcFs0ICsgcm93XSA9IHYzIC0gdjQ7CiAgICAgIH0KCiAgICAgIC8vIGludmVyc2UgRENUIG9uIGNvbHVtbnMKICAgICAgZm9yIChpID0gMDsgaSA8IDg7ICsraSkgewogICAgICAgIGNvbnN0IGNvbCA9IGk7CgogICAgICAgIC8vIGNoZWNrIGZvciBhbGwtemVybyBBQyBjb2VmZmljaWVudHMKICAgICAgICBpZiAocFsoMSAqIDgpICsgY29sXSA9PT0gMCAmJiBwWygyICogOCkgKyBjb2xdID09PSAwICYmIHBbKDMgKiA4KSArIGNvbF0gPT09IDAKICAgICAgICAgICYmIHBbKDQgKiA4KSArIGNvbF0gPT09IDAgJiYgcFsoNSAqIDgpICsgY29sXSA9PT0gMCAmJiBwWyg2ICogOCkgKyBjb2xdID09PSAwCiAgICAgICAgICAmJiBwWyg3ICogOCkgKyBjb2xdID09PSAwKSB7CiAgICAgICAgICB0ID0gKChkY3RTcXJ0MiAqIGRhdGFJbltpICsgMF0pICsgODE5MikgPj4gMTQ7CiAgICAgICAgICBwWygwICogOCkgKyBjb2xdID0gdDsKICAgICAgICAgIHBbKDEgKiA4KSArIGNvbF0gPSB0OwogICAgICAgICAgcFsoMiAqIDgpICsgY29sXSA9IHQ7CiAgICAgICAgICBwWygzICogOCkgKyBjb2xdID0gdDsKICAgICAgICAgIHBbKDQgKiA4KSArIGNvbF0gPSB0OwogICAgICAgICAgcFsoNSAqIDgpICsgY29sXSA9IHQ7CiAgICAgICAgICBwWyg2ICogOCkgKyBjb2xdID0gdDsKICAgICAgICAgIHBbKDcgKiA4KSArIGNvbF0gPSB0OwogICAgICAgICAgY29udGludWU7IC8vIGVzbGludC1kaXNhYmxlLWxpbmUgbm8tY29udGludWUKICAgICAgICB9CgogICAgICAgIC8vIHN0YWdlIDQKICAgICAgICB2MCA9ICgoZGN0U3FydDIgKiBwWygwICogOCkgKyBjb2xdKSArIDIwNDgpID4+IDEyOwogICAgICAgIHYxID0gKChkY3RTcXJ0MiAqIHBbKDQgKiA4KSArIGNvbF0pICsgMjA0OCkgPj4gMTI7CiAgICAgICAgdjIgPSBwWygyICogOCkgKyBjb2xdOwogICAgICAgIHYzID0gcFsoNiAqIDgpICsgY29sXTsKICAgICAgICB2NCA9ICgoZGN0U3FydDFkMiAqIChwWygxICogOCkgKyBjb2xdIC0gcFsoNyAqIDgpICsgY29sXSkpICsgMjA0OCkgPj4gMTI7CiAgICAgICAgdjcgPSAoKGRjdFNxcnQxZDIgKiAocFsoMSAqIDgpICsgY29sXSArIHBbKDcgKiA4KSArIGNvbF0pKSArIDIwNDgpID4+IDEyOwogICAgICAgIHY1ID0gcFsoMyAqIDgpICsgY29sXTsKICAgICAgICB2NiA9IHBbKDUgKiA4KSArIGNvbF07CgogICAgICAgIC8vIHN0YWdlIDMKICAgICAgICB0ID0gKHYwIC0gdjEgKyAxKSA+PiAxOwogICAgICAgIHYwID0gKHYwICsgdjEgKyAxKSA+PiAxOwogICAgICAgIHYxID0gdDsKICAgICAgICB0ID0gKCh2MiAqIGRjdFNpbjYpICsgKHYzICogZGN0Q29zNikgKyAyMDQ4KSA+PiAxMjsKICAgICAgICB2MiA9ICgodjIgKiBkY3RDb3M2KSAtICh2MyAqIGRjdFNpbjYpICsgMjA0OCkgPj4gMTI7CiAgICAgICAgdjMgPSB0OwogICAgICAgIHQgPSAodjQgLSB2NiArIDEpID4+IDE7CiAgICAgICAgdjQgPSAodjQgKyB2NiArIDEpID4+IDE7CiAgICAgICAgdjYgPSB0OwogICAgICAgIHQgPSAodjcgKyB2NSArIDEpID4+IDE7CiAgICAgICAgdjUgPSAodjcgLSB2NSArIDEpID4+IDE7CiAgICAgICAgdjcgPSB0OwoKICAgICAgICAvLyBzdGFnZSAyCiAgICAgICAgdCA9ICh2MCAtIHYzICsgMSkgPj4gMTsKICAgICAgICB2MCA9ICh2MCArIHYzICsgMSkgPj4gMTsKICAgICAgICB2MyA9IHQ7CiAgICAgICAgdCA9ICh2MSAtIHYyICsgMSkgPj4gMTsKICAgICAgICB2MSA9ICh2MSArIHYyICsgMSkgPj4gMTsKICAgICAgICB2MiA9IHQ7CiAgICAgICAgdCA9ICgodjQgKiBkY3RTaW4zKSArICh2NyAqIGRjdENvczMpICsgMjA0OCkgPj4gMTI7CiAgICAgICAgdjQgPSAoKHY0ICogZGN0Q29zMykgLSAodjcgKiBkY3RTaW4zKSArIDIwNDgpID4+IDEyOwogICAgICAgIHY3ID0gdDsKICAgICAgICB0ID0gKCh2NSAqIGRjdFNpbjEpICsgKHY2ICogZGN0Q29zMSkgKyAyMDQ4KSA+PiAxMjsKICAgICAgICB2NSA9ICgodjUgKiBkY3RDb3MxKSAtICh2NiAqIGRj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sZXNQZXJMaW5lKSk7CiAgICAgIH0KICAgICAgZm9yIChsZXQgYmxvY2tDb2wgPSAwOyBibG9ja0NvbCA8IGJsb2Nrc1BlckxpbmU7IGJsb2NrQ29sKyspIHsKICAgICAgICBxdWFudGl6ZUFuZEludmVyc2UoY29tcG9uZW50LmJsb2Nrc1tibG9ja1Jvd11bYmxvY2tDb2xdLCByLCBSKTsKCiAgICAgICAgbGV0IG9mZnNldCA9IDA7CiAgICAgICAgY29uc3Qgc2FtcGxlID0gYmxvY2tDb2wgPDwgMzsKICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IDg7IGorKykgewogICAgICAgICAgY29uc3QgbGluZSA9IGxpbmVzW3NjYW5MaW5lICsgal07CiAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IDg7IGkrKykgewogICAgICAgICAgICBsaW5lW3NhbXBsZSArIGldID0gcltvZmZzZXQrK107CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICB9CiAgICByZXR1cm4gbGluZXM7CiAgfQoKICBjbGFzcyBKcGVnU3RyZWFtUmVhZGVyIHsKICAgIGNvbnN0cnVjdG9yKCkgewogICAgICB0aGlzLmpmaWYgPSBudWxsOwogICAgICB0aGlzLmFkb2JlID0gbnVsbDsKCiAgICAgIHRoaXMucXVhbnRpemF0aW9uVGFibGVzID0gW107CiAgICAgIHRoaXMuaHVmZm1hblRhYmxlc0FDID0gW107CiAgICAgIHRoaXMuaHVmZm1hblRhYmxlc0RDID0gW107CiAgICAgIHRoaXMucmVzZXRGcmFtZXMoKTsKICAgIH0KCiAgICByZXNldEZyYW1lcygpIHsKICAgICAgdGhpcy5mcmFtZXMgPSBbXTsKICAgIH0KCiAgICBwYXJzZShkYXRhKSB7CiAgICAgIGxldCBvZmZzZXQgPSAwOwogICAgICAvLyBjb25zdCB7IGxlbmd0aCB9ID0gZGF0YTsKICAgICAgZnVuY3Rpb24gcmVhZFVpbnQxNigpIHsKICAgICAgICBjb25zdCB2YWx1ZSA9IChkYXRhW29mZnNldF0gPDwgOCkgfCBkYXRhW29mZnNldCArIDFdOwogICAgICAgIG9mZnNldCArPSAyOwogICAgICAgIHJldHVybiB2YWx1ZTsKICAgICAgfQogICAgICBmdW5jdGlvbiByZWFkRGF0YUJsb2NrKCkgewogICAgICAgIGNvbnN0IGxlbmd0aCA9IHJlYWRVaW50MTYoKTsKICAgICAgICBjb25zdCBhcnJheSA9IGRhdGEuc3ViYXJyYXkob2Zmc2V0LCBvZmZzZXQgKyBsZW5ndGggLSAyKTsKICAgICAgICBvZmZzZXQgKz0gYXJyYXkubGVuZ3RoOwogICAgICAgIHJldHVybiBhcnJheTsKICAgICAgfQogICAgICBmdW5jdGlvbiBwcmVwYXJlQ29tcG9uZW50cyhmcmFtZSkgewogICAgICAgIGxldCBtYXhIID0gMDsKICAgICAgICBsZXQgbWF4ViA9IDA7CiAgICAgICAgbGV0IGNvbXBvbmVudDsKICAgICAgICBsZXQgY29tcG9uZW50SWQ7CiAgICAgICAgZm9yIChjb21wb25lbnRJZCBpbiBmcmFtZS5jb21wb25lbnRzKSB7CiAgICAgICAgICBpZiAoZnJhbWUuY29tcG9uZW50cy5oYXNPd25Qcm9wZXJ0eShjb21wb25lbnRJZCkpIHsKICAgICAgICAgICAgY29tcG9uZW50ID0gZnJhbWUuY29tcG9uZW50c1tjb21wb25lbnRJZF07CiAgICAgICAgICAgIGlmIChtYXhIIDwgY29tcG9uZW50LmgpIHsKICAgICAgICAgICAgICBtYXhIID0gY29tcG9uZW50Lmg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKG1heFYgPCBjb21wb25lbnQudikgewogICAgICAgICAgICAgIG1heFYgPSBjb21wb25lbnQudjsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBjb25zdCBtY3VzUGVyTGluZSA9IE1hdGguY2VpbChmcmFtZS5zYW1wbGVzUGVyTGluZSAvIDggLyBtYXhIKTsKICAgICAgICBjb25zdCBtY3VzUGVyQ29sdW1uID0gTWF0aC5jZWlsKGZyYW1lLnNjYW5MaW5lcyAvIDggLyBtYXhWKTsKICAgICAgICBmb3IgKGNvbXBvbmVudElkIGluIGZyYW1lLmNvbXBvbmVudHMpIHsKICAgICAgICAgIGlmIChmcmFtZS5jb21wb25lbnRzLmhhc093blByb3BlcnR5KGNvbXBvbmVudElkKSkgewogICAgICAgICAgICBjb21wb25lbnQgPSBmcmFtZS5jb21wb25lbnRzW2NvbXBvbmVudElkXTsKICAgICAgICAgICAgY29uc3QgYmxvY2tzUGVyTGluZSA9IE1hdGguY2VpbChNYXRoLmNlaWwoZnJhbWUuc2FtcGxlc1BlckxpbmUgLyA4KSAqIGNvbXBvbmVudC5oIC8gbWF4SCk7CiAgICAgICAgICAgIGNvbnN0IGJsb2Nrc1BlckNvbHVtbiA9IE1hdGguY2VpbChNYXRoLmNlaWwoZnJhbWUuc2NhbkxpbmVzIC8gOCkgKiBjb21wb25lbnQudiAvIG1heFYpOwogICAgICAgICAgICBjb25zdCBibG9ja3NQZXJMaW5lRm9yTWN1ID0gbWN1c1BlckxpbmUgKiBjb21wb25lbnQuaDsKICAgICAgICAgICAgY29uc3QgYmxvY2tzUGVyQ29sdW1uRm9yTWN1ID0gbWN1c1BlckNvbHVtbiAqIGNvbXBvbmVudC52OwogICAgICAgICAgICBjb25zdCBibG9ja3MgPSBbXTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBibG9ja3NQZXJDb2x1bW5Gb3JNY3U7IGkrKykgewogICAgICAgICAgICAgIGNvbnN0IHJvdyA9IFtdOwogICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgYmxvY2tzUGVyTGluZUZvck1jdTsgaisrKSB7CiAgICAgICAgICAgICAgICByb3cucHVzaChuZXcgSW50MzJBcnJheSg2NCkpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBibG9ja3MucHVzaChyb3cpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbXBvbmVudC5ibG9ja3NQZXJMaW5lID0gYmxvY2tzUGVyTGluZTsKICAgICAgICAgICAgY29tcG9uZW50LmJsb2Nrc1BlckNvbHVtbiA9IGJsb2Nrc1BlckNvbHVtbjsKICAgICAgICAgICAgY29tcG9uZW50LmJsb2NrcyA9IGJsb2NrczsKICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgZnJhbWUubWF4SCA9IG1heEg7CiAgICAgICAgZnJhbWUubWF4ViA9IG1heFY7CiAgICAgICAgZnJhbWUubWN1c1BlckxpbmUgPSBtY3VzUGVyTGluZTsKICAgICAgICBmcmFtZS5tY3VzUGVyQ29sdW1uID0gbWN1c1BlckNvbHVtbjsKICAgICAgfQoKICAgICAgbGV0IGZpbGVNYXJrZXIgPSByZWFkVWludDE2KCk7CiAgICAgIGlmIChmaWxlTWFya2VyICE9PSAweEZGRDgpIHsgLy8gU09JIChTdGFydCBvZiBJbWFnZSkKICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1NPSSBub3QgZm91bmQnKTsKICAgICAgfQoKICAgICAgZmlsZU1hcmtlciA9IHJlYWRVaW50MTYoKTsKICAgICAgd2hpbGUgKGZpbGVNYXJrZXIgIT09IDB4RkZEOSkgeyAvLyBFT0kgKEVuZCBvZiBpbWFnZSkKICAgICAgICBzd2l0Y2ggKGZpbGVNYXJrZXIpIHsKICAgICAgICAgIGNhc2UgMHhGRjAwOiBicmVhazsKICAgICAgICAgIGNhc2UgMHhGRkUwOiAvLyBBUFAwIChBcHBsaWNhdGlvbiBTcGVjaWZpYykKICAgICAgICAgIGNhc2UgMHhGRkUxOiAvLyBBUFAxCiAgICAgICAgICBjYXNlIDB4RkZFMjogLy8gQVBQMgogICAgICAgICAgY2FzZSAweEZGRTM6IC8vIEFQUDMKICAgICAgICAgIGNhc2UgMHhGRkU0OiAvLyBBUFA0CiAgICAgICAgICBjYXNlIDB4RkZFNTogLy8gQVBQNQogICAgICAgICAgY2FzZSAweEZGRTY6IC8vIEFQUDYKICAgICAgICAgIGNhc2UgMHhGRkU3OiAvLyBBUFA3CiAgICAgICAgICBjYXNlIDB4RkZFODogLy8gQVBQOAogICAgICAgICAgY2FzZSAweEZGRTk6IC8vIEFQUDkKICAgICAgICAgIGNhc2UgMHhGRkVBOiAvLyBBUFAxMAogICAgICAgICAgY2FzZSAweEZGRUI6IC8vIEFQUDExCiAgICAgICAgICBjYXNlIDB4RkZFQzogLy8gQVBQMTIKICAgICAgICAgIGNhc2UgMHhGRkVEOiAvLyBBUFAxMwogICAgICAgICAgY2FzZSAweEZGRUU6IC8vIEFQUDE0CiAgICAgICAgICBjYXNlIDB4RkZFRjogLy8gQVBQMTUKICAgICAgICAgIGNhc2UgMHhGRkZFOiB7IC8vIENPTSAoQ29tbWVudCkKICAgICAgICAgICAgY29uc3QgYXBwRGF0YSA9IHJlYWREYXRhQmxvY2soKTsKCiAgICAgICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRTApIHsKICAgICAgICAgICAgICBpZiAoYXBwRGF0YVswXSA9PT0gMHg0QSAmJiBhcHBEYXRhWzFdID09PSAweDQ2ICYmIGFwcERhdGFbMl0gPT09IDB4NDkKICAgICAgICAgICAgICAgICYmIGFwcERhdGFbM10gPT09IDB4NDYgJiYgYXBwRGF0YVs0XSA9PT0gMCkgeyAvLyAnSkZJRlx4MDAnCiAgICAgICAgICAgICAgICB0aGlzLmpmaWYgPSB7CiAgICAgICAgICAgICAgICAgIHZlcnNpb246IHsgbWFqb3I6IGFwcERhdGFbNV0sIG1pbm9yOiBhcHBEYXRhWzZdIH0sCiAgICAgICAgICAgICAgICAgIGRlbnNpdHlVbml0czogYXBwRGF0YVs3XSwKICAgICAgICAgICAgICAgICAgeERlbnNpdHk6IChhcHBEYXRhWzhdIDw8IDgpIHwgYXBwRGF0YVs5XSwKICAgICAgICAgICAgICAgICAgeURlbnNpdHk6IChhcHBEYXRhWzEwXSA8PCA4KSB8IGFwcERhdGFbMTFdLAogICAgICAgICAgICAgICAgICB0aHVtYldpZHRoOiBhcHBEYXRhWzEyXSwKICAgICAgICAgICAgICAgICAgdGh1bWJIZWlnaHQ6IGFwcERhdGFbMTNdLAogICAgICAgICAgICAgICAgICB0aHVtYkRhdGE6IGFwcERhdGEuc3ViYXJyYXkoMTQsIDE0ICsgKDMgKiBhcHBEYXRhWzEyXSAqIGFwcERhdGFbMTNdKSksCiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICAvLyBUT0RPIEFQUDEgLSBFeGlmCiAgICAgICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRUUpIHsKICAgICAgICAgICAgICBpZiAoYXBwRGF0YVswXSA9PT0gMHg0MSAmJiBhcHBEYXRhWzFdID09PSAweDY0ICYmIGFwcERhdGFbMl0gPT09IDB4NkYKICAgICAgICAgICAgICAgICYmIGFwcERhdGFbM10gPT09IDB4NjIgJiYgYXBwRGF0YVs0XSA9PT0gMHg2NSAmJiBhcHBEYXRhWzVdID09PSAwKSB7IC8vICdBZG9iZVx4MDAnCiAgICAgICAgICAgICAgICB0aGlzLmFkb2JlID0gewogICAgICAgICAgICAgICAgICB2ZXJzaW9uOiBhcHBEYXRhWzZdLAogICAgICAgICAgICAgICAgICBmbGFnczA6IChhcHBEYXRhWzddIDw8IDgpIHwgYXBwRGF0YVs4XSwKICAgICAgICAgICAgICAgICAgZmxhZ3MxOiAoYXBwRGF0YVs5XSA8PCA4KSB8IGFwcERhdGFbMTBdLAogICAgICAgICAgICAgICAgICB0cmFuc2Zvcm1Db2RlOiBhcHBEYXRhWzExXSwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQoKICAgICAgICAgIGNhc2UgMHhGRkRCOiB7IC8vIERRVCAoRGVmaW5lIFF1YW50aXphdGlvbiBUYWJsZXMpCiAgICAgICAgICAgIGNvbnN0IHF1YW50aXphdGlvblRhYmxlc0xlbmd0aCA9IHJlYWRVaW50MTYoKTsKICAgICAgICAgICAgY29uc3QgcXVhbnRpemF0aW9uVGFibGVzRW5kID0gcXVhbnRpemF0aW9uVGFibGVzTGVuZ3RoICsgb2Zmc2V0IC0gMjsKICAgICAgICAgICAgd2hpbGUgKG9mZnNldCA8IHF1YW50aXphdGlvblRhYmxlc0VuZCkgewogICAgICAgICAgICAgIGNvbnN0IHF1YW50aXphdGlvblRhYmxlU3BlYyA9IGRhdGFbb2Zmc2V0KytdOwogICAgICAgICAgICAgIGNvbnN0IHRhYmxlRGF0YSA9IG5ldyBJbnQzMkFycmF5KDY0KTsKICAgICAgICAgICAgICBpZiAoKHF1YW50aXphdGlvblRhYmxlU3BlYyA+PiA0KSA9PT0gMCkgeyAvLyA4IGJpdCB2YWx1ZXMKICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgNjQ7IGorKykgewogICAgICAgICAgICAgICAgICBjb25zdCB6ID0gZGN0WmlnWmFnW2pdOwogICAgICAgICAgICAgICAgICB0YWJsZURhdGFbel0gPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9IGVsc2UgaWYgKChxdWFudGl6YXRpb25UYWJsZVNwZWMgPj4gNCkgPT09IDEpIHsgLy8gMTYgYml0CiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IDY0OyBqKyspIHsKICAgICAgICAgICAgICAgICAgY29uc3QgeiA9IGRjdFppZ1phZ1tqXTsKICAgICAgICAgICAgICAgICAgdGFibGVEYXRhW3pdID0gcmVhZFVpbnQxNigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0RRVDogaW52YWxpZCB0YWJsZSBzcGVjJyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHRoaXMucXVhbnRpemF0aW9uVGFibGVzW3F1YW50aXphdGlvblRhYmxlU3BlYyAmIDE1XSA9IHRhYmxlRGF0YTsKICAgICAgICAgICAgfQogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KCiAgICAgICAgICBjYXNlIDB4RkZDMDogLy8gU09GMCAoU3RhcnQgb2YgRnJhbWUsIEJhc2VsaW5lIERDVCkKICAgICAgICAgIGNhc2UgMHhGRkMxOiAvLyBTT0YxIChTdGFydCBvZiBGcmFtZSwgRXh0ZW5kZWQgRENUKQogICAgICAgICAgY2FzZSAweEZGQzI6IHsgLy8gU09GMiAoU3RhcnQgb2YgRnJhbWUsIFByb2dyZXNzaXZlIERDVCkKICAgICAgICAgICAgcmVhZFVpbnQxNigpOyAvLyBza2lwIGRhdGEgbGVuZ3RoCiAgICAgICAgICAgIGNvbnN0IGZyYW1lID0gewogICAgICAgICAgICAgIGV4dGVuZGVkOiAoZmlsZU1hcmtlciA9PT0gMHhGRkMxKSwKICAgICAgICAgICAgICBwcm9ncmVzc2l2ZTogKGZpbGVNYXJrZXIgPT09IDB4RkZDMiksCiAgICAgICAgICAgICAgcHJlY2lzaW9uOiBkYXRhW29mZnNldCsrXSwKICAgICAgICAgICAgICBzY2FuTGluZXM6IHJlYWRVaW50MTYoKSwKICAgICAgICAgICAgICBzYW1wbGVzUGVyTGluZTogcmVhZFVpbnQxNigpLAogICAgICAgICAgICAgIGNvbXBvbmVudHM6IHt9LAogICAgICAgICAgICAgIGNvbXBvbmVudHNPcmRlcjogW10sCiAgICAgICAgICAgIH07CgogICAgICAgICAgICBjb25zdCBjb21wb25lbnRzQ291bnQgPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgbGV0IGNvbXBvbmVudElkOwogICAgICAgICAgICAvLyBsZXQgbWF4SCA9IDA7CiAgICAgICAgICAgIC8vIGxldCBtYXhWID0gMDsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb21wb25lbnRzQ291bnQ7IGkrKykgewogICAgICAgICAgICAgIGNvbXBvbmVudElkID0gZGF0YVtvZmZzZXRdOwogICAgICAgICAgICAgIGNvbnN0IGggPSBkYXRhW29mZnNldCArIDFdID4+IDQ7CiAgICAgICAgICAgICAgY29uc3QgdiA9IGRhdGFbb2Zmc2V0ICsgMV0gJiAxNTsKICAgICAgICAgICAgICBjb25zdCBxSWQgPSBkYXRhW29mZnNldCArIDJdOwogICAgICAgICAgICAgIGZyYW1lLmNvbXBvbmVudHNPcmRlci5wdXNoKGNvbXBvbmVudElkKTsKICAgICAgICAgICAgICBmcmFtZS5jb21wb25lbnRzW2NvbXBvbmVudElkXSA9IHsKICAgICAgICAgICAgICAgIGgsCiAgICAgICAgICAgICAgICB2LAogICAgICAgICAgICAgICAgcXVhbnRpemF0aW9uSWR4OiBxSWQsCiAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICBvZmZzZXQgKz0gMzsKICAgICAgICAgICAgfQogICAgICAgICAgICBwcmVwYXJlQ29tcG9uZW50cyhmcmFtZSk7CiAgICAgICAgICAgIHRoaXMuZnJhbWVzLnB1c2goZnJhbWUpOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KCiAgICAgICAgICBjYXNlIDB4RkZDNDogeyAvLyBESFQgKERlZmluZSBIdWZmbWFuIFRhYmxlcykKICAgICAgICAgICAgY29uc3QgaHVmZm1hbkxlbmd0aCA9IHJlYWRVaW50MTYoKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDI7IGkgPCBodWZmbWFuTGVuZ3RoOykgewogICAgICAgICAgICAgIGNvbnN0IGh1ZmZtYW5UYWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgICBjb25zdCBjb2RlTGVuZ3RocyA9IG5ldyBVaW50OEFycmF5KDE2KTsKICAgICAgICAgICAgICBsZXQgY29kZUxlbmd0aFN1bSA9IDA7CiAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCAxNjsgaisrLCBvZmZzZXQrKykgewogICAgICAgICAgICAgICAgY29kZUxlbmd0aHNbal0gPSBkYXRhW29mZnNldF07CiAgICAgICAgICAgICAgICBjb2RlTGVuZ3RoU3VtICs9IGNvZGVMZW5ndGhzW2pdOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBjb25zdCBodWZmbWFuVmFsdWVzID0gbmV3IFVpbnQ4QXJyYXkoY29kZUxlbmd0aFN1bSk7CiAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBjb2RlTGVuZ3RoU3VtOyBqKyssIG9mZnNldCsrKSB7CiAgICAgICAgICAgICAgICBodWZmbWFuVmFsdWVzW2pdID0gZGF0YVtvZmZzZXRdOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpICs9IDE3ICsgY29kZUxlbmd0aFN1bTsKCiAgICAgICAgICAgICAgaWYgKChodWZmbWFuVGFibGVTcGVjID4+IDQpID09PSAwKSB7CiAgICAgICAgICAgICAgICB0aGlzLmh1ZmZtYW5UYWJsZXNEQ1todWZmbWFuVGFibGVTcGVjICYgMTVdID0gYnVpbGRIdWZmbWFuVGFibGUoCiAgICAgICAgICAgICAgICAgIGNvZGVMZW5ndGhzLCBodWZmbWFuVmFsdWVzLAogICAgICAgICAgICAgICAgKTsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdGhpcy5odWZmbWFuVGFibGVzQUNbaHVmZm1hblRhYmxlU3BlYyAmIDE1XSA9IGJ1aWxkSHVmZm1hblRhYmxlKAogICAgICAgICAgICAgICAgICBjb2RlTGVuZ3RocywgaHVmZm1hblZhbHVlcywKICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQoKICAgICAgICAgIGNhc2UgMHhGRkREOiAvLyBEUkkgKERlZmluZSBSZXN0YXJ0IEludGVydmFsKQogICAgICAgICAgICByZWFkVWludDE2KCk7IC8vIHNraXAgZGF0YSBsZW5ndGgKICAgICAgICAgICAgdGhpcy5yZXNldEludGVydmFsID0gcmVhZFVpbnQxNigpOwogICAgICAgICAgICBicmVhazsKCiAgICAgICAgICBjYXNlIDB4RkZEQTogeyAvLyBTT1MgKFN0YXJ0IG9mIFNjYW4pCiAgICAgICAgICAgIHJlYWRVaW50MTYoKTsgLy8gc2tpcCBsZW5ndGgKICAgICAgICAgICAgY29uc3Qgc2VsZWN0b3JzQ291bnQgPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgY29uc3QgY29tcG9uZW50cyA9IFtdOwogICAgICAgICAgICBjb25zdCBmcmFtZSA9IHRoaXMuZnJhbWVzWzBdOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNlbGVjdG9yc0NvdW50OyBpKyspIHsKICAgICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBmcmFtZS5jb21wb25lbnRzW2RhdGFbb2Zmc2V0KytdXTsKICAgICAgICAgICAgICBjb25zdCB0YWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgICBjb21wb25lbnQuaHVmZm1hblRhYmxlREMgPSB0aGlzLmh1ZmZtYW5UYWJsZXNEQ1t0YWJsZVNwZWMgPj4gNF07CiAgICAgICAgICAgICAgY29tcG9uZW50Lmh1ZmZtYW5UYWJsZUFDID0gdGhpcy5odWZmbWFuVGFibGVzQUNbdGFibGVTcGVjICYgMTVdOwogICAgICAgICAgICAgIGNvbXBvbmVudHMucHVzaChjb21wb25lbnQpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNvbnN0IHNwZWN0cmFsU3RhcnQgPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgY29uc3Qgc3BlY3RyYWxFbmQgPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgY29uc3Qgc3VjY2Vzc2l2ZUFwcHJveGltYXRpb24gPSBkYXRhW29mZnNldCsrXTsKICAgICAgICAgICAgY29uc3QgcHJvY2Vzc2VkID0gZGVjb2RlU2NhbihkYXRhLCBvZmZzZXQsCiAgICAgICAgICAgICAgZnJhbWUsIGNvbXBvbmVudHMsIHRoaXMucmVzZXRJbnRlcnZhbCwKICAgICAgICAgICAgICBzcGVjdHJhbFN0YXJ0LCBzcGVjdHJhbEVuZCwKICAgICAgICAgICAgICBzdWNjZXNzaXZlQXBwcm94aW1hdGlvbiA+PiA0LCBzdWNjZXNzaXZlQXBwcm94aW1hdGlvbiAmIDE1KTsKICAgICAgICAgICAgb2Zmc2V0ICs9IHByb2Nlc3NlZDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CgogICAgICAgICAgY2FzZSAweEZGRkY6IC8vIEZpbGwgYnl0ZXMKICAgICAgICAgICAgaWYgKGRhdGFbb2Zmc2V0XSAhPT0gMHhGRikgeyAvLyBBdm9pZCBza2lwcGluZyBhIHZhbGlkIG1hcmtlci4KICAgICAgICAgICAgICBvZmZzZXQtLTsKICAgICAgICAgICAgfQogICAgICAgICAgICBicmVhazsKCiAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICBpZiAoZGF0YVtvZmZzZXQgLSAzXSA9PT0gMHhGRgogICAgICAgICAgICAgICYmIGRhdGFbb2Zmc2V0IC0gMl0gPj0gMHhDMCAmJiBkYXRhW29mZnNldCAtIDJdIDw9IDB4RkUpIHsKICAgICAgICAgICAgICAvLyBjb3VsZCBiZSBpbmNvcnJlY3QgZW5jb2RpbmcgLS0gbGFzdCAweEZGIGJ5dGUgb2YgdGhlIHByZXZpb3VzCiAgICAgICAgICAgICAgLy8gYmxvY2sgd2FzIGVhdGVuIGJ5IHRoZSBlbmNvZGVyCiAgICAgICAgICAgICAgb2Zmc2V0IC09IDM7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGB1bmtub3duIEpQRUcgbWFya2VyICR7ZmlsZU1hcmtlci50b1N0cmluZygxNil9YCk7CiAgICAgICAgfQogICAgICAgIGZpbGVNYXJrZXIgPSByZWFkVWludDE2KCk7CiAgICAgIH0KICAgIH0K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rKykgewogICAgICAgIGNvbnN0IGNvbXBvbmVudCA9IGNvbXBvbmVudHNbY29tcG9uZW50c09yZGVyW2ldXTsKICAgICAgICBvdXRDb21wb25lbnRzLnB1c2goewogICAgICAgICAgbGluZXM6IGJ1aWxkQ29tcG9uZW50RGF0YShmcmFtZSwgY29tcG9uZW50KSwKICAgICAgICAgIHNjYWxlWDogY29tcG9uZW50LmggLyBmcmFtZS5tYXhILAogICAgICAgICAgc2NhbGVZOiBjb21wb25lbnQudiAvIGZyYW1lLm1heFYsCiAgICAgICAgfSk7CiAgICAgIH0KCiAgICAgIGNvbnN0IG91dCA9IG5ldyBVaW50OEFycmF5KHdpZHRoICogaGVpZ2h0ICogb3V0Q29tcG9uZW50cy5sZW5ndGgpOwogICAgICBsZXQgb2kgPSAwOwogICAgICBmb3IgKGxldCB5ID0gMDsgeSA8IGhlaWdodDsgKyt5KSB7CiAgICAgICAgZm9yIChsZXQgeCA9IDA7IHggPCB3aWR0aDsgKyt4KSB7CiAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG91dENvbXBvbmVudHMubGVuZ3RoOyArK2kpIHsKICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gb3V0Q29tcG9uZW50c1tpXTsKICAgICAgICAgICAgb3V0W29pXSA9IGNvbXBvbmVudC5saW5lc1swIHwgeSAqIGNvbXBvbmVudC5zY2FsZVldWzAgfCB4ICogY29tcG9uZW50LnNjYWxlWF07CiAgICAgICAgICAgICsrb2k7CiAgICAgICAgICB9CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiBvdXQ7CiAgICB9CiAgfQoKICBjbGFzcyBKcGVnRGVjb2RlciBleHRlbmRzIEJhc2VEZWNvZGVyIHsKICAgIGNvbnN0cnVjdG9yKGZpbGVEaXJlY3RvcnkpIHsKICAgICAgc3VwZXIoKTsKICAgICAgdGhpcy5yZWFkZXIgPSBuZXcgSnBlZ1N0cmVhbVJlYWRlcigpOwogICAgICBpZiAoZmlsZURpcmVj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ICAgICAgICAgICAgICAgPSA0OwogIC8vY29uc3QgWl9ERUZBVUxUX1NUUkFURUdZICA9IDA7CgogIC8qIFBvc3NpYmxlIHZhbHVlcyBvZiB0aGUgZGF0YV90eXBlIGZpZWxkICh0aG91Z2ggc2VlIGluZmxhdGUoKSkgKi8KICBjb25zdCBaX0JJTkFSWSAgICAgICAgICAgICAgPSAwOwogIGNvbnN0IFpfVEVYVCAgICAgICAgICAgICAgICA9IDE7CiAgLy9jb25zdCBaX0FTQ0lJICAgICAgICAgICAgID0gMTsgLy8gPSBaX1RFWFQKICBjb25zdCBaX1VOS05PV04kMSAgICAgICAgICAgICA9IDI7CgogIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCgoKICBmdW5jdGlvbiB6ZXJvJDEoYnVmKSB7IGxldCBsZW4gPSBidWYubGVuZ3RoOyB3aGlsZSAoLS1sZW4gPj0gMCkgeyBidWZbbGVuXSA9IDA7IH0gfQoKICAvLyBGcm9tIHp1dGlsLmgKCiAgY29uc3QgU1RPUkVEX0JMT0NLID0gMDsKICBjb25zdCBTVEFUSUNfVFJFRVMgPSAxOwogIGNvbnN0IERZTl9UUkVFUyAgICA9IDI7CiAgLyogVGhlIHRocmVlIGtpbmRzIG9mIGJsb2NrIHR5cGUgKi8KCiAgY29uc3QgTUlOX01BVENIJDEgICAgPSAzOwogIGNvbnN0IE1BWF9NQVRDSCQxICAgID0gMjU4OwogIC8qIFRoZSBtaW5pbXVtIGFuZCBtYXhpbXVtIG1hdGNoIGxlbmd0aHMgKi8KCiAgLy8gRnJvbSBkZWZsYXRlLmgKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgKiBJbnRlcm5hbCBjb21wcmVzc2lvbiBzdGF0ZS4KICAgKi8KCiAgY29uc3QgTEVOR1RIX0NPREV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VyCiAgICogbWV0aG9kIHdvdWxkIHVzZSBhIHRhYmxlKQogICAqIElOIGFzc2VydGlvbjogMSA8PSBsZW4gPD0gMTUKICAgKi8KICBjb25zdCBiaV9yZXZlcnNlID0gKGNvZGUsIGxlbikgPT4gewoKICAgIGxldCByZXMgPSAwOwogICAgZG8gewogICAgICByZXMgfD0gY29kZSAmIDE7CiAgICAgIGNvZGUgPj4+PSAxOwogICAgICByZXMgPDw9IDE7CiAgICB9IHdoaWxlICgtLWxlbiA+IDApOwogICAgcmV0dXJuIHJlcyA+Pj4gMTsKICB9OwoKCiAgLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgICogRmx1c2ggdGhlIGJpdCBidWZmZXIsIGtlZXBpbmcgYXQgbW9zdCA3IGJpdHMgaW4gaXQuCiAgICovCiAgY29uc3QgYmlfZmx1c2ggPSAocykgPT4gewoKICAgIGlmIChzLmJpX3ZhbGlkID09PSAxNikgewogICAgICBwdXRfc2hvcnQocywgcy5iaV9idWYpOwogICAgICBzLmJpX2J1ZiA9IDA7CiAgICAgIHMuYmlfdmFsaWQgPSAwOwoKICAgIH0gZWxzZSBpZiAocy5iaV92YWxpZCA+PSA4KSB7CiAgICAgIHMucGVuZGluZ19idWZbcy5wZW5kaW5nKytdID0gcy5iaV9idWYgJiAweGZmOwogICAgICBzLmJpX2J1ZiA+Pj0gODsKICAgICAgcy5iaV92YWxpZCAtPSA4OwogICAgfQogIH07CgoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgKiBDb21wdXRlIHRoZSBvcHRpbWFsIGJpdCBsZW5ndGhzIGZvciBhIHRyZWUgYW5kIHVwZGF0ZSB0aGUgdG90YWwgYml0IGxlbmd0aAogICAqIGZvciB0aGUgY3VycmVudCBibG9jay4KICAgKiBJTiBhc3Nlcn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AqIDIgKyAxXS8qLkxlbiovID0gYml0czsKICAgICAgLyogV2Ugb3ZlcndyaXRlIHRyZWVbbl0uRGFkIHdoaWNoIGlzIG5vIGxvbmdlciBuZWVkZWQgKi8KCiAgICAgIGlmIChuID4gbWF4X2NvZGUpIHsgY29udGludWU7IH0gLyogbm90IGEgbGVhZiBub2RlICovCgogICAgICBzLmJsX2NvdW50W2JpdHNdKys7CiAgICAgIHhiaXRzID0gMDsKICAgICAgaWYgKG4gPj0gYmFzZSkgewogICAgICAgIHhiaXRzID0gZXh0cmFbbiAtIGJhc2VdOwogICAgICB9CiAgICAgIGYgPSB0cmVlW24gKiAyXS8qLkZyZXEqLzsKICAgICAgcy5vcHRfbGVuICs9IGYgKiAoYml0cyArIHhiaXRzKTsKICAgICAgaWYgKGhhc19zdHJlZSkgewogICAgICAgIHMuc3RhdGljX2xlbiArPSBmICogKHN0cmVlW24gKiAyICsgMV0vKi5MZW4qLyArIHhiaXRzKTsKICAgICAgfQogICAgfQogICAgaWYgKG92ZXJmbG93ID09PSAwKSB7IHJldHVybjsgfQoKICAgIC8vIFRyYWNlKChzdGRlcnIsIlxuYml0IGxlbmd0aCBvdmVyZmxvd1xuIikpOwogICAgLyogVGhpcyBoYXBwZW5zIGZvciBleGFtcGxlIG9uIG9iajIgYW5kIHBpYyBvZiB0aGUgQ2FsZ2FyeSBjb3JwdXMgKi8KCiAgICAvKiBGaW5kIHRoZSBmaXJzdCBiaXQgbGVuZ3RoIHdoaWNoIGNvdWxkIGluY3JlYXNlOiAqLwogICAgZG8gewogICAgICBiaXRzID0gbWF4X2xlbmd0aCAtIDE7CiAgICAgIHdoaWxlIChzLmJsX2NvdW50W2JpdHNdID09PSAwKSB7IGJpdHMtLTsgfQogICAgICBzLmJsX2NvdW50W2JpdHNdLS07ICAgICAgLyogbW92ZSBvbmUgbGVhZiBkb3duIHRoZSB0cmVlICovCiAgICAgIHMuYmxfY291bnRbYml0cyArIDFdICs9IDI7IC8qIG1vdmUgb25lIG92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s9IChiaXRzIC0gdHJlZVttICogMiArIDFdLyouTGVuKi8pICogdHJlZVttICogMl0vKi5GcmVxKi87CiAgICAgICAgICB0cmVlW20gKiAyICsgMV0vKi5MZW4qLyA9IGJpdHM7CiAgICAgICAgfQogICAgICAgIG4tLTsKICAgICAgfQogICAgfQogIH07CgoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgKiBHZW5lcmF0ZSB0aGUgY29kZXMgZm9yIGEgZ2l2ZW4gdHJlZSBhbmQgYml0IGNvdW50cyAod2hpY2ggbmVlZCBub3QgYmUKICAgKiBvcHRpbWFsKS4KICAgKiBJTiBhc3NlcnRpb246IHRoZSBhcnJheSBibF9jb3VudCBjb250YWlucyB0aGUgYml0IGxlbmd0aCBzdGF0aXN0aWNzIGZvcgogICAqIHRoZSBnaXZlbiB0cmVlIGFuZCB0aGUgZmllbGQgbGVuIGlzIHNldCBmb3IgYWxsIHRyZWUgZWxlbWVudHMuCiAgICogT1VUIGFzc2VydGlvbjogdGhlIGZpZWxkIGNvZGUgaXMgc2V0IGZvciBhbGwgdHJlZSBlbGVtZW50cyBvZiBub24KICAgKiAgICAgemVybyBjb2RlIGxlbmd0aC4KICAgKi8KICBjb25zdCBnZW5fY29kZXMgPSAodHJlZSwgbWF4X2NvZGUsIGJsX2NvdW50KSA9PgogIC8vICAgIGN0X2RhdGEgKnRyZWU7ICAgICAgICAgICAgIC8qIHRoZSB0cmVlIHRvIGRlY29yYXRlICovCiAgLy8gICAgaW50IG1heF9jb2RlOyAgICAgICAgICAgICAgLyogbGFyZ2VzdCBjb2RlIHdpdGggbm9uIHplcm8gZnJlcXVlbmN5ICovCiAgLy8gICAgdXNoZiAqYmxfY291bnQ7ICAgICAgICAgICAgLyogbnVtYmVyIG9mIGNvZGVzIGF0IGVhY2ggYml0IGxlbmd0aCAqLwogIHsKICAgIGNvbnN0IG5leHRfY29kZSA9IG5ldyBBcnJheShNQVhfQklUUyQxICsgMSk7IC8qIG5leHQgY29kZSB2YWx1ZSBmb3IgZWFjaCBiaXQgbGVuZ3RoICovCiAgICBsZXQgY29kZSA9IDA7ICAgICAgICAgICAgICAvKiBydW5uaW5nIGNvZGUgdmFsdWUgKi8KICAgIGxldCBiaXRzOyAgICAgICAgICAgICAgICAgIC8qIGJpdCBpbmRleCAqLwogICAgbGV0IG47ICAgICAgICAgICAgICAgICAgICAgLyogY29kZSBpbmRleCAqLwoKICAgIC8qIFRoZSBkaXN0cmlidXRpb24gY291bnRzIGFyZSBmaXJzdCB1c2VkIHRvIGdlbmVyYXRlIHRoZSBjb2RlIHZhbHVlcwogICAgICogd2l0aG91dCBiaXQgcmV2ZXJzYWwuCiAgICAgKi8KICAgIGZvciAoYml0cyA9IDE7IGJpdHMgPD0gTUFYX0JJVFMkMTsgYml0cysrKSB7CiAgICAgIG5leHRfY29kZVtiaXRzXSA9IGNvZGUgPSAoY29kZSArIGJsX2NvdW50W2JpdHMgLSAxXSkgPDwgMTsKICAgIH0KICAgIC8qIENoZWNrIHRoYXQgdGhlIGJpdCBjb3VudHMgaW4gYmxfY291bnQgYXJlIGNvbnNpc3RlbnQuIFRoZSBsYXN0IGNvZGUKICAgICAqIG11c3QgYmUgYWxsIG9uZXMuCiAgICAgKi8KICAgIC8vQXNzZXJ0IChjb2RlICsgYmxfY291bnRbTUFYX0JJVFNdLTEgPT0gKDE8PE1BWF9CSVRTKS0xLAogICAgLy8gICAgICAgICJpbmNvbnNpc3RlbnQgYml0IGNvdW50cyIpOwogICAgLy9UcmFjZXYoKHN0ZGVyciwiXG5nZW5fY29kZXM6IG1heF9jb2RlICVkICIsIG1heF9jb2RlKSk7CgogICAgZm9yIChuID0gMDsgIG4gPD0gbWF4X2NvZGU7IG4rKykgewogICAgICBsZXQgbGVuID0gdHJlZVtuICogMiArIDFdLyouTGVuKi87CiAgICAgIGlmIChsZW4gPT09IDApIHsgY29udGludWU7IH0KICAgICAgLyogTm93IHJldmVyc2UgdGhlIGJpdHMgKi8KICAgICAgdHJlZVtuICogMl0vKi5Db2RlKi8gPSBiaV9yZXZlcnNlKG5leHRfY29kZVtsZW5dKyssIGxlbik7CgogICAgICAvL1RyYWNlY3YodHJlZSAhPSBzdGF0aWNfbHRyZWUsIChzdGRlcnIsIlxubiAlM2QgJWMgbCAlMmQgYyAlNHggKCV4KSAiLAogICAgICAvLyAgICAgbiwgKGlzZ3JhcGgobikgPyBuIDogJyAnKSwgbGVuLCB0cmVlW25dLkNvZGUsIG5leHRfY29kZVtsZW5dLTEpKTsKICAgIH0KICB9OwoKCiAgLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgICogSW5pdGlhbGl6ZSB0aGUgdmFyaW91cyAnY29uc3RhbnQnIHRhYmxlcy4KICAgKi8KICBjb25zdCB0cl9zdGF0aWNfaW5pdCA9ICgpID0+IHsKCiAgICBsZXQgbjsgICAgICAgIC8qIGl0ZXJhdGVzIG92ZXIgdHJlZSBlbGVtZW50cyAqLwogICAgbGV0IGJpdHM7ICAgICAvKiBiaXQgY291bnRlciAqLwogICAgbGV0IGxlbmd0aDsgICAvKiBsZW5ndGggdmFsdWUgKi8KICAgIGxldCBjb2RlOyAgICAgLyogY29kZSB2YWx1ZSAqLwogICAgbGV0IGRpc3Q7ICAgICAvKiBkaXN0YW5jZSBpbmRleCAqLwogICAgY29uc3QgYmxfY291bnQgPSBuZXcgQXJyYXkoTUFYX0JJVFMkMSArIDEpOwogICAgLyogbnVtYmVyIG9mIGNvZGVzIGF0IGVhY2ggYml0IGxlbmd0aCBmb3IgYW4gb3B0aW1hbCB0cmVlICovCgogICAgLy8gZG8gY2hlY2sgaW4gX3RyX2luaXQoKQogICAgLy9pZiAoc3RhdGljX2luaXRfZG9uZSkgcmV0dXJuOwoKICAgIC8qIEZvciBzb21lIGVtYmVkZGVkIHRhcmdldHMsIGdsb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gICAgYmxfY291bnRbYml0c10gPSAwOwogICAgfQoKICAgIG4gPSAwOwogICAgd2hpbGUgKG4gPD0gMTQzKSB7CiAgICAgIHN0YXRpY19sdHJlZVtuICogMiArIDFdLyouTGVuKi8gPSA4OwogICAgICBuKys7CiAgICAgIGJsX2NvdW50WzhdKys7CiAgICB9CiAgICB3aGlsZSAobiA8PSAyNTUpIHsKICAgICAgc3RhdGljX2x0cmVlW24gKiAyICsgMV0vKi5MZW4qLyA9IDk7CiAgICAgIG4rKzsKICAgICAgYmxfY291bnRbOV0rKzsKICAgIH0KICAgIHdoaWxlIChuIDw9IDI3OSkgewogICAgICBzdGF0aWNfbHRyZWVbbiAqIDIgKyAxXS8qLkxlbiovID0gNzsKICAgICAgbisrOwogICAgICBibF9jb3VudFs3XSsrOwogICAgfQogICAgd2hpbGUgKG4gPD0gMjg3KSB7CiAgICAgIHN0YXRpY19sdHJlZVtuICogMiArIDFdLyouTGVuKi8gPSA4OwogICAgICBuKys7CiAgICAgIGJsX2NvdW50WzhdKys7CiAgICB9CiAgICAvKiBDb2RlcyAyODYgYW5kIDI4NyBkbyBub3QgZXhpc3QsIGJ1dCB3ZSBtdXN0IGluY2x1ZGUgdGhlbSBpbiB0aGUKICAgICAqIHRyZWUgY29uc3RydWN0aW9uIHRvIGdldCBhIGNhbm9uaWNhbCBIdWZmbWFuIHRyZWUgKGxvbmdlc3QgY29kZQogICAgICogYWxsIG9uZXMpCiAgICAgKi8KICAgIGdlbl9jb2RlcyhzdGF0aWNfbHRyZWUsIExfQ09ERVMkMSArIDEsIGJsX2NvdW50KTsKCiAgICAvKiBUaGUgc3RhdGljIGRpc3RhbmNlIHRyZWUgaXMgdHJpdmlhbDogKi8KICAgIGZvciAobiA9IDA7IG4gPCBEX0NPREVTJDE7IG4rKykgewogICAgICBzdGF0aWNfZHRyZWVbbiAqIDIgKyAxXS8qLkxlbiovID0gNTsKICAgICAgc3RhdGljX2R0cmVlW24gKiAyXS8qLkNvZGUqLyA9IGJp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uYmxfdHJlZVtuICogMl0vKi5GcmVxKi8gPSAwOyB9CgogICAgcy5keW5fbHRyZWVbRU5EX0JMT0NLICogMl0vKi5GcmVxKi8gPSAxOwogICAgcy5vcHRfbGVuID0gcy5zdGF0aWNfbGVuID0gMDsKICAgIHMubGFzdF9saXQgPSBzLm1hdGNoZXMgPSAwOwogIH07CgoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgKiBGbHVzaCB0aGUgYml0IGJ1ZmZlciBhbmQgYWxpZ24gdGhlIG91dHB1dCBvbiBhIGJ5dGUgYm91bmRhcnkKICAgKi8KICBjb25zdCBiaV93aW5kdXAgPSAocykgPT4KICB7CiAgICBpZiAocy5iaV92YWxpZCA+IDgpIHsKICAgICAgcHV0X3Nob3J0KHMsIHMuYmlfYnVmKTsKICAgIH0gZWxzZSBpZiAocy5iaV92YWxpZCA+IDApIHsKICAgICAgLy9wdXRfYnl0ZShzLCAoQnl0ZSlzLT5iaV9idWYpOwogICAgICBzLnBlbmRpbmdfYnVmW3MucGVuZGluZysrXSA9IHMuYmlfYnVmOwogICAgfQogICAgcy5iaV9idWYgPSAwOwogICAgcy5iaV92YWxpZCA9IDA7CiAgfTsKCiAgLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgICogQ29weSBhIHN0b3JlZCBibG9jaywgc3RvcmluZyBmaXJzdCB0aGUgbGVuZ3RoIGFuZCBpdHMKICAgKiBvbmUncyBjb21wbGVtZW50IGlmIHJlcXVlc3RlZC4KICAgKi8KICBjb25zdCBjb3B5X2Jsb2NrID0gKHMsIGJ1ZiwgbGVuLCBoZWFkZXIpID0+CiAgLy9EZWZsYXRlU3RhdGUgKnM7CiAgLy9jaGFyZiAgICAqYnVmOyAgICAvKiB0aGUgaW5wdXQgZGF0YSAqLwogIC8vdW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YXhfY291bnQgPSA3OyAgICAgICAgIC8qIG1heCByZXBlYXQgY291bnQgKi8KICAgIGxldCBtaW5fY291bnQgPSA0OyAgICAgICAgIC8qIG1pbiByZXBlYXQgY291bnQgKi8KCiAgICBpZiAobmV4dGxlbiA9PT0gMCkgewogICAgICBtYXhfY291bnQgPSAxMzg7CiAgICAgIG1pbl9jb3VudCA9IDM7CiAgICB9CiAgICB0cmVlWyhtYXhfY29kZSArIDEpICogMiArIDFdLyouTGVuKi8gPSAweGZmZmY7IC8qIGd1YXJkICovCgogICAgZm9yIChuID0gMDsgbiA8PSBtYXhfY29kZTsgbisrKSB7CiAgICAgIGN1cmxlbiA9IG5leHRsZW47CiAgICAgIG5leHRsZW4gPSB0cmVlWyhuICsgMSkgKiAyICsgMV0vKi5MZW4qLzsKCiAgICAgIGlmICgrK2NvdW50IDwgbWF4X2NvdW50ICYmIGN1cmxlbiA9PT0gbmV4dGxlbikgewogICAgICAgIGNvbnRpbnVlOwoKICAgICAgfSBlbHNlIGlmIChjb3VudCA8IG1pbl9jb3VudCkgewogICAgICAgIHMuYmxfdHJlZVtjdXJsZW4gKiAyXS8qLkZyZXEqLyArPSBjb3VudDsKCiAgICAgIH0gZWxzZSBpZiAoY3VybGVuICE9PSAwKSB7CgogICAgICAgIGlmIChjdXJsZW4gIT09IHByZXZsZW4pIHsgcy5ibF90cmVlW2N1cmxlbiAqIDJdLyouRnJlcSovKys7IH0KICAgICAgICBzLmJsX3RyZWVbUkVQXzNfNiAqIDJdLyouRnJlcSovKys7CgogICAgICB9IGVsc2UgaWYgKGNvdW50IDw9IDEwKSB7CiAgICAgICAgcy5ibF90cmVlW1JFUFpfM18xMCAqIDJdLyouRnJlcSovKys7CgogICAgICB9IGVsc2UgewogICAgICAgIHMuYmxfdHJlZVtSRVBaXzExXzEzOCAqIDJdLyouRnJlcSovKys7CiAgICAgIH0KCiAgICAgIGNvdW50ID0gMDsKICAgICAgcHJldmxlbiA9IGN1cmxlbjsKCiAgICAgIGlmIChuZXh0bGVuID09PSAwKSB7CiAgICAgICAgbWF4X2NvdW50ID0gMTM4OwogICAgICAgIG1pbl9jb3VudCA9IDM7CgogICAgICB9IGVsc2UgaWYgKGN1cmxlbiA9PT0gbmV4dGxlbikgewogICAgICAgIG1heF9jb3VudCA9IDY7CiAgICAgICAgbWluX2NvdW50ID0gMzsKCiAgICAgIH0gZWxzZSB7CiAgICAgICAgbWF4X2NvdW50ID0gNzsKICAgICAgICBtaW5fY291bnQgPSA0OwogICAgICB9CiAgICB9CiAgfTsKCgogIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICAqIFNlbmQgYSBsaXRlcmFsIG9yIGRpc3RhbmNlIHRyZWUgaW4gY29tcHJlc3NlZCBmb3JtLCB1c2luZyB0aGUgY29kZXMgaW4KICAgKiBibF90cmVlLgogICAqLwogIGNvbnN0IHNlbmRfdHJlZSA9IChzLCB0cmVlLCBtYXhfY29kZSkgPT4KICAvLyAgICBkZWZsYXRlX3N0YXRlICpzOwogIC8vICAgIGN0X2RhdGEgKnRyZWU7IC8qIHRoZSB0cmVlIHRvIGJlIHNjYW5uZWQgKi8KICAvLyAgICBpbnQgbWF4X2NvZGU7ICAgICAgIC8qIGFuZCBpdHMgbGFyZ2VzdCBjb2RlIG9mIG5vbiB6ZXJvIGZyZXF1ZW5jeSAqLwogIHsKICAgIGxldCBuOyAgICAgICAgICAgICAgICAgICAgIC8qIGl0ZXJhdGVzIG92ZXIgYWxsIHRyZWUgZWxlbWVudHMgKi8KICAgIGxldCBwcmV2bGVuID0gLTE7ICAgICAgICAgIC8qIGxhc3QgZW1pdHRlZCBsZW5ndGggKi8KICAgIGxldCBjdXJsZW47ICAgICAgICAgICAgICAgIC8qIGxlbmd0aCBvZiBjdXJyZW50IGNvZGUgKi8KCiAgICBsZXQgbmV4dGxlbiA9IHRyZWVbMCAqIDIgKyAxXS8qLkxlbiovOyAvKiBsZW5ndGggb2YgbmV4dCBjb2RlICovCgogICAgbGV0IGNvdW50ID0gMDsgICAgICAgICAgICAgLyogcmVwZWF0IGNvdW50IG9mIHRoZSBjdXJyZW50IGNvZGUgKi8KICAgIGxldCBtYXhfY291bnQgPSA3OyAgICAgICAgIC8qIG1heCByZXBlYXQgY291bnQgKi8KICAgIGxldCBtaW5fY291bnQgPSA0OyAgICAgICAgIC8qIG1pbiByZXBlYXQgY291bnQgKi8KCiAgICAvKiB0cmVlW21heF9jb2RlKzFdLkxlbiA9IC0xOyAqLyAgLyogZ3VhcmQgYWxyZWFkeSBzZXQgKi8KICAgIGlmIChuZXh0bGVuID09PSAwKSB7CiAgICAgIG1heF9jb3VudCA9IDEzODsKICAgICAgbWluX2NvdW50ID0gMzsKICAgIH0KCiAgICBmb3IgKG4gPSAwOyBuIDw9IG1heF9jb2RlOyBuKyspIHsKICAgICAgY3VybGVuID0gbmV4dGxlbjsKICAgICAgbmV4dGxlbiA9IHRyZWVbKG4gKyAxKSAqIDIgKyAxXS8qLkxlbiovOwoKICAgICAgaWYgKCsrY291bnQgPCBtYXhfY291bnQgJiYgY3VybGVuID09PSBuZXh0bGVuKSB7CiAgICAgICAgY29udGludWU7CgogICAgICB9IGVsc2UgaWYgKGNvdW50IDwgbWluX2NvdW50KSB7CiAgICAgICAgZG8geyBzZW5kX2NvZGUocywgY3VybGVuLCBzLmJsX3RyZWUpOyB9IHdoaWxlICgtLWNvdW50ICE9PSAwKTsKCiAgICAgIH0gZWxzZSBpZiAoY3VybGVuICE9PSAwKSB7CiAgICAgICAgaWYgKGN1cmxlbiAhPT0gcHJldmxlbikgewogICAgICAgICAgc2VuZF9jb2RlKHMsIGN1cmxlbiwgcy5ibF90cmVlKTsKICAgICAgICAgIGNvdW50LS07CiAgICAgICAgfQogICAgICAgIC8vQXNzZXJ0KGNvdW50ID49IDMgJiYgY291bnQgPD0gNiwgIiAzXzY/Iik7CiAgICAgICAgc2VuZF9jb2RlKHMsIFJFUF8zXzYsIHMuYmxfdHJlZSk7CiAgICAgICAgc2VuZF9iaXRzKHMsIGNvdW50IC0gMywgMik7CgogICAgICB9IGVsc2UgaWYgKGNvdW50IDw9IDEwKSB7CiAgICAgICAgc2VuZF9jb2RlKHMsIFJFUFpfM18xMCwgcy5ibF90cmVlKTsKICAgICAgICBzZW5kX2JpdHMocywgY291bnQgLSAzLCAzKTsKCiAgICAgIH0gZWxzZSB7CiAgICAgICAgc2VuZF9jb2RlKHMsIFJFUFpfMTFfMTM4LCBzLmJsX3RyZWUpOwogICAgICAgIHNlbmRfYml0cyhzLCBjb3VudCAtIDExLCA3KTsKICAgICAgfQoKICAgICAgY291bnQgPSAwOwogICAgICBwcmV2bGVuID0gY3VybGVuOwogICAgICBpZiAobmV4dGxlbiA9PT0gMCkgewogICAgICAgIG1heF9jb3VudCA9IDEzODsKICAgICAgICBtaW5fY291bnQgPSAzOwoKICAgICAgfSBlbHNlIGlmIChjdXJsZW4gPT09IG5leHRsZW4pIHsKICAgICAgICBtYXhfY291bnQgPSA2OwogICAgICAgIG1pbl9jb3VudCA9IDM7CgogICAgICB9IGVsc2UgewogICAgICAgIG1heF9jb3VudCA9IDc7CiAgICAgICAgbWluX2NvdW50ID0gNDsKICAgICAgfQogICAgfQogIH07CgoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgKiBDb25zdHJ1Y3QgdGhlIEh1ZmZtYW4gdHJlZSBmb3IgdGhlIGJpdCBsZW5ndGhzIGFuZCByZXR1cm4gdGhlIGluZGV4IGluCiAgICogYmxfb3JkZXIgb2YgdGhlIGxhc3QgYml0IGxlbmd0aCBjb2RlIHRvIHNlbmQuCiAgICovCiAgY29uc3QgYnVpbGRfYmxfdHJlZSA9IChzKSA9PiB7CgogICAgbGV0IG1heF9ibGluZGV4OyAgLyogaW5kZXggb2YgbGFzdCBiaXQgbGVuZ3RoIGNvZGUgb2Yg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CBieXRlcwogICAgICogc2V0IGJpdHMgMC4uNiwgMTQuLjI1LCBhbmQgMjguLjMxCiAgICAgKiAweGYzZmZjMDdmID0gYmluYXJ5IDExMTEwMDExMTExMTExMTExMTAwMDAwMDAxMTExMTExCiAgICAgKi8KICAgIGxldCBibGFja19tYXNrID0gMHhmM2ZmYzA3ZjsKICAgIGxldCBuOwoKICAgIC8qIENoZWNrIGZvciBub24tdGV4dHVhbCAoImJsYWNrLWxpc3RlZCIpIGJ5dGVzLiAqLwogICAgZm9yIChuID0gMDsgbiA8PSAzMTsgbisrLCBibGFja19tYXNrID4+Pj0gMSkgewogICAgICBpZiAoKGJsYWNrX21hc2sgJiAxKSAmJiAocy5keW5fbHRyZWVbbiAqIDJdLyouRnJlcSovICE9PSAwKSkgewogICAgICAgIHJldHVybiBaX0JJTkFSWTsKICAgICAgfQogICAgfQoKICAgIC8qIENoZWNrIGZvciB0ZXh0dWFsICgid2hpdGUtbGlzdGVkIikgYnl0ZXMuICovCiAgICBpZiAocy5keW5fbHRyZWVbOSAqIDJdLyouRnJlcSovICE9PSAwIHx8IHMuZHluX2x0cmVlWzEwICogMl0vKi5GcmVxKi8gIT09IDAgfHwKICAgICAgICBzLmR5bl9sdHJlZVsxMyAqIDJdLyouRnJlcSovICE9PSAwKSB7CiAgICAgIHJldHVybiBaX1RFWFQ7CiAgICB9CiAgICBmb3IgKG4gPSAzMjsgbiA8IExJVEVSQUxTJDE7IG4rKykgewogICAgICBpZiAocy5keW5fbHRyZWVbbiAqIDJdLyouRnJlcSovICE9PSAwKSB7CiAgICAgICAgcmV0dXJuIFpfVEVYVDsKICAgICAgfQogICAgfQoKICAgIC8qIFRoZXJlIGFyZSBubyAiYmxhY2stbGlzdGVkIiBvciAid2hpdGUtbGlzdGVkIiBieXRlczoKICAgICAqIHRoaXMgc3RyZWFtIGVpdGhlciBpcyBlbXB0eSBvciBoYXMgdG9sZXJhdGVkICgiZ3JheS1saXN0ZWQiKSBieXRlcyBvbmx5LgogICAgICovCiAgICByZXR1cm4gWl9CSU5BUlk7CiAgfTsKCgogIGxldCBzdGF0aWNfaW5pdF9kb25lID0gZmFsc2U7CgogIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICAqIEluaXRpYWxpemUgdGhlIHRyZWUgZGF0YSBzdHJ1Y3R1cmVzIGZvciBhIG5ldyB6bGliIHN0cmVhbS4KICAgKi8KICBjb25zdCBfdHJfaW5pdCQxID0gKHMpID0+CiAgewoKICAgIGlmICghc3RhdGljX2luaXRfZG9uZSkgewogICAgICB0cl9zdGF0aWNfaW5pdCgpOwogICAgICBzdGF0aWNfaW5pdF9kb25lID0gdHJ1ZTsKICAgIH0KCiAgICBzLmxfZGVzYyAgPSBuZXcgVHJlZURlc2Mocy5keW5fbHRyZWUsIHN0YXRpY19sX2Rlc2MpOwogICAgcy5kX2Rlc2MgID0gbmV3IFRyZWVEZXNjKHMuZHluX2R0cmVlLCBzdGF0aWNfZF9kZXNjKTsKICAgIHMuYmxfZGVzYyA9IG5ldyBUcmVlRGVzYyhzLmJsX3RyZWUsIHN0YXRpY19ibF9kZXNjKTsKCiAgICBzLmJpX2J1ZiA9IDA7CiAgICBzLmJpX3ZhbGlkID0gMDsKCiAgICAvKiBJbml0aWFsaXplIHRoZSBmaXJzdCBibG9jayBvZiB0aGUgZmlyc3QgZmlsZTogKi8KICAgIGluaXRfYmxvY2socyk7CiAgfTsKCgogIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICAqIFNlbmQgYSBzdG9yZWQgYmxvY2sKICAgKi8KICBjb25zdCBfdHJfc3RvcmVkX2Jsb2NrJDEgPSAocywgYnVmLCBzdG9yZWRfbGVuLCBsYXN0KSA9PgogIC8vRGVmbGF0ZVN0YXRlICpzOwogIC8vY2hhcmYgKmJ1ZjsgICAgICAgLyog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KICAgIDA6ICAgICAgJycsICAgICAgICAgICAgICAgICAgICAvKiBaX09LICAgICAgICAgICAgICAwICAqLwogICAgJy0xJzogICAnZmlsZSBlcnJvcicsICAgICAgICAgIC8qIFpfRVJSTk8gICAgICAgICAoLTEpICovCiAgICAnLTInOiAgICdzdHJlYW0gZXJyb3InLCAgICAgICAgLyogWl9TVFJFQU1fRVJST1IgICgtMikgKi8KICAgICctMyc6ICAgJ2RhdGEgZXJyb3InLCAgICAgICAgICAvKiBaX0RBVEFfRVJST1IgICAgKC0zKSAqLwogICAgJy00JzogICAnaW5zdWZmaWNpZW50IG1lbW9yeScsIC8qIFpfTUVNX0VSUk9SICAgICAoLTQpICovCiAgICAnLTUnOiAgICdidWZmZXIgZXJyb3InLCAgICAgICAgLyogWl9CVUZfRVJST1IgICAgICgtNSkgKi8KICAgICctNic6ICAgJ2luY29tcGF0aWJsZSB2ZXJzaW9uJyAvKiBaX1ZFUlNJT05fRVJST1IgKC02KSAqLwogIH07CgogIC8vIChDKSAxOTk1LTIwMTMgSmVhbi1sb3VwIEdhaWxseSBhbmQgTWFyayBBZGxlcgogIC8vIChDKSAyMDE0LTIwMTcgVml0YWx5IFB1enJpbiBhbmQgQW5kcmV5IFR1cGl0c2luCiAgLy8KICAvLyBUaGlzIHNvZnR3YXJlIGlzIHByb3ZpZGVkICdhcy1pcycsIHdpdGhvdXQgYW55IGV4cHJlc3Mgb3IgaW1wbGllZAogIC8vIHdhcnJhbnR5LiBJbiBubyBldmVudCB3aWxsIHRoZSBhdXRob3JzIGJlIGhlbGQgbGlhYmxlIGZvciBhbnkgZGFtYWdlcwogIC8vIGFyaXNpbmcgZnJvbSB0aGUgdXNlIG9mIHRoaXMgc29mdHdhcmUuCiAgLy8KICAvLyBQZXJtaXNzaW9uIGlzIGdyYW50ZWQgdG8gYW55b25lIHRvIHVzZSB0aGlzIHNvZnR3YXJlIGZvciBhbnkgcHVycG9zZSwKICAvLyBpbmNsdWRpbmcgY29tbWVyY2lhbCBh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gWl9GSU5JU0g6ICAgICAgICAgICA0LAogICAgWl9CTE9DSzogICAgICAgICAgICA1LAogICAgWl9UUkVFUzogICAgICAgICAgICA2LAoKICAgIC8qIFJldHVybiBjb2RlcyBmb3IgdGhlIGNvbXByZXNzaW9uL2RlY29tcHJlc3Npb24gZnVuY3Rpb25zLiBOZWdhdGl2ZSB2YWx1ZXMKICAgICogYXJlIGVycm9ycywgcG9zaXRpdmUgdmFsdWVzIGFyZSB1c2VkIGZvciBzcGVjaWFsIGJ1dCBub3JtYWwgZXZlbnRzLgogICAgKi8KICAgIFpfT0s6ICAgICAgICAgICAgICAgMCwKICAgIFpfU1RSRUFNX0VORDogICAgICAgMSwKICAgIFpfTkVFRF9ESUNUOiAgICAgICAgMiwKICAgIFpfRVJSTk86ICAgICAgICAgICAtMSwKICAgIFpfU1RSRUFNX0VSUk9SOiAgICAtMiwKICAgIFpfREFUQV9FUlJPUjogICAgICAtMywKICAgIFpfTUVNX0VSUk9SOiAgICAgICAtNCwKICAgIFpfQlVGX0VSUk9SOiAgICAgICAtNSwKICAgIC8vWl9WRVJTSU9OX0VSUk9SOiAtNiwKCiAgICAvKiBjb21wcmVzc2lvbiBsZXZlbHMgKi8KICAgIFpfTk9fQ09NUFJFU1NJT046ICAgICAgICAgMCwKICAgIFpfQkVTVF9TUEVFRDogICAgICAgICAgICAgMSwKICAgIFpfQkVTVF9DT01QUkVTU0lPTjogICAgICAgOSwKICAgIFpfREVGQVVMVF9DT01QUkVTU0lPTjogICAtMSwKCgogICAgWl9GSUxURVJFRDogICAgICAgICAgICAgICAxLAogICAgWl9IVUZGTUFOX09OTFk6ICAgICAgICAgICAyLAogICAgWl9STEU6ICAgICAgICAgICAgICAgICAgICAzLAogICAgWl9GSVhFRDogICAgICAgICAgICAgICAgICA0LAogICAgWl9ERUZBVUxUX1NUUkFURUdZOiAgICAgICAwLAoKICAgIC8qIFBvc3NpYmxlIHZhbHVlcyBvZiB0aGUgZGF0YV90eXBlIGZpZWxkICh0a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RoaXMgcGF0aG9sb2dpY2FsIGNhc2UuKQogICAgICAgICAqLwoKICAgICAgICBuID0gcy5oYXNoX3NpemU7CiAgICAgICAgcCA9IG47CgogICAgICAgIGRvIHsKICAgICAgICAgIG0gPSBzLmhlYWRbLS1wXTsKICAgICAgICAgIHMuaGVhZFtwXSA9IChtID49IF93X3NpemUgPyBtIC0gX3dfc2l6ZSA6IDApOwogICAgICAgIH0gd2hpbGUgKC0tbik7CgogICAgICAgIG4gPSBfd19zaXplOwogICAgICAgIHAgPSBuOwoKICAgICAgICBkbyB7CiAgICAgICAgICBtID0gcy5wcmV2Wy0tcF07CiAgICAgICAgICBzLnByZXZbcF0gPSAobSA+PSBfd19zaXplID8gbSAtIF93X3NpemUgOiAwKTsKICAgICAgICAgIC8qIElmIG4gaXMgbm90IG9uIGFueSBoYXNoIGNoYWluLCBwcmV2W25dIGlzIGdhcmJhZ2UgYnV0CiAgICAgICAgICAgKiBpdHMgdmFsdWUgd2lsbCBuZXZlciBiZSB1c2VkLgogICAgICAgICAgICovCiAgICAgICAgfSB3aGlsZSAoLS1uKTsKCiAgICAgICAgbW9yZSArPSBfd19zaXplOwogICAgICB9CiAgICAgIGlmIChzLnN0cm0uYXZhaWxfaW4gPT09IDApIHsKICAgICAgICBicmVhazsKICAgICAgfQoKICAgICAgLyogSWYgdGhlcmUgd2FzIG5vIHNsaWRpbmc6CiAgICAgICAqICAgIHN0cnN0YXJ0IDw9IFdTSVpFK01BWF9ESVNULTEgJiYgbG9va2FoZWFkIDw9IE1JTl9MT09LQUhFQUQgLSAxICYmCiAgICAgICAqICAgIG1vcmUgPT0gd2luZG93X3NpemUgLSBsb29rYWhlYWQgLSBzdHJzdGFydAogICAgICAgKiA9PiBtb3JlID49IHdpbmRvd19zaXplIC0gKE1JTl9MT09LQUhFQUQtMSArIFdTSVpFICsgTUFYX0RJU1QtMSkKICAgICAgICogPT4gbW9yZSA+PSB3aW5kb3dfc2l6ZSAtIDIqV1NJWkUgKyAyCiAgICAgICAqIEluIHRoZSBCSUdfTUVNIG9yIE1NQVAgY2FzZSAobm90IHlldCBzdXBwb3J0ZWQpLAogICAgICAgKiAgIHdpbmRvd19zaXplID09IGlucHV0X3NpemUgKyBNSU5fTE9PS0FIRUFEICAmJgogICAgICAgKiAgIHN0cnN0YXJ0ICsgcy0+bG9va2FoZWFkIDw9IGlucHV0X3NpemUgPT4gbW9yZSA+PSBNSU5fTE9PS0FIRUFELgogICAgICAgKiBPdGhlcndpc2UsIHdpbmRvd19zaXplID09IDIqV1NJWkUgc28gbW9yZSA+PSAyLgogICAgICAgKiBJZiB0aGVyZSB3YXMgc2xpZGluZywgbW9yZSA+PSBXU0laRS4gU28gaW4gYWxsIGNhc2VzLCBtb3JlID49IDIuCiAgICAgICAqLwogICAgICAvL0Fzc2VydChtb3JlID49IDIsICJtb3JlIDwgMiIpOwogICAgICBuID0gcmVhZF9idWYocy5zdHJtLCBzLndpbmRvdywgcy5zdHJzdGFydCArIHMubG9va2FoZWFkLCBtb3JlKTsKICAgICAgcy5sb29rYWhlYWQgKz0gbjsKCiAgICAgIC8qIEluaXRpYWxpemUgdGhlIGhhc2ggdmFsdWUgbm93IHRoYXQgd2UgaGF2ZSBzb21lIGlucHV0OiAqLwogICAgICBpZiAocy5sb29rYWhlYWQgKyBzLmluc2VydCA+PSBNSU5fTUFUQ0gpIHsKICAgICAgICBzdHIgPSBzLnN0cnN0YXJ0IC0gcy5pbnNlcnQ7CiAgICAgICAgcy5pbnNfaCA9IHMud2luZG93W3N0cl07CgogICAgICAgIC8qIFVQREFURV9IQVNIKHMsIHMtPmluc19oLCBzLT53aW5kb3dbc3RyICsgMV0pOyAqLwogICAgICAgIHMuaW5zX2ggPSBIQVNIKHMsIHMuaW5zX2gsIHMud2luZG93W3N0ciArIDFdKTsKICAvLyNpZiBNSU5fTUFUQ0ggIT0gMwogIC8vICAgICAgICBDYWxsIHVwZGF0ZV9oYXNoKCkgTUlOX01BVENILTMgbW9yZSB0aW1lcwogIC8vI2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AvLyAgICAgIC8qIEhpZ2ggd2F0ZXIgbWFyayBhdCBvciBhYm92ZSBjdXJyZW50IGRhdGEsIGJ1dCBiZWxvdyBjdXJyZW50IGRhdGEKICAvLyAgICAgICAqIHBsdXMgV0lOX0lOSVQgLS0gemVybyBvdXQgdG8gY3VycmVudCBkYXRhIHBsdXMgV0lOX0lOSVQsIG9yIHVwCiAgLy8gICAgICAgKiB0byBlbmQgb2Ygd2luZG93LCB3aGljaGV2ZXIgaXMgbGVzcy4KICAvLyAgICAgICAqLwogIC8vICAgICAgaW5pdCA9ICh1bGcpY3VyciArIFdJTl9JTklUIC0gcy0+aGlnaF93YXRlcjsKICAvLyAgICAgIGlmIChpbml0ID4gcy0+d2luZG93X3NpemUgLSBzLT5oaWdoX3dhdGVyKQogIC8vICAgICAgICBpbml0ID0gcy0+d2luZG93X3NpemUgLSBzLT5oaWdoX3dhdGVyOwogIC8vICAgICAgem1lbXplcm8ocy0+d2luZG93ICsgcy0+aGlnaF93YXRlciwgKHVuc2lnbmVkKWluaXQpOwogIC8vICAgICAgcy0+aGlnaF93YXRlciArPSBpbml0OwogIC8vICAgIH0KICAvLyAgfQogIC8vCiAgLy8gIEFzc2VydCgodWxnKXMtPnN0cnN0YXJ0IDw9IHMtPndpbmRvd19zaXplIC0gTUlOX0xPT0tBSEVBRCwKICAvLyAgICAibm90IGVub3VnaCByb29tIGZvciBzZWFyY2giKTsKICB9OwoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgKiBDb3B5IHdpdGhvdXQgY29tcHJlc3Npb24gYXMgbXVjaCBhcyBwb3NzaWJsZSBmcm9tIHRoZSBpbnB1dCBzdHJlYW0sIHJldHVybgogICAqIHRoZSBjdXJyZW50IGJsb2NrIHN0YXRlLgogICAqIFRoaXMgZnVuY3Rpb24gZG9lcyBub3QgaW5zZXJ0IG5ldyBzdHJpbmdzIGluIHRoZSB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JpdCBtYWNoaW5lICovCiAgICAgICAgcy5sb29rYWhlYWQgPSBzLnN0cnN0YXJ0IC0gbWF4X3N0YXJ0OwogICAgICAgIHMuc3Ryc3RhcnQgPSBtYXhfc3RhcnQ7CiAgICAgICAgLyoqKiBGTFVTSF9CTE9DSyhzLCAwKTsgKioqLwogICAgICAgIGZsdXNoX2Jsb2NrX29ubHkocywgZmFsc2UpOwogICAgICAgIGlmIChzLnN0cm0uYXZhaWxfb3V0ID09PSAwKSB7CiAgICAgICAgICByZXR1cm4gQlNfTkVFRF9NT1JFOwogICAgICAgIH0KICAgICAgICAvKioqLwoKCiAgICAgIH0KICAgICAgLyogRmx1c2ggaWYgd2UgbWF5IGhhdmUgdG8gc2xpZGUsIG90aGVyd2lzZSBibG9ja19zdGFydCBtYXkgYmVjb21lCiAgICAgICAqIG5lZ2F0aXZlIGFuZCB0aGUgZGF0YSB3aWxsIGJlIGdvbmU6CiAgICAgICAqLwogICAgICBpZiAocy5zdHJzdGFydCAtIHMuYmxvY2tfc3RhcnQgPj0gKHMud19zaXplIC0gTUlOX0xPT0tBSEVBRCkpIHsKICAgICAgICAvKioqIEZMVVNIX0JMT0NLKHMsIDApOyAqKiovCiAgICAgICAgZmx1c2hfYmxvY2tfb25seShzLCBmYWxzZSk7CiAgICAgICAgaWYgKHMuc3RybS5hdmFpbF9vdXQgPT09IDApIHsKICAgICAgICAgIHJldHVybiBCU19ORUVEX01PUkU7CiAgICAgICAgfQogICAgICAgIC8qKiovCiAgICAgIH0KICAgIH0KCiAgICBzLmluc2VydCA9IDA7CgogICAgaWYgKGZsdXNoID09PSBaX0ZJTklTSCQzKSB7CiAgICAgIC8qKiogRkxVU0hfQkxPQ0socywgMSk7ICoqKi8KICAgICAgZmx1c2hfYmxvY2tfb25seShzLCB0cnVlKTsKICAgICAgaWYgKHMuc3RybS5hdmFpbF9vdXQgPT09IDApIHsKICAgICAgICByZXR1cm4gQlNfRklOSVNIX1NUQVJURUQ7CiAgICAgIH0KICAgIC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XNrXSA9IHMuaGVhZFtzLmluc19oXTsKICAgICAgICAgICAgcy5oZWFkW3MuaW5zX2hdID0gcy5zdHJzdGFydDsKICAgICAgICAgICAgLyoqKi8KICAgICAgICAgICAgLyogc3Ryc3RhcnQgbmV2ZXIgZXhjZWVkcyBXU0laRS1NQVhfTUFUQ0gsIHNvIHRoZXJlIGFyZQogICAgICAgICAgICAgKiBhbHdheXMgTUlOX01BVENIIGJ5dGVzIGFoZWFkLgogICAgICAgICAgICAgKi8KICAgICAgICAgIH0gd2hpbGUgKC0tcy5tYXRjaF9sZW5ndGggIT09IDApOwogICAgICAgICAgcy5zdHJzdGFydCsrOwogICAgICAgIH0gZWxzZQogICAgICAgIHsKICAgICAgICAgIHMuc3Ryc3RhcnQgKz0gcy5tYXRjaF9sZW5ndGg7CiAgICAgICAgICBzLm1hdGNoX2xlbmd0aCA9IDA7CiAgICAgICAgICBzLmluc19oID0gcy53aW5kb3dbcy5zdHJzdGFydF07CiAgICAgICAgICAvKiBVUERBVEVfSEFTSChzLCBzLmluc19oLCBzLndpbmRvd1tzLnN0cnN0YXJ0KzFdKTsgKi8KICAgICAgICAgIHMuaW5zX2ggPSBIQVNIKHMsIHMuaW5zX2gsIHMud2luZG93W3Muc3Ryc3RhcnQgKyAxXSk7CgogIC8vI2lmIE1JTl9NQVRDSCAhPSAzCiAgLy8gICAgICAgICAgICAgICAgQ2FsbCBVUERBVEVfSEFTSCgpIE1JTl9NQVRDSC0zIG1vcmUgdGltZXMKICAvLyNlbmRpZgogICAgICAgICAgLyogSWYgbG9va2FoZWFkIDwgTUlOX01BVENILCBpbnNfaCBpcyBnYXJiYWdlLCBidXQgaXQgZG9lcyBub3QKICAgICAgICAgICAqIG1hdHRlciBzaW5jZSBpdCB3aWxsIGJlIHJlY29tcHV0ZWQgYXQgbmV4dCBkZWZsYXRlIGNhbGwuCiAgICAgICAgICAgKi8KICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgLyogTm8gbWF0Y2gsIG91dHB1dCBhIGxpdGVyYWwgYnl0ZSAqLwogICAgICAgIC8vVHJhY2V2digoc3RkZXJyLCIlYyIsIHMud2luZG93W3Muc3Ryc3RhcnRdKSk7CiAgICAgICAgLyoqKiBfdHJfdGFsbHlfbGl0KHMsIHMud2luZG93W3Muc3Ryc3RhcnRdLCBiZmx1c2gpOyAqKiovCiAgICAgICAgYmZsdXNoID0gX3RyX3RhbGx5KHMsIDAsIHMud2luZG93W3Muc3Ryc3RhcnRdKTsKCiAgICAgICAgcy5sb29rYWhlYWQtLTsKICAgICAgICBzLnN0cnN0YXJ0Kys7CiAgICAgIH0KICAgICAgaWYgKGJmbHVzaCkgewogICAgICAgIC8qKiogRkxVU0hfQkxPQ0socywgMCk7ICoqKi8KICAgICAgICBmbHVzaF9ibG9ja19vbmx5KHMsIGZhbHNlKTsKICAgICAgICBpZiAocy5zdHJtLmF2YWlsX291dCA9PT0gMCkgewogICAgICAgICAgcmV0dXJuIEJTX05FRURfTU9SRTsKICAgICAgICB9CiAgICAgICAgLyoqKi8KICAgICAgfQogICAgfQogICAgcy5pbnNlcnQgPSAoKHMuc3Ryc3RhcnQgPCAoTUlOX01BVENIIC0gMSkpID8gcy5zdHJzdGFydCA6IE1JTl9NQVRDSCAtIDEpOwogICAgaWYgKGZsdXNoID09PSBaX0ZJTklTSCQzKSB7CiAgICAgIC8qKiogRkxVU0hfQkxPQ0socywgMSk7ICoqKi8KICAgICAgZmx1c2hfYmxvY2tfb25seShzLCB0cnVlKTsKICAgICAgaWYgKHMuc3RybS5hdmFpbF9vdXQgPT09IDApIHsKICAgICAgICByZXR1cm4gQlNfRklOSVNIX1NUQVJURUQ7CiAgICAgIH0KICAgICAgLyoqKi8KICAgICAgcmV0dXJuIEJTX0ZJTklTSF9ET05FOwogICAgfQogICAgaWYgKHMubGFzdF9saXQpIHsKICAgICAgLyoqKiBGTFVTSF9CTE9DSyhzLCAwKTsgKioqLwogICAgICBmbHVzaF9ibG9ja19vbmx5KHMsIGZhb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AgICAgICAgICBpZiAocy5zdHJtLmF2YWlsX291dCA9PT0gMCkgewogICAgICAgICAgICByZXR1cm4gQlNfTkVFRF9NT1JFOwogICAgICAgICAgfQogICAgICAgICAgLyoqKi8KICAgICAgICB9CgogICAgICB9IGVsc2UgaWYgKHMubWF0Y2hfYXZhaWxhYmxlKSB7CiAgICAgICAgLyogSWYgdGhlcmUgd2FzIG5vIG1hdGNoIGF0IHRoZSBwcmV2aW91cyBwb3NpdGlvbiwgb3V0cHV0IGEKICAgICAgICAgKiBzaW5nbGUgbGl0ZXJhbC4gSWYgdGhlcmUgd2FzIGEgbWF0Y2ggYnV0IHRoZSBjdXJyZW50IG1hdGNoCiAgICAgICAgICogaXMgbG9uZ2VyLCB0cnVuY2F0ZSB0aGUgcHJldmlvdXMgbWF0Y2ggdG8gYSBzaW5nbGUgbGl0ZXJhbC4KICAgICAgICAgKi8KICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwiJWMiLCBzLT53aW5kb3dbcy0+c3Ryc3RhcnQtMV0pKTsKICAgICAgICAvKioqIF90cl90YWxseV9saXQocywgcy53aW5kb3dbcy5zdHJzdGFydC0xXSwgYmZsdXNoKTsgKioqLwogICAgICAgIGJmbHVzaCA9IF90cl90YWxseShzLCAwLCBzLndpbmRvd1tzLnN0cnN0YXJ0IC0gMV0pOwoKICAgICAgICBpZiAoYmZsdXNoKSB7CiAgICAgICAgICAvKioqIEZMVVNIX0JMT0NLX09OTFkocywgMCkgKioqLwogICAgICAgICAgZmx1c2hfYmxvY2tfb25seShzLCBmYWxzZSk7CiAgICAgICAgICAvKioqLwogICAgICAgIH0KICAgICAgICBzLnN0cnN0YXJ0Kys7CiAgICAgICAgcy5sb29rYWhlYWQtLTsKICAgICAgICBpZiAocy5zdHJtLmF2YWlsX291dCA9PT0gMCkgewogICAgICAgICAgcmV0dXJuIEJTX05FRURfTU9SRTsKICAgICAgICB9CiAgICAgIH0gZWxzZSB7CiAgICAgICAgLyogVGhlcmUgaXMgbm8gc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WVkIE1BWF9NQVRDSCBieXRlcwogICAgICAgKiBmb3IgdGhlIGxvbmdlc3QgcnVuLCBwbHVzIG9uZSBmb3IgdGhlIHVucm9sbGVkIGxvb3AuCiAgICAgICAqLwogICAgICBpZiAocy5sb29rYWhlYWQgPD0gTUFYX01BVENIKSB7CiAgICAgICAgZmlsbF93aW5kb3cocyk7CiAgICAgICAgaWYgKHMubG9va2FoZWFkIDw9IE1BWF9NQVRDSCAmJiBmbHVzaCA9PT0gWl9OT19GTFVTSCQyKSB7CiAgICAgICAgICByZXR1cm4gQlNfTkVFRF9NT1JFOwogICAgICAgIH0KICAgICAgICBpZiAocy5sb29rYWhlYWQgPT09IDApIHsgYnJlYWs7IH0gLyogZmx1c2ggdGhlIGN1cnJlbnQgYmxvY2sgKi8KICAgICAgfQoKICAgICAgLyogU2VlIGhvdyBtYW55IHRpbWVzIHRoZSBwcmV2aW91cyBieXRlIHJlcGVhdHMgKi8KICAgICAgcy5tYXRjaF9sZW5ndGggPSAwOwogICAgICBpZiAocy5sb29rYWhlYWQgPj0gTUlOX01BVENIICYmIHMuc3Ryc3RhcnQgPiAwKSB7CiAgICAgICAgc2NhbiA9IHMuc3Ryc3RhcnQgLSAxOwogICAgICAgIHByZXYgPSBfd2luW3NjYW5dOwogICAgICAgIGlmIChwcmV2ID09PSBfd2luWysrc2Nhbl0gJiYgcHJldiA9PT0gX3dpblsrK3NjYW5dICYmIHByZXYgPT09IF93aW5bKytzY2FuXSkgewogICAgICAgICAgc3RyZW5kID0gcy5zdHJzdGFydCArIE1BWF9NQVRDSDsKICAgICAgICAgIGRvIHsKICAgICAgICAgICAgLypqc2hpbnQgbm9lbXB0eTpmYWxzZSovCiAgICAgICAgICB9IHdoaWxlIChwcmV2ID09PSBfd2luWysrc2Nhbl0gJiYgcHJldiA9PT0gX3dpblsrK3NjYW5dICYmCiAgICAgICAgICAgICAgICAgICBwcmV2ID09PSBfd2luWysrc2Nhbl0gJiYgcHJldiA9PT0gX3dpblsrK3Nj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AgICAgICAgcy5tYXRjaF9sZW5ndGggPSAwOwogICAgICB9IGVsc2UgewogICAgICAgIC8qIE5vIG1hdGNoLCBvdXRwdXQgYSBsaXRlcmFsIGJ5dGUgKi8KICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwiJWMiLCBzLT53aW5kb3dbcy0+c3Ryc3RhcnRdKSk7CiAgICAgICAgLyoqKiBfdHJfdGFsbHlfbGl0KHMsIHMud2luZG93W3Muc3Ryc3RhcnRdLCBiZmx1c2gpOyAqKiovCiAgICAgICAgYmZsdXNoID0gX3RyX3RhbGx5KHMsIDAsIHMud2luZG93W3Muc3Ryc3RhcnRdKTsKCiAgICAgICAgcy5sb29rYWhlYWQtLTsKICAgICAgICBzLnN0cnN0YXJ0Kys7CiAgICAgIH0KICAgICAgaWYgKGJmbHVzaCkgewogICAgICAgIC8qKiogRkxVU0hfQkxPQ0socywgMCk7ICoqKi8KICAgICAgICBmbHVzaF9ibG9ja19vbmx5KHMsIGZhbHNlKTsKICAgICAgICBpZiAocy5zdHJtLmF2YWlsX291dCA9PT0gMCkgewogICAgICAgICAgcmV0dXJuIEJTX05FRURfTU9SRTsKICAgICAgICB9CiAgICAgICAgLyoqKi8KICAgICAgfQogICAgfQogICAgcy5pbnNlcnQgPSAwOwogICAgaWYgKGZsdXNoID09PSBaX0ZJTklTSCQzKSB7CiAgICAgIC8qKiogRkxVU0hfQkxPQ0socywgMSk7ICoqKi8KICAgICAgZmx1c2hfYmxvY2tfb25seShzLCB0cnVlKTsKICAgICAgaWYgKHMuc3RybS5hdmFpbF9vdXQgPT09IDApIHsKICAgICAgICByZXR1cm4gQlNfRklOSVNIX1NUQVJURUQ7CiAgICAgIH0KICAgICAgLyoqKi8KICAgICAgcmV0dXJuIEJTX0ZJTklTSF9ET05FOwogICAgfQogICAgaWYgKHMubGFzdF9saXQpIHsKICAgICAgLyoqKiBGTFVTSF9CTE9DSyhzLCAwKTsgKioqLwogICAgICBmbHVzaF9ibG9ja19vbmx5KHMsIGZhbHNlKTsKICAgICAgaWYgKHMuc3RybS5hdmFpbF9vdXQgPT09IDApIHsKICAgICAgICByZXR1cm4gQlNfTkVFRF9NT1JFOwogICAgICB9CiAgICAgIC8qKiovCiAgICB9CiAgICByZXR1cm4gQlNfQkxPQ0tfRE9ORTsKICB9OwoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAgKiBGb3IgWl9IVUZGTUFOX09OTFksIGRvIG5vdCBsb29rIGZvciBtYXRjaGVzLiAgRG8gbm90IG1haW50YWluIGEgaGFzaCB0YWJsZS4KICAgKiAoSXQgd2lsbCBiZSByZWdlbmVyYXRlZCBpZiB0aGlzIHJ1biBvZiBkZWZsYXRlIHN3aXRjaGVzIGF3YXkgZnJvbSBIdWZmbWFuLikKICAgKi8KICBjb25zdCBkZWZsYXRlX2h1ZmYgPSAocywgZmx1c2gpID0+IHsKCiAgICBsZXQgYmZsdXNoOyAgICAgICAgICAgICAvKiBzZXQgaWYgY3VycmVudCBibG9jayBtdXN0IGJlIGZsdXNoZWQgKi8KCiAgICBmb3IgKDs7KSB7CiAgICAgIC8qIE1ha2Ugc3VyZSB0aGF0IHdlIGhhdmUgYSBsaXRlcmFsIHRvIHdyaXRlLiAqLwogICAgICBpZiAocy5sb29rYWhlYWQgPT09IDApIHsKICAgICAgICBmaWxsX3dpbmRvdyhzKTsKICAgICAgICBpZiAocy5sb29rYWhlYWQgPT09IDApIHsKICAgICAgICAgIGlmIChmbHVzaCA9PT0gWl9OT19GTFVTSCQyKSB7CiAgICAgICAgICAgIHJldHVybiBCU19ORUVEX01PUkU7CiAgICAgICAgICB9CiAgICAgICAgICBicmVhazsgICAgICAvKiBmbHVzaCB0aGUgY3VycmVudCBibG9jayAqLwogICAgICAgIH0KICAgICAgfQoKICAgICAgLyogT3V0cHV0IGEgbGl0ZXJhbCBieXRlICovCiAgICAgIHMubWF0Y2hfbGVuZ3RoID0gMDsKICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsIiVjIiwgcy0+d2luZG93W3MtPnN0cnN0YXJ0XSkpOwogICAgICAvKioqIF90cl90YWxseV9saXQocywgcy53aW5kb3dbcy5zdHJzdGFydF0sIGJmbHVzaCk7ICoqKi8KICAgICAgYmZsdXNoID0gX3RyX3RhbGx5KHMsIDAsIHMud2luZG93W3Muc3Ryc3RhcnRdKTsKICAgICAgcy5sb29rYWhlYWQtLTsKICAgICAgcy5zdHJzdGFydCsrOwogICAgICBpZiAoYmZsdXNoKSB7CiAgICAgICAgLyoqKiBGTFVTSF9CTE9DSyhzLCAwKTsgKioqLwogICAgICAgIGZsdXNoX2Jsb2NrX29ubHkocywgZmFsc2UpOwogICAgICAgIGlmIChzLnN0cm0uYXZhaWxfb3V0ID09PSAwKSB7CiAgICAgICAgICByZXR1cm4gQlNfTkVFRF9NT1JFOwogICAgICAgIH0KICAgICAgICAvKioqLwogICAgICB9CiAgICB9CiAgICBzLmluc2VydCA9IDA7CiAgICBpZiAoZmx1c2ggPT09IFpfRklOSVNIJDMpIHsKICAgICAgLyoqKiBGTFVTSF9CTE9DSyhzLCAxKTsgKioqLwogICAgICBmbHVzaF9ibG9ja19vbmx5KHMsIHRydWUpOwogICAgICBpZiAocy5zdHJtLmF2YWlsX291dCA9PT0gMCkgewogICAgICAgIHJldHVybiBCU19GSU5JU0hfU1RBUlRFRDsKICAgICAgfQogICAgICAvKioqLwogICAgICByZXR1cm4gQlNfRklOSVNIX0RPTkU7CiAgICB9CiAgICBpZiAocy5sYXN0X2xpdCkgewogICAgICAvKioqIEZMVVNIX0JMT0NLKHMsIDApOyAqKiovCiAgICAgIGZsdXNoX2Jsb2NrX29ubHkocywgZmFsc2UpOwogICAgICBpZiAocy5zdHJtLmF2YWlsX291dCA9PT0gMCkgewogICAgICAgIHJldHVybiBCU19ORUVEX01PUkU7CiAgICAgIH0KICAgICAgLyoqKi8KICAgIH0KICAgIHJldHVybiBCU19CTE9DS19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Rl9FUlJPUiQxIDogWl9TVFJFQU1fRVJST1IkMik7CiAgICB9CgogICAgcy5zdHJtID0gc3RybTsgLyoganVzdCBpbiBjYXNlICovCiAgICBjb25zdCBvbGRfZmx1c2ggPSBzLmxhc3RfZmx1c2g7CiAgICBzLmxhc3RfZmx1c2ggPSBmbHVzaDsKCiAgICAvKiBXcml0ZSB0aGUgaGVhZGVyICovCiAgICBpZiAocy5zdGF0dXMgPT09IElOSVRfU1RBVEUpIHsKCiAgICAgIGlmIChzLndyYXAgPT09IDIpIHsgLy8gR1pJUCBoZWFkZXIKICAgICAgICBzdHJtLmFkbGVyID0gMDsgIC8vY3JjMzIoMEwsIFpfTlVMTCwgMCk7CiAgICAgICAgcHV0X2J5dGUocywgMzEpOwogICAgICAgIHB1dF9ieXRlKHMsIDEzOSk7CiAgICAgICAgcHV0X2J5dGUocywgOCk7CiAgICAgICAgaWYgKCFzLmd6aGVhZCkgeyAvLyBzLT5nemhlYWQgPT0gWl9OVUxMCiAgICAgICAgICBwdXRfYnl0ZShzLCAwKTsKICAgICAgICAgIHB1dF9ieXRlKHMsIDApOwogICAgICAgICAgcHV0X2J5dGUocywgMCk7CiAgICAgICAgICBwdXRfYnl0ZShzLCAwKTsKICAgICAgICAgIHB1dF9ieXRlKHMsIDApOwogICAgICAgICAgcHV0X2J5dGUocywgcy5sZXZlbCA9PT0gOSA/IDIgOgogICAgICAgICAgICAgICAgICAgICAgKHMuc3RyYXRlZ3kgPj0gWl9IVUZGTUFOX09OTFkgfHwgcy5sZXZlbCA8IDIgPwogICAgICAgICAgICAgICAgICAgICAgIDQgOiAwKSk7CiAgICAgICAgICBwdXRfYnl0ZShzLCBPU19DT0RFKTsKICAgICAgICAgIHMuc3RhdHVzID0gQlVTWV9TVEFURTsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQudGV4dCA/IDEgOiAwKSArCiAgICAgICAgICAgICAgICAgICAgICAocy5nemhlYWQuaGNyYyA/IDIgOiAwKSArCiAgICAgICAgICAgICAgICAgICAgICAoIXMuZ3poZWFkLmV4dHJhID8gMCA6IDQpICsKICAgICAgICAgICAgICAgICAgICAgICghcy5nemhlYWQubmFtZSA/IDAgOiA4KSArCiAgICAgICAgICAgICAgICAgICAgICAoIXMuZ3poZWFkLmNvbW1lbnQgPyAwIDogMTYpCiAgICAgICAgICApOwogICAgICAgICAgcHV0X2J5dGUocywgcy5nemhlYWQudGltZSAmIDB4ZmYpOwogICAgICAgICAgcHV0X2J5dGUocywgKHMuZ3poZWFkLnRpbWUgPj4gOCkgJiAweGZmKTsKICAgICAgICAgIHB1dF9ieXRlKHMsIChzLmd6aGVhZC50aW1lID4+IDE2KSAmIDB4ZmYpOwogICAgICAgICAgcHV0X2J5dGUocywgKHMuZ3poZWFkLnRpbWUgPj4gMjQpICYgMHhmZik7CiAgICAgICAgICBwdXRfYnl0ZShzLCBzLmxldmVsID09PSA5ID8gMiA6CiAgICAgICAgICAgICAgICAgICAgICAocy5zdHJhdGVneSA+PSBaX0hVRkZNQU5fT05MWSB8fCBzLmxldmVsIDwgMiA/CiAgICAgICAgICAgICAgICAgICAgICAgNCA6IDApKTsKICAgICAgICAgIHB1dF9ieXRlKHMsIHMuZ3poZWFkLm9zICYgMHhmZik7CiAgICAgICAgICBpZiAocy5nemhlYWQuZXh0cmEgJiYgcy5nemhlYWQuZXh0cmEubGVuZ3RoKSB7CiAgICAgICAgICAgIHB1dF9ieXRlKHMsIHMuZ3poZWFkLmV4dHJhLmxlbmd0aCAmIDB4ZmYpOwogICAgICAgICAgICBwdXRfYnl0ZShzLCAocy5nemhlYWQuZXh0cmEubGVuZ3RoID4+IDgpICYgMHhmZik7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAocy5nemhlYWQuaGNyYykgewogICAgICAgICAgICBzdHJtLmFkbGVyID0gY3JjMzJfMShzdHJtLmFkbGVyLCBzLnBlbmRpbmdfYnVmLCBzLnBlbmRpbmcsIDApOwogICAgICAgICAgfQogICAgICAgICAgcy5nemluZGV4ID0gMDsKICAgICAgICAgIHMuc3RhdHVzID0gRVhUUkFfU1RBVEU7CiAgICAgICAgfQogICAgICB9CiAgICAgIGVsc2UgLy8gREVGTEFURSBoZWFkZXIKICAgICAgewogICAgICAgIGxldCBoZWFkZXIgPSAoWl9ERUZMQVRFRCQyICsgKChzLndfYml0cyAtIDgpIDw8IDQpKSA8PCA4OwogICAgICAgIGxldCBsZXZlbF9mbGFncyA9IC0xOwoKICAgICAgICBpZiAocy5zdHJhdGVneSA+PSBaX0hVRkZNQU5fT05MWSB8fCBzLmxldmVsIDwgMikgewogICAgICAgICAgbGV2ZWxfZmxhZ3MgPSAwOwogICAgICAgIH0gZWxzZSBpZiAocy5sZXZlbCA8IDYpIHsKICAgICAgICAgIGxldmVsX2ZsYWdzID0gMTsKICAgICAgICB9IGVsc2UgaWYgKHMubGV2ZWwgPT09IDYpIHsKICAgICAgICAgIGxldmVsX2ZsYWdzID0gMjsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgbGV2ZWxfZmxhZ3MgPSAzOwogICAgICAgIH0KICAgICAgICBoZWFkZXIgfD0gKGxldmVsX2ZsYWdzIDw8IDYpOwogICAgICAgIGlmIChzLnN0cnN0YXJ0ICE9PSAwKSB7IGhlYWRlciB8PSBQUkVTRVRfRElDVDsgfQogICAgICAgIGhlYWRlciArPSAzMSAtIChoZWFkZXIgJSAzMSk7CgogICAgICAgIHMuc3RhdHVzID0gQlVTWV9TVEFURTsKICAgICAgICBwdXRTaG9ydE1TQihzLCBoZWFkZXIpOwoKICAgICAgICAvKiBTYXZlIHRoZSBhZGxlcjMyIG9mIHRoZSBwcmVzZXQgZGljdGlvbmFyeTogKi8KICAgICAgICBpZiAocy5zdHJzdGFydCAhPT0gMCkgewogICAgICAgICAgcHV0U2hvcnRNU0Iocywgc3RybS5hZGxlciA+Pj4gMTYpOwogICAgICAgICAgcHV0U2hvcnRNU0Iocywgc3RybS5hZGxlciAmIDB4ZmZmZik7CiAgICAgICAgfQogICAgICAgIHN0cm0uYWRsZXIgPSAxOyAvLyBhZGxlcjMyKDBMLCBaX05VTEwsIDApOwogICAgICB9CiAgICB9CgogIC8vI2lmZGVmIEdaSVAKICAgIGlmIChzLnN0YXR1cyA9PT0gRVhUUkFfU1RBVEUpIHsKICAgICAgaWYgKHMuZ3poZWFkLmV4dHJhLyogIT0gWl9OVUxMKi8pIHsKICAgICAgICBiZWcgPSBzLnBlbmRpbmc7ICAvKiBzdGFydCBvZiBieXRlcyB0byB1cGRhdGUgY3JjICovCgogICAgICAgIHdoaWxlIChzLmd6aW5kZXggPCAocy5nemhlYWQuZXh0cmEubGVuZ3RoICYgMHhmZmZmKSkgewogICAgICAgICAgaWYgKHMucGVuZGluZyA9PT0gcy5wZW5kaW5nX2J1Zl9zaXplKSB7CiAgICAgICAgICAgIGlmIChzLmd6aGVhZC5oY3JjICYmIHMucGVuZGluZyA+IGJlZykgewogICAgICAgICAgICAgIHN0cm0uYWRsZXIgPSBjcmMzMl8xKHN0cm0uYWRsZXIsIHMucGVuZGluZ19idWYsIHMucGVuZGluZyAtIGJlZywgYmVnKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBmbHVzaF9wZW5kaW5nKHN0cm0pOwogICAgICAgICAgICBiZWcgPSBzLnBlbmRpbmc7CiAgICAgICAgICAgIGlmIChzLnBlbmRpbmcgPT09IHMucGVuZGluZ19idWZfc2l6ZSkgewogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBwdXRfYnl0ZShzLCBzLmd6aGVhZC5leHRyYVtzLmd6aW5kZXhdICYgMHhmZik7CiAgICAgICAgICBzLmd6aW5kZXgrKzsKICAgICAgICB9CiAgICAgICAgaWYgKHMuZ3poZWFkLmhjcmMgJiYgcy5wZW5kaW5nID4gYmVnKSB7CiAgICAgICAgICBzdHJtLmFkbGVyID0gY3JjMzJfMShzdHJtLmFkbGVyLCBzLnBlbmRpbmdfYnVmLCBzLnBlbmRpbmcgLSBiZWcsIGJlZyk7CiAgICAgICAgfQogICAgICAgIGlmIChzLmd6aW5kZXggPT09IHMuZ3poZWFkLmV4dHJhLmxlbmd0aCkgewogICAgICAgICAgcy5nemluZGV4ID0gMDsKICAgICAgICAgIHMuc3RhdHVzID0gTkFNRV9TVEFURTsKICAgICAgICB9CiAgICAgIH0KICAgICAgZWxzZSB7CiAgICAgICAgcy5zdGF0dXMgPSBOQU1FX1NUQVRFOwogICAgICB9CiAgICB9CiAgICBpZiAocy5zdGF0dXMgPT09IE5BTUVfU1RBVEUpIHsKICAgICAgaWYgKHMuZ3poZWFkLm5hbWUvKiAhPSBaX05VTEwqLykgewogICAgICAgIGJlZyA9IHMucGVuZGluZzsgIC8qIHN0YXJ0IG9mIGJ5dGVzIHRvIHVwZGF0ZSBjcmMgKi8KICAgICAgICAvL2ludCB2YWw7CgogICAgICAgIGRvIHsKICAgICAgICAgIGlmIChzLnBlbmRpbmcgPT09IHMucGVuZGluZ19idWZfc2l6ZSkgewogICAgICAgICAgICBpZiAocy5nemhlYWQuaGNyYyAmJiBzLnBlbmRpbmcgPiBiZWcpIHsKICAgICAgICAgICAgICBzdHJtLmFkbGVyID0gY3JjMzJfMShzdHJtLmFkbGVyLCBzLnBlbmRpbmdfYnVmLCBzLnBlbmRpbmcgLSBiZWcsIGJlZyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZmx1c2hfcGVuZGluZyhzdHJtKTsKICAgICAgICAgICAgYmVnID0gcy5wZW5kaW5nOwogICAgICAgICAgICBpZiAocy5wZW5kaW5nID09PSBzLnBlbmRpbmdfYnVmX3NpemUpIHsKICAgICAgICAgICAgICB2YWwgPSAxOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICAvLyBKUyBzcGVjaWZpYzogbGl0dGxlIG1hZ2ljIHRvIGFkZCB6ZXJvIHRlcm1pbmF0b3IgdG8gZW5kIG9mIHN0cmluZwogICAgICAgICAgaWYgKHMuZ3ppbmRleCA8IHMuZ3poZWFkLm5hbWUubGVuZ3RoKSB7CiAgICAgICAgICAgIHZhbCA9IHMuZ3poZWFkLm5hbWUuY2hhckNvZGVBdChzLmd6aW5kZXgrKykgJiAweGZmOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdmFsID0gMDsKICAgICAgICAgIH0KICAgICAgICAgIHB1dF9ieXRlKHMsIHZhbCk7CiAgICAgICAgfSB3aGlsZSAodmFsICE9PSAwKTsKCiAgICAgICAgaWYgKHMuZ3poZWFkLmhjcmMgJiYgcy5wZW5kaW5nID4gYmVnKSB7CiAgICAgICAgICBzdHJtLmFkbGVyID0gY3JjMzJfMShzdHJtLmFkbGVyLCBzLnBlbmRpbmdfYnVmLCBzLnBlbmRpbmcgLSBiZWcsIGJlZyk7CiAgICAgICAgfQogICAgICAgIGlmICh2YWwgPT09IDApIHsKICAgICAgICAgIHMuZ3ppbmRleCA9IDA7CiAgICAgICAgICBzLnN0YXR1cyA9IENPTU1FTlRfU1RBVEU7CiAgICAgICAgfQogICAgICB9CiAgICAgIGVsc2UgewogICAgICAgIHMuc3RhdHVzID0gQ09NTUVOVF9TVEFURTsKICAgICAgfQogICAgfQogICAgaWYgKHMuc3RhdHVzID09PSBDT01NRU5UX1NUQVRFKSB7CiAgICAgIGlmIChzLmd6aGVhZC5jb21tZW50LyogIT0gWl9OVUxMKi8pIHsKICAgICAgICBiZWcgPSBzLnBlbmRpbmc7ICAvKiBzdGFydCBvZiBieXRlcyB0byB1cGRhdGUgY3JjICovCiAgICAgICAgLy9pbnQgdmFsOwoKICAgICAgICBkbyB7CiAgICAgICAgICBpZiAocy5wZW5kaW5nID09PSBzLnBlbmRpbmdfYnVmX3NpemUpIHsKICAgICAgICAgICAgaWYgKHMuZ3poZWFkLmhjcmMgJiYgcy5wZW5kaW5nID4gYmVnKSB7CiAgICAgICAgICAgICAgc3RybS5hZGxlciA9IGNyYzMyXzEoc3RybS5hZGxlciwgcy5wZW5kaW5nX2J1Ziwgcy5wZW5kaW5nIC0gYmVnLCBiZWcpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZsdXNoX3BlbmRpbmcoc3RybSk7CiAgICAgICAgICAgIGJlZyA9IHMucGVuZGluZzsKICAgICAgICAgICAgaWYgKHMucGVuZGluZyA9PT0gcy5wZW5kaW5nX2J1Zl9zaXplKSB7CiAgICAgICAgICAgICAgdmFsID0gMTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgLy8gSlMgc3BlY2lmaWM6IGxpdHRsZSBtYWdpYyB0byBhZGQgemVybyB0ZXJtaW5hdG9yIHRvIGVuZCBvZiBzdHJpbmcKICAgICAgICAgIGlmIChzLmd6aW5kZXggPCBzLmd6aGVhZC5jb21tZW50Lmxlbmd0aCkgewogICAgICAgICAgICB2YWwgPSBzLmd6aGVhZC5jb21tZW50LmNoYXJDb2RlQXQocy5nemluZGV4KyspICYgMHhmZjsKICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIHZhbCA9IDA7CiAgICAgICAgICB9CiAgICAgICAgICBwdXRfYnl0ZShzLCB2YWwpOwogICAgICAgIH0gd2hpbGUgKHZhbCAhPT0gMCk7CgogICAgICAgIGlmIChzLmd6aGVhZC5oY3JjICYmIHMucGVuZGluZyA+IGJlZykgewogICAgICAgICAgc3RybS5hZGxlciA9IGNyYzMyXzEoc3RybS5hZGxlciwgcy5wZW5kaW5nX2J1Ziwgcy5wZW5kaW5nIC0gYmVnLCBiZWcpOwogICAgICAgIH0KICAgICAgICBpZiAodmFsID09PSAwKSB7CiAgICAgICAgICBzLnN0YXR1cyA9IEhDUkNfU1RBVEU7CiAgICAgICAgfQogICAgICB9CiAgICAgIGVsc2UgewogICAgICAgIHMuc3RhdHVzID0gSENSQ19TVEFURTsKICAgICAgfQogICAgfQogICAgaWYgKHMuc3RhdHVzID09PSBIQ1JDX1NUQVRFKSB7CiAgICAgIG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ciBhIHZlcnkgc21hbGwgb3V0cHV0IGJ1ZmZlciwgd2UgZW1pdCBhdCBtb3N0CiAgICAgICAgICogb25lIGVtcHR5IGJsb2NrLgogICAgICAgICAqLwogICAgICB9CiAgICAgIGlmIChic3RhdGUgPT09IEJTX0JMT0NLX0RPTkUpIHsKICAgICAgICBpZiAoZmx1c2ggPT09IFpfUEFSVElBTF9GTFVTSCkgewogICAgICAgICAgX3RyX2FsaWduKHMpOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChmbHVzaCAhPT0gWl9CTE9DSyQxKSB7IC8qIEZVTExfRkxVU0ggb3IgU1lOQ19GTFVTSCAqLwoKICAgICAgICAgIF90cl9zdG9yZWRfYmxvY2socywgMCwgMCwgZmFsc2UpOwogICAgICAgICAgLyogRm9yIGEgZnVsbCBmbHVzaCwgdGhpcyBlbXB0eSBibG9jayB3aWxsIGJlIHJlY29nbml6ZWQKICAgICAgICAgICAqIGFzIGEgc3BlY2lhbCBtYXJrZXIgYnkgaW5mbGF0ZV9zeW5jKCkuCiAgICAgICAgICAgKi8KICAgICAgICAgIGlmIChmbHVzaCA9PT0gWl9GVUxMX0ZMVVNIJDEpIHsKICAgICAgICAgICAgLyoqKiBDTEVBUl9IQVNIKHMpOyAqKiovICAgICAgICAgICAgIC8qIGZvcmdldCBoaXN0b3J5ICovCiAgICAgICAgICAgIHplcm8ocy5oZWFkKTsgLy8gRmlsbCB3aXRoIE5JTCAoPSAwKTsKCiAgICAgICAgICAgIGlmIChzLmxvb2thaGVhZCA9PT0gMCkgewogICAgICAgICAgICAgIHMuc3Ryc3RhcnQgPSAwOwogICAgICAgICAgICAgIHMuYmxvY2tfc3RhcnQgPSAwOwogICAgICAgICAgICAgIHMuaW5zZXJ0ID0gMDsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBmbHVzaF9wZW5kaW5nKHN0cm0pOwogICAgICAgIGlmIChzdHJtLmF2YWlsX291dCA9PT0gMCkgewogICAgICAgICA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KykgewogICAgICBjID0gc3RyLmNoYXJDb2RlQXQobV9wb3MpOwogICAgICBpZiAoKGMgJiAweGZjMDApID09PSAweGQ4MDAgJiYgKG1fcG9zICsgMSA8IHN0cl9sZW4pKSB7CiAgICAgICAgYzIgPSBzdHIuY2hhckNvZGVBdChtX3BvcyArIDEpOwogICAgICAgIGlmICgoYzIgJiAweGZjMDApID09PSAweGRjMDApIHsKICAgICAgICAgIGMgPSAweDEwMDAwICsgKChjIC0gMHhkODAwKSA8PCAxMCkgKyAoYzIgLSAweGRjMDApOwogICAgICAgICAgbV9wb3MrKzsKICAgICAgICB9CiAgICAgIH0KICAgICAgYnVmX2xlbiArPSBjIDwgMHg4MCA/IDEgOiBjIDwgMHg4MDAgPyAyIDogYyA8IDB4MTAwMDAgPyAzIDogNDsKICAgIH0KCiAgICAvLyBhbGxvY2F0ZSBidWZmZXIKICAgIGJ1ZiA9IG5ldyBVaW50OEFycmF5KGJ1Zl9sZW4pOwoKICAgIC8vIGNvbnZlcnQKICAgIGZvciAoaSA9IDAsIG1fcG9zID0gMDsgaSA8IGJ1Zl9sZW47IG1fcG9zKyspIHsKICAgICAgYyA9IHN0ci5jaGFyQ29kZUF0KG1fcG9zKTsKICAgICAgaWYgKChjICYgMHhmYzAwKSA9PT0gMHhkODAwICYmIChtX3BvcyArIDEgPCBzdHJfbGVuKSkgewogICAgICAgIGMyID0gc3RyLmNoYXJDb2RlQXQobV9wb3MgKyAxKTsKICAgICAgICBpZiAoKGMyICYgMHhmYzAwKSA9PT0gMHhkYzAwKSB7CiAgICAgICAgICBjID0gMHgxMDAwMCArICgoYyAtIDB4ZDgwMCkgPDwgMTApICsgKGMyIC0gMHhkYzAwKTsKICAgICAgICAgIG1fcG9zKys7CiAgICAgICAgfQogICAgICB9CiAgICAgIGlmIChjIDwgMHg4MCkgewogICAgICAgIC8qIG9uZSBieXRlICovCiAgICAgICAgYnVmW2krK10gPSBjOwogICAgICB9IGVsc2UgaWYgKGMgPCAweDgwMCkgewog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RvdGFsX291dCA9IDA7CiAgICAvKiBsYXN0IGVycm9yIG1lc3NhZ2UsIE5VTEwgaWYgbm8gZXJyb3IgKi8KICAgIHRoaXMubXNnID0gJycvKlpfTlVMTCovOwogICAgLyogbm90IHZpc2libGUgYnkgYXBwbGljYXRpb25zICovCiAgICB0aGlzLnN0YXRlID0gbnVsbDsKICAgIC8qIGJlc3QgZ3Vlc3MgYWJvdXQgdGhlIGRhdGEgdHlwZTogYmluYXJ5IG9yIHRleHQgKi8KICAgIHRoaXMuZGF0YV90eXBlID0gMi8qWl9VTktOT1dOKi87CiAgICAvKiBhZGxlcjMyIHZhbHVlIG9mIHRoZSB1bmNvbXByZXNzZWQgZGF0YSAqLwogICAgdGhpcy5hZGxlciA9IDA7CiAgfQoKICB2YXIgenN0cmVhbSA9IFpTdHJlYW07CgogIGNvbnN0IHRvU3RyaW5nJDEgPSBPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nOwoKICAvKiBQdWJsaWMgY29uc3RhbnRzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCgogIGNvbnN0IHsKICAgIFpfTk9fRkxVU0g6IFpfTk9fRkxVU0gkMSwgWl9TWU5DX0ZMVVNILCBaX0ZVTExfRkxVU0gsIFpfRklOSVNIOiBaX0ZJTklTSCQyLAogICAgWl9PSzogWl9PSyQyLCBaX1NUUkVBTV9FTkQ6IFpfU1RSRUFNX0VORCQyLAogICAgWl9ERUZBVUxUX0NPTVBSRVNTSU9OLAogICAgWl9ERUZBVUxUX1NUUkFURUdZLAogICAgWl9ERUZMQVRFRDogWl9ERUZMQVRFRCQxCiAgfSA9IGNvbnN0YW50cyQyOwoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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H0KICAgKgogICAqIGNvbnNvbGUubG9nKGRlZmxhdGUucmVzdWx0KTsKICAgKiBgYGAKICAgKiovCiAgZnVuY3Rpb24gRGVmbGF0ZSQxKG9wdGlvbnMpIHsKICAgIHRoaXMub3B0aW9ucyA9IGNvbW1vbi5hc3NpZ24oewogICAgICBsZXZlbDogWl9ERUZBVUxUX0NPTVBSRVNTSU9OLAogICAgICBtZXRob2Q6IFpfREVGTEFURUQkMSwKICAgICAgY2h1bmtTaXplOiAxNjM4NCwKICAgICAgd2luZG93Qml0czogMTUsCiAgICAgIG1lbUxldmVsOiA4LAogICAgICBzdHJhdGVneTogWl9ERUZBVUxUX1NUUkFURUdZCiAgICB9LCBvcHRpb25zIHx8IHt9KTsKCiAgICBsZXQgb3B0ID0gdGhpcy5vcHRpb25zOwoKICAgIGlmIChvcHQucmF3ICYmIChvcHQud2luZG93Qml0cyA+IDApKSB7CiAgICAgIG9wdC53aW5kb3dCaXRzID0gLW9wdC53aW5kb3dCaXRzOwogICAgfQoKICAgIGVsc2UgaWYgKG9wdC5nemlwICYmIChvcHQud2luZG93Qml0cyA+IDApICYmIChvcHQud2luZG93Qml0cyA8IDE2KSkgewogICAgICBvcHQud2luZG93Qml0cyArPSAxNjsKICAgIH0KCiAgICB0aGlzLmVyciAgICA9IDA7ICAgICAgLy8gZXJyb3IgY29kZSwgaWYgaGFwcGVucyAoMCA9IFpfT0spCiAgICB0aGlzLm1zZyAgICA9ICcnOyAgICAgLy8gZXJyb3IgbWVzc2FnZQogICAgdGhpcy5lbmRlZCAgPSBmYWxzZTsgIC8vIHVzZWQgdG8gYXZvaWQgbXVsdGlwbGUgb25FbmQoKSBjYWxscwogICAgdGhpcy5jaHVua3MgPSBbXTsgICAgIC8vIGNodW5rcyBvZiBjb21wcmVzc2VkIGRhdGEKCiAgICB0aGlzLnN0cm0gPSBuZXcgenN0cmVhbSgpOwogICAgdGhpcy5zdHJtLmF2YWlsX291dCA9IDA7CgogICAgbGV0IHN0YXR1cyA9I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0KHN0cm0sIHN0YXJ0KSB7CiAgICBsZXQgX2luOyAgICAgICAgICAgICAgICAgICAgLyogbG9jYWwgc3RybS5pbnB1dCAqLwogICAgbGV0IGxhc3Q7ICAgICAgICAgICAgICAgICAgIC8qIGhhdmUgZW5vdWdoIGlucHV0IHdoaWxlIGluIDwgbGFzdCAqLwogICAgbGV0IF9vdXQ7ICAgICAgICAgICAgICAgICAgIC8qIGxvY2FsIHN0cm0ub3V0cHV0ICovCiAgICBsZXQgYmVnOyAgICAgICAgICAgICAgICAgICAgLyogaW5mbGF0ZSgpJ3MgaW5pdGlhbCBzdHJtLm91dHB1dCAqLwogICAgbGV0IGVuZDsgICAgICAgICAgICAgICAgICAgIC8qIHdoaWxlIG91dCA8IGVuZCwgZW5vdWdoIHNwYWNlIGF2YWlsYWJsZSAqLwogIC8vI2lmZGVmIElORkxBVEVfU1RSSUNUCiAgICBsZXQgZG1heDsgICAgICAgICAgICAgICAgICAgLyogbWF4aW11bSBkaXN0YW5jZSBmcm9tIHpsaWIgaGVhZGVyICovCiAgLy8jZW5kaWYKICAgIGxldCB3c2l6ZTsgICAgICAgICAgICAgICAgICAvKiB3aW5kb3cgc2l6ZSBvciB6ZXJvIGlmIG5vdCB1c2luZyB3aW5kb3cgKi8KICAgIGxldCB3aGF2ZTsgICAgICAgICAgICAgICAgICAvKiB2YWxpZCBieXRlcyBpbiB0aGUgd2luZG93ICovCiAgICBsZXQgd25leHQ7ICAgICAgICAgICAgICAgICAgLyogd2luZG93IHdyaXRlIGluZGV4ICovCiAgICAvLyBVc2UgYHNfd2luZG93YCBpbnN0ZWFkIGB3aW5kb3dgLCBhdm9pZCBjb25mbGljdCB3aXRoIGluc3RydW1lbnRhdGlvbiB0b29scwogICAgbGV0IHNfd2luZG93OyAgICAgICAgICAgICAgIC8qIGFsbG9jYXRlZCBzbGlkaW5nIHdpbmRvdywgaWYgd3NpemUgIT0gMCAqLwogICAgbGV0IGhvbGQ7ICAgICAgICAgICAgICAgICAgIC8qIGxvY2FsIHN0cm0uaG9sZCAqLwogICAgbGV0IGJpdHM7ICAgICAgICAgICAgICAgICAgIC8qIGxvY2FsIHN0cm0uYml0cyAqLwogICAgbGV0IGxjb2RlOyAgICAgICAgICAgICAgICAgIC8qIGxvY2FsIHN0cm0ubGVuY29kZSAqLwogICAgbGV0IGRjb2RlOyAgICAgICAgICAgICAgICAgIC8qIGxvY2FsIHN0cm0uZGlzdGNvZGUgKi8KICAgIGxldCBsbWFzazsgICAgICAgICAgICAgICAgICAvKiBtYXNrIGZvciBmaXJzdCBsZXZlbCBvZiBsZW5ndGggY29kZXMgKi8KICAgIGxldCBkbWFzazsgICAgICAgICAgICAgICAgICAvKiBtYXNrIGZvciBmaXJzdCBsZXZlbCBvZiBkaXN0YW5jZSBjb2RlcyAqLwogICAgbGV0IGhlcmU7ICAgICAgICAgICAgICAgICAgIC8qIHJldHJpZXZlZCB0YWJsZSBlbnRyeSAqLwogICAgbGV0IG9wOyAgICAgICAgICAgICAgICAgICAgIC8qIGNvZGUgYml0cywgb3BlcmF0aW9uLCBleHRyYSBiaXRzLCBvciAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qICB3aW5kb3cgcG9zaXRpb24sIHdpbmRvdyBieXRlcyB0byBjb3B5ICovCiAgICBsZXQgbGVuOyAgICAgICAgICAgICAgICAgICAgLyogbWF0Y2ggbGVuZ3RoLCB1bnVzZWQgYnl0ZXMgKi8KICAgIGxldCBkaXN0OyAgICAgICAgICAgICAgICAgICAvKiBtYXRjaCBkaXN0YW5jZSAqLwogICAgbGV0IGZyb207ICAgICAgICAgICAgICAgICAgIC8qIHdoZXJlIHRvIGNvcHkgbWF0Y2ggZnJvbSAqLwogICAgbGV0IGZyb21fc291cmNlOwoKCiAgICBsZXQgaW5wdXQsIG91dHB1dDsgLy8gSlMgc3BlY2lmaWMsIGJlY2F1c2Ugd2UgaGF2ZSBubyBwb2ludGVycwoKICAgIC8qIGNvcHkgc3RhdGUgdG8gbG9jYWw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gICAgICBiaXRzICs9IDg7CiAgICAgICAgaG9sZCArPSBpbnB1dFtfaW4rK10gPDwgYml0czsKICAgICAgICBiaXRzICs9IDg7CiAgICAgIH0KCiAgICAgIGhlcmUgPSBsY29kZVtob2xkICYgbG1hc2tdOwoKICAgICAgZG9sZW46CiAgICAgIGZvciAoOzspIHsgLy8gR290byBlbXVsYXRpb24KICAgICAgICBvcCA9IGhlcmUgPj4+IDI0LypoZXJlLmJpdHMqLzsKICAgICAgICBob2xkID4+Pj0gb3A7CiAgICAgICAgYml0cyAtPSBvcDsKICAgICAgICBvcCA9IChoZXJlID4+PiAxNikgJiAweGZmLypoZXJlLm9wKi87CiAgICAgICAgaWYgKG9wID09PSAwKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBsaXRlcmFsICovCiAgICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwgaGVyZS52YWwgPj0gMHgyMCAmJiBoZXJlLnZhbCA8IDB4N2YgPwogICAgICAgICAgLy8gICAgICAgICJpbmZsYXRlOiAgICAgICAgIGxpdGVyYWwgJyVjJ1xuIiA6CiAgICAgICAgICAvLyAgICAgICAgImluZmxhdGU6ICAgICAgICAgbGl0ZXJhbCAweCUwMnhcbiIsIGhlcmUudmFsKSk7CiAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IGhlcmUgJiAweGZmZmYvKmhlcmUudmFsKi87CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYgKG9wICYgMTYpIHsgICAgICAgICAgICAgICAgICAgICAvKiBsZW5ndGggYmFzZSAqLwogICAgICAgICAgbGVuID0gaGVyZSAmIDB4ZmZmZi8qaGVyZS52YWwqLzsKICAgICAgICAgIG9wICY9IDE1OyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBleHRyYSBiaXRzICovCiAgICAgICAgICBpZiAob3ApIHsKICAgICAgICAgICAgaWYgKGJpdHMgPCBvcCkgewogICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbX2luKytdIDw8IGJpdHM7CiAgICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGxlbiArPSBob2xkICYgKCgxIDw8IG9wKSAtIDEpOwogICAgICAgICAgICBob2xkID4+Pj0gb3A7CiAgICAgICAgICAgIGJpdHMgLT0gb3A7CiAgICAgICAgICB9CiAgICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwgImluZmxhdGU6ICAgICAgICAgbGVuZ3RoICV1XG4iLCBsZW4pKTsKICAgICAgICAgIGlmIChiaXRzIDwgMTUpIHsKICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtfaW4rK10gPDwgYml0czsKICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgICBob2xkICs9IGlucHV0W19pbisrXSA8PCBiaXRzOwogICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICB9CiAgICAgICAgICBoZXJlID0gZGNvZGVbaG9sZCAmIGRtYXNrXTsKCiAgICAgICAgICBkb2Rpc3Q6CiAgICAgICAgICBmb3IgKDs7KSB7IC8vIGdvdG8gZW11bGF0aW9uCiAgICAgICAgICAgIG9wID0gaGVyZSA+Pj4gMjQvKmhlcmUuYml0cyovOwogICAgICAgICAgICBob2xkID4+Pj0gb3A7CiAgICAgICAgICAgIGJpdHMgLT0gb3A7CiAgICAgICAgICAgIG9wID0gKGhlcmUgPj4+IDE2KSAmIDB4ZmYvKmhlcmUub3AqLzsKCiAgICAgICAgICAgIGlmIChvcCAmIDE2KSB7ICAgICAgICAgICAgICAgICAgICAgIC8qIGRpc3RhbmNlIGJhc2UgKi8KICAgICAgICAgICAgICBkaXN0ID0gaGVyZSAmIDB4ZmZmZi8qaGVyZS52YWwqLzsKICAgICAgICAgICAgICBvcCAmPSAxNTsgICAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBleHRyYSBiaXRzICovCiAgICAgICAgICAgICAgaWYgKGJpdHMgPCBvcCkgewogICAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtfaW4rK10gPDwgYml0czsKICAgICAgICAgICAgICAgIGJpdHMgKz0gODsKICAgICAgICAgICAgICAgIGlmIChiaXRzIDwgb3ApIHsKICAgICAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtfaW4rK10gPDwgYml0czsKICAgICAgICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBkaXN0ICs9IGhvbGQgJiAoKDEgPDwgb3ApIC0gMSk7CiAgLy8jaWZkZWYgSU5GTEFURV9TVFJJQ1QKICAgICAgICAgICAgICBpZiAoZGlzdCA+IGRtYXgpIHsKICAgICAgICAgICAgICAgIHN0cm0ubXNnID0gJ2ludmFsaWQgZGlzdGFuY2UgdG9vIGZhciBiYWNrJzsKICAgICAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQkMTsKICAgICAgICAgICAgICAgIGJyZWFrIHRvcDsKICAgICAgICAgICAgICB9CiAgLy8jZW5kaWYKICAgICAgICAgICAgICBob2xkID4+Pj0gb3A7CiAgICAgICAgICAgICAgYml0cyAtPSBvcDsKICAgICAgICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwgImluZmxhdGU6ICAgICAgICAgZGlzdGFuY2UgJXVcbiIsIGRpc3QpKTsKICAgICAgICAgICAgICBvcCA9IF9vdXQgLSBiZWc7ICAgICAgICAgICAgICAgIC8qIG1heCBkaXN0YW5jZSBpbiBvdXRwdXQgKi8KICAgICAgICAgICAgICBpZiAoZGlzdCA+IG9wKSB7ICAgICAgICAgICAgICAgIC8qIHNlZSBpZiBjb3B5IGZyb20gd2luZG93ICovCiAgICAgICAgICAgICAgICBvcCA9IGRpc3QgLSBvcDsgICAgICAgICAgICAgICAvKiBkaXN0YW5jZSBiYWNrIGluIHdpbmRvdyAqLwogICAgICAgICAgICAgICAgaWYgKG9wID4gd2hhdmUpIHsKICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLnNhbmUpIHsKICAgICAgICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFjayc7CiAgICAgICAgICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRCQxOwogICAgICAgICAgICAgICAgICAgIGJyZWFrIHRvcDsKICAgICAgICAgICAgICAgICAgfQoKICAvLyAoISkgVGhpcyBibG9jayBpcyBkaXNhYmxlZCBpbiB6bGliIGRlZmF1bHRzLAogIC8vIGRvbid0IGVuYWJsZSBpdCBmb3IgYmluYXJ5IGNvbXBhdGliaWxpdHkKICAvLyNpZmRlZiBJTkZMQVRFX0FMTE9XX0lOVkFMSURfRElTVEFOQ0VfVE9PRkFSX0FSUlIKICAvLyAgICAgICAgICAgICAgICBpZiAobGVuIDw9IG9wIC0gd2hhdmUpIHsKICAvLyAgICAgICAgICAgICAgICAgIGRvIHsKICAvLyAgICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSAwOwogIC8vICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoLS1sZW4pOwogIC8vICAgICAgICAgICAgICAgICAgY29udGludWUgdG9wOwogIC8vICAgICAgICAgICAgICAgIH0KICAvLyAgICAgICAgICAgICAgICBsZW4gLT0gb3AgLSB3aGF2ZTsKICAvLyAgICAgICAgICAgICAgICBkbyB7CiAgLy8gICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IDA7CiAgLy8gICAgICAgICAgICAgICAgfSB3aGlsZSAoLS1vcCA+IHdoYXZlKTsKICAvLyAgICAgICAgICAgICAgICBpZiAob3AgPT09IDApIHsKICAvLyAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDsKICAvLyAgICAgICAgICAgICAgICAgIGRvIHsKICAvLyAgICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBvdXRwdXRbZnJvbSsrXTsKICAvLyAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKC0tbGVuKTsKICAvLyAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIHRvcDsKICAvLyAgICAgICAgICAgICAgICB9CiAgLy8jZW5kaWYKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZyb20gPSAwOyAvLyB3aW5kb3cgaW5kZXgKICAgICAgICAgICAgICAgIGZyb21fc291cmNlID0gc193aW5kb3c7CiAgICAgICAgICAgICAgICBpZiAod25leHQgPT09IDApIHsgICAgICAgICAgIC8qIHZlcnkgY29tbW9uIGNhc2UgKi8KICAgICAgICAgICAgICAgICAgZnJvbSArPSB3c2l6ZSAtIG9wOwogICAgICAgICAgICAgICAgICBpZiAob3AgPCBsZW4pIHsgICAgICAgICAvKiBzb21lIGZyb20gd2luZG93ICovCiAgICAgICAgICAgICAgICAgICAgbGVuIC09IG9wOwogICAgICAgICAgICAgICAgICAgIGRvIHsKICAgICAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gc193aW5kb3dbZnJvbSsrXTsKICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wKTsKICAgICAgICAgICAgICAgICAgICBmcm9tID0gX291dCAtIGRpc3Q7ICAvKiByZXN0IGZyb20gb3V0cHV0ICovCiAgICAgICAgICAgICAgICAgICAgZnJvbV9zb3VyY2UgPSBvdXRwdXQ7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKHduZXh0IDwgb3ApIHsgICAgICAvKiB3cmFwIGFyb3VuZCB3aW5kb3cgKi8KICAgICAgICAgICAgICAgICAgZnJvbSArPSB3c2l6ZSArIHduZXh0IC0gb3A7CiAgICAgICAgICAgICAgICAgIG9wIC09IHduZXh0OwogICAgICAgICAgICAgICAgICBpZiAob3AgPCBsZW4pIHsgICAgICAgICAvKiBzb21lIGZyb20gZW5kIG9mIHdpbmRvdyAqLwogICAgICAgICAgICAgICAgICAgIGxlbiAtPSBvcDsKICAgICAgICAgICAgICAgICAgICBkbyB7CiAgICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IHNfd2luZG93W2Zyb20rK107CiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoLS1vcCk7CiAgICAgICAgICAgICAgICAgICAgZnJvbSA9IDA7CiAgICAgICAgICAgICAgICAgICAgaWYgKHduZXh0IDwgbGVuKSB7ICAvKiBzb21lIGZyb20gc3RhcnQgb2Ygd2luZG93ICovCiAgICAgICAgICAgICAgICAgICAgICBvcCA9IHduZXh0OwogICAgICAgICAgICAgICAgICAgICAgbGVuIC09IG9wOwogICAgICAgICAgICAgICAgICAgICAgZG8gewogICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IHNfd2luZG93W2Zyb20rK107CiAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgtLW9wKTsKICAgICAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDsgICAgICAvKiByZXN0IGZyb20gb3V0cHV0ICovCiAgICAgICAgICAgICAgICAgICAgICBmcm9tX3NvdXJjZSA9IG91dHB1dDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgeyAgICAgICAgICAgICAgICAgICAgICAvKiBjb250aWd1b3VzIGluIHdpbmRvdyAqLwogICAgICAgICAgICAgICAgICBmcm9tICs9IHduZXh0IC0gb3A7CiAgICAgICAgICAgICAgICAgIGlmIChvcCA8IGxlbikgeyAgICAgICAgIC8qIHNvbWUgZnJvbSB3aW5kb3cgKi8KICAgICAgICAgICAgICAgICAgICBsZW4gLT0gb3A7CiAgICAgICAgICAgICAgICAgICAgZG8gewogICAgICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBzX3dpbmRvd1tmcm9tKytdOwogICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKC0tb3ApOwogICAgICAgICAgICAgICAgICAgIGZyb20gPSBfb3V0IC0gZGlzdDsgIC8qIHJlc3QgZnJvbSBvdXRwdXQgKi8KICAgICAgICAgICAgICAgICAgICBmcm9tX3NvdXJjZSA9IG91dHB1dDsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgd2hpbGUgKGxlbiA+IDIpIHsKICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBmcm9tX3NvdXJjZVtmcm9tKytdOwogICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IGZyb21fc291cmNlW2Zyb20rK107CiAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gZnJvbV9zb3VyY2VbZnJvbSsrXTsKICAgICAgICAgICAgICAgICAgbGVuIC09IDM7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobGVuKSB7CiAgICAgICAgICAgICAgICAgIG91dHB1dFtfb3V0KytdID0gZnJvbV9zb3VyY2VbZnJvbSsrXTsKICAgICAgICAgICAgICAgICAgaWYgKGxlbiA+IDEpIHsKICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IGZyb21fc291cmNlW2Zyb20rK107CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBmcm9tID0gX291dCAtIGRpc3Q7ICAgICAgICAgIC8qIGNvcHkgZGlyZWN0IGZyb20gb3V0cHV0ICovCiAgICAgICAgICAgICAgICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgLyogbWluaW11bSBsZW5ndGggaXMgdGhyZWUgKi8KICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBvdXRwdXRbZnJvbSsrXTsKICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBvdXRwdXRbZnJvbSsrXTsKICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBvdXRwdXRbZnJvbSsrXTsKICAgICAgICAgICAgICAgICAgbGVuIC09IDM7CiAgICAgICAgICAgICAgICB9IHdoaWxlIChsZW4gPiAyKTsKICAgICAgICAgICAgICAgIGlmIChsZW4pIHsKICAgICAgICAgICAgICAgICAgb3V0cHV0W19vdXQrK10gPSBvdXRwdXRbZnJvbSsrXTsKICAgICAgICAgICAgICAgICAgaWYgKGxlbiA+IDEpIHsKICAgICAgICAgICAgICAgICAgICBvdXRwdXRbX291dCsrXSA9IG91dHB1dFtmcm9tKytdOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKChvcCAmIDY0KSA9PT0gMCkgeyAgICAgICAgICAvKiAybmQgbGV2ZWwgZGlzdGFuY2UgY29kZSAqLwogICAgICAgICAgICAgIGhlcmUgPSBkY29kZVsoaGVyZSAmIDB4ZmZmZikvKmhlcmUudmFsKi8gKyAoaG9sZCAmICgoMSA8PCBvcCkgLSAxKSldOwogICAgICAgICAgICAgIGNvbnRpbnVlIGRvZGlzdDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGRpc3RhbmNlIGNvZGUnOwogICAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQkMTsKICAgICAgICAgICAgICBicmVhayB0b3A7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGJyZWFrOyAvLyBuZWVkIHRvIGVtdWxhdGUgZ290byB2aWEgImNvbnRpbnVlIgogICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBlbHNlIGlmICgob3AgJiA2NCkgPT09IDApIHsgICAgICAgICAgICAgIC8qIDJuZCBsZXZlbCBsZW5ndGggY29kZSAqLwogICAgICAgICAgaGVyZSA9IGxjb2RlWyhoZXJlICYgMHhmZmZmKS8qaGVyZS52YWwqLyArIChob2xkICYgKCgxIDw8IG9wKSAtIDEpKV07CiAgICAgICAgICBjb250aW51ZSBkb2xlbjsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAob3AgJiAzMikgeyAgICAgICAgICAgICAgICAgICAgIC8qIGVuZC1vZi1ibG9jayAqLwogICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgICAgIGVuZCBvZiBibG9ja1xuIikpOwogICAgICAgICAgc3RhdGUubW9kZSA9IFRZUEUkMTsKICAgICAgICAgIGJyZWFrIHRvcDsKICAgICAgICB9CiAgICAgICAgZWxzZSB7CiAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGxpdGVyYWwvbGVuZ3RoIGNvZGUnOwogICAgICAgICAgc3RhdGUubW9kZSA9IEJBRCQxOwogICAgICAgICAgYnJlYWsgdG9wOwogICAgICAgIH0KCiAgICAgICAgYnJlYWs7IC8vIG5lZWQgdG8gZW11bGF0ZSBnb3RvIHZpYSAiY29udGludWUiCiAgICAgIH0KICAgIH0gd2hpbGUgKF9pbiA8IGxhc3QgJiYgX291dCA8IGVuZCk7CgogICAgLyogcmV0dXJuIHVudXNlZCBieXRlcyAob24gZW50cnksIGJpdHMgPCA4LCBzbyBpbiB3b24ndCBnbyB0b28gZmFyIGJhY2spICovCiAgICBsZW4gPSBiaXRzID4+IDM7CiAgICBfaW4gLT0gbGVuOwogICAgYml0cyAtPSBsZW4gPDwgMzsKICAgIGhvbGQgJj0gKDEgPDwgYml0cykgLSAxOwoKICAgIC8qIHVwZGF0ZSBzdGF0ZSBhbmQgcmV0dXJuICovCiAgICBzdHJtLm5leHRfaW4gPSBfaW47CiAgICBzdHJtLm5leHRfb3V0ID0gX291dDsKICAgIHN0cm0uYXZhaWxfaW4gPSAoX2luIDwgbGFzdCA/IDUgKyAobGFzdCAtIF9pbikgOiA1IC0gKF9pbiAtIGxhc3QpKTsKICAgIHN0cm0uYXZhaWxfb3V0ID0gKF9vdXQgPCBlbmQgPyAyNTcgKyAoZW5kIC0gX291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ICBsZXQgbWluID0gMCwgbWF4ID0gMDsgICAgICAgICAgLyogbWluaW11bSBhbmQgbWF4aW11bSBjb2RlIGxlbmd0aHMgKi8KICAgIGxldCByb290ID0gMDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBpbmRleCBiaXRzIGZvciByb290IHRhYmxlICovCiAgICBsZXQgY3VyciA9IDA7ICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgaW5kZXggYml0cyBmb3IgY3VycmVudCB0YWJsZSAqLwogICAgbGV0IGRyb3AgPSAwOyAgICAgICAgICAgICAgLyogY29kZSBiaXRzIHRvIGRyb3AgZm9yIHN1Yi10YWJsZSAqLwogICAgbGV0IGxlZnQgPSAwOyAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgcHJlZml4IGNvZGVzIGF2YWlsYWJsZSAqLwogICAgbGV0IHVzZWQgPSAwOyAgICAgICAgICAgICAgLyogY29kZSBlbnRyaWVzIGluIHRhYmxlIHVzZWQgKi8KICAgIGxldCBodWZmID0gMDsgICAgICAgICAgICAgIC8qIEh1ZmZtYW4gY29kZSAqLwogICAgbGV0IGluY3I7ICAgICAgICAgICAgICAvKiBmb3IgaW5jcmVtZW50aW5nIGNvZGUsIGluZGV4ICovCiAgICBsZXQgZmlsbDsgICAgICAgICAgICAgIC8qIGluZGV4IGZvciByZXBsaWNhdGluZyBlbnRyaWVzICovCiAgICBsZXQgbG93OyAgICAgICAgICAgICAgIC8qIGxvdyBiaXRzIGZvciBjdXJyZW50IHJvb3QgZW50cnkgKi8KICAgIGxldCBtYXNrOyAgICAgICAgICAgICAgLyogbWFzayBmb3IgbG93IHJvb3QgYml0cyAqLwogICAgbGV0IG5leHQ7ICAgICAgICAgICAgIC8qIG5leHQgYXZhaWxhYmxlIHNwYWNlIGluIHRhYmxlICovCiAgICBsZXQgYmFzZSA9IG51bGw7ICAgICAvKiBiYXNlIHZhbHVlIHRhYmxlIHRvIHVzZSAqLwogICAgbGV0IGJhc2VfaW5kZXggPSAwO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ZSBkZWNvZGluZyB0YWJsZXMgd2l0aCBpbnZhbGlkIGNvZGUgbWFya2Vycy4KICAgICAqLwoKICAgIC8qIHNldCB1cCBmb3IgY29kZSB0eXBlICovCiAgICAvLyBwb29yIG1hbiBvcHRpbWl6YXRpb24gLSB1c2UgaWYtZWxzZSBpbnN0ZWFkIG9mIHN3aXRjaCwKICAgIC8vIHRvIGF2b2lkIGRlb3B0cyBpbiBvbGQgdjgKICAgIGlmICh0eXBlID09PSBDT0RFUyQxKSB7CiAgICAgIGJhc2UgPSBleHRyYSA9IHdvcms7ICAgIC8qIGR1bW15IHZhbHVlLS1ub3QgdXNlZCAqLwogICAgICBlbmQgPSAxOTsKCiAgICB9IGVsc2UgaWYgKHR5cGUgPT09IExFTlMkMSkgewogICAgICBiYXNlID0gbGJhc2U7CiAgICAgIGJhc2VfaW5kZXggLT0gMjU3OwogICAgICBleHRyYSA9IGxleHQ7CiAgICAgIGV4dHJhX2luZGV4IC09IDI1NzsKICAgICAgZW5kID0gMjU2OwoKICAgIH0gZWxzZSB7ICAgICAgICAgICAgICAgICAgICAvKiBESVNUUyAqLwogICAgICBiYXNlID0gZGJhc2U7CiAgICAgIGV4dHJhID0gZGV4dDsKICAgICAgZW5kID0gLTE7CiAgICB9CgogICAgLyogaW5pdGlhbGl6ZSBvcHRzIGZvciBsb29wICovCiAgICBodWZmID0gMDsgICAgICAgICAgICAgICAgICAgLyogc3RhcnRpbmcgY29kZSAqLwogICAgc3ltID0gMDsgICAgICAgICAgICAgICAgICAgIC8qIHN0YXJ0aW5nIGNvZGUgc3ltYm9sICovCiAgICBsZW4gPSBtaW47ICAgICAgICAgICAgICAgICAgLyogc3RhcnRpbmcgY29kZSBsZW5ndGggKi8KICAgIG5leHQgPSB0YWJsZV9pbmRleDsgICAgICAgICAgICAgIC8qIGN1cnJlbnQgdGFibGUgdG8gZmlsbCBpbiAqLwogICAgY3VyciA9IHJvb3Q7ICAgICAgICAgICAgICAgIC8qIGN1cnJlbnQgdGFibGUgaW5kZXggYml0cyAqLwogICAgZHJvcCA9IDA7ICAgICAgICAgICAgICAgICAgIC8qIGN1cnJlbnQgYml0cyB0byBkcm9wIGZyb20gY29kZSBmb3IgaW5kZXggKi8KICAgIGxvdyA9IC0xOyAgICAgICAgICAgICAgICAgICAvKiB0cmlnZ2VyIG5ldyBzdWItdGFibGUgd2hlbiBsZW4gPiByb290ICovCiAgICB1c2VkID0gMSA8PCByb290OyAgICAgICAgICAvKiB1c2Ugcm9vdCB0YWJsZSBlbnRyaWVzICovCiAgICBtYXNrID0gdXNlZCAtIDE7ICAgICAgICAgICAgLyogbWFzayBmb3IgY29tcGFyaW5nIGxvdyAqLwoKICAgIC8qIGNoZWNrIGF2YWlsYWJsZSB0YWJsZSBzcGFjZSAqLwogICAgaWYgKCh0eXBlID09PSBMRU5TJDEgJiYgdXNlZCA+IEVOT1VHSF9MRU5TJDEpIHx8CiAgICAgICh0eXBlID09PSBESVNUUyQxICYmIHVzZWQgPiBFTk9VR0hfRElTVFMkMSkpIHsKICAgICAgcmV0dXJuIDE7CiAgICB9CgogICAgLyogcHJvY2VzcyBhbGwgY29kZXMgYW5kIG1ha2UgdGFibGUgZW50cmllcyAqLwogICAgZm9yICg7OykgewogICAgICAvKiBjcmVhdGUgdGFibGUgZW50cnkgKi8KICAgICAgaGVyZV9iaXRzID0gbGVuIC0gZHJvcDsKICAgICAgaWYgKHdvcmtbc3ltXSA8IGVuZCkgewogICAgICAgIGhlcmVfb3AgPSAwOwogICAgICAgIGhlcmVfdmFsID0gd29ya1tzeW1dOwogICAgICB9CiAgICAgIGVsc2UgaWYgKHdvcmtbc3ltXSA+IGVuZCkgewogICAgICAgIGhlcmVfb3AgPSBleHRyYVtleHRyYV9pbmRleCArIHdvcmtbc3ltXV07CiAgICAgICAgaGVyZV92YWwgPSBiYXNlW2Jhc2VfaW5kZXggKyB3b3JrW3N5bV1dOwogICAgICB9CiAgICAgIGVsc2UgewogICAgICAgIGhlcmVfb3AgPSAzMiArIDY0OyAgICAgICAgIC8qIGVuZCBvZiBibG9jayAqLwogICAgICAgIGhlcmVfdmFsID0gMDsKICAgICAgfQoKICAgICAgLyogcmVwbGljYXRlIGZvciB0aG9zZSBpbmRpY2VzIHdpdGggbG93IGxlbiBiaXRzIGVxdWFsIHRvIGh1ZmYgKi8KICAgICAgaW5jciA9IDEgPDwgKGxlbiAtIGRyb3ApOwogICAgICBmaWxsID0gMSA8PCBjdXJyOwogICAgICBtaW4gPSBmaWxsOyAgICAgICAgICAgICAgICAgLyogc2F2ZSBvZmZzZXQgdG8gbmV4dCB0YWJsZSAqLwogICAgICBkbyB7CiAgICAgICAgZmlsbCAtPSBpbmNyOwogICAgICAgIHRhYmxlW25leHQgKyAoaHVmZiA+PiBkcm9wKSArIGZpbGxdID0gKGhlcmVfYml0cyA8PCAyNCkgfCAoaGVyZV9vcCA8PCAxNikgfCBoZXJlX3ZhbCB8MDsKICAgICAgfSB3aGlsZSAoZmlsbCAhPT0gMCk7CgogICAgICAvKiBiYWNrd2FyZHMgaW5jcmVtZW50IHRoZSBsZW4tYml0IGNvZGUgaHVmZiAqLwogICAgICBpbmNyID0gMSA8PCAobGVuIC0gMSk7CiAgICAgIHdoaWxlIChodWZmICYgaW5jcikgewogICAgICAgIGluY3IgPj49IDE7CiAgICAgIH0KICAgICAgaWYgKGluY3IgIT09IDApIHsKICAgICAgICBodWZmICY9IGluY3IgLSAxOwogICAgICAgIGh1ZmYgKz0gaW5jcjsKICAgICAgfSBlbHNlIHsKICAgICAgICBodWZmID0gMDsKICAgICAgfQoKICAgICAgLyogZ28gdG8gbmV4dCBzeW1ib2wsIHVwZGF0ZSBjb3VudCwgbGVuICovCiAgICAgIHN5bSsrOwogICAgICBpZiAoLS1jb3VudFtsZW5dID09PSAwKSB7CiAgICAgICAgaWYgKGxlbiA9PT0gbWF4KSB7IGJyZWFrOyB9CiAgICAgICAgbGVuID0gbGVuc1tsZW5zX2luZGV4ICsgd29ya1tzeW1dXTsKICAgICAgfQoKICAgICAgLyogY3JlYXRlIG5ldyBzdWItdGFibGUgaWYgbmVlZGVkICovCiAgICAgIGlmIChsZW4gPiByb290ICYmIChodWZmICYgbWFzaykgIT09IGxvdykgewogICAgICAgIC8qIGlmIGZpcnN0IHRpbWUsIHRyYW5zaXRpb24gdG8gc3ViLXRhYmxlcyAqLwogICAgICAgIGlmIChkcm9wID09PSAwKSB7CiAgICAgICAgICBkcm9wID0gcm9vdDsKICAgICAgICB9CgogICAgICAgIC8qIGluY3JlbWVudCBwYXN0IGxhc3QgdGFibGUgKi8KICAgICAgICBuZXh0ICs9IG1pbjsgICAgICAgICAgICAvKiBoZXJlIG1pbiBpcyAxIDw8IGN1cnIgKi8KCiAgICAgICAgLyogZGV0ZXJtaW5lIGxlbmd0aCBvZiBuZXh0IHRhYmxlICovCiAgICAgICAgY3VyciA9IGxlbiAtIGRyb3A7CiAgICAgICAgbGVmdCA9IDEgPDwgY3VycjsKICAgICAgICB3aGlsZSAoY3VyciArIGRyb3AgPCBtYXgpIHsKICAgICAgICAgIGxlZnQgLT0gY291bnRbY3VyciArIGRyb3BdOwogICAgICAgICAgaWYgKGxlZnQgPD0gMCkgeyBicmVhazsgfQogICAgICAgICAgY3VycisrOwogICAgICAgICAgbGVmdCA8PD0gMTsKICAgICAgICB9CgogICAgICAgIC8qIGNoZWNrIGZvciBlbm91Z2ggc3BhY2UgKi8KICAgICAgICB1c2VkICs9IDEgPDwgY3VycjsKICAgICAgICBpZiAoKHR5cGUgPT09IExFTlMkMSAmJiB1c2VkID4gRU5PVUdIX0xFTlMkMSkgfHwKICAgICAgICAgICh0eXBlID09PSBESVNUUyQxICYmIHVzZWQgPiBFTk9VR0hfRElTVFMkMSkpIHsKICAgICAgICAgIHJldHVybiAxOwogICAgICAgIH0KCiAgICAgICAgLyogcG9pbnQgZW50cnkgaW4gcm9vdCB0YWJsZSB0byBzdWItdGFibGUgKi8KICAgICAgICBsb3cgPSBodWZmICYgbWFzazsKICAgICAgICAvKnRhYmxlLm9w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JrZWQgYXMgc3VjaCwgYW5kIG11c3Qgbm90IGJlCiAgLy8gICBtaXNyZXByZXNlbnRlZCBhcyBiZWluZyB0aGUgb3JpZ2luYWwgc29mdHdhcmUuCiAgLy8gMy4gVGhpcyBub3RpY2UgbWF5IG5vdCBiZSByZW1vdmVkIG9yIGFsdGVyZWQgZnJvbSBhbnkgc291cmNlIGRpc3RyaWJ1dGlvbi4KCgoKCgoKICBjb25zdCBDT0RFUyA9IDA7CiAgY29uc3QgTEVOUyA9IDE7CiAgY29uc3QgRElTVFMgPSAyOwoKICAvKiBQdWJsaWMgY29uc3RhbnRzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCgogIGNvbnN0IHsKICAgIFpfRklOSVNIOiBaX0ZJTklTSCQxLCBaX0JMT0NLLCBaX1RSRUVTLAogICAgWl9PSzogWl9PSyQxLCBaX1NUUkVBTV9FTkQ6IFpfU1RSRUFNX0VORCQxLCBaX05FRURfRElDVDogWl9ORUVEX0RJQ1QkMSwgWl9TVFJFQU1fRVJST1I6IFpfU1RSRUFNX0VSUk9SJDEsIFpfREFUQV9FUlJPUjogWl9EQVRBX0VSUk9SJDEsIFpfTUVNX0VSUk9SOiBaX01FTV9FUlJPUiQxLCBaX0JVRl9FUlJPUiwKICAgIFpfREVGTEFURUQKICB9ID0gY29uc3RhbnRzJDI7CgoKICAvKiBTVEFURVMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCgoKICBjb25zdCAgICBIRUFEID0gMTsgICAgICAgLyogaTogd2FpdGluZyBm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EFURV9TVFJJQ1QpICovCiAgICB0aGlzLmNoZWNrID0gMDsgICAgICAgICAgICAgLyogcHJvdGVjdGVkIGNvcHkgb2YgY2hlY2sgdmFsdWUgKi8KICAgIHRoaXMudG90YWwgPSAwOyAgICAgICAgICAgICAvKiBwcm90ZWN0ZWQgY29weSBvZiBvdXRwdXQgY291bnQgKi8KICAgIC8vIFRPRE86IG1heSBiZSB7fQogICAgdGhpcy5oZWFkID0gbnVsbDsgICAgICAgICAgIC8qIHdoZXJlIHRvIHNhdmUgZ3ppcCBoZWFkZXIgaW5mb3JtYXRpb24gKi8KCiAgICAvKiBzbGlkaW5nIHdpbmRvdyAqLwogICAgdGhpcy53Yml0cyA9IDA7ICAgICAgICAgICAgIC8qIGxvZyBiYXNlIDIgb2YgcmVxdWVzdGVkIHdpbmRvdyBzaXplICovCiAgICB0aGlzLndzaXplID0gMDsgICAgICAgICAgICAgLyogd2luZG93IHNpemUgb3IgemVybyBpZiBub3QgdXNpbmcgd2luZG93ICovCiAgICB0aGlzLndoYXZlID0gMDsgICAgICAgICAgICAgLyogdmFsaWQgYnl0ZXMgaW4gdGhlIHdpbmRvdyAqLwogICAgdGhpcy53bmV4dCA9IDA7ICAgICAgICAgICAgIC8qIHdpbmRvdyB3cml0ZSBpbmRleCAqLwogICAgdGhpcy53aW5kb3cgPSBudWxsOyAgICAgICAgIC8qIGFsbG9jYXRlZCBzbGlkaW5nIHdpbmRvdywgaWYgbmVlZGVkICovCgogICAgLyogYml0IGFjY3VtdWxhdG9yICovCiAgICB0aGlzLmhvbGQgPSAwOyAgICAgICAgICAgICAgLyogaW5wdXQgYml0IGFjY3VtdWxhdG9yICovCiAgICB0aGlzLmJpdHMgPSAwOyAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGJpdHMgaW4gImluIiAqLwoKICAgIC8qIGZvciBzdHJpbmcgYW5kIHN0b3JlZCBibG9jayBjb3B5aW5nICovCiAgICB0aGlzLmxlbmd0aCA9IDA7ICAgICAgICAgICAgLyogbGl0ZXJhbCBvciBsZW5ndGggb2YgZGF0YSB0byBjb3B5ICovCiAgICB0aGlzLm9mZnNldCA9IDA7ICAgICAgICAgICAgLyogZGlzdGFuY2UgYmFjayB0byBjb3B5IHN0cmluZyBmcm9tICovCgogICAgLyogZm9yIHRhYmxlIGFuZCBjb2RlIGRlY29kaW5nICovCiAgICB0aGlzLmV4dHJhID0gMDsgICAgICAgICAgICAgLyogZXh0cmEgYml0cyBuZWVkZWQgKi8KCiAgICAvKiBmaXhlZCBhbmQgZHluYW1pYyBjb2RlIHRhYmxlcyAqLwogICAgdGhpcy5sZW5jb2RlID0gbnVsbDsgICAgICAgICAgLyogc3RhcnRpbmcgdGFibGUgZm9yIGxlbmd0aC9saXRlcmFsIGNvZGVzICovCiAgICB0aGlzLmRpc3Rjb2RlID0gbnVsbDsgICAgICAgICAvKiBzdGFydGluZyB0YWJsZSBmb3IgZGlzdGFuY2UgY29kZXMgKi8KICAgIHRoaXMubGVuYml0cyA9IDA7ICAgICAgICAgICAvKiBpbmRleCBiaXRzIGZvciBsZW5jb2RlICovCiAgICB0aGlzLmRpc3RiaXRzID0gMDsgICAgICAgICAgLyogaW5kZXggYml0cyBmb3IgZGlzdGNvZGUgKi8KCiAgICAvKiBkeW5hbWljIHRhYmxlIGJ1aWxkaW5nICovCiAgICB0aGlzLm5jb2RlID0gMDsgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGNvZGUgbGVuZ3RoIGNvZGUgbGVuZ3RocyAqLwogICAgdGhpcy5ubGVuID0gMDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBsZW5ndGggY29kZSBsZW5ndGhzICovCiAgICB0aGlzLm5kaXN0ID0gMDsgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGRpc3RhbmNlIGNvZGUgbGVuZ3RocyAqLwogICAgdGhpcy5oYXZlID0gMDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBjb2RlIGxlbmd0aHMgaW4gbGVuc1tdICovCiAgICB0aGlz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PSyQxOwogIH07CgoKICBjb25zdCBpbmZsYXRlUmVzZXQgPSAoc3RybSkgPT4gewoKICAgIGlmICghc3RybSB8fCAhc3RybS5zdGF0ZSkgeyByZXR1cm4gWl9TVFJFQU1fRVJST1IkMTsgfQogICAgY29uc3Qgc3RhdGUgPSBzdHJtLnN0YXRlOwogICAgc3RhdGUud3NpemUgPSAwOwogICAgc3RhdGUud2hhdmUgPSAwOwogICAgc3RhdGUud25leHQgPSAwOwogICAgcmV0dXJuIGluZmxhdGVSZXNldEtlZXAoc3RybSk7CgogIH07CgoKICBjb25zdCBpbmZsYXRlUmVzZXQyID0gKHN0cm0sIHdpbmRvd0JpdHMpID0+IHsKICAgIGxldCB3cmFwOwoKICAgIC8qIGdldCB0aGUgc3RhdGUgKi8KICAgIGlmICghc3RybSB8fCAhc3RybS5zdGF0ZSkgeyByZXR1cm4gWl9TVFJFQU1fRVJST1IkMTsgfQogICAgY29uc3Qgc3RhdGUgPSBzdHJtLnN0YXRlOwoKICAgIC8qIGV4dHJhY3Qgd3JhcCByZXF1ZXN0IGZyb20gd2luZG93Qml0cyBwYXJhbWV0ZXIgKi8KICAgIGlmICh3aW5kb3dCaXRzIDwgMCkgewogICAgICB3cmFwID0gMDsKICAgICAgd2luZG93Qml0cyA9IC13aW5kb3dCaXRzOwogICAgfQogICAgZWxzZSB7CiAgICAgIHdyYXAgPSAod2luZG93Qml0cyA+PiA0KSArIDE7CiAgICAgIGlmICh3aW5kb3dCaXRzIDwgNDgpIHsKICAgICAgICB3aW5kb3dCaXRzICY9IDE1OwogICAgICB9CiAgICB9CgogICAgLyogc2V0IG51bWJlciBvZiB3aW5kb3cgYml0cywgZnJlZSB3aW5kb3cgaWYgZGlmZmVyZW50ICovCiAgICBpZiAod2luZG93Qml0cyAmJiAod2luZG93Qml0cyA8IDggfHwgd2luZG93Qml0cyA+IDE1KSkgewogICAgICByZXR1cm4gWl9TVFJFQU1fRVJST1IkMTsKICAgIH0KICAgIGlmIChzdGF0ZS53a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mRvdy5zZXQoc3JjLnN1YmFycmF5KGVuZCAtIGNvcHksIGVuZCksIDApOwogICAgICAgIHN0YXRlLnduZXh0ID0gY29weTsKICAgICAgICBzdGF0ZS53aGF2ZSA9IHN0YXRlLndzaXplOwogICAgICB9CiAgICAgIGVsc2UgewogICAgICAgIHN0YXRlLnduZXh0ICs9IGRpc3Q7CiAgICAgICAgaWYgKHN0YXRlLnduZXh0ID09PSBzdGF0ZS53c2l6ZSkgeyBzdGF0ZS53bmV4dCA9IDA7IH0KICAgICAgICBpZiAoc3RhdGUud2hhdmUgPCBzdGF0ZS53c2l6ZSkgeyBzdGF0ZS53aGF2ZSArPSBkaXN0OyB9CiAgICAgIH0KICAgIH0KICAgIHJldHVybiAwOwogIH07CgoKICBjb25zdCBpbmZsYXRlJDIgPSAoc3RybSwgZmx1c2gpID0+IHsKCiAgICBsZXQgc3RhdGU7CiAgICBsZXQgaW5wdXQsIG91dHB1dDsgICAgICAgICAgLy8gaW5wdXQvb3V0cHV0IGJ1ZmZlcnMKICAgIGxldCBuZXh0OyAgICAgICAgICAgICAgICAgICAvKiBuZXh0IGlucHV0IElOREVYICovCiAgICBsZXQgcHV0OyAgICAgICAgICAgICAgICAgICAgLyogbmV4dCBvdXRwdXQgSU5ERVggKi8KICAgIGxldCBoYXZlLCBsZWZ0OyAgICAgICAgICAgICAvKiBhdmFpbGFibGUgaW5wdXQgYW5kIG91dHB1dCAqLwogICAgbGV0IGhvbGQ7ICAgICAgICAgICAgICAgICAgIC8qIGJpdCBidWZmZXIgKi8KICAgIGxldCBiaXRzOyAgICAgICAgICAgICAgICAgICAvKiBiaXRzIGluIGJpdCBidWZmZXIgKi8KICAgIGxldCBfaW4sIF9vdXQ7ICAgICAgICAgICAgICAvKiBzYXZlIHN0YXJ0aW5nIGF2YWlsYWJsZSBpbnB1dCBhbmQgb3V0cHV0ICovCiAgICBsZXQgY29weTsgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIHN0b3JlZCBvciBtYX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kICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgfQogICAgICAgICAgLy89PT0vLwogICAgICAgICAgaWYgKChzdGF0ZS53cmFwICYgMikgJiYgaG9sZCA9PT0gMHg4YjFmKSB7ICAvKiBnemlwIGhlYWRlciAqLwogICAgICAgICAgICBzdGF0ZS5jaGVjayA9IDAvKmNyYzMyKDBMLCBaX05VTEwsIDApKi87CiAgICAgICAgICAgIC8vPT09IENSQzIoc3RhdGUuY2hlY2ssIGhvbGQpOwogICAgICAgICAgICBoYnVmWzBdID0gaG9sZCAmIDB4ZmY7CiAgICAgICAgICAgIGhidWZbMV0gPSAoaG9sZCA+Pj4gOCkgJiAweGZmOwogICAgICAgICAgICBzdGF0ZS5jaGVjayA9IGNyYzMyXzEoc3RhdGUuY2hlY2ssIGhidWYsIDIsIDApOwogICAgICAgICAgICAvLz09PS8vCgogICAgICAgICAgICAvLz09PSBJTklUQklUUygpOwogICAgICAgICAgICBob2xkID0gMDsKICAgICAgICAgICAgYml0cyA9IDA7CiAgICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgICAgc3RhdGUubW9kZSA9IEZMQUdTOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIHN0YXRlLmZsYWdzID0gMDsgICAgICAgICAgIC8qIGV4cGVjdCB6bGliIGhlYWRlciAqLwogICAgICAgICAgaWYgKHN0YXRlLmhlYWQpIHsKICAgICAgICAgICAgc3RhdGUuaGVhZC5kb25lID0gZmFsc2U7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoIShzdGF0ZS53cmFwICYgMSkgfHwgICAvKiBjaGVjayBpZiB6bGliIGhlYWRlciBhbGxvd2VkICovCiAgICAgICAgICAgICgoKGhvbGQgJiAweGZmKS8qQklUUyg4KSovIDw8IDgpICsgKGhvbGQgPj4gOCkpICUgMzEpIHsKICAgICAgICAgICAgc3RybS5tc2cgPSAnaW5jb3JyZWN0IGhlYWRlciBjaGVjayc7CiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgaWYgKChob2xkICYgMHgwZikvKkJJVFMoNCkqLyAhPT0gWl9ERUZMQVRFRCkgewogICAgICAgICAgICBzdHJtLm1zZyA9ICd1bmtub3duIGNvbXByZXNzaW9uIG1ldGhvZCc7CiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgLy8tLS0gRFJPUEJJVFMoNCkgLS0tLy8KICAgICAgICAgIGhvbGQgPj4+PSA0OwogICAgICAgICAgYml0cyAtPSA0OwogICAgICAgICAgLy8tLS0vLwogICAgICAgICAgbGVuID0gKGhvbGQgJiAweDBmKS8qQklUUyg0KSovICsgODsKICAgICAgICAgIGlmIChzdGF0ZS53Yml0cyA9PT0gMCkgewogICAgICAgICAgICBzdGF0ZS53Yml0cyA9IGxlbjsKICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgaWYgKGxlbiA+IHN0YXRlLndiaXRzKSB7CiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2ludmFsaWQgd2luZG93IHNpemUnOwogICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KCiAgICAgICAgICAvLyAhISEgcGFrbyBwYXRjaC4gRm9yY2UgdXNlIGBvcHRpb25zLndpbmRvd0JpdHNgIGlmIHBhc3NlZC4KICAgICAgICAgIC8vIFJlcXVpcmVkIHRvIGFsd2F5cyB1c2UgbWF4IHdpbmRvdyBzaXplIGJ5IGRlZmF1bHQuCiAgICAgICAgICBzdGF0ZS5kbWF4ID0gMSA8PCBzdGF0ZS53Yml0czsKICAgICAgICAgIC8vc3RhdGUuZG1heCA9IDEgPDwgbGVuOwoKICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsICJpbmZsYXRlOiAgIHpsaWIgaGVhZGVyIG9rXG4iKSk7CiAgICAgICAgICBzdHJtLmFkbGVyID0gc3RhdGUuY2hlY2sgPSAxLyphZGxlcjMyKDBMLCBaX05VTEwsIDApKi87CiAgICAgICAgICBzdGF0ZS5tb2RlID0gaG9sZCAmIDB4MjAwID8gRElDVElEIDogVFlQRTsKICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7CiAgICAgICAgICBob2xkID0gMDsKICAgICAgICAgIGJpdHMgPSAwOwogICAgICAgICAgLy89PT0vLwogICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSBGTEFHUzoKICAgICAgICAgIC8vPT09IE5FRURCSVRTKDE2KTsgKi8KICAgICAgICAgIHdoaWxlIChiaXRzIDwgMTYpIHsKICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgIGhhdmUtLTsKICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7CiAgICAgICAgICAgIGJpdHMgKz0gODsKICAgICAgICAgIH0KICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgIHN0YXRlLmZsYWdzID0gaG9sZDsKICAgICAgICAgIGlmICgoc3RhdGUuZmxhZ3MgJiAweGZmKSAhPT0gWl9ERUZMQVRFRCkgewogICAgICAgICAgICBzdHJtLm1zZyA9ICd1bmtub3duIGNvbXByZXNzaW9uIG1ldGhvZCc7CiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgaWYgKHN0YXRlLmZsYWdzICYgMHhlMDAwKSB7CiAgICAgICAgICAgIHN0cm0ubXNnID0gJ3Vua25vd24gaGVhZGVyIGZsYWdzIHNldCc7CiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgaWYgKHN0YXRlLmhlYWQpIHsKICAgICAgICAgICAgc3RhdGUuaGVhZC50ZXh0ID0gKChob2xkID4+IDgpICYgMSk7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoc3RhdGUuZmxhZ3MgJiAweDAyMDApIHsKICAgICAgICAgICAgLy89PT0gQ1JDMihzdGF0ZS5jaGVjaywgaG9sZCk7CiAgICAgICAgICAgIGhidWZbMF0gPSBob2xkICYgMHhmZjsKICAgICAgICAgICAgaGJ1ZlsxXSA9IChob2xkID4+PiA4KSAmIDB4ZmY7CiAgICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzJfMShzdGF0ZS5jaGVjaywgaGJ1ZiwgMiwgMCk7CiAgICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgIH0KICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7CiAgICAgICAgICBob2xkID0gMDsKICAgICAgICAgIGJpdHMgPSAwOwogICAgICAgICAgLy89PT0vLwogICAgICAgICAgc3RhdGUubW9kZSA9IFRJTUU7CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBUSU1FOgogICAgICAgICAgLy89PT0gTkVFREJJVFMoMzIpOyAqLwogICAgICAgICAgd2hpbGUgKGJpdHMgPCAzMikgewogICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgICAgaGF2ZS0tOwogICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgfQogICAgICAgICAgLy89PT0vLwogICAgICAgICAgaWYgKHN0YXRlLmhlYWQpIHsKICAgICAgICAgICAgc3RhdGUuaGVhZC50aW1lID0gaG9sZDsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDIwMCkgewogICAgICAgICAgICAvLz09PSBDUkM0KHN0YXRlLmNoZWNrLCBob2xkKQogICAgICAgICAgICBoYnVmWzBdID0gaG9sZCAmIDB4ZmY7CiAgICAgICAgICAgIGhidWZbMV0gPSAoaG9sZCA+Pj4gOCkgJiAweGZmOwogICAgICAgICAgICBoYnVmWzJdID0gKGhvbGQgPj4+IDE2KSAmIDB4ZmY7CiAgICAgICAgICAgIGhidWZbM10gPSAoaG9sZCA+Pj4gMjQpICYgMHhmZjsKICAgICAgICAgICAgc3RhdGUuY2hlY2sgPSBjcmMzMl8xKHN0YXRlLmNoZWNrLCBoYnVmLCA0LCAwKTsKICAgICAgICAgICAgLy89PT0KICAgICAgICAgIH0KICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7CiAgICAgICAgICBob2xkID0gMDsKICAgICAgICAgIGJpdHMgPSAwOwogICAgICAgICAgLy89PT0vLwogICAgICAgICAgc3RhdGUubW9kZSA9IE9TOwogICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqLwogICAgICAgIGNhc2UgT1M6CiAgICAgICAgICAvLz09PSBORUVEQklUUygxNik7ICovCiAgICAgICAgICB3aGlsZSAoYml0cyA8IDE2KSB7CiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICB9CiAgICAgICAgICAvLz09PS8vCiAgICAgICAgICBpZiAoc3RhdGUuaGVhZCkgewogICAgICAgICAgICBzdGF0ZS5oZWFkLnhmbGFncyA9IChob2xkICYgMHhmZik7CiAgICAgICAgICAgIHN0YXRlLmhlYWQub3MgPSAoaG9sZCA+PiA4KTsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDIwMCkgewogICAgICAgICAgICAvLz09PSBDUkMyKHN0YXRlLmNoZWNrLCBob2xkKTsKICAgICAgICAgICAgaGJ1ZlswXSA9IGhvbGQgJiAweGZmOwogICAgICAgICAgICBoYnVmWzFdID0gKGhvbGQgPj4+IDgpICYgMHhmZjsKICAgICAgICAgICAgc3RhdGUuY2hlY2sgPSBjcmMzMl8xKHN0YXRlLmNoZWNrLCBoYnVmLCAyLCAwKTsKICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgfQogICAgICAgICAgLy89PT0gSU5JVEJJVFMoKTsKICAgICAgICAgIGhvbGQgPSAwOwogICAgICAgICAgYml0cyA9IDA7CiAgICAgICAgICAvLz09PS8vCiAgICAgICAgICBzdGF0ZS5tb2RlID0gRVhMRU47CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBFWExFTjoKICAgICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDQwMCkgewogICAgICAgICAgICAvLz09PSBORUVEQklUUygxNik7ICovCiAgICAgICAgICAgIHdoaWxlIChiaXRzIDwgMTYpIHsKICAgICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7CiAgICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgICAgc3RhdGUubGVuZ3RoID0gaG9sZDsKICAgICAgICAgICAgaWYgKHN0YXRlLmhlYWQpIHsKICAgICAgICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhX2xlbiA9IGhvbGQ7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHN0YXRlLmZsYWdzICYgMHgwMjAwKSB7CiAgICAgICAgICAgICAgLy89PT0gQ1JDMihzdGF0ZS5jaGVjaywgaG9sZCk7CiAgICAgICAgICAgICAgaGJ1ZlswXSA9IGhvbGQgJiAweGZmOwogICAgICAgICAgICAgIGhidWZbMV0gPSAoaG9sZCA+Pj4gOCkgJiAweGZmOwogICAgICAgICAgICAgIHN0YXRlLmNoZWNrID0gY3JjMzJfMShzdGF0ZS5jaGVjaywgaGJ1ZiwgMiwgMCk7CiAgICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7CiAgICAgICAgICAgIGhvbGQgPSAwOwogICAgICAgICAgICBiaXRzID0gMDsKICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgfQogICAgICAgICAgZWxzZSBpZiAoc3RhdGUuaGVhZCkgewogICAgICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhID0gbnVsbC8qWl9OVUxMKi87CiAgICAgICAgICB9CiAgICAgICAgICBzdGF0ZS5tb2RlID0gRVhUUkE7CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBFWFRSQToKICAgICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDQwMCkgewogICAgICAgICAgICBjb3B5ID0gc3RhdGUubGVuZ3RoOwogICAgICAgICAgICBpZiAoY29weSA+IGhhdmUpIHsgY29weSA9IGhhdmU7IH0KICAgICAgICAgICAgaWYgKGNvcHkpIHsKICAgICAgICAgICAgICBpZiAoc3RhdGUuaGVhZCkgewogICAgICAgICAgICAgICAgbGVuID0gc3RhdGUuaGVhZC5leHRyYV9sZW4gLSBzdGF0ZS5sZW5ndGg7CiAgICAgICAgICAgICAgICBpZiAoIXN0YXRlLmhlYWQuZXh0cmEpIHsKICAgICAgICAgICAgICAgICAgLy8gVXNlIHVudHlwZWQgYXJyYXkgZm9yIG1vcmUgY29udmVuaWVudCBwcm9jZXNzaW5nIGxhdGVyCiAgICAgICAgICAgICAgICAgIHN0YXRlLmhlYWQuZXh0cmEgPSBuZXcgVWludDhBcnJheShzdGF0ZS5oZWFkLmV4dHJhX2xlbik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzdGF0ZS5oZWFkLmV4dHJhLnNldCgKICAgICAgICAgICAgICAgICAgaW5wdXQuc3ViYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgbmV4dCwKICAgICAgICAgICAgICAgICAgICAvLyBleHRyYSBmaWVsZCBpcyBsaW1pdGVkIHRvIDY1NTM2IGJ5dGVzCiAgICAgICAgICAgICAgICAgICAgLy8gLSBubyBuZWVkIGZvciBhZGRpdGlvbmFsIHNpemUgY2hlY2sKICAgICAgICAgICAgICAgICAgICBuZXh0ICsgY29weQogICAgICAgICAgICAgICAgICApLAogICAgICAgICAgICAgICAgICAvKmxlbiArIGNvcHkgPiBzdGF0ZS5oZWFkLmV4dHJhX21heCAtIGxlbiA/IHN0YXRlLmhlYWQuZXh0cmFfbWF4IDogY29weSwqLwogICAgICAgICAgICAgICAgICBsZW4KICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAvL3ptZW1jcHkoc3RhdGUuaGVhZC5leHRyYSArIGxlbiwgbmV4dCwKICAgICAgICAgICAgICAgIC8vICAgICAgICBsZW4gKyBjb3B5ID4gc3RhdGUuaGVhZC5leHRyYV9tYXggPwogICAgICAgICAgICAgICAgLy8gICAgICAgIHN0YXRlLmhlYWQuZXh0cmFfbWF4IC0gbGVuIDogY29weSk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDIwMCkgewogICAgICAgICAgICAgICAgc3RhdGUuY2hlY2sgPSBjcmMzMl8xKHN0YXRlLmNoZWNrLCBpbnB1dCwgY29weSwgbmV4dCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGhhdmUgLT0gY29weTsKICAgICAgICAgICAgICBuZXh0ICs9IGNvcHk7CiAgICAgICAgICAgICAgc3RhdGUubGVuZ3RoIC09IGNvcHk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHN0YXRlLmxlbmd0aCkgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgIH0KICAgICAgICAgIHN0YXRlLmxlbmd0aCA9IDA7CiAgICAgICAgICBzdGF0ZS5tb2RlID0gTkFNRTsKICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi8KICAgICAgICBjYXNlIE5BTUU6CiAgICAgICAgICBpZiAoc3RhdGUuZmxhZ3MgJiAweDA4MDApIHsKICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgIGNvcHkgPSAwOwogICAgICAgICAgICBkbyB7CiAgICAgICAgICAgICAgLy8gVE9ETzogMiBvciAxIGJ5dGVzPwogICAgICAgICAgICAgIGxlbiA9IGlucHV0W25leHQgKyBjb3B5KytdOwogICAgICAgICAgICAgIC8qIHVzZSBjb25zdGFudCBsaW1pdCBiZWNhdXNlIGluIGpzIHdlIHNob3VsZCBub3QgcHJlYWxsb2NhdGUgbWVtb3J5ICovCiAgICAgICAgICAgICAgaWYgKHN0YXRlLmhlYWQgJiYgbGVuICYmCiAgICAgICAgICAgICAgICAgIChzdGF0ZS5sZW5ndGggPCA2NTUzNiAvKnN0YXRlLmhlYWQubmFtZV9tYXgqLykpIHsKICAgICAgICAgICAgICAgIHN0YXRlLmhlYWQubmFtZSArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGxlbik7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IHdoaWxlIChsZW4gJiYgY29weSA8IGhhdmUpOwoKICAgICAgICAgICAgaWYgKHN0YXRlLmZsYWdzICYgMHgwMjAwKSB7CiAgICAgICAgICAgICAgc3RhdGUuY2hlY2sgPSBjcmMzMl8xKHN0YXRlLmNoZWNrLCBpbnB1dCwgY29weSwgbmV4dCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaGF2ZSAtPSBjb3B5OwogICAgICAgICAgICBuZXh0ICs9IGNvcHk7CiAgICAgICAgICAgIGlmIChsZW4pIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICB9CiAgICAgICAgICBlbHNlIGlmIChzdGF0ZS5oZWFkKSB7CiAgICAgICAgICAgIHN0YXRlLmhlYWQubmFtZSA9IG51bGw7CiAgICAgICAgICB9CiAgICAgICAgICBzdGF0ZS5sZW5ndGggPSAwOwogICAgICAgICAgc3RhdGUubW9kZSA9IENPTU1FTlQ7CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBDT01NRU5UOgogICAgICAgICAgaWYgKHN0YXRlLmZsYWdzICYgMHgxMDAwKSB7CiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICBjb3B5ID0gMDsKICAgICAgICAgICAgZG8gewogICAgICAgICAgICAgIGxlbiA9IGlucHV0W25leHQgKyBjb3B5KytdOwogICAgICAgICAgICAgIC8qIHVzZSBjb25zdGFudCBsaW1pdCBiZWNhdXNlIGluIGpzIHdlIHNob3VsZCBub3QgcHJlYWxsb2NhdGUgbWVtb3J5ICovCiAgICAgICAgICAgICAgaWYgKHN0YXRlLmhlYWQgJiYgbGVuICYmCiAgICAgICAgICAgICAgICAgIChzdGF0ZS5sZW5ndGggPCA2NTUzNiAvKnN0YXRlLmhlYWQuY29tbV9tYXgqLykpIHsKICAgICAgICAgICAgICAgIHN0YXRlLmhlYWQuY29tbWVudCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGxlbik7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IHdoaWxlIChsZW4gJiYgY29weSA8IGhhdmUpOwogICAgICAgICAgICBpZiAoc3RhdGUuZmxhZ3MgJiAweDAyMDApIHsKICAgICAgICAgICAgICBzdGF0ZS5jaGVjayA9IGNyYzMyXzEoc3RhdGUuY2hlY2ssIGlucHV0LCBjb3B5LCBuZXh0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBoYXZlIC09IGNvcHk7CiAgICAgICAgICAgIG5leHQgKz0gY29weTsKICAgICAgICAgICAgaWYgKGxlbikgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgaWYgKHN0YXRlLmhlYWQpIHsKICAgICAgICAgICAgc3RhdGUuaGVhZC5jb21tZW50ID0gbnVsbDsKICAgICAgICAgIH0KICAgICAgICAgIHN0YXRlLm1vZGUgPSBIQ1JDOwogICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqLwogICAgICAgIGNhc2UgSENSQzoKICAgICAgICAgIGlmIChzdGF0ZS5mbGFncyAmIDB4MDIwMCkgewogICAgICAgICAgICAvLz09PSBORUVEQklUUygxNik7ICovCiAgICAgICAgICAgIHdoaWxlIChiaXRzIDwgMTYpIHsKICAgICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7CiAgICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgICAgaWYgKGhvbGQgIT09IChzdGF0ZS5jaGVjayAmIDB4ZmZmZikpIHsKICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdoZWFkZXIgY3JjIG1pc21hdGNoJzsKICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7CiAgICAgICAgICAgIGhvbGQgPSAwOwogICAgICAgICAgICBiaXRzID0gMDsKICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgfQogICAgICAgICAgaWYgKHN0YXRlLmhlYWQpIHsKICAgICAgICAgICAgc3RhdGUuaGVhZC5oY3JjID0gKChzdGF0ZS5mbGFncyA+PiA5KSAmIDEpOwogICAgICAgICAgICBzdGF0ZS5oZWFkLmRvbmUgPSB0cnVlOwogICAgICAgICAgfQogICAgICAgICAgc3RybS5hZGxlciA9IHN0YXRlLmNoZWNrID0gMDsKICAgICAgICAgIHN0YXRlLm1vZGUgPSBUWVBFOwogICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSBESUNUSUQ6CiAgICAgICAgICAvLz09PSBORUVEQklUUygzMik7ICovCiAgICAgICAgICB3aGlsZSAoYml0cyA8IDMyKSB7CiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICB9CiAgICAgICAgICAvLz09PS8vCiAgICAgICAgICBzdHJtLmFkbGVyID0gc3RhdGUuY2hlY2sgPSB6c3dhcDMyKGhvbGQpOwogICAgICAgICAgLy89PT0gSU5JVEJJVFMoKTsKICAgICAgICAgIGhvbGQgPSAwOwogICAgICAgICAgYml0cyA9IDA7CiAgICAgICAgICAvLz09PS8vCiAgICAgICAgICBzdGF0ZS5tb2RlID0gRElDVDsKICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi8KICAgICAgICBjYXNlIERJQ1Q6CiAgICAgICAgICBpZiAoc3RhdGUuaGF2ZWRpY3QgPT09IDApIHsKICAgICAgICAgICAgLy8tLS0gUkVTVE9SRSgpIC0tLQogICAgICAgICAgICBzdHJtLm5leHRfb3V0ID0gcHV0OwogICAgICAgICAgICBzdHJtLmF2YWlsX291dCA9IGxlZnQ7CiAgICAgICAgICAgIHN0cm0ubmV4dF9pbiA9IG5leHQ7CiAgICAgICAgICAgIHN0cm0uYXZhaWxfaW4gPSBoYXZlOwogICAgICAgICAgICBzdGF0ZS5ob2xkID0gaG9sZDsKICAgICAgICAgICAgc3RhdGUuYml0cyA9IGJpdHM7CiAgICAgICAgICAgIC8vLS0tCiAgICAgICAgICAgIHJldHVybiBaX05FRURfRElDVCQxOwogICAgICAgICAgfQogICAgICAgICAgc3RybS5hZGxlciA9IHN0YXRlLmNoZWNrID0gMS8qYWRsZXIzMigwTCwgWl9OVUxMLCAwKSovOwogICAgICAgICAgc3RhdGUubW9kZSA9IFRZUEU7CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBUWVBFOgogICAgICAgICAgaWYgKGZsdXNoID09PSBaX0JMT0NLIHx8IGZsdXNoID09PSBaX1RSRUVTKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqLwogICAgICAgIGNhc2UgVFlQRURPOgogICAgICAgICAgaWYgKHN0YXRlLmxhc3QpIHsKICAgICAgICAgICAgLy8tLS0gQllURUJJVFMoKSAtLS0vLwogICAgICAgICAgICBob2xkID4+Pj0gYml0cyAmIDc7CiAgICAgICAgICAgIGJpdHMgLT0gYml0cyAmIDc7CiAgICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgICAgc3RhdGUubW9kZSA9IENIRUNLOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIC8vPT09IE5FRURCSVRTKDMpOyAqLwogICAgICAgICAgd2hpbGUgKGJpdHMgPCAzKSB7CiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICB9CiAgICAgICAgICAvLz09PS8vCiAgICAgICAgICBzdGF0ZS5sYXN0ID0gKGhvbGQgJiAweDAxKS8qQklUUygxKSovOwogICAgICAgICAgLy8tLS0gRFJPUEJJVFMoMSkgLS0tLy8KICAgICAgICAgIGhvbGQgPj4+PSAxOwogICAgICAgICAgYml0cyAtPSAxOwogICAgICAgICAgLy8tLS0vLwoKICAgICAgICAgIHN3aXRjaCAoKGhvbGQgJiAweDAzKS8qQklUUygyKSovKSB7CiAgICAgICAgICAgIGNhc2UgMDogICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHN0b3JlZCBibG9jayAqLwogICAgICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgc3RvcmVkIGJsb2NrJXNcbiIsCiAgICAgICAgICAgICAgLy8gICAgICAgIHN0YXRlLmxhc3QgPyAiIChsYXN0KSIgOiAiIikpOwogICAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBTVE9SRUQ7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMTogICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZpeGVkIGJsb2NrICovCiAgICAgICAgICAgICAgZml4ZWR0YWJsZXMoc3RhdGUpOwogICAgICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgZml4ZWQgY29kZXMgYmxvY2slc1xuIiwKICAgICAgICAgICAgICAvLyAgICAgICAgc3RhdGUubGFzdCA/ICIgKGxhc3QpIiA6ICIiKSk7CiAgICAgICAgICAgICAgc3RhdGUubW9kZSA9IExFTl87ICAgICAgICAgICAgIC8qIGRlY29kZSBjb2RlcyAqLwogICAgICAgICAgICAgIGlmIChmbHVzaCA9PT0gWl9UUkVFUykgewogICAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoMikgLS0tLy8KICAgICAgICAgICAgICAgIGhvbGQgPj4+PSAyOwogICAgICAgICAgICAgICAgYml0cyAtPSAyOwogICAgICAgICAgICAgICAgLy8tLS0vLwogICAgICAgICAgICAgICAgYnJlYWsgaW5mX2xlYXZlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAyOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZHluYW1pYyBibG9jayAqLwogICAgICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgZHluYW1pYyBjb2RlcyBibG9jayVzXG4iLAogICAgICAgICAgICAgIC8vICAgICAgICBzdGF0ZS5sYXN0ID8gIiAobGFzdCkiIDogIiIpKTsKICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gVEFCTEU7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMzoKICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGJsb2NrIHR5cGUnOwogICAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7CiAgICAgICAgICB9CiAgICAgICAgICAvLy0tLSBEUk9QQklUUygyKSAtLS0vLwogICAgICAgICAgaG9sZCA+Pj49IDI7CiAgICAgICAgICBiaXRzIC09IDI7CiAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlIFNUT1JFRDoKICAgICAgICAgIC8vLS0tIEJZVEVCSVRTKCkgLS0tLy8gLyogZ28gdG8gYnl0ZSBib3VuZGFyeSAqLwogICAgICAgICAgaG9sZCA+Pj49IGJpdHMgJiA3OwogICAgICAgICAgYml0cyAtPSBiaXRzICYgNzsKICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgIC8vPT09IE5FRURCSVRTKDMyKTsgKi8KICAgICAgICAgIHdoaWxlIChiaXRzIDwgMzIpIHsKICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgIGhhdmUtLTsKICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7CiAgICAgICAgICAgIGJpdHMgKz0gODsKICAgICAgICAgIH0KICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgIGlmICgoaG9sZCAmIDB4ZmZmZikgIT09ICgoaG9sZCA+Pj4gMTYpIF4gMHhmZmZmKSkgewogICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIHN0b3JlZCBibG9jayBsZW5ndGhzJzsKICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBzdGF0ZS5sZW5ndGggPSBob2xkICYgMHhmZmZmOwogICAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgImluZmxhdGU6ICAgICAgIHN0b3JlZCBsZW5ndGggJXVcbiIsCiAgICAgICAgICAvLyAgICAgICAgc3RhdGUubGVuZ3RoKSk7CiAgICAgICAgICAvLz09PSBJTklUQklUUygpOwogICAgICAgICAgaG9sZCA9IDA7CiAgICAgICAgICBiaXRzID0gMDsKICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgIHN0YXRlLm1vZGUgPSBDT1BZXzsKICAgICAgICAgIGlmIChmbHVzaCA9PT0gWl9UUkVFUykgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi8KICAgICAgICBjYXNlIENPUFlfOgogICAgICAgICAgc3RhdGUubW9kZSA9IENPUFk7CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBDT1BZOgogICAgICAgICAgY29weSA9IHN0YXRlLmxlbmd0aDsKICAgICAgICAgIGlmIChjb3B5KSB7CiAgICAgICAgICAgIGlmIChjb3B5ID4gaGF2ZSkgeyBjb3B5ID0gaGF2ZTsgfQogICAgICAgICAgICBpZiAoY29weSA+IGxlZnQpIHsgY29weSA9IGxlZnQ7IH0KICAgICAgICAgICAgaWYgKGNvcHkgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgIC8vLS0tIHptZW1jcHkocHV0LCBuZXh0LCBjb3B5KTsgLS0tCiAgICAgICAgICAgIG91dHB1dC5zZXQoaW5wdXQuc3ViYXJyYXkobmV4dCwgbmV4dCArIGNvcHkpLCBwdXQpOwogICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICAgIGhhdmUgLT0gY29weTsKICAgICAgICAgICAgbmV4dCArPSBjb3B5OwogICAgICAgICAgICBsZWZ0IC09IGNvcHk7CiAgICAgICAgICAgIHB1dCArPSBjb3B5OwogICAgICAgICAgICBzdGF0ZS5sZW5ndGggLT0gY29weTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICAvL1RyYWNldigoc3RkZXJyLCAiaW5mbGF0ZTogICAgICAgc3RvcmVkIGVuZFxuIikpOwogICAgICAgICAgc3RhdGUubW9kZSA9IFRZUEU7CiAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlIFRBQkxFOgogICAgICAgICAgLy89PT0gTkVFREJJVFMoMTQpOyAqLwogICAgICAgICAgd2hpbGUgKGJpdHMgPCAxNCkgewogICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgICAgaGF2ZS0tOwogICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgfQogICAgICAgICAgLy89PT0vLwogICAgICAgICAgc3RhdGUubmxlbiA9IChob2xkICYgMHgxZikvKkJJVFMoNSkqLyArIDI1NzsKICAgICAgICAgIC8vLS0tIERST1BCSVRTKDUpIC0tLS8vCiAgICAgICAgICBob2xkID4+Pj0gNTsKICAgICAgICAgIGJpdHMgLT0gNTsKICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgIHN0YXRlLm5kaXN0ID0gKGhvbGQgJiAweDFmKS8qQklUUyg1KSovICsgMTsKICAgICAgICAgIC8vLS0tIERST1BCSVRTKDUpIC0tLS8vCiAgICAgICAgICBob2xkID4+Pj0gNTsKICAgICAgICAgIGJpdHMgLT0gNTsKICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgIHN0YXRlLm5jb2RlID0gKGhvbGQgJiAweDBmKS8qQklUUyg0KSovICsgNDsKICAgICAgICAgIC8vLS0tIERST1BCSVRTKDQpIC0tLS8vCiAgICAgICAgICBob2xkID4+Pj0gNDsKICAgICAgICAgIGJpdHMgLT0gNDsKICAgICAgICAgIC8vLS0tLy8KICAvLyNpZm5kZWYgUEtaSVBfQlVHX1dPUktBUk9VTkQKICAgICAgICAgIGlmIChzdGF0ZS5ubGVuID4gMjg2IHx8IHN0YXRlLm5kaXN0ID4gMzApIHsKICAgICAgICAgICAgc3RybS5tc2cgPSAndG9vIG1hbnkgbGVuZ3RoIG9yIGRpc3RhbmNlIHN5bWJvbHMnOwogICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAvLyNlbmRpZgogICAgICAgICAgLy9UcmFjZXYoKHN0ZGVyciwgImluZmxhdGU6ICAgICAgIHRhYmxlIHNpemVzIG9rXG4iKSk7CiAgICAgICAgICBzdGF0ZS5oYXZlID0gMDsKICAgICAgICAgIHN0YXRlLm1vZGUgPSBMRU5MRU5TOwogICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqLwogICAgICAgIGNhc2UgTEVOTEVOUzoKICAgICAgICAgIHdoaWxlIChzdGF0ZS5oYXZlIDwgc3RhdGUubmNvZGUpIHsKICAgICAgICAgICAgLy89PT0gTkVFREJJVFMoMyk7CiAgICAgICAgICAgIHdoaWxlIChiaXRzIDwgMykgewogICAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICAgIGhhdmUtLTsKICAgICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgICBzdGF0ZS5sZW5zW29yZGVyW3N0YXRlLmhhdmUrK11dID0gKGhvbGQgJiAweDA3KTsvL0JJVFMoMyk7CiAgICAgICAgICAgIC8vLS0tIERST1BCSVRTKDMpIC0tLS8vCiAgICAgICAgICAgIGhvbGQgPj4+PSAzOwogICAgICAgICAgICBiaXRzIC09IDM7CiAgICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgIH0KICAgICAgICAgIHdoaWxlIChzdGF0ZS5oYXZlIDwgMTkpIHsKICAgICAgICAgICAgc3RhdGUubGVuc1tvcmRlcltzdGF0ZS5oYXZlKytdXSA9IDA7CiAgICAgICAgICB9CiAgICAgICAgICAvLyBXZSBoYXZlIHNlcGFyYXRlIHRhYmxlcyAmIG5vIHBvaW50ZXJzLiAyIGNvbW1lbnRlZCBsaW5lcyBiZWxvdyBub3QgbmVlZGVkLgogICAgICAgICAgLy9zdGF0ZS5uZXh0ID0gc3RhdGUuY29kZXM7CiAgICAgICAgICAvL3N0YXRlLmxlbmNvZGUgPSBzdGF0ZS5uZXh0OwogICAgICAgICAgLy8gU3dpdGNoIHRvIHVzZSBkeW5hbWljIHRhYmxlCiAgICAgICAgICBzdGF0ZS5sZW5jb2RlID0gc3RhdGUubGVuZHluOwogICAgICAgICAgc3RhdGUubGVuYml0cyA9IDc7CgogICAgICAgICAgb3B0cyA9IHsgYml0czogc3RhdGUubGVuYml0cyB9OwogICAgICAgICAgcmV0ID0gaW5mdHJlZXMoQ09ERVMsIHN0YXRlLmxlbnMsIDAsIDE5LCBzdGF0ZS5sZW5jb2RlLCAwLCBzdGF0ZS53b3JrLCBvcHRzKTsKICAgICAgICAgIHN0YXRlLmxlbmJpdHMgPSBvcHRzLmJpdHM7CgogICAgICAgICAgaWYgKHJldCkgewogICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGNvZGUgbGVuZ3RocyBzZXQnOwogICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgICBjb2RlIGxlbmd0aHMgb2tcbiIpKTsKICAgICAgICAgIHN0YXRlLmhhdmUgPSAwOwogICAgICAgICAgc3RhdGUubW9kZSA9IENPREVMRU5TOwogICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqLwogICAgICAgIGNhc2UgQ09ERUxFTlM6CiAgICAgICAgICB3aGlsZSAoc3RhdGUuaGF2ZSA8IHN0YXRlLm5sZW4gKyBzdGF0ZS5uZGlzdCkgewogICAgICAgICAgICBmb3IgKDs7KSB7CiAgICAgICAgICAgICAgaGVyZSA9IHN0YXRlLmxlbmNvZGVbaG9sZCAmICgoMSA8PCBzdGF0ZS5sZW5iaXRzKSAtIDEpXTsvKkJJVFMoc3RhdGUubGVuYml0cykqLwogICAgICAgICAgICAgIGhlcmVfYml0cyA9IGhlcmUgPj4+IDI0OwogICAgICAgICAgICAgIGhlcmVfb3AgPSAoaGVyZSA+Pj4gMTYpICYgMHhmZjsKICAgICAgICAgICAgICBoZXJlX3ZhbCA9IGhlcmUgJiAweGZmZmY7CgogICAgICAgICAgICAgIGlmICgoaGVyZV9iaXRzKSA8PSBiaXRzKSB7IGJyZWFrOyB9CiAgICAgICAgICAgICAgLy8tLS0gUFVMTEJZVEUoKSAtLS0vLwogICAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICAgIGhhdmUtLTsKICAgICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICAgICAgLy8tLS0vLwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChoZXJlX3ZhbCA8IDE2KSB7CiAgICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoaGVyZS5iaXRzKSAtLS0vLwogICAgICAgICAgICAgIGhvbGQgPj4+PSBoZXJlX2JpdHM7CiAgICAgICAgICAgICAgYml0cyAtPSBoZXJlX2JpdHM7CiAgICAgICAgICAgICAgLy8tLS0vLwogICAgICAgICAgICAgIHN0YXRlLmxlbnNbc3RhdGUuaGF2ZSsrXSA9IGhlcmVfdmFsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgIGlmIChoZXJlX3ZhbCA9PT0gMTYpIHsKICAgICAgICAgICAgICAgIC8vPT09IE5FRURCSVRTKGhlcmUuYml0cyArIDIpOwogICAgICAgICAgICAgICAgbiA9IGhlcmVfYml0cyArIDI7CiAgICAgICAgICAgICAgICB3aGlsZSAoYml0cyA8IG4pIHsKICAgICAgICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgICAgICAgIGhhdmUtLTsKICAgICAgICAgICAgICAgICAgaG9sZCArPSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7CiAgICAgICAgICAgICAgICAgIGJpdHMgKz0gODsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgICAgICAgIC8vLS0tIERST1BCSVRTKGhlcmUuYml0cykgLS0tLy8KICAgICAgICAgICAgICAgIGhvbGQgPj4+PSBoZXJlX2JpdHM7CiAgICAgICAgICAgICAgICBiaXRzIC09IGhlcmVfYml0czsKICAgICAgICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5oYXZlID09PSAwKSB7CiAgICAgICAgICAgICAgICAgIHN0cm0ubXNnID0gJ2ludmFsaWQgYml0IGxlbmd0aCByZXBlYXQnOwogICAgICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxlbiA9IHN0YXRlLmxlbnNbc3RhdGUuaGF2ZSAtIDFdOwogICAgICAgICAgICAgICAgY29weSA9IDMgKyAoaG9sZCAmIDB4MDMpOy8vQklUUygyKTsKICAgICAgICAgICAgICAgIC8vLS0tIERST1BCSVRTKDIpIC0tLS8vCiAgICAgICAgICAgICAgICBob2xkID4+Pj0gMjsKICAgICAgICAgICAgICAgIGJpdHMgLT0gMjsKICAgICAgICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSBpZiAoaGVyZV92YWwgPT09IDE3KSB7CiAgICAgICAgICAgICAgICAvLz09PSBORUVEQklUUyhoZXJlLmJpdHMgKyAzKTsKICAgICAgICAgICAgICAgIG4gPSBoZXJlX2JpdHMgKyAzOwogICAgICAgICAgICAgICAgd2hpbGUgKGJpdHMgPCBuKSB7CiAgICAgICAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLz09PS8vCiAgICAgICAgICAgICAgICAvLy0tLSBEUk9QQklUUyhoZXJlLmJpdHMpIC0tLS8vCiAgICAgICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzOwogICAgICAgICAgICAgICAgYml0cyAtPSBoZXJlX2JpdHM7CiAgICAgICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICAgICAgICBsZW4gPSAwOwogICAgICAgICAgICAgICAgY29weSA9IDMgKyAoaG9sZCAmIDB4MDcpOy8vQklUUygzKTsKICAgICAgICAgICAgICAgIC8vLS0tIERST1BCSVRTKDMpIC0tLS8vCiAgICAgICAgICAgICAgICBob2xkID4+Pj0gMzsKICAgICAgICAgICAgICAgIGJpdHMgLT0gMzsKICAgICAgICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLz09PSBORUVEQklUUyhoZXJlLmJpdHMgKyA3KTsKICAgICAgICAgICAgICAgIG4gPSBoZXJlX2JpdHMgKyA3OwogICAgICAgICAgICAgICAgd2hpbGUgKGJpdHMgPCBuKSB7CiAgICAgICAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvLz09PS8vCiAgICAgICAgICAgICAgICAvLy0tLSBEUk9QQklUUyhoZXJlLmJpdHMpIC0tLS8vCiAgICAgICAgICAgICAgICBob2xkID4+Pj0gaGVyZV9iaXRzOwogICAgICAgICAgICAgICAgYml0cyAtPSBoZXJlX2JpdHM7CiAgICAgICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICAgICAgICBsZW4gPSAwOwogICAgICAgICAgICAgICAgY29weSA9IDExICsgKGhvbGQgJiAweDdmKTsvL0JJVFMoNyk7CiAgICAgICAgICAgICAgICAvLy0tLSBEUk9QQklUUyg3KSAtLS0vLwogICAgICAgICAgICAgICAgaG9sZCA+Pj49IDc7CiAgICAgICAgICAgICAgICBiaXRzIC09IDc7CiAgICAgICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGlmIChzdGF0ZS5oYXZlICsgY29weSA+IHN0YXRlLm5sZW4gKyBzdGF0ZS5uZGlzdCkgewogICAgICAgICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBiaXQgbGVuZ3RoIHJlcGVhdCc7CiAgICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHdoaWxlIChjb3B5LS0pIHsKICAgICAgICAgICAgICAgIHN0YXRlLmxlbnNbc3RhdGUuaGF2ZSsrXSA9IGxlbjsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KCiAgICAgICAgICAvKiBoYW5kbG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ZS5tb2RlID0gQkFEOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsICdpbmZsYXRlOiAgICAgICBjb2RlcyBva1xuJykpOwogICAgICAgICAgc3RhdGUubW9kZSA9IExFTl87CiAgICAgICAgICBpZiAoZmx1c2ggPT09IFpfVFJFRVMpIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBMRU5fOgogICAgICAgICAgc3RhdGUubW9kZSA9IExFTjsKICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi8KICAgICAgICBjYXNlIExFTjoKICAgICAgICAgIGlmIChoYXZlID49IDYgJiYgbGVmdCA+PSAyNTgpIHsKICAgICAgICAgICAgLy8tLS0gUkVTVE9SRSgpIC0tLQogICAgICAgICAgICBzdHJtLm5leHRfb3V0ID0gcHV0OwogICAgICAgICAgICBzdHJtLmF2YWlsX291dCA9IGxlZnQ7CiAgICAgICAgICAgIHN0cm0ubmV4dF9pbiA9IG5leHQ7CiAgICAgICAgICAgIHN0cm0uYXZhaWxfaW4gPSBoYXZlOwogICAgICAgICAgICBzdGF0ZS5ob2xkID0gaG9sZDsKICAgICAgICAgICAgc3RhdGUuYml0cyA9IGJpdHM7CiAgICAgICAgICAgIC8vLS0tCiAgICAgICAgICAgIGluZmZhc3Qoc3RybSwgX291dCk7CiAgICAgICAgICAgIC8vLS0tIExPQUQoKSAtLS0KICAgICAgICAgICAgcHV0ID0gc3RybS5uZXh0X291dDsKICAgICAgICAgICAgb3V0cHV0ID0gc3RybS5vdXRwdXQ7CiAgICAgICAgICAgIGxlZnQgPSBzdHJtLmF2YWlsX291dDsKICAgICAgICAgICAgbmV4dCA9IHN0cm0ubmV4dF9pbjsKICAgICAgICAgICAgaW5wdXQgPSBzdHJtLmlucHV0OwogICAgICAgICAgICBoYXZlID0gc3RybS5hdmFpbF9pbjsKICAgICAgICAgICAgaG9sZCA9IHN0YXRlLmhvbGQ7CiAgICAgICAgICAgIGJpdHMgPSBzdGF0ZS5iaXRzOwogICAgICAgICAgICAvLy0tLQoKICAgICAgICAgICAgaWYgKHN0YXRlLm1vZGUgPT09IFRZUEUpIHsKICAgICAgICAgICAgICBzdGF0ZS5iYWNrID0gLTE7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBzdGF0ZS5iYWNrID0gMDsKICAgICAgICAgIGZvciAoOzspIHsKICAgICAgICAgICAgaGVyZSA9IHN0YXRlLmxlbmNvZGVbaG9sZCAmICgoMSA8PCBzdGF0ZS5sZW5iaXRzKSAtIDEpXTsgIC8qQklUUyhzdGF0ZS5sZW5iaXRzKSovCiAgICAgICAgICAgIGhlcmVfYml0cyA9IGhlcmUgPj4+IDI0OwogICAgICAgICAgICBoZXJlX29wID0gKGhlcmUgPj4+IDE2KSAmIDB4ZmY7CiAgICAgICAgICAgIGhlcmVfdmFsID0gaGVyZSAmIDB4ZmZmZjsKCiAgICAgICAgICAgIGlmIChoZXJlX2JpdHMgPD0gYml0cykgeyBicmVhazsgfQogICAgICAgICAgICAvLy0tLSBQVUxMQllURSgpIC0tLS8vCiAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgIH0KICAgICAgICAgIGlmIChoZXJlX29wICYmIChoZXJlX29wICYgMHhmMCkgPT09IDApIHsKICAgICAgICAgICAgbGFzdF9iaXRzID0gaGVyZV9iaXRzOwogICAgICAgICAgICBsYXN0X29wID0gaGVyZV9vcDsKICAgICAgICAgICAgbGFzdF92YWwgPSBoZXJlX3ZhbDsKICAgICAgICAgICAgZm9yICg7OykgewogICAgICAgICAgICAgIGhlcmUgPSBzdGF0ZS5sZW5jb2RlW2xhc3RfdmFsICsKICAgICAgICAgICAgICAgICAgICAgICgoaG9sZCAmICgoMSA8PCAobGFzdF9iaXRzICsgbGFzdF9vcCkpIC0gMSkpLypCSVRTKGxhc3QuYml0cyArIGxhc3Qub3ApKi8gPj4gbGFzdF9iaXRzKV07CiAgICAgICAgICAgICAgaGVyZV9iaXRzID0gaGVyZSA+Pj4gMjQ7CiAgICAgICAgICAgICAgaGVyZV9vcCA9IChoZXJlID4+PiAxNikgJiAweGZmOwogICAgICAgICAgICAgIGhlcmVfdmFsID0gaGVyZSAmIDB4ZmZmZjsKCiAgICAgICAgICAgICAgaWYgKChsYXN0X2JpdHMgKyBoZXJlX2JpdHMpIDw9IGJpdHMpIHsgYnJlYWs7IH0KICAgICAgICAgICAgICAvLy0tLSBQVUxMQllURSgpIC0tLS8vCiAgICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgICAgaGF2ZS0tOwogICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICAgIGJpdHMgKz0gODsKICAgICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMobGFzdC5iaXRzKSAtLS0vLwogICAgICAgICAgICBob2xkID4+Pj0gbGFzdF9iaXRzOwogICAgICAgICAgICBiaXRzIC09IGxhc3RfYml0czsKICAgICAgICAgICAgLy8tLS0vLwogICAgICAgICAgICBzdGF0ZS5iYWNrICs9IGxhc3RfYml0czsKICAgICAgICAgIH0KICAgICAgICAgIC8vLS0tIERST1BCSVRTKGhlcmUuYml0cykgLS0tLy8KICAgICAgICAgIGhvbGQgPj4+PSBoZXJlX2JpdHM7CiAgICAgICAgICBiaXRzIC09IGhlcmVfYml0czsKICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgIHN0YXRlLmJhY2sgKz0gaGVyZV9iaXRzOwogICAgICAgICAgc3RhdGUubGVuZ3RoID0gaGVyZV92YWw7CiAgICAgICAgICBpZiAoaGVyZV9vcCA9PT0gMCkgewogICAgICAgICAgICAvL1RyYWNldnYoKHN0ZGVyciwgaGVyZS52YWwgPj0gMHgyMCAmJiBoZXJlLnZhbCA8IDB4N2YgPwogICAgICAgICAgICAvLyAgICAgICAgImluZmxhdGU6ICAgICAgICAgbGl0ZXJhbCAnJWMnXG4iIDoKICAgICAgICAgICAgLy8gICAgICAgICJpbmZsYXRlOiAgICAgICAgIGxpdGVyYWwgMHglMDJ4XG4iLCBoZXJlLnZhbCkpOwogICAgICAgICAgICBzdGF0ZS5tb2RlID0gTElUOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChoZXJlX29wICYgMzIpIHsKICAgICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgICAgIGVuZCBvZiBibG9ja1xuIikpOwogICAgICAgICAgICBzdGF0ZS5iYWNrID0gLTE7CiAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBUWVBFOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChoZXJlX29wICYgNjQpIHsKICAgICAgICAgICAgc3RybS5tc2cgPSAnaW52YWxpZCBsaXRlcmFsL2xlbmd0aCBjb2RlJzsKICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgICAgICAgICBzdGF0ZS5leHRyYSA9IGhlcmVfb3AgJiAxNTsKICAgICAgICAgIHN0YXRlLm1vZGUgPSBMRU5FWFQ7CiAgICAgICAgICAvKiBmYWxscyB0aHJvdWdoICovCiAgICAgICAgY2FzZSBMRU5FWFQ6CiAgICAgICAgICBpZiAoc3RhdGUuZXh0cmEpIHsKICAgICAgICAgICAgLy89PT0gTkVFREJJVFMoc3RhdGUuZXh0cmEpOwogICAgICAgICAgICBuID0gc3RhdGUuZXh0cmE7CiAgICAgICAgICAgIHdoaWxlIChiaXRzIDwgbikgewogICAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICAgIGhhdmUtLTsKICAgICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgICBzdGF0ZS5sZW5ndGggKz0gaG9sZCAmICgoMSA8PCBzdGF0ZS5leHRyYSkgLSAxKS8qQklUUyhzdGF0ZS5leHRyYSkqLzsKICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMoc3RhdGUuZXh0cmEpIC0tLS8vCiAgICAgICAgICAgIGhvbGQgPj4+PSBzdGF0ZS5leHRyYTsKICAgICAgICAgICAgYml0cyAtPSBzdGF0ZS5leHRyYTsKICAgICAgICAgICAgLy8tLS0vLwogICAgICAgICAgICBzdGF0ZS5iYWNrICs9IHN0YXRlLmV4dHJhOwogICAgICAgICAgfQogICAgICAgICAgLy9UcmFjZXZ2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgICAgIGxlbmd0aCAldVxuIiwgc3RhdGUubGVuZ3RoKSk7CiAgICAgICAgICBzdGF0ZS53YXMgPSBzdGF0ZS5sZW5ndGg7CiAgICAgICAgICBzdGF0ZS5tb2RlID0gRElTVDsKICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi8KICAgICAgICBjYXNlIERJU1Q6CiAgICAgICAgICBmb3IgKDs7KSB7CiAgICAgICAgICAgIGhlcmUgPSBzdGF0ZS5kaXN0Y29kZVtob2xkICYgKCgxIDw8IHN0YXRlLmRpc3RiaXRzKSAtIDEpXTsvKkJJVFMoc3RhdGUuZGlzdGJpdHMpKi8KICAgICAgICAgICAgaGVyZV9iaXRzID0gaGVyZSA+Pj4gMjQ7CiAgICAgICAgICAgIGhlcmVfb3AgPSAoaGVyZSA+Pj4gMTYpICYgMHhmZjsKICAgICAgICAgICAgaGVyZV92YWwgPSBoZXJlICYgMHhmZmZmOwoKICAgICAgICAgICAgaWYgKChoZXJlX2JpdHMpIDw9IGJpdHMpIHsgYnJlYWs7IH0KICAgICAgICAgICAgLy8tLS0gUFVMTEJZVEUoKSAtLS0vLwogICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgICAgaGF2ZS0tOwogICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICB9CiAgICAgICAgICBpZiAoKGhlcmVfb3AgJiAweGYwKSA9PT0gMCkgewogICAgICAgICAgICBsYXN0X2JpdHMgPSBoZXJlX2JpdHM7CiAgICAgICAgICAgIGxhc3Rfb3AgPSBoZXJlX29wOwogICAgICAgICAgICBsYXN0X3ZhbCA9IGhlcmVfdmFsOwogICAgICAgICAgICBmb3IgKDs7KSB7CiAgICAgICAgICAgICAgaGVyZSA9IHN0YXRlLmRpc3Rjb2RlW2xhc3RfdmFsICsKICAgICAgICAgICAgICAgICAgICAgICgoaG9sZCAmICgoMSA8PCAobGFzdF9iaXRzICsgbGFzdF9vcCkpIC0gMSkpLypCSVRTKGxhc3QuYml0cyArIGxhc3Qub3ApKi8gPj4gbGFzdF9iaXRzKV07CiAgICAgICAgICAgICAgaGVyZV9iaXRzID0gaGVyZSA+Pj4gMjQ7CiAgICAgICAgICAgICAgaGVyZV9vcCA9IChoZXJlID4+PiAxNikgJiAweGZmOwogICAgICAgICAgICAgIGhlcmVfdmFsID0gaGVyZSAmIDB4ZmZmZjsKCiAgICAgICAgICAgICAgaWYgKChsYXN0X2JpdHMgKyBoZXJlX2JpdHMpIDw9IGJpdHMpIHsgYnJlYWs7IH0KICAgICAgICAgICAgICAvLy0tLSBQVUxMQllURSgpIC0tLS8vCiAgICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgICAgaGF2ZS0tOwogICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICAgIGJpdHMgKz0gODsKICAgICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy8tLS0gRFJPUEJJVFMobGFzdC5iaXRzKSAtLS0vLwogICAgICAgICAgICBob2xkID4+Pj0gbGFzdF9iaXRzOwogICAgICAgICAgICBiaXRzIC09IGxhc3RfYml0czsKICAgICAgICAgICAgLy8tLS0vLwogICAgICAgICAgICBzdGF0ZS5iYWNrICs9IGxhc3RfYml0czsKICAgICAgICAgIH0KICAgICAgICAgIC8vLS0tIERST1BCSVRTKGhlcmUuYml0cykgLS0tLy8KICAgICAgICAgIGhvbGQgPj4+PSBoZXJlX2JpdHM7CiAgICAgICAgICBiaXRzIC09IGhlcmVfYml0czsKICAgICAgICAgIC8vLS0tLy8KICAgICAgICAgIHN0YXRlLmJhY2sgKz0gaGVyZV9iaXRzOwogICAgICAgICAgaWYgKGhlcmVfb3AgJiA2NCkgewogICAgICAgICAgICBzdHJtLm1zZyA9ICdpbnZhbGlkIGRpc3RhbmNlIGNvZGUnOwogICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICBicmVhazsKICAgICAgICAgIH0KICAgICAgICAgIHN0YXRlLm9mZnNldCA9IGhlcmVfdmFsOwogICAgICAgICAgc3RhdGUuZXh0cmEgPSAoaGVyZV9vcCkgJiAxNTsKICAgICAgICAgIHN0YXRlLm1vZGUgPSBESVNURVhUOwogICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqLwogICAgICAgIGNhc2UgRElTVEVYVDoKICAgICAgICAgIGlmIChzdGF0ZS5leHRyYSkgewogICAgICAgICAgICAvLz09PSBORUVEQklUUyhzdGF0ZS5leHRyYSk7CiAgICAgICAgICAgIG4gPSBzdGF0ZS5leHRyYTsKICAgICAgICAgICAgd2hpbGUgKGJpdHMgPCBuKSB7CiAgICAgICAgICAgICAgaWYgKGhhdmUgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICAgICAgaGF2ZS0tOwogICAgICAgICAgICAgIGhvbGQgKz0gaW5wdXRbbmV4dCsrXSA8PCBiaXRzOwogICAgICAgICAgICAgIGJpdHMgKz0gODsKICAgICAgICAgICAgfQogICAgICAgICAgICAvLz09PS8vCiAgICAgICAgICAgIHN0YXRlLm9mZnNldCArPSBob2xkICYgKCgxIDw8IHN0YXRlLmV4dHJhKSAtIDEpLypCSVRTKHN0YXRlLmV4dHJhKSovOwogICAgICAgICAgICAvLy0tLSBEUk9QQklUUyhzdGF0ZS5leHRyYSkgLS0tLy8KICAgICAgICAgICAgaG9sZCA+Pj49IHN0YXRlLmV4dHJhOwogICAgICAgICAgICBiaXRzIC09IHN0YXRlLmV4dHJhOwogICAgICAgICAgICAvLy0tLS8vCiAgICAgICAgICAgIHN0YXRlLmJhY2sgKz0gc3RhdGUuZXh0cmE7CiAgICAgICAgICB9CiAgLy8jaWZkZWYgSU5GTEFURV9TVFJJQ1QKICAgICAgICAgIGlmIChzdGF0ZS5vZmZzZXQgPiBzdGF0ZS5kbWF4KSB7CiAgICAgICAgICAgIHN0cm0ubXNnID0gJ2ludmFsaWQgZGlzdGFuY2UgdG9vIGZhciBiYWNrJzsKICAgICAgICAgICAgc3RhdGUubW9kZSA9IEJBRDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICB9CiAgLy8jZW5kaWYKICAgICAgICAgIC8vVHJhY2V2digoc3RkZXJyLCAiaW5mbGF0ZTogICAgICAgICBkaXN0YW5jZSAldVxuIiwgc3RhdGUub2Zmc2V0KSk7CiAgICAgICAgICBzdGF0ZS5tb2RlID0gTUFUQ0g7CiAg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tPSBjb3B5OwogIC8vICAgICAgICAgIGRvIHsKICAvLyAgICAgICAgICAgIG91dHB1dFtwdXQrK10gPSAwOwogIC8vICAgICAgICAgIH0gd2hpbGUgKC0tY29weSk7CiAgLy8gICAgICAgICAgaWYgKHN0YXRlLmxlbmd0aCA9PT0gMCkgeyBzdGF0ZS5tb2RlID0gTEVOOyB9CiAgLy8gICAgICAgICAgYnJlYWs7CiAgLy8jZW5kaWYKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoY29weSA+IHN0YXRlLnduZXh0KSB7CiAgICAgICAgICAgICAgY29weSAtPSBzdGF0ZS53bmV4dDsKICAgICAgICAgICAgICBmcm9tID0gc3RhdGUud3NpemUgLSBjb3B5OwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgIGZyb20gPSBzdGF0ZS53bmV4dCAtIGNvcHk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGNvcHkgPiBzdGF0ZS5sZW5ndGgpIHsgY29weSA9IHN0YXRlLmxlbmd0aDsgfQogICAgICAgICAgICBmcm9tX3NvdXJjZSA9IHN0YXRlLndpbmRvdzsKICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvcHkgZnJvbSBvdXRwdXQgKi8KICAgICAgICAgICAgZnJvbV9zb3VyY2UgPSBvdXRwdXQ7CiAgICAgICAgICAgIGZyb20gPSBwdXQgLSBzdGF0ZS5vZmZzZXQ7CiAgICAgICAgICAgIGNvcHkgPSBzdGF0ZS5sZW5ndGg7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAoY29weSA+IGxlZnQpIHsgY29weSA9IGxlZnQ7IH0KICAgICAgICAgIGxlZnQgLT0gY29weTsKICAgICAgICAgIHN0YXRlLmxlbmd0aCAtPSBjb3B5OwogICAgICAgICAgZG8gewogICAgICAgICAgICBvdXRwdXRbcHV0KytdID0gZnJvbV9zb3VyY2VbZnJvbSsrXTsKICAgICAgICAgIH0gd2hpbGUgKC0tY29weSk7CiAgICAgICAgICBpZiAoc3RhdGUubGVuZ3RoID09PSAwKSB7IHN0YXRlLm1vZGUgPSBMRU47IH0KICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgTElUOgogICAgICAgICAgaWYgKGxlZnQgPT09IDApIHsgYnJlYWsgaW5mX2xlYXZlOyB9CiAgICAgICAgICBvdXRwdXRbcHV0KytdID0gc3RhdGUubGVuZ3RoOwogICAgICAgICAgbGVmdC0tOwogICAgICAgICAgc3RhdGUubW9kZSA9IExFTjsKICAgICAgICAgIGJyZWFrOwogICAgICAgIGNhc2UgQ0hFQ0s6CiAgICAgICAgICBpZiAoc3RhdGUud3JhcCkgewogICAgICAgICAgICAvLz09PSBORUVEQklUUygzMik7CiAgICAgICAgICAgIHdoaWxlIChiaXRzIDwgMzIpIHsKICAgICAgICAgICAgICBpZiAoaGF2ZSA9PT0gMCkgeyBicmVhayBpbmZfbGVhdmU7IH0KICAgICAgICAgICAgICBoYXZlLS07CiAgICAgICAgICAgICAgLy8gVXNlICd8JyBpbnN0ZWFkIG9mICcrJyB0byBtYWtlIHN1cmUgdGhhdCByZXN1bHQgaXMgc2lnbmVkCiAgICAgICAgICAgICAgaG9sZCB8PSBpbnB1dFtuZXh0KytdIDw8IGJpdHM7CiAgICAgICAgICAgICAgYml0cyArPSA4OwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vPT09Ly8KICAgICAgICAgICAgX291dCAtPSBsZWZ0OwogICAgICAgICAgICBzdHJtLnRvdGFsX291dCArPSBfb3V0OwogICAgICAgICAgICBzdGF0ZS50b3RhbCArPSBfb3V0OwogICAgICAgICAgICBpZiAoX291dCkgewogICAgICAgICAgICAgIHN0cm0uYWRsZXIgPSBzdGF0ZS5jaGVjayA9CiAgICAgICAgICAgICAgICAgIC8qVVBEQVRFKHN0YXRlLmNoZWNrLCBwdXQgLSBfb3V0LCBfb3V0KTsqLwogICAgICAgICAgICAgICAgICAoc3RhdGUuZmxhZ3MgPyBjcmMzMl8xKHN0YXRlLmNoZWNrLCBvdXRwdXQsIF9vdXQsIHB1dCAtIF9vdXQpIDogYWRsZXIzMl8xKHN0YXRlLmNoZWNrLCBvdXRwdXQsIF9vdXQsIHB1dCAtIF9vdXQpKTsKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgX291dCA9IGxlZnQ7CiAgICAgICAgICAgIC8vIE5COiBjcmMzMiBzdG9yZWQgYXMgc2lnbmVkIDMyLWJpdCBpbnQsIHpzd2FwMzIgcmV0dXJucyBzaWduZWQgdG9vCiAgICAgICAgICAgIGlmICgoc3RhdGUuZmxhZ3MgPyBob2xkIDogenN3YXAzMihob2xkKSkgIT09IHN0YXRlLmNoZWNrKSB7CiAgICAgICAgICAgICAgc3RybS5tc2cgPSAnaW5jb3JyZWN0IGRhdGEgY2hlY2snOwogICAgICAgICAgICAgIHN0YXRlLm1vZGUgPSBCQUQ7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy89PT0gSU5JVEJJVFMoKTsKICAgICAgICAgICAgaG9sZCA9IDA7CiAgICAgICAgICAgIGJpdHMgPSAwOwogICAgICAgICAgICAvLz09PS8vCiAgICAgICAgICAgIC8vVHJhY2V2KChzdGRlcnIsICJpbmZsYXRlOiAgIGNoZWNrIG1hdGNoZXMgdHJhaWxlclxuIikpOwogICAgICAgICAgfQogICAgICAgICAgc3RhdGUubW9kZSA9IExFTkdUSDsKICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi8KICAgICAgICBjYXNlIExFTkdUSDoKICAgICAgICAgIGlmIChzdGF0ZS53cmFwICYmIHN0YXRlLmZsYWdzKSB7CiAgICAgICAgICAgIC8vPT09IE5FRURCSVRTKDMyKTsKICAgICAgICAgICAgd2hpbGUgKGJpdHMgPCAzMikgewogICAgICAgICAgICAgIGlmIChoYXZlID09PSAwKSB7IGJyZWFrIGluZl9sZWF2ZTsgfQogICAgICAgICAgICAgIGhhdmUtLTsKICAgICAgICAgICAgICBob2xkICs9IGlucHV0W25leHQrK10gPDwgYml0czsKICAgICAgICAgICAgICBiaXRzICs9IDg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgICBpZiAoaG9sZCAhPT0gKHN0YXRlLnRvdGFsICYgMHhmZmZmZmZmZikpIHsKICAgICAgICAgICAgICBzdHJtLm1zZyA9ICdpbmNvcnJlY3QgbGVuZ3RoIGNoZWNrJzsKICAgICAgICAgICAgICBzdGF0ZS5tb2RlID0gQkFEOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vPT09IElOSVRCSVRTKCk7CiAgICAgICAgICAgIGhvbGQgPSAwOwogICAgICAgICAgICBiaXRzID0gMDsKICAgICAgICAgICAgLy89PT0vLwogICAgICAgICAgICAvL1RyYWNldigoc3RkZXJyLCAiaW5mbGF0ZTogICBsZW5ndGggbWF0Y2hlcyB0cmFpbGVyXG4iKSk7CiAgICAgICAgICB9CiAgICAgICAgICBzdGF0ZS5tb2RlID0gRE9ORTsKICAgICAgICAgIC8qIGZhbGxzIHRocm91Z2ggKi8KICAgICAgICBjYXNlIERPTkU6CiAgICAgICAgICByZXQgPSBaX1NUUkVBTV9FTkQkMTsKICAgICAgICAgIGJyZWFrIGluZl9sZWF2ZTsKICAgICAgICBjYXNlIEJBRDoKICAgICAgICAgIHJldCA9IFpfREFUQV9FUlJPUiQxOwogICAgICAgICAgYnJlYWsgaW5mX2xlYXZlOwogICAgICAgIGNhc2UgTUVNOgogICAgICAgICAgcmV0dXJuIFpfTUVNX0VSUk9SJDE7CiAgICAgICAgY2FzZSBTWU5DOgogICAgICAgICAgLyogZmFsbHMgdGhyb3VnaCAqLwogICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICByZXR1cm4gWl9TVFJFQU1fRVJST1IkMTsKICAgICAgfQogICAgfQoKICAgIC8vIGluZl9sZWF2ZSA8LSBoZXJlIGlzIH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ZW4gd3JpdGluZyBhIGd6aXAgZmlsZSkgKi8KICAgIHRoaXMuZG9uZSAgICAgICA9IGZhbHNlOwogIH0KCiAgdmFyIGd6aGVhZGVyID0gR1poZWFkZXI7CgogIGNvbnN0IHRvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZzsKCiAgLyogUHVibGljIGNvbnN0YW50cyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwoKICBjb25zdCB7CiAgICBaX05PX0ZMVVNILCBaX0ZJTklTSCwKICAgIFpfT0ssIFpfU1RSRUFNX0VORCwgWl9ORUVEX0RJQ1QsIFpfU1RSRUFNX0VSUk9SLCBaX0RBVEFfRVJST1IsIFpfTUVNX0VSUk9SCiAgfSA9IGNvbnN0YW50cyQyOwoKICAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwoKCiAgLyoqCiAgICogY2xhc3MgSW5mbGF0ZQogICAqCiAgICogR2VuZXJpYyBKUy1zdHlsZSB3cmFwcGVyIGZvciB6bGliIGNhbGxzLiBJZiB5b3UgZG9uJ3QgbmVlZAogICAqIHN0cmVhbWluZyBiZWhhdmlvdXIgLSB1c2UgbW9yZSBzaW1wbGUgZnVuY3Rpb25zOiBbW2luZmxhdGVdXQogICAqIGFuZCBbW2luZmxhdGVSYXddXS4KICAgKiovCgogIC8qIGludGVybmFsCiAgICogaW5mbGF0ZS5jaHVua3MgLT4gQXJyYXkKICAgKgogICAqIENodW5rcyBvZiBvdXRwdXQgZGF0YSwgaWYgW1tJbmZsYXRlI29uRGF0YV1dIG5vdCBvdmVycmlkZGVuLgogICAqKi8KCiAgLyoqCiAgICogSW5mbGF0ZS5yZXN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gSW5mbGF0ZSwgaW5mbGF0ZSwgaW5mbGF0ZVJhdywgdW5nemlwIH0gPSBpbmZsYXRlXzEkMTsKICB2YXIgaW5mbGF0ZV8xID0gaW5mbGF0ZTsKCiAgY2xhc3MgRGVmbGF0ZURlY29kZXIgZXh0ZW5kcyBCYXNlRGVjb2RlciB7CiAgICBkZWNvZGVCbG9jayhidWZmZXIpIHsKICAgICAgcmV0dXJuIGluZmxhdGVfMShuZXcgVWludDhBcnJheShidWZmZXIpKS5idWZmZXI7CiAgICB9CiAgfQoKICBjbGFzcyBQYWNrYml0c0RlY29kZXIgZXh0ZW5kcyBCYXNlRGVjb2RlciB7CiAgICBkZWNvZGVCbG9jayhidWZmZXIpIHsKICAgICAgY29uc3QgZGF0YVZpZXcgPSBuZXcgRGF0YVZpZXcoYnVmZmVyKTsKICAgICAgY29uc3Qgb3V0ID0gW107CgogICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGJ1ZmZlci5ieXRlTGVuZ3RoOyArK2kpIHsKICAgICAgICBsZXQgaGVhZGVyID0gZGF0YVZpZXcuZ2V0SW50OChpKTsKICAgICAgICBpZiAoaGVhZGVyIDwgMCkgewogICAgICAgICAgY29uc3QgbmV4dCA9IGRhdGFWaWV3LmdldFVpbnQ4KGkgKyAxKTsKICAgICAgICAgIGhlYWRlciA9IC1oZWFkZXI7CiAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8PSBoZWFkZXI7ICsraikgewogICAgICAgICAgICBvdXQucHVzaChuZXh0KTsKICAgICAgICAgIH0KICAgICAgICAgIGkgKz0gMTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPD0gaGVhZGVyOyArK2opIHsKICAgICAgICAgICAgb3V0LnB1c2goZGF0YVZpZXcuZ2V0VWludDgoaSArIGogKyAxKSk7CiAgICAgICAgICB9CiAgICAgICAgICBpICs9IGhlYWRlciArIDE7CiAgICAgICAgfQogICAgICB9CiAgICAgIHJldHVybiBuZX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gICAgICAgICBtYXhWYWx1ZTogcGFyc2VkRGF0YS5waXhlbHMubWF4VmFsdWUsCiAgICAgICAgICBub0RhdGFWYWx1ZTogbm9EYXRhVmFsdWUKICAgICAgICB9OwoKICAgICAgICBpZiAodW5jb21wcmVzc2VkRGF0YS5yZXN1bHRNYXNrKSB7CiAgICAgICAgICByZXN1bHQubWFza0RhdGEgPSB1bmNvbXByZXNzZWREYXRhLnJlc3VsdE1hc2s7CiAgICAgICAgfQoKICAgICAgICBpZiAob3B0aW9ucy5yZXR1cm5FbmNvZGVkTWFzayAmJiBwYXJzZWREYXRhLm1hc2spIHsKICAgICAgICAgIHJlc3VsdC5lbmNvZGVkTWFza0RhdGEgPSBwYXJzZWREYXRhLm1hc2suYml0c2V0ID8gcGFyc2VkRGF0YS5tYXNrLmJpdHNldCA6IG51bGw7CiAgICAgICAgfQoKICAgICAgICBpZiAob3B0aW9ucy5yZXR1cm5GaWxlSW5mbykgewogICAgICAgICAgcmVzdWx0LmZpbGVJbmZvID0gZm9ybWF0RmlsZUluZm8ocGFyc2VkRGF0YSk7CiAgICAgICAgICBpZiAob3B0aW9ucy5jb21wdXRlVXNlZEJpdERlcHRocykgewogICAgICAgICAgICByZXN1bHQuZmlsZUluZm8uYml0RGVwdGhzID0gY29tcHV0ZVVzZWRCaXREZXB0aHMocGFyc2VkRGF0YSk7CiAgICAgICAgICB9CiAgICAgICAgfQoKICAgICAgICByZXR1cm4gcmVzdWx0OwogICAgICB9OwoKICAgICAgdmFyIHVuY29tcHJlc3NQaXhlbFZhbHVlcyA9IGZ1bmN0aW9uKGRhdGEsIFR5cGVkQXJyYXlDbGFzcywgbWFza0JpdHNldCwgbm9EYXRhVmFsdWUsIHN0b3JlRGVjb2RlZE1hc2spIHsKICAgICAgICB2YXIgYmxvY2tJZHggPSAwOwogICAgICAgIHZhciBudW1YID0gZGF0YS5waXhlbHMubnVtQmxvY2tzWDsKICAgICAgICB2YXIgbnVtWSA9IGRhdGEucGl4ZWxzLm51bU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IHggPD0gbnVtWDsgeCsrKSB7CiAgICAgICAgICAgIHZhciB0aGlzQmxvY2tXaWR0aCA9ICh4ICE9PSBudW1YKSA/IGJsb2NrV2lkdGggOiAoZGF0YS53aWR0aCAlIG51bVgpOwogICAgICAgICAgICBpZiAodGhpc0Jsb2NrV2lkdGggPT09IDApIHsKICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgdmFyIG91dFB0ciA9IHkgKiBkYXRhLndpZHRoICogYmxvY2tIZWlnaHQgKyB4ICogYmxvY2tXaWR0aDsKICAgICAgICAgICAgdmFyIG91dFN0cmlkZSA9IGRhdGEud2lkdGggLSB0aGlzQmxvY2tXaWR0aDsKCiAgICAgICAgICAgIHZhciBibG9jayA9IGRhdGEucGl4ZWxzLmJsb2Nrc1tibG9ja0lkeF07CgogICAgICAgICAgICB2YXIgYmxvY2tEYXRhLCBibG9ja1B0ciwgY29uc3RWYWx1ZTsKICAgICAgICAgICAgaWYgKGJsb2NrLmVuY29kaW5nIDwgMikgewogICAgICAgICAgICAgIC8vIGJsb2NrIGlzIGVpdGhlciB1bmNvbXByZXNzZWQgb3IgYml0LXN0dWZmZWQgKGVuY29kaW5ncyAwIGFuZCAxKQogICAgICAgICAgICAgIGlmIChibG9jay5lbmNvZGluZyA9PT0gMCkgewogICAgICAgICAgICAgICAgLy8gYmxvY2sgaXMgdW5jb21wcmVzc2VkCiAgICAgICAgICAgICAgICBibG9ja0RhdGEgPSBibG9jay5yYXdEYXRhOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBibG9jayBpcyBiaXQtc3R1ZmZlZAogICAgICAgICAgICAgICAgdW5zdHVmZihibG9jay5zdHVmZmVkRGF0YSwgYmxvY2suYml0c1BlclBpeGVsLCBibG9jay5udW1WYWxpZFBpeGVscywgYmxvY2sub2Zmc2V0LCBzY2FsZSwgYmxvY2tEYXRhQnVmZmVyLCBkYXRhLnBpeGVscy5tYXhWYWx1ZSk7CiAgICAgICAgICAgICAgICBibG9ja0RhdGEgPSBibG9ja0RhdGFCdWZmZXI7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJsb2NrUHRyID0gMDsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmIChibG9jay5lbmNvZGluZyA9PT0gMikgewogICAgICAgICAgICAgIC8vIGJsb2NrIGlzIGFsbCAwCiAgICAgICAgICAgICAgY29uc3RWYWx1ZSA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgLy8gYmxvY2sgaGFzIGNvbnN0YW50IHZhbHVlIChlbmNvZGluZyA9PT0gMykKICAgICAgICAgICAgICBjb25zdFZhbHVlID0gYmxvY2sub2Zmc2V0OwogICAgICAgICAgICB9CgogICAgICAgICAgICB2YXIgbWFza0J5dGU7CiAgICAgICAgICAgIGlmIChtYXNrQml0c2V0KSB7CiAgICAgICAgICAgICAgZm9yICh5eSA9IDA7IHl5IDwgdGhpc0Jsb2NrSGVpZ2h0OyB5eSsrKSB7CiAgICAgICAgICAgICAgICBpZiAob3V0UHRyICYgNykgewogICAgICAgICAgICAgICAgICAvLwogICAgICAgICAgICAgICAgICBtYXNrQnl0ZSA9IG1hc2tCaXRzZXRbb3V0UHRyID4+IDNdOwogICAgICAgICAgICAgICAgICBtYXNrQnl0ZSA8PD0gb3V0UHRyICYgNzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZvciAoeHggPSAwOyB4eCA8IHRoaXNCbG9ja1dpZHRoOyB4eCsrKSB7CiAgICAgICAgICAgICAgICAgIGlmICghKG91dFB0ciAmIDcpKSB7CiAgICAgICAgICAgICAgICAgICAgLy8gcmVhZCBuZXh0IGJ5dGUgZnJvbSBtYXNrCiAgICAgICAgICAgICAgICAgICAgbWFza0J5dGUgPSBtYXNrQml0c2V0W291dFB0ciA+PiAzXTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpZiAobWFza0J5dGUgJiAxMjgpIHsKICAgICAgICAgICAgICAgICAgICAvLyBwaXhlbCBkYXRhIHByZXNlbnQKICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0TWFzaykgewogICAgICAgICAgICAgICAgICAgICAgcmVzdWx0TWFza1tvdXRQdHJdID0gMTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY3VycmVudFZhbHVlID0gKGJsb2NrLmVuY29kaW5nIDwgMikgPyBibG9ja0RhdGFbYmxvY2tQdHIrK10gOiBjb25zdFZhbHVlOwogICAgICAgICAgICAgICAgICAgIG1pblZhbHVlID0gbWluVmFsdWUgPiBjdXJyZW50VmFsdWUgPyBjdXJyZW50VmFsdWUgOiBtaW5WYWx1ZTsKICAgICAgICAgICAgICAgICAgICByZXN1bHRQaXhlbHNbb3V0UHRyKytdID0gY3VycmVudFZhbHVlOwogICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIC8vIHBpeGVsIGRhdGEgbm90IHByZXNlbnQKICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0TWFzaykgewogICAgICAgICAgICAgICAgICAgICAgcmVzdWx0TWFza1tvdXRQdHJdID0gMDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmVzdWx0UGl4ZWxzW291dFB0cisrXSA9IG5vRGF0YVZhbHVlOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIG1hc2tCeXRlIDw8PSAxOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgb3V0UHRyICs9IG91dFN0cmlkZTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgLy8gbWFzayBub3QgcHJlc2VudCwgc2ltcGx5IGNvcHkgYmxvY2sgb3ZlcgogICAgICAgICAgICAgIGlmIChibG9jay5lbmNvZGluZyA8IDIpIHsKICAgICAgICAgICAgICAgIC8vIGR1cGxpY2F0aW5nIHRoaXMgY29kZSBibG9jayBmb3IgcGVyZm9ybWFuY2UgcmVhc29ucwogICAgICAgICAgICAgICAgLy8gYmxvY2tEYXRhIGNhc2U6CiAgICAgICAgICAgICAgICBmb3IgKHl5ID0gMDsgeXkgPCB0aGlzQmxvY2tIZWlnaHQ7IHl5KyspIHsKICAgICAgICAgICAgICAgICAgZm9yICh4eCA9IDA7IHh4IDwgdGhpc0Jsb2NrV2lkdGg7IHh4KyspIHsKICAgICAgICAgICAgICAgICAgICBjdXJyZW50VmFsdWUgPSBibG9ja0RhdGFbYmxvY2tQdHIrK107CiAgICAgICAgICAgICAgICAgICAgbWluVmFsdWUgPSBtaW5WYWx1ZSA+IGN1cnJlbnRWYWx1ZSA/IGN1cnJlbnRWYWx1ZSA6IG1pblZhbHVlOwogICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1tvdXRQdHIrK10gPSBjdXJyZW50VmFsdWU7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgb3V0UHRyICs9IG91dFN0cmlkZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAvLyBjb25zdFZhbHVlIGNhc2U6CiAgICAgICAgICAgICAgICBtaW5WYWx1ZSA9IG1pblZhbHVlID4gY29uc3RWYWx1ZSA/IGNvbnN0VmFsdWUgOiBtaW5WYWx1ZTsKICAgICAgICAgICAgICAgIGZvciAoeXkgPSAwOyB5eSA8IHRoaXNCbG9ja0hlaWdodDsgeXkrKykgewogICAgICAgICAgICAgICAgICBmb3IgKHh4ID0gMDsgeHggPCB0aGlzQmxvY2tXaWR0aDsgeHgrKykgewogICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1tvdXRQdHIrK10gPSBjb25zdFZhbHVlOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIG91dFB0ciArPSBvdXRTdHJpZGU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICgoYmxvY2suZW5jb2RpbmcgPT09IDEpICYmIChibG9ja1B0ciAhPT0gYmxvY2subnVtVmFsaWRQaXhlbHMpKSB7CiAgICAgICAgICAgICAgdGhyb3cgIkJsb2NrIGFuZCBNYXNrIGRvIG5vdCBtYXRjaCI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYmxvY2tJZHgrKzsKICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHJldHVybiB7CiAgICAgICAgICByZXN1bHRQaXhlbHM6IHJlc3VsdFBpeGVscywKICAgICAgICAgIHJlc3VsdE1hc2s6IHJlc3VsdE1hc2ssCiAgICAgICAgICBtaW5WYWx1ZTogbWluVmFsdWUKICAgICAgICB9OwogICAgICB9OwoKICAgICAgdmFyIGZvcm1hdEZpbGVJbmZvID0gZnVuY3Rpb24oZGF0YSkgewogICAgICAgIHJldHVybiB7CiAgICAgICAgICAiZmlsZUlkZW50aWZpZXJTdHJpbmciOiBkYXRhLmZpbGVJZGVudGlmaWVyU3RyaW5nLAogICAgICAgICAgImZpbGVWZXJzaW9uIjogZGF0YS5maWxlVmVyc2lvbiwKICAgICAgICAgICJpbWFnZVR5cGUiOiBkYXRhLmltYWdlVHlwZSwKICAgICAgICAgICJoZWlnaHQiOiBkYXRhLmhlaWdodCwKICAgICAgICAgICJ3aWR0aCI6IGRhdGEud2lkdGgsCiAgICAgICAgICAibWF4WkVycm9yIjogZGF0YS5tYXhaRXJyb3IsCiAgICAgICAgICAiZW9mT2Zmc2V0IjogZGF0YS5lb2ZPZmZzZXQsCiAgICAgICAgICAibWFzayI6IGRhdGEubWFzayA/IHsKICAgICAgICAgICAgIm51bUJsb2Nrc1giOiBkYXRhLm1hc2subnVtQmxvY2tzWCwKICAgICAgICAgICAgIm51bUJsb2Nrc1kiOiBkYXRhLm1hc2subnVtQmxvY2tzWSwKICAgICAgICAgICAgIm51bUJ5dGVzIjogZGF0YS5tYXNrLm51bUJ5dGVzLAogICAgICAgICAgICAibWF4VmFsdWUiOiBkYXRhLm1hc2subWF4VmFsdWUKICAgICAgICAgIH0gOiBudWxsLAogICAgICAgICAgInBpeGVscyI6IHsKICAgICAgICAgICAgIm51bUJsb2Nrc1giOiBkYXRhLnBpeGVscy5udW1CbG9ja3NYLAogICAgICAgICAgICAibnVtQmxvY2tzWSI6IGRhdGEucGl4ZWxzLm51bUJsb2Nrc1ksCiAgICAgICAgICAgICJudW1CeXRlcyI6IGRhdGEucGl4ZWxzLm51bUJ5dGVzLAogICAgICAgICAgICAibWF4VmFsdWUiOiBkYXRhLnBpeGVscy5tYXhWYWx1ZSwKICAgICAgICAgICAgIm5vRGF0YVZhbHVlIjogZGF0YS5ub0RhdGFWYWx1ZQogICAgICAgICAgfQogICAgICAgIH07CiAgICAgIH07CgogICAgICB2YXIgY29tcHV0ZVVzZWRCaXREZXB0aHMgPSBmdW5jdGlvbihkYXRhKSB7CiAgICAgICAgdmFyIG51bUJsb2NrcyA9IGRhdGEucGl4ZWxzLm51bUJsb2Nrc1ggKiBkYXRhLnBpeGVscy5udW1CbG9ja3NZOwogICAgICAgIHZhciBiaXREZXB0aHMgPSB7fTsKICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG51bUJsb2NrczsgaSsrKSB7CiAgICAgICAgICB2YXIgYmxvY2sgPSBkYXRhLnBpeGVscy5ibG9ja3NbaV07CiAgICAgICAgICBpZiAoYmxvY2suZW5jb2RpbmcgPT09IDApIHsKICAgICAgICAgICAgYml0RGVwdGhzLmZsb2F0MzIgPSB0cnVlOwogICAgICAgICAgfSBlbHNlIGlmIChibG9jay5lbmNvZGluZyA9PT0gMSkgewogICAgICAgICAgICBiaXREZXB0aHNbYmxvY2suYml0c1BlclBpeGVsXSA9IHRydWU7CiAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBiaXREZXB0aHNbMF0gPSB0cnVlOwogICAgICAgICAgfQogICAgIC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0gbmV3IERhdGFWaWV3KGlucHV0LCBmcCwgMTYpOwogICAgICAgICAgZGF0YS5tYXNrID0ge307CiAgICAgICAgICBkYXRhLm1hc2subnVtQmxvY2tzWSA9IHZpZXcuZ2V0VWludDMyKDAsIHRydWUpOwogICAgICAgICAgZGF0YS5tYXNrLm51bUJsb2Nrc1ggPSB2aWV3LmdldFVpbnQzMig0LCB0cnVlKTsKICAgICAgICAgIGRhdGEubWFzay5udW1CeXRlcyA9IHZpZXcuZ2V0VWludDMyKDgsIHRydWUpOwogICAgICAgICAgZGF0YS5tYXNrLm1heFZhbHVlID0gdmlldy5nZXRGbG9hdDMyKDEyLCB0cnVlKTsKICAgICAgICAgIGZwICs9IDE2OwoKICAgICAgICAgIC8vIE1hc2sgRGF0YQogICAgICAgICAgaWYgKGRhdGEubWFzay5udW1CeXRlcyA+IDApIHsKICAgICAgICAgICAgdmFyIGJpdHNldCA9IG5ldyBVaW50OEFycmF5KE1hdGguY2VpbChkYXRhLndpZHRoICogZGF0YS5oZWlnaHQgLyA4KSk7CiAgICAgICAgICAgIHZpZXcgPSBuZXcgRGF0YVZpZXcoaW5wdXQsIGZwLCBkYXRhLm1hc2subnVtQnl0ZXMpOwogICAgICAgICAgICB2YXIgY250ID0gdmlldy5nZXRJbnQxNigwLCB0cnVlKTsKICAgICAgICAgICAgdmFyIGlwID0gMiwgb3AgPSAwOwogICAgICAgICAgICBkbyB7CiAgICAgICAgICAgICAgaWYgKGNudCA+IDApIHsKICAgICAgICAgICAgICAgIHdoaWxlIChjbnQtLSkgeyBiaXRzZXRbb3ArK10gPSB2aWV3LmdldFVpbnQ4KGlwKyspOyB9CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHZhciB2YWwgPSB2aWV3LmdldFVpbnQ4KGlwKyspOwogICAgICAgICAgICAgICAgY250ID0gLWNudDsKICAgICAgICAgICAgICAgIHdoaWxlIChjbnQtLSkgeyBiaXRzZXRbb3ArK10gPSB2YWw7IH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgY250ID0gdmlldy5nZXRJbnQxNihpcCwgdHJ1ZSk7CiAgICAgICAgICAgICAgaXAgKz0gMjsKICAgICAgICAgICAgfSB3aGlsZSAoaXAgPCBkYXRhLm1hc2subnVtQnl0ZXMpOwogICAgICAgICAgICBpZiAoKGNudCAhPT0gLTMyNzY4KSB8fCAob3AgPCBiaXRzZXQubGVuZ3RoKSkgewogICAgICAgICAgICAgIHRocm93ICJVbmV4cGVjdGVkIGVuZCBvZiBtYXNrIFJMRSBlbmNvZGluZyI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGF0YS5tYXNrLmJpdHNldCA9IGJpdHNldDsKICAgICAgICAgICAgZnAgKz0gZGF0YS5tYXNrLm51bUJ5dGVzOwogICAgICAgICAgfQogICAgICAgICAgZWxzZSBpZiAoKGRhdGEubWFzay5udW1CeXRlcyB8IGRhdGEubWFzay5udW1CbG9ja3NZIHwgZGF0YS5tYXNrLm1heFZhbHVlKSA9PT0gMCkgeyAgLy8gU3BlY2lhbCBjYXNlLCBhbGwgbm9kYXRhCiAgICAgICAgICAgIGRhdGEubWFzay5iaXRzZXQgPSBuZXcgVWludDhBcnJheShNYXRoLmNlaWwoZGF0YS53aWR0aCAqIGRhdGEuaGVpZ2h0IC8gOCkpOwogICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgLy8gUGl4ZWwgSGVhZGVyCiAgICAgICAgdmlldyA9IG5ldyBEYXRhVmlldyhpbnB1dCwgZnAsIDE2KTsKICAgICAgICBkYXRhLnBpeGVscyA9IHt9OwogICAgICAgIGRhdGEucGl4ZWxzLm51bUJsb2Nrc1kgPSB2aWV3LmdldFVpbnQzMigwLCB0cnVlKTsKICAgICAgICBkYXRhLnBpeGVscy5udW1CbG9ja3NYID0gdmlldy5nZXRVaW50MzIoNCwgdHJ1ZSk7CiAgICAgICAgZGF0YS5waXhlbHMubnVtQnl0ZXMgPSB2aWV3LmdldFVpbnQzMig4LCB0cnV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YWN0dWFsTnVtQmxvY2tzWDsgYmxvY2tYKyspIHsKCiAgICAgICAgICAgIC8vIEJsb2NrCiAgICAgICAgICAgIHZhciBzaXplID0gMDsKICAgICAgICAgICAgdmFyIGJ5dGVzTGVmdCA9IGlucHV0LmJ5dGVMZW5ndGggLSBmcDsKICAgICAgICAgICAgdmlldyA9IG5ldyBEYXRhVmlldyhpbnB1dCwgZnAsIE1hdGgubWluKDEwLCBieXRlc0xlZnQpKTsKICAgICAgICAgICAgdmFyIGJsb2NrID0ge307CiAgICAgICAgICAgIGRhdGEucGl4ZWxzLmJsb2Nrc1tibG9ja0krK10gPSBibG9jazsKICAgICAgICAgICAgdmFyIGhlYWRlckJ5dGUgPSB2aWV3LmdldFVpbnQ4KDApOyBzaXplKys7CiAgICAgICAgICAgIGJsb2NrLmVuY29kaW5nID0gaGVhZGVyQnl0ZSAmIDYzOwogICAgICAgICAgICBpZiAoYmxvY2suZW5jb2RpbmcgPiAzKSB7CiAgICAgICAgICAgICAgdGhyb3cgIkludmFsaWQgYmxvY2sgZW5jb2RpbmcgKCIgKyBibG9jay5lbmNvZGluZyArICIpIjsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoYmxvY2suZW5jb2RpbmcgPT09IDIpIHsKICAgICAgICAgICAgICBmcCsrOwogICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICgoaGVhZGVyQnl0ZSAhPT0gMCkgJiYgKGhlYWRlckJ5dGUgIT09IDIpKSB7CiAgICAgICAgICAgICAgaGVhZGVyQnl0ZSA+Pj0gNjsKICAgICAgICAgICAgICBibG9jay5vZmZzZXRUeXBlID0gaGVhZGVyQnl0ZTsKICAgICAgICAgICAgICBpZiAoaGVhZGVyQnl0ZSA9PT0gMikgewogICAgICAgICAgICAgICAgYmxvY2sub2Zmc2V0ID0gdmlldy5nZXRJbnQ4KDEpOyBzaXplKys7CiAgICAgICAgICAgICAgfSBlbHNlIGlmIChoZWFkZXJCeXRlID09PSAxKSB7CiAgICAgICAgICAgICAgICBibG9jay5vZmZzZXQgPSB2aWV3LmdldEludDE2KDEsIHRydWUpOyBzaXplICs9IDI7CiAgICAgICAgICAgICAgfSBlbHNlIGlmIChoZWFkZXJCeXRlID09PSAwKSB7CiAgICAgICAgICAgICAgICBibG9jay5vZmZzZXQgPSB2aWV3LmdldEZsb2F0MzIoMSwgdHJ1ZSk7IHNpemUgKz0gNDsKICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdGhyb3cgIkludmFsaWQgYmxvY2sgb2Zmc2V0IHR5cGUiOwogICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgaWYgKGJsb2NrLmVuY29kaW5nID09PSAxKSB7CiAgICAgICAgICAgICAgICBoZWFkZXJCeXRlID0gdmlldy5nZXRVaW50OChzaXplKTsgc2l6ZSsrOwogICAgICAgICAgICAgICAgYmxvY2suYml0c1BlclBpeGVsID0gaGVhZGVyQnl0ZSAmIDYzOwogICAgICAgICAgICAgICAgaGVhZGVyQnl0ZSA+Pj0gNjsKICAgICAgICAgICAgICAgIGJsb2NrLm51bVZhbGlkUGl4ZWxzVHlwZSA9IGhlYWRlckJ5dGU7CiAgICAgICAgICAgICAgICBpZiAoaGVhZGVyQnl0ZSA9PT0gMikgewogICAgICAgICAgICAgICAgICBibG9jay5udW1WYWxpZFBpeGVscyA9IHZpZXcuZ2V0VWludDgoc2l6ZSk7IHNpemUrKzsKICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaGVhZGVyQnl0ZSA9PT0gMSkgewogICAgICAgICAgICAgICAgICBibG9jay5udW1WYWxpZFBpeGVscyA9IHZpZXcuZ2V0VWludDE2KHNpemUsIHRydWUpOyBzaXplICs9IDI7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGhlYWRlckJ5dGUgPT09IDApIHsKICAgICAgICAgICAgICAgICAgYmxvY2subnVtVmFsaWRQaXhlbHMgPSB2aWV3LmdldFVpbnQzMihzaXplLCB0cnVlKTsgc2l6ZSArPSA0OwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgdGhyb3cgIkludmFsaWQgdmFsaWQgcGl4ZWwgY291bnQgdHlwZSI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGZwICs9IHNpemU7CgogICAgICAgICAgICBpZiAoYmxvY2suZW5jb2RpbmcgPT09IDMpIHsKICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgdmFyIGFycmF5QnVmLCBzdG9yZTg7CiAgICAgICAgICAgIGlmIChibG9jay5lbmNvZGluZyA9PT0gMCkgewogICAgICAgICAgICAgIHZhciBudW1QaXhlbHMgPSAoZGF0YS5waXhlbHMubnVtQnl0ZXMgLSAxKSAvIDQ7CiAgICAgICAgICAgICAgaWYgKG51bVBpeGVscyAhPT0gTWF0aC5mbG9vcihudW1QaXhlbHMpKSB7CiAgICAgICAgICAgICAgICB0aHJvdyAidW5jb21wcmVzc2VkIGJsb2NrIGhhcyBpbnZhbGlkIGxlbmd0aCI7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGFycmF5QnVmID0gbmV3IEFycmF5QnVmZmVyKG51bVBpeGVscyAqIDQpOwogICAgICAgICAgICAgIHN0b3JlOCA9IG5ldyBVaW50OEFycmF5KGFycmF5QnVmKTsKICAgICAgICAgICAgICBzdG9yZTguc2V0KG5ldyBVaW50OEFycmF5KGlucHV0LCBmcCwgbnVtUGl4ZWxzICogNCkpOwogICAgICAgICAgICAgIHZhciByYXdEYXRhID0gbmV3IEZsb2F0MzJBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICAgICAgYmxvY2sucmF3RGF0YSA9IHJhd0RhdGE7CiAgICAgICAgICAgICAgZnAgKz0gbnVtUGl4ZWxzICogNDsKICAgICAgICAgICAgfSBlbHNlIGlmIChibG9jay5lbmNvZGluZyA9PT0gMSkgewogICA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ICAgICAgICB2YXIgbnVtSW52YWxpZFRhaWxCeXRlcyA9IHNyYy5sZW5ndGggKiA0IC0gTWF0aC5jZWlsKGJpdHNQZXJQaXhlbCAqIG51bVBpeGVscyAvIDgpOwogICAgICAgIHNyY1tzcmMubGVuZ3RoIC0gMV0gPDw9IDggKiBudW1JbnZhbGlkVGFpbEJ5dGVzOwoKICAgICAgICBmb3IgKG8gPSAwOyBvIDwgbnVtUGl4ZWxzOyBvKyspIHsKICAgICAgICAgIGlmIChiaXRzTGVmdCA9PT0gMCkgewogICAgICAgICAgICBidWZmZXIgPSBzcmNbaSsrXTsKICAgICAgICAgICAgYml0c0xlZnQgPSAzMjsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChiaXRzTGVmdCA+PSBiaXRzUGVyUGl4ZWwpIHsKICAgICAgICAgICAgbiA9IChidWZmZXIgPj4+IChiaXRzTGVmdCAtIGJpdHNQZXJQaXhlbCkpICYgYml0TWFzazsKICAgICAgICAgICAgYml0c0xlZnQgLT0gYml0c1BlclBpeGVsOwogICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdmFyIG1pc3NpbmdCaXRzID0gKGJpdHNQZXJQaXhlbCAtIGJpdHNMZWZ0KTsKICAgICAgICAgICAgbiA9ICgoYnVmZmVyICYgYml0TWFzaykgPDwgbWlzc2luZ0JpdHMpICYgYml0TWFzazsKICAgICAgICAgICAgYnVmZmVyID0gc3JjW2krK107CiAgICAgICAgICAgIGJpdHNMZWZ0ID0gMzIgLSBtaXNzaW5nQml0czsKICAgICAgICAgICAgbiArPSAoYnVmZmVyID4+PiBiaXRzTGVmdCk7CiAgICAgICAgICB9CiAgICAgICAgICAvL3BpeGVsIHZhbHVlcyBtYXkgZXhjZWVkIG1heCBkdWUgdG8gcXVhbnRpemF0aW9uCiAgICAgICAgICBkZXN0W29dID0gbiA8IG5tYXggPyBvZmZzZXQgKyBuICogc2NhbGUgOiBtYXhWYWx1ZTsKICAgICAgICB9CiAgICAgICAgcmV0dXJuI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1BlclBpeGVsKSAtIDE7CiAgICAgICAgICB2YXIgaSA9IDAsIG87CiAgICAgICAgICB2YXIgYml0c0xlZnQgPSAwOwogICAgICAgICAgdmFyIG4sIGJ1ZmZlciwgbWlzc2luZ0JpdHMsIG5tYXg7CgogICAgICAgICAgLy8gZ2V0IHJpZCBvZiB0cmFpbGluZyBieXRlcyB0aGF0IGFyZSBhbHJlYWR5IHBhcnQgb2YgbmV4dCBibG9jawogICAgICAgICAgdmFyIG51bUludmFsaWRUYWlsQnl0ZXMgPSBzcmMubGVuZ3RoICogNCAtIE1hdGguY2VpbChiaXRzUGVyUGl4ZWwgKiBudW1QaXhlbHMgLyA4KTsKICAgICAgICAgIHNyY1tzcmMubGVuZ3RoIC0gMV0gPDw9IDggKiBudW1JbnZhbGlkVGFpbEJ5dGVzOwogICAgICAgICAgaWYgKGx1dEFycikgewogICAgICAgICAgICBmb3IgKG8gPSAwOyBvIDwgbnVtUGl4ZWxzOyBvKyspIHsKICAgICAgICAgICAgICBpZiAoYml0c0xlZnQgPT09IDApIHsKICAgICAgICAgICAgICAgIGJ1ZmZlciA9IHNyY1tpKytdOwogICAgICAgICAgICAgICAgYml0c0xlZnQgPSAzMjsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKGJpdHNMZWZ0ID49IGJpdHNQZXJQaXhlbCkgewogICAgICAgICAgICAgICAgbiA9IChidWZmZXIgPj4+IChiaXRzTGVmdCAtIGJpdHNQZXJQaXhlbCkpICYgYml0TWFzazsKICAgICAgICAgICAgICAgIGJpdHNMZWZ0IC09IGJpdHNQZXJQaXhlbDsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBtaXNzaW5nQml0cyA9IChiaXRzUGVyUGl4ZWwgLSBiaXRzTGVmdCk7CiAgICAgICAgICAgICAgICBuID0gKChidWZmZXIgJiBiaXRNYXNrKSA8PCBtaXNzaW5nQml0cykgJiBiaXRNYXNrOwogICAgICAgICAgICAgICAgYnVmZmVyID0gc3JjW2krK107CiAgICAgICAgICAgICAgICBiaXRzTGVmdCA9IDMyIC0gbWlzc2luZ0JpdHM7CiAgICAgICAgICAgICAgICBuICs9IChidWZmZXIgPj4+IGJpdHNMZWZ0KTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZGVzdFtvXSA9IGx1dEFycltuXTsvL29mZnNldCArIGx1dEFycltuXSAqIHNjYWxlOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgbm1heCA9IE1hdGguY2VpbCgobWF4VmFsdWUgLSBvZmZzZXQpIC8gc2NhbGUpOwogICAgICAgICAgICBmb3IgKG8gPSAwOyBvIDwgbnVtUGl4ZWxzOyBvKyspIHsKICAgICAgICAgICAgICBpZiAoYml0c0xlZnQgPT09IDApIHsKICAgICAgICAgICAgICAgIGJ1ZmZlciA9IHNyY1tpKytdOwogICAgICAgICAgICAgICAgYml0c0xlZnQgPSAzMjsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgaWYgKGJpdHNMZWZ0ID49IGJpdHNQZXJQaXhlbCkgewogICAgICAgICAgICAgICAgbiA9IChidWZmZXIgPj4+IChiaXRzTGVmdCAtIGJpdHNQZXJQaXhlbCkpICYgYml0TWFzazsKICAgICAgICAgICAgICAgIGJpdHNMZWZ0IC09IGJpdHNQZXJQaXhlbDsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBtaXNzaW5nQml0cyA9IChiaXRzUGVyUGl4ZWwgLSBiaXRzTGVmdCk7CiAgICAgICAgICAgICAgICBuID0gKChidWZmZXIgJiBiaXRNYXNrKSA8PCBtaXNzaW5nQml0cykgJiBiaXRNYXNrOwogICAgICAgICAgICAgICAgYnVmZmVyID0gc3JjW2krK107CiAgICAgICAgICAgICAgICBiaXRzTGVmdCA9IDMyIC0gbWlzc2luZ0JpdHM7CiAgICAgICAgICAgICAgICBuICs9IChidW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XIgPSBzcmNbaSsrXTsKICAgICAgICAgICAgICBiaXRzTGVmdCA9IDMyOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChiaXRzTGVmdCA+PSBiaXRzUGVyUGl4ZWwpIHsKICAgICAgICAgICAgICBuID0gKGJ1ZmZlciA+Pj4gKGJpdHNMZWZ0IC0gYml0c1BlclBpeGVsKSkgJiBiaXRNYXNrOwogICAgICAgICAgICAgIGJpdHNMZWZ0IC09IGJpdHNQZXJQaXhlbDsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICBtaXNzaW5nQml0cyA9IChiaXRzUGVyUGl4ZWwgLSBiaXRzTGVmdCk7CiAgICAgICAgICAgICAgbiA9ICgoYnVmZmVyICYgYml0TWFzaykgPDwgbWlzc2luZ0JpdHMpICYgYml0TWFzazsKICAgICAgICAgICAgICBidWZmZXIgPSBzcmNbaSsrXTsKICAgICAgICAgICAgICBiaXRzTGVmdCA9IDMyIC0gbWlzc2luZ0JpdHM7CiAgICAgICAgICAgICAgbiArPSAoYnVmZmVyID4+PiBiaXRzTGVmdCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy9kZXN0LnB1c2gobik7CiAgICAgICAgICAgIGRlc3Rbb10gPSBuIDwgbm1heCA/IG9mZnNldCArIG4gKiBzY2FsZSA6IG1heFZhbHVlOwogICAgICAgICAgfQogICAgICAgICAgZGVzdC51bnNoaWZ0KG9mZnNldCk7Ly8xc3Qgb25lCiAgICAgICAgICByZXR1cm4gZGVzdDsKICAgICAgICB9LAoKICAgICAgICB1bnN0dWZmMjogZnVuY3Rpb24oc3JjLCBkZXN0LCBiaXRzUGVyUGl4ZWwsIG51bVBpeGVscywgbHV0QXJyLCBvZmZzZXQsIHNjYWxlLCBtYXhWYWx1ZSkgewogICAgICAgICAgdmFyIGJpdE1hc2sgPSAoMSA8PCBiaXRzUGVyUGl4ZWwpIC0gMTsKICAgICAgICAgIHZhciBpID0gMCwgbzsKICAgICAgICAgIHZhciBiaXRzTGVmdCA9IDAsIGJpdFBvcyA9IDA7CiAgICAgICAgICB2YXIgbiwgYnVmZmVyLCBtaXNzaW5nQml0czsKICAgICAgICAgIGlmIChsdXRBcnIpIHsKICAgICAgICAgICAgZm9yIChvID0gMDsgbyA8IG51bVBpeGVsczsgbysrKSB7CiAgICAgICAgICAgICAgaWYgKGJpdHNMZWZ0ID09PSAwKSB7CiAgICAgICAgICAgICAgICBidWZmZXIgPSBzcmNbaSsrXTsKICAgICAgICAgICAgICAgIGJpdHNMZWZ0ID0gMzI7CiAgICAgICAgICAgICAgICBiaXRQb3MgPSAwOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBpZiAoYml0c0xlZnQgPj0gYml0c1BlclBpeGVsKSB7CiAgICAgICAgICAgICAgICBuID0gKChidWZmZXIgPj4+IGJpdFBvcykgJiBiaXRNYXNrKTsKICAgICAgICAgICAgICAgIGJpdHNMZWZ0IC09IGJpdHNQZXJQaXhlbDsKICAgICAgICAgICAgICAgIGJpdFBvcyArPSBiaXRzUGVyUGl4ZWw7CiAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIG1pc3NpbmdCaXRzID0gKGJpdHNQZXJQaXhlbCAtIGJpdHNMZWZ0KTsKICAgICAgICAgICAgICAgIG4gPSAoYnVmZmVyID4+PiBiaXRQb3MpICYgYml0TWFzazsKICAgICAgICAgICAgICAgIGJ1ZmZlciA9IHNyY1tpKytdOwogICAgICAgICAgICAgICAgYml0c0xlZnQgPSAzMiAtIG1pc3NpbmdCaXRzOwogICAgICAgICAgICAgICAgbiB8PSAoYnVmZmVyICYgKCgxIDw8IG1pc3NpbmdCaXRzKSAtIDEpKSA8PCAoYml0c1BlclBpeGVsIC0gbWlzc2luZ0JpdHMpOwogICAgICAgICAgICAgICAgYml0UG9zID0gbWlzc2luZ0JpdHM7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGRlc3Rbb10gPSBsdXRBcnJbbl07CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgewogICAgICAgICAgICB2YXIgbm1heCA9IE1hdGguY2VpbCgobWF4VmFsdWUgLSBvZmZzZXQpIC8gc2NhbGUpOwogICAgICAgICAgICBmb3IgKG8gPSAwOyBvIDwgbnVtUGl4ZWxzOyBvKyspIHsKICAgICAgICAgICAgICBpZiAoYml0c0xlZnQgPT09IDApIHsKICAgICAgICAgICAgICAgIGJ1ZmZlciA9IHNyY1tpKytdOwogICAgICAgICAgICAgICAgYml0c0xlZnQgPSAzMjsKICAgICAgICAgICAgICAgIGJpdFBvcyA9IDA7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGlmIChiaXRzTGVmdCA+PSBiaXRzUGVyUGl4ZWwpIHsKICAgICAgICAgICAgICAgIC8vbm8gdW5zaWduZWQgbGVmdCBzaGlmdAogICAgICAgICAgICAgICAgbiA9ICgoYnVmZmVyID4+PiBiaXRQb3MpICYgYml0TWFzayk7CiAgICAgICAgICAgICAgICBiaXRzTGVmdCAtPSBiaXRzUGVyUGl4ZWw7CiAgICAgICAgICAgICAgICBiaXRQb3MgKz0gYml0c1BlclBpeGVsOwogICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBtaXNzaW5nQml0cyA9IChiaXRzUGVyUGl4ZWwgLSBiaXRzTGVmdCk7CiAgICAgICAgICAgICAgICBuID0gKGJ1ZmZlciA+Pj4gYml0UG9zKSAmIGJpdE1hc2s7Ly8oKGJ1ZmZlciAmIGJpdE1hc2spIDw8IG1pc3NpbmdCaXRzKSAmIGJpdE1hc2s7CiAgICAgICAgICAgICAgICBidWZmZXIgPSBzcmNbaSsrXTsKICAgICAgICAgICAgICAgIGJpdHNMZWZ0ID0gMzIgLSBtaXNzaW5nQml0czsKICAgICAgICAgICAgICAgIG4gfD0gKGJ1ZmZlciAmICgoMSA8PCBtaXNzaW5nQml0cykgLSAxKSkgPDwgKGJpdHNQZXJQaXhlbCAtIG1pc3NpbmdCaXRzKTsKICAgICAgICAgICAgICAgIGJpdFBvcyA9IG1pc3NpbmdCaXRzOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAvL3BpeGVsIHZhbHVlcyBtYXkgZXhjZWVkIG1heCBkdWUgdG8gcXVhbnRpemF0aW9uCiAgICAgICAgICAgICAgZGVzdFtvXSA9IG4gPCBubWF4ID8gb2Zmc2V0ICsgbiAqIHNjYWxlIDogbWF4VmFsdWU7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBkZXN0OwogICAgICAgIH0sCgogICAgICAgIHVuc3R1ZmZMVVQyOiBmdW5jdGlvbihzcmMsIGJpdHNQZXJQaXhlbCwgbnVtUGl4ZWxzLCBvZmZzZXQsIHNjYWxlLCBtYXhWYWx1ZSkgewogICAgICAgICAgdmFyIGJpdE1hc2sgPSAoMSA8PCBiaXRzUGVyUGl4ZWwpIC0gMTsKICAgICAgICAgIHZhciBpID0gMCwgbyA9IDAsIG1pc3NpbmdCaXRzID0gMCwgYml0c0xlZnQgPSAwLCBuID0gMCwgYml0UG9zID0gMDsKICAgICAgICAgIHZhciBidWZmZXI7CiAgICAgICAgICB2YXIgZGVzdCA9IFtdOwogICAgICAgICAgdmFyIG5tYXggPSBNYXRoLmNlaWwoKG1heFZhbHVlIC0gb2Zmc2V0KSAvIHNjYWxlKTsKICAgICAgICAgIGZvciAobyA9IDA7IG8gPCBudW1QaXhlbHM7IG8rKykgewogICAgICAgICAgICBpZiAoYml0c0xlZnQgPT09IDApIHsKICAgICAgICAgICAgICBidWZmZXIgPSBzcmNbaSsrXTsKICAgICAgICAgICAgICBiaXRzTGVmdCA9IDMyOwogICAgICAgICAgICAgIGJpdFBvcyA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGJpdHNMZWZ0ID49IGJpdHNQZXJQaXhlbCkgewogICAgICAgICAgICAgIC8vbm8gdW5zaWduZWQgbGVmdCBzaGlmdAogICAgICAgICAgICAgIG4gPSAoKGJ1ZmZlciA+Pj4gYml0UG9zKSAmIGJpdE1hc2spOwogICAgICAgICAgICAgIGJpdHNMZWZ0IC09IGJpdHNQZXJQaXhlbDsKICAgICAgICAgICAgICBiaXRQb3MgKz0gYml0c1BlclBpeGVsOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIG1pc3NpbmdCaXRzID0gKGJpdHNQZXJQaXhlbCAtIGJpdHNMZWZ0KTsKICAgICAgICAgICAgICBuID0gKGJ1ZmZlciA+Pj4gYml0UG9zKSAmIGJpdE1hc2s7Ly8oKGJ1ZmZlciAmIGJpdE1hc2spIDw8IG1pc3NpbmdCaXRzKSAmIGJpdE1hc2s7CiAgICAgICAgICAgICAgYnVmZmVyID0gc3JjW2krK107CiAgICAgICAgICAgICAgYml0c0xlZnQgPSAzMiAtIG1pc3NpbmdCaXRzOwogICAgICAgICAgICAgIG4gfD0gKGJ1ZmZlciAmICgoMSA8PCBtaXNzaW5nQml0cykgLSAxKSkgPDwgKGJpdHNQZXJQaXhlbCAtIG1pc3NpbmdCaXRzKTsKICAgICAgICAgICAgICBiaXRQb3MgPSBtaXNzaW5nQml0czsKICAgICAgICAgICAgfQogICAgICAgICAgICAvL2Rlc3QucHVzaChuKTsKICAgICAgICAgICAgZGVzdFtvXSA9IG4gPCBubWF4ID8gb2Zmc2V0ICsgbiAqIHNjYWxlIDogbWF4VmFsdWU7CiAgICAgICAgICB9CiAgICAgICAgICBkZXN0LnVuc2hpZnQob2Zmc2V0KTsKICAgICAgICAgIHJldHVybiBkZXN0OwogICAgICAgIH0sCgogICAgICAgIG9yaWdpbmFsVW5zdHVmZjogZnVuY3Rpb24oc3JjLCBkZXN0LCBiaXRzUGVyUGl4ZWwsIG51bVBpeGVscykgewogICAgICAgICAgdmFyIGJpdE1hc2sgPSAoMSA8PCBiaXRzUGVyUGl4ZWwpIC0gMTsKICAgICAgICAgIHZhciBpID0gMCwgbzsKICAgICAgICAgIHZhciBiaXRzTGVmdCA9IDA7CiAgICAgICAgICB2YXIgbiwgYnVmZmVyLCBtaXNzaW5nQml0czsKCiAgICAgICAgICAvLyBnZXQgcmlkIG9mIHRyYWlsaW5nIGJ5dGVzIHRoYXQgYXJlIGFscmVhZHkgcGFydCBvZiBuZXh0IGJsb2NrCiAgICAgICAgICB2YXIgbnVtSW52YWxpZFRhaWxCeXRlcyA9IHNyYy5sZW5ndGggKiA0IC0gTWF0aC5jZWlsKGJpdHNQZXJQaXhlbCAqIG51bVBpeGVscyAvIDgpOwogICAgICAgICAgc3JjW3NyYy5sZW5ndGggLSAxXSA8PD0gOCAqIG51bUludmFsaWRUYWlsQnl0ZXM7CgogICAgICAgICAgZm9yIChvID0gMDsgbyA8IG51bVBpeGVsczsgbysrKSB7CiAgICAgICAgICAgIGlmIChiaXRzTGVmdCA9PT0gMCkgewogICAgICAgICAgICAgIGJ1ZmZlciA9IHNyY1tpKytdOwogICAgICAgICAgICAgIGJpdHNMZWZ0ID0gMzI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGJpdHNMZWZ0ID49IGJpdHNQZXJQaXhlbCkgewogICAgICAgICAgICAgIG4gPSAoYnVmZmVyID4+PiAoYml0c0xlZnQgLSBiaXRzUGVyUGl4ZWwpKSAmIGJpdE1hc2s7CiAgICAgICAgICAgICAgYml0c0xlZnQgLT0gYml0c1BlclBpeGVsOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgIG1pc3NpbmdCaXRzID0gKGJpdHNQZXJQaXhlbCAtIGJpdHNMZWZ0KTsKICAgICAgICAgICAgICBuID0gKChidWZmZXIgJiBiaXRNYXNrKSA8PCBtaXNzaW5nQml0cykgJiBiaXRNYXNrOwogICAgICAgICAgICAgIGJ1ZmZlciA9IHNyY1tpKytdOwogICAgICAgICAgICAgIGJpdHNMZWZ0ID0gMzIgLSBtaXNzaW5nQml0czsKICAgICAgICAgICAgICBuICs9IChidWZmZXIgPj4+IGJpdHNMZWZ0KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBkZXN0W29dID0gbjsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBkZXN0OwogICAgICAgIH0sCgogICAgICAgIG9yaWdpbmFsVW5zdHVmZjI6IGZ1bmN0aW9uKHNyYywgZGVzdCwgYml0c1BlclBpeGVsLCBudW1QaXhlbHMpIHsKICAgICAgICAgIHZhciBiaXRNYXNrID0gKDEgPDwgYml0c1BlclBpeGVsKSAtIDE7CiAgICAgICAgICB2YXIgaSA9IDAsIG87CiAgICAgICAgICB2YXIgYml0c0xlZnQgPSAwLCBiaXRQb3MgPSAwOwogICAgICAgICAgdmFyIG4sIGJ1ZmZlciwgbWlzc2luZ0JpdHM7CiAgICAgICAgICAvL21pY3JvLW9wdGltaXphdGlvbnMKICAgICAgICAgIGZvciAobyA9IDA7IG8gPCBudW1QaXhlbHM7IG8rKykgewogICAgICAgICAgICBpZiAoYml0c0xlZnQgPT09IDApIHsKICAgICAgICAgICAgICBidWZmZXIgPSBzcmNbaSsrXTsKICAgICAgICAgICAgICBiaXRzTGVmdCA9IDMyOwogICAgICAgICAgICAgIGJpdFBvcyA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGJpdHNMZWZ0ID49IGJpdHNQZXJQaXhlbCkgewogICAgICAgICAgICAgIC8vbm8gdW5zaWduZWQgbGVmdCBzaGlmdAogICAgICAgICAgICAgIG4gPSAoKGJ1ZmZlciA+Pj4gYml0UG9zKSAmIGJpdE1hc2spOwogICAgICAgICAgICAgIGJpdHNMZWZ0IC09IGJpdHNQZXJQaXhlbDsKICAgICAgICAgICAgICBiaXRQb3MgKz0gYml0c1BlclBpeGVsOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIG1pc3NpbmdCaXRzID0gKGJpdHNQZXJQaXhlbCAtIGJpdHNMZWZ0KTsKICAgICAgICAgICAgICBuID0gKGJ1ZmZlciA+Pj4gYml0UG9zKSAmIGJpdE1hc2s7Ly8oKGJ1ZmZlciAmIGJpdE1hc2spIDw8IG1pc3NpbmdCaXRzKSAmIGJpdE1hc2s7CiAgICAgICAgICAgICAgYnVmZmVyID0gc3JjW2krK107CiAgICAgICAgICAgICAgYml0c0xlZnQgPSAzMiAtIG1pc3NpbmdCaXRzOwogICAgICAgICAgICAgIG4gfD0gKGJ1ZmZlciAmICgoMSA8PCBtaXNzaW5nQml0cykgLSAxKSkgPDwgKGJpdHNQZXJQaXhlbCAtIG1pc3NpbmdCaXRzKTsKICAgICAgICAgICAgICBiaXRQb3MgPSBtaXNzaW5nQml0czsKICAgICAgICAgICAgfQogICAgICAgICAgICBkZXN0W29dID0gbjsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBkZXN0OwogICAgICAgIH0KICAgICAgfTsKCiAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgICAqcHJpdmF0ZSBzdGF0aWMgY2xhc3MgdXNlZCBieSBMZXJjMkRlY29kZQogICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAgICAgIHZhciBMZXJjMkhlbHBlcnMgPSB7CiAgICAgICAgSFVGRk1BTl9MVVRfQklUU19NQVg6IDEyLCAvL3VzZSAyXjEyIGx1dCwgdHJlYXQgaXQgbGlrZSBjb25zdGFudAogICAgICAgIGNvbXB1dGVDaGVja3N1bUZsZXRjaGVyMzI6IGZ1bmN0aW9uKGlucHV0KSB7CgogICAgICAgICAgdmFyIHN1bTEgPSAweGZmZmYsIHN1bTIgPSAweGZmZmY7CiAgICAgICAgICB2YXIgbGVuID0gaW5wdXQubGVuZ3RoOwogICAgICAgICAgdmFyIHdvcmRzID0gTWF0aC5mbG9vcihsZW4gLyAyKTsKICAgICAgICAgIHZhciBpID0gMDsKICAgICAgICAgIHdoaWxlICh3b3JkcykgewogICAgICAgICAgICB2YXIgdGxlbiA9ICh3b3JkcyA+PSAzNTkpID8gMzU5IDogd29yZHM7CiAgICAgICAgICAgIHdvcmRzIC09IHRsZW47CiAgICAgICAgICAgIGRvIHsKICAgICAgICAgICAgICBzdW0xICs9IChpbnB1dFtpKytdIDw8IDgpOwogICAgICAgICAgICAgIHN1bTIgKz0gc3VtMSArPSBpbnB1dFtpKytdOwogICAgICAgICAgICB9IHdoaWxlICgtLXRsZW4pOwoKICAgICAgICAgICAgc3VtMSA9IChzdW0xICYgMHhmZmZmKSArIChzdW0xID4+PiAxNik7CiAgICAgICAgICAgIHN1bTIgPSAoc3VtMiAmIDB4ZmZmZikgKyAoc3VtMiA+Pj4gMTYpOwogICAgICAgICAgfQoKICAgICAgICAgIC8vIGFkZCB0aGUgc3RyYWdnbGVyIGJ5dGUgaWYgaXQgZXhpc3RzCiAgICAgICAgICBpZiAobGVuICYgMSkgewogICAgICAgICAgICBzdW0yICs9IHN1bTEgKz0gKGlucHV0W2ldIDw8IDgpOwogICAgICAgICAgfQogICAgICAgICAgLy8gc2Vjb25kIHJlZHVjdGlvbiBzdGVwIHRvIHJlZHVjZSBzdW1zIHRvIDE2IGJpdHMKICAgICAgICAgIHN1bTEgPSAoc3VtMSAmIDB4ZmZmZikgKyAoc3VtMSA+Pj4gMTYpOwogICAgICAgICAgc3VtMiA9IChzdW0yICYgMHhmZmZmKSArIChzdW0yID4+PiAxNik7CgogICAgICAgICAgcmV0dXJuIChzdW0yIDw8IDE2IHwgc3VtMSkgPj4+IDA7CiAgICAgICAgfSwKCiAgICAgICAgcmVhZEhlYWRlckluZm86IGZ1bmN0aW9uKGlucHV0LCBkYXRhKSB7CiAgICAgICAgICB2YXIgcHRyID0gZGF0YS5wdHI7CiAgICAgICAgICB2YXIgZmlsZUlkVmlldyA9IG5ldyBVaW50OEFycmF5KGlucHV0LCBwdHIsIDYpOwogICAgICAgICAgdmFyIGhlYWRlckluZm8gPSB7fTsKICAgICAgICAgIGhlYWRlckluZm8uZmlsZUlkZW50aWZpZXJTdHJpbmcgPSBTdHJpbmcuZnJvbUNoYXJDb2RlLmFwcGx5KG51bGwsIGZpbGVJZFZpZXcpOwogICAgICAgICAgaWYgKGhlYWRlckluZm8uZmlsZUlkZW50aWZpZXJTdHJpbmcubGFzdEluZGV4T2YoIkxlcmMyIiwgMCkgIT09IDApIHsKICAgICAgICAgICAgdGhyb3cgIlVuZXhwZWN0ZWQgZmlsZSBpZGVudGlmaWVyIHN0cmluZyAoZXhwZWN0IExlcmMyICk6ICIgKyBoZWFkZXJJbmZvLmZpbGVJZGVudGlmaWVyU3RyaW5nOwogICAgICAgICAgfQogICAgICAgICAgcHRyICs9IDY7CiAgICAgICAgICB2YXIgdmlldyA9IG5ldyBEYXRhVmlldyhpbnB1dCwgcHRyLCA4KTsKICAgICAgICAgIHZhciBmaWxlVmVyc2lvbiA9IHZpZXcuZ2V0SW50MzIoMCwgdHJ1ZSk7CiAgICAgICAgICBoZWFkZXJJbmZvLmZpbGVWZXJzaW9uID0gZmlsZVZlcnNpb247CiAgICAgICAgICBwdHIgKz0gNDsKICAgICAgICAgIGlmIChmaWxlVmVyc2lvbiA+PSAzKSB7CiAgICAgICAgICAgIGhlYWRlckluZm8uY2hlY2tzdW0gPSB2aWV3LmdldFVpbnQzMig0LCB0cnVlKTsgLy9ucm93cwogICAgICAgICAgICBwdHIgKz0gNDsKICAgICAgICAgIH0KCiAgICAgICAgICAvL2tleXMgc3RhcnQgZnJvbSBoZXJlCiAgICAgICAgICB2aWV3ID0gbmV3IERhdGFWaWV3KGlucHV0LCBwdHIsIDEyKTsKICAgICAgICAgIGhlYWRlckluZm8uaGVpZ2h0ID0gdmlldy5nZXRVaW50MzIoMCwgdHJ1ZSk7IC8vbnJvd3MKICAgICAgICAgIGhlYWRlckluZm8ud2lkdGggPSB2aWV3LmdldFVpbnQzMig0LCB0cnVlKTsgLy9uY29scwogICAgICAgICAgcHRyICs9IDg7CiAgICAgICAgICBpZiAoZmlsZVZlcnNpb24gPj0gNCkgewogICAgICAgICAgICBoZWFkZXJJbmZvLm51bURpbXMgPSB2aWV3LmdldFVpbnQzMig4LCB0cnVlKTsKICAgICAgICAg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gICBlcXVhbCA9IGZhbHNlOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBoZWFkZXJJbmZvLm1pblZhbHVlcyA9IG1pblZhbHVlczsKICAgICAgICAgIGhlYWRlckluZm8ubWF4VmFsdWVzID0gbWF4VmFsdWVzOwogICAgICAgICAgcmV0dXJuIGVxdWFsOwogICAgICAgIH0sCgogICAgICAgIHJlYWRTdWJBcnJheTogZnVuY3Rpb24oaW5wdXQsIHB0ciwgT3V0UGl4ZWxUeXBlQXJyYXksIG51bUJ5dGVzKSB7CiAgICAgICAgICB2YXIgcmF3RGF0YTsKICAgICAgICAgIGlmIChPdXRQaXhlbFR5cGVBcnJheSA9PT0gVWludDhBcnJheSkgewogICAgICAgICAgICByYXdEYXRhID0gbmV3IFVpbnQ4QXJyYXkoaW5wdXQsIHB0ciwgbnVtQnl0ZXMpOwogICAgICAgICAgfQogICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHZhciBhcnJheUJ1ZiA9IG5ldyBBcnJheUJ1ZmZlcihudW1CeXRlcyk7CiAgICAgICAgICAgIHZhciBzdG9yZTggPSBuZXcgVWludDhBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICAgIHN0b3JlOC5zZXQobmV3IFVpbnQ4QXJyYXkoaW5wdXQsIHB0ciwgbnVtQnl0ZXMpKTsKICAgICAgICAgICAgcmF3RGF0YSA9IG5ldyBPdXRQaXhlbFR5cGVBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gcmF3RGF0YTsKICAgICAgICB9LAoKICAgICAgICByZWFkTWFzazogZnVuY3Rpb24oaW5wdXQsIGRhdGEpIHsKICAgICAgICAgIHZhciBwdHIgPSBkYXRhLnB0cjsKICAgICAgICAgIHZhciBoZWFkZXJJbmZvID0gZGF0YS5oZWFkZXJJbmZvOwogICAgICAgICAgdmFyIG51bVBpeGVscyA9IGhlYWRlckluZm8ud2lkdGggKiBoZWFkZXJJbmZvLmhlaWdodDsKICAgICAgICAgIHZhciBudW1WYWxpZFBpeGVsID0gaGVhZGVySW5mby5udW1WYWxpZFBpeGVsOwoKICAgICAgICAgIHZhciB2aWV3ID0gbmV3IERhdGFWaWV3KGlucHV0LCBwdHIsIDQpOwogICAgICAgICAgdmFyIG1hc2sgPSB7fTsKICAgICAgICAgIG1hc2subnVtQnl0ZXMgPSB2aWV3LmdldFVpbnQzMigwLCB0cnVlKTsKICAgICAgICAgIHB0ciArPSA0OwoKICAgICAgICAgIC8vIE1hc2sgRGF0YQogICAgICAgICAgaWYgKCgwID09PSBudW1WYWxpZFBpeGVsIHx8IG51bVBpeGVscyA9PT0gbnVtVmFsaWRQaXhlbCkgJiYgMCAhPT0gbWFzay5udW1CeXRlcykgewogICAgICAgICAgICB0aHJvdyAoImludmFsaWQgbWFzayIpOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGJpdHNldCwgcmVzdWx0TWFzazsKICAgICAgICAgIGlmIChudW1WYWxpZFBpeGVsID09PSAwKSB7CiAgICAgICAgICAgIGJpdHNldCA9IG5ldyBVaW50OEFycmF5KE1hdGguY2VpbChudW1QaXhlbHMgLyA4KSk7CiAgICAgICAgICAgIG1hc2suYml0c2V0ID0gYml0c2V0OwogICAgICAgICAgICByZXN1bHRNYXNrID0gbmV3IFVpbnQ4QXJyYXkobnVtUGl4ZWxzKTsKICAgICAgICAgICAgZGF0YS5waXhlbHMucmVzdWx0TWFzayA9IHJlc3VsdE1hc2s7CiAgICAgICAgICAgIHB0ciArPSBtYXNrLm51bUJ5dGVzOwogICAgICAgICAgfS8vID8/Pz8/IGVsc2UgaWYgKGRhdGEubWFzay5udW1CeXRlcyA+IDAgJiYgZGF0YS5tYXNrLm51bUJ5dGVzPCBkYXRhLm51bVZhbGlkUGl4ZWwpIHsKICAgICAgICAgIGVsc2UgaWYgKG1hc2subnVtQnl0ZXMgPiAwKSB7CiAgICAgICAgICAgIGJpdHNldCA9IG5ldyBVaW50OEFycmF5KE1hdGguY2VpbChudW1QaXhlbHMgLyA4KSk7CiAgICAgICAgICAgIHZpZXcgPSBuZXcgRGF0YVZpZXcoaW5wdXQsIHB0ciwgbWFzay5udW1CeXRlcyk7CiAgICAgICAgICAgIHZhciBjbnQgPSB2aWV3LmdldEludDE2KDAsIHRydWUpOwogICAgICAgICAgICB2YXIgaXAgPSAyLCBvcCA9IDAsIHZhbCA9IDA7CiAgICAgICAgICAgIGRvIHsKICAgICAgICAgICAgICBpZiAoY250ID4gMCkgewogICAgICAgICAgICAgICAgd2hpbGUgKGNudC0tKSB7IGJpdHNldFtvcCsrXSA9IHZpZXcuZ2V0VWludDgoaXArKyk7IH0KICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgdmFsID0gdmlldy5nZXRVaW50OChpcCsrKTsKICAgICAgICAgICAgICAgIGNudCA9IC1jbnQ7CiAgICAgICAgICAgICAgICB3aGlsZSAoY250LS0pIHsgYml0c2V0W29wKytdID0gdmFsOyB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGNudCA9IHZpZXcuZ2V0SW50MTYoaXAsIHRydWUpOwogICAgICAgICAgICAgIGlwICs9IDI7CiAgICAgICAgICAgIH0gd2hpbGUgKGlwIDwgbWFzay5udW1CeXRlcyk7CiAgICAgICAgICAgIGlmICgoY250ICE9PSAtMzI3NjgpIHx8IChvcCA8IGJpdHNldC5sZW5ndGgpKSB7CiAgICAgICAgICAgICAgdGhyb3cgIlVuZXhwZWN0ZWQgZW5kIG9mIG1hc2sgUkxFIGVuY29kaW5nIjsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmVzdWx0TWFzayA9IG5ldyBVaW50OEFycmF5KG51bVBpeGVscyk7CiAgICAgICAgICAgIHZhciBtYiA9IDAsIGsgPSAwOwoKICAgICAgICAgICAgZm9yIChrID0gMDsgayA8IG51bVBpeGVsczsgaysrKSB7CiAgICAgICAgICAgICAgaWYgKGsgJiA3KSB7CiAgICAgICAgICAgICAgICBtYiA9IGJpdHNldFtrID4+IDNdOwogICAgICAgICAgICAgICAgbWIgPDw9IGsgJiA3OwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIG1iID0gYml0c2V0W2sgPj4gM107CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGlmIChtYiAmIDEyOCkgewogICAgICAgICAgICAgICAgcmVzdWx0TWFza1trXSA9IDE7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGRhdGEucGl4ZWxzLnJlc3VsdE1hc2sgPSByZXN1bHRNYXNrOwoKICAgICAgICAgICAgbWFzay5iaXRzZXQgPSBiaXRzZXQ7CiAgICAgICAgICAgIHB0ciArPSBtYXNrLm51bUJ5dGVzOwogICAgICAgICAgfQogICAgICAgICAgZGF0YS5wdHIgPSBwdHI7CiAgICAgICAgICBkYXRhLm1hc2sgPSBtYXNrOwogICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfSwKCiAgICAgICAgcmVhZERhdGFPbmVTd2VlcDogZnVuY3Rpb24oaW5wdXQsIGRhdGEsIE91dFBpeGVsVHlwZUFycmF5KSB7CiAgICAgICAgICB2YXIgcHRyID0gZGF0YS5wdHI7CiAgICAgICAgICB2YXIgaGVhZGVySW5mbyA9IGRhdGEuaGVhZGVySW5mbzsKICAgICAgICAgIHZhciBudW1EaW1zID0gaGVhZGVySW5mby5udW1EaW1zOwogICAgICAgICAgdmFyIG51bVBpeGVscyA9IGhlYWRlckluZm8ud2lkdGggKiBoZWFkZXJJbmZvLmhlaWdodDsKICAgICAgICAgIHZhciBpbWFnZVR5cGUgPSBoZWFkZXJJbmZvLmltYWdlVHlwZTsKICAgICAgICAgIHZhciBudW1CeXRlcyA9IGhlYWRlckluZm8ubnVtVmFsaWRQaXhlbCAqIExlcmMySGVscGVycy5nZXREYXRhVHlwZVNpemUoaW1hZ2VUeXBlKSAqIG51bURpbXM7CiAgICAgICAgICAvL2RhdGEucGl4ZWxzLm51bUJ5dGVzID0gbnVtQnl0ZXM7CiAgICAgICAgICB2YXIgcmF3RGF0YTsKICAgICAgICAgIHZhciBtYXNrID0gZGF0YS5waXhlbHMucmVzdWx0TWFzazsKICAgICAgICAgIGlmIChPdXRQaXhlbFR5cGVBcnJheSA9PT0gVWludDhBcnJheSkgewogICAgICAgICAgICByYXdEYXRhID0gbmV3IFVpbnQ4QXJyYXkoaW5wdXQsIHB0ciwgbnVtQnl0ZXMpOwogICAgICAgICAgfQogICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIHZhciBhcnJheUJ1ZiA9IG5ldyBBcnJheUJ1ZmZlcihudW1CeXRlcyk7CiAgICAgICAgICAgIHZhciBzdG9yZTggPSBuZXcgVWludDhBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICAgIHN0b3JlOC5zZXQobmV3IFVpbnQ4QXJyYXkoaW5wdXQsIHB0ciwgbnVtQnl0ZXMpKTsKICAgICAgICAgICAgcmF3RGF0YSA9IG5ldyBPdXRQaXhlbFR5cGVBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICB9CiAgICAgICAgICBpZiAocmF3RGF0YS5sZW5ndGggPT09IG51bVBpeGVscyAqIG51bURpbXMpIHsKICAgICAgICAgICAgZGF0YS5waXhlbHMucmVzdWx0UGl4ZWxzID0gcmF3RGF0YTsKICAgICAgICAgIH0KICAgICAgICAgIGVsc2UgIC8vbWFzawogICAgICAgICAgewogICAgICAgICAgICBkYXRhLnBpeGVscy5yZXN1bHRQaXhlbHMgPSBuZXcgT3V0UGl4ZWxUeXBlQXJyYXkobnVtUGl4ZWxzICogbnVtRGltcyk7CiAgICAgICAgICAgIHZhciB6ID0gMCwgayA9IDAsIGkgPSAwLCBuU3RhcnQgPSAwOwogICAgICAgICAgICBpZiAobnVtRGltcyA+IDEpIHsKICAgICAgICAgICAgICBmb3IgKGk9MDsgaSA8IG51bURpbXM7IGkrKykgewogICAgICAgICAgICAgICAgblN0YXJ0ID0gaSAqIG51bVBpeGVsczsKICAgICAgICAgICAgICAgIGZvciAoayA9IDA7IGsgPCBudW1QaXhlbHM7IGsrKykgewogICAgICAgICAgICAgICAgICBpZiAobWFza1trXSkgewogICAgICAgICAgICAgICAgICAgIGRhdGEucGl4ZWxzLnJlc3VsdFBpeGVsc1tuU3RhcnQgKyBrXSA9IHJhd0RhdGFbeisrXTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICBmb3IgKGsgPSAwOyBrIDwgbnVtUGl4ZWxzOyBrKyspIHsKICAgICAgICAgICAgICAgIGlmIChtYXNrW2tdKSB7CiAgICAgICAgICAgICAgICAgIGRhdGEucGl4ZWxzLnJlc3VsdFBpeGVsc1trXSA9IHJhd0RhdGFbeisrXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICAgIHB0ciArPSBudW1CeXRlczsKICAgICAgICAgIGRhdGEucHRyID0gcHRyOyAgICAgICAvL3JldHVybiBkYXRhOwogICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfSwKCiAgICAgICAgcmVhZEh1ZmZtYW5UcmVlOiBmdW5jdGlvbihpbnB1dCwgZGF0YSkgewogICAgICAgICAgdmFyIEJJVFNfTUFYID0gdGhpcy5IVUZGTUFOX0xVVF9CSVRTX01BWDsgLy84IGlzIHNsb3cgZm9yIHRoZSBsYXJnZSB0ZXN0IGltYWdlCiAgICAgICAgICAvL3ZhciBzaXplX21heCA9IDEgPDwgQklUU19NQVg7CiAgICAgICAgICAvKiAqKioqKioqKioqKioqKioqKioqKioqKioKICAgICAgICAgICAqIHJlYWRpbmcgY29kZSB0YWJsZQogICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKiovCiAgICAgICAgICB2YXIgdmlldyA9IG5ldyBEYXRhVmlldyhpbnB1dCwgZGF0YS5wdHIsIDE2KTsKICAgICAgICAgIGRhdGEucHRyICs9IDE2OwogICAgICAgICAgdmFyIHZlcnNpb24gPSB2aWV3LmdldEludDMyKDAsIHRydWUpOwogICAgICAgICAgaWYgKHZlcnNpb24gPCAyKSB7CiAgICAgICAgICAgIHRocm93ICJ1bnN1cHBvcnRlZCBIdWZmbWFuIHZlcnNpb24iOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHNpemUgPSB2aWV3LmdldEludDMyKDQsIHRydWUpOwogICAgICAgICAgdmFyIGkwID0gdmlldy5nZXRJbnQzMig4LCB0cnVlKTsKICAgICAgICAgIHZhciBpMSA9IHZpZXcuZ2V0SW50MzIoMTIsIHRydWUpOwogICAgICAgICAgaWYgKGkwID49IGkxKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBibG9ja0RhdGFCdWZmZXIgPSBuZXcgVWludDMyQXJyYXkoaTEgLSBpMCk7CiAgICAgICAgICBMZXJjMkhlbHBlcnMuZGVjb2RlQml0cyhpbnB1dCwgZGF0YSwgYmxvY2tEYXRhQnVmZmVyKTsKICAgICAgICAgIHZhciBjb2RlVGFibGUgPSBbXTsgLy9zaXplCiAgICAgICAgICB2YXIgaSwgaiwgaywgbGVuOwoKICAgICAgICAgIGZvciAoaSA9IGkwOyBpIDwgaTE7IGkrKykgewogICAgICAgICAgICBqID0gaSAtIChpIDwgc2l6ZSA/IDAgOiBzaXplKTsvL3dyYXAgYXJvdW5kCiAgICAgICAgICAgIGNvZGVUYWJsZVtqXSA9IHsgZmlyc3Q6IGJsb2NrRGF0YUJ1ZmZlcltpIC0gaTBdLCBzZWNvbmQ6IG51bGwgfTsKICAgICAgICAgIH0KCiAgICAgICAgICB2YXIgZGF0YUJ5dGVzID0gaW5wdXQuYnl0ZUxlbmd0aCAtIGRhdGEucHRyOwogICAgICAgICAgdmFyIGRhdGFXb3JkcyA9IE1hdGguY2VpbChkYXRhQnl0ZXMgLyA0KTsKICAgICAgICAgIHZhciBhcnJheUJ1ZiA9IG5ldyBBcnJheUJ1ZmZlcihkYXRhV29yZHMgKiA0KTsKICAgICAgICAgIHZhciBzdG9yZTggPSBuZXcgVWludDhBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICBzdG9yZTguc2V0KG5ldyBVaW50OEFycmF5KGlucHV0LCBkYXRhLnB0ciwgZGF0YUJ5dGVzKSk7CiAgICAgICAgICB2YXIgc3R1ZmZlZERhdGEgPSBuZXcgVWludDMyQXJyYXkoYXJyYXlCdWYpOyAvL211c3Qgc3RhcnQgZnJvbSB4KjQKICAgICAgICAgIHZhciBiaXRQb3MgPSAwLCB3b3JkLCBzcmNQdHIgPSAwOwogICAgICAgICAgd29yZCA9IHN0dWZmZWREYXRhWzBdOwogICAgICAgICAgZm9yIChpID0gaTA7IGkgPCBpMTsgaSsrKSB7CiAgICAgICAgICAgIGogPSBpIC0gKGkgPCBzaXplID8gMCA6IHNpemUpOy8vd3JhcCBhcm91bmQKICAgICAgICAgICAgbGVuID0gY29kZVRhYmxlW2pdLmZpcnN0OwogICAgICAgICAgICBpZiAobGVuID4gMCkgewogICAgICAgICAgICAgIGNvZGVUYWJsZVtqXS5zZWNvbmQgPSAod29yZCA8PCBiaXRQb3MpID4+PiAoMzIgLSBsZW4pOwoKICAgICAgICAgICAgICBpZiAoMzIgLSBiaXRQb3MgPj0gbGVuKSB7CiAgICAgICAgICAgICAgICBiaXRQb3MgKz0gbGVuOwogICAgICAgICAgICAgICAgaWYgKGJpdFBvcyA9PT0gMzIpIHsKICAgICAgICAgICAgICAgICAgYml0UG9zID0gMDsKICAgICAgICAgICAgICAgICAgc3JjUHRyKys7CiAgICAgICAgICAgICAgICAgIHdvcmQgPSBzdHVmZmVkRGF0YVtzcmNQdHJdOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIGJpdFBvcyArPSBsZW4gLSAzMjsKICAgICAgICAgICAgICAgIHNyY1B0cisrOwogICAgICAgICAgICAgICAgd29yZCA9IHN0dWZmZWREYXRhW3NyY1B0cl07CiAgICAgICAgICAgICAgICBjb2RlVGFibGVbal0uc2Vjb25kIHw9IHdvcmQgPj4+ICgzMiAtIGJpdFBvcyk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgICAgLy9maW5pc2hlZCByZWFkaW5nIGNvZGUgdGFibGUKCiAgICAgICAgICAvKiAqKioqKioqKioqKioqKioqKioqKioqKioKICAgICAgICAgICAqIGJ1aWxkaW5nIGx1dAogICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKiovCiAgICAgICAgICB2YXIgbnVtQml0c0xVVCA9IDAsIG51bUJpdHNMVVRRaWNrID0gMDsKICAgICAgICAgIHZhciB0cmVlID0gbmV3IFRyZWVOb2RlKCk7CiAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29kZVRhYmxlLmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgIGlmIChjb2RlVGFibGVbaV0gIT09IHVuZGVmaW5lZCkgewogICAgICAgICAgICAgIG51bUJpdHNMVVQgPSBNYXRoLm1heChudW1CaXRzTFVULCBjb2RlVGFibGVbaV0uZmlyc3QpOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBpZiAobnVtQml0c0xVVCA+PSBCSVRTX01BWCkgewogICAgICAgICAgICBudW1CaXRzTFVUUWljayA9IEJJVFNfTUFYOwogICAgICAgICAgfQogICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIG51bUJpdHNMVVRRaWNrID0gbnVtQml0c0xVVDsKICAgICAgICAgIH0KICAgICAgICAgIGlmIChudW1CaXRzTFVUID49IDMwKSB7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCJXQVJuaW5nLCBsYXJnZSBOVU0gTFVUIEJJVFMgSVMgIiArIG51bUJpdHNMVVQpOwogICAgICAgICAgfQogICAgICAgICAgdmFyIGRlY29kZUx1dCA9IFtdLCBlbnRyeSwgY29kZSwgbnVtRW50cmllcywgamosIGN1cnJlbnRCaXQsIG5vZGU7CiAgICAgICAgICBmb3IgKGkgPSBpMDsgaSA8IGkxOyBpKyspIHsKICAgICAgICAgICAgaiA9IGkgLSAoaSA8IHNpemUgPyAwIDogc2l6ZSk7Ly93cmFwIGFyb3VuZAogICAgICAgICAgICBsZW4gPSBjb2RlVGFibGVbal0uZmlyc3Q7CiAgICAgICAgICAgIGlmIChsZW4gPiAwKSB7CiAgICAgICAgICAgICAgZW50cnkgPSBbbGVuLCBqXTsKICAgICAgICAgICAgICBpZiAobGVuIDw9IG51bUJpdHNMVVRRaWNrKSB7CiAgICAgICAgICAgICAgICBjb2RlID0gY29kZVRhYmxlW2pdLnNlY29uZCA8PCAobnVtQml0c0xVVFFpY2sgLSBsZW4pOwogICAgICAgICAgICAgICAgbnVtRW50cmllcyA9IDEgPDwgKG51bUJpdHNMVVRRaWNrIC0gbGVuKTsKICAgICAgICAgICAgICAgIGZvciAoayA9IDA7IGsgPCBudW1FbnRyaWVzOyBrKyspIHsKICAgICAgICAgICAgICAgICAgZGVjb2RlTHV0W2NvZGUgfCBrXSA9IGVudHJ5OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vYnVpbGQgdHJlZQogICAgICAgICAgICAgICAgY29kZSA9IGNvZGVUYWJsZVtqXS5zZWNvbmQ7CiAgICAgICAgICAgICAgICBub2RlID0gdHJlZTsKICAgICAgICAgICAgICAgIGZvciAoamogPSBsZW4gLSAxOyBqaiA+PSAwOyBqai0tKSB7CiAgICAgICAgICAgICAgICAgIGN1cnJlbnRCaXQgPSBjb2RlID4+PiBqaiAmIDE7IC8vbm8gbGVmdCBzaGlmdCBhcyBsZW5ndGggY291bGQgYmUgMzAsMzEKICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRCaXQpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIW5vZGUucmlnaHQpIHsKICAgICAgICAgICAgICAgICAgICAgIG5vZGUucmlnaHQgPSBuZXcgVHJlZU5vZGUoKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbm9kZSA9IG5vZGUucmlnaHQ7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFub2RlLmxlZnQpIHsKICAgICAgICAgICAgICAgICAgICAgIG5vZGUubGVmdCA9IG5ldyBUcmVlTm9kZSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBub2RlID0gbm9kZS5sZWZ0OwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIGlmIChqaiA9PT0gMCAmJiAhbm9kZS52YWwpIHsKICAgICAgICAgICAgICAgICAgICBub2RlLnZhbCA9IGVudHJ5WzFdOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICBkZWNvZGVMdXQ6IGRlY29kZUx1dCwKICAgICAgICAgICAgbnVtQml0c0xVVFFpY2s6IG51bUJpdHNMVVRRaWNrLAogICAgICAgICAgICBudW1CaXRzTFVUOiBudW1CaXRzTFVULAogICAgICAgICAgICB0cmVlOiB0cmVlLAogICAgICAgICAgICBzdHVmZmVkRGF0YTogc3R1ZmZlZERhdGEsCiAgICAgICAgICAgIHNyY1B0cjogc3JjUHRyLAogICAgICAgICAgICBiaXRQb3M6IGJpdFBvcwogICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICByZWFkSHVmZm1hbjogZnVuY3Rpb24oaW5wdXQsIGRhdGEsIE91dFBpeGVsVHlwZUFycmF5KSB7CiAgICAgICAgICB2YXIgaGVhZGVySW5mbyA9IGRhdGEuaGVhZGVySW5mbzsKICAgICAgICAgIHZhciBudW1EaW1zID0gaGVhZGVySW5mby5udW1EaW1zOwogICAgICAgICAgdmFyIGhlaWdodCA9IGRhdGEuaGVhZGVySW5mby5oZWlnaHQ7CiAgICAgICAgICB2YXIgd2lkdGggPSBkYXRhLmhlYWRlckluZm8ud2lkdGg7CiAgICAgICAgICB2YXIgbnVtUGl4ZWxzID0gd2lkdGggKiBoZWlnaHQ7CiAgICAgICAgICAvL3ZhciBzaXplX21heCA9IDEgPDwgQklUU19NQVg7CiAgICAgICAgICAvKiAqKioqKioqKioqKioqKioqKioqKioqKioKICAgICAgICAgICAqIHJlYWRpbmcgaHVmZm1hbiBzdHJ1Y3R1cmUgaW5mbwogICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKiovCiAgICAgICAgICB2YXIgaHVmZm1hbkluZm8gPSB0aGlzLnJlYWRIdWZmbWFuVHJlZShpbnB1dCwgZGF0YSk7CiAgICAgICAgICB2YXIgZGVjb2RlTHV0ID0gaHVmZm1hbkluZm8uZGVjb2RlTHV0OwogICAgICAgICAgdmFyIHRyZWUgPSBodWZmbWFuSW5mby50cmVlOwogICAgICAgICAgLy9zdHVmZmVkRGF0YSBpbmNsdWRlcyBodWZmbWFuIGhlYWRlcnMKICAgICAgICAgIHZhciBzdHVmZmVkRGF0YSA9IGh1ZmZtYW5JbmZvLnN0dWZmZWREYXRhOwogICAgICAgICAgdmFyIHNyY1B0ciA9IGh1ZmZtYW5JbmZvLnNyY1B0cjsKICAgICAgICAgIHZhciBiaXRQb3MgPSBodWZmbWFuSW5mby5iaXRQb3M7CiAgICAgICAgICB2YXIgbnVtQml0c0xVVFFpY2sgPSBodWZmbWFuSW5mby5udW1CaXRzTFVUUWljazsKICAgICAgICAgIHZhciBudW1CaXRzTFVUID0gaHVmZm1hbkluZm8ubnVtQml0c0xVVDsKICAgICAgICAgIHZhciBvZmZzZXQgPSBkYXRhLmhlYWRlckluZm8uaW1hZ2VUeXBlID09PSAwID8gMTI4IDogMDsKICAgICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqCiAgICAgICAgICAqICBkZWNvZGUKICAgICAgICAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICAgICAgICAgIHZhciBub2RlLCB2YWwsIGRlbHRhLCBtYXNrID0gZGF0YS5waXhlbHMucmVzdWx0TWFzaywgdmFsVG1wLCB2YWxUbXBRdWljaywgY3VycmVudEJpdDsKICAgICAgICAgIHZhciBpLCBqLCBrLCBpaTsKICAgICAgICAgIHZhciBwcmV2VmFsID0gMDsKICAgICAgICAgIGlmIChiaXRQb3MgPiAwKSB7CiAgICAgICAgICAgIHNyY1B0cisrOwogICAgICAgICAgICBiaXRQb3MgPSAwOwogICAgICAgICAgfQogICAgICAgICAgdmFyIHdvcmQgPSBzdHVmZmVkRGF0YVtzcmNQdHJdOwogICAgICAgICAgdmFyIGRlbHRhRW5jb2RlID0gZGF0YS5lbmNvZGVNb2RlID09PSAxOwogICAgICAgICAgdmFyIHJlc3VsdFBpeGVsc0FsbERpbSA9IG5ldyBPdXRQaXhlbFR5cGVBcnJheShudW1QaXhlbHMgKiBudW1EaW1zKTsKICAgICAgICAgIHZhciByZXN1bHRQaXhlbHMgPSByZXN1bHRQaXhlbHNBbGxEaW07CiAgICAgICAgICB2YXIgaURpbTsKICAgICAgICAgIGZvciAoaURpbSA9IDA7IGlEaW0gPCBoZWFkZXJJbmZvLm51bURpbXM7IGlEaW0rKykgewogICAgICAgICAgICBpZiAobnVtRGltcyA+IDEpIHsKICAgICAgICAgICAgICAvL2dldCB0aGUgbWVtIGJsb2NrIG9mIGN1cnJlbnQgZGltZW5zaW9uCiAgICAgICAgICAgICAgcmVzdWx0UGl4ZWxzID0gbmV3IE91dFBpeGVsVHlwZUFycmF5KHJlc3VsdFBpeGVsc0FsbERpbS5idWZmZXIsIG51bVBpeGVscyAqIGlEaW0sIG51bVBpeGVscyk7CiAgICAgICAgICAgICAgcHJldlZhbCA9IDA7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKGRhdGEuaGVhZGVySW5mby5udW1WYWxpZFBpeGVsID09PSB3aWR0aCAqIGhlaWdodCkgeyAvL2FsbCB2YWxpZAogICAgICAgICAgICAgIGZvciAoayA9IDAsIGkgPSAwOyBpIDwgaGVpZ2h0OyBpKyspIHsKICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCB3aWR0aDsgaisrLCBrKyspIHsKICAgICAgICAgICAgICAgICAgdmFsID0gMDsKICAgICAgICAgICAgICAgICAgdmFsVG1wID0gKHdvcmQgPDwgYml0UG9zKSA+Pj4gKDMyIC0gbnVtQml0c0xVVFFpY2spOwogICAgICAgICAgICAgICAgICB2YWxUbXBRdWljayA9IHZhbFRtcDsvLyA+Pj4gZGVsdGFCaXRzOwogICAgICAgICAgICAgICAgICBpZiAoMzIgLSBiaXRQb3MgPCBudW1CaXRzTFVUUWljaykgewogICAgICAgICAgICAgICAgICAgIHZhbFRtcCB8PSAoKHN0dWZmZWREYXRhW3NyY1B0ciArIDFdKSA+Pj4gKDY0IC0gYml0UG9zIC0gbnVtQml0c0xVVFFpY2spKTsKICAgICAgICAgICAgICAgICAgICB2YWxUbXBRdWljayA9IHZhbFRtcDsvLyA+Pj4gZGVsdGFCaXRzOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIGlmIChkZWNvZGVMdXRbdmFsVG1wUXVpY2tdKSAgICAvLyBpZiB0aGVyZSwgbW92ZSB0aGUgY29ycmVjdCBudW1iZXIgb2YgYml0cyBhbmQgZG9uZQogICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgdmFsID0gZGVjb2RlTHV0W3ZhbFRtcFF1aWNrXVsxXTsKICAgICAgICAgICAgICAgICAgICBiaXRQb3MgKz0gZGVjb2RlTHV0W3ZhbFRtcFF1aWNrXVswXTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICB2YWxUbXAgPSAod29yZCA8PCBiaXRQb3MpID4+PiAoMzIgLSBudW1CaXRzTFVUKTsKICAgICAgICAgICAgICAgICAgICB2YWxUbXBRdWljayA9IHZhbFRtcDsvLyA+Pj4gZGVsdGFCaXRzOwogICAgICAgICAgICAgICAgICAgIGlmICgzMiAtIGJpdFBvcyA8IG51bUJpdHNMVVQpIHsKICAgICAgICAgICAgICAgICAgICAgIHZhbFRtcCB8PSAoKHN0dWZmZWREYXRhW3NyY1B0ciArIDFdKSA+Pj4gKDY0IC0gYml0UG9zIC0gbnVtQml0c0xVVCkpOwogICAgICAgICAgICAgICAgICAgICAgdmFsVG1wUXVpY2sgPSB2YWxUbXA7Ly8gPj4+IGRlbHRhQml0czsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgbm9kZSA9IHRyZWU7CiAgICAgICAgICAgICAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgbnVtQml0c0xVVDsgaWkrKykgewogICAgICAgICAgICAgICAgICAgICAgY3VycmVudEJpdCA9IHZhbFRtcCA+Pj4gKG51bUJpdHNMVVQgLSBpaSAtIDEpICYgMTsKICAgICAgICAgICAgICAgICAgICAgIG5vZGUgPSBjdXJyZW50Qml0ID8gbm9kZS5yaWdodCA6IG5vZGUubGVmdDsKICAgICAgICAgICAgICAgICAgICAgIGlmICghKG5vZGUubGVmdCB8fCBub2RlLnJpZ2h0KSkgewogICAgICAgICAgICAgICAgICAgICAgICB2YWwgPSBub2RlLnZhbDsKICAgICAgICAgICAgICAgICAgICAgICAgYml0UG9zID0gYml0UG9zICsgaWkgKyAxOwogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgIGlmIChiaXRQb3MgPj0gMzIpIHsKICAgICAgICAgICAgICAgICAgICBiaXRQb3MgLT0gMzI7CiAgICAgICAgICAgICAgICAgICAgc3JjUHRyKys7CiAgICAgICAgICAgICAgICAgICAgd29yZCA9IHN0dWZmZWREYXRhW3NyY1B0cl07CiAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgIGRlbHRhID0gdmFsIC0gb2Zmc2V0OwogICAgICAgICAgICAgICAgICBpZiAoZGVsdGFFbmNvZGUpIHsKICAgICAgICAgICAgICAgICAgICBpZiAoaiA+IDApIHsKICAgICAgICAgICAgICAgICAgICAgIGRlbHRhICs9IHByZXZWYWw7ICAgIC8vIHVzZSBvdmVyZmxvdwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChpID4gMCkgewogICAgICAgICAgICAgICAgICAgICAgZGVsdGEgKz0gcmVzdWx0UGl4ZWxzW2sgLSB3aWR0aF07CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgZGVsdGEgKz0gcHJldlZhbDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZGVsdGEgJj0gMHhGRjsgLy9vdmVyZmxvdwogICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1trXSA9IGRlbHRhOy8vb3ZlcmZsb3cKICAgICAgICAgICAgICAgICAgICBwcmV2VmFsID0gZGVsdGE7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgcmVzdWx0UGl4ZWxzW2tdID0gZGVsdGE7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7IC8vbm90IGFsbCB2YWxpZCwgdXNlIG1hc2sKICAgICAgICAgICAgICBmb3IgKGsgPSAwLCBpID0gMDsgaSA8IGhlaWdodDsgaSsrKSB7CiAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgd2lkdGg7IGorKywgaysrKSB7CiAgICAgICAgICAgICAgICAgIGlmIChtYXNrW2tdKSB7CiAgICAgICAgICAgICAgICAgICAgdmFsID0gMDsKICAgICAgICAgICAgICAgICAgICB2YWxUbXAgPSAod29yZCA8PCBiaXRQb3MpID4+PiAoMzIgLSBudW1CaXRzTFVUUWljayk7CiAgICAgICAgICAgICAgICAgICAgdmFsVG1wUXVpY2sgPSB2YWxUbXA7Ly8gPj4+IGRlbHRhQml0czsKICAgICAgICAgICAgICAgICAgICBpZiAoMzIgLSBiaXRQb3MgPCBudW1CaXRzTFVUUWljaykgewogICAgICAgICAgICAgICAgICAgICAgdmFsVG1wIHw9ICgoc3R1ZmZlZERhdGFbc3JjUHRyICsgMV0pID4+PiAoNjQgLSBiaXRQb3MgLSBudW1CaXRzTFVUUWljaykpOwogICAgICAgICAgICAgICAgICAgICAgdmFsVG1wUXVpY2sgPSB2YWxUbXA7Ly8gPj4+IGRlbHRhQml0czsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgaWYgKGRlY29kZUx1dFt2YWxUbXBRdWlja10pICAgIC8vIGlmIHRoZXJlLCBtb3ZlIHRoZSBjb3JyZWN0IG51bWJlciBvZiBiaXRzIGFuZCBkb25lCiAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgdmFsID0gZGVjb2RlTHV0W3ZhbFRtcFF1aWNrXVsxXTsKICAgICAgICAgICAgICAgICAgICAgIGJpdFBvcyArPSBkZWNvZGVMdXRbdmFsVG1wUXVpY2tdWzBdOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgIHZhbFRtcCA9ICh3b3JkIDw8IGJpdFBvcykgPj4+ICgzMiAtIG51bUJpdHNMVVQpOwogICAgICAgICAgICAgICAgICAgICAgdmFsVG1wUXVpY2sgPSB2YWxUbXA7Ly8gPj4+IGRlbHRhQml0czsKICAgICAgICAgICAgICAgICAgICAgIGlmICgzMiAtIGJpdFBvcyA8IG51bUJpdHNMVVQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFsVG1wIHw9ICgoc3R1ZmZlZERhdGFbc3JjUHRyICsgMV0pID4+PiAoNjQgLSBiaXRQb3MgLSBudW1CaXRzTFVUKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhbFRtcFF1aWNrID0gdmFsVG1wOy8vID4+PiBkZWx0YUJpdHM7CiAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICBub2RlID0gdHJlZTsKICAgICAgICAgICAgICAgICAgICAgIGZvciAoaWkgPSAwOyBpaSA8IG51bUJpdHNMVVQ7IGlpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudEJpdCA9IHZhbFRtcCA+Pj4gKG51bUJpdHNMVVQgLSBpaSAtIDEpICYgMTsKICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSA9IGN1cnJlbnRCaXQgPyBub2RlLnJpZ2h0IDogbm9kZS5sZWZ0OwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIShub2RlLmxlZnQgfHwgbm9kZS5yaWdodCkpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICB2YWwgPSBub2RlLnZhbDsKICAgICAgICAgICAgICAgICAgICAgICAgICBiaXRQb3MgPSBiaXRQb3MgKyBpaSArIDE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmIChiaXRQb3MgPj0gMzIpIHsKICAgICAgICAgICAgICAgICAgICAgIGJpdFBvcyAtPSAzMjsKICAgICAgICAgICAgICAgICAgICAgIHNyY1B0cisrOwogICAgICAgICAgICAgICAgICAgICAgd29yZCA9IHN0dWZmZWREYXRhW3NyY1B0cl07CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBkZWx0YSA9IHZhbCAtIG9mZnNldDsKICAgICAgICAgICAgICAgICAgICBpZiAoZGVsdGFFbmNvZGUpIHsKICAgICAgICAgICAgICAgICAgICAgIGlmIChqID4gMCAmJiBtYXNrW2sgLSAxXSkgewogICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSArPSBwcmV2VmFsOyAgICAvLyB1c2Ugb3ZlcmZsb3cKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKGkgPiAwICYmIG1hc2tbayAtIHdpZHRoXSkgewogICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSArPSByZXN1bHRQaXhlbHNbayAtIHdpZHRoXTsKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBkZWx0YSArPSBwcmV2VmFsOwogICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgIGRlbHRhICY9IDB4RkY7IC8vb3ZlcmZsb3cKICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1trXSA9IGRlbHRhOy8vb3ZlcmZsb3cKICAgICAgICAgICAgICAgICAgICAgIHByZXZWYWwgPSBkZWx0YTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICByZXN1bHRQaXhlbHNba10gPSBkZWx0YTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZGF0YS5wdHIgPSBkYXRhLnB0ciArIChzcmNQdHIgKyAxKSAqIDQgKyAoYml0UG9zID4gMCA/IDQgOiAwKTsKICAgICAgICAgIH0KICAgICAgICAgIGRhdGEucGl4ZWxzLnJlc3VsdFBpeGVscyA9IHJlc3VsdFBpeGVsc0FsbERpbTsKICAgICAgICB9LAoKICAgICAgICBkZWNvZGVCaXRzOiBmdW5jdGlvbihpbnB1dCwgZGF0YSwgYmxvY2tEYXRhQnVmZmVyLCBvZmZzZXQsIGlEaW0pIHsKICAgICAgICAgIHsKICAgICAgICAgICAgLy9iaXRzdHVmZiBlbmNvZGluZyBpcyAzCiAgICAgICAgICAgIHZhciBoZWFkZXJJbmZvID0gZGF0YS5oZWFkZXJJbmZvOwogICAgICAgICAgICB2YXIgZmlsZVZlcnNpb24gPSBoZWFkZXJJbmZvLmZpbGVWZXJzaW9uOwogICAgICAgICAgICAvL3ZhciBibG9jayA9IHt9OwogICAgICAgICAgICB2YXIgYmxvY2tQdHIgPSAwOwogICAgICAgICAgICB2YXIgdmlldyA9IG5ldyBEYXRhVmlldyhpbnB1dCwgZGF0YS5wdHIsIDUpOy8vdG8gZG8KICAgICAgICAgICAgdmFyIGhlYWRlckJ5dGUgPSB2aWV3LmdldFVpbnQ4KDApOwogICAgICAgICAgICBibG9ja1B0cisrOwogICAgICAgICAgICB2YXIgYml0czY3ID0gaGVhZGVyQnl0ZSA+PiA2OwogICAgICAgICAgICB2YXIgbiA9IChiaXRzNjcgPT09IDApID8gNCA6IDMgLSBiaXRzNjc7CiAgICAgICAgICAgIHZhciBkb0x1dCA9IChoZWFkZXJCeXRlICYgMzIpID4gMCA/IHRydWUgOiBmYWxzZTsvLzV0aCBiaXQKICAgICAgICAgICAgdmFyIG51bUJpdHMgPSBoZWFkZXJCeXRlICYgMzE7CiAgICAgICAgICAgIHZhciBudW1FbGVtZW50cyA9IDA7CiAgICAgICAgICAgIGlmIChuID09PSAxKSB7CiAgICAgICAgICAgICAgbnVtRWxlbWVudHMgPSB2aWV3LmdldFVpbnQ4KGJsb2NrUHRyKTsgYmxvY2tQdHIrKzsKICAgICAgICAgICAgfSBlbHNlIGlmIChuID09PSAyKSB7CiAgICAgICAgICAgICAgbnVtRWxlbWVudHMgPSB2aWV3LmdldFVpbnQxNihibG9ja1B0ciwgdHJ1ZSk7IGJsb2NrUHRyICs9IDI7CiAgICAgICAgICAgIH0gZWxzZSBpZiAobiA9PT0gNCkgewogICAgICAgICAgICAgIG51bUVsZW1lbnRzID0gdmlldy5nZXRVaW50MzIoYmxvY2tQdHIsIHRydWUpOyBibG9ja1B0ciArPSA0OwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgIHRocm93ICJJbnZhbGlkIHZhbGlkIHBpeGVsIGNvdW50IHR5cGUiOwogICAgICAgICAgICB9CiAgICAgICAgICAgIC8vZml4OiBodWZmbWFuIGNvZGVzIGFyZSBiaXQgc3R1ZmZlZCwgYnV0IG5vdCBib3VuZCBieSBkYXRhJ3MgbWF4IHZhbHVlLCBzbyBuZWVkIHRvIHVzZSBvcmlnaW5hbFVuc3R1ZmYKICAgICAgICAgICAgLy9vZmZzZXQgPSBvZmZzZXQgfHwgMDsKICAgICAgICAgICAgdmFyIHNjYWxlID0gMiAqIGhlYWRlckluZm8ubWF4WkVycm9yOwogICAgICAgICAgICB2YXIgc3R1ZmZlZERhdGEsIGFycmF5QnVmLCBzdG9yZTgsIGRhdGFCeXRlcywgZGF0YVdvcmRzOwogICAgICAgICAgICB2YXIgbHV0QXJyLCBsdXREYXRhLCBsdXRCeXRlcywgYml0c1BlclBpeGVsOwogICAgICAgICAgICB2YXIgek1heCA9IGhlYWRlckluZm8ubnVtRGltcyA+IDEgPyBoZWFkZXJJbmZvLm1heFZhbHVlc1tpRGltXSA6IGhlYWRlckluZm8uek1heDsKICAgICAgICAgICAgaWYgKGRvTHV0KSB7CiAgICAgICAgICAgICAgZGF0YS5jb3VudGVyLmx1dCsrOwogICAgICAgICAgICAgIGx1dEJ5dGVzID0gdmlldy5nZXRVaW50OChibG9ja1B0cik7CiAgICAgICAgICAgICAgYmxvY2tQdHIrKzsKICAgICAgICAgICAgICBkYXRhQnl0ZXMgPSBNYXRoLmNlaWwoKGx1dEJ5d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yBVaW50MzJBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICAgICAgZGF0YS5wdHIgKz0gZGF0YUJ5dGVzOwogICAgICAgICAgICAgIGlmIChmaWxlVmVyc2lvbiA+PSAzKSB7CiAgICAgICAgICAgICAgICBsdXRBcnIgPSBCaXRTdHVmZmVyLnVuc3R1ZmZMVVQyKGx1dERhdGEsIG51bUJpdHMsIGx1dEJ5dGVzIC0gMSwgb2Zmc2V0LCBzY2FsZSwgek1heCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgbHV0QXJyID0gQml0U3R1ZmZlci51bnN0dWZmTFVUKGx1dERhdGEsIG51bUJpdHMsIGx1dEJ5dGVzIC0gMSwgb2Zmc2V0LCBzY2FsZSwgek1heCk7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIC8vbHV0QXJyLnVuc2hpZnQoMCk7CiAgICAgICAgICAgICAgaWYgKGZpbGVWZXJzaW9uID49IDMpIHsKICAgICAgICAgICAgICAgIC8vQml0U3R1ZmZlci51bnN0dWZmMihibG9jaywgYmxvY2tEYXRhQnVmZmVyLCBoZWFkZXJJbmZvLnpNYXgpOwogICAgICAgICAgICAgICAgQml0U3R1ZmZlci51bnN0dWZmMihzdHVmZmVkRGF0YSwgYmxvY2tEYXRhQnVmZmVyLCBiaXRzUGVyUGl4ZWwsIG51bUVsZW1lbnRzLCBsdXRBcnIpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIEJpdFN0dWZmZXIudW5zdHVmZihzdHVmZmVkRGF0YSwgYmxvY2tEYXRhQnVmZmVyLCBiaXRzUGVyUGl4ZWwsIG51bUVsZW1lbnRzLCBsdXRBcnIpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAvL2NvbnNvbGUuZGVidWcoImJpdHN0dWZmZXIiKTsKICAgICAgICAgICAgICBkYXRhLmNvdW50ZXIuYml0c3R1ZmZlcisrOwogICAgICAgICAgICAgIGJpdHNQZXJQaXhlbCA9IG51bUJpdHM7CiAgICAgICAgICAgICAgZGF0YS5wdHIgKz0gYmxvY2tQdHI7CiAgICAgICAgICAgICAgaWYgKGJpdHNQZXJQaXhlbCA+IDApIHsKICAgICAgICAgICAgICAgIGRhdGFCeXRlcyA9IE1hdGguY2VpbChudW1FbGVtZW50cyAqIGJpdHNQZXJQaXhlbCAvIDgpOwogICAgICAgICAgICAgICAgZGF0YVdvcmRzID0gTWF0aC5jZWlsKGRhdGFCeXRlcyAvIDQpOwogICAgICAgICAgICAgICAgYXJyYXlCdWYgPSBuZXcgQXJyYXlCdWZmZXIoZGF0YVdvcmRzICogNCk7CiAgICAgICAgICAgICAgICBzdG9yZTggPSBuZXcgVWludDhBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICAgICAgICBzdG9yZTguc2V0KG5ldyBVaW50OEFycmF5KGlucHV0LCBkYXRhLnB0ciwgZGF0YUJ5dGVzKSk7CiAgICAgICAgICAgICAgICBzdHVmZmVkRGF0YSA9IG5ldyBVaW50MzJBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICAgICAgICBkYXRhLnB0ciArPSBkYXRhQnl0ZXM7CiAgICAgICAgICAgICAgICBpZiAoZmlsZVZlcnNpb24gPj0gMykgewogICAgICAgICAgICAgICAgICBpZiAob2Zmc2V0ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBCaXRTdHVmZmVyLm9yaWdpbmFsVW5zdHVmZjIoc3R1ZmZlZERhdGEsIGJsb2NrRGF0YUJ1ZmZlciwgYml0c1BlclBpeGVsLCBudW1FbGVtZW50cyk7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgQml0U3R1ZmZlci51bnN0dWZmMihzdHVmZmVkRGF0YSwgYmxvY2tEYXRhQnVmZmVyLCBiaXRzUGVyUGl4ZWwsIG51bUVsZW1lbnRzLCBmYWxzZSwgb2Zmc2V0LCBzY2FsZSwgek1heCk7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgICBpZiAob2Zmc2V0ID09IG51bGwpIHsKICAgICAgICAgICAgICAgICAgICBCaXRTdHVmZmVyLm9yaWdpbmFsVW5zdHVmZihzdHVmZmVkRGF0YSwgYmxvY2tEYXRhQnVmZmVyLCBiaXRzUGVyUGl4ZWwsIG51bUVsZW1lbnRzKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBCaXRTdHVmZmVyLnVuc3R1ZmYoc3R1ZmZlZERhdGEsIGJsb2NrRGF0YUJ1ZmZlciwgYml0c1BlclBpeGVsLCBudW1FbGVtZW50cywgZmFsc2UsIG9mZnNldCwgc2NhbGUsIHpNYXgpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgIH0sCgogICAgICAgIHJlYWRUaWxlczogZnVuY3Rpb24oaW5wdXQsIGRhdGEsIE91dFBpeGVsVHlwZUFycmF5KSB7CiAgICAgICAgICB2YXIgaGVhZGVySW5mbyA9IGRhdGEuaGVhZGVySW5mbzsKICAgICAgICAgIHZhciB3aWR0aCA9IGhlYWRlckluZm8ud2lkdGg7CiAgICAgICAgICB2YXIgaGVpZ2h0ID0gaGVhZGVySW5mby5oZWlnaHQ7CiAgICAgICAgICB2YXIgbWljcm9CbG9ja1NpemUgPSBoZWFkZXJJbmZvLm1pY3JvQmxvY2tTaXplOwogICAgICAgICAgdmFyIGltYWdlVHlwZSA9IGhlYWRlckluZm8uaW1hZ2VUeXBlOwogICAgICAgICAgdmFyIGRhdGFUeXBlU2l6ZSA9IExlcmMySGVscGVycy5nZXREYXRhVHlwZVNpem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RhdGEucGl4ZWxzLnJlc3VsdFBpeGVscy5idWZmZXIsIHdpZHRoICogaGVpZ2h0ICogaURpbSAqIGRhdGFUeXBlU2l6ZSwgd2lkdGggKiBoZWlnaHQpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgYnl0ZXNMZWZ0ID0gaW5wdXQuYnl0ZUxlbmd0aCAtIGRhdGEucHRyOwogICAgICAgICAgICAgICAgdmlldyA9IG5ldyBEYXRhVmlldyhpbnB1dCwgZGF0YS5wdHIsIE1hdGgubWluKDEwLCBieXRlc0xlZnQpKTsKICAgICAgICAgICAgICAgIGJsb2NrID0ge307CiAgICAgICAgICAgICAgICBibG9ja1B0ciA9IDA7CiAgICAgICAgICAgICAgICBoZWFkZXJCeXRlID0gdmlldy5nZXRVaW50OCgwKTsKICAgICAgICAgICAgICAgIGJsb2NrUHRyKys7CiAgICAgICAgICAgICAgICBiaXRzNjcgPSAoaGVhZGVyQnl0ZSA+PiA2KSAmIDB4RkY7CiAgICAgICAgICAgICAgICB0ZXN0Q29kZSA9IChoZWFkZXJCeXRlID4+IDIpICYgMTU7ICAgIC8vIHVzZSBiaXRzIDIzNDUgZm9yIGludGVncml0eSBjaGVjawogICAgICAgICAgICAgICAgaWYgKHRlc3RDb2RlICE9PSAoKChibG9ja1ggKiBtaWNyb0Jsb2NrU2l6ZSkgPj4gMykgJiAxNSkpIHsKICAgICAgICAgICAgICAgICAgdGhyb3cgImludGVncml0eSBpc3N1ZSI7CiAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGJsb2NrRW5jb2RpbmcgPSBoZWFkZXJCeXRlICYgMzsKICAgICAgICAgICAgICAgIGlmIChibG9ja0VuY29kaW5nID4gMykgewogICAgICAgICAgICAgICAgICBkYXRhLnB0ciArPSBibG9ja1B0cjsKICAgICAgICAgICAgICAgICAgdGhyb3cgIkludmFsaWQgYmxvY2sgZW5jb2RpbmcgKCIgKyBibG9ja0VuY29kaW5nICsgIikiOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSBpZiAoYmxvY2tFbmNvZGluZyA9PT0gMikgeyAvL2NvbnN0YW50IDAKICAgICAgICAgICAgICAgICAgZGF0YS5jb3VudGVyLmNvbnN0YW50Kys7CiAgICAgICAgICAgICAgICAgIGRhdGEucHRyICs9IGJsb2NrUHRyOwogICAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGVsc2UgaWYgKGJsb2NrRW5jb2RpbmcgPT09IDApIHsgIC8vdW5jb21wcmVzc2VkCiAgICAgICAgICAgICAgICAgIGRhdGEuY291bnRlci51bmNvbXByZXNzZWQrKzsKICAgICAgICAgICAgICAgICAgZGF0YS5wdHIgKz0gYmxvY2tQdHI7CiAgICAgICAgICAgICAgICAgIG51bUJ5dGVzID0gdGhpc0Jsb2NrSGVpZ2h0ICogdGhpc0Jsb2NrV2lkdGggKiBkYXRhVHlwZVNpemU7CiAgICAgICAgICAgICAgICAgIGJ5dGVzbGVmdCA9IGlucHV0LmJ5dGVMZW5ndGggLSBkYXRhLnB0cjsKICAgICAgICAgICAgICAgICAgbnVtQnl0ZXMgPSBudW1CeXRlcyA8IGJ5dGVzbGVmdCA/IG51bUJ5dGVzIDogYnl0ZXNsZWZ0OwogICAgICAgICAgICAgICAgICAvL2JpdCBhbGlnbm1lbnQKICAgICAgICAgICAgICAgICAgYXJyYXlCdWYgPSBuZXcgQXJyYXlCdWZmZXIoKG51bUJ5dGVzICUgZGF0YVR5cGVTaXplKSA9PT0gMCA/IG51bUJ5dGVzIDogKG51bUJ5dGVzICsgZGF0YVR5cGVTaXplIC0gbnVtQnl0ZXMgJSBkYXRhVHlwZVNpemUpKTsKICAgICAgICAgICAgICAgICAgc3RvcmU4ID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlCdWYpOwogICAgICAgICAgICAgICAgICBzdG9yZTguc2V0KG5ldyBVaW50OEFycmF5KGlucHV0LCBkYXRhLnB0ciwgbnVtQnl0ZXMpKTsKICAgICAgICAgICAgICAgICAgcmF3RGF0YSA9IG5ldyBPdXRQaXhlbFR5cGVBcnJheShhcnJheUJ1Zik7CiAgICAgICAgICAgICAgICAgIHogPSAwOwogICAgICAgICAgICAgICAgICBpZiAobWFzaykgewogICAgICAgICAgICAgICAgICAgIGZvciAocm93ID0gMDsgcm93IDwgdGhpc0Jsb2NrSGVpZ2h0OyByb3crKykgewogICAgICAgICAgICAgICAgICAgICAgZm9yIChjb2wgPSAwOyBjb2wgPCB0aGlzQmxvY2tXaWR0aDsgY29sKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2tbb3V0UHRyXSkgewogICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1tvdXRQdHJdID0gcmF3RGF0YVt6KytdOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIG91dFB0cisrOwogICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgb3V0UHRyICs9IG91dFN0cmlkZTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgZWxzZSB7Ly9hbGwgdmFsaWQKICAgICAgICAgICAgICAgICAgICBmb3IgKHJvdyA9IDA7IHJvdyA8IHRoaXNCbG9ja0hlaWdodDsgcm93KyspIHsKICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29sID0gMDsgY29sIDwgdGhpc0Jsb2NrV2lkdGg7IGNvbCsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1tvdXRQdHIrK10gPSByYXdEYXRhW3orK107CiAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICBvdXRQdHIgKz0gb3V0U3RyaWRlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICA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GhhbiBhcmJpdHJhcnkgdmFsdWVzCiAgICAgICAgICAgICAgICAgICAgaWYgKG1hc2spIHsKICAgICAgICAgICAgICAgICAgICAgIGZvciAocm93ID0gMDsgcm93IDwgdGhpc0Jsb2NrSGVpZ2h0OyByb3crKykgewogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbCA9IDA7IGNvbCA8IHRoaXNCbG9ja1dpZHRoOyBjb2wrKykgewogICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtYXNrW291dFB0cl0pIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1tvdXRQdHJdID0gb2Zmc2V0OwogICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRQdHIrKzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBvdXRQdHIgKz0gb3V0U3RyaWRlOwogICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgIGZvciAocm93ID0gMDsgcm93IDwgdGhpc0Jsb2NrSGVpZ2h0OyByb3crKykgewogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbCA9IDA7IGNvbCA8IHRoaXNCbG9ja1dpZHRoOyBjb2wrKykgewogICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdFBpeGVsc1tvdXRQdHIrK10gPSBvZmZzZXQ7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgb3V0UHRyICs9IG91dFN0cmlkZTsKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgZWxzZSB7IC8vYml0c3R1ZmYgZW5jb2RpbmcgaXMgMwogICAgICAgICAgICAgICAgICAgIGRhdGEucHRyICs9IGJsb2NrUHRyOwogICAgICAgICAgICAgICAgICAgIC8vaGVhdnkgbGlmdGluZwogICAgICAgICAgICAgICAgICAgIExlcmMySGVscGVycy5kZWNvZGVCaXRzKGlucHV0LCBkYXRhLCBibG9ja0RhdGFCdWZmZXIsIG9mZnNldCwgaURpbSk7CiAgICAgICAgICAgICAgICAgICAgYmxvY2tQdHIgPSAwOwogICAgICAgICAgICAgICAgICAgIGlmIChtYXNrKSB7CiAgICAgICAgICAgICAgICAgICAgICBmb3IgKHJvdyA9IDA7IHJvdyA8IHRoaXNCbG9ja0hlaWdodDsgcm93KyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb2wgPSAwOyBjb2wgPCB0aGlzQmxvY2tXaWR0aDsgY29sKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobWFza1tvdXRQdHJdKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRQaXhlbHNbb3V0UHRyXSA9IGJsb2NrRGF0YUJ1ZmZlcltibG9ja1B0cisrXTsKICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0UHRyKys7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgb3V0UHRyICs9IG91dFN0cmlkZTsKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICBmb3IgKHJvdyA9IDA7IHJvdyA8IHRoaXNCbG9ja0hlaWdodDsgcm93KyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb2wgPSAwOyBjb2wgPCB0aGlzQmxvY2tXaWR0aDsgY29sKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHRQaXhlbHNbb3V0UHRyKytdID0gYmxvY2tEYXRhQnVmZmVyW2Jsb2NrUHRyKytdOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIG91dFB0ciArPSBvdXRTdHJpZGU7CiAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgLyoqKioqKioqKioqKioqKioqCiAgICAgICAgKiAgcHJpdmF0ZSBtZXRob2RzIChoZWxwZXIgbWV0aG9kcykKICAgICAgICAqKioqKioqKioqKioqKioqKi8KCiAgICAgICAgZm9ybWF0RmlsZUluZm86IGZ1bmN0aW9uKGRhdGEpIHsKICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICJmaWxlSWRlbnRpZmllclN0cmluZyI6IGRhdGEuaGVhZGVySW5mby5maWxlSWRlbnRpZmllclN0cmluZywKICAgICAgICAgICAgImZpbGVWZXJzaW9uIjogZGF0YS5oZWFkZXJJbmZvLmZpbGVWZXJzaW9uLAogICAgICAgICAgICAiaW1hZ2VUeXBlIjogZGF0YS5oZWFkZXJJbmZvLmltYWdlVHlwZSwKICAgICAgICAgICAgImhlaWdodCI6IGRhdGEuaGVhZGVySW5mby5oZWlnaHQsCiAgICAgICAgICAgICJ3aWR0aCI6IGRhdGEuaGVhZGVySW5mby53aWR0aCwKICAgICAgICAgICAgIm51bVZhbGlkUGl4ZWwiOiBkYXRhLmhlYWRlckluZm8ubnVtVmFsaWRQaXhlbCwKICAgICAgICAgICAgIm1pY3JvQmxvY2tTaXplIjogZGF0YS5oZWFkZXJJbmZvLm1pY3JvQmxvY2tTaXplLAogICAgICAgICAgICAiYmxvYlNpemUiOiBkYXRhLmhlYWRlckluZm8uYmxvYlNpemUsCiAgICAgICAgICAgICJtYXhaRXJyb3IiOiBkYXRhLmhlYWRlckluZm8ubWF4WkVycm9yLAogICAgICAgICAgICAicGl4ZWxUeXBlIjogTGVyYzJIZWxwZXJzLmdldFBpeGVsVHlwZShkYXRhLmhlYWRlckluZm8uaW1hZ2VUeXBlKSwKICAgICAgICAgICAgImVvZk9mZnNldCI6IGRhdGEuZW9mT2Zmc2V0LAogICAgICAgICAgICAibWFzayI6IGRhdGEubWFzayA/IHsKICAgICAgICAgICAgICAibnVtQnl0ZXMiOiBkYXRhLm1hc2subnVtQnl0ZXMKICAgICAgICAgICAgfSA6IG51bGwsCiAgICAgICAgICAgICJwaXhlbHMiOiB7CiAgICAgICAgICAgICAgIm51bUJsb2Nrc1giOiBkYXRhLnBpeGVscy5udW1CbG9ja3NYLAogICAgICAgICAgICAgICJudW1CbG9ja3NZIjogZGF0YS5waXhlbHMubnVtQmxvY2tzWSwKICAgICAgICAgICAgICAvLyJudW1CeXRlcyI6IGRhdGEucGl4ZWxzLm51bUJ5dGVzLAogICAgICAgICAgICAgICJtYXhWYWx1ZSI6IGRhdGEuaGVhZGVySW5mby56TWF4LAogICAgICAgICAgICAgICJtaW5WYWx1ZSI6IGRhdGEuaGVhZGVySW5mby56TWluLAogICAgICAgICAgICAgICJub0RhdGFWYWx1ZSI6IGRhdGEubm9EYXRhVmFsdWUKICAgICAgICAgICAgfQogICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBjb25zdHJ1Y3RDb25zdGFudFN1cmZhY2U6IGZ1bmN0aW9uKGRhdGEpIHsKICAgICAgICAgIHZhciB2YWwgPSBkYXRhLmhlYWRlckluZm8uek1heDsKICAgICAgICAgIHZhciBudW1EaW1zID0gIGRhdGEuaGVhZGVySW5mby5udW1EaW1zOwogICAgICAgICAgdmFyIG51bVBpeGVscyA9IGRhdGEuaGVhZGVySW5mby5oZWlnaHQgKiBkYXRhLmhlYWRlckluZm8ud2lkdGg7CiAgICAgICAgICB2YXIgbnVtUGl4ZWxBbGxEaW1zID0gbnVtUGl4ZWxzICogbnVtRGltczsKICAgICAgICAgIHZhciBpPTAsIGsgPSAwLCBuU3RhcnQ9MDsKICAgICAgICAgIHZhciBtYXNrID0gZGF0YS5waXhlbHMucmVzdWx0TWFzazsKICAgICAgICAgIGlmIChtYXNrKSB7CiAgICAgICAgICAgIGlmIChudW1EaW1zID4gMSkgewogICAgICAgICAgICAgIGZvciAoaT0wOyBpIDwgbnVtRGltczsgaSsrKSB7CiAgICAgICAgICAgICAgICBuU3RhcnQgPSBpICogbnVtUGl4ZWxzOwogICAgICAgICAgICAgICAgZm9yIChrID0gMDsgayA8IG51bVBpeGVsczsgaysrKSB7CiAgICAgICAgICAgICAgICAgIGlmIChtYXNrW2tdKSB7CiAgICAgICAgICAgICAgICAgICAgZGF0YS5waXhlbHMucmVzdWx0UGl4ZWxzW25TdGFydCArIGtdID0gdmFsOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgIGZvciAoayA9IDA7IGsgPCBudW1QaXhlbHM7IGsrKykgewogICAgICAgICAgICAgICAgaWYgKG1hc2tba10pIHsKICAgICAgICAgICAgICAgICAgZGF0YS5waXhlbHMucmVzdWx0UGl4ZWxzW2tdID0gdmFsOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgIGlmIChkYXRhLnBpeGVscy5yZXN1bHRQaXhlbHMuZmlsbCkgewogICAgICAgICAgICAgIGRhdGEucGl4ZWxzLnJlc3VsdFBpeGVscy5maWxsKHZhbCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgZm9yIChrID0gMDsgayA8IG51bVBpeGVsQWxsRGltczsgaysrKSB7CiAgICAgICAgICAgICAgICBkYXRhLnBpeGVscy5yZXN1bHRQaXhlbHNba10gPSB2YWw7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm47CiAgICAgICAgfSwKCiAgICAgICAgZ2V0RGF0YVR5cGVBcnJheTogZnVuY3Rpb24odCkgewogICAgICAgICAgdmFyIHRwOwogICAgICAgICAgc3dpdGNoICh0KSB7CiAgICAgICAgICAgIGNhc2UgMDogLy9jaGFyCiAgICAgICAgICAgICAgdHAgPSBJbnQ4QXJyYXk7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMTogLy9ieXRlCiAgICAgICAgICAgICAgdHAgPSBVaW50OEFycmF5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDI6IC8vc2hvcnQKICAgICAgICAgICAgICB0cCA9IEludDE2QXJyYXk7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMzogLy91c2hvcnQKICAgICAgICAgICAgICB0cCA9IFVpbnQxNkFycmF5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDQ6CiAgICAgICAgICAgICAgdHAgPSBJbnQzMkFycmF5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDU6CiAgICAgICAgICAgICAgdHAgPSBVaW50MzJBcnJheTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA2OgogICAgICAgICAgICAgIHRwID0gRmxvYXQzMkFycmF5OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDc6CiAgICAgICAgICAgICAgdHAgPSBGbG9hdDY0QXJyYXk7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgdHAgPSBGbG9hdDMyQXJyYXk7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gdHA7CiAgICAgICAgfSwKCiAgICAgICAgZ2V0UGl4ZWxUeXBlOiBmdW5jdGlvbih0KSB7CiAgICAgICAgICB2YXIgdHA7CiAgICAgICAgICBzd2l0Y2ggKHQpIHsKICAgICAgICAgICAgY2FzZSAwOiAvL2NoYXIKICAgICAgICAgICAgICB0cCA9ICJTOCI7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMTogLy9ieXRlCiAgICAgICAgICAgICAgdHAgPSAiVTgiOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDI6IC8vc2hvcnQKICAgICAgICAgICAgICB0cCA9ICJTMTYiOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDM6IC8vdXNob3J0CiAgICAgICAgICAgICAgdHAgPSAiVTE2IjsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA0OgogICAgICAgICAgICAgIHRwID0gIlMzMiI7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNToKICAgICAgICAgICAgICB0cCA9ICJVMzIiOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDY6CiAgICAgICAgICAgICAgdHAgPSAiRjMyIjsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA3OgogICAgICAgICAgICAgIHRwID0gIkY2NCI7IC8vbm90IHN1cHBvcnRlZAogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgIHRwID0gIkYzMiI7CiAgICAgICAgICB9CiAgICAgICAgICByZXR1cm4gdHA7CiAgICAgICAgfSwKCiAgICAgICAgaXNWYWxpZFBpeGVsVmFsdWU6IGZ1bmN0aW9uKHQsIHZhbCkgewogICAgICAgICAgaWYgKHZhbCA9PSBudWxsKSB7CiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgIH0KICAgICAgICAgIHZhciBpc1ZhbGlkOwogICAgICAgICAgc3dpdGNoICh0KSB7CiAgICAgICAgICAgIGNhc2UgMDogLy9jaGFyCiAgICAgICAgICAgICAgaXNWYWxpZCA9IHZhbCA+PSAtMTI4ICYmIHZhbCA8PSAxMjc7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMTogLy9ieXRlICAodW5zaWduZWQgY2hhcikKICAgICAgICAgICAgICBpc1ZhbGlkID0gdmFsID49IDAgJiYgdmFsIDw9IDI1NTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAyOiAvL3Nob3J0CiAgICAgICAgICAgICAgaXNWYWxpZCA9IHZhbCA+PSAtMzI3NjggJiYgdmFsIDw9IDMyNzY3OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDM6IC8vdXNob3J0CiAgICAgICAgICAgICAgaXNWYWxpZCA9IHZhbCA+PSAwICYmIHZhbCA8PSA2NTUzNjsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA0OiAvL2ludCAzMgogICAgICAgICAgICAgIGlzVmFsaWQgPSB2YWwgPj0gLTIxNDc0ODM2NDggJiYgdmFsIDw9IDIxNDc0ODM2NDc7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNTogLy91aW5pdCAzMgogICAgICAgICAgICAgIGlzVmFsaWQgPSB2YWwgPj0gMCAmJiB2YWwgPD0gNDI5NDk2NzI5NjsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA2OgogICAgICAgICAgICAgIGlzVmFsaWQgPSB2YWwgPj0gLTMuNDAyNzk5OTM4NzkwMTQ4NGUrMzggJiYgdmFsIDw9IDMuNDAyNzk5OTM4NzkwMTQ4NGUrMzg7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNzoKICAgICAgICAgICAgICBpc1ZhbGlkID0gdmFsID49IDVlLTMyNCAmJiB2YWwgPD0gMS43OTc2OTMxMzQ4NjIzMTU3ZSszMDg7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgaXNWYWxpZCA9IGZhbHNlOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIGlzVmFsaWQ7CiAgICAgICAgfSwKCiAgICAgICAgZ2V0RGF0YVR5cGVTaXplOiBmdW5jdGlvbih0KSB7CiAgICAgICAgICB2YXIgcyA9IDA7CiAgICAgICAgICBzd2l0Y2ggKHQpIHsKICAgICAgICAgICAgY2FzZSAwOiAvL3VieXRlCiAgICAgICAgICAgIGNhc2UgMTogLy9ieXRlCiAgICAgICAgICAgICAgcyA9IDE7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMjogLy9zaG9ydAogICAgICAgICAgICBjYXNlIDM6IC8vdXNob3J0CiAgICAgICAgICAgICAgcyA9IDI7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNDoKICAgICAgICAgICAgY2FzZSA1OgogICAgICAgICAgICBjYXNlIDY6CiAgICAgICAgICAgICAgcyA9IDQ7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNzoKICAgICAgICAgICAgICBzID0gODsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICBzID0gdDsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBzOwogICAgICAgIH0sCgogICAgICAgIGdldERhdGFUeXBlVXNlZDogZnVuY3Rpb24oZHQsIHRjKSB7CiAgICAgICAgICB2YXIgdCA9IGR0OwogICAgICAgICAgc3dpdGNoIChkdCkgewogICAgICAgICAgICBjYXNlIDI6IC8vc2hvcnQKICAgICAgICAgICAgY2FzZSA0OiAvL2xvbmcKICAgICAgICAgICAgICB0ID0gZHQgLSB0YzsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSAzOiAvL3VzaG9ydAogICAgICAgICAgICBjYXNlIDU6IC8vdWxvbmcKICAgICAgICAgICAgICB0ID0gZHQgLSAyICogdGM7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNjogLy9mbG9hdAogICAgICAgICAgICAgIGlmICgwID09PSB0YykgewogICAgICAgICAgICAgICAgdCA9IGR0OwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIGlmICgxID09PSB0YykgewogICAgICAgICAgICAgICAgdCA9IDI7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdCA9IDE7Ly9ieXRlCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDc6IC8vZG91YmxlCiAgICAgICAgICAgICAgaWYgKDAgPT09IHRjKSB7CiAgICAgICAgICAgICAgICB0ID0gZHQ7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgdCA9IGR0IC0gMiAqIHRjICsgMTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgdCA9IGR0OwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgfQogICAgICAgICAgcmV0dXJuIHQ7CiAgICAgICAgfSwKCiAgICAgICAgZ2V0T25lUGl4ZWw6IGZ1bmN0aW9uKGJsb2NrLCBibG9ja1B0ciwgb2Zmc2V0VHlwZSwgdmlldykgewogICAgICAgICAgdmFyIHRlbXAgPSAwOwogICAgICAgICAgc3dpdGNoIChvZmZzZXRUeXBlKSB7CiAgICAgICAgICAgIGNhc2UgMDogLy9jaGFyCiAgICAgICAgICAgICAgdGVtcCA9IHZpZXcuZ2V0SW50OChibG9ja1B0cik7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgMTogLy9ieXRlCiAgICAgICAgICAgICAgdGVtcCA9IHZpZXcuZ2V0VWludDgoYmxvY2tQdHIpOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDI6CiAgICAgICAgICAgICAgdGVtcCA9IHZpZXcuZ2V0SW50MTYoYmxvY2tQdHIsIHRydWUpOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlIDM6CiAgICAgICAgICAgICAgdGVtcCA9IHZpZXcuZ2V0VWludDE2KGJsb2NrUHRyLCB0cnVlKTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA0OgogICAgICAgICAgICAgIHRlbXAgPSB2aWV3LmdldEludDMyKGJsb2NrUHRyLCB0cnVlKTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA1OgogICAgICAgICAgICAgIHRlbXAgPSB2aWV3LmdldFVJbnQzMihibG9ja1B0ciwgdHJ1ZSk7CiAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIGNhc2UgNjoKICAgICAgICAgICAgICB0ZW1wID0gdmlldy5nZXRGbG9hdDMyKGJsb2NrUHRyLCB0cnVlKTsKICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgY2FzZSA3OgogICAgICAgICAgICAgIC8vdGVtcCA9IHZpZXcuZ2V0RmxvYXQ2NChibG9ja1B0ciwgdHJ1ZSk7CiAgICAgICAgICAgICAgLy9ibG9ja1B0ciArPSA4OwogICAgICAgICAgICAgIC8vbGVyYzIgZW5jb2RpbmcgZG9lc250IGhhbmRsZSBmbG9hdCA2NCwgZm9yY2UgdG8gZmxvYXQzMj8/PwogICAgICAgICAgICAgIHRlbXAgPSB2aWV3LmdldEZsb2F0NjQoYmxvY2tQdHIsIHRydWUpOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgIHRocm93ICgidGhlIGRlY29kZXIgZG9lcyBub3QgdW5kZXJzdGFuZCB0aGlzIHBpeGVsIHR5cGUiKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiB0ZW1wOwogICAgICAgIH0KICAgICAgfTsKCiAgICAgIC8qKioqKioqKioq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9iamVjdCovIG9wdGlvbnMpIHsKICAgICAgICAgIC8vY3VycmVudGx5IHRoZXJlJ3MgYSBidWcgaW4gdGhlIHNwYXJzZSBhcnJheSwgc28gcGxlYXNlIGRvIG5vdCBzZXQgdG8gZmFsc2UKICAgICAgICAgIG9wdGlvbnMgPSBvcHRpb25zIHx8IHt9OwogICAgICAgICAgdmFyIG5vRGF0YVZhbHVlID0gb3B0aW9ucy5ub0RhdGFWYWx1ZTsKCiAgICAgICAgICAvL2luaXRpYWxpemUKICAgICAgICAgIHZhciBpID0gMCwgZGF0YSA9IHt9OwogICAgICAgICAgZGF0YS5wdHIgPSBvcHRpb25zLmlucHV0T2Zmc2V0IHx8IDA7CiAgICAgICAgICBkYXRhLnBpeGVscyA9IHt9OwoKICAgICAgICAgIC8vIEZpbGUgaGVhZGVyCiAgICAgICAgICBpZiAoIUxlcmMySGVscGVycy5yZWFkSGVhZGVySW5mbyhpbnB1dCwgZGF0YSkpIDsKICAgICAgICAgIHZhciBoZWFkZXJJbmZvID0gZGF0YS5oZWFkZXJJbmZvOwogICAgICAgICAgdmFyIGZpbGVWZXJzaW9uID0gaGVhZGVySW5mby5maWxlVmVyc2lvbjsKICAgICAgICAgIHZhciBPdXRQaXhlbFR5cGVBcnJheSA9IExlcmMySGVscGVycy5nZXREYXRhVHlwZUFycmF5KGhlYWRlckluZm8uaW1hZ2VUeXBlKTsKCiAgICAgICAgICAvLyBNYXNrIEhlYWRlcgogICAgICAgICAgTGVyYzJIZWxwZXJzLnJlYWRNYXNrKGlucHV0LCBkYXRhKTsKICAgICAgICAgIGlmIChoZWFkZXJJbmZvLm51bVZhbGlkUGl4ZWwgIT09IGhlYWRlckluZm8ud2lkdGggKiBoZWFkZXJJbmZvLmhlaWdodCAmJiAhZGF0YS5waXhlbHMucmVzdWx0TWFzaykgewogICAgICAgICAgICBkYXRhLnBpeGVscy5yZXN1bHRNYXNrID0gb3B0aW9ucy5tYXNrRGF0YTsKICAgICAgICAgIH0KCiAgICAgICAgICB2YXIgbnVtUGl4ZWxzID0gaGVhZGVySW5mby53aWR0aCAqIGhlYWRlckluZm8uaGVpZ2h0OwogICAgICAgICAgZGF0YS5waXhlbHMucmVzdWx0UGl4ZWxzID0gbmV3IE91dFBpeGVsVHlwZUFycmF5KG51bVBpeGVscyAqIGhlYWRlckluZm8ubnVtRGltcyk7CgogICAgICAgICAgZGF0YS5jb3VudGVyID0gewogICAgICAgICAgICBvbmVzd2VlcDogMCwKICAgICAgICAgICAgdW5jb21wcmVzc2VkOiAwLAogICAgICAgICAgICBsdXQ6IDAsCiAgICAgICAgICAgIGJpdHN0dWZmZXI6IDAsCiAgICAgICAgICAgIGNvbnN0YW50OiAwLAogICAgICAgICAgICBjb25zdGFudG9mZnNldDogMAogICAgICAgICAgfTsKICAgICAgICAgIGlmIChoZWFkZXJJbmZvLm51bVZhbGlkUGl4ZWwgIT09IDApIHsKICAgICAgICAgICAgLy9ub3QgdGVzdGVkCiAgICAgICAgICAgIGlmIChoZWFkZXJJbmZvLnpNYXggPT09IGhlYWRlckluZm8uek1pbikgLy9jb25zdGFudCBzdXJmYWNlCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICBMZXJjMkhlbHBlcnMuY29uc3RydWN0Q29uc3RhbnRTdXJmYWNlKGRhdGEpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKGZpbGVWZXJzaW9uID49IDQgJiYgTGVyYzJIZWxwZXJzLmNoZWNrTWluTWF4UmFuZ2VzKGlucHV0LCBkYXRhKSkgewogICAgICAgICAgICAgIExlcmMySGVscGVycy5jb25zdHJ1Y3RDb25zdGFudFN1cmZhY2UoZGF0YSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgdmFyIHZpZXcgPSBuZXcgRGF0YVZpZXcoaW5wdXQsIGRhdGEucHRyLCAyKTsKICAgICAgICAgICAgICB2YXIgYlJlYWREYXRhT25lU3dlZXAgPSB2aWV3LmdldFVpbnQ4KDApOwogICAgICAgICAgICAgIGRhdGEucHRyKys7CiAgICAgICAgICAgICAgaWYgKGJSZWFkRGF0YU9uZVN3ZWVwKSB7CiAgICAgICAgICAgICAgICAvL2NvbnNvbGUuZGVidWcoIk9uZVN3ZWVwIik7CiAgICAgICAgICAgICAgICBMZXJjMkhlbHBlcnMucmVhZERhdGFPbmVTd2VlcChpbnB1dCwgZGF0YSwgT3V0UGl4ZWxUeXBlQXJyYXkpOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIC8vbGVyYzIuMTogLy9iaXRzdHVmZmluZyArIGx1dAogICAgICAgICAgICAgICAgLy9sZXJjMi4yOiAvL2JpdHN0dWZmaW5nICsgbHV0ICsgaHVmZm1hbgogICAgICAgICAgICAgICAgLy9sZXJjMi4zOiBuZXcgYml0c3R1ZmZlcgogICAgICAgICAgICAgICAgaWYgKGZpbGVWZXJzaW9uID4gMSAmJiBoZWFkZXJJbmZvLmltYWdlVHlwZSA8PSAxICYmIE1hdGguYWJzKGhlYWRlckluZm8ubWF4WkVycm9yIC0gMC41KSA8IDAuMDAwMDEpIHsKICAgICAgICAgICAgICAgICAgLy90aGlzIGlzIDIueCBwbHVzIDggYml0ICh1bnNpZ25lZCBhbmQgc2lnbmVkKSBkYXRhLCBwb3NzaWJsaXR5IG9mIEh1ZmZtYW4KICAgICAgICAgICAgICAgICAgdmFyIGZsYWdIdWZmbWFuID0gdmlldy5nZXRVaW50OCgxKTsKICAgICAgICAgICAgICAgICAgZGF0YS5wdHIrKzsKICAgICAgICAgICAgICAgICAgZGF0YS5lbmNvZGVNb2RlID0gZmxhZ0h1ZmZtYW47CiAgICAgICAgICAgICAgICAgIGlmIChmbGFnSHVmZm1hbiA+IDIgfHwgKGZpbGVWZXJzaW9uIDwgNCAmJiBmbGFnSHVmZm1hbiA+IDEpKSB7CiAgICAgICAgICAgICAgICAgICAgdGhyb3cgIkludmFsaWQgSHVmZm1hbiBmbGFnICIgKyBmbGFnSHVmZm1hbjsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpZiAoZmxhZ0h1ZmZtYW4pIHsvLzEgLSBkZWx0YSBIdWZmbWFuLCAyIC0gSHVmZm1hbgogICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coIkh1ZmZtYW4iKTsKICAgICAgICAgICAgICAgICAgICBMZXJjMkhlbHBlcnMucmVhZEh1ZmZtYW4oaW5wdXQsIGRhdGEsIE91dFBpeGVsVHlwZUFycmF5KTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKCJUaWxlcyIpOwogICAgICAgICAgICAgICAgICAgIExlcmMySGVscGVycy5yZWFkVGlsZXMoaW5wdXQsIGRhdGEsIE91dFBpeGVsVHlwZUFycmF5KTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZSB7IC8vbGVyYzIueCBub24tOCBiaXQgZGF0YQogICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKCJUaWxlcyIpOwogICAgICAgICAgICAgICAgICBMZXJjMkhlbHBlcnMucmVhZFRpbGVzKGlucHV0LCBkYXRhLCBPdXRQaXhlbFR5cGVBcnJheSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICB9CgogICAgICAgICAgZGF0YS5lb2ZPZmZzZXQgPSBkYXRhLnB0cjsKICAgICAgICAgIHZhciBkaWZmOwogICAgICAgICAgaWYgKG9wdGlvbnMuaW5wdXRPZmZzZXQpIHsKICAgICAgICAgICAgZGlmZiA9IGRhdGEuaGVhZGVySW5mby5ibG9iU2l6ZSArIG9wdGlvbnMuaW5wdXRPZmZzZXQgLSBkYXRhLnB0cjsKICAgICAgICAgICAgaWYgKE1hdGguYWJzKGRpZmYpID49IDEpIHsKICAgICAgICAgICAg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ZWxDb3VudDogaGVhZGVySW5mby5udW1WYWxpZFBpeGVsLAogICAgICAgICAgICBkaW1Db3VudDogaGVhZGVySW5mby5udW1EaW1zLAogICAgICAgICAgICBkaW1TdGF0czogewogICAgICAgICAgICAgIG1pblZhbHVlczogaGVhZGVySW5mby5taW5WYWx1ZXMsCiAgICAgICAgICAgICAgbWF4VmFsdWVzOiBoZWFkZXJJbmZvLm1heFZhbHVlcwogICAgICAgICAgICB9LAogICAgICAgICAgICBtYXNrRGF0YTogZGF0YS5waXhlbHMucmVzdWx0TWFzawogICAgICAgICAgICAvL25vRGF0YVZhbHVlOiBub0RhdGFWYWx1ZQogICAgICAgICAgfTsKCiAgICAgICAgICAvL3dlIHNob3VsZCByZW1vdmUgdGhpcyBpZiB0aGVyZSdzIG5vIGV4aXN0aW5nIGNsaWVudAogICAgICAgICAgLy9vcHRpb25hbCBub0RhdGFWYWx1ZSBwcm9jZXNzaW5nLCBpdCdzIHVzZXIncyByZXNwb25zaWJsaXR5CiAgICAgICAgICBpZiAoZGF0YS5waXhlbHMucmVzdWx0TWFzayAmJiBMZXJjMkhlbHBlcnMuaXNWYWxpZFBpeGVsVmFsdWUoaGVhZGVySW5mby5pbWFnZVR5cGUsIG5vRGF0YVZhbHVlKSkgewogICAgICAgICAgICB2YXIgbWFzayA9IGRhdGEucGl4ZWxzLnJlc3VsdE1hc2s7CiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBudW1QaXhlbHM7IGkrKykgewogICAgICAgICAgICAgIGlmICghbWFza1tpXSkgewogICAgICAgICAgICAgICAgcmVzdWx0LnBpeGVsRGF0YVtpXSA9IG5vRGF0YVZhbHVlOwogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXN1bHQubm9EYXRhVmFsdWUgPSBub0RhdGFWYWx1ZTsKICAgICAgICAgIH0KICAgICAgICAgIGRhdGEubm9EYXRhVmFsdWUgPSBub0RhdGFWYWx1ZTsKICAgICAgICAgIGlmIChvcHRpb25zLnJldHVybkZpbGVJbmZvKSB7CiAgICAgICAgICAgIHJlc3VsdC5maWxlSW5mbyA9IExlcmMySGVscGVycy5mb3JtYXRGaWxlSW5mbyhkYXRhKTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiByZXN1bHQ7CiAgICAgICAgfSwKCiAgICAgICAgZ2V0QmFuZENvdW50OiBmdW5jdGlvbigvKmJ5dGUgYXJyYXkqLyBpbnB1dCkgewogICAgICAgICAgdmFyIGNvdW50ID0gMDsKICAgICAgICAgIHZhciBpID0gMDsKICAgICAgICAgIHZhciB0ZW1wID0ge307CiAgICAgICAgICB0ZW1wLnB0ciA9IDA7CiAgICAgICAgICB0ZW1wLnBpeGVscyA9IHt9OwogICAgICAgICAgd2hpbGUgKGkgPCBpbnB1dC5ieXRlTGVuZ3RoIC0gNTgpIHsKICAgICAgICAgICAgTGVyYzJIZWxwZXJzLnJlYWRIZWFkZXJJbmZvKGlucHV0LCB0ZW1wKTsKICAgICAgICAgICAgaSArPSB0ZW1wLmhlYWRlckluZm8uYmxvYlNpemU7CiAgICAgICAgICAgIGNvdW50Kys7CiAgICAgICAgICAgIHRlbXAucHRyID0gaTsKICAgICAgICAgIH0KICAgICAgICAgIHJldHVybiBjb3VudDsKICAgICAgICB9CiAgICAgIH07CgogICAgICByZXR1cm4gTGVyYzJEZWNvZGU7CiAgICB9KSgpOwoKICAgIHZhciBpc1BsYXRmb3JtTGl0dGxlRW5kaWFuID0gKGZ1bmN0aW9uKCkgewogICAgICB2YXIgYSA9IG5ldyBBcnJheUJ1ZmZlcig0KTsKICAgICAgdmFyIGIgPSBuZXcgVWludDhBcnJheShhKTsKICAgICAgdmFyIGMgPSBuZXcgVWludDMyQXJyYXkoYSk7CiAgICAgIGNbMF0gPSAxOwogICAgICByZXR1cm4gYlswXSA9PT0gMTsKICAgIH0pKCk7CgogICAgdmFyIExlcmMgPSB7CiAgICAgIC8qKioqKioqKioqKip3cmFwcGVyKioqKioqKioqKioqKioqKioqKioqK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B2YXIgaSwgaiwgbnVtUGl4ZWxzOwogICAgICAgIGlmIChtYWpvclZlcnNpb24gPiAxICYmIGJhbmRNYXNrcy5sZW5ndGggPiAxKSB7CiAgICAgICAgICBudW1QaXhlbHMgPSBkZWNvZGVkUGl4ZWxCbG9jay53aWR0aCAqIGRlY29kZWRQaXhlbEJsb2NrLmhlaWdodDsKICAgICAgICAgIGRlY29kZWRQaXhlbEJsb2NrLmJhbmRNYXNrcyA9IGJhbmRNYXNrczsKICAgICAgICAgIG1hc2tEYXRhID0gbmV3IFVpbnQ4QXJyYXkobnVtUGl4ZWxzKTsKICAgICAgICAgIG1hc2tEYXRhLnNldChiYW5kTWFza3NbMF0pOwogICAgICAgICAgZm9yIChpID0gMTsgaSA8IGJhbmRNYXNrcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBiYW5kTWFzayA9IGJhbmRNYXNrc1tpXTsKICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IG51bVBpeGVsczsgaisrKSB7CiAgICAgICAgICAgICAgbWFza0RhdGFbal0gPSBtYXNrRGF0YVtqXSAmIGJhbmRNYXNrW2pdOwogICAgICAgICAgICB9CiAgICAgICAgICB9CiAgICAgICAgICBkZWNvZGVkUGl4ZWxCbG9jay5tYXNrRGF0YSA9IG1hc2tEYXRhOwogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIGRlY29kZWRQaXhlbEJsb2NrOwogICAgICB9CiAgICB9OwoKICAgIGlmIChtb2R1bGUuZXhwb3J0cykgey8qIGpzaGludCBpZ25vcmU6bGluZSAqLwogICAgICAvL2NvbW1vbkpTIG1vZHVsZSAxLjAvMS4xLzEuMS4xIHN5c3RlbXMsIHN1Y2ggYXMgbm9kZUpTCiAgICAgIC8vaHR0cDovL3dpa2kuY29tbW9uanMub3JnL3dpa2kvTW9kdWxlcwogICAgICBtb2R1bGUuZXhwb3J0cyA9IExlcmM7LyoganNoaW50IGlnbm9yZTpsaW5lICovCiAgICB9CiAgICBlbHNlIHsKICAgICA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BkZWNvZGUoYXJnc1swXSwgYXJnc1sxXSk7CiAgICAgICAgICBicmVhazsKICAgICAgfQogICAgfSk7CiAgfQoKfSkoKTsK\";\n const blob = typeof window !== \"undefined\" && window.Blob && new Blob([atob(encodedJs)], { type: \"text/javascript;charset=utf-8\" });\n function WorkerWrapper() {\n const objURL = blob && (window.URL || window.webkitURL).createObjectURL(blob);\n try {\n return objURL ? new Worker(objURL) : new Worker(\"data:application/javascript;base64,\" + encodedJs, {type: \"module\"});\n } finally {\n objURL && (window.URL || window.webkitURL).revokeObjectURL(objURL);\n }\n }\n\nconst defaultPoolSize = globalThis?.navigator?.hardwareConcurrency ?? 4;\nclass Pool {\n workers;\n idleWorkers;\n waitQueue;\n decoder;\n constructor(size = defaultPoolSize) {\n this.workers = [];\n this.idleWorkers = [];\n this.waitQueue = [];\n this.decoder = null;\n for (let i = 0; i < size; ++i) {\n const w = new WorkerWrapper();\n this.workers.push(w);\n this.idleWorkers.push(w);\n }\n }\n async decode(fileDirectory, buffer) {\n const currentWorker = await this.waitForWorker();\n return new Promise((resolve, reject) => {\n currentWorker.onmessage = (event) => {\n this.finishTask(currentWorker);\n resolve(event.data);\n };\n currentWorker.onerror = (error) => {\n this.finishTask(currentWorker);\n reject(error);\n };\n currentWorker.postMessage([\"decode\", fileDirectory, buffer], [buffer]);\n });\n }\n async waitForWorker() {\n const idleWorker = this.idleWorkers.pop();\n if (idleWorker) {\n return idleWorker;\n }\n const waiter = {};\n const promise = new Promise((resolve) => {\n waiter.resolve = resolve;\n });\n this.waitQueue.push(waiter);\n return promise;\n }\n async finishTask(currentWorker) {\n const waiter = this.waitQueue.pop();\n if (waiter) {\n waiter.resolve(currentWorker);\n } else {\n this.idleWorkers.push(currentWorker);\n }\n }\n destroy() {\n for (let i = 0; i < this.workers.length; ++i) {\n this.workers[i].terminate();\n }\n }\n}\n\nconst PARSER_OPTIONS = {\n attributeNamePrefix: \"\",\n attrNodeName: \"attr\",\n parseNodeValue: true,\n parseAttributeValue: true,\n ignoreAttributes: false\n};\nconst parse = (str) => parser.parse(str, PARSER_OPTIONS);\nfunction fromString(str) {\n const res = parse(str);\n if (!res.OME) {\n throw Error(\"Failed to parse OME-XML metadata.\");\n }\n return ensureArray(res.OME.Image).map((img) => {\n const Channels = ensureArray(img.Pixels.Channel).map((c) => {\n if (\"Color\" in c.attr) {\n return {\n ...c.attr,\n Color: intToRgba(c.attr.Color)\n };\n }\n return {\n ...c.attr\n };\n });\n const {\n AquisitionDate = \"\",\n Description = \"\"\n } = img;\n const image = {\n ...img.attr,\n AquisitionDate,\n Description,\n Pixels: {\n ...img.Pixels.attr,\n Channels\n }\n };\n return {\n ...image,\n format() {\n const {\n Pixels\n } = image;\n const sizes = [\"X\", \"Y\", \"Z\"].map((name) => {\n const size = Pixels[`PhysicalSize${name}`];\n const unit = Pixels[`PhysicalSize${name}Unit`];\n return size && unit ? `${size} ${unit}` : \"-\";\n }).join(\" x \");\n return {\n \"Acquisition Date\": image.AquisitionDate,\n \"Dimensions (XY)\": `${Pixels.SizeX} x ${Pixels.SizeY}`,\n \"Pixels Type\": Pixels.Type,\n \"Pixels Size (XYZ)\": sizes,\n \"Z-sections/Timepoints\": `${Pixels.SizeZ} x ${Pixels.SizeT}`,\n Channels: Pixels.SizeC\n };\n }\n };\n });\n}\n\nclass TiffPixelSource {\n constructor(indexer, dtype, tileSize, shape, labels, meta, pool) {\n this.dtype = dtype;\n this.tileSize = tileSize;\n this.shape = shape;\n this.labels = labels;\n this.meta = meta;\n this.pool = pool;\n this._indexer = indexer;\n }\n _indexer;\n async getRaster({\n selection,\n signal\n }) {\n const image = await this._indexer(selection);\n return this._readRasters(image, {\n signal\n });\n }\n async getTile({\n x,\n y,\n selection,\n signal\n }) {\n const {\n height,\n width\n } = this._getTileExtent(x, y);\n const x0 = x * this.tileSize;\n const y0 = y * this.tileSize;\n const window = [x0, y0, x0 + width, y0 + height];\n const image = await this._indexer(selection);\n return this._readRasters(image, {\n window,\n width,\n height,\n signal\n });\n }\n async _readRasters(image, props) {\n const interleave = isInterleaved(this.shape);\n const raster = await image.readRasters({\n interleave,\n ...props,\n pool: this.pool\n });\n if (props?.signal?.aborted) {\n throw SIGNAL_ABORTED;\n }\n const data = interleave ? raster : raster[0];\n return {\n data,\n width: raster.width,\n height: raster.height\n };\n }\n _getTileExtent(x, y) {\n const {\n height: zoomLevelHeight,\n width: zoomLevelWidth\n } = getImageSize(this);\n let height = this.tileSize;\n let width = this.tileSize;\n const maxXTileCoord = Math.floor(zoomLevelWidth / this.tileSize);\n const maxYTileCoord = Math.floor(zoomLevelHeight / this.tileSize);\n if (x === maxXTileCoord) {\n width = zoomLevelWidth % this.tileSize;\n }\n if (y === maxYTileCoord) {\n height = zoomLevelHeight % this.tileSize;\n }\n return {\n height,\n width\n };\n }\n onTileError(err) {\n console.error(err);\n }\n}\n\nfunction getOmeLegacyIndexer(tiff, rootMeta) {\n const imgMeta = rootMeta[0];\n const {\n SizeT,\n SizeC,\n SizeZ\n } = imgMeta.Pixels;\n const ifdIndexer = getOmeIFDIndexer(imgMeta);\n return (sel, pyramidLevel) => {\n const index = ifdIndexer(sel);\n const pyramidIndex = pyramidLevel * SizeZ * SizeT * SizeC;\n return tiff.getImage(index + pyramidIndex);\n };\n}\nfunction getOmeSubIFDIndexer(tiff, rootMeta) {\n const imgMeta = rootMeta[0];\n const ifdIndexer = getOmeIFDIndexer(imgMeta);\n const ifdCache = new Map();\n return async (sel, pyramidLevel) => {\n const index = ifdIndexer(sel);\n const baseImage = await tiff.getImage(index);\n if (pyramidLevel === 0) {\n return baseImage;\n }\n const {\n SubIFDs\n } = baseImage.fileDirectory;\n if (!SubIFDs) {\n throw Error(\"Indexing Error: OME-TIFF is missing SubIFDs.\");\n }\n const key = `${sel.t}-${sel.c}-${sel.z}-${pyramidLevel}`;\n if (!ifdCache.has(key)) {\n const subIfdOffset = SubIFDs[pyramidLevel - 1];\n ifdCache.set(key, tiff.parseFileDirectoryAt(subIfdOffset));\n }\n const ifd = await ifdCache.get(key);\n return new baseImage.constructor(ifd.fileDirectory, ifd.geoKeyDirectory, tiff.dataView, tiff.littleEndian, tiff.cache, tiff.source);\n };\n}\nfunction getOmeIFDIndexer(imgMeta) {\n const {\n SizeC,\n SizeZ,\n SizeT,\n DimensionOrder\n } = imgMeta.Pixels;\n switch (DimensionOrder) {\n case \"XYZCT\": {\n return ({\n t,\n c,\n z\n }) => t * SizeZ * SizeC + c * SizeZ + z;\n }\n case \"XYZTC\": {\n return ({\n t,\n c,\n z\n }) => c * SizeZ * SizeT + t * SizeZ + z;\n }\n case \"XYCTZ\": {\n return ({\n t,\n c,\n z\n }) => z * SizeC * SizeT + t * SizeC + c;\n }\n case \"XYCZT\": {\n return ({\n t,\n c,\n z\n }) => t * SizeC * SizeZ + z * SizeC + c;\n }\n case \"XYTCZ\": {\n return ({\n t,\n c,\n z\n }) => z * SizeT * SizeC + c * SizeT + t;\n }\n case \"XYTZC\": {\n return ({\n t,\n c,\n z\n }) => c * SizeT * SizeZ + z * SizeT + t;\n }\n default: {\n throw new Error(`Invalid OME-XML DimensionOrder, got ${DimensionOrder}.`);\n }\n }\n}\n\nconst DTYPE_LOOKUP$1 = {\n uint8: \"Uint8\",\n uint16: \"Uint16\",\n uint32: \"Uint32\",\n float: \"Float32\",\n double: \"Float64\",\n int8: \"Int8\",\n int16: \"Int16\",\n int32: \"Int32\"\n};\nfunction getOmePixelSourceMeta({\n Pixels\n}) {\n const labels = getLabels(Pixels.DimensionOrder);\n const dims = getDims(labels);\n const shape = Array(labels.length).fill(0);\n shape[dims(\"t\")] = Pixels.SizeT;\n shape[dims(\"c\")] = Pixels.SizeC;\n shape[dims(\"z\")] = Pixels.SizeZ;\n if (Pixels.Interleaved) {\n labels.push(\"_c\");\n shape.push(3);\n }\n const getShape = (level) => {\n const s = [...shape];\n s[dims(\"x\")] = Pixels.SizeX >> level;\n s[dims(\"y\")] = Pixels.SizeY >> level;\n return s;\n };\n if (!(Pixels.Type in DTYPE_LOOKUP$1)) {\n throw Error(`Pixel type ${Pixels.Type} not supported.`);\n }\n const dtype = DTYPE_LOOKUP$1[Pixels.Type];\n if (Pixels.PhysicalSizeX && Pixels.PhysicalSizeY) {\n const physicalSizes = {\n x: {\n size: Pixels.PhysicalSizeX,\n unit: Pixels.PhysicalSizeXUnit\n },\n y: {\n size: Pixels.PhysicalSizeY,\n unit: Pixels.PhysicalSizeYUnit\n }\n };\n if (Pixels.PhysicalSizeZ) {\n physicalSizes.z = {\n size: Pixels.PhysicalSizeZ,\n unit: Pixels.PhysicalSizeZUnit\n };\n }\n return {\n labels,\n getShape,\n physicalSizes,\n dtype\n };\n }\n return {\n labels,\n getShape,\n dtype\n };\n}\nfunction guessTileSize$1(image) {\n const tileWidth = image.getTileWidth();\n const tileHeight = image.getTileHeight();\n const size = Math.min(tileWidth, tileHeight);\n return prevPowerOf2(size);\n}\n\nasync function load$2(tiff, pool) {\n const firstImage = await tiff.getImage(0);\n const {\n ImageDescription,\n SubIFDs,\n PhotometricInterpretation: photometricInterpretation\n } = firstImage.fileDirectory;\n const omexml = fromString(ImageDescription);\n let levels;\n let pyramidIndexer;\n if (SubIFDs) {\n levels = SubIFDs.length + 1;\n pyramidIndexer = getOmeSubIFDIndexer(tiff, omexml);\n } else {\n levels = omexml.length;\n pyramidIndexer = getOmeLegacyIndexer(tiff, omexml);\n }\n const imgMeta = omexml[0];\n const {\n labels,\n getShape,\n physicalSizes,\n dtype\n } = getOmePixelSourceMeta(imgMeta);\n const tileSize = guessTileSize$1(firstImage);\n const meta = {\n photometricInterpretation,\n physicalSizes\n };\n const data = Array.from({\n length: levels\n }).map((_, resolution) => {\n const shape = getShape(resolution);\n const indexer = (sel) => pyramidIndexer(sel, resolution);\n const source = new TiffPixelSource(indexer, dtype, tileSize, shape, labels, meta, pool);\n return source;\n });\n return {\n data,\n metadata: imgMeta\n };\n}\n\nasync function loadOmeTiff(source, opts = {}) {\n const {\n headers,\n offsets,\n pool = true\n } = opts;\n let tiff;\n if (typeof source === \"string\") {\n tiff = await fromUrl(source, {\n ...headers,\n cacheSize: Infinity\n });\n } else {\n tiff = await fromBlob(source);\n }\n if (offsets) {\n tiff = createOffsetsProxy(tiff, offsets);\n }\n checkProxies(tiff);\n return pool ? load$2(tiff, new Pool()) : load$2(tiff);\n}\n\nfunction joinUrlParts(...args) {\n return args.map((part, i) => {\n if (i === 0)\n return part.trim().replace(/[/]*$/g, \"\");\n return part.trim().replace(/(^[/]*|[/]*$)/g, \"\");\n }).filter((x) => x.length).join(\"/\");\n}\nclass ReadOnlyStore {\n async keys() {\n return [];\n }\n async deleteItem() {\n return false;\n }\n async setItem() {\n console.warn(\"Cannot write to read-only store.\");\n return false;\n }\n}\nclass FileStore extends ReadOnlyStore {\n _map;\n _rootPrefix;\n constructor(fileMap, rootPrefix = \"\") {\n super();\n this._map = fileMap;\n this._rootPrefix = rootPrefix;\n }\n _key(key) {\n return joinUrlParts(this._rootPrefix, key);\n }\n async getItem(key) {\n const file = this._map.get(this._key(key));\n if (!file) {\n throw new KeyError(key);\n }\n const buffer = await file.arrayBuffer();\n return buffer;\n }\n async containsItem(key) {\n const path = this._key(key);\n return this._map.has(path);\n }\n}\n\nfunction isOmeZarr(dataShape, Pixels) {\n const {\n SizeT,\n SizeC,\n SizeZ,\n SizeY,\n SizeX\n } = Pixels;\n const omeZarrShape = [SizeT, SizeC, SizeZ, SizeY, SizeX];\n return dataShape.every((size, i) => omeZarrShape[i] === size);\n}\nfunction guessBioformatsLabels({\n shape\n}, {\n Pixels\n}) {\n if (isOmeZarr(shape, Pixels)) {\n return getLabels(\"XYZCT\");\n }\n const labels = getLabels(Pixels.DimensionOrder);\n labels.forEach((lower, i) => {\n const label = lower.toUpperCase();\n const xmlSize = Pixels[`Size${label}`];\n if (!xmlSize) {\n throw Error(`Dimension ${label} is invalid for OME-XML.`);\n }\n if (shape[i] !== xmlSize) {\n throw Error(\"Dimension mismatch between zarr source and OME-XML.\");\n }\n });\n return labels;\n}\nfunction getRootPrefix(files, rootName) {\n const first = files.find((f) => f.path.indexOf(rootName) > 0);\n if (!first) {\n throw Error(\"Could not find root in store.\");\n }\n const prefixLength = first.path.indexOf(rootName) + rootName.length;\n return first.path.slice(0, prefixLength);\n}\nasync function loadMultiscales(store, path = \"\") {\n const grp = await openGroup(store, path);\n const rootAttrs = await grp.attrs.asObject();\n let paths = [\"0\"];\n let labels = [\"t\", \"c\", \"z\", \"y\", \"x\"];\n if (\"multiscales\" in rootAttrs) {\n const {\n datasets,\n axes\n } = rootAttrs.multiscales[0];\n paths = datasets.map((d) => d.path);\n if (axes) {\n labels = axes;\n }\n }\n const data = paths.map((path2) => grp.getItem(path2));\n return {\n data: await Promise.all(data),\n rootAttrs,\n labels\n };\n}\nfunction guessTileSize(arr) {\n const interleaved = isInterleaved(arr.shape);\n const [yChunk, xChunk] = arr.chunks.slice(interleaved ? -3 : -2);\n const size = Math.min(yChunk, xChunk);\n return prevPowerOf2(size);\n}\n\nfunction getIndexer(labels) {\n const size = labels.length;\n const dims = getDims(labels);\n return (sel) => {\n if (Array.isArray(sel)) {\n return [...sel];\n }\n const selection = Array(size).fill(0);\n for (const [key, value] of Object.entries(sel)) {\n selection[dims(key)] = value;\n }\n return selection;\n };\n}\n\nconst DTYPE_LOOKUP = {\n u1: \"Uint8\",\n u2: \"Uint16\",\n u4: \"Uint32\",\n f4: \"Float32\",\n f8: \"Float64\",\n i1: \"Int8\",\n i2: \"Int16\",\n i4: \"Int32\"\n};\nclass ZarrPixelSource {\n constructor(data, labels, tileSize) {\n this.labels = labels;\n this.tileSize = tileSize;\n this._indexer = getIndexer(labels);\n this._data = data;\n const xChunkSize = data.chunks[this._xIndex];\n const yChunkSize = data.chunks[this._xIndex - 1];\n this._readChunks = tileSize === xChunkSize && tileSize === yChunkSize;\n }\n _data;\n _indexer;\n _readChunks;\n get shape() {\n return this._data.shape;\n }\n get dtype() {\n const suffix = this._data.dtype.slice(1);\n if (!(suffix in DTYPE_LOOKUP)) {\n throw Error(`Zarr dtype not supported, got ${suffix}.`);\n }\n return DTYPE_LOOKUP[suffix];\n }\n get _xIndex() {\n const interleave = isInterleaved(this._data.shape);\n return this._data.shape.length - (interleave ? 2 : 1);\n }\n _chunkIndex(selection, x, y) {\n const sel = this._indexer(selection);\n sel[this._xIndex] = x;\n sel[this._xIndex - 1] = y;\n return sel;\n }\n _getSlices(x, y) {\n const {\n height,\n width\n } = getImageSize(this);\n const [xStart, xStop] = [x * this.tileSize, Math.min((x + 1) * this.tileSize, width)];\n const [yStart, yStop] = [y * this.tileSize, Math.min((y + 1) * this.tileSize, height)];\n if (xStart === xStop || yStart === yStop) {\n throw new BoundsCheckError(\"Tile slice is zero-sized.\");\n }\n return [slice(xStart, xStop), slice(yStart, yStop)];\n }\n async getRaster({\n selection\n }) {\n const sel = this._chunkIndex(selection, null, null);\n const {\n data,\n shape\n } = await this._data.getRaw(sel);\n const [height, width] = shape;\n return {\n data,\n width,\n height\n };\n }\n async getTile(props) {\n const {\n x,\n y,\n selection,\n signal\n } = props;\n let res;\n if (this._readChunks) {\n const sel = this._chunkIndex(selection, x, y);\n res = await this._data.getRawChunk(sel, {\n storeOptions: {\n signal\n }\n });\n } else {\n const [xSlice, ySlice] = this._getSlices(x, y);\n const sel = this._chunkIndex(selection, xSlice, ySlice);\n res = await this._data.getRaw(sel);\n }\n const {\n data,\n shape: [height, width]\n } = res;\n return {\n data,\n width,\n height\n };\n }\n onTileError(err) {\n if (!(err instanceof BoundsCheckError)) {\n throw err;\n }\n }\n}\n\nasync function load$1(root, xmlSource) {\n if (typeof xmlSource !== \"string\") {\n xmlSource = await xmlSource.text();\n }\n const imgMeta = fromString(xmlSource)[0];\n const {\n data\n } = await loadMultiscales(root, \"0\");\n const labels = guessBioformatsLabels(data[0], imgMeta);\n const tileSize = guessTileSize(data[0]);\n const pyramid = data.map((arr) => new ZarrPixelSource(arr, labels, tileSize));\n return {\n data: pyramid,\n metadata: imgMeta\n };\n}\n\nasync function load(store) {\n const {\n data,\n rootAttrs,\n labels\n } = await loadMultiscales(store);\n const tileSize = guessTileSize(data[0]);\n const pyramid = data.map((arr) => new ZarrPixelSource(arr, labels, tileSize));\n return {\n data: pyramid,\n metadata: rootAttrs\n };\n}\n\nasync function loadBioformatsZarr(source, options = {}) {\n const METADATA = \"METADATA.ome.xml\";\n const ZARR_DIR = \"data.zarr\";\n if (typeof source === \"string\") {\n const url = source.endsWith(\"/\") ? source.slice(0, -1) : source;\n const store2 = new HTTPStore(url + \"/\" + ZARR_DIR, options);\n const xmlSource = await fetch(url + \"/\" + METADATA, options.fetchOptions);\n return load$1(store2, xmlSource);\n }\n const fMap = new Map();\n let xmlFile;\n for (const file of source) {\n if (file.name === METADATA) {\n xmlFile = file;\n } else {\n fMap.set(file.path, file);\n }\n }\n if (!xmlFile) {\n throw Error(\"No OME-XML metadata found for store.\");\n }\n const store = new FileStore(fMap, getRootPrefix(source, ZARR_DIR));\n return load$1(store, xmlFile);\n}\nasync function loadOmeZarr(source, options = {}) {\n const store = new HTTPStore(source, options);\n if (options?.type !== \"multiscales\") {\n throw Error(\"Only multiscale OME-Zarr is supported.\");\n }\n return load(store);\n}\n\nexport { AdditiveColormapExtension, BitmapLayer, COLORMAPS, ColorPaletteExtension, DETAIL_VIEW_ID, DTYPE_VALUES, DetailView, ImageLayer, LensExtension, MAX_CHANNELS, MultiscaleImageLayer, OVERVIEW_VIEW_ID, OverviewLayer, OverviewView, PictureInPictureViewer, RENDERING_MODES, ScaleBarLayer, SideBySideView, SideBySideViewer, TiffPixelSource, VivView, VivViewer, VolumeLayer, VolumeView, VolumeViewer, XR3DLayer, XRLayer, ZarrPixelSource, getChannelStats, getDefaultInitialViewState, loadBioformatsZarr, loadOmeTiff, loadOmeZarr };\n","import getPrototypeOf from \"./getPrototypeOf\";\nimport setPrototypeOf from \"./setPrototypeOf\";\nimport isNativeFunction from \"./isNativeFunction\";\nimport construct from \"./construct\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n}","export default function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}","import type {Readable} from 'stream';\n\n/** A DOM or Node readable stream */\nexport type ReadableStreamType = ReadableStream | Readable;\n\nconst isBoolean: (x: any) => boolean = (x) => typeof x === 'boolean';\nconst isFunction: (x: any) => boolean = (x) => typeof x === 'function';\n\nexport const isObject: (x: any) => boolean = (x) => x !== null && typeof x === 'object';\nexport const isPureObject: (x: any) => boolean = (x) =>\n isObject(x) && x.constructor === {}.constructor;\nexport const isPromise: (x: any) => boolean = (x) => isObject(x) && isFunction(x.then);\n\nexport const isIterable: (x: any) => boolean = (x) => x && typeof x[Symbol.iterator] === 'function';\nexport const isAsyncIterable: (x: any) => boolean = (x) =>\n x && typeof x[Symbol.asyncIterator] === 'function';\nexport const isIterator: (x: any) => boolean = (x) => x && isFunction(x.next);\n\nexport const isResponse: (x: any) => boolean = (x) =>\n (typeof Response !== 'undefined' && x instanceof Response) ||\n (x && x.arrayBuffer && x.text && x.json);\n\nexport const isFile: (x: any) => boolean = (x) => typeof File !== 'undefined' && x instanceof File;\nexport const isBlob: (x: any) => boolean = (x) => typeof Blob !== 'undefined' && x instanceof Blob;\n\nexport const isWritableDOMStream: (x: any) => boolean = (x) =>\n isObject(x) && isFunction(x.abort) && isFunction(x.getWriter);\n\nexport const isReadableDOMStream: (x: any) => boolean = (x) =>\n (typeof ReadableStream !== 'undefined' && x instanceof ReadableStream) ||\n (isObject(x) && isFunction(x.tee) && isFunction(x.cancel) && isFunction(x.getReader));\n// Not implemented in Firefox: && isFunction(x.pipeTo)\n\n/** Check for Node.js `Buffer` without triggering bundler to include buffer polyfill */\nexport const isBuffer: (x: any) => boolean = (x) => x && typeof x === 'object' && x.isBuffer;\n\nexport const isWritableNodeStream: (x: any) => boolean = (x) =>\n isObject(x) && isFunction(x.end) && isFunction(x.write) && isBoolean(x.writable);\nexport const isReadableNodeStream: (x: any) => boolean = (x) =>\n isObject(x) && isFunction(x.read) && isFunction(x.pipe) && isBoolean(x.readable);\nexport const isReadableStream: (x: any) => boolean = (x) =>\n isReadableDOMStream(x) || isReadableNodeStream(x);\nexport const isWritableStream: (x: any) => boolean = (x) =>\n isWritableDOMStream(x) || isWritableNodeStream(x);\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 4 Dimensional Vector\r\n * @module vec4\r\n */\n\n/**\r\n * Creates a new, empty vec4\r\n *\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with values from an existing vector\r\n *\r\n * @param {vec4} a vector to clone\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Copy the values from one vec4 to another\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the source vector\r\n * @returns {vec4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to the given values\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} out\r\n */\n\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Adds two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\r\n * Multiplies two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n/**\r\n * Divides two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to ceil\r\n * @returns {vec4} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to floor\r\n * @returns {vec4} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n/**\r\n * Math.round the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to round\r\n * @returns {vec4} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\n/**\r\n * Scales a vec4 by a scalar number\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec4} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\r\n * Adds two vec4's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec4} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec4's\r\n *\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec4's\r\n *\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Calculates the length of a vec4\r\n *\r\n * @param {vec4} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared length of a vec4\r\n *\r\n * @param {vec4} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Negates the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to negate\r\n * @returns {vec4} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to invert\r\n * @returns {vec4} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n/**\r\n * Normalize a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a vector to normalize\r\n * @returns {vec4} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec4's\r\n *\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n/**\r\n * Returns the cross-product of three vectors in a 4-dimensional space\r\n *\r\n * @param {vec4} result the receiving vector\r\n * @param {vec4} U the first vector\r\n * @param {vec4} V the second vector\r\n * @param {vec4} W the third vector\r\n * @returns {vec4} result\r\n */\n\nexport function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the first operand\r\n * @param {vec4} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec4} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec4} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n\n var v1, v2, v3, v4;\n var s1, s2;\n\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n/**\r\n * Transforms the vec4 with a mat4.\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the vector to transform\r\n * @param {mat4} m matrix to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n/**\r\n * Transforms the vec4 with a quat\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {vec4} a the vector to transform\r\n * @param {quat} q quaternion to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformQuat(out, a, q) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3]; // calculate quat * vec\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to zero\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @returns {vec4} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {vec4} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {vec4} a The first vector.\r\n * @param {vec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {vec4} a The first vector.\r\n * @param {vec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\r\n * Alias for {@link vec4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec4.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec4.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec4.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec4.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec4.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec4s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n}();","export function assign(target, source) {\n for (const key in source) {\n if (source.hasOwnProperty(key)) {\n target[key] = source[key];\n }\n }\n}\n\nexport function chunk(iterable, length) {\n const results = [];\n const lengthOfIterable = iterable.length;\n for (let i = 0; i < lengthOfIterable; i += length) {\n const chunked = [];\n for (let ci = i; ci < i + length; ci++) {\n chunked.push(iterable[ci]);\n }\n results.push(chunked);\n }\n return results;\n}\n\nexport function endsWith(string, expectedEnding) {\n if (string.length < expectedEnding.length) {\n return false;\n }\n const actualEnding = string.substr(string.length - expectedEnding.length);\n return actualEnding === expectedEnding;\n}\n\nexport function forEach(iterable, func) {\n const { length } = iterable;\n for (let i = 0; i < length; i++) {\n func(iterable[i], i);\n }\n}\n\nexport function invert(oldObj) {\n const newObj = {};\n for (const key in oldObj) {\n if (oldObj.hasOwnProperty(key)) {\n const value = oldObj[key];\n newObj[value] = key;\n }\n }\n return newObj;\n}\n\nexport function range(n) {\n const results = [];\n for (let i = 0; i < n; i++) {\n results.push(i);\n }\n return results;\n}\n\nexport function times(numTimes, func) {\n const results = [];\n for (let i = 0; i < numTimes; i++) {\n results.push(func(i));\n }\n return results;\n}\n\nexport function toArray(iterable) {\n const results = [];\n const { length } = iterable;\n for (let i = 0; i < length; i++) {\n results.push(iterable[i]);\n }\n return results;\n}\n\nexport function toArrayRecursively(input) {\n if (input.length) {\n return toArray(input).map(toArrayRecursively);\n }\n return input;\n}\n\n// copied from https://github.com/academia-de-codigo/parse-content-range-header/blob/master/index.js\nexport function parseContentRange(headerValue) {\n if (!headerValue) {\n return null;\n }\n\n if (typeof headerValue !== 'string') {\n throw new Error('invalid argument');\n }\n\n const parseInt = (number) => Number.parseInt(number, 10);\n\n // Check for presence of unit\n let matches = headerValue.match(/^(\\w*) /);\n const unit = matches && matches[1];\n\n // check for start-end/size header format\n matches = headerValue.match(/(\\d+)-(\\d+)\\/(\\d+|\\*)/);\n if (matches) {\n return {\n unit,\n first: parseInt(matches[1]),\n last: parseInt(matches[2]),\n length: matches[3] === '*' ? null : parseInt(matches[3]),\n };\n }\n\n // check for size header format\n matches = headerValue.match(/(\\d+|\\*)/);\n if (matches) {\n return {\n unit,\n first: null,\n last: null,\n length: matches[1] === '*' ? null : parseInt(matches[1]),\n };\n }\n\n return null;\n}\n\n\n/*\n * Promisified wrapper around 'setTimeout' to allow 'await'\n */\nexport async function wait(milliseconds) {\n return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n\nexport function zip(a, b) {\n const A = Array.isArray(a) ? a : Array.from(a);\n const B = Array.isArray(b) ? b : Array.from(b);\n return A.map((k, i) => [k, B[i]]);\n}\n\n\n// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\nexport class AbortError extends Error {\n constructor(params) {\n // Pass remaining arguments (including vendor specific ones) to parent constructor\n super(params);\n\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, AbortError);\n }\n\n this.name = 'AbortError';\n }\n}\n\nexport class CustomAggregateError extends Error {\n constructor(errors, message) {\n super(message);\n this.errors = errors;\n this.message = message;\n this.name = 'AggregateError';\n }\n}\n\nexport const AggregateError = CustomAggregateError;\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 3x3 Matrix\r\n * @module mat3\r\n */\n\n/**\r\n * Creates a new identity mat3\r\n *\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n/**\r\n * Copies the upper-left 3x3 values into the given mat3.\r\n *\r\n * @param {mat3} out the receiving 3x3 matrix\r\n * @param {mat4} a the source 4x4 matrix\r\n * @returns {mat3} out\r\n */\n\nexport function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n/**\r\n * Creates a new mat3 initialized with values from an existing matrix\r\n *\r\n * @param {mat3} a matrix to clone\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Copy the values from one mat3 to another\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Create a new mat3 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} A new mat3\r\n */\n\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\r\n * Set the components of a mat3 to the given values\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} out\r\n */\n\nexport function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\r\n * Set a mat3 to the identity matrix\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @returns {mat3} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n/**\r\n * Calculates the determinant of a mat3\r\n *\r\n * @param {mat3} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n/**\r\n * Multiplies two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b00 = b[0],\n b01 = b[1],\n b02 = b[2];\n var b10 = b[3],\n b11 = b[4],\n b12 = b[5];\n var b20 = b[6],\n b21 = b[7],\n b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\r\n * Translate a mat3 by the given vector\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to translate\r\n * @param {vec2} v vector to translate by\r\n * @returns {mat3} out\r\n */\n\nexport function translate(out, a, v) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n x = v[0],\n y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n/**\r\n * Rotates a mat3 by the given angle\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function rotate(out, a, rad) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n/**\r\n * Scales the mat3 by the dimensions in the given vec2\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to rotate\r\n * @param {vec2} v the vec2 to scale the matrix by\r\n * @returns {mat3} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.translate(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {vec2} v Translation vector\r\n * @returns {mat3} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.rotate(dest, dest, rad);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.scale(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {vec2} v Scaling vector\r\n * @returns {mat3} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Copies the values from a mat2d into a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat2d} a the matrix to copy\r\n * @returns {mat3} out\r\n **/\n\nexport function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n/**\r\n * Calculates a 3x3 matrix from the given quaternion\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {quat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\n/**\r\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {mat4} a Mat4 to derive the normal matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function normalFromMat4(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\n/**\r\n * Generates a 2D projection matrix with the given bounds\r\n *\r\n * @param {mat3} out mat3 frustum matrix will be written into\r\n * @param {number} width Width of your gl context\r\n * @param {number} height Height of gl context\r\n * @returns {mat3} out\r\n */\n\nexport function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat3\r\n *\r\n * @param {mat3} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat3\r\n *\r\n * @param {mat3} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\n/**\r\n * Adds two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {mat3} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat3} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n/**\r\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat3} out the receiving vector\r\n * @param {mat3} a the first operand\r\n * @param {mat3} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat3} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {mat3} a The first matrix.\r\n * @param {mat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {mat3} a The first matrix.\r\n * @param {mat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7],\n a8 = a[8];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\r\n * Alias for {@link mat3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexports.earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.factors = {\n centimeters: exports.earthRadius * 100,\n centimetres: exports.earthRadius * 100,\n degrees: exports.earthRadius / 111325,\n feet: exports.earthRadius * 3.28084,\n inches: exports.earthRadius * 39.370,\n kilometers: exports.earthRadius / 1000,\n kilometres: exports.earthRadius / 1000,\n meters: exports.earthRadius,\n metres: exports.earthRadius,\n miles: exports.earthRadius / 1609.344,\n millimeters: exports.earthRadius * 1000,\n millimetres: exports.earthRadius * 1000,\n nauticalmiles: exports.earthRadius / 1852,\n radians: 1,\n yards: exports.earthRadius / 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.370,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / exports.earthRadius,\n yards: 1 / 1.0936,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexports.areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nfunction feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\nexports.feature = feature;\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nfunction geometry(type, coordinates, options) {\n if (options === void 0) { options = {}; }\n switch (type) {\n case \"Point\": return point(coordinates).geometry;\n case \"LineString\": return lineString(coordinates).geometry;\n case \"Polygon\": return polygon(coordinates).geometry;\n case \"MultiPoint\": return multiPoint(coordinates).geometry;\n case \"MultiLineString\": return multiLineString(coordinates).geometry;\n case \"MultiPolygon\": return multiPolygon(coordinates).geometry;\n default: throw new Error(type + \" is invalid\");\n }\n}\nexports.geometry = geometry;\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nfunction point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.point = point;\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nfunction points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\nexports.points = points;\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nfunction polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.polygon = polygon;\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nfunction polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\nexports.polygons = polygons;\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nfunction lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.lineString = lineString;\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nfunction lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\nexports.lineStrings = lineStrings;\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nfunction featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\nexports.featureCollection = featureCollection;\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nfunction multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiLineString = multiLineString;\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nfunction multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiPoint = multiPoint;\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nfunction multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\nexports.multiPolygon = multiPolygon;\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nfunction geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\nexports.geometryCollection = geometryCollection;\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nfunction round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\nexports.round = round;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nfunction radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = exports.factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\nexports.radiansToLength = radiansToLength;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nfunction lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = exports.factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\nexports.lengthToRadians = lengthToRadians;\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, or kilometers inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nfunction lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\nexports.lengthToDegrees = lengthToDegrees;\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nfunction bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\nexports.bearingToAzimuth = bearingToAzimuth;\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nfunction radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return degrees * 180 / Math.PI;\n}\nexports.radiansToDegrees = radiansToDegrees;\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nfunction degreesToRadians(degrees) {\n var radians = degrees % 360;\n return radians * Math.PI / 180;\n}\nexports.degreesToRadians = degreesToRadians;\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nfunction convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\nexports.convertLength = convertLength;\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted distance\n */\nfunction convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = exports.areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = exports.areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\nexports.convertArea = convertArea;\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nfunction isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num) && !/^\\s*$/.test(num);\n}\nexports.isNumber = isNumber;\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nfunction isObject(input) {\n return (!!input) && (input.constructor === Object);\n}\nexports.isObject = isObject;\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nfunction validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\nexports.validateBBox = validateBBox;\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nfunction validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\nexports.validateId = validateId;\n// Deprecated methods\nfunction radians2degrees() {\n throw new Error(\"method has been renamed to `radiansToDegrees`\");\n}\nexports.radians2degrees = radians2degrees;\nfunction degrees2radians() {\n throw new Error(\"method has been renamed to `degreesToRadians`\");\n}\nexports.degrees2radians = degrees2radians;\nfunction distanceToDegrees() {\n throw new Error(\"method has been renamed to `lengthToDegrees`\");\n}\nexports.distanceToDegrees = distanceToDegrees;\nfunction distanceToRadians() {\n throw new Error(\"method has been renamed to `lengthToRadians`\");\n}\nexports.distanceToRadians = distanceToRadians;\nfunction radiansToDistance() {\n throw new Error(\"method has been renamed to `radiansToLength`\");\n}\nexports.radiansToDistance = radiansToDistance;\nfunction bearingToAngle() {\n throw new Error(\"method has been renamed to `bearingToAzimuth`\");\n}\nexports.bearingToAngle = bearingToAngle;\nfunction convertDistance() {\n throw new Error(\"method has been renamed to `convertLength`\");\n}\nexports.convertDistance = convertDistance;\n","import { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n\n/* eslint-disable no-use-before-define */\n\n/**\n * Returns a number whose value is limited to the given range.\n *\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(\"Material-UI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n *\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nexport function hexToRgb(color) {\n color = color.substr(1);\n var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n var colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(function (n) {\n return n + n;\n });\n }\n\n return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', '), \")\") : '';\n}\n\nfunction intToHex(int) {\n var hex = int.toString(16);\n return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n *\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\n\nexport function rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n var _decomposeColor = decomposeColor(color),\n values = _decomposeColor.values;\n\n return \"#\".concat(values.map(function (n) {\n return intToHex(n);\n }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n *\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n var _color = color,\n values = _color.values;\n var h = values[0];\n var s = values[1] / 100;\n var l = values[2] / 100;\n var a = s * Math.min(l, 1 - l);\n\n var f = function f(n) {\n var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n };\n\n var type = 'rgb';\n var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type: type,\n values: rgb\n });\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n var marker = color.indexOf('(');\n var type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Unsupported `\".concat(color, \"` color.\\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().\") : _formatMuiErrorMessage(3, color));\n }\n\n var values = color.substring(marker + 1, color.length - 1).split(',');\n values = values.map(function (value) {\n return parseFloat(value);\n });\n return {\n type: type,\n values: values\n };\n}\n/**\n * Converts a color object with type and values to a string.\n *\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\nexport function recomposeColor(color) {\n var type = color.type;\n var values = color.values;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map(function (n, i) {\n return i < 3 ? parseInt(n, 10) : n;\n });\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = \"\".concat(values[1], \"%\");\n values[2] = \"\".concat(values[2], \"%\");\n }\n\n return \"\".concat(type, \"(\").concat(values.join(', '), \")\");\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\nexport function getContrastRatio(foreground, background) {\n var lumA = getLuminance(foreground);\n var lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\nexport function getLuminance(color) {\n color = decomposeColor(color);\n var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(function (val) {\n val /= 255; // normalized\n\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function emphasize(color) {\n var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nvar warnedOnce = false;\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0 -1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n *\n * @deprecated\n * Use `import { alpha } from '@material-ui/core/styles'` instead.\n */\n\nexport function fade(color, value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: The `fade` color utility was renamed to `alpha` to better describe its functionality.', '', \"You should use `import { alpha } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return alpha(color, value);\n}\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha value is overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0-1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n color.values[3] = value;\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// This file enables: import 'probe.gl/bench'.\n// Note: Must be published using package.json \"files\" field\nmodule.exports = require('./dist/es5/env');\n","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","import * as React from 'react';\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n/**\n * https://github.com/facebook/react/issues/14099#issuecomment-440013892\n *\n * @param {function} fn\n */\n\nexport default function useEventCallback(fn) {\n var ref = React.useRef(fn);\n useEnhancedEffect(function () {\n ref.current = fn;\n });\n return React.useCallback(function () {\n return (0, ref.current).apply(void 0, arguments);\n }, []);\n}","import * as glMatrix from \"./common.js\";\n/**\r\n * 3 Dimensional Vector\r\n * @module vec3\r\n */\n\n/**\r\n * Creates a new, empty vec3\r\n *\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec3 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec3} a vector to clone\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Calculates the length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Creates a new vec3 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} a new 3D vector\r\n */\n\nexport function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Copy the values from one vec3 to another\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the source vector\r\n * @returns {vec3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n}\n/**\r\n * Set the components of a vec3 to the given values\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @returns {vec3} out\r\n */\n\nexport function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n}\n/**\r\n * Adds two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n}\n/**\r\n * Multiplies two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n}\n/**\r\n * Divides two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to ceil\r\n * @returns {vec3} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to floor\r\n * @returns {vec3} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n}\n/**\r\n * Math.round the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to round\r\n * @returns {vec3} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n}\n/**\r\n * Scales a vec3 by a scalar number\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec3} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n}\n/**\r\n * Adds two vec3's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec3} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Calculates the squared length of a vec3\r\n *\r\n * @param {ReadonlyVec3} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n}\n/**\r\n * Negates the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to negate\r\n * @returns {vec3} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to invert\r\n * @returns {vec3} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n}\n/**\r\n * Normalize a vec3\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a vector to normalize\r\n * @returns {vec3} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec3's\r\n *\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n/**\r\n * Computes the cross product of two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2];\n var bx = b[0],\n by = b[1],\n bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec3's\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n}\n/**\r\n * Performs a hermite interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Performs a bezier interpolation with two control points\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the first operand\r\n * @param {ReadonlyVec3} b the second operand\r\n * @param {ReadonlyVec3} c the third operand\r\n * @param {ReadonlyVec3} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec3} out\r\n */\n\nexport function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec3} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat4.\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n}\n/**\r\n * Transforms the vec3 with a mat3.\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyMat3} m the 3x3 matrix to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n}\n/**\r\n * Transforms the vec3 with a quat\r\n * Can also be used for dual quaternions. (Multiply it with the real part)\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec3} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec3} out\r\n */\n\nexport function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3];\n var x = a[0],\n y = a[1],\n z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n\n var uvx = qy * z - qz * y,\n uvy = qz * x - qx * z,\n uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n\n var uuvx = qy * uvz - qz * uvy,\n uuvy = qz * uvx - qx * uvz,\n uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n}\n/**\r\n * Rotate a 3D vector around the x-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateX(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the y-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateY(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Rotate a 3D vector around the z-axis\r\n * @param {vec3} out The receiving vec3\r\n * @param {ReadonlyVec3} a The vec3 point to rotate\r\n * @param {ReadonlyVec3} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec3} out\r\n */\n\nexport function rotateZ(out, a, b, rad) {\n var p = [],\n r = []; //Translate point to the origin\n\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n}\n/**\r\n * Get the angle between two 3D vectors\r\n * @param {ReadonlyVec3} a The first operand\r\n * @param {ReadonlyVec3} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n bx = b[0],\n by = b[1],\n bz = b[2],\n mag1 = Math.sqrt(ax * ax + ay * ay + az * az),\n mag2 = Math.sqrt(bx * bx + by * by + bz * bz),\n mag = mag1 * mag2,\n cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec3 to zero\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @returns {vec3} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec3} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec3} a The first vector.\r\n * @param {ReadonlyVec3} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n}\n/**\r\n * Alias for {@link vec3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec3.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec3.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec3.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec3.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec3.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec3s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 3;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n\n return a;\n };\n}();","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import * as glMatrix from \"./common.js\";\n/**\r\n * 2 Dimensional Vector\r\n * @module vec2\r\n */\n\n/**\r\n * Creates a new, empty vec2\r\n *\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with values from an existing vector\r\n *\r\n * @param {vec2} a vector to clone\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Copy the values from one vec2 to another\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the source vector\r\n * @returns {vec2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Set the components of a vec2 to the given values\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} out\r\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Adds two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\r\n * Multiplies two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\r\n * Divides two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to ceil\r\n * @returns {vec2} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to floor\r\n * @returns {vec2} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\r\n * Math.round the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to round\r\n * @returns {vec2} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\r\n * Scales a vec2 by a scalar number\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec2} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\r\n * Adds two vec2's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec2} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec2's\r\n *\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec2's\r\n *\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\r\n * Calculates the length of a vec2\r\n *\r\n * @param {vec2} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared length of a vec2\r\n *\r\n * @param {vec2} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\r\n * Negates the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to negate\r\n * @returns {vec2} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to invert\r\n * @returns {vec2} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\r\n * Normalize a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a vector to normalize\r\n * @returns {vec2} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec2's\r\n *\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\r\n * Computes the cross product of two vec2's\r\n * Note that the cross product must by definition produce a 3D vector\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the first operand\r\n * @param {vec2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec2} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat2} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2d\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat2d} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat3\r\n * 3rd vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat3} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat4\r\n * 3rd vector component is implicitly '0'\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {vec2} a the vector to transform\r\n * @param {mat4} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\r\n * Rotate a 2D vector\r\n * @param {vec2} out The receiving vec2\r\n * @param {vec2} a The vec2 point to rotate\r\n * @param {vec2} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec2} out\r\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\r\n * Get the angle between two 2D vectors\r\n * @param {vec2} a The first operand\r\n * @param {vec2} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec2 to zero\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @returns {vec2} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {vec2} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\r\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\r\n *\r\n * @param {vec2} a The first vector.\r\n * @param {vec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {vec2} a The first vector.\r\n * @param {vec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\r\n * Alias for {@link vec2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec2.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec2.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec2.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec2s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","/*! pako 2.0.3 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES = 30;\n/* number of distance codes */\n\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) =>\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n let len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n};\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nconst tr_static_init = () => {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nconst copy_block = (s, buf, len, header) =>\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending);\n s.pending += len;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) =>\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let lx = 0; /* running index in l_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) =>\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let black_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nconst _tr_flush_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally = (s, dist, lc) =>\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //let out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n};\n\nvar _tr_init_1 = _tr_init;\nvar _tr_stored_block_1 = _tr_stored_block;\nvar _tr_flush_block_1 = _tr_flush_block;\nvar _tr_tally_1 = _tr_tally;\nvar _tr_align_1 = _tr_align;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init: _tr_init$1, _tr_stored_block: _tr_stored_block$1, _tr_flush_block: _tr_flush_block$1, _tr_tally: _tr_tally$1, _tr_align: _tr_align$1 } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_PARTIAL_FLUSH, Z_FULL_FLUSH, Z_FINISH, Z_BLOCK,\n Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,\n Z_DEFAULT_COMPRESSION,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED: Z_FIXED$1, Z_DEFAULT_STRATEGY,\n Z_UNKNOWN: Z_UNKNOWN$1,\n Z_DEFLATED\n} = constants;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES$1 = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS$1 = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES$1 = 30;\n/* number of distance codes */\nconst BL_CODES$1 = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE$1 = 2 * L_CODES$1 + 1;\n/* maximum heap size */\nconst MAX_BITS$1 = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH$1 + MIN_MATCH$1 + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst EXTRA_STATE = 69;\nconst NAME_STATE = 73;\nconst COMMENT_STATE = 91;\nconst HCRC_STATE = 103;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = messages[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero$1 = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block$1(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32_1(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32_1(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH$1;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH$1 - (strend - scan);\n scan = strend - MAX_MATCH$1;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH$1) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH$1) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n let max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n const max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n};\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH$1) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH$1) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally$1(s, s.strstart - s.match_start, s.match_length - MIN_MATCH$1);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH$1) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH$1 - 1)) ? s.strstart : MIN_MATCH$1 - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH$1) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH$1 - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH$1 && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH$1 - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH$1 && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH$1;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally$1(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH$1);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH$1 - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH$1 - 1 ? s.strstart : MIN_MATCH$1 - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH$1) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH$1 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH$1 && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH$1;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH$1 - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH$1) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally$1(s, 1, s.match_length - MIN_MATCH$1);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero$1(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE$1 * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES$1 + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES$1 + 1) * 2);\n zero$1(this.dyn_ltree);\n zero$1(this.dyn_dtree);\n zero$1(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS$1 + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES$1 + 1); /* heap used to build the Huffman trees */\n zero$1(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES$1 + 1); //uch depth[2*L_CODES+1];\n zero$1(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nconst deflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN$1;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n _tr_init$1(s);\n return Z_OK;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED$1) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH$1 - 1) / MIN_MATCH$1);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n};\n\n\nconst deflate = (strm, flush) => {\n\n let beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align$1(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block$1(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero$1(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero$1(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH$1) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH$1 - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH$1 - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2 = deflate;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n let i, out;\n const len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$1,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1,\n Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n Z_DEFLATED: Z_DEFLATED$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n this.options = common.assign({\n level: Z_DEFAULT_COMPRESSION$1,\n method: Z_DEFLATED$1,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY$1\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = deflate_1.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK$1) {\n throw new Error(messages[status]);\n }\n\n if (opt.header) {\n deflate_1.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = deflate_1.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK$1) {\n throw new Error(messages[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$1 : Z_NO_FLUSH$1;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH$1) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = deflate_1.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END$1) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = deflate_1.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK$1;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$1) {\n this.result = common.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n const deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate$1(input, options);\n}\n\n\nvar Deflate_1 = Deflate;\nvar deflate_2$1 = deflate$1;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar constants$1 = constants;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_2$1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD = 30; /* got a data error -- remain here until reset */\nconst TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n// let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH: Z_FINISH$2, Z_BLOCK: Z_BLOCK$1, Z_TREES,\n Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2, Z_NEED_DICT, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR, Z_BUF_ERROR: Z_BUF_ERROR$1,\n Z_DEFLATED: Z_DEFLATED$2\n} = constants;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 1; /* i: waiting for magic header */\nconst FLAGS = 2; /* i: waiting for method and flags (gzip) */\nconst TIME = 3; /* i: waiting for modification time (gzip) */\nconst OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 5; /* i: waiting for extra length (gzip) */\nconst EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nconst NAME = 7; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 8; /* i: waiting for end of comment (gzip) */\nconst HCRC = 9; /* i: waiting for header crc (gzip) */\nconst DICTID = 10; /* i: waiting for dictionary check value */\nconst DICT = 11; /* waiting for inflateSetDictionary() call */\nconst TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 14; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 17; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 18; /* i: waiting for code length code lengths */\nconst CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 20; /* i: same as LEN below, but only first time in */\nconst LEN = 21; /* i: waiting for length/lit/eob code */\nconst LENEXT = 22; /* i: waiting for length extra bits */\nconst DIST = 23; /* i: waiting for distance code */\nconst DISTEXT = 24; /* i: waiting for distance extra bits */\nconst MATCH = 25; /* o: waiting for output space to copy string */\nconst LIT = 26; /* o: waiting for output space to write literal */\nconst CHECK = 27; /* i: waiting for 32-bit check value */\nconst LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 29; /* finished check, done -- remain here until reset */\nconst BAD$1 = 30; /* got a data error -- remain here until reset */\nconst MEM = 31; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS$1;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS$1);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS$1);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK$2;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$2) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS$1, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS$1, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE$1) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$2;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD$1;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED$2) {\n strm.msg = 'unknown compression method';\n state.mode = BAD$1;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD$1;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE$1;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED$2) {\n strm.msg = 'unknown compression method';\n state.mode = BAD$1;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD$1;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE$1;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE$1;\n /* falls through */\n case TYPE$1:\n if (flush === Z_BLOCK$1 || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD$1;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD$1;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE$1;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD$1;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES$1, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD$1;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD$1;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD$1;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD$1) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD$1;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS$1, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD$1;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS$1, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD$1;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE$1) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE$1;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$2;\n break inf_leave;\n case BAD$1:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD$1 &&\n (state.mode < CHECK || flush !== Z_FINISH$2))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE$1 ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$2) && ret === Z_OK$2) {\n ret = Z_BUF_ERROR$1;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$2;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$2;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK$2;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2 = inflate;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\n*/\n\nvar inflate_1 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$2, Z_FINISH: Z_FINISH$3,\n Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_MEM_ERROR: Z_MEM_ERROR$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK$3) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK$3) {\n throw new Error(messages[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$3 : Z_NO_FLUSH$2;\n\n // Convert data if needed\n if (toString$1.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT$1 && dictionary) {\n status = inflate_1.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK$3) {\n status = inflate_1.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR$2) {\n // Replace code with more verbose\n status = Z_NEED_DICT$1;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END$3 &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1.inflateReset(strm);\n status = inflate_1.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR$2:\n case Z_DATA_ERROR$2:\n case Z_NEED_DICT$1:\n case Z_MEM_ERROR$1:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END$3) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK$3 && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END$3) {\n status = inflate_1.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$3) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1 = Inflate;\nvar inflate_2$1 = inflate$1;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip = inflate$1;\nvar constants$2 = constants;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1,\n\tinflate: inflate_2$1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip,\n\tconstants: constants$2\n};\n\nconst { Deflate: Deflate$1, deflate: deflate$2, deflateRaw: deflateRaw$1, gzip: gzip$1 } = deflate_1$1;\n\nconst { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1, ungzip: ungzip$1 } = inflate_1$1;\n\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_1$2 = deflate$2;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar Inflate_1$1 = Inflate$1;\nvar inflate_1$2 = inflate$2;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip_1 = ungzip$1;\nvar constants_1 = constants;\n\nvar pako = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_1$2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tInflate: Inflate_1$1,\n\tinflate: inflate_1$2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\nexport { pako as p };\n","import { p as pako } from './pako.esm-ef1fc3f4.mjs';\n\nclass GZip {\n constructor(level = 1) {\n if (level < 0 || level > 9) {\n throw new Error('Invalid gzip compression level, it should be between 0 and 9');\n }\n this.level = level;\n }\n static fromConfig({ level }) {\n return new GZip(level);\n }\n encode(data) {\n const gzipped = pako.gzip(data, { level: this.level });\n return gzipped;\n }\n decode(data, out) {\n const uncompressed = pako.ungzip(data);\n if (out !== undefined) {\n out.set(uncompressed);\n return out;\n }\n return uncompressed;\n }\n}\nGZip.codecId = 'gzip';\n\nexport default GZip;\n","import { p as pako } from './pako.esm-ef1fc3f4.mjs';\n\nclass Zlib {\n constructor(level = 1) {\n if (level < -1 || level > 9) {\n throw new Error('Invalid zlib compression level, it should be between -1 and 9');\n }\n this.level = level;\n }\n static fromConfig({ level }) {\n return new Zlib(level);\n }\n encode(data) {\n const gzipped = pako.deflate(data, { level: this.level });\n return gzipped;\n }\n decode(data, out) {\n const uncompressed = pako.inflate(data);\n if (out !== undefined) {\n out.set(uncompressed);\n return out;\n }\n return uncompressed;\n }\n}\nZlib.codecId = 'zlib';\n\nexport default Zlib;\n","const IS_NODE = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;\n// This is for the \"binary\" loader (custom code is ~2x faster than \"atob\")\n// from: https://github.com/evanw/esbuild/blob/150a01844d47127c007c2b1973158d69c560ca21/internal/runtime/runtime.go#L185\nlet __toBinary = IS_NODE\n ? (base64) => new Uint8Array(Buffer.from(base64, 'base64'))\n : /* @__PURE__ */ (() => {\n var table = new Uint8Array(128);\n for (var i = 0; i < 64; i++)\n table[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i * 4 - 205] = i;\n return (base64) => {\n var n = base64.length;\n // @ts-ignore\n var bytes = new Uint8Array((((n - (base64[n - 1] == '=') - (base64[n - 2] == '=')) * 3) / 4) | 0);\n for (var i = 0, j = 0; i < n;) {\n var c0 = table[base64.charCodeAt(i++)], c1 = table[base64.charCodeAt(i++)];\n var c2 = table[base64.charCodeAt(i++)], c3 = table[base64.charCodeAt(i++)];\n bytes[j++] = (c0 << 2) | (c1 >> 4);\n bytes[j++] = (c1 << 4) | (c2 >> 2);\n bytes[j++] = (c2 << 6) | c3;\n }\n return bytes;\n };\n })();\nfunction initEmscriptenModule(moduleFactory, src) {\n const wasmBinary = __toBinary(src);\n return moduleFactory({ noInitialRun: true, wasmBinary });\n}\n\nexport { initEmscriptenModule as i };\n","import { i as initEmscriptenModule } from './utils-6b0080f1.mjs';\n\nvar blosc_codec = (function() {\n var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;\n \n return (\nfunction(blosc_codec) {\n blosc_codec = blosc_codec || {};\n\n\nvar f;f||(f=typeof blosc_codec !== 'undefined' ? blosc_codec : {});var aa,ba;f.ready=new Promise(function(a,b){aa=a;ba=b;});var r={},t;for(t in f)f.hasOwnProperty(t)&&(r[t]=f[t]);var ca=\"./this.program\",da=f.print||console.log.bind(console),u=f.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(f[t]=r[t]);r=null;f.thisProgram&&(ca=f.thisProgram);var v;f.wasmBinary&&(v=f.wasmBinary);var noExitRuntime;f.noExitRuntime&&(noExitRuntime=f.noExitRuntime);\n\"object\"!==typeof WebAssembly&&w(\"no native wasm support detected\");var y,ea=!1,fa=\"undefined\"!==typeof TextDecoder?new TextDecoder(\"utf8\"):void 0;\nfunction ha(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.subarray&&fa)return fa.decode(a.subarray(b,c));for(d=\"\";b<c;){var e=a[b++];if(e&128){var g=a[b++]&63;if(192==(e&224))d+=String.fromCharCode((e&31)<<6|g);else {var k=a[b++]&63;e=224==(e&240)?(e&15)<<12|g<<6|k:(e&7)<<18|g<<12|k<<6|a[b++]&63;65536>e?d+=String.fromCharCode(e):(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023));}}else d+=String.fromCharCode(e);}return d}\nfunction ia(a,b,c){var d=z;if(0<c){c=b+c-1;for(var e=0;e<a.length;++e){var g=a.charCodeAt(e);if(55296<=g&&57343>=g){var k=a.charCodeAt(++e);g=65536+((g&1023)<<10)|k&1023;}if(127>=g){if(b>=c)break;d[b++]=g;}else {if(2047>=g){if(b+1>=c)break;d[b++]=192|g>>6;}else {if(65535>=g){if(b+2>=c)break;d[b++]=224|g>>12;}else {if(b+3>=c)break;d[b++]=240|g>>18;d[b++]=128|g>>12&63;}d[b++]=128|g>>6&63;}d[b++]=128|g&63;}}d[b]=0;}}var ja=\"undefined\"!==typeof TextDecoder?new TextDecoder(\"utf-16le\"):void 0;\nfunction ka(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&A[c];)++c;c<<=1;if(32<c-a&&ja)return ja.decode(z.subarray(a,c));c=0;for(d=\"\";;){var e=C[a+2*c>>1];if(0==e||c==b/2)return d;++c;d+=String.fromCharCode(e);}}function la(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)C[b>>1]=a.charCodeAt(e),b+=2;C[b>>1]=0;return b-d}function ma(a){return 2*a.length}\nfunction na(a,b){for(var c=0,d=\"\";!(c>=b/4);){var e=D[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e);}return d}function oa(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var g=a.charCodeAt(e);if(55296<=g&&57343>=g){var k=a.charCodeAt(++e);g=65536+((g&1023)<<10)|k&1023;}D[b>>2]=g;b+=4;if(b+4>c)break}D[b>>2]=0;return b-d}\nfunction pa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4;}return b}var E,F,z,C,A,D,G,qa,ra;function sa(a){E=a;f.HEAP8=F=new Int8Array(a);f.HEAP16=C=new Int16Array(a);f.HEAP32=D=new Int32Array(a);f.HEAPU8=z=new Uint8Array(a);f.HEAPU16=A=new Uint16Array(a);f.HEAPU32=G=new Uint32Array(a);f.HEAPF32=qa=new Float32Array(a);f.HEAPF64=ra=new Float64Array(a);}var ta=f.INITIAL_MEMORY||16777216;f.wasmMemory?y=f.wasmMemory:y=new WebAssembly.Memory({initial:ta/65536,maximum:32768});\ny&&(E=y.buffer);ta=E.byteLength;sa(E);var I,ua=[],va=[],wa=[],xa=[];function ya(){var a=f.preRun.shift();ua.unshift(a);}var J=0,K=null;f.preloadedImages={};f.preloadedAudios={};function w(a){if(f.onAbort)f.onAbort(a);u(a);ea=!0;a=new WebAssembly.RuntimeError(\"abort(\"+a+\"). Build with -s ASSERTIONS=1 for more info.\");ba(a);throw a;}function Aa(a){var b=L;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function Ba(){return Aa(\"data:application/octet-stream;base64,\")}\nvar L=\"blosc_codec.wasm\";if(!Ba()){var Ca=L;L=f.locateFile?f.locateFile(Ca,\"\"):\"\"+Ca;}function Da(){try{if(v)return new Uint8Array(v);throw \"both async and sync fetching of the wasm failed\";}catch(a){w(a);}}function N(a){for(;0<a.length;){var b=a.shift();if(\"function\"==typeof b)b(f);else {var c=b.T;\"number\"===typeof c?void 0===b.O?I.get(c)():I.get(c)(b.O):c(void 0===b.O?null:b.O);}}}\nfunction Ea(a){this.N=a-16;this.$=function(b){D[this.N+8>>2]=b;};this.X=function(b){D[this.N+0>>2]=b;};this.Y=function(){D[this.N+4>>2]=0;};this.W=function(){F[this.N+12>>0]=0;};this.Z=function(){F[this.N+13>>0]=0;};this.V=function(b,c){this.$(b);this.X(c);this.Y();this.W();this.Z();};}function Fa(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(\"Unknown type size: \"+a);}}var Ga=void 0;\nfunction P(a){for(var b=\"\";z[a];)b+=Ga[z[a++]];return b}var Q={},R={},S={};function Ha(a){if(void 0===a)return \"_unknown\";a=a.replace(/[^a-zA-Z0-9_]/g,\"$\");var b=a.charCodeAt(0);return 48<=b&&57>=b?\"_\"+a:a}function Ia(a,b){a=Ha(a);return (new Function(\"body\",\"return function \"+a+'() {\\n \"use strict\"; return body.apply(this, arguments);\\n};\\n'))(b)}\nfunction Ja(a){var b=Error,c=Ia(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+\"\\n\"+d.replace(/^Error(:[^\\n]*)?\\n/,\"\"));});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+\": \"+this.message};return c}var Ka=void 0;function T(a){throw new Ka(a);}var La=void 0;\nfunction Ma(a,b){function c(h){h=b(h);if(h.length!==d.length)throw new La(\"Mismatched type converter count\");for(var l=0;l<d.length;++l)U(d[l],h[l]);}var d=[];d.forEach(function(h){S[h]=a;});var e=Array(a.length),g=[],k=0;a.forEach(function(h,l){R.hasOwnProperty(h)?e[l]=R[h]:(g.push(h),Q.hasOwnProperty(h)||(Q[h]=[]),Q[h].push(function(){e[l]=R[h];++k;k===g.length&&c(e);}));});0===g.length&&c(e);}\nfunction U(a,b,c){c=c||{};if(!(\"argPackAdvance\"in b))throw new TypeError(\"registerType registeredInstance requires argPackAdvance\");var d=b.name;a||T('type \"'+d+'\" must have a positive integer typeid pointer');if(R.hasOwnProperty(a)){if(c.U)return;T(\"Cannot register type '\"+d+\"' twice\");}R[a]=b;delete S[a];Q.hasOwnProperty(a)&&(b=Q[a],delete Q[a],b.forEach(function(e){e();}));}var Na=[],V=[{},{value:void 0},{value:null},{value:!0},{value:!1}];\nfunction Qa(a){4<a&&0===--V[a].P&&(V[a]=void 0,Na.push(a));}function Ra(a){switch(a){case void 0:return 1;case null:return 2;case !0:return 3;case !1:return 4;default:var b=Na.length?Na.pop():V.length;V[b]={P:1,value:a};return b}}function Sa(a){return this.fromWireType(G[a>>2])}function Ta(a){if(null===a)return \"null\";var b=typeof a;return \"object\"===b||\"array\"===b||\"function\"===b?a.toString():\"\"+a}\nfunction Ua(a,b){switch(b){case 2:return function(c){return this.fromWireType(qa[c>>2])};case 3:return function(c){return this.fromWireType(ra[c>>3])};default:throw new TypeError(\"Unknown float type: \"+a);}}function Va(a){var b=Function;if(!(b instanceof Function))throw new TypeError(\"new_ called with constructor type \"+typeof b+\" which is not a function\");var c=Ia(b.name||\"unknownFunctionName\",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}\nfunction Wa(a){for(;a.length;){var b=a.pop();a.pop()(b);}}function Xa(a,b){var c=f;if(void 0===c[a].L){var d=c[a];c[a]=function(){c[a].L.hasOwnProperty(arguments.length)||T(\"Function '\"+b+\"' called with an invalid number of arguments (\"+arguments.length+\") - expects one of (\"+c[a].L+\")!\");return c[a].L[arguments.length].apply(this,arguments)};c[a].L=[];c[a].L[d.S]=d;}}\nfunction Ya(a,b,c){f.hasOwnProperty(a)?((void 0===c||void 0!==f[a].L&&void 0!==f[a].L[c])&&T(\"Cannot register public name '\"+a+\"' twice\"),Xa(a,a),f.hasOwnProperty(c)&&T(\"Cannot register multiple overloads of a function with the same number of arguments (\"+c+\")!\"),f[a].L[c]=b):(f[a]=b,void 0!==c&&(f[a].ba=c));}function Za(a,b){for(var c=[],d=0;d<a;d++)c.push(D[(b>>2)+d]);return c}\nfunction $a(a,b){0<=a.indexOf(\"j\")||w(\"Assertion failed: getDynCaller should only be called with i64 sigs\");var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];var e;-1!=a.indexOf(\"j\")?e=c&&c.length?f[\"dynCall_\"+a].apply(null,[b].concat(c)):f[\"dynCall_\"+a].call(null,b):e=I.get(b).apply(null,c);return e}}\nfunction ab(a,b){a=P(a);var c=-1!=a.indexOf(\"j\")?$a(a,b):I.get(b);\"function\"!==typeof c&&T(\"unknown function pointer with signature \"+a+\": \"+b);return c}var bb=void 0;function cb(a){a=db(a);var b=P(a);W(a);return b}function eb(a,b){function c(g){e[g]||R[g]||(S[g]?S[g].forEach(c):(d.push(g),e[g]=!0));}var d=[],e={};b.forEach(c);throw new bb(a+\": \"+d.map(cb).join([\", \"]));}\nfunction fb(a,b,c){switch(b){case 0:return c?function(d){return F[d]}:function(d){return z[d]};case 1:return c?function(d){return C[d>>1]}:function(d){return A[d>>1]};case 2:return c?function(d){return D[d>>2]}:function(d){return G[d>>2]};default:throw new TypeError(\"Unknown integer type: \"+a);}}var gb={};\nfunction hb(){if(!ib){var a={USER:\"web_user\",LOGNAME:\"web_user\",PATH:\"/\",PWD:\"/\",HOME:\"/home/web_user\",LANG:(\"object\"===typeof navigator&&navigator.languages&&navigator.languages[0]||\"C\").replace(\"-\",\"_\")+\".UTF-8\",_:ca||\"./this.program\"},b;for(b in gb)a[b]=gb[b];var c=[];for(b in a)c.push(b+\"=\"+a[b]);ib=c;}return ib}for(var ib,jb=[null,[],[]],kb=Array(256),X=0;256>X;++X)kb[X]=String.fromCharCode(X);Ga=kb;Ka=f.BindingError=Ja(\"BindingError\");La=f.InternalError=Ja(\"InternalError\");\nf.count_emval_handles=function(){for(var a=0,b=5;b<V.length;++b)void 0!==V[b]&&++a;return a};f.get_first_emval=function(){for(var a=5;a<V.length;++a)if(void 0!==V[a])return V[a];return null};bb=f.UnboundTypeError=Ja(\"UnboundTypeError\");va.push({T:function(){lb();}});\nvar mb={p:function(a){return Y(a+16)+16},o:function(a,b,c){(new Ea(a)).V(b,c);throw a;},z:function(a,b,c,d,e){var g=Fa(c);b=P(b);U(a,{name:b,fromWireType:function(k){return !!k},toWireType:function(k,h){return h?d:e},argPackAdvance:8,readValueFromPointer:function(k){if(1===c)var h=F;else if(2===c)h=C;else if(4===c)h=D;else throw new TypeError(\"Unknown boolean type size: \"+b);return this.fromWireType(h[k>>g])},M:null});},y:function(a,b){b=P(b);U(a,{name:b,fromWireType:function(c){var d=\nV[c].value;Qa(c);return d},toWireType:function(c,d){return Ra(d)},argPackAdvance:8,readValueFromPointer:Sa,M:null});},h:function(a,b,c){c=Fa(c);b=P(b);U(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,e){if(\"number\"!==typeof e&&\"boolean\"!==typeof e)throw new TypeError('Cannot convert \"'+Ta(e)+'\" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:Ua(b,c),M:null});},e:function(a,b,c,d,e,g){var k=Za(b,c);a=P(a);e=ab(d,e);Ya(a,function(){eb(\"Cannot call \"+a+\" due to unbound types\",\nk);},b-1);Ma(k,function(h){var l=a,n=a;h=[h[0],null].concat(h.slice(1));var p=e,q=h.length;2>q&&T(\"argTypes array size mismatch! Must at least get return value and 'this' types!\");for(var x=null!==h[1]&&!1,B=!1,m=1;m<h.length;++m)if(null!==h[m]&&void 0===h[m].M){B=!0;break}var Oa=\"void\"!==h[0].name,H=\"\",M=\"\";for(m=0;m<q-2;++m)H+=(0!==m?\", \":\"\")+\"arg\"+m,M+=(0!==m?\", \":\"\")+\"arg\"+m+\"Wired\";n=\"return function \"+Ha(n)+\"(\"+H+\") {\\nif (arguments.length !== \"+(q-2)+\") {\\nthrowBindingError('function \"+n+\" called with ' + arguments.length + ' arguments, expected \"+\n(q-2)+\" args!');\\n}\\n\";B&&(n+=\"var destructors = [];\\n\");var Pa=B?\"destructors\":\"null\";H=\"throwBindingError invoker fn runDestructors retType classParam\".split(\" \");p=[T,p,g,Wa,h[0],h[1]];x&&(n+=\"var thisWired = classParam.toWireType(\"+Pa+\", this);\\n\");for(m=0;m<q-2;++m)n+=\"var arg\"+m+\"Wired = argType\"+m+\".toWireType(\"+Pa+\", arg\"+m+\"); // \"+h[m+2].name+\"\\n\",H.push(\"argType\"+m),p.push(h[m+2]);x&&(M=\"thisWired\"+(0<M.length?\", \":\"\")+M);n+=(Oa?\"var rv = \":\"\")+\"invoker(fn\"+(0<M.length?\", \":\"\")+M+\");\\n\";\nif(B)n+=\"runDestructors(destructors);\\n\";else for(m=x?1:2;m<h.length;++m)q=1===m?\"thisWired\":\"arg\"+(m-2)+\"Wired\",null!==h[m].M&&(n+=q+\"_dtor(\"+q+\"); // \"+h[m].name+\"\\n\",H.push(q+\"_dtor\"),p.push(h[m].M));Oa&&(n+=\"var ret = retType.fromWireType(rv);\\nreturn ret;\\n\");H.push(n+\"}\\n\");h=Va(H).apply(null,p);m=b-1;if(!f.hasOwnProperty(l))throw new La(\"Replacing nonexistant public symbol\");void 0!==f[l].L&&void 0!==m?f[l].L[m]=h:(f[l]=h,f[l].S=m);return []});},c:function(a,b,c,d,e){function g(n){return n}b=\nP(b);-1===e&&(e=4294967295);var k=Fa(c);if(0===d){var h=32-8*c;g=function(n){return n<<h>>>h};}var l=-1!=b.indexOf(\"unsigned\");U(a,{name:b,fromWireType:g,toWireType:function(n,p){if(\"number\"!==typeof p&&\"boolean\"!==typeof p)throw new TypeError('Cannot convert \"'+Ta(p)+'\" to '+this.name);if(p<d||p>e)throw new TypeError('Passing a number \"'+Ta(p)+'\" from JS side to C/C++ side to an argument of type \"'+b+'\", which is outside the valid range ['+d+\", \"+e+\"]!\");return l?p>>>0:p|0},argPackAdvance:8,readValueFromPointer:fb(b,\nk,0!==d),M:null});},b:function(a,b,c){function d(g){g>>=2;var k=G;return new e(E,k[g+1],k[g])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=P(c);U(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{U:!0});},i:function(a,b){b=P(b);var c=\"std::string\"===b;U(a,{name:b,fromWireType:function(d){var e=G[d>>2];if(c)for(var g=d+4,k=0;k<=e;++k){var h=d+4+k;if(k==e||0==z[h]){g=g?ha(z,g,h-g):\"\";if(void 0===l)var l=g;else l+=String.fromCharCode(0),\nl+=g;g=h+1;}}else {l=Array(e);for(k=0;k<e;++k)l[k]=String.fromCharCode(z[d+4+k]);l=l.join(\"\");}W(d);return l},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var g=\"string\"===typeof e;g||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||T(\"Cannot pass non-string to std::string\");var k=(c&&g?function(){for(var n=0,p=0;p<e.length;++p){var q=e.charCodeAt(p);55296<=q&&57343>=q&&(q=65536+((q&1023)<<10)|e.charCodeAt(++p)&1023);127>=q?++n:n=2047>=q?n+\n2:65535>=q?n+3:n+4;}return n}:function(){return e.length})(),h=Y(4+k+1);G[h>>2]=k;if(c&&g)ia(e,h+4,k+1);else if(g)for(g=0;g<k;++g){var l=e.charCodeAt(g);255<l&&(W(h),T(\"String has UTF-16 code units that do not fit in 8 bits\"));z[h+4+g]=l;}else for(g=0;g<k;++g)z[h+4+g]=e[g];null!==d&&d.push(W,h);return h},argPackAdvance:8,readValueFromPointer:Sa,M:function(d){W(d);}});},d:function(a,b,c){c=P(c);if(2===b){var d=ka;var e=la;var g=ma;var k=function(){return A};var h=1;}else 4===b&&(d=na,e=oa,g=pa,k=function(){return G},\nh=2);U(a,{name:c,fromWireType:function(l){for(var n=G[l>>2],p=k(),q,x=l+4,B=0;B<=n;++B){var m=l+4+B*b;if(B==n||0==p[m>>h])x=d(x,m-x),void 0===q?q=x:(q+=String.fromCharCode(0),q+=x),x=m+b;}W(l);return q},toWireType:function(l,n){\"string\"!==typeof n&&T(\"Cannot pass non-string to C++ string type \"+c);var p=g(n),q=Y(4+p+b);G[q>>2]=p>>h;e(n,q+4,p+b);null!==l&&l.push(W,q);return q},argPackAdvance:8,readValueFromPointer:Sa,M:function(l){W(l);}});},A:function(a,b){b=P(b);U(a,{aa:!0,name:b,argPackAdvance:0,fromWireType:function(){},\ntoWireType:function(){}});},n:Qa,x:function(a){4<a&&(V[a].P+=1);},C:function(a,b){var c=R[a];void 0===c&&T(\"_emval_take_value has unknown type \"+cb(a));a=c.readValueFromPointer(b);return Ra(a)},t:function(){w();},r:function(a,b,c){z.copyWithin(a,b,b+c);},s:function(a){a>>>=0;var b=z.length;if(2147483648<a)return !1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{y.grow(Math.min(2147483648,d)-E.byteLength+65535>>>16);sa(y.buffer);\nvar e=1;break a}catch(g){}e=void 0;}if(e)return !0}return !1},u:function(a,b){var c=0;hb().forEach(function(d,e){var g=b+c;e=D[a+4*e>>2]=g;for(g=0;g<d.length;++g)F[e++>>0]=d.charCodeAt(g);F[e>>0]=0;c+=d.length+1;});return 0},v:function(a,b){var c=hb();D[a>>2]=c.length;var d=0;c.forEach(function(e){d+=e.length+1;});D[b>>2]=d;return 0},w:function(){return 0},q:function(){},g:function(a,b,c,d){for(var e=0,g=0;g<c;g++){for(var k=D[b+8*g>>2],h=D[b+(8*g+4)>>2],l=0;l<h;l++){var n=z[k+l],p=jb[a];0===n||10===n?\n((1===a?da:u)(ha(p,0)),p.length=0):p.push(n);}e+=h;}D[d>>2]=e;return 0},a:y,l:function(){return 0},k:function(){return 0},j:function(){},B:function(){return 6},m:function(){},f:function(){}};\n(function(){function a(e){f.asm=e.exports;I=f.asm.D;J--;f.monitorRunDependencies&&f.monitorRunDependencies(J);0==J&&(K&&(e=K,K=null,e()));}function b(e){a(e.instance);}function c(e){return Promise.resolve().then(Da).then(function(g){return WebAssembly.instantiate(g,d)}).then(e,function(g){u(\"failed to asynchronously prepare wasm: \"+g);w(g);})}var d={a:mb};J++;f.monitorRunDependencies&&f.monitorRunDependencies(J);if(f.instantiateWasm)try{return f.instantiateWasm(d,\na)}catch(e){return u(\"Module.instantiateWasm callback failed with error: \"+e),!1}(function(){return v||\"function\"!==typeof WebAssembly.instantiateStreaming||Ba()||Aa(\"file://\")||\"function\"!==typeof fetch?c(b):fetch(L,{credentials:\"same-origin\"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(g){u(\"wasm streaming compile failed: \"+g);u(\"falling back to ArrayBuffer instantiation\");return c(b)})})})().catch(ba);return {}})();\nvar lb=f.___wasm_call_ctors=function(){return (lb=f.___wasm_call_ctors=f.asm.E).apply(null,arguments)},Y=f._malloc=function(){return (Y=f._malloc=f.asm.F).apply(null,arguments)},W=f._free=function(){return (W=f._free=f.asm.G).apply(null,arguments)},db=f.___getTypeName=function(){return (db=f.___getTypeName=f.asm.H).apply(null,arguments)};f.___embind_register_native_and_builtin_types=function(){return (f.___embind_register_native_and_builtin_types=f.asm.I).apply(null,arguments)};\nf.dynCall_jiiiii=function(){return (f.dynCall_jiiiii=f.asm.J).apply(null,arguments)};f.dynCall_jiji=function(){return (f.dynCall_jiji=f.asm.K).apply(null,arguments)};var Z;K=function nb(){Z||ob();Z||(K=nb);};\nfunction ob(){function a(){if(!Z&&(Z=!0,f.calledRun=!0,!ea)){N(va);N(wa);aa(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(f.postRun)for(\"function\"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;){var b=f.postRun.shift();xa.unshift(b);}N(xa);}}if(!(0<J)){if(f.preRun)for(\"function\"==typeof f.preRun&&(f.preRun=[f.preRun]);f.preRun.length;)ya();N(ua);0<J||(f.setStatus?(f.setStatus(\"Running...\"),setTimeout(function(){setTimeout(function(){f.setStatus(\"\");},1);a();},1)):a());}}\nf.run=ob;if(f.preInit)for(\"function\"==typeof f.preInit&&(f.preInit=[f.preInit]);0<f.preInit.length;)f.preInit.pop()();noExitRuntime=!0;ob();\n\n\n return blosc_codec.ready\n}\n);\n})();\n\nvar wasmSrc = \"AGFzbQEAAAABwAImYAF/AX9gA39/fwF/YAV/f39/fwF/YAJ/fwF/YAJ/fwBgAX8AYAN/f38AYAR/f39/AX9gBH9/f38AYAAAYAZ/f39/f38Bf2AFf39/f38AYAZ/f39/f38AYAd/f39/f39/AX9gBH9/f38BfmAFf39/f38BfmAIf39/f39/f38Bf2AJf39/f39/f39/AX9gAn5/AX9gC39/f39/f39/f39/AX9gA39+fwF+YAN/f34AYAN/f34Bf2ADfn9/AX9gAn5+AX5gCH9/f39/f39/AGAJf39/f39/f39/AGAFf35/f38AYAABf2ANf39/f39/f39/f39/fwF/YA9/f39/f39/f39/f39/f38Bf2AFf39/fn8Bf2AGf3x/f39/AX9gAX8BfmACf38BfmAHf35/f39/fwF+YAF+AX5gBH5/f34BfgK0AR0BYQFiAAYBYQFjAAsBYQFkAAYBYQFlAAwBYQFmAAUBYQFnAAcBYQFoAAYBYQFpAAQBYQFqAAMBYQFrAAABYQFsAAABYQFtAAMBYQFuAAUBYQFvAAYBYQFwAAABYQFxAAIBYQFyAAEBYQFzAAABYQF0AAkBYQF1AAMBYQF2AAMBYQF3AAABYQF4AAUBYQF5AAQBYQF6AAsBYQFBAAQBYQFCAAcBYQFDAAMBYQFhAgGAAoCAAgOtBKsEBAEBAwIACAAAAAQHAQEBAAIBAAQDAQMBBAEFAwUFAAYAAwAIAgIDAQgBAwYBCwEBAAQYBAEEBwoGAwMLBwgBBggDCwUDAwMGCAEGBAYABwIGAAABAAIEBAYEBQMDAAsABgwDAAANBgIYAwkAAQwGBggAAgAAAAUQHQA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Ay8AAEcNACABQQJqIQEgA0ECaiEDCyADIAJJBH8gA0EBaiADIAEtAAAgAy0AAEYbBSADCyAAawtoAAJAAkACQAJAAkAgAkF7ag4EAQIDBAALIAAgARDeAQ8LIAAgARDdAQ8LIAAgARDcAQ8LIAApAABCgMaV/cub741PfkHAACABa62Ipw8LIAApAABC48iVvcub741PfkHAACABa62IpwsUACAAKAAAIgBBCHQgACABQQNGGws4AQF/IAMgASAAIAEgACADIAFraiIFIAIgBSACSRsQHSIFakYEfyAAIAVqIAQgAhAdIAVqBSAFCwsIACAAQYh/SwuTAQECfyABIANNBEAgACABEBwgAEEQaiABQRBqEBwgACADIAFrIgRqIQUgBEEhTgRAIABBIGohAANAIAAgAUEgaiIEEBwgAEEQaiABQTBqEBwgBCEBIABBIGoiACAFSQ0ACwsgAyEBIAUhAAsgASACSQRAA0AgACABLQAAOgAAIABBAWohACABQQFqIgEgAkcNAAsLC5gBAQR/QQMhAQJAIAAoAgQiAkEgTQRAIAACfyAAKAIIIgEgACgCEE8EQCAAIAEgAkEDdmsiAzYCCEEAIQEgAkEHcQwBCyABIAAoAgwiA0YNAiAAIAEgASADayACQQN2IgQgASAEayADSSIBGyIEayIDNgIIIAIgBEEDdGsLNgIEIAAgAygAADYCAAsgAQ8LQQFBAiACQSBJGwsIACAAZ0EfcwsIACAAaEEDdgsPACAAIAAoAgQgAWo2AgQLHAAgACACQQEgA3QiA2sgACACIABrIANLGyABGwvzAgICfwF+AkAgAkUNACAAIAJqIgNBf2ogAToAACAAIAE6AAAgAkEDSQ0AIANBfmogAToAACAAIAE6AAEgA0F9aiABOgAAIAAgAToAAiACQQdJDQAgA0F8aiABOgAAIAAgAToAAyACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgRrIgJBIEkNACABrSIFQiCGIAWEIQUgAyAEaiEBA0AgASAFNwMYIAEgBTcDECABIAU3AwggASAFNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALDQAgACABdEEAIAJrdguCBAEDfyACQYAETwRAIAAgASACEBAaIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsbAQF/IABBAWoiABAk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AIgBEchCiAEQQFqIQQgCg0ACwsgAUEBaiIBIAhJDQALCyAAQQRqIAcgCyAJIANBpAVqIAMgAiANEJYDIAVBAToABSAFIAc6AAYgACAFKAIENgIACyAQIQQLIAVBEGokACAEC+ACAQl/IwBBEGsiBCQAIARBADYCDCAEQQA2AggCQCADQUBrIgkgAyAEQQhqIARBDGogASACEPsBIggQIQ0AIARBBGogACgCABA0QQEhASAEKAIMIgUgBC0ABEEBak0EQEEAIQIgBEEAOgAFIAQgBToABiAAIAQoAgQ2AgAgBUEBakEBSwRAA0AgAyABQQJ0aiIGKAIAIQcgBiACNgIAIAcgAUF/anQgAmohAiABIAVGIQYgAUEBaiEBIAZFDQALCyAEKAIIIgdFDQEgAEEEaiEKIAVBAWohC0EAIQADQCADIAAgCWotAAAiBUECdGoiBigCACIBIAFBASAFdEEBdSIMaiICSQRAIAsgBWshBQNAIAogAUEBdGoiAiAFOgABIAIgADoAACABQQFqIgEgBigCACAMaiICSQ0ACwsgBiACNgIAIABBAWoiACAHRw0ACwwBC0FUIQgLIARBEGokACAICxQAIAAoAABBgPqerQNsQSAgAWt2CygAAkACQAJAIAAoAowBQX9qDgIAAQILIAAgARDCAw8LIAAgARDHAwsLOgEBfyABIAAoAgRrIgEgACgCGCICQYAIaksEQCAAIAEgASACa0GAeGoiAEGABCAAQYAESRtrNgIYCwsVACAAEJEBBEAgACgCBA8LIAAtAAsLRQEBfwJAIAIgA00gACABTXINAANAIABBf2oiAC0AACACQX9qIgItAABHDQEgBEEBaiEEIAIgA00NASAAIAFLDQALCyAECwwAIABBICABa62IpwsQACAAIAEgAigCCHRBA3RqCxIAIABBwAAgAWutiKdBACABGwsvAEEgIAFrIgEgAkkEQCAAp0F/IAJ0QX9zcQ8LIAAgASACa62Ip0F/IAJ0QX9zcQsgACACrSAAIAGtQgp8IAN+fULjyJW9y5vvjU9+fEIKfAsoAQF/IwBBEGsiAiQAIABBzA8gAkEIaiABEMYCEBs2AgAgAkEQaiQACxAAIAAgAjYC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ACgCFCIBQQFqNgIUIAEgACgCCGogAC0AuC06AAAgACAAKAIUIgFBAWo2AhQgAEG5LWotAAAhAiABIAAoAghqDAELIAFBAUgNASAAIAAoAhQiAUEBajYCFCAALQC4LSECIAEgACgCCGoLIAI6AAALIABBADYCvC0gAEEAOwG4LQvaBAEBfwNAIAAgAUECdGpBADsBlAEgAUEBaiIBQZ4CRw0ACyAAQQA7AfwUIABBADsBiBMgAEHEFWpBADsBACAAQcAVakEAOwEAIABBvBVqQQA7AQAgAEG4FWpBADsBACAAQbQVakEAOwEAIABBsBVqQQA7AQAgAEGsFWpBADsBACAAQagVakEAOwEAIABBpBVqQQA7AQAgAEGgFWpBADsBACAAQZwVakEAOwEAIABBmBVqQQA7AQAgAEGUFWpBADsBACAAQZAVakEAOwEAIABBjBVqQQA7AQAgAEGIFWpBADsBACAAQYQVakEAOwEAIABBgBVqQQA7AQAgAEH8E2pBADsBACAAQfgTakEAOwEAIABB9BNqQQA7AQAgAEHwE2pBADsBACAAQewTakEAOwEAIABB6BNqQQA7AQAgAEHkE2pBADsBACAAQeATakEAOwEAIABB3BNqQQA7AQAgAEHYE2pBADsBACAAQdQTakEAOwEAIABB0BNqQQA7AQAgAEHME2pBADsBACAAQcgTakEAOwEAIABBxBNqQQA7AQAgAEHAE2pBADsBACAAQbwTakEAOwEAIABBuBNqQQA7AQAgAEG0E2pBADsBACAAQbATakEAOwEAIABBrBNqQQA7AQAgAEGoE2pBADsBACAAQaQTakEAOwEAIABBoBNqQQA7AQAgAEGcE2pBADsBACAAQZgTakEAOwEAIABBlBNqQQA7AQAgAEGQE2pBADsBACAAQYwTakEAOwEAIABCADcCrC0gAEGUCWpBATsBACAAQQA2AqgtIABBADYCoC0LngEBAn8gACAALwG4LSADQf//A3EiBCAAKAK8LSIDdHIiBTsBuC0gAAJ/IANBDk4EQCAAIAAoAhQiA0EBajYCFCADIAAoAghqIAU6AAAgACAAKAIUIgNBAWo2AhQgAyAAKAIIaiAAQbktai0AADoAACAAIARB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RAIAQgAiALEEoaDAILIAQgAkEAIABrEEohAiAHIAAgC2oiCzYCXCAHIAIgAGsiBDYCbCAHIA02AmggDSECCyAJQRBPBEAgBCACEBwgBEEQaiACQRBqEBwgC0EhSA0BIAQgC2ohCCAEQSBqIQADQCAAIAJBIGoiBBAcIABBEGogAkEwahAcIAQhAiAAQSBqIgAgCEkNAAsMAQsgB0HsAGogB0HoAGogCRB8IAtBCUkNACALIAcoAmwiCGpBeGohBCAIIAcoAmgiAGtBD0wEQANAIAggABBnIABBCGohACAIQQhqIgggBEkNAAwCCwALIAggABAcIAhBEGogAEEQahAcIAtBKUgNACAIQSBqIQgDQCAIIABBIGoiAhAcIAhBEGogAEEwahAcIAIhACAIQSBqIgggBEkNAAsLIAMLIQAgBUF/aiEFIAAgCmohCiAAECFFDQALDAELQbp/IQAgDyAIayICIA4gCmtLDQAgCiAIIAIQKiACaiABayEACyAHQfAAaiQAIAALkBgCGX8CfiMAQdABayIHJAAgByAAKALw4QEiCDYCtAEgASACaiESIAggACgCgOIBaiETIAEhCgJAIAUEQCAAKALE4AEhECAAKALA4AEhFCAAKAK84AEhDiAAQQE2AozhASAHIABBtNABaigCADYCXCAHIABBrNABaiIXKQIANwJUIAcgEDYCZCAHIA42AmAgByABIA5rNgJoQWwhDyAHQShqIAMgBBBFECENASAFQQQgBUEESBshFiAHQTxqIAdBKGogACgCABBoIAdBxABqIAdBKGogACgCCBBoIAdBzABqIAdBKGogACgCBBBoQQAhCCAFQQBKIQICQCAFQQFIIAdBKGoQI0ECS3INACAHQeAAaiELIAdB5ABqIQwDQCAHKAJAIAcoAjxBA3RqIgAtAAIhAyAHKAJQIAcoAkxBA3RqIgItAAIhBCACKAIEIQ0gACgCBCEJQQAhAAJAAkAgBygCSCAHKAJEQQN0aiIKLQACIgIEQCAKKAIEIQACQCAGBEAgACAHQShqIAJBGCACQRhJGyIAEEIgAiAAayIKdGohACAHQShqECMaIApFDQEgB0EoaiAKEEIgAGohAAwBCyAHQShqIAIQQi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C4ghDiANIAIgBUECdGo1AgB+IAx8IgwgC4inIA6nayIDRQRAQX8PCyABIAM7AQALIAVBAWoiBSAETQ0ACwtBACECCyACC0QBAX9BfyEFIARBA3EEfyAFBSABKAIAQf4BTQRAIAAgASACIANBASAEEIMCDwsgAUH/ATYCACAAIAEgAiADIAQQgwELC1gBAX8jAEEQayIEJAACf0EBIAAgASAEQQxqEMAERQ0AGkECIAMoAgAgBCgCDEkNABpBASAAIAEgAhChBEUNABogAyAEKAIMNgIAQQALIQAgBEEQaiQAIAALiQIBA38CQAJAIAAoAhwiAygCNCIERQRAQQEhBSADIAAoAihBASADKAIkdEEBIAAoAiARAQAiBDYCNCAERQ0BCyADKAIoIgBFBEAgA0IANwIsIANBASADKAIkdCIANgIoCyAAIAJNBEAgBCABIABrIAAQKhogA0EANgIwDAILIAQgAygCMCIFaiABIAJrIAIgACAFayIAIAAgAksbIgAQKhogAiAAayICBEAgAygCNCABIAJrIAIQKhogAyACNgIwDAILQQAhBSADQQAgAygCMCAAaiIBIAEgAygCKCICRhs2AjAgAygCLCIBIAJPDQAgAyAAIAFqNgIsCyAFDwsgAyADKAIoNgIsQQALsjcBHX8jAEEQayISJABBfiEUAkAgAEUNACAAKAIcIgFFDQAgACgCDCIORQ0AIAAoAgAiBkUEQCAAKAIEDQELIAEoAgAiAkELRgRAIAFBDDYCAEEMIQILIAFB2ABqIRsgAUHwBWohFyABQfAAaiEZIAFB1ABqIRogAUHsAGohGCABQbAKaiEWIAEoAjwhBCABKAI4IQUgACgCBCIcIQcgACgCECIMIRMCQANAAkBBfCEUQQEhAwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIOHwgJCg0QAwIBABobHBwdHh8gIQclJgY3BTknKARFLkYvCyABKAIQI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YCFCAEIAEoAghqIAM6AAAgASgCHC0AByEDIAEgASgCFCIEQQFqNgIUIAQgASgCCGogAzoAACABKAKEASIDQQlHBEBBBCABKAKIAUEBSkECdCADQQJIGyECCyABIAEoAhQiA0EBajYCFCADIAEoAghqIAI6AAAgASgCHCgCDCECIAEgASgCFCIDQQFqNgIUIAMgASgCCGogAjoAAAJ/IAEoAhwiBCgCEARAIAQoAhQhAiABIAEoAhQiA0EBajYCFCADIAEoAghqIAI6AAAgASgCHCgCFCECIAEgASgCFCIDQQFqNgIUIAMgASgCCGogAkEIdjoAACABKAIcIQQLIAQoAiwLBEAgACAAKAIwIAEoAgggASgCFBA1NgIwCyABQcUANgIEIAFBADYCIAwCCyABKAIwQQx0QYCQfmohBEEAIQICQCABKAKIAUEBSg0AIAEoAoQBIgNBAkgNAEHAACECIANBBkgNAEGAAUHAASADQQZGGyECCyABQfEANgIEIAEgAiAEciICQSByIAIgASgCbBsiAkEfcCACckEfcxB1IAEoAmwEQCABIAAvATIQdSABIAAvATAQdQsgAEEAQQBBABBlNgIwIAEoAgQhAgsgAkHFAEcNASABKAIcIQQLAkAgBCgCEARAIAEoAhQhAiABKAIgIgUgBC8BFE8NASACIQMDQCABKAIMIAJGBEACQCACIANNDQAgBCgCLEUNACAAIAAoAjAgASgCCCADaiACIANrEDU2AjALIAAQNiABKAIcIQQgASgCFCICIAEoAgxGDQMgASgCICEFIAIhAwsgBCgCECAFai0AACEEIAEgAkEBajYCFCABKAIIIAJqIAQ6AAAgASABKAIgQQFqIgU2AiAgBSABKAIcIgQvARRPBEAgAyECDAMFIAEoAhQhAgwBCwALAAsgAUHJADYCBAwCCwJAIAQoAixFDQAgASgCFCIDIAJNDQAgACAAKAIwIAEoAgggAmogAyACaxA1NgIwCyABKAIgIAQoAhRGBEAgAUHJADYCBCABQQA2AiAMAgsgASgCBCECCyACQckARw0BIAEoAhwhBAsgBCgCHEUNAiABKAIUIgIhAwJAA0ACQCABKAIMIAJGBEACQCACIANNDQAgASgCHCgCLEUNACAAIAAoAjAgASgCCCADaiACIANrEDU2AjALIAAQNiABKAIUIgIgASgCDEYNASACIQMLQQEhBSABKAIcKAIcIQQgASABKAIgIgZBAWo2AiAgBCAGai0AACEEIAEgAkEBajYCFCABKAIIIAJqIAQ6AAAgBARAIAEoAhQhAgwCBSADIQIMAwsACwtBACEFCwJAIAEoAhwiBCgCLEUNACABKAIUIgMgAk0NACAAIAAoAjAgASgCCCACaiADIAJrEDU2AjALIAUNASABKAIEIQILIAJB2wBHDQMgASgCHCEEDAILIAFBADYCIAsgAUHbADYCBAsgBCgCJEUNASABKAIUIgIhAwJAA0ACQCABKAIMIAJGBEACQCACIANNDQAgASgCHCgCLEUNACAAIAAoAjAgASgCCCADaiACIANrEDU2AjALIAAQNiABKAIUIgIgASgCDEYNASACIQMLQQEhBSABKAIcKAIkIQQgASABKAIgIgZBAWo2AiAgBCAGai0AACEEIAEgAkEBajYCFCABKAIIIAJqIAQ6AAAgBARAIAEoAhQhAgwCBSADIQIMAwsACwtBACEFCwJAIAEoAhwiBCgCLEUNACABKAIUIgMgAk0NACAAIAAoAjAgASgCCCACaiADIAJrEDU2AjALIAUNASABKAIEIQILIAJB5wBHDQIgASgCHCEEDAELIAFB5wA2AgQLIAQoAiwEQCABKAIUIgVBAmoiAiABKAIMIgRLBH8gABA2IAEoAgwhBCABKAIUIgVBAmoFIAILIARLDQEgACgCMCECIAEgBUEBajYCFCABKAIIIAVqIAI6AAAgACgCMCECIAEgASgCFCIDQQFqNgIUIAMgASgCCGogAkEIdjoAACAAQQBBAEEAEDU2AjAgAUHxADYCBAwBCyABQfEANgIECwJAIAEoAhQEQCAAEDYgACgCEARAIAAoAgQhAgwCCwwECyAAKAIEIgINAEEAIQILAkACQAJAIAEoAgQiA0GaBUYEQCACRQ0BDAULIAINAQsgA0GaBUcNACABKAJ0RQ0BCwJ/AkACQAJAIAEoAogBQX5qDgIAAQILIAEQnQQMAgsgARCcBAwBCyABQQQgASgChAFBDGxBuNcAaigCABEDAAsiAkF+cUECRgRAIAFBmgU2AgQLIAJBfXFFBEBBACECIAAoAhANAgwECyACQQFHDQAgAUEAQQBBABCOAiAAEDYgACgCEA0ADAMLQQEhAiABKAIYIgNBAUgNACAAKAIwIQICQCADQQJGBEAgASABKAIUIgNBAWo2AhQgAyABKAIIaiACOgAAIAAoAjAhAiABIAEoAhQiA0EBajYCFCADIAEoAghqIAJBCHY6AAAgAC8BMiECIAEgASgCFCIDQQFqNgIUIAMgASgCCGogAjoAACAALQAzIQIgASABKAIUIgNBAWo2AhQgAyABKAIIaiACOgAAIAAoAgghAiABIAEoAhQiA0EBajYCFCADIAEoAghqIAI6AAAgACgCCCECIAEgASgCFCIDQQFqNgIUIAMgASgCCGogAkEIdjoAACAALwEKIQIgASABKAIUIgNBAWo2AhQgAyABKAIIaiACOgAAIAAtAAshAiABIAEoAhQiA0EBajYCFCADIAEoAghqIAI6AAAMAQsgASACQRB2EHUgASAALwEwEHULIAAQNiABKAIYIgBBAU4EQCABQQAgAGs2AhgLIAEoAhRFIQILIAIPCyAAQceEATYCGEF7DwsgAUF/NgIoQQAL3QEBBn8CQCAAKAKAgBAiBSAAKAKEgBAiAyAAKAKMgBAiBGpBBGpJDQAgACgClIAQIgIgBSADa0F9aiIGTw0AA0AgACACQf//A3FBAXRqQYCACGogAiAAIAIgA2oQOkECdGoiBCgCAGsiB0H//wMgB0H//wNJGzsBACAEIAI2AgAgAkEBaiICIAZJDQALIAAoAoyAECEECyAAIAQ2ApCAECAAIAM2AoiAECAAQQA2ApyAECAAIAE2AoCAECAAIAUgA2siAjYCjIAQIAAgAjYClIAQIAAgASACazYChIAQC9kDAQR/IwBBEGsiAyQAIAFBADYCACAAKAIAIgIgA0EMaiACKAIAKAIMEQMAIQICQCADKAIMRQ0AIAIsAAAhAiAAKAIAIgRBASAEKAIAKAIQEQQAIAEgASgCACACQf8AcXI2AgACQCACQX9KDQAgACgCACICIANBDGogAigCACgCDBEDACECIAMoAgxFDQEgAiwAACECIAAo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3EQLyAEQQRqIQMgBwJ/AkACfyAUIAZBBGoiAE0EQCAADAELIAMoAAAgACgAAHMiAw0BIARBCGohAyAGQQhqCyIEIBRJBEADQCADKAAAIAQoAABzIgkEQCAJECUgBGogAGsMBAsgA0EEaiEDIARBBGoiBCAUSQ0ACwsCQCAEIBhPDQAgAy8AACAELwAARw0AIANBAmohAyAEQQJqIQQLIAQgF0kEfyAEQQFqIAQgAy0AACAELQAARhsFIAQLIABrDAELIAMQJQsiAEHwAWpB/wFuakEIaiAPSw0EIAdBAmohAyAAIAZqQQRqIQYgBS0AACEEAn8gAEEPTwRAIAUgBEEPajoAACADQX8QNCAAQXFqIgRB/AdPBEADQCADQQRqIgNBfxA0IARBhHhqIgRB+wdLDQALCyADIARB//8DcUH/AW4iAGoiAyAAQYF+bCAEajoAACADQQFqDAELIAUgACAEajoAACADCyEFIAYgEU8NASAGQX5qIgAgACgAACALEDAgCCALIAwQSSAGKAAAIQACQAJAIBZFBEAgAEEBEDAiACAIEIUBIQQgBiAAIAhBASAMEEkgBEH//wNqIAZJDQEgBCgAACAGKAAARw0BDAILIAAgCxAwIgMgCCALEEghACAGIAxrIgQgAyAIIAsQXCAAQf//A2ogBEkNACAAIAxqIgQoAAAgBigAAEYNAQsgBkEBaiIDKAAAIAsQMCEEDAMLIAVBADoAACAFQQFqIQcMAAsACwtBACETIAUgECAGayIBaiABQfABakH/AW5qQQFqIA9LDQECQCABQQ9PBEAgBUHwAToAACAFQQFqIQAgAUFxaiIDQf8BSQRAIAAiBSADOgAADAILIABB/wEgAUHyfWoiAEH/AW5BAWoQKBogAEH/AW4iAyAFakECaiIFIANBgX5sIABqOgAADAELIAUgAUEEdDoAAAsgBUEBaiAGIAEQKiABaiACayETDAELIANBgICA8AdLDQAgASADaiIPQXVqIRAgD0F0aiEUIAgoAoCAASEAIAhBAUECIAFB//8DSxsiCzsBhoABIAggACADajYCgIABIAggCCgCkIABIANqNgKQgAEgASABKAAAIAsQMCAIIAsgASAAayIMEEkgD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G4iBiAAbGshByAAIAFNBEAgBkEBIAZBAUsbIQgDQCAABEAgACAEbCEJQQAhBQNAIAMgBSAJamogAiAFIAZsIARqai0AADoAACAFQQFqIgUgAEcNAAsLIARBAWoiBCAIRw0ACwsgAyABIAdrIgBqIAAgAmogBxAqGgsNACAAIAEgAiADEL0EC4IBAQZ/IAEgASAAbiIGIABsayEHIAAEQCAGQQEgBkEBSxshCANAIAAgAU0EQCAEIAZsIQlBACEFA0AgAyAFIAlqaiACIAAgBWwgBGpqLQAAOgAAIAVBAWoiBSAIRw0ACwsgBEEBaiIEIABHDQALCyADIAEgB2siAGogACACaiAHECoaC7gBAQN/AkAgAUEBSA0AIAAsAAAiBEH/AHEhAwJAIARBf0oNACABQQJIDQEgACwAASIEQQd0QYD/AHEgA3IhAyAEQX9KDQAgAUEDSA0BIAAsAAIiBEEOdEGAgP8AcSADciEDIARBf0oNACABQQRIDQEgACwAAyIEQRV0QYCAgP8AcSADciEDIARBf0oNACABQQVIDQEgAC0ABCIAQQ9LDQEgAEEcdCADciEDCyACIAM2AgBBASEFCyAFCw0AIAAgASACIAMQvwQLlAIBA38gACABEDcaIAJBA3YiBEH4////AXEhAyABIAJBB3EiBWohAiAAIAVqIQACQAJAAkACQAJAAkACQAJAIARBB3FBf2oOBwYFBAMCAQAHCyAAIAIQNyEAIAJBCGohAgsgACACEDchACACQQhqIQILIAAgAhA3IQAgAkEIaiECCyAAIAIQNyEAIAJBCGohAgsgACACEDchACACQQhqIQILIAAgAhA3IQAgAkEIaiECCyAAIAIQNyEAIAJBCGohAgsgAwRAA0AgACACEDcgAkEIahA3IAJBEGoQNyACQRhqEDcgAkEgahA3IAJBKGoQNyACQTBqEDcgAkE4ahA3IQAgAkFAayECIANBeGoiAw0ACwsgAAstACACBEADQCAAIAEtAAA6AAAgAEEBaiEAIAFBAWohASACQX9qIgINAAsLIAALvQUBA38gACABayIDQQlPBEAgACABIAIQUA8LAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAI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IAIwACABMAAgAzAAIACwACACsAAgAbAAIAOwACAAcAAgAnAAIAFwACADcAAgAPAAIALwACAB8AAgA/AAIAAIACACCAAgAQgAIAMIACAAiAAgAogAIAGIACADiAAgAEgAIAJIACABSAAgA0gAIADIACACyAAgAcgAIAPIACAAKAAgAigAIAEoACADKAAgAKgAIAKoACABqAAgA6gAIABoACACaAAgAWgAIANoACAA6AAgAugAIAHoACAD6AAgABgAIAIYACABGAAgAxgAIACYACACmAAgAZgAIAOYACAAWAAgAlgAIAFYACADWAAgANgAIALYACAB2AAgA9gAIAA4ACACOAAgATgAIAM4ACAAuAAgArgAIAG4ACADuAAgAHgAIAJ4ACABeAAgA3gAIAD4ACAC+AAgAfgAIAP4ACAABAAgAgQAIAEEACADBAAgAIQAIAKEACABhAAgA4QAIABEACACRAAgAUQAIANEACAAxAAgAsQAIAHEACADxAAgACQAIAIkACABJAAgAyQAIACkACACpAAgAaQAIAOkACAAZAAgAmQAIAFkACADZAAgAOQAIALkACAB5AAgA+QAIAAUACACFAAgARQAIAMUACAAlAAgApQAIAGUACADlAAgAFQAIAJUACABVAAgA1QAIADUACAC1AAgAdQAIAPUACAANAAgAjQAIAE0ACADNAAgALQAIAK0ACABtAAgA7QAIAB0ACACdAAgAXQAIAN0ACAA9AAgAvQAIAH0ACAD9AAgAEwAJABMBCQCTAAkAkwEJAFMACQBTAQkA0wAJANMBCQAzAAkAMwEJALMACQCzAQkAcwAJAHMBCQDzAAkA8wEJAAsACQALAQkAiwAJAIsBCQBLAAkASwEJAMsACQDLAQkAKwAJACsBCQCrAAkAqwEJAGsACQBrAQkA6wAJAOsBCQAbAAkAGwEJAJsACQCbAQkAWwAJAFsBCQDbAAkA2wEJADsACQA7AQkAuwAJALsBCQB7AAkAewEJAPsACQD7AQkABwAJAAcBCQCHAAkAhwEJAEcACQBHAQkAxwAJAMcBCQAnAAkAJwEJAKcACQCnAQkAZwAJAGcBCQDnAAkA5wEJABcACQAXAQkAlwAJAJcBCQBXAAkAVwE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AAAOAAAADgAAAA4AAAAGAAAABAAAAAgAAAAFAAAADgAAAA4AAAAOAAAACAAAAAQAAAAIAAAABQAAAA4AAAAPAAAADgAAAAUAAAAEAAAACAAAAAYAAAAOAAAADwAAAA4AAAAJAAAABAAAAAgAAAAGAAAADgAAAA8AAAAOAAAAAwAAAAQAAAAMAAAABwAAAA4AAAAPAAAADgAAAAQAAAADAAAAGAAAAAcAAAAOAAAADwAAAA4AAAAFAAAAAwAAACAAAAAIAAAADgAAAA8AAAAPAAAABgAAAAMAAABAAAAACAAAAA4AAAAPAAAADwAAAAcAAAADAAAAAAEAAAgAAAAOAAAADwAAAA8AAAAFAAAAAwAAADAAAAAJAAAADgAAAA8AAAAPAAAABgAAAAMAAACAAAAACQAAAA4AAAAPAAAADwAAAAcAAAADAAAAAAEAAAkAAAAOAAAADwAAAA8AAAAIAAAAAwAAAAABAAAJAAAADgAAAA8AAAAPAAAACAAAAAMAAAAAAgAACQAAAA4AAAAPAAAADwAAAAkAAAADAAAAAAIAAAkAAAAOAAAADwAAAA8AAAAKAAAAAwAAAOcDAAAJAAAAIAAAACAAAAAhAAAAIgAAACMAAAAkAAAAJQAAACYAAAAnAAAAKAAAACkAAAApAAAAKgAAACsAAAAsAAAALQAAAC4AAAAvAAAAMAAAADAAAAAxAAAAMQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAAAA4AEGQmgEL+gEEAAMAAgACAAIAAgACAAIAAgACAAIAAgACAAEAAQABAAIAAgACAAIAAgACAAIAAgACAAMAAgABAAEAAQABAAEA//////////8AAAAAAAAAAAEAAQABAAEAAQABAAIAAgACAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAP////////////8AAAAAAAABAAQAAwACAAIAAgACAAIAAgABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAP//////////////////AEGVnAEL+AcIAAAABwAAagYAAAAGAACtBQAAagUAAD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udGFsX3R5cGVfaW5mb0UAdgAAACxzAAB0cwAAYgAAACxzAACAcwAAYwAAACxzAACMcwAAaAAAACxzAACYcwAAYQAAACxzAACkcwAAcwAAACxzAACwcwAAdAAAACxzAAC8cwAAaQAAACxzAADIcwAAagAAACxzAADUcwAAbAAAACxzAADgcwAAbQAAACxzAADscwAAZgAAACxzAAD4cwAAZAAAACxzAAAEdAAAAAAAAHhyAABCAAAATAAAAEQAAABFAAAARgAAAE0AAABOAAAATwAAAAAAAABgdAAAQgAAAFAAAABEAAAARQAAAEYAAABRAAAAUgAAAFMAAACMcgAAbHQAAHhyAABOMTBfX2N4eGFiaXYxMjFfX3ZtaV9jbGFzc190eXBlX2luZm9FAAAAcHUAQZjpAQtBgC0AAAAyAAABAQAAHgEAAA8AAACALAAAAC0AAAAAAAAeAAAADwAAAAAAAAAwLAAAAAAAABMAAAAHAAAAAAAAAAUAQeTpAQsBOQBB/OkBCwo6AAAAOwAAAC12AEGU6gELAQIAQaPqAQsF//////8AQejqAQsJoH5QAAAAAAAFAEH86gELAVQAQZTrAQsOOgAAAFUAAACYegAAAAQAQazrAQsBAQBBu+sBCwUK/////w==\";\n\nvar BloscShuffle;\n(function (BloscShuffle) {\n BloscShuffle[BloscShuffle[\"NOSHUFFLE\"] = 0] = \"NOSHUFFLE\";\n BloscShuffle[BloscShuffle[\"SHUFFLE\"] = 1] = \"SHUFFLE\";\n BloscShuffle[BloscShuffle[\"BITSHUFFLE\"] = 2] = \"BITSHUFFLE\";\n BloscShuffle[BloscShuffle[\"AUTOSHUFFLE\"] = -1] = \"AUTOSHUFFLE\";\n})(BloscShuffle || (BloscShuffle = {}));\nconst COMPRESSORS = new Set(['blosclz', 'lz4', 'lz4hc', 'snappy', 'zlib', 'zstd']);\nlet emscriptenModule;\nclass Blosc {\n constructor(clevel = 5, cname = 'lz4', shuffle = BloscShuffle.SHUFFLE, blocksize = 0) {\n if (clevel < 0 || clevel > 9) {\n throw new Error(`Invalid compression level: '${clevel}'. It should be between 0 and 9`);\n }\n if (!COMPRESSORS.has(cname)) {\n throw new Error(`Invalid compressor '${cname}'. Valid compressors include\n 'blosclz', 'lz4', 'lz4hc','snappy', 'zlib', 'zstd'.`);\n }\n if (shuffle < -1 || shuffle > 2) {\n throw new Error(`Invalid shuffle ${shuffle}. Must be one of 0 (NOSHUFFLE),\n 1 (SHUFFLE), 2 (BITSHUFFLE), -1 (AUTOSHUFFLE).`);\n }\n this.blocksize = blocksize;\n this.clevel = clevel;\n this.cname = cname;\n this.shuffle = shuffle;\n }\n static fromConfig(config) {\n const { blocksize, clevel, cname, shuffle } = config;\n return new Blosc(clevel, cname, shuffle, blocksize);\n }\n async encode(data) {\n if (!emscriptenModule) {\n emscriptenModule = initEmscriptenModule(blosc_codec, wasmSrc);\n }\n const module = await emscriptenModule;\n const view = module.compress(data, this.cname, this.clevel, this.shuffle, this.blocksize);\n const result = new Uint8Array(view); // Copy view and free wasm memory\n module.free_result();\n return result;\n }\n async decode(data, out) {\n if (!emscriptenModule) {\n emscriptenModule = initEmscriptenModule(blosc_codec, wasmSrc);\n }\n const module = await emscriptenModule;\n const view = module.decompress(data);\n const result = new Uint8Array(view); // Copy view and free wasm memory\n module.free_result();\n if (out !== undefined) {\n out.set(result);\n return out;\n }\n return result;\n }\n}\nBlosc.codecId = 'blosc';\nBlosc.COMPRESSORS = [...COMPRESSORS];\nBlosc.NOSHUFFLE = BloscShuffle.NOSHUFFLE;\nBlosc.SHUFFLE = BloscShuffle.SHUFFLE;\nBlosc.BITSHUFFLE = BloscShuffle.BITSHUFFLE;\nBlosc.AUTOSHUFFLE = BloscShuffle.AUTOSHUFFLE;\n\nexport default Blosc;\n","import { Zlib, GZip, Blosc } from 'numcodecs';\nimport { addCodec } from './zarr-core';\n\naddCodec(Zlib.codecId, () => Zlib);\naddCodec(GZip.codecId, () => GZip);\naddCodec(Blosc.codecId, () => Blosc);\n\nexport * from './zarr-core';\n","import {assert} from './assert';\n\nconst ERR_CONTEXT = 'Invalid WebGLRenderingContext';\nexport const ERR_WEBGL = ERR_CONTEXT;\nexport const ERR_WEBGL2 = 'Requires WebGL2';\n\nexport function isWebGL(gl) {\n if (typeof WebGLRenderingContext !== 'undefined' && gl instanceof WebGLRenderingContext) {\n return true;\n }\n if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {\n return true;\n }\n // Look for debug contexts, headless gl etc\n return Boolean(gl && Number.isFinite(gl._version));\n}\n\nexport function isWebGL2(gl) {\n if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {\n return true;\n }\n // Look for debug contexts, headless gl etc\n return Boolean(gl && gl._version === 2);\n}\n\nexport function getWebGL2Context(gl) {\n return isWebGL2(gl) ? gl : null;\n}\n\nexport function assertWebGLContext(gl) {\n assert(isWebGL(gl), ERR_CONTEXT);\n return gl;\n}\n\nexport function assertWebGL2Context(gl) {\n assert(isWebGL2(gl), ERR_WEBGL2);\n return gl;\n}\n","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest();\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Alpha = require('./Alpha');\n\nObject.defineProperty(exports, 'Alpha', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Alpha).default;\n }\n});\n\nvar _Checkboard = require('./Checkboard');\n\nObject.defineProperty(exports, 'Checkboard', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Checkboard).default;\n }\n});\n\nvar _EditableInput = require('./EditableInput');\n\nObject.defineProperty(exports, 'EditableInput', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_EditableInput).default;\n }\n});\n\nvar _Hue = require('./Hue');\n\nObject.defineProperty(exports, 'Hue', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Hue).default;\n }\n});\n\nvar _Raised = require('./Raised');\n\nObject.defineProperty(exports, 'Raised', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Raised).default;\n }\n});\n\nvar _Saturation = require('./Saturation');\n\nObject.defineProperty(exports, 'Saturation', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Saturation).default;\n }\n});\n\nvar _ColorWrap = require('./ColorWrap');\n\nObject.defineProperty(exports, 'ColorWrap', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_ColorWrap).default;\n }\n});\n\nvar _Swatch = require('./Swatch');\n\nObject.defineProperty(exports, 'Swatch', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Swatch).default;\n }\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {CubeGeometry} from '@luma.gl/core';\nimport {UNIT} from '@deck.gl/core';\nimport ColumnLayer from './column-layer';\n\nconst defaultProps = {\n cellSize: {type: 'number', min: 0, value: 1000},\n offset: {type: 'array', min: 0, value: [1, 1]}\n};\n\nexport default class GridCellLayer extends ColumnLayer {\n getGeometry(diskResolution) {\n return new CubeGeometry();\n }\n\n draw({uniforms}) {\n const {elevationScale, extruded, offset, coverage, cellSize, angle, radiusUnits} = this.props;\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n radius: cellSize / 2,\n radiusUnits: UNIT[radiusUnits],\n angle,\n offset,\n extruded,\n coverage,\n elevationScale,\n edgeDistance: 1,\n isWireframe: false\n })\n .draw();\n }\n}\n\nGridCellLayer.layerName = 'GridCellLayer';\nGridCellLayer.defaultProps = defaultProps;\n","// Beginning of a minimal implementation of the Node.js path API, that doesn't pull in big polyfills.\n\n/**\n * Replacement for Node.js path.dirname\n * @param url\n */\nexport function dirname(url: string): string {\n const slashIndex = url && url.lastIndexOf('/');\n return slashIndex >= 0 ? url.substr(0, slashIndex as number) : '';\n}\n\n/**\n * Replacement for Node.js path.join\n * @param parts\n */\nexport function join(...parts: string[]): string {\n const separator = '/';\n parts = parts.map((part, index) => {\n if (index) {\n part = part.replace(new RegExp(`^${separator}`), '');\n }\n if (index !== parts.length - 1) {\n part = part.replace(new RegExp(`${separator}$`), '');\n }\n return part;\n });\n return parts.join(separator);\n}\n","import pkg from '../package.json';\nexport const version = pkg.version;\nexport { compile } from './compile/compile';\nexport { normalize } from './normalize';\nexport * from './util';\n//# sourceMappingURL=index.js.map","import deckLog from '../utils/log';\nimport {getLoggers} from './loggers';\n\n/* debug utility */\n\nlet loggers = {};\n\n// Conditionally load default loggers in development mode\n// eslint-disable-next-line\nif (process.env.NODE_ENV !== 'production') {\n loggers = getLoggers(deckLog);\n}\n\nexport function register(handlers) {\n loggers = handlers;\n}\n\nexport default function debug(eventType) {\n if (deckLog.level > 0 && loggers[eventType]) {\n // Not using ...args to defeat perf hit from array construction\n loggers[eventType].call(...arguments);\n }\n}\n","export const LIFECYCLE = {\n NO_STATE: 'Awaiting state',\n MATCHED: 'Matched. State transferred from previous layer',\n INITIALIZED: 'Initialized',\n AWAITING_GC: 'Discarded. Awaiting garbage collection',\n AWAITING_FINALIZATION: 'No longer matched. Awaiting garbage collection',\n FINALIZED: 'Finalized! Awaiting garbage collection'\n};\n\n/* Secret props keys */\n// Symbols are non-enumerable by default, does not show in for...in or Object.keys\n// but are copied with Object.assign ¯\\_(ツ)_/¯\n// Supported everywhere except IE11, can be polyfilled with core-js\nexport const PROP_SYMBOLS = {\n COMPONENT: Symbol.for('component'),\n ASYNC_DEFAULTS: Symbol.for('asyncPropDefaults'),\n ASYNC_ORIGINAL: Symbol.for('asyncPropOriginal'),\n ASYNC_RESOLVED: Symbol.for('asyncPropResolved')\n};\n","import turfUnion from '@turf/union';\nimport turfDifference from '@turf/difference';\nimport turfIntersect from '@turf/intersect';\nimport rewind from '@turf/rewind';\n\nimport {\n EditAction,\n ClickEvent,\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n Pick,\n Tooltip,\n ModeProps,\n GuideFeatureCollection,\n TentativeFeature,\n} from '../types';\nimport { FeatureCollection, Feature, Polygon, Geometry, Position } from '../geojson-types';\nimport { getPickedEditHandles, getNonGuidePicks } from '../utils';\nimport { EditMode } from './edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport type GeoJsonEditAction = EditAction<FeatureCollection>;\n\nconst DEFAULT_GUIDES: GuideFeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n};\nconst DEFAULT_TOOLTIPS: Tooltip[] = [];\n\n// Main interface for `EditMode`s that edit GeoJSON\nexport type GeoJsonEditModeType = EditMode<FeatureCollection, FeatureCollection>;\n\nexport interface GeoJsonEditModeConstructor {\n new (): GeoJsonEditModeType;\n}\n\nexport class GeoJsonEditMode implements EditMode<FeatureCollection, GuideFeatureCollection> {\n _clickSequence: Position[] = [];\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n return DEFAULT_GUIDES;\n }\n\n getTooltips(props: ModeProps<FeatureCollection>): Tooltip[] {\n return DEFAULT_TOOLTIPS;\n }\n\n getSelectedFeature(props: ModeProps<FeatureCollection>): Feature | null | undefined {\n if (props.selectedIndexes.length === 1) {\n return props.data.features[props.selectedIndexes[0]];\n }\n return null;\n }\n\n getSelectedGeometry(props: ModeProps<FeatureCollection>): Geometry | null | undefined {\n const feature = this.getSelectedFeature(props);\n if (feature) {\n return feature.geometry;\n }\n return null;\n }\n\n getSelectedFeaturesAsFeatureCollection(props: ModeProps<FeatureCollection>): FeatureCollection {\n const { features } = props.data;\n const selectedFeatures = props.selectedIndexes.map((selectedIndex) => features[selectedIndex]);\n return {\n type: 'FeatureCollection',\n features: selectedFeatures,\n };\n }\n\n getClickSequence(): Position[] {\n return this._clickSequence;\n }\n\n addClickSequence({ mapCoords }: ClickEvent): void {\n this._clickSequence.push(mapCoords);\n }\n\n resetClickSequence(): void {\n this._clickSequence = [];\n }\n\n getTentativeGuide(props: ModeProps<FeatureCollection>): TentativeFeature | null | undefined {\n const guides = this.getGuides(props);\n\n // @ts-ignore\n return guides.features.find((f) => f.properties && f.properties.guideType === 'tentative');\n }\n\n isSelectionPicked(picks: Pick[], props: ModeProps<FeatureCollection>): boolean {\n if (!picks.length) return false;\n const pickedFeatures = getNonGuidePicks(picks).map(({ index }) => index);\n const pickedHandles = getPickedEditHandles(picks).map(\n ({ properties }) => properties.featureIndex\n );\n const pickedIndexes = new Set([...pickedFeatures, ...pickedHandles]);\n return props.selectedIndexes.some((index) => pickedIndexes.has(index));\n }\n\n rewindPolygon(feature: Feature): Feature {\n const { geometry } = feature;\n\n const isPolygonal = geometry.type === 'Polygon' || geometry.type === 'MultiPolygon';\n if (isPolygonal) {\n // @ts-ignore\n return rewind(feature);\n }\n\n return feature;\n }\n\n getAddFeatureAction(\n featureOrGeometry: Geometry | Feature,\n features: FeatureCollection\n ): GeoJsonEditAction {\n // Unsure why flow can't deal with Geometry type, but there I fixed it\n const featureOrGeometryAsAny: any = featureOrGeometry;\n\n const feature: any =\n featureOrGeometryAsAny.type === 'Feature'\n ? featureOrGeometryAsAny\n : {\n type: 'Feature',\n properties: {},\n geometry: featureOrGeometryAsAny,\n };\n\n const rewindFeature = this.rewindPolygon(feature);\n const updatedData = new ImmutableFeatureCollection(features)\n .addFeature(rewindFeature)\n .getObject();\n\n return {\n updatedData,\n editType: 'addFeature',\n editContext: {\n featureIndexes: [updatedData.features.length - 1],\n },\n };\n }\n\n getAddManyFeaturesAction(\n { features: featuresToAdd }: FeatureCollection,\n features: FeatureCollection\n ): GeoJsonEditAction {\n let updatedData = new ImmutableFeatureCollection(features);\n const initialIndex = updatedData.getObject().features.length;\n const updatedIndexes = [];\n for (const feature of featuresToAdd) {\n const { properties, geometry } = feature;\n const geometryAsAny: any = geometry;\n updatedData = updatedData.addFeature({\n type: 'Feature',\n properties,\n geometry: geometryAsAny,\n });\n updatedIndexes.push(initialIndex + updatedIndexes.length);\n }\n\n return {\n updatedData: updatedData.getObject(),\n editType: 'addFeature',\n editContext: {\n featureIndexes: updatedIndexes,\n },\n };\n }\n\n getAddFeatureOrBooleanPolygonAction(\n featureOrGeometry: Polygon | Feature,\n props: ModeProps<FeatureCollection>\n ): GeoJsonEditAction | null | undefined {\n const featureOrGeometryAsAny: any = featureOrGeometry;\n\n const selectedFeature = this.getSelectedFeature(props);\n const { modeConfig } = props;\n if (modeConfig && modeConfig.booleanOperation) {\n if (\n !selectedFeature ||\n (selectedFeature.geometry.type !== 'Polygon' &&\n selectedFeature.geometry.type !== 'MultiPolygon')\n ) {\n // eslint-disable-next-line no-console,no-undef\n console.warn(\n 'booleanOperation only supported for single Polygon or MultiPolygon selection'\n );\n return null;\n }\n\n const feature =\n featureOrGeometryAsAny.type === 'Feature'\n ? featureOrGeometryAsAny\n : {\n type: 'Feature',\n geometry: featureOrGeometryAsAny,\n };\n\n let updatedGeometry;\n if (modeConfig.booleanOperation === 'union') {\n updatedGeometry = turfUnion(selectedFeature, feature);\n } else if (modeConfig.booleanOperation === 'difference') {\n // @ts-ignore\n updatedGeometry = turfDifference(selectedFeature, feature);\n } else if (modeConfig.booleanOperation === 'intersection') {\n // @ts-ignore\n updatedGeometry = turfIntersect(selectedFeature, feature);\n } else {\n // eslint-disable-next-line no-console,no-undef\n console.warn(`Invalid booleanOperation ${modeConfig.booleanOperation}`);\n return null;\n }\n\n if (!updatedGeometry) {\n // eslint-disable-next-line no-console,no-undef\n console.warn('Canceling edit. Boolean operation erased entire polygon.');\n return null;\n }\n\n const featureIndex = props.selectedIndexes[0];\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .replaceGeometry(featureIndex, updatedGeometry.geometry)\n .getObject();\n\n const editAction: GeoJsonEditAction = {\n updatedData,\n editType: 'unionGeometry',\n editContext: {\n featureIndexes: [featureIndex],\n },\n };\n\n return editAction;\n }\n return this.getAddFeatureAction(featureOrGeometry, props.data);\n }\n\n createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature {\n return null;\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>): void {}\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>): void {\n const tentativeFeature = this.createTentativeFeature(props);\n if (tentativeFeature) {\n props.onEdit({\n updatedData: props.data,\n editType: 'updateTentativeFeature',\n editContext: {\n feature: tentativeFeature,\n },\n });\n }\n }\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>): void {}\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>): void {}\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>): void {}\n\n handleKeyUp(event: KeyboardEvent, props: ModeProps<FeatureCollection>): void {\n if (event.key === 'Escape') {\n this.resetClickSequence();\n props.onEdit({\n // Because the new drawing feature is dropped, so the data will keep as the same.\n updatedData: props.data,\n editType: 'cancelFeature',\n editContext: {},\n });\n }\n }\n}\n\nexport function getIntermediatePosition(position1: Position, position2: Position): Position {\n const intermediatePosition = [\n (position1[0] + position2[0]) / 2.0,\n (position1[1] + position2[1]) / 2.0,\n ];\n // @ts-ignore\n return intermediatePosition;\n}\n","import GL from '@luma.gl/constants';\nimport Resource from './resource';\nimport Accessor from './accessor';\nimport {getGLTypeFromTypedArray, getTypedArrayFromGLType} from '../webgl-utils/typed-array-utils';\nimport {assertWebGL2Context, log} from '@luma.gl/gltools';\nimport {assert} from '../utils/assert';\nimport {checkProps} from '../utils/check-props';\n\nconst DEBUG_DATA_LENGTH = 10;\n\n// Shared prop checks for constructor and setProps\nconst DEPRECATED_PROPS = {\n offset: 'accessor.offset',\n stride: 'accessor.stride',\n type: 'accessor.type',\n size: 'accessor.size',\n divisor: 'accessor.divisor',\n normalized: 'accessor.normalized',\n integer: 'accessor.integer',\n instanced: 'accessor.divisor',\n isInstanced: 'accessor.divisor'\n};\n\n// Prop checks for constructor\nconst PROP_CHECKS_INITIALIZE = {\n removedProps: {},\n replacedProps: {\n bytes: 'byteLength'\n },\n // new Buffer() with individual accessor props is still used in apps, emit warnings\n deprecatedProps: DEPRECATED_PROPS\n};\n\n// Prop checks for setProps\nconst PROP_CHECKS_SET_PROPS = {\n // Buffer.setProps() with individual accessor props is rare => emit errors\n removedProps: DEPRECATED_PROPS\n};\n\nexport default class Buffer extends Resource {\n constructor(gl, props = {}) {\n super(gl, props);\n\n this.stubRemovedMethods('Buffer', 'v6.0', ['layout', 'setLayout', 'getIndexedParameter']);\n // this.stubRemovedMethods('Buffer', 'v7.0', ['updateAccessor']);\n\n // In WebGL1, need to make sure we use GL.ELEMENT_ARRAY_BUFFER when initializing element buffers\n // otherwise buffer type will lock to generic (non-element) buffer\n // In WebGL2, we can use GL.COPY_READ_BUFFER which avoids locking the type here\n this.target = props.target || (this.gl.webgl2 ? GL.COPY_READ_BUFFER : GL.ARRAY_BUFFER);\n\n this.initialize(props);\n\n Object.seal(this);\n }\n\n // returns number of elements in the buffer (assuming that the full buffer is used)\n getElementCount(accessor = this.accessor) {\n return Math.round(this.byteLength / Accessor.getBytesPerElement(accessor));\n }\n\n // returns number of vertices in the buffer (assuming that the full buffer is used)\n getVertexCount(accessor = this.accessor) {\n return Math.round(this.byteLength / Accessor.getBytesPerVertex(accessor));\n }\n\n // Creates and initializes the buffer object's data store.\n // Signature: `new Buffer(gl, {data: new Float32Array(...)})`\n // Signature: `new Buffer(gl, new Float32Array(...))`\n // Signature: `new Buffer(gl, 100)`\n initialize(props = {}) {\n // Signature `new Buffer(gl, new Float32Array(...)`\n if (ArrayBuffer.isView(props)) {\n props = {data: props};\n }\n\n // Signature: `new Buffer(gl, 100)`\n if (Number.isFinite(props)) {\n props = {byteLength: props};\n }\n\n props = checkProps('Buffer', props, PROP_CHECKS_INITIALIZE);\n\n // Initialize member fields\n this.usage = props.usage || GL.STATIC_DRAW;\n this.debugData = null;\n\n // Deprecated: Merge main props and accessor\n this.setAccessor(Object.assign({}, props, props.accessor));\n\n // Set data: (re)initializes the buffer\n if (props.data) {\n this._setData(props.data, props.offset, props.byteLength);\n } else {\n this._setByteLength(props.byteLength || 0);\n }\n\n return this;\n }\n\n setProps(props) {\n props = checkProps('Buffer', props, PROP_CHECKS_SET_PROPS);\n\n if ('accessor' in props) {\n this.setAccessor(props.accessor);\n }\n\n return this;\n }\n\n // Optionally stores an accessor with the buffer, makes it easier to use it as an attribute later\n // {type, size = 1, offset = 0, stride = 0, normalized = false, integer = false, divisor = 0}\n setAccessor(accessor) {\n // NOTE: From luma.gl v7.0, Accessors have an optional `buffer `field\n // (mainly to support \"interleaving\")\n // To avoid confusion, ensure `buffer.accessor` does not have a `buffer.accessor.buffer` field:\n accessor = Object.assign({}, accessor);\n delete accessor.buffer;\n\n // This new statement ensures that an \"accessor object\" is re-packaged as an Accessor instance\n this.accessor = new Accessor(accessor);\n return this;\n }\n\n // Allocate a bigger GPU buffer (if the current buffer is not big enough).\n // If a reallocation is triggered it clears the buffer\n // Returns:\n // `true`: buffer was reallocated, data was cleared\n // `false`: buffer was big enough, data is intact\n reallocate(byteLength) {\n if (byteLength > this.byteLength) {\n this._setByteLength(byteLength);\n return true;\n }\n this.bytesUsed = byteLength;\n return false;\n }\n\n // Update with new data. Reinitializes the buffer\n setData(props) {\n return this.initialize(props);\n }\n\n // Updates a subset of a buffer object's data store.\n // Data (Typed Array or ArrayBuffer), length is inferred unless provided\n // Offset into buffer\n // WebGL2 only: Offset into srcData\n // WebGL2 only: Number of bytes to be copied\n subData(props) {\n // Signature: buffer.subData(new Float32Array([...]))\n if (ArrayBuffer.isView(props)) {\n props = {data: props};\n }\n\n const {data, offset = 0, srcOffset = 0} = props;\n const byteLength = props.byteLength || props.length;\n\n assert(data);\n\n // Create the buffer - binding it here for the first time locks the type\n // In WebGL2, use GL.COPY_WRITE_BUFFER to avoid locking the type\n const target = this.gl.webgl2 ? GL.COPY_WRITE_BUFFER : this.target;\n this.gl.bindBuffer(target, this.handle);\n // WebGL2: subData supports additional srcOffset and length parameters\n if (srcOffset !== 0 || byteLength !== undefined) {\n assertWebGL2Context(this.gl);\n this.gl.bufferSubData(this.target, offset, data, srcOffset, byteLength);\n } else {\n this.gl.bufferSubData(target, offset, data);\n }\n this.gl.bindBuffer(target, null);\n\n // TODO - update local `data` if offsets are right\n this.debugData = null;\n\n this._inferType(data);\n\n return this;\n }\n\n // WEBGL2 ONLY: Copies part of the data of another buffer into this buffer\n copyData({sourceBuffer, readOffset = 0, writeOffset = 0, size}) {\n const {gl} = this;\n assertWebGL2Context(gl);\n\n // Use GL.COPY_READ_BUFFER+GL.COPY_WRITE_BUFFER avoid disturbing other targets and locking type\n gl.bindBuffer(GL.COPY_READ_BUFFER, sourceBuffer.handle);\n gl.bindBuffer(GL.COPY_WRITE_BUFFER, this.handle);\n gl.copyBufferSubData(GL.COPY_READ_BUFFER, GL.COPY_WRITE_BUFFER, readOffset, writeOffset, size);\n gl.bindBuffer(GL.COPY_READ_BUFFER, null);\n gl.bindBuffer(GL.COPY_WRITE_BUFFER, null);\n\n // TODO - update local `data` if offsets are 0\n this.debugData = null;\n\n return this;\n }\n\n // WEBGL2 ONLY: Reads data from buffer into an ArrayBufferView or SharedArrayBuffer.\n getData({dstData = null, srcByteOffset = 0, dstOffset = 0, length = 0} = {}) {\n assertWebGL2Context(this.gl);\n\n const ArrayType = getTypedArrayFromGLType(this.accessor.type || GL.FLOAT, {clamped: false});\n const sourceAvailableElementCount = this._getAvailableElementCount(srcByteOffset);\n\n const dstElementOffset = dstOffset;\n\n let dstAvailableElementCount;\n let dstElementCount;\n if (dstData) {\n dstElementCount = dstData.length;\n dstAvailableElementCount = dstElementCount - dstElementOffset;\n } else {\n // Allocate ArrayBufferView with enough size to copy all eligible data.\n dstAvailableElementCount = Math.min(\n sourceAvailableElementCount,\n length || sourceAvailableElementCount\n );\n dstElementCount = dstElementOffset + dstAvailableElementCount;\n }\n\n const copyElementCount = Math.min(sourceAvailableElementCount, dstAvailableElementCount);\n length = length || copyElementCount;\n assert(length <= copyElementCount);\n dstData = dstData || new ArrayType(dstElementCount);\n\n // Use GL.COPY_READ_BUFFER to avoid disturbing other targets and locking type\n this.gl.bindBuffer(GL.COPY_READ_BUFFER, this.handle);\n this.gl.getBufferSubData(GL.COPY_READ_BUFFER, srcByteOffset, dstData, dstOffset, length);\n this.gl.bindBuffer(GL.COPY_READ_BUFFER, null);\n\n // TODO - update local `data` if offsets are 0\n return dstData;\n }\n\n /**\n * Binds a buffer to a given binding point (target).\n * GL.TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER take an index, and optionally a range.\n * - GL.TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER need an index to affect state\n * - GL.UNIFORM_BUFFER: `offset` must be aligned to GL.UNIFORM_BUFFER_OFFSET_ALIGNMENT.\n * - GL.UNIFORM_BUFFER: `size` must be a minimum of GL.UNIFORM_BLOCK_SIZE_DATA.\n */\n bind({\n target = this.target, // target for the bind operation\n index = this.accessor && this.accessor.index, // index = index of target (indexed bind point)\n offset = 0,\n size\n } = {}) {\n // NOTE: While GL.TRANSFORM_FEEDBACK_BUFFER and GL.UNIFORM_BUFFER could\n // be used as direct binding points, they will not affect transform feedback or\n // uniform buffer state. Instead indexed bindings need to be made.\n if (target === GL.UNIFORM_BUFFER || target === GL.TRANSFORM_FEEDBACK_BUFFER) {\n if (size !== undefined) {\n this.gl.bindBufferRange(target, index, this.handle, offset, size);\n } else {\n assert(offset === 0); // Make sure offset wasn't supplied\n this.gl.bindBufferBase(target, index, this.handle);\n }\n } else {\n this.gl.bindBuffer(target, this.handle);\n }\n\n return this;\n }\n\n unbind({target = this.target, index = this.accessor && this.accessor.index} = {}) {\n const isIndexedBuffer = target === GL.UNIFORM_BUFFER || target === GL.TRANSFORM_FEEDBACK_BUFFER;\n if (isIndexedBuffer) {\n this.gl.bindBufferBase(target, index, null);\n } else {\n this.gl.bindBuffer(target, null);\n }\n return this;\n }\n\n // PROTECTED METHODS (INTENDED FOR USE BY OTHER FRAMEWORK CODE ONLY)\n\n // Returns a short initial data array\n getDebugData() {\n if (!this.debugData) {\n this.debugData = this.getData({length: Math.min(DEBUG_DATA_LENGTH, this.byteLength)});\n return {data: this.debugData, changed: true};\n }\n return {data: this.debugData, changed: false};\n }\n\n invalidateDebugData() {\n this.debugData = null;\n }\n\n // PRIVATE METHODS\n\n // Allocate a new buffer and initialize to contents of typed array\n _setData(data, offset = 0, byteLength = data.byteLength + offset) {\n assert(ArrayBuffer.isView(data));\n\n this._trackDeallocatedMemory();\n\n const target = this._getTarget();\n this.gl.bindBuffer(target, this.handle);\n this.gl.bufferData(target, byteLength, this.usage);\n this.gl.bufferSubData(target, offset, data);\n this.gl.bindBuffer(target, null);\n\n this.debugData = data.slice(0, DEBUG_DATA_LENGTH);\n this.bytesUsed = byteLength;\n\n this._trackAllocatedMemory(byteLength);\n\n // infer GL type from supplied typed array\n const type = getGLTypeFromTypedArray(data);\n assert(type);\n this.setAccessor(new Accessor(this.accessor, {type}));\n return this;\n }\n\n // Allocate a GPU buffer of specified size.\n _setByteLength(byteLength, usage = this.usage) {\n assert(byteLength >= 0);\n\n this._trackDeallocatedMemory();\n\n // Workaround needed for Safari (#291):\n // gl.bufferData with size equal to 0 crashes. Instead create zero sized array.\n let data = byteLength;\n if (byteLength === 0) {\n data = new Float32Array(0);\n }\n\n const target = this._getTarget();\n this.gl.bindBuffer(target, this.handle);\n this.gl.bufferData(target, data, usage);\n this.gl.bindBuffer(target, null);\n\n this.usage = usage;\n this.debugData = null;\n this.bytesUsed = byteLength;\n\n this._trackAllocatedMemory(byteLength);\n\n return this;\n }\n\n // Binding a buffer for the first time locks the type\n // In WebGL2, use GL.COPY_WRITE_BUFFER to avoid locking the type\n _getTarget() {\n return this.gl.webgl2 ? GL.COPY_WRITE_BUFFER : this.target;\n }\n\n _getAvailableElementCount(srcByteOffset) {\n const ArrayType = getTypedArrayFromGLType(this.accessor.type || GL.FLOAT, {clamped: false});\n const sourceElementOffset = srcByteOffset / ArrayType.BYTES_PER_ELEMENT;\n return this.getElementCount() - sourceElementOffset;\n }\n\n // Automatically infers type from typed array passed to setData\n // Note: No longer that useful, since type is now autodeduced from the compiled shaders\n _inferType(data) {\n if (!this.accessor.type) {\n this.setAccessor(new Accessor(this.accessor, {type: getGLTypeFromTypedArray(data)}));\n }\n }\n\n // RESOURCE METHODS\n\n _createHandle() {\n return this.gl.createBuffer();\n }\n\n _deleteHandle() {\n this.gl.deleteBuffer(this.handle);\n this._trackDeallocatedMemory();\n }\n\n _getParameter(pname) {\n this.gl.bindBuffer(this.target, this.handle);\n const value = this.gl.getBufferParameter(this.target, pname);\n this.gl.bindBuffer(this.target, null);\n return value;\n }\n\n // DEPRECATIONS - v7.0\n get type() {\n log.deprecated('Buffer.type', 'Buffer.accessor.type')();\n return this.accessor.type;\n }\n\n get bytes() {\n log.deprecated('Buffer.bytes', 'Buffer.byteLength')();\n return this.byteLength;\n }\n\n // DEPRECATIONS - v6.0\n // Deprecated in v6.x, but not warnings not properly implemented\n setByteLength(byteLength) {\n log.deprecated('setByteLength', 'reallocate')();\n return this.reallocate(byteLength);\n }\n\n // Deprecated in v6.x, but not warnings not properly implemented\n updateAccessor(opts) {\n log.deprecated('updateAccessor(...)', 'setAccessor(new Accessor(buffer.accessor, ...)')();\n this.accessor = new Accessor(this.accessor, opts);\n return this;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport Hammer from './utils/hammer';\n\n// This module contains constants that must be conditionally required\n// due to `window`/`document` references downstream.\nexport const RECOGNIZERS = Hammer\n ? [\n [Hammer.Pan, {event: 'tripan', pointers: 3, threshold: 0, enable: false}],\n [Hammer.Rotate, {enable: false}],\n [Hammer.Pinch, {enable: false}],\n [Hammer.Swipe, {enable: false}],\n [Hammer.Pan, {threshold: 0, enable: false}],\n [Hammer.Press, {enable: false}],\n [Hammer.Tap, {event: 'doubletap', taps: 2, enable: false}],\n // TODO - rename to 'tap' and 'singletap' in the next major release\n [Hammer.Tap, {event: 'anytap', enable: false}],\n [Hammer.Tap, {enable: false}]\n ]\n : null;\n\n// Recognize the following gestures even if a given recognizer succeeds\nexport const RECOGNIZER_COMPATIBLE_MAP = {\n tripan: ['rotate', 'pinch', 'pan'],\n rotate: ['pinch'],\n pinch: ['pan'],\n pan: ['press', 'doubletap', 'anytap', 'tap'],\n doubletap: ['anytap'],\n anytap: ['tap']\n};\n\n// Recognize the folling gestures only if a given recognizer fails\nexport const RECOGNIZER_FALLBACK_MAP = {\n doubletap: ['tap']\n};\n\n/**\n * Only one set of basic input events will be fired by Hammer.js:\n * either pointer, touch, or mouse, depending on system support.\n * In order to enable an application to be agnostic of system support,\n * alias basic input events into \"classes\" of events: down, move, and up.\n * See `_onBasicInput()` for usage of these aliases.\n */\nexport const BASIC_EVENT_ALIASES = {\n pointerdown: 'pointerdown',\n pointermove: 'pointermove',\n pointerup: 'pointerup',\n touchstart: 'pointerdown',\n touchmove: 'pointermove',\n touchend: 'pointerup',\n mousedown: 'pointerdown',\n mousemove: 'pointermove',\n mouseup: 'pointerup'\n};\n\nexport const INPUT_EVENT_TYPES = {\n KEY_EVENTS: ['keydown', 'keyup'],\n MOUSE_EVENTS: ['mousedown', 'mousemove', 'mouseup', 'mouseover', 'mouseout', 'mouseleave'],\n WHEEL_EVENTS: [\n // Chrome, Safari\n 'wheel',\n // IE\n 'mousewheel'\n ]\n};\n\n/**\n * \"Gestural\" events are those that have semantic meaning beyond the basic input event,\n * e.g. a click or tap is a sequence of `down` and `up` events with no `move` event in between.\n * Hammer.js handles these with its Recognizer system;\n * this block maps event names to the Recognizers required to detect the events.\n */\nexport const EVENT_RECOGNIZER_MAP = {\n tap: 'tap',\n anytap: 'anytap',\n doubletap: 'doubletap',\n press: 'press',\n pinch: 'pinch',\n pinchin: 'pinch',\n pinchout: 'pinch',\n pinchstart: 'pinch',\n pinchmove: 'pinch',\n pinchend: 'pinch',\n pinchcancel: 'pinch',\n rotate: 'rotate',\n rotatestart: 'rotate',\n rotatemove: 'rotate',\n rotateend: 'rotate',\n rotatecancel: 'rotate',\n tripan: 'tripan',\n tripanstart: 'tripan',\n tripanmove: 'tripan',\n tripanup: 'tripan',\n tripandown: 'tripan',\n tripanleft: 'tripan',\n tripanright: 'tripan',\n tripanend: 'tripan',\n tripancancel: 'tripan',\n pan: 'pan',\n panstart: 'pan',\n panmove: 'pan',\n panup: 'pan',\n pandown: 'pan',\n panleft: 'pan',\n panright: 'pan',\n panend: 'pan',\n pancancel: 'pan',\n swipe: 'swipe',\n swipeleft: 'swipe',\n swiperight: 'swipe',\n swipeup: 'swipe',\n swipedown: 'swipe'\n};\n\n/**\n * Map gestural events typically provided by browsers\n * that are not reported in 'hammer.input' events\n * to corresponding Hammer.js gestures.\n */\nexport const GESTURE_EVENT_ALIASES = {\n click: 'tap',\n anyclick: 'anytap',\n dblclick: 'doubletap',\n mousedown: 'pointerdown',\n mousemove: 'pointermove',\n mouseup: 'pointerup',\n mouseover: 'pointerover',\n mouseout: 'pointerout',\n mouseleave: 'pointerleave'\n};\n","export default function assert(condition, message) {\n if (!condition) {\n throw new Error(`math.gl assertion ${message}`);\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {config, formatValue, equals, isArray} from '../../lib/common';\nimport assert from '../../lib/assert';\n\nexport default class MathArray extends Array {\n // Defined by derived class\n get ELEMENTS() {\n assert(false);\n return 0;\n }\n\n clone() {\n // @ts-ignore error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.\n return new this.constructor().copy(this);\n }\n\n from(arrayOrObject) {\n // @ts-ignore error TS2339: Property 'copy' does not exist on type 'MathArray'.\n return Array.isArray(arrayOrObject) ? this.copy(arrayOrObject) : this.fromObject(arrayOrObject);\n }\n\n fromArray(array, offset = 0) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = array[i + offset];\n }\n return this.check();\n }\n\n to(arrayOrObject) {\n if (arrayOrObject === this) {\n return this;\n }\n // @ts-ignore error TS2339: Property 'toObject' does not exist on type 'MathArray'.\n return isArray(arrayOrObject) ? this.toArray(arrayOrObject) : this.toObject(arrayOrObject);\n }\n\n toTarget(target) {\n return target ? this.to(target) : this;\n }\n\n toArray(array = [], offset = 0) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n array[offset + i] = this[i];\n }\n return array;\n }\n\n toFloat32Array() {\n return new Float32Array(this);\n }\n\n toString() {\n return this.formatString(config);\n }\n\n formatString(opts) {\n let string = '';\n for (let i = 0; i < this.ELEMENTS; ++i) {\n string += (i > 0 ? ', ' : '') + formatValue(this[i], opts);\n }\n return `${opts.printTypes ? this.constructor.name : ''}[${string}]`;\n }\n\n equals(array) {\n if (!array || this.length !== array.length) {\n return false;\n }\n for (let i = 0; i < this.ELEMENTS; ++i) {\n if (!equals(this[i], array[i])) {\n return false;\n }\n }\n return true;\n }\n\n exactEquals(array) {\n if (!array || this.length !== array.length) {\n return false;\n }\n for (let i = 0; i < this.ELEMENTS; ++i) {\n if (this[i] !== array[i]) {\n return false;\n }\n }\n return true;\n }\n\n // Modifiers\n\n negate() {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = -this[i];\n }\n return this.check();\n }\n\n lerp(a, b, t) {\n if (t === undefined) {\n t = b;\n b = a;\n a = this; // eslint-disable-line\n }\n for (let i = 0; i < this.ELEMENTS; ++i) {\n const ai = a[i];\n this[i] = ai + t * (b[i] - ai);\n }\n return this.check();\n }\n\n min(vector) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.min(vector[i], this[i]);\n }\n return this.check();\n }\n\n max(vector) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.max(vector[i], this[i]);\n }\n return this.check();\n }\n\n clamp(minVector, maxVector) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.min(Math.max(this[i], minVector[i]), maxVector[i]);\n }\n return this.check();\n }\n\n add(...vectors) {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] += vector[i];\n }\n }\n return this.check();\n }\n\n subtract(...vectors) {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] -= vector[i];\n }\n }\n return this.check();\n }\n\n scale(scale) {\n if (Array.isArray(scale)) {\n // @ts-ignore error TS2339: Property 'multiply' does not exist on type 'MathArray'.\n return this.multiply(scale);\n }\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] *= scale;\n }\n return this.check();\n }\n\n // three.js compatibility\n\n sub(a) {\n return this.subtract(a);\n }\n\n setScalar(a) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = a;\n }\n return this.check();\n }\n\n addScalar(a) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] += a;\n }\n return this.check();\n }\n\n subScalar(a) {\n return this.addScalar(-a);\n }\n\n multiplyScalar(scalar) {\n // Multiplies all elements\n // `Matrix4.scale` only scales its 3x3 \"minor\"\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] *= scalar;\n }\n return this.check();\n }\n\n divideScalar(a) {\n return this.scale(1 / a);\n }\n\n clampScalar(min, max) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] = Math.min(Math.max(this[i], min), max);\n }\n return this.check();\n }\n\n // Cesium compatibility\n\n multiplyByScalar(scalar) {\n return this.scale(scalar);\n }\n\n // THREE.js compatibility\n get elements() {\n return this;\n }\n\n // Debug checks\n\n check() {\n if (config.debug && !this.validate()) {\n throw new Error(`math.gl: ${this.constructor.name} some fields set to invalid numbers'`);\n }\n return this;\n }\n\n validate() {\n let valid = this.length === this.ELEMENTS;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n valid = valid && Number.isFinite(this[i]);\n }\n return valid;\n }\n}\n","import MathArray from './math-array';\nimport {checkNumber} from '../../lib/validators';\nimport assert from '../../lib/assert';\n\nexport default class Vector extends MathArray {\n get ELEMENTS() {\n assert(false);\n return 0;\n }\n\n // VIRTUAL METHODS\n copy(vector) {\n assert(false);\n return this;\n }\n\n // ACCESSORS\n\n get x() {\n return this[0];\n }\n set x(value) {\n this[0] = checkNumber(value);\n }\n\n get y() {\n return this[1];\n }\n set y(value) {\n this[1] = checkNumber(value);\n }\n\n // NOTE: `length` is a reserved word for Arrays, so we can't use `v.length()`\n // Offer `len` and `magnitude`\n len() {\n return Math.sqrt(this.lengthSquared());\n }\n\n magnitude() {\n return this.len();\n }\n\n lengthSquared() {\n let length = 0;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n length += this[i] * this[i];\n }\n return length;\n }\n\n magnitudeSquared() {\n return this.lengthSquared();\n }\n\n distance(mathArray) {\n return Math.sqrt(this.distanceSquared(mathArray));\n }\n\n distanceSquared(mathArray) {\n let length = 0;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n const dist = this[i] - mathArray[i];\n length += dist * dist;\n }\n return checkNumber(length);\n }\n\n dot(mathArray) {\n let product = 0;\n for (let i = 0; i < this.ELEMENTS; ++i) {\n product += this[i] * mathArray[i];\n }\n return checkNumber(product);\n }\n\n // MODIFIERS\n\n normalize() {\n const length = this.magnitude();\n if (length !== 0) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] /= length;\n }\n }\n return this.check();\n }\n\n // negate() {\n // for (let i = 0; i < this.ELEMENTS; ++i) {\n // this[i] = -this[i];\n // }\n // return this.check();\n // }\n\n // inverse() {\n // for (let i = 0; i < this.ELEMENTS; ++i) {\n // this[i] = 1 / this[i];\n // }\n // return this.check();\n // }\n\n multiply(...vectors) {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] *= vector[i];\n }\n }\n return this.check();\n }\n\n divide(...vectors) {\n for (const vector of vectors) {\n for (let i = 0; i < this.ELEMENTS; ++i) {\n this[i] /= vector[i];\n }\n }\n return this.check();\n }\n\n // THREE.js compatibility\n lengthSq() {\n return this.lengthSquared();\n }\n\n distanceTo(vector) {\n return this.distance(vector);\n }\n\n distanceToSquared(vector) {\n return this.distanceSquared(vector);\n }\n\n getComponent(i) {\n assert(i >= 0 && i < this.ELEMENTS, 'index is out of range');\n return checkNumber(this[i]);\n }\n\n setComponent(i, value) {\n assert(i >= 0 && i < this.ELEMENTS, 'index is out of range');\n this[i] = value;\n return this.check();\n }\n\n addVectors(a, b) {\n return this.copy(a).add(b);\n }\n\n subVectors(a, b) {\n return this.copy(a).subtract(b);\n }\n\n multiplyVectors(a, b) {\n return this.copy(a).multiply(b);\n }\n\n addScaledVector(a, b) {\n // @ts-ignore error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.\n return this.add(new this.constructor(a).multiplyScalar(b));\n }\n}\n","/* eslint-disable camelcase */\n// vec2 additions\n\nexport function vec2_transformMat4AsVector(out, a, m) {\n const x = a[0];\n const y = a[1];\n const w = m[3] * x + m[7] * y || 1.0;\n out[0] = (m[0] * x + m[4] * y) / w;\n out[1] = (m[1] * x + m[5] * y) / w;\n return out;\n}\n\n// vec3 additions\n\n// Transform as vector, only uses 3x3 minor matrix\nexport function vec3_transformMat4AsVector(out, a, m) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n const w = m[3] * x + m[7] * y + m[11] * z || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z) / w;\n return out;\n}\n\nexport function vec3_transformMat2(out, a, m) {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n out[2] = a[2];\n return out;\n}\n\n// vec4 additions\n\nexport function vec4_transformMat2(out, a, m) {\n const x = a[0];\n const y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\nexport function vec4_transformMat3(out, a, m) {\n const x = a[0];\n const y = a[1];\n const z = a[2];\n out[0] = m[0] * x + m[3] * y + m[6] * z;\n out[1] = m[1] * x + m[4] * y + m[7] * z;\n out[2] = m[2] * x + m[5] * y + m[8] * z;\n out[3] = a[3];\n return out;\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport Vector from './base/vector';\nimport {config, isArray} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\n\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec3 from 'gl-matrix/vec3';\n// eslint-disable-next-line camelcase\nimport {vec3_transformMat2, vec3_transformMat4AsVector} from '../lib/gl-matrix-extras';\n\nconst ORIGIN = [0, 0, 0];\nconst constants = {};\n\nexport default class Vector3 extends Vector {\n static get ZERO() {\n return (constants.ZERO = constants.ZERO || Object.freeze(new Vector3(0, 0, 0, 0)));\n }\n\n /**\n * @class\n * @param {Number | [Number, Number, Number]} x\n * @param {Number} y - rotation around X (latitude)\n * @param {Number} z - rotation around X (latitude)\n */\n constructor(x = 0, y = 0, z = 0) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0);\n if (arguments.length === 1 && isArray(x)) {\n this.copy(x);\n } else {\n // this.set(x, y, z);\n if (config.debug) {\n checkNumber(x);\n checkNumber(y);\n checkNumber(z);\n }\n // @ts-ignore TS2412: Property '0' of type 'number | [number, number, number]' is not assignable to numeric index type 'number'\n this[0] = x;\n this[1] = y;\n this[2] = z;\n }\n }\n\n set(x, y, z) {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n return this.check();\n }\n\n copy(array) {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n return this.check();\n }\n\n fromObject(object) {\n if (config.debug) {\n checkNumber(object.x);\n checkNumber(object.y);\n checkNumber(object.z);\n }\n this[0] = object.x;\n this[1] = object.y;\n this[2] = object.z;\n return this.check();\n }\n\n toObject(object) {\n object.x = this[0];\n object.y = this[1];\n object.z = this[2];\n return object;\n }\n\n // Getters/setters\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n get ELEMENTS() {\n return 3;\n }\n\n // x,y inherited from Vector\n\n get z() {\n return this[2];\n }\n set z(value) {\n this[2] = checkNumber(value);\n }\n /* eslint-enable no-multi-spaces, brace-style, no-return-assign */\n\n angle(vector) {\n return vec3.angle(this, vector);\n }\n\n // MODIFIERS\n\n cross(vector) {\n vec3.cross(this, this, vector);\n return this.check();\n }\n\n rotateX({radians, origin = ORIGIN}) {\n vec3.rotateX(this, this, origin, radians);\n return this.check();\n }\n\n rotateY({radians, origin = ORIGIN}) {\n vec3.rotateY(this, this, origin, radians);\n return this.check();\n }\n\n rotateZ({radians, origin = ORIGIN}) {\n vec3.rotateZ(this, this, origin, radians);\n return this.check();\n }\n\n // Transforms\n\n // transforms as point (4th component is implicitly 1)\n transform(matrix4) {\n return this.transformAsPoint(matrix4);\n }\n\n // transforms as point (4th component is implicitly 1)\n transformAsPoint(matrix4) {\n vec3.transformMat4(this, this, matrix4);\n return this.check();\n }\n\n // transforms as vector (4th component is implicitly 0, ignores translation. slightly faster)\n transformAsVector(matrix4) {\n vec3_transformMat4AsVector(this, this, matrix4);\n return this.check();\n }\n\n transformByMatrix3(matrix3) {\n vec3.transformMat3(this, this, matrix3);\n return this.check();\n }\n\n transformByMatrix2(matrix2) {\n vec3_transformMat2(this, this, matrix2);\n return this.check();\n }\n\n transformByQuaternion(quaternion) {\n vec3.transformQuat(this, this, quaternion);\n return this.check();\n }\n}\n","import {Vector3} from '@math.gl/core';\nimport {INTERSECTION} from '../../constants';\n\nconst scratchVector = new Vector3();\nconst scratchNormal = new Vector3();\n\nexport default class AxisAlignedBoundingBox {\n constructor(minimum = [0, 0, 0], maximum = [0, 0, 0], center = null) {\n // If center was not defined, compute it.\n center = center || scratchVector.copy(minimum).add(maximum).scale(0.5);\n this.center = new Vector3(center);\n this.halfDiagonal = new Vector3(maximum).subtract(this.center);\n\n /**\n * The minimum point defining the bounding box.\n * @type {Vector3}\n * @default {@link 0, 0, 0}\n */\n this.minimum = new Vector3(minimum);\n\n /**\n * The maximum point defining the bounding box.\n * @type {Vector3}\n * @default {@link 0, 0, 0}\n */\n this.maximum = new Vector3(maximum);\n }\n\n /**\n * Duplicates a AxisAlignedBoundingBox instance.\n *\n * @returns {AxisAlignedBoundingBox} A new AxisAlignedBoundingBox instance.\n */\n clone() {\n return new AxisAlignedBoundingBox(this.minimum, this.maximum, this.center);\n }\n\n /**\n * Compares the provided AxisAlignedBoundingBox componentwise and returns\n * <code>true</code> if they are equal, <code>false</code> otherwise.\n *\n * @param {AxisAlignedBoundingBox} [right] The second AxisAlignedBoundingBox to compare with.\n * @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.\n */\n equals(right) {\n return (\n this === right ||\n (Boolean(right) && this.minimum.equals(right.minimum) && this.maximum.equals(right.maximum))\n );\n }\n\n transform(transformation) {\n this.center.transformAsPoint(transformation);\n // TODO - this.halfDiagonal.transformAsVector(transformation);\n this.halfDiagonal.transform(transformation);\n this.minimum.transform(transformation);\n this.maximum.transform(transformation);\n return this;\n }\n\n /**\n * Determines which side of a plane a box is located.\n */\n intersectPlane(plane) {\n const {halfDiagonal} = this;\n const normal = scratchNormal.from(plane.normal);\n const e =\n halfDiagonal.x * Math.abs(normal.x) +\n halfDiagonal.y * Math.abs(normal.y) +\n halfDiagonal.z * Math.abs(normal.z);\n const s = this.center.dot(normal) + plane.distance; // signed distance from center\n\n if (s - e > 0) {\n return INTERSECTION.INSIDE;\n }\n\n if (s + e < 0) {\n // Not in front because normals point inward\n return INTERSECTION.OUTSIDE;\n }\n\n return INTERSECTION.INTERSECTING;\n }\n\n // Computes the estimated distance from the closest point on a bounding box to a point.\n distanceTo(point) {\n return Math.sqrt(this.distanceSquaredTo(point));\n }\n\n // Computes the estimated distance squared from the closest point on a bounding box to a point.\n // A simplified version of OrientedBoundingBox.distanceSquaredTo\n distanceSquaredTo(point) {\n const offset = scratchVector.from(point).subtract(this.center);\n const {halfDiagonal} = this;\n\n let distanceSquared = 0.0;\n let d;\n\n d = Math.abs(offset.x) - halfDiagonal.x;\n if (d > 0) {\n distanceSquared += d * d;\n }\n\n d = Math.abs(offset.y) - halfDiagonal.y;\n if (d > 0) {\n distanceSquared += d * d;\n }\n\n d = Math.abs(offset.z) - halfDiagonal.z;\n if (d > 0) {\n distanceSquared += d * d;\n }\n\n return distanceSquared;\n }\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {Vector3} from '@math.gl/core';\nimport * as mat4 from 'gl-matrix/mat4';\nimport {INTERSECTION} from '../../constants';\n\n// import Rectangle from './rectangle';\n\n// const defaultProjection = new GeographicProjection();\n// const fromRectangle2DLowerLeft = new Vector3();\n// const fromRectangle2DUpperRight = new Vector3();\n// const fromRectangle2DSouthwest = new Cartographic();\n// const fromRectangle2DNortheast = new Cartographic();\n\n// const fromRectangle3DScratch = [];\n\nconst scratchVector = new Vector3();\nconst scratchVector2 = new Vector3();\n\nexport default class BoundingSphere {\n constructor(center = [0, 0, 0], radius = 0.0) {\n this.radius = -0;\n this.center = new Vector3();\n this.fromCenterRadius(center, radius);\n }\n\n fromCenterRadius(center, radius) {\n this.center.from(center);\n this.radius = radius;\n return this;\n }\n\n fromCornerPoints(corner, oppositeCorner) {\n oppositeCorner = scratchVector.from(oppositeCorner);\n this.center = new Vector3().from(corner).add(oppositeCorner).scale(0.5);\n this.radius = this.center.distance(oppositeCorner);\n return this;\n }\n\n equals(right) {\n return (\n this === right ||\n (Boolean(right) && this.center.equals(right.center) && this.radius === right.radius)\n );\n }\n\n clone() {\n return new BoundingSphere(this.center, this.radius);\n }\n\n union(boundingSphere) {\n const leftCenter = this.center;\n const leftRadius = this.radius;\n const rightCenter = boundingSphere.center;\n const rightRadius = boundingSphere.radius;\n\n const toRightCenter = scratchVector.copy(rightCenter).subtract(leftCenter);\n const centerSeparation = toRightCenter.magnitude();\n\n if (leftRadius >= centerSeparation + rightRadius) {\n // Left sphere wins.\n return this.clone();\n }\n\n if (rightRadius >= centerSeparation + leftRadius) {\n // Right sphere wins.\n return boundingSphere.clone();\n }\n\n // There are two tangent points, one on far side of each sphere.\n const halfDistanceBetweenTangentPoints = (leftRadius + centerSeparation + rightRadius) * 0.5;\n\n // Compute the center point halfway between the two tangent points.\n scratchVector2\n .copy(toRightCenter)\n .scale((-leftRadius + halfDistanceBetweenTangentPoints) / centerSeparation)\n .add(leftCenter);\n\n this.center.copy(scratchVector2);\n this.radius = halfDistanceBetweenTangentPoints;\n\n return this;\n }\n\n expand(point) {\n point = scratchVector.from(point);\n const radius = point.subtract(this.center).magnitude();\n if (radius > this.radius) {\n this.radius = radius;\n }\n return this;\n }\n\n transform(transform) {\n this.center.transform(transform);\n const scale = mat4.getScaling(scratchVector, transform);\n this.radius = Math.max(scale[0], Math.max(scale[1], scale[2])) * this.radius;\n return this;\n }\n\n // Computes the estimated distance squared from the closest point on a bounding sphere to a point.\n distanceSquaredTo(point) {\n const d = this.distanceTo(point);\n return d * d;\n }\n\n distanceTo(point) {\n point = scratchVector.from(point);\n const delta = point.subtract(this.center);\n return Math.max(0, delta.len() - this.radius);\n }\n\n // Determines which side of a plane a sphere is located.\n intersectPlane(plane) {\n const center = this.center;\n const radius = this.radius;\n const normal = plane.normal;\n const distanceToPlane = normal.dot(center) + plane.distance;\n\n // The center point is negative side of the plane normal\n if (distanceToPlane < -radius) {\n return INTERSECTION.OUTSIDE;\n }\n // The center point is positive side of the plane, but radius extends beyond it; partial overlap\n if (distanceToPlane < radius) {\n return INTERSECTION.INTERSECTING;\n }\n // The center point and radius is positive side of the plane\n return INTERSECTION.INSIDE;\n }\n}\n","import MathArray from './math-array';\nimport {checkNumber} from '../../lib/validators';\nimport {config} from '../../lib/common';\nimport assert from '../../lib/assert';\n\nexport default class Matrix extends MathArray {\n // Defined by derived class\n get ELEMENTS() {\n assert(false);\n return 0;\n }\n\n get RANK() {\n assert(false);\n return 0;\n }\n\n // fromObject(object) {\n // const array = object.elements;\n // return this.fromRowMajor(array);\n // }\n\n // toObject(object) {\n // const array = object.elements;\n // this.toRowMajor(array);\n // return object;\n // }\n\n toString() {\n let string = '[';\n if (config.printRowMajor) {\n string += 'row-major:';\n for (let row = 0; row < this.RANK; ++row) {\n for (let col = 0; col < this.RANK; ++col) {\n string += ` ${this[col * this.RANK + row]}`;\n }\n }\n } else {\n string += 'column-major:';\n for (let i = 0; i < this.ELEMENTS; ++i) {\n string += ` ${this[i]}`;\n }\n }\n string += ']';\n return string;\n }\n\n getElementIndex(row, col) {\n return col * this.RANK + row;\n }\n\n // By default assumes row major indices\n getElement(row, col) {\n return this[col * this.RANK + row];\n }\n\n // By default assumes row major indices\n setElement(row, col, value) {\n this[col * this.RANK + row] = checkNumber(value);\n return this;\n }\n\n getColumn(columnIndex, result = new Array(this.RANK).fill(-0)) {\n const firstIndex = columnIndex * this.RANK;\n for (let i = 0; i < this.RANK; ++i) {\n result[i] = this[firstIndex + i];\n }\n return result;\n }\n\n setColumn(columnIndex, columnVector) {\n const firstIndex = columnIndex * this.RANK;\n for (let i = 0; i < this.RANK; ++i) {\n this[firstIndex + i] = columnVector[i];\n }\n return this;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport Matrix from './base/matrix';\nimport {checkVector, deprecated} from '../lib/validators';\n// eslint-disable-next-line camelcase\nimport {vec4_transformMat3} from '../lib/gl-matrix-extras';\n\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as mat3 from 'gl-matrix/mat3';\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec2 from 'gl-matrix/vec2';\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec3 from 'gl-matrix/vec3';\n\nconst IDENTITY = Object.freeze([1, 0, 0, 0, 1, 0, 0, 0, 1]);\nconst ZERO = Object.freeze([0, 0, 0, 0, 0, 0, 0, 0, 0]);\n\nconst INDICES = Object.freeze({\n COL0ROW0: 0,\n COL0ROW1: 1,\n COL0ROW2: 2,\n COL1ROW0: 3,\n COL1ROW1: 4,\n COL1ROW2: 5,\n COL2ROW0: 6,\n COL2ROW1: 7,\n COL2ROW2: 8\n});\n\nconst constants = {};\n\nexport default class Matrix3 extends Matrix {\n static get IDENTITY() {\n constants.IDENTITY = constants.IDENTITY || Object.freeze(new Matrix3(IDENTITY));\n return constants.IDENTITY;\n }\n\n static get ZERO() {\n constants.ZERO = constants.ZERO || Object.freeze(new Matrix3(ZERO));\n return constants.ZERO;\n }\n\n get ELEMENTS() {\n return 9;\n }\n\n get RANK() {\n return 3;\n }\n\n get INDICES() {\n return INDICES;\n }\n\n constructor(array) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0, -0, -0, -0, -0, -0);\n if (arguments.length === 1 && Array.isArray(array)) {\n this.copy(array);\n } else {\n this.identity();\n }\n }\n\n copy(array) {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n this[4] = array[4];\n this[5] = array[5];\n this[6] = array[6];\n this[7] = array[7];\n this[8] = array[8];\n return this.check();\n }\n\n // accepts column major order, stores in column major order\n // eslint-disable-next-line max-params\n set(m00, m10, m20, m01, m11, m21, m02, m12, m22) {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m01;\n this[4] = m11;\n this[5] = m21;\n this[6] = m02;\n this[7] = m12;\n this[8] = m22;\n return this.check();\n }\n\n // accepts row major order, stores as column major\n // eslint-disable-next-line max-params\n setRowMajor(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m01;\n this[4] = m11;\n this[5] = m21;\n this[6] = m02;\n this[7] = m12;\n this[8] = m22;\n return this.check();\n }\n\n // Accessors\n\n determinant() {\n return mat3.determinant(this);\n }\n\n // Constructors\n\n identity() {\n return this.copy(IDENTITY);\n }\n\n // Calculates a 3x3 matrix from the given quaternion\n // q quat Quaternion to create matrix from\n fromQuaternion(q) {\n mat3.fromQuat(this, q);\n return this.check();\n }\n\n // Modifiers\n\n transpose() {\n mat3.transpose(this, this);\n return this.check();\n }\n\n invert() {\n mat3.invert(this, this);\n return this.check();\n }\n\n // Operations\n\n multiplyLeft(a) {\n mat3.multiply(this, a, this);\n return this.check();\n }\n\n multiplyRight(a) {\n mat3.multiply(this, this, a);\n return this.check();\n }\n\n rotate(radians) {\n mat3.rotate(this, this, radians);\n return this.check();\n }\n\n scale(factor) {\n if (Array.isArray(factor)) {\n mat3.scale(this, this, factor);\n } else {\n mat3.scale(this, this, [factor, factor, factor]);\n }\n\n return this.check();\n }\n\n translate(vec) {\n mat3.translate(this, this, vec);\n return this.check();\n }\n\n // Transforms\n\n transform(vector, result) {\n switch (vector.length) {\n case 2:\n result = vec2.transformMat3(result || [-0, -0], vector, this);\n break;\n case 3:\n result = vec3.transformMat3(result || [-0, -0, -0], vector, this);\n break;\n case 4:\n result = vec4_transformMat3(result || [-0, -0, -0, -0], vector, this);\n break;\n default:\n throw new Error('Illegal vector');\n }\n checkVector(result, vector.length);\n return result;\n }\n\n // DEPRECATED IN 3.0\n\n transformVector(vector, result) {\n deprecated('Matrix3.transformVector');\n return this.transform(vector, result);\n }\n\n transformVector2(vector, result) {\n deprecated('Matrix3.transformVector');\n return this.transform(vector, result);\n }\n\n transformVector3(vector, result) {\n deprecated('Matrix3.transformVector');\n return this.transform(vector, result);\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport MathArray from './base/math-array';\nimport {checkNumber, checkVector} from '../lib/validators';\nimport assert from '../lib/assert';\n\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as quat from 'gl-matrix/quat';\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec4 from 'gl-matrix/vec4';\n\nconst IDENTITY_QUATERNION = [0, 0, 0, 1];\n\nexport default class Quaternion extends MathArray {\n constructor(x = 0, y = 0, z = 0, w = 1) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0);\n // eslint-disable-next-line prefer-rest-params\n if (Array.isArray(x) && arguments.length === 1) {\n this.copy(x);\n } else {\n this.set(x, y, z, w);\n }\n }\n\n copy(array) {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n return this.check();\n }\n\n set(x, y, z, w) {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n this[3] = w;\n return this.check();\n }\n\n // Creates a quaternion from the given 3x3 rotation matrix.\n // NOTE: The resultant quaternion is not normalized, so you should\n // be sure to renormalize the quaternion yourself where necessary.\n fromMatrix3(m) {\n quat.fromMat3(this, m);\n return this.check();\n }\n\n // Set a quat to the identity quaternion\n identity() {\n quat.identity(this);\n return this.check();\n }\n\n fromAxisRotation(axis, rad) {\n quat.setAxisAngle(this, axis, rad);\n return this.check();\n }\n\n // Set the components of a quat to the given values\n // set(i, j, k, l) {\n // quat.set(this, i, j, k, l);\n // return this.check();\n // }\n\n // Sets a quat from the given angle and rotation axis, then returns it.\n setAxisAngle(axis, rad) {\n return this.fromAxisRotation(axis, rad);\n }\n\n // Getters/setters\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n get ELEMENTS() {\n return 4;\n }\n\n get x() {\n return this[0];\n }\n\n set x(value) {\n this[0] = checkNumber(value);\n }\n\n get y() {\n return this[1];\n }\n\n set y(value) {\n this[1] = checkNumber(value);\n }\n\n get z() {\n return this[2];\n }\n\n set z(value) {\n this[2] = checkNumber(value);\n }\n\n get w() {\n return this[3];\n }\n\n set w(value) {\n this[3] = checkNumber(value);\n }\n\n /* eslint-enable no-multi-spaces, brace-style, no-return-assign */\n\n // Calculates the length of a quat\n len() {\n return quat.length(this);\n }\n\n // Calculates the squared length of a quat\n lengthSquared() {\n return quat.squaredLength(this);\n }\n\n // Calculates the dot product of two quat's\n // @return {Number}\n dot(a, b) {\n if (b !== undefined) {\n throw new Error('Quaternion.dot only takes one argument');\n }\n return quat.dot(this, a);\n }\n\n // Gets the rotation axis and angle for a given quaternion.\n // If a quaternion is created with setAxisAngle, this method will\n // return the same values as providied in the original parameter\n // list OR functionally equivalent values.\n // Example: The quaternion formed by axis [0, 0, 1] and angle -90\n // is the same as the quaternion formed by [0, 0, 1] and 270.\n // This method favors the latter.\n // @return {{[x,y,z], Number}}\n // getAxisAngle() {\n // const axis = [];\n // const angle = quat.getAxisAngle(axis, this);\n // return {axis, angle};\n // }\n\n // MODIFIERS\n\n // Sets a quaternion to represent the shortest rotation from one vector\n // to another. Both vectors are assumed to be unit length.\n rotationTo(vectorA, vectorB) {\n quat.rotationTo(this, vectorA, vectorB);\n return this.check();\n }\n\n // Sets the specified quaternion with values corresponding to the given axes.\n // Each axis is a vec3 and is expected to be unit length and perpendicular\n // to all other specified axes.\n // setAxes() {\n // Number\n // }\n\n // Performs a spherical linear interpolation with two control points\n // sqlerp() {\n // Number;\n // }\n\n // Adds two quat's\n add(a, b) {\n if (b !== undefined) {\n throw new Error('Quaternion.add only takes one argument');\n }\n quat.add(this, this, a);\n return this.check();\n }\n\n // Calculates the W component of a quat from the X, Y, and Z components.\n // Any existing W component will be ignored.\n calculateW() {\n quat.calculateW(this, this);\n return this.check();\n }\n\n // Calculates the conjugate of a quat If the quaternion is normalized,\n // this function is faster than quat.inverse and produces the same result.\n conjugate() {\n quat.conjugate(this, this);\n return this.check();\n }\n\n // Calculates the inverse of a quat\n invert() {\n quat.invert(this, this);\n return this.check();\n }\n\n // Performs a linear interpolation between two quat's\n lerp(a, b, t) {\n quat.lerp(this, a, b, t);\n return this.check();\n }\n\n // Multiplies two quat's\n multiplyRight(a, b) {\n assert(!b); // Quaternion.multiply only takes one argument\n quat.multiply(this, this, a);\n return this.check();\n }\n\n multiplyLeft(a, b) {\n assert(!b); // Quaternion.multiply only takes one argument\n quat.multiply(this, a, this);\n return this.check();\n }\n\n // Normalize a quat\n normalize() {\n // Handle 0 case\n const length = this.len();\n const l = length > 0 ? 1 / length : 0;\n this[0] = this[0] * l;\n this[1] = this[1] * l;\n this[2] = this[2] * l;\n this[3] = this[3] * l;\n // Set to [0, 0, 0, 1] if length is 0\n if (length === 0) {\n this[3] = 1;\n }\n return this.check();\n }\n\n // Rotates a quaternion by the given angle about the X axis\n rotateX(rad) {\n quat.rotateX(this, this, rad);\n return this.check();\n }\n\n // Rotates a quaternion by the given angle about the Y axis\n rotateY(rad) {\n quat.rotateY(this, this, rad);\n return this.check();\n }\n\n // Rotates a quaternion by the given angle about the Z axis\n rotateZ(rad) {\n quat.rotateZ(this, this, rad);\n return this.check();\n }\n\n // Scales a quat by a scalar number\n scale(b) {\n quat.scale(this, this, b);\n return this.check();\n }\n\n // Performs a spherical linear interpolation between two quat\n slerp(start, target, ratio) {\n // eslint-disable-next-line prefer-rest-params\n switch (arguments.length) {\n case 1: // Deprecated signature ({start, target, ratio})\n // eslint-disable-next-line prefer-rest-params\n ({start = IDENTITY_QUATERNION, target, ratio} = arguments[0]);\n break;\n case 2: // THREE.js compatibility signature (target, ration)\n // eslint-disable-next-line prefer-rest-params\n [target, ratio] = arguments;\n start = this; // eslint-disable-line\n break;\n default: // Default signature: (start, target, ratio)\n }\n quat.slerp(this, start, target, ratio);\n return this.check();\n }\n\n transformVector4(vector, result = vector) {\n vec4.transformQuat(result, vector, this);\n return checkVector(result, 4);\n }\n\n // THREE.js Math API compatibility\n lengthSq() {\n return this.lengthSquared();\n }\n\n setFromAxisAngle(axis, rad) {\n return this.setAxisAngle(axis, rad);\n }\n\n premultiply(a, b) {\n return this.multiplyLeft(a, b);\n }\n\n multiply(a, b) {\n return this.multiplyRight(a, b);\n }\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {Vector3, Matrix3, Quaternion} from '@math.gl/core';\nimport BoundingSphere from './bounding-sphere';\nimport {INTERSECTION} from '../../constants';\n\nconst scratchVector3 = new Vector3();\nconst scratchOffset = new Vector3();\nconst scratchVectorU = new Vector3();\nconst scratchVectorV = new Vector3();\nconst scratchVectorW = new Vector3();\nconst scratchCorner = new Vector3();\nconst scratchToCenter = new Vector3();\n\nconst MATRIX3 = {\n COLUMN0ROW0: 0,\n COLUMN0ROW1: 1,\n COLUMN0ROW2: 2,\n COLUMN1ROW0: 3,\n COLUMN1ROW1: 4,\n COLUMN1ROW2: 5,\n COLUMN2ROW0: 6,\n COLUMN2ROW1: 7,\n COLUMN2ROW2: 8\n};\n\nexport default class OrientedBoundingBox {\n constructor(center = [0, 0, 0], halfAxes = [0, 0, 0, 0, 0, 0, 0, 0, 0]) {\n this.center = new Vector3().from(center);\n this.halfAxes = new Matrix3(halfAxes);\n }\n\n get halfSize() {\n const xAxis = this.halfAxes.getColumn(0);\n const yAxis = this.halfAxes.getColumn(1);\n const zAxis = this.halfAxes.getColumn(2);\n return [new Vector3(xAxis).len(), new Vector3(yAxis).len(), new Vector3(zAxis).len()];\n }\n\n get quaternion() {\n const xAxis = this.halfAxes.getColumn(0);\n const yAxis = this.halfAxes.getColumn(1);\n const zAxis = this.halfAxes.getColumn(2);\n const normXAxis = new Vector3(xAxis).normalize();\n const normYAxis = new Vector3(yAxis).normalize();\n const normZAxis = new Vector3(zAxis).normalize();\n return new Quaternion().fromMatrix3(new Matrix3([...normXAxis, ...normYAxis, ...normZAxis]));\n }\n\n fromCenterHalfSizeQuaternion(center, halfSize, quaternion) {\n const quaternionObject = new Quaternion(quaternion);\n const directionsMatrix = new Matrix3().fromQuaternion(quaternionObject);\n directionsMatrix[0] = directionsMatrix[0] * halfSize[0];\n directionsMatrix[1] = directionsMatrix[1] * halfSize[0];\n directionsMatrix[2] = directionsMatrix[2] * halfSize[0];\n directionsMatrix[3] = directionsMatrix[3] * halfSize[1];\n directionsMatrix[4] = directionsMatrix[4] * halfSize[1];\n directionsMatrix[5] = directionsMatrix[5] * halfSize[1];\n directionsMatrix[6] = directionsMatrix[6] * halfSize[2];\n directionsMatrix[7] = directionsMatrix[7] * halfSize[2];\n directionsMatrix[8] = directionsMatrix[8] * halfSize[2];\n this.center = new Vector3().from(center);\n this.halfAxes = directionsMatrix;\n return this;\n }\n\n clone() {\n return new OrientedBoundingBox(this.center, this.halfAxes);\n }\n\n equals(right) {\n return (\n this === right ||\n (Boolean(right) && this.center.equals(right.center) && this.halfAxes.equals(right.halfAxes))\n );\n }\n\n getBoundingSphere(result = new BoundingSphere()) {\n const halfAxes = this.halfAxes;\n const u = halfAxes.getColumn(0, scratchVectorU);\n const v = halfAxes.getColumn(1, scratchVectorV);\n const w = halfAxes.getColumn(2, scratchVectorW);\n\n // Calculate \"corner\" vector\n const cornerVector = scratchVector3.copy(u).add(v).add(w);\n\n result.center.copy(this.center);\n result.radius = cornerVector.magnitude();\n\n return result;\n }\n\n intersectPlane(plane) {\n const center = this.center;\n const normal = plane.normal;\n const halfAxes = this.halfAxes;\n\n const normalX = normal.x;\n const normalY = normal.y;\n const normalZ = normal.z;\n\n // Plane is used as if it is its normal; the first three components are assumed to be normalized\n const radEffective =\n Math.abs(\n normalX * halfAxes[MATRIX3.COLUMN0ROW0] +\n normalY * halfAxes[MATRIX3.COLUMN0ROW1] +\n normalZ * halfAxes[MATRIX3.COLUMN0ROW2]\n ) +\n Math.abs(\n normalX * halfAxes[MATRIX3.COLUMN1ROW0] +\n normalY * halfAxes[MATRIX3.COLUMN1ROW1] +\n normalZ * halfAxes[MATRIX3.COLUMN1ROW2]\n ) +\n Math.abs(\n normalX * halfAxes[MATRIX3.COLUMN2ROW0] +\n normalY * halfAxes[MATRIX3.COLUMN2ROW1] +\n normalZ * halfAxes[MATRIX3.COLUMN2ROW2]\n );\n const distanceToPlane = normal.dot(center) + plane.distance;\n\n if (distanceToPlane <= -radEffective) {\n // The entire box is on the negative side of the plane normal\n return INTERSECTION.OUTSIDE;\n } else if (distanceToPlane >= radEffective) {\n // The entire box is on the positive side of the plane normal\n return INTERSECTION.INSIDE;\n }\n return INTERSECTION.INTERSECTING;\n }\n\n distanceTo(point) {\n return Math.sqrt(this.distanceSquaredTo(point));\n }\n\n distanceSquaredTo(point) {\n // Computes the estimated distance squared from the\n // closest point on a bounding box to a point.\n // See Geometric Tools for Computer Graphics 10.4.2\n const offset = scratchOffset.from(point).subtract(this.center);\n\n const halfAxes = this.halfAxes;\n const u = halfAxes.getColumn(0, scratchVectorU);\n const v = halfAxes.getColumn(1, scratchVectorV);\n const w = halfAxes.getColumn(2, scratchVectorW);\n\n const uHalf = u.magnitude();\n const vHalf = v.magnitude();\n const wHalf = w.magnitude();\n\n u.normalize();\n v.normalize();\n w.normalize();\n\n let distanceSquared = 0.0;\n let d;\n\n d = Math.abs(offset.dot(u)) - uHalf;\n if (d > 0) {\n distanceSquared += d * d;\n }\n\n d = Math.abs(offset.dot(v)) - vHalf;\n if (d > 0) {\n distanceSquared += d * d;\n }\n\n d = Math.abs(offset.dot(w)) - wHalf;\n if (d > 0) {\n distanceSquared += d * d;\n }\n\n return distanceSquared;\n }\n\n // eslint-disable-next-line max-statements\n computePlaneDistances(position, direction, result = [-0, -0]) {\n let minDist = Number.POSITIVE_INFINITY;\n let maxDist = Number.NEGATIVE_INFINITY;\n\n const center = this.center;\n const halfAxes = this.halfAxes;\n\n const u = halfAxes.getColumn(0, scratchVectorU);\n const v = halfAxes.getColumn(1, scratchVectorV);\n const w = halfAxes.getColumn(2, scratchVectorW);\n\n // project first corner\n const corner = scratchCorner.copy(u).add(v).add(w).add(center);\n\n const toCenter = scratchToCenter.copy(corner).subtract(position);\n let mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n // project second corner\n corner.copy(center).add(u).add(v).subtract(w);\n\n toCenter.copy(corner).subtract(position);\n mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n // project third corner\n corner.copy(center).add(u).subtract(v).add(w);\n\n toCenter.copy(corner).subtract(position);\n mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n // project fourth corner\n corner.copy(center).add(u).subtract(v).subtract(w);\n\n toCenter.copy(corner).subtract(position);\n mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n // project fifth corner\n center.copy(corner).subtract(u).add(v).add(w);\n\n toCenter.copy(corner).subtract(position);\n mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n // project sixth corner\n center.copy(corner).subtract(u).add(v).subtract(w);\n\n toCenter.copy(corner).subtract(position);\n mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n // project seventh corner\n center.copy(corner).subtract(u).subtract(v).add(w);\n\n toCenter.copy(corner).subtract(position);\n mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n // project eighth corner\n center.copy(corner).subtract(u).subtract(v).subtract(w);\n\n toCenter.copy(corner).subtract(position);\n mag = direction.dot(toCenter);\n\n minDist = Math.min(mag, minDist);\n maxDist = Math.max(mag, maxDist);\n\n result[0] = minDist;\n result[1] = maxDist;\n return result;\n }\n\n transform(transformation) {\n this.center.transformAsPoint(transformation);\n\n const xAxis = this.halfAxes.getColumn(0, scratchVectorU);\n xAxis.transformAsPoint(transformation);\n\n const yAxis = this.halfAxes.getColumn(1, scratchVectorV);\n yAxis.transformAsPoint(transformation);\n\n const zAxis = this.halfAxes.getColumn(2, scratchVectorW);\n zAxis.transformAsPoint(transformation);\n\n this.halfAxes = new Matrix3([...xAxis, ...yAxis, ...zAxis]);\n return this;\n }\n\n getTransform() {\n // const modelMatrix = Matrix4.fromRotationTranslation(this.boundingVolume.halfAxes, this.boundingVolume.center);\n // return modelMatrix;\n throw new Error('not implemented');\n }\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n/* eslint-disable */\nimport {Vector3, equals, assert} from '@math.gl/core';\n\nconst scratchPosition = new Vector3();\nconst scratchNormal = new Vector3();\n\n// A plane in Hessian Normal Form\nexport default class Plane {\n constructor(normal = [0, 0, 1], distance = 0) {\n this.normal = new Vector3();\n this.distance = -0;\n this.fromNormalDistance(normal, distance);\n }\n\n fromNormalDistance(normal, distance) {\n assert(Number.isFinite(distance));\n this.normal.from(normal).normalize();\n this.distance = distance;\n return this;\n }\n\n // Creates a plane from a normal and a point on the plane.\n fromPointNormal(point, normal) {\n point = scratchPosition.from(point);\n this.normal.from(normal).normalize();\n const distance = -this.normal.dot(point);\n this.distance = distance;\n\n return this;\n }\n\n // Creates a plane from the general equation\n fromCoefficients(a, b, c, d) {\n this.normal.set(a, b, c);\n assert(equals(this.normal.len(), 1));\n this.distance = d;\n return this;\n }\n\n // Duplicates a Plane instance.\n clone(plane) {\n return new Plane(this.normal, this.distance);\n }\n\n // Compares the provided Planes by normal and distance\n equals(right) {\n return equals(this.distance, right.distance) && equals(this.normal, right.normal);\n }\n\n // Computes the signed shortest distance of a point to a plane.\n // The sign of the distance determines which side of the plane the point is on.\n getPointDistance(point) {\n return this.normal.dot(point) + this.distance;\n }\n\n // Transforms the plane by the given transformation matrix.\n transform(matrix4) {\n const normal = scratchNormal.copy(this.normal).transformAsVector(matrix4).normalize();\n const point = this.normal.scale(-this.distance).transform(matrix4);\n return this.fromPointNormal(point, normal);\n }\n\n // Projects a point onto the plane.\n projectPointOntoPlane(point, result = [0, 0, 0]) {\n point = scratchPosition.from(point);\n // projectedPoint = point - (normal.point + scale) * normal\n const pointDistance = this.getPointDistance(point);\n const scaledNormal = scratchNormal.copy(this.normal).scale(pointDistance);\n\n return point.subtract(scaledNormal).to(result);\n }\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n/* eslint-disable */\nimport {Vector3, Vector4, assert} from '@math.gl/core';\nimport {INTERSECTION} from '../constants';\nimport Plane from './plane';\n\n// X, Y, Z Unit vectors\nconst faces = [new Vector3([1, 0, 0]), new Vector3([0, 1, 0]), new Vector3([0, 0, 1])];\n\nconst scratchPlaneCenter = new Vector3();\nconst scratchPlaneNormal = new Vector3();\nconst scratchPlane = new Plane(new Vector3(1.0, 0.0, 0.0), 0.0);\n\n// A culling volume defined by planes.\nexport default class CullingVolume {\n // For plane masks (as used in {@link CullingVolume#computeVisibilityWithPlaneMask}), this special value\n // represents the case where the object bounding volume is entirely outside the culling volume.\n static get MASK_OUTSIDE() {\n return 0xffffffff;\n }\n\n // For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value\n // represents the case where the object bounding volume is entirely inside the culling volume.\n static get MASK_INSIDE() {\n return 0x00000000;\n }\n\n // For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value\n // represents the case where the object bounding volume (may) intersect all planes of the culling volume.\n static get MASK_INDETERMINATE() {\n return 0x7fffffff;\n }\n\n constructor(planes = []) {\n // {Cartesian4[]} [planes] An array of clipping planes.\n this.planes = planes;\n assert(this.planes.every((plane) => plane instanceof Plane));\n }\n\n // Constructs a culling volume from a bounding sphere. Creates six planes that create a box containing the sphere.\n // The planes are aligned to the x, y, and z axes in world coordinates.\n fromBoundingSphere(boundingSphere) {\n this.planes.length = 2 * faces.length;\n\n const center = boundingSphere.center;\n const radius = boundingSphere.radius;\n\n let planeIndex = 0;\n\n for (const faceNormal of faces) {\n let plane0 = this.planes[planeIndex];\n let plane1 = this.planes[planeIndex + 1];\n\n if (!plane0) {\n plane0 = this.planes[planeIndex] = new Plane();\n }\n if (!plane1) {\n plane1 = this.planes[planeIndex + 1] = new Plane();\n }\n\n const plane0Center = scratchPlaneCenter.copy(faceNormal).scale(-radius).add(center);\n const plane0Distance = -faceNormal.dot(plane0Center);\n\n plane0.fromPointNormal(plane0Center, faceNormal);\n\n const plane1Center = scratchPlaneCenter.copy(faceNormal).scale(radius).add(center);\n\n const negatedFaceNormal = scratchPlaneNormal.copy(faceNormal).negate();\n\n const plane1Distance = -negatedFaceNormal.dot(plane1Center);\n\n plane1.fromPointNormal(plane1Center, negatedFaceNormal);\n\n planeIndex += 2;\n }\n\n return this;\n }\n\n // Determines whether a bounding volume intersects the culling volume.\n computeVisibility(boundingVolume) {\n assert(boundingVolume);\n // const planes = this.planes;\n let intersect = INTERSECTION.INSIDE;\n for (const plane of this.planes) {\n const result = boundingVolume.intersectPlane(plane);\n switch (result) {\n case INTERSECTION.OUTSIDE:\n // We are done\n return INTERSECTION.OUTSIDE;\n\n case INTERSECTION.INTERSECTING:\n // If no other intersection is outside, return INTERSECTING\n intersect = INTERSECTION.INTERSECTING;\n break;\n\n default:\n }\n }\n\n return intersect;\n }\n\n // Determines whether a bounding volume intersects the culling volume.\n /*\n * @param {Number} parentPlaneMask A bit mask from the boundingVolume's parent's check against the same culling\n * volume, such that if (planeMask & (1 << planeIndex) === 0), for k < 31, then\n * the parent (and therefore this) volume is completely inside plane[planeIndex]\n * and that plane check can be skipped.\n */\n computeVisibilityWithPlaneMask(boundingVolume, parentPlaneMask) {\n assert(boundingVolume, 'boundingVolume is required.');\n assert(Number.isFinite(parentPlaneMask), 'parentPlaneMask is required.');\n\n if (\n parentPlaneMask === CullingVolume.MASK_OUTSIDE ||\n parentPlaneMask === CullingVolume.MASK_INSIDE\n ) {\n // parent is completely outside or completely inside, so this child is as well.\n return parentPlaneMask;\n }\n\n // Start with MASK_INSIDE (all zeros) so that after the loop, the return value can be compared with MASK_INSIDE.\n // (Because if there are fewer than 31 planes, the upper bits wont be changed.)\n let mask = CullingVolume.MASK_INSIDE;\n\n const planes = this.planes;\n for (let k = 0; k < this.planes.length; ++k) {\n // For k greater than 31 (since 31 is the maximum number of INSIDE/INTERSECTING bits we can store), skip the optimization.\n const flag = k < 31 ? 1 << k : 0;\n if (k < 31 && (parentPlaneMask & flag) === 0) {\n // boundingVolume is known to be INSIDE this plane.\n continue;\n }\n\n const plane = planes[k];\n const result = boundingVolume.intersectPlane(plane);\n if (result === INTERSECTION.OUTSIDE) {\n return CullingVolume.MASK_OUTSIDE;\n } else if (result === INTERSECTION.INTERSECTING) {\n mask |= flag;\n }\n }\n\n return mask;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {checkVector, deprecated} from '../lib/validators';\nimport Matrix from './base/matrix';\n// eslint-disable-next-line camelcase\nimport {vec2_transformMat4AsVector, vec3_transformMat4AsVector} from '../lib/gl-matrix-extras';\n\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as mat4 from 'gl-matrix/mat4';\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec2 from 'gl-matrix/vec2';\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec3 from 'gl-matrix/vec3';\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec4 from 'gl-matrix/vec4';\n\nconst IDENTITY = Object.freeze([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);\nconst ZERO = Object.freeze([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);\n\nconst INDICES = Object.freeze({\n COL0ROW0: 0,\n COL0ROW1: 1,\n COL0ROW2: 2,\n COL0ROW3: 3,\n COL1ROW0: 4,\n COL1ROW1: 5,\n COL1ROW2: 6,\n COL1ROW3: 7,\n COL2ROW0: 8,\n COL2ROW1: 9,\n COL2ROW2: 10,\n COL2ROW3: 11,\n COL3ROW0: 12,\n COL3ROW1: 13,\n COL3ROW2: 14,\n COL3ROW3: 15\n});\n\nconst constants = {};\n\nexport default class Matrix4 extends Matrix {\n static get IDENTITY() {\n constants.IDENTITY = constants.IDENTITY || Object.freeze(new Matrix4(IDENTITY));\n return constants.IDENTITY;\n }\n\n static get ZERO() {\n constants.ZERO = constants.ZERO || Object.freeze(new Matrix4(ZERO));\n return constants.ZERO;\n }\n\n get INDICES() {\n return INDICES;\n }\n\n get ELEMENTS() {\n return 16;\n }\n\n get RANK() {\n return 4;\n }\n\n constructor(array) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0);\n if (arguments.length === 1 && Array.isArray(array)) {\n this.copy(array);\n } else {\n this.identity();\n }\n }\n\n copy(array) {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n this[4] = array[4];\n this[5] = array[5];\n this[6] = array[6];\n this[7] = array[7];\n this[8] = array[8];\n this[9] = array[9];\n this[10] = array[10];\n this[11] = array[11];\n this[12] = array[12];\n this[13] = array[13];\n this[14] = array[14];\n this[15] = array[15];\n return this.check();\n }\n\n // eslint-disable-next-line max-params\n set(m00, m10, m20, m30, m01, m11, m21, m31, m02, m12, m22, m32, m03, m13, m23, m33) {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m30;\n this[4] = m01;\n this[5] = m11;\n this[6] = m21;\n this[7] = m31;\n this[8] = m02;\n this[9] = m12;\n this[10] = m22;\n this[11] = m32;\n this[12] = m03;\n this[13] = m13;\n this[14] = m23;\n this[15] = m33;\n return this.check();\n }\n\n // accepts row major order, stores as column major\n // eslint-disable-next-line max-params\n setRowMajor(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n this[0] = m00;\n this[1] = m10;\n this[2] = m20;\n this[3] = m30;\n this[4] = m01;\n this[5] = m11;\n this[6] = m21;\n this[7] = m31;\n this[8] = m02;\n this[9] = m12;\n this[10] = m22;\n this[11] = m32;\n this[12] = m03;\n this[13] = m13;\n this[14] = m23;\n this[15] = m33;\n return this.check();\n }\n\n toRowMajor(result) {\n result[0] = this[0];\n result[1] = this[4];\n result[2] = this[8];\n result[3] = this[12];\n result[4] = this[1];\n result[5] = this[5];\n result[6] = this[9];\n result[7] = this[13];\n result[8] = this[2];\n result[9] = this[6];\n result[10] = this[10];\n result[11] = this[14];\n result[12] = this[3];\n result[13] = this[7];\n result[14] = this[11];\n result[15] = this[15];\n return result;\n }\n\n // Constructors\n\n identity() {\n return this.copy(IDENTITY);\n }\n\n // Calculates a 4x4 matrix from the given quaternion\n // q quat Quaternion to create matrix from\n fromQuaternion(q) {\n mat4.fromQuat(this, q);\n return this.check();\n }\n\n // Generates a frustum matrix with the given bounds\n // left Number Left bound of the frustum\n // right Number Right bound of the frustum\n // bottom Number Bottom bound of the frustum\n // top Number Top bound of the frustum\n // near Number Near bound of the frustum\n // far Number Far bound of the frustum\n frustum({left, right, bottom, top, near, far}) {\n if (far === Infinity) {\n Matrix4._computeInfinitePerspectiveOffCenter(this, left, right, bottom, top, near);\n } else {\n mat4.frustum(this, left, right, bottom, top, near, far);\n }\n return this.check();\n }\n\n // eslint-disable-next-line max-params\n static _computeInfinitePerspectiveOffCenter(result, left, right, bottom, top, near) {\n const column0Row0 = (2.0 * near) / (right - left);\n const column1Row1 = (2.0 * near) / (top - bottom);\n const column2Row0 = (right + left) / (right - left);\n const column2Row1 = (top + bottom) / (top - bottom);\n const column2Row2 = -1.0;\n const column2Row3 = -1.0;\n const column3Row2 = -2.0 * near;\n\n result[0] = column0Row0;\n result[1] = 0.0;\n result[2] = 0.0;\n result[3] = 0.0;\n result[4] = 0.0;\n result[5] = column1Row1;\n result[6] = 0.0;\n result[7] = 0.0;\n result[8] = column2Row0;\n result[9] = column2Row1;\n result[10] = column2Row2;\n result[11] = column2Row3;\n result[12] = 0.0;\n result[13] = 0.0;\n result[14] = column3Row2;\n result[15] = 0.0;\n return result;\n }\n\n // Generates a look-at matrix with the given eye position, focal point,\n // and up axis\n // eye vec3 Position of the viewer\n // center vec3 Point the viewer is looking at\n // up vec3 vec3 pointing up\n lookAt(eye, center, up) {\n // Signature: lookAt({eye, center = [0, 0, 0], up = [0, 1, 0]}))\n if (arguments.length === 1) {\n ({eye, center, up} = eye);\n }\n\n center = center || [0, 0, 0];\n up = up || [0, 1, 0];\n\n mat4.lookAt(this, eye, center, up);\n return this.check();\n }\n\n // Generates a orthogonal projection matrix with the given bounds\n // from \"traditional\" view space parameters\n // left number Left bound of the frustum\n // right number Right bound of the frustum\n // bottom number Bottom bound of the frustum\n // top number Top bound of the frustum\n // near number Near bound of the frustum\n // far number Far bound of the frustum\n ortho({left, right, bottom, top, near = 0.1, far = 500}) {\n mat4.ortho(this, left, right, bottom, top, near, far);\n return this.check();\n }\n\n // Generates an orthogonal projection matrix with the same parameters\n // as a perspective matrix (plus focalDistance)\n // fovy number Vertical field of view in radians\n // aspect number Aspect ratio. typically viewport width/height\n // focalDistance distance in the view frustum used for extent calculations\n // near number Near bound of the frustum\n // far number Far bound of the frustum\n orthographic({\n fovy = (45 * Math.PI) / 180,\n aspect = 1,\n focalDistance = 1,\n near = 0.1,\n far = 500\n }) {\n if (fovy > Math.PI * 2) {\n throw Error('radians');\n }\n const halfY = fovy / 2;\n const top = focalDistance * Math.tan(halfY); // focus_plane is the distance from the camera\n const right = top * aspect;\n\n return new Matrix4().ortho({\n left: -right,\n right,\n bottom: -top,\n top,\n near,\n far\n });\n }\n\n // Generates a perspective projection matrix with the given bounds\n // fovy number Vertical field of view in radians\n // aspect number Aspect ratio. typically viewport width/height\n // near number Near bound of the frustum\n // far number Far bound of the frustum\n perspective({\n fovy = undefined,\n fov = (45 * Math.PI) / 180, // DEPRECATED\n aspect = 1,\n near = 0.1,\n far = 500\n } = {}) {\n fovy = fovy || fov;\n if (fovy > Math.PI * 2) {\n throw Error('radians');\n }\n mat4.perspective(this, fovy, aspect, near, far);\n return this.check();\n }\n\n // Accessors\n\n determinant() {\n return mat4.determinant(this);\n }\n\n // Extracts the non-uniform scale assuming the matrix is an affine transformation.\n // The scales are the \"lengths\" of the column vectors in the upper-left 3x3 matrix.\n getScale(result = [-0, -0, -0]) {\n // explicit is faster than hypot...\n result[0] = Math.sqrt(this[0] * this[0] + this[1] * this[1] + this[2] * this[2]);\n result[1] = Math.sqrt(this[4] * this[4] + this[5] * this[5] + this[6] * this[6]);\n result[2] = Math.sqrt(this[8] * this[8] + this[9] * this[9] + this[10] * this[10]);\n // result[0] = Math.hypot(this[0], this[1], this[2]);\n // result[1] = Math.hypot(this[4], this[5], this[6]);\n // result[2] = Math.hypot(this[8], this[9], this[10]);\n return result;\n }\n\n // Gets the translation portion, assuming the matrix is a affine transformation matrix.\n getTranslation(result = [-0, -0, -0]) {\n result[0] = this[12];\n result[1] = this[13];\n result[2] = this[14];\n return result;\n }\n\n // Gets upper left 3x3 pure rotation matrix (non-scaling), assume affine transformation matrix\n getRotation(\n result = [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0],\n scaleResult = null\n ) {\n const scale = this.getScale(scaleResult || [-0, -0, -0]);\n\n const inverseScale0 = 1 / scale[0];\n const inverseScale1 = 1 / scale[1];\n const inverseScale2 = 1 / scale[2];\n\n result[0] = this[0] * inverseScale0;\n result[1] = this[1] * inverseScale1;\n result[2] = this[2] * inverseScale2;\n result[3] = 0;\n result[4] = this[4] * inverseScale0;\n result[5] = this[5] * inverseScale1;\n result[6] = this[6] * inverseScale2;\n result[7] = 0;\n result[8] = this[8] * inverseScale0;\n result[9] = this[9] * inverseScale1;\n result[10] = this[10] * inverseScale2;\n result[11] = 0;\n result[12] = 0;\n result[13] = 0;\n result[14] = 0;\n result[15] = 1;\n return result;\n }\n\n getRotationMatrix3(result = [-0, -0, -0, -0, -0, -0, -0, -0, -0], scaleResult = null) {\n const scale = this.getScale(scaleResult || [-0, -0, -0]);\n\n const inverseScale0 = 1 / scale[0];\n const inverseScale1 = 1 / scale[1];\n const inverseScale2 = 1 / scale[2];\n\n result[0] = this[0] * inverseScale0;\n result[1] = this[1] * inverseScale1;\n result[2] = this[2] * inverseScale2;\n result[3] = this[4] * inverseScale0;\n result[4] = this[5] * inverseScale1;\n result[5] = this[6] * inverseScale2;\n result[6] = this[8] * inverseScale0;\n result[7] = this[9] * inverseScale1;\n result[8] = this[10] * inverseScale2;\n return result;\n }\n\n // Modifiers\n\n transpose() {\n mat4.transpose(this, this);\n return this.check();\n }\n\n invert() {\n mat4.invert(this, this);\n return this.check();\n }\n\n // Operations\n\n multiplyLeft(a) {\n mat4.multiply(this, a, this);\n return this.check();\n }\n\n multiplyRight(a) {\n mat4.multiply(this, this, a);\n return this.check();\n }\n\n // Rotates a matrix by the given angle around the X axis\n rotateX(radians) {\n mat4.rotateX(this, this, radians);\n // mat4.rotate(this, this, radians, [1, 0, 0]);\n return this.check();\n }\n\n // Rotates a matrix by the given angle around the Y axis.\n rotateY(radians) {\n mat4.rotateY(this, this, radians);\n // mat4.rotate(this, this, radians, [0, 1, 0]);\n return this.check();\n }\n\n // Rotates a matrix by the given angle around the Z axis.\n rotateZ(radians) {\n mat4.rotateZ(this, this, radians);\n // mat4.rotate(this, this, radians, [0, 0, 1]);\n return this.check();\n }\n\n rotateXYZ([rx, ry, rz]) {\n return this.rotateX(rx).rotateY(ry).rotateZ(rz);\n }\n\n rotateAxis(radians, axis) {\n mat4.rotate(this, this, radians, axis);\n return this.check();\n }\n\n scale(factor) {\n if (Array.isArray(factor)) {\n mat4.scale(this, this, factor);\n } else {\n mat4.scale(this, this, [factor, factor, factor]);\n }\n\n return this.check();\n }\n\n translate(vec) {\n mat4.translate(this, this, vec);\n return this.check();\n }\n\n // Transforms\n\n // Transforms any 2, 3 or 4 element vector. 2 and 3 elements are treated as points\n transform(vector, result) {\n if (vector.length === 4) {\n result = vec4.transformMat4(result || [-0, -0, -0, -0], vector, this);\n checkVector(result, 4);\n return result;\n }\n return this.transformAsPoint(vector, result);\n }\n\n // Transforms any 2 or 3 element array as point (w implicitly 1)\n transformAsPoint(vector, result) {\n const {length} = vector;\n switch (length) {\n case 2:\n result = vec2.transformMat4(result || [-0, -0], vector, this);\n break;\n case 3:\n result = vec3.transformMat4(result || [-0, -0, -0], vector, this);\n break;\n default:\n throw new Error('Illegal vector');\n }\n checkVector(result, vector.length);\n return result;\n }\n\n // Transforms any 2 or 3 element array as vector (w implicitly 0)\n transformAsVector(vector, result) {\n switch (vector.length) {\n case 2:\n result = vec2_transformMat4AsVector(result || [-0, -0], vector, this);\n break;\n case 3:\n result = vec3_transformMat4AsVector(result || [-0, -0, -0], vector, this);\n break;\n default:\n throw new Error('Illegal vector');\n }\n checkVector(result, vector.length);\n return result;\n }\n\n // three.js math API compatibility\n makeRotationX(radians) {\n return this.identity().rotateX(radians);\n }\n\n makeTranslation(x, y, z) {\n return this.identity().translate([x, y, z]);\n }\n\n // DEPRECATED in 3.0\n\n transformPoint(vector, result) {\n deprecated('Matrix4.transformPoint', '3.0');\n return this.transformAsPoint(vector, result);\n }\n\n transformVector(vector, result) {\n deprecated('Matrix4.transformVector', '3.0');\n return this.transformAsPoint(vector, result);\n }\n\n transformDirection(vector, result) {\n deprecated('Matrix4.transformDirection', '3.0');\n return this.transformAsVector(vector, result);\n }\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// Note: This class is still an experimental export, mainly used by other test cases\n// - It has not been fully adapted to math.gl conventions\n// - Documentation has not been ported\n\n// @ts-nocheck\n\nimport {Vector3, Matrix4, assert} from '@math.gl/core';\nimport CullingVolume from './culling-volume';\nimport Plane from './plane';\n\nconst scratchPlaneUpVector = new Vector3();\nconst scratchPlaneRightVector = new Vector3();\nconst scratchPlaneNearCenter = new Vector3();\nconst scratchPlaneFarCenter = new Vector3();\nconst scratchPlaneNormal = new Vector3();\n\nexport default class PerspectiveOffCenterFrustum {\n /**\n * The viewing frustum is defined by 6 planes.\n * Each plane is represented by a {@link Vector4} object, where the x, y, and z components\n * define the unit vector normal to the plane, and the w component is the distance of the\n * plane from the origin/camera position.\n *\n * @alias PerspectiveOffCenterFrustum\n * @constructor\n *\n * @param {Object} [options] An object with the following properties:\n * @param {Number} [options.left] The left clipping plane distance.\n * @param {Number} [options.right] The right clipping plane distance.\n * @param {Number} [options.top] The top clipping plane distance.\n * @param {Number} [options.bottom] The bottom clipping plane distance.\n * @param {Number} [options.near=1.0] The near clipping plane distance.\n * @param {Number} [options.far=500000000.0] The far clipping plane distance.\n *\n * @example\n * const frustum = new PerspectiveOffCenterFrustum({\n * left : -1.0,\n * right : 1.0,\n * top : 1.0,\n * bottom : -1.0,\n * near : 1.0,\n * far : 100.0\n * });\n *\n * @see PerspectiveFrustum\n */\n constructor(options = {}) {\n options = {near: 1.0, far: 500000000.0, ...options};\n\n /**\n * Defines the left clipping plane.\n * @type {Number}\n * @default undefined\n */\n this.left = options.left;\n this._left = undefined;\n\n /**\n * Defines the right clipping plane.\n * @type {Number}\n * @default undefined\n */\n this.right = options.right;\n this._right = undefined;\n\n /**\n * Defines the top clipping plane.\n * @type {Number}\n * @default undefined\n */\n this.top = options.top;\n this._top = undefined;\n\n /**\n * Defines the bottom clipping plane.\n * @type {Number}\n * @default undefined\n */\n this.bottom = options.bottom;\n this._bottom = undefined;\n\n /**\n * The distance of the near plane.\n * @type {Number}\n * @default 1.0\n */\n this.near = options.near;\n this._near = this.near;\n\n /**\n * The distance of the far plane.\n * @type {Number}\n * @default 500000000.0\n */\n this.far = options.far;\n this._far = this.far;\n\n this._cullingVolume = new CullingVolume([\n new Plane(),\n new Plane(),\n new Plane(),\n new Plane(),\n new Plane(),\n new Plane()\n ]);\n this._perspectiveMatrix = new Matrix4();\n this._infinitePerspective = new Matrix4();\n }\n\n /**\n * Returns a duplicate of a PerspectiveOffCenterFrustum instance.\n * @returns {PerspectiveOffCenterFrustum} A new PerspectiveFrustum instance.\n * */\n clone() {\n return new PerspectiveOffCenterFrustum({\n right: this.right,\n left: this.left,\n top: this.top,\n bottom: this.bottom,\n near: this.near,\n far: this.far\n });\n }\n\n /**\n * Compares the provided PerspectiveOffCenterFrustum componentwise and returns\n * <code>true</code> if they are equal, <code>false</code> otherwise.\n *\n * @param {PerspectiveOffCenterFrustum} [other] The right hand side PerspectiveOffCenterFrustum.\n * @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.\n */\n equals(other) {\n return (\n other &&\n other instanceof PerspectiveOffCenterFrustum &&\n this.right === other.right &&\n this.left === other.left &&\n this.top === other.top &&\n this.bottom === other.bottom &&\n this.near === other.near &&\n this.far === other.far\n );\n }\n\n /**\n * Gets the perspective projection matrix computed from the view frustum.\n * @memberof PerspectiveOffCenterFrustum.prototype\n * @type {Matrix4}\n * @readonly\n *\n * @see PerspectiveOffCenterFrustum#infiniteProjectionMatrix\n */\n get projectionMatrix() {\n update(this);\n return this._perspectiveMatrix;\n }\n\n /**\n * Gets the perspective projection matrix computed from the view frustum with an infinite far plane.\n * @memberof PerspectiveOffCenterFrustum.prototype\n * @type {Matrix4}\n * @readonly\n *\n * @see PerspectiveOffCenterFrustum#projectionMatrix\n */\n get infiniteProjectionMatrix() {\n update(this);\n return this._infinitePerspective;\n }\n\n /**\n * Creates a culling volume for this frustum.\n *\n * @param {Vector3} position The eye position.\n * @param {Vector3} direction The view direction.\n * @param {Vector3} up The up direction.\n * @returns {CullingVolume} A culling volume at the given position and orientation.\n *\n * @example\n * // Check if a bounding volume intersects the frustum.\n * const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);\n * const intersect = cullingVolume.computeVisibility(boundingVolume);\n */\n // eslint-disable-next-line complexity, max-statements\n computeCullingVolume(position, direction, up) {\n assert(position, 'position is required.');\n assert(direction, 'direction is required.');\n assert(up, 'up is required.');\n\n const planes = this._cullingVolume.planes;\n\n up = scratchPlaneUpVector.copy(up).normalize();\n const right = scratchPlaneRightVector.copy(direction).cross(up).normalize();\n\n const nearCenter = scratchPlaneNearCenter\n .copy(direction)\n .multiplyByScalar(this.near)\n .add(position);\n\n const farCenter = scratchPlaneFarCenter\n .copy(direction)\n .multiplyByScalar(this.far)\n .add(position);\n\n let normal = scratchPlaneNormal;\n\n // Left plane computation\n normal.copy(right).multiplyByScalar(this.left).add(nearCenter).subtract(position).cross(up);\n\n planes[0].fromPointNormal(position, normal);\n\n // Right plane computation\n normal\n .copy(right)\n .multiplyByScalar(this.right)\n .add(nearCenter)\n .subtract(position)\n .cross(up)\n .negate();\n\n planes[1].fromPointNormal(position, normal);\n\n // Bottom plane computation\n normal\n .copy(up)\n .multiplyByScalar(this.bottom)\n .add(nearCenter)\n .subtract(position)\n .cross(right)\n .negate();\n\n planes[2].fromPointNormal(position, normal);\n\n // Top plane computation\n normal.copy(up).multiplyByScalar(this.top).add(nearCenter).subtract(position).cross(right);\n\n planes[3].fromPointNormal(position, normal);\n\n normal = new Vector3().copy(direction);\n\n // Near plane computation\n planes[4].fromPointNormal(nearCenter, normal);\n\n // Far plane computation\n normal.negate();\n\n planes[5].fromPointNormal(farCenter, normal);\n\n return this._cullingVolume;\n }\n\n /**\n * Returns the pixel's width and height in meters.\n *\n * @param {Number} drawingBufferWidth The width of the drawing buffer.\n * @param {Number} drawingBufferHeight The height of the drawing buffer.\n * @param {Number} distance The distance to the near plane in meters.\n * @param {Vector2} result The object onto which to store the result.\n * @returns {Vector2} The modified result parameter or a new instance of {@link Vector2} with the pixel's width and height in the x and y properties, respectively.\n *\n * @exception {DeveloperError} drawingBufferWidth must be greater than zero.\n * @exception {DeveloperError} drawingBufferHeight must be greater than zero.\n *\n * @example\n * // Example 1\n * // Get the width and height of a pixel.\n * const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, new Vector2());\n *\n * @example\n * // Example 2\n * // Get the width and height of a pixel if the near plane was set to 'distance'.\n * // For example, get the size of a pixel of an image on a billboard.\n * const position = camera.position;\n * const direction = camera.direction;\n * const toCenter = Vector3.subtract(primitive.boundingVolume.center, position, new Vector3()); // vector from camera to a primitive\n * const toCenterProj = Vector3.multiplyByScalar(direction, Vector3.dot(direction, toCenter), new Vector3()); // project vector onto camera direction vector\n * const distance = Vector3.magnitude(toCenterProj);\n * const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, new Vector2());\n */\n getPixelDimensions(drawingBufferWidth, drawingBufferHeight, distance, result) {\n update(this);\n\n assert(Number.isFinite(drawingBufferWidth) && Number.isFinite(drawingBufferHeight));\n // 'Both drawingBufferWidth and drawingBufferHeight are required.'\n assert(drawingBufferWidth > 0);\n // 'drawingBufferWidth must be greater than zero.'\n assert(drawingBufferHeight > 0);\n // 'drawingBufferHeight must be greater than zero.'\n assert(distance > 0);\n // 'distance is required.');\n assert(result);\n // 'A result object is required.');\n\n const inverseNear = 1.0 / this.near;\n let tanTheta = this.top * inverseNear;\n const pixelHeight = (2.0 * distance * tanTheta) / drawingBufferHeight;\n tanTheta = this.right * inverseNear;\n const pixelWidth = (2.0 * distance * tanTheta) / drawingBufferWidth;\n\n result.x = pixelWidth;\n result.y = pixelHeight;\n return result;\n }\n}\n\n// eslint-disable-next-line complexity, max-statements\nfunction update(frustum) {\n assert(\n Number.isFinite(frustum.right) &&\n Number.isFinite(frustum.left) &&\n Number.isFinite(frustum.top) &&\n Number.isFinite(frustum.bottom) &&\n Number.isFinite(frustum.near) &&\n Number.isFinite(frustum.far)\n );\n // throw new DeveloperError('right, left, top, bottom, near, or far parameters are not set.');\n\n const {top, bottom, right, left, near, far} = frustum;\n\n if (\n top !== frustum._top ||\n bottom !== frustum._bottom ||\n left !== frustum._left ||\n right !== frustum._right ||\n near !== frustum._near ||\n far !== frustum._far\n ) {\n assert(\n frustum.near > 0 && frustum.near < frustum.far,\n 'near must be greater than zero and less than far.'\n );\n\n frustum._left = left;\n frustum._right = right;\n frustum._top = top;\n frustum._bottom = bottom;\n frustum._near = near;\n frustum._far = far;\n frustum._perspectiveMatrix = new Matrix4().frustum({\n left,\n right,\n bottom,\n top,\n near,\n far\n });\n frustum._infinitePerspective = new Matrix4().frustum({\n left,\n right,\n bottom,\n top,\n near,\n far: Infinity\n });\n }\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {Vector3} from '@math.gl/core';\nimport BoundingSphere from '../bounding-volumes/bounding-sphere';\n\n/* eslint-disable */\nconst fromPointsXMin = new Vector3();\nconst fromPointsYMin = new Vector3();\nconst fromPointsZMin = new Vector3();\nconst fromPointsXMax = new Vector3();\nconst fromPointsYMax = new Vector3();\nconst fromPointsZMax = new Vector3();\nconst fromPointsCurrentPos = new Vector3();\nconst fromPointsScratch = new Vector3();\nconst fromPointsRitterCenter = new Vector3();\nconst fromPointsMinBoxPt = new Vector3();\nconst fromPointsMaxBoxPt = new Vector3();\nconst fromPointsNaiveCenterScratch = new Vector3();\nconst volumeConstant = (4.0 / 3.0) * Math.PI;\n\nexport default function makeBoundingSphereFromPoints(positions, result = new BoundingSphere()) {\n if (!positions || positions.length === 0) {\n return result.fromCenterRadius([0, 0, 0], 0);\n }\n\n const currentPos = fromPointsCurrentPos.copy(positions[0]);\n\n const xMin = fromPointsXMin.copy(currentPos);\n const yMin = fromPointsYMin.copy(currentPos);\n const zMin = fromPointsZMin.copy(currentPos);\n\n const xMax = fromPointsXMax.copy(currentPos);\n const yMax = fromPointsYMax.copy(currentPos);\n const zMax = fromPointsZMax.copy(currentPos);\n\n for (const position of positions) {\n currentPos.copy(position);\n\n const x = currentPos.x;\n const y = currentPos.y;\n const z = currentPos.z;\n\n // Store points containing the the smallest and largest components\n if (x < xMin.x) {\n xMin.copy(currentPos);\n }\n\n if (x > xMax.x) {\n xMax.copy(currentPos);\n }\n\n if (y < yMin.y) {\n yMin.copy(currentPos);\n }\n\n if (y > yMax.y) {\n yMax.copy(currentPos);\n }\n\n if (z < zMin.z) {\n zMin.copy(currentPos);\n }\n\n if (z > zMax.z) {\n zMax.copy(currentPos);\n }\n }\n\n // Compute x-, y-, and z-spans (Squared distances b/n each component's min. and max.).\n const xSpan = fromPointsScratch.copy(xMax).subtract(xMin).magnitudeSquared();\n const ySpan = fromPointsScratch.copy(yMax).subtract(yMin).magnitudeSquared();\n const zSpan = fromPointsScratch.copy(zMax).subtract(zMin).magnitudeSquared();\n\n // Set the diameter endpoints to the largest span.\n let diameter1 = xMin;\n let diameter2 = xMax;\n let maxSpan = xSpan;\n if (ySpan > maxSpan) {\n maxSpan = ySpan;\n diameter1 = yMin;\n diameter2 = yMax;\n }\n if (zSpan > maxSpan) {\n maxSpan = zSpan;\n diameter1 = zMin;\n diameter2 = zMax;\n }\n\n // Calculate the center of the initial sphere found by Ritter's algorithm\n const ritterCenter = fromPointsRitterCenter;\n ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;\n ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;\n ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;\n\n // Calculate the radius of the initial sphere found by Ritter's algorithm\n let radiusSquared = fromPointsScratch.copy(diameter2).subtract(ritterCenter).magnitudeSquared();\n let ritterRadius = Math.sqrt(radiusSquared);\n\n // Find the center of the sphere found using the Naive method.\n const minBoxPt = fromPointsMinBoxPt;\n minBoxPt.x = xMin.x;\n minBoxPt.y = yMin.y;\n minBoxPt.z = zMin.z;\n\n const maxBoxPt = fromPointsMaxBoxPt;\n maxBoxPt.x = xMax.x;\n maxBoxPt.y = yMax.y;\n maxBoxPt.z = zMax.z;\n\n const naiveCenter = fromPointsNaiveCenterScratch\n .copy(minBoxPt)\n .add(maxBoxPt)\n .multiplyByScalar(0.5);\n\n // Begin 2nd pass to find naive radius and modify the ritter sphere.\n let naiveRadius = 0;\n for (const position of positions) {\n currentPos.copy(position);\n\n // Find the furthest point from the naive center to calculate the naive radius.\n const r = fromPointsScratch.copy(currentPos).subtract(naiveCenter).magnitude();\n if (r > naiveRadius) {\n naiveRadius = r;\n }\n\n // Make adjustments to the Ritter Sphere to include all points.\n const oldCenterToPointSquared = fromPointsScratch\n .copy(currentPos)\n .subtract(ritterCenter)\n .magnitudeSquared();\n\n if (oldCenterToPointSquared > radiusSquared) {\n const oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);\n // Calculate new radius to include the point that lies outside\n ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;\n radiusSquared = ritterRadius * ritterRadius;\n // Calculate center of new Ritter sphere\n const oldToNew = oldCenterToPoint - ritterRadius;\n ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;\n ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;\n ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;\n }\n }\n\n if (ritterRadius < naiveRadius) {\n ritterCenter.to(result.center);\n // @ts-ignore TS2540: Cannot assign to 'radius' because it is a read-only property.\n result.radius = ritterRadius;\n } else {\n naiveCenter.to(result.center);\n // @ts-ignore TS2540: Cannot assign to 'radius' because it is a read-only property.\n result.radius = naiveRadius;\n }\n\n return result;\n}\n","// NOTE: Added to make Cesium-derived test cases work\n// TODO: Determine if/how to keep\nexport default {\n EPSILON1: 1e-1,\n EPSILON2: 1e-2,\n EPSILON3: 1e-3,\n EPSILON4: 1e-4,\n EPSILON5: 1e-5,\n EPSILON6: 1e-6,\n EPSILON7: 1e-7,\n EPSILON8: 1e-8,\n EPSILON9: 1e-9,\n EPSILON10: 1e-10,\n EPSILON11: 1e-11,\n EPSILON12: 1e-12,\n EPSILON13: 1e-13,\n EPSILON14: 1e-14,\n EPSILON15: 1e-15,\n EPSILON16: 1e-16,\n EPSILON17: 1e-17,\n EPSILON18: 1e-18,\n EPSILON19: 1e-19,\n EPSILON20: 1e-20,\n\n PI_OVER_TWO: Math.PI / 2,\n PI_OVER_FOUR: Math.PI / 4,\n PI_OVER_SIX: Math.PI / 6,\n\n TWO_PI: Math.PI * 2\n};\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {Matrix3, _MathUtils} from '@math.gl/core';\n\nconst scratchMatrix = new Matrix3();\nconst scratchUnitary = new Matrix3();\nconst scratchDiagonal = new Matrix3();\n\nconst jMatrix = new Matrix3();\nconst jMatrixTranspose = new Matrix3();\n\nexport default function computeEigenDecomposition(matrix, result = {}) {\n const EIGEN_TOLERANCE = _MathUtils.EPSILON20;\n const EIGEN_MAX_SWEEPS = 10;\n\n let count = 0;\n let sweep = 0;\n\n const unitaryMatrix = scratchUnitary;\n const diagonalMatrix = scratchDiagonal;\n\n unitaryMatrix.identity();\n diagonalMatrix.copy(matrix);\n\n const epsilon = EIGEN_TOLERANCE * computeFrobeniusNorm(diagonalMatrix);\n\n while (sweep < EIGEN_MAX_SWEEPS && offDiagonalFrobeniusNorm(diagonalMatrix) > epsilon) {\n shurDecomposition(diagonalMatrix, jMatrix);\n\n jMatrixTranspose.copy(jMatrix).transpose();\n\n diagonalMatrix.multiplyRight(jMatrix);\n diagonalMatrix.multiplyLeft(jMatrixTranspose);\n unitaryMatrix.multiplyRight(jMatrix);\n\n if (++count > 2) {\n ++sweep;\n count = 0;\n }\n }\n\n result.unitary = unitaryMatrix.toTarget(result.unitary);\n result.diagonal = diagonalMatrix.toTarget(result.diagonal);\n\n return result;\n}\n\nfunction computeFrobeniusNorm(matrix) {\n let norm = 0.0;\n for (let i = 0; i < 9; ++i) {\n const temp = matrix[i];\n norm += temp * temp;\n }\n return Math.sqrt(norm);\n}\n\nconst rowVal = [1, 0, 0];\nconst colVal = [2, 2, 1];\n\n// Computes the \"off-diagonal\" Frobenius norm.\n// Assumes matrix is symmetric.\nfunction offDiagonalFrobeniusNorm(matrix) {\n let norm = 0.0;\n for (let i = 0; i < 3; ++i) {\n const temp = matrix[scratchMatrix.getElementIndex(colVal[i], rowVal[i])];\n norm += 2.0 * temp * temp;\n }\n return Math.sqrt(norm);\n}\n\n// The routine takes a matrix, which is assumed to be symmetric, and\n// finds the largest off-diagonal term, and then creates\n// a matrix (result) which can be used to help reduce it\n//\n// This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,\n// section 8.4.2 The 2by2 Symmetric Schur Decomposition.\n//\n// eslint-disable-next-line max-statements\nfunction shurDecomposition(matrix, result) {\n const tolerance = _MathUtils.EPSILON15;\n\n let maxDiagonal = 0.0;\n let rotAxis = 1;\n\n // find pivot (rotAxis) based on max diagonal of matrix\n for (let i = 0; i < 3; ++i) {\n const temp = Math.abs(matrix[scratchMatrix.getElementIndex(colVal[i], rowVal[i])]);\n if (temp > maxDiagonal) {\n rotAxis = i;\n maxDiagonal = temp;\n }\n }\n\n const p = rowVal[rotAxis];\n const q = colVal[rotAxis];\n\n let c = 1.0;\n let s = 0.0;\n\n if (Math.abs(matrix[scratchMatrix.getElementIndex(q, p)]) > tolerance) {\n const qq = matrix[scratchMatrix.getElementIndex(q, q)];\n const pp = matrix[scratchMatrix.getElementIndex(p, p)];\n const qp = matrix[scratchMatrix.getElementIndex(q, p)];\n\n const tau = (qq - pp) / 2.0 / qp;\n let t;\n\n if (tau < 0.0) {\n t = -1.0 / (-tau + Math.sqrt(1.0 + tau * tau));\n } else {\n t = 1.0 / (tau + Math.sqrt(1.0 + tau * tau));\n }\n\n c = 1.0 / Math.sqrt(1.0 + t * t);\n s = t * c;\n }\n\n // Copy into result\n Matrix3.IDENTITY.to(result);\n result[scratchMatrix.getElementIndex(p, p)] = result[scratchMatrix.getElementIndex(q, q)] = c;\n result[scratchMatrix.getElementIndex(q, p)] = s;\n result[scratchMatrix.getElementIndex(p, q)] = -s;\n\n return result;\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {Vector3, Matrix3} from '@math.gl/core';\nimport computeEigenDecomposition from './compute-eigen-decomposition';\nimport OrientedBoundingBox from '../bounding-volumes/oriented-bounding-box';\nimport AxisAlignedBoundingBox from '../bounding-volumes/axis-aligned-bounding-box';\n\nconst scratchVector2 = new Vector3();\n\nconst scratchVector3 = new Vector3();\n\nconst scratchVector4 = new Vector3();\n\nconst scratchVector5 = new Vector3();\n\nconst scratchVector6 = new Vector3();\n\nconst scratchCovarianceResult = new Matrix3();\n\nconst scratchEigenResult = {\n diagonal: new Matrix3(),\n unitary: new Matrix3()\n};\n\n/* eslint-disable max-statements */\nexport function makeOrientedBoundingBoxFromPoints(positions, result = new OrientedBoundingBox()) {\n if (!positions || positions.length === 0) {\n result.halfAxes = new Matrix3([0, 0, 0, 0, 0, 0, 0, 0, 0]);\n result.center = new Vector3();\n return result;\n }\n\n const length = positions.length;\n const meanPoint = new Vector3(0, 0, 0);\n for (const position of positions) {\n meanPoint.add(position);\n }\n const invLength = 1.0 / length;\n meanPoint.multiplyByScalar(invLength);\n\n let exx = 0.0;\n let exy = 0.0;\n let exz = 0.0;\n let eyy = 0.0;\n let eyz = 0.0;\n let ezz = 0.0;\n\n for (const position of positions) {\n const p = scratchVector2.copy(position).subtract(meanPoint);\n exx += p.x * p.x;\n exy += p.x * p.y;\n exz += p.x * p.z;\n eyy += p.y * p.y;\n eyz += p.y * p.z;\n ezz += p.z * p.z;\n }\n\n exx *= invLength;\n exy *= invLength;\n exz *= invLength;\n eyy *= invLength;\n eyz *= invLength;\n ezz *= invLength;\n\n const covarianceMatrix = scratchCovarianceResult;\n covarianceMatrix[0] = exx;\n covarianceMatrix[1] = exy;\n covarianceMatrix[2] = exz;\n covarianceMatrix[3] = exy;\n covarianceMatrix[4] = eyy;\n covarianceMatrix[5] = eyz;\n covarianceMatrix[6] = exz;\n covarianceMatrix[7] = eyz;\n covarianceMatrix[8] = ezz;\n\n const {unitary} = computeEigenDecomposition(covarianceMatrix, scratchEigenResult);\n const rotation = result.halfAxes.copy(unitary);\n\n let v1 = rotation.getColumn(0, scratchVector4);\n let v2 = rotation.getColumn(1, scratchVector5);\n let v3 = rotation.getColumn(2, scratchVector6);\n\n let u1 = -Number.MAX_VALUE;\n let u2 = -Number.MAX_VALUE;\n let u3 = -Number.MAX_VALUE;\n let l1 = Number.MAX_VALUE;\n let l2 = Number.MAX_VALUE;\n let l3 = Number.MAX_VALUE;\n\n for (const position of positions) {\n scratchVector2.copy(position);\n\n u1 = Math.max(scratchVector2.dot(v1), u1);\n u2 = Math.max(scratchVector2.dot(v2), u2);\n u3 = Math.max(scratchVector2.dot(v3), u3);\n\n l1 = Math.min(scratchVector2.dot(v1), l1);\n l2 = Math.min(scratchVector2.dot(v2), l2);\n l3 = Math.min(scratchVector2.dot(v3), l3);\n }\n\n v1 = v1.multiplyByScalar(0.5 * (l1 + u1));\n v2 = v2.multiplyByScalar(0.5 * (l2 + u2));\n v3 = v3.multiplyByScalar(0.5 * (l3 + u3));\n\n result.center.copy(v1).add(v2).add(v3);\n\n const scale = scratchVector3.set(u1 - l1, u2 - l2, u3 - l3).multiplyByScalar(0.5);\n const scaleMatrix = new Matrix3([scale[0], 0, 0, 0, scale[1], 0, 0, 0, scale[2]]);\n result.halfAxes.multiplyRight(scaleMatrix);\n\n return result;\n}\n\nexport function makeAxisAlignedBoundingBoxFromPoints(\n positions,\n result = new AxisAlignedBoundingBox()\n) {\n if (!positions || positions.length === 0) {\n result.minimum.set(0, 0, 0);\n result.maximum.set(0, 0, 0);\n result.center.set(0, 0, 0);\n result.halfDiagonal.set(0, 0, 0);\n return result;\n }\n\n let minimumX = positions[0][0];\n let minimumY = positions[0][1];\n let minimumZ = positions[0][2];\n\n let maximumX = positions[0][0];\n let maximumY = positions[0][1];\n let maximumZ = positions[0][2];\n\n for (const p of positions) {\n const x = p[0];\n const y = p[1];\n const z = p[2];\n\n minimumX = Math.min(x, minimumX);\n maximumX = Math.max(x, maximumX);\n minimumY = Math.min(y, minimumY);\n maximumY = Math.max(y, maximumY);\n minimumZ = Math.min(z, minimumZ);\n maximumZ = Math.max(z, maximumZ);\n }\n\n result.minimum.set(minimumX, minimumY, minimumZ);\n result.maximum.set(maximumX, maximumY, maximumZ);\n result.center.copy(result.minimum).add(result.maximum).scale(0.5);\n result.halfDiagonal.copy(result.maximum).subtract(result.center);\n\n return result;\n}\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","// Extensions to math.gl library. Intended to be folded back.\nimport typedArrayManager from './typed-array-manager';\nimport {Vector3} from 'math.gl';\n\n// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create()\nexport function createMat4() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\nexport function mod(value, divisor) {\n const modulus = value % divisor;\n return modulus < 0 ? divisor + modulus : modulus;\n}\n\n// Extract camera vectors (move to math library?)\nexport function getCameraPosition(viewMatrixInverse) {\n // Read the translation from the inverse view matrix\n return [viewMatrixInverse[12], viewMatrixInverse[13], viewMatrixInverse[14]];\n}\n\n// https://www.gamedevs.org/uploads/fast-extraction-viewing-frustum-planes-from-world-view-projection-matrix.pdf\nexport function getFrustumPlanes(viewProjectionMatrix) {\n const planes = {};\n\n planes.left = getFrustumPlane(\n viewProjectionMatrix[3] + viewProjectionMatrix[0],\n viewProjectionMatrix[7] + viewProjectionMatrix[4],\n viewProjectionMatrix[11] + viewProjectionMatrix[8],\n viewProjectionMatrix[15] + viewProjectionMatrix[12]\n );\n planes.right = getFrustumPlane(\n viewProjectionMatrix[3] - viewProjectionMatrix[0],\n viewProjectionMatrix[7] - viewProjectionMatrix[4],\n viewProjectionMatrix[11] - viewProjectionMatrix[8],\n viewProjectionMatrix[15] - viewProjectionMatrix[12]\n );\n planes.bottom = getFrustumPlane(\n viewProjectionMatrix[3] + viewProjectionMatrix[1],\n viewProjectionMatrix[7] + viewProjectionMatrix[5],\n viewProjectionMatrix[11] + viewProjectionMatrix[9],\n viewProjectionMatrix[15] + viewProjectionMatrix[13]\n );\n planes.top = getFrustumPlane(\n viewProjectionMatrix[3] - viewProjectionMatrix[1],\n viewProjectionMatrix[7] - viewProjectionMatrix[5],\n viewProjectionMatrix[11] - viewProjectionMatrix[9],\n viewProjectionMatrix[15] - viewProjectionMatrix[13]\n );\n planes.near = getFrustumPlane(\n viewProjectionMatrix[3] + viewProjectionMatrix[2],\n viewProjectionMatrix[7] + viewProjectionMatrix[6],\n viewProjectionMatrix[11] + viewProjectionMatrix[10],\n viewProjectionMatrix[15] + viewProjectionMatrix[14]\n );\n planes.far = getFrustumPlane(\n viewProjectionMatrix[3] - viewProjectionMatrix[2],\n viewProjectionMatrix[7] - viewProjectionMatrix[6],\n viewProjectionMatrix[11] - viewProjectionMatrix[10],\n viewProjectionMatrix[15] - viewProjectionMatrix[14]\n );\n\n return planes;\n}\n\nconst scratchVector = new Vector3();\n\nfunction getFrustumPlane(a, b, c, d) {\n scratchVector.set(a, b, c);\n const L = scratchVector.len();\n return {distance: d / L, normal: new Vector3(-a / L, -b / L, -c / L)};\n}\n\n/**\n * Calculate the low part of a WebGL 64 bit float\n * @param x {number} - the input float number\n * @returns {number} - the lower 32 bit of the number\n */\nexport function fp64LowPart(x) {\n return x - Math.fround(x);\n}\n\nlet scratchArray;\n\n/**\n * Split a Float64Array into a double-length Float32Array\n * @param typedArray {Float64Array}\n * @param size {Number} - per attribute size\n * @param [startIndex] {Number} - start index in the source array\n * @param [endIndex] {Number} - end index in the source array\n * @returns {Float32Array} - high part, low part for each attribute:\n [1xHi, 1yHi, 1zHi, 1xLow, 1yLow, 1zLow, 2xHi, ...]\n */\nexport function toDoublePrecisionArray(typedArray, {size = 1, startIndex = 0, endIndex}) {\n if (!Number.isFinite(endIndex)) {\n endIndex = typedArray.length;\n }\n const count = (endIndex - startIndex) / size;\n scratchArray = typedArrayManager.allocate(scratchArray, count, {\n type: Float32Array,\n size: size * 2\n });\n\n let sourceIndex = startIndex;\n let targetIndex = 0;\n while (sourceIndex < endIndex) {\n for (let j = 0; j < size; j++) {\n const value = typedArray[sourceIndex++];\n scratchArray[targetIndex + j] = value;\n scratchArray[targetIndex + j + size] = fp64LowPart(value);\n }\n targetIndex += size * 2;\n }\n\n return scratchArray.subarray(0, count * size * 2);\n}\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var baseClamp = require('./_baseClamp'),\n toNumber = require('./toNumber');\n\n/**\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Number\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n * @example\n *\n * _.clamp(-10, -5, 5);\n * // => -5\n *\n * _.clamp(10, -5, 5);\n * // => 5\n */\nfunction clamp(number, lower, upper) {\n if (upper === undefined) {\n upper = lower;\n lower = undefined;\n }\n if (upper !== undefined) {\n upper = toNumber(upper);\n upper = upper === upper ? upper : 0;\n }\n if (lower !== undefined) {\n lower = toNumber(lower);\n lower = lower === lower ? lower : 0;\n }\n return baseClamp(toNumber(number), lower, upper);\n}\n\nmodule.exports = clamp;\n","/* eslint-disable max-statements, max-depth, complexity, no-unused-expressions */\n\nimport {equals} from '@math.gl/core';\n\n/** @type {typeof import('./polygon-utils').WINDING} */\nexport const WINDING = {\n CLOCKWISE: 1,\n COUNTER_CLOCKWISE: -1\n};\n\n/** @type {typeof import('./polygon-utils').modifyPolygonWindingDirection} */\nexport function modifyPolygonWindingDirection(points, direction, options = {}) {\n const windingDirection = getPolygonWindingDirection(points, options);\n if (windingDirection !== direction) {\n reversePolygon(points, options);\n return true;\n }\n return false;\n}\n\n/** @type {typeof import('./polygon-utils').getPolygonWindingDirection} */\nexport function getPolygonWindingDirection(points, options = {}) {\n return Math.sign(getPolygonSignedArea(points, options));\n}\n\n/** @type {typeof import('./polygon-utils').getPolygonSignedArea} */\nexport function getPolygonSignedArea(points, options = {}) {\n // https://en.wikipedia.org/wiki/Shoelace_formula\n const {start = 0, end = points.length} = options;\n const dim = options.size || 2;\n let area = 0;\n for (let i = start, j = end - dim; i < end; i += dim) {\n area += (points[i] - points[j]) * (points[i + 1] + points[j + 1]);\n j = i;\n }\n return area / 2;\n}\n\n/** @type {typeof import('./polygon-utils').forEachSegmentInPolygon} */\nexport function forEachSegmentInPolygon(points, visitor, options = {}) {\n const {start = 0, end = points.length, size = 2, isClosed} = options;\n\n const numPoints = (end - start) / size;\n for (let i = 0; i < numPoints - 1; ++i) {\n visitor(\n points[start + i * size],\n points[start + i * size + 1],\n points[start + (i + 1) * size],\n points[start + (i + 1) * size + 1],\n i,\n i + 1\n );\n }\n\n const endPointIndex = start + (numPoints - 1) * size;\n const isClosedEx =\n isClosed ||\n (equals(points[start], points[endPointIndex]) &&\n equals(points[start + 1], points[endPointIndex + 1]));\n\n if (!isClosedEx) {\n visitor(\n points[endPointIndex],\n points[endPointIndex + 1],\n points[start],\n points[start + 1],\n numPoints - 1,\n 0\n );\n }\n}\n\nfunction reversePolygon(points, options) {\n const {start = 0, end = points.length, size = 2} = options;\n\n const numPoints = (end - start) / size;\n const numSwaps = Math.floor(numPoints / 2);\n for (let i = 0; i < numSwaps; ++i) {\n const b1 = start + i * size;\n const b2 = start + (numPoints - 1 - i) * size;\n for (let j = 0; j < size; ++j) {\n const tmp = points[b1 + j];\n points[b1 + j] = points[b2 + j];\n points[b2 + j] = tmp;\n }\n }\n}\n\n/** @type {typeof import('./polygon-utils').modifyPolygonWindingDirectionPoints} */\nexport function modifyPolygonWindingDirectionPoints(points, direction, options = {}) {\n const currentDirection = getPolygonWindingDirectionPoints(points, options);\n if (currentDirection !== direction) {\n points.reverse();\n return true;\n }\n return false;\n}\n\n/** @type {typeof import('./polygon-utils').getPolygonWindingDirectionPoints} */\nexport function getPolygonWindingDirectionPoints(points, options = {}) {\n return Math.sign(getPolygonSignedAreaPoints(points, options));\n}\n\n/** @type {typeof import('./polygon-utils').getPolygonSignedAreaPoints} */\nexport function getPolygonSignedAreaPoints(points, options = {}) {\n // https://en.wikipedia.org/wiki/Shoelace_formula\n const {start = 0, end = points.length} = options;\n let area = 0;\n for (let i = start, j = end - 1; i < end; ++i) {\n area += (points[i][0] - points[j][0]) * (points[i][1] + points[j][1]);\n j = i;\n }\n return area / 2;\n}\n\n/** @type {typeof import('./polygon-utils').forEachSegmentInPolygonPoints} */\nexport function forEachSegmentInPolygonPoints(points, visitor, options = {}) {\n const {start = 0, end = points.length, isClosed} = options;\n for (let i = start; i < end - 1; ++i) {\n visitor(points[i], points[i + 1], i, i + 1);\n }\n\n const isClosedEx = isClosed || equals(points[end - 1], points[0]);\n if (!isClosedEx) {\n visitor(points[end - 1], points[0], end - 1, 0);\n }\n}\n","/*\n Adapted from https://github.com/mapbox/earcut to allow passing in\n of outline and hole areas using the `areas` parameter. As the\n areas are calcuted as part of classifying the polygon rings\n we can pass them in again to avoid recomputation\n\n ISC License\n\n Copyright (c) 2016, Mapbox\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n\n */\n\n/* eslint-disable complexity, max-params, max-statements, max-depth, no-continue, no-shadow */\n\nimport {getPolygonSignedArea} from './polygon-utils';\n\nexport function earcut(data, holeIndices, dim, areas) {\n dim = dim || 2;\n\n const hasHoles = holeIndices && holeIndices.length;\n const outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n let outerNode = linkedList(data, 0, outerLen, dim, true, areas && areas[0]);\n const triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n let invSize;\n let maxX;\n let maxY;\n let minX;\n let minY;\n let x;\n let y;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim, areas);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (let i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise, area) {\n let i;\n let last;\n if (area === undefined) {\n area = getPolygonSignedArea(data, {start, end, size: dim});\n }\n\n // Note that the signed area calculation in math.gl\n // has the opposite sign to that which was originally\n // present in earcut, thus the `< 0` is reversed\n if (clockwise === area < 0) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n let p = start;\n let again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n let stop = ear;\n let prev;\n let next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n const a = ear.prev;\n const b = ear;\n const c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n let p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) && area(p.prev, p, p.next) >= 0)\n return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n const a = ear.prev;\n const b = ear;\n const c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n const minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : b.x < c.x ? b.x : c.x;\n const minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : b.y < c.y ? b.y : c.y;\n const maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : b.x > c.x ? b.x : c.x;\n const maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : b.y > c.y ? b.y : c.y;\n\n // z-order range for the current triangle bbox;\n const minZ = zOrder(minTX, minTY, minX, minY, invSize);\n const maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n let p = ear.prevZ;\n let n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (\n p !== ear.prev &&\n p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0\n )\n return false;\n p = p.prevZ;\n\n if (\n n !== ear.prev &&\n n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0\n )\n return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (\n p !== ear.prev &&\n p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0\n )\n return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (\n n !== ear.prev &&\n n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0\n )\n return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n let p = start;\n do {\n const a = p.prev;\n const b = p.next.next;\n\n if (\n !equals(a, b) &&\n intersects(a, p, p.next, b) &&\n locallyInside(a, b) &&\n locallyInside(b, a)\n ) {\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n let a = start;\n do {\n let b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n let c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim, areas) {\n const queue = [];\n let i;\n let len;\n let start;\n let end;\n let list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false, areas && areas[i + 1]);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n outerNode = findHoleBridge(hole, outerNode);\n if (outerNode) {\n const b = splitPolygon(outerNode, hole);\n\n // filter collinear points around the cuts\n filterPoints(outerNode, outerNode.next);\n filterPoints(b, b.next);\n }\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n let p = outerNode;\n const hx = hole.x;\n const hy = hole.y;\n let qx = -Infinity;\n let m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n const x = p.x + ((hy - p.y) * (p.next.x - p.x)) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n const stop = m;\n const mx = m.x;\n const my = m.y;\n let tanMin = Infinity;\n let tan;\n\n p = m;\n\n do {\n if (\n hx >= p.x &&\n p.x >= mx &&\n hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)\n ) {\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (\n locallyInside(p, hole) &&\n (tan < tanMin ||\n (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))\n ) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n let p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n let e;\n let i;\n let inSize = 1;\n let numMerges;\n let p;\n let pSize;\n let q;\n let qSize;\n let tail;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\n\n x = (x | (x << 8)) & 0x00ff00ff;\n x = (x | (x << 4)) & 0x0f0f0f0f;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00ff00ff;\n y = (y | (y << 4)) & 0x0f0f0f0f;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n let p = start;\n let leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (\n (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0\n );\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return (\n a.next.i !== b.i &&\n a.prev.i !== b.i &&\n !intersectsPolygon(a, b) && // dones't intersect other edges\n ((locallyInside(a, b) &&\n locallyInside(b, a) &&\n middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b))) || // does not create opposite-facing sectors\n (equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0))\n ); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n const o1 = sign(area(p1, q1, p2));\n const o2 = sign(area(p1, q1, q2));\n const o3 = sign(area(p2, q2, p1));\n const o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return (\n q.x <= Math.max(p.x, r.x) &&\n q.x >= Math.min(p.x, r.x) &&\n q.y <= Math.max(p.y, r.y) &&\n q.y >= Math.min(p.y, r.y)\n );\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n let p = a;\n do {\n if (\n p.i !== a.i &&\n p.next.i !== a.i &&\n p.i !== b.i &&\n p.next.i !== b.i &&\n intersects(p, p.next, a, b)\n )\n return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0\n ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0\n : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n let p = a;\n let inside = false;\n const px = (a.x + b.x) / 2;\n const py = (a.y + b.y) / 2;\n do {\n if (\n p.y > py !== p.next.y > py &&\n p.next.y !== p.y &&\n px < ((p.next.x - p.x) * (py - p.y)) / (p.next.y - p.y) + p.x\n )\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n const a2 = new Node(a.i, a.x, a.y);\n const b2 = new Node(b.i, b.x, b.y);\n const an = a.next;\n const bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n const p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n","import {\n setTransitionProperty,\n getTransitionProperty,\n getTransformXY,\n setTransformXY,\n getTransformName,\n} from './propertyUtils';\n\nconst RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nlet getComputedStyleX;\n\n// https://stackoverflow.com/a/3485654/3040605\nfunction forceRelayout(elem) {\n const originalStyle = elem.style.display;\n elem.style.display = 'none';\n elem.offsetHeight; // eslint-disable-line\n elem.style.display = originalStyle;\n}\n\nfunction css(el, name, v) {\n let value = v;\n if (typeof name === 'object') {\n for (const i in name) {\n if (name.hasOwnProperty(i)) {\n css(el, i, name[i]);\n }\n }\n return undefined;\n }\n if (typeof value !== 'undefined') {\n if (typeof value === 'number') {\n value = `${value}px`;\n }\n el.style[name] = value;\n return undefined;\n }\n return getComputedStyleX(el, name);\n}\n\nfunction getClientPosition(elem) {\n let box;\n let x;\n let y;\n const doc = elem.ownerDocument;\n const body = doc.body;\n const docElem = doc && doc.documentElement;\n // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n box = elem.getBoundingClientRect();\n\n // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n x = box.left;\n y = box.top;\n\n // In IE, most of the time, 2 extra pixels are added to the top and left\n // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and\n // IE6 standards mode, this border can be overridden by setting the\n // document element's border to zero -- thus, we cannot rely on the\n // offset always being 2 pixels.\n\n // In quirks mode, the offset can be determined by querying the body's\n // clientLeft/clientTop, but in standards mode, it is found by querying\n // the document element's clientLeft/clientTop. Since we already called\n // getClientBoundingRect we have already forced a reflow, so it is not\n // too expensive just to query them all.\n\n // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n // 窗口边框标准是设 documentElement ,quirks 时设置 body\n // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n // 标准 ie 下 docElem.clientTop 就是 border-top\n // ie7 html 即窗口边框改变不了。永远为 2\n // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n x -= docElem.clientLeft || body.clientLeft || 0;\n y -= docElem.clientTop || body.clientTop || 0;\n\n return {\n left: x,\n top: y,\n };\n}\n\nfunction getScroll(w, top) {\n let ret = w[`page${top ? 'Y' : 'X'}Offset`];\n const method = `scroll${top ? 'Top' : 'Left'}`;\n if (typeof ret !== 'number') {\n const d = w.document;\n // ie6,7,8 standard mode\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n // quirks mode\n ret = d.body[method];\n }\n }\n return ret;\n}\n\nfunction getScrollLeft(w) {\n return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n const pos = getClientPosition(el);\n const doc = el.ownerDocument;\n const w = doc.defaultView || doc.parentWindow;\n pos.left += getScrollLeft(w);\n pos.top += getScrollTop(w);\n return pos;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n // must use == for ie8\n /* eslint eqeqeq:0 */\n return obj !== null && obj !== undefined && obj == obj.window;\n}\n\nfunction getDocument(node) {\n if (isWindow(node)) {\n return node.document;\n }\n if (node.nodeType === 9) {\n return node;\n }\n return node.ownerDocument;\n}\n\nfunction _getComputedStyle(elem, name, cs) {\n let computedStyle = cs;\n let val = '';\n const d = getDocument(elem);\n computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null);\n\n // https://github.com/kissyteam/kissy/issues/61\n if (computedStyle) {\n val = computedStyle.getPropertyValue(name) || computedStyle[name];\n }\n\n return val;\n}\n\nconst _RE_NUM_NO_PX = new RegExp(`^(${RE_NUM})(?!px)[a-z%]+$`, 'i');\nconst RE_POS = /^(top|right|bottom|left)$/;\nconst CURRENT_STYLE = 'currentStyle';\nconst RUNTIME_STYLE = 'runtimeStyle';\nconst LEFT = 'left';\nconst PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n // currentStyle maybe null\n // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n let ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n // 在 ie 下不对,需要直接用 offset 方式\n // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n // From the awesome hack by Dean Edwards\n // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n // If we're not dealing with a regular pixel number\n // but a number that has a weird ending, we need to convert it to pixels\n // exclude left right for relativity\n if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n // Remember the original values\n const style = elem.style;\n const left = style[LEFT];\n const rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n // prevent flashing of content\n elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n // Put in the new values to get a computed value out\n style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n ret = style.pixelLeft + PX;\n\n // Revert the changed values\n style[LEFT] = left;\n\n elem[RUNTIME_STYLE][LEFT] = rsLeft;\n }\n return ret === '' ? 'auto' : ret;\n}\n\nif (typeof window !== 'undefined') {\n getComputedStyleX = window.getComputedStyle\n ? _getComputedStyle\n : _getComputedStyleIE;\n}\n\nfunction getOffsetDirection(dir, option) {\n if (dir === 'left') {\n return option.useCssRight ? 'right' : dir;\n }\n return option.useCssBottom ? 'bottom' : dir;\n}\n\nfunction oppositeOffsetDirection(dir) {\n if (dir === 'left') {\n return 'right';\n } else if (dir === 'right') {\n return 'left';\n } else if (dir === 'top') {\n return 'bottom';\n } else if (dir === 'bottom') {\n return 'top';\n }\n}\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setLeftTop(elem, offset, option) {\n // set position first, in-case top/left are set even on static elem\n if (css(elem, 'position') === 'static') {\n elem.style.position = 'relative';\n }\n let presetH = -999;\n let presetV = -999;\n const horizontalProperty = getOffsetDirection('left', option);\n const verticalProperty = getOffsetDirection('top', option);\n const oppositeHorizontalProperty = oppositeOffsetDirection(\n horizontalProperty,\n );\n const oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);\n\n if (horizontalProperty !== 'left') {\n presetH = 999;\n }\n\n if (verticalProperty !== 'top') {\n presetV = 999;\n }\n let originalTransition = '';\n const originalOffset = getOffset(elem);\n if ('left' in offset || 'top' in offset) {\n originalTransition = getTransitionProperty(elem) || '';\n setTransitionProperty(elem, 'none');\n }\n if ('left' in offset) {\n elem.style[oppositeHorizontalProperty] = '';\n elem.style[horizontalProperty] = `${presetH}px`;\n }\n if ('top' in offset) {\n elem.style[oppositeVerticalProperty] = '';\n elem.style[verticalProperty] = `${presetV}px`;\n }\n // force relayout\n forceRelayout(elem);\n const old = getOffset(elem);\n const originalStyle = {};\n for (const key in offset) {\n if (offset.hasOwnProperty(key)) {\n const dir = getOffsetDirection(key, option);\n const preset = key === 'left' ? presetH : presetV;\n const off = originalOffset[key] - old[key];\n if (dir === key) {\n originalStyle[dir] = preset + off;\n } else {\n originalStyle[dir] = preset - off;\n }\n }\n }\n css(elem, originalStyle);\n // force relayout\n forceRelayout(elem);\n if ('left' in offset || 'top' in offset) {\n setTransitionProperty(elem, originalTransition);\n }\n const ret = {};\n for (const key in offset) {\n if (offset.hasOwnProperty(key)) {\n const dir = getOffsetDirection(key, option);\n const off = offset[key] - originalOffset[key];\n if (key === dir) {\n ret[dir] = originalStyle[dir] + off;\n } else {\n ret[dir] = originalStyle[dir] - off;\n }\n }\n }\n css(elem, ret);\n}\n\nfunction setTransform(elem, offset) {\n const originalOffset = getOffset(elem);\n const originalXY = getTransformXY(elem);\n const resultXY = { x: originalXY.x, y: originalXY.y };\n if ('left' in offset) {\n resultXY.x = originalXY.x + offset.left - originalOffset.left;\n }\n if ('top' in offset) {\n resultXY.y = originalXY.y + offset.top - originalOffset.top;\n }\n setTransformXY(elem, resultXY);\n}\n\nfunction setOffset(elem, offset, option) {\n if (option.ignoreShake) {\n const oriOffset = getOffset(elem);\n\n const oLeft = oriOffset.left.toFixed(0);\n const oTop = oriOffset.top.toFixed(0);\n const tLeft = offset.left.toFixed(0);\n const tTop = offset.top.toFixed(0);\n\n if (oLeft === tLeft && oTop === tTop) {\n return;\n }\n }\n\n if (option.useCssRight || option.useCssBottom) {\n setLeftTop(elem, offset, option);\n } else if (\n option.useCssTransform &&\n getTransformName() in document.body.style\n ) {\n setTransform(elem, offset, option);\n } else {\n setLeftTop(elem, offset, option);\n }\n}\n\nfunction each(arr, fn) {\n for (let i = 0; i < arr.length; i++) {\n fn(arr[i]);\n }\n}\n\nfunction isBorderBoxFn(elem) {\n return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nconst BOX_MODELS = ['margin', 'border', 'padding'];\nconst CONTENT_INDEX = -1;\nconst PADDING_INDEX = 2;\nconst BORDER_INDEX = 1;\nconst MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n const old = {};\n const style = elem.style;\n let name;\n\n // Remember the old values, and insert the new ones\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n old[name] = style[name];\n style[name] = options[name];\n }\n }\n\n callback.call(elem);\n\n // Revert the old values\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n style[name] = old[name];\n }\n }\n}\n\nfunction getPBMWidth(elem, props, which) {\n let value = 0;\n let prop;\n let j;\n let i;\n for (j = 0; j < props.length; j++) {\n prop = props[j];\n if (prop) {\n for (i = 0; i < which.length; i++) {\n let cssProp;\n if (prop === 'border') {\n cssProp = `${prop}${which[i]}Width`;\n } else {\n cssProp = prop + which[i];\n }\n value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n }\n }\n }\n return value;\n}\n\nconst domUtils = {\n getParent(element) {\n let parent = element;\n do {\n if (parent.nodeType === 11 && parent.host) {\n parent = parent.host;\n } else {\n parent = parent.parentNode;\n }\n } while (parent && parent.nodeType !== 1 && parent.nodeType !== 9);\n return parent;\n },\n};\n\neach(['Width', 'Height'], name => {\n domUtils[`doc${name}`] = refWin => {\n const d = refWin.document;\n return Math.max(\n // firefox chrome documentElement.scrollHeight< body.scrollHeight\n // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n d.documentElement[`scroll${name}`],\n // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n d.body[`scroll${name}`],\n domUtils[`viewport${name}`](d),\n );\n };\n\n domUtils[`viewport${name}`] = win => {\n // pc browser includes scrollbar in window.innerWidth\n const prop = `client${name}`;\n const doc = win.document;\n const body = doc.body;\n const documentElement = doc.documentElement;\n const documentElementProp = documentElement[prop];\n // 标准模式取 documentElement\n // backcompat 取 body\n return (\n (doc.compatMode === 'CSS1Compat' && documentElementProp) ||\n (body && body[prop]) ||\n documentElementProp\n );\n };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra] 'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, ex) {\n let extra = ex;\n if (isWindow(elem)) {\n return name === 'width'\n ? domUtils.viewportWidth(elem)\n : domUtils.viewportHeight(elem);\n } else if (elem.nodeType === 9) {\n return name === 'width'\n ? domUtils.docWidth(elem)\n : domUtils.docHeight(elem);\n }\n const which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n let borderBoxValue =\n name === 'width'\n ? elem.getBoundingClientRect().width\n : elem.getBoundingClientRect().height;\n const computedStyle = getComputedStyleX(elem);\n const isBorderBox = isBorderBoxFn(elem, computedStyle);\n let cssBoxValue = 0;\n if (\n borderBoxValue === null ||\n borderBoxValue === undefined ||\n borderBoxValue <= 0\n ) {\n borderBoxValue = undefined;\n // Fall back to computed then un computed css if necessary\n cssBoxValue = getComputedStyleX(elem, name);\n if (\n cssBoxValue === null ||\n cssBoxValue === undefined ||\n Number(cssBoxValue) < 0\n ) {\n cssBoxValue = elem.style[name] || 0;\n }\n // Normalize '', auto, and prepare for extra\n cssBoxValue = parseFloat(cssBoxValue) || 0;\n }\n if (extra === undefined) {\n extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n }\n const borderBoxValueOrIsBorderBox =\n borderBoxValue !== undefined || isBorderBox;\n const val = borderBoxValue || cssBoxValue;\n if (extra === CONTENT_INDEX) {\n if (borderBoxValueOrIsBorderBox) {\n return (\n val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle)\n );\n }\n return cssBoxValue;\n } else if (borderBoxValueOrIsBorderBox) {\n if (extra === BORDER_INDEX) {\n return val;\n }\n return (\n val +\n (extra === PADDING_INDEX\n ? -getPBMWidth(elem, ['border'], which, computedStyle)\n : getPBMWidth(elem, ['margin'], which, computedStyle))\n );\n }\n return (\n cssBoxValue +\n getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle)\n );\n}\n\nconst cssShow = {\n position: 'absolute',\n visibility: 'hidden',\n display: 'block',\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(...args) {\n let val;\n const elem = args[0];\n // in case elem is window\n // elem.offsetWidth === undefined\n if (elem.offsetWidth !== 0) {\n val = getWH.apply(undefined, args);\n } else {\n swap(elem, cssShow, () => {\n val = getWH.apply(undefined, args);\n });\n }\n return val;\n}\n\neach(['width', 'height'], name => {\n const first = name.charAt(0).toUpperCase() + name.slice(1);\n domUtils[`outer${first}`] = (el, includeMargin) => {\n return (\n el &&\n getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX)\n );\n };\n const which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n domUtils[name] = (elem, v) => {\n let val = v;\n if (val !== undefined) {\n if (elem) {\n const computedStyle = getComputedStyleX(elem);\n const isBorderBox = isBorderBoxFn(elem);\n if (isBorderBox) {\n val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n }\n return css(elem, name, val);\n }\n return undefined;\n }\n return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n };\n});\n\nfunction mix(to, from) {\n for (const i in from) {\n if (from.hasOwnProperty(i)) {\n to[i] = from[i];\n }\n }\n return to;\n}\n\nconst utils = {\n getWindow(node) {\n if (node && node.document && node.setTimeout) {\n return node;\n }\n const doc = node.ownerDocument || node;\n return doc.defaultView || doc.parentWindow;\n },\n getDocument,\n offset(el, value, option) {\n if (typeof value !== 'undefined') {\n setOffset(el, value, option || {});\n } else {\n return getOffset(el);\n }\n },\n isWindow,\n each,\n css,\n clone(obj) {\n let i;\n const ret = {};\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret[i] = obj[i];\n }\n }\n const overflow = obj.overflow;\n if (overflow) {\n for (i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret.overflow[i] = obj.overflow[i];\n }\n }\n }\n return ret;\n },\n mix,\n getWindowScrollLeft(w) {\n return getScrollLeft(w);\n },\n getWindowScrollTop(w) {\n return getScrollTop(w);\n },\n merge(...args) {\n const ret = {};\n for (let i = 0; i < args.length; i++) {\n utils.mix(ret, args[i]);\n }\n return ret;\n },\n viewportWidth: 0,\n viewportHeight: 0,\n};\n\nmix(utils, domUtils);\n\nexport default utils;\n","/*\n Adapted from https://github.com/mapbox/lineclip to work with flat arrays\n and 3d positions\n\n ISC License\n\n Copyright (c) 2015, Mapbox\n\n Permission to use, copy, modify, and/or distribute this software for any purpose\n with or without fee is hereby granted, provided that the above copyright notice\n and this permission notice appear in all copies.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n THIS SOFTWARE.\n\n */\n\n/* eslint-disable max-statements, max-depth */\n\nimport {push, copy, getPointAtIndex} from './utils';\n\n// Cohen-Sutherland line clipping algorithm, adapted to efficiently\n// handle polylines rather than just segments\nexport function clipPolyline(positions, bbox, options = {}) {\n const {size = 2, startIndex = 0, endIndex = positions.length} = options;\n const numPoints = (endIndex - startIndex) / size;\n const result = [];\n let part = [];\n let a;\n let b;\n let codeA = -1;\n let codeB;\n let lastCode;\n\n for (let i = 1; i < numPoints; i++) {\n a = getPointAtIndex(positions, i - 1, size, startIndex, a);\n b = getPointAtIndex(positions, i, size, startIndex, b);\n if (codeA < 0) {\n codeA = bitCode(a, bbox);\n }\n codeB = lastCode = bitCode(b, bbox);\n\n // eslint-disable-next-line no-constant-condition\n while (true) {\n if (!(codeA | codeB)) {\n // accept\n push(part, a);\n\n if (codeB !== lastCode) {\n // segment went outside\n push(part, b);\n\n if (i < numPoints - 1) {\n // start a new line\n result.push(part);\n part = [];\n }\n } else if (i === numPoints - 1) {\n push(part, b);\n }\n break;\n } else if (codeA & codeB) {\n // trivial reject\n break;\n } else if (codeA) {\n // a outside, intersect with clip edge\n intersect(a, b, codeA, bbox, a);\n codeA = bitCode(a, bbox);\n } else {\n // b outside\n intersect(a, b, codeB, bbox, b);\n codeB = bitCode(b, bbox);\n }\n }\n\n codeA = lastCode;\n }\n\n if (part.length) result.push(part);\n\n return result;\n}\n\n// Sutherland-Hodgeman polygon clipping algorithm\n// polygon must be closed (first vertex == last vertex)\nexport function clipPolygon(positions, bbox, options = {}) {\n const {size = 2, endIndex = positions.length} = options;\n let {startIndex = 0} = options;\n let numPoints = (endIndex - startIndex) / size;\n let result;\n let p;\n let prev;\n let inside;\n let prevInside;\n\n // clip against each side of the clip rectangle\n for (let edge = 1; edge <= 8; edge *= 2) {\n result = [];\n prev = getPointAtIndex(positions, numPoints - 1, size, startIndex, prev);\n prevInside = !(bitCode(prev, bbox) & edge);\n\n for (let i = 0; i < numPoints; i++) {\n p = getPointAtIndex(positions, i, size, startIndex, p);\n inside = !(bitCode(p, bbox) & edge);\n\n // if segment goes through the clip window, add an intersection\n if (inside !== prevInside) push(result, intersect(prev, p, edge, bbox));\n\n if (inside) push(result, p); // add a point if it's inside\n\n copy(prev, p);\n prevInside = inside;\n }\n\n // close loop\n positions = result;\n startIndex = 0;\n numPoints = result.length / size;\n\n if (!numPoints) break;\n }\n\n return result;\n}\n\n// intersect a segment against one of the 4 lines that make up the bbox\n\nexport function intersect(a, b, edge, bbox, out = []) {\n let t;\n // Forces out[snapI] to be on the bbox edge\n // Interpolation introduces precision issue which may cause lineclip to be\n // stuck in an infinite loop\n let snap;\n if (edge & 8) {\n // top\n t = (bbox[3] - a[1]) / (b[1] - a[1]);\n snap = 3;\n } else if (edge & 4) {\n // bottom\n t = (bbox[1] - a[1]) / (b[1] - a[1]);\n snap = 1;\n } else if (edge & 2) {\n // right\n t = (bbox[2] - a[0]) / (b[0] - a[0]);\n snap = 2;\n } else if (edge & 1) {\n // left\n t = (bbox[0] - a[0]) / (b[0] - a[0]);\n snap = 0;\n } else {\n return null;\n }\n for (let i = 0; i < a.length; i++) {\n out[i] = (snap & 1) === i ? bbox[snap] : t * (b[i] - a[i]) + a[i];\n }\n return out;\n}\n\n// bit code reflects the point position relative to the bbox:\n\n// left mid right\n// top 1001 1000 1010\n// mid 0001 0000 0010\n// bottom 0101 0100 0110\n\nexport function bitCode(p, bbox) {\n let code = 0;\n\n if (p[0] < bbox[0]) code |= 1;\n // left\n else if (p[0] > bbox[2]) code |= 2; // right\n\n if (p[1] < bbox[1]) code |= 4;\n // bottom\n else if (p[1] > bbox[3]) code |= 8; // top\n\n return code;\n}\n","/* eslint-disable max-statements, max-depth, complexity, no-unused-expressions */\nimport {bitCode, intersect} from './lineclip';\nimport {getPointAtIndex, copy, push} from './utils';\n\nexport function cutPolylineByGrid(positions, options = {}) {\n const {\n size = 2,\n broken = false,\n gridResolution = 10,\n gridOffset = [0, 0],\n startIndex = 0,\n endIndex = positions.length\n } = options;\n const numPoints = (endIndex - startIndex) / size;\n let part = [];\n const result = [part];\n const a = getPointAtIndex(positions, 0, size, startIndex);\n let b;\n let codeB;\n const cell = getGridCell(a, gridResolution, gridOffset, []);\n const scratchPoint = [];\n push(part, a);\n\n for (let i = 1; i < numPoints; i++) {\n b = getPointAtIndex(positions, i, size, startIndex, b);\n codeB = bitCode(b, cell);\n\n while (codeB) {\n // find the intersection with the current cell\n intersect(a, b, codeB, cell, scratchPoint);\n const codeAlt = bitCode(scratchPoint, cell);\n if (codeAlt) {\n intersect(a, scratchPoint, codeAlt, cell, scratchPoint);\n codeB = codeAlt;\n }\n push(part, scratchPoint);\n // move to the next cell\n copy(a, scratchPoint);\n\n moveToNeighborCell(cell, gridResolution, codeB);\n if (broken && part.length > size) {\n part = [];\n result.push(part);\n push(part, a);\n }\n\n codeB = bitCode(b, cell);\n }\n\n push(part, b);\n copy(a, b);\n }\n\n return broken ? result : result[0];\n}\n\nconst TYPE_INSIDE = 0;\nconst TYPE_BORDER = 1;\n\nfunction concatInPlace(arr1, arr2) {\n for (let i = 0; i < arr2.length; i++) {\n arr1.push(arr2[i]);\n }\n return arr1;\n}\n\nexport function cutPolygonByGrid(positions, holeIndices, options = {}) {\n if (!positions.length) {\n // input is empty\n return [];\n }\n const {size = 2, gridResolution = 10, gridOffset = [0, 0], edgeTypes = false} = options;\n const result = [];\n const queue = [\n {\n pos: positions,\n types: edgeTypes && new Array(positions.length / size).fill(TYPE_BORDER),\n holes: holeIndices || []\n }\n ];\n const bbox = [[], []];\n let cell = [];\n\n // Recursively bisect polygon until every part fit in a single grid cell\n while (queue.length) {\n const {pos, types, holes} = queue.shift();\n\n // Get the bounding box of the outer polygon\n getBoundingBox(pos, size, holes[0] || pos.length, bbox);\n cell = getGridCell(bbox[0], gridResolution, gridOffset, cell);\n const code = bitCode(bbox[1], cell);\n\n if (code) {\n // Split the outer ring at the boundary\n let parts = bisectPolygon(pos, types, size, 0, holes[0] || pos.length, cell, code);\n const polygonLow = {pos: parts[0].pos, types: parts[0].types, holes: []};\n const polygonHigh = {pos: parts[1].pos, types: parts[1].types, holes: []};\n queue.push(polygonLow, polygonHigh);\n\n // Split each hole at the boundary\n for (let i = 0; i < holes.length; i++) {\n parts = bisectPolygon(pos, types, size, holes[i], holes[i + 1] || pos.length, cell, code);\n\n if (parts[0]) {\n polygonLow.holes.push(polygonLow.pos.length);\n polygonLow.pos = concatInPlace(polygonLow.pos, parts[0].pos);\n if (edgeTypes) {\n polygonLow.types = concatInPlace(polygonLow.types, parts[0].types);\n }\n }\n if (parts[1]) {\n polygonHigh.holes.push(polygonHigh.pos.length);\n polygonHigh.pos = concatInPlace(polygonHigh.pos, parts[1].pos);\n if (edgeTypes) {\n polygonHigh.types = concatInPlace(polygonHigh.types, parts[1].types);\n }\n }\n }\n } else {\n // Polygon fits in a single cell, no more processing required\n const polygon = {positions: pos};\n if (edgeTypes) {\n polygon.edgeTypes = types;\n }\n if (holes.length) {\n polygon.holeIndices = holes;\n }\n\n result.push(polygon);\n }\n }\n return result;\n}\n\n// edgeTypes:\n// TYPE_BORDER - edge from the original polygon\n// TYPE_INSIDE - inside the original polygon\n// eslint-disable-next-line max-params\nfunction bisectPolygon(positions, edgeTypes, size, startIndex, endIndex, bbox, edge) {\n const numPoints = (endIndex - startIndex) / size;\n const resultLow = [];\n const resultHigh = [];\n const typesLow = [];\n const typesHigh = [];\n const scratchPoint = [];\n\n let p;\n let side;\n let type;\n const prev = getPointAtIndex(positions, numPoints - 1, size, startIndex);\n let prevSide = Math.sign(edge & 8 ? prev[1] - bbox[3] : prev[0] - bbox[2]);\n let prevType = edgeTypes && edgeTypes[numPoints - 1];\n let lowPointCount = 0;\n let highPointCount = 0;\n\n for (let i = 0; i < numPoints; i++) {\n p = getPointAtIndex(positions, i, size, startIndex, p);\n side = Math.sign(edge & 8 ? p[1] - bbox[3] : p[0] - bbox[2]);\n type = edgeTypes && edgeTypes[startIndex / size + i];\n\n // if segment goes through the boundary, add an intersection\n if (side && prevSide && prevSide !== side) {\n intersect(prev, p, edge, bbox, scratchPoint);\n push(resultLow, scratchPoint) && typesLow.push(prevType);\n push(resultHigh, scratchPoint) && typesHigh.push(prevType);\n }\n\n if (side <= 0) {\n push(resultLow, p) && typesLow.push(type);\n lowPointCount -= side;\n } else if (typesLow.length) {\n typesLow[typesLow.length - 1] = TYPE_INSIDE;\n }\n if (side >= 0) {\n push(resultHigh, p) && typesHigh.push(type);\n highPointCount += side;\n } else if (typesHigh.length) {\n typesHigh[typesHigh.length - 1] = TYPE_INSIDE;\n }\n\n copy(prev, p);\n prevSide = side;\n prevType = type;\n }\n\n return [\n lowPointCount ? {pos: resultLow, types: edgeTypes && typesLow} : null,\n highPointCount ? {pos: resultHigh, types: edgeTypes && typesHigh} : null\n ];\n}\n\nfunction getGridCell(p, gridResolution, gridOffset, out) {\n const left = Math.floor((p[0] - gridOffset[0]) / gridResolution) * gridResolution + gridOffset[0];\n const bottom =\n Math.floor((p[1] - gridOffset[1]) / gridResolution) * gridResolution + gridOffset[1];\n out[0] = left;\n out[1] = bottom;\n out[2] = left + gridResolution;\n out[3] = bottom + gridResolution;\n return out;\n}\n\nfunction moveToNeighborCell(cell, gridResolution, edge) {\n if (edge & 8) {\n // top\n cell[1] += gridResolution;\n cell[3] += gridResolution;\n } else if (edge & 4) {\n // bottom\n cell[1] -= gridResolution;\n cell[3] -= gridResolution;\n } else if (edge & 2) {\n // right\n cell[0] += gridResolution;\n cell[2] += gridResolution;\n } else if (edge & 1) {\n // left\n cell[0] -= gridResolution;\n cell[2] -= gridResolution;\n }\n}\n\nfunction getBoundingBox(positions, size, endIndex, out) {\n let minX = Infinity;\n let maxX = -Infinity;\n let minY = Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < endIndex; i += size) {\n const x = positions[i];\n const y = positions[i + 1];\n minX = x < minX ? x : minX;\n maxX = x > maxX ? x : maxX;\n minY = y < minY ? y : minY;\n maxY = y > maxY ? y : maxY;\n }\n\n out[0][0] = minX;\n out[0][1] = minY;\n out[1][0] = maxX;\n out[1][1] = maxY;\n return out;\n}\n","import {cutPolylineByGrid, cutPolygonByGrid} from './cut-by-grid';\nimport {getPointAtIndex, push} from './utils';\n\n// https://en.wikipedia.org/wiki/Web_Mercator_projection\nconst DEFAULT_MAX_LATITUDE = 85.051129;\n\n// https://user-images.githubusercontent.com/2059298/78465769-938b7a00-76ae-11ea-9b95-1f4c26425ab9.png\nexport function cutPolylineByMercatorBounds(positions, options = {}) {\n const {size = 2, startIndex = 0, endIndex = positions.length, normalize = true} = options;\n\n // Remap longitudes so that each segment takes the shorter path\n const newPositions = positions.slice(startIndex, endIndex);\n wrapLongitudesForShortestPath(newPositions, size, 0, endIndex - startIndex);\n\n const parts = cutPolylineByGrid(newPositions, {\n size,\n broken: true,\n gridResolution: 360,\n gridOffset: [-180, -180]\n });\n\n if (normalize) {\n // Each part is guaranteed to be in a single copy of the world\n // Map longitudes back to [-180, 180]\n for (const part of parts) {\n shiftLongitudesIntoRange(part, size);\n }\n }\n return parts;\n}\n\n// https://user-images.githubusercontent.com/2059298/78465770-94241080-76ae-11ea-809a-6a8534dac1d9.png\nexport function cutPolygonByMercatorBounds(positions, holeIndices, options = {}) {\n const {size = 2, normalize = true, edgeTypes = false} = options;\n holeIndices = holeIndices || [];\n const newPositions = [];\n const newHoleIndices = [];\n let srcStartIndex = 0;\n let targetIndex = 0;\n\n for (let ringIndex = 0; ringIndex <= holeIndices.length; ringIndex++) {\n // srcStartIndex/srcEndIndex define the ring in the original positions\n const srcEndIndex = holeIndices[ringIndex] || positions.length;\n // targetStartIndex/targetIndex define the ring in newPositions\n const targetStartIndex = targetIndex;\n\n // In case the ring contains a pole (e.g. Antarctica), we'll have to insert vertices\n // The insertion point is defined by the vertex closest to the pole\n // Split the the ring by the insertion point when copying to newPositions\n const splitIndex = findSplitIndex(positions, size, srcStartIndex, srcEndIndex);\n for (let i = splitIndex; i < srcEndIndex; i++) {\n newPositions[targetIndex++] = positions[i];\n }\n for (let i = srcStartIndex; i < splitIndex; i++) {\n newPositions[targetIndex++] = positions[i];\n }\n\n // Remap longitudes so that each segment takes the shorter path\n wrapLongitudesForShortestPath(newPositions, size, targetStartIndex, targetIndex);\n\n // Handle the case when the ring contains a pole\n insertPoleVertices(newPositions, size, targetStartIndex, targetIndex, options.maxLatitude);\n\n srcStartIndex = srcEndIndex;\n newHoleIndices[ringIndex] = targetIndex;\n }\n newHoleIndices.pop();\n\n const parts = cutPolygonByGrid(newPositions, newHoleIndices, {\n size,\n gridResolution: 360,\n gridOffset: [-180, -180],\n edgeTypes\n });\n\n if (normalize) {\n // Each part is guaranteed to be in a single copy of the world\n // Map longitudes back to [-180, 180]\n for (const part of parts) {\n shiftLongitudesIntoRange(part.positions, size);\n }\n }\n return parts;\n}\n\n/* Helpers */\n\n// See comments for insertPoleVertices\nfunction findSplitIndex(positions, size, startIndex, endIndex) {\n let maxLat = -1;\n let pointIndex = -1;\n for (let i = startIndex + 1; i < endIndex; i += size) {\n const lat = Math.abs(positions[i]);\n if (lat > maxLat) {\n maxLat = lat;\n pointIndex = i - 1;\n }\n }\n return pointIndex;\n}\n\n// https://user-images.githubusercontent.com/2059298/78857483-5987e400-79de-11ea-98fc-0631287a8431.png\n//\n// If the polygon contains a pole, to tesselate it correctly, we need to insert the edge\n// of map into the polygon. This requires adding two vertices that represent the pole, by\n// drawing a perpendicular line to the Mercator map edge from a selected vertex on the ring.\n//\n// We select the insertion position carefully so that the inserted line segments do not\n// intersect with the ring itself. This is ensured by findSplitIndex, which returns the\n// vertex closest to the pole.\nfunction insertPoleVertices(\n positions,\n size,\n startIndex,\n endIndex,\n maxLatitude = DEFAULT_MAX_LATITUDE\n) {\n // Check if the ring contains a pole\n const firstLng = positions[startIndex];\n const lastLng = positions[endIndex - size];\n if (Math.abs(firstLng - lastLng) > 180) {\n // The ring does not make a round trip\n // Add the nearest pole to the vertices so that the polygon tesselates correctly\n const p = getPointAtIndex(positions, 0, size, startIndex);\n // Copy the first vertex to the world of the last vertex\n p[0] += Math.round((lastLng - firstLng) / 360) * 360;\n push(positions, p);\n // Project the copied vertex to the edge of the map\n p[1] = Math.sign(p[1]) * maxLatitude;\n push(positions, p);\n // Project the first vertex to the edge of the map\n p[0] = firstLng;\n push(positions, p);\n }\n}\n\nfunction wrapLongitudesForShortestPath(positions, size, startIndex, endIndex) {\n let prevLng = positions[0];\n let lng;\n for (let i = startIndex; i < endIndex; i += size) {\n lng = positions[i];\n const delta = lng - prevLng;\n if (delta > 180 || delta < -180) {\n lng -= Math.round(delta / 360) * 360;\n }\n positions[i] = prevLng = lng;\n }\n}\n\nfunction shiftLongitudesIntoRange(positions, size) {\n let refLng;\n const pointCount = positions.length / size;\n\n // Find a longitude that is not on the edge of a world\n // Which we will use to determine which world copy it is\n for (let i = 0; i < pointCount; i++) {\n refLng = positions[i * size];\n if ((refLng + 180) % 360 !== 0) {\n break;\n }\n }\n\n const delta = -Math.round(refLng / 360) * 360;\n if (delta === 0) {\n return;\n }\n for (let i = 0; i < pointCount; i++) {\n positions[i * size] += delta;\n }\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import setPrototypeOf from \"./setPrototypeOf\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct\";\nexport default 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\n return _construct.apply(null, arguments);\n}","import {isWebGL2, assertWebGLContext} from '@luma.gl/gltools';\nimport {lumaStats} from '../init';\nimport {getKey, getKeyValue} from '../webgl-utils/constants-to-keys';\nimport {assert} from '../utils/assert';\nimport {uid} from '../utils/utils';\nimport {stubRemovedMethods} from '../utils/stub-methods';\n\nconst ERR_RESOURCE_METHOD_UNDEFINED = 'Resource subclass must define virtual methods';\n\n// TODO - Handle context loss\n// function glGetContextLossCount(gl) {\n// return (gl.luma && gl.luma.glCount) || 0;\n// }\n\nexport default class Resource {\n constructor(gl, opts = {}) {\n assertWebGLContext(gl);\n\n const {id, userData = {}} = opts;\n this.gl = gl;\n // @ts-ignore\n this.gl2 = gl;\n // this.ext = polyfillContext(gl);\n this.id = id || uid(this.constructor.name);\n this.userData = userData;\n this._bound = false;\n\n // Set the handle\n // If handle was provided, use it, otherwise create a new handle\n\n // TODO - Stores the handle with context loss information\n // this.glCount = glGetContextLossCount(this.gl);\n\n // Default VertexArray needs to be created with null handle, so compare against undefined\n this._handle = opts.handle;\n if (this._handle === undefined) {\n this._handle = this._createHandle();\n }\n\n // Only meaningful for resources that allocate GPU memory\n this.byteLength = 0;\n\n this._addStats();\n }\n\n toString() {\n return `${this.constructor.name}(${this.id})`;\n }\n\n get handle() {\n // TODO - Add context loss handling\n // Will regenerate and reinitialize the handle if necessary\n // const glCount = glGetContextLossCount(this.gl);\n // if (this.glCount !== glCount) {\n // this._handle = this._createHandle(this.opts);\n // this._glCount = glCount;\n // // Reinitialize object\n // this.initialize(this.opts);\n // }\n return this._handle;\n }\n\n delete({deleteChildren = false} = {}) {\n // Delete this object, and get refs to any children\n // @ts-ignore\n const children = this._handle && this._deleteHandle(this._handle);\n if (this._handle) {\n this._removeStats();\n }\n this._handle = null;\n\n // Optionally, recursively delete the children\n // @ts-ignore\n if (children && deleteChildren) {\n // @ts-ignore\n children.filter(Boolean).forEach(child => child.delete());\n }\n\n return this;\n }\n\n bind(funcOrHandle = this.handle) {\n if (typeof funcOrHandle !== 'function') {\n this._bindHandle(funcOrHandle);\n return this;\n }\n\n let value;\n\n if (!this._bound) {\n this._bindHandle(this.handle);\n this._bound = true;\n\n value = funcOrHandle();\n\n this._bound = false;\n this._bindHandle(null);\n } else {\n value = funcOrHandle();\n }\n\n return value;\n }\n\n unbind() {\n this.bind(null);\n }\n\n /**\n * Query a Resource parameter\n *\n * @param {GLenum} pname\n * @return {GLint|GLfloat|GLenum} param\n */\n getParameter(pname, opts = {}) {\n pname = getKeyValue(this.gl, pname);\n assert(pname);\n\n // @ts-ignore\n const parameters = this.constructor.PARAMETERS || {};\n\n // Use parameter definitions to handle unsupported parameters\n const parameter = parameters[pname];\n if (parameter) {\n const isWebgl2 = isWebGL2(this.gl);\n\n // Check if we can query for this parameter\n const parameterAvailable =\n (!('webgl2' in parameter) || isWebgl2) &&\n (!('extension' in parameter) || this.gl.getExtension(parameter.extension));\n\n if (!parameterAvailable) {\n const webgl1Default = parameter.webgl1;\n const webgl2Default = 'webgl2' in parameter ? parameter.webgl2 : parameter.webgl1;\n const defaultValue = isWebgl2 ? webgl2Default : webgl1Default;\n return defaultValue;\n }\n }\n\n // If unknown parameter - Could be a valid parameter not covered by PARAMS\n // Attempt to query for it and let WebGL report errors\n return this._getParameter(pname, opts);\n }\n\n // Many resources support a getParameter call -\n // getParameters will get all parameters - slow but useful for debugging\n // eslint-disable-next-line complexity\n getParameters(options = {}) {\n const {parameters, keys} = options;\n\n // Get parameter definitions for this Resource\n // @ts-ignore\n const PARAMETERS = this.constructor.PARAMETERS || {};\n\n const isWebgl2 = isWebGL2(this.gl);\n\n const values = {};\n\n // Query all parameters if no list provided\n const parameterKeys = parameters || Object.keys(PARAMETERS);\n\n // WEBGL limits\n for (const pname of parameterKeys) {\n const parameter = PARAMETERS[pname];\n\n // Check if this parameter is available on this platform\n const parameterAvailable =\n parameter &&\n (!('webgl2' in parameter) || isWebgl2) &&\n (!('extension' in parameter) || this.gl.getExtension(parameter.extension));\n\n if (parameterAvailable) {\n const key = keys ? getKey(this.gl, pname) : pname;\n values[key] = this.getParameter(pname, options);\n if (keys && parameter.type === 'GLenum') {\n values[key] = getKey(this.gl, values[key]);\n }\n }\n }\n\n return values;\n }\n\n /**\n * Update a Resource setting\n *\n * @todo - cache parameter to avoid issuing WebGL calls?\n *\n * @param {string} pname - parameter (GL constant, value or key)\n * @param {GLint|GLfloat|GLenum} value\n * @return {Resource} returns self to enable chaining\n */\n setParameter(pname, value) {\n pname = getKeyValue(this.gl, pname);\n assert(pname);\n\n // @ts-ignore\n const parameters = this.constructor.PARAMETERS || {};\n\n const parameter = parameters[pname];\n if (parameter) {\n const isWebgl2 = isWebGL2(this.gl);\n\n // Check if this parameter is available on this platform\n const parameterAvailable =\n (!('webgl2' in parameter) || isWebgl2) &&\n (!('extension' in parameter) || this.gl.getExtension(parameter.extension));\n\n if (!parameterAvailable) {\n throw new Error('Parameter not available on this platform');\n }\n\n // Handle string keys\n if (parameter.type === 'GLenum') {\n value = getKeyValue(value);\n }\n }\n\n // If unknown parameter - Could be a valid parameter not covered by PARAMS\n // attempt to set it and let WebGL report errors\n this._setParameter(pname, value);\n return this;\n }\n\n /*\n * Batch update resource parameters\n * Assumes the subclass supports a setParameter call\n */\n setParameters(parameters) {\n for (const pname in parameters) {\n this.setParameter(pname, parameters[pname]);\n }\n return this;\n }\n\n // Install stubs for removed methods\n stubRemovedMethods(className, version, methodNames) {\n return stubRemovedMethods(this, className, version, methodNames);\n }\n\n // PUBLIC VIRTUAL METHODS\n initialize(opts) {}\n\n // PROTECTED METHODS - These must be overridden by subclass\n _createHandle() {\n throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);\n }\n\n _deleteHandle() {\n throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);\n }\n\n _bindHandle(handle) {\n throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);\n }\n\n _getOptsFromHandle() {\n throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);\n }\n\n /** @returns {number} */\n _getParameter(pname, opts) {\n throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);\n }\n\n _setParameter(pname, value) {\n throw new Error(ERR_RESOURCE_METHOD_UNDEFINED);\n }\n\n // PRIVATE METHODS\n\n _context() {\n this.gl.luma = this.gl.luma || {};\n return this.gl.luma;\n }\n\n _addStats() {\n const name = this.constructor.name;\n const stats = lumaStats.get('Resource Counts');\n\n stats.get('Resources Created').incrementCount();\n stats.get(`${name}s Created`).incrementCount();\n stats.get(`${name}s Active`).incrementCount();\n }\n\n _removeStats() {\n const name = this.constructor.name;\n const stats = lumaStats.get('Resource Counts');\n\n stats.get(`${name}s Active`).decrementCount();\n }\n\n _trackAllocatedMemory(bytes, name = this.constructor.name) {\n const stats = lumaStats.get('Memory Usage');\n\n stats.get('GPU Memory').addCount(bytes);\n stats.get(`${name} Memory`).addCount(bytes);\n this.byteLength = bytes;\n }\n\n _trackDeallocatedMemory(name = this.constructor.name) {\n const stats = lumaStats.get('Memory Usage');\n\n stats.get('GPU Memory').subtractCount(this.byteLength);\n stats.get(`${name} Memory`).subtractCount(this.byteLength);\n this.byteLength = 0;\n }\n}\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _assign = require(\"../core-js/object/assign\");\n\nvar _assign2 = _interopRequireDefault(_assign);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _assign2.default || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};","import * as glMatrix from \"./common.js\";\n/**\r\n * 4 Dimensional Vector\r\n * @module vec4\r\n */\n\n/**\r\n * Creates a new, empty vec4\r\n *\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec4} a vector to clone\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Creates a new vec4 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} a new 4D vector\r\n */\n\nexport function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Copy the values from one vec4 to another\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the source vector\r\n * @returns {vec4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to the given values\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {vec4} out\r\n */\n\nexport function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n}\n/**\r\n * Adds two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n}\n/**\r\n * Multiplies two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n}\n/**\r\n * Divides two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to ceil\r\n * @returns {vec4} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to floor\r\n * @returns {vec4} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {vec4} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n}\n/**\r\n * Math.round the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to round\r\n * @returns {vec4} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n}\n/**\r\n * Scales a vec4 by a scalar number\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec4} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n}\n/**\r\n * Adds two vec4's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec4} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec4's\r\n *\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec4's\r\n *\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Calculates the length of a vec4\r\n *\r\n * @param {ReadonlyVec4} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n}\n/**\r\n * Calculates the squared length of a vec4\r\n *\r\n * @param {ReadonlyVec4} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n}\n/**\r\n * Negates the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to negate\r\n * @returns {vec4} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to invert\r\n * @returns {vec4} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n}\n/**\r\n * Normalize a vec4\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a vector to normalize\r\n * @returns {vec4} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec4's\r\n *\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n}\n/**\r\n * Returns the cross-product of three vectors in a 4-dimensional space\r\n *\r\n * @param {ReadonlyVec4} result the receiving vector\r\n * @param {ReadonlyVec4} U the first vector\r\n * @param {ReadonlyVec4} V the second vector\r\n * @param {ReadonlyVec4} W the third vector\r\n * @returns {vec4} result\r\n */\n\nexport function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0],\n B = v[0] * w[2] - v[2] * w[0],\n C = v[0] * w[3] - v[3] * w[0],\n D = v[1] * w[2] - v[2] * w[1],\n E = v[1] * w[3] - v[3] * w[1],\n F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec4's\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the first operand\r\n * @param {ReadonlyVec4} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec4} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec4} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n\n var v1, v2, v3, v4;\n var s1, s2;\n\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n}\n/**\r\n * Transforms the vec4 with a mat4.\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n}\n/**\r\n * Transforms the vec4 with a quat\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @param {ReadonlyVec4} a the vector to transform\r\n * @param {ReadonlyQuat} q quaternion to transform with\r\n * @returns {vec4} out\r\n */\n\nexport function transformQuat(out, a, q) {\n var x = a[0],\n y = a[1],\n z = a[2];\n var qx = q[0],\n qy = q[1],\n qz = q[2],\n qw = q[3]; // calculate quat * vec\n\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n}\n/**\r\n * Set the components of a vec4 to zero\r\n *\r\n * @param {vec4} out the receiving vector\r\n * @returns {vec4} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec4} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\r\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec4} a The first vector.\r\n * @param {ReadonlyVec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec4} a The first vector.\r\n * @param {ReadonlyVec4} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n}\n/**\r\n * Alias for {@link vec4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec4.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec4.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec4.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec4.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec4.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec4s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 4;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n\n return a;\n };\n}();","function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport log from '../utils/log';\nimport {createMat4, getCameraPosition, getFrustumPlanes} from '../utils/math-utils';\n\nimport {Matrix4, Vector3, equals} from 'math.gl';\nimport * as mat4 from 'gl-matrix/mat4';\n\nimport {\n getDistanceScales,\n getMeterZoom,\n lngLatToWorld,\n worldToLngLat,\n worldToPixels,\n pixelsToWorld\n} from '@math.gl/web-mercator';\n\nimport {PROJECTION_MODE} from '../lib/constants';\n\nconst DEGREES_TO_RADIANS = Math.PI / 180;\n\nconst IDENTITY = createMat4();\n\nconst ZERO_VECTOR = [0, 0, 0];\n\nconst DEFAULT_ZOOM = 0;\n\nconst DEFAULT_DISTANCE_SCALES = {\n unitsPerMeter: [1, 1, 1],\n metersPerUnit: [1, 1, 1]\n};\n\nexport default class Viewport {\n /**\n * @classdesc\n * Manages coordinate system transformations for deck.gl.\n *\n * Note: The Viewport is immutable in the sense that it only has accessors.\n * A new viewport instance should be created if any parameters have changed.\n */\n constructor(opts = {}) {\n const {\n id = null,\n // Window width/height in pixels (for pixel projection)\n x = 0,\n y = 0,\n width = 1,\n height = 1\n } = opts;\n\n this.id = id || this.constructor.displayName || 'viewport';\n\n this.x = x;\n this.y = y;\n // Silently allow apps to send in w,h = 0,0\n this.width = width || 1;\n this.height = height || 1;\n this._frustumPlanes = {};\n\n this._initViewMatrix(opts);\n this._initProjectionMatrix(opts);\n this._initPixelMatrices();\n\n // Bind methods for easy access\n this.equals = this.equals.bind(this);\n this.project = this.project.bind(this);\n this.unproject = this.unproject.bind(this);\n this.projectPosition = this.projectPosition.bind(this);\n this.unprojectPosition = this.unprojectPosition.bind(this);\n this.projectFlat = this.projectFlat.bind(this);\n this.unprojectFlat = this.unprojectFlat.bind(this);\n }\n\n get metersPerPixel() {\n return this.distanceScales.metersPerUnit[2] / this.scale;\n }\n\n get projectionMode() {\n if (this.isGeospatial) {\n return this.zoom < 12\n ? PROJECTION_MODE.WEB_MERCATOR\n : PROJECTION_MODE.WEB_MERCATOR_AUTO_OFFSET;\n }\n return PROJECTION_MODE.IDENTITY;\n }\n\n // Two viewports are equal if width and height are identical, and if\n // their view and projection matrices are (approximately) equal.\n equals(viewport) {\n if (!(viewport instanceof Viewport)) {\n return false;\n }\n if (this === viewport) {\n return true;\n }\n\n return (\n viewport.width === this.width &&\n viewport.height === this.height &&\n viewport.scale === this.scale &&\n equals(viewport.projectionMatrix, this.projectionMatrix) &&\n equals(viewport.viewMatrix, this.viewMatrix)\n );\n // TODO - check distance scales?\n }\n\n /**\n * Projects xyz (possibly latitude and longitude) to pixel coordinates in window\n * using viewport projection parameters\n * - [longitude, latitude] to [x, y]\n * - [longitude, latitude, Z] => [x, y, z]\n * Note: By default, returns top-left coordinates for canvas/SVG type render\n *\n * @param {Array} lngLatZ - [lng, lat] or [lng, lat, Z]\n * @param {Object} opts - options\n * @param {Object} opts.topLeft=true - Whether projected coords are top left\n * @return {Array} - [x, y] or [x, y, z] in top left coords\n */\n project(xyz, {topLeft = true} = {}) {\n const worldPosition = this.projectPosition(xyz);\n const coord = worldToPixels(worldPosition, this.pixelProjectionMatrix);\n\n const [x, y] = coord;\n const y2 = topLeft ? y : this.height - y;\n return xyz.length === 2 ? [x, y2] : [x, y2, coord[2]];\n }\n\n /**\n * Unproject pixel coordinates on screen onto world coordinates,\n * (possibly [lon, lat]) on map.\n * - [x, y] => [lng, lat]\n * - [x, y, z] => [lng, lat, Z]\n * @param {Array} xyz -\n * @param {Object} opts - options\n * @param {Object} opts.topLeft=true - Whether origin is top left\n * @return {Array|null} - [lng, lat, Z] or [X, Y, Z]\n */\n unproject(xyz, {topLeft = true, targetZ} = {}) {\n const [x, y, z] = xyz;\n\n const y2 = topLeft ? y : this.height - y;\n const targetZWorld = targetZ && targetZ * this.distanceScales.unitsPerMeter[2];\n const coord = pixelsToWorld([x, y2, z], this.pixelUnprojectionMatrix, targetZWorld);\n const [X, Y, Z] = this.unprojectPosition(coord);\n\n if (Number.isFinite(z)) {\n return [X, Y, Z];\n }\n return Number.isFinite(targetZ) ? [X, Y, targetZ] : [X, Y];\n }\n\n // NON_LINEAR PROJECTION HOOKS\n // Used for web meractor projection\n\n projectPosition(xyz) {\n const [X, Y] = this.projectFlat(xyz);\n const Z = (xyz[2] || 0) * this.distanceScales.unitsPerMeter[2];\n return [X, Y, Z];\n }\n\n unprojectPosition(xyz) {\n const [X, Y] = this.unprojectFlat(xyz);\n const Z = (xyz[2] || 0) * this.distanceScales.metersPerUnit[2];\n return [X, Y, Z];\n }\n\n /**\n * Project [lng,lat] on sphere onto [x,y] on 512*512 Mercator Zoom 0 tile.\n * Performs the nonlinear part of the web mercator projection.\n * Remaining projection is done with 4x4 matrices which also handles\n * perspective.\n * @param {Array} lngLat - [lng, lat] coordinates\n * Specifies a point on the sphere to project onto the map.\n * @return {Array} [x,y] coordinates.\n */\n projectFlat(xyz) {\n if (this.isGeospatial) {\n return lngLatToWorld(xyz);\n }\n return xyz;\n }\n\n /**\n * Unproject world point [x,y] on map onto {lat, lon} on sphere\n * @param {object|Vector} xy - object with {x,y} members\n * representing point on projected map plane\n * @return {GeoCoordinates} - object with {lat,lon} of point on sphere.\n * Has toArray method if you need a GeoJSON Array.\n * Per cartographic tradition, lat and lon are specified as degrees.\n */\n unprojectFlat(xyz) {\n if (this.isGeospatial) {\n return worldToLngLat(xyz);\n }\n return xyz;\n }\n\n getBounds(options = {}) {\n const unprojectOption = {targetZ: options.z || 0};\n\n const topLeft = this.unproject([0, 0], unprojectOption);\n const topRight = this.unproject([this.width, 0], unprojectOption);\n const bottomLeft = this.unproject([0, this.height], unprojectOption);\n const bottomRight = this.unproject([this.width, this.height], unprojectOption);\n\n return [\n Math.min(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]),\n Math.min(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1]),\n Math.max(topLeft[0], topRight[0], bottomLeft[0], bottomRight[0]),\n Math.max(topLeft[1], topRight[1], bottomLeft[1], bottomRight[1])\n ];\n }\n\n getDistanceScales(coordinateOrigin = null) {\n if (coordinateOrigin) {\n return getDistanceScales({\n longitude: coordinateOrigin[0],\n latitude: coordinateOrigin[1],\n highPrecision: true\n });\n }\n return this.distanceScales;\n }\n\n containsPixel({x, y, width = 1, height = 1}) {\n return (\n x < this.x + this.width &&\n this.x < x + width &&\n y < this.y + this.height &&\n this.y < y + height\n );\n }\n\n // Extract frustum planes in common space\n getFrustumPlanes() {\n if (this._frustumPlanes.near) {\n return this._frustumPlanes;\n }\n\n Object.assign(this._frustumPlanes, getFrustumPlanes(this.viewProjectionMatrix));\n\n return this._frustumPlanes;\n }\n\n // EXPERIMENTAL METHODS\n\n /**\n * Needed by panning and linear transition\n * Pan the viewport to place a given world coordinate at screen point [x, y]\n *\n * @param {Array} coords - world coordinates\n * @param {Array} pixel - [x,y] coordinates on screen\n * @return {Object} props of the new viewport\n */\n panByPosition(coords, pixel) {\n return null;\n }\n\n getCameraPosition() {\n return this.cameraPosition;\n }\n\n getCameraDirection() {\n return this.cameraDirection;\n }\n\n getCameraUp() {\n return this.cameraUp;\n }\n\n // INTERNAL METHODS\n\n _createProjectionMatrix({orthographic, fovyRadians, aspect, focalDistance, near, far}) {\n return orthographic\n ? new Matrix4().orthographic({fovy: fovyRadians, aspect, focalDistance, near, far})\n : new Matrix4().perspective({fovy: fovyRadians, aspect, near, far});\n }\n\n /* eslint-disable complexity, max-statements */\n _initViewMatrix(opts) {\n const {\n // view matrix\n viewMatrix = IDENTITY,\n\n longitude = null, // Anchor: lng lat zoom makes viewport work w/ geospatial coordinate systems\n latitude = null,\n zoom = null,\n\n position = null, // Anchor position offset (in meters for geospatial viewports)\n modelMatrix = null, // A model matrix to be applied to position, to match the layer props API\n focalDistance = 1, // Only needed for orthographic views\n\n distanceScales = null\n } = opts;\n\n // Check if we have a geospatial anchor\n this.isGeospatial = Number.isFinite(latitude) && Number.isFinite(longitude);\n\n this.zoom = zoom;\n if (!Number.isFinite(this.zoom)) {\n this.zoom = this.isGeospatial\n ? getMeterZoom({latitude}) + Math.log2(focalDistance)\n : DEFAULT_ZOOM;\n }\n const scale = Math.pow(2, this.zoom);\n this.scale = scale;\n\n // Calculate distance scales if lng/lat/zoom are provided\n this.distanceScales = this.isGeospatial\n ? getDistanceScales({latitude, longitude})\n : distanceScales || DEFAULT_DISTANCE_SCALES;\n\n this.focalDistance = focalDistance;\n\n this.distanceScales.metersPerUnit = new Vector3(this.distanceScales.metersPerUnit);\n this.distanceScales.unitsPerMeter = new Vector3(this.distanceScales.unitsPerMeter);\n\n this.position = ZERO_VECTOR;\n this.meterOffset = ZERO_VECTOR;\n if (position) {\n // Apply model matrix if supplied\n this.position = position;\n this.modelMatrix = modelMatrix;\n this.meterOffset = modelMatrix ? modelMatrix.transformVector(position) : position;\n }\n\n if (this.isGeospatial) {\n // Determine camera center\n this.longitude = longitude;\n this.latitude = latitude;\n this.center = this._getCenterInWorld({longitude, latitude});\n } else {\n this.center = position ? this.projectPosition(position) : [0, 0, 0];\n }\n this.viewMatrixUncentered = viewMatrix;\n // Make a centered version of the matrix for projection modes without an offset\n this.viewMatrix = new Matrix4()\n // Apply the uncentered view matrix\n .multiplyRight(this.viewMatrixUncentered)\n // And center it\n .translate(new Vector3(this.center || ZERO_VECTOR).negate());\n }\n /* eslint-enable complexity, max-statements */\n\n _getCenterInWorld({longitude, latitude}) {\n const {meterOffset, distanceScales} = this;\n\n // Make a centered version of the matrix for projection modes without an offset\n const center = new Vector3(this.projectPosition([longitude, latitude, 0]));\n\n if (meterOffset) {\n const commonPosition = new Vector3(meterOffset)\n // Convert to pixels in current zoom\n .scale(distanceScales.unitsPerMeter);\n center.add(commonPosition);\n }\n\n return center;\n }\n\n _initProjectionMatrix(opts) {\n const {\n // Projection matrix\n projectionMatrix = null,\n\n // Projection matrix parameters, used if projectionMatrix not supplied\n orthographic = false,\n fovyRadians,\n fovy = 75,\n near = 0.1, // Distance of near clipping plane\n far = 1000, // Distance of far clipping plane\n focalDistance = 1\n } = opts;\n\n this.projectionMatrix =\n projectionMatrix ||\n this._createProjectionMatrix({\n orthographic,\n fovyRadians: fovyRadians || fovy * DEGREES_TO_RADIANS,\n aspect: this.width / this.height,\n focalDistance,\n near,\n far\n });\n }\n\n _initPixelMatrices() {\n // Note: As usual, matrix operations should be applied in \"reverse\" order\n // since vectors will be multiplied in from the right during transformation\n const vpm = createMat4();\n mat4.multiply(vpm, vpm, this.projectionMatrix);\n mat4.multiply(vpm, vpm, this.viewMatrix);\n this.viewProjectionMatrix = vpm;\n\n // console.log('VPM', this.viewMatrix, this.projectionMatrix, this.viewProjectionMatrix);\n\n // Calculate inverse view matrix\n this.viewMatrixInverse = mat4.invert([], this.viewMatrix) || this.viewMatrix;\n\n // Decompose camera parameters\n this.cameraPosition = getCameraPosition(this.viewMatrixInverse);\n\n /*\n * Builds matrices that converts preprojected lngLats to screen pixels\n * and vice versa.\n * Note: Currently returns bottom-left coordinates!\n * Note: Starts with the GL projection matrix and adds steps to the\n * scale and translate that matrix onto the window.\n * Note: WebGL controls clip space to screen projection with gl.viewport\n * and does not need this step.\n */\n\n // matrix for conversion from world location to screen (pixel) coordinates\n const viewportMatrix = createMat4(); // matrix from NDC to viewport.\n const pixelProjectionMatrix = createMat4(); // matrix from world space to viewport.\n mat4.scale(viewportMatrix, viewportMatrix, [this.width / 2, -this.height / 2, 1]);\n mat4.translate(viewportMatrix, viewportMatrix, [1, -1, 0]);\n mat4.multiply(pixelProjectionMatrix, viewportMatrix, this.viewProjectionMatrix);\n this.pixelProjectionMatrix = pixelProjectionMatrix;\n this.viewportMatrix = viewportMatrix;\n\n this.pixelUnprojectionMatrix = mat4.invert(createMat4(), this.pixelProjectionMatrix);\n if (!this.pixelUnprojectionMatrix) {\n log.warn('Pixel project matrix not invertible')();\n // throw new Error('Pixel project matrix not invertible');\n }\n }\n}\n\nViewport.displayName = 'Viewport';\n","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (obj, key, value) {\n if (key in obj) {\n (0, _defineProperty2.default)(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};","import destination from '@turf/destination';\nimport bearing from '@turf/bearing';\nimport pointToLineDistance from '@turf/point-to-line-distance';\nimport { point } from '@turf/helpers';\nimport {\n Position,\n Point,\n LineString,\n FeatureOf,\n FeatureWithProps,\n Viewport,\n} from '@nebula.gl/edit-modes';\nimport WebMercatorViewport from 'viewport-mercator-project';\n\n// TODO edit-modes: delete and use edit-modes/utils instead\n\nexport type NearestPointType = FeatureWithProps<Point, { dist: number; index: number }>;\n\nexport function toDeckColor(\n color?: [number, number, number, number] | number,\n defaultColor: [number, number, number, number] = [255, 0, 0, 255]\n): [number, number, number, number] {\n if (!Array.isArray(color)) {\n return defaultColor;\n }\n return [color[0] * 255, color[1] * 255, color[2] * 255, color[3] * 255];\n}\n\n//\n// a GeoJSON helper function that calls the provided function with\n// an argument that is the most deeply-nested array having elements\n// that are arrays of primitives as an argument, e.g.\n//\n// {\n// \"type\": \"MultiPolygon\",\n// \"coordinates\": [\n// [\n// [[30, 20], [45, 40], [10, 40], [30, 20]]\n// ],\n// [\n// [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]\n// ]\n// ]\n// }\n//\n// the function would be called on:\n//\n// [[30, 20], [45, 40], [10, 40], [30, 20]]\n//\n// and\n//\n// [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]\n//\nexport function recursivelyTraverseNestedArrays(\n array: Array<any>,\n prefix: Array<number>,\n fn: Function\n) {\n if (!Array.isArray(array[0])) {\n return true;\n }\n for (let i = 0; i < array.length; i++) {\n if (recursivelyTraverseNestedArrays(array[i], [...prefix, i], fn)) {\n fn(array, prefix);\n break;\n }\n }\n return false;\n}\n\nexport function generatePointsParallelToLinePoints(\n p1: Position,\n p2: Position,\n groundCoords: Position\n): Position[] {\n const lineString: LineString = {\n type: 'LineString',\n coordinates: [p1, p2],\n };\n const pt = point(groundCoords);\n const ddistance = pointToLineDistance(pt, lineString);\n const lineBearing = bearing(p1, p2);\n\n // Check if current point is to the left or right of line\n // Line from A=(x1,y1) to B=(x2,y2) a point P=(x,y)\n // then (x−x1)(y2−y1)−(y−y1)(x2−x1)\n const isPointToLeftOfLine =\n (groundCoords[0] - p1[0]) * (p2[1] - p1[1]) - (groundCoords[1] - p1[1]) * (p2[0] - p1[0]);\n\n // Bearing to draw perpendicular to the line string\n const orthogonalBearing = isPointToLeftOfLine < 0 ? lineBearing - 90 : lineBearing - 270;\n\n // Get coordinates for the point p3 and p4 which are perpendicular to the lineString\n // Add the distance as the current position moves away from the lineString\n const p3 = destination(p2, ddistance, orthogonalBearing);\n const p4 = destination(p1, ddistance, orthogonalBearing);\n //@ts-ignore\n return [p3.geometry.coordinates, p4.geometry.coordinates];\n}\n\nexport function distance2d(x1: number, y1: number, x2: number, y2: number): number {\n const dx = x1 - x2;\n const dy = y1 - y2;\n return Math.sqrt(dx * dx + dy * dy);\n}\n\nexport function mix(a: number, b: number, ratio: number): number {\n return b * ratio + a * (1 - ratio);\n}\n\nexport function nearestPointOnProjectedLine(\n line: FeatureOf<LineString>,\n inPoint: FeatureOf<Point>,\n viewport: Viewport\n): NearestPointType {\n const wmViewport = new WebMercatorViewport(viewport);\n // Project the line to viewport, then find the nearest point\n const coordinates: Array<Array<number>> = line.geometry.coordinates as any;\n const projectedCoords = coordinates.map(([x, y, z = 0]) => wmViewport.project([x, y, z]));\n //@ts-ignore\n const [x, y] = wmViewport.project(inPoint.geometry.coordinates);\n // console.log('projectedCoords', JSON.stringify(projectedCoords));\n\n let minDistance = Infinity;\n let minPointInfo = {};\n\n projectedCoords.forEach(([x2, y2], index) => {\n if (index === 0) {\n return;\n }\n\n const [x1, y1] = projectedCoords[index - 1];\n\n // line from projectedCoords[index - 1] to projectedCoords[index]\n // convert to Ax + By + C = 0\n const A = y1 - y2;\n const B = x2 - x1;\n const C = x1 * y2 - x2 * y1;\n\n // https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line\n const div = A * A + B * B;\n const distance = Math.abs(A * x + B * y + C) / Math.sqrt(div);\n\n // TODO: Check if inside bounds\n\n if (distance < minDistance) {\n minDistance = distance;\n minPointInfo = {\n index,\n x0: (B * (B * x - A * y) - A * C) / div,\n y0: (A * (-B * x + A * y) - B * C) / div,\n };\n }\n });\n //@ts-ignore\n const { index, x0, y0 } = minPointInfo;\n const [x1, y1, z1 = 0] = projectedCoords[index - 1];\n const [x2, y2, z2 = 0] = projectedCoords[index];\n\n // calculate what ratio of the line we are on to find the proper z\n const lineLength = distance2d(x1, y1, x2, y2);\n const startToPointLength = distance2d(x1, y1, x0, y0);\n const ratio = startToPointLength / lineLength;\n const z0 = mix(z1, z2, ratio);\n\n return {\n type: 'Feature',\n geometry: {\n type: 'Point',\n coordinates: wmViewport.unproject([x0, y0, z0]),\n },\n properties: {\n // TODO: calculate the distance in proper units\n dist: minDistance,\n index: index - 1,\n },\n };\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nfunction componentWillMount() {\n // Call this.constructor.gDSFP to support sub-classes.\n var state = this.constructor.getDerivedStateFromProps(this.props, this.state);\n if (state !== null && state !== undefined) {\n this.setState(state);\n }\n}\n\nfunction componentWillReceiveProps(nextProps) {\n // Call this.constructor.gDSFP to support sub-classes.\n // Use the setState() updater to ensure state isn't stale in certain edge cases.\n function updater(prevState) {\n var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);\n return state !== null && state !== undefined ? state : null;\n }\n // Binding \"this\" is important for shallow renderer support.\n this.setState(updater.bind(this));\n}\n\nfunction componentWillUpdate(nextProps, nextState) {\n try {\n var prevProps = this.props;\n var prevState = this.state;\n this.props = nextProps;\n this.state = nextState;\n this.__reactInternalSnapshotFlag = true;\n this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(\n prevProps,\n prevState\n );\n } finally {\n this.props = prevProps;\n this.state = prevState;\n }\n}\n\n// React may warn about cWM/cWRP/cWU methods being deprecated.\n// Add a flag to suppress these warnings for this special case.\ncomponentWillMount.__suppressDeprecationWarning = true;\ncomponentWillReceiveProps.__suppressDeprecationWarning = true;\ncomponentWillUpdate.__suppressDeprecationWarning = true;\n\nfunction polyfill(Component) {\n var prototype = Component.prototype;\n\n if (!prototype || !prototype.isReactComponent) {\n throw new Error('Can only polyfill class components');\n }\n\n if (\n typeof Component.getDerivedStateFromProps !== 'function' &&\n typeof prototype.getSnapshotBeforeUpdate !== 'function'\n ) {\n return Component;\n }\n\n // If new component APIs are defined, \"unsafe\" lifecycles won't be called.\n // Error if any of these lifecycles are present,\n // Because they would work differently between older and newer (16.3+) versions of React.\n var foundWillMountName = null;\n var foundWillReceivePropsName = null;\n var foundWillUpdateName = null;\n if (typeof prototype.componentWillMount === 'function') {\n foundWillMountName = 'componentWillMount';\n } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {\n foundWillMountName = 'UNSAFE_componentWillMount';\n }\n if (typeof prototype.componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'componentWillReceiveProps';\n } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {\n foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';\n }\n if (typeof prototype.componentWillUpdate === 'function') {\n foundWillUpdateName = 'componentWillUpdate';\n } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {\n foundWillUpdateName = 'UNSAFE_componentWillUpdate';\n }\n if (\n foundWillMountName !== null ||\n foundWillReceivePropsName !== null ||\n foundWillUpdateName !== null\n ) {\n var componentName = Component.displayName || Component.name;\n var newApiName =\n typeof Component.getDerivedStateFromProps === 'function'\n ? 'getDerivedStateFromProps()'\n : 'getSnapshotBeforeUpdate()';\n\n throw Error(\n 'Unsafe legacy lifecycles will not be called for components using new component APIs.\\n\\n' +\n componentName +\n ' uses ' +\n newApiName +\n ' but also contains the following legacy lifecycles:' +\n (foundWillMountName !== null ? '\\n ' + foundWillMountName : '') +\n (foundWillReceivePropsName !== null\n ? '\\n ' + foundWillReceivePropsName\n : '') +\n (foundWillUpdateName !== null ? '\\n ' + foundWillUpdateName : '') +\n '\\n\\nThe above lifecycles should be removed. Learn more about this warning here:\\n' +\n 'https://fb.me/react-async-component-lifecycle-hooks'\n );\n }\n\n // React <= 16.2 does not support static getDerivedStateFromProps.\n // As a workaround, use cWM and cWRP to invoke the new static lifecycle.\n // Newer versions of React will ignore these lifecycles if gDSFP exists.\n if (typeof Component.getDerivedStateFromProps === 'function') {\n prototype.componentWillMount = componentWillMount;\n prototype.componentWillReceiveProps = componentWillReceiveProps;\n }\n\n // React <= 16.2 does not support getSnapshotBeforeUpdate.\n // As a workaround, use cWU to invoke the new lifecycle.\n // Newer versions of React will ignore that lifecycle if gSBU exists.\n if (typeof prototype.getSnapshotBeforeUpdate === 'function') {\n if (typeof prototype.componentDidUpdate !== 'function') {\n throw new Error(\n 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'\n );\n }\n\n prototype.componentWillUpdate = componentWillUpdate;\n\n var componentDidUpdate = prototype.componentDidUpdate;\n\n prototype.componentDidUpdate = function componentDidUpdatePolyfill(\n prevProps,\n prevState,\n maybeSnapshot\n ) {\n // 16.3+ will not execute our will-update method;\n // It will pass a snapshot value to did-update though.\n // Older versions will require our polyfilled will-update value.\n // We need to handle both cases, but can't just check for the presence of \"maybeSnapshot\",\n // Because for <= 15.x versions this might be a \"prevContext\" object.\n // We also can't just check \"__reactInternalSnapshot\",\n // Because get-snapshot might return a falsy value.\n // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.\n var snapshot = this.__reactInternalSnapshotFlag\n ? this.__reactInternalSnapshot\n : maybeSnapshot;\n\n componentDidUpdate.call(this, prevProps, prevState, snapshot);\n };\n }\n\n return Component;\n}\n\nexport { polyfill };\n","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}","export default function _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","import _extends from '@babel/runtime/helpers/esm/extends';\nimport isInBrowser from 'is-in-browser';\nimport warning from 'tiny-warning';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\n\nvar plainObjectConstrurctor = {}.constructor;\nfunction cloneStyle(style) {\n if (style == null || typeof style !== 'object') return style;\n if (Array.isArray(style)) return style.map(cloneStyle);\n if (style.constructor !== plainObjectConstrurctor) return style;\n var newStyle = {};\n\n for (var name in style) {\n newStyle[name] = cloneStyle(style[name]);\n }\n\n return newStyle;\n}\n\n/**\n * Create a rule instance.\n */\n\nfunction createRule(name, decl, options) {\n if (name === void 0) {\n name = 'unnamed';\n }\n\n var jss = options.jss;\n var declCopy = cloneStyle(decl);\n var rule = jss.plugins.onCreateRule(name, declCopy, options);\n if (rule) return rule; // It is an at-rule and it has no instance.\n\n if (name[0] === '@') {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown rule \" + name) : void 0;\n }\n\n return null;\n}\n\nvar join = function join(value, by) {\n var result = '';\n\n for (var i = 0; i < value.length; i++) {\n // Remove !important from the value, it will be readded later.\n if (value[i] === '!important') break;\n if (result) result += by;\n result += value[i];\n }\n\n return result;\n};\n/**\n * Converts JSS array value to a CSS string.\n *\n * `margin: [['5px', '10px']]` > `margin: 5px 10px;`\n * `border: ['1px', '2px']` > `border: 1px, 2px;`\n * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`\n * `color: ['red', !important]` > `color: red !important;`\n */\n\n\nvar toCssValue = function toCssValue(value, ignoreImportant) {\n if (ignoreImportant === void 0) {\n ignoreImportant = false;\n }\n\n if (!Array.isArray(value)) return value;\n var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.\n\n if (Array.isArray(value[0])) {\n for (var i = 0; i < value.length; i++) {\n if (value[i] === '!important') break;\n if (cssValue) cssValue += ', ';\n cssValue += join(value[i], ' ');\n }\n } else cssValue = join(value, ', '); // Add !important, because it was ignored.\n\n\n if (!ignoreImportant && value[value.length - 1] === '!important') {\n cssValue += ' !important';\n }\n\n return cssValue;\n};\n\nfunction getWhitespaceSymbols(options) {\n if (options && options.format === false) {\n return {\n linebreak: '',\n space: ''\n };\n }\n\n return {\n linebreak: '\\n',\n space: ' '\n };\n}\n\n/**\n * Indent a string.\n * http://jsperf.com/array-join-vs-for\n */\n\nfunction indentStr(str, indent) {\n var result = '';\n\n for (var index = 0; index < indent; index++) {\n result += ' ';\n }\n\n return result + str;\n}\n/**\n * Converts a Rule to CSS string.\n */\n\n\nfunction toCss(selector, style, options) {\n if (options === void 0) {\n options = {};\n }\n\n var result = '';\n if (!style) return result;\n var _options = options,\n _options$indent = _options.indent,\n indent = _options$indent === void 0 ? 0 : _options$indent;\n var fallbacks = style.fallbacks;\n\n if (options.format === false) {\n indent = -Infinity;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak,\n space = _getWhitespaceSymbols.space;\n\n if (selector) indent++; // Apply fallbacks first.\n\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (var index = 0; index < fallbacks.length; index++) {\n var fallback = fallbacks[index];\n\n for (var prop in fallback) {\n var value = fallback[prop];\n\n if (value != null) {\n if (result) result += linebreak;\n result += indentStr(prop + \":\" + space + toCssValue(value) + \";\", indent);\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (var _prop in fallbacks) {\n var _value = fallbacks[_prop];\n\n if (_value != null) {\n if (result) result += linebreak;\n result += indentStr(_prop + \":\" + space + toCssValue(_value) + \";\", indent);\n }\n }\n }\n }\n\n for (var _prop2 in style) {\n var _value2 = style[_prop2];\n\n if (_value2 != null && _prop2 !== 'fallbacks') {\n if (result) result += linebreak;\n result += indentStr(_prop2 + \":\" + space + toCssValue(_value2) + \";\", indent);\n }\n } // Allow empty style in this case, because properties will be added dynamically.\n\n\n if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.\n\n if (!selector) return result;\n indent--;\n if (result) result = \"\" + linebreak + result + linebreak;\n return indentStr(\"\" + selector + space + \"{\" + result, indent) + indentStr('}', indent);\n}\n\nvar escapeRegex = /([[\\].#*$><+~=|^:(),\"'`\\s])/g;\nvar nativeEscape = typeof CSS !== 'undefined' && CSS.escape;\nvar escape = (function (str) {\n return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\\\$1');\n});\n\nvar BaseStyleRule =\n/*#__PURE__*/\nfunction () {\n function BaseStyleRule(key, style, options) {\n this.type = 'style';\n this.isProcessed = false;\n var sheet = options.sheet,\n Renderer = options.Renderer;\n this.key = key;\n this.options = options;\n this.style = style;\n if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();\n }\n /**\n * Get or set a style property.\n */\n\n\n var _proto = BaseStyleRule.prototype;\n\n _proto.prop = function prop(name, value, options) {\n // It's a getter.\n if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.\n\n var force = options ? options.force : false;\n if (!force && this.style[name] === value) return this;\n var newValue = value;\n\n if (!options || options.process !== false) {\n newValue = this.options.jss.plugins.onChangeValue(value, name, this);\n }\n\n var isEmpty = newValue == null || newValue === false;\n var isDefined = name in this.style; // Value is empty and wasn't defined before.\n\n if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.\n\n var remove = isEmpty && isDefined;\n if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.\n\n if (this.renderable && this.renderer) {\n if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);\n return this;\n }\n\n var sheet = this.options.sheet;\n\n if (sheet && sheet.attached) {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Rule is not linked. Missing sheet option \"link: true\".') : void 0;\n }\n\n return this;\n };\n\n return BaseStyleRule;\n}();\nvar StyleRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n _inheritsLoose(StyleRule, _BaseStyleRule);\n\n function StyleRule(key, style, options) {\n var _this;\n\n _this = _BaseStyleRule.call(this, key, style, options) || this;\n var selector = options.selector,\n scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n\n if (selector) {\n _this.selectorText = selector;\n } else if (scoped !== false) {\n _this.id = generateId(_assertThisInitialized(_assertThisInitialized(_this)), sheet);\n _this.selectorText = \".\" + escape(_this.id);\n }\n\n return _this;\n }\n /**\n * Set selector string.\n * Attention: use this with caution. Most browsers didn't implement\n * selectorText setter, so this may result in rerendering of entire Style Sheet.\n */\n\n\n var _proto2 = StyleRule.prototype;\n\n /**\n * Apply rule to an element inline.\n */\n _proto2.applyTo = function applyTo(renderable) {\n var renderer = this.renderer;\n\n if (renderer) {\n var json = this.toJSON();\n\n for (var prop in json) {\n renderer.setProperty(renderable, prop, json[prop]);\n }\n }\n\n return this;\n }\n /**\n * Returns JSON representation of the rule.\n * Fallbacks are not supported.\n * Useful for inline styles.\n */\n ;\n\n _proto2.toJSON = function toJSON() {\n var json = {};\n\n for (var prop in this.style) {\n var value = this.style[prop];\n if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);\n }\n\n return json;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto2.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.selectorText, this.style, opts);\n };\n\n _createClass(StyleRule, [{\n key: \"selector\",\n set: function set(selector) {\n if (selector === this.selectorText) return;\n this.selectorText = selector;\n var renderer = this.renderer,\n renderable = this.renderable;\n if (!renderable || !renderer) return;\n var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.\n\n if (!hasChanged) {\n renderer.replaceRule(renderable, this);\n }\n }\n /**\n * Get selector string.\n */\n ,\n get: function get() {\n return this.selectorText;\n }\n }]);\n\n return StyleRule;\n}(BaseStyleRule);\nvar pluginStyleRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (key[0] === '@' || options.parent && options.parent.type === 'keyframes') {\n return null;\n }\n\n return new StyleRule(key, style, options);\n }\n};\n\nvar defaultToStringOptions = {\n indent: 1,\n children: true\n};\nvar atRegExp = /@([\\w-]+)/;\n/**\n * Conditional rule for @media, @supports\n */\n\nvar ConditionalRule =\n/*#__PURE__*/\nfunction () {\n function ConditionalRule(key, styles, options) {\n this.type = 'conditional';\n this.isProcessed = false;\n this.key = key;\n var atMatch = key.match(atRegExp);\n this.at = atMatch ? atMatch[1] : 'unknown'; // Key might contain a unique suffix in case the `name` passed by user was duplicate.\n\n this.query = options.name || \"@\" + this.at;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = ConditionalRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (options.indent == null) options.indent = defaultToStringOptions.indent;\n if (options.children == null) options.children = defaultToStringOptions.children;\n\n if (options.children === false) {\n return this.query + \" {}\";\n }\n\n var children = this.rules.toString(options);\n return children ? this.query + \" {\" + linebreak + children + linebreak + \"}\" : '';\n };\n\n return ConditionalRule;\n}();\nvar keyRegExp = /@media|@supports\\s+/;\nvar pluginConditionalRule = {\n onCreateRule: function onCreateRule(key, styles, options) {\n return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;\n }\n};\n\nvar defaultToStringOptions$1 = {\n indent: 1,\n children: true\n};\nvar nameRegExp = /@keyframes\\s+([\\w-]+)/;\n/**\n * Rule for @keyframes\n */\n\nvar KeyframesRule =\n/*#__PURE__*/\nfunction () {\n function KeyframesRule(key, frames, options) {\n this.type = 'keyframes';\n this.at = '@keyframes';\n this.isProcessed = false;\n var nameMatch = key.match(nameRegExp);\n\n if (nameMatch && nameMatch[1]) {\n this.name = nameMatch[1];\n } else {\n this.name = 'noname';\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Bad keyframes name \" + key) : void 0;\n }\n\n this.key = this.type + \"-\" + this.name;\n this.options = options;\n var scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n this.id = scoped === false ? this.name : escape(generateId(this, sheet));\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var name in frames) {\n this.rules.add(name, frames[name], _extends({}, options, {\n parent: this\n }));\n }\n\n this.rules.process();\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = KeyframesRule.prototype;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions$1;\n }\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (options.indent == null) options.indent = defaultToStringOptions$1.indent;\n if (options.children == null) options.children = defaultToStringOptions$1.children;\n\n if (options.children === false) {\n return this.at + \" \" + this.id + \" {}\";\n }\n\n var children = this.rules.toString(options);\n if (children) children = \"\" + linebreak + children + linebreak;\n return this.at + \" \" + this.id + \" {\" + children + \"}\";\n };\n\n return KeyframesRule;\n}();\nvar keyRegExp$1 = /@keyframes\\s+/;\nvar refRegExp = /\\$([\\w-]+)/g;\n\nvar findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {\n if (typeof val === 'string') {\n return val.replace(refRegExp, function (match, name) {\n if (name in keyframes) {\n return keyframes[name];\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Referenced keyframes rule \\\"\" + name + \"\\\" is not defined.\") : void 0;\n return match;\n });\n }\n\n return val;\n};\n/**\n * Replace the reference for a animation name.\n */\n\n\nvar replaceRef = function replaceRef(style, prop, keyframes) {\n var value = style[prop];\n var refKeyframe = findReferencedKeyframe(value, keyframes);\n\n if (refKeyframe !== value) {\n style[prop] = refKeyframe;\n }\n};\n\nvar pluginKeyframesRule = {\n onCreateRule: function onCreateRule(key, frames, options) {\n return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;\n },\n // Animation name ref replacer.\n onProcessStyle: function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style' || !sheet) return style;\n if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes);\n if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes);\n return style;\n },\n onChangeValue: function onChangeValue(val, prop, rule) {\n var sheet = rule.options.sheet;\n\n if (!sheet) {\n return val;\n }\n\n switch (prop) {\n case 'animation':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n case 'animation-name':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n default:\n return val;\n }\n }\n};\n\nvar KeyframeRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n _inheritsLoose(KeyframeRule, _BaseStyleRule);\n\n function KeyframeRule() {\n return _BaseStyleRule.apply(this, arguments) || this;\n }\n\n var _proto = KeyframeRule.prototype;\n\n /**\n * Generates a CSS string.\n */\n _proto.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? _extends({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.key, this.style, opts);\n };\n\n return KeyframeRule;\n}(BaseStyleRule);\nvar pluginKeyframeRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (options.parent && options.parent.type === 'keyframes') {\n return new KeyframeRule(key, style, options);\n }\n\n return null;\n }\n};\n\nvar FontFaceRule =\n/*#__PURE__*/\nfunction () {\n function FontFaceRule(key, style, options) {\n this.type = 'font-face';\n this.at = '@font-face';\n this.isProcessed = false;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = FontFaceRule.prototype;\n\n _proto.toString = function toString(options) {\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n if (Array.isArray(this.style)) {\n var str = '';\n\n for (var index = 0; index < this.style.length; index++) {\n str += toCss(this.at, this.style[index]);\n if (this.style[index + 1]) str += linebreak;\n }\n\n return str;\n }\n\n return toCss(this.at, this.style, options);\n };\n\n return FontFaceRule;\n}();\nvar keyRegExp$2 = /@font-face/;\nvar pluginFontFaceRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;\n }\n};\n\nvar ViewportRule =\n/*#__PURE__*/\nfunction () {\n function ViewportRule(key, style, options) {\n this.type = 'viewport';\n this.at = '@viewport';\n this.isProcessed = false;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = ViewportRule.prototype;\n\n _proto.toString = function toString(options) {\n return toCss(this.key, this.style, options);\n };\n\n return ViewportRule;\n}();\nvar pluginViewportRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null;\n }\n};\n\nvar SimpleRule =\n/*#__PURE__*/\nfunction () {\n function SimpleRule(key, value, options) {\n this.type = 'simple';\n this.isProcessed = false;\n this.key = key;\n this.value = value;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n // eslint-disable-next-line no-unused-vars\n\n\n var _proto = SimpleRule.prototype;\n\n _proto.toString = function toString(options) {\n if (Array.isArray(this.value)) {\n var str = '';\n\n for (var index = 0; index < this.value.length; index++) {\n str += this.key + \" \" + this.value[index] + \";\";\n if (this.value[index + 1]) str += '\\n';\n }\n\n return str;\n }\n\n return this.key + \" \" + this.value + \";\";\n };\n\n return SimpleRule;\n}();\nvar keysMap = {\n '@charset': true,\n '@import': true,\n '@namespace': true\n};\nvar pluginSimpleRule = {\n onCreateRule: function onCreateRule(key, value, options) {\n return key in keysMap ? new SimpleRule(key, value, options) : null;\n }\n};\n\nvar plugins = [pluginStyleRule, pluginConditionalRule, pluginKeyframesRule, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule];\n\nvar defaultUpdateOptions = {\n process: true\n};\nvar forceUpdateOptions = {\n force: true,\n process: true\n /**\n * Contains rules objects and allows adding/removing etc.\n * Is used for e.g. by `StyleSheet` or `ConditionalRule`.\n */\n\n};\n\nvar RuleList =\n/*#__PURE__*/\nfunction () {\n // Rules registry for access by .get() method.\n // It contains the same rule registered by name and by selector.\n // Original styles object.\n // Used to ensure correct rules order.\n function RuleList(options) {\n this.map = {};\n this.raw = {};\n this.index = [];\n this.counter = 0;\n this.options = options;\n this.classes = options.classes;\n this.keyframes = options.keyframes;\n }\n /**\n * Create and register rule.\n *\n * Will not render after Style Sheet was rendered the first time.\n */\n\n\n var _proto = RuleList.prototype;\n\n _proto.add = function add(name, decl, ruleOptions) {\n var _this$options = this.options,\n parent = _this$options.parent,\n sheet = _this$options.sheet,\n jss = _this$options.jss,\n Renderer = _this$options.Renderer,\n generateId = _this$options.generateId,\n scoped = _this$options.scoped;\n\n var options = _extends({\n classes: this.classes,\n parent: parent,\n sheet: sheet,\n jss: jss,\n Renderer: Renderer,\n generateId: generateId,\n scoped: scoped,\n name: name,\n keyframes: this.keyframes,\n selector: undefined\n }, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but\n // `sheet.addRule()` opens the door for any duplicate rule name. When this happens\n // we need to make the key unique within this RuleList instance scope.\n\n\n var key = name;\n\n if (name in this.raw) {\n key = name + \"-d\" + this.counter++;\n } // We need to save the original decl before creating the rule\n // because cache plugin needs to use it as a key to return a cached rule.\n\n\n this.raw[key] = decl;\n\n if (key in this.classes) {\n // E.g. rules inside of @media container\n options.selector = \".\" + escape(this.classes[key]);\n }\n\n var rule = createRule(key, decl, options);\n if (!rule) return null;\n this.register(rule);\n var index = options.index === undefined ? this.index.length : options.index;\n this.index.splice(index, 0, rule);\n return rule;\n }\n /**\n * Get a rule.\n */\n ;\n\n _proto.get = function get(name) {\n return this.map[name];\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.remove = function remove(rule) {\n this.unregister(rule);\n delete this.raw[rule.key];\n this.index.splice(this.index.indexOf(rule), 1);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.index.indexOf(rule);\n }\n /**\n * Run `onProcessRule()` plugins on every rule.\n */\n ;\n\n _proto.process = function process() {\n var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop\n // we end up with very hard-to-track-down side effects.\n\n this.index.slice(0).forEach(plugins.onProcessRule, plugins);\n }\n /**\n * Register a rule in `.map`, `.classes` and `.keyframes` maps.\n */\n ;\n\n _proto.register = function register(rule) {\n this.map[rule.key] = rule;\n\n if (rule instanceof StyleRule) {\n this.map[rule.selector] = rule;\n if (rule.id) this.classes[rule.key] = rule.id;\n } else if (rule instanceof KeyframesRule && this.keyframes) {\n this.keyframes[rule.name] = rule.id;\n }\n }\n /**\n * Unregister a rule.\n */\n ;\n\n _proto.unregister = function unregister(rule) {\n delete this.map[rule.key];\n\n if (rule instanceof StyleRule) {\n delete this.map[rule.selector];\n delete this.classes[rule.key];\n } else if (rule instanceof KeyframesRule) {\n delete this.keyframes[rule.name];\n }\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var name;\n var data;\n var options;\n\n if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') {\n name = arguments.length <= 0 ? undefined : arguments[0];\n data = arguments.length <= 1 ? undefined : arguments[1];\n options = arguments.length <= 2 ? undefined : arguments[2];\n } else {\n data = arguments.length <= 0 ? undefined : arguments[0];\n options = arguments.length <= 1 ? undefined : arguments[1];\n name = null;\n }\n\n if (name) {\n this.updateOne(this.map[name], data, options);\n } else {\n for (var index = 0; index < this.index.length; index++) {\n this.updateOne(this.index[index], data, options);\n }\n }\n }\n /**\n * Execute plugins, update rule props.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n if (options === void 0) {\n options = defaultUpdateOptions;\n }\n\n var _this$options2 = this.options,\n plugins = _this$options2.jss.plugins,\n sheet = _this$options2.sheet; // It is a rules container like for e.g. ConditionalRule.\n\n if (rule.rules instanceof RuleList) {\n rule.rules.update(data, options);\n return;\n }\n\n var style = rule.style;\n plugins.onUpdate(data, rule, sheet, options); // We rely on a new `style` ref in case it was mutated during onUpdate hook.\n\n if (options.process && style && style !== rule.style) {\n // We need to run the plugins in case new `style` relies on syntax plugins.\n plugins.onProcessStyle(rule.style, rule, sheet); // Update and add props.\n\n for (var prop in rule.style) {\n var nextValue = rule.style[prop];\n var prevValue = style[prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (nextValue !== prevValue) {\n rule.prop(prop, nextValue, forceUpdateOptions);\n }\n } // Remove props.\n\n\n for (var _prop in style) {\n var _nextValue = rule.style[_prop];\n var _prevValue = style[_prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (_nextValue == null && _nextValue !== _prevValue) {\n rule.prop(_prop, null, forceUpdateOptions);\n }\n }\n }\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n var str = '';\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n for (var index = 0; index < this.index.length; index++) {\n var rule = this.index[index];\n var css = rule.toString(options); // No need to render an empty rule.\n\n if (!css && !link) continue;\n if (str) str += linebreak;\n str += css;\n }\n\n return str;\n };\n\n return RuleList;\n}();\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n function StyleSheet(styles, options) {\n this.attached = false;\n this.deployed = false;\n this.classes = {};\n this.keyframes = {};\n this.options = _extends({}, options, {\n sheet: this,\n parent: this,\n classes: this.classes,\n keyframes: this.keyframes\n });\n\n if (options.Renderer) {\n this.renderer = new options.Renderer(this);\n }\n\n this.rules = new RuleList(this.options);\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Attach renderable to the render tree.\n */\n\n\n var _proto = StyleSheet.prototype;\n\n _proto.attach = function attach() {\n if (this.attached) return this;\n if (this.renderer) this.renderer.attach();\n this.attached = true; // Order is important, because we can't use insertRule API if style element is not attached.\n\n if (!this.deployed) this.deploy();\n return this;\n }\n /**\n * Remove renderable from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.attached) return this;\n if (this.renderer) this.renderer.detach();\n this.attached = false;\n return this;\n }\n /**\n * Add a rule to the current stylesheet.\n * Will insert a rule also after the stylesheet has been rendered first time.\n */\n ;\n\n _proto.addRule = function addRule(name, decl, options) {\n var queue = this.queue; // Plugins can create rules.\n // In order to preserve the right order, we need to queue all `.addRule` calls,\n // which happen after the first `rules.add()` call.\n\n if (this.attached && !queue) this.queue = [];\n var rule = this.rules.add(name, decl, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n\n if (this.attached) {\n if (!this.deployed) return rule; // Don't insert rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n\n if (queue) queue.push(rule);else {\n this.insertRule(rule);\n\n if (this.queue) {\n this.queue.forEach(this.insertRule, this);\n this.queue = undefined;\n }\n }\n return rule;\n } // We can't add rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n\n\n this.deployed = false;\n return rule;\n }\n /**\n * Insert rule into the StyleSheet\n */\n ;\n\n _proto.insertRule = function insertRule(rule) {\n if (this.renderer) {\n this.renderer.insertRule(rule);\n }\n }\n /**\n * Create and add rules.\n * Will render also after Style Sheet was rendered the first time.\n */\n ;\n\n _proto.addRules = function addRules(styles, options) {\n var added = [];\n\n for (var name in styles) {\n var rule = this.addRule(name, styles[name], options);\n if (rule) added.push(rule);\n }\n\n return added;\n }\n /**\n * Get a rule by name.\n */\n ;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Delete a rule by name.\n * Returns `true`: if rule has been deleted from the DOM.\n */\n ;\n\n _proto.deleteRule = function deleteRule(name) {\n var rule = typeof name === 'object' ? name : this.rules.get(name);\n\n if (!rule || // Style sheet was created without link: true and attached, in this case we\n // won't be able to remove the CSS rule from the DOM.\n this.attached && !rule.renderable) {\n return false;\n }\n\n this.rules.remove(rule);\n\n if (this.attached && rule.renderable && this.renderer) {\n return this.renderer.deleteRule(rule.renderable);\n }\n\n return true;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Deploy pure CSS string to a renderable.\n */\n ;\n\n _proto.deploy = function deploy() {\n if (this.renderer) this.renderer.deploy();\n this.deployed = true;\n return this;\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var _this$rules;\n\n (_this$rules = this.rules).update.apply(_this$rules, arguments);\n\n return this;\n }\n /**\n * Updates a single rule.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n this.rules.updateOne(rule, data, options);\n return this;\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return StyleSheet;\n}();\n\nvar PluginsRegistry =\n/*#__PURE__*/\nfunction () {\n function PluginsRegistry() {\n this.plugins = {\n internal: [],\n external: []\n };\n this.registry = {};\n }\n\n var _proto = PluginsRegistry.prototype;\n\n /**\n * Call `onCreateRule` hooks and return an object if returned by a hook.\n */\n _proto.onCreateRule = function onCreateRule(name, decl, options) {\n for (var i = 0; i < this.registry.onCreateRule.length; i++) {\n var rule = this.registry.onCreateRule[i](name, decl, options);\n if (rule) return rule;\n }\n\n return null;\n }\n /**\n * Call `onProcessRule` hooks.\n */\n ;\n\n _proto.onProcessRule = function onProcessRule(rule) {\n if (rule.isProcessed) return;\n var sheet = rule.options.sheet;\n\n for (var i = 0; i < this.registry.onProcessRule.length; i++) {\n this.registry.onProcessRule[i](rule, sheet);\n }\n\n if (rule.style) this.onProcessStyle(rule.style, rule, sheet);\n rule.isProcessed = true;\n }\n /**\n * Call `onProcessStyle` hooks.\n */\n ;\n\n _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) {\n for (var i = 0; i < this.registry.onProcessStyle.length; i++) {\n rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet);\n }\n }\n /**\n * Call `onProcessSheet` hooks.\n */\n ;\n\n _proto.onProcessSheet = function onProcessSheet(sheet) {\n for (var i = 0; i < this.registry.onProcessSheet.length; i++) {\n this.registry.onProcessSheet[i](sheet);\n }\n }\n /**\n * Call `onUpdate` hooks.\n */\n ;\n\n _proto.onUpdate = function onUpdate(data, rule, sheet, options) {\n for (var i = 0; i < this.registry.onUpdate.length; i++) {\n this.registry.onUpdate[i](data, rule, sheet, options);\n }\n }\n /**\n * Call `onChangeValue` hooks.\n */\n ;\n\n _proto.onChangeValue = function onChangeValue(value, prop, rule) {\n var processedValue = value;\n\n for (var i = 0; i < this.registry.onChangeValue.length; i++) {\n processedValue = this.registry.onChangeValue[i](processedValue, prop, rule);\n }\n\n return processedValue;\n }\n /**\n * Register a plugin.\n */\n ;\n\n _proto.use = function use(newPlugin, options) {\n if (options === void 0) {\n options = {\n queue: 'external'\n };\n }\n\n var plugins = this.plugins[options.queue]; // Avoids applying same plugin twice, at least based on ref.\n\n if (plugins.indexOf(newPlugin) !== -1) {\n return;\n }\n\n plugins.push(newPlugin);\n this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) {\n for (var name in plugin) {\n if (name in registry) {\n registry[name].push(plugin[name]);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Unknown hook \\\"\" + name + \"\\\".\") : void 0;\n }\n }\n\n return registry;\n }, {\n onCreateRule: [],\n onProcessRule: [],\n onProcessStyle: [],\n onProcessSheet: [],\n onChangeValue: [],\n onUpdate: []\n });\n };\n\n return PluginsRegistry;\n}();\n\n/**\n * Sheets registry to access all instances in one place.\n */\n\nvar SheetsRegistry =\n/*#__PURE__*/\nfunction () {\n function SheetsRegistry() {\n this.registry = [];\n }\n\n var _proto = SheetsRegistry.prototype;\n\n /**\n * Register a Style Sheet.\n */\n _proto.add = function add(sheet) {\n var registry = this.registry;\n var index = sheet.options.index;\n if (registry.indexOf(sheet) !== -1) return;\n\n if (registry.length === 0 || index >= this.index) {\n registry.push(sheet);\n return;\n } // Find a position.\n\n\n for (var i = 0; i < registry.length; i++) {\n if (registry[i].options.index > index) {\n registry.splice(i, 0, sheet);\n return;\n }\n }\n }\n /**\n * Reset the registry.\n */\n ;\n\n _proto.reset = function reset() {\n this.registry = [];\n }\n /**\n * Remove a Style Sheet.\n */\n ;\n\n _proto.remove = function remove(sheet) {\n var index = this.registry.indexOf(sheet);\n this.registry.splice(index, 1);\n }\n /**\n * Convert all attached sheets to a CSS string.\n */\n ;\n\n _proto.toString = function toString(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n attached = _ref.attached,\n options = _objectWithoutPropertiesLoose(_ref, [\"attached\"]);\n\n var _getWhitespaceSymbols = getWhitespaceSymbols(options),\n linebreak = _getWhitespaceSymbols.linebreak;\n\n var css = '';\n\n for (var i = 0; i < this.registry.length; i++) {\n var sheet = this.registry[i];\n\n if (attached != null && sheet.attached !== attached) {\n continue;\n }\n\n if (css) css += linebreak;\n css += sheet.toString(options);\n }\n\n return css;\n };\n\n _createClass(SheetsRegistry, [{\n key: \"index\",\n\n /**\n * Current highest index number.\n */\n get: function get() {\n return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;\n }\n }]);\n\n return SheetsRegistry;\n}();\n\n/**\n * This is a global sheets registry. Only DomRenderer will add sheets to it.\n * On the server one should use an own SheetsRegistry instance and add the\n * sheets to it, because you need to make sure to create a new registry for\n * each request in order to not leak sheets across requests.\n */\n\nvar sheets = new SheetsRegistry();\n\n/* eslint-disable */\n\n/**\n * Now that `globalThis` is available on most platforms\n * (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis#browser_compatibility)\n * we check for `globalThis` first. `globalThis` is necessary for jss\n * to run in Agoric's secure version of JavaScript (SES). Under SES,\n * `globalThis` exists, but `window`, `self`, and `Function('return\n * this')()` are all undefined for security reasons.\n *\n * https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n */\nvar globalThis$1 = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' && window.Math === Math ? window : typeof self !== 'undefined' && self.Math === Math ? self : Function('return this')();\n\nvar ns = '2f1acc6c3a606b082e5eef5e54414ffb';\nif (globalThis$1[ns] == null) globalThis$1[ns] = 0; // Bundle may contain multiple JSS versions at the same time. In order to identify\n// the current version with just one short number and use it for classes generation\n// we use a counter. Also it is more accurate, because user can manually reevaluate\n// the module.\n\nvar moduleId = globalThis$1[ns]++;\n\nvar maxRules = 1e10;\n/**\n * Returns a function which generates unique class names based on counters.\n * When new generator function is created, rule counter is reseted.\n * We need to reset the rule counter for SSR for each request.\n */\n\nvar createGenerateId = function createGenerateId(options) {\n if (options === void 0) {\n options = {};\n }\n\n var ruleCounter = 0;\n\n var generateId = function generateId(rule, sheet) {\n ruleCounter += 1;\n\n if (ruleCounter > maxRules) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] You might have a memory leak. Rule counter is at \" + ruleCounter + \".\") : void 0;\n }\n\n var jssId = '';\n var prefix = '';\n\n if (sheet) {\n if (sheet.options.classNamePrefix) {\n prefix = sheet.options.classNamePrefix;\n }\n\n if (sheet.options.jss.id != null) {\n jssId = String(sheet.options.jss.id);\n }\n }\n\n if (options.minify) {\n // Using \"c\" because a number can't be the first char in a class name.\n return \"\" + (prefix || 'c') + moduleId + jssId + ruleCounter;\n }\n\n return prefix + rule.key + \"-\" + moduleId + (jssId ? \"-\" + jssId : '') + \"-\" + ruleCounter;\n };\n\n return generateId;\n};\n\n/**\n * Cache the value from the first time a function is called.\n */\n\nvar memoize = function memoize(fn) {\n var value;\n return function () {\n if (!value) value = fn();\n return value;\n };\n};\n/**\n * Get a style property value.\n */\n\n\nvar getPropertyValue = function getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n};\n/**\n * Set a style property.\n */\n\n\nvar setProperty = function setProperty(cssRule, prop, value) {\n try {\n var cssValue = value;\n\n if (Array.isArray(value)) {\n cssValue = toCssValue(value, true);\n\n if (value[value.length - 1] === '!important') {\n cssRule.style.setProperty(prop, cssValue, 'important');\n return true;\n }\n } // Support CSSTOM.\n\n\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.set(prop, cssValue);\n } else {\n cssRule.style.setProperty(prop, cssValue);\n }\n } catch (err) {\n // IE may throw if property is unknown.\n return false;\n }\n\n return true;\n};\n/**\n * Remove a style property.\n */\n\n\nvar removeProperty = function removeProperty(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop);\n } else {\n cssRule.style.removeProperty(prop);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] DOMException \\\"\" + err.message + \"\\\" was thrown. Tried to remove property \\\"\" + prop + \"\\\".\") : void 0;\n }\n};\n/**\n * Set the selector.\n */\n\n\nvar setSelector = function setSelector(cssRule, selectorText) {\n cssRule.selectorText = selectorText; // Return false if setter was not successful.\n // Currently works in chrome only.\n\n return cssRule.selectorText === selectorText;\n};\n/**\n * Gets the `head` element upon the first call and caches it.\n * We assume it can't be null.\n */\n\n\nvar getHead = memoize(function () {\n return document.querySelector('head');\n});\n/**\n * Find attached sheet with an index higher than the passed one.\n */\n\nfunction findHigherSheet(registry, options) {\n for (var i = 0; i < registry.length; i++) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find attached sheet with the highest index.\n */\n\n\nfunction findHighestSheet(registry, options) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find a comment with \"jss\" inside.\n */\n\n\nfunction findCommentNode(text) {\n var head = getHead();\n\n for (var i = 0; i < head.childNodes.length; i++) {\n var node = head.childNodes[i];\n\n if (node.nodeType === 8 && node.nodeValue.trim() === text) {\n return node;\n }\n }\n\n return null;\n}\n/**\n * Find a node before which we can insert the sheet.\n */\n\n\nfunction findPrevNode(options) {\n var registry = sheets.registry;\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n var sheet = findHigherSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element\n };\n } // Otherwise insert after the last attached.\n\n\n sheet = findHighestSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element.nextSibling\n };\n }\n } // Try to find a comment placeholder if registry is empty.\n\n\n var insertionPoint = options.insertionPoint;\n\n if (insertionPoint && typeof insertionPoint === 'string') {\n var comment = findCommentNode(insertionPoint);\n\n if (comment) {\n return {\n parent: comment.parentNode,\n node: comment.nextSibling\n };\n } // If user specifies an insertion point and it can't be found in the document -\n // bad specificity issues may appear.\n\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Insertion point \\\"\" + insertionPoint + \"\\\" not found.\") : void 0;\n }\n\n return false;\n}\n/**\n * Insert style element into the DOM.\n */\n\n\nfunction insertStyle(style, options) {\n var insertionPoint = options.insertionPoint;\n var nextNode = findPrevNode(options);\n\n if (nextNode !== false && nextNode.parent) {\n nextNode.parent.insertBefore(style, nextNode.node);\n return;\n } // Works with iframes and any node types.\n\n\n if (insertionPoint && typeof insertionPoint.nodeType === 'number') {\n var insertionPointElement = insertionPoint;\n var parentNode = insertionPointElement.parentNode;\n if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Insertion point is not in the DOM.') : void 0;\n return;\n }\n\n getHead().appendChild(style);\n}\n/**\n * Read jss nonce setting from the page if the user has set it.\n */\n\n\nvar getNonce = memoize(function () {\n var node = document.querySelector('meta[property=\"csp-nonce\"]');\n return node ? node.getAttribute('content') : null;\n});\n\nvar _insertRule = function insertRule(container, rule, index) {\n try {\n if ('insertRule' in container) {\n container.insertRule(rule, index);\n } // Keyframes rule.\n else if ('appendRule' in container) {\n container.appendRule(rule);\n }\n } catch (err) {\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] \" + err.message) : void 0;\n return false;\n }\n\n return container.cssRules[index];\n};\n\nvar getValidRuleInsertionIndex = function getValidRuleInsertionIndex(container, index) {\n var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong\n\n if (index === undefined || index > maxIndex) {\n // eslint-disable-next-line no-param-reassign\n return maxIndex;\n }\n\n return index;\n};\n\nvar createStyle = function createStyle() {\n var el = document.createElement('style'); // Without it, IE will have a broken source order specificity if we\n // insert rules after we insert the style tag.\n // It seems to kick-off the source order specificity algorithm.\n\n el.textContent = '\\n';\n return el;\n};\n\nvar DomRenderer =\n/*#__PURE__*/\nfunction () {\n // Will be empty if link: true option is not set, because\n // it is only for use together with insertRule API.\n function DomRenderer(sheet) {\n this.getPropertyValue = getPropertyValue;\n this.setProperty = setProperty;\n this.removeProperty = removeProperty;\n this.setSelector = setSelector;\n this.hasInsertedRules = false;\n this.cssRules = [];\n // There is no sheet when the renderer is used from a standalone StyleRule.\n if (sheet) sheets.add(sheet);\n this.sheet = sheet;\n\n var _ref = this.sheet ? this.sheet.options : {},\n media = _ref.media,\n meta = _ref.meta,\n element = _ref.element;\n\n this.element = element || createStyle();\n this.element.setAttribute('data-jss', '');\n if (media) this.element.setAttribute('media', media);\n if (meta) this.element.setAttribute('data-meta', meta);\n var nonce = getNonce();\n if (nonce) this.element.setAttribute('nonce', nonce);\n }\n /**\n * Insert style element into render tree.\n */\n\n\n var _proto = DomRenderer.prototype;\n\n _proto.attach = function attach() {\n // In the case the element node is external and it is already in the DOM.\n if (this.element.parentNode || !this.sheet) return;\n insertStyle(this.element, this.sheet.options); // When rules are inserted using `insertRule` API, after `sheet.detach().attach()`\n // most browsers create a new CSSStyleSheet, except of all IEs.\n\n var deployed = Boolean(this.sheet && this.sheet.deployed);\n\n if (this.hasInsertedRules && deployed) {\n this.hasInsertedRules = false;\n this.deploy();\n }\n }\n /**\n * Remove style element from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.sheet) return;\n var parentNode = this.element.parentNode;\n if (parentNode) parentNode.removeChild(this.element); // In the most browsers, rules inserted using insertRule() API will be lost when style element is removed.\n // Though IE will keep them and we need a consistent behavior.\n\n if (this.sheet.options.link) {\n this.cssRules = [];\n this.element.textContent = '\\n';\n }\n }\n /**\n * Inject CSS string into element.\n */\n ;\n\n _proto.deploy = function deploy() {\n var sheet = this.sheet;\n if (!sheet) return;\n\n if (sheet.options.link) {\n this.insertRules(sheet.rules);\n return;\n }\n\n this.element.textContent = \"\\n\" + sheet.toString() + \"\\n\";\n }\n /**\n * Insert RuleList into an element.\n */\n ;\n\n _proto.insertRules = function insertRules(rules, nativeParent) {\n for (var i = 0; i < rules.index.length; i++) {\n this.insertRule(rules.index[i], i, nativeParent);\n }\n }\n /**\n * Insert a rule into element.\n */\n ;\n\n _proto.insertRule = function insertRule(rule, index, nativeParent) {\n if (nativeParent === void 0) {\n nativeParent = this.element.sheet;\n }\n\n if (rule.rules) {\n var parent = rule;\n var latestNativeParent = nativeParent;\n\n if (rule.type === 'conditional' || rule.type === 'keyframes') {\n var _insertionIndex = getValidRuleInsertionIndex(nativeParent, index); // We need to render the container without children first.\n\n\n latestNativeParent = _insertRule(nativeParent, parent.toString({\n children: false\n }), _insertionIndex);\n\n if (latestNativeParent === false) {\n return false;\n }\n\n this.refCssRule(rule, _insertionIndex, latestNativeParent);\n }\n\n this.insertRules(parent.rules, latestNativeParent);\n return latestNativeParent;\n }\n\n var ruleStr = rule.toString();\n if (!ruleStr) return false;\n var insertionIndex = getValidRuleInsertionIndex(nativeParent, index);\n\n var nativeRule = _insertRule(nativeParent, ruleStr, insertionIndex);\n\n if (nativeRule === false) {\n return false;\n }\n\n this.hasInsertedRules = true;\n this.refCssRule(rule, insertionIndex, nativeRule);\n return nativeRule;\n };\n\n _proto.refCssRule = function refCssRule(rule, index, cssRule) {\n rule.renderable = cssRule; // We only want to reference the top level rules, deleteRule API doesn't support removing nested rules\n // like rules inside media queries or keyframes\n\n if (rule.options.parent instanceof StyleSheet) {\n this.cssRules[index] = cssRule;\n }\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.deleteRule = function deleteRule(cssRule) {\n var sheet = this.element.sheet;\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return true;\n }\n /**\n * Get index of a CSS Rule.\n */\n ;\n\n _proto.indexOf = function indexOf(cssRule) {\n return this.cssRules.indexOf(cssRule);\n }\n /**\n * Generate a new CSS rule and replace the existing one.\n *\n * Only used for some old browsers because they can't set a selector.\n */\n ;\n\n _proto.replaceRule = function replaceRule(cssRule, rule) {\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n this.element.sheet.deleteRule(index);\n this.cssRules.splice(index, 1);\n return this.insertRule(rule, index);\n }\n /**\n * Get all rules elements.\n */\n ;\n\n _proto.getRules = function getRules() {\n return this.element.sheet.cssRules;\n };\n\n return DomRenderer;\n}();\n\nvar instanceCounter = 0;\n\nvar Jss =\n/*#__PURE__*/\nfunction () {\n function Jss(options) {\n this.id = instanceCounter++;\n this.version = \"10.8.2\";\n this.plugins = new PluginsRegistry();\n this.options = {\n id: {\n minify: false\n },\n createGenerateId: createGenerateId,\n Renderer: isInBrowser ? DomRenderer : null,\n plugins: []\n };\n this.generateId = createGenerateId({\n minify: false\n });\n\n for (var i = 0; i < plugins.length; i++) {\n this.plugins.use(plugins[i], {\n queue: 'internal'\n });\n }\n\n this.setup(options);\n }\n /**\n * Prepares various options, applies plugins.\n * Should not be used twice on the same instance, because there is no plugins\n * deduplication logic.\n */\n\n\n var _proto = Jss.prototype;\n\n _proto.setup = function setup(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (options.createGenerateId) {\n this.options.createGenerateId = options.createGenerateId;\n }\n\n if (options.id) {\n this.options.id = _extends({}, this.options.id, options.id);\n }\n\n if (options.createGenerateId || options.id) {\n this.generateId = this.options.createGenerateId(this.options.id);\n }\n\n if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint;\n\n if ('Renderer' in options) {\n this.options.Renderer = options.Renderer;\n } // eslint-disable-next-line prefer-spread\n\n\n if (options.plugins) this.use.apply(this, options.plugins);\n return this;\n }\n /**\n * Create a Style Sheet.\n */\n ;\n\n _proto.createStyleSheet = function createStyleSheet(styles, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n index = _options.index;\n\n if (typeof index !== 'number') {\n index = sheets.index === 0 ? 0 : sheets.index + 1;\n }\n\n var sheet = new StyleSheet(styles, _extends({}, options, {\n jss: this,\n generateId: options.generateId || this.generateId,\n insertionPoint: this.options.insertionPoint,\n Renderer: this.options.Renderer,\n index: index\n }));\n this.plugins.onProcessSheet(sheet);\n return sheet;\n }\n /**\n * Detach the Style Sheet and remove it from the registry.\n */\n ;\n\n _proto.removeStyleSheet = function removeStyleSheet(sheet) {\n sheet.detach();\n sheets.remove(sheet);\n return this;\n }\n /**\n * Create a rule without a Style Sheet.\n * [Deprecated] will be removed in the next major version.\n */\n ;\n\n _proto.createRule = function createRule$1(name, style, options) {\n if (style === void 0) {\n style = {};\n }\n\n if (options === void 0) {\n options = {};\n }\n\n // Enable rule without name for inline styles.\n if (typeof name === 'object') {\n return this.createRule(undefined, name, style);\n }\n\n var ruleOptions = _extends({}, options, {\n name: name,\n jss: this,\n Renderer: this.options.Renderer\n });\n\n if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId;\n if (!ruleOptions.classes) ruleOptions.classes = {};\n if (!ruleOptions.keyframes) ruleOptions.keyframes = {};\n\n var rule = createRule(name, style, ruleOptions);\n\n if (rule) this.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Register plugin. Passed function will be invoked with a rule instance.\n */\n ;\n\n _proto.use = function use() {\n var _this = this;\n\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n plugins.forEach(function (plugin) {\n _this.plugins.use(plugin);\n });\n return this;\n };\n\n return Jss;\n}();\n\nvar createJss = function createJss(options) {\n return new Jss(options);\n};\n\n/**\n * SheetsManager is like a WeakMap which is designed to count StyleSheet\n * instances and attach/detach automatically.\n * Used in react-jss.\n */\n\nvar SheetsManager =\n/*#__PURE__*/\nfunction () {\n function SheetsManager() {\n this.length = 0;\n this.sheets = new WeakMap();\n }\n\n var _proto = SheetsManager.prototype;\n\n _proto.get = function get(key) {\n var entry = this.sheets.get(key);\n return entry && entry.sheet;\n };\n\n _proto.add = function add(key, sheet) {\n if (this.sheets.has(key)) return;\n this.length++;\n this.sheets.set(key, {\n sheet: sheet,\n refs: 0\n });\n };\n\n _proto.manage = function manage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs === 0) {\n entry.sheet.attach();\n }\n\n entry.refs++;\n return entry.sheet;\n }\n\n warning(false, \"[JSS] SheetsManager: can't find sheet to manage\");\n return undefined;\n };\n\n _proto.unmanage = function unmanage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs > 0) {\n entry.refs--;\n if (entry.refs === 0) entry.sheet.detach();\n }\n } else {\n warning(false, \"SheetsManager: can't find sheet to unmanage\");\n }\n };\n\n _createClass(SheetsManager, [{\n key: \"size\",\n get: function get() {\n return this.length;\n }\n }]);\n\n return SheetsManager;\n}();\n\n/**\n* Export a constant indicating if this browser has CSSTOM support.\n* https://developers.google.com/web/updates/2018/03/cssom\n*/\nvar hasCSSTOMSupport = typeof CSS === 'object' && CSS != null && 'number' in CSS;\n\n/**\n * Extracts a styles object with only props that contain function values.\n */\nfunction getDynamicStyles(styles) {\n var to = null;\n\n for (var key in styles) {\n var value = styles[key];\n var type = typeof value;\n\n if (type === 'function') {\n if (!to) to = {};\n to[key] = value;\n } else if (type === 'object' && value !== null && !Array.isArray(value)) {\n var extracted = getDynamicStyles(value);\n\n if (extracted) {\n if (!to) to = {};\n to[key] = extracted;\n }\n }\n }\n\n return to;\n}\n\n/**\n * A better abstraction over CSS.\n *\n * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present\n * @website https://github.com/cssinjs/jss\n * @license MIT\n */\nvar index = createJss();\n\nexport default index;\nexport { RuleList, SheetsManager, SheetsRegistry, createJss as create, createGenerateId, createRule, getDynamicStyles, hasCSSTOMSupport, sheets, toCssValue };\n","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/*\n * Helper function for padArray\n */\nfunction padArrayChunk({source, target, start = 0, end, size, getData}) {\n end = end || target.length;\n\n const sourceLength = source.length;\n const targetLength = end - start;\n\n if (sourceLength > targetLength) {\n target.set(source.subarray(0, targetLength), start);\n return;\n }\n\n target.set(source, start);\n\n if (!getData) {\n return;\n }\n\n // source is not large enough to fill target space, call `getData` to get filler data\n let i = sourceLength;\n while (i < targetLength) {\n const datum = getData(i, source);\n for (let j = 0; j < size; j++) {\n target[start + i] = datum[j] || 0;\n i++;\n }\n }\n}\n\n/*\n * The padArray function stretches a source array to the size of a target array.\n The arrays can have internal structures (like the attributes of PathLayer and\n SolidPolygonLayer), defined by the optional sourceStartIndices and targetStartIndices parameters.\n If the target array is larger, the getData callback is used to fill in the blanks.\n * @params {TypedArray} source - original data\n * @params {TypedArray} target - output data\n * @params {Number} size - length per datum\n * @params {Function} getData - callback to get new data when source is short\n * @params {Array<Number>} [sourceStartIndices] - subdivision of the original data in [object0StartIndex, object1StartIndex, ...]\n * @params {Array<Number>} [targetStartIndices] - subdivision of the output data in [object0StartIndex, object1StartIndex, ...]\n */\nexport function padArray({source, target, size, getData, sourceStartIndices, targetStartIndices}) {\n if (!Array.isArray(targetStartIndices)) {\n // Flat arrays\n padArrayChunk({\n source,\n target,\n size,\n getData\n });\n return target;\n }\n\n // Arrays have internal structure\n let sourceIndex = 0;\n let targetIndex = 0;\n const getChunkData = getData && ((i, chunk) => getData(i + targetIndex, chunk));\n\n const n = Math.min(sourceStartIndices.length, targetStartIndices.length);\n\n for (let i = 1; i < n; i++) {\n const nextSourceIndex = sourceStartIndices[i] * size;\n const nextTargetIndex = targetStartIndices[i] * size;\n\n padArrayChunk({\n source: source.subarray(sourceIndex, nextSourceIndex),\n target,\n start: targetIndex,\n end: nextTargetIndex,\n size,\n getData: getChunkData\n });\n\n sourceIndex = nextSourceIndex;\n targetIndex = nextTargetIndex;\n }\n\n if (targetIndex < target.length) {\n padArrayChunk({\n source: [],\n target,\n start: targetIndex,\n size,\n getData: getChunkData\n });\n }\n\n return target;\n}\n","import {padArray} from '../../utils/array-utils';\n\nconst DEFAULT_TRANSITION_SETTINGS = {\n interpolation: {\n duration: 0,\n easing: t => t\n },\n spring: {\n stiffness: 0.05,\n damping: 0.5\n }\n};\n\nexport function normalizeTransitionSettings(userSettings, layerSettings) {\n if (!userSettings) {\n return null;\n }\n if (Number.isFinite(userSettings)) {\n userSettings = {duration: userSettings};\n }\n userSettings.type = userSettings.type || 'interpolation';\n return {\n ...DEFAULT_TRANSITION_SETTINGS[userSettings.type],\n ...layerSettings,\n ...userSettings\n };\n}\n\n// NOTE: NOT COPYING OVER OFFSET OR STRIDE HERE BECAUSE:\n// (1) WE DON'T SUPPORT INTERLEAVED BUFFERS FOR TRANSITIONS\n// (2) BUFFERS WITH OFFSETS ALWAYS CONTAIN VALUES OF THE SAME SIZE\n// (3) THE OPERATIONS IN THE SHADER ARE PER-COMPONENT (addition and scaling)\nexport function getSourceBufferAttribute(gl, attribute) {\n // The Attribute we pass to Transform as a sourceBuffer must have {divisor: 0}\n // so we create a copy of the attribute (with divisor=0) to use when running\n // transform feedback\n const buffer = attribute.getBuffer();\n if (buffer) {\n return [\n attribute.getBuffer(),\n {\n divisor: 0,\n size: attribute.size,\n normalized: attribute.settings.normalized\n }\n ];\n }\n // constant\n // don't pass normalized here because the `value` from a normalized attribute is\n // already normalized\n return attribute.value;\n}\n\nexport function getAttributeTypeFromSize(size) {\n switch (size) {\n case 1:\n return 'float';\n case 2:\n return 'vec2';\n case 3:\n return 'vec3';\n case 4:\n return 'vec4';\n default:\n throw new Error(`No defined attribute type for size \"${size}\"`);\n }\n}\n\nexport function cycleBuffers(buffers) {\n buffers.push(buffers.shift());\n}\n\nexport function getAttributeBufferLength(attribute, numInstances) {\n const {doublePrecision, settings, value, size} = attribute;\n const multiplier = doublePrecision && value instanceof Float64Array ? 2 : 1;\n return (settings.noAlloc ? value.length : numInstances * size) * multiplier;\n}\n\n// This helper is used when transitioning attributes from a set of values in one buffer layout\n// to a set of values in a different buffer layout. (Buffer layouts are used when attribute values\n// within a buffer should be grouped for drawElements, like the Polygon layer.) For example, a\n// buffer layout of [3, 4] might have data [A1, A2, A3, B1, B2, B3, B4]. If it needs to transition\n// to a buffer layout of [4, 2], it should produce a buffer, using the transition setting's `enter`\n// function, that looks like this: [A1, A2, A3, A4 (user `enter` fn), B1, B2, 0]. Note: the final\n// 0 in this buffer is because we never shrink buffers, only grow them, for performance reasons.\nexport function padBuffer({\n buffer,\n numInstances,\n attribute,\n fromLength,\n fromStartIndices,\n getData = x => x\n}) {\n // TODO: move the precisionMultiplier logic to the attribute when retrieving\n // its `size` and `elementOffset`?\n const precisionMultiplier =\n attribute.doublePrecision && attribute.value instanceof Float64Array ? 2 : 1;\n const size = attribute.size * precisionMultiplier;\n const byteOffset = attribute.byteOffset;\n const toStartIndices = attribute.startIndices;\n const hasStartIndices = fromStartIndices && toStartIndices;\n const toLength = getAttributeBufferLength(attribute, numInstances);\n const isConstant = attribute.state.constant;\n\n // check if buffer needs to be padded\n if (!hasStartIndices && fromLength >= toLength) {\n return;\n }\n\n const toData = isConstant\n ? attribute.value\n : attribute.getBuffer().getData({srcByteOffset: byteOffset});\n if (attribute.settings.normalized && !isConstant) {\n const getter = getData;\n getData = (value, chunk) => attribute._normalizeConstant(getter(value, chunk));\n }\n\n const getMissingData = isConstant\n ? (i, chunk) => getData(toData, chunk)\n : (i, chunk) => getData(toData.subarray(i, i + size), chunk);\n\n const source = buffer.getData({length: fromLength});\n const data = new Float32Array(toLength);\n padArray({\n source,\n target: data,\n sourceStartIndices: fromStartIndices,\n targetStartIndices: toStartIndices,\n size,\n getData: getMissingData\n });\n\n // TODO: support offset in buffer.setData?\n if (buffer.byteLength < data.byteLength + byteOffset) {\n buffer.reallocate(data.byteLength + byteOffset);\n }\n buffer.subData({data, offset: byteOffset});\n}\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar helpers_1 = require(\"@turf/helpers\");\r\n/**\r\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\r\n *\r\n * @name getCoord\r\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\r\n * @returns {Array<number>} coordinates\r\n * @example\r\n * var pt = turf.point([10, 10]);\r\n *\r\n * var coord = turf.getCoord(pt);\r\n * //= [10, 10]\r\n */\r\nfunction getCoord(coord) {\r\n if (!coord) {\r\n throw new Error(\"coord is required\");\r\n }\r\n if (!Array.isArray(coord)) {\r\n if (coord.type === \"Feature\" && coord.geometry !== null && coord.geometry.type === \"Point\") {\r\n return coord.geometry.coordinates;\r\n }\r\n if (coord.type === \"Point\") {\r\n return coord.coordinates;\r\n }\r\n }\r\n if (Array.isArray(coord) && coord.length >= 2 && !Array.isArray(coord[0]) && !Array.isArray(coord[1])) {\r\n return coord;\r\n }\r\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\r\n}\r\nexports.getCoord = getCoord;\r\n/**\r\n * Unwrap coordinates from a Feature, Geometry Object or an Array\r\n *\r\n * @name getCoords\r\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\r\n * @returns {Array<any>} coordinates\r\n * @example\r\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\r\n *\r\n * var coords = turf.getCoords(poly);\r\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\r\n */\r\nfunction getCoords(coords) {\r\n if (Array.isArray(coords)) {\r\n return coords;\r\n }\r\n // Feature\r\n if (coords.type === \"Feature\") {\r\n if (coords.geometry !== null) {\r\n return coords.geometry.coordinates;\r\n }\r\n }\r\n else {\r\n // Geometry\r\n if (coords.coordinates) {\r\n return coords.coordinates;\r\n }\r\n }\r\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\r\n}\r\nexports.getCoords = getCoords;\r\n/**\r\n * Checks if coordinates contains a number\r\n *\r\n * @name containsNumber\r\n * @param {Array<any>} coordinates GeoJSON Coordinates\r\n * @returns {boolean} true if Array contains a number\r\n */\r\nfunction containsNumber(coordinates) {\r\n if (coordinates.length > 1 && helpers_1.isNumber(coordinates[0]) && helpers_1.isNumber(coordinates[1])) {\r\n return true;\r\n }\r\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\r\n return containsNumber(coordinates[0]);\r\n }\r\n throw new Error(\"coordinates must only contain numbers\");\r\n}\r\nexports.containsNumber = containsNumber;\r\n/**\r\n * Enforce expectations about types of GeoJSON objects for Turf.\r\n *\r\n * @name geojsonType\r\n * @param {GeoJSON} value any GeoJSON object\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} if value is not the expected type.\r\n */\r\nfunction geojsonType(value, type, name) {\r\n if (!type || !name) {\r\n throw new Error(\"type and name required\");\r\n }\r\n if (!value || value.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + value.type);\r\n }\r\n}\r\nexports.geojsonType = geojsonType;\r\n/**\r\n * Enforce expectations about types of {@link Feature} inputs for Turf.\r\n * Internally this uses {@link geojsonType} to judge geometry types.\r\n *\r\n * @name featureOf\r\n * @param {Feature} feature a feature with an expected geometry type\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} error if value is not the expected type.\r\n */\r\nfunction featureOf(feature, type, name) {\r\n if (!feature) {\r\n throw new Error(\"No feature passed\");\r\n }\r\n if (!name) {\r\n throw new Error(\".featureOf() requires a name\");\r\n }\r\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\r\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\r\n }\r\n if (!feature.geometry || feature.geometry.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + feature.geometry.type);\r\n }\r\n}\r\nexports.featureOf = featureOf;\r\n/**\r\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\r\n * Internally this uses {@link geojsonType} to judge geometry types.\r\n *\r\n * @name collectionOf\r\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\r\n * @param {string} type expected GeoJSON type\r\n * @param {string} name name of calling function\r\n * @throws {Error} if value is not the expected type.\r\n */\r\nfunction collectionOf(featureCollection, type, name) {\r\n if (!featureCollection) {\r\n throw new Error(\"No featureCollection passed\");\r\n }\r\n if (!name) {\r\n throw new Error(\".collectionOf() requires a name\");\r\n }\r\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\r\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\r\n }\r\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\r\n var feature = _a[_i];\r\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\r\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\r\n }\r\n if (!feature.geometry || feature.geometry.type !== type) {\r\n throw new Error(\"Invalid input to \" + name + \": must be a \" + type + \", given \" + feature.geometry.type);\r\n }\r\n }\r\n}\r\nexports.collectionOf = collectionOf;\r\n/**\r\n * Get Geometry from Feature or Geometry Object\r\n *\r\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\r\n * @returns {Geometry|null} GeoJSON Geometry Object\r\n * @throws {Error} if geojson is not a Feature or Geometry Object\r\n * @example\r\n * var point = {\r\n * \"type\": \"Feature\",\r\n * \"properties\": {},\r\n * \"geometry\": {\r\n * \"type\": \"Point\",\r\n * \"coordinates\": [110, 40]\r\n * }\r\n * }\r\n * var geom = turf.getGeom(point)\r\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\r\n */\r\nfunction getGeom(geojson) {\r\n if (geojson.type === \"Feature\") {\r\n return geojson.geometry;\r\n }\r\n return geojson;\r\n}\r\nexports.getGeom = getGeom;\r\n/**\r\n * Get GeoJSON object's type, Geometry type is prioritize.\r\n *\r\n * @param {GeoJSON} geojson GeoJSON object\r\n * @param {string} [name=\"geojson\"] name of the variable to display in error message\r\n * @returns {string} GeoJSON type\r\n * @example\r\n * var point = {\r\n * \"type\": \"Feature\",\r\n * \"properties\": {},\r\n * \"geometry\": {\r\n * \"type\": \"Point\",\r\n * \"coordinates\": [110, 40]\r\n * }\r\n * }\r\n * var geom = turf.getType(point)\r\n * //=\"Point\"\r\n */\r\nfunction getType(geojson, name) {\r\n if (geojson.type === \"FeatureCollection\") {\r\n return \"FeatureCollection\";\r\n }\r\n if (geojson.type === \"GeometryCollection\") {\r\n return \"GeometryCollection\";\r\n }\r\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\r\n return geojson.geometry.type;\r\n }\r\n return geojson.type;\r\n}\r\nexports.getType = getType;\r\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.format()\n this.raw = this.version\n return this\n }\n}\n\nmodule.exports = SemVer\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","// Returns true if given object is empty, false otherwise.\nexport function isObjectEmpty(object) {\n for (const key in object) {\n return false;\n }\n return true;\n}\n\nexport function deepArrayEqual(x, y) {\n if (x === y) {\n return true;\n }\n const isArrayX = Array.isArray(x) || ArrayBuffer.isView(x);\n const isArrayY = Array.isArray(y) || ArrayBuffer.isView(y);\n if (isArrayX && isArrayY && x.length === y.length) {\n for (let i = 0; i < x.length; ++i) {\n if (x[i] !== y[i]) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n","import {assert} from '../utils/assert';\n\n// Resolve a WebGL enumeration name (returns itself if already a number)\nexport function getKeyValue(gl, name) {\n // If not a string, return (assume number)\n if (typeof name !== 'string') {\n return name;\n }\n\n // If string converts to number, return number\n const number = Number(name);\n if (!isNaN(number)) {\n return number;\n }\n\n // Look up string, after removing any 'GL.' or 'gl.' prefix\n name = name.replace(/^.*\\./, '');\n const value = gl[name];\n assert(value !== undefined, `Accessing undefined constant GL.${name}`);\n return value;\n}\n\nexport function getKey(gl, value) {\n value = Number(value);\n for (const key in gl) {\n if (gl[key] === value) {\n return `GL.${key}`;\n }\n }\n return String(value);\n}\n\nexport function getKeyType(gl, value) {\n assert(value !== undefined, 'undefined key');\n value = Number(value);\n for (const key in gl) {\n if (gl[key] === value) {\n return `GL.${key}`;\n }\n }\n return String(value);\n}\n","/**\n * @license Complex.js v2.0.11 11/02/2016\n *\n * Copyright (c) 2016, Robert Eisele (robert@xarg.org)\n * Dual licensed under the MIT or GPL Version 2 licenses.\n **/\n\n/**\n *\n * This class allows the manipulation of complex numbers.\n * You can pass a complex number in different formats. Either as object, double, string or two integer parameters.\n *\n * Object form\n * { re: <real>, im: <imaginary> }\n * { arg: <angle>, abs: <radius> }\n * { phi: <angle>, r: <radius> }\n *\n * Array / Vector form\n * [ real, imaginary ]\n *\n * Double form\n * 99.3 - Single double value\n *\n * String form\n * '23.1337' - Simple real number\n * '15+3i' - a simple complex number\n * '3-i' - a simple complex number\n *\n * Example:\n *\n * var c = new Complex('99.3+8i');\n * c.mul({r: 3, i: 9}).div(4.9).sub(3, 2);\n *\n */\n\n(function(root) {\n\n 'use strict';\n\n var cosh = function(x) {\n return (Math.exp(x) + Math.exp(-x)) * 0.5;\n };\n\n var sinh = function(x) {\n return (Math.exp(x) - Math.exp(-x)) * 0.5;\n };\n\n /**\n * Calculates cos(x) - 1 using Taylor series if x is small.\n *\n * @param {number} x\n * @returns {number} cos(x) - 1\n */\n\n var cosm1 = function(x) {\n var limit = Math.PI/4;\n if (x < -limit || x > limit) {\n return (Math.cos(x) - 1.0);\n }\n\n var xx = x * x;\n return xx *\n (-0.5 + xx *\n (1/24 + xx *\n (-1/720 + xx *\n (1/40320 + xx *\n (-1/3628800 + xx *\n (1/4790014600 + xx *\n (-1/87178291200 + xx *\n (1/20922789888000)\n )\n )\n )\n )\n )\n )\n )\n };\n\n var hypot = function(x, y) {\n\n var a = Math.abs(x);\n var b = Math.abs(y);\n\n if (a < 3000 && b < 3000) {\n return Math.sqrt(a * a + b * b);\n }\n\n if (a < b) {\n a = b;\n b = x / y;\n } else {\n b = y / x;\n }\n return a * Math.sqrt(1 + b * b);\n };\n\n var parser_exit = function() {\n throw SyntaxError('Invalid Param');\n };\n\n /**\n * Calculates log(sqrt(a^2+b^2)) in a way to avoid overflows\n *\n * @param {number} a\n * @param {number} b\n * @returns {number}\n */\n function logHypot(a, b) {\n\n var _a = Math.abs(a);\n var _b = Math.abs(b);\n\n if (a === 0) {\n return Math.log(_b);\n }\n\n if (b === 0) {\n return Math.log(_a);\n }\n\n if (_a < 3000 && _b < 3000) {\n return Math.log(a * a + b * b) * 0.5;\n }\n\n /* I got 4 ideas to compute this property without overflow:\n *\n * Testing 1000000 times with random samples for a,b ∈ [1, 1000000000] against a big decimal library to get an error estimate\n *\n * 1. Only eliminate the square root: (OVERALL ERROR: 3.9122483030951116e-11)\n\n Math.log(a * a + b * b) / 2\n\n *\n *\n * 2. Try to use the non-overflowing pythagoras: (OVERALL ERROR: 8.889760039210159e-10)\n\n var fn = function(a, b) {\n a = Math.abs(a);\n b = Math.abs(b);\n var t = Math.min(a, b);\n a = Math.max(a, b);\n t = t / a;\n\n return Math.log(a) + Math.log(1 + t * t) / 2;\n };\n\n * 3. Abuse the identity cos(atan(y/x) = x / sqrt(x^2+y^2): (OVERALL ERROR: 3.4780178737037204e-10)\n\n Math.log(a / Math.cos(Math.atan2(b, a)))\n\n * 4. Use 3. and apply log rules: (OVERALL ERROR: 1.2014087502620896e-9)\n\n Math.log(a) - Math.log(Math.cos(Math.atan2(b, a)))\n\n */\n\n return Math.log(a / Math.cos(Math.atan2(b, a)));\n }\n\n var parse = function(a, b) {\n\n var z = {'re': 0, 'im': 0};\n\n if (a === undefined || a === null) {\n z['re'] =\n z['im'] = 0;\n } else if (b !== undefined) {\n z['re'] = a;\n z['im'] = b;\n } else\n switch (typeof a) {\n\n case 'object':\n\n if ('im' in a && 're' in a) {\n z['re'] = a['re'];\n z['im'] = a['im'];\n } else if ('abs' in a && 'arg' in a) {\n if (!Number.isFinite(a['abs']) && Number.isFinite(a['arg'])) {\n return Complex['INFINITY'];\n }\n z['re'] = a['abs'] * Math.cos(a['arg']);\n z['im'] = a['abs'] * Math.sin(a['arg']);\n } else if ('r' in a && 'phi' in a) {\n if (!Number.isFinite(a['r']) && Number.isFinite(a['phi'])) {\n return Complex['INFINITY'];\n }\n z['re'] = a['r'] * Math.cos(a['phi']);\n z['im'] = a['r'] * Math.sin(a['phi']);\n } else if (a.length === 2) { // Quick array check\n z['re'] = a[0];\n z['im'] = a[1];\n } else {\n parser_exit();\n }\n break;\n\n case 'string':\n\n z['im'] = /* void */\n z['re'] = 0;\n\n var tokens = a.match(/\\d+\\.?\\d*e[+-]?\\d+|\\d+\\.?\\d*|\\.\\d+|./g);\n var plus = 1;\n var minus = 0;\n\n if (tokens === null) {\n parser_exit();\n }\n\n for (var i = 0; i < tokens.length; i++) {\n\n var c = tokens[i];\n\n if (c === ' ' || c === '\\t' || c === '\\n') {\n /* void */\n } else if (c === '+') {\n plus++;\n } else if (c === '-') {\n minus++;\n } else if (c === 'i' || c === 'I') {\n\n if (plus + minus === 0) {\n parser_exit();\n }\n\n if (tokens[i + 1] !== ' ' && !isNaN(tokens[i + 1])) {\n z['im'] += parseFloat((minus % 2 ? '-' : '') + tokens[i + 1]);\n i++;\n } else {\n z['im'] += parseFloat((minus % 2 ? '-' : '') + '1');\n }\n plus = minus = 0;\n\n } else {\n\n if (plus + minus === 0 || isNaN(c)) {\n parser_exit();\n }\n\n if (tokens[i + 1] === 'i' || tokens[i + 1] === 'I') {\n z['im'] += parseFloat((minus % 2 ? '-' : '') + c);\n i++;\n } else {\n z['re'] += parseFloat((minus % 2 ? '-' : '') + c);\n }\n plus = minus = 0;\n }\n }\n\n // Still something on the stack\n if (plus + minus > 0) {\n parser_exit();\n }\n break;\n\n case 'number':\n z['im'] = 0;\n z['re'] = a;\n break;\n\n default:\n parser_exit();\n }\n\n if (isNaN(z['re']) || isNaN(z['im'])) {\n // If a calculation is NaN, we treat it as NaN and don't throw\n //parser_exit();\n }\n\n return z;\n };\n\n /**\n * @constructor\n * @returns {Complex}\n */\n function Complex(a, b) {\n\n if (!(this instanceof Complex)) {\n return new Complex(a, b);\n }\n\n var z = parse(a, b);\n\n this['re'] = z['re'];\n this['im'] = z['im'];\n }\n\n Complex.prototype = {\n\n 're': 0,\n 'im': 0,\n\n /**\n * Calculates the sign of a complex number, which is a normalized complex\n *\n * @returns {Complex}\n */\n 'sign': function() {\n\n var abs = this['abs']();\n\n return new Complex(\n this['re'] / abs,\n this['im'] / abs);\n },\n\n /**\n * Adds two complex numbers\n *\n * @returns {Complex}\n */\n 'add': function(a, b) {\n\n var z = new Complex(a, b);\n\n // Infinity + Infinity = NaN\n if (this['isInfinite']() && z['isInfinite']()) {\n return Complex['NAN'];\n }\n\n // Infinity + z = Infinity { where z != Infinity }\n if (this['isInfinite']() || z['isInfinite']()) {\n return Complex['INFINITY'];\n }\n\n return new Complex(\n this['re'] + z['re'],\n this['im'] + z['im']);\n },\n\n /**\n * Subtracts two complex numbers\n *\n * @returns {Complex}\n */\n 'sub': function(a, b) {\n\n var z = new Complex(a, b);\n\n // Infinity - Infinity = NaN\n if (this['isInfinite']() && z['isInfinite']()) {\n return Complex['NAN'];\n }\n\n // Infinity - z = Infinity { where z != Infinity }\n if (this['isInfinite']() || z['isInfinite']()) {\n return Complex['INFINITY'];\n }\n\n return new Complex(\n this['re'] - z['re'],\n this['im'] - z['im']);\n },\n\n /**\n * Multiplies two complex numbers\n *\n * @returns {Complex}\n */\n 'mul': function(a, b) {\n\n var z = new Complex(a, b);\n\n // Infinity * 0 = NaN\n if ((this['isInfinite']() && z['isZero']()) || (this['isZero']() && z['isInfinite']())) {\n return Complex['NAN'];\n }\n\n // Infinity * z = Infinity { where z != 0 }\n if (this['isInfinite']() || z['isInfinite']()) {\n return Complex['INFINITY'];\n }\n\n // Short circuit for real values\n if (z['im'] === 0 && this['im'] === 0) {\n return new Complex(this['re'] * z['re'], 0);\n }\n\n return new Complex(\n this['re'] * z['re'] - this['im'] * z['im'],\n this['re'] * z['im'] + this['im'] * z['re']);\n },\n\n /**\n * Divides two complex numbers\n *\n * @returns {Complex}\n */\n 'div': function(a, b) {\n\n var z = new Complex(a, b);\n\n // 0 / 0 = NaN and Infinity / Infinity = NaN\n if ((this['isZero']() && z['isZero']()) || (this['isInfinite']() && z['isInfinite']())) {\n return Complex['NAN'];\n }\n\n // Infinity / 0 = Infinity\n if (this['isInfinite']() || z['isZero']()) {\n return Complex['INFINITY'];\n }\n\n // 0 / Infinity = 0\n if (this['isZero']() || z['isInfinite']()) {\n return Complex['ZERO'];\n }\n\n a = this['re'];\n b = this['im'];\n\n var c = z['re'];\n var d = z['im'];\n var t, x;\n\n if (0 === d) {\n // Divisor is real\n return new Complex(a / c, b / c);\n }\n\n if (Math.abs(c) < Math.abs(d)) {\n\n x = c / d;\n t = c * x + d;\n\n return new Complex(\n (a * x + b) / t,\n (b * x - a) / t);\n\n } else {\n\n x = d / c;\n t = d * x + c;\n\n return new Complex(\n (a + b * x) / t,\n (b - a * x) / t);\n }\n },\n\n /**\n * Calculate the power of two complex numbers\n *\n * @returns {Complex}\n */\n 'pow': function(a, b) {\n\n var z = new Complex(a, b);\n\n a = this['re'];\n b = this['im'];\n\n if (z['isZero']()) {\n return Complex['ONE'];\n }\n\n // If the exponent is real\n if (z['im'] === 0) {\n\n if (b === 0 && a >= 0) {\n\n return new Complex(Math.pow(a, z['re']), 0);\n\n } else if (a === 0) { // If base is fully imaginary\n\n switch ((z['re'] % 4 + 4) % 4) {\n case 0:\n return new Complex(Math.pow(b, z['re']), 0);\n case 1:\n return new Complex(0, Math.pow(b, z['re']));\n case 2:\n return new Complex(-Math.pow(b, z['re']), 0);\n case 3:\n return new Complex(0, -Math.pow(b, z['re']));\n }\n }\n }\n\n /* I couldn't find a good formula, so here is a derivation and optimization\n *\n * z_1^z_2 = (a + bi)^(c + di)\n * = exp((c + di) * log(a + bi)\n * = pow(a^2 + b^2, (c + di) / 2) * exp(i(c + di)atan2(b, a))\n * =>...\n * Re = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * cos(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\n * Im = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * sin(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\n *\n * =>...\n * Re = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * cos(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\n * Im = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * sin(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\n *\n * =>\n * Re = exp(c * logsq2 - d * arg(z_1)) * cos(d * logsq2 + c * arg(z_1))\n * Im = exp(c * logsq2 - d * arg(z_1)) * sin(d * logsq2 + c * arg(z_1))\n *\n */\n\n if (a === 0 && b === 0 && z['re'] > 0 && z['im'] >= 0) {\n return Complex['ZERO'];\n }\n\n var arg = Math.atan2(b, a);\n var loh = logHypot(a, b);\n\n a = Math.exp(z['re'] * loh - z['im'] * arg);\n b = z['im'] * loh + z['re'] * arg;\n return new Complex(\n a * Math.cos(b),\n a * Math.sin(b));\n },\n\n /**\n * Calculate the complex square root\n *\n * @returns {Complex}\n */\n 'sqrt': function() {\n\n var a = this['re'];\n var b = this['im'];\n var r = this['abs']();\n\n var re, im;\n\n if (a >= 0) {\n\n if (b === 0) {\n return new Complex(Math.sqrt(a), 0);\n }\n\n re = 0.5 * Math.sqrt(2.0 * (r + a));\n } else {\n re = Math.abs(b) / Math.sqrt(2 * (r - a));\n }\n\n if (a <= 0) {\n im = 0.5 * Math.sqrt(2.0 * (r - a));\n } else {\n im = Math.abs(b) / Math.sqrt(2 * (r + a));\n }\n\n return new Complex(re, b < 0 ? -im : im);\n },\n\n /**\n * Calculate the complex exponent\n *\n * @returns {Complex}\n */\n 'exp': function() {\n\n var tmp = Math.exp(this['re']);\n\n if (this['im'] === 0) {\n //return new Complex(tmp, 0);\n }\n return new Complex(\n tmp * Math.cos(this['im']),\n tmp * Math.sin(this['im']));\n },\n\n /**\n * Calculate the complex exponent and subtracts one.\n *\n * This may be more accurate than `Complex(x).exp().sub(1)` if\n * `x` is small.\n *\n * @returns {Complex}\n */\n 'expm1': function() {\n\n /**\n * exp(a + i*b) - 1\n = exp(a) * (cos(b) + j*sin(b)) - 1\n = expm1(a)*cos(b) + cosm1(b) + j*exp(a)*sin(b)\n */\n\n var a = this['re'];\n var b = this['im'];\n\n return new Complex(\n Math.expm1(a) * Math.cos(b) + cosm1(b),\n Math.exp(a) * Math.sin(b));\n },\n\n /**\n * Calculate the natural log\n *\n * @returns {Complex}\n */\n 'log': function() {\n\n var a = this['re'];\n var b = this['im'];\n\n if (b === 0 && a > 0) {\n //return new Complex(Math.log(a), 0);\n }\n\n return new Complex(\n logHypot(a, b),\n Math.atan2(b, a));\n },\n\n /**\n * Calculate the magnitude of the complex number\n *\n * @returns {number}\n */\n 'abs': function() {\n\n return hypot(this['re'], this['im']);\n },\n\n /**\n * Calculate the angle of the complex number\n *\n * @returns {number}\n */\n 'arg': function() {\n\n return Math.atan2(this['im'], this['re']);\n },\n\n /**\n * Calculate the sine of the complex number\n *\n * @returns {Complex}\n */\n 'sin': function() {\n\n // sin(c) = (e^b - e^(-b)) / (2i)\n\n var a = this['re'];\n var b = this['im'];\n\n return new Complex(\n Math.sin(a) * cosh(b),\n Math.cos(a) * sinh(b));\n },\n\n /**\n * Calculate the cosine\n *\n * @returns {Complex}\n */\n 'cos': function() {\n\n // cos(z) = (e^b + e^(-b)) / 2\n\n var a = this['re'];\n var b = this['im'];\n\n return new Complex(\n Math.cos(a) * cosh(b),\n -Math.sin(a) * sinh(b));\n },\n\n /**\n * Calculate the tangent\n *\n * @returns {Complex}\n */\n 'tan': function() {\n\n // tan(c) = (e^(ci) - e^(-ci)) / (i(e^(ci) + e^(-ci)))\n\n var a = 2 * this['re'];\n var b = 2 * this['im'];\n var d = Math.cos(a) + cosh(b);\n\n return new Complex(\n Math.sin(a) / d,\n sinh(b) / d);\n },\n\n /**\n * Calculate the cotangent\n *\n * @returns {Complex}\n */\n 'cot': function() {\n\n // cot(c) = i(e^(ci) + e^(-ci)) / (e^(ci) - e^(-ci))\n\n var a = 2 * this['re'];\n var b = 2 * this['im'];\n var d = Math.cos(a) - cosh(b);\n\n return new Complex(\n -Math.sin(a) / d,\n sinh(b) / d);\n },\n\n /**\n * Calculate the secant\n *\n * @returns {Complex}\n */\n 'sec': function() {\n\n // sec(c) = 2 / (e^(ci) + e^(-ci))\n\n var a = this['re'];\n var b = this['im'];\n var d = 0.5 * cosh(2 * b) + 0.5 * Math.cos(2 * a);\n\n return new Complex(\n Math.cos(a) * cosh(b) / d,\n Math.sin(a) * sinh(b) / d);\n },\n\n /**\n * Calculate the cosecans\n *\n * @returns {Complex}\n */\n 'csc': function() {\n\n // csc(c) = 2i / (e^(ci) - e^(-ci))\n\n var a = this['re'];\n var b = this['im'];\n var d = 0.5 * cosh(2 * b) - 0.5 * Math.cos(2 * a);\n\n return new Complex(\n Math.sin(a) * cosh(b) / d,\n -Math.cos(a) * sinh(b) / d);\n },\n\n /**\n * Calculate the complex arcus sinus\n *\n * @returns {Complex}\n */\n 'asin': function() {\n\n // asin(c) = -i * log(ci + sqrt(1 - c^2))\n\n var a = this['re'];\n var b = this['im'];\n\n var t1 = new Complex(\n b * b - a * a + 1,\n -2 * a * b)['sqrt']();\n\n var t2 = new Complex(\n t1['re'] - b,\n t1['im'] + a)['log']();\n\n return new Complex(t2['im'], -t2['re']);\n },\n\n /**\n * Calculate the complex arcus cosinus\n *\n * @returns {Complex}\n */\n 'acos': function() {\n\n // acos(c) = i * log(c - i * sqrt(1 - c^2))\n\n var a = this['re'];\n var b = this['im'];\n\n var t1 = new Complex(\n b * b - a * a + 1,\n -2 * a * b)['sqrt']();\n\n var t2 = new Complex(\n t1['re'] - b,\n t1['im'] + a)['log']();\n\n return new Complex(Math.PI / 2 - t2['im'], t2['re']);\n },\n\n /**\n * Calculate the complex arcus tangent\n *\n * @returns {Complex}\n */\n 'atan': function() {\n\n // atan(c) = i / 2 log((i + x) / (i - x))\n\n var a = this['re'];\n var b = this['im'];\n\n if (a === 0) {\n\n if (b === 1) {\n return new Complex(0, Infinity);\n }\n\n if (b === -1) {\n return new Complex(0, -Infinity);\n }\n }\n\n var d = a * a + (1.0 - b) * (1.0 - b);\n\n var t1 = new Complex(\n (1 - b * b - a * a) / d,\n -2 * a / d).log();\n\n return new Complex(-0.5 * t1['im'], 0.5 * t1['re']);\n },\n\n /**\n * Calculate the complex arcus cotangent\n *\n * @returns {Complex}\n */\n 'acot': function() {\n\n // acot(c) = i / 2 log((c - i) / (c + i))\n\n var a = this['re'];\n var b = this['im'];\n\n if (b === 0) {\n return new Complex(Math.atan2(1, a), 0);\n }\n\n var d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).atan()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).atan();\n },\n\n /**\n * Calculate the complex arcus secant\n *\n * @returns {Complex}\n */\n 'asec': function() {\n\n // asec(c) = -i * log(1 / c + sqrt(1 - i / c^2))\n\n var a = this['re'];\n var b = this['im'];\n\n if (a === 0 && b === 0) {\n return new Complex(0, Infinity);\n }\n\n var d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).acos()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).acos();\n },\n\n /**\n * Calculate the complex arcus cosecans\n *\n * @returns {Complex}\n */\n 'acsc': function() {\n\n // acsc(c) = -i * log(i / c + sqrt(1 - 1 / c^2))\n\n var a = this['re'];\n var b = this['im'];\n\n if (a === 0 && b === 0) {\n return new Complex(Math.PI / 2, Infinity);\n }\n\n var d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).asin()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).asin();\n },\n\n /**\n * Calculate the complex sinh\n *\n * @returns {Complex}\n */\n 'sinh': function() {\n\n // sinh(c) = (e^c - e^-c) / 2\n\n var a = this['re'];\n var b = this['im'];\n\n return new Complex(\n sinh(a) * Math.cos(b),\n cosh(a) * Math.sin(b));\n },\n\n /**\n * Calculate the complex cosh\n *\n * @returns {Complex}\n */\n 'cosh': function() {\n\n // cosh(c) = (e^c + e^-c) / 2\n\n var a = this['re'];\n var b = this['im'];\n\n return new Complex(\n cosh(a) * Math.cos(b),\n sinh(a) * Math.sin(b));\n },\n\n /**\n * Calculate the complex tanh\n *\n * @returns {Complex}\n */\n 'tanh': function() {\n\n // tanh(c) = (e^c - e^-c) / (e^c + e^-c)\n\n var a = 2 * this['re'];\n var b = 2 * this['im'];\n var d = cosh(a) + Math.cos(b);\n\n return new Complex(\n sinh(a) / d,\n Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex coth\n *\n * @returns {Complex}\n */\n 'coth': function() {\n\n // coth(c) = (e^c + e^-c) / (e^c - e^-c)\n\n var a = 2 * this['re'];\n var b = 2 * this['im'];\n var d = cosh(a) - Math.cos(b);\n\n return new Complex(\n sinh(a) / d,\n -Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex coth\n *\n * @returns {Complex}\n */\n 'csch': function() {\n\n // csch(c) = 2 / (e^c - e^-c)\n\n var a = this['re'];\n var b = this['im'];\n var d = Math.cos(2 * b) - cosh(2 * a);\n\n return new Complex(\n -2 * sinh(a) * Math.cos(b) / d,\n 2 * cosh(a) * Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex sech\n *\n * @returns {Complex}\n */\n 'sech': function() {\n\n // sech(c) = 2 / (e^c + e^-c)\n\n var a = this['re'];\n var b = this['im'];\n var d = Math.cos(2 * b) + cosh(2 * a);\n\n return new Complex(\n 2 * cosh(a) * Math.cos(b) / d,\n -2 * sinh(a) * Math.sin(b) / d);\n },\n\n /**\n * Calculate the complex asinh\n *\n * @returns {Complex}\n */\n 'asinh': function() {\n\n // asinh(c) = log(c + sqrt(c^2 + 1))\n\n var tmp = this['im'];\n this['im'] = -this['re'];\n this['re'] = tmp;\n var res = this['asin']();\n\n this['re'] = -this['im'];\n this['im'] = tmp;\n tmp = res['re'];\n\n res['re'] = -res['im'];\n res['im'] = tmp;\n return res;\n },\n\n /**\n * Calculate the complex asinh\n *\n * @returns {Complex}\n */\n 'acosh': function() {\n\n // acosh(c) = log(c + sqrt(c^2 - 1))\n\n var res = this['acos']();\n if (res['im'] <= 0) {\n var tmp = res['re'];\n res['re'] = -res['im'];\n res['im'] = tmp;\n } else {\n var tmp = res['im'];\n res['im'] = -res['re'];\n res['re'] = tmp;\n }\n return res;\n },\n\n /**\n * Calculate the complex atanh\n *\n * @returns {Complex}\n */\n 'atanh': function() {\n\n // atanh(c) = log((1+c) / (1-c)) / 2\n\n var a = this['re'];\n var b = this['im'];\n\n var noIM = a > 1 && b === 0;\n var oneMinus = 1 - a;\n var onePlus = 1 + a;\n var d = oneMinus * oneMinus + b * b;\n\n var x = (d !== 0)\n ? new Complex(\n (onePlus * oneMinus - b * b) / d,\n (b * oneMinus + onePlus * b) / d)\n : new Complex(\n (a !== -1) ? (a / 0) : 0,\n (b !== 0) ? (b / 0) : 0);\n\n var temp = x['re'];\n x['re'] = logHypot(x['re'], x['im']) / 2;\n x['im'] = Math.atan2(x['im'], temp) / 2;\n if (noIM) {\n x['im'] = -x['im'];\n }\n return x;\n },\n\n /**\n * Calculate the complex acoth\n *\n * @returns {Complex}\n */\n 'acoth': function() {\n\n // acoth(c) = log((c+1) / (c-1)) / 2\n\n var a = this['re'];\n var b = this['im'];\n\n if (a === 0 && b === 0) {\n return new Complex(0, Math.PI / 2);\n }\n\n var d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).atanh()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).atanh();\n },\n\n /**\n * Calculate the complex acsch\n *\n * @returns {Complex}\n */\n 'acsch': function() {\n\n // acsch(c) = log((1+sqrt(1+c^2))/c)\n\n var a = this['re'];\n var b = this['im'];\n\n if (b === 0) {\n\n return new Complex(\n (a !== 0)\n ? Math.log(a + Math.sqrt(a * a + 1))\n : Infinity, 0);\n }\n\n var d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).asinh()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).asinh();\n },\n\n /**\n * Calculate the complex asech\n *\n * @returns {Complex}\n */\n 'asech': function() {\n\n // asech(c) = log((1+sqrt(1-c^2))/c)\n\n var a = this['re'];\n var b = this['im'];\n\n if (this['isZero']()) {\n return Complex['INFINITY'];\n }\n\n var d = a * a + b * b;\n return (d !== 0)\n ? new Complex(\n a / d,\n -b / d).acosh()\n : new Complex(\n (a !== 0) ? a / 0 : 0,\n (b !== 0) ? -b / 0 : 0).acosh();\n },\n\n /**\n * Calculate the complex inverse 1/z\n *\n * @returns {Complex}\n */\n 'inverse': function() {\n\n // 1 / 0 = Infinity and 1 / Infinity = 0\n if (this['isZero']()) {\n return Complex['INFINITY'];\n }\n\n if (this['isInfinite']()) {\n return Complex['ZERO'];\n }\n\n var a = this['re'];\n var b = this['im'];\n\n var d = a * a + b * b;\n\n return new Complex(a / d, -b / d);\n },\n\n /**\n * Returns the complex conjugate\n *\n * @returns {Complex}\n */\n 'conjugate': function() {\n\n return new Complex(this['re'], -this['im']);\n },\n\n /**\n * Gets the negated complex number\n *\n * @returns {Complex}\n */\n 'neg': function() {\n\n return new Complex(-this['re'], -this['im']);\n },\n\n /**\n * Ceils the actual complex number\n *\n * @returns {Complex}\n */\n 'ceil': function(places) {\n\n places = Math.pow(10, places || 0);\n\n return new Complex(\n Math.ceil(this['re'] * places) / places,\n Math.ceil(this['im'] * places) / places);\n },\n\n /**\n * Floors the actual complex number\n *\n * @returns {Complex}\n */\n 'floor': function(places) {\n\n places = Math.pow(10, places || 0);\n\n return new Complex(\n Math.floor(this['re'] * places) / places,\n Math.floor(this['im'] * places) / places);\n },\n\n /**\n * Ceils the actual complex number\n *\n * @returns {Complex}\n */\n 'round': function(places) {\n\n places = Math.pow(10, places || 0);\n\n return new Complex(\n Math.round(this['re'] * places) / places,\n Math.round(this['im'] * places) / places);\n },\n\n /**\n * Compares two complex numbers\n *\n * **Note:** new Complex(Infinity).equals(Infinity) === false\n *\n * @returns {boolean}\n */\n 'equals': function(a, b) {\n\n var z = new Complex(a, b);\n\n return Math.abs(z['re'] - this['re']) <= Complex['EPSILON'] &&\n Math.abs(z['im'] - this['im']) <= Complex['EPSILON'];\n },\n\n /**\n * Clones the actual object\n *\n * @returns {Complex}\n */\n 'clone': function() {\n\n return new Complex(this['re'], this['im']);\n },\n\n /**\n * Gets a string of the actual complex number\n *\n * @returns {string}\n */\n 'toString': function() {\n\n var a = this['re'];\n var b = this['im'];\n var ret = '';\n\n if (this['isNaN']()) {\n return 'NaN';\n }\n\n if (this['isZero']()) {\n return '0';\n }\n\n if (this['isInfinite']()) {\n return 'Infinity';\n }\n\n if (a !== 0) {\n ret += a;\n }\n\n if (b !== 0) {\n\n if (a !== 0) {\n ret += b < 0 ? ' - ' : ' + ';\n } else if (b < 0) {\n ret += '-';\n }\n\n b = Math.abs(b);\n\n if (1 !== b) {\n ret += b;\n }\n ret += 'i';\n }\n\n if (!ret)\n return '0';\n\n return ret;\n },\n\n /**\n * Returns the actual number as a vector\n *\n * @returns {Array}\n */\n 'toVector': function() {\n\n return [this['re'], this['im']];\n },\n\n /**\n * Returns the actual real value of the current object\n *\n * @returns {number|null}\n */\n 'valueOf': function() {\n\n if (this['im'] === 0) {\n return this['re'];\n }\n return null;\n },\n\n /**\n * Determines whether a complex number is not on the Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isNaN': function() {\n return isNaN(this['re']) || isNaN(this['im']);\n },\n\n /**\n * Determines whether or not a complex number is at the zero pole of the\n * Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isZero': function() {\n return (\n (this['re'] === 0 || this['re'] === -0) &&\n (this['im'] === 0 || this['im'] === -0)\n );\n },\n\n /**\n * Determines whether a complex number is not at the infinity pole of the\n * Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isFinite': function() {\n return isFinite(this['re']) && isFinite(this['im']);\n },\n\n /**\n * Determines whether or not a complex number is at the infinity pole of the\n * Riemann sphere.\n *\n * @returns {boolean}\n */\n 'isInfinite': function() {\n return !(this['isNaN']() || this['isFinite']());\n }\n };\n\n Complex['ZERO'] = new Complex(0, 0);\n Complex['ONE'] = new Complex(1, 0);\n Complex['I'] = new Complex(0, 1);\n Complex['PI'] = new Complex(Math.PI, 0);\n Complex['E'] = new Complex(Math.E, 0);\n Complex['INFINITY'] = new Complex(Infinity, Infinity);\n Complex['NAN'] = new Complex(NaN, NaN);\n Complex['EPSILON'] = 1e-16;\n\n if (typeof define === 'function' && define['amd']) {\n define([], function() {\n return Complex;\n });\n } else if (typeof exports === 'object') {\n Object.defineProperty(exports, \"__esModule\", {'value': true});\n Complex['default'] = Complex;\n Complex['Complex'] = Complex;\n module['exports'] = Complex;\n } else {\n root['Complex'] = Complex;\n }\n\n})(this);\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar invariant_1 = require(\"@turf/invariant\");\nvar helpers_1 = require(\"@turf/helpers\");\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name distance\n * @param {Coord} from origin point\n * @param {Coord} to destination point\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction distance(from, to, options) {\n if (options === void 0) { options = {}; }\n var coordinates1 = invariant_1.getCoord(from);\n var coordinates2 = invariant_1.getCoord(to);\n var dLat = helpers_1.degreesToRadians((coordinates2[1] - coordinates1[1]));\n var dLon = helpers_1.degreesToRadians((coordinates2[0] - coordinates1[0]));\n var lat1 = helpers_1.degreesToRadians(coordinates1[1]);\n var lat2 = helpers_1.degreesToRadians(coordinates2[1]);\n var a = Math.pow(Math.sin(dLat / 2), 2) +\n Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n return helpers_1.radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);\n}\nexports.default = distance;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: theme.typography.pxToRem(24),\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(35)\n }\n };\n};\nvar SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'svg' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'medium' : _props$fontSize,\n htmlColor = props.htmlColor,\n titleAccess = props.titleAccess,\n _props$viewBox = props.viewBox,\n viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], fontSize !== 'default' && fontSize !== 'medium' && classes[\"fontSize\".concat(capitalize(fontSize))]),\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other), children, titleAccess ? /*#__PURE__*/React.createElement(\"title\", null, titleAccess) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n */\n color: PropTypes.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: chainPropTypes(PropTypes.oneOf(['default', 'inherit', 'large', 'medium', 'small']), function (props) {\n var fontSize = props.fontSize;\n\n if (fontSize === 'default') {\n throw new Error('Material-UI: `fontSize=\"default\"` is deprecated. Use `fontSize=\"medium\"` instead.');\n }\n\n return null;\n }),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this property.\n */\n shapeRendering: PropTypes.string,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default withStyles(styles, {\n name: 'MuiSvgIcon'\n})(SvgIcon);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport SvgIcon from '../SvgIcon';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function createSvgIcon(path, displayName) {\n var Component = function Component(props, ref) {\n return /*#__PURE__*/React.createElement(SvgIcon, _extends({\n ref: ref\n }, props), path);\n };\n\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = \"\".concat(displayName, \"Icon\");\n }\n\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","import { useTheme as useThemeWithoutDefault } from '@material-ui/styles';\nimport React from 'react';\nimport defaultTheme from './defaultTheme';\nexport default function useTheme() {\n var theme = useThemeWithoutDefault() || defaultTheme;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n\n return theme;\n}","/**\n * Throws an `Error` with the optional `message` if `condition` is falsy\n * @note Replacement for the external assert method to reduce bundle size\n */\nexport function assert(condition: any, message?: string): void {\n if (!condition) {\n throw new Error(message || 'loader assertion failed.');\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst EMPTY_ARRAY = [];\nconst placeholderArray = [];\n\n/*\n * Create an Iterable\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols\n * and a \"context\" tracker from the given data\n */\nexport function createIterable(data, startRow = 0, endRow = Infinity) {\n let iterable = EMPTY_ARRAY;\n\n const objectInfo = {\n index: -1,\n data,\n // visitor can optionally utilize this to avoid constructing a new array for every object\n target: []\n };\n\n if (!data) {\n iterable = EMPTY_ARRAY;\n } else if (typeof data[Symbol.iterator] === 'function') {\n // data is already an iterable\n iterable = data;\n } else if (data.length > 0) {\n placeholderArray.length = data.length;\n iterable = placeholderArray;\n }\n\n if (startRow > 0 || Number.isFinite(endRow)) {\n iterable = (Array.isArray(iterable) ? iterable : Array.from(iterable)).slice(startRow, endRow);\n objectInfo.index = startRow - 1;\n }\n\n return {iterable, objectInfo};\n}\n\n/*\n * Returns true if data is an async iterable object\n */\nexport function isAsyncIterable(data) {\n return data && data[Symbol.asyncIterator];\n}\n\n/*\n * Create an accessor function from a flat buffer that yields the value at each object index\n */\nexport function getAccessorFromBuffer(typedArray, {size, stride, offset, startIndices, nested}) {\n const bytesPerElement = typedArray.BYTES_PER_ELEMENT;\n const elementStride = stride ? stride / bytesPerElement : size;\n const elementOffset = offset ? offset / bytesPerElement : 0;\n const vertexCount = Math.floor((typedArray.length - elementOffset) / elementStride);\n\n return (_, {index, target}) => {\n if (!startIndices) {\n const sourceIndex = index * elementStride + elementOffset;\n for (let j = 0; j < size; j++) {\n target[j] = typedArray[sourceIndex + j];\n }\n return target;\n }\n const startIndex = startIndices[index];\n const endIndex = startIndices[index + 1] || vertexCount;\n let result;\n\n if (nested) {\n result = new Array(endIndex - startIndex);\n for (let i = startIndex; i < endIndex; i++) {\n const sourceIndex = i * elementStride + elementOffset;\n target = new Array(size);\n for (let j = 0; j < size; j++) {\n target[j] = typedArray[sourceIndex + j];\n }\n result[i - startIndex] = target;\n }\n } else if (elementStride === size) {\n result = typedArray.subarray(\n startIndex * size + elementOffset,\n endIndex * size + elementOffset\n );\n } else {\n result = new typedArray.constructor((endIndex - startIndex) * size);\n let targetIndex = 0;\n for (let i = startIndex; i < endIndex; i++) {\n const sourceIndex = i * elementStride + elementOffset;\n for (let j = 0; j < size; j++) {\n result[targetIndex++] = typedArray[sourceIndex + j];\n }\n }\n }\n\n return result;\n };\n}\n","var t0 = new Date,\n t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n}\n","import GL from '@luma.gl/constants';\n\nconst ERR_TYPE_DEDUCTION = 'Failed to deduce GL constant from typed array';\n\n// Converts TYPED ARRAYS to corresponding GL constant\n// Used to auto deduce gl parameter types\nexport function getGLTypeFromTypedArray(arrayOrType) {\n // If typed array, look up constructor\n const type = ArrayBuffer.isView(arrayOrType) ? arrayOrType.constructor : arrayOrType;\n switch (type) {\n case Float32Array:\n return GL.FLOAT;\n case Uint16Array:\n return GL.UNSIGNED_SHORT;\n case Uint32Array:\n return GL.UNSIGNED_INT;\n case Uint8Array:\n return GL.UNSIGNED_BYTE;\n case Uint8ClampedArray:\n return GL.UNSIGNED_BYTE;\n case Int8Array:\n return GL.BYTE;\n case Int16Array:\n return GL.SHORT;\n case Int32Array:\n return GL.INT;\n default:\n throw new Error(ERR_TYPE_DEDUCTION);\n }\n}\n\n// Converts GL constant to corresponding TYPED ARRAY\n// Used to auto deduce gl parameter types\n\n/* eslint-disable complexity */\nexport function getTypedArrayFromGLType(glType, {clamped = true} = {}) {\n // Sorted in some order of likelihood to reduce amount of comparisons\n switch (glType) {\n case GL.FLOAT:\n return Float32Array;\n case GL.UNSIGNED_SHORT:\n case GL.UNSIGNED_SHORT_5_6_5:\n case GL.UNSIGNED_SHORT_4_4_4_4:\n case GL.UNSIGNED_SHORT_5_5_5_1:\n return Uint16Array;\n case GL.UNSIGNED_INT:\n return Uint32Array;\n case GL.UNSIGNED_BYTE:\n return clamped ? Uint8ClampedArray : Uint8Array;\n case GL.BYTE:\n return Int8Array;\n case GL.SHORT:\n return Int16Array;\n case GL.INT:\n return Int32Array;\n default:\n throw new Error('Failed to deduce typed array type from GL constant');\n }\n}\n/* eslint-enable complexity */\n\n// Flip rows (can be used on arrays returned from `Framebuffer.readPixels`)\n// https://stackoverflow.com/questions/41969562/\n// how-can-i-flip-the-result-of-webglrenderingcontext-readpixels\nexport function flipRows({data, width, height, bytesPerPixel = 4, temp}) {\n const bytesPerRow = width * bytesPerPixel;\n\n // make a temp buffer to hold one row\n temp = temp || new Uint8Array(bytesPerRow);\n for (let y = 0; y < height / 2; ++y) {\n const topOffset = y * bytesPerRow;\n const bottomOffset = (height - y - 1) * bytesPerRow;\n // make copy of a row on the top half\n temp.set(data.subarray(topOffset, topOffset + bytesPerRow));\n // copy a row from the bottom half to the top\n data.copyWithin(topOffset, bottomOffset, bottomOffset + bytesPerRow);\n // copy the copy of the top half row to the bottom half\n data.set(temp, bottomOffset);\n }\n}\n\nexport function scalePixels({data, width, height}) {\n const newWidth = Math.round(width / 2);\n const newHeight = Math.round(height / 2);\n const newData = new Uint8Array(newWidth * newHeight * 4);\n for (let y = 0; y < newHeight; y++) {\n for (let x = 0; x < newWidth; x++) {\n for (let c = 0; c < 4; c++) {\n newData[(y * newWidth + x) * 4 + c] = data[(y * 2 * width + x * 2) * 4 + c];\n }\n }\n }\n return {data: newData, width: newWidth, height: newHeight};\n}\n","/* eslint-disable complexity */\nimport {\n CullingVolume,\n Plane,\n AxisAlignedBoundingBox,\n makeOrientedBoundingBoxFromPoints\n} from '@math.gl/culling';\nimport {lngLatToWorld} from '@math.gl/web-mercator';\nimport {osmTile2lngLat} from './utils';\n\nconst TILE_SIZE = 512;\n// number of world copies to check\nconst MAX_MAPS = 3;\n// for calculating bounding volume of a tile in a non-web-mercator viewport\nconst REF_POINTS_5 = [[0.5, 0.5], [0, 0], [0, 1], [1, 0], [1, 1]]; // 4 corners and center\nconst REF_POINTS_9 = REF_POINTS_5.concat([[0, 0.5], [0.5, 0], [1, 0.5], [0.5, 1]]); // 4 corners, center and 4 mid points\nconst REF_POINTS_11 = REF_POINTS_9.concat([[0.25, 0.5], [0.75, 0.5]]); // 2 additional points on equator for top tile\n\nclass OSMNode {\n constructor(x, y, z) {\n this.x = x;\n this.y = y;\n this.z = z;\n }\n\n get children() {\n if (!this._children) {\n const x = this.x * 2;\n const y = this.y * 2;\n const z = this.z + 1;\n this._children = [\n new OSMNode(x, y, z),\n new OSMNode(x, y + 1, z),\n new OSMNode(x + 1, y, z),\n new OSMNode(x + 1, y + 1, z)\n ];\n }\n return this._children;\n }\n\n update(params) {\n const {viewport, cullingVolume, elevationBounds, minZ, maxZ, bounds, offset, project} = params;\n const boundingVolume = this.getBoundingVolume(elevationBounds, offset, project);\n\n // First, check if this tile is visible\n if (bounds && !this.insideBounds(bounds)) {\n return false;\n }\n\n const isInside = cullingVolume.computeVisibility(boundingVolume);\n if (isInside < 0) {\n return false;\n }\n\n // Avoid loading overlapping tiles - if a descendant is requested, do not request the ancester\n if (!this.childVisible) {\n let {z} = this;\n if (z < maxZ && z >= minZ) {\n // Adjust LOD\n // If the tile is far enough from the camera, accept a lower zoom level\n const distance =\n (boundingVolume.distanceTo(viewport.cameraPosition) * viewport.scale) / viewport.height;\n z += Math.floor(Math.log2(distance));\n }\n if (z >= maxZ) {\n // LOD is acceptable\n this.selected = true;\n return true;\n }\n }\n\n // LOD is not enough, recursively test child tiles\n this.selected = false;\n this.childVisible = true;\n for (const child of this.children) {\n child.update(params);\n }\n return true;\n }\n\n getSelected(result = []) {\n if (this.selected) {\n result.push(this);\n }\n if (this._children) {\n for (const node of this._children) {\n node.getSelected(result);\n }\n }\n return result;\n }\n\n insideBounds([minX, minY, maxX, maxY]) {\n const scale = Math.pow(2, this.z);\n const extent = TILE_SIZE / scale;\n\n return (\n this.x * extent < maxX &&\n this.y * extent < maxY &&\n (this.x + 1) * extent > minX &&\n (this.y + 1) * extent > minY\n );\n }\n\n getBoundingVolume(zRange, worldOffset, project) {\n if (project) {\n // Custom projection\n // Estimate bounding box from sample points\n // At low zoom level we need more samples to calculate the bounding volume correctly\n const refPoints = this.z < 1 ? REF_POINTS_11 : this.z < 2 ? REF_POINTS_9 : REF_POINTS_5;\n\n // Convert from tile-relative coordinates to common space\n const refPointPositions = [];\n for (const p of refPoints) {\n const lngLat = osmTile2lngLat(this.x + p[0], this.y + p[1], this.z);\n lngLat[2] = zRange[0];\n refPointPositions.push(project(lngLat));\n\n if (zRange[0] !== zRange[1]) {\n // Account for the elevation volume\n lngLat[2] = zRange[1];\n refPointPositions.push(project(lngLat));\n }\n }\n\n return makeOrientedBoundingBoxFromPoints(refPointPositions);\n }\n\n // Use WebMercator projection\n const scale = Math.pow(2, this.z);\n const extent = TILE_SIZE / scale;\n const originX = this.x * extent + worldOffset * TILE_SIZE;\n // deck's common space is y-flipped\n const originY = TILE_SIZE - (this.y + 1) * extent;\n\n return new AxisAlignedBoundingBox(\n [originX, originY, zRange[0]],\n [originX + extent, originY + extent, zRange[1]]\n );\n }\n}\n\nexport function getOSMTileIndices(viewport, maxZ, zRange, bounds) {\n const project = viewport.resolution ? viewport.projectPosition : null;\n\n // Get the culling volume of the current camera\n const planes = Object.values(viewport.getFrustumPlanes()).map(\n ({normal, distance}) => new Plane(normal.clone().negate(), distance)\n );\n const cullingVolume = new CullingVolume(planes);\n\n // Project zRange from meters to common space\n const unitsPerMeter = viewport.distanceScales.unitsPerMeter[2];\n const elevationMin = (zRange && zRange[0] * unitsPerMeter) || 0;\n const elevationMax = (zRange && zRange[1] * unitsPerMeter) || 0;\n\n // Always load at the current zoom level if pitch is small\n const minZ = viewport.pitch <= 60 ? maxZ : 0;\n\n // Map extent to OSM position\n if (bounds) {\n const [minLng, minLat, maxLng, maxLat] = bounds;\n const topLeft = lngLatToWorld([minLng, maxLat]);\n const bottomRight = lngLatToWorld([maxLng, minLat]);\n bounds = [topLeft[0], TILE_SIZE - topLeft[1], bottomRight[0], TILE_SIZE - bottomRight[1]];\n }\n\n const root = new OSMNode(0, 0, 0);\n const traversalParams = {\n viewport,\n project,\n cullingVolume,\n elevationBounds: [elevationMin, elevationMax],\n minZ,\n maxZ,\n bounds,\n // num. of worlds from the center. For repeated maps\n offset: 0\n };\n\n root.update(traversalParams);\n\n if (viewport.subViewports && viewport.subViewports.length > 1) {\n // Check worlds in repeated maps\n traversalParams.offset = -1;\n while (root.update(traversalParams)) {\n if (--traversalParams.offset < -MAX_MAPS) {\n break;\n }\n }\n traversalParams.offset = 1;\n while (root.update(traversalParams)) {\n if (++traversalParams.offset > MAX_MAPS) {\n break;\n }\n }\n }\n\n return root.getSelected();\n}\n","import {getOSMTileIndices} from './tile-2d-traversal';\n\nconst TILE_SIZE = 512;\nconst DEFAULT_EXTENT = [-Infinity, -Infinity, Infinity, Infinity];\n\nexport const urlType = {\n type: 'url',\n value: null,\n validate: (value, propType) =>\n (propType.optional && value === null) ||\n typeof value === 'string' ||\n (Array.isArray(value) && value.every(url => typeof url === 'string')),\n equals: (value1, value2) => {\n if (value1 === value2) {\n return true;\n }\n if (!Array.isArray(value1) || !Array.isArray(value2)) {\n return false;\n }\n const len = value1.length;\n if (len !== value2.length) {\n return false;\n }\n for (let i = 0; i < len; i++) {\n if (value1[i] !== value2[i]) {\n return false;\n }\n }\n return true;\n }\n};\n\nfunction transformBox(bbox, modelMatrix) {\n const transformedCoords = [\n // top-left\n modelMatrix.transformPoint([bbox[0], bbox[1]]),\n // top-right\n modelMatrix.transformPoint([bbox[2], bbox[1]]),\n // bottom-left\n modelMatrix.transformPoint([bbox[0], bbox[3]]),\n // bottom-right\n modelMatrix.transformPoint([bbox[2], bbox[3]])\n ];\n const transformedBox = [\n // Minimum x coord\n Math.min(...transformedCoords.map(i => i[0])),\n // Minimum y coord\n Math.min(...transformedCoords.map(i => i[1])),\n // Max x coord\n Math.max(...transformedCoords.map(i => i[0])),\n // Max y coord\n Math.max(...transformedCoords.map(i => i[1]))\n ];\n return transformedBox;\n}\n\nexport function getURLFromTemplate(template, properties) {\n if (!template || !template.length) {\n return null;\n }\n if (Array.isArray(template)) {\n const index = Math.abs(properties.x + properties.y) % template.length;\n template = template[index];\n }\n\n const {x, y, z} = properties;\n return template\n .replace('{x}', x)\n .replace('{y}', y)\n .replace('{z}', z)\n .replace('{-y}', Math.pow(2, z) - y - 1);\n}\n\n/**\n * gets the bounding box of a viewport\n */\nfunction getBoundingBox(viewport, zRange, extent) {\n let bounds;\n if (zRange && zRange.length === 2) {\n const [minZ, maxZ] = zRange;\n const bounds0 = viewport.getBounds({z: minZ});\n const bounds1 = viewport.getBounds({z: maxZ});\n bounds = [\n Math.min(bounds0[0], bounds1[0]),\n Math.min(bounds0[1], bounds1[1]),\n Math.max(bounds0[2], bounds1[2]),\n Math.max(bounds0[3], bounds1[3])\n ];\n } else {\n bounds = viewport.getBounds();\n }\n if (!viewport.isGeospatial) {\n return [\n // Top corner should not be more then bottom corner in either direction\n Math.max(Math.min(bounds[0], extent[2]), extent[0]),\n Math.max(Math.min(bounds[1], extent[3]), extent[1]),\n // Bottom corner should not be less then top corner in either direction\n Math.min(Math.max(bounds[2], extent[0]), extent[2]),\n Math.min(Math.max(bounds[3], extent[1]), extent[3])\n ];\n }\n return [\n Math.max(bounds[0], extent[0]),\n Math.max(bounds[1], extent[1]),\n Math.min(bounds[2], extent[2]),\n Math.min(bounds[3], extent[3])\n ];\n}\n\nfunction getIndexingCoords(bbox, scale, modelMatrixInverse) {\n if (modelMatrixInverse) {\n const transformedTileIndex = transformBox(bbox, modelMatrixInverse).map(\n i => (i * scale) / TILE_SIZE\n );\n return transformedTileIndex;\n }\n return bbox.map(i => (i * scale) / TILE_SIZE);\n}\n\nfunction getScale(z, tileSize) {\n return (Math.pow(2, z) * TILE_SIZE) / tileSize;\n}\n\n// https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Lon..2Flat._to_tile_numbers_2\nexport function osmTile2lngLat(x, y, z) {\n const scale = getScale(z, TILE_SIZE);\n const lng = (x / scale) * 360 - 180;\n const n = Math.PI - (2 * Math.PI * y) / scale;\n const lat = (180 / Math.PI) * Math.atan(0.5 * (Math.exp(n) - Math.exp(-n)));\n return [lng, lat];\n}\n\nfunction tile2XY(x, y, z, tileSize) {\n const scale = getScale(z, tileSize);\n return [(x / scale) * TILE_SIZE, (y / scale) * TILE_SIZE];\n}\nexport function tileToBoundingBox(viewport, x, y, z, tileSize = TILE_SIZE) {\n if (viewport.isGeospatial) {\n const [west, north] = osmTile2lngLat(x, y, z);\n const [east, south] = osmTile2lngLat(x + 1, y + 1, z);\n return {west, north, east, south};\n }\n const [left, top] = tile2XY(x, y, z, tileSize);\n const [right, bottom] = tile2XY(x + 1, y + 1, z, tileSize);\n return {left, top, right, bottom};\n}\n\nfunction getIdentityTileIndices(viewport, z, tileSize, extent, modelMatrixInverse) {\n const bbox = getBoundingBox(viewport, null, extent);\n const scale = getScale(z, tileSize);\n const [minX, minY, maxX, maxY] = getIndexingCoords(bbox, scale, modelMatrixInverse);\n const indices = [];\n\n /*\n | TILE | TILE | TILE |\n |(minX) |(maxX)\n */\n for (let x = Math.floor(minX); x < maxX; x++) {\n for (let y = Math.floor(minY); y < maxY; y++) {\n indices.push({x, y, z});\n }\n }\n return indices;\n}\n\n/**\n * Returns all tile indices in the current viewport. If the current zoom level is smaller\n * than minZoom, return an empty array. If the current zoom level is greater than maxZoom,\n * return tiles that are on maxZoom.\n */\n// eslint-disable-next-line complexity\nexport function getTileIndices({\n viewport,\n maxZoom,\n minZoom,\n zRange,\n extent,\n tileSize = TILE_SIZE,\n modelMatrix,\n modelMatrixInverse,\n zoomOffset = 0\n}) {\n let z = viewport.isGeospatial\n ? Math.round(viewport.zoom + Math.log2(TILE_SIZE / tileSize)) + zoomOffset\n : Math.ceil(viewport.zoom) + zoomOffset;\n if (Number.isFinite(minZoom) && z < minZoom) {\n if (!extent) {\n return [];\n }\n z = minZoom;\n }\n if (Number.isFinite(maxZoom) && z > maxZoom) {\n z = maxZoom;\n }\n let transformedExtent = extent;\n if (modelMatrix && modelMatrixInverse && extent && !viewport.isGeospatial) {\n transformedExtent = transformBox(extent, modelMatrix);\n }\n return viewport.isGeospatial\n ? getOSMTileIndices(viewport, z, zRange, extent)\n : getIdentityTileIndices(\n viewport,\n z,\n tileSize,\n transformedExtent || DEFAULT_EXTENT,\n modelMatrixInverse\n );\n}\n\n/**\n * Returns true if s is a valid URL template\n */\nexport function isURLTemplate(s) {\n return /(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(s);\n}\n","'use strict';\n\nvar compileSchema = require('./compile')\n , resolve = require('./compile/resolve')\n , Cache = require('./cache')\n , SchemaObject = require('./compile/schema_obj')\n , stableStringify = require('fast-json-stable-stringify')\n , formats = require('./compile/formats')\n , rules = require('./compile/rules')\n , $dataMetaSchema = require('./data')\n , util = require('./compile/util');\n\nmodule.exports = Ajv;\n\nAjv.prototype.validate = validate;\nAjv.prototype.compile = compile;\nAjv.prototype.addSchema = addSchema;\nAjv.prototype.addMetaSchema = addMetaSchema;\nAjv.prototype.validateSchema = validateSchema;\nAjv.prototype.getSchema = getSchema;\nAjv.prototype.removeSchema = removeSchema;\nAjv.prototype.addFormat = addFormat;\nAjv.prototype.errorsText = errorsText;\n\nAjv.prototype._addSchema = _addSchema;\nAjv.prototype._compile = _compile;\n\nAjv.prototype.compileAsync = require('./compile/async');\nvar customKeyword = require('./keyword');\nAjv.prototype.addKeyword = customKeyword.add;\nAjv.prototype.getKeyword = customKeyword.get;\nAjv.prototype.removeKeyword = customKeyword.remove;\nAjv.prototype.validateKeyword = customKeyword.validate;\n\nvar errorClasses = require('./compile/error_classes');\nAjv.ValidationError = errorClasses.Validation;\nAjv.MissingRefError = errorClasses.MissingRef;\nAjv.$dataMetaSchema = $dataMetaSchema;\n\nvar META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';\n\nvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];\nvar META_SUPPORT_DATA = ['/properties'];\n\n/**\n * Creates validator instance.\n * Usage: `Ajv(opts)`\n * @param {Object} opts optional options\n * @return {Object} ajv instance\n */\nfunction Ajv(opts) {\n if (!(this instanceof Ajv)) return new Ajv(opts);\n opts = this._opts = util.copy(opts) || {};\n setLogger(this);\n this._schemas = {};\n this._refs = {};\n this._fragments = {};\n this._formats = formats(opts.format);\n\n this._cache = opts.cache || new Cache;\n this._loadingSchemas = {};\n this._compilations = [];\n this.RULES = rules();\n this._getId = chooseGetId(opts);\n\n opts.loopRequired = opts.loopRequired || Infinity;\n if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n if (opts.serialize === undefined) opts.serialize = stableStringify;\n this._metaOpts = getMetaSchemaOptions(this);\n\n if (opts.formats) addInitialFormats(this);\n if (opts.keywords) addInitialKeywords(this);\n addDefaultMetaSchema(this);\n if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);\n if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});\n addInitialSchemas(this);\n}\n\n\n\n/**\n * Validate data using schema\n * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.\n * @this Ajv\n * @param {String|Object} schemaKeyRef key, ref or schema object\n * @param {Any} data to be validated\n * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n */\nfunction validate(schemaKeyRef, data) {\n var v;\n if (typeof schemaKeyRef == 'string') {\n v = this.getSchema(schemaKeyRef);\n if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n } else {\n var schemaObj = this._addSchema(schemaKeyRef);\n v = schemaObj.validate || this._compile(schemaObj);\n }\n\n var valid = v(data);\n if (v.$async !== true) this.errors = v.errors;\n return valid;\n}\n\n\n/**\n * Create validating function for passed schema.\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.\n * @return {Function} validating function\n */\nfunction compile(schema, _meta) {\n var schemaObj = this._addSchema(schema, undefined, _meta);\n return schemaObj.validate || this._compile(schemaObj);\n}\n\n\n/**\n * Adds schema to the instance.\n * @this Ajv\n * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n * @return {Ajv} this for method chaining\n */\nfunction addSchema(schema, key, _skipValidation, _meta) {\n if (Array.isArray(schema)){\n for (var i=0; i<schema.length; i++) this.addSchema(schema[i], undefined, _skipValidation, _meta);\n return this;\n }\n var id = this._getId(schema);\n if (id !== undefined && typeof id != 'string')\n throw new Error('schema id must be string');\n key = resolve.normalizeId(key || id);\n checkUnique(this, key);\n this._schemas[key] = this._addSchema(schema, _skipValidation, _meta, true);\n return this;\n}\n\n\n/**\n * Add schema that will be used to validate other schemas\n * options in META_IGNORE_OPTIONS are alway set to false\n * @this Ajv\n * @param {Object} schema schema object\n * @param {String} key optional schema key\n * @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema\n * @return {Ajv} this for method chaining\n */\nfunction addMetaSchema(schema, key, skipValidation) {\n this.addSchema(schema, key, skipValidation, true);\n return this;\n}\n\n\n/**\n * Validate schema\n * @this Ajv\n * @param {Object} schema schema to validate\n * @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid\n * @return {Boolean} true if schema is valid\n */\nfunction validateSchema(schema, throwOrLogError) {\n var $schema = schema.$schema;\n if ($schema !== undefined && typeof $schema != 'string')\n throw new Error('$schema must be a string');\n $schema = $schema || this._opts.defaultMeta || defaultMeta(this);\n if (!$schema) {\n this.logger.warn('meta-schema not available');\n this.errors = null;\n return true;\n }\n var valid = this.validate($schema, schema);\n if (!valid && throwOrLogError) {\n var message = 'schema is invalid: ' + this.errorsText();\n if (this._opts.validateSchema == 'log') this.logger.error(message);\n else throw new Error(message);\n }\n return valid;\n}\n\n\nfunction defaultMeta(self) {\n var meta = self._opts.meta;\n self._opts.defaultMeta = typeof meta == 'object'\n ? self._getId(meta) || meta\n : self.getSchema(META_SCHEMA_ID)\n ? META_SCHEMA_ID\n : undefined;\n return self._opts.defaultMeta;\n}\n\n\n/**\n * Get compiled schema from the instance by `key` or `ref`.\n * @this Ajv\n * @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).\n * @return {Function} schema validating function (with property `schema`).\n */\nfunction getSchema(keyRef) {\n var schemaObj = _getSchemaObj(this, keyRef);\n switch (typeof schemaObj) {\n case 'object': return schemaObj.validate || this._compile(schemaObj);\n case 'string': return this.getSchema(schemaObj);\n case 'undefined': return _getSchemaFragment(this, keyRef);\n }\n}\n\n\nfunction _getSchemaFragment(self, ref) {\n var res = resolve.schema.call(self, { schema: {} }, ref);\n if (res) {\n var schema = res.schema\n , root = res.root\n , baseId = res.baseId;\n var v = compileSchema.call(self, schema, root, undefined, baseId);\n self._fragments[ref] = new SchemaObject({\n ref: ref,\n fragment: true,\n schema: schema,\n root: root,\n baseId: baseId,\n validate: v\n });\n return v;\n }\n}\n\n\nfunction _getSchemaObj(self, keyRef) {\n keyRef = resolve.normalizeId(keyRef);\n return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];\n}\n\n\n/**\n * Remove cached schema(s).\n * If no parameter is passed all schemas but meta-schemas are removed.\n * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.\n * Even if schema is referenced by other schemas it still can be removed as other schemas have local references.\n * @this Ajv\n * @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object\n * @return {Ajv} this for method chaining\n */\nfunction removeSchema(schemaKeyRef) {\n if (schemaKeyRef instanceof RegExp) {\n _removeAllSchemas(this, this._schemas, schemaKeyRef);\n _removeAllSchemas(this, this._refs, schemaKeyRef);\n return this;\n }\n switch (typeof schemaKeyRef) {\n case 'undefined':\n _removeAllSchemas(this, this._schemas);\n _removeAllSchemas(this, this._refs);\n this._cache.clear();\n return this;\n case 'string':\n var schemaObj = _getSchemaObj(this, schemaKeyRef);\n if (schemaObj) this._cache.del(schemaObj.cacheKey);\n delete this._schemas[schemaKeyRef];\n delete this._refs[schemaKeyRef];\n return this;\n case 'object':\n var serialize = this._opts.serialize;\n var cacheKey = serialize ? serialize(schemaKeyRef) : schemaKeyRef;\n this._cache.del(cacheKey);\n var id = this._getId(schemaKeyRef);\n if (id) {\n id = resolve.normalizeId(id);\n delete this._schemas[id];\n delete this._refs[id];\n }\n }\n return this;\n}\n\n\nfunction _removeAllSchemas(self, schemas, regex) {\n for (var keyRef in schemas) {\n var schemaObj = schemas[keyRef];\n if (!schemaObj.meta && (!regex || regex.test(keyRef))) {\n self._cache.del(schemaObj.cacheKey);\n delete schemas[keyRef];\n }\n }\n}\n\n\n/* @this Ajv */\nfunction _addSchema(schema, skipValidation, meta, shouldAddSchema) {\n if (typeof schema != 'object' && typeof schema != 'boolean')\n throw new Error('schema should be object or boolean');\n var serialize = this._opts.serialize;\n var cacheKey = serialize ? serialize(schema) : schema;\n var cached = this._cache.get(cacheKey);\n if (cached) return cached;\n\n shouldAddSchema = shouldAddSchema || this._opts.addUsedSchema !== false;\n\n var id = resolve.normalizeId(this._getId(schema));\n if (id && shouldAddSchema) checkUnique(this, id);\n\n var willValidate = this._opts.validateSchema !== false && !skipValidation;\n var recursiveMeta;\n if (willValidate && !(recursiveMeta = id && id == resolve.normalizeId(schema.$schema)))\n this.validateSchema(schema, true);\n\n var localRefs = resolve.ids.call(this, schema);\n\n var schemaObj = new SchemaObject({\n id: id,\n schema: schema,\n localRefs: localRefs,\n cacheKey: cacheKey,\n meta: meta\n });\n\n if (id[0] != '#' && shouldAddSchema) this._refs[id] = schemaObj;\n this._cache.put(cacheKey, schemaObj);\n\n if (willValidate && recursiveMeta) this.validateSchema(schema, true);\n\n return schemaObj;\n}\n\n\n/* @this Ajv */\nfunction _compile(schemaObj, root) {\n if (schemaObj.compiling) {\n schemaObj.validate = callValidate;\n callValidate.schema = schemaObj.schema;\n callValidate.errors = null;\n callValidate.root = root ? root : callValidate;\n if (schemaObj.schema.$async === true)\n callValidate.$async = true;\n return callValidate;\n }\n schemaObj.compiling = true;\n\n var currentOpts;\n if (schemaObj.meta) {\n currentOpts = this._opts;\n this._opts = this._metaOpts;\n }\n\n var v;\n try { v = compileSchema.call(this, schemaObj.schema, root, schemaObj.localRefs); }\n catch(e) {\n delete schemaObj.validate;\n throw e;\n }\n finally {\n schemaObj.compiling = false;\n if (schemaObj.meta) this._opts = currentOpts;\n }\n\n schemaObj.validate = v;\n schemaObj.refs = v.refs;\n schemaObj.refVal = v.refVal;\n schemaObj.root = v.root;\n return v;\n\n\n /* @this {*} - custom context, see passContext option */\n function callValidate() {\n /* jshint validthis: true */\n var _validate = schemaObj.validate;\n var result = _validate.apply(this, arguments);\n callValidate.errors = _validate.errors;\n return result;\n }\n}\n\n\nfunction chooseGetId(opts) {\n switch (opts.schemaId) {\n case 'auto': return _get$IdOrId;\n case 'id': return _getId;\n default: return _get$Id;\n }\n}\n\n/* @this Ajv */\nfunction _getId(schema) {\n if (schema.$id) this.logger.warn('schema $id ignored', schema.$id);\n return schema.id;\n}\n\n/* @this Ajv */\nfunction _get$Id(schema) {\n if (schema.id) this.logger.warn('schema id ignored', schema.id);\n return schema.$id;\n}\n\n\nfunction _get$IdOrId(schema) {\n if (schema.$id && schema.id && schema.$id != schema.id)\n throw new Error('schema $id is different from id');\n return schema.$id || schema.id;\n}\n\n\n/**\n * Convert array of error message objects to string\n * @this Ajv\n * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.\n * @param {Object} options optional options with properties `separator` and `dataVar`.\n * @return {String} human readable string with all errors descriptions\n */\nfunction errorsText(errors, options) {\n errors = errors || this.errors;\n if (!errors) return 'No errors';\n options = options || {};\n var separator = options.separator === undefined ? ', ' : options.separator;\n var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;\n\n var text = '';\n for (var i=0; i<errors.length; i++) {\n var e = errors[i];\n if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;\n }\n return text.slice(0, -separator.length);\n}\n\n\n/**\n * Add custom format\n * @this Ajv\n * @param {String} name format name\n * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)\n * @return {Ajv} this for method chaining\n */\nfunction addFormat(name, format) {\n if (typeof format == 'string') format = new RegExp(format);\n this._formats[name] = format;\n return this;\n}\n\n\nfunction addDefaultMetaSchema(self) {\n var $dataSchema;\n if (self._opts.$data) {\n $dataSchema = require('./refs/data.json');\n self.addMetaSchema($dataSchema, $dataSchema.$id, true);\n }\n if (self._opts.meta === false) return;\n var metaSchema = require('./refs/json-schema-draft-07.json');\n if (self._opts.$data) metaSchema = $dataMetaSchema(metaSchema, META_SUPPORT_DATA);\n self.addMetaSchema(metaSchema, META_SCHEMA_ID, true);\n self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;\n}\n\n\nfunction addInitialSchemas(self) {\n var optsSchemas = self._opts.schemas;\n if (!optsSchemas) return;\n if (Array.isArray(optsSchemas)) self.addSchema(optsSchemas);\n else for (var key in optsSchemas) self.addSchema(optsSchemas[key], key);\n}\n\n\nfunction addInitialFormats(self) {\n for (var name in self._opts.formats) {\n var format = self._opts.formats[name];\n self.addFormat(name, format);\n }\n}\n\n\nfunction addInitialKeywords(self) {\n for (var name in self._opts.keywords) {\n var keyword = self._opts.keywords[name];\n self.addKeyword(name, keyword);\n }\n}\n\n\nfunction checkUnique(self, id) {\n if (self._schemas[id] || self._refs[id])\n throw new Error('schema with key or id \"' + id + '\" already exists');\n}\n\n\nfunction getMetaSchemaOptions(self) {\n var metaOpts = util.copy(self._opts);\n for (var i=0; i<META_IGNORE_OPTIONS.length; i++)\n delete metaOpts[META_IGNORE_OPTIONS[i]];\n return metaOpts;\n}\n\n\nfunction setLogger(self) {\n var logger = self._opts.logger;\n if (logger === false) {\n self.logger = {log: noop, warn: noop, error: noop};\n } else {\n if (logger === undefined) logger = console;\n if (!(typeof logger == 'object' && logger.log && logger.warn && logger.error))\n throw new Error('logger must implement log, warn and error methods');\n self.logger = logger;\n }\n}\n\n\nfunction noop() {}\n","\nvar libh3 = (\nfunction(libh3) {\n libh3 = libh3 || {};\n\nvar Module=typeof libh3!==\"undefined\"?libh3:{};var moduleOverrides={};var key;for(key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var arguments_=[];var thisProgram=\"./this.program\";var quit_=function(status,toThrow){throw toThrow};var ENVIRONMENT_IS_WEB=true;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;var scriptDirectory=\"\";function locateFile(path){if(Module[\"locateFile\"]){return Module[\"locateFile\"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary,setWindowTitle;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.indexOf(\"blob:\")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.lastIndexOf(\"/\")+1)}else{scriptDirectory=\"\"}read_=function shell_read(url){try{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.send(null);return xhr.responseText}catch(err){var data=tryParseAsDataURI(url);if(data){return intArrayToString(data)}throw err}};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){try{var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,false);xhr.responseType=\"arraybuffer\";xhr.send(null);return new Uint8Array(xhr.response)}catch(err){var data=tryParseAsDataURI(url);if(data){return data}throw err}}}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest;xhr.open(\"GET\",url,true);xhr.responseType=\"arraybuffer\";xhr.onload=function xhr_onload(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}var data=tryParseAsDataURI(url);if(data){onload(data.buffer);return}onerror()};xhr.onerror=onerror;xhr.send(null)};setWindowTitle=function(title){document.title=title}}else{}var out=Module[\"print\"]||console.log.bind(console);var err=Module[\"printErr\"]||console.warn.bind(console);for(key in moduleOverrides){if(moduleOverrides.hasOwnProperty(key)){Module[key]=moduleOverrides[key]}}moduleOverrides=null;if(Module[\"arguments\"])arguments_=Module[\"arguments\"];if(Module[\"thisProgram\"])thisProgram=Module[\"thisProgram\"];if(Module[\"quit\"])quit_=Module[\"quit\"];var STACK_ALIGN=16;function dynamicAlloc(size){var ret=HEAP32[DYNAMICTOP_PTR>>2];var end=ret+size+15&-16;if(end>_emscripten_get_heap_size()){abort()}HEAP32[DYNAMICTOP_PTR>>2]=end;return ret}function getNativeTypeSize(type){switch(type){case\"i1\":case\"i8\":return 1;case\"i16\":return 2;case\"i32\":return 4;case\"i64\":return 8;case\"float\":return 4;case\"double\":return 8;default:{if(type[type.length-1]===\"*\"){return 4}else if(type[0]===\"i\"){var bits=parseInt(type.substr(1));assert(bits%8===0,\"getNativeTypeSize invalid bits \"+bits+\", type \"+type);return bits/8}else{return 0}}}}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text)}}var jsCallStartIndex=1;var functionPointers=new Array(0);var funcWrappers={};function dynCall(sig,ptr,args){if(args&&args.length){return Module[\"dynCall_\"+sig].apply(null,[ptr].concat(args))}else{return Module[\"dynCall_\"+sig].call(null,ptr)}}var tempRet0=0;var setTempRet0=function(value){tempRet0=value};var getTempRet0=function(){return tempRet0};var GLOBAL_BASE=8;var wasmBinary;if(Module[\"wasmBinary\"])wasmBinary=Module[\"wasmBinary\"];var noExitRuntime;if(Module[\"noExitRuntime\"])noExitRuntime=Module[\"noExitRuntime\"];function setValue(ptr,value,type,noSafe){type=type||\"i8\";if(type.charAt(type.length-1)===\"*\")type=\"i32\";switch(type){case\"i1\":HEAP8[ptr>>0]=value;break;case\"i8\":HEAP8[ptr>>0]=value;break;case\"i16\":HEAP16[ptr>>1]=value;break;case\"i32\":HEAP32[ptr>>2]=value;break;case\"i64\":tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case\"float\":HEAPF32[ptr>>2]=value;break;case\"double\":HEAPF64[ptr>>3]=value;break;default:abort(\"invalid type for setValue: \"+type)}}function getValue(ptr,type,noSafe){type=type||\"i8\";if(type.charAt(type.length-1)===\"*\")type=\"i32\";switch(type){case\"i1\":return HEAP8[ptr>>0];case\"i8\":return HEAP8[ptr>>0];case\"i16\":return HEAP16[ptr>>1];case\"i32\":return HEAP32[ptr>>2];case\"i64\":return HEAP32[ptr>>2];case\"float\":return HEAPF32[ptr>>2];case\"double\":return HEAPF64[ptr>>3];default:abort(\"invalid type for getValue: \"+type)}return null}var ABORT=false;var EXITSTATUS=0;function assert(condition,text){if(!condition){abort(\"Assertion failed: \"+text)}}function getCFunc(ident){var func=Module[\"_\"+ident];assert(func,\"Cannot call unknown function \"+ident+\", make sure it is exported\");return func}function ccall(ident,returnType,argTypes,args,opts){var toC={\"string\":function(str){var ret=0;if(str!==null&&str!==undefined&&str!==0){var len=(str.length<<2)+1;ret=stackAlloc(len);stringToUTF8(str,ret,len)}return ret},\"array\":function(arr){var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType===\"string\")return UTF8ToString(ret);if(returnType===\"boolean\")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func.apply(null,cArgs);ret=convertReturnValue(ret);if(stack!==0)stackRestore(stack);return ret}function cwrap(ident,returnType,argTypes,opts){argTypes=argTypes||[];var numericArgs=argTypes.every(function(type){return type===\"number\"});var numericRet=returnType!==\"string\";if(numericRet&&numericArgs&&!opts){return getCFunc(ident)}return function(){return ccall(ident,returnType,argTypes,arguments,opts)}}var ALLOC_NONE=3;var UTF8Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf8\"):undefined;function UTF8ArrayToString(u8Array,idx,maxBytesToRead){var endIdx=idx+maxBytesToRead;var endPtr=idx;while(u8Array[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&u8Array.subarray&&UTF8Decoder){return UTF8Decoder.decode(u8Array.subarray(idx,endPtr))}else{var str=\"\";while(idx<endPtr){var u0=u8Array[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=u8Array[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=u8Array[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|u8Array[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}}return str}function UTF8ToString(ptr,maxBytesToRead){return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):\"\"}function stringToUTF8Array(str,outU8Array,outIdx,maxBytesToWrite){if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;outU8Array[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;outU8Array[outIdx++]=192|u>>6;outU8Array[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;outU8Array[outIdx++]=224|u>>12;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;outU8Array[outIdx++]=240|u>>18;outU8Array[outIdx++]=128|u>>12&63;outU8Array[outIdx++]=128|u>>6&63;outU8Array[outIdx++]=128|u&63}}outU8Array[outIdx]=0;return outIdx-startIdx}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)}function lengthBytesUTF8(str){var len=0;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|str.charCodeAt(++i)&1023;if(u<=127)++len;else if(u<=2047)len+=2;else if(u<=65535)len+=3;else len+=4}return len}var UTF16Decoder=typeof TextDecoder!==\"undefined\"?new TextDecoder(\"utf-16le\"):undefined;function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer)}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i<str.length;++i){HEAP8[buffer++>>0]=str.charCodeAt(i)}if(!dontAddNull)HEAP8[buffer>>0]=0}function alignUp(x,multiple){if(x%multiple>0){x+=multiple-x%multiple}return x}var buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferAndViews(buf){buffer=buf;Module[\"HEAP8\"]=HEAP8=new Int8Array(buf);Module[\"HEAP16\"]=HEAP16=new Int16Array(buf);Module[\"HEAP32\"]=HEAP32=new Int32Array(buf);Module[\"HEAPU8\"]=HEAPU8=new Uint8Array(buf);Module[\"HEAPU16\"]=HEAPU16=new Uint16Array(buf);Module[\"HEAPU32\"]=HEAPU32=new Uint32Array(buf);Module[\"HEAPF32\"]=HEAPF32=new Float32Array(buf);Module[\"HEAPF64\"]=HEAPF64=new Float64Array(buf)}var STACK_BASE=24048,DYNAMIC_BASE=5266928,DYNAMICTOP_PTR=24016;var INITIAL_TOTAL_MEMORY=Module[\"TOTAL_MEMORY\"]||33554432;if(Module[\"buffer\"]){buffer=Module[\"buffer\"]}else{buffer=new ArrayBuffer(INITIAL_TOTAL_MEMORY)}INITIAL_TOTAL_MEMORY=buffer.byteLength;updateGlobalBufferAndViews(buffer);HEAP32[DYNAMICTOP_PTR>>2]=DYNAMIC_BASE;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback==\"function\"){callback();continue}var func=callback.func;if(typeof func===\"number\"){if(callback.arg===undefined){Module[\"dynCall_v\"](func)}else{Module[\"dynCall_vi\"](func,callback.arg)}}else{func(callback.arg===undefined?null:callback.arg)}}}var __ATPRERUN__=[];var __ATINIT__=[];var __ATMAIN__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeExited=false;function preRun(){if(Module[\"preRun\"]){if(typeof Module[\"preRun\"]==\"function\")Module[\"preRun\"]=[Module[\"preRun\"]];while(Module[\"preRun\"].length){addOnPreRun(Module[\"preRun\"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=true}function postRun(){if(Module[\"postRun\"]){if(typeof Module[\"postRun\"]==\"function\")Module[\"postRun\"]=[Module[\"postRun\"]];while(Module[\"postRun\"].length){addOnPostRun(Module[\"postRun\"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var Math_abs=Math.abs;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_min=Math.min;var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module[\"monitorRunDependencies\"]){Module[\"monitorRunDependencies\"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}Module[\"preloadedImages\"]={};Module[\"preloadedAudios\"]={};var memoryInitializer=null;var dataURIPrefix=\"data:application/octet-stream;base64,\";function isDataURI(filename){return String.prototype.startsWith?filename.startsWith(dataURIPrefix):filename.indexOf(dataURIPrefix)===0}var tempDouble;var tempI64;memoryInitializer=\"data:application/octet-stream;base64,AAAAAAAAAAACAAAAAwAAAAEAAAAFAAAABAAAAAYAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAMAAAAEAAAABQAAAAYAAAABAAAABAAAAAMAAAAGAAAABQAAAAIAAAAAAAAAAgAAAAMAAAABAAAABAAAAAYAAAAAAAAABQAAAAMAAAAGAAAABAAAAAUAAAAAAAAAAQAAAAIAAAAEAAAABQAAAAYAAAAAAAAAAgAAAAMAAAABAAAABQAAAAIAAAAAAAAAAQAAAAMAAAAGAAAABAAAAAYAAAAAAAAABQAAAAIAAAAB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2LhTfev81i5RexJsy/BlIKPVwR5b95Wyu0/Qjnv5DjoT7YYcs/nBhKZ6zrwr8wRYS7Nebuv3OW6geh+Lu/SLrixebL3j+pcyymN9Xrv8rHIFfWehZAMBwUdlo0DECTUc17EOb2PxpVB1SWChdAzjbhb9pTDUDQhmdvECX5P9FlMKCC9+g/IIAzjELgE0DajDngMv8GQFhWDmDPjNs/y1guLh96EkAxPi8k7DIEQJCc4URlhRhA3eLKKLwkEECqpNAyTBD/P6xpjXcDiwVAFtl//cQm4z+Ibt3XKiYTQM7mCLUb3QdAoM1t8yVv7D8aLZv2Nk8UQEAJPV5nQwxAtSsfTCoE9z9TPjXLXIIWQBVanC5W9AtAYM3d7Adm9j++5mQz1FoWQBUThyaVBghAwH5muQsV7T89Q1qv82MUQJoWGOfNuBdAzrkClkmwDkDQjKq77t37Py+g0dtitsE/ZwAMTwVPEUBojepluNwBQGYbtuW+t9w/HNWIJs6MEkDTNuQUSlgEQKxktPP5TcQ/ixbLB8JjEUCwuWjXMQYCQAS/R09FkRdAowpiZjhhDkB7LmlczD/7P01iQmhhsAVAnrtTwDy84z/Z6jfQ2TgTQChOCXMnWwpAhrW3daoz8z/HYJvVPI4VQLT3ik5FcA5Angi7LOZd+z+NNVzDy5gXQBXdvVTFUA1AYNMgOeYe+T8+qHXGCwkXQKQTOKwa5AJA8gFVoEMW0T+FwzJyttIRQAEAAAD/////BwAAAP////8xAAAA/////1cBAAD/////YQkAAP////+nQQAA/////5HLAQD/////95AMAP/////B9lcAAAAAAAAAAAAAAAAAAgAAAP////8OAAAA/////2IAAAD/////rgIAAP/////CEgAA/////06DAAD/////IpcDAP/////uIRkA/////4LtrwAAAAAAAAAAAAAAAAAAAAAAAgAAAP//////////AQAAAAMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////////////////////wEAAAAAAAAAAgAAAP///////////////wMAAAD//////////////////////////////////////////////////////////wIAAAD//////////wEAAAAAAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA/////////////////////wEAAAD///////////////8CAAAA////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAA////////////////AgAAAAEAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AQAAAAIAAAD///////////////8AAAAA/////////////////////wMAAAD///////////////////////////////8CAAAA////////////////AQAAAP////////////////////8AAAAA/////////////////////wMAAAD/////////////////////////////////////////////////////AwAAAP////////////////////8AAAAAAQAAAP//////////AgAAAP//////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAP///////////////wIAAAAAAAAAAQAAAP//////////////////////////////////////////////////////////////////////////AwAAAAEAAAD//////////wIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAgAAAAAAAAACAAAAAQAAAAEAAAACAAAAAgAAAAAAAAAFAAAABQAAAAAAAAACAAAAAgAAAAMAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAABAAAAAgAAAAIAAAACAAAAAAAAAAUAAAAGAAAAAAAAAAIAAAACAAAAAwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAAAAAAAAgAAAAEAAAADAAAAAgAAAAIAAAAA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AAAAA/////wAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAP////8AAAAAAAAAAAEAAAABAAAAAAAAAAAAAAD/////AAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAA/////wUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/////////////////////////////////////wAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAUAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////////////////////////////////////8AAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAABAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAFAAAAAQAAAAEAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAEAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAAAAAABAAEAAAEBAAAAAAABAAAAAQAAAAEAAQAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAACA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ElOVkFMSURfRElHSVQAbG9jYWxpai5jAGgzVG9Mb2NhbElqawBiYXNlQ2VsbCAhPSBvcmlnaW5CYXNlQ2VsbAAhKG9yaWdpbk9uUGVudCAmJiBpbmRleE9uUGVudCkAcGVudGFnb25Sb3RhdGlvbnMgPj0gMABkaXJlY3Rpb25Sb3RhdGlvbnMgPj0gMABiYXNlQ2VsbCA9PSBvcmlnaW5CYXNlQ2VsbABiYXNlQ2VsbCAhPSBJTlZBTElEX0JBU0VfQ0VMTABsb2NhbElqa1RvSDMAIV9pc0Jhc2VDZWxsUGVudGFnb24oYmFzZUNlbGwpAGJhc2VDZWxsUm90YXRpb25zID49IDAAd2l0aGluUGVudGFnb25Sb3RhdGlvbnMgPj0gMABncmFwaC0+YnVja2V0cyAhPSBOVUxMAHZlcnRleEdyYXBoLmMAaW5pdFZlcnRleEdyYXBoAG5vZGUgIT0gTlVMTABhZGRWZXJ0ZXhOb2Rl\";var tempDoublePtr=24032;function demangle(func){return func}function demangleAll(text){var regex=/\\b__Z[\\w\\d_]+/g;return text.replace(regex,function(x){var y=demangle(x);return x===y?x:y+\" [\"+x+\"]\"})}function jsStackTrace(){var err=new Error;if(!err.stack){try{throw new Error(0)}catch(e){err=e}if(!err.stack){return\"(no stack trace available)\"}}return err.stack.toString()}function stackTrace(){var js=jsStackTrace();if(Module[\"extraStackTrace\"])js+=\"\\n\"+Module[\"extraStackTrace\"]();return demangleAll(js)}function ___assert_fail(condition,filename,line,func){abort(\"Assertion failed: \"+UTF8ToString(condition)+\", at: \"+[filename?UTF8ToString(filename):\"unknown filename\",line,func?UTF8ToString(func):\"unknown function\"])}function _emscripten_get_heap_size(){return HEAP8.length}function _emscripten_memcpy_big(dest,src,num){HEAPU8.set(HEAPU8.subarray(src,src+num),dest)}function ___setErrNo(value){if(Module[\"___errno_location\"])HEAP32[Module[\"___errno_location\"]()>>2]=value;return value}function abortOnCannotGrowMemory(requestedSize){abort(\"OOM\")}function emscripten_realloc_buffer(size){try{var newBuffer=new ArrayBuffer(size);if(newBuffer.byteLength!=size)return;new Int8Array(newBuffer).set(HEAP8);_emscripten_replace_memory(newBuffer);updateGlobalBufferAndViews(newBuffer);return 1}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=_emscripten_get_heap_size();var PAGE_MULTIPLE=16777216;var LIMIT=2147483648-PAGE_MULTIPLE;if(requestedSize>LIMIT){return false}var MIN_TOTAL_MEMORY=16777216;var newSize=Math.max(oldSize,MIN_TOTAL_MEMORY);while(newSize<requestedSize){if(newSize<=536870912){newSize=alignUp(2*newSize,PAGE_MULTIPLE)}else{newSize=Math.min(alignUp((3*newSize+2147483648)/4,PAGE_MULTIPLE),LIMIT)}}var replacement=emscripten_realloc_buffer(newSize);if(!replacement){return false}return true}var ASSERTIONS=false;function intArrayToString(array){var ret=[];for(var i=0;i<array.length;i++){var chr=array[i];if(chr>255){if(ASSERTIONS){assert(false,\"Character code \"+chr+\" (\"+String.fromCharCode(chr)+\") at offset \"+i+\" not in 0x00-0xFF.\")}chr&=255}ret.push(String.fromCharCode(chr))}return ret.join(\"\")}var decodeBase64=typeof atob===\"function\"?atob:function(input){var keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2)}if(enc4!==64){output=output+String.fromCharCode(chr3)}}while(i<input.length);return output};function intArrayFromBase64(s){try{var decoded=decodeBase64(s);var bytes=new Uint8Array(decoded.length);for(var i=0;i<decoded.length;++i){bytes[i]=decoded.charCodeAt(i)}return bytes}catch(_){throw new Error(\"Converting base64 string to bytes failed.\")}}function tryParseAsDataURI(filename){if(!isDataURI(filename)){return}return intArrayFromBase64(filename.slice(dataURIPrefix.length))}var asmGlobalArg={\"Math\":Math,\"Int8Array\":Int8Array,\"Int32Array\":Int32Array,\"Uint8Array\":Uint8Array,\"Float32Array\":Float32Array,\"Float64Array\":Float64Array};var asmLibraryArg={\"a\":abort,\"b\":setTempRet0,\"c\":getTempRet0,\"d\":___assert_fail,\"e\":___setErrNo,\"f\":_emscripten_get_heap_size,\"g\":_emscripten_memcpy_big,\"h\":_emscripten_resize_heap,\"i\":abortOnCannotGrowMemory,\"j\":demangle,\"k\":demangleAll,\"l\":emscripten_realloc_buffer,\"m\":jsStackTrace,\"n\":stackTrace,\"o\":tempDoublePtr,\"p\":DYNAMICTOP_PTR};// EMSCRIPTEN_START_ASM\nvar asm=(/** @suppress {uselessCode} */ function(global,env,buffer) {\n\"almost asm\";var a=new global.Int8Array(buffer),b=new global.Int32Array(buffer),c=new global.Uint8Array(buffer),d=new global.Float32Array(buffer),e=new global.Float64Array(buffer),f=env.o|0,g=env.p|0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=global.Math.floor,q=global.Math.abs,r=global.Math.sqrt,s=global.Math.pow,t=global.Math.cos,u=global.Math.sin,v=global.Math.tan,w=global.Math.acos,x=global.Math.asin,y=global.Math.atan,z=global.Math.atan2,A=global.Math.ceil,B=global.Math.imul,C=global.Math.min,D=global.Math.clz32,E=env.a,F=env.b,G=env.c,H=env.d,I=env.e,J=env.f,K=env.g,L=env.h,M=env.i,N=env.j,O=env.k,P=env.l,Q=env.m,R=env.n,S=24048,T=5266928,U=0.0;function V(newBuffer){a=new Int8Array(newBuffer);c=new Uint8Array(newBuffer);b=new Int32Array(newBuffer);d=new Float32Array(newBuffer);e=new Float64Array(newBuffer);buffer=newBuffer;return true}\n// EMSCRIPTEN_START_FUNCS\nfunction W(a){a=a|0;var b=0;b=S;S=S+a|0;S=S+15&-16;return b|0}function X(){return S|0}function Y(a){a=a|0;S=a}function Z(a,b){a=a|0;b=b|0;S=a;T=b}function _(a){a=a|0;return (B(a*3|0,a+1|0)|0)+1|0}function $(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;if(!(ba(a,b,c,d,0)|0))return;f=(B(c*3|0,c+1|0)|0)+1|0;gd(d|0,0,f<<3|0)|0;e=Xc(f,4)|0;if(!e)return;ca(a,b,c,d,e,f,0);Wc(e);return}function aa(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0;if(!(ba(a,b,c,d,e)|0))return;f=(B(c*3|0,c+1|0)|0)+1|0;gd(d|0,0,f<<3|0)|0;if(e|0){gd(e|0,0,f<<2|0)|0;ca(a,b,c,d,e,f,0);return}e=Xc(f,4)|0;if(!e)return;ca(a,b,c,d,e,f,0);Wc(e);return}function ba(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;o=S;S=S+16|0;n=o;g=e;b[g>>2]=a;b[g+4>>2]=c;g=(f|0)!=0;if(g)b[f>>2]=0;if(Eb(a,c)|0){n=1;S=o;return n|0}b[n>>2]=0;a:do if((d|0)>=1)if(g){k=0;l=1;m=1;h=0;g=a;while(1){if(!(h|k)){g=da(g,c,4,n)|0;c=G()|0;if((g|0)==0&(c|0)==0){g=2;break a}if(Eb(g,c)|0){g=1;break a}}g=da(g,c,b[16+(k<<2)>>2]|0,n)|0;c=G()|0;if((g|0)==0&(c|0)==0){g=2;break a}a=e+(m<<3)|0;b[a>>2]=g;b[a+4>>2]=c;b[f+(m<<2)>>2]=l;h=h+1|0;a=(h|0)==(l|0);i=k+1|0;j=(i|0)==6;if(Eb(g,c)|0){g=1;break a}l=l+(j&a&1)|0;if((l|0)>(d|0)){g=0;break}else{k=a?(j?0:i):k;m=m+1|0;h=a?0:h}}}else{k=0;l=1;m=1;h=0;g=a;while(1){if(!(h|k)){g=da(g,c,4,n)|0;c=G()|0;if((g|0)==0&(c|0)==0){g=2;break a}if(Eb(g,c)|0){g=1;break a}}g=da(g,c,b[16+(k<<2)>>2]|0,n)|0;c=G()|0;if((g|0)==0&(c|0)==0){g=2;break a}a=e+(m<<3)|0;b[a>>2]=g;b[a+4>>2]=c;h=h+1|0;a=(h|0)==(l|0);i=k+1|0;j=(i|0)==6;if(Eb(g,c)|0){g=1;break a}l=l+(j&a&1)|0;if((l|0)>(d|0)){g=0;break}else{k=a?(j?0:i):k;m=m+1|0;h=a?0:h}}}else g=0;while(0);n=g;S=o;return n|0}function ca(a,c,d,e,f,g,h){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;m=S;S=S+16|0;l=m;if((a|0)==0&(c|0)==0){S=m;return}i=ad(a|0,c|0,g|0,((g|0)<0)<<31>>31|0)|0;G()|0;j=e+(i<<3)|0;n=j;o=b[n>>2]|0;n=b[n+4>>2]|0;k=(o|0)==(a|0)&(n|0)==(c|0);if(!((o|0)==0&(n|0)==0|k))do{i=(i+1|0)%(g|0)|0;j=e+(i<<3)|0;o=j;n=b[o>>2]|0;o=b[o+4>>2]|0;k=(n|0)==(a|0)&(o|0)==(c|0)}while(!((n|0)==0&(o|0)==0|k));i=f+(i<<2)|0;if(k?(b[i>>2]|0)<=(h|0):0){S=m;return}o=j;b[o>>2]=a;b[o+4>>2]=c;b[i>>2]=h;if((h|0)>=(d|0)){S=m;return}o=h+1|0;b[l>>2]=0;n=da(a,c,2,l)|0;ca(n,G()|0,d,e,f,g,o);b[l>>2]=0;n=da(a,c,3,l)|0;ca(n,G()|0,d,e,f,g,o);b[l>>2]=0;n=da(a,c,1,l)|0;ca(n,G()|0,d,e,f,g,o);b[l>>2]=0;n=da(a,c,5,l)|0;ca(n,G()|0,d,e,f,g,o);b[l>>2]=0;n=da(a,c,4,l)|0;ca(n,G()|0,d,e,f,g,o);b[l>>2]=0;n=da(a,c,6,l)|0;ca(n,G()|0,d,e,f,g,o);S=m;return}function da(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((b[e>>2]|0)>0){f=0;do{d=Pa(d)|0;f=f+1|0}while((f|0)<(b[e>>2]|0))}i=bd(a|0,c|0,45)|0;G()|0;j=i&127;g=Kb(a,c)|0;f=bd(a|0,c|0,52)|0;G()|0;f=f&15;a:do if(!f)h=6;else while(1){m=(15-f|0)*3|0;n=bd(a|0,c|0,m|0)|0;G()|0;n=n&7;o=(Qb(f)|0)==0;f=f+-1|0;l=cd(7,0,m|0)|0;c=c&~(G()|0);m=cd(b[(o?464:48)+(n*28|0)+(d<<2)>>2]|0,0,m|0)|0;k=G()|0;d=b[(o?672:256)+(n*28|0)+(d<<2)>>2]|0;a=m|a&~l;c=k|c;if(!d){d=0;break a}if(!f){h=6;break}}while(0);if((h|0)==6){o=b[880+(j*28|0)+(d<<2)>>2]|0;n=cd(o|0,0,45)|0;a=n|a;c=G()|0|c&-1040385;d=b[4304+(j*28|0)+(d<<2)>>2]|0;if((o&127|0)==127){o=cd(b[880+(j*28|0)+20>>2]|0,0,45)|0;c=G()|0|c&-1040385;d=b[4304+(j*28|0)+20>>2]|0;a=Mb(o|a,c)|0;c=G()|0;b[e>>2]=(b[e>>2]|0)+1}}h=bd(a|0,c|0,45)|0;G()|0;h=h&127;b:do if(!(la(h)|0)){if((d|0)>0){f=0;do{a=Mb(a,c)|0;c=G()|0;f=f+1|0}while((f|0)!=(d|0))}}else{c:do if((Kb(a,c)|0)==1){if((j|0)!=(h|0))if(ra(h,b[7728+(j*28|0)>>2]|0)|0){a=Ob(a,c)|0;g=1;c=G()|0;break}else{a=Mb(a,c)|0;g=1;c=G()|0;break}switch(g|0){case 5:{a=Ob(a,c)|0;c=G()|0;b[e>>2]=(b[e>>2]|0)+5;g=0;break c}case 3:{a=Mb(a,c)|0;c=G()|0;b[e>>2]=(b[e>>2]|0)+1;g=0;break c}default:{n=0;o=0;F(n|0);return o|0}}}else g=0;while(0);if((d|0)>0){f=0;do{a=Lb(a,c)|0;c=G()|0;f=f+1|0}while((f|0)!=(d|0))}if((j|0)!=(h|0)){if(!(ma(h)|0)){if((g|0)!=0|(Kb(a,c)|0)!=5)break;b[e>>2]=(b[e>>2]|0)+1;break}switch(i&127){case 8:case 118:break b;default:{}}if((Kb(a,c)|0)!=3)b[e>>2]=(b[e>>2]|0)+1}}while(0);b[e>>2]=((b[e>>2]|0)+d|0)%6|0;n=c;o=a;F(n|0);return o|0}function ea(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=S;S=S+16|0;l=m;if(!d){l=e;b[l>>2]=a;b[l+4>>2]=c;l=0;S=m;return l|0}b[l>>2]=0;a:do if(!(Eb(a,c)|0)){g=(d|0)>0;if(g){f=0;k=a;do{k=da(k,c,4,l)|0;c=G()|0;if((k|0)==0&(c|0)==0){a=2;break a}f=f+1|0;if(Eb(k,c)|0){a=1;break a}}while((f|0)<(d|0));j=e;b[j>>2]=k;b[j+4>>2]=c;j=d+-1|0;if(g){g=0;h=1;f=k;a=c;do{f=da(f,a,2,l)|0;a=G()|0;if((f|0)==0&(a|0)==0){a=2;break a}i=e+(h<<3)|0;b[i>>2]=f;b[i+4>>2]=a;h=h+1|0;if(Eb(f,a)|0){a=1;break a}g=g+1|0}while((g|0)<(d|0));i=0;g=h;do{f=da(f,a,3,l)|0;a=G()|0;if((f|0)==0&(a|0)==0){a=2;break a}h=e+(g<<3)|0;b[h>>2]=f;b[h+4>>2]=a;g=g+1|0;if(Eb(f,a)|0){a=1;break a}i=i+1|0}while((i|0)<(d|0));h=0;do{f=da(f,a,1,l)|0;a=G()|0;if((f|0)==0&(a|0)==0){a=2;break a}i=e+(g<<3)|0;b[i>>2]=f;b[i+4>>2]=a;g=g+1|0;if(Eb(f,a)|0){a=1;break a}h=h+1|0}while((h|0)<(d|0));h=0;do{f=da(f,a,5,l)|0;a=G()|0;if((f|0)==0&(a|0)==0){a=2;break a}i=e+(g<<3)|0;b[i>>2]=f;b[i+4>>2]=a;g=g+1|0;if(Eb(f,a)|0){a=1;break a}h=h+1|0}while((h|0)<(d|0));h=0;do{f=da(f,a,4,l)|0;a=G()|0;if((f|0)==0&(a|0)==0){a=2;break a}i=e+(g<<3)|0;b[i>>2]=f;b[i+4>>2]=a;g=g+1|0;if(Eb(f,a)|0){a=1;break a}h=h+1|0}while((h|0)<(d|0));h=0;while(1){f=da(f,a,6,l)|0;a=G()|0;if((f|0)==0&(a|0)==0){a=2;break a}if((h|0)!=(j|0)){i=e+(g<<3)|0;b[i>>2]=f;b[i+4>>2]=a;if(!(Eb(f,a)|0))g=g+1|0;else{a=1;break a}}h=h+1|0;if((h|0)>=(d|0)){h=k;g=c;break}}}else{h=k;f=k;g=c;a=c}}else{h=e;b[h>>2]=a;b[h+4>>2]=c;h=a;f=a;g=c;a=c}a=((h|0)!=(f|0)|(g|0)!=(a|0))&1}else a=1;while(0);l=a;S=m;return l|0}function fa(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;g=S;S=S+48|0;f=g+8|0;e=g;i=a;h=b[i+4>>2]|0;d=e;b[d>>2]=b[i>>2];b[d+4>>2]=h;uc(e,f);f=ya(f,c)|0;c=b[e>>2]|0;e=b[a+8>>2]|0;if((e|0)<=0){i=c;h=(f|0)<(i|0);i=h?i:f;i=i+12|0;S=g;return i|0}d=b[a+12>>2]|0;a=0;do{c=(b[d+(a<<3)>>2]|0)+c|0;a=a+1|0}while((a|0)<(e|0));i=(f|0)<(c|0);i=i?c:f;i=i+12|0;S=g;return i|0}function ga(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;i=S;S=S+48|0;e=i+8|0;f=i;if(!(ha(a,c,d)|0)){S=i;return}j=a;g=b[j+4>>2]|0;h=f;b[h>>2]=b[j>>2];b[h+4>>2]=g;uc(f,e);h=ya(e,c)|0;c=b[f>>2]|0;g=b[a+8>>2]|0;if((g|0)>0){f=b[a+12>>2]|0;e=0;do{c=(b[f+(e<<3)>>2]|0)+c|0;e=e+1|0}while((e|0)!=(g|0))}c=(h|0)<(c|0)?c:h;if((c|0)<=-12){S=i;return}j=c+11|0;gd(d|0,0,(((j|0)>0?j:0)<<3)+8|0)|0;S=i;return}function ha(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,I=0,J=0;J=S;S=S+112|0;D=J+80|0;j=J+72|0;E=J;F=J+56|0;k=a+8|0;I=Vc((b[k>>2]<<5)+32|0)|0;if(!I)H(22848,22448,800,22456);vc(a,I);g=a;e=b[g+4>>2]|0;i=j;b[i>>2]=b[g>>2];b[i+4>>2]=e;uc(j,D);i=ya(D,c)|0;e=b[j>>2]|0;g=b[k>>2]|0;if((g|0)>0){h=b[a+12>>2]|0;f=0;do{e=(b[h+(f<<3)>>2]|0)+e|0;f=f+1|0}while((f|0)!=(g|0))}i=(i|0)<(e|0)?e:i;C=i+12|0;f=Xc(C,8)|0;l=Xc(C,8)|0;b[D>>2]=0;A=a;B=b[A+4>>2]|0;e=j;b[e>>2]=b[A>>2];b[e+4>>2]=B;e=ia(j,C,c,D,f,l)|0;if(e|0){Wc(f);Wc(l);Wc(I);I=e;S=J;return I|0}a:do if((b[k>>2]|0)>0){g=a+12|0;e=0;while(1){h=ia((b[g>>2]|0)+(e<<3)|0,C,c,D,f,l)|0;e=e+1|0;if(h|0)break;if((e|0)>=(b[k>>2]|0))break a}Wc(f);Wc(l);Wc(I);I=h;S=J;return I|0}while(0);if((i|0)>-12)gd(l|0,0,((C|0)>1?C:1)<<3|0)|0;b:do if((b[D>>2]|0)>0){B=((C|0)<0)<<31>>31;v=f;w=l;x=f;y=f;z=l;A=f;e=f;r=f;s=l;t=l;u=l;f=l;c:while(1){q=b[D>>2]|0;o=0;p=0;g=0;while(1){h=E;i=h+56|0;do{b[h>>2]=0;h=h+4|0}while((h|0)<(i|0));c=v+(o<<3)|0;j=b[c>>2]|0;c=b[c+4>>2]|0;if(ba(j,c,1,E,0)|0){h=E;i=h+56|0;do{b[h>>2]=0;h=h+4|0}while((h|0)<(i|0));h=Xc(7,4)|0;if(h|0){ca(j,c,1,E,h,7,0);Wc(h)}}n=0;do{m=E+(n<<3)|0;l=b[m>>2]|0;m=b[m+4>>2]|0;d:do if(!((l|0)==0&(m|0)==0)){j=ad(l|0,m|0,C|0,B|0)|0;G()|0;h=d+(j<<3)|0;i=h;c=b[i>>2]|0;i=b[i+4>>2]|0;if(!((c|0)==0&(i|0)==0)){k=0;while(1){if((k|0)>(C|0))break c;if((c|0)==(l|0)&(i|0)==(m|0))break d;j=(j+1|0)%(C|0)|0;h=d+(j<<3)|0;i=h;c=b[i>>2]|0;i=b[i+4>>2]|0;if((c|0)==0&(i|0)==0)break;else k=k+1|0}}if(!((l|0)==0&(m|0)==0)){Ub(l,m,F);if(wc(a,I,F)|0){k=h;b[k>>2]=l;b[k+4>>2]=m;k=w+(g<<3)|0;b[k>>2]=l;b[k+4>>2]=m;g=g+1|0}}}while(0);n=n+1|0}while(n>>>0<7);p=p+1|0;if((p|0)>=(q|0))break;else o=o+1|0}if((q|0)>0)gd(x|0,0,q<<3|0)|0;b[D>>2]=g;if((g|0)>0){l=f;m=u;n=A;o=t;p=s;q=w;f=r;u=e;t=y;s=x;r=l;e=m;A=z;z=n;y=o;x=p;w=v;v=q}else break b}Wc(y);Wc(z);Wc(I);I=-1;S=J;return I|0}else e=l;while(0);Wc(I);Wc(f);Wc(e);I=0;S=J;return I|0}function ia(a,c,d,f,g,h){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0.0;C=S;S=S+48|0;y=C+32|0;z=C+16|0;A=C;i=b[a>>2]|0;if((i|0)<=0){B=0;S=C;return B|0}t=a+4|0;u=y+8|0;v=z+8|0;w=A+8|0;x=((c|0)<0)<<31>>31;s=0;a:while(1){j=b[t>>2]|0;q=j+(s<<4)|0;b[y>>2]=b[q>>2];b[y+4>>2]=b[q+4>>2];b[y+8>>2]=b[q+8>>2];b[y+12>>2]=b[q+12>>2];if((s|0)==(i+-1|0)){b[z>>2]=b[j>>2];b[z+4>>2]=b[j+4>>2];b[z+8>>2]=b[j+8>>2];b[z+12>>2]=b[j+12>>2]}else{q=j+(s+1<<4)|0;b[z>>2]=b[q>>2];b[z+4>>2]=b[q+4>>2];b[z+8>>2]=b[q+8>>2];b[z+12>>2]=b[q+12>>2]}q=za(y,z,d)|0;b:do if((q|0)>0){r=+(q|0);p=0;c:while(1){E=+(q-p|0);D=+(p|0);e[A>>3]=+e[y>>3]*E/r+ +e[z>>3]*D/r;e[w>>3]=+e[u>>3]*E/r+ +e[v>>3]*D/r;n=Rb(A,d)|0;o=G()|0;j=ad(n|0,o|0,c|0,x|0)|0;G()|0;i=h+(j<<3)|0;k=i;l=b[k>>2]|0;k=b[k+4>>2]|0;d:do if((l|0)==0&(k|0)==0)B=14;else{m=0;while(1){if((m|0)>(c|0)){i=1;break d}if((l|0)==(n|0)&(k|0)==(o|0)){i=7;break d}j=(j+1|0)%(c|0)|0;i=h+(j<<3)|0;k=i;l=b[k>>2]|0;k=b[k+4>>2]|0;if((l|0)==0&(k|0)==0){B=14;break}else m=m+1|0}}while(0);if((B|0)==14){B=0;if((n|0)==0&(o|0)==0)i=7;else{b[i>>2]=n;b[i+4>>2]=o;i=b[f>>2]|0;m=g+(i<<3)|0;b[m>>2]=n;b[m+4>>2]=o;b[f>>2]=i+1;i=0}}switch(i&7){case 7:case 0:break;default:break c}p=p+1|0;if((q|0)<=(p|0)){B=8;break b}}if(i|0){i=-1;B=20;break a}}else B=8;while(0);if((B|0)==8)B=0;s=s+1|0;i=b[a>>2]|0;if((s|0)>=(i|0)){i=0;B=20;break}}if((B|0)==20){S=C;return i|0}return 0}function ja(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=S;S=S+176|0;j=k;if((c|0)<1){Lc(d,0,0);S=k;return}h=a;h=bd(b[h>>2]|0,b[h+4>>2]|0,52)|0;G()|0;Lc(d,(c|0)>6?c:6,h&15);h=0;do{e=a+(h<<3)|0;Vb(b[e>>2]|0,b[e+4>>2]|0,j);e=b[j>>2]|0;if((e|0)>0){i=0;do{g=j+8+(i<<4)|0;i=i+1|0;e=j+8+(((i|0)%(e|0)|0)<<4)|0;f=Qc(d,e,g)|0;if(!f)Pc(d,g,e)|0;else Oc(d,f)|0;e=b[j>>2]|0}while((i|0)<(e|0))}h=h+1|0}while((h|0)!=(c|0));S=k;return}function ka(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;g=S;S=S+32|0;e=g;f=g+16|0;ja(a,c,f);b[d>>2]=0;b[d+4>>2]=0;b[d+8>>2]=0;a=Nc(f)|0;if(!a){jc(d)|0;Mc(f);S=g;return}do{c=gc(d)|0;do{hc(c,a)|0;h=a+16|0;b[e>>2]=b[h>>2];b[e+4>>2]=b[h+4>>2];b[e+8>>2]=b[h+8>>2];b[e+12>>2]=b[h+12>>2];Oc(f,a)|0;a=Rc(f,e)|0}while((a|0)!=0);a=Nc(f)|0}while((a|0)!=0);jc(d)|0;Mc(f);S=g;return}function la(a){a=a|0;return b[7728+(a*28|0)+16>>2]|0}function ma(a){a=a|0;return (a|0)==4|(a|0)==117|0}function na(a){a=a|0;return b[11152+((b[a>>2]|0)*216|0)+((b[a+4>>2]|0)*72|0)+((b[a+8>>2]|0)*24|0)+(b[a+12>>2]<<3)>>2]|0}function oa(a){a=a|0;return b[11152+((b[a>>2]|0)*216|0)+((b[a+4>>2]|0)*72|0)+((b[a+8>>2]|0)*24|0)+(b[a+12>>2]<<3)+4>>2]|0}function pa(a,c){a=a|0;c=c|0;a=7728+(a*28|0)|0;b[c>>2]=b[a>>2];b[c+4>>2]=b[a+4>>2];b[c+8>>2]=b[a+8>>2];b[c+12>>2]=b[a+12>>2];return}function qa(a,c){a=a|0;c=c|0;var d=0,e=0;if(c>>>0>20){c=-1;return c|0}do if((b[11152+(c*216|0)>>2]|0)!=(a|0))if((b[11152+(c*216|0)+8>>2]|0)!=(a|0))if((b[11152+(c*216|0)+16>>2]|0)!=(a|0))if((b[11152+(c*216|0)+24>>2]|0)!=(a|0))if((b[11152+(c*216|0)+32>>2]|0)!=(a|0))if((b[11152+(c*216|0)+40>>2]|0)!=(a|0))if((b[11152+(c*216|0)+48>>2]|0)!=(a|0))if((b[11152+(c*216|0)+56>>2]|0)!=(a|0))if((b[11152+(c*216|0)+64>>2]|0)!=(a|0))if((b[11152+(c*216|0)+72>>2]|0)!=(a|0))if((b[11152+(c*216|0)+80>>2]|0)!=(a|0))if((b[11152+(c*216|0)+88>>2]|0)!=(a|0))if((b[11152+(c*216|0)+96>>2]|0)!=(a|0))if((b[11152+(c*216|0)+104>>2]|0)!=(a|0))if((b[11152+(c*216|0)+112>>2]|0)!=(a|0))if((b[11152+(c*216|0)+120>>2]|0)!=(a|0))if((b[11152+(c*216|0)+128>>2]|0)!=(a|0))if((b[11152+(c*216|0)+136>>2]|0)==(a|0)){a=2;d=1;e=2}else{if((b[11152+(c*216|0)+144>>2]|0)==(a|0)){a=0;d=2;e=0;break}if((b[11152+(c*216|0)+152>>2]|0)==(a|0)){a=0;d=2;e=1;break}if((b[11152+(c*216|0)+160>>2]|0)==(a|0)){a=0;d=2;e=2;break}if((b[11152+(c*216|0)+168>>2]|0)==(a|0)){a=1;d=2;e=0;break}if((b[11152+(c*216|0)+176>>2]|0)==(a|0)){a=1;d=2;e=1;break}if((b[11152+(c*216|0)+184>>2]|0)==(a|0)){a=1;d=2;e=2;break}if((b[11152+(c*216|0)+192>>2]|0)==(a|0)){a=2;d=2;e=0;break}if((b[11152+(c*216|0)+200>>2]|0)==(a|0)){a=2;d=2;e=1;break}if((b[11152+(c*216|0)+208>>2]|0)==(a|0)){a=2;d=2;e=2;break}else a=-1;return a|0}else{a=2;d=1;e=1}else{a=2;d=1;e=0}else{a=1;d=1;e=2}else{a=1;d=1;e=1}else{a=1;d=1;e=0}else{a=0;d=1;e=2}else{a=0;d=1;e=1}else{a=0;d=1;e=0}else{a=2;d=0;e=2}else{a=2;d=0;e=1}else{a=2;d=0;e=0}else{a=1;d=0;e=2}else{a=1;d=0;e=1}else{a=1;d=0;e=0}else{a=0;d=0;e=2}else{a=0;d=0;e=1}else{a=0;d=0;e=0}while(0);c=b[11152+(c*216|0)+(d*72|0)+(a*24|0)+(e<<3)+4>>2]|0;return c|0}function ra(a,c){a=a|0;c=c|0;if((b[7728+(a*28|0)+20>>2]|0)==(c|0)){c=1;return c|0}c=(b[7728+(a*28|0)+24>>2]|0)==(c|0);return c|0}function sa(a,c){a=a|0;c=c|0;return b[880+(a*28|0)+(c<<2)>>2]|0}function ta(a,c){a=a|0;c=c|0;if((b[880+(a*28|0)>>2]|0)==(c|0)){c=0;return c|0}if((b[880+(a*28|0)+4>>2]|0)==(c|0)){c=1;return c|0}if((b[880+(a*28|0)+8>>2]|0)==(c|0)){c=2;return c|0}if((b[880+(a*28|0)+12>>2]|0)==(c|0)){c=3;return c|0}if((b[880+(a*28|0)+16>>2]|0)==(c|0)){c=4;return c|0}if((b[880+(a*28|0)+20>>2]|0)==(c|0)){c=5;return c|0}else return ((b[880+(a*28|0)+24>>2]|0)==(c|0)?6:7)|0;return 0}function ua(){return 122}function va(a){a=a|0;var c=0,d=0,e=0;c=0;do{cd(c|0,0,45)|0;e=G()|0|134225919;d=a+(c<<3)|0;b[d>>2]=-1;b[d+4>>2]=e;c=c+1|0}while((c|0)!=122);return}function wa(a){a=a|0;return +e[a+16>>3]<+e[a+24>>3]|0}function xa(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,f=0.0;c=+e[b>>3];if(!(c>=+e[a+8>>3])){b=0;return b|0}if(!(c<=+e[a>>3])){b=0;return b|0}d=+e[a+16>>3];c=+e[a+24>>3];f=+e[b+8>>3];b=f>=c;a=f<=d&1;if(d<c){if(b)a=1}else if(!b)a=0;b=(a|0)!=0;return b|0}function ya(a,c){a=a|0;c=c|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0.0,l=0.0;i=S;S=S+288|0;d=i+264|0;f=i+96|0;g=i;h=g;j=h+96|0;do{b[h>>2]=0;h=h+4|0}while((h|0)<(j|0));Zb(c,g);h=g;j=b[h>>2]|0;h=b[h+4>>2]|0;Ub(j,h,d);Vb(j,h,f);k=+jb(d,f+8|0);e[d>>3]=+e[a>>3];h=d+8|0;e[h>>3]=+e[a+16>>3];e[f>>3]=+e[a+8>>3];j=f+8|0;e[j>>3]=+e[a+24>>3];l=+jb(d,f);j=~~+A(+(l*l/+dd(+(+q(+((+e[h>>3]-+e[j>>3])/(+e[d>>3]-+e[f>>3])))),3.0)/(k*(k*2.59807621135)*.8)));S=i;return ((j|0)==0?1:j)|0}function za(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0.0;i=S;S=S+288|0;e=i+264|0;f=i+96|0;g=i;h=g;j=h+96|0;do{b[h>>2]=0;h=h+4|0}while((h|0)<(j|0));Zb(d,g);j=g;h=b[j>>2]|0;j=b[j+4>>2]|0;Ub(h,j,e);Vb(h,j,f);k=+jb(e,f+8|0);j=~~+A(+(+jb(a,c)/(k*2.0)));S=i;return ((j|0)==0?1:j)|0}function Aa(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;b[a>>2]=c;b[a+4>>2]=d;b[a+8>>2]=e;return}function Ba(a,c){a=a|0;c=c|0;var d=0,f=0,g=0,h=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0.0;n=c+8|0;b[n>>2]=0;k=+e[a>>3];i=+q(+k);l=+e[a+8>>3];j=+q(+l)/.8660254037844386;i=i+j*.5;d=~~i;a=~~j;i=i-+(d|0);j=j-+(a|0);do if(i<.5)if(i<.3333333333333333){b[c>>2]=d;if(j<(i+1.0)*.5){b[c+4>>2]=a;break}else{a=a+1|0;b[c+4>>2]=a;break}}else{o=1.0-i;a=(!(j<o)&1)+a|0;b[c+4>>2]=a;if(o<=j&j<i*2.0){d=d+1|0;b[c>>2]=d;break}else{b[c>>2]=d;break}}else{if(!(i<.6666666666666666)){d=d+1|0;b[c>>2]=d;if(j<i*.5){b[c+4>>2]=a;break}else{a=a+1|0;b[c+4>>2]=a;break}}if(j<1.0-i){b[c+4>>2]=a;if(i*2.0+-1.0<j){b[c>>2]=d;break}}else{a=a+1|0;b[c+4>>2]=a}d=d+1|0;b[c>>2]=d}while(0);do if(k<0.0)if(!(a&1)){m=(a|0)/2|0;m=Zc(d|0,((d|0)<0)<<31>>31|0,m|0,((m|0)<0)<<31>>31|0)|0;d=~~(+(d|0)-(+(m>>>0)+4294967296.0*+(G()|0))*2.0);b[c>>2]=d;break}else{m=(a+1|0)/2|0;m=Zc(d|0,((d|0)<0)<<31>>31|0,m|0,((m|0)<0)<<31>>31|0)|0;d=~~(+(d|0)-((+(m>>>0)+4294967296.0*+(G()|0))*2.0+1.0));b[c>>2]=d;break}while(0);m=c+4|0;if(l<0.0){d=d-((a<<1|1|0)/2|0)|0;b[c>>2]=d;a=0-a|0;b[m>>2]=a}f=a-d|0;if((d|0)<0){g=0-d|0;b[m>>2]=f;b[n>>2]=g;b[c>>2]=0;a=f;d=0}else g=0;if((a|0)<0){d=d-a|0;b[c>>2]=d;g=g-a|0;b[n>>2]=g;b[m>>2]=0;a=0}h=d-g|0;f=a-g|0;if((g|0)<0){b[c>>2]=h;b[m>>2]=f;b[n>>2]=0;a=f;d=h;g=0}f=(a|0)<(d|0)?a:d;f=(g|0)<(f|0)?g:f;if((f|0)<=0)return;b[c>>2]=d-f;b[m>>2]=a-f;b[n>>2]=g-f;return}function Ca(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0;c=b[a>>2]|0;h=a+4|0;d=b[h>>2]|0;if((c|0)<0){d=d-c|0;b[h>>2]=d;g=a+8|0;b[g>>2]=(b[g>>2]|0)-c;b[a>>2]=0;c=0}if((d|0)<0){c=c-d|0;b[a>>2]=c;g=a+8|0;f=(b[g>>2]|0)-d|0;b[g>>2]=f;b[h>>2]=0;d=0}else{f=a+8|0;g=f;f=b[f>>2]|0}if((f|0)<0){c=c-f|0;b[a>>2]=c;d=d-f|0;b[h>>2]=d;b[g>>2]=0;f=0}e=(d|0)<(c|0)?d:c;e=(f|0)<(e|0)?f:e;if((e|0)<=0)return;b[a>>2]=c-e;b[h>>2]=d-e;b[g>>2]=f-e;return}function Da(a,c){a=a|0;c=c|0;var d=0.0,f=0;f=b[a+8>>2]|0;d=+((b[a+4>>2]|0)-f|0);e[c>>3]=+((b[a>>2]|0)-f|0)-d*.5;e[c+8>>3]=d*.8660254037844386;return}function Ea(a,c,d){a=a|0;c=c|0;d=d|0;b[d>>2]=(b[c>>2]|0)+(b[a>>2]|0);b[d+4>>2]=(b[c+4>>2]|0)+(b[a+4>>2]|0);b[d+8>>2]=(b[c+8>>2]|0)+(b[a+8>>2]|0);return}function Fa(a,c,d){a=a|0;c=c|0;d=d|0;b[d>>2]=(b[a>>2]|0)-(b[c>>2]|0);b[d+4>>2]=(b[a+4>>2]|0)-(b[c+4>>2]|0);b[d+8>>2]=(b[a+8>>2]|0)-(b[c+8>>2]|0);return}function Ga(a,c){a=a|0;c=c|0;var d=0,e=0;d=B(b[a>>2]|0,c)|0;b[a>>2]=d;d=a+4|0;e=B(b[d>>2]|0,c)|0;b[d>>2]=e;a=a+8|0;c=B(b[a>>2]|0,c)|0;b[a>>2]=c;return}function Ha(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;h=b[a>>2]|0;i=(h|0)<0;e=(b[a+4>>2]|0)-(i?h:0)|0;g=(e|0)<0;f=(g?0-e|0:0)+((b[a+8>>2]|0)-(i?h:0))|0;d=(f|0)<0;a=d?0:f;c=(g?0:e)-(d?f:0)|0;f=(i?0:h)-(g?e:0)-(d?f:0)|0;d=(c|0)<(f|0)?c:f;d=(a|0)<(d|0)?a:d;e=(d|0)>0;a=a-(e?d:0)|0;c=c-(e?d:0)|0;a:do switch(f-(e?d:0)|0){case 0:switch(c|0){case 0:{i=(a|0)==0?0:(a|0)==1?1:7;return i|0}case 1:{i=(a|0)==0?2:(a|0)==1?3:7;return i|0}default:break a}case 1:switch(c|0){case 0:{i=(a|0)==0?4:(a|0)==1?5:7;return i|0}case 1:{if(!a)a=6;else break a;return a|0}default:break a}default:{}}while(0);i=7;return i|0}function Ia(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;h=a+8|0;d=b[h>>2]|0;c=(b[a>>2]|0)-d|0;i=a+4|0;d=(b[i>>2]|0)-d|0;e=Uc(+((c*3|0)-d|0)/7.0)|0;b[a>>2]=e;c=Uc(+((d<<1)+c|0)/7.0)|0;b[i>>2]=c;b[h>>2]=0;d=c-e|0;if((e|0)<0){g=0-e|0;b[i>>2]=d;b[h>>2]=g;b[a>>2]=0;c=d;e=0;d=g}else d=0;if((c|0)<0){e=e-c|0;b[a>>2]=e;d=d-c|0;b[h>>2]=d;b[i>>2]=0;c=0}g=e-d|0;f=c-d|0;if((d|0)<0){b[a>>2]=g;b[i>>2]=f;b[h>>2]=0;c=f;f=g;d=0}else f=e;e=(c|0)<(f|0)?c:f;e=(d|0)<(e|0)?d:e;if((e|0)<=0)return;b[a>>2]=f-e;b[i>>2]=c-e;b[h>>2]=d-e;return}function Ja(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;h=a+8|0;d=b[h>>2]|0;c=(b[a>>2]|0)-d|0;i=a+4|0;d=(b[i>>2]|0)-d|0;e=Uc(+((c<<1)+d|0)/7.0)|0;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]=g;b[h>>2]=f;b[i>>2]=0;e=g;c=0}else f=d;d=(f|0)<(e|0)?f:e;d=(c|0)<(d|0)?c:d;if((d|0)<=0)return;b[a>>2]=e-d;b[h>>2]=f-d;b[i>>2]=c-d;return}function Oa(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=b[a>>2]|0;h=a+4|0;e=b[h>>2]|0;i=a+8|0;d=b[i>>2]|0;f=e+c|0;b[a>>2]=f;e=d+e|0;b[h>>2]=e;c=d+c|0;b[i>>2]=c;d=e-f|0;if((f|0)<0){c=c-f|0;b[h>>2]=d;b[i>>2]=c;b[a>>2]=0;e=0}else{d=e;e=f}if((d|0)<0){e=e-d|0;b[a>>2]=e;c=c-d|0;b[i>>2]=c;b[h>>2]=0;d=0}g=e-c|0;f=d-c|0;if((c|0)<0){b[a>>2]=g;b[h>>2]=f;b[i>>2]=0;e=g;c=0}else f=d;d=(f|0)<(e|0)?f:e;d=(c|0)<(d|0)?c:d;if((d|0)<=0)return;b[a>>2]=e-d;b[h>>2]=f-d;b[i>>2]=c-d;return}function Pa(a){a=a|0;switch(a|0){case 1:{a=5;break}case 5:{a=4;break}case 4:{a=6;break}case 6:{a=2;break}case 2:{a=3;break}case 3:{a=1;break}default:{}}return a|0}function Qa(a){a=a|0;switch(a|0){case 1:{a=3;break}case 3:{a=2;break}case 2:{a=6;break}case 6:{a=4;break}case 4:{a=5;break}case 5:{a=1;break}default:{}}return a|0}function Ra(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;c=b[a>>2]|0;h=a+4|0;d=b[h>>2]|0;i=a+8|0;e=b[i>>2]|0;f=d+(c<<1)|0;b[a>>2]=f;d=e+(d<<1)|0;b[h>>2]=d;c=(e<<1)+c|0;b[i>>2]=c;e=d-f|0;if((f|0)<0){c=c-f|0;b[h>>2]=e;b[i>>2]=c;b[a>>2]=0;d=e;e=0}else e=f;if((d|0)<0){e=e-d|0;b[a>>2]=e;c=c-d|0;b[i>>2]=c;b[h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return ((a|0)>(c|0)?a:c)|0}function Ua(a,c){a=a|0;c=c|0;var d=0;d=b[a+8>>2]|0;b[c>>2]=(b[a>>2]|0)-d;b[c+4>>2]=(b[a+4>>2]|0)-d;return}function Va(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;e=b[a>>2]|0;b[c>>2]=e;a=b[a+4>>2]|0;h=c+4|0;b[h>>2]=a;i=c+8|0;b[i>>2]=0;d=a-e|0;if((e|0)<0){a=0-e|0;b[h>>2]=d;b[i>>2]=a;b[c>>2]=0;e=0}else{d=a;a=0}if((d|0)<0){e=e-d|0;b[c>>2]=e;a=a-d|0;b[i>>2]=a;b[h>>2]=0;d=0}g=e-a|0;f=d-a|0;if((a|0)<0){b[c>>2]=g;b[h>>2]=f;b[i>>2]=0;d=f;f=g;a=0}else f=e;e=(d|0)<(f|0)?d:f;e=(a|0)<(e|0)?a:e;if((e|0)<=0)return;b[c>>2]=f-e;b[h>>2]=d-e;b[i>>2]=a-e;return}function Wa(a){a=a|0;var c=0,d=0,e=0,f=0;c=a+8|0;f=b[c>>2]|0;d=f-(b[a>>2]|0)|0;b[a>>2]=d;e=a+4|0;a=(b[e>>2]|0)-f|0;b[e>>2]=a;b[c>>2]=0-(a+d);return}function Xa(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;d=b[a>>2]|0;c=0-d|0;b[a>>2]=c;h=a+8|0;b[h>>2]=0;i=a+4|0;e=b[i>>2]|0;f=e+d|0;if((d|0)>0){b[i>>2]=f;b[h>>2]=d;b[a>>2]=0;c=0;e=f}else d=0;if((e|0)<0){g=c-e|0;b[a>>2]=g;d=d-e|0;b[h>>2]=d;b[i>>2]=0;f=g-d|0;c=0-d|0;if((d|0)<0){b[a>>2]=f;b[i>>2]=c;b[h>>2]=0;e=c;d=0}else{e=0;f=g}}else f=c;c=(e|0)<(f|0)?e:f;c=(d|0)<(c|0)?d:c;if((c|0)<=0)return;b[a>>2]=f-c;b[i>>2]=e-c;b[h>>2]=d-c;return}function Ya(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=S;S=S+16|0;e=d;Za(a,b,c,e);Ba(e,c+4|0);S=d;return}function Za(a,c,d,f){a=a|0;c=c|0;d=d|0;f=f|0;var g=0.0,h=0,i=0.0,j=0.0,k=0;k=S;S=S+32|0;h=k;Ic(a,h);b[d>>2]=0;g=+Hc(15888,h);i=+Hc(15912,h);if(i<g){b[d>>2]=1;g=i}i=+Hc(15936,h);if(i<g){b[d>>2]=2;g=i}i=+Hc(15960,h);if(i<g){b[d>>2]=3;g=i}i=+Hc(15984,h);if(i<g){b[d>>2]=4;g=i}i=+Hc(16008,h);if(i<g){b[d>>2]=5;g=i}i=+Hc(16032,h);if(i<g){b[d>>2]=6;g=i}i=+Hc(16056,h);if(i<g){b[d>>2]=7;g=i}i=+Hc(16080,h);if(i<g){b[d>>2]=8;g=i}i=+Hc(16104,h);if(i<g){b[d>>2]=9;g=i}i=+Hc(16128,h);if(i<g){b[d>>2]=10;g=i}i=+Hc(16152,h);if(i<g){b[d>>2]=11;g=i}i=+Hc(16176,h);if(i<g){b[d>>2]=12;g=i}i=+Hc(16200,h);if(i<g){b[d>>2]=13;g=i}i=+Hc(16224,h);if(i<g){b[d>>2]=14;g=i}i=+Hc(16248,h);if(i<g){b[d>>2]=15;g=i}i=+Hc(16272,h);if(i<g){b[d>>2]=16;g=i}i=+Hc(16296,h);if(i<g){b[d>>2]=17;g=i}i=+Hc(16320,h);if(i<g){b[d>>2]=18;g=i}i=+Hc(16344,h);if(i<g){b[d>>2]=19;g=i}i=+w(+(1.0-g*.5));if(i<1.0e-16){b[f>>2]=0;b[f+4>>2]=0;b[f+8>>2]=0;b[f+12>>2]=0;S=k;return}d=b[d>>2]|0;g=+e[16368+(d*24|0)>>3];g=+gb(g-+gb(+lb(15568+(d<<4)|0,a)));if(!(Qb(c)|0))j=g;else j=+gb(g+-.3334731722518321);g=+v(+i)/.381966011250105;if((c|0)>0){h=0;do{g=g*2.6457513110645907;h=h+1|0}while((h|0)!=(c|0))}i=+t(+j)*g;e[f>>3]=i;j=+u(+j)*g;e[f+8>>3]=j;S=k;return}function _a(a,c,d,f,g){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;var h=0.0,i=0.0;h=+Ec(a);if(h<1.0e-16){c=15568+(c<<4)|0;b[g>>2]=b[c>>2];b[g+4>>2]=b[c+4>>2];b[g+8>>2]=b[c+8>>2];b[g+12>>2]=b[c+12>>2];return}i=+z(+(+e[a+8>>3]),+(+e[a>>3]));if((d|0)>0){a=0;do{h=h/2.6457513110645907;a=a+1|0}while((a|0)!=(d|0))}if(!f){h=+y(+(h*.381966011250105));if(Qb(d)|0)i=+gb(i+.3334731722518321)}else{h=h/3.0;d=(Qb(d)|0)==0;h=+y(+((d?h:h/2.6457513110645907)*.381966011250105))}mb(15568+(c<<4)|0,+gb(+e[16368+(c*24|0)>>3]-i),h,g);return}function $a(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;e=S;S=S+16|0;f=e;Da(a+4|0,f);_a(f,b[a>>2]|0,c,0,d);S=e;return}function ab(a,c,d,f,g){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0.0,J=0.0;G=S;S=S+272|0;h=G+256|0;u=G+240|0;D=G;E=G+224|0;F=G+208|0;v=G+176|0;w=G+160|0;x=G+192|0;y=G+144|0;z=G+128|0;A=G+112|0;B=G+96|0;C=G+80|0;b[h>>2]=c;b[u>>2]=b[a>>2];b[u+4>>2]=b[a+4>>2];b[u+8>>2]=b[a+8>>2];b[u+12>>2]=b[a+12>>2];bb(u,h,D);b[g>>2]=0;u=f+d+((f|0)==5&1)|0;if((u|0)<=(d|0)){S=G;return}k=b[h>>2]|0;l=E+4|0;m=v+4|0;n=d+5|0;o=16848+(k<<2)|0;p=16928+(k<<2)|0;q=z+8|0;r=A+8|0;s=B+8|0;t=F+4|0;j=d;a:while(1){i=D+(((j|0)%5|0)<<4)|0;b[F>>2]=b[i>>2];b[F+4>>2]=b[i+4>>2];b[F+8>>2]=b[i+8>>2];b[F+12>>2]=b[i+12>>2];do{}while((cb(F,k,0,1)|0)==2);if((j|0)>(d|0)&(Qb(c)|0)!=0){b[v>>2]=b[F>>2];b[v+4>>2]=b[F+4>>2];b[v+8>>2]=b[F+8>>2];b[v+12>>2]=b[F+12>>2];Da(l,w);f=b[v>>2]|0;h=b[17008+(f*80|0)+(b[E>>2]<<2)>>2]|0;b[v>>2]=b[18608+(f*80|0)+(h*20|0)>>2];i=b[18608+(f*80|0)+(h*20|0)+16>>2]|0;if((i|0)>0){a=0;do{Na(m);a=a+1|0}while((a|0)<(i|0))}i=18608+(f*80|0)+(h*20|0)+4|0;b[x>>2]=b[i>>2];b[x+4>>2]=b[i+4>>2];b[x+8>>2]=b[i+8>>2];Ga(x,(b[o>>2]|0)*3|0);Ea(m,x,m);Ca(m);Da(m,y);I=+(b[p>>2]|0);e[z>>3]=I*3.0;e[q>>3]=0.0;J=I*-1.5;e[A>>3]=J;e[r>>3]=I*2.598076211353316;e[B>>3]=J;e[s>>3]=I*-2.598076211353316;switch(b[17008+((b[v>>2]|0)*80|0)+(b[F>>2]<<2)>>2]|0){case 1:{a=A;f=z;break}case 3:{a=B;f=A;break}case 2:{a=z;f=B;break}default:{a=12;break a}}Fc(w,y,f,a,C);_a(C,b[v>>2]|0,k,1,g+8+(b[g>>2]<<4)|0);b[g>>2]=(b[g>>2]|0)+1}if((j|0)<(n|0)){Da(t,v);_a(v,b[F>>2]|0,k,1,g+8+(b[g>>2]<<4)|0);b[g>>2]=(b[g>>2]|0)+1};b[E>>2]=b[F>>2];b[E+4>>2]=b[F+4>>2];b[E+8>>2]=b[F+8>>2];b[E+12>>2]=b[F+12>>2];j=j+1|0;if((j|0)>=(u|0)){a=3;break}}if((a|0)==3){S=G;return}else if((a|0)==12)H(22474,22521,581,22531)}function bb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=S;S=S+128|0;e=j+64|0;f=j;g=e;h=20208;i=g+60|0;do{b[g>>2]=b[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));g=f;h=20272;i=g+60|0;do{b[g>>2]=b[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));i=(Qb(b[c>>2]|0)|0)==0;e=i?e:f;f=a+4|0;Ra(f);Sa(f);if(Qb(b[c>>2]|0)|0){La(f);b[c>>2]=(b[c>>2]|0)+1}b[d>>2]=b[a>>2];c=d+4|0;Ea(f,e,c);Ca(c);b[d+16>>2]=b[a>>2];c=d+20|0;Ea(f,e+12|0,c);Ca(c);b[d+32>>2]=b[a>>2];c=d+36|0;Ea(f,e+24|0,c);Ca(c);b[d+48>>2]=b[a>>2];c=d+52|0;Ea(f,e+36|0,c);Ca(c);b[d+64>>2]=b[a>>2];d=d+68|0;Ea(f,e+48|0,d);Ca(d);S=j;return}function cb(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;p=S;S=S+32|0;n=p+12|0;i=p;o=a+4|0;m=b[16928+(c<<2)>>2]|0;l=(e|0)!=0;m=l?m*3|0:m;f=b[o>>2]|0;k=a+8|0;h=b[k>>2]|0;if(l){g=a+12|0;e=b[g>>2]|0;f=h+f+e|0;if((f|0)==(m|0)){o=1;S=p;return o|0}else j=g}else{j=a+12|0;e=b[j>>2]|0;f=h+f+e|0}if((f|0)<=(m|0)){o=0;S=p;return o|0}do if((e|0)>0){e=b[a>>2]|0;if((h|0)>0){g=18608+(e*80|0)+60|0;e=a;break}e=18608+(e*80|0)+40|0;if(!d){g=e;e=a}else{Aa(n,m,0,0);Fa(o,n,i);Oa(i);Ea(i,n,o);g=e;e=a}}else{g=18608+((b[a>>2]|0)*80|0)+20|0;e=a}while(0);b[e>>2]=b[g>>2];f=g+16|0;if((b[f>>2]|0)>0){e=0;do{Na(o);e=e+1|0}while((e|0)<(b[f>>2]|0))}a=g+4|0;b[n>>2]=b[a>>2];b[n+4>>2]=b[a+4>>2];b[n+8>>2]=b[a+8>>2];c=b[16848+(c<<2)>>2]|0;Ga(n,l?c*3|0:c);Ea(o,n,o);Ca(o);if(l)e=((b[k>>2]|0)+(b[o>>2]|0)+(b[j>>2]|0)|0)==(m|0)?1:2;else e=2;o=e;S=p;return o|0}function db(a,b){a=a|0;b=b|0;var c=0;do c=cb(a,b,0,1)|0;while((c|0)==2);return c|0}function eb(a,c,d,f,g){a=a|0;c=c|0;d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0.0;B=S;S=S+240|0;h=B+224|0;x=B+208|0;y=B;z=B+192|0;A=B+176|0;s=B+160|0;t=B+144|0;u=B+128|0;v=B+112|0;w=B+96|0;b[h>>2]=c;b[x>>2]=b[a>>2];b[x+4>>2]=b[a+4>>2];b[x+8>>2]=b[a+8>>2];b[x+12>>2]=b[a+12>>2];fb(x,h,y);b[g>>2]=0;r=f+d+((f|0)==6&1)|0;if((r|0)<=(d|0)){S=B;return}k=b[h>>2]|0;l=d+6|0;m=16928+(k<<2)|0;n=t+8|0;o=u+8|0;p=v+8|0;q=z+4|0;i=0;j=d;f=-1;a:while(1){h=(j|0)%6|0;a=y+(h<<4)|0;b[z>>2]=b[a>>2];b[z+4>>2]=b[a+4>>2];b[z+8>>2]=b[a+8>>2];b[z+12>>2]=b[a+12>>2];a=i;i=cb(z,k,0,1)|0;if((j|0)>(d|0)&(Qb(c)|0)!=0?((a|0)!=1?(b[z>>2]|0)!=(f|0):0):0){Da(y+(((h+5|0)%6|0)<<4)+4|0,A);Da(y+(h<<4)+4|0,s);C=+(b[m>>2]|0);e[t>>3]=C*3.0;e[n>>3]=0.0;D=C*-1.5;e[u>>3]=D;e[o>>3]=C*2.598076211353316;e[v>>3]=D;e[p>>3]=C*-2.598076211353316;h=b[x>>2]|0;switch(b[17008+(h*80|0)+(((f|0)==(h|0)?b[z>>2]|0:f)<<2)>>2]|0){case 1:{a=u;f=t;break}case 3:{a=v;f=u;break}case 2:{a=t;f=v;break}default:{a=8;break a}}Fc(A,s,f,a,w);if(!(Gc(A,w)|0)?!(Gc(s,w)|0):0){_a(w,b[x>>2]|0,k,1,g+8+(b[g>>2]<<4)|0);b[g>>2]=(b[g>>2]|0)+1}}if((j|0)<(l|0)){Da(q,A);_a(A,b[z>>2]|0,k,1,g+8+(b[g>>2]<<4)|0);b[g>>2]=(b[g>>2]|0)+1}j=j+1|0;if((j|0)>=(r|0)){a=3;break}else f=b[z>>2]|0}if((a|0)==3){S=B;return}else if((a|0)==8)H(22557,22521,746,22602)}function fb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;j=S;S=S+160|0;e=j+80|0;f=j;g=e;h=20336;i=g+72|0;do{b[g>>2]=b[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));g=f;h=20416;i=g+72|0;do{b[g>>2]=b[h>>2];g=g+4|0;h=h+4|0}while((g|0)<(i|0));i=(Qb(b[c>>2]|0)|0)==0;e=i?e:f;f=a+4|0;Ra(f);Sa(f);if(Qb(b[c>>2]|0)|0){La(f);b[c>>2]=(b[c>>2]|0)+1}b[d>>2]=b[a>>2];c=d+4|0;Ea(f,e,c);Ca(c);b[d+16>>2]=b[a>>2];c=d+20|0;Ea(f,e+12|0,c);Ca(c);b[d+32>>2]=b[a>>2];c=d+36|0;Ea(f,e+24|0,c);Ca(c);b[d+48>>2]=b[a>>2];c=d+52|0;Ea(f,e+36|0,c);Ca(c);b[d+64>>2]=b[a>>2];c=d+68|0;Ea(f,e+48|0,c);Ca(c);b[d+80>>2]=b[a>>2];d=d+84|0;Ea(f,e+60|0,d);Ca(d);S=j;return}function gb(a){a=+a;var b=0.0;b=a<0.0?a+6.283185307179586:a;return +(!(a>=6.283185307179586)?b:b+-6.283185307179586)}function hb(a,b){a=a|0;b=b|0;if(!(+q(+(+e[a>>3]-+e[b>>3]))<1.7453292519943298e-11)){b=0;return b|0}b=+q(+(+e[a+8>>3]-+e[b+8>>3]))<1.7453292519943298e-11;return b|0}function ib(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,f=0.0,g=0.0;f=+e[b>>3];d=+e[a>>3];g=+u(+((f-d)*.5));c=+u(+((+e[b+8>>3]-+e[a+8>>3])*.5));c=g*g+c*(+t(+f)*+t(+d)*c);return +(+z(+(+r(+c)),+(+r(+(1.0-c))))*2.0)}function jb(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,f=0.0,g=0.0;f=+e[b>>3];d=+e[a>>3];g=+u(+((f-d)*.5));c=+u(+((+e[b+8>>3]-+e[a+8>>3])*.5));c=g*g+c*(+t(+f)*+t(+d)*c);return +(+z(+(+r(+c)),+(+r(+(1.0-c))))*2.0*6371.007180918475)}function kb(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,f=0.0,g=0.0;f=+e[b>>3];d=+e[a>>3];g=+u(+((f-d)*.5));c=+u(+((+e[b+8>>3]-+e[a+8>>3])*.5));c=g*g+c*(+t(+f)*+t(+d)*c);return +(+z(+(+r(+c)),+(+r(+(1.0-c))))*2.0*6371.007180918475*1.0e3)}function lb(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,f=0.0,g=0.0,h=0.0;g=+e[b>>3];d=+t(+g);f=+e[b+8>>3]-+e[a+8>>3];h=d*+u(+f);c=+e[a>>3];return +(+z(+h,+(+u(+g)*+t(+c)-+t(+f)*(d*+u(+c)))))}function mb(a,c,d,f){a=a|0;c=+c;d=+d;f=f|0;var g=0,h=0.0,i=0.0,j=0.0;if(d<1.0e-16){b[f>>2]=b[a>>2];b[f+4>>2]=b[a+4>>2];b[f+8>>2]=b[a+8>>2];b[f+12>>2]=b[a+12>>2];return}h=c<0.0?c+6.283185307179586:c;h=!(c>=6.283185307179586)?h:h+-6.283185307179586;do if(h<1.0e-16){c=+e[a>>3]+d;e[f>>3]=c;g=f}else{g=+q(+(h+-3.141592653589793))<1.0e-16;c=+e[a>>3];if(g){c=c-d;e[f>>3]=c;g=f;break}i=+t(+d);d=+u(+d);c=i*+u(+c)+ +t(+h)*(d*+t(+c));c=c>1.0?1.0:c;c=+x(+(c<-1.0?-1.0:c));e[f>>3]=c;if(+q(+(c+-1.5707963267948966))<1.0e-16){e[f>>3]=1.5707963267948966;e[f+8>>3]=0.0;return}if(+q(+(c+1.5707963267948966))<1.0e-16){e[f>>3]=-1.5707963267948966;e[f+8>>3]=0.0;return}j=+t(+c);h=d*+u(+h)/j;d=+e[a>>3];c=(i-+u(+c)*+u(+d))/+t(+d)/j;i=h>1.0?1.0:h;c=c>1.0?1.0:c;c=+e[a+8>>3]+ +z(+(i<-1.0?-1.0:i),+(c<-1.0?-1.0:c));if(c>3.141592653589793)do c=c+-6.283185307179586;while(c>3.141592653589793);if(c<-3.141592653589793)do c=c+6.283185307179586;while(c<-3.141592653589793);e[f+8>>3]=c;return}while(0);if(+q(+(c+-1.5707963267948966))<1.0e-16){e[g>>3]=1.5707963267948966;e[f+8>>3]=0.0;return}if(+q(+(c+1.5707963267948966))<1.0e-16){e[g>>3]=-1.5707963267948966;e[f+8>>3]=0.0;return}c=+e[a+8>>3];if(c>3.141592653589793)do c=c+-6.283185307179586;while(c>3.141592653589793);if(c<-3.141592653589793)do c=c+6.283185307179586;while(c<-3.141592653589793);e[f+8>>3]=c;return}function nb(a){a=a|0;return +(+e[20496+(a<<3)>>3])}function ob(a){a=a|0;return +(+e[20624+(a<<3)>>3])}function pb(a){a=a|0;return +(+e[20752+(a<<3)>>3])}function qb(a){a=a|0;return +(+e[20880+(a<<3)>>3])}function rb(a){a=a|0;var c=0;c=21008+(a<<3)|0;a=b[c>>2]|0;F(b[c+4>>2]|0);return a|0}function sb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0.0,f=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0;n=+e[b>>3];l=+e[a>>3];j=+u(+((n-l)*.5));g=+e[b+8>>3];k=+e[a+8>>3];h=+u(+((g-k)*.5));i=+t(+l);m=+t(+n);h=j*j+h*(m*i*h);h=+z(+(+r(+h)),+(+r(+(1.0-h))))*2.0;j=+e[c>>3];n=+u(+((j-n)*.5));d=+e[c+8>>3];g=+u(+((d-g)*.5));f=+t(+j);g=n*n+g*(m*f*g);g=+z(+(+r(+g)),+(+r(+(1.0-g))))*2.0;j=+u(+((l-j)*.5));d=+u(+((k-d)*.5));d=j*j+d*(i*f*d);d=+z(+(+r(+d)),+(+r(+(1.0-d))))*2.0;f=(h+g+d)*.5;return +(+y(+(+r(+(+v(+(f*.5))*+v(+((f-h)*.5))*+v(+((f-g)*.5))*+v(+((f-d)*.5))))))*4.0)}function tb(a,c){a=a|0;c=c|0;var d=0.0,e=0,f=0,g=0,h=0;g=S;S=S+192|0;e=g+168|0;f=g;Ub(a,c,e);Vb(a,c,f);c=b[f>>2]|0;if((c|0)<=0){d=0.0;S=g;return +d}d=+sb(f+8|0,f+8+(((c|0)!=1&1)<<4)|0,e)+0.0;if((c|0)==1){S=g;return +d}a=1;do{h=a;a=a+1|0;d=d+ +sb(f+8+(h<<4)|0,f+8+(((a|0)%(c|0)|0)<<4)|0,e)}while((a|0)<(c|0));S=g;return +d}function ub(a,c){a=a|0;c=c|0;var d=0.0,e=0,f=0,g=0,h=0;g=S;S=S+192|0;e=g+168|0;f=g;Ub(a,c,e);Vb(a,c,f);c=b[f>>2]|0;if((c|0)>0){d=+sb(f+8|0,f+8+(((c|0)!=1&1)<<4)|0,e)+0.0;if((c|0)!=1){a=1;do{h=a;a=a+1|0;d=d+ +sb(f+8+(h<<4)|0,f+8+(((a|0)%(c|0)|0)<<4)|0,e)}while((a|0)<(c|0))}}else d=0.0;S=g;return +(d*6371.007180918475*6371.007180918475)}function vb(a,c){a=a|0;c=c|0;var d=0.0,e=0,f=0,g=0,h=0;g=S;S=S+192|0;e=g+168|0;f=g;Ub(a,c,e);Vb(a,c,f);c=b[f>>2]|0;if((c|0)>0){d=+sb(f+8|0,f+8+(((c|0)!=1&1)<<4)|0,e)+0.0;if((c|0)!=1){a=1;do{h=a;a=a+1|0;d=d+ +sb(f+8+(h<<4)|0,f+8+(((a|0)%(c|0)|0)<<4)|0,e)}while((a|0)<(c|0))}}else d=0.0;S=g;return +(d*6371.007180918475*6371.007180918475*1.0e3*1.0e3)}function wb(a,c){a=a|0;c=c|0;var d=0.0,f=0.0,g=0.0,h=0,i=0,j=0.0,k=0.0,l=0.0;i=S;S=S+176|0;h=i;fc(a,c,h);a=b[h>>2]|0;if((a|0)<=1){g=0.0;S=i;return +g}c=a+-1|0;a=0;d=0.0;f=+e[h+8>>3];g=+e[h+16>>3];do{a=a+1|0;k=f;f=+e[h+8+(a<<4)>>3];l=+u(+((f-k)*.5));j=g;g=+e[h+8+(a<<4)+8>>3];j=+u(+((g-j)*.5));j=l*l+j*(+t(+f)*+t(+k)*j);d=d+ +z(+(+r(+j)),+(+r(+(1.0-j))))*2.0}while((a|0)<(c|0));S=i;return +d}function xb(a,c){a=a|0;c=c|0;var d=0.0,f=0.0,g=0.0,h=0,i=0,j=0.0,k=0.0,l=0.0;i=S;S=S+176|0;h=i;fc(a,c,h);a=b[h>>2]|0;if((a|0)<=1){g=0.0;S=i;return +g}c=a+-1|0;a=0;d=0.0;f=+e[h+8>>3];g=+e[h+16>>3];do{a=a+1|0;k=f;f=+e[h+8+(a<<4)>>3];l=+u(+((f-k)*.5));j=g;g=+e[h+8+(a<<4)+8>>3];j=+u(+((g-j)*.5));j=l*l+j*(+t(+k)*+t(+f)*j);d=d+ +z(+(+r(+j)),+(+r(+(1.0-j))))*2.0}while((a|0)!=(c|0));l=d*6371.007180918475;S=i;return +l}function yb(a,c){a=a|0;c=c|0;var d=0.0,f=0.0,g=0.0,h=0,i=0,j=0.0,k=0.0,l=0.0;i=S;S=S+176|0;h=i;fc(a,c,h);a=b[h>>2]|0;if((a|0)<=1){g=0.0;S=i;return +g}c=a+-1|0;a=0;d=0.0;f=+e[h+8>>3];g=+e[h+16>>3];do{a=a+1|0;k=f;f=+e[h+8+(a<<4)>>3];l=+u(+((f-k)*.5));j=g;g=+e[h+8+(a<<4)+8>>3];j=+u(+((g-j)*.5));j=l*l+j*(+t(+k)*+t(+f)*j);d=d+ +z(+(+r(+j)),+(+r(+(1.0-j))))*2.0}while((a|0)!=(c|0));l=d*6371.007180918475*1.0e3;S=i;return +l}function zb(a,b){a=a|0;b=b|0;b=bd(a|0,b|0,45)|0;G()|0;return b&127|0}function Ab(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0;if(!(0==0&(b&-16777216|0)==134217728)){b=0;return b|0}g=bd(a|0,b|0,45)|0;G()|0;g=g&127;if(g>>>0>121){b=0;return b|0}c=bd(a|0,b|0,52)|0;G()|0;c=c&15;do if(c|0){e=1;d=0;while(1){f=bd(a|0,b|0,(15-e|0)*3|0)|0;G()|0;f=f&7;if((f|0)!=0&(d^1))if((f|0)==1&(la(g)|0)!=0){h=0;d=13;break}else d=1;if((f|0)==7){h=0;d=13;break}if(e>>>0<c>>>0)e=e+1|0;else{d=9;break}}if((d|0)==9){if((c|0)==15)h=1;else break;return h|0}else if((d|0)==13)return h|0}while(0);while(1){h=bd(a|0,b|0,(14-c|0)*3|0)|0;G()|0;if(!((h&7|0)==7&0==0)){h=0;d=13;break}if(c>>>0<14)c=c+1|0;else{h=1;d=13;break}}if((d|0)==13)return h|0;return 0}function Bb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=bd(a|0,b|0,52)|0;G()|0;d=d&15;if((d|0)>=(c|0)){if((d|0)!=(c|0))if(c>>>0<=15){e=cd(c|0,0,52)|0;a=e|a;b=G()|0|b&-15728641;if((d|0)>(c|0))do{e=cd(7,0,(14-c|0)*3|0)|0;c=c+1|0;a=e|a;b=G()|0|b}while((c|0)<(d|0))}else{b=0;a=0}}else{b=0;a=0}F(b|0);return a|0}function Cb(a,b,c){a=a|0;b=b|0;c=c|0;a=bd(a|0,b|0,52)|0;G()|0;a=a&15;if(!((c|0)<16&(a|0)<=(c|0))){c=0;return c|0}c=sc(7,c-a|0)|0;return c|0}function Db(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;h=bd(a|0,c|0,52)|0;G()|0;h=h&15;if(!((d|0)<16&(h|0)<=(d|0)))return;if((h|0)==(d|0)){d=e;b[d>>2]=a;b[d+4>>2]=c;return}j=sc(7,d-h|0)|0;k=(j|0)/7|0;i=bd(a|0,c|0,45)|0;G()|0;if(!(la(i&127)|0))g=0;else{a:do if(!h)f=0;else{g=1;while(1){f=bd(a|0,c|0,(15-g|0)*3|0)|0;G()|0;f=f&7;if(f|0)break a;if(g>>>0<h>>>0)g=g+1|0;else{f=0;break}}}while(0);g=(f|0)==0}l=cd(h+1|0,0,52)|0;f=G()|0|c&-15728641;i=(14-h|0)*3|0;c=cd(7,0,i|0)|0;c=(l|a)&~c;h=f&~(G()|0);Db(c,h,d,e);f=e+(k<<3)|0;if(!g){l=cd(1,0,i|0)|0;Db(l|c,G()|0|h,d,f);l=f+(k<<3)|0;j=cd(2,0,i|0)|0;Db(j|c,G()|0|h,d,l);l=l+(k<<3)|0;j=cd(3,0,i|0)|0;Db(j|c,G()|0|h,d,l);l=l+(k<<3)|0;j=cd(4,0,i|0)|0;Db(j|c,G()|0|h,d,l);l=l+(k<<3)|0;j=cd(5,0,i|0)|0;Db(j|c,G()|0|h,d,l);j=cd(6,0,i|0)|0;Db(j|c,G()|0|h,d,l+(k<<3)|0);return}g=f+(k<<3)|0;if((j|0)>6){j=f+8|0;l=(g>>>0>j>>>0?g:j)+-1+(0-f)|0;gd(f|0,0,l+8&-8|0)|0;f=j+(l>>>3<<3)|0}l=cd(2,0,i|0)|0;Db(l|c,G()|0|h,d,f);l=f+(k<<3)|0;j=cd(3,0,i|0)|0;Db(j|c,G()|0|h,d,l);l=l+(k<<3)|0;j=cd(4,0,i|0)|0;Db(j|c,G()|0|h,d,l);l=l+(k<<3)|0;j=cd(5,0,i|0)|0;Db(j|c,G()|0|h,d,l);j=cd(6,0,i|0)|0;Db(j|c,G()|0|h,d,l+(k<<3)|0);return}function Eb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;e=bd(a|0,b|0,45)|0;G()|0;if(!(la(e&127)|0)){e=0;return e|0}e=bd(a|0,b|0,52)|0;G()|0;e=e&15;a:do if(!e)c=0;else{d=1;while(1){c=bd(a|0,b|0,(15-d|0)*3|0)|0;G()|0;c=c&7;if(c|0)break a;if(d>>>0<e>>>0)d=d+1|0;else{c=0;break}}}while(0);e=(c|0)==0&1;return e|0}function Fb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=bd(a|0,b|0,52)|0;G()|0;d=d&15;if((c|0)<16&(d|0)<=(c|0)){if((d|0)!=(c|0)){e=cd(c|0,0,52)|0;a=e|a;b=G()|0|b&-15728641;if((d|0)<(c|0))do{e=cd(7,0,(14-d|0)*3|0)|0;d=d+1|0;a=a&~e;b=b&~(G()|0)}while((d|0)<(c|0))}}else{b=0;a=0}F(b|0);return a|0}function Gb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;if(!d){y=0;return y|0}f=a;e=b[f>>2]|0;f=b[f+4>>2]|0;if(0==0&(f&15728640|0)==0){if((d|0)<=0){y=0;return y|0}y=c;b[y>>2]=e;b[y+4>>2]=f;if((d|0)==1){y=0;return y|0}e=1;do{w=a+(e<<3)|0;x=b[w+4>>2]|0;y=c+(e<<3)|0;b[y>>2]=b[w>>2];b[y+4>>2]=x;e=e+1|0}while((e|0)!=(d|0));e=0;return e|0}w=d<<3;x=Vc(w)|0;if(!x){y=-3;return y|0}fd(x|0,a|0,w|0)|0;v=Xc(d,8)|0;if(!v){Wc(x);y=-3;return y|0}e=d;a:while(1){h=x;l=b[h>>2]|0;h=b[h+4>>2]|0;t=bd(l|0,h|0,52)|0;G()|0;t=t&15;u=t+-1|0;s=(e|0)>0;b:do if(s){r=((e|0)<0)<<31>>31;p=cd(u|0,0,52)|0;q=G()|0;if(u>>>0>15){f=0;a=l;d=h;while(1){if(!((a|0)==0&(d|0)==0)){g=bd(a|0,d|0,52)|0;G()|0;g=g&15;i=(g|0)<(u|0);g=(g|0)==(u|0);k=i?0:g?a:0;a=i?0:g?d:0;d=ad(k|0,a|0,e|0,r|0)|0;G()|0;g=v+(d<<3)|0;i=g;j=b[i>>2]|0;i=b[i+4>>2]|0;if((j|0)==0&(i|0)==0)d=k;else{p=0;o=d;n=i;d=k;while(1){if((p|0)>(e|0)){y=41;break a}if((j|0)==(d|0)&(n&-117440513|0)==(a|0)){k=bd(j|0,n|0,56)|0;G()|0;k=k&7;m=k+1|0;q=bd(j|0,n|0,45)|0;G()|0;c:do if(!(la(q&127)|0))i=7;else{j=bd(j|0,n|0,52)|0;G()|0;j=j&15;if(!j){i=6;break}i=1;while(1){q=cd(7,0,(15-i|0)*3|0)|0;if(!((q&d|0)==0&((G()|0)&a|0)==0)){i=7;break c}if(i>>>0<j>>>0)i=i+1|0;else{i=6;break}}}while(0);if((k+2|0)>>>0>i>>>0){y=51;break a}q=cd(m|0,0,56)|0;a=G()|0|a&-117440513;i=g;b[i>>2]=0;b[i+4>>2]=0;i=o;d=q|d}else i=(o+1|0)%(e|0)|0;g=v+(i<<3)|0;n=g;j=b[n>>2]|0;n=b[n+4>>2]|0;if((j|0)==0&(n|0)==0)break;else{p=p+1|0;o=i}}}q=g;b[q>>2]=d;b[q+4>>2]=a}f=f+1|0;if((f|0)>=(e|0))break b;d=x+(f<<3)|0;a=b[d>>2]|0;d=b[d+4>>2]|0}}f=0;a=l;d=h;while(1){if(!((a|0)==0&(d|0)==0)){i=bd(a|0,d|0,52)|0;G()|0;i=i&15;if((i|0)>=(u|0)){if((i|0)!=(u|0)){a=a|p;d=d&-15728641|q;if(i>>>0>=t>>>0){g=u;do{o=cd(7,0,(14-g|0)*3|0)|0;g=g+1|0;a=o|a;d=G()|0|d}while(g>>>0<i>>>0)}}}else{a=0;d=0}i=ad(a|0,d|0,e|0,r|0)|0;G()|0;g=v+(i<<3)|0;j=g;k=b[j>>2]|0;j=b[j+4>>2]|0;if(!((k|0)==0&(j|0)==0)){o=0;while(1){if((o|0)>(e|0)){y=41;break a}if((k|0)==(a|0)&(j&-117440513|0)==(d|0)){m=bd(k|0,j|0,56)|0;G()|0;m=m&7;n=m+1|0;z=bd(k|0,j|0,45)|0;G()|0;d:do if(!(la(z&127)|0))j=7;else{k=bd(k|0,j|0,52)|0;G()|0;k=k&15;if(!k){j=6;break}j=1;while(1){z=cd(7,0,(15-j|0)*3|0)|0;if(!((z&a|0)==0&((G()|0)&d|0)==0)){j=7;break d}if(j>>>0<k>>>0)j=j+1|0;else{j=6;break}}}while(0);if((m+2|0)>>>0>j>>>0){y=51;break a}z=cd(n|0,0,56)|0;d=G()|0|d&-117440513;n=g;b[n>>2]=0;b[n+4>>2]=0;a=z|a}else i=(i+1|0)%(e|0)|0;g=v+(i<<3)|0;j=g;k=b[j>>2]|0;j=b[j+4>>2]|0;if((k|0)==0&(j|0)==0)break;else o=o+1|0}}z=g;b[z>>2]=a;b[z+4>>2]=d}f=f+1|0;if((f|0)>=(e|0))break b;d=x+(f<<3)|0;a=b[d>>2]|0;d=b[d+4>>2]|0}}while(0);if((e+5|0)>>>0<11){y=99;break}q=Xc((e|0)/6|0,8)|0;if(!q){y=58;break}e:do if(s){o=0;n=0;do{i=v+(o<<3)|0;a=i;f=b[a>>2]|0;a=b[a+4>>2]|0;if(!((f|0)==0&(a|0)==0)){j=bd(f|0,a|0,56)|0;G()|0;j=j&7;d=j+1|0;k=a&-117440513;z=bd(f|0,a|0,45)|0;G()|0;f:do if(la(z&127)|0){m=bd(f|0,a|0,52)|0;G()|0;m=m&15;if(m|0){g=1;while(1){z=cd(7,0,(15-g|0)*3|0)|0;if(!((f&z|0)==0&(k&(G()|0)|0)==0))break f;if(g>>>0<m>>>0)g=g+1|0;else break}}a=cd(d|0,0,56)|0;f=a|f;a=G()|0|k;d=i;b[d>>2]=f;b[d+4>>2]=a;d=j+2|0}while(0);if((d|0)==7){z=q+(n<<3)|0;b[z>>2]=f;b[z+4>>2]=a&-117440513;n=n+1|0}}o=o+1|0}while((o|0)!=(e|0));if(s){p=((e|0)<0)<<31>>31;m=cd(u|0,0,52)|0;o=G()|0;if(u>>>0>15){a=0;f=0;while(1){do if(!((l|0)==0&(h|0)==0)){j=bd(l|0,h|0,52)|0;G()|0;j=j&15;g=(j|0)<(u|0);j=(j|0)==(u|0);i=g?0:j?l:0;j=g?0:j?h:0;g=ad(i|0,j|0,e|0,p|0)|0;G()|0;d=0;while(1){if((d|0)>(e|0)){y=98;break a}z=v+(g<<3)|0;k=b[z+4>>2]|0;if((k&-117440513|0)==(j|0)?(b[z>>2]|0)==(i|0):0){y=70;break}g=(g+1|0)%(e|0)|0;z=v+(g<<3)|0;if((b[z>>2]|0)==(i|0)?(b[z+4>>2]|0)==(j|0):0)break;else d=d+1|0}if((y|0)==70?(y=0,0==0&(k&117440512|0)==100663296):0)break;z=c+(f<<3)|0;b[z>>2]=l;b[z+4>>2]=h;f=f+1|0}while(0);a=a+1|0;if((a|0)>=(e|0)){e=n;break e}h=x+(a<<3)|0;l=b[h>>2]|0;h=b[h+4>>2]|0}}a=0;f=0;while(1){do if(!((l|0)==0&(h|0)==0)){j=bd(l|0,h|0,52)|0;G()|0;j=j&15;if((j|0)>=(u|0))if((j|0)!=(u|0)){d=l|m;g=h&-15728641|o;if(j>>>0<t>>>0)j=g;else{i=u;do{z=cd(7,0,(14-i|0)*3|0)|0;i=i+1|0;d=z|d;g=G()|0|g}while(i>>>0<j>>>0);j=g}}else{d=l;j=h}else{d=0;j=0}i=ad(d|0,j|0,e|0,p|0)|0;G()|0;g=0;while(1){if((g|0)>(e|0)){y=98;break a}z=v+(i<<3)|0;k=b[z+4>>2]|0;if((k&-117440513|0)==(j|0)?(b[z>>2]|0)==(d|0):0){y=93;break}i=(i+1|0)%(e|0)|0;z=v+(i<<3)|0;if((b[z>>2]|0)==(d|0)?(b[z+4>>2]|0)==(j|0):0)break;else g=g+1|0}if((y|0)==93?(y=0,0==0&(k&117440512|0)==100663296):0)break;z=c+(f<<3)|0;b[z>>2]=l;b[z+4>>2]=h;f=f+1|0}while(0);a=a+1|0;if((a|0)>=(e|0)){e=n;break e}h=x+(a<<3)|0;l=b[h>>2]|0;h=b[h+4>>2]|0}}else{f=0;e=n}}else{f=0;e=0}while(0);gd(v|0,0,w|0)|0;fd(x|0,q|0,e<<3|0)|0;Wc(q);if(!e)break;else c=c+(f<<3)|0}if((y|0)==41){Wc(x);Wc(v);z=-1;return z|0}else if((y|0)==51){Wc(x);Wc(v);z=-2;return z|0}else if((y|0)==58){Wc(x);Wc(v);z=-3;return z|0}else if((y|0)==98){Wc(q);Wc(x);Wc(v);z=-1;return z|0}else if((y|0)==99)fd(c|0,x|0,e<<3|0)|0;Wc(x);Wc(v);z=0;return z|0}function Hb(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0;if((c|0)<=0){f=0;return f|0}if((f|0)>=16){g=0;while(1){l=a+(g<<3)|0;if(!((b[l>>2]|0)==0&(b[l+4>>2]|0)==0)){g=14;break}g=g+1|0;if((g|0)>=(c|0)){h=0;g=16;break}}if((g|0)==14)return ((e|0)>0?-2:-1)|0;else if((g|0)==16)return h|0}g=0;l=0;a:while(1){k=a+(l<<3)|0;i=k;h=b[i>>2]|0;i=b[i+4>>2]|0;do if(!((h|0)==0&(i|0)==0)){if((g|0)>=(e|0)){h=-1;g=16;break a}j=bd(h|0,i|0,52)|0;G()|0;j=j&15;if((j|0)>(f|0)){h=-2;g=16;break a}if((j|0)==(f|0)){k=d+(g<<3)|0;b[k>>2]=h;b[k+4>>2]=i;g=g+1|0;break}h=(sc(7,f-j|0)|0)+g|0;if((h|0)>(e|0)){h=-1;g=16;break a}Db(b[k>>2]|0,b[k+4>>2]|0,f,d+(g<<3)|0);g=h}while(0);l=l+1|0;if((l|0)>=(c|0)){h=0;g=16;break}}if((g|0)==16)return h|0;return 0}function Ib(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;if((c|0)<=0){d=0;return d|0}if((d|0)>=16){e=0;while(1){h=a+(e<<3)|0;if(!((b[h>>2]|0)==0&(b[h+4>>2]|0)==0)){e=-1;f=13;break}e=e+1|0;if((e|0)>=(c|0)){e=0;f=13;break}}if((f|0)==13)return e|0}e=0;h=0;a:while(1){f=a+(h<<3)|0;g=b[f>>2]|0;f=b[f+4>>2]|0;do if(!((g|0)==0&(f|0)==0)){f=bd(g|0,f|0,52)|0;G()|0;f=f&15;if((f|0)>(d|0)){e=-1;f=13;break a}if((f|0)==(d|0)){e=e+1|0;break}else{e=(sc(7,d-f|0)|0)+e|0;break}}while(0);h=h+1|0;if((h|0)>=(c|0)){f=13;break}}if((f|0)==13)return e|0;return 0}function Jb(a,b){a=a|0;b=b|0;b=bd(a|0,b|0,52)|0;G()|0;return b&1|0}function Kb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;e=bd(a|0,b|0,52)|0;G()|0;e=e&15;if(!e){e=0;return e|0}d=1;while(1){c=bd(a|0,b|0,(15-d|0)*3|0)|0;G()|0;c=c&7;if(c|0){d=5;break}if(d>>>0<e>>>0)d=d+1|0;else{c=0;d=5;break}}if((d|0)==5)return c|0;return 0}function Lb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=bd(a|0,b|0,52)|0;G()|0;i=i&15;if(!i){h=b;i=a;F(h|0);return i|0}h=1;c=0;while(1){f=(15-h|0)*3|0;d=cd(7,0,f|0)|0;e=G()|0;g=bd(a|0,b|0,f|0)|0;G()|0;f=cd(Pa(g&7)|0,0,f|0)|0;g=G()|0;a=f|a&~d;b=g|b&~e;a:do if(!c)if(!((f&d|0)==0&(g&e|0)==0)){d=bd(a|0,b|0,52)|0;G()|0;d=d&15;if(!d)c=1;else{c=1;b:while(1){g=bd(a|0,b|0,(15-c|0)*3|0)|0;G()|0;switch(g&7){case 1:break b;case 0:break;default:{c=1;break a}}if(c>>>0<d>>>0)c=c+1|0;else{c=1;break a}}c=1;while(1){g=(15-c|0)*3|0;e=bd(a|0,b|0,g|0)|0;G()|0;f=cd(7,0,g|0)|0;b=b&~(G()|0);g=cd(Pa(e&7)|0,0,g|0)|0;a=a&~f|g;b=b|(G()|0);if(c>>>0<d>>>0)c=c+1|0;else{c=1;break}}}}else c=0;while(0);if(h>>>0<i>>>0)h=h+1|0;else break}F(b|0);return a|0}function Mb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;d=bd(a|0,b|0,52)|0;G()|0;d=d&15;if(!d){c=b;d=a;F(c|0);return d|0}c=1;while(1){f=(15-c|0)*3|0;g=bd(a|0,b|0,f|0)|0;G()|0;e=cd(7,0,f|0)|0;b=b&~(G()|0);f=cd(Pa(g&7)|0,0,f|0)|0;a=f|a&~e;b=G()|0|b;if(c>>>0<d>>>0)c=c+1|0;else break}F(b|0);return a|0}function Nb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0;i=bd(a|0,b|0,52)|0;G()|0;i=i&15;if(!i){h=b;i=a;F(h|0);return i|0}h=1;c=0;while(1){f=(15-h|0)*3|0;d=cd(7,0,f|0)|0;e=G()|0;g=bd(a|0,b|0,f|0)|0;G()|0;f=cd(Qa(g&7)|0,0,f|0)|0;g=G()|0;a=f|a&~d;b=g|b&~e;a:do if(!c)if(!((f&d|0)==0&(g&e|0)==0)){d=bd(a|0,b|0,52)|0;G()|0;d=d&15;if(!d)c=1;else{c=1;b:while(1){g=bd(a|0,b|0,(15-c|0)*3|0)|0;G()|0;switch(g&7){case 1:break b;case 0:break;default:{c=1;break a}}if(c>>>0<d>>>0)c=c+1|0;else{c=1;break a}}c=1;while(1){e=(15-c|0)*3|0;f=cd(7,0,e|0)|0;g=b&~(G()|0);b=bd(a|0,b|0,e|0)|0;G()|0;b=cd(Qa(b&7)|0,0,e|0)|0;a=a&~f|b;b=g|(G()|0);if(c>>>0<d>>>0)c=c+1|0;else{c=1;break}}}}else c=0;while(0);if(h>>>0<i>>>0)h=h+1|0;else break}F(b|0);return a|0}function Ob(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0;d=bd(a|0,b|0,52)|0;G()|0;d=d&15;if(!d){c=b;d=a;F(c|0);return d|0}c=1;while(1){g=(15-c|0)*3|0;f=cd(7,0,g|0)|0;e=b&~(G()|0);b=bd(a|0,b|0,g|0)|0;G()|0;b=cd(Qa(b&7)|0,0,g|0)|0;a=b|a&~f;b=G()|0|e;if(c>>>0<d>>>0)c=c+1|0;else break}F(b|0);return a|0}function Pb(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;j=S;S=S+64|0;i=j+40|0;e=j+24|0;f=j+12|0;g=j;cd(c|0,0,52)|0;d=G()|0|134225919;if(!c){if((b[a+4>>2]|0)>2){h=0;i=0;F(h|0);S=j;return i|0}if((b[a+8>>2]|0)>2){h=0;i=0;F(h|0);S=j;return i|0}if((b[a+12>>2]|0)>2){h=0;i=0;F(h|0);S=j;return i|0}cd(na(a)|0,0,45)|0;h=G()|0|d;i=-1;F(h|0);S=j;return i|0};b[i>>2]=b[a>>2];b[i+4>>2]=b[a+4>>2];b[i+8>>2]=b[a+8>>2];b[i+12>>2]=b[a+12>>2];h=i+4|0;if((c|0)>0){a=-1;while(1){b[e>>2]=b[h>>2];b[e+4>>2]=b[h+4>>2];b[e+8>>2]=b[h+8>>2];if(!(c&1)){Ja(h);b[f>>2]=b[h>>2];b[f+4>>2]=b[h+4>>2];b[f+8>>2]=b[h+8>>2];La(f)}else{Ia(h);b[f>>2]=b[h>>2];b[f+4>>2]=b[h+4>>2];b[f+8>>2]=b[h+8>>2];Ka(f)}Fa(e,f,g);Ca(g);l=(15-c|0)*3|0;k=cd(7,0,l|0)|0;d=d&~(G()|0);l=cd(Ha(g)|0,0,l|0)|0;a=l|a&~k;d=G()|0|d;if((c|0)>1)c=c+-1|0;else break}}else a=-1;a:do if(((b[h>>2]|0)<=2?(b[i+8>>2]|0)<=2:0)?(b[i+12>>2]|0)<=2:0){e=na(i)|0;c=cd(e|0,0,45)|0;c=c|a;a=G()|0|d&-1040385;g=oa(i)|0;if(!(la(e)|0)){if((g|0)<=0)break;f=0;while(1){e=bd(c|0,a|0,52)|0;G()|0;e=e&15;if(e){d=1;while(1){l=(15-d|0)*3|0;i=bd(c|0,a|0,l|0)|0;G()|0;k=cd(7,0,l|0)|0;a=a&~(G()|0);l=cd(Pa(i&7)|0,0,l|0)|0;c=c&~k|l;a=a|(G()|0);if(d>>>0<e>>>0)d=d+1|0;else break}}f=f+1|0;if((f|0)==(g|0))break a}}f=bd(c|0,a|0,52)|0;G()|0;f=f&15;b:do if(f){d=1;c:while(1){l=bd(c|0,a|0,(15-d|0)*3|0)|0;G()|0;switch(l&7){case 1:break c;case 0:break;default:break b}if(d>>>0<f>>>0)d=d+1|0;else break b}if(ra(e,b[i>>2]|0)|0){d=1;while(1){i=(15-d|0)*3|0;k=cd(7,0,i|0)|0;l=a&~(G()|0);a=bd(c|0,a|0,i|0)|0;G()|0;a=cd(Qa(a&7)|0,0,i|0)|0;c=c&~k|a;a=l|(G()|0);if(d>>>0<f>>>0)d=d+1|0;else break}}else{d=1;while(1){l=(15-d|0)*3|0;i=bd(c|0,a|0,l|0)|0;G()|0;k=cd(7,0,l|0)|0;a=a&~(G()|0);l=cd(Pa(i&7)|0,0,l|0)|0;c=c&~k|l;a=a|(G()|0);if(d>>>0<f>>>0)d=d+1|0;else break}}}while(0);if((g|0)>0){d=0;do{c=Lb(c,a)|0;a=G()|0;d=d+1|0}while((d|0)!=(g|0))}}else{c=0;a=0}while(0);k=a;l=c;F(k|0);S=j;return l|0}function Qb(a){a=a|0;return (a|0)%2|0|0}function Rb(a,c){a=a|0;c=c|0;var d=0,e=0;e=S;S=S+16|0;d=e;if((c>>>0<=15?!(0==0?(b[a+4>>2]&2146435072|0)==2146435072:0):0)?!(0==0?(b[a+8+4>>2]&2146435072|0)==2146435072:0):0){Ya(a,c,d);c=Pb(d,c)|0;a=G()|0}else{a=0;c=0}F(a|0);S=e;return c|0}function Sb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0;f=d+4|0;g=bd(a|0,c|0,52)|0;G()|0;g=g&15;h=bd(a|0,c|0,45)|0;G()|0;e=(g|0)==0;if(!(la(h&127)|0)){if(e){h=0;return h|0}if((b[f>>2]|0)==0?(b[d+8>>2]|0)==0:0)e=(b[d+12>>2]|0)!=0&1;else e=1}else if(e){h=1;return h|0}else e=1;d=1;while(1){if(!(d&1))La(f);else Ka(f);h=bd(a|0,c|0,(15-d|0)*3|0)|0;G()|0;Ma(f,h&7);if(d>>>0<g>>>0)d=d+1|0;else break}return e|0}function Tb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;l=S;S=S+16|0;j=l;k=bd(a|0,c|0,45)|0;G()|0;k=k&127;a:do if((la(k)|0)!=0?(g=bd(a|0,c|0,52)|0,G()|0,g=g&15,(g|0)!=0):0){e=1;b:while(1){i=bd(a|0,c|0,(15-e|0)*3|0)|0;G()|0;switch(i&7){case 5:break b;case 0:break;default:{e=c;break a}}if(e>>>0<g>>>0)e=e+1|0;else{e=c;break a}}f=1;e=c;while(1){c=(15-f|0)*3|0;h=cd(7,0,c|0)|0;i=e&~(G()|0);e=bd(a|0,e|0,c|0)|0;G()|0;e=cd(Qa(e&7)|0,0,c|0)|0;a=a&~h|e;e=i|(G()|0);if(f>>>0<g>>>0)f=f+1|0;else break}}else e=c;while(0);i=7728+(k*28|0)|0;b[d>>2]=b[i>>2];b[d+4>>2]=b[i+4>>2];b[d+8>>2]=b[i+8>>2];b[d+12>>2]=b[i+12>>2];if(!(Sb(a,e,d)|0)){S=l;return}h=d+4|0;b[j>>2]=b[h>>2];b[j+4>>2]=b[h+4>>2];b[j+8>>2]=b[h+8>>2];g=bd(a|0,e|0,52)|0;G()|0;i=g&15;if(!(g&1))g=i;else{La(h);g=i+1|0}if(!(la(k)|0))e=0;else{c:do if(!i)e=0;else{c=1;while(1){f=bd(a|0,e|0,(15-c|0)*3|0)|0;G()|0;f=f&7;if(f|0){e=f;break c}if(c>>>0<i>>>0)c=c+1|0;else{e=0;break}}}while(0);e=(e|0)==4&1}if(!(cb(d,g,e,0)|0)){if((g|0)!=(i|0)){b[h>>2]=b[j>>2];b[h+4>>2]=b[j+4>>2];b[h+8>>2]=b[j+8>>2]}}else{if(la(k)|0)do{}while((cb(d,g,0,0)|0)!=0);if((g|0)!=(i|0))Ja(h)}S=l;return}function Ub(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=S;S=S+16|0;e=d;Tb(a,b,e);b=bd(a|0,b|0,52)|0;G()|0;$a(e,b&15,c);S=d;return}function Vb(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0;g=S;S=S+16|0;f=g;Tb(a,b,f);d=bd(a|0,b|0,45)|0;G()|0;d=(la(d&127)|0)==0;e=bd(a|0,b|0,52)|0;G()|0;e=e&15;a:do if(!d){if(e|0){d=1;while(1){h=cd(7,0,(15-d|0)*3|0)|0;if(!((h&a|0)==0&((G()|0)&b|0)==0))break a;if(d>>>0<e>>>0)d=d+1|0;else break}}ab(f,e,0,5,c);S=g;return}while(0);eb(f,e,0,6,c);S=g;return}function Wb(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;d=bd(a|0,b|0,45)|0;G()|0;if(!(la(d&127)|0)){d=2;return d|0}d=bd(a|0,b|0,52)|0;G()|0;d=d&15;if(!d){d=5;return d|0}c=1;while(1){e=cd(7,0,(15-c|0)*3|0)|0;if(!((e&a|0)==0&((G()|0)&b|0)==0)){c=2;a=6;break}if(c>>>0<d>>>0)c=c+1|0;else{c=5;a=6;break}}if((a|0)==6)return c|0;return 0}function Xb(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;m=S;S=S+128|0;k=m+112|0;g=m+96|0;l=m;f=bd(a|0,c|0,52)|0;G()|0;i=f&15;b[k>>2]=i;h=bd(a|0,c|0,45)|0;G()|0;h=h&127;a:do if(la(h)|0){if(i|0){e=1;while(1){j=cd(7,0,(15-e|0)*3|0)|0;if(!((j&a|0)==0&((G()|0)&c|0)==0)){f=0;break a}if(e>>>0<i>>>0)e=e+1|0;else break}}if(!(f&1)){j=cd(i+1|0,0,52)|0;l=G()|0|c&-15728641;k=cd(7,0,(14-i|0)*3|0)|0;Xb((j|a)&~k,l&~(G()|0),d);S=m;return}else f=1}else f=0;while(0);Tb(a,c,g);if(f){bb(g,k,l);j=5}else{fb(g,k,l);j=6}b:do if(la(h)|0)if(!i)e=20;else{e=1;while(1){h=cd(7,0,(15-e|0)*3|0)|0;if(!((h&a|0)==0&((G()|0)&c|0)==0)){e=8;break b}if(e>>>0<i>>>0)e=e+1|0;else{e=20;break}}}else e=8;while(0);gd(d|0,-1,e|0)|0;if(f){f=0;do{g=l+(f<<4)|0;db(g,b[k>>2]|0)|0;g=b[g>>2]|0;e=0;while(1){h=d+(e<<2)|0;i=b[h>>2]|0;if((i|0)==-1|(i|0)==(g|0))break;else e=e+1|0}b[h>>2]=g;f=f+1|0}while((f|0)!=(j|0))}else{f=0;do{g=l+(f<<4)|0;cb(g,b[k>>2]|0,0,1)|0;g=b[g>>2]|0;e=0;while(1){h=d+(e<<2)|0;i=b[h>>2]|0;if((i|0)==-1|(i|0)==(g|0))break;else e=e+1|0}b[h>>2]=g;f=f+1|0}while((f|0)!=(j|0))}S=m;return}function Yb(){return 12}function Zb(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;cd(a|0,0,52)|0;i=G()|0|134225919;if((a|0)<1){e=0;d=0;do{if(la(e)|0){cd(e|0,0,45)|0;h=i|(G()|0);a=c+(d<<3)|0;b[a>>2]=-1;b[a+4>>2]=h;d=d+1|0}e=e+1|0}while((e|0)!=122);return}h=0;d=0;do{if(la(h)|0){cd(h|0,0,45)|0;e=1;f=-1;g=i|(G()|0);while(1){j=cd(7,0,(15-e|0)*3|0)|0;f=f&~j;g=g&~(G()|0);if((e|0)==(a|0))break;else e=e+1|0}j=c+(d<<3)|0;b[j>>2]=f;b[j+4>>2]=g;d=d+1|0}h=h+1|0}while((h|0)!=122);return}function _b(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;i=S;S=S+64|0;h=i;if((a|0)==(d|0)&(c|0)==(e|0)|(0!=0|(c&2013265920|0)!=134217728|(0!=0|(e&2013265920|0)!=134217728))){h=0;S=i;return h|0}f=bd(a|0,c|0,52)|0;G()|0;f=f&15;g=bd(d|0,e|0,52)|0;G()|0;if((f|0)!=(g&15|0)){h=0;S=i;return h|0}g=f+-1|0;if(f>>>0>1?(k=Bb(a,c,g)|0,j=G()|0,g=Bb(d,e,g)|0,(k|0)==(g|0)&(j|0)==(G()|0)):0){g=(f^15)*3|0;f=bd(a|0,c|0,g|0)|0;G()|0;f=f&7;g=bd(d|0,e|0,g|0)|0;G()|0;g=g&7;if((f|0)==0|(g|0)==0){k=1;S=i;return k|0}if((b[21136+(f<<2)>>2]|0)==(g|0)){k=1;S=i;return k|0}if((b[21168+(f<<2)>>2]|0)==(g|0)){k=1;S=i;return k|0}}f=h;g=f+56|0;do{b[f>>2]=0;f=f+4|0}while((f|0)<(g|0));$(a,c,1,h);k=h;if(((((!((b[k>>2]|0)==(d|0)?(b[k+4>>2]|0)==(e|0):0)?(k=h+8|0,!((b[k>>2]|0)==(d|0)?(b[k+4>>2]|0)==(e|0):0)):0)?(k=h+16|0,!((b[k>>2]|0)==(d|0)?(b[k+4>>2]|0)==(e|0):0)):0)?(k=h+24|0,!((b[k>>2]|0)==(d|0)?(b[k+4>>2]|0)==(e|0):0)):0)?(k=h+32|0,!((b[k>>2]|0)==(d|0)?(b[k+4>>2]|0)==(e|0):0)):0)?(k=h+40|0,!((b[k>>2]|0)==(d|0)?(b[k+4>>2]|0)==(e|0):0)):0){f=h+48|0;f=((b[f>>2]|0)==(d|0)?(b[f+4>>2]|0)==(e|0):0)&1}else f=1;k=f;S=i;return k|0}function $b(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;k=S;S=S+16|0;h=k;if(!(_b(a,c,d,e)|0)){i=0;j=0;F(i|0);S=k;return j|0}i=c&-2130706433;f=(Eb(a,c)|0)==0;f=f?1:2;while(1){b[h>>2]=0;l=da(a,c,f,h)|0;g=f+1|0;if((l|0)==(d|0)&(G()|0)==(e|0))break;if(g>>>0<7)f=g;else{f=0;a=0;j=6;break}}if((j|0)==6){F(f|0);S=k;return a|0}l=cd(f|0,0,56)|0;j=i|(G()|0)|268435456;l=a|l;F(j|0);S=k;return l|0}function ac(a,b){a=a|0;b=b|0;var c=0;c=0==0&(b&2013265920|0)==268435456;F((c?b&-2130706433|134217728:0)|0);return (c?a:0)|0}function bc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0;e=S;S=S+16|0;d=e;if(!(0==0&(c&2013265920|0)==268435456)){c=0;d=0;F(c|0);S=e;return d|0}f=bd(a|0,c|0,56)|0;G()|0;b[d>>2]=0;d=da(a,c&-2130706433|134217728,f&7,d)|0;c=G()|0;F(c|0);S=e;return d|0}function cc(a,b){a=a|0;b=b|0;var c=0;if(!(0==0&(b&2013265920|0)==268435456)){c=0;return c|0}c=bd(a|0,b|0,56)|0;G()|0;switch(c&7){case 0:case 7:{c=0;return c|0}default:{}}c=b&-2130706433|134217728;if(0==0&(b&117440512|0)==16777216&(Eb(a,c)|0)!=0){c=0;return c|0}c=Ab(a,c)|0;return c|0}function dc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;g=S;S=S+16|0;e=g;h=0==0&(c&2013265920|0)==268435456;f=c&-2130706433|134217728;i=d;b[i>>2]=h?a:0;b[i+4>>2]=h?f:0;if(h){c=bd(a|0,c|0,56)|0;G()|0;b[e>>2]=0;a=da(a,f,c&7,e)|0;c=G()|0}else{a=0;c=0}i=d+8|0;b[i>>2]=a;b[i+4>>2]=c;S=g;return}function ec(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;f=(Eb(a,c)|0)==0;c=c&-2130706433;e=d;b[e>>2]=f?a:0;b[e+4>>2]=f?c|285212672:0;e=d+8|0;b[e>>2]=a;b[e+4>>2]=c|301989888;e=d+16|0;b[e>>2]=a;b[e+4>>2]=c|318767104;e=d+24|0;b[e>>2]=a;b[e+4>>2]=c|335544320;e=d+32|0;b[e>>2]=a;b[e+4>>2]=c|352321536;d=d+40|0;b[d>>2]=a;b[d+4>>2]=c|369098752;return}function fc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;h=S;S=S+16|0;g=h;e=bd(a|0,c|0,56)|0;G()|0;i=0==0&(c&2013265920|0)==268435456;f=i?a:0;a=i?c&-2130706433|134217728:0;c=Kc(f,a,e&7)|0;if((c|0)==-1){b[d>>2]=0;S=h;return}Tb(f,a,g);e=bd(f|0,a|0,52)|0;G()|0;e=e&15;if(!(Eb(f,a)|0))eb(g,e,c,2,d);else ab(g,e,c,2,d);S=h;return}function gc(a){a=a|0;var c=0,d=0,e=0;c=Xc(1,12)|0;if(!c)H(22691,22646,49,22704);d=a+4|0;e=b[d>>2]|0;if(e|0){e=e+8|0;b[e>>2]=c;b[d>>2]=c;return c|0}if(b[a>>2]|0)H(22721,22646,61,22744);e=a;b[e>>2]=c;b[d>>2]=c;return c|0}function hc(a,c){a=a|0;c=c|0;var d=0,e=0;e=Vc(24)|0;if(!e)H(22758,22646,78,22772);b[e>>2]=b[c>>2];b[e+4>>2]=b[c+4>>2];b[e+8>>2]=b[c+8>>2];b[e+12>>2]=b[c+12>>2];b[e+16>>2]=0;c=a+4|0;d=b[c>>2]|0;if(d|0){b[d+16>>2]=e;b[c>>2]=e;return e|0}if(b[a>>2]|0)H(22787,22646,82,22772);b[a>>2]=e;b[c>>2]=e;return e|0}function ic(a){a=a|0;var c=0,d=0,e=0,f=0;if(!a)return;e=1;while(1){c=b[a>>2]|0;if(c|0)do{d=b[c>>2]|0;if(d|0)do{f=d;d=b[d+16>>2]|0;Wc(f)}while((d|0)!=0);f=c;c=b[c+8>>2]|0;Wc(f)}while((c|0)!=0);c=a;a=b[a+8>>2]|0;if(!e)Wc(c);if(!a)break;else e=0}return}function jc(a){a=a|0;var c=0,d=0,f=0,g=0,h=0.0,i=0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0,J=0,K=0;g=a+8|0;if(b[g>>2]|0){K=1;return K|0}f=b[a>>2]|0;if(!f){K=0;return K|0}c=f;d=0;do{d=d+1|0;c=b[c+8>>2]|0}while((c|0)!=0);if(d>>>0<2){K=0;return K|0}I=Vc(d<<2)|0;if(!I)H(22807,22646,317,22826);G=Vc(d<<5)|0;if(!G)H(22848,22646,321,22826);b[a>>2]=0;z=a+4|0;b[z>>2]=0;b[g>>2]=0;d=0;F=0;y=0;n=0;a:while(1){m=b[f>>2]|0;if(m){h=0.0;i=m;do{k=+e[i+8>>3];c=i;i=b[i+16>>2]|0;l=(i|0)==0;g=l?m:i;j=+e[g+8>>3];if(+q(+(k-j))>3.141592653589793){K=14;break}h=h+(j-k)*(+e[c>>3]+ +e[g>>3])}while(!l);if((K|0)==14){K=0;h=0.0;c=m;do{x=+e[c+8>>3];E=c+16|0;D=b[E>>2]|0;D=(D|0)==0?m:D;w=+e[D+8>>3];h=h+(+e[c>>3]+ +e[D>>3])*((w<0.0?w+6.283185307179586:w)-(x<0.0?x+6.283185307179586:x));c=b[((c|0)==0?f:E)>>2]|0}while((c|0)!=0)}if(h>0.0){b[I+(F<<2)>>2]=f;F=F+1|0;g=y;c=n}else K=19}else K=19;if((K|0)==19){K=0;do if(!d)if(!n)if(!(b[a>>2]|0)){g=z;i=a;c=f;d=a;break}else{K=27;break a}else{g=z;i=n+8|0;c=f;d=a;break}else{c=d+8|0;if(b[c>>2]|0){K=21;break a}d=Xc(1,12)|0;if(!d){K=23;break a}b[c>>2]=d;g=d+4|0;i=d;c=n}while(0);b[i>>2]=f;b[g>>2]=f;i=G+(y<<5)|0;l=b[f>>2]|0;if(l){m=G+(y<<5)+8|0;e[m>>3]=1797693134862315708145274.0e284;n=G+(y<<5)+24|0;e[n>>3]=1797693134862315708145274.0e284;e[i>>3]=-1797693134862315708145274.0e284;o=G+(y<<5)+16|0;e[o>>3]=-1797693134862315708145274.0e284;u=1797693134862315708145274.0e284;v=-1797693134862315708145274.0e284;g=0;p=l;k=1797693134862315708145274.0e284;s=1797693134862315708145274.0e284;t=-1797693134862315708145274.0e284;j=-1797693134862315708145274.0e284;while(1){h=+e[p>>3];x=+e[p+8>>3];p=b[p+16>>2]|0;r=(p|0)==0;w=+e[(r?l:p)+8>>3];if(h<k){e[m>>3]=h;k=h}if(x<s){e[n>>3]=x;s=x}if(h>t)e[i>>3]=h;else h=t;if(x>j){e[o>>3]=x;j=x}u=x>0.0&x<u?x:u;v=x<0.0&x>v?x:v;g=g|+q(+(x-w))>3.141592653589793;if(r)break;else t=h}if(g){e[o>>3]=v;e[n>>3]=u}}else{b[i>>2]=0;b[i+4>>2]=0;b[i+8>>2]=0;b[i+12>>2]=0;b[i+16>>2]=0;b[i+20>>2]=0;b[i+24>>2]=0;b[i+28>>2]=0}g=y+1|0}E=f+8|0;f=b[E>>2]|0;b[E>>2]=0;if(!f){K=45;break}else{y=g;n=c}}if((K|0)==21)H(22624,22646,35,22658);else if((K|0)==23)H(22678,22646,37,22658);else if((K|0)==27)H(22721,22646,61,22744);else if((K|0)==45){b:do if((F|0)>0){E=(g|0)==0;C=g<<2;D=(a|0)==0;B=0;c=0;while(1){A=b[I+(B<<2)>>2]|0;if(!E){y=Vc(C)|0;if(!y){K=50;break}z=Vc(C)|0;if(!z){K=52;break}c:do if(!D){g=0;d=0;i=a;while(1){f=G+(g<<5)|0;if(kc(b[i>>2]|0,f,b[A>>2]|0)|0){b[y+(d<<2)>>2]=i;b[z+(d<<2)>>2]=f;r=d+1|0}else r=d;i=b[i+8>>2]|0;if(!i)break;else{g=g+1|0;d=r}}if((r|0)>0){f=b[y>>2]|0;if((r|0)==1)d=f;else{o=0;p=-1;d=f;n=f;while(1){l=b[n>>2]|0;f=0;i=0;while(1){g=b[b[y+(i<<2)>>2]>>2]|0;if((g|0)==(l|0))m=f;else m=f+((kc(g,b[z+(i<<2)>>2]|0,b[l>>2]|0)|0)&1)|0;i=i+1|0;if((i|0)==(r|0))break;else f=m}g=(m|0)>(p|0);d=g?n:d;f=o+1|0;if((f|0)==(r|0))break c;o=f;p=g?m:p;n=b[y+(f<<2)>>2]|0}}}else d=0}else d=0;while(0);Wc(y);Wc(z);if(d){g=d+4|0;f=b[g>>2]|0;if(!f){if(b[d>>2]|0){K=70;break}}else d=f+8|0;b[d>>2]=A;b[g>>2]=A}else K=73}else K=73;if((K|0)==73){K=0;c=b[A>>2]|0;if(c|0)do{z=c;c=b[c+16>>2]|0;Wc(z)}while((c|0)!=0);Wc(A);c=2}B=B+1|0;if((B|0)>=(F|0)){J=c;break b}}if((K|0)==50)H(22863,22646,249,22882);else if((K|0)==52)H(22901,22646,252,22882);else if((K|0)==70)H(22721,22646,61,22744)}else J=0;while(0);Wc(I);Wc(G);K=J;return K|0}return 0}function kc(a,c,d){a=a|0;c=c|0;d=d|0;var f=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0;if(!(xa(c,d)|0)){a=0;return a|0}c=wa(c)|0;l=+e[d>>3];f=+e[d+8>>3];f=c&f<0.0?f+6.283185307179586:f;a=b[a>>2]|0;if(!a){a=0;return a|0}if(c){c=0;d=a;a:while(1){while(1){i=+e[d>>3];k=+e[d+8>>3];d=d+16|0;m=b[d>>2]|0;m=(m|0)==0?a:m;h=+e[m>>3];g=+e[m+8>>3];if(i>h){j=i;i=k}else{j=h;h=i;i=g;g=k}if(!(l<h|l>j))break;d=b[d>>2]|0;if(!d){d=22;break a}}k=g<0.0?g+6.283185307179586:g;i=i<0.0?i+6.283185307179586:i;f=i==f|k==f?f+-2.220446049250313e-16:f;k=k+(l-h)/(j-h)*(i-k);if((k<0.0?k+6.283185307179586:k)>f)c=c^1;d=b[d>>2]|0;if(!d){d=22;break}}if((d|0)==22)return c|0}else{c=0;d=a;b:while(1){while(1){i=+e[d>>3];k=+e[d+8>>3];d=d+16|0;m=b[d>>2]|0;m=(m|0)==0?a:m;h=+e[m>>3];g=+e[m+8>>3];if(i>h){j=i;i=k}else{j=h;h=i;i=g;g=k}if(!(l<h|l>j))break;d=b[d>>2]|0;if(!d){d=22;break b}}f=i==f|g==f?f+-2.220446049250313e-16:f;if(g+(l-h)/(j-h)*(i-g)>f)c=c^1;d=b[d>>2]|0;if(!d){d=22;break}}if((d|0)==22)return c|0}return 0}function lc(c,d,e,f,g){c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;u=S;S=S+32|0;t=u+16|0;s=u;h=bd(c|0,d|0,52)|0;G()|0;h=h&15;p=bd(e|0,f|0,52)|0;G()|0;if((h|0)!=(p&15|0)){t=1;S=u;return t|0}l=bd(c|0,d|0,45)|0;G()|0;l=l&127;m=bd(e|0,f|0,45)|0;G()|0;m=m&127;p=(l|0)!=(m|0);if(p){j=ta(l,m)|0;if((j|0)==7){t=2;S=u;return t|0}k=ta(m,l)|0;if((k|0)==7)H(22925,22949,151,22959);else{q=j;i=k}}else{q=0;i=0}n=la(l)|0;o=la(m)|0;b[t>>2]=0;b[t+4>>2]=0;b[t+8>>2]=0;b[t+12>>2]=0;do if(!q){Sb(e,f,t)|0;if((n|0)!=0&(o|0)!=0){if((m|0)!=(l|0))H(23077,22949,243,22959);i=Kb(c,d)|0;h=Kb(e,f)|0;if(!(a[22032+(i*7|0)+h>>0]|0)){i=b[21200+(i*28|0)+(h<<2)>>2]|0;if((i|0)>0){j=t+4|0;h=0;do{Oa(j);h=h+1|0}while((h|0)!=(i|0));r=50}else r=50}else h=5}else r=50}else{m=b[4304+(l*28|0)+(q<<2)>>2]|0;j=(m|0)>0;if(!o)if(j){l=0;k=e;j=f;do{k=Ob(k,j)|0;j=G()|0;i=Qa(i)|0;l=l+1|0}while((l|0)!=(m|0));m=i;l=k;k=j}else{m=i;l=e;k=f}else if(j){l=0;k=e;j=f;do{k=Nb(k,j)|0;j=G()|0;i=Qa(i)|0;if((i|0)==1)i=Qa(1)|0;l=l+1|0}while((l|0)!=(m|0));m=i;l=k;k=j}else{m=i;l=e;k=f}Sb(l,k,t)|0;if(!p)H(22972,22949,181,22959);j=(n|0)!=0;i=(o|0)!=0;if(j&i)H(22999,22949,182,22959);if(!j)if(i){i=Kb(l,k)|0;if(a[22032+(i*7|0)+m>>0]|0){h=4;break}l=0;k=b[21200+(m*28|0)+(i<<2)>>2]|0;r=26}else i=0;else{i=Kb(c,d)|0;if(a[22032+(i*7|0)+q>>0]|0){h=3;break}k=b[21200+(i*28|0)+(q<<2)>>2]|0;l=k;r=26}if((r|0)==26){if((k|0)<=-1)H(23030,22949,212,22959);if((l|0)<=-1)H(23053,22949,213,22959);if((k|0)>0){j=t+4|0;i=0;do{Oa(j);i=i+1|0}while((i|0)!=(k|0));i=l}else i=l};b[s>>2]=0;b[s+4>>2]=0;b[s+8>>2]=0;Ma(s,q);if(h|0)while(1){if(!(Qb(h)|0))La(s);else Ka(s);if((h|0)>1)h=h+-1|0;else break}if((i|0)>0){h=0;do{Oa(s);h=h+1|0}while((h|0)!=(i|0))}r=t+4|0;Ea(r,s,r);Ca(r);r=50}while(0);if((r|0)==50){h=t+4|0;b[g>>2]=b[h>>2];b[g+4>>2]=b[h+4>>2];b[g+8>>2]=b[h+8>>2];h=0}t=h;S=u;return t|0}function mc(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;p=S;S=S+48|0;h=p+36|0;i=p+24|0;j=p+12|0;k=p;g=bd(a|0,c|0,52)|0;G()|0;g=g&15;n=bd(a|0,c|0,45)|0;G()|0;n=n&127;l=la(n)|0;cd(g|0,0,52)|0;r=G()|0|134225919;q=e;b[q>>2]=-1;b[q+4>>2]=r;if(!g){if((b[d>>2]|0)>1){r=1;S=p;return r|0}if((b[d+4>>2]|0)>1){r=1;S=p;return r|0}if((b[d+8>>2]|0)>1){r=1;S=p;return r|0}f=sa(n,Ha(d)|0)|0;if((f|0)==127){r=1;S=p;return r|0}o=cd(f|0,0,45)|0;q=G()|0;n=e;q=b[n+4>>2]&-1040385|q;r=e;b[r>>2]=b[n>>2]|o;b[r+4>>2]=q;r=0;S=p;return r|0};b[h>>2]=b[d>>2];b[h+4>>2]=b[d+4>>2];b[h+8>>2]=b[d+8>>2];while(1){b[i>>2]=b[h>>2];b[i+4>>2]=b[h+4>>2];b[i+8>>2]=b[h+8>>2];if(!(Qb(g)|0)){Ja(h);b[j>>2]=b[h>>2];b[j+4>>2]=b[h+4>>2];b[j+8>>2]=b[h+8>>2];La(j)}else{Ia(h);b[j>>2]=b[h>>2];b[j+4>>2]=b[h+4>>2];b[j+8>>2]=b[h+8>>2];Ka(j)}Fa(i,j,k);Ca(k);q=e;s=b[q>>2]|0;q=b[q+4>>2]|0;t=(15-g|0)*3|0;d=cd(7,0,t|0)|0;q=q&~(G()|0);t=cd(Ha(k)|0,0,t|0)|0;q=G()|0|q;r=e;b[r>>2]=t|s&~d;b[r+4>>2]=q;if((g|0)>1)g=g+-1|0;else break}a:do if(((b[h>>2]|0)<=1?(b[h+4>>2]|0)<=1:0)?(b[h+8>>2]|0)<=1:0){g=Ha(h)|0;i=sa(n,g)|0;if((i|0)==127)k=0;else k=la(i)|0;b:do if(!g)if((l|0)!=0&(k|0)!=0){t=Kb(a,c)|0;g=e;g=21408+(t*28|0)+((Kb(b[g>>2]|0,b[g+4>>2]|0)|0)<<2)|0;g=b[g>>2]|0;if((g|0)<=-1)H(23201,22949,433,23134);if(!g){f=i;g=55}else{h=e;f=0;d=b[h>>2]|0;h=b[h+4>>2]|0;do{d=Mb(d,h)|0;h=G()|0;t=e;b[t>>2]=d;b[t+4>>2]=h;f=f+1|0}while((f|0)<(g|0));f=i;g=54}}else{f=i;g=54}else{if(l){h=21408+((Kb(a,c)|0)*28|0)+(g<<2)|0;h=b[h>>2]|0;if((h|0)>0){d=0;do{g=Pa(g)|0;d=d+1|0}while((d|0)!=(h|0))}if((g|0)==1){f=3;break a}d=sa(n,g)|0;if((d|0)==127)H(23104,22949,376,23134);if(!(la(d)|0)){o=h;m=g;f=d}else H(23147,22949,377,23134)}else{o=0;m=g;f=i}j=b[4304+(n*28|0)+(m<<2)>>2]|0;if((j|0)<=-1)H(23178,22949,384,23134);if(!k){if((o|0)<=-1)H(23030,22949,417,23134);if(o|0){h=e;g=0;d=b[h>>2]|0;h=b[h+4>>2]|0;do{d=Mb(d,h)|0;h=G()|0;t=e;b[t>>2]=d;b[t+4>>2]=h;g=g+1|0}while((g|0)<(o|0))}if((j|0)<=0){g=54;break}h=e;g=0;d=b[h>>2]|0;h=b[h+4>>2]|0;while(1){d=Mb(d,h)|0;h=G()|0;t=e;b[t>>2]=d;b[t+4>>2]=h;g=g+1|0;if((g|0)==(j|0)){g=54;break b}}}i=ta(f,n)|0;if((i|0)==7)H(22925,22949,393,23134);g=e;d=b[g>>2]|0;g=b[g+4>>2]|0;if((j|0)>0){h=0;do{d=Mb(d,g)|0;g=G()|0;t=e;b[t>>2]=d;b[t+4>>2]=g;h=h+1|0}while((h|0)!=(j|0))}d=Kb(d,g)|0;t=ma(f)|0;d=b[(t?21824:21616)+(i*28|0)+(d<<2)>>2]|0;if((d|0)<=-1)H(23030,22949,412,23134);if(!d)g=54;else{i=e;g=0;h=b[i>>2]|0;i=b[i+4>>2]|0;do{h=Lb(h,i)|0;i=G()|0;t=e;b[t>>2]=h;b[t+4>>2]=i;g=g+1|0}while((g|0)<(d|0));g=54}}while(0);if((g|0)==54)if(k)g=55;if((g|0)==55){t=e;if((Kb(b[t>>2]|0,b[t+4>>2]|0)|0)==1){f=4;break}}t=e;r=b[t>>2]|0;t=b[t+4>>2]&-1040385;s=cd(f|0,0,45)|0;t=t|(G()|0);f=e;b[f>>2]=r|s;b[f+4>>2]=t;f=0}else f=2;while(0);t=f;S=p;return t|0}function nc(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=S;S=S+16|0;f=g;a=lc(a,b,c,d,f)|0;if(!a){Ua(f,e);a=0}S=g;return a|0}function oc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=S;S=S+16|0;f=e;Va(c,f);d=mc(a,b,f,d)|0;S=e;return d|0}function pc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;g=S;S=S+32|0;e=g+12|0;f=g;if((lc(a,b,a,b,e)|0)==0?(lc(a,b,c,d,f)|0)==0:0)a=Ta(e,f)|0;else a=-1;S=g;return a|0}function qc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0;g=S;S=S+32|0;e=g+12|0;f=g;if((lc(a,b,a,b,e)|0)==0?(lc(a,b,c,d,f)|0)==0:0)a=Ta(e,f)|0;else a=-1;S=g;return (a>>>31^1)+a|0}function rc(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0.0,j=0.0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0;x=S;S=S+48|0;g=x+24|0;h=x+12|0;w=x;if((lc(a,c,a,c,g)|0)==0?(lc(a,c,d,e,h)|0)==0:0){v=Ta(g,h)|0;if((v|0)<0){w=v;S=x;return w|0};b[g>>2]=0;b[g+4>>2]=0;b[g+8>>2]=0;b[h>>2]=0;b[h+4>>2]=0;b[h+8>>2]=0;lc(a,c,a,c,g)|0;lc(a,c,d,e,h)|0;Wa(g);Wa(h);if(!v){e=g+4|0;n=g+8|0;s=e;t=n;u=g;d=b[g>>2]|0;e=b[e>>2]|0;g=b[n>>2]|0;p=0.0;r=0.0;o=0.0}else{l=b[g>>2]|0;o=+(v|0);s=g+4|0;m=b[s>>2]|0;t=g+8|0;n=b[t>>2]|0;u=g;d=l;e=m;g=n;p=+((b[h>>2]|0)-l|0)/o;r=+((b[h+4>>2]|0)-m|0)/o;o=+((b[h+8>>2]|0)-n|0)/o}b[w>>2]=d;n=w+4|0;b[n>>2]=e;m=w+8|0;b[m>>2]=g;l=0;while(1){j=+(l|0);y=p*j+ +(d|0);i=r*j+ +(b[s>>2]|0);j=o*j+ +(b[t>>2]|0);e=~~+ed(+y);h=~~+ed(+i);d=~~+ed(+j);y=+q(+(+(e|0)-y));i=+q(+(+(h|0)-i));j=+q(+(+(d|0)-j));do if(!(y>i&y>j)){k=0-e|0;if(i>j){g=k-d|0;break}else{g=h;d=k-h|0;break}}else{e=0-(h+d)|0;g=h}while(0);b[w>>2]=e;b[n>>2]=g;b[m>>2]=d;Xa(w);mc(a,c,w,f+(l<<3)|0)|0;if((l|0)==(v|0))break;l=l+1|0;d=b[u>>2]|0}w=0;S=x;return w|0}w=-1;S=x;return w|0}function sc(a,b){a=a|0;b=b|0;var c=0;if(!b){c=1;return c|0}c=a;a=1;do{a=B((b&1|0)==0?1:c,a)|0;b=b>>1;c=B(c,c)|0}while((b|0)!=0);return a|0}function tc(a,c,d){a=a|0;c=c|0;d=d|0;var f=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0.0;if(!(xa(c,d)|0)){n=0;return n|0}c=wa(c)|0;o=+e[d>>3];f=+e[d+8>>3];f=c&f<0.0?f+6.283185307179586:f;n=b[a>>2]|0;if((n|0)<=0){n=0;return n|0}m=b[a+4>>2]|0;if(c){c=0;d=-1;a=0;a:while(1){l=a;while(1){i=+e[m+(l<<4)>>3];k=+e[m+(l<<4)+8>>3];a=(d+2|0)%(n|0)|0;h=+e[m+(a<<4)>>3];g=+e[m+(a<<4)+8>>3];if(i>h){j=i;i=k}else{j=h;h=i;i=g;g=k}if(!(o<h|o>j))break;d=l+1|0;if((d|0)<(n|0)){a=l;l=d;d=a}else{d=22;break a}}k=g<0.0?g+6.283185307179586:g;i=i<0.0?i+6.283185307179586:i;f=i==f|k==f?f+-2.220446049250313e-16:f;k=k+(o-h)/(j-h)*(i-k);if((k<0.0?k+6.283185307179586:k)>f)c=c^1;a=l+1|0;if((a|0)>=(n|0)){d=22;break}else d=l}if((d|0)==22)return c|0}else{c=0;d=-1;a=0;b:while(1){l=a;while(1){i=+e[m+(l<<4)>>3];k=+e[m+(l<<4)+8>>3];a=(d+2|0)%(n|0)|0;h=+e[m+(a<<4)>>3];g=+e[m+(a<<4)+8>>3];if(i>h){j=i;i=k}else{j=h;h=i;i=g;g=k}if(!(o<h|o>j))break;d=l+1|0;if((d|0)<(n|0)){a=l;l=d;d=a}else{d=22;break b}}f=i==f|g==f?f+-2.220446049250313e-16:f;if(g+(o-h)/(j-h)*(i-g)>f)c=c^1;a=l+1|0;if((a|0)>=(n|0)){d=22;break}else d=l}if((d|0)==22)return c|0}return 0}function uc(a,c){a=a|0;c=c|0;var d=0.0,f=0.0,g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0,p=0,r=0,s=0,t=0,u=0,v=0;r=b[a>>2]|0;if(!r){b[c>>2]=0;b[c+4>>2]=0;b[c+8>>2]=0;b[c+12>>2]=0;b[c+16>>2]=0;b[c+20>>2]=0;b[c+24>>2]=0;b[c+28>>2]=0;return}s=c+8|0;e[s>>3]=1797693134862315708145274.0e284;t=c+24|0;e[t>>3]=1797693134862315708145274.0e284;e[c>>3]=-1797693134862315708145274.0e284;u=c+16|0;e[u>>3]=-1797693134862315708145274.0e284;if((r|0)<=0)return;o=b[a+4>>2]|0;l=1797693134862315708145274.0e284;m=-1797693134862315708145274.0e284;n=0;a=-1;h=1797693134862315708145274.0e284;i=1797693134862315708145274.0e284;k=-1797693134862315708145274.0e284;f=-1797693134862315708145274.0e284;p=0;while(1){d=+e[o+(p<<4)>>3];j=+e[o+(p<<4)+8>>3];a=a+2|0;g=+e[o+(((a|0)==(r|0)?0:a)<<4)+8>>3];if(d<h){e[s>>3]=d;h=d}if(j<i){e[t>>3]=j;i=j}if(d>k)e[c>>3]=d;else d=k;if(j>f){e[u>>3]=j;f=j}l=j>0.0&j<l?j:l;m=j<0.0&j>m?j:m;n=n|+q(+(j-g))>3.141592653589793;a=p+1|0;if((a|0)==(r|0))break;else{v=p;k=d;p=a;a=v}}if(!n)return;e[u>>3]=m;e[t>>3]=l;return}function vc(a,c){a=a|0;c=c|0;var d=0,f=0,g=0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;r=b[a>>2]|0;if(r){s=c+8|0;e[s>>3]=1797693134862315708145274.0e284;t=c+24|0;e[t>>3]=1797693134862315708145274.0e284;e[c>>3]=-1797693134862315708145274.0e284;u=c+16|0;e[u>>3]=-1797693134862315708145274.0e284;if((r|0)>0){g=b[a+4>>2]|0;o=1797693134862315708145274.0e284;p=-1797693134862315708145274.0e284;f=0;d=-1;k=1797693134862315708145274.0e284;l=1797693134862315708145274.0e284;n=-1797693134862315708145274.0e284;i=-1797693134862315708145274.0e284;v=0;while(1){h=+e[g+(v<<4)>>3];m=+e[g+(v<<4)+8>>3];z=d+2|0;j=+e[g+(((z|0)==(r|0)?0:z)<<4)+8>>3];if(h<k){e[s>>3]=h;k=h}if(m<l){e[t>>3]=m;l=m}if(h>n)e[c>>3]=h;else h=n;if(m>i){e[u>>3]=m;i=m}o=m>0.0&m<o?m:o;p=m<0.0&m>p?m:p;f=f|+q(+(m-j))>3.141592653589793;d=v+1|0;if((d|0)==(r|0))break;else{z=v;n=h;v=d;d=z}}if(f){e[u>>3]=p;e[t>>3]=o}}}else{b[c>>2]=0;b[c+4>>2]=0;b[c+8>>2]=0;b[c+12>>2]=0;b[c+16>>2]=0;b[c+20>>2]=0;b[c+24>>2]=0;b[c+28>>2]=0}z=a+8|0;d=b[z>>2]|0;if((d|0)<=0)return;y=a+12|0;x=0;do{g=b[y>>2]|0;f=x;x=x+1|0;t=c+(x<<5)|0;u=b[g+(f<<3)>>2]|0;if(u){v=c+(x<<5)+8|0;e[v>>3]=1797693134862315708145274.0e284;a=c+(x<<5)+24|0;e[a>>3]=1797693134862315708145274.0e284;e[t>>3]=-1797693134862315708145274.0e284;w=c+(x<<5)+16|0;e[w>>3]=-1797693134862315708145274.0e284;if((u|0)>0){r=b[g+(f<<3)+4>>2]|0;o=1797693134862315708145274.0e284;p=-1797693134862315708145274.0e284;g=0;f=-1;s=0;k=1797693134862315708145274.0e284;l=1797693134862315708145274.0e284;m=-1797693134862315708145274.0e284;i=-1797693134862315708145274.0e284;while(1){h=+e[r+(s<<4)>>3];n=+e[r+(s<<4)+8>>3];f=f+2|0;j=+e[r+(((f|0)==(u|0)?0:f)<<4)+8>>3];if(h<k){e[v>>3]=h;k=h}if(n<l){e[a>>3]=n;l=n}if(h>m)e[t>>3]=h;else h=m;if(n>i){e[w>>3]=n;i=n}o=n>0.0&n<o?n:o;p=n<0.0&n>p?n:p;g=g|+q(+(n-j))>3.141592653589793;f=s+1|0;if((f|0)==(u|0))break;else{A=s;s=f;m=h;f=A}}if(g){e[w>>3]=p;e[a>>3]=o}}}else{b[t>>2]=0;b[t+4>>2]=0;b[t+8>>2]=0;b[t+12>>2]=0;b[t+16>>2]=0;b[t+20>>2]=0;b[t+24>>2]=0;b[t+28>>2]=0;d=b[z>>2]|0}}while((x|0)<(d|0));return}function wc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0,g=0;if(!(tc(a,c,d)|0)){f=0;return f|0}f=a+8|0;if((b[f>>2]|0)<=0){f=1;return f|0}e=a+12|0;a=0;while(1){g=a;a=a+1|0;if(tc((b[e>>2]|0)+(g<<3)|0,c+(a<<5)|0,d)|0){a=0;e=6;break}if((a|0)>=(b[f>>2]|0)){a=1;e=6;break}}if((e|0)==6)return a|0;return 0}function xc(){return 8}function yc(){return 16}function zc(){return 168}function Ac(){return 8}function Bc(){return 16}function Cc(){return 12}function Dc(){return 8}function Ec(a){a=a|0;var b=0.0,c=0.0;c=+e[a>>3];b=+e[a+8>>3];return +(+r(+(c*c+b*b)))}function Fc(a,b,c,d,f){a=a|0;b=b|0;c=c|0;d=d|0;f=f|0;var g=0.0,h=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0;k=+e[a>>3];j=+e[b>>3]-k;i=+e[a+8>>3];h=+e[b+8>>3]-i;m=+e[c>>3];g=+e[d>>3]-m;n=+e[c+8>>3];l=+e[d+8>>3]-n;g=(g*(i-n)-(k-m)*l)/(j*l-h*g);e[f>>3]=k+j*g;e[f+8>>3]=i+h*g;return}function Gc(a,b){a=a|0;b=b|0;if(!(+e[a>>3]==+e[b>>3])){b=0;return b|0}b=+e[a+8>>3]==+e[b+8>>3];return b|0}function Hc(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,f=0.0;f=+e[a>>3]-+e[b>>3];d=+e[a+8>>3]-+e[b+8>>3];c=+e[a+16>>3]-+e[b+16>>3];return +(f*f+d*d+c*c)}function Ic(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,f=0.0;c=+e[a>>3];d=+t(+c);c=+u(+c);e[b+16>>3]=c;c=+e[a+8>>3];f=d*+t(+c);e[b>>3]=f;c=d*+u(+c);e[b+8>>3]=c;return}function Jc(a,c){a=a|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;k=S;S=S+32|0;f=k+16|0;g=k;Tb(a,c,f);h=zb(a,c)|0;j=Kb(a,c)|0;pa(h,g);c=qa(h,b[f>>2]|0)|0;if(!(la(h)|0)){j=c;S=k;return j|0}do switch(h|0){case 4:{a=0;d=14;break}case 14:{a=1;d=14;break}case 24:{a=2;d=14;break}case 38:{a=3;d=14;break}case 49:{a=4;d=14;break}case 58:{a=5;d=14;break}case 63:{a=6;d=14;break}case 72:{a=7;d=14;break}case 83:{a=8;d=14;break}case 97:{a=9;d=14;break}case 107:{a=10;d=14;break}case 117:{a=11;d=14;break}default:{i=0;e=0}}while(0);if((d|0)==14){i=b[22096+(a*24|0)+8>>2]|0;e=b[22096+(a*24|0)+16>>2]|0}a=b[f>>2]|0;if((a|0)!=(b[g>>2]|0)){h=ma(h)|0;a=b[f>>2]|0;if(h|(a|0)==(e|0))c=(c+1|0)%6|0}if((j|0)==3&(a|0)==(e|0)){j=(c+5|0)%6|0;S=k;return j|0}if(!((j|0)==5&(a|0)==(i|0))){j=c;S=k;return j|0}j=(c+1|0)%6|0;S=k;return j|0}function Kc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;e=Eb(a,c)|0;if((d+-1|0)>>>0>5){d=-1;return d|0}f=(e|0)!=0;if((d|0)==1&f){d=-1;return d|0}e=Jc(a,c)|0;if(f){d=(5-e+(b[22384+(d<<2)>>2]|0)|0)%5|0;return d|0}else{d=(6-e+(b[22416+(d<<2)>>2]|0)|0)%6|0;return d|0}return 0}function Lc(a,c,d){a=a|0;c=c|0;d=d|0;var e=0;if((c|0)>0){e=Xc(c,4)|0;b[a>>2]=e;if(!e)H(23230,23253,40,23267)}else b[a>>2]=0;b[a+4>>2]=c;b[a+8>>2]=0;b[a+12>>2]=d;return}function Mc(a){a=a|0;var c=0,d=0,f=0,g=0,h=0,i=0,j=0;g=a+4|0;h=a+12|0;i=a+8|0;a:while(1){d=b[g>>2]|0;c=0;while(1){if((c|0)>=(d|0))break a;f=b[a>>2]|0;j=b[f+(c<<2)>>2]|0;if(!j)c=c+1|0;else break}c=f+(~~(+q(+(+s(10.0,+(+(15-(b[h>>2]|0)|0)))*(+e[j>>3]+ +e[j+8>>3])))%+(d|0))>>>0<<2)|0;d=b[c>>2]|0;b:do if(d|0){f=j+32|0;if((d|0)==(j|0))b[c>>2]=b[f>>2];else{d=d+32|0;c=b[d>>2]|0;if(!c)break;while(1){if((c|0)==(j|0))break;d=c+32|0;c=b[d>>2]|0;if(!c)break b}b[d>>2]=b[f>>2]}Wc(j);b[i>>2]=(b[i>>2]|0)+-1}while(0)}Wc(b[a>>2]|0);return}function Nc(a){a=a|0;var c=0,d=0,e=0;e=b[a+4>>2]|0;d=0;while(1){if((d|0)>=(e|0)){c=0;d=4;break}c=b[(b[a>>2]|0)+(d<<2)>>2]|0;if(!c)d=d+1|0;else{d=4;break}}if((d|0)==4)return c|0;return 0}function Oc(a,c){a=a|0;c=c|0;var d=0,f=0,g=0,h=0;d=~~(+q(+(+s(10.0,+(+(15-(b[a+12>>2]|0)|0)))*(+e[c>>3]+ +e[c+8>>3])))%+(b[a+4>>2]|0))>>>0;d=(b[a>>2]|0)+(d<<2)|0;f=b[d>>2]|0;if(!f){h=1;return h|0}h=c+32|0;do if((f|0)!=(c|0)){d=b[f+32>>2]|0;if(!d){h=1;return h|0}g=d;while(1){if((g|0)==(c|0)){g=8;break}d=b[g+32>>2]|0;if(!d){d=1;g=10;break}else{f=g;g=d}}if((g|0)==8){b[f+32>>2]=b[h>>2];break}else if((g|0)==10)return d|0}else b[d>>2]=b[h>>2];while(0);Wc(c);h=a+8|0;b[h>>2]=(b[h>>2]|0)+-1;h=0;return h|0}function Pc(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0,h=0,i=0;h=Vc(40)|0;if(!h)H(23283,23253,98,23296);b[h>>2]=b[c>>2];b[h+4>>2]=b[c+4>>2];b[h+8>>2]=b[c+8>>2];b[h+12>>2]=b[c+12>>2];g=h+16|0;b[g>>2]=b[d>>2];b[g+4>>2]=b[d+4>>2];b[g+8>>2]=b[d+8>>2];b[g+12>>2]=b[d+12>>2];b[h+32>>2]=0;g=~~(+q(+(+s(10.0,+(+(15-(b[a+12>>2]|0)|0)))*(+e[c>>3]+ +e[c+8>>3])))%+(b[a+4>>2]|0))>>>0;g=(b[a>>2]|0)+(g<<2)|0;f=b[g>>2]|0;do if(!f)b[g>>2]=h;else{while(1){if(hb(f,c)|0?hb(f+16|0,d)|0:0)break;g=b[f+32>>2]|0;f=(g|0)==0?f:g;if(!(b[f+32>>2]|0)){i=10;break}}if((i|0)==10){b[f+32>>2]=h;break}Wc(h);i=f;return i|0}while(0);i=a+8|0;b[i>>2]=(b[i>>2]|0)+1;i=h;return i|0}function Qc(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0;g=~~(+q(+(+s(10.0,+(+(15-(b[a+12>>2]|0)|0)))*(+e[c>>3]+ +e[c+8>>3])))%+(b[a+4>>2]|0))>>>0;g=b[(b[a>>2]|0)+(g<<2)>>2]|0;if(!g){d=0;return d|0}if(!d){a=g;while(1){if(hb(a,c)|0){f=10;break}a=b[a+32>>2]|0;if(!a){a=0;f=10;break}}if((f|0)==10)return a|0}a=g;while(1){if(hb(a,c)|0?hb(a+16|0,d)|0:0){f=10;break}a=b[a+32>>2]|0;if(!a){a=0;f=10;break}}if((f|0)==10)return a|0;return 0}function Rc(a,c){a=a|0;c=c|0;var d=0;d=~~(+q(+(+s(10.0,+(+(15-(b[a+12>>2]|0)|0)))*(+e[c>>3]+ +e[c+8>>3])))%+(b[a+4>>2]|0))>>>0;a=b[(b[a>>2]|0)+(d<<2)>>2]|0;if(!a){d=0;return d|0}while(1){if(hb(a,c)|0){c=5;break}a=b[a+32>>2]|0;if(!a){a=0;c=5;break}}if((c|0)==5)return a|0;return 0}function Sc(){return 23312}function Tc(a){a=+a;return +(+hd(+a))}function Uc(a){a=+a;return ~~+Tc(a)|0}function Vc(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;w=S;S=S+16|0;n=w;do if(a>>>0<245){k=a>>>0<11?16:a+11&-8;a=k>>>3;m=b[5829]|0;d=m>>>a;if(d&3|0){c=(d&1^1)+a|0;a=23356+(c<<1<<2)|0;d=a+8|0;e=b[d>>2]|0;f=e+8|0;g=b[f>>2]|0;if((g|0)==(a|0))b[5829]=m&~(1<<c);else{b[g+12>>2]=a;b[d>>2]=g}v=c<<3;b[e+4>>2]=v|3;v=e+v+4|0;b[v>>2]=b[v>>2]|1;v=f;S=w;return v|0}l=b[5831]|0;if(k>>>0>l>>>0){if(d|0){c=2<<a;c=d<<a&(c|0-c);c=(c&0-c)+-1|0;i=c>>>12&16;c=c>>>i;d=c>>>5&8;c=c>>>d;g=c>>>2&4;c=c>>>g;a=c>>>1&2;c=c>>>a;e=c>>>1&1;e=(d|i|g|a|e)+(c>>>e)|0;c=23356+(e<<1<<2)|0;a=c+8|0;g=b[a>>2]|0;i=g+8|0;d=b[i>>2]|0;if((d|0)==(c|0)){a=m&~(1<<e);b[5829]=a}else{b[d+12>>2]=c;b[a>>2]=d;a=m}v=e<<3;h=v-k|0;b[g+4>>2]=k|3;f=g+k|0;b[f+4>>2]=h|1;b[g+v>>2]=h;if(l|0){e=b[5834]|0;c=l>>>3;d=23356+(c<<1<<2)|0;c=1<<c;if(!(a&c)){b[5829]=a|c;c=d;a=d+8|0}else{a=d+8|0;c=b[a>>2]|0}b[a>>2]=e;b[c+12>>2]=e;b[e+8>>2]=c;b[e+12>>2]=d}b[5831]=h;b[5834]=f;v=i;S=w;return v|0}g=b[5830]|0;if(g){d=(g&0-g)+-1|0;f=d>>>12&16;d=d>>>f;e=d>>>5&8;d=d>>>e;h=d>>>2&4;d=d>>>h;i=d>>>1&2;d=d>>>i;j=d>>>1&1;j=b[23620+((e|f|h|i|j)+(d>>>j)<<2)>>2]|0;d=j;i=j;j=(b[j+4>>2]&-8)-k|0;while(1){a=b[d+16>>2]|0;if(!a){a=b[d+20>>2]|0;if(!a)break}h=(b[a+4>>2]&-8)-k|0;f=h>>>0<j>>>0;d=a;i=f?a:i;j=f?h:j}h=i+k|0;if(h>>>0>i>>>0){f=b[i+24>>2]|0;c=b[i+12>>2]|0;do if((c|0)==(i|0)){a=i+20|0;c=b[a>>2]|0;if(!c){a=i+16|0;c=b[a>>2]|0;if(!c){d=0;break}}while(1){e=c+20|0;d=b[e>>2]|0;if(!d){e=c+16|0;d=b[e>>2]|0;if(!d)break;else{c=d;a=e}}else{c=d;a=e}}b[a>>2]=0;d=c}else{d=b[i+8>>2]|0;b[d+12>>2]=c;b[c+8>>2]=d;d=c}while(0);do if(f|0){c=b[i+28>>2]|0;a=23620+(c<<2)|0;if((i|0)==(b[a>>2]|0)){b[a>>2]=d;if(!d){b[5830]=g&~(1<<c);break}}else{v=f+16|0;b[((b[v>>2]|0)==(i|0)?v:f+20|0)>>2]=d;if(!d)break}b[d+24>>2]=f;c=b[i+16>>2]|0;if(c|0){b[d+16>>2]=c;b[c+24>>2]=d}c=b[i+20>>2]|0;if(c|0){b[d+20>>2]=c;b[c+24>>2]=d}}while(0);if(j>>>0<16){v=j+k|0;b[i+4>>2]=v|3;v=i+v+4|0;b[v>>2]=b[v>>2]|1}else{b[i+4>>2]=k|3;b[h+4>>2]=j|1;b[h+j>>2]=j;if(l|0){e=b[5834]|0;c=l>>>3;d=23356+(c<<1<<2)|0;c=1<<c;if(!(c&m)){b[5829]=c|m;c=d;a=d+8|0}else{a=d+8|0;c=b[a>>2]|0}b[a>>2]=e;b[c+12>>2]=e;b[e+8>>2]=c;b[e+12>>2]=d}b[5831]=j;b[5834]=h}v=i+8|0;S=w;return v|0}else m=k}else m=k}else m=k}else if(a>>>0<=4294967231){a=a+11|0;k=a&-8;e=b[5830]|0;if(e){f=0-k|0;a=a>>>8;if(a)if(k>>>0>16777215)j=31;else{m=(a+1048320|0)>>>16&8;q=a<<m;i=(q+520192|0)>>>16&4;q=q<<i;j=(q+245760|0)>>>16&2;j=14-(i|m|j)+(q<<j>>>15)|0;j=k>>>(j+7|0)&1|j<<1}else j=0;d=b[23620+(j<<2)>>2]|0;a:do if(!d){d=0;a=0;q=61}else{a=0;i=k<<((j|0)==31?0:25-(j>>>1)|0);g=0;while(1){h=(b[d+4>>2]&-8)-k|0;if(h>>>0<f>>>0)if(!h){a=d;f=0;q=65;break a}else{a=d;f=h}q=b[d+20>>2]|0;d=b[d+16+(i>>>31<<2)>>2]|0;g=(q|0)==0|(q|0)==(d|0)?g:q;if(!d){d=g;q=61;break}else i=i<<1}}while(0);if((q|0)==61){if((d|0)==0&(a|0)==0){a=2<<j;a=(a|0-a)&e;if(!a){m=k;break}m=(a&0-a)+-1|0;h=m>>>12&16;m=m>>>h;g=m>>>5&8;m=m>>>g;i=m>>>2&4;m=m>>>i;j=m>>>1&2;m=m>>>j;d=m>>>1&1;a=0;d=b[23620+((g|h|i|j|d)+(m>>>d)<<2)>>2]|0}if(!d){i=a;h=f}else q=65}if((q|0)==65){g=d;while(1){m=(b[g+4>>2]&-8)-k|0;d=m>>>0<f>>>0;f=d?m:f;a=d?g:a;d=b[g+16>>2]|0;if(!d)d=b[g+20>>2]|0;if(!d){i=a;h=f;break}else g=d}}if(((i|0)!=0?h>>>0<((b[5831]|0)-k|0)>>>0:0)?(l=i+k|0,l>>>0>i>>>0):0){g=b[i+24>>2]|0;c=b[i+12>>2]|0;do if((c|0)==(i|0)){a=i+20|0;c=b[a>>2]|0;if(!c){a=i+16|0;c=b[a>>2]|0;if(!c){c=0;break}}while(1){f=c+20|0;d=b[f>>2]|0;if(!d){f=c+16|0;d=b[f>>2]|0;if(!d)break;else{c=d;a=f}}else{c=d;a=f}}b[a>>2]=0}else{v=b[i+8>>2]|0;b[v+12>>2]=c;b[c+8>>2]=v}while(0);do if(g){a=b[i+28>>2]|0;d=23620+(a<<2)|0;if((i|0)==(b[d>>2]|0)){b[d>>2]=c;if(!c){e=e&~(1<<a);b[5830]=e;break}}else{v=g+16|0;b[((b[v>>2]|0)==(i|0)?v:g+20|0)>>2]=c;if(!c)break}b[c+24>>2]=g;a=b[i+16>>2]|0;if(a|0){b[c+16>>2]=a;b[a+24>>2]=c}a=b[i+20>>2]|0;if(a){b[c+20>>2]=a;b[a+24>>2]=c}}while(0);b:do if(h>>>0<16){v=h+k|0;b[i+4>>2]=v|3;v=i+v+4|0;b[v>>2]=b[v>>2]|1}else{b[i+4>>2]=k|3;b[l+4>>2]=h|1;b[l+h>>2]=h;c=h>>>3;if(h>>>0<256){d=23356+(c<<1<<2)|0;a=b[5829]|0;c=1<<c;if(!(a&c)){b[5829]=a|c;c=d;a=d+8|0}else{a=d+8|0;c=b[a>>2]|0}b[a>>2]=l;b[c+12>>2]=l;b[l+8>>2]=c;b[l+12>>2]=d;break}c=h>>>8;if(c)if(h>>>0>16777215)d=31;else{u=(c+1048320|0)>>>16&8;v=c<<u;t=(v+520192|0)>>>16&4;v=v<<t;d=(v+245760|0)>>>16&2;d=14-(t|u|d)+(v<<d>>>15)|0;d=h>>>(d+7|0)&1|d<<1}else d=0;c=23620+(d<<2)|0;b[l+28>>2]=d;a=l+16|0;b[a+4>>2]=0;b[a>>2]=0;a=1<<d;if(!(e&a)){b[5830]=e|a;b[c>>2]=l;b[l+24>>2]=c;b[l+12>>2]=l;b[l+8>>2]=l;break}c=b[c>>2]|0;c:do if((b[c+4>>2]&-8|0)!=(h|0)){e=h<<((d|0)==31?0:25-(d>>>1)|0);while(1){d=c+16+(e>>>31<<2)|0;a=b[d>>2]|0;if(!a)break;if((b[a+4>>2]&-8|0)==(h|0)){c=a;break c}else{e=e<<1;c=a}}b[d>>2]=l;b[l+24>>2]=c;b[l+12>>2]=l;b[l+8>>2]=l;break b}while(0);u=c+8|0;v=b[u>>2]|0;b[v+12>>2]=l;b[u>>2]=l;b[l+8>>2]=v;b[l+12>>2]=c;b[l+24>>2]=0}while(0);v=i+8|0;S=w;return v|0}else m=k}else m=k}else m=-1;while(0);d=b[5831]|0;if(d>>>0>=m>>>0){c=d-m|0;a=b[5834]|0;if(c>>>0>15){v=a+m|0;b[5834]=v;b[5831]=c;b[v+4>>2]=c|1;b[a+d>>2]=c;b[a+4>>2]=m|3}else{b[5831]=0;b[5834]=0;b[a+4>>2]=d|3;v=a+d+4|0;b[v>>2]=b[v>>2]|1}v=a+8|0;S=w;return v|0}h=b[5832]|0;if(h>>>0>m>>>0){t=h-m|0;b[5832]=t;v=b[5835]|0;u=v+m|0;b[5835]=u;b[u+4>>2]=t|1;b[v+4>>2]=m|3;v=v+8|0;S=w;return v|0}if(!(b[5947]|0)){b[5949]=4096;b[5948]=4096;b[5950]=-1;b[5951]=-1;b[5952]=0;b[5940]=0;b[5947]=n&-16^1431655768;a=4096}else a=b[5949]|0;i=m+48|0;j=m+47|0;g=a+j|0;f=0-a|0;k=g&f;if(k>>>0<=m>>>0){v=0;S=w;return v|0}a=b[5939]|0;if(a|0?(l=b[5937]|0,n=l+k|0,n>>>0<=l>>>0|n>>>0>a>>>0):0){v=0;S=w;return v|0}d:do if(!(b[5940]&4)){d=b[5835]|0;e:do if(d){e=23764;while(1){n=b[e>>2]|0;if(n>>>0<=d>>>0?(n+(b[e+4>>2]|0)|0)>>>0>d>>>0:0)break;a=b[e+8>>2]|0;if(!a){q=128;break e}else e=a}c=g-h&f;if(c>>>0<2147483647){a=id(c|0)|0;if((a|0)==((b[e>>2]|0)+(b[e+4>>2]|0)|0)){if((a|0)!=(-1|0)){h=c;g=a;q=145;break d}}else{e=a;q=136}}else c=0}else q=128;while(0);do if((q|0)==128){d=id(0)|0;if((d|0)!=(-1|0)?(c=d,o=b[5948]|0,p=o+-1|0,c=((p&c|0)==0?0:(p+c&0-o)-c|0)+k|0,o=b[5937]|0,p=c+o|0,c>>>0>m>>>0&c>>>0<2147483647):0){n=b[5939]|0;if(n|0?p>>>0<=o>>>0|p>>>0>n>>>0:0){c=0;break}a=id(c|0)|0;if((a|0)==(d|0)){h=c;g=d;q=145;break d}else{e=a;q=136}}else c=0}while(0);do if((q|0)==136){d=0-c|0;if(!(i>>>0>c>>>0&(c>>>0<2147483647&(e|0)!=(-1|0))))if((e|0)==(-1|0)){c=0;break}else{h=c;g=e;q=145;break d}a=b[5949]|0;a=j-c+a&0-a;if(a>>>0>=2147483647){h=c;g=e;q=145;break d}if((id(a|0)|0)==(-1|0)){id(d|0)|0;c=0;break}else{h=a+c|0;g=e;q=145;break d}}while(0);b[5940]=b[5940]|4;q=143}else{c=0;q=143}while(0);if(((q|0)==143?k>>>0<2147483647:0)?(t=id(k|0)|0,p=id(0)|0,r=p-t|0,s=r>>>0>(m+40|0)>>>0,!((t|0)==(-1|0)|s^1|t>>>0<p>>>0&((t|0)!=(-1|0)&(p|0)!=(-1|0))^1)):0){h=s?r:c;g=t;q=145}if((q|0)==145){c=(b[5937]|0)+h|0;b[5937]=c;if(c>>>0>(b[5938]|0)>>>0)b[5938]=c;j=b[5835]|0;f:do if(j){c=23764;while(1){a=b[c>>2]|0;d=b[c+4>>2]|0;if((g|0)==(a+d|0)){q=154;break}e=b[c+8>>2]|0;if(!e)break;else c=e}if(((q|0)==154?(u=c+4|0,(b[c+12>>2]&8|0)==0):0)?g>>>0>j>>>0&a>>>0<=j>>>0:0){b[u>>2]=d+h;v=(b[5832]|0)+h|0;t=j+8|0;t=(t&7|0)==0?0:0-t&7;u=j+t|0;t=v-t|0;b[5835]=u;b[5832]=t;b[u+4>>2]=t|1;b[j+v+4>>2]=40;b[5836]=b[5951];break}if(g>>>0<(b[5833]|0)>>>0)b[5833]=g;d=g+h|0;c=23764;while(1){if((b[c>>2]|0)==(d|0)){q=162;break}a=b[c+8>>2]|0;if(!a)break;else c=a}if((q|0)==162?(b[c+12>>2]&8|0)==0:0){b[c>>2]=g;l=c+4|0;b[l>>2]=(b[l>>2]|0)+h;l=g+8|0;l=g+((l&7|0)==0?0:0-l&7)|0;c=d+8|0;c=d+((c&7|0)==0?0:0-c&7)|0;k=l+m|0;i=c-l-m|0;b[l+4>>2]=m|3;g:do if((j|0)==(c|0)){v=(b[5832]|0)+i|0;b[5832]=v;b[5835]=k;b[k+4>>2]=v|1}else{if((b[5834]|0)==(c|0)){v=(b[5831]|0)+i|0;b[5831]=v;b[5834]=k;b[k+4>>2]=v|1;b[k+v>>2]=v;break}a=b[c+4>>2]|0;if((a&3|0)==1){h=a&-8;e=a>>>3;h:do if(a>>>0<256){a=b[c+8>>2]|0;d=b[c+12>>2]|0;if((d|0)==(a|0)){b[5829]=b[5829]&~(1<<e);break}else{b[a+12>>2]=d;b[d+8>>2]=a;break}}else{g=b[c+24>>2]|0;a=b[c+12>>2]|0;do if((a|0)==(c|0)){d=c+16|0;e=d+4|0;a=b[e>>2]|0;if(!a){a=b[d>>2]|0;if(!a){a=0;break}}else d=e;while(1){f=a+20|0;e=b[f>>2]|0;if(!e){f=a+16|0;e=b[f>>2]|0;if(!e)break;else{a=e;d=f}}else{a=e;d=f}}b[d>>2]=0}else{v=b[c+8>>2]|0;b[v+12>>2]=a;b[a+8>>2]=v}while(0);if(!g)break;d=b[c+28>>2]|0;e=23620+(d<<2)|0;do if((b[e>>2]|0)!=(c|0)){v=g+16|0;b[((b[v>>2]|0)==(c|0)?v:g+20|0)>>2]=a;if(!a)break h}else{b[e>>2]=a;if(a|0)break;b[5830]=b[5830]&~(1<<d);break h}while(0);b[a+24>>2]=g;d=c+16|0;e=b[d>>2]|0;if(e|0){b[a+16>>2]=e;b[e+24>>2]=a}d=b[d+4>>2]|0;if(!d)break;b[a+20>>2]=d;b[d+24>>2]=a}while(0);c=c+h|0;f=h+i|0}else f=i;c=c+4|0;b[c>>2]=b[c>>2]&-2;b[k+4>>2]=f|1;b[k+f>>2]=f;c=f>>>3;if(f>>>0<256){d=23356+(c<<1<<2)|0;a=b[5829]|0;c=1<<c;if(!(a&c)){b[5829]=a|c;c=d;a=d+8|0}else{a=d+8|0;c=b[a>>2]|0}b[a>>2]=k;b[c+12>>2]=k;b[k+8>>2]=c;b[k+12>>2]=d;break}c=f>>>8;do if(!c)e=0;else{if(f>>>0>16777215){e=31;break}u=(c+1048320|0)>>>16&8;v=c<<u;t=(v+520192|0)>>>16&4;v=v<<t;e=(v+245760|0)>>>16&2;e=14-(t|u|e)+(v<<e>>>15)|0;e=f>>>(e+7|0)&1|e<<1}while(0);c=23620+(e<<2)|0;b[k+28>>2]=e;a=k+16|0;b[a+4>>2]=0;b[a>>2]=0;a=b[5830]|0;d=1<<e;if(!(a&d)){b[5830]=a|d;b[c>>2]=k;b[k+24>>2]=c;b[k+12>>2]=k;b[k+8>>2]=k;break}c=b[c>>2]|0;i:do if((b[c+4>>2]&-8|0)!=(f|0)){e=f<<((e|0)==31?0:25-(e>>>1)|0);while(1){d=c+16+(e>>>31<<2)|0;a=b[d>>2]|0;if(!a)break;if((b[a+4>>2]&-8|0)==(f|0)){c=a;break i}else{e=e<<1;c=a}}b[d>>2]=k;b[k+24>>2]=c;b[k+12>>2]=k;b[k+8>>2]=k;break g}while(0);u=c+8|0;v=b[u>>2]|0;b[v+12>>2]=k;b[u>>2]=k;b[k+8>>2]=v;b[k+12>>2]=c;b[k+24>>2]=0}while(0);v=l+8|0;S=w;return v|0}c=23764;while(1){a=b[c>>2]|0;if(a>>>0<=j>>>0?(v=a+(b[c+4>>2]|0)|0,v>>>0>j>>>0):0)break;c=b[c+8>>2]|0}f=v+-47|0;a=f+8|0;a=f+((a&7|0)==0?0:0-a&7)|0;f=j+16|0;a=a>>>0<f>>>0?j:a;c=a+8|0;d=h+-40|0;t=g+8|0;t=(t&7|0)==0?0:0-t&7;u=g+t|0;t=d-t|0;b[5835]=u;b[5832]=t;b[u+4>>2]=t|1;b[g+d+4>>2]=40;b[5836]=b[5951];d=a+4|0;b[d>>2]=27;b[c>>2]=b[5941];b[c+4>>2]=b[5942];b[c+8>>2]=b[5943];b[c+12>>2]=b[5944];b[5941]=g;b[5942]=h;b[5944]=0;b[5943]=c;c=a+24|0;do{u=c;c=c+4|0;b[c>>2]=7}while((u+8|0)>>>0<v>>>0);if((a|0)!=(j|0)){g=a-j|0;b[d>>2]=b[d>>2]&-2;b[j+4>>2]=g|1;b[a>>2]=g;c=g>>>3;if(g>>>0<256){d=23356+(c<<1<<2)|0;a=b[5829]|0;c=1<<c;if(!(a&c)){b[5829]=a|c;c=d;a=d+8|0}else{a=d+8|0;c=b[a>>2]|0}b[a>>2]=j;b[c+12>>2]=j;b[j+8>>2]=c;b[j+12>>2]=d;break}c=g>>>8;if(c)if(g>>>0>16777215)e=31;else{u=(c+1048320|0)>>>16&8;v=c<<u;t=(v+520192|0)>>>16&4;v=v<<t;e=(v+245760|0)>>>16&2;e=14-(t|u|e)+(v<<e>>>15)|0;e=g>>>(e+7|0)&1|e<<1}else e=0;d=23620+(e<<2)|0;b[j+28>>2]=e;b[j+20>>2]=0;b[f>>2]=0;c=b[5830]|0;a=1<<e;if(!(c&a)){b[5830]=c|a;b[d>>2]=j;b[j+24>>2]=d;b[j+12>>2]=j;b[j+8>>2]=j;break}c=b[d>>2]|0;j:do if((b[c+4>>2]&-8|0)!=(g|0)){e=g<<((e|0)==31?0:25-(e>>>1)|0);while(1){d=c+16+(e>>>31<<2)|0;a=b[d>>2]|0;if(!a)break;if((b[a+4>>2]&-8|0)==(g|0)){c=a;break j}else{e=e<<1;c=a}}b[d>>2]=j;b[j+24>>2]=c;b[j+12>>2]=j;b[j+8>>2]=j;break f}while(0);u=c+8|0;v=b[u>>2]|0;b[v+12>>2]=j;b[u>>2]=j;b[j+8>>2]=v;b[j+12>>2]=c;b[j+24>>2]=0}}else{v=b[5833]|0;if((v|0)==0|g>>>0<v>>>0)b[5833]=g;b[5941]=g;b[5942]=h;b[5944]=0;b[5838]=b[5947];b[5837]=-1;b[5842]=23356;b[5841]=23356;b[5844]=23364;b[5843]=23364;b[5846]=23372;b[5845]=23372;b[5848]=23380;b[5847]=23380;b[5850]=23388;b[5849]=23388;b[5852]=23396;b[5851]=23396;b[5854]=23404;b[5853]=23404;b[5856]=23412;b[5855]=23412;b[5858]=23420;b[5857]=23420;b[5860]=23428;b[5859]=23428;b[5862]=23436;b[5861]=23436;b[5864]=23444;b[5863]=23444;b[5866]=23452;b[5865]=23452;b[5868]=23460;b[5867]=23460;b[5870]=23468;b[5869]=23468;b[5872]=23476;b[5871]=23476;b[5874]=23484;b[5873]=23484;b[5876]=23492;b[5875]=23492;b[5878]=23500;b[5877]=23500;b[5880]=23508;b[5879]=23508;b[5882]=23516;b[5881]=23516;b[5884]=23524;b[5883]=23524;b[5886]=23532;b[5885]=23532;b[5888]=23540;b[5887]=23540;b[5890]=23548;b[5889]=23548;b[5892]=23556;b[5891]=23556;b[5894]=23564;b[5893]=23564;b[5896]=23572;b[5895]=23572;b[5898]=23580;b[5897]=23580;b[5900]=23588;b[5899]=23588;b[5902]=23596;b[5901]=23596;b[5904]=23604;b[5903]=23604;v=h+-40|0;t=g+8|0;t=(t&7|0)==0?0:0-t&7;u=g+t|0;t=v-t|0;b[5835]=u;b[5832]=t;b[u+4>>2]=t|1;b[g+v+4>>2]=40;b[5836]=b[5951]}while(0);c=b[5832]|0;if(c>>>0>m>>>0){t=c-m|0;b[5832]=t;v=b[5835]|0;u=v+m|0;b[5835]=u;b[u+4>>2]=t|1;b[v+4>>2]=m|3;v=v+8|0;S=w;return v|0}}v=Sc()|0;b[v>>2]=12;v=0;S=w;return v|0}function Wc(a){a=a|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if(!a)return;d=a+-8|0;f=b[5833]|0;a=b[a+-4>>2]|0;c=a&-8;j=d+c|0;do if(!(a&1)){e=b[d>>2]|0;if(!(a&3))return;h=d+(0-e)|0;g=e+c|0;if(h>>>0<f>>>0)return;if((b[5834]|0)==(h|0)){a=j+4|0;c=b[a>>2]|0;if((c&3|0)!=3){i=h;c=g;break}b[5831]=g;b[a>>2]=c&-2;b[h+4>>2]=g|1;b[h+g>>2]=g;return}d=e>>>3;if(e>>>0<256){a=b[h+8>>2]|0;c=b[h+12>>2]|0;if((c|0)==(a|0)){b[5829]=b[5829]&~(1<<d);i=h;c=g;break}else{b[a+12>>2]=c;b[c+8>>2]=a;i=h;c=g;break}}f=b[h+24>>2]|0;a=b[h+12>>2]|0;do if((a|0)==(h|0)){c=h+16|0;d=c+4|0;a=b[d>>2]|0;if(!a){a=b[c>>2]|0;if(!a){a=0;break}}else c=d;while(1){e=a+20|0;d=b[e>>2]|0;if(!d){e=a+16|0;d=b[e>>2]|0;if(!d)break;else{a=d;c=e}}else{a=d;c=e}}b[c>>2]=0}else{i=b[h+8>>2]|0;b[i+12>>2]=a;b[a+8>>2]=i}while(0);if(f){c=b[h+28>>2]|0;d=23620+(c<<2)|0;if((b[d>>2]|0)==(h|0)){b[d>>2]=a;if(!a){b[5830]=b[5830]&~(1<<c);i=h;c=g;break}}else{i=f+16|0;b[((b[i>>2]|0)==(h|0)?i:f+20|0)>>2]=a;if(!a){i=h;c=g;break}}b[a+24>>2]=f;c=h+16|0;d=b[c>>2]|0;if(d|0){b[a+16>>2]=d;b[d+24>>2]=a}c=b[c+4>>2]|0;if(c){b[a+20>>2]=c;b[c+24>>2]=a;i=h;c=g}else{i=h;c=g}}else{i=h;c=g}}else{i=d;h=d}while(0);if(h>>>0>=j>>>0)return;a=j+4|0;e=b[a>>2]|0;if(!(e&1))return;if(!(e&2)){if((b[5835]|0)==(j|0)){j=(b[5832]|0)+c|0;b[5832]=j;b[5835]=i;b[i+4>>2]=j|1;if((i|0)!=(b[5834]|0))return;b[5834]=0;b[5831]=0;return}if((b[5834]|0)==(j|0)){j=(b[5831]|0)+c|0;b[5831]=j;b[5834]=h;b[i+4>>2]=j|1;b[h+j>>2]=j;return}f=(e&-8)+c|0;d=e>>>3;do if(e>>>0<256){c=b[j+8>>2]|0;a=b[j+12>>2]|0;if((a|0)==(c|0)){b[5829]=b[5829]&~(1<<d);break}else{b[c+12>>2]=a;b[a+8>>2]=c;break}}else{g=b[j+24>>2]|0;a=b[j+12>>2]|0;do if((a|0)==(j|0)){c=j+16|0;d=c+4|0;a=b[d>>2]|0;if(!a){a=b[c>>2]|0;if(!a){d=0;break}}else c=d;while(1){e=a+20|0;d=b[e>>2]|0;if(!d){e=a+16|0;d=b[e>>2]|0;if(!d)break;else{a=d;c=e}}else{a=d;c=e}}b[c>>2]=0;d=a}else{d=b[j+8>>2]|0;b[d+12>>2]=a;b[a+8>>2]=d;d=a}while(0);if(g|0){a=b[j+28>>2]|0;c=23620+(a<<2)|0;if((b[c>>2]|0)==(j|0)){b[c>>2]=d;if(!d){b[5830]=b[5830]&~(1<<a);break}}else{e=g+16|0;b[((b[e>>2]|0)==(j|0)?e:g+20|0)>>2]=d;if(!d)break}b[d+24>>2]=g;a=j+16|0;c=b[a>>2]|0;if(c|0){b[d+16>>2]=c;b[c+24>>2]=d}a=b[a+4>>2]|0;if(a|0){b[d+20>>2]=a;b[a+24>>2]=d}}}while(0);b[i+4>>2]=f|1;b[h+f>>2]=f;if((i|0)==(b[5834]|0)){b[5831]=f;return}}else{b[a>>2]=e&-2;b[i+4>>2]=c|1;b[h+c>>2]=c;f=c}a=f>>>3;if(f>>>0<256){d=23356+(a<<1<<2)|0;c=b[5829]|0;a=1<<a;if(!(c&a)){b[5829]=c|a;a=d;c=d+8|0}else{c=d+8|0;a=b[c>>2]|0}b[c>>2]=i;b[a+12>>2]=i;b[i+8>>2]=a;b[i+12>>2]=d;return}a=f>>>8;if(a)if(f>>>0>16777215)e=31;else{h=(a+1048320|0)>>>16&8;j=a<<h;g=(j+520192|0)>>>16&4;j=j<<g;e=(j+245760|0)>>>16&2;e=14-(g|h|e)+(j<<e>>>15)|0;e=f>>>(e+7|0)&1|e<<1}else e=0;a=23620+(e<<2)|0;b[i+28>>2]=e;b[i+20>>2]=0;b[i+16>>2]=0;c=b[5830]|0;d=1<<e;a:do if(!(c&d)){b[5830]=c|d;b[a>>2]=i;b[i+24>>2]=a;b[i+12>>2]=i;b[i+8>>2]=i}else{a=b[a>>2]|0;b:do if((b[a+4>>2]&-8|0)!=(f|0)){e=f<<((e|0)==31?0:25-(e>>>1)|0);while(1){d=a+16+(e>>>31<<2)|0;c=b[d>>2]|0;if(!c)break;if((b[c+4>>2]&-8|0)==(f|0)){a=c;break b}else{e=e<<1;a=c}}b[d>>2]=i;b[i+24>>2]=a;b[i+12>>2]=i;b[i+8>>2]=i;break a}while(0);h=a+8|0;j=b[h>>2]|0;b[j+12>>2]=i;b[h>>2]=i;b[i+8>>2]=j;b[i+12>>2]=a;b[i+24>>2]=0}while(0);j=(b[5837]|0)+-1|0;b[5837]=j;if(j|0)return;a=23772;while(1){a=b[a>>2]|0;if(!a)break;else a=a+8|0}b[5837]=-1;return}function Xc(a,c){a=a|0;c=c|0;var d=0;if(a){d=B(c,a)|0;if((c|a)>>>0>65535)d=((d>>>0)/(a>>>0)|0|0)==(c|0)?d:-1}else d=0;a=Vc(d)|0;if(!a)return a|0;if(!(b[a+-4>>2]&3))return a|0;gd(a|0,0,d|0)|0;return a|0}function Yc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;c=a+c>>>0;return (F(b+d+(c>>>0<a>>>0|0)>>>0|0),c|0)|0}function Zc(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=b-d-(c>>>0>a>>>0|0)>>>0;return (F(d|0),a-c>>>0|0)|0}function _c(a){a=a|0;return (a?31-(D(a^a-1)|0)|0:32)|0}function $c(a,c,d,e,f){a=a|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;l=a;j=c;k=j;h=d;n=e;i=n;if(!k){g=(f|0)!=0;if(!i){if(g){b[f>>2]=(l>>>0)%(h>>>0);b[f+4>>2]=0}n=0;f=(l>>>0)/(h>>>0)>>>0;return (F(n|0),f)|0}else{if(!g){n=0;f=0;return (F(n|0),f)|0}b[f>>2]=a|0;b[f+4>>2]=c&0;n=0;f=0;return (F(n|0),f)|0}}g=(i|0)==0;do if(h){if(!g){g=(D(i|0)|0)-(D(k|0)|0)|0;if(g>>>0<=31){m=g+1|0;i=31-g|0;c=g-31>>31;h=m;a=l>>>(m>>>0)&c|k<<i;c=k>>>(m>>>0)&c;g=0;i=l<<i;break}if(!f){n=0;f=0;return (F(n|0),f)|0}b[f>>2]=a|0;b[f+4>>2]=j|c&0;n=0;f=0;return (F(n|0),f)|0}g=h-1|0;if(g&h|0){i=(D(h|0)|0)+33-(D(k|0)|0)|0;p=64-i|0;m=32-i|0;j=m>>31;o=i-32|0;c=o>>31;h=i;a=m-1>>31&k>>>(o>>>0)|(k<<m|l>>>(i>>>0))&c;c=c&k>>>(i>>>0);g=l<<p&j;i=(k<<p|l>>>(o>>>0))&j|l<<m&i-33>>31;break}if(f|0){b[f>>2]=g&l;b[f+4>>2]=0}if((h|0)==1){o=j|c&0;p=a|0|0;return (F(o|0),p)|0}else{p=_c(h|0)|0;o=k>>>(p>>>0)|0;p=k<<32-p|l>>>(p>>>0)|0;return (F(o|0),p)|0}}else{if(g){if(f|0){b[f>>2]=(k>>>0)%(h>>>0);b[f+4>>2]=0}o=0;p=(k>>>0)/(h>>>0)>>>0;return (F(o|0),p)|0}if(!l){if(f|0){b[f>>2]=0;b[f+4>>2]=(k>>>0)%(i>>>0)}o=0;p=(k>>>0)/(i>>>0)>>>0;return (F(o|0),p)|0}g=i-1|0;if(!(g&i)){if(f|0){b[f>>2]=a|0;b[f+4>>2]=g&k|c&0}o=0;p=k>>>((_c(i|0)|0)>>>0);return (F(o|0),p)|0}g=(D(i|0)|0)-(D(k|0)|0)|0;if(g>>>0<=30){c=g+1|0;i=31-g|0;h=c;a=k<<i|l>>>(c>>>0);c=k>>>(c>>>0);g=0;i=l<<i;break}if(!f){o=0;p=0;return (F(o|0),p)|0}b[f>>2]=a|0;b[f+4>>2]=j|c&0;o=0;p=0;return (F(o|0),p)|0}while(0);if(!h){k=i;j=0;i=0}else{m=d|0|0;l=n|e&0;k=Yc(m|0,l|0,-1,-1)|0;d=G()|0;j=i;i=0;do{e=j;j=g>>>31|j<<1;g=i|g<<1;e=a<<1|e>>>31|0;n=a>>>31|c<<1|0;Zc(k|0,d|0,e|0,n|0)|0;p=G()|0;o=p>>31|((p|0)<0?-1:0)<<1;i=o&1;a=Zc(e|0,n|0,o&m|0,(((p|0)<0?-1:0)>>31|((p|0)<0?-1:0)<<1)&l|0)|0;c=G()|0;h=h-1|0}while((h|0)!=0);k=j;j=0}h=0;if(f|0){b[f>>2]=a;b[f+4>>2]=c}o=(g|0)>>>31|(k|h)<<1|(h<<1|g>>>31)&0|j;p=(g<<1|0>>>31)&-2|i;return (F(o|0),p)|0}function ad(a,c,d,e){a=a|0;c=c|0;d=d|0;e=e|0;var f=0,g=0;g=S;S=S+16|0;f=g|0;$c(a,c,d,e,f)|0;S=g;return (F(b[f+4>>2]|0),b[f>>2]|0)|0}function bd(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){F(b>>>c|0);return a>>>c|(b&(1<<c)-1)<<32-c}F(0);return b>>>c-32|0}function cd(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){F(b<<c|(a&(1<<c)-1<<32-c)>>>32-c|0);return a<<c}F(a<<c-32|0);return 0}function dd(a,b){a=+a;b=+b;if(a!=a)return +b;if(b!=b)return +a;return +C(+a,+b)}function ed(a){a=+a;return a>=0.0?+p(a+.5):+A(a-.5)}function fd(c,d,e){c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)>=8192){K(c|0,d|0,e|0)|0;return c|0}h=c|0;g=c+e|0;if((c&3)==(d&3)){while(c&3){if(!e)return h|0;a[c>>0]=a[d>>0]|0;c=c+1|0;d=d+1|0;e=e-1|0}e=g&-4|0;f=e-64|0;while((c|0)<=(f|0)){b[c>>2]=b[d>>2];b[c+4>>2]=b[d+4>>2];b[c+8>>2]=b[d+8>>2];b[c+12>>2]=b[d+12>>2];b[c+16>>2]=b[d+16>>2];b[c+20>>2]=b[d+20>>2];b[c+24>>2]=b[d+24>>2];b[c+28>>2]=b[d+28>>2];b[c+32>>2]=b[d+32>>2];b[c+36>>2]=b[d+36>>2];b[c+40>>2]=b[d+40>>2];b[c+44>>2]=b[d+44>>2];b[c+48>>2]=b[d+48>>2];b[c+52>>2]=b[d+52>>2];b[c+56>>2]=b[d+56>>2];b[c+60>>2]=b[d+60>>2];c=c+64|0;d=d+64|0}while((c|0)<(e|0)){b[c>>2]=b[d>>2];c=c+4|0;d=d+4|0}}else{e=g-4|0;while((c|0)<(e|0)){a[c>>0]=a[d>>0]|0;a[c+1>>0]=a[d+1>>0]|0;a[c+2>>0]=a[d+2>>0]|0;a[c+3>>0]=a[d+3>>0]|0;c=c+4|0;d=d+4|0}}while((c|0)<(g|0)){a[c>>0]=a[d>>0]|0;c=c+1|0;d=d+1|0}return h|0}function gd(c,d,e){c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;h=c+e|0;d=d&255;if((e|0)>=67){while(c&3){a[c>>0]=d;c=c+1|0}f=h&-4|0;i=d|d<<8|d<<16|d<<24;g=f-64|0;while((c|0)<=(g|0)){b[c>>2]=i;b[c+4>>2]=i;b[c+8>>2]=i;b[c+12>>2]=i;b[c+16>>2]=i;b[c+20>>2]=i;b[c+24>>2]=i;b[c+28>>2]=i;b[c+32>>2]=i;b[c+36>>2]=i;b[c+40>>2]=i;b[c+44>>2]=i;b[c+48>>2]=i;b[c+52>>2]=i;b[c+56>>2]=i;b[c+60>>2]=i;c=c+64|0}while((c|0)<(f|0)){b[c>>2]=i;c=c+4|0}}while((c|0)<(h|0)){a[c>>0]=d;c=c+1|0}return h-e|0}function hd(a){a=+a;return a>=0.0?+p(a+.5):+A(a-.5)}function id(a){a=a|0;var c=0,d=0,e=0;e=J()|0;d=b[g>>2]|0;c=d+a|0;if((a|0)>0&(c|0)<(d|0)|(c|0)<0){M(c|0)|0;I(12);return -1}if((c|0)>(e|0))if(!(L(c|0)|0)){I(12);return -1}b[g>>2]=c;return d|0}\n\n// EMSCRIPTEN_END_FUNCS\nreturn{___uremdi3:ad,_bitshift64Lshr:bd,_bitshift64Shl:cd,_calloc:Xc,_cellAreaKm2:ub,_cellAreaM2:vb,_cellAreaRads2:tb,_compact:Gb,_destroyLinkedPolygon:ic,_edgeLengthKm:pb,_edgeLengthM:qb,_emscripten_replace_memory:V,_exactEdgeLengthKm:xb,_exactEdgeLengthM:yb,_exactEdgeLengthRads:wb,_experimentalH3ToLocalIj:nc,_experimentalLocalIjToH3:oc,_free:Wc,_geoToH3:Rb,_getDestinationH3IndexFromUnidirectionalEdge:bc,_getH3IndexesFromUnidirectionalEdge:dc,_getH3UnidirectionalEdge:$b,_getH3UnidirectionalEdgeBoundary:fc,_getH3UnidirectionalEdgesFromHexagon:ec,_getOriginH3IndexFromUnidirectionalEdge:ac,_getPentagonIndexes:Zb,_getRes0Indexes:va,_h3Distance:pc,_h3GetBaseCell:zb,_h3GetFaces:Xb,_h3IndexesAreNeighbors:_b,_h3IsPentagon:Eb,_h3IsResClassIII:Jb,_h3IsValid:Ab,_h3Line:rc,_h3LineSize:qc,_h3SetToLinkedGeo:ka,_h3ToCenterChild:Fb,_h3ToChildren:Db,_h3ToGeo:Ub,_h3ToGeoBoundary:Vb,_h3ToParent:Bb,_h3UnidirectionalEdgeIsValid:cc,_hexAreaKm2:nb,_hexAreaM2:ob,_hexRing:ea,_i64Subtract:Zc,_kRing:$,_kRingDistances:aa,_llvm_minnum_f64:dd,_llvm_round_f64:ed,_malloc:Vc,_maxFaceCount:Wb,_maxH3ToChildrenSize:Cb,_maxKringSize:_,_maxPolyfillSize:fa,_maxUncompactSize:Ib,_memcpy:fd,_memset:gd,_numHexagons:rb,_pentagonIndexCount:Yb,_pointDistKm:jb,_pointDistM:kb,_pointDistRads:ib,_polyfill:ga,_res0IndexCount:ua,_round:hd,_sbrk:id,_sizeOfCoordIJ:Dc,_sizeOfGeoBoundary:zc,_sizeOfGeoCoord:yc,_sizeOfGeoPolygon:Bc,_sizeOfGeofence:Ac,_sizeOfH3Index:xc,_sizeOfLinkedGeoPolygon:Cc,_uncompact:Hb,establishStackSpace:Z,stackAlloc:W,stackRestore:Y,stackSave:X}})\n\n\n// EMSCRIPTEN_END_ASM\n(asmGlobalArg,asmLibraryArg,buffer);var ___uremdi3=Module[\"___uremdi3\"]=asm[\"___uremdi3\"];var _bitshift64Lshr=Module[\"_bitshift64Lshr\"]=asm[\"_bitshift64Lshr\"];var _bitshift64Shl=Module[\"_bitshift64Shl\"]=asm[\"_bitshift64Shl\"];var _calloc=Module[\"_calloc\"]=asm[\"_calloc\"];var _cellAreaKm2=Module[\"_cellAreaKm2\"]=asm[\"_cellAreaKm2\"];var _cellAreaM2=Module[\"_cellAreaM2\"]=asm[\"_cellAreaM2\"];var _cellAreaRads2=Module[\"_cellAreaRads2\"]=asm[\"_cellAreaRads2\"];var _compact=Module[\"_compact\"]=asm[\"_compact\"];var _destroyLinkedPolygon=Module[\"_destroyLinkedPolygon\"]=asm[\"_destroyLinkedPolygon\"];var _edgeLengthKm=Module[\"_edgeLengthKm\"]=asm[\"_edgeLengthKm\"];var _edgeLengthM=Module[\"_edgeLengthM\"]=asm[\"_edgeLengthM\"];var _emscripten_replace_memory=Module[\"_emscripten_replace_memory\"]=asm[\"_emscripten_replace_memory\"];var _exactEdgeLengthKm=Module[\"_exactEdgeLengthKm\"]=asm[\"_exactEdgeLengthKm\"];var _exactEdgeLengthM=Module[\"_exactEdgeLengthM\"]=asm[\"_exactEdgeLengthM\"];var _exactEdgeLengthRads=Module[\"_exactEdgeLengthRads\"]=asm[\"_exactEdgeLengthRads\"];var _experimentalH3ToLocalIj=Module[\"_experimentalH3ToLocalIj\"]=asm[\"_experimentalH3ToLocalIj\"];var _experimentalLocalIjToH3=Module[\"_experimentalLocalIjToH3\"]=asm[\"_experimentalLocalIjToH3\"];var _free=Module[\"_free\"]=asm[\"_free\"];var _geoToH3=Module[\"_geoToH3\"]=asm[\"_geoToH3\"];var _getDestinationH3IndexFromUnidirectionalEdge=Module[\"_getDestinationH3IndexFromUnidirectionalEdge\"]=asm[\"_getDestinationH3IndexFromUnidirectionalEdge\"];var _getH3IndexesFromUnidirectionalEdge=Module[\"_getH3IndexesFromUnidirectionalEdge\"]=asm[\"_getH3IndexesFromUnidirectionalEdge\"];var _getH3UnidirectionalEdge=Module[\"_getH3UnidirectionalEdge\"]=asm[\"_getH3UnidirectionalEdge\"];var _getH3UnidirectionalEdgeBoundary=Module[\"_getH3UnidirectionalEdgeBoundary\"]=asm[\"_getH3UnidirectionalEdgeBoundary\"];var _getH3UnidirectionalEdgesFromHexagon=Module[\"_getH3UnidirectionalEdgesFromHexagon\"]=asm[\"_getH3UnidirectionalEdgesFromHexagon\"];var _getOriginH3IndexFromUnidirectionalEdge=Module[\"_getOriginH3IndexFromUnidirectionalEdge\"]=asm[\"_getOriginH3IndexFromUnidirectionalEdge\"];var _getPentagonIndexes=Module[\"_getPentagonIndexes\"]=asm[\"_getPentagonIndexes\"];var _getRes0Indexes=Module[\"_getRes0Indexes\"]=asm[\"_getRes0Indexes\"];var _h3Distance=Module[\"_h3Distance\"]=asm[\"_h3Distance\"];var _h3GetBaseCell=Module[\"_h3GetBaseCell\"]=asm[\"_h3GetBaseCell\"];var _h3GetFaces=Module[\"_h3GetFaces\"]=asm[\"_h3GetFaces\"];var _h3IndexesAreNeighbors=Module[\"_h3IndexesAreNeighbors\"]=asm[\"_h3IndexesAreNeighbors\"];var _h3IsPentagon=Module[\"_h3IsPentagon\"]=asm[\"_h3IsPentagon\"];var _h3IsResClassIII=Module[\"_h3IsResClassIII\"]=asm[\"_h3IsResClassIII\"];var _h3IsValid=Module[\"_h3IsValid\"]=asm[\"_h3IsValid\"];var _h3Line=Module[\"_h3Line\"]=asm[\"_h3Line\"];var _h3LineSize=Module[\"_h3LineSize\"]=asm[\"_h3LineSize\"];var _h3SetToLinkedGeo=Module[\"_h3SetToLinkedGeo\"]=asm[\"_h3SetToLinkedGeo\"];var _h3ToCenterChild=Module[\"_h3ToCenterChild\"]=asm[\"_h3ToCenterChild\"];var _h3ToChildren=Module[\"_h3ToChildren\"]=asm[\"_h3ToChildren\"];var _h3ToGeo=Module[\"_h3ToGeo\"]=asm[\"_h3ToGeo\"];var _h3ToGeoBoundary=Module[\"_h3ToGeoBoundary\"]=asm[\"_h3ToGeoBoundary\"];var _h3ToParent=Module[\"_h3ToParent\"]=asm[\"_h3ToParent\"];var _h3UnidirectionalEdgeIsValid=Module[\"_h3UnidirectionalEdgeIsValid\"]=asm[\"_h3UnidirectionalEdgeIsValid\"];var _hexAreaKm2=Module[\"_hexAreaKm2\"]=asm[\"_hexAreaKm2\"];var _hexAreaM2=Module[\"_hexAreaM2\"]=asm[\"_hexAreaM2\"];var _hexRing=Module[\"_hexRing\"]=asm[\"_hexRing\"];var _i64Subtract=Module[\"_i64Subtract\"]=asm[\"_i64Subtract\"];var _kRing=Module[\"_kRing\"]=asm[\"_kRing\"];var _kRingDistances=Module[\"_kRingDistances\"]=asm[\"_kRingDistances\"];var _llvm_minnum_f64=Module[\"_llvm_minnum_f64\"]=asm[\"_llvm_minnum_f64\"];var _llvm_round_f64=Module[\"_llvm_round_f64\"]=asm[\"_llvm_round_f64\"];var _malloc=Module[\"_malloc\"]=asm[\"_malloc\"];var _maxFaceCount=Module[\"_maxFaceCount\"]=asm[\"_maxFaceCount\"];var _maxH3ToChildrenSize=Module[\"_maxH3ToChildrenSize\"]=asm[\"_maxH3ToChildrenSize\"];var _maxKringSize=Module[\"_maxKringSize\"]=asm[\"_maxKringSize\"];var _maxPolyfillSize=Module[\"_maxPolyfillSize\"]=asm[\"_maxPolyfillSize\"];var _maxUncompactSize=Module[\"_maxUncompactSize\"]=asm[\"_maxUncompactSize\"];var _memcpy=Module[\"_memcpy\"]=asm[\"_memcpy\"];var _memset=Module[\"_memset\"]=asm[\"_memset\"];var _numHexagons=Module[\"_numHexagons\"]=asm[\"_numHexagons\"];var _pentagonIndexCount=Module[\"_pentagonIndexCount\"]=asm[\"_pentagonIndexCount\"];var _pointDistKm=Module[\"_pointDistKm\"]=asm[\"_pointDistKm\"];var _pointDistM=Module[\"_pointDistM\"]=asm[\"_pointDistM\"];var _pointDistRads=Module[\"_pointDistRads\"]=asm[\"_pointDistRads\"];var _polyfill=Module[\"_polyfill\"]=asm[\"_polyfill\"];var _res0IndexCount=Module[\"_res0IndexCount\"]=asm[\"_res0IndexCount\"];var _round=Module[\"_round\"]=asm[\"_round\"];var _sbrk=Module[\"_sbrk\"]=asm[\"_sbrk\"];var _sizeOfCoordIJ=Module[\"_sizeOfCoordIJ\"]=asm[\"_sizeOfCoordIJ\"];var _sizeOfGeoBoundary=Module[\"_sizeOfGeoBoundary\"]=asm[\"_sizeOfGeoBoundary\"];var _sizeOfGeoCoord=Module[\"_sizeOfGeoCoord\"]=asm[\"_sizeOfGeoCoord\"];var _sizeOfGeoPolygon=Module[\"_sizeOfGeoPolygon\"]=asm[\"_sizeOfGeoPolygon\"];var _sizeOfGeofence=Module[\"_sizeOfGeofence\"]=asm[\"_sizeOfGeofence\"];var _sizeOfH3Index=Module[\"_sizeOfH3Index\"]=asm[\"_sizeOfH3Index\"];var _sizeOfLinkedGeoPolygon=Module[\"_sizeOfLinkedGeoPolygon\"]=asm[\"_sizeOfLinkedGeoPolygon\"];var _uncompact=Module[\"_uncompact\"]=asm[\"_uncompact\"];var establishStackSpace=Module[\"establishStackSpace\"]=asm[\"establishStackSpace\"];var stackAlloc=Module[\"stackAlloc\"]=asm[\"stackAlloc\"];var stackRestore=Module[\"stackRestore\"]=asm[\"stackRestore\"];var stackSave=Module[\"stackSave\"]=asm[\"stackSave\"];Module[\"asm\"]=asm;Module[\"cwrap\"]=cwrap;Module[\"setValue\"]=setValue;Module[\"getValue\"]=getValue;Module[\"getTempRet0\"]=getTempRet0;if(memoryInitializer){if(!isDataURI(memoryInitializer)){memoryInitializer=locateFile(memoryInitializer)}if(ENVIRONMENT_IS_NODE||ENVIRONMENT_IS_SHELL){var data=readBinary(memoryInitializer);HEAPU8.set(data,GLOBAL_BASE)}else{addRunDependency(\"memory initializer\");var applyMemoryInitializer=function(data){if(data.byteLength)data=new Uint8Array(data);HEAPU8.set(data,GLOBAL_BASE);if(Module[\"memoryInitializerRequest\"])delete Module[\"memoryInitializerRequest\"].response;removeRunDependency(\"memory initializer\")};var doBrowserLoad=function(){readAsync(memoryInitializer,applyMemoryInitializer,function(){throw\"could not load memory initializer \"+memoryInitializer})};var memoryInitializerBytes=tryParseAsDataURI(memoryInitializer);if(memoryInitializerBytes){applyMemoryInitializer(memoryInitializerBytes.buffer)}else if(Module[\"memoryInitializerRequest\"]){var useRequest=function(){var request=Module[\"memoryInitializerRequest\"];var response=request.response;if(request.status!==200&&request.status!==0){var data=tryParseAsDataURI(Module[\"memoryInitializerRequestURL\"]);if(data){response=data.buffer}else{console.warn(\"a problem seems to have happened with Module.memoryInitializerRequest, status: \"+request.status+\", retrying \"+memoryInitializer);doBrowserLoad();return}}applyMemoryInitializer(response)};if(Module[\"memoryInitializerRequest\"].response){setTimeout(useRequest,0)}else{Module[\"memoryInitializerRequest\"].addEventListener(\"load\",useRequest)}}else{doBrowserLoad()}}}var calledRun;function ExitStatus(status){this.name=\"ExitStatus\";this.message=\"Program terminated with exit(\"+status+\")\";this.status=status}dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(args){args=args||arguments_;if(runDependencies>0){return}preRun();if(runDependencies>0)return;function doRun(){if(calledRun)return;calledRun=true;if(ABORT)return;initRuntime();preMain();if(Module[\"onRuntimeInitialized\"])Module[\"onRuntimeInitialized\"]();postRun()}if(Module[\"setStatus\"]){Module[\"setStatus\"](\"Running...\");setTimeout(function(){setTimeout(function(){Module[\"setStatus\"](\"\")},1);doRun()},1)}else{doRun()}}Module[\"run\"]=run;function abort(what){if(Module[\"onAbort\"]){Module[\"onAbort\"](what)}what+=\"\";out(what);err(what);ABORT=true;EXITSTATUS=1;throw\"abort(\"+what+\"). Build with -s ASSERTIONS=1 for more info.\"}Module[\"abort\"]=abort;if(Module[\"preInit\"]){if(typeof Module[\"preInit\"]==\"function\")Module[\"preInit\"]=[Module[\"preInit\"]];while(Module[\"preInit\"].length>0){Module[\"preInit\"].pop()()}}noExitRuntime=true;run();\n\n\n\n return libh3\n}\n)(typeof libh3 === 'object' ? libh3 : {});\nexport default libh3;","/*\n * Copyright 2018-2019 Uber Technologies, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Define the C bindings for the h3 library\n\n// Add some aliases to make the function definitions more intelligible\nconst NUMBER = 'number';\nconst BOOLEAN = NUMBER;\nconst H3_LOWER = NUMBER;\nconst H3_UPPER = NUMBER;\nconst RESOLUTION = NUMBER;\nconst POINTER = NUMBER;\n\n// Define the bindings to functions in the C lib. Functions are defined as\n// [name, return type, [arg types]]. You must run `npm run build-emscripten`\n// before new functions added here will be available.\nexport default [\n // The size functions are inserted via build/sizes.h\n ['sizeOfH3Index', NUMBER],\n ['sizeOfGeoCoord', NUMBER],\n ['sizeOfGeoBoundary', NUMBER],\n ['sizeOfGeoPolygon', NUMBER],\n ['sizeOfGeofence', NUMBER],\n ['sizeOfLinkedGeoPolygon', NUMBER],\n ['sizeOfCoordIJ', NUMBER],\n // The remaining functions are defined in the core lib in h3Api.h\n ['h3IsValid', BOOLEAN, [H3_LOWER, H3_UPPER]],\n ['geoToH3', H3_LOWER, [NUMBER, NUMBER, RESOLUTION]],\n ['h3ToGeo', null, [H3_LOWER, H3_UPPER, POINTER]],\n ['h3ToGeoBoundary', null, [H3_LOWER, H3_UPPER, POINTER]],\n ['maxKringSize', NUMBER, [NUMBER]],\n ['kRing', null, [H3_LOWER, H3_UPPER, NUMBER, POINTER]],\n ['kRingDistances', null, [H3_LOWER, H3_UPPER, NUMBER, POINTER, POINTER]],\n ['hexRing', null, [H3_LOWER, H3_UPPER, NUMBER, POINTER]],\n ['maxPolyfillSize', NUMBER, [POINTER, RESOLUTION]],\n ['polyfill', null, [POINTER, RESOLUTION, POINTER]],\n ['h3SetToLinkedGeo', null, [POINTER, NUMBER, POINTER]],\n ['destroyLinkedPolygon', null, [POINTER]],\n ['compact', NUMBER, [POINTER, POINTER, NUMBER]],\n ['uncompact', NUMBER, [POINTER, NUMBER, POINTER, NUMBER, RESOLUTION]],\n ['maxUncompactSize', NUMBER, [POINTER, NUMBER, RESOLUTION]],\n ['h3IsPentagon', BOOLEAN, [H3_LOWER, H3_UPPER]],\n ['h3IsResClassIII', BOOLEAN, [H3_LOWER, H3_UPPER]],\n ['h3GetBaseCell', NUMBER, [H3_LOWER, H3_UPPER]],\n ['maxFaceCount', NUMBER, [H3_LOWER, H3_UPPER]],\n ['h3GetFaces', null, [H3_LOWER, H3_UPPER, POINTER]],\n ['h3ToParent', H3_LOWER, [H3_LOWER, H3_UPPER, RESOLUTION]],\n ['h3ToChildren', null, [H3_LOWER, H3_UPPER, RESOLUTION, POINTER]],\n ['h3ToCenterChild', H3_LOWER, [H3_LOWER, H3_UPPER, RESOLUTION]],\n ['maxH3ToChildrenSize', NUMBER, [H3_LOWER, H3_UPPER, RESOLUTION]],\n ['h3IndexesAreNeighbors', BOOLEAN, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]],\n ['getH3UnidirectionalEdge', H3_LOWER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]],\n ['getOriginH3IndexFromUnidirectionalEdge', H3_LOWER, [H3_LOWER, H3_UPPER]],\n ['getDestinationH3IndexFromUnidirectionalEdge', H3_LOWER, [H3_LOWER, H3_UPPER]],\n ['h3UnidirectionalEdgeIsValid', BOOLEAN, [H3_LOWER, H3_UPPER]],\n ['getH3IndexesFromUnidirectionalEdge', null, [H3_LOWER, H3_UPPER, POINTER]],\n ['getH3UnidirectionalEdgesFromHexagon', null, [H3_LOWER, H3_UPPER, POINTER]],\n ['getH3UnidirectionalEdgeBoundary', null, [H3_LOWER, H3_UPPER, POINTER]],\n ['h3Distance', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]],\n ['h3Line', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER, POINTER]],\n ['h3LineSize', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER]],\n ['experimentalH3ToLocalIj', NUMBER, [H3_LOWER, H3_UPPER, H3_LOWER, H3_UPPER, POINTER]],\n ['experimentalLocalIjToH3', NUMBER, [H3_LOWER, H3_UPPER, POINTER, POINTER]],\n ['hexAreaM2', NUMBER, [RESOLUTION]],\n ['hexAreaKm2', NUMBER, [RESOLUTION]],\n ['edgeLengthM', NUMBER, [RESOLUTION]],\n ['edgeLengthKm', NUMBER, [RESOLUTION]],\n ['pointDistM', NUMBER, [POINTER, POINTER]],\n ['pointDistKm', NUMBER, [POINTER, POINTER]],\n ['pointDistRads', NUMBER, [POINTER, POINTER]],\n ['cellAreaM2', NUMBER, [H3_LOWER, H3_UPPER]],\n ['cellAreaKm2', NUMBER, [H3_LOWER, H3_UPPER]],\n ['cellAreaRads2', NUMBER, [H3_LOWER, H3_UPPER]],\n ['exactEdgeLengthM', NUMBER, [H3_LOWER, H3_UPPER]],\n ['exactEdgeLengthKm', NUMBER, [H3_LOWER, H3_UPPER]],\n ['exactEdgeLengthRads', NUMBER, [H3_LOWER, H3_UPPER]],\n ['numHexagons', NUMBER, [RESOLUTION]],\n ['getRes0Indexes', null, [POINTER]],\n ['res0IndexCount', NUMBER],\n ['getPentagonIndexes', null, [NUMBER, POINTER]],\n ['pentagonIndexCount', NUMBER]\n];\n","/*\n * Copyright 2018-2019 Uber Technologies, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @module h3\n */\n\nimport C from '../out/libh3';\nimport BINDINGS from './bindings';\n\nconst H3 = {};\n\n// Create the bound functions themselves\nBINDINGS.forEach(function bind(def) {\n H3[def[0]] = C.cwrap(...def);\n});\n\n// Alias the hexidecimal base for legibility\nconst BASE_16 = 16;\n\n// ----------------------------------------------------------------------------\n// Byte size imports\n\nconst SZ_INT = 4;\nconst SZ_PTR = 4;\nconst SZ_DBL = 8;\nconst SZ_H3INDEX = H3.sizeOfH3Index();\nconst SZ_GEOCOORD = H3.sizeOfGeoCoord();\nconst SZ_GEOBOUNDARY = H3.sizeOfGeoBoundary();\nconst SZ_GEOPOLYGON = H3.sizeOfGeoPolygon();\nconst SZ_GEOFENCE = H3.sizeOfGeofence();\nconst SZ_LINKED_GEOPOLYGON = H3.sizeOfLinkedGeoPolygon();\nconst SZ_COORDIJ = H3.sizeOfCoordIJ();\n\n// ----------------------------------------------------------------------------\n// Custom types\n\n/**\n * 64-bit hexidecimal string representation of an H3 index\n * @static\n * @typedef {string} H3Index\n */\n\n/**\n * 64-bit hexidecimal string representation of an H3 index,\n * or two 32-bit integers in little endian order in an array.\n * @static\n * @typedef {string | number[]} H3IndexInput\n */\n\n/**\n * Coordinates as an `{i, j}` pair\n * @static\n * @typedef CoordIJ\n * @type {Object}\n * @property {number} i\n * @property {number} j\n */\n\n// ----------------------------------------------------------------------------\n// Unit constants\n\n/**\n * Length/Area units\n * @static\n * @typedef UNITS\n * @type {Object}\n * @property {string} m\n * @property {string} m2\n * @property {string} km\n * @property {string} km2\n * @property {string} rads\n * @property {string} rads2\n */\nexport const UNITS = {\n m: 'm',\n m2: 'm2',\n km: 'km',\n km2: 'km2',\n rads: 'rads',\n rads2: 'rads2'\n};\n\n// ----------------------------------------------------------------------------\n// Utilities and helpers\n\n/**\n * Validate a resolution, throwing an error if invalid\n * @private\n * @param {mixed} res Value to validate\n * @throws {Error} Error if invalid\n */\nfunction validateRes(res) {\n if (typeof res !== 'number' || res < 0 || res > 15 || Math.floor(res) !== res) {\n throw new Error(`Invalid resolution: ${res}`);\n }\n}\n\nconst INVALID_HEXIDECIMAL_CHAR = /[^0-9a-fA-F]/;\n\n/**\n * Convert an H3 index (64-bit hexidecimal string) into a \"split long\" - a pair of 32-bit ints\n * @private\n * @param {H3IndexInput} h3Index H3 index to check\n * @return {number[]} A two-element array with 32 lower bits and 32 upper bits\n */\nfunction h3IndexToSplitLong(h3Index) {\n if (\n Array.isArray(h3Index) &&\n h3Index.length === 2 &&\n Number.isInteger(h3Index[0]) &&\n Number.isInteger(h3Index[1])\n ) {\n return h3Index;\n }\n if (typeof h3Index !== 'string' || INVALID_HEXIDECIMAL_CHAR.test(h3Index)) {\n return [0, 0];\n }\n const upper = parseInt(h3Index.substring(0, h3Index.length - 8), BASE_16);\n const lower = parseInt(h3Index.substring(h3Index.length - 8), BASE_16);\n return [lower, upper];\n}\n\n/**\n * Convert a 32-bit int to a hexdecimal string\n * @private\n * @param {number} num Integer to convert\n * @return {H3Index} Hexidecimal string\n */\nfunction hexFrom32Bit(num) {\n if (num >= 0) {\n return num.toString(BASE_16);\n }\n\n // Handle negative numbers\n num = num & 0x7fffffff;\n let tempStr = zeroPad(8, num.toString(BASE_16));\n const topNum = (parseInt(tempStr[0], BASE_16) + 8).toString(BASE_16);\n tempStr = topNum + tempStr.substring(1);\n return tempStr;\n}\n\n/**\n * Get a H3 index from a split long (pair of 32-bit ints)\n * @private\n * @param {number} lower Lower 32 bits\n * @param {number} upper Upper 32 bits\n * @return {H3Index} H3 index\n */\nfunction splitLongToh3Index(lower, upper) {\n return hexFrom32Bit(upper) + zeroPad(8, hexFrom32Bit(lower));\n}\n\n/**\n * Zero-pad a string to a given length\n * @private\n * @param {number} fullLen Target length\n * @param {string} numStr String to zero-pad\n * @return {string} Zero-padded string\n */\nfunction zeroPad(fullLen, numStr) {\n const numZeroes = fullLen - numStr.length;\n let outStr = '';\n for (let i = 0; i < numZeroes; i++) {\n outStr += '0';\n }\n outStr = outStr + numStr;\n return outStr;\n}\n\n/**\n * Populate a C-appropriate Geofence struct from a polygon array\n * @private\n * @param {Array[]} polygonArray Polygon, as an array of coordinate pairs\n * @param {number} geofence C pointer to a Geofence struct\n * @param {boolean} isGeoJson Whether coordinates are in [lng, lat] order per GeoJSON spec\n * @return {number} C pointer to populated Geofence struct\n */\nfunction polygonArrayToGeofence(polygonArray, geofence, isGeoJson) {\n const numVerts = polygonArray.length;\n const geoCoordArray = C._calloc(numVerts, SZ_GEOCOORD);\n // Support [lng, lat] pairs if GeoJSON is specified\n const latIndex = isGeoJson ? 1 : 0;\n const lngIndex = isGeoJson ? 0 : 1;\n for (let i = 0; i < numVerts * 2; i += 2) {\n C.HEAPF64.set(\n [polygonArray[i / 2][latIndex], polygonArray[i / 2][lngIndex]].map(degsToRads),\n geoCoordArray / SZ_DBL + i\n );\n }\n C.HEAPU32.set([numVerts, geoCoordArray], geofence / SZ_INT);\n return geofence;\n}\n\n/**\n * Create a C-appropriate GeoPolygon struct from an array of polygons\n * @private\n * @param {Array[]} coordinates Array of polygons, each an array of coordinate pairs\n * @param {boolean} isGeoJson Whether coordinates are in [lng, lat] order per GeoJSON spec\n * @return {number} C pointer to populated GeoPolygon struct\n */\nfunction coordinatesToGeoPolygon(coordinates, isGeoJson) {\n // Any loops beyond the first loop are holes\n const numHoles = coordinates.length - 1;\n const geoPolygon = C._calloc(SZ_GEOPOLYGON);\n // Byte positions within the struct\n const geofenceOffset = 0;\n const numHolesOffset = geofenceOffset + SZ_GEOFENCE;\n const holesOffset = numHolesOffset + SZ_INT;\n // geofence is first part of struct\n polygonArrayToGeofence(coordinates[0], geoPolygon + geofenceOffset, isGeoJson);\n let holes;\n if (numHoles > 0) {\n holes = C._calloc(numHoles, SZ_GEOFENCE);\n for (let i = 0; i < numHoles; i++) {\n polygonArrayToGeofence(coordinates[i + 1], holes + SZ_GEOFENCE * i, isGeoJson);\n }\n }\n C.setValue(geoPolygon + numHolesOffset, numHoles, 'i32');\n C.setValue(geoPolygon + holesOffset, holes, 'i32');\n return geoPolygon;\n}\n\n/**\n * Free memory allocated for a GeoPolygon struct. It is an error to access the struct\n * after passing it to this method.\n * @private\n * @return {number} geoPolygon C pointer to populated GeoPolygon struct\n */\nfunction destroyGeoPolygon(geoPolygon) {\n // Byte positions within the struct\n const geofenceOffset = 0;\n const numHolesOffset = geofenceOffset + SZ_GEOFENCE;\n const holesOffset = numHolesOffset + SZ_INT;\n // Free the outer loop\n C._free(C.getValue(geoPolygon + geofenceOffset, 'i8*'));\n // Free the holes, if any\n const numHoles = C.getValue(geoPolygon + numHolesOffset, 'i32');\n for (let i = 0; i < numHoles; i++) {\n C._free(C.getValue(geoPolygon + holesOffset + SZ_GEOFENCE * i, 'i8*'));\n }\n C._free(geoPolygon);\n}\n\n/**\n * Read a long value, returning the lower and upper portions as separate 32-bit integers.\n * Because the upper bits are returned via side effect, the argument to this function is\n * intended to be the invocation that caused the side effect, e.g. readLong(H3.getSomeLong())\n * @private\n * @param {number} invocation Invoked function returning a long value. The actual return\n * value of these functions is a 32-bit integer.\n * @return {number} Long value as a [lower, upper] pair\n */\nfunction readLong(invocation) {\n // Upper 32-bits of the long set via side-effect\n const upper = C.getTempRet0();\n return [invocation, upper];\n}\n\n/**\n * Read an H3 index from a C return value. As with readLong, the argument to this function\n * is intended to be an invocation, e.g. readH3Index(H3.getSomeAddress()), to help ensure that\n * the temp value storing the upper bits of the long is still set.\n * @private\n * @param {number} invocation Invoked function returning a single H3 index\n * @return {H3Index} H3 index, or null if index was invalid\n */\nfunction readH3Index(invocation) {\n const [lower, upper] = readLong(invocation);\n // The lower bits are allowed to be 0s, but if the upper bits are 0\n // this represents an invalid H3 index\n return upper ? splitLongToh3Index(lower, upper) : null;\n}\n\n/**\n * Read an H3 index from a pointer to C memory.\n * @private\n * @param {number} cAddress Pointer to allocated C memory\n * @param {number} offset Offset, in number of H3 indexes, in case we're\n * reading an array\n * @return {H3Index} H3 index, or null if index was invalid\n */\nfunction readH3IndexFromPointer(cAddress, offset = 0) {\n const lower = C.getValue(cAddress + SZ_INT * offset * 2, 'i32');\n const upper = C.getValue(cAddress + SZ_INT * (offset * 2 + 1), 'i32');\n // The lower bits are allowed to be 0s, but if the upper bits are 0\n // this represents an invalid H3 index\n return upper ? splitLongToh3Index(lower, upper) : null;\n}\n\n/**\n * Store an H3 index in C memory. Primarily used as an efficient way to\n * write sets of hexagons.\n * @private\n * @param {H3IndexInput} h3Index H3 index to store\n * @param {number} cAddress Pointer to allocated C memory\n * @param {number} offset Offset, in number of H3 indexes from beginning\n * of the current array\n */\nfunction storeH3Index(h3Index, cAddress, offset) {\n // HEAPU32 is a typed array projection on the index space\n // as unsigned 32-bit integers. This means the index needs\n // to be divided by SZ_INT (4) to access correctly. Also,\n // the H3 index is 64 bits, so we skip by twos as we're writing\n // to 32-bit integers in the proper order.\n C.HEAPU32.set(h3IndexToSplitLong(h3Index), cAddress / SZ_INT + 2 * offset);\n}\n\n/**\n * Read an array of 64-bit H3 indexes from C and convert to a JS array of\n * H3 index strings\n * @private\n * @param {number} cAddress Pointer to C ouput array\n * @param {number} maxCount Max number of hexagons in array. Hexagons with\n * the value 0 will be skipped, so this isn't\n * necessarily the length of the output array.\n * @return {H3Index[]} Array of H3 indexes\n */\nfunction readArrayOfHexagons(cAddress, maxCount) {\n const out = [];\n for (let i = 0; i < maxCount; i++) {\n const h3Index = readH3IndexFromPointer(cAddress, i);\n if (h3Index !== null) {\n out.push(h3Index);\n }\n }\n return out;\n}\n\n/**\n * Store an array of H3 index strings as a C array of 64-bit integers.\n * @private\n * @param {number} cAddress Pointer to C input array\n * @param {H3IndexInput[]} hexagons H3 indexes to pass to the C lib\n */\nfunction storeArrayOfHexagons(cAddress, hexagons) {\n // Assuming the cAddress points to an already appropriately\n // allocated space\n const count = hexagons.length;\n for (let i = 0; i < count; i++) {\n storeH3Index(hexagons[i], cAddress, i);\n }\n}\n\n/**\n * Populate a C-appropriate GeoCoord struct from a [lat, lng] array\n * @private\n * @param {number} lat Coordinate latitude\n * @param {number} lng Coordinate longitude\n * @return {number} C pointer to populated GeoCoord struct\n */\nfunction storeGeoCoord(lat, lng) {\n const geoCoord = C._calloc(1, SZ_GEOCOORD);\n C.HEAPF64.set([lat, lng].map(degsToRads), geoCoord / SZ_DBL);\n return geoCoord;\n}\n\nfunction readSingleCoord(cAddress) {\n return radsToDegs(C.getValue(cAddress, 'double'));\n}\n\n/**\n * Read a GeoCoord from C and return a [lat, lng] pair.\n * @private\n * @param {number} cAddress Pointer to C struct\n * @return {number[]} [lat, lng] pair\n */\nfunction readGeoCoord(cAddress) {\n return [readSingleCoord(cAddress), readSingleCoord(cAddress + SZ_DBL)];\n}\n\n/**\n * Read a GeoCoord from C and return a GeoJSON-style [lng, lat] pair.\n * @private\n * @param {number} cAddress Pointer to C struct\n * @return {number[]} [lng, lat] pair\n */\nfunction readGeoCoordGeoJson(cAddress) {\n return [readSingleCoord(cAddress + SZ_DBL), readSingleCoord(cAddress)];\n}\n\n/**\n * Read the GeoBoundary structure into a list of geo coordinate pairs\n * @private\n * @param {number} geoBoundary C pointer to GeoBoundary struct\n * @param {boolean} geoJsonCoords Whether to provide GeoJSON coordinate order: [lng, lat]\n * @param {boolean} closedLoop Whether to close the loop\n * @return {Array[]} Array of geo coordinate pairs\n */\nfunction readGeoBoundary(geoBoundary, geoJsonCoords, closedLoop) {\n const numVerts = C.getValue(geoBoundary, 'i32');\n // Note that though numVerts is an int, the coordinate doubles have to be\n // aligned to 8 bytes, hence the 8-byte offset here\n const vertsPos = geoBoundary + SZ_DBL;\n const out = [];\n // Support [lng, lat] pairs if GeoJSON is specified\n const readCoord = geoJsonCoords ? readGeoCoordGeoJson : readGeoCoord;\n for (let i = 0; i < numVerts * 2; i += 2) {\n out.push(readCoord(vertsPos + SZ_DBL * i));\n }\n if (closedLoop) {\n // Close loop if GeoJSON is specified\n out.push(out[0]);\n }\n return out;\n}\n\n/**\n * Read the LinkedGeoPolygon structure into a nested array of MultiPolygon coordinates\n * @private\n * @param {number} polygon C pointer to LinkedGeoPolygon struct\n * @param {boolean} formatAsGeoJson Whether to provide GeoJSON output: [lng, lat], closed loops\n * @return {number[][][][]} MultiPolygon-style output.\n */\nfunction readMultiPolygon(polygon, formatAsGeoJson) {\n const output = [];\n const readCoord = formatAsGeoJson ? readGeoCoordGeoJson : readGeoCoord;\n let loops;\n let loop;\n let coords;\n let coord;\n // Loop through the linked structure, building the output\n while (polygon) {\n output.push((loops = []));\n // Follow ->first pointer\n loop = C.getValue(polygon, 'i8*');\n while (loop) {\n loops.push((coords = []));\n // Follow ->first pointer\n coord = C.getValue(loop, 'i8*');\n while (coord) {\n coords.push(readCoord(coord));\n // Follow ->next pointer\n coord = C.getValue(coord + SZ_DBL * 2, 'i8*');\n }\n if (formatAsGeoJson) {\n // Close loop if GeoJSON is requested\n coords.push(coords[0]);\n }\n // Follow ->next pointer\n loop = C.getValue(loop + SZ_PTR * 2, 'i8*');\n }\n // Follow ->next pointer\n polygon = C.getValue(polygon + SZ_PTR * 2, 'i8*');\n }\n return output;\n}\n\n/**\n * Read a CoordIJ from C and return an {i, j} pair.\n * @private\n * @param {number} cAddress Pointer to C struct\n * @return {CoordIJ} {i, j} pair\n */\nfunction readCoordIJ(cAddress) {\n return {\n i: C.getValue(cAddress, 'i32'),\n j: C.getValue(cAddress + SZ_INT, 'i32')\n };\n}\n\n/**\n * Store an {i, j} pair to a C CoordIJ struct.\n * @private\n * @param {number} cAddress Pointer to C struct\n * @return {CoordIJ} {i, j} pair\n */\nfunction storeCoordIJ(cAddress, {i, j}) {\n C.setValue(cAddress, i, 'i32');\n C.setValue(cAddress + SZ_INT, j, 'i32');\n}\n\n/**\n * Read an array of positive integers array from C. Negative\n * values are considered invalid and ignored in output.\n * @private\n * @param {number} cAddress Pointer to C array\n * @param {number} count Length of C array\n * @return {number[]} Javascript integer array\n */\nfunction readArrayOfPositiveIntegers(cAddress, count) {\n const out = [];\n for (let i = 0; i < count; i++) {\n const int = C.getValue(cAddress + SZ_INT * i, 'i32');\n if (int >= 0) {\n out.push(int);\n }\n }\n return out;\n}\n\n// ----------------------------------------------------------------------------\n// Public API functions: Core\n\n/**\n * Whether a given string represents a valid H3 index\n * @static\n * @param {H3IndexInput} h3Index H3 index to check\n * @return {boolean} Whether the index is valid\n */\nexport function h3IsValid(h3Index) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n return Boolean(H3.h3IsValid(lower, upper));\n}\n\n/**\n * Whether the given H3 index is a pentagon\n * @static\n * @param {H3IndexInput} h3Index H3 index to check\n * @return {boolean} isPentagon\n */\nexport function h3IsPentagon(h3Index) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n return Boolean(H3.h3IsPentagon(lower, upper));\n}\n\n/**\n * Whether the given H3 index is in a Class III resolution (rotated versus\n * the icosahedron and subject to shape distortion adding extra points on\n * icosahedron edges, making them not true hexagons).\n * @static\n * @param {H3IndexInput} h3Index H3 index to check\n * @return {boolean} isResClassIII\n */\nexport function h3IsResClassIII(h3Index) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n return Boolean(H3.h3IsResClassIII(lower, upper));\n}\n\n/**\n * Get the number of the base cell for a given H3 index\n * @static\n * @param {H3IndexInput} h3Index H3 index to get the base cell for\n * @return {number} Index of the base cell (0-121)\n */\nexport function h3GetBaseCell(h3Index) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n return H3.h3GetBaseCell(lower, upper);\n}\n\n/**\n * Get the indices of all icosahedron faces intersected by a given H3 index\n * @static\n * @param {H3IndexInput} h3Index H3 index to get faces for\n * @return {number[]} Indices (0-19) of all intersected faces\n */\nexport function h3GetFaces(h3Index) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n const count = H3.maxFaceCount(lower, upper);\n const faces = C._malloc(SZ_INT * count);\n H3.h3GetFaces(lower, upper, faces);\n const out = readArrayOfPositiveIntegers(faces, count);\n C._free(faces);\n return out;\n}\n\n/**\n * Returns the resolution of an H3 index\n * @static\n * @param {H3IndexInput} h3Index H3 index to get resolution\n * @return {number} The number (0-15) resolution, or -1 if invalid\n */\nexport function h3GetResolution(h3Index) {\n if (typeof h3Index !== 'string') {\n return -1;\n }\n return parseInt(h3Index.charAt(1), BASE_16);\n}\n\n/**\n * Get the hexagon containing a lat,lon point\n * @static\n * @param {number} lat Latitude of point\n * @param {number} lng Longtitude of point\n * @param {number} res Resolution of hexagons to return\n * @return {H3Index} H3 index\n */\nexport function geoToH3(lat, lng, res) {\n const latlng = C._malloc(SZ_GEOCOORD);\n // Slightly more efficient way to set the memory\n C.HEAPF64.set([lat, lng].map(degsToRads), latlng / SZ_DBL);\n // Read value as a split long\n const h3Index = readH3Index(H3.geoToH3(latlng, res));\n C._free(latlng);\n return h3Index;\n}\n\n/**\n * Get the lat,lon center of a given hexagon\n * @static\n * @param {H3IndexInput} h3Index H3 index\n * @return {number[]} Point as a [lat, lng] pair\n */\nexport function h3ToGeo(h3Index) {\n const latlng = C._malloc(SZ_GEOCOORD);\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n H3.h3ToGeo(lower, upper, latlng);\n const out = readGeoCoord(latlng);\n C._free(latlng);\n return out;\n}\n\n/**\n * Get the vertices of a given hexagon (or pentagon), as an array of [lat, lng]\n * points. For pentagons and hexagons on the edge of an icosahedron face, this\n * function may return up to 10 vertices.\n * @static\n * @param {H3Index} h3Index H3 index\n * @param {boolean} [formatAsGeoJson] Whether to provide GeoJSON output: [lng, lat], closed loops\n * @return {number[][]} Array of [lat, lng] pairs\n */\nexport function h3ToGeoBoundary(h3Index, formatAsGeoJson) {\n const geoBoundary = C._malloc(SZ_GEOBOUNDARY);\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n H3.h3ToGeoBoundary(lower, upper, geoBoundary);\n const out = readGeoBoundary(geoBoundary, formatAsGeoJson, formatAsGeoJson);\n C._free(geoBoundary);\n return out;\n}\n\n// ----------------------------------------------------------------------------\n// Public API functions: Algorithms\n\n/**\n * Get the parent of the given hexagon at a particular resolution\n * @static\n * @param {H3IndexInput} h3Index H3 index to get parent for\n * @param {number} res Resolution of hexagon to return\n * @return {H3Index} H3 index of parent, or null for invalid input\n */\nexport function h3ToParent(h3Index, res) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n return readH3Index(H3.h3ToParent(lower, upper, res));\n}\n\n/**\n * Get the children/descendents of the given hexagon at a particular resolution\n * @static\n * @param {H3IndexInput} h3Index H3 index to get children for\n * @param {number} res Resolution of hexagons to return\n * @return {H3Index[]} H3 indexes of children, or empty array for invalid input\n */\nexport function h3ToChildren(h3Index, res) {\n // Bad input in this case can potentially result in high computation volume\n // using the current C algorithm. Validate and return an empty array on failure.\n if (!h3IsValid(h3Index)) {\n return [];\n }\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n const maxCount = H3.maxH3ToChildrenSize(lower, upper, res);\n const hexagons = C._calloc(maxCount, SZ_H3INDEX);\n H3.h3ToChildren(lower, upper, res, hexagons);\n const out = readArrayOfHexagons(hexagons, maxCount);\n C._free(hexagons);\n return out;\n}\n\n/**\n * Get the center child of the given hexagon at a particular resolution\n * @static\n * @param {H3IndexInput} h3Index H3 index to get center child for\n * @param {number} res Resolution of hexagon to return\n * @return {H3Index} H3 index of child, or null for invalid input\n */\nexport function h3ToCenterChild(h3Index, res) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n return readH3Index(H3.h3ToCenterChild(lower, upper, res));\n}\n\n/**\n * Get all hexagons in a k-ring around a given center. The order of the hexagons is undefined.\n * @static\n * @param {H3IndexInput} h3Index H3 index of center hexagon\n * @param {number} ringSize Radius of k-ring\n * @return {H3Index[]} H3 indexes for all hexagons in ring\n */\nexport function kRing(h3Index, ringSize) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n const maxCount = H3.maxKringSize(ringSize);\n const hexagons = C._calloc(maxCount, SZ_H3INDEX);\n H3.kRing(lower, upper, ringSize, hexagons);\n const out = readArrayOfHexagons(hexagons, maxCount);\n C._free(hexagons);\n return out;\n}\n\n/**\n * Get all hexagons in a k-ring around a given center, in an array of arrays\n * ordered by distance from the origin. The order of the hexagons within each ring is undefined.\n * @static\n * @param {H3IndexInput} h3Index H3 index of center hexagon\n * @param {number} ringSize Radius of k-ring\n * @return {H3Index[][]} Array of arrays with H3 indexes for all hexagons each ring\n */\nexport function kRingDistances(h3Index, ringSize) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n const maxCount = H3.maxKringSize(ringSize);\n const kRings = C._calloc(maxCount, SZ_H3INDEX);\n const distances = C._calloc(maxCount, SZ_INT);\n H3.kRingDistances(lower, upper, ringSize, kRings, distances);\n // Create an array of empty arrays to hold the output\n const out = [];\n for (let i = 0; i < ringSize + 1; i++) {\n out.push([]);\n }\n // Read the array of hexagons, putting them into the appropriate rings\n for (let i = 0; i < maxCount * 2; i += 2) {\n const hexLower = C.getValue(kRings + SZ_INT * i, 'i32');\n const hexUpper = C.getValue(kRings + SZ_INT * (i + 1), 'i32');\n const index = C.getValue(distances + SZ_INT * (i / 2), 'i32');\n if (hexLower !== 0 || hexUpper !== 0) {\n out[index].push(splitLongToh3Index(hexLower, hexUpper));\n }\n }\n C._free(kRings);\n C._free(distances);\n return out;\n}\n\n/**\n * Get all hexagons in a hollow hexagonal ring centered at origin with sides of a given length.\n * Unlike kRing, this function will throw an error if there is a pentagon anywhere in the ring.\n * @static\n * @param {H3IndexInput} h3Index H3 index of center hexagon\n * @param {number} ringSize Radius of ring\n * @return {H3Index[]} H3 indexes for all hexagons in ring\n * @throws {Error} If the algorithm could not calculate the ring\n */\nexport function hexRing(h3Index, ringSize) {\n const maxCount = ringSize === 0 ? 1 : 6 * ringSize;\n const hexagons = C._calloc(maxCount, SZ_H3INDEX);\n const retVal = H3.hexRing(...h3IndexToSplitLong(h3Index), ringSize, hexagons);\n if (retVal !== 0) {\n C._free(hexagons);\n throw new Error('Failed to get hexRing (encountered a pentagon?)');\n }\n const out = readArrayOfHexagons(hexagons, maxCount);\n C._free(hexagons);\n return out;\n}\n\n/**\n * Get all hexagons with centers contained in a given polygon. The polygon\n * is specified with GeoJson semantics as an array of loops. Each loop is\n * an array of [lat, lng] pairs (or [lng, lat] if isGeoJson is specified).\n * The first loop is the perimeter of the polygon, and subsequent loops are\n * expected to be holes.\n * @static\n * @param {number[][] | number[][][]} coordinates\n * Array of loops, or a single loop\n * @param {number} res Resolution of hexagons to return\n * @param {boolean} [isGeoJson] Whether to expect GeoJson-style [lng, lat]\n * pairs instead of [lat, lng]\n * @return {H3Index[]} H3 indexes for all hexagons in polygon\n */\nexport function polyfill(coordinates, res, isGeoJson) {\n validateRes(res);\n isGeoJson = Boolean(isGeoJson);\n // Guard against empty input\n if (coordinates.length === 0 || coordinates[0].length === 0) {\n return [];\n }\n // Wrap to expected format if a single loop is provided\n if (typeof coordinates[0][0] === 'number') {\n coordinates = [coordinates];\n }\n const geoPolygon = coordinatesToGeoPolygon(coordinates, isGeoJson);\n const arrayLen = H3.maxPolyfillSize(geoPolygon, res);\n const hexagons = C._calloc(arrayLen, SZ_H3INDEX);\n H3.polyfill(geoPolygon, res, hexagons);\n const out = readArrayOfHexagons(hexagons, arrayLen);\n C._free(hexagons);\n destroyGeoPolygon(geoPolygon);\n return out;\n}\n\n/**\n * Get the outlines of a set of H3 hexagons, returned in GeoJSON MultiPolygon\n * format (an array of polygons, each with an array of loops, each an array of\n * coordinates). Coordinates are returned as [lat, lng] pairs unless GeoJSON\n * is requested.\n *\n * It is the responsibility of the caller to ensure that all hexagons in the\n * set have the same resolution and that the set contains no duplicates. Behavior\n * is undefined if duplicates or multiple resolutions are present, and the\n * algorithm may produce unexpected or invalid polygons.\n *\n * @static\n * @param {H3IndexInput[]} h3Indexes H3 indexes to get outlines for\n * @param {boolean} [formatAsGeoJson] Whether to provide GeoJSON output:\n * [lng, lat], closed loops\n * @return {number[][][][]} MultiPolygon-style output.\n */\nexport function h3SetToMultiPolygon(h3Indexes, formatAsGeoJson) {\n // Early exit on empty input\n if (!h3Indexes || !h3Indexes.length) {\n return [];\n }\n // Set up input set\n const indexCount = h3Indexes.length;\n const set = C._calloc(indexCount, SZ_H3INDEX);\n storeArrayOfHexagons(set, h3Indexes);\n // Allocate memory for output linked polygon\n const polygon = C._calloc(SZ_LINKED_GEOPOLYGON);\n // Store a reference to the first polygon - that's the one we need for\n // memory deallocation\n const originalPolygon = polygon;\n H3.h3SetToLinkedGeo(set, indexCount, polygon);\n const multiPolygon = readMultiPolygon(polygon, formatAsGeoJson);\n // Clean up\n H3.destroyLinkedPolygon(originalPolygon);\n C._free(originalPolygon);\n C._free(set);\n return multiPolygon;\n}\n\n/**\n * Compact a set of hexagons of the same resolution into a set of hexagons across\n * multiple levels that represents the same area.\n * @static\n * @param {H3IndexInput[]} h3Set H3 indexes to compact\n * @return {H3Index[]} Compacted H3 indexes\n * @throws {Error} If the input is invalid (e.g. duplicate hexagons)\n */\nexport function compact(h3Set) {\n if (!h3Set || !h3Set.length) {\n return [];\n }\n // Set up input set\n const count = h3Set.length;\n const set = C._calloc(count, SZ_H3INDEX);\n storeArrayOfHexagons(set, h3Set);\n // Allocate memory for compacted hexagons, worst-case is no compaction\n const compactedSet = C._calloc(count, SZ_H3INDEX);\n const retVal = H3.compact(set, compactedSet, count);\n if (retVal !== 0) {\n C._free(set);\n C._free(compactedSet);\n throw new Error('Failed to compact, malformed input data (duplicate hexagons?)');\n }\n const out = readArrayOfHexagons(compactedSet, count);\n C._free(set);\n C._free(compactedSet);\n return out;\n}\n\n/**\n * Uncompact a compacted set of hexagons to hexagons of the same resolution\n * @static\n * @param {H3IndexInput[]} compactedSet H3 indexes to uncompact\n * @param {number} res The resolution to uncompact to\n * @return {H3Index[]} The uncompacted H3 indexes\n * @throws {Error} If the input is invalid (e.g. invalid resolution)\n */\nexport function uncompact(compactedSet, res) {\n validateRes(res);\n if (!compactedSet || !compactedSet.length) {\n return [];\n }\n // Set up input set\n const count = compactedSet.length;\n const set = C._calloc(count, SZ_H3INDEX);\n storeArrayOfHexagons(set, compactedSet);\n // Estimate how many hexagons we need (always overestimates if in error)\n const maxUncompactedNum = H3.maxUncompactSize(set, count, res);\n // Allocate memory for uncompacted hexagons\n const uncompactedSet = C._calloc(maxUncompactedNum, SZ_H3INDEX);\n const retVal = H3.uncompact(set, count, uncompactedSet, maxUncompactedNum, res);\n if (retVal !== 0) {\n C._free(set);\n C._free(uncompactedSet);\n throw new Error('Failed to uncompact (bad resolution?)');\n }\n const out = readArrayOfHexagons(uncompactedSet, maxUncompactedNum);\n C._free(set);\n C._free(uncompactedSet);\n return out;\n}\n\n// ----------------------------------------------------------------------------\n// Public API functions: Unidirectional edges\n\n/**\n * Whether two H3 indexes are neighbors (share an edge)\n * @static\n * @param {H3IndexInput} origin Origin hexagon index\n * @param {H3IndexInput} destination Destination hexagon index\n * @return {boolean} Whether the hexagons share an edge\n */\nexport function h3IndexesAreNeighbors(origin, destination) {\n const [oLower, oUpper] = h3IndexToSplitLong(origin);\n const [dLower, dUpper] = h3IndexToSplitLong(destination);\n return Boolean(H3.h3IndexesAreNeighbors(oLower, oUpper, dLower, dUpper));\n}\n\n/**\n * Get an H3 index representing a unidirectional edge for a given origin and destination\n * @static\n * @param {H3IndexInput} origin Origin hexagon index\n * @param {H3IndexInput} destination Destination hexagon index\n * @return {H3Index} H3 index of the edge, or null if no edge is shared\n */\nexport function getH3UnidirectionalEdge(origin, destination) {\n const [oLower, oUpper] = h3IndexToSplitLong(origin);\n const [dLower, dUpper] = h3IndexToSplitLong(destination);\n return readH3Index(H3.getH3UnidirectionalEdge(oLower, oUpper, dLower, dUpper));\n}\n\n/**\n * Get the origin hexagon from an H3 index representing a unidirectional edge\n * @static\n * @param {H3IndexInput} edgeIndex H3 index of the edge\n * @return {H3Index} H3 index of the edge origin\n */\nexport function getOriginH3IndexFromUnidirectionalEdge(edgeIndex) {\n const [lower, upper] = h3IndexToSplitLong(edgeIndex);\n return readH3Index(H3.getOriginH3IndexFromUnidirectionalEdge(lower, upper));\n}\n\n/**\n * Get the destination hexagon from an H3 index representing a unidirectional edge\n * @static\n * @param {H3IndexInput} edgeIndex H3 index of the edge\n * @return {H3Index} H3 index of the edge destination\n */\nexport function getDestinationH3IndexFromUnidirectionalEdge(edgeIndex) {\n const [lower, upper] = h3IndexToSplitLong(edgeIndex);\n return readH3Index(H3.getDestinationH3IndexFromUnidirectionalEdge(lower, upper));\n}\n\n/**\n * Whether the input is a valid unidirectional edge\n * @static\n * @param {H3IndexInput} edgeIndex H3 index of the edge\n * @return {boolean} Whether the index is valid\n */\nexport function h3UnidirectionalEdgeIsValid(edgeIndex) {\n const [lower, upper] = h3IndexToSplitLong(edgeIndex);\n return Boolean(H3.h3UnidirectionalEdgeIsValid(lower, upper));\n}\n\n/**\n * Get the [origin, destination] pair represented by a unidirectional edge\n * @static\n * @param {H3IndexInput} edgeIndex H3 index of the edge\n * @return {H3Index[]} [origin, destination] pair as H3 indexes\n */\nexport function getH3IndexesFromUnidirectionalEdge(edgeIndex) {\n const [lower, upper] = h3IndexToSplitLong(edgeIndex);\n const count = 2;\n const hexagons = C._calloc(count, SZ_H3INDEX);\n H3.getH3IndexesFromUnidirectionalEdge(lower, upper, hexagons);\n const out = readArrayOfHexagons(hexagons, count);\n C._free(hexagons);\n return out;\n}\n\n/**\n * Get all of the unidirectional edges with the given H3 index as the origin (i.e. an edge to\n * every neighbor)\n * @static\n * @param {H3IndexInput} h3Index H3 index of the origin hexagon\n * @return {H3Index[]} List of unidirectional edges\n */\nexport function getH3UnidirectionalEdgesFromHexagon(h3Index) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n const count = 6;\n const edges = C._calloc(count, SZ_H3INDEX);\n H3.getH3UnidirectionalEdgesFromHexagon(lower, upper, edges);\n const out = readArrayOfHexagons(edges, count);\n C._free(edges);\n return out;\n}\n\n/**\n * Get the vertices of a given edge as an array of [lat, lng] points. Note that for edges that\n * cross the edge of an icosahedron face, this may return 3 coordinates.\n * @static\n * @param {H3IndexInput} edgeIndex H3 index of the edge\n * @param {boolean} [formatAsGeoJson] Whether to provide GeoJSON output: [lng, lat]\n * @return {number[][]} Array of geo coordinate pairs\n */\nexport function getH3UnidirectionalEdgeBoundary(edgeIndex, formatAsGeoJson) {\n const geoBoundary = C._malloc(SZ_GEOBOUNDARY);\n const [lower, upper] = h3IndexToSplitLong(edgeIndex);\n H3.getH3UnidirectionalEdgeBoundary(lower, upper, geoBoundary);\n const out = readGeoBoundary(geoBoundary, formatAsGeoJson);\n C._free(geoBoundary);\n return out;\n}\n\n/**\n * Get the grid distance between two hex indexes. This function may fail\n * to find the distance between two indexes if they are very far apart or\n * on opposite sides of a pentagon.\n * @static\n * @param {H3IndexInput} origin Origin hexagon index\n * @param {H3IndexInput} destination Destination hexagon index\n * @return {number} Distance between hexagons, or a negative\n * number if the distance could not be computed\n */\nexport function h3Distance(origin, destination) {\n const [oLower, oUpper] = h3IndexToSplitLong(origin);\n const [dLower, dUpper] = h3IndexToSplitLong(destination);\n return H3.h3Distance(oLower, oUpper, dLower, dUpper);\n}\n\n/**\n * Given two H3 indexes, return the line of indexes between them (inclusive).\n *\n * This function may fail to find the line between two indexes, for\n * example if they are very far apart. It may also fail when finding\n * distances for indexes on opposite sides of a pentagon.\n *\n * Notes:\n *\n * - The specific output of this function should not be considered stable\n * across library versions. The only guarantees the library provides are\n * that the line length will be `h3Distance(start, end) + 1` and that\n * every index in the line will be a neighbor of the preceding index.\n * - Lines are drawn in grid space, and may not correspond exactly to either\n * Cartesian lines or great arcs.\n *\n * @static\n * @param {H3IndexInput} origin Origin hexagon index\n * @param {H3IndexInput} destination Destination hexagon index\n * @return {H3Index[]} H3 indexes connecting origin and destination\n * @throws {Error} If the line cannot be calculated\n */\nexport function h3Line(origin, destination) {\n const [oLower, oUpper] = h3IndexToSplitLong(origin);\n const [dLower, dUpper] = h3IndexToSplitLong(destination);\n const count = H3.h3LineSize(oLower, oUpper, dLower, dUpper);\n if (count < 0) {\n // We can't get the specific error code here - may be any of\n // the errors possible in experimentalH3ToLocalIj\n throw new Error('Line cannot be calculated');\n }\n const hexagons = C._calloc(count, SZ_H3INDEX);\n H3.h3Line(oLower, oUpper, dLower, dUpper, hexagons);\n const out = readArrayOfHexagons(hexagons, count);\n C._free(hexagons);\n return out;\n}\n\n/**\n * Produces IJ coordinates for an H3 index anchored by an origin.\n *\n * - The coordinate space used by this function may have deleted\n * regions or warping due to pentagonal distortion.\n * - Coordinates are only comparable if they come from the same\n * origin index.\n * - Failure may occur if the index is too far away from the origin\n * or if the index is on the other side of a pentagon.\n * - This function is experimental, and its output is not guaranteed\n * to be compatible across different versions of H3.\n * @static\n * @param {H3IndexInput} origin Origin H3 index\n * @param {H3IndexInput} destination H3 index for which to find relative coordinates\n * @return {CoordIJ} Coordinates as an `{i, j}` pair\n * @throws {Error} If the IJ coordinates cannot be calculated\n */\nexport function experimentalH3ToLocalIj(origin, destination) {\n const ij = C._malloc(SZ_COORDIJ);\n const retVal = H3.experimentalH3ToLocalIj(\n ...h3IndexToSplitLong(origin),\n ...h3IndexToSplitLong(destination),\n ij\n );\n const coords = readCoordIJ(ij);\n C._free(ij);\n // Return the pair, or throw if an error code was returned.\n // Switch statement and error codes cribbed from h3-java's implementation.\n switch (retVal) {\n case 0:\n return coords;\n case 1:\n throw new Error('Incompatible origin and index.');\n case 2:\n default:\n throw new Error(\n 'Local IJ coordinates undefined for this origin and index pair. ' +\n 'The index may be too far from the origin.'\n );\n case 3:\n case 4:\n case 5:\n throw new Error('Encountered possible pentagon distortion');\n }\n}\n\n/**\n * Produces an H3 index for IJ coordinates anchored by an origin.\n *\n * - The coordinate space used by this function may have deleted\n * regions or warping due to pentagonal distortion.\n * - Coordinates are only comparable if they come from the same\n * origin index.\n * - Failure may occur if the index is too far away from the origin\n * or if the index is on the other side of a pentagon.\n * - This function is experimental, and its output is not guaranteed\n * to be compatible across different versions of H3.\n * @static\n * @param {H3IndexInput} origin Origin H3 index\n * @param {CoordIJ} coords Coordinates as an `{i, j}` pair\n * @return {H3Index} H3 index at the relative coordinates\n * @throws {Error} If the H3 index cannot be calculated\n */\nexport function experimentalLocalIjToH3(origin, coords) {\n // Validate input coords\n if (!coords || typeof coords.i !== 'number' || typeof coords.j !== 'number') {\n throw new Error('Coordinates must be provided as an {i, j} object');\n }\n // Allocate memory for the CoordIJ struct and an H3 index to hold the return value\n const ij = C._malloc(SZ_COORDIJ);\n const out = C._malloc(SZ_H3INDEX);\n storeCoordIJ(ij, coords);\n const retVal = H3.experimentalLocalIjToH3(...h3IndexToSplitLong(origin), ij, out);\n const h3Index = readH3IndexFromPointer(out);\n C._free(ij);\n C._free(out);\n if (retVal !== 0) {\n throw new Error(\n 'Index not defined for this origin and IJ coordinates pair. ' +\n 'IJ coordinates may be too far from origin, or ' +\n 'a pentagon distortion was encountered.'\n );\n }\n return h3Index;\n}\n\n// ----------------------------------------------------------------------------\n// Public API functions: Distance/area utilities\n\n/**\n * Great circle distance between two geo points. This is not specific to H3,\n * but is implemented in the library and provided here as a convenience.\n * @static\n * @param {number[]} latlng1 Origin coordinate as [lat, lng]\n * @param {number[]} latlng2 Destination coordinate as [lat, lng]\n * @param {string} unit Distance unit (either UNITS.m or UNITS.km)\n * @return {number} Great circle distance\n * @throws {Error} If the unit is invalid\n */\nexport function pointDist(latlng1, latlng2, unit) {\n const coord1 = storeGeoCoord(latlng1[0], latlng1[1]);\n const coord2 = storeGeoCoord(latlng2[0], latlng2[1]);\n let result;\n switch (unit) {\n case UNITS.m:\n result = H3.pointDistM(coord1, coord2);\n break;\n case UNITS.km:\n result = H3.pointDistKm(coord1, coord2);\n break;\n case UNITS.rads:\n result = H3.pointDistRads(coord1, coord2);\n break;\n default:\n result = null;\n }\n C._free(coord1);\n C._free(coord2);\n if (result === null) {\n throw new Error(`Unknown unit: ${unit}`);\n }\n return result;\n}\n\n/**\n * Exact area of a given cell\n * @static\n * @param {H3Index} h3Index H3 index of the hexagon to measure\n * @param {string} unit Distance unit (either UNITS.m2 or UNITS.km2)\n * @return {number} Cell area\n * @throws {Error} If the unit is invalid\n */\nexport function cellArea(h3Index, unit) {\n const [lower, upper] = h3IndexToSplitLong(h3Index);\n switch (unit) {\n case UNITS.m2:\n return H3.cellAreaM2(lower, upper);\n case UNITS.km2:\n return H3.cellAreaKm2(lower, upper);\n case UNITS.rads2:\n return H3.cellAreaRads2(lower, upper);\n default:\n throw new Error(`Unknown unit: ${unit}`);\n }\n}\n\n/**\n * Exact length of a given unidirectional edge\n * @static\n * @param {H3Index} edge H3 index of the edge to measure\n * @param {string} unit Distance unit (either UNITS.m, UNITS.km, or UNITS.rads)\n * @return {number} Cell area\n * @throws {Error} If the unit is invalid\n */\nexport function exactEdgeLength(edge, unit) {\n const [lower, upper] = h3IndexToSplitLong(edge);\n switch (unit) {\n case UNITS.m:\n return H3.exactEdgeLengthM(lower, upper);\n case UNITS.km:\n return H3.exactEdgeLengthKm(lower, upper);\n case UNITS.rads:\n return H3.exactEdgeLengthRads(lower, upper);\n default:\n throw new Error(`Unknown unit: ${unit}`);\n }\n}\n\n/**\n * Average hexagon area at a given resolution\n * @static\n * @param {number} res Hexagon resolution\n * @param {string} unit Area unit (either UNITS.m2, UNITS.km2, or UNITS.rads2)\n * @return {number} Average area\n * @throws {Error} If the unit is invalid\n */\nexport function hexArea(res, unit) {\n validateRes(res);\n switch (unit) {\n case UNITS.m2:\n return H3.hexAreaM2(res);\n case UNITS.km2:\n return H3.hexAreaKm2(res);\n default:\n throw new Error(`Unknown unit: ${unit}`);\n }\n}\n\n/**\n * Average hexagon edge length at a given resolution\n * @static\n * @param {number} res Hexagon resolution\n * @param {string} unit Distance unit (either UNITS.m, UNITS.km, or UNITS.rads)\n * @return {number} Average edge length\n * @throws {Error} If the unit is invalid\n */\nexport function edgeLength(res, unit) {\n validateRes(res);\n switch (unit) {\n case UNITS.m:\n return H3.edgeLengthM(res);\n case UNITS.km:\n return H3.edgeLengthKm(res);\n default:\n throw new Error(`Unknown unit: ${unit}`);\n }\n}\n\n// ----------------------------------------------------------------------------\n// Public informational utilities\n\n/**\n * The total count of hexagons in the world at a given resolution. Note that above\n * resolution 8 the exact count cannot be represented in a JavaScript 32-bit number,\n * so consumers should use caution when applying further operations to the output.\n * @static\n * @param {number} res Hexagon resolution\n * @return {number} Count\n */\nexport function numHexagons(res) {\n validateRes(res);\n // Get number as a long value\n const [lower, upper] = readLong(H3.numHexagons(res));\n // If we're using <= 32 bits we can use normal JS numbers\n if (!upper) {\n return lower;\n }\n // Above 32 bit, make a JS number that's correct in order of magnitude\n return upper * Math.pow(2, 32) + lower;\n}\n\n/**\n * Get all H3 indexes at resolution 0. As every index at every resolution > 0 is\n * the descendant of a res 0 index, this can be used with h3ToChildren to iterate\n * over H3 indexes at any resolution.\n * @static\n * @return {H3Index[]} All H3 indexes at res 0\n */\nexport function getRes0Indexes() {\n const count = H3.res0IndexCount();\n const hexagons = C._malloc(SZ_H3INDEX * count);\n H3.getRes0Indexes(hexagons);\n const out = readArrayOfHexagons(hexagons, count);\n C._free(hexagons);\n return out;\n}\n\n/**\n * Get the twelve pentagon indexes at a given resolution.\n * @static\n * @param {number} res Hexagon resolution\n * @return {H3Index[]} All H3 pentagon indexes at res\n */\nexport function getPentagonIndexes(res) {\n validateRes(res);\n const count = H3.pentagonIndexCount();\n const hexagons = C._malloc(SZ_H3INDEX * count);\n H3.getPentagonIndexes(res, hexagons);\n const out = readArrayOfHexagons(hexagons, count);\n C._free(hexagons);\n return out;\n}\n\n/**\n * Convert degrees to radians\n * @static\n * @param {number} deg Value in degrees\n * @return {number} Value in radians\n */\nexport function degsToRads(deg) {\n return (deg * Math.PI) / 180;\n}\n\n/**\n * Convert radians to degrees\n * @static\n * @param {number} rad Value in radians\n * @return {number} Value in degrees\n */\nexport function radsToDegs(rad) {\n return (rad * 180) / Math.PI;\n}\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","import GL from '@luma.gl/constants';\nimport {isWebGL2, assertWebGL2Context, withParameters, log} from '@luma.gl/gltools';\nimport {global} from 'probe.gl/env';\n\nimport Resource from './resource';\nimport Buffer from './buffer';\nimport {\n TEXTURE_FORMATS,\n DATA_FORMAT_CHANNELS,\n TYPE_SIZES,\n isFormatSupported,\n isLinearFilteringSupported\n} from './texture-formats';\nimport {assert} from '../utils/assert';\nimport {uid, isPowerOfTwo} from '../utils/utils';\n\n// Supported min filters for NPOT texture.\nconst NPOT_MIN_FILTERS = [GL.LINEAR, GL.NEAREST];\n\n// Polyfill\n// Note (Tarek): Do we really need to support this API?\nconst WebGLBuffer = global.WebGLBuffer || function WebGLBuffer() {};\n\nexport default class Texture extends Resource {\n static isSupported(gl, opts = {}) {\n const {format, linearFiltering} = opts;\n let supported = true;\n if (format) {\n supported = supported && isFormatSupported(gl, format);\n supported = supported && (!linearFiltering || isLinearFilteringSupported(gl, format));\n }\n return supported;\n }\n\n // target cannot be modified by bind:\n // textures are special because when you first bind them to a target,\n // they get special information. When you first bind a texture as a\n // GL_TEXTURE_2D, you are actually setting special state in the texture.\n // You are saying that this texture is a 2D texture.\n // And it will always be a 2D texture; this state cannot be changed ever.\n // If you have a texture that was first bound as a GL_TEXTURE_2D,\n // you must always bind it as a GL_TEXTURE_2D;\n // attempting to bind it as GL_TEXTURE_1D will give rise to an error\n // (while run-time).\n constructor(gl, props) {\n const {\n id = uid('texture'),\n handle,\n target\n // , magFilter, minFilter, wrapS, wrapT\n } = props;\n\n super(gl, {id, handle});\n\n this.target = target;\n this.textureUnit = undefined;\n\n // Program.draw() checks the loaded flag of all textures to avoid\n // Textures that are still loading from promises\n // Set to true as soon as texture has been initialized with valid data\n this.loaded = false;\n\n this.width = undefined;\n this.height = undefined;\n this.depth = undefined;\n this.format = undefined;\n this.type = undefined;\n this.dataFormat = undefined;\n this.border = undefined;\n this.textureUnit = undefined;\n this.mipmaps = undefined;\n }\n\n toString() {\n return `Texture(${this.id},${this.width}x${this.height})`;\n }\n\n /* eslint-disable max-len, max-statements */\n initialize(props = {}) {\n let data = props.data;\n\n if (data instanceof Promise) {\n data.then(resolvedImageData =>\n this.initialize(\n Object.assign({}, props, {\n pixels: resolvedImageData,\n data: resolvedImageData\n })\n )\n );\n return this;\n }\n const isVideo = typeof HTMLVideoElement !== 'undefined' && data instanceof HTMLVideoElement;\n // @ts-ignore\n if (isVideo && data.readyState < HTMLVideoElement.HAVE_METADATA) {\n this._video = null; // Declare member before the object is sealed\n data.addEventListener('loadeddata', () => this.initialize(props));\n return this;\n }\n\n const {\n pixels = null,\n format = GL.RGBA,\n border = 0,\n recreate = false,\n parameters = {},\n pixelStore = {},\n textureUnit = undefined\n } = props;\n\n // pixels variable is for API compatibility purpose\n if (!data) {\n // TODO - This looks backwards? Commenting out for now until we decide\n // which prop to use\n // log.deprecated('data', 'pixels')();\n data = pixels;\n }\n\n let {width, height, dataFormat, type, compressed = false, mipmaps = true} = props;\n const {depth = 0} = props;\n\n // Deduce width and height\n ({width, height, compressed, dataFormat, type} = this._deduceParameters({\n format,\n type,\n dataFormat,\n compressed,\n data,\n width,\n height\n }));\n\n // Store opts for accessors\n this.width = width;\n this.height = height;\n this.depth = depth;\n this.format = format;\n this.type = type;\n this.dataFormat = dataFormat;\n this.border = border;\n this.textureUnit = textureUnit;\n\n if (Number.isFinite(this.textureUnit)) {\n this.gl.activeTexture(GL.TEXTURE0 + this.textureUnit);\n this.gl.bindTexture(this.target, this.handle);\n }\n\n if (mipmaps && this._isNPOT()) {\n log.warn(`texture: ${this} is Non-Power-Of-Two, disabling mipmaping`)();\n mipmaps = false;\n\n this._updateForNPOT(parameters);\n }\n\n this.mipmaps = mipmaps;\n\n this.setImageData({\n data,\n width,\n height,\n depth,\n format,\n type,\n dataFormat,\n border,\n mipmaps,\n parameters: pixelStore,\n compressed\n });\n\n if (mipmaps) {\n this.generateMipmap();\n }\n\n // Set texture sampler parameters\n this.setParameters(parameters);\n\n // TODO - Store data to enable auto recreate on context loss\n if (recreate) {\n this.data = data;\n }\n if (isVideo) {\n this._video = {\n video: data,\n parameters,\n // @ts-ignore\n lastTime: data.readyState >= HTMLVideoElement.HAVE_CURRENT_DATA ? data.currentTime : -1\n };\n }\n\n return this;\n }\n\n update() {\n if (this._video) {\n const {video, parameters, lastTime} = this._video;\n // @ts-ignore\n if (lastTime === video.currentTime || video.readyState < HTMLVideoElement.HAVE_CURRENT_DATA) {\n return;\n }\n this.setSubImageData({\n data: video,\n parameters\n });\n if (this.mipmaps) {\n this.generateMipmap();\n }\n this._video.lastTime = video.currentTime;\n }\n }\n\n // If size has changed, reinitializes with current format\n // note clears image and mipmaps\n resize({height, width, mipmaps = false}) {\n if (width !== this.width || height !== this.height) {\n return this.initialize({\n width,\n height,\n format: this.format,\n type: this.type,\n dataFormat: this.dataFormat,\n border: this.border,\n mipmaps\n });\n }\n return this;\n }\n\n // Call to regenerate mipmaps after modifying texture(s)\n generateMipmap(params = {}) {\n if (this._isNPOT()) {\n log.warn(`texture: ${this} is Non-Power-Of-Two, disabling mipmaping`)();\n return this;\n }\n\n this.mipmaps = true;\n\n this.gl.bindTexture(this.target, this.handle);\n withParameters(this.gl, params, () => {\n this.gl.generateMipmap(this.target);\n });\n this.gl.bindTexture(this.target, null);\n return this;\n }\n\n /*\n * Allocates storage\n * @param {*} pixels -\n * null - create empty texture of specified format\n * Typed array - init from image data in typed array\n * Buffer|WebGLBuffer - (WEBGL2) init from image data in WebGLBuffer\n * HTMLImageElement|Image - Inits with content of image. Auto width/height\n * HTMLCanvasElement - Inits with contents of canvas. Auto width/height\n * HTMLVideoElement - Creates video texture. Auto width/height\n *\n * @param {GLint} width -\n * @param {GLint} height -\n * @param {GLint} mipMapLevel -\n * @param {GLenum} format - format of image data.\n * @param {GLenum} type\n * - format of array (autodetect from type) or\n * - (WEBGL2) format of buffer\n * @param {Number} offset - (WEBGL2) offset from start of buffer\n * @param {GLint} border - must be 0.\n * @parameters - temporary settings to be applied, can be used to supply pixel store settings.\n */\n /* eslint-disable max-len, max-statements, complexity */\n setImageData(options) {\n this._trackDeallocatedMemory('Texture');\n\n const {\n target = this.target,\n pixels = null,\n level = 0,\n format = this.format,\n border = this.border,\n offset = 0,\n parameters = {}\n } = options;\n\n let {\n data = null,\n type = this.type,\n width = this.width,\n height = this.height,\n dataFormat = this.dataFormat,\n compressed = false\n } = options;\n\n // pixels variable is for API compatibility purpose\n if (!data) {\n data = pixels;\n }\n\n ({type, dataFormat, compressed, width, height} = this._deduceParameters({\n format,\n type,\n dataFormat,\n compressed,\n data,\n width,\n height\n }));\n\n const {gl} = this;\n gl.bindTexture(this.target, this.handle);\n\n let dataType = null;\n ({data, dataType} = this._getDataType({data, compressed}));\n\n let gl2;\n\n withParameters(this.gl, parameters, () => {\n switch (dataType) {\n case 'null':\n gl.texImage2D(target, level, format, width, height, border, dataFormat, type, data);\n break;\n case 'typed-array':\n // Looks like this assert is not necessary, as offset is ignored under WebGL1\n // assert((offset === 0 || isWebGL2(gl)), 'offset supported in WebGL2 only');\n // @ts-ignore\n gl.texImage2D(\n target,\n level,\n format,\n width,\n height,\n border,\n dataFormat,\n type,\n data,\n // @ts-ignore\n offset\n );\n break;\n case 'buffer':\n // WebGL2 enables creating textures directly from a WebGL buffer\n gl2 = assertWebGL2Context(gl);\n gl2.bindBuffer(GL.PIXEL_UNPACK_BUFFER, data.handle || data);\n gl2.texImage2D(target, level, format, width, height, border, dataFormat, type, offset);\n gl2.bindBuffer(GL.PIXEL_UNPACK_BUFFER, null);\n break;\n case 'browser-object':\n if (isWebGL2(gl)) {\n gl.texImage2D(target, level, format, width, height, border, dataFormat, type, data);\n } else {\n gl.texImage2D(target, level, format, dataFormat, type, data);\n }\n break;\n case 'compressed':\n for (const [levelIndex, levelData] of data.entries()) {\n gl.compressedTexImage2D(\n target,\n levelIndex,\n levelData.format,\n levelData.width,\n levelData.height,\n border,\n levelData.data\n );\n }\n\n break;\n default:\n assert(false, 'Unknown image data type');\n }\n });\n\n if (data && data.byteLength) {\n this._trackAllocatedMemory(data.byteLength, 'Texture');\n } else {\n // NOTE(Tarek): Default to RGBA bytes\n const channels = DATA_FORMAT_CHANNELS[this.dataFormat] || 4;\n const channelSize = TYPE_SIZES[this.type] || 1;\n\n this._trackAllocatedMemory(this.width * this.height * channels * channelSize, 'Texture');\n }\n\n this.loaded = true;\n\n return this;\n }\n /* eslint-enable max-len, max-statements, complexity */\n\n /**\n * Redefines an area of an existing texture\n * Note: does not allocate storage\n */\n /*\n * Redefines an area of an existing texture\n * @param {*} pixels, data -\n * null - create empty texture of specified format\n * Typed array - init from image data in typed array\n * Buffer|WebGLBuffer - (WEBGL2) init from image data in WebGLBuffer\n * HTMLImageElement|Image - Inits with content of image. Auto width/height\n * HTMLCanvasElement - Inits with contents of canvas. Auto width/height\n * HTMLVideoElement - Creates video texture. Auto width/height\n *\n * @param {GLint} x - xOffset from where texture to be updated\n * @param {GLint} y - yOffset from where texture to be updated\n * @param {GLint} width - width of the sub image to be updated\n * @param {GLint} height - height of the sub image to be updated\n * @param {GLint} level - mip level to be updated\n * @param {GLenum} format - internal format of image data.\n * @param {GLenum} type\n * - format of array (autodetect from type) or\n * - (WEBGL2) format of buffer or ArrayBufferView\n * @param {GLenum} dataFormat - format of image data.\n * @param {Number} offset - (WEBGL2) offset from start of buffer\n * @param {GLint} border - must be 0.\n * @parameters - temporary settings to be applied, can be used to supply pixel store settings.\n */\n setSubImageData({\n target = this.target,\n pixels = null,\n data = null,\n x = 0,\n y = 0,\n width = this.width,\n height = this.height,\n level = 0,\n format = this.format,\n type = this.type,\n dataFormat = this.dataFormat,\n compressed = false,\n offset = 0,\n border = this.border,\n parameters = {}\n }) {\n ({type, dataFormat, compressed, width, height} = this._deduceParameters({\n format,\n type,\n dataFormat,\n compressed,\n data,\n width,\n height\n }));\n\n assert(this.depth === 0, 'texSubImage not supported for 3D textures');\n\n // pixels variable is for API compatibility purpose\n if (!data) {\n data = pixels;\n }\n\n // Support ndarrays\n if (data && data.data) {\n const ndarray = data;\n data = ndarray.data;\n width = ndarray.shape[0];\n height = ndarray.shape[1];\n }\n\n // Support buffers\n if (data instanceof Buffer) {\n data = data.handle;\n }\n\n this.gl.bindTexture(this.target, this.handle);\n\n withParameters(this.gl, parameters, () => {\n // TODO - x,y parameters\n if (compressed) {\n this.gl.compressedTexSubImage2D(target, level, x, y, width, height, format, data);\n } else if (data === null) {\n this.gl.texSubImage2D(target, level, x, y, width, height, dataFormat, type, null);\n } else if (ArrayBuffer.isView(data)) {\n // const gl2 = assertWebGL2Context(this.gl);\n // @ts-ignore last offset parameter is ignored under WebGL1\n this.gl.texSubImage2D(target, level, x, y, width, height, dataFormat, type, data, offset);\n } else if (data instanceof WebGLBuffer) {\n // WebGL2 allows us to create texture directly from a WebGL buffer\n const gl2 = assertWebGL2Context(this.gl);\n // This texImage2D signature uses currently bound GL.PIXEL_UNPACK_BUFFER\n gl2.bindBuffer(GL.PIXEL_UNPACK_BUFFER, data);\n gl2.texSubImage2D(target, level, x, y, width, height, dataFormat, type, offset);\n gl2.bindBuffer(GL.PIXEL_UNPACK_BUFFER, null);\n } else if (isWebGL2(this.gl)) {\n // Assume data is a browser supported object (ImageData, Canvas, ...)\n const gl2 = assertWebGL2Context(this.gl);\n gl2.texSubImage2D(target, level, x, y, width, height, dataFormat, type, data);\n } else {\n this.gl.texSubImage2D(target, level, x, y, dataFormat, type, data);\n }\n });\n\n this.gl.bindTexture(this.target, null);\n }\n /* eslint-enable max-len, max-statements, complexity */\n\n /**\n * Defines a two-dimensional texture image or cube-map texture image with\n * pixels from the current framebuffer (rather than from client memory).\n * (gl.copyTexImage2D wrapper)\n *\n * Note that binding a texture into a Framebuffer's color buffer and\n * rendering can be faster.\n */\n copyFramebuffer(opts = {}) {\n log.error(\n 'Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})'\n )();\n return null;\n }\n\n getActiveUnit() {\n return this.gl.getParameter(GL.ACTIVE_TEXTURE) - GL.TEXTURE0;\n }\n\n // target cannot be modified by bind:\n // textures are special because when you first bind them to a target,\n // they get special information. When you first bind a texture as a\n // GL_TEXTURE_2D, you are actually setting special state in the texture.\n // You are saying that this texture is a 2D texture.\n // And it will always be a 2D texture; this state cannot be changed ever.\n // If you have a texture that was first bound as a GL_TEXTURE_2D,\n // you must always bind it as a GL_TEXTURE_2D;\n // attempting to bind it as GL_TEXTURE_1D will give rise to an error\n // (while run-time).\n\n bind(textureUnit = this.textureUnit) {\n const {gl} = this;\n\n if (textureUnit !== undefined) {\n this.textureUnit = textureUnit;\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\n }\n\n gl.bindTexture(this.target, this.handle);\n return textureUnit;\n }\n\n unbind(textureUnit = this.textureUnit) {\n const {gl} = this;\n\n if (textureUnit !== undefined) {\n this.textureUnit = textureUnit;\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\n }\n\n gl.bindTexture(this.target, null);\n return textureUnit;\n }\n\n // PRIVATE METHODS\n\n _getDataType({data, compressed = false}) {\n if (compressed) {\n return {data, dataType: 'compressed'};\n }\n if (data === null) {\n return {data, dataType: 'null'};\n }\n if (ArrayBuffer.isView(data)) {\n return {data, dataType: 'typed-array'};\n }\n if (data instanceof Buffer) {\n return {data: data.handle, dataType: 'buffer'};\n }\n if (data instanceof WebGLBuffer) {\n return {data, dataType: 'buffer'};\n }\n // Assume data is a browser supported object (ImageData, Canvas, ...)\n return {data, dataType: 'browser-object'};\n }\n\n /* Copied from texture-2d.js\n // WebGL2\n setPixels(opts = {}) {\n const {\n buffer,\n width = null,\n height = null,\n mipmapLevel = 0,\n format = GL.RGBA,\n type = GL.UNSIGNED_BYTE,\n border = 0\n } = opts;\n\n const {gl} = this;\n\n // This signature of texImage2D uses currently bound GL.PIXEL_UNPACK_BUFFER\n gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, buffer.target);\n // And as always, we must also bind the texture itself\n this.bind();\n\n gl.texImage2D(gl.TEXTURE_2D,\n mipmapLevel, format, width, height, border, format, type, buffer.target);\n\n this.unbind();\n gl.bindBuffer(GL.GL.PIXEL_UNPACK_BUFFER, null);\n return this;\n }\n\n setImageDataFromCompressedBuffer(opts) {\n const {\n buffer,\n // offset = 0,\n width = null,\n height = null,\n mipmapLevel = 0,\n internalFormat = GL.RGBA,\n // format = GL.RGBA,\n // type = GL.UNSIGNED_BYTE,\n border = 0\n } = opts;\n\n const {gl} = this;\n gl.compressedTexImage2D(this.target,\n mipmapLevel, internalFormat, width, height, border, buffer);\n // gl.compressedTexSubImage2D(target,\n // level, xoffset, yoffset, width, height, format, ArrayBufferView? pixels);\n return this;\n }\n\n copySubImage(opts) {\n const {\n // pixels,\n // offset = 0,\n // x,\n // y,\n // width,\n // height,\n // mipmapLevel = 0,\n // internalFormat = GL.RGBA,\n // type = GL.UNSIGNED_BYTE,\n // border = 0\n } = opts;\n\n // if (pixels instanceof ArrayBufferView) {\n // gl.texSubImage2D(target, level, x, y, width, height, format, type, pixels);\n // }\n // gl.texSubImage2D(target, level, x, y, format, type, ? pixels);\n // gl.texSubImage2D(target, level, x, y, format, type, HTMLImageElement pixels);\n // gl.texSubImage2D(target, level, x, y, format, type, HTMLCanvasElement pixels);\n // gl.texSubImage2D(target, level, x, y, format, type, HTMLVideoElement pixels);\n // // Additional signature in a WebGL 2 context:\n // gl.texSubImage2D(target, level, x, y, format, type, GLintptr offset);\n }\n */\n\n // HELPER METHODS\n\n _deduceParameters(opts) {\n const {format, data} = opts;\n let {width, height, dataFormat, type, compressed} = opts;\n\n // Deduce format and type from format\n const textureFormat = TEXTURE_FORMATS[format];\n dataFormat = dataFormat || (textureFormat && textureFormat.dataFormat);\n type = type || (textureFormat && textureFormat.types[0]);\n\n // Deduce compression from format\n compressed = compressed || (textureFormat && textureFormat.compressed);\n\n ({width, height} = this._deduceImageSize(data, width, height));\n\n return {dataFormat, type, compressed, width, height, format, data};\n }\n\n // eslint-disable-next-line complexity\n _deduceImageSize(data, width, height) {\n let size;\n\n if (typeof ImageData !== 'undefined' && data instanceof ImageData) {\n size = {width: data.width, height: data.height};\n } else if (typeof HTMLImageElement !== 'undefined' && data instanceof HTMLImageElement) {\n size = {width: data.naturalWidth, height: data.naturalHeight};\n } else if (typeof HTMLCanvasElement !== 'undefined' && data instanceof HTMLCanvasElement) {\n size = {width: data.width, height: data.height};\n } else if (typeof ImageBitmap !== 'undefined' && data instanceof ImageBitmap) {\n size = {width: data.width, height: data.height};\n } else if (typeof HTMLVideoElement !== 'undefined' && data instanceof HTMLVideoElement) {\n size = {width: data.videoWidth, height: data.videoHeight};\n } else if (!data) {\n size = {width: width >= 0 ? width : 1, height: height >= 0 ? height : 1};\n } else {\n size = {width, height};\n }\n\n assert(size, 'Could not deduced texture size');\n assert(\n width === undefined || size.width === width,\n 'Deduced texture width does not match supplied width'\n );\n assert(\n height === undefined || size.height === height,\n 'Deduced texture height does not match supplied height'\n );\n\n return size;\n }\n\n // RESOURCE METHODS\n\n _createHandle() {\n return this.gl.createTexture();\n }\n\n _deleteHandle() {\n this.gl.deleteTexture(this.handle);\n this._trackDeallocatedMemory('Texture');\n }\n\n _getParameter(pname) {\n switch (pname) {\n case GL.TEXTURE_WIDTH:\n return this.width;\n case GL.TEXTURE_HEIGHT:\n return this.height;\n default:\n this.gl.bindTexture(this.target, this.handle);\n const value = this.gl.getTexParameter(this.target, pname);\n this.gl.bindTexture(this.target, null);\n return value;\n }\n }\n\n _setParameter(pname, param) {\n this.gl.bindTexture(this.target, this.handle);\n\n // NOTE: Apply NPOT workaround\n param = this._getNPOTParam(pname, param);\n\n // Apparently there are some integer/float conversion rules that made\n // the WebGL committe expose two parameter setting functions in JavaScript.\n // For now, pick the float version for parameters specified as GLfloat.\n switch (pname) {\n case GL.TEXTURE_MIN_LOD:\n case GL.TEXTURE_MAX_LOD:\n this.gl.texParameterf(this.handle, pname, param);\n break;\n\n case GL.TEXTURE_WIDTH:\n case GL.TEXTURE_HEIGHT:\n assert(false);\n break;\n\n default:\n this.gl.texParameteri(this.target, pname, param);\n break;\n }\n\n this.gl.bindTexture(this.target, null);\n return this;\n }\n\n _isNPOT() {\n if (isWebGL2(this.gl)) {\n // NPOT restriction is only for WebGL1\n return false;\n }\n // Width and height not available, consider it is not NPOT texture\n if (!this.width || !this.height) {\n return false;\n }\n return !isPowerOfTwo(this.width) || !isPowerOfTwo(this.height);\n }\n\n // Update default settings which are not supported by NPOT textures.\n _updateForNPOT(parameters) {\n if (parameters[this.gl.TEXTURE_MIN_FILTER] === undefined) {\n // log.warn(`texture: ${this} is Non-Power-Of-Two, forcing TEXTURE_MIN_FILTER to LINEAR`)();\n parameters[this.gl.TEXTURE_MIN_FILTER] = this.gl.LINEAR;\n }\n if (parameters[this.gl.TEXTURE_WRAP_S] === undefined) {\n // log.warn(`texture: ${this} is Non-Power-Of-Two, forcing TEXTURE_WRAP_S to CLAMP_TO_EDGE`)();\n parameters[this.gl.TEXTURE_WRAP_S] = this.gl.CLAMP_TO_EDGE;\n }\n if (parameters[this.gl.TEXTURE_WRAP_T] === undefined) {\n // log.warn(`texture: ${this} is Non-Power-Of-Two, forcing TEXTURE_WRAP_T to CLAMP_TO_EDGE`)();\n parameters[this.gl.TEXTURE_WRAP_T] = this.gl.CLAMP_TO_EDGE;\n }\n }\n\n _getNPOTParam(pname, param) {\n if (this._isNPOT()) {\n switch (pname) {\n case GL.TEXTURE_MIN_FILTER:\n if (NPOT_MIN_FILTERS.indexOf(param) === -1) {\n // log.warn(`texture: ${this} is Non-Power-Of-Two, forcing TEXTURE_MIN_FILTER to LINEAR`)();\n param = GL.LINEAR;\n }\n break;\n case GL.TEXTURE_WRAP_S:\n case GL.TEXTURE_WRAP_T:\n if (param !== GL.CLAMP_TO_EDGE) {\n // log.warn(`texture: ${this} is Non-Power-Of-Two, ${getKey(this.gl, pname)} to CLAMP_TO_EDGE`)();\n param = GL.CLAMP_TO_EDGE;\n }\n break;\n default:\n break;\n }\n }\n return param;\n }\n}\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 3x3 Matrix\r\n * @module mat3\r\n */\n\n/**\r\n * Creates a new identity mat3\r\n *\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n}\n/**\r\n * Copies the upper-left 3x3 values into the given mat3.\r\n *\r\n * @param {mat3} out the receiving 3x3 matrix\r\n * @param {ReadonlyMat4} a the source 4x4 matrix\r\n * @returns {mat3} out\r\n */\n\nexport function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n}\n/**\r\n * Creates a new mat3 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat3} a matrix to clone\r\n * @returns {mat3} a new 3x3 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Copy the values from one mat3 to another\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Create a new mat3 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} A new mat3\r\n */\n\nexport function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\r\n * Set the components of a mat3 to the given values\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\r\n * @returns {mat3} out\r\n */\n\nexport function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n}\n/**\r\n * Set a mat3 to the identity matrix\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @returns {mat3} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n } else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {mat3} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n}\n/**\r\n * Calculates the determinant of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n}\n/**\r\n * Multiplies two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2];\n var a10 = a[3],\n a11 = a[4],\n a12 = a[5];\n var a20 = a[6],\n a21 = a[7],\n a22 = a[8];\n var b00 = b[0],\n b01 = b[1],\n b02 = b[2];\n var b10 = b[3],\n b11 = b[4],\n b12 = b[5];\n var b20 = b[6],\n b21 = b[7],\n b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n}\n/**\r\n * Translate a mat3 by the given vector\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to translate\r\n * @param {ReadonlyVec2} v vector to translate by\r\n * @returns {mat3} out\r\n */\n\nexport function translate(out, a, v) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n x = v[0],\n y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n}\n/**\r\n * Rotates a mat3 by the given angle\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function rotate(out, a, rad) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a10 = a[3],\n a11 = a[4],\n a12 = a[5],\n a20 = a[6],\n a21 = a[7],\n a22 = a[8],\n s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n}\n/**\r\n * Scales the mat3 by the dimensions in the given vec2\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to rotate\r\n * @param {ReadonlyVec2} v the vec2 to scale the matrix by\r\n * @returns {mat3} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.translate(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Translation vector\r\n * @returns {mat3} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.rotate(dest, dest, rad);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat3} out\r\n */\n\nexport function fromRotation(out, rad) {\n var s = Math.sin(rad),\n c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat3.identity(dest);\r\n * mat3.scale(dest, dest, vec);\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyVec2} v Scaling vector\r\n * @returns {mat3} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n}\n/**\r\n * Copies the values from a mat2d into a mat3\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat2d} a the matrix to copy\r\n * @returns {mat3} out\r\n **/\n\nexport function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n}\n/**\r\n * Calculates a 3x3 matrix from the given quaternion\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n}\n/**\r\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\r\n *\r\n * @param {mat3} out mat3 receiving operation result\r\n * @param {ReadonlyMat4} a Mat4 to derive the normal matrix from\r\n *\r\n * @returns {mat3} out\r\n */\n\nexport function normalFromMat4(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n}\n/**\r\n * Generates a 2D projection matrix with the given bounds\r\n *\r\n * @param {mat3} out mat3 frustum matrix will be written into\r\n * @param {number} width Width of your gl context\r\n * @param {number} height Height of gl context\r\n * @returns {mat3} out\r\n */\n\nexport function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat3\r\n *\r\n * @param {ReadonlyMat3} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat3\r\n *\r\n * @param {ReadonlyMat3} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n}\n/**\r\n * Adds two mat3's\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @returns {mat3} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat3} out the receiving matrix\r\n * @param {ReadonlyMat3} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat3} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n}\n/**\r\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat3} out the receiving vector\r\n * @param {ReadonlyMat3} a the first operand\r\n * @param {ReadonlyMat3} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat3} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat3} a The first matrix.\r\n * @param {ReadonlyMat3} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3],\n a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7],\n a8 = a[8];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3],\n b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7],\n b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n}\n/**\r\n * Alias for {@link mat3.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat3.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","module.exports = function() {\n\tthrow new Error(\"define cannot be used indirect\");\n};\n","var _typeof = require(\"../helpers/typeof\");\n\nfunction _getRequireWildcardCache() {\n if (typeof WeakMap !== \"function\") return null;\n var cache = new WeakMap();\n\n _getRequireWildcardCache = function _getRequireWildcardCache() {\n return cache;\n };\n\n return cache;\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n }\n\n if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") {\n return {\n \"default\": obj\n };\n }\n\n var cache = _getRequireWildcardCache();\n\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n\n var newObj = {};\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n\n newObj[\"default\"] = obj;\n\n if (cache) {\n cache.set(obj, newObj);\n }\n\n return newObj;\n}\n\nmodule.exports = _interopRequireWildcard;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function get() {\n return _utils.createSvgIcon;\n }\n});\n\nvar _utils = require(\"@material-ui/core/utils\");","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n if (r0 * step < start) ++r0;\n if (r1 * step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) * step;\n } else {\n step = -step;\n let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n if (r0 / step < start) ++r0;\n if (r1 / step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","export default function(x) {\n return Math.abs(x = Math.round(x)) >= 1e21\n ? x.toLocaleString(\"en\").replace(/,/g, \"\")\n : x.toString(10);\n}\n\n// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import {formatDecimalParts} from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": (x, p) => (x * 100).toFixed(p),\n \"b\": (x) => Math.round(x).toString(2),\n \"c\": (x) => x + \"\",\n \"d\": formatDecimal,\n \"e\": (x, p) => x.toExponential(p),\n \"f\": (x, p) => x.toFixed(p),\n \"g\": (x, p) => x.toPrecision(p),\n \"o\": (x) => Math.round(x).toString(8),\n \"p\": (x, p) => formatRounded(x * 100, p),\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": (x) => Math.round(x).toString(16).toUpperCase(),\n \"x\": (x) => Math.round(x).toString(16)\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"−\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n return new Map(names.map((name, i) => [name.toLowerCase(), i]));\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","import { tickStep } from 'd3-array';\nimport { formatSpecifier, precisionFixed, precisionRound, precisionPrefix, formatLocale, format, formatPrefix } from 'd3-format';\nimport { SECONDS, MINUTES, HOURS, DATE, WEEK, MONTH, QUARTER, YEAR, MILLISECONDS, DAY, timeInterval, utcInterval } from 'vega-time';\nimport { isString, isObject, error, extend } from 'vega-util';\nimport { timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale as timeFormatLocale$1 } from 'd3-time-format';\n\nfunction memoize (method) {\n const cache = {};\n return spec => cache[spec] || (cache[spec] = method(spec));\n}\n\nfunction trimZeroes(numberFormat, decimalChar) {\n return x => {\n const str = numberFormat(x),\n dec = str.indexOf(decimalChar);\n if (dec < 0) return str;\n let idx = rightmostDigit(str, dec);\n const end = idx < str.length ? str.slice(idx) : '';\n\n while (--idx > dec) if (str[idx] !== '0') {\n ++idx;\n break;\n }\n\n return str.slice(0, idx) + end;\n };\n}\n\nfunction rightmostDigit(str, dec) {\n let i = str.lastIndexOf('e'),\n c;\n if (i > 0) return i;\n\n for (i = str.length; --i > dec;) {\n c = str.charCodeAt(i);\n if (c >= 48 && c <= 57) return i + 1; // is digit\n }\n}\n\nfunction numberLocale(locale) {\n const format = memoize(locale.format),\n formatPrefix = locale.formatPrefix;\n return {\n format,\n formatPrefix,\n\n formatFloat(spec) {\n const s = formatSpecifier(spec || ',');\n\n if (s.precision == null) {\n s.precision = 12;\n\n switch (s.type) {\n case '%':\n s.precision -= 2;\n break;\n\n case 'e':\n s.precision -= 1;\n break;\n }\n\n return trimZeroes(format(s), // number format\n format('.1f')(1)[1] // decimal point character\n );\n } else {\n return format(s);\n }\n },\n\n formatSpan(start, stop, count, specifier) {\n specifier = formatSpecifier(specifier == null ? ',f' : specifier);\n const step = tickStep(start, stop, count),\n value = Math.max(Math.abs(start), Math.abs(stop));\n let precision;\n\n if (specifier.precision == null) {\n switch (specifier.type) {\n case 's':\n {\n if (!isNaN(precision = precisionPrefix(step, value))) {\n specifier.precision = precision;\n }\n\n return formatPrefix(specifier, value);\n }\n\n case '':\n case 'e':\n case 'g':\n case 'p':\n case 'r':\n {\n if (!isNaN(precision = precisionRound(step, value))) {\n specifier.precision = precision - (specifier.type === 'e');\n }\n\n break;\n }\n\n case 'f':\n case '%':\n {\n if (!isNaN(precision = precisionFixed(step))) {\n specifier.precision = precision - (specifier.type === '%') * 2;\n }\n\n break;\n }\n }\n }\n\n return format(specifier);\n }\n\n };\n}\n\nlet defaultNumberLocale;\nresetNumberFormatDefaultLocale();\nfunction resetNumberFormatDefaultLocale() {\n return defaultNumberLocale = numberLocale({\n format: format,\n formatPrefix: formatPrefix\n });\n}\nfunction numberFormatLocale(definition) {\n return numberLocale(formatLocale(definition));\n}\nfunction numberFormatDefaultLocale(definition) {\n return arguments.length ? defaultNumberLocale = numberFormatLocale(definition) : defaultNumberLocale;\n}\n\nfunction timeMultiFormat(format, interval, spec) {\n spec = spec || {};\n\n if (!isObject(spec)) {\n error(\"Invalid time multi-format specifier: \".concat(spec));\n }\n\n const second = interval(SECONDS),\n minute = interval(MINUTES),\n hour = interval(HOURS),\n day = interval(DATE),\n week = interval(WEEK),\n month = interval(MONTH),\n quarter = interval(QUARTER),\n year = interval(YEAR),\n L = format(spec[MILLISECONDS] || '.%L'),\n S = format(spec[SECONDS] || ':%S'),\n M = format(spec[MINUTES] || '%I:%M'),\n H = format(spec[HOURS] || '%I %p'),\n d = format(spec[DATE] || spec[DAY] || '%a %d'),\n w = format(spec[WEEK] || '%b %d'),\n m = format(spec[MONTH] || '%B'),\n q = format(spec[QUARTER] || '%B'),\n y = format(spec[YEAR] || '%Y');\n return date => (second(date) < date ? L : minute(date) < date ? S : hour(date) < date ? M : day(date) < date ? H : month(date) < date ? week(date) < date ? d : w : year(date) < date ? quarter(date) < date ? m : q : y)(date);\n}\n\nfunction timeLocale(locale) {\n const timeFormat = memoize(locale.format),\n utcFormat = memoize(locale.utcFormat);\n return {\n timeFormat: spec => isString(spec) ? timeFormat(spec) : timeMultiFormat(timeFormat, timeInterval, spec),\n utcFormat: spec => isString(spec) ? utcFormat(spec) : timeMultiFormat(utcFormat, utcInterval, spec),\n timeParse: memoize(locale.parse),\n utcParse: memoize(locale.utcParse)\n };\n}\n\nlet defaultTimeLocale;\nresetTimeFormatDefaultLocale();\nfunction resetTimeFormatDefaultLocale() {\n return defaultTimeLocale = timeLocale({\n format: timeFormat,\n parse: timeParse,\n utcFormat: utcFormat,\n utcParse: utcParse\n });\n}\nfunction timeFormatLocale(definition) {\n return timeLocale(timeFormatLocale$1(definition));\n}\nfunction timeFormatDefaultLocale(definition) {\n return arguments.length ? defaultTimeLocale = timeFormatLocale(definition) : defaultTimeLocale;\n}\n\nconst createLocale = (number, time) => extend({}, number, time);\n\nfunction locale(numberSpec, timeSpec) {\n const number = numberSpec ? numberFormatLocale(numberSpec) : numberFormatDefaultLocale();\n const time = timeSpec ? timeFormatLocale(timeSpec) : timeFormatDefaultLocale();\n return createLocale(number, time);\n}\nfunction defaultLocale(numberSpec, timeSpec) {\n const args = arguments.length;\n\n if (args && args !== 2) {\n error('defaultLocale expects either zero or two arguments.');\n }\n\n return args ? createLocale(numberFormatDefaultLocale(numberSpec), timeFormatDefaultLocale(timeSpec)) : createLocale(numberFormatDefaultLocale(), timeFormatDefaultLocale());\n}\nfunction resetDefaultLocale() {\n resetNumberFormatDefaultLocale();\n resetTimeFormatDefaultLocale();\n return defaultLocale();\n}\n\nexport { defaultLocale, locale, numberFormatDefaultLocale, numberFormatLocale, resetDefaultLocale, resetNumberFormatDefaultLocale, resetTimeFormatDefaultLocale, timeFormatDefaultLocale, timeFormatLocale };\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","/* eslint-disable no-restricted-globals */\nconst globals = {\n self: typeof self !== 'undefined' && self,\n window: typeof window !== 'undefined' && window,\n global: typeof global !== 'undefined' && global,\n document: typeof document !== 'undefined' && document,\n process: typeof process === 'object' && process\n};\n\nconst self_ = globals.self || globals.window || globals.global;\nconst window_ = globals.window || globals.self || globals.global;\nconst global_ = globals.global || globals.self || globals.window;\nconst document_ = globals.document || {};\nconst process_ = globals.process || {};\nconst console_ = console;\n\nexport {\n self_ as self,\n window_ as window,\n global_ as global,\n document_ as document,\n process_ as process,\n console_ as console\n};\n","// Copyright (c) 2015 Uber Technologies, Inc.\n\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-statements, complexity */\nimport TransitionManager, {TRANSITION_EVENTS} from './transition-manager';\nimport LinearInterpolator from '../transitions/linear-interpolator';\n\nconst NO_TRANSITION_PROPS = {\n transitionDuration: 0\n};\n\nconst LINEAR_TRANSITION_PROPS = {\n transitionDuration: 300,\n transitionEasing: t => t,\n transitionInterruption: TRANSITION_EVENTS.BREAK\n};\n\nconst DEFAULT_INERTIA = 300;\nconst INERTIA_EASING = t => 1 - (1 - t) * (1 - t);\n\nconst EVENT_TYPES = {\n WHEEL: ['wheel'],\n PAN: ['panstart', 'panmove', 'panend'],\n PINCH: ['pinchstart', 'pinchmove', 'pinchend'],\n TRIPLE_PAN: ['tripanstart', 'tripanmove', 'tripanend'],\n DOUBLE_TAP: ['doubletap'],\n KEYBOARD: ['keydown']\n};\n\nexport default class Controller {\n constructor(ControllerState, options = {}) {\n this.ControllerState = ControllerState;\n this.controllerState = null;\n this.controllerStateProps = null;\n this.eventManager = null;\n this.transitionManager = new TransitionManager(ControllerState, {\n ...options,\n onViewStateChange: this._onTransition.bind(this),\n onStateChange: this._setInteractionState.bind(this)\n });\n\n const linearTransitionProps = this.linearTransitionProps;\n this._transition = linearTransitionProps && {\n ...LINEAR_TRANSITION_PROPS,\n transitionInterpolator: new LinearInterpolator({\n transitionProps: linearTransitionProps\n })\n };\n\n this._events = null;\n this._interactionState = {\n isDragging: false\n };\n this._customEvents = [];\n this.onViewStateChange = null;\n this.onStateChange = null;\n\n this.handleEvent = this.handleEvent.bind(this);\n\n this.setProps(options);\n }\n\n get linearTransitionProps() {\n return null;\n }\n\n set events(customEvents) {\n this.toggleEvents(this._customEvents, false);\n this.toggleEvents(customEvents, true);\n this._customEvents = customEvents;\n // Make sure default events are not overwritten\n this.setProps(this.controllerStateProps);\n }\n\n finalize() {\n for (const eventName in this._events) {\n if (this._events[eventName]) {\n this.eventManager.off(eventName, this.handleEvent);\n }\n }\n this.transitionManager.finalize();\n }\n\n /**\n * Callback for events\n * @param {hammer.Event} event\n */\n handleEvent(event) {\n const {ControllerState} = this;\n this.controllerState = new ControllerState({\n makeViewport: this.makeViewport,\n ...this.controllerStateProps,\n ...this._state\n });\n const eventStartBlocked = this._eventStartBlocked;\n\n switch (event.type) {\n case 'panstart':\n return eventStartBlocked ? false : this._onPanStart(event);\n case 'panmove':\n return this._onPan(event);\n case 'panend':\n return this._onPanEnd(event);\n case 'pinchstart':\n return eventStartBlocked ? false : this._onPinchStart(event);\n case 'pinchmove':\n return this._onPinch(event);\n case 'pinchend':\n return this._onPinchEnd(event);\n case 'tripanstart':\n return eventStartBlocked ? false : this._onTriplePanStart(event);\n case 'tripanmove':\n return this._onTriplePan(event);\n case 'tripanend':\n return this._onTriplePanEnd(event);\n case 'doubletap':\n return this._onDoubleTap(event);\n case 'wheel':\n return this._onWheel(event);\n case 'keydown':\n return this._onKeyDown(event);\n default:\n return false;\n }\n }\n\n /* Event utils */\n // Event object: http://hammerjs.github.io/api/#event-object\n getCenter(event) {\n const {x, y} = this.controllerStateProps;\n const {offsetCenter} = event;\n return [offsetCenter.x - x, offsetCenter.y - y];\n }\n\n isPointInBounds(pos, event) {\n const {width, height} = this.controllerStateProps;\n if (event && event.handled) {\n return false;\n }\n\n const inside = pos[0] >= 0 && pos[0] <= width && pos[1] >= 0 && pos[1] <= height;\n if (inside && event) {\n event.stopPropagation();\n }\n return inside;\n }\n\n isFunctionKeyPressed(event) {\n const {srcEvent} = event;\n return Boolean(srcEvent.metaKey || srcEvent.altKey || srcEvent.ctrlKey || srcEvent.shiftKey);\n }\n\n isDragging() {\n return this._interactionState.isDragging;\n }\n\n // When a multi-touch event ends, e.g. pinch, not all pointers are lifted at the same time.\n // This triggers a brief `pan` event.\n // Calling this method will temporarily disable *start events to avoid conflicting transitions.\n blockEvents(timeout) {\n /* global setTimeout */\n const timer = setTimeout(() => {\n if (this._eventStartBlocked === timer) {\n this._eventStartBlocked = null;\n }\n }, timeout);\n this._eventStartBlocked = timer;\n }\n\n /**\n * Extract interactivity options\n */\n setProps(props) {\n if ('onViewStateChange' in props) {\n this.onViewStateChange = props.onViewStateChange;\n }\n if ('onStateChange' in props) {\n this.onStateChange = props.onStateChange;\n }\n if ('makeViewport' in props) {\n this.makeViewport = props.makeViewport;\n }\n if ('dragMode' in props) {\n this.dragMode = props.dragMode;\n }\n this.controllerStateProps = props;\n\n if ('eventManager' in props && this.eventManager !== props.eventManager) {\n // EventManager has changed\n this.eventManager = props.eventManager;\n this._events = {};\n this.toggleEvents(this._customEvents, true);\n }\n\n if (!('transitionInterpolator' in props)) {\n // Add default transition interpolator\n props.transitionInterpolator = this._getTransitionProps().transitionInterpolator;\n }\n\n this.transitionManager.processViewStateChange(props);\n\n let {inertia} = props;\n if (inertia === true) {\n inertia = DEFAULT_INERTIA;\n }\n this.inertia = inertia;\n\n // TODO - make sure these are not reset on every setProps\n const {\n scrollZoom = true,\n dragPan = true,\n dragRotate = true,\n doubleClickZoom = true,\n touchZoom = true,\n touchRotate = false,\n keyboard = true\n } = props;\n\n // Register/unregister events\n const isInteractive = Boolean(this.onViewStateChange);\n this.toggleEvents(EVENT_TYPES.WHEEL, isInteractive && scrollZoom);\n this.toggleEvents(EVENT_TYPES.PAN, isInteractive && (dragPan || dragRotate));\n this.toggleEvents(EVENT_TYPES.PINCH, isInteractive && (touchZoom || touchRotate));\n this.toggleEvents(EVENT_TYPES.TRIPLE_PAN, isInteractive && touchRotate);\n this.toggleEvents(EVENT_TYPES.DOUBLE_TAP, isInteractive && doubleClickZoom);\n this.toggleEvents(EVENT_TYPES.KEYBOARD, isInteractive && keyboard);\n\n // Interaction toggles\n this.scrollZoom = scrollZoom;\n this.dragPan = dragPan;\n this.dragRotate = dragRotate;\n this.doubleClickZoom = doubleClickZoom;\n this.touchZoom = touchZoom;\n this.touchRotate = touchRotate;\n this.keyboard = keyboard;\n }\n\n updateTransition() {\n this.transitionManager.updateTransition();\n }\n\n toggleEvents(eventNames, enabled) {\n if (this.eventManager) {\n eventNames.forEach(eventName => {\n if (this._events[eventName] !== enabled) {\n this._events[eventName] = enabled;\n if (enabled) {\n this.eventManager.on(eventName, this.handleEvent);\n } else {\n this.eventManager.off(eventName, this.handleEvent);\n }\n }\n });\n }\n }\n\n // Private Methods\n\n /* Callback util */\n // formats map state and invokes callback function\n updateViewport(newControllerState, extraProps = {}, interactionState = {}) {\n const viewState = {...newControllerState.getViewportProps(), ...extraProps};\n\n // TODO - to restore diffing, we need to include interactionState\n const changed = this.controllerState !== newControllerState;\n // const oldViewState = this.controllerState.getViewportProps();\n // const changed = Object.keys(viewState).some(key => oldViewState[key] !== viewState[key]);\n\n this._state = newControllerState.getState();\n this._setInteractionState(interactionState);\n\n if (changed) {\n const oldViewState = this.controllerState ? this.controllerState.getViewportProps() : null;\n if (this.onViewStateChange) {\n this.onViewStateChange({viewState, interactionState: this._interactionState, oldViewState});\n }\n }\n }\n\n _onTransition(params) {\n if (this.onViewStateChange) {\n params.interactionState = this._interactionState;\n this.onViewStateChange(params);\n }\n }\n\n _setInteractionState(newStates) {\n Object.assign(this._interactionState, newStates);\n if (this.onStateChange) {\n this.onStateChange(this._interactionState);\n }\n }\n\n /* Event handlers */\n // Default handler for the `panstart` event.\n _onPanStart(event) {\n const pos = this.getCenter(event);\n if (!this.isPointInBounds(pos, event)) {\n return false;\n }\n let alternateMode = this.isFunctionKeyPressed(event) || event.rightButton;\n if (this.invertPan || this.dragMode === 'pan') {\n // invertPan is replaced by props.dragMode, keeping for backward compatibility\n alternateMode = !alternateMode;\n }\n const newControllerState = this.controllerState[alternateMode ? 'panStart' : 'rotateStart']({\n pos\n });\n this._panMove = alternateMode;\n this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {isDragging: true});\n return true;\n }\n\n // Default handler for the `panmove` and `panend` event.\n _onPan(event) {\n if (!this.isDragging()) {\n return false;\n }\n return this._panMove ? this._onPanMove(event) : this._onPanRotate(event);\n }\n\n _onPanEnd(event) {\n if (!this.isDragging()) {\n return false;\n }\n return this._panMove ? this._onPanMoveEnd(event) : this._onPanRotateEnd(event);\n }\n\n // Default handler for panning to move.\n // Called by `_onPan` when panning without function key pressed.\n _onPanMove(event) {\n if (!this.dragPan) {\n return false;\n }\n const pos = this.getCenter(event);\n const newControllerState = this.controllerState.pan({pos});\n this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {\n isDragging: true,\n isPanning: true\n });\n return true;\n }\n\n _onPanMoveEnd(event) {\n const {inertia} = this;\n if (this.dragPan && inertia && event.velocity) {\n const pos = this.getCenter(event);\n const endPos = [\n pos[0] + (event.velocityX * inertia) / 2,\n pos[1] + (event.velocityY * inertia) / 2\n ];\n const newControllerState = this.controllerState.pan({pos: endPos}).panEnd();\n this.updateViewport(\n newControllerState,\n {\n ...this._getTransitionProps(),\n transitionDuration: inertia,\n transitionEasing: INERTIA_EASING\n },\n {\n isDragging: false,\n isPanning: true\n }\n );\n } else {\n const newControllerState = this.controllerState.panEnd();\n this.updateViewport(newControllerState, null, {\n isDragging: false,\n isPanning: false\n });\n }\n return true;\n }\n\n // Default handler for panning to rotate.\n // Called by `_onPan` when panning with function key pressed.\n _onPanRotate(event) {\n if (!this.dragRotate) {\n return false;\n }\n\n const pos = this.getCenter(event);\n const newControllerState = this.controllerState.rotate({pos});\n this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {\n isDragging: true,\n isRotating: true\n });\n return true;\n }\n\n _onPanRotateEnd(event) {\n const {inertia} = this;\n if (this.dragRotate && inertia && event.velocity) {\n const pos = this.getCenter(event);\n const endPos = [\n pos[0] + (event.velocityX * inertia) / 2,\n pos[1] + (event.velocityY * inertia) / 2\n ];\n const newControllerState = this.controllerState.rotate({pos: endPos}).rotateEnd();\n this.updateViewport(\n newControllerState,\n {\n ...this._getTransitionProps(),\n transitionDuration: inertia,\n transitionEasing: INERTIA_EASING\n },\n {\n isDragging: false,\n isRotating: true\n }\n );\n } else {\n const newControllerState = this.controllerState.rotateEnd();\n this.updateViewport(newControllerState, null, {\n isDragging: false,\n isRotating: false\n });\n }\n return true;\n }\n\n // Default handler for the `wheel` event.\n _onWheel(event) {\n if (!this.scrollZoom) {\n return false;\n }\n event.preventDefault();\n\n const pos = this.getCenter(event);\n if (!this.isPointInBounds(pos, event)) {\n return false;\n }\n\n const {speed = 0.01, smooth = false} = this.scrollZoom;\n const {delta} = event;\n\n // Map wheel delta to relative scale\n let scale = 2 / (1 + Math.exp(-Math.abs(delta * speed)));\n if (delta < 0 && scale !== 0) {\n scale = 1 / scale;\n }\n\n const newControllerState = this.controllerState.zoom({pos, scale});\n this.updateViewport(\n newControllerState,\n {...this._getTransitionProps({around: pos}), transitionDuration: smooth ? 250 : 1},\n {\n isZooming: true,\n isPanning: true\n }\n );\n return true;\n }\n\n _onTriplePanStart(event) {\n const pos = this.getCenter(event);\n if (!this.isPointInBounds(pos, event)) {\n return false;\n }\n const newControllerState = this.controllerState.rotateStart({pos});\n this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {isDragging: true});\n return true;\n }\n\n _onTriplePan(event) {\n if (!this.touchRotate) {\n return false;\n }\n if (!this.isDragging()) {\n return false;\n }\n\n const pos = this.getCenter(event);\n pos[0] -= event.deltaX;\n\n const newControllerState = this.controllerState.rotate({pos});\n this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {\n isDragging: true,\n isRotating: true\n });\n return true;\n }\n\n _onTriplePanEnd(event) {\n if (!this.isDragging()) {\n return false;\n }\n const {inertia} = this;\n if (this.touchRotate && inertia && event.velocityY) {\n const pos = this.getCenter(event);\n const endPos = [pos[0], (pos[1] += (event.velocityY * inertia) / 2)];\n const newControllerState = this.controllerState.rotate({pos: endPos});\n this.updateViewport(\n newControllerState,\n {\n ...this._getTransitionProps(),\n transitionDuration: inertia,\n transitionEasing: INERTIA_EASING\n },\n {\n isDragging: false,\n isRotating: true\n }\n );\n this.blockEvents(inertia);\n } else {\n const newControllerState = this.controllerState.rotateEnd();\n this.updateViewport(newControllerState, null, {\n isDragging: false,\n isRotating: false\n });\n }\n return true;\n }\n\n // Default handler for the `pinchstart` event.\n _onPinchStart(event) {\n const pos = this.getCenter(event);\n if (!this.isPointInBounds(pos, event)) {\n return false;\n }\n\n const newControllerState = this.controllerState.zoomStart({pos}).rotateStart({pos});\n // hack - hammer's `rotation` field doesn't seem to produce the correct angle\n this._startPinchRotation = event.rotation;\n this._lastPinchEvent = event;\n this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {isDragging: true});\n return true;\n }\n\n // Default handler for the `pinchmove` and `pinchend` events.\n _onPinch(event) {\n if (!this.touchZoom && !this.touchRotate) {\n return false;\n }\n if (!this.isDragging()) {\n return false;\n }\n\n let newControllerState = this.controllerState;\n if (this.touchZoom) {\n const {scale} = event;\n const pos = this.getCenter(event);\n newControllerState = newControllerState.zoom({pos, scale});\n }\n if (this.touchRotate) {\n const {rotation} = event;\n newControllerState = newControllerState.rotate({\n deltaAngleX: this._startPinchRotation - rotation\n });\n }\n\n this.updateViewport(newControllerState, NO_TRANSITION_PROPS, {\n isDragging: true,\n isPanning: this.touchZoom,\n isZooming: this.touchZoom,\n isRotating: this.touchRotate\n });\n this._lastPinchEvent = event;\n return true;\n }\n\n _onPinchEnd(event) {\n if (!this.isDragging()) {\n return false;\n }\n const {inertia, _lastPinchEvent} = this;\n if (this.touchZoom && inertia && _lastPinchEvent && event.scale !== _lastPinchEvent.scale) {\n const pos = this.getCenter(event);\n let newControllerState = this.controllerState.rotateEnd();\n const z = Math.log2(event.scale);\n const velocityZ =\n (z - Math.log2(_lastPinchEvent.scale)) / (event.deltaTime - _lastPinchEvent.deltaTime);\n const endScale = Math.pow(2, z + (velocityZ * inertia) / 2);\n newControllerState = newControllerState.zoom({pos, scale: endScale}).zoomEnd();\n\n this.updateViewport(\n newControllerState,\n {\n ...this._getTransitionProps({around: pos}),\n transitionDuration: inertia,\n transitionEasing: INERTIA_EASING\n },\n {\n isDragging: false,\n isPanning: this.touchZoom,\n isZooming: this.touchZoom,\n isRotating: false\n }\n );\n this.blockEvents(inertia);\n } else {\n const newControllerState = this.controllerState.zoomEnd().rotateEnd();\n this.updateViewport(newControllerState, null, {\n isDragging: false,\n isPanning: false,\n isZooming: false,\n isRotating: false\n });\n }\n this._startPinchRotation = null;\n this._lastPinchEvent = null;\n return true;\n }\n\n // Default handler for the `doubletap` event.\n _onDoubleTap(event) {\n if (!this.doubleClickZoom) {\n return false;\n }\n const pos = this.getCenter(event);\n if (!this.isPointInBounds(pos, event)) {\n return false;\n }\n\n const isZoomOut = this.isFunctionKeyPressed(event);\n\n const newControllerState = this.controllerState.zoom({pos, scale: isZoomOut ? 0.5 : 2});\n this.updateViewport(newControllerState, this._getTransitionProps({around: pos}), {\n isZooming: true,\n isPanning: true\n });\n this.blockEvents(100);\n return true;\n }\n\n // Default handler for the `keydown` event\n _onKeyDown(event) {\n if (!this.keyboard) {\n return false;\n }\n const funcKey = this.isFunctionKeyPressed(event);\n const {zoomSpeed, moveSpeed, rotateSpeedX, rotateSpeedY} = this.keyboard;\n const {controllerState} = this;\n let newControllerState;\n const interactionState = {};\n\n switch (event.srcEvent.code) {\n case 'Minus':\n newControllerState = funcKey\n ? controllerState.zoomOut(zoomSpeed).zoomOut(zoomSpeed)\n : controllerState.zoomOut(zoomSpeed);\n interactionState.isZooming = true;\n break;\n case 'Equal':\n newControllerState = funcKey\n ? controllerState.zoomIn(zoomSpeed).zoomIn(zoomSpeed)\n : controllerState.zoomIn(zoomSpeed);\n interactionState.isZooming = true;\n break;\n case 'ArrowLeft':\n if (funcKey) {\n newControllerState = controllerState.rotateLeft(rotateSpeedX);\n interactionState.isRotating = true;\n } else {\n newControllerState = controllerState.moveLeft(moveSpeed);\n interactionState.isPanning = true;\n }\n break;\n case 'ArrowRight':\n if (funcKey) {\n newControllerState = controllerState.rotateRight(rotateSpeedX);\n interactionState.isRotating = true;\n } else {\n newControllerState = controllerState.moveRight(moveSpeed);\n interactionState.isPanning = true;\n }\n break;\n case 'ArrowUp':\n if (funcKey) {\n newControllerState = controllerState.rotateUp(rotateSpeedY);\n interactionState.isRotating = true;\n } else {\n newControllerState = controllerState.moveUp(moveSpeed);\n interactionState.isPanning = true;\n }\n break;\n case 'ArrowDown':\n if (funcKey) {\n newControllerState = controllerState.rotateDown(rotateSpeedY);\n interactionState.isRotating = true;\n } else {\n newControllerState = controllerState.moveDown(moveSpeed);\n interactionState.isPanning = true;\n }\n break;\n default:\n return false;\n }\n this.updateViewport(newControllerState, this._getTransitionProps(), interactionState);\n return true;\n }\n\n _getTransitionProps(opts) {\n const {_transition} = this;\n\n if (!_transition) {\n return NO_TRANSITION_PROPS;\n }\n\n // Enables Transitions on double-tap and key-down events.\n return opts\n ? {\n ..._transition,\n transitionInterpolator: new LinearInterpolator({\n ...opts,\n transitionProps: this.linearTransitionProps,\n makeViewport: this.controllerState.makeViewport\n })\n }\n : _transition;\n }\n}\n","const PERCENT_OR_PIXELS_REGEX = /([0-9]+\\.?[0-9]*)(%|px)/;\n\n// Takes a number or a string of formats `50%`, `33.3%` or `200px`\nexport function parsePosition(value) {\n switch (typeof value) {\n case 'number':\n return {\n position: value,\n relative: false\n };\n\n case 'string':\n const match = value.match(PERCENT_OR_PIXELS_REGEX);\n if (match && match.length >= 3) {\n const relative = match[2] === '%';\n const position = parseFloat(match[1]);\n return {\n position: relative ? position / 100 : position,\n relative\n };\n }\n // fallthrough\n\n default:\n // eslint-disable-line\n throw new Error(`Could not parse position string ${value}`);\n }\n}\n\nexport function getPosition(position, extent) {\n return position.relative ? Math.round(position.position * extent) : position.position;\n}\n","import Viewport from '../viewports/viewport';\nimport {parsePosition, getPosition} from '../utils/positions';\nimport {deepEqual} from '../utils/deep-equal';\nimport assert from '../utils/assert';\n\nexport default class View {\n constructor(props = {}) {\n const {\n id = null,\n\n // Window width/height in pixels (for pixel projection)\n x = 0,\n y = 0,\n width = '100%',\n height = '100%',\n\n // A View can be a wrapper for a viewport instance\n viewportInstance,\n\n // Internal: Viewport Type\n type = Viewport // TODO - default to WebMercator?\n } = props;\n\n assert(!viewportInstance || viewportInstance instanceof Viewport);\n this.viewportInstance = viewportInstance;\n\n // Id\n this.id = id || this.constructor.displayName || 'view';\n this.type = type;\n\n this.props = {...props, id: this.id};\n\n // Extents\n this._parseDimensions({x, y, width, height});\n\n // Bind methods for easy access\n this.equals = this.equals.bind(this);\n\n Object.seal(this);\n }\n\n equals(view) {\n if (this === view) {\n return true;\n }\n\n // if `viewportInstance` is set, it is the only prop that is used\n // Delegate to `Viewport.equals`\n if (this.viewportInstance) {\n return view.viewportInstance && this.viewportInstance.equals(view.viewportInstance);\n }\n\n const viewChanged = deepEqual(this.props, view.props);\n\n return viewChanged;\n }\n\n // Build a `Viewport` from a view descriptor\n // TODO - add support for autosizing viewports using width and height\n makeViewport({width, height, viewState}) {\n if (this.viewportInstance) {\n return this.viewportInstance;\n }\n\n viewState = this.filterViewState(viewState);\n\n // Resolve relative viewport dimensions\n const viewportDimensions = this.getDimensions({width, height});\n return this._getViewport(viewState, viewportDimensions);\n }\n\n getViewStateId() {\n switch (typeof this.props.viewState) {\n case 'string':\n // if View.viewState is a string, return it\n return this.props.viewState;\n\n case 'object':\n // If it is an object, return its id component\n return this.props.viewState && this.props.viewState.id;\n\n default:\n return this.id;\n }\n }\n\n // Allows view to override (or completely define) viewState\n filterViewState(viewState) {\n if (this.props.viewState && typeof this.props.viewState === 'object') {\n // If we have specified an id, then intent is to override,\n // If not, completely specify the view state\n if (!this.props.viewState.id) {\n return this.props.viewState;\n }\n\n // Merge in all props from View's viewState, except id\n const newViewState = {...viewState};\n for (const key in this.props.viewState) {\n if (key !== 'id') {\n newViewState[key] = this.props.viewState[key];\n }\n }\n return newViewState;\n }\n\n return viewState;\n }\n\n // Resolve relative viewport dimensions into actual dimensions (y='50%', width=800 => y=400)\n getDimensions({width, height}) {\n return {\n x: getPosition(this._x, width),\n y: getPosition(this._y, height),\n width: getPosition(this._width, width),\n height: getPosition(this._height, height)\n };\n }\n\n // Used by sub classes to resolve controller props\n _getControllerProps(defaultOpts) {\n let opts = this.props.controller;\n\n if (!opts) {\n return null;\n }\n if (opts === true) {\n return defaultOpts;\n }\n if (typeof opts === 'function') {\n opts = {type: opts};\n }\n return {...defaultOpts, ...opts};\n }\n\n // Overridable method\n _getViewport(viewState, viewportDimensions) {\n // Get the type of the viewport\n const {type: ViewportType} = this;\n return new ViewportType({...viewState, ...this.props, ...viewportDimensions});\n }\n\n // Parse relative viewport dimension descriptors (e.g {y: '50%', height: '50%'})\n _parseDimensions({x, y, width, height}) {\n this._x = parsePosition(x);\n this._y = parsePosition(y);\n this._width = parsePosition(width);\n this._height = parsePosition(height);\n }\n}\n","import {uid, assert} from '@luma.gl/webgl';\n\n// Rendering primitives - specify how to extract primitives from vertices.\n// NOTE: These are numerically identical to the corresponding WebGL/OpenGL constants\nexport const DRAW_MODE = {\n POINTS: 0x0000, // draw single points.\n LINES: 0x0001, // draw lines. Each vertex connects to the one after it.\n LINE_LOOP: 0x0002, // draw lines. Each set of two vertices is treated as a separate line segment.\n LINE_STRIP: 0x0003, // draw a connected group of line segments from the first vertex to the last\n TRIANGLES: 0x0004, // draw triangles. Each set of three vertices creates a separate triangle.\n TRIANGLE_STRIP: 0x0005, // draw a connected group of triangles.\n TRIANGLE_FAN: 0x0006 // draw a connected group of triangles.\n // Each vertex connects to the previous and the first vertex in the fan.\n};\n\nexport default class Geometry {\n static get DRAW_MODE() {\n return DRAW_MODE;\n }\n\n constructor(props = {}) {\n const {\n id = uid('geometry'),\n drawMode = DRAW_MODE.TRIANGLES,\n attributes = {},\n indices = null,\n vertexCount = null\n } = props;\n\n this.id = id;\n this.drawMode = drawMode | 0;\n this.attributes = {};\n this.userData = {};\n\n this._setAttributes(attributes, indices);\n\n this.vertexCount = vertexCount || this._calculateVertexCount(this.attributes, this.indices);\n\n // stubRemovedMethods(this, [\n // 'setNeedsRedraw', 'needsRedraw', 'setAttributes'\n // ], 'Immutable');\n\n // stubRemovedMethods(this, [\n // 'hasAttribute', 'getAttribute', 'getArray'\n // ], 'Use geometry.attributes and geometry.indices');\n\n // deprecateMethods(this, ['getAttributes'])\n }\n\n get mode() {\n return this.drawMode;\n }\n\n getVertexCount() {\n return this.vertexCount;\n }\n\n // Return an object with all attributes plus indices added as a field.\n getAttributes() {\n return this.indices ? {indices: this.indices, ...this.attributes} : this.attributes;\n }\n\n // PRIVATE\n\n _print(attributeName) {\n return `Geometry ${this.id} attribute ${attributeName}`;\n }\n\n // Attribute\n // value: typed array\n // type: indices, vertices, uvs\n // size: elements per vertex\n // target: WebGL buffer type (string or constant)\n _setAttributes(attributes, indices) {\n if (indices) {\n this.indices = ArrayBuffer.isView(indices) ? {value: indices, size: 1} : indices;\n }\n\n for (const attributeName in attributes) {\n let attribute = attributes[attributeName];\n\n // Wrap \"unwrapped\" arrays and try to autodetect their type\n attribute = ArrayBuffer.isView(attribute) ? {value: attribute} : attribute;\n\n assert(\n ArrayBuffer.isView(attribute.value),\n `${this._print(attributeName)}: must be typed array or object with value as typed array`\n );\n\n if ((attributeName === 'POSITION' || attributeName === 'positions') && !attribute.size) {\n attribute.size = 3;\n }\n\n // Move indices to separate field\n if (attributeName === 'indices') {\n assert(!this.indices);\n this.indices = attribute;\n } else {\n this.attributes[attributeName] = attribute;\n }\n }\n\n if (this.indices && this.indices.isIndexed !== undefined) {\n this.indices = Object.assign({}, this.indices);\n delete this.indices.isIndexed;\n }\n\n return this;\n }\n\n _calculateVertexCount(attributes, indices) {\n if (indices) {\n return indices.value.length;\n }\n let vertexCount = Infinity;\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n const {value, size, constant} = attribute;\n if (!constant && value && size >= 1) {\n vertexCount = Math.min(vertexCount, value.length / size);\n }\n }\n\n assert(Number.isFinite(vertexCount));\n return vertexCount;\n }\n}\n","// TODO v5: consider to make it private\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}","export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}","import GL from '@luma.gl/constants';\nimport {getTypedArrayFromGLType} from '../webgl-utils/typed-array-utils';\nimport {assert} from '../utils/assert';\nimport {checkProps} from '../utils/check-props';\n\nconst DEFAULT_ACCESSOR_VALUES = {\n offset: 0,\n stride: 0,\n type: GL.FLOAT,\n size: 1,\n divisor: 0,\n normalized: false,\n integer: false\n};\n\nconst PROP_CHECKS = {\n deprecatedProps: {\n instanced: 'divisor',\n isInstanced: 'divisor'\n }\n};\n\nexport default class Accessor {\n static getBytesPerElement(accessor) {\n // TODO: using `FLOAT` when type is not specified,\n // ensure this assumption is valid or force API to specify type.\n const ArrayType = getTypedArrayFromGLType(accessor.type || GL.FLOAT);\n return ArrayType.BYTES_PER_ELEMENT;\n }\n\n static getBytesPerVertex(accessor) {\n assert(accessor.size);\n // TODO: using `FLOAT` when type is not specified,\n // ensure this assumption is valid or force API to specify type.\n const ArrayType = getTypedArrayFromGLType(accessor.type || GL.FLOAT);\n return ArrayType.BYTES_PER_ELEMENT * accessor.size;\n }\n\n // Combines (merges) a list of accessors. On top of default values\n // Usually [programAccessor, bufferAccessor, appAccessor]\n // All props will be set in the returned object.\n // TODO check for conflicts between values in the supplied accessors\n static resolve(...accessors) {\n return new Accessor(...[DEFAULT_ACCESSOR_VALUES, ...accessors]); // Default values\n }\n\n constructor(...accessors) {\n accessors.forEach(accessor => this._assign(accessor)); // Merge in sequence\n Object.freeze(this);\n }\n\n toString() {\n return JSON.stringify(this);\n }\n\n // ACCESSORS\n\n // TODO - remove>\n get BYTES_PER_ELEMENT() {\n return Accessor.getBytesPerElement(this);\n }\n\n get BYTES_PER_VERTEX() {\n return Accessor.getBytesPerVertex(this);\n }\n\n // PRIVATE\n\n // eslint-disable-next-line complexity, max-statements\n _assign(props = {}) {\n props = checkProps('Accessor', props, PROP_CHECKS);\n\n if (props.type !== undefined) {\n this.type = props.type;\n\n // Auto-deduce integer type?\n if (props.type === GL.INT || props.type === GL.UNSIGNED_INT) {\n this.integer = true;\n }\n }\n if (props.size !== undefined) {\n this.size = props.size;\n }\n if (props.offset !== undefined) {\n this.offset = props.offset;\n }\n if (props.stride !== undefined) {\n this.stride = props.stride;\n }\n if (props.normalized !== undefined) {\n this.normalized = props.normalized;\n }\n if (props.integer !== undefined) {\n this.integer = props.integer;\n }\n\n // INSTANCE DIVISOR\n if (props.divisor !== undefined) {\n this.divisor = props.divisor;\n }\n\n // Buffer is optional\n if (props.buffer !== undefined) {\n this.buffer = props.buffer;\n }\n\n // The binding index (for binding e.g. Transform feedbacks and Uniform buffers)\n // TODO - should this be part of accessor?\n if (props.index !== undefined) {\n if (typeof props.index === 'boolean') {\n this.index = props.index ? 1 : 0;\n } else {\n this.index = props.index;\n }\n }\n\n // DEPRECATED\n if (props.instanced !== undefined) {\n this.divisor = props.instanced ? 1 : 0;\n }\n if (props.isInstanced !== undefined) {\n this.divisor = props.isInstanced ? 1 : 0;\n }\n\n return this;\n }\n}\n\n// TEST EXPORTS\nexport {DEFAULT_ACCESSOR_VALUES};\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar helpers = require('@turf/helpers');\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j, k, l, geometry, stopG, coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === 'FeatureCollection',\n isFeature = type === 'Feature',\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = (isFeatureCollection ? geojson.features[featureIndex].geometry :\n (isFeature ? geojson.geometry : geojson));\n isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;\n stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection ?\n geometryMaybeCollection.geometries[geomIndex] : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink = (excludeWrapCoord && (geomType === 'Polygon' || geomType === 'MultiPolygon')) ? 1 : 0;\n\n switch (geomType) {\n case null:\n break;\n case 'Point':\n if (callback(coords, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case 'LineString':\n case 'MultiPoint':\n for (j = 0; j < coords.length; j++) {\n if (callback(coords[j], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n if (geomType === 'MultiPoint') multiFeatureIndex++;\n }\n if (geomType === 'LineString') multiFeatureIndex++;\n break;\n case 'Polygon':\n case 'MultiLineString':\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (callback(coords[j][k], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n }\n if (geomType === 'MultiLineString') multiFeatureIndex++;\n if (geomType === 'Polygon') geometryIndex++;\n }\n if (geomType === 'Polygon') multiFeatureIndex++;\n break;\n case 'MultiPolygon':\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (callback(coords[j][k][l], coordIndex, featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case 'GeometryCollection':\n for (j = 0; j < geometry.geometries.length; j++)\n if (coordEach(geometry.geometries[j], callback, excludeWrapCoord) === false) return false;\n break;\n default:\n throw new Error('Unknown Geometry Type');\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(geojson, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n if (coordIndex === 0 && initialValue === undefined) previousValue = currentCoord;\n else previousValue = callback(previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex);\n }, excludeWrapCoord);\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case 'FeatureCollection':\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case 'Feature':\n callback(geojson.properties, 0);\n break;\n }\n}\n\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined) previousValue = currentProperties;\n else previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === 'Feature') {\n callback(geojson, 0);\n } else if (geojson.type === 'FeatureCollection') {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined) previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i, j, g, geometry, stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === 'FeatureCollection',\n isFeature = geojson.type === 'Feature',\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n\n geometryMaybeCollection = (isFeatureCollection ? geojson.features[i].geometry :\n (isFeature ? geojson.geometry : geojson));\n featureProperties = (isFeatureCollection ? geojson.features[i].properties :\n (isFeature ? geojson.properties : {}));\n featureBBox = (isFeatureCollection ? geojson.features[i].bbox :\n (isFeature ? geojson.bbox : undefined));\n featureId = (isFeatureCollection ? geojson.features[i].id :\n (isFeature ? geojson.id : undefined));\n isGeometryCollection = (geometryMaybeCollection) ? geometryMaybeCollection.type === 'GeometryCollection' : false;\n stopG = isGeometryCollection ? geometryMaybeCollection.geometries.length : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection ?\n geometryMaybeCollection.geometries[g] : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (callback(null, featureIndex, featureProperties, featureBBox, featureId) === false) return false;\n continue;\n }\n switch (geometry.type) {\n case 'Point':\n case 'LineString':\n case 'MultiPoint':\n case 'Polygon':\n case 'MultiLineString':\n case 'MultiPolygon': {\n if (callback(geometry, featureIndex, featureProperties, featureBBox, featureId) === false) return false;\n break;\n }\n case 'GeometryCollection': {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (callback(geometry.geometries[j], featureIndex, featureProperties, featureBBox, featureId) === false) return false;\n }\n break;\n }\n default:\n throw new Error('Unknown Geometry Type');\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(geojson, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n if (featureIndex === 0 && initialValue === undefined) previousValue = currentGeometry;\n else previousValue = callback(previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId);\n });\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = (geometry === null) ? null : geometry.type;\n switch (type) {\n case null:\n case 'Point':\n case 'LineString':\n case 'Polygon':\n if (callback(helpers.feature(geometry, properties, {bbox: bbox, id: id}), featureIndex, 0) === false) return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case 'MultiPoint':\n geomType = 'Point';\n break;\n case 'MultiLineString':\n geomType = 'LineString';\n break;\n case 'MultiPolygon':\n geomType = 'Polygon';\n break;\n }\n\n for (var multiFeatureIndex = 0; multiFeatureIndex < geometry.coordinates.length; multiFeatureIndex++) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate\n };\n if (callback(helpers.feature(geom, properties), featureIndex, multiFeatureIndex) === false) return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(geojson, function (currentFeature, featureIndex, multiFeatureIndex) {\n if (featureIndex === 0 && multiFeatureIndex === 0 && initialValue === undefined) previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex, multiFeatureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === 'Point' || type === 'MultiPoint') return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (coordEach(feature, function (currentCoord, coordIndex, featureIndexCoord, multiPartIndexCoord, geometryIndex) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (previousCoords === undefined || featureIndex > previousFeatureIndex || multiPartIndexCoord > previousMultiIndex || geometryIndex > prevGeomIndex) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = helpers.lineString([previousCoords, currentCoord], feature.properties);\n if (callback(currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) === false) return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }) === false) return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentInex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(geojson, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n if (started === false && initialValue === undefined) previousValue = currentSegment;\n else previousValue = callback(previousValue, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex);\n started = true;\n });\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error('geojson is required');\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case 'LineString':\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false) return false;\n break;\n case 'Polygon':\n for (var geometryIndex = 0; geometryIndex < coords.length; geometryIndex++) {\n if (callback(helpers.lineString(coords[geometryIndex], feature.properties), featureIndex, multiFeatureIndex, geometryIndex) === false) return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(geojson, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined) previousValue = currentLine;\n else previousValue = callback(previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex);\n });\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!helpers.isObject(options)) throw new Error('options is invalid');\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case 'FeatureCollection':\n if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case 'Feature':\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case 'Point':\n case 'MultiPoint':\n return null;\n case 'LineString':\n case 'Polygon':\n case 'MultiLineString':\n case 'MultiPolygon':\n geometry = geojson;\n break;\n default:\n throw new Error('geojson is invalid');\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case 'Point':\n case 'MultiPoint':\n return null;\n case 'LineString':\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return helpers.lineString([coords[segmentIndex], coords[segmentIndex + 1]], properties, options);\n case 'Polygon':\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0) segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return helpers.lineString([coords[geometryIndex][segmentIndex], coords[geometryIndex][segmentIndex + 1]], properties, options);\n case 'MultiLineString':\n if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return helpers.lineString([coords[multiFeatureIndex][segmentIndex], coords[multiFeatureIndex][segmentIndex + 1]], properties, options);\n case 'MultiPolygon':\n if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0) segmentIndex = coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return helpers.lineString([coords[multiFeatureIndex][geometryIndex][segmentIndex], coords[multiFeatureIndex][geometryIndex][segmentIndex + 1]], properties, options);\n }\n throw new Error('geojson is invalid');\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!helpers.isObject(options)) throw new Error('options is invalid');\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case 'FeatureCollection':\n if (featureIndex < 0) featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case 'Feature':\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case 'Point':\n case 'MultiPoint':\n return null;\n case 'LineString':\n case 'Polygon':\n case 'MultiLineString':\n case 'MultiPolygon':\n geometry = geojson;\n break;\n default:\n throw new Error('geojson is invalid');\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case 'Point':\n return helpers.point(coords, properties, options);\n case 'MultiPoint':\n if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;\n return helpers.point(coords[multiFeatureIndex], properties, options);\n case 'LineString':\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return helpers.point(coords[coordIndex], properties, options);\n case 'Polygon':\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;\n return helpers.point(coords[geometryIndex][coordIndex], properties, options);\n case 'MultiLineString':\n if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return helpers.point(coords[multiFeatureIndex][coordIndex], properties, options);\n case 'MultiPolygon':\n if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return helpers.point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);\n }\n throw new Error('geojson is invalid');\n}\n\nexports.coordEach = coordEach;\nexports.coordReduce = coordReduce;\nexports.propEach = propEach;\nexports.propReduce = propReduce;\nexports.featureEach = featureEach;\nexports.featureReduce = featureReduce;\nexports.coordAll = coordAll;\nexports.geomEach = geomEach;\nexports.geomReduce = geomReduce;\nexports.flattenEach = flattenEach;\nexports.flattenReduce = flattenReduce;\nexports.segmentEach = segmentEach;\nexports.segmentReduce = segmentReduce;\nexports.lineEach = lineEach;\nexports.lineReduce = lineReduce;\nexports.findSegment = findSegment;\nexports.findPoint = findPoint;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.red = exports.getContrastingColor = exports.isValidHex = exports.toState = exports.simpleCheckForValidColor = undefined;\n\nvar _each = require('lodash/each');\n\nvar _each2 = _interopRequireDefault(_each);\n\nvar _tinycolor = require('tinycolor2');\n\nvar _tinycolor2 = _interopRequireDefault(_tinycolor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar simpleCheckForValidColor = exports.simpleCheckForValidColor = function simpleCheckForValidColor(data) {\n var keysToCheck = ['r', 'g', 'b', 'a', 'h', 's', 'l', 'v'];\n var checked = 0;\n var passed = 0;\n (0, _each2.default)(keysToCheck, function (letter) {\n if (data[letter]) {\n checked += 1;\n if (!isNaN(data[letter])) {\n passed += 1;\n }\n if (letter === 's' || letter === 'l') {\n var percentPatt = /^\\d+%$/;\n if (percentPatt.test(data[letter])) {\n passed += 1;\n }\n }\n }\n });\n return checked === passed ? data : false;\n};\n\nvar toState = exports.toState = function toState(data, oldHue) {\n var color = data.hex ? (0, _tinycolor2.default)(data.hex) : (0, _tinycolor2.default)(data);\n var hsl = color.toHsl();\n var hsv = color.toHsv();\n var rgb = color.toRgb();\n var hex = color.toHex();\n if (hsl.s === 0) {\n hsl.h = oldHue || 0;\n hsv.h = oldHue || 0;\n }\n var transparent = hex === '000000' && rgb.a === 0;\n\n return {\n hsl: hsl,\n hex: transparent ? 'transparent' : '#' + hex,\n rgb: rgb,\n hsv: hsv,\n oldHue: data.h || oldHue || hsl.h,\n source: data.source\n };\n};\n\nvar isValidHex = exports.isValidHex = function isValidHex(hex) {\n // disable hex4 and hex8\n var lh = String(hex).charAt(0) === '#' ? 1 : 0;\n return hex.length !== 4 + lh && hex.length < 7 + lh && (0, _tinycolor2.default)(hex).isValid();\n};\n\nvar getContrastingColor = exports.getContrastingColor = function getContrastingColor(data) {\n if (!data) {\n return '#fff';\n }\n var col = toState(data);\n if (col.hex === 'transparent') {\n return 'rgba(0,0,0,0.4)';\n }\n var yiq = (col.rgb.r * 299 + col.rgb.g * 587 + col.rgb.b * 114) / 1000;\n return yiq >= 128 ? '#000' : '#fff';\n};\n\nvar red = exports.red = {\n hsl: { a: 1, h: 0, l: 0.5, s: 1 },\n hex: '#ff0000',\n rgb: { r: 255, g: 0, b: 0, a: 1 },\n hsv: { h: 0, s: 1, v: 1, a: 1 }\n};\n\nexports.default = exports;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar helpers_1 = require(\"@turf/helpers\");\nvar invariant_1 = require(\"@turf/invariant\");\n// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Takes two {@link Point|points} and finds the geographic bearing between them,\n * i.e. the angle measured in degrees from the north line (0 degrees)\n *\n * @name bearing\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.final=false] calculates the final bearing if true\n * @returns {number} bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)\n * @example\n * var point1 = turf.point([-75.343, 39.984]);\n * var point2 = turf.point([-75.534, 39.123]);\n *\n * var bearing = turf.bearing(point1, point2);\n *\n * //addToMap\n * var addToMap = [point1, point2]\n * point1.properties['marker-color'] = '#f00'\n * point2.properties['marker-color'] = '#0f0'\n * point1.properties.bearing = bearing\n */\nfunction bearing(start, end, options) {\n if (options === void 0) { options = {}; }\n // Reverse calculation\n if (options.final === true) {\n return calculateFinalBearing(start, end);\n }\n var coordinates1 = invariant_1.getCoord(start);\n var coordinates2 = invariant_1.getCoord(end);\n var lon1 = helpers_1.degreesToRadians(coordinates1[0]);\n var lon2 = helpers_1.degreesToRadians(coordinates2[0]);\n var lat1 = helpers_1.degreesToRadians(coordinates1[1]);\n var lat2 = helpers_1.degreesToRadians(coordinates2[1]);\n var a = Math.sin(lon2 - lon1) * Math.cos(lat2);\n var b = Math.cos(lat1) * Math.sin(lat2) -\n Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1);\n return helpers_1.radiansToDegrees(Math.atan2(a, b));\n}\n/**\n * Calculates Final Bearing\n *\n * @private\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @returns {number} bearing\n */\nfunction calculateFinalBearing(start, end) {\n // Swap start & end\n var bear = bearing(end, start);\n bear = (bear + 180) % 360;\n return bear;\n}\nexports.default = bearing;\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.format()\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range\n .split(/\\s*\\|\\|\\s*/)\n // map the range to a 2d array of comparators\n .map(range => this.parseRange(range.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${range}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0)\n this.set = [first]\n else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.format()\n }\n\n format () {\n this.range = this.set\n .map((comps) => {\n return comps.join(' ').trim()\n })\n .join('||')\n .trim()\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n range = range.trim()\n\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts = Object.keys(this.options).join(',')\n const memoKey = `parseRange:${memoOpts}:${range}`\n const cached = cache.get(memoKey)\n if (cached)\n return cached\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, re[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n const compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n // in loose mode, throw out any that are not valid comparators\n .filter(this.options.loose ? comp => !!comp.match(compRe) : () => true)\n .map(comp => new Comparator(comp, this.options))\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const l = rangeList.length\n const rangeMap = new Map()\n for (const comp of rangeList) {\n if (isNullSet(comp))\n return [comp]\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has(''))\n rangeMap.delete('')\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\nmodule.exports = Range\n\nconst LRU = require('lru-cache')\nconst cache = new LRU({ max: 1000 })\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace\n} = require('../internal/re')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\nconst replaceTildes = (comp, options) =>\n comp.trim().split(/\\s+/).map((comp) => {\n return replaceTilde(comp, options)\n }).join(' ')\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\nconst replaceCarets = (comp, options) =>\n comp.trim().split(/\\s+/).map((comp) => {\n return replaceCaret(comp, options)\n }).join(' ')\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map((comp) => {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<')\n pr = '-0'\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp.trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return (`${from} ${to}`).trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/**\n * Flattens a nested array into a single level array,\n * or a single value into an array with one value\n * @example flatten([[1, [2]], [3], 4]) => [1, 2, 3, 4]\n * @example flatten(1) => [1]\n * @param {Array} array The array to flatten.\n * @param {Function} filter= - Optional predicate called on each `value` to\n * determine if it should be included (pushed onto) the resulting array.\n * @param {Function} map= - Optional transform applied to each array elements.\n * @param {Array} result=[] - Optional array to push value into\n * @return {Array} Returns the new flattened array (new array or `result` if provided)\n */\nexport function flatten(array, filter = () => true) {\n // Wrap single object in array\n if (!Array.isArray(array)) {\n return filter(array) ? [array] : [];\n }\n // Deep flatten and filter the array\n return flattenArray(array, filter, []);\n}\n\n// Deep flattens an array. Helper to `flatten`, see its parameters\nfunction flattenArray(array, filter, result) {\n let index = -1;\n while (++index < array.length) {\n const value = array[index];\n if (Array.isArray(value)) {\n flattenArray(value, filter, result);\n } else if (filter(value)) {\n result.push(value);\n }\n }\n return result;\n}\n\n// Uses copyWithin to significantly speed up typed array value filling\nexport function fillArray({target, source, start = 0, count = 1}) {\n const length = source.length;\n const total = count * length;\n let copied = 0;\n for (let i = start; copied < length; copied++) {\n target[i++] = source[copied];\n }\n\n while (copied < total) {\n // If we have copied less than half, copy everything we got\n // else copy remaining in one operation\n if (copied < total - copied) {\n target.copyWithin(start + copied, start, start + copied);\n copied *= 2;\n } else {\n target.copyWithin(start + copied, start, start + total - copied);\n copied = total;\n }\n }\n\n return target;\n}\n","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166;\n var timeout;\n\n function debounced() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // eslint-disable-next-line consistent-this\n var that = this;\n\n var later = function later() {\n func.apply(that, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n\n debounced.clear = function () {\n clearTimeout(timeout);\n };\n\n return debounced;\n}","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","export class TypedArrayManager {\n constructor(props) {\n this._pool = [];\n this.props = {overAlloc: 2, poolSize: 100};\n this.setProps(props);\n }\n\n setProps(props) {\n Object.assign(this.props, props);\n }\n\n allocate(\n typedArray,\n count,\n {size = 1, type, padding = 0, copy = false, initialize = false, maxCount}\n ) {\n const Type = type || (typedArray && typedArray.constructor) || Float32Array;\n\n const newSize = count * size + padding;\n if (ArrayBuffer.isView(typedArray)) {\n if (newSize <= typedArray.length) {\n return typedArray;\n }\n if (newSize * typedArray.BYTES_PER_ELEMENT <= typedArray.buffer.byteLength) {\n return new Type(typedArray.buffer, 0, newSize);\n }\n }\n\n let maxSize;\n if (maxCount) {\n maxSize = maxCount * size + padding;\n }\n\n const newArray = this._allocate(Type, newSize, initialize, maxSize);\n\n if (typedArray && copy) {\n newArray.set(typedArray);\n } else if (!initialize) {\n // Hack - always initialize the first 4 elements. NaNs crash the Attribute validation\n newArray.fill(0, 0, 4);\n }\n\n this._release(typedArray);\n return newArray;\n }\n\n release(typedArray) {\n this._release(typedArray);\n }\n\n _allocate(Type, size, initialize, maxSize) {\n // Allocate at least one element to ensure a valid buffer\n let sizeToAllocate = Math.max(Math.ceil(size * this.props.overAlloc), 1);\n // Don't over allocate after certain specified number of elements\n if (sizeToAllocate > maxSize) {\n sizeToAllocate = maxSize;\n }\n\n // Check if available in pool\n const pool = this._pool;\n const byteLength = Type.BYTES_PER_ELEMENT * sizeToAllocate;\n const i = pool.findIndex(b => b.byteLength >= byteLength);\n if (i >= 0) {\n // Create a new array using an existing buffer\n const array = new Type(pool.splice(i, 1)[0], 0, sizeToAllocate);\n if (initialize) {\n // Viewing a buffer with a different type may create NaNs\n array.fill(0);\n }\n return array;\n }\n return new Type(sizeToAllocate);\n }\n\n _release(typedArray) {\n if (!ArrayBuffer.isView(typedArray)) {\n return;\n }\n const pool = this._pool;\n const {buffer} = typedArray;\n // Save the buffer of the released array into the pool\n // Sort buffers by size\n // TODO - implement binary search?\n const {byteLength} = buffer;\n const i = pool.findIndex(b => b.byteLength >= byteLength);\n if (i < 0) {\n pool.push(buffer);\n } else if (i > 0 || pool.length < this.props.poolSize) {\n pool.splice(i, 0, buffer);\n }\n if (pool.length > this.props.poolSize) {\n // Drop the smallest one\n pool.shift();\n }\n }\n}\n\nexport default new TypedArrayManager();\n","export var reflow = function reflow(node) {\n return node.scrollTop;\n};\nexport function getTransitionProps(props, options) {\n var timeout = props.timeout,\n _props$style = props.style,\n style = _props$style === void 0 ? {} : _props$style;\n return {\n duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,\n delay: style.transitionDelay\n };\n}","// Tables describing WebGL parameters\nimport GL from '@luma.gl/constants';\nimport {isWebGL2} from '../utils/webgl-checks';\n\n// DEFAULT SETTINGS - FOR FAST CACHE INITIALIZATION AND CONTEXT RESETS\n\n/* eslint-disable no-shadow */\n\nexport const GL_PARAMETER_DEFAULTS = {\n [GL.BLEND]: false,\n [GL.BLEND_COLOR]: new Float32Array([0, 0, 0, 0]),\n [GL.BLEND_EQUATION_RGB]: GL.FUNC_ADD,\n [GL.BLEND_EQUATION_ALPHA]: GL.FUNC_ADD,\n [GL.BLEND_SRC_RGB]: GL.ONE,\n [GL.BLEND_DST_RGB]: GL.ZERO,\n [GL.BLEND_SRC_ALPHA]: GL.ONE,\n [GL.BLEND_DST_ALPHA]: GL.ZERO,\n [GL.COLOR_CLEAR_VALUE]: new Float32Array([0, 0, 0, 0]), // TBD\n [GL.COLOR_WRITEMASK]: [true, true, true, true],\n [GL.CULL_FACE]: false,\n [GL.CULL_FACE_MODE]: GL.BACK,\n [GL.DEPTH_TEST]: false,\n [GL.DEPTH_CLEAR_VALUE]: 1,\n [GL.DEPTH_FUNC]: GL.LESS,\n [GL.DEPTH_RANGE]: new Float32Array([0, 1]), // TBD\n [GL.DEPTH_WRITEMASK]: true,\n [GL.DITHER]: true,\n // FRAMEBUFFER_BINDING and DRAW_FRAMEBUFFER_BINDING(WebGL2) refer same state.\n [GL.FRAMEBUFFER_BINDING]: null,\n [GL.FRONT_FACE]: GL.CCW,\n [GL.GENERATE_MIPMAP_HINT]: GL.DONT_CARE,\n [GL.LINE_WIDTH]: 1,\n [GL.POLYGON_OFFSET_FILL]: false,\n [GL.POLYGON_OFFSET_FACTOR]: 0,\n [GL.POLYGON_OFFSET_UNITS]: 0,\n [GL.SAMPLE_COVERAGE_VALUE]: 1.0,\n [GL.SAMPLE_COVERAGE_INVERT]: false,\n [GL.SCISSOR_TEST]: false,\n // Note: Dynamic value. If scissor test enabled we expect users to set correct scissor box\n [GL.SCISSOR_BOX]: new Int32Array([0, 0, 1024, 1024]),\n [GL.STENCIL_TEST]: false,\n [GL.STENCIL_CLEAR_VALUE]: 0,\n [GL.STENCIL_WRITEMASK]: 0xffffffff,\n [GL.STENCIL_BACK_WRITEMASK]: 0xffffffff,\n [GL.STENCIL_FUNC]: GL.ALWAYS,\n [GL.STENCIL_REF]: 0,\n [GL.STENCIL_VALUE_MASK]: 0xffffffff,\n [GL.STENCIL_BACK_FUNC]: GL.ALWAYS,\n [GL.STENCIL_BACK_REF]: 0,\n [GL.STENCIL_BACK_VALUE_MASK]: 0xffffffff,\n [GL.STENCIL_FAIL]: GL.KEEP,\n [GL.STENCIL_PASS_DEPTH_FAIL]: GL.KEEP,\n [GL.STENCIL_PASS_DEPTH_PASS]: GL.KEEP,\n [GL.STENCIL_BACK_FAIL]: GL.KEEP,\n [GL.STENCIL_BACK_PASS_DEPTH_FAIL]: GL.KEEP,\n [GL.STENCIL_BACK_PASS_DEPTH_PASS]: GL.KEEP,\n // Dynamic value: We use [0, 0, 1024, 1024] as default, but usually this is updated in each frame.\n [GL.VIEWPORT]: [0, 0, 1024, 1024],\n // WEBGL1 PIXEL PACK/UNPACK MODES\n [GL.PACK_ALIGNMENT]: 4,\n [GL.UNPACK_ALIGNMENT]: 4,\n [GL.UNPACK_FLIP_Y_WEBGL]: false,\n [GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL]: false,\n [GL.UNPACK_COLORSPACE_CONVERSION_WEBGL]: GL.BROWSER_DEFAULT_WEBGL,\n\n // WEBGL2 / EXTENSIONS\n // gl1: 'OES_standard_derivatives'\n [GL.FRAGMENT_SHADER_DERIVATIVE_HINT]: GL.DONT_CARE,\n [GL.READ_FRAMEBUFFER_BINDING]: null,\n [GL.RASTERIZER_DISCARD]: false,\n [GL.PACK_ROW_LENGTH]: 0,\n [GL.PACK_SKIP_PIXELS]: 0,\n [GL.PACK_SKIP_ROWS]: 0,\n [GL.UNPACK_ROW_LENGTH]: 0,\n [GL.UNPACK_IMAGE_HEIGHT]: 0,\n [GL.UNPACK_SKIP_PIXELS]: 0,\n [GL.UNPACK_SKIP_ROWS]: 0,\n [GL.UNPACK_SKIP_IMAGES]: 0\n};\n\n// SETTER TABLES - ENABLES SETTING ANY PARAMETER WITH A COMMON API\n\nconst enable = (gl, value, key) => (value ? gl.enable(key) : gl.disable(key));\nconst hint = (gl, value, key) => gl.hint(key, value);\nconst pixelStorei = (gl, value, key) => gl.pixelStorei(key, value);\n\nconst drawFramebuffer = (gl, value) => {\n const target = isWebGL2(gl) ? GL.DRAW_FRAMEBUFFER : GL.FRAMEBUFFER;\n return gl.bindFramebuffer(target, value);\n};\nconst readFramebuffer = (gl, value) => {\n return gl.bindFramebuffer(GL.READ_FRAMEBUFFER, value);\n};\n\n// Utility\nfunction isArray(array) {\n return Array.isArray(array) || ArrayBuffer.isView(array);\n}\n\n// Map from WebGL parameter names to corresponding WebGL setter functions\n// WegGL constants are read by parameter names, but set by function names\n// NOTE: When value type is a string, it will be handled by 'GL_COMPOSITE_PARAMETER_SETTERS'\nexport const GL_PARAMETER_SETTERS = {\n [GL.BLEND]: enable,\n [GL.BLEND_COLOR]: (gl, value) => gl.blendColor(...value),\n [GL.BLEND_EQUATION_RGB]: 'blendEquation',\n [GL.BLEND_EQUATION_ALPHA]: 'blendEquation',\n [GL.BLEND_SRC_RGB]: 'blendFunc',\n [GL.BLEND_DST_RGB]: 'blendFunc',\n [GL.BLEND_SRC_ALPHA]: 'blendFunc',\n [GL.BLEND_DST_ALPHA]: 'blendFunc',\n [GL.COLOR_CLEAR_VALUE]: (gl, value) => gl.clearColor(...value),\n [GL.COLOR_WRITEMASK]: (gl, value) => gl.colorMask(...value),\n [GL.CULL_FACE]: enable,\n [GL.CULL_FACE_MODE]: (gl, value) => gl.cullFace(value),\n [GL.DEPTH_TEST]: enable,\n [GL.DEPTH_CLEAR_VALUE]: (gl, value) => gl.clearDepth(value),\n [GL.DEPTH_FUNC]: (gl, value) => gl.depthFunc(value),\n [GL.DEPTH_RANGE]: (gl, value) => gl.depthRange(...value),\n [GL.DEPTH_WRITEMASK]: (gl, value) => gl.depthMask(value),\n [GL.DITHER]: enable,\n [GL.FRAGMENT_SHADER_DERIVATIVE_HINT]: hint,\n // NOTE: FRAMEBUFFER_BINDING and DRAW_FRAMEBUFFER_BINDING(WebGL2) refer same state.\n [GL.FRAMEBUFFER_BINDING]: drawFramebuffer,\n [GL.FRONT_FACE]: (gl, value) => gl.frontFace(value),\n [GL.GENERATE_MIPMAP_HINT]: hint,\n [GL.LINE_WIDTH]: (gl, value) => gl.lineWidth(value),\n [GL.POLYGON_OFFSET_FILL]: enable,\n [GL.POLYGON_OFFSET_FACTOR]: 'polygonOffset',\n [GL.POLYGON_OFFSET_UNITS]: 'polygonOffset',\n [GL.RASTERIZER_DISCARD]: enable,\n [GL.SAMPLE_COVERAGE_VALUE]: 'sampleCoverage',\n [GL.SAMPLE_COVERAGE_INVERT]: 'sampleCoverage',\n [GL.SCISSOR_TEST]: enable,\n [GL.SCISSOR_BOX]: (gl, value) => gl.scissor(...value),\n [GL.STENCIL_TEST]: enable,\n [GL.STENCIL_CLEAR_VALUE]: (gl, value) => gl.clearStencil(value),\n [GL.STENCIL_WRITEMASK]: (gl, value) => gl.stencilMaskSeparate(GL.FRONT, value),\n [GL.STENCIL_BACK_WRITEMASK]: (gl, value) => gl.stencilMaskSeparate(GL.BACK, value),\n [GL.STENCIL_FUNC]: 'stencilFuncFront',\n [GL.STENCIL_REF]: 'stencilFuncFront',\n [GL.STENCIL_VALUE_MASK]: 'stencilFuncFront',\n [GL.STENCIL_BACK_FUNC]: 'stencilFuncBack',\n [GL.STENCIL_BACK_REF]: 'stencilFuncBack',\n [GL.STENCIL_BACK_VALUE_MASK]: 'stencilFuncBack',\n [GL.STENCIL_FAIL]: 'stencilOpFront',\n [GL.STENCIL_PASS_DEPTH_FAIL]: 'stencilOpFront',\n [GL.STENCIL_PASS_DEPTH_PASS]: 'stencilOpFront',\n [GL.STENCIL_BACK_FAIL]: 'stencilOpBack',\n [GL.STENCIL_BACK_PASS_DEPTH_FAIL]: 'stencilOpBack',\n [GL.STENCIL_BACK_PASS_DEPTH_PASS]: 'stencilOpBack',\n [GL.VIEWPORT]: (gl, value) => gl.viewport(...value),\n\n // WEBGL1 PIXEL PACK/UNPACK MODES\n [GL.PACK_ALIGNMENT]: pixelStorei,\n [GL.UNPACK_ALIGNMENT]: pixelStorei,\n [GL.UNPACK_FLIP_Y_WEBGL]: pixelStorei,\n [GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL]: pixelStorei,\n [GL.UNPACK_COLORSPACE_CONVERSION_WEBGL]: pixelStorei,\n\n // WEBGL2 PIXEL PACK/UNPACK MODES\n // RASTERIZER_DISCARD ...\n [GL.PACK_ROW_LENGTH]: pixelStorei,\n [GL.PACK_SKIP_PIXELS]: pixelStorei,\n [GL.PACK_SKIP_ROWS]: pixelStorei,\n [GL.READ_FRAMEBUFFER_BINDING]: readFramebuffer,\n [GL.UNPACK_ROW_LENGTH]: pixelStorei,\n [GL.UNPACK_IMAGE_HEIGHT]: pixelStorei,\n [GL.UNPACK_SKIP_PIXELS]: pixelStorei,\n [GL.UNPACK_SKIP_ROWS]: pixelStorei,\n [GL.UNPACK_SKIP_IMAGES]: pixelStorei,\n\n // Function-style setters\n framebuffer: (gl, framebuffer) => {\n // accepts 1) a WebGLFramebuffer 2) null (default framebuffer), or 3) luma.gl Framebuffer class\n // framebuffer is null when restoring to default framebuffer, otherwise use the WebGL handle.\n const handle = framebuffer && 'handle' in framebuffer ? framebuffer.handle : framebuffer;\n return gl.bindFramebuffer(GL.FRAMEBUFFER, handle);\n },\n blend: (gl, value) => (value ? gl.enable(GL.BLEND) : gl.disable(GL.BLEND)),\n blendColor: (gl, value) => gl.blendColor(...value),\n blendEquation: (gl, args) => {\n args = isArray(args) ? args : [args, args];\n gl.blendEquationSeparate(...args);\n },\n blendFunc: (gl, args) => {\n args = isArray(args) && args.length === 2 ? [...args, ...args] : args;\n gl.blendFuncSeparate(...args);\n },\n\n clearColor: (gl, value) => gl.clearColor(...value),\n clearDepth: (gl, value) => gl.clearDepth(value),\n clearStencil: (gl, value) => gl.clearStencil(value),\n\n colorMask: (gl, value) => gl.colorMask(...value),\n\n cull: (gl, value) => (value ? gl.enable(GL.CULL_FACE) : gl.disable(GL.CULL_FACE)),\n cullFace: (gl, value) => gl.cullFace(value),\n\n depthTest: (gl, value) => (value ? gl.enable(GL.DEPTH_TEST) : gl.disable(GL.DEPTH_TEST)),\n depthFunc: (gl, value) => gl.depthFunc(value),\n depthMask: (gl, value) => gl.depthMask(value),\n depthRange: (gl, value) => gl.depthRange(...value),\n\n dither: (gl, value) => (value ? gl.enable(GL.DITHER) : gl.disable(GL.DITHER)),\n\n derivativeHint: (gl, value) => {\n // gl1: 'OES_standard_derivatives'\n gl.hint(GL.FRAGMENT_SHADER_DERIVATIVE_HINT, value);\n },\n\n frontFace: (gl, value) => gl.frontFace(value),\n\n mipmapHint: (gl, value) => gl.hint(GL.GENERATE_MIPMAP_HINT, value),\n\n lineWidth: (gl, value) => gl.lineWidth(value),\n\n polygonOffsetFill: (gl, value) =>\n value ? gl.enable(GL.POLYGON_OFFSET_FILL) : gl.disable(GL.POLYGON_OFFSET_FILL),\n polygonOffset: (gl, value) => gl.polygonOffset(...value),\n\n sampleCoverage: (gl, value) => gl.sampleCoverage(...value),\n\n scissorTest: (gl, value) => (value ? gl.enable(GL.SCISSOR_TEST) : gl.disable(GL.SCISSOR_TEST)),\n scissor: (gl, value) => gl.scissor(...value),\n\n stencilTest: (gl, value) => (value ? gl.enable(GL.STENCIL_TEST) : gl.disable(GL.STENCIL_TEST)),\n stencilMask: (gl, value) => {\n value = isArray(value) ? value : [value, value];\n const [mask, backMask] = value;\n gl.stencilMaskSeparate(GL.FRONT, mask);\n gl.stencilMaskSeparate(GL.BACK, backMask);\n },\n stencilFunc: (gl, args) => {\n args = isArray(args) && args.length === 3 ? [...args, ...args] : args;\n const [func, ref, mask, backFunc, backRef, backMask] = args;\n gl.stencilFuncSeparate(GL.FRONT, func, ref, mask);\n gl.stencilFuncSeparate(GL.BACK, backFunc, backRef, backMask);\n },\n stencilOp: (gl, args) => {\n args = isArray(args) && args.length === 3 ? [...args, ...args] : args;\n const [sfail, dpfail, dppass, backSfail, backDpfail, backDppass] = args;\n gl.stencilOpSeparate(GL.FRONT, sfail, dpfail, dppass);\n gl.stencilOpSeparate(GL.BACK, backSfail, backDpfail, backDppass);\n },\n\n viewport: (gl, value) => gl.viewport(...value)\n};\n\nfunction getValue(glEnum, values, cache) {\n return values[glEnum] !== undefined ? values[glEnum] : cache[glEnum];\n}\n\n// COMPOSITE_WEBGL_PARAMETER_\nexport const GL_COMPOSITE_PARAMETER_SETTERS = {\n blendEquation: (gl, values, cache) =>\n gl.blendEquationSeparate(\n getValue(GL.BLEND_EQUATION_RGB, values, cache),\n getValue(GL.BLEND_EQUATION_ALPHA, values, cache)\n ),\n blendFunc: (gl, values, cache) =>\n gl.blendFuncSeparate(\n getValue(GL.BLEND_SRC_RGB, values, cache),\n getValue(GL.BLEND_DST_RGB, values, cache),\n getValue(GL.BLEND_SRC_ALPHA, values, cache),\n getValue(GL.BLEND_DST_ALPHA, values, cache)\n ),\n polygonOffset: (gl, values, cache) =>\n gl.polygonOffset(\n getValue(GL.POLYGON_OFFSET_FACTOR, values, cache),\n getValue(GL.POLYGON_OFFSET_UNITS, values, cache)\n ),\n sampleCoverage: (gl, values, cache) =>\n gl.sampleCoverage(\n getValue(GL.SAMPLE_COVERAGE_VALUE, values, cache),\n getValue(GL.SAMPLE_COVERAGE_INVERT, values, cache)\n ),\n stencilFuncFront: (gl, values, cache) =>\n gl.stencilFuncSeparate(\n GL.FRONT,\n getValue(GL.STENCIL_FUNC, values, cache),\n getValue(GL.STENCIL_REF, values, cache),\n getValue(GL.STENCIL_VALUE_MASK, values, cache)\n ),\n stencilFuncBack: (gl, values, cache) =>\n gl.stencilFuncSeparate(\n GL.BACK,\n getValue(GL.STENCIL_BACK_FUNC, values, cache),\n getValue(GL.STENCIL_BACK_REF, values, cache),\n getValue(GL.STENCIL_BACK_VALUE_MASK, values, cache)\n ),\n stencilOpFront: (gl, values, cache) =>\n gl.stencilOpSeparate(\n GL.FRONT,\n getValue(GL.STENCIL_FAIL, values, cache),\n getValue(GL.STENCIL_PASS_DEPTH_FAIL, values, cache),\n getValue(GL.STENCIL_PASS_DEPTH_PASS, values, cache)\n ),\n stencilOpBack: (gl, values, cache) =>\n gl.stencilOpSeparate(\n GL.BACK,\n getValue(GL.STENCIL_BACK_FAIL, values, cache),\n getValue(GL.STENCIL_BACK_PASS_DEPTH_FAIL, values, cache),\n getValue(GL.STENCIL_BACK_PASS_DEPTH_PASS, values, cache)\n )\n};\n\n// Setter functions intercepted for cache updates\nexport const GL_HOOKED_SETTERS = {\n // GENERIC SETTERS\n\n enable: (update, capability) =>\n update({\n [capability]: true\n }),\n disable: (update, capability) =>\n update({\n [capability]: false\n }),\n pixelStorei: (update, pname, value) =>\n update({\n [pname]: value\n }),\n hint: (update, pname, hint) =>\n update({\n [pname]: hint\n }),\n\n // SPECIFIC SETTERS\n\n bindFramebuffer: (update, target, framebuffer) => {\n switch (target) {\n case GL.FRAMEBUFFER:\n return update({\n [GL.DRAW_FRAMEBUFFER_BINDING]: framebuffer,\n [GL.READ_FRAMEBUFFER_BINDING]: framebuffer\n });\n case GL.DRAW_FRAMEBUFFER:\n return update({[GL.DRAW_FRAMEBUFFER_BINDING]: framebuffer});\n case GL.READ_FRAMEBUFFER:\n return update({[GL.READ_FRAMEBUFFER_BINDING]: framebuffer});\n default:\n return null;\n }\n },\n blendColor: (update, r, g, b, a) =>\n update({\n [GL.BLEND_COLOR]: new Float32Array([r, g, b, a])\n }),\n\n blendEquation: (update, mode) =>\n update({\n [GL.BLEND_EQUATION_RGB]: mode,\n [GL.BLEND_EQUATION_ALPHA]: mode\n }),\n\n blendEquationSeparate: (update, modeRGB, modeAlpha) =>\n update({\n [GL.BLEND_EQUATION_RGB]: modeRGB,\n [GL.BLEND_EQUATION_ALPHA]: modeAlpha\n }),\n\n blendFunc: (update, src, dst) =>\n update({\n [GL.BLEND_SRC_RGB]: src,\n [GL.BLEND_DST_RGB]: dst,\n [GL.BLEND_SRC_ALPHA]: src,\n [GL.BLEND_DST_ALPHA]: dst\n }),\n\n blendFuncSeparate: (update, srcRGB, dstRGB, srcAlpha, dstAlpha) =>\n update({\n [GL.BLEND_SRC_RGB]: srcRGB,\n [GL.BLEND_DST_RGB]: dstRGB,\n [GL.BLEND_SRC_ALPHA]: srcAlpha,\n [GL.BLEND_DST_ALPHA]: dstAlpha\n }),\n\n clearColor: (update, r, g, b, a) =>\n update({\n [GL.COLOR_CLEAR_VALUE]: new Float32Array([r, g, b, a])\n }),\n\n clearDepth: (update, depth) =>\n update({\n [GL.DEPTH_CLEAR_VALUE]: depth\n }),\n\n clearStencil: (update, s) =>\n update({\n [GL.STENCIL_CLEAR_VALUE]: s\n }),\n\n colorMask: (update, r, g, b, a) =>\n update({\n [GL.COLOR_WRITEMASK]: [r, g, b, a]\n }),\n\n cullFace: (update, mode) =>\n update({\n [GL.CULL_FACE_MODE]: mode\n }),\n\n depthFunc: (update, func) =>\n update({\n [GL.DEPTH_FUNC]: func\n }),\n\n depthRange: (update, zNear, zFar) =>\n update({\n [GL.DEPTH_RANGE]: new Float32Array([zNear, zFar])\n }),\n\n depthMask: (update, mask) =>\n update({\n [GL.DEPTH_WRITEMASK]: mask\n }),\n\n frontFace: (update, face) =>\n update({\n [GL.FRONT_FACE]: face\n }),\n\n lineWidth: (update, width) =>\n update({\n [GL.LINE_WIDTH]: width\n }),\n\n polygonOffset: (update, factor, units) =>\n update({\n [GL.POLYGON_OFFSET_FACTOR]: factor,\n [GL.POLYGON_OFFSET_UNITS]: units\n }),\n\n sampleCoverage: (update, value, invert) =>\n update({\n [GL.SAMPLE_COVERAGE_VALUE]: value,\n [GL.SAMPLE_COVERAGE_INVERT]: invert\n }),\n\n scissor: (update, x, y, width, height) =>\n update({\n [GL.SCISSOR_BOX]: new Int32Array([x, y, width, height])\n }),\n\n stencilMask: (update, mask) =>\n update({\n [GL.STENCIL_WRITEMASK]: mask,\n [GL.STENCIL_BACK_WRITEMASK]: mask\n }),\n\n stencilMaskSeparate: (update, face, mask) =>\n update({\n [face === GL.FRONT ? GL.STENCIL_WRITEMASK : GL.STENCIL_BACK_WRITEMASK]: mask\n }),\n\n stencilFunc: (update, func, ref, mask) =>\n update({\n [GL.STENCIL_FUNC]: func,\n [GL.STENCIL_REF]: ref,\n [GL.STENCIL_VALUE_MASK]: mask,\n [GL.STENCIL_BACK_FUNC]: func,\n [GL.STENCIL_BACK_REF]: ref,\n [GL.STENCIL_BACK_VALUE_MASK]: mask\n }),\n\n stencilFuncSeparate: (update, face, func, ref, mask) =>\n update({\n [face === GL.FRONT ? GL.STENCIL_FUNC : GL.STENCIL_BACK_FUNC]: func,\n [face === GL.FRONT ? GL.STENCIL_REF : GL.STENCIL_BACK_REF]: ref,\n [face === GL.FRONT ? GL.STENCIL_VALUE_MASK : GL.STENCIL_BACK_VALUE_MASK]: mask\n }),\n\n stencilOp: (update, fail, zfail, zpass) =>\n update({\n [GL.STENCIL_FAIL]: fail,\n [GL.STENCIL_PASS_DEPTH_FAIL]: zfail,\n [GL.STENCIL_PASS_DEPTH_PASS]: zpass,\n [GL.STENCIL_BACK_FAIL]: fail,\n [GL.STENCIL_BACK_PASS_DEPTH_FAIL]: zfail,\n [GL.STENCIL_BACK_PASS_DEPTH_PASS]: zpass\n }),\n\n stencilOpSeparate: (update, face, fail, zfail, zpass) =>\n update({\n [face === GL.FRONT ? GL.STENCIL_FAIL : GL.STENCIL_BACK_FAIL]: fail,\n [face === GL.FRONT ? GL.STENCIL_PASS_DEPTH_FAIL : GL.STENCIL_BACK_PASS_DEPTH_FAIL]: zfail,\n [face === GL.FRONT ? GL.STENCIL_PASS_DEPTH_PASS : GL.STENCIL_BACK_PASS_DEPTH_PASS]: zpass\n }),\n\n viewport: (update, x, y, width, height) =>\n update({\n [GL.VIEWPORT]: [x, y, width, height]\n })\n};\n\n// GETTER TABLE - FOR READING OUT AN ENTIRE CONTEXT\n\nconst isEnabled = (gl, key) => gl.isEnabled(key);\n\n// Exceptions for any keys that cannot be queried by gl.getParameters\nexport const GL_PARAMETER_GETTERS = {\n [GL.BLEND]: isEnabled,\n [GL.CULL_FACE]: isEnabled,\n [GL.DEPTH_TEST]: isEnabled,\n [GL.DITHER]: isEnabled,\n [GL.POLYGON_OFFSET_FILL]: isEnabled,\n [GL.SAMPLE_ALPHA_TO_COVERAGE]: isEnabled,\n [GL.SAMPLE_COVERAGE]: isEnabled,\n [GL.SCISSOR_TEST]: isEnabled,\n [GL.STENCIL_TEST]: isEnabled,\n\n // WebGL 2\n [GL.RASTERIZER_DISCARD]: isEnabled\n};\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n return function (props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<<anonymous>>';\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(\"The \".concat(location, \" `\").concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameSafe, \"` is deprecated. \").concat(reason));\n }\n\n return null;\n };\n}","import {\n Feature,\n FeatureCollection,\n Geometry,\n Polygon,\n MultiLineString,\n MultiPolygon,\n Position,\n PolygonCoordinates,\n} from '../geojson-types';\n\nexport class ImmutableFeatureCollection {\n featureCollection: FeatureCollection;\n\n constructor(featureCollection: FeatureCollection) {\n this.featureCollection = featureCollection;\n }\n\n getObject() {\n return this.featureCollection;\n }\n\n /**\n * Replaces the position deeply nested withing the given feature's geometry.\n * Works with Point, MultiPoint, LineString, MultiLineString, Polygon, and MultiPolygon.\n *\n * @param featureIndex The index of the feature to update\n * @param positionIndexes An array containing the indexes of the position to replace\n * @param updatedPosition The updated position to place in the result (i.e. [lng, lat])\n *\n * @returns A new `ImmutableFeatureCollection` with the given position replaced. Does not modify this `ImmutableFeatureCollection`.\n */\n replacePosition(\n featureIndex: number,\n positionIndexes: number[] | null | undefined,\n updatedPosition: Position\n ): ImmutableFeatureCollection {\n const geometry = this.featureCollection.features[featureIndex].geometry;\n\n const isPolygonal = geometry.type === 'Polygon' || geometry.type === 'MultiPolygon';\n const updatedGeometry: any = {\n ...geometry,\n coordinates: immutablyReplacePosition(\n geometry.coordinates,\n positionIndexes,\n updatedPosition,\n isPolygonal\n ),\n };\n\n return this.replaceGeometry(featureIndex, updatedGeometry);\n }\n\n /**\n * Removes a position deeply nested in a GeoJSON geometry coordinates array.\n * Works with MultiPoint, LineString, MultiLineString, Polygon, and MultiPolygon.\n *\n * @param featureIndex The index of the feature to update\n * @param positionIndexes An array containing the indexes of the postion to remove\n *\n * @returns A new `ImmutableFeatureCollection` with the given coordinate removed. Does not modify this `ImmutableFeatureCollection`.\n */\n removePosition(\n featureIndex: number,\n positionIndexes: number[] | null | undefined\n ): ImmutableFeatureCollection {\n const geometry = this.featureCollection.features[featureIndex].geometry;\n\n if (geometry.type === 'Point') {\n throw Error(`Can't remove a position from a Point or there'd be nothing left`);\n }\n if (\n geometry.type === 'MultiPoint' && // only 1 point left\n geometry.coordinates.length < 2\n ) {\n throw Error(`Can't remove the last point of a MultiPoint or there'd be nothing left`);\n }\n if (\n geometry.type === 'LineString' && // only 2 positions\n geometry.coordinates.length < 3\n ) {\n throw Error(`Can't remove position. LineString must have at least two positions`);\n }\n if (\n geometry.type === 'Polygon' && // outer ring is a triangle\n geometry.coordinates[0].length < 5 &&\n Array.isArray(positionIndexes) && // trying to remove from outer ring\n positionIndexes[0] === 0\n ) {\n throw Error(`Can't remove position. Polygon's outer ring must have at least four positions`);\n }\n if (\n geometry.type === 'MultiLineString' && // only 1 LineString left\n geometry.coordinates.length === 1 && // only 2 positions\n geometry.coordinates[0].length < 3\n ) {\n throw Error(`Can't remove position. MultiLineString must have at least two positions`);\n }\n if (\n geometry.type === 'MultiPolygon' && // only 1 polygon left\n geometry.coordinates.length === 1 && // outer ring is a triangle\n geometry.coordinates[0][0].length < 5 &&\n Array.isArray(positionIndexes) && // trying to remove from first polygon\n positionIndexes[0] === 0 && // trying to remove from outer ring\n positionIndexes[1] === 0\n ) {\n throw Error(\n `Can't remove position. MultiPolygon's outer ring must have at least four positions`\n );\n }\n\n const isPolygonal = geometry.type === 'Polygon' || geometry.type === 'MultiPolygon';\n const updatedGeometry: any = {\n ...geometry,\n coordinates: immutablyRemovePosition(geometry.coordinates, positionIndexes, isPolygonal),\n };\n\n // Handle cases where incomplete geometries need pruned (e.g. holes that were triangles)\n pruneGeometryIfNecessary(updatedGeometry);\n\n return this.replaceGeometry(featureIndex, updatedGeometry);\n }\n\n /**\n * Adds a position deeply nested in a GeoJSON geometry coordinates array.\n * Works with MultiPoint, LineString, MultiLineString, Polygon, and MultiPolygon.\n *\n * @param featureIndex The index of the feature to update\n * @param positionIndexes An array containing the indexes of the position that will proceed the new position\n * @param positionToAdd The new position to place in the result (i.e. [lng, lat])\n *\n * @returns A new `ImmutableFeatureCollection` with the given coordinate removed. Does not modify this `ImmutableFeatureCollection`.\n */\n addPosition(\n featureIndex: number,\n positionIndexes: number[] | null | undefined,\n positionToAdd: Position\n ): ImmutableFeatureCollection {\n const geometry = this.featureCollection.features[featureIndex].geometry;\n\n if (geometry.type === 'Point') {\n throw new Error('Unable to add a position to a Point feature');\n }\n\n const isPolygonal = geometry.type === 'Polygon' || geometry.type === 'MultiPolygon';\n const updatedGeometry: any = {\n ...geometry,\n coordinates: immutablyAddPosition(\n geometry.coordinates,\n positionIndexes,\n positionToAdd,\n isPolygonal\n ),\n };\n\n return this.replaceGeometry(featureIndex, updatedGeometry);\n }\n\n replaceGeometry(featureIndex: number, geometry: Geometry): ImmutableFeatureCollection {\n const updatedFeature: any = {\n ...this.featureCollection.features[featureIndex],\n geometry,\n };\n\n const updatedFeatureCollection = {\n ...this.featureCollection,\n features: [\n ...this.featureCollection.features.slice(0, featureIndex),\n updatedFeature,\n ...this.featureCollection.features.slice(featureIndex + 1),\n ],\n };\n\n return new ImmutableFeatureCollection(updatedFeatureCollection);\n }\n\n addFeature(feature: Feature): ImmutableFeatureCollection {\n return this.addFeatures([feature]);\n }\n\n addFeatures(features: Feature[]): ImmutableFeatureCollection {\n const updatedFeatureCollection = {\n ...this.featureCollection,\n features: [...this.featureCollection.features, ...features],\n };\n\n return new ImmutableFeatureCollection(updatedFeatureCollection);\n }\n\n deleteFeature(featureIndex: number) {\n return this.deleteFeatures([featureIndex]);\n }\n\n deleteFeatures(featureIndexes: number[]) {\n const features = [...this.featureCollection.features];\n featureIndexes.sort();\n for (let i = featureIndexes.length - 1; i >= 0; i--) {\n const featureIndex = featureIndexes[i];\n if (featureIndex >= 0 && featureIndex < features.length) {\n features.splice(featureIndex, 1);\n }\n }\n\n const updatedFeatureCollection = {\n ...this.featureCollection,\n features,\n };\n\n return new ImmutableFeatureCollection(updatedFeatureCollection);\n }\n}\n\nfunction getUpdatedPosition(updatedPosition: Position, previousPosition: Position): Position {\n // This function checks if the updatedPosition is missing elevation\n // and copies it from previousPosition\n if (updatedPosition.length === 2 && previousPosition.length === 3) {\n const elevation = (previousPosition as any)[2];\n return [updatedPosition[0], updatedPosition[1], elevation];\n }\n\n return updatedPosition;\n}\n\nfunction immutablyReplacePosition(\n coordinates: any,\n positionIndexes: number[] | null | undefined,\n updatedPosition: Position,\n isPolygonal: boolean\n): any {\n if (!positionIndexes) {\n return coordinates;\n }\n if (positionIndexes.length === 0) {\n return getUpdatedPosition(updatedPosition, coordinates);\n }\n if (positionIndexes.length === 1) {\n const updated = [\n ...coordinates.slice(0, positionIndexes[0]),\n getUpdatedPosition(updatedPosition, coordinates[positionIndexes[0]]),\n ...coordinates.slice(positionIndexes[0] + 1),\n ];\n\n if (\n isPolygonal &&\n (positionIndexes[0] === 0 || positionIndexes[0] === coordinates.length - 1)\n ) {\n // for polygons, the first point is repeated at the end of the array\n // so, update it on both ends of the array\n updated[0] = getUpdatedPosition(updatedPosition, coordinates[0]);\n updated[coordinates.length - 1] = getUpdatedPosition(updatedPosition, coordinates[0]);\n }\n return updated;\n }\n\n // recursively update inner array\n return [\n ...coordinates.slice(0, positionIndexes[0]),\n immutablyReplacePosition(\n coordinates[positionIndexes[0]],\n positionIndexes.slice(1, positionIndexes.length),\n updatedPosition,\n isPolygonal\n ),\n ...coordinates.slice(positionIndexes[0] + 1),\n ];\n}\n\nfunction immutablyRemovePosition(\n coordinates: any,\n positionIndexes: number[] | null | undefined,\n isPolygonal: boolean\n): any {\n if (!positionIndexes) {\n return coordinates;\n }\n if (positionIndexes.length === 0) {\n throw Error('Must specify the index of the position to remove');\n }\n if (positionIndexes.length === 1) {\n const updated = [\n ...coordinates.slice(0, positionIndexes[0]),\n ...coordinates.slice(positionIndexes[0] + 1),\n ];\n\n if (\n isPolygonal &&\n (positionIndexes[0] === 0 || positionIndexes[0] === coordinates.length - 1)\n ) {\n // for polygons, the first point is repeated at the end of the array\n // so, if the first/last coordinate is to be removed, coordinates[1] will be the new first/last coordinate\n if (positionIndexes[0] === 0) {\n // change the last to be the same as the first\n updated[updated.length - 1] = updated[0];\n } else if (positionIndexes[0] === coordinates.length - 1) {\n // change the first to be the same as the last\n updated[0] = updated[updated.length - 1];\n }\n }\n return updated;\n }\n\n // recursively update inner array\n return [\n ...coordinates.slice(0, positionIndexes[0]),\n immutablyRemovePosition(\n coordinates[positionIndexes[0]],\n positionIndexes.slice(1, positionIndexes.length),\n isPolygonal\n ),\n ...coordinates.slice(positionIndexes[0] + 1),\n ];\n}\n\nfunction immutablyAddPosition(\n coordinates: any,\n positionIndexes: number[] | null | undefined,\n positionToAdd: Position,\n isPolygonal: boolean\n): any {\n if (!positionIndexes) {\n return coordinates;\n }\n if (positionIndexes.length === 0) {\n throw Error('Must specify the index of the position to remove');\n }\n if (positionIndexes.length === 1) {\n const updated = [\n ...coordinates.slice(0, positionIndexes[0]),\n positionToAdd,\n ...coordinates.slice(positionIndexes[0]),\n ];\n return updated;\n }\n\n // recursively update inner array\n return [\n ...coordinates.slice(0, positionIndexes[0]),\n immutablyAddPosition(\n coordinates[positionIndexes[0]],\n positionIndexes.slice(1, positionIndexes.length),\n positionToAdd,\n isPolygonal\n ),\n ...coordinates.slice(positionIndexes[0] + 1),\n ];\n}\n\nfunction pruneGeometryIfNecessary(geometry: Geometry) {\n switch (geometry.type) {\n case 'Polygon':\n prunePolygonIfNecessary(geometry);\n break;\n case 'MultiLineString':\n pruneMultiLineStringIfNecessary(geometry);\n break;\n case 'MultiPolygon':\n pruneMultiPolygonIfNecessary(geometry);\n break;\n default:\n // Not downgradable\n break;\n }\n}\n\nfunction prunePolygonIfNecessary(geometry: Polygon) {\n const polygon = geometry.coordinates;\n\n // If any hole is no longer a polygon, remove the hole entirely\n for (let holeIndex = 1; holeIndex < polygon.length; holeIndex++) {\n if (removeHoleIfNecessary(polygon, holeIndex)) {\n // It was removed, so keep the index the same\n holeIndex--;\n }\n }\n}\n\nfunction pruneMultiLineStringIfNecessary(geometry: MultiLineString) {\n for (let lineStringIndex = 0; lineStringIndex < geometry.coordinates.length; lineStringIndex++) {\n const lineString = geometry.coordinates[lineStringIndex];\n if (lineString.length === 1) {\n // Only a single position left on this LineString, so remove it (can't have Point in MultiLineString)\n geometry.coordinates.splice(lineStringIndex, 1);\n // Keep the index the same\n lineStringIndex--;\n }\n }\n}\n\nfunction pruneMultiPolygonIfNecessary(geometry: MultiPolygon) {\n for (let polygonIndex = 0; polygonIndex < geometry.coordinates.length; polygonIndex++) {\n const polygon = geometry.coordinates[polygonIndex];\n const outerRing = polygon[0];\n\n // If the outer ring is no longer a polygon, remove the whole polygon\n if (outerRing.length <= 3) {\n geometry.coordinates.splice(polygonIndex, 1);\n // It was removed, so keep the index the same\n polygonIndex--;\n }\n\n for (let holeIndex = 1; holeIndex < polygon.length; holeIndex++) {\n if (removeHoleIfNecessary(polygon, holeIndex)) {\n // It was removed, so keep the index the same\n holeIndex--;\n }\n }\n }\n}\n\nfunction removeHoleIfNecessary(polygon: PolygonCoordinates, holeIndex: number) {\n const hole = polygon[holeIndex];\n if (hole.length <= 3) {\n polygon.splice(holeIndex, 1);\n return true;\n }\n return false;\n}\n","// Support for listening to context state changes and intercepting state queries\n// NOTE: this system does not handle buffer bindings\n/** @typedef {import('./track-context-state')} types */\n\nimport {GL_PARAMETER_DEFAULTS, GL_HOOKED_SETTERS} from './webgl-parameter-tables';\nimport {setParameters, getParameters} from './unified-parameter-api';\nimport {assert} from '../utils/assert';\nimport {deepArrayEqual} from '../utils/utils';\n\n// HELPER FUNCTIONS - INSTALL GET/SET INTERCEPTORS (SPYS) ON THE CONTEXT\n\n// Overrides a WebGLRenderingContext state \"getter\" function\n// to return values directly from cache\nfunction installGetterOverride(gl, functionName) {\n // Get the original function from the WebGLRenderingContext\n const originalGetterFunc = gl[functionName].bind(gl);\n\n // Wrap it with a spy so that we can update our state cache when it gets called\n gl[functionName] = function get(...params) {\n const pname = params[0];\n\n // WebGL limits are not prepopulated in the cache, it's neither undefined in GL_PARAMETER_DEFAULTS\n // nor intercepted by GL_HOOKED_SETTERS. Query the original getter.\n if (!(pname in gl.state.cache)) {\n return originalGetterFunc(...params);\n }\n\n // Optionally call the original function to do a \"hard\" query from the WebGLRenderingContext\n return gl.state.enable\n ? // Call the getter the params so that it can e.g. serve from a cache\n gl.state.cache[pname]\n : // Optionally call the original function to do a \"hard\" query from the WebGLRenderingContext\n originalGetterFunc(...params);\n };\n\n // Set the name of this anonymous function to help in debugging and profiling\n Object.defineProperty(gl[functionName], 'name', {\n value: `${functionName}-from-cache`,\n configurable: false\n });\n}\n\n// Overrides a WebGLRenderingContext state \"setter\" function\n// to call a setter spy before the actual setter. Allows us to keep a cache\n// updated with a copy of the WebGL context state.\nfunction installSetterSpy(gl, functionName, setter) {\n // Get the original function from the WebGLRenderingContext\n const originalSetterFunc = gl[functionName].bind(gl);\n\n // Wrap it with a spy so that we can update our state cache when it gets called\n gl[functionName] = function set(...params) {\n // Update the value\n // Call the setter with the state cache and the params so that it can store the parameters\n const {valueChanged, oldValue} = setter(gl.state._updateCache, ...params);\n\n // Call the original WebGLRenderingContext func to make sure the context actually gets updated\n if (valueChanged) {\n originalSetterFunc(...params);\n }\n\n // Note: if the original function fails to set the value, our state cache will be bad\n // No solution for this at the moment, but assuming that this is unlikely to be a real problem\n // We could call the setter after the originalSetterFunc. Concern is that this would\n // cause different behavior in debug mode, where originalSetterFunc can throw exceptions\n\n return oldValue;\n };\n\n // Set the name of this anonymous function to help in debugging and profiling\n Object.defineProperty(gl[functionName], 'name', {\n value: `${functionName}-to-cache`,\n configurable: false\n });\n}\n\nfunction installProgramSpy(gl) {\n const originalUseProgram = gl.useProgram.bind(gl);\n\n gl.useProgram = function useProgramLuma(handle) {\n if (gl.state.program !== handle) {\n originalUseProgram(handle);\n gl.state.program = handle;\n }\n };\n}\n\n// HELPER CLASS - GLState\n\n/* eslint-disable no-shadow */\nclass GLState {\n constructor(\n gl,\n {\n copyState = false, // Copy cache from params (slow) or initialize from WebGL defaults (fast)\n log = () => {} // Logging function, called when gl parameter change calls are actually issued\n } = {}\n ) {\n this.gl = gl;\n this.program = null;\n this.stateStack = [];\n this.enable = true;\n this.cache = copyState ? getParameters(gl) : Object.assign({}, GL_PARAMETER_DEFAULTS);\n this.log = log;\n\n this._updateCache = this._updateCache.bind(this);\n Object.seal(this);\n }\n\n push(values = {}) {\n this.stateStack.push({});\n }\n\n pop() {\n assert(this.stateStack.length > 0);\n // Use the saved values in the state stack to restore parameters\n const oldValues = this.stateStack[this.stateStack.length - 1];\n setParameters(this.gl, oldValues);\n // Don't pop until we have reset parameters (to make sure other \"stack frames\" are not affected)\n this.stateStack.pop();\n }\n\n // interceptor for context set functions - update our cache and our stack\n // values (Object) - the key values for this setter\n _updateCache(values) {\n let valueChanged = false;\n let oldValue; // = undefined\n\n const oldValues = this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1];\n\n for (const key in values) {\n assert(key !== undefined);\n const value = values[key];\n const cached = this.cache[key];\n // Check that value hasn't already been shadowed\n if (!deepArrayEqual(value, cached)) {\n valueChanged = true;\n oldValue = cached;\n\n // First, save current value being shadowed\n // If a state stack frame is active, save the current parameter values for pop\n // but first check that value hasn't already been shadowed and saved\n if (oldValues && !(key in oldValues)) {\n oldValues[key] = cached;\n }\n\n // Save current value being shadowed\n this.cache[key] = value;\n }\n }\n\n return {valueChanged, oldValue};\n }\n}\n\n// PUBLIC API\n\n/**\n * Initialize WebGL state caching on a context\n * @type {types['trackContextState']}\n */\n// After calling this function, context state will be cached\n// gl.state.push() and gl.state.pop() will be available for saving,\n// temporarily modifying, and then restoring state.\nexport function trackContextState(gl, options = {}) {\n const {enable = true, copyState} = options;\n assert(copyState !== undefined);\n // @ts-ignore\n if (!gl.state) {\n const global_ = typeof global !== 'undefined' ? global : window;\n // @ts-ignore\n const {polyfillContext} = global_;\n if (polyfillContext) {\n polyfillContext(gl);\n }\n\n // Create a state cache\n // @ts-ignore\n gl.state = new GLState(gl, {copyState});\n\n installProgramSpy(gl);\n\n // intercept all setter functions in the table\n for (const key in GL_HOOKED_SETTERS) {\n const setter = GL_HOOKED_SETTERS[key];\n installSetterSpy(gl, key, setter);\n }\n\n // intercept all getter functions in the table\n installGetterOverride(gl, 'getParameter');\n installGetterOverride(gl, 'isEnabled');\n }\n\n // @ts-ignore\n gl.state.enable = enable;\n\n return gl;\n}\n\n/**\n * Initialize WebGL state caching on a context\n * @type {types['pushContextState']}\n */\nexport function pushContextState(gl) {\n // @ts-ignore\n if (!gl.state) {\n trackContextState(gl, {copyState: false});\n }\n // @ts-ignore\n gl.state.push();\n}\n\n/**\n * Initialize WebGL state caching on a context\n * @type {types['popContextState']}\n */\nexport function popContextState(gl) {\n // @ts-ignore\n assert(gl.state);\n // @ts-ignore\n gl.state.pop();\n}\n","/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled(_ref) {\n var controlled = _ref.controlled,\n defaultProp = _ref.default,\n name = _ref.name,\n _ref$state = _ref.state,\n state = _ref$state === void 0 ? 'value' : _ref$state;\n\n var _React$useRef = React.useRef(controlled !== undefined),\n isControlled = _React$useRef.current;\n\n var _React$useState = React.useState(defaultProp),\n valueState = _React$useState[0],\n setValue = _React$useState[1];\n\n var value = isControlled ? controlled : valueState;\n\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(function () {\n if (isControlled !== (controlled !== undefined)) {\n console.error([\"Material-UI: A component is changing the \".concat(isControlled ? '' : 'un', \"controlled \").concat(state, \" state of \").concat(name, \" to be \").concat(isControlled ? 'un' : '', \"controlled.\"), 'Elements should not switch from uncontrolled to controlled (or vice versa).', \"Decide between using a controlled or uncontrolled \".concat(name, \" \") + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render, it's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [controlled]);\n\n var _React$useRef2 = React.useRef(defaultProp),\n defaultValue = _React$useRef2.current;\n\n React.useEffect(function () {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([\"Material-UI: A component is changing the default \".concat(state, \" state of an uncontrolled \").concat(name, \" after being initialized. \") + \"To suppress this warning opt to use a controlled \".concat(name, \".\")].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n\n var setValueIfUncontrolled = React.useCallback(function (newValue) {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","import GL from '@luma.gl/constants';\nimport {getWebGL2Context, assertWebGL2Context, log} from '@luma.gl/gltools';\nimport Resource from './resource';\nimport Texture2D from './texture-2d';\nimport Renderbuffer from './renderbuffer';\nimport {clear, clearBuffer} from './clear';\nimport {copyToDataUrl} from './copy-and-blit.js';\n\nimport {getFeatures} from '../features';\nimport {getKey} from '../webgl-utils/constants-to-keys';\nimport {assert} from '../utils/assert';\n\nconst ERR_MULTIPLE_RENDERTARGETS = 'Multiple render targets not supported';\n\nexport default class Framebuffer extends Resource {\n static isSupported(gl, options = {}) {\n const {\n colorBufferFloat, // Whether floating point textures can be rendered and read\n colorBufferHalfFloat // Whether half float textures can be rendered and read\n } = options;\n let supported = true;\n\n if (colorBufferFloat) {\n supported = Boolean(\n // WebGL 2\n gl.getExtension('EXT_color_buffer_float') ||\n // WebGL 1, not exposed on all platforms\n gl.getExtension('WEBGL_color_buffer_float') ||\n // WebGL 1, implicitly enables float render targets https://www.khronos.org/registry/webgl/extensions/OES_texture_float/\n gl.getExtension('OES_texture_float')\n );\n }\n\n if (colorBufferHalfFloat) {\n supported =\n supported &&\n Boolean(\n // WebGL 2\n gl.getExtension('EXT_color_buffer_float') ||\n // WebGL 1\n gl.getExtension('EXT_color_buffer_half_float')\n );\n }\n\n return supported;\n }\n\n // Create a Framebuffer wrapper for the default framebuffer (target === null)\n static getDefaultFramebuffer(gl) {\n gl.luma = gl.luma || {};\n gl.luma.defaultFramebuffer =\n gl.luma.defaultFramebuffer ||\n new Framebuffer(gl, {\n id: 'default-framebuffer',\n handle: null,\n attachments: {}\n });\n // TODO - can we query for and get a handle to the GL.FRONT renderbuffer?\n return gl.luma.defaultFramebuffer;\n }\n\n get MAX_COLOR_ATTACHMENTS() {\n const gl2 = assertWebGL2Context(this.gl);\n return gl2.getParameter(gl2.MAX_COLOR_ATTACHMENTS);\n }\n\n get MAX_DRAW_BUFFERS() {\n const gl2 = assertWebGL2Context(this.gl);\n return gl2.getParameter(gl2.MAX_DRAW_BUFFERS);\n }\n\n constructor(gl, opts = {}) {\n super(gl, opts);\n\n // Public members\n this.width = null;\n this.height = null;\n this.attachments = {};\n this.readBuffer = GL.COLOR_ATTACHMENT0;\n this.drawBuffers = [GL.COLOR_ATTACHMENT0];\n this.ownResources = [];\n this.initialize(opts);\n\n Object.seal(this);\n }\n\n get color() {\n return this.attachments[GL.COLOR_ATTACHMENT0] || null;\n }\n\n get texture() {\n return this.attachments[GL.COLOR_ATTACHMENT0] || null;\n }\n\n get depth() {\n return (\n this.attachments[GL.DEPTH_ATTACHMENT] || this.attachments[GL.DEPTH_STENCIL_ATTACHMENT] || null\n );\n }\n\n get stencil() {\n return (\n this.attachments[GL.STENCIL_ATTACHMENT] ||\n this.attachments[GL.DEPTH_STENCIL_ATTACHMENT] ||\n null\n );\n }\n\n initialize({\n width = 1,\n height = 1,\n attachments = null,\n color = true,\n depth = true,\n stencil = false,\n check = true,\n readBuffer = undefined,\n drawBuffers = undefined\n }) {\n assert(width >= 0 && height >= 0, 'Width and height need to be integers');\n\n // Store actual width and height for diffing\n this.width = width;\n this.height = height;\n\n // Resize any provided attachments - note that resize only resizes if needed\n // Note: A framebuffer has no separate size, it is defined by its attachments (which must agree)\n if (attachments) {\n for (const attachment in attachments) {\n const target = attachments[attachment];\n const object = Array.isArray(target) ? target[0] : target;\n object.resize({width, height});\n }\n } else {\n // Create any requested default attachments\n attachments = this._createDefaultAttachments(color, depth, stencil, width, height);\n }\n\n this.update({clearAttachments: true, attachments, readBuffer, drawBuffers});\n\n // Checks that framebuffer was properly set up, if not, throws an explanatory error\n if (attachments && check) {\n this.checkStatus();\n }\n }\n\n delete() {\n for (const resource of this.ownResources) {\n resource.delete();\n }\n super.delete();\n return this;\n }\n\n update({\n attachments = {},\n readBuffer,\n drawBuffers,\n clearAttachments = false,\n resizeAttachments = true\n }) {\n this.attach(attachments, {clearAttachments, resizeAttachments});\n\n const {gl} = this;\n // Multiple render target support, set read buffer and draw buffers\n const prevHandle = gl.bindFramebuffer(GL.FRAMEBUFFER, this.handle);\n if (readBuffer) {\n this._setReadBuffer(readBuffer);\n }\n if (drawBuffers) {\n this._setDrawBuffers(drawBuffers);\n }\n // @ts-ignore\n gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);\n\n return this;\n }\n\n // Attachment resize is expected to be a noop if size is same\n resize(options = {}) {\n let {width, height} = options;\n // for default framebuffer, just update the stored size\n if (this.handle === null) {\n assert(width === undefined && height === undefined);\n this.width = this.gl.drawingBufferWidth;\n this.height = this.gl.drawingBufferHeight;\n return this;\n }\n\n if (width === undefined) {\n width = this.gl.drawingBufferWidth;\n }\n if (height === undefined) {\n height = this.gl.drawingBufferHeight;\n }\n\n if (width !== this.width && height !== this.height) {\n log.log(2, `Resizing framebuffer ${this.id} to ${width}x${height}`)();\n }\n for (const attachmentPoint in this.attachments) {\n this.attachments[attachmentPoint].resize({width, height});\n }\n this.width = width;\n this.height = height;\n return this;\n }\n\n // Attach from a map of attachments\n attach(attachments, {clearAttachments = false, resizeAttachments = true} = {}) {\n const newAttachments = {};\n\n // Any current attachments need to be removed, add null values to map\n if (clearAttachments) {\n Object.keys(this.attachments).forEach(key => {\n newAttachments[key] = null;\n });\n }\n\n // Overlay the new attachments\n Object.assign(newAttachments, attachments);\n\n const prevHandle = this.gl.bindFramebuffer(GL.FRAMEBUFFER, this.handle);\n\n // Walk the attachments\n for (const key in newAttachments) {\n // Ensure key is not undefined\n assert(key !== undefined, 'Misspelled framebuffer binding point?');\n\n const attachment = Number(key);\n\n const descriptor = newAttachments[attachment];\n let object = descriptor;\n if (!object) {\n this._unattach(attachment);\n } else if (object instanceof Renderbuffer) {\n this._attachRenderbuffer({attachment, renderbuffer: object});\n } else if (Array.isArray(descriptor)) {\n const [texture, layer = 0, level = 0] = descriptor;\n object = texture;\n this._attachTexture({attachment, texture, layer, level});\n } else {\n this._attachTexture({attachment, texture: object, layer: 0, level: 0});\n }\n\n // Resize objects\n if (resizeAttachments && object) {\n object.resize({width: this.width, height: this.height});\n }\n }\n\n // @ts-ignore\n this.gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);\n\n // Assign to attachments and remove any nulls to get a clean attachment map\n Object.assign(this.attachments, attachments);\n Object.keys(this.attachments)\n .filter(key => !this.attachments[key])\n .forEach(key => {\n delete this.attachments[key];\n });\n }\n\n checkStatus() {\n const {gl} = this;\n const status = this.getStatus();\n if (status !== gl.FRAMEBUFFER_COMPLETE) {\n throw new Error(_getFrameBufferStatus(status));\n }\n return this;\n }\n\n getStatus() {\n const {gl} = this;\n const prevHandle = gl.bindFramebuffer(GL.FRAMEBUFFER, this.handle);\n const status = gl.checkFramebufferStatus(GL.FRAMEBUFFER);\n // @ts-ignore\n gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);\n return status;\n }\n\n clear(options = {}) {\n const {color, depth, stencil, drawBuffers = []} = options;\n\n // Bind framebuffer and delegate to global clear functions\n const prevHandle = this.gl.bindFramebuffer(GL.FRAMEBUFFER, this.handle);\n\n if (color || depth || stencil) {\n clear(this.gl, {color, depth, stencil});\n }\n\n drawBuffers.forEach((value, drawBuffer) => {\n clearBuffer(this.gl, {drawBuffer, value});\n });\n\n // @ts-ignore\n this.gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);\n\n return this;\n }\n\n // NOTE: Slow requires roundtrip to GPU\n // App can provide pixelArray or have it auto allocated by this method\n // @returns {Uint8Array|Uint16Array|FloatArray} - pixel array,\n // newly allocated by this method unless provided by app.\n readPixels(opts = {}) {\n log.error(\n 'Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)'\n )();\n return null;\n }\n\n // Reads data into provided buffer object asynchronously\n // This function doesn't wait for copy to be complete, it programs GPU to perform a DMA transffer.\n readPixelsToBuffer(opts = {}) {\n log.error(\n 'Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)'\n )();\n return null;\n }\n\n // Reads pixels as a dataUrl\n copyToDataUrl(opts = {}) {\n log.error(\n 'Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)'\n )();\n return null;\n }\n\n // Reads pixels into an HTML Image\n copyToImage(opts = {}) {\n log.error('Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)')();\n return null;\n }\n\n // copyToFramebuffer({width, height}) {\n // const scaleX = width / this.width;\n // const scaleY = height / this.height;\n // const scale = Math.min(scaleX, scaleY);\n // width = width * scale;\n // height = height * scale;\n // const scaledFramebuffer = new Framebuffer(this.gl, {width, height});\n // this.blit();\n // }\n\n // Copy a rectangle from a framebuffer attachment into a texture (at an offset)\n // NOTE: assumes texture has enough storage allocated\n // eslint-disable-next-line complexity\n copyToTexture(opts = {}) {\n log.error(\n 'Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})'\n )();\n return null;\n }\n\n // WEBGL2 INTERFACE\n\n // Copies a rectangle of pixels between framebuffers\n // eslint-disable-next-line complexity\n blit(opts = {}) {\n log.error('Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)')();\n return null;\n }\n\n // signals to the GL that it need not preserve all pixels of a specified region of the framebuffer\n invalidate({attachments = [], x = 0, y = 0, width, height}) {\n const gl2 = assertWebGL2Context(this.gl);\n const prevHandle = gl2.bindFramebuffer(GL.READ_FRAMEBUFFER, this.handle);\n const invalidateAll = x === 0 && y === 0 && width === undefined && height === undefined;\n if (invalidateAll) {\n gl2.invalidateFramebuffer(GL.READ_FRAMEBUFFER, attachments);\n } else {\n // TODO - why does type checking fail on this line\n // @ts-ignore\n gl2.invalidateFramebuffer(GL.READ_FRAMEBUFFER, attachments, x, y, width, height);\n }\n // @ts-ignore\n gl2.bindFramebuffer(GL.READ_FRAMEBUFFER, prevHandle);\n return this;\n }\n\n // Return the value for `pname` of the specified attachment.\n // The type returned is the type of the requested pname\n getAttachmentParameter(attachment, pname, keys) {\n let value = this._getAttachmentParameterFallback(pname);\n if (value === null) {\n this.gl.bindFramebuffer(GL.FRAMEBUFFER, this.handle);\n value = this.gl.getFramebufferAttachmentParameter(GL.FRAMEBUFFER, attachment, pname);\n this.gl.bindFramebuffer(GL.FRAMEBUFFER, null);\n }\n if (keys && value > 1000) {\n // @ts-ignore\n value = getKey(this.gl, value);\n }\n return value;\n }\n\n getAttachmentParameters(\n attachment = GL.COLOR_ATTACHMENT0,\n keys,\n // @ts-ignore\n parameters = this.constructor.ATTACHMENT_PARAMETERS || []\n ) {\n const values = {};\n for (const pname of parameters) {\n const key = keys ? getKey(this.gl, pname) : pname;\n values[key] = this.getAttachmentParameter(attachment, pname, keys);\n }\n return values;\n }\n\n getParameters(keys = true) {\n const attachments = Object.keys(this.attachments);\n // if (this === this.gl.luma.defaultFramebuffer) {\n // attachments = [GL.COLOR_ATTACHMENT0, GL.DEPTH_STENCIL_ATTACHMENT];\n // }\n const parameters = {};\n for (const attachmentName of attachments) {\n const attachment = Number(attachmentName);\n const key = keys ? getKey(this.gl, attachment) : attachment;\n parameters[key] = this.getAttachmentParameters(attachment, keys);\n }\n return parameters;\n }\n\n // DEBUG\n\n // Note: Will only work when called in an event handler\n show() {\n if (typeof window !== 'undefined') {\n window.open(copyToDataUrl(this), 'luma-debug-texture');\n }\n return this;\n }\n\n log(logLevel = 0, message = '') {\n if (logLevel > log.level || typeof window === 'undefined') {\n return this;\n }\n message = message || `Framebuffer ${this.id}`;\n const image = copyToDataUrl(this, {targetMaxHeight: 100});\n log.image({logLevel, message, image}, message)();\n return this;\n }\n\n // WEBGL INTERFACE\n bind({target = GL.FRAMEBUFFER} = {}) {\n this.gl.bindFramebuffer(target, this.handle);\n return this;\n }\n\n unbind({target = GL.FRAMEBUFFER} = {}) {\n this.gl.bindFramebuffer(target, null);\n return this;\n }\n\n // PRIVATE METHODS\n\n _createDefaultAttachments(color, depth, stencil, width, height) {\n let defaultAttachments = null;\n\n // Add a color buffer if requested and not supplied\n if (color) {\n defaultAttachments = defaultAttachments || {};\n defaultAttachments[GL.COLOR_ATTACHMENT0] = new Texture2D(this.gl, {\n id: `${this.id}-color0`,\n pixels: null, // reserves texture memory, but texels are undefined\n format: GL.RGBA,\n type: GL.UNSIGNED_BYTE,\n width,\n height,\n // Note: Mipmapping can be disabled by texture resource when we resize the texture\n // to a non-power-of-two dimenstion (NPOT texture) under WebGL1. To have consistant\n // behavior we always disable mipmaps.\n mipmaps: false,\n // Set MIN and MAG filtering parameters so mipmaps are not used in sampling.\n // Use LINEAR so subpixel algos like fxaa work.\n // Set WRAP modes that support NPOT textures too.\n parameters: {\n [GL.TEXTURE_MIN_FILTER]: GL.LINEAR,\n [GL.TEXTURE_MAG_FILTER]: GL.LINEAR,\n [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE\n }\n });\n // track to delete later\n this.ownResources.push(defaultAttachments[GL.COLOR_ATTACHMENT0]);\n }\n\n if (depth && stencil) {\n // TODO - handle separate stencil\n defaultAttachments = defaultAttachments || {};\n defaultAttachments[GL.DEPTH_STENCIL_ATTACHMENT] = new Renderbuffer(this.gl, {\n id: `${this.id}-depth-stencil`,\n format: GL.DEPTH24_STENCIL8,\n width,\n height: 111\n });\n // track to delete later\n this.ownResources.push(defaultAttachments[GL.DEPTH_STENCIL_ATTACHMENT]);\n // TODO - optional texture\n // new Texture2D(this.gl, {\n // id: `${this.id}-depth-stencil`,\n // format: GL.DEPTH24_STENCIL8,\n // dataFormat: GL.DEPTH_STENCIL,\n // type: GL.UNSIGNED_INT_24_8,\n // width,\n // height,\n // mipmaps: false\n // });\n } else if (depth) {\n // Add a depth buffer if requested and not supplied\n defaultAttachments = defaultAttachments || {};\n defaultAttachments[GL.DEPTH_ATTACHMENT] = new Renderbuffer(this.gl, {\n id: `${this.id}-depth`,\n format: GL.DEPTH_COMPONENT16,\n width,\n height\n });\n // track to delete later\n this.ownResources.push(defaultAttachments[GL.DEPTH_ATTACHMENT]);\n } else if (stencil) {\n // TODO - handle separate stencil\n assert(false);\n }\n\n return defaultAttachments;\n }\n\n _unattach(attachment) {\n const oldAttachment = this.attachments[attachment];\n if (!oldAttachment) {\n return;\n }\n if (oldAttachment instanceof Renderbuffer) {\n // render buffer\n this.gl.framebufferRenderbuffer(GL.FRAMEBUFFER, attachment, GL.RENDERBUFFER, null);\n } else {\n // Must be a texture attachment\n this.gl.framebufferTexture2D(GL.FRAMEBUFFER, attachment, GL.TEXTURE_2D, null, 0);\n }\n delete this.attachments[attachment];\n }\n\n _attachRenderbuffer({attachment = GL.COLOR_ATTACHMENT0, renderbuffer}) {\n const {gl} = this;\n // TODO - is the bind needed?\n // gl.bindRenderbuffer(GL.RENDERBUFFER, renderbuffer.handle);\n gl.framebufferRenderbuffer(GL.FRAMEBUFFER, attachment, GL.RENDERBUFFER, renderbuffer.handle);\n // TODO - is the unbind needed?\n // gl.bindRenderbuffer(GL.RENDERBUFFER, null);\n\n this.attachments[attachment] = renderbuffer;\n }\n\n // layer = 0 - index into Texture2DArray and Texture3D or face for `TextureCubeMap`\n // level = 0 - mipmapLevel (must be 0 in WebGL1)\n _attachTexture({attachment = GL.COLOR_ATTACHMENT0, texture, layer, level}) {\n const {gl} = this;\n gl.bindTexture(texture.target, texture.handle);\n\n switch (texture.target) {\n case GL.TEXTURE_2D_ARRAY:\n case GL.TEXTURE_3D:\n const gl2 = assertWebGL2Context(gl);\n gl2.framebufferTextureLayer(GL.FRAMEBUFFER, attachment, texture.target, level, layer);\n break;\n\n case GL.TEXTURE_CUBE_MAP:\n // layer must be a cubemap face (or if index, converted to cube map face)\n const face = mapIndexToCubeMapFace(layer);\n gl.framebufferTexture2D(GL.FRAMEBUFFER, attachment, face, texture.handle, level);\n break;\n\n case GL.TEXTURE_2D:\n gl.framebufferTexture2D(GL.FRAMEBUFFER, attachment, GL.TEXTURE_2D, texture.handle, level);\n break;\n\n default:\n assert(false, 'Illegal texture type');\n }\n\n gl.bindTexture(texture.target, null);\n this.attachments[attachment] = texture;\n }\n\n // Expects framebuffer to be bound\n _setReadBuffer(readBuffer) {\n const gl2 = getWebGL2Context(this.gl);\n if (gl2) {\n gl2.readBuffer(readBuffer);\n } else {\n // Setting to color attachment 0 is a noop, so allow it in WebGL1\n assert(\n readBuffer === GL.COLOR_ATTACHMENT0 || readBuffer === GL.BACK,\n ERR_MULTIPLE_RENDERTARGETS\n );\n }\n this.readBuffer = readBuffer;\n }\n\n // Expects framebuffer to be bound\n _setDrawBuffers(drawBuffers) {\n const {gl} = this;\n const gl2 = assertWebGL2Context(gl);\n if (gl2) {\n gl2.drawBuffers(drawBuffers);\n } else {\n // TODO - is this not handled by polyfills?\n const ext = gl.getExtension('WEBGL_draw_buffers');\n if (ext) {\n ext.drawBuffersWEBGL(drawBuffers);\n } else {\n // Setting a single draw buffer to color attachment 0 is a noop, allow in WebGL1\n assert(\n drawBuffers.length === 1 &&\n (drawBuffers[0] === GL.COLOR_ATTACHMENT0 || drawBuffers[0] === GL.BACK),\n ERR_MULTIPLE_RENDERTARGETS\n );\n }\n }\n this.drawBuffers = drawBuffers;\n }\n\n // Attempt to provide workable defaults for WebGL2 symbols under WebGL1\n // null means OK to query\n // TODO - move to webgl1 polyfills\n /* eslint-disable complexity */\n _getAttachmentParameterFallback(pname) {\n const caps = getFeatures(this.gl);\n\n switch (pname) {\n case GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: // GLint\n return !caps.WEBGL2 ? 0 : null;\n case GL.FRAMEBUFFER_ATTACHMENT_RED_SIZE: // GLint\n case GL.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: // GLint\n case GL.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: // GLint\n case GL.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: // GLint\n case GL.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: // GLint\n case GL.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: // GLint\n return !caps.WEBGL2 ? 8 : null;\n case GL.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: // GLenum\n return !caps.WEBGL2 ? GL.UNSIGNED_INT : null;\n case GL.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:\n return !caps.WEBGL2 && !caps.EXT_sRGB ? GL.LINEAR : null;\n default:\n return null;\n }\n }\n /* eslint-enable complexity */\n\n // RESOURCE METHODS\n\n _createHandle() {\n return this.gl.createFramebuffer();\n }\n\n _deleteHandle() {\n this.gl.deleteFramebuffer(this.handle);\n }\n\n _bindHandle(handle) {\n return this.gl.bindFramebuffer(GL.FRAMEBUFFER, handle);\n }\n}\n\n// PUBLIC METHODS\n\n// Map an index to a cube map face constant\nfunction mapIndexToCubeMapFace(layer) {\n // TEXTURE_CUBE_MAP_POSITIVE_X is a big value (0x8515)\n // if smaller assume layer is index, otherwise assume it is already a cube map face constant\n return layer < GL.TEXTURE_CUBE_MAP_POSITIVE_X ? layer + GL.TEXTURE_CUBE_MAP_POSITIVE_X : layer;\n}\n\n// Helper METHODS\n// Get a string describing the framebuffer error if installed\nfunction _getFrameBufferStatus(status) {\n // Use error mapping if installed\n // @ts-ignore\n const STATUS = Framebuffer.STATUS || {};\n return STATUS[status] || `Framebuffer error ${status}`;\n}\n\nexport const FRAMEBUFFER_ATTACHMENT_PARAMETERS = [\n GL.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, // WebGLRenderbuffer or WebGLTexture\n GL.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, // GL.RENDERBUFFER, GL.TEXTURE, GL.NONE\n // GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE, // GL.TEXTURE_CUBE_MAP_POSITIVE_X, etc.\n // GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, // GLint\n // EXT_sRGB or WebGL2\n GL.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, // GL.LINEAR, GL.SRBG\n // WebGL2\n // GL.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER, // GLint\n GL.FRAMEBUFFER_ATTACHMENT_RED_SIZE, // GLint\n GL.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, // GLint\n GL.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, // GLint\n GL.FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE, // GLint\n GL.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE, // GLint\n GL.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE // GLint\n // GL.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE\n // GL.FLOAT, GL.INT, GL.UNSIGNED_INT, GL.SIGNED_NORMALIZED, OR GL.UNSIGNED_NORMALIZED.\n];\n\nFramebuffer.ATTACHMENT_PARAMETERS = FRAMEBUFFER_ATTACHMENT_PARAMETERS;\n","function noop() {}\n\nconst DEFAULT_SETTINGS = {\n onStart: noop,\n onUpdate: noop,\n onInterrupt: noop,\n onEnd: noop\n};\n\nexport default class Transition {\n /**\n * @params timeline {Timeline}\n */\n constructor(timeline) {\n this._inProgress = false;\n this._handle = null;\n this.timeline = timeline;\n\n // Defaults\n this.settings = {};\n }\n\n /* Public API */\n get inProgress() {\n return this._inProgress;\n }\n\n /**\n * (re)start this transition.\n * @params props {object} - optional overriding props. see constructor\n */\n start(props) {\n this.cancel();\n this.settings = {...DEFAULT_SETTINGS, ...props};\n this._inProgress = true;\n this.settings.onStart(this);\n }\n\n /**\n * end this transition if it is in progress.\n */\n end() {\n if (this._inProgress) {\n this.timeline.removeChannel(this._handle);\n this._handle = null;\n this._inProgress = false;\n this.settings.onEnd(this);\n }\n }\n\n /**\n * cancel this transition if it is in progress.\n */\n cancel() {\n if (this._inProgress) {\n this.settings.onInterrupt(this);\n this.timeline.removeChannel(this._handle);\n this._handle = null;\n this._inProgress = false;\n }\n }\n\n /**\n * update this transition. Returns `true` if updated.\n */\n update() {\n if (!this._inProgress) {\n return false;\n }\n\n // It is important to initialize the handle during `update` instead of `start`.\n // The CPU time that the `start` frame takes should not be counted towards the duration.\n // On the other hand, `update` always happens during a render cycle. The clock starts when the\n // transition is rendered for the first time.\n if (this._handle === null) {\n const {timeline, settings} = this;\n this._handle = timeline.addChannel({\n delay: timeline.getTime(),\n duration: settings.duration\n });\n }\n\n this.time = this.timeline.getTime(this._handle);\n // Call subclass method\n this._onUpdate();\n // Call user callback\n this.settings.onUpdate(this);\n\n // This only works if `settings.duration` is set\n // Spring transition must call `end` manually\n if (this.timeline.isFinished(this._handle)) {\n this.end();\n }\n return true;\n }\n\n /* Private API */\n\n _onUpdate() {\n // for subclass override\n }\n}\n","// Partial deep equal (only recursive on arrays)\nexport function deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n for (const key in a) {\n const aValue = a[key];\n const bValue = b[key];\n const equals =\n aValue === bValue ||\n (Array.isArray(aValue) && Array.isArray(bValue) && deepEqual(aValue, bValue));\n if (!equals) {\n return false;\n }\n }\n return true;\n}\n","/**\n * @typedef Slice\n * @property {number} offset\n * @property {number} length\n */\n\nexport class BaseSource {\n /**\n *\n * @param {Slice[]} slices\n * @returns {ArrayBuffer[]}\n */\n async fetch(slices, signal = undefined) {\n return await Promise.all(\n slices.map((slice) => this.fetchSlice(slice, signal)),\n );\n }\n\n /**\n *\n * @param {Slice} slice\n * @returns {ArrayBuffer}\n */\n async fetchSlice(slice) {\n throw new Error(`fetching of slice ${slice} not possible, not implemented`);\n }\n\n /**\n * Returns the filesize if already determined and null otherwise\n */\n get fileSize() {\n return null;\n }\n\n async close() {\n // no-op by default\n }\n}\n","/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nexport default function createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.reduce(function (acc, func) {\n if (func == null) {\n return acc;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof func !== 'function') {\n console.error('Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, function () {});\n}","export default function formControlState(_ref) {\n var props = _ref.props,\n states = _ref.states,\n muiFormControl = _ref.muiFormControl;\n return states.reduce(function (acc, state) {\n acc[state] = props[state];\n\n if (muiFormControl) {\n if (typeof props[state] === 'undefined') {\n acc[state] = muiFormControl[state];\n }\n }\n\n return acc;\n }, {});\n}","import * as React from 'react';\nimport FormControlContext from './FormControlContext';\nexport default function useFormControl() {\n return React.useContext(FormControlContext);\n}","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;\n","// Purpose: include this in your module to avoid\n// dependencies on micro modules like 'global' and 'is-browser';\n\n/* eslint-disable no-restricted-globals */\nconst globals = {\n self: typeof self !== 'undefined' && self,\n window: typeof window !== 'undefined' && window,\n global: typeof global !== 'undefined' && global,\n document: typeof document !== 'undefined' && document\n};\n\ntype obj = {[key: string]: any};\nconst self_: obj = globals.self || globals.window || globals.global || {};\nconst window_: obj = globals.window || globals.self || globals.global || {};\nconst global_: obj = globals.global || globals.self || globals.window || {};\nconst document_: obj = globals.document || {};\n\nexport {self_ as self, window_ as window, global_ as global, document_ as document};\n\n/** true if running in a browser */\nexport const isBrowser: boolean =\n // @ts-ignore process does not exist on browser\n typeof process !== 'object' || String(process) !== '[object process]' || process.browser;\n\n/** true if running in a worker thread */\nexport const isWorker: boolean = typeof importScripts === 'function';\n\n// Extract node major version\nconst matches =\n typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);\n/** Major Node version (as a number) */\nexport const nodeVersion: number = (matches && parseFloat(matches[1])) || 0;\n","'use strict';\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nconst getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n};\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n};\n\nexports.isExist = function(v) {\n return typeof v !== 'undefined';\n};\n\nexports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nexports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n};\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nexports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n};\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\nexports.buildOptions = function(options, defaultOptions, props) {\n let newOptions = {};\n if (!options) {\n return defaultOptions; //if there are not options\n }\n\n for (let i = 0; i < props.length; i++) {\n if (options[props[i]] !== undefined) {\n newOptions[props[i]] = options[props[i]];\n } else {\n newOptions[props[i]] = defaultOptions[props[i]];\n }\n }\n return newOptions;\n};\n\n/**\n * Check if a tag name should be treated as array\n *\n * @param tagName the node tagname\n * @param arrayMode the array mode option\n * @param parentTagName the parent tag name\n * @returns {boolean} true if node should be parsed as array\n */\nexports.isTagNameInArrayMode = function (tagName, arrayMode, parentTagName) {\n if (arrayMode === false) {\n return false;\n } else if (arrayMode instanceof RegExp) {\n return arrayMode.test(tagName);\n } else if (typeof arrayMode === 'function') {\n return !!arrayMode(tagName, parentTagName);\n }\n\n return arrayMode === \"strict\";\n}\n\nexports.isName = isName;\nexports.getAllMatches = getAllMatches;\nexports.nameRegexp = nameRegexp;\n","function isEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (Array.isArray(a)) {\n // Special treatment for arrays: compare 1-level deep\n // This is to support equality of matrix/coordinate props\n const len = a.length;\n if (!b || b.length !== len) {\n return false;\n }\n\n for (let i = 0; i < len; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n\n/**\n * Speed up consecutive function calls by caching the result of calls with identical input\n * https://en.wikipedia.org/wiki/Memoization\n * @param {function} compute - the function to be memoized\n */\nexport default function memoize(compute) {\n let cachedArgs = {};\n let cachedResult;\n\n return args => {\n for (const key in args) {\n if (!isEqual(args[key], cachedArgs[key])) {\n cachedResult = compute(args);\n cachedArgs = args;\n break;\n }\n }\n return cachedResult;\n };\n}\n","import { deepmerge } from '@material-ui/utils';\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\nexport default merge;","/* eslint-disable camelcase */\nimport {assert} from '../utils/assert';\n\nconst GL_BYTE = 0x1400;\nconst GL_UNSIGNED_BYTE = 0x1401;\nconst GL_SHORT = 0x1402;\nconst GL_UNSIGNED_SHORT = 0x1403;\n\nconst GL_POINTS = 0x0;\nconst GL_LINES = 0x1;\nconst GL_LINE_LOOP = 0x2;\nconst GL_LINE_STRIP = 0x3;\nconst GL_TRIANGLES = 0x4;\nconst GL_TRIANGLE_STRIP = 0x5;\nconst GL_TRIANGLE_FAN = 0x6;\n\n// Local constants - these will \"collapse\" during minification\nconst GL_FLOAT = 0x1406;\nconst GL_FLOAT_VEC2 = 0x8b50;\nconst GL_FLOAT_VEC3 = 0x8b51;\nconst GL_FLOAT_VEC4 = 0x8b52;\n\nconst GL_INT = 0x1404;\nconst GL_INT_VEC2 = 0x8b53;\nconst GL_INT_VEC3 = 0x8b54;\nconst GL_INT_VEC4 = 0x8b55;\n\nconst GL_UNSIGNED_INT = 0x1405;\nconst GL_UNSIGNED_INT_VEC2 = 0x8dc6;\nconst GL_UNSIGNED_INT_VEC3 = 0x8dc7;\nconst GL_UNSIGNED_INT_VEC4 = 0x8dc8;\n\nconst GL_BOOL = 0x8b56;\nconst GL_BOOL_VEC2 = 0x8b57;\nconst GL_BOOL_VEC3 = 0x8b58;\nconst GL_BOOL_VEC4 = 0x8b59;\n\nconst GL_FLOAT_MAT2 = 0x8b5a;\nconst GL_FLOAT_MAT3 = 0x8b5b;\nconst GL_FLOAT_MAT4 = 0x8b5c;\n\nconst GL_FLOAT_MAT2x3 = 0x8b65;\nconst GL_FLOAT_MAT2x4 = 0x8b66;\nconst GL_FLOAT_MAT3x2 = 0x8b67;\nconst GL_FLOAT_MAT3x4 = 0x8b68;\nconst GL_FLOAT_MAT4x2 = 0x8b69;\nconst GL_FLOAT_MAT4x3 = 0x8b6a;\n\n// Composite types table\nconst COMPOSITE_GL_TYPES = {\n [GL_FLOAT]: [GL_FLOAT, 1, 'float'],\n [GL_FLOAT_VEC2]: [GL_FLOAT, 2, 'vec2'],\n [GL_FLOAT_VEC3]: [GL_FLOAT, 3, 'vec3'],\n [GL_FLOAT_VEC4]: [GL_FLOAT, 4, 'vec4'],\n\n [GL_INT]: [GL_INT, 1, 'int'],\n [GL_INT_VEC2]: [GL_INT, 2, 'ivec2'],\n [GL_INT_VEC3]: [GL_INT, 3, 'ivec3'],\n [GL_INT_VEC4]: [GL_INT, 4, 'ivec4'],\n\n [GL_UNSIGNED_INT]: [GL_UNSIGNED_INT, 1, 'uint'],\n [GL_UNSIGNED_INT_VEC2]: [GL_UNSIGNED_INT, 2, 'uvec2'],\n [GL_UNSIGNED_INT_VEC3]: [GL_UNSIGNED_INT, 3, 'uvec3'],\n [GL_UNSIGNED_INT_VEC4]: [GL_UNSIGNED_INT, 4, 'uvec4'],\n\n [GL_BOOL]: [GL_FLOAT, 1, 'bool'],\n [GL_BOOL_VEC2]: [GL_FLOAT, 2, 'bvec2'],\n [GL_BOOL_VEC3]: [GL_FLOAT, 3, 'bvec3'],\n [GL_BOOL_VEC4]: [GL_FLOAT, 4, 'bvec4'],\n\n [GL_FLOAT_MAT2]: [GL_FLOAT, 8, 'mat2'], // 4\n [GL_FLOAT_MAT2x3]: [GL_FLOAT, 8, 'mat2x3'], // 6\n [GL_FLOAT_MAT2x4]: [GL_FLOAT, 8, 'mat2x4'], // 8\n\n [GL_FLOAT_MAT3]: [GL_FLOAT, 12, 'mat3'], // 9\n [GL_FLOAT_MAT3x2]: [GL_FLOAT, 12, 'mat3x2'], // 6\n [GL_FLOAT_MAT3x4]: [GL_FLOAT, 12, 'mat3x4'], // 12\n\n [GL_FLOAT_MAT4]: [GL_FLOAT, 16, 'mat4'], // 16\n [GL_FLOAT_MAT4x2]: [GL_FLOAT, 16, 'mat4x2'], // 8\n [GL_FLOAT_MAT4x3]: [GL_FLOAT, 16, 'mat4x3'] // 12\n};\n\n// Counts the number of complete primitives given a number of vertices and a drawMode\nexport function getPrimitiveDrawMode(drawMode) {\n switch (drawMode) {\n case GL_POINTS:\n return GL_POINTS;\n case GL_LINES:\n return GL_LINES;\n case GL_LINE_STRIP:\n return GL_LINES;\n case GL_LINE_LOOP:\n return GL_LINES;\n case GL_TRIANGLES:\n return GL_TRIANGLES;\n case GL_TRIANGLE_STRIP:\n return GL_TRIANGLES;\n case GL_TRIANGLE_FAN:\n return GL_TRIANGLES;\n default:\n assert(false);\n return 0;\n }\n}\n\n// Counts the number of complete \"primitives\" given a number of vertices and a drawMode\nexport function getPrimitiveCount({drawMode, vertexCount}) {\n switch (drawMode) {\n case GL_POINTS:\n case GL_LINE_LOOP:\n return vertexCount;\n case GL_LINES:\n return vertexCount / 2;\n case GL_LINE_STRIP:\n return vertexCount - 1;\n case GL_TRIANGLES:\n return vertexCount / 3;\n case GL_TRIANGLE_STRIP:\n case GL_TRIANGLE_FAN:\n return vertexCount - 2;\n default:\n assert(false);\n return 0;\n }\n}\n\n// Counts the number of vertices after splitting the vertex stream into separate \"primitives\"\nexport function getVertexCount({drawMode, vertexCount}) {\n const primitiveCount = getPrimitiveCount({drawMode, vertexCount});\n switch (getPrimitiveDrawMode(drawMode)) {\n case GL_POINTS:\n return primitiveCount;\n case GL_LINES:\n return primitiveCount * 2;\n case GL_TRIANGLES:\n return primitiveCount * 3;\n default:\n assert(false);\n return 0;\n }\n}\n\n// Decomposes a composite type GL.VEC3 into a basic type (GL.FLOAT) and components (3)\nexport function decomposeCompositeGLType(compositeGLType) {\n const typeAndSize = COMPOSITE_GL_TYPES[compositeGLType];\n if (!typeAndSize) {\n return null;\n }\n const [type, components] = typeAndSize;\n return {type, components};\n}\n\nexport function getCompositeGLType(type, components) {\n switch (type) {\n case GL_BYTE:\n case GL_UNSIGNED_BYTE:\n case GL_SHORT:\n case GL_UNSIGNED_SHORT:\n type = GL_FLOAT;\n break;\n default:\n }\n\n for (const glType in COMPOSITE_GL_TYPES) {\n const [compType, compComponents, name] = COMPOSITE_GL_TYPES[glType];\n if (compType === type && compComponents === components) {\n return {glType, name};\n }\n }\n return null;\n}\n","import type {Loader} from '@loaders.gl/loader-utils';\nimport {assert} from '@loaders.gl/loader-utils';\n\nexport function isLoaderObject(loader?: any): boolean {\n if (!loader) {\n return false;\n }\n\n if (Array.isArray(loader)) {\n loader = loader[0];\n }\n\n const hasExtensions = Array.isArray(loader?.extensions);\n\n /* Now handled by types and worker loaders do not have these\n let hasParser =\n loader.parseTextSync ||\n loader.parseSync ||\n loader.parse ||\n loader.parseStream || // TODO Remove, Replace with parseInBatches\n loader.parseInBatches;\n */\n\n return hasExtensions;\n}\n\nexport function normalizeLoader(loader: Loader): Loader {\n // This error is fairly easy to trigger by mixing up import statements etc\n // So we make an exception and add a developer error message for this case\n // To help new users from getting stuck here\n assert(loader, 'null loader');\n assert(isLoaderObject(loader), 'invalid loader');\n\n // NORMALIZE [LOADER, OPTIONS] => LOADER\n\n // If [loader, options], create a new loaders object with options merged in\n let options;\n if (Array.isArray(loader)) {\n options = loader[1];\n loader = loader[0];\n loader = {\n ...loader,\n options: {...loader.options, ...options}\n };\n }\n\n // NORMALIZE text and binary flags\n // Ensure at least one of text/binary flags are properly set\n\n // @ts-expect-error\n if (loader?.parseTextSync || loader?.parseText) {\n loader.text = true;\n }\n\n if (!loader.text) {\n loader.binary = true;\n }\n\n return loader;\n}\n","import { extend, error, isFunction, stringValue, toBoolean, toNumber, toDate, toString, identity, field, isObject, isArray, isIterable, hasOwnProperty } from 'vega-util';\nimport { dsvFormat } from 'd3-dsv';\nimport { feature, mesh } from 'topojson-client';\nimport { timeFormatDefaultLocale } from 'vega-format';\n\n// https://... file://... //...\n\nconst protocol_re = /^(data:|([A-Za-z]+:)?\\/\\/)/; // Matches allowed URIs. From https://github.com/cure53/DOMPurify/blob/master/src/regexp.js with added file://\n\nconst allowed_re = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i; // eslint-disable-line no-useless-escape\n\nconst whitespace_re = /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205f\\u3000]/g; // eslint-disable-line no-control-regex\n// Special treatment in node.js for the file: protocol\n\nconst fileProtocol = 'file://';\n/**\n * Factory for a loader constructor that provides methods for requesting\n * files from either the network or disk, and for sanitizing request URIs.\n * @param {function} fetch - The Fetch API for HTTP network requests.\n * If null or undefined, HTTP loading will be disabled.\n * @param {object} fs - The file system interface for file loading.\n * If null or undefined, local file loading will be disabled.\n * @return {function} A loader constructor with the following signature:\n * param {object} [options] - Optional default loading options to use.\n * return {object} - A new loader instance.\n */\n\nfunction loaderFactory (fetch, fs) {\n return options => ({\n options: options || {},\n sanitize: sanitize,\n load: load,\n fileAccess: !!fs,\n file: fileLoader(fs),\n http: httpLoader(fetch)\n });\n}\n/**\n * Load an external resource, typically either from the web or from the local\n * filesystem. This function uses {@link sanitize} to first sanitize the uri,\n * then calls either {@link http} (for web requests) or {@link file} (for\n * filesystem loading).\n * @param {string} uri - The resource indicator (e.g., URL or filename).\n * @param {object} [options] - Optional loading options. These options will\n * override any existing default options.\n * @return {Promise} - A promise that resolves to the loaded content.\n */\n\nasync function load(uri, options) {\n const opt = await this.sanitize(uri, options),\n url = opt.href;\n return opt.localFile ? this.file(url) : this.http(url, options);\n}\n/**\n * URI sanitizer function.\n * @param {string} uri - The uri (url or filename) to check.\n * @param {object} options - An options hash.\n * @return {Promise} - A promise that resolves to an object containing\n * sanitized uri data, or rejects it the input uri is deemed invalid.\n * The properties of the resolved object are assumed to be\n * valid attributes for an HTML 'a' tag. The sanitized uri *must* be\n * provided by the 'href' property of the returned object.\n */\n\n\nasync function sanitize(uri, options) {\n options = extend({}, this.options, options);\n const fileAccess = this.fileAccess,\n result = {\n href: null\n };\n let isFile, loadFile, base;\n const isAllowed = allowed_re.test(uri.replace(whitespace_re, ''));\n\n if (uri == null || typeof uri !== 'string' || !isAllowed) {\n error('Sanitize failure, invalid URI: ' + stringValue(uri));\n }\n\n const hasProtocol = protocol_re.test(uri); // if relative url (no protocol/host), prepend baseURL\n\n if ((base = options.baseURL) && !hasProtocol) {\n // Ensure that there is a slash between the baseURL (e.g. hostname) and url\n if (!uri.startsWith('/') && !base.endsWith('/')) {\n uri = '/' + uri;\n }\n\n uri = base + uri;\n } // should we load from file system?\n\n\n loadFile = (isFile = uri.startsWith(fileProtocol)) || options.mode === 'file' || options.mode !== 'http' && !hasProtocol && fileAccess;\n\n if (isFile) {\n // strip file protocol\n uri = uri.slice(fileProtocol.length);\n } else if (uri.startsWith('//')) {\n if (options.defaultProtocol === 'file') {\n // if is file, strip protocol and set loadFile flag\n uri = uri.slice(2);\n loadFile = true;\n } else {\n // if relative protocol (starts with '//'), prepend default protocol\n uri = (options.defaultProtocol || 'http') + ':' + uri;\n }\n } // set non-enumerable mode flag to indicate local file load\n\n\n Object.defineProperty(result, 'localFile', {\n value: !!loadFile\n }); // set uri\n\n result.href = uri; // set default result target, if specified\n\n if (options.target) {\n result.target = options.target + '';\n } // set default result rel, if specified (#1542)\n\n\n if (options.rel) {\n result.rel = options.rel + '';\n } // provide control over cross-origin image handling (#2238)\n // https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image\n\n\n if (options.context === 'image' && options.crossOrigin) {\n result.crossOrigin = options.crossOrigin + '';\n } // return\n\n\n return result;\n}\n/**\n * File system loader factory.\n * @param {object} fs - The file system interface.\n * @return {function} - A file loader with the following signature:\n * param {string} filename - The file system path to load.\n * param {string} filename - The file system path to load.\n * return {Promise} A promise that resolves to the file contents.\n */\n\n\nfunction fileLoader(fs) {\n return fs ? filename => new Promise((accept, reject) => {\n fs.readFile(filename, (error, data) => {\n if (error) reject(error);else accept(data);\n });\n }) : fileReject;\n}\n/**\n * Default file system loader that simply rejects.\n */\n\n\nasync function fileReject() {\n error('No file system access.');\n}\n/**\n * HTTP request handler factory.\n * @param {function} fetch - The Fetch API method.\n * @return {function} - An http loader with the following signature:\n * param {string} url - The url to request.\n * param {object} options - An options hash.\n * return {Promise} - A promise that resolves to the file contents.\n */\n\n\nfunction httpLoader(fetch) {\n return fetch ? async function (url, options) {\n const opt = extend({}, this.options.http, options),\n type = options && options.response,\n response = await fetch(url, opt);\n return !response.ok ? error(response.status + '' + response.statusText) : isFunction(response[type]) ? response[type]() : response.text();\n } : httpReject;\n}\n/**\n * Default http request handler that simply rejects.\n */\n\n\nasync function httpReject() {\n error('No HTTP fetch method available.');\n}\n\nconst isValid = _ => _ != null && _ === _;\n\nconst isBoolean = _ => _ === 'true' || _ === 'false' || _ === true || _ === false;\n\nconst isDate = _ => !Number.isNaN(Date.parse(_));\n\nconst isNumber = _ => !Number.isNaN(+_) && !(_ instanceof Date);\n\nconst isInteger = _ => isNumber(_) && Number.isInteger(+_);\n\nconst typeParsers = {\n boolean: toBoolean,\n integer: toNumber,\n number: toNumber,\n date: toDate,\n string: toString,\n unknown: identity\n};\nconst typeTests = [isBoolean, isInteger, isNumber, isDate];\nconst typeList = ['boolean', 'integer', 'number', 'date'];\nfunction inferType(values, field) {\n if (!values || !values.length) return 'unknown';\n const n = values.length,\n m = typeTests.length,\n a = typeTests.map((_, i) => i + 1);\n\n for (let i = 0, t = 0, j, value; i < n; ++i) {\n value = field ? values[i][field] : values[i];\n\n for (j = 0; j < m; ++j) {\n if (a[j] && isValid(value) && !typeTests[j](value)) {\n a[j] = 0;\n ++t;\n if (t === typeTests.length) return 'string';\n }\n }\n }\n\n return typeList[a.reduce((u, v) => u === 0 ? v : u, 0) - 1];\n}\nfunction inferTypes(data, fields) {\n return fields.reduce((types, field) => {\n types[field] = inferType(data, field);\n return types;\n }, {});\n}\n\nfunction delimitedFormat(delimiter) {\n const parse = function (data, format) {\n const delim = {\n delimiter: delimiter\n };\n return dsv(data, format ? extend(format, delim) : delim);\n };\n\n parse.responseType = 'text';\n return parse;\n}\nfunction dsv(data, format) {\n if (format.header) {\n data = format.header.map(stringValue).join(format.delimiter) + '\\n' + data;\n }\n\n return dsvFormat(format.delimiter).parse(data + '');\n}\ndsv.responseType = 'text';\n\nfunction isBuffer(_) {\n return typeof Buffer === 'function' && isFunction(Buffer.isBuffer) ? Buffer.isBuffer(_) : false;\n}\n\nfunction json(data, format) {\n const prop = format && format.property ? field(format.property) : identity;\n return isObject(data) && !isBuffer(data) ? parseJSON(prop(data), format) : prop(JSON.parse(data));\n}\njson.responseType = 'json';\n\nfunction parseJSON(data, format) {\n if (!isArray(data) && isIterable(data)) {\n data = [...data];\n }\n\n return format && format.copy ? JSON.parse(JSON.stringify(data)) : data;\n}\n\nconst filters = {\n interior: (a, b) => a !== b,\n exterior: (a, b) => a === b\n};\nfunction topojson(data, format) {\n let method, object, property, filter;\n data = json(data, format);\n\n if (format && format.feature) {\n method = feature;\n property = format.feature;\n } else if (format && format.mesh) {\n method = mesh;\n property = format.mesh;\n filter = filters[format.filter];\n } else {\n error('Missing TopoJSON feature or mesh parameter.');\n }\n\n object = (object = data.objects[property]) ? method(data, object, filter) : error('Invalid TopoJSON object: ' + property);\n return object && object.features || [object];\n}\ntopojson.responseType = 'json';\n\nconst format = {\n dsv: dsv,\n csv: delimitedFormat(','),\n tsv: delimitedFormat('\\t'),\n json: json,\n topojson: topojson\n};\nfunction formats(name, reader) {\n if (arguments.length > 1) {\n format[name] = reader;\n return this;\n } else {\n return hasOwnProperty(format, name) ? format[name] : null;\n }\n}\nfunction responseType(type) {\n const f = formats(type);\n return f && f.responseType || 'text';\n}\n\nfunction read (data, schema, timeParser, utcParser) {\n schema = schema || {};\n const reader = formats(schema.type || 'json');\n if (!reader) error('Unknown data format type: ' + schema.type);\n data = reader(data, schema);\n if (schema.parse) parse(data, schema.parse, timeParser, utcParser);\n if (hasOwnProperty(data, 'columns')) delete data.columns;\n return data;\n}\n\nfunction parse(data, types, timeParser, utcParser) {\n if (!data.length) return; // early exit for empty data\n\n const locale = timeFormatDefaultLocale();\n timeParser = timeParser || locale.timeParse;\n utcParser = utcParser || locale.utcParse;\n let fields = data.columns || Object.keys(data[0]),\n datum,\n field,\n i,\n j,\n n,\n m;\n if (types === 'auto') types = inferTypes(data, fields);\n fields = Object.keys(types);\n const parsers = fields.map(field => {\n const type = types[field];\n let parts, pattern;\n\n if (type && (type.startsWith('date:') || type.startsWith('utc:'))) {\n parts = type.split(/:(.+)?/, 2); // split on first :\n\n pattern = parts[1];\n\n if (pattern[0] === '\\'' && pattern[pattern.length - 1] === '\\'' || pattern[0] === '\"' && pattern[pattern.length - 1] === '\"') {\n pattern = pattern.slice(1, -1);\n }\n\n const parse = parts[0] === 'utc' ? utcParser : timeParser;\n return parse(pattern);\n }\n\n if (!typeParsers[type]) {\n throw Error('Illegal format pattern: ' + field + ':' + type);\n }\n\n return typeParsers[type];\n });\n\n for (i = 0, n = data.length, m = fields.length; i < n; ++i) {\n datum = data[i];\n\n for (j = 0; j < m; ++j) {\n field = fields[j];\n datum[field] = parsers[j](datum[field]);\n }\n }\n}\n\nconst loader = loaderFactory(typeof fetch !== 'undefined' && fetch, // use built-in fetch API\nnull // no file system access\n);\n\nexport { format, formats, inferType, inferTypes, loader, read, responseType, typeParsers };\n","import {resolvePath} from '@loaders.gl/loader-utils';\nimport {makeResponse} from '../utils/response-utils';\n// import {getErrorMessageFromResponse} from './fetch-error-message';\n\n/**\n * fetch compatible function\n * Reads file data from:\n * - http/http urls\n * - data urls\n * - File/Blob objects\n * Leverages `@loaders.gl/polyfills` for Node.js support\n * Respects pathPrefix and file aliases\n */\nexport async function fetchFile(\n url: string | Blob,\n options?: RequestInit & {fetch?: RequestInit | Function}\n): Promise<Response> {\n if (typeof url === 'string') {\n url = resolvePath(url);\n\n let fetchOptions: RequestInit = options as RequestInit;\n if (options?.fetch && typeof options?.fetch !== 'function') {\n fetchOptions = options.fetch;\n }\n\n return await fetch(url, fetchOptions);\n }\n\n return await makeResponse(url);\n}\n","// probe.gl Log compatible loggers\nimport {Log} from 'probe.gl';\n\nexport const probeLog = new Log({id: 'loaders.gl'});\n\n// Logs nothing\nexport class NullLog {\n log() {\n return () => {};\n }\n info() {\n return () => {};\n }\n warn() {\n return () => {};\n }\n error() {\n return () => {};\n }\n}\n\n// Logs to console\nexport class ConsoleLog {\n console;\n\n constructor() {\n this.console = console; // eslint-disable-line\n }\n log(...args) {\n return this.console.log.bind(this.console, ...args);\n }\n info(...args) {\n return this.console.info.bind(this.console, ...args);\n }\n warn(...args) {\n return this.console.warn.bind(this.console, ...args);\n }\n error(...args) {\n return this.console.error.bind(this.console, ...args);\n }\n}\n","import type {LoaderOptions} from '@loaders.gl/loader-utils';\nimport {ConsoleLog} from './loggers';\n\nexport const DEFAULT_LOADER_OPTIONS: LoaderOptions = {\n // baseUri\n fetch: null,\n mimeType: undefined,\n nothrow: false,\n log: new ConsoleLog(), // A probe.gl compatible (`log.log()()` syntax) that just logs to console\n\n CDN: 'https://unpkg.com/@loaders.gl',\n worker: true, // By default, use worker if provided by loader.\n maxConcurrency: 3, // How many worker instances should be created for each loader.\n maxMobileConcurrency: 1, // How many worker instances should be created for each loader on mobile devices.\n reuseWorkers: true, // By default reuse workers,\n _workerType: '', // 'test' to use locally generated workers\n\n limit: 0,\n _limitMB: 0,\n batchSize: 'auto',\n batchDebounceMs: 0,\n metadata: false, // TODO - currently only implemented for parseInBatches, adds initial metadata batch,\n transforms: []\n};\n\nexport const REMOVED_LOADER_OPTIONS = {\n throws: 'nothrow',\n dataType: '(no longer used)',\n uri: 'baseUri',\n // Warn if fetch options are used on top-level\n method: 'fetch.method',\n headers: 'fetch.headers',\n body: 'fetch.body',\n mode: 'fetch.mode',\n credentials: 'fetch.credentials',\n cache: 'fetch.cache',\n redirect: 'fetch.redirect',\n referrer: 'fetch.referrer',\n referrerPolicy: 'fetch.referrerPolicy',\n integrity: 'fetch.integrity',\n keepalive: 'fetch.keepalive',\n signal: 'fetch.signal'\n};\n","import type {Loader, LoaderContext, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {global} from '@loaders.gl/loader-utils';\nimport {isPureObject, isObject} from '../../javascript-utils/is-type';\nimport {fetchFile} from '../fetch/fetch-file';\nimport {probeLog, NullLog} from './loggers';\nimport {DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS} from './option-defaults';\n/**\n * Global state for loaders.gl. Stored on `global.loaders._state`\n */\ntype GlobalLoaderState = {\n loaderRegistry: Loader[];\n globalOptions: {[key: string]: any};\n};\n\n/**\n * Helper for safely accessing global loaders.gl variables\n * Wraps initialization of global variable in function to defeat overly aggressive tree-shakers\n */\nexport function getGlobalLoaderState(): GlobalLoaderState {\n // @ts-ignore\n global.loaders = global.loaders || {};\n // @ts-ignore\n const {loaders} = global;\n\n // Add _state object to keep separate from modules added to global.loaders\n loaders._state = loaders._state || {};\n return loaders._state;\n}\n\n// Store global loader options on the global object to increase chances of cross loaders-version interoperability\n// NOTE: This use case is not reliable but can help when testing new versions of loaders.gl with existing frameworks\nconst getGlobalLoaderOptions = () => {\n const state = getGlobalLoaderState();\n // Ensure all default loader options from this library are mentioned\n state.globalOptions = state.globalOptions || {...DEFAULT_LOADER_OPTIONS};\n return state.globalOptions;\n};\n\n/**\n * Set global loader options\n * @param options\n */\nexport function setGlobalOptions(options: object): void {\n const state = getGlobalLoaderState();\n const globalOptions = getGlobalLoaderOptions();\n state.globalOptions = normalizeOptionsInternal(globalOptions, options);\n}\n\n/**\n * Merges options with global opts and loader defaults, also injects baseUri\n * @param options\n * @param loader\n * @param loaders\n * @param url\n */\nexport function normalizeOptions(\n options: object,\n loader: Loader,\n loaders?: Loader[],\n url?: string\n): object {\n loaders = loaders || [];\n loaders = Array.isArray(loaders) ? loaders : [loaders];\n\n validateOptions(options, loaders);\n return normalizeOptionsInternal(loader, options, url);\n}\n\n/**\n * Gets the current fetch function from options and context\n * @param options\n * @param context\n */\nexport function getFetchFunction(\n options?: LoaderOptions,\n context?: Omit<LoaderContext, 'fetch'> & Partial<Pick<LoaderContext, 'fetch'>>\n) {\n const globalOptions = getGlobalLoaderOptions();\n\n const fetchOptions = options || globalOptions;\n\n // options.fetch can be a function\n if (typeof fetchOptions.fetch === 'function') {\n return fetchOptions.fetch;\n }\n\n // options.fetch can be an options object\n if (isObject(fetchOptions.fetch)) {\n return (url) => fetchFile(url, fetchOptions);\n }\n\n // else refer to context (from parent loader) if available\n if (context?.fetch) {\n return context?.fetch;\n }\n\n // else return the default fetch function\n return fetchFile;\n}\n\n// VALIDATE OPTIONS\n\n/**\n * Warn for unsupported options\n * @param options\n * @param loaders\n */\nfunction validateOptions(options: LoaderOptions, loaders: Loader[]) {\n // Check top level options\n validateOptionsObject(options, null, DEFAULT_LOADER_OPTIONS, REMOVED_LOADER_OPTIONS, loaders);\n for (const loader of loaders) {\n // Get the scoped, loader specific options from the user supplied options\n const idOptions = (options && options[loader.id]) || {};\n\n // Get scoped, loader specific default and deprecated options from the selected loader\n const loaderOptions = (loader.options && loader.options[loader.id]) || {};\n const deprecatedOptions =\n (loader.deprecatedOptions && loader.deprecatedOptions[loader.id]) || {};\n\n // Validate loader specific options\n validateOptionsObject(idOptions, loader.id, loaderOptions, deprecatedOptions, loaders);\n }\n}\n\n// eslint-disable-next-line max-params, complexity\nfunction validateOptionsObject(\n options,\n id: string | null,\n defaultOptions,\n deprecatedOptions,\n loaders: Loader[]\n) {\n const loaderName = id || 'Top level';\n const prefix = id ? `${id}.` : '';\n\n for (const key in options) {\n // If top level option value is an object it could options for a loader, so ignore\n const isSubOptions = !id && isObject(options[key]);\n const isBaseUriOption = key === 'baseUri' && !id;\n const isWorkerUrlOption = key === 'workerUrl' && id;\n // <loader>.workerUrl requires special handling as it is now auto-generated and no longer specified as a default option.\n if (!(key in defaultOptions) && !isBaseUriOption && !isWorkerUrlOption) {\n // Issue deprecation warnings\n if (key in deprecatedOptions) {\n probeLog.warn(\n `${loaderName} loader option \\'${prefix}${key}\\' no longer supported, use \\'${deprecatedOptions[key]}\\'`\n )();\n } else if (!isSubOptions) {\n const suggestion = findSimilarOption(key, loaders);\n probeLog.warn(\n `${loaderName} loader option \\'${prefix}${key}\\' not recognized. ${suggestion}`\n )();\n }\n }\n }\n}\n\nfunction findSimilarOption(optionKey, loaders) {\n const lowerCaseOptionKey = optionKey.toLowerCase();\n let bestSuggestion = '';\n for (const loader of loaders) {\n for (const key in loader.options) {\n if (optionKey === key) {\n return `Did you mean \\'${loader.id}.${key}\\'?`;\n }\n const lowerCaseKey = key.toLowerCase();\n const isPartialMatch =\n lowerCaseOptionKey.startsWith(lowerCaseKey) || lowerCaseKey.startsWith(lowerCaseOptionKey);\n if (isPartialMatch) {\n bestSuggestion = bestSuggestion || `Did you mean \\'${loader.id}.${key}\\'?`;\n }\n }\n }\n return bestSuggestion;\n}\n\nfunction normalizeOptionsInternal(loader, options, url?: string) {\n const loaderDefaultOptions = loader.options || {};\n\n const mergedOptions = {...loaderDefaultOptions};\n\n addUrlOptions(mergedOptions, url);\n\n // LOGGING: options.log can be set to `null` to defeat logging\n if (mergedOptions.log === null) {\n mergedOptions.log = new NullLog();\n }\n\n mergeNestedFields(mergedOptions, getGlobalLoaderOptions());\n mergeNestedFields(mergedOptions, options);\n\n return mergedOptions;\n}\n\n// Merge nested options objects\nfunction mergeNestedFields(mergedOptions, options) {\n for (const key in options) {\n // Check for nested options\n // object in options => either no key in defaultOptions or object in defaultOptions\n if (key in options) {\n const value = options[key];\n if (isPureObject(value) && isPureObject(mergedOptions[key])) {\n mergedOptions[key] = {\n ...mergedOptions[key],\n ...options[key]\n };\n } else {\n mergedOptions[key] = options[key];\n }\n }\n // else: No need to merge nested opts, and the initial merge already copied over the nested options\n }\n}\n\n// Harvest information from the url\n// TODO - baseUri should be a directory, i.e. remove file component from baseUri\n// TODO - extract extension?\n// TODO - extract query parameters?\n// TODO - should these be injected on context instead of options?\nfunction addUrlOptions(options, url?: string) {\n if (url && !('baseUri' in options)) {\n options.baseUri = url;\n }\n}\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","// https://en.wikipedia.org/wiki/Rhumb_line\nimport { convertLength, degreesToRadians, earthRadius, point, } from \"@turf/helpers\";\nimport { getCoord } from \"@turf/invariant\";\n/**\n * Returns the destination {@link Point} having travelled the given distance along a Rhumb line from the\n * origin Point with the (varant) given bearing.\n *\n * @name rhumbDestination\n * @param {Coord} origin starting point\n * @param {number} distance distance from the starting point\n * @param {number} bearing varant bearing angle ranging from -180 to 180 degrees from north\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @param {Object} [options.properties={}] translate properties to destination point\n * @returns {Feature<Point>} Destination point.\n * @example\n * var pt = turf.point([-75.343, 39.984], {\"marker-color\": \"F00\"});\n * var distance = 50;\n * var bearing = 90;\n * var options = {units: 'miles'};\n *\n * var destination = turf.rhumbDestination(pt, distance, bearing, options);\n *\n * //addToMap\n * var addToMap = [pt, destination]\n * destination.properties['marker-color'] = '#00F';\n */\nfunction rhumbDestination(origin, distance, bearing, options) {\n if (options === void 0) { options = {}; }\n var wasNegativeDistance = distance < 0;\n var distanceInMeters = convertLength(Math.abs(distance), options.units, \"meters\");\n if (wasNegativeDistance)\n distanceInMeters = -Math.abs(distanceInMeters);\n var coords = getCoord(origin);\n var destination = calculateRhumbDestination(coords, distanceInMeters, bearing);\n // compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)\n // solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678\n destination[0] +=\n destination[0] - coords[0] > 180\n ? -360\n : coords[0] - destination[0] > 180\n ? 360\n : 0;\n return point(destination, options.properties);\n}\n/**\n * Returns the destination point having travelled along a rhumb line from origin point the given\n * distance on the given bearing.\n * Adapted from Geodesy: http://www.movable-type.co.uk/scripts/latlong.html#rhumblines\n *\n * @private\n * @param {Array<number>} origin - point\n * @param {number} distance - Distance travelled, in same units as earth radius (default: metres).\n * @param {number} bearing - Bearing in degrees from north.\n * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).\n * @returns {Array<number>} Destination point.\n */\nfunction calculateRhumbDestination(origin, distance, bearing, radius) {\n // φ => phi\n // λ => lambda\n // ψ => psi\n // Δ => Delta\n // δ => delta\n // θ => theta\n radius = radius === undefined ? earthRadius : Number(radius);\n var delta = distance / radius; // angular distance in radians\n var lambda1 = (origin[0] * Math.PI) / 180; // to radians, but without normalize to 𝜋\n var phi1 = degreesToRadians(origin[1]);\n var theta = degreesToRadians(bearing);\n var DeltaPhi = delta * Math.cos(theta);\n var phi2 = phi1 + DeltaPhi;\n // check for some daft bugger going past the pole, normalise latitude if so\n if (Math.abs(phi2) > Math.PI / 2) {\n phi2 = phi2 > 0 ? Math.PI - phi2 : -Math.PI - phi2;\n }\n var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));\n // E-W course becomes ill-conditioned with 0/0\n var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1);\n var DeltaLambda = (delta * Math.sin(theta)) / q;\n var lambda2 = lambda1 + DeltaLambda;\n return [\n (((lambda2 * 180) / Math.PI + 540) % 360) - 180,\n (phi2 * 180) / Math.PI,\n ]; // normalise to −180..+180°\n}\nexport default rhumbDestination;\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 2 Dimensional Vector\r\n * @module vec2\r\n */\n\n/**\r\n * Creates a new, empty vec2\r\n *\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with values from an existing vector\r\n *\r\n * @param {ReadonlyVec2} a vector to clone\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Creates a new vec2 initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} a new 2D vector\r\n */\n\nexport function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Copy the values from one vec2 to another\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the source vector\r\n * @returns {vec2} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n}\n/**\r\n * Set the components of a vec2 to the given values\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @returns {vec2} out\r\n */\n\nexport function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n}\n/**\r\n * Adds two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n}\n/**\r\n * Subtracts vector b from vector a\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n}\n/**\r\n * Multiplies two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n}\n/**\r\n * Divides two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n}\n/**\r\n * Math.ceil the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to ceil\r\n * @returns {vec2} out\r\n */\n\nexport function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n}\n/**\r\n * Math.floor the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to floor\r\n * @returns {vec2} out\r\n */\n\nexport function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n}\n/**\r\n * Returns the minimum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n}\n/**\r\n * Returns the maximum of two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec2} out\r\n */\n\nexport function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n}\n/**\r\n * Math.round the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to round\r\n * @returns {vec2} out\r\n */\n\nexport function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n}\n/**\r\n * Scales a vec2 by a scalar number\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {vec2} out\r\n */\n\nexport function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n}\n/**\r\n * Adds two vec2's after scaling the second operand by a scalar value\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} scale the amount to scale b by before adding\r\n * @returns {vec2} out\r\n */\n\nexport function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n}\n/**\r\n * Calculates the euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} distance between a and b\r\n */\n\nexport function distance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared euclidian distance between two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} squared distance between a and b\r\n */\n\nexport function squaredDistance(a, b) {\n var x = b[0] - a[0],\n y = b[1] - a[1];\n return x * x + y * y;\n}\n/**\r\n * Calculates the length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport function length(a) {\n var x = a[0],\n y = a[1];\n return Math.hypot(x, y);\n}\n/**\r\n * Calculates the squared length of a vec2\r\n *\r\n * @param {ReadonlyVec2} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n */\n\nexport function squaredLength(a) {\n var x = a[0],\n y = a[1];\n return x * x + y * y;\n}\n/**\r\n * Negates the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to negate\r\n * @returns {vec2} out\r\n */\n\nexport function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n}\n/**\r\n * Returns the inverse of the components of a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to invert\r\n * @returns {vec2} out\r\n */\n\nexport function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n}\n/**\r\n * Normalize a vec2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a vector to normalize\r\n * @returns {vec2} out\r\n */\n\nexport function normalize(out, a) {\n var x = a[0],\n y = a[1];\n var len = x * x + y * y;\n\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n}\n/**\r\n * Calculates the dot product of two vec2's\r\n *\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {Number} dot product of a and b\r\n */\n\nexport function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n}\n/**\r\n * Computes the cross product of two vec2's\r\n * Note that the cross product must by definition produce a 3D vector\r\n *\r\n * @param {vec3} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @returns {vec3} out\r\n */\n\nexport function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n}\n/**\r\n * Performs a linear interpolation between two vec2's\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the first operand\r\n * @param {ReadonlyVec2} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {vec2} out\r\n */\n\nexport function lerp(out, a, b, t) {\n var ax = a[0],\n ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n}\n/**\r\n * Generates a random vector with the given scale\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\r\n * @returns {vec2} out\r\n */\n\nexport function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat2d\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat2d} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat2d(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat3\r\n * 3rd vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat3} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat3(out, a, m) {\n var x = a[0],\n y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n}\n/**\r\n * Transforms the vec2 with a mat4\r\n * 3rd vector component is implicitly '0'\r\n * 4th vector component is implicitly '1'\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @param {ReadonlyVec2} a the vector to transform\r\n * @param {ReadonlyMat4} m matrix to transform with\r\n * @returns {vec2} out\r\n */\n\nexport function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n}\n/**\r\n * Rotate a 2D vector\r\n * @param {vec2} out The receiving vec2\r\n * @param {ReadonlyVec2} a The vec2 point to rotate\r\n * @param {ReadonlyVec2} b The origin of the rotation\r\n * @param {Number} rad The angle of rotation in radians\r\n * @returns {vec2} out\r\n */\n\nexport function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0],\n p1 = a[1] - b[1],\n sinC = Math.sin(rad),\n cosC = Math.cos(rad); //perform rotation and translate to correct position\n\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n}\n/**\r\n * Get the angle between two 2D vectors\r\n * @param {ReadonlyVec2} a The first operand\r\n * @param {ReadonlyVec2} b The second operand\r\n * @returns {Number} The angle in radians\r\n */\n\nexport function angle(a, b) {\n var x1 = a[0],\n y1 = a[1],\n x2 = b[0],\n y2 = b[1],\n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2),\n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n}\n/**\r\n * Set the components of a vec2 to zero\r\n *\r\n * @param {vec2} out the receiving vector\r\n * @returns {vec2} out\r\n */\n\nexport function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n}\n/**\r\n * Returns a string representation of a vector\r\n *\r\n * @param {ReadonlyVec2} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n}\n/**\r\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n}\n/**\r\n * Returns whether or not the vectors have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyVec2} a The first vector.\r\n * @param {ReadonlyVec2} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1];\n var b0 = b[0],\n b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n}\n/**\r\n * Alias for {@link vec2.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Alias for {@link vec2.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;\n/**\r\n * Alias for {@link vec2.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link vec2.divide}\r\n * @function\r\n */\n\nexport var div = divide;\n/**\r\n * Alias for {@link vec2.distance}\r\n * @function\r\n */\n\nexport var dist = distance;\n/**\r\n * Alias for {@link vec2.squaredDistance}\r\n * @function\r\n */\n\nexport var sqrDist = squaredDistance;\n/**\r\n * Alias for {@link vec2.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Perform some operation over an array of vec2s.\r\n *\r\n * @param {Array} a the array of vectors to iterate over\r\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\r\n * @param {Number} offset Number of elements to skip at the beginning of the array\r\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\r\n * @param {Function} fn Function to call for each vector in the array\r\n * @param {Object} [arg] additional argument to pass to fn\r\n * @returns {Array} a\r\n * @function\r\n */\n\nexport var forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n\n if (!stride) {\n stride = 2;\n }\n\n if (!offset) {\n offset = 0;\n }\n\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n } else {\n l = a.length;\n }\n\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n\n return a;\n };\n}();","export class BaseResponse {\n /**\n * Returns whether the response has an ok'ish status code\n */\n get ok() {\n return this.status >= 200 && this.status <= 299;\n }\n\n /**\n * Returns the status code of the response\n */\n get status() {\n throw new Error('not implemented');\n }\n\n /**\n * Returns the value of the specified header\n * @param {string} headerName the header name\n * @returns {string} the header value\n */\n getHeader(headerName) {\n throw new Error('not implemented');\n }\n\n /**\n * @returns {ArrayBuffer} the response data of the request\n */\n async getData() {\n throw new Error('not implemented');\n }\n}\n\nexport class BaseClient {\n constructor(url) {\n this.url = url;\n }\n\n /**\n * Send a request with the options\n * @param {object} [options]\n */\n async request({ headers, credentials, signal } = {}) {\n throw new Error(`request is not implemented`);\n }\n}\n\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","import GL from '@luma.gl/constants';\nimport {isWebGL2} from '@luma.gl/gltools';\n\n// const S3TC = 'WEBGL_compressed_texture_s3tc';\n// const PVRTC = 'WEBGL_compressed_texture_pvrtc';\n// const ES3 = 'WEBGL_compressed_texture_es3';\n// const ETC1 = 'WEBGL_compressed_texture_etc1';\n// const SRGB = 'EXT_sRGB';\n// const DEPTH = 'WEBGL_depth_texture';\n\n// Legal combinations for internalFormat, format and type\nexport const TEXTURE_FORMATS = {\n // Unsized texture format - more performance\n [GL.RGB]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_5_6_5]},\n // TODO: format: GL.RGBA type: GL.FLOAT is supported in WebGL1 when 'OES_texure_float' is suported\n // we need to update this table structure to specify extensions (gl1: 'OES_texure_float', gl2: false) for each type.\n [GL.RGBA]: {\n dataFormat: GL.RGBA,\n types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_4_4_4_4, GL.UNSIGNED_SHORT_5_5_5_1]\n },\n [GL.ALPHA]: {dataFormat: GL.ALPHA, types: [GL.UNSIGNED_BYTE]},\n [GL.LUMINANCE]: {dataFormat: GL.LUMINANCE, types: [GL.UNSIGNED_BYTE]},\n [GL.LUMINANCE_ALPHA]: {dataFormat: GL.LUMINANCE_ALPHA, types: [GL.UNSIGNED_BYTE]},\n\n // 32 bit floats\n [GL.R32F]: {dataFormat: GL.RED, types: [GL.FLOAT], gl2: true},\n [GL.RG32F]: {dataFormat: GL.RG, types: [GL.FLOAT], gl2: true},\n [GL.RGB32F]: {dataFormat: GL.RGB, types: [GL.FLOAT], gl2: true},\n [GL.RGBA32F]: {dataFormat: GL.RGBA, types: [GL.FLOAT], gl2: true}\n\n // [GL.DEPTH_COMPONENT]: {types: [GL.UNSIGNED_SHORT, GL.UNSIGNED_INT, GL.UNSIGNED_INT_24_8], gl1: DEPTH},\n // [GL.DEPTH_STENCIL]: {gl1: DEPTH},\n\n // Sized texture format - more performance\n // R\n // [GL.R8]: {dataFormat: GL.RED, types: [GL.UNSIGNED_BYTE], gl2: true},\n // [GL.R16F]: {dataFormat: GL.RED, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true},\n // [GL.R8UI]: {dataFormat: GL.RED_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true},\n // // RG\n // [GL.RG8]: {dataFormat: GL.RG, types: [GL.UNSIGNED_BYTE], gl2: true},\n // [GL.RG16F]: {dataFormat: GL.RG, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true},\n // [GL.RG8UI]: {dataFormat: GL.RG_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true},\n // // RGB\n // [GL.RGB8]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},\n // [GL.SRGB8]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},\n // [GL.RGB565]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_5_6_5], gl2: true},\n // [GL.R11F_G11F_B10F]: {dataFormat: GL.RGB, types: [GL.UNSIGNED_INT_10F_11F_11F_REV, GL.HALF_FLOAT, GL.FLOAT], gl2: true},\n // [GL.RGB9_E5]: {dataFormat: GL.RGB, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true, gl1: 'WEBGL_color_buffer_half_float'},\n // [GL.RGB16F]: {dataFormat: GL.RGB, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true, gl1: 'WEBGL_color_buffer_float'},\n // [GL.RGB8UI]: {dataFormat: GL.RGB_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true},\n // // RGBA\n // [GL.RGBA8]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},\n // [GL.SRGB8_ALPHA8]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE], gl2: true, gl1: SRGB},\n // [GL.RGB5_A1]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_5_5_5_1], gl2: true},\n // [GL.RGBA4]: {dataFormat: GL.RGBA, types: [GL.UNSIGNED_BYTE, GL.UNSIGNED_SHORT_4_4_4_4], gl2: true},\n // [GL.RGBA16F]: {dataFormat: GL.RGBA, types: [GL.HALF_FLOAT, GL.FLOAT], gl2: true},\n // [GL.RGBA8UI]: {dataFormat: GL.RGBA_INTEGER, types: [GL.UNSIGNED_BYTE], gl2: true}\n\n // Compressed formats\n\n // WEBGL_compressed_texture_s3tc\n\n // [GL.COMPRESSED_RGB_S3TC_DXT1_EXT]: {compressed: true, gl1: S3TC},\n // [GL.COMPRESSED_RGBA_S3TC_DXT1_EXT]: {compressed: true, gl1: S3TC},\n // [GL.COMPRESSED_RGBA_S3TC_DXT3_EXT]: {compressed: true, gl1: S3TC},\n // [GL.COMPRESSED_RGBA_S3TC_DXT5_EXT]: {compressed: true, gl1: S3TC},\n\n // WEBGL_compressed_texture_es3\n\n // [GL.COMPRESSED_R11_EAC]: {compressed: true, gl1: ES3}, // RED\n // [GL.COMPRESSED_SIGNED_R11_EAC]: {compressed: true, gl1: ES3}, // RED\n // [GL.COMPRESSED_RG11_EAC]: {compressed: true, gl1: ES3}, // RG\n // [GL.COMPRESSED_SIGNED_RG11_EAC]: {compressed: true, gl1: ES3}, // RG\n // [GL.COMPRESSED_RGB8_ETC2]: {compressed: true, gl1: ES3}, // RGB\n // [GL.COMPRESSED_RGBA8_ETC2_EAC]: {compressed: true, gl1: ES3}, // RBG\n // [GL.COMPRESSED_SRGB8_ETC2]: {compressed: true, gl1: ES3}, // RGB\n // [GL.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]: {compressed: true, gl1: ES3}, // RGBA\n // [GL.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]: {compressed: true, gl1: ES3}, // RGBA\n // [GL.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]: {compressed: true, gl1: ES3}, // RGBA\n /* WebGL2 guaranteed availability compressed formats?\n COMPRESSED_R11_EAC RED\n COMPRESSED_SIGNED_R11_EAC RED\n COMPRESSED_RG11_EAC RG\n COMPRESSED_SIGNED_RG11_EAC RG\n COMPRESSED_RGB8_ETC2 RGB\n COMPRESSED_SRGB8_ETC2 RGB\n COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 RGBA\n COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 RGBA\n COMPRESSED_RGBA8_ETC2_EAC RGBA\n COMPRESSED_SRGB8_ALPHA8_ETC2_EAC\n */\n\n // WEBGL_compressed_texture_pvrtc\n\n // [GL.COMPRESSED_RGB_PVRTC_4BPPV1_IMG]: {compressed: true, gl1: PVRTC},\n // [GL.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG]: {compressed: true, gl1: PVRTC},\n // [GL.COMPRESSED_RGB_PVRTC_2BPPV1_IMG]: {compressed: true, gl1: PVRTC},\n // [GL.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG]: {compressed: true, gl1: PVRTC},\n\n // WEBGL_compressed_texture_etc1\n\n // [GL.COMPRESSED_RGB_ETC1_WEBGL]: {compressed: true, gl1: ETC1},\n\n // WEBGL_compressed_texture_atc\n\n // [GL.COMPRESSED_RGB_ATC_WEBGL]: {compressed: true, gl1: ETC1},\n // [GL.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL]: {compressed: true, gl1: ETC1},\n // [GL.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL]: {compressed: true, gl1: ETC1}\n};\n\nexport const DATA_FORMAT_CHANNELS = {\n [GL.RED]: 1,\n [GL.RED_INTEGER]: 1,\n [GL.RG]: 2,\n [GL.RG_INTEGER]: 2,\n [GL.RGB]: 3,\n [GL.RGB_INTEGER]: 3,\n [GL.RGBA]: 4,\n [GL.RGBA_INTEGER]: 4,\n [GL.DEPTH_COMPONENT]: 1,\n [GL.DEPTH_STENCIL]: 1,\n [GL.ALPHA]: 1,\n [GL.LUMINANCE]: 1,\n [GL.LUMINANCE_ALPHA]: 2\n};\n\nexport const TYPE_SIZES = {\n [GL.FLOAT]: 4,\n [GL.UNSIGNED_INT]: 4,\n [GL.INT]: 4,\n [GL.UNSIGNED_SHORT]: 2,\n [GL.SHORT]: 2,\n [GL.HALF_FLOAT]: 2,\n [GL.BYTE]: 1,\n [GL.UNSIGNED_BYTE]: 1\n};\n\nexport function isFormatSupported(gl, format) {\n const info = TEXTURE_FORMATS[format];\n if (!info) {\n return false;\n }\n if (info.gl1 === undefined && info.gl2 === undefined) {\n // No info - always supported\n return true;\n }\n const value = isWebGL2(gl) ? info.gl2 || info.gl1 : info.gl1;\n return typeof value === 'string' ? gl.getExtension(value) : value;\n}\n\nexport function isLinearFilteringSupported(gl, format) {\n const info = TEXTURE_FORMATS[format];\n switch (info && info.types[0]) {\n // Both WebGL1 and WebGL2?\n case GL.FLOAT:\n return gl.getExtension('OES_texture_float_linear');\n // Not in WebGL2?\n case GL.HALF_FLOAT:\n return gl.getExtension('OES_texture_half_float_linear');\n default:\n return true;\n }\n}\n","export { ArrowStyles, DEFAULT_ARROWS, MAX_ARROWS } from './style';\n\n// Layers\nexport { default as EditableGeoJsonLayer } from './layers/editable-geojson-layer';\nexport { default as EditableH3ClusterLayer } from './layers/editable-h3-cluster-layer';\nexport { default as SelectionLayer } from './layers/selection-layer';\nexport { default as ElevatedEditHandleLayer } from './layers/elevated-edit-handle-layer';\n\n// Layers moved from deck.gl\nexport { default as PathOutlineLayer } from './layers/path-outline-layer/path-outline-layer';\nexport { default as PathMarkerLayer } from './layers/path-marker-layer/path-marker-layer';\nexport { default as JunctionScatterplotLayer } from './layers/junction-scatterplot-layer';\n\n// Utils\nexport { toDeckColor } from './utils';\n\n// Types\nexport type { Color, Viewport } from './types';\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <http://feross.org>\n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = require('base64-js')\nvar ieee754 = require('ieee754')\nvar isArray = require('isarray')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined\n ? global.TYPED_ARRAY_SUPPORT\n : typedArraySupport()\n\n/*\n * Export kMaxLength after typed array support is determined.\n */\nexports.kMaxLength = kMaxLength()\n\nfunction typedArraySupport () {\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\n } catch (e) {\n return false\n }\n}\n\nfunction kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n}\n\nfunction createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length)\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length)\n }\n that.length = length\n }\n\n return that\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\n// TODO: Legacy, not needed anymore. Remove in next major version.\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype\n return arr\n}\n\nfunction from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n}\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype\n Buffer.__proto__ = Uint8Array\n if (typeof Symbol !== 'undefined' && Symbol.species &&\n Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n })\n }\n}\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n}\n\nfunction alloc (that, size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n}\n\nfunction allocUnsafe (that, size) {\n assertSize(size)\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0\n }\n }\n return that\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n}\n\nfunction fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0\n that = createBuffer(that, length)\n\n var actual = that.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual)\n }\n\n return that\n}\n\nfunction fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n that = createBuffer(that, length)\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255\n }\n return that\n}\n\nfunction fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array)\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset)\n } else {\n array = new Uint8Array(array, byteOffset, length)\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array\n that.__proto__ = Buffer.prototype\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array)\n }\n return that\n}\n\nfunction fromObject (that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n that = createBuffer(that, len)\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len)\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n}\n\nfunction checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return !!(b != null && b._isBuffer)\n}\n\nBuffer.compare = function compare (a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string\n }\n\n var len = string.length\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length | 0\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\n if (this.length > max) str += ' ... '\n }\n return '<Buffer ' + str + '>'\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n // must be an even number of digits\n var strLen = string.length\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0\n if (isFinite(length)) {\n length = length | 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end)\n newBuf.__proto__ = Buffer.prototype\n } else {\n var sliceLen = end - start\n newBuf = new Buffer(sliceLen, undefined)\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start]\n }\n }\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n byteLength = byteLength | 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nfunction objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nfunction objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n } else {\n objectWriteUInt16(this, value, offset, true)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n } else {\n objectWriteUInt16(this, value, offset, false)\n }\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n } else {\n objectWriteUInt32(this, value, offset, true)\n }\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset | 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n } else {\n objectWriteUInt32(this, value, offset, false)\n }\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n var i\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if (code < 256) {\n val = code\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString())\n var len = bytes.length\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\nfunction isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n}\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.6.11' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n isArray = require('./isArray');\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n","import {TypedArray} from '../../types';\nimport * as node from './buffer-utils';\n\n/**\n * Convert an object to an array buffer\n */\nexport function toArrayBuffer(data: any): ArrayBuffer {\n // Note: Should be called first, Buffers can trigger other detections below\n if (node.isBuffer(data)) {\n // TODO - per docs we should just be able to call buffer.buffer, but there are issues\n data = node.bufferToArrayBuffer(data);\n }\n\n if (data instanceof ArrayBuffer) {\n return data;\n }\n\n // Careful - Node Buffers look like Uint8Arrays (keep after isBuffer)\n if (ArrayBuffer.isView(data)) {\n if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {\n return data.buffer;\n }\n return data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength);\n }\n\n if (typeof data === 'string') {\n const text = data;\n const uint8Array = new TextEncoder().encode(text);\n return uint8Array.buffer;\n }\n\n // HACK to support Blob polyfill\n if (data && typeof data === 'object' && data._toArrayBuffer) {\n return data._toArrayBuffer();\n }\n\n throw new Error('toArrayBuffer');\n}\n\n/**\n * compare two binary arrays for equality\n * @param {ArrayBuffer} a\n * @param {ArrayBuffer} b\n * @param {number} byteLength\n */\nexport function compareArrayBuffers(\n arrayBuffer1: ArrayBuffer,\n arrayBuffer2: ArrayBuffer,\n byteLength?: number\n): boolean {\n byteLength = byteLength || arrayBuffer1.byteLength;\n if (arrayBuffer1.byteLength < byteLength || arrayBuffer2.byteLength < byteLength) {\n return false;\n }\n const array1 = new Uint8Array(arrayBuffer1);\n const array2 = new Uint8Array(arrayBuffer2);\n for (let i = 0; i < array1.length; ++i) {\n if (array1[i] !== array2[i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Concatenate a sequence of ArrayBuffers\n * @return A concatenated ArrayBuffer\n */\nexport function concatenateArrayBuffers(...sources: (ArrayBuffer | Uint8Array)[]): ArrayBuffer {\n // Make sure all inputs are wrapped in typed arrays\n const sourceArrays = sources.map((source2) =>\n source2 instanceof ArrayBuffer ? new Uint8Array(source2) : source2\n );\n\n // Get length of all inputs\n const byteLength = sourceArrays.reduce((length, typedArray) => length + typedArray.byteLength, 0);\n\n // Allocate array with space for all inputs\n const result = new Uint8Array(byteLength);\n\n // Copy the subarrays\n let offset = 0;\n for (const sourceArray of sourceArrays) {\n result.set(sourceArray, offset);\n offset += sourceArray.byteLength;\n }\n\n // We work with ArrayBuffers, discard the typed array wrapper\n return result.buffer;\n}\n\n/**\n * Concatenate arbitrary count of typed arrays\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays\n * @param {...*} arrays - list of arrays. All arrays should be the same type\n * @return A concatenated TypedArray\n */\nexport function concatenateTypedArrays<T>(...typedArrays: T[]): T {\n // @ts-ignore\n const arrays = typedArrays as TypedArray[];\n // @ts-ignore\n const TypedArrayConstructor = (arrays && arrays.length > 1 && arrays[0].constructor) || null;\n if (!TypedArrayConstructor) {\n throw new Error(\n '\"concatenateTypedArrays\" - incorrect quantity of arguments or arguments have incompatible data types'\n );\n }\n\n const sumLength = arrays.reduce((acc, value) => acc + value.length, 0);\n // @ts-ignore typescript does not like dynamic constructors\n const result = new TypedArrayConstructor(sumLength);\n let offset = 0;\n for (const array of arrays) {\n result.set(array, offset);\n offset += array.length;\n }\n return result;\n}\n\n/**\n * Copy a view of an ArrayBuffer into new ArrayBuffer with byteOffset = 0\n * @param arrayBuffer\n * @param byteOffset\n * @param byteLength\n */\nexport function sliceArrayBuffer(\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n byteLength?: number\n): ArrayBuffer {\n const subArray =\n byteLength !== undefined\n ? new Uint8Array(arrayBuffer).subarray(byteOffset, byteOffset + byteLength)\n : new Uint8Array(arrayBuffer).subarray(byteOffset);\n const arrayCopy = new Uint8Array(subArray);\n return arrayCopy.buffer;\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","// Provides a unified API for getting and setting any WebGL parameter\n// Also knows default values of all parameters, enabling fast cache initialization\n// Provides base functionality for the state caching.\nimport {\n GL_PARAMETER_DEFAULTS,\n GL_PARAMETER_SETTERS,\n GL_COMPOSITE_PARAMETER_SETTERS,\n GL_PARAMETER_GETTERS\n} from './webgl-parameter-tables';\n\nimport {pushContextState, popContextState} from './track-context-state';\nimport {assert} from '../utils/assert';\nimport {isWebGL} from '../utils/webgl-checks';\nimport {isObjectEmpty} from '../utils/utils';\n\n// Sets any GL parameter regardless of function (gl.blendMode, ...)\n// Note: requires a `cache` object to be set on the context (gl.state.cache)\n// This object is used to fill in any missing values for composite setter functions\nexport function setParameters(gl, values) {\n assert(isWebGL(gl), 'setParameters requires a WebGL context');\n\n if (isObjectEmpty(values)) {\n return;\n }\n\n const compositeSetters = {};\n\n // HANDLE PRIMITIVE SETTERS (and make note of any composite setters)\n\n for (const key in values) {\n const glConstant = Number(key);\n const setter = GL_PARAMETER_SETTERS[key];\n if (setter) {\n // Composite setters should only be called once, so save them\n if (typeof setter === 'string') {\n compositeSetters[setter] = true;\n } else {\n // if (gl[glConstant] !== undefined) {\n // TODO - added above check since this is being called on WebGL2 values in WebGL1...\n // TODO - deep equal on values? only call setter if value has changed?\n // NOTE - the setter will automatically update this.state\n setter(gl, values[key], glConstant);\n }\n }\n }\n\n // HANDLE COMPOSITE SETTERS\n\n // NOTE: any non-provided values needed by composite setters are filled in from state cache\n // The cache parameter is automatically retrieved from the context\n // This depends on `trackContextState`, which is technically a \"circular\" dependency.\n // But it is too inconvenient to always require a cache parameter here.\n // This is the ONLY external dependency in this module/\n const cache = gl.state && gl.state.cache;\n if (cache) {\n for (const key in compositeSetters) {\n // TODO - avoid calling composite setters if values have not changed.\n const compositeSetter = GL_COMPOSITE_PARAMETER_SETTERS[key];\n // Note - if `trackContextState` has been called,\n // the setter will automatically update this.state.cache\n compositeSetter(gl, values, cache);\n }\n }\n\n // Add a log for the else case?\n}\n\n// Copies the state from a context (gl.getParameter should not be overriden)\n// Reads the entire WebGL state from a context\n// Caveat: This generates a huge amount of synchronous driver roundtrips and should be\n// considered a very slow operation, to be used only if/when a context already manipulated\n// by external code needs to be synchronized for the first time\n// @return {Object} - a newly created map, with values keyed by GL parameters\nexport function getParameters(gl, parameters) {\n // default to querying all parameters\n parameters = parameters || GL_PARAMETER_DEFAULTS;\n // support both arrays of parameters and objects (keys represent parameters)\n\n if (typeof parameters === 'number') {\n // single GL enum\n const key = parameters;\n const getter = GL_PARAMETER_GETTERS[key];\n return getter ? getter(gl, key) : gl.getParameter(key);\n }\n\n const parameterKeys = Array.isArray(parameters) ? parameters : Object.keys(parameters);\n\n const state = {};\n for (const key of parameterKeys) {\n const getter = GL_PARAMETER_GETTERS[key];\n state[key] = getter ? getter(gl, Number(key)) : gl.getParameter(Number(key));\n }\n return state;\n}\n\n// Reset all parameters to a (almost) pure context state\n// NOTE: viewport and scissor will be set to the values in GL_PARAMETER_DEFAULTS,\n// NOT the canvas size dimensions, so they will have to be properly set after\n// calling this function.\nexport function resetParameters(gl) {\n setParameters(gl, GL_PARAMETER_DEFAULTS);\n}\n\n// Stores current \"global\" WebGL context settings, changes selected parameters,\n// executes function, restores parameters\nexport function withParameters(gl, parameters, func) {\n if (isObjectEmpty(parameters)) {\n // Avoid setting state if no parameters provided. Just call and return\n return func(gl);\n }\n\n const {nocatch = true} = parameters;\n\n pushContextState(gl);\n setParameters(gl, parameters);\n\n // Setup is done, call the function\n let value;\n\n if (nocatch) {\n // Avoid try catch to minimize stack size impact for safe execution paths\n value = func(gl);\n popContextState(gl);\n } else {\n // Wrap in a try-catch to ensure that parameters are restored on exceptions\n try {\n value = func(gl);\n } finally {\n popContextState(gl);\n }\n }\n\n return value;\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport MathArray from './base/math-array';\nimport {clamp} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\nimport Quaternion from './quaternion';\n\n// Internal constants\nconst ERR_UNKNOWN_ORDER = 'Unknown Euler angle order';\nconst ALMOST_ONE = 0.99999;\n\nfunction validateOrder(value) {\n return value >= 0 && value < 6;\n}\n\nfunction checkOrder(value) {\n if (value < 0 && value >= 6) {\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n return value;\n}\n\nexport default class Euler extends MathArray {\n // static XYZ = 0;\n // static YZX = 1;\n // static ZXY = 2;\n // static XZY = 3;\n // static YXZ = 4;\n // static ZYX = 5;\n // static RollPitchYaw = 0;\n // static DefaultOrder = 0;\n\n // Constants\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n static get ZYX() {\n return 0;\n }\n\n static get YXZ() {\n return 1;\n }\n\n static get XZY() {\n return 2;\n }\n\n static get ZXY() {\n return 3;\n }\n\n static get YZX() {\n return 4;\n }\n\n static get XYZ() {\n return 5;\n }\n\n static get RollPitchYaw() {\n return 0;\n }\n\n static get DefaultOrder() {\n return Euler.ZYX;\n }\n\n static get RotationOrders() {\n return ['ZYX', 'YXZ', 'XZY', 'ZXY', 'YZX', 'XYZ'];\n }\n\n static rotationOrder(order) {\n return Euler.RotationOrders[order];\n }\n\n get ELEMENTS() {\n return 4;\n }\n\n /* eslint-enable no-multi-spaces, brace-style, no-return-assign */\n\n /**\n * @class\n * @param {Number | Number[]} x\n * @param {Number=} [y]\n * @param {Number=} [z]\n * @param {Number=} [order]\n */\n constructor(x = 0, y = 0, z = 0, order = Euler.DefaultOrder) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0);\n // eslint-disable-next-line prefer-rest-params\n if (arguments.length > 0 && Array.isArray(arguments[0])) {\n // eslint-disable-next-line prefer-rest-params\n this.fromVector3(...arguments);\n } else {\n // @ts-ignore error TS2345: Argument of type 'number | [number, number, number, number]' not assignable to 'number'\n this.set(x, y, z, order);\n }\n }\n\n fromQuaternion(quaternion) {\n const [x, y, z, w] = quaternion;\n const ysqr = y * y;\n const t0 = -2.0 * (ysqr + z * z) + 1.0;\n const t1 = +2.0 * (x * y + w * z);\n let t2 = -2.0 * (x * z - w * y);\n const t3 = +2.0 * (y * z + w * x);\n const t4 = -2.0 * (x * x + ysqr) + 1.0;\n\n t2 = t2 > 1.0 ? 1.0 : t2;\n t2 = t2 < -1.0 ? -1.0 : t2;\n\n const roll = Math.atan2(t3, t4);\n const pitch = Math.asin(t2);\n const yaw = Math.atan2(t1, t0);\n\n return new Euler(roll, pitch, yaw, Euler.RollPitchYaw);\n }\n\n // fromQuaternion(q, order) {\n // this._fromRotationMat[-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];\n // return this.check();\n // }\n\n // If copied array does contain fourth element, preserves currently set order\n copy(array) {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = Number.isFinite(array[3]) || this.order;\n return this.check();\n }\n\n // Sets the three angles, and optionally sets the rotation order\n // If order is not specified, preserves currently set order\n set(x = 0, y = 0, z = 0, order) {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n this[3] = Number.isFinite(order) ? order : this[3];\n return this.check();\n }\n\n validate() {\n return (\n validateOrder(this[3]) &&\n Number.isFinite(this[0]) &&\n Number.isFinite(this[1]) &&\n Number.isFinite(this[2])\n );\n }\n\n // Does not copy the orientation element\n toArray(array = [], offset = 0) {\n array[offset] = this[0];\n array[offset + 1] = this[1];\n array[offset + 2] = this[2];\n return array;\n }\n\n // Copies the orientation element\n toArray4(array = [], offset = 0) {\n array[offset] = this[0];\n array[offset + 1] = this[1];\n array[offset + 2] = this[2];\n array[offset + 3] = this[3];\n return array;\n }\n\n toVector3(result = [-0, -0, -0]) {\n result[0] = this[0];\n result[1] = this[1];\n result[2] = this[2];\n return result;\n }\n\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n\n // x, y, z angle notation (note: only corresponds to axis in XYZ orientation)\n /** @type {number} */\n get x() {\n return this[0];\n }\n\n set x(value) {\n this[0] = checkNumber(value);\n }\n\n /** @type {number} */\n get y() {\n return this[1];\n }\n\n set y(value) {\n this[1] = checkNumber(value);\n }\n\n /** @type {number} */\n get z() {\n return this[2];\n }\n\n set z(value) {\n this[2] = checkNumber(value);\n }\n\n // alpha, beta, gamma angle notation\n get alpha() {\n return this[0];\n }\n\n set alpha(value) {\n this[0] = checkNumber(value);\n }\n\n get beta() {\n return this[1];\n }\n\n set beta(value) {\n this[1] = checkNumber(value);\n }\n\n get gamma() {\n return this[2];\n }\n\n set gamma(value) {\n this[2] = checkNumber(value);\n }\n\n // phi, theta, psi angle notation\n get phi() {\n return this[0];\n }\n\n set phi(value) {\n this[0] = checkNumber(value);\n }\n\n get theta() {\n return this[1];\n }\n\n set theta(value) {\n this[1] = checkNumber(value);\n }\n\n get psi() {\n return this[2];\n }\n\n set psi(value) {\n this[2] = checkNumber(value);\n }\n\n // roll, pitch, yaw angle notation\n /** @type {number} */\n get roll() {\n return this[0];\n }\n\n set roll(value) {\n this[0] = checkNumber(value);\n }\n\n /** @type {number} */\n get pitch() {\n return this[1];\n }\n\n set pitch(value) {\n this[1] = checkNumber(value);\n }\n\n /** @type {number} */\n get yaw() {\n return this[2];\n }\n\n set yaw(value) {\n this[2] = checkNumber(value);\n }\n\n // rotation order, in all three angle notations\n get order() {\n return this[3];\n }\n\n set order(value) {\n this[3] = checkOrder(value);\n }\n\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n\n // Constructors\n fromVector3(v, order) {\n return this.set(v[0], v[1], v[2], Number.isFinite(order) ? order : this[3]);\n }\n\n // TODO - with and without 4th element\n fromArray(array, offset = 0) {\n this[0] = array[0 + offset];\n this[1] = array[1 + offset];\n this[2] = array[2 + offset];\n if (array[3] !== undefined) {\n this[3] = array[3];\n }\n return this.check();\n }\n\n // Common ZYX rotation order\n fromRollPitchYaw(roll, pitch, yaw) {\n return this.set(roll, pitch, yaw, Euler.ZYX);\n }\n\n fromRotationMatrix(m, order = Euler.DefaultOrder) {\n this._fromRotationMatrix(m, order);\n return this.check();\n }\n\n // ACCESSORS\n\n getRotationMatrix(m) {\n return this._getRotationMatrix(m);\n }\n\n // TODO - move to Quaternion\n getQuaternion() {\n const q = new Quaternion();\n switch (this[3]) {\n case Euler.XYZ:\n return q.rotateX(this[0]).rotateY(this[1]).rotateZ(this[2]);\n case Euler.YXZ:\n return q.rotateY(this[0]).rotateX(this[1]).rotateZ(this[2]);\n case Euler.ZXY:\n return q.rotateZ(this[0]).rotateX(this[1]).rotateY(this[2]);\n case Euler.ZYX:\n return q.rotateZ(this[0]).rotateY(this[1]).rotateX(this[2]);\n case Euler.YZX:\n return q.rotateY(this[0]).rotateZ(this[1]).rotateX(this[2]);\n case Euler.XZY:\n return q.rotateX(this[0]).rotateZ(this[1]).rotateY(this[2]);\n default:\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n }\n\n // INTERNAL METHODS\n\n // Concersion from Euler to rotation matrix and from matrix to Euler\n // Adapted from three.js under MIT license\n\n // // WARNING: this discards revolution information -bhouston\n // reorder(newOrder) {\n // const q = new Quaternion().setFromEuler(this);\n // return this.setFromQuaternion(q, newOrder);\n\n /* eslint-disable complexity, max-statements, one-var */\n _fromRotationMatrix(m, order = Euler.DefaultOrder) {\n // assumes the upper 3x3 of m is a pure rotation matrix (i.e, unscaled)\n\n const te = m.elements;\n const m11 = te[0],\n m12 = te[4],\n m13 = te[8];\n const m21 = te[1],\n m22 = te[5],\n m23 = te[9];\n const m31 = te[2],\n m32 = te[6],\n m33 = te[10];\n\n order = order || this[3];\n\n switch (order) {\n case Euler.XYZ:\n this[1] = Math.asin(clamp(m13, -1, 1));\n\n if (Math.abs(m13) < ALMOST_ONE) {\n this[0] = Math.atan2(-m23, m33);\n this[2] = Math.atan2(-m12, m11);\n } else {\n this[0] = Math.atan2(m32, m22);\n this[2] = 0;\n }\n break;\n\n case Euler.YXZ:\n this[0] = Math.asin(-clamp(m23, -1, 1));\n\n if (Math.abs(m23) < ALMOST_ONE) {\n this[1] = Math.atan2(m13, m33);\n this[2] = Math.atan2(m21, m22);\n } else {\n this[1] = Math.atan2(-m31, m11);\n this[2] = 0;\n }\n break;\n\n case Euler.ZXY:\n this[0] = Math.asin(clamp(m32, -1, 1));\n\n if (Math.abs(m32) < ALMOST_ONE) {\n this[1] = Math.atan2(-m31, m33);\n this[2] = Math.atan2(-m12, m22);\n } else {\n this[1] = 0;\n this[2] = Math.atan2(m21, m11);\n }\n break;\n\n case Euler.ZYX:\n this[1] = Math.asin(-clamp(m31, -1, 1));\n\n if (Math.abs(m31) < ALMOST_ONE) {\n this[0] = Math.atan2(m32, m33);\n this[2] = Math.atan2(m21, m11);\n } else {\n this[0] = 0;\n this[2] = Math.atan2(-m12, m22);\n }\n break;\n\n case Euler.YZX:\n this[2] = Math.asin(clamp(m21, -1, 1));\n\n if (Math.abs(m21) < ALMOST_ONE) {\n this[0] = Math.atan2(-m23, m22);\n this[1] = Math.atan2(-m31, m11);\n } else {\n this[0] = 0;\n this[1] = Math.atan2(m13, m33);\n }\n break;\n\n case Euler.XZY:\n this[2] = Math.asin(-clamp(m12, -1, 1));\n\n if (Math.abs(m12) < ALMOST_ONE) {\n this[0] = Math.atan2(m32, m22);\n this[1] = Math.atan2(m13, m11);\n } else {\n this[0] = Math.atan2(-m23, m33);\n this[1] = 0;\n }\n break;\n\n default:\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n\n this[3] = order;\n\n return this;\n }\n\n _getRotationMatrix(result) {\n const te = result || [-0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0];\n\n const x = this.x,\n y = this.y,\n z = this.z;\n const a = Math.cos(x);\n const c = Math.cos(y);\n const e = Math.cos(z);\n const b = Math.sin(x);\n const d = Math.sin(y);\n const f = Math.sin(z);\n\n switch (this[3]) {\n case Euler.XYZ: {\n const ae = a * e,\n af = a * f,\n be = b * e,\n bf = b * f;\n\n te[0] = c * e;\n te[4] = -c * f;\n te[8] = d;\n\n te[1] = af + be * d;\n te[5] = ae - bf * d;\n te[9] = -b * c;\n\n te[2] = bf - ae * d;\n te[6] = be + af * d;\n te[10] = a * c;\n break;\n }\n\n case Euler.YXZ: {\n const ce = c * e,\n cf = c * f,\n de = d * e,\n df = d * f;\n\n te[0] = ce + df * b;\n te[4] = de * b - cf;\n te[8] = a * d;\n\n te[1] = a * f;\n te[5] = a * e;\n te[9] = -b;\n\n te[2] = cf * b - de;\n te[6] = df + ce * b;\n te[10] = a * c;\n break;\n }\n\n case Euler.ZXY: {\n const ce = c * e,\n cf = c * f,\n de = d * e,\n df = d * f;\n\n te[0] = ce - df * b;\n te[4] = -a * f;\n te[8] = de + cf * b;\n\n te[1] = cf + de * b;\n te[5] = a * e;\n te[9] = df - ce * b;\n\n te[2] = -a * d;\n te[6] = b;\n te[10] = a * c;\n break;\n }\n\n case Euler.ZYX: {\n const ae = a * e,\n af = a * f,\n be = b * e,\n bf = b * f;\n\n te[0] = c * e;\n te[4] = be * d - af;\n te[8] = ae * d + bf;\n\n te[1] = c * f;\n te[5] = bf * d + ae;\n te[9] = af * d - be;\n\n te[2] = -d;\n te[6] = b * c;\n te[10] = a * c;\n break;\n }\n\n case Euler.YZX: {\n const ac = a * c,\n ad = a * d,\n bc = b * c,\n bd = b * d;\n\n te[0] = c * e;\n te[4] = bd - ac * f;\n te[8] = bc * f + ad;\n\n te[1] = f;\n te[5] = a * e;\n te[9] = -b * e;\n\n te[2] = -d * e;\n te[6] = ad * f + bc;\n te[10] = ac - bd * f;\n break;\n }\n\n case Euler.XZY: {\n const ac = a * c,\n ad = a * d,\n bc = b * c,\n bd = b * d;\n\n te[0] = c * e;\n te[4] = -f;\n te[8] = d * e;\n\n te[1] = ac * f + bd;\n te[5] = a * e;\n te[9] = ad * f - bc;\n\n te[2] = bc * f - ad;\n te[6] = b * e;\n te[10] = bd * f + ac;\n break;\n }\n\n default:\n throw new Error(ERR_UNKNOWN_ORDER);\n }\n\n // last column\n te[3] = 0;\n te[7] = 0;\n te[11] = 0;\n\n // bottom row\n te[12] = 0;\n te[13] = 0;\n te[14] = 0;\n te[15] = 1;\n\n return te;\n }\n\n toQuaternion() {\n // Abbreviations for the various angular functions\n const cy = Math.cos(this.yaw * 0.5);\n const sy = Math.sin(this.yaw * 0.5);\n const cr = Math.cos(this.roll * 0.5);\n const sr = Math.sin(this.roll * 0.5);\n const cp = Math.cos(this.pitch * 0.5);\n const sp = Math.sin(this.pitch * 0.5);\n\n const w = cy * cr * cp + sy * sr * sp;\n const x = cy * sr * cp - sy * cr * sp;\n const y = cy * cr * sp + sy * sr * cp;\n const z = sy * cr * cp - cy * sr * sp;\n\n return new Quaternion(x, y, z, w);\n }\n}\n","export default class Effect {\n constructor(props = {}) {\n const {id = 'effect'} = props;\n this.id = id;\n this.props = {...props};\n }\n\n preRender() {}\n\n getModuleParameters() {}\n\n cleanup() {}\n}\n","import GL from '@luma.gl/constants';\nimport Pass from './pass';\nimport {clear, setParameters, withParameters, cssToDeviceRatio} from '@luma.gl/core';\n\nexport default class LayersPass extends Pass {\n render(props) {\n const gl = this.gl;\n\n setParameters(gl, {framebuffer: props.target});\n return this._drawLayers(props);\n }\n\n // PRIVATE\n // Draw a list of layers in a list of viewports\n _drawLayers(props) {\n const {viewports, views, onViewportActive, clearCanvas = true} = props;\n props.pass = props.pass || 'unknown';\n\n const gl = this.gl;\n if (clearCanvas) {\n clearGLCanvas(gl);\n }\n\n const renderStats = [];\n\n for (const viewportOrDescriptor of viewports) {\n // Get a viewport from a viewport descriptor (which can be a plain viewport)\n const viewport = viewportOrDescriptor.viewport || viewportOrDescriptor;\n const view = views && views[viewport.id];\n\n // Update context to point to this viewport\n onViewportActive(viewport);\n\n const drawLayerParams = this._getDrawLayerParams(viewport, props);\n\n props.view = view;\n\n // render this viewport\n const subViewports = viewport.subViewports || [viewport];\n for (const subViewport of subViewports) {\n props.viewport = subViewport;\n\n const stats = this._drawLayersInViewport(gl, props, drawLayerParams);\n renderStats.push(stats);\n }\n }\n return renderStats;\n }\n\n // Resolve the parameters needed to draw each layer\n // When a viewport contains multiple subviewports (e.g. repeated web mercator map),\n // this is only done once for the parent viewport\n _getDrawLayerParams(viewport, {layers, pass, layerFilter, effects, moduleParameters}) {\n const drawLayerParams = [];\n const indexResolver = layerIndexResolver();\n const drawContext = {\n viewport,\n isPicking: pass.startsWith('picking'),\n renderPass: pass\n };\n const layerFilterCache = {};\n for (let layerIndex = 0; layerIndex < layers.length; layerIndex++) {\n const layer = layers[layerIndex];\n // Check if we should draw layer\n const shouldDrawLayer = this._shouldDrawLayer(\n layer,\n drawContext,\n layerFilter,\n layerFilterCache\n );\n\n // This is the \"logical\" index for ordering this layer in the stack\n // used to calculate polygon offsets\n // It can be the same as another layer\n const layerRenderIndex = indexResolver(layer, shouldDrawLayer);\n\n const layerParam = {\n shouldDrawLayer,\n layerRenderIndex\n };\n\n if (shouldDrawLayer) {\n layerParam.moduleParameters = this._getModuleParameters(\n layer,\n effects,\n pass,\n moduleParameters\n );\n layerParam.layerParameters = this.getLayerParameters(layer, layerIndex, viewport);\n }\n drawLayerParams[layerIndex] = layerParam;\n }\n return drawLayerParams;\n }\n\n // Draws a list of layers in one viewport\n // TODO - when picking we could completely skip rendering viewports that dont\n // intersect with the picking rect\n /* eslint-disable max-depth, max-statements */\n _drawLayersInViewport(gl, {layers, pass, viewport, view}, drawLayerParams) {\n const glViewport = getGLViewport(gl, {viewport});\n\n if (view && view.props.clear) {\n const clearOpts = view.props.clear === true ? {color: true, depth: true} : view.props.clear;\n withParameters(\n gl,\n {\n scissorTest: true,\n scissor: glViewport\n },\n () => clear(gl, clearOpts)\n );\n }\n\n // render layers in normal colors\n const renderStatus = {\n totalCount: layers.length,\n visibleCount: 0,\n compositeCount: 0,\n pickableCount: 0\n };\n\n setParameters(gl, {viewport: glViewport});\n\n // render layers in normal colors\n for (let layerIndex = 0; layerIndex < layers.length; layerIndex++) {\n const layer = layers[layerIndex];\n const {\n shouldDrawLayer,\n layerRenderIndex,\n moduleParameters,\n layerParameters\n } = drawLayerParams[layerIndex];\n\n // Calculate stats\n if (shouldDrawLayer && layer.props.pickable) {\n renderStatus.pickableCount++;\n }\n if (layer.isComposite) {\n renderStatus.compositeCount++;\n } else if (shouldDrawLayer) {\n // Draw the layer\n renderStatus.visibleCount++;\n\n // overwrite layer.context.viewport with the sub viewport\n moduleParameters.viewport = viewport;\n\n try {\n layer.drawLayer({\n moduleParameters,\n uniforms: {layerIndex: layerRenderIndex},\n parameters: layerParameters\n });\n } catch (err) {\n layer.raiseError(err, `drawing ${layer} to ${pass}`);\n }\n }\n }\n\n return renderStatus;\n }\n /* eslint-enable max-depth, max-statements */\n\n /* Methods for subclass overrides */\n shouldDrawLayer(layer) {\n return true;\n }\n\n getModuleParameters(layer, effects) {\n return null;\n }\n\n getLayerParameters(layer, layerIndex) {\n return layer.props.parameters;\n }\n\n /* Private */\n _shouldDrawLayer(layer, drawContext, layerFilter, layerFilterCache) {\n const shouldDrawLayer = this.shouldDrawLayer(layer) && layer.props.visible;\n\n if (!shouldDrawLayer) {\n return false;\n }\n\n drawContext.layer = layer;\n\n let parent = layer.parent;\n while (parent) {\n if (!parent.props.visible || !parent.filterSubLayer(drawContext)) {\n return false;\n }\n drawContext.layer = parent;\n parent = parent.parent;\n }\n\n if (layerFilter) {\n const rootLayerId = drawContext.layer.id;\n if (!(rootLayerId in layerFilterCache)) {\n layerFilterCache[rootLayerId] = layerFilter(drawContext);\n }\n if (!layerFilterCache[rootLayerId]) {\n return false;\n }\n }\n\n // If a layer is drawn, update its viewportChanged flag\n layer.activateViewport(drawContext.viewport);\n\n return true;\n }\n\n _getModuleParameters(layer, effects, pass, overrides) {\n const moduleParameters = Object.assign(Object.create(layer.props), {\n autoWrapLongitude: layer.wrapLongitude,\n viewport: layer.context.viewport,\n mousePosition: layer.context.mousePosition,\n pickingActive: 0,\n devicePixelRatio: cssToDeviceRatio(this.gl)\n });\n\n if (effects) {\n for (const effect of effects) {\n Object.assign(moduleParameters, effect.getModuleParameters(layer));\n }\n }\n\n return Object.assign(moduleParameters, this.getModuleParameters(layer, effects), overrides);\n }\n}\n\n// If the _index prop is defined, return a layer index that's relative to its parent\n// Otherwise return the index of the layer among all rendered layers\n// This is done recursively, i.e. if the user overrides a layer's default index,\n// all its descendants will be resolved relative to that index.\n// This implementation assumes that parent layers always appear before its children\n// which is true if the layer array comes from the LayerManager\nexport function layerIndexResolver(startIndex = 0, layerIndices = {}) {\n const resolvers = {};\n\n const resolveLayerIndex = (layer, isDrawn) => {\n const indexOverride = layer.props._offset;\n const layerId = layer.id;\n const parentId = layer.parent && layer.parent.id;\n\n let index;\n\n if (parentId && !(parentId in layerIndices)) {\n // Populate layerIndices with the parent layer's index\n resolveLayerIndex(layer.parent, false);\n }\n\n if (parentId in resolvers) {\n const resolver = (resolvers[parentId] =\n resolvers[parentId] || layerIndexResolver(layerIndices[parentId], layerIndices));\n index = resolver(layer, isDrawn);\n resolvers[layerId] = resolver;\n } else if (Number.isFinite(indexOverride)) {\n index = indexOverride + (layerIndices[parentId] || 0);\n // Mark layer as needing its own resolver\n // We don't actually create it until it's used for the first time\n resolvers[layerId] = null;\n } else {\n index = startIndex;\n }\n\n if (isDrawn && index >= startIndex) {\n startIndex = index + 1;\n }\n\n layerIndices[layerId] = index;\n return index;\n };\n return resolveLayerIndex;\n}\n\n// Convert viewport top-left CSS coordinates to bottom up WebGL coordinates\nfunction getGLViewport(gl, {viewport}) {\n // TODO - dummy default for node\n // Fallback to width/height when clientWidth/clientHeight are 0 or undefined.\n const height = gl.canvas ? gl.canvas.clientHeight || gl.canvas.height : 100;\n // Convert viewport top-left CSS coordinates to bottom up WebGL coordinates\n const dimensions = viewport;\n const pixelRatio = cssToDeviceRatio(gl);\n return [\n dimensions.x * pixelRatio,\n (height - dimensions.y - dimensions.height) * pixelRatio,\n dimensions.width * pixelRatio,\n dimensions.height * pixelRatio\n ];\n}\n\nfunction clearGLCanvas(gl) {\n const width = gl.drawingBufferWidth;\n const height = gl.drawingBufferHeight;\n // clear depth and color buffers, restoring transparency\n setParameters(gl, {viewport: [0, 0, width, height]});\n gl.clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT);\n}\n","// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nvar hadKeyboardEvent = true;\nvar hadFocusVisibleRecently = false;\nvar hadFocusVisibleRecentlyTimeout = null;\nvar inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @return {boolean}\n */\n\nfunction focusTriggersKeyboardModality(node) {\n var type = node.type,\n tagName = node.tagName;\n\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n\n if (node.isContentEditable) {\n return true;\n }\n\n return false;\n}\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\n\n\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n\n hadKeyboardEvent = true;\n}\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\n\n\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\n\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\n\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nexport function teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nfunction isFocusVisible(event) {\n var target = event.target;\n\n try {\n return target.matches(':focus-visible');\n } catch (error) {} // browsers not implementing :focus-visible will throw a SyntaxError\n // we use our own heuristic for those browsers\n // rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n // no need for validFocusTarget check. the user does that by attaching it to\n // focusable events only\n\n\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\n/**\n * Should be called if a blur event is fired on a focus-visible element\n */\n\n\nfunction handleBlurVisible() {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function () {\n hadFocusVisibleRecently = false;\n }, 100);\n}\n\nexport default function useIsFocusVisible() {\n var ref = React.useCallback(function (instance) {\n var node = ReactDOM.findDOMNode(instance);\n\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(isFocusVisible);\n }\n\n return {\n isFocusVisible: isFocusVisible,\n onBlurVisible: handleBlurVisible,\n ref: ref\n };\n}","import ownerDocument from './ownerDocument';\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc.defaultView || window;\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default 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(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import createTheme from './createTheme';\nvar defaultTheme = createTheme();\nexport default defaultTheme;","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(element.type.muiName) !== -1;\n}","/**\n * Returns a cloned copy of the passed GeoJSON Object, including possible 'Foreign Members'.\n * ~3-5x faster than the common JSON.parse + JSON.stringify combo method.\n *\n * @name clone\n * @param {GeoJSON} geojson GeoJSON Object\n * @returns {GeoJSON} cloned GeoJSON Object\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]], {color: 'red'});\n *\n * var lineCloned = turf.clone(line);\n */\nfunction clone(geojson) {\n if (!geojson) {\n throw new Error(\"geojson is required\");\n }\n switch (geojson.type) {\n case \"Feature\":\n return cloneFeature(geojson);\n case \"FeatureCollection\":\n return cloneFeatureCollection(geojson);\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n case \"MultiPoint\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n case \"GeometryCollection\":\n return cloneGeometry(geojson);\n default:\n throw new Error(\"unknown GeoJSON type\");\n }\n}\n/**\n * Clone Feature\n *\n * @private\n * @param {Feature<any>} geojson GeoJSON Feature\n * @returns {Feature<any>} cloned Feature\n */\nfunction cloneFeature(geojson) {\n var cloned = { type: \"Feature\" };\n // Preserve Foreign Members\n Object.keys(geojson).forEach(function (key) {\n switch (key) {\n case \"type\":\n case \"properties\":\n case \"geometry\":\n return;\n default:\n cloned[key] = geojson[key];\n }\n });\n // Add properties & geometry last\n cloned.properties = cloneProperties(geojson.properties);\n cloned.geometry = cloneGeometry(geojson.geometry);\n return cloned;\n}\n/**\n * Clone Properties\n *\n * @private\n * @param {Object} properties GeoJSON Properties\n * @returns {Object} cloned Properties\n */\nfunction cloneProperties(properties) {\n var cloned = {};\n if (!properties) {\n return cloned;\n }\n Object.keys(properties).forEach(function (key) {\n var value = properties[key];\n if (typeof value === \"object\") {\n if (value === null) {\n // handle null\n cloned[key] = null;\n }\n else if (Array.isArray(value)) {\n // handle Array\n cloned[key] = value.map(function (item) {\n return item;\n });\n }\n else {\n // handle generic Object\n cloned[key] = cloneProperties(value);\n }\n }\n else {\n cloned[key] = value;\n }\n });\n return cloned;\n}\n/**\n * Clone Feature Collection\n *\n * @private\n * @param {FeatureCollection<any>} geojson GeoJSON Feature Collection\n * @returns {FeatureCollection<any>} cloned Feature Collection\n */\nfunction cloneFeatureCollection(geojson) {\n var cloned = { type: \"FeatureCollection\" };\n // Preserve Foreign Members\n Object.keys(geojson).forEach(function (key) {\n switch (key) {\n case \"type\":\n case \"features\":\n return;\n default:\n cloned[key] = geojson[key];\n }\n });\n // Add features\n cloned.features = geojson.features.map(function (feature) {\n return cloneFeature(feature);\n });\n return cloned;\n}\n/**\n * Clone Geometry\n *\n * @private\n * @param {Geometry<any>} geometry GeoJSON Geometry\n * @returns {Geometry<any>} cloned Geometry\n */\nfunction cloneGeometry(geometry) {\n var geom = { type: geometry.type };\n if (geometry.bbox) {\n geom.bbox = geometry.bbox;\n }\n if (geometry.type === \"GeometryCollection\") {\n geom.geometries = geometry.geometries.map(function (g) {\n return cloneGeometry(g);\n });\n return geom;\n }\n geom.coordinates = deepSlice(geometry.coordinates);\n return geom;\n}\n/**\n * Deep Slice coordinates\n *\n * @private\n * @param {Coordinates} coords Coordinates\n * @returns {Coordinates} all coordinates sliced\n */\nfunction deepSlice(coords) {\n var cloned = coords;\n if (typeof cloned[0] !== \"object\") {\n return cloned.slice();\n }\n return cloned.map(function (coord) {\n return deepSlice(coord);\n });\n}\nexport default clone;\n","// TODO - build/integrate proper MIME type parsing\n// https://mimesniff.spec.whatwg.org/\n\nconst DATA_URL_PATTERN = /^data:([-\\w.]+\\/[-\\w.+]+)(;|,)/;\nconst MIME_TYPE_PATTERN = /^([-\\w.]+\\/[-\\w.+]+)/;\n\n/**\n * Remove extra data like `charset` from MIME types\n * @param mimeString\n * @returns A clean MIME type, or an empty string\n *\n * @todo - handle more advanced MIMETYpes, multiple types\n * @todo - extract charset etc\n */\nexport function parseMIMEType(mimeString: string): string {\n // If resource is a data url, extract any embedded mime type\n const matches = MIME_TYPE_PATTERN.exec(mimeString);\n if (matches) {\n return matches[1];\n }\n return mimeString;\n}\n\n/**\n * Extract MIME type from data URL\n *\n * @param mimeString\n * @returns A clean MIME type, or an empty string\n *\n * @todo - handle more advanced MIMETYpes, multiple types\n * @todo - extract charset etc\n */\nexport function parseMIMETypeFromURL(url: string): string {\n // If resource is a data URL, extract any embedded mime type\n const matches = DATA_URL_PATTERN.exec(url);\n if (matches) {\n return matches[1];\n }\n return '';\n}\n","import {isResponse, isBlob} from '../../javascript-utils/is-type';\nimport {parseMIMEType, parseMIMETypeFromURL} from './mime-type-utils';\n\nconst QUERY_STRING_PATTERN = /\\?.*/;\n\n/**\n * Returns an object with `url` and (MIME) `type` fields\n * If it cannot determine url or type, the corresponding value will be an empty string\n *\n * @param resource Any type, but only Responses, string URLs and data URLs are processed\n *\n * @todo string parameters are assumed to be URLs\n */\nexport function getResourceUrlAndType(resource: any): {url: string; type: string} {\n // If resource is a response, it contains the information directly\n if (isResponse(resource)) {\n const url = stripQueryString(resource.url || '');\n const contentTypeHeader = resource.headers.get('content-type') || '';\n return {\n url,\n type: parseMIMEType(contentTypeHeader) || parseMIMETypeFromURL(url)\n };\n }\n\n // If the resource is a Blob or a File (subclass of Blob)\n if (isBlob(resource)) {\n return {\n // File objects have a \"name\" property. Blob objects don't have any\n // url (name) information\n url: stripQueryString(resource.name || ''),\n type: resource.type || ''\n };\n }\n\n if (typeof resource === 'string') {\n return {\n // TODO this could mess up data URL but it doesn't matter as it is just used for inference\n url: stripQueryString(resource),\n // If a data url\n type: parseMIMETypeFromURL(resource)\n };\n }\n\n // Unknown\n return {\n url: '',\n type: ''\n };\n}\n\n/**\n * Returns (approximate) content length for a resource if it can be determined.\n * Returns -1 if content length cannot be determined.\n * @param resource\n\n * @note string parameters are NOT assumed to be URLs\n */\nexport function getResourceContentLength(resource: any): number {\n if (isResponse(resource)) {\n return resource.headers['content-length'] || -1;\n }\n if (isBlob(resource)) {\n return resource.size;\n }\n if (typeof resource === 'string') {\n // TODO - handle data URL?\n return resource.length;\n }\n if (resource instanceof ArrayBuffer) {\n return resource.byteLength;\n }\n if (ArrayBuffer.isView(resource)) {\n return resource.byteLength;\n }\n return -1;\n}\n\nfunction stripQueryString(url) {\n return url.replace(QUERY_STRING_PATTERN, '');\n}\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","import * as node from '../node/buffer';\n\n/**\n * Check for Node.js `Buffer` (without triggering bundler to include Buffer polyfill on browser)\n */\nexport function isBuffer(value: any): boolean {\n return value && typeof value === 'object' && value.isBuffer;\n}\n\n/**\n * Converts to Node.js `Buffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function toBuffer(data: any): Buffer {\n return node.toBuffer ? node.toBuffer(data) : data;\n}\n\n/**\n * Converts Node.js `Buffer` to `ArrayBuffer` (without triggering bundler to include Buffer polyfill on browser)\n * @todo better data type\n */\nexport function bufferToArrayBuffer(data: any): ArrayBuffer {\n if (node.toArrayBuffer) {\n // TODO - per docs we should just be able to call buffer.buffer, but there are issues\n return node.toArrayBuffer(data);\n }\n return data;\n}\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}","import {Vector3} from 'math.gl';\n\nconst DEFAULT_LIGHT_COLOR = [255, 255, 255];\nconst DEFAULT_LIGHT_INTENSITY = 1.0;\nconst DEFAULT_LIGHT_DIRECTION = [0.0, 0.0, -1.0];\n\nlet idCount = 0;\n\nexport class DirectionalLight {\n constructor(props = {}) {\n const {color = DEFAULT_LIGHT_COLOR} = props;\n const {intensity = DEFAULT_LIGHT_INTENSITY} = props;\n const {direction = DEFAULT_LIGHT_DIRECTION} = props;\n const {_shadow = false} = props;\n\n this.id = props.id || `directional-${idCount++}`;\n this.color = color;\n this.intensity = intensity;\n this.type = 'directional';\n this.direction = new Vector3(direction).normalize().toArray();\n this.shadow = _shadow;\n }\n\n getProjectedLight() {\n return this;\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst vs = `\nstruct VertexGeometry {\n vec4 position;\n vec3 worldPosition;\n vec3 worldPositionAlt;\n vec3 normal;\n vec2 uv;\n vec3 pickingColor;\n} geometry = VertexGeometry(\n vec4(0.0),\n vec3(0.0),\n vec3(0.0),\n vec3(0.0),\n vec2(0.0),\n vec3(0.0)\n);\n`;\n\nconst fs = `\n#define SMOOTH_EDGE_RADIUS 0.5\n\nstruct FragmentGeometry {\n vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n`;\n\nexport default {name: 'geometry', vs, fs};\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {COORDINATE_SYSTEM, PROJECTION_MODE, UNIT} from '../../lib/constants';\n\n// We are generating these from the js code in constants.js\nconst COORDINATE_SYSTEM_GLSL_CONSTANTS = Object.keys(COORDINATE_SYSTEM)\n .map(key => `const int COORDINATE_SYSTEM_${key} = ${COORDINATE_SYSTEM[key]};`)\n .join('');\nconst PROJECTION_MODE_GLSL_CONSTANTS = Object.keys(PROJECTION_MODE)\n .map(key => `const int PROJECTION_MODE_${key} = ${PROJECTION_MODE[key]};`)\n .join('');\nconst UNIT_GLSL_CONSTANTS = Object.keys(UNIT)\n .map(key => `const int UNIT_${key.toUpperCase()} = ${UNIT[key]};`)\n .join('');\n\nexport default `\\\n${COORDINATE_SYSTEM_GLSL_CONSTANTS}\n${PROJECTION_MODE_GLSL_CONSTANTS}\n${UNIT_GLSL_CONSTANTS}\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\nuniform vec3 project_uCommonOrigin;\nuniform bool project_uPseudoMeters;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nconst float EARTH_RADIUS = 6370972.0; // meters\nconst float GLOBE_RADIUS = 256.0;\n\n// returns an adjustment factor for uCommonUnitsPerMeter\nfloat project_size() {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR &&\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT &&\n project_uPseudoMeters == false) {\n\n // uCommonUnitsPerMeter in low-zoom Web Mercator is non-linear\n // Adjust by 1 / cos(latitude)\n // If geometry.position (vertex in common space) is populated, use it\n // Otherwise use geometry.worldPosition (anchor in world space)\n \n if (geometry.position.w == 0.0) {\n float y = clamp(geometry.worldPosition.y, -89.9, 89.9);\n return 1.0 / cos(radians(y));\n }\n\n // latitude from common y: 2.0 * (atan(exp(y / TILE_SIZE * 2.0 * PI - PI)) - PI / 4.0)\n // Taylor series of 1 / cos(latitude)\n // Max error < 0.003\n \n float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;\n float y2 = y * y;\n float y4 = y2 * y2;\n float y6 = y4 * y2;\n return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;\n }\n return 1.0;\n}\n//\n// Scaling offsets - scales meters to \"world distance\"\n// Note the scalar version of project_size is for scaling the z component only\n//\nfloat project_size(float meters) {\n return meters * project_uCommonUnitsPerMeter.z * project_size();\n}\n\nvec2 project_size(vec2 meters) {\n return meters * project_uCommonUnitsPerMeter.xy * project_size();\n}\n\nvec3 project_size(vec3 meters) {\n return meters * project_uCommonUnitsPerMeter * project_size();\n}\n\nvec4 project_size(vec4 meters) {\n return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\n\n//\n// Projecting normal - transform deltas from current coordinate system to\n// normals in the worldspace\n//\nvec3 project_normal(vec3 vector) {\n // Apply model matrix\n vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n return normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n}\n\nvec4 project_offset_(vec4 offset) {\n float dy = offset.y;\n vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\n\n//\n// Projecting positions - non-linear projection: lnglats => unit tile [0-1, 0-1]\n//\nvec2 project_mercator_(vec2 lnglat) {\n float x = lnglat.x;\n if (project_uWrapLongitude) {\n x = mod(x + 180., 360.0) - 180.;\n }\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan_fp32(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\nvec3 project_globe_(vec3 lnglatz) {\n float lambda = radians(lnglatz.x);\n float phi = radians(lnglatz.y);\n float cosPhi = cos(phi);\n float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;\n\n return vec3(\n sin(lambda) * cosPhi,\n -cos(lambda) * cosPhi,\n sin(phi)\n ) * D;\n}\n\n//\n// Projects positions (defined by project_uCoordinateSystem) to common space (defined by project_uProjectionMode)\n//\nvec4 project_position(vec4 position, vec3 position64Low) {\n vec4 position_world = project_uModelMatrix * position;\n\n // Work around for a Mac+NVIDIA bug https://github.com/visgl/deck.gl/issues/4145\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_mercator_(position_world.xy),\n project_size(position_world.z),\n position_world.w\n );\n }\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {\n position_world.xyz += project_uCoordinateOrigin;\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_globe_(position_world.xyz),\n position_world.w\n );\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n if (abs(position_world.y - project_uCoordinateOrigin.y) > 0.25) {\n // Too far from the projection center for offset mode to be accurate\n // Only use high parts\n return vec4(\n project_mercator_(position_world.xy) - project_uCommonOrigin.xy,\n project_size(position_world.z),\n position_world.w\n );\n }\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {\n // Subtract high part of 64 bit value. Convert remainder to float32, preserving precision.\n position_world.xyz -= project_uCoordinateOrigin;\n }\n\n // Translation is already added to the high parts\n return project_offset_(position_world + project_uModelMatrix * vec4(position64Low, 0.0));\n}\n\nvec4 project_position(vec4 position) {\n return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n return viewProjectionMatrix * position + center;\n}\n\n//\n// Projects from common space coordinates to clip space.\n// Uses project_uViewProjectionMatrix\n//\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\n\n// Returns a clip space offset that corresponds to a given number of screen pixels\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n return project_size(meters) * project_uScale;\n}\nfloat project_size_to_pixel(float size, int unit) {\n if (unit == UNIT_METERS) return project_size_to_pixel(size);\n if (unit == UNIT_COMMON) return size * project_uScale;\n // UNIT_PIXELS\n return size;\n}\nfloat project_pixel_size(float pixels) {\n return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n return pixels / project_uScale;\n}\n\n// Get rotation matrix that aligns the z axis with the given up vector\n// Find 3 unit vectors ux, uy, uz that are perpendicular to each other and uz == up\nmat3 project_get_orientation_matrix(vec3 up) {\n vec3 uz = normalize(up);\n // Tangent on XY plane\n vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));\n vec3 uy = cross(uz, ux);\n return mat3(ux, uy, uz);\n}\n\nbool project_needs_rotation(vec3 commonPosition, out mat3 transform) {\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n transform = project_get_orientation_matrix(commonPosition);\n return true;\n }\n return false;\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {fp32} from '@luma.gl/core';\nimport geometry from '../misc/geometry';\nimport projectShader from './project.glsl';\nimport {getUniformsFromViewport} from './viewport-uniforms';\n\nconst INITIAL_MODULE_OPTIONS = {};\n\nfunction getUniforms(opts = INITIAL_MODULE_OPTIONS) {\n if (opts.viewport) {\n return getUniformsFromViewport(opts);\n }\n return {};\n}\n\nexport default {\n name: 'project',\n dependencies: [fp32, geometry],\n vs: projectShader,\n getUniforms\n};\n","/* eslint-env browser */\nimport {log} from '@deck.gl/core';\n\nexport default class Tile2DHeader {\n constructor({x, y, z}) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.isVisible = false;\n this.isSelected = false;\n this.parent = null;\n this.children = [];\n\n this.content = null;\n\n this._loaderId = 0;\n this._isLoaded = false;\n this._isCancelled = false;\n this._needsReload = false;\n }\n\n get data() {\n return this.isLoading ? this._loader.then(() => this.data) : this.content;\n }\n\n get isLoaded() {\n return this._isLoaded && !this._needsReload;\n }\n\n get isLoading() {\n return Boolean(this._loader) && !this._isCancelled;\n }\n\n get needsReload() {\n return this._needsReload || this._isCancelled;\n }\n\n get byteLength() {\n const result = this.content ? this.content.byteLength : 0;\n if (!Number.isFinite(result)) {\n log.error('byteLength not defined in tile data')();\n }\n return result;\n }\n\n /* eslint-disable max-statements */\n async _loadData({getData, requestScheduler, onLoad, onError}) {\n const {x, y, z, bbox} = this;\n const loaderId = this._loaderId;\n\n this._abortController = new AbortController(); // eslint-disable-line no-undef\n const {signal} = this._abortController;\n\n const requestToken = await requestScheduler.scheduleRequest(this, tile => {\n return tile.isSelected ? 1 : -1;\n });\n\n if (!requestToken) {\n this._isCancelled = true;\n return;\n }\n // A tile can be cancelled while being scheduled\n if (this._isCancelled) {\n requestToken.done();\n return;\n }\n\n let tileData = null;\n let error;\n try {\n tileData = await getData({x, y, z, bbox, signal});\n } catch (err) {\n error = err || true;\n } finally {\n requestToken.done();\n }\n\n // If loadData has been called with a newer version, discard the result from this operation\n if (loaderId !== this._loaderId) {\n return;\n }\n // Clear the `isLoading` flag\n this._loader = undefined;\n // Rewrite tile content with the result of getTileData if successful, or `null` in case of\n // error or cancellation\n this.content = tileData;\n // If cancelled, do not invoke the callbacks\n // Consider it loaded if we tried to cancel but `getTileData` still returned data\n if (this._isCancelled && !tileData) {\n this._isLoaded = false;\n return;\n }\n this._isLoaded = true;\n this._isCancelled = false;\n\n if (error) {\n onError(error, this);\n } else {\n onLoad(this);\n }\n }\n /* eslint-enable max-statements */\n\n loadData(opts) {\n this._isLoaded = false;\n this._isCancelled = false;\n this._needsReload = false;\n this._loaderId++;\n this._loader = this._loadData(opts);\n return this._loader;\n }\n\n setNeedsReload() {\n if (this.isLoading) {\n this.abort();\n this._loader = undefined;\n }\n this._needsReload = true;\n }\n\n abort() {\n if (this.isLoaded) {\n return;\n }\n\n this._isCancelled = true;\n this._abortController.abort();\n }\n}\n","import Tile2DHeader from './tile-2d-header';\nimport {getTileIndices, tileToBoundingBox} from './utils';\nimport {RequestScheduler} from '@loaders.gl/loader-utils';\nimport {Matrix4} from 'math.gl';\n\nconst TILE_STATE_UNKNOWN = 0;\nconst TILE_STATE_VISIBLE = 1;\n/*\n show cached parent tile if children are loading\n +-----------+ +-----+ +-----+-----+\n | | | | | | |\n | | | | | | |\n | | --> +-----+-----+ -> +-----+-----+\n | | | | | | |\n | | | | | | |\n +-----------+ +-----+ +-----+-----+\n\n show cached children tiles when parent is loading\n +-------+---- +------------\n | | |\n | | |\n | | |\n +-------+---- --> |\n | | |\n */\nconst TILE_STATE_PLACEHOLDER = 3;\nconst TILE_STATE_HIDDEN = 4;\n// tiles that should be displayed in the current viewport\nconst TILE_STATE_SELECTED = 5;\n\nexport const STRATEGY_NEVER = 'never';\nexport const STRATEGY_REPLACE = 'no-overlap';\nexport const STRATEGY_DEFAULT = 'best-available';\n\nconst DEFAULT_CACHE_SCALE = 5;\n\n/**\n * Manages loading and purging of tiles data. This class caches recently visited tiles\n * and only create new tiles if they are present.\n */\n\nexport default class Tileset2D {\n /**\n * Takes in a function that returns tile data, a cache size, and a max and a min zoom level.\n * Cache size defaults to 5 * number of tiles in the current viewport\n */\n constructor(opts) {\n this.opts = opts;\n\n this.onTileLoad = tile => {\n this.opts.onTileLoad(tile);\n if (this.opts.maxCacheByteSize) {\n this._cacheByteSize += tile.byteLength;\n this._resizeCache();\n }\n };\n\n this._requestScheduler = new RequestScheduler({\n maxRequests: opts.maxRequests,\n throttleRequests: opts.maxRequests > 0\n });\n\n // Maps tile id in string {z}-{x}-{y} to a Tile object\n this._cache = new Map();\n this._tiles = [];\n this._dirty = false;\n this._cacheByteSize = 0;\n\n // Cache the last processed viewport\n this._viewport = null;\n this._selectedTiles = null;\n this._frameNumber = 0;\n\n this.setOptions(opts);\n }\n\n /* Public API */\n get tiles() {\n return this._tiles;\n }\n\n get selectedTiles() {\n return this._selectedTiles;\n }\n\n get isLoaded() {\n return this._selectedTiles.every(tile => tile.isLoaded);\n }\n\n setOptions(opts) {\n Object.assign(this.opts, opts);\n if (Number.isFinite(opts.maxZoom)) {\n this._maxZoom = Math.floor(opts.maxZoom);\n }\n if (Number.isFinite(opts.minZoom)) {\n this._minZoom = Math.ceil(opts.minZoom);\n }\n }\n\n // Clean up any outstanding tile requests.\n finalize() {\n for (const tile of this._cache.values()) {\n if (tile.isLoading) {\n tile.abort();\n }\n }\n this._cache.clear();\n this._tiles = [];\n this._selectedTiles = null;\n }\n\n reloadAll() {\n for (const tileId of this._cache.keys()) {\n const tile = this._cache.get(tileId);\n if (!this._selectedTiles.includes(tile)) {\n this._cache.delete(tileId);\n } else {\n tile.setNeedsReload();\n }\n }\n }\n\n /**\n * Update the cache with the given viewport and model matrix and triggers callback onUpdate.\n * @param {*} viewport\n * @param {*} onUpdate\n * @param {*} modelMatrix\n */\n update(viewport, {zRange, modelMatrix} = {}) {\n const modelMatrixAsMatrix4 = new Matrix4(modelMatrix);\n const isModelMatrixNew = !modelMatrixAsMatrix4.equals(this._modelMatrix);\n if (!viewport.equals(this._viewport) || isModelMatrixNew) {\n if (isModelMatrixNew) {\n this._modelMatrixInverse = modelMatrix && modelMatrixAsMatrix4.clone().invert();\n this._modelMatrix = modelMatrix && modelMatrixAsMatrix4;\n }\n this._viewport = viewport;\n const tileIndices = this.getTileIndices({\n viewport,\n maxZoom: this._maxZoom,\n minZoom: this._minZoom,\n zRange,\n modelMatrix: this._modelMatrix,\n modelMatrixInverse: this._modelMatrixInverse\n });\n this._selectedTiles = tileIndices.map(index => this._getTile(index, true));\n\n if (this._dirty) {\n // Some new tiles are added\n this._rebuildTree();\n }\n }\n\n // Update tile states\n const changed = this.updateTileStates();\n\n if (this._dirty) {\n // cache size is either the user defined maxSize or 5 * number of current tiles in the viewport.\n this._resizeCache();\n }\n\n if (changed) {\n this._frameNumber++;\n }\n\n return this._frameNumber;\n }\n\n /* Public interface for subclassing */\n\n // Returns array of {x, y, z}\n getTileIndices({viewport, maxZoom, minZoom, zRange, modelMatrix, modelMatrixInverse}) {\n const {tileSize, extent, zoomOffset} = this.opts;\n return getTileIndices({\n viewport,\n maxZoom,\n minZoom,\n zRange,\n tileSize,\n extent,\n modelMatrix,\n modelMatrixInverse,\n zoomOffset\n });\n }\n\n // Add custom metadata to tiles\n getTileMetadata({x, y, z}) {\n const {tileSize} = this.opts;\n return {bbox: tileToBoundingBox(this._viewport, x, y, z, tileSize)};\n }\n\n // Returns {x, y, z} of the parent tile\n getParentIndex(tileIndex) {\n // Perf: mutate the input object to avoid GC\n tileIndex.x = Math.floor(tileIndex.x / 2);\n tileIndex.y = Math.floor(tileIndex.y / 2);\n tileIndex.z -= 1;\n return tileIndex;\n }\n\n // Returns true if any tile's visibility changed\n updateTileStates() {\n this._updateTileStates(this.selectedTiles);\n\n const {maxRequests} = this.opts;\n\n const abortCandidates = [];\n let ongoingRequestCount = 0;\n let changed = false;\n for (const tile of this._cache.values()) {\n const isVisible = Boolean(tile.state & TILE_STATE_VISIBLE);\n if (tile.isVisible !== isVisible) {\n changed = true;\n tile.isVisible = isVisible;\n }\n\n // isSelected used in request scheduler\n tile.isSelected = tile.state === TILE_STATE_SELECTED;\n\n // Keep track of all the ongoing requests\n if (tile.isLoading) {\n ongoingRequestCount++;\n if (!tile.isSelected) {\n abortCandidates.push(tile);\n }\n }\n }\n\n if (maxRequests > 0) {\n while (ongoingRequestCount > maxRequests && abortCandidates.length > 0) {\n // There are too many ongoing requests, so abort some that are unselected\n const tile = abortCandidates.shift();\n tile.abort();\n ongoingRequestCount--;\n }\n }\n\n return changed;\n }\n\n /* Private methods */\n\n // This needs to be called every time some tiles have been added/removed from cache\n _rebuildTree() {\n const {_cache} = this;\n\n // Reset states\n for (const tile of _cache.values()) {\n tile.parent = null;\n tile.children.length = 0;\n }\n\n // Rebuild tree\n for (const tile of _cache.values()) {\n const parent = this._getNearestAncestor(tile.x, tile.y, tile.z);\n tile.parent = parent;\n if (parent) {\n parent.children.push(tile);\n }\n }\n }\n\n // A selected tile is always visible.\n // Never show two overlapping tiles.\n // If a selected tile is loading, try showing a cached ancester with the closest z\n // If a selected tile is loading, and no ancester is shown - try showing cached\n // descendants with the closest z\n _updateTileStates(selectedTiles) {\n const {_cache} = this;\n const refinementStrategy = this.opts.refinementStrategy || STRATEGY_DEFAULT;\n\n // Reset states\n for (const tile of _cache.values()) {\n tile.state = TILE_STATE_UNKNOWN;\n }\n\n // For all the selected && pending tiles:\n // - pick the closest ancestor as placeholder\n // - if no ancestor is visible, pick the closest children as placeholder\n for (const tile of selectedTiles) {\n tile.state = TILE_STATE_SELECTED;\n }\n\n if (refinementStrategy === STRATEGY_NEVER) {\n return;\n }\n for (const tile of selectedTiles) {\n getPlaceholderInAncestors(tile, refinementStrategy);\n }\n for (const tile of selectedTiles) {\n if (needsPlaceholder(tile)) {\n getPlaceholderInChildren(tile);\n }\n }\n }\n\n /**\n * Clear tiles that are not visible when the cache is full\n */\n /* eslint-disable complexity */\n _resizeCache() {\n const {_cache, opts} = this;\n\n const maxCacheSize =\n opts.maxCacheSize ||\n (opts.maxCacheByteSize ? Infinity : DEFAULT_CACHE_SCALE * this.selectedTiles.length);\n const maxCacheByteSize = opts.maxCacheByteSize || Infinity;\n\n const overflown = _cache.size > maxCacheSize || this._cacheByteSize > maxCacheByteSize;\n\n if (overflown) {\n for (const [tileId, tile] of _cache) {\n if (!tile.isVisible) {\n // delete tile\n this._cacheByteSize -= opts.maxCacheByteSize ? tile.byteLength : 0;\n _cache.delete(tileId);\n this.opts.onTileUnload(tile);\n }\n if (_cache.size <= maxCacheSize && this._cacheByteSize <= maxCacheByteSize) {\n break;\n }\n }\n this._rebuildTree();\n this._dirty = true;\n }\n if (this._dirty) {\n this._tiles = Array.from(this._cache.values())\n // sort by zoom level so that smaller tiles are displayed on top\n .sort((t1, t2) => t1.z - t2.z);\n\n this._dirty = false;\n }\n }\n /* eslint-enable complexity */\n\n _getTile({x, y, z}, create) {\n const tileId = `${x},${y},${z}`;\n let tile = this._cache.get(tileId);\n let needsReload = false;\n\n if (!tile && create) {\n tile = new Tile2DHeader({x, y, z});\n Object.assign(tile, this.getTileMetadata(tile));\n needsReload = true;\n this._cache.set(tileId, tile);\n this._dirty = true;\n } else if (tile && tile.needsReload) {\n needsReload = true;\n }\n if (needsReload) {\n tile.loadData({\n getData: this.opts.getTileData,\n requestScheduler: this._requestScheduler,\n onLoad: this.onTileLoad,\n onError: this.opts.onTileError\n });\n }\n\n return tile;\n }\n\n _getNearestAncestor(x, y, z) {\n const {_minZoom = 0} = this;\n let index = {x, y, z};\n\n while (index.z > _minZoom) {\n index = this.getParentIndex(index);\n const parent = this._getTile(index);\n if (parent) {\n return parent;\n }\n }\n return null;\n }\n}\n\n// A selected tile needs placeholder from its children if\n// - it is not loaded\n// - none of its ancestors is visible and loaded\nfunction needsPlaceholder(tile) {\n let t = tile;\n while (t) {\n if (t.state & (TILE_STATE_VISIBLE === 0)) {\n return true;\n }\n if (t.isLoaded) {\n return false;\n }\n t = t.parent;\n }\n return true;\n}\n\nfunction getPlaceholderInAncestors(tile, refinementStrategy) {\n let parent;\n let state = TILE_STATE_PLACEHOLDER;\n while ((parent = tile.parent)) {\n if (tile.isLoaded) {\n // If a tile is loaded, mark all its ancestors as hidden\n state = TILE_STATE_HIDDEN;\n if (refinementStrategy === STRATEGY_DEFAULT) {\n return;\n }\n }\n parent.state = Math.max(parent.state, state);\n tile = parent;\n }\n}\n\n// Recursively set children as placeholder\nfunction getPlaceholderInChildren(tile) {\n for (const child of tile.children) {\n child.state = Math.max(child.state, TILE_STATE_PLACEHOLDER);\n if (!child.isLoaded) {\n getPlaceholderInChildren(child);\n }\n }\n}\n","import {CompositeLayer, _flatten as flatten} from '@deck.gl/core';\nimport {GeoJsonLayer} from '@deck.gl/layers';\n\nimport Tileset2D, {STRATEGY_DEFAULT} from './tileset-2d';\nimport {urlType, getURLFromTemplate} from './utils';\n\nconst defaultProps = {\n data: [],\n dataComparator: urlType.equals,\n renderSubLayers: {type: 'function', value: props => new GeoJsonLayer(props), compare: false},\n getTileData: {type: 'function', optional: true, value: null, compare: false},\n // TODO - change to onViewportLoad to align with Tile3DLayer\n onViewportLoad: {type: 'function', optional: true, value: null, compare: false},\n onTileLoad: {type: 'function', value: tile => {}, compare: false},\n onTileUnload: {type: 'function', value: tile => {}, compare: false},\n // eslint-disable-next-line\n onTileError: {type: 'function', value: err => console.error(err), compare: false},\n extent: {type: 'array', optional: true, value: null, compare: true},\n tileSize: 512,\n maxZoom: null,\n minZoom: 0,\n maxCacheSize: null,\n maxCacheByteSize: null,\n refinementStrategy: STRATEGY_DEFAULT,\n zRange: null,\n maxRequests: 6,\n zoomOffset: 0\n};\n\nexport default class TileLayer extends CompositeLayer {\n initializeState() {\n this.state = {\n tileset: null,\n isLoaded: false\n };\n }\n\n finalizeState() {\n this.state.tileset?.finalize();\n }\n\n get isLoaded() {\n const {tileset} = this.state;\n return tileset.selectedTiles.every(\n tile => tile.isLoaded && tile.layers && tile.layers.every(layer => layer.isLoaded)\n );\n }\n\n shouldUpdateState({changeFlags}) {\n return changeFlags.somethingChanged;\n }\n\n updateState({props, changeFlags}) {\n let {tileset} = this.state;\n const propsChanged = changeFlags.propsOrDataChanged || changeFlags.updateTriggersChanged;\n const dataChanged =\n changeFlags.dataChanged ||\n (changeFlags.updateTriggersChanged &&\n (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getTileData));\n\n if (!tileset) {\n tileset = new Tileset2D(this._getTilesetOptions(props));\n this.setState({tileset});\n } else if (propsChanged) {\n tileset.setOptions(this._getTilesetOptions(props));\n\n if (dataChanged) {\n // reload all tiles\n // use cached layers until new content is loaded\n tileset.reloadAll();\n } else {\n // some render options changed, regenerate sub layers now\n this.state.tileset.tiles.forEach(tile => {\n tile.layers = null;\n });\n }\n }\n\n this._updateTileset();\n }\n\n _getTilesetOptions(props) {\n const {\n tileSize,\n maxCacheSize,\n maxCacheByteSize,\n refinementStrategy,\n extent,\n maxZoom,\n minZoom,\n maxRequests,\n zoomOffset\n } = props;\n\n return {\n maxCacheSize,\n maxCacheByteSize,\n maxZoom,\n minZoom,\n tileSize,\n refinementStrategy,\n extent,\n maxRequests,\n zoomOffset,\n\n getTileData: this.getTileData.bind(this),\n onTileLoad: this._onTileLoad.bind(this),\n onTileError: this._onTileError.bind(this),\n onTileUnload: this._onTileUnload.bind(this)\n };\n }\n\n _updateTileset() {\n const {tileset} = this.state;\n const {zRange, modelMatrix} = this.props;\n const frameNumber = tileset.update(this.context.viewport, {zRange, modelMatrix});\n const {isLoaded} = tileset;\n\n const loadingStateChanged = this.state.isLoaded !== isLoaded;\n const tilesetChanged = this.state.frameNumber !== frameNumber;\n\n if (isLoaded && (loadingStateChanged || tilesetChanged)) {\n this._onViewportLoad();\n }\n\n if (tilesetChanged) {\n // Save the tileset frame number - trigger a rerender\n this.setState({frameNumber});\n }\n // Save the loaded state - should not trigger a rerender\n this.state.isLoaded = isLoaded;\n }\n\n _onViewportLoad() {\n const {tileset} = this.state;\n const {onViewportLoad} = this.props;\n\n if (onViewportLoad) {\n onViewportLoad(tileset.selectedTiles);\n }\n }\n\n _onTileLoad(tile) {\n this.props.onTileLoad(tile);\n tile.layers = null;\n\n if (tile.isVisible) {\n this.setNeedsUpdate();\n }\n }\n\n _onTileError(error, tile) {\n this.props.onTileError(error);\n tile.layers = null;\n\n if (tile.isVisible) {\n this.setNeedsUpdate();\n }\n }\n\n _onTileUnload(tile) {\n this.props.onTileUnload(tile);\n }\n\n // Methods for subclass to override\n\n getTileData(tile) {\n const {data, getTileData, fetch} = this.props;\n const {signal} = tile;\n\n tile.url = getURLFromTemplate(data, tile);\n\n if (getTileData) {\n return getTileData(tile);\n }\n if (tile.url) {\n return fetch(tile.url, {propName: 'data', layer: this, signal});\n }\n return null;\n }\n\n renderSubLayers(props) {\n return this.props.renderSubLayers(props);\n }\n\n getHighlightedObjectIndex() {\n return -1;\n }\n\n getPickingInfo({info, sourceLayer}) {\n info.tile = sourceLayer.props.tile;\n return info;\n }\n\n _updateAutoHighlight(info) {\n if (info.sourceLayer) {\n info.sourceLayer.updateAutoHighlight(info);\n }\n }\n\n renderLayers() {\n return this.state.tileset.tiles.map(tile => {\n const highlightedObjectIndex = this.getHighlightedObjectIndex(tile);\n // cache the rendered layer in the tile\n if (!tile.isLoaded && !tile.content) {\n // nothing to show\n } else if (!tile.layers) {\n const layers = this.renderSubLayers({\n ...this.props,\n id: `${this.id}-${tile.x}-${tile.y}-${tile.z}`,\n data: tile.content,\n _offset: 0,\n tile\n });\n tile.layers = flatten(layers, Boolean).map(layer =>\n layer.clone({\n tile,\n highlightedObjectIndex\n })\n );\n } else if (\n tile.layers[0] &&\n tile.layers[0].props.highlightedObjectIndex !== highlightedObjectIndex\n ) {\n tile.layers = tile.layers.map(layer => layer.clone({highlightedObjectIndex}));\n }\n return tile.layers;\n });\n }\n\n filterSubLayer({layer}) {\n return layer.props.tile.isVisible;\n }\n}\n\nTileLayer.layerName = 'TileLayer';\nTileLayer.defaultProps = defaultProps;\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport var easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nexport var duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\n\nfunction formatMs(milliseconds) {\n return \"\".concat(Math.round(milliseconds), \"ms\");\n}\n/**\n * @param {string|Array} props\n * @param {object} param\n * @param {string} param.prop\n * @param {number} param.duration\n * @param {string} param.easing\n * @param {number} param.delay\n */\n\n\nexport default {\n easing: easing,\n duration: duration,\n create: function create() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _options$duration = options.duration,\n durationOption = _options$duration === void 0 ? duration.standard : _options$duration,\n _options$easing = options.easing,\n easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 0 : _options$delay,\n other = _objectWithoutProperties(options, [\"duration\", \"easing\", \"delay\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var isNumber = function isNumber(value) {\n return !isNaN(parseFloat(value));\n };\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('Material-UI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(\"Material-UI: Argument \\\"duration\\\" must be a number or a string but found \".concat(durationOption, \".\"));\n }\n\n if (!isString(easingOption)) {\n console.error('Material-UI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('Material-UI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(\"Material-UI: Unrecognized argument(s) [\".concat(Object.keys(other).join(','), \"].\"));\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : formatMs(delay));\n }).join(',');\n },\n getAutoHeightDuration: function getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n }\n};","export default function _asyncIterator(iterable) {\n var method;\n\n if (typeof Symbol !== \"undefined\") {\n if (Symbol.asyncIterator) {\n method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n\n if (Symbol.iterator) {\n method = iterable[Symbol.iterator];\n if (method != null) return method.call(iterable);\n }\n }\n\n throw new TypeError(\"Object is not async iterable\");\n}","import React from 'react';\nimport { isFragment } from 'react-is';\nexport default function toArray(children) {\n var ret = [];\n React.Children.forEach(children, function (child) {\n if (child === undefined || child === null) {\n return;\n }\n\n if (Array.isArray(child)) {\n ret = ret.concat(toArray(child));\n } else if (isFragment(child) && child.props) {\n ret = ret.concat(toArray(child.props.children));\n } else {\n ret.push(child);\n }\n });\n return ret;\n}","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar FormControlContext = React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n FormControlContext.displayName = 'FormControlContext';\n}\n\nexport function useFormControl() {\n return React.useContext(FormControlContext);\n}\nexport default FormControlContext;","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nexport function isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","import {assert} from '../utils/assert';\n\nlet pathPrefix = '';\n\n/*\n * Set a relative path prefix\n */\nexport function setPathPrefix(prefix) {\n pathPrefix = prefix;\n}\n\n// Reads raw file data from:\nexport function loadFile(url, options = {}) {\n assert(typeof url === 'string');\n url = pathPrefix + url;\n const dataType = options.dataType || 'text';\n return fetch(url, options).then(res => res[dataType]());\n}\n\n/*\n * Loads images asynchronously\n * image.crossOrigin can be set via opts.crossOrigin, default to 'anonymous'\n * returns a promise tracking the load\n */\nexport function loadImage(url, opts) {\n assert(typeof url === 'string');\n url = pathPrefix + url;\n return new Promise((resolve, reject) => {\n try {\n const image = new Image();\n image.onload = () => resolve(image);\n image.onerror = () => reject(new Error(`Could not load image ${url}.`));\n image.crossOrigin = (opts && opts.crossOrigin) || 'anonymous';\n image.src = url;\n } catch (error) {\n reject(error);\n }\n });\n}\n","import GL from '@luma.gl/constants';\nimport {assertWebGLContext} from '@luma.gl/gltools';\nimport Texture from './texture';\nimport {loadImage} from '../utils/load-file';\n\nexport default class Texture2D extends Texture {\n static isSupported(gl, opts) {\n return Texture.isSupported(gl, opts);\n }\n\n constructor(gl, props = {}) {\n assertWebGLContext(gl);\n\n // Signature: new Texture2D(gl, url | Promise)\n if (props instanceof Promise || typeof props === 'string') {\n props = {data: props};\n }\n\n // Signature: new Texture2D(gl, {data: url})\n if (typeof props.data === 'string') {\n props = Object.assign({}, props, {data: loadImage(props.data)});\n }\n\n super(gl, Object.assign({}, props, {target: GL.TEXTURE_2D}));\n\n this.initialize(props);\n\n Object.seal(this);\n }\n}\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexport var isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\nexport default isBrowser;\n","import {isResponse} from '../../javascript-utils/is-type';\nimport {getResourceContentLength, getResourceUrlAndType} from './resource-utils';\n\n/**\n * Returns a Response object\n * Adds content-length header when possible\n *\n * @param resource\n */\nexport async function makeResponse(resource: any): Promise<Response> {\n if (isResponse(resource)) {\n return resource;\n }\n\n // Add content-length header if possible\n const headers: {[header: string]: string} = {};\n\n const contentLength = getResourceContentLength(resource);\n if (contentLength >= 0) {\n headers['content-length'] = String(contentLength);\n }\n\n // `new Response(File)` does not preserve content-type and URL\n // so we add them here\n const {url, type} = getResourceUrlAndType(resource);\n if (type) {\n headers['content-type'] = type;\n }\n\n // Add a custom header with initial bytes if available\n const initialDataUrl = await getInitialDataUrl(resource);\n if (initialDataUrl) {\n headers['x-first-bytes'] = initialDataUrl;\n }\n\n // TODO - is this the best way of handling strings?\n // Maybe package as data URL instead?\n if (typeof resource === 'string') {\n // Convert to ArrayBuffer to avoid Response treating it as a URL\n resource = new TextEncoder().encode(resource);\n }\n\n // Attempt to create a Response from the resource, adding headers and setting url\n const response = new Response(resource, {headers});\n // We can't control `Response.url` via constructor, use a property override to record URL.\n Object.defineProperty(response, 'url', {value: url});\n return response;\n}\n\n/**\n * Checks response status (async) and throws a helpful error message if status is not OK.\n * @param response\n */\nexport async function checkResponse(response: Response): Promise<void> {\n if (!response.ok) {\n const message = await getResponseError(response);\n throw new Error(message);\n }\n}\n\n/**\n * Checks response status (sync) and throws a helpful error message if status is not OK.\n * @param response\n */\nexport function checkResponseSync(response: Response): void {\n if (!response.ok) {\n let message = `${response.status} ${response.statusText}`;\n message = message.length > 60 ? `${message.slice(60)}...` : message;\n throw new Error(message);\n }\n}\n\n// HELPERS\n\nasync function getResponseError(response): Promise<string> {\n let message = `Failed to fetch resource ${response.url} (${response.status}): `;\n try {\n const contentType = response.headers.get('Content-Type');\n let text = response.statusText;\n if (contentType.includes('application/json')) {\n text += ` ${await response.text()}`;\n }\n message += text;\n message = message.length > 60 ? `${message.slice(60)}...` : message;\n } catch (error) {\n // eslint forbids return in a finally statement, so we just catch here\n }\n return message;\n}\n\nasync function getInitialDataUrl(resource): Promise<string | null> {\n const INITIAL_DATA_LENGTH = 5;\n if (typeof resource === 'string') {\n return `data:,${resource.slice(0, INITIAL_DATA_LENGTH)}`;\n }\n if (resource instanceof Blob) {\n const blobSlice = resource.slice(0, 5);\n return await new Promise((resolve) => {\n const reader = new FileReader();\n reader.onload = (event) => resolve(event?.target?.result as string);\n reader.readAsDataURL(blobSlice);\n });\n }\n if (resource instanceof ArrayBuffer) {\n const slice = resource.slice(0, INITIAL_DATA_LENGTH);\n const base64 = arrayBufferToBase64(slice);\n return `data:base64,${base64}`;\n }\n return null;\n}\n\n// https://stackoverflow.com/questions/9267899/arraybuffer-to-base64-encoded-string\nfunction arrayBufferToBase64(buffer) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < bytes.byteLength; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary);\n}\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\n","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","import GL from '@luma.gl/constants';\n\n// Define local extension strings to optimize minification\n// const SRGB = 'EXT_sRGB';\n// const EXT_FLOAT_WEBGL1 = 'WEBGL_color_buffer_float';\nconst EXT_FLOAT_WEBGL2 = 'EXT_color_buffer_float';\n// const EXT_HALF_FLOAT_WEBGL1 = 'EXT_color_buffer_half_float';\n\n// NOTE(Tarek): bpp === \"bytes per pixel\", used for\n// memory usage calculations.\nexport default {\n [GL.DEPTH_COMPONENT16]: {bpp: 2}, // 16 depth bits.\n [GL.DEPTH_COMPONENT24]: {gl2: true, bpp: 3},\n [GL.DEPTH_COMPONENT32F]: {gl2: true, bpp: 4},\n\n [GL.STENCIL_INDEX8]: {bpp: 1}, // 8 stencil bits.\n\n [GL.DEPTH_STENCIL]: {bpp: 4},\n [GL.DEPTH24_STENCIL8]: {gl2: true, bpp: 4},\n [GL.DEPTH32F_STENCIL8]: {gl2: true, bpp: 5},\n\n // When using a WebGL 1 context, color renderbuffer formats are limited\n [GL.RGBA4]: {bpp: 2},\n [GL.RGB565]: {bpp: 2},\n [GL.RGB5_A1]: {bpp: 2},\n\n // When using a WebGL 2 context, the following values are available additionally:\n [GL.R8]: {gl2: true, bpp: 1},\n [GL.R8UI]: {gl2: true, bpp: 1},\n [GL.R8I]: {gl2: true, bpp: 1},\n [GL.R16UI]: {gl2: true, bpp: 2},\n [GL.R16I]: {gl2: true, bpp: 2},\n [GL.R32UI]: {gl2: true, bpp: 4},\n [GL.R32I]: {gl2: true, bpp: 4},\n [GL.RG8]: {gl2: true, bpp: 2},\n [GL.RG8UI]: {gl2: true, bpp: 2},\n [GL.RG8I]: {gl2: true, bpp: 2},\n [GL.RG16UI]: {gl2: true, bpp: 4},\n [GL.RG16I]: {gl2: true, bpp: 4},\n [GL.RG32UI]: {gl2: true, bpp: 8},\n [GL.RG32I]: {gl2: true, bpp: 8},\n [GL.RGB8]: {gl2: true, bpp: 3},\n [GL.RGBA8]: {gl2: true, bpp: 4},\n // [GL.SRGB8_ALPHA8]: {gl2: true, gl1: SRGB}, // When using the EXT_sRGB WebGL1 extension\n [GL.RGB10_A2]: {gl2: true, bpp: 4},\n [GL.RGBA8UI]: {gl2: true, bpp: 4},\n [GL.RGBA8I]: {gl2: true, bpp: 4},\n [GL.RGB10_A2UI]: {gl2: true, bpp: 4},\n [GL.RGBA16UI]: {gl2: true, bpp: 8},\n [GL.RGBA16I]: {gl2: true, bpp: 8},\n [GL.RGBA32I]: {gl2: true, bpp: 16},\n [GL.RGBA32UI]: {gl2: true, bpp: 16},\n\n // When using a WebGL 2 context and the EXT_color_buffer_float WebGL2 extension\n [GL.R16F]: {gl2: EXT_FLOAT_WEBGL2, bpp: 2},\n [GL.RG16F]: {gl2: EXT_FLOAT_WEBGL2, bpp: 4},\n [GL.RGBA16F]: {gl2: EXT_FLOAT_WEBGL2, bpp: 8},\n [GL.R32F]: {gl2: EXT_FLOAT_WEBGL2, bpp: 4},\n [GL.RG32F]: {gl2: EXT_FLOAT_WEBGL2, bpp: 8},\n // TODO - can't get WEBGL_color_buffer_float to work on renderbuffers\n [GL.RGBA32F]: {gl2: EXT_FLOAT_WEBGL2, bpp: 16},\n // [GL.RGBA32F]: {gl2: EXT_FLOAT_WEBGL2, gl1: EXT_FLOAT_WEBGL1},\n [GL.R11F_G11F_B10F]: {gl2: EXT_FLOAT_WEBGL2, bpp: 4}\n};\n","/* eslint-disable no-inline-comments */\nimport GL from '@luma.gl/constants';\nimport Resource from './resource';\nimport RENDERBUFFER_FORMATS from './renderbuffer-formats';\nimport {isWebGL2} from '@luma.gl/gltools';\nimport {assert} from '../utils/assert';\n\nfunction isFormatSupported(gl, format, formats) {\n const info = formats[format];\n if (!info) {\n return false;\n }\n const value = isWebGL2(gl) ? info.gl2 || info.gl1 : info.gl1;\n if (typeof value === 'string') {\n return gl.getExtension(value);\n }\n return value;\n}\n\nexport default class Renderbuffer extends Resource {\n static isSupported(gl, {format} = {format: null}) {\n return !format || isFormatSupported(gl, format, RENDERBUFFER_FORMATS);\n }\n\n static getSamplesForFormat(gl, {format}) {\n // Polyfilled to return [0] under WebGL1\n return gl.getInternalformatParameter(GL.RENDERBUFFER, format, GL.SAMPLES);\n }\n\n constructor(gl, opts = {}) {\n super(gl, opts);\n\n // @ts-ignore\n this.initialize(opts);\n\n Object.seal(this);\n }\n\n // Creates and initializes a renderbuffer object's data store\n initialize({format, width = 1, height = 1, samples = 0}) {\n assert(format, 'Needs format');\n\n this._trackDeallocatedMemory();\n\n this.gl.bindRenderbuffer(GL.RENDERBUFFER, this.handle);\n\n if (samples !== 0 && isWebGL2(this.gl)) {\n // @ts-ignore\n this.gl.renderbufferStorageMultisample(GL.RENDERBUFFER, samples, format, width, height);\n } else {\n this.gl.renderbufferStorage(GL.RENDERBUFFER, format, width, height);\n }\n\n // this.gl.bindRenderbuffer(GL.RENDERBUFFER, null);\n\n this.format = format;\n this.width = width;\n this.height = height;\n this.samples = samples;\n\n this._trackAllocatedMemory(\n this.width * this.height * (this.samples || 1) * RENDERBUFFER_FORMATS[this.format].bpp\n );\n\n return this;\n }\n\n resize({width, height}) {\n // Don't resize if width/height haven't changed\n if (width !== this.width || height !== this.height) {\n return this.initialize({width, height, format: this.format, samples: this.samples});\n }\n return this;\n }\n\n // PRIVATE METHODS\n _createHandle() {\n return this.gl.createRenderbuffer();\n }\n\n _deleteHandle() {\n this.gl.deleteRenderbuffer(this.handle);\n this._trackDeallocatedMemory();\n }\n\n _bindHandle(handle) {\n this.gl.bindRenderbuffer(GL.RENDERBUFFER, handle);\n }\n\n _syncHandle(handle) {\n this.format = this.getParameter(GL.RENDERBUFFER_INTERNAL_FORMAT);\n this.width = this.getParameter(GL.RENDERBUFFER_WIDTH);\n this.height = this.getParameter(GL.RENDERBUFFER_HEIGHT);\n this.samples = this.getParameter(GL.RENDERBUFFER_SAMPLES);\n }\n\n // @param {Boolean} opt.autobind=true - method call will bind/unbind object\n // @returns {GLenum|GLint} - depends on pname\n _getParameter(pname) {\n this.gl.bindRenderbuffer(GL.RENDERBUFFER, this.handle);\n const value = this.gl.getRenderbufferParameter(GL.RENDERBUFFER, pname);\n // this.gl.bindRenderbuffer(GL.RENDERBUFFER, null);\n return value;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar react = require('react');\n\nfunction create$1(createState) {\n var state;\n var listeners = new Set();\n\n var setState = function setState(partial, replace) {\n var nextState = typeof partial === 'function' ? partial(state) : partial;\n\n if (nextState !== state) {\n var _previousState = state;\n state = replace ? nextState : Object.assign({}, state, nextState);\n listeners.forEach(function (listener) {\n return listener(state, _previousState);\n });\n }\n };\n\n var getState = function getState() {\n return state;\n };\n\n var subscribeWithSelector = function subscribeWithSelector(listener, selector, equalityFn) {\n if (selector === void 0) {\n selector = getState;\n }\n\n if (equalityFn === void 0) {\n equalityFn = Object.is;\n }\n\n var currentSlice = selector(state);\n\n function listenerToAdd() {\n var nextSlice = selector(state);\n\n if (!equalityFn(currentSlice, nextSlice)) {\n var _previousSlice = currentSlice;\n listener(currentSlice = nextSlice, _previousSlice);\n }\n }\n\n listeners.add(listenerToAdd);\n return function () {\n return listeners.delete(listenerToAdd);\n };\n };\n\n var subscribe = function subscribe(listener, selector, equalityFn) {\n if (selector || equalityFn) {\n return subscribeWithSelector(listener, selector, equalityFn);\n }\n\n listeners.add(listener);\n return function () {\n return listeners.delete(listener);\n };\n };\n\n var destroy = function destroy() {\n return listeners.clear();\n };\n\n var api = {\n setState: setState,\n getState: getState,\n subscribe: subscribe,\n destroy: destroy\n };\n state = createState(setState, getState, api);\n return api;\n}\n\nvar isSSR = typeof window === 'undefined' || !window.navigator || /ServerSideRendering|^Deno\\//.test(window.navigator.userAgent);\nvar useIsomorphicLayoutEffect = isSSR ? react.useEffect : react.useLayoutEffect;\nfunction create(createState) {\n var api = typeof createState === 'function' ? create$1(createState) : createState;\n\n var useStore = function useStore(selector, equalityFn) {\n if (selector === void 0) {\n selector = api.getState;\n }\n\n if (equalityFn === void 0) {\n equalityFn = Object.is;\n }\n\n var _ref = react.useReducer(function (c) {\n return c + 1;\n }, 0),\n forceUpdate = _ref[1];\n\n var state = api.getState();\n var stateRef = react.useRef(state);\n var selectorRef = react.useRef(selector);\n var equalityFnRef = react.useRef(equalityFn);\n var erroredRef = react.useRef(false);\n var currentSliceRef = react.useRef();\n\n if (currentSliceRef.current === undefined) {\n currentSliceRef.current = selector(state);\n }\n\n var newStateSlice;\n var hasNewStateSlice = false;\n\n if (stateRef.current !== state || selectorRef.current !== selector || equalityFnRef.current !== equalityFn || erroredRef.current) {\n newStateSlice = selector(state);\n hasNewStateSlice = !equalityFn(currentSliceRef.current, newStateSlice);\n }\n\n useIsomorphicLayoutEffect(function () {\n if (hasNewStateSlice) {\n currentSliceRef.current = newStateSlice;\n }\n\n stateRef.current = state;\n selectorRef.current = selector;\n equalityFnRef.current = equalityFn;\n erroredRef.current = false;\n });\n var stateBeforeSubscriptionRef = react.useRef(state);\n useIsomorphicLayoutEffect(function () {\n var listener = function listener() {\n try {\n var nextState = api.getState();\n var nextStateSlice = selectorRef.current(nextState);\n\n if (!equalityFnRef.current(currentSliceRef.current, nextStateSlice)) {\n stateRef.current = nextState;\n currentSliceRef.current = nextStateSlice;\n forceUpdate();\n }\n } catch (error) {\n erroredRef.current = true;\n forceUpdate();\n }\n };\n\n var unsubscribe = api.subscribe(listener);\n\n if (api.getState() !== stateBeforeSubscriptionRef.current) {\n listener();\n }\n\n return unsubscribe;\n }, []);\n return hasNewStateSlice ? newStateSlice : currentSliceRef.current;\n };\n\n Object.assign(useStore, api);\n\n useStore[Symbol.iterator] = function () {\n console.warn('[useStore, api] = create() is deprecated and will be removed in v4');\n var items = [useStore, api];\n return {\n next: function next() {\n var done = items.length <= 0;\n return {\n value: items.shift(),\n done: done\n };\n }\n };\n };\n\n return useStore;\n}\n\nexports['default'] = create;\n","import checkIfBrowser from '../env/is-browser';\n\nexport {self, window, global, document, process, console} from '../env/globals';\n\n// Extract injected version from package.json (injected by babel plugin)\n/* global __VERSION__ */\n// @ts-ignore\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'untranspiled source';\n\nexport const isBrowser = checkIfBrowser();\n","/**\n * @license Fraction.js v4.0.12 09/09/2015\n * http://www.xarg.org/2014/03/rational-numbers-in-javascript/\n *\n * Copyright (c) 2015, Robert Eisele (robert@xarg.org)\n * Dual licensed under the MIT or GPL Version 2 licenses.\n **/\n\n\n/**\n *\n * This class offers the possibility to calculate fractions.\n * You can pass a fraction in different formats. Either as array, as double, as string or as an integer.\n *\n * Array/Object form\n * [ 0 => <nominator>, 1 => <denominator> ]\n * [ n => <nominator>, d => <denominator> ]\n *\n * Integer form\n * - Single integer value\n *\n * Double form\n * - Single double value\n *\n * String form\n * 123.456 - a simple double\n * 123/456 - a string fraction\n * 123.'456' - a double with repeating decimal places\n * 123.(456) - synonym\n * 123.45'6' - a double with repeating last place\n * 123.45(6) - synonym\n *\n * Example:\n *\n * var f = new Fraction(\"9.4'31'\");\n * f.mul([-4, 3]).div(4.9);\n *\n */\n\n(function(root) {\n\n \"use strict\";\n\n // Maximum search depth for cyclic rational numbers. 2000 should be more than enough.\n // Example: 1/7 = 0.(142857) has 6 repeating decimal places.\n // If MAX_CYCLE_LEN gets reduced, long cycles will not be detected and toString() only gets the first 10 digits\n var MAX_CYCLE_LEN = 2000;\n\n // Parsed data to avoid calling \"new\" all the time\n var P = {\n \"s\": 1,\n \"n\": 0,\n \"d\": 1\n };\n\n function createError(name) {\n\n function errorConstructor() {\n var temp = Error.apply(this, arguments);\n temp['name'] = this['name'] = name;\n this['stack'] = temp['stack'];\n this['message'] = temp['message'];\n }\n\n /**\n * Error constructor\n *\n * @constructor\n */\n function IntermediateInheritor() { }\n IntermediateInheritor.prototype = Error.prototype;\n errorConstructor.prototype = new IntermediateInheritor();\n\n return errorConstructor;\n }\n\n var DivisionByZero = Fraction['DivisionByZero'] = createError('DivisionByZero');\n var InvalidParameter = Fraction['InvalidParameter'] = createError('InvalidParameter');\n\n function assign(n, s) {\n\n if (isNaN(n = parseInt(n, 10))) {\n throwInvalidParam();\n }\n return n * s;\n }\n\n function throwInvalidParam() {\n throw new InvalidParameter();\n }\n\n var parse = function(p1, p2) {\n\n var n = 0, d = 1, s = 1;\n var v = 0, w = 0, x = 0, y = 1, z = 1;\n\n var A = 0, B = 1;\n var C = 1, D = 1;\n\n var N = 10000000;\n var M;\n\n if (p1 === undefined || p1 === null) {\n /* void */\n } else if (p2 !== undefined) {\n n = p1;\n d = p2;\n s = n * d;\n } else\n switch (typeof p1) {\n\n case \"object\":\n {\n if (\"d\" in p1 && \"n\" in p1) {\n n = p1[\"n\"];\n d = p1[\"d\"];\n if (\"s\" in p1)\n n *= p1[\"s\"];\n } else if (0 in p1) {\n n = p1[0];\n if (1 in p1)\n d = p1[1];\n } else {\n throwInvalidParam();\n }\n s = n * d;\n break;\n }\n case \"number\":\n {\n if (p1 < 0) {\n s = p1;\n p1 = -p1;\n }\n\n if (p1 % 1 === 0) {\n n = p1;\n } else if (p1 > 0) { // check for != 0, scale would become NaN (log(0)), which converges really slow\n\n if (p1 >= 1) {\n z = Math.pow(10, Math.floor(1 + Math.log(p1) / Math.LN10));\n p1 /= z;\n }\n\n // Using Farey Sequences\n // http://www.johndcook.com/blog/2010/10/20/best-rational-approximation/\n\n while (B <= N && D <= N) {\n M = (A + C) / (B + D);\n\n if (p1 === M) {\n if (B + D <= N) {\n n = A + C;\n d = B + D;\n } else if (D > B) {\n n = C;\n d = D;\n } else {\n n = A;\n d = B;\n }\n break;\n\n } else {\n\n if (p1 > M) {\n A += C;\n B += D;\n } else {\n C += A;\n D += B;\n }\n\n if (B > N) {\n n = C;\n d = D;\n } else {\n n = A;\n d = B;\n }\n }\n }\n n *= z;\n } else if (isNaN(p1) || isNaN(p2)) {\n d = n = NaN;\n }\n break;\n }\n case \"string\":\n {\n B = p1.match(/\\d+|./g);\n\n if (B === null)\n throwInvalidParam();\n\n if (B[A] === '-') {// Check for minus sign at the beginning\n s = -1;\n A++;\n } else if (B[A] === '+') {// Check for plus sign at the beginning\n A++;\n }\n\n if (B.length === A + 1) { // Check if it's just a simple number \"1234\"\n w = assign(B[A++], s);\n } else if (B[A + 1] === '.' || B[A] === '.') { // Check if it's a decimal number\n\n if (B[A] !== '.') { // Handle 0.5 and .5\n v = assign(B[A++], s);\n }\n A++;\n\n // Check for decimal places\n if (A + 1 === B.length || B[A + 1] === '(' && B[A + 3] === ')' || B[A + 1] === \"'\" && B[A + 3] === \"'\") {\n w = assign(B[A], s);\n y = Math.pow(10, B[A].length);\n A++;\n }\n\n // Check for repeating places\n if (B[A] === '(' && B[A + 2] === ')' || B[A] === \"'\" && B[A + 2] === \"'\") {\n x = assign(B[A + 1], s);\n z = Math.pow(10, B[A + 1].length) - 1;\n A += 3;\n }\n\n } else if (B[A + 1] === '/' || B[A + 1] === ':') { // Check for a simple fraction \"123/456\" or \"123:456\"\n w = assign(B[A], s);\n y = assign(B[A + 2], 1);\n A += 3;\n } else if (B[A + 3] === '/' && B[A + 1] === ' ') { // Check for a complex fraction \"123 1/2\"\n v = assign(B[A], s);\n w = assign(B[A + 2], s);\n y = assign(B[A + 4], 1);\n A += 5;\n }\n\n if (B.length <= A) { // Check for more tokens on the stack\n d = y * z;\n s = /* void */\n n = x + d * v + z * w;\n break;\n }\n\n /* Fall through on error */\n }\n default:\n throwInvalidParam();\n }\n\n if (d === 0) {\n throw new DivisionByZero();\n }\n\n P[\"s\"] = s < 0 ? -1 : 1;\n P[\"n\"] = Math.abs(n);\n P[\"d\"] = Math.abs(d);\n };\n\n function modpow(b, e, m) {\n\n var r = 1;\n for (; e > 0; b = (b * b) % m, e >>= 1) {\n\n if (e & 1) {\n r = (r * b) % m;\n }\n }\n return r;\n }\n\n\n function cycleLen(n, d) {\n\n for (; d % 2 === 0;\n d /= 2) {\n }\n\n for (; d % 5 === 0;\n d /= 5) {\n }\n\n if (d === 1) // Catch non-cyclic numbers\n return 0;\n\n // If we would like to compute really large numbers quicker, we could make use of Fermat's little theorem:\n // 10^(d-1) % d == 1\n // However, we don't need such large numbers and MAX_CYCLE_LEN should be the capstone,\n // as we want to translate the numbers to strings.\n\n var rem = 10 % d;\n var t = 1;\n\n for (; rem !== 1; t++) {\n rem = rem * 10 % d;\n\n if (t > MAX_CYCLE_LEN)\n return 0; // Returning 0 here means that we don't print it as a cyclic number. It's likely that the answer is `d-1`\n }\n return t;\n }\n\n\n function cycleStart(n, d, len) {\n\n var rem1 = 1;\n var rem2 = modpow(10, len, d);\n\n for (var t = 0; t < 300; t++) { // s < ~log10(Number.MAX_VALUE)\n // Solve 10^s == 10^(s+t) (mod d)\n\n if (rem1 === rem2)\n return t;\n\n rem1 = rem1 * 10 % d;\n rem2 = rem2 * 10 % d;\n }\n return 0;\n }\n\n function gcd(a, b) {\n\n if (!a)\n return b;\n if (!b)\n return a;\n\n while (1) {\n a %= b;\n if (!a)\n return b;\n b %= a;\n if (!b)\n return a;\n }\n };\n\n /**\n * Module constructor\n *\n * @constructor\n * @param {number|Fraction=} a\n * @param {number=} b\n */\n function Fraction(a, b) {\n\n if (!(this instanceof Fraction)) {\n return new Fraction(a, b);\n }\n\n parse(a, b);\n\n if (Fraction['REDUCE']) {\n a = gcd(P[\"d\"], P[\"n\"]); // Abuse a\n } else {\n a = 1;\n }\n\n this[\"s\"] = P[\"s\"];\n this[\"n\"] = P[\"n\"] / a;\n this[\"d\"] = P[\"d\"] / a;\n }\n\n /**\n * Boolean global variable to be able to disable automatic reduction of the fraction\n *\n */\n Fraction['REDUCE'] = 1;\n\n Fraction.prototype = {\n\n \"s\": 1,\n \"n\": 0,\n \"d\": 1,\n\n /**\n * Calculates the absolute value\n *\n * Ex: new Fraction(-4).abs() => 4\n **/\n \"abs\": function() {\n\n return new Fraction(this[\"n\"], this[\"d\"]);\n },\n\n /**\n * Inverts the sign of the current fraction\n *\n * Ex: new Fraction(-4).neg() => 4\n **/\n \"neg\": function() {\n\n return new Fraction(-this[\"s\"] * this[\"n\"], this[\"d\"]);\n },\n\n /**\n * Adds two rational numbers\n *\n * Ex: new Fraction({n: 2, d: 3}).add(\"14.9\") => 467 / 30\n **/\n \"add\": function(a, b) {\n\n parse(a, b);\n return new Fraction(\n this[\"s\"] * this[\"n\"] * P[\"d\"] + P[\"s\"] * this[\"d\"] * P[\"n\"],\n this[\"d\"] * P[\"d\"]\n );\n },\n\n /**\n * Subtracts two rational numbers\n *\n * Ex: new Fraction({n: 2, d: 3}).add(\"14.9\") => -427 / 30\n **/\n \"sub\": function(a, b) {\n\n parse(a, b);\n return new Fraction(\n this[\"s\"] * this[\"n\"] * P[\"d\"] - P[\"s\"] * this[\"d\"] * P[\"n\"],\n this[\"d\"] * P[\"d\"]\n );\n },\n\n /**\n * Multiplies two rational numbers\n *\n * Ex: new Fraction(\"-17.(345)\").mul(3) => 5776 / 111\n **/\n \"mul\": function(a, b) {\n\n parse(a, b);\n return new Fraction(\n this[\"s\"] * P[\"s\"] * this[\"n\"] * P[\"n\"],\n this[\"d\"] * P[\"d\"]\n );\n },\n\n /**\n * Divides two rational numbers\n *\n * Ex: new Fraction(\"-17.(345)\").inverse().div(3)\n **/\n \"div\": function(a, b) {\n\n parse(a, b);\n return new Fraction(\n this[\"s\"] * P[\"s\"] * this[\"n\"] * P[\"d\"],\n this[\"d\"] * P[\"n\"]\n );\n },\n\n /**\n * Clones the actual object\n *\n * Ex: new Fraction(\"-17.(345)\").clone()\n **/\n \"clone\": function() {\n return new Fraction(this);\n },\n\n /**\n * Calculates the modulo of two rational numbers - a more precise fmod\n *\n * Ex: new Fraction('4.(3)').mod([7, 8]) => (13/3) % (7/8) = (5/6)\n **/\n \"mod\": function(a, b) {\n\n if (isNaN(this['n']) || isNaN(this['d'])) {\n return new Fraction(NaN);\n }\n\n if (a === undefined) {\n return new Fraction(this[\"s\"] * this[\"n\"] % this[\"d\"], 1);\n }\n\n parse(a, b);\n if (0 === P[\"n\"] && 0 === this[\"d\"]) {\n Fraction(0, 0); // Throw DivisionByZero\n }\n\n /*\n * First silly attempt, kinda slow\n *\n return that[\"sub\"]({\n \"n\": num[\"n\"] * Math.floor((this.n / this.d) / (num.n / num.d)),\n \"d\": num[\"d\"],\n \"s\": this[\"s\"]\n });*/\n\n /*\n * New attempt: a1 / b1 = a2 / b2 * q + r\n * => b2 * a1 = a2 * b1 * q + b1 * b2 * r\n * => (b2 * a1 % a2 * b1) / (b1 * b2)\n */\n return new Fraction(\n this[\"s\"] * (P[\"d\"] * this[\"n\"]) % (P[\"n\"] * this[\"d\"]),\n P[\"d\"] * this[\"d\"]\n );\n },\n\n /**\n * Calculates the fractional gcd of two rational numbers\n *\n * Ex: new Fraction(5,8).gcd(3,7) => 1/56\n */\n \"gcd\": function(a, b) {\n\n parse(a, b);\n\n // gcd(a / b, c / d) = gcd(a, c) / lcm(b, d)\n\n return new Fraction(gcd(P[\"n\"], this[\"n\"]) * gcd(P[\"d\"], this[\"d\"]), P[\"d\"] * this[\"d\"]);\n },\n\n /**\n * Calculates the fractional lcm of two rational numbers\n *\n * Ex: new Fraction(5,8).lcm(3,7) => 15\n */\n \"lcm\": function(a, b) {\n\n parse(a, b);\n\n // lcm(a / b, c / d) = lcm(a, c) / gcd(b, d)\n\n if (P[\"n\"] === 0 && this[\"n\"] === 0) {\n return new Fraction;\n }\n return new Fraction(P[\"n\"] * this[\"n\"], gcd(P[\"n\"], this[\"n\"]) * gcd(P[\"d\"], this[\"d\"]));\n },\n\n /**\n * Calculates the ceil of a rational number\n *\n * Ex: new Fraction('4.(3)').ceil() => (5 / 1)\n **/\n \"ceil\": function(places) {\n\n places = Math.pow(10, places || 0);\n\n if (isNaN(this[\"n\"]) || isNaN(this[\"d\"])) {\n return new Fraction(NaN);\n }\n return new Fraction(Math.ceil(places * this[\"s\"] * this[\"n\"] / this[\"d\"]), places);\n },\n\n /**\n * Calculates the floor of a rational number\n *\n * Ex: new Fraction('4.(3)').floor() => (4 / 1)\n **/\n \"floor\": function(places) {\n\n places = Math.pow(10, places || 0);\n\n if (isNaN(this[\"n\"]) || isNaN(this[\"d\"])) {\n return new Fraction(NaN);\n }\n return new Fraction(Math.floor(places * this[\"s\"] * this[\"n\"] / this[\"d\"]), places);\n },\n\n /**\n * Rounds a rational numbers\n *\n * Ex: new Fraction('4.(3)').round() => (4 / 1)\n **/\n \"round\": function(places) {\n\n places = Math.pow(10, places || 0);\n\n if (isNaN(this[\"n\"]) || isNaN(this[\"d\"])) {\n return new Fraction(NaN);\n }\n return new Fraction(Math.round(places * this[\"s\"] * this[\"n\"] / this[\"d\"]), places);\n },\n\n /**\n * Gets the inverse of the fraction, means numerator and denominator are exchanged\n *\n * Ex: new Fraction([-3, 4]).inverse() => -4 / 3\n **/\n \"inverse\": function() {\n\n return new Fraction(this[\"s\"] * this[\"d\"], this[\"n\"]);\n },\n\n /**\n * Calculates the fraction to some integer exponent\n *\n * Ex: new Fraction(-1,2).pow(-3) => -8\n */\n \"pow\": function(m) {\n\n if (m < 0) {\n return new Fraction(Math.pow(this['s'] * this[\"d\"], -m), Math.pow(this[\"n\"], -m));\n } else {\n return new Fraction(Math.pow(this['s'] * this[\"n\"], m), Math.pow(this[\"d\"], m));\n }\n },\n\n /**\n * Check if two rational numbers are the same\n *\n * Ex: new Fraction(19.6).equals([98, 5]);\n **/\n \"equals\": function(a, b) {\n\n parse(a, b);\n return this[\"s\"] * this[\"n\"] * P[\"d\"] === P[\"s\"] * P[\"n\"] * this[\"d\"]; // Same as compare() === 0\n },\n\n /**\n * Check if two rational numbers are the same\n *\n * Ex: new Fraction(19.6).equals([98, 5]);\n **/\n \"compare\": function(a, b) {\n\n parse(a, b);\n var t = (this[\"s\"] * this[\"n\"] * P[\"d\"] - P[\"s\"] * P[\"n\"] * this[\"d\"]);\n return (0 < t) - (t < 0);\n },\n\n \"simplify\": function(eps) {\n\n // First naive implementation, needs improvement\n\n if (isNaN(this['n']) || isNaN(this['d'])) {\n return this;\n }\n\n var cont = this['abs']()['toContinued']();\n\n eps = eps || 0.001;\n\n function rec(a) {\n if (a.length === 1)\n return new Fraction(a[0]);\n return rec(a.slice(1))['inverse']()['add'](a[0]);\n }\n\n for (var i = 0; i < cont.length; i++) {\n var tmp = rec(cont.slice(0, i + 1));\n if (tmp['sub'](this['abs']())['abs']().valueOf() < eps) {\n return tmp['mul'](this['s']);\n }\n }\n return this;\n },\n\n /**\n * Check if two rational numbers are divisible\n *\n * Ex: new Fraction(19.6).divisible(1.5);\n */\n \"divisible\": function(a, b) {\n\n parse(a, b);\n return !(!(P[\"n\"] * this[\"d\"]) || ((this[\"n\"] * P[\"d\"]) % (P[\"n\"] * this[\"d\"])));\n },\n\n /**\n * Returns a decimal representation of the fraction\n *\n * Ex: new Fraction(\"100.'91823'\").valueOf() => 100.91823918239183\n **/\n 'valueOf': function() {\n\n return this[\"s\"] * this[\"n\"] / this[\"d\"];\n },\n\n /**\n * Returns a string-fraction representation of a Fraction object\n *\n * Ex: new Fraction(\"1.'3'\").toFraction() => \"4 1/3\"\n **/\n 'toFraction': function(excludeWhole) {\n\n var whole, str = \"\";\n var n = this[\"n\"];\n var d = this[\"d\"];\n if (this[\"s\"] < 0) {\n str += '-';\n }\n\n if (d === 1) {\n str += n;\n } else {\n\n if (excludeWhole && (whole = Math.floor(n / d)) > 0) {\n str += whole;\n str += \" \";\n n %= d;\n }\n\n str += n;\n str += '/';\n str += d;\n }\n return str;\n },\n\n /**\n * Returns a latex representation of a Fraction object\n *\n * Ex: new Fraction(\"1.'3'\").toLatex() => \"\\frac{4}{3}\"\n **/\n 'toLatex': function(excludeWhole) {\n\n var whole, str = \"\";\n var n = this[\"n\"];\n var d = this[\"d\"];\n if (this[\"s\"] < 0) {\n str += '-';\n }\n\n if (d === 1) {\n str += n;\n } else {\n\n if (excludeWhole && (whole = Math.floor(n / d)) > 0) {\n str += whole;\n n %= d;\n }\n\n str += \"\\\\frac{\";\n str += n;\n str += '}{';\n str += d;\n str += '}';\n }\n return str;\n },\n\n /**\n * Returns an array of continued fraction elements\n *\n * Ex: new Fraction(\"7/8\").toContinued() => [0,1,7]\n */\n 'toContinued': function() {\n\n var t;\n var a = this['n'];\n var b = this['d'];\n var res = [];\n\n if (isNaN(a) || isNaN(b)) {\n return res;\n }\n\n do {\n res.push(Math.floor(a / b));\n t = a % b;\n a = b;\n b = t;\n } while (a !== 1);\n\n return res;\n },\n\n /**\n * Creates a string representation of a fraction with all digits\n *\n * Ex: new Fraction(\"100.'91823'\").toString() => \"100.(91823)\"\n **/\n 'toString': function(dec) {\n\n var g;\n var N = this[\"n\"];\n var D = this[\"d\"];\n\n if (isNaN(N) || isNaN(D)) {\n return \"NaN\";\n }\n\n if (!Fraction['REDUCE']) {\n g = gcd(N, D);\n N /= g;\n D /= g;\n }\n\n dec = dec || 15; // 15 = decimal places when no repitation\n\n var cycLen = cycleLen(N, D); // Cycle length\n var cycOff = cycleStart(N, D, cycLen); // Cycle start\n\n var str = this['s'] === -1 ? \"-\" : \"\";\n\n str += N / D | 0;\n\n N %= D;\n N *= 10;\n\n if (N)\n str += \".\";\n\n if (cycLen) {\n\n for (var i = cycOff; i--;) {\n str += N / D | 0;\n N %= D;\n N *= 10;\n }\n str += \"(\";\n for (var i = cycLen; i--;) {\n str += N / D | 0;\n N %= D;\n N *= 10;\n }\n str += \")\";\n } else {\n for (var i = dec; N && i--;) {\n str += N / D | 0;\n N %= D;\n N *= 10;\n }\n }\n return str;\n }\n };\n\n if (typeof define === \"function\" && define[\"amd\"]) {\n define([], function() {\n return Fraction;\n });\n } else if (typeof exports === \"object\") {\n Object.defineProperty(Fraction, \"__esModule\", { 'value': true });\n Fraction['default'] = Fraction;\n Fraction['Fraction'] = Fraction;\n module['exports'] = Fraction;\n } else {\n root['Fraction'] = Fraction;\n }\n\n})(this);\n","/*\r\n * Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license\r\n * Author: Jim Palmer (based on chunking idea from Dave Koelle)\r\n */\r\n/*jshint unused:false */\r\nmodule.exports = function naturalSort (a, b) {\r\n\t\"use strict\";\r\n\tvar re = /(^([+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)?$|^0x[0-9a-f]+$|\\d+)/gi,\r\n\t\tsre = /(^[ ]*|[ ]*$)/g,\r\n\t\tdre = /(^([\\w ]+,?[\\w ]+)?[\\w ]+,?[\\w ]+\\d+:\\d+(:\\d+)?[\\w ]?|^\\d{1,4}[\\/\\-]\\d{1,4}[\\/\\-]\\d{1,4}|^\\w+, \\w+ \\d+, \\d{4})/,\r\n\t\thre = /^0x[0-9a-f]+$/i,\r\n\t\tore = /^0/,\r\n\t\ti = function(s) { return naturalSort.insensitive && ('' + s).toLowerCase() || '' + s; },\r\n\t\t// convert all to strings strip whitespace\r\n\t\tx = i(a).replace(sre, '') || '',\r\n\t\ty = i(b).replace(sre, '') || '',\r\n\t\t// chunk/tokenize\r\n\t\txN = x.replace(re, '\\0$1\\0').replace(/\\0$/,'').replace(/^\\0/,'').split('\\0'),\r\n\t\tyN = y.replace(re, '\\0$1\\0').replace(/\\0$/,'').replace(/^\\0/,'').split('\\0'),\r\n\t\t// numeric, hex or date detection\r\n\t\txD = parseInt(x.match(hre), 16) || (xN.length !== 1 && x.match(dre) && Date.parse(x)),\r\n\t\tyD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null,\r\n\t\toFxNcL, oFyNcL;\r\n\t// first try and sort Hex codes or Dates\r\n\tif (yD) {\r\n\t\tif ( xD < yD ) { return -1; }\r\n\t\telse if ( xD > yD ) { return 1; }\r\n\t}\r\n\t// natural sorting through split numeric strings and default strings\r\n\tfor(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {\r\n\t\t// find floats not starting with '0', string or 0 if not defined (Clint Priest)\r\n\t\toFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc]) || xN[cLoc] || 0;\r\n\t\toFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc]) || yN[cLoc] || 0;\r\n\t\t// handle numeric vs string comparison - number < string - (Kyle Adams)\r\n\t\tif (isNaN(oFxNcL) !== isNaN(oFyNcL)) { return (isNaN(oFxNcL)) ? 1 : -1; }\r\n\t\t// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'\r\n\t\telse if (typeof oFxNcL !== typeof oFyNcL) {\r\n\t\t\toFxNcL += '';\r\n\t\t\toFyNcL += '';\r\n\t\t}\r\n\t\tif (oFxNcL < oFyNcL) { return -1; }\r\n\t\tif (oFxNcL > oFyNcL) { return 1; }\r\n\t}\r\n\treturn 0;\r\n};\r\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bottom = bottom;\nexports.cloneLayout = cloneLayout;\nexports.cloneLayoutItem = cloneLayoutItem;\nexports.childrenEqual = childrenEqual;\nexports.fastPositionEqual = fastPositionEqual;\nexports.collides = collides;\nexports.compact = compact;\nexports.compactItem = compactItem;\nexports.correctBounds = correctBounds;\nexports.getLayoutItem = getLayoutItem;\nexports.getFirstCollision = getFirstCollision;\nexports.getAllCollisions = getAllCollisions;\nexports.getStatics = getStatics;\nexports.moveElement = moveElement;\nexports.moveElementAwayFromCollision = moveElementAwayFromCollision;\nexports.perc = perc;\nexports.setTransform = setTransform;\nexports.setTopLeft = setTopLeft;\nexports.sortLayoutItems = sortLayoutItems;\nexports.sortLayoutItemsByRowCol = sortLayoutItemsByRowCol;\nexports.sortLayoutItemsByColRow = sortLayoutItemsByColRow;\nexports.synchronizeLayoutWithChildren = synchronizeLayoutWithChildren;\nexports.validateLayout = validateLayout;\nexports.compactType = compactType;\nexports.autoBindHandlers = autoBindHandlers;\nexports.noop = exports.fastRGLPropsEqual = void 0;\n\nvar _lodash = _interopRequireDefault(require(\"lodash.isequal\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar isProduction = process.env.NODE_ENV === \"production\";\nvar DEBUG = false;\n/**\n * Return the bottom coordinate of the layout.\n *\n * @param {Array} layout Layout array.\n * @return {Number} Bottom coordinate.\n */\n\nfunction bottom(layout\n/*: Layout*/\n)\n/*: number*/\n{\n var max = 0,\n bottomY;\n\n for (var i = 0, len = layout.length; i < len; i++) {\n bottomY = layout[i].y + layout[i].h;\n if (bottomY > max) max = bottomY;\n }\n\n return max;\n}\n\nfunction cloneLayout(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n var newLayout = Array(layout.length);\n\n for (var i = 0, len = layout.length; i < len; i++) {\n newLayout[i] = cloneLayoutItem(layout[i]);\n }\n\n return newLayout;\n} // Fast path to cloning, since this is monomorphic\n\n\nfunction cloneLayoutItem(layoutItem\n/*: LayoutItem*/\n)\n/*: LayoutItem*/\n{\n return {\n w: layoutItem.w,\n h: layoutItem.h,\n x: layoutItem.x,\n y: layoutItem.y,\n i: layoutItem.i,\n minW: layoutItem.minW,\n maxW: layoutItem.maxW,\n minH: layoutItem.minH,\n maxH: layoutItem.maxH,\n moved: Boolean(layoutItem.moved),\n static: Boolean(layoutItem.static),\n // These can be null/undefined\n isDraggable: layoutItem.isDraggable,\n isResizable: layoutItem.isResizable,\n resizeHandles: layoutItem.resizeHandles,\n isBounded: layoutItem.isBounded\n };\n}\n/**\n * Comparing React `children` is a bit difficult. This is a good way to compare them.\n * This will catch differences in keys, order, and length.\n */\n\n\nfunction childrenEqual(a\n/*: ReactChildren*/\n, b\n/*: ReactChildren*/\n)\n/*: boolean*/\n{\n return (0, _lodash.default)(_react.default.Children.map(a, function (c) {\n return c.key;\n }), _react.default.Children.map(b, function (c) {\n return c.key;\n }));\n}\n/**\n * See `fastRGLPropsEqual.js`.\n * We want this to run as fast as possible - it is called often - and to be\n * resilient to new props that we add. So rather than call lodash.isEqual,\n * which isn't suited to comparing props very well, we use this specialized\n * function in conjunction with preval to generate the fastest possible comparison\n * function, tuned for exactly our props.\n */\n\n/*:: type FastRGLPropsEqual = (Object, Object, Function) => boolean;*/\n\n\nvar fastRGLPropsEqual\n/*: FastRGLPropsEqual*/\n= require(\"./fastRGLPropsEqual\"); // Like the above, but a lot simpler.\n\n\nexports.fastRGLPropsEqual = fastRGLPropsEqual;\n\nfunction fastPositionEqual(a\n/*: Position*/\n, b\n/*: Position*/\n) {\n return a.left === b.left && a.top === b.top && a.width === b.width && a.height === b.height;\n}\n/**\n * Given two layoutitems, check if they collide.\n */\n\n\nfunction collides(l1\n/*: LayoutItem*/\n, l2\n/*: LayoutItem*/\n)\n/*: boolean*/\n{\n if (l1.i === l2.i) return false; // same element\n\n if (l1.x + l1.w <= l2.x) return false; // l1 is left of l2\n\n if (l1.x >= l2.x + l2.w) return false; // l1 is right of l2\n\n if (l1.y + l1.h <= l2.y) return false; // l1 is above l2\n\n if (l1.y >= l2.y + l2.h) return false; // l1 is below l2\n\n return true; // boxes overlap\n}\n/**\n * Given a layout, compact it. This involves going down each y coordinate and removing gaps\n * between items.\n *\n * Does not modify layout items (clones). Creates a new layout array.\n *\n * @param {Array} layout Layout.\n * @param {Boolean} verticalCompact Whether or not to compact the layout\n * vertically.\n * @return {Array} Compacted Layout.\n */\n\n\nfunction compact(layout\n/*: Layout*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n)\n/*: Layout*/\n{\n // Statics go in the compareWith array right away so items flow around them.\n var compareWith = getStatics(layout); // We go through the items by row and column.\n\n var sorted = sortLayoutItems(layout, compactType); // Holding for new items.\n\n var out = Array(layout.length);\n\n for (var i = 0, len = sorted.length; i < len; i++) {\n var l = cloneLayoutItem(sorted[i]); // Don't move static elements\n\n if (!l.static) {\n l = compactItem(compareWith, l, compactType, cols, sorted); // Add to comparison array. We only collide with items before this one.\n // Statics are already in this array.\n\n compareWith.push(l);\n } // Add to output array to make sure they still come out in the right order.\n\n\n out[layout.indexOf(sorted[i])] = l; // Clear moved flag, if it exists.\n\n l.moved = false;\n }\n\n return out;\n}\n\nvar heightWidth = {\n x: \"w\",\n y: \"h\"\n};\n/**\n * Before moving item down, it will check if the movement will cause collisions and move those items down before.\n */\n\nfunction resolveCompactionCollision(layout\n/*: Layout*/\n, item\n/*: LayoutItem*/\n, moveToCoord\n/*: number*/\n, axis\n/*: \"x\" | \"y\"*/\n) {\n var sizeProp = heightWidth[axis];\n item[axis] += 1;\n var itemIndex = layout.map(function (layoutItem) {\n return layoutItem.i;\n }).indexOf(item.i); // Go through each item we collide with.\n\n for (var i = itemIndex + 1; i < layout.length; i++) {\n var otherItem = layout[i]; // Ignore static items\n\n if (otherItem.static) continue; // Optimization: we can break early if we know we're past this el\n // We can do this b/c it's a sorted layout\n\n if (otherItem.y > item.y + item.h) break;\n\n if (collides(item, otherItem)) {\n resolveCompactionCollision(layout, otherItem, moveToCoord + item[sizeProp], axis);\n }\n }\n\n item[axis] = moveToCoord;\n}\n/**\n * Compact an item in the layout.\n *\n * Modifies item.\n *\n */\n\n\nfunction compactItem(compareWith\n/*: Layout*/\n, l\n/*: LayoutItem*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n, fullLayout\n/*: Layout*/\n)\n/*: LayoutItem*/\n{\n var compactV = compactType === \"vertical\";\n var compactH = compactType === \"horizontal\";\n\n if (compactV) {\n // Bottom 'y' possible is the bottom of the layout.\n // This allows you to do nice stuff like specify {y: Infinity}\n // This is here because the layout must be sorted in order to get the correct bottom `y`.\n l.y = Math.min(bottom(compareWith), l.y); // Move the element up as far as it can go without colliding.\n\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n } else if (compactH) {\n l.y = Math.min(bottom(compareWith), l.y); // Move the element left as far as it can go without colliding.\n\n while (l.x > 0 && !getFirstCollision(compareWith, l)) {\n l.x--;\n }\n } // Move it down, and keep moving it down if it's colliding.\n\n\n var collides;\n\n while (collides = getFirstCollision(compareWith, l)) {\n if (compactH) {\n resolveCompactionCollision(fullLayout, l, collides.x + collides.w, \"x\");\n } else {\n resolveCompactionCollision(fullLayout, l, collides.y + collides.h, \"y\");\n } // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n\n\n if (compactH && l.x + l.w > cols) {\n l.x = cols - l.w;\n l.y++;\n }\n }\n\n return l;\n}\n/**\n * Given a layout, make sure all elements fit within its bounds.\n *\n * Modifies layout items.\n *\n * @param {Array} layout Layout array.\n * @param {Number} bounds Number of columns.\n */\n\n\nfunction correctBounds(layout\n/*: Layout*/\n, bounds\n/*: { cols: number }*/\n)\n/*: Layout*/\n{\n var collidesWith = getStatics(layout);\n\n for (var i = 0, len = layout.length; i < len; i++) {\n var l = layout[i]; // Overflows right\n\n if (l.x + l.w > bounds.cols) l.x = bounds.cols - l.w; // Overflows left\n\n if (l.x < 0) {\n l.x = 0;\n l.w = bounds.cols;\n }\n\n if (!l.static) collidesWith.push(l);else {\n // If this is static and collides with other statics, we must move it down.\n // We have to do something nicer than just letting them overlap.\n while (getFirstCollision(collidesWith, l)) {\n l.y++;\n }\n }\n }\n\n return layout;\n}\n/**\n * Get a layout item by ID. Used so we can override later on if necessary.\n *\n * @param {Array} layout Layout array.\n * @param {String} id ID\n * @return {LayoutItem} Item at ID.\n */\n\n\nfunction getLayoutItem(layout\n/*: Layout*/\n, id\n/*: string*/\n)\n/*: ?LayoutItem*/\n{\n for (var i = 0, len = layout.length; i < len; i++) {\n if (layout[i].i === id) return layout[i];\n }\n}\n/**\n * Returns the first item this layout collides with.\n * It doesn't appear to matter which order we approach this from, although\n * perhaps that is the wrong thing to do.\n *\n * @param {Object} layoutItem Layout item.\n * @return {Object|undefined} A colliding layout item, or undefined.\n */\n\n\nfunction getFirstCollision(layout\n/*: Layout*/\n, layoutItem\n/*: LayoutItem*/\n)\n/*: ?LayoutItem*/\n{\n for (var i = 0, len = layout.length; i < len; i++) {\n if (collides(layout[i], layoutItem)) return layout[i];\n }\n}\n\nfunction getAllCollisions(layout\n/*: Layout*/\n, layoutItem\n/*: LayoutItem*/\n)\n/*: Array<LayoutItem>*/\n{\n return layout.filter(function (l) {\n return collides(l, layoutItem);\n });\n}\n/**\n * Get all static elements.\n * @param {Array} layout Array of layout objects.\n * @return {Array} Array of static layout items..\n */\n\n\nfunction getStatics(layout\n/*: Layout*/\n)\n/*: Array<LayoutItem>*/\n{\n return layout.filter(function (l) {\n return l.static;\n });\n}\n/**\n * Move an element. Responsible for doing cascading movements of other elements.\n *\n * Modifies layout items.\n *\n * @param {Array} layout Full layout to modify.\n * @param {LayoutItem} l element to move.\n * @param {Number} [x] X position in grid units.\n * @param {Number} [y] Y position in grid units.\n */\n\n\nfunction moveElement(layout\n/*: Layout*/\n, l\n/*: LayoutItem*/\n, x\n/*: ?number*/\n, y\n/*: ?number*/\n, isUserAction\n/*: ?boolean*/\n, preventCollision\n/*: ?boolean*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n)\n/*: Layout*/\n{\n // If this is static and not explicitly enabled as draggable,\n // no move is possible, so we can short-circuit this immediately.\n if (l.static && l.isDraggable !== true) return layout; // Short-circuit if nothing to do.\n\n if (l.y === y && l.x === x) return layout;\n log(\"Moving element \".concat(l.i, \" to [\").concat(String(x), \",\").concat(String(y), \"] from [\").concat(l.x, \",\").concat(l.y, \"]\"));\n var oldX = l.x;\n var oldY = l.y; // This is quite a bit faster than extending the object\n\n if (typeof x === \"number\") l.x = x;\n if (typeof y === \"number\") l.y = y;\n l.moved = true; // If this collides with anything, move it.\n // When doing this comparison, we have to sort the items we compare with\n // to ensure, in the case of multiple collisions, that we're getting the\n // nearest collision.\n\n var sorted = sortLayoutItems(layout, compactType);\n var movingUp = compactType === \"vertical\" && typeof y === \"number\" ? oldY >= y : compactType === \"horizontal\" && typeof x === \"number\" ? oldX >= x : false; // $FlowIgnore acceptable modification of read-only array as it was recently cloned\n\n if (movingUp) sorted = sorted.reverse();\n var collisions = getAllCollisions(sorted, l); // There was a collision; abort\n\n if (preventCollision && collisions.length) {\n log(\"Collision prevented on \".concat(l.i, \", reverting.\"));\n l.x = oldX;\n l.y = oldY;\n l.moved = false;\n return layout;\n } // Move each item that collides away from this element.\n\n\n for (var i = 0, len = collisions.length; i < len; i++) {\n var collision = collisions[i];\n log(\"Resolving collision between \".concat(l.i, \" at [\").concat(l.x, \",\").concat(l.y, \"] and \").concat(collision.i, \" at [\").concat(collision.x, \",\").concat(collision.y, \"]\")); // Short circuit so we can't infinite loop\n\n if (collision.moved) continue; // Don't move static items - we have to move *this* element away\n\n if (collision.static) {\n layout = moveElementAwayFromCollision(layout, collision, l, isUserAction, compactType, cols);\n } else {\n layout = moveElementAwayFromCollision(layout, l, collision, isUserAction, compactType, cols);\n }\n }\n\n return layout;\n}\n/**\n * This is where the magic needs to happen - given a collision, move an element away from the collision.\n * We attempt to move it up if there's room, otherwise it goes below.\n *\n * @param {Array} layout Full layout to modify.\n * @param {LayoutItem} collidesWith Layout item we're colliding with.\n * @param {LayoutItem} itemToMove Layout item we're moving.\n */\n\n\nfunction moveElementAwayFromCollision(layout\n/*: Layout*/\n, collidesWith\n/*: LayoutItem*/\n, itemToMove\n/*: LayoutItem*/\n, isUserAction\n/*: ?boolean*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n)\n/*: Layout*/\n{\n var compactH = compactType === \"horizontal\"; // Compact vertically if not set to horizontal\n\n var compactV = compactType !== \"horizontal\";\n var preventCollision = collidesWith.static; // we're already colliding (not for static items)\n // If there is enough space above the collision to put this element, move it there.\n // We only do this on the main collision as this can get funky in cascades and cause\n // unwanted swapping behavior.\n\n if (isUserAction) {\n // Reset isUserAction flag because we're not in the main collision anymore.\n isUserAction = false; // Make a mock item so we don't modify the item here, only modify in moveElement.\n\n var fakeItem\n /*: LayoutItem*/\n = {\n x: compactH ? Math.max(collidesWith.x - itemToMove.w, 0) : itemToMove.x,\n y: compactV ? Math.max(collidesWith.y - itemToMove.h, 0) : itemToMove.y,\n w: itemToMove.w,\n h: itemToMove.h,\n i: \"-1\"\n }; // No collision? If so, we can go up there; otherwise, we'll end up moving down as normal\n\n if (!getFirstCollision(layout, fakeItem)) {\n log(\"Doing reverse collision on \".concat(itemToMove.i, \" up to [\").concat(fakeItem.x, \",\").concat(fakeItem.y, \"].\"));\n return moveElement(layout, itemToMove, compactH ? fakeItem.x : undefined, compactV ? fakeItem.y : undefined, isUserAction, preventCollision, compactType, cols);\n }\n }\n\n return moveElement(layout, itemToMove, compactH ? itemToMove.x + 1 : undefined, compactV ? itemToMove.y + 1 : undefined, isUserAction, preventCollision, compactType, cols);\n}\n/**\n * Helper to convert a number to a percentage string.\n *\n * @param {Number} num Any number\n * @return {String} That number as a percentage.\n */\n\n\nfunction perc(num\n/*: number*/\n)\n/*: string*/\n{\n return num * 100 + \"%\";\n}\n\nfunction setTransform(_ref)\n/*: Object*/\n{\n var top = _ref.top,\n left = _ref.left,\n width = _ref.width,\n height = _ref.height;\n // Replace unitless items with px\n var translate = \"translate(\".concat(left, \"px,\").concat(top, \"px)\");\n return {\n transform: translate,\n WebkitTransform: translate,\n MozTransform: translate,\n msTransform: translate,\n OTransform: translate,\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\"),\n position: \"absolute\"\n };\n}\n\nfunction setTopLeft(_ref2)\n/*: Object*/\n{\n var top = _ref2.top,\n left = _ref2.left,\n width = _ref2.width,\n height = _ref2.height;\n return {\n top: \"\".concat(top, \"px\"),\n left: \"\".concat(left, \"px\"),\n width: \"\".concat(width, \"px\"),\n height: \"\".concat(height, \"px\"),\n position: \"absolute\"\n };\n}\n/**\n * Get layout items sorted from top left to right and down.\n *\n * @return {Array} Array of layout objects.\n * @return {Array} Layout, sorted static items first.\n */\n\n\nfunction sortLayoutItems(layout\n/*: Layout*/\n, compactType\n/*: CompactType*/\n)\n/*: Layout*/\n{\n if (compactType === \"horizontal\") return sortLayoutItemsByColRow(layout);else return sortLayoutItemsByRowCol(layout);\n}\n/**\n * Sort layout items by row ascending and column ascending.\n *\n * Does not modify Layout.\n */\n\n\nfunction sortLayoutItemsByRowCol(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n // Slice to clone array as sort modifies\n return layout.slice(0).sort(function (a, b) {\n if (a.y > b.y || a.y === b.y && a.x > b.x) {\n return 1;\n } else if (a.y === b.y && a.x === b.x) {\n // Without this, we can get different sort results in IE vs. Chrome/FF\n return 0;\n }\n\n return -1;\n });\n}\n/**\n * Sort layout items by column ascending then row ascending.\n *\n * Does not modify Layout.\n */\n\n\nfunction sortLayoutItemsByColRow(layout\n/*: Layout*/\n)\n/*: Layout*/\n{\n return layout.slice(0).sort(function (a, b) {\n if (a.x > b.x || a.x === b.x && a.y > b.y) {\n return 1;\n }\n\n return -1;\n });\n}\n/**\n * Generate a layout using the initialLayout and children as a template.\n * Missing entries will be added, extraneous ones will be truncated.\n *\n * Does not modify initialLayout.\n *\n * @param {Array} initialLayout Layout passed in through props.\n * @param {String} breakpoint Current responsive breakpoint.\n * @param {?String} compact Compaction option.\n * @return {Array} Working layout.\n */\n\n\nfunction synchronizeLayoutWithChildren(initialLayout\n/*: Layout*/\n, children\n/*: ReactChildren*/\n, cols\n/*: number*/\n, compactType\n/*: CompactType*/\n)\n/*: Layout*/\n{\n initialLayout = initialLayout || []; // Generate one layout item per child.\n\n var layout\n /*: LayoutItem[]*/\n = [];\n\n _react.default.Children.forEach(children, function (child\n /*: ReactElement<any>*/\n , i\n /*: number*/\n ) {\n // Don't overwrite if it already exists.\n var exists = getLayoutItem(initialLayout, String(child.key));\n\n if (exists) {\n layout[i] = cloneLayoutItem(exists);\n } else {\n if (!isProduction && child.props._grid) {\n console.warn(\"`_grid` properties on children have been deprecated as of React 15.2. \" + // eslint-disable-line\n \"Please use `data-grid` or add your properties directly to the `layout`.\");\n }\n\n var g = child.props[\"data-grid\"] || child.props._grid; // Hey, this item has a data-grid property, use it.\n\n if (g) {\n if (!isProduction) {\n validateLayout([g], \"ReactGridLayout.children\");\n }\n\n layout[i] = cloneLayoutItem(_objectSpread(_objectSpread({}, g), {}, {\n i: child.key\n }));\n } else {\n // Nothing provided: ensure this is added to the bottom\n layout[i] = cloneLayoutItem({\n w: 1,\n h: 1,\n x: 0,\n y: bottom(layout),\n i: String(child.key)\n });\n }\n }\n }); // Correct the layout.\n\n\n var correctedLayout = correctBounds(layout, {\n cols: cols\n });\n return compact(correctedLayout, compactType, cols);\n}\n/**\n * Validate a layout. Throws errors.\n *\n * @param {Array} layout Array of layout items.\n * @param {String} [contextName] Context name for errors.\n * @throw {Error} Validation error.\n */\n\n\nfunction validateLayout(layout\n/*: Layout*/\n)\n/*: void*/\n{\n var contextName\n /*: string*/\n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"Layout\";\n var subProps = [\"x\", \"y\", \"w\", \"h\"];\n if (!Array.isArray(layout)) throw new Error(contextName + \" must be an array!\");\n\n for (var i = 0, len = layout.length; i < len; i++) {\n var item = layout[i];\n\n for (var j = 0; j < subProps.length; j++) {\n if (typeof item[subProps[j]] !== \"number\") {\n throw new Error(\"ReactGridLayout: \" + contextName + \"[\" + i + \"].\" + subProps[j] + \" must be a number!\");\n }\n }\n\n if (item.i && typeof item.i !== \"string\") {\n throw new Error(\"ReactGridLayout: \" + contextName + \"[\" + i + \"].i must be a string!\");\n }\n\n if (item.static !== undefined && typeof item.static !== \"boolean\") {\n throw new Error(\"ReactGridLayout: \" + contextName + \"[\" + i + \"].static must be a boolean!\");\n }\n }\n} // Legacy support for verticalCompact: false\n\n\nfunction compactType(props\n/*: ?{ verticalCompact: boolean, compactType: CompactType }*/\n)\n/*: CompactType*/\n{\n var _ref3 = props || {},\n verticalCompact = _ref3.verticalCompact,\n compactType = _ref3.compactType;\n\n return verticalCompact === false ? null : compactType;\n} // Flow can't really figure this out, so we just use Object\n\n\nfunction autoBindHandlers(el\n/*: Object*/\n, fns\n/*: Array<string>*/\n)\n/*: void*/\n{\n fns.forEach(function (key) {\n return el[key] = el[key].bind(el);\n });\n}\n\nfunction log() {\n var _console;\n\n if (!DEBUG) return; // eslint-disable-next-line no-console\n\n (_console = console).log.apply(_console, arguments);\n}\n\nvar noop = function noop() {};\n\nexports.noop = noop;","'use strict';\n\n\nmodule.exports = {\n copy: copy,\n checkDataType: checkDataType,\n checkDataTypes: checkDataTypes,\n coerceToTypes: coerceToTypes,\n toHash: toHash,\n getProperty: getProperty,\n escapeQuotes: escapeQuotes,\n equal: require('fast-deep-equal'),\n ucs2length: require('./ucs2length'),\n varOccurences: varOccurences,\n varReplace: varReplace,\n cleanUpCode: cleanUpCode,\n finalCleanUpCode: finalCleanUpCode,\n schemaHasRules: schemaHasRules,\n schemaHasRulesExcept: schemaHasRulesExcept,\n schemaUnknownRules: schemaUnknownRules,\n toQuotedString: toQuotedString,\n getPathExpr: getPathExpr,\n getPath: getPath,\n getData: getData,\n unescapeFragment: unescapeFragment,\n unescapeJsonPointer: unescapeJsonPointer,\n escapeFragment: escapeFragment,\n escapeJsonPointer: escapeJsonPointer\n};\n\n\nfunction copy(o, to) {\n to = to || {};\n for (var key in o) to[key] = o[key];\n return to;\n}\n\n\nfunction checkDataType(dataType, data, negate) {\n var EQUAL = negate ? ' !== ' : ' === '\n , AND = negate ? ' || ' : ' && '\n , OK = negate ? '!' : ''\n , NOT = negate ? '' : '!';\n switch (dataType) {\n case 'null': return data + EQUAL + 'null';\n case 'array': return OK + 'Array.isArray(' + data + ')';\n case 'object': return '(' + OK + data + AND +\n 'typeof ' + data + EQUAL + '\"object\"' + AND +\n NOT + 'Array.isArray(' + data + '))';\n case 'integer': return '(typeof ' + data + EQUAL + '\"number\"' + AND +\n NOT + '(' + data + ' % 1)' +\n AND + data + EQUAL + data + ')';\n default: return 'typeof ' + data + EQUAL + '\"' + dataType + '\"';\n }\n}\n\n\nfunction checkDataTypes(dataTypes, data) {\n switch (dataTypes.length) {\n case 1: return checkDataType(dataTypes[0], data, true);\n default:\n var code = '';\n var types = toHash(dataTypes);\n if (types.array && types.object) {\n code = types.null ? '(': '(!' + data + ' || ';\n code += 'typeof ' + data + ' !== \"object\")';\n delete types.null;\n delete types.array;\n delete types.object;\n }\n if (types.number) delete types.integer;\n for (var t in types)\n code += (code ? ' && ' : '' ) + checkDataType(t, data, true);\n\n return code;\n }\n}\n\n\nvar COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);\nfunction coerceToTypes(optionCoerceTypes, dataTypes) {\n if (Array.isArray(dataTypes)) {\n var types = [];\n for (var i=0; i<dataTypes.length; i++) {\n var t = dataTypes[i];\n if (COERCE_TO_TYPES[t]) types[types.length] = t;\n else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;\n }\n if (types.length) return types;\n } else if (COERCE_TO_TYPES[dataTypes]) {\n return [dataTypes];\n } else if (optionCoerceTypes === 'array' && dataTypes === 'array') {\n return ['array'];\n }\n}\n\n\nfunction toHash(arr) {\n var hash = {};\n for (var i=0; i<arr.length; i++) hash[arr[i]] = true;\n return hash;\n}\n\n\nvar IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\nvar SINGLE_QUOTE = /'|\\\\/g;\nfunction getProperty(key) {\n return typeof key == 'number'\n ? '[' + key + ']'\n : IDENTIFIER.test(key)\n ? '.' + key\n : \"['\" + escapeQuotes(key) + \"']\";\n}\n\n\nfunction escapeQuotes(str) {\n return str.replace(SINGLE_QUOTE, '\\\\$&')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/\\f/g, '\\\\f')\n .replace(/\\t/g, '\\\\t');\n}\n\n\nfunction varOccurences(str, dataVar) {\n dataVar += '[^0-9]';\n var matches = str.match(new RegExp(dataVar, 'g'));\n return matches ? matches.length : 0;\n}\n\n\nfunction varReplace(str, dataVar, expr) {\n dataVar += '([^0-9])';\n expr = expr.replace(/\\$/g, '$$$$');\n return str.replace(new RegExp(dataVar, 'g'), expr + '$1');\n}\n\n\nvar EMPTY_ELSE = /else\\s*{\\s*}/g\n , EMPTY_IF_NO_ELSE = /if\\s*\\([^)]+\\)\\s*\\{\\s*\\}(?!\\s*else)/g\n , EMPTY_IF_WITH_ELSE = /if\\s*\\(([^)]+)\\)\\s*\\{\\s*\\}\\s*else(?!\\s*if)/g;\nfunction cleanUpCode(out) {\n return out.replace(EMPTY_ELSE, '')\n .replace(EMPTY_IF_NO_ELSE, '')\n .replace(EMPTY_IF_WITH_ELSE, 'if (!($1))');\n}\n\n\nvar ERRORS_REGEXP = /[^v.]errors/g\n , REMOVE_ERRORS = /var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g\n , REMOVE_ERRORS_ASYNC = /var errors = 0;|var vErrors = null;/g\n , RETURN_VALID = 'return errors === 0;'\n , RETURN_TRUE = 'validate.errors = null; return true;'\n , RETURN_ASYNC = /if \\(errors === 0\\) return data;\\s*else throw new ValidationError\\(vErrors\\);/\n , RETURN_DATA_ASYNC = 'return data;'\n , ROOTDATA_REGEXP = /[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g\n , REMOVE_ROOTDATA = /if \\(rootData === undefined\\) rootData = data;/;\n\nfunction finalCleanUpCode(out, async) {\n var matches = out.match(ERRORS_REGEXP);\n if (matches && matches.length == 2) {\n out = async\n ? out.replace(REMOVE_ERRORS_ASYNC, '')\n .replace(RETURN_ASYNC, RETURN_DATA_ASYNC)\n : out.replace(REMOVE_ERRORS, '')\n .replace(RETURN_VALID, RETURN_TRUE);\n }\n\n matches = out.match(ROOTDATA_REGEXP);\n if (!matches || matches.length !== 3) return out;\n return out.replace(REMOVE_ROOTDATA, '');\n}\n\n\nfunction schemaHasRules(schema, rules) {\n if (typeof schema == 'boolean') return !schema;\n for (var key in schema) if (rules[key]) return true;\n}\n\n\nfunction schemaHasRulesExcept(schema, rules, exceptKeyword) {\n if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';\n for (var key in schema) if (key != exceptKeyword && rules[key]) return true;\n}\n\n\nfunction schemaUnknownRules(schema, rules) {\n if (typeof schema == 'boolean') return;\n for (var key in schema) if (!rules[key]) return key;\n}\n\n\nfunction toQuotedString(str) {\n return '\\'' + escapeQuotes(str) + '\\'';\n}\n\n\nfunction getPathExpr(currentPath, expr, jsonPointers, isNumber) {\n var path = jsonPointers // false by default\n ? '\\'/\\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \\'~0\\').replace(/\\\\//g, \\'~1\\')')\n : (isNumber ? '\\'[\\' + ' + expr + ' + \\']\\'' : '\\'[\\\\\\'\\' + ' + expr + ' + \\'\\\\\\']\\'');\n return joinPaths(currentPath, path);\n}\n\n\nfunction getPath(currentPath, prop, jsonPointers) {\n var path = jsonPointers // false by default\n ? toQuotedString('/' + escapeJsonPointer(prop))\n : toQuotedString(getProperty(prop));\n return joinPaths(currentPath, path);\n}\n\n\nvar JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\nvar RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\nfunction getData($data, lvl, paths) {\n var up, jsonPointer, data, matches;\n if ($data === '') return 'rootData';\n if ($data[0] == '/') {\n if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);\n jsonPointer = $data;\n data = 'rootData';\n } else {\n matches = $data.match(RELATIVE_JSON_POINTER);\n if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);\n up = +matches[1];\n jsonPointer = matches[2];\n if (jsonPointer == '#') {\n if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);\n return paths[lvl - up];\n }\n\n if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);\n data = 'data' + ((lvl - up) || '');\n if (!jsonPointer) return data;\n }\n\n var expr = data;\n var segments = jsonPointer.split('/');\n for (var i=0; i<segments.length; i++) {\n var segment = segments[i];\n if (segment) {\n data += getProperty(unescapeJsonPointer(segment));\n expr += ' && ' + data;\n }\n }\n return expr;\n}\n\n\nfunction joinPaths (a, b) {\n if (a == '\"\"') return b;\n return (a + ' + ' + b).replace(/' \\+ '/g, '');\n}\n\n\nfunction unescapeFragment(str) {\n return unescapeJsonPointer(decodeURIComponent(str));\n}\n\n\nfunction escapeFragment(str) {\n return encodeURIComponent(escapeJsonPointer(str));\n}\n\n\nfunction escapeJsonPointer(str) {\n return str.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n\n\nfunction unescapeJsonPointer(str) {\n return str.replace(/~1/g, '/').replace(/~0/g, '~');\n}\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(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\nmodule.exports = _typeof;","// Simple file alias mechanisms for tests.\n\nlet pathPrefix = '';\nconst fileAliases: {[aliasPath: string]: string} = {};\n\n/*\n * Set a relative path prefix\n */\nexport function setPathPrefix(prefix: string): void {\n pathPrefix = prefix;\n}\n\n/*\n * Get the relative path prefix\n */\nexport function getPathPrefix(): string {\n return pathPrefix;\n}\n\n/**\n *\n * @param aliases\n *\n * Note: addAliases are an experimental export, they are only for testing of loaders.gl loaders\n * not intended as a generic aliasing mechanism\n */\nexport function addAliases(aliases: {[aliasPath: string]: string}): void {\n Object.assign(fileAliases, aliases);\n}\n\n/**\n * Resolves aliases and adds path-prefix to paths\n */\nexport function resolvePath(filename: string): string {\n for (const alias in fileAliases) {\n if (filename.startsWith(alias)) {\n const replacement = fileAliases[alias];\n filename = filename.replace(alias, replacement);\n }\n }\n if (!filename.startsWith('http://') && !filename.startsWith('https://')) {\n filename = `${pathPrefix}${filename}`;\n }\n return filename;\n}\n","/* globals __webpack_amd_options__ */\nmodule.exports = __webpack_amd_options__;\n","var global = require('./_global');\nvar core = require('./_core');\nvar ctx = require('./_ctx');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var IS_WRAP = type & $export.W;\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE];\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];\n var key, own, out;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n if (own && has(exports, key)) continue;\n // export native or passed\n out = own ? target[key] : source[key];\n // prevent global pollution for namespaces\n exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]\n // bind timers to global for call from export context\n : IS_BIND && own ? ctx(out, global)\n // wrap global constructors for prevent change them in library\n : IS_WRAP && target[key] == out ? (function (C) {\n var F = function (a, b, c) {\n if (this instanceof C) {\n switch (arguments.length) {\n case 0: return new C();\n case 1: return new C(a);\n case 2: return new C(a, b);\n } return new C(a, b, c);\n } return C.apply(this, arguments);\n };\n F[PROTOTYPE] = C[PROTOTYPE];\n return F;\n // make static versions for prototype methods\n })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%\n if (IS_PROTO) {\n (exports.virtual || (exports.virtual = {}))[key] = out;\n // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%\n if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);\n }\n }\n};\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar meta_1 = require(\"@turf/meta\");\n/**\n * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(geojson) {\n var result = [Infinity, Infinity, -Infinity, -Infinity];\n meta_1.coordEach(geojson, function (coord) {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\nexports.default = bbox;\n","const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst createToken = (name, value, isGlobal) => {\n const index = R++\n debug(index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '[0-9]+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*')\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+')\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCE', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\.0\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\.0\\.0-0\\\\s*$')\n","const {MAX_LENGTH} = require('../internal/constants')\nconst { re, t } = require('../internal/re')\nconst SemVer = require('../classes/semver')\n\nconst parseOptions = require('../internal/parse-options')\nconst parse = (version, options) => {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n const r = options.loose ? re[t.LOOSE] : re[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nmodule.exports = parse\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { polygon } from \"@turf/helpers\";\n/**\n * Takes a bbox and returns an equivalent {@link Polygon|polygon}.\n *\n * @name bboxPolygon\n * @param {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @param {Object} [options={}] Optional parameters\n * @param {Properties} [options.properties={}] Translate properties to Polygon\n * @param {string|number} [options.id={}] Translate Id to Polygon\n * @returns {Feature<Polygon>} a Polygon representation of the bounding box\n * @example\n * var bbox = [0, 0, 10, 10];\n *\n * var poly = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [poly]\n */\nexport default function bboxPolygon(bbox, options) {\n if (options === void 0) { options = {}; }\n // Convert BBox positions to Numbers\n // No performance loss for including Number()\n // https://github.com/Turfjs/turf/issues/1119\n var west = Number(bbox[0]);\n var south = Number(bbox[1]);\n var east = Number(bbox[2]);\n var north = Number(bbox[3]);\n if (bbox.length === 6) {\n throw new Error(\"@turf/bbox-polygon does not support BBox with 6 positions\");\n }\n var lowLeft = [west, south];\n var topLeft = [west, north];\n var topRight = [east, north];\n var lowRight = [east, south];\n return polygon([[lowLeft, lowRight, topRight, topLeft, lowLeft]], options.properties, { bbox: bbox, id: options.id });\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// View and Projection Matrix calculations for mapbox-js style\n// map view properties\nimport Viewport from './viewport';\n\nimport {\n pixelsToWorld,\n getViewMatrix,\n addMetersToLngLat,\n getProjectionParameters,\n altitudeToFovy,\n fovyToAltitude,\n fitBounds,\n getBounds\n} from '@math.gl/web-mercator';\n\n// TODO - import from math.gl\nimport * as vec2 from 'gl-matrix/vec2';\nimport {Matrix4} from 'math.gl';\n\nconst TILE_SIZE = 512;\nconst EARTH_CIRCUMFERENCE = 40.03e6;\nconst DEGREES_TO_RADIANS = Math.PI / 180;\n\nfunction unitsPerMeter(latitude) {\n const latCosine = Math.cos(latitude * DEGREES_TO_RADIANS);\n return TILE_SIZE / EARTH_CIRCUMFERENCE / latCosine;\n}\n\nexport default class WebMercatorViewport extends Viewport {\n /**\n * @classdesc\n * Creates view/projection matrices from mercator params\n * Note: The Viewport is immutable in the sense that it only has accessors.\n * A new viewport instance should be created if any parameters have changed.\n */\n /* eslint-disable complexity, max-statements */\n constructor(opts = {}) {\n const {\n latitude = 0,\n longitude = 0,\n zoom = 11,\n pitch = 0,\n bearing = 0,\n nearZMultiplier = 0.1,\n farZMultiplier = 1.01,\n orthographic = false,\n projectionMatrix,\n\n repeat = false,\n worldOffset = 0,\n\n // backward compatibility\n // TODO: remove in v9\n legacyMeterSizes = false\n } = opts;\n\n let {width, height, altitude = 1.5} = opts;\n const scale = Math.pow(2, zoom);\n\n // Silently allow apps to send in 0,0 to facilitate isomorphic render etc\n width = width || 1;\n height = height || 1;\n\n let fovy;\n let projectionParameters = null;\n if (projectionMatrix) {\n altitude = projectionMatrix[5] / 2;\n fovy = altitudeToFovy(altitude);\n } else {\n if (opts.fovy) {\n fovy = opts.fovy;\n altitude = fovyToAltitude(fovy);\n } else {\n fovy = altitudeToFovy(altitude);\n }\n projectionParameters = getProjectionParameters({\n width,\n height,\n pitch,\n fovy,\n nearZMultiplier,\n farZMultiplier\n });\n }\n\n // The uncentered matrix allows us two move the center addition to the\n // shader (cheap) which gives a coordinate system that has its center in\n // the layer's center position. This makes rotations and other modelMatrx\n // transforms much more useful.\n let viewMatrixUncentered = getViewMatrix({\n height,\n pitch,\n bearing,\n scale,\n altitude\n });\n\n if (worldOffset) {\n const viewOffset = new Matrix4().translate([512 * worldOffset, 0, 0]);\n viewMatrixUncentered = viewOffset.multiplyLeft(viewMatrixUncentered);\n }\n\n super({\n ...opts,\n // x, y,\n width,\n height,\n\n // view matrix\n viewMatrix: viewMatrixUncentered,\n longitude,\n latitude,\n zoom,\n\n // projection matrix parameters\n ...projectionParameters,\n fovy,\n focalDistance: altitude\n });\n\n // Save parameters\n this.latitude = latitude;\n this.longitude = longitude;\n this.zoom = zoom;\n this.pitch = pitch;\n this.bearing = bearing;\n this.altitude = altitude;\n this.fovy = fovy;\n\n this.orthographic = orthographic;\n\n this._subViewports = repeat ? [] : null;\n this._pseudoMeters = legacyMeterSizes;\n\n Object.freeze(this);\n }\n /* eslint-enable complexity, max-statements */\n\n get subViewports() {\n if (this._subViewports && !this._subViewports.length) {\n // Cache sub viewports so that we only calculate them once\n const bounds = this.getBounds();\n\n const minOffset = Math.floor((bounds[0] + 180) / 360);\n const maxOffset = Math.ceil((bounds[2] - 180) / 360);\n\n for (let x = minOffset; x <= maxOffset; x++) {\n const offsetViewport = x\n ? new WebMercatorViewport({\n ...this,\n worldOffset: x\n })\n : this;\n this._subViewports.push(offsetViewport);\n }\n }\n return this._subViewports;\n }\n\n projectPosition(xyz) {\n if (this._pseudoMeters) {\n // Backward compatibility\n return super.projectPosition(xyz);\n }\n const [X, Y] = this.projectFlat(xyz);\n const Z = (xyz[2] || 0) * unitsPerMeter(xyz[1]);\n return [X, Y, Z];\n }\n\n unprojectPosition(xyz) {\n if (this._pseudoMeters) {\n // Backward compatibility\n return super.unprojectPosition(xyz);\n }\n const [X, Y] = this.unprojectFlat(xyz);\n const Z = (xyz[2] || 0) / unitsPerMeter(Y);\n return [X, Y, Z];\n }\n\n /**\n * Add a meter delta to a base lnglat coordinate, returning a new lnglat array\n *\n * Note: Uses simple linear approximation around the viewport center\n * Error increases with size of offset (roughly 1% per 100km)\n *\n * @param {[Number,Number]|[Number,Number,Number]) lngLatZ - base coordinate\n * @param {[Number,Number]|[Number,Number,Number]) xyz - array of meter deltas\n * @return {[Number,Number]|[Number,Number,Number]) array of [lng,lat,z] deltas\n */\n addMetersToLngLat(lngLatZ, xyz) {\n return addMetersToLngLat(lngLatZ, xyz);\n }\n\n panByPosition(coords, pixel) {\n const fromLocation = pixelsToWorld(pixel, this.pixelUnprojectionMatrix);\n const toLocation = this.projectFlat(coords);\n\n const translate = vec2.add([], toLocation, vec2.negate([], fromLocation));\n const newCenter = vec2.add([], this.center, translate);\n\n const [longitude, latitude] = this.unprojectFlat(newCenter);\n return {longitude, latitude};\n }\n\n getBounds(options = {}) {\n const corners = getBounds(this, options.z || 0);\n\n return [\n Math.min(corners[0][0], corners[1][0], corners[2][0], corners[3][0]),\n Math.min(corners[0][1], corners[1][1], corners[2][1], corners[3][1]),\n Math.max(corners[0][0], corners[1][0], corners[2][0], corners[3][0]),\n Math.max(corners[0][1], corners[1][1], corners[2][1], corners[3][1])\n ];\n }\n\n /**\n * Returns a new viewport that fit around the given rectangle.\n * Only supports non-perspective mode.\n * @param {Array} bounds - [[lon, lat], [lon, lat]]\n * @param {Number} [options.padding] - The amount of padding in pixels to add to the given bounds.\n * @param {Array} [options.offset] - The center of the given bounds relative to the map's center,\n * [x, y] measured in pixels.\n * @returns {WebMercatorViewport}\n */\n fitBounds(bounds, options = {}) {\n const {width, height} = this;\n const {longitude, latitude, zoom} = fitBounds({width, height, bounds, ...options});\n return new WebMercatorViewport({width, height, longitude, latitude, zoom});\n }\n}\n\nWebMercatorViewport.displayName = 'WebMercatorViewport';\n","import {clamp} from 'math.gl';\nimport Controller from './controller';\nimport ViewState from './view-state';\nimport {mod} from '../utils/math-utils';\n\nconst DEFAULT_STATE = {\n rotationX: 0,\n rotationOrbit: 0,\n zoom: 0,\n target: [0, 0, 0],\n minRotationX: -90,\n maxRotationX: 90,\n minZoom: -Infinity,\n maxZoom: Infinity\n};\n\n/* Helpers */\n\nexport class OrbitState extends ViewState {\n constructor({\n makeViewport,\n\n /* Viewport arguments */\n width, // Width of viewport\n height, // Height of viewport\n rotationX = DEFAULT_STATE.rotationX, // Rotation around x axis\n rotationOrbit = DEFAULT_STATE.rotationOrbit, // Rotation around orbit axis\n target = DEFAULT_STATE.target,\n zoom = DEFAULT_STATE.zoom,\n\n /* Viewport constraints */\n minRotationX = DEFAULT_STATE.minRotationX,\n maxRotationX = DEFAULT_STATE.maxRotationX,\n minZoom = DEFAULT_STATE.minZoom,\n maxZoom = DEFAULT_STATE.maxZoom,\n\n /** Interaction states, required to calculate change during transform */\n // Model state when the pan operation first started\n startPanPosition,\n // Model state when the rotate operation first started\n startRotatePos,\n startRotationX,\n startRotationOrbit,\n // Model state when the zoom operation first started\n startZoomPosition,\n startZoom\n }) {\n super({\n width,\n height,\n rotationX,\n rotationOrbit,\n target,\n zoom,\n minRotationX,\n maxRotationX,\n minZoom,\n maxZoom\n });\n\n this._state = {\n startPanPosition,\n startRotatePos,\n startRotationX,\n startRotationOrbit,\n startZoomPosition,\n startZoom\n };\n\n this.makeViewport = makeViewport;\n }\n\n /**\n * Start panning\n * @param {[Number, Number]} pos - position on screen where the pointer grabs\n */\n panStart({pos}) {\n return this._getUpdatedState({\n startPanPosition: this._unproject(pos)\n });\n }\n\n /**\n * Pan\n * @param {[Number, Number]} pos - position on screen where the pointer is\n */\n pan({pos, startPosition}) {\n const startPanPosition = this._state.startPanPosition || startPosition;\n\n if (!startPanPosition) {\n return this;\n }\n\n const viewport = this.makeViewport(this._viewportProps);\n const newProps = viewport.panByPosition(startPanPosition, pos);\n\n return this._getUpdatedState(newProps);\n }\n\n /**\n * End panning\n * Must call if `panStart()` was called\n */\n panEnd() {\n return this._getUpdatedState({\n startPanPosition: null\n });\n }\n\n /**\n * Start rotating\n * @param {[Number, Number]} pos - position on screen where the pointer grabs\n */\n rotateStart({pos}) {\n return this._getUpdatedState({\n startRotatePos: pos,\n startRotationX: this._viewportProps.rotationX,\n startRotationOrbit: this._viewportProps.rotationOrbit\n });\n }\n\n /**\n * Rotate\n * @param {[Number, Number]} pos - position on screen where the pointer is\n */\n rotate({pos, deltaAngleX = 0, deltaAngleY = 0}) {\n const {startRotatePos, startRotationX, startRotationOrbit} = this._state;\n const {width, height} = this._viewportProps;\n\n if (\n !startRotatePos ||\n !Number.isFinite(startRotationX) ||\n !Number.isFinite(startRotationOrbit)\n ) {\n return this;\n }\n\n let newRotation;\n if (pos) {\n let deltaScaleX = (pos[0] - startRotatePos[0]) / width;\n const deltaScaleY = (pos[1] - startRotatePos[1]) / height;\n\n if (startRotationX < -90 || startRotationX > 90) {\n // When looking at the \"back\" side of the scene, invert horizontal drag\n // so that the camera movement follows user input\n deltaScaleX *= -1;\n }\n newRotation = {\n rotationX: startRotationX + deltaScaleY * 180,\n rotationOrbit: startRotationOrbit + deltaScaleX * 180\n };\n } else {\n newRotation = {\n rotationX: startRotationX + deltaAngleY,\n rotationOrbit: startRotationOrbit + deltaAngleX\n };\n }\n\n return this._getUpdatedState(newRotation);\n }\n\n /**\n * End rotating\n * Must call if `rotateStart()` was called\n */\n rotateEnd() {\n return this._getUpdatedState({\n startRotationX: null,\n startRotationOrbit: null\n });\n }\n\n // shortest path between two view states\n shortestPathFrom(viewState) {\n const fromProps = viewState.getViewportProps();\n const props = {...this._viewportProps};\n const {rotationOrbit} = props;\n\n if (Math.abs(rotationOrbit - fromProps.rotationOrbit) > 180) {\n props.rotationOrbit = rotationOrbit < 0 ? rotationOrbit + 360 : rotationOrbit - 360;\n }\n\n return props;\n }\n\n /**\n * Start zooming\n * @param {[Number, Number]} pos - position on screen where the pointer grabs\n */\n zoomStart({pos}) {\n return this._getUpdatedState({\n startZoomPosition: this._unproject(pos),\n startZoom: this._viewportProps.zoom\n });\n }\n\n /**\n * Zoom\n * @param {[Number, Number]} pos - position on screen where the current target is\n * @param {[Number, Number]} startPos - the target position at\n * the start of the operation. Must be supplied of `zoomStart()` was not called\n * @param {Number} scale - a number between [0, 1] specifying the accumulated\n * relative scale.\n */\n zoom({pos, startPos, scale}) {\n const {zoom} = this._viewportProps;\n let {startZoom, startZoomPosition} = this._state;\n if (!Number.isFinite(startZoom)) {\n // We have two modes of zoom:\n // scroll zoom that are discrete events (transform from the current zoom level),\n // and pinch zoom that are continuous events (transform from the zoom level when\n // pinch started).\n // If startZoom state is defined, then use the startZoom state;\n // otherwise assume discrete zooming\n startZoom = zoom;\n startZoomPosition = this._unproject(startPos) || this._unproject(pos);\n }\n\n const newZoom = this._calculateNewZoom({scale, startZoom});\n const zoomedViewport = this.makeViewport({...this._viewportProps, zoom: newZoom});\n\n return this._getUpdatedState({\n zoom: newZoom,\n ...zoomedViewport.panByPosition(startZoomPosition, pos)\n });\n }\n\n /**\n * End zooming\n * Must call if `zoomStart()` was called\n */\n zoomEnd() {\n return this._getUpdatedState({\n startZoomPosition: null,\n startZoom: null\n });\n }\n\n zoomIn(speed = 2) {\n return this._getUpdatedState({\n zoom: this._calculateNewZoom({scale: speed})\n });\n }\n\n zoomOut(speed = 2) {\n return this._getUpdatedState({\n zoom: this._calculateNewZoom({scale: 1 / speed})\n });\n }\n\n moveLeft(speed = 50) {\n return this._panFromCenter([-speed, 0]);\n }\n\n moveRight(speed = 50) {\n return this._panFromCenter([speed, 0]);\n }\n\n moveUp(speed = 50) {\n return this._panFromCenter([0, -speed]);\n }\n\n moveDown(speed = 50) {\n return this._panFromCenter([0, speed]);\n }\n\n rotateLeft(speed = 15) {\n return this._getUpdatedState({\n rotationOrbit: this._viewportProps.rotationOrbit - speed\n });\n }\n\n rotateRight(speed = 15) {\n return this._getUpdatedState({\n rotationOrbit: this._viewportProps.rotationOrbit + speed\n });\n }\n\n rotateUp(speed = 10) {\n return this._getUpdatedState({\n rotationX: this._viewportProps.rotationX - speed\n });\n }\n\n rotateDown(speed = 10) {\n return this._getUpdatedState({\n rotationX: this._viewportProps.rotationX + speed\n });\n }\n\n /* Private methods */\n\n _unproject(pos) {\n const viewport = this.makeViewport(this._viewportProps);\n return pos && viewport.unproject(pos);\n }\n\n // Calculates new zoom\n _calculateNewZoom({scale, startZoom}) {\n const {maxZoom, minZoom} = this._viewportProps;\n if (!Number.isFinite(startZoom)) {\n startZoom = this._viewportProps.zoom;\n }\n const zoom = startZoom + Math.log2(scale);\n return clamp(zoom, minZoom, maxZoom);\n }\n\n _panFromCenter(offset) {\n const {width, height, target} = this._viewportProps;\n return this.pan({\n startPosition: target,\n pos: [width / 2 + offset[0], height / 2 + offset[1]]\n });\n }\n\n _getUpdatedState(newProps) {\n // Update _viewportProps\n return new this.constructor({...this._viewportProps, ...this._state, ...newProps});\n }\n\n // Apply any constraints (mathematical or defined by _viewportProps) to map state\n _applyConstraints(props) {\n // Ensure zoom is within specified range\n const {maxZoom, minZoom, zoom, maxRotationX, minRotationX, rotationOrbit} = props;\n\n props.zoom = clamp(zoom, minZoom, maxZoom);\n props.rotationX = clamp(props.rotationX, minRotationX, maxRotationX);\n if (rotationOrbit < -180 || rotationOrbit > 180) {\n props.rotationOrbit = mod(rotationOrbit + 180, 360) - 180;\n }\n\n return props;\n }\n}\n\nexport default class OrbitController extends Controller {\n constructor(props) {\n super(OrbitState, props);\n }\n\n get linearTransitionProps() {\n return ['target', 'zoom', 'rotationX', 'rotationOrbit'];\n }\n}\n","import {equals} from 'math.gl';\nimport assert from '../utils/assert';\n\nexport default class TransitionInterpolator {\n /**\n * @param opts {array|object}\n * @param opts.compare {array} - prop names used in equality check\n * @param opts.extract {array} - prop names needed for interpolation\n * @param opts.required {array} - prop names that must be supplied\n * alternatively, supply one list of prop names as `opts` if all of the above are the same.\n */\n constructor(opts = {}) {\n if (Array.isArray(opts)) {\n opts = {\n compare: opts,\n extract: opts,\n required: opts\n };\n }\n const {compare, extract, required} = opts;\n\n this._propsToCompare = compare;\n this._propsToExtract = extract;\n this._requiredProps = required;\n }\n\n /**\n * Checks if two sets of props need transition in between\n * @param currentProps {object} - a list of viewport props\n * @param nextProps {object} - a list of viewport props\n * @returns {bool} - true if two props are equivalent\n */\n arePropsEqual(currentProps, nextProps) {\n for (const key of this._propsToCompare || Object.keys(nextProps)) {\n if (\n !(key in currentProps) ||\n !(key in nextProps) ||\n !equals(currentProps[key], nextProps[key])\n ) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * Called before transition starts to validate/pre-process start and end props\n * @param startProps {object} - a list of starting viewport props\n * @param endProps {object} - a list of target viewport props\n * @returns {Object} {start, end} - start and end props to be passed\n * to `interpolateProps`\n */\n initializeProps(startProps, endProps) {\n let result;\n\n if (this._propsToExtract) {\n const startViewStateProps = {};\n const endViewStateProps = {};\n\n for (const key of this._propsToExtract) {\n startViewStateProps[key] = startProps[key];\n endViewStateProps[key] = endProps[key];\n }\n result = {start: startViewStateProps, end: endViewStateProps};\n } else {\n result = {start: startProps, end: endProps};\n }\n\n this._checkRequiredProps(result.start);\n this._checkRequiredProps(result.end);\n\n return result;\n }\n\n /**\n * Returns viewport props in transition\n * @param startProps {object} - a list of starting viewport props\n * @param endProps {object} - a list of target viewport props\n * @param t {number} - a time factor between [0, 1]\n * @returns {object} - a list of interpolated viewport props\n */\n interpolateProps(startProps, endProps, t) {\n return endProps;\n }\n\n /**\n * Returns transition duration\n * @param startProps {object} - a list of starting viewport props\n * @param endProps {object} - a list of target viewport props\n * @returns {Number} - transition duration in milliseconds\n */\n getDuration(startProps, endProps) {\n return endProps.transitionDuration;\n }\n\n _checkRequiredProps(props) {\n if (!this._requiredProps) {\n return;\n }\n\n this._requiredProps.forEach(propName => {\n const value = props[propName];\n assert(\n Number.isFinite(value) || Array.isArray(value),\n `${propName} is required for transition`\n );\n });\n }\n}\n","import {clamp} from 'math.gl';\nimport Controller from './controller';\nimport ViewState from './view-state';\nimport {normalizeViewportProps} from '@math.gl/web-mercator';\nimport assert from '../utils/assert';\n\nconst PITCH_MOUSE_THRESHOLD = 5;\nconst PITCH_ACCEL = 1.2;\n\nconst DEFAULT_STATE = {\n pitch: 0,\n bearing: 0,\n altitude: 1.5,\n minZoom: 0,\n maxZoom: 20,\n minPitch: 0,\n maxPitch: 60\n};\n\n/* Utils */\n\nexport class MapState extends ViewState {\n constructor({\n makeViewport,\n\n /** Mapbox viewport properties */\n /** The width of the viewport */\n width,\n /** The height of the viewport */\n height,\n /** The latitude at the center of the viewport */\n latitude,\n /** The longitude at the center of the viewport */\n longitude,\n /** The tile zoom level of the map. */\n zoom,\n /** The bearing of the viewport in degrees */\n bearing = DEFAULT_STATE.bearing,\n /** The pitch of the viewport in degrees */\n pitch = DEFAULT_STATE.pitch,\n /**\n * Specify the altitude of the viewport camera\n * Unit: map heights, default 1.5\n * Non-public API, see https://github.com/mapbox/mapbox-gl-js/issues/1137\n */\n altitude = DEFAULT_STATE.altitude,\n\n /** Viewport constraints */\n maxZoom = DEFAULT_STATE.maxZoom,\n minZoom = DEFAULT_STATE.minZoom,\n maxPitch = DEFAULT_STATE.maxPitch,\n minPitch = DEFAULT_STATE.minPitch,\n\n /** Interaction states, required to calculate change during transform */\n /* The point on map being grabbed when the operation first started */\n startPanLngLat,\n /* Center of the zoom when the operation first started */\n startZoomLngLat,\n /* Pointer position when rotation started */\n startRotatePos,\n /** Bearing when current perspective rotate operation started */\n startBearing,\n /** Pitch when current perspective rotate operation started */\n startPitch,\n /** Zoom when current zoom operation started */\n startZoom,\n\n /** Normalize viewport props to fit map height into viewport. Default `true` */\n normalize\n } = {}) {\n assert(Number.isFinite(longitude)); // `longitude` must be supplied\n assert(Number.isFinite(latitude)); // `latitude` must be supplied\n assert(Number.isFinite(zoom)); // `zoom` must be supplied\n\n super({\n width,\n height,\n latitude,\n longitude,\n zoom,\n bearing,\n pitch,\n altitude,\n maxZoom,\n minZoom,\n maxPitch,\n minPitch,\n normalize\n });\n\n this._state = {\n startPanLngLat,\n startZoomLngLat,\n startRotatePos,\n startBearing,\n startPitch,\n startZoom\n };\n\n this.makeViewport = makeViewport;\n }\n\n /**\n * Start panning\n * @param {[Number, Number]} pos - position on screen where the pointer grabs\n */\n panStart({pos}) {\n return this._getUpdatedState({\n startPanLngLat: this._unproject(pos)\n });\n }\n\n /**\n * Pan\n * @param {[Number, Number]} pos - position on screen where the pointer is\n * @param {[Number, Number], optional} startPos - where the pointer grabbed at\n * the start of the operation. Must be supplied of `panStart()` was not called\n */\n pan({pos, startPos}) {\n const startPanLngLat = this._state.startPanLngLat || this._unproject(startPos);\n\n if (!startPanLngLat) {\n return this;\n }\n\n const viewport = this.makeViewport(this._viewportProps);\n const newProps = viewport.panByPosition(startPanLngLat, pos);\n\n return this._getUpdatedState(newProps);\n }\n\n /**\n * End panning\n * Must call if `panStart()` was called\n */\n panEnd() {\n return this._getUpdatedState({\n startPanLngLat: null\n });\n }\n\n /**\n * Start rotating\n * @param {[Number, Number]} pos - position on screen where the center is\n */\n rotateStart({pos}) {\n return this._getUpdatedState({\n startRotatePos: pos,\n startBearing: this._viewportProps.bearing,\n startPitch: this._viewportProps.pitch\n });\n }\n\n /**\n * Rotate\n * @param {[Number, Number]} pos - position on screen where the center is\n */\n rotate({pos, deltaAngleX = 0, deltaAngleY = 0}) {\n const {startRotatePos, startBearing, startPitch} = this._state;\n\n if (!startRotatePos || !Number.isFinite(startBearing) || !Number.isFinite(startPitch)) {\n return this;\n }\n let newRotation;\n if (pos) {\n newRotation = this._calculateNewPitchAndBearing({\n ...this._getRotationParams(pos, startRotatePos),\n startBearing,\n startPitch\n });\n } else {\n newRotation = {\n bearing: startBearing + deltaAngleX,\n pitch: startPitch + deltaAngleY\n };\n }\n return this._getUpdatedState(newRotation);\n }\n\n /**\n * End rotating\n * Must call if `rotateStart()` was called\n */\n rotateEnd() {\n return this._getUpdatedState({\n startBearing: null,\n startPitch: null\n });\n }\n\n /**\n * Start zooming\n * @param {[Number, Number]} pos - position on screen where the center is\n */\n zoomStart({pos}) {\n return this._getUpdatedState({\n startZoomLngLat: this._unproject(pos),\n startZoom: this._viewportProps.zoom\n });\n }\n\n /**\n * Zoom\n * @param {[Number, Number]} pos - position on screen where the current center is\n * @param {[Number, Number]} startPos - the center position at\n * the start of the operation. Must be supplied of `zoomStart()` was not called\n * @param {Number} scale - a number between [0, 1] specifying the accumulated\n * relative scale.\n */\n zoom({pos, startPos, scale}) {\n // Make sure we zoom around the current mouse position rather than map center\n let {startZoom, startZoomLngLat} = this._state;\n\n if (!Number.isFinite(startZoom)) {\n // We have two modes of zoom:\n // scroll zoom that are discrete events (transform from the current zoom level),\n // and pinch zoom that are continuous events (transform from the zoom level when\n // pinch started).\n // If startZoom state is defined, then use the startZoom state;\n // otherwise assume discrete zooming\n startZoom = this._viewportProps.zoom;\n startZoomLngLat = this._unproject(startPos) || this._unproject(pos);\n }\n\n const zoom = this._calculateNewZoom({scale, startZoom});\n\n const zoomedViewport = this.makeViewport({...this._viewportProps, zoom});\n\n return this._getUpdatedState({\n zoom,\n ...zoomedViewport.panByPosition(startZoomLngLat, pos)\n });\n }\n\n /**\n * End zooming\n * Must call if `zoomStart()` was called\n */\n zoomEnd() {\n return this._getUpdatedState({\n startZoomLngLat: null,\n startZoom: null\n });\n }\n\n zoomIn(speed = 2) {\n return this._zoomFromCenter(speed);\n }\n\n zoomOut(speed = 2) {\n return this._zoomFromCenter(1 / speed);\n }\n\n moveLeft(speed = 100) {\n return this._panFromCenter([speed, 0]);\n }\n\n moveRight(speed = 100) {\n return this._panFromCenter([-speed, 0]);\n }\n\n moveUp(speed = 100) {\n return this._panFromCenter([0, speed]);\n }\n\n moveDown(speed = 100) {\n return this._panFromCenter([0, -speed]);\n }\n\n rotateLeft(speed = 15) {\n return this._getUpdatedState({\n bearing: this._viewportProps.bearing - speed\n });\n }\n\n rotateRight(speed = 15) {\n return this._getUpdatedState({\n bearing: this._viewportProps.bearing + speed\n });\n }\n\n rotateUp(speed = 10) {\n return this._getUpdatedState({\n pitch: this._viewportProps.pitch + speed\n });\n }\n\n rotateDown(speed = 10) {\n return this._getUpdatedState({\n pitch: this._viewportProps.pitch - speed\n });\n }\n\n shortestPathFrom(viewState) {\n // const endViewStateProps = new this.ControllerState(endProps).shortestPathFrom(startViewstate);\n const fromProps = viewState.getViewportProps();\n const props = {...this._viewportProps};\n const {bearing, longitude} = props;\n\n if (Math.abs(bearing - fromProps.bearing) > 180) {\n props.bearing = bearing < 0 ? bearing + 360 : bearing - 360;\n }\n if (Math.abs(longitude - fromProps.longitude) > 180) {\n props.longitude = longitude < 0 ? longitude + 360 : longitude - 360;\n }\n return props;\n }\n\n /* Private methods */\n\n _zoomFromCenter(scale) {\n const {width, height} = this._viewportProps;\n return this.zoom({\n pos: [width / 2, height / 2],\n scale\n });\n }\n\n _panFromCenter(offset) {\n const {width, height} = this._viewportProps;\n return this.pan({\n startPos: [width / 2, height / 2],\n pos: [width / 2 + offset[0], height / 2 + offset[1]]\n });\n }\n\n _getUpdatedState(newProps) {\n // Update _viewportProps\n return new this.constructor({\n makeViewport: this.makeViewport,\n ...this._viewportProps,\n ...this._state,\n ...newProps\n });\n }\n\n // Apply any constraints (mathematical or defined by _viewportProps) to map state\n _applyConstraints(props) {\n // Ensure zoom is within specified range\n const {maxZoom, minZoom, zoom} = props;\n props.zoom = clamp(zoom, minZoom, maxZoom);\n\n // Ensure pitch is within specified range\n const {maxPitch, minPitch, pitch} = props;\n props.pitch = clamp(pitch, minPitch, maxPitch);\n\n // Normalize viewport props to fit map height into viewport\n const {normalize = true} = props;\n if (normalize) {\n Object.assign(props, normalizeViewportProps(props));\n }\n\n return props;\n }\n\n _unproject(pos) {\n const viewport = this.makeViewport(this._viewportProps);\n return pos && viewport.unproject(pos);\n }\n\n // Calculates new zoom\n _calculateNewZoom({scale, startZoom}) {\n const {maxZoom, minZoom} = this._viewportProps;\n const zoom = startZoom + Math.log2(scale);\n return clamp(zoom, minZoom, maxZoom);\n }\n\n // Calculates a new pitch and bearing from a position (coming from an event)\n _calculateNewPitchAndBearing({deltaScaleX, deltaScaleY, startBearing, startPitch}) {\n // clamp deltaScaleY to [-1, 1] so that rotation is constrained between minPitch and maxPitch.\n // deltaScaleX does not need to be clamped as bearing does not have constraints.\n deltaScaleY = clamp(deltaScaleY, -1, 1);\n\n const {minPitch, maxPitch} = this._viewportProps;\n\n const bearing = startBearing + 180 * deltaScaleX;\n let pitch = startPitch;\n if (deltaScaleY > 0) {\n // Gradually increase pitch\n pitch = startPitch + deltaScaleY * (maxPitch - startPitch);\n } else if (deltaScaleY < 0) {\n // Gradually decrease pitch\n pitch = startPitch - deltaScaleY * (minPitch - startPitch);\n }\n\n return {\n pitch,\n bearing\n };\n }\n\n _getRotationParams(pos, startPos) {\n const deltaX = pos[0] - startPos[0];\n const deltaY = pos[1] - startPos[1];\n const centerY = pos[1];\n const startY = startPos[1];\n const {width, height} = this._viewportProps;\n\n const deltaScaleX = deltaX / width;\n let deltaScaleY = 0;\n\n if (deltaY > 0) {\n if (Math.abs(height - startY) > PITCH_MOUSE_THRESHOLD) {\n // Move from 0 to -1 as we drag upwards\n deltaScaleY = (deltaY / (startY - height)) * PITCH_ACCEL;\n }\n } else if (deltaY < 0) {\n if (startY > PITCH_MOUSE_THRESHOLD) {\n // Move from 0 to 1 as we drag upwards\n deltaScaleY = 1 - centerY / startY;\n }\n }\n deltaScaleY = Math.min(1, Math.max(-1, deltaScaleY));\n return {deltaScaleX, deltaScaleY};\n }\n}\n\nexport default class MapController extends Controller {\n constructor(props) {\n props.dragMode = props.dragMode || 'pan';\n super(MapState, props);\n }\n\n setProps(props) {\n const oldProps = this.controllerStateProps;\n\n super.setProps(props);\n\n const dimensionChanged = !oldProps || oldProps.height !== props.height;\n if (dimensionChanged) {\n // Dimensions changed, normalize the props\n this.updateViewport(\n new this.ControllerState({\n makeViewport: this.makeViewport,\n ...this.controllerStateProps,\n ...this._state\n })\n );\n }\n }\n\n get linearTransitionProps() {\n return ['longitude', 'latitude', 'zoom', 'bearing', 'pitch'];\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// Handles tesselation of polygons with holes\n// - 2D surfaces\n// - 2D outlines\n// - 3D surfaces (top and sides only)\n// - 3D wireframes (not yet)\nimport * as Polygon from './polygon';\nimport {Tesselator} from '@deck.gl/core';\nimport {cutPolygonByGrid, cutPolygonByMercatorBounds} from '@math.gl/polygon';\n\n// This class is set up to allow querying one attribute at a time\n// the way the AttributeManager expects it\nexport default class PolygonTesselator extends Tesselator {\n constructor(opts) {\n const {fp64, IndexType = Uint32Array} = opts;\n super({\n ...opts,\n attributes: {\n positions: {size: 3, type: fp64 ? Float64Array : Float32Array},\n vertexValid: {type: Uint8ClampedArray, size: 1},\n indices: {type: IndexType, size: 1}\n }\n });\n }\n\n /* Getters */\n get(attributeName) {\n const {attributes} = this;\n if (attributeName === 'indices') {\n return attributes.indices && attributes.indices.subarray(0, this.vertexCount);\n }\n\n return attributes[attributeName];\n }\n\n /* Implement base Tesselator interface */\n updateGeometry(opts) {\n super.updateGeometry(opts);\n\n const externalIndices = this.buffers.indices;\n if (externalIndices) {\n this.vertexCount = (externalIndices.value || externalIndices).length;\n }\n }\n\n normalizeGeometry(polygon) {\n if (this.normalize) {\n polygon = Polygon.normalize(polygon, this.positionSize);\n if (this.opts.resolution) {\n return cutPolygonByGrid(polygon.positions || polygon, polygon.holeIndices, {\n size: this.positionSize,\n gridResolution: this.opts.resolution,\n edgeTypes: true\n });\n }\n if (this.opts.wrapLongitude) {\n return cutPolygonByMercatorBounds(polygon.positions || polygon, polygon.holeIndices, {\n size: this.positionSize,\n maxLatitude: 86,\n edgeTypes: true\n });\n }\n }\n return polygon;\n }\n\n getGeometrySize(polygon) {\n if (Array.isArray(polygon) && !Number.isFinite(polygon[0])) {\n let size = 0;\n for (const subPolygon of polygon) {\n size += this.getGeometrySize(subPolygon);\n }\n return size;\n }\n return (polygon.positions || polygon).length / this.positionSize;\n }\n\n getGeometryFromBuffer(buffer) {\n if (this.normalize || !this.buffers.indices) {\n return super.getGeometryFromBuffer(buffer);\n }\n // we don't need to read the positions if no normalization/tesselation\n return () => null;\n }\n\n updateGeometryAttributes(polygon, context) {\n if (Array.isArray(polygon) && !Number.isFinite(polygon[0])) {\n for (const subPolygon of polygon) {\n const geometrySize = this.getGeometrySize(subPolygon);\n context.geometrySize = geometrySize;\n this.updateGeometryAttributes(subPolygon, context);\n context.vertexStart += geometrySize;\n context.indexStart = this.indexStarts[context.geometryIndex + 1];\n }\n } else {\n this._updateIndices(polygon, context);\n this._updatePositions(polygon, context);\n this._updateVertexValid(polygon, context);\n }\n }\n\n // Flatten the indices array\n _updateIndices(polygon, {geometryIndex, vertexStart: offset, indexStart}) {\n const {attributes, indexStarts, typedArrayManager} = this;\n\n let target = attributes.indices;\n if (!target) {\n return;\n }\n let i = indexStart;\n\n // 1. get triangulated indices for the internal areas\n const indices = Polygon.getSurfaceIndices(polygon, this.positionSize, this.opts.preproject);\n\n // make sure the buffer is large enough\n target = typedArrayManager.allocate(target, indexStart + indices.length, {\n copy: true\n });\n\n // 2. offset each index by the number of indices in previous polygons\n for (let j = 0; j < indices.length; j++) {\n target[i++] = indices[j] + offset;\n }\n\n indexStarts[geometryIndex + 1] = indexStart + indices.length;\n attributes.indices = target;\n }\n\n // Flatten out all the vertices of all the sub subPolygons\n _updatePositions(polygon, {vertexStart, geometrySize}) {\n const {\n attributes: {positions},\n positionSize\n } = this;\n if (!positions) {\n return;\n }\n const polygonPositions = polygon.positions || polygon;\n\n for (let i = vertexStart, j = 0; j < geometrySize; i++, j++) {\n const x = polygonPositions[j * positionSize];\n const y = polygonPositions[j * positionSize + 1];\n const z = positionSize > 2 ? polygonPositions[j * positionSize + 2] : 0;\n\n positions[i * 3] = x;\n positions[i * 3 + 1] = y;\n positions[i * 3 + 2] = z;\n }\n }\n\n _updateVertexValid(polygon, {vertexStart, geometrySize}) {\n const {\n attributes: {vertexValid},\n positionSize\n } = this;\n const holeIndices = polygon && polygon.holeIndices;\n /* We are reusing the some buffer for `nextPositions` by offseting one vertex\n * to the left. As a result,\n * the last vertex of each ring overlaps with the first vertex of the next ring.\n * `vertexValid` is used to mark the end of each ring so we don't draw these\n * segments:\n positions A0 A1 A2 A3 A4 B0 B1 B2 C0 ...\n nextPositions A1 A2 A3 A4 B0 B1 B2 C0 C1 ...\n vertexValid 1 1 1 1 0 1 1 0 1 ...\n */\n if (polygon && polygon.edgeTypes) {\n vertexValid.set(polygon.edgeTypes, vertexStart);\n } else {\n vertexValid.fill(1, vertexStart, vertexStart + geometrySize);\n }\n if (holeIndices) {\n for (let j = 0; j < holeIndices.length; j++) {\n vertexValid[vertexStart + holeIndices[j] / positionSize - 1] = 0;\n }\n }\n vertexValid[vertexStart + geometrySize - 1] = 0;\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n\nattribute vec2 vertexPositions;\nattribute float vertexValid;\n\nuniform bool extruded;\nuniform bool isWireframe;\nuniform float elevationScale;\nuniform float opacity;\n\nvarying vec4 vColor;\n\nstruct PolygonProps {\n vec4 fillColors;\n vec4 lineColors;\n vec3 positions;\n vec3 nextPositions;\n vec3 pickingColors;\n vec3 positions64Low;\n vec3 nextPositions64Low;\n float elevations;\n};\n\nvec3 project_offset_normal(vec3 vector) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSETS) {\n // normals generated by the polygon tesselator are in lnglat offsets instead of meters\n return normalize(vector * project_uCommonUnitsPerWorldUnit);\n }\n return project_normal(vector);\n}\n\nvoid calculatePosition(PolygonProps props) {\n#ifdef IS_SIDE_VERTEX\n if(vertexValid < 0.5){\n gl_Position = vec4(0.);\n return;\n }\n#endif\n\n vec3 pos;\n vec3 pos64Low;\n vec3 normal;\n vec4 colors = isWireframe ? props.lineColors : props.fillColors;\n\n geometry.worldPosition = props.positions;\n geometry.worldPositionAlt = props.nextPositions;\n geometry.pickingColor = props.pickingColors;\n\n#ifdef IS_SIDE_VERTEX\n pos = mix(props.positions, props.nextPositions, vertexPositions.x);\n pos64Low = mix(props.positions64Low, props.nextPositions64Low, vertexPositions.x);\n#else\n pos = props.positions;\n pos64Low = props.positions64Low;\n#endif\n\n if (extruded) {\n pos.z += props.elevations * vertexPositions.y * elevationScale;\n\n#ifdef IS_SIDE_VERTEX\n normal = vec3(\n props.positions.y - props.nextPositions.y + (props.positions64Low.y - props.nextPositions64Low.y),\n props.nextPositions.x - props.positions.x + (props.nextPositions64Low.x - props.positions64Low.x),\n 0.0);\n normal = project_offset_normal(normal);\n#else\n normal = vec3(0.0, 0.0, 1.0);\n#endif\n geometry.normal = normal;\n }\n\n gl_Position = project_position_to_clipspace(pos, pos64Low, vec3(0.), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n if (extruded) {\n vec3 lightColor = lighting_getLightColor(colors.rgb, project_uCameraPosition, geometry.position.xyz, normal);\n vColor = vec4(lightColor, colors.a * opacity);\n } else {\n vColor = vec4(colors.rgb, colors.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport main from './solid-polygon-layer-vertex-main.glsl';\n\nexport default `\\\n#define SHADER_NAME solid-polygon-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute float elevations;\nattribute vec4 fillColors;\nattribute vec4 lineColors;\nattribute vec3 pickingColors;\n\n${main}\n\nvoid main(void) {\n PolygonProps props;\n\n props.positions = positions;\n props.positions64Low = positions64Low;\n props.elevations = elevations;\n props.fillColors = fillColors;\n props.lineColors = lineColors;\n props.pickingColors = pickingColors;\n\n calculatePosition(props);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport main from './solid-polygon-layer-vertex-main.glsl';\n\nexport default `\\\n#define SHADER_NAME solid-polygon-layer-vertex-shader-side\n#define IS_SIDE_VERTEX\n\n\nattribute vec3 instancePositions;\nattribute vec3 nextPositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 nextPositions64Low;\nattribute float instanceElevations;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\n${main}\n\nvoid main(void) {\n PolygonProps props;\n\n #if RING_WINDING_ORDER_CW == 1\n props.positions = instancePositions;\n props.positions64Low = instancePositions64Low;\n props.nextPositions = nextPositions;\n props.nextPositions64Low = nextPositions64Low;\n #else\n props.positions = nextPositions;\n props.positions64Low = nextPositions64Low;\n props.nextPositions = instancePositions;\n props.nextPositions64Low = instancePositions64Low;\n #endif\n props.elevations = instanceElevations;\n props.fillColors = instanceFillColors;\n props.lineColors = instanceLineColors;\n props.pickingColors = instancePickingColors;\n\n calculatePosition(props);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, gouraudLighting, picking, COORDINATE_SYSTEM} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry, hasFeatures, FEATURES} from '@luma.gl/core';\n\n// Polygon geometry generation is managed by the polygon tesselator\nimport PolygonTesselator from './polygon-tesselator';\n\nimport vsTop from './solid-polygon-layer-vertex-top.glsl';\nimport vsSide from './solid-polygon-layer-vertex-side.glsl';\nimport fs from './solid-polygon-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst defaultProps = {\n filled: true,\n // Whether to extrude\n extruded: false,\n // Whether to draw a GL.LINES wireframe of the polygon\n wireframe: false,\n _normalize: true,\n _windingOrder: 'CW',\n\n // elevation multiplier\n elevationScale: {type: 'number', min: 0, value: 1},\n\n // Accessor for polygon geometry\n getPolygon: {type: 'accessor', value: f => f.polygon},\n // Accessor for extrusion height\n getElevation: {type: 'accessor', value: 1000},\n // Accessor for colors\n getFillColor: {type: 'accessor', value: DEFAULT_COLOR},\n getLineColor: {type: 'accessor', value: DEFAULT_COLOR},\n\n // Optional settings for 'lighting' shader module\n material: true\n};\n\nconst ATTRIBUTE_TRANSITION = {\n enter: (value, chunk) => {\n return chunk.length ? chunk.subarray(chunk.length - value.length) : value;\n }\n};\n\nexport default class SolidPolygonLayer extends Layer {\n getShaders(type) {\n return super.getShaders({\n vs: type === 'top' ? vsTop : vsSide,\n fs,\n defines: {\n RING_WINDING_ORDER_CW: !this.props._normalize && this.props._windingOrder === 'CCW' ? 0 : 1\n },\n modules: [project32, gouraudLighting, picking]\n });\n }\n\n get wrapLongitude() {\n return false;\n }\n\n initializeState() {\n const {gl, viewport} = this.context;\n let {coordinateSystem} = this.props;\n if (viewport.isGeospatial && coordinateSystem === COORDINATE_SYSTEM.DEFAULT) {\n coordinateSystem = COORDINATE_SYSTEM.LNGLAT;\n }\n\n this.setState({\n numInstances: 0,\n polygonTesselator: new PolygonTesselator({\n // Lnglat coordinates are usually projected non-linearly, which affects tesselation results\n // Provide a preproject function if the coordinates are in lnglat\n preproject: coordinateSystem === COORDINATE_SYSTEM.LNGLAT && viewport.projectFlat,\n fp64: this.use64bitPositions(),\n IndexType: !gl || hasFeatures(gl, FEATURES.ELEMENT_INDEX_UINT32) ? Uint32Array : Uint16Array\n })\n });\n\n const attributeManager = this.getAttributeManager();\n const noAlloc = true;\n\n attributeManager.remove(['instancePickingColors']);\n\n /* eslint-disable max-len */\n attributeManager.add({\n indices: {size: 1, isIndexed: true, update: this.calculateIndices, noAlloc},\n positions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: ATTRIBUTE_TRANSITION,\n accessor: 'getPolygon',\n update: this.calculatePositions,\n noAlloc,\n shaderAttributes: {\n positions: {\n vertexOffset: 0,\n divisor: 0\n },\n instancePositions: {\n vertexOffset: 0,\n divisor: 1\n },\n nextPositions: {\n vertexOffset: 1,\n divisor: 1\n }\n }\n },\n vertexValid: {\n size: 1,\n divisor: 1,\n type: GL.UNSIGNED_BYTE,\n update: this.calculateVertexValid,\n noAlloc\n },\n elevations: {\n size: 1,\n transition: ATTRIBUTE_TRANSITION,\n accessor: 'getElevation',\n shaderAttributes: {\n elevations: {\n divisor: 0\n },\n instanceElevations: {\n divisor: 1\n }\n }\n },\n fillColors: {\n alias: 'colors',\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: ATTRIBUTE_TRANSITION,\n accessor: 'getFillColor',\n defaultValue: DEFAULT_COLOR,\n shaderAttributes: {\n fillColors: {\n divisor: 0\n },\n instanceFillColors: {\n divisor: 1\n }\n }\n },\n lineColors: {\n alias: 'colors',\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: ATTRIBUTE_TRANSITION,\n accessor: 'getLineColor',\n defaultValue: DEFAULT_COLOR,\n shaderAttributes: {\n lineColors: {\n divisor: 0\n },\n instanceLineColors: {\n divisor: 1\n }\n }\n },\n pickingColors: {\n size: 3,\n type: GL.UNSIGNED_BYTE,\n accessor: (object, {index, target: value}) =>\n this.encodePickingColor(object && object.__source ? object.__source.index : index, value),\n shaderAttributes: {\n pickingColors: {\n divisor: 0\n },\n instancePickingColors: {\n divisor: 1\n }\n }\n }\n });\n /* eslint-enable max-len */\n }\n\n getPickingInfo(params) {\n const info = super.getPickingInfo(params);\n const {index} = info;\n const {data} = this.props;\n\n // Check if data comes from a composite layer, wrapped with getSubLayerRow\n if (data[0] && data[0].__source) {\n // index decoded from picking color refers to the source index\n info.object = data.find(d => d.__source.index === index);\n }\n return info;\n }\n\n disablePickingIndex(objectIndex) {\n const {data} = this.props;\n\n // Check if data comes from a composite layer, wrapped with getSubLayerRow\n if (data[0] && data[0].__source) {\n // index decoded from picking color refers to the source index\n for (let i = 0; i < data.length; i++) {\n if (data[i].__source.index === objectIndex) {\n this._disablePickingIndex(i);\n }\n }\n } else {\n this._disablePickingIndex(objectIndex);\n }\n }\n\n draw({uniforms}) {\n const {extruded, filled, wireframe, elevationScale} = this.props;\n const {topModel, sideModel, polygonTesselator} = this.state;\n\n const renderUniforms = {\n ...uniforms,\n extruded: Boolean(extruded),\n elevationScale\n };\n\n // Note: the order is important\n if (sideModel) {\n sideModel.setInstanceCount(polygonTesselator.instanceCount - 1);\n sideModel.setUniforms(renderUniforms);\n if (wireframe) {\n sideModel.setDrawMode(GL.LINE_STRIP);\n sideModel.setUniforms({isWireframe: true}).draw();\n }\n if (filled) {\n sideModel.setDrawMode(GL.TRIANGLE_FAN);\n sideModel.setUniforms({isWireframe: false}).draw();\n }\n }\n\n if (topModel) {\n topModel.setVertexCount(polygonTesselator.vertexCount);\n topModel.setUniforms(renderUniforms).draw();\n }\n }\n\n updateState(updateParams) {\n super.updateState(updateParams);\n\n this.updateGeometry(updateParams);\n\n const {props, oldProps, changeFlags} = updateParams;\n const attributeManager = this.getAttributeManager();\n\n const regenerateModels =\n changeFlags.extensionsChanged ||\n props.filled !== oldProps.filled ||\n props.extruded !== oldProps.extruded;\n\n if (regenerateModels) {\n this.state.models?.forEach(model => model.delete());\n\n this.setState(this._getModels(this.context.gl));\n attributeManager.invalidateAll();\n }\n }\n\n updateGeometry({props, oldProps, changeFlags}) {\n const geometryConfigChanged =\n changeFlags.dataChanged ||\n (changeFlags.updateTriggersChanged &&\n (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getPolygon));\n\n // When the geometry config or the data is changed,\n // tessellator needs to be invoked\n if (geometryConfigChanged) {\n const {polygonTesselator} = this.state;\n const buffers = props.data.attributes || {};\n polygonTesselator.updateGeometry({\n data: props.data,\n normalize: props._normalize,\n geometryBuffer: buffers.getPolygon,\n buffers,\n getGeometry: props.getPolygon,\n positionFormat: props.positionFormat,\n wrapLongitude: props.wrapLongitude,\n // TODO - move the flag out of the viewport\n resolution: this.context.viewport.resolution,\n fp64: this.use64bitPositions(),\n dataChanged: changeFlags.dataChanged\n });\n\n this.setState({\n numInstances: polygonTesselator.instanceCount,\n startIndices: polygonTesselator.vertexStarts\n });\n\n if (!changeFlags.dataChanged) {\n // Base `layer.updateState` only invalidates all attributes on data change\n // Cover the rest of the scenarios here\n this.getAttributeManager().invalidateAll();\n }\n }\n }\n\n _getModels(gl) {\n const {id, filled, extruded} = this.props;\n\n let topModel;\n let sideModel;\n\n if (filled) {\n const shaders = this.getShaders('top');\n shaders.defines.NON_INSTANCED_MODEL = 1;\n\n topModel = new Model(gl, {\n ...shaders,\n id: `${id}-top`,\n drawMode: GL.TRIANGLES,\n attributes: {\n vertexPositions: new Float32Array([0, 1])\n },\n uniforms: {\n isWireframe: false,\n isSideVertex: false\n },\n vertexCount: 0,\n isIndexed: true\n });\n }\n if (extruded) {\n sideModel = new Model(gl, {\n ...this.getShaders('side'),\n id: `${id}-side`,\n geometry: new Geometry({\n drawMode: GL.LINES,\n vertexCount: 4,\n attributes: {\n // top right - top left - bootom left - bottom right\n vertexPositions: {\n size: 2,\n value: new Float32Array([1, 0, 0, 0, 0, 1, 1, 1])\n }\n }\n }),\n instanceCount: 0,\n isInstanced: 1\n });\n\n sideModel.userData.excludeAttributes = {indices: true};\n }\n\n return {\n models: [sideModel, topModel].filter(Boolean),\n topModel,\n sideModel\n };\n }\n\n calculateIndices(attribute) {\n const {polygonTesselator} = this.state;\n attribute.startIndices = polygonTesselator.indexStarts;\n attribute.value = polygonTesselator.get('indices');\n }\n\n calculatePositions(attribute) {\n const {polygonTesselator} = this.state;\n attribute.startIndices = polygonTesselator.vertexStarts;\n attribute.value = polygonTesselator.get('positions');\n }\n\n calculateVertexValid(attribute) {\n attribute.value = this.state.polygonTesselator.get('vertexValid');\n }\n}\n\nSolidPolygonLayer.layerName = 'SolidPolygonLayer';\nSolidPolygonLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME solid-polygon-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport {Tesselator} from '@deck.gl/core';\nimport {normalizePath} from './path';\n\nconst START_CAP = 1;\nconst END_CAP = 2;\nconst INVALID = 4;\n\n// This class is set up to allow querying one attribute at a time\n// the way the AttributeManager expects it\nexport default class PathTesselator extends Tesselator {\n constructor(opts) {\n super({\n ...opts,\n attributes: {\n // Padding covers shaderAttributes for last segment in largest case fp64\n // additional vertex + hi & low parts, 3 * 6\n positions: {\n size: 3,\n padding: 18,\n initialize: true,\n type: opts.fp64 ? Float64Array : Float32Array\n },\n segmentTypes: {size: 1, type: Uint8ClampedArray}\n }\n });\n }\n\n getGeometryFromBuffer(buffer) {\n if (this.normalize) {\n return super.getGeometryFromBuffer(buffer);\n }\n // we don't need to read the positions if no normalization\n return () => null;\n }\n\n normalizeGeometry(path) {\n if (this.normalize) {\n return normalizePath(path, this.positionSize, this.opts.resolution, this.opts.wrapLongitude);\n }\n return path;\n }\n\n /* Getters */\n get(attributeName) {\n return this.attributes[attributeName];\n }\n\n /* Implement base Tesselator interface */\n getGeometrySize(path) {\n if (Array.isArray(path[0])) {\n let size = 0;\n for (const subPath of path) {\n size += this.getGeometrySize(subPath);\n }\n return size;\n }\n const numPoints = this.getPathLength(path);\n if (numPoints < 2) {\n // invalid path\n return 0;\n }\n if (this.isClosed(path)) {\n // minimum 3 vertices\n return numPoints < 3 ? 0 : numPoints + 2;\n }\n return numPoints;\n }\n\n updateGeometryAttributes(path, context) {\n if (context.geometrySize === 0) {\n return;\n }\n if (path && Array.isArray(path[0])) {\n for (const subPath of path) {\n const geometrySize = this.getGeometrySize(subPath);\n context.geometrySize = geometrySize;\n this.updateGeometryAttributes(subPath, context);\n context.vertexStart += geometrySize;\n }\n } else {\n this._updateSegmentTypes(path, context);\n this._updatePositions(path, context);\n }\n }\n\n _updateSegmentTypes(path, context) {\n const {segmentTypes} = this.attributes;\n const isPathClosed = this.isClosed(path);\n const {vertexStart, geometrySize} = context;\n\n // positions -- A0 A1 B0 B1 B2 B3 B0 B1 B2 --\n // segmentTypes 3 4 4 0 0 0 0 4 4\n segmentTypes.fill(0, vertexStart, vertexStart + geometrySize);\n if (isPathClosed) {\n segmentTypes[vertexStart] = INVALID;\n segmentTypes[vertexStart + geometrySize - 2] = INVALID;\n } else {\n segmentTypes[vertexStart] += START_CAP;\n segmentTypes[vertexStart + geometrySize - 2] += END_CAP;\n }\n segmentTypes[vertexStart + geometrySize - 1] = INVALID;\n }\n\n _updatePositions(path, context) {\n const {positions} = this.attributes;\n if (!positions) {\n return;\n }\n const {vertexStart, geometrySize} = context;\n const p = new Array(3);\n\n // positions -- A0 A1 B0 B1 B2 B3 B0 B1 B2 --\n // segmentTypes 3 4 4 0 0 0 0 4 4\n for (let i = vertexStart, ptIndex = 0; ptIndex < geometrySize; i++, ptIndex++) {\n this.getPointOnPath(path, ptIndex, p);\n positions[i * 3] = p[0];\n positions[i * 3 + 1] = p[1];\n positions[i * 3 + 2] = p[2];\n }\n }\n\n /* Utilities */\n // Returns the number of points in the path\n getPathLength(path) {\n return path.length / this.positionSize;\n }\n\n // Returns a point on the path at the specified index\n getPointOnPath(path, index, target = []) {\n const {positionSize} = this;\n if (index * positionSize >= path.length) {\n // loop\n index += 1 - path.length / positionSize;\n }\n const i = index * positionSize;\n target[0] = path[i];\n target[1] = path[i + 1];\n target[2] = (positionSize === 3 && path[i + 2]) || 0;\n return target;\n }\n\n // Returns true if the first and last points are identical\n isClosed(path) {\n if (!this.normalize) {\n return this.opts.loop;\n }\n const {positionSize} = this;\n const lastPointIndex = path.length - positionSize;\n return (\n path[0] === path[lastPointIndex] &&\n path[1] === path[lastPointIndex + 1] &&\n (positionSize === 2 || path[2] === path[lastPointIndex + 2])\n );\n }\n}\n","import {cutPolylineByGrid, cutPolylineByMercatorBounds} from '@math.gl/polygon';\n\n/** Returns a flat array of path positions\n * Flattens a nested path object\n * Cut the feature if needed (globe projection, wrap longitude, etc.)\n */\nexport function normalizePath(path, size, gridResolution, wrapLongitude) {\n let flatPath = path;\n if (Array.isArray(path[0])) {\n const length = path.length * size;\n flatPath = new Array(length);\n for (let i = 0; i < path.length; i++) {\n for (let j = 0; j < size; j++) {\n flatPath[i * size + j] = path[i][j] || 0;\n }\n }\n }\n if (gridResolution) {\n return cutPolylineByGrid(flatPath, {size, gridResolution});\n }\n if (wrapLongitude) {\n return cutPolylineByMercatorBounds(flatPath, {size});\n }\n return flatPath;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, picking, log, UNIT} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry} from '@luma.gl/core';\n\nimport PathTesselator from './path-tesselator';\n\nimport vs from './path-layer-vertex.glsl';\nimport fs from './path-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst defaultProps = {\n widthUnits: 'meters',\n widthScale: {type: 'number', min: 0, value: 1}, // stroke width in meters\n widthMinPixels: {type: 'number', min: 0, value: 0}, // min stroke width in pixels\n widthMaxPixels: {type: 'number', min: 0, value: Number.MAX_SAFE_INTEGER}, // max stroke width in pixels\n jointRounded: false,\n capRounded: false,\n miterLimit: {type: 'number', min: 0, value: 4},\n billboard: false,\n // `loop` or `open`\n _pathType: null,\n\n getPath: {type: 'accessor', value: object => object.path},\n getColor: {type: 'accessor', value: DEFAULT_COLOR},\n getWidth: {type: 'accessor', value: 1},\n\n // deprecated props\n rounded: {deprecatedFor: ['jointRounded', 'capRounded']}\n};\n\nconst ATTRIBUTE_TRANSITION = {\n enter: (value, chunk) => {\n return chunk.length ? chunk.subarray(chunk.length - value.length) : value;\n }\n};\n\nexport default class PathLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, picking]}); // 'project' module added by default.\n }\n\n get wrapLongitude() {\n return false;\n }\n\n initializeState() {\n const noAlloc = true;\n const attributeManager = this.getAttributeManager();\n /* eslint-disable max-len */\n attributeManager.addInstanced({\n positions: {\n size: 3,\n // Start filling buffer from 1 vertex in\n vertexOffset: 1,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: ATTRIBUTE_TRANSITION,\n accessor: 'getPath',\n update: this.calculatePositions,\n noAlloc,\n shaderAttributes: {\n instanceLeftPositions: {\n vertexOffset: 0\n },\n instanceStartPositions: {\n vertexOffset: 1\n },\n instanceEndPositions: {\n vertexOffset: 2\n },\n instanceRightPositions: {\n vertexOffset: 3\n }\n }\n },\n instanceTypes: {\n size: 1,\n type: GL.UNSIGNED_BYTE,\n update: this.calculateSegmentTypes,\n noAlloc\n },\n instanceStrokeWidths: {\n size: 1,\n accessor: 'getWidth',\n transition: ATTRIBUTE_TRANSITION,\n defaultValue: 1\n },\n instanceColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n accessor: 'getColor',\n transition: ATTRIBUTE_TRANSITION,\n defaultValue: DEFAULT_COLOR\n },\n instancePickingColors: {\n size: 3,\n type: GL.UNSIGNED_BYTE,\n accessor: (object, {index, target: value}) =>\n this.encodePickingColor(object && object.__source ? object.__source.index : index, value)\n }\n });\n /* eslint-enable max-len */\n\n this.setState({\n pathTesselator: new PathTesselator({\n fp64: this.use64bitPositions()\n })\n });\n\n if (this.props.getDashArray && !this.props.extensions.length) {\n log.removed('getDashArray', 'PathStyleExtension')();\n }\n }\n\n updateState({oldProps, props, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n\n const attributeManager = this.getAttributeManager();\n\n const geometryChanged =\n changeFlags.dataChanged ||\n (changeFlags.updateTriggersChanged &&\n (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getPath));\n\n if (geometryChanged) {\n const {pathTesselator} = this.state;\n const buffers = props.data.attributes || {};\n\n pathTesselator.updateGeometry({\n data: props.data,\n geometryBuffer: buffers.getPath,\n buffers,\n normalize: !props._pathType,\n loop: props._pathType === 'loop',\n getGeometry: props.getPath,\n positionFormat: props.positionFormat,\n wrapLongitude: props.wrapLongitude,\n // TODO - move the flag out of the viewport\n resolution: this.context.viewport.resolution,\n dataChanged: changeFlags.dataChanged\n });\n this.setState({\n numInstances: pathTesselator.instanceCount,\n startIndices: pathTesselator.vertexStarts\n });\n if (!changeFlags.dataChanged) {\n // Base `layer.updateState` only invalidates all attributes on data change\n // Cover the rest of the scenarios here\n attributeManager.invalidateAll();\n }\n }\n\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n attributeManager.invalidateAll();\n }\n }\n\n getPickingInfo(params) {\n const info = super.getPickingInfo(params);\n const {index} = info;\n const {data} = this.props;\n\n // Check if data comes from a composite layer, wrapped with getSubLayerRow\n if (data[0] && data[0].__source) {\n // index decoded from picking color refers to the source index\n info.object = data.find(d => d.__source.index === index);\n }\n return info;\n }\n\n disablePickingIndex(objectIndex) {\n const {data} = this.props;\n\n // Check if data comes from a composite layer, wrapped with getSubLayerRow\n if (data[0] && data[0].__source) {\n // index decoded from picking color refers to the source index\n for (let i = 0; i < data.length; i++) {\n if (data[i].__source.index === objectIndex) {\n this._disablePickingIndex(i);\n }\n }\n } else {\n this._disablePickingIndex(objectIndex);\n }\n }\n\n draw({uniforms}) {\n const {\n jointRounded,\n capRounded,\n billboard,\n miterLimit,\n widthUnits,\n widthScale,\n widthMinPixels,\n widthMaxPixels\n } = this.props;\n\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n jointType: Number(jointRounded),\n capType: Number(capRounded),\n billboard,\n widthUnits: UNIT[widthUnits],\n widthScale,\n miterLimit,\n widthMinPixels,\n widthMaxPixels\n })\n .draw();\n }\n\n _getModel(gl) {\n /*\n * _\n * \"-_ 1 3 5\n * _ \"o---------------------o-------------------_-o\n * - / \"\"--..__ '. _.-' /\n * _ \"@- - - - - \"\"--..__- - - - x - - - -_.@' /\n * \"-_ / \"\"--..__ '. _,-` : /\n * \"o----------------------------\"\"-o' : /\n * 0,2 4 / '. : /\n * / '.: /\n * / :'. /\n * / : ', /\n * / : o\n */\n\n // prettier-ignore\n const SEGMENT_INDICES = [\n // start corner\n 0, 1, 2,\n // body\n 1, 4, 2,\n 1, 3, 4,\n // end corner\n 3, 5, 4\n ];\n\n // [0] position on segment - 0: start, 1: end\n // [1] side of path - -1: left, 0: center (joint), 1: right\n // prettier-ignore\n const SEGMENT_POSITIONS = [\n // bevel start corner\n 0, 0,\n // start inner corner\n 0, -1,\n // start outer corner\n 0, 1,\n // end inner corner\n 1, -1,\n // end outer corner\n 1, 1,\n // bevel end corner\n 1, 0\n ];\n\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLES,\n attributes: {\n indices: new Uint16Array(SEGMENT_INDICES),\n positions: {value: new Float32Array(SEGMENT_POSITIONS), size: 2}\n }\n }),\n isInstanced: true\n });\n }\n\n calculatePositions(attribute) {\n const {pathTesselator} = this.state;\n\n attribute.startIndices = pathTesselator.vertexStarts;\n attribute.value = pathTesselator.get('positions');\n }\n\n calculateSegmentTypes(attribute) {\n const {pathTesselator} = this.state;\n\n attribute.startIndices = pathTesselator.vertexStarts;\n attribute.value = pathTesselator.get('segmentTypes');\n }\n}\n\nPathLayer.layerName = 'PathLayer';\nPathLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME path-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute float instanceTypes;\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec3 instanceLeftPositions;\nattribute vec3 instanceRightPositions;\nattribute vec3 instanceLeftPositions64Low;\nattribute vec3 instanceStartPositions64Low;\nattribute vec3 instanceEndPositions64Low;\nattribute vec3 instanceRightPositions64Low;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float capType;\nuniform float miterLimit;\nuniform bool billboard;\nuniform int widthUnits;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n return -(float(flag) * 2. - 1.);\n}\n\n// calculate line join positions\nvec3 lineJoin(\n vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n vec2 width\n) {\n bool isEnd = positions.x > 0.0;\n // side of the segment - -1: left, 0: center, 1: right\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n\n // tangent of the corner\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n // direction of the corner\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n // direction of the segment\n vec2 dir = isEnd ? dirA : dirB;\n // direction of the extrusion\n vec2 perp = isEnd ? perpA : perpB;\n // length of the segment\n float L = isEnd ? lenA : lenB;\n\n // A = angle of the corner\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n\n // -1: right, 1: left\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n\n // relative position to the corner:\n // -1: inside (smaller side of the angle)\n // 0: center\n // 1: outside (bigger side of the angle)\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n // trim if inside corner extends further than the line segment\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n\n // special treatment for start cap and end cap\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n\n // extend out a triangle to envelope the round cap\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = capType;\n } else {\n vJointType = jointType;\n }\n\n // Generate variables for fragment shader\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return currPoint + offset;\n}\n\n// In clipspace extrusion, if a line extends behind the camera, clip it to avoid visual artifacts\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);\n vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);\n\n vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);\n\n vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);\n vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0);\n vec3 width;\n\n if (billboard) {\n // Extrude in clipspace\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 pos = lineJoin(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n gl_Position = vec4(pos * currPositionScreen.w, currPositionScreen.w);\n } else {\n // Extrude in commonspace\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec4 pos = vec4(\n lineJoin(prevPosition, currPosition, nextPosition, width.xy),\n 1.0);\n geometry.position = pos;\n gl_Position = project_common_position_to_clipspace(pos);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME path-layer-fragment-shader\n\nprecision highp float;\n\nuniform float miterLimit;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\n/*\n * vPathPosition represents the relative coordinates of the current fragment on the path segment.\n * vPathPosition.x - position along the width of the path, between [-1, 1]. 0 is the center line.\n * vPathPosition.y - position along the length of the path, between [0, L / width].\n */\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nvoid main(void) {\n geometry.uv = vPathPosition;\n\n if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {\n // if joint is rounded, test distance from the corner\n if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {\n discard;\n }\n // trim miter\n if (vJointType < 0.5 && vMiterLength > miterLimit + 1.0) {\n discard;\n }\n }\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","/* global document */\nimport GL from '@luma.gl/constants';\nimport {Texture2D, copyToTexture, cloneTextureFrom} from '@luma.gl/core';\nimport {ImageLoader} from '@loaders.gl/images';\nimport {load} from '@loaders.gl/core';\nimport {createIterable} from '@deck.gl/core';\n\nconst DEFAULT_CANVAS_WIDTH = 1024;\nconst DEFAULT_BUFFER = 4;\n\nconst noop = () => {};\n\nconst DEFAULT_TEXTURE_PARAMETERS = {\n [GL.TEXTURE_MIN_FILTER]: GL.LINEAR_MIPMAP_LINEAR,\n // GL.LINEAR is the default value but explicitly set it here\n [GL.TEXTURE_MAG_FILTER]: GL.LINEAR,\n // for texture boundary artifact\n [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE\n};\n\nfunction nextPowOfTwo(number) {\n return Math.pow(2, Math.ceil(Math.log2(number)));\n}\n\n// update comment to create a new texture and copy original data.\nfunction resizeImage(ctx, imageData, width, height) {\n if (width === imageData.width && height === imageData.height) {\n return imageData;\n }\n\n ctx.canvas.height = height;\n ctx.canvas.width = width;\n\n ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\n\n // image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight\n ctx.drawImage(imageData, 0, 0, imageData.width, imageData.height, 0, 0, width, height);\n\n return ctx.canvas;\n}\n\nfunction getIconId(icon) {\n return icon && (icon.id || icon.url);\n}\n\n// resize texture without losing original data\nfunction resizeTexture(gl, texture, width, height) {\n const oldWidth = texture.width;\n const oldHeight = texture.height;\n\n const newTexture = cloneTextureFrom(texture, {width, height});\n copyToTexture(texture, newTexture, {\n targetY: 0,\n width: oldWidth,\n height: oldHeight\n });\n\n texture.delete();\n return newTexture;\n}\n\n// traverse icons in a row of icon atlas\n// extend each icon with left-top coordinates\nfunction buildRowMapping(mapping, columns, yOffset) {\n for (let i = 0; i < columns.length; i++) {\n const {icon, xOffset} = columns[i];\n const id = getIconId(icon);\n mapping[id] = {\n ...icon,\n x: xOffset,\n y: yOffset\n };\n }\n}\n\n/**\n * Generate coordinate mapping to retrieve icon left-top position from an icon atlas\n * @param icons {Array<Object>} list of icons, each icon requires url, width, height\n * @param buffer {Number} add buffer to the right and bottom side of the image\n * @param xOffset {Number} right position of last icon in old mapping\n * @param yOffset {Number} top position in last icon in old mapping\n * @param rowHeight {Number} rowHeight of the last icon's row\n * @param canvasWidth {Number} max width of canvas\n * @param mapping {object} old mapping\n * @returns {{mapping: {'/icon/1': {url, width, height, ...}},, canvasHeight: {Number}}}\n */\nexport function buildMapping({\n icons,\n buffer,\n mapping = {},\n xOffset = 0,\n yOffset = 0,\n rowHeight = 0,\n canvasWidth\n}) {\n let columns = [];\n // Strategy to layout all the icons into a texture:\n // traverse the icons sequentially, layout the icons from left to right, top to bottom\n // when the sum of the icons width is equal or larger than canvasWidth,\n // move to next row starting from total height so far plus max height of the icons in previous row\n // row width is equal to canvasWidth\n // row height is decided by the max height of the icons in that row\n // mapping coordinates of each icon is its left-top position in the texture\n for (let i = 0; i < icons.length; i++) {\n const icon = icons[i];\n const id = getIconId(icon);\n\n if (!mapping[id]) {\n const {height, width} = icon;\n\n // fill one row\n if (xOffset + width + buffer > canvasWidth) {\n buildRowMapping(mapping, columns, yOffset);\n\n xOffset = 0;\n yOffset = rowHeight + yOffset + buffer;\n rowHeight = 0;\n columns = [];\n }\n\n columns.push({\n icon,\n xOffset\n });\n\n xOffset = xOffset + width + buffer;\n rowHeight = Math.max(rowHeight, height);\n }\n }\n\n if (columns.length > 0) {\n buildRowMapping(mapping, columns, yOffset);\n }\n\n return {\n mapping,\n rowHeight,\n xOffset,\n yOffset,\n canvasWidth,\n canvasHeight: nextPowOfTwo(rowHeight + yOffset + buffer)\n };\n}\n\n// extract icons from data\n// return icons should be unique, and not cached or cached but url changed\nexport function getDiffIcons(data, getIcon, cachedIcons) {\n if (!data || !getIcon) {\n return null;\n }\n\n cachedIcons = cachedIcons || {};\n const icons = {};\n const {iterable, objectInfo} = createIterable(data);\n for (const object of iterable) {\n objectInfo.index++;\n const icon = getIcon(object, objectInfo);\n const id = getIconId(icon);\n\n if (!icon) {\n throw new Error('Icon is missing.');\n }\n\n if (!icon.url) {\n throw new Error('Icon url is missing.');\n }\n\n if (!icons[id] && (!cachedIcons[id] || icon.url !== cachedIcons[id].url)) {\n icons[id] = {...icon, source: object, sourceIndex: objectInfo.index};\n }\n }\n return icons;\n}\n\nexport default class IconManager {\n constructor(\n gl,\n {\n onUpdate = noop, // notify IconLayer when icon texture update\n onError = noop\n }\n ) {\n this.gl = gl;\n this.onUpdate = onUpdate;\n this.onError = onError;\n\n // load options used for loading images\n this._loadOptions = null;\n this._getIcon = null;\n\n this._texture = null;\n this._externalTexture = null;\n this._mapping = {};\n // count of pending requests to fetch icons\n this._pendingCount = 0;\n\n this._autoPacking = false;\n\n // internal props used when autoPacking applied\n // right position of last icon\n this._xOffset = 0;\n // top position of last icon\n this._yOffset = 0;\n this._rowHeight = 0;\n this._buffer = DEFAULT_BUFFER;\n this._canvasWidth = DEFAULT_CANVAS_WIDTH;\n this._canvasHeight = 0;\n this._canvas = null;\n }\n\n finalize() {\n this._texture?.delete();\n }\n\n getTexture() {\n return this._texture || this._externalTexture;\n }\n\n getIconMapping(icon) {\n const id = this._autoPacking ? getIconId(icon) : icon;\n return this._mapping[id] || {};\n }\n\n setProps({loadOptions, autoPacking, iconAtlas, iconMapping, data, getIcon}) {\n if (loadOptions) {\n this._loadOptions = loadOptions;\n }\n\n if (autoPacking !== undefined) {\n this._autoPacking = autoPacking;\n }\n\n if (getIcon) {\n this._getIcon = getIcon;\n }\n\n if (iconMapping) {\n this._mapping = iconMapping;\n }\n\n if (iconAtlas) {\n this._updateIconAtlas(iconAtlas);\n }\n\n if (this._autoPacking && (data || getIcon) && typeof document !== 'undefined') {\n this._canvas = this._canvas || document.createElement('canvas');\n\n this._updateAutoPacking(data);\n }\n }\n\n get isLoaded() {\n return this._pendingCount === 0;\n }\n\n _updateIconAtlas(iconAtlas) {\n this._texture?.delete();\n this._texture = null;\n this._externalTexture = iconAtlas;\n this.onUpdate();\n }\n\n _updateAutoPacking(data) {\n const icons = Object.values(getDiffIcons(data, this._getIcon, this._mapping) || {});\n\n if (icons.length > 0) {\n // generate icon mapping\n const {mapping, xOffset, yOffset, rowHeight, canvasHeight} = buildMapping({\n icons,\n buffer: this._buffer,\n canvasWidth: this._canvasWidth,\n mapping: this._mapping,\n rowHeight: this._rowHeight,\n xOffset: this._xOffset,\n yOffset: this._yOffset\n });\n\n this._rowHeight = rowHeight;\n this._mapping = mapping;\n this._xOffset = xOffset;\n this._yOffset = yOffset;\n this._canvasHeight = canvasHeight;\n\n // create new texture\n if (!this._texture) {\n this._texture = new Texture2D(this.gl, {\n width: this._canvasWidth,\n height: this._canvasHeight,\n parameters: DEFAULT_TEXTURE_PARAMETERS\n });\n }\n\n if (this._texture.height !== this._canvasHeight) {\n this._texture = resizeTexture(\n this.gl,\n this._texture,\n this._canvasWidth,\n this._canvasHeight\n );\n }\n\n this.onUpdate();\n\n // load images\n this._loadIcons(icons);\n }\n }\n\n _loadIcons(icons) {\n const ctx = this._canvas.getContext('2d');\n\n for (const icon of icons) {\n this._pendingCount++;\n load(icon.url, ImageLoader, this._loadOptions)\n .then(imageData => {\n const id = getIconId(icon);\n const {x, y, width, height} = this._mapping[id];\n\n const data = resizeImage(ctx, imageData, width, height);\n\n this._texture.setSubImageData({\n data,\n x,\n y,\n width,\n height\n });\n\n // Call to regenerate mipmaps after modifying texture(s)\n this._texture.generateMipmap();\n\n this.onUpdate();\n })\n .catch(error => {\n this.onError({\n url: icon.url,\n source: icon.source,\n sourceIndex: icon.sourceIndex,\n loadOptions: this._loadOptions,\n error\n });\n })\n .finally(() => {\n this._pendingCount--;\n });\n }\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport {Layer, project32, picking, log, UNIT} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry} from '@luma.gl/core';\n\nimport vs from './icon-layer-vertex.glsl';\nimport fs from './icon-layer-fragment.glsl';\nimport IconManager from './icon-manager';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n/*\n * @param {object} props\n * @param {Texture2D | string} props.iconAtlas - atlas image url or texture\n * @param {object} props.iconMapping - icon names mapped to icon definitions\n * @param {object} props.iconMapping[icon_name].x - x position of icon on the atlas image\n * @param {object} props.iconMapping[icon_name].y - y position of icon on the atlas image\n * @param {object} props.iconMapping[icon_name].width - width of icon on the atlas image\n * @param {object} props.iconMapping[icon_name].height - height of icon on the atlas image\n * @param {object} props.iconMapping[icon_name].anchorX - x anchor of icon on the atlas image,\n * default to width / 2\n * @param {object} props.iconMapping[icon_name].anchorY - y anchor of icon on the atlas image,\n * default to height / 2\n * @param {object} props.iconMapping[icon_name].mask - whether icon is treated as a transparency\n * mask. If true, user defined color is applied. If false, original color from the image is\n * applied. Default to false.\n * @param {number} props.size - icon size in pixels\n * @param {func} props.getPosition - returns anchor position of the icon, in [lng, lat, z]\n * @param {func} props.getIcon - returns icon name as a string\n * @param {func} props.getSize - returns icon size multiplier as a number\n * @param {func} props.getColor - returns color of the icon in [r, g, b, a]. Only works on icons\n * with mask: true.\n * @param {func} props.getAngle - returns rotating angle (in degree) of the icon.\n */\nconst defaultProps = {\n iconAtlas: {type: 'image', value: null, async: true},\n iconMapping: {type: 'object', value: {}, async: true},\n sizeScale: {type: 'number', value: 1, min: 0},\n billboard: true,\n sizeUnits: 'pixels',\n sizeMinPixels: {type: 'number', min: 0, value: 0}, // min point radius in pixels\n sizeMaxPixels: {type: 'number', min: 0, value: Number.MAX_SAFE_INTEGER}, // max point radius in pixels\n alphaCutoff: {type: 'number', value: 0.05, min: 0, max: 1},\n\n getPosition: {type: 'accessor', value: x => x.position},\n getIcon: {type: 'accessor', value: x => x.icon},\n getColor: {type: 'accessor', value: DEFAULT_COLOR},\n getSize: {type: 'accessor', value: 1},\n getAngle: {type: 'accessor', value: 0},\n getPixelOffset: {type: 'accessor', value: [0, 0]},\n\n onIconError: {type: 'function', value: null, compare: false, optional: true}\n};\n\nexport default class IconLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, picking]});\n }\n\n initializeState() {\n this.state = {\n iconManager: new IconManager(this.context.gl, {\n onUpdate: this._onUpdate.bind(this),\n onError: this._onError.bind(this)\n })\n };\n\n const attributeManager = this.getAttributeManager();\n /* eslint-disable max-len */\n attributeManager.addInstanced({\n instancePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getPosition'\n },\n instanceSizes: {\n size: 1,\n transition: true,\n accessor: 'getSize',\n defaultValue: 1\n },\n instanceOffsets: {size: 2, accessor: 'getIcon', transform: this.getInstanceOffset},\n instanceIconFrames: {size: 4, accessor: 'getIcon', transform: this.getInstanceIconFrame},\n instanceColorModes: {\n size: 1,\n type: GL.UNSIGNED_BYTE,\n accessor: 'getIcon',\n transform: this.getInstanceColorMode\n },\n instanceColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: true,\n accessor: 'getColor',\n defaultValue: DEFAULT_COLOR\n },\n instanceAngles: {\n size: 1,\n transition: true,\n accessor: 'getAngle'\n },\n instancePixelOffset: {\n size: 2,\n transition: true,\n accessor: 'getPixelOffset'\n }\n });\n /* eslint-enable max-len */\n }\n\n /* eslint-disable max-statements, complexity */\n updateState({oldProps, props, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n\n const attributeManager = this.getAttributeManager();\n const {iconAtlas, iconMapping, data, getIcon} = props;\n const {iconManager} = this.state;\n\n iconManager.setProps({loadOptions: props.loadOptions});\n\n let iconMappingChanged = false;\n const prePacked = iconAtlas || this.internalState.isAsyncPropLoading('iconAtlas');\n\n // prepacked iconAtlas from user\n if (prePacked) {\n if (oldProps.iconAtlas !== props.iconAtlas) {\n iconManager.setProps({iconAtlas, autoPacking: false});\n }\n\n if (oldProps.iconMapping !== props.iconMapping) {\n iconManager.setProps({iconMapping});\n iconMappingChanged = true;\n }\n } else {\n // otherwise, use autoPacking\n iconManager.setProps({autoPacking: true});\n }\n\n if (\n changeFlags.dataChanged ||\n (changeFlags.updateTriggersChanged &&\n (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getIcon))\n ) {\n iconManager.setProps({data, getIcon});\n }\n\n if (iconMappingChanged) {\n attributeManager.invalidate('instanceOffsets');\n attributeManager.invalidate('instanceIconFrames');\n attributeManager.invalidate('instanceColorModes');\n }\n\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n attributeManager.invalidateAll();\n }\n }\n /* eslint-enable max-statements, complexity */\n\n get isLoaded() {\n return super.isLoaded && this.state.iconManager.isLoaded;\n }\n\n finalizeState() {\n super.finalizeState();\n // Release resources held by the icon manager\n this.state.iconManager.finalize();\n }\n\n draw({uniforms}) {\n const {sizeScale, sizeMinPixels, sizeMaxPixels, sizeUnits, billboard, alphaCutoff} = this.props;\n const {iconManager} = this.state;\n\n const iconsTexture = iconManager.getTexture();\n if (iconsTexture) {\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n iconsTexture,\n iconsTextureDim: [iconsTexture.width, iconsTexture.height],\n sizeUnits: UNIT[sizeUnits],\n sizeScale,\n sizeMinPixels,\n sizeMaxPixels,\n billboard,\n alphaCutoff\n })\n .draw();\n }\n }\n\n _getModel(gl) {\n // The icon-layer vertex shader uses 2d positions\n // specifed via: attribute vec2 positions;\n const positions = [-1, -1, -1, 1, 1, 1, 1, -1];\n\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_FAN,\n attributes: {\n // The size must be explicitly passed here otherwise luma.gl\n // will default to assuming that positions are 3D (x,y,z)\n positions: {\n size: 2,\n value: new Float32Array(positions)\n }\n }\n }),\n isInstanced: true\n });\n }\n\n _onUpdate() {\n this.setNeedsRedraw();\n }\n\n _onError(evt) {\n const {onIconError} = this.getCurrentLayer().props;\n if (onIconError) {\n onIconError(evt);\n } else {\n log.error(evt.error)();\n }\n }\n\n getInstanceOffset(icon) {\n const rect = this.state.iconManager.getIconMapping(icon);\n return [rect.width / 2 - rect.anchorX || 0, rect.height / 2 - rect.anchorY || 0];\n }\n\n getInstanceColorMode(icon) {\n const mapping = this.state.iconManager.getIconMapping(icon);\n return mapping.mask ? 1 : 0;\n }\n\n getInstanceIconFrame(icon) {\n const rect = this.state.iconManager.getIconMapping(icon);\n return [rect.x || 0, rect.y || 0, rect.width || 0, rect.height || 0];\n }\n}\n\nIconLayer.layerName = 'IconLayer';\nIconLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME icon-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute vec4 instanceIconFrames;\nattribute float instanceColorModes;\nattribute vec2 instanceOffsets;\nattribute vec2 instancePixelOffset;\n\nuniform float sizeScale;\nuniform vec2 iconsTextureDim;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform bool billboard;\nuniform int sizeUnits;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = angle * PI / 180.0;\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n\n vec2 iconSize = instanceIconFrames.zw;\n // convert size in meters to pixels, then scaled and clamp\n \n // project meters to pixels and clamp to limits \n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits), \n sizeMinPixels, sizeMaxPixels\n );\n\n // scale icon height to match instanceSize\n float instanceScale = iconSize.y == 0.0 ? 0.0 : sizePixels / iconSize.y;\n\n // scale and rotate vertex in \"pixel\" value and convert back to fraction in clipspace\n vec2 pixelOffset = positions / 2.0 * iconSize + instanceOffsets;\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles) * instanceScale;\n pixelOffset += instancePixelOffset;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position); \n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vTextureCoords = mix(\n instanceIconFrames.xy,\n instanceIconFrames.xy + iconSize,\n (positions.xy + 1.0) / 2.0\n ) / iconsTextureDim;\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n\n vColorMode = instanceColorModes;\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float alphaCutoff;\n\nvarying float vColorMode;\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec4 texColor = texture2D(iconsTexture, vTextureCoords);\n\n // if colorMode == 0, use pixel color from the texture\n // if colorMode == 1 or rendering picking buffer, use texture as transparency mask\n vec3 color = mix(texColor.rgb, vColor.rgb, vColorMode);\n // Take the global opacity and the alpha from vColor into account for the alpha component\n float a = texColor.a * opacity * vColor.a;\n\n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color, a);\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","import { coordEach } from \"@turf/meta\";\n/**\n * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(geojson) {\n var result = [Infinity, Infinity, -Infinity, -Infinity];\n coordEach(geojson, function (coord) {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\nbbox[\"default\"] = bbox;\nexport default bbox;\n","import bbox from \"@turf/bbox\";\nimport { point, } from \"@turf/helpers\";\n/**\n * Takes a {@link Feature} or {@link FeatureCollection} and returns the absolute center point of all features.\n *\n * @name center\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] Translate GeoJSON Properties to Point\n * @param {Object} [options.bbox={}] Translate GeoJSON BBox to Point\n * @param {Object} [options.id={}] Translate GeoJSON Id to Point\n * @returns {Feature<Point>} a Point feature at the absolute center point of all input features\n * @example\n * var features = turf.points([\n * [-97.522259, 35.4691],\n * [-97.502754, 35.463455],\n * [-97.508269, 35.463245]\n * ]);\n *\n * var center = turf.center(features);\n *\n * //addToMap\n * var addToMap = [features, center]\n * center.properties['marker-size'] = 'large';\n * center.properties['marker-color'] = '#000';\n */\nfunction center(geojson, options) {\n if (options === void 0) { options = {}; }\n var ext = bbox(geojson);\n var x = (ext[0] + ext[2]) / 2;\n var y = (ext[1] + ext[3]) / 2;\n return point([x, y], options.properties, options);\n}\nexport default center;\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","'use strict';\n\nmodule.exports = function (data, opts) {\n if (!opts) opts = {};\n if (typeof opts === 'function') opts = { cmp: opts };\n var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false;\n\n var cmp = opts.cmp && (function (f) {\n return function (node) {\n return function (a, b) {\n var aobj = { key: a, value: node[a] };\n var bobj = { key: b, value: node[b] };\n return f(aobj, bobj);\n };\n };\n })(opts.cmp);\n\n var seen = [];\n return (function stringify (node) {\n if (node && node.toJSON && typeof node.toJSON === 'function') {\n node = node.toJSON();\n }\n\n if (node === undefined) return;\n if (typeof node == 'number') return isFinite(node) ? '' + node : 'null';\n if (typeof node !== 'object') return JSON.stringify(node);\n\n var i, out;\n if (Array.isArray(node)) {\n out = '[';\n for (i = 0; i < node.length; i++) {\n if (i) out += ',';\n out += stringify(node[i]) || 'null';\n }\n return out + ']';\n }\n\n if (node === null) return 'null';\n\n if (seen.indexOf(node) !== -1) {\n if (cycles) return JSON.stringify('__cycle__');\n throw new TypeError('Converting circular structure to JSON');\n }\n\n var seenIndex = seen.push(node) - 1;\n var keys = Object.keys(node).sort(cmp && cmp(node));\n out = '';\n for (i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = stringify(node[key]);\n\n if (!value) continue;\n if (out) out += ',';\n out += JSON.stringify(key) + ':' + value;\n }\n seen.splice(seenIndex, 1);\n return '{' + out + '}';\n })(data);\n};\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n/* eslint-disable complexity */\n\nimport * as mat4 from 'gl-matrix/mat4';\nimport * as vec4 from 'gl-matrix/vec4';\n\nimport {COORDINATE_SYSTEM, PROJECTION_MODE} from '../../lib/constants';\n\nimport memoize from '../../utils/memoize';\n\n// To quickly set a vector to zero\nconst ZERO_VECTOR = [0, 0, 0, 0];\n// 4x4 matrix that drops 4th component of vector\nconst VECTOR_TO_POINT_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0];\nconst IDENTITY_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\nconst DEFAULT_PIXELS_PER_UNIT2 = [0, 0, 0];\nconst DEFAULT_COORDINATE_ORIGIN = [0, 0, 0];\n\nconst getMemoizedViewportUniforms = memoize(calculateViewportUniforms);\n\nexport function getOffsetOrigin(\n viewport,\n coordinateSystem,\n coordinateOrigin = DEFAULT_COORDINATE_ORIGIN\n) {\n let shaderCoordinateOrigin = coordinateOrigin;\n let geospatialOrigin;\n let offsetMode = true;\n\n if (\n coordinateSystem === COORDINATE_SYSTEM.LNGLAT_OFFSETS ||\n coordinateSystem === COORDINATE_SYSTEM.METER_OFFSETS\n ) {\n geospatialOrigin = coordinateOrigin;\n } else {\n geospatialOrigin = viewport.isGeospatial\n ? [Math.fround(viewport.longitude), Math.fround(viewport.latitude), 0]\n : null;\n }\n\n switch (viewport.projectionMode) {\n case PROJECTION_MODE.WEB_MERCATOR:\n if (\n coordinateSystem === COORDINATE_SYSTEM.LNGLAT ||\n coordinateSystem === COORDINATE_SYSTEM.CARTESIAN\n ) {\n geospatialOrigin = [0, 0, 0];\n offsetMode = false;\n }\n break;\n\n case PROJECTION_MODE.WEB_MERCATOR_AUTO_OFFSET:\n if (coordinateSystem === COORDINATE_SYSTEM.LNGLAT) {\n // viewport center in world space\n shaderCoordinateOrigin = geospatialOrigin;\n } else if (coordinateSystem === COORDINATE_SYSTEM.CARTESIAN) {\n // viewport center in common space\n shaderCoordinateOrigin = [\n Math.fround(viewport.center[0]),\n Math.fround(viewport.center[1]),\n 0\n ];\n // Geospatial origin (wgs84) must match shaderCoordinateOrigin (common)\n geospatialOrigin = viewport.unprojectPosition(shaderCoordinateOrigin);\n shaderCoordinateOrigin[0] -= coordinateOrigin[0];\n shaderCoordinateOrigin[1] -= coordinateOrigin[1];\n shaderCoordinateOrigin[2] -= coordinateOrigin[2];\n }\n break;\n\n case PROJECTION_MODE.IDENTITY:\n shaderCoordinateOrigin = viewport.position.map(Math.fround);\n break;\n\n case PROJECTION_MODE.GLOBE:\n offsetMode = false;\n geospatialOrigin = null;\n break;\n\n default:\n // Unknown projection mode\n offsetMode = false;\n }\n\n shaderCoordinateOrigin[2] = shaderCoordinateOrigin[2] || 0;\n\n return {geospatialOrigin, shaderCoordinateOrigin, offsetMode};\n}\n\n// The code that utilizes Matrix4 does the same calculation as their mat4 counterparts,\n// has lower performance but provides error checking.\nfunction calculateMatrixAndOffset(viewport, coordinateSystem, coordinateOrigin) {\n const {viewMatrixUncentered, projectionMatrix} = viewport;\n let {viewMatrix, viewProjectionMatrix} = viewport;\n\n let projectionCenter = ZERO_VECTOR;\n let originCommon = ZERO_VECTOR;\n let cameraPosCommon = viewport.cameraPosition;\n const {geospatialOrigin, shaderCoordinateOrigin, offsetMode} = getOffsetOrigin(\n viewport,\n coordinateSystem,\n coordinateOrigin\n );\n\n if (offsetMode) {\n // Calculate transformed projectionCenter (using 64 bit precision JS)\n // This is the key to offset mode precision\n // (avoids doing this addition in 32 bit precision in GLSL)\n originCommon = viewport.projectPosition(geospatialOrigin || shaderCoordinateOrigin);\n\n cameraPosCommon = [\n cameraPosCommon[0] - originCommon[0],\n cameraPosCommon[1] - originCommon[1],\n cameraPosCommon[2] - originCommon[2]\n ];\n\n originCommon[3] = 1;\n\n // projectionCenter = new Matrix4(viewProjectionMatrix)\n // .transformVector([positionPixels[0], positionPixels[1], 0.0, 1.0]);\n projectionCenter = vec4.transformMat4([], originCommon, viewProjectionMatrix);\n\n // Always apply uncentered projection matrix if available (shader adds center)\n viewMatrix = viewMatrixUncentered || viewMatrix;\n\n // Zero out 4th coordinate (\"after\" model matrix) - avoids further translations\n // viewMatrix = new Matrix4(viewMatrixUncentered || viewMatrix)\n // .multiplyRight(VECTOR_TO_POINT_MATRIX);\n viewProjectionMatrix = mat4.multiply([], projectionMatrix, viewMatrix);\n viewProjectionMatrix = mat4.multiply([], viewProjectionMatrix, VECTOR_TO_POINT_MATRIX);\n }\n\n return {\n viewMatrix,\n viewProjectionMatrix,\n projectionCenter,\n originCommon,\n cameraPosCommon,\n shaderCoordinateOrigin,\n geospatialOrigin\n };\n}\n\n/**\n * Returns uniforms for shaders based on current projection\n * includes: projection matrix suitable for shaders\n *\n * TODO - Ensure this works with any viewport, not just WebMercatorViewports\n *\n * @param {WebMercatorViewport} viewport -\n * @return {Float32Array} - 4x4 projection matrix that can be used in shaders\n */\nexport function getUniformsFromViewport({\n viewport,\n devicePixelRatio = 1,\n modelMatrix = null,\n // Match Layer.defaultProps\n coordinateSystem = COORDINATE_SYSTEM.DEFAULT,\n coordinateOrigin,\n autoWrapLongitude = false\n} = {}) {\n if (coordinateSystem === COORDINATE_SYSTEM.DEFAULT) {\n coordinateSystem = viewport.isGeospatial\n ? COORDINATE_SYSTEM.LNGLAT\n : COORDINATE_SYSTEM.CARTESIAN;\n }\n\n const uniforms = getMemoizedViewportUniforms({\n viewport,\n devicePixelRatio,\n coordinateSystem,\n coordinateOrigin\n });\n\n uniforms.project_uWrapLongitude = autoWrapLongitude;\n uniforms.project_uModelMatrix = modelMatrix || IDENTITY_MATRIX;\n\n return uniforms;\n}\n\nfunction calculateViewportUniforms({\n viewport,\n devicePixelRatio,\n coordinateSystem,\n coordinateOrigin\n}) {\n const {\n projectionCenter,\n viewProjectionMatrix,\n originCommon,\n cameraPosCommon,\n shaderCoordinateOrigin,\n geospatialOrigin\n } = calculateMatrixAndOffset(viewport, coordinateSystem, coordinateOrigin);\n\n // Calculate projection pixels per unit\n const distanceScales = viewport.getDistanceScales();\n\n const viewportSize = [viewport.width * devicePixelRatio, viewport.height * devicePixelRatio];\n\n // Distance at which screen pixels are projected.\n // Used to scale sizes in clipspace to match screen pixels.\n // When using Viewport class's default projection matrix, this yields 1 for orthographic\n // and `viewport.focalDistance` for perspective views\n const focalDistance =\n viewport.projectionMatrix.transform([0, 0, -viewport.focalDistance, 1])[3] || 1;\n\n const uniforms = {\n // Projection mode values\n project_uCoordinateSystem: coordinateSystem,\n project_uProjectionMode: viewport.projectionMode,\n project_uCoordinateOrigin: shaderCoordinateOrigin,\n project_uCommonOrigin: originCommon.slice(0, 3),\n project_uCenter: projectionCenter,\n\n // Backward compatibility\n // TODO: remove in v9\n project_uPseudoMeters: Boolean(viewport._pseudoMeters),\n\n // Screen size\n project_uViewportSize: viewportSize,\n project_uDevicePixelRatio: devicePixelRatio,\n\n project_uFocalDistance: focalDistance,\n project_uCommonUnitsPerMeter: distanceScales.unitsPerMeter,\n project_uCommonUnitsPerWorldUnit: distanceScales.unitsPerMeter,\n project_uCommonUnitsPerWorldUnit2: DEFAULT_PIXELS_PER_UNIT2,\n project_uScale: viewport.scale, // This is the mercator scale (2 ** zoom)\n\n project_uViewProjectionMatrix: viewProjectionMatrix,\n\n // This is for lighting calculations\n project_uCameraPosition: cameraPosCommon\n };\n\n if (geospatialOrigin) {\n const distanceScalesAtOrigin = viewport.getDistanceScales(geospatialOrigin);\n switch (coordinateSystem) {\n case COORDINATE_SYSTEM.METER_OFFSETS:\n uniforms.project_uCommonUnitsPerWorldUnit = distanceScalesAtOrigin.unitsPerMeter;\n uniforms.project_uCommonUnitsPerWorldUnit2 = distanceScalesAtOrigin.unitsPerMeter2;\n break;\n\n case COORDINATE_SYSTEM.LNGLAT:\n case COORDINATE_SYSTEM.LNGLAT_OFFSETS:\n if (!viewport._pseudoMeters) {\n uniforms.project_uCommonUnitsPerMeter = distanceScalesAtOrigin.unitsPerMeter;\n }\n uniforms.project_uCommonUnitsPerWorldUnit = distanceScalesAtOrigin.unitsPerDegree;\n uniforms.project_uCommonUnitsPerWorldUnit2 = distanceScalesAtOrigin.unitsPerDegree2;\n break;\n\n // a.k.a \"preprojected\" positions\n case COORDINATE_SYSTEM.CARTESIAN:\n uniforms.project_uCommonUnitsPerWorldUnit = [1, 1, distanceScalesAtOrigin.unitsPerMeter[2]];\n uniforms.project_uCommonUnitsPerWorldUnit2 = [\n 0,\n 0,\n distanceScalesAtOrigin.unitsPerMeter2[2]\n ];\n break;\n\n default:\n break;\n }\n }\n\n return uniforms;\n}\n","export default class ViewState {\n constructor(opts) {\n this._viewportProps = this._applyConstraints(opts);\n }\n\n getViewportProps() {\n return this._viewportProps;\n }\n\n getState() {\n return this._state;\n }\n\n shortestPathFrom(viewState) {\n return this._viewportProps;\n }\n\n // Redefined by subclass\n // Apply any constraints (mathematical or defined by _viewportProps) to map state\n _applyConstraints(props) {\n return props;\n }\n}\n","// Copyright (c) 2015-2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport {COORDINATE_SYSTEM, PROJECTION_MODE} from '../../lib/constants';\nimport project from '../project/project';\nimport {Vector3, Matrix4} from 'math.gl';\nimport memoize from '../../utils/memoize';\nimport {pixelsToWorld} from '@math.gl/web-mercator';\n\nconst vs = `\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n if (shadow_uDrawShadowMap) {\n return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n }\n if (shadow_uUseShadowMap) {\n for (int i = 0; i < max_lights; i++) {\n if(i < int(shadow_uLightCount)) {\n vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n }\n }\n }\n return gl_Position;\n}\n`;\n\nconst fs = `\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n float z = dot(rgbaDepth, bitUnpackShift);\n return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n if (shadow_uDrawShadowMap) {\n vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n rgbaDepth -= rgbaDepth.gbaa * bitMask;\n return rgbaDepth;\n }\n if (shadow_uUseShadowMap) {\n float shadowAlpha = 0.0;\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n if(shadow_uLightCount > 1.0) {\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n }\n shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n return vec4(\n mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n blendedAlpha\n );\n }\n return color;\n}\n`;\n\nconst getMemoizedViewportCenterPosition = memoize(getViewportCenterPosition);\nconst getMemoizedViewProjectionMatrices = memoize(getViewProjectionMatrices);\n\nconst DEFAULT_SHADOW_COLOR = [0, 0, 0, 1.0];\nconst VECTOR_TO_POINT_MATRIX = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0];\n\nfunction screenToCommonSpace(xyz, pixelUnprojectionMatrix) {\n const [x, y, z] = xyz;\n const coord = pixelsToWorld([x, y, z], pixelUnprojectionMatrix);\n\n if (Number.isFinite(z)) {\n return coord;\n }\n return [coord[0], coord[1], 0];\n}\n\nfunction getViewportCenterPosition({viewport, center}) {\n return new Matrix4(viewport.viewProjectionMatrix).invert().transform(center);\n}\n\nfunction getViewProjectionMatrices({viewport, shadowMatrices}) {\n const projectionMatrices = [];\n const pixelUnprojectionMatrix = viewport.pixelUnprojectionMatrix;\n const farZ = viewport.isGeospatial ? undefined : 1;\n const corners = [\n [0, 0, farZ], // top left ground\n [viewport.width, 0, farZ], // top right ground\n [0, viewport.height, farZ], // bottom left ground\n [viewport.width, viewport.height, farZ], // bottom right ground\n [0, 0, -1], // top left near\n [viewport.width, 0, -1], // top right near\n [0, viewport.height, -1], // bottom left near\n [viewport.width, viewport.height, -1] // bottom right near\n ].map(pixel => screenToCommonSpace(pixel, pixelUnprojectionMatrix));\n\n for (const shadowMatrix of shadowMatrices) {\n const viewMatrix = shadowMatrix.clone().translate(new Vector3(viewport.center).negate());\n const positions = corners.map(corner => viewMatrix.transform(corner));\n const projectionMatrix = new Matrix4().ortho({\n left: Math.min(...positions.map(position => position[0])),\n right: Math.max(...positions.map(position => position[0])),\n bottom: Math.min(...positions.map(position => position[1])),\n top: Math.max(...positions.map(position => position[1])),\n near: Math.min(...positions.map(position => -position[2])),\n far: Math.max(...positions.map(position => -position[2]))\n });\n projectionMatrices.push(projectionMatrix.multiplyRight(shadowMatrix));\n }\n return projectionMatrices;\n}\n\nfunction createShadowUniforms(opts = {}, context = {}) {\n const uniforms = {\n shadow_uDrawShadowMap: Boolean(opts.drawToShadowMap),\n shadow_uUseShadowMap: opts.shadowMaps ? opts.shadowMaps.length > 0 : false,\n shadow_uColor: opts.shadowColor || DEFAULT_SHADOW_COLOR,\n shadow_uLightId: opts.shadowLightId || 0,\n shadow_uLightCount: opts.shadowMatrices.length\n };\n\n const center = getMemoizedViewportCenterPosition({\n viewport: opts.viewport,\n center: context.project_uCenter\n });\n\n const projectCenters = [];\n const viewProjectionMatrices = getMemoizedViewProjectionMatrices({\n shadowMatrices: opts.shadowMatrices,\n viewport: opts.viewport\n }).slice();\n\n for (let i = 0; i < opts.shadowMatrices.length; i++) {\n const viewProjectionMatrix = viewProjectionMatrices[i];\n const viewProjectionMatrixCentered = viewProjectionMatrix\n .clone()\n .translate(new Vector3(opts.viewport.center).negate());\n\n if (\n context.project_uCoordinateSystem === COORDINATE_SYSTEM.LNGLAT &&\n context.project_uProjectionMode === PROJECTION_MODE.WEB_MERCATOR\n ) {\n viewProjectionMatrices[i] = viewProjectionMatrixCentered;\n projectCenters[i] = center;\n } else {\n viewProjectionMatrices[i] = viewProjectionMatrix\n .clone()\n .multiplyRight(VECTOR_TO_POINT_MATRIX);\n projectCenters[i] = viewProjectionMatrixCentered.transform(center);\n }\n }\n\n for (let i = 0; i < viewProjectionMatrices.length; i++) {\n uniforms[`shadow_uViewProjectionMatrices[${i}]`] = viewProjectionMatrices[i];\n uniforms[`shadow_uProjectCenters[${i}]`] = projectCenters[i];\n\n if (opts.shadowMaps && opts.shadowMaps.length > 0) {\n uniforms[`shadow_uShadowMap${i}`] = opts.shadowMaps[i];\n } else {\n uniforms[`shadow_uShadowMap${i}`] = opts.dummyShadowMap;\n }\n }\n return uniforms;\n}\n\nexport default {\n name: 'shadow',\n dependencies: [project],\n vs,\n fs,\n inject: {\n 'vs:DECKGL_FILTER_GL_POSITION': `\n position = shadow_setVertexPosition(geometry.position);\n `,\n 'fs:DECKGL_FILTER_COLOR': `\n color = shadow_filterShadowColor(color);\n `\n },\n getUniforms: (opts = {}, context = {}) => {\n if (opts.drawToShadowMap || (opts.shadowMaps && opts.shadowMaps.length > 0)) {\n const {shadowEnabled = true} = opts;\n return shadowEnabled && opts.shadowMatrices && opts.shadowMatrices.length > 0\n ? createShadowUniforms(opts, context)\n : {\n shadow_uDrawShadowMap: false,\n shadow_uUseShadowMap: false\n };\n }\n return {};\n }\n};\n",";(function (globalScope) {\r\n 'use strict';\r\n\r\n\r\n /*\r\n * decimal.js v10.2.1\r\n * An arbitrary-precision Decimal type for JavaScript.\r\n * https://github.com/MikeMcl/decimal.js\r\n * Copyright (c) 2020 Michael Mclaughlin <M8ch88l@gmail.com>\r\n * MIT Licence\r\n */\r\n\r\n\r\n // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ //\r\n\r\n\r\n // The maximum exponent magnitude.\r\n // The limit on the value of `toExpNeg`, `toExpPos`, `minE` and `maxE`.\r\n var EXP_LIMIT = 9e15, // 0 to 9e15\r\n\r\n // The limit on the value of `precision`, and on the value of the first argument to\r\n // `toDecimalPlaces`, `toExponential`, `toFixed`, `toPrecision` and `toSignificantDigits`.\r\n MAX_DIGITS = 1e9, // 0 to 1e9\r\n\r\n // Base conversion alphabet.\r\n NUMERALS = '0123456789abcdef',\r\n\r\n // The natural logarithm of 10 (1025 digits).\r\n LN10 = '2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058',\r\n\r\n // Pi (1025 digits).\r\n PI = '3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789',\r\n\r\n\r\n // The initial configuration properties of the Decimal constructor.\r\n DEFAULTS = {\r\n\r\n // These values must be integers within the stated ranges (inclusive).\r\n // Most of these values can be changed at run-time using the `Decimal.config` method.\r\n\r\n // The maximum number of significant digits of the result of a calculation or base conversion.\r\n // E.g. `Decimal.config({ precision: 20 });`\r\n precision: 20, // 1 to MAX_DIGITS\r\n\r\n // The rounding mode used when rounding to `precision`.\r\n //\r\n // ROUND_UP 0 Away from zero.\r\n // ROUND_DOWN 1 Towards zero.\r\n // ROUND_CEIL 2 Towards +Infinity.\r\n // ROUND_FLOOR 3 Towards -Infinity.\r\n // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.\r\n // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.\r\n // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.\r\n // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.\r\n // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.\r\n //\r\n // E.g.\r\n // `Decimal.rounding = 4;`\r\n // `Decimal.rounding = Decimal.ROUND_HALF_UP;`\r\n rounding: 4, // 0 to 8\r\n\r\n // The modulo mode used when calculating the modulus: a mod n.\r\n // The quotient (q = a / n) is calculated according to the corresponding rounding mode.\r\n // The remainder (r) is calculated as: r = a - n * q.\r\n //\r\n // UP 0 The remainder is positive if the dividend is negative, else is negative.\r\n // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).\r\n // FLOOR 3 The remainder has the same sign as the divisor (Python %).\r\n // HALF_EVEN 6 The IEEE 754 remainder function.\r\n // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.\r\n //\r\n // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian\r\n // division (9) are commonly used for the modulus operation. The other rounding modes can also\r\n // be used, but they may not give useful results.\r\n modulo: 1, // 0 to 9\r\n\r\n // The exponent value at and beneath which `toString` returns exponential notation.\r\n // JavaScript numbers: -7\r\n toExpNeg: -7, // 0 to -EXP_LIMIT\r\n\r\n // The exponent value at and above which `toString` returns exponential notation.\r\n // JavaScript numbers: 21\r\n toExpPos: 21, // 0 to EXP_LIMIT\r\n\r\n // The minimum exponent value, beneath which underflow to zero occurs.\r\n // JavaScript numbers: -324 (5e-324)\r\n minE: -EXP_LIMIT, // -1 to -EXP_LIMIT\r\n\r\n // The maximum exponent value, above which overflow to Infinity occurs.\r\n // JavaScript numbers: 308 (1.7976931348623157e+308)\r\n maxE: EXP_LIMIT, // 1 to EXP_LIMIT\r\n\r\n // Whether to use cryptographically-secure random number generation, if available.\r\n crypto: false // true/false\r\n },\r\n\r\n\r\n // ----------------------------------- END OF EDITABLE DEFAULTS ------------------------------- //\r\n\r\n\r\n Decimal, inexact, noConflict, quadrant,\r\n external = true,\r\n\r\n decimalError = '[DecimalError] ',\r\n invalidArgument = decimalError + 'Invalid argument: ',\r\n precisionLimitExceeded = decimalError + 'Precision limit exceeded',\r\n cryptoUnavailable = decimalError + 'crypto unavailable',\r\n\r\n mathfloor = Math.floor,\r\n mathpow = Math.pow,\r\n\r\n isBinary = /^0b([01]+(\\.[01]*)?|\\.[01]+)(p[+-]?\\d+)?$/i,\r\n isHex = /^0x([0-9a-f]+(\\.[0-9a-f]*)?|\\.[0-9a-f]+)(p[+-]?\\d+)?$/i,\r\n isOctal = /^0o([0-7]+(\\.[0-7]*)?|\\.[0-7]+)(p[+-]?\\d+)?$/i,\r\n isDecimal = /^(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i,\r\n\r\n BASE = 1e7,\r\n LOG_BASE = 7,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n\r\n LN10_PRECISION = LN10.length - 1,\r\n PI_PRECISION = PI.length - 1,\r\n\r\n // Decimal.prototype object\r\n P = { name: '[object Decimal]' };\r\n\r\n\r\n // Decimal prototype methods\r\n\r\n\r\n /*\r\n * absoluteValue abs\r\n * ceil\r\n * comparedTo cmp\r\n * cosine cos\r\n * cubeRoot cbrt\r\n * decimalPlaces dp\r\n * dividedBy div\r\n * dividedToIntegerBy divToInt\r\n * equals eq\r\n * floor\r\n * greaterThan gt\r\n * greaterThanOrEqualTo gte\r\n * hyperbolicCosine cosh\r\n * hyperbolicSine sinh\r\n * hyperbolicTangent tanh\r\n * inverseCosine acos\r\n * inverseHyperbolicCosine acosh\r\n * inverseHyperbolicSine asinh\r\n * inverseHyperbolicTangent atanh\r\n * inverseSine asin\r\n * inverseTangent atan\r\n * isFinite\r\n * isInteger isInt\r\n * isNaN\r\n * isNegative isNeg\r\n * isPositive isPos\r\n * isZero\r\n * lessThan lt\r\n * lessThanOrEqualTo lte\r\n * logarithm log\r\n * [maximum] [max]\r\n * [minimum] [min]\r\n * minus sub\r\n * modulo mod\r\n * naturalExponential exp\r\n * naturalLogarithm ln\r\n * negated neg\r\n * plus add\r\n * precision sd\r\n * round\r\n * sine sin\r\n * squareRoot sqrt\r\n * tangent tan\r\n * times mul\r\n * toBinary\r\n * toDecimalPlaces toDP\r\n * toExponential\r\n * toFixed\r\n * toFraction\r\n * toHexadecimal toHex\r\n * toNearest\r\n * toNumber\r\n * toOctal\r\n * toPower pow\r\n * toPrecision\r\n * toSignificantDigits toSD\r\n * toString\r\n * truncated trunc\r\n * valueOf toJSON\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of this Decimal.\r\n *\r\n */\r\n P.absoluteValue = P.abs = function () {\r\n var x = new this.constructor(this);\r\n if (x.s < 0) x.s = 1;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of positive Infinity.\r\n *\r\n */\r\n P.ceil = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 2);\r\n };\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if the value of this Decimal is greater than the value of `y`,\r\n * -1 if the value of this Decimal is less than the value of `y`,\r\n * 0 if they have the same value,\r\n * NaN if the value of either Decimal is NaN.\r\n *\r\n */\r\n P.comparedTo = P.cmp = function (y) {\r\n var i, j, xdL, ydL,\r\n x = this,\r\n xd = x.d,\r\n yd = (y = new x.constructor(y)).d,\r\n xs = x.s,\r\n ys = y.s;\r\n\r\n // Either NaN or ±Infinity?\r\n if (!xd || !yd) {\r\n return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Either zero?\r\n if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;\r\n\r\n // Signs differ?\r\n if (xs !== ys) return xs;\r\n\r\n // Compare exponents.\r\n if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;\r\n\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Compare digit by digit.\r\n for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {\r\n if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;\r\n }\r\n\r\n // Compare lengths.\r\n return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * cos(0) = 1\r\n * cos(-0) = 1\r\n * cos(Infinity) = NaN\r\n * cos(-Infinity) = NaN\r\n * cos(NaN) = NaN\r\n *\r\n */\r\n P.cosine = P.cos = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.d) return new Ctor(NaN);\r\n\r\n // cos(0) = cos(-0) = 1\r\n if (!x.d[0]) return new Ctor(1);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = cosine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n *\r\n * Return a new Decimal whose value is the cube root of the value of this Decimal, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * cbrt(0) = 0\r\n * cbrt(-0) = -0\r\n * cbrt(1) = 1\r\n * cbrt(-1) = -1\r\n * cbrt(N) = N\r\n * cbrt(-I) = -I\r\n * cbrt(I) = I\r\n *\r\n * Math.cbrt(x) = (x < 0 ? -Math.pow(-x, 1/3) : Math.pow(x, 1/3))\r\n *\r\n */\r\n P.cubeRoot = P.cbrt = function () {\r\n var e, m, n, r, rep, s, sd, t, t3, t3plusx,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = x.s * mathpow(x.s * x, 1 / 3);\r\n\r\n // Math.cbrt underflow/overflow?\r\n // Pass x to Math.pow as integer, then adjust the exponent of the result.\r\n if (!s || Math.abs(s) == 1 / 0) {\r\n n = digitsToString(x.d);\r\n e = x.e;\r\n\r\n // Adjust n exponent so it is a multiple of 3 away from x exponent.\r\n if (s = (e - n.length + 1) % 3) n += (s == 1 || s == -2 ? '0' : '00');\r\n s = mathpow(n, 1 / 3);\r\n\r\n // Rarely, e may be one less than the result exponent value.\r\n e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n r.s = x.s;\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Halley's method.\r\n // TODO? Compare Newton's method.\r\n for (;;) {\r\n t = r;\r\n t3 = t.times(t).times(t);\r\n t3plusx = t3.plus(x);\r\n r = divide(t3plusx.plus(x).times(t), t3plusx.plus(t3), sd + 2, 1);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or 4999\r\n // , i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return the number of decimal places of the value of this Decimal.\r\n *\r\n */\r\n P.decimalPlaces = P.dp = function () {\r\n var w,\r\n d = this.d,\r\n n = NaN;\r\n\r\n if (d) {\r\n w = d.length - 1;\r\n n = (w - mathfloor(this.e / LOG_BASE)) * LOG_BASE;\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n w = d[w];\r\n if (w) for (; w % 10 == 0; w /= 10) n--;\r\n if (n < 0) n = 0;\r\n }\r\n\r\n return n;\r\n };\r\n\r\n\r\n /*\r\n * n / 0 = I\r\n * n / N = N\r\n * n / I = 0\r\n * 0 / n = 0\r\n * 0 / 0 = N\r\n * 0 / N = N\r\n * 0 / I = 0\r\n * N / n = N\r\n * N / 0 = N\r\n * N / N = N\r\n * N / I = N\r\n * I / n = I\r\n * I / 0 = I\r\n * I / N = N\r\n * I / I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal divided by `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedBy = P.div = function (y) {\r\n return divide(this, new this.constructor(y));\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the integer part of dividing the value of this Decimal\r\n * by the value of `y`, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.dividedToIntegerBy = P.divToInt = function (y) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n return finalise(divide(x, new Ctor(y), 0, 1, 1), Ctor.precision, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is equal to the value of `y`, otherwise return false.\r\n *\r\n */\r\n P.equals = P.eq = function (y) {\r\n return this.cmp(y) === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number in the\r\n * direction of negative Infinity.\r\n *\r\n */\r\n P.floor = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 3);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than the value of `y`, otherwise return\r\n * false.\r\n *\r\n */\r\n P.greaterThan = P.gt = function (y) {\r\n return this.cmp(y) > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is greater than or equal to the value of `y`,\r\n * otherwise return false.\r\n *\r\n */\r\n P.greaterThanOrEqualTo = P.gte = function (y) {\r\n var k = this.cmp(y);\r\n return k == 1 || k === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [1, Infinity]\r\n *\r\n * cosh(x) = 1 + x^2/2! + x^4/4! + x^6/6! + ...\r\n *\r\n * cosh(0) = 1\r\n * cosh(-0) = 1\r\n * cosh(Infinity) = Infinity\r\n * cosh(-Infinity) = Infinity\r\n * cosh(NaN) = NaN\r\n *\r\n * x time taken (ms) result\r\n * 1000 9 9.8503555700852349694e+433\r\n * 10000 25 4.4034091128314607936e+4342\r\n * 100000 171 1.4033316802130615897e+43429\r\n * 1000000 3817 1.5166076984010437725e+434294\r\n * 10000000 abandoned after 2 minute wait\r\n *\r\n * TODO? Compare performance of cosh(x) = 0.5 * (exp(x) + exp(-x))\r\n *\r\n */\r\n P.hyperbolicCosine = P.cosh = function () {\r\n var k, n, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor,\r\n one = new Ctor(1);\r\n\r\n if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);\r\n if (x.isZero()) return one;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n // Argument reduction: cos(4x) = 1 - 8cos^2(x) + 8cos^4(x) + 1\r\n // i.e. cos(x) = 1 - cos^2(x/4)(8 - 8cos^2(x/4))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n // TODO? Estimation reused from cosine() and may not be optimal here.\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n n = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n n = '2.3283064365386962890625e-10';\r\n }\r\n\r\n x = taylorSeries(Ctor, 1, x.times(n), new Ctor(1), true);\r\n\r\n // Reverse argument reduction\r\n var cosh2_x,\r\n i = k,\r\n d8 = new Ctor(8);\r\n for (; i--;) {\r\n cosh2_x = x.times(x);\r\n x = one.minus(cosh2_x.times(d8.minus(cosh2_x.times(d8))));\r\n }\r\n\r\n return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * sinh(x) = x + x^3/3! + x^5/5! + x^7/7! + ...\r\n *\r\n * sinh(0) = 0\r\n * sinh(-0) = -0\r\n * sinh(Infinity) = Infinity\r\n * sinh(-Infinity) = -Infinity\r\n * sinh(NaN) = NaN\r\n *\r\n * x time taken (ms)\r\n * 10 2 ms\r\n * 100 5 ms\r\n * 1000 14 ms\r\n * 10000 82 ms\r\n * 100000 886 ms 1.4033316802130615897e+43429\r\n * 200000 2613 ms\r\n * 300000 5407 ms\r\n * 400000 8824 ms\r\n * 500000 13026 ms 8.7080643612718084129e+217146\r\n * 1000000 48543 ms\r\n *\r\n * TODO? Compare performance of sinh(x) = 0.5 * (exp(x) - exp(-x))\r\n *\r\n */\r\n P.hyperbolicSine = P.sinh = function () {\r\n var k, pr, rm, len,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n len = x.d.length;\r\n\r\n if (len < 3) {\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n } else {\r\n\r\n // Alternative argument reduction: sinh(3x) = sinh(x)(3 + 4sinh^2(x))\r\n // i.e. sinh(x) = sinh(x/3)(3 + 4sinh^2(x/3))\r\n // 3 multiplications and 1 addition\r\n\r\n // Argument reduction: sinh(5x) = sinh(x)(5 + sinh^2(x)(20 + 16sinh^2(x)))\r\n // i.e. sinh(x) = sinh(x/5)(5 + sinh^2(x/5)(20 + 16sinh^2(x/5)))\r\n // 4 multiplications and 2 additions\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x, true);\r\n\r\n // Reverse argument reduction\r\n var sinh2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sinh2_x = x.times(x);\r\n x = x.times(d5.plus(sinh2_x.times(d16.times(sinh2_x).plus(d20))));\r\n }\r\n }\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of the value in radians of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * tanh(x) = sinh(x) / cosh(x)\r\n *\r\n * tanh(0) = 0\r\n * tanh(-0) = -0\r\n * tanh(Infinity) = 1\r\n * tanh(-Infinity) = -1\r\n * tanh(NaN) = NaN\r\n *\r\n */\r\n P.hyperbolicTangent = P.tanh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(x.s);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 7;\r\n Ctor.rounding = 1;\r\n\r\n return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine (inverse cosine) in radians of the value of\r\n * this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [0, pi]\r\n *\r\n * acos(x) = pi/2 - asin(x)\r\n *\r\n * acos(0) = pi/2\r\n * acos(-0) = pi/2\r\n * acos(1) = 0\r\n * acos(-1) = pi\r\n * acos(1/2) = pi/3\r\n * acos(-1/2) = 2*pi/3\r\n * acos(|x| > 1) = NaN\r\n * acos(NaN) = NaN\r\n *\r\n */\r\n P.inverseCosine = P.acos = function () {\r\n var halfPi,\r\n x = this,\r\n Ctor = x.constructor,\r\n k = x.abs().cmp(1),\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n return k === 0\r\n // |x| is 1\r\n ? x.isNeg() ? getPi(Ctor, pr, rm) : new Ctor(0)\r\n // |x| > 1 or x is NaN\r\n : new Ctor(NaN);\r\n }\r\n\r\n if (x.isZero()) return getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n // TODO? Special case acos(0.5) = pi/3 and acos(-0.5) = 2*pi/3\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.asin();\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return halfPi.minus(x);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [1, Infinity]\r\n * Range: [0, Infinity]\r\n *\r\n * acosh(x) = ln(x + sqrt(x^2 - 1))\r\n *\r\n * acosh(x < 1) = NaN\r\n * acosh(NaN) = NaN\r\n * acosh(Infinity) = Infinity\r\n * acosh(-Infinity) = NaN\r\n * acosh(0) = NaN\r\n * acosh(-0) = NaN\r\n * acosh(1) = 0\r\n * acosh(-1) = NaN\r\n *\r\n */\r\n P.inverseHyperbolicCosine = P.acosh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.lte(1)) return new Ctor(x.eq(1) ? 0 : NaN);\r\n if (!x.isFinite()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(Math.abs(x.e), x.sd()) + 4;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).minus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * asinh(x) = ln(x + sqrt(x^2 + 1))\r\n *\r\n * asinh(NaN) = NaN\r\n * asinh(Infinity) = Infinity\r\n * asinh(-Infinity) = -Infinity\r\n * asinh(0) = 0\r\n * asinh(-0) = -0\r\n *\r\n */\r\n P.inverseHyperbolicSine = P.asinh = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite() || x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 2 * Math.max(Math.abs(x.e), x.sd()) + 6;\r\n Ctor.rounding = 1;\r\n external = false;\r\n\r\n x = x.times(x).plus(1).sqrt().plus(x);\r\n\r\n external = true;\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.ln();\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent in radians of the\r\n * value of this Decimal.\r\n *\r\n * Domain: [-1, 1]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * atanh(x) = 0.5 * ln((1 + x) / (1 - x))\r\n *\r\n * atanh(|x| > 1) = NaN\r\n * atanh(NaN) = NaN\r\n * atanh(Infinity) = NaN\r\n * atanh(-Infinity) = NaN\r\n * atanh(0) = 0\r\n * atanh(-0) = -0\r\n * atanh(1) = Infinity\r\n * atanh(-1) = -Infinity\r\n *\r\n */\r\n P.inverseHyperbolicTangent = P.atanh = function () {\r\n var pr, rm, wpr, xsd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.e >= 0) return new Ctor(x.abs().eq(1) ? x.s / 0 : x.isZero() ? x : NaN);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n xsd = x.sd();\r\n\r\n if (Math.max(xsd, pr) < 2 * -x.e - 1) return finalise(new Ctor(x), pr, rm, true);\r\n\r\n Ctor.precision = wpr = xsd - x.e;\r\n\r\n x = divide(x.plus(1), new Ctor(1).minus(x), wpr + pr, 1);\r\n\r\n Ctor.precision = pr + 4;\r\n Ctor.rounding = 1;\r\n\r\n x = x.ln();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(0.5);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine (inverse sine) in radians of the value of this\r\n * Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * asin(x) = 2*atan(x/(1 + sqrt(1 - x^2)))\r\n *\r\n * asin(0) = 0\r\n * asin(-0) = -0\r\n * asin(1/2) = pi/6\r\n * asin(-1/2) = -pi/6\r\n * asin(1) = pi/2\r\n * asin(-1) = -pi/2\r\n * asin(|x| > 1) = NaN\r\n * asin(NaN) = NaN\r\n *\r\n * TODO? Compare performance of Taylor series.\r\n *\r\n */\r\n P.inverseSine = P.asin = function () {\r\n var halfPi, k,\r\n pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n k = x.abs().cmp(1);\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (k !== -1) {\r\n\r\n // |x| is 1\r\n if (k === 0) {\r\n halfPi = getPi(Ctor, pr + 4, rm).times(0.5);\r\n halfPi.s = x.s;\r\n return halfPi;\r\n }\r\n\r\n // |x| > 1 or x is NaN\r\n return new Ctor(NaN);\r\n }\r\n\r\n // TODO? Special case asin(1/2) = pi/6 and asin(-1/2) = -pi/6\r\n\r\n Ctor.precision = pr + 6;\r\n Ctor.rounding = 1;\r\n\r\n x = x.div(new Ctor(1).minus(x.times(x)).sqrt().plus(1)).atan();\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return x.times(2);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent (inverse tangent) in radians of the value\r\n * of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi/2, pi/2]\r\n *\r\n * atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n *\r\n * atan(0) = 0\r\n * atan(-0) = -0\r\n * atan(1) = pi/4\r\n * atan(-1) = -pi/4\r\n * atan(Infinity) = pi/2\r\n * atan(-Infinity) = -pi/2\r\n * atan(NaN) = NaN\r\n *\r\n */\r\n P.inverseTangent = P.atan = function () {\r\n var i, j, k, n, px, t, r, wpr, x2,\r\n x = this,\r\n Ctor = x.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding;\r\n\r\n if (!x.isFinite()) {\r\n if (!x.s) return new Ctor(NaN);\r\n if (pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.5);\r\n r.s = x.s;\r\n return r;\r\n }\r\n } else if (x.isZero()) {\r\n return new Ctor(x);\r\n } else if (x.abs().eq(1) && pr + 4 <= PI_PRECISION) {\r\n r = getPi(Ctor, pr + 4, rm).times(0.25);\r\n r.s = x.s;\r\n return r;\r\n }\r\n\r\n Ctor.precision = wpr = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n // TODO? if (x >= 1 && pr <= PI_PRECISION) atan(x) = halfPi * x.s - atan(1 / x);\r\n\r\n // Argument reduction\r\n // Ensure |x| < 0.42\r\n // atan(x) = 2 * atan(x / (1 + sqrt(1 + x^2)))\r\n\r\n k = Math.min(28, wpr / LOG_BASE + 2 | 0);\r\n\r\n for (i = k; i; --i) x = x.div(x.times(x).plus(1).sqrt().plus(1));\r\n\r\n external = false;\r\n\r\n j = Math.ceil(wpr / LOG_BASE);\r\n n = 1;\r\n x2 = x.times(x);\r\n r = new Ctor(x);\r\n px = x;\r\n\r\n // atan(x) = x - x^3/3 + x^5/5 - x^7/7 + ...\r\n for (; i !== -1;) {\r\n px = px.times(x2);\r\n t = r.minus(px.div(n += 2));\r\n\r\n px = px.times(x2);\r\n r = t.plus(px.div(n += 2));\r\n\r\n if (r.d[j] !== void 0) for (i = j; r.d[i] === t.d[i] && i--;);\r\n }\r\n\r\n if (k) r = r.times(2 << (k - 1));\r\n\r\n external = true;\r\n\r\n return finalise(r, Ctor.precision = pr, Ctor.rounding = rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is a finite number, otherwise return false.\r\n *\r\n */\r\n P.isFinite = function () {\r\n return !!this.d;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is an integer, otherwise return false.\r\n *\r\n */\r\n P.isInteger = P.isInt = function () {\r\n return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is NaN, otherwise return false.\r\n *\r\n */\r\n P.isNaN = function () {\r\n return !this.s;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is negative, otherwise return false.\r\n *\r\n */\r\n P.isNegative = P.isNeg = function () {\r\n return this.s < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is positive, otherwise return false.\r\n *\r\n */\r\n P.isPositive = P.isPos = function () {\r\n return this.s > 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is 0 or -0, otherwise return false.\r\n *\r\n */\r\n P.isZero = function () {\r\n return !!this.d && this.d[0] === 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThan = P.lt = function (y) {\r\n return this.cmp(y) < 0;\r\n };\r\n\r\n\r\n /*\r\n * Return true if the value of this Decimal is less than or equal to `y`, otherwise return false.\r\n *\r\n */\r\n P.lessThanOrEqualTo = P.lte = function (y) {\r\n return this.cmp(y) < 1;\r\n };\r\n\r\n\r\n /*\r\n * Return the logarithm of the value of this Decimal to the specified base, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * If no base is specified, return log[10](arg).\r\n *\r\n * log[base](arg) = ln(arg) / ln(base)\r\n *\r\n * The result will always be correctly rounded if the base of the log is 10, and 'almost always'\r\n * otherwise:\r\n *\r\n * Depending on the rounding mode, the result may be incorrectly rounded if the first fifteen\r\n * rounding digits are [49]99999999999999 or [50]00000000000000. In that case, the maximum error\r\n * between the result and the correctly rounded result will be one ulp (unit in the last place).\r\n *\r\n * log[-b](a) = NaN\r\n * log[0](a) = NaN\r\n * log[1](a) = NaN\r\n * log[NaN](a) = NaN\r\n * log[Infinity](a) = NaN\r\n * log[b](0) = -Infinity\r\n * log[b](-0) = -Infinity\r\n * log[b](-a) = NaN\r\n * log[b](1) = 0\r\n * log[b](Infinity) = Infinity\r\n * log[b](NaN) = NaN\r\n *\r\n * [base] {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n P.logarithm = P.log = function (base) {\r\n var isBase10, d, denominator, k, inf, num, sd, r,\r\n arg = this,\r\n Ctor = arg.constructor,\r\n pr = Ctor.precision,\r\n rm = Ctor.rounding,\r\n guard = 5;\r\n\r\n // Default base is 10.\r\n if (base == null) {\r\n base = new Ctor(10);\r\n isBase10 = true;\r\n } else {\r\n base = new Ctor(base);\r\n d = base.d;\r\n\r\n // Return NaN if base is negative, or non-finite, or is 0 or 1.\r\n if (base.s < 0 || !d || !d[0] || base.eq(1)) return new Ctor(NaN);\r\n\r\n isBase10 = base.eq(10);\r\n }\r\n\r\n d = arg.d;\r\n\r\n // Is arg negative, non-finite, 0 or 1?\r\n if (arg.s < 0 || !d || !d[0] || arg.eq(1)) {\r\n return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);\r\n }\r\n\r\n // The result will have a non-terminating decimal expansion if base is 10 and arg is not an\r\n // integer power of 10.\r\n if (isBase10) {\r\n if (d.length > 1) {\r\n inf = true;\r\n } else {\r\n for (k = d[0]; k % 10 === 0;) k /= 10;\r\n inf = k !== 1;\r\n }\r\n }\r\n\r\n external = false;\r\n sd = pr + guard;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n\r\n // The result will have 5 rounding digits.\r\n r = divide(num, denominator, sd, 1);\r\n\r\n // If at a rounding boundary, i.e. the result's rounding digits are [49]9999 or [50]0000,\r\n // calculate 10 further digits.\r\n //\r\n // If the result is known to have an infinite decimal expansion, repeat this until it is clear\r\n // that the result is above or below the boundary. Otherwise, if after calculating the 10\r\n // further digits, the last 14 are nines, round up and assume the result is exact.\r\n // Also assume the result is exact if the last 14 are zero.\r\n //\r\n // Example of a result that will be incorrectly rounded:\r\n // log[1048576](4503599627370502) = 2.60000000000000009610279511444746...\r\n // The above result correctly rounded using ROUND_CEIL to 1 decimal place should be 2.7, but it\r\n // will be given as 2.6 as there are 15 zeros immediately after the requested decimal place, so\r\n // the exact result would be assumed to be 2.6, which rounded using ROUND_CEIL to 1 decimal\r\n // place is still 2.6.\r\n if (checkRoundingDigits(r.d, k = pr, rm)) {\r\n\r\n do {\r\n sd += 10;\r\n num = naturalLogarithm(arg, sd);\r\n denominator = isBase10 ? getLn10(Ctor, sd + 10) : naturalLogarithm(base, sd);\r\n r = divide(num, denominator, sd, 1);\r\n\r\n if (!inf) {\r\n\r\n // Check for 14 nines from the 2nd rounding digit, as the first may be 4.\r\n if (+digitsToString(r.d).slice(k + 1, k + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n\r\n break;\r\n }\r\n } while (checkRoundingDigits(r.d, k += 10, rm));\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.max = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'lt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments and the value of this Decimal.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n P.min = function () {\r\n Array.prototype.push.call(arguments, this);\r\n return maxOrMin(this.constructor, arguments, 'gt');\r\n };\r\n */\r\n\r\n\r\n /*\r\n * n - 0 = n\r\n * n - N = N\r\n * n - I = -I\r\n * 0 - n = -n\r\n * 0 - 0 = 0\r\n * 0 - N = N\r\n * 0 - I = -I\r\n * N - n = N\r\n * N - 0 = N\r\n * N - N = N\r\n * N - I = N\r\n * I - n = I\r\n * I - 0 = I\r\n * I - N = N\r\n * I - I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal minus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.minus = P.sub = function (y) {\r\n var d, e, i, j, k, len, pr, rm, xd, xe, xLTy, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return y negated if x is finite and y is ±Infinity.\r\n else if (x.d) y.s = -y.s;\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with different signs.\r\n // Return NaN if both are ±Infinity with the same sign.\r\n else y = new Ctor(y.d || x.s !== y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.plus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return y negated if x is zero and y is non-zero.\r\n if (yd[0]) y.s = -y.s;\r\n\r\n // Return x if y is zero and x is non-zero.\r\n else if (xd[0]) y = new Ctor(x);\r\n\r\n // Return zero if both are zero.\r\n // From IEEE 754 (2008) 6.3: 0 - 0 = -0 - -0 = -0 when rounding to -Infinity.\r\n else return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n e = mathfloor(y.e / LOG_BASE);\r\n xe = mathfloor(x.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n k = xe - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (k) {\r\n xLTy = k < 0;\r\n\r\n if (xLTy) {\r\n d = xd;\r\n k = -k;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = xe;\r\n len = xd.length;\r\n }\r\n\r\n // Numbers with massively different exponents would result in a very high number of\r\n // zeros needing to be prepended, but this can be avoided while still ensuring correct\r\n // rounding by limiting the number of zeros to `Math.ceil(pr / LOG_BASE) + 2`.\r\n i = Math.max(Math.ceil(pr / LOG_BASE), len) + 2;\r\n\r\n if (k > i) {\r\n k = i;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents.\r\n d.reverse();\r\n for (i = k; i--;) d.push(0);\r\n d.reverse();\r\n\r\n // Base 1e7 exponents equal.\r\n } else {\r\n\r\n // Check digits to determine which is the bigger number.\r\n\r\n i = xd.length;\r\n len = yd.length;\r\n xLTy = i < len;\r\n if (xLTy) len = i;\r\n\r\n for (i = 0; i < len; i++) {\r\n if (xd[i] != yd[i]) {\r\n xLTy = xd[i] < yd[i];\r\n break;\r\n }\r\n }\r\n\r\n k = 0;\r\n }\r\n\r\n if (xLTy) {\r\n d = xd;\r\n xd = yd;\r\n yd = d;\r\n y.s = -y.s;\r\n }\r\n\r\n len = xd.length;\r\n\r\n // Append zeros to `xd` if shorter.\r\n // Don't add zeros to `yd` if shorter as subtraction only needs to start at `yd` length.\r\n for (i = yd.length - len; i > 0; --i) xd[len++] = 0;\r\n\r\n // Subtract yd from xd.\r\n for (i = yd.length; i > k;) {\r\n\r\n if (xd[--i] < yd[i]) {\r\n for (j = i; j && xd[--j] === 0;) xd[j] = BASE - 1;\r\n --xd[j];\r\n xd[i] += BASE;\r\n }\r\n\r\n xd[i] -= yd[i];\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] === 0;) xd.pop();\r\n\r\n // Remove leading zeros and adjust exponent accordingly.\r\n for (; xd[0] === 0; xd.shift()) --e;\r\n\r\n // Zero?\r\n if (!xd[0]) return new Ctor(rm === 3 ? -0 : 0);\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * n % 0 = N\r\n * n % N = N\r\n * n % I = n\r\n * 0 % n = 0\r\n * -0 % n = -0\r\n * 0 % 0 = N\r\n * 0 % N = N\r\n * 0 % I = 0\r\n * N % n = N\r\n * N % 0 = N\r\n * N % N = N\r\n * N % I = N\r\n * I % n = N\r\n * I % 0 = N\r\n * I % N = N\r\n * I % I = N\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal modulo `y`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * The result depends on the modulo mode.\r\n *\r\n */\r\n P.modulo = P.mod = function (y) {\r\n var q,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // Return NaN if x is ±Infinity or NaN, or y is NaN or ±0.\r\n if (!x.d || !y.s || y.d && !y.d[0]) return new Ctor(NaN);\r\n\r\n // Return x if y is ±Infinity or x is ±0.\r\n if (!y.d || x.d && !x.d[0]) {\r\n return finalise(new Ctor(x), Ctor.precision, Ctor.rounding);\r\n }\r\n\r\n // Prevent rounding of intermediate calculations.\r\n external = false;\r\n\r\n if (Ctor.modulo == 9) {\r\n\r\n // Euclidian division: q = sign(y) * floor(x / abs(y))\r\n // result = x - q * y where 0 <= result < abs(y)\r\n q = divide(x, y.abs(), 0, 3, 1);\r\n q.s *= y.s;\r\n } else {\r\n q = divide(x, y, 0, Ctor.modulo, 1);\r\n }\r\n\r\n q = q.times(y);\r\n\r\n external = true;\r\n\r\n return x.minus(q);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of the value of this Decimal,\r\n * i.e. the base e raised to the power the value of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalExponential = P.exp = function () {\r\n return naturalExponential(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of the value of this Decimal,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.naturalLogarithm = P.ln = function () {\r\n return naturalLogarithm(this);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal negated, i.e. as if multiplied by\r\n * -1.\r\n *\r\n */\r\n P.negated = P.neg = function () {\r\n var x = new this.constructor(this);\r\n x.s = -x.s;\r\n return finalise(x);\r\n };\r\n\r\n\r\n /*\r\n * n + 0 = n\r\n * n + N = N\r\n * n + I = I\r\n * 0 + n = n\r\n * 0 + 0 = 0\r\n * 0 + N = N\r\n * 0 + I = I\r\n * N + n = N\r\n * N + 0 = N\r\n * N + N = N\r\n * N + I = N\r\n * I + n = I\r\n * I + 0 = I\r\n * I + N = N\r\n * I + I = I\r\n *\r\n * Return a new Decimal whose value is the value of this Decimal plus `y`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.plus = P.add = function (y) {\r\n var carry, d, e, i, k, len, pr, rm, xd, yd,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n y = new Ctor(y);\r\n\r\n // If either is not finite...\r\n if (!x.d || !y.d) {\r\n\r\n // Return NaN if either is NaN.\r\n if (!x.s || !y.s) y = new Ctor(NaN);\r\n\r\n // Return x if y is finite and x is ±Infinity.\r\n // Return x if both are ±Infinity with the same sign.\r\n // Return NaN if both are ±Infinity with different signs.\r\n // Return y if x is finite and y is ±Infinity.\r\n else if (!x.d) y = new Ctor(y.d || x.s === y.s ? x : NaN);\r\n\r\n return y;\r\n }\r\n\r\n // If signs differ...\r\n if (x.s != y.s) {\r\n y.s = -y.s;\r\n return x.minus(y);\r\n }\r\n\r\n xd = x.d;\r\n yd = y.d;\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n // If either is zero...\r\n if (!xd[0] || !yd[0]) {\r\n\r\n // Return x if y is zero.\r\n // Return y if y is non-zero.\r\n if (!yd[0]) y = new Ctor(x);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n }\r\n\r\n // x and y are finite, non-zero numbers with the same sign.\r\n\r\n // Calculate base 1e7 exponents.\r\n k = mathfloor(x.e / LOG_BASE);\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n xd = xd.slice();\r\n i = k - e;\r\n\r\n // If base 1e7 exponents differ...\r\n if (i) {\r\n\r\n if (i < 0) {\r\n d = xd;\r\n i = -i;\r\n len = yd.length;\r\n } else {\r\n d = yd;\r\n e = k;\r\n len = xd.length;\r\n }\r\n\r\n // Limit number of zeros prepended to max(ceil(pr / LOG_BASE), len) + 1.\r\n k = Math.ceil(pr / LOG_BASE);\r\n len = k > len ? k + 1 : len + 1;\r\n\r\n if (i > len) {\r\n i = len;\r\n d.length = 1;\r\n }\r\n\r\n // Prepend zeros to equalise exponents. Note: Faster to use reverse then do unshifts.\r\n d.reverse();\r\n for (; i--;) d.push(0);\r\n d.reverse();\r\n }\r\n\r\n len = xd.length;\r\n i = yd.length;\r\n\r\n // If yd is longer than xd, swap xd and yd so xd points to the longer array.\r\n if (len - i < 0) {\r\n i = len;\r\n d = yd;\r\n yd = xd;\r\n xd = d;\r\n }\r\n\r\n // Only start adding at yd.length - 1 as the further digits of xd can be left as they are.\r\n for (carry = 0; i;) {\r\n carry = (xd[--i] = xd[i] + yd[i] + carry) / BASE | 0;\r\n xd[i] %= BASE;\r\n }\r\n\r\n if (carry) {\r\n xd.unshift(carry);\r\n ++e;\r\n }\r\n\r\n // Remove trailing zeros.\r\n // No need to check for zero, as +x + +y != 0 && -x + -y != 0\r\n for (len = xd.length; xd[--len] == 0;) xd.pop();\r\n\r\n y.d = xd;\r\n y.e = getBase10Exponent(xd, e);\r\n\r\n return external ? finalise(y, pr, rm) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return the number of significant digits of the value of this Decimal.\r\n *\r\n * [z] {boolean|number} Whether to count integer-part trailing zeros: true, false, 1 or 0.\r\n *\r\n */\r\n P.precision = P.sd = function (z) {\r\n var k,\r\n x = this;\r\n\r\n if (z !== void 0 && z !== !!z && z !== 1 && z !== 0) throw Error(invalidArgument + z);\r\n\r\n if (x.d) {\r\n k = getPrecision(x.d);\r\n if (z && x.e + 1 > k) k = x.e + 1;\r\n } else {\r\n k = NaN;\r\n }\r\n\r\n return k;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a whole number using\r\n * rounding mode `rounding`.\r\n *\r\n */\r\n P.round = function () {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n return finalise(new Ctor(x), x.e + 1, Ctor.rounding);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-1, 1]\r\n *\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n *\r\n * sin(0) = 0\r\n * sin(-0) = -0\r\n * sin(Infinity) = NaN\r\n * sin(-Infinity) = NaN\r\n * sin(NaN) = NaN\r\n *\r\n */\r\n P.sine = P.sin = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + Math.max(x.e, x.sd()) + LOG_BASE;\r\n Ctor.rounding = 1;\r\n\r\n x = sine(Ctor, toLessThanHalfPi(Ctor, x));\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of this Decimal, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * sqrt(-n) = N\r\n * sqrt(N) = N\r\n * sqrt(-I) = N\r\n * sqrt(I) = I\r\n * sqrt(0) = 0\r\n * sqrt(-0) = -0\r\n *\r\n */\r\n P.squareRoot = P.sqrt = function () {\r\n var m, n, sd, r, rep, t,\r\n x = this,\r\n d = x.d,\r\n e = x.e,\r\n s = x.s,\r\n Ctor = x.constructor;\r\n\r\n // Negative/NaN/Infinity/zero?\r\n if (s !== 1 || !d || !d[0]) {\r\n return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);\r\n }\r\n\r\n external = false;\r\n\r\n // Initial estimate.\r\n s = Math.sqrt(+x);\r\n\r\n // Math.sqrt underflow/overflow?\r\n // Pass x to Math.sqrt as integer, then adjust the exponent of the result.\r\n if (s == 0 || s == 1 / 0) {\r\n n = digitsToString(d);\r\n\r\n if ((n.length + e) % 2 == 0) n += '0';\r\n s = Math.sqrt(n);\r\n e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);\r\n\r\n if (s == 1 / 0) {\r\n n = '5e' + e;\r\n } else {\r\n n = s.toExponential();\r\n n = n.slice(0, n.indexOf('e') + 1) + e;\r\n }\r\n\r\n r = new Ctor(n);\r\n } else {\r\n r = new Ctor(s.toString());\r\n }\r\n\r\n sd = (e = Ctor.precision) + 3;\r\n\r\n // Newton-Raphson iteration.\r\n for (;;) {\r\n t = r;\r\n r = t.plus(divide(x, t, sd + 2, 1)).times(0.5);\r\n\r\n // TODO? Replace with for-loop and checkRoundingDigits.\r\n if (digitsToString(t.d).slice(0, sd) === (n = digitsToString(r.d)).slice(0, sd)) {\r\n n = n.slice(sd - 3, sd + 1);\r\n\r\n // The 4th rounding digit may be in error by -1 so if the 4 rounding digits are 9999 or\r\n // 4999, i.e. approaching a rounding boundary, continue the iteration.\r\n if (n == '9999' || !rep && n == '4999') {\r\n\r\n // On the first iteration only, check to see if rounding up gives the exact result as the\r\n // nines may infinitely repeat.\r\n if (!rep) {\r\n finalise(t, e + 1, 0);\r\n\r\n if (t.times(t).eq(x)) {\r\n r = t;\r\n break;\r\n }\r\n }\r\n\r\n sd += 4;\r\n rep = 1;\r\n } else {\r\n\r\n // If the rounding digits are null, 0{0,4} or 50{0,3}, check for an exact result.\r\n // If not, then there are further digits and m will be truthy.\r\n if (!+n || !+n.slice(1) && n.charAt(0) == '5') {\r\n\r\n // Truncate to the first rounding digit.\r\n finalise(r, e + 1, 1);\r\n m = !r.times(r).eq(x);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return finalise(r, e, Ctor.rounding, m);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of the value in radians of this Decimal.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-Infinity, Infinity]\r\n *\r\n * tan(0) = 0\r\n * tan(-0) = -0\r\n * tan(Infinity) = NaN\r\n * tan(-Infinity) = NaN\r\n * tan(NaN) = NaN\r\n *\r\n */\r\n P.tangent = P.tan = function () {\r\n var pr, rm,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (!x.isFinite()) return new Ctor(NaN);\r\n if (x.isZero()) return new Ctor(x);\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n Ctor.precision = pr + 10;\r\n Ctor.rounding = 1;\r\n\r\n x = x.sin();\r\n x.s = 1;\r\n x = divide(x, new Ctor(1).minus(x.times(x)).sqrt(), pr + 10, 0);\r\n\r\n Ctor.precision = pr;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true);\r\n };\r\n\r\n\r\n /*\r\n * n * 0 = 0\r\n * n * N = N\r\n * n * I = I\r\n * 0 * n = 0\r\n * 0 * 0 = 0\r\n * 0 * N = N\r\n * 0 * I = N\r\n * N * n = N\r\n * N * 0 = N\r\n * N * N = N\r\n * N * I = N\r\n * I * n = I\r\n * I * 0 = N\r\n * I * N = N\r\n * I * I = I\r\n *\r\n * Return a new Decimal whose value is this Decimal times `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n */\r\n P.times = P.mul = function (y) {\r\n var carry, e, i, k, r, rL, t, xdL, ydL,\r\n x = this,\r\n Ctor = x.constructor,\r\n xd = x.d,\r\n yd = (y = new Ctor(y)).d;\r\n\r\n y.s *= x.s;\r\n\r\n // If either is NaN, ±Infinity or ±0...\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(!y.s || xd && !xd[0] && !yd || yd && !yd[0] && !xd\r\n\r\n // Return NaN if either is NaN.\r\n // Return NaN if x is ±0 and y is ±Infinity, or y is ±0 and x is ±Infinity.\r\n ? NaN\r\n\r\n // Return ±Infinity if either is ±Infinity.\r\n // Return ±0 if either is ±0.\r\n : !xd || !yd ? y.s / 0 : y.s * 0);\r\n }\r\n\r\n e = mathfloor(x.e / LOG_BASE) + mathfloor(y.e / LOG_BASE);\r\n xdL = xd.length;\r\n ydL = yd.length;\r\n\r\n // Ensure xd points to the longer array.\r\n if (xdL < ydL) {\r\n r = xd;\r\n xd = yd;\r\n yd = r;\r\n rL = xdL;\r\n xdL = ydL;\r\n ydL = rL;\r\n }\r\n\r\n // Initialise the result array with zeros.\r\n r = [];\r\n rL = xdL + ydL;\r\n for (i = rL; i--;) r.push(0);\r\n\r\n // Multiply!\r\n for (i = ydL; --i >= 0;) {\r\n carry = 0;\r\n for (k = xdL + i; k > i;) {\r\n t = r[k] + yd[i] * xd[k - i - 1] + carry;\r\n r[k--] = t % BASE | 0;\r\n carry = t / BASE | 0;\r\n }\r\n\r\n r[k] = (r[k] + carry) % BASE | 0;\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (; !r[--rL];) r.pop();\r\n\r\n if (carry) ++e;\r\n else r.shift();\r\n\r\n y.d = r;\r\n y.e = getBase10Exponent(r, e);\r\n\r\n return external ? finalise(y, Ctor.precision, Ctor.rounding) : y;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 2, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toBinary = function (sd, rm) {\r\n return toStringBinary(this, 2, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `dp`\r\n * decimal places using rounding mode `rm` or `rounding` if `rm` is omitted.\r\n *\r\n * If `dp` is omitted, return a new Decimal whose value is the value of this Decimal.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toDecimalPlaces = P.toDP = function (dp, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n if (dp === void 0) return x;\r\n\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n return finalise(x, dp + x.e + 1, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in exponential notation rounded to\r\n * `dp` fixed decimal places using rounding mode `rounding`.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toExponential = function (dp, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x, true);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), dp + 1, rm);\r\n str = finiteToString(x, true, dp + 1);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in normal (fixed-point) notation to\r\n * `dp` fixed decimal places and rounded using rounding mode `rm` or `rounding` if `rm` is\r\n * omitted.\r\n *\r\n * As with JavaScript numbers, (-0).toFixed(0) is '0', but e.g. (-0.00001).toFixed(0) is '-0'.\r\n *\r\n * [dp] {number} Decimal places. Integer, 0 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * (-0).toFixed(0) is '0', but (-0.1).toFixed(0) is '-0'.\r\n * (-0).toFixed(1) is '0.0', but (-0.01).toFixed(1) is '-0.0'.\r\n * (-0).toFixed(3) is '0.000'.\r\n * (-0.5).toFixed(0) is '-0'.\r\n *\r\n */\r\n P.toFixed = function (dp, rm) {\r\n var str, y,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (dp === void 0) {\r\n str = finiteToString(x);\r\n } else {\r\n checkInt32(dp, 0, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n y = finalise(new Ctor(x), dp + x.e + 1, rm);\r\n str = finiteToString(y, false, dp + y.e + 1);\r\n }\r\n\r\n // To determine whether to add the minus sign look at the value before it was rounded,\r\n // i.e. look at `x` rather than `y`.\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return an array representing the value of this Decimal as a simple fraction with an integer\r\n * numerator and an integer denominator.\r\n *\r\n * The denominator will be a positive non-zero value less than or equal to the specified maximum\r\n * denominator. If a maximum denominator is not specified, the denominator will be the lowest\r\n * value necessary to represent the number exactly.\r\n *\r\n * [maxD] {number|string|Decimal} Maximum denominator. Integer >= 1 and < Infinity.\r\n *\r\n */\r\n P.toFraction = function (maxD) {\r\n var d, d0, d1, d2, e, k, n, n0, n1, pr, q, r,\r\n x = this,\r\n xd = x.d,\r\n Ctor = x.constructor;\r\n\r\n if (!xd) return new Ctor(x);\r\n\r\n n1 = d0 = new Ctor(1);\r\n d1 = n0 = new Ctor(0);\r\n\r\n d = new Ctor(d1);\r\n e = d.e = getPrecision(xd) - x.e - 1;\r\n k = e % LOG_BASE;\r\n d.d[0] = mathpow(10, k < 0 ? LOG_BASE + k : k);\r\n\r\n if (maxD == null) {\r\n\r\n // d is 10**e, the minimum max-denominator needed.\r\n maxD = e > 0 ? d : n1;\r\n } else {\r\n n = new Ctor(maxD);\r\n if (!n.isInt() || n.lt(n1)) throw Error(invalidArgument + n);\r\n maxD = n.gt(d) ? (e > 0 ? d : n1) : n;\r\n }\r\n\r\n external = false;\r\n n = new Ctor(digitsToString(xd));\r\n pr = Ctor.precision;\r\n Ctor.precision = e = xd.length * LOG_BASE * 2;\r\n\r\n for (;;) {\r\n q = divide(n, d, 0, 1, 1);\r\n d2 = d0.plus(q.times(d1));\r\n if (d2.cmp(maxD) == 1) break;\r\n d0 = d1;\r\n d1 = d2;\r\n d2 = n1;\r\n n1 = n0.plus(q.times(d2));\r\n n0 = d2;\r\n d2 = d;\r\n d = n.minus(q.times(d2));\r\n n = d2;\r\n }\r\n\r\n d2 = divide(maxD.minus(d0), d1, 0, 1, 1);\r\n n0 = n0.plus(d2.times(n1));\r\n d0 = d0.plus(d2.times(d1));\r\n n0.s = n1.s = x.s;\r\n\r\n // Determine which fraction is closer to x, n0/d0 or n1/d1?\r\n r = divide(n1, d1, e, 1).minus(x).abs().cmp(divide(n0, d0, e, 1).minus(x).abs()) < 1\r\n ? [n1, d1] : [n0, d0];\r\n\r\n Ctor.precision = pr;\r\n external = true;\r\n\r\n return r;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 16, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toHexadecimal = P.toHex = function (sd, rm) {\r\n return toStringBinary(this, 16, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Returns a new Decimal whose value is the nearest multiple of `y` in the direction of rounding\r\n * mode `rm`, or `Decimal.rounding` if `rm` is omitted, to the value of this Decimal.\r\n *\r\n * The return value will always have the same sign as this Decimal, unless either this Decimal\r\n * or `y` is NaN, in which case the return value will be also be NaN.\r\n *\r\n * The return value is not affected by the value of `precision`.\r\n *\r\n * y {number|string|Decimal} The magnitude to round to a multiple of.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toNearest() rounding mode not an integer: {rm}'\r\n * 'toNearest() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toNearest = function (y, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n x = new Ctor(x);\r\n\r\n if (y == null) {\r\n\r\n // If x is not finite, return x.\r\n if (!x.d) return x;\r\n\r\n y = new Ctor(1);\r\n rm = Ctor.rounding;\r\n } else {\r\n y = new Ctor(y);\r\n if (rm === void 0) {\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(rm, 0, 8);\r\n }\r\n\r\n // If x is not finite, return x if y is not NaN, else NaN.\r\n if (!x.d) return y.s ? x : y;\r\n\r\n // If y is not finite, return Infinity with the sign of x if y is Infinity, else NaN.\r\n if (!y.d) {\r\n if (y.s) y.s = x.s;\r\n return y;\r\n }\r\n }\r\n\r\n // If y is not zero, calculate the nearest multiple of y to x.\r\n if (y.d[0]) {\r\n external = false;\r\n x = divide(x, y, 0, rm, 1).times(y);\r\n external = true;\r\n finalise(x);\r\n\r\n // If y is zero, return zero with the sign of x.\r\n } else {\r\n y.s = x.s;\r\n x = y;\r\n }\r\n\r\n return x;\r\n };\r\n\r\n\r\n /*\r\n * Return the value of this Decimal converted to a number primitive.\r\n * Zero keeps its sign.\r\n *\r\n */\r\n P.toNumber = function () {\r\n return +this;\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal in base 8, round to `sd` significant\r\n * digits using rounding mode `rm`.\r\n *\r\n * If the optional `sd` argument is present then return binary exponential notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toOctal = function (sd, rm) {\r\n return toStringBinary(this, 8, sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal raised to the power `y`, rounded\r\n * to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * ECMAScript compliant.\r\n *\r\n * pow(x, NaN) = NaN\r\n * pow(x, ±0) = 1\r\n\r\n * pow(NaN, non-zero) = NaN\r\n * pow(abs(x) > 1, +Infinity) = +Infinity\r\n * pow(abs(x) > 1, -Infinity) = +0\r\n * pow(abs(x) == 1, ±Infinity) = NaN\r\n * pow(abs(x) < 1, +Infinity) = +0\r\n * pow(abs(x) < 1, -Infinity) = +Infinity\r\n * pow(+Infinity, y > 0) = +Infinity\r\n * pow(+Infinity, y < 0) = +0\r\n * pow(-Infinity, odd integer > 0) = -Infinity\r\n * pow(-Infinity, even integer > 0) = +Infinity\r\n * pow(-Infinity, odd integer < 0) = -0\r\n * pow(-Infinity, even integer < 0) = +0\r\n * pow(+0, y > 0) = +0\r\n * pow(+0, y < 0) = +Infinity\r\n * pow(-0, odd integer > 0) = -0\r\n * pow(-0, even integer > 0) = +0\r\n * pow(-0, odd integer < 0) = -Infinity\r\n * pow(-0, even integer < 0) = +Infinity\r\n * pow(finite x < 0, finite non-integer) = NaN\r\n *\r\n * For non-integer or very large exponents pow(x, y) is calculated using\r\n *\r\n * x^y = exp(y*ln(x))\r\n *\r\n * Assuming the first 15 rounding digits are each equally likely to be any digit 0-9, the\r\n * probability of an incorrectly rounded result\r\n * P([49]9{14} | [50]0{14}) = 2 * 0.2 * 10^-14 = 4e-15 = 1/2.5e+14\r\n * i.e. 1 in 250,000,000,000,000\r\n *\r\n * If a result is incorrectly rounded the maximum error will be 1 ulp (unit in last place).\r\n *\r\n * y {number|string|Decimal} The power to which to raise this Decimal.\r\n *\r\n */\r\n P.toPower = P.pow = function (y) {\r\n var e, k, pr, r, rm, s,\r\n x = this,\r\n Ctor = x.constructor,\r\n yn = +(y = new Ctor(y));\r\n\r\n // Either ±Infinity, NaN or ±0?\r\n if (!x.d || !y.d || !x.d[0] || !y.d[0]) return new Ctor(mathpow(+x, yn));\r\n\r\n x = new Ctor(x);\r\n\r\n if (x.eq(1)) return x;\r\n\r\n pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n\r\n if (y.eq(1)) return finalise(x, pr, rm);\r\n\r\n // y exponent\r\n e = mathfloor(y.e / LOG_BASE);\r\n\r\n // If y is a small integer use the 'exponentiation by squaring' algorithm.\r\n if (e >= y.d.length - 1 && (k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {\r\n r = intPow(Ctor, x, k, pr);\r\n return y.s < 0 ? new Ctor(1).div(r) : finalise(r, pr, rm);\r\n }\r\n\r\n s = x.s;\r\n\r\n // if x is negative\r\n if (s < 0) {\r\n\r\n // if y is not an integer\r\n if (e < y.d.length - 1) return new Ctor(NaN);\r\n\r\n // Result is positive if x is negative and the last digit of integer y is even.\r\n if ((y.d[e] & 1) == 0) s = 1;\r\n\r\n // if x.eq(-1)\r\n if (x.e == 0 && x.d[0] == 1 && x.d.length == 1) {\r\n x.s = s;\r\n return x;\r\n }\r\n }\r\n\r\n // Estimate result exponent.\r\n // x^y = 10^e, where e = y * log10(x)\r\n // log10(x) = log10(x_significand) + x_exponent\r\n // log10(x_significand) = ln(x_significand) / ln(10)\r\n k = mathpow(+x, yn);\r\n e = k == 0 || !isFinite(k)\r\n ? mathfloor(yn * (Math.log('0.' + digitsToString(x.d)) / Math.LN10 + x.e + 1))\r\n : new Ctor(k + '').e;\r\n\r\n // Exponent estimate may be incorrect e.g. x: 0.999999999999999999, y: 2.29, e: 0, r.e: -1.\r\n\r\n // Overflow/underflow?\r\n if (e > Ctor.maxE + 1 || e < Ctor.minE - 1) return new Ctor(e > 0 ? s / 0 : 0);\r\n\r\n external = false;\r\n Ctor.rounding = x.s = 1;\r\n\r\n // Estimate the extra guard digits needed to ensure five correct rounding digits from\r\n // naturalLogarithm(x). Example of failure without these extra digits (precision: 10):\r\n // new Decimal(2.32456).pow('2087987436534566.46411')\r\n // should be 1.162377823e+764914905173815, but is 1.162355823e+764914905173815\r\n k = Math.min(12, (e + '').length);\r\n\r\n // r = x^y = exp(y*ln(x))\r\n r = naturalExponential(y.times(naturalLogarithm(x, pr + k)), pr);\r\n\r\n // r may be Infinity, e.g. (0.9999999999999999).pow(-1e+40)\r\n if (r.d) {\r\n\r\n // Truncate to the required precision plus five rounding digits.\r\n r = finalise(r, pr + 5, 1);\r\n\r\n // If the rounding digits are [49]9999 or [50]0000 increase the precision by 10 and recalculate\r\n // the result.\r\n if (checkRoundingDigits(r.d, pr, rm)) {\r\n e = pr + 10;\r\n\r\n // Truncate to the increased precision plus five rounding digits.\r\n r = finalise(naturalExponential(y.times(naturalLogarithm(x, e + k)), e), e + 5, 1);\r\n\r\n // Check for 14 nines from the 2nd rounding digit (the first rounding digit may be 4 or 9).\r\n if (+digitsToString(r.d).slice(pr + 1, pr + 15) + 1 == 1e14) {\r\n r = finalise(r, pr + 1, 0);\r\n }\r\n }\r\n }\r\n\r\n r.s = s;\r\n external = true;\r\n Ctor.rounding = rm;\r\n\r\n return finalise(r, pr, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal rounded to `sd` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * Return exponential notation if `sd` is less than the number of digits necessary to represent\r\n * the integer part of the value in normal notation.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n */\r\n P.toPrecision = function (sd, rm) {\r\n var str,\r\n x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n\r\n x = finalise(new Ctor(x), sd, rm);\r\n str = finiteToString(x, sd <= x.e || x.e <= Ctor.toExpNeg, sd);\r\n }\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal rounded to a maximum of `sd`\r\n * significant digits using rounding mode `rm`, or to `precision` and `rounding` respectively if\r\n * omitted.\r\n *\r\n * [sd] {number} Significant digits. Integer, 1 to MAX_DIGITS inclusive.\r\n * [rm] {number} Rounding mode. Integer, 0 to 8 inclusive.\r\n *\r\n * 'toSD() digits out of range: {sd}'\r\n * 'toSD() digits not an integer: {sd}'\r\n * 'toSD() rounding mode not an integer: {rm}'\r\n * 'toSD() rounding mode out of range: {rm}'\r\n *\r\n */\r\n P.toSignificantDigits = P.toSD = function (sd, rm) {\r\n var x = this,\r\n Ctor = x.constructor;\r\n\r\n if (sd === void 0) {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n }\r\n\r\n return finalise(new Ctor(x), sd, rm);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n *\r\n * Return exponential notation if this Decimal has a positive exponent equal to or greater than\r\n * `toExpPos`, or a negative exponent equal to or less than `toExpNeg`.\r\n *\r\n */\r\n P.toString = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() && !x.isZero() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of this Decimal truncated to a whole number.\r\n *\r\n */\r\n P.truncated = P.trunc = function () {\r\n return finalise(new this.constructor(this), this.e + 1, 1);\r\n };\r\n\r\n\r\n /*\r\n * Return a string representing the value of this Decimal.\r\n * Unlike `toString`, negative zero will include the minus sign.\r\n *\r\n */\r\n P.valueOf = P.toJSON = function () {\r\n var x = this,\r\n Ctor = x.constructor,\r\n str = finiteToString(x, x.e <= Ctor.toExpNeg || x.e >= Ctor.toExpPos);\r\n\r\n return x.isNeg() ? '-' + str : str;\r\n };\r\n\r\n\r\n /*\r\n // Add aliases to match BigDecimal method names.\r\n // P.add = P.plus;\r\n P.subtract = P.minus;\r\n P.multiply = P.times;\r\n P.divide = P.div;\r\n P.remainder = P.mod;\r\n P.compareTo = P.cmp;\r\n P.negate = P.neg;\r\n */\r\n\r\n\r\n // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers.\r\n\r\n\r\n /*\r\n * digitsToString P.cubeRoot, P.logarithm, P.squareRoot, P.toFraction, P.toPower,\r\n * finiteToString, naturalExponential, naturalLogarithm\r\n * checkInt32 P.toDecimalPlaces, P.toExponential, P.toFixed, P.toNearest,\r\n * P.toPrecision, P.toSignificantDigits, toStringBinary, random\r\n * checkRoundingDigits P.logarithm, P.toPower, naturalExponential, naturalLogarithm\r\n * convertBase toStringBinary, parseOther\r\n * cos P.cos\r\n * divide P.atanh, P.cubeRoot, P.dividedBy, P.dividedToIntegerBy,\r\n * P.logarithm, P.modulo, P.squareRoot, P.tan, P.tanh, P.toFraction,\r\n * P.toNearest, toStringBinary, naturalExponential, naturalLogarithm,\r\n * taylorSeries, atan2, parseOther\r\n * finalise P.absoluteValue, P.atan, P.atanh, P.ceil, P.cos, P.cosh,\r\n * P.cubeRoot, P.dividedToIntegerBy, P.floor, P.logarithm, P.minus,\r\n * P.modulo, P.negated, P.plus, P.round, P.sin, P.sinh, P.squareRoot,\r\n * P.tan, P.times, P.toDecimalPlaces, P.toExponential, P.toFixed,\r\n * P.toNearest, P.toPower, P.toPrecision, P.toSignificantDigits,\r\n * P.truncated, divide, getLn10, getPi, naturalExponential,\r\n * naturalLogarithm, ceil, floor, round, trunc\r\n * finiteToString P.toExponential, P.toFixed, P.toPrecision, P.toString, P.valueOf,\r\n * toStringBinary\r\n * getBase10Exponent P.minus, P.plus, P.times, parseOther\r\n * getLn10 P.logarithm, naturalLogarithm\r\n * getPi P.acos, P.asin, P.atan, toLessThanHalfPi, atan2\r\n * getPrecision P.precision, P.toFraction\r\n * getZeroString digitsToString, finiteToString\r\n * intPow P.toPower, parseOther\r\n * isOdd toLessThanHalfPi\r\n * maxOrMin max, min\r\n * naturalExponential P.naturalExponential, P.toPower\r\n * naturalLogarithm P.acosh, P.asinh, P.atanh, P.logarithm, P.naturalLogarithm,\r\n * P.toPower, naturalExponential\r\n * nonFiniteToString finiteToString, toStringBinary\r\n * parseDecimal Decimal\r\n * parseOther Decimal\r\n * sin P.sin\r\n * taylorSeries P.cosh, P.sinh, cos, sin\r\n * toLessThanHalfPi P.cos, P.sin\r\n * toStringBinary P.toBinary, P.toHexadecimal, P.toOctal\r\n * truncate intPow\r\n *\r\n * Throws: P.logarithm, P.precision, P.toFraction, checkInt32, getLn10, getPi,\r\n * naturalLogarithm, config, parseOther, random, Decimal\r\n */\r\n\r\n\r\n function digitsToString(d) {\r\n var i, k, ws,\r\n indexOfLastWord = d.length - 1,\r\n str = '',\r\n w = d[0];\r\n\r\n if (indexOfLastWord > 0) {\r\n str += w;\r\n for (i = 1; i < indexOfLastWord; i++) {\r\n ws = d[i] + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n str += ws;\r\n }\r\n\r\n w = d[i];\r\n ws = w + '';\r\n k = LOG_BASE - ws.length;\r\n if (k) str += getZeroString(k);\r\n } else if (w === 0) {\r\n return '0';\r\n }\r\n\r\n // Remove trailing zeros of last w.\r\n for (; w % 10 === 0;) w /= 10;\r\n\r\n return str + w;\r\n }\r\n\r\n\r\n function checkInt32(i, min, max) {\r\n if (i !== ~~i || i < min || i > max) {\r\n throw Error(invalidArgument + i);\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Check 5 rounding digits if `repeating` is null, 4 otherwise.\r\n * `repeating == null` if caller is `log` or `pow`,\r\n * `repeating != null` if caller is `naturalLogarithm` or `naturalExponential`.\r\n */\r\n function checkRoundingDigits(d, i, rm, repeating) {\r\n var di, k, r, rd;\r\n\r\n // Get the length of the first word of the array d.\r\n for (k = d[0]; k >= 10; k /= 10) --i;\r\n\r\n // Is the rounding digit in the first word of d?\r\n if (--i < 0) {\r\n i += LOG_BASE;\r\n di = 0;\r\n } else {\r\n di = Math.ceil((i + 1) / LOG_BASE);\r\n i %= LOG_BASE;\r\n }\r\n\r\n // i is the index (0 - 6) of the rounding digit.\r\n // E.g. if within the word 3487563 the first rounding digit is 5,\r\n // then i = 4, k = 1000, rd = 3487563 % 1000 = 563\r\n k = mathpow(10, LOG_BASE - i);\r\n rd = d[di] % k | 0;\r\n\r\n if (repeating == null) {\r\n if (i < 3) {\r\n if (i == 0) rd = rd / 100 | 0;\r\n else if (i == 1) rd = rd / 10 | 0;\r\n r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 50000 || rd == 0;\r\n } else {\r\n r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 ||\r\n (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;\r\n }\r\n } else {\r\n if (i < 4) {\r\n if (i == 0) rd = rd / 1000 | 0;\r\n else if (i == 1) rd = rd / 100 | 0;\r\n else if (i == 2) rd = rd / 10 | 0;\r\n r = (repeating || rm < 4) && rd == 9999 || !repeating && rm > 3 && rd == 4999;\r\n } else {\r\n r = ((repeating || rm < 4) && rd + 1 == k ||\r\n (!repeating && rm > 3) && rd + 1 == k / 2) &&\r\n (d[di + 1] / k / 1000 | 0) == mathpow(10, i - 3) - 1;\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n // Convert string of `baseIn` to an array of numbers of `baseOut`.\r\n // Eg. convertBase('255', 10, 16) returns [15, 15].\r\n // Eg. convertBase('ff', 16, 10) returns [2, 5, 5].\r\n function convertBase(str, baseIn, baseOut) {\r\n var j,\r\n arr = [0],\r\n arrL,\r\n i = 0,\r\n strL = str.length;\r\n\r\n for (; i < strL;) {\r\n for (arrL = arr.length; arrL--;) arr[arrL] *= baseIn;\r\n arr[0] += NUMERALS.indexOf(str.charAt(i++));\r\n for (j = 0; j < arr.length; j++) {\r\n if (arr[j] > baseOut - 1) {\r\n if (arr[j + 1] === void 0) arr[j + 1] = 0;\r\n arr[j + 1] += arr[j] / baseOut | 0;\r\n arr[j] %= baseOut;\r\n }\r\n }\r\n }\r\n\r\n return arr.reverse();\r\n }\r\n\r\n\r\n /*\r\n * cos(x) = 1 - x^2/2! + x^4/4! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function cosine(Ctor, x) {\r\n var k, y,\r\n len = x.d.length;\r\n\r\n // Argument reduction: cos(4x) = 8*(cos^4(x) - cos^2(x)) + 1\r\n // i.e. cos(x) = 8*(cos^4(x/4) - cos^2(x/4)) + 1\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n if (len < 32) {\r\n k = Math.ceil(len / 3);\r\n y = (1 / tinyPow(4, k)).toString();\r\n } else {\r\n k = 16;\r\n y = '2.3283064365386962890625e-10';\r\n }\r\n\r\n Ctor.precision += k;\r\n\r\n x = taylorSeries(Ctor, 1, x.times(y), new Ctor(1));\r\n\r\n // Reverse argument reduction\r\n for (var i = k; i--;) {\r\n var cos2x = x.times(x);\r\n x = cos2x.times(cos2x).minus(cos2x).times(8).plus(1);\r\n }\r\n\r\n Ctor.precision -= k;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Perform division in the specified base.\r\n */\r\n var divide = (function () {\r\n\r\n // Assumes non-zero x and k, and hence non-zero result.\r\n function multiplyInteger(x, k, base) {\r\n var temp,\r\n carry = 0,\r\n i = x.length;\r\n\r\n for (x = x.slice(); i--;) {\r\n temp = x[i] * k + carry;\r\n x[i] = temp % base | 0;\r\n carry = temp / base | 0;\r\n }\r\n\r\n if (carry) x.unshift(carry);\r\n\r\n return x;\r\n }\r\n\r\n function compare(a, b, aL, bL) {\r\n var i, r;\r\n\r\n if (aL != bL) {\r\n r = aL > bL ? 1 : -1;\r\n } else {\r\n for (i = r = 0; i < aL; i++) {\r\n if (a[i] != b[i]) {\r\n r = a[i] > b[i] ? 1 : -1;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return r;\r\n }\r\n\r\n function subtract(a, b, aL, base) {\r\n var i = 0;\r\n\r\n // Subtract b from a.\r\n for (; aL--;) {\r\n a[aL] -= i;\r\n i = a[aL] < b[aL] ? 1 : 0;\r\n a[aL] = i * base + a[aL] - b[aL];\r\n }\r\n\r\n // Remove leading zeros.\r\n for (; !a[0] && a.length > 1;) a.shift();\r\n }\r\n\r\n return function (x, y, pr, rm, dp, base) {\r\n var cmp, e, i, k, logBase, more, prod, prodL, q, qd, rem, remL, rem0, sd, t, xi, xL, yd0,\r\n yL, yz,\r\n Ctor = x.constructor,\r\n sign = x.s == y.s ? 1 : -1,\r\n xd = x.d,\r\n yd = y.d;\r\n\r\n // Either NaN, Infinity or 0?\r\n if (!xd || !xd[0] || !yd || !yd[0]) {\r\n\r\n return new Ctor(// Return NaN if either NaN, or both Infinity or 0.\r\n !x.s || !y.s || (xd ? yd && xd[0] == yd[0] : !yd) ? NaN :\r\n\r\n // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.\r\n xd && xd[0] == 0 || !yd ? sign * 0 : sign / 0);\r\n }\r\n\r\n if (base) {\r\n logBase = 1;\r\n e = x.e - y.e;\r\n } else {\r\n base = BASE;\r\n logBase = LOG_BASE;\r\n e = mathfloor(x.e / logBase) - mathfloor(y.e / logBase);\r\n }\r\n\r\n yL = yd.length;\r\n xL = xd.length;\r\n q = new Ctor(sign);\r\n qd = q.d = [];\r\n\r\n // Result exponent may be one less than e.\r\n // The digit array of a Decimal from toStringBinary may have trailing zeros.\r\n for (i = 0; yd[i] == (xd[i] || 0); i++);\r\n\r\n if (yd[i] > (xd[i] || 0)) e--;\r\n\r\n if (pr == null) {\r\n sd = pr = Ctor.precision;\r\n rm = Ctor.rounding;\r\n } else if (dp) {\r\n sd = pr + (x.e - y.e) + 1;\r\n } else {\r\n sd = pr;\r\n }\r\n\r\n if (sd < 0) {\r\n qd.push(1);\r\n more = true;\r\n } else {\r\n\r\n // Convert precision in number of base 10 digits to base 1e7 digits.\r\n sd = sd / logBase + 2 | 0;\r\n i = 0;\r\n\r\n // divisor < 1e7\r\n if (yL == 1) {\r\n k = 0;\r\n yd = yd[0];\r\n sd++;\r\n\r\n // k is the carry.\r\n for (; (i < xL || k) && sd--; i++) {\r\n t = k * base + (xd[i] || 0);\r\n qd[i] = t / yd | 0;\r\n k = t % yd | 0;\r\n }\r\n\r\n more = k || i < xL;\r\n\r\n // divisor >= 1e7\r\n } else {\r\n\r\n // Normalise xd and yd so highest order digit of yd is >= base/2\r\n k = base / (yd[0] + 1) | 0;\r\n\r\n if (k > 1) {\r\n yd = multiplyInteger(yd, k, base);\r\n xd = multiplyInteger(xd, k, base);\r\n yL = yd.length;\r\n xL = xd.length;\r\n }\r\n\r\n xi = yL;\r\n rem = xd.slice(0, yL);\r\n remL = rem.length;\r\n\r\n // Add zeros to make remainder as long as divisor.\r\n for (; remL < yL;) rem[remL++] = 0;\r\n\r\n yz = yd.slice();\r\n yz.unshift(0);\r\n yd0 = yd[0];\r\n\r\n if (yd[1] >= base / 2) ++yd0;\r\n\r\n do {\r\n k = 0;\r\n\r\n // Compare divisor and remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < remainder.\r\n if (cmp < 0) {\r\n\r\n // Calculate trial digit, k.\r\n rem0 = rem[0];\r\n if (yL != remL) rem0 = rem0 * base + (rem[1] || 0);\r\n\r\n // k will be how many times the divisor goes into the current remainder.\r\n k = rem0 / yd0 | 0;\r\n\r\n // Algorithm:\r\n // 1. product = divisor * trial digit (k)\r\n // 2. if product > remainder: product -= divisor, k--\r\n // 3. remainder -= product\r\n // 4. if product was < remainder at 2:\r\n // 5. compare new remainder and divisor\r\n // 6. If remainder > divisor: remainder -= divisor, k++\r\n\r\n if (k > 1) {\r\n if (k >= base) k = base - 1;\r\n\r\n // product = divisor * trial digit.\r\n prod = multiplyInteger(yd, k, base);\r\n prodL = prod.length;\r\n remL = rem.length;\r\n\r\n // Compare product and remainder.\r\n cmp = compare(prod, rem, prodL, remL);\r\n\r\n // product > remainder.\r\n if (cmp == 1) {\r\n k--;\r\n\r\n // Subtract divisor from product.\r\n subtract(prod, yL < prodL ? yz : yd, prodL, base);\r\n }\r\n } else {\r\n\r\n // cmp is -1.\r\n // If k is 0, there is no need to compare yd and rem again below, so change cmp to 1\r\n // to avoid it. If k is 1 there is a need to compare yd and rem again below.\r\n if (k == 0) cmp = k = 1;\r\n prod = yd.slice();\r\n }\r\n\r\n prodL = prod.length;\r\n if (prodL < remL) prod.unshift(0);\r\n\r\n // Subtract product from remainder.\r\n subtract(rem, prod, remL, base);\r\n\r\n // If product was < previous remainder.\r\n if (cmp == -1) {\r\n remL = rem.length;\r\n\r\n // Compare divisor and new remainder.\r\n cmp = compare(yd, rem, yL, remL);\r\n\r\n // If divisor < new remainder, subtract divisor from remainder.\r\n if (cmp < 1) {\r\n k++;\r\n\r\n // Subtract divisor from remainder.\r\n subtract(rem, yL < remL ? yz : yd, remL, base);\r\n }\r\n }\r\n\r\n remL = rem.length;\r\n } else if (cmp === 0) {\r\n k++;\r\n rem = [0];\r\n } // if cmp === 1, k will be 0\r\n\r\n // Add the next digit, k, to the result array.\r\n qd[i++] = k;\r\n\r\n // Update the remainder.\r\n if (cmp && rem[0]) {\r\n rem[remL++] = xd[xi] || 0;\r\n } else {\r\n rem = [xd[xi]];\r\n remL = 1;\r\n }\r\n\r\n } while ((xi++ < xL || rem[0] !== void 0) && sd--);\r\n\r\n more = rem[0] !== void 0;\r\n }\r\n\r\n // Leading zero?\r\n if (!qd[0]) qd.shift();\r\n }\r\n\r\n // logBase is 1 when divide is being used for base conversion.\r\n if (logBase == 1) {\r\n q.e = e;\r\n inexact = more;\r\n } else {\r\n\r\n // To calculate q.e, first get the number of digits of qd[0].\r\n for (i = 1, k = qd[0]; k >= 10; k /= 10) i++;\r\n q.e = i + e * logBase - 1;\r\n\r\n finalise(q, dp ? pr + q.e + 1 : pr, rm, more);\r\n }\r\n\r\n return q;\r\n };\r\n })();\r\n\r\n\r\n /*\r\n * Round `x` to `sd` significant digits using rounding mode `rm`.\r\n * Check for over/under-flow.\r\n */\r\n function finalise(x, sd, rm, isTruncated) {\r\n var digits, i, j, k, rd, roundUp, w, xd, xdi,\r\n Ctor = x.constructor;\r\n\r\n // Don't round if sd is null or undefined.\r\n out: if (sd != null) {\r\n xd = x.d;\r\n\r\n // Infinity/NaN.\r\n if (!xd) return x;\r\n\r\n // rd: the rounding digit, i.e. the digit after the digit that may be rounded up.\r\n // w: the word of xd containing rd, a base 1e7 number.\r\n // xdi: the index of w within xd.\r\n // digits: the number of digits of w.\r\n // i: what would be the index of rd within w if all the numbers were 7 digits long (i.e. if\r\n // they had leading zeros)\r\n // j: if > 0, the actual index of rd within w (if < 0, rd is a leading zero).\r\n\r\n // Get the length of the first word of the digits array xd.\r\n for (digits = 1, k = xd[0]; k >= 10; k /= 10) digits++;\r\n i = sd - digits;\r\n\r\n // Is the rounding digit in the first word of xd?\r\n if (i < 0) {\r\n i += LOG_BASE;\r\n j = sd;\r\n w = xd[xdi = 0];\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = w / mathpow(10, digits - j - 1) % 10 | 0;\r\n } else {\r\n xdi = Math.ceil((i + 1) / LOG_BASE);\r\n k = xd.length;\r\n if (xdi >= k) {\r\n if (isTruncated) {\r\n\r\n // Needed by `naturalExponential`, `naturalLogarithm` and `squareRoot`.\r\n for (; k++ <= xdi;) xd.push(0);\r\n w = rd = 0;\r\n digits = 1;\r\n i %= LOG_BASE;\r\n j = i - LOG_BASE + 1;\r\n } else {\r\n break out;\r\n }\r\n } else {\r\n w = k = xd[xdi];\r\n\r\n // Get the number of digits of w.\r\n for (digits = 1; k >= 10; k /= 10) digits++;\r\n\r\n // Get the index of rd within w.\r\n i %= LOG_BASE;\r\n\r\n // Get the index of rd within w, adjusted for leading zeros.\r\n // The number of leading zeros of w is given by LOG_BASE - digits.\r\n j = i - LOG_BASE + digits;\r\n\r\n // Get the rounding digit at index j of w.\r\n rd = j < 0 ? 0 : w / mathpow(10, digits - j - 1) % 10 | 0;\r\n }\r\n }\r\n\r\n // Are there any non-zero digits after the rounding digit?\r\n isTruncated = isTruncated || sd < 0 ||\r\n xd[xdi + 1] !== void 0 || (j < 0 ? w : w % mathpow(10, digits - j - 1));\r\n\r\n // The expression `w % mathpow(10, digits - j - 1)` returns all the digits of w to the right\r\n // of the digit at (left-to-right) index j, e.g. if w is 908714 and j is 2, the expression\r\n // will give 714.\r\n\r\n roundUp = rm < 4\r\n ? (rd || isTruncated) && (rm == 0 || rm == (x.s < 0 ? 3 : 2))\r\n : rd > 5 || rd == 5 && (rm == 4 || isTruncated || rm == 6 &&\r\n\r\n // Check whether the digit to the left of the rounding digit is odd.\r\n ((i > 0 ? j > 0 ? w / mathpow(10, digits - j) : 0 : xd[xdi - 1]) % 10) & 1 ||\r\n rm == (x.s < 0 ? 8 : 7));\r\n\r\n if (sd < 1 || !xd[0]) {\r\n xd.length = 0;\r\n if (roundUp) {\r\n\r\n // Convert sd to decimal places.\r\n sd -= x.e + 1;\r\n\r\n // 1, 0.1, 0.01, 0.001, 0.0001 etc.\r\n xd[0] = mathpow(10, (LOG_BASE - sd % LOG_BASE) % LOG_BASE);\r\n x.e = -sd || 0;\r\n } else {\r\n\r\n // Zero.\r\n xd[0] = x.e = 0;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n // Remove excess digits.\r\n if (i == 0) {\r\n xd.length = xdi;\r\n k = 1;\r\n xdi--;\r\n } else {\r\n xd.length = xdi + 1;\r\n k = mathpow(10, LOG_BASE - i);\r\n\r\n // E.g. 56700 becomes 56000 if 7 is the rounding digit.\r\n // j > 0 means i > number of leading zeros of w.\r\n xd[xdi] = j > 0 ? (w / mathpow(10, digits - j) % mathpow(10, j) | 0) * k : 0;\r\n }\r\n\r\n if (roundUp) {\r\n for (;;) {\r\n\r\n // Is the digit to be rounded up in the first word of xd?\r\n if (xdi == 0) {\r\n\r\n // i will be the length of xd[0] before k is added.\r\n for (i = 1, j = xd[0]; j >= 10; j /= 10) i++;\r\n j = xd[0] += k;\r\n for (k = 1; j >= 10; j /= 10) k++;\r\n\r\n // if i != k the length has increased.\r\n if (i != k) {\r\n x.e++;\r\n if (xd[0] == BASE) xd[0] = 1;\r\n }\r\n\r\n break;\r\n } else {\r\n xd[xdi] += k;\r\n if (xd[xdi] != BASE) break;\r\n xd[xdi--] = 0;\r\n k = 1;\r\n }\r\n }\r\n }\r\n\r\n // Remove trailing zeros.\r\n for (i = xd.length; xd[--i] === 0;) xd.pop();\r\n }\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > Ctor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < Ctor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // Ctor.underflow = true;\r\n } // else Ctor.underflow = false;\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n function finiteToString(x, isExp, sd) {\r\n if (!x.isFinite()) return nonFiniteToString(x);\r\n var k,\r\n e = x.e,\r\n str = digitsToString(x.d),\r\n len = str.length;\r\n\r\n if (isExp) {\r\n if (sd && (k = sd - len) > 0) {\r\n str = str.charAt(0) + '.' + str.slice(1) + getZeroString(k);\r\n } else if (len > 1) {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n\r\n str = str + (x.e < 0 ? 'e' : 'e+') + x.e;\r\n } else if (e < 0) {\r\n str = '0.' + getZeroString(-e - 1) + str;\r\n if (sd && (k = sd - len) > 0) str += getZeroString(k);\r\n } else if (e >= len) {\r\n str += getZeroString(e + 1 - len);\r\n if (sd && (k = sd - e - 1) > 0) str = str + '.' + getZeroString(k);\r\n } else {\r\n if ((k = e + 1) < len) str = str.slice(0, k) + '.' + str.slice(k);\r\n if (sd && (k = sd - len) > 0) {\r\n if (e + 1 === len) str += '.';\r\n str += getZeroString(k);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n\r\n\r\n // Calculate the base 10 exponent from the base 1e7 exponent.\r\n function getBase10Exponent(digits, e) {\r\n var w = digits[0];\r\n\r\n // Add the number of digits of the first word of the digits array.\r\n for ( e *= LOG_BASE; w >= 10; w /= 10) e++;\r\n return e;\r\n }\r\n\r\n\r\n function getLn10(Ctor, sd, pr) {\r\n if (sd > LN10_PRECISION) {\r\n\r\n // Reset global state in case the exception is caught.\r\n external = true;\r\n if (pr) Ctor.precision = pr;\r\n throw Error(precisionLimitExceeded);\r\n }\r\n return finalise(new Ctor(LN10), sd, 1, true);\r\n }\r\n\r\n\r\n function getPi(Ctor, sd, rm) {\r\n if (sd > PI_PRECISION) throw Error(precisionLimitExceeded);\r\n return finalise(new Ctor(PI), sd, rm, true);\r\n }\r\n\r\n\r\n function getPrecision(digits) {\r\n var w = digits.length - 1,\r\n len = w * LOG_BASE + 1;\r\n\r\n w = digits[w];\r\n\r\n // If non-zero...\r\n if (w) {\r\n\r\n // Subtract the number of trailing zeros of the last word.\r\n for (; w % 10 == 0; w /= 10) len--;\r\n\r\n // Add the number of digits of the first word.\r\n for (w = digits[0]; w >= 10; w /= 10) len++;\r\n }\r\n\r\n return len;\r\n }\r\n\r\n\r\n function getZeroString(k) {\r\n var zs = '';\r\n for (; k--;) zs += '0';\r\n return zs;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the value of Decimal `x` to the power `n`, where `n` is an\r\n * integer of type number.\r\n *\r\n * Implements 'exponentiation by squaring'. Called by `pow` and `parseOther`.\r\n *\r\n */\r\n function intPow(Ctor, x, n, pr) {\r\n var isTruncated,\r\n r = new Ctor(1),\r\n\r\n // Max n of 9007199254740991 takes 53 loop iterations.\r\n // Maximum digits array length; leaves [28, 34] guard digits.\r\n k = Math.ceil(pr / LOG_BASE + 4);\r\n\r\n external = false;\r\n\r\n for (;;) {\r\n if (n % 2) {\r\n r = r.times(x);\r\n if (truncate(r.d, k)) isTruncated = true;\r\n }\r\n\r\n n = mathfloor(n / 2);\r\n if (n === 0) {\r\n\r\n // To ensure correct rounding when r.d is truncated, increment the last word if it is zero.\r\n n = r.d.length - 1;\r\n if (isTruncated && r.d[n] === 0) ++r.d[n];\r\n break;\r\n }\r\n\r\n x = x.times(x);\r\n truncate(x.d, k);\r\n }\r\n\r\n external = true;\r\n\r\n return r;\r\n }\r\n\r\n\r\n function isOdd(n) {\r\n return n.d[n.d.length - 1] & 1;\r\n }\r\n\r\n\r\n /*\r\n * Handle `max` and `min`. `ltgt` is 'lt' or 'gt'.\r\n */\r\n function maxOrMin(Ctor, args, ltgt) {\r\n var y,\r\n x = new Ctor(args[0]),\r\n i = 0;\r\n\r\n for (; ++i < args.length;) {\r\n y = new Ctor(args[i]);\r\n if (!y.s) {\r\n x = y;\r\n break;\r\n } else if (x[ltgt](y)) {\r\n x = y;\r\n }\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * Taylor/Maclaurin series.\r\n *\r\n * exp(x) = x^0/0! + x^1/1! + x^2/2! + x^3/3! + ...\r\n *\r\n * Argument reduction:\r\n * Repeat x = x / 32, k += 5, until |x| < 0.1\r\n * exp(x) = exp(x / 2^k)^(2^k)\r\n *\r\n * Previously, the argument was initially reduced by\r\n * exp(x) = exp(r) * 10^k where r = x - k * ln10, k = floor(x / ln10)\r\n * to first put r in the range [0, ln10], before dividing by 32 until |x| < 0.1, but this was\r\n * found to be slower than just dividing repeatedly by 32 as above.\r\n *\r\n * Max integer argument: exp('20723265836946413') = 6.3e+9000000000000000\r\n * Min integer argument: exp('-20723265836946411') = 1.2e-9000000000000000\r\n * (Math object integer min/max: Math.exp(709) = 8.2e+307, Math.exp(-745) = 5e-324)\r\n *\r\n * exp(Infinity) = Infinity\r\n * exp(-Infinity) = 0\r\n * exp(NaN) = NaN\r\n * exp(±0) = 1\r\n *\r\n * exp(x) is non-terminating for any finite, non-zero x.\r\n *\r\n * The result will always be correctly rounded.\r\n *\r\n */\r\n function naturalExponential(x, sd) {\r\n var denominator, guard, j, pow, sum, t, wpr,\r\n rep = 0,\r\n i = 0,\r\n k = 0,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // 0/NaN/Infinity?\r\n if (!x.d || !x.d[0] || x.e > 17) {\r\n\r\n return new Ctor(x.d\r\n ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0\r\n : x.s ? x.s < 0 ? 0 : x : 0 / 0);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n t = new Ctor(0.03125);\r\n\r\n // while abs(x) >= 0.1\r\n while (x.e > -2) {\r\n\r\n // x = x / 2^5\r\n x = x.times(t);\r\n k += 5;\r\n }\r\n\r\n // Use 2 * log10(2^k) + 5 (empirically derived) to estimate the increase in precision\r\n // necessary to ensure the first 4 rounding digits are correct.\r\n guard = Math.log(mathpow(2, k)) / Math.LN10 * 2 + 5 | 0;\r\n wpr += guard;\r\n denominator = pow = sum = new Ctor(1);\r\n Ctor.precision = wpr;\r\n\r\n for (;;) {\r\n pow = finalise(pow.times(x), wpr, 1);\r\n denominator = denominator.times(++i);\r\n t = sum.plus(divide(pow, denominator, wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n j = k;\r\n while (j--) sum = finalise(sum.times(sum), wpr, 1);\r\n\r\n // Check to see if the first 4 rounding digits are [49]999.\r\n // If so, repeat the summation with a higher precision, otherwise\r\n // e.g. with precision: 18, rounding: 1\r\n // exp(18.404272462595034083567793919843761) = 98372560.1229999999 (should be 98372560.123)\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n\r\n if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += 10;\r\n denominator = pow = t = new Ctor(1);\r\n i = 0;\r\n rep++;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n }\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x` rounded to `sd` significant\r\n * digits.\r\n *\r\n * ln(-n) = NaN\r\n * ln(0) = -Infinity\r\n * ln(-0) = -Infinity\r\n * ln(1) = 0\r\n * ln(Infinity) = Infinity\r\n * ln(-Infinity) = NaN\r\n * ln(NaN) = NaN\r\n *\r\n * ln(n) (n != 1) is non-terminating.\r\n *\r\n */\r\n function naturalLogarithm(y, sd) {\r\n var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2,\r\n n = 1,\r\n guard = 10,\r\n x = y,\r\n xd = x.d,\r\n Ctor = x.constructor,\r\n rm = Ctor.rounding,\r\n pr = Ctor.precision;\r\n\r\n // Is x negative or Infinity, NaN, 0 or 1?\r\n if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) {\r\n return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);\r\n }\r\n\r\n if (sd == null) {\r\n external = false;\r\n wpr = pr;\r\n } else {\r\n wpr = sd;\r\n }\r\n\r\n Ctor.precision = wpr += guard;\r\n c = digitsToString(xd);\r\n c0 = c.charAt(0);\r\n\r\n if (Math.abs(e = x.e) < 1.5e15) {\r\n\r\n // Argument reduction.\r\n // The series converges faster the closer the argument is to 1, so using\r\n // ln(a^b) = b * ln(a), ln(a) = ln(a^b) / b\r\n // multiply the argument by itself until the leading digits of the significand are 7, 8, 9,\r\n // 10, 11, 12 or 13, recording the number of multiplications so the sum of the series can\r\n // later be divided by this number, then separate out the power of 10 using\r\n // ln(a*10^b) = ln(a) + b*ln(10).\r\n\r\n // max n is 21 (gives 0.9, 1.0 or 1.1) (9e15 / 21 = 4.2e14).\r\n //while (c0 < 9 && c0 != 1 || c0 == 1 && c.charAt(1) > 1) {\r\n // max n is 6 (gives 0.7 - 1.3)\r\n while (c0 < 7 && c0 != 1 || c0 == 1 && c.charAt(1) > 3) {\r\n x = x.times(y);\r\n c = digitsToString(x.d);\r\n c0 = c.charAt(0);\r\n n++;\r\n }\r\n\r\n e = x.e;\r\n\r\n if (c0 > 1) {\r\n x = new Ctor('0.' + c);\r\n e++;\r\n } else {\r\n x = new Ctor(c0 + '.' + c.slice(1));\r\n }\r\n } else {\r\n\r\n // The argument reduction method above may result in overflow if the argument y is a massive\r\n // number with exponent >= 1500000000000000 (9e15 / 6 = 1.5e15), so instead recall this\r\n // function using ln(x*10^e) = ln(x) + e*ln(10).\r\n t = getLn10(Ctor, wpr + 2, pr).times(e + '');\r\n x = naturalLogarithm(new Ctor(c0 + '.' + c.slice(1)), wpr - guard).plus(t);\r\n Ctor.precision = pr;\r\n\r\n return sd == null ? finalise(x, pr, rm, external = true) : x;\r\n }\r\n\r\n // x1 is x reduced to a value near 1.\r\n x1 = x;\r\n\r\n // Taylor series.\r\n // ln(y) = ln((1 + x)/(1 - x)) = 2(x + x^3/3 + x^5/5 + x^7/7 + ...)\r\n // where x = (y - 1)/(y + 1) (|x| < 1)\r\n sum = numerator = x = divide(x.minus(1), x.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = 3;\r\n\r\n for (;;) {\r\n numerator = finalise(numerator.times(x2), wpr, 1);\r\n t = sum.plus(divide(numerator, new Ctor(denominator), wpr, 1));\r\n\r\n if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {\r\n sum = sum.times(2);\r\n\r\n // Reverse the argument reduction. Check that e is not 0 because, besides preventing an\r\n // unnecessary calculation, -0 + 0 = +0 and to ensure correct rounding -0 needs to stay -0.\r\n if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ''));\r\n sum = divide(sum, new Ctor(n), wpr, 1);\r\n\r\n // Is rm > 3 and the first 4 rounding digits 4999, or rm < 4 (or the summation has\r\n // been repeated previously) and the first 4 rounding digits 9999?\r\n // If so, restart the summation with a higher precision, otherwise\r\n // e.g. with precision: 12, rounding: 1\r\n // ln(135520028.6126091714265381533) = 18.7246299999 when it should be 18.72463.\r\n // `wpr - guard` is the index of first rounding digit.\r\n if (sd == null) {\r\n if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {\r\n Ctor.precision = wpr += guard;\r\n t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);\r\n x2 = finalise(x.times(x), wpr, 1);\r\n denominator = rep = 1;\r\n } else {\r\n return finalise(sum, Ctor.precision = pr, rm, external = true);\r\n }\r\n } else {\r\n Ctor.precision = pr;\r\n return sum;\r\n }\r\n }\r\n\r\n sum = t;\r\n denominator += 2;\r\n }\r\n }\r\n\r\n\r\n // ±Infinity, NaN.\r\n function nonFiniteToString(x) {\r\n // Unsigned.\r\n return String(x.s * x.s / 0);\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from string `str`.\r\n */\r\n function parseDecimal(x, str) {\r\n var e, i, len;\r\n\r\n // Decimal point?\r\n if ((e = str.indexOf('.')) > -1) str = str.replace('.', '');\r\n\r\n // Exponential form?\r\n if ((i = str.search(/e/i)) > 0) {\r\n\r\n // Determine exponent.\r\n if (e < 0) e = i;\r\n e += +str.slice(i + 1);\r\n str = str.substring(0, i);\r\n } else if (e < 0) {\r\n\r\n // Integer.\r\n e = str.length;\r\n }\r\n\r\n // Determine leading zeros.\r\n for (i = 0; str.charCodeAt(i) === 48; i++);\r\n\r\n // Determine trailing zeros.\r\n for (len = str.length; str.charCodeAt(len - 1) === 48; --len);\r\n str = str.slice(i, len);\r\n\r\n if (str) {\r\n len -= i;\r\n x.e = e = e - i - 1;\r\n x.d = [];\r\n\r\n // Transform base\r\n\r\n // e is the base 10 exponent.\r\n // i is where to slice str to get the first word of the digits array.\r\n i = (e + 1) % LOG_BASE;\r\n if (e < 0) i += LOG_BASE;\r\n\r\n if (i < len) {\r\n if (i) x.d.push(+str.slice(0, i));\r\n for (len -= LOG_BASE; i < len;) x.d.push(+str.slice(i, i += LOG_BASE));\r\n str = str.slice(i);\r\n i = LOG_BASE - str.length;\r\n } else {\r\n i -= len;\r\n }\r\n\r\n for (; i--;) str += '0';\r\n x.d.push(+str);\r\n\r\n if (external) {\r\n\r\n // Overflow?\r\n if (x.e > x.constructor.maxE) {\r\n\r\n // Infinity.\r\n x.d = null;\r\n x.e = NaN;\r\n\r\n // Underflow?\r\n } else if (x.e < x.constructor.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n // x.constructor.underflow = true;\r\n } // else x.constructor.underflow = false;\r\n }\r\n } else {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * Parse the value of a new Decimal `x` from a string `str`, which is not a decimal value.\r\n */\r\n function parseOther(x, str) {\r\n var base, Ctor, divisor, i, isFloat, len, p, xd, xe;\r\n\r\n if (str === 'Infinity' || str === 'NaN') {\r\n if (!+str) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return x;\r\n }\r\n\r\n if (isHex.test(str)) {\r\n base = 16;\r\n str = str.toLowerCase();\r\n } else if (isBinary.test(str)) {\r\n base = 2;\r\n } else if (isOctal.test(str)) {\r\n base = 8;\r\n } else {\r\n throw Error(invalidArgument + str);\r\n }\r\n\r\n // Is there a binary exponent part?\r\n i = str.search(/p/i);\r\n\r\n if (i > 0) {\r\n p = +str.slice(i + 1);\r\n str = str.substring(2, i);\r\n } else {\r\n str = str.slice(2);\r\n }\r\n\r\n // Convert `str` as an integer then divide the result by `base` raised to a power such that the\r\n // fraction part will be restored.\r\n i = str.indexOf('.');\r\n isFloat = i >= 0;\r\n Ctor = x.constructor;\r\n\r\n if (isFloat) {\r\n str = str.replace('.', '');\r\n len = str.length;\r\n i = len - i;\r\n\r\n // log[10](16) = 1.2041... , log[10](88) = 1.9444....\r\n divisor = intPow(Ctor, new Ctor(base), i, i * 2);\r\n }\r\n\r\n xd = convertBase(str, base, BASE);\r\n xe = xd.length - 1;\r\n\r\n // Remove trailing zeros.\r\n for (i = xe; xd[i] === 0; --i) xd.pop();\r\n if (i < 0) return new Ctor(x.s * 0);\r\n x.e = getBase10Exponent(xd, xe);\r\n x.d = xd;\r\n external = false;\r\n\r\n // At what precision to perform the division to ensure exact conversion?\r\n // maxDecimalIntegerPartDigitCount = ceil(log[10](b) * otherBaseIntegerPartDigitCount)\r\n // log[10](2) = 0.30103, log[10](8) = 0.90309, log[10](16) = 1.20412\r\n // E.g. ceil(1.2 * 3) = 4, so up to 4 decimal digits are needed to represent 3 hex int digits.\r\n // maxDecimalFractionPartDigitCount = {Hex:4|Oct:3|Bin:1} * otherBaseFractionPartDigitCount\r\n // Therefore using 4 * the number of digits of str will always be enough.\r\n if (isFloat) x = divide(x, divisor, len * 4);\r\n\r\n // Multiply by the binary exponent part if present.\r\n if (p) x = x.times(Math.abs(p) < 54 ? mathpow(2, p) : Decimal.pow(2, p));\r\n external = true;\r\n\r\n return x;\r\n }\r\n\r\n\r\n /*\r\n * sin(x) = x - x^3/3! + x^5/5! - ...\r\n * |x| < pi/2\r\n *\r\n */\r\n function sine(Ctor, x) {\r\n var k,\r\n len = x.d.length;\r\n\r\n if (len < 3) return taylorSeries(Ctor, 2, x, x);\r\n\r\n // Argument reduction: sin(5x) = 16*sin^5(x) - 20*sin^3(x) + 5*sin(x)\r\n // i.e. sin(x) = 16*sin^5(x/5) - 20*sin^3(x/5) + 5*sin(x/5)\r\n // and sin(x) = sin(x/5)(5 + sin^2(x/5)(16sin^2(x/5) - 20))\r\n\r\n // Estimate the optimum number of times to use the argument reduction.\r\n k = 1.4 * Math.sqrt(len);\r\n k = k > 16 ? 16 : k | 0;\r\n\r\n x = x.times(1 / tinyPow(5, k));\r\n x = taylorSeries(Ctor, 2, x, x);\r\n\r\n // Reverse argument reduction\r\n var sin2_x,\r\n d5 = new Ctor(5),\r\n d16 = new Ctor(16),\r\n d20 = new Ctor(20);\r\n for (; k--;) {\r\n sin2_x = x.times(x);\r\n x = x.times(d5.plus(sin2_x.times(d16.times(sin2_x).minus(d20))));\r\n }\r\n\r\n return x;\r\n }\r\n\r\n\r\n // Calculate Taylor series for `cos`, `cosh`, `sin` and `sinh`.\r\n function taylorSeries(Ctor, n, x, y, isHyperbolic) {\r\n var j, t, u, x2,\r\n i = 1,\r\n pr = Ctor.precision,\r\n k = Math.ceil(pr / LOG_BASE);\r\n\r\n external = false;\r\n x2 = x.times(x);\r\n u = new Ctor(y);\r\n\r\n for (;;) {\r\n t = divide(u.times(x2), new Ctor(n++ * n++), pr, 1);\r\n u = isHyperbolic ? y.plus(t) : y.minus(t);\r\n y = divide(t.times(x2), new Ctor(n++ * n++), pr, 1);\r\n t = u.plus(y);\r\n\r\n if (t.d[k] !== void 0) {\r\n for (j = k; t.d[j] === u.d[j] && j--;);\r\n if (j == -1) break;\r\n }\r\n\r\n j = u;\r\n u = y;\r\n y = t;\r\n t = j;\r\n i++;\r\n }\r\n\r\n external = true;\r\n t.d.length = k + 1;\r\n\r\n return t;\r\n }\r\n\r\n\r\n // Exponent e must be positive and non-zero.\r\n function tinyPow(b, e) {\r\n var n = b;\r\n while (--e) n *= b;\r\n return n;\r\n }\r\n\r\n\r\n // Return the absolute value of `x` reduced to less than or equal to half pi.\r\n function toLessThanHalfPi(Ctor, x) {\r\n var t,\r\n isNeg = x.s < 0,\r\n pi = getPi(Ctor, Ctor.precision, 1),\r\n halfPi = pi.times(0.5);\r\n\r\n x = x.abs();\r\n\r\n if (x.lte(halfPi)) {\r\n quadrant = isNeg ? 4 : 1;\r\n return x;\r\n }\r\n\r\n t = x.divToInt(pi);\r\n\r\n if (t.isZero()) {\r\n quadrant = isNeg ? 3 : 2;\r\n } else {\r\n x = x.minus(t.times(pi));\r\n\r\n // 0 <= x < pi\r\n if (x.lte(halfPi)) {\r\n quadrant = isOdd(t) ? (isNeg ? 2 : 3) : (isNeg ? 4 : 1);\r\n return x;\r\n }\r\n\r\n quadrant = isOdd(t) ? (isNeg ? 1 : 4) : (isNeg ? 3 : 2);\r\n }\r\n\r\n return x.minus(pi).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return the value of Decimal `x` as a string in base `baseOut`.\r\n *\r\n * If the optional `sd` argument is present include a binary exponent suffix.\r\n */\r\n function toStringBinary(x, baseOut, sd, rm) {\r\n var base, e, i, k, len, roundUp, str, xd, y,\r\n Ctor = x.constructor,\r\n isExp = sd !== void 0;\r\n\r\n if (isExp) {\r\n checkInt32(sd, 1, MAX_DIGITS);\r\n if (rm === void 0) rm = Ctor.rounding;\r\n else checkInt32(rm, 0, 8);\r\n } else {\r\n sd = Ctor.precision;\r\n rm = Ctor.rounding;\r\n }\r\n\r\n if (!x.isFinite()) {\r\n str = nonFiniteToString(x);\r\n } else {\r\n str = finiteToString(x);\r\n i = str.indexOf('.');\r\n\r\n // Use exponential notation according to `toExpPos` and `toExpNeg`? No, but if required:\r\n // maxBinaryExponent = floor((decimalExponent + 1) * log[2](10))\r\n // minBinaryExponent = floor(decimalExponent * log[2](10))\r\n // log[2](10) = 3.321928094887362347870319429489390175864\r\n\r\n if (isExp) {\r\n base = 2;\r\n if (baseOut == 16) {\r\n sd = sd * 4 - 3;\r\n } else if (baseOut == 8) {\r\n sd = sd * 3 - 2;\r\n }\r\n } else {\r\n base = baseOut;\r\n }\r\n\r\n // Convert the number as an integer then divide the result by its base raised to a power such\r\n // that the fraction part will be restored.\r\n\r\n // Non-integer.\r\n if (i >= 0) {\r\n str = str.replace('.', '');\r\n y = new Ctor(1);\r\n y.e = str.length - i;\r\n y.d = convertBase(finiteToString(y), 10, base);\r\n y.e = y.d.length;\r\n }\r\n\r\n xd = convertBase(str, 10, base);\r\n e = len = xd.length;\r\n\r\n // Remove trailing zeros.\r\n for (; xd[--len] == 0;) xd.pop();\r\n\r\n if (!xd[0]) {\r\n str = isExp ? '0p+0' : '0';\r\n } else {\r\n if (i < 0) {\r\n e--;\r\n } else {\r\n x = new Ctor(x);\r\n x.d = xd;\r\n x.e = e;\r\n x = divide(x, y, sd, rm, 0, base);\r\n xd = x.d;\r\n e = x.e;\r\n roundUp = inexact;\r\n }\r\n\r\n // The rounding digit, i.e. the digit after the digit that may be rounded up.\r\n i = xd[sd];\r\n k = base / 2;\r\n roundUp = roundUp || xd[sd + 1] !== void 0;\r\n\r\n roundUp = rm < 4\r\n ? (i !== void 0 || roundUp) && (rm === 0 || rm === (x.s < 0 ? 3 : 2))\r\n : i > k || i === k && (rm === 4 || roundUp || rm === 6 && xd[sd - 1] & 1 ||\r\n rm === (x.s < 0 ? 8 : 7));\r\n\r\n xd.length = sd;\r\n\r\n if (roundUp) {\r\n\r\n // Rounding up may mean the previous digit has to be rounded up and so on.\r\n for (; ++xd[--sd] > base - 1;) {\r\n xd[sd] = 0;\r\n if (!sd) {\r\n ++e;\r\n xd.unshift(1);\r\n }\r\n }\r\n }\r\n\r\n // Determine trailing zeros.\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // E.g. [4, 11, 15] becomes 4bf.\r\n for (i = 0, str = ''; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n\r\n // Add binary exponent suffix?\r\n if (isExp) {\r\n if (len > 1) {\r\n if (baseOut == 16 || baseOut == 8) {\r\n i = baseOut == 16 ? 4 : 3;\r\n for (--len; len % i; len++) str += '0';\r\n xd = convertBase(str, base, baseOut);\r\n for (len = xd.length; !xd[len - 1]; --len);\r\n\r\n // xd[0] will always be be 1\r\n for (i = 1, str = '1.'; i < len; i++) str += NUMERALS.charAt(xd[i]);\r\n } else {\r\n str = str.charAt(0) + '.' + str.slice(1);\r\n }\r\n }\r\n\r\n str = str + (e < 0 ? 'p' : 'p+') + e;\r\n } else if (e < 0) {\r\n for (; ++e;) str = '0' + str;\r\n str = '0.' + str;\r\n } else {\r\n if (++e > len) for (e -= len; e-- ;) str += '0';\r\n else if (e < len) str = str.slice(0, e) + '.' + str.slice(e);\r\n }\r\n }\r\n\r\n str = (baseOut == 16 ? '0x' : baseOut == 2 ? '0b' : baseOut == 8 ? '0o' : '') + str;\r\n }\r\n\r\n return x.s < 0 ? '-' + str : str;\r\n }\r\n\r\n\r\n // Does not strip trailing zeros.\r\n function truncate(arr, len) {\r\n if (arr.length > len) {\r\n arr.length = len;\r\n return true;\r\n }\r\n }\r\n\r\n\r\n // Decimal methods\r\n\r\n\r\n /*\r\n * abs\r\n * acos\r\n * acosh\r\n * add\r\n * asin\r\n * asinh\r\n * atan\r\n * atanh\r\n * atan2\r\n * cbrt\r\n * ceil\r\n * clone\r\n * config\r\n * cos\r\n * cosh\r\n * div\r\n * exp\r\n * floor\r\n * hypot\r\n * ln\r\n * log\r\n * log2\r\n * log10\r\n * max\r\n * min\r\n * mod\r\n * mul\r\n * pow\r\n * random\r\n * round\r\n * set\r\n * sign\r\n * sin\r\n * sinh\r\n * sqrt\r\n * sub\r\n * tan\r\n * tanh\r\n * trunc\r\n */\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the absolute value of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function abs(x) {\r\n return new this(x).abs();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arccosine in radians of `x`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function acos(x) {\r\n return new this(x).acos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic cosine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function acosh(x) {\r\n return new this(x).acosh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sum of `x` and `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function add(x, y) {\r\n return new this(x).plus(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arcsine in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function asin(x) {\r\n return new this(x).asin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic sine of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function asinh(x) {\r\n return new this(x).asinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function atan(x) {\r\n return new this(x).atan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the inverse of the hyperbolic tangent of `x`, rounded to\r\n * `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function atanh(x) {\r\n return new this(x).atanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the arctangent in radians of `y/x` in the range -pi to pi\r\n * (inclusive), rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * Domain: [-Infinity, Infinity]\r\n * Range: [-pi, pi]\r\n *\r\n * y {number|string|Decimal} The y-coordinate.\r\n * x {number|string|Decimal} The x-coordinate.\r\n *\r\n * atan2(±0, -0) = ±pi\r\n * atan2(±0, +0) = ±0\r\n * atan2(±0, -x) = ±pi for x > 0\r\n * atan2(±0, x) = ±0 for x > 0\r\n * atan2(-y, ±0) = -pi/2 for y > 0\r\n * atan2(y, ±0) = pi/2 for y > 0\r\n * atan2(±y, -Infinity) = ±pi for finite y > 0\r\n * atan2(±y, +Infinity) = ±0 for finite y > 0\r\n * atan2(±Infinity, x) = ±pi/2 for finite x\r\n * atan2(±Infinity, -Infinity) = ±3*pi/4\r\n * atan2(±Infinity, +Infinity) = ±pi/4\r\n * atan2(NaN, x) = NaN\r\n * atan2(y, NaN) = NaN\r\n *\r\n */\r\n function atan2(y, x) {\r\n y = new this(y);\r\n x = new this(x);\r\n var r,\r\n pr = this.precision,\r\n rm = this.rounding,\r\n wpr = pr + 4;\r\n\r\n // Either NaN\r\n if (!y.s || !x.s) {\r\n r = new this(NaN);\r\n\r\n // Both ±Infinity\r\n } else if (!y.d && !x.d) {\r\n r = getPi(this, wpr, 1).times(x.s > 0 ? 0.25 : 0.75);\r\n r.s = y.s;\r\n\r\n // x is ±Infinity or y is ±0\r\n } else if (!x.d || y.isZero()) {\r\n r = x.s < 0 ? getPi(this, pr, rm) : new this(0);\r\n r.s = y.s;\r\n\r\n // y is ±Infinity or x is ±0\r\n } else if (!y.d || x.isZero()) {\r\n r = getPi(this, wpr, 1).times(0.5);\r\n r.s = y.s;\r\n\r\n // Both non-zero and finite\r\n } else if (x.s < 0) {\r\n this.precision = wpr;\r\n this.rounding = 1;\r\n r = this.atan(divide(y, x, wpr, 1));\r\n x = getPi(this, wpr, 1);\r\n this.precision = pr;\r\n this.rounding = rm;\r\n r = y.s < 0 ? r.minus(x) : r.plus(x);\r\n } else {\r\n r = this.atan(divide(y, x, wpr, 1));\r\n }\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cube root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function cbrt(x) {\r\n return new this(x).cbrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using `ROUND_CEIL`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ceil(x) {\r\n return finalise(x = new this(x), x.e + 1, 2);\r\n }\r\n\r\n\r\n /*\r\n * Configure global settings for a Decimal constructor.\r\n *\r\n * `obj` is an object with one or more of the following properties,\r\n *\r\n * precision {number}\r\n * rounding {number}\r\n * toExpNeg {number}\r\n * toExpPos {number}\r\n * maxE {number}\r\n * minE {number}\r\n * modulo {number}\r\n * crypto {boolean|number}\r\n * defaults {true}\r\n *\r\n * E.g. Decimal.config({ precision: 20, rounding: 4 })\r\n *\r\n */\r\n function config(obj) {\r\n if (!obj || typeof obj !== 'object') throw Error(decimalError + 'Object expected');\r\n var i, p, v,\r\n useDefaults = obj.defaults === true,\r\n ps = [\r\n 'precision', 1, MAX_DIGITS,\r\n 'rounding', 0, 8,\r\n 'toExpNeg', -EXP_LIMIT, 0,\r\n 'toExpPos', 0, EXP_LIMIT,\r\n 'maxE', 0, EXP_LIMIT,\r\n 'minE', -EXP_LIMIT, 0,\r\n 'modulo', 0, 9\r\n ];\r\n\r\n for (i = 0; i < ps.length; i += 3) {\r\n if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;\r\n else throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n if (p = 'crypto', useDefaults) this[p] = DEFAULTS[p];\r\n if ((v = obj[p]) !== void 0) {\r\n if (v === true || v === false || v === 0 || v === 1) {\r\n if (v) {\r\n if (typeof crypto != 'undefined' && crypto &&\r\n (crypto.getRandomValues || crypto.randomBytes)) {\r\n this[p] = true;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n } else {\r\n this[p] = false;\r\n }\r\n } else {\r\n throw Error(invalidArgument + p + ': ' + v);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the cosine of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cos(x) {\r\n return new this(x).cos();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic cosine of `x`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function cosh(x) {\r\n return new this(x).cosh();\r\n }\r\n\r\n\r\n /*\r\n * Create and return a Decimal constructor with the same configuration properties as this Decimal\r\n * constructor.\r\n *\r\n */\r\n function clone(obj) {\r\n var i, p, ps;\r\n\r\n /*\r\n * The Decimal constructor and exported function.\r\n * Return a new Decimal instance.\r\n *\r\n * v {number|string|Decimal} A numeric value.\r\n *\r\n */\r\n function Decimal(v) {\r\n var e, i, t,\r\n x = this;\r\n\r\n // Decimal called without new.\r\n if (!(x instanceof Decimal)) return new Decimal(v);\r\n\r\n // Retain a reference to this Decimal constructor, and shadow Decimal.prototype.constructor\r\n // which points to Object.\r\n x.constructor = Decimal;\r\n\r\n // Duplicate.\r\n if (v instanceof Decimal) {\r\n x.s = v.s;\r\n\r\n if (external) {\r\n if (!v.d || v.e > Decimal.maxE) {\r\n\r\n // Infinity.\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (v.e < Decimal.minE) {\r\n\r\n // Zero.\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d.slice();\r\n }\r\n } else {\r\n x.e = v.e;\r\n x.d = v.d ? v.d.slice() : v.d;\r\n }\r\n\r\n return;\r\n }\r\n\r\n t = typeof v;\r\n\r\n if (t === 'number') {\r\n if (v === 0) {\r\n x.s = 1 / v < 0 ? -1 : 1;\r\n x.e = 0;\r\n x.d = [0];\r\n return;\r\n }\r\n\r\n if (v < 0) {\r\n v = -v;\r\n x.s = -1;\r\n } else {\r\n x.s = 1;\r\n }\r\n\r\n // Fast path for small integers.\r\n if (v === ~~v && v < 1e7) {\r\n for (e = 0, i = v; i >= 10; i /= 10) e++;\r\n\r\n if (external) {\r\n if (e > Decimal.maxE) {\r\n x.e = NaN;\r\n x.d = null;\r\n } else if (e < Decimal.minE) {\r\n x.e = 0;\r\n x.d = [0];\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n } else {\r\n x.e = e;\r\n x.d = [v];\r\n }\r\n\r\n return;\r\n\r\n // Infinity, NaN.\r\n } else if (v * 0 !== 0) {\r\n if (!v) x.s = NaN;\r\n x.e = NaN;\r\n x.d = null;\r\n return;\r\n }\r\n\r\n return parseDecimal(x, v.toString());\r\n\r\n } else if (t !== 'string') {\r\n throw Error(invalidArgument + v);\r\n }\r\n\r\n // Minus sign?\r\n if ((i = v.charCodeAt(0)) === 45) {\r\n v = v.slice(1);\r\n x.s = -1;\r\n } else {\r\n // Plus sign?\r\n if (i === 43) v = v.slice(1);\r\n x.s = 1;\r\n }\r\n\r\n return isDecimal.test(v) ? parseDecimal(x, v) : parseOther(x, v);\r\n }\r\n\r\n Decimal.prototype = P;\r\n\r\n Decimal.ROUND_UP = 0;\r\n Decimal.ROUND_DOWN = 1;\r\n Decimal.ROUND_CEIL = 2;\r\n Decimal.ROUND_FLOOR = 3;\r\n Decimal.ROUND_HALF_UP = 4;\r\n Decimal.ROUND_HALF_DOWN = 5;\r\n Decimal.ROUND_HALF_EVEN = 6;\r\n Decimal.ROUND_HALF_CEIL = 7;\r\n Decimal.ROUND_HALF_FLOOR = 8;\r\n Decimal.EUCLID = 9;\r\n\r\n Decimal.config = Decimal.set = config;\r\n Decimal.clone = clone;\r\n Decimal.isDecimal = isDecimalInstance;\r\n\r\n Decimal.abs = abs;\r\n Decimal.acos = acos;\r\n Decimal.acosh = acosh; // ES6\r\n Decimal.add = add;\r\n Decimal.asin = asin;\r\n Decimal.asinh = asinh; // ES6\r\n Decimal.atan = atan;\r\n Decimal.atanh = atanh; // ES6\r\n Decimal.atan2 = atan2;\r\n Decimal.cbrt = cbrt; // ES6\r\n Decimal.ceil = ceil;\r\n Decimal.cos = cos;\r\n Decimal.cosh = cosh; // ES6\r\n Decimal.div = div;\r\n Decimal.exp = exp;\r\n Decimal.floor = floor;\r\n Decimal.hypot = hypot; // ES6\r\n Decimal.ln = ln;\r\n Decimal.log = log;\r\n Decimal.log10 = log10; // ES6\r\n Decimal.log2 = log2; // ES6\r\n Decimal.max = max;\r\n Decimal.min = min;\r\n Decimal.mod = mod;\r\n Decimal.mul = mul;\r\n Decimal.pow = pow;\r\n Decimal.random = random;\r\n Decimal.round = round;\r\n Decimal.sign = sign; // ES6\r\n Decimal.sin = sin;\r\n Decimal.sinh = sinh; // ES6\r\n Decimal.sqrt = sqrt;\r\n Decimal.sub = sub;\r\n Decimal.tan = tan;\r\n Decimal.tanh = tanh; // ES6\r\n Decimal.trunc = trunc; // ES6\r\n\r\n if (obj === void 0) obj = {};\r\n if (obj) {\r\n if (obj.defaults !== true) {\r\n ps = ['precision', 'rounding', 'toExpNeg', 'toExpPos', 'maxE', 'minE', 'modulo', 'crypto'];\r\n for (i = 0; i < ps.length;) if (!obj.hasOwnProperty(p = ps[i++])) obj[p] = this[p];\r\n }\r\n }\r\n\r\n Decimal.config(obj);\r\n\r\n return Decimal;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` divided by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function div(x, y) {\r\n return new this(x).div(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural exponential of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The power to which to raise the base of the natural log.\r\n *\r\n */\r\n function exp(x) {\r\n return new this(x).exp();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` round to an integer using `ROUND_FLOOR`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function floor(x) {\r\n return finalise(x = new this(x), x.e + 1, 3);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of the sum of the squares of the arguments,\r\n * rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * hypot(a, b, ...) = sqrt(a^2 + b^2 + ...)\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function hypot() {\r\n var i, n,\r\n t = new this(0);\r\n\r\n external = false;\r\n\r\n for (i = 0; i < arguments.length;) {\r\n n = new this(arguments[i++]);\r\n if (!n.d) {\r\n if (n.s) {\r\n external = true;\r\n return new this(1 / 0);\r\n }\r\n t = n;\r\n } else if (t.d) {\r\n t = t.plus(n.times(n));\r\n }\r\n }\r\n\r\n external = true;\r\n\r\n return t.sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return true if object is a Decimal instance (where Decimal is any Decimal constructor),\r\n * otherwise return false.\r\n *\r\n */\r\n function isDecimalInstance(obj) {\r\n return obj instanceof Decimal || obj && obj.name === '[object Decimal]' || false;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the natural logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function ln(x) {\r\n return new this(x).ln();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the log of `x` to the base `y`, or to base 10 if no base\r\n * is specified, rounded to `precision` significant digits using rounding mode `rounding`.\r\n *\r\n * log[y](x)\r\n *\r\n * x {number|string|Decimal} The argument of the logarithm.\r\n * y {number|string|Decimal} The base of the logarithm.\r\n *\r\n */\r\n function log(x, y) {\r\n return new this(x).log(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 2 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log2(x) {\r\n return new this(x).log(2);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the base 10 logarithm of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function log10(x) {\r\n return new this(x).log(10);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the maximum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function max() {\r\n return maxOrMin(this, arguments, 'lt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the minimum of the arguments.\r\n *\r\n * arguments {number|string|Decimal}\r\n *\r\n */\r\n function min() {\r\n return maxOrMin(this, arguments, 'gt');\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` modulo `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mod(x, y) {\r\n return new this(x).mod(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` multiplied by `y`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function mul(x, y) {\r\n return new this(x).mul(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` raised to the power `y`, rounded to precision\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} The base.\r\n * y {number|string|Decimal} The exponent.\r\n *\r\n */\r\n function pow(x, y) {\r\n return new this(x).pow(y);\r\n }\r\n\r\n\r\n /*\r\n * Returns a new Decimal with a random value equal to or greater than 0 and less than 1, and with\r\n * `sd`, or `Decimal.precision` if `sd` is omitted, significant digits (or less if trailing zeros\r\n * are produced).\r\n *\r\n * [sd] {number} Significant digits. Integer, 0 to MAX_DIGITS inclusive.\r\n *\r\n */\r\n function random(sd) {\r\n var d, e, k, n,\r\n i = 0,\r\n r = new this(1),\r\n rd = [];\r\n\r\n if (sd === void 0) sd = this.precision;\r\n else checkInt32(sd, 1, MAX_DIGITS);\r\n\r\n k = Math.ceil(sd / LOG_BASE);\r\n\r\n if (!this.crypto) {\r\n for (; i < k;) rd[i++] = Math.random() * 1e7 | 0;\r\n\r\n // Browsers supporting crypto.getRandomValues.\r\n } else if (crypto.getRandomValues) {\r\n d = crypto.getRandomValues(new Uint32Array(k));\r\n\r\n for (; i < k;) {\r\n n = d[i];\r\n\r\n // 0 <= n < 4294967296\r\n // Probability n >= 4.29e9, is 4967296 / 4294967296 = 0.00116 (1 in 865).\r\n if (n >= 4.29e9) {\r\n d[i] = crypto.getRandomValues(new Uint32Array(1))[0];\r\n } else {\r\n\r\n // 0 <= n <= 4289999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd[i++] = n % 1e7;\r\n }\r\n }\r\n\r\n // Node.js supporting crypto.randomBytes.\r\n } else if (crypto.randomBytes) {\r\n\r\n // buffer\r\n d = crypto.randomBytes(k *= 4);\r\n\r\n for (; i < k;) {\r\n\r\n // 0 <= n < 2147483648\r\n n = d[i] + (d[i + 1] << 8) + (d[i + 2] << 16) + ((d[i + 3] & 0x7f) << 24);\r\n\r\n // Probability n >= 2.14e9, is 7483648 / 2147483648 = 0.0035 (1 in 286).\r\n if (n >= 2.14e9) {\r\n crypto.randomBytes(4).copy(d, i);\r\n } else {\r\n\r\n // 0 <= n <= 2139999999\r\n // 0 <= (n % 1e7) <= 9999999\r\n rd.push(n % 1e7);\r\n i += 4;\r\n }\r\n }\r\n\r\n i = k / 4;\r\n } else {\r\n throw Error(cryptoUnavailable);\r\n }\r\n\r\n k = rd[--i];\r\n sd %= LOG_BASE;\r\n\r\n // Convert trailing digits to zeros according to sd.\r\n if (k && sd) {\r\n n = mathpow(10, LOG_BASE - sd);\r\n rd[i] = (k / n | 0) * n;\r\n }\r\n\r\n // Remove trailing words which are zero.\r\n for (; rd[i] === 0; i--) rd.pop();\r\n\r\n // Zero?\r\n if (i < 0) {\r\n e = 0;\r\n rd = [0];\r\n } else {\r\n e = -1;\r\n\r\n // Remove leading words which are zero and adjust exponent accordingly.\r\n for (; rd[0] === 0; e -= LOG_BASE) rd.shift();\r\n\r\n // Count the digits of the first word of rd to determine leading zeros.\r\n for (k = 1, n = rd[0]; n >= 10; n /= 10) k++;\r\n\r\n // Adjust the exponent for leading zeros of the first word of rd.\r\n if (k < LOG_BASE) e -= LOG_BASE - k;\r\n }\r\n\r\n r.e = e;\r\n r.d = rd;\r\n\r\n return r;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` rounded to an integer using rounding mode `rounding`.\r\n *\r\n * To emulate `Math.round`, set rounding to 7 (ROUND_HALF_CEIL).\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function round(x) {\r\n return finalise(x = new this(x), x.e + 1, this.rounding);\r\n }\r\n\r\n\r\n /*\r\n * Return\r\n * 1 if x > 0,\r\n * -1 if x < 0,\r\n * 0 if x is 0,\r\n * -0 if x is -0,\r\n * NaN otherwise\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sign(x) {\r\n x = new this(x);\r\n return x.d ? (x.d[0] ? x.s : 0 * x.s) : x.s || NaN;\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the sine of `x`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sin(x) {\r\n return new this(x).sin();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic sine of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function sinh(x) {\r\n return new this(x).sinh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the square root of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function sqrt(x) {\r\n return new this(x).sqrt();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` minus `y`, rounded to `precision` significant digits\r\n * using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal}\r\n * y {number|string|Decimal}\r\n *\r\n */\r\n function sub(x, y) {\r\n return new this(x).sub(y);\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the tangent of `x`, rounded to `precision` significant\r\n * digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tan(x) {\r\n return new this(x).tan();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is the hyperbolic tangent of `x`, rounded to `precision`\r\n * significant digits using rounding mode `rounding`.\r\n *\r\n * x {number|string|Decimal} A value in radians.\r\n *\r\n */\r\n function tanh(x) {\r\n return new this(x).tanh();\r\n }\r\n\r\n\r\n /*\r\n * Return a new Decimal whose value is `x` truncated to an integer.\r\n *\r\n * x {number|string|Decimal}\r\n *\r\n */\r\n function trunc(x) {\r\n return finalise(x = new this(x), x.e + 1, 1);\r\n }\r\n\r\n\r\n // Create and configure initial Decimal constructor.\r\n Decimal = clone(DEFAULTS);\r\n\r\n Decimal['default'] = Decimal.Decimal = Decimal;\r\n\r\n // Create the internal constants from their string values.\r\n LN10 = new Decimal(LN10);\r\n PI = new Decimal(PI);\r\n\r\n\r\n // Export.\r\n\r\n\r\n // AMD.\r\n if (typeof define == 'function' && define.amd) {\r\n define(function () {\r\n return Decimal;\r\n });\r\n\r\n // Node and other environments that support module.exports.\r\n } else if (typeof module != 'undefined' && module.exports) {\r\n if (typeof Symbol == 'function' && typeof Symbol.iterator == 'symbol') {\r\n P[Symbol.for('nodejs.util.inspect.custom')] = P.toString;\r\n P[Symbol.toStringTag] = 'Decimal';\r\n }\r\n\r\n module.exports = Decimal;\r\n\r\n // Browser.\r\n } else {\r\n if (!globalScope) {\r\n globalScope = typeof self != 'undefined' && self && self.self == self ? self : window;\r\n }\r\n\r\n noConflict = globalScope.Decimal;\r\n Decimal.noConflict = function () {\r\n globalScope.Decimal = noConflict;\r\n return Decimal;\r\n };\r\n\r\n globalScope.Decimal = Decimal;\r\n }\r\n})(this);\r\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _defineProperty = require(\"../core-js/object/define-property\");\n\nvar _defineProperty2 = _interopRequireDefault(_defineProperty);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n (0, _defineProperty2.default)(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();","\"use strict\";\n\nexports.__esModule = true;\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && ((typeof call === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(call)) === \"object\" || typeof call === \"function\") ? call : self;\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _setPrototypeOf = require(\"../core-js/object/set-prototype-of\");\n\nvar _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);\n\nvar _create = require(\"../core-js/object/create\");\n\nvar _create2 = _interopRequireDefault(_create);\n\nvar _typeof2 = require(\"../helpers/typeof\");\n\nvar _typeof3 = _interopRequireDefault(_typeof2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof superClass === \"undefined\" ? \"undefined\" : (0, _typeof3.default)(superClass)));\n }\n\n subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;\n};","import ReactDOM from 'react-dom';\n/**\n * Return if a node is a DOM node. Else will return by `findDOMNode`\n */\n\nexport default function findDOMNode(node) {\n if (node instanceof HTMLElement) {\n return node;\n }\n\n return ReactDOM.findDOMNode(node);\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.polygonClipping = factory());\n}(this, (function () { 'use strict';\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n /**\n * splaytree v3.1.0\n * Fast Splay tree for Node and browser\n *\n * @author Alexander Milevski <info@w8r.name>\n * @license MIT\n * @preserve\n */\n var Node =\n /** @class */\n function () {\n function Node(key, data) {\n this.next = null;\n this.key = key;\n this.data = data;\n this.left = null;\n this.right = null;\n }\n\n return Node;\n }();\n /* follows \"An implementation of top-down splaying\"\r\n * by D. Sleator <sleator@cs.cmu.edu> March 1992\r\n */\n\n\n function DEFAULT_COMPARE(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n /**\r\n * Simple top down splay, not requiring i to be in the tree t.\r\n */\n\n\n function splay(i, t, comparator) {\n var N = new Node(null, null);\n var l = N;\n var r = N;\n\n while (true) {\n var cmp = comparator(i, t.key); //if (i < t.key) {\n\n if (cmp < 0) {\n if (t.left === null) break; //if (i < t.left.key) {\n\n if (comparator(i, t.left.key) < 0) {\n var y = t.left;\n /* rotate right */\n\n t.left = y.right;\n y.right = t;\n t = y;\n if (t.left === null) break;\n }\n\n r.left = t;\n /* link right */\n\n r = t;\n t = t.left; //} else if (i > t.key) {\n } else if (cmp > 0) {\n if (t.right === null) break; //if (i > t.right.key) {\n\n if (comparator(i, t.right.key) > 0) {\n var y = t.right;\n /* rotate left */\n\n t.right = y.left;\n y.left = t;\n t = y;\n if (t.right === null) break;\n }\n\n l.right = t;\n /* link left */\n\n l = t;\n t = t.right;\n } else break;\n }\n /* assemble */\n\n\n l.right = t.left;\n r.left = t.right;\n t.left = N.right;\n t.right = N.left;\n return t;\n }\n\n function insert(i, data, t, comparator) {\n var node = new Node(i, data);\n\n if (t === null) {\n node.left = node.right = null;\n return node;\n }\n\n t = splay(i, t, comparator);\n var cmp = comparator(i, t.key);\n\n if (cmp < 0) {\n node.left = t.left;\n node.right = t;\n t.left = null;\n } else if (cmp >= 0) {\n node.right = t.right;\n node.left = t;\n t.right = null;\n }\n\n return node;\n }\n\n function split(key, v, comparator) {\n var left = null;\n var right = null;\n\n if (v) {\n v = splay(key, v, comparator);\n var cmp = comparator(v.key, key);\n\n if (cmp === 0) {\n left = v.left;\n right = v.right;\n } else if (cmp < 0) {\n right = v.right;\n v.right = null;\n left = v;\n } else {\n left = v.left;\n v.left = null;\n right = v;\n }\n }\n\n return {\n left: left,\n right: right\n };\n }\n\n function merge(left, right, comparator) {\n if (right === null) return left;\n if (left === null) return right;\n right = splay(left.key, right, comparator);\n right.left = left;\n return right;\n }\n /**\r\n * Prints level of the tree\r\n */\n\n\n function printRow(root, prefix, isTail, out, printNode) {\n if (root) {\n out(\"\" + prefix + (isTail ? '└── ' : '├── ') + printNode(root) + \"\\n\");\n var indent = prefix + (isTail ? ' ' : '│ ');\n if (root.left) printRow(root.left, indent, false, out, printNode);\n if (root.right) printRow(root.right, indent, true, out, printNode);\n }\n }\n\n var Tree =\n /** @class */\n function () {\n function Tree(comparator) {\n if (comparator === void 0) {\n comparator = DEFAULT_COMPARE;\n }\n\n this._root = null;\n this._size = 0;\n this._comparator = comparator;\n }\n /**\r\n * Inserts a key, allows duplicates\r\n */\n\n\n Tree.prototype.insert = function (key, data) {\n this._size++;\n return this._root = insert(key, data, this._root, this._comparator);\n };\n /**\r\n * Adds a key, if it is not present in the tree\r\n */\n\n\n Tree.prototype.add = function (key, data) {\n var node = new Node(key, data);\n\n if (this._root === null) {\n node.left = node.right = null;\n this._size++;\n this._root = node;\n }\n\n var comparator = this._comparator;\n var t = splay(key, this._root, comparator);\n var cmp = comparator(key, t.key);\n if (cmp === 0) this._root = t;else {\n if (cmp < 0) {\n node.left = t.left;\n node.right = t;\n t.left = null;\n } else if (cmp > 0) {\n node.right = t.right;\n node.left = t;\n t.right = null;\n }\n\n this._size++;\n this._root = node;\n }\n return this._root;\n };\n /**\r\n * @param {Key} key\r\n * @return {Node|null}\r\n */\n\n\n Tree.prototype.remove = function (key) {\n this._root = this._remove(key, this._root, this._comparator);\n };\n /**\r\n * Deletes i from the tree if it's there\r\n */\n\n\n Tree.prototype._remove = function (i, t, comparator) {\n var x;\n if (t === null) return null;\n t = splay(i, t, comparator);\n var cmp = comparator(i, t.key);\n\n if (cmp === 0) {\n /* found it */\n if (t.left === null) {\n x = t.right;\n } else {\n x = splay(i, t.left, comparator);\n x.right = t.right;\n }\n\n this._size--;\n return x;\n }\n\n return t;\n /* It wasn't there */\n };\n /**\r\n * Removes and returns the node with smallest key\r\n */\n\n\n Tree.prototype.pop = function () {\n var node = this._root;\n\n if (node) {\n while (node.left) {\n node = node.left;\n }\n\n this._root = splay(node.key, this._root, this._comparator);\n this._root = this._remove(node.key, this._root, this._comparator);\n return {\n key: node.key,\n data: node.data\n };\n }\n\n return null;\n };\n /**\r\n * Find without splaying\r\n */\n\n\n Tree.prototype.findStatic = function (key) {\n var current = this._root;\n var compare = this._comparator;\n\n while (current) {\n var cmp = compare(key, current.key);\n if (cmp === 0) return current;else if (cmp < 0) current = current.left;else current = current.right;\n }\n\n return null;\n };\n\n Tree.prototype.find = function (key) {\n if (this._root) {\n this._root = splay(key, this._root, this._comparator);\n if (this._comparator(key, this._root.key) !== 0) return null;\n }\n\n return this._root;\n };\n\n Tree.prototype.contains = function (key) {\n var current = this._root;\n var compare = this._comparator;\n\n while (current) {\n var cmp = compare(key, current.key);\n if (cmp === 0) return true;else if (cmp < 0) current = current.left;else current = current.right;\n }\n\n return false;\n };\n\n Tree.prototype.forEach = function (visitor, ctx) {\n var current = this._root;\n var Q = [];\n /* Initialize stack s */\n\n var done = false;\n\n while (!done) {\n if (current !== null) {\n Q.push(current);\n current = current.left;\n } else {\n if (Q.length !== 0) {\n current = Q.pop();\n visitor.call(ctx, current);\n current = current.right;\n } else done = true;\n }\n }\n\n return this;\n };\n /**\r\n * Walk key range from `low` to `high`. Stops if `fn` returns a value.\r\n */\n\n\n Tree.prototype.range = function (low, high, fn, ctx) {\n var Q = [];\n var compare = this._comparator;\n var node = this._root;\n var cmp;\n\n while (Q.length !== 0 || node) {\n if (node) {\n Q.push(node);\n node = node.left;\n } else {\n node = Q.pop();\n cmp = compare(node.key, high);\n\n if (cmp > 0) {\n break;\n } else if (compare(node.key, low) >= 0) {\n if (fn.call(ctx, node)) return this; // stop if smth is returned\n }\n\n node = node.right;\n }\n }\n\n return this;\n };\n /**\r\n * Returns array of keys\r\n */\n\n\n Tree.prototype.keys = function () {\n var keys = [];\n this.forEach(function (_a) {\n var key = _a.key;\n return keys.push(key);\n });\n return keys;\n };\n /**\r\n * Returns array of all the data in the nodes\r\n */\n\n\n Tree.prototype.values = function () {\n var values = [];\n this.forEach(function (_a) {\n var data = _a.data;\n return values.push(data);\n });\n return values;\n };\n\n Tree.prototype.min = function () {\n if (this._root) return this.minNode(this._root).key;\n return null;\n };\n\n Tree.prototype.max = function () {\n if (this._root) return this.maxNode(this._root).key;\n return null;\n };\n\n Tree.prototype.minNode = function (t) {\n if (t === void 0) {\n t = this._root;\n }\n\n if (t) while (t.left) {\n t = t.left;\n }\n return t;\n };\n\n Tree.prototype.maxNode = function (t) {\n if (t === void 0) {\n t = this._root;\n }\n\n if (t) while (t.right) {\n t = t.right;\n }\n return t;\n };\n /**\r\n * Returns node at given index\r\n */\n\n\n Tree.prototype.at = function (index) {\n var current = this._root;\n var done = false;\n var i = 0;\n var Q = [];\n\n while (!done) {\n if (current) {\n Q.push(current);\n current = current.left;\n } else {\n if (Q.length > 0) {\n current = Q.pop();\n if (i === index) return current;\n i++;\n current = current.right;\n } else done = true;\n }\n }\n\n return null;\n };\n\n Tree.prototype.next = function (d) {\n var root = this._root;\n var successor = null;\n\n if (d.right) {\n successor = d.right;\n\n while (successor.left) {\n successor = successor.left;\n }\n\n return successor;\n }\n\n var comparator = this._comparator;\n\n while (root) {\n var cmp = comparator(d.key, root.key);\n if (cmp === 0) break;else if (cmp < 0) {\n successor = root;\n root = root.left;\n } else root = root.right;\n }\n\n return successor;\n };\n\n Tree.prototype.prev = function (d) {\n var root = this._root;\n var predecessor = null;\n\n if (d.left !== null) {\n predecessor = d.left;\n\n while (predecessor.right) {\n predecessor = predecessor.right;\n }\n\n return predecessor;\n }\n\n var comparator = this._comparator;\n\n while (root) {\n var cmp = comparator(d.key, root.key);\n if (cmp === 0) break;else if (cmp < 0) root = root.left;else {\n predecessor = root;\n root = root.right;\n }\n }\n\n return predecessor;\n };\n\n Tree.prototype.clear = function () {\n this._root = null;\n this._size = 0;\n return this;\n };\n\n Tree.prototype.toList = function () {\n return toList(this._root);\n };\n /**\r\n * Bulk-load items. Both array have to be same size\r\n */\n\n\n Tree.prototype.load = function (keys, values, presort) {\n if (values === void 0) {\n values = [];\n }\n\n if (presort === void 0) {\n presort = false;\n }\n\n var size = keys.length;\n var comparator = this._comparator; // sort if needed\n\n if (presort) sort(keys, values, 0, size - 1, comparator);\n\n if (this._root === null) {\n // empty tree\n this._root = loadRecursive(keys, values, 0, size);\n this._size = size;\n } else {\n // that re-builds the whole tree from two in-order traversals\n var mergedList = mergeLists(this.toList(), createList(keys, values), comparator);\n size = this._size + size;\n this._root = sortedListToBST({\n head: mergedList\n }, 0, size);\n }\n\n return this;\n };\n\n Tree.prototype.isEmpty = function () {\n return this._root === null;\n };\n\n Object.defineProperty(Tree.prototype, \"size\", {\n get: function get() {\n return this._size;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Tree.prototype, \"root\", {\n get: function get() {\n return this._root;\n },\n enumerable: true,\n configurable: true\n });\n\n Tree.prototype.toString = function (printNode) {\n if (printNode === void 0) {\n printNode = function printNode(n) {\n return String(n.key);\n };\n }\n\n var out = [];\n printRow(this._root, '', true, function (v) {\n return out.push(v);\n }, printNode);\n return out.join('');\n };\n\n Tree.prototype.update = function (key, newKey, newData) {\n var comparator = this._comparator;\n\n var _a = split(key, this._root, comparator),\n left = _a.left,\n right = _a.right;\n\n if (comparator(key, newKey) < 0) {\n right = insert(newKey, newData, right, comparator);\n } else {\n left = insert(newKey, newData, left, comparator);\n }\n\n this._root = merge(left, right, comparator);\n };\n\n Tree.prototype.split = function (key) {\n return split(key, this._root, this._comparator);\n };\n\n return Tree;\n }();\n\n function loadRecursive(keys, values, start, end) {\n var size = end - start;\n\n if (size > 0) {\n var middle = start + Math.floor(size / 2);\n var key = keys[middle];\n var data = values[middle];\n var node = new Node(key, data);\n node.left = loadRecursive(keys, values, start, middle);\n node.right = loadRecursive(keys, values, middle + 1, end);\n return node;\n }\n\n return null;\n }\n\n function createList(keys, values) {\n var head = new Node(null, null);\n var p = head;\n\n for (var i = 0; i < keys.length; i++) {\n p = p.next = new Node(keys[i], values[i]);\n }\n\n p.next = null;\n return head.next;\n }\n\n function toList(root) {\n var current = root;\n var Q = [];\n var done = false;\n var head = new Node(null, null);\n var p = head;\n\n while (!done) {\n if (current) {\n Q.push(current);\n current = current.left;\n } else {\n if (Q.length > 0) {\n current = p = p.next = Q.pop();\n current = current.right;\n } else done = true;\n }\n }\n\n p.next = null; // that'll work even if the tree was empty\n\n return head.next;\n }\n\n function sortedListToBST(list, start, end) {\n var size = end - start;\n\n if (size > 0) {\n var middle = start + Math.floor(size / 2);\n var left = sortedListToBST(list, start, middle);\n var root = list.head;\n root.left = left;\n list.head = list.head.next;\n root.right = sortedListToBST(list, middle + 1, end);\n return root;\n }\n\n return null;\n }\n\n function mergeLists(l1, l2, compare) {\n var head = new Node(null, null); // dummy\n\n var p = head;\n var p1 = l1;\n var p2 = l2;\n\n while (p1 !== null && p2 !== null) {\n if (compare(p1.key, p2.key) < 0) {\n p.next = p1;\n p1 = p1.next;\n } else {\n p.next = p2;\n p2 = p2.next;\n }\n\n p = p.next;\n }\n\n if (p1 !== null) {\n p.next = p1;\n } else if (p2 !== null) {\n p.next = p2;\n }\n\n return head.next;\n }\n\n function sort(keys, values, left, right, compare) {\n if (left >= right) return;\n var pivot = keys[left + right >> 1];\n var i = left - 1;\n var j = right + 1;\n\n while (true) {\n do {\n i++;\n } while (compare(keys[i], pivot) < 0);\n\n do {\n j--;\n } while (compare(keys[j], pivot) > 0);\n\n if (i >= j) break;\n var tmp = keys[i];\n keys[i] = keys[j];\n keys[j] = tmp;\n tmp = values[i];\n values[i] = values[j];\n values[j] = tmp;\n }\n\n sort(keys, values, left, j, compare);\n sort(keys, values, j + 1, right, compare);\n }\n\n /**\n * A bounding box has the format:\n *\n * { ll: { x: xmin, y: ymin }, ur: { x: xmax, y: ymax } }\n *\n */\n var isInBbox = function isInBbox(bbox, point) {\n return bbox.ll.x <= point.x && point.x <= bbox.ur.x && bbox.ll.y <= point.y && point.y <= bbox.ur.y;\n };\n /* Returns either null, or a bbox (aka an ordered pair of points)\n * If there is only one point of overlap, a bbox with identical points\n * will be returned */\n\n var getBboxOverlap = function getBboxOverlap(b1, b2) {\n // check if the bboxes overlap at all\n if (b2.ur.x < b1.ll.x || b1.ur.x < b2.ll.x || b2.ur.y < b1.ll.y || b1.ur.y < b2.ll.y) return null; // find the middle two X values\n\n var lowerX = b1.ll.x < b2.ll.x ? b2.ll.x : b1.ll.x;\n var upperX = b1.ur.x < b2.ur.x ? b1.ur.x : b2.ur.x; // find the middle two Y values\n\n var lowerY = b1.ll.y < b2.ll.y ? b2.ll.y : b1.ll.y;\n var upperY = b1.ur.y < b2.ur.y ? b1.ur.y : b2.ur.y; // put those middle values together to get the overlap\n\n return {\n ll: {\n x: lowerX,\n y: lowerY\n },\n ur: {\n x: upperX,\n y: upperY\n }\n };\n };\n\n /* Javascript doesn't do integer math. Everything is\n * floating point with percision Number.EPSILON.\n *\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/EPSILON\n */\n var epsilon = Number.EPSILON; // IE Polyfill\n\n if (epsilon === undefined) epsilon = Math.pow(2, -52);\n var EPSILON_SQ = epsilon * epsilon;\n /* FLP comparator */\n\n var cmp = function cmp(a, b) {\n // check if they're both 0\n if (-epsilon < a && a < epsilon) {\n if (-epsilon < b && b < epsilon) {\n return 0;\n }\n } // check if they're flp equal\n\n\n var ab = a - b;\n\n if (ab * ab < EPSILON_SQ * a * b) {\n return 0;\n } // normal comparison\n\n\n return a < b ? -1 : 1;\n };\n\n /**\n * This class rounds incoming values sufficiently so that\n * floating points problems are, for the most part, avoided.\n *\n * Incoming points are have their x & y values tested against\n * all previously seen x & y values. If either is 'too close'\n * to a previously seen value, it's value is 'snapped' to the\n * previously seen value.\n *\n * All points should be rounded by this class before being\n * stored in any data structures in the rest of this algorithm.\n */\n\n var PtRounder = /*#__PURE__*/function () {\n function PtRounder() {\n _classCallCheck(this, PtRounder);\n\n this.reset();\n }\n\n _createClass(PtRounder, [{\n key: \"reset\",\n value: function reset() {\n this.xRounder = new CoordRounder();\n this.yRounder = new CoordRounder();\n }\n }, {\n key: \"round\",\n value: function round(x, y) {\n return {\n x: this.xRounder.round(x),\n y: this.yRounder.round(y)\n };\n }\n }]);\n\n return PtRounder;\n }();\n\n var CoordRounder = /*#__PURE__*/function () {\n function CoordRounder() {\n _classCallCheck(this, CoordRounder);\n\n this.tree = new Tree(); // preseed with 0 so we don't end up with values < Number.EPSILON\n\n this.round(0);\n } // Note: this can rounds input values backwards or forwards.\n // You might ask, why not restrict this to just rounding\n // forwards? Wouldn't that allow left endpoints to always\n // remain left endpoints during splitting (never change to\n // right). No - it wouldn't, because we snap intersections\n // to endpoints (to establish independence from the segment\n // angle for t-intersections).\n\n\n _createClass(CoordRounder, [{\n key: \"round\",\n value: function round(coord) {\n var node = this.tree.add(coord);\n var prevNode = this.tree.prev(node);\n\n if (prevNode !== null && cmp(node.key, prevNode.key) === 0) {\n this.tree.remove(coord);\n return prevNode.key;\n }\n\n var nextNode = this.tree.next(node);\n\n if (nextNode !== null && cmp(node.key, nextNode.key) === 0) {\n this.tree.remove(coord);\n return nextNode.key;\n }\n\n return coord;\n }\n }]);\n\n return CoordRounder;\n }(); // singleton available by import\n\n\n var rounder = new PtRounder();\n\n /* Cross Product of two vectors with first point at origin */\n\n var crossProduct = function crossProduct(a, b) {\n return a.x * b.y - a.y * b.x;\n };\n /* Dot Product of two vectors with first point at origin */\n\n var dotProduct = function dotProduct(a, b) {\n return a.x * b.x + a.y * b.y;\n };\n /* Comparator for two vectors with same starting point */\n\n var compareVectorAngles = function compareVectorAngles(basePt, endPt1, endPt2) {\n var v1 = {\n x: endPt1.x - basePt.x,\n y: endPt1.y - basePt.y\n };\n var v2 = {\n x: endPt2.x - basePt.x,\n y: endPt2.y - basePt.y\n };\n var kross = crossProduct(v1, v2);\n return cmp(kross, 0);\n };\n var length = function length(v) {\n return Math.sqrt(dotProduct(v, v));\n };\n /* Get the sine of the angle from pShared -> pAngle to pShaed -> pBase */\n\n var sineOfAngle = function sineOfAngle(pShared, pBase, pAngle) {\n var vBase = {\n x: pBase.x - pShared.x,\n y: pBase.y - pShared.y\n };\n var vAngle = {\n x: pAngle.x - pShared.x,\n y: pAngle.y - pShared.y\n };\n return crossProduct(vAngle, vBase) / length(vAngle) / length(vBase);\n };\n /* Get the cosine of the angle from pShared -> pAngle to pShaed -> pBase */\n\n var cosineOfAngle = function cosineOfAngle(pShared, pBase, pAngle) {\n var vBase = {\n x: pBase.x - pShared.x,\n y: pBase.y - pShared.y\n };\n var vAngle = {\n x: pAngle.x - pShared.x,\n y: pAngle.y - pShared.y\n };\n return dotProduct(vAngle, vBase) / length(vAngle) / length(vBase);\n };\n /* Get the x coordinate where the given line (defined by a point and vector)\n * crosses the horizontal line with the given y coordiante.\n * In the case of parrallel lines (including overlapping ones) returns null. */\n\n var horizontalIntersection = function horizontalIntersection(pt, v, y) {\n if (v.y === 0) return null;\n return {\n x: pt.x + v.x / v.y * (y - pt.y),\n y: y\n };\n };\n /* Get the y coordinate where the given line (defined by a point and vector)\n * crosses the vertical line with the given x coordiante.\n * In the case of parrallel lines (including overlapping ones) returns null. */\n\n var verticalIntersection = function verticalIntersection(pt, v, x) {\n if (v.x === 0) return null;\n return {\n x: x,\n y: pt.y + v.y / v.x * (x - pt.x)\n };\n };\n /* Get the intersection of two lines, each defined by a base point and a vector.\n * In the case of parrallel lines (including overlapping ones) returns null. */\n\n var intersection = function intersection(pt1, v1, pt2, v2) {\n // take some shortcuts for vertical and horizontal lines\n // this also ensures we don't calculate an intersection and then discover\n // it's actually outside the bounding box of the line\n if (v1.x === 0) return verticalIntersection(pt2, v2, pt1.x);\n if (v2.x === 0) return verticalIntersection(pt1, v1, pt2.x);\n if (v1.y === 0) return horizontalIntersection(pt2, v2, pt1.y);\n if (v2.y === 0) return horizontalIntersection(pt1, v1, pt2.y); // General case for non-overlapping segments.\n // This algorithm is based on Schneider and Eberly.\n // http://www.cimec.org.ar/~ncalvo/Schneider_Eberly.pdf - pg 244\n\n var kross = crossProduct(v1, v2);\n if (kross == 0) return null;\n var ve = {\n x: pt2.x - pt1.x,\n y: pt2.y - pt1.y\n };\n var d1 = crossProduct(ve, v1) / kross;\n var d2 = crossProduct(ve, v2) / kross; // take the average of the two calculations to minimize rounding error\n\n var x1 = pt1.x + d2 * v1.x,\n x2 = pt2.x + d1 * v2.x;\n var y1 = pt1.y + d2 * v1.y,\n y2 = pt2.y + d1 * v2.y;\n var x = (x1 + x2) / 2;\n var y = (y1 + y2) / 2;\n return {\n x: x,\n y: y\n };\n };\n\n var SweepEvent = /*#__PURE__*/function () {\n _createClass(SweepEvent, null, [{\n key: \"compare\",\n // for ordering sweep events in the sweep event queue\n value: function compare(a, b) {\n // favor event with a point that the sweep line hits first\n var ptCmp = SweepEvent.comparePoints(a.point, b.point);\n if (ptCmp !== 0) return ptCmp; // the points are the same, so link them if needed\n\n if (a.point !== b.point) a.link(b); // favor right events over left\n\n if (a.isLeft !== b.isLeft) return a.isLeft ? 1 : -1; // we have two matching left or right endpoints\n // ordering of this case is the same as for their segments\n\n return Segment.compare(a.segment, b.segment);\n } // for ordering points in sweep line order\n\n }, {\n key: \"comparePoints\",\n value: function comparePoints(aPt, bPt) {\n if (aPt.x < bPt.x) return -1;\n if (aPt.x > bPt.x) return 1;\n if (aPt.y < bPt.y) return -1;\n if (aPt.y > bPt.y) return 1;\n return 0;\n } // Warning: 'point' input will be modified and re-used (for performance)\n\n }]);\n\n function SweepEvent(point, isLeft) {\n _classCallCheck(this, SweepEvent);\n\n if (point.events === undefined) point.events = [this];else point.events.push(this);\n this.point = point;\n this.isLeft = isLeft; // this.segment, this.otherSE set by factory\n }\n\n _createClass(SweepEvent, [{\n key: \"link\",\n value: function link(other) {\n if (other.point === this.point) {\n throw new Error('Tried to link already linked events');\n }\n\n var otherEvents = other.point.events;\n\n for (var i = 0, iMax = otherEvents.length; i < iMax; i++) {\n var evt = otherEvents[i];\n this.point.events.push(evt);\n evt.point = this.point;\n }\n\n this.checkForConsuming();\n }\n /* Do a pass over our linked events and check to see if any pair\n * of segments match, and should be consumed. */\n\n }, {\n key: \"checkForConsuming\",\n value: function checkForConsuming() {\n // FIXME: The loops in this method run O(n^2) => no good.\n // Maintain little ordered sweep event trees?\n // Can we maintaining an ordering that avoids the need\n // for the re-sorting with getLeftmostComparator in geom-out?\n // Compare each pair of events to see if other events also match\n var numEvents = this.point.events.length;\n\n for (var i = 0; i < numEvents; i++) {\n var evt1 = this.point.events[i];\n if (evt1.segment.consumedBy !== undefined) continue;\n\n for (var j = i + 1; j < numEvents; j++) {\n var evt2 = this.point.events[j];\n if (evt2.consumedBy !== undefined) continue;\n if (evt1.otherSE.point.events !== evt2.otherSE.point.events) continue;\n evt1.segment.consume(evt2.segment);\n }\n }\n }\n }, {\n key: \"getAvailableLinkedEvents\",\n value: function getAvailableLinkedEvents() {\n // point.events is always of length 2 or greater\n var events = [];\n\n for (var i = 0, iMax = this.point.events.length; i < iMax; i++) {\n var evt = this.point.events[i];\n\n if (evt !== this && !evt.segment.ringOut && evt.segment.isInResult()) {\n events.push(evt);\n }\n }\n\n return events;\n }\n /**\n * Returns a comparator function for sorting linked events that will\n * favor the event that will give us the smallest left-side angle.\n * All ring construction starts as low as possible heading to the right,\n * so by always turning left as sharp as possible we'll get polygons\n * without uncessary loops & holes.\n *\n * The comparator function has a compute cache such that it avoids\n * re-computing already-computed values.\n */\n\n }, {\n key: \"getLeftmostComparator\",\n value: function getLeftmostComparator(baseEvent) {\n var _this = this;\n\n var cache = new Map();\n\n var fillCache = function fillCache(linkedEvent) {\n var nextEvent = linkedEvent.otherSE;\n cache.set(linkedEvent, {\n sine: sineOfAngle(_this.point, baseEvent.point, nextEvent.point),\n cosine: cosineOfAngle(_this.point, baseEvent.point, nextEvent.point)\n });\n };\n\n return function (a, b) {\n if (!cache.has(a)) fillCache(a);\n if (!cache.has(b)) fillCache(b);\n\n var _cache$get = cache.get(a),\n asine = _cache$get.sine,\n acosine = _cache$get.cosine;\n\n var _cache$get2 = cache.get(b),\n bsine = _cache$get2.sine,\n bcosine = _cache$get2.cosine; // both on or above x-axis\n\n\n if (asine >= 0 && bsine >= 0) {\n if (acosine < bcosine) return 1;\n if (acosine > bcosine) return -1;\n return 0;\n } // both below x-axis\n\n\n if (asine < 0 && bsine < 0) {\n if (acosine < bcosine) return -1;\n if (acosine > bcosine) return 1;\n return 0;\n } // one above x-axis, one below\n\n\n if (bsine < asine) return -1;\n if (bsine > asine) return 1;\n return 0;\n };\n }\n }]);\n\n return SweepEvent;\n }();\n\n // segments and sweep events when all else is identical\n\n var segmentId = 0;\n\n var Segment = /*#__PURE__*/function () {\n _createClass(Segment, null, [{\n key: \"compare\",\n\n /* This compare() function is for ordering segments in the sweep\n * line tree, and does so according to the following criteria:\n *\n * Consider the vertical line that lies an infinestimal step to the\n * right of the right-more of the two left endpoints of the input\n * segments. Imagine slowly moving a point up from negative infinity\n * in the increasing y direction. Which of the two segments will that\n * point intersect first? That segment comes 'before' the other one.\n *\n * If neither segment would be intersected by such a line, (if one\n * or more of the segments are vertical) then the line to be considered\n * is directly on the right-more of the two left inputs.\n */\n value: function compare(a, b) {\n var alx = a.leftSE.point.x;\n var blx = b.leftSE.point.x;\n var arx = a.rightSE.point.x;\n var brx = b.rightSE.point.x; // check if they're even in the same vertical plane\n\n if (brx < alx) return 1;\n if (arx < blx) return -1;\n var aly = a.leftSE.point.y;\n var bly = b.leftSE.point.y;\n var ary = a.rightSE.point.y;\n var bry = b.rightSE.point.y; // is left endpoint of segment B the right-more?\n\n if (alx < blx) {\n // are the two segments in the same horizontal plane?\n if (bly < aly && bly < ary) return 1;\n if (bly > aly && bly > ary) return -1; // is the B left endpoint colinear to segment A?\n\n var aCmpBLeft = a.comparePoint(b.leftSE.point);\n if (aCmpBLeft < 0) return 1;\n if (aCmpBLeft > 0) return -1; // is the A right endpoint colinear to segment B ?\n\n var bCmpARight = b.comparePoint(a.rightSE.point);\n if (bCmpARight !== 0) return bCmpARight; // colinear segments, consider the one with left-more\n // left endpoint to be first (arbitrary?)\n\n return -1;\n } // is left endpoint of segment A the right-more?\n\n\n if (alx > blx) {\n if (aly < bly && aly < bry) return -1;\n if (aly > bly && aly > bry) return 1; // is the A left endpoint colinear to segment B?\n\n var bCmpALeft = b.comparePoint(a.leftSE.point);\n if (bCmpALeft !== 0) return bCmpALeft; // is the B right endpoint colinear to segment A?\n\n var aCmpBRight = a.comparePoint(b.rightSE.point);\n if (aCmpBRight < 0) return 1;\n if (aCmpBRight > 0) return -1; // colinear segments, consider the one with left-more\n // left endpoint to be first (arbitrary?)\n\n return 1;\n } // if we get here, the two left endpoints are in the same\n // vertical plane, ie alx === blx\n // consider the lower left-endpoint to come first\n\n\n if (aly < bly) return -1;\n if (aly > bly) return 1; // left endpoints are identical\n // check for colinearity by using the left-more right endpoint\n // is the A right endpoint more left-more?\n\n if (arx < brx) {\n var _bCmpARight = b.comparePoint(a.rightSE.point);\n\n if (_bCmpARight !== 0) return _bCmpARight;\n } // is the B right endpoint more left-more?\n\n\n if (arx > brx) {\n var _aCmpBRight = a.comparePoint(b.rightSE.point);\n\n if (_aCmpBRight < 0) return 1;\n if (_aCmpBRight > 0) return -1;\n }\n\n if (arx !== brx) {\n // are these two [almost] vertical segments with opposite orientation?\n // if so, the one with the lower right endpoint comes first\n var ay = ary - aly;\n var ax = arx - alx;\n var by = bry - bly;\n var bx = brx - blx;\n if (ay > ax && by < bx) return 1;\n if (ay < ax && by > bx) return -1;\n } // we have colinear segments with matching orientation\n // consider the one with more left-more right endpoint to be first\n\n\n if (arx > brx) return 1;\n if (arx < brx) return -1; // if we get here, two two right endpoints are in the same\n // vertical plane, ie arx === brx\n // consider the lower right-endpoint to come first\n\n if (ary < bry) return -1;\n if (ary > bry) return 1; // right endpoints identical as well, so the segments are idential\n // fall back on creation order as consistent tie-breaker\n\n if (a.id < b.id) return -1;\n if (a.id > b.id) return 1; // identical segment, ie a === b\n\n return 0;\n }\n /* Warning: a reference to ringWindings input will be stored,\n * and possibly will be later modified */\n\n }]);\n\n function Segment(leftSE, rightSE, rings, windings) {\n _classCallCheck(this, Segment);\n\n this.id = ++segmentId;\n this.leftSE = leftSE;\n leftSE.segment = this;\n leftSE.otherSE = rightSE;\n this.rightSE = rightSE;\n rightSE.segment = this;\n rightSE.otherSE = leftSE;\n this.rings = rings;\n this.windings = windings; // left unset for performance, set later in algorithm\n // this.ringOut, this.consumedBy, this.prev\n }\n\n _createClass(Segment, [{\n key: \"replaceRightSE\",\n\n /* When a segment is split, the rightSE is replaced with a new sweep event */\n value: function replaceRightSE(newRightSE) {\n this.rightSE = newRightSE;\n this.rightSE.segment = this;\n this.rightSE.otherSE = this.leftSE;\n this.leftSE.otherSE = this.rightSE;\n }\n }, {\n key: \"bbox\",\n value: function bbox() {\n var y1 = this.leftSE.point.y;\n var y2 = this.rightSE.point.y;\n return {\n ll: {\n x: this.leftSE.point.x,\n y: y1 < y2 ? y1 : y2\n },\n ur: {\n x: this.rightSE.point.x,\n y: y1 > y2 ? y1 : y2\n }\n };\n }\n /* A vector from the left point to the right */\n\n }, {\n key: \"vector\",\n value: function vector() {\n return {\n x: this.rightSE.point.x - this.leftSE.point.x,\n y: this.rightSE.point.y - this.leftSE.point.y\n };\n }\n }, {\n key: \"isAnEndpoint\",\n value: function isAnEndpoint(pt) {\n return pt.x === this.leftSE.point.x && pt.y === this.leftSE.point.y || pt.x === this.rightSE.point.x && pt.y === this.rightSE.point.y;\n }\n /* Compare this segment with a point.\n *\n * A point P is considered to be colinear to a segment if there\n * exists a distance D such that if we travel along the segment\n * from one * endpoint towards the other a distance D, we find\n * ourselves at point P.\n *\n * Return value indicates:\n *\n * 1: point lies above the segment (to the left of vertical)\n * 0: point is colinear to segment\n * -1: point lies below the segment (to the right of vertical)\n */\n\n }, {\n key: \"comparePoint\",\n value: function comparePoint(point) {\n if (this.isAnEndpoint(point)) return 0;\n var lPt = this.leftSE.point;\n var rPt = this.rightSE.point;\n var v = this.vector(); // Exactly vertical segments.\n\n if (lPt.x === rPt.x) {\n if (point.x === lPt.x) return 0;\n return point.x < lPt.x ? 1 : -1;\n } // Nearly vertical segments with an intersection.\n // Check to see where a point on the line with matching Y coordinate is.\n\n\n var yDist = (point.y - lPt.y) / v.y;\n var xFromYDist = lPt.x + yDist * v.x;\n if (point.x === xFromYDist) return 0; // General case.\n // Check to see where a point on the line with matching X coordinate is.\n\n var xDist = (point.x - lPt.x) / v.x;\n var yFromXDist = lPt.y + xDist * v.y;\n if (point.y === yFromXDist) return 0;\n return point.y < yFromXDist ? -1 : 1;\n }\n /**\n * Given another segment, returns the first non-trivial intersection\n * between the two segments (in terms of sweep line ordering), if it exists.\n *\n * A 'non-trivial' intersection is one that will cause one or both of the\n * segments to be split(). As such, 'trivial' vs. 'non-trivial' intersection:\n *\n * * endpoint of segA with endpoint of segB --> trivial\n * * endpoint of segA with point along segB --> non-trivial\n * * endpoint of segB with point along segA --> non-trivial\n * * point along segA with point along segB --> non-trivial\n *\n * If no non-trivial intersection exists, return null\n * Else, return null.\n */\n\n }, {\n key: \"getIntersection\",\n value: function getIntersection(other) {\n // If bboxes don't overlap, there can't be any intersections\n var tBbox = this.bbox();\n var oBbox = other.bbox();\n var bboxOverlap = getBboxOverlap(tBbox, oBbox);\n if (bboxOverlap === null) return null; // We first check to see if the endpoints can be considered intersections.\n // This will 'snap' intersections to endpoints if possible, and will\n // handle cases of colinearity.\n\n var tlp = this.leftSE.point;\n var trp = this.rightSE.point;\n var olp = other.leftSE.point;\n var orp = other.rightSE.point; // does each endpoint touch the other segment?\n // note that we restrict the 'touching' definition to only allow segments\n // to touch endpoints that lie forward from where we are in the sweep line pass\n\n var touchesOtherLSE = isInBbox(tBbox, olp) && this.comparePoint(olp) === 0;\n var touchesThisLSE = isInBbox(oBbox, tlp) && other.comparePoint(tlp) === 0;\n var touchesOtherRSE = isInBbox(tBbox, orp) && this.comparePoint(orp) === 0;\n var touchesThisRSE = isInBbox(oBbox, trp) && other.comparePoint(trp) === 0; // do left endpoints match?\n\n if (touchesThisLSE && touchesOtherLSE) {\n // these two cases are for colinear segments with matching left\n // endpoints, and one segment being longer than the other\n if (touchesThisRSE && !touchesOtherRSE) return trp;\n if (!touchesThisRSE && touchesOtherRSE) return orp; // either the two segments match exactly (two trival intersections)\n // or just on their left endpoint (one trivial intersection\n\n return null;\n } // does this left endpoint matches (other doesn't)\n\n\n if (touchesThisLSE) {\n // check for segments that just intersect on opposing endpoints\n if (touchesOtherRSE) {\n if (tlp.x === orp.x && tlp.y === orp.y) return null;\n } // t-intersection on left endpoint\n\n\n return tlp;\n } // does other left endpoint matches (this doesn't)\n\n\n if (touchesOtherLSE) {\n // check for segments that just intersect on opposing endpoints\n if (touchesThisRSE) {\n if (trp.x === olp.x && trp.y === olp.y) return null;\n } // t-intersection on left endpoint\n\n\n return olp;\n } // trivial intersection on right endpoints\n\n\n if (touchesThisRSE && touchesOtherRSE) return null; // t-intersections on just one right endpoint\n\n if (touchesThisRSE) return trp;\n if (touchesOtherRSE) return orp; // None of our endpoints intersect. Look for a general intersection between\n // infinite lines laid over the segments\n\n var pt = intersection(tlp, this.vector(), olp, other.vector()); // are the segments parrallel? Note that if they were colinear with overlap,\n // they would have an endpoint intersection and that case was already handled above\n\n if (pt === null) return null; // is the intersection found between the lines not on the segments?\n\n if (!isInBbox(bboxOverlap, pt)) return null; // round the the computed point if needed\n\n return rounder.round(pt.x, pt.y);\n }\n /**\n * Split the given segment into multiple segments on the given points.\n * * Each existing segment will retain its leftSE and a new rightSE will be\n * generated for it.\n * * A new segment will be generated which will adopt the original segment's\n * rightSE, and a new leftSE will be generated for it.\n * * If there are more than two points given to split on, new segments\n * in the middle will be generated with new leftSE and rightSE's.\n * * An array of the newly generated SweepEvents will be returned.\n *\n * Warning: input array of points is modified\n */\n\n }, {\n key: \"split\",\n value: function split(point) {\n var newEvents = [];\n var alreadyLinked = point.events !== undefined;\n var newLeftSE = new SweepEvent(point, true);\n var newRightSE = new SweepEvent(point, false);\n var oldRightSE = this.rightSE;\n this.replaceRightSE(newRightSE);\n newEvents.push(newRightSE);\n newEvents.push(newLeftSE);\n var newSeg = new Segment(newLeftSE, oldRightSE, this.rings.slice(), this.windings.slice()); // when splitting a nearly vertical downward-facing segment,\n // sometimes one of the resulting new segments is vertical, in which\n // case its left and right events may need to be swapped\n\n if (SweepEvent.comparePoints(newSeg.leftSE.point, newSeg.rightSE.point) > 0) {\n newSeg.swapEvents();\n }\n\n if (SweepEvent.comparePoints(this.leftSE.point, this.rightSE.point) > 0) {\n this.swapEvents();\n } // in the point we just used to create new sweep events with was already\n // linked to other events, we need to check if either of the affected\n // segments should be consumed\n\n\n if (alreadyLinked) {\n newLeftSE.checkForConsuming();\n newRightSE.checkForConsuming();\n }\n\n return newEvents;\n }\n /* Swap which event is left and right */\n\n }, {\n key: \"swapEvents\",\n value: function swapEvents() {\n var tmpEvt = this.rightSE;\n this.rightSE = this.leftSE;\n this.leftSE = tmpEvt;\n this.leftSE.isLeft = true;\n this.rightSE.isLeft = false;\n\n for (var i = 0, iMax = this.windings.length; i < iMax; i++) {\n this.windings[i] *= -1;\n }\n }\n /* Consume another segment. We take their rings under our wing\n * and mark them as consumed. Use for perfectly overlapping segments */\n\n }, {\n key: \"consume\",\n value: function consume(other) {\n var consumer = this;\n var consumee = other;\n\n while (consumer.consumedBy) {\n consumer = consumer.consumedBy;\n }\n\n while (consumee.consumedBy) {\n consumee = consumee.consumedBy;\n }\n\n var cmp = Segment.compare(consumer, consumee);\n if (cmp === 0) return; // already consumed\n // the winner of the consumption is the earlier segment\n // according to sweep line ordering\n\n if (cmp > 0) {\n var tmp = consumer;\n consumer = consumee;\n consumee = tmp;\n } // make sure a segment doesn't consume it's prev\n\n\n if (consumer.prev === consumee) {\n var _tmp = consumer;\n consumer = consumee;\n consumee = _tmp;\n }\n\n for (var i = 0, iMax = consumee.rings.length; i < iMax; i++) {\n var ring = consumee.rings[i];\n var winding = consumee.windings[i];\n var index = consumer.rings.indexOf(ring);\n\n if (index === -1) {\n consumer.rings.push(ring);\n consumer.windings.push(winding);\n } else consumer.windings[index] += winding;\n }\n\n consumee.rings = null;\n consumee.windings = null;\n consumee.consumedBy = consumer; // mark sweep events consumed as to maintain ordering in sweep event queue\n\n consumee.leftSE.consumedBy = consumer.leftSE;\n consumee.rightSE.consumedBy = consumer.rightSE;\n }\n /* The first segment previous segment chain that is in the result */\n\n }, {\n key: \"prevInResult\",\n value: function prevInResult() {\n if (this._prevInResult !== undefined) return this._prevInResult;\n if (!this.prev) this._prevInResult = null;else if (this.prev.isInResult()) this._prevInResult = this.prev;else this._prevInResult = this.prev.prevInResult();\n return this._prevInResult;\n }\n }, {\n key: \"beforeState\",\n value: function beforeState() {\n if (this._beforeState !== undefined) return this._beforeState;\n if (!this.prev) this._beforeState = {\n rings: [],\n windings: [],\n multiPolys: []\n };else {\n var seg = this.prev.consumedBy || this.prev;\n this._beforeState = seg.afterState();\n }\n return this._beforeState;\n }\n }, {\n key: \"afterState\",\n value: function afterState() {\n if (this._afterState !== undefined) return this._afterState;\n var beforeState = this.beforeState();\n this._afterState = {\n rings: beforeState.rings.slice(0),\n windings: beforeState.windings.slice(0),\n multiPolys: []\n };\n var ringsAfter = this._afterState.rings;\n var windingsAfter = this._afterState.windings;\n var mpsAfter = this._afterState.multiPolys; // calculate ringsAfter, windingsAfter\n\n for (var i = 0, iMax = this.rings.length; i < iMax; i++) {\n var ring = this.rings[i];\n var winding = this.windings[i];\n var index = ringsAfter.indexOf(ring);\n\n if (index === -1) {\n ringsAfter.push(ring);\n windingsAfter.push(winding);\n } else windingsAfter[index] += winding;\n } // calcualte polysAfter\n\n\n var polysAfter = [];\n var polysExclude = [];\n\n for (var _i = 0, _iMax = ringsAfter.length; _i < _iMax; _i++) {\n if (windingsAfter[_i] === 0) continue; // non-zero rule\n\n var _ring = ringsAfter[_i];\n var poly = _ring.poly;\n if (polysExclude.indexOf(poly) !== -1) continue;\n if (_ring.isExterior) polysAfter.push(poly);else {\n if (polysExclude.indexOf(poly) === -1) polysExclude.push(poly);\n\n var _index = polysAfter.indexOf(_ring.poly);\n\n if (_index !== -1) polysAfter.splice(_index, 1);\n }\n } // calculate multiPolysAfter\n\n\n for (var _i2 = 0, _iMax2 = polysAfter.length; _i2 < _iMax2; _i2++) {\n var mp = polysAfter[_i2].multiPoly;\n if (mpsAfter.indexOf(mp) === -1) mpsAfter.push(mp);\n }\n\n return this._afterState;\n }\n /* Is this segment part of the final result? */\n\n }, {\n key: \"isInResult\",\n value: function isInResult() {\n // if we've been consumed, we're not in the result\n if (this.consumedBy) return false;\n if (this._isInResult !== undefined) return this._isInResult;\n var mpsBefore = this.beforeState().multiPolys;\n var mpsAfter = this.afterState().multiPolys;\n\n switch (operation.type) {\n case 'union':\n {\n // UNION - included iff:\n // * On one side of us there is 0 poly interiors AND\n // * On the other side there is 1 or more.\n var noBefores = mpsBefore.length === 0;\n var noAfters = mpsAfter.length === 0;\n this._isInResult = noBefores !== noAfters;\n break;\n }\n\n case 'intersection':\n {\n // INTERSECTION - included iff:\n // * on one side of us all multipolys are rep. with poly interiors AND\n // * on the other side of us, not all multipolys are repsented\n // with poly interiors\n var least;\n var most;\n\n if (mpsBefore.length < mpsAfter.length) {\n least = mpsBefore.length;\n most = mpsAfter.length;\n } else {\n least = mpsAfter.length;\n most = mpsBefore.length;\n }\n\n this._isInResult = most === operation.numMultiPolys && least < most;\n break;\n }\n\n case 'xor':\n {\n // XOR - included iff:\n // * the difference between the number of multipolys represented\n // with poly interiors on our two sides is an odd number\n var diff = Math.abs(mpsBefore.length - mpsAfter.length);\n this._isInResult = diff % 2 === 1;\n break;\n }\n\n case 'difference':\n {\n // DIFFERENCE included iff:\n // * on exactly one side, we have just the subject\n var isJustSubject = function isJustSubject(mps) {\n return mps.length === 1 && mps[0].isSubject;\n };\n\n this._isInResult = isJustSubject(mpsBefore) !== isJustSubject(mpsAfter);\n break;\n }\n\n default:\n throw new Error(\"Unrecognized operation type found \".concat(operation.type));\n }\n\n return this._isInResult;\n }\n }], [{\n key: \"fromRing\",\n value: function fromRing(pt1, pt2, ring) {\n var leftPt, rightPt, winding; // ordering the two points according to sweep line ordering\n\n var cmpPts = SweepEvent.comparePoints(pt1, pt2);\n\n if (cmpPts < 0) {\n leftPt = pt1;\n rightPt = pt2;\n winding = 1;\n } else if (cmpPts > 0) {\n leftPt = pt2;\n rightPt = pt1;\n winding = -1;\n } else throw new Error(\"Tried to create degenerate segment at [\".concat(pt1.x, \", \").concat(pt1.y, \"]\"));\n\n var leftSE = new SweepEvent(leftPt, true);\n var rightSE = new SweepEvent(rightPt, false);\n return new Segment(leftSE, rightSE, [ring], [winding]);\n }\n }]);\n\n return Segment;\n }();\n\n var RingIn = /*#__PURE__*/function () {\n function RingIn(geomRing, poly, isExterior) {\n _classCallCheck(this, RingIn);\n\n if (!Array.isArray(geomRing) || geomRing.length === 0) {\n throw new Error('Input geometry is not a valid Polygon or MultiPolygon');\n }\n\n this.poly = poly;\n this.isExterior = isExterior;\n this.segments = [];\n\n if (typeof geomRing[0][0] !== 'number' || typeof geomRing[0][1] !== 'number') {\n throw new Error('Input geometry is not a valid Polygon or MultiPolygon');\n }\n\n var firstPoint = rounder.round(geomRing[0][0], geomRing[0][1]);\n this.bbox = {\n ll: {\n x: firstPoint.x,\n y: firstPoint.y\n },\n ur: {\n x: firstPoint.x,\n y: firstPoint.y\n }\n };\n var prevPoint = firstPoint;\n\n for (var i = 1, iMax = geomRing.length; i < iMax; i++) {\n if (typeof geomRing[i][0] !== 'number' || typeof geomRing[i][1] !== 'number') {\n throw new Error('Input geometry is not a valid Polygon or MultiPolygon');\n }\n\n var point = rounder.round(geomRing[i][0], geomRing[i][1]); // skip repeated points\n\n if (point.x === prevPoint.x && point.y === prevPoint.y) continue;\n this.segments.push(Segment.fromRing(prevPoint, point, this));\n if (point.x < this.bbox.ll.x) this.bbox.ll.x = point.x;\n if (point.y < this.bbox.ll.y) this.bbox.ll.y = point.y;\n if (point.x > this.bbox.ur.x) this.bbox.ur.x = point.x;\n if (point.y > this.bbox.ur.y) this.bbox.ur.y = point.y;\n prevPoint = point;\n } // add segment from last to first if last is not the same as first\n\n\n if (firstPoint.x !== prevPoint.x || firstPoint.y !== prevPoint.y) {\n this.segments.push(Segment.fromRing(prevPoint, firstPoint, this));\n }\n }\n\n _createClass(RingIn, [{\n key: \"getSweepEvents\",\n value: function getSweepEvents() {\n var sweepEvents = [];\n\n for (var i = 0, iMax = this.segments.length; i < iMax; i++) {\n var segment = this.segments[i];\n sweepEvents.push(segment.leftSE);\n sweepEvents.push(segment.rightSE);\n }\n\n return sweepEvents;\n }\n }]);\n\n return RingIn;\n }();\n var PolyIn = /*#__PURE__*/function () {\n function PolyIn(geomPoly, multiPoly) {\n _classCallCheck(this, PolyIn);\n\n if (!Array.isArray(geomPoly)) {\n throw new Error('Input geometry is not a valid Polygon or MultiPolygon');\n }\n\n this.exteriorRing = new RingIn(geomPoly[0], this, true); // copy by value\n\n this.bbox = {\n ll: {\n x: this.exteriorRing.bbox.ll.x,\n y: this.exteriorRing.bbox.ll.y\n },\n ur: {\n x: this.exteriorRing.bbox.ur.x,\n y: this.exteriorRing.bbox.ur.y\n }\n };\n this.interiorRings = [];\n\n for (var i = 1, iMax = geomPoly.length; i < iMax; i++) {\n var ring = new RingIn(geomPoly[i], this, false);\n if (ring.bbox.ll.x < this.bbox.ll.x) this.bbox.ll.x = ring.bbox.ll.x;\n if (ring.bbox.ll.y < this.bbox.ll.y) this.bbox.ll.y = ring.bbox.ll.y;\n if (ring.bbox.ur.x > this.bbox.ur.x) this.bbox.ur.x = ring.bbox.ur.x;\n if (ring.bbox.ur.y > this.bbox.ur.y) this.bbox.ur.y = ring.bbox.ur.y;\n this.interiorRings.push(ring);\n }\n\n this.multiPoly = multiPoly;\n }\n\n _createClass(PolyIn, [{\n key: \"getSweepEvents\",\n value: function getSweepEvents() {\n var sweepEvents = this.exteriorRing.getSweepEvents();\n\n for (var i = 0, iMax = this.interiorRings.length; i < iMax; i++) {\n var ringSweepEvents = this.interiorRings[i].getSweepEvents();\n\n for (var j = 0, jMax = ringSweepEvents.length; j < jMax; j++) {\n sweepEvents.push(ringSweepEvents[j]);\n }\n }\n\n return sweepEvents;\n }\n }]);\n\n return PolyIn;\n }();\n var MultiPolyIn = /*#__PURE__*/function () {\n function MultiPolyIn(geom, isSubject) {\n _classCallCheck(this, MultiPolyIn);\n\n if (!Array.isArray(geom)) {\n throw new Error('Input geometry is not a valid Polygon or MultiPolygon');\n }\n\n try {\n // if the input looks like a polygon, convert it to a multipolygon\n if (typeof geom[0][0][0] === 'number') geom = [geom];\n } catch (ex) {// The input is either malformed or has empty arrays.\n // In either case, it will be handled later on.\n }\n\n this.polys = [];\n this.bbox = {\n ll: {\n x: Number.POSITIVE_INFINITY,\n y: Number.POSITIVE_INFINITY\n },\n ur: {\n x: Number.NEGATIVE_INFINITY,\n y: Number.NEGATIVE_INFINITY\n }\n };\n\n for (var i = 0, iMax = geom.length; i < iMax; i++) {\n var poly = new PolyIn(geom[i], this);\n if (poly.bbox.ll.x < this.bbox.ll.x) this.bbox.ll.x = poly.bbox.ll.x;\n if (poly.bbox.ll.y < this.bbox.ll.y) this.bbox.ll.y = poly.bbox.ll.y;\n if (poly.bbox.ur.x > this.bbox.ur.x) this.bbox.ur.x = poly.bbox.ur.x;\n if (poly.bbox.ur.y > this.bbox.ur.y) this.bbox.ur.y = poly.bbox.ur.y;\n this.polys.push(poly);\n }\n\n this.isSubject = isSubject;\n }\n\n _createClass(MultiPolyIn, [{\n key: \"getSweepEvents\",\n value: function getSweepEvents() {\n var sweepEvents = [];\n\n for (var i = 0, iMax = this.polys.length; i < iMax; i++) {\n var polySweepEvents = this.polys[i].getSweepEvents();\n\n for (var j = 0, jMax = polySweepEvents.length; j < jMax; j++) {\n sweepEvents.push(polySweepEvents[j]);\n }\n }\n\n return sweepEvents;\n }\n }]);\n\n return MultiPolyIn;\n }();\n\n var RingOut = /*#__PURE__*/function () {\n _createClass(RingOut, null, [{\n key: \"factory\",\n\n /* Given the segments from the sweep line pass, compute & return a series\n * of closed rings from all the segments marked to be part of the result */\n value: function factory(allSegments) {\n var ringsOut = [];\n\n for (var i = 0, iMax = allSegments.length; i < iMax; i++) {\n var segment = allSegments[i];\n if (!segment.isInResult() || segment.ringOut) continue;\n var prevEvent = null;\n var event = segment.leftSE;\n var nextEvent = segment.rightSE;\n var events = [event];\n var startingPoint = event.point;\n var intersectionLEs = [];\n /* Walk the chain of linked events to form a closed ring */\n\n while (true) {\n prevEvent = event;\n event = nextEvent;\n events.push(event);\n /* Is the ring complete? */\n\n if (event.point === startingPoint) break;\n\n while (true) {\n var availableLEs = event.getAvailableLinkedEvents();\n /* Did we hit a dead end? This shouldn't happen. Indicates some earlier\n * part of the algorithm malfunctioned... please file a bug report. */\n\n if (availableLEs.length === 0) {\n var firstPt = events[0].point;\n var lastPt = events[events.length - 1].point;\n throw new Error(\"Unable to complete output ring starting at [\".concat(firstPt.x, \",\") + \" \".concat(firstPt.y, \"]. Last matching segment found ends at\") + \" [\".concat(lastPt.x, \", \").concat(lastPt.y, \"].\"));\n }\n /* Only one way to go, so cotinue on the path */\n\n\n if (availableLEs.length === 1) {\n nextEvent = availableLEs[0].otherSE;\n break;\n }\n /* We must have an intersection. Check for a completed loop */\n\n\n var indexLE = null;\n\n for (var j = 0, jMax = intersectionLEs.length; j < jMax; j++) {\n if (intersectionLEs[j].point === event.point) {\n indexLE = j;\n break;\n }\n }\n /* Found a completed loop. Cut that off and make a ring */\n\n\n if (indexLE !== null) {\n var intersectionLE = intersectionLEs.splice(indexLE)[0];\n var ringEvents = events.splice(intersectionLE.index);\n ringEvents.unshift(ringEvents[0].otherSE);\n ringsOut.push(new RingOut(ringEvents.reverse()));\n continue;\n }\n /* register the intersection */\n\n\n intersectionLEs.push({\n index: events.length,\n point: event.point\n });\n /* Choose the left-most option to continue the walk */\n\n var comparator = event.getLeftmostComparator(prevEvent);\n nextEvent = availableLEs.sort(comparator)[0].otherSE;\n break;\n }\n }\n\n ringsOut.push(new RingOut(events));\n }\n\n return ringsOut;\n }\n }]);\n\n function RingOut(events) {\n _classCallCheck(this, RingOut);\n\n this.events = events;\n\n for (var i = 0, iMax = events.length; i < iMax; i++) {\n events[i].segment.ringOut = this;\n }\n\n this.poly = null;\n }\n\n _createClass(RingOut, [{\n key: \"getGeom\",\n value: function getGeom() {\n // Remove superfluous points (ie extra points along a straight line),\n var prevPt = this.events[0].point;\n var points = [prevPt];\n\n for (var i = 1, iMax = this.events.length - 1; i < iMax; i++) {\n var _pt = this.events[i].point;\n var _nextPt = this.events[i + 1].point;\n if (compareVectorAngles(_pt, prevPt, _nextPt) === 0) continue;\n points.push(_pt);\n prevPt = _pt;\n } // ring was all (within rounding error of angle calc) colinear points\n\n\n if (points.length === 1) return null; // check if the starting point is necessary\n\n var pt = points[0];\n var nextPt = points[1];\n if (compareVectorAngles(pt, prevPt, nextPt) === 0) points.shift();\n points.push(points[0]);\n var step = this.isExteriorRing() ? 1 : -1;\n var iStart = this.isExteriorRing() ? 0 : points.length - 1;\n var iEnd = this.isExteriorRing() ? points.length : -1;\n var orderedPoints = [];\n\n for (var _i = iStart; _i != iEnd; _i += step) {\n orderedPoints.push([points[_i].x, points[_i].y]);\n }\n\n return orderedPoints;\n }\n }, {\n key: \"isExteriorRing\",\n value: function isExteriorRing() {\n if (this._isExteriorRing === undefined) {\n var enclosing = this.enclosingRing();\n this._isExteriorRing = enclosing ? !enclosing.isExteriorRing() : true;\n }\n\n return this._isExteriorRing;\n }\n }, {\n key: \"enclosingRing\",\n value: function enclosingRing() {\n if (this._enclosingRing === undefined) {\n this._enclosingRing = this._calcEnclosingRing();\n }\n\n return this._enclosingRing;\n }\n /* Returns the ring that encloses this one, if any */\n\n }, {\n key: \"_calcEnclosingRing\",\n value: function _calcEnclosingRing() {\n // start with the ealier sweep line event so that the prevSeg\n // chain doesn't lead us inside of a loop of ours\n var leftMostEvt = this.events[0];\n\n for (var i = 1, iMax = this.events.length; i < iMax; i++) {\n var evt = this.events[i];\n if (SweepEvent.compare(leftMostEvt, evt) > 0) leftMostEvt = evt;\n }\n\n var prevSeg = leftMostEvt.segment.prevInResult();\n var prevPrevSeg = prevSeg ? prevSeg.prevInResult() : null;\n\n while (true) {\n // no segment found, thus no ring can enclose us\n if (!prevSeg) return null; // no segments below prev segment found, thus the ring of the prev\n // segment must loop back around and enclose us\n\n if (!prevPrevSeg) return prevSeg.ringOut; // if the two segments are of different rings, the ring of the prev\n // segment must either loop around us or the ring of the prev prev\n // seg, which would make us and the ring of the prev peers\n\n if (prevPrevSeg.ringOut !== prevSeg.ringOut) {\n if (prevPrevSeg.ringOut.enclosingRing() !== prevSeg.ringOut) {\n return prevSeg.ringOut;\n } else return prevSeg.ringOut.enclosingRing();\n } // two segments are from the same ring, so this was a penisula\n // of that ring. iterate downward, keep searching\n\n\n prevSeg = prevPrevSeg.prevInResult();\n prevPrevSeg = prevSeg ? prevSeg.prevInResult() : null;\n }\n }\n }]);\n\n return RingOut;\n }();\n var PolyOut = /*#__PURE__*/function () {\n function PolyOut(exteriorRing) {\n _classCallCheck(this, PolyOut);\n\n this.exteriorRing = exteriorRing;\n exteriorRing.poly = this;\n this.interiorRings = [];\n }\n\n _createClass(PolyOut, [{\n key: \"addInterior\",\n value: function addInterior(ring) {\n this.interiorRings.push(ring);\n ring.poly = this;\n }\n }, {\n key: \"getGeom\",\n value: function getGeom() {\n var geom = [this.exteriorRing.getGeom()]; // exterior ring was all (within rounding error of angle calc) colinear points\n\n if (geom[0] === null) return null;\n\n for (var i = 0, iMax = this.interiorRings.length; i < iMax; i++) {\n var ringGeom = this.interiorRings[i].getGeom(); // interior ring was all (within rounding error of angle calc) colinear points\n\n if (ringGeom === null) continue;\n geom.push(ringGeom);\n }\n\n return geom;\n }\n }]);\n\n return PolyOut;\n }();\n var MultiPolyOut = /*#__PURE__*/function () {\n function MultiPolyOut(rings) {\n _classCallCheck(this, MultiPolyOut);\n\n this.rings = rings;\n this.polys = this._composePolys(rings);\n }\n\n _createClass(MultiPolyOut, [{\n key: \"getGeom\",\n value: function getGeom() {\n var geom = [];\n\n for (var i = 0, iMax = this.polys.length; i < iMax; i++) {\n var polyGeom = this.polys[i].getGeom(); // exterior ring was all (within rounding error of angle calc) colinear points\n\n if (polyGeom === null) continue;\n geom.push(polyGeom);\n }\n\n return geom;\n }\n }, {\n key: \"_composePolys\",\n value: function _composePolys(rings) {\n var polys = [];\n\n for (var i = 0, iMax = rings.length; i < iMax; i++) {\n var ring = rings[i];\n if (ring.poly) continue;\n if (ring.isExteriorRing()) polys.push(new PolyOut(ring));else {\n var enclosingRing = ring.enclosingRing();\n if (!enclosingRing.poly) polys.push(new PolyOut(enclosingRing));\n enclosingRing.poly.addInterior(ring);\n }\n }\n\n return polys;\n }\n }]);\n\n return MultiPolyOut;\n }();\n\n /**\n * NOTE: We must be careful not to change any segments while\n * they are in the SplayTree. AFAIK, there's no way to tell\n * the tree to rebalance itself - thus before splitting\n * a segment that's in the tree, we remove it from the tree,\n * do the split, then re-insert it. (Even though splitting a\n * segment *shouldn't* change its correct position in the\n * sweep line tree, the reality is because of rounding errors,\n * it sometimes does.)\n */\n\n var SweepLine = /*#__PURE__*/function () {\n function SweepLine(queue) {\n var comparator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Segment.compare;\n\n _classCallCheck(this, SweepLine);\n\n this.queue = queue;\n this.tree = new Tree(comparator);\n this.segments = [];\n }\n\n _createClass(SweepLine, [{\n key: \"process\",\n value: function process(event) {\n var segment = event.segment;\n var newEvents = []; // if we've already been consumed by another segment,\n // clean up our body parts and get out\n\n if (event.consumedBy) {\n if (event.isLeft) this.queue.remove(event.otherSE);else this.tree.remove(segment);\n return newEvents;\n }\n\n var node = event.isLeft ? this.tree.insert(segment) : this.tree.find(segment);\n if (!node) throw new Error(\"Unable to find segment #\".concat(segment.id, \" \") + \"[\".concat(segment.leftSE.point.x, \", \").concat(segment.leftSE.point.y, \"] -> \") + \"[\".concat(segment.rightSE.point.x, \", \").concat(segment.rightSE.point.y, \"] \") + 'in SweepLine tree. Please submit a bug report.');\n var prevNode = node;\n var nextNode = node;\n var prevSeg = undefined;\n var nextSeg = undefined; // skip consumed segments still in tree\n\n while (prevSeg === undefined) {\n prevNode = this.tree.prev(prevNode);\n if (prevNode === null) prevSeg = null;else if (prevNode.key.consumedBy === undefined) prevSeg = prevNode.key;\n } // skip consumed segments still in tree\n\n\n while (nextSeg === undefined) {\n nextNode = this.tree.next(nextNode);\n if (nextNode === null) nextSeg = null;else if (nextNode.key.consumedBy === undefined) nextSeg = nextNode.key;\n }\n\n if (event.isLeft) {\n // Check for intersections against the previous segment in the sweep line\n var prevMySplitter = null;\n\n if (prevSeg) {\n var prevInter = prevSeg.getIntersection(segment);\n\n if (prevInter !== null) {\n if (!segment.isAnEndpoint(prevInter)) prevMySplitter = prevInter;\n\n if (!prevSeg.isAnEndpoint(prevInter)) {\n var newEventsFromSplit = this._splitSafely(prevSeg, prevInter);\n\n for (var i = 0, iMax = newEventsFromSplit.length; i < iMax; i++) {\n newEvents.push(newEventsFromSplit[i]);\n }\n }\n }\n } // Check for intersections against the next segment in the sweep line\n\n\n var nextMySplitter = null;\n\n if (nextSeg) {\n var nextInter = nextSeg.getIntersection(segment);\n\n if (nextInter !== null) {\n if (!segment.isAnEndpoint(nextInter)) nextMySplitter = nextInter;\n\n if (!nextSeg.isAnEndpoint(nextInter)) {\n var _newEventsFromSplit = this._splitSafely(nextSeg, nextInter);\n\n for (var _i = 0, _iMax = _newEventsFromSplit.length; _i < _iMax; _i++) {\n newEvents.push(_newEventsFromSplit[_i]);\n }\n }\n }\n } // For simplicity, even if we find more than one intersection we only\n // spilt on the 'earliest' (sweep-line style) of the intersections.\n // The other intersection will be handled in a future process().\n\n\n if (prevMySplitter !== null || nextMySplitter !== null) {\n var mySplitter = null;\n if (prevMySplitter === null) mySplitter = nextMySplitter;else if (nextMySplitter === null) mySplitter = prevMySplitter;else {\n var cmpSplitters = SweepEvent.comparePoints(prevMySplitter, nextMySplitter);\n mySplitter = cmpSplitters <= 0 ? prevMySplitter : nextMySplitter;\n } // Rounding errors can cause changes in ordering,\n // so remove afected segments and right sweep events before splitting\n\n this.queue.remove(segment.rightSE);\n newEvents.push(segment.rightSE);\n\n var _newEventsFromSplit2 = segment.split(mySplitter);\n\n for (var _i2 = 0, _iMax2 = _newEventsFromSplit2.length; _i2 < _iMax2; _i2++) {\n newEvents.push(_newEventsFromSplit2[_i2]);\n }\n }\n\n if (newEvents.length > 0) {\n // We found some intersections, so re-do the current event to\n // make sure sweep line ordering is totally consistent for later\n // use with the segment 'prev' pointers\n this.tree.remove(segment);\n newEvents.push(event);\n } else {\n // done with left event\n this.segments.push(segment);\n segment.prev = prevSeg;\n }\n } else {\n // event.isRight\n // since we're about to be removed from the sweep line, check for\n // intersections between our previous and next segments\n if (prevSeg && nextSeg) {\n var inter = prevSeg.getIntersection(nextSeg);\n\n if (inter !== null) {\n if (!prevSeg.isAnEndpoint(inter)) {\n var _newEventsFromSplit3 = this._splitSafely(prevSeg, inter);\n\n for (var _i3 = 0, _iMax3 = _newEventsFromSplit3.length; _i3 < _iMax3; _i3++) {\n newEvents.push(_newEventsFromSplit3[_i3]);\n }\n }\n\n if (!nextSeg.isAnEndpoint(inter)) {\n var _newEventsFromSplit4 = this._splitSafely(nextSeg, inter);\n\n for (var _i4 = 0, _iMax4 = _newEventsFromSplit4.length; _i4 < _iMax4; _i4++) {\n newEvents.push(_newEventsFromSplit4[_i4]);\n }\n }\n }\n }\n\n this.tree.remove(segment);\n }\n\n return newEvents;\n }\n /* Safely split a segment that is currently in the datastructures\n * IE - a segment other than the one that is currently being processed. */\n\n }, {\n key: \"_splitSafely\",\n value: function _splitSafely(seg, pt) {\n // Rounding errors can cause changes in ordering,\n // so remove afected segments and right sweep events before splitting\n // removeNode() doesn't work, so have re-find the seg\n // https://github.com/w8r/splay-tree/pull/5\n this.tree.remove(seg);\n var rightSE = seg.rightSE;\n this.queue.remove(rightSE);\n var newEvents = seg.split(pt);\n newEvents.push(rightSE); // splitting can trigger consumption\n\n if (seg.consumedBy === undefined) this.tree.insert(seg);\n return newEvents;\n }\n }]);\n\n return SweepLine;\n }();\n\n var POLYGON_CLIPPING_MAX_QUEUE_SIZE = typeof process !== 'undefined' && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1000000;\n var POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS = typeof process !== 'undefined' && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1000000;\n var Operation = /*#__PURE__*/function () {\n function Operation() {\n _classCallCheck(this, Operation);\n }\n\n _createClass(Operation, [{\n key: \"run\",\n value: function run(type, geom, moreGeoms) {\n operation.type = type;\n rounder.reset();\n /* Convert inputs to MultiPoly objects */\n\n var multipolys = [new MultiPolyIn(geom, true)];\n\n for (var i = 0, iMax = moreGeoms.length; i < iMax; i++) {\n multipolys.push(new MultiPolyIn(moreGeoms[i], false));\n }\n\n operation.numMultiPolys = multipolys.length;\n /* BBox optimization for difference operation\n * If the bbox of a multipolygon that's part of the clipping doesn't\n * intersect the bbox of the subject at all, we can just drop that\n * multiploygon. */\n\n if (operation.type === 'difference') {\n // in place removal\n var subject = multipolys[0];\n var _i = 1;\n\n while (_i < multipolys.length) {\n if (getBboxOverlap(multipolys[_i].bbox, subject.bbox) !== null) _i++;else multipolys.splice(_i, 1);\n }\n }\n /* BBox optimization for intersection operation\n * If we can find any pair of multipolygons whose bbox does not overlap,\n * then the result will be empty. */\n\n\n if (operation.type === 'intersection') {\n // TODO: this is O(n^2) in number of polygons. By sorting the bboxes,\n // it could be optimized to O(n * ln(n))\n for (var _i2 = 0, _iMax = multipolys.length; _i2 < _iMax; _i2++) {\n var mpA = multipolys[_i2];\n\n for (var j = _i2 + 1, jMax = multipolys.length; j < jMax; j++) {\n if (getBboxOverlap(mpA.bbox, multipolys[j].bbox) === null) return [];\n }\n }\n }\n /* Put segment endpoints in a priority queue */\n\n\n var queue = new Tree(SweepEvent.compare);\n\n for (var _i3 = 0, _iMax2 = multipolys.length; _i3 < _iMax2; _i3++) {\n var sweepEvents = multipolys[_i3].getSweepEvents();\n\n for (var _j = 0, _jMax = sweepEvents.length; _j < _jMax; _j++) {\n queue.insert(sweepEvents[_j]);\n\n if (queue.size > POLYGON_CLIPPING_MAX_QUEUE_SIZE) {\n // prevents an infinite loop, an otherwise common manifestation of bugs\n throw new Error('Infinite loop when putting segment endpoints in a priority queue ' + '(queue size too big). Please file a bug report.');\n }\n }\n }\n /* Pass the sweep line over those endpoints */\n\n\n var sweepLine = new SweepLine(queue);\n var prevQueueSize = queue.size;\n var node = queue.pop();\n\n while (node) {\n var evt = node.key;\n\n if (queue.size === prevQueueSize) {\n // prevents an infinite loop, an otherwise common manifestation of bugs\n var seg = evt.segment;\n throw new Error(\"Unable to pop() \".concat(evt.isLeft ? 'left' : 'right', \" SweepEvent \") + \"[\".concat(evt.point.x, \", \").concat(evt.point.y, \"] from segment #\").concat(seg.id, \" \") + \"[\".concat(seg.leftSE.point.x, \", \").concat(seg.leftSE.point.y, \"] -> \") + \"[\".concat(seg.rightSE.point.x, \", \").concat(seg.rightSE.point.y, \"] from queue. \") + 'Please file a bug report.');\n }\n\n if (queue.size > POLYGON_CLIPPING_MAX_QUEUE_SIZE) {\n // prevents an infinite loop, an otherwise common manifestation of bugs\n throw new Error('Infinite loop when passing sweep line over endpoints ' + '(queue size too big). Please file a bug report.');\n }\n\n if (sweepLine.segments.length > POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS) {\n // prevents an infinite loop, an otherwise common manifestation of bugs\n throw new Error('Infinite loop when passing sweep line over endpoints ' + '(too many sweep line segments). Please file a bug report.');\n }\n\n var newEvents = sweepLine.process(evt);\n\n for (var _i4 = 0, _iMax3 = newEvents.length; _i4 < _iMax3; _i4++) {\n var _evt = newEvents[_i4];\n if (_evt.consumedBy === undefined) queue.insert(_evt);\n }\n\n prevQueueSize = queue.size;\n node = queue.pop();\n } // free some memory we don't need anymore\n\n\n rounder.reset();\n /* Collect and compile segments we're keeping into a multipolygon */\n\n var ringsOut = RingOut.factory(sweepLine.segments);\n var result = new MultiPolyOut(ringsOut);\n return result.getGeom();\n }\n }]);\n\n return Operation;\n }(); // singleton available by import\n\n var operation = new Operation();\n\n var union = function union(geom) {\n for (var _len = arguments.length, moreGeoms = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n moreGeoms[_key - 1] = arguments[_key];\n }\n\n return operation.run('union', geom, moreGeoms);\n };\n\n var intersection$1 = function intersection(geom) {\n for (var _len2 = arguments.length, moreGeoms = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n moreGeoms[_key2 - 1] = arguments[_key2];\n }\n\n return operation.run('intersection', geom, moreGeoms);\n };\n\n var xor = function xor(geom) {\n for (var _len3 = arguments.length, moreGeoms = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n moreGeoms[_key3 - 1] = arguments[_key3];\n }\n\n return operation.run('xor', geom, moreGeoms);\n };\n\n var difference = function difference(subjectGeom) {\n for (var _len4 = arguments.length, clippingGeoms = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n clippingGeoms[_key4 - 1] = arguments[_key4];\n }\n\n return operation.run('difference', subjectGeom, clippingGeoms);\n };\n\n var index = {\n union: union,\n intersection: intersection$1,\n xor: xor,\n difference: difference\n };\n\n return index;\n\n})));\n","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar Tablelvl2Context = React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n Tablelvl2Context.displayName = 'Tablelvl2Context';\n}\n\nexport default Tablelvl2Context;","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","// https://en.wikipedia.org/wiki/Rhumb_line\nimport { convertLength, earthRadius } from \"@turf/helpers\";\nimport { getCoord } from \"@turf/invariant\";\n/**\n * Calculates the distance along a rhumb line between two {@link Point|points} in degrees, radians,\n * miles, or kilometers.\n *\n * @name rhumbDistance\n * @param {Coord} from origin point\n * @param {Coord} to destination point\n * @param {Object} [options] Optional parameters\n * @param {string} [options.units=\"kilometers\"] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.rhumbDistance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction rhumbDistance(from, to, options) {\n if (options === void 0) { options = {}; }\n var origin = getCoord(from);\n var destination = getCoord(to);\n // compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)\n // solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678\n destination[0] +=\n destination[0] - origin[0] > 180\n ? -360\n : origin[0] - destination[0] > 180\n ? 360\n : 0;\n var distanceInMeters = calculateRhumbDistance(origin, destination);\n var distance = convertLength(distanceInMeters, \"meters\", options.units);\n return distance;\n}\n/**\n * Returns the distance travelling from ‘this’ point to destination point along a rhumb line.\n * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js\n *\n * @private\n * @param {Array<number>} origin point.\n * @param {Array<number>} destination point.\n * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).\n * @returns {number} Distance in km between this point and destination point (same units as radius).\n *\n * @example\n * var p1 = new LatLon(51.127, 1.338);\n * var p2 = new LatLon(50.964, 1.853);\n * var d = p1.distanceTo(p2); // 40.31 km\n */\nfunction calculateRhumbDistance(origin, destination, radius) {\n // φ => phi\n // λ => lambda\n // ψ => psi\n // Δ => Delta\n // δ => delta\n // θ => theta\n radius = radius === undefined ? earthRadius : Number(radius);\n // see www.edwilliams.org/avform.htm#Rhumb\n var R = radius;\n var phi1 = (origin[1] * Math.PI) / 180;\n var phi2 = (destination[1] * Math.PI) / 180;\n var DeltaPhi = phi2 - phi1;\n var DeltaLambda = (Math.abs(destination[0] - origin[0]) * Math.PI) / 180;\n // if dLon over 180° take shorter rhumb line across the anti-meridian:\n if (DeltaLambda > Math.PI) {\n DeltaLambda -= 2 * Math.PI;\n }\n // on Mercator projection, longitude distances shrink by latitude; q is the 'stretch factor'\n // q becomes ill-conditioned along E-W line (0/0); use empirical tolerance to avoid it\n var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));\n var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1);\n // distance is pythagoras on 'stretched' Mercator projection\n var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda); // angular distance in radians\n var dist = delta * R;\n return dist;\n}\nexport default rhumbDistance;\n","import * as glMatrix from \"./common.js\";\n/**\r\n * 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.\r\n * @module mat4\r\n */\n\n/**\r\n * Creates a new identity mat4\r\n *\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 initialized with values from an existing matrix\r\n *\r\n * @param {ReadonlyMat4} a matrix to clone\r\n * @returns {mat4} a new 4x4 matrix\r\n */\n\nexport function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Copy the values from one mat4 to another\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Create a new mat4 with the given values\r\n *\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} A new mat4\r\n */\n\nexport function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set the components of a mat4 to the given values\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\r\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\r\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\r\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\r\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\r\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\r\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\r\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\r\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\r\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\r\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\r\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\r\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\r\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\r\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\r\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\r\n * @returns {mat4} out\r\n */\n\nexport function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n}\n/**\r\n * Set a mat4 to the identity matrix\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @returns {mat4} out\r\n */\n\nexport function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Transpose the values of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a12 = a[6],\n a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n } else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Inverts a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function invert(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n}\n/**\r\n * Calculates the adjugate of a mat4\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {mat4} out\r\n */\n\nexport function adjoint(out, a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n}\n/**\r\n * Calculates the determinant of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the source matrix\r\n * @returns {Number} determinant of a\r\n */\n\nexport function determinant(a) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n}\n/**\r\n * Multiplies two mat4s\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function multiply(out, a, b) {\n var a00 = a[0],\n a01 = a[1],\n a02 = a[2],\n a03 = a[3];\n var a10 = a[4],\n a11 = a[5],\n a12 = a[6],\n a13 = a[7];\n var a20 = a[8],\n a21 = a[9],\n a22 = a[10],\n a23 = a[11];\n var a30 = a[12],\n a31 = a[13],\n a32 = a[14],\n a33 = a[15]; // Cache only the current line of the second matrix\n\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n}\n/**\r\n * Translate a mat4 by the given vector\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to translate\r\n * @param {ReadonlyVec3} v vector to translate by\r\n * @returns {mat4} out\r\n */\n\nexport function translate(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n } else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n\n return out;\n}\n/**\r\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {ReadonlyVec3} v the vec3 to scale the matrix by\r\n * @returns {mat4} out\r\n **/\n\nexport function scale(out, a, v) {\n var x = v[0],\n y = v[1],\n z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n}\n/**\r\n * Rotates a mat4 by the given angle around the given axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function rotate(out, a, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the X axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Y axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n}\n/**\r\n * Rotates a matrix by the given angle around the Z axis\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to rotate\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n\n\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n}\n/**\r\n * Creates a matrix from a vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a vector scaling\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.scale(dest, dest, vec);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyVec3} v Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a given angle around a given axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotate(dest, dest, rad, axis);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @param {ReadonlyVec3} axis the axis to rotate around\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotation(out, rad, axis) {\n var x = axis[0],\n y = axis[1],\n z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n\n if (len < glMatrix.EPSILON) {\n return null;\n }\n\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the X axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateX(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Y axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateY(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from the given angle around the Z axis\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.rotateZ(dest, dest, rad);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {Number} rad the angle to rotate the matrix by\r\n * @returns {mat4} out\r\n */\n\nexport function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation and vector translation\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a new mat4 from a dual quat.\r\n *\r\n * @param {mat4} out Matrix\r\n * @param {ReadonlyQuat2} a Dual Quaternion\r\n * @returns {mat4} mat4 receiving operation result\r\n */\n\nexport function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0],\n by = -a[1],\n bz = -a[2],\n bw = a[3],\n ax = a[4],\n ay = a[5],\n az = a[6],\n aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n } else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n\n fromRotationTranslation(out, a, translation);\n return out;\n}\n/**\r\n * Returns the translation vector component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslation,\r\n * the returned vector will be the same as the translation vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive translation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n}\n/**\r\n * Returns the scaling factor component of a transformation\r\n * matrix. If a matrix is built with fromRotationTranslationScale\r\n * with a normalized Quaternion paramter, the returned vector will be\r\n * the same as the scaling vector\r\n * originally supplied.\r\n * @param {vec3} out Vector to receive scaling factor component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {vec3} out\r\n */\n\nexport function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n}\n/**\r\n * Returns a quaternion representing the rotational component\r\n * of a transformation matrix. If a matrix is built with\r\n * fromRotationTranslation, the returned quaternion will be the\r\n * same as the quaternion originally supplied.\r\n * @param {quat} out Quaternion to receive the rotation component\r\n * @param {ReadonlyMat4} mat Matrix to be decomposed (input)\r\n * @return {quat} out\r\n */\n\nexport function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n } else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n } else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n } else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n}\n/**\r\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\r\n * This is equivalent to (but much faster than):\r\n *\r\n * mat4.identity(dest);\r\n * mat4.translate(dest, vec);\r\n * mat4.translate(dest, origin);\r\n * let quatMat = mat4.create();\r\n * quat4.toMat4(quat, quatMat);\r\n * mat4.multiply(dest, quatMat);\r\n * mat4.scale(dest, scale)\r\n * mat4.translate(dest, negativeOrigin);\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {quat4} q Rotation quaternion\r\n * @param {ReadonlyVec3} v Translation vector\r\n * @param {ReadonlyVec3} s Scaling vector\r\n * @param {ReadonlyVec3} o The origin vector around which to scale and rotate\r\n * @returns {mat4} out\r\n */\n\nexport function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n}\n/**\r\n * Calculates a 4x4 matrix from the given quaternion\r\n *\r\n * @param {mat4} out mat4 receiving operation result\r\n * @param {ReadonlyQuat} q Quaternion to create matrix from\r\n *\r\n * @returns {mat4} out\r\n */\n\nexport function fromQuat(out, q) {\n var x = q[0],\n y = q[1],\n z = q[2],\n w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a frustum matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Number} left Left bound of the frustum\r\n * @param {Number} right Right bound of the frustum\r\n * @param {Number} bottom Bottom bound of the frustum\r\n * @param {Number} top Top bound of the frustum\r\n * @param {Number} near Near bound of the frustum\r\n * @param {Number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given bounds.\r\n * Passing null/undefined/no value for far will generate infinite projection matrix.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} fovy Vertical field of view in radians\r\n * @param {number} aspect Aspect ratio. typically viewport width/height\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum, can be null or Infinity\r\n * @returns {mat4} out\r\n */\n\nexport function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n } else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n\n return out;\n}\n/**\r\n * Generates a perspective projection matrix with the given field of view.\r\n * This is primarily useful for generating projection matrices to be used\r\n * with the still experiemental WebVR API.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n}\n/**\r\n * Generates a orthogonal projection matrix with the given bounds\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {number} left Left bound of the frustum\r\n * @param {number} right Right bound of the frustum\r\n * @param {number} bottom Bottom bound of the frustum\r\n * @param {number} top Top bound of the frustum\r\n * @param {number} near Near bound of the frustum\r\n * @param {number} far Far bound of the frustum\r\n * @returns {mat4} out\r\n */\n\nexport function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\r\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n } else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n } else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n}\n/**\r\n * Generates a matrix that makes something look at something else.\r\n *\r\n * @param {mat4} out mat4 frustum matrix will be written into\r\n * @param {ReadonlyVec3} eye Position of the viewer\r\n * @param {ReadonlyVec3} center Point the viewer is looking at\r\n * @param {ReadonlyVec3} up vec3 pointing up\r\n * @returns {mat4} out\r\n */\n\nexport function targetTo(out, eye, target, up) {\n var eyex = eye[0],\n eyey = eye[1],\n eyez = eye[2],\n upx = up[0],\n upy = up[1],\n upz = up[2];\n var z0 = eyex - target[0],\n z1 = eyey - target[1],\n z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n\n var x0 = upy * z2 - upz * z1,\n x1 = upz * z0 - upx * z2,\n x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n}\n/**\r\n * Returns a string representation of a mat4\r\n *\r\n * @param {ReadonlyMat4} a matrix to represent as a string\r\n * @returns {String} string representation of the matrix\r\n */\n\nexport function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n}\n/**\r\n * Returns Frobenius norm of a mat4\r\n *\r\n * @param {ReadonlyMat4} a the matrix to calculate Frobenius norm of\r\n * @returns {Number} Frobenius norm\r\n */\n\nexport function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n}\n/**\r\n * Adds two mat4's\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n}\n/**\r\n * Subtracts matrix b from matrix a\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @returns {mat4} out\r\n */\n\nexport function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n}\n/**\r\n * Multiply each element of the matrix by a scalar.\r\n *\r\n * @param {mat4} out the receiving matrix\r\n * @param {ReadonlyMat4} a the matrix to scale\r\n * @param {Number} b amount to scale the matrix's elements by\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n}\n/**\r\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\r\n *\r\n * @param {mat4} out the receiving vector\r\n * @param {ReadonlyMat4} a the first operand\r\n * @param {ReadonlyMat4} b the second operand\r\n * @param {Number} scale the amount to scale b's elements by before adding\r\n * @returns {mat4} out\r\n */\n\nexport function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n}\n/**\r\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n}\n/**\r\n * Returns whether or not the matrices have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyMat4} a The first matrix.\r\n * @param {ReadonlyMat4} b The second matrix.\r\n * @returns {Boolean} True if the matrices are equal, false otherwise.\r\n */\n\nexport function equals(a, b) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var a4 = a[4],\n a5 = a[5],\n a6 = a[6],\n a7 = a[7];\n var a8 = a[8],\n a9 = a[9],\n a10 = a[10],\n a11 = a[11];\n var a12 = a[12],\n a13 = a[13],\n a14 = a[14],\n a15 = a[15];\n var b0 = b[0],\n b1 = b[1],\n b2 = b[2],\n b3 = b[3];\n var b4 = b[4],\n b5 = b[5],\n b6 = b[6],\n b7 = b[7];\n var b8 = b[8],\n b9 = b[9],\n b10 = b[10],\n b11 = b[11];\n var b12 = b[12],\n b13 = b[13],\n b14 = b[14],\n b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n}\n/**\r\n * Alias for {@link mat4.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Alias for {@link mat4.subtract}\r\n * @function\r\n */\n\nexport var sub = subtract;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","import React from 'react';\nexport default React.createContext(null);","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar ListContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\n\nexport default ListContext;","/*\r\n Copyright 2013 Daniel Wirtz <dcode@dcode.io>\r\n Copyright 2009 The Closure Library Authors. All Rights Reserved.\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS-IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n */\r\n\r\n/**\r\n * @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>\r\n * Released under the Apache License, Version 2.0\r\n * see: https://github.com/dcodeIO/long.js for details\r\n */\r\n(function(global, factory) {\r\n\r\n /* AMD */ if (typeof define === 'function' && define[\"amd\"])\r\n define([], factory);\r\n /* CommonJS */ else if (typeof require === 'function' && typeof module === \"object\" && module && module[\"exports\"])\r\n module[\"exports\"] = factory();\r\n /* Global */ else\r\n (global[\"dcodeIO\"] = global[\"dcodeIO\"] || {})[\"Long\"] = factory();\r\n\r\n})(this, function() {\r\n \"use strict\";\r\n\r\n /**\r\n * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers.\r\n * See the from* functions below for more convenient ways of constructing Longs.\r\n * @exports Long\r\n * @class A Long class for representing a 64 bit two's-complement integer value.\r\n * @param {number} low The low (signed) 32 bits of the long\r\n * @param {number} high The high (signed) 32 bits of the long\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @constructor\r\n */\r\n function Long(low, high, unsigned) {\r\n\r\n /**\r\n * The low 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.low = low | 0;\r\n\r\n /**\r\n * The high 32 bits as a signed value.\r\n * @type {number}\r\n */\r\n this.high = high | 0;\r\n\r\n /**\r\n * Whether unsigned or not.\r\n * @type {boolean}\r\n */\r\n this.unsigned = !!unsigned;\r\n }\r\n\r\n // The internal representation of a long is the two given signed, 32-bit values.\r\n // We use 32-bit pieces because these are the size of integers on which\r\n // Javascript performs bit-operations. For operations like addition and\r\n // multiplication, we split each number into 16 bit pieces, which can easily be\r\n // multiplied within Javascript's floating-point representation without overflow\r\n // or change in sign.\r\n //\r\n // In the algorithms below, we frequently reduce the negative case to the\r\n // positive case by negating the input(s) and then post-processing the result.\r\n // Note that we must ALWAYS check specially whether those values are MIN_VALUE\r\n // (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as\r\n // a positive number, it overflows back into a negative). Not handling this\r\n // case would often result in infinite recursion.\r\n //\r\n // Common constant values ZERO, ONE, NEG_ONE, etc. are defined below the from*\r\n // methods on which they depend.\r\n\r\n /**\r\n * An indicator used to reliably determine if an object is a Long or not.\r\n * @type {boolean}\r\n * @const\r\n * @private\r\n */\r\n Long.prototype.__isLong__;\r\n\r\n Object.defineProperty(Long.prototype, \"__isLong__\", {\r\n value: true,\r\n enumerable: false,\r\n configurable: false\r\n });\r\n\r\n /**\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n * @inner\r\n */\r\n function isLong(obj) {\r\n return (obj && obj[\"__isLong__\"]) === true;\r\n }\r\n\r\n /**\r\n * Tests if the specified object is a Long.\r\n * @function\r\n * @param {*} obj Object\r\n * @returns {boolean}\r\n */\r\n Long.isLong = isLong;\r\n\r\n /**\r\n * A cache of the Long representations of small integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\n var INT_CACHE = {};\r\n\r\n /**\r\n * A cache of the Long representations of small unsigned integer values.\r\n * @type {!Object}\r\n * @inner\r\n */\r\n var UINT_CACHE = {};\r\n\r\n /**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromInt(value, unsigned) {\r\n var obj, cachedObj, cache;\r\n if (unsigned) {\r\n value >>>= 0;\r\n if (cache = (0 <= value && value < 256)) {\r\n cachedObj = UINT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);\r\n if (cache)\r\n UINT_CACHE[value] = obj;\r\n return obj;\r\n } else {\r\n value |= 0;\r\n if (cache = (-128 <= value && value < 128)) {\r\n cachedObj = INT_CACHE[value];\r\n if (cachedObj)\r\n return cachedObj;\r\n }\r\n obj = fromBits(value, value < 0 ? -1 : 0, false);\r\n if (cache)\r\n INT_CACHE[value] = obj;\r\n return obj;\r\n }\r\n }\r\n\r\n /**\r\n * Returns a Long representing the given 32 bit integer value.\r\n * @function\r\n * @param {number} value The 32 bit integer in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromInt = fromInt;\r\n\r\n /**\r\n * @param {number} value\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromNumber(value, unsigned) {\r\n if (isNaN(value) || !isFinite(value))\r\n return unsigned ? UZERO : ZERO;\r\n if (unsigned) {\r\n if (value < 0)\r\n return UZERO;\r\n if (value >= TWO_PWR_64_DBL)\r\n return MAX_UNSIGNED_VALUE;\r\n } else {\r\n if (value <= -TWO_PWR_63_DBL)\r\n return MIN_VALUE;\r\n if (value + 1 >= TWO_PWR_63_DBL)\r\n return MAX_VALUE;\r\n }\r\n if (value < 0)\r\n return fromNumber(-value, unsigned).neg();\r\n return fromBits((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);\r\n }\r\n\r\n /**\r\n * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.\r\n * @function\r\n * @param {number} value The number in question\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromNumber = fromNumber;\r\n\r\n /**\r\n * @param {number} lowBits\r\n * @param {number} highBits\r\n * @param {boolean=} unsigned\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromBits(lowBits, highBits, unsigned) {\r\n return new Long(lowBits, highBits, unsigned);\r\n }\r\n\r\n /**\r\n * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is\r\n * assumed to use 32 bits.\r\n * @function\r\n * @param {number} lowBits The low 32 bits\r\n * @param {number} highBits The high 32 bits\r\n * @param {boolean=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromBits = fromBits;\r\n\r\n /**\r\n * @function\r\n * @param {number} base\r\n * @param {number} exponent\r\n * @returns {number}\r\n * @inner\r\n */\r\n var pow_dbl = Math.pow; // Used 4 times (4*8 to 15+4)\r\n\r\n /**\r\n * @param {string} str\r\n * @param {(boolean|number)=} unsigned\r\n * @param {number=} radix\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromString(str, unsigned, radix) {\r\n if (str.length === 0)\r\n throw Error('empty string');\r\n if (str === \"NaN\" || str === \"Infinity\" || str === \"+Infinity\" || str === \"-Infinity\")\r\n return ZERO;\r\n if (typeof unsigned === 'number') {\r\n // For goog.math.long compatibility\r\n radix = unsigned,\r\n unsigned = false;\r\n } else {\r\n unsigned = !! unsigned;\r\n }\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n\r\n var p;\r\n if ((p = str.indexOf('-')) > 0)\r\n throw Error('interior hyphen');\r\n else if (p === 0) {\r\n return fromString(str.substring(1), unsigned, radix).neg();\r\n }\r\n\r\n // Do several (8) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 8));\r\n\r\n var result = ZERO;\r\n for (var i = 0; i < str.length; i += 8) {\r\n var size = Math.min(8, str.length - i),\r\n value = parseInt(str.substring(i, i + size), radix);\r\n if (size < 8) {\r\n var power = fromNumber(pow_dbl(radix, size));\r\n result = result.mul(power).add(fromNumber(value));\r\n } else {\r\n result = result.mul(radixToPower);\r\n result = result.add(fromNumber(value));\r\n }\r\n }\r\n result.unsigned = unsigned;\r\n return result;\r\n }\r\n\r\n /**\r\n * Returns a Long representation of the given string, written using the specified radix.\r\n * @function\r\n * @param {string} str The textual representation of the Long\r\n * @param {(boolean|number)=} unsigned Whether unsigned or not, defaults to `false` for signed\r\n * @param {number=} radix The radix in which the text is written (2-36), defaults to 10\r\n * @returns {!Long} The corresponding Long value\r\n */\r\n Long.fromString = fromString;\r\n\r\n /**\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val\r\n * @returns {!Long}\r\n * @inner\r\n */\r\n function fromValue(val) {\r\n if (val /* is compatible */ instanceof Long)\r\n return val;\r\n if (typeof val === 'number')\r\n return fromNumber(val);\r\n if (typeof val === 'string')\r\n return fromString(val);\r\n // Throws for non-objects, converts non-instanceof Long:\r\n return fromBits(val.low, val.high, val.unsigned);\r\n }\r\n\r\n /**\r\n * Converts the specified value to a Long.\r\n * @function\r\n * @param {!Long|number|string|!{low: number, high: number, unsigned: boolean}} val Value\r\n * @returns {!Long}\r\n */\r\n Long.fromValue = fromValue;\r\n\r\n // NOTE: the compiler should inline these constant values below and then remove these variables, so there should be\r\n // no runtime penalty for these.\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_16_DBL = 1 << 16;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_24_DBL = 1 << 24;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;\r\n\r\n /**\r\n * @type {number}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;\r\n\r\n /**\r\n * @type {!Long}\r\n * @const\r\n * @inner\r\n */\r\n var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var ZERO = fromInt(0);\r\n\r\n /**\r\n * Signed zero.\r\n * @type {!Long}\r\n */\r\n Long.ZERO = ZERO;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var UZERO = fromInt(0, true);\r\n\r\n /**\r\n * Unsigned zero.\r\n * @type {!Long}\r\n */\r\n Long.UZERO = UZERO;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var ONE = fromInt(1);\r\n\r\n /**\r\n * Signed one.\r\n * @type {!Long}\r\n */\r\n Long.ONE = ONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var UONE = fromInt(1, true);\r\n\r\n /**\r\n * Unsigned one.\r\n * @type {!Long}\r\n */\r\n Long.UONE = UONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var NEG_ONE = fromInt(-1);\r\n\r\n /**\r\n * Signed negative one.\r\n * @type {!Long}\r\n */\r\n Long.NEG_ONE = NEG_ONE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MAX_VALUE = fromBits(0xFFFFFFFF|0, 0x7FFFFFFF|0, false);\r\n\r\n /**\r\n * Maximum signed value.\r\n * @type {!Long}\r\n */\r\n Long.MAX_VALUE = MAX_VALUE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MAX_UNSIGNED_VALUE = fromBits(0xFFFFFFFF|0, 0xFFFFFFFF|0, true);\r\n\r\n /**\r\n * Maximum unsigned value.\r\n * @type {!Long}\r\n */\r\n Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;\r\n\r\n /**\r\n * @type {!Long}\r\n * @inner\r\n */\r\n var MIN_VALUE = fromBits(0, 0x80000000|0, false);\r\n\r\n /**\r\n * Minimum signed value.\r\n * @type {!Long}\r\n */\r\n Long.MIN_VALUE = MIN_VALUE;\r\n\r\n /**\r\n * @alias Long.prototype\r\n * @inner\r\n */\r\n var LongPrototype = Long.prototype;\r\n\r\n /**\r\n * Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.\r\n * @returns {number}\r\n */\r\n LongPrototype.toInt = function toInt() {\r\n return this.unsigned ? this.low >>> 0 : this.low;\r\n };\r\n\r\n /**\r\n * Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).\r\n * @returns {number}\r\n */\r\n LongPrototype.toNumber = function toNumber() {\r\n if (this.unsigned)\r\n return ((this.high >>> 0) * TWO_PWR_32_DBL) + (this.low >>> 0);\r\n return this.high * TWO_PWR_32_DBL + (this.low >>> 0);\r\n };\r\n\r\n /**\r\n * Converts the Long to a string written in the specified radix.\r\n * @param {number=} radix Radix (2-36), defaults to 10\r\n * @returns {string}\r\n * @override\r\n * @throws {RangeError} If `radix` is out of range\r\n */\r\n LongPrototype.toString = function toString(radix) {\r\n radix = radix || 10;\r\n if (radix < 2 || 36 < radix)\r\n throw RangeError('radix');\r\n if (this.isZero())\r\n return '0';\r\n if (this.isNegative()) { // Unsigned Longs are never negative\r\n if (this.eq(MIN_VALUE)) {\r\n // We need to change the Long value before it can be negated, so we remove\r\n // the bottom-most digit in this base and then recurse to do the rest.\r\n var radixLong = fromNumber(radix),\r\n div = this.div(radixLong),\r\n rem1 = div.mul(radixLong).sub(this);\r\n return div.toString(radix) + rem1.toInt().toString(radix);\r\n } else\r\n return '-' + this.neg().toString(radix);\r\n }\r\n\r\n // Do several (6) digits each time through the loop, so as to\r\n // minimize the calls to the very expensive emulated div.\r\n var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned),\r\n rem = this;\r\n var result = '';\r\n while (true) {\r\n var remDiv = rem.div(radixToPower),\r\n intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0,\r\n digits = intval.toString(radix);\r\n rem = remDiv;\r\n if (rem.isZero())\r\n return digits + result;\r\n else {\r\n while (digits.length < 6)\r\n digits = '0' + digits;\r\n result = '' + digits + result;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Gets the high 32 bits as a signed integer.\r\n * @returns {number} Signed high bits\r\n */\r\n LongPrototype.getHighBits = function getHighBits() {\r\n return this.high;\r\n };\r\n\r\n /**\r\n * Gets the high 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned high bits\r\n */\r\n LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {\r\n return this.high >>> 0;\r\n };\r\n\r\n /**\r\n * Gets the low 32 bits as a signed integer.\r\n * @returns {number} Signed low bits\r\n */\r\n LongPrototype.getLowBits = function getLowBits() {\r\n return this.low;\r\n };\r\n\r\n /**\r\n * Gets the low 32 bits as an unsigned integer.\r\n * @returns {number} Unsigned low bits\r\n */\r\n LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {\r\n return this.low >>> 0;\r\n };\r\n\r\n /**\r\n * Gets the number of bits needed to represent the absolute value of this Long.\r\n * @returns {number}\r\n */\r\n LongPrototype.getNumBitsAbs = function getNumBitsAbs() {\r\n if (this.isNegative()) // Unsigned Longs are never negative\r\n return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();\r\n var val = this.high != 0 ? this.high : this.low;\r\n for (var bit = 31; bit > 0; bit--)\r\n if ((val & (1 << bit)) != 0)\r\n break;\r\n return this.high != 0 ? bit + 33 : bit + 1;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals zero.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isZero = function isZero() {\r\n return this.high === 0 && this.low === 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is negative.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isNegative = function isNegative() {\r\n return !this.unsigned && this.high < 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is positive.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isPositive = function isPositive() {\r\n return this.unsigned || this.high >= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is odd.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isOdd = function isOdd() {\r\n return (this.low & 1) === 1;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is even.\r\n * @returns {boolean}\r\n */\r\n LongPrototype.isEven = function isEven() {\r\n return (this.low & 1) === 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.equals = function equals(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.unsigned !== other.unsigned && (this.high >>> 31) === 1 && (other.high >>> 31) === 1)\r\n return false;\r\n return this.high === other.high && this.low === other.low;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value equals the specified's. This is an alias of {@link Long#equals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.eq = LongPrototype.equals;\r\n\r\n /**\r\n * Tests if this Long's value differs from the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.notEquals = function notEquals(other) {\r\n return !this.eq(/* validates */ other);\r\n };\r\n\r\n /**\r\n * Tests if this Long's value differs from the specified's. This is an alias of {@link Long#notEquals}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.neq = LongPrototype.notEquals;\r\n\r\n /**\r\n * Tests if this Long's value is less than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lessThan = function lessThan(other) {\r\n return this.comp(/* validates */ other) < 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is less than the specified's. This is an alias of {@link Long#lessThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lt = LongPrototype.lessThan;\r\n\r\n /**\r\n * Tests if this Long's value is less than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {\r\n return this.comp(/* validates */ other) <= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is less than or equal the specified's. This is an alias of {@link Long#lessThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.lte = LongPrototype.lessThanOrEqual;\r\n\r\n /**\r\n * Tests if this Long's value is greater than the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.greaterThan = function greaterThan(other) {\r\n return this.comp(/* validates */ other) > 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is greater than the specified's. This is an alias of {@link Long#greaterThan}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.gt = LongPrototype.greaterThan;\r\n\r\n /**\r\n * Tests if this Long's value is greater than or equal the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {\r\n return this.comp(/* validates */ other) >= 0;\r\n };\r\n\r\n /**\r\n * Tests if this Long's value is greater than or equal the specified's. This is an alias of {@link Long#greaterThanOrEqual}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {boolean}\r\n */\r\n LongPrototype.gte = LongPrototype.greaterThanOrEqual;\r\n\r\n /**\r\n * Compares this Long's value with the specified's.\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\n LongPrototype.compare = function compare(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n if (this.eq(other))\r\n return 0;\r\n var thisNeg = this.isNegative(),\r\n otherNeg = other.isNegative();\r\n if (thisNeg && !otherNeg)\r\n return -1;\r\n if (!thisNeg && otherNeg)\r\n return 1;\r\n // At this point the sign bits are the same\r\n if (!this.unsigned)\r\n return this.sub(other).isNegative() ? -1 : 1;\r\n // Both are positive if at least one is unsigned\r\n return (other.high >>> 0) > (this.high >>> 0) || (other.high === this.high && (other.low >>> 0) > (this.low >>> 0)) ? -1 : 1;\r\n };\r\n\r\n /**\r\n * Compares this Long's value with the specified's. This is an alias of {@link Long#compare}.\r\n * @function\r\n * @param {!Long|number|string} other Other value\r\n * @returns {number} 0 if they are the same, 1 if the this is greater and -1\r\n * if the given one is greater\r\n */\r\n LongPrototype.comp = LongPrototype.compare;\r\n\r\n /**\r\n * Negates this Long's value.\r\n * @returns {!Long} Negated Long\r\n */\r\n LongPrototype.negate = function negate() {\r\n if (!this.unsigned && this.eq(MIN_VALUE))\r\n return MIN_VALUE;\r\n return this.not().add(ONE);\r\n };\r\n\r\n /**\r\n * Negates this Long's value. This is an alias of {@link Long#negate}.\r\n * @function\r\n * @returns {!Long} Negated Long\r\n */\r\n LongPrototype.neg = LongPrototype.negate;\r\n\r\n /**\r\n * Returns the sum of this and the specified Long.\r\n * @param {!Long|number|string} addend Addend\r\n * @returns {!Long} Sum\r\n */\r\n LongPrototype.add = function add(addend) {\r\n if (!isLong(addend))\r\n addend = fromValue(addend);\r\n\r\n // Divide each number into 4 chunks of 16 bits, and then sum the chunks.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = addend.high >>> 16;\r\n var b32 = addend.high & 0xFFFF;\r\n var b16 = addend.low >>> 16;\r\n var b00 = addend.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 + b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 + b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 + b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 + b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the difference of this and the specified Long.\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\n LongPrototype.subtract = function subtract(subtrahend) {\r\n if (!isLong(subtrahend))\r\n subtrahend = fromValue(subtrahend);\r\n return this.add(subtrahend.neg());\r\n };\r\n\r\n /**\r\n * Returns the difference of this and the specified Long. This is an alias of {@link Long#subtract}.\r\n * @function\r\n * @param {!Long|number|string} subtrahend Subtrahend\r\n * @returns {!Long} Difference\r\n */\r\n LongPrototype.sub = LongPrototype.subtract;\r\n\r\n /**\r\n * Returns the product of this and the specified Long.\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\n LongPrototype.multiply = function multiply(multiplier) {\r\n if (this.isZero())\r\n return ZERO;\r\n if (!isLong(multiplier))\r\n multiplier = fromValue(multiplier);\r\n if (multiplier.isZero())\r\n return ZERO;\r\n if (this.eq(MIN_VALUE))\r\n return multiplier.isOdd() ? MIN_VALUE : ZERO;\r\n if (multiplier.eq(MIN_VALUE))\r\n return this.isOdd() ? MIN_VALUE : ZERO;\r\n\r\n if (this.isNegative()) {\r\n if (multiplier.isNegative())\r\n return this.neg().mul(multiplier.neg());\r\n else\r\n return this.neg().mul(multiplier).neg();\r\n } else if (multiplier.isNegative())\r\n return this.mul(multiplier.neg()).neg();\r\n\r\n // If both longs are small, use float multiplication\r\n if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))\r\n return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);\r\n\r\n // Divide each long into 4 chunks of 16 bits, and then add up 4x4 products.\r\n // We can skip products that would overflow.\r\n\r\n var a48 = this.high >>> 16;\r\n var a32 = this.high & 0xFFFF;\r\n var a16 = this.low >>> 16;\r\n var a00 = this.low & 0xFFFF;\r\n\r\n var b48 = multiplier.high >>> 16;\r\n var b32 = multiplier.high & 0xFFFF;\r\n var b16 = multiplier.low >>> 16;\r\n var b00 = multiplier.low & 0xFFFF;\r\n\r\n var c48 = 0, c32 = 0, c16 = 0, c00 = 0;\r\n c00 += a00 * b00;\r\n c16 += c00 >>> 16;\r\n c00 &= 0xFFFF;\r\n c16 += a16 * b00;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c16 += a00 * b16;\r\n c32 += c16 >>> 16;\r\n c16 &= 0xFFFF;\r\n c32 += a32 * b00;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a16 * b16;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c32 += a00 * b32;\r\n c48 += c32 >>> 16;\r\n c32 &= 0xFFFF;\r\n c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;\r\n c48 &= 0xFFFF;\r\n return fromBits((c16 << 16) | c00, (c48 << 16) | c32, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the product of this and the specified Long. This is an alias of {@link Long#multiply}.\r\n * @function\r\n * @param {!Long|number|string} multiplier Multiplier\r\n * @returns {!Long} Product\r\n */\r\n LongPrototype.mul = LongPrototype.multiply;\r\n\r\n /**\r\n * Returns this Long divided by the specified. The result is signed if this Long is signed or\r\n * unsigned if this Long is unsigned.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\n LongPrototype.divide = function divide(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n if (divisor.isZero())\r\n throw Error('division by zero');\r\n if (this.isZero())\r\n return this.unsigned ? UZERO : ZERO;\r\n var approx, rem, res;\r\n if (!this.unsigned) {\r\n // This section is only relevant for signed longs and is derived from the\r\n // closure library as a whole.\r\n if (this.eq(MIN_VALUE)) {\r\n if (divisor.eq(ONE) || divisor.eq(NEG_ONE))\r\n return MIN_VALUE; // recall that -MIN_VALUE == MIN_VALUE\r\n else if (divisor.eq(MIN_VALUE))\r\n return ONE;\r\n else {\r\n // At this point, we have |other| >= 2, so |this/other| < |MIN_VALUE|.\r\n var halfThis = this.shr(1);\r\n approx = halfThis.div(divisor).shl(1);\r\n if (approx.eq(ZERO)) {\r\n return divisor.isNegative() ? ONE : NEG_ONE;\r\n } else {\r\n rem = this.sub(divisor.mul(approx));\r\n res = approx.add(rem.div(divisor));\r\n return res;\r\n }\r\n }\r\n } else if (divisor.eq(MIN_VALUE))\r\n return this.unsigned ? UZERO : ZERO;\r\n if (this.isNegative()) {\r\n if (divisor.isNegative())\r\n return this.neg().div(divisor.neg());\r\n return this.neg().div(divisor).neg();\r\n } else if (divisor.isNegative())\r\n return this.div(divisor.neg()).neg();\r\n res = ZERO;\r\n } else {\r\n // The algorithm below has not been made for unsigned longs. It's therefore\r\n // required to take special care of the MSB prior to running it.\r\n if (!divisor.unsigned)\r\n divisor = divisor.toUnsigned();\r\n if (divisor.gt(this))\r\n return UZERO;\r\n if (divisor.gt(this.shru(1))) // 15 >>> 1 = 7 ; with divisor = 8 ; true\r\n return UONE;\r\n res = UZERO;\r\n }\r\n\r\n // Repeat the following until the remainder is less than other: find a\r\n // floating-point that approximates remainder / other *from below*, add this\r\n // into the result, and subtract it from the remainder. It is critical that\r\n // the approximate value is less than or equal to the real value so that the\r\n // remainder never becomes negative.\r\n rem = this;\r\n while (rem.gte(divisor)) {\r\n // Approximate the result of division. This may be a little greater or\r\n // smaller than the actual value.\r\n approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));\r\n\r\n // We will tweak the approximate result by changing it in the 48-th digit or\r\n // the smallest non-fractional digit, whichever is larger.\r\n var log2 = Math.ceil(Math.log(approx) / Math.LN2),\r\n delta = (log2 <= 48) ? 1 : pow_dbl(2, log2 - 48),\r\n\r\n // Decrease the approximation until it is smaller than the remainder. Note\r\n // that if it is too large, the product overflows and is negative.\r\n approxRes = fromNumber(approx),\r\n approxRem = approxRes.mul(divisor);\r\n while (approxRem.isNegative() || approxRem.gt(rem)) {\r\n approx -= delta;\r\n approxRes = fromNumber(approx, this.unsigned);\r\n approxRem = approxRes.mul(divisor);\r\n }\r\n\r\n // We know the answer can't be zero... and actually, zero would cause\r\n // infinite recursion since we would make no progress.\r\n if (approxRes.isZero())\r\n approxRes = ONE;\r\n\r\n res = res.add(approxRes);\r\n rem = rem.sub(approxRem);\r\n }\r\n return res;\r\n };\r\n\r\n /**\r\n * Returns this Long divided by the specified. This is an alias of {@link Long#divide}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Quotient\r\n */\r\n LongPrototype.div = LongPrototype.divide;\r\n\r\n /**\r\n * Returns this Long modulo the specified.\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\n LongPrototype.modulo = function modulo(divisor) {\r\n if (!isLong(divisor))\r\n divisor = fromValue(divisor);\r\n return this.sub(this.div(divisor).mul(divisor));\r\n };\r\n\r\n /**\r\n * Returns this Long modulo the specified. This is an alias of {@link Long#modulo}.\r\n * @function\r\n * @param {!Long|number|string} divisor Divisor\r\n * @returns {!Long} Remainder\r\n */\r\n LongPrototype.mod = LongPrototype.modulo;\r\n\r\n /**\r\n * Returns the bitwise NOT of this Long.\r\n * @returns {!Long}\r\n */\r\n LongPrototype.not = function not() {\r\n return fromBits(~this.low, ~this.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise AND of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.and = function and(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low & other.low, this.high & other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise OR of this Long and the specified.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.or = function or(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low | other.low, this.high | other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns the bitwise XOR of this Long and the given one.\r\n * @param {!Long|number|string} other Other Long\r\n * @returns {!Long}\r\n */\r\n LongPrototype.xor = function xor(other) {\r\n if (!isLong(other))\r\n other = fromValue(other);\r\n return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits shifted to the left by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftLeft = function shiftLeft(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits(this.low << numBits, (this.high << numBits) | (this.low >>> (32 - numBits)), this.unsigned);\r\n else\r\n return fromBits(0, this.low << (numBits - 32), this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits shifted to the left by the given amount. This is an alias of {@link Long#shiftLeft}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shl = LongPrototype.shiftLeft;\r\n\r\n /**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftRight = function shiftRight(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n if ((numBits &= 63) === 0)\r\n return this;\r\n else if (numBits < 32)\r\n return fromBits((this.low >>> numBits) | (this.high << (32 - numBits)), this.high >> numBits, this.unsigned);\r\n else\r\n return fromBits(this.high >> (numBits - 32), this.high >= 0 ? 0 : -1, this.unsigned);\r\n };\r\n\r\n /**\r\n * Returns this Long with bits arithmetically shifted to the right by the given amount. This is an alias of {@link Long#shiftRight}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shr = LongPrototype.shiftRight;\r\n\r\n /**\r\n * Returns this Long with bits logically shifted to the right by the given amount.\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {\r\n if (isLong(numBits))\r\n numBits = numBits.toInt();\r\n numBits &= 63;\r\n if (numBits === 0)\r\n return this;\r\n else {\r\n var high = this.high;\r\n if (numBits < 32) {\r\n var low = this.low;\r\n return fromBits((low >>> numBits) | (high << (32 - numBits)), high >>> numBits, this.unsigned);\r\n } else if (numBits === 32)\r\n return fromBits(high, 0, this.unsigned);\r\n else\r\n return fromBits(high >>> (numBits - 32), 0, this.unsigned);\r\n }\r\n };\r\n\r\n /**\r\n * Returns this Long with bits logically shifted to the right by the given amount. This is an alias of {@link Long#shiftRightUnsigned}.\r\n * @function\r\n * @param {number|!Long} numBits Number of bits\r\n * @returns {!Long} Shifted Long\r\n */\r\n LongPrototype.shru = LongPrototype.shiftRightUnsigned;\r\n\r\n /**\r\n * Converts this Long to signed.\r\n * @returns {!Long} Signed long\r\n */\r\n LongPrototype.toSigned = function toSigned() {\r\n if (!this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, false);\r\n };\r\n\r\n /**\r\n * Converts this Long to unsigned.\r\n * @returns {!Long} Unsigned long\r\n */\r\n LongPrototype.toUnsigned = function toUnsigned() {\r\n if (this.unsigned)\r\n return this;\r\n return fromBits(this.low, this.high, true);\r\n };\r\n\r\n /**\r\n * Converts this Long to its byte representation.\r\n * @param {boolean=} le Whether little or big endian, defaults to big endian\r\n * @returns {!Array.<number>} Byte representation\r\n */\r\n LongPrototype.toBytes = function(le) {\r\n return le ? this.toBytesLE() : this.toBytesBE();\r\n }\r\n\r\n /**\r\n * Converts this Long to its little endian byte representation.\r\n * @returns {!Array.<number>} Little endian byte representation\r\n */\r\n LongPrototype.toBytesLE = function() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n lo & 0xff,\r\n (lo >>> 8) & 0xff,\r\n (lo >>> 16) & 0xff,\r\n (lo >>> 24) & 0xff,\r\n hi & 0xff,\r\n (hi >>> 8) & 0xff,\r\n (hi >>> 16) & 0xff,\r\n (hi >>> 24) & 0xff\r\n ];\r\n }\r\n\r\n /**\r\n * Converts this Long to its big endian byte representation.\r\n * @returns {!Array.<number>} Big endian byte representation\r\n */\r\n LongPrototype.toBytesBE = function() {\r\n var hi = this.high,\r\n lo = this.low;\r\n return [\r\n (hi >>> 24) & 0xff,\r\n (hi >>> 16) & 0xff,\r\n (hi >>> 8) & 0xff,\r\n hi & 0xff,\r\n (lo >>> 24) & 0xff,\r\n (lo >>> 16) & 0xff,\r\n (lo >>> 8) & 0xff,\r\n lo & 0xff\r\n ];\r\n }\r\n\r\n return Long;\r\n});\r\n","import {COORDINATE_SYSTEM, createIterable} from '@deck.gl/core';\n\n/* eslint-disable max-statements, complexity */\nconst RADIAN_PER_DEGREE = Math.PI / 180;\nconst modelMatrix = new Float32Array(16);\nconst valueArray = new Float32Array(12);\n\nfunction calculateTransformMatrix(targetMatrix, orientation, scale) {\n const pitch = orientation[0] * RADIAN_PER_DEGREE;\n const yaw = orientation[1] * RADIAN_PER_DEGREE;\n const roll = orientation[2] * RADIAN_PER_DEGREE;\n\n const sr = Math.sin(roll);\n const sp = Math.sin(pitch);\n const sw = Math.sin(yaw);\n\n const cr = Math.cos(roll);\n const cp = Math.cos(pitch);\n const cw = Math.cos(yaw);\n\n const scx = scale[0];\n const scy = scale[1];\n const scz = scale[2];\n\n targetMatrix[0] = scx * cw * cp; // 0,0\n targetMatrix[1] = scx * sw * cp; // 1,0\n targetMatrix[2] = scx * -sp; // 2,0\n targetMatrix[3] = scy * (-sw * cr + cw * sp * sr); // 0,1\n targetMatrix[4] = scy * (cw * cr + sw * sp * sr); // 1,1\n targetMatrix[5] = scy * cp * sr; // 2,1\n targetMatrix[6] = scz * (sw * sr + cw * sp * cr); // 0,2\n targetMatrix[7] = scz * (-cw * sr + sw * sp * cr); // 1,2\n targetMatrix[8] = scz * cp * cr; // 2,2\n}\n\nfunction getExtendedMat3FromMat4(mat4) {\n mat4[0] = mat4[0];\n mat4[1] = mat4[1];\n mat4[2] = mat4[2];\n mat4[3] = mat4[4];\n mat4[4] = mat4[5];\n mat4[5] = mat4[6];\n mat4[6] = mat4[8];\n mat4[7] = mat4[9];\n mat4[8] = mat4[10];\n mat4[9] = mat4[12];\n mat4[10] = mat4[13];\n mat4[11] = mat4[14];\n\n return mat4.subarray(0, 12);\n}\n\nexport const MATRIX_ATTRIBUTES = {\n size: 12,\n accessor: ['getOrientation', 'getScale', 'getTranslation', 'getTransformMatrix'],\n shaderAttributes: {\n instanceModelMatrix__LOCATION_0: {\n size: 3,\n elementOffset: 0\n },\n instanceModelMatrix__LOCATION_1: {\n size: 3,\n elementOffset: 3\n },\n instanceModelMatrix__LOCATION_2: {\n size: 3,\n elementOffset: 6\n },\n instanceTranslation: {\n size: 3,\n elementOffset: 9\n }\n },\n\n update(attribute, {startRow, endRow}) {\n // NOTE(Tarek): \"this\" will be bound to a layer!\n const {data, getOrientation, getScale, getTranslation, getTransformMatrix} = this.props;\n\n const arrayMatrix = Array.isArray(getTransformMatrix);\n const constantMatrix = arrayMatrix && getTransformMatrix.length === 16;\n const constantScale = Array.isArray(getScale);\n const constantOrientation = Array.isArray(getOrientation);\n const constantTranslation = Array.isArray(getTranslation);\n\n const hasMatrix = constantMatrix || (!arrayMatrix && Boolean(getTransformMatrix(data[0])));\n\n if (hasMatrix) {\n attribute.constant = constantMatrix;\n } else {\n attribute.constant = constantOrientation && constantScale && constantTranslation;\n }\n\n const instanceModelMatrixData = attribute.value;\n\n if (attribute.constant) {\n let matrix;\n\n if (hasMatrix) {\n modelMatrix.set(getTransformMatrix);\n matrix = getExtendedMat3FromMat4(modelMatrix);\n } else {\n matrix = valueArray;\n\n const orientation = getOrientation;\n const scale = getScale;\n\n calculateTransformMatrix(matrix, orientation, scale);\n matrix.set(getTranslation, 9);\n }\n\n attribute.value = new Float32Array(matrix);\n } else {\n let i = startRow * attribute.size;\n const {iterable, objectInfo} = createIterable(data, startRow, endRow);\n for (const object of iterable) {\n objectInfo.index++;\n let matrix;\n\n if (hasMatrix) {\n modelMatrix.set(\n constantMatrix ? getTransformMatrix : getTransformMatrix(object, objectInfo)\n );\n matrix = getExtendedMat3FromMat4(modelMatrix);\n } else {\n matrix = valueArray;\n\n const orientation = constantOrientation\n ? getOrientation\n : getOrientation(object, objectInfo);\n const scale = constantScale ? getScale : getScale(object, objectInfo);\n\n calculateTransformMatrix(matrix, orientation, scale);\n matrix.set(constantTranslation ? getTranslation : getTranslation(object, objectInfo), 9);\n }\n\n instanceModelMatrixData[i++] = matrix[0];\n instanceModelMatrixData[i++] = matrix[1];\n instanceModelMatrixData[i++] = matrix[2];\n instanceModelMatrixData[i++] = matrix[3];\n instanceModelMatrixData[i++] = matrix[4];\n instanceModelMatrixData[i++] = matrix[5];\n instanceModelMatrixData[i++] = matrix[6];\n instanceModelMatrixData[i++] = matrix[7];\n instanceModelMatrixData[i++] = matrix[8];\n instanceModelMatrixData[i++] = matrix[9];\n instanceModelMatrixData[i++] = matrix[10];\n instanceModelMatrixData[i++] = matrix[11];\n }\n }\n }\n};\n\n// only apply composeModelMatrix when in cartesian or meter_offsets coordinate system\n// with `composeModelMatrix` enabled, the rotation part of the layer's modelMatrix will be composed to instance's transformations\n// since rotating latitude and longitude can not provide meaningful results, hence `composeModelMatrix` is disabled\n// when in LNGLAT and LNGLAT_OFFSET coordinates.\nexport function shouldComposeModelMatrix(viewport, coordinateSystem) {\n return (\n coordinateSystem === COORDINATE_SYSTEM.CARTESIAN ||\n coordinateSystem === COORDINATE_SYSTEM.METER_OFFSETS ||\n (coordinateSystem === COORDINATE_SYSTEM.DEFAULT && !viewport.isGeospatial)\n );\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-dev-runtime.development.js');\n}\n","/* eslint-disable no-inline-comments, max-len, camelcase */\nimport GL from '@luma.gl/constants';\nimport {isWebGL2} from '../utils/webgl-checks';\n\nconst OES_element_index = 'OES_element_index';\nconst WEBGL_draw_buffers = 'WEBGL_draw_buffers';\nconst EXT_disjoint_timer_query = 'EXT_disjoint_timer_query';\nconst EXT_disjoint_timer_query_webgl2 = 'EXT_disjoint_timer_query_webgl2';\nconst EXT_texture_filter_anisotropic = 'EXT_texture_filter_anisotropic';\nconst WEBGL_debug_renderer_info = 'WEBGL_debug_renderer_info';\n\nconst GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8b8b;\nconst GL_DONT_CARE = 0x1100;\nconst GL_GPU_DISJOINT_EXT = 0x8fbb;\nconst GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84ff;\nconst GL_UNMASKED_VENDOR_WEBGL = 0x9245; // vendor string of the graphics driver.\nconst GL_UNMASKED_RENDERER_WEBGL = 0x9246; // renderer string of the graphics driver.\n\nconst getWebGL2ValueOrZero = gl => (!isWebGL2(gl) ? 0 : undefined);\n\n// if a function returns undefined in this table,\n// the original getParameter will be called, defeating the override\nconst WEBGL_PARAMETERS = {\n [GL.READ_BUFFER]: gl => (!isWebGL2(gl) ? GL.COLOR_ATTACHMENT0 : undefined),\n\n // WebGL2 context parameters\n [GL_FRAGMENT_SHADER_DERIVATIVE_HINT]: gl => (!isWebGL2(gl) ? GL_DONT_CARE : undefined),\n\n [GL.RASTERIZER_DISCARD]: getWebGL2ValueOrZero,\n\n [GL.SAMPLES]: getWebGL2ValueOrZero,\n\n // WebGL2 extension context parameters\n [GL_GPU_DISJOINT_EXT]: (gl, getParameter) => {\n const ext = isWebGL2(gl)\n ? gl.getExtension(EXT_disjoint_timer_query_webgl2)\n : gl.getExtension(EXT_disjoint_timer_query);\n return ext && ext.GPU_DISJOINT_EXT ? getParameter(ext.GPU_DISJOINT_EXT) : 0;\n },\n\n // Extension fixed values\n [GL_UNMASKED_VENDOR_WEBGL]: (gl, getParameter) => {\n const ext = gl.getExtension(WEBGL_debug_renderer_info);\n return getParameter((ext && ext.UNMASKED_VENDOR_WEBGL) || GL.VENDOR);\n },\n\n [GL_UNMASKED_RENDERER_WEBGL]: (gl, getParameter) => {\n const ext = gl.getExtension(WEBGL_debug_renderer_info);\n return getParameter((ext && ext.UNMASKED_RENDERER_WEBGL) || GL.RENDERER);\n },\n\n // Extension LIMITS\n [GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT]: (gl, getParameter) => {\n const ext = gl.luma.extensions[EXT_texture_filter_anisotropic];\n return ext ? getParameter(ext.MAX_TEXTURE_MAX_ANISOTROPY_EXT) : 1.0;\n },\n\n // WebGL2 Limits\n [GL.MAX_3D_TEXTURE_SIZE]: getWebGL2ValueOrZero,\n [GL.MAX_ARRAY_TEXTURE_LAYERS]: getWebGL2ValueOrZero,\n [GL.MAX_CLIENT_WAIT_TIMEOUT_WEBGL]: getWebGL2ValueOrZero,\n [GL.MAX_COLOR_ATTACHMENTS]: (gl, getParameter) => {\n if (!isWebGL2(gl)) {\n const ext = gl.getExtension(WEBGL_draw_buffers);\n return ext ? getParameter(ext.MAX_COLOR_ATTACHMENTS_WEBGL) : 0;\n }\n return undefined;\n },\n [GL.MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_COMBINED_UNIFORM_BLOCKS]: getWebGL2ValueOrZero,\n [GL.MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_DRAW_BUFFERS]: gl => {\n if (!isWebGL2(gl)) {\n const ext = gl.getExtension(WEBGL_draw_buffers);\n return ext ? ext.MAX_DRAW_BUFFERS_WEBGL : 0;\n }\n return undefined;\n },\n [GL.MAX_ELEMENT_INDEX]:\n // Guess: per webglstats.com 99.6% of webgl2 supports 2147483647\n gl => (gl.getExtension(OES_element_index) ? 2147483647 : 65535),\n [GL.MAX_ELEMENTS_INDICES]:\n // Guess: \"Reasonably safe\" per webglstats.com - could be higher/lower (on some mobile devices)\n gl => (gl.getExtension(OES_element_index) ? 16777216 : 65535),\n [GL.MAX_ELEMENTS_VERTICES]:\n // Guess: \"Reasonably safe\" per webglstats.com - could be higher/lower (on some mobile devices)\n gl => 16777216,\n [GL.MAX_FRAGMENT_INPUT_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_FRAGMENT_UNIFORM_BLOCKS]: getWebGL2ValueOrZero,\n [GL.MAX_FRAGMENT_UNIFORM_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_SAMPLES]: getWebGL2ValueOrZero,\n [GL.MAX_SERVER_WAIT_TIMEOUT]: getWebGL2ValueOrZero,\n [GL.MAX_TEXTURE_LOD_BIAS]: getWebGL2ValueOrZero,\n [GL.MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS]: getWebGL2ValueOrZero,\n [GL.MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_UNIFORM_BLOCK_SIZE]: getWebGL2ValueOrZero,\n [GL.MAX_UNIFORM_BUFFER_BINDINGS]: getWebGL2ValueOrZero,\n [GL.MAX_VARYING_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_VERTEX_OUTPUT_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MAX_VERTEX_UNIFORM_BLOCKS]: getWebGL2ValueOrZero,\n [GL.MAX_VERTEX_UNIFORM_COMPONENTS]: getWebGL2ValueOrZero,\n [GL.MIN_PROGRAM_TEXEL_OFFSET]: getWebGL2ValueOrZero,\n [GL.MAX_PROGRAM_TEXEL_OFFSET]: getWebGL2ValueOrZero,\n [GL.UNIFORM_BUFFER_OFFSET_ALIGNMENT]: getWebGL2ValueOrZero\n};\n\n// A \"replacement\" gl.getParameter that accepts \"enums\" from extensions and WebGL2\n// and returns reasonably safe defaults\nexport function getParameterPolyfill(gl, originalGetParameter, pname) {\n // Return mock limits (usually 0) for WebGL2 constants to ensure these\n // can be queries without error\n const limit = WEBGL_PARAMETERS[pname];\n // @ts-ignore TODO pname parameter not declared\n const value = typeof limit === 'function' ? limit(gl, originalGetParameter, pname) : limit;\n const result = value !== undefined ? value : originalGetParameter(pname);\n return result;\n}\n","import GL from '@luma.gl/constants';\nimport {assert} from '../utils/assert';\nimport {isWebGL2} from '../utils/webgl-checks';\n\nimport {getParameterPolyfill} from './get-parameter-polyfill';\n\nconst OES_vertex_array_object = 'OES_vertex_array_object';\nconst ANGLE_instanced_arrays = 'ANGLE_instanced_arrays';\nconst WEBGL_draw_buffers = 'WEBGL_draw_buffers';\nconst EXT_disjoint_timer_query = 'EXT_disjoint_timer_query';\nconst EXT_texture_filter_anisotropic = 'EXT_texture_filter_anisotropic';\n\nconst ERR_VAO_NOT_SUPPORTED = 'VertexArray requires WebGL2 or OES_vertex_array_object extension';\n\n// Return object with webgl2 flag and an extension\nfunction getExtensionData(gl, extension) {\n return {\n webgl2: isWebGL2(gl),\n ext: gl.getExtension(extension)\n };\n}\n\n// function mapExtensionConstant(gl, constant) {\n// switch (constant) {\n// case ext.FRAGMENT_SHADER_DERIVATIVE_HINT_OES: return GL.FRAGMENT_SHADER_DERIVATIVE_HINT;\n// }\n// }\n\nexport const WEBGL2_CONTEXT_POLYFILLS = {\n // POLYFILL TABLE\n [OES_vertex_array_object]: {\n meta: {suffix: 'OES'},\n // NEW METHODS\n createVertexArray: () => {\n assert(false, ERR_VAO_NOT_SUPPORTED);\n },\n deleteVertexArray: () => {},\n bindVertexArray: () => {},\n isVertexArray: () => false\n },\n [ANGLE_instanced_arrays]: {\n meta: {\n suffix: 'ANGLE'\n // constants: {\n // VERTEX_ATTRIB_ARRAY_DIVISOR: 'VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE'\n // }\n },\n vertexAttribDivisor(location, divisor) {\n // Accept divisor 0 even if instancing is not supported (0 = no instancing)\n assert(divisor === 0, 'WebGL instanced rendering not supported');\n },\n drawElementsInstanced: () => {},\n drawArraysInstanced: () => {}\n },\n [WEBGL_draw_buffers]: {\n meta: {\n suffix: 'WEBGL'\n },\n drawBuffers: () => {\n assert(false);\n }\n },\n [EXT_disjoint_timer_query]: {\n meta: {suffix: 'EXT'},\n // WebGL1: Polyfills the WebGL2 Query API\n createQuery: () => {\n assert(false);\n },\n deleteQuery: () => {\n assert(false);\n },\n beginQuery: () => {\n assert(false);\n },\n endQuery: () => {},\n getQuery(handle, pname) {\n // @ts-ignore\n return this.getQueryObject(handle, pname);\n },\n // The WebGL1 extension uses getQueryObject rather then getQueryParameter\n getQueryParameter(handle, pname) {\n // @ts-ignore\n return this.getQueryObject(handle, pname);\n },\n getQueryObject: () => {}\n }\n};\n\nexport const WEBGL2_CONTEXT_OVERRIDES = {\n // Ensure readBuffer is a no-op\n readBuffer: (gl, originalFunc, attachment) => {\n if (isWebGL2(gl)) {\n originalFunc(attachment);\n } else {\n // assert(attachment !== GL_COLOR_ATTACHMENT0 && attachment !== GL_FRONT);\n }\n },\n // Override for getVertexAttrib that returns sane values for non-WebGL1 constants\n getVertexAttrib: (gl, originalFunc, location, pname) => {\n // const gl = this; // eslint-disable-line\n const {webgl2, ext} = getExtensionData(gl, ANGLE_instanced_arrays);\n\n let result;\n switch (pname) {\n // WebGL1 attributes will never be integer\n case GL.VERTEX_ATTRIB_ARRAY_INTEGER:\n result = !webgl2 ? false : undefined;\n break;\n // if instancing is not available, return 0 meaning divisor has not been set\n case GL.VERTEX_ATTRIB_ARRAY_DIVISOR:\n result = !webgl2 && !ext ? 0 : undefined;\n break;\n default:\n }\n\n return result !== undefined ? result : originalFunc(location, pname);\n },\n // Handle transform feedback and uniform block queries in WebGL1\n getProgramParameter: (gl, originalFunc, program, pname) => {\n if (!isWebGL2(gl)) {\n switch (pname) {\n case GL.TRANSFORM_FEEDBACK_BUFFER_MODE:\n return GL.SEPARATE_ATTRIBS;\n case GL.TRANSFORM_FEEDBACK_VARYINGS:\n return 0;\n case GL.ACTIVE_UNIFORM_BLOCKS:\n return 0;\n default:\n }\n }\n return originalFunc(program, pname);\n },\n getInternalformatParameter: (gl, originalFunc, target, format, pname) => {\n if (!isWebGL2(gl)) {\n switch (pname) {\n case GL.SAMPLES:\n return new Int32Array([0]);\n default:\n }\n }\n return gl.getInternalformatParameter(target, format, pname);\n },\n getTexParameter(gl, originalFunc, target, pname) {\n switch (pname) {\n case GL.TEXTURE_MAX_ANISOTROPY_EXT:\n const {extensions} = gl.luma;\n const ext = extensions[EXT_texture_filter_anisotropic];\n pname = (ext && ext.TEXTURE_MAX_ANISOTROPY_EXT) || GL.TEXTURE_MAX_ANISOTROPY_EXT;\n break;\n default:\n }\n return originalFunc(target, pname);\n },\n getParameter: getParameterPolyfill,\n hint(gl, originalFunc, pname, value) {\n // TODO - handle GL.FRAGMENT_SHADER_DERIVATIVE_HINT:\n // switch (pname) {\n // case GL.FRAGMENT_SHADER_DERIVATIVE_HINT:\n // }\n return originalFunc(pname, value);\n }\n};\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\nvar helpers_1 = require(\"@turf/helpers\");\nvar invariant_1 = require(\"@turf/invariant\");\n/**\n * Takes a {@link Point} and calculates the location of a destination point given a distance in\n * degrees, radians, miles, or kilometers; and bearing in degrees.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name destination\n * @param {Coord} origin starting point\n * @param {number} distance distance from the origin point\n * @param {number} bearing ranging from -180 to 180\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] Translate properties to Point\n * @returns {Feature<Point>} destination point\n * @example\n * var point = turf.point([-75.343, 39.984]);\n * var distance = 50;\n * var bearing = 90;\n * var options = {units: 'miles'};\n *\n * var destination = turf.destination(point, distance, bearing, options);\n *\n * //addToMap\n * var addToMap = [point, destination]\n * destination.properties['marker-color'] = '#f00';\n * point.properties['marker-color'] = '#0f0';\n */\nfunction destination(origin, distance, bearing, options) {\n if (options === void 0) { options = {}; }\n // Handle input\n var coordinates1 = invariant_1.getCoord(origin);\n var longitude1 = helpers_1.degreesToRadians(coordinates1[0]);\n var latitude1 = helpers_1.degreesToRadians(coordinates1[1]);\n var bearingRad = helpers_1.degreesToRadians(bearing);\n var radians = helpers_1.lengthToRadians(distance, options.units);\n // Main\n var latitude2 = Math.asin(Math.sin(latitude1) * Math.cos(radians) +\n Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearingRad));\n var longitude2 = longitude1 + Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1), Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));\n var lng = helpers_1.radiansToDegrees(longitude2);\n var lat = helpers_1.radiansToDegrees(latitude2);\n return helpers_1.point([lng, lat], options.properties);\n}\nexports.default = destination;\n","import Event from 'events';\nimport uuid from 'uuid';\n\nimport Feature from './feature';\n\nexport default class NebulaLayer extends Event.EventEmitter {\n getData: () => Record<string, any>[];\n toNebulaFeature: (data: Record<string, any>) => Feature;\n id: string;\n helperLayers: Record<string, any>[];\n\n // flags\n usesMapEvents = false;\n enablePicking = false;\n enableSelection = false;\n //\n\n constructor({ getData, on, toNebulaFeature }: Record<string, any>) {\n super();\n this.id = uuid.v4();\n this.getData = getData;\n this.toNebulaFeature = toNebulaFeature;\n this.helperLayers = [];\n\n if (on) {\n // @ts-ignore\n Object.keys(on).forEach((key) => this.on(key, on[key]));\n }\n }\n\n render(config: Record<string, any>): unknown {\n return null;\n }\n}\n","import {\n ClickEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n PointerMoveEvent,\n ModeProps,\n GuideFeatureCollection,\n TentativeFeature,\n} from '../types';\nimport { Polygon, FeatureCollection, FeatureOf, Position } from '../geojson-types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class TwoClickPolygonMode extends GeoJsonEditMode {\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n if (props.modeConfig && props.modeConfig.dragToDraw) {\n // handled in drag handlers\n return;\n }\n\n this.addClickSequence(event);\n\n this.checkAndFinishPolygon(props);\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>): void {\n if (!props.modeConfig || !props.modeConfig.dragToDraw) {\n // handled in click handlers\n return;\n }\n\n this.addClickSequence(event);\n event.cancelPan();\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>): void {\n if (!props.modeConfig || !props.modeConfig.dragToDraw) {\n // handled in click handlers\n return;\n }\n this.addClickSequence(event);\n\n this.checkAndFinishPolygon(props);\n }\n\n checkAndFinishPolygon(props: ModeProps<FeatureCollection>) {\n const clickSequence = this.getClickSequence();\n const tentativeFeature = this.getTentativeGuide(props);\n\n if (\n clickSequence.length > 1 &&\n tentativeFeature &&\n tentativeFeature.geometry.type === 'Polygon'\n ) {\n const feature: FeatureOf<Polygon> = {\n type: 'Feature',\n properties: {\n shape: tentativeFeature.properties.shape,\n },\n geometry: {\n type: 'Polygon',\n coordinates: tentativeFeature.geometry.coordinates,\n },\n };\n const editAction = this.getAddFeatureOrBooleanPolygonAction(feature, props);\n\n this.resetClickSequence();\n\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const { lastPointerMoveEvent, modeConfig } = props;\n const clickSequence = this.getClickSequence();\n\n const guides: GuideFeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (clickSequence.length === 0) {\n // nothing to do yet\n return guides;\n }\n\n const corner1 = clickSequence[0];\n const corner2 = lastPointerMoveEvent.mapCoords;\n\n const polygon = this.getTwoClickPolygon(corner1, corner2, modeConfig);\n if (polygon) {\n guides.features.push({\n type: 'Feature',\n properties: {\n shape: polygon.properties && polygon.properties.shape,\n guideType: 'tentative',\n },\n geometry: polygon.geometry,\n });\n }\n\n return guides;\n }\n\n getTwoClickPolygon(\n coord1: Position,\n coord2: Position,\n modeConfig: any\n ): FeatureOf<Polygon> | null | undefined {\n return null;\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n super.handlePointerMove(event, props);\n }\n\n createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature {\n const { lastPointerMoveEvent } = props;\n const clickSequence = this.getClickSequence();\n\n const lastCoords = lastPointerMoveEvent ? [lastPointerMoveEvent.mapCoords] : [];\n\n let tentativeFeature;\n if (clickSequence.length === 1) {\n tentativeFeature = this.getTwoClickPolygon(clickSequence[0], lastCoords[0], props.modeConfig);\n }\n\n return tentativeFeature;\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar meta_1 = require(\"@turf/meta\");\nvar helpers_1 = require(\"@turf/helpers\");\n/**\n * Takes one or more features and calculates the centroid using the mean of all vertices.\n * This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.\n *\n * @name centroid\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional Parameters\n * @param {Object} [options.properties={}] an Object that is used as the {@link Feature}'s properties\n * @returns {Feature<Point>} the centroid of the input features\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var centroid = turf.centroid(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, centroid]\n */\nfunction centroid(geojson, options) {\n if (options === void 0) { options = {}; }\n var xSum = 0;\n var ySum = 0;\n var len = 0;\n meta_1.coordEach(geojson, function (coord) {\n xSum += coord[0];\n ySum += coord[1];\n len++;\n });\n return helpers_1.point([xSum / len, ySum / len], options.properties);\n}\nexports.default = centroid;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar invariant_1 = require(\"@turf/invariant\");\n// http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule\n// modified from: https://github.com/substack/point-in-polygon/blob/master/index.js\n// which was modified from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html\n/**\n * Takes a {@link Point} and a {@link Polygon} or {@link MultiPolygon} and determines if the point\n * resides inside the polygon. The polygon can be convex or concave. The function accounts for holes.\n *\n * @name booleanPointInPolygon\n * @param {Coord} point input point\n * @param {Feature<Polygon|MultiPolygon>} polygon input polygon or multipolygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreBoundary=false] True if polygon boundary should be ignored when determining if\n * the point is inside the polygon otherwise false.\n * @returns {boolean} `true` if the Point is inside the Polygon; `false` if the Point is not inside the Polygon\n * @example\n * var pt = turf.point([-77, 44]);\n * var poly = turf.polygon([[\n * [-81, 41],\n * [-81, 47],\n * [-72, 47],\n * [-72, 41],\n * [-81, 41]\n * ]]);\n *\n * turf.booleanPointInPolygon(pt, poly);\n * //= true\n */\nfunction booleanPointInPolygon(point, polygon, options) {\n if (options === void 0) { options = {}; }\n // validation\n if (!point) {\n throw new Error(\"point is required\");\n }\n if (!polygon) {\n throw new Error(\"polygon is required\");\n }\n var pt = invariant_1.getCoord(point);\n var geom = invariant_1.getGeom(polygon);\n var type = geom.type;\n var bbox = polygon.bbox;\n var polys = geom.coordinates;\n // Quick elimination if point is not inside bbox\n if (bbox && inBBox(pt, bbox) === false) {\n return false;\n }\n // normalize to multipolygon\n if (type === \"Polygon\") {\n polys = [polys];\n }\n var insidePoly = false;\n for (var i = 0; i < polys.length && !insidePoly; i++) {\n // check if it is in the outer ring first\n if (inRing(pt, polys[i][0], options.ignoreBoundary)) {\n var inHole = false;\n var k = 1;\n // check for the point in any of the holes\n while (k < polys[i].length && !inHole) {\n if (inRing(pt, polys[i][k], !options.ignoreBoundary)) {\n inHole = true;\n }\n k++;\n }\n if (!inHole) {\n insidePoly = true;\n }\n }\n }\n return insidePoly;\n}\nexports.default = booleanPointInPolygon;\n/**\n * inRing\n *\n * @private\n * @param {Array<number>} pt [x,y]\n * @param {Array<Array<number>>} ring [[x,y], [x,y],..]\n * @param {boolean} ignoreBoundary ignoreBoundary\n * @returns {boolean} inRing\n */\nfunction inRing(pt, ring, ignoreBoundary) {\n var isInside = false;\n if (ring[0][0] === ring[ring.length - 1][0] && ring[0][1] === ring[ring.length - 1][1]) {\n ring = ring.slice(0, ring.length - 1);\n }\n for (var i = 0, j = ring.length - 1; i < ring.length; j = i++) {\n var xi = ring[i][0];\n var yi = ring[i][1];\n var xj = ring[j][0];\n var yj = ring[j][1];\n var onBoundary = (pt[1] * (xi - xj) + yi * (xj - pt[0]) + yj * (pt[0] - xi) === 0) &&\n ((xi - pt[0]) * (xj - pt[0]) <= 0) && ((yi - pt[1]) * (yj - pt[1]) <= 0);\n if (onBoundary) {\n return !ignoreBoundary;\n }\n var intersect = ((yi > pt[1]) !== (yj > pt[1])) &&\n (pt[0] < (xj - xi) * (pt[1] - yi) / (yj - yi) + xi);\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\n/**\n * inBBox\n *\n * @private\n * @param {Position} pt point [x,y]\n * @param {BBox} bbox BBox [west, south, east, north]\n * @returns {boolean} true/false if point is inside BBox\n */\nfunction inBBox(pt, bbox) {\n return bbox[0] <= pt[0] &&\n bbox[1] <= pt[1] &&\n bbox[2] >= pt[0] &&\n bbox[3] >= pt[1];\n}\n","export function getFirstCharacters(data, length = 5): string {\n if (typeof data === 'string') {\n return data.slice(0, length);\n } else if (ArrayBuffer.isView(data)) {\n // Typed Arrays can have offsets into underlying buffer\n return getMagicString(data.buffer, data.byteOffset, length);\n } else if (data instanceof ArrayBuffer) {\n const byteOffset = 0;\n return getMagicString(data, byteOffset, length);\n }\n return '';\n}\n\nexport function getMagicString(\n arrayBuffer: ArrayBuffer,\n byteOffset: number,\n length: number\n): string {\n if (arrayBuffer.byteLength <= byteOffset + length) {\n return '';\n }\n const dataView = new DataView(arrayBuffer);\n let magic = '';\n for (let i = 0; i < length; i++) {\n magic += String.fromCharCode(dataView.getUint8(byteOffset + i));\n }\n return magic;\n}\n","var isProduction = process.env.NODE_ENV === 'production';\nfunction warning(condition, message) {\n if (!isProduction) {\n if (condition) {\n return;\n }\n\n var text = \"Warning: \" + message;\n\n if (typeof console !== 'undefined') {\n console.warn(text);\n }\n\n try {\n throw Error(text);\n } catch (x) {}\n }\n}\n\nexport default warning;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// @ts-nocheck\n\n/**\n * Common environment setup\n */\nimport {window, process, isBrowser} from './globals';\n\nexport default function getHiResTimestamp() {\n let timestamp;\n // Get best timer available.\n if (isBrowser && window.performance) {\n timestamp = window.performance.now();\n } else if (process.hrtime) {\n const timeParts = process.hrtime();\n timestamp = timeParts[0] * 1000 + timeParts[1] / 1e6;\n } else {\n timestamp = Date.now();\n }\n\n return timestamp;\n}\n","import {PROP_SYMBOLS} from './constants';\n\nconst {COMPONENT} = PROP_SYMBOLS;\n\nexport function validateProps(props) {\n const propTypes = getPropTypes(props);\n\n for (const propName in propTypes) {\n const propType = propTypes[propName];\n const {validate} = propType;\n if (validate && !validate(props[propName], propType)) {\n throw new Error(`Invalid prop ${propName}: ${props[propName]}`);\n }\n }\n}\n\n// Returns an object with \"change flags\", either false or strings indicating reason for change\nexport function diffProps(props, oldProps) {\n // First check if any props have changed (ignore props that will be examined separately)\n const propsChangedReason = compareProps({\n newProps: props,\n oldProps,\n propTypes: getPropTypes(props),\n ignoreProps: {data: null, updateTriggers: null, extensions: null, transitions: null}\n });\n\n // Now check if any data related props have changed\n const dataChangedReason = diffDataProps(props, oldProps);\n\n // Check update triggers to determine if any attributes need regeneration\n // Note - if data has changed, all attributes will need regeneration, so skip this step\n let updateTriggersChangedReason = false;\n if (!dataChangedReason) {\n updateTriggersChangedReason = diffUpdateTriggers(props, oldProps);\n }\n\n return {\n dataChanged: dataChangedReason,\n propsChanged: propsChangedReason,\n updateTriggersChanged: updateTriggersChangedReason,\n extensionsChanged: diffExtensions(props, oldProps),\n transitionsChanged: diffTransitions(props, oldProps)\n };\n}\n\nfunction diffTransitions(props, oldProps) {\n if (!props.transitions) {\n return null;\n }\n const result = {};\n const propTypes = getPropTypes(props);\n\n for (const key in props.transitions) {\n const propType = propTypes[key];\n const type = propType && propType.type;\n const isTransitionable = type === 'number' || type === 'color' || type === 'array';\n if (isTransitionable && comparePropValues(props[key], oldProps[key], propType)) {\n result[key] = true;\n }\n }\n return result;\n}\n\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * @param {Object} opt.oldProps - object with old key/value pairs\n * @param {Object} opt.newProps - object with new key/value pairs\n * @param {Object} opt.ignoreProps={} - object, keys that should not be compared\n * @returns {null|String} - null when values of all keys are strictly equal.\n * if unequal, returns a string explaining what changed.\n */\n/* eslint-disable max-statements, max-depth, complexity */\n/*\n * Note: for better performance, this function assumes that both oldProps and newProps\n inherit the same prototype (defaultProps). That is, if neither object contains own\n property <key>, assume `oldProps.<key>` and `newProps.<key>` are equal.\n */\nexport function compareProps({\n newProps,\n oldProps,\n ignoreProps = {},\n propTypes = {},\n triggerName = 'props'\n} = {}) {\n // shallow equality => deep equality\n if (oldProps === newProps) {\n return null;\n }\n\n // TODO - do we need these checks? Should never happen...\n if (typeof newProps !== 'object' || newProps === null) {\n return `${triggerName} changed shallowly`;\n }\n\n if (typeof oldProps !== 'object' || oldProps === null) {\n return `${triggerName} changed shallowly`;\n }\n\n // Compare explicitly defined new props against old/default values\n for (const key of Object.keys(newProps)) {\n if (!(key in ignoreProps)) {\n if (!(key in oldProps)) {\n return `${triggerName}.${key} added`;\n }\n const changed = comparePropValues(newProps[key], oldProps[key], propTypes[key]);\n if (changed) {\n return `${triggerName}.${key} ${changed}`;\n }\n }\n }\n\n // Test if any old props have been dropped\n for (const key of Object.keys(oldProps)) {\n if (!(key in ignoreProps)) {\n if (!(key in newProps)) {\n return `${triggerName}.${key} dropped`;\n }\n if (!Object.hasOwnProperty.call(newProps, key)) {\n // Compare dropped old prop against default value\n const changed = comparePropValues(newProps[key], oldProps[key], propTypes[key]);\n if (changed) {\n return `${triggerName}.${key} ${changed}`;\n }\n }\n }\n }\n\n return null;\n}\n/* eslint-enable max-statements, max-depth, complexity */\n\n// HELPERS\nfunction comparePropValues(newProp, oldProp, propType) {\n // If prop type has an equal function, invoke it\n let equal = propType && propType.equal;\n if (equal && !equal(newProp, oldProp, propType)) {\n return 'changed deeply';\n }\n\n if (!equal) {\n // If object has an equals function, invoke it\n equal = newProp && oldProp && newProp.equals;\n if (equal && !equal.call(newProp, oldProp)) {\n return 'changed deeply';\n }\n }\n\n if (!equal && oldProp !== newProp) {\n return 'changed shallowly';\n }\n\n return null;\n}\n\n// The comparison of the data prop requires special handling\n// the dataComparator should be used if supplied\nfunction diffDataProps(props, oldProps) {\n if (oldProps === null) {\n return 'oldProps is null, initial diff';\n }\n\n let dataChanged = null;\n // Support optional app defined comparison of data\n const {dataComparator, _dataDiff} = props;\n if (dataComparator) {\n if (!dataComparator(props.data, oldProps.data)) {\n dataChanged = 'Data comparator detected a change';\n }\n // Otherwise, do a shallow equal on props\n } else if (props.data !== oldProps.data) {\n dataChanged = 'A new data container was supplied';\n }\n if (dataChanged && _dataDiff) {\n dataChanged = _dataDiff(props.data, oldProps.data) || dataChanged;\n }\n\n return dataChanged;\n}\n\n// Checks if any update triggers have changed\n// also calls callback to invalidate attributes accordingly.\nfunction diffUpdateTriggers(props, oldProps) {\n if (oldProps === null) {\n return 'oldProps is null, initial diff';\n }\n\n // If the 'all' updateTrigger fires, ignore testing others\n if ('all' in props.updateTriggers) {\n const diffReason = diffUpdateTrigger(props, oldProps, 'all');\n if (diffReason) {\n return {all: true};\n }\n }\n\n const triggerChanged = {};\n let reason = false;\n // If the 'all' updateTrigger didn't fire, need to check all others\n for (const triggerName in props.updateTriggers) {\n if (triggerName !== 'all') {\n const diffReason = diffUpdateTrigger(props, oldProps, triggerName);\n if (diffReason) {\n triggerChanged[triggerName] = true;\n reason = triggerChanged;\n }\n }\n }\n\n return reason;\n}\n\n// Returns true if any extensions have changed\nfunction diffExtensions(props, oldProps) {\n if (oldProps === null) {\n return 'oldProps is null, initial diff';\n }\n\n const oldExtensions = oldProps.extensions;\n const {extensions} = props;\n\n if (extensions === oldExtensions) {\n return false;\n }\n if (extensions.length !== oldExtensions.length) {\n return true;\n }\n for (let i = 0; i < extensions.length; i++) {\n if (!extensions[i].equals(oldExtensions[i])) {\n return true;\n }\n }\n return false;\n}\n\nfunction diffUpdateTrigger(props, oldProps, triggerName) {\n let newTriggers = props.updateTriggers[triggerName];\n newTriggers = newTriggers === undefined || newTriggers === null ? {} : newTriggers;\n let oldTriggers = oldProps.updateTriggers[triggerName];\n oldTriggers = oldTriggers === undefined || oldTriggers === null ? {} : oldTriggers;\n const diffReason = compareProps({\n oldProps: oldTriggers,\n newProps: newTriggers,\n triggerName\n });\n return diffReason;\n}\n\nfunction getPropTypes(props) {\n const layer = props[COMPONENT];\n const LayerType = layer && layer.constructor;\n return LayerType ? LayerType._propTypes : {};\n}\n","import Transition from '../transitions/transition';\n\nconst noop = () => {};\n\nexport const TRANSITION_EVENTS = {\n BREAK: 1,\n SNAP_TO_END: 2,\n IGNORE: 3\n};\n\nconst DEFAULT_PROPS = {\n transitionEasing: t => t,\n transitionInterruption: TRANSITION_EVENTS.BREAK,\n onTransitionStart: noop,\n onTransitionInterrupt: noop,\n onTransitionEnd: noop\n};\n\nexport default class TransitionManager {\n constructor(ControllerState, props = {}) {\n this.ControllerState = ControllerState;\n this.props = {...DEFAULT_PROPS, ...props};\n this.propsInTransition = null;\n this.transition = new Transition(props.timeline);\n\n this.onViewStateChange = props.onViewStateChange || noop;\n this.onStateChange = props.onStateChange || noop;\n\n this._onTransitionUpdate = this._onTransitionUpdate.bind(this);\n }\n\n finalize() {\n this.transition.cancel();\n }\n\n // Returns current transitioned viewport.\n getViewportInTransition() {\n return this.propsInTransition;\n }\n\n // Process the vewiport change, either ignore or trigger a new transition.\n // Return true if a new transition is triggered, false otherwise.\n processViewStateChange(nextProps) {\n let transitionTriggered = false;\n const currentProps = this.props;\n // Set this.props here as '_triggerTransition' calls '_updateViewport' that uses this.props.\n nextProps = {...DEFAULT_PROPS, ...nextProps};\n this.props = nextProps;\n\n // NOTE: Be cautious re-ordering statements in this function.\n if (this._shouldIgnoreViewportChange(currentProps, nextProps)) {\n return transitionTriggered;\n }\n\n if (this._isTransitionEnabled(nextProps)) {\n const {interruption, endProps} = this.transition.settings;\n const startProps = {\n ...currentProps,\n ...(interruption === TRANSITION_EVENTS.SNAP_TO_END\n ? endProps\n : this.propsInTransition || currentProps)\n };\n\n this._triggerTransition(startProps, nextProps);\n\n transitionTriggered = true;\n } else {\n this.transition.cancel();\n }\n\n return transitionTriggered;\n }\n\n updateTransition() {\n this.transition.update();\n }\n\n // Helper methods\n\n _isTransitionEnabled(props) {\n const {transitionDuration, transitionInterpolator} = props;\n return (\n (transitionDuration > 0 || transitionDuration === 'auto') && Boolean(transitionInterpolator)\n );\n }\n\n _isUpdateDueToCurrentTransition(props) {\n if (this.transition.inProgress) {\n return this.transition.settings.interpolator.arePropsEqual(props, this.propsInTransition);\n }\n return false;\n }\n\n _shouldIgnoreViewportChange(currentProps, nextProps) {\n if (this.transition.inProgress) {\n // Ignore update if it is requested to be ignored\n return (\n this.transition.settings.interruption === TRANSITION_EVENTS.IGNORE ||\n // Ignore update if it is due to current active transition.\n this._isUpdateDueToCurrentTransition(nextProps)\n );\n } else if (this._isTransitionEnabled(nextProps)) {\n // Ignore if none of the viewport props changed.\n return nextProps.transitionInterpolator.arePropsEqual(currentProps, nextProps);\n }\n return true;\n }\n\n _triggerTransition(startProps, endProps) {\n const startViewstate = new this.ControllerState(startProps);\n const endViewStateProps = new this.ControllerState(endProps).shortestPathFrom(startViewstate);\n\n // update transitionDuration for 'auto' mode\n const {transitionInterpolator} = endProps;\n const duration = transitionInterpolator.getDuration\n ? transitionInterpolator.getDuration(startProps, endProps)\n : endProps.transitionDuration;\n\n if (duration === 0) {\n return;\n }\n\n const initialProps = endProps.transitionInterpolator.initializeProps(\n startProps,\n endViewStateProps\n );\n\n this.propsInTransition = {};\n this.duration = duration;\n this.transition.start({\n duration,\n easing: endProps.transitionEasing,\n interpolator: endProps.transitionInterpolator,\n interruption: endProps.transitionInterruption,\n\n startProps: initialProps.start,\n endProps: initialProps.end,\n\n onStart: endProps.onTransitionStart,\n onUpdate: this._onTransitionUpdate,\n onInterrupt: this._onTransitionEnd(endProps.onTransitionInterrupt),\n onEnd: this._onTransitionEnd(endProps.onTransitionEnd)\n });\n\n this.onStateChange({inTransition: true});\n\n this.updateTransition();\n }\n\n _onTransitionEnd(callback) {\n return transition => {\n this.propsInTransition = null;\n\n this.onStateChange({\n inTransition: false,\n isZooming: false,\n isPanning: false,\n isRotating: false\n });\n\n callback(transition);\n };\n }\n\n _onTransitionUpdate(transition) {\n // NOTE: Be cautious re-ordering statements in this function.\n const {\n time,\n settings: {interpolator, startProps, endProps, duration, easing}\n } = transition;\n const t = easing(time / duration);\n const viewport = interpolator.interpolateProps(startProps, endProps, t);\n\n // This gurantees all props (e.g. bearing, longitude) are normalized\n // So when viewports are compared they are in same range.\n this.propsInTransition = new this.ControllerState({\n ...this.props,\n ...viewport\n }).getViewportProps();\n\n this.onViewStateChange({\n viewState: this.propsInTransition,\n oldViewState: this.props\n });\n }\n}\n","import TransitionInterpolator from './transition-interpolator';\nimport {lerp} from 'math.gl';\n\nconst DEFAULT_PROPS = ['longitude', 'latitude', 'zoom', 'bearing', 'pitch'];\nconst DEFAULT_REQUIRED_PROPS = ['longitude', 'latitude', 'zoom'];\n\n/**\n * Performs linear interpolation of two view states.\n */\nexport default class LinearInterpolator extends TransitionInterpolator {\n /**\n * @param {Object} opts\n * @param {Array} opts.transitionProps - list of props to apply linear transition to.\n * @param {Array} opts.around - a screen point to zoom/rotate around.\n * @param {Function} opts.makeViewport - construct a viewport instance with given props.\n */\n constructor(opts = {}) {\n // Backward compatibility\n const transitionProps = Array.isArray(opts) ? opts : opts.transitionProps;\n super(\n transitionProps || {\n compare: DEFAULT_PROPS,\n extract: DEFAULT_PROPS,\n required: DEFAULT_REQUIRED_PROPS\n }\n );\n this.opts = opts;\n }\n\n initializeProps(startProps, endProps) {\n const result = super.initializeProps(startProps, endProps);\n\n const {makeViewport, around} = this.opts;\n if (makeViewport && around) {\n const startViewport = makeViewport(startProps);\n const endViewport = makeViewport(endProps);\n const aroundPosition = startViewport.unproject(around);\n result.start.around = around;\n Object.assign(result.end, {\n around: endViewport.project(aroundPosition),\n aroundPosition,\n width: endProps.width,\n height: endProps.height\n });\n }\n\n return result;\n }\n\n interpolateProps(startProps, endProps, t) {\n const propsInTransition = {};\n for (const key of this._propsToExtract) {\n propsInTransition[key] = lerp(startProps[key] || 0, endProps[key] || 0, t);\n }\n\n if (endProps.aroundPosition) {\n // Linear transition should be performed in common space\n const viewport = this.opts.makeViewport({...endProps, ...propsInTransition});\n Object.assign(\n propsInTransition,\n viewport.panByPosition(\n endProps.aroundPosition,\n // anchor point in current screen coordinates\n lerp(startProps.around, endProps.around, t)\n )\n );\n }\n return propsInTransition;\n }\n}\n","var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// ================= Transition =================\n// Event wrapper. Copy from react source code\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n prefixes['ms' + styleProp] = 'MS' + eventName;\n prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();\n\n return prefixes;\n}\n\nexport function getVendorPrefixes(domSupport, win) {\n var prefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n\n if (domSupport) {\n if (!('AnimationEvent' in win)) {\n delete prefixes.animationend.animation;\n }\n\n if (!('TransitionEvent' in win)) {\n delete prefixes.transitionend.transition;\n }\n }\n\n return prefixes;\n}\n\nvar vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {});\n\nvar style = {};\n\nif (canUseDOM) {\n style = document.createElement('div').style;\n}\n\nvar prefixedEventNames = {};\n\nexport function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n if (prefixMap) {\n var stylePropList = Object.keys(prefixMap);\n var len = stylePropList.length;\n for (var i = 0; i < len; i += 1) {\n var styleProp = stylePropList[i];\n if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {\n prefixedEventNames[eventName] = prefixMap[styleProp];\n return prefixedEventNames[eventName];\n }\n }\n }\n\n return '';\n}\n\nexport var animationEndName = getVendorPrefixedEventName('animationend');\nexport var transitionEndName = getVendorPrefixedEventName('transitionend');\nexport var supportTransition = !!(animationEndName && transitionEndName);\n\nexport function getTransitionName(transitionName, transitionType) {\n if (!transitionName) return null;\n\n if (typeof transitionName === 'object') {\n var type = transitionType.replace(/-\\w/g, function (match) {\n return match[1].toUpperCase();\n });\n return transitionName[type];\n }\n\n return transitionName + '-' + transitionType;\n}","import _defineProperty from 'babel-runtime/helpers/defineProperty';\nimport _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\n/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { polyfill } from 'react-lifecycles-compat';\nimport findDOMNode from 'rc-util/es/Dom/findDOMNode';\nimport classNames from 'classnames';\nimport raf from 'raf';\nimport { getTransitionName, animationEndName, transitionEndName, supportTransition } from './util/motion';\n\nvar STATUS_NONE = 'none';\nvar STATUS_APPEAR = 'appear';\nvar STATUS_ENTER = 'enter';\nvar STATUS_LEAVE = 'leave';\n\nexport var MotionPropTypes = {\n eventProps: PropTypes.object, // Internal usage. Only pass by CSSMotionList\n visible: PropTypes.bool,\n children: PropTypes.func,\n motionName: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n motionAppear: PropTypes.bool,\n motionEnter: PropTypes.bool,\n motionLeave: PropTypes.bool,\n motionLeaveImmediately: PropTypes.bool, // Trigger leave motion immediately\n removeOnLeave: PropTypes.bool,\n leavedClassName: PropTypes.string,\n onAppearStart: PropTypes.func,\n onAppearActive: PropTypes.func,\n onAppearEnd: PropTypes.func,\n onEnterStart: PropTypes.func,\n onEnterActive: PropTypes.func,\n onEnterEnd: PropTypes.func,\n onLeaveStart: PropTypes.func,\n onLeaveActive: PropTypes.func,\n onLeaveEnd: PropTypes.func\n};\n\n/**\n * `transitionSupport` is used for none transition test case.\n * Default we use browser transition event support check.\n */\nexport function genCSSMotion(config) {\n var transitionSupport = config;\n var forwardRef = !!React.forwardRef;\n\n if (typeof config === 'object') {\n transitionSupport = config.transitionSupport;\n forwardRef = 'forwardRef' in config ? config.forwardRef : forwardRef;\n }\n\n function isSupportTransition(props) {\n return !!(props.motionName && transitionSupport);\n }\n\n var CSSMotion = function (_React$Component) {\n _inherits(CSSMotion, _React$Component);\n\n function CSSMotion() {\n _classCallCheck(this, CSSMotion);\n\n var _this = _possibleConstructorReturn(this, (CSSMotion.__proto__ || Object.getPrototypeOf(CSSMotion)).call(this));\n\n _this.onDomUpdate = function () {\n var _this$state = _this.state,\n status = _this$state.status,\n newStatus = _this$state.newStatus;\n var _this$props = _this.props,\n onAppearStart = _this$props.onAppearStart,\n onEnterStart = _this$props.onEnterStart,\n onLeaveStart = _this$props.onLeaveStart,\n onAppearActive = _this$props.onAppearActive,\n onEnterActive = _this$props.onEnterActive,\n onLeaveActive = _this$props.onLeaveActive,\n motionAppear = _this$props.motionAppear,\n motionEnter = _this$props.motionEnter,\n motionLeave = _this$props.motionLeave;\n\n\n if (!isSupportTransition(_this.props)) {\n return;\n }\n\n // Event injection\n var $ele = _this.getElement();\n if (_this.$cacheEle !== $ele) {\n _this.removeEventListener(_this.$cacheEle);\n _this.addEventListener($ele);\n _this.$cacheEle = $ele;\n }\n\n // Init status\n if (newStatus && status === STATUS_APPEAR && motionAppear) {\n _this.updateStatus(onAppearStart, null, null, function () {\n _this.updateActiveStatus(onAppearActive, STATUS_APPEAR);\n });\n } else if (newStatus && status === STATUS_ENTER && motionEnter) {\n _this.updateStatus(onEnterStart, null, null, function () {\n _this.updateActiveStatus(onEnterActive, STATUS_ENTER);\n });\n } else if (newStatus && status === STATUS_LEAVE && motionLeave) {\n _this.updateStatus(onLeaveStart, null, null, function () {\n _this.updateActiveStatus(onLeaveActive, STATUS_LEAVE);\n });\n }\n };\n\n _this.onMotionEnd = function (event) {\n var _this$state2 = _this.state,\n status = _this$state2.status,\n statusActive = _this$state2.statusActive;\n var _this$props2 = _this.props,\n onAppearEnd = _this$props2.onAppearEnd,\n onEnterEnd = _this$props2.onEnterEnd,\n onLeaveEnd = _this$props2.onLeaveEnd;\n\n if (status === STATUS_APPEAR && statusActive) {\n _this.updateStatus(onAppearEnd, { status: STATUS_NONE }, event);\n } else if (status === STATUS_ENTER && statusActive) {\n _this.updateStatus(onEnterEnd, { status: STATUS_NONE }, event);\n } else if (status === STATUS_LEAVE && statusActive) {\n _this.updateStatus(onLeaveEnd, { status: STATUS_NONE }, event);\n }\n };\n\n _this.setNodeRef = function (node) {\n var internalRef = _this.props.internalRef;\n\n _this.node = node;\n\n if (typeof internalRef === 'function') {\n internalRef(node);\n } else if (internalRef && 'current' in internalRef) {\n internalRef.current = node;\n }\n };\n\n _this.getElement = function () {\n return findDOMNode(_this.node || _this);\n };\n\n _this.addEventListener = function ($ele) {\n if (!$ele) return;\n\n $ele.addEventListener(transitionEndName, _this.onMotionEnd);\n $ele.addEventListener(animationEndName, _this.onMotionEnd);\n };\n\n _this.removeEventListener = function ($ele) {\n if (!$ele) return;\n\n $ele.removeEventListener(transitionEndName, _this.onMotionEnd);\n $ele.removeEventListener(animationEndName, _this.onMotionEnd);\n };\n\n _this.updateStatus = function (styleFunc, additionalState, event, callback) {\n var statusStyle = styleFunc ? styleFunc(_this.getElement(), event) : null;\n\n if (statusStyle === false || _this._destroyed) return;\n\n var nextStep = void 0;\n if (callback) {\n nextStep = function nextStep() {\n _this.nextFrame(callback);\n };\n }\n\n _this.setState(_extends({\n statusStyle: typeof statusStyle === 'object' ? statusStyle : null,\n newStatus: false\n }, additionalState), nextStep); // Trigger before next frame & after `componentDidMount`\n };\n\n _this.updateActiveStatus = function (styleFunc, currentStatus) {\n // `setState` use `postMessage` to trigger at the end of frame.\n // Let's use requestAnimationFrame to update new state in next frame.\n _this.nextFrame(function () {\n var status = _this.state.status;\n\n if (status !== currentStatus) return;\n\n _this.updateStatus(styleFunc, { statusActive: true });\n });\n };\n\n _this.nextFrame = function (func) {\n _this.cancelNextFrame();\n _this.raf = raf(func);\n };\n\n _this.cancelNextFrame = function () {\n if (_this.raf) {\n raf.cancel(_this.raf);\n _this.raf = null;\n }\n };\n\n _this.state = {\n status: STATUS_NONE,\n statusActive: false,\n newStatus: false,\n statusStyle: null\n };\n _this.$cacheEle = null;\n _this.node = null;\n _this.raf = null;\n return _this;\n }\n\n _createClass(CSSMotion, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.onDomUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.onDomUpdate();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this._destroyed = true;\n this.removeEventListener(this.$cacheEle);\n this.cancelNextFrame();\n }\n }, {\n key: 'render',\n value: function render() {\n var _classNames;\n\n var _state = this.state,\n status = _state.status,\n statusActive = _state.statusActive,\n statusStyle = _state.statusStyle;\n var _props = this.props,\n children = _props.children,\n motionName = _props.motionName,\n visible = _props.visible,\n removeOnLeave = _props.removeOnLeave,\n leavedClassName = _props.leavedClassName,\n eventProps = _props.eventProps;\n\n\n if (!children) return null;\n\n if (status === STATUS_NONE || !isSupportTransition(this.props)) {\n if (visible) {\n return children(_extends({}, eventProps), this.setNodeRef);\n } else if (!removeOnLeave) {\n return children(_extends({}, eventProps, { className: leavedClassName }), this.setNodeRef);\n }\n\n return null;\n }\n\n return children(_extends({}, eventProps, {\n className: classNames((_classNames = {}, _defineProperty(_classNames, getTransitionName(motionName, status), status !== STATUS_NONE), _defineProperty(_classNames, getTransitionName(motionName, status + '-active'), status !== STATUS_NONE && statusActive), _defineProperty(_classNames, motionName, typeof motionName === 'string'), _classNames)),\n style: statusStyle\n }), this.setNodeRef);\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(props, _ref) {\n var prevProps = _ref.prevProps,\n prevStatus = _ref.status;\n\n if (!isSupportTransition(props)) return {};\n\n var visible = props.visible,\n motionAppear = props.motionAppear,\n motionEnter = props.motionEnter,\n motionLeave = props.motionLeave,\n motionLeaveImmediately = props.motionLeaveImmediately;\n\n var newState = {\n prevProps: props\n };\n\n // Clean up status if prop set to false\n if (prevStatus === STATUS_APPEAR && !motionAppear || prevStatus === STATUS_ENTER && !motionEnter || prevStatus === STATUS_LEAVE && !motionLeave) {\n newState.status = STATUS_NONE;\n newState.statusActive = false;\n newState.newStatus = false;\n }\n\n // Appear\n if (!prevProps && visible && motionAppear) {\n newState.status = STATUS_APPEAR;\n newState.statusActive = false;\n newState.newStatus = true;\n }\n\n // Enter\n if (prevProps && !prevProps.visible && visible && motionEnter) {\n newState.status = STATUS_ENTER;\n newState.statusActive = false;\n newState.newStatus = true;\n }\n\n // Leave\n if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) {\n newState.status = STATUS_LEAVE;\n newState.statusActive = false;\n newState.newStatus = true;\n }\n\n return newState;\n }\n }]);\n\n return CSSMotion;\n }(React.Component);\n\n CSSMotion.propTypes = _extends({}, MotionPropTypes, {\n\n internalRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func])\n });\n CSSMotion.defaultProps = {\n visible: true,\n motionEnter: true,\n motionAppear: true,\n motionLeave: true,\n removeOnLeave: true\n };\n\n\n polyfill(CSSMotion);\n\n if (!forwardRef) {\n return CSSMotion;\n }\n\n return React.forwardRef(function (props, ref) {\n return React.createElement(CSSMotion, _extends({ internalRef: ref }, props));\n });\n}\n\nexport default genCSSMotion(supportTransition);","import _defineProperty from 'babel-runtime/helpers/defineProperty';\nimport _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';\nimport _extends from 'babel-runtime/helpers/extends';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-animate/es/CSSMotion';\nimport toArray from 'rc-util/es/Children/toArray';\nimport { polyfill } from 'react-lifecycles-compat';\nimport { nodeContextTypes } from './contextTypes';\nimport { getNodeChildren, getDataAndAria, mapChildren, warnOnlyTreeNode } from './util';\n\nvar ICON_OPEN = 'open';\nvar ICON_CLOSE = 'close';\n\nvar defaultTitle = '---';\n\nvar TreeNode = function (_React$Component) {\n _inherits(TreeNode, _React$Component);\n\n function TreeNode(props) {\n _classCallCheck(this, TreeNode);\n\n var _this = _possibleConstructorReturn(this, (TreeNode.__proto__ || Object.getPrototypeOf(TreeNode)).call(this, props));\n\n _initialiseProps.call(_this);\n\n _this.state = {\n dragNodeHighlight: false\n };\n return _this;\n }\n\n _createClass(TreeNode, [{\n key: 'getChildContext',\n value: function getChildContext() {\n return _extends({}, this.context, {\n rcTreeNode: {\n // onUpCheckConduct: this.onUpCheckConduct,\n }\n });\n }\n\n // Isomorphic needn't load data in server side\n\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n var eventKey = this.props.eventKey;\n var registerTreeNode = this.context.rcTree.registerTreeNode;\n\n\n this.syncLoadData(this.props);\n\n registerTreeNode(eventKey, this);\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.syncLoadData(this.props);\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n var eventKey = this.props.eventKey;\n var registerTreeNode = this.context.rcTree.registerTreeNode;\n\n registerTreeNode(eventKey, null);\n }\n\n // Disabled item still can be switch\n\n\n // Drag usage\n\n }, {\n key: 'isSelectable',\n value: function isSelectable() {\n var selectable = this.props.selectable;\n var treeSelectable = this.context.rcTree.selectable;\n\n // Ignore when selectable is undefined or null\n\n if (typeof selectable === 'boolean') {\n return selectable;\n }\n\n return treeSelectable;\n }\n\n // Load data to avoid default expanded tree without data\n\n\n // Switcher\n\n\n // Checkbox\n\n\n // Icon + Title\n\n\n // Children list wrapped with `Animation`\n\n }, {\n key: 'render',\n value: function render() {\n var _classNames;\n\n var loading = this.props.loading;\n\n var _props = this.props,\n className = _props.className,\n style = _props.style,\n dragOver = _props.dragOver,\n dragOverGapTop = _props.dragOverGapTop,\n dragOverGapBottom = _props.dragOverGapBottom,\n isLeaf = _props.isLeaf,\n expanded = _props.expanded,\n selected = _props.selected,\n checked = _props.checked,\n halfChecked = _props.halfChecked,\n otherProps = _objectWithoutProperties(_props, ['className', 'style', 'dragOver', 'dragOverGapTop', 'dragOverGapBottom', 'isLeaf', 'expanded', 'selected', 'checked', 'halfChecked']);\n\n var _context$rcTree = this.context.rcTree,\n prefixCls = _context$rcTree.prefixCls,\n filterTreeNode = _context$rcTree.filterTreeNode,\n draggable = _context$rcTree.draggable;\n\n var disabled = this.isDisabled();\n var dataOrAriaAttributeProps = getDataAndAria(otherProps);\n\n return React.createElement(\n 'li',\n _extends({\n className: classNames(className, (_classNames = {}, _defineProperty(_classNames, prefixCls + '-treenode-disabled', disabled), _defineProperty(_classNames, prefixCls + '-treenode-switcher-' + (expanded ? 'open' : 'close'), !isLeaf), _defineProperty(_classNames, prefixCls + '-treenode-checkbox-checked', checked), _defineProperty(_classNames, prefixCls + '-treenode-checkbox-indeterminate', halfChecked), _defineProperty(_classNames, prefixCls + '-treenode-selected', selected), _defineProperty(_classNames, prefixCls + '-treenode-loading', loading), _defineProperty(_classNames, 'drag-over', !disabled && dragOver), _defineProperty(_classNames, 'drag-over-gap-top', !disabled && dragOverGapTop), _defineProperty(_classNames, 'drag-over-gap-bottom', !disabled && dragOverGapBottom), _defineProperty(_classNames, 'filter-node', filterTreeNode && filterTreeNode(this)), _classNames)),\n\n style: style,\n\n role: 'treeitem',\n\n onDragEnter: draggable ? this.onDragEnter : undefined,\n onDragOver: draggable ? this.onDragOver : undefined,\n onDragLeave: draggable ? this.onDragLeave : undefined,\n onDrop: draggable ? this.onDrop : undefined,\n onDragEnd: draggable ? this.onDragEnd : undefined\n }, dataOrAriaAttributeProps),\n this.renderSwitcher(),\n this.renderCheckbox(),\n this.renderSelector(),\n this.renderChildren()\n );\n }\n }]);\n\n return TreeNode;\n}(React.Component);\n\nTreeNode.propTypes = {\n eventKey: PropTypes.string, // Pass by parent `cloneElement`\n prefixCls: PropTypes.string,\n className: PropTypes.string,\n style: PropTypes.object,\n root: PropTypes.object,\n onSelect: PropTypes.func,\n\n // By parent\n expanded: PropTypes.bool,\n selected: PropTypes.bool,\n checked: PropTypes.bool,\n loaded: PropTypes.bool,\n loading: PropTypes.bool,\n halfChecked: PropTypes.bool,\n children: PropTypes.node,\n title: PropTypes.node,\n pos: PropTypes.string,\n dragOver: PropTypes.bool,\n dragOverGapTop: PropTypes.bool,\n dragOverGapBottom: PropTypes.bool,\n\n // By user\n isLeaf: PropTypes.bool,\n checkable: PropTypes.bool,\n selectable: PropTypes.bool,\n disabled: PropTypes.bool,\n disableCheckbox: PropTypes.bool,\n icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n switcherIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])\n};\nTreeNode.contextTypes = nodeContextTypes;\nTreeNode.childContextTypes = nodeContextTypes;\nTreeNode.defaultProps = {\n title: defaultTitle\n};\n\nvar _initialiseProps = function _initialiseProps() {\n var _this2 = this;\n\n this.onSelectorClick = function (e) {\n // Click trigger before select/check operation\n var onNodeClick = _this2.context.rcTree.onNodeClick;\n\n onNodeClick(e, _this2);\n\n if (_this2.isSelectable()) {\n _this2.onSelect(e);\n } else {\n _this2.onCheck(e);\n }\n };\n\n this.onSelectorDoubleClick = function (e) {\n var onNodeDoubleClick = _this2.context.rcTree.onNodeDoubleClick;\n\n onNodeDoubleClick(e, _this2);\n };\n\n this.onSelect = function (e) {\n if (_this2.isDisabled()) return;\n\n var onNodeSelect = _this2.context.rcTree.onNodeSelect;\n\n e.preventDefault();\n onNodeSelect(e, _this2);\n };\n\n this.onCheck = function (e) {\n if (_this2.isDisabled()) return;\n\n var _props2 = _this2.props,\n disableCheckbox = _props2.disableCheckbox,\n checked = _props2.checked;\n var onNodeCheck = _this2.context.rcTree.onNodeCheck;\n\n\n if (!_this2.isCheckable() || disableCheckbox) return;\n\n e.preventDefault();\n var targetChecked = !checked;\n onNodeCheck(e, _this2, targetChecked);\n };\n\n this.onMouseEnter = function (e) {\n var onNodeMouseEnter = _this2.context.rcTree.onNodeMouseEnter;\n\n onNodeMouseEnter(e, _this2);\n };\n\n this.onMouseLeave = function (e) {\n var onNodeMouseLeave = _this2.context.rcTree.onNodeMouseLeave;\n\n onNodeMouseLeave(e, _this2);\n };\n\n this.onContextMenu = function (e) {\n var onNodeContextMenu = _this2.context.rcTree.onNodeContextMenu;\n\n onNodeContextMenu(e, _this2);\n };\n\n this.onDragStart = function (e) {\n var onNodeDragStart = _this2.context.rcTree.onNodeDragStart;\n\n\n e.stopPropagation();\n _this2.setState({\n dragNodeHighlight: true\n });\n onNodeDragStart(e, _this2);\n\n try {\n // ie throw error\n // firefox-need-it\n e.dataTransfer.setData('text/plain', '');\n } catch (error) {\n // empty\n }\n };\n\n this.onDragEnter = function (e) {\n var onNodeDragEnter = _this2.context.rcTree.onNodeDragEnter;\n\n\n e.preventDefault();\n e.stopPropagation();\n onNodeDragEnter(e, _this2);\n };\n\n this.onDragOver = function (e) {\n var onNodeDragOver = _this2.context.rcTree.onNodeDragOver;\n\n\n e.preventDefault();\n e.stopPropagation();\n onNodeDragOver(e, _this2);\n };\n\n this.onDragLeave = function (e) {\n var onNodeDragLeave = _this2.context.rcTree.onNodeDragLeave;\n\n\n e.stopPropagation();\n onNodeDragLeave(e, _this2);\n };\n\n this.onDragEnd = function (e) {\n var onNodeDragEnd = _this2.context.rcTree.onNodeDragEnd;\n\n\n e.stopPropagation();\n _this2.setState({\n dragNodeHighlight: false\n });\n onNodeDragEnd(e, _this2);\n };\n\n this.onDrop = function (e) {\n var onNodeDrop = _this2.context.rcTree.onNodeDrop;\n\n\n e.preventDefault();\n e.stopPropagation();\n _this2.setState({\n dragNodeHighlight: false\n });\n onNodeDrop(e, _this2);\n };\n\n this.onExpand = function (e) {\n var onNodeExpand = _this2.context.rcTree.onNodeExpand;\n\n onNodeExpand(e, _this2);\n };\n\n this.setSelectHandle = function (node) {\n _this2.selectHandle = node;\n };\n\n this.getNodeChildren = function () {\n var children = _this2.props.children;\n\n var originList = toArray(children).filter(function (node) {\n return node;\n });\n var targetList = getNodeChildren(originList);\n\n if (originList.length !== targetList.length) {\n warnOnlyTreeNode();\n }\n\n return targetList;\n };\n\n this.getNodeState = function () {\n var expanded = _this2.props.expanded;\n\n\n if (_this2.isLeaf()) {\n return null;\n }\n\n return expanded ? ICON_OPEN : ICON_CLOSE;\n };\n\n this.isLeaf = function () {\n var _props3 = _this2.props,\n isLeaf = _props3.isLeaf,\n loaded = _props3.loaded;\n var loadData = _this2.context.rcTree.loadData;\n\n\n var hasChildren = _this2.getNodeChildren().length !== 0;\n\n if (isLeaf === false) {\n return false;\n }\n\n return isLeaf || !loadData && !hasChildren || loadData && loaded && !hasChildren;\n };\n\n this.isDisabled = function () {\n var disabled = _this2.props.disabled;\n var treeDisabled = _this2.context.rcTree.disabled;\n\n // Follow the logic of Selectable\n\n if (disabled === false) {\n return false;\n }\n\n return !!(treeDisabled || disabled);\n };\n\n this.isCheckable = function () {\n var checkable = _this2.props.checkable;\n var treeCheckable = _this2.context.rcTree.checkable;\n\n // Return false if tree or treeNode is not checkable\n\n if (!treeCheckable || checkable === false) return false;\n return treeCheckable;\n };\n\n this.syncLoadData = function (props) {\n var expanded = props.expanded,\n loading = props.loading,\n loaded = props.loaded;\n var _context$rcTree2 = _this2.context.rcTree,\n loadData = _context$rcTree2.loadData,\n onNodeLoad = _context$rcTree2.onNodeLoad;\n\n\n if (loading) return;\n\n // read from state to avoid loadData at same time\n if (loadData && expanded && !_this2.isLeaf()) {\n // We needn't reload data when has children in sync logic\n // It's only needed in node expanded\n var hasChildren = _this2.getNodeChildren().length !== 0;\n if (!hasChildren && !loaded) {\n onNodeLoad(_this2);\n }\n }\n };\n\n this.renderSwitcher = function () {\n var _props4 = _this2.props,\n expanded = _props4.expanded,\n switcherIconFromProps = _props4.switcherIcon;\n var _context$rcTree3 = _this2.context.rcTree,\n prefixCls = _context$rcTree3.prefixCls,\n switcherIconFromCtx = _context$rcTree3.switcherIcon;\n\n\n var switcherIcon = switcherIconFromProps || switcherIconFromCtx;\n\n if (_this2.isLeaf()) {\n return React.createElement(\n 'span',\n { className: classNames(prefixCls + '-switcher', prefixCls + '-switcher-noop') },\n typeof switcherIcon === 'function' ? switcherIcon(_extends({}, _this2.props, { isLeaf: true })) : switcherIcon\n );\n }\n\n var switcherCls = classNames(prefixCls + '-switcher', prefixCls + '-switcher_' + (expanded ? ICON_OPEN : ICON_CLOSE));\n return React.createElement(\n 'span',\n { onClick: _this2.onExpand, className: switcherCls },\n typeof switcherIcon === 'function' ? switcherIcon(_extends({}, _this2.props, { isLeaf: false })) : switcherIcon\n );\n };\n\n this.renderCheckbox = function () {\n var _props5 = _this2.props,\n checked = _props5.checked,\n halfChecked = _props5.halfChecked,\n disableCheckbox = _props5.disableCheckbox;\n var prefixCls = _this2.context.rcTree.prefixCls;\n\n var disabled = _this2.isDisabled();\n var checkable = _this2.isCheckable();\n\n if (!checkable) return null;\n\n // [Legacy] Custom element should be separate with `checkable` in future\n var $custom = typeof checkable !== 'boolean' ? checkable : null;\n\n return React.createElement(\n 'span',\n {\n className: classNames(prefixCls + '-checkbox', checked && prefixCls + '-checkbox-checked', !checked && halfChecked && prefixCls + '-checkbox-indeterminate', (disabled || disableCheckbox) && prefixCls + '-checkbox-disabled'),\n onClick: _this2.onCheck\n },\n $custom\n );\n };\n\n this.renderIcon = function () {\n var loading = _this2.props.loading;\n var prefixCls = _this2.context.rcTree.prefixCls;\n\n\n return React.createElement('span', {\n className: classNames(prefixCls + '-iconEle', prefixCls + '-icon__' + (_this2.getNodeState() || 'docu'), loading && prefixCls + '-icon_loading')\n });\n };\n\n this.renderSelector = function () {\n var dragNodeHighlight = _this2.state.dragNodeHighlight;\n var _props6 = _this2.props,\n title = _props6.title,\n selected = _props6.selected,\n icon = _props6.icon,\n loading = _props6.loading;\n var _context$rcTree4 = _this2.context.rcTree,\n prefixCls = _context$rcTree4.prefixCls,\n showIcon = _context$rcTree4.showIcon,\n treeIcon = _context$rcTree4.icon,\n draggable = _context$rcTree4.draggable,\n loadData = _context$rcTree4.loadData;\n\n var disabled = _this2.isDisabled();\n\n var wrapClass = prefixCls + '-node-content-wrapper';\n\n // Icon - Still show loading icon when loading without showIcon\n var $icon = void 0;\n\n if (showIcon) {\n var currentIcon = icon || treeIcon;\n\n $icon = currentIcon ? React.createElement(\n 'span',\n {\n className: classNames(prefixCls + '-iconEle', prefixCls + '-icon__customize')\n },\n typeof currentIcon === 'function' ? React.createElement(currentIcon, _extends({}, _this2.props)) : currentIcon\n ) : _this2.renderIcon();\n } else if (loadData && loading) {\n $icon = _this2.renderIcon();\n }\n\n // Title\n var $title = React.createElement(\n 'span',\n { className: prefixCls + '-title' },\n title\n );\n\n return React.createElement(\n 'span',\n {\n ref: _this2.setSelectHandle,\n title: typeof title === 'string' ? title : '',\n className: classNames('' + wrapClass, wrapClass + '-' + (_this2.getNodeState() || 'normal'), !disabled && (selected || dragNodeHighlight) && prefixCls + '-node-selected', !disabled && draggable && 'draggable'),\n draggable: !disabled && draggable || undefined,\n 'aria-grabbed': !disabled && draggable || undefined,\n\n onMouseEnter: _this2.onMouseEnter,\n onMouseLeave: _this2.onMouseLeave,\n onContextMenu: _this2.onContextMenu,\n onClick: _this2.onSelectorClick,\n onDoubleClick: _this2.onSelectorDoubleClick,\n onDragStart: draggable ? _this2.onDragStart : undefined\n },\n $icon,\n $title\n );\n };\n\n this.renderChildren = function () {\n var _props7 = _this2.props,\n expanded = _props7.expanded,\n pos = _props7.pos;\n var _context$rcTree5 = _this2.context.rcTree,\n prefixCls = _context$rcTree5.prefixCls,\n motion = _context$rcTree5.motion,\n renderTreeNode = _context$rcTree5.renderTreeNode;\n\n // Children TreeNode\n\n var nodeList = _this2.getNodeChildren();\n\n if (nodeList.length === 0) {\n return null;\n }\n return React.createElement(\n CSSMotion,\n _extends({ visible: expanded }, motion),\n function (_ref) {\n var style = _ref.style,\n className = _ref.className;\n\n return React.createElement(\n 'ul',\n {\n className: classNames(className, prefixCls + '-child-tree', expanded && prefixCls + '-child-tree-open'),\n style: style,\n 'data-expanded': expanded,\n role: 'group'\n },\n mapChildren(nodeList, function (node, index) {\n return renderTreeNode(node, index, pos);\n })\n );\n }\n );\n };\n};\n\nTreeNode.isTreeNode = 1;\n\npolyfill(TreeNode);\n\nexport default TreeNode;","import {default as LayersPass} from './layers-pass';\nimport {\n Framebuffer,\n Texture2D,\n Renderbuffer,\n withParameters,\n cssToDeviceRatio\n} from '@luma.gl/core';\n\nexport default class ShadowPass extends LayersPass {\n constructor(gl, props) {\n super(gl, props);\n\n // The shadowMap texture\n this.shadowMap = new Texture2D(gl, {\n width: 1,\n height: 1,\n parameters: {\n [gl.TEXTURE_MIN_FILTER]: gl.LINEAR,\n [gl.TEXTURE_MAG_FILTER]: gl.LINEAR,\n [gl.TEXTURE_WRAP_S]: gl.CLAMP_TO_EDGE,\n [gl.TEXTURE_WRAP_T]: gl.CLAMP_TO_EDGE\n }\n });\n\n this.depthBuffer = new Renderbuffer(gl, {\n format: gl.DEPTH_COMPONENT16,\n width: 1,\n height: 1\n });\n\n this.fbo = new Framebuffer(gl, {\n id: 'shadowmap',\n width: 1,\n height: 1,\n attachments: {\n [gl.COLOR_ATTACHMENT0]: this.shadowMap,\n // Depth attachment has to be specified for depth test to work\n [gl.DEPTH_ATTACHMENT]: this.depthBuffer\n }\n });\n }\n\n render(params) {\n const target = this.fbo;\n\n withParameters(\n this.gl,\n {\n depthRange: [0, 1],\n depthTest: true,\n blend: false,\n clearColor: [1, 1, 1, 1]\n },\n () => {\n const viewport = params.viewports[0];\n const pixelRatio = cssToDeviceRatio(this.gl);\n const width = viewport.width * pixelRatio;\n const height = viewport.height * pixelRatio;\n if (width !== target.width || height !== target.height) {\n target.resize({width, height});\n }\n\n super.render({...params, target, pass: 'shadow'});\n }\n );\n }\n\n shouldDrawLayer(layer) {\n return layer.props.shadowEnabled !== false;\n }\n\n getModuleParameters() {\n return {\n drawToShadowMap: true\n };\n }\n\n delete() {\n if (this.fbo) {\n this.fbo.delete();\n this.fbo = null;\n }\n\n if (this.shadowMap) {\n this.shadowMap.delete();\n this.shadowMap = null;\n }\n\n if (this.depthBuffer) {\n this.depthBuffer.delete();\n this.depthBuffer = null;\n }\n }\n}\n","import {Texture2D, ProgramManager} from '@luma.gl/core';\nimport {AmbientLight} from './ambient-light';\nimport {DirectionalLight} from './directional-light';\nimport Effect from '../../lib/effect';\nimport {Matrix4, Vector3} from 'math.gl';\nimport ShadowPass from '../../passes/shadow-pass';\nimport {default as shadow} from '../../shaderlib/shadow/shadow';\n\nconst DEFAULT_AMBIENT_LIGHT_PROPS = {color: [255, 255, 255], intensity: 1.0};\nconst DEFAULT_DIRECTIONAL_LIGHT_PROPS = [\n {\n color: [255, 255, 255],\n intensity: 1.0,\n direction: [-1, 3, -1]\n },\n {\n color: [255, 255, 255],\n intensity: 0.9,\n direction: [1, -8, -2.5]\n }\n];\nconst DEFAULT_SHADOW_COLOR = [0, 0, 0, 200 / 255];\n\n// Class to manage ambient, point and directional light sources in deck\nexport default class LightingEffect extends Effect {\n constructor(props) {\n super(props);\n this.ambientLight = null;\n this.directionalLights = [];\n this.pointLights = [];\n\n this.shadowColor = DEFAULT_SHADOW_COLOR;\n this.shadowPasses = [];\n this.shadowMaps = [];\n this.dummyShadowMap = null;\n this.shadow = false;\n this.programManager = null;\n\n for (const key in props) {\n const lightSource = props[key];\n\n switch (lightSource.type) {\n case 'ambient':\n this.ambientLight = lightSource;\n break;\n\n case 'directional':\n this.directionalLights.push(lightSource);\n break;\n\n case 'point':\n this.pointLights.push(lightSource);\n break;\n default:\n }\n }\n this._applyDefaultLights();\n\n this.shadow = this.directionalLights.some(light => light.shadow);\n }\n\n preRender(gl, {layers, layerFilter, viewports, onViewportActive, views}) {\n if (!this.shadow) return;\n\n // create light matrix every frame to make sure always updated from light source\n this.shadowMatrices = this._createLightMatrix();\n\n if (this.shadowPasses.length === 0) {\n this._createShadowPasses(gl);\n }\n if (!this.programManager) {\n // TODO - support multiple contexts\n this.programManager = ProgramManager.getDefaultProgramManager(gl);\n if (shadow) {\n this.programManager.addDefaultModule(shadow);\n }\n }\n\n if (!this.dummyShadowMap) {\n this.dummyShadowMap = new Texture2D(gl, {\n width: 1,\n height: 1\n });\n }\n\n for (let i = 0; i < this.shadowPasses.length; i++) {\n const shadowPass = this.shadowPasses[i];\n shadowPass.render({\n layers,\n layerFilter,\n viewports,\n onViewportActive,\n views,\n moduleParameters: {\n shadowLightId: i,\n dummyShadowMap: this.dummyShadowMap,\n shadowMatrices: this.shadowMatrices\n }\n });\n }\n }\n\n getModuleParameters(layer) {\n const parameters = this.shadow\n ? {\n shadowMaps: this.shadowMaps,\n dummyShadowMap: this.dummyShadowMap,\n shadowColor: this.shadowColor,\n shadowMatrices: this.shadowMatrices\n }\n : {};\n\n // when not rendering to screen, turn off lighting by adding empty light source object\n // lights shader module relies on the `lightSources` to turn on/off lighting\n parameters.lightSources = {\n ambientLight: this.ambientLight,\n directionalLights: this.directionalLights.map(directionalLight =>\n directionalLight.getProjectedLight({layer})\n ),\n pointLights: this.pointLights.map(pointLight => pointLight.getProjectedLight({layer}))\n };\n\n return parameters;\n }\n\n cleanup() {\n for (const shadowPass of this.shadowPasses) {\n shadowPass.delete();\n }\n this.shadowPasses.length = 0;\n this.shadowMaps.length = 0;\n\n if (this.dummyShadowMap) {\n this.dummyShadowMap.delete();\n this.dummyShadowMap = null;\n }\n\n if (this.shadow && this.programManager) {\n this.programManager.removeDefaultModule(shadow);\n this.programManager = null;\n }\n }\n\n _createLightMatrix() {\n const lightMatrices = [];\n for (const light of this.directionalLights) {\n const viewMatrix = new Matrix4().lookAt({\n eye: new Vector3(light.direction).negate()\n });\n\n lightMatrices.push(viewMatrix);\n }\n return lightMatrices;\n }\n\n _createShadowPasses(gl) {\n for (let i = 0; i < this.directionalLights.length; i++) {\n const shadowPass = new ShadowPass(gl);\n this.shadowPasses[i] = shadowPass;\n this.shadowMaps[i] = shadowPass.shadowMap;\n }\n }\n\n _applyDefaultLights() {\n const {ambientLight, pointLights, directionalLights} = this;\n if (!ambientLight && pointLights.length === 0 && directionalLights.length === 0) {\n this.ambientLight = new AmbientLight(DEFAULT_AMBIENT_LIGHT_PROPS);\n this.directionalLights.push(\n new DirectionalLight(DEFAULT_DIRECTIONAL_LIGHT_PROPS[0]),\n new DirectionalLight(DEFAULT_DIRECTIONAL_LIGHT_PROPS[1])\n );\n }\n }\n}\n","import * as glMatrix from \"./common.js\";\nimport * as mat3 from \"./mat3.js\";\nimport * as vec3 from \"./vec3.js\";\nimport * as vec4 from \"./vec4.js\";\n/**\r\n * Quaternion\r\n * @module quat\r\n */\n\n/**\r\n * Creates a new identity quat\r\n *\r\n * @returns {quat} a new quaternion\r\n */\n\nexport function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n\n out[3] = 1;\n return out;\n}\n/**\r\n * Set a quat to the identity quaternion\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @returns {quat} out\r\n */\n\nexport function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n}\n/**\r\n * Sets a quat from the given angle and rotation axis,\r\n * then returns it.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyVec3} axis the axis around which to rotate\r\n * @param {Number} rad the angle in radians\r\n * @returns {quat} out\r\n **/\n\nexport function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n}\n/**\r\n * Gets the rotation axis and angle for a given\r\n * quaternion. If a quaternion is created with\r\n * setAxisAngle, this method will return the same\r\n * values as providied in the original parameter list\r\n * OR functionally equivalent values.\r\n * Example: The quaternion formed by axis [0, 0, 1] and\r\n * angle -90 is the same as the quaternion formed by\r\n * [0, 0, 1] and 270. This method favors the latter.\r\n * @param {vec3} out_axis Vector receiving the axis of rotation\r\n * @param {ReadonlyQuat} q Quaternion to be decomposed\r\n * @return {Number} Angle, in radians, of the rotation\r\n */\n\nexport function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n } else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n\n return rad;\n}\n/**\r\n * Gets the angular distance between two unit quaternions\r\n *\r\n * @param {ReadonlyQuat} a Origin unit quaternion\r\n * @param {ReadonlyQuat} b Destination unit quaternion\r\n * @return {Number} Angle, in radians, between the two quaternions\r\n */\n\nexport function getAngle(a, b) {\n var dotproduct = dot(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n}\n/**\r\n * Multiplies two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @returns {quat} out\r\n */\n\nexport function multiply(out, a, b) {\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the X axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {ReadonlyQuat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the Y axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {ReadonlyQuat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var by = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n}\n/**\r\n * Rotates a quaternion by the given angle about the Z axis\r\n *\r\n * @param {quat} out quat receiving operation result\r\n * @param {ReadonlyQuat} a quat to rotate\r\n * @param {number} rad angle (in radians) to rotate\r\n * @returns {quat} out\r\n */\n\nexport function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bz = Math.sin(rad),\n bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n}\n/**\r\n * Calculates the W component of a quat from the X, Y, and Z components.\r\n * Assumes that quaternion is 1 unit in length.\r\n * Any existing W component will be ignored.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quat to calculate W component of\r\n * @returns {quat} out\r\n */\n\nexport function calculateW(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n}\n/**\r\n * Calculate the exponential of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quat to calculate the exponential of\r\n * @returns {quat} out\r\n */\n\nexport function exp(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n}\n/**\r\n * Calculate the natural logarithm of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quat to calculate the exponential of\r\n * @returns {quat} out\r\n */\n\nexport function ln(out, a) {\n var x = a[0],\n y = a[1],\n z = a[2],\n w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n}\n/**\r\n * Calculate the scalar power of a unit quaternion.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quat to calculate the exponential of\r\n * @param {Number} b amount to scale the quaternion by\r\n * @returns {quat} out\r\n */\n\nexport function pow(out, a, b) {\n ln(out, a);\n scale(out, out, b);\n exp(out, out);\n return out;\n}\n/**\r\n * Performs a spherical linear interpolation between two quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\nexport function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0],\n ay = a[1],\n az = a[2],\n aw = a[3];\n var bx = b[0],\n by = b[1],\n bz = b[2],\n bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n\n\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n } else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n\n\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n}\n/**\r\n * Generates a random unit quaternion\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @returns {quat} out\r\n */\n\nexport function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n}\n/**\r\n * Calculates the inverse of a quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quat to calculate inverse of\r\n * @returns {quat} out\r\n */\n\nexport function invert(out, a) {\n var a0 = a[0],\n a1 = a[1],\n a2 = a[2],\n a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n}\n/**\r\n * Calculates the conjugate of a quat\r\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quat to calculate conjugate of\r\n * @returns {quat} out\r\n */\n\nexport function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n}\n/**\r\n * Creates a quaternion from the given 3x3 rotation matrix.\r\n *\r\n * NOTE: The resultant quaternion is not normalized, so you should be sure\r\n * to renormalize the quaternion yourself where necessary.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyMat3} m rotation matrix\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n } else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0]) i = 1;\n if (m[8] > m[i * 3 + i]) i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n\n return out;\n}\n/**\r\n * Creates a quaternion from the given euler angle x, y, z.\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {x} Angle to rotate around X axis in degrees.\r\n * @param {y} Angle to rotate around Y axis in degrees.\r\n * @param {z} Angle to rotate around Z axis in degrees.\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport function fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n}\n/**\r\n * Returns a string representation of a quatenion\r\n *\r\n * @param {ReadonlyQuat} a vector to represent as a string\r\n * @returns {String} string representation of the vector\r\n */\n\nexport function str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n}\n/**\r\n * Creates a new quat initialized with values from an existing quaternion\r\n *\r\n * @param {ReadonlyQuat} a quaternion to clone\r\n * @returns {quat} a new quaternion\r\n * @function\r\n */\n\nexport var clone = vec4.clone;\n/**\r\n * Creates a new quat initialized with the given values\r\n *\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {quat} a new quaternion\r\n * @function\r\n */\n\nexport var fromValues = vec4.fromValues;\n/**\r\n * Copy the values from one quat to another\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the source quaternion\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var copy = vec4.copy;\n/**\r\n * Set the components of a quat to the given values\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {Number} x X component\r\n * @param {Number} y Y component\r\n * @param {Number} z Z component\r\n * @param {Number} w W component\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var set = vec4.set;\n/**\r\n * Adds two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var add = vec4.add;\n/**\r\n * Alias for {@link quat.multiply}\r\n * @function\r\n */\n\nexport var mul = multiply;\n/**\r\n * Scales a quat by a scalar number\r\n *\r\n * @param {quat} out the receiving vector\r\n * @param {ReadonlyQuat} a the vector to scale\r\n * @param {Number} b amount to scale the vector by\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var scale = vec4.scale;\n/**\r\n * Calculates the dot product of two quat's\r\n *\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @returns {Number} dot product of a and b\r\n * @function\r\n */\n\nexport var dot = vec4.dot;\n/**\r\n * Performs a linear interpolation between two quat's\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var lerp = vec4.lerp;\n/**\r\n * Calculates the length of a quat\r\n *\r\n * @param {ReadonlyQuat} a vector to calculate length of\r\n * @returns {Number} length of a\r\n */\n\nexport var length = vec4.length;\n/**\r\n * Alias for {@link quat.length}\r\n * @function\r\n */\n\nexport var len = length;\n/**\r\n * Calculates the squared length of a quat\r\n *\r\n * @param {ReadonlyQuat} a vector to calculate squared length of\r\n * @returns {Number} squared length of a\r\n * @function\r\n */\n\nexport var squaredLength = vec4.squaredLength;\n/**\r\n * Alias for {@link quat.squaredLength}\r\n * @function\r\n */\n\nexport var sqrLen = squaredLength;\n/**\r\n * Normalize a quat\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a quaternion to normalize\r\n * @returns {quat} out\r\n * @function\r\n */\n\nexport var normalize = vec4.normalize;\n/**\r\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\r\n *\r\n * @param {ReadonlyQuat} a The first quaternion.\r\n * @param {ReadonlyQuat} b The second quaternion.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport var exactEquals = vec4.exactEquals;\n/**\r\n * Returns whether or not the quaternions have approximately the same elements in the same position.\r\n *\r\n * @param {ReadonlyQuat} a The first vector.\r\n * @param {ReadonlyQuat} b The second vector.\r\n * @returns {Boolean} True if the vectors are equal, false otherwise.\r\n */\n\nexport var equals = vec4.equals;\n/**\r\n * Sets a quaternion to represent the shortest rotation from one\r\n * vector to another.\r\n *\r\n * Both vectors are assumed to be unit length.\r\n *\r\n * @param {quat} out the receiving quaternion.\r\n * @param {ReadonlyVec3} a the initial vector\r\n * @param {ReadonlyVec3} b the destination vector\r\n * @returns {quat} out\r\n */\n\nexport var rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001) vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n } else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n } else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return normalize(out, out);\n }\n };\n}();\n/**\r\n * Performs a spherical linear interpolation with two control points\r\n *\r\n * @param {quat} out the receiving quaternion\r\n * @param {ReadonlyQuat} a the first operand\r\n * @param {ReadonlyQuat} b the second operand\r\n * @param {ReadonlyQuat} c the third operand\r\n * @param {ReadonlyQuat} d the fourth operand\r\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\r\n * @returns {quat} out\r\n */\n\nexport var sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n}();\n/**\r\n * Sets the specified quaternion with values corresponding to the given\r\n * axes. Each axis is a vec3 and is expected to be unit length and\r\n * perpendicular to all other specified axes.\r\n *\r\n * @param {ReadonlyVec3} view the vector representing the viewing direction\r\n * @param {ReadonlyVec3} right the vector representing the local \"right\" direction\r\n * @param {ReadonlyVec3} up the vector representing the local \"up\" direction\r\n * @returns {quat} out\r\n */\n\nexport var setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return normalize(out, fromMat3(out, matr));\n };\n}();","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","/* Use as\nimport {checkProps} from '../util/check-props;'\n\nconst PROP_CHECKS = {\n // Removed props no longer supported, print error and link to upgrade guide\n removedProps: {\n },\n // Deprecated props\n deprecatedProps: {\n offset: 'accessor',\n stride: 'accessor',\n type: 'accessor',\n size: 'accessor',\n divisor: 'accessor',\n normalized: 'accessor',\n integer: 'accessor'\n },\n // Deprecated props that can be autosubstituted, print warning and return updated props object\n replacedProps: {\n bytes: 'byteLength'\n }\n}\n\nclass Buffer {\n setProps(props) {\n checkProps('Buffer', props, PROP_CHECKS);\n }\n}\n*/\nimport {log} from '@luma.gl/gltools';\n\nexport function checkProps(className, props, propChecks) {\n const {removedProps = {}, deprecatedProps = {}, replacedProps = {}} = propChecks;\n\n // removedProps: Removed props no longer supported\n // print error and link to upgrade guide\n for (const propName in removedProps) {\n if (propName in props) {\n const replacementProp = removedProps[propName];\n const replacement = replacementProp ? `${className}.${removedProps[propName]}` : 'N/A';\n log.removed(`${className}.${propName}`, replacement)();\n }\n }\n\n // deprecatedProps: Deprecated props that can not be autosubstituted\n // print warning and rely on caller to substitute\n for (const propName in deprecatedProps) {\n if (propName in props) {\n const replacementProp = deprecatedProps[propName];\n log.deprecated(`${className}.${propName}`, `${className}.${replacementProp}`)();\n }\n }\n\n // replacedProps: Deprecated props that can be autosubstituted\n // print warning and return updated props object\n let newProps = null;\n for (const propName in replacedProps) {\n if (propName in props) {\n const replacementProp = replacedProps[propName];\n log.deprecated(`${className}.${propName}`, `${className}.${replacementProp}`)();\n newProps = newProps || Object.assign({}, props);\n newProps[replacementProp] = props[propName];\n delete newProps[propName];\n }\n }\n\n return newProps || props;\n}\n","/**\n * Projection utils\n * TODO: move to Viewport class?\n */\nimport {COORDINATE_SYSTEM} from '../../lib/constants';\nimport {getOffsetOrigin} from './viewport-uniforms';\nimport WebMercatorViewport from '../../viewports/web-mercator-viewport';\n\nimport * as vec4 from 'gl-matrix/vec4';\nimport * as vec3 from 'gl-matrix/vec3';\nimport {addMetersToLngLat} from '@math.gl/web-mercator';\n\n// In project.glsl, offset modes calculate z differently from LNG_LAT mode.\n// offset modes apply the y adjustment (unitsPerMeter2) when projecting z\n// LNG_LAT mode only use the linear scale.\nfunction lngLatZToWorldPosition(lngLatZ, viewport, offsetMode = false) {\n const p = viewport.projectPosition(lngLatZ);\n\n // TODO - avoid using instanceof\n if (offsetMode && viewport instanceof WebMercatorViewport) {\n const [longitude, latitude, z = 0] = lngLatZ;\n const distanceScales = viewport.getDistanceScales([longitude, latitude]);\n p[2] = z * distanceScales.unitsPerMeter[2];\n }\n return p;\n}\n\nfunction normalizeParameters(opts) {\n const normalizedParams = {...opts};\n\n let {coordinateSystem} = opts;\n const {viewport, coordinateOrigin, fromCoordinateSystem, fromCoordinateOrigin} = opts;\n\n if (coordinateSystem === COORDINATE_SYSTEM.DEFAULT) {\n coordinateSystem = viewport.isGeospatial\n ? COORDINATE_SYSTEM.LNGLAT\n : COORDINATE_SYSTEM.CARTESIAN;\n }\n\n if (fromCoordinateSystem === undefined) {\n normalizedParams.fromCoordinateSystem = coordinateSystem;\n }\n if (fromCoordinateOrigin === undefined) {\n normalizedParams.fromCoordinateOrigin = coordinateOrigin;\n }\n\n normalizedParams.coordinateSystem = coordinateSystem;\n\n return normalizedParams;\n}\n\nexport function getWorldPosition(\n position,\n {viewport, modelMatrix, coordinateSystem, coordinateOrigin, offsetMode}\n) {\n let [x, y, z = 0] = position;\n\n if (modelMatrix) {\n [x, y, z] = vec4.transformMat4([], [x, y, z, 1.0], modelMatrix);\n }\n\n switch (coordinateSystem) {\n case COORDINATE_SYSTEM.LNGLAT:\n return lngLatZToWorldPosition([x, y, z], viewport, offsetMode);\n\n case COORDINATE_SYSTEM.LNGLAT_OFFSETS:\n return lngLatZToWorldPosition(\n [x + coordinateOrigin[0], y + coordinateOrigin[1], z + (coordinateOrigin[2] || 0)],\n viewport,\n offsetMode\n );\n\n case COORDINATE_SYSTEM.METER_OFFSETS:\n return lngLatZToWorldPosition(\n addMetersToLngLat(coordinateOrigin, [x, y, z]),\n viewport,\n offsetMode\n );\n\n case COORDINATE_SYSTEM.CARTESIAN:\n default:\n return viewport.isGeospatial\n ? [x + coordinateOrigin[0], y + coordinateOrigin[1], z + coordinateOrigin[2]]\n : viewport.projectPosition([x, y, z]);\n }\n}\n\n/**\n * Equivalent to project_position in project.glsl\n * projects a user supplied position to world position directly with or without\n * a reference coordinate system\n * @param {array} position - [x, y, z]\n * @param {object} params\n * @param {Viewport} params.viewport - the current viewport\n * @param {number} params.coordinateSystem - the reference coordinate system used\n * align world position\n * @param {array} params.coordinateOrigin - the reference coordinate origin used\n * to align world position\n * @param {Matrix4} [params.modelMatrix] - the model matrix of the supplied position\n * @param {number} [params.fromCoordinateSystem] - the coordinate system that the\n * supplied position is in. Default to the same as `coordinateSystem`.\n * @param {array} [params.fromCoordinateOrigin] - the coordinate origin that the\n * supplied position is in. Default to the same as `coordinateOrigin`.\n */\nexport function projectPosition(position, params) {\n const {\n viewport,\n coordinateSystem,\n coordinateOrigin,\n // optional\n modelMatrix,\n fromCoordinateSystem,\n fromCoordinateOrigin\n } = normalizeParameters(params);\n\n const {geospatialOrigin, shaderCoordinateOrigin, offsetMode} = getOffsetOrigin(\n viewport,\n coordinateSystem,\n coordinateOrigin\n );\n\n const worldPosition = getWorldPosition(position, {\n viewport,\n modelMatrix,\n coordinateSystem: fromCoordinateSystem,\n coordinateOrigin: fromCoordinateOrigin,\n offsetMode\n });\n\n if (offsetMode) {\n const positionCommonSpace = viewport.projectPosition(\n geospatialOrigin || shaderCoordinateOrigin\n );\n vec3.sub(worldPosition, worldPosition, positionCommonSpace);\n }\n\n return worldPosition;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// Purpose: include this in your module to avoids adding dependencies on\n// micro modules like 'global' and 'is-browser';\n\n/* eslint-disable no-restricted-globals */\nconst globals = {\n self: typeof self !== 'undefined' && self,\n window: typeof window !== 'undefined' && window,\n global: typeof global !== 'undefined' && global,\n document: typeof document !== 'undefined' && document\n};\n\nconst self_ = globals.self || globals.window || globals.global;\nconst window_ = globals.window || globals.self || globals.global;\nconst global_ = globals.global || globals.self || globals.window;\nconst document_ = globals.document || {};\n\nexport {self_ as self, window_ as window, global_ as global, document_ as document};\n\nexport const isBrowser =\n // @ts-ignore\n typeof process !== 'object' || String(process) !== '[object process]' || process.browser;\n\nexport const isWorker = typeof importScripts === 'function';\n\n// Extract node major version\nconst matches =\n typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);\nexport const nodeVersion = (matches && parseFloat(matches[1])) || 0;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable max-params */\nimport earcut from 'earcut';\nimport {modifyPolygonWindingDirection, WINDING} from '@math.gl/polygon';\n\nconst OUTER_POLYGON_WINDING = WINDING.CLOCKWISE;\nconst HOLE_POLYGON_WINDING = WINDING.COUNTER_CLOCKWISE;\n\nconst windingOptions = {\n isClosed: true\n};\n\n// 4 data formats are supported:\n// Simple Polygon: an array of points\n// Complex Polygon: an array of array of points (array of rings)\n// with the first ring representing the outer hull and other rings representing holes\n// Simple Flat: an array of numbers (flattened \"simple polygon\")\n// Complex Flat: {position: array<number>, holeIndices: array<number>}\n// (flattened \"complex polygon\")\n\n/**\n * Ensure a polygon is valid format\n * @param {Array|Object} polygon\n */\nfunction validate(polygon) {\n polygon = (polygon && polygon.positions) || polygon;\n if (!Array.isArray(polygon) && !ArrayBuffer.isView(polygon)) {\n throw new Error('invalid polygon');\n }\n}\n\n/**\n * Check if a polygon is simple or complex\n * @param {Array} polygon - either a complex or simple polygon\n * @return {Boolean} - true if the polygon is a simple polygon (i.e. not an array of polygons)\n */\nfunction isSimple(polygon) {\n return polygon.length >= 1 && polygon[0].length >= 2 && Number.isFinite(polygon[0][0]);\n}\n\n/**\n * Check if a simple polygon is a closed ring\n * @param {Array} simplePolygon - array of points\n * @return {Boolean} - true if the simple polygon is a closed ring\n */\nfunction isNestedRingClosed(simplePolygon) {\n // check if first and last vertex are the same\n const p0 = simplePolygon[0];\n const p1 = simplePolygon[simplePolygon.length - 1];\n\n return p0[0] === p1[0] && p0[1] === p1[1] && p0[2] === p1[2];\n}\n\n/**\n * Check if a simple flat array is a closed ring\n * @param {Array} positions - array of numbers\n * @param {Number} size - size of a position, 2 (xy) or 3 (xyz)\n * @param {Number} startIndex - start index of the path in the positions array\n * @param {Number} endIndex - end index of the path in the positions array\n * @return {Boolean} - true if the simple flat array is a closed ring\n */\nfunction isFlatRingClosed(positions, size, startIndex, endIndex) {\n for (let i = 0; i < size; i++) {\n if (positions[startIndex + i] !== positions[endIndex - size + i]) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * Copy a simple polygon coordinates into a flat array, closes the ring if needed.\n * @param {Float64Array} target - destination\n * @param {Number} targetStartIndex - index in the destination to start copying into\n * @param {Array} simplePolygon - array of points\n * @param {Number} size - size of a position, 2 (xy) or 3 (xyz)\n * @param {Number} [windingDirection] - modify polygon to be of the specified winding direction\n * @returns {Number} - the index of the write head in the destination\n */\nfunction copyNestedRing(target, targetStartIndex, simplePolygon, size, windingDirection) {\n let targetIndex = targetStartIndex;\n const len = simplePolygon.length;\n for (let i = 0; i < len; i++) {\n for (let j = 0; j < size; j++) {\n target[targetIndex++] = simplePolygon[i][j] || 0;\n }\n }\n\n if (!isNestedRingClosed(simplePolygon)) {\n for (let j = 0; j < size; j++) {\n target[targetIndex++] = simplePolygon[0][j] || 0;\n }\n }\n\n windingOptions.start = targetStartIndex;\n windingOptions.end = targetIndex;\n windingOptions.size = size;\n modifyPolygonWindingDirection(target, windingDirection, windingOptions);\n\n return targetIndex;\n}\n\n/**\n * Copy a simple flat array into another flat array, closes the ring if needed.\n * @param {Float64Array} target - destination\n * @param {Number} targetStartIndex - index in the destination to start copying into\n * @param {Array} positions - array of numbers\n * @param {Number} size - size of a position, 2 (xy) or 3 (xyz)\n * @param {Number} [srcStartIndex] - start index of the path in the positions array\n * @param {Number} [srcEndIndex] - end index of the path in the positions array\n * @param {Number} [windingDirection] - modify polygon to be of the specified winding direction\n * @returns {Number} - the index of the write head in the destination\n */\nfunction copyFlatRing(\n target,\n targetStartIndex,\n positions,\n size,\n srcStartIndex = 0,\n srcEndIndex,\n windingDirection\n) {\n srcEndIndex = srcEndIndex || positions.length;\n const srcLength = srcEndIndex - srcStartIndex;\n if (srcLength <= 0) {\n return targetStartIndex;\n }\n let targetIndex = targetStartIndex;\n\n for (let i = 0; i < srcLength; i++) {\n target[targetIndex++] = positions[srcStartIndex + i];\n }\n\n if (!isFlatRingClosed(positions, size, srcStartIndex, srcEndIndex)) {\n for (let i = 0; i < size; i++) {\n target[targetIndex++] = positions[srcStartIndex + i];\n }\n }\n\n windingOptions.start = targetStartIndex;\n windingOptions.end = targetIndex;\n windingOptions.size = size;\n modifyPolygonWindingDirection(target, windingDirection, windingOptions);\n\n return targetIndex;\n}\n\n/**\n * Normalize any polygon representation into the \"complex flat\" format\n * @param {Array|Object} polygon\n * @param {Number} positionSize - size of a position, 2 (xy) or 3 (xyz)\n * @param {Number} [vertexCount] - pre-computed vertex count in the polygon.\n * If provided, will skip counting.\n * @return {Object} - {positions: <Float64Array>, holeIndices: <Array|null>}\n */\n/* eslint-disable max-statements */\nexport function normalize(polygon, positionSize) {\n validate(polygon);\n\n const positions = [];\n const holeIndices = [];\n\n if (polygon.positions) {\n // complex flat\n const {positions: srcPositions, holeIndices: srcHoleIndices} = polygon;\n\n if (srcHoleIndices) {\n let targetIndex = 0;\n // split the positions array into `holeIndices.length + 1` rings\n // holeIndices[-1] falls back to 0\n // holeIndices[holeIndices.length] falls back to positions.length\n for (let i = 0; i <= srcHoleIndices.length; i++) {\n targetIndex = copyFlatRing(\n positions,\n targetIndex,\n srcPositions,\n positionSize,\n srcHoleIndices[i - 1],\n srcHoleIndices[i],\n i === 0 ? OUTER_POLYGON_WINDING : HOLE_POLYGON_WINDING\n );\n holeIndices.push(targetIndex);\n }\n // The last one is not a starting index of a hole, remove\n holeIndices.pop();\n\n return {positions, holeIndices};\n }\n polygon = srcPositions;\n }\n if (Number.isFinite(polygon[0])) {\n // simple flat\n copyFlatRing(positions, 0, polygon, positionSize, 0, positions.length, OUTER_POLYGON_WINDING);\n return positions;\n }\n if (!isSimple(polygon)) {\n // complex polygon\n let targetIndex = 0;\n\n for (const [polygonIndex, simplePolygon] of polygon.entries()) {\n targetIndex = copyNestedRing(\n positions,\n targetIndex,\n simplePolygon,\n positionSize,\n polygonIndex === 0 ? OUTER_POLYGON_WINDING : HOLE_POLYGON_WINDING\n );\n holeIndices.push(targetIndex);\n }\n // The last one is not a starting index of a hole, remove\n holeIndices.pop();\n // last index points to the end of the array, remove it\n return {positions, holeIndices};\n }\n // simple polygon\n copyNestedRing(positions, 0, polygon, positionSize, OUTER_POLYGON_WINDING);\n return positions;\n}\n/* eslint-enable max-statements */\n\n/*\n * Get vertex indices for drawing polygon mesh\n * @param {Object} normalizedPolygon - {positions, holeIndices}\n * @param {Number} positionSize - size of a position, 2 (xy) or 3 (xyz)\n * @returns {Array} array of indices\n */\nexport function getSurfaceIndices(normalizedPolygon, positionSize, preproject) {\n let holeIndices = null;\n\n if (normalizedPolygon.holeIndices) {\n holeIndices = normalizedPolygon.holeIndices.map(positionIndex => positionIndex / positionSize);\n }\n let positions = normalizedPolygon.positions || normalizedPolygon;\n\n if (preproject) {\n // When tesselating lnglat coordinates, project them to the common space for accuracy\n const n = positions.length;\n // Clone the array\n positions = positions.slice();\n const p = [];\n for (let i = 0; i < n; i += positionSize) {\n p[0] = positions[i];\n p[1] = positions[i + 1];\n const xy = preproject(p);\n positions[i] = xy[0];\n positions[i + 1] = xy[1];\n }\n }\n\n // Let earcut triangulate the polygon\n return earcut(positions, holeIndices, positionSize);\n}\n","/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nmodule.exports = isNil;\n","import _extends from 'babel-runtime/helpers/extends';\n/**\n * Webpack has bug for import loop, which is not the same behavior as ES module.\n * When util.js imports the TreeNode for tree generate will cause treeContextTypes be empty.\n */\n\nimport PropTypes from 'prop-types';\n\n/**\n * Thought we still use `cloneElement` to pass `key`,\n * other props can pass with context for future refactor.\n */\nexport var treeContextTypes = {\n rcTree: PropTypes.shape({\n root: PropTypes.object,\n\n prefixCls: PropTypes.string,\n selectable: PropTypes.bool,\n showIcon: PropTypes.bool,\n icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n draggable: PropTypes.bool,\n checkable: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),\n checkStrictly: PropTypes.bool,\n disabled: PropTypes.bool,\n openTransitionName: PropTypes.string,\n openAnimation: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n loadData: PropTypes.func,\n filterTreeNode: PropTypes.func,\n renderTreeNode: PropTypes.func,\n\n isKeyChecked: PropTypes.func,\n\n onNodeClick: PropTypes.func,\n onNodeDoubleClick: PropTypes.func,\n onNodeExpand: PropTypes.func,\n onNodeSelect: PropTypes.func,\n onNodeCheck: PropTypes.func,\n onNodeMouseEnter: PropTypes.func,\n onNodeMouseLeave: PropTypes.func,\n onNodeContextMenu: PropTypes.func,\n onNodeDragStart: PropTypes.func,\n onNodeDragEnter: PropTypes.func,\n onNodeDragOver: PropTypes.func,\n onNodeDragLeave: PropTypes.func,\n onNodeDragEnd: PropTypes.func,\n onNodeDrop: PropTypes.func\n\n // TODO: Remove this\n // onBatchNodeCheck: PropTypes.func,\n // onCheckConductFinished: PropTypes.func,\n\n // Tree will store the entities when the treeNode refresh.\n // User can pass the func to add more info to customize the additional info.\n // processTreeEntity: PropTypes.func,\n })\n};\n\nexport var nodeContextTypes = _extends({}, treeContextTypes, {\n rcTreeNode: PropTypes.shape({\n onUpCheckConduct: PropTypes.func\n })\n});","export default `\\\n#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n\n // Constant-Linear-Exponential\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n vec3 color;\n vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n return pointLight.attenuation.x\n + pointLight.attenuation.y * distance\n + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n`;\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nimport lightingShader from './lights.glsl';\n\nconst INITIAL_MODULE_OPTIONS = {\n lightSources: {}\n};\n\n// Take color 0-255 and intensity as input and output 0.0-1.0 range\nfunction convertColor({color = [0, 0, 0], intensity = 1.0} = {}) {\n return color.map(component => (component * intensity) / 255.0);\n}\n\nfunction getLightSourceUniforms({ambientLight, pointLights = [], directionalLights = []}) {\n const lightSourceUniforms = {};\n\n if (ambientLight) {\n lightSourceUniforms['lighting_uAmbientLight.color'] = convertColor(ambientLight);\n } else {\n lightSourceUniforms['lighting_uAmbientLight.color'] = [0, 0, 0];\n }\n\n pointLights.forEach((pointLight, index) => {\n lightSourceUniforms[`lighting_uPointLight[${index}].color`] = convertColor(pointLight);\n lightSourceUniforms[`lighting_uPointLight[${index}].position`] = pointLight.position;\n lightSourceUniforms[`lighting_uPointLight[${index}].attenuation`] = pointLight.attenuation || [\n 1,\n 0,\n 0\n ];\n });\n lightSourceUniforms.lighting_uPointLightCount = pointLights.length;\n\n directionalLights.forEach((directionalLight, index) => {\n lightSourceUniforms[`lighting_uDirectionalLight[${index}].color`] = convertColor(\n directionalLight\n );\n lightSourceUniforms[`lighting_uDirectionalLight[${index}].direction`] =\n directionalLight.direction;\n });\n lightSourceUniforms.lighting_uDirectionalLightCount = directionalLights.length;\n\n return lightSourceUniforms;\n}\n\n// eslint-disable-next-line complexity\nfunction getUniforms(opts = INITIAL_MODULE_OPTIONS) {\n // Specify lights separately\n if ('lightSources' in opts) {\n const {ambientLight, pointLights, directionalLights} = opts.lightSources || {};\n const hasLights =\n ambientLight ||\n (pointLights && pointLights.length > 0) ||\n (directionalLights && directionalLights.length > 0);\n\n if (!hasLights) {\n return {lighting_uEnabled: false};\n }\n\n return Object.assign(\n {},\n getLightSourceUniforms({ambientLight, pointLights, directionalLights}),\n {\n lighting_uEnabled: true\n }\n );\n }\n\n // Support for array of lights. Type of light is detected by type field\n if ('lights' in opts) {\n const lightSources = {pointLights: [], directionalLights: []};\n // @ts-ignore\n for (const light of opts.lights || []) {\n switch (light.type) {\n case 'ambient':\n // Note: Only uses last ambient light\n // TODO - add ambient light sources on CPU?\n lightSources.ambientLight = light;\n break;\n case 'directional':\n lightSources.directionalLights.push(light);\n break;\n case 'point':\n lightSources.pointLights.push(light);\n break;\n default:\n // eslint-disable-next-line\n // console.warn(light.type);\n }\n }\n\n // Call the `opts.lightSources`` version\n return getUniforms({lightSources});\n }\n\n return {};\n}\n\n/** @type {ShaderModule} */\nexport const lights = {\n name: 'lights',\n vs: lightingShader,\n fs: lightingShader,\n getUniforms,\n defines: {\n MAX_LIGHTS: 3\n }\n};\n","import {log} from '@luma.gl/gltools';\nimport {Stats} from 'probe.gl';\nimport {isBrowser, global} from 'probe.gl/env';\n\n// Version detection using babel plugin\n/* global __VERSION__ */\n// @ts-ignore\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'untranspiled source';\n\nconst STARTUP_MESSAGE = 'set luma.log.level=1 (or higher) to trace rendering';\n// Assign luma.log.level in console to control logging: \\\n// 0: none, 1: minimal, 2: verbose, 3: attribute/uniforms, 4: gl logs\n// luma.log.break[], set to gl funcs, luma.log.profile[] set to model names`;\n\nclass StatsManager {\n constructor() {\n this.stats = new Map();\n }\n\n get(name) {\n if (!this.stats.has(name)) {\n this.stats.set(name, new Stats({id: name}));\n }\n\n return this.stats.get(name);\n }\n}\n\nconst lumaStats = new StatsManager();\n\nif (global.luma && global.luma.VERSION !== VERSION) {\n throw new Error(`luma.gl - multiple VERSIONs detected: ${global.luma.VERSION} vs ${VERSION}`);\n}\n\nif (!global.luma) {\n if (isBrowser()) {\n log.log(1, `luma.gl ${VERSION} - ${STARTUP_MESSAGE}`)();\n }\n\n global.luma = global.luma || {\n VERSION,\n version: VERSION,\n log,\n\n // A global stats object that various components can add information to\n // E.g. see webgl/resource.js\n stats: lumaStats,\n\n // Keep some luma globals in a sub-object\n // This allows us to dynamically detect if certain modules have been\n // included (such as IO and headless) and enable related functionality,\n // without unconditionally requiring and thus bundling big dependencies\n // into the app.\n globals: {\n modules: {},\n nodeIO: {}\n }\n };\n}\n\nexport {lumaStats};\nexport default global.luma;\n","/*! Hammer.JS - v2.0.7 - 2016-04-22\n * http://hammerjs.github.io/\n *\n * Copyright (c) 2016 Jorik Tangelder;\n * Licensed under the MIT license */\n(function(window, document, exportName, undefined) {\n 'use strict';\n\nvar VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];\nvar TEST_ELEMENT = document.createElement('div');\n\nvar TYPE_FUNCTION = 'function';\n\nvar round = Math.round;\nvar abs = Math.abs;\nvar now = Date.now;\n\n/**\n * set a timeout with a given scope\n * @param {Function} fn\n * @param {Number} timeout\n * @param {Object} context\n * @returns {number}\n */\nfunction setTimeoutContext(fn, timeout, context) {\n return setTimeout(bindFn(fn, context), timeout);\n}\n\n/**\n * if the argument is an array, we want to execute the fn on each entry\n * if it aint an array we don't want to do a thing.\n * this is used by all the methods that accept a single and array argument.\n * @param {*|Array} arg\n * @param {String} fn\n * @param {Object} [context]\n * @returns {Boolean}\n */\nfunction invokeArrayArg(arg, fn, context) {\n if (Array.isArray(arg)) {\n each(arg, context[fn], context);\n return true;\n }\n return false;\n}\n\n/**\n * walk objects and arrays\n * @param {Object} obj\n * @param {Function} iterator\n * @param {Object} context\n */\nfunction each(obj, iterator, context) {\n var i;\n\n if (!obj) {\n return;\n }\n\n if (obj.forEach) {\n obj.forEach(iterator, context);\n } else if (obj.length !== undefined) {\n i = 0;\n while (i < obj.length) {\n iterator.call(context, obj[i], i, obj);\n i++;\n }\n } else {\n for (i in obj) {\n obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);\n }\n }\n}\n\n/**\n * wrap a method with a deprecation warning and stack trace\n * @param {Function} method\n * @param {String} name\n * @param {String} message\n * @returns {Function} A new function wrapping the supplied method.\n */\nfunction deprecate(method, name, message) {\n var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\\n' + message + ' AT \\n';\n return function() {\n var e = new Error('get-stack-trace');\n var stack = e && e.stack ? e.stack.replace(/^[^\\(]+?[\\n$]/gm, '')\n .replace(/^\\s+at\\s+/gm, '')\n .replace(/^Object.<anonymous>\\s*\\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';\n\n var log = window.console && (window.console.warn || window.console.log);\n if (log) {\n log.call(window.console, deprecationMessage, stack);\n }\n return method.apply(this, arguments);\n };\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} target\n * @param {...Object} objects_to_assign\n * @returns {Object} target\n */\nvar assign;\nif (typeof Object.assign !== 'function') {\n assign = function assign(target) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var source = arguments[index];\n if (source !== undefined && source !== null) {\n for (var nextKey in source) {\n if (source.hasOwnProperty(nextKey)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n }\n return output;\n };\n} else {\n assign = Object.assign;\n}\n\n/**\n * extend object.\n * means that properties in dest will be overwritten by the ones in src.\n * @param {Object} dest\n * @param {Object} src\n * @param {Boolean} [merge=false]\n * @returns {Object} dest\n */\nvar extend = deprecate(function extend(dest, src, merge) {\n var keys = Object.keys(src);\n var i = 0;\n while (i < keys.length) {\n if (!merge || (merge && dest[keys[i]] === undefined)) {\n dest[keys[i]] = src[keys[i]];\n }\n i++;\n }\n return dest;\n}, 'extend', 'Use `assign`.');\n\n/**\n * merge the values from src in the dest.\n * means that properties that exist in dest will not be overwritten by src\n * @param {Object} dest\n * @param {Object} src\n * @returns {Object} dest\n */\nvar merge = deprecate(function merge(dest, src) {\n return extend(dest, src, true);\n}, 'merge', 'Use `assign`.');\n\n/**\n * simple class inheritance\n * @param {Function} child\n * @param {Function} base\n * @param {Object} [properties]\n */\nfunction inherit(child, base, properties) {\n var baseP = base.prototype,\n childP;\n\n childP = child.prototype = Object.create(baseP);\n childP.constructor = child;\n childP._super = baseP;\n\n if (properties) {\n assign(childP, properties);\n }\n}\n\n/**\n * simple function bind\n * @param {Function} fn\n * @param {Object} context\n * @returns {Function}\n */\nfunction bindFn(fn, context) {\n return function boundFn() {\n return fn.apply(context, arguments);\n };\n}\n\n/**\n * let a boolean value also be a function that must return a boolean\n * this first item in args will be used as the context\n * @param {Boolean|Function} val\n * @param {Array} [args]\n * @returns {Boolean}\n */\nfunction boolOrFn(val, args) {\n if (typeof val == TYPE_FUNCTION) {\n return val.apply(args ? args[0] || undefined : undefined, args);\n }\n return val;\n}\n\n/**\n * use the val2 when val1 is undefined\n * @param {*} val1\n * @param {*} val2\n * @returns {*}\n */\nfunction ifUndefined(val1, val2) {\n return (val1 === undefined) ? val2 : val1;\n}\n\n/**\n * addEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction addEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.addEventListener(type, handler, false);\n });\n}\n\n/**\n * removeEventListener with multiple events at once\n * @param {EventTarget} target\n * @param {String} types\n * @param {Function} handler\n */\nfunction removeEventListeners(target, types, handler) {\n each(splitStr(types), function(type) {\n target.removeEventListener(type, handler, false);\n });\n}\n\n/**\n * find if a node is in the given parent\n * @method hasParent\n * @param {HTMLElement} node\n * @param {HTMLElement} parent\n * @return {Boolean} found\n */\nfunction hasParent(node, parent) {\n while (node) {\n if (node == parent) {\n return true;\n }\n node = node.parentNode;\n }\n return false;\n}\n\n/**\n * small indexOf wrapper\n * @param {String} str\n * @param {String} find\n * @returns {Boolean} found\n */\nfunction inStr(str, find) {\n return str.indexOf(find) > -1;\n}\n\n/**\n * split string on whitespace\n * @param {String} str\n * @returns {Array} words\n */\nfunction splitStr(str) {\n return str.trim().split(/\\s+/g);\n}\n\n/**\n * find if a array contains the object using indexOf or a simple polyFill\n * @param {Array} src\n * @param {String} find\n * @param {String} [findByKey]\n * @return {Boolean|Number} false when not found, or the index\n */\nfunction inArray(src, find, findByKey) {\n if (src.indexOf && !findByKey) {\n return src.indexOf(find);\n } else {\n var i = 0;\n while (i < src.length) {\n if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {\n return i;\n }\n i++;\n }\n return -1;\n }\n}\n\n/**\n * convert array-like objects to real arrays\n * @param {Object} obj\n * @returns {Array}\n */\nfunction toArray(obj) {\n return Array.prototype.slice.call(obj, 0);\n}\n\n/**\n * unique array with objects based on a key (like 'id') or just by the array's value\n * @param {Array} src [{id:1},{id:2},{id:1}]\n * @param {String} [key]\n * @param {Boolean} [sort=False]\n * @returns {Array} [{id:1},{id:2}]\n */\nfunction uniqueArray(src, key, sort) {\n var results = [];\n var values = [];\n var i = 0;\n\n while (i < src.length) {\n var val = key ? src[i][key] : src[i];\n if (inArray(values, val) < 0) {\n results.push(src[i]);\n }\n values[i] = val;\n i++;\n }\n\n if (sort) {\n if (!key) {\n results = results.sort();\n } else {\n results = results.sort(function sortUniqueArray(a, b) {\n return a[key] > b[key];\n });\n }\n }\n\n return results;\n}\n\n/**\n * get the prefixed property\n * @param {Object} obj\n * @param {String} property\n * @returns {String|Undefined} prefixed\n */\nfunction prefixed(obj, property) {\n var prefix, prop;\n var camelProp = property[0].toUpperCase() + property.slice(1);\n\n var i = 0;\n while (i < VENDOR_PREFIXES.length) {\n prefix = VENDOR_PREFIXES[i];\n prop = (prefix) ? prefix + camelProp : property;\n\n if (prop in obj) {\n return prop;\n }\n i++;\n }\n return undefined;\n}\n\n/**\n * get a unique id\n * @returns {number} uniqueId\n */\nvar _uniqueId = 1;\nfunction uniqueId() {\n return _uniqueId++;\n}\n\n/**\n * get the window object of an element\n * @param {HTMLElement} element\n * @returns {DocumentView|Window}\n */\nfunction getWindowForElement(element) {\n var doc = element.ownerDocument || element;\n return (doc.defaultView || doc.parentWindow || window);\n}\n\nvar MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;\n\nvar SUPPORT_TOUCH = ('ontouchstart' in window);\nvar SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined;\nvar SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);\n\nvar INPUT_TYPE_TOUCH = 'touch';\nvar INPUT_TYPE_PEN = 'pen';\nvar INPUT_TYPE_MOUSE = 'mouse';\nvar INPUT_TYPE_KINECT = 'kinect';\n\nvar COMPUTE_INTERVAL = 25;\n\nvar INPUT_START = 1;\nvar INPUT_MOVE = 2;\nvar INPUT_END = 4;\nvar INPUT_CANCEL = 8;\n\nvar DIRECTION_NONE = 1;\nvar DIRECTION_LEFT = 2;\nvar DIRECTION_RIGHT = 4;\nvar DIRECTION_UP = 8;\nvar DIRECTION_DOWN = 16;\n\nvar DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;\nvar DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;\nvar DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;\n\nvar PROPS_XY = ['x', 'y'];\nvar PROPS_CLIENT_XY = ['clientX', 'clientY'];\n\n/**\n * create new input type manager\n * @param {Manager} manager\n * @param {Function} callback\n * @returns {Input}\n * @constructor\n */\nfunction Input(manager, callback) {\n var self = this;\n this.manager = manager;\n this.callback = callback;\n this.element = manager.element;\n this.target = manager.options.inputTarget;\n\n // smaller wrapper around the handler, for the scope and the enabled state of the manager,\n // so when disabled the input events are completely bypassed.\n this.domHandler = function(ev) {\n if (boolOrFn(manager.options.enable, [manager])) {\n self.handler(ev);\n }\n };\n\n this.init();\n\n}\n\nInput.prototype = {\n /**\n * should handle the inputEvent data and trigger the callback\n * @virtual\n */\n handler: function() { },\n\n /**\n * bind the events\n */\n init: function() {\n this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n },\n\n /**\n * unbind the events\n */\n destroy: function() {\n this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);\n this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);\n this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);\n }\n};\n\n/**\n * create new input type manager\n * called by the Manager constructor\n * @param {Hammer} manager\n * @returns {Input}\n */\nfunction createInputInstance(manager) {\n var Type;\n var inputClass = manager.options.inputClass;\n\n if (inputClass) {\n Type = inputClass;\n } else if (SUPPORT_POINTER_EVENTS) {\n Type = PointerEventInput;\n } else if (SUPPORT_ONLY_TOUCH) {\n Type = TouchInput;\n } else if (!SUPPORT_TOUCH) {\n Type = MouseInput;\n } else {\n Type = TouchMouseInput;\n }\n return new (Type)(manager, inputHandler);\n}\n\n/**\n * handle input events\n * @param {Manager} manager\n * @param {String} eventType\n * @param {Object} input\n */\nfunction inputHandler(manager, eventType, input) {\n var pointersLen = input.pointers.length;\n var changedPointersLen = input.changedPointers.length;\n var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));\n var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));\n\n input.isFirst = !!isFirst;\n input.isFinal = !!isFinal;\n\n if (isFirst) {\n manager.session = {};\n }\n\n // source event is the normalized value of the domEvents\n // like 'touchstart, mouseup, pointerdown'\n input.eventType = eventType;\n\n // compute scale, rotation etc\n computeInputData(manager, input);\n\n // emit secret event\n manager.emit('hammer.input', input);\n\n manager.recognize(input);\n manager.session.prevInput = input;\n}\n\n/**\n * extend the data with some usable properties like scale, rotate, velocity etc\n * @param {Object} manager\n * @param {Object} input\n */\nfunction computeInputData(manager, input) {\n var session = manager.session;\n var pointers = input.pointers;\n var pointersLength = pointers.length;\n\n // store the first input to calculate the distance and direction\n if (!session.firstInput) {\n session.firstInput = simpleCloneInputData(input);\n }\n\n // to compute scale and rotation we need to store the multiple touches\n if (pointersLength > 1 && !session.firstMultiple) {\n session.firstMultiple = simpleCloneInputData(input);\n } else if (pointersLength === 1) {\n session.firstMultiple = false;\n }\n\n var firstInput = session.firstInput;\n var firstMultiple = session.firstMultiple;\n var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;\n\n var center = input.center = getCenter(pointers);\n input.timeStamp = now();\n input.deltaTime = input.timeStamp - firstInput.timeStamp;\n\n input.angle = getAngle(offsetCenter, center);\n input.distance = getDistance(offsetCenter, center);\n\n computeDeltaXY(session, input);\n input.offsetDirection = getDirection(input.deltaX, input.deltaY);\n\n var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);\n input.overallVelocityX = overallVelocity.x;\n input.overallVelocityY = overallVelocity.y;\n input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;\n\n input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;\n input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;\n\n input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >\n session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);\n\n computeIntervalInputData(session, input);\n\n // find the correct target\n var target = manager.element;\n if (hasParent(input.srcEvent.target, target)) {\n target = input.srcEvent.target;\n }\n input.target = target;\n}\n\nfunction computeDeltaXY(session, input) {\n var center = input.center;\n var offset = session.offsetDelta || {};\n var prevDelta = session.prevDelta || {};\n var prevInput = session.prevInput || {};\n\n if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {\n prevDelta = session.prevDelta = {\n x: prevInput.deltaX || 0,\n y: prevInput.deltaY || 0\n };\n\n offset = session.offsetDelta = {\n x: center.x,\n y: center.y\n };\n }\n\n input.deltaX = prevDelta.x + (center.x - offset.x);\n input.deltaY = prevDelta.y + (center.y - offset.y);\n}\n\n/**\n * velocity is calculated every x ms\n * @param {Object} session\n * @param {Object} input\n */\nfunction computeIntervalInputData(session, input) {\n var last = session.lastInterval || input,\n deltaTime = input.timeStamp - last.timeStamp,\n velocity, velocityX, velocityY, direction;\n\n if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined)) {\n var deltaX = input.deltaX - last.deltaX;\n var deltaY = input.deltaY - last.deltaY;\n\n var v = getVelocity(deltaTime, deltaX, deltaY);\n velocityX = v.x;\n velocityY = v.y;\n velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;\n direction = getDirection(deltaX, deltaY);\n\n session.lastInterval = input;\n } else {\n // use latest velocity info if it doesn't overtake a minimum period\n velocity = last.velocity;\n velocityX = last.velocityX;\n velocityY = last.velocityY;\n direction = last.direction;\n }\n\n input.velocity = velocity;\n input.velocityX = velocityX;\n input.velocityY = velocityY;\n input.direction = direction;\n}\n\n/**\n * create a simple clone from the input used for storage of firstInput and firstMultiple\n * @param {Object} input\n * @returns {Object} clonedInputData\n */\nfunction simpleCloneInputData(input) {\n // make a simple copy of the pointers because we will get a reference if we don't\n // we only need clientXY for the calculations\n var pointers = [];\n var i = 0;\n while (i < input.pointers.length) {\n pointers[i] = {\n clientX: round(input.pointers[i].clientX),\n clientY: round(input.pointers[i].clientY)\n };\n i++;\n }\n\n return {\n timeStamp: now(),\n pointers: pointers,\n center: getCenter(pointers),\n deltaX: input.deltaX,\n deltaY: input.deltaY\n };\n}\n\n/**\n * get the center of all the pointers\n * @param {Array} pointers\n * @return {Object} center contains `x` and `y` properties\n */\nfunction getCenter(pointers) {\n var pointersLength = pointers.length;\n\n // no need to loop when only one touch\n if (pointersLength === 1) {\n return {\n x: round(pointers[0].clientX),\n y: round(pointers[0].clientY)\n };\n }\n\n var x = 0, y = 0, i = 0;\n while (i < pointersLength) {\n x += pointers[i].clientX;\n y += pointers[i].clientY;\n i++;\n }\n\n return {\n x: round(x / pointersLength),\n y: round(y / pointersLength)\n };\n}\n\n/**\n * calculate the velocity between two points. unit is in px per ms.\n * @param {Number} deltaTime\n * @param {Number} x\n * @param {Number} y\n * @return {Object} velocity `x` and `y`\n */\nfunction getVelocity(deltaTime, x, y) {\n return {\n x: x / deltaTime || 0,\n y: y / deltaTime || 0\n };\n}\n\n/**\n * get the direction between two points\n * @param {Number} x\n * @param {Number} y\n * @return {Number} direction\n */\nfunction getDirection(x, y) {\n if (x === y) {\n return DIRECTION_NONE;\n }\n\n if (abs(x) >= abs(y)) {\n return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;\n}\n\n/**\n * calculate the absolute distance between two points\n * @param {Object} p1 {x, y}\n * @param {Object} p2 {x, y}\n * @param {Array} [props] containing x and y keys\n * @return {Number} distance\n */\nfunction getDistance(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n\n return Math.sqrt((x * x) + (y * y));\n}\n\n/**\n * calculate the angle between two coordinates\n * @param {Object} p1\n * @param {Object} p2\n * @param {Array} [props] containing x and y keys\n * @return {Number} angle\n */\nfunction getAngle(p1, p2, props) {\n if (!props) {\n props = PROPS_XY;\n }\n var x = p2[props[0]] - p1[props[0]],\n y = p2[props[1]] - p1[props[1]];\n return Math.atan2(y, x) * 180 / Math.PI;\n}\n\n/**\n * calculate the rotation degrees between two pointersets\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} rotation\n */\nfunction getRotation(start, end) {\n return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);\n}\n\n/**\n * calculate the scale factor between two pointersets\n * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out\n * @param {Array} start array of pointers\n * @param {Array} end array of pointers\n * @return {Number} scale\n */\nfunction getScale(start, end) {\n return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);\n}\n\nvar MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\nvar MOUSE_ELEMENT_EVENTS = 'mousedown';\nvar MOUSE_WINDOW_EVENTS = 'mousemove mouseup';\n\n/**\n * Mouse events input\n * @constructor\n * @extends Input\n */\nfunction MouseInput() {\n this.evEl = MOUSE_ELEMENT_EVENTS;\n this.evWin = MOUSE_WINDOW_EVENTS;\n\n this.pressed = false; // mousedown state\n\n Input.apply(this, arguments);\n}\n\ninherit(MouseInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function MEhandler(ev) {\n var eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the left mouse button down\n if (eventType & INPUT_START && ev.button === 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which !== 1) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: INPUT_TYPE_MOUSE,\n srcEvent: ev\n });\n }\n});\n\nvar POINTER_INPUT_MAP = {\n pointerdown: INPUT_START,\n pointermove: INPUT_MOVE,\n pointerup: INPUT_END,\n pointercancel: INPUT_CANCEL,\n pointerout: INPUT_CANCEL\n};\n\n// in IE10 the pointer types is defined as an enum\nvar IE10_POINTER_TYPE_ENUM = {\n 2: INPUT_TYPE_TOUCH,\n 3: INPUT_TYPE_PEN,\n 4: INPUT_TYPE_MOUSE,\n 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816\n};\n\nvar POINTER_ELEMENT_EVENTS = 'pointerdown';\nvar POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';\n\n// IE10 has prefixed support, and case-sensitive\nif (window.MSPointerEvent && !window.PointerEvent) {\n POINTER_ELEMENT_EVENTS = 'MSPointerDown';\n POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';\n}\n\n/**\n * Pointer events input\n * @constructor\n * @extends Input\n */\nfunction PointerEventInput() {\n this.evEl = POINTER_ELEMENT_EVENTS;\n this.evWin = POINTER_WINDOW_EVENTS;\n\n Input.apply(this, arguments);\n\n this.store = (this.manager.session.pointerEvents = []);\n}\n\ninherit(PointerEventInput, Input, {\n /**\n * handle mouse events\n * @param {Object} ev\n */\n handler: function PEhandler(ev) {\n var store = this.store;\n var removePointer = false;\n\n var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');\n var eventType = POINTER_INPUT_MAP[eventTypeNormalized];\n var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;\n\n var isTouch = (pointerType == INPUT_TYPE_TOUCH);\n\n // get index of the event in the store\n var storeIndex = inArray(store, ev.pointerId, 'pointerId');\n\n // start and mouse must be down\n if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {\n if (storeIndex < 0) {\n store.push(ev);\n storeIndex = store.length - 1;\n }\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n removePointer = true;\n }\n\n // it not found, so the pointer hasn't been down (so it's probably a hover)\n if (storeIndex < 0) {\n return;\n }\n\n // update the event in the store\n store[storeIndex] = ev;\n\n this.callback(this.manager, eventType, {\n pointers: store,\n changedPointers: [ev],\n pointerType: pointerType,\n srcEvent: ev\n });\n\n if (removePointer) {\n // remove from the store\n store.splice(storeIndex, 1);\n }\n }\n});\n\nvar SINGLE_TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';\nvar SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Touch events input\n * @constructor\n * @extends Input\n */\nfunction SingleTouchInput() {\n this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;\n this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;\n this.started = false;\n\n Input.apply(this, arguments);\n}\n\ninherit(SingleTouchInput, Input, {\n handler: function TEhandler(ev) {\n var type = SINGLE_TOUCH_INPUT_MAP[ev.type];\n\n // should we handle the touch events?\n if (type === INPUT_START) {\n this.started = true;\n }\n\n if (!this.started) {\n return;\n }\n\n var touches = normalizeSingleTouches.call(this, ev, type);\n\n // when done, reset the started state\n if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {\n this.started = false;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction normalizeSingleTouches(ev, type) {\n var all = toArray(ev.touches);\n var changed = toArray(ev.changedTouches);\n\n if (type & (INPUT_END | INPUT_CANCEL)) {\n all = uniqueArray(all.concat(changed), 'identifier', true);\n }\n\n return [all, changed];\n}\n\nvar TOUCH_INPUT_MAP = {\n touchstart: INPUT_START,\n touchmove: INPUT_MOVE,\n touchend: INPUT_END,\n touchcancel: INPUT_CANCEL\n};\n\nvar TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';\n\n/**\n * Multi-user touch events input\n * @constructor\n * @extends Input\n */\nfunction TouchInput() {\n this.evTarget = TOUCH_TARGET_EVENTS;\n this.targetIds = {};\n\n Input.apply(this, arguments);\n}\n\ninherit(TouchInput, Input, {\n handler: function MTEhandler(ev) {\n var type = TOUCH_INPUT_MAP[ev.type];\n var touches = getTouches.call(this, ev, type);\n if (!touches) {\n return;\n }\n\n this.callback(this.manager, type, {\n pointers: touches[0],\n changedPointers: touches[1],\n pointerType: INPUT_TYPE_TOUCH,\n srcEvent: ev\n });\n }\n});\n\n/**\n * @this {TouchInput}\n * @param {Object} ev\n * @param {Number} type flag\n * @returns {undefined|Array} [all, changed]\n */\nfunction getTouches(ev, type) {\n var allTouches = toArray(ev.touches);\n var targetIds = this.targetIds;\n\n // when there is only one touch, the process can be simplified\n if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {\n targetIds[allTouches[0].identifier] = true;\n return [allTouches, allTouches];\n }\n\n var i,\n targetTouches,\n changedTouches = toArray(ev.changedTouches),\n changedTargetTouches = [],\n target = this.target;\n\n // get target touches from touches\n targetTouches = allTouches.filter(function(touch) {\n return hasParent(touch.target, target);\n });\n\n // collect touches\n if (type === INPUT_START) {\n i = 0;\n while (i < targetTouches.length) {\n targetIds[targetTouches[i].identifier] = true;\n i++;\n }\n }\n\n // filter changed touches to only contain touches that exist in the collected target ids\n i = 0;\n while (i < changedTouches.length) {\n if (targetIds[changedTouches[i].identifier]) {\n changedTargetTouches.push(changedTouches[i]);\n }\n\n // cleanup removed touches\n if (type & (INPUT_END | INPUT_CANCEL)) {\n delete targetIds[changedTouches[i].identifier];\n }\n i++;\n }\n\n if (!changedTargetTouches.length) {\n return;\n }\n\n return [\n // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'\n uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),\n changedTargetTouches\n ];\n}\n\n/**\n * Combined touch and mouse input\n *\n * Touch has a higher priority then mouse, and while touching no mouse events are allowed.\n * This because touch devices also emit mouse events while doing a touch.\n *\n * @constructor\n * @extends Input\n */\n\nvar DEDUP_TIMEOUT = 2500;\nvar DEDUP_DISTANCE = 25;\n\nfunction TouchMouseInput() {\n Input.apply(this, arguments);\n\n var handler = bindFn(this.handler, this);\n this.touch = new TouchInput(this.manager, handler);\n this.mouse = new MouseInput(this.manager, handler);\n\n this.primaryTouch = null;\n this.lastTouches = [];\n}\n\ninherit(TouchMouseInput, Input, {\n /**\n * handle mouse and touch events\n * @param {Hammer} manager\n * @param {String} inputEvent\n * @param {Object} inputData\n */\n handler: function TMEhandler(manager, inputEvent, inputData) {\n var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),\n isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);\n\n if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {\n return;\n }\n\n // when we're in a touch event, record touches to de-dupe synthetic mouse event\n if (isTouch) {\n recordTouches.call(this, inputEvent, inputData);\n } else if (isMouse && isSyntheticEvent.call(this, inputData)) {\n return;\n }\n\n this.callback(manager, inputEvent, inputData);\n },\n\n /**\n * remove the event listeners\n */\n destroy: function destroy() {\n this.touch.destroy();\n this.mouse.destroy();\n }\n});\n\nfunction recordTouches(eventType, eventData) {\n if (eventType & INPUT_START) {\n this.primaryTouch = eventData.changedPointers[0].identifier;\n setLastTouch.call(this, eventData);\n } else if (eventType & (INPUT_END | INPUT_CANCEL)) {\n setLastTouch.call(this, eventData);\n }\n}\n\nfunction setLastTouch(eventData) {\n var touch = eventData.changedPointers[0];\n\n if (touch.identifier === this.primaryTouch) {\n var lastTouch = {x: touch.clientX, y: touch.clientY};\n this.lastTouches.push(lastTouch);\n var lts = this.lastTouches;\n var removeLastTouch = function() {\n var i = lts.indexOf(lastTouch);\n if (i > -1) {\n lts.splice(i, 1);\n }\n };\n setTimeout(removeLastTouch, DEDUP_TIMEOUT);\n }\n}\n\nfunction isSyntheticEvent(eventData) {\n var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;\n for (var i = 0; i < this.lastTouches.length; i++) {\n var t = this.lastTouches[i];\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {\n return true;\n }\n }\n return false;\n}\n\nvar PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');\nvar NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined;\n\n// magical touchAction value\nvar TOUCH_ACTION_COMPUTE = 'compute';\nvar TOUCH_ACTION_AUTO = 'auto';\nvar TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented\nvar TOUCH_ACTION_NONE = 'none';\nvar TOUCH_ACTION_PAN_X = 'pan-x';\nvar TOUCH_ACTION_PAN_Y = 'pan-y';\nvar TOUCH_ACTION_MAP = getTouchActionProps();\n\n/**\n * Touch Action\n * sets the touchAction property or uses the js alternative\n * @param {Manager} manager\n * @param {String} value\n * @constructor\n */\nfunction TouchAction(manager, value) {\n this.manager = manager;\n this.set(value);\n}\n\nTouchAction.prototype = {\n /**\n * set the touchAction value on the element or enable the polyfill\n * @param {String} value\n */\n set: function(value) {\n // find out the touch-action by the event handlers\n if (value == TOUCH_ACTION_COMPUTE) {\n value = this.compute();\n }\n\n if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {\n this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;\n }\n this.actions = value.toLowerCase().trim();\n },\n\n /**\n * just re-set the touchAction value\n */\n update: function() {\n this.set(this.manager.options.touchAction);\n },\n\n /**\n * compute the value for the touchAction property based on the recognizer's settings\n * @returns {String} value\n */\n compute: function() {\n var actions = [];\n each(this.manager.recognizers, function(recognizer) {\n if (boolOrFn(recognizer.options.enable, [recognizer])) {\n actions = actions.concat(recognizer.getTouchAction());\n }\n });\n return cleanTouchActions(actions.join(' '));\n },\n\n /**\n * this method is called on each input cycle and provides the preventing of the browser behavior\n * @param {Object} input\n */\n preventDefaults: function(input) {\n var srcEvent = input.srcEvent;\n var direction = input.offsetDirection;\n\n // if the touch action did prevented once this session\n if (this.manager.session.prevented) {\n srcEvent.preventDefault();\n return;\n }\n\n var actions = this.actions;\n var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];\n\n if (hasNone) {\n //do not prevent defaults if this is a tap gesture\n\n var isTapPointer = input.pointers.length === 1;\n var isTapMovement = input.distance < 2;\n var isTapTouchTime = input.deltaTime < 250;\n\n if (isTapPointer && isTapMovement && isTapTouchTime) {\n return;\n }\n }\n\n if (hasPanX && hasPanY) {\n // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent\n return;\n }\n\n if (hasNone ||\n (hasPanY && direction & DIRECTION_HORIZONTAL) ||\n (hasPanX && direction & DIRECTION_VERTICAL)) {\n return this.preventSrc(srcEvent);\n }\n },\n\n /**\n * call preventDefault to prevent the browser's default behavior (scrolling in most cases)\n * @param {Object} srcEvent\n */\n preventSrc: function(srcEvent) {\n this.manager.session.prevented = true;\n srcEvent.preventDefault();\n }\n};\n\n/**\n * when the touchActions are collected they are not a valid value, so we need to clean things up. *\n * @param {String} actions\n * @returns {*}\n */\nfunction cleanTouchActions(actions) {\n // none\n if (inStr(actions, TOUCH_ACTION_NONE)) {\n return TOUCH_ACTION_NONE;\n }\n\n var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);\n var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);\n\n // if both pan-x and pan-y are set (different recognizers\n // for different directions, e.g. horizontal pan but vertical swipe?)\n // we need none (as otherwise with pan-x pan-y combined none of these\n // recognizers will work, since the browser would handle all panning\n if (hasPanX && hasPanY) {\n return TOUCH_ACTION_NONE;\n }\n\n // pan-x OR pan-y\n if (hasPanX || hasPanY) {\n return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;\n }\n\n // manipulation\n if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {\n return TOUCH_ACTION_MANIPULATION;\n }\n\n return TOUCH_ACTION_AUTO;\n}\n\nfunction getTouchActionProps() {\n if (!NATIVE_TOUCH_ACTION) {\n return false;\n }\n var touchMap = {};\n var cssSupports = window.CSS && window.CSS.supports;\n ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {\n\n // If css.supports is not supported but there is native touch-action assume it supports\n // all values. This is the case for IE 10 and 11.\n touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;\n });\n return touchMap;\n}\n\n/**\n * Recognizer flow explained; *\n * All recognizers have the initial state of POSSIBLE when a input session starts.\n * The definition of a input session is from the first input until the last input, with all it's movement in it. *\n * Example session for mouse-input: mousedown -> mousemove -> mouseup\n *\n * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed\n * which determines with state it should be.\n *\n * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to\n * POSSIBLE to give it another change on the next cycle.\n *\n * Possible\n * |\n * +-----+---------------+\n * | |\n * +-----+-----+ |\n * | | |\n * Failed Cancelled |\n * +-------+------+\n * | |\n * Recognized Began\n * |\n * Changed\n * |\n * Ended/Recognized\n */\nvar STATE_POSSIBLE = 1;\nvar STATE_BEGAN = 2;\nvar STATE_CHANGED = 4;\nvar STATE_ENDED = 8;\nvar STATE_RECOGNIZED = STATE_ENDED;\nvar STATE_CANCELLED = 16;\nvar STATE_FAILED = 32;\n\n/**\n * Recognizer\n * Every recognizer needs to extend from this class.\n * @constructor\n * @param {Object} options\n */\nfunction Recognizer(options) {\n this.options = assign({}, this.defaults, options || {});\n\n this.id = uniqueId();\n\n this.manager = null;\n\n // default is enable true\n this.options.enable = ifUndefined(this.options.enable, true);\n\n this.state = STATE_POSSIBLE;\n\n this.simultaneous = {};\n this.requireFail = [];\n}\n\nRecognizer.prototype = {\n /**\n * @virtual\n * @type {Object}\n */\n defaults: {},\n\n /**\n * set options\n * @param {Object} options\n * @return {Recognizer}\n */\n set: function(options) {\n assign(this.options, options);\n\n // also update the touchAction, in case something changed about the directions/enabled state\n this.manager && this.manager.touchAction.update();\n return this;\n },\n\n /**\n * recognize simultaneous with an other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n recognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {\n return this;\n }\n\n var simultaneous = this.simultaneous;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (!simultaneous[otherRecognizer.id]) {\n simultaneous[otherRecognizer.id] = otherRecognizer;\n otherRecognizer.recognizeWith(this);\n }\n return this;\n },\n\n /**\n * drop the simultaneous link. it doesnt remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRecognizeWith: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n delete this.simultaneous[otherRecognizer.id];\n return this;\n },\n\n /**\n * recognizer can only run when an other is failing\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n requireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {\n return this;\n }\n\n var requireFail = this.requireFail;\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n if (inArray(requireFail, otherRecognizer) === -1) {\n requireFail.push(otherRecognizer);\n otherRecognizer.requireFailure(this);\n }\n return this;\n },\n\n /**\n * drop the requireFailure link. it does not remove the link on the other recognizer.\n * @param {Recognizer} otherRecognizer\n * @returns {Recognizer} this\n */\n dropRequireFailure: function(otherRecognizer) {\n if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {\n return this;\n }\n\n otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);\n var index = inArray(this.requireFail, otherRecognizer);\n if (index > -1) {\n this.requireFail.splice(index, 1);\n }\n return this;\n },\n\n /**\n * has require failures boolean\n * @returns {boolean}\n */\n hasRequireFailures: function() {\n return this.requireFail.length > 0;\n },\n\n /**\n * if the recognizer can recognize simultaneous with an other recognizer\n * @param {Recognizer} otherRecognizer\n * @returns {Boolean}\n */\n canRecognizeWith: function(otherRecognizer) {\n return !!this.simultaneous[otherRecognizer.id];\n },\n\n /**\n * You should use `tryEmit` instead of `emit` directly to check\n * that all the needed recognizers has failed before emitting.\n * @param {Object} input\n */\n emit: function(input) {\n var self = this;\n var state = this.state;\n\n function emit(event) {\n self.manager.emit(event, input);\n }\n\n // 'panstart' and 'panmove'\n if (state < STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n\n emit(self.options.event); // simple 'eventName' events\n\n if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)\n emit(input.additionalEvent);\n }\n\n // panend and pancancel\n if (state >= STATE_ENDED) {\n emit(self.options.event + stateStr(state));\n }\n },\n\n /**\n * Check that all the require failure recognizers has failed,\n * if true, it emits a gesture event,\n * otherwise, setup the state to FAILED.\n * @param {Object} input\n */\n tryEmit: function(input) {\n if (this.canEmit()) {\n return this.emit(input);\n }\n // it's failing anyway\n this.state = STATE_FAILED;\n },\n\n /**\n * can we emit?\n * @returns {boolean}\n */\n canEmit: function() {\n var i = 0;\n while (i < this.requireFail.length) {\n if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {\n return false;\n }\n i++;\n }\n return true;\n },\n\n /**\n * update the recognizer\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n // make a new copy of the inputData\n // so we can change the inputData without messing up the other recognizers\n var inputDataClone = assign({}, inputData);\n\n // is is enabled and allow recognizing?\n if (!boolOrFn(this.options.enable, [this, inputDataClone])) {\n this.reset();\n this.state = STATE_FAILED;\n return;\n }\n\n // reset when we've reached the end\n if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {\n this.state = STATE_POSSIBLE;\n }\n\n this.state = this.process(inputDataClone);\n\n // the recognizer has recognized a gesture\n // so trigger an event\n if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {\n this.tryEmit(inputDataClone);\n }\n },\n\n /**\n * return the state of the recognizer\n * the actual recognizing happens in this method\n * @virtual\n * @param {Object} inputData\n * @returns {Const} STATE\n */\n process: function(inputData) { }, // jshint ignore:line\n\n /**\n * return the preferred touch-action\n * @virtual\n * @returns {Array}\n */\n getTouchAction: function() { },\n\n /**\n * called when the gesture isn't allowed to recognize\n * like when another is being recognized or it is disabled\n * @virtual\n */\n reset: function() { }\n};\n\n/**\n * get a usable string, used as event postfix\n * @param {Const} state\n * @returns {String} state\n */\nfunction stateStr(state) {\n if (state & STATE_CANCELLED) {\n return 'cancel';\n } else if (state & STATE_ENDED) {\n return 'end';\n } else if (state & STATE_CHANGED) {\n return 'move';\n } else if (state & STATE_BEGAN) {\n return 'start';\n }\n return '';\n}\n\n/**\n * direction cons to string\n * @param {Const} direction\n * @returns {String}\n */\nfunction directionStr(direction) {\n if (direction == DIRECTION_DOWN) {\n return 'down';\n } else if (direction == DIRECTION_UP) {\n return 'up';\n } else if (direction == DIRECTION_LEFT) {\n return 'left';\n } else if (direction == DIRECTION_RIGHT) {\n return 'right';\n }\n return '';\n}\n\n/**\n * get a recognizer by name if it is bound to a manager\n * @param {Recognizer|String} otherRecognizer\n * @param {Recognizer} recognizer\n * @returns {Recognizer}\n */\nfunction getRecognizerByNameIfManager(otherRecognizer, recognizer) {\n var manager = recognizer.manager;\n if (manager) {\n return manager.get(otherRecognizer);\n }\n return otherRecognizer;\n}\n\n/**\n * This recognizer is just used as a base for the simple attribute recognizers.\n * @constructor\n * @extends Recognizer\n */\nfunction AttrRecognizer() {\n Recognizer.apply(this, arguments);\n}\n\ninherit(AttrRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof AttrRecognizer\n */\n defaults: {\n /**\n * @type {Number}\n * @default 1\n */\n pointers: 1\n },\n\n /**\n * Used to check if it the recognizer receives valid input, like input.distance > 10.\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {Boolean} recognized\n */\n attrTest: function(input) {\n var optionPointers = this.options.pointers;\n return optionPointers === 0 || input.pointers.length === optionPointers;\n },\n\n /**\n * Process the input and return the state for the recognizer\n * @memberof AttrRecognizer\n * @param {Object} input\n * @returns {*} State\n */\n process: function(input) {\n var state = this.state;\n var eventType = input.eventType;\n\n var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);\n var isValid = this.attrTest(input);\n\n // on cancel input and we've recognized before, return STATE_CANCELLED\n if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {\n return state | STATE_CANCELLED;\n } else if (isRecognized || isValid) {\n if (eventType & INPUT_END) {\n return state | STATE_ENDED;\n } else if (!(state & STATE_BEGAN)) {\n return STATE_BEGAN;\n }\n return state | STATE_CHANGED;\n }\n return STATE_FAILED;\n }\n});\n\n/**\n * Pan\n * Recognized when the pointer is down and moved in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PanRecognizer() {\n AttrRecognizer.apply(this, arguments);\n\n this.pX = null;\n this.pY = null;\n}\n\ninherit(PanRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PanRecognizer\n */\n defaults: {\n event: 'pan',\n threshold: 10,\n pointers: 1,\n direction: DIRECTION_ALL\n },\n\n getTouchAction: function() {\n var direction = this.options.direction;\n var actions = [];\n if (direction & DIRECTION_HORIZONTAL) {\n actions.push(TOUCH_ACTION_PAN_Y);\n }\n if (direction & DIRECTION_VERTICAL) {\n actions.push(TOUCH_ACTION_PAN_X);\n }\n return actions;\n },\n\n directionTest: function(input) {\n var options = this.options;\n var hasMoved = true;\n var distance = input.distance;\n var direction = input.direction;\n var x = input.deltaX;\n var y = input.deltaY;\n\n // lock to axis?\n if (!(direction & options.direction)) {\n if (options.direction & DIRECTION_HORIZONTAL) {\n direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;\n hasMoved = x != this.pX;\n distance = Math.abs(input.deltaX);\n } else {\n direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;\n hasMoved = y != this.pY;\n distance = Math.abs(input.deltaY);\n }\n }\n input.direction = direction;\n return hasMoved && distance > options.threshold && direction & options.direction;\n },\n\n attrTest: function(input) {\n return AttrRecognizer.prototype.attrTest.call(this, input) &&\n (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));\n },\n\n emit: function(input) {\n\n this.pX = input.deltaX;\n this.pY = input.deltaY;\n\n var direction = directionStr(input.direction);\n\n if (direction) {\n input.additionalEvent = this.options.event + direction;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Pinch\n * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).\n * @constructor\n * @extends AttrRecognizer\n */\nfunction PinchRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(PinchRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'pinch',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);\n },\n\n emit: function(input) {\n if (input.scale !== 1) {\n var inOut = input.scale < 1 ? 'in' : 'out';\n input.additionalEvent = this.options.event + inOut;\n }\n this._super.emit.call(this, input);\n }\n});\n\n/**\n * Press\n * Recognized when the pointer is down for x ms without any movement.\n * @constructor\n * @extends Recognizer\n */\nfunction PressRecognizer() {\n Recognizer.apply(this, arguments);\n\n this._timer = null;\n this._input = null;\n}\n\ninherit(PressRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PressRecognizer\n */\n defaults: {\n event: 'press',\n pointers: 1,\n time: 251, // minimal time of the pointer to be pressed\n threshold: 9 // a minimal movement is ok, but keep it low\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_AUTO];\n },\n\n process: function(input) {\n var options = this.options;\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTime = input.deltaTime > options.time;\n\n this._input = input;\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {\n this.reset();\n } else if (input.eventType & INPUT_START) {\n this.reset();\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.time, this);\n } else if (input.eventType & INPUT_END) {\n return STATE_RECOGNIZED;\n }\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function(input) {\n if (this.state !== STATE_RECOGNIZED) {\n return;\n }\n\n if (input && (input.eventType & INPUT_END)) {\n this.manager.emit(this.options.event + 'up', input);\n } else {\n this._input.timeStamp = now();\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Rotate\n * Recognized when two or more pointer are moving in a circular motion.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction RotateRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(RotateRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof RotateRecognizer\n */\n defaults: {\n event: 'rotate',\n threshold: 0,\n pointers: 2\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_NONE];\n },\n\n attrTest: function(input) {\n return this._super.attrTest.call(this, input) &&\n (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);\n }\n});\n\n/**\n * Swipe\n * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.\n * @constructor\n * @extends AttrRecognizer\n */\nfunction SwipeRecognizer() {\n AttrRecognizer.apply(this, arguments);\n}\n\ninherit(SwipeRecognizer, AttrRecognizer, {\n /**\n * @namespace\n * @memberof SwipeRecognizer\n */\n defaults: {\n event: 'swipe',\n threshold: 10,\n velocity: 0.3,\n direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,\n pointers: 1\n },\n\n getTouchAction: function() {\n return PanRecognizer.prototype.getTouchAction.call(this);\n },\n\n attrTest: function(input) {\n var direction = this.options.direction;\n var velocity;\n\n if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {\n velocity = input.overallVelocity;\n } else if (direction & DIRECTION_HORIZONTAL) {\n velocity = input.overallVelocityX;\n } else if (direction & DIRECTION_VERTICAL) {\n velocity = input.overallVelocityY;\n }\n\n return this._super.attrTest.call(this, input) &&\n direction & input.offsetDirection &&\n input.distance > this.options.threshold &&\n input.maxPointers == this.options.pointers &&\n abs(velocity) > this.options.velocity && input.eventType & INPUT_END;\n },\n\n emit: function(input) {\n var direction = directionStr(input.offsetDirection);\n if (direction) {\n this.manager.emit(this.options.event + direction, input);\n }\n\n this.manager.emit(this.options.event, input);\n }\n});\n\n/**\n * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur\n * between the given interval and position. The delay option can be used to recognize multi-taps without firing\n * a single tap.\n *\n * The eventData from the emitted event contains the property `tapCount`, which contains the amount of\n * multi-taps being recognized.\n * @constructor\n * @extends Recognizer\n */\nfunction TapRecognizer() {\n Recognizer.apply(this, arguments);\n\n // previous time and center,\n // used for tap counting\n this.pTime = false;\n this.pCenter = false;\n\n this._timer = null;\n this._input = null;\n this.count = 0;\n}\n\ninherit(TapRecognizer, Recognizer, {\n /**\n * @namespace\n * @memberof PinchRecognizer\n */\n defaults: {\n event: 'tap',\n pointers: 1,\n taps: 1,\n interval: 300, // max time between the multi-tap taps\n time: 250, // max time of the pointer to be down (like finger on the screen)\n threshold: 9, // a minimal movement is ok, but keep it low\n posThreshold: 10 // a multi-tap can be a bit off the initial position\n },\n\n getTouchAction: function() {\n return [TOUCH_ACTION_MANIPULATION];\n },\n\n process: function(input) {\n var options = this.options;\n\n var validPointers = input.pointers.length === options.pointers;\n var validMovement = input.distance < options.threshold;\n var validTouchTime = input.deltaTime < options.time;\n\n this.reset();\n\n if ((input.eventType & INPUT_START) && (this.count === 0)) {\n return this.failTimeout();\n }\n\n // we only allow little movement\n // and we've reached an end event, so a tap is possible\n if (validMovement && validTouchTime && validPointers) {\n if (input.eventType != INPUT_END) {\n return this.failTimeout();\n }\n\n var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;\n var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;\n\n this.pTime = input.timeStamp;\n this.pCenter = input.center;\n\n if (!validMultiTap || !validInterval) {\n this.count = 1;\n } else {\n this.count += 1;\n }\n\n this._input = input;\n\n // if tap count matches we have recognized it,\n // else it has began recognizing...\n var tapCount = this.count % options.taps;\n if (tapCount === 0) {\n // no failing requirements, immediately trigger the tap event\n // or wait as long as the multitap interval to trigger\n if (!this.hasRequireFailures()) {\n return STATE_RECOGNIZED;\n } else {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_RECOGNIZED;\n this.tryEmit();\n }, options.interval, this);\n return STATE_BEGAN;\n }\n }\n }\n return STATE_FAILED;\n },\n\n failTimeout: function() {\n this._timer = setTimeoutContext(function() {\n this.state = STATE_FAILED;\n }, this.options.interval, this);\n return STATE_FAILED;\n },\n\n reset: function() {\n clearTimeout(this._timer);\n },\n\n emit: function() {\n if (this.state == STATE_RECOGNIZED) {\n this._input.tapCount = this.count;\n this.manager.emit(this.options.event, this._input);\n }\n }\n});\n\n/**\n * Simple way to create a manager with a default set of recognizers.\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Hammer(element, options) {\n options = options || {};\n options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);\n return new Manager(element, options);\n}\n\n/**\n * @const {string}\n */\nHammer.VERSION = '2.0.7';\n\n/**\n * default settings\n * @namespace\n */\nHammer.defaults = {\n /**\n * set if DOM events are being triggered.\n * But this is slower and unused by simple implementations, so disabled by default.\n * @type {Boolean}\n * @default false\n */\n domEvents: false,\n\n /**\n * The value for the touchAction property/fallback.\n * When set to `compute` it will magically set the correct value based on the added recognizers.\n * @type {String}\n * @default compute\n */\n touchAction: TOUCH_ACTION_COMPUTE,\n\n /**\n * @type {Boolean}\n * @default true\n */\n enable: true,\n\n /**\n * EXPERIMENTAL FEATURE -- can be removed/changed\n * Change the parent input target element.\n * If Null, then it is being set the to main element.\n * @type {Null|EventTarget}\n * @default null\n */\n inputTarget: null,\n\n /**\n * force an input class\n * @type {Null|Function}\n * @default null\n */\n inputClass: null,\n\n /**\n * Default recognizer setup when calling `Hammer()`\n * When creating a new Manager these will be skipped.\n * @type {Array}\n */\n preset: [\n // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]\n [RotateRecognizer, {enable: false}],\n [PinchRecognizer, {enable: false}, ['rotate']],\n [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],\n [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],\n [TapRecognizer],\n [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],\n [PressRecognizer]\n ],\n\n /**\n * Some CSS properties can be used to improve the working of Hammer.\n * Add them to this method and they will be set when creating a new Manager.\n * @namespace\n */\n cssProps: {\n /**\n * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userSelect: 'none',\n\n /**\n * Disable the Windows Phone grippers when pressing an element.\n * @type {String}\n * @default 'none'\n */\n touchSelect: 'none',\n\n /**\n * Disables the default callout shown when you touch and hold a touch target.\n * On iOS, when you touch and hold a touch target such as a link, Safari displays\n * a callout containing information about the link. This property allows you to disable that callout.\n * @type {String}\n * @default 'none'\n */\n touchCallout: 'none',\n\n /**\n * Specifies whether zooming is enabled. Used by IE10>\n * @type {String}\n * @default 'none'\n */\n contentZooming: 'none',\n\n /**\n * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.\n * @type {String}\n * @default 'none'\n */\n userDrag: 'none',\n\n /**\n * Overrides the highlight color shown when the user taps a link or a JavaScript\n * clickable element in iOS. This property obeys the alpha value, if specified.\n * @type {String}\n * @default 'rgba(0,0,0,0)'\n */\n tapHighlightColor: 'rgba(0,0,0,0)'\n }\n};\n\nvar STOP = 1;\nvar FORCED_STOP = 2;\n\n/**\n * Manager\n * @param {HTMLElement} element\n * @param {Object} [options]\n * @constructor\n */\nfunction Manager(element, options) {\n this.options = assign({}, Hammer.defaults, options || {});\n\n this.options.inputTarget = this.options.inputTarget || element;\n\n this.handlers = {};\n this.session = {};\n this.recognizers = [];\n this.oldCssProps = {};\n\n this.element = element;\n this.input = createInputInstance(this);\n this.touchAction = new TouchAction(this, this.options.touchAction);\n\n toggleCssProps(this, true);\n\n each(this.options.recognizers, function(item) {\n var recognizer = this.add(new (item[0])(item[1]));\n item[2] && recognizer.recognizeWith(item[2]);\n item[3] && recognizer.requireFailure(item[3]);\n }, this);\n}\n\nManager.prototype = {\n /**\n * set options\n * @param {Object} options\n * @returns {Manager}\n */\n set: function(options) {\n assign(this.options, options);\n\n // Options that need a little more setup\n if (options.touchAction) {\n this.touchAction.update();\n }\n if (options.inputTarget) {\n // Clean up existing event listeners and reinitialize\n this.input.destroy();\n this.input.target = options.inputTarget;\n this.input.init();\n }\n return this;\n },\n\n /**\n * stop recognizing for this session.\n * This session will be discarded, when a new [input]start event is fired.\n * When forced, the recognizer cycle is stopped immediately.\n * @param {Boolean} [force]\n */\n stop: function(force) {\n this.session.stopped = force ? FORCED_STOP : STOP;\n },\n\n /**\n * run the recognizers!\n * called by the inputHandler function on every movement of the pointers (touches)\n * it walks through all the recognizers and tries to detect the gesture that is being made\n * @param {Object} inputData\n */\n recognize: function(inputData) {\n var session = this.session;\n if (session.stopped) {\n return;\n }\n\n // run the touch-action polyfill\n this.touchAction.preventDefaults(inputData);\n\n var recognizer;\n var recognizers = this.recognizers;\n\n // this holds the recognizer that is being recognized.\n // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED\n // if no recognizer is detecting a thing, it is set to `null`\n var curRecognizer = session.curRecognizer;\n\n // reset when the last recognizer is recognized\n // or when we're in a new session\n if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {\n curRecognizer = session.curRecognizer = null;\n }\n\n var i = 0;\n while (i < recognizers.length) {\n recognizer = recognizers[i];\n\n // find out if we are allowed try to recognize the input for this one.\n // 1. allow if the session is NOT forced stopped (see the .stop() method)\n // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one\n // that is being recognized.\n // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.\n // this can be setup with the `recognizeWith()` method on the recognizer.\n if (session.stopped !== FORCED_STOP && ( // 1\n !curRecognizer || recognizer == curRecognizer || // 2\n recognizer.canRecognizeWith(curRecognizer))) { // 3\n recognizer.recognize(inputData);\n } else {\n recognizer.reset();\n }\n\n // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the\n // current active recognizer. but only if we don't already have an active recognizer\n if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {\n curRecognizer = session.curRecognizer = recognizer;\n }\n i++;\n }\n },\n\n /**\n * get a recognizer by its event name.\n * @param {Recognizer|String} recognizer\n * @returns {Recognizer|Null}\n */\n get: function(recognizer) {\n if (recognizer instanceof Recognizer) {\n return recognizer;\n }\n\n var recognizers = this.recognizers;\n for (var i = 0; i < recognizers.length; i++) {\n if (recognizers[i].options.event == recognizer) {\n return recognizers[i];\n }\n }\n return null;\n },\n\n /**\n * add a recognizer to the manager\n * existing recognizers with the same event name will be removed\n * @param {Recognizer} recognizer\n * @returns {Recognizer|Manager}\n */\n add: function(recognizer) {\n if (invokeArrayArg(recognizer, 'add', this)) {\n return this;\n }\n\n // remove existing\n var existing = this.get(recognizer.options.event);\n if (existing) {\n this.remove(existing);\n }\n\n this.recognizers.push(recognizer);\n recognizer.manager = this;\n\n this.touchAction.update();\n return recognizer;\n },\n\n /**\n * remove a recognizer by name or instance\n * @param {Recognizer|String} recognizer\n * @returns {Manager}\n */\n remove: function(recognizer) {\n if (invokeArrayArg(recognizer, 'remove', this)) {\n return this;\n }\n\n recognizer = this.get(recognizer);\n\n // let's make sure this recognizer exists\n if (recognizer) {\n var recognizers = this.recognizers;\n var index = inArray(recognizers, recognizer);\n\n if (index !== -1) {\n recognizers.splice(index, 1);\n this.touchAction.update();\n }\n }\n\n return this;\n },\n\n /**\n * bind event\n * @param {String} events\n * @param {Function} handler\n * @returns {EventEmitter} this\n */\n on: function(events, handler) {\n if (events === undefined) {\n return;\n }\n if (handler === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n handlers[event] = handlers[event] || [];\n handlers[event].push(handler);\n });\n return this;\n },\n\n /**\n * unbind event, leave emit blank to remove all handlers\n * @param {String} events\n * @param {Function} [handler]\n * @returns {EventEmitter} this\n */\n off: function(events, handler) {\n if (events === undefined) {\n return;\n }\n\n var handlers = this.handlers;\n each(splitStr(events), function(event) {\n if (!handler) {\n delete handlers[event];\n } else {\n handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);\n }\n });\n return this;\n },\n\n /**\n * emit event to the listeners\n * @param {String} event\n * @param {Object} data\n */\n emit: function(event, data) {\n // we also want to trigger dom events\n if (this.options.domEvents) {\n triggerDomEvent(event, data);\n }\n\n // no handlers, so skip it all\n var handlers = this.handlers[event] && this.handlers[event].slice();\n if (!handlers || !handlers.length) {\n return;\n }\n\n data.type = event;\n data.preventDefault = function() {\n data.srcEvent.preventDefault();\n };\n\n var i = 0;\n while (i < handlers.length) {\n handlers[i](data);\n i++;\n }\n },\n\n /**\n * destroy the manager and unbinds all events\n * it doesn't unbind dom events, that is the user own responsibility\n */\n destroy: function() {\n this.element && toggleCssProps(this, false);\n\n this.handlers = {};\n this.session = {};\n this.input.destroy();\n this.element = null;\n }\n};\n\n/**\n * add/remove the css properties as defined in manager.options.cssProps\n * @param {Manager} manager\n * @param {Boolean} add\n */\nfunction toggleCssProps(manager, add) {\n var element = manager.element;\n if (!element.style) {\n return;\n }\n var prop;\n each(manager.options.cssProps, function(value, name) {\n prop = prefixed(element.style, name);\n if (add) {\n manager.oldCssProps[prop] = element.style[prop];\n element.style[prop] = value;\n } else {\n element.style[prop] = manager.oldCssProps[prop] || '';\n }\n });\n if (!add) {\n manager.oldCssProps = {};\n }\n}\n\n/**\n * trigger dom event\n * @param {String} event\n * @param {Object} data\n */\nfunction triggerDomEvent(event, data) {\n var gestureEvent = document.createEvent('Event');\n gestureEvent.initEvent(event, true, true);\n gestureEvent.gesture = data;\n data.target.dispatchEvent(gestureEvent);\n}\n\nassign(Hammer, {\n INPUT_START: INPUT_START,\n INPUT_MOVE: INPUT_MOVE,\n INPUT_END: INPUT_END,\n INPUT_CANCEL: INPUT_CANCEL,\n\n STATE_POSSIBLE: STATE_POSSIBLE,\n STATE_BEGAN: STATE_BEGAN,\n STATE_CHANGED: STATE_CHANGED,\n STATE_ENDED: STATE_ENDED,\n STATE_RECOGNIZED: STATE_RECOGNIZED,\n STATE_CANCELLED: STATE_CANCELLED,\n STATE_FAILED: STATE_FAILED,\n\n DIRECTION_NONE: DIRECTION_NONE,\n DIRECTION_LEFT: DIRECTION_LEFT,\n DIRECTION_RIGHT: DIRECTION_RIGHT,\n DIRECTION_UP: DIRECTION_UP,\n DIRECTION_DOWN: DIRECTION_DOWN,\n DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,\n DIRECTION_VERTICAL: DIRECTION_VERTICAL,\n DIRECTION_ALL: DIRECTION_ALL,\n\n Manager: Manager,\n Input: Input,\n TouchAction: TouchAction,\n\n TouchInput: TouchInput,\n MouseInput: MouseInput,\n PointerEventInput: PointerEventInput,\n TouchMouseInput: TouchMouseInput,\n SingleTouchInput: SingleTouchInput,\n\n Recognizer: Recognizer,\n AttrRecognizer: AttrRecognizer,\n Tap: TapRecognizer,\n Pan: PanRecognizer,\n Swipe: SwipeRecognizer,\n Pinch: PinchRecognizer,\n Rotate: RotateRecognizer,\n Press: PressRecognizer,\n\n on: addEventListeners,\n off: removeEventListeners,\n each: each,\n merge: merge,\n extend: extend,\n assign: assign,\n inherit: inherit,\n bindFn: bindFn,\n prefixed: prefixed\n});\n\n// this prevents errors when Hammer is loaded in the presence of an AMD\n// style loader but by script tag, not by the loader.\nvar freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line\nfreeGlobal.Hammer = Hammer;\n\nif (typeof define === 'function' && define.amd) {\n define(function() {\n return Hammer;\n });\n} else if (typeof module != 'undefined' && module.exports) {\n module.exports = Hammer;\n} else {\n window[exportName] = Hammer;\n}\n\n})(window, document, 'Hammer');\n","/*! pako 2.0.2 https://github.com/nodeca/pako @license (MIT AND Zlib) */\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//const Z_FILTERED = 1;\n//const Z_HUFFMAN_ONLY = 2;\n//const Z_RLE = 3;\nconst Z_FIXED = 4;\n//const Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nconst Z_BINARY = 0;\nconst Z_TEXT = 1;\n//const Z_ASCII = 1; // = Z_TEXT\nconst Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nconst STORED_BLOCK = 0;\nconst STATIC_TREES = 1;\nconst DYN_TREES = 2;\n/* The three kinds of block type */\n\nconst MIN_MATCH = 3;\nconst MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nconst LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nconst LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nconst L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nconst D_CODES = 30;\n/* number of distance codes */\n\nconst BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nconst HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nconst MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nconst MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nconst END_BLOCK = 256;\n/* end of block literal code */\n\nconst REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nconst REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nconst REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nconst extra_lbits = /* extra bits for each length code */\n new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);\n\nconst extra_dbits = /* extra bits for each distance code */\n new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);\n\nconst extra_blbits = /* extra bits for each bit length code */\n new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);\n\nconst bl_order =\n new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nconst DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nconst static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nconst static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nconst _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nconst _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nconst base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nconst base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nlet static_l_desc;\nlet static_d_desc;\nlet static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nconst d_code = (dist) => {\n\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n};\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nconst put_short = (s, w) => {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n};\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nconst send_bits = (s, value, length) => {\n\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n};\n\n\nconst send_code = (s, c, tree) => {\n\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n};\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nconst bi_reverse = (code, len) => {\n\n let res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nconst bi_flush = (s) => {\n\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n};\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nconst gen_bitlen = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const max_code = desc.max_code;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const extra = desc.stat_desc.extra_bits;\n const base = desc.stat_desc.extra_base;\n const max_length = desc.stat_desc.max_length;\n let h; /* heap index */\n let n, m; /* iterate over the tree elements */\n let bits; /* bit length */\n let xbits; /* extra bits */\n let f; /* frequency */\n let overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n};\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nconst gen_codes = (tree, max_code, bl_count) =>\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n let code = 0; /* running code value */\n let bits; /* bit index */\n let n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n let len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n};\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nconst tr_static_init = () => {\n\n let n; /* iterates over tree elements */\n let bits; /* bit counter */\n let length; /* length value */\n let code; /* code value */\n let dist; /* distance index */\n const bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n};\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nconst init_block = (s) => {\n\n let n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n};\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nconst bi_windup = (s) =>\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n};\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nconst copy_block = (s, buf, len, header) =>\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending);\n s.pending += len;\n};\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nconst smaller = (tree, n, m, depth) => {\n\n const _n2 = n * 2;\n const _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n};\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nconst pqdownheap = (s, tree, k) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n const v = s.heap[k];\n let j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n};\n\n\n// inlined manually\n// const SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nconst compress_block = (s, ltree, dtree) =>\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n let dist; /* distance of matched string */\n let lc; /* match length or unmatched char (if dist == 0) */\n let lx = 0; /* running index in l_buf */\n let code; /* the code to send */\n let extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n};\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nconst build_tree = (s, desc) =>\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n const tree = desc.dyn_tree;\n const stree = desc.stat_desc.static_tree;\n const has_stree = desc.stat_desc.has_stree;\n const elems = desc.stat_desc.elems;\n let n, m; /* iterate over heap elements */\n let max_code = -1; /* largest code with non zero frequency */\n let node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n};\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nconst scan_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nconst send_tree = (s, tree, max_code) =>\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n let n; /* iterates over all tree elements */\n let prevlen = -1; /* last emitted length */\n let curlen; /* length of current code */\n\n let nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n let count = 0; /* repeat count of the current code */\n let max_count = 7; /* max repeat count */\n let min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n};\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nconst build_bl_tree = (s) => {\n\n let max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n};\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nconst send_all_trees = (s, lcodes, dcodes, blcodes) =>\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n let rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n};\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nconst detect_data_type = (s) => {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n let black_mask = 0xf3ffc07f;\n let n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n};\n\n\nlet static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nconst _tr_init = (s) =>\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n};\n\n\n/* ===========================================================================\n * Send a stored block\n */\nconst _tr_stored_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n};\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nconst _tr_align = (s) => {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n};\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nconst _tr_flush_block = (s, buf, stored_len, last) =>\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n let opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n let max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n};\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nconst _tr_tally = (s, dist, lc) =>\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //let out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n};\n\nvar _tr_init_1 = _tr_init;\nvar _tr_stored_block_1 = _tr_stored_block;\nvar _tr_flush_block_1 = _tr_flush_block;\nvar _tr_tally_1 = _tr_tally;\nvar _tr_align_1 = _tr_align;\n\nvar trees = {\n\t_tr_init: _tr_init_1,\n\t_tr_stored_block: _tr_stored_block_1,\n\t_tr_flush_block: _tr_flush_block_1,\n\t_tr_tally: _tr_tally_1,\n\t_tr_align: _tr_align_1\n};\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst adler32 = (adler, buf, len, pos) => {\n let s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n};\n\n\nvar adler32_1 = adler32;\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nconst makeTable = () => {\n let c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n};\n\n// Create table on load. Just 255 signed longs. Not a problem.\nconst crcTable = new Uint32Array(makeTable());\n\n\nconst crc32 = (crc, buf, len, pos) => {\n const t = crcTable;\n const end = pos + len;\n\n crc ^= -1;\n\n for (let i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n};\n\n\nvar crc32_1 = crc32;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar messages = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar constants = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst { _tr_init: _tr_init$1, _tr_stored_block: _tr_stored_block$1, _tr_flush_block: _tr_flush_block$1, _tr_tally: _tr_tally$1, _tr_align: _tr_align$1 } = trees;\n\n\n\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH, Z_PARTIAL_FLUSH, Z_FULL_FLUSH, Z_FINISH, Z_BLOCK,\n Z_OK, Z_STREAM_END, Z_STREAM_ERROR, Z_DATA_ERROR, Z_BUF_ERROR,\n Z_DEFAULT_COMPRESSION,\n Z_FILTERED, Z_HUFFMAN_ONLY, Z_RLE, Z_FIXED: Z_FIXED$1, Z_DEFAULT_STRATEGY,\n Z_UNKNOWN: Z_UNKNOWN$1,\n Z_DEFLATED\n} = constants;\n\n/*============================================================================*/\n\n\nconst MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nconst MAX_WBITS = 15;\n/* 32K LZ77 window */\nconst DEF_MEM_LEVEL = 8;\n\n\nconst LENGTH_CODES$1 = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nconst LITERALS$1 = 256;\n/* number of literal bytes 0..255 */\nconst L_CODES$1 = LITERALS$1 + 1 + LENGTH_CODES$1;\n/* number of Literal or Length codes, including the END_BLOCK code */\nconst D_CODES$1 = 30;\n/* number of distance codes */\nconst BL_CODES$1 = 19;\n/* number of codes used to transfer the bit lengths */\nconst HEAP_SIZE$1 = 2 * L_CODES$1 + 1;\n/* maximum heap size */\nconst MAX_BITS$1 = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nconst MIN_MATCH$1 = 3;\nconst MAX_MATCH$1 = 258;\nconst MIN_LOOKAHEAD = (MAX_MATCH$1 + MIN_MATCH$1 + 1);\n\nconst PRESET_DICT = 0x20;\n\nconst INIT_STATE = 42;\nconst EXTRA_STATE = 69;\nconst NAME_STATE = 73;\nconst COMMENT_STATE = 91;\nconst HCRC_STATE = 103;\nconst BUSY_STATE = 113;\nconst FINISH_STATE = 666;\n\nconst BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nconst BS_BLOCK_DONE = 2; /* block flush performed */\nconst BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nconst BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nconst OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nconst err = (strm, errorCode) => {\n strm.msg = messages[errorCode];\n return errorCode;\n};\n\nconst rank = (f) => {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n};\n\nconst zero$1 = (buf) => {\n let len = buf.length; while (--len >= 0) { buf[len] = 0; }\n};\n\n\n/* eslint-disable new-cap */\nlet HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask;\n// This hash causes less collisions, https://github.com/nodeca/pako/issues/135\n// But breaks binary compatibility\n//let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask;\nlet HASH = HASH_ZLIB;\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nconst flush_pending = (strm) => {\n const s = strm.state;\n\n //_tr_flush_bits(s);\n let len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n};\n\n\nconst flush_block_only = (s, last) => {\n _tr_flush_block$1(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n};\n\n\nconst put_byte = (s, b) => {\n s.pending_buf[s.pending++] = b;\n};\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nconst putShortMSB = (s, b) => {\n\n // put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n};\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nconst read_buf = (strm, buf, start, size) => {\n\n let len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n buf.set(strm.input.subarray(strm.next_in, strm.next_in + len), start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32_1(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32_1(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n};\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nconst longest_match = (s, cur_match) => {\n\n let chain_length = s.max_chain_length; /* max hash chain length */\n let scan = s.strstart; /* current string */\n let match; /* matched string */\n let len; /* length of current match */\n let best_len = s.prev_length; /* best match length so far */\n let nice_match = s.nice_match; /* stop if match long enough */\n const limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n const _win = s.window; // shortcut\n\n const wmask = s.w_mask;\n const prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n const strend = s.strstart + MAX_MATCH$1;\n let scan_end1 = _win[scan + best_len - 1];\n let scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH$1 - (strend - scan);\n scan = strend - MAX_MATCH$1;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n};\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nconst fill_window = (s) => {\n\n const _w_size = s.w_size;\n let p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH$1) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + 1]);\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH$1) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// const curr = s.strstart + s.lookahead;\n// let init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n};\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nconst deflate_stored = (s, flush) => {\n\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n let max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n const max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n};\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nconst deflate_fast = (s, flush) => {\n\n let hash_head; /* head of the hash chain */\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH$1) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH$1) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally$1(s, s.strstart - s.match_start, s.match_length - MIN_MATCH$1);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH$1) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + 1]);\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH$1 - 1)) ? s.strstart : MIN_MATCH$1 - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nconst deflate_slow = (s, flush) => {\n\n let hash_head; /* head of hash chain */\n let bflush; /* set if current block must be flushed */\n\n let max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH$1) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH$1 - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH$1 && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH$1 - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH$1 && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH$1;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = _tr_tally$1(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH$1);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = HASH(s, s.ins_h, s.window[s.strstart + MIN_MATCH$1 - 1]);\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH$1 - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH$1 - 1 ? s.strstart : MIN_MATCH$1 - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n};\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nconst deflate_rle = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n let prev; /* byte at distance one to match */\n let scan, strend; /* scan goes up to strend for length of run */\n\n const _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH$1) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH$1 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH$1 && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH$1;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH$1 - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH$1) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = _tr_tally$1(s, 1, s.match_length - MIN_MATCH$1);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nconst deflate_huff = (s, flush) => {\n\n let bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = _tr_tally$1(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n};\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nconst configuration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nconst lm_init = (s) => {\n\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero$1(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n s.match_available = 0;\n s.ins_h = 0;\n};\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new Uint16Array(HEAP_SIZE$1 * 2);\n this.dyn_dtree = new Uint16Array((2 * D_CODES$1 + 1) * 2);\n this.bl_tree = new Uint16Array((2 * BL_CODES$1 + 1) * 2);\n zero$1(this.dyn_ltree);\n zero$1(this.dyn_dtree);\n zero$1(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new Uint16Array(MAX_BITS$1 + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new Uint16Array(2 * L_CODES$1 + 1); /* heap used to build the Huffman trees */\n zero$1(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new Uint16Array(2 * L_CODES$1 + 1); //uch depth[2*L_CODES+1];\n zero$1(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nconst deflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN$1;\n\n const s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n _tr_init$1(s);\n return Z_OK;\n};\n\n\nconst deflateReset = (strm) => {\n\n const ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n};\n\n\nconst deflateSetHeader = (strm, head) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n};\n\n\nconst deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => {\n\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n let wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED$1) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n const s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH$1 - 1) / MIN_MATCH$1);\n\n s.window = new Uint8Array(s.w_size * 2);\n s.head = new Uint16Array(s.hash_size);\n s.prev = new Uint16Array(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new Uint8Array(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n};\n\nconst deflateInit = (strm, level) => {\n\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n};\n\n\nconst deflate = (strm, flush) => {\n\n let beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n const old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n let level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32_1(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n _tr_align$1(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n _tr_stored_block$1(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero$1(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n};\n\n\nconst deflateEnd = (strm) => {\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n};\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nconst deflateSetDictionary = (strm, dictionary) => {\n\n let dictLength = dictionary.length;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n const s = strm.state;\n const wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32_1(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero$1(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n let tmpDict = new Uint8Array(s.w_size);\n tmpDict.set(dictionary.subarray(dictLength - s.w_size, dictLength), 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n const avail = strm.avail_in;\n const next = strm.next_in;\n const input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH$1) {\n let str = s.strstart;\n let n = s.lookahead - (MIN_MATCH$1 - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = HASH(s, s.ins_h, s.window[str + MIN_MATCH$1 - 1]);\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH$1 - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH$1 - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n};\n\n\nvar deflateInit_1 = deflateInit;\nvar deflateInit2_1 = deflateInit2;\nvar deflateReset_1 = deflateReset;\nvar deflateResetKeep_1 = deflateResetKeep;\nvar deflateSetHeader_1 = deflateSetHeader;\nvar deflate_2 = deflate;\nvar deflateEnd_1 = deflateEnd;\nvar deflateSetDictionary_1 = deflateSetDictionary;\nvar deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.deflateBound = deflateBound;\nmodule.exports.deflateCopy = deflateCopy;\nmodule.exports.deflateParams = deflateParams;\nmodule.exports.deflatePending = deflatePending;\nmodule.exports.deflatePrime = deflatePrime;\nmodule.exports.deflateTune = deflateTune;\n*/\n\nvar deflate_1 = {\n\tdeflateInit: deflateInit_1,\n\tdeflateInit2: deflateInit2_1,\n\tdeflateReset: deflateReset_1,\n\tdeflateResetKeep: deflateResetKeep_1,\n\tdeflateSetHeader: deflateSetHeader_1,\n\tdeflate: deflate_2,\n\tdeflateEnd: deflateEnd_1,\n\tdeflateSetDictionary: deflateSetDictionary_1,\n\tdeflateInfo: deflateInfo\n};\n\nconst _has = (obj, key) => {\n return Object.prototype.hasOwnProperty.call(obj, key);\n};\n\nvar assign = function (obj /*from1, from2, from3, ...*/) {\n const sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n const source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (const p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// Join array of chunks to single array.\nvar flattenChunks = (chunks) => {\n // calculate data length\n let len = 0;\n\n for (let i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n const result = new Uint8Array(len);\n\n for (let i = 0, pos = 0, l = chunks.length; i < l; i++) {\n let chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n};\n\nvar common = {\n\tassign: assign,\n\tflattenChunks: flattenChunks\n};\n\n// String encode/decode helpers\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nlet STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nconst _utf8len = new Uint8Array(256);\nfor (let q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nvar string2buf = (str) => {\n let buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new Uint8Array(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper\nconst buf2binstring = (buf, len) => {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if (buf.subarray && STR_APPLY_UIA_OK) {\n return String.fromCharCode.apply(null, buf.length === len ? buf : buf.subarray(0, len));\n }\n }\n\n let result = '';\n for (let i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n};\n\n\n// convert array to string\nvar buf2string = (buf, max) => {\n let i, out;\n const len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n const utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n let c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n let c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nvar utf8border = (buf, max) => {\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n let pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n\nvar strings = {\n\tstring2buf: string2buf,\n\tbuf2string: buf2string,\n\tutf8border: utf8border\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nvar zstream = ZStream;\n\nconst toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$1, Z_SYNC_FLUSH, Z_FULL_FLUSH: Z_FULL_FLUSH$1, Z_FINISH: Z_FINISH$1,\n Z_OK: Z_OK$1, Z_STREAM_END: Z_STREAM_END$1,\n Z_DEFAULT_COMPRESSION: Z_DEFAULT_COMPRESSION$1,\n Z_DEFAULT_STRATEGY: Z_DEFAULT_STRATEGY$1,\n Z_DEFLATED: Z_DEFLATED$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * , chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n this.options = common.assign({\n level: Z_DEFAULT_COMPRESSION$1,\n method: Z_DEFLATED$1,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY$1\n }, options || {});\n\n let opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = deflate_1.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK$1) {\n throw new Error(messages[status]);\n }\n\n if (opt.header) {\n deflate_1.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n let dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = deflate_1.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK$1) {\n throw new Error(messages[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must\n * have `flush_mode` Z_FINISH (or `true`). That will flush internal pending\n * buffers and call [[Deflate#onEnd]].\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n let status, _flush_mode;\n\n if (this.ended) { return false; }\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$1 : Z_NO_FLUSH$1;\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n // Make sure avail_out > 6 to avoid repeating markers\n if ((_flush_mode === Z_SYNC_FLUSH || _flush_mode === Z_FULL_FLUSH$1) && strm.avail_out <= 6) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n status = deflate_1.deflate(strm, _flush_mode);\n\n // Ended => flush and finish\n if (status === Z_STREAM_END$1) {\n if (strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n }\n status = deflate_1.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK$1;\n }\n\n // Flush if out buffer full\n if (strm.avail_out === 0) {\n this.onData(strm.output);\n continue;\n }\n\n // Flush if requested and has data\n if (_flush_mode > 0 && strm.next_out > 0) {\n this.onData(strm.output.subarray(0, strm.next_out));\n strm.avail_out = 0;\n continue;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array): output data.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$1) {\n this.result = common.flattenChunks(this.chunks);\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const data = new Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate$1(input, options) {\n const deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || messages[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate$1(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array\n * - data (Uint8Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate$1(input, options);\n}\n\n\nvar Deflate_1 = Deflate;\nvar deflate_2$1 = deflate$1;\nvar deflateRaw_1 = deflateRaw;\nvar gzip_1 = gzip;\nvar constants$1 = constants;\n\nvar deflate_1$1 = {\n\tDeflate: Deflate_1,\n\tdeflate: deflate_2$1,\n\tdeflateRaw: deflateRaw_1,\n\tgzip: gzip_1,\n\tconstants: constants$1\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nconst BAD = 30; /* got a data error -- remain here until reset */\nconst TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nvar inffast = function inflate_fast(strm, start) {\n let _in; /* local strm.input */\n let last; /* have enough input while in < last */\n let _out; /* local strm.output */\n let beg; /* inflate()'s initial strm.output */\n let end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n let dmax; /* maximum distance from zlib header */\n//#endif\n let wsize; /* window size or zero if not using window */\n let whave; /* valid bytes in the window */\n let wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n let s_window; /* allocated sliding window, if wsize != 0 */\n let hold; /* local strm.hold */\n let bits; /* local strm.bits */\n let lcode; /* local strm.lencode */\n let dcode; /* local strm.distcode */\n let lmask; /* mask for first level of length codes */\n let dmask; /* mask for first level of distance codes */\n let here; /* retrieved table entry */\n let op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n let len; /* match length, unused bytes */\n let dist; /* match distance */\n let from; /* where to copy match from */\n let from_source;\n\n\n let input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n const state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nconst MAXBITS = 15;\nconst ENOUGH_LENS = 852;\nconst ENOUGH_DISTS = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst CODES = 0;\nconst LENS = 1;\nconst DISTS = 2;\n\nconst lbase = new Uint16Array([ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n]);\n\nconst lext = new Uint8Array([ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n]);\n\nconst dbase = new Uint16Array([ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n]);\n\nconst dext = new Uint8Array([ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n]);\n\nconst inflate_table = (type, lens, lens_index, codes, table, table_index, work, opts) =>\n{\n const bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n let len = 0; /* a code's length in bits */\n let sym = 0; /* index of code symbols */\n let min = 0, max = 0; /* minimum and maximum code lengths */\n let root = 0; /* number of index bits for root table */\n let curr = 0; /* number of index bits for current table */\n let drop = 0; /* code bits to drop for sub-table */\n let left = 0; /* number of prefix codes available */\n let used = 0; /* code entries in table used */\n let huff = 0; /* Huffman code */\n let incr; /* for incrementing code, index */\n let fill; /* index for replicating entries */\n let low; /* low bits for current root entry */\n let mask; /* mask for low root bits */\n let next; /* next available space in table */\n let base = null; /* base value table to use */\n let base_index = 0;\n// let shoextra; /* extra bits table to use */\n let end; /* use base and extra for symbol > end */\n const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n let extra = null;\n let extra_index = 0;\n\n let here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n\n\nvar inftrees = inflate_table;\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n\n\n\n\n\nconst CODES$1 = 0;\nconst LENS$1 = 1;\nconst DISTS$1 = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_FINISH: Z_FINISH$2, Z_BLOCK: Z_BLOCK$1, Z_TREES,\n Z_OK: Z_OK$2, Z_STREAM_END: Z_STREAM_END$2, Z_NEED_DICT, Z_STREAM_ERROR: Z_STREAM_ERROR$1, Z_DATA_ERROR: Z_DATA_ERROR$1, Z_MEM_ERROR, Z_BUF_ERROR: Z_BUF_ERROR$1,\n Z_DEFLATED: Z_DEFLATED$2\n} = constants;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nconst HEAD = 1; /* i: waiting for magic header */\nconst FLAGS = 2; /* i: waiting for method and flags (gzip) */\nconst TIME = 3; /* i: waiting for modification time (gzip) */\nconst OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nconst EXLEN = 5; /* i: waiting for extra length (gzip) */\nconst EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nconst NAME = 7; /* i: waiting for end of file name (gzip) */\nconst COMMENT = 8; /* i: waiting for end of comment (gzip) */\nconst HCRC = 9; /* i: waiting for header crc (gzip) */\nconst DICTID = 10; /* i: waiting for dictionary check value */\nconst DICT = 11; /* waiting for inflateSetDictionary() call */\nconst TYPE$1 = 12; /* i: waiting for type bits, including last-flag bit */\nconst TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nconst STORED = 14; /* i: waiting for stored size (length and complement) */\nconst COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nconst COPY = 16; /* i/o: waiting for input or output to copy stored block */\nconst TABLE = 17; /* i: waiting for dynamic block table lengths */\nconst LENLENS = 18; /* i: waiting for code length code lengths */\nconst CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nconst LEN_ = 20; /* i: same as LEN below, but only first time in */\nconst LEN = 21; /* i: waiting for length/lit/eob code */\nconst LENEXT = 22; /* i: waiting for length extra bits */\nconst DIST = 23; /* i: waiting for distance code */\nconst DISTEXT = 24; /* i: waiting for distance extra bits */\nconst MATCH = 25; /* o: waiting for output space to copy string */\nconst LIT = 26; /* o: waiting for output space to write literal */\nconst CHECK = 27; /* i: waiting for 32-bit check value */\nconst LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nconst DONE = 29; /* finished check, done -- remain here until reset */\nconst BAD$1 = 30; /* got a data error -- remain here until reset */\nconst MEM = 31; /* got an inflate() memory error -- remain here until reset */\nconst SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nconst ENOUGH_LENS$1 = 852;\nconst ENOUGH_DISTS$1 = 592;\n//const ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nconst MAX_WBITS$1 = 15;\n/* 32K LZ77 window */\nconst DEF_WBITS = MAX_WBITS$1;\n\n\nconst zswap32 = (q) => {\n\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n};\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new Uint16Array(320); /* temporary storage for code lengths */\n this.work = new Uint16Array(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new Int32Array(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\n\nconst inflateResetKeep = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new Int32Array(ENOUGH_LENS$1);\n state.distcode = state.distdyn = new Int32Array(ENOUGH_DISTS$1);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK$2;\n};\n\n\nconst inflateReset = (strm) => {\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n};\n\n\nconst inflateReset2 = (strm, windowBits) => {\n let wrap;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR$1;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n};\n\n\nconst inflateInit2 = (strm, windowBits) => {\n\n if (!strm) { return Z_STREAM_ERROR$1; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n const state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n const ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK$2) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n};\n\n\nconst inflateInit = (strm) => {\n\n return inflateInit2(strm, DEF_WBITS);\n};\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nlet virgin = true;\n\nlet lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n\nconst fixedtables = (state) => {\n\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n lenfix = new Int32Array(512);\n distfix = new Int32Array(32);\n\n /* literal/length table */\n let sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inftrees(LENS$1, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inftrees(DISTS$1, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n};\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nconst updatewindow = (strm, src, end, copy) => {\n\n let dist;\n const state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new Uint8Array(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n state.window.set(src.subarray(end - state.wsize, end), 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n state.window.set(src.subarray(end - copy, end - copy + dist), state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n state.window.set(src.subarray(end - copy, end), 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n};\n\n\nconst inflate = (strm, flush) => {\n\n let state;\n let input, output; // input/output buffers\n let next; /* next input INDEX */\n let put; /* next output INDEX */\n let have, left; /* available input and output */\n let hold; /* bit buffer */\n let bits; /* bits in bit buffer */\n let _in, _out; /* save starting available input and output */\n let copy; /* number of stored or match bytes to copy */\n let from; /* where to copy match bytes from */\n let from_source;\n let here = 0; /* current decoding table entry */\n let here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //let last; /* parent table entry */\n let last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n let len; /* length to copy for repeats, bits to drop */\n let ret; /* return code */\n const hbuf = new Uint8Array(4); /* buffer for gzip header crc calculation */\n let opts;\n\n let n; // temporary variable for NEED_BITS\n\n const order = /* permutation of code lengths */\n new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]);\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR$1;\n }\n\n state = strm.state;\n if (state.mode === TYPE$1) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK$2;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD$1;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED$2) {\n strm.msg = 'unknown compression method';\n state.mode = BAD$1;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD$1;\n break;\n }\n\n // !!! pako patch. Force use `options.windowBits` if passed.\n // Required to always use max window size by default.\n state.dmax = 1 << state.wbits;\n //state.dmax = 1 << len;\n\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE$1;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED$2) {\n strm.msg = 'unknown compression method';\n state.mode = BAD$1;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD$1;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32_1(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32_1(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Uint8Array(state.head.extra_len);\n }\n state.head.extra.set(\n input.subarray(\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n next + copy\n ),\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32_1(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE$1;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE$1;\n /* falls through */\n case TYPE$1:\n if (flush === Z_BLOCK$1 || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD$1;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD$1;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n output.set(input.subarray(next, next + copy), put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE$1;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD$1;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inftrees(CODES$1, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD$1;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD$1;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD$1;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD$1) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD$1;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inftrees(LENS$1, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD$1;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inftrees(DISTS$1, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD$1;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inffast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE$1) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE$1;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD$1;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD$1;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD$1;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, put - _out) : adler32_1(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD$1;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END$2;\n break inf_leave;\n case BAD$1:\n ret = Z_DATA_ERROR$1;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR$1;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD$1 &&\n (state.mode < CHECK || flush !== Z_FINISH$2))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) ;\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32_1(state.check, output, _out, strm.next_out - _out) : adler32_1(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE$1 ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH$2) && ret === Z_OK$2) {\n ret = Z_BUF_ERROR$1;\n }\n return ret;\n};\n\n\nconst inflateEnd = (strm) => {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR$1;\n }\n\n let state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK$2;\n};\n\n\nconst inflateGetHeader = (strm, head) => {\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR$1; }\n const state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR$1; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK$2;\n};\n\n\nconst inflateSetDictionary = (strm, dictionary) => {\n const dictLength = dictionary.length;\n\n let state;\n let dictid;\n let ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR$1; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR$1;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32_1(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR$1;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK$2;\n};\n\n\nvar inflateReset_1 = inflateReset;\nvar inflateReset2_1 = inflateReset2;\nvar inflateResetKeep_1 = inflateResetKeep;\nvar inflateInit_1 = inflateInit;\nvar inflateInit2_1 = inflateInit2;\nvar inflate_2 = inflate;\nvar inflateEnd_1 = inflateEnd;\nvar inflateGetHeader_1 = inflateGetHeader;\nvar inflateSetDictionary_1 = inflateSetDictionary;\nvar inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nmodule.exports.inflateCopy = inflateCopy;\nmodule.exports.inflateGetDictionary = inflateGetDictionary;\nmodule.exports.inflateMark = inflateMark;\nmodule.exports.inflatePrime = inflatePrime;\nmodule.exports.inflateSync = inflateSync;\nmodule.exports.inflateSyncPoint = inflateSyncPoint;\nmodule.exports.inflateUndermine = inflateUndermine;\n*/\n\nvar inflate_1 = {\n\tinflateReset: inflateReset_1,\n\tinflateReset2: inflateReset2_1,\n\tinflateResetKeep: inflateResetKeep_1,\n\tinflateInit: inflateInit_1,\n\tinflateInit2: inflateInit2_1,\n\tinflate: inflate_2,\n\tinflateEnd: inflateEnd_1,\n\tinflateGetHeader: inflateGetHeader_1,\n\tinflateSetDictionary: inflateSetDictionary_1,\n\tinflateInfo: inflateInfo\n};\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nvar gzheader = GZheader;\n\nconst toString$1 = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nconst {\n Z_NO_FLUSH: Z_NO_FLUSH$2, Z_FINISH: Z_FINISH$3,\n Z_OK: Z_OK$3, Z_STREAM_END: Z_STREAM_END$3, Z_NEED_DICT: Z_NEED_DICT$1, Z_STREAM_ERROR: Z_STREAM_ERROR$2, Z_DATA_ERROR: Z_DATA_ERROR$2, Z_MEM_ERROR: Z_MEM_ERROR$1\n} = constants;\n\n/* ===========================================================================*/\n\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako')\n * const chunk1 = new Uint8Array([1,2,3,4,5,6,7,8,9])\n * const chunk2 = new Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * const inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n this.options = common.assign({\n chunkSize: 1024 * 64,\n windowBits: 15,\n to: ''\n }, options || {});\n\n const opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new zstream();\n this.strm.avail_out = 0;\n\n let status = inflate_1.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== Z_OK$3) {\n throw new Error(messages[status]);\n }\n\n this.header = new gzheader();\n\n inflate_1.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString$1.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = inflate_1.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== Z_OK$3) {\n throw new Error(messages[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, flush_mode]) -> Boolean\n * - data (Uint8Array|ArrayBuffer): input data\n * - flush_mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE\n * flush modes. See constants. Skipped or `false` means Z_NO_FLUSH,\n * `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. If end of stream detected,\n * [[Inflate#onEnd]] will be called.\n *\n * `flush_mode` is not needed for normal operation, because end of stream\n * detected automatically. You may try to use it for advanced things, but\n * this functionality was not tested.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, flush_mode) {\n const strm = this.strm;\n const chunkSize = this.options.chunkSize;\n const dictionary = this.options.dictionary;\n let status, _flush_mode, last_avail_out;\n\n if (this.ended) return false;\n\n if (flush_mode === ~~flush_mode) _flush_mode = flush_mode;\n else _flush_mode = flush_mode === true ? Z_FINISH$3 : Z_NO_FLUSH$2;\n\n // Convert data if needed\n if (toString$1.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n for (;;) {\n if (strm.avail_out === 0) {\n strm.output = new Uint8Array(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = inflate_1.inflate(strm, _flush_mode);\n\n if (status === Z_NEED_DICT$1 && dictionary) {\n status = inflate_1.inflateSetDictionary(strm, dictionary);\n\n if (status === Z_OK$3) {\n status = inflate_1.inflate(strm, _flush_mode);\n } else if (status === Z_DATA_ERROR$2) {\n // Replace code with more verbose\n status = Z_NEED_DICT$1;\n }\n }\n\n // Skip snyc markers if more data follows and not raw mode\n while (strm.avail_in > 0 &&\n status === Z_STREAM_END$3 &&\n strm.state.wrap > 0 &&\n data[strm.next_in] !== 0)\n {\n inflate_1.inflateReset(strm);\n status = inflate_1.inflate(strm, _flush_mode);\n }\n\n switch (status) {\n case Z_STREAM_ERROR$2:\n case Z_DATA_ERROR$2:\n case Z_NEED_DICT$1:\n case Z_MEM_ERROR$1:\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n // Remember real `avail_out` value, because we may patch out buffer content\n // to align utf8 strings boundaries.\n last_avail_out = strm.avail_out;\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === Z_STREAM_END$3) {\n\n if (this.options.to === 'string') {\n\n let next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n let tail = strm.next_out - next_out_utf8;\n let utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail & realign counters\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) strm.output.set(strm.output.subarray(next_out_utf8, next_out_utf8 + tail), 0);\n\n this.onData(utf8str);\n\n } else {\n this.onData(strm.output.length === strm.next_out ? strm.output : strm.output.subarray(0, strm.next_out));\n }\n }\n }\n\n // Must repeat iteration if out buffer is full\n if (status === Z_OK$3 && last_avail_out === 0) continue;\n\n // Finalize if end of stream reached.\n if (status === Z_STREAM_END$3) {\n status = inflate_1.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return true;\n }\n\n if (strm.avail_in === 0) break;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|String): output data. When string output requested,\n * each chunk will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH). By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK$3) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = common.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * const pako = require('pako');\n * const input = pako.deflate(new Uint8Array([1,2,3,4,5,6,7,8,9]));\n * let output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate$1(input, options) {\n const inflator = new Inflate(options);\n\n inflator.push(input);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) throw inflator.msg || messages[inflator.err];\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate$1(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|String\n * - data (Uint8Array): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nvar Inflate_1 = Inflate;\nvar inflate_2$1 = inflate$1;\nvar inflateRaw_1 = inflateRaw;\nvar ungzip = inflate$1;\nvar constants$2 = constants;\n\nvar inflate_1$1 = {\n\tInflate: Inflate_1,\n\tinflate: inflate_2$1,\n\tinflateRaw: inflateRaw_1,\n\tungzip: ungzip,\n\tconstants: constants$2\n};\n\nconst { Deflate: Deflate$1, deflate: deflate$2, deflateRaw: deflateRaw$1, gzip: gzip$1 } = deflate_1$1;\n\nconst { Inflate: Inflate$1, inflate: inflate$2, inflateRaw: inflateRaw$1, ungzip: ungzip$1 } = inflate_1$1;\n\n\n\nvar Deflate_1$1 = Deflate$1;\nvar deflate_1$2 = deflate$2;\nvar deflateRaw_1$1 = deflateRaw$1;\nvar gzip_1$1 = gzip$1;\nvar Inflate_1$1 = Inflate$1;\nvar inflate_1$2 = inflate$2;\nvar inflateRaw_1$1 = inflateRaw$1;\nvar ungzip_1 = ungzip$1;\nvar constants_1 = constants;\n\nvar pako = {\n\tDeflate: Deflate_1$1,\n\tdeflate: deflate_1$2,\n\tdeflateRaw: deflateRaw_1$1,\n\tgzip: gzip_1$1,\n\tInflate: Inflate_1$1,\n\tinflate: inflate_1$2,\n\tinflateRaw: inflateRaw_1$1,\n\tungzip: ungzip_1,\n\tconstants: constants_1\n};\n\nexport { pako as p };\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.findInArray = findInArray;\nexports.isFunction = isFunction;\nexports.isNum = isNum;\nexports.int = int;\nexports.dontSetMe = dontSetMe;\n\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array\n/*: Array<any> | TouchList*/\n, callback\n/*: Function*/\n)\n/*: any*/\n{\n for (var i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nfunction isFunction(func\n/*: any*/\n)\n/*: boolean %checks*/\n{\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nfunction isNum(num\n/*: any*/\n)\n/*: boolean %checks*/\n{\n return typeof num === 'number' && !isNaN(num);\n}\n\nfunction int(a\n/*: string*/\n)\n/*: number*/\n{\n return parseInt(a, 10);\n}\n\nfunction dontSetMe(props\n/*: Object*/\n, propName\n/*: string*/\n, componentName\n/*: string*/\n) {\n if (props[propName]) {\n return new Error(\"Invalid prop \".concat(propName, \" passed to \").concat(componentName, \" - do not set this, set it on the child.\"));\n }\n}","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// Adaptation of THREE.js Spherical class, under MIT license\nimport {formatValue, equals, config} from '../lib/common';\nimport {degrees, radians, clamp} from '../lib/common';\nimport Vector3 from './vector3';\n\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec3 from 'gl-matrix/vec3';\n\n// TODO - import epsilon\nconst EPSILON = 0.000001;\n\nconst EARTH_RADIUS_METERS = 6.371e6;\n\n// Todo [rho, theta, phi] ?\nexport default class SphericalCoordinates {\n // @ts-ignore TS2740: Type '{}' is missing the following properties from type\n // eslint-disable-next-line complexity\n constructor({\n phi = 0,\n theta = 0,\n radius = 1,\n bearing = undefined,\n pitch = undefined,\n altitude = undefined,\n radiusScale = EARTH_RADIUS_METERS\n } = {}) {\n this.phi = phi;\n this.theta = theta;\n // TODO - silently accepts illegal 0\n this.radius = radius || altitude || 1; // radial distance from center\n this.radiusScale = radiusScale || 1; // Used by lngLatZ\n\n if (bearing !== undefined) {\n this.bearing = bearing; // up / down towards top and bottom pole\n }\n if (pitch !== undefined) {\n this.pitch = pitch; // around the equator of the sphere\n }\n this.check();\n }\n\n toString() {\n return this.formatString(config);\n }\n\n formatString({printTypes = false}) {\n const f = formatValue;\n return `${printTypes ? 'Spherical' : ''}\\\n[rho:${f(this.radius)},theta:${f(this.theta)},phi:${f(this.phi)}]`;\n }\n\n equals(other) {\n return (\n equals(this.radius, other.radius) &&\n equals(this.theta, other.theta) &&\n equals(this.phi, other.phi)\n );\n }\n\n exactEquals(other) {\n return this.radius === other.radius && this.theta === other.theta && this.phi === other.phi;\n }\n\n /* eslint-disable brace-style */\n // Cartographic (bearing 0 north, pitch 0 look from above)\n get bearing() {\n return 180 - degrees(this.phi);\n }\n set bearing(v) {\n this.phi = Math.PI - radians(v);\n }\n get pitch() {\n return degrees(this.theta);\n }\n set pitch(v) {\n this.theta = radians(v);\n }\n // get pitch() { return 90 - degrees(this.phi); }\n // set pitch(v) { this.phi = radians(v) + Math.PI / 2; }\n // get altitude() { return this.radius - 1; } // relative altitude\n\n // lnglatZ coordinates\n get longitude() {\n return degrees(this.phi);\n }\n get latitude() {\n return degrees(this.theta);\n }\n get lng() {\n return degrees(this.phi);\n }\n get lat() {\n return degrees(this.theta);\n }\n get z() {\n return (this.radius - 1) * this.radiusScale;\n }\n /* eslint-enable brace-style */\n\n set(radius, phi, theta) {\n this.radius = radius;\n this.phi = phi;\n this.theta = theta;\n return this.check();\n }\n\n clone() {\n return new SphericalCoordinates().copy(this);\n }\n\n copy(other) {\n this.radius = other.radius;\n this.phi = other.phi;\n this.theta = other.theta;\n return this.check();\n }\n\n fromLngLatZ([lng, lat, z]) {\n this.radius = 1 + z / this.radiusScale;\n this.phi = radians(lat);\n this.theta = radians(lng);\n }\n\n fromVector3(v) {\n this.radius = vec3.length(v);\n if (this.radius > 0) {\n this.theta = Math.atan2(v[0], v[1]); // equator angle around y-up axis\n this.phi = Math.acos(clamp(v[2] / this.radius, -1, 1)); // polar angle\n }\n return this.check();\n }\n\n toVector3() {\n return new Vector3(0, 0, this.radius)\n .rotateX({radians: this.theta})\n .rotateZ({radians: this.phi});\n }\n\n // restrict phi to be betwee EPS and PI-EPS\n makeSafe() {\n this.phi = Math.max(EPSILON, Math.min(Math.PI - EPSILON, this.phi));\n return this;\n }\n\n check() {\n // this.makeSafe();\n if (!Number.isFinite(this.phi) || !Number.isFinite(this.theta) || !(this.radius > 0)) {\n throw new Error('SphericalCoordinates: some fields set to invalid numbers');\n }\n return this;\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport Matrix4 from './matrix4';\nimport Vector3 from './vector3';\nimport Euler from './euler';\n\nexport default class Pose {\n // @ts-ignore TS2740: Type '{}' is missing the following properties from type\n constructor({\n x = 0,\n y = 0,\n z = 0,\n roll = 0,\n pitch = 0,\n yaw = 0,\n position = undefined,\n orientation = undefined\n } = {}) {\n if (Array.isArray(position) && position.length === 3) {\n this.position = new Vector3(position);\n } else {\n this.position = new Vector3(x, y, z);\n }\n if (Array.isArray(orientation) && orientation.length === 4) {\n this.orientation = new Euler(orientation, orientation[3]);\n } else {\n this.orientation = new Euler(roll, pitch, yaw, Euler.RollPitchYaw);\n }\n }\n\n get x() {\n return this.position.x;\n }\n set x(value) {\n this.position.x = value;\n }\n get y() {\n return this.position.y;\n }\n set y(value) {\n this.position.y = value;\n }\n get z() {\n return this.position.z;\n }\n set z(value) {\n this.position.z = value;\n }\n get roll() {\n return this.orientation.roll;\n }\n set roll(value) {\n this.orientation.roll = value;\n }\n get pitch() {\n return this.orientation.pitch;\n }\n set pitch(value) {\n this.orientation.pitch = value;\n }\n get yaw() {\n return this.orientation.yaw;\n }\n set yaw(value) {\n this.orientation.yaw = value;\n }\n\n getPosition() {\n return this.position;\n }\n\n getOrientation() {\n return this.orientation;\n }\n\n equals(pose) {\n if (!pose) {\n return false;\n }\n return this.position.equals(pose.position) && this.orientation.equals(pose.orientation);\n }\n\n exactEquals(pose) {\n if (!pose) {\n return false;\n }\n return (\n this.position.exactEquals(pose.position) && this.orientation.exactEquals(pose.orientation)\n );\n }\n\n getTransformationMatrix() {\n // setup precomputations for the sin/cos of the angles\n const sr = Math.sin(this.roll);\n const sp = Math.sin(this.pitch);\n const sw = Math.sin(this.yaw);\n\n const cr = Math.cos(this.roll);\n const cp = Math.cos(this.pitch);\n const cw = Math.cos(this.yaw);\n\n const matrix = new Matrix4().setRowMajor(\n cw * cp, // 0,0\n -sw * cr + cw * sp * sr, // 0,1\n sw * sr + cw * sp * cr, // 0,2\n this.x, // 0,3\n\n sw * cp, // 1,0\n cw * cr + sw * sp * sr, // 1,1\n -cw * sr + sw * sp * cr, // 1,2\n this.y, // 1,3\n\n -sp, // 2,0\n cp * sr, // 2,1\n cp * cr, // 2,2\n this.z, // 2,3\n\n 0,\n 0,\n 0,\n 1\n );\n\n return matrix;\n }\n\n getTransformationMatrixFromPose(pose) {\n return new Matrix4()\n .multiplyRight(this.getTransformationMatrix())\n .multiplyRight(pose.getTransformationMatrix().invert());\n }\n\n getTransformationMatrixToPose(pose) {\n return new Matrix4()\n .multiplyRight(pose.getTransformationMatrix())\n .multiplyRight(this.getTransformationMatrix().invert());\n }\n}\n","'use strict';\n\nconst util = require('./util');\nconst buildOptions = require('./util').buildOptions;\nconst xmlNode = require('./xmlNode');\nconst toNumber = require(\"strnum\");\n\nconst regx =\n '<((!\\\\[CDATA\\\\[([\\\\s\\\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\\\/)(NAME)\\\\s*>))([^<]*)'\n .replace(/NAME/g, util.nameRegexp);\n\n//const tagsRegx = new RegExp(\"<(\\\\/?[\\\\w:\\\\-\\._]+)([^>]*)>(\\\\s*\"+cdataRegx+\")*([^<]+)?\",\"g\");\n//const tagsRegx = new RegExp(\"<(\\\\/?)((\\\\w*:)?([\\\\w:\\\\-\\._]+))([^>]*)>([^<]*)(\"+cdataRegx+\"([^<]*))*([^<]+)?\",\"g\");\n\n//polyfill\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attrNodeName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n ignoreNameSpace: false,\n allowBooleanAttributes: false, //a tag can have attributes without any value\n //ignoreRootElement : false,\n parseNodeValue: true,\n parseAttributeValue: false,\n arrayMode: false,\n trimValues: true, //Trim string values of tag and attributes\n cdataTagName: false,\n cdataPositionChar: '\\\\c',\n numParseOptions: {\n hex: true,\n leadingZeros: true\n },\n tagValueProcessor: function(a, tagName) {\n return a;\n },\n attrValueProcessor: function(a, attrName) {\n return a;\n },\n stopNodes: [],\n alwaysCreateTextNode: false\n //decodeStrict: false,\n};\n\nexports.defaultOptions = defaultOptions;\n\nconst props = [\n 'attributeNamePrefix',\n 'attrNodeName',\n 'textNodeName',\n 'ignoreAttributes',\n 'ignoreNameSpace',\n 'allowBooleanAttributes',\n 'parseNodeValue',\n 'parseAttributeValue',\n 'arrayMode',\n 'trimValues',\n 'cdataTagName',\n 'cdataPositionChar',\n 'tagValueProcessor',\n 'attrValueProcessor',\n 'parseTrueNumberOnly',\n 'numParseOptions',\n 'stopNodes',\n 'alwaysCreateTextNode'\n];\nexports.props = props;\n\n/**\n * Trim -> valueProcessor -> parse value\n * @param {string} tagName\n * @param {string} val\n * @param {object} options\n */\nfunction processTagValue(tagName, val, options) {\n if (val) {\n if (options.trimValues) {\n val = val.trim();\n }\n val = options.tagValueProcessor(val, tagName);\n val = parseValue(val, options.parseNodeValue, options.numParseOptions);\n }\n\n return val;\n}\n\nfunction resolveNameSpace(tagname, options) {\n if (options.ignoreNameSpace) {\n const tags = tagname.split(':');\n const prefix = tagname.charAt(0) === '/' ? '/' : '';\n if (tags[0] === 'xmlns') {\n return '';\n }\n if (tags.length === 2) {\n tagname = prefix + tags[1];\n }\n }\n return tagname;\n}\n\nfunction parseValue(val, shouldParse, options) {\n if (shouldParse && typeof val === 'string') {\n //console.log(options)\n const newval = val.trim();\n if(newval === 'true' ) return true;\n else if(newval === 'false' ) return false;\n else return toNumber(val, options);\n } else {\n if (util.isExist(val)) {\n return val;\n } else {\n return '';\n }\n }\n}\n\n//TODO: change regex to capture NS\n//const attrsRegx = new RegExp(\"([\\\\w\\\\-\\\\.\\\\:]+)\\\\s*=\\\\s*(['\\\"])((.|\\n)*?)\\\\2\",\"gm\");\nconst attrsRegx = new RegExp('([^\\\\s=]+)\\\\s*(=\\\\s*([\\'\"])(.*?)\\\\3)?', 'g');\n\nfunction buildAttributesMap(attrStr, options) {\n if (!options.ignoreAttributes && typeof attrStr === 'string') {\n attrStr = attrStr.replace(/\\r?\\n/g, ' ');\n //attrStr = attrStr || attrStr.trim();\n\n const matches = util.getAllMatches(attrStr, attrsRegx);\n const len = matches.length; //don't make it inline\n const attrs = {};\n for (let i = 0; i < len; i++) {\n const attrName = resolveNameSpace(matches[i][1], options);\n if (attrName.length) {\n if (matches[i][4] !== undefined) {\n if (options.trimValues) {\n matches[i][4] = matches[i][4].trim();\n }\n matches[i][4] = options.attrValueProcessor(matches[i][4], attrName);\n attrs[options.attributeNamePrefix + attrName] = parseValue(\n matches[i][4],\n options.parseAttributeValue,\n options.numParseOptions\n );\n } else if (options.allowBooleanAttributes) {\n attrs[options.attributeNamePrefix + attrName] = true;\n }\n }\n }\n if (!Object.keys(attrs).length) {\n return;\n }\n if (options.attrNodeName) {\n const attrCollection = {};\n attrCollection[options.attrNodeName] = attrs;\n return attrCollection;\n }\n return attrs;\n }\n}\n\nconst getTraversalObj = function(xmlData, options) {\n xmlData = xmlData.replace(/\\r\\n?/g, \"\\n\");\n options = buildOptions(options, defaultOptions, props);\n const xmlObj = new xmlNode('!xml');\n let currentNode = xmlObj;\n let textData = \"\";\n\n//function match(xmlData){\n for(let i=0; i< xmlData.length; i++){\n const ch = xmlData[i];\n if(ch === '<'){\n if( xmlData[i+1] === '/') {//Closing Tag\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"Closing Tag is not closed.\")\n let tagName = xmlData.substring(i+2,closeIndex).trim();\n\n if(options.ignoreNameSpace){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n }\n }\n\n /* if (currentNode.parent) {\n currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options);\n } */\n if(currentNode){\n if(currentNode.val){\n currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options);\n }else{\n currentNode.val = processTagValue(tagName, textData , options);\n }\n }\n\n if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) {\n currentNode.child = []\n if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}}\n currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1)\n }\n currentNode = currentNode.parent;\n textData = \"\";\n i = closeIndex;\n } else if( xmlData[i+1] === '?') {\n i = findClosingIndex(xmlData, \"?>\", i, \"Pi Tag is not closed.\")\n } else if(xmlData.substr(i + 1, 3) === '!--') {\n i = findClosingIndex(xmlData, \"-->\", i, \"Comment is not closed.\")\n } else if( xmlData.substr(i + 1, 2) === '!D') {\n const closeIndex = findClosingIndex(xmlData, \">\", i, \"DOCTYPE is not closed.\")\n const tagExp = xmlData.substring(i, closeIndex);\n if(tagExp.indexOf(\"[\") >= 0){\n i = xmlData.indexOf(\"]>\", i) + 1;\n }else{\n i = closeIndex;\n }\n }else if(xmlData.substr(i + 1, 2) === '![') {\n const closeIndex = findClosingIndex(xmlData, \"]]>\", i, \"CDATA is not closed.\") - 2\n const tagExp = xmlData.substring(i + 9,closeIndex);\n\n //considerations\n //1. CDATA will always have parent node\n //2. A tag with CDATA is not a leaf node so it's value would be string type.\n if(textData){\n currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options);\n textData = \"\";\n }\n\n if (options.cdataTagName) {\n //add cdata node\n const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp);\n currentNode.addChild(childNode);\n //for backtracking\n currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar;\n //add rest value to parent node\n if (tagExp) {\n childNode.val = tagExp;\n }\n } else {\n currentNode.val = (currentNode.val || '') + (tagExp || '');\n }\n\n i = closeIndex + 2;\n }else {//Opening tag\n const result = closingIndexForOpeningTag(xmlData, i+1)\n let tagExp = result.data;\n const closeIndex = result.index;\n const separatorIndex = tagExp.indexOf(\" \");\n let tagName = tagExp;\n let shouldBuildAttributesMap = true;\n if(separatorIndex !== -1){\n tagName = tagExp.substr(0, separatorIndex).replace(/\\s\\s*$/, '');\n tagExp = tagExp.substr(separatorIndex + 1);\n }\n\n if(options.ignoreNameSpace){\n const colonIndex = tagName.indexOf(\":\");\n if(colonIndex !== -1){\n tagName = tagName.substr(colonIndex+1);\n shouldBuildAttributesMap = tagName !== result.data.substr(colonIndex + 1);\n }\n }\n\n //save text to parent node\n if (currentNode && textData) {\n if(currentNode.tagname !== '!xml'){\n currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options);\n }\n }\n\n if(tagExp.length > 0 && tagExp.lastIndexOf(\"/\") === tagExp.length - 1){//selfClosing tag\n\n if(tagName[tagName.length - 1] === \"/\"){ //remove trailing '/'\n tagName = tagName.substr(0, tagName.length - 1);\n tagExp = tagName;\n }else{\n tagExp = tagExp.substr(0, tagExp.length - 1);\n }\n\n const childNode = new xmlNode(tagName, currentNode, '');\n if(tagName !== tagExp){\n childNode.attrsMap = buildAttributesMap(tagExp, options);\n }\n currentNode.addChild(childNode);\n }else{//opening tag\n\n const childNode = new xmlNode( tagName, currentNode );\n if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) {\n childNode.startIndex=closeIndex;\n }\n if(tagName !== tagExp && shouldBuildAttributesMap){\n childNode.attrsMap = buildAttributesMap(tagExp, options);\n }\n currentNode.addChild(childNode);\n currentNode = childNode;\n }\n textData = \"\";\n i = closeIndex;\n }\n }else{\n textData += xmlData[i];\n }\n }\n return xmlObj;\n}\n\nfunction closingIndexForOpeningTag(data, i){\n let attrBoundary;\n let tagExp = \"\";\n for (let index = i; index < data.length; index++) {\n let ch = data[index];\n if (attrBoundary) {\n if (ch === attrBoundary) attrBoundary = \"\";//reset\n } else if (ch === '\"' || ch === \"'\") {\n attrBoundary = ch;\n } else if (ch === '>') {\n return {\n data: tagExp,\n index: index\n }\n } else if (ch === '\\t') {\n ch = \" \"\n }\n tagExp += ch;\n }\n}\n\nfunction findClosingIndex(xmlData, str, i, errMsg){\n const closingIndex = xmlData.indexOf(str, i);\n if(closingIndex === -1){\n throw new Error(errMsg)\n }else{\n return closingIndex + str.length - 1;\n }\n}\n\nexports.getTraversalObj = getTraversalObj;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","module.exports = true;\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","exports.f = {}.propertyIsEnumerable;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar helpers_1 = require(\"@turf/helpers\");\nvar invariant_1 = require(\"@turf/invariant\");\nvar line_segment_1 = __importDefault(require(\"@turf/line-segment\"));\nvar meta_1 = require(\"@turf/meta\");\nvar geojson_rbush_1 = __importDefault(require(\"geojson-rbush\"));\n/**\n * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).\n *\n * @name lineIntersect\n * @param {GeoJSON} line1 any LineString or Polygon\n * @param {GeoJSON} line2 any LineString or Polygon\n * @returns {FeatureCollection<Point>} point(s) that intersect both\n * @example\n * var line1 = turf.lineString([[126, -11], [129, -21]]);\n * var line2 = turf.lineString([[123, -18], [131, -14]]);\n * var intersects = turf.lineIntersect(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, intersects]\n */\nfunction lineIntersect(line1, line2) {\n var unique = {};\n var results = [];\n // First, normalize geometries to features\n // Then, handle simple 2-vertex segments\n if (line1.type === \"LineString\") {\n line1 = helpers_1.feature(line1);\n }\n if (line2.type === \"LineString\") {\n line2 = helpers_1.feature(line2);\n }\n if (line1.type === \"Feature\" &&\n line2.type === \"Feature\" &&\n line1.geometry !== null &&\n line2.geometry !== null &&\n line1.geometry.type === \"LineString\" &&\n line2.geometry.type === \"LineString\" &&\n line1.geometry.coordinates.length === 2 &&\n line2.geometry.coordinates.length === 2) {\n var intersect = intersects(line1, line2);\n if (intersect) {\n results.push(intersect);\n }\n return helpers_1.featureCollection(results);\n }\n // Handles complex GeoJSON Geometries\n var tree = geojson_rbush_1.default();\n tree.load(line_segment_1.default(line2));\n meta_1.featureEach(line_segment_1.default(line1), function (segment) {\n meta_1.featureEach(tree.search(segment), function (match) {\n var intersect = intersects(segment, match);\n if (intersect) {\n // prevent duplicate points https://github.com/Turfjs/turf/issues/688\n var key = invariant_1.getCoords(intersect).join(\",\");\n if (!unique[key]) {\n unique[key] = true;\n results.push(intersect);\n }\n }\n });\n });\n return helpers_1.featureCollection(results);\n}\n/**\n * Find a point that intersects LineStrings with two coordinates each\n *\n * @private\n * @param {Feature<LineString>} line1 GeoJSON LineString (Must only contain 2 coordinates)\n * @param {Feature<LineString>} line2 GeoJSON LineString (Must only contain 2 coordinates)\n * @returns {Feature<Point>} intersecting GeoJSON Point\n */\nfunction intersects(line1, line2) {\n var coords1 = invariant_1.getCoords(line1);\n var coords2 = invariant_1.getCoords(line2);\n if (coords1.length !== 2) {\n throw new Error(\"<intersects> line1 must only contain 2 coordinates\");\n }\n if (coords2.length !== 2) {\n throw new Error(\"<intersects> line2 must only contain 2 coordinates\");\n }\n var x1 = coords1[0][0];\n var y1 = coords1[0][1];\n var x2 = coords1[1][0];\n var y2 = coords1[1][1];\n var x3 = coords2[0][0];\n var y3 = coords2[0][1];\n var x4 = coords2[1][0];\n var y4 = coords2[1][1];\n var denom = ((y4 - y3) * (x2 - x1)) - ((x4 - x3) * (y2 - y1));\n var numeA = ((x4 - x3) * (y1 - y3)) - ((y4 - y3) * (x1 - x3));\n var numeB = ((x2 - x1) * (y1 - y3)) - ((y2 - y1) * (x1 - x3));\n if (denom === 0) {\n if (numeA === 0 && numeB === 0) {\n return null;\n }\n return null;\n }\n var uA = numeA / denom;\n var uB = numeB / denom;\n if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) {\n var x = x1 + (uA * (x2 - x1));\n var y = y1 + (uA * (y2 - y1));\n return helpers_1.point([x, y]);\n }\n return null;\n}\nexports.default = lineIntersect;\n","import {assert} from '../env-utils/assert';\n\n/**\n * Calculate new size of an arrayBuffer to be aligned to an n-byte boundary\n * This function increases `byteLength` by the minimum delta,\n * allowing the total length to be divided by `padding`\n * @param byteLength\n * @param padding\n */\nexport function padToNBytes(byteLength: number, padding: number): number {\n assert(byteLength >= 0); // `Incorrect 'byteLength' value: ${byteLength}`\n assert(padding > 0); // `Incorrect 'padding' value: ${padding}`\n return (byteLength + (padding - 1)) & ~(padding - 1);\n}\n\n/**\n * Creates a new Uint8Array based on two different ArrayBuffers\n * @param targetBuffer The first buffer.\n * @param sourceBuffer The second buffer.\n * @return The new ArrayBuffer created out of the two.\n */\nexport function copyArrayBuffer(\n targetBuffer: ArrayBuffer,\n sourceBuffer: ArrayBuffer,\n byteOffset: number,\n byteLength: number = sourceBuffer.byteLength\n): ArrayBuffer {\n const targetArray = new Uint8Array(targetBuffer, byteOffset, byteLength);\n const sourceArray = new Uint8Array(sourceBuffer);\n targetArray.set(sourceArray);\n return targetBuffer;\n}\n\n/**\n * Copy from source to target at the targetOffset\n *\n * @param source - The data to copy\n * @param target - The destination to copy data into\n * @param targetOffset - The start offset into target to place the copied data\n * @returns the new offset taking into account proper padding\n */\nexport function copyToArray(source: ArrayBuffer | any, target: any, targetOffset: number): number {\n let sourceArray;\n\n if (source instanceof ArrayBuffer) {\n sourceArray = new Uint8Array(source);\n } else {\n // Pack buffer onto the big target array\n //\n // 'source.data.buffer' could be a view onto a larger buffer.\n // We MUST use this constructor to ensure the byteOffset and byteLength is\n // set to correct values from 'source.data' and not the underlying\n // buffer for target.set() to work properly.\n const srcByteOffset = source.byteOffset;\n const srcByteLength = source.byteLength;\n // In gltf parser it is set as \"arrayBuffer\" instead of \"buffer\"\n // https://github.com/visgl/loaders.gl/blob/1e3a82a0a65d7b6a67b1e60633453e5edda2960a/modules/gltf/src/lib/parse-gltf.js#L85\n sourceArray = new Uint8Array(source.buffer || source.arrayBuffer, srcByteOffset, srcByteLength);\n }\n\n // Pack buffer onto the big target array\n target.set(sourceArray, targetOffset);\n\n return targetOffset + padToNBytes(sourceArray.byteLength, 4);\n}\n","export function toDeckColor(\n color?: [number, number, number, number] | null | undefined,\n defaultColor: [number, number, number, number] = [255, 0, 0, 255]\n): [number, number, number, number] {\n if (!Array.isArray(color)) {\n return defaultColor;\n }\n return [color[0] * 255, color[1] * 255, color[2] * 255, color[3] * 255];\n}\n\n//\n// a GeoJSON helper function that calls the provided function with\n// an argument that is the most deeply-nested array having elements\n// that are arrays of primitives as an argument, e.g.\n//\n// {\n// \"type\": \"MultiPolygon\",\n// \"coordinates\": [\n// [\n// [[30, 20], [45, 40], [10, 40], [30, 20]]\n// ],\n// [\n// [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]\n// ]\n// ]\n// }\n//\n// the function would be called on:\n//\n// [[30, 20], [45, 40], [10, 40], [30, 20]]\n//\n// and\n//\n// [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]\n//\nexport function recursivelyTraverseNestedArrays(\n array: Array<any>,\n prefix: Array<number>,\n fn: Function\n) {\n if (!Array.isArray(array[0])) {\n return true;\n }\n for (let i = 0; i < array.length; i++) {\n if (recursivelyTraverseNestedArrays(array[i], [...prefix, i], fn)) {\n fn(array, prefix);\n break;\n }\n }\n return false;\n}\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\nmodule.exports = {\n SEMVER_SPEC_VERSION,\n MAX_LENGTH,\n MAX_SAFE_INTEGER,\n MAX_SAFE_COMPONENT_LENGTH\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","// parse out just the options we care about so we always get a consistent\n// obj with keys in a consistent order.\nconst opts = ['includePrerelease', 'loose', 'rtl']\nconst parseOptions = options =>\n !options ? {}\n : typeof options !== 'object' ? { loose: true }\n : opts.filter(k => options[k]).reduce((options, k) => {\n options[k] = true\n return options\n }, {})\nmodule.exports = parseOptions\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n const sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n const sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n const sameSemVer = this.semver.version === comp.semver.version\n const differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n const oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<')\n const oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>')\n\n return (\n sameDirectionIncreasing ||\n sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan ||\n oppositeDirectionsGreaterThan\n )\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst {re, t} = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import polygonClipping from 'polygon-clipping';\nimport { polygon, multiPolygon } from '@turf/helpers';\nimport { getGeom } from '@turf/invariant';\n\n/**\n * Finds the difference between two {@link Polygon|polygons} by clipping the second polygon from the first.\n *\n * @name difference\n * @param {Feature<Polygon|MultiPolygon>} polygon1 input Polygon feature\n * @param {Feature<Polygon|MultiPolygon>} polygon2 Polygon feature to difference from polygon1\n * @returns {Feature<Polygon|MultiPolygon>|null} a Polygon or MultiPolygon feature showing the area of `polygon1` excluding the area of `polygon2` (if empty returns `null`)\n * @example\n * var polygon1 = turf.polygon([[\n * [128, -26],\n * [141, -26],\n * [141, -21],\n * [128, -21],\n * [128, -26]\n * ]], {\n * \"fill\": \"#F00\",\n * \"fill-opacity\": 0.1\n * });\n * var polygon2 = turf.polygon([[\n * [126, -28],\n * [140, -28],\n * [140, -20],\n * [126, -20],\n * [126, -28]\n * ]], {\n * \"fill\": \"#00F\",\n * \"fill-opacity\": 0.1\n * });\n *\n * var difference = turf.difference(polygon1, polygon2);\n *\n * //addToMap\n * var addToMap = [polygon1, polygon2, difference];\n */\nfunction difference(polygon1, polygon2) {\n var geom1 = getGeom(polygon1);\n var geom2 = getGeom(polygon2);\n var properties = polygon1.properties || {};\n\n var differenced = polygonClipping.difference(\n geom1.coordinates,\n geom2.coordinates\n );\n if (differenced.length === 0) return null;\n if (differenced.length === 1) return polygon(differenced[0], properties);\n return multiPolygon(differenced, properties);\n}\n\nexport default difference;\n","// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n\n// Change to `latest` on production branches\nconst DEFAULT_VERSION = 'beta';\ndeclare let __VERSION__;\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : DEFAULT_VERSION;\nif (typeof __VERSION__ === 'undefined') {\n // eslint-disable-next-line\n console.error(\n 'loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.'\n );\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// Merge two luma.gl shader descriptors\nexport function mergeShaders(target, source) {\n if (!source) {\n return target;\n }\n const result = {...target, ...source};\n\n if ('defines' in source) {\n result.defines = {...target.defines, ...source.defines};\n }\n if ('modules' in source) {\n result.modules = (target.modules || []).concat(source.modules);\n\n // Hack: prject32 and project64 cannot co-exist\n if (source.modules.some(module => module.name === 'project64')) {\n const index = result.modules.findIndex(module => module.name === 'project32');\n if (index >= 0) {\n result.modules.splice(index, 1);\n }\n }\n }\n if ('inject' in source) {\n if (!target.inject) {\n result.inject = source.inject;\n } else {\n const mergedInjection = {...target.inject};\n for (const key in source.inject) {\n mergedInjection[key] = (mergedInjection[key] || '') + source.inject[key];\n }\n result.inject = mergedInjection;\n }\n }\n return result;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst ERR_NOT_OBJECT = 'count(): argument not an object';\nconst ERR_NOT_CONTAINER = 'count(): argument not a container';\n\n/**\n * Deduces numer of elements in a JavaScript container.\n * - Auto-deduction for ES6 containers that define a count() method\n * - Auto-deduction for ES6 containers that define a size member\n * - Auto-deduction for Classic Arrays via the built-in length attribute\n * - Also handles objects, although note that this an O(N) operation\n */\nexport function count(container) {\n if (!isObject(container)) {\n throw new Error(ERR_NOT_OBJECT);\n }\n\n // Check if ES6 collection \"count\" function is available\n if (typeof container.count === 'function') {\n return container.count();\n }\n\n // Check if ES6 collection \"size\" attribute is set\n if (Number.isFinite(container.size)) {\n return container.size;\n }\n\n // Check if array length attribute is set\n // Note: checking this last since some ES6 collections (Immutable.js)\n // emit profuse warnings when trying to access `length` attribute\n if (Number.isFinite(container.length)) {\n return container.length;\n }\n\n // Note that getting the count of an object is O(N)\n if (isPlainObject(container)) {\n return Object.keys(container).length;\n }\n\n throw new Error(ERR_NOT_CONTAINER);\n}\n\n/**\n * Checks if argument is a plain object (not a class or array etc)\n * @param {*} value - JavaScript value to be tested\n * @return {Boolean} - true if argument is a plain JavaScript object\n */\nfunction isPlainObject(value) {\n return value !== null && typeof value === 'object' && value.constructor === Object;\n}\n\n/**\n * Checks if argument is an indexable object (not a primitive value, nor null)\n * @param {*} value - JavaScript value to be tested\n * @return {Boolean} - true if argument is a JavaScript object\n */\nfunction isObject(value) {\n return value !== null && typeof value === 'object';\n}\n","import {clamp} from 'math.gl';\nimport Controller from './controller';\nimport {OrbitState} from './orbit-controller';\n\nclass OrthographicState extends OrbitState {\n constructor(props) {\n super(props);\n\n this.zoomAxis = props.zoomAxis || 'all';\n }\n\n _applyConstraints(props) {\n const {maxZoom, minZoom, zoom} = props;\n props.zoom = Array.isArray(zoom)\n ? [clamp(zoom[0], minZoom, maxZoom), clamp(zoom[1], minZoom, maxZoom)]\n : clamp(zoom, minZoom, maxZoom);\n return props;\n }\n\n _calculateNewZoom({scale, startZoom}) {\n const {maxZoom, minZoom} = this._viewportProps;\n if (!startZoom && startZoom !== 0) {\n startZoom = this._viewportProps.zoom;\n }\n let deltaZoom = Math.log2(scale);\n if (Array.isArray(startZoom)) {\n let [newZoomX, newZoomY] = startZoom;\n switch (this.zoomAxis) {\n case 'X':\n // Scale x only\n newZoomX = clamp(newZoomX + deltaZoom, minZoom, maxZoom);\n break;\n case 'Y':\n // Scale y only\n newZoomY = clamp(newZoomY + deltaZoom, minZoom, maxZoom);\n break;\n default:\n // Lock aspect ratio\n let z = Math.min(newZoomX + deltaZoom, newZoomY + deltaZoom);\n if (z < minZoom) {\n deltaZoom += minZoom - z;\n }\n z = Math.max(newZoomX + deltaZoom, newZoomY + deltaZoom);\n if (z > maxZoom) {\n deltaZoom += maxZoom - z;\n }\n newZoomX += deltaZoom;\n newZoomY += deltaZoom;\n }\n return [newZoomX, newZoomY];\n }\n // Ignore `zoomAxis`\n // `LinearTransitionInterpolator` does not support interpolation between a number and an array\n // So if zoom is a number (legacy use case), new zoom still has to be a number\n return clamp(startZoom + deltaZoom, minZoom, maxZoom);\n }\n}\n\nexport default class OrthographicController extends Controller {\n constructor(props) {\n props.dragMode = props.dragMode || 'pan';\n super(OrthographicState, props);\n }\n\n _onPanRotate(event) {\n // No rotation in orthographic view\n return false;\n }\n\n get linearTransitionProps() {\n return ['target', 'zoom'];\n }\n}\n","import View from './view';\nimport WebMercatorViewport from '../viewports/web-mercator-viewport';\nimport MapController from '../controllers/map-controller';\n\nexport default class MapView extends View {\n constructor(props) {\n super({\n ...props,\n type: WebMercatorViewport\n });\n }\n\n get controller() {\n return this._getControllerProps({\n type: MapController\n });\n }\n}\n\nMapView.displayName = 'MapView';\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {ProgramManager} from '@luma.gl/core';\nimport {gouraudLighting, phongLighting} from '@luma.gl/core';\nimport project from './project/project';\nimport project32 from './project32/project32';\nimport shadow from './shadow/shadow';\nimport picking from './picking/picking';\n\nconst DEFAULT_MODULES = [project];\n\nconst SHADER_HOOKS = [\n 'vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)',\n 'vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)',\n 'vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)',\n 'fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)'\n];\n\nexport function createProgramManager(gl) {\n const programManager = ProgramManager.getDefaultProgramManager(gl);\n\n for (const shaderModule of DEFAULT_MODULES) {\n programManager.addDefaultModule(shaderModule);\n }\n for (const shaderHook of SHADER_HOOKS) {\n programManager.addShaderHook(shaderHook);\n }\n\n return programManager;\n}\n\nexport {picking, project, project32, gouraudLighting, phongLighting, shadow};\n","const DEFAULT_LIGHT_COLOR = [255, 255, 255];\nconst DEFAULT_LIGHT_INTENSITY = 1.0;\n\nlet idCount = 0;\n\nexport class AmbientLight {\n constructor(props = {}) {\n const {color = DEFAULT_LIGHT_COLOR} = props;\n const {intensity = DEFAULT_LIGHT_INTENSITY} = props;\n\n this.id = props.id || `ambient-${idCount++}`;\n this.color = color;\n this.intensity = intensity;\n this.type = 'ambient';\n }\n}\n","import {lerp} from 'math.gl';\nimport Transition from './transition';\n\nexport default class CPUInterpolationTransition extends Transition {\n get value() {\n return this._value;\n }\n\n _onUpdate() {\n const {\n time,\n settings: {fromValue, toValue, duration, easing}\n } = this;\n const t = easing(time / duration);\n this._value = lerp(fromValue, toValue, t);\n }\n}\n","import Transition from './transition';\n\nconst EPSILON = 1e-5;\n\n/*\n * Calculate the next value in the spring transition\n * @param prev {Number} - previous value\n * @param cur {Number} - current value\n * @param dest {Number} - destination value\n * @param damping {Number}\n * @param stiffness {Number}\n */\nfunction updateSpringElement(prev, cur, dest, damping, stiffness) {\n const velocity = cur - prev;\n const delta = dest - cur;\n const spring = delta * stiffness;\n const damper = -velocity * damping;\n return spring + damper + velocity + cur;\n}\n\n/*\n * Calculate the next value in the spring transition\n * @param prev {Number|Array} - previous value\n * @param cur {Number|Array} - current value\n * @param dest {Number|Array} - destination value\n * @param damping {Number}\n * @param stiffness {Number}\n */\nfunction updateSpring(prev, cur, dest, damping, stiffness) {\n if (Array.isArray(dest)) {\n const next = [];\n for (let i = 0; i < dest.length; i++) {\n next[i] = updateSpringElement(prev[i], cur[i], dest[i], damping, stiffness);\n }\n return next;\n }\n return updateSpringElement(prev, cur, dest, damping, stiffness);\n}\n\n/*\n * Calculate the distance between two numbers or two vectors\n */\nfunction distance(value1, value2) {\n if (Array.isArray(value1)) {\n let distanceSquare = 0;\n for (let i = 0; i < value1.length; i++) {\n const d = value1[i] - value2[i];\n distanceSquare += d * d;\n }\n return Math.sqrt(distanceSquare);\n }\n return Math.abs(value1 - value2);\n}\n\nexport default class CPUSpringTransition extends Transition {\n get value() {\n return this._currValue;\n }\n\n _onUpdate() {\n // TODO - use timeline\n // const {time} = this;\n\n const {fromValue, toValue, damping, stiffness} = this.settings;\n const {_prevValue = fromValue, _currValue = fromValue} = this;\n let nextValue = updateSpring(_prevValue, _currValue, toValue, damping, stiffness);\n const delta = distance(nextValue, toValue);\n const velocity = distance(nextValue, _currValue);\n\n if (delta < EPSILON && velocity < EPSILON) {\n nextValue = toValue;\n this.end();\n }\n\n this._prevValue = _currValue;\n this._currValue = nextValue;\n }\n}\n","import {normalizeTransitionSettings} from './attribute/attribute-transition-utils';\nimport CPUInterpolationTransition from '../transitions/cpu-interpolation-transition';\nimport CPUSpringTransition from '../transitions/cpu-spring-transition';\nimport log from '../utils/log';\n\nconst TRANSITION_TYPES = {\n interpolation: CPUInterpolationTransition,\n spring: CPUSpringTransition\n};\n\nexport default class UniformTransitionManager {\n constructor(timeline) {\n this.transitions = new Map();\n this.timeline = timeline;\n }\n\n get active() {\n return this.transitions.size > 0;\n }\n\n add(key, fromValue, toValue, settings) {\n const {transitions} = this;\n if (transitions.has(key)) {\n const transition = transitions.get(key);\n // value may not be available if `update()` has not been called. Fallback to `fromValue`\n const {value = transition.settings.fromValue} = transition;\n // start from interrupted position\n fromValue = value;\n this.remove(key);\n }\n\n settings = normalizeTransitionSettings(settings);\n if (!settings) {\n return;\n }\n\n const TransitionType = TRANSITION_TYPES[settings.type];\n if (!TransitionType) {\n log.error(`unsupported transition type '${settings.type}'`)();\n return;\n }\n const transition = new TransitionType(this.timeline);\n transition.start({\n ...settings,\n fromValue,\n toValue\n });\n transitions.set(key, transition);\n }\n\n remove(key) {\n const {transitions} = this;\n if (transitions.has(key)) {\n transitions.get(key).cancel();\n transitions.delete(key);\n }\n }\n\n update() {\n const propsInTransition = {};\n\n for (const [key, transition] of this.transitions) {\n transition.update();\n propsInTransition[key] = transition.value;\n if (!transition.inProgress) {\n // transition ended\n this.remove(key);\n }\n }\n\n return propsInTransition;\n }\n\n clear() {\n for (const key of this.transitions.keys()) {\n this.remove(key);\n }\n }\n}\n","import {Texture2D} from '@luma.gl/core';\nimport GL from '@luma.gl/constants';\n\nconst DEFAULT_TEXTURE_PARAMETERS = {\n [GL.TEXTURE_MIN_FILTER]: GL.LINEAR_MIPMAP_LINEAR,\n [GL.TEXTURE_MAG_FILTER]: GL.LINEAR,\n [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE\n};\n\n// Track the textures that are created by us. They need to be released when they are no longer used.\nconst internalTextures = {};\n\nexport function createTexture(layer, image) {\n const gl = layer.context && layer.context.gl;\n if (!gl || !image) {\n return null;\n }\n\n // image could be one of:\n // - Texture2D\n // - Browser object: Image, ImageData, ImageData, HTMLCanvasElement, HTMLVideoElement, ImageBitmap\n // - Plain object: {width: <number>, height: <number>, data: <Uint8Array>}\n if (image instanceof Texture2D) {\n return image;\n } else if (image.constructor && image.constructor.name !== 'Object') {\n // Browser object\n image = {data: image};\n }\n\n let specialTextureParameters = null;\n if (image.compressed) {\n specialTextureParameters = {\n [GL.TEXTURE_MIN_FILTER]: image.data.length > 1 ? GL.LINEAR_MIPMAP_NEAREST : GL.LINEAR\n };\n }\n\n const texture = new Texture2D(gl, {\n ...image,\n parameters: {\n ...DEFAULT_TEXTURE_PARAMETERS,\n ...specialTextureParameters,\n ...layer.props.textureParameters\n }\n });\n // Track this texture\n internalTextures[texture.id] = true;\n return texture;\n}\n\nexport function destroyTexture(texture) {\n if (!texture || !(texture instanceof Texture2D)) {\n return;\n }\n if (internalTextures[texture.id]) {\n texture.delete();\n delete internalTextures[texture.id];\n }\n}\n","import {createTexture, destroyTexture} from '../utils/texture';\n\nconst TYPE_DEFINITIONS = {\n boolean: {\n validate(value, propType) {\n return true;\n },\n equal(value1, value2, propType) {\n return Boolean(value1) === Boolean(value2);\n }\n },\n number: {\n validate(value, propType) {\n return (\n Number.isFinite(value) &&\n (!('max' in propType) || value <= propType.max) &&\n (!('min' in propType) || value >= propType.min)\n );\n }\n },\n color: {\n validate(value, propType) {\n return (\n (propType.optional && !value) ||\n (isArray(value) && (value.length === 3 || value.length === 4))\n );\n },\n equal(value1, value2, propType) {\n return arrayEqual(value1, value2);\n }\n },\n accessor: {\n validate(value, propType) {\n const valueType = getTypeOf(value);\n return valueType === 'function' || valueType === getTypeOf(propType.value);\n },\n equal(value1, value2, propType) {\n if (typeof value2 === 'function') {\n return true;\n }\n return arrayEqual(value1, value2);\n }\n },\n array: {\n validate(value, propType) {\n return (propType.optional && !value) || isArray(value);\n },\n equal(value1, value2, propType) {\n return propType.compare ? arrayEqual(value1, value2) : value1 === value2;\n }\n },\n function: {\n validate(value, propType) {\n return (propType.optional && !value) || typeof value === 'function';\n },\n equal(value1, value2, propType) {\n return !propType.compare || value1 === value2;\n }\n },\n data: {\n transform: (value, propType, component) => {\n const {dataTransform} = component ? component.props : {};\n return dataTransform && value ? dataTransform(value) : value;\n }\n },\n image: {\n transform: (value, propType, component) => {\n return createTexture(component, value);\n },\n release: value => {\n destroyTexture(value);\n }\n }\n};\n\nfunction arrayEqual(array1, array2) {\n if (array1 === array2) {\n return true;\n }\n if (!isArray(array1) || !isArray(array2)) {\n return false;\n }\n const len = array1.length;\n if (len !== array2.length) {\n return false;\n }\n for (let i = 0; i < len; i++) {\n if (array1[i] !== array2[i]) {\n return false;\n }\n }\n return true;\n}\n\nexport function parsePropTypes(propDefs) {\n const propTypes = {};\n const defaultProps = {};\n const deprecatedProps = {};\n\n for (const [propName, propDef] of Object.entries(propDefs)) {\n if (propDef && propDef.deprecatedFor) {\n deprecatedProps[propName] = Array.isArray(propDef.deprecatedFor)\n ? propDef.deprecatedFor\n : [propDef.deprecatedFor];\n } else {\n const propType = parsePropType(propName, propDef);\n propTypes[propName] = propType;\n defaultProps[propName] = propType.value;\n }\n }\n return {propTypes, defaultProps, deprecatedProps};\n}\n\n// Parses one property definition entry. Either contains:\n// * a valid prop type object ({type, ...})\n// * or just a default value, in which case type and name inference is used\nfunction parsePropType(name, propDef) {\n switch (getTypeOf(propDef)) {\n case 'object':\n return normalizePropDefinition(name, propDef);\n\n case 'array':\n return normalizePropDefinition(name, {type: 'array', value: propDef, compare: false});\n\n case 'boolean':\n return normalizePropDefinition(name, {type: 'boolean', value: propDef});\n\n case 'number':\n return normalizePropDefinition(name, {type: 'number', value: propDef});\n\n case 'function':\n return normalizePropDefinition(name, {type: 'function', value: propDef, compare: true});\n // return guessFunctionType(name, propDef);\n\n default:\n return {name, type: 'unknown', value: propDef};\n }\n}\n\nfunction normalizePropDefinition(name, propDef) {\n if (!('type' in propDef)) {\n if (!('value' in propDef)) {\n // If no type and value this object is likely the value\n return {name, type: 'object', value: propDef};\n }\n return {name, type: getTypeOf(propDef.value), ...propDef};\n }\n return {name, ...TYPE_DEFINITIONS[propDef.type], ...propDef};\n}\n\nfunction isArray(value) {\n return Array.isArray(value) || ArrayBuffer.isView(value);\n}\n\n// improved version of javascript typeof that can distinguish arrays and null values\nfunction getTypeOf(value) {\n if (isArray(value)) {\n return 'array';\n }\n if (value === null) {\n return 'null';\n }\n return typeof value;\n}\n","import log from '../utils/log';\nimport {isAsyncIterable} from '../utils/iterable-utils';\nimport {parsePropTypes} from './prop-types';\nimport {PROP_SYMBOLS} from './constants';\n\nconst {COMPONENT, ASYNC_ORIGINAL, ASYNC_RESOLVED, ASYNC_DEFAULTS} = PROP_SYMBOLS;\n\n// Create a property object\nexport function createProps() {\n const component = this; // eslint-disable-line\n\n // Get default prop object (a prototype chain for now)\n const propsPrototype = getPropsPrototype(component.constructor);\n\n // Create a new prop object with default props object in prototype chain\n const propsInstance = Object.create(propsPrototype);\n\n // Props need a back pointer to the owning component\n propsInstance[COMPONENT] = component;\n // The supplied (original) values for those async props that are set to url strings or Promises.\n // In this case, the actual (i.e. resolved) values are looked up from component.internalState\n propsInstance[ASYNC_ORIGINAL] = {};\n // Note: the actual (resolved) values for props that are NOT set to urls or Promises.\n // in this case the values are served directly from this map\n propsInstance[ASYNC_RESOLVED] = {};\n\n // \"Copy\" all sync props\n for (let i = 0; i < arguments.length; ++i) {\n const props = arguments[i];\n // Do not use Object.assign here to avoid Symbols in props overwriting our private fields\n // This might happen if one of the arguments is another props instance\n for (const key in props) {\n propsInstance[key] = props[key];\n }\n }\n\n // Props must be immutable\n Object.freeze(propsInstance);\n\n return propsInstance;\n}\n\n// Return precalculated defaultProps and propType objects if available\n// build them if needed\nfunction getPropsPrototype(componentClass) {\n const defaultProps = getOwnProperty(componentClass, '_mergedDefaultProps');\n if (!defaultProps) {\n createPropsPrototypeAndTypes(componentClass);\n return componentClass._mergedDefaultProps;\n }\n return defaultProps;\n}\n\n// Build defaultProps and propType objects by walking component prototype chain\nfunction createPropsPrototypeAndTypes(componentClass) {\n const parent = componentClass.prototype;\n if (!parent) {\n return;\n }\n\n const parentClass = Object.getPrototypeOf(componentClass);\n const parentDefaultProps = getPropsPrototype(parentClass);\n\n // Parse propTypes from Component.defaultProps\n const componentDefaultProps = getOwnProperty(componentClass, 'defaultProps') || {};\n const componentPropDefs = parsePropTypes(componentDefaultProps);\n\n // Create any necessary property descriptors and create the default prop object\n // Assign merged default props\n const defaultProps = createPropsPrototype(\n componentPropDefs.defaultProps,\n parentDefaultProps,\n componentClass\n );\n\n // Create a merged type object\n const propTypes = {...parentClass._propTypes, ...componentPropDefs.propTypes};\n // Add getters/setters for async props\n addAsyncPropsToPropPrototype(defaultProps, propTypes);\n\n // Create a map for prop whose default value is a callback\n const deprecatedProps = {\n ...parentClass._deprecatedProps,\n ...componentPropDefs.deprecatedProps\n };\n // Add setters for deprecated props\n addDeprecatedPropsToPropPrototype(defaultProps, deprecatedProps);\n\n // Store the precalculated props\n componentClass._mergedDefaultProps = defaultProps;\n componentClass._propTypes = propTypes;\n componentClass._deprecatedProps = deprecatedProps;\n}\n\n// Builds a pre-merged default props object that component props can inherit from\nfunction createPropsPrototype(props, parentProps, componentClass) {\n const defaultProps = Object.create(null);\n\n Object.assign(defaultProps, parentProps, props);\n\n // Avoid freezing `id` prop\n const id = getComponentName(componentClass);\n delete props.id;\n\n Object.defineProperties(defaultProps, {\n // `id` is treated specially because layer might need to override it\n id: {\n writable: true,\n value: id\n }\n });\n\n return defaultProps;\n}\n\nfunction addDeprecatedPropsToPropPrototype(defaultProps, deprecatedProps) {\n for (const propName in deprecatedProps) {\n /* eslint-disable accessor-pairs */\n Object.defineProperty(defaultProps, propName, {\n enumerable: false,\n set(newValue) {\n const nameStr = `${this.id}: ${propName}`;\n\n for (const newPropName of deprecatedProps[propName]) {\n if (!hasOwnProperty(this, newPropName)) {\n this[newPropName] = newValue;\n }\n }\n\n log.deprecated(nameStr, deprecatedProps[propName].join('/'))();\n }\n });\n /* eslint-enable accessor-pairs */\n }\n}\n\n// Create descriptors for overridable props\nfunction addAsyncPropsToPropPrototype(defaultProps, propTypes) {\n const defaultValues = {};\n\n const descriptors = {};\n\n // Move async props into shadow values\n for (const propName in propTypes) {\n const propType = propTypes[propName];\n const {name, value} = propType;\n\n // Note: async is ES7 keyword, can't destructure\n if (propType.async) {\n defaultValues[name] = value;\n descriptors[name] = getDescriptorForAsyncProp(name, value);\n }\n }\n\n // Default \"resolved\" values for async props, returned if value not yet resolved/set.\n defaultProps[ASYNC_DEFAULTS] = defaultValues;\n // Shadowed object, just to make sure \"early indexing\" into the instance does not fail\n defaultProps[ASYNC_ORIGINAL] = {};\n\n Object.defineProperties(defaultProps, descriptors);\n}\n\n// Helper: Configures getter and setter for one async prop\nfunction getDescriptorForAsyncProp(name) {\n return {\n enumerable: true,\n // Save the provided value for async props in a special map\n set(newValue) {\n if (\n typeof newValue === 'string' ||\n newValue instanceof Promise ||\n isAsyncIterable(newValue)\n ) {\n this[ASYNC_ORIGINAL][name] = newValue;\n } else {\n this[ASYNC_RESOLVED][name] = newValue;\n }\n },\n // Only the component's state knows the true value of async prop\n get() {\n if (this[ASYNC_RESOLVED]) {\n // Prop value isn't async, so just return it\n if (name in this[ASYNC_RESOLVED]) {\n const value = this[ASYNC_RESOLVED][name];\n\n return value || this[ASYNC_DEFAULTS][name];\n }\n\n if (name in this[ASYNC_ORIGINAL]) {\n // It's an async prop value: look into component state\n const state = this[COMPONENT] && this[COMPONENT].internalState;\n if (state && state.hasAsyncProp(name)) {\n return state.getAsyncProp(name) || this[ASYNC_DEFAULTS][name];\n }\n }\n }\n\n // the prop is not supplied, or\n // component not yet initialized/matched, return the component's default value for the prop\n return this[ASYNC_DEFAULTS][name];\n }\n };\n}\n\n// HELPER METHODS\n\nfunction hasOwnProperty(object, prop) {\n return Object.prototype.hasOwnProperty.call(object, prop);\n}\n\n// Constructors have their super class constructors as prototypes\nfunction getOwnProperty(object, prop) {\n return hasOwnProperty(object, prop) && object[prop];\n}\n\nfunction getComponentName(componentClass) {\n const componentName =\n getOwnProperty(componentClass, 'layerName') || getOwnProperty(componentClass, 'componentName');\n if (!componentName) {\n log.once(0, `${componentClass.name}.componentName not specified`)();\n }\n return componentName || componentClass.name;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {isAsyncIterable} from '../utils/iterable-utils';\nimport {PROP_SYMBOLS} from './constants';\nconst {ASYNC_ORIGINAL, ASYNC_RESOLVED, ASYNC_DEFAULTS} = PROP_SYMBOLS;\n\nconst EMPTY_PROPS = Object.freeze({});\n\nexport default class ComponentState {\n constructor(component = null) {\n this.component = component;\n this.asyncProps = {}; // Prop values that the layer sees\n this.onAsyncPropUpdated = () => {};\n this.oldProps = EMPTY_PROPS; // Last props before update\n this.oldAsyncProps = null; // Last props before update, with async values copied.\n }\n\n finalize() {\n for (const propName in this.asyncProps) {\n const asyncProp = this.asyncProps[propName];\n if (asyncProp.type && asyncProp.type.release) {\n // Release any resources created by transforms\n asyncProp.type.release(asyncProp.resolvedValue, asyncProp.type, this.component);\n }\n }\n }\n\n getOldProps() {\n return this.oldAsyncProps || this.oldProps;\n }\n\n resetOldProps() {\n this.oldAsyncProps = null;\n this.oldProps = this.component.props;\n }\n\n // Whenever async props are changing, we need to make a copy of oldProps\n // otherwise the prop rewriting will affect the value both in props and oldProps.\n // While the copy is relatively expensive, this only happens on load completion.\n freezeAsyncOldProps() {\n if (!this.oldAsyncProps) {\n // Make sure oldProps is set\n this.oldProps = this.oldProps || this.component.props;\n\n // 1. inherit all synchronous props from oldProps\n // 2. reconfigure the async prop descriptors to fixed values\n this.oldAsyncProps = Object.create(this.oldProps);\n for (const propName in this.asyncProps) {\n Object.defineProperty(this.oldAsyncProps, propName, {\n enumerable: true,\n value: this.oldProps[propName]\n });\n }\n }\n }\n\n // ASYNC PROP HANDLING\n //\n\n // Checks if a prop is overridden\n hasAsyncProp(propName) {\n return propName in this.asyncProps;\n }\n\n // Returns value of an overriden prop\n getAsyncProp(propName) {\n const asyncProp = this.asyncProps[propName];\n return asyncProp && asyncProp.resolvedValue;\n }\n\n isAsyncPropLoading(propName) {\n if (propName) {\n const asyncProp = this.asyncProps[propName];\n return Boolean(\n asyncProp &&\n asyncProp.pendingLoadCount > 0 &&\n asyncProp.pendingLoadCount !== asyncProp.resolvedLoadCount\n );\n }\n for (const key in this.asyncProps) {\n if (this.isAsyncPropLoading(key)) {\n return true;\n }\n }\n return false;\n }\n\n // Without changing the original prop value, swap out the data resolution under the hood\n reloadAsyncProp(propName, value) {\n this._watchPromise(propName, Promise.resolve(value));\n }\n\n // Updates all async/overridden props (when new props come in)\n // Checks if urls have changed, starts loading, or removes override\n setAsyncProps(props) {\n // NOTE: prop param and default values are only support for testing\n const resolvedValues = props[ASYNC_RESOLVED] || {};\n const originalValues = props[ASYNC_ORIGINAL] || props;\n const defaultValues = props[ASYNC_DEFAULTS] || {};\n\n // TODO - use async props from the layer's prop types\n for (const propName in resolvedValues) {\n const value = resolvedValues[propName];\n this._createAsyncPropData(propName, defaultValues[propName]);\n this._updateAsyncProp(propName, value);\n // Use transformed value\n resolvedValues[propName] = this.getAsyncProp(propName);\n }\n\n for (const propName in originalValues) {\n const value = originalValues[propName];\n // Makes sure a record exists for this prop\n this._createAsyncPropData(propName, defaultValues[propName]);\n this._updateAsyncProp(propName, value);\n }\n }\n\n // Intercept strings (URLs) and Promises and activates loading and prop rewriting\n _updateAsyncProp(propName, value) {\n if (!this._didAsyncInputValueChange(propName, value)) {\n return;\n }\n\n // interpret value string as url and start a new load tracked by a promise\n if (typeof value === 'string') {\n const fetch = this.layer?.props.fetch;\n const url = value;\n if (fetch) {\n value = fetch(url, {propName, layer: this.layer});\n }\n }\n\n // interprets promise and track the \"loading\"\n if (value instanceof Promise) {\n this._watchPromise(propName, value);\n return;\n }\n\n if (isAsyncIterable(value)) {\n this._resolveAsyncIterable(propName, value);\n return;\n }\n\n // else, normal, non-async value. Just store value for now\n this._setPropValue(propName, value);\n }\n\n // Checks if an input value actually changed (to avoid reloading/rewatching promises/urls)\n _didAsyncInputValueChange(propName, value) {\n const asyncProp = this.asyncProps[propName];\n if (value === asyncProp.resolvedValue || value === asyncProp.lastValue) {\n return false;\n }\n asyncProp.lastValue = value;\n return true;\n }\n\n // Set normal, non-async value\n _setPropValue(propName, value) {\n // Save the current value before overwriting so that diffProps can access both\n this.freezeAsyncOldProps();\n\n const asyncProp = this.asyncProps[propName];\n value = this._postProcessValue(asyncProp, value);\n asyncProp.resolvedValue = value;\n asyncProp.pendingLoadCount++;\n asyncProp.resolvedLoadCount = asyncProp.pendingLoadCount;\n }\n\n // Set a just resolved async value, calling onAsyncPropUpdates if value changes asynchronously\n _setAsyncPropValue(propName, value, loadCount) {\n // Only update if loadCount is larger or equal to resolvedLoadCount\n // otherwise a more recent load has already completed\n const asyncProp = this.asyncProps[propName];\n if (asyncProp && loadCount >= asyncProp.resolvedLoadCount && value !== undefined) {\n // Save the current value before overwriting so that diffProps can access both\n this.freezeAsyncOldProps();\n\n asyncProp.resolvedValue = value;\n asyncProp.resolvedLoadCount = loadCount;\n\n // Call callback to inform listener\n this.onAsyncPropUpdated(propName, value);\n }\n }\n\n // Tracks a promise, sets the prop when loaded, handles load count\n _watchPromise(propName, promise) {\n const asyncProp = this.asyncProps[propName];\n asyncProp.pendingLoadCount++;\n const loadCount = asyncProp.pendingLoadCount;\n promise\n .then(data => {\n data = this._postProcessValue(asyncProp, data);\n this._setAsyncPropValue(propName, data, loadCount);\n\n const onDataLoad = this.layer?.props.onDataLoad;\n if (propName === 'data' && onDataLoad) {\n onDataLoad(data, {propName, layer: this.layer});\n }\n })\n .catch(error => {\n this.layer?.raiseError(error, `loading ${propName} of ${this.layer}`);\n });\n }\n\n async _resolveAsyncIterable(propName, iterable) {\n if (propName !== 'data') {\n // we only support data as async iterable\n this._setPropValue(propName, iterable);\n }\n\n const asyncProp = this.asyncProps[propName];\n asyncProp.pendingLoadCount++;\n const loadCount = asyncProp.pendingLoadCount;\n let data = [];\n let count = 0;\n\n for await (const chunk of iterable) {\n const {dataTransform} = this.component ? this.component.props : {};\n if (dataTransform) {\n data = dataTransform(chunk, data);\n } else {\n data = data.concat(chunk);\n }\n\n // Used by the default _dataDiff function\n Object.defineProperty(data, '__diff', {\n enumerable: false,\n value: [{startRow: count, endRow: data.length}]\n });\n\n count = data.length;\n this._setAsyncPropValue(propName, data, loadCount);\n }\n\n const onDataLoad = this.layer?.props.onDataLoad;\n if (onDataLoad) {\n onDataLoad(data, {propName, layer: this.layer});\n }\n }\n\n // Give the app a chance to post process the loaded data\n _postProcessValue(asyncProp, value) {\n const propType = asyncProp.type;\n if (propType) {\n if (propType.release) {\n propType.release(asyncProp.resolvedValue, propType, this.component);\n }\n if (propType.transform) {\n return propType.transform(value, propType, this.component);\n }\n }\n return value;\n }\n\n // Creating an asyncProp record if needed\n _createAsyncPropData(propName, defaultValue) {\n const asyncProp = this.asyncProps[propName];\n if (!asyncProp) {\n const propTypes = this.component && this.component.constructor._propTypes;\n // assert(defaultValue !== undefined);\n this.asyncProps[propName] = {\n type: propTypes && propTypes[propName],\n lastValue: null, // Supplied prop value (can be url/promise, not visible to layer)\n resolvedValue: defaultValue, // Resolved prop value (valid data, can be \"shown\" to layer)\n pendingLoadCount: 0, // How many loads have been issued\n resolvedLoadCount: 0 // Latest resolved load, (earlier loads will be ignored)\n };\n }\n }\n}\n","import {LIFECYCLE} from '../lifecycle/constants';\nimport {createProps} from './create-props';\nimport {PROP_SYMBOLS} from './constants';\nconst {ASYNC_ORIGINAL, ASYNC_RESOLVED, ASYNC_DEFAULTS} = PROP_SYMBOLS;\nimport ComponentState from './component-state';\n\nconst defaultProps = {};\n\nlet counter = 0;\n\nexport default class Component {\n constructor(/* ...propObjects */) {\n // Merge supplied props with default props and freeze them.\n /* eslint-disable prefer-spread */\n this.props = createProps.apply(this, arguments);\n /* eslint-enable prefer-spread */\n\n // Define all members before layer is sealed\n this.id = this.props.id; // The layer's id, used for matching with layers from last render cycle\n this.count = counter++; // Keep track of how many layer instances you are generating\n this.lifecycle = LIFECYCLE.NO_STATE; // Helps track and debug the life cycle of the layers\n this.parent = null; // reference to the composite layer parent that rendered this layer\n this.context = null; // Will reference layer manager's context, contains state shared by layers\n this.state = null; // Will be set to the shared layer state object during layer matching\n this.internalState = null;\n\n // Seal the layer\n Object.seal(this);\n }\n\n get root() {\n // eslint-disable-next-line consistent-this\n let component = this;\n while (component.parent) {\n component = component.parent;\n }\n return component;\n }\n\n // clone this layer with modified props\n clone(newProps) {\n const {props} = this;\n\n // Async props cannot be copied with Object.assign, copy them separately\n const asyncProps = {};\n\n // See async props definition in create-props.js\n for (const key in props[ASYNC_DEFAULTS]) {\n if (key in props[ASYNC_RESOLVED]) {\n asyncProps[key] = props[ASYNC_RESOLVED][key];\n } else if (key in props[ASYNC_ORIGINAL]) {\n asyncProps[key] = props[ASYNC_ORIGINAL][key];\n }\n }\n\n // Some custom layer implementation may not support multiple arguments in the constructor\n return new this.constructor({...props, ...asyncProps, ...newProps});\n }\n\n get stats() {\n return this.internalState.stats;\n }\n\n // PROTECTED METHODS, override in subclass\n\n _initState() {\n this.internalState = new ComponentState({});\n }\n}\n\nComponent.componentName = 'Component';\nComponent.defaultProps = defaultProps;\n","import ComponentState from '../lifecycle/component-state';\n\nexport default class LayerState extends ComponentState {\n constructor({attributeManager, layer}) {\n super(layer);\n this.attributeManager = attributeManager;\n this.model = null;\n this.needsRedraw = true;\n this.subLayers = null; // reference to sublayers rendered in a previous cycle\n this.usesPickingColorCache = false;\n }\n\n get layer() {\n return this.component;\n }\n\n set layer(layer) {\n this.component = layer;\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable react/no-direct-mutation-state */\nimport {COORDINATE_SYSTEM} from './constants';\nimport AttributeManager from './attribute/attribute-manager';\nimport UniformTransitionManager from './uniform-transition-manager';\nimport {diffProps, validateProps} from '../lifecycle/props';\nimport {count} from '../utils/count';\nimport log from '../utils/log';\nimport debug from '../debug';\nimport GL from '@luma.gl/constants';\nimport {withParameters, setParameters} from '@luma.gl/core';\nimport assert from '../utils/assert';\nimport memoize from '../utils/memoize';\nimport {mergeShaders} from '../utils/shader';\nimport {projectPosition, getWorldPosition} from '../shaderlib/project/project-functions';\nimport typedArrayManager from '../utils/typed-array-manager';\n\nimport Component from '../lifecycle/component';\nimport LayerState from './layer-state';\n\nimport {worldToPixels} from '@math.gl/web-mercator';\n\nimport {load} from '@loaders.gl/core';\n\nconst TRACE_CHANGE_FLAG = 'layer.changeFlag';\nconst TRACE_INITIALIZE = 'layer.initialize';\nconst TRACE_UPDATE = 'layer.update';\nconst TRACE_FINALIZE = 'layer.finalize';\nconst TRACE_MATCHED = 'layer.matched';\n\nconst MAX_PICKING_COLOR_CACHE_SIZE = 2 ** 24 - 1;\n\nconst EMPTY_ARRAY = Object.freeze([]);\n\n// Only compare the same two viewports once\nconst areViewportsEqual = memoize(({oldViewport, viewport}) => {\n return oldViewport.equals(viewport);\n});\n\nlet pickingColorCache = new Uint8ClampedArray(0);\n\nconst defaultProps = {\n // data: Special handling for null, see below\n data: {type: 'data', value: EMPTY_ARRAY, async: true},\n dataComparator: null,\n _dataDiff: {type: 'function', value: data => data && data.__diff, compare: false, optional: true},\n dataTransform: {type: 'function', value: null, compare: false, optional: true},\n onDataLoad: {type: 'function', value: null, compare: false, optional: true},\n onError: {type: 'function', value: null, compare: false, optional: true},\n fetch: {\n type: 'function',\n value: (url, {propName, layer, loaders, loadOptions, signal}) => {\n const {resourceManager} = layer.context;\n loadOptions = loadOptions || layer.getLoadOptions();\n loaders = loaders || layer.props.loaders;\n if (signal) {\n loadOptions = {\n ...loadOptions,\n fetch: {\n ...loadOptions?.fetch,\n signal\n }\n };\n }\n\n let inResourceManager = resourceManager.contains(url);\n\n if (!inResourceManager && !loadOptions) {\n // If there is no layer-specific load options, then attempt to cache this resource in the data manager\n resourceManager.add({resourceId: url, data: load(url, loaders), persistent: false});\n inResourceManager = true;\n }\n if (inResourceManager) {\n return resourceManager.subscribe({\n resourceId: url,\n onChange: data => layer.internalState.reloadAsyncProp(propName, data),\n consumerId: layer.id,\n requestId: propName\n });\n }\n\n return load(url, loaders, loadOptions);\n },\n compare: false\n },\n updateTriggers: {}, // Update triggers: a core change detection mechanism in deck.gl\n\n visible: true,\n pickable: false,\n opacity: {type: 'number', min: 0, max: 1, value: 1},\n\n onHover: {type: 'function', value: null, compare: false, optional: true},\n onClick: {type: 'function', value: null, compare: false, optional: true},\n onDragStart: {type: 'function', value: null, compare: false, optional: true},\n onDrag: {type: 'function', value: null, compare: false, optional: true},\n onDragEnd: {type: 'function', value: null, compare: false, optional: true},\n\n coordinateSystem: COORDINATE_SYSTEM.DEFAULT,\n coordinateOrigin: {type: 'array', value: [0, 0, 0], compare: true},\n modelMatrix: {type: 'array', value: null, compare: true, optional: true},\n wrapLongitude: false,\n positionFormat: 'XYZ',\n colorFormat: 'RGBA',\n\n parameters: {},\n transitions: null,\n extensions: [],\n loaders: {type: 'array', value: [], optional: true, compare: true},\n\n // Offset depth based on layer index to avoid z-fighting.\n // Negative values pull layer towards the camera\n // https://www.opengl.org/archives/resources/faq/technical/polygonoffset.htm\n getPolygonOffset: {\n type: 'function',\n value: ({layerIndex}) => [0, -layerIndex * 100],\n compare: false\n },\n\n // Selection/Highlighting\n highlightedObjectIndex: -1,\n autoHighlight: false,\n highlightColor: {type: 'accessor', value: [0, 0, 128, 128]}\n};\n\nexport default class Layer extends Component {\n toString() {\n const className = this.constructor.layerName || this.constructor.name;\n return `${className}({id: '${this.props.id}'})`;\n }\n\n raiseError(error, message) {\n if (message) {\n error.message = `${message}: ${error.message}`;\n }\n if (!this.props.onError?.(error)) {\n this.context?.onError?.(error, this);\n }\n }\n\n // Public API\n\n // Updates selected state members and marks the object for redraw\n setState(updateObject) {\n this.setChangeFlags({stateChanged: true});\n Object.assign(this.state, updateObject);\n this.setNeedsRedraw();\n }\n\n // Sets the redraw flag for this layer, will trigger a redraw next animation frame\n setNeedsRedraw(redraw = true) {\n if (this.internalState) {\n this.internalState.needsRedraw = redraw;\n }\n }\n\n // This layer needs a deep update\n setNeedsUpdate() {\n this.context.layerManager.setNeedsUpdate(String(this));\n this.internalState.needsUpdate = true;\n }\n\n // Checks state of attributes and model\n getNeedsRedraw(opts = {clearRedrawFlags: false}) {\n return this._getNeedsRedraw(opts);\n }\n\n // Checks if layer attributes needs updating\n needsUpdate() {\n // Call subclass lifecycle method\n return (\n this.internalState.needsUpdate ||\n this.hasUniformTransition() ||\n this.shouldUpdateState(this._getUpdateParams())\n );\n // End lifecycle method\n }\n\n hasUniformTransition() {\n return this.internalState.uniformTransitions.active;\n }\n\n get isLoaded() {\n return this.internalState && !this.internalState.isAsyncPropLoading();\n }\n\n get wrapLongitude() {\n return this.props.wrapLongitude;\n }\n\n // Returns true if the layer is pickable and visible.\n isPickable() {\n return this.props.pickable && this.props.visible;\n }\n\n // Return an array of models used by this layer, can be overriden by layer subclass\n getModels() {\n return this.state && (this.state.models || (this.state.model ? [this.state.model] : []));\n }\n\n getAttributeManager() {\n return this.internalState && this.internalState.attributeManager;\n }\n\n // Returns the most recent layer that matched to this state\n // (When reacting to an async event, this layer may no longer be the latest)\n getCurrentLayer() {\n return this.internalState && this.internalState.layer;\n }\n\n // Returns the default parse options for async props\n getLoadOptions() {\n return this.props.loadOptions;\n }\n\n // PROJECTION METHODS\n\n // Projects a point with current map state (lat, lon, zoom, pitch, bearing)\n // From the current layer's coordinate system to screen\n project(xyz) {\n const {viewport} = this.context;\n const worldPosition = getWorldPosition(xyz, {\n viewport,\n modelMatrix: this.props.modelMatrix,\n coordinateOrigin: this.props.coordinateOrigin,\n coordinateSystem: this.props.coordinateSystem\n });\n const [x, y, z] = worldToPixels(worldPosition, viewport.pixelProjectionMatrix);\n return xyz.length === 2 ? [x, y] : [x, y, z];\n }\n\n // Note: this does not reverse `project`.\n // Always unprojects to the viewport's coordinate system\n unproject(xy) {\n const {viewport} = this.context;\n return viewport.unproject(xy);\n }\n\n projectPosition(xyz) {\n return projectPosition(xyz, {\n viewport: this.context.viewport,\n modelMatrix: this.props.modelMatrix,\n coordinateOrigin: this.props.coordinateOrigin,\n coordinateSystem: this.props.coordinateSystem\n });\n }\n\n use64bitPositions() {\n const {coordinateSystem} = this.props;\n return (\n coordinateSystem === COORDINATE_SYSTEM.DEFAULT ||\n coordinateSystem === COORDINATE_SYSTEM.LNGLAT ||\n coordinateSystem === COORDINATE_SYSTEM.CARTESIAN\n );\n }\n\n // Event handling\n onHover(info, pickingEvent) {\n if (this.props.onHover) {\n return this.props.onHover(info, pickingEvent);\n }\n return false;\n }\n\n onClick(info, pickingEvent) {\n if (this.props.onClick) {\n return this.props.onClick(info, pickingEvent);\n }\n return false;\n }\n\n // Returns the picking color that doesn't match any subfeature\n // Use if some graphics do not belong to any pickable subfeature\n // @return {Array} - a black color\n nullPickingColor() {\n return [0, 0, 0];\n }\n\n // Returns the picking color that doesn't match any subfeature\n // Use if some graphics do not belong to any pickable subfeature\n encodePickingColor(i, target = []) {\n target[0] = (i + 1) & 255;\n target[1] = ((i + 1) >> 8) & 255;\n target[2] = (((i + 1) >> 8) >> 8) & 255;\n return target;\n }\n\n // Returns the index corresponding to a picking color that doesn't match any subfeature\n // @param {Uint8Array} color - color array to be decoded\n // @return {Array} - the decoded picking color\n decodePickingColor(color) {\n assert(color instanceof Uint8Array);\n const [i1, i2, i3] = color;\n // 1 was added to seperate from no selection\n const index = i1 + i2 * 256 + i3 * 65536 - 1;\n return index;\n }\n\n // //////////////////////////////////////////////////\n // LIFECYCLE METHODS, overridden by the layer subclasses\n\n // Called once to set up the initial state\n // App can create WebGL resources\n initializeState() {\n throw new Error(`Layer ${this} has not defined initializeState`);\n }\n\n getShaders(shaders) {\n for (const extension of this.props.extensions) {\n shaders = mergeShaders(shaders, extension.getShaders.call(this, extension));\n }\n return shaders;\n }\n\n // Let's layer control if updateState should be called\n shouldUpdateState({oldProps, props, context, changeFlags}) {\n return changeFlags.propsOrDataChanged;\n }\n\n // Default implementation, all attributes will be invalidated and updated\n // when data changes\n /* eslint-disable-next-line complexity */\n updateState({oldProps, props, context, changeFlags}) {\n const attributeManager = this.getAttributeManager();\n if (changeFlags.dataChanged && attributeManager) {\n const {dataChanged} = changeFlags;\n if (Array.isArray(dataChanged)) {\n // is partial update\n for (const dataRange of dataChanged) {\n attributeManager.invalidateAll(dataRange);\n }\n } else {\n attributeManager.invalidateAll();\n }\n }\n\n const neededPickingBuffer = oldProps.highlightedObjectIndex >= 0 || oldProps.pickable;\n const needPickingBuffer = props.highlightedObjectIndex >= 0 || props.pickable;\n if (neededPickingBuffer !== needPickingBuffer && attributeManager) {\n const {pickingColors, instancePickingColors} = attributeManager.attributes;\n const pickingColorsAttribute = pickingColors || instancePickingColors;\n if (pickingColorsAttribute) {\n if (needPickingBuffer && pickingColorsAttribute.constant) {\n pickingColorsAttribute.constant = false;\n attributeManager.invalidate(pickingColorsAttribute.id);\n }\n if (!pickingColorsAttribute.value && !needPickingBuffer) {\n pickingColorsAttribute.constant = true;\n pickingColorsAttribute.value = [0, 0, 0];\n }\n }\n }\n }\n\n // Called once when layer is no longer matched and state will be discarded\n // App can destroy WebGL resources here\n finalizeState() {\n for (const model of this.getModels()) {\n model.delete();\n }\n const attributeManager = this.getAttributeManager();\n if (attributeManager) {\n attributeManager.finalize();\n }\n this.context.resourceManager.unsubscribe({consumerId: this.id});\n this.internalState.uniformTransitions.clear();\n this.internalState.finalize();\n }\n\n // If state has a model, draw it with supplied uniforms\n draw(opts) {\n for (const model of this.getModels()) {\n model.draw(opts);\n }\n }\n\n // called to populate the info object that is passed to the event handler\n // @return null to cancel event\n getPickingInfo({info, mode}) {\n const {index} = info;\n\n if (index >= 0) {\n // If props.data is an indexable array, get the object\n if (Array.isArray(this.props.data)) {\n info.object = this.props.data[index];\n }\n }\n\n return info;\n }\n\n // END LIFECYCLE METHODS\n // //////////////////////////////////////////////////\n\n // INTERNAL METHODS\n activateViewport(viewport) {\n const oldViewport = this.internalState.viewport;\n this.internalState.viewport = viewport;\n\n if (!oldViewport || !areViewportsEqual({oldViewport, viewport})) {\n this.setChangeFlags({viewportChanged: true});\n\n if (this.isComposite) {\n if (this.needsUpdate()) {\n // Composite layers may add/remove sublayers on viewport change\n // Because we cannot change the layers list during a draw cycle, we don't want to update sublayers right away\n // This will not call update immediately, but mark the layerManager as needs update on the next frame\n this.setNeedsUpdate();\n }\n } else {\n this._update();\n }\n }\n }\n\n // Default implementation of attribute invalidation, can be redefined\n invalidateAttribute(name = 'all', diffReason = '') {\n const attributeManager = this.getAttributeManager();\n if (!attributeManager) {\n return;\n }\n\n if (name === 'all') {\n attributeManager.invalidateAll();\n } else {\n attributeManager.invalidate(name);\n }\n }\n\n updateAttributes(changedAttributes) {\n for (const model of this.getModels()) {\n this._setModelAttributes(model, changedAttributes);\n }\n }\n\n // Calls attribute manager to update any WebGL attributes\n _updateAttributes(props) {\n const attributeManager = this.getAttributeManager();\n if (!attributeManager) {\n return;\n }\n\n // Figure out data length\n const numInstances = this.getNumInstances(props);\n const startIndices = this.getStartIndices(props);\n\n attributeManager.update({\n data: props.data,\n numInstances,\n startIndices,\n props,\n transitions: props.transitions,\n buffers: props.data.attributes,\n context: this,\n // Don't worry about non-attribute props\n ignoreUnknownAttributes: true\n });\n\n const changedAttributes = attributeManager.getChangedAttributes({clearChangedFlags: true});\n this.updateAttributes(changedAttributes);\n }\n\n // Update attribute transitions. This is called in drawLayer, no model updates required.\n _updateAttributeTransition() {\n const attributeManager = this.getAttributeManager();\n if (attributeManager) {\n attributeManager.updateTransition();\n }\n }\n\n // Update uniform (prop) transitions. This is called in updateState, may result in model updates.\n _updateUniformTransition() {\n const {uniformTransitions} = this.internalState;\n if (uniformTransitions.active) {\n // clone props\n const propsInTransition = uniformTransitions.update();\n const props = Object.create(this.props);\n for (const key in propsInTransition) {\n Object.defineProperty(props, key, {value: propsInTransition[key]});\n }\n return props;\n }\n return this.props;\n }\n\n calculateInstancePickingColors(attribute, {numInstances}) {\n if (attribute.constant) {\n return;\n }\n\n // calculateInstancePickingColors always generates the same sequence.\n // pickingColorCache saves the largest generated sequence for reuse\n const cacheSize = Math.floor(pickingColorCache.length / 3);\n\n // Record when using the picking buffer cache, so that layers can always point at the most recently allocated cache\n this.internalState.usesPickingColorCache = true;\n\n if (cacheSize < numInstances) {\n if (numInstances > MAX_PICKING_COLOR_CACHE_SIZE) {\n log.warn(\n 'Layer has too many data objects. Picking might not be able to distinguish all objects.'\n )();\n }\n\n pickingColorCache = typedArrayManager.allocate(pickingColorCache, numInstances, {\n size: 3,\n copy: true,\n maxCount: Math.max(numInstances, MAX_PICKING_COLOR_CACHE_SIZE)\n });\n\n // If the attribute is larger than the cache, resize the cache and populate the missing chunk\n const newCacheSize = Math.floor(pickingColorCache.length / 3);\n const pickingColor = [];\n for (let i = cacheSize; i < newCacheSize; i++) {\n this.encodePickingColor(i, pickingColor);\n pickingColorCache[i * 3 + 0] = pickingColor[0];\n pickingColorCache[i * 3 + 1] = pickingColor[1];\n pickingColorCache[i * 3 + 2] = pickingColor[2];\n }\n }\n\n attribute.value = pickingColorCache.subarray(0, numInstances * 3);\n }\n\n _setModelAttributes(model, changedAttributes) {\n const attributeManager = this.getAttributeManager();\n const excludeAttributes = model.userData.excludeAttributes || {};\n const shaderAttributes = attributeManager.getShaderAttributes(\n changedAttributes,\n excludeAttributes\n );\n\n model.setAttributes(shaderAttributes);\n }\n\n // Sets the picking color at the specified index to null picking color. Used for multi-depth picking.\n // This method may be overriden by layer implementations\n disablePickingIndex(objectIndex) {\n this._disablePickingIndex(objectIndex);\n }\n\n _disablePickingIndex(objectIndex) {\n const {pickingColors, instancePickingColors} = this.getAttributeManager().attributes;\n const colors = pickingColors || instancePickingColors;\n\n const start = colors.getVertexOffset(objectIndex);\n const end = colors.getVertexOffset(objectIndex + 1);\n\n // Fill the sub buffer with 0s\n colors.buffer.subData({\n data: new Uint8Array(end - start),\n offset: start // 1 byte per element\n });\n }\n\n restorePickingColors() {\n const {pickingColors, instancePickingColors} = this.getAttributeManager().attributes;\n const colors = pickingColors || instancePickingColors;\n // The picking color cache may have been freed and then reallocated. This ensures we read from the currently allocated cache.\n if (\n this.internalState.usesPickingColorCache &&\n colors.value.buffer !== pickingColorCache.buffer\n ) {\n colors.value = pickingColorCache.subarray(0, colors.value.length);\n }\n colors.updateSubBuffer({startOffset: 0});\n }\n\n // Deduces numer of instances. Intention is to support:\n // - Explicit setting of numInstances\n // - Auto-deduction for ES6 containers that define a size member\n // - Auto-deduction for Classic Arrays via the built-in length attribute\n // - Auto-deduction via arrays\n getNumInstances(props) {\n props = props || this.props;\n\n // First Check if app has provided an explicit value\n if (props.numInstances !== undefined) {\n return props.numInstances;\n }\n\n // Second check if the layer has set its own value\n if (this.state && this.state.numInstances !== undefined) {\n return this.state.numInstances;\n }\n\n // Use container library to get a count for any ES6 container or object\n return count(props.data);\n }\n\n // Buffer layout describes how many attribute values are packed for each data object\n // The default (null) is one value each object.\n // Some data formats (e.g. paths, polygons) have various length. Their buffer layout\n // is in the form of [L0, L1, L2, ...]\n getStartIndices(props) {\n props = props || this.props;\n\n // First Check if startIndices is provided as an explicit value\n if (props.startIndices !== undefined) {\n return props.startIndices;\n }\n\n // Second check if the layer has set its own value\n if (this.state && this.state.startIndices) {\n return this.state.startIndices;\n }\n\n return null;\n }\n\n // LAYER MANAGER API\n // Should only be called by the deck.gl LayerManager class\n\n // Called by layer manager when a new layer is found\n /* eslint-disable max-statements */\n _initialize() {\n debug(TRACE_INITIALIZE, this);\n\n this._initState();\n\n // Call subclass lifecycle methods\n this.initializeState(this.context);\n // Initialize extensions\n for (const extension of this.props.extensions) {\n extension.initializeState.call(this, this.context, extension);\n }\n // End subclass lifecycle methods\n\n // initializeState callback tends to clear state\n this.setChangeFlags({\n dataChanged: true,\n propsChanged: true,\n viewportChanged: true,\n extensionsChanged: true\n });\n\n this._updateState();\n }\n\n // Called by layer manager\n // if this layer is new (not matched with an existing layer) oldProps will be empty object\n _update() {\n // Call subclass lifecycle method\n const stateNeedsUpdate = this.needsUpdate();\n // End lifecycle method\n debug(TRACE_UPDATE, this, stateNeedsUpdate);\n\n if (stateNeedsUpdate) {\n this._updateState();\n }\n }\n\n // Common code for _initialize and _update\n _updateState() {\n const currentProps = this.props;\n const currentViewport = this.context.viewport;\n const propsInTransition = this._updateUniformTransition();\n this.internalState.propsInTransition = propsInTransition;\n // Overwrite this.context.viewport during update to use the last activated viewport on this layer\n // In multi-view applications, a layer may only be drawn in one of the views\n // Which would make the \"active\" viewport different from the shared context\n this.context.viewport = this.internalState.viewport || currentViewport;\n // Overwrite this.props during update to use in-transition prop values\n this.props = propsInTransition;\n\n try {\n const updateParams = this._getUpdateParams();\n const oldModels = this.getModels();\n\n // Safely call subclass lifecycle methods\n if (this.context.gl) {\n this.updateState(updateParams);\n } else {\n try {\n this.updateState(updateParams);\n } catch (error) {\n // ignore error if gl context is missing\n }\n }\n // Execute extension updates\n for (const extension of this.props.extensions) {\n extension.updateState.call(this, updateParams, extension);\n }\n\n const modelChanged = this.getModels()[0] !== oldModels[0];\n this._updateModules(updateParams, modelChanged);\n // End subclass lifecycle methods\n\n if (this.isComposite) {\n // Render or update previously rendered sublayers\n this._renderLayers(updateParams);\n } else {\n this.setNeedsRedraw();\n // Add any subclass attributes\n this._updateAttributes(this.props);\n\n // Note: Automatic instance count update only works for single layers\n if (this.state.model) {\n this.state.model.setInstanceCount(this.getNumInstances());\n }\n }\n } finally {\n // Restore shared context\n this.context.viewport = currentViewport;\n this.props = currentProps;\n this.clearChangeFlags();\n this.internalState.needsUpdate = false;\n this.internalState.resetOldProps();\n }\n }\n /* eslint-enable max-statements */\n\n // Called by manager when layer is about to be disposed\n // Note: not guaranteed to be called on application shutdown\n _finalize() {\n debug(TRACE_FINALIZE, this);\n\n // Call subclass lifecycle method\n this.finalizeState(this.context);\n // Finalize extensions\n for (const extension of this.props.extensions) {\n extension.finalizeState.call(this, extension);\n }\n }\n\n // Calculates uniforms\n drawLayer({moduleParameters = null, uniforms = {}, parameters = {}}) {\n this._updateAttributeTransition();\n\n const currentProps = this.props;\n // Overwrite this.props during redraw to use in-transition prop values\n // `internalState.propsInTransition` could be missing if `updateState` failed\n this.props = this.internalState.propsInTransition || currentProps;\n\n const {opacity} = this.props;\n // apply gamma to opacity to make it visually \"linear\"\n uniforms.opacity = Math.pow(opacity, 1 / 2.2);\n\n try {\n // TODO/ib - hack move to luma Model.draw\n if (moduleParameters) {\n this.setModuleParameters(moduleParameters);\n }\n\n // Apply polygon offset to avoid z-fighting\n // TODO - move to draw-layers\n const {getPolygonOffset} = this.props;\n const offsets = (getPolygonOffset && getPolygonOffset(uniforms)) || [0, 0];\n\n setParameters(this.context.gl, {polygonOffset: offsets});\n\n // Call subclass lifecycle method\n withParameters(this.context.gl, parameters, () => {\n const opts = {moduleParameters, uniforms, parameters, context: this.context};\n\n // extensions\n for (const extension of this.props.extensions) {\n extension.draw.call(this, opts, extension);\n }\n\n this.draw(opts);\n });\n } finally {\n this.props = currentProps;\n }\n\n // End lifecycle method\n }\n\n // Helper methods\n getChangeFlags() {\n return this.internalState.changeFlags;\n }\n\n // Dirty some change flags, will be handled by updateLayer\n /* eslint-disable complexity */\n setChangeFlags(flags) {\n const {changeFlags} = this.internalState;\n\n /* eslint-disable no-fallthrough, max-depth */\n for (const key in flags) {\n if (flags[key]) {\n let flagChanged = false;\n switch (key) {\n case 'dataChanged':\n // changeFlags.dataChanged may be `false`, a string (reason) or an array of ranges\n if (Array.isArray(changeFlags[key])) {\n changeFlags[key] = Array.isArray(flags[key])\n ? changeFlags[key].concat(flags[key])\n : flags[key];\n flagChanged = true;\n }\n\n default:\n if (!changeFlags[key]) {\n changeFlags[key] = flags[key];\n flagChanged = true;\n }\n }\n if (flagChanged) {\n debug(TRACE_CHANGE_FLAG, this, key, flags);\n }\n }\n }\n /* eslint-enable no-fallthrough, max-depth */\n\n // Update composite flags\n const propsOrDataChanged =\n changeFlags.dataChanged ||\n changeFlags.updateTriggersChanged ||\n changeFlags.propsChanged ||\n changeFlags.extensionsChanged;\n changeFlags.propsOrDataChanged = propsOrDataChanged;\n changeFlags.somethingChanged =\n propsOrDataChanged || flags.viewportChanged || flags.stateChanged;\n }\n /* eslint-enable complexity */\n\n // Clear all changeFlags, typically after an update\n clearChangeFlags() {\n this.internalState.changeFlags = {\n // Primary changeFlags, can be strings stating reason for change\n dataChanged: false,\n propsChanged: false,\n updateTriggersChanged: false,\n viewportChanged: false,\n stateChanged: false,\n extensionsChanged: false,\n\n // Derived changeFlags\n propsOrDataChanged: false,\n somethingChanged: false\n };\n }\n\n // Compares the layers props with old props from a matched older layer\n // and extracts change flags that describe what has change so that state\n // can be update correctly with minimal effort\n diffProps(newProps, oldProps) {\n const changeFlags = diffProps(newProps, oldProps);\n\n // iterate over changedTriggers\n if (changeFlags.updateTriggersChanged) {\n for (const key in changeFlags.updateTriggersChanged) {\n if (changeFlags.updateTriggersChanged[key]) {\n this.invalidateAttribute(key);\n }\n }\n }\n\n // trigger uniform transitions\n if (changeFlags.transitionsChanged) {\n for (const key in changeFlags.transitionsChanged) {\n // prop changed and transition is enabled\n this.internalState.uniformTransitions.add(\n key,\n oldProps[key],\n newProps[key],\n newProps.transitions[key]\n );\n }\n }\n\n return this.setChangeFlags(changeFlags);\n }\n\n // Called by layer manager to validate props (in development)\n validateProps() {\n validateProps(this.props);\n }\n\n setModuleParameters(moduleParameters) {\n for (const model of this.getModels()) {\n model.updateModuleSettings(moduleParameters);\n }\n }\n\n updateAutoHighlight(info) {\n if (this.props.autoHighlight) {\n this._updateAutoHighlight(info);\n }\n }\n\n // May be overriden by classes\n _updateAutoHighlight(info) {\n const pickingModuleParameters = {\n pickingSelectedColor: info.picked ? info.color : null\n };\n const {highlightColor} = this.props;\n if (info.picked && typeof highlightColor === 'function') {\n pickingModuleParameters.pickingHighlightColor = highlightColor(info);\n }\n this.setModuleParameters(pickingModuleParameters);\n // setModuleParameters does not trigger redraw\n this.setNeedsRedraw();\n }\n\n // PRIVATE METHODS\n _updateModules({props, oldProps}, forceUpdate) {\n // Picking module parameters\n const {autoHighlight, highlightedObjectIndex, highlightColor} = props;\n if (\n forceUpdate ||\n oldProps.autoHighlight !== autoHighlight ||\n oldProps.highlightedObjectIndex !== highlightedObjectIndex ||\n oldProps.highlightColor !== highlightColor\n ) {\n const parameters = {};\n if (!autoHighlight) {\n parameters.pickingSelectedColor = null;\n }\n if (Array.isArray(highlightColor)) {\n parameters.pickingHighlightColor = highlightColor;\n }\n\n // highlightedObjectIndex will overwrite any settings from auto highlighting.\n if (Number.isInteger(highlightedObjectIndex)) {\n parameters.pickingSelectedColor =\n highlightedObjectIndex >= 0 ? this.encodePickingColor(highlightedObjectIndex) : null;\n }\n\n this.setModuleParameters(parameters);\n }\n }\n\n _getUpdateParams() {\n return {\n props: this.props,\n oldProps: this.internalState.getOldProps(),\n context: this.context,\n changeFlags: this.internalState.changeFlags\n };\n }\n\n // Checks state of attributes and model\n _getNeedsRedraw(opts) {\n // this method may be called by the render loop as soon a the layer\n // has been created, so guard against uninitialized state\n if (!this.internalState) {\n return false;\n }\n\n let redraw = false;\n redraw = redraw || (this.internalState.needsRedraw && this.id);\n this.internalState.needsRedraw = this.internalState.needsRedraw && !opts.clearRedrawFlags;\n\n // TODO - is attribute manager needed? - Model should be enough.\n const attributeManager = this.getAttributeManager();\n const attributeManagerNeedsRedraw = attributeManager && attributeManager.getNeedsRedraw(opts);\n redraw = redraw || attributeManagerNeedsRedraw;\n\n return redraw;\n }\n\n // Create new attribute manager\n _getAttributeManager() {\n return new AttributeManager(this.context.gl, {\n id: this.props.id,\n stats: this.context.stats,\n timeline: this.context.timeline\n });\n }\n\n _initState() {\n assert(!this.internalState && !this.state); // finalized layer cannot be reused\n assert(isFinite(this.props.coordinateSystem)); // invalid coordinateSystem\n\n const attributeManager = this._getAttributeManager();\n\n if (attributeManager) {\n // All instanced layers get instancePickingColors attribute by default\n // Their shaders can use it to render a picking scene\n // TODO - this slightly slows down non instanced layers\n attributeManager.addInstanced({\n instancePickingColors: {\n type: GL.UNSIGNED_BYTE,\n size: 3,\n noAlloc: true,\n update: this.calculateInstancePickingColors\n }\n });\n }\n\n this.internalState = new LayerState({\n attributeManager,\n layer: this\n });\n this.clearChangeFlags(); // populate this.internalState.changeFlags\n\n this.state = {};\n // for backwards compatibility with older layers\n // TODO - remove in next release\n /* eslint-disable accessor-pairs */\n Object.defineProperty(this.state, 'attributeManager', {\n get: () => {\n log.deprecated('layer.state.attributeManager', 'layer.getAttributeManager()');\n return attributeManager;\n }\n });\n /* eslint-enable accessor-pairs */\n\n this.internalState.layer = this;\n this.internalState.uniformTransitions = new UniformTransitionManager(this.context.timeline);\n this.internalState.onAsyncPropUpdated = this._onAsyncPropUpdated.bind(this);\n\n // Ensure any async props are updated\n this.internalState.setAsyncProps(this.props);\n }\n\n // Called by layer manager to transfer state from an old layer\n _transferState(oldLayer) {\n debug(TRACE_MATCHED, this, this === oldLayer);\n\n const {state, internalState} = oldLayer;\n\n if (this === oldLayer) {\n return;\n }\n\n // Move internalState\n this.internalState = internalState;\n this.internalState.layer = this;\n\n // Move state\n this.state = state;\n // We keep the state ref on old layers to support async actions\n // oldLayer.state = null;\n\n // Ensure any async props are updated\n this.internalState.setAsyncProps(this.props);\n\n this.diffProps(this.props, this.internalState.getOldProps());\n }\n\n _onAsyncPropUpdated() {\n this.diffProps(this.props, this.internalState.getOldProps());\n this.setNeedsUpdate();\n }\n}\n\nLayer.layerName = 'Layer';\nLayer.defaultProps = defaultProps;\n","/* eslint-disable complexity */\n\n/* This class creates a luma.gl-compatible \"view\" on top of a DataColumn instance */\nexport default class ShaderAttribute {\n constructor(dataColumn, opts) {\n // Options that cannot be changed later\n this.opts = opts;\n this.source = dataColumn;\n }\n\n get value() {\n return this.source.value;\n }\n\n getValue() {\n const buffer = this.source.getBuffer();\n const accessor = this.getAccessor();\n if (buffer) {\n return [buffer, accessor];\n }\n\n const {value} = this.source;\n const {size} = accessor;\n let constantValue = value;\n\n if (value && value.length !== size) {\n constantValue = new Float32Array(size);\n // initiate offset values\n const index = accessor.elementOffset || 0; // element offset\n for (let i = 0; i < size; ++i) {\n constantValue[i] = value[index + i];\n }\n }\n\n return constantValue;\n }\n\n getAccessor() {\n return {\n // source data accessor\n ...this.source.getAccessor(),\n // shader attribute overrides\n ...this.opts\n };\n }\n}\n","/* eslint-disable complexity */\nimport GL from '@luma.gl/constants';\nimport {hasFeature, FEATURES, Buffer} from '@luma.gl/core';\nimport ShaderAttribute from './shader-attribute';\nimport {glArrayFromType} from './gl-utils';\nimport typedArrayManager from '../../utils/typed-array-manager';\nimport {toDoublePrecisionArray} from '../../utils/math-utils';\nimport log from '../../utils/log';\n\nfunction getStride(accessor) {\n return accessor.stride || accessor.size * accessor.bytesPerElement;\n}\n\nfunction resolveShaderAttribute(baseAccessor, shaderAttributeOptions) {\n if (shaderAttributeOptions.offset) {\n log.removed('shaderAttribute.offset', 'vertexOffset, elementOffset')();\n }\n\n // All shader attributes share the parent's stride\n const stride = getStride(baseAccessor);\n // `vertexOffset` is used to access the neighboring vertex's value\n // e.g. `nextPositions` in polygon\n const vertexOffset =\n 'vertexOffset' in shaderAttributeOptions\n ? shaderAttributeOptions.vertexOffset\n : baseAccessor.vertexOffset || 0;\n // `elementOffset` is defined when shader attribute's size is smaller than the parent's\n // e.g. `translations` in transform matrix\n const elementOffset = shaderAttributeOptions.elementOffset || 0;\n const offset =\n // offsets defined by the attribute\n vertexOffset * stride +\n elementOffset * baseAccessor.bytesPerElement +\n // offsets defined by external buffers if any\n (baseAccessor.offset || 0);\n\n return {\n ...shaderAttributeOptions,\n offset,\n stride\n };\n}\n\nfunction resolveDoublePrecisionShaderAttributes(baseAccessor, shaderAttributeOptions) {\n const resolvedOptions = resolveShaderAttribute(baseAccessor, shaderAttributeOptions);\n\n return {\n high: resolvedOptions,\n low: {\n ...resolvedOptions,\n offset: resolvedOptions.offset + baseAccessor.size * 4\n }\n };\n}\n\nexport default class DataColumn {\n /* eslint-disable max-statements */\n constructor(gl, opts) {\n this.gl = gl;\n this.id = opts.id;\n this.size = opts.size;\n\n const logicalType = opts.logicalType || opts.type;\n const doublePrecision = logicalType === GL.DOUBLE;\n\n let {defaultValue} = opts;\n defaultValue = Number.isFinite(defaultValue)\n ? [defaultValue]\n : defaultValue || new Array(this.size).fill(0);\n opts.defaultValue = defaultValue;\n\n let bufferType = logicalType;\n if (doublePrecision) {\n bufferType = GL.FLOAT;\n } else if (!bufferType && opts.isIndexed) {\n bufferType =\n gl && hasFeature(gl, FEATURES.ELEMENT_INDEX_UINT32) ? GL.UNSIGNED_INT : GL.UNSIGNED_SHORT;\n } else if (!bufferType) {\n bufferType = GL.FLOAT;\n }\n opts.logicalType = logicalType;\n opts.type = bufferType;\n\n // This is the attribute type defined by the layer\n // If an external buffer is provided, this.type may be overwritten\n // But we always want to use defaultType for allocation\n let defaultType = glArrayFromType(logicalType || bufferType || GL.FLOAT);\n this.shaderAttributes = {};\n this.doublePrecision = doublePrecision;\n\n // `fp64: false` tells a double-precision attribute to allocate Float32Arrays\n // by default when using auto-packing. This is more efficient in use cases where\n // high precision is unnecessary, but the `64Low` attribute is still required\n // by the shader.\n if (doublePrecision && opts.fp64 === false) {\n defaultType = Float32Array;\n }\n opts.bytesPerElement = defaultType.BYTES_PER_ELEMENT;\n\n this.defaultType = defaultType;\n this.value = null;\n this.settings = opts;\n this.state = {\n externalBuffer: null,\n bufferAccessor: opts,\n allocatedValue: null,\n constant: false\n };\n this._buffer = null;\n\n this.setData(opts);\n }\n /* eslint-enable max-statements */\n\n get buffer() {\n if (!this._buffer) {\n const {isIndexed, type} = this.settings;\n this._buffer = new Buffer(this.gl, {\n id: this.id,\n target: isIndexed ? GL.ELEMENT_ARRAY_BUFFER : GL.ARRAY_BUFFER,\n accessor: {type}\n });\n }\n return this._buffer;\n }\n\n get byteOffset() {\n const accessor = this.getAccessor();\n if (accessor.vertexOffset) {\n return accessor.vertexOffset * getStride(accessor);\n }\n return 0;\n }\n\n delete() {\n if (this._buffer) {\n this._buffer.delete();\n this._buffer = null;\n }\n typedArrayManager.release(this.state.allocatedValue);\n }\n\n getShaderAttributes(id, options) {\n if (this.doublePrecision) {\n const shaderAttributes = {};\n const isBuffer64Bit = this.value instanceof Float64Array;\n\n const doubleShaderAttributeDefs = resolveDoublePrecisionShaderAttributes(\n this.getAccessor(),\n options || {}\n );\n\n shaderAttributes[id] = new ShaderAttribute(this, doubleShaderAttributeDefs.high);\n shaderAttributes[`${id}64Low`] = isBuffer64Bit\n ? new ShaderAttribute(this, doubleShaderAttributeDefs.low)\n : new Float32Array(this.size); // use constant for low part if buffer is 32-bit\n return shaderAttributes;\n }\n if (options) {\n const shaderAttributeDef = resolveShaderAttribute(this.getAccessor(), options);\n return {[id]: new ShaderAttribute(this, shaderAttributeDef)};\n }\n return {[id]: this};\n }\n\n getBuffer() {\n if (this.state.constant) {\n return null;\n }\n return this.state.externalBuffer || this._buffer;\n }\n\n getValue() {\n if (this.state.constant) {\n return this.value;\n }\n return [this.getBuffer(), this.getAccessor()];\n }\n\n getAccessor() {\n return this.state.bufferAccessor;\n }\n\n // returns true if success\n // eslint-disable-next-line max-statements\n setData(opts) {\n const {state} = this;\n if (ArrayBuffer.isView(opts)) {\n opts = {value: opts};\n } else if (opts instanceof Buffer) {\n opts = {buffer: opts};\n }\n\n const accessor = {...this.settings, ...opts};\n state.bufferAccessor = accessor;\n\n if (opts.constant) {\n // set constant\n let value = opts.value;\n value = this._normalizeValue(value, [], 0);\n if (this.settings.normalized) {\n value = this._normalizeConstant(value);\n }\n const hasChanged = !state.constant || !this._areValuesEqual(value, this.value);\n\n if (!hasChanged) {\n return false;\n }\n state.externalBuffer = null;\n state.constant = true;\n this.value = value;\n } else if (opts.buffer) {\n const buffer = opts.buffer;\n state.externalBuffer = buffer;\n state.constant = false;\n this.value = opts.value;\n const isBuffer64Bit = opts.value instanceof Float64Array;\n\n // Copy the type of the buffer into the accessor\n accessor.type = opts.type || buffer.accessor.type;\n accessor.bytesPerElement = buffer.accessor.BYTES_PER_ELEMENT * (isBuffer64Bit ? 2 : 1);\n accessor.stride = getStride(accessor);\n } else if (opts.value) {\n this._checkExternalBuffer(opts);\n\n let value = opts.value;\n state.externalBuffer = null;\n state.constant = false;\n this.value = value;\n\n accessor.bytesPerElement = value.BYTES_PER_ELEMENT;\n accessor.stride = getStride(accessor);\n\n const {buffer, byteOffset} = this;\n\n if (this.doublePrecision && value instanceof Float64Array) {\n value = toDoublePrecisionArray(value, accessor);\n }\n\n // A small over allocation is used as safety margin\n // Shader attributes may try to access this buffer with bigger offsets\n const requiredBufferSize = value.byteLength + byteOffset + accessor.stride * 2;\n if (buffer.byteLength < requiredBufferSize) {\n buffer.reallocate(requiredBufferSize);\n }\n // Hack: force Buffer to infer data type\n buffer.setAccessor(null);\n buffer.subData({data: value, offset: byteOffset});\n accessor.type = opts.type || buffer.accessor.type;\n }\n\n return true;\n }\n\n updateSubBuffer(opts = {}) {\n const {value} = this;\n const {startOffset = 0, endOffset} = opts;\n this.buffer.subData({\n data:\n this.doublePrecision && value instanceof Float64Array\n ? toDoublePrecisionArray(value, {\n size: this.size,\n startIndex: startOffset,\n endIndex: endOffset\n })\n : value.subarray(startOffset, endOffset),\n offset: startOffset * value.BYTES_PER_ELEMENT + this.byteOffset\n });\n }\n\n allocate({numInstances, copy = false}) {\n const {state} = this;\n const oldValue = state.allocatedValue;\n\n // Allocate at least one element to ensure a valid buffer\n const value = typedArrayManager.allocate(oldValue, numInstances + 1, {\n size: this.size,\n type: this.defaultType,\n copy\n });\n\n this.value = value;\n\n const {buffer, byteOffset} = this;\n\n if (buffer.byteLength < value.byteLength + byteOffset) {\n buffer.reallocate(value.byteLength + byteOffset);\n\n if (copy && oldValue) {\n // Upload the full existing attribute value to the GPU, so that updateBuffer\n // can choose to only update a partial range.\n // TODO - copy old buffer to new buffer on the GPU\n buffer.subData({\n data:\n oldValue instanceof Float64Array ? toDoublePrecisionArray(oldValue, this) : oldValue,\n offset: byteOffset\n });\n }\n }\n\n state.allocatedValue = value;\n state.constant = false;\n state.externalBuffer = null;\n state.bufferAccessor = this.settings;\n return true;\n }\n\n // PRIVATE HELPER METHODS\n _checkExternalBuffer(opts) {\n const {value} = opts;\n if (!opts.constant && value) {\n const ArrayType = this.defaultType;\n\n let illegalArrayType = false;\n if (this.doublePrecision) {\n // not 32bit or 64bit\n illegalArrayType = value.BYTES_PER_ELEMENT < 4;\n }\n if (illegalArrayType) {\n throw new Error(`Attribute ${this.id} does not support ${value.constructor.name}`);\n }\n if (!(value instanceof ArrayType) && this.settings.normalized && !('normalized' in opts)) {\n log.warn(`Attribute ${this.id} is normalized`)();\n }\n }\n }\n\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer\n _normalizeConstant(value) {\n switch (this.settings.type) {\n case GL.BYTE:\n // normalize [-128, 127] to [-1, 1]\n return new Float32Array(value).map(x => ((x + 128) / 255) * 2 - 1);\n\n case GL.SHORT:\n // normalize [-32768, 32767] to [-1, 1]\n return new Float32Array(value).map(x => ((x + 32768) / 65535) * 2 - 1);\n\n case GL.UNSIGNED_BYTE:\n // normalize [0, 255] to [0, 1]\n return new Float32Array(value).map(x => x / 255);\n\n case GL.UNSIGNED_SHORT:\n // normalize [0, 65535] to [0, 1]\n return new Float32Array(value).map(x => x / 65535);\n\n default:\n // No normalization for gl.FLOAT and gl.HALF_FLOAT\n return value;\n }\n }\n\n /* check user supplied values and apply fallback */\n _normalizeValue(value, out, start) {\n const {defaultValue, size} = this.settings;\n\n if (Number.isFinite(value)) {\n out[start] = value;\n return out;\n }\n if (!value) {\n out[start] = defaultValue[0];\n return out;\n }\n\n // Important - switch cases are 5x more performant than a for loop!\n /* eslint-disable no-fallthrough, default-case */\n switch (size) {\n case 4:\n out[start + 3] = Number.isFinite(value[3]) ? value[3] : defaultValue[3];\n case 3:\n out[start + 2] = Number.isFinite(value[2]) ? value[2] : defaultValue[2];\n case 2:\n out[start + 1] = Number.isFinite(value[1]) ? value[1] : defaultValue[1];\n case 1:\n out[start + 0] = Number.isFinite(value[0]) ? value[0] : defaultValue[0];\n break;\n\n default:\n // In the rare case where the attribute size > 4, do it the slow way\n // This is used for e.g. transform matrices\n let i = size;\n while (--i >= 0) {\n out[start + i] = Number.isFinite(value[i]) ? value[i] : defaultValue[i];\n }\n }\n\n return out;\n }\n\n _areValuesEqual(value1, value2) {\n if (!value1 || !value2) {\n return false;\n }\n const {size} = this;\n for (let i = 0; i < size; i++) {\n if (value1[i] !== value2[i]) {\n return false;\n }\n }\n return true;\n }\n}\n","import GL from '@luma.gl/constants';\n\n/* eslint-disable complexity */\nexport function glArrayFromType(glType) {\n // Sorted in some order of likelihood to reduce amount of comparisons\n switch (glType) {\n case GL.FLOAT:\n return Float32Array;\n case GL.DOUBLE:\n return Float64Array;\n case GL.UNSIGNED_SHORT:\n case GL.UNSIGNED_SHORT_5_6_5:\n case GL.UNSIGNED_SHORT_4_4_4_4:\n case GL.UNSIGNED_SHORT_5_5_5_1:\n return Uint16Array;\n case GL.UNSIGNED_INT:\n return Uint32Array;\n case GL.UNSIGNED_BYTE:\n return Uint8ClampedArray;\n case GL.BYTE:\n return Int8Array;\n case GL.SHORT:\n return Int16Array;\n case GL.INT:\n return Int32Array;\n default:\n throw new Error('Unknown GL type');\n }\n}\n/* eslint-enable complexity */\n","/* \n * range (Array)\n * + start (Number) - the start index (incl.)\n * + end (Number) - the end index (excl.)\n * rangeList (Array) - array of sorted, combined ranges\n */\nexport const EMPTY = [];\nexport const FULL = [[0, Infinity]];\n\n// Insert a range into a range collection\nexport function add(rangeList, range) {\n // Noop if range collection already covers all\n if (rangeList === FULL) {\n return rangeList;\n }\n\n // Validate the input range\n if (range[0] < 0) {\n range[0] = 0;\n }\n if (range[0] >= range[1]) {\n return rangeList;\n }\n\n // TODO - split off to tree-shakable Range class\n const newRangeList = [];\n const len = rangeList.length;\n let insertPosition = 0;\n\n for (let i = 0; i < len; i++) {\n const range0 = rangeList[i];\n\n if (range0[1] < range[0]) {\n // the current range is to the left of the new range\n newRangeList.push(range0);\n insertPosition = i + 1;\n } else if (range0[0] > range[1]) {\n // the current range is to the right of the new range\n newRangeList.push(range0);\n } else {\n range = [Math.min(range0[0], range[0]), Math.max(range0[1], range[1])];\n }\n }\n newRangeList.splice(insertPosition, 0, range);\n return newRangeList;\n}\n","/* eslint-disable complexity */\nimport DataColumn from './data-column';\nimport assert from '../../utils/assert';\nimport {createIterable, getAccessorFromBuffer} from '../../utils/iterable-utils';\nimport {fillArray} from '../../utils/flatten';\nimport * as range from '../../utils/range';\nimport {normalizeTransitionSettings} from './attribute-transition-utils';\n\nexport default class Attribute extends DataColumn {\n constructor(gl, opts = {}) {\n super(gl, opts);\n\n const {\n // deck.gl fields\n transition = false,\n noAlloc = false,\n update = null,\n accessor = null,\n transform = null,\n startIndices = null\n } = opts;\n\n Object.assign(this.settings, {\n transition,\n noAlloc,\n update: update || (accessor && this._autoUpdater),\n accessor,\n transform\n });\n\n Object.assign(this.state, {\n lastExternalBuffer: null,\n binaryValue: null,\n binaryAccessor: null,\n needsUpdate: true,\n needsRedraw: false,\n updateRanges: range.FULL,\n startIndices\n });\n\n Object.seal(this.settings);\n Object.seal(this.state);\n\n // Check all fields and generate helpful error messages\n this._validateAttributeUpdaters();\n }\n\n get startIndices() {\n return this.state.startIndices;\n }\n\n set startIndices(layout) {\n this.state.startIndices = layout;\n }\n\n needsUpdate() {\n return this.state.needsUpdate;\n }\n\n needsRedraw({clearChangedFlags = false} = {}) {\n const needsRedraw = this.state.needsRedraw;\n this.state.needsRedraw = needsRedraw && !clearChangedFlags;\n return needsRedraw;\n }\n\n getUpdateTriggers() {\n const {accessor} = this.settings;\n\n // Backards compatibility: allow attribute name to be used as update trigger key\n return [this.id].concat((typeof accessor !== 'function' && accessor) || []);\n }\n\n supportsTransition() {\n return Boolean(this.settings.transition);\n }\n\n // Resolve transition settings object if transition is enabled, otherwise `null`\n getTransitionSetting(opts) {\n if (!opts || !this.supportsTransition()) {\n return null;\n }\n const {accessor} = this.settings;\n // TODO: have the layer resolve these transition settings itself?\n const layerSettings = this.settings.transition;\n // these are the transition settings passed in by the user\n const userSettings = Array.isArray(accessor)\n ? opts[accessor.find(a => opts[a])]\n : opts[accessor];\n\n // Shorthand: use duration instead of parameter object\n return normalizeTransitionSettings(userSettings, layerSettings);\n }\n\n setNeedsUpdate(reason = this.id, dataRange) {\n this.state.needsUpdate = this.state.needsUpdate || reason;\n this.setNeedsRedraw(reason);\n if (dataRange) {\n const {startRow = 0, endRow = Infinity} = dataRange;\n this.state.updateRanges = range.add(this.state.updateRanges, [startRow, endRow]);\n } else {\n this.state.updateRanges = range.FULL;\n }\n }\n\n clearNeedsUpdate() {\n this.state.needsUpdate = false;\n this.state.updateRanges = range.EMPTY;\n }\n\n setNeedsRedraw(reason = this.id) {\n this.state.needsRedraw = this.state.needsRedraw || reason;\n }\n\n update(opts) {\n // backward compatibility\n this.setData(opts);\n }\n\n allocate(numInstances) {\n const {state, settings} = this;\n\n if (settings.noAlloc) {\n // Data is provided through a Buffer object.\n return false;\n }\n\n if (settings.update) {\n super.allocate({\n numInstances,\n copy: state.updateRanges !== range.FULL\n });\n return true;\n }\n\n return false;\n }\n\n updateBuffer({numInstances, data, props, context}) {\n if (!this.needsUpdate()) {\n return false;\n }\n\n const {\n state: {updateRanges},\n settings: {update, noAlloc}\n } = this;\n\n let updated = true;\n if (update) {\n // Custom updater - typically for non-instanced layers\n for (const [startRow, endRow] of updateRanges) {\n update.call(context, this, {data, startRow, endRow, props, numInstances});\n }\n if (!this.value) {\n // no value was assigned during update\n } else if (\n this.constant ||\n this.buffer.byteLength < this.value.byteLength + this.byteOffset\n ) {\n this.setData({\n value: this.value,\n constant: this.constant\n });\n // Setting attribute.constant in updater is a legacy approach that interferes with allocation in the next cycle\n // Respect it here but reset after use\n this.constant = false;\n } else {\n for (const [startRow, endRow] of updateRanges) {\n const startOffset = Number.isFinite(startRow) ? this.getVertexOffset(startRow) : 0;\n const endOffset = Number.isFinite(endRow)\n ? this.getVertexOffset(endRow)\n : noAlloc || !Number.isFinite(numInstances)\n ? this.value.length\n : numInstances * this.size;\n\n super.updateSubBuffer({startOffset, endOffset});\n }\n }\n this._checkAttributeArray();\n } else {\n updated = false;\n }\n\n this.clearNeedsUpdate();\n this.setNeedsRedraw();\n\n return updated;\n }\n\n // Use generic value\n // Returns true if successful\n setConstantValue(value) {\n if (value === undefined || typeof value === 'function') {\n return false;\n }\n\n const hasChanged = this.setData({constant: true, value});\n\n if (hasChanged) {\n this.setNeedsRedraw();\n }\n this.clearNeedsUpdate();\n return true;\n }\n\n // Use external buffer\n // Returns true if successful\n // eslint-disable-next-line max-statements\n setExternalBuffer(buffer) {\n const {state} = this;\n\n if (!buffer) {\n state.lastExternalBuffer = null;\n return false;\n }\n\n this.clearNeedsUpdate();\n\n if (state.lastExternalBuffer === buffer) {\n return true;\n }\n state.lastExternalBuffer = buffer;\n this.setNeedsRedraw();\n this.setData(buffer);\n return true;\n }\n\n // Binary value is a typed array packed from mapping the source data with the accessor\n // If the returned value from the accessor is the same as the attribute value, set it directly\n // Otherwise use the auto updater for transform/normalization\n setBinaryValue(buffer, startIndices = null) {\n const {state, settings} = this;\n\n if (!buffer) {\n state.binaryValue = null;\n state.binaryAccessor = null;\n return false;\n }\n\n if (settings.noAlloc) {\n // Let the layer handle this\n return false;\n }\n\n if (state.binaryValue === buffer) {\n this.clearNeedsUpdate();\n return true;\n }\n state.binaryValue = buffer;\n this.setNeedsRedraw();\n\n if (ArrayBuffer.isView(buffer)) {\n buffer = {value: buffer};\n }\n const needsUpdate = settings.transform || startIndices !== this.startIndices;\n\n if (needsUpdate) {\n assert(ArrayBuffer.isView(buffer.value), `invalid ${settings.accessor}`);\n const needsNormalize = buffer.size && buffer.size !== this.size;\n\n state.binaryAccessor = getAccessorFromBuffer(buffer.value, {\n size: buffer.size || this.size,\n stride: buffer.stride,\n offset: buffer.offset,\n startIndices,\n nested: needsNormalize\n });\n // Fall through to auto updater\n return false;\n }\n\n this.clearNeedsUpdate();\n this.setData(buffer);\n return true;\n }\n\n getVertexOffset(row) {\n const {startIndices} = this;\n const vertexIndex = startIndices ? startIndices[row] : row;\n return vertexIndex * this.size;\n }\n\n getShaderAttributes() {\n const shaderAttributeDefs = this.settings.shaderAttributes || {[this.id]: null};\n const shaderAttributes = {};\n\n for (const shaderAttributeName in shaderAttributeDefs) {\n Object.assign(\n shaderAttributes,\n super.getShaderAttributes(shaderAttributeName, shaderAttributeDefs[shaderAttributeName])\n );\n }\n\n return shaderAttributes;\n }\n\n /* eslint-disable max-depth, max-statements */\n _autoUpdater(attribute, {data, startRow, endRow, props, numInstances}) {\n if (attribute.constant) {\n return;\n }\n const {settings, state, value, size, startIndices} = attribute;\n\n const {accessor, transform} = settings;\n const accessorFunc =\n state.binaryAccessor || (typeof accessor === 'function' ? accessor : props[accessor]);\n\n assert(typeof accessorFunc === 'function', `accessor \"${accessor}\" is not a function`);\n\n let i = attribute.getVertexOffset(startRow);\n const {iterable, objectInfo} = createIterable(data, startRow, endRow);\n for (const object of iterable) {\n objectInfo.index++;\n\n let objectValue = accessorFunc(object, objectInfo);\n if (transform) {\n // transform callbacks could be bound to a particular layer instance.\n // always point `this` to the current layer.\n objectValue = transform.call(this, objectValue);\n }\n\n if (startIndices) {\n const numVertices =\n (objectInfo.index < startIndices.length - 1\n ? startIndices[objectInfo.index + 1]\n : numInstances) - startIndices[objectInfo.index];\n if (objectValue && Array.isArray(objectValue[0])) {\n let startIndex = i;\n for (const item of objectValue) {\n attribute._normalizeValue(item, value, startIndex);\n startIndex += size;\n }\n } else if (objectValue && objectValue.length > size) {\n value.set(objectValue, i);\n } else {\n attribute._normalizeValue(objectValue, objectInfo.target, 0);\n fillArray({\n target: value,\n source: objectInfo.target,\n start: i,\n count: numVertices\n });\n }\n i += numVertices * size;\n } else {\n attribute._normalizeValue(objectValue, value, i);\n i += size;\n }\n }\n }\n /* eslint-enable max-depth, max-statements */\n\n // Validate deck.gl level fields\n _validateAttributeUpdaters() {\n const {settings} = this;\n\n // Check that 'update' is a valid function\n const hasUpdater = settings.noAlloc || typeof settings.update === 'function';\n if (!hasUpdater) {\n throw new Error(`Attribute ${this.id} missing update or accessor`);\n }\n }\n\n // check that the first few elements of the attribute are reasonable\n /* eslint-disable no-fallthrough */\n _checkAttributeArray() {\n const {value} = this;\n const limit = Math.min(4, this.size);\n if (value && value.length >= limit) {\n let valid = true;\n switch (limit) {\n case 4:\n valid = valid && Number.isFinite(value[3]);\n case 3:\n valid = valid && Number.isFinite(value[2]);\n case 2:\n valid = valid && Number.isFinite(value[1]);\n case 1:\n valid = valid && Number.isFinite(value[0]);\n break;\n default:\n valid = false;\n }\n\n if (!valid) {\n throw new Error(`Illegal attribute generated for ${this.id}`);\n }\n }\n }\n /* eslint-enable no-fallthrough */\n}\n","import GL from '@luma.gl/constants';\nimport {Buffer, Transform} from '@luma.gl/core';\nimport Attribute from '../lib/attribute/attribute';\nimport {\n padBuffer,\n getAttributeTypeFromSize,\n getSourceBufferAttribute,\n getAttributeBufferLength,\n cycleBuffers\n} from '../lib/attribute/attribute-transition-utils';\nimport Transition from './transition';\n\nexport default class GPUInterpolationTransition {\n constructor({gl, attribute, timeline}) {\n this.gl = gl;\n this.type = 'interpolation';\n this.transition = new Transition(timeline);\n this.attribute = attribute;\n // this is the attribute we return during the transition - note: if it is a constant\n // attribute, it will be converted and returned as a regular attribute\n // `attribute.userData` is the original options passed when constructing the attribute.\n // This ensures that we set the proper `doublePrecision` flag and shader attributes.\n this.attributeInTransition = new Attribute(gl, attribute.settings);\n this.currentStartIndices = attribute.startIndices;\n // storing currentLength because this.buffer may be larger than the actual length we want to use\n // this is because we only reallocate buffers when they grow, not when they shrink,\n // due to performance costs\n this.currentLength = 0;\n this.transform = getTransform(gl, attribute);\n const bufferOpts = {\n byteLength: 0,\n usage: GL.DYNAMIC_COPY\n };\n this.buffers = [\n new Buffer(gl, bufferOpts), // from\n new Buffer(gl, bufferOpts) // current\n ];\n }\n\n get inProgress() {\n return this.transition.inProgress;\n }\n\n // this is called when an attribute's values have changed and\n // we need to start animating towards the new values\n // this also correctly resizes / pads the transform's buffers\n // in case the attribute's buffer has changed in length or in\n // startIndices\n start(transitionSettings, numInstances) {\n if (transitionSettings.duration <= 0) {\n this.transition.cancel();\n return;\n }\n\n const {gl, buffers, attribute} = this;\n // Alternate between two buffers when new transitions start.\n // Last destination buffer is used as an attribute (from state),\n // And the other buffer is now the current buffer.\n cycleBuffers(buffers);\n\n const padBufferOpts = {\n numInstances,\n attribute,\n fromLength: this.currentLength,\n fromStartIndices: this.currentStartIndices,\n getData: transitionSettings.enter\n };\n\n for (const buffer of buffers) {\n padBuffer({buffer, ...padBufferOpts});\n }\n\n this.currentStartIndices = attribute.startIndices;\n this.currentLength = getAttributeBufferLength(attribute, numInstances);\n this.attributeInTransition.update({\n buffer: buffers[1],\n // Hack: Float64Array is required for double-precision attributes\n // to generate correct shader attributes\n value: attribute.value\n });\n\n this.transition.start(transitionSettings);\n\n this.transform.update({\n elementCount: Math.floor(this.currentLength / attribute.size),\n sourceBuffers: {\n aFrom: buffers[0],\n aTo: getSourceBufferAttribute(gl, attribute)\n },\n feedbackBuffers: {\n vCurrent: buffers[1]\n }\n });\n }\n\n update() {\n const updated = this.transition.update();\n if (updated) {\n const {\n time,\n settings: {duration, easing}\n } = this.transition;\n const t = easing(time / duration);\n this.transform.run({\n uniforms: {time: t}\n });\n }\n return updated;\n }\n\n cancel() {\n this.transition.cancel();\n this.transform.delete();\n while (this.buffers.length) {\n this.buffers.pop().delete();\n }\n }\n}\n\nconst vs = `\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n vCurrent = mix(aFrom, aTo, time);\n gl_Position = vec4(0.0);\n}\n`;\n\nfunction getTransform(gl, attribute) {\n const attributeType = getAttributeTypeFromSize(attribute.size);\n return new Transform(gl, {\n vs,\n defines: {\n ATTRIBUTE_TYPE: attributeType\n },\n varyings: ['vCurrent']\n });\n}\n","import {Transform} from '@luma.gl/core';\nimport GPUInterpolationTransition from '../../transitions/gpu-interpolation-transition';\nimport GPUSpringTransition from '../../transitions/gpu-spring-transition';\nimport log from '../../utils/log';\n\nconst TRANSITION_TYPES = {\n interpolation: GPUInterpolationTransition,\n spring: GPUSpringTransition\n};\n\nexport default class AttributeTransitionManager {\n constructor(gl, {id, timeline}) {\n this.id = id;\n this.gl = gl;\n this.timeline = timeline;\n\n this.transitions = {};\n this.needsRedraw = false;\n this.numInstances = 1;\n\n this.isSupported = Transform.isSupported(gl);\n }\n\n finalize() {\n for (const attributeName in this.transitions) {\n this._removeTransition(attributeName);\n }\n }\n\n /* Public methods */\n\n // Called when attribute manager updates\n // Check the latest attributes for updates.\n update({attributes, transitions, numInstances}) {\n // Transform class will crash if elementCount is 0\n this.numInstances = numInstances || 1;\n\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n const settings = attribute.getTransitionSetting(transitions);\n\n // this attribute might not support transitions?\n if (!settings) continue; // eslint-disable-line no-continue\n this._updateAttribute(attributeName, attribute, settings);\n }\n\n for (const attributeName in this.transitions) {\n const attribute = attributes[attributeName];\n if (!attribute || !attribute.getTransitionSetting(transitions)) {\n // Animated attribute has been removed\n this._removeTransition(attributeName);\n }\n }\n }\n\n // Returns `true` if attribute is transition-enabled\n hasAttribute(attributeName) {\n const transition = this.transitions[attributeName];\n return transition && transition.inProgress;\n }\n\n // Get all the animated attributes\n getAttributes() {\n const animatedAttributes = {};\n\n for (const attributeName in this.transitions) {\n const transition = this.transitions[attributeName];\n if (transition.inProgress) {\n animatedAttributes[attributeName] = transition.attributeInTransition;\n }\n }\n\n return animatedAttributes;\n }\n\n /* eslint-disable max-statements */\n // Called every render cycle, run transform feedback\n // Returns `true` if anything changes\n run() {\n if (!this.isSupported || this.numInstances === 0) {\n return false;\n }\n\n for (const attributeName in this.transitions) {\n const updated = this.transitions[attributeName].update();\n if (updated) {\n this.needsRedraw = true;\n }\n }\n\n const needsRedraw = this.needsRedraw;\n this.needsRedraw = false;\n return needsRedraw;\n }\n /* eslint-enable max-statements */\n\n /* Private methods */\n _removeTransition(attributeName) {\n this.transitions[attributeName].cancel();\n delete this.transitions[attributeName];\n }\n\n // Check an attributes for updates\n // Returns a transition object if a new transition is triggered.\n _updateAttribute(attributeName, attribute, settings) {\n const transition = this.transitions[attributeName];\n // an attribute can change transition type when it updates\n // let's remove the transition when that happens so we can create the new transition type\n // TODO: when switching transition types, make sure to carry over the attribute's\n // previous buffers, currentLength, startIndices, etc, to be used as the starting point\n // for the next transition\n let isNew = !transition || transition.type !== settings.type;\n if (isNew) {\n if (!this.isSupported) {\n log.warn(\n `WebGL2 not supported by this browser. Transition for ${attributeName} is disabled.`\n )();\n return;\n }\n\n if (transition) {\n this._removeTransition(attributeName);\n }\n\n const TransitionType = TRANSITION_TYPES[settings.type];\n if (TransitionType) {\n this.transitions[attributeName] = new TransitionType({\n attribute,\n timeline: this.timeline,\n gl: this.gl\n });\n } else {\n log.error(`unsupported transition type '${settings.type}'`)();\n isNew = false;\n }\n }\n\n if (isNew || attribute.needsRedraw()) {\n this.needsRedraw = true;\n this.transitions[attributeName].start(settings, this.numInstances);\n }\n }\n}\n","/* eslint-disable complexity, max-statements, max-params */\nimport GL from '@luma.gl/constants';\nimport {Buffer, Transform, Framebuffer, Texture2D, readPixelsToArray} from '@luma.gl/core';\nimport {\n padBuffer,\n getAttributeTypeFromSize,\n getSourceBufferAttribute,\n getAttributeBufferLength,\n cycleBuffers\n} from '../lib/attribute/attribute-transition-utils';\nimport Attribute from '../lib/attribute/attribute';\nimport Transition from './transition';\n\nexport default class GPUSpringTransition {\n constructor({gl, attribute, timeline}) {\n this.gl = gl;\n this.type = 'spring';\n this.transition = new Transition(timeline);\n this.attribute = attribute;\n // this is the attribute we return during the transition - note: if it is a constant\n // attribute, it will be converted and returned as a regular attribute\n // `attribute.userData` is the original options passed when constructing the attribute.\n // This ensures that we set the proper `doublePrecision` flag and shader attributes.\n this.attributeInTransition = new Attribute(gl, {...attribute.settings, normalized: false});\n this.currentStartIndices = attribute.startIndices;\n // storing currentLength because this.buffer may be larger than the actual length we want to use\n // this is because we only reallocate buffers when they grow, not when they shrink,\n // due to performance costs\n this.currentLength = 0;\n this.texture = getTexture(gl);\n this.framebuffer = getFramebuffer(gl, this.texture);\n this.transform = getTransform(gl, attribute, this.framebuffer);\n const bufferOpts = {\n byteLength: 0,\n usage: GL.DYNAMIC_COPY\n };\n this.buffers = [\n new Buffer(gl, bufferOpts), // previous\n new Buffer(gl, bufferOpts), // current\n new Buffer(gl, bufferOpts) // next\n ];\n }\n\n get inProgress() {\n return this.transition.inProgress;\n }\n\n // this is called when an attribute's values have changed and\n // we need to start animating towards the new values\n // this also correctly resizes / pads the transform's buffers\n // in case the attribute's buffer has changed in length or in\n // startIndices\n start(transitionSettings, numInstances) {\n const {gl, buffers, attribute} = this;\n const padBufferOpts = {\n numInstances,\n attribute,\n fromLength: this.currentLength,\n fromStartIndices: this.currentStartIndices,\n getData: transitionSettings.enter\n };\n\n for (const buffer of buffers) {\n padBuffer({buffer, ...padBufferOpts});\n }\n\n this.currentStartIndices = attribute.startIndices;\n this.currentLength = getAttributeBufferLength(attribute, numInstances);\n this.attributeInTransition.update({\n buffer: buffers[1],\n // Hack: Float64Array is required for double-precision attributes\n // to generate correct shader attributes\n value: attribute.value\n });\n\n // when an attribute changes values, a new transition is started. These\n // are properties that we have to store on this.transition but can change\n // when new transitions are started, so we have to keep them up-to-date.\n // this.transition.start() takes the latest settings and updates them.\n this.transition.start(transitionSettings);\n\n this.transform.update({\n elementCount: Math.floor(this.currentLength / attribute.size),\n sourceBuffers: {\n aTo: getSourceBufferAttribute(gl, attribute)\n }\n });\n }\n\n update() {\n const {buffers, transform, framebuffer, transition} = this;\n const updated = transition.update();\n if (!updated) {\n return false;\n }\n\n transform.update({\n sourceBuffers: {\n aPrev: buffers[0],\n aCur: buffers[1]\n },\n feedbackBuffers: {\n vNext: buffers[2]\n }\n });\n transform.run({\n framebuffer,\n discard: false,\n clearRenderTarget: true,\n uniforms: {\n stiffness: transition.settings.stiffness,\n damping: transition.settings.damping\n },\n parameters: {\n depthTest: false,\n blend: true,\n viewport: [0, 0, 1, 1],\n blendFunc: [GL.ONE, GL.ONE],\n blendEquation: [GL.MAX, GL.MAX]\n }\n });\n\n cycleBuffers(buffers);\n this.attributeInTransition.update({\n buffer: buffers[1],\n // Hack: Float64Array is required for double-precision attributes\n // to generate correct shader attributes\n value: this.attribute.value\n });\n\n const isTransitioning = readPixelsToArray(framebuffer)[0] > 0;\n\n if (!isTransitioning) {\n transition.end();\n }\n\n return true;\n }\n\n cancel() {\n this.transition.cancel();\n this.transform.delete();\n while (this.buffers.length) {\n this.buffers.pop().delete();\n }\n this.texture.delete();\n this.texture = null;\n this.framebuffer.delete();\n this.framebuffer = null;\n }\n}\n\nfunction getTransform(gl, attribute, framebuffer) {\n const attributeType = getAttributeTypeFromSize(attribute.size);\n return new Transform(gl, {\n framebuffer,\n vs: `\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n ATTRIBUTE_TYPE velocity = cur - prev;\n ATTRIBUTE_TYPE delta = dest - cur;\n ATTRIBUTE_TYPE spring = delta * stiffness;\n ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n vNext = getNextValue(aCur, aPrev, aTo);\n gl_Position = vec4(0, 0, 0, 1);\n gl_PointSize = 100.0;\n}\n`,\n fs: `\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n if (vIsTransitioningFlag == 0.0) {\n discard;\n }\n gl_FragColor = vec4(1.0);\n}`,\n defines: {\n ATTRIBUTE_TYPE: attributeType\n },\n varyings: ['vNext']\n });\n}\n\nfunction getTexture(gl) {\n return new Texture2D(gl, {\n data: new Uint8Array(4),\n format: GL.RGBA,\n type: GL.UNSIGNED_BYTE,\n border: 0,\n mipmaps: false,\n dataFormat: GL.RGBA,\n width: 1,\n height: 1\n });\n}\n\nfunction getFramebuffer(gl, texture) {\n return new Framebuffer(gl, {\n id: 'spring-transition-is-transitioning-framebuffer',\n width: 1,\n height: 1,\n attachments: {\n [GL.COLOR_ATTACHMENT0]: texture\n }\n });\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable guard-for-in */\nimport Attribute from './attribute';\nimport log from '../../utils/log';\nimport debug from '../../debug';\n\nimport AttributeTransitionManager from './attribute-transition-manager';\n\nconst TRACE_INVALIDATE = 'attributeManager.invalidate';\nconst TRACE_UPDATE_START = 'attributeManager.updateStart';\nconst TRACE_UPDATE_END = 'attributeManager.updateEnd';\nconst TRACE_ATTRIBUTE_UPDATE_START = 'attribute.updateStart';\nconst TRACE_ATTRIBUTE_ALLOCATE = 'attribute.allocate';\nconst TRACE_ATTRIBUTE_UPDATE_END = 'attribute.updateEnd';\n\nexport default class AttributeManager {\n /**\n * @classdesc\n * Automated attribute generation and management. Suitable when a set of\n * vertex shader attributes are generated by iteration over a data array,\n * and updates to these attributes are needed either when the data itself\n * changes, or when other data relevant to the calculations change.\n *\n * - First the application registers descriptions of its dynamic vertex\n * attributes using AttributeManager.add().\n * - Then, when any change that affects attributes is detected by the\n * application, the app will call AttributeManager.invalidate().\n * - Finally before it renders, it calls AttributeManager.update() to\n * ensure that attributes are automatically rebuilt if anything has been\n * invalidated.\n *\n * The application provided update functions describe how attributes\n * should be updated from a data array and are expected to traverse\n * that data array (or iterable) and fill in the attribute's typed array.\n *\n * Note that the attribute manager intentionally does not do advanced\n * change detection, but instead makes it easy to build such detection\n * by offering the ability to \"invalidate\" each attribute separately.\n */\n constructor(gl, {id = 'attribute-manager', stats, timeline} = {}) {\n this.id = id;\n this.gl = gl;\n\n this.attributes = {};\n\n this.updateTriggers = {};\n this.accessors = {};\n this.needsRedraw = true;\n\n this.userData = {};\n this.stats = stats;\n\n this.attributeTransitionManager = new AttributeTransitionManager(gl, {\n id: `${id}-transitions`,\n timeline\n });\n\n // For debugging sanity, prevent uninitialized members\n Object.seal(this);\n }\n\n finalize() {\n for (const attributeName in this.attributes) {\n this.attributes[attributeName].delete();\n }\n this.attributeTransitionManager.finalize();\n }\n\n // Returns the redraw flag, optionally clearing it.\n // Redraw flag will be set if any attributes attributes changed since\n // flag was last cleared.\n //\n // @param {String} [clearRedrawFlags=false] - whether to clear the flag\n // @return {false|String} - reason a redraw is needed.\n getNeedsRedraw(opts = {clearRedrawFlags: false}) {\n const redraw = this.needsRedraw;\n this.needsRedraw = this.needsRedraw && !opts.clearRedrawFlags;\n return redraw && this.id;\n }\n\n // Sets the redraw flag.\n // @param {Boolean} redraw=true\n // @return {AttributeManager} - for chaining\n setNeedsRedraw(redraw = true) {\n this.needsRedraw = true;\n return this;\n }\n\n // Adds attributes\n add(attributes, updaters) {\n this._add(attributes, updaters);\n }\n\n // Adds attributes\n addInstanced(attributes, updaters) {\n this._add(attributes, updaters, {instanced: 1});\n }\n\n /**\n * Removes attributes\n * Takes an array of attribute names and delete them from\n * the attribute map if they exists\n *\n * @example\n * attributeManager.remove(['position']);\n *\n * @param {Object} attributeNameArray - attribute name array (see above)\n */\n remove(attributeNameArray) {\n for (let i = 0; i < attributeNameArray.length; i++) {\n const name = attributeNameArray[i];\n if (this.attributes[name] !== undefined) {\n this.attributes[name].delete();\n delete this.attributes[name];\n }\n }\n }\n\n // Marks an attribute for update\n invalidate(triggerName, dataRange) {\n const invalidatedAttributes = this._invalidateTrigger(triggerName, dataRange);\n // For performance tuning\n debug(TRACE_INVALIDATE, this, triggerName, invalidatedAttributes);\n }\n\n invalidateAll(dataRange) {\n for (const attributeName in this.attributes) {\n this.attributes[attributeName].setNeedsUpdate(attributeName, dataRange);\n }\n // For performance tuning\n debug(TRACE_INVALIDATE, this, 'all');\n }\n\n // Ensure all attribute buffers are updated from props or data.\n update({\n data,\n numInstances,\n startIndices = null,\n transitions,\n props = {},\n buffers = {},\n context = {}\n } = {}) {\n // keep track of whether some attributes are updated\n let updated = false;\n\n debug(TRACE_UPDATE_START, this);\n if (this.stats) {\n this.stats.get('Update Attributes').timeStart();\n }\n\n for (const attributeName in this.attributes) {\n const attribute = this.attributes[attributeName];\n const accessorName = attribute.settings.accessor;\n attribute.startIndices = startIndices;\n\n if (props[attributeName]) {\n log.removed(`props.${attributeName}`, `data.attributes.${attributeName}`)();\n }\n\n if (attribute.setExternalBuffer(buffers[attributeName])) {\n // Step 1: try update attribute directly from external buffers\n } else if (attribute.setBinaryValue(buffers[accessorName], data.startIndices)) {\n // Step 2: try set packed value from external typed array\n } else if (!buffers[accessorName] && attribute.setConstantValue(props[accessorName])) {\n // Step 3: try set constant value from props\n // Note: if buffers[accessorName] is supplied, ignore props[accessorName]\n // This may happen when setBinaryValue falls through to use the auto updater\n } else if (attribute.needsUpdate()) {\n // Step 4: update via updater callback\n updated = true;\n this._updateAttribute({\n attribute,\n numInstances,\n data,\n props,\n context\n });\n }\n\n this.needsRedraw |= attribute.needsRedraw();\n }\n\n if (updated) {\n // Only initiate alloc/update (and logging) if actually needed\n debug(TRACE_UPDATE_END, this, numInstances);\n }\n\n if (this.stats) {\n this.stats.get('Update Attributes').timeEnd();\n }\n\n this.attributeTransitionManager.update({\n attributes: this.attributes,\n numInstances,\n transitions\n });\n }\n\n // Update attribute transition to the current timestamp\n // Returns `true` if any transition is in progress\n updateTransition() {\n const {attributeTransitionManager} = this;\n const transitionUpdated = attributeTransitionManager.run();\n this.needsRedraw = this.needsRedraw || transitionUpdated;\n return transitionUpdated;\n }\n\n /**\n * Returns all attribute descriptors\n * Note: Format matches luma.gl Model/Program.setAttributes()\n * @return {Object} attributes - descriptors\n */\n getAttributes() {\n return this.attributes;\n }\n\n /**\n * Returns changed attribute descriptors\n * This indicates which WebGLBuffers need to be updated\n * @return {Object} attributes - descriptors\n */\n getChangedAttributes(opts = {clearChangedFlags: false}) {\n const {attributes, attributeTransitionManager} = this;\n\n const changedAttributes = {...attributeTransitionManager.getAttributes()};\n\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n if (attribute.needsRedraw(opts) && !attributeTransitionManager.hasAttribute(attributeName)) {\n changedAttributes[attributeName] = attribute;\n }\n }\n\n return changedAttributes;\n }\n\n // Returns shader attributes\n getShaderAttributes(attributes, excludeAttributes = {}) {\n if (!attributes) {\n attributes = this.getAttributes();\n }\n const shaderAttributes = {};\n for (const attributeName in attributes) {\n if (!excludeAttributes[attributeName]) {\n Object.assign(shaderAttributes, attributes[attributeName].getShaderAttributes());\n }\n }\n return shaderAttributes;\n }\n\n // PROTECTED METHODS - Only to be used by collaborating classes, not by apps\n\n // Returns object containing all accessors as keys, with non-null values\n // @return {Object} - accessors object\n getAccessors() {\n return this.updateTriggers;\n }\n\n // PRIVATE METHODS\n\n // Used to register an attribute\n _add(attributes, updaters, extraProps = {}) {\n if (updaters) {\n log.warn('AttributeManager.add({updaters}) - updater map no longer supported')();\n }\n\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n\n // Initialize the attribute descriptor, with WebGL and metadata fields\n this.attributes[attributeName] = this._createAttribute(attributeName, attribute, extraProps);\n }\n\n this._mapUpdateTriggersToAttributes();\n }\n /* eslint-enable max-statements */\n\n _createAttribute(name, attribute, extraProps) {\n // For expected default values see:\n // https://github.com/visgl/luma.gl/blob/1affe21352e289eeaccee2a876865138858a765c/modules/webgl/src/classes/accessor.js#L5-L13\n // and https://deck.gl/docs/api-reference/core/attribute-manager#add\n const props = {\n ...attribute,\n id: name,\n isIndexed: attribute.isIndexed || attribute.elements || false,\n // Luma fields\n constant: attribute.constant || false,\n size: (attribute.elements && 1) || attribute.size || 1,\n value: attribute.value || null,\n divisor: attribute.instanced || extraProps.instanced ? 1 : attribute.divisor || 0\n };\n\n return new Attribute(this.gl, props);\n }\n\n // build updateTrigger name to attribute name mapping\n _mapUpdateTriggersToAttributes() {\n const triggers = {};\n\n for (const attributeName in this.attributes) {\n const attribute = this.attributes[attributeName];\n attribute.getUpdateTriggers().forEach(triggerName => {\n if (!triggers[triggerName]) {\n triggers[triggerName] = [];\n }\n triggers[triggerName].push(attributeName);\n });\n }\n\n this.updateTriggers = triggers;\n }\n\n _invalidateTrigger(triggerName, dataRange) {\n const {attributes, updateTriggers} = this;\n const invalidatedAttributes = updateTriggers[triggerName];\n\n if (invalidatedAttributes) {\n invalidatedAttributes.forEach(name => {\n const attribute = attributes[name];\n if (attribute) {\n attribute.setNeedsUpdate(attribute.id, dataRange);\n }\n });\n }\n return invalidatedAttributes;\n }\n\n _updateAttribute(opts) {\n const {attribute, numInstances} = opts;\n debug(TRACE_ATTRIBUTE_UPDATE_START, attribute);\n\n if (attribute.constant) {\n // The attribute is flagged as constant outside of an update cycle\n // Skip allocation and updater call\n attribute.setConstantValue(attribute.value);\n return;\n }\n\n if (attribute.allocate(numInstances)) {\n debug(TRACE_ATTRIBUTE_ALLOCATE, attribute, numInstances);\n }\n\n // Calls update on any buffers that need update\n const updated = attribute.updateBuffer(opts);\n if (updated) {\n this.needsRedraw = true;\n debug(TRACE_ATTRIBUTE_UPDATE_END, attribute, numInstances);\n }\n }\n}\n","/* eslint-disable max-statements, max-params, complexity, max-depth */\n// TODO merge with icon-layer/icon-manager\nimport {log} from '@deck.gl/core';\n\nconst MISSING_CHAR_WIDTH = 32;\nconst SINGLE_LINE = [];\n\nexport function nextPowOfTwo(number) {\n return Math.pow(2, Math.ceil(Math.log2(number)));\n}\n\n/**\n * Generate character mapping table or update from an existing mapping table\n * @param characterSet {Array|Set} new characters\n * @param getFontWidth {Function} function to get width of each character\n * @param fontHeight {Number} height of font\n * @param buffer {Number} buffer surround each character\n * @param maxCanvasWidth {Number} max width of font atlas\n * @param mapping {Object} old mapping table\n * @param xOffset {Number} x position of last character in old mapping table\n * @param yOffset {Number} y position of last character in old mapping table\n * @returns {{\n * mapping: Object,\n * xOffset: Number, x position of last character\n * yOffset: Number, y position of last character in old mapping table\n * canvasHeight: Number, height of the font atlas canvas, power of 2\n * }}\n */\nexport function buildMapping({\n characterSet,\n getFontWidth,\n fontHeight,\n buffer,\n maxCanvasWidth,\n mapping = {},\n xOffset = 0,\n yOffset = 0\n}) {\n let row = 0;\n // continue from x position of last character in the old mapping\n let x = xOffset;\n\n let i = 0;\n for (const char of characterSet) {\n if (!mapping[char]) {\n // measure texts\n // TODO - use Advanced text metrics when they are adopted:\n // https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics\n const width = getFontWidth(char, i++);\n\n if (x + width + buffer * 2 > maxCanvasWidth) {\n x = 0;\n row++;\n }\n mapping[char] = {\n x: x + buffer,\n y: yOffset + row * (fontHeight + buffer * 2) + buffer,\n width,\n height: fontHeight\n };\n x += width + buffer * 2;\n }\n }\n\n const rowHeight = fontHeight + buffer * 2;\n\n return {\n mapping,\n xOffset: x,\n yOffset: yOffset + row * rowHeight,\n canvasHeight: nextPowOfTwo(yOffset + (row + 1) * rowHeight)\n };\n}\n\nfunction getTextWidth(text, startIndex, endIndex, mapping) {\n let width = 0;\n for (let i = startIndex; i < endIndex; i++) {\n const character = text[i];\n let frameWidth = null;\n const frame = mapping && mapping[character];\n if (frame) {\n frameWidth = frame.width;\n }\n\n width += frameWidth;\n }\n\n return width;\n}\n\nfunction breakAll(text, startIndex, endIndex, maxWidth, iconMapping, target) {\n let rowStartCharIndex = startIndex;\n let rowOffsetLeft = 0;\n\n for (let i = startIndex; i < endIndex; i++) {\n // 2. figure out where to break lines\n const textWidth = getTextWidth(text, i, i + 1, iconMapping);\n if (rowOffsetLeft + textWidth > maxWidth) {\n if (rowStartCharIndex < i) {\n target.push(i);\n }\n rowStartCharIndex = i;\n rowOffsetLeft = 0;\n }\n rowOffsetLeft += textWidth;\n }\n\n return rowOffsetLeft;\n}\n\nfunction breakWord(text, startIndex, endIndex, maxWidth, iconMapping, target) {\n let rowStartCharIndex = startIndex;\n let groupStartCharIndex = startIndex;\n let groupEndCharIndex = startIndex;\n let rowOffsetLeft = 0;\n\n for (let i = startIndex; i < endIndex; i++) {\n // 1. break text into word groups\n // - if current char is white space\n // - else if next char is white space\n // - else if reach last char\n if (text[i] === ' ') {\n groupEndCharIndex = i + 1;\n } else if (text[i + 1] === ' ' || i + 1 === endIndex) {\n groupEndCharIndex = i + 1;\n }\n\n if (groupEndCharIndex > groupStartCharIndex) {\n // 2. break text into next row at maxWidth\n let groupWidth = getTextWidth(text, groupStartCharIndex, groupEndCharIndex, iconMapping);\n if (rowOffsetLeft + groupWidth > maxWidth) {\n if (rowStartCharIndex < groupStartCharIndex) {\n target.push(groupStartCharIndex);\n rowStartCharIndex = groupStartCharIndex;\n rowOffsetLeft = 0;\n }\n\n // if a single text group is bigger than maxWidth, then `break-all`\n if (groupWidth > maxWidth) {\n groupWidth = breakAll(\n text,\n groupStartCharIndex,\n groupEndCharIndex,\n maxWidth,\n iconMapping,\n target\n );\n // move reference to last row\n rowStartCharIndex = target[target.length - 1];\n }\n }\n groupStartCharIndex = groupEndCharIndex;\n rowOffsetLeft += groupWidth;\n }\n }\n\n return rowOffsetLeft;\n}\n\n// Returns a list of indices where line breaks should be inserted\nexport function autoWrapping(text, wordBreak, maxWidth, iconMapping, startIndex = 0, endIndex) {\n if (endIndex === undefined) {\n endIndex = text.length;\n }\n const result = [];\n if (wordBreak === 'break-all') {\n breakAll(text, startIndex, endIndex, maxWidth, iconMapping, result);\n } else {\n breakWord(text, startIndex, endIndex, maxWidth, iconMapping, result);\n }\n return result;\n}\n\nfunction transformRow(line, startIndex, endIndex, iconMapping, leftOffsets, rowSize) {\n let x = 0;\n let rowHeight = 0;\n\n for (let i = startIndex; i < endIndex; i++) {\n const character = line[i];\n const frame = iconMapping[character];\n if (frame) {\n if (!rowHeight) {\n // frame.height should be a constant\n rowHeight = frame.height;\n }\n leftOffsets[i] = x + frame.width / 2;\n x += frame.width;\n } else {\n log.warn(`Missing character: ${character} (${character.codePointAt(0)})`)();\n leftOffsets[i] = x;\n x += MISSING_CHAR_WIDTH;\n }\n }\n\n rowSize[0] = x;\n rowSize[1] = rowHeight;\n}\n\n/**\n * Transform a text paragraph to an array of characters, each character contains\n * @param paragraph: {String}\n * @param iconMapping {Object} character mapping table for retrieving a character from font atlas\n * @param lineHeight {Number} css line-height\n * @param wordBreak {String} css word-break option\n * @param maxWidth {number} css max-width\n * @param transformedData {Array} output transformed data array, each datum contains\n * - text: character\n * - index: character index in the paragraph\n * - x: x offset in the row,\n * - y: y offset in the paragraph\n * - size: [width, height] size of the paragraph\n * - rowSize: [rowWidth, rowHeight] size of the row\n * - len: length of the paragraph\n */\nexport function transformParagraph(paragraph, lineHeight, wordBreak, maxWidth, iconMapping) {\n // Break into an array of characters\n // When dealing with double-length unicode characters, `str.length` or `str[i]` do not work\n paragraph = Array.from(paragraph);\n const numCharacters = paragraph.length;\n const x = new Array(numCharacters);\n const y = new Array(numCharacters);\n const rowWidth = new Array(numCharacters);\n const autoWrappingEnabled =\n (wordBreak === 'break-word' || wordBreak === 'break-all') && isFinite(maxWidth) && maxWidth > 0;\n\n // maxWidth and height of the paragraph\n const size = [0, 0];\n const rowSize = [];\n let rowOffsetTop = 0;\n let lineStartIndex = 0;\n let lineEndIndex = 0;\n\n for (let i = 0; i <= numCharacters; i++) {\n const char = paragraph[i];\n if (char === '\\n' || i === numCharacters) {\n lineEndIndex = i;\n }\n\n if (lineEndIndex > lineStartIndex) {\n const rows = autoWrappingEnabled\n ? autoWrapping(paragraph, wordBreak, maxWidth, iconMapping, lineStartIndex, lineEndIndex)\n : SINGLE_LINE;\n\n for (let rowIndex = 0; rowIndex <= rows.length; rowIndex++) {\n const rowStart = rowIndex === 0 ? lineStartIndex : rows[rowIndex - 1];\n const rowEnd = rowIndex < rows.length ? rows[rowIndex] : lineEndIndex;\n transformRow(paragraph, rowStart, rowEnd, iconMapping, x, rowSize);\n for (let j = rowStart; j < rowEnd; j++) {\n y[j] = rowOffsetTop + rowSize[1] / 2;\n rowWidth[j] = rowSize[0];\n }\n\n rowOffsetTop = rowOffsetTop + rowSize[1] * lineHeight;\n size[0] = Math.max(size[0], rowSize[0]);\n }\n lineStartIndex = lineEndIndex;\n }\n\n if (char === '\\n') {\n // Make sure result.length matches paragraph.length\n x[lineStartIndex] = 0;\n y[lineStartIndex] = 0;\n rowWidth[lineStartIndex] = 0;\n lineStartIndex++;\n }\n }\n\n // last row\n size[1] = rowOffsetTop;\n return {x, y, rowWidth, size};\n}\n\nexport function getTextFromBuffer({value, length, stride, offset, startIndices, characterSet}) {\n const bytesPerElement = value.BYTES_PER_ELEMENT;\n const elementStride = stride ? stride / bytesPerElement : 1;\n const elementOffset = offset ? offset / bytesPerElement : 0;\n const characterCount =\n startIndices[length] || Math.ceil((value.length - elementOffset) / elementStride);\n const autoCharacterSet = characterSet && new Set();\n\n const texts = new Array(length);\n\n let codes = value;\n if (elementStride > 1 || elementOffset > 0) {\n codes = new value.constructor(characterCount);\n for (let i = 0; i < characterCount; i++) {\n codes[i] = value[i * elementStride + elementOffset];\n }\n }\n\n for (let index = 0; index < length; index++) {\n const startIndex = startIndices[index];\n const endIndex = startIndices[index + 1] || characterCount;\n const codesAtIndex = codes.subarray(startIndex, endIndex);\n texts[index] = String.fromCodePoint.apply(null, codesAtIndex);\n if (autoCharacterSet) {\n codesAtIndex.forEach(autoCharacterSet.add, autoCharacterSet);\n }\n }\n\n if (autoCharacterSet) {\n for (const charCode of autoCharacterSet) {\n characterSet.add(String.fromCodePoint(charCode));\n }\n }\n\n return {texts, characterCount};\n}\n","/**\n * LRU Cache class with limit\n *\n * Update order for each get/set operation\n * Delete oldest when reach given limit\n */\n\nexport default class LRUCache {\n constructor(limit = 5) {\n this.limit = limit;\n\n this.clear();\n }\n\n clear() {\n this._cache = {};\n // access/update order, first item is oldest, last item is newest\n this._order = [];\n }\n\n get(key) {\n const value = this._cache[key];\n if (value) {\n // update order\n this._deleteOrder(key);\n this._appendOrder(key);\n }\n return value;\n }\n\n set(key, value) {\n if (!this._cache[key]) {\n // if reach limit, delete the oldest\n if (Object.keys(this._cache).length === this.limit) {\n this.delete(this._order[0]);\n }\n\n this._cache[key] = value;\n this._appendOrder(key);\n } else {\n // if found in cache, delete the old one, insert new one to the first of list\n this.delete(key);\n\n this._cache[key] = value;\n this._appendOrder(key);\n }\n }\n\n delete(key) {\n const value = this._cache[key];\n if (value) {\n this._deleteCache(key);\n this._deleteOrder(key);\n }\n }\n\n _deleteCache(key) {\n delete this._cache[key];\n }\n\n _deleteOrder(key) {\n const index = this._order.findIndex(o => o === key);\n if (index >= 0) {\n this._order.splice(index, 1);\n }\n }\n\n _appendOrder(key) {\n this._order.push(key);\n }\n}\n","/* global document */\nimport TinySDF from '@mapbox/tiny-sdf';\n\nimport {buildMapping} from './utils';\nimport LRUCache from './lru-cache';\n\nfunction getDefaultCharacterSet() {\n const charSet = [];\n for (let i = 32; i < 128; i++) {\n charSet.push(String.fromCharCode(i));\n }\n return charSet;\n}\n\nexport const DEFAULT_CHAR_SET = getDefaultCharacterSet();\nexport const DEFAULT_FONT_FAMILY = 'Monaco, monospace';\nexport const DEFAULT_FONT_WEIGHT = 'normal';\nexport const DEFAULT_FONT_SIZE = 64;\nexport const DEFAULT_BUFFER = 4;\nexport const DEFAULT_CUTOFF = 0.25;\nexport const DEFAULT_RADIUS = 12;\n\nconst MAX_CANVAS_WIDTH = 1024;\n\nconst BASELINE_SCALE = 0.9;\nconst HEIGHT_SCALE = 1.2;\n\n// only preserve latest three fontAtlas\nconst CACHE_LIMIT = 3;\n\n/**\n * [key]: {\n * xOffset, // x position of last character in mapping\n * yOffset, // y position of last character in mapping\n * mapping, // x, y coordinate of each character in shared `fontAtlas`\n * data, // canvas\n * width. // canvas.width,\n * height, // canvas.height\n * }\n *\n */\nconst cache = new LRUCache(CACHE_LIMIT);\n\nconst VALID_PROPS = [\n 'fontFamily',\n 'fontWeight',\n 'characterSet',\n 'fontSize',\n 'sdf',\n 'buffer',\n 'cutoff',\n 'radius'\n];\n\n/**\n * get all the chars not in cache\n * @param key cache key\n * @param characterSet (Array|Set)\n * @returns {Array} chars not in cache\n */\nfunction getNewChars(key, characterSet) {\n const cachedFontAtlas = cache.get(key);\n if (!cachedFontAtlas) {\n return characterSet;\n }\n\n const newChars = [];\n const cachedMapping = cachedFontAtlas.mapping;\n let cachedCharSet = Object.keys(cachedMapping);\n cachedCharSet = new Set(cachedCharSet);\n\n let charSet = characterSet;\n if (charSet instanceof Array) {\n charSet = new Set(charSet);\n }\n\n charSet.forEach(char => {\n if (!cachedCharSet.has(char)) {\n newChars.push(char);\n }\n });\n\n return newChars;\n}\n\nfunction populateAlphaChannel(alphaChannel, imageData) {\n // populate distance value from tinySDF to image alpha channel\n for (let i = 0; i < alphaChannel.length; i++) {\n imageData.data[4 * i + 3] = alphaChannel[i];\n }\n}\n\nfunction setTextStyle(ctx, fontFamily, fontSize, fontWeight) {\n ctx.font = `${fontWeight} ${fontSize}px ${fontFamily}`;\n ctx.fillStyle = '#000';\n ctx.textBaseline = 'baseline';\n ctx.textAlign = 'left';\n}\n\nexport default class FontAtlasManager {\n constructor() {\n // font settings\n this.props = {\n fontFamily: DEFAULT_FONT_FAMILY,\n fontWeight: DEFAULT_FONT_WEIGHT,\n characterSet: DEFAULT_CHAR_SET,\n fontSize: DEFAULT_FONT_SIZE,\n buffer: DEFAULT_BUFFER,\n // sdf only props\n // https://github.com/mapbox/tiny-sdf\n sdf: false,\n cutoff: DEFAULT_CUTOFF,\n radius: DEFAULT_RADIUS\n };\n\n // key is used for caching generated fontAtlas\n this._key = null;\n this._atlas = null;\n }\n\n get texture() {\n return this._atlas;\n }\n\n get mapping() {\n return this._atlas && this._atlas.mapping;\n }\n\n get scale() {\n return HEIGHT_SCALE;\n }\n\n setProps(props = {}) {\n VALID_PROPS.forEach(prop => {\n if (prop in props) {\n this.props[prop] = props[prop];\n }\n });\n\n // update cache key\n const oldKey = this._key;\n this._key = this._getKey();\n\n const charSet = getNewChars(this._key, this.props.characterSet);\n const cachedFontAtlas = cache.get(this._key);\n\n // if a fontAtlas associated with the new settings is cached and\n // there are no new chars\n if (cachedFontAtlas && charSet.length === 0) {\n // update texture with cached fontAtlas\n if (this._key !== oldKey) {\n this._atlas = cachedFontAtlas;\n }\n return;\n }\n\n // update fontAtlas with new settings\n const fontAtlas = this._generateFontAtlas(this._key, charSet, cachedFontAtlas);\n this._atlas = fontAtlas;\n\n // update cache\n cache.set(this._key, fontAtlas);\n }\n\n _generateFontAtlas(key, characterSet, cachedFontAtlas) {\n const {fontFamily, fontWeight, fontSize, buffer, sdf, radius, cutoff} = this.props;\n let canvas = cachedFontAtlas && cachedFontAtlas.data;\n if (!canvas) {\n canvas = document.createElement('canvas');\n canvas.width = MAX_CANVAS_WIDTH;\n }\n const ctx = canvas.getContext('2d');\n\n setTextStyle(ctx, fontFamily, fontSize, fontWeight);\n\n // 1. build mapping\n const {mapping, canvasHeight, xOffset, yOffset} = buildMapping({\n getFontWidth: char => ctx.measureText(char).width,\n fontHeight: fontSize * HEIGHT_SCALE,\n buffer,\n characterSet,\n maxCanvasWidth: MAX_CANVAS_WIDTH,\n ...(cachedFontAtlas && {\n mapping: cachedFontAtlas.mapping,\n xOffset: cachedFontAtlas.xOffset,\n yOffset: cachedFontAtlas.yOffset\n })\n });\n\n // 2. update canvas\n // copy old canvas data to new canvas only when height changed\n if (canvas.height !== canvasHeight) {\n const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n canvas.height = canvasHeight;\n ctx.putImageData(imageData, 0, 0);\n }\n setTextStyle(ctx, fontFamily, fontSize, fontWeight);\n\n // 3. layout characters\n if (sdf) {\n const tinySDF = new TinySDF(fontSize, buffer, radius, cutoff, fontFamily, fontWeight);\n // used to store distance values from tinySDF\n // tinySDF.size equals `fontSize + buffer * 2`\n const imageData = ctx.getImageData(0, 0, tinySDF.size, tinySDF.size);\n\n for (const char of characterSet) {\n populateAlphaChannel(tinySDF.draw(char), imageData);\n ctx.putImageData(imageData, mapping[char].x - buffer, mapping[char].y + buffer);\n }\n } else {\n for (const char of characterSet) {\n ctx.fillText(char, mapping[char].x, mapping[char].y + fontSize * BASELINE_SCALE);\n }\n }\n\n return {\n xOffset,\n yOffset,\n mapping,\n data: canvas,\n width: canvas.width,\n height: canvas.height\n };\n }\n\n _getKey() {\n const {fontFamily, fontWeight, fontSize, buffer, sdf, radius, cutoff} = this.props;\n if (sdf) {\n return `${fontFamily} ${fontWeight} ${fontSize} ${buffer} ${radius} ${cutoff}`;\n }\n return `${fontFamily} ${fontWeight} ${fontSize} ${buffer}`;\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {CompositeLayer, createIterable} from '@deck.gl/core';\nimport MultiIconLayer from './multi-icon-layer/multi-icon-layer';\nimport FontAtlasManager, {\n DEFAULT_CHAR_SET,\n DEFAULT_FONT_FAMILY,\n DEFAULT_FONT_WEIGHT,\n DEFAULT_FONT_SIZE,\n DEFAULT_BUFFER,\n DEFAULT_RADIUS,\n DEFAULT_CUTOFF\n} from './font-atlas-manager';\nimport {transformParagraph, getTextFromBuffer} from './utils';\n\nimport TextBackgroundLayer from './text-background-layer/text-background-layer';\n\nconst DEFAULT_FONT_SETTINGS = {\n fontSize: DEFAULT_FONT_SIZE,\n buffer: DEFAULT_BUFFER,\n sdf: false,\n radius: DEFAULT_RADIUS,\n cutoff: DEFAULT_CUTOFF,\n smoothing: 0.1\n};\n\nconst TEXT_ANCHOR = {\n start: 1,\n middle: 0,\n end: -1\n};\n\nconst ALIGNMENT_BASELINE = {\n top: 1,\n center: 0,\n bottom: -1\n};\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst DEFAULT_LINE_HEIGHT = 1.0;\n\nconst FONT_SETTINGS_PROPS = ['fontSize', 'buffer', 'sdf', 'radius', 'cutoff'];\n\nconst defaultProps = {\n billboard: true,\n sizeScale: 1,\n sizeUnits: 'pixels',\n sizeMinPixels: 0,\n sizeMaxPixels: Number.MAX_SAFE_INTEGER,\n\n background: false,\n getBackgroundColor: {type: 'accessor', value: [255, 255, 255, 255]},\n getBorderColor: {type: 'accessor', value: DEFAULT_COLOR},\n getBorderWidth: {type: 'accessor', value: 0},\n backgroundPadding: {type: 'array', value: [0, 0, 0, 0]},\n\n characterSet: {type: 'object', value: DEFAULT_CHAR_SET},\n fontFamily: DEFAULT_FONT_FAMILY,\n fontWeight: DEFAULT_FONT_WEIGHT,\n lineHeight: DEFAULT_LINE_HEIGHT,\n outlineWidth: {type: 'number', value: 0, min: 0},\n outlineColor: {type: 'color', value: DEFAULT_COLOR},\n fontSettings: {},\n\n // auto wrapping options\n wordBreak: 'break-word',\n maxWidth: {type: 'number', value: -1},\n\n getText: {type: 'accessor', value: x => x.text},\n getPosition: {type: 'accessor', value: x => x.position},\n getColor: {type: 'accessor', value: DEFAULT_COLOR},\n getSize: {type: 'accessor', value: 32},\n getAngle: {type: 'accessor', value: 0},\n getTextAnchor: {type: 'accessor', value: 'middle'},\n getAlignmentBaseline: {type: 'accessor', value: 'center'},\n getPixelOffset: {type: 'accessor', value: [0, 0]},\n\n // deprecated\n backgroundColor: {deprecatedFor: ['background', 'getBackgroundColor']}\n};\n\nexport default class TextLayer extends CompositeLayer {\n initializeState() {\n this.state = {\n styleVersion: 0,\n fontAtlasManager: new FontAtlasManager()\n };\n }\n\n // eslint-disable-next-line complexity\n updateState({props, oldProps, changeFlags}) {\n const textChanged =\n changeFlags.dataChanged ||\n (changeFlags.updateTriggersChanged &&\n (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getText));\n const oldCharacterSet = this.state.characterSet;\n\n if (textChanged) {\n this._updateText();\n }\n\n const fontChanged =\n oldCharacterSet !== this.state.characterSet || this._fontChanged(oldProps, props);\n\n if (fontChanged) {\n this._updateFontAtlas(oldProps, props);\n }\n\n const styleChanged =\n fontChanged ||\n props.lineHeight !== oldProps.lineHeight ||\n props.wordBreak !== oldProps.wordBreak ||\n props.maxWidth !== oldProps.maxWidth;\n\n if (styleChanged) {\n this.setState({\n styleVersion: this.state.styleVersion + 1\n });\n }\n }\n\n getPickingInfo({info}) {\n // because `TextLayer` assign the same pickingInfoIndex for one text label,\n // here info.index refers the index of text label in props.data\n info.object = info.index >= 0 ? this.props.data[info.index] : null;\n return info;\n }\n\n _updateFontAtlas(oldProps, props) {\n const {fontSettings, fontFamily, fontWeight} = props;\n\n // generate test characterSet\n const {fontAtlasManager, characterSet} = this.state;\n fontAtlasManager.setProps({\n ...DEFAULT_FONT_SETTINGS,\n ...fontSettings,\n characterSet,\n fontFamily,\n fontWeight\n });\n }\n\n _fontChanged(oldProps, props) {\n if (oldProps.fontFamily !== props.fontFamily || oldProps.fontWeight !== props.fontWeight) {\n return true;\n }\n\n if (oldProps.fontSettings === props.fontSettings) {\n return false;\n }\n\n const oldFontSettings = oldProps.fontSettings || {};\n const fontSettings = props.fontSettings || {};\n\n return FONT_SETTINGS_PROPS.some(prop => oldFontSettings[prop] !== fontSettings[prop]);\n }\n\n // Text strings are variable width objects\n // Count characters and start offsets\n _updateText() {\n const {data, characterSet} = this.props;\n const textBuffer = data.attributes && data.attributes.getText;\n let {getText} = this.props;\n let {startIndices} = data;\n let numInstances;\n\n const autoCharacterSet = characterSet === 'auto' && new Set();\n\n if (textBuffer && startIndices) {\n const {texts, characterCount} = getTextFromBuffer({\n ...(ArrayBuffer.isView(textBuffer) ? {value: textBuffer} : textBuffer),\n length: data.length,\n startIndices,\n characterSet: autoCharacterSet\n });\n numInstances = characterCount;\n getText = (_, {index}) => texts[index];\n } else {\n const {iterable, objectInfo} = createIterable(data);\n startIndices = [0];\n numInstances = 0;\n\n for (const object of iterable) {\n objectInfo.index++;\n // Break into an array of characters\n // When dealing with double-length unicode characters, `str.length` or `str[i]` do not work\n const text = Array.from(getText(object, objectInfo) || '');\n if (autoCharacterSet) {\n text.forEach(autoCharacterSet.add, autoCharacterSet);\n }\n numInstances += text.length;\n startIndices.push(numInstances);\n }\n }\n\n this.setState({\n getText,\n startIndices,\n numInstances,\n characterSet: autoCharacterSet || characterSet\n });\n }\n\n // Returns the x, y offsets of each character in a text string\n getBoundingRect(object, objectInfo) {\n const iconMapping = this.state.fontAtlasManager.mapping;\n const {getText} = this.state;\n const {wordBreak, maxWidth, lineHeight, getTextAnchor, getAlignmentBaseline} = this.props;\n\n const paragraph = getText(object, objectInfo) || '';\n const {\n size: [width, height]\n } = transformParagraph(paragraph, lineHeight, wordBreak, maxWidth, iconMapping);\n const anchorX =\n TEXT_ANCHOR[\n typeof getTextAnchor === 'function' ? getTextAnchor(object, objectInfo) : getTextAnchor\n ];\n const anchorY =\n ALIGNMENT_BASELINE[\n typeof getAlignmentBaseline === 'function'\n ? getAlignmentBaseline(object, objectInfo)\n : getAlignmentBaseline\n ];\n\n return [((anchorX - 1) * width) / 2, ((anchorY - 1) * height) / 2, width, height];\n }\n\n // Returns the x, y, w, h of each text object\n getIconOffsets(object, objectInfo) {\n const iconMapping = this.state.fontAtlasManager.mapping;\n const {getText} = this.state;\n const {wordBreak, maxWidth, lineHeight, getTextAnchor, getAlignmentBaseline} = this.props;\n\n const paragraph = getText(object, objectInfo) || '';\n const {\n x,\n y,\n rowWidth,\n size: [width, height]\n } = transformParagraph(paragraph, lineHeight, wordBreak, maxWidth, iconMapping);\n const anchorX =\n TEXT_ANCHOR[\n typeof getTextAnchor === 'function' ? getTextAnchor(object, objectInfo) : getTextAnchor\n ];\n const anchorY =\n ALIGNMENT_BASELINE[\n typeof getAlignmentBaseline === 'function'\n ? getAlignmentBaseline(object, objectInfo)\n : getAlignmentBaseline\n ];\n\n const numCharacters = x.length;\n const offsets = new Array(numCharacters * 2);\n let index = 0;\n\n for (let i = 0; i < numCharacters; i++) {\n // For a multi-line object, offset in x-direction needs consider\n // the row offset in the paragraph and the object offset in the row\n const rowOffset = ((1 - anchorX) * (width - rowWidth[i])) / 2;\n offsets[index++] = ((anchorX - 1) * width) / 2 + rowOffset + x[i];\n offsets[index++] = ((anchorY - 1) * height) / 2 + y[i];\n }\n return offsets;\n }\n\n renderLayers() {\n const {\n startIndices,\n numInstances,\n getText,\n fontAtlasManager: {scale, texture, mapping},\n styleVersion\n } = this.state;\n\n const {\n data,\n _dataDiff,\n getPosition,\n getColor,\n getSize,\n getAngle,\n getPixelOffset,\n getBackgroundColor,\n getBorderColor,\n getBorderWidth,\n backgroundPadding,\n background,\n billboard,\n fontSettings,\n outlineWidth,\n outlineColor,\n sizeScale,\n sizeUnits,\n sizeMinPixels,\n sizeMaxPixels,\n transitions,\n updateTriggers\n } = this.props;\n\n const CharactersLayerClass = this.getSubLayerClass('characters', MultiIconLayer);\n const BackgroundLayerClass = this.getSubLayerClass('background', TextBackgroundLayer);\n\n return [\n background &&\n new BackgroundLayerClass(\n {\n // background props\n getFillColor: getBackgroundColor,\n getLineColor: getBorderColor,\n getLineWidth: getBorderWidth,\n padding: backgroundPadding,\n\n // props shared with characters layer\n getPosition,\n getSize,\n getAngle,\n getPixelOffset,\n billboard,\n sizeScale: sizeScale / this.state.fontAtlasManager.props.fontSize,\n sizeUnits,\n sizeMinPixels,\n sizeMaxPixels,\n\n transitions: transitions && {\n getPosition: transitions.getPosition,\n getAngle: transitions.getAngle,\n getSize: transitions.getSize,\n getFillColor: transitions.getBackgroundColor,\n getLineColor: transitions.getBorderColor,\n getLineWidth: transitions.getBorderWidth,\n getPixelOffset: transitions.getPixelOffset\n }\n },\n this.getSubLayerProps({\n id: 'background',\n updateTriggers: {\n getPosition: updateTriggers.getPosition,\n getAngle: updateTriggers.getAngle,\n getSize: updateTriggers.getSize,\n getFillColor: updateTriggers.getBackgroundColor,\n getLineColor: updateTriggers.getBorderColor,\n getLineWidth: updateTriggers.getBorderWidth,\n getPixelOffset: updateTriggers.getPixelOffset,\n getBoundingRect: {\n getText: updateTriggers.getText,\n getTextAnchor: updateTriggers.getTextAnchor,\n getAlignmentBaseline: updateTriggers.getAlignmentBaseline,\n styleVersion\n }\n }\n }),\n {\n data: data.attributes\n ? {length: data.length, attributes: data.attributes.background || {}}\n : data,\n _dataDiff,\n // Maintain the same background behavior as <=8.3. Remove in v9?\n autoHighlight: false,\n getBoundingRect: this.getBoundingRect.bind(this)\n }\n ),\n new CharactersLayerClass(\n {\n sdf: fontSettings.sdf,\n smoothing: Number.isFinite(fontSettings.smoothing)\n ? fontSettings.smoothing\n : DEFAULT_FONT_SETTINGS.smoothing,\n outlineWidth,\n outlineColor,\n iconAtlas: texture,\n iconMapping: mapping,\n\n getPosition,\n getColor,\n getSize,\n getAngle,\n getPixelOffset,\n\n billboard,\n sizeScale: sizeScale * scale,\n sizeUnits,\n sizeMinPixels: sizeMinPixels * scale,\n sizeMaxPixels: sizeMaxPixels * scale,\n\n transitions: transitions && {\n getPosition: transitions.getPosition,\n getAngle: transitions.getAngle,\n getColor: transitions.getColor,\n getSize: transitions.getSize,\n getPixelOffset: transitions.getPixelOffset\n }\n },\n this.getSubLayerProps({\n id: 'characters',\n updateTriggers: {\n getIcon: updateTriggers.getText,\n getPosition: updateTriggers.getPosition,\n getAngle: updateTriggers.getAngle,\n getColor: updateTriggers.getColor,\n getSize: updateTriggers.getSize,\n getPixelOffset: updateTriggers.getPixelOffset,\n getIconOffsets: {\n getText: updateTriggers.getText,\n getTextAnchor: updateTriggers.getTextAnchor,\n getAlignmentBaseline: updateTriggers.getAlignmentBaseline,\n styleVersion\n }\n }\n }),\n {\n data,\n _dataDiff,\n startIndices,\n numInstances,\n getIconOffsets: this.getIconOffsets.bind(this),\n getIcon: getText\n }\n )\n ];\n }\n}\n\nTextLayer.layerName = 'TextLayer';\nTextLayer.defaultProps = defaultProps;\n","import {log} from '@deck.gl/core';\nimport {Geometry, uid} from '@luma.gl/core';\nimport {modifyPolygonWindingDirection, WINDING} from '@math.gl/polygon';\n\nexport default class ColumnGeometry extends Geometry {\n constructor(props = {}) {\n const {id = uid('column-geometry')} = props;\n const {indices, attributes} = tesselateColumn(props);\n super({\n ...props,\n id,\n indices,\n attributes\n });\n }\n}\n\n/* eslint-disable max-statements, complexity */\nfunction tesselateColumn(props) {\n const {radius, height = 1, nradial = 10} = props;\n let {vertices} = props;\n\n if (vertices) {\n log.assert(vertices.length >= nradial); // `vertices` must contain at least `diskResolution` points\n vertices = vertices.flatMap(v => [v[0], v[1]]);\n modifyPolygonWindingDirection(vertices, WINDING.COUNTER_CLOCKWISE);\n }\n\n const isExtruded = height > 0;\n const vertsAroundEdge = nradial + 1; // loop\n const numVertices = isExtruded\n ? vertsAroundEdge * 3 + 1 // top, side top edge, side bottom edge, one additional degenerage vertex\n : nradial; // top\n\n const stepAngle = (Math.PI * 2) / nradial;\n\n // Used for wireframe\n const indices = new Uint16Array(isExtruded ? nradial * 3 * 2 : 0); // top loop, side vertical, bottom loop\n\n const positions = new Float32Array(numVertices * 3);\n const normals = new Float32Array(numVertices * 3);\n\n let i = 0;\n\n // side tesselation: 0, 1, 2, 3, 4, 5, ...\n //\n // 0 - 2 - 4 ... top\n // | / | / |\n // 1 - 3 - 5 ... bottom\n //\n if (isExtruded) {\n for (let j = 0; j < vertsAroundEdge; j++) {\n const a = j * stepAngle;\n const vertexIndex = j % nradial;\n const sin = Math.sin(a);\n const cos = Math.cos(a);\n\n for (let k = 0; k < 2; k++) {\n positions[i + 0] = vertices ? vertices[vertexIndex * 2] : cos * radius;\n positions[i + 1] = vertices ? vertices[vertexIndex * 2 + 1] : sin * radius;\n positions[i + 2] = (1 / 2 - k) * height;\n\n normals[i + 0] = vertices ? vertices[vertexIndex * 2] : cos;\n normals[i + 1] = vertices ? vertices[vertexIndex * 2 + 1] : sin;\n\n i += 3;\n }\n }\n\n // duplicate the last vertex to create proper degenerate triangle.\n positions[i + 0] = positions[i - 3];\n positions[i + 1] = positions[i - 2];\n positions[i + 2] = positions[i - 1];\n i += 3;\n }\n\n // The column geometry is rendered as a triangle strip, so\n // in order to render sides and top in one go we need to use degenerate triangles.\n // Duplicate last vertex of side trinagles and first vertex of the top cap to preserve winding order.\n\n // top tesselation: 0, -1, 1, -2, 2, -3, 3, ...\n //\n // 0 -- 1\n // / \\\n // -1 2\n // | |\n // -2 3\n // \\ /\n // -3 -- 4\n //\n for (let j = isExtruded ? 0 : 1; j < vertsAroundEdge; j++) {\n const v = Math.floor(j / 2) * Math.sign(0.5 - (j % 2));\n const a = v * stepAngle;\n const vertexIndex = (v + nradial) % nradial;\n const sin = Math.sin(a);\n const cos = Math.cos(a);\n\n positions[i + 0] = vertices ? vertices[vertexIndex * 2] : cos * radius;\n positions[i + 1] = vertices ? vertices[vertexIndex * 2 + 1] : sin * radius;\n positions[i + 2] = height / 2;\n\n normals[i + 2] = 1;\n\n i += 3;\n }\n\n if (isExtruded) {\n let index = 0;\n for (let j = 0; j < nradial; j++) {\n // top loop\n indices[index++] = j * 2 + 0;\n indices[index++] = j * 2 + 2;\n // side vertical\n indices[index++] = j * 2 + 0;\n indices[index++] = j * 2 + 1;\n // bottom loop\n indices[index++] = j * 2 + 1;\n indices[index++] = j * 2 + 3;\n }\n }\n\n return {\n indices,\n attributes: {\n POSITION: {size: 3, value: positions},\n NORMAL: {size: 3, value: normals}\n }\n };\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, gouraudLighting, picking, UNIT} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model} from '@luma.gl/core';\nimport ColumnGeometry from './column-geometry';\n\nimport vs from './column-layer-vertex.glsl';\nimport fs from './column-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst defaultProps = {\n diskResolution: {type: 'number', min: 4, value: 20},\n vertices: null,\n radius: {type: 'number', min: 0, value: 1000},\n angle: {type: 'number', value: 0},\n offset: {type: 'array', value: [0, 0]},\n coverage: {type: 'number', min: 0, max: 1, value: 1},\n elevationScale: {type: 'number', min: 0, value: 1},\n radiusUnits: 'meters',\n lineWidthUnits: 'meters',\n lineWidthScale: 1,\n lineWidthMinPixels: 0,\n lineWidthMaxPixels: Number.MAX_SAFE_INTEGER,\n\n extruded: true,\n wireframe: false,\n filled: true,\n stroked: false,\n\n getPosition: {type: 'accessor', value: x => x.position},\n getFillColor: {type: 'accessor', value: DEFAULT_COLOR},\n getLineColor: {type: 'accessor', value: DEFAULT_COLOR},\n getLineWidth: {type: 'accessor', value: 1},\n getElevation: {type: 'accessor', value: 1000},\n material: true,\n getColor: {deprecatedFor: ['getFillColor', 'getLineColor']}\n};\n\nexport default class ColumnLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, gouraudLighting, picking]});\n }\n\n /**\n * DeckGL calls initializeState when GL context is available\n * Essentially a deferred constructor\n */\n initializeState() {\n const attributeManager = this.getAttributeManager();\n /* eslint-disable max-len */\n attributeManager.addInstanced({\n instancePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getPosition'\n },\n instanceElevations: {\n size: 1,\n transition: true,\n accessor: 'getElevation'\n },\n instanceFillColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: true,\n accessor: 'getFillColor',\n defaultValue: DEFAULT_COLOR\n },\n instanceLineColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: true,\n accessor: 'getLineColor',\n defaultValue: DEFAULT_COLOR\n },\n instanceStrokeWidths: {\n size: 1,\n accessor: 'getLineWidth',\n transition: true\n }\n });\n /* eslint-enable max-len */\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n\n const regenerateModels = changeFlags.extensionsChanged;\n\n if (regenerateModels) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n this.getAttributeManager().invalidateAll();\n }\n\n if (\n regenerateModels ||\n props.diskResolution !== oldProps.diskResolution ||\n props.vertices !== oldProps.vertices ||\n (props.extruded || props.stroked) !== (oldProps.extruded || oldProps.stroked)\n ) {\n this._updateGeometry(props);\n }\n }\n\n getGeometry(diskResolution, vertices, hasThinkness) {\n const geometry = new ColumnGeometry({\n radius: 1,\n height: hasThinkness ? 2 : 0,\n vertices,\n nradial: diskResolution\n });\n\n let meanVertexDistance = 0;\n if (vertices) {\n for (let i = 0; i < diskResolution; i++) {\n const p = vertices[i];\n const d = Math.sqrt(p[0] * p[0] + p[1] * p[1]);\n meanVertexDistance += d / diskResolution;\n }\n } else {\n meanVertexDistance = 1;\n }\n this.setState({\n edgeDistance: Math.cos(Math.PI / diskResolution) * meanVertexDistance\n });\n\n return geometry;\n }\n\n _getModel(gl) {\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n isInstanced: true\n });\n }\n\n _updateGeometry({diskResolution, vertices, extruded, stroked}) {\n const geometry = this.getGeometry(diskResolution, vertices, extruded || stroked);\n\n this.setState({\n fillVertexCount: geometry.attributes.POSITION.value.length / 3,\n wireframeVertexCount: geometry.indices.value.length\n });\n\n this.state.model.setProps({geometry});\n }\n\n draw({uniforms}) {\n const {\n lineWidthUnits,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n radiusUnits,\n elevationScale,\n extruded,\n filled,\n stroked,\n wireframe,\n offset,\n coverage,\n radius,\n angle\n } = this.props;\n const {model, fillVertexCount, wireframeVertexCount, edgeDistance} = this.state;\n\n model.setUniforms(uniforms).setUniforms({\n radius,\n angle: (angle / 180) * Math.PI,\n offset,\n extruded,\n coverage,\n elevationScale,\n edgeDistance,\n radiusUnits: UNIT[radiusUnits],\n widthUnits: UNIT[lineWidthUnits],\n widthScale: lineWidthScale,\n widthMinPixels: lineWidthMinPixels,\n widthMaxPixels: lineWidthMaxPixels\n });\n\n // When drawing 3d: draw wireframe first so it doesn't get occluded by depth test\n if (extruded && wireframe) {\n model.setProps({isIndexed: true});\n model\n .setVertexCount(wireframeVertexCount)\n .setDrawMode(GL.LINES)\n .setUniforms({isStroke: true})\n .draw();\n }\n if (filled) {\n model.setProps({isIndexed: false});\n model\n .setVertexCount(fillVertexCount)\n .setDrawMode(GL.TRIANGLE_STRIP)\n .setUniforms({isStroke: false})\n .draw();\n }\n // When drawing 2d: draw fill before stroke so that the outline is always on top\n if (!extruded && stroked) {\n model.setProps({isIndexed: false});\n // The width of the stroke is achieved by flattening the side of the cylinder.\n // Skip the last 1/3 of the vertices which is the top.\n model\n .setVertexCount((fillVertexCount * 2) / 3)\n .setDrawMode(GL.TRIANGLE_STRIP)\n .setUniforms({isStroke: true})\n .draw();\n }\n }\n}\n\nColumnLayer.layerName = 'ColumnLayer';\nColumnLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n\n#define SHADER_NAME column-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 normals;\n\nattribute vec3 instancePositions;\nattribute float instanceElevations;\nattribute vec3 instancePositions64Low;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute float instanceStrokeWidths;\n\nattribute vec3 instancePickingColors;\n\n// Custom uniforms\nuniform float opacity;\nuniform float radius;\nuniform float angle;\nuniform vec2 offset;\nuniform bool extruded;\nuniform bool isStroke;\nuniform float coverage;\nuniform float elevationScale;\nuniform float edgeDistance;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int radiusUnits;\nuniform int widthUnits;\n\n// Result\nvarying vec4 vColor;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n\n vec4 color = isStroke ? instanceLineColors : instanceFillColors;\n // rotate primitive position and normal\n mat2 rotationMatrix = mat2(cos(angle), sin(angle), -sin(angle), cos(angle));\n\n // calculate elevation, if 3d not enabled set to 0\n // cylindar gemoetry height are between -1.0 to 1.0, transform it to between 0, 1\n float elevation = 0.0;\n // calculate stroke offset\n float strokeOffsetRatio = 1.0;\n\n if (extruded) {\n elevation = instanceElevations * (positions.z + 1.0) / 2.0 * elevationScale;\n } else if (isStroke) {\n float widthPixels = clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0;\n strokeOffsetRatio -= sign(positions.z) * project_pixel_size(widthPixels) / project_size(edgeDistance * coverage * radius);\n }\n\n // if alpha == 0.0 or z < 0.0, do not render element\n float shouldRender = float(color.a > 0.0 && instanceElevations >= 0.0);\n float dotRadius = radius * coverage * shouldRender;\n\n geometry.normal = project_normal(vec3(rotationMatrix * normals.xy, normals.z));\n geometry.pickingColor = instancePickingColors;\n\n // project center of column\n vec3 centroidPosition = vec3(instancePositions.xy, instancePositions.z + elevation);\n vec3 centroidPosition64Low = instancePositions64Low;\n vec2 offset = (rotationMatrix * positions.xy * strokeOffsetRatio + offset) * dotRadius;\n if (radiusUnits == UNIT_METERS) {\n offset = project_size(offset);\n }\n vec3 pos = vec3(offset, 0.);\n DECKGL_FILTER_SIZE(pos, geometry);\n\n gl_Position = project_position_to_clipspace(centroidPosition, centroidPosition64Low, pos, geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Light calculations\n if (extruded && !isStroke) {\n vec3 lightColor = lighting_getLightColor(color.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n vColor = vec4(lightColor, color.a * opacity);\n } else {\n vColor = vec4(color.rgb, color.a * opacity);\n }\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME column-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\n\nvoid main(void) {\n gl_FragColor = vColor;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, picking, UNIT} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry} from '@luma.gl/core';\n\nimport vs from './scatterplot-layer-vertex.glsl';\nimport fs from './scatterplot-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst defaultProps = {\n radiusUnits: 'meters',\n radiusScale: {type: 'number', min: 0, value: 1},\n radiusMinPixels: {type: 'number', min: 0, value: 0}, // min point radius in pixels\n radiusMaxPixels: {type: 'number', min: 0, value: Number.MAX_SAFE_INTEGER}, // max point radius in pixels\n\n lineWidthUnits: 'meters',\n lineWidthScale: {type: 'number', min: 0, value: 1},\n lineWidthMinPixels: {type: 'number', min: 0, value: 0},\n lineWidthMaxPixels: {type: 'number', min: 0, value: Number.MAX_SAFE_INTEGER},\n\n stroked: false,\n filled: true,\n billboard: false,\n antialiasing: true,\n\n getPosition: {type: 'accessor', value: x => x.position},\n getRadius: {type: 'accessor', value: 1},\n getFillColor: {type: 'accessor', value: DEFAULT_COLOR},\n getLineColor: {type: 'accessor', value: DEFAULT_COLOR},\n getLineWidth: {type: 'accessor', value: 1},\n\n // deprecated\n strokeWidth: {deprecatedFor: 'getLineWidth'},\n outline: {deprecatedFor: 'stroked'},\n getColor: {deprecatedFor: ['getFillColor', 'getLineColor']}\n};\n\nexport default class ScatterplotLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, picking]});\n }\n\n initializeState() {\n this.getAttributeManager().addInstanced({\n instancePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getPosition'\n },\n instanceRadius: {\n size: 1,\n transition: true,\n accessor: 'getRadius',\n defaultValue: 1\n },\n instanceFillColors: {\n size: this.props.colorFormat.length,\n transition: true,\n normalized: true,\n type: GL.UNSIGNED_BYTE,\n accessor: 'getFillColor',\n defaultValue: [0, 0, 0, 255]\n },\n instanceLineColors: {\n size: this.props.colorFormat.length,\n transition: true,\n normalized: true,\n type: GL.UNSIGNED_BYTE,\n accessor: 'getLineColor',\n defaultValue: [0, 0, 0, 255]\n },\n instanceLineWidths: {\n size: 1,\n transition: true,\n accessor: 'getLineWidth',\n defaultValue: 1\n }\n });\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n this.getAttributeManager().invalidateAll();\n }\n }\n\n draw({uniforms}) {\n const {\n radiusUnits,\n radiusScale,\n radiusMinPixels,\n radiusMaxPixels,\n stroked,\n filled,\n billboard,\n antialiasing,\n lineWidthUnits,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels\n } = this.props;\n\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n stroked: stroked ? 1 : 0,\n filled,\n billboard,\n antialiasing,\n radiusUnits: UNIT[radiusUnits],\n radiusScale,\n radiusMinPixels,\n radiusMaxPixels,\n lineWidthUnits: UNIT[lineWidthUnits],\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels\n })\n .draw();\n }\n\n _getModel(gl) {\n // a square that minimally cover the unit circle\n const positions = [-1, -1, 0, 1, -1, 0, 1, 1, 0, -1, 1, 0];\n\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_FAN,\n vertexCount: 4,\n attributes: {\n positions: {size: 3, value: new Float32Array(positions)}\n }\n }),\n isInstanced: true\n });\n }\n}\n\nScatterplotLayer.layerName = 'ScatterplotLayer';\nScatterplotLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME scatterplot-layer-vertex-shader\n\nattribute vec3 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute float instanceRadius;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusScale;\nuniform float radiusMinPixels;\nuniform float radiusMaxPixels;\nuniform float lineWidthScale;\nuniform float lineWidthMinPixels;\nuniform float lineWidthMaxPixels;\nuniform float stroked;\nuniform bool filled;\nuniform bool billboard;\nuniform int radiusUnits;\nuniform int lineWidthUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n\n // Multiply out radius and clamp to limits\n outerRadiusPixels = clamp(\n project_size_to_pixel(radiusScale * instanceRadius, radiusUnits),\n radiusMinPixels, radiusMaxPixels\n );\n \n // Multiply out line width and clamp to limits\n float lineWidthPixels = clamp(\n project_size_to_pixel(lineWidthScale * instanceLineWidths, lineWidthUnits),\n lineWidthMinPixels, lineWidthMaxPixels\n );\n\n // outer radius needs to offset by half stroke width\n outerRadiusPixels += stroked * lineWidthPixels / 2.0;\n\n // position on the containing square in [-1, 1] space\n unitPosition = positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n\n innerUnitRadius = 1.0 - stroked * lineWidthPixels / outerRadiusPixels;\n \n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n vec3 offset = positions * outerRadiusPixels;\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset = positions * project_pixel_size(outerRadiusPixels);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset, geometry.position);\n }\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Apply opacity to instance color, or return instance picking color\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME scatterplot-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool filled;\nuniform float stroked;\nuniform bool antialiasing;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying vec2 unitPosition;\nvarying float innerUnitRadius;\nvarying float outerRadiusPixels;\n\nvoid main(void) {\n geometry.uv = unitPosition;\n\n float distToCenter = length(unitPosition) * outerRadiusPixels;\n float inCircle = antialiasing ? \n smoothedge(distToCenter, outerRadiusPixels) : \n step(distToCenter, outerRadiusPixels);\n\n if (inCircle == 0.0) {\n discard;\n }\n\n if (stroked > 0.5) {\n float isLine = antialiasing ? \n smoothedge(innerUnitRadius * outerRadiusPixels, distToCenter) :\n step(innerUnitRadius * outerRadiusPixels, distToCenter);\n\n if (filled) {\n gl_FragColor = mix(vFillColor, vLineColor, isLine);\n } else {\n if (isLine == 0.0) {\n discard;\n }\n gl_FragColor = vec4(vLineColor.rgb, vLineColor.a * isLine);\n }\n } else if (filled) {\n gl_FragColor = vFillColor;\n } else {\n discard;\n }\n\n gl_FragColor.a *= inCircle;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","import {Layer, project32, picking, UNIT} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry} from '@luma.gl/core';\n\nimport vs from './text-background-layer-vertex.glsl';\nimport fs from './text-background-layer-fragment.glsl';\n\nconst defaultProps = {\n billboard: true,\n sizeScale: 1,\n sizeUnits: 'pixels',\n sizeMinPixels: 0,\n sizeMaxPixels: Number.MAX_SAFE_INTEGER,\n\n padding: {type: 'array', value: [0, 0, 0, 0]},\n\n getPosition: {type: 'accessor', value: x => x.position},\n getSize: {type: 'accessor', value: 1},\n getAngle: {type: 'accessor', value: 0},\n getPixelOffset: {type: 'accessor', value: [0, 0]},\n getBoundingRect: {type: 'accessor', value: [0, 0, 0, 0]},\n getFillColor: {type: 'accessor', value: [0, 0, 0, 255]},\n getLineColor: {type: 'accessor', value: [0, 0, 0, 255]},\n getLineWidth: {type: 'accessor', value: 1}\n};\n\nexport default class TextBackgroundLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, picking]});\n }\n\n initializeState() {\n this.getAttributeManager().addInstanced({\n instancePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getPosition'\n },\n instanceSizes: {\n size: 1,\n transition: true,\n accessor: 'getSize',\n defaultValue: 1\n },\n instanceAngles: {\n size: 1,\n transition: true,\n accessor: 'getAngle'\n },\n instanceRects: {\n size: 4,\n accessor: 'getBoundingRect'\n },\n instancePixelOffsets: {\n size: 2,\n transition: true,\n accessor: 'getPixelOffset'\n },\n instanceFillColors: {\n size: 4,\n transition: true,\n normalized: true,\n type: GL.UNSIGNED_BYTE,\n accessor: 'getFillColor',\n defaultValue: [0, 0, 0, 255]\n },\n instanceLineColors: {\n size: 4,\n transition: true,\n normalized: true,\n type: GL.UNSIGNED_BYTE,\n accessor: 'getLineColor',\n defaultValue: [0, 0, 0, 255]\n },\n instanceLineWidths: {\n size: 1,\n transition: true,\n accessor: 'getLineWidth',\n defaultValue: 1\n }\n });\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n this.getAttributeManager().invalidateAll();\n }\n }\n\n draw({uniforms}) {\n const {\n billboard,\n sizeScale,\n sizeUnits,\n sizeMinPixels,\n sizeMaxPixels,\n getLineWidth\n } = this.props;\n let {padding} = this.props;\n\n if (padding.length < 4) {\n padding = [padding[0], padding[1], padding[0], padding[1]];\n }\n\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n billboard,\n stroked: Boolean(getLineWidth),\n padding,\n sizeUnits: UNIT[sizeUnits],\n sizeScale,\n sizeMinPixels,\n sizeMaxPixels\n })\n .draw();\n }\n\n _getModel(gl) {\n // a square that minimally cover the unit circle\n const positions = [0, 0, 1, 0, 1, 1, 0, 1];\n\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_FAN,\n vertexCount: 4,\n attributes: {\n positions: {size: 2, value: new Float32Array(positions)}\n }\n }),\n isInstanced: true\n });\n }\n}\n\nTextBackgroundLayer.layerName = 'TextBackgroundLayer';\nTextBackgroundLayer.defaultProps = defaultProps;\n","export default `\\\n#define SHADER_NAME text-background-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec4 instanceRects;\nattribute float instanceSizes;\nattribute float instanceAngles;\nattribute vec2 instancePixelOffsets;\nattribute float instanceLineWidths;\nattribute vec4 instanceFillColors;\nattribute vec4 instanceLineColors;\nattribute vec3 instancePickingColors;\n\nuniform bool billboard;\nuniform float opacity;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform vec4 padding;\nuniform int sizeUnits;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvec2 rotate_by_angle(vec2 vertex, float angle) {\n float angle_radian = radians(angle);\n float cos_angle = cos(angle_radian);\n float sin_angle = sin(angle_radian);\n mat2 rotationMatrix = mat2(cos_angle, -sin_angle, sin_angle, cos_angle);\n return rotationMatrix * vertex;\n}\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = positions;\n geometry.pickingColor = instancePickingColors;\n uv = positions;\n vLineWidth = instanceLineWidths;\n\n // convert size in meters to pixels, then scaled and clamp\n\n // project meters to pixels and clamp to limits\n float sizePixels = clamp(\n project_size_to_pixel(instanceSizes * sizeScale, sizeUnits),\n sizeMinPixels, sizeMaxPixels\n );\n\n dimensions = instanceRects.zw * sizePixels + padding.xy + padding.zw;\n\n vec2 pixelOffset = (positions * instanceRects.zw + instanceRects.xy) * sizePixels + mix(-padding.xy, padding.zw, positions);\n pixelOffset = rotate_by_angle(pixelOffset, instanceAngles);\n pixelOffset += instancePixelOffsets;\n pixelOffset.y *= -1.0;\n\n if (billboard) {\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n vec3 offset = vec3(pixelOffset, 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n } else {\n vec3 offset_common = vec3(project_pixel_size(pixelOffset), 0.0);\n DECKGL_FILTER_SIZE(offset_common, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, offset_common, geometry.position);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Apply opacity to instance color, or return instance picking color\n vFillColor = vec4(instanceFillColors.rgb, instanceFillColors.a * opacity);\n DECKGL_FILTER_COLOR(vFillColor, geometry);\n vLineColor = vec4(instanceLineColors.rgb, instanceLineColors.a * opacity);\n DECKGL_FILTER_COLOR(vLineColor, geometry);\n}\n`;\n","export default `\\\n#define SHADER_NAME text-background-layer-fragment-shader\n\nprecision highp float;\n\nuniform bool stroked;\n\nvarying vec4 vFillColor;\nvarying vec4 vLineColor;\nvarying float vLineWidth;\nvarying vec2 uv;\nvarying vec2 dimensions;\n\nvoid main(void) {\n geometry.uv = uv;\n\n vec2 pixelPosition = uv * dimensions;\n if (stroked) {\n float distToEdge = min(\n min(pixelPosition.x, dimensions.x - pixelPosition.x),\n min(pixelPosition.y, dimensions.y - pixelPosition.y)\n );\n float isBorder = smoothedge(distToEdge, vLineWidth);\n gl_FragColor = mix(vFillColor, vLineColor, isBorder);\n } else {\n gl_FragColor = vFillColor;\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","import {load} from '@loaders.gl/core';\n\nexport default class Resource {\n constructor(id, data, context) {\n this.id = id;\n this.context = context;\n\n this._loadCount = 0;\n this._subscribers = new Set();\n\n this.setData(data);\n }\n\n // consumer: {onChange: Function}\n subscribe(consumer) {\n this._subscribers.add(consumer);\n }\n\n unsubscribe(consumer) {\n this._subscribers.delete(consumer);\n }\n\n inUse() {\n return this._subscribers.size > 0;\n }\n\n delete() {\n // Remove any resources created\n }\n\n getData() {\n return this.isLoaded\n ? this._error\n ? Promise.reject(this._error)\n : this._content\n : this._loader.then(() => this.getData());\n }\n\n setData(data, forceUpdate) {\n if (data === this._data && !forceUpdate) {\n return;\n }\n this._data = data;\n const loadCount = ++this._loadCount;\n\n let loader = data;\n if (typeof data === 'string') {\n loader = load(data);\n }\n if (loader instanceof Promise) {\n this.isLoaded = false;\n this._loader = loader\n .then(result => {\n // check if source has changed\n if (this._loadCount === loadCount) {\n this.isLoaded = true;\n this._error = null;\n this._content = result;\n }\n })\n .catch(error => {\n if (this._loadCount === loadCount) {\n this.isLoaded = true;\n this._error = error || true;\n }\n });\n } else {\n this.isLoaded = true;\n this._error = null;\n this._content = data;\n }\n\n for (const subscriber of this._subscribers) {\n subscriber.onChange(this.getData());\n }\n }\n}\n","/* global setTimeout */\nimport Resource from './resource';\n\nexport default class ResourceManager {\n constructor({gl, protocol}) {\n this.protocol = protocol || 'resource://';\n\n this._context = {\n gl,\n resourceManager: this\n };\n this._resources = {};\n this._consumers = {};\n\n this._pruneRequest = null;\n }\n\n contains(resourceId) {\n if (resourceId.startsWith(this.protocol)) {\n return true;\n }\n return resourceId in this._resources;\n }\n\n add({resourceId, data, forceUpdate = false, persistent = true}) {\n let res = this._resources[resourceId];\n\n if (res) {\n res.setData(data, forceUpdate);\n } else {\n res = new Resource(resourceId, data, this._context);\n this._resources[resourceId] = res;\n }\n // persistent resources can only be removed by calling `remove`\n // non-persistent resources may be released when there are no more consumers\n res.persistent = persistent;\n }\n\n remove(resourceId) {\n const res = this._resources[resourceId];\n\n if (res) {\n res.delete();\n delete this._resources[resourceId];\n }\n }\n\n unsubscribe({consumerId}) {\n const consumer = this._consumers[consumerId];\n if (consumer) {\n for (const requestId in consumer) {\n const request = consumer[requestId];\n if (request.resource) {\n request.resource.unsubscribe(request);\n }\n }\n delete this._consumers[consumerId];\n this.prune();\n }\n }\n\n subscribe({resourceId, onChange, consumerId, requestId = 'default'}) {\n const {_resources: resources, protocol} = this;\n if (resourceId.startsWith(protocol)) {\n resourceId = resourceId.replace(protocol, '');\n if (!resources[resourceId]) {\n // Add placeholder. When this resource becomes available, the consumer will be notified.\n this.add({resourceId, data: null, persistent: false});\n }\n }\n const res = resources[resourceId];\n this._track(consumerId, requestId, res, onChange);\n if (res) {\n return res.getData();\n }\n\n return undefined;\n }\n\n prune() {\n if (!this._pruneRequest) {\n // prune() may be called multiple times in the same animation frame.\n // Batch multiple requests together\n this._pruneRequest = setTimeout(() => this._prune(), 0);\n }\n }\n\n finalize() {\n for (const key in this._resources) {\n this._resources[key].delete();\n }\n }\n\n _track(consumerId, requestId, resource, onChange) {\n const consumers = this._consumers;\n const consumer = (consumers[consumerId] = consumers[consumerId] || {});\n const request = consumer[requestId] || {};\n\n if (request.resource) {\n request.resource.unsubscribe(request);\n request.resource = null;\n this.prune();\n }\n if (resource) {\n consumer[requestId] = request;\n request.onChange = onChange;\n request.resource = resource;\n resource.subscribe(request);\n }\n }\n\n _prune() {\n this._pruneRequest = null;\n\n for (const key of Object.keys(this._resources)) {\n const res = this._resources[key];\n if (!res.persistent && !res.inUse()) {\n res.delete();\n delete this._resources[key];\n }\n }\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Timeline} from '@luma.gl/core';\nimport {LIFECYCLE} from '../lifecycle/constants';\nimport log from '../utils/log';\nimport debug from '../debug';\nimport {flatten} from '../utils/flatten';\nimport {Stats} from 'probe.gl';\nimport ResourceManager from './resource/resource-manager';\n\nimport Viewport from '../viewports/viewport';\nimport {createProgramManager} from '../shaderlib';\n\nconst TRACE_SET_LAYERS = 'layerManager.setLayers';\nconst TRACE_ACTIVATE_VIEWPORT = 'layerManager.activateViewport';\n\n// CONTEXT IS EXPOSED TO LAYERS\nconst INITIAL_CONTEXT = Object.seal({\n layerManager: null,\n resourceManager: null,\n deck: null,\n gl: null,\n\n // General resources\n stats: null, // for tracking lifecycle performance\n\n // GL Resources\n shaderCache: null,\n pickingFBO: null, // Screen-size framebuffer that layers can reuse\n\n mousePosition: null,\n\n userData: {} // Place for any custom app `context`\n});\n\nexport default class LayerManager {\n // eslint-disable-next-line\n constructor(gl, {deck, stats, viewport, timeline} = {}) {\n // Currently deck.gl expects the DeckGL.layers array to be different\n // whenever React rerenders. If the same layers array is used, the\n // LayerManager's diffing algorithm will generate a fatal error and\n // break the rendering.\n\n // `this.lastRenderedLayers` stores the UNFILTERED layers sent\n // down to LayerManager, so that `layers` reference can be compared.\n // If it's the same across two React render calls, the diffing logic\n // will be skipped.\n this.lastRenderedLayers = [];\n this.layers = [];\n this.resourceManager = new ResourceManager({gl, protocol: 'deck://'});\n\n this.context = {\n ...INITIAL_CONTEXT,\n layerManager: this,\n gl,\n deck,\n // Enabling luma.gl Program caching using private API (_cachePrograms)\n programManager: gl && createProgramManager(gl),\n stats: stats || new Stats({id: 'deck.gl'}),\n // Make sure context.viewport is not empty on the first layer initialization\n viewport: viewport || new Viewport({id: 'DEFAULT-INITIAL-VIEWPORT'}), // Current viewport, exposed to layers for project* function\n timeline: timeline || new Timeline(),\n resourceManager: this.resourceManager\n };\n\n this._nextLayers = null;\n this._needsRedraw = 'Initial render';\n this._needsUpdate = false;\n this._debug = false;\n\n this.activateViewport = this.activateViewport.bind(this);\n\n Object.seal(this);\n }\n\n // Method to call when the layer manager is not needed anymore.\n finalize() {\n this.resourceManager.finalize();\n // Finalize all layers\n for (const layer of this.layers) {\n this._finalizeLayer(layer);\n }\n }\n\n // Check if a redraw is needed\n needsRedraw(opts = {clearRedrawFlags: false}) {\n let redraw = this._needsRedraw;\n if (opts.clearRedrawFlags) {\n this._needsRedraw = false;\n }\n\n // This layers list doesn't include sublayers, relying on composite layers\n for (const layer of this.layers) {\n // Call every layer to clear their flags\n const layerNeedsRedraw = layer.getNeedsRedraw(opts);\n redraw = redraw || layerNeedsRedraw;\n }\n\n return redraw;\n }\n\n // Check if a deep update of all layers is needed\n needsUpdate() {\n if (this._nextLayers && this._nextLayers !== this.lastRenderedLayers) {\n // New layers array may be the same as the old one if `setProps` is called by React\n return 'layers changed';\n }\n return this._needsUpdate;\n }\n\n // Layers will be redrawn (in next animation frame)\n setNeedsRedraw(reason) {\n this._needsRedraw = this._needsRedraw || reason;\n }\n\n // Layers will be updated deeply (in next animation frame)\n // Potentially regenerating attributes and sub layers\n setNeedsUpdate(reason) {\n this._needsUpdate = this._needsUpdate || reason;\n }\n\n // Gets an (optionally) filtered list of layers\n getLayers({layerIds = null} = {}) {\n // Filtering by layerId compares beginning of strings, so that sublayers will be included\n // Dependes on the convention of adding suffixes to the parent's layer name\n return layerIds\n ? this.layers.filter(layer => layerIds.find(layerId => layer.id.indexOf(layerId) === 0))\n : this.layers;\n }\n\n // Set props needed for layer rendering and picking.\n setProps(props) {\n if ('debug' in props) {\n this._debug = props.debug;\n }\n\n // A way for apps to add data to context that can be accessed in layers\n if ('userData' in props) {\n this.context.userData = props.userData;\n }\n\n // New layers will be processed in `updateLayers` in the next update cycle\n if ('layers' in props) {\n this._nextLayers = props.layers;\n }\n\n if ('onError' in props) {\n this.context.onError = props.onError;\n }\n }\n\n // Supply a new layer list, initiating sublayer generation and layer matching\n setLayers(newLayers, reason) {\n debug(TRACE_SET_LAYERS, this, reason, newLayers);\n\n this.lastRenderedLayers = newLayers;\n\n newLayers = flatten(newLayers, Boolean);\n\n for (const layer of newLayers) {\n layer.context = this.context;\n }\n\n this._updateLayers(this.layers, newLayers);\n\n return this;\n }\n\n // Update layers from last cycle if `setNeedsUpdate()` has been called\n updateLayers() {\n // NOTE: For now, even if only some layer has changed, we update all layers\n // to ensure that layer id maps etc remain consistent even if different\n // sublayers are rendered\n const reason = this.needsUpdate();\n if (reason) {\n this.setNeedsRedraw(`updating layers: ${reason}`);\n // Force a full update\n this.setLayers(this._nextLayers || this.lastRenderedLayers, reason);\n }\n // Updated, clear the backlog\n this._nextLayers = null;\n }\n\n //\n // PRIVATE METHODS\n //\n\n // Make a viewport \"current\" in layer context, updating viewportChanged flags\n activateViewport(viewport) {\n debug(TRACE_ACTIVATE_VIEWPORT, this, viewport);\n if (viewport) {\n this.context.viewport = viewport;\n }\n return this;\n }\n\n _handleError(stage, error, layer) {\n layer.raiseError(error, `${stage} of ${layer}`);\n }\n\n // Match all layers, checking for caught errors\n // To avoid having an exception in one layer disrupt other layers\n // TODO - mark layers with exceptions as bad and remove from rendering cycle?\n _updateLayers(oldLayers, newLayers) {\n // Create old layer map\n const oldLayerMap = {};\n for (const oldLayer of oldLayers) {\n if (oldLayerMap[oldLayer.id]) {\n log.warn(`Multiple old layers with same id ${oldLayer.id}`)();\n } else {\n oldLayerMap[oldLayer.id] = oldLayer;\n }\n }\n\n // Allocate array for generated layers\n const generatedLayers = [];\n\n // Match sublayers\n this._updateSublayersRecursively(newLayers, oldLayerMap, generatedLayers);\n\n // Finalize unmatched layers\n this._finalizeOldLayers(oldLayerMap);\n\n let needsUpdate = false;\n for (const layer of generatedLayers) {\n if (layer.hasUniformTransition()) {\n needsUpdate = true;\n break;\n }\n }\n\n this._needsUpdate = needsUpdate;\n this.layers = generatedLayers;\n }\n\n /* eslint-disable complexity,max-statements */\n // Note: adds generated layers to `generatedLayers` array parameter\n _updateSublayersRecursively(newLayers, oldLayerMap, generatedLayers) {\n for (const newLayer of newLayers) {\n newLayer.context = this.context;\n\n // Given a new coming layer, find its matching old layer (if any)\n const oldLayer = oldLayerMap[newLayer.id];\n if (oldLayer === null) {\n // null, rather than undefined, means this id was originally there\n log.warn(`Multiple new layers with same id ${newLayer.id}`)();\n }\n // Remove the old layer from candidates, as it has been matched with this layer\n oldLayerMap[newLayer.id] = null;\n\n let sublayers = null;\n\n // We must not generate exceptions until after layer matching is complete\n try {\n if (this._debug && oldLayer !== newLayer) {\n newLayer.validateProps();\n }\n\n if (!oldLayer) {\n this._initializeLayer(newLayer);\n } else {\n this._transferLayerState(oldLayer, newLayer);\n this._updateLayer(newLayer);\n }\n generatedLayers.push(newLayer);\n\n // Call layer lifecycle method: render sublayers\n sublayers = newLayer.isComposite && newLayer.getSubLayers();\n // End layer lifecycle method: render sublayers\n } catch (err) {\n this._handleError('matching', err, newLayer); // Record first exception\n }\n\n if (sublayers) {\n this._updateSublayersRecursively(sublayers, oldLayerMap, generatedLayers);\n }\n }\n }\n /* eslint-enable complexity,max-statements */\n\n // Finalize any old layers that were not matched\n _finalizeOldLayers(oldLayerMap) {\n for (const layerId in oldLayerMap) {\n const layer = oldLayerMap[layerId];\n if (layer) {\n this._finalizeLayer(layer);\n }\n }\n }\n\n // EXCEPTION SAFE LAYER ACCESS\n\n // Initializes a single layer, calling layer methods\n _initializeLayer(layer) {\n try {\n layer._initialize();\n layer.lifecycle = LIFECYCLE.INITIALIZED;\n } catch (err) {\n this._handleError('initialization', err, layer);\n // TODO - what should the lifecycle state be here? LIFECYCLE.INITIALIZATION_FAILED?\n }\n }\n\n _transferLayerState(oldLayer, newLayer) {\n newLayer._transferState(oldLayer);\n newLayer.lifecycle = LIFECYCLE.MATCHED;\n\n if (newLayer !== oldLayer) {\n oldLayer.lifecycle = LIFECYCLE.AWAITING_GC;\n }\n }\n\n // Updates a single layer, cleaning all flags\n _updateLayer(layer) {\n try {\n layer._update();\n } catch (err) {\n this._handleError('update', err, layer);\n }\n }\n\n // Finalizes a single layer\n _finalizeLayer(layer) {\n this._needsRedraw = this._needsRedraw || `finalized ${layer}`;\n\n layer.lifecycle = LIFECYCLE.AWAITING_FINALIZATION;\n\n try {\n layer._finalize();\n layer.lifecycle = LIFECYCLE.FINALIZED;\n } catch (err) {\n this._handleError('finalization', err, layer);\n }\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport GL from '@luma.gl/constants';\nimport {log} from '@deck.gl/core';\nimport IconLayer from '../../icon-layer/icon-layer';\n\nimport fs from './multi-icon-layer-fragment.glsl';\n\n// TODO expose as layer properties\nconst DEFAULT_BUFFER = 192.0 / 256;\nconst EMPTY_ARRAY = [];\n\nconst defaultProps = {\n getIconOffsets: {type: 'accessor', value: x => x.offsets},\n alphaCutoff: 0.001,\n smoothing: 0.1,\n outlineWidth: 0,\n outlineColor: {type: 'color', value: [0, 0, 0, 255]}\n};\n\nexport default class MultiIconLayer extends IconLayer {\n getShaders() {\n return {...super.getShaders(), fs};\n }\n\n initializeState() {\n super.initializeState();\n\n const attributeManager = this.getAttributeManager();\n attributeManager.addInstanced({\n instanceOffsets: {\n size: 2,\n accessor: 'getIconOffsets'\n },\n instancePickingColors: {\n type: GL.UNSIGNED_BYTE,\n size: 3,\n accessor: (object, {index, target: value}) => this.encodePickingColor(index, value)\n }\n });\n }\n\n updateState(params) {\n super.updateState(params);\n const {props, oldProps} = params;\n let {outlineColor} = props;\n\n if (outlineColor !== oldProps.outlineColor) {\n outlineColor = outlineColor.map(x => x / 255);\n outlineColor[3] = Number.isFinite(outlineColor[3]) ? outlineColor[3] : 1;\n\n this.setState({\n outlineColor\n });\n }\n if (!props.sdf && props.outlineWidth) {\n log.warn(`${this.id}: fontSettings.sdf is required to render outline`)();\n }\n }\n\n draw(params) {\n const {sdf, smoothing, outlineWidth} = this.props;\n const {outlineColor} = this.state;\n\n params.uniforms = {\n ...params.uniforms,\n // Refer the following doc about gamma and buffer\n // https://blog.mapbox.com/drawing-text-with-signed-distance-fields-in-mapbox-gl-b0933af6f817\n buffer: DEFAULT_BUFFER,\n outlineBuffer: outlineWidth ? Math.max(smoothing, DEFAULT_BUFFER * (1 - outlineWidth)) : -1,\n gamma: smoothing,\n sdf: Boolean(sdf),\n outlineColor\n };\n super.draw(params);\n }\n\n getInstanceOffset(icons) {\n return icons ? Array.from(icons).map(icon => super.getInstanceOffset(icon)) : EMPTY_ARRAY;\n }\n\n getInstanceColorMode(icons) {\n return 1; // mask\n }\n\n getInstanceIconFrame(icons) {\n return icons ? Array.from(icons).map(icon => super.getInstanceIconFrame(icon)) : EMPTY_ARRAY;\n }\n}\n\nMultiIconLayer.layerName = 'MultiIconLayer';\nMultiIconLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME multi-icon-layer-fragment-shader\n\nprecision highp float;\n\nuniform float opacity;\nuniform sampler2D iconsTexture;\nuniform float gamma;\nuniform bool sdf;\nuniform float alphaCutoff;\nuniform float buffer;\nuniform float outlineBuffer;\nuniform vec4 outlineColor;\n\nvarying vec4 vColor;\nvarying vec2 vTextureCoords;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n if (!picking_uActive) {\n float alpha = texture2D(iconsTexture, vTextureCoords).a;\n vec4 color = vColor;\n\n // if enable sdf (signed distance fields)\n if (sdf) {\n float distance = alpha;\n alpha = smoothstep(buffer - gamma, buffer + gamma, distance);\n\n if (outlineBuffer > 0.0) {\n float inFill = alpha;\n float inBorder = smoothstep(outlineBuffer - gamma, outlineBuffer + gamma, distance);\n color = mix(outlineColor, vColor, inFill);\n alpha = inBorder;\n }\n }\n\n // Take the global opacity and the alpha from color into account for the alpha component\n float a = alpha * color.a;\n \n if (a < alphaCutoff) {\n discard;\n }\n\n gl_FragColor = vec4(color.rgb, a * opacity);\n }\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","import LayersPass from './layers-pass';\n\nexport default class DrawLayersPass extends LayersPass {}\n","import debug from '../debug';\nimport DrawLayersPass from '../passes/draw-layers-pass';\nimport PickLayersPass from '../passes/pick-layers-pass';\nimport {Framebuffer} from '@luma.gl/core';\n\nconst TRACE_RENDER_LAYERS = 'deckRenderer.renderLayers';\n\nexport default class DeckRenderer {\n constructor(gl) {\n this.gl = gl;\n this.layerFilter = null;\n this.drawPickingColors = false;\n this.drawLayersPass = new DrawLayersPass(gl);\n this.pickLayersPass = new PickLayersPass(gl);\n this.renderCount = 0;\n this._needsRedraw = 'Initial render';\n this.renderBuffers = [];\n this.lastPostProcessEffect = null;\n }\n\n setProps(props) {\n if ('layerFilter' in props && this.layerFilter !== props.layerFilter) {\n this.layerFilter = props.layerFilter;\n this._needsRedraw = 'layerFilter changed';\n }\n\n if ('drawPickingColors' in props && this.drawPickingColors !== props.drawPickingColors) {\n this.drawPickingColors = props.drawPickingColors;\n this._needsRedraw = 'drawPickingColors changed';\n }\n }\n\n /*\n target,\n layers,\n viewports,\n onViewportActive,\n views,\n redrawReason,\n clearCanvas,\n effects,\n pass,\n stats\n */\n renderLayers(opts) {\n const layerPass = this.drawPickingColors ? this.pickLayersPass : this.drawLayersPass;\n\n opts.layerFilter = opts.layerFilter || this.layerFilter;\n opts.effects = opts.effects || [];\n opts.target = opts.target || Framebuffer.getDefaultFramebuffer(this.gl);\n\n this._preRender(opts.effects, opts);\n\n const outputBuffer = this.lastPostProcessEffect ? this.renderBuffers[0] : opts.target;\n const renderStats = layerPass.render({...opts, target: outputBuffer});\n\n this._postRender(opts.effects, opts);\n\n this.renderCount++;\n\n debug(TRACE_RENDER_LAYERS, this, renderStats, opts);\n }\n\n needsRedraw(opts = {clearRedrawFlags: false}) {\n const redraw = this._needsRedraw;\n if (opts.clearRedrawFlags) {\n this._needsRedraw = false;\n }\n return redraw;\n }\n\n finalize() {\n const {renderBuffers} = this;\n for (const buffer of renderBuffers) {\n buffer.delete();\n }\n renderBuffers.length = 0;\n }\n\n // Private\n _preRender(effects, opts) {\n let lastPostProcessEffect = null;\n\n for (const effect of effects) {\n effect.preRender(this.gl, opts);\n if (effect.postRender) {\n lastPostProcessEffect = effect;\n }\n }\n\n if (lastPostProcessEffect) {\n this._resizeRenderBuffers();\n }\n this.lastPostProcessEffect = lastPostProcessEffect;\n }\n\n _resizeRenderBuffers() {\n const {renderBuffers} = this;\n if (renderBuffers.length === 0) {\n renderBuffers.push(new Framebuffer(this.gl), new Framebuffer(this.gl));\n }\n for (const buffer of renderBuffers) {\n buffer.resize();\n }\n }\n\n _postRender(effects, opts) {\n const {renderBuffers} = this;\n const params = {\n inputBuffer: renderBuffers[0],\n swapBuffer: renderBuffers[1],\n target: null\n };\n for (const effect of effects) {\n if (effect.postRender) {\n if (effect === this.lastPostProcessEffect) {\n params.target = opts.target;\n effect.postRender(this.gl, params);\n break;\n }\n const buffer = effect.postRender(this.gl, params);\n params.inputBuffer = buffer;\n params.swapBuffer = buffer === renderBuffers[0] ? renderBuffers[1] : renderBuffers[0];\n }\n }\n }\n}\n","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","import React from 'react';\nvar ThemeContext = React.createContext(null);\n\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\n\nexport default ThemeContext;","export default function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}","var hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport PropTypes from 'prop-types';\nimport merge from './merge'; // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n if (process.env.NODE_ENV !== 'production') {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (_typeof(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(_extends({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return merge(base, extended);\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n\nexport default breakpoints;","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nvar zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","export default 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\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}","// This function is needed in initialization stages,\n// make sure it can be imported in isolation\n\nimport isElectron from './is-electron';\n\nexport default function isBrowser() {\n // Check if in browser by duck-typing Node context\n const isNode =\n // @ts-ignore\n typeof process === 'object' && String(process) === '[object process]' && !process.browser;\n\n return !isNode || isElectron();\n}\n\n// document does not exist on worker thread\nexport function isBrowserMainThread() {\n return isBrowser() && typeof document !== 'undefined';\n}\n","// based on https://github.com/cheton/is-electron\n// https://github.com/electron/electron/issues/2288\n/* eslint-disable complexity */\nexport default function isElectron(mockUserAgent) {\n // Renderer process\n if (\n typeof window !== 'undefined' &&\n typeof window.process === 'object' &&\n // @ts-ignore\n window.process.type === 'renderer'\n ) {\n return true;\n }\n // Main process\n if (\n typeof process !== 'undefined' &&\n typeof process.versions === 'object' &&\n // @ts-ignore\n Boolean(process.versions.electron)\n ) {\n return true;\n }\n // Detect the user agent when the `nodeIntegration` option is set to true\n const realUserAgent =\n typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent;\n const userAgent = mockUserAgent || realUserAgent;\n if (userAgent && userAgent.indexOf('Electron') >= 0) {\n return true;\n }\n return false;\n}\n","import {log} from '@luma.gl/gltools';\n\n// Install stubs for removed methods\nexport function stubRemovedMethods(instance, className, version, methodNames) {\n const upgradeMessage = `See luma.gl ${version} Upgrade Guide at \\\nhttps://luma.gl/docs/upgrade-guide`;\n\n const prototype = Object.getPrototypeOf(instance);\n\n methodNames.forEach(methodName => {\n if (prototype.methodName) {\n return;\n }\n\n prototype[methodName] = () => {\n log.removed(`Calling removed method ${className}.${methodName}: `, upgradeMessage)();\n throw new Error(methodName);\n };\n });\n}\n","// Attributions\n// * Based on binary-gltf-utils under MIT license: Copyright (c) 2016-17 Karl Cheng\n\n// TODO: make these functions work for Node.js buffers?\n// Quarantine references to Buffer to prevent bundler from adding big polyfills\n// import {bufferToArrayBuffer} from '../node/buffer-to-array-buffer';\n// TODO - this should be handled in @loaders.gl/polyfills\n\n/** MIME type, width and height extracted from binary compressed image data */\nexport type BinaryImageMetadata = {\n mimeType: string;\n width: number;\n height: number;\n};\n\nconst BIG_ENDIAN = false;\nconst LITTLE_ENDIAN = true;\n\n/**\n * Extracts `{mimeType, width and height}` from a memory buffer containing a known image format\n * Currently supports `image/png`, `image/jpeg`, `image/bmp` and `image/gif`.\n * @param binaryData image file memory to parse\n * @returns metadata or null if memory is not a valid image file format layout.\n */\nexport function getBinaryImageMetadata(\n binaryData: DataView | ArrayBuffer\n): BinaryImageMetadata | null {\n const dataView = toDataView(binaryData);\n return (\n getPngMetadata(dataView) ||\n getJpegMetadata(dataView) ||\n getGifMetadata(dataView) ||\n getBmpMetadata(dataView)\n );\n}\n\n// PNG\n\nfunction getPngMetadata(binaryData) {\n const dataView = toDataView(binaryData);\n // Check file contains the first 4 bytes of the PNG signature.\n const isPng = dataView.byteLength >= 24 && dataView.getUint32(0, BIG_ENDIAN) === 0x89504e47;\n if (!isPng) {\n return null;\n }\n\n // Extract size from a binary PNG file\n return {\n mimeType: 'image/png',\n width: dataView.getUint32(16, BIG_ENDIAN),\n height: dataView.getUint32(20, BIG_ENDIAN)\n };\n}\n\n// GIF\n\n// Extract size from a binary GIF file\n// TODO: GIF is not this simple\nfunction getGifMetadata(binaryData) {\n const dataView = toDataView(binaryData);\n // Check first 4 bytes of the GIF signature (\"GIF8\").\n const isGif = dataView.byteLength >= 10 && dataView.getUint32(0, BIG_ENDIAN) === 0x47494638;\n if (!isGif) {\n return null;\n }\n\n // GIF is little endian.\n return {\n mimeType: 'image/gif',\n width: dataView.getUint16(6, LITTLE_ENDIAN),\n height: dataView.getUint16(8, LITTLE_ENDIAN)\n };\n}\n\n// BMP\n\n// TODO: BMP is not this simple\nexport function getBmpMetadata(binaryData) {\n const dataView = toDataView(binaryData);\n // Check magic number is valid (first 2 characters should be \"BM\").\n // The mandatory bitmap file header is 14 bytes long.\n const isBmp =\n dataView.byteLength >= 14 &&\n dataView.getUint16(0, BIG_ENDIAN) === 0x424d &&\n dataView.getUint32(2, LITTLE_ENDIAN) === dataView.byteLength;\n\n if (!isBmp) {\n return null;\n }\n\n // BMP is little endian.\n return {\n mimeType: 'image/bmp',\n width: dataView.getUint32(18, LITTLE_ENDIAN),\n height: dataView.getUint32(22, LITTLE_ENDIAN)\n };\n}\n\n// JPEG\n\n// Extract width and height from a binary JPEG file\nfunction getJpegMetadata(binaryData) {\n const dataView = toDataView(binaryData);\n // Check file contains the JPEG \"start of image\" (SOI) marker\n // followed by another marker.\n const isJpeg =\n dataView.byteLength >= 3 &&\n dataView.getUint16(0, BIG_ENDIAN) === 0xffd8 &&\n dataView.getUint8(2) === 0xff;\n\n if (!isJpeg) {\n return null;\n }\n\n const {tableMarkers, sofMarkers} = getJpegMarkers();\n\n // Exclude the two byte SOI marker.\n let i = 2;\n while (i + 9 < dataView.byteLength) {\n const marker = dataView.getUint16(i, BIG_ENDIAN);\n\n // The frame that contains the width and height of the JPEG image.\n if (sofMarkers.has(marker)) {\n return {\n mimeType: 'image/jpeg',\n height: dataView.getUint16(i + 5, BIG_ENDIAN), // Number of lines\n width: dataView.getUint16(i + 7, BIG_ENDIAN) // Number of pixels per line\n };\n }\n\n // Miscellaneous tables/data preceding the frame header.\n if (!tableMarkers.has(marker)) {\n return null;\n }\n\n // Length includes size of length parameter but not the two byte header.\n i += 2;\n i += dataView.getUint16(i, BIG_ENDIAN);\n }\n\n return null;\n}\n\nfunction getJpegMarkers() {\n // Tables/misc header markers.\n // DQT, DHT, DAC, DRI, COM, APP_n\n const tableMarkers = new Set([0xffdb, 0xffc4, 0xffcc, 0xffdd, 0xfffe]);\n for (let i = 0xffe0; i < 0xfff0; ++i) {\n tableMarkers.add(i);\n }\n\n // SOF markers and DHP marker.\n // These markers are after tables/misc data.\n const sofMarkers = new Set([\n 0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc5, 0xffc6, 0xffc7, 0xffc9, 0xffca, 0xffcb, 0xffcd, 0xffce,\n 0xffcf, 0xffde\n ]);\n\n return {tableMarkers, sofMarkers};\n}\n\n// TODO - move into image module?\nfunction toDataView(data) {\n if (data instanceof DataView) {\n return data;\n }\n if (ArrayBuffer.isView(data)) {\n return new DataView(data.buffer);\n }\n\n // TODO: make these functions work for Node.js buffers?\n // if (bufferToArrayBuffer) {\n // data = bufferToArrayBuffer(data);\n // }\n\n // Careful - Node Buffers will look like ArrayBuffers (keep after isBuffer)\n if (data instanceof ArrayBuffer) {\n return new DataView(data);\n }\n throw new Error('toDataView');\n}\n","export default class Pass {\n constructor(gl, props = {}) {\n const {id = 'pass'} = props;\n this.id = id; // id of this pass\n this.gl = gl;\n this.props = {...props};\n }\n\n setProps(props) {\n Object.assign(this.props, props);\n }\n\n render() {}\n\n cleanup() {}\n}\n","import LayersPass from './layers-pass';\nimport {withParameters} from '@luma.gl/core';\nimport GL from '@luma.gl/constants';\nimport log from '../utils/log';\n\nconst PICKING_PARAMETERS = {\n blendFunc: [GL.ONE, GL.ZERO, GL.CONSTANT_ALPHA, GL.ZERO],\n blendEquation: GL.FUNC_ADD\n};\n\nexport default class PickLayersPass extends LayersPass {\n render(props) {\n if (props.pickingFBO) {\n // When drawing into an off-screen buffer, use the alpha channel to encode layer index\n return this._drawPickingBuffer(props);\n }\n // When drawing to screen (debug mode), do not use the alpha channel so that result is always visible\n return super.render(props);\n }\n\n // Private\n // Draws list of layers and viewports into the picking buffer\n // Note: does not sample the buffer, that has to be done by the caller\n _drawPickingBuffer({\n layers,\n layerFilter,\n views,\n viewports,\n onViewportActive,\n pickingFBO,\n deviceRect: {x, y, width, height},\n pass = 'picking',\n redrawReason,\n pickZ\n }) {\n const gl = this.gl;\n this.pickZ = pickZ;\n\n // Track encoded layer indices\n const encodedColors = !pickZ && {\n byLayer: new Map(),\n byAlpha: []\n };\n // Temporarily store it on the instance so that it can be accessed by this.getLayerParameters\n this._colors = encodedColors;\n\n // Make sure we clear scissor test and fbo bindings in case of exceptions\n // We are only interested in one pixel, no need to render anything else\n // Note that the callback here is called synchronously.\n // Set blend mode for picking\n // always overwrite existing pixel with [r,g,b,layerIndex]\n const renderStatus = withParameters(\n gl,\n {\n scissorTest: true,\n scissor: [x, y, width, height],\n clearColor: [0, 0, 0, 0],\n // When used as Mapbox custom layer, the context state may be dirty\n // TODO - Remove when mapbox fixes this issue\n // https://github.com/mapbox/mapbox-gl-js/issues/7801\n depthMask: true,\n depthTest: true,\n depthRange: [0, 1],\n colorMask: [true, true, true, true],\n // Blending\n ...PICKING_PARAMETERS,\n blend: !pickZ\n },\n () =>\n super.render({\n target: pickingFBO,\n layers,\n layerFilter,\n views,\n viewports,\n onViewportActive,\n pass,\n redrawReason\n })\n );\n\n // Clear the temp field\n this._colors = null;\n const decodePickingColor = encodedColors && decodeColor.bind(null, encodedColors);\n return {decodePickingColor, stats: renderStatus};\n }\n\n // PRIVATE\n shouldDrawLayer(layer) {\n return layer.props.pickable;\n }\n\n getModuleParameters() {\n return {\n pickingActive: 1,\n pickingAttribute: this.pickZ,\n // turn off lighting by adding empty light source object\n // lights shader module relies on the `lightSources` to turn on/off lighting\n lightSources: {}\n };\n }\n\n getLayerParameters(layer, layerIndex, viewport) {\n const pickParameters = {...layer.props.parameters};\n\n if (this.pickZ) {\n pickParameters.blend = false;\n } else {\n Object.assign(pickParameters, PICKING_PARAMETERS);\n pickParameters.blend = true;\n pickParameters.blendColor = encodeColor(this._colors, layer, viewport);\n }\n\n return pickParameters;\n }\n}\n\n// Assign an unique alpha value for each pickable layer and track the encoding in the cache object\n// Returns normalized blend color\nfunction encodeColor(encoded, layer, viewport) {\n const {byLayer, byAlpha} = encoded;\n let a;\n\n // Encode layerIndex in the alpha channel\n // TODO - combine small layers to better utilize the picking color space\n if (byLayer.has(layer)) {\n const entry = byLayer.get(layer);\n entry.viewports.push(viewport);\n a = entry.a;\n } else {\n a = byLayer.size + 1;\n if (a <= 255) {\n const entry = {a, layer, viewports: [viewport]};\n byLayer.set(layer, entry);\n byAlpha[a] = entry;\n } else {\n log.warn('Too many pickable layers, only picking the first 255')();\n a = 0;\n }\n }\n return [0, 0, 0, a / 255];\n}\n\n// Given a picked color, retrieve the corresponding layer and viewports from cache\nfunction decodeColor(encoded, pickedColor) {\n const entry = encoded.byAlpha[pickedColor[3]];\n return (\n entry && {\n pickedLayer: entry.layer,\n pickedViewports: entry.viewports,\n pickedObjectIndex: entry.layer.decodePickingColor(pickedColor)\n }\n );\n}\n","// TinyColor v1.4.1\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\n(function(Math) {\n\nvar trimLeft = /^\\s+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n mathRound = Math.round,\n mathMin = Math.min,\n mathMax = Math.max,\n mathRandom = Math.random;\n\nfunction tinycolor (color, opts) {\n\n color = (color) ? color : '';\n opts = opts || { };\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n this._originalInput = color,\n this._r = rgb.r,\n this._g = rgb.g,\n this._b = rgb.b,\n this._a = rgb.a,\n this._roundA = mathRound(100*this._a) / 100,\n this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) { this._r = mathRound(this._r); }\n if (this._g < 1) { this._g = mathRound(this._g); }\n if (this._b < 1) { this._b = mathRound(this._b); }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n}\n\ntinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r/255;\n GsRGB = rgb.g/255;\n BsRGB = rgb.b/255;\n\n if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}\n if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}\n if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}\n return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100*this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);\n return (this._a == 1) ?\n \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" :\n \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \"+ this._roundA + \")\";\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);\n return (this._a == 1) ?\n \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" :\n \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \"+ this._roundA + \")\";\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function(allow4Char) {\n return '#' + this.toHex8(allow4Char);\n },\n toRgb: function() {\n return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };\n },\n toRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \")\" :\n \"rgba(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function() {\n return { r: mathRound(bound01(this._r, 255) * 100) + \"%\", g: mathRound(bound01(this._g, 255) * 100) + \"%\", b: mathRound(bound01(this._b, 255) * 100) + \"%\", a: this._a };\n },\n toPercentageRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%)\" :\n \"rgba(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function() {\n if (this._a === 0) {\n return \"transparent\";\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n\n return \"progid:DXImageTransform.Microsoft.gradient(\"+gradientType+\"startColorstr=\"+hex8String+\",endColorstr=\"+secondHex8String+\")\";\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n clone: function() {\n return tinycolor(this.toString());\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function(color, opts) {\n if (typeof color == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n }\n else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}\n\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// <http://www.w3.org/TR/css3-color/>\n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b){\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if(max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if(t < 0) t += 1;\n if(t > 1) t -= 1;\n if(t < 1/6) return p + (q - p) * 6 * t;\n if(t < 1/2) return q;\n if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n }\n\n if(s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if(max == min) {\n h = 0; // achromatic\n }\n else {\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a))\n ];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) { return false; }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\n\ntinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n};\n\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>\n\nfunction desaturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction saturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\n\nfunction lighten (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\nfunction brighten(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));\n return tinycolor(rgb);\n}\n\nfunction darken (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>\n\nfunction complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\n\nfunction triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})\n ];\n}\n\nfunction analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\n\nfunction monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h, s = hsv.s, v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v}));\n v = (v + modification) % 1;\n }\n\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function(color1, color2, amount) {\n amount = (amount === 0) ? 0 : (amount || 50);\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n\n var rgba = {\n r: ((rgb2.r - rgb1.r) * p) + rgb1.r,\n g: ((rgb2.g - rgb1.g) * p) + rgb1.g,\n b: ((rgb2.b - rgb1.b) * p) + rgb1.b,\n a: ((rgb2.a - rgb1.a) * p) + rgb1.a\n };\n\n return tinycolor(rgba);\n};\n\n\n// Readability Functions\n// ---------------------\n// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n\n// `contrast`\n// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\ntinycolor.readability = function(color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);\n};\n\n// `isReadable`\n// Ensure that foreground and background color combinations meet WCAG2 guidelines.\n// The third argument is an optional Object.\n// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n// If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n\n// *Example*\n// tinycolor.isReadable(\"#000\", \"#111\") => false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function(color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n\n out = false;\n\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function(baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size ;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors ;\n level = args.level;\n size = args.size;\n\n for (var i= 0; i < colorList.length ; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n\n if (tinycolor.isReadable(baseColor, bestColor, {\"level\":level,\"size\":size}) || !includeFallbackColors) {\n return bestColor;\n }\n else {\n args.includeFallbackColors=false;\n return tinycolor.mostReadable(baseColor,[\"#fff\", \"#000\"],args);\n }\n};\n\n\n// Big List of Colors\n// ------------------\n// <http://www.w3.org/TR/css3-color/#svg-color>\nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = { };\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) { n = \"100%\"; }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if ((Math.abs(n - max) < 0.000001)) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return mathMin(1, mathMax(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n}\n\nvar matchers = (function() {\n\n // <http://www.w3.org/TR/css3-values/#integers>\n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // <http://www.w3.org/TR/css3-values/#number-value>\n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n})();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n\n color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: \"name\" };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n\n return false;\n}\n\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\"level\":\"AA\", \"size\":\"small\"};\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\"level\":level, \"size\":size};\n}\n\n// Node: Export function\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports = tinycolor;\n}\n// AMD/requirejs: Define the module\nelse if (typeof define === 'function' && define.amd) {\n define(function () {return tinycolor;});\n}\n// Browser: Expose to window\nelse {\n window.tinycolor = tinycolor;\n}\n\n})(Math);\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/3ffe3a5d82f6f561b82ff78d82b32a7d14aed558/js/src/modal.js#L512-L519\nexport default function getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}","/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n * 5) Added support for injecting custom window object\n **/\nexport default function createDetectElementResize(nonce, hostWindow) {\n // Check `document` and `window` in case of server-side rendering\n var _window;\n\n if (typeof hostWindow !== 'undefined') {\n _window = hostWindow;\n } else if (typeof window !== 'undefined') {\n _window = window;\n } else if (typeof self !== 'undefined') {\n _window = self;\n } else {\n _window = global;\n }\n\n var attachEvent = typeof _window.document !== 'undefined' && _window.document.attachEvent;\n\n if (!attachEvent) {\n var requestFrame = function () {\n var raf = _window.requestAnimationFrame || _window.mozRequestAnimationFrame || _window.webkitRequestAnimationFrame || function (fn) {\n return _window.setTimeout(fn, 20);\n };\n\n return function (fn) {\n return raf(fn);\n };\n }();\n\n var cancelFrame = function () {\n var cancel = _window.cancelAnimationFrame || _window.mozCancelAnimationFrame || _window.webkitCancelAnimationFrame || _window.clearTimeout;\n return function (id) {\n return cancel(id);\n };\n }();\n\n var resetTriggers = function resetTriggers(element) {\n var triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + 'px';\n expandChild.style.height = expand.offsetHeight + 1 + 'px';\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n\n var checkTriggers = function checkTriggers(element) {\n return element.offsetWidth != element.__resizeLast__.width || element.offsetHeight != element.__resizeLast__.height;\n };\n\n var scrollListener = function scrollListener(e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (e.target.className && typeof e.target.className.indexOf === 'function' && e.target.className.indexOf('contract-trigger') < 0 && e.target.className.indexOf('expand-trigger') < 0) {\n return;\n }\n\n var element = this;\n resetTriggers(this);\n\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n\n this.__resizeRAF__ = requestFrame(function () {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n\n element.__resizeListeners__.forEach(function (fn) {\n fn.call(element, e);\n });\n }\n });\n };\n /* Detect CSS Animations support to detect element display/re-attach */\n\n\n var animation = false,\n keyframeprefix = '',\n animationstartevent = 'animationstart',\n domPrefixes = 'Webkit Moz O ms'.split(' '),\n startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),\n pfx = '';\n {\n var elm = _window.document.createElement('fakeelement');\n\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n\n if (animation === false) {\n for (var i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + 'AnimationName'] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = '-' + pfx.toLowerCase() + '-';\n animationstartevent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n var animationName = 'resizeanim';\n var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';\n var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';\n }\n\n var createStyles = function createStyles(doc) {\n if (!doc.getElementById('detectElementResize')) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n var css = (animationKeyframes ? animationKeyframes : '') + '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName('head')[0],\n style = doc.createElement('style');\n style.id = 'detectElementResize';\n style.type = 'text/css';\n\n if (nonce != null) {\n style.setAttribute('nonce', nonce);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n\n head.appendChild(style);\n }\n };\n\n var addResizeListener = function addResizeListener(element, fn) {\n if (attachEvent) {\n element.attachEvent('onresize', fn);\n } else {\n if (!element.__resizeTriggers__) {\n var doc = element.ownerDocument;\n\n var elementStyle = _window.getComputedStyle(element);\n\n if (elementStyle && elementStyle.position == 'static') {\n element.style.position = 'relative';\n }\n\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement('div')).className = 'resize-triggers';\n element.__resizeTriggers__.innerHTML = '<div class=\"expand-trigger\"><div></div></div>' + '<div class=\"contract-trigger\"></div>';\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener('scroll', scrollListener, true);\n /* Listen for a css animation to detect element display/re-attach */\n\n if (animationstartevent) {\n element.__resizeTriggers__.__animationListener__ = function animationListener(e) {\n if (e.animationName == animationName) {\n resetTriggers(element);\n }\n };\n\n element.__resizeTriggers__.addEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n }\n }\n\n element.__resizeListeners__.push(fn);\n }\n };\n\n var removeResizeListener = function removeResizeListener(element, fn) {\n if (attachEvent) {\n element.detachEvent('onresize', fn);\n } else {\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n\n if (!element.__resizeListeners__.length) {\n element.removeEventListener('scroll', scrollListener, true);\n\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(animationstartevent, element.__resizeTriggers__.__animationListener__);\n\n element.__resizeTriggers__.__animationListener__ = null;\n }\n\n try {\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\n } catch (e) {// Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n\n return {\n addResizeListener: addResizeListener,\n removeResizeListener: removeResizeListener\n };\n}","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\n\nvar TableContext = React.createContext();\n\nif (process.env.NODE_ENV !== 'production') {\n TableContext.displayName = 'TableContext';\n}\n\nexport default TableContext;","import * as React from 'react';\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar AccordionContext = React.createContext({});\n\nif (process.env.NODE_ENV !== 'production') {\n AccordionContext.displayName = 'AccordionContext';\n}\n\nexport default AccordionContext;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\"\n}), 'Add');\n\nexports.default = _default;","import { isArray, isString, isObject } from 'vega-util';\n\nvar name = \"vega-tooltip\";\nvar version$1 = \"0.27.0\";\nvar description = \"A tooltip plugin for Vega-Lite and Vega visualizations.\";\nvar keywords = [\n\t\"vega-lite\",\n\t\"vega\",\n\t\"tooltip\"\n];\nvar repository = {\n\ttype: \"git\",\n\turl: \"https://github.com/vega/vega-tooltip.git\"\n};\nvar author = {\n\tname: \"UW Interactive Data Lab\",\n\turl: \"https://idl.cs.washington.edu\"\n};\nvar collaborators = [\n\t\"Dominik Moritz\",\n\t\"Sira Horradarn\",\n\t\"Zening Qu\",\n\t\"Kanit Wongsuphasawat\",\n\t\"Yuri Astrakhan\",\n\t\"Jeffrey Heer\"\n];\nvar license = \"BSD-3-Clause\";\nvar bugs = {\n\turl: \"https://github.com/vega/vega-tooltip/issues\"\n};\nvar homepage = \"https://github.com/vega/vega-tooltip#readme\";\nvar main = \"build/vega-tooltip.js\";\nvar module = \"build/vega-tooltip.module.js\";\nvar unpkg = \"build/vega-tooltip.min.js\";\nvar jsdelivr = \"build/vega-tooltip.min.js\";\nvar types = \"build/vega-tooltip.module.d.ts\";\nvar files = [\n\t\"src\",\n\t\"build\",\n\t\"types\"\n];\nvar scripts = {\n\tprebuild: \"yarn clean && yarn build:style\",\n\tbuild: \"rollup -c\",\n\t\"build:style\": \"./build-style.sh\",\n\tclean: \"rimraf build && rimraf src/style.ts\",\n\t\"copy:data\": \"rsync -r node_modules/vega-datasets/data/* examples/data\",\n\t\"copy:build\": \"rsync -r build/* examples/build\",\n\t\"deploy:gh\": \"yarn build && yarn copy:build && gh-pages -d examples && yarn clean\",\n\tprepublishOnly: \"yarn clean && yarn build\",\n\tpreversion: \"yarn lint && yarn test\",\n\tserve: \"browser-sync start -s -f build examples --serveStatic examples\",\n\tstart: \"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'\",\n\tpretest: \"yarn build:style\",\n\ttest: \"beemo jest\",\n\t\"test:inspect\": \"node --inspect-brk ./node_modules/.bin/jest --runInBand\",\n\tprepare: \"beemo create-config && yarn copy:data\",\n\tprettierbase: \"beemo prettier '*.{css,scss,html}'\",\n\teslintbase: \"beemo eslint .\",\n\tformat: \"yarn eslintbase --fix && yarn prettierbase --write\",\n\tlint: \"yarn eslintbase && yarn prettierbase --check\",\n\trelease: \"yarn run prebuild && yarn build && auto shipit\"\n};\nvar devDependencies = {\n\t\"@auto-it/conventional-commits\": \"^10.30.0\",\n\t\"@auto-it/first-time-contributor\": \"^10.30.0\",\n\t\"@rollup/plugin-json\": \"^4.1.0\",\n\t\"@rollup/plugin-node-resolve\": \"^13.0.0\",\n\t\"@wessberg/rollup-plugin-ts\": \"^1.3.8\",\n\tauto: \"^10.30.0\",\n\t\"browser-sync\": \"^2.26.14\",\n\tconcurrently: \"^6.0.0\",\n\t\"gh-pages\": \"^3.1.0\",\n\t\"node-sass\": \"^6.0.0\",\n\tpath: \"^0.12.7\",\n\trollup: \"^2.39.1\",\n\t\"rollup-plugin-bundle-size\": \"^1.0.3\",\n\t\"rollup-plugin-terser\": \"^7.0.2\",\n\ttypescript: \"~4.3.2\",\n\t\"vega-datasets\": \"^2.2.0\",\n\t\"vega-lite-dev-config\": \"^0.18.0\",\n\t\"vega-typings\": \"^0.21.0\"\n};\nvar dependencies = {\n\t\"vega-util\": \"^1.16.0\"\n};\nvar pkg = {\n\tname: name,\n\tversion: version$1,\n\tdescription: description,\n\tkeywords: keywords,\n\trepository: repository,\n\tauthor: author,\n\tcollaborators: collaborators,\n\tlicense: license,\n\tbugs: bugs,\n\thomepage: homepage,\n\tmain: main,\n\tmodule: module,\n\tunpkg: unpkg,\n\tjsdelivr: jsdelivr,\n\ttypes: types,\n\tfiles: files,\n\tscripts: scripts,\n\tdevDependencies: devDependencies,\n\tdependencies: dependencies\n};\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\n\n/**\n * Format the value to be shown in the tooltip.\n *\n * @param value The value to show in the tooltip.\n * @param valueToHtml Function to convert a single cell value to an HTML string\n */\nfunction formatValue(value, valueToHtml, maxDepth) {\n if (isArray(value)) {\n return `[${value.map((v) => valueToHtml(isString(v) ? v : stringify(v, maxDepth))).join(', ')}]`;\n }\n if (isObject(value)) {\n let content = '';\n const _a = value, { title, image } = _a, rest = __rest(_a, [\"title\", \"image\"]);\n if (title) {\n content += `<h2>${valueToHtml(title)}</h2>`;\n }\n if (image) {\n content += `<img src=\"${valueToHtml(image)}\">`;\n }\n const keys = Object.keys(rest);\n if (keys.length > 0) {\n content += '<table>';\n for (const key of keys) {\n let val = rest[key];\n // ignore undefined properties\n if (val === undefined) {\n continue;\n }\n if (isObject(val)) {\n val = stringify(val, maxDepth);\n }\n content += `<tr><td class=\"key\">${valueToHtml(key)}:</td><td class=\"value\">${valueToHtml(val)}</td></tr>`;\n }\n content += `</table>`;\n }\n return content || '{}'; // show empty object if there are no properties\n }\n return valueToHtml(value);\n}\nfunction replacer(maxDepth) {\n const stack = [];\n return function (key, value) {\n if (typeof value !== 'object' || value === null) {\n return value;\n }\n const pos = stack.indexOf(this) + 1;\n stack.length = pos;\n if (stack.length > maxDepth) {\n return '[Object]';\n }\n if (stack.indexOf(value) >= 0) {\n return '[Circular]';\n }\n stack.push(value);\n return value;\n };\n}\n/**\n * Stringify any JS object to valid JSON\n */\nfunction stringify(obj, maxDepth) {\n return JSON.stringify(obj, replacer(maxDepth));\n}\n\n// generated with build-style.sh\nvar defaultStyle = `#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black; }\n #vg-tooltip-element.visible {\n visibility: visible; }\n #vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px; }\n #vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px; }\n #vg-tooltip-element table {\n border-spacing: 0; }\n #vg-tooltip-element table tr {\n border: none; }\n #vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px; }\n #vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px; }\n #vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left; }\n #vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white; }\n #vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf; }\n`;\n\nconst EL_ID = 'vg-tooltip-element';\nconst DEFAULT_OPTIONS = {\n /**\n * X offset.\n */\n offsetX: 10,\n /**\n * Y offset.\n */\n offsetY: 10,\n /**\n * ID of the tooltip element.\n */\n id: EL_ID,\n /**\n * ID of the tooltip CSS style.\n */\n styleId: 'vega-tooltip-style',\n /**\n * The name of the theme. You can use the CSS class called [THEME]-theme to style the tooltips.\n *\n * There are two predefined themes: \"light\" (default) and \"dark\".\n */\n theme: 'light',\n /**\n * Do not use the default styles provided by Vega Tooltip. If you enable this option, you need to use your own styles. It is not necessary to disable the default style when using a custom theme.\n */\n disableDefaultStyle: false,\n /**\n * HTML sanitizer function that removes dangerous HTML to prevent XSS.\n *\n * This should be a function from string to string. You may replace it with a formatter such as a markdown formatter.\n */\n sanitize: escapeHTML,\n /**\n * The maximum recursion depth when printing objects in the tooltip.\n */\n maxDepth: 2,\n /**\n * A function to customize the rendered HTML of the tooltip.\n * @param value A value string, or object of value strings keyed by field\n * @param sanitize The `sanitize` function from `options.sanitize`\n * @returns {string} The returned string will become the `innerHTML` of the tooltip element\n */\n formatTooltip: formatValue,\n};\n/**\n * Escape special HTML characters.\n *\n * @param value A value to convert to string and HTML-escape.\n */\nfunction escapeHTML(value) {\n return String(value).replace(/&/g, '&amp;').replace(/</g, '&lt;');\n}\nfunction createDefaultStyle(id) {\n // Just in case this id comes from a user, ensure these is no security issues\n if (!/^[A-Za-z]+[-:.\\w]*$/.test(id)) {\n throw new Error('Invalid HTML ID');\n }\n return defaultStyle.toString().replace(EL_ID, id);\n}\n\n/**\n * Position the tooltip\n *\n * @param event The mouse event.\n * @param tooltipBox\n * @param offsetX Horizontal offset.\n * @param offsetY Vertical offset.\n */\nfunction calculatePosition(event, tooltipBox, offsetX, offsetY) {\n let x = event.clientX + offsetX;\n if (x + tooltipBox.width > window.innerWidth) {\n x = +event.clientX - offsetX - tooltipBox.width;\n }\n let y = event.clientY + offsetY;\n if (y + tooltipBox.height > window.innerHeight) {\n y = +event.clientY - offsetY - tooltipBox.height;\n }\n return { x, y };\n}\n\n/**\n * The tooltip handler class.\n */\nclass Handler {\n /**\n * Create the tooltip handler and initialize the element and style.\n *\n * @param options Tooltip Options\n */\n constructor(options) {\n this.options = Object.assign(Object.assign({}, DEFAULT_OPTIONS), options);\n const elementId = this.options.id;\n this.el = null;\n // bind this to call\n this.call = this.tooltipHandler.bind(this);\n // prepend a default stylesheet for tooltips to the head\n if (!this.options.disableDefaultStyle && !document.getElementById(this.options.styleId)) {\n const style = document.createElement('style');\n style.setAttribute('id', this.options.styleId);\n style.innerHTML = createDefaultStyle(elementId);\n const head = document.head;\n if (head.childNodes.length > 0) {\n head.insertBefore(style, head.childNodes[0]);\n }\n else {\n head.appendChild(style);\n }\n }\n }\n /**\n * The tooltip handler function.\n */\n tooltipHandler(handler, event, item, value) {\n // console.log(handler, event, item, value);\n var _a;\n // append a div element that we use as a tooltip unless it already exists\n this.el = document.getElementById(this.options.id);\n if (!this.el) {\n this.el = document.createElement('div');\n this.el.setAttribute('id', this.options.id);\n this.el.classList.add('vg-tooltip');\n document.body.appendChild(this.el);\n }\n const tooltipContainer = (_a = document.fullscreenElement) !== null && _a !== void 0 ? _a : document.body;\n tooltipContainer.appendChild(this.el);\n // hide tooltip for null, undefined, or empty string values\n if (value == null || value === '') {\n this.el.classList.remove('visible', `${this.options.theme}-theme`);\n return;\n }\n // set the tooltip content\n this.el.innerHTML = this.options.formatTooltip(value, this.options.sanitize, this.options.maxDepth);\n // make the tooltip visible\n this.el.classList.add('visible', `${this.options.theme}-theme`);\n const { x, y } = calculatePosition(event, this.el.getBoundingClientRect(), this.options.offsetX, this.options.offsetY);\n this.el.setAttribute('style', `top: ${y}px; left: ${x}px`);\n }\n}\n\nconst version = pkg.version;\n/**\n * Create a tooltip handler and register it with the provided view.\n *\n * @param view The Vega view.\n * @param opt Tooltip options.\n */\nfunction index (view, opt) {\n const handler = new Handler(opt);\n view.tooltip(handler.call).run();\n return handler;\n}\n\nexport { DEFAULT_OPTIONS, Handler, calculatePosition, createDefaultStyle, index as default, escapeHTML, formatValue, replacer, stringify, version };\n","import type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {DracoParseOptions} from './lib/draco-parser';\n// import type {DracoMeshData} from './types';\nimport {VERSION} from './lib/utils/version';\n\nexport type DracoLoaderOptions = LoaderOptions & {\n draco?: DracoParseOptions & {\n decoderType?: 'wasm' | 'js';\n libraryPath?: string;\n extraAttributes?;\n attributeNameEntry?: string;\n };\n};\n\nconst DEFAULT_DRACO_OPTIONS: DracoLoaderOptions = {\n draco: {\n decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js', // 'js' for IE11\n libraryPath: 'libs/',\n extraAttributes: {},\n attributeNameEntry: undefined\n }\n};\n\n/**\n * Worker loader for Draco3D compressed geometries\n */\nexport const DracoLoader = {\n name: 'Draco',\n id: 'draco',\n module: 'draco',\n version: VERSION,\n worker: true,\n extensions: ['drc'],\n mimeTypes: ['application/octet-stream'],\n binary: true,\n tests: ['DRACO'],\n options: DEFAULT_DRACO_OPTIONS\n};\n\nexport const _TypecheckDracoLoader: Loader = DracoLoader;\n","// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n","// Mesh category utilities\n// TODO - move to mesh category module, or to math.gl/geometry module\nimport {TypedArray} from '../../types';\n\ntype Attribute = {\n size?: number;\n type?: number;\n normalized?: boolean;\n value: TypedArray;\n};\n\ntype TypedArrays = {[key: string]: TypedArray};\nexport type Attributes = {[key: string]: Attribute};\n\n/**\n * Holds an axis aligned bounding box\n * TODO - make sure AxisAlignedBoundingBox in math.gl/culling understands this format (or change this format)\n */\ntype BoundingBox = [[number, number, number], [number, number, number]];\n\n/**\n * Get number of vertices in mesh\n * @param attributes\n */\nexport function getMeshSize(attributes: TypedArrays): number {\n let size = 0;\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n if (ArrayBuffer.isView(attribute)) {\n // @ts-ignore DataView doesn't have BYTES_PER_ELEMENT\n size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;\n }\n }\n return size;\n}\n\n/**\n * Get the (axis aligned) bounding box of a mesh\n * @param attributes\n * @returns array of two vectors representing the axis aligned bounding box\n */\n// eslint-disable-next-line complexity\nexport function getMeshBoundingBox(attributes: Attributes): BoundingBox {\n let minX = Infinity;\n let minY = Infinity;\n let minZ = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n let maxZ = -Infinity;\n\n const positions = attributes.POSITION ? attributes.POSITION.value : [];\n const len = positions && positions.length;\n\n for (let i = 0; i < len; i += 3) {\n const x = positions[i];\n const y = positions[i + 1];\n const z = positions[i + 2];\n\n minX = x < minX ? x : minX;\n minY = y < minY ? y : minY;\n minZ = z < minZ ? z : minZ;\n\n maxX = x > maxX ? x : maxX;\n maxY = y > maxY ? y : maxY;\n maxZ = z > maxZ ? z : maxZ;\n }\n return [\n [minX, minY, minZ],\n [maxX, maxY, maxZ]\n ];\n}\n","import {assert} from '../../utils/assert';\nimport Field from './field';\n\nexport type SchemaMetadata = Map<string, any>;\n\n/**\n * ArrowJS `Schema` API-compatible class for row-based tables (returned from `DataTable`)\n * https://loaders.gl/arrowjs/docs/api-reference/schema\n */\nexport default class Schema {\n fields: Field[];\n // TODO - Arrow just allows Map<string, string>\n metadata: SchemaMetadata;\n\n constructor(fields: Field[], metadata?: SchemaMetadata) {\n assert(Array.isArray(fields));\n checkNames(fields);\n // For kepler fields, create arrow compatible `Fields` that have kepler fields as `metadata`\n this.fields = fields;\n this.metadata = metadata || new Map();\n }\n\n // TODO - arrow only seems to compare fields, not metadata\n compareTo(other: Schema): boolean {\n if (this.metadata !== other.metadata) {\n return false;\n }\n if (this.fields.length !== other.fields.length) {\n return false;\n }\n for (let i = 0; i < this.fields.length; ++i) {\n if (!this.fields[i].compareTo(other.fields[i])) {\n return false;\n }\n }\n return true;\n }\n\n select(...columnNames: string[]): Schema {\n // Ensure column names reference valid fields\n const nameMap = Object.create(null);\n for (const name of columnNames) {\n nameMap[name] = true;\n }\n const selectedFields = this.fields.filter((field) => nameMap[field.name]);\n return new Schema(selectedFields, this.metadata);\n }\n\n selectAt(...columnIndices: number[]): Schema {\n // Ensure column indices reference valid fields\n const selectedFields = columnIndices.map((index) => this.fields[index]).filter(Boolean);\n return new Schema(selectedFields, this.metadata);\n }\n\n assign(schemaOrFields: Schema | Field[]): Schema {\n let fields: Field[];\n let metadata: SchemaMetadata = this.metadata;\n\n if (schemaOrFields instanceof Schema) {\n const otherSchema = schemaOrFields;\n fields = otherSchema.fields;\n metadata = mergeMaps(mergeMaps(new Map(), this.metadata), otherSchema.metadata);\n } else {\n fields = schemaOrFields;\n }\n\n // Create a merged list of fields, overwrite fields in place, new fields at end\n const fieldMap: {[key: string]: Field} = Object.create(null);\n\n for (const field of this.fields) {\n fieldMap[field.name] = field;\n }\n\n for (const field of fields) {\n fieldMap[field.name] = field;\n }\n\n const mergedFields = Object.values(fieldMap);\n\n return new Schema(mergedFields, metadata);\n }\n}\n\n// Warn if any duplicated field names\nfunction checkNames(fields) {\n const usedNames = {};\n for (const field of fields) {\n if (usedNames[field.name]) {\n // eslint-disable-next-line\n console.warn('Schema: duplicated field name', field.name, field);\n }\n usedNames[field.name] = true;\n }\n}\n\nfunction mergeMaps<T>(m1: T, m2: T): T {\n // @ts-ignore\n return new Map([...(m1 || new Map()), ...(m2 || new Map())]);\n}\n","// Replacement for the external assert method to reduce bundle size\n// Note: We don't use the second \"message\" argument in calling code,\n// so no need to support it here\nexport function assert(condition: boolean, message?: string) {\n if (!condition) {\n throw new Error(message || 'loader assertion failed.');\n }\n}\n","// This code is adapted from ArrowJS https://github.com/apache/arrow\n// under Apache license http://www.apache.org/licenses/LICENSE-2.0\n\n/**\n * Main data type enumeration.\n *\n * Data types in this library are all *logical*. They can be expressed as\n * either a primitive physical type (bytes or bits of some fixed size), a\n * nested type consisting of other data types, or another data type (e.g. a\n * timestamp encoded as an int64).\n *\n * **Note**: Only enum values 0-17 (NONE through Map) are written to an Arrow\n * IPC payload.\n *\n * The rest of the values are specified here so TypeScript can narrow the type\n * signatures further beyond the base Arrow Types. The Arrow DataTypes include\n * metadata like `bitWidth` that impact the type signatures of the values we\n * accept and return.\n *\n * For example, the `Int8Vector` reads 1-byte numbers from an `Int8Array`, an\n * `Int32Vector` reads a 4-byte number from an `Int32Array`, and an `Int64Vector`\n * reads a pair of 4-byte lo, hi 32-bit integers as a zero-copy slice from the\n * underlying `Int32Array`.\n *\n * Library consumers benefit by knowing the narrowest type, since we can ensure\n * the types across all public methods are propagated, and never bail to `any`.\n * These values are _never_ used at runtime, and they will _never_ be written\n * to the flatbuffers metadata of serialized Arrow IPC payloads.\n */\nexport enum Type {\n /** The default placeholder type */\n NONE = 0,\n /** A NULL type having no physical storage */\n Null = 1,\n /** Signed or unsigned 8, 16, 32, or 64-bit little-endian integer */\n Int = 2,\n /** 2, 4, or 8-byte floating point value */\n Float = 3,\n /** Variable-length bytes (no guarantee of UTF8-ness) */\n Binary = 4,\n /** UTF8 variable-length string as List<Char> */\n Utf8 = 5,\n /** Boolean as 1 bit, LSB bit-packed ordering */\n Bool = 6,\n /** Precision-and-scale-based decimal type. Storage type depends on the parameters. */\n Decimal = 7,\n /** int32_t days or int64_t milliseconds since the UNIX epoch */\n Date = 8,\n /** Time as signed 32 or 64-bit integer, representing either seconds, milliseconds, microseconds, or nanoseconds since midnight since midnight */\n Time = 9,\n /** Exact timestamp encoded with int64 since UNIX epoch (Default unit millisecond) */\n Timestamp = 10,\n /** YEAR_MONTH or DAY_TIME interval in SQL style */\n Interval = 11,\n /** A list of some logical data type */\n List = 12,\n /** Struct of logical types */\n Struct = 13,\n /** Union of logical types */\n Union = 14,\n /** Fixed-size binary. Each value occupies the same number of bytes */\n FixedSizeBinary = 15,\n /** Fixed-size list. Each value occupies the same number of bytes */\n FixedSizeList = 16,\n /** Map of named logical types */\n Map = 17,\n\n /** Dictionary aka Category type */\n Dictionary = -1,\n Int8 = -2,\n Int16 = -3,\n Int32 = -4,\n Int64 = -5,\n Uint8 = -6,\n Uint16 = -7,\n Uint32 = -8,\n Uint64 = -9,\n Float16 = -10,\n Float32 = -11,\n Float64 = -12,\n DateDay = -13,\n DateMillisecond = -14,\n TimestampSecond = -15,\n TimestampMillisecond = -16,\n TimestampMicrosecond = -17,\n TimestampNanosecond = -18,\n TimeSecond = -19,\n TimeMillisecond = -20,\n TimeMicrosecond = -21,\n TimeNanosecond = -22,\n DenseUnion = -23,\n SparseUnion = -24,\n IntervalDayTime = -25,\n IntervalYearMonth = -26\n}\n","// This code is adapted from ArrowJS https://github.com/apache/arrow\n// under Apache license http://www.apache.org/licenses/LICENSE-2.0\n\nimport {Type} from './enum';\n\nimport Field from './field';\n\nexport {Type} from './enum';\n\nexport type TypedIntArray =\n | Int8Array\n | Uint8Array\n | Int16Array\n | Uint16Array\n | Int32Array\n | Uint32Array\n | Int32Array\n | Uint32Array\n | Uint8ClampedArray;\n\nexport type TypedFloatArray = Float32Array | Float64Array;\n\nexport type TypedArray = TypedIntArray | TypedFloatArray;\n\nexport type AnyArrayType = Array<any> | TypedIntArray | TypedFloatArray;\n\nexport class DataType {\n static isNull(x: any): boolean {\n return x && x.typeId === Type.Null;\n }\n static isInt(x: any): boolean {\n return x && x.typeId === Type.Int;\n }\n static isFloat(x: any): boolean {\n return x && x.typeId === Type.Float;\n }\n static isBinary(x: any): boolean {\n return x && x.typeId === Type.Binary;\n }\n static isUtf8(x: any): boolean {\n return x && x.typeId === Type.Utf8;\n }\n static isBool(x: any): boolean {\n return x && x.typeId === Type.Bool;\n }\n static isDecimal(x: any): boolean {\n return x && x.typeId === Type.Decimal;\n }\n static isDate(x: any): boolean {\n return x && x.typeId === Type.Date;\n }\n static isTime(x: any): boolean {\n return x && x.typeId === Type.Time;\n }\n static isTimestamp(x: any): boolean {\n return x && x.typeId === Type.Timestamp;\n }\n static isInterval(x: any): boolean {\n return x && x.typeId === Type.Interval;\n }\n static isList(x: any): boolean {\n return x && x.typeId === Type.List;\n }\n static isStruct(x: any): boolean {\n return x && x.typeId === Type.Struct;\n }\n static isUnion(x: any): boolean {\n return x && x.typeId === Type.Union;\n }\n static isFixedSizeBinary(x: any): boolean {\n return x && x.typeId === Type.FixedSizeBinary;\n }\n static isFixedSizeList(x: any): boolean {\n return x && x.typeId === Type.FixedSizeList;\n }\n static isMap(x: any): boolean {\n return x && x.typeId === Type.Map;\n }\n static isDictionary(x: any): boolean {\n return x && x.typeId === Type.Dictionary;\n }\n\n get typeId(): Type {\n return Type.NONE;\n }\n\n // get ArrayType(): AnyArrayType {\n // return Int8Array;\n // }\n\n // get ArrayType() { return Array; }\n compareTo(other: DataType): boolean {\n // TODO\n return this === other; // comparer.visit(this, other);\n }\n}\n\n// NULL\n\nexport class Null extends DataType {\n get typeId(): Type {\n return Type.Null;\n }\n get [Symbol.toStringTag](): string {\n return 'Null';\n }\n toString(): string {\n return 'Null';\n }\n}\n\n// BOOLEANS\n\nexport class Bool extends DataType {\n get typeId(): Type {\n return Type.Bool;\n }\n // get ArrayType() {\n // return Uint8Array;\n // }\n get [Symbol.toStringTag](): string {\n return 'Bool';\n }\n toString(): string {\n return 'Bool';\n }\n}\n\n// INTS\n\nexport class Int extends DataType {\n readonly isSigned: boolean;\n readonly bitWidth: number;\n constructor(isSigned, bitWidth) {\n super();\n this.isSigned = isSigned;\n this.bitWidth = bitWidth;\n }\n get typeId(): Type {\n return Type.Int;\n }\n // get ArrayType() {\n // switch (this.bitWidth) {\n // case 8:\n // return this.isSigned ? Int8Array : Uint8Array;\n // case 16:\n // return this.isSigned ? Int16Array : Uint16Array;\n // case 32:\n // return this.isSigned ? Int32Array : Uint32Array;\n // case 64:\n // return this.isSigned ? Int32Array : Uint32Array;\n // default:\n // throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n // }\n // }\n get [Symbol.toStringTag](): string {\n return 'Int';\n }\n toString(): string {\n return `${this.isSigned ? 'I' : 'Ui'}nt${this.bitWidth}`;\n }\n}\n\nexport class Int8 extends Int {\n constructor() {\n super(true, 8);\n }\n}\nexport class Int16 extends Int {\n constructor() {\n super(true, 16);\n }\n}\nexport class Int32 extends Int {\n constructor() {\n super(true, 32);\n }\n}\nexport class Int64 extends Int {\n constructor() {\n super(true, 64);\n }\n}\nexport class Uint8 extends Int {\n constructor() {\n super(false, 8);\n }\n}\nexport class Uint16 extends Int {\n constructor() {\n super(false, 16);\n }\n}\nexport class Uint32 extends Int {\n constructor() {\n super(false, 32);\n }\n}\nexport class Uint64 extends Int {\n constructor() {\n super(false, 64);\n }\n}\n\n// FLOATS\n\nconst Precision = {\n HALF: 16,\n SINGLE: 32,\n DOUBLE: 64\n};\n\nexport class Float extends DataType {\n readonly precision: number;\n constructor(precision) {\n super();\n this.precision = precision;\n }\n get typeId(): Type {\n return Type.Float;\n }\n // get ArrayType() {\n // switch (this.precision) {\n // case Precision.HALF:\n // return Uint16Array;\n // case Precision.SINGLE:\n // return Float32Array;\n // case Precision.DOUBLE:\n // return Float64Array;\n // default:\n // throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`);\n // }\n // }\n get [Symbol.toStringTag](): string {\n return 'Float';\n }\n toString(): string {\n return `Float${this.precision}`;\n }\n}\n\nexport class Float16 extends Float {\n constructor() {\n super(Precision.HALF);\n }\n}\nexport class Float32 extends Float {\n constructor() {\n super(Precision.SINGLE);\n }\n}\nexport class Float64 extends Float {\n constructor() {\n super(Precision.DOUBLE);\n }\n}\n\nexport class Binary extends DataType {\n constructor() {\n super();\n }\n get typeId() {\n return Type.Binary;\n }\n toString() {\n return 'Binary';\n }\n get [Symbol.toStringTag]() {\n return 'Binary';\n }\n}\n\n// STRINGS\n\nexport class Utf8 extends DataType {\n get typeId(): Type {\n return Type.Utf8;\n }\n // get ArrayType() {\n // return Uint8Array;\n // }\n get [Symbol.toStringTag](): string {\n return 'Utf8';\n }\n toString(): string {\n return 'Utf8';\n }\n}\n\n// DATES, TIMES AND INTERVALS\n\nconst DateUnit = {\n DAY: 0,\n MILLISECOND: 1\n};\n\nexport class Date extends DataType {\n readonly unit: number;\n constructor(unit) {\n super();\n this.unit = unit;\n }\n get typeId(): Type {\n return Type.Date;\n }\n // get ArrayType() {\n // return Int32Array;\n // }\n get [Symbol.toStringTag](): string {\n return 'Date';\n }\n toString(): string {\n return `Date${(this.unit + 1) * 32}<${DateUnit[this.unit]}>`;\n }\n}\n\nexport class DateDay extends Date {\n constructor() {\n super(DateUnit.DAY);\n }\n}\nexport class DateMillisecond extends Date {\n constructor() {\n super(DateUnit.MILLISECOND);\n }\n}\n\nconst TimeUnit = {\n SECOND: 1,\n MILLISECOND: 1e3,\n MICROSECOND: 1e6,\n NANOSECOND: 1e9\n};\n\nexport class Time extends DataType {\n readonly unit: number;\n readonly bitWidth: number;\n\n constructor(unit, bitWidth) {\n super();\n this.unit = unit;\n this.bitWidth = bitWidth;\n }\n get typeId(): Type {\n return Type.Time;\n }\n toString(): string {\n return `Time${this.bitWidth}<${TimeUnit[this.unit]}>`;\n }\n get [Symbol.toStringTag](): string {\n return 'Time';\n }\n // get ArrayType() {\n // return Int32Array;\n // }\n}\n\nexport class TimeSecond extends Time {\n constructor() {\n super(TimeUnit.SECOND, 32);\n }\n}\nexport class TimeMillisecond extends Time {\n constructor() {\n super(TimeUnit.MILLISECOND, 32);\n }\n}\n// export class TimeMicrosecond extends Time { constructor() { super(TimeUnit.MICROSECOND, 64); } }\n// export class TimeNanosecond extends Time { constructor() { super(TimeUnit.NANOSECOND, 64); } }\n\nexport class Timestamp extends DataType {\n readonly unit: any;\n readonly timezone: any;\n\n constructor(unit: any, timezone = null) {\n super();\n this.unit = unit;\n this.timezone = timezone;\n }\n get typeId(): Type {\n return Type.Timestamp;\n }\n // get ArrayType() {\n // return Int32Array;\n // }\n get [Symbol.toStringTag](): string {\n return 'Timestamp';\n }\n toString(): string {\n return `Timestamp<${TimeUnit[this.unit]}${this.timezone ? `, ${this.timezone}` : ''}>`;\n }\n}\n\nexport class TimestampSecond extends Timestamp {\n constructor(timezone = null) {\n super(TimeUnit.SECOND, timezone);\n }\n}\nexport class TimestampMillisecond extends Timestamp {\n constructor(timezone = null) {\n super(TimeUnit.MILLISECOND, timezone);\n }\n}\nexport class TimestampMicrosecond extends Timestamp {\n constructor(timezone = null) {\n super(TimeUnit.MICROSECOND, timezone);\n }\n}\nexport class TimestampNanosecond extends Timestamp {\n constructor(timezone = null) {\n super(TimeUnit.NANOSECOND, timezone);\n }\n}\n\nconst IntervalUnit = {\n DAY_TIME: 0,\n YEAR_MONTH: 1\n};\n\nexport class Interval extends DataType {\n readonly unit: number;\n constructor(unit: number) {\n super();\n this.unit = unit;\n }\n get typeId(): Type {\n return Type.Interval;\n }\n // get ArrayType() {\n // return Int32Array;\n // }\n get [Symbol.toStringTag](): string {\n return 'Interval';\n }\n toString(): string {\n return `Interval<${IntervalUnit[this.unit]}>`;\n }\n}\n\nexport class IntervalDayTime extends Interval {\n constructor() {\n super(IntervalUnit.DAY_TIME);\n }\n}\nexport class IntervalYearMonth extends Interval {\n constructor() {\n super(IntervalUnit.YEAR_MONTH);\n }\n}\n\nexport class FixedSizeList extends DataType {\n readonly listSize: number;\n readonly children: Field[];\n\n constructor(listSize: number, child: Field) {\n super();\n this.listSize = listSize;\n this.children = [child];\n }\n get typeId(): Type {\n return Type.FixedSizeList;\n }\n get valueType() {\n return this.children[0].type;\n }\n get valueField() {\n return this.children[0];\n }\n // get ArrayType() {\n // return this.valueType.ArrayType;\n // }\n get [Symbol.toStringTag](): string {\n return 'FixedSizeList';\n }\n toString(): string {\n return `FixedSizeList[${this.listSize}]<${this.valueType}>`;\n }\n}\n","import {DataType} from './type';\n\n/**\n * ArrowJS `Field` API-compatible class for row-based tables\n * https://loaders.gl/arrowjs/docs/api-reference/field\n * A field holds name, nullable, and metadata information about a table \"column\"\n * A Schema is essentially a list of fields\n */\nexport default class Field {\n name: string;\n type: DataType;\n nullable: boolean;\n metadata: Map<string, string>;\n\n constructor(\n name: string,\n type: DataType,\n nullable = false,\n metadata: Map<string, string> = new Map()\n ) {\n this.name = name;\n this.type = type;\n this.nullable = nullable;\n this.metadata = metadata;\n }\n\n get typeId(): number {\n return this.type && this.type.typeId;\n }\n\n clone(): Field {\n return new Field(this.name, this.type, this.nullable, this.metadata);\n }\n\n compareTo(other: this): boolean {\n return (\n this.name === other.name &&\n this.type === other.type &&\n this.nullable === other.nullable &&\n this.metadata === other.metadata\n );\n }\n\n toString(): string {\n return `${this.type}${this.nullable ? ', nullable' : ''}${\n this.metadata ? `, metadata: ${this.metadata}` : ''\n }`;\n }\n}\n","import {Schema, Field, FixedSizeList, getArrowTypeFromTypedArray} from '@loaders.gl/schema';\n\nimport {MeshAttribute, DracoAttribute, DracoLoaderData, DracoMetadataEntry} from '../draco-types';\n\nexport function makeSchemaFromAttributes(\n attributes: {[attributeName: string]: MeshAttribute},\n loaderData: DracoLoaderData,\n indices?: MeshAttribute\n): Schema {\n const metadataMap = makeMetadata(loaderData.metadata);\n const fields: Field[] = [];\n const namedLoaderDataAttributes = transformAttributesLoaderData(loaderData.attributes);\n for (const attributeName in attributes) {\n const attribute = attributes[attributeName];\n const field = getArrowFieldFromAttribute(\n attributeName,\n attribute,\n namedLoaderDataAttributes[attributeName]\n );\n fields.push(field);\n }\n if (indices) {\n const indicesField = getArrowFieldFromAttribute('indices', indices);\n fields.push(indicesField);\n }\n return new Schema(fields, metadataMap);\n}\n\nfunction transformAttributesLoaderData(loaderData: {[key: number]: DracoAttribute}): {\n [attributeName: string]: DracoAttribute;\n} {\n const result: {[attributeName: string]: DracoAttribute} = {};\n for (const key in loaderData) {\n const dracoAttribute = loaderData[key];\n result[dracoAttribute.name || 'undefined'] = dracoAttribute;\n }\n return result;\n}\n\nfunction getArrowFieldFromAttribute(\n attributeName: string,\n attribute: MeshAttribute,\n loaderData?: DracoAttribute\n): Field {\n const metadataMap = loaderData ? makeMetadata(loaderData.metadata) : undefined;\n const type = getArrowTypeFromTypedArray(attribute.value);\n return new Field(\n attributeName,\n new FixedSizeList(attribute.size, new Field('value', type)),\n false,\n metadataMap\n );\n}\n\nfunction makeMetadata(metadata: {[key: string]: DracoMetadataEntry}): Map<string, string> {\n const metadataMap = new Map();\n for (const key in metadata) {\n metadataMap.set(`${key}.string`, JSON.stringify(metadata[key]));\n }\n\n return metadataMap;\n}\n","import type {TypedArray} from '../../types';\nimport {DataType, Float32, Float64, Int16, Int32, Int8, Uint16, Uint32, Uint8} from '../schema';\n\nexport function getArrowTypeFromTypedArray(array: TypedArray): DataType {\n switch (array.constructor) {\n case Int8Array:\n return new Int8();\n case Uint8Array:\n return new Uint8();\n case Int16Array:\n return new Int16();\n case Uint16Array:\n return new Uint16();\n case Int32Array:\n return new Int32();\n case Uint32Array:\n return new Uint32();\n case Float32Array:\n return new Float32();\n case Float64Array:\n return new Float64();\n default:\n throw new Error('array type not supported');\n }\n}\n","/* eslint-disable camelcase */\n\n// Draco types (input)\nimport type {\n Draco3D,\n Decoder,\n Mesh,\n PointCloud,\n PointAttribute,\n Metadata,\n MetadataQuerier,\n DracoInt32Array,\n draco_DataType\n} from '../draco3d/draco3d-types';\n\n// Parsed data types (output)\nimport type {\n TypedArray,\n // standard mesh output data\n MeshData,\n MeshAttribute,\n // standard mesh with draco metadata\n DracoMeshData,\n DracoLoaderData,\n DracoAttribute,\n DracoMetadataEntry,\n DracoQuantizationTransform,\n DracoOctahedronTransform\n} from './draco-types';\n\nimport {getMeshBoundingBox} from '@loaders.gl/schema';\nimport {makeSchemaFromAttributes} from './utils/schema-attribute-utils';\n\n/**\n * @param topology - How triangle indices should be generated (mesh only)\n * @param attributeNameEntry\n * @param extraAttributes\n * @param quantizedAttributes\n * @param octahedronAttributes\n */\nexport type DracoParseOptions = {\n topology?: 'triangle-list' | 'triangle-strip';\n attributeNameEntry?: string;\n extraAttributes?: {[uniqueId: string]: number};\n quantizedAttributes?: ('POSITION' | 'NORMAL' | 'COLOR' | 'TEX_COORD' | 'GENERIC')[];\n octahedronAttributes?: ('POSITION' | 'NORMAL' | 'COLOR' | 'TEX_COORD' | 'GENERIC')[];\n};\n\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst GEOMETRY_TYPE = {\n TRIANGULAR_MESH: 0,\n POINT_CLOUD: 1\n};\n\n// Native Draco attribute names to GLTF attribute names.\nconst DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP = {\n POSITION: 'POSITION',\n NORMAL: 'NORMAL',\n COLOR: 'COLOR_0',\n TEX_COORD: 'TEXCOORD_0'\n};\n\nconst DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP = {\n 1: Int8Array,\n 2: Uint8Array,\n 3: Int16Array,\n 4: Uint16Array,\n 5: Int32Array,\n 6: Uint32Array,\n 9: Float32Array\n};\n\nconst INDEX_ITEM_SIZE = 4;\n\nexport default class DracoParser {\n draco: Draco3D;\n decoder: Decoder;\n metadataQuerier: MetadataQuerier;\n\n // draco - the draco decoder, either import `draco3d` or load dynamically\n constructor(draco: Draco3D) {\n this.draco = draco;\n this.decoder = new this.draco.Decoder();\n this.metadataQuerier = new this.draco.MetadataQuerier();\n }\n\n /**\n * Destroy draco resources\n */\n destroy(): void {\n this.draco.destroy(this.decoder);\n this.draco.destroy(this.metadataQuerier);\n }\n\n /**\n * NOTE: caller must call `destroyGeometry` on the return value after using it\n * @param arrayBuffer\n * @param options\n */\n parseSync(arrayBuffer: ArrayBuffer, options: DracoParseOptions = {}): DracoMeshData {\n const buffer = new this.draco.DecoderBuffer();\n buffer.Init(new Int8Array(arrayBuffer), arrayBuffer.byteLength);\n\n this._disableAttributeTransforms(options);\n\n const geometry_type = this.decoder.GetEncodedGeometryType(buffer);\n const dracoGeometry =\n geometry_type === this.draco.TRIANGULAR_MESH\n ? new this.draco.Mesh()\n : new this.draco.PointCloud();\n\n try {\n let dracoStatus;\n switch (geometry_type) {\n case this.draco.TRIANGULAR_MESH:\n dracoStatus = this.decoder.DecodeBufferToMesh(buffer, dracoGeometry as Mesh);\n break;\n\n case this.draco.POINT_CLOUD:\n dracoStatus = this.decoder.DecodeBufferToPointCloud(buffer, dracoGeometry);\n break;\n\n default:\n throw new Error('DRACO: Unknown geometry type.');\n }\n\n if (!dracoStatus.ok() || !dracoGeometry.ptr) {\n const message = `DRACO decompression failed: ${dracoStatus.error_msg()}`;\n // console.error(message);\n throw new Error(message);\n }\n\n const loaderData = this._getDracoLoaderData(dracoGeometry, geometry_type, options);\n\n const geometry = this._getMeshData(dracoGeometry, loaderData, options);\n\n const boundingBox = getMeshBoundingBox(geometry.attributes);\n\n const schema = makeSchemaFromAttributes(geometry.attributes, loaderData, geometry.indices);\n\n const data: DracoMeshData = {\n loader: 'draco',\n loaderData,\n header: {\n vertexCount: dracoGeometry.num_points(),\n boundingBox\n },\n ...geometry,\n schema\n };\n return data;\n } finally {\n this.draco.destroy(buffer);\n if (dracoGeometry) {\n this.draco.destroy(dracoGeometry);\n }\n }\n }\n\n // Draco specific \"loader data\"\n\n /**\n * Extract\n * @param dracoGeometry\n * @param geometry_type\n * @param options\n * @returns\n */\n _getDracoLoaderData(\n dracoGeometry: Mesh | PointCloud,\n geometry_type,\n options: DracoParseOptions\n ): DracoLoaderData {\n const metadata = this._getTopLevelMetadata(dracoGeometry);\n const attributes = this._getDracoAttributes(dracoGeometry, options);\n\n return {\n geometry_type,\n num_attributes: dracoGeometry.num_attributes(),\n num_points: dracoGeometry.num_points(),\n num_faces: dracoGeometry instanceof this.draco.Mesh ? dracoGeometry.num_faces() : 0,\n metadata,\n attributes\n };\n }\n\n /**\n * Extract all draco provided information and metadata for each attribute\n * @param dracoGeometry\n * @param options\n * @returns\n */\n _getDracoAttributes(\n dracoGeometry: Mesh | PointCloud,\n options: DracoParseOptions\n ): {[unique_id: number]: DracoAttribute} {\n const dracoAttributes: {[unique_id: number]: DracoAttribute} = {};\n\n for (let attributeId = 0; attributeId < dracoGeometry.num_attributes(); attributeId++) {\n // Note: Draco docs do not seem clear on `GetAttribute` ids just being a zero-based index,\n // but it does seems to work this way\n const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attributeId);\n\n const metadata = this._getAttributeMetadata(dracoGeometry, attributeId);\n\n dracoAttributes[dracoAttribute.unique_id()] = {\n unique_id: dracoAttribute.unique_id(),\n attribute_type: dracoAttribute.attribute_type(),\n data_type: dracoAttribute.data_type(),\n num_components: dracoAttribute.num_components(),\n\n byte_offset: dracoAttribute.byte_offset(),\n byte_stride: dracoAttribute.byte_stride(),\n normalized: dracoAttribute.normalized(),\n attribute_index: attributeId,\n\n metadata\n };\n\n // Add transformation parameters for any attributes app wants untransformed\n const quantization = this._getQuantizationTransform(dracoAttribute, options);\n if (quantization) {\n dracoAttributes[dracoAttribute.unique_id()].quantization_transform = quantization;\n }\n\n const octahedron = this._getOctahedronTransform(dracoAttribute, options);\n if (octahedron) {\n dracoAttributes[dracoAttribute.unique_id()].octahedron_transform = octahedron;\n }\n }\n\n return dracoAttributes;\n }\n\n /**\n * Get standard loaders.gl mesh category data\n * Extracts the geometry from draco\n * @param dracoGeometry\n * @param options\n */\n _getMeshData(\n dracoGeometry: Mesh | PointCloud,\n loaderData: DracoLoaderData,\n options: DracoParseOptions\n ): MeshData {\n const attributes = this._getMeshAttributes(loaderData, dracoGeometry, options);\n\n const positionAttribute = attributes.POSITION;\n if (!positionAttribute) {\n throw new Error('DRACO: No position attribute found.');\n }\n\n // For meshes, we need indices to define the faces.\n if (dracoGeometry instanceof this.draco.Mesh) {\n switch (options.topology) {\n case 'triangle-strip':\n return {\n topology: 'triangle-strip',\n mode: 4, // GL.TRIANGLES\n attributes,\n indices: {\n value: this._getTriangleStripIndices(dracoGeometry),\n size: 1\n }\n };\n case 'triangle-list':\n default:\n return {\n topology: 'triangle-list',\n mode: 5, // GL.TRIANGLE_STRIP\n attributes,\n indices: {\n value: this._getTriangleListIndices(dracoGeometry),\n size: 1\n }\n };\n }\n }\n\n // PointCloud - must come last as Mesh inherits from PointCloud\n return {\n topology: 'point-list',\n mode: 0, // GL.POINTS\n attributes\n };\n }\n\n _getMeshAttributes(\n loaderData: DracoLoaderData,\n dracoGeometry: Mesh | PointCloud,\n options: DracoParseOptions\n ): {[attributeName: string]: MeshAttribute} {\n const attributes: {[key: string]: MeshAttribute} = {};\n\n for (const loaderAttribute of Object.values(loaderData.attributes)) {\n const attributeName = this._deduceAttributeName(loaderAttribute, options);\n loaderAttribute.name = attributeName;\n const {value, size} = this._getAttributeValues(dracoGeometry, loaderAttribute);\n attributes[attributeName] = {\n value,\n size,\n byteOffset: loaderAttribute.byte_offset,\n byteStride: loaderAttribute.byte_stride,\n normalized: loaderAttribute.normalized\n };\n }\n\n return attributes;\n }\n\n // MESH INDICES EXTRACTION\n\n /**\n * For meshes, we need indices to define the faces.\n * @param dracoGeometry\n */\n _getTriangleListIndices(dracoGeometry: Mesh) {\n // Example on how to retrieve mesh and attributes.\n const numFaces = dracoGeometry.num_faces();\n const numIndices = numFaces * 3;\n const byteLength = numIndices * INDEX_ITEM_SIZE;\n\n const ptr = this.draco._malloc(byteLength);\n try {\n this.decoder.GetTrianglesUInt32Array(dracoGeometry, byteLength, ptr);\n return new Uint32Array(this.draco.HEAPF32.buffer, ptr, numIndices).slice();\n } finally {\n this.draco._free(ptr);\n }\n }\n\n /**\n * For meshes, we need indices to define the faces.\n * @param dracoGeometry\n */\n _getTriangleStripIndices(dracoGeometry: Mesh) {\n const dracoArray = new this.draco.DracoInt32Array();\n try {\n /* const numStrips = */ this.decoder.GetTriangleStripsFromMesh(dracoGeometry, dracoArray);\n return getUint32Array(dracoArray);\n } finally {\n this.draco.destroy(dracoArray);\n }\n }\n\n /**\n *\n * @param dracoGeometry\n * @param dracoAttribute\n * @param attributeName\n */\n _getAttributeValues(\n dracoGeometry: Mesh | PointCloud,\n attribute: DracoAttribute\n ): {value: TypedArray; size: number} {\n const TypedArrayCtor = DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP[attribute.data_type];\n const numComponents = attribute.num_components;\n const numPoints = dracoGeometry.num_points();\n const numValues = numPoints * numComponents;\n\n const byteLength = numValues * TypedArrayCtor.BYTES_PER_ELEMENT;\n const dataType = getDracoDataType(this.draco, TypedArrayCtor);\n\n let value: TypedArray;\n\n const ptr = this.draco._malloc(byteLength);\n try {\n const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attribute.attribute_index);\n this.decoder.GetAttributeDataArrayForAllPoints(\n dracoGeometry,\n dracoAttribute,\n dataType,\n byteLength,\n ptr\n );\n value = new TypedArrayCtor(this.draco.HEAPF32.buffer, ptr, numValues).slice();\n } finally {\n this.draco._free(ptr);\n }\n\n return {value, size: numComponents};\n }\n\n // Attribute names\n\n /** \n * DRACO does not store attribute names - We need to deduce an attribute name\n * for each attribute\n _getAttributeNames(\n dracoGeometry: Mesh | PointCloud,\n options: DracoParseOptions\n ): {[unique_id: number]: string} {\n const attributeNames: {[unique_id: number]: string} = {};\n for (let attributeId = 0; attributeId < dracoGeometry.num_attributes(); attributeId++) {\n const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attributeId);\n const attributeName = this._deduceAttributeName(dracoAttribute, options);\n attributeNames[attributeName] = attributeName;\n }\n return attributeNames;\n }\n */\n\n /**\n * Deduce an attribute name.\n * @note DRACO does not save attribute names, just general type (POSITION, COLOR)\n * to help optimize compression. We generate GLTF compatible names for the Draco-recognized\n * types\n * @param attributeData\n */\n _deduceAttributeName(attribute: DracoAttribute, options: DracoParseOptions): string {\n // Deduce name based on application provided map\n const uniqueId = attribute.unique_id;\n for (const [attributeName, attributeUniqueId] of Object.entries(\n options.extraAttributes || {}\n )) {\n if (attributeUniqueId === uniqueId) {\n return attributeName;\n }\n }\n\n // Deduce name based on attribute type\n const thisAttributeType = attribute.attribute_type;\n for (const dracoAttributeConstant in DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP) {\n const attributeType = this.draco[dracoAttributeConstant];\n if (attributeType === thisAttributeType) {\n // TODO - Return unique names if there multiple attributes per type\n // (e.g. multiple TEX_COORDS or COLORS)\n return DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP[dracoAttributeConstant];\n }\n }\n\n // Look up in metadata\n // TODO - shouldn't this have priority?\n const entryName = options.attributeNameEntry || 'name';\n if (attribute.metadata[entryName]) {\n return attribute.metadata[entryName].string;\n }\n\n // Attribute of \"GENERIC\" type, we need to assign some name\n return `CUSTOM_ATTRIBUTE_${uniqueId}`;\n }\n\n // METADATA EXTRACTION\n\n /** Get top level metadata */\n _getTopLevelMetadata(dracoGeometry: Mesh | PointCloud) {\n const dracoMetadata = this.decoder.GetMetadata(dracoGeometry);\n return this._getDracoMetadata(dracoMetadata);\n }\n\n /** Get per attribute metadata */\n _getAttributeMetadata(dracoGeometry: Mesh | PointCloud, attributeId: number) {\n const dracoMetadata = this.decoder.GetAttributeMetadata(dracoGeometry, attributeId);\n return this._getDracoMetadata(dracoMetadata);\n }\n\n /**\n * Extract metadata field values\n * @param dracoMetadata\n * @returns\n */\n _getDracoMetadata(dracoMetadata: Metadata): {[entry: string]: DracoMetadataEntry} {\n // The not so wonderful world of undocumented Draco APIs :(\n if (!dracoMetadata || !dracoMetadata.ptr) {\n return {};\n }\n const result = {};\n const numEntries = this.metadataQuerier.NumEntries(dracoMetadata);\n for (let entryIndex = 0; entryIndex < numEntries; entryIndex++) {\n const entryName = this.metadataQuerier.GetEntryName(dracoMetadata, entryIndex);\n result[entryName] = this._getDracoMetadataField(dracoMetadata, entryName);\n }\n return result;\n }\n\n /**\n * Extracts possible values for one metadata entry by name\n * @param dracoMetadata\n * @param entryName\n */\n _getDracoMetadataField(dracoMetadata: Metadata, entryName: string): DracoMetadataEntry {\n const dracoArray = new this.draco.DracoInt32Array();\n try {\n // Draco metadata fields can hold int32 arrays\n this.metadataQuerier.GetIntEntryArray(dracoMetadata, entryName, dracoArray);\n const intArray = getInt32Array(dracoArray);\n return {\n int: this.metadataQuerier.GetIntEntry(dracoMetadata, entryName),\n string: this.metadataQuerier.GetStringEntry(dracoMetadata, entryName),\n double: this.metadataQuerier.GetDoubleEntry(dracoMetadata, entryName),\n intArray\n };\n } finally {\n this.draco.destroy(dracoArray);\n }\n }\n\n // QUANTIZED ATTRIBUTE SUPPORT (NO DECOMPRESSION)\n\n /** Skip transforms for specific attribute types */\n _disableAttributeTransforms(options: DracoParseOptions) {\n const {quantizedAttributes = [], octahedronAttributes = []} = options;\n const skipAttributes = [...quantizedAttributes, ...octahedronAttributes];\n for (const dracoAttributeName of skipAttributes) {\n this.decoder.SkipAttributeTransform(this.draco[dracoAttributeName]);\n }\n }\n\n /**\n * Extract (and apply?) Position Transform\n * @todo not used\n */\n _getQuantizationTransform(\n dracoAttribute: PointAttribute,\n options: DracoParseOptions\n ): DracoQuantizationTransform | null {\n const {quantizedAttributes = []} = options;\n const attribute_type = dracoAttribute.attribute_type();\n const skip = quantizedAttributes.map((type) => this.decoder[type]).includes(attribute_type);\n if (skip) {\n const transform = new this.draco.AttributeQuantizationTransform();\n try {\n if (transform.InitFromAttribute(dracoAttribute)) {\n return {\n quantization_bits: transform.quantization_bits(),\n range: transform.range(),\n min_values: new Float32Array([1, 2, 3]).map((i) => transform.min_value(i))\n };\n }\n } finally {\n this.draco.destroy(transform);\n }\n }\n return null;\n }\n\n _getOctahedronTransform(\n dracoAttribute: PointAttribute,\n options: DracoParseOptions\n ): DracoOctahedronTransform | null {\n const {octahedronAttributes = []} = options;\n const attribute_type = dracoAttribute.attribute_type();\n const octahedron = octahedronAttributes\n .map((type) => this.decoder[type])\n .includes(attribute_type);\n if (octahedron) {\n const transform = new this.draco.AttributeQuantizationTransform();\n try {\n if (transform.InitFromAttribute(dracoAttribute)) {\n return {\n quantization_bits: transform.quantization_bits()\n };\n }\n } finally {\n this.draco.destroy(transform);\n }\n }\n return null;\n }\n\n // HELPERS\n}\n\n/**\n * Get draco specific data type by TypedArray constructor type\n * @param attributeType\n * @returns draco specific data type\n */\nfunction getDracoDataType(draco: Draco3D, attributeType: any): draco_DataType {\n switch (attributeType) {\n case Float32Array:\n return draco.DT_FLOAT32;\n case Int8Array:\n return draco.DT_INT8;\n case Int16Array:\n return draco.DT_INT16;\n case Int32Array:\n return draco.DT_INT32;\n case Uint8Array:\n return draco.DT_UINT8;\n case Uint16Array:\n return draco.DT_UINT16;\n case Uint32Array:\n return draco.DT_UINT32;\n default:\n return draco.DT_INVALID;\n }\n}\n\n/**\n * Copy a Draco int32 array into a JS typed array\n */\nfunction getInt32Array(dracoArray: DracoInt32Array): Int32Array {\n const numValues = dracoArray.size();\n const intArray = new Int32Array(numValues);\n for (let i = 0; i < numValues; i++) {\n intArray[i] = dracoArray.GetValue(i);\n }\n return intArray;\n}\n\n/**\n * Copy a Draco int32 array into a JS typed array\n */\nfunction getUint32Array(dracoArray: DracoInt32Array): Int32Array {\n const numValues = dracoArray.size();\n const intArray = new Int32Array(numValues);\n for (let i = 0; i < numValues; i++) {\n intArray[i] = dracoArray.GetValue(i);\n }\n return intArray;\n}\n","/* global importScripts */\nimport {global, isBrowser, isWorker} from '../env-utils/globals';\nimport * as node from '../node/require-utils.node';\nimport {assert} from '../env-utils/assert';\nimport {VERSION as __VERSION__} from '../env-utils/version';\n\n// TODO - unpkg.com doesn't seem to have a `latest` specifier for alpha releases...\nconst LATEST = 'beta';\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : LATEST;\n\nconst loadLibraryPromises = {}; // promises\n\n/**\n * Dynamically loads a library (\"module\")\n *\n * - wasm library: Array buffer is returned\n * - js library: Parse JS is returned\n *\n * Method depends on environment\n * - browser - script element is created and installed on document\n * - worker - eval is called on global context\n * - node - file is required\n *\n * @param libraryUrl\n * @param moduleName\n * @param options\n */\nexport async function loadLibrary(\n libraryUrl: string,\n moduleName: string | null = null,\n options: object = {}\n): Promise<any> {\n if (moduleName) {\n libraryUrl = getLibraryUrl(libraryUrl, moduleName, options);\n }\n\n // Ensure libraries are only loaded once\n loadLibraryPromises[libraryUrl] =\n loadLibraryPromises[libraryUrl] || loadLibraryFromFile(libraryUrl);\n return await loadLibraryPromises[libraryUrl];\n}\n\n// TODO - sort out how to resolve paths for main/worker and dev/prod\nexport function getLibraryUrl(library, moduleName?: string, options?): string {\n // Check if already a URL\n if (library.startsWith('http')) {\n return library;\n }\n\n // Allow application to import and supply libraries through `options.modules`\n const modules = options.modules || {};\n if (modules[library]) {\n return modules[library];\n }\n\n // Load from local files, not from CDN scripts in Node.js\n // TODO - needs to locate the modules directory when installed!\n if (!isBrowser) {\n return `modules/${moduleName}/dist/libs/${library}`;\n }\n\n // In browser, load from external scripts\n if (options.CDN) {\n assert(options.CDN.startsWith('http'));\n return `${options.CDN}/${moduleName}@${VERSION}/dist/libs/${library}`;\n }\n\n // TODO - loading inside workers requires paths relative to worker script location...\n if (isWorker) {\n return `../src/libs/${library}`;\n }\n\n return `modules/${moduleName}/src/libs/${library}`;\n}\n\nasync function loadLibraryFromFile(libraryUrl) {\n if (libraryUrl.endsWith('wasm')) {\n const response = await fetch(libraryUrl);\n return await response.arrayBuffer();\n }\n\n if (!isBrowser) {\n return node.requireFromFile && (await node.requireFromFile(libraryUrl));\n }\n if (isWorker) {\n return importScripts(libraryUrl);\n }\n // TODO - fix - should be more secure than string parsing since observes CORS\n // if (isBrowser) {\n // return await loadScriptFromFile(libraryUrl);\n // }\n\n const response = await fetch(libraryUrl);\n const scriptSource = await response.text();\n return loadLibraryFromString(scriptSource, libraryUrl);\n}\n\n/*\nasync function loadScriptFromFile(libraryUrl) {\n const script = document.createElement('script');\n script.src = libraryUrl;\n return await new Promise((resolve, reject) => {\n script.onload = data => {\n resolve(data);\n };\n script.onerror = reject;\n });\n}\n*/\n\n// TODO - Needs security audit...\n// - Raw eval call\n// - Potentially bypasses CORS\n// Upside is that this separates fetching and parsing\n// we could create a`LibraryLoader` or`ModuleLoader`\nfunction loadLibraryFromString(scriptSource, id) {\n if (!isBrowser) {\n return node.requireFromString && node.requireFromString(scriptSource, id);\n }\n\n if (isWorker) {\n // Use lvalue trick to make eval run in global scope\n eval.call(global, scriptSource); // eslint-disable-line no-eval\n // https://stackoverflow.com/questions/9107240/1-evalthis-vs-evalthis-in-javascript\n // http://perfectionkills.com/global-eval-what-are-the-options/\n return null;\n }\n\n const script = document.createElement('script');\n script.id = id;\n // most browsers like a separate text node but some throw an error. The second method covers those.\n try {\n script.appendChild(document.createTextNode(scriptSource));\n } catch (e) {\n script.text = scriptSource;\n }\n document.body.appendChild(script);\n return null;\n}\n\n// TODO - technique for module injection into worker, from THREE.DracoLoader...\n/*\nfunction combineWorkerWithLibrary(worker, jsContent) {\n var fn = wWorker.toString();\n var body = [\n '// injected',\n jsContent,\n '',\n '// worker',\n fn.substring(fn.indexOf('{') + 1, fn.lastIndexOf('}'))\n ].join('\\n');\n this.workerSourceURL = URL.createObjectURL(new Blob([body]));\n}\n*/\n","// Dynamic DRACO module loading inspired by THREE.DRACOLoader\n// https://github.com/mrdoob/three.js/blob/398c4f39ebdb8b23eefd4a7a5ec49ec0c96c7462/examples/jsm/loaders/DRACOLoader.js\n// by Don McCurdy / https://www.donmccurdy.com / MIT license\n\nimport {loadLibrary} from '@loaders.gl/worker-utils';\n\nconst DRACO_VERSION = '1.4.1';\nconst DRACO_JS_DECODER_URL = `https://www.gstatic.com/draco/versioned/decoders/${DRACO_VERSION}/draco_decoder.js`;\nconst DRACO_WASM_WRAPPER_URL = `https://www.gstatic.com/draco/versioned/decoders/${DRACO_VERSION}/draco_wasm_wrapper.js`;\nconst DRACO_WASM_DECODER_URL = `https://www.gstatic.com/draco/versioned/decoders/${DRACO_VERSION}/draco_decoder.wasm`;\n\nconst DRACO_ENCODER_URL = `https://raw.githubusercontent.com/google/draco/${DRACO_VERSION}/javascript/draco_encoder.js`;\n\nlet loadDecoderPromise;\nlet loadEncoderPromise;\n\nexport async function loadDracoDecoderModule(options) {\n const modules = options.modules || {};\n\n // Check if a bundled draco3d library has been supplied by application\n if (modules.draco3d) {\n loadDecoderPromise =\n loadDecoderPromise ||\n modules.draco3d.createDecoderModule({}).then((draco) => {\n return {draco};\n });\n } else {\n // If not, dynamically load the WASM script from our CDN\n loadDecoderPromise = loadDecoderPromise || loadDracoDecoder(options);\n }\n return await loadDecoderPromise;\n}\n\nexport async function loadDracoEncoderModule(options) {\n const modules = options.modules || {};\n\n // Check if a bundled draco3d library has been supplied by application\n if (modules.draco3d) {\n loadEncoderPromise =\n loadEncoderPromise ||\n modules.draco3d.createEncoderModule({}).then((draco) => {\n return {draco};\n });\n } else {\n // If not, dynamically load the WASM script from our CDN\n loadEncoderPromise = loadEncoderPromise || loadDracoEncoder(options);\n }\n return await loadEncoderPromise;\n}\n\n// DRACO DECODER LOADING\n\nasync function loadDracoDecoder(options) {\n let DracoDecoderModule;\n let wasmBinary;\n switch (options.draco && options.draco.decoderType) {\n case 'js':\n DracoDecoderModule = await loadLibrary(DRACO_JS_DECODER_URL, 'draco', options);\n break;\n\n case 'wasm':\n default:\n [DracoDecoderModule, wasmBinary] = await Promise.all([\n await loadLibrary(DRACO_WASM_WRAPPER_URL, 'draco', options),\n await loadLibrary(DRACO_WASM_DECODER_URL, 'draco', options)\n ]);\n }\n // Depends on how import happened...\n // @ts-ignore\n DracoDecoderModule = DracoDecoderModule || globalThis.DracoDecoderModule;\n return await initializeDracoDecoder(DracoDecoderModule, wasmBinary);\n}\n\nfunction initializeDracoDecoder(DracoDecoderModule, wasmBinary) {\n const options: {wasmBinary?: any} = {};\n if (wasmBinary) {\n options.wasmBinary = wasmBinary;\n }\n\n return new Promise((resolve) => {\n DracoDecoderModule({\n ...options,\n onModuleLoaded: (draco) => resolve({draco}) // Module is Promise-like. Wrap in object to avoid loop.\n });\n });\n}\n\n// ENCODER\n\nasync function loadDracoEncoder(options) {\n let DracoEncoderModule = await loadLibrary(DRACO_ENCODER_URL, 'draco', options);\n // @ts-ignore\n DracoEncoderModule = DracoEncoderModule || globalThis.DracoEncoderModule;\n\n return new Promise((resolve) => {\n DracoEncoderModule({\n onModuleLoaded: (draco) => resolve({draco}) // Module is Promise-like. Wrap in object to avoid loop.\n });\n });\n}\n","let arrayBuffer = null;\n\nexport function getScratchArrayBuffer(byteLength) {\n if (!arrayBuffer || arrayBuffer.byteLength < byteLength) {\n arrayBuffer = new ArrayBuffer(byteLength);\n }\n return arrayBuffer;\n}\n\nexport function getScratchArray(Type, length) {\n const scratchArrayBuffer = getScratchArrayBuffer(Type.BYTES_PER_ELEMENT * length);\n return new Type(scratchArrayBuffer, 0, length); // arrayBuffer, byteOffset, length (in elements)\n}\n\n// Uses copyWithin to significantly speed up typed array value filling\nexport function fillArray({target, source, start = 0, count = 1}) {\n const length = source.length;\n const total = count * length;\n let copied = 0;\n for (let i = start; copied < length; copied++) {\n target[i++] = source[copied];\n }\n\n while (copied < total) {\n // If we have copied less than half, copy everything we got\n // else copy remaining in one operation\n if (copied < total - copied) {\n target.copyWithin(start + copied, start, start + copied);\n copied *= 2;\n } else {\n target.copyWithin(start + copied, start, start + total - copied);\n copied = total;\n }\n }\n\n return target;\n}\n\n/*\n\n// Creates a new Uint8Array based on two different ArrayBuffers\n// @private\n// @param {ArrayBuffers} buffer1 The first buffer.\n// @param {ArrayBuffers} buffer2 The second buffer.\n// @return {ArrayBuffers} The new ArrayBuffer created out of the two.\n//\nexport function copyArrayBuffer(\n targetBuffer, sourceBuffer, byteOffset, byteLength = sourceBuffer.byteLength\n) {\n const targetArray = new Uint8Array(targetBuffer, byteOffset, byteLength);\n const sourceArray = new Uint8Array(sourceBuffer);\n targetArray.set(sourceArray);\n return targetBuffer;\n}\n\n*/\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// This function is needed in initialization stages,\n// make sure it can be imported in isolation\n\nimport {window} from './globals';\nimport isBrowser from './is-browser';\nimport isElectron from './is-electron';\n\nexport function isMobile() {\n // @ts-ignore\n return typeof window.orientation !== 'undefined';\n}\n\n// Simple browser detection\n// `mockUserAgent` parameter allows user agent to be overridden for testing\n/* eslint-disable complexity */\nexport default function getBrowser(mockUserAgent) {\n if (!mockUserAgent && !isBrowser()) {\n return 'Node';\n }\n\n if (isElectron(mockUserAgent)) {\n return 'Electron';\n }\n\n const navigator_ = typeof navigator !== 'undefined' ? navigator : {};\n const userAgent = mockUserAgent || navigator_.userAgent || '';\n // const appVersion = navigator_.appVersion || '';\n\n // NOTE: Order of tests matter, as many agents list Chrome etc.\n if (userAgent.indexOf('Edge') > -1) {\n return 'Edge';\n }\n const isMSIE = userAgent.indexOf('MSIE ') !== -1;\n const isTrident = userAgent.indexOf('Trident/') !== -1;\n if (isMSIE || isTrident) {\n return 'IE';\n }\n // @ts-ignore\n if (window.chrome) {\n return 'Chrome';\n }\n // @ts-ignore\n if (window.safari) {\n return 'Safari';\n }\n // @ts-ignore\n if (window.mozInnerScreenX) {\n return 'Firefox';\n }\n return 'Unknown';\n}\n","import GL from '@luma.gl/constants';\nimport Resource from './resource';\nimport Buffer from './buffer';\nimport {isWebGL2} from '@luma.gl/gltools';\nimport {getScratchArray, fillArray} from '../utils/array-utils-flat';\nimport {assert} from '../utils/assert';\nimport {getBrowser} from 'probe.gl';\n\nconst ERR_ELEMENTS = 'elements must be GL.ELEMENT_ARRAY_BUFFER';\n\nexport default class VertexArrayObject extends Resource {\n static isSupported(gl, options = {}) {\n // Attribute 0 can not be disable on most desktop OpenGL based browsers\n // and on iOS Safari browser.\n if (options.constantAttributeZero) {\n return isWebGL2(gl) || getBrowser() === 'Chrome';\n }\n\n // Whether additional objects can be created\n return true;\n }\n\n // Returns the global (null) vertex array object. Exists even when no extension available\n // TODO(Tarek): VAOs are now polyfilled. Deprecate this in 9.0\n static getDefaultArray(gl) {\n gl.luma = gl.luma || {};\n if (!gl.luma.defaultVertexArray) {\n gl.luma.defaultVertexArray = new VertexArrayObject(gl, {handle: null, isDefaultArray: true});\n }\n return gl.luma.defaultVertexArray;\n }\n\n static getMaxAttributes(gl) {\n // TODO - should be cached per context\n // @ts-ignore\n VertexArrayObject.MAX_ATTRIBUTES =\n // @ts-ignore\n VertexArrayObject.MAX_ATTRIBUTES || gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n // @ts-ignore\n return VertexArrayObject.MAX_ATTRIBUTES;\n }\n\n // Note: Constants are stored globally on the WebGL context, not the VAO\n // So they need to be updated before every render\n // TODO - use known type (in configuration or passed in) to allow non-typed arrays?\n // TODO - remember/cache values to avoid setting them unnecessarily?\n static setConstant(gl, location, array) {\n switch (array.constructor) {\n case Float32Array:\n VertexArrayObject._setConstantFloatArray(gl, location, array);\n break;\n case Int32Array:\n VertexArrayObject._setConstantIntArray(gl, location, array);\n break;\n case Uint32Array:\n VertexArrayObject._setConstantUintArray(gl, location, array);\n break;\n default:\n assert(false);\n }\n }\n\n // Create a VertexArray\n constructor(gl, opts = {}) {\n // Use program's id if program but no id is supplied\n const id = opts.id || (opts.program && opts.program.id);\n super(gl, Object.assign({}, opts, {id}));\n\n this.buffer = null;\n this.bufferValue = null;\n this.isDefaultArray = opts.isDefaultArray || false;\n\n /** @type {WebGL2RenderingContext} */\n this.gl2 = gl;\n\n this.initialize(opts);\n\n Object.seal(this);\n }\n\n delete() {\n super.delete();\n if (this.buffer) {\n this.buffer.delete();\n }\n return this;\n }\n\n get MAX_ATTRIBUTES() {\n return VertexArrayObject.getMaxAttributes(this.gl);\n }\n\n initialize(props = {}) {\n return this.setProps(props);\n }\n\n setProps(props) {\n // TODO: decide which props should be supported\n return this;\n }\n\n // Set (bind) an elements buffer, for indexed rendering.\n // Must be a Buffer bound to GL.ELEMENT_ARRAY_BUFFER. Constants not supported\n setElementBuffer(elementBuffer = null, opts = {}) {\n assert(!elementBuffer || elementBuffer.target === GL.ELEMENT_ARRAY_BUFFER, ERR_ELEMENTS);\n\n // The GL.ELEMENT_ARRAY_BUFFER_BINDING is stored on the VertexArrayObject...\n this.bind(() => {\n this.gl.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, elementBuffer ? elementBuffer.handle : null);\n });\n\n return this;\n }\n\n // Set a location in vertex attributes array to a bufferk, enables the location, sets divisor\n setBuffer(location, buffer, accessor) {\n // Check target\n if (buffer.target === GL.ELEMENT_ARRAY_BUFFER) {\n return this.setElementBuffer(buffer, accessor);\n }\n\n const {size, type, stride, offset, normalized, integer, divisor} = accessor;\n\n const {gl, gl2} = this;\n location = Number(location);\n\n this.bind(() => {\n // A non-zero buffer object must be bound to the GL_ARRAY_BUFFER target\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer.handle);\n\n // WebGL2 supports *integer* data formats, i.e. GPU will see integer values\n if (integer) {\n assert(isWebGL2(gl));\n gl2.vertexAttribIPointer(location, size, type, stride, offset);\n } else {\n // Attaches ARRAY_BUFFER with specified buffer format to location\n gl.vertexAttribPointer(location, size, type, normalized, stride, offset);\n }\n gl.enableVertexAttribArray(location);\n gl2.vertexAttribDivisor(location, divisor || 0);\n\n // NOTE We don't unbind buffer here, typically another buffer will be bound just after\n });\n\n return this;\n }\n\n // Enabling an attribute location makes it reference the currently bound buffer\n // Disabling an attribute location makes it reference the global constant value\n // TODO - handle single values for size 1 attributes?\n // TODO - convert classic arrays based on known type?\n enable(location, enable = true) {\n // Attribute 0 cannot be disabled in most desktop OpenGL based browsers\n const disablingAttributeZero =\n !enable &&\n location === 0 &&\n !VertexArrayObject.isSupported(this.gl, {constantAttributeZero: true});\n\n if (!disablingAttributeZero) {\n location = Number(location);\n this.bind(\n () =>\n enable\n ? this.gl.enableVertexAttribArray(location)\n : this.gl.disableVertexAttribArray(location)\n );\n }\n return this;\n }\n\n // Provide a means to create a buffer that is equivalent to a constant.\n // NOTE: Desktop OpenGL cannot disable attribute 0.\n // https://stackoverflow.com/questions/20305231/webgl-warning-attribute-0-is-disabled-\n // this-has-significant-performance-penalt\n getConstantBuffer(elementCount, value) {\n // Create buffer only when needed, and reuse it (avoids inflating buffer creation statistics)\n\n const constantValue = this._normalizeConstantArrayValue(value);\n\n const byteLength = constantValue.byteLength * elementCount;\n const length = constantValue.length * elementCount;\n\n let updateNeeded = !this.buffer;\n\n this.buffer = this.buffer || new Buffer(this.gl, byteLength);\n updateNeeded = updateNeeded || this.buffer.reallocate(byteLength);\n\n // Reallocate and update contents if needed\n updateNeeded =\n updateNeeded || !this._compareConstantArrayValues(constantValue, this.bufferValue);\n\n if (updateNeeded) {\n // Create a typed array that is big enough, and fill it with the required data\n const typedArray = getScratchArray(value.constructor, length);\n fillArray({target: typedArray, source: constantValue, start: 0, count: length});\n this.buffer.subData(typedArray);\n this.bufferValue = value;\n }\n\n return this.buffer;\n }\n\n // PRIVATE\n\n // TODO - convert Arrays based on known type? (read type from accessor, don't assume Float32Array)\n // TODO - handle single values for size 1 attributes?\n _normalizeConstantArrayValue(arrayValue) {\n if (Array.isArray(arrayValue)) {\n return new Float32Array(arrayValue);\n }\n return arrayValue;\n }\n\n _compareConstantArrayValues(v1, v2) {\n if (!v1 || !v2 || v1.length !== v2.length || v1.constructor !== v2.constructor) {\n return false;\n }\n for (let i = 0; i < v1.length; ++i) {\n if (v1[i] !== v2[i]) {\n return false;\n }\n }\n return true;\n }\n\n static _setConstantFloatArray(gl, location, array) {\n switch (array.length) {\n case 1:\n gl.vertexAttrib1fv(location, array);\n break;\n case 2:\n gl.vertexAttrib2fv(location, array);\n break;\n case 3:\n gl.vertexAttrib3fv(location, array);\n break;\n case 4:\n gl.vertexAttrib4fv(location, array);\n break;\n default:\n assert(false);\n }\n }\n\n static _setConstantIntArray(gl, location, array) {\n assert(isWebGL2(gl));\n switch (array.length) {\n case 1:\n gl.vertexAttribI1iv(location, array);\n break;\n case 2:\n gl.vertexAttribI2iv(location, array);\n break;\n case 3:\n gl.vertexAttribI3iv(location, array);\n break;\n case 4:\n gl.vertexAttribI4iv(location, array);\n break;\n default:\n assert(false);\n }\n }\n\n static _setConstantUintArray(gl, location, array) {\n assert(isWebGL2(gl));\n switch (array.length) {\n case 1:\n gl.vertexAttribI1uiv(location, array);\n break;\n case 2:\n gl.vertexAttribI2uiv(location, array);\n break;\n case 3:\n gl.vertexAttribI3uiv(location, array);\n break;\n case 4:\n gl.vertexAttribI4uiv(location, array);\n break;\n default:\n assert(false);\n }\n }\n\n // RESOURCE IMPLEMENTATION\n\n _createHandle() {\n /** @type {WebGL2RenderingContext} */\n // @ts-ignore\n const gl2 = this.gl;\n return gl2.createVertexArray();\n }\n\n _deleteHandle(handle) {\n this.gl2.deleteVertexArray(handle);\n // @ts-ignore\n return [this.elements];\n // return [this.elements, ...this.buffers];\n }\n\n _bindHandle(handle) {\n this.gl2.bindVertexArray(handle);\n }\n\n // Generic getter for information about a vertex attribute at a given position\n _getParameter(pname, {location}) {\n assert(Number.isFinite(location));\n return this.bind(() => {\n switch (pname) {\n case GL.VERTEX_ATTRIB_ARRAY_POINTER:\n return this.gl.getVertexAttribOffset(location, pname);\n default:\n return this.gl.getVertexAttrib(location, pname);\n }\n });\n }\n}\n","import GL from '@luma.gl/constants';\nimport {log} from '@luma.gl/gltools';\nimport Accessor from './accessor';\nimport Buffer from './buffer';\nimport VertexArrayObject from './vertex-array-object';\nimport {assert} from '../utils/assert';\nimport {stubRemovedMethods} from '../utils/stub-methods';\n\nconst ERR_ATTRIBUTE_TYPE =\n 'VertexArray: attributes must be Buffers or constants (i.e. typed array)';\n\n// This is done to support mat type attributes.\n// See section \"Notes about setting mat type attributes\"\n// in vertex-array.md\nconst MULTI_LOCATION_ATTRIBUTE_REGEXP = /^(.+)__LOCATION_([0-9]+)$/;\n\nconst DEPRECATIONS_V6 = [\n 'setBuffers',\n 'setGeneric',\n 'clearBindings',\n 'setLocations',\n 'setGenericValues',\n 'setDivisor',\n 'enable',\n 'disable'\n];\n\nexport default class VertexArray {\n constructor(gl, opts = {}) {\n // Use program's id if program is supplied but no id is supplied\n const id = opts.id || (opts.program && opts.program.id);\n // super(gl, Object.assign({}, opts, {id}));\n\n this.id = id;\n this.gl = gl;\n this.configuration = null;\n\n // Extracted information\n this.elements = null;\n this.elementsAccessor = null;\n this.values = null;\n this.accessors = null;\n this.unused = null;\n this.drawParams = null;\n this.buffer = null; // For attribute 0 on desktops, and created when unbinding buffers\n\n this.attributes = {};\n\n this.vertexArrayObject = new VertexArrayObject(gl);\n\n // Issue errors when using removed methods\n stubRemovedMethods(this, 'VertexArray', 'v6.0', DEPRECATIONS_V6);\n\n this.initialize(opts);\n Object.seal(this);\n }\n\n delete() {\n if (this.buffer) {\n this.buffer.delete();\n }\n\n this.vertexArrayObject.delete();\n }\n\n initialize(props = {}) {\n this.reset();\n this.configuration = null;\n this.bindOnUse = false;\n return this.setProps(props);\n }\n\n // Resets all attributes (to default valued constants)\n reset() {\n // this.vertexArrayObject.reset();\n\n this.elements = null;\n this.elementsAccessor = null;\n const {MAX_ATTRIBUTES} = this.vertexArrayObject;\n this.values = new Array(MAX_ATTRIBUTES).fill(null);\n this.accessors = new Array(MAX_ATTRIBUTES).fill(null);\n this.unused = {};\n\n // Auto detects draw params\n this.drawParams = null;\n\n return this;\n }\n\n setProps(props) {\n if ('program' in props) {\n this.configuration = props.program && props.program.configuration;\n }\n if ('configuration' in props) {\n this.configuration = props.configuration;\n }\n if ('attributes' in props) {\n this.setAttributes(props.attributes);\n }\n if ('elements' in props) {\n this.setElementBuffer(props.elements);\n }\n if ('bindOnUse' in props) {\n props = props.bindOnUse;\n }\n return this;\n }\n\n // Automatically called if buffers changed through VertexArray API\n clearDrawParams() {\n this.drawParams = null;\n }\n\n getDrawParams() {\n // Auto deduced draw parameters\n this.drawParams = this.drawParams || this._updateDrawParams();\n\n return this.drawParams;\n }\n\n // Set (bind) an array or map of vertex array buffers, either in numbered or named locations.\n // For names that are not present in `location`, the supplied buffers will be ignored.\n // if a single buffer of type GL.ELEMENT_ARRAY_BUFFER is present, it will be set as elements\n // Signatures:\n // {attributeName: buffer}\n // {attributeName: [buffer, accessor]}\n // {attributeName: (typed) array} => constant\n setAttributes(attributes) {\n Object.assign(this.attributes, attributes);\n this.vertexArrayObject.bind(() => {\n for (const locationOrName in attributes) {\n const value = attributes[locationOrName];\n this._setAttribute(locationOrName, value);\n }\n // Make sure we don't leave any bindings\n this.gl.bindBuffer(GL.ARRAY_BUFFER, null);\n });\n\n return this;\n }\n\n // Set (bind) an elements buffer, for indexed rendering.\n // Must be a Buffer bound to GL.ELEMENT_ARRAY_BUFFER. Constants not supported\n setElementBuffer(elementBuffer = null, accessor = {}) {\n this.elements = elementBuffer; // Save value for debugging\n this.elementsAccessor = accessor;\n this.clearDrawParams();\n this.vertexArrayObject.setElementBuffer(elementBuffer, accessor);\n\n return this;\n }\n\n // Set a location in vertex attributes array to a buffer\n setBuffer(locationOrName, buffer, appAccessor = {}) {\n // Check target\n if (buffer.target === GL.ELEMENT_ARRAY_BUFFER) {\n return this.setElementBuffer(buffer, appAccessor);\n }\n\n const {location, accessor} = this._resolveLocationAndAccessor(\n locationOrName,\n buffer,\n buffer.accessor,\n appAccessor\n );\n\n if (location >= 0) {\n this.values[location] = buffer;\n this.accessors[location] = accessor;\n this.clearDrawParams();\n this.vertexArrayObject.setBuffer(location, buffer, accessor);\n }\n\n return this;\n }\n\n // Set attribute to constant value (small typed array corresponding to one vertex' worth of data)\n setConstant(locationOrName, arrayValue, appAccessor = {}) {\n const {location, accessor} = this._resolveLocationAndAccessor(\n locationOrName,\n arrayValue,\n // Ensure that size isn't taken from program for multi-column\n // attributes\n Object.assign({size: arrayValue.length}, appAccessor)\n );\n\n if (location >= 0) {\n arrayValue = this.vertexArrayObject._normalizeConstantArrayValue(arrayValue);\n\n this.values[location] = arrayValue;\n this.accessors[location] = accessor;\n this.clearDrawParams();\n\n // NOTE: We set the actual constant value later on bind. We can't set the value now since\n // constants are global and affect all other VertexArrays that have disabled attributes\n // in the same location.\n // We do disable the attribute which makes it use the global constant value at that location\n this.vertexArrayObject.enable(location, false);\n }\n\n return this;\n }\n\n // Workaround for Chrome TransformFeedback binding issue\n // If required, unbind temporarily to avoid conflicting with TransformFeedback\n unbindBuffers() {\n this.vertexArrayObject.bind(() => {\n if (this.elements) {\n this.vertexArrayObject.setElementBuffer(null);\n }\n\n // Chrome does not like buffers that are bound to several binding points,\n // so we need to offer and unbind facility\n // WebGL offers disabling, but no clear way to set a VertexArray buffer to `null`\n // So we just bind all the attributes to the dummy \"attribute zero\" buffer\n this.buffer = this.buffer || new Buffer(this.gl, {accessor: {size: 4}});\n\n for (let location = 0; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {\n if (this.values[location] instanceof Buffer) {\n this.gl.disableVertexAttribArray(location);\n this.gl.bindBuffer(GL.ARRAY_BUFFER, this.buffer.handle);\n this.gl.vertexAttribPointer(location, 1, GL.FLOAT, false, 0, 0);\n }\n }\n });\n return this;\n }\n\n // Workaround for Chrome TransformFeedback binding issue\n // If required, rebind rebind after temporary unbind\n bindBuffers() {\n this.vertexArrayObject.bind(() => {\n if (this.elements) {\n this.setElementBuffer(this.elements);\n }\n\n for (let location = 0; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {\n const buffer = this.values[location];\n if (buffer instanceof Buffer) {\n this.setBuffer(location, buffer);\n }\n }\n });\n return this;\n }\n\n // Bind for use\n // When a vertex array is about to be used, we must:\n // - Set constant attributes (since these are stored on the context and reset on bind)\n // - Check if we need to initialize the buffer\n bindForDraw(vertexCount, instanceCount, func) {\n let value;\n\n this.vertexArrayObject.bind(() => {\n // Make sure that any constant attributes are updated (stored on the context, not the VAO)\n // Also handles attribute 0\n this._setConstantAttributes(vertexCount, instanceCount);\n\n value = func();\n });\n\n return value;\n }\n\n // PRIVATE\n\n // Resolve locations and accessors\n _resolveLocationAndAccessor(locationOrName, value, valueAccessor, appAccessor) {\n const INVALID_RESULT = {\n location: -1,\n accessor: null\n };\n\n const {location, name} = this._getAttributeIndex(locationOrName);\n if (!Number.isFinite(location) || location < 0) {\n this.unused[locationOrName] = value;\n log.once(3, () => `unused value ${locationOrName} in ${this.id}`)();\n return INVALID_RESULT;\n }\n\n const accessInfo = this._getAttributeInfo(name || location);\n\n // Attribute location wasn't directly found.\n // Likely due to multi-location attributes (e.g. matrix)\n if (!accessInfo) {\n return INVALID_RESULT;\n }\n\n // Resolve the partial accessors into a final accessor\n const currentAccessor = this.accessors[location] || {};\n const accessor = Accessor.resolve(\n accessInfo.accessor,\n currentAccessor,\n valueAccessor,\n appAccessor\n );\n\n const {size, type} = accessor;\n assert(Number.isFinite(size) && Number.isFinite(type));\n\n return {location, accessor};\n }\n\n _getAttributeInfo(attributeName) {\n return this.configuration && this.configuration.getAttributeInfo(attributeName);\n }\n\n _getAttributeIndex(locationOrName) {\n const location = Number(locationOrName);\n if (Number.isFinite(location)) {\n return {location};\n }\n\n const multiLocation = MULTI_LOCATION_ATTRIBUTE_REGEXP.exec(locationOrName);\n const name = multiLocation ? multiLocation[1] : locationOrName;\n const locationOffset = multiLocation ? Number(multiLocation[2]) : 0;\n\n if (this.configuration) {\n return {\n location: this.configuration.getAttributeLocation(name) + locationOffset,\n name\n };\n }\n\n return {location: -1};\n }\n\n _setAttribute(locationOrName, value) {\n if (value instanceof Buffer) {\n // Signature: {attributeName: Buffer}\n this.setBuffer(locationOrName, value);\n } else if (Array.isArray(value) && value.length && value[0] instanceof Buffer) {\n // Signature: {attributeName: [buffer, accessor]}\n const buffer = value[0];\n const accessor = value[1];\n this.setBuffer(locationOrName, buffer, accessor);\n } else if (ArrayBuffer.isView(value) || Array.isArray(value)) {\n // Signature: {attributeName: constant}, constant == short (typed) array\n const constant = value;\n this.setConstant(locationOrName, constant);\n } else if (value.buffer instanceof Buffer) {\n // luma.gl v7: Support accessor objects with 'buffer' field\n // for interleaved data\n // Signature: {attributeName: {...accessor, buffer}}\n const accessor = value;\n this.setBuffer(locationOrName, accessor.buffer, accessor);\n } else {\n throw new Error(ERR_ATTRIBUTE_TYPE);\n }\n }\n\n // Updates all constant attribute values (constants are used when vertex attributes are disabled).\n // This needs to be done repeatedly since in contrast to buffer bindings,\n // constants are stored on the WebGL context, not the VAO\n _setConstantAttributes(vertexCount, instanceCount) {\n // TODO - use accessor to determine what length to use\n const elementCount = Math.max(vertexCount | 0, instanceCount | 0);\n let constant = this.values[0];\n if (ArrayBuffer.isView(constant)) {\n this._setConstantAttributeZero(constant, elementCount);\n }\n\n for (let location = 1; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {\n constant = this.values[location];\n if (ArrayBuffer.isView(constant)) {\n this._setConstantAttribute(location, constant);\n }\n }\n }\n\n _setConstantAttributeZero(constant, elementCount) {\n if (VertexArrayObject.isSupported(this.gl, {constantAttributeZero: true})) {\n this._setConstantAttribute(0, constant);\n return;\n }\n\n // Get a dummy buffer populated with repeated constants\n const buffer = this.vertexArrayObject.getConstantBuffer(elementCount, constant);\n\n // Set the buffer on location 0\n this.vertexArrayObject.setBuffer(0, buffer, this.accessors[0]);\n }\n\n _setConstantAttribute(location, constant) {\n VertexArrayObject.setConstant(this.gl, location, constant);\n }\n\n // Walks the buffers and updates draw parameters\n _updateDrawParams() {\n const drawParams = {\n isIndexed: false,\n isInstanced: false,\n indexCount: Infinity,\n vertexCount: Infinity,\n instanceCount: Infinity\n };\n\n for (let location = 0; location < this.vertexArrayObject.MAX_ATTRIBUTES; location++) {\n this._updateDrawParamsForLocation(drawParams, location);\n }\n\n if (this.elements) {\n // indexing is autodetected - buffer with target GL.ELEMENT_ARRAY_BUFFER\n // index type is saved for drawElement calls\n drawParams.elementCount = this.elements.getElementCount(this.elements.accessor);\n drawParams.isIndexed = true;\n drawParams.indexType = this.elementsAccessor.type || this.elements.accessor.type;\n drawParams.indexOffset = this.elementsAccessor.offset || 0;\n }\n\n // Post-calculation checks\n if (drawParams.indexCount === Infinity) {\n drawParams.indexCount = 0;\n }\n if (drawParams.vertexCount === Infinity) {\n drawParams.vertexCount = 0;\n }\n if (drawParams.instanceCount === Infinity) {\n drawParams.instanceCount = 0;\n }\n\n return drawParams;\n }\n\n _updateDrawParamsForLocation(drawParams, location) {\n const value = this.values[location];\n const accessor = this.accessors[location];\n\n if (!value) {\n return;\n }\n\n // Check if instanced (whether buffer or constant)\n const {divisor} = accessor;\n const isInstanced = divisor > 0;\n drawParams.isInstanced = drawParams.isInstanced || isInstanced;\n\n if (value instanceof Buffer) {\n const buffer = value;\n\n if (isInstanced) {\n // instance attribute\n const instanceCount = buffer.getVertexCount(accessor);\n drawParams.instanceCount = Math.min(drawParams.instanceCount, instanceCount);\n } else {\n // normal attribute\n const vertexCount = buffer.getVertexCount(accessor);\n drawParams.vertexCount = Math.min(drawParams.vertexCount, vertexCount);\n }\n }\n }\n\n // DEPRECATED in v6.x - but not warnings not properly implemented\n\n setElements(elementBuffer = null, accessor = {}) {\n log.deprecated('setElements', 'setElementBuffer')();\n return this.setElementBuffer(elementBuffer, accessor);\n }\n}\n","// TODO / DEPRECATED - delete when confident that probe.gl logging implements all opts\n/* eslint-disable no-console */\nfunction formatArrayValue(v, opts) {\n const {maxElts = 16, size = 1} = opts;\n let string = '[';\n for (let i = 0; i < v.length && i < maxElts; ++i) {\n if (i > 0) {\n string += `,${i % size === 0 ? ' ' : ''}`;\n }\n string += formatValue(v[i], opts);\n }\n const terminator = v.length > maxElts ? '...' : ']';\n return `${string}${terminator}`;\n}\n\nexport function formatValue(v, opts = {}) {\n const EPSILON = 1e-16;\n const {isInteger = false} = opts;\n if (Array.isArray(v) || ArrayBuffer.isView(v)) {\n return formatArrayValue(v, opts);\n }\n if (!Number.isFinite(v)) {\n return String(v);\n }\n if (Math.abs(v) < EPSILON) {\n return isInteger ? '0' : '0.';\n }\n if (isInteger) {\n return v.toFixed(0);\n }\n if (Math.abs(v) > 100 && Math.abs(v) < 10000) {\n return v.toFixed(0);\n }\n const string = v.toPrecision(2);\n const decimal = string.indexOf('.0');\n return decimal === string.length - 2 ? string.slice(0, -1) : string;\n}\n","import Buffer from '../classes/buffer';\nimport {getKey} from '../webgl-utils/constants-to-keys';\nimport {getCompositeGLType} from '../webgl-utils/attribute-utils';\nimport {formatValue} from '../utils/format-value';\n\n// Creates object suitable as input for console.table\nexport function getDebugTableForVertexArray({vertexArray, header = 'Attributes'}) {\n if (!vertexArray.configuration) {\n return {};\n }\n\n const table = {}; // {[header]: {}};\n\n // Add index (elements) if available\n if (vertexArray.elements) {\n // const elements = Object.assign({size: 1}, vertexArray.elements);\n table.ELEMENT_ARRAY_BUFFER = getDebugTableRow(vertexArray, vertexArray.elements, null, header);\n }\n\n // Add used attributes\n const attributes = vertexArray.values;\n\n for (const attributeLocation in attributes) {\n const info = vertexArray._getAttributeInfo(attributeLocation);\n if (info) {\n let rowHeader = `${attributeLocation}: ${info.name}`;\n const accessor = vertexArray.accessors[info.location];\n if (accessor) {\n rowHeader = `${attributeLocation}: ${getGLSLDeclaration(info.name, accessor)}`;\n }\n table[rowHeader] = getDebugTableRow(\n vertexArray,\n attributes[attributeLocation],\n accessor,\n header\n );\n }\n }\n\n return table;\n}\n\n/* eslint-disable max-statements */\nfunction getDebugTableRow(vertexArray, attribute, accessor, header) {\n const {gl} = vertexArray;\n\n if (!attribute) {\n return {\n [header]: 'null',\n 'Format ': 'N/A'\n };\n }\n\n let type = 'NOT PROVIDED';\n let size = 1;\n let verts = 0;\n let bytes = 0;\n\n let isInteger;\n let marker;\n let value;\n\n if (accessor) {\n type = accessor.type;\n size = accessor.size;\n\n // Generate a type name by dropping Array from Float32Array etc.\n type = String(type).replace('Array', '');\n\n // Look for 'nt' to detect integer types, e.g. Int32Array, Uint32Array\n isInteger = type.indexOf('nt') !== -1;\n }\n\n if (attribute instanceof Buffer) {\n const buffer = attribute;\n\n const {data, changed} = buffer.getDebugData();\n marker = changed ? '*' : '';\n\n value = data;\n // @ts-ignore\n bytes = buffer.byteLength;\n // @ts-ignore\n verts = bytes / data.BYTES_PER_ELEMENT / size;\n\n let format;\n\n if (accessor) {\n const instanced = accessor.divisor > 0;\n format = `${instanced ? 'I ' : 'P '} ${verts} (x${size}=${bytes} bytes ${getKey(gl, type)})`;\n } else {\n // element buffer\n isInteger = true;\n format = `${bytes} bytes`;\n }\n\n return {\n [header]: `${marker}${formatValue(value, {size, isInteger})}`,\n 'Format ': format\n };\n }\n\n // CONSTANT VALUE\n value = attribute;\n size = attribute.length;\n // Generate a type name by dropping Array from Float32Array etc.\n type = String(attribute.constructor.name).replace('Array', '');\n // Look for 'nt' to detect integer types, e.g. Int32Array, Uint32Array\n isInteger = type.indexOf('nt') !== -1;\n\n return {\n [header]: `${formatValue(value, {size, isInteger})} (constant)`,\n 'Format ': `${size}x${type} (constant)`\n };\n}\n/* eslint-ensable max-statements */\n\nfunction getGLSLDeclaration(name, accessor) {\n const {type, size} = accessor;\n const typeAndName = getCompositeGLType(type, size);\n return typeAndName ? `${name} (${typeAndName.name})` : name;\n}\n","import {assert} from '../utils/assert';\nimport {formatValue} from '../utils/format-value';\n\n// Prepares a table suitable for console.table\n/* eslint-disable max-statements, complexity */\nexport function getDebugTableForUniforms({\n header = 'Uniforms',\n program,\n uniforms,\n undefinedOnly = false\n}) {\n assert(program);\n\n const SHADER_MODULE_UNIFORM_REGEXP = '.*_.*';\n const PROJECT_MODULE_UNIFORM_REGEXP = '.*Matrix'; // TODO - Use explicit list\n\n const uniformLocations = program._uniformSetters;\n const table = {}; // {[header]: {}};\n\n // Add program's provided uniforms (in alphabetical order)\n const uniformNames = Object.keys(uniformLocations).sort();\n\n let count = 0;\n\n // First add non-underscored uniforms (assumed not coming from shader modules)\n for (const uniformName of uniformNames) {\n if (\n !uniformName.match(SHADER_MODULE_UNIFORM_REGEXP) &&\n !uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)\n ) {\n if (addUniformToTable({table, header, uniforms, uniformName, undefinedOnly})) {\n count++;\n }\n }\n }\n\n // add underscored uniforms (assumed from shader modules)\n for (const uniformName of uniformNames) {\n if (uniformName.match(PROJECT_MODULE_UNIFORM_REGEXP)) {\n if (addUniformToTable({table, header, uniforms, uniformName, undefinedOnly})) {\n count++;\n }\n }\n }\n\n for (const uniformName of uniformNames) {\n if (!table[uniformName]) {\n if (addUniformToTable({table, header, uniforms, uniformName, undefinedOnly})) {\n count++;\n }\n }\n }\n\n // Create a table of unused uniforms\n let unusedCount = 0;\n const unusedTable = {};\n if (!undefinedOnly) {\n for (const uniformName in uniforms) {\n const uniform = uniforms[uniformName];\n if (!table[uniformName]) {\n unusedCount++;\n unusedTable[uniformName] = {\n Type: `NOT USED: ${uniform}`,\n [header]: formatValue(uniform)\n };\n }\n }\n }\n\n return {table, count, unusedTable, unusedCount};\n}\n\n// Helper\nfunction addUniformToTable({table, header, uniforms, uniformName, undefinedOnly}) {\n const value = uniforms[uniformName];\n const isDefined = isUniformDefined(value);\n if (!undefinedOnly || !isDefined) {\n table[uniformName] = {\n // Add program's unprovided uniforms\n [header]: isDefined ? formatValue(value) : 'N/A',\n 'Uniform Type': isDefined ? value : 'NOT PROVIDED'\n };\n return true;\n }\n return false;\n}\n\nfunction isUniformDefined(value) {\n return value !== undefined && value !== null;\n}\n","import {getCompositeGLType} from '../webgl-utils/attribute-utils';\n\nexport function getDebugTableForProgramConfiguration(config) {\n const table = {};\n\n const header = `Accessors for ${config.id}`;\n\n for (const attributeInfo of config.attributeInfos) {\n if (attributeInfo) {\n const glslDeclaration = getGLSLDeclaration(attributeInfo);\n table[`in ${glslDeclaration}`] = {[header]: JSON.stringify(attributeInfo.accessor)};\n }\n }\n\n for (const varyingInfo of config.varyingInfos) {\n if (varyingInfo) {\n const glslDeclaration = getGLSLDeclaration(varyingInfo);\n table[`out ${glslDeclaration}`] = {[header]: JSON.stringify(varyingInfo.accessor)};\n }\n }\n\n return table;\n}\n\nfunction getGLSLDeclaration(attributeInfo) {\n const {type, size} = attributeInfo.accessor;\n const typeAndName = getCompositeGLType(type, size);\n if (typeAndName) {\n return `${typeAndName.name} ${attributeInfo.name}`;\n }\n return attributeInfo.name;\n}\n","import GL from '@luma.gl/constants';\nimport {Buffer, assert} from '@luma.gl/webgl';\n\n// Support for mapping new geometries with glTF attribute names to \"classic\" luma.gl shader names\nconst GLTF_TO_LUMA_ATTRIBUTE_MAP = {\n POSITION: 'positions',\n NORMAL: 'normals',\n COLOR_0: 'colors',\n TEXCOORD_0: 'texCoords',\n TEXCOORD_1: 'texCoords1',\n TEXCOORD_2: 'texCoords2'\n};\n\nexport function getBuffersFromGeometry(gl, geometry, options) {\n const buffers = {};\n let indices = geometry.indices;\n\n for (const name in geometry.attributes) {\n const attribute = geometry.attributes[name];\n const remappedName = mapAttributeName(name, options);\n\n if (name === 'indices') {\n indices = attribute;\n } else if (attribute.constant) {\n buffers[remappedName] = attribute.value;\n } else {\n const typedArray = attribute.value;\n // Create accessor by copying the attribute and removing `value``\n const accessor = {...attribute};\n delete accessor.value;\n buffers[remappedName] = [new Buffer(gl, typedArray), accessor];\n\n inferAttributeAccessor(name, accessor);\n }\n }\n\n if (indices) {\n const data = indices.value || indices;\n assert(\n data instanceof Uint16Array || data instanceof Uint32Array,\n 'attribute array for \"indices\" must be of integer type'\n );\n const accessor = {\n size: 1,\n isIndexed: indices.isIndexed === undefined ? true : indices.isIndexed\n };\n buffers.indices = [\n new Buffer(gl, {\n data,\n target: GL.ELEMENT_ARRAY_BUFFER\n }),\n accessor\n ];\n }\n\n return buffers;\n}\n\nfunction mapAttributeName(name, options) {\n const {attributeMap = GLTF_TO_LUMA_ATTRIBUTE_MAP} = options || {};\n return (attributeMap && attributeMap[name]) || name;\n}\n\n// Check for well known attribute names\n// eslint-disable-next-line complexity\nexport function inferAttributeAccessor(attributeName, attribute) {\n let category;\n switch (attributeName) {\n case 'texCoords':\n case 'texCoord1':\n case 'texCoord2':\n case 'texCoord3':\n category = 'uvs';\n break;\n case 'vertices':\n case 'positions':\n case 'normals':\n case 'pickingColors':\n category = 'vectors';\n break;\n default:\n }\n\n // Check for categorys\n switch (category) {\n case 'vectors':\n attribute.size = attribute.size || 3;\n break;\n case 'uvs':\n attribute.size = attribute.size || 2;\n break;\n default:\n }\n\n assert(Number.isFinite(attribute.size), `attribute ${attributeName} needs size`);\n}\n","/* eslint-disable complexity */\n\nimport GL from '@luma.gl/constants';\nimport {isWebGL} from '@luma.gl/gltools';\nimport ProgramManager from './program-manager';\nimport {\n Program,\n VertexArray,\n clear,\n TransformFeedback,\n Buffer,\n log,\n isObjectEmpty,\n uid,\n assert\n} from '@luma.gl/webgl';\nimport {\n getDebugTableForUniforms,\n getDebugTableForVertexArray,\n getDebugTableForProgramConfiguration\n} from '@luma.gl/webgl';\nimport {getBuffersFromGeometry} from './model-utils';\n\nconst LOG_DRAW_PRIORITY = 2;\nconst LOG_DRAW_TIMEOUT = 10000;\n\nconst ERR_MODEL_PARAMS = 'Model needs drawMode and vertexCount';\n\nconst NOOP = () => {};\nconst DRAW_PARAMS = {};\n\nexport default class Model {\n constructor(gl, props = {}) {\n // Deduce a helpful id\n const {id = uid('model')} = props;\n assert(isWebGL(gl));\n this.id = id;\n this.gl = gl;\n this.id = props.id || uid('Model');\n this.lastLogTime = 0; // TODO - move to probe.gl\n this.animated = false;\n this.initialize(props);\n }\n\n initialize(props) {\n this.props = {};\n\n this.programManager = props.programManager || ProgramManager.getDefaultProgramManager(this.gl);\n this._programManagerState = -1;\n this._managedProgram = false;\n\n const {\n program = null,\n vs,\n fs,\n modules,\n defines,\n inject,\n varyings,\n bufferMode,\n transpileToGLSL100\n } = props;\n\n this.programProps = {\n program,\n vs,\n fs,\n modules,\n defines,\n inject,\n varyings,\n bufferMode,\n transpileToGLSL100\n };\n this.program = null;\n this.vertexArray = null;\n this._programDirty = true;\n\n // Initialize state\n this.userData = {};\n this.needsRedraw = true;\n\n // Attributes and buffers\n // Model manages auto Buffer creation from typed arrays\n this._attributes = {}; // All attributes\n this.attributes = {}; // User defined attributes\n\n // Model manages uniform animation\n this.uniforms = {};\n\n // picking options\n this.pickable = true;\n\n this._checkProgram();\n\n this.setUniforms(\n Object.assign(\n {},\n this.getModuleUniforms(props.moduleSettings) // Get unforms for supplied parameters\n )\n );\n\n this.drawMode = props.drawMode !== undefined ? props.drawMode : GL.TRIANGLES;\n this.vertexCount = props.vertexCount || 0;\n\n // Track buffers created by setGeometry\n this.geometryBuffers = {};\n\n // geometry might have set drawMode and vertexCount\n this.isInstanced = props.isInstanced || props.instanced || props.instanceCount > 0;\n\n this._setModelProps(props);\n\n // TODO - just to unbreak deck.gl 7.0-beta, remove as soon as updated\n this.geometry = {};\n\n // assert(program || program instanceof Program);\n assert(this.drawMode !== undefined && Number.isFinite(this.vertexCount), ERR_MODEL_PARAMS);\n }\n\n setProps(props) {\n this._setModelProps(props);\n }\n\n delete() {\n // delete all attributes created by this model\n // TODO - should buffer deletes be handled by vertex array?\n for (const key in this._attributes) {\n if (this._attributes[key] !== this.attributes[key]) {\n this._attributes[key].delete();\n }\n }\n\n if (this._managedProgram) {\n this.programManager.release(this.program);\n this._managedProgram = false;\n }\n\n this.vertexArray.delete();\n\n this._deleteGeometryBuffers();\n }\n\n // GETTERS\n\n getDrawMode() {\n return this.drawMode;\n }\n\n getVertexCount() {\n return this.vertexCount;\n }\n\n getInstanceCount() {\n return this.instanceCount;\n }\n\n getAttributes() {\n return this.attributes;\n }\n\n getProgram() {\n return this.program;\n }\n\n setProgram(props) {\n const {\n program,\n vs,\n fs,\n modules,\n defines,\n inject,\n varyings,\n bufferMode,\n transpileToGLSL100\n } = props;\n this.programProps = {\n program,\n vs,\n fs,\n modules,\n defines,\n inject,\n varyings,\n bufferMode,\n transpileToGLSL100\n };\n this._programDirty = true;\n }\n\n getUniforms() {\n return this.uniforms;\n }\n\n // SETTERS\n\n setDrawMode(drawMode) {\n this.drawMode = drawMode;\n return this;\n }\n\n setVertexCount(vertexCount) {\n assert(Number.isFinite(vertexCount));\n this.vertexCount = vertexCount;\n return this;\n }\n\n setInstanceCount(instanceCount) {\n assert(Number.isFinite(instanceCount));\n this.instanceCount = instanceCount;\n return this;\n }\n\n setGeometry(geometry) {\n this.drawMode = geometry.drawMode;\n this.vertexCount = geometry.getVertexCount();\n\n this._deleteGeometryBuffers();\n\n this.geometryBuffers = getBuffersFromGeometry(this.gl, geometry);\n this.vertexArray.setAttributes(this.geometryBuffers);\n return this;\n }\n\n setAttributes(attributes = {}) {\n // Avoid setting needsRedraw if no attributes\n if (isObjectEmpty(attributes)) {\n return this;\n }\n\n const normalizedAttributes = {};\n for (const name in attributes) {\n const attribute = attributes[name];\n // The `getValue` call provides support for deck.gl `Attribute` class\n // TODO - remove once deck refactoring completes\n normalizedAttributes[name] = attribute.getValue ? attribute.getValue() : attribute;\n }\n\n this.vertexArray.setAttributes(normalizedAttributes);\n return this;\n }\n\n // TODO - should actually set the uniforms\n setUniforms(uniforms = {}) {\n Object.assign(this.uniforms, uniforms);\n\n return this;\n }\n\n getModuleUniforms(opts) {\n this._checkProgram();\n\n const getUniforms = this.programManager.getUniforms(this.program);\n\n if (getUniforms) {\n return getUniforms(opts);\n }\n\n return {};\n }\n\n updateModuleSettings(opts) {\n const uniforms = this.getModuleUniforms(opts || {});\n return this.setUniforms(uniforms);\n }\n\n // DRAW CALLS\n\n clear(opts) {\n clear(this.program.gl, opts);\n return this;\n }\n\n draw(opts = {}) {\n // Lazy update program and vertex array\n this._checkProgram();\n\n const {\n moduleSettings = null,\n framebuffer,\n uniforms = {},\n attributes = {},\n transformFeedback = this.transformFeedback,\n parameters = {},\n vertexArray = this.vertexArray\n } = opts;\n\n // Update model with any just provided attributes, settings or uniforms\n this.setAttributes(attributes);\n this.updateModuleSettings(moduleSettings);\n this.setUniforms(uniforms);\n\n let logPriority;\n\n if (log.priority >= LOG_DRAW_PRIORITY) {\n logPriority = this._logDrawCallStart(LOG_DRAW_PRIORITY);\n }\n\n const drawParams = this.vertexArray.getDrawParams();\n const {\n isIndexed = drawParams.isIndexed,\n indexType = drawParams.indexType,\n indexOffset = drawParams.indexOffset,\n vertexArrayInstanced = drawParams.isInstanced\n } = this.props;\n\n if (vertexArrayInstanced && !this.isInstanced) {\n log.warn('Found instanced attributes on non-instanced model', this.id)();\n }\n\n const {isInstanced, instanceCount} = this;\n\n const {onBeforeRender = NOOP, onAfterRender = NOOP} = this.props;\n\n onBeforeRender();\n\n this.program.setUniforms(this.uniforms);\n\n const didDraw = this.program.draw(\n Object.assign(DRAW_PARAMS, opts, {\n logPriority,\n uniforms: null, // Already set (may contain \"function values\" not understood by Program)\n framebuffer,\n parameters,\n drawMode: this.getDrawMode(),\n vertexCount: this.getVertexCount(),\n vertexArray,\n transformFeedback,\n isIndexed,\n indexType,\n isInstanced,\n instanceCount,\n offset: isIndexed ? indexOffset : 0\n })\n );\n\n onAfterRender();\n\n if (log.priority >= LOG_DRAW_PRIORITY) {\n this._logDrawCallEnd(logPriority, vertexArray, framebuffer);\n }\n\n return didDraw;\n }\n\n // Draw call for transform feedback\n transform(opts = {}) {\n const {discard = true, feedbackBuffers, unbindModels = []} = opts;\n\n let {parameters} = opts;\n\n if (feedbackBuffers) {\n this._setFeedbackBuffers(feedbackBuffers);\n }\n\n if (discard) {\n parameters = Object.assign({}, parameters, {[GL.RASTERIZER_DISCARD]: discard});\n }\n\n unbindModels.forEach(model => model.vertexArray.unbindBuffers());\n try {\n this.draw(Object.assign({}, opts, {parameters}));\n } finally {\n unbindModels.forEach(model => model.vertexArray.bindBuffers());\n }\n\n return this;\n }\n\n // DEPRECATED METHODS\n\n render(uniforms = {}) {\n log.warn('Model.render() is deprecated. Use Model.setUniforms() and Model.draw()')();\n return this.setUniforms(uniforms).draw();\n }\n\n // PRIVATE METHODS\n\n _setModelProps(props) {\n Object.assign(this.props, props);\n\n if ('uniforms' in props) {\n this.setUniforms(props.uniforms);\n }\n\n if ('pickable' in props) {\n this.pickable = props.pickable;\n }\n\n if ('instanceCount' in props) {\n this.instanceCount = props.instanceCount;\n }\n if ('geometry' in props) {\n this.setGeometry(props.geometry);\n }\n\n // webgl settings\n if ('attributes' in props) {\n this.setAttributes(props.attributes);\n }\n if ('_feedbackBuffers' in props) {\n this._setFeedbackBuffers(props._feedbackBuffers);\n }\n }\n\n _checkProgram() {\n const needsUpdate =\n this._programDirty || this.programManager.stateHash !== this._programManagerState;\n\n if (!needsUpdate) {\n return;\n }\n\n let {program} = this.programProps;\n\n if (program) {\n this._managedProgram = false;\n } else {\n const {\n vs,\n fs,\n modules,\n inject,\n defines,\n varyings,\n bufferMode,\n transpileToGLSL100\n } = this.programProps;\n program = this.programManager.get({\n vs,\n fs,\n modules,\n inject,\n defines,\n varyings,\n bufferMode,\n transpileToGLSL100\n });\n if (this.program && this._managedProgram) {\n this.programManager.release(this.program);\n }\n this._programManagerState = this.programManager.stateHash;\n this._managedProgram = true;\n }\n\n assert(program instanceof Program, 'Model needs a program');\n\n this._programDirty = false;\n\n if (program === this.program) {\n return;\n }\n\n this.program = program;\n\n if (this.vertexArray) {\n // @ts-ignore TODO\n this.vertexArray.setProps({program: this.program, attributes: this.vertexArray.attributes});\n } else {\n this.vertexArray = new VertexArray(this.gl, {program: this.program});\n }\n\n // Make sure we have some reasonable default uniforms in place\n this.setUniforms(\n Object.assign(\n {},\n this.getModuleUniforms() // Get all default uniforms,\n )\n );\n }\n\n _deleteGeometryBuffers() {\n for (const name in this.geometryBuffers) {\n // Buffer is raw value (for indices) or first element of [buffer, accessor] pair\n const buffer = this.geometryBuffers[name][0] || this.geometryBuffers[name];\n if (buffer instanceof Buffer) {\n buffer.delete();\n }\n }\n }\n\n // Updates (evaluates) all function valued uniforms based on a new set of animationProps\n // experimental\n _setAnimationProps(animationProps) {\n if (this.animated) {\n assert(animationProps, 'Model.draw(): animated uniforms but no animationProps');\n // const animatedUniforms = this._evaluateAnimateUniforms(animationProps);\n // Object.assign(this.uniforms, animatedUniforms);\n }\n }\n\n // Transform Feedback\n\n _setFeedbackBuffers(feedbackBuffers = {}) {\n // Avoid setting needsRedraw if no feedbackBuffers\n if (isObjectEmpty(feedbackBuffers)) {\n return this;\n }\n\n const {gl} = this.program;\n this.transformFeedback =\n this.transformFeedback ||\n new TransformFeedback(gl, {\n program: this.program\n });\n\n this.transformFeedback.setBuffers(feedbackBuffers);\n return this;\n }\n\n _logDrawCallStart(logLevel) {\n const logDrawTimeout = logLevel > 3 ? 0 : LOG_DRAW_TIMEOUT;\n if (Date.now() - this.lastLogTime < logDrawTimeout) {\n return undefined;\n }\n\n this.lastLogTime = Date.now();\n\n log.group(LOG_DRAW_PRIORITY, `>>> DRAWING MODEL ${this.id}`, {collapsed: log.level <= 2})();\n\n return logLevel;\n }\n\n _logDrawCallEnd(logLevel, vertexArray, uniforms, framebuffer) {\n // HACK: logLevel === undefined means logDrawCallStart didn't run\n if (logLevel === undefined) {\n return;\n }\n\n const attributeTable = getDebugTableForVertexArray({\n vertexArray,\n header: `${this.id} attributes`,\n // @ts-ignore\n attributes: this._attributes\n });\n\n const {table: uniformTable, unusedTable, unusedCount} = getDebugTableForUniforms({\n header: `${this.id} uniforms`,\n program: this.program,\n uniforms: Object.assign({}, this.program.uniforms, uniforms)\n });\n\n // log missing uniforms\n const {table: missingTable, count: missingCount} = getDebugTableForUniforms({\n header: `${this.id} uniforms`,\n program: this.program,\n uniforms: Object.assign({}, this.program.uniforms, uniforms),\n undefinedOnly: true\n });\n\n if (missingCount > 0) {\n log.log('MISSING UNIFORMS', Object.keys(missingTable))();\n // log.table(logLevel, missingTable)();\n }\n if (unusedCount > 0) {\n log.log('UNUSED UNIFORMS', Object.keys(unusedTable))();\n // log.log(logLevel, 'Unused uniforms ', unusedTable)();\n }\n\n const configTable = getDebugTableForProgramConfiguration(this.vertexArray.configuration);\n\n log.table(logLevel, attributeTable)();\n\n log.table(logLevel, uniformTable)();\n\n log.table(logLevel + 1, configTable)();\n\n if (framebuffer) {\n framebuffer.log({logLevel: LOG_DRAW_PRIORITY, message: `Rendered to ${framebuffer.id}`});\n }\n\n log.groupEnd(LOG_DRAW_PRIORITY, `>>> DRAWING MODEL ${this.id}`)();\n }\n}\n","import getHiResTimestamp from '../utils/hi-res-timestamp';\n\nexport default class Stat {\n constructor(name, type) {\n this.name = name;\n this.type = type;\n this.sampleSize = 1;\n this.reset();\n }\n\n setSampleSize(samples) {\n this.sampleSize = samples;\n\n return this;\n }\n\n // Call to increment count (+1)\n incrementCount() {\n this.addCount(1);\n\n return this;\n }\n\n // Call to decrement count (-1)\n decrementCount() {\n this.subtractCount(1);\n\n return this;\n }\n\n // Increase count\n addCount(value) {\n this._count += value;\n this._samples++;\n this._checkSampling();\n\n return this;\n }\n\n // Decrease count\n subtractCount(value) {\n this._count -= value;\n this._samples++;\n this._checkSampling();\n\n return this;\n }\n\n // Add an arbitrary timing and bump the count\n addTime(time) {\n this._time += time;\n this.lastTiming = time;\n this._samples++;\n this._checkSampling();\n\n return this;\n }\n\n // Start a timer\n timeStart() {\n this._startTime = getHiResTimestamp();\n this._timerPending = true;\n\n return this;\n }\n\n // End a timer. Adds to time and bumps the timing count.\n timeEnd() {\n if (!this._timerPending) {\n return this;\n }\n\n this.addTime(getHiResTimestamp() - this._startTime);\n this._timerPending = false;\n this._checkSampling();\n\n return this;\n }\n\n getSampleAverageCount() {\n return this.sampleSize > 0 ? this.lastSampleCount / this.sampleSize : 0;\n }\n\n // Calculate average time / count for the previous window\n getSampleAverageTime() {\n return this.sampleSize > 0 ? this.lastSampleTime / this.sampleSize : 0;\n }\n\n // Calculate counts per second for the previous window\n getSampleHz() {\n return this.lastSampleTime > 0 ? this.sampleSize / (this.lastSampleTime / 1000) : 0;\n }\n\n getAverageCount() {\n return this.samples > 0 ? this.count / this.samples : 0;\n }\n\n // Calculate average time / count\n getAverageTime() {\n return this.samples > 0 ? this.time / this.samples : 0;\n }\n\n // Calculate counts per second\n getHz() {\n return this.time > 0 ? this.samples / (this.time / 1000) : 0;\n }\n\n reset() {\n this.time = 0;\n this.count = 0;\n this.samples = 0;\n this.lastTiming = 0;\n this.lastSampleTime = 0;\n this.lastSampleCount = 0;\n this._count = 0;\n this._time = 0;\n this._samples = 0;\n this._startTime = 0;\n this._timerPending = false;\n\n return this;\n }\n\n _checkSampling() {\n if (this._samples === this.sampleSize) {\n this.lastSampleTime = this._time;\n this.lastSampleCount = this._count;\n this.count += this._count;\n this.time += this._time;\n this.samples += this._samples;\n this._time = 0;\n this._count = 0;\n this._samples = 0;\n }\n }\n}\n","import Stat from './stat';\n\nexport default class Stats {\n constructor({id, stats}) {\n this.id = id;\n this.stats = {};\n\n this._initializeStats(stats);\n\n Object.seal(this);\n }\n\n // Acquire a stat. Create if it doesn't exist.\n get(name, type = 'count') {\n return this._getOrCreate({name, type});\n }\n\n get size() {\n return Object.keys(this.stats).length;\n }\n\n // Reset all stats\n reset() {\n for (const key in this.stats) {\n this.stats[key].reset();\n }\n\n return this;\n }\n\n forEach(fn) {\n for (const key in this.stats) {\n fn(this.stats[key]);\n }\n }\n\n getTable() {\n const table = {};\n this.forEach(stat => {\n table[stat.name] = {\n time: stat.time || 0,\n count: stat.count || 0,\n average: stat.getAverageTime() || 0,\n hz: stat.getHz() || 0\n };\n });\n\n return table;\n }\n\n _initializeStats(stats = []) {\n stats.forEach(stat => this._getOrCreate(stat));\n }\n\n _getOrCreate(stat) {\n if (!stat || !stat.name) {\n return null;\n }\n\n const {name, type} = stat;\n if (!this.stats[name]) {\n if (stat instanceof Stat) {\n this.stats[name] = stat;\n } else {\n this.stats[name] = new Stat(name, type);\n }\n }\n return this.stats[name];\n }\n}\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","// https://en.wikipedia.org/wiki/Rhumb_line\nimport { degreesToRadians, radiansToDegrees } from \"@turf/helpers\";\nimport { getCoord } from \"@turf/invariant\";\n/**\n * Takes two {@link Point|points} and finds the bearing angle between them along a Rhumb line\n * i.e. the angle measured in degrees start the north line (0 degrees)\n *\n * @name rhumbBearing\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @param {Object} [options] Optional parameters\n * @param {boolean} [options.final=false] calculates the final bearing if true\n * @returns {number} bearing from north in decimal degrees, between -180 and 180 degrees (positive clockwise)\n * @example\n * var point1 = turf.point([-75.343, 39.984], {\"marker-color\": \"#F00\"});\n * var point2 = turf.point([-75.534, 39.123], {\"marker-color\": \"#00F\"});\n *\n * var bearing = turf.rhumbBearing(point1, point2);\n *\n * //addToMap\n * var addToMap = [point1, point2];\n * point1.properties.bearing = bearing;\n * point2.properties.bearing = bearing;\n */\nfunction rhumbBearing(start, end, options) {\n if (options === void 0) { options = {}; }\n var bear360;\n if (options.final) {\n bear360 = calculateRhumbBearing(getCoord(end), getCoord(start));\n }\n else {\n bear360 = calculateRhumbBearing(getCoord(start), getCoord(end));\n }\n var bear180 = bear360 > 180 ? -(360 - bear360) : bear360;\n return bear180;\n}\n/**\n * Returns the bearing from ‘this’ point to destination point along a rhumb line.\n * Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js\n *\n * @private\n * @param {Array<number>} from - origin point.\n * @param {Array<number>} to - destination point.\n * @returns {number} Bearing in degrees from north.\n * @example\n * var p1 = new LatLon(51.127, 1.338);\n * var p2 = new LatLon(50.964, 1.853);\n * var d = p1.rhumbBearingTo(p2); // 116.7 m\n */\nfunction calculateRhumbBearing(from, to) {\n // φ => phi\n // Δλ => deltaLambda\n // Δψ => deltaPsi\n // θ => theta\n var phi1 = degreesToRadians(from[1]);\n var phi2 = degreesToRadians(to[1]);\n var deltaLambda = degreesToRadians(to[0] - from[0]);\n // if deltaLambdaon over 180° take shorter rhumb line across the anti-meridian:\n if (deltaLambda > Math.PI) {\n deltaLambda -= 2 * Math.PI;\n }\n if (deltaLambda < -Math.PI) {\n deltaLambda += 2 * Math.PI;\n }\n var deltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));\n var theta = Math.atan2(deltaLambda, deltaPsi);\n return (radiansToDegrees(theta) + 360) % 360;\n}\nexport default rhumbBearing;\n","import _extends from 'babel-runtime/helpers/extends';\nimport _defineProperty from 'babel-runtime/helpers/defineProperty';\nimport _classCallCheck from 'babel-runtime/helpers/classCallCheck';\nimport _createClass from 'babel-runtime/helpers/createClass';\nimport _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';\nimport _inherits from 'babel-runtime/helpers/inherits';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport warning from 'warning';\nimport toArray from 'rc-util/es/Children/toArray';\nimport { polyfill } from 'react-lifecycles-compat';\n\nimport { treeContextTypes } from './contextTypes';\nimport { convertTreeToEntities, convertDataToTree, getDataAndAria, getPosition, getDragNodesKeys, parseCheckedKeys, conductExpandParent, calcSelectedKeys, calcDropPosition, arrAdd, arrDel, posToArr, mapChildren, conductCheck, warnOnlyTreeNode } from './util';\n\nvar Tree = function (_React$Component) {\n _inherits(Tree, _React$Component);\n\n function Tree(props) {\n _classCallCheck(this, Tree);\n\n var _this = _possibleConstructorReturn(this, (Tree.__proto__ || Object.getPrototypeOf(Tree)).call(this, props));\n\n _this.onNodeDragStart = function (event, node) {\n var expandedKeys = _this.state.expandedKeys;\n var onDragStart = _this.props.onDragStart;\n var _node$props = node.props,\n eventKey = _node$props.eventKey,\n children = _node$props.children;\n\n\n _this.dragNode = node;\n\n _this.setState({\n dragNodesKeys: getDragNodesKeys(children, node),\n expandedKeys: arrDel(expandedKeys, eventKey)\n });\n\n if (onDragStart) {\n onDragStart({ event: event, node: node });\n }\n };\n\n _this.onNodeDragEnter = function (event, node) {\n var expandedKeys = _this.state.expandedKeys;\n var onDragEnter = _this.props.onDragEnter;\n var _node$props2 = node.props,\n pos = _node$props2.pos,\n eventKey = _node$props2.eventKey;\n\n\n if (!_this.dragNode) return;\n\n var dropPosition = calcDropPosition(event, node);\n\n // Skip if drag node is self\n if (_this.dragNode.props.eventKey === eventKey && dropPosition === 0) {\n _this.setState({\n dragOverNodeKey: '',\n dropPosition: null\n });\n return;\n }\n\n // Ref: https://github.com/react-component/tree/issues/132\n // Add timeout to let onDragLevel fire before onDragEnter,\n // so that we can clean drag props for onDragLeave node.\n // Macro task for this:\n // https://html.spec.whatwg.org/multipage/webappapis.html#clean-up-after-running-script\n setTimeout(function () {\n // Update drag over node\n _this.setState({\n dragOverNodeKey: eventKey,\n dropPosition: dropPosition\n });\n\n // Side effect for delay drag\n if (!_this.delayedDragEnterLogic) {\n _this.delayedDragEnterLogic = {};\n }\n Object.keys(_this.delayedDragEnterLogic).forEach(function (key) {\n clearTimeout(_this.delayedDragEnterLogic[key]);\n });\n _this.delayedDragEnterLogic[pos] = setTimeout(function () {\n var newExpandedKeys = arrAdd(expandedKeys, eventKey);\n if (!('expandedKeys' in _this.props)) {\n _this.setState({\n expandedKeys: newExpandedKeys\n });\n }\n\n if (onDragEnter) {\n onDragEnter({ event: event, node: node, expandedKeys: newExpandedKeys });\n }\n }, 400);\n }, 0);\n };\n\n _this.onNodeDragOver = function (event, node) {\n var onDragOver = _this.props.onDragOver;\n var eventKey = node.props.eventKey;\n\n // Update drag position\n\n if (_this.dragNode && eventKey === _this.state.dragOverNodeKey) {\n var dropPosition = calcDropPosition(event, node);\n\n if (dropPosition === _this.state.dropPosition) return;\n\n _this.setState({\n dropPosition: dropPosition\n });\n }\n\n if (onDragOver) {\n onDragOver({ event: event, node: node });\n }\n };\n\n _this.onNodeDragLeave = function (event, node) {\n var onDragLeave = _this.props.onDragLeave;\n\n\n _this.setState({\n dragOverNodeKey: ''\n });\n\n if (onDragLeave) {\n onDragLeave({ event: event, node: node });\n }\n };\n\n _this.onNodeDragEnd = function (event, node) {\n var onDragEnd = _this.props.onDragEnd;\n\n _this.setState({\n dragOverNodeKey: ''\n });\n if (onDragEnd) {\n onDragEnd({ event: event, node: node });\n }\n\n _this.dragNode = null;\n };\n\n _this.onNodeDrop = function (event, node) {\n var _this$state = _this.state,\n _this$state$dragNodes = _this$state.dragNodesKeys,\n dragNodesKeys = _this$state$dragNodes === undefined ? [] : _this$state$dragNodes,\n dropPosition = _this$state.dropPosition;\n var onDrop = _this.props.onDrop;\n var _node$props3 = node.props,\n eventKey = _node$props3.eventKey,\n pos = _node$props3.pos;\n\n\n _this.setState({\n dragOverNodeKey: ''\n });\n\n if (dragNodesKeys.indexOf(eventKey) !== -1) {\n warning(false, 'Can not drop to dragNode(include it\\'s children node)');\n return;\n }\n\n var posArr = posToArr(pos);\n\n var dropResult = {\n event: event,\n node: node,\n dragNode: _this.dragNode,\n dragNodesKeys: dragNodesKeys.slice(),\n dropPosition: dropPosition + Number(posArr[posArr.length - 1])\n };\n\n if (dropPosition !== 0) {\n dropResult.dropToGap = true;\n }\n\n if (onDrop) {\n onDrop(dropResult);\n }\n\n _this.dragNode = null;\n };\n\n _this.onNodeClick = function (e, treeNode) {\n var onClick = _this.props.onClick;\n\n if (onClick) {\n onClick(e, treeNode);\n }\n };\n\n _this.onNodeDoubleClick = function (e, treeNode) {\n var onDoubleClick = _this.props.onDoubleClick;\n\n if (onDoubleClick) {\n onDoubleClick(e, treeNode);\n }\n };\n\n _this.onNodeSelect = function (e, treeNode) {\n var selectedKeys = _this.state.selectedKeys;\n var keyEntities = _this.state.keyEntities;\n var _this$props = _this.props,\n onSelect = _this$props.onSelect,\n multiple = _this$props.multiple;\n var _treeNode$props = treeNode.props,\n selected = _treeNode$props.selected,\n eventKey = _treeNode$props.eventKey;\n\n var targetSelected = !selected;\n\n // Update selected keys\n if (!targetSelected) {\n selectedKeys = arrDel(selectedKeys, eventKey);\n } else if (!multiple) {\n selectedKeys = [eventKey];\n } else {\n selectedKeys = arrAdd(selectedKeys, eventKey);\n }\n\n // [Legacy] Not found related usage in doc or upper libs\n var selectedNodes = selectedKeys.map(function (key) {\n var entity = keyEntities[key];\n if (!entity) return null;\n\n return entity.node;\n }).filter(function (node) {\n return node;\n });\n\n _this.setUncontrolledState({ selectedKeys: selectedKeys });\n\n if (onSelect) {\n var eventObj = {\n event: 'select',\n selected: targetSelected,\n node: treeNode,\n selectedNodes: selectedNodes,\n nativeEvent: e.nativeEvent\n };\n onSelect(selectedKeys, eventObj);\n }\n };\n\n _this.onNodeCheck = function (e, treeNode, checked) {\n var _this$state2 = _this.state,\n keyEntities = _this$state2.keyEntities,\n oriCheckedKeys = _this$state2.checkedKeys,\n oriHalfCheckedKeys = _this$state2.halfCheckedKeys;\n var _this$props2 = _this.props,\n checkStrictly = _this$props2.checkStrictly,\n onCheck = _this$props2.onCheck;\n var eventKey = treeNode.props.eventKey;\n\n // Prepare trigger arguments\n\n var checkedObj = void 0;\n var eventObj = {\n event: 'check',\n node: treeNode,\n checked: checked,\n nativeEvent: e.nativeEvent\n };\n\n if (checkStrictly) {\n var checkedKeys = checked ? arrAdd(oriCheckedKeys, eventKey) : arrDel(oriCheckedKeys, eventKey);\n var halfCheckedKeys = arrDel(oriHalfCheckedKeys, eventKey);\n checkedObj = { checked: checkedKeys, halfChecked: halfCheckedKeys };\n\n eventObj.checkedNodes = checkedKeys.map(function (key) {\n return keyEntities[key];\n }).filter(function (entity) {\n return entity;\n }).map(function (entity) {\n return entity.node;\n });\n\n _this.setUncontrolledState({ checkedKeys: checkedKeys });\n } else {\n var _conductCheck = conductCheck([eventKey], checked, keyEntities, {\n checkedKeys: oriCheckedKeys, halfCheckedKeys: oriHalfCheckedKeys\n }),\n _checkedKeys = _conductCheck.checkedKeys,\n _halfCheckedKeys = _conductCheck.halfCheckedKeys;\n\n checkedObj = _checkedKeys;\n\n // [Legacy] This is used for `rc-tree-select`\n eventObj.checkedNodes = [];\n eventObj.checkedNodesPositions = [];\n eventObj.halfCheckedKeys = _halfCheckedKeys;\n\n _checkedKeys.forEach(function (key) {\n var entity = keyEntities[key];\n if (!entity) return;\n\n var node = entity.node,\n pos = entity.pos;\n\n\n eventObj.checkedNodes.push(node);\n eventObj.checkedNodesPositions.push({ node: node, pos: pos });\n });\n\n _this.setUncontrolledState({\n checkedKeys: _checkedKeys,\n halfCheckedKeys: _halfCheckedKeys\n });\n }\n\n if (onCheck) {\n onCheck(checkedObj, eventObj);\n }\n };\n\n _this.onNodeLoad = function (treeNode) {\n return new Promise(function (resolve) {\n // We need to get the latest state of loading/loaded keys\n _this.setState(function (_ref) {\n var _ref$loadedKeys = _ref.loadedKeys,\n loadedKeys = _ref$loadedKeys === undefined ? [] : _ref$loadedKeys,\n _ref$loadingKeys = _ref.loadingKeys,\n loadingKeys = _ref$loadingKeys === undefined ? [] : _ref$loadingKeys;\n var _this$props3 = _this.props,\n loadData = _this$props3.loadData,\n onLoad = _this$props3.onLoad;\n var eventKey = treeNode.props.eventKey;\n\n\n if (!loadData || loadedKeys.indexOf(eventKey) !== -1 || loadingKeys.indexOf(eventKey) !== -1) {\n // react 15 will warn if return null\n return {};\n }\n\n // Process load data\n var promise = loadData(treeNode);\n promise.then(function () {\n var newLoadedKeys = arrAdd(_this.state.loadedKeys, eventKey);\n var newLoadingKeys = arrDel(_this.state.loadingKeys, eventKey);\n\n // onLoad should trigger before internal setState to avoid `loadData` trigger twice.\n // https://github.com/ant-design/ant-design/issues/12464\n if (onLoad) {\n var eventObj = {\n event: 'load',\n node: treeNode\n };\n onLoad(newLoadedKeys, eventObj);\n }\n\n _this.setUncontrolledState({\n loadedKeys: newLoadedKeys\n });\n _this.setState({\n loadingKeys: newLoadingKeys\n });\n\n resolve();\n });\n\n return {\n loadingKeys: arrAdd(loadingKeys, eventKey)\n };\n });\n });\n };\n\n _this.onNodeExpand = function (e, treeNode) {\n var expandedKeys = _this.state.expandedKeys;\n var _this$props4 = _this.props,\n onExpand = _this$props4.onExpand,\n loadData = _this$props4.loadData;\n var _treeNode$props2 = treeNode.props,\n eventKey = _treeNode$props2.eventKey,\n expanded = _treeNode$props2.expanded;\n\n // Update selected keys\n\n var index = expandedKeys.indexOf(eventKey);\n var targetExpanded = !expanded;\n\n warning(expanded && index !== -1 || !expanded && index === -1, 'Expand state not sync with index check');\n\n if (targetExpanded) {\n expandedKeys = arrAdd(expandedKeys, eventKey);\n } else {\n expandedKeys = arrDel(expandedKeys, eventKey);\n }\n\n _this.setUncontrolledState({ expandedKeys: expandedKeys });\n\n if (onExpand) {\n onExpand(expandedKeys, {\n node: treeNode,\n expanded: targetExpanded,\n nativeEvent: e.nativeEvent\n });\n }\n\n // Async Load data\n if (targetExpanded && loadData) {\n var loadPromise = _this.onNodeLoad(treeNode);\n return loadPromise ? loadPromise.then(function () {\n // [Legacy] Refresh logic\n _this.setUncontrolledState({ expandedKeys: expandedKeys });\n }) : null;\n }\n\n return null;\n };\n\n _this.onNodeMouseEnter = function (event, node) {\n var onMouseEnter = _this.props.onMouseEnter;\n\n if (onMouseEnter) {\n onMouseEnter({ event: event, node: node });\n }\n };\n\n _this.onNodeMouseLeave = function (event, node) {\n var onMouseLeave = _this.props.onMouseLeave;\n\n if (onMouseLeave) {\n onMouseLeave({ event: event, node: node });\n }\n };\n\n _this.onNodeContextMenu = function (event, node) {\n var onRightClick = _this.props.onRightClick;\n\n if (onRightClick) {\n event.preventDefault();\n onRightClick({ event: event, node: node });\n }\n };\n\n _this.setUncontrolledState = function (state) {\n var needSync = false;\n var newState = {};\n\n Object.keys(state).forEach(function (name) {\n if (name in _this.props) return;\n\n needSync = true;\n newState[name] = state[name];\n });\n\n if (needSync) {\n _this.setState(newState);\n }\n };\n\n _this.registerTreeNode = function (key, node) {\n if (node) {\n _this.domTreeNodes[key] = node;\n } else {\n delete _this.domTreeNodes[key];\n }\n };\n\n _this.isKeyChecked = function (key) {\n var _this$state$checkedKe = _this.state.checkedKeys,\n checkedKeys = _this$state$checkedKe === undefined ? [] : _this$state$checkedKe;\n\n return checkedKeys.indexOf(key) !== -1;\n };\n\n _this.renderTreeNode = function (child, index) {\n var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var _this$state3 = _this.state,\n keyEntities = _this$state3.keyEntities,\n _this$state3$expanded = _this$state3.expandedKeys,\n expandedKeys = _this$state3$expanded === undefined ? [] : _this$state3$expanded,\n _this$state3$selected = _this$state3.selectedKeys,\n selectedKeys = _this$state3$selected === undefined ? [] : _this$state3$selected,\n _this$state3$halfChec = _this$state3.halfCheckedKeys,\n halfCheckedKeys = _this$state3$halfChec === undefined ? [] : _this$state3$halfChec,\n _this$state3$loadedKe = _this$state3.loadedKeys,\n loadedKeys = _this$state3$loadedKe === undefined ? [] : _this$state3$loadedKe,\n _this$state3$loadingK = _this$state3.loadingKeys,\n loadingKeys = _this$state3$loadingK === undefined ? [] : _this$state3$loadingK,\n dragOverNodeKey = _this$state3.dragOverNodeKey,\n dropPosition = _this$state3.dropPosition;\n\n var pos = getPosition(level, index);\n var key = child.key || pos;\n\n if (!keyEntities[key]) {\n warnOnlyTreeNode();\n return null;\n }\n\n return React.cloneElement(child, {\n key: key,\n eventKey: key,\n expanded: expandedKeys.indexOf(key) !== -1,\n selected: selectedKeys.indexOf(key) !== -1,\n loaded: loadedKeys.indexOf(key) !== -1,\n loading: loadingKeys.indexOf(key) !== -1,\n checked: _this.isKeyChecked(key),\n halfChecked: halfCheckedKeys.indexOf(key) !== -1,\n pos: pos,\n\n // [Legacy] Drag props\n dragOver: dragOverNodeKey === key && dropPosition === 0,\n dragOverGapTop: dragOverNodeKey === key && dropPosition === -1,\n dragOverGapBottom: dragOverNodeKey === key && dropPosition === 1\n });\n };\n\n _this.state = {\n // TODO: Remove this eslint\n posEntities: {}, // eslint-disable-line react/no-unused-state\n keyEntities: {},\n\n selectedKeys: [],\n checkedKeys: [],\n halfCheckedKeys: [],\n loadedKeys: [],\n loadingKeys: [],\n\n treeNode: []\n };\n\n // Internal usage for `rc-tree-select`, we don't promise it will not change.\n _this.domTreeNodes = {};\n return _this;\n }\n\n _createClass(Tree, [{\n key: 'getChildContext',\n value: function getChildContext() {\n var _props = this.props,\n prefixCls = _props.prefixCls,\n selectable = _props.selectable,\n showIcon = _props.showIcon,\n icon = _props.icon,\n draggable = _props.draggable,\n checkable = _props.checkable,\n checkStrictly = _props.checkStrictly,\n disabled = _props.disabled,\n loadData = _props.loadData,\n filterTreeNode = _props.filterTreeNode,\n motion = _props.motion,\n switcherIcon = _props.switcherIcon;\n\n\n return {\n rcTree: {\n // root: this,\n\n prefixCls: prefixCls,\n selectable: selectable,\n showIcon: showIcon,\n icon: icon,\n switcherIcon: switcherIcon,\n draggable: draggable,\n checkable: checkable,\n checkStrictly: checkStrictly,\n disabled: disabled,\n motion: motion,\n\n loadData: loadData,\n filterTreeNode: filterTreeNode,\n renderTreeNode: this.renderTreeNode,\n isKeyChecked: this.isKeyChecked,\n\n onNodeClick: this.onNodeClick,\n onNodeDoubleClick: this.onNodeDoubleClick,\n onNodeExpand: this.onNodeExpand,\n onNodeSelect: this.onNodeSelect,\n onNodeCheck: this.onNodeCheck,\n onNodeLoad: this.onNodeLoad,\n onNodeMouseEnter: this.onNodeMouseEnter,\n onNodeMouseLeave: this.onNodeMouseLeave,\n onNodeContextMenu: this.onNodeContextMenu,\n onNodeDragStart: this.onNodeDragStart,\n onNodeDragEnter: this.onNodeDragEnter,\n onNodeDragOver: this.onNodeDragOver,\n onNodeDragLeave: this.onNodeDragLeave,\n onNodeDragEnd: this.onNodeDragEnd,\n onNodeDrop: this.onNodeDrop,\n\n registerTreeNode: this.registerTreeNode\n }\n };\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var treeNode = this.state.treeNode;\n var _props2 = this.props,\n prefixCls = _props2.prefixCls,\n className = _props2.className,\n focusable = _props2.focusable,\n style = _props2.style,\n showLine = _props2.showLine,\n _props2$tabIndex = _props2.tabIndex,\n tabIndex = _props2$tabIndex === undefined ? 0 : _props2$tabIndex;\n\n var domProps = getDataAndAria(this.props);\n\n if (focusable) {\n domProps.tabIndex = tabIndex;\n domProps.onKeyDown = this.onKeyDown;\n }\n\n return React.createElement(\n 'ul',\n _extends({}, domProps, {\n className: classNames(prefixCls, className, _defineProperty({}, prefixCls + '-show-line', showLine)),\n style: style,\n role: 'tree',\n unselectable: 'on'\n }),\n mapChildren(treeNode, function (node, index) {\n return _this2.renderTreeNode(node, index);\n })\n );\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(props, prevState) {\n var prevProps = prevState.prevProps;\n\n var newState = {\n prevProps: props\n };\n\n function needSync(name) {\n return !prevProps && name in props || prevProps && prevProps[name] !== props[name];\n }\n\n // ================== Tree Node ==================\n var treeNode = null;\n\n // Check if `treeData` or `children` changed and save into the state.\n if (needSync('treeData')) {\n treeNode = convertDataToTree(props.treeData);\n } else if (needSync('children')) {\n treeNode = toArray(props.children);\n }\n\n // Tree support filter function which will break the tree structure in the vdm.\n // We cache the treeNodes in state so that we can return the treeNode in event trigger.\n if (treeNode) {\n newState.treeNode = treeNode;\n\n // Calculate the entities data for quick match\n var entitiesMap = convertTreeToEntities(treeNode);\n newState.posEntities = entitiesMap.posEntities;\n newState.keyEntities = entitiesMap.keyEntities;\n }\n\n var keyEntities = newState.keyEntities || prevState.keyEntities;\n\n // ================ expandedKeys =================\n if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent')) {\n newState.expandedKeys = props.autoExpandParent || !prevProps && props.defaultExpandParent ? conductExpandParent(props.expandedKeys, keyEntities) : props.expandedKeys;\n } else if (!prevProps && props.defaultExpandAll) {\n newState.expandedKeys = Object.keys(keyEntities);\n } else if (!prevProps && props.defaultExpandedKeys) {\n newState.expandedKeys = props.autoExpandParent || props.defaultExpandParent ? conductExpandParent(props.defaultExpandedKeys, keyEntities) : props.defaultExpandedKeys;\n }\n\n // ================ selectedKeys =================\n if (props.selectable) {\n if (needSync('selectedKeys')) {\n newState.selectedKeys = calcSelectedKeys(props.selectedKeys, props);\n } else if (!prevProps && props.defaultSelectedKeys) {\n newState.selectedKeys = calcSelectedKeys(props.defaultSelectedKeys, props);\n }\n }\n\n // ================= checkedKeys =================\n if (props.checkable) {\n var checkedKeyEntity = void 0;\n\n if (needSync('checkedKeys')) {\n checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {};\n } else if (!prevProps && props.defaultCheckedKeys) {\n checkedKeyEntity = parseCheckedKeys(props.defaultCheckedKeys) || {};\n } else if (treeNode) {\n // If treeNode changed, we also need check it\n checkedKeyEntity = parseCheckedKeys(props.checkedKeys) || {\n checkedKeys: prevState.checkedKeys,\n halfCheckedKeys: prevState.halfCheckedKeys\n };\n }\n\n if (checkedKeyEntity) {\n var _checkedKeyEntity = checkedKeyEntity,\n _checkedKeyEntity$che = _checkedKeyEntity.checkedKeys,\n checkedKeys = _checkedKeyEntity$che === undefined ? [] : _checkedKeyEntity$che,\n _checkedKeyEntity$hal = _checkedKeyEntity.halfCheckedKeys,\n halfCheckedKeys = _checkedKeyEntity$hal === undefined ? [] : _checkedKeyEntity$hal;\n\n\n if (!props.checkStrictly) {\n var conductKeys = conductCheck(checkedKeys, true, keyEntities);\n checkedKeys = conductKeys.checkedKeys;\n halfCheckedKeys = conductKeys.halfCheckedKeys;\n }\n\n newState.checkedKeys = checkedKeys;\n newState.halfCheckedKeys = halfCheckedKeys;\n }\n }\n // ================= loadedKeys ==================\n if (needSync('loadedKeys')) {\n newState.loadedKeys = props.loadedKeys;\n }\n\n return newState;\n }\n\n /**\n * [Legacy] Select handler is less small than node,\n * so that this will trigger when drag enter node or select handler.\n * This is a little tricky if customize css without padding.\n * Better for use mouse move event to refresh drag state.\n * But let's just keep it to avoid event trigger logic change.\n */\n\n\n /**\n * Only update the value which is not in props\n */\n\n\n /**\n * [Legacy] Original logic use `key` as tracking clue.\n * We have to use `cloneElement` to pass `key`.\n */\n\n }]);\n\n return Tree;\n}(React.Component);\n\nTree.propTypes = {\n prefixCls: PropTypes.string,\n className: PropTypes.string,\n style: PropTypes.object,\n tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n children: PropTypes.any,\n treeData: PropTypes.array, // Generate treeNode by children\n showLine: PropTypes.bool,\n showIcon: PropTypes.bool,\n icon: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n focusable: PropTypes.bool,\n selectable: PropTypes.bool,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n checkable: PropTypes.oneOfType([PropTypes.bool, PropTypes.node]),\n checkStrictly: PropTypes.bool,\n draggable: PropTypes.bool,\n defaultExpandParent: PropTypes.bool,\n autoExpandParent: PropTypes.bool,\n defaultExpandAll: PropTypes.bool,\n defaultExpandedKeys: PropTypes.arrayOf(PropTypes.string),\n expandedKeys: PropTypes.arrayOf(PropTypes.string),\n defaultCheckedKeys: PropTypes.arrayOf(PropTypes.string),\n checkedKeys: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), PropTypes.object]),\n defaultSelectedKeys: PropTypes.arrayOf(PropTypes.string),\n selectedKeys: PropTypes.arrayOf(PropTypes.string),\n onClick: PropTypes.func,\n onDoubleClick: PropTypes.func,\n onExpand: PropTypes.func,\n onCheck: PropTypes.func,\n onSelect: PropTypes.func,\n onLoad: PropTypes.func,\n loadData: PropTypes.func,\n loadedKeys: PropTypes.arrayOf(PropTypes.string),\n onMouseEnter: PropTypes.func,\n onMouseLeave: PropTypes.func,\n onRightClick: PropTypes.func,\n onDragStart: PropTypes.func,\n onDragEnter: PropTypes.func,\n onDragOver: PropTypes.func,\n onDragLeave: PropTypes.func,\n onDragEnd: PropTypes.func,\n onDrop: PropTypes.func,\n filterTreeNode: PropTypes.func,\n motion: PropTypes.object,\n switcherIcon: PropTypes.oneOfType([PropTypes.node, PropTypes.func])\n};\nTree.childContextTypes = treeContextTypes;\nTree.defaultProps = {\n prefixCls: 'rc-tree',\n showLine: false,\n showIcon: true,\n selectable: true,\n multiple: false,\n checkable: false,\n disabled: false,\n checkStrictly: false,\n draggable: false,\n defaultExpandParent: true,\n autoExpandParent: false,\n defaultExpandAll: false,\n defaultExpandedKeys: [],\n defaultCheckedKeys: [],\n defaultSelectedKeys: []\n};\n\n\npolyfill(Tree);\n\nexport default Tree;","import Tree from './Tree';\nimport TreeNode from './TreeNode';\n\nTree.TreeNode = TreeNode;\n\nexport { TreeNode };\nexport default Tree;","var grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\nexport default grey;","import Framebuffer from '../classes/framebuffer';\nimport Texture2D from '../classes/texture-2d';\n// TODO - this should be the default export, test cases need updating\nexport const FEATURES = {\n WEBGL2: 'WEBGL2',\n\n // API SUPPORT\n VERTEX_ARRAY_OBJECT: 'VERTEX_ARRAY_OBJECT',\n TIMER_QUERY: 'TIMER_QUERY',\n INSTANCED_RENDERING: 'INSTANCED_RENDERING',\n MULTIPLE_RENDER_TARGETS: 'MULTIPLE_RENDER_TARGETS',\n\n // FEATURES\n ELEMENT_INDEX_UINT32: 'ELEMENT_INDEX_UINT32',\n\n // BLENDING\n BLEND_EQUATION_MINMAX: 'BLEND_EQUATION_MINMAX',\n FLOAT_BLEND: 'FLOAT_BLEND',\n\n // TEXTURES: '// TEXTURES', RENDERBUFFERS\n COLOR_ENCODING_SRGB: 'COLOR_ENCODING_SRGB',\n\n // TEXTURES\n TEXTURE_DEPTH: 'TEXTURE_DEPTH',\n TEXTURE_FLOAT: 'TEXTURE_FLOAT',\n TEXTURE_HALF_FLOAT: 'TEXTURE_HALF_FLOAT',\n\n TEXTURE_FILTER_LINEAR_FLOAT: 'TEXTURE_FILTER_LINEAR_FLOAT',\n TEXTURE_FILTER_LINEAR_HALF_FLOAT: 'TEXTURE_FILTER_LINEAR_HALF_FLOAT',\n TEXTURE_FILTER_ANISOTROPIC: 'TEXTURE_FILTER_ANISOTROPIC',\n\n // FRAMEBUFFERS: '// FRAMEBUFFERS', TEXTURES AND RENDERBUFFERS\n COLOR_ATTACHMENT_RGBA32F: 'COLOR_ATTACHMENT_RGBA32F',\n COLOR_ATTACHMENT_FLOAT: 'COLOR_ATTACHMENT_FLOAT',\n COLOR_ATTACHMENT_HALF_FLOAT: 'COLOR_ATTACHMENT_HALF_FLOAT',\n\n // GLSL extensions\n GLSL_FRAG_DATA: 'GLSL_FRAG_DATA',\n GLSL_FRAG_DEPTH: 'GLSL_FRAG_DEPTH',\n GLSL_DERIVATIVES: 'GLSL_DERIVATIVES',\n GLSL_TEXTURE_LOD: 'GLSL_TEXTURE_LOD'\n};\n\n// function to test if Float 32 bit format texture can be bound as color attachment\nfunction checkFloat32ColorAttachment(gl) {\n const testTexture = new Texture2D(gl, {\n format: gl.RGBA,\n type: gl.FLOAT,\n dataFormat: gl.RGBA\n });\n const testFb = new Framebuffer(gl, {\n id: `test-framebuffer`,\n check: false,\n attachments: {\n [gl.COLOR_ATTACHMENT0]: testTexture\n }\n });\n const status = testFb.getStatus();\n testTexture.delete();\n testFb.delete();\n return status === gl.FRAMEBUFFER_COMPLETE;\n}\n\n// Defines luma.gl \"feature\" names and semantics\n// Format: 'feature-name: [WebGL1 support, WebGL2 support] / [WebGL1 and WebGL2 support]', when support is 'string' it is the name of the extension\nexport default {\n [FEATURES.WEBGL2]: [false, true],\n\n // API SUPPORT\n [FEATURES.VERTEX_ARRAY_OBJECT]: ['OES_vertex_array_object', true],\n [FEATURES.TIMER_QUERY]: ['EXT_disjoint_timer_query', 'EXT_disjoint_timer_query_webgl2'],\n [FEATURES.INSTANCED_RENDERING]: ['ANGLE_instanced_arrays', true],\n [FEATURES.MULTIPLE_RENDER_TARGETS]: ['WEBGL_draw_buffers', true],\n\n // FEATURES\n [FEATURES.ELEMENT_INDEX_UINT32]: ['OES_element_index_uint', true],\n\n // BLENDING\n [FEATURES.BLEND_EQUATION_MINMAX]: ['EXT_blend_minmax', true],\n [FEATURES.FLOAT_BLEND]: ['EXT_float_blend'],\n\n // TEXTURES, RENDERBUFFERS\n [FEATURES.COLOR_ENCODING_SRGB]: ['EXT_sRGB', true],\n\n // TEXTURES\n [FEATURES.TEXTURE_DEPTH]: ['WEBGL_depth_texture', true],\n [FEATURES.TEXTURE_FLOAT]: ['OES_texture_float', true],\n [FEATURES.TEXTURE_HALF_FLOAT]: ['OES_texture_half_float', true],\n\n [FEATURES.TEXTURE_FILTER_LINEAR_FLOAT]: ['OES_texture_float_linear'],\n [FEATURES.TEXTURE_FILTER_LINEAR_HALF_FLOAT]: ['OES_texture_half_float_linear'],\n [FEATURES.TEXTURE_FILTER_ANISOTROPIC]: ['EXT_texture_filter_anisotropic'],\n\n // FRAMEBUFFERS, TEXTURES AND RENDERBUFFERS\n [FEATURES.COLOR_ATTACHMENT_RGBA32F]: [checkFloat32ColorAttachment, 'EXT_color_buffer_float'],\n [FEATURES.COLOR_ATTACHMENT_FLOAT]: [false, 'EXT_color_buffer_float'],\n [FEATURES.COLOR_ATTACHMENT_HALF_FLOAT]: ['EXT_color_buffer_half_float'],\n\n // GLSL extensions\n [FEATURES.GLSL_FRAG_DATA]: ['WEBGL_draw_buffers', true],\n [FEATURES.GLSL_FRAG_DEPTH]: ['EXT_frag_depth', true],\n [FEATURES.GLSL_DERIVATIVES]: ['OES_standard_derivatives', true],\n [FEATURES.GLSL_TEXTURE_LOD]: ['EXT_shader_texture_lod', true]\n};\n","import {assertWebGL2Context, withParameters} from '@luma.gl/gltools';\nimport {assert} from '../utils/assert';\n\n// Should collapse during minification\nconst GL_DEPTH_BUFFER_BIT = 0x00000100;\nconst GL_STENCIL_BUFFER_BIT = 0x00000400;\nconst GL_COLOR_BUFFER_BIT = 0x00004000;\n\nconst GL_COLOR = 0x1800;\nconst GL_DEPTH = 0x1801;\nconst GL_STENCIL = 0x1802;\nconst GL_DEPTH_STENCIL = 0x84f9;\n\n// Should disappear if asserts are removed\nconst ERR_ARGUMENTS = 'clear: bad arguments';\n\n// Optionally clears depth, color and stencil buffers\n/** @type {import('./clear').clear} */\nexport function clear(gl, {framebuffer = null, color = null, depth = null, stencil = null} = {}) {\n const parameters = {};\n\n if (framebuffer) {\n parameters.framebuffer = framebuffer;\n }\n\n let clearFlags = 0;\n\n if (color) {\n clearFlags |= GL_COLOR_BUFFER_BIT;\n if (color !== true) {\n parameters.clearColor = color;\n }\n }\n\n if (depth) {\n clearFlags |= GL_DEPTH_BUFFER_BIT;\n if (depth !== true) {\n parameters.clearDepth = depth;\n }\n }\n\n if (stencil) {\n clearFlags |= GL_STENCIL_BUFFER_BIT;\n if (depth !== true) {\n parameters.clearStencil = depth;\n }\n }\n\n assert(clearFlags !== 0, ERR_ARGUMENTS);\n\n // Temporarily set any clear \"colors\" and call clear\n withParameters(gl, parameters, () => {\n gl.clear(clearFlags);\n });\n}\n\n// WebGL2 - clear a specific drawing buffer\n/** @type {import('./clear').clearBuffer} */\nexport function clearBuffer(\n gl,\n {framebuffer = null, buffer = GL_COLOR, drawBuffer = 0, value = [0, 0, 0, 0]} = {}\n) {\n assertWebGL2Context(gl);\n\n withParameters(gl, {framebuffer}, () => {\n // Method selection per OpenGL ES 3 docs\n switch (buffer) {\n case GL_COLOR:\n switch (value.constructor) {\n case Int32Array:\n gl.clearBufferiv(buffer, drawBuffer, value);\n break;\n case Uint32Array:\n gl.clearBufferuiv(buffer, drawBuffer, value);\n break;\n case Float32Array:\n default:\n gl.clearBufferfv(buffer, drawBuffer, value);\n }\n break;\n\n case GL_DEPTH:\n gl.clearBufferfv(GL_DEPTH, 0, [value]);\n break;\n\n case GL_STENCIL:\n gl.clearBufferiv(GL_STENCIL, 0, [value]);\n break;\n\n case GL_DEPTH_STENCIL:\n const [depth, stencil] = value;\n gl.clearBufferfi(GL_DEPTH_STENCIL, 0, depth, stencil);\n break;\n\n default:\n assert(false, ERR_ARGUMENTS);\n }\n });\n}\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e(t.jsts={})}(this,function(t){\"use strict\";function e(){}function n(t){this.message=t||\"\"}function i(t){this.message=t||\"\"}function r(t){this.message=t||\"\"}function o(){}function s(t){return null===t?Mt:t.color}function a(t){return null===t?null:t.parent}function u(t,e){null!==t&&(t.color=e)}function l(t){return null===t?null:t.left}function c(t){return null===t?null:t.right}function p(){this.root_=null,this.size_=0}function h(){}function f(){this.array_=[],arguments[0]instanceof It&&this.addAll(arguments[0])}function g(){}function d(t){this.message=t||\"\"}function y(){this.array_=[]}\"fill\"in Array.prototype||Object.defineProperty(Array.prototype,\"fill\",{configurable:!0,value:function(t){if(void 0===this||null===this)throw new TypeError(this+\" is not an object\");var e=Object(this),n=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments?parseInt(Number(arguments[1]),10)||0:0;i=i<0?Math.max(n+i,0):Math.min(i,n);var r=2 in arguments&&void 0!==arguments[2]?parseInt(Number(arguments[2]),10)||0:n;for(r=r<0?Math.max(n+arguments[2],0):Math.min(r,n);i<r;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(t){return\"number\"==typeof t&&isFinite(t)},Number.isInteger=Number.isInteger||function(t){return\"number\"==typeof t&&isFinite(t)&&Math.floor(t)===t},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(t){return t!=t},Math.trunc=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};var _=function(){};_.prototype.interfaces_=function(){return[]},_.prototype.getClass=function(){return _},_.prototype.equalsWithTolerance=function(t,e,n){return Math.abs(t-e)<=n};var m=function(t){function e(e){t.call(this,e),this.name=\"IllegalArgumentException\",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),v=function(){},I={MAX_VALUE:{configurable:!0}};v.isNaN=function(t){return Number.isNaN(t)},v.doubleToLongBits=function(t){return t},v.longBitsToDouble=function(t){return t},v.isInfinite=function(t){return!Number.isFinite(t)},I.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(v,I);var E=function(){},x=function(){},N=function(){},C=function t(){if(this.x=null,this.y=null,this.z=null,0===arguments.length)this.x=0,this.y=0,this.z=t.NULL_ORDINATE;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.z=e.z}else 2===arguments.length?(this.x=arguments[0],this.y=arguments[1],this.z=t.NULL_ORDINATE):3===arguments.length&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},S={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};C.prototype.setOrdinate=function(t,e){switch(t){case C.X:this.x=e;break;case C.Y:this.y=e;break;case C.Z:this.z=e;break;default:throw new m(\"Invalid ordinate index: \"+t)}},C.prototype.equals2D=function(){if(1===arguments.length){var t=arguments[0];return this.x===t.x&&this.y===t.y}if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!_.equalsWithTolerance(this.x,e.x,n)&&!!_.equalsWithTolerance(this.y,e.y,n)}},C.prototype.getOrdinate=function(t){switch(t){case C.X:return this.x;case C.Y:return this.y;case C.Z:return this.z}throw new m(\"Invalid ordinate index: \"+t)},C.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||v.isNaN(this.z))&&v.isNaN(t.z)},C.prototype.equals=function(t){return t instanceof C&&this.equals2D(t)},C.prototype.equalInZ=function(t,e){return _.equalsWithTolerance(this.z,t.z,e)},C.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},C.prototype.clone=function(){},C.prototype.copy=function(){return new C(this)},C.prototype.toString=function(){return\"(\"+this.x+\", \"+this.y+\", \"+this.z+\")\"},C.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+n*n+i*i)},C.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},C.prototype.hashCode=function(){var t=17;return t=37*t+C.hashCode(this.x),t=37*t+C.hashCode(this.y)},C.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},C.prototype.interfaces_=function(){return[E,x,e]},C.prototype.getClass=function(){return C},C.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=v.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},S.DimensionalComparator.get=function(){return L},S.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},S.NULL_ORDINATE.get=function(){return v.NaN},S.X.get=function(){return 0},S.Y.get=function(){return 1},S.Z.get=function(){return 2},Object.defineProperties(C,S);var L=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new m(\"only 2 or 3 dimensions may be specified\");this._dimensionsToTest=e}};L.prototype.compare=function(t,e){var n=t,i=e,r=L.compare(n.x,i.x);if(0!==r)return r;var o=L.compare(n.y,i.y);if(0!==o)return o;if(this._dimensionsToTest<=2)return 0;return L.compare(n.z,i.z)},L.prototype.interfaces_=function(){return[N]},L.prototype.getClass=function(){return L},L.compare=function(t,e){return t<e?-1:t>e?1:v.isNaN(t)?v.isNaN(e)?0:-1:v.isNaN(e)?1:0};var b=function(){};b.prototype.create=function(){},b.prototype.interfaces_=function(){return[]},b.prototype.getClass=function(){return b};var w=function(){},O={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};w.prototype.interfaces_=function(){return[]},w.prototype.getClass=function(){return w},w.toLocationSymbol=function(t){switch(t){case w.EXTERIOR:return\"e\";case w.BOUNDARY:return\"b\";case w.INTERIOR:return\"i\";case w.NONE:return\"-\"}throw new m(\"Unknown location value: \"+t)},O.INTERIOR.get=function(){return 0},O.BOUNDARY.get=function(){return 1},O.EXTERIOR.get=function(){return 2},O.NONE.get=function(){return-1},Object.defineProperties(w,O);var T=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},R=function(){},P={LOG_10:{configurable:!0}};R.prototype.interfaces_=function(){return[]},R.prototype.getClass=function(){return R},R.log10=function(t){var e=Math.log(t);return v.isInfinite(e)?e:v.isNaN(e)?e:e/R.LOG_10},R.min=function(t,e,n,i){var r=t;return e<r&&(r=e),n<r&&(r=n),i<r&&(r=i),r},R.clamp=function(){if(\"number\"==typeof arguments[2]&&\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var t=arguments[0],e=arguments[1],n=arguments[2];return t<e?e:t>n?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],r=arguments[1],o=arguments[2];return i<r?r:i>o?o:i}},R.wrap=function(t,e){return t<0?e- -t%e:t%e},R.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=t;return e>i&&(i=e),n>i&&(i=n),i}if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],u=r;return o>u&&(u=o),s>u&&(u=s),a>u&&(u=a),u}},R.average=function(t,e){return(t+e)/2},P.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(R,P);var D=function(t){this.str=t};D.prototype.append=function(t){this.str+=t},D.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},D.prototype.toString=function(t){return this.str};var M=function(t){this.value=t};M.prototype.intValue=function(){return this.value},M.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},M.isNaN=function(t){return Number.isNaN(t)};var A=function(){};A.isWhitespace=function(t){return t<=32&&t>=0||127===t},A.toUpperCase=function(t){return t.toUpperCase()};var F=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if(\"number\"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if(\"string\"==typeof arguments[0]){var i=arguments[0];t.call(this,t.parse(i))}}else if(2===arguments.length){var r=arguments[0],o=arguments[1];this.init(r,o)}},G={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};F.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},F.prototype.extractSignificantDigits=function(t,e){var n=this.abs(),i=F.magnitude(n._hi),r=F.TEN.pow(i);(n=n.divide(r)).gt(F.TEN)?(n=n.divide(F.TEN),i+=1):n.lt(F.ONE)&&(n=n.multiply(F.TEN),i-=1);for(var o=i+1,s=new D,a=F.MAX_PRINT_DIGITS-1,u=0;u<=a;u++){t&&u===o&&s.append(\".\");var l=Math.trunc(n._hi);if(l<0)break;var c=!1,p=0;l>9?(c=!0,p=\"9\"):p=\"0\"+l,s.append(p),n=n.subtract(F.valueOf(l)).multiply(F.TEN),c&&n.selfAdd(F.TEN);var h=!0,f=F.magnitude(n._hi);if(f<0&&Math.abs(f)>=a-u&&(h=!1),!h)break}return e[0]=i,s.toString()},F.prototype.sqr=function(){return this.multiply(this)},F.prototype.doubleValue=function(){return this._hi+this._lo},F.prototype.subtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.add(t.negate())}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},F.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},F.prototype.isZero=function(){return 0===this._hi&&0===this._lo},F.prototype.selfSubtract=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},F.prototype.getSpecialNumberString=function(){return this.isZero()?\"0.0\":this.isNaN()?\"NaN \":null},F.prototype.min=function(t){return this.le(t)?this:t},F.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null,c=null,p=null;return u=this._hi/n,l=F.SPLIT*u,r=l-u,p=F.SPLIT*n,r=l-r,o=u-r,s=p-n,c=u*n,s=p-s,a=n-s,p=r*s-c+r*a+o*s+o*a,l=(this._hi-c-p+this._lo-u*i)/n,p=u+l,this._hi=p,this._lo=u-p+l,this}},F.prototype.dump=function(){return\"DD<\"+this._hi+\", \"+this._lo+\">\"},F.prototype.divide=function(){if(arguments[0]instanceof F){var t=arguments[0],e=null,n=null,i=null,r=null,o=null,s=null,a=null,u=null;n=(o=this._hi/t._hi)-(e=(s=F.SPLIT*o)-(e=s-o)),u=e*(i=(u=F.SPLIT*t._hi)-(i=u-t._hi))-(a=o*t._hi)+e*(r=t._hi-i)+n*i+n*r,s=(this._hi-a-u+this._lo-o*t._lo)/t._hi;return new F(u=o+s,o-u+s)}if(\"number\"==typeof arguments[0]){var l=arguments[0];return v.isNaN(l)?F.createNaN():F.copy(this).selfDivide(l,0)}},F.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},F.prototype.pow=function(t){if(0===t)return F.valueOf(1);var e=new F(this),n=F.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2==1&&n.selfMultiply(e),(i/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},F.prototype.ceil=function(){if(this.isNaN())return F.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new F(t,e)},F.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},F.prototype.rint=function(){if(this.isNaN())return this;return this.add(.5).floor()},F.prototype.setValue=function(){if(arguments[0]instanceof F){var t=arguments[0];return this.init(t),this}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},F.prototype.max=function(t){return this.ge(t)?this:t},F.prototype.sqrt=function(){if(this.isZero())return F.valueOf(0);if(this.isNegative())return F.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=F.valueOf(e),i=this.subtract(n.sqr())._hi*(.5*t);return n.add(i)},F.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0],n=null,i=null,r=null,o=null,s=null,a=null;return r=this._hi+e,s=r-this._hi,o=r-s,o=e-s+(this._hi-o),a=o+this._lo,n=r+a,i=a+(r-n),this._hi=n+i,this._lo=i+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],l=arguments[1],c=null,p=null,h=null,f=null,g=null,d=null,y=null;f=this._hi+u,p=this._lo+l,g=f-(d=f-this._hi),h=p-(y=p-this._lo);var _=(c=f+(d=(g=u-d+(this._hi-g))+p))+(d=(h=l-y+(this._lo-h))+(d+(f-c))),m=d+(c-_);return this._hi=_,this._lo=m,this}},F.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof F){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1],r=null,o=null,s=null,a=null,u=null,l=null;r=(u=F.SPLIT*this._hi)-this._hi,l=F.SPLIT*n,r=u-r,o=this._hi-r,s=l-n;var c=(u=this._hi*n)+(l=r*(s=l-s)-u+r*(a=n-s)+o*s+o*a+(this._hi*i+this._lo*n)),p=l+(r=u-c);return this._hi=c,this._lo=p,this}},F.prototype.selfSqr=function(){return this.selfMultiply(this)},F.prototype.floor=function(){if(this.isNaN())return F.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new F(t,e)},F.prototype.negate=function(){return this.isNaN()?this:new F(-this._hi,-this._lo)},F.prototype.clone=function(){},F.prototype.multiply=function(){if(arguments[0]instanceof F){var t=arguments[0];return t.isNaN()?F.createNaN():F.copy(this).selfMultiply(t)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return v.isNaN(e)?F.createNaN():F.copy(this).selfMultiply(e,0)}},F.prototype.isNaN=function(){return v.isNaN(this._hi)},F.prototype.intValue=function(){return Math.trunc(this._hi)},F.prototype.toString=function(){var t=F.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},F.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),i=e[0]+1,r=n;if(\".\"===n.charAt(0))r=\"0\"+n;else if(i<0)r=\"0.\"+F.stringOfChar(\"0\",-i)+n;else if(-1===n.indexOf(\".\")){var o=i-n.length;r=n+F.stringOfChar(\"0\",o)+\".0\"}return this.isNegative()?\"-\"+r:r},F.prototype.reciprocal=function(){var t=null,e=null,n=null,i=null,r=null,o=null,s=null,a=null;e=(r=1/this._hi)-(t=(o=F.SPLIT*r)-(t=o-r)),n=(a=F.SPLIT*this._hi)-this._hi;var u=r+(o=(1-(s=r*this._hi)-(a=t*(n=a-n)-s+t*(i=this._hi-n)+e*n+e*i)-r*this._lo)/this._hi);return new F(u,r-u+o)},F.prototype.toSciNotation=function(){if(this.isZero())return F.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),i=F.SCI_NOT_EXPONENT_CHAR+e[0];if(\"0\"===n.charAt(0))throw new Error(\"Found leading zero: \"+n);var r=\"\";n.length>1&&(r=n.substring(1));var o=n.charAt(0)+\".\"+r;return this.isNegative()?\"-\"+o+i:o+i},F.prototype.abs=function(){return this.isNaN()?F.NaN:this.isNegative()?this.negate():new F(this)},F.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},F.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},F.prototype.add=function(){if(arguments[0]instanceof F){var t=arguments[0];return F.copy(this).selfAdd(t)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return F.copy(this).selfAdd(e)}},F.prototype.init=function(){if(1===arguments.length){if(\"number\"==typeof arguments[0]){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof F){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._hi=n,this._lo=i}},F.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},F.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},F.prototype.trunc=function(){return this.isNaN()?F.NaN:this.isPositive()?this.floor():this.ceil()},F.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},F.prototype.interfaces_=function(){return[e,E,x]},F.prototype.getClass=function(){return F},F.sqr=function(t){return F.valueOf(t).selfMultiply(t)},F.valueOf=function(){if(\"string\"==typeof arguments[0]){var t=arguments[0];return F.parse(t)}if(\"number\"==typeof arguments[0]){var e=arguments[0];return new F(e)}},F.sqrt=function(t){return F.valueOf(t).sqrt()},F.parse=function(t){for(var e=0,n=t.length;A.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<n){var r=t.charAt(e);\"-\"!==r&&\"+\"!==r||(e++,\"-\"===r&&(i=!0))}for(var o=new F,s=0,a=0,u=0;!(e>=n);){var l=t.charAt(e);if(e++,A.isDigit(l)){var c=l-\"0\";o.selfMultiply(F.TEN),o.selfAdd(c),s++}else{if(\".\"!==l){if(\"e\"===l||\"E\"===l){var p=t.substring(e);try{u=M.parseInt(p)}catch(e){throw e instanceof Error?new Error(\"Invalid exponent \"+p+\" in string \"+t):e}break}throw new Error(\"Unexpected character '\"+l+\"' at position \"+e+\" in string \"+t)}a=s}}var h=o,f=s-a-u;if(0===f)h=o;else if(f>0){var g=F.TEN.pow(f);h=o.divide(g)}else if(f<0){var d=F.TEN.pow(-f);h=o.multiply(d)}return i?h.negate():h},F.createNaN=function(){return new F(v.NaN,v.NaN)},F.copy=function(t){return new F(t)},F.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(n));return 10*Math.pow(10,i)<=e&&(i+=1),i},F.stringOfChar=function(t,e){for(var n=new D,i=0;i<e;i++)n.append(t);return n.toString()},G.PI.get=function(){return new F(3.141592653589793,1.2246467991473532e-16)},G.TWO_PI.get=function(){return new F(6.283185307179586,2.4492935982947064e-16)},G.PI_2.get=function(){return new F(1.5707963267948966,6.123233995736766e-17)},G.E.get=function(){return new F(2.718281828459045,1.4456468917292502e-16)},G.NaN.get=function(){return new F(v.NaN,v.NaN)},G.EPS.get=function(){return 1.23259516440783e-32},G.SPLIT.get=function(){return 134217729},G.MAX_PRINT_DIGITS.get=function(){return 32},G.TEN.get=function(){return F.valueOf(10)},G.ONE.get=function(){return F.valueOf(1)},G.SCI_NOT_EXPONENT_CHAR.get=function(){return\"E\"},G.SCI_NOT_ZERO.get=function(){return\"0.0E0\"},Object.defineProperties(F,G);var q=function(){},B={DP_SAFE_EPSILON:{configurable:!0}};q.prototype.interfaces_=function(){return[]},q.prototype.getClass=function(){return q},q.orientationIndex=function(t,e,n){var i=q.orientationIndexFilter(t,e,n);if(i<=1)return i;var r=F.valueOf(e.x).selfAdd(-t.x),o=F.valueOf(e.y).selfAdd(-t.y),s=F.valueOf(n.x).selfAdd(-e.x),a=F.valueOf(n.y).selfAdd(-e.y);return r.selfMultiply(a).selfSubtract(o.selfMultiply(s)).signum()},q.signOfDet2x2=function(t,e,n,i){return t.multiply(i).selfSubtract(e.multiply(n)).signum()},q.intersection=function(t,e,n,i){var r=F.valueOf(i.y).selfSubtract(n.y).selfMultiply(F.valueOf(e.x).selfSubtract(t.x)),o=F.valueOf(i.x).selfSubtract(n.x).selfMultiply(F.valueOf(e.y).selfSubtract(t.y)),s=r.subtract(o),a=F.valueOf(i.x).selfSubtract(n.x).selfMultiply(F.valueOf(t.y).selfSubtract(n.y)),u=F.valueOf(i.y).selfSubtract(n.y).selfMultiply(F.valueOf(t.x).selfSubtract(n.x)),l=a.subtract(u).selfDivide(s).doubleValue(),c=F.valueOf(t.x).selfAdd(F.valueOf(e.x).selfSubtract(t.x).selfMultiply(l)).doubleValue(),p=F.valueOf(e.x).selfSubtract(t.x).selfMultiply(F.valueOf(t.y).selfSubtract(n.y)),h=F.valueOf(e.y).selfSubtract(t.y).selfMultiply(F.valueOf(t.x).selfSubtract(n.x)),f=p.subtract(h).selfDivide(s).doubleValue(),g=F.valueOf(n.y).selfAdd(F.valueOf(i.y).selfSubtract(n.y).selfMultiply(f)).doubleValue();return new C(c,g)},q.orientationIndexFilter=function(t,e,n){var i=null,r=(t.x-n.x)*(e.y-n.y),o=(t.y-n.y)*(e.x-n.x),s=r-o;if(r>0){if(o<=0)return q.signum(s);i=r+o}else{if(!(r<0))return q.signum(s);if(o>=0)return q.signum(s);i=-r-o}var a=q.DP_SAFE_EPSILON*i;return s>=a||-s>=a?q.signum(s):2},q.signum=function(t){return t>0?1:t<0?-1:0},B.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(q,B);var V=function(){},U={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};U.X.get=function(){return 0},U.Y.get=function(){return 1},U.Z.get=function(){return 2},U.M.get=function(){return 3},V.prototype.setOrdinate=function(t,e,n){},V.prototype.size=function(){},V.prototype.getOrdinate=function(t,e){},V.prototype.getCoordinate=function(){},V.prototype.getCoordinateCopy=function(t){},V.prototype.getDimension=function(){},V.prototype.getX=function(t){},V.prototype.clone=function(){},V.prototype.expandEnvelope=function(t){},V.prototype.copy=function(){},V.prototype.getY=function(t){},V.prototype.toCoordinateArray=function(){},V.prototype.interfaces_=function(){return[x]},V.prototype.getClass=function(){return V},Object.defineProperties(V,U);var z=function(){},X=function(t){function e(){t.call(this,\"Projective point not representable on the Cartesian plane.\")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(z),Y=function(){};Y.arraycopy=function(t,e,n,i,r){for(var o=0,s=e;s<e+r;s++)n[i+o]=t[s],o++},Y.getProperty=function(t){return{\"line.separator\":\"\\n\"}[t]};var k=function t(){if(this.x=null,this.y=null,this.w=null,0===arguments.length)this.x=0,this.y=0,this.w=1;else if(1===arguments.length){var e=arguments[0];this.x=e.x,this.y=e.y,this.w=1}else if(2===arguments.length){if(\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var n=arguments[0],i=arguments[1];this.x=n,this.y=i,this.w=1}else if(arguments[0]instanceof t&&arguments[1]instanceof t){var r=arguments[0],o=arguments[1];this.x=r.y*o.w-o.y*r.w,this.y=o.x*r.w-r.x*o.w,this.w=r.x*o.y-o.x*r.y}else if(arguments[0]instanceof C&&arguments[1]instanceof C){var s=arguments[0],a=arguments[1];this.x=s.y-a.y,this.y=a.x-s.x,this.w=s.x*a.y-a.x*s.y}}else if(3===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(4===arguments.length){var p=arguments[0],h=arguments[1],f=arguments[2],g=arguments[3],d=p.y-h.y,y=h.x-p.x,_=p.x*h.y-h.x*p.y,m=f.y-g.y,v=g.x-f.x,I=f.x*g.y-g.x*f.y;this.x=y*I-v*_,this.y=m*_-d*I,this.w=d*v-m*y}};k.prototype.getY=function(){var t=this.y/this.w;if(v.isNaN(t)||v.isInfinite(t))throw new X;return t},k.prototype.getX=function(){var t=this.x/this.w;if(v.isNaN(t)||v.isInfinite(t))throw new X;return t},k.prototype.getCoordinate=function(){var t=new C;return t.x=this.getX(),t.y=this.getY(),t},k.prototype.interfaces_=function(){return[]},k.prototype.getClass=function(){return k},k.intersection=function(t,e,n,i){var r=t.y-e.y,o=e.x-t.x,s=t.x*e.y-e.x*t.y,a=n.y-i.y,u=i.x-n.x,l=n.x*i.y-i.x*n.y,c=r*u-a*o,p=(o*l-u*s)/c,h=(a*s-r*l)/c;if(v.isNaN(p)||v.isInfinite(p)||v.isNaN(h)||v.isInfinite(h))throw new X;return new C(p,h)};var j=function t(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,0===arguments.length)this.init();else if(1===arguments.length){if(arguments[0]instanceof C){var e=arguments[0];this.init(e.x,e.x,e.y,e.y)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.init(i.x,r.x,i.y,r.y)}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],u=arguments[3];this.init(o,s,a,u)}},H={serialVersionUID:{configurable:!0}};j.prototype.getArea=function(){return this.getWidth()*this.getHeight()},j.prototype.equals=function(t){if(!(t instanceof j))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},j.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new j;var e=this._minx>t._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,r=this._maxy<t._maxy?this._maxy:t._maxy;return new j(e,i,n,r)},j.prototype.isNull=function(){return this._maxx<this._minx},j.prototype.getMaxX=function(){return this._maxx},j.prototype.covers=function(){if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.covers(t.x,t.y)}if(arguments[0]instanceof j){var e=arguments[0];return!this.isNull()&&!e.isNull()&&(e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&(n>=this._minx&&n<=this._maxx&&i>=this._miny&&i<=this._maxy)}},j.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}if(arguments[0]instanceof C){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return!this.isNull()&&!(n>this._maxx||n<this._minx||i>this._maxy||i<this._miny)}},j.prototype.getMinY=function(){return this._miny},j.prototype.getMinX=function(){return this._minx},j.prototype.expandToInclude=function(){if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=i,this._maxy=i):(n<this._minx&&(this._minx=n),n>this._maxx&&(this._maxx=n),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},j.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},j.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},j.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},j.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},j.prototype.toString=function(){return\"Env[\"+this._minx+\" : \"+this._maxx+\", \"+this._miny+\" : \"+this._maxy+\"]\"},j.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},j.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},j.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},j.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},j.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof j){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof C){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.covers(n,i)}},j.prototype.centre=function(){return this.isNull()?null:new C((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},j.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof j){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.init(n.x,i.x,n.y,i.y)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];r<o?(this._minx=r,this._maxx=o):(this._minx=o,this._maxx=r),s<a?(this._miny=s,this._maxy=a):(this._miny=a,this._maxy=s)}},j.prototype.getMaxY=function(){return this._maxy},j.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxy<t._miny?n=t._miny-this._maxy:this._miny>t._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},j.prototype.hashCode=function(){var t=17;return t=37*t+C.hashCode(this._minx),t=37*t+C.hashCode(this._maxx),t=37*t+C.hashCode(this._miny),t=37*t+C.hashCode(this._maxy)},j.prototype.interfaces_=function(){return[E,e]},j.prototype.getClass=function(){return j},j.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.x<e.x?t.x:e.x)&&n.x<=(t.x>e.x?t.x:e.x)&&n.y>=(t.y<e.y?t.y:e.y)&&n.y<=(t.y>e.y?t.y:e.y)}if(4===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),u=Math.max(o.x,s.x),l=Math.min(i.x,r.x),c=Math.max(i.x,r.x);return!(l>u)&&(!(c<a)&&(a=Math.min(o.y,s.y),u=Math.max(o.y,s.y),l=Math.min(i.y,r.y),c=Math.max(i.y,r.y),!(l>u)&&!(c<a)))}},H.serialVersionUID.get=function(){return 0x51845cd552189800},Object.defineProperties(j,H);var W={typeStr:/^\\s*(\\w+)\\s*\\(\\s*(.*)\\s*\\)\\s*$/,emptyTypeStr:/^\\s*(\\w+)\\s*EMPTY\\s*$/,spaces:/\\s+/,parenComma:/\\)\\s*,\\s*\\(/,doubleParenComma:/\\)\\s*\\)\\s*,\\s*\\(\\s*\\(/,trimParens:/^\\s*\\(?(.*?)\\)?\\s*$/},K=function(t){this.geometryFactory=t||new _e};K.prototype.read=function(t){var e,n,i;t=t.replace(/[\\n\\r]/g,\" \");var r=W.typeStr.exec(t);if(-1!==t.search(\"EMPTY\")&&((r=W.emptyTypeStr.exec(t))[2]=void 0),r&&(n=r[1].toLowerCase(),i=r[2],Q[n]&&(e=Q[n].apply(this,[i]))),void 0===e)throw new Error(\"Could not parse WKT \"+t);return e},K.prototype.write=function(t){return this.extractGeometry(t)},K.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!J[e])return null;var n=e.toUpperCase();return t.isEmpty()?n+\" EMPTY\":n+\"(\"+J[e].apply(this,[t])+\")\"};var J={coordinate:function(t){return t.x+\" \"+t.y},point:function(t){return J.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(\"(\"+J.point.apply(this,[t._geometries[n]])+\")\");return e.join(\",\")},linestring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(J.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(\",\")},linearring:function(t){for(var e=[],n=0,i=t._points._coordinates.length;n<i;++n)e.push(J.coordinate.apply(this,[t._points._coordinates[n]]));return e.join(\",\")},multilinestring:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(\"(\"+J.linestring.apply(this,[t._geometries[n]])+\")\");return e.join(\",\")},polygon:function(t){var e=[];e.push(\"(\"+J.linestring.apply(this,[t._shell])+\")\");for(var n=0,i=t._holes.length;n<i;++n)e.push(\"(\"+J.linestring.apply(this,[t._holes[n]])+\")\");return e.join(\",\")},multipolygon:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(\"(\"+J.polygon.apply(this,[t._geometries[n]])+\")\");return e.join(\",\")},geometrycollection:function(t){for(var e=[],n=0,i=t._geometries.length;n<i;++n)e.push(this.extractGeometry(t._geometries[n]));return e.join(\",\")}},Q={point:function(t){if(void 0===t)return this.geometryFactory.createPoint();var e=t.trim().split(W.spaces);return this.geometryFactory.createPoint(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){if(void 0===t)return this.geometryFactory.createMultiPoint();for(var e,n=t.trim().split(\",\"),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(W.trimParens,\"$1\"),i.push(Q.point.apply(this,[e]));return this.geometryFactory.createMultiPoint(i)},linestring:function(t){if(void 0===t)return this.geometryFactory.createLineString();for(var e,n=t.trim().split(\",\"),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(W.spaces),i.push(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLineString(i)},linearring:function(t){if(void 0===t)return this.geometryFactory.createLinearRing();for(var e,n=t.trim().split(\",\"),i=[],r=0,o=n.length;r<o;++r)e=n[r].trim().split(W.spaces),i.push(new C(Number.parseFloat(e[0]),Number.parseFloat(e[1])));return this.geometryFactory.createLinearRing(i)},multilinestring:function(t){if(void 0===t)return this.geometryFactory.createMultiLineString();for(var e,n=t.trim().split(W.parenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(W.trimParens,\"$1\"),i.push(Q.linestring.apply(this,[e]));return this.geometryFactory.createMultiLineString(i)},polygon:function(t){if(void 0===t)return this.geometryFactory.createPolygon();for(var e,n,i,r,o=t.trim().split(W.parenComma),s=[],a=0,u=o.length;a<u;++a)e=o[a].replace(W.trimParens,\"$1\"),n=Q.linestring.apply(this,[e]),i=this.geometryFactory.createLinearRing(n._points),0===a?r=i:s.push(i);return this.geometryFactory.createPolygon(r,s)},multipolygon:function(t){if(void 0===t)return this.geometryFactory.createMultiPolygon();for(var e,n=t.trim().split(W.doubleParenComma),i=[],r=0,o=n.length;r<o;++r)e=n[r].replace(W.trimParens,\"$1\"),i.push(Q.polygon.apply(this,[e]));return this.geometryFactory.createMultiPolygon(i)},geometrycollection:function(t){if(void 0===t)return this.geometryFactory.createGeometryCollection();for(var e=(t=t.replace(/,\\s*([A-Za-z])/g,\"|$1\")).trim().split(\"|\"),n=[],i=0,r=e.length;i<r;++i)n.push(this.read(e[i]));return this.geometryFactory.createGeometryCollection(n)}},Z=function(t){this.parser=new K(t)};Z.prototype.write=function(t){return this.parser.write(t)},Z.toLineString=function(t,e){if(2!==arguments.length)throw new Error(\"Not implemented\");return\"LINESTRING ( \"+t.x+\" \"+t.y+\", \"+e.x+\" \"+e.y+\" )\"};var $=function(t){function e(e){t.call(this,e),this.name=\"RuntimeException\",this.message=e,this.stack=(new t).stack}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),tt=function(t){function e(){if(t.call(this),0===arguments.length)t.call(this);else if(1===arguments.length){var e=arguments[0];t.call(this,e)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($),et=function(){};et.prototype.interfaces_=function(){return[]},et.prototype.getClass=function(){return et},et.shouldNeverReachHere=function(){if(0===arguments.length)et.shouldNeverReachHere(null);else if(1===arguments.length){var t=arguments[0];throw new tt(\"Should never reach here\"+(null!==t?\": \"+t:\"\"))}},et.isTrue=function(){var t,e;if(1===arguments.length)t=arguments[0],et.isTrue(t,null);else if(2===arguments.length&&(t=arguments[0],e=arguments[1],!t))throw null===e?new tt:new tt(e)},et.equals=function(){var t,e,n;if(2===arguments.length)t=arguments[0],e=arguments[1],et.equals(t,e,null);else if(3===arguments.length&&(t=arguments[0],e=arguments[1],n=arguments[2],!e.equals(t)))throw new tt(\"Expected \"+t+\" but encountered \"+e+(null!==n?\": \"+n:\"\"))};var nt=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new C,this._intPt[1]=new C,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},it={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};nt.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},nt.prototype.getTopologySummary=function(){var t=new D;return this.isEndPoint()&&t.append(\" endpoint\"),this._isProper&&t.append(\" proper\"),this.isCollinear()&&t.append(\" collinear\"),t.toString()},nt.prototype.computeIntersection=function(t,e,n,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=n,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,n,i)},nt.prototype.getIntersectionNum=function(){return this._result},nt.prototype.computeIntLineIndex=function(){if(0===arguments.length)null===this._intLineIndex&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(1===arguments.length){var t=arguments[0];this.getEdgeDistance(t,0)>this.getEdgeDistance(t,1)?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},nt.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},nt.prototype.setPrecisionModel=function(t){this._precisionModel=t},nt.prototype.isInteriorIntersection=function(){if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var t=arguments[0],e=0;e<this._result;e++)if(!this._intPt[e].equals2D(this._inputLines[t][0])&&!this._intPt[e].equals2D(this._inputLines[t][1]))return!0;return!1}},nt.prototype.getIntersection=function(t){return this._intPt[t]},nt.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},nt.prototype.hasIntersection=function(){return this._result!==nt.NO_INTERSECTION},nt.prototype.getEdgeDistance=function(t,e){return nt.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1])},nt.prototype.isCollinear=function(){return this._result===nt.COLLINEAR_INTERSECTION},nt.prototype.toString=function(){return Z.toLineString(this._inputLines[0][0],this._inputLines[0][1])+\" - \"+Z.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},nt.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},nt.prototype.isIntersection=function(t){for(var e=0;e<this._result;e++)if(this._intPt[e].equals2D(t))return!0;return!1},nt.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},nt.prototype.interfaces_=function(){return[]},nt.prototype.getClass=function(){return nt},nt.computeEdgeDistance=function(t,e,n){var i=Math.abs(n.x-e.x),r=Math.abs(n.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(n))o=i>r?i:r;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=i>r?s:a)||t.equals(e)||(o=Math.max(s,a))}return et.isTrue(!(0===o&&!t.equals(e)),\"Bad distance calculation\"),o},nt.nonRobustComputeEdgeDistance=function(t,e,n){var i=t.x-e.x,r=t.y-e.y,o=Math.sqrt(i*i+r*r);return et.isTrue(!(0===o&&!t.equals(e)),\"Invalid distance calculation\"),o},it.DONT_INTERSECT.get=function(){return 0},it.DO_INTERSECT.get=function(){return 1},it.COLLINEAR.get=function(){return 2},it.NO_INTERSECTION.get=function(){return 0},it.POINT_INTERSECTION.get=function(){return 1},it.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(nt,it);var rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new j(this._inputLines[0][0],this._inputLines[0][1]),n=new j(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2];if(this._isProper=!1,j.intersects(n,i,e)&&0===at.orientationIndex(n,i,e)&&0===at.orientationIndex(i,n,e))return this._isProper=!0,(e.equals(n)||e.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,i,r){r.x=this.smallestInAbsValue(t.x,e.x,n.x,i.x),r.y=this.smallestInAbsValue(t.y,e.y,n.y,i.y),t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.safeHCoordinateIntersection=function(t,n,i,r){var o=null;try{o=k.intersection(t,n,i,r)}catch(s){if(!(s instanceof X))throw s;o=e.nearestEndpoint(t,n,i,r)}return o},e.prototype.intersection=function(t,n,i,r){var o=this.intersectionWithNormalization(t,n,i,r);return this.isInSegmentEnvelopes(o)||(o=new C(e.nearestEndpoint(t,n,i,r))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,i){var r=t,o=Math.abs(r);return Math.abs(e)<o&&(r=e,o=Math.abs(e)),Math.abs(n)<o&&(r=n,o=Math.abs(n)),Math.abs(i)<o&&(r=i),r},e.prototype.checkDD=function(t,e,n,i,r){var o=q.intersection(t,e,n,i),s=this.isInSegmentEnvelopes(o);Y.out.println(\"DD in env = \"+s+\" --------------------- \"+o),r.distance(o)>1e-4&&Y.out.println(\"Distance = \"+r.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,i){var r=new C(t),o=new C(e),s=new C(n),a=new C(i),u=new C;this.normalizeToEnvCentre(r,o,s,a,u);var l=this.safeHCoordinateIntersection(r,o,s,a);return l.x+=u.x,l.y+=u.y,l},e.prototype.computeCollinearIntersection=function(e,n,i,r){var o=j.intersects(e,n,i),s=j.intersects(e,n,r),a=j.intersects(i,r,e),u=j.intersects(i,r,n);return o&&s?(this._intPt[0]=i,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||s||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,i,r){var o=t.x<e.x?t.x:e.x,s=t.y<e.y?t.y:e.y,a=t.x>e.x?t.x:e.x,u=t.y>e.y?t.y:e.y,l=n.x<i.x?n.x:i.x,c=n.y<i.y?n.y:i.y,p=n.x>i.x?n.x:i.x,h=n.y>i.y?n.y:i.y,f=((o>l?o:l)+(a<p?a:p))/2,g=((s>c?s:c)+(u<h?u:h))/2;r.x=f,r.y=g,t.x-=r.x,t.y-=r.y,e.x-=r.x,e.y-=r.y,n.x-=r.x,n.y-=r.y,i.x-=r.x,i.y-=r.y},e.prototype.computeIntersect=function(e,n,i,r){if(this._isProper=!1,!j.intersects(e,n,i,r))return t.NO_INTERSECTION;var o=at.orientationIndex(e,n,i),s=at.orientationIndex(e,n,r);if(o>0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=at.orientationIndex(i,r,e),u=at.orientationIndex(i,r,n);if(a>0&&u>0||a<0&&u<0)return t.NO_INTERSECTION;return 0===o&&0===s&&0===a&&0===u?this.computeCollinearIntersection(e,n,i,r):(0===o||0===s||0===a||0===u?(this._isProper=!1,e.equals2D(i)||e.equals2D(r)?this._intPt[0]=e:n.equals2D(i)||n.equals2D(r)?this._intPt[0]=n:0===o?this._intPt[0]=new C(i):0===s?this._intPt[0]=new C(r):0===a?this._intPt[0]=new C(e):0===u&&(this._intPt[0]=new C(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,i,r)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,i){var r=t,o=at.distancePointLine(t,n,i),s=at.distancePointLine(e,n,i);return s<o&&(o=s,r=e),(s=at.distancePointLine(n,t,e))<o&&(o=s,r=n),(s=at.distancePointLine(i,t,e))<o&&(o=s,r=i),r},e}(nt),ot=function(){};ot.prototype.interfaces_=function(){return[]},ot.prototype.getClass=function(){return ot},ot.orientationIndex=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=n.x-e.x,s=n.y-e.y;return ot.signOfDet2x2(i,r,o,s)},ot.signOfDet2x2=function(t,e,n,i){var r=null,o=null,s=null;if(r=1,0===t||0===i)return 0===e||0===n?0:e>0?n>0?-r:r:n>0?r:-r;if(0===e||0===n)return i>0?t>0?r:-r:t>0?-r:r;if(e>0?i>0?e<=i||(r=-r,o=t,t=n,n=o,o=e,e=i,i=o):e<=-i?(r=-r,n=-n,i=-i):(o=t,t=-n,n=o,o=e,e=-i,i=o):i>0?-e<=i?(r=-r,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,n=-n,i=-i):(r=-r,o=-t,t=-n,n=o,o=-e,e=-i,i=o),t>0){if(!(n>0))return r;if(!(t<=n))return r}else{if(n>0)return-r;if(!(t>=n))return-r;r=-r,t=-t,n=-n}for(;;){if(s=Math.floor(n/t),n-=s*t,(i-=s*e)<0)return-r;if(i>e)return r;if(t>n+n){if(e<i+i)return r}else{if(e>i+i)return-r;n=t-n,i=e-i,r=-r}if(0===i)return 0===n?0:-r;if(0===n)return r;if(s=Math.floor(t/n),t-=s*n,(e-=s*i)<0)return r;if(e>i)return-r;if(n>t+t){if(i<e+e)return-r}else{if(i>e+e)return r;t=n-t,e=i-e,r=-r}if(0===e)return 0===t?0:r;if(0===t)return-r}};var st=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};st.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var n=t.x,i=e.x;return n>i&&(n=e.x,i=t.x),this._p.x>=n&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var r=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,u=ot.signOfDet2x2(r,o,s,a);if(0===u)return this._isPointOnSegment=!0,null;a<o&&(u=-u),u>0&&this._crossingCount++}},st.prototype.isPointInPolygon=function(){return this.getLocation()!==w.EXTERIOR},st.prototype.getLocation=function(){return this._isPointOnSegment?w.BOUNDARY:this._crossingCount%2==1?w.INTERIOR:w.EXTERIOR},st.prototype.isOnSegment=function(){return this._isPointOnSegment},st.prototype.interfaces_=function(){return[]},st.prototype.getClass=function(){return st},st.locatePointInRing=function(){if(arguments[0]instanceof C&&T(arguments[1],V)){for(var t=arguments[0],e=arguments[1],n=new st(t),i=new C,r=new C,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,r),n.countSegment(i,r),n.isOnSegment())return n.getLocation();return n.getLocation()}if(arguments[0]instanceof C&&arguments[1]instanceof Array){for(var s=arguments[0],a=arguments[1],u=new st(s),l=1;l<a.length;l++){var c=a[l],p=a[l-1];if(u.countSegment(c,p),u.isOnSegment())return u.getLocation()}return u.getLocation()}};var at=function(){},ut={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};at.prototype.interfaces_=function(){return[]},at.prototype.getClass=function(){return at},at.orientationIndex=function(t,e,n){return q.orientationIndex(t,e,n)},at.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,n=t[0].x,i=1;i<t.length-1;i++){var r=t[i].x-n,o=t[i+1].y;e+=r*(t[i-1].y-o)}return e/2}if(T(arguments[0],V)){var s=arguments[0],a=s.size();if(a<3)return 0;var u=new C,l=new C,c=new C;s.getCoordinate(0,l),s.getCoordinate(1,c);var p=l.x;c.x-=p;for(var h=0,f=1;f<a-1;f++)u.y=l.y,l.x=c.x,l.y=c.y,s.getCoordinate(f+1,c),c.x-=p,h+=l.x*(u.y-c.y);return h/2}},at.distanceLineLine=function(t,e,n,i){if(t.equals(e))return at.distancePointLine(t,n,i);if(n.equals(i))return at.distancePointLine(i,t,e);var r=!1;if(j.intersects(t,e,n,i)){var o=(e.x-t.x)*(i.y-n.y)-(e.y-t.y)*(i.x-n.x);if(0===o)r=!0;else{var s=(t.y-n.y)*(i.x-n.x)-(t.x-n.x)*(i.y-n.y),a=((t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y))/o,u=s/o;(u<0||u>1||a<0||a>1)&&(r=!0)}}else r=!0;return r?R.min(at.distancePointLine(t,n,i),at.distancePointLine(e,n,i),at.distancePointLine(n,t,e),at.distancePointLine(i,t,e)):0},at.isPointInRing=function(t,e){return at.locatePointInRing(t,e)!==w.EXTERIOR},at.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,i=new C;t.getCoordinate(0,i);for(var r=i.x,o=i.y,s=1;s<e;s++){t.getCoordinate(s,i);var a=i.x,u=i.y,l=a-r,c=u-o;n+=Math.sqrt(l*l+c*c),r=a,o=u}return n},at.isCCW=function(t){var e=t.length-1;if(e<3)throw new m(\"Ring has fewer than 4 points, so orientation cannot be determined\");for(var n=t[0],i=0,r=1;r<=e;r++){var o=t[r];o.y>n.y&&(n=o,i=r)}var s=i;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==i);var a=i;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==i);var u=t[s],l=t[a];if(u.equals2D(n)||l.equals2D(n)||u.equals2D(l))return!1;var c=at.computeOrientation(u,n,l),p=!1;return p=0===c?u.x>l.x:c>0,p},at.locatePointInRing=function(t,e){return st.locatePointInRing(t,e)},at.distancePointLinePerpendicular=function(t,e,n){var i=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),r=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/i;return Math.abs(r)*Math.sqrt(i)},at.computeOrientation=function(t,e,n){return at.orientationIndex(t,e,n)},at.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new m(\"Line array must contain at least one vertex\");for(var n=t.distance(e[0]),i=0;i<e.length-1;i++){var r=at.distancePointLine(t,e[i],e[i+1]);r<n&&(n=r)}return n}if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];if(s.x===a.x&&s.y===a.y)return o.distance(s);var u=(a.x-s.x)*(a.x-s.x)+(a.y-s.y)*(a.y-s.y),l=((o.x-s.x)*(a.x-s.x)+(o.y-s.y)*(a.y-s.y))/u;if(l<=0)return o.distance(s);if(l>=1)return o.distance(a);var c=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/u;return Math.abs(c)*Math.sqrt(u)}},at.isOnLine=function(t,e){for(var n=new rt,i=1;i<e.length;i++){var r=e[i-1],o=e[i];if(n.computeIntersection(t,r,o),n.hasIntersection())return!0}return!1},ut.CLOCKWISE.get=function(){return-1},ut.RIGHT.get=function(){return at.CLOCKWISE},ut.COUNTERCLOCKWISE.get=function(){return 1},ut.LEFT.get=function(){return at.COUNTERCLOCKWISE},ut.COLLINEAR.get=function(){return 0},ut.STRAIGHT.get=function(){return at.COLLINEAR},Object.defineProperties(at,ut);var lt=function(){};lt.prototype.filter=function(t){},lt.prototype.interfaces_=function(){return[]},lt.prototype.getClass=function(){return lt};var ct=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},pt={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};ct.prototype.isGeometryCollection=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION},ct.prototype.getFactory=function(){return this._factory},ct.prototype.getGeometryN=function(t){return this},ct.prototype.getArea=function(){return 0},ct.prototype.isRectangle=function(){return!1},ct.prototype.equals=function(){if(arguments[0]instanceof ct){var t=arguments[0];return null!==t&&this.equalsTopo(t)}if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof ct))return!1;var n=e;return this.equalsExact(n)}},ct.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},ct.prototype.geometryChanged=function(){this.apply(ct.geometryChangedFilter)},ct.prototype.geometryChangedAction=function(){this._envelope=null},ct.prototype.equalsNorm=function(t){return null!==t&&this.norm().equalsExact(t.norm())},ct.prototype.getLength=function(){return 0},ct.prototype.getNumGeometries=function(){return 1},ct.prototype.compareTo=function(){if(1===arguments.length){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}if(2===arguments.length){var n=arguments[0],i=arguments[1];return this.getSortIndex()!==n.getSortIndex()?this.getSortIndex()-n.getSortIndex():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(n,i)}},ct.prototype.getUserData=function(){return this._userData},ct.prototype.getSRID=function(){return this._SRID},ct.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},ct.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION)throw new m(\"This method does not support GeometryCollection arguments\")},ct.prototype.equal=function(t,e,n){return 0===n?t.equals(e):t.distance(e)<=n},ct.prototype.norm=function(){var t=this.copy();return t.normalize(),t},ct.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},ct.prototype.getEnvelopeInternal=function(){return null===this._envelope&&(this._envelope=this.computeEnvelopeInternal()),new j(this._envelope)},ct.prototype.setSRID=function(t){this._SRID=t},ct.prototype.setUserData=function(t){this._userData=t},ct.prototype.compare=function(t,e){for(var n=t.iterator(),i=e.iterator();n.hasNext()&&i.hasNext();){var r=n.next(),o=i.next(),s=r.compareTo(o);if(0!==s)return s}return n.hasNext()?1:i.hasNext()?-1:0},ct.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},ct.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===ct.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===ct.SORTINDEX_MULTIPOINT||this.getSortIndex()===ct.SORTINDEX_MULTILINESTRING||this.getSortIndex()===ct.SORTINDEX_MULTIPOLYGON},ct.prototype.interfaces_=function(){return[x,E,e]},ct.prototype.getClass=function(){return ct},ct.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},ct.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(null===t[e])return!0;return!1},pt.serialVersionUID.get=function(){return 0x799ea46522854c00},pt.SORTINDEX_POINT.get=function(){return 0},pt.SORTINDEX_MULTIPOINT.get=function(){return 1},pt.SORTINDEX_LINESTRING.get=function(){return 2},pt.SORTINDEX_LINEARRING.get=function(){return 3},pt.SORTINDEX_MULTILINESTRING.get=function(){return 4},pt.SORTINDEX_POLYGON.get=function(){return 5},pt.SORTINDEX_MULTIPOLYGON.get=function(){return 6},pt.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},pt.geometryChangedFilter.get=function(){return ht},Object.defineProperties(ct,pt);var ht=function(){};ht.interfaces_=function(){return[lt]},ht.filter=function(t){t.geometryChangedAction()};var ft=function(){};ft.prototype.filter=function(t){},ft.prototype.interfaces_=function(){return[]},ft.prototype.getClass=function(){return ft};var gt=function(){},dt={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};gt.prototype.isInBoundary=function(t){},gt.prototype.interfaces_=function(){return[]},gt.prototype.getClass=function(){return gt},dt.Mod2BoundaryNodeRule.get=function(){return yt},dt.EndPointBoundaryNodeRule.get=function(){return _t},dt.MultiValentEndPointBoundaryNodeRule.get=function(){return mt},dt.MonoValentEndPointBoundaryNodeRule.get=function(){return vt},dt.MOD2_BOUNDARY_RULE.get=function(){return new yt},dt.ENDPOINT_BOUNDARY_RULE.get=function(){return new _t},dt.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new mt},dt.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new vt},dt.OGC_SFS_BOUNDARY_RULE.get=function(){return gt.MOD2_BOUNDARY_RULE},Object.defineProperties(gt,dt);var yt=function(){};yt.prototype.isInBoundary=function(t){return t%2==1},yt.prototype.interfaces_=function(){return[gt]},yt.prototype.getClass=function(){return yt};var _t=function(){};_t.prototype.isInBoundary=function(t){return t>0},_t.prototype.interfaces_=function(){return[gt]},_t.prototype.getClass=function(){return _t};var mt=function(){};mt.prototype.isInBoundary=function(t){return t>1},mt.prototype.interfaces_=function(){return[gt]},mt.prototype.getClass=function(){return mt};var vt=function(){};vt.prototype.isInBoundary=function(t){return 1===t},vt.prototype.interfaces_=function(){return[gt]},vt.prototype.getClass=function(){return vt};var It=function(){};It.prototype.add=function(){},It.prototype.addAll=function(){},It.prototype.isEmpty=function(){},It.prototype.iterator=function(){},It.prototype.size=function(){},It.prototype.toArray=function(){},It.prototype.remove=function(){},(n.prototype=new Error).name=\"IndexOutOfBoundsException\";var Et=function(){};Et.prototype.hasNext=function(){},Et.prototype.next=function(){},Et.prototype.remove=function(){};var xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(It);(i.prototype=new Error).name=\"NoSuchElementException\";var Nt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof It&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,It]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new Ct(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new n;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.remove=function(t){for(var e=!1,n=0,i=this.array_.length;n<i;n++)if(this.array_[n]===t){this.array_.splice(n,1),e=!0;break}return e},e}(xt),Ct=function(t){function e(e){t.call(this),this.arrayList_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new i;return this.arrayList_.get(this.position_++)},e.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},e.prototype.set=function(t){return this.arrayList_.set(this.position_-1,t)},e.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},e}(Et),St=function(t){function e(){if(t.call(this),0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.ensureCapacity(e.length),this.add(e,!0)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.ensureCapacity(n.length),this.add(n,i)}}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={coordArrayType:{configurable:!0}};return n.coordArrayType.get=function(){return new Array(0).fill(null)},e.prototype.getCoordinate=function(t){return this.get(t)},e.prototype.addAll=function(){if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=!1,r=e.iterator();r.hasNext();)this.add(r.next(),n),i=!0;return i}return t.prototype.addAll.apply(this,arguments)},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),n=0;n<this.size();n++)e.add(n,this.get(n).copy());return e},e.prototype.toCoordinateArray=function(){return this.toArray(e.coordArrayType)},e.prototype.add=function(){if(1===arguments.length){var e=arguments[0];t.prototype.add.call(this,e)}else if(2===arguments.length){if(arguments[0]instanceof Array&&\"boolean\"==typeof arguments[1]){var n=arguments[0],i=arguments[1];return this.add(n,i,!0),!0}if(arguments[0]instanceof C&&\"boolean\"==typeof arguments[1]){var r=arguments[0];if(!arguments[1]&&this.size()>=1){if(this.get(this.size()-1).equals2D(r))return null}t.prototype.add.call(this,r)}else if(arguments[0]instanceof Object&&\"boolean\"==typeof arguments[1]){var o=arguments[0],s=arguments[1];return this.add(o,s),!0}}else if(3===arguments.length){if(\"boolean\"==typeof arguments[2]&&arguments[0]instanceof Array&&\"boolean\"==typeof arguments[1]){var a=arguments[0],u=arguments[1];if(arguments[2])for(var l=0;l<a.length;l++)this.add(a[l],u);else for(var c=a.length-1;c>=0;c--)this.add(a[c],u);return!0}if(\"boolean\"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1];if(!arguments[2]){var f=this.size();if(f>0){if(p>0){if(this.get(p-1).equals2D(h))return null}if(p<f){if(this.get(p).equals2D(h))return null}}}t.prototype.add.call(this,p,h)}}else if(4===arguments.length){var g=arguments[0],d=arguments[1],y=arguments[2],_=arguments[3],m=1;y>_&&(m=-1);for(var v=y;v!==_;v+=m)this.add(g[v],d);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new C(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(Nt),Lt=function(){},bt={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};bt.ForwardComparator.get=function(){return wt},bt.BidirectionalComparator.get=function(){return Ot},bt.coordArrayType.get=function(){return new Array(0).fill(null)},Lt.prototype.interfaces_=function(){return[]},Lt.prototype.getClass=function(){return Lt},Lt.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},Lt.ptNotInList=function(t,e){for(var n=0;n<t.length;n++){var i=t[n];if(Lt.indexOf(i,e)<0)return i}return null},Lt.scroll=function(t,e){var n=Lt.indexOf(e,t);if(n<0)return null;var i=new Array(t.length).fill(null);Y.arraycopy(t,n,i,0,t.length-n),Y.arraycopy(t,0,i,t.length-n,n),Y.arraycopy(i,0,t,0,t.length)},Lt.equals=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(null===t||null===e)return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!t[n].equals(e[n]))return!1;return!0}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];if(i===r)return!0;if(null===i||null===r)return!1;if(i.length!==r.length)return!1;for(var s=0;s<i.length;s++)if(0!==o.compare(i[s],r[s]))return!1;return!0}},Lt.intersection=function(t,e){for(var n=new St,i=0;i<t.length;i++)e.intersects(t[i])&&n.add(t[i],!0);return n.toCoordinateArray()},Lt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Lt.removeRepeatedPoints=function(t){if(!Lt.hasRepeatedPoints(t))return t;return new St(t,!1).toCoordinateArray()},Lt.reverse=function(t){for(var e=t.length-1,n=Math.trunc(e/2),i=0;i<=n;i++){var r=t[i];t[i]=t[e-i],t[e-i]=r}},Lt.removeNull=function(t){for(var e=0,n=0;n<t.length;n++)null!==t[n]&&e++;var i=new Array(e).fill(null);if(0===e)return i;for(var r=0,o=0;o<t.length;o++)null!==t[o]&&(i[r++]=t[o]);return i},Lt.copyDeep=function(){if(1===arguments.length){for(var t=arguments[0],e=new Array(t.length).fill(null),n=0;n<t.length;n++)e[n]=new C(t[n]);return e}if(5===arguments.length)for(var i=arguments[0],r=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4],u=0;u<a;u++)o[s+u]=new C(i[r+u])},Lt.isEqualReversed=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],r=e[t.length-n-1];if(0!==i.compareTo(r))return!1}return!0},Lt.envelope=function(t){for(var e=new j,n=0;n<t.length;n++)e.expandToInclude(t[n]);return e},Lt.toCoordinateArray=function(t){return t.toArray(Lt.coordArrayType)},Lt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Lt.indexOf=function(t,e){for(var n=0;n<e.length;n++)if(t.equals(e[n]))return n;return-1},Lt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var n=t.length-1-e,i=t[e].compareTo(t[n]);if(0!==i)return i}return 1},Lt.compare=function(t,e){for(var n=0;n<t.length&&n<e.length;){var i=t[n].compareTo(e[n]);if(0!==i)return i;n++}return n<e.length?-1:n<t.length?1:0},Lt.minCoordinate=function(t){for(var e=null,n=0;n<t.length;n++)(null===e||e.compareTo(t[n])>0)&&(e=t[n]);return e},Lt.extract=function(t,e,n){e=R.clamp(e,0,t.length);var i=(n=R.clamp(n,-1,t.length))-e+1;n<0&&(i=0),e>=t.length&&(i=0),n<e&&(i=0);var r=new Array(i).fill(null);if(0===i)return r;for(var o=0,s=e;s<=n;s++)r[o++]=t[s];return r},Object.defineProperties(Lt,bt);var wt=function(){};wt.prototype.compare=function(t,e){return Lt.compare(t,e)},wt.prototype.interfaces_=function(){return[N]},wt.prototype.getClass=function(){return wt};var Ot=function(){};Ot.prototype.compare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;var r=Lt.compare(n,i);return Lt.isEqualReversed(n,i)?0:r},Ot.prototype.OLDcompare=function(t,e){var n=t,i=e;if(n.length<i.length)return-1;if(n.length>i.length)return 1;if(0===n.length)return 0;for(var r=Lt.increasingDirection(n),o=Lt.increasingDirection(i),s=r>0?0:n.length-1,a=o>0?0:n.length-1,u=0;u<n.length;u++){var l=n[s].compareTo(i[a]);if(0!==l)return l;s+=r,a+=o}return 0},Ot.prototype.interfaces_=function(){return[N]},Ot.prototype.getClass=function(){return Ot};var Tt=function(){};Tt.prototype.get=function(){},Tt.prototype.put=function(){},Tt.prototype.size=function(){},Tt.prototype.values=function(){},Tt.prototype.entrySet=function(){};var Rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Tt);(r.prototype=new Error).name=\"OperationNotSupported\",(o.prototype=new It).contains=function(){};var Pt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof It&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.contains=function(t){for(var e=0,n=this.array_.length;e<n;e++){if(this.array_[e]===t)return!0}return!1},e.prototype.add=function(t){return!this.contains(t)&&(this.array_.push(t),!0)},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.remove=function(t){throw new Error},e.prototype.size=function(){return this.array_.length},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},e.prototype.iterator=function(){return new Dt(this)},e}(o),Dt=function(t){function e(e){t.call(this),this.hashSet_=e,this.position_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new i;return this.hashSet_.array_[this.position_++]},e.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},e.prototype.remove=function(){throw new r},e}(Et),Mt=0;(p.prototype=new Rt).get=function(t){for(var e=this.root_;null!==e;){var n=t.compareTo(e.key);if(n<0)e=e.left;else{if(!(n>0))return e.value;e=e.right}}return null},p.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,i,r=this.root_;do{if(n=r,(i=t.compareTo(r.key))<0)r=r.left;else{if(!(i>0)){var o=r.value;return r.value=e,o}r=r.right}}while(null!==r);var s={key:t,left:null,right:null,value:e,parent:n,color:Mt,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},p.prototype.fixAfterInsertion=function(t){for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(a(t)===l(a(a(t)))){var e=c(a(a(t)));1===s(e)?(u(a(t),Mt),u(e,Mt),u(a(a(t)),1),t=a(a(t))):(t===c(a(t))&&(t=a(t),this.rotateLeft(t)),u(a(t),Mt),u(a(a(t)),1),this.rotateRight(a(a(t))))}else{var n=l(a(a(t)));1===s(n)?(u(a(t),Mt),u(n,Mt),u(a(a(t)),1),t=a(a(t))):(t===l(a(t))&&(t=a(t),this.rotateRight(t)),u(a(t),Mt),u(a(a(t)),1),this.rotateLeft(a(a(t))))}this.root_.color=Mt},p.prototype.values=function(){var t=new Nt,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=p.successor(e));)t.add(e.value);return t},p.prototype.entrySet=function(){var t=new Pt,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=p.successor(e));)t.add(e);return t},p.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},p.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},p.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},p.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,i=t;null!==n&&i===n.right;)i=n,n=n.parent;return n},p.prototype.size=function(){return this.size_};var At=function(){};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},h.prototype=new o,(f.prototype=new h).contains=function(t){for(var e=0,n=this.array_.length;e<n;e++){if(0===this.array_[e].compareTo(t))return!0}return!1},f.prototype.add=function(t){if(this.contains(t))return!1;for(var e=0,n=this.array_.length;e<n;e++){if(1===this.array_[e].compareTo(t))return this.array_.splice(e,0,t),!0}return this.array_.push(t),!0},f.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},f.prototype.remove=function(t){throw new r},f.prototype.size=function(){return this.array_.length},f.prototype.isEmpty=function(){return 0===this.array_.length},f.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t},f.prototype.iterator=function(){return new Ft(this)};var Ft=function(t){this.treeSet_=t,this.position_=0};Ft.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new i;return this.treeSet_.array_[this.position_++]},Ft.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Ft.prototype.remove=function(){throw new r};var Gt=function(){};Gt.sort=function(){var t,e,n,i,r=arguments[0];if(1===arguments.length)i=function(t,e){return t.compareTo(e)},r.sort(i);else if(2===arguments.length)n=arguments[1],i=function(t,e){return n.compare(t,e)},r.sort(i);else if(3===arguments.length){(e=r.slice(arguments[1],arguments[2])).sort();var o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length));for(r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])}else if(4===arguments.length)for(e=r.slice(arguments[1],arguments[2]),n=arguments[3],i=function(t,e){return n.compare(t,e)},e.sort(i),o=r.slice(0,arguments[1]).concat(e,r.slice(arguments[2],r.length)),r.splice(0,r.length),t=0;t<o.length;t++)r.push(o[t])},Gt.asList=function(t){for(var e=new Nt,n=0,i=t.length;n<i;n++)e.add(t[n]);return e};var qt=function(){},Bt={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};Bt.P.get=function(){return 0},Bt.L.get=function(){return 1},Bt.A.get=function(){return 2},Bt.FALSE.get=function(){return-1},Bt.TRUE.get=function(){return-2},Bt.DONTCARE.get=function(){return-3},Bt.SYM_FALSE.get=function(){return\"F\"},Bt.SYM_TRUE.get=function(){return\"T\"},Bt.SYM_DONTCARE.get=function(){return\"*\"},Bt.SYM_P.get=function(){return\"0\"},Bt.SYM_L.get=function(){return\"1\"},Bt.SYM_A.get=function(){return\"2\"},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.toDimensionSymbol=function(t){switch(t){case qt.FALSE:return qt.SYM_FALSE;case qt.TRUE:return qt.SYM_TRUE;case qt.DONTCARE:return qt.SYM_DONTCARE;case qt.P:return qt.SYM_P;case qt.L:return qt.SYM_L;case qt.A:return qt.SYM_A}throw new m(\"Unknown dimension value: \"+t)},qt.toDimensionValue=function(t){switch(A.toUpperCase(t)){case qt.SYM_FALSE:return qt.FALSE;case qt.SYM_TRUE:return qt.TRUE;case qt.SYM_DONTCARE:return qt.DONTCARE;case qt.SYM_P:return qt.P;case qt.SYM_L:return qt.L;case qt.SYM_A:return qt.A}throw new m(\"Unknown dimension symbol: \"+t)},Object.defineProperties(qt,Bt);var Vt=function(){};Vt.prototype.filter=function(t){},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt};var Ut=function(){};Ut.prototype.filter=function(t,e){},Ut.prototype.isDone=function(){},Ut.prototype.isGeometryChanged=function(){},Ut.prototype.interfaces_=function(){return[]},Ut.prototype.getClass=function(){return Ut};var zt=function(t){function e(e,n){if(t.call(this,n),this._geometries=e||[],t.hasNullElements(this._geometries))throw new m(\"geometries must not contain null elements\")}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){for(var t=new j,e=0;e<this._geometries.length;e++)t.expandToInclude(this._geometries[e].getEnvelopeInternal());return t},e.prototype.getGeometryN=function(t){return this._geometries[t]},e.prototype.getSortIndex=function(){return t.SORTINDEX_GEOMETRYCOLLECTION},e.prototype.getCoordinates=function(){for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=0;n<this._geometries.length;n++)for(var i=this._geometries[n].getCoordinates(),r=0;r<i.length;r++)t[++e]=i[r];return t},e.prototype.getArea=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getArea();return t},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._geometries.length!==i._geometries.length)return!1;for(var r=0;r<this._geometries.length;r++)if(!this._geometries[r].equalsExact(i._geometries[r],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<this._geometries.length;t++)this._geometries[t].normalize();Gt.sort(this._geometries)},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},e.prototype.getBoundaryDimension=function(){for(var t=qt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getBoundaryDimension());return t},e.prototype.getDimension=function(){for(var t=qt.FALSE,e=0;e<this._geometries.length;e++)t=Math.max(t,this._geometries[e].getDimension());return t},e.prototype.getLength=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=0,e=0;e<this._geometries.length;e++)t+=this._geometries[e].getNumPoints();return t},e.prototype.getNumGeometries=function(){return this._geometries.length},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createGeometryCollection(e)},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=new f(Gt.asList(this._geometries)),n=new f(Gt.asList(t._geometries));return this.compare(e,n)}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o=i,s=this.getNumGeometries(),a=o.getNumGeometries(),u=0;u<s&&u<a;){var l=this.getGeometryN(u),c=o.getGeometryN(u),p=l.compareToSameClass(c,r);if(0!==p)return p;u++}return u<s?1:u<a?-1:0}},e.prototype.apply=function(){if(T(arguments[0],ft))for(var t=arguments[0],e=0;e<this._geometries.length;e++)this._geometries[e].apply(t);else if(T(arguments[0],Ut)){var n=arguments[0];if(0===this._geometries.length)return null;for(var i=0;i<this._geometries.length&&(this._geometries[i].apply(n),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else if(T(arguments[0],Vt)){var r=arguments[0];r.filter(this);for(var o=0;o<this._geometries.length;o++)this._geometries[o].apply(r)}else if(T(arguments[0],lt)){var s=arguments[0];s.filter(this);for(var a=0;a<this._geometries.length;a++)this._geometries[a].apply(s)}},e.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),et.shouldNeverReachHere(),null},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._geometries=new Array(this._geometries.length).fill(null);for(var n=0;n<this._geometries.length;n++)e._geometries[n]=this._geometries[n].clone();return e},e.prototype.getGeometryType=function(){return\"GeometryCollection\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.isEmpty=function(){for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isEmpty())return!1;return!0},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x4f07bcb1f857d800},Object.defineProperties(e,n),e}(ct),Xt=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTILINESTRING},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?qt.FALSE:0},e.prototype.isClosed=function(){if(this.isEmpty())return!1;for(var t=0;t<this._geometries.length;t++)if(!this._geometries[t].isClosed())return!1;return!0},e.prototype.getDimension=function(){return 1},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[t-1-n]=this._geometries[n].reverse();return this.getFactory().createMultiLineString(e)},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.getGeometryType=function(){return\"MultiLineString\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[At]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x7155d2ab4afa8000},Object.defineProperties(e,n),e}(zt),Yt=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,1===arguments.length){var t=arguments[0],e=gt.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this._geom=n,this._geomFact=n.getFactory(),this._bnRule=i}};Yt.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return 1===e.length?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Yt.prototype.getBoundary=function(){return this._geom instanceof Kt?this.boundaryLineString(this._geom):this._geom instanceof Xt?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Yt.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){return this._bnRule.isInBoundary(2)?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Yt.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Yt.prototype.computeBoundaryCoordinates=function(t){var e=new Nt;this._endpointMap=new p;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);0!==i.getNumPoints()&&(this.addEndpoint(i.getCoordinateN(0)),this.addEndpoint(i.getCoordinateN(i.getNumPoints()-1)))}for(var r=this._endpointMap.entrySet().iterator();r.hasNext();){var o=r.next(),s=o.getValue().count;this._bnRule.isInBoundary(s)&&e.add(o.getKey())}return Lt.toCoordinateArray(e)},Yt.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);null===e&&(e=new kt,this._endpointMap.put(t,e)),e.count++},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.getBoundary=function(){if(1===arguments.length){var t=arguments[0];return new Yt(t).getBoundary()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Yt(e,n).getBoundary()}};var kt=function(){this.count=null};kt.prototype.interfaces_=function(){return[]},kt.prototype.getClass=function(){return kt};var jt=function(){},Ht={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};jt.prototype.interfaces_=function(){return[]},jt.prototype.getClass=function(){return jt},jt.chars=function(t,e){for(var n=new Array(e).fill(null),i=0;i<e;i++)n[i]=t;return String(n)},jt.getStackTrace=function(){if(1===arguments.length){var t=arguments[0],e=new function(){},n=new function(){}(e);return t.printStackTrace(n),e.toString()}if(2===arguments.length){for(var i=arguments[0],r=arguments[1],o=\"\",s=new function(){}(new function(){}(jt.getStackTrace(i))),a=0;a<r;a++)try{o+=s.readLine()+jt.NEWLINE}catch(t){if(!(t instanceof g))throw t;et.shouldNeverReachHere()}return o}},jt.split=function(t,e){for(var n=e.length,i=new Nt,r=\"\"+t,o=r.indexOf(e);o>=0;){var s=r.substring(0,o);i.add(s),o=(r=r.substring(o+n)).indexOf(e)}r.length>0&&i.add(r);for(var a=new Array(i.size()).fill(null),u=0;u<a.length;u++)a[u]=i.get(u);return a},jt.toString=function(){if(1===arguments.length){var t=arguments[0];return jt.SIMPLE_ORDINATE_FORMAT.format(t)}},jt.spaces=function(t){return jt.chars(\" \",t)},Ht.NEWLINE.get=function(){return Y.getProperty(\"line.separator\")},Ht.SIMPLE_ORDINATE_FORMAT.get=function(){return new function(){}(\"0.#\")},Object.defineProperties(jt,Ht);var Wt=function(){};Wt.prototype.interfaces_=function(){return[]},Wt.prototype.getClass=function(){return Wt},Wt.copyCoord=function(t,e,n,i){for(var r=Math.min(t.getDimension(),n.getDimension()),o=0;o<r;o++)n.setOrdinate(i,o,t.getOrdinate(e,o))},Wt.isRing=function(t){var e=t.size();return 0===e||!(e<=3)&&(t.getOrdinate(0,V.X)===t.getOrdinate(e-1,V.X)&&t.getOrdinate(0,V.Y)===t.getOrdinate(e-1,V.Y))},Wt.isEqual=function(t,e){var n=t.size();if(n!==e.size())return!1;for(var i=Math.min(t.getDimension(),e.getDimension()),r=0;r<n;r++)for(var o=0;o<i;o++){var s=t.getOrdinate(r,o),a=e.getOrdinate(r,o);if(t.getOrdinate(r,o)!==e.getOrdinate(r,o)&&(!v.isNaN(s)||!v.isNaN(a)))return!1}return!0},Wt.extend=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();if(Wt.copy(e,0,i,0,r),r>0)for(var o=r;o<n;o++)Wt.copy(e,r-1,i,o,1);return i},Wt.reverse=function(t){for(var e=t.size()-1,n=Math.trunc(e/2),i=0;i<=n;i++)Wt.swap(t,i,e-i)},Wt.swap=function(t,e,n){if(e===n)return null;for(var i=0;i<t.getDimension();i++){var r=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(n,i)),t.setOrdinate(n,i,r)}},Wt.copy=function(t,e,n,i,r){for(var o=0;o<r;o++)Wt.copyCoord(t,e+o,n,i+o)},Wt.toString=function(){if(1===arguments.length){var t=arguments[0],e=t.size();if(0===e)return\"()\";var n=t.getDimension(),i=new D;i.append(\"(\");for(var r=0;r<e;r++){r>0&&i.append(\" \");for(var o=0;o<n;o++)o>0&&i.append(\",\"),i.append(jt.toString(t.getOrdinate(r,o)))}return i.append(\")\"),i.toString()}},Wt.ensureValidRing=function(t,e){var n=e.size();if(0===n)return e;if(n<=3)return Wt.createClosedRing(t,e,4);return e.getOrdinate(0,V.X)===e.getOrdinate(n-1,V.X)&&e.getOrdinate(0,V.Y)===e.getOrdinate(n-1,V.Y)?e:Wt.createClosedRing(t,e,n+1)},Wt.createClosedRing=function(t,e,n){var i=t.create(n,e.getDimension()),r=e.size();Wt.copy(e,0,i,0,r);for(var o=r;o<n;o++)Wt.copy(e,0,i,o,1);return i};var Kt=function(t){function e(e,n){t.call(this,n),this._points=null,this.init(e)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new j:this._points.expandEnvelope(new j)},e.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},e.prototype.getSortIndex=function(){return t.SORTINDEX_LINESTRING},e.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e;if(this._points.size()!==i._points.size())return!1;for(var r=0;r<this._points.size();r++)if(!this.equal(this._points.getCoordinate(r),i._points.getCoordinate(r),n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){for(var t=0;t<Math.trunc(this._points.size()/2);t++){var e=this._points.size()-1-t;if(!this._points.getCoordinate(t).equals(this._points.getCoordinate(e)))return this._points.getCoordinate(t).compareTo(this._points.getCoordinate(e))>0&&Wt.reverse(this._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?qt.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return at.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();Wt.reverse(t);return this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){if(1===arguments.length){for(var t=arguments[0],e=0,n=0;e<this._points.size()&&n<t._points.size();){var i=this._points.getCoordinate(e).compareTo(t._points.getCoordinate(n));if(0!==i)return i;e++,n++}return e<this._points.size()?1:n<t._points.size()?-1:0}if(2===arguments.length){var r=arguments[0];return arguments[1].compare(this._points,r._points)}},e.prototype.apply=function(){if(T(arguments[0],ft))for(var t=arguments[0],e=0;e<this._points.size();e++)t.filter(this._points.getCoordinate(e));else if(T(arguments[0],Ut)){var n=arguments[0];if(0===this._points.size())return null;for(var i=0;i<this._points.size()&&(n.filter(this._points,i),!n.isDone());i++);n.isGeometryChanged()&&this.geometryChanged()}else if(T(arguments[0],Vt)){arguments[0].filter(this)}else if(T(arguments[0],lt)){arguments[0].filter(this)}},e.prototype.getBoundary=function(){return new Yt(this).getBoundary()},e.prototype.isEquivalentClass=function(t){return t instanceof e},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._points=this._points.clone(),e},e.prototype.getCoordinateN=function(t){return this._points.getCoordinate(t)},e.prototype.getGeometryType=function(){return\"LineString\"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._points},e.prototype.isEmpty=function(){return 0===this._points.size()},e.prototype.init=function(t){if(null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),1===t.size())throw new m(\"Invalid number of points in LineString (found \"+t.size()+\" - must be 0 or >= 2)\");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e<this._points.size();e++)if(this._points.getCoordinate(e).equals(t))return!0;return!1},e.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},e.prototype.getPointN=function(t){return this.getFactory().createPoint(this._points.getCoordinate(t))},e.prototype.interfaces_=function(){return[At]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(e,n),e}(ct),Jt=function(){};Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt};var Qt=function(t){function e(e,n){t.call(this,n),this._coordinates=e||null,this.init(this._coordinates)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new j;var t=new j;return t.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),t},e.prototype.getSortIndex=function(){return t.SORTINDEX_POINT},e.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&(!(!this.isEmpty()||!e.isEmpty())||this.isEmpty()===e.isEmpty()&&this.equal(e.getCoordinate(),this.getCoordinate(),n))}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){},e.prototype.getCoordinate=function(){return 0!==this._coordinates.size()?this._coordinates.getCoordinate(0):null},e.prototype.getBoundaryDimension=function(){return qt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getNumPoints=function(){return this.isEmpty()?0:1},e.prototype.reverse=function(){return this.copy()},e.prototype.getX=function(){if(null===this.getCoordinate())throw new Error(\"getX called on empty Point\");return this.getCoordinate().x},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0];return this.getCoordinate().compareTo(t.getCoordinate())}if(2===arguments.length){var e=arguments[0];return arguments[1].compare(this._coordinates,e._coordinates)}},e.prototype.apply=function(){if(T(arguments[0],ft)){var t=arguments[0];if(this.isEmpty())return null;t.filter(this.getCoordinate())}else if(T(arguments[0],Ut)){var e=arguments[0];if(this.isEmpty())return null;e.filter(this._coordinates,0),e.isGeometryChanged()&&this.geometryChanged()}else if(T(arguments[0],Vt)){arguments[0].filter(this)}else if(T(arguments[0],lt)){arguments[0].filter(this)}},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);return e._coordinates=this._coordinates.clone(),e},e.prototype.getGeometryType=function(){return\"Point\"},e.prototype.copy=function(){return new e(this._coordinates.copy(),this._factory)},e.prototype.getCoordinateSequence=function(){return this._coordinates},e.prototype.getY=function(){if(null===this.getCoordinate())throw new Error(\"getY called on empty Point\");return this.getCoordinate().y},e.prototype.isEmpty=function(){return 0===this._coordinates.size()},e.prototype.init=function(t){null===t&&(t=this.getFactory().getCoordinateSequenceFactory().create([])),et.isTrue(t.size()<=1),this._coordinates=t},e.prototype.isSimple=function(){return!0},e.prototype.interfaces_=function(){return[Jt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return 0x44077bad161cbc00},Object.defineProperties(e,n),e}(ct),Zt=function(){};Zt.prototype.interfaces_=function(){return[]},Zt.prototype.getClass=function(){return Zt};var $t=function(t){function e(e,n,i){if(t.call(this,i),this._shell=null,this._holes=null,null===e&&(e=this.getFactory().createLinearRing()),null===n&&(n=[]),t.hasNullElements(n))throw new m(\"holes must not contain null elements\");if(e.isEmpty()&&t.hasNonEmptyElements(n))throw new m(\"shell is empty but holes are not\");this._shell=e,this._holes=n}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},e.prototype.getSortIndex=function(){return t.SORTINDEX_POLYGON},e.prototype.getCoordinates=function(){if(this.isEmpty())return[];for(var t=new Array(this.getNumPoints()).fill(null),e=-1,n=this._shell.getCoordinates(),i=0;i<n.length;i++)t[++e]=n[i];for(var r=0;r<this._holes.length;r++)for(var o=this._holes[r].getCoordinates(),s=0;s<o.length;s++)t[++e]=o[s];return t},e.prototype.getArea=function(){var t=0;t+=Math.abs(at.signedArea(this._shell.getCoordinateSequence()));for(var e=0;e<this._holes.length;e++)t-=Math.abs(at.signedArea(this._holes[e].getCoordinateSequence()));return t},e.prototype.isRectangle=function(){if(0!==this.getNumInteriorRing())return!1;if(null===this._shell)return!1;if(5!==this._shell.getNumPoints())return!1;for(var t=this._shell.getCoordinateSequence(),e=this.getEnvelopeInternal(),n=0;n<5;n++){var i=t.getX(n);if(i!==e.getMinX()&&i!==e.getMaxX())return!1;var r=t.getY(n);if(r!==e.getMinY()&&r!==e.getMaxY())return!1}for(var o=t.getX(0),s=t.getY(0),a=1;a<=4;a++){var u=t.getX(a),l=t.getY(a);if(u!==o===(l!==s))return!1;o=u,s=l}return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];if(!this.isEquivalentClass(e))return!1;var i=e,r=this._shell,o=i._shell;if(!r.equalsExact(o,n))return!1;if(this._holes.length!==i._holes.length)return!1;for(var s=0;s<this._holes.length;s++)if(!this._holes[s].equalsExact(i._holes[s],n))return!1;return!0}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.normalize=function(){if(0===arguments.length){this.normalize(this._shell,!0);for(var t=0;t<this._holes.length;t++)this.normalize(this._holes[t],!1);Gt.sort(this._holes)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(e.isEmpty())return null;var i=new Array(e.getCoordinates().length-1).fill(null);Y.arraycopy(e.getCoordinates(),0,i,0,i.length);var r=Lt.minCoordinate(e.getCoordinates());Lt.scroll(i,r),Y.arraycopy(i,0,e.getCoordinates(),0,i.length),e.getCoordinates()[i.length]=i[0],at.isCCW(e.getCoordinates())===n&&Lt.reverse(e.getCoordinates())}},e.prototype.getCoordinate=function(){return this._shell.getCoordinate()},e.prototype.getNumInteriorRing=function(){return this._holes.length},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.getLength=function(){var t=0;t+=this._shell.getLength();for(var e=0;e<this._holes.length;e++)t+=this._holes[e].getLength();return t},e.prototype.getNumPoints=function(){for(var t=this._shell.getNumPoints(),e=0;e<this._holes.length;e++)t+=this._holes[e].getNumPoints();return t},e.prototype.reverse=function(){var t=this.copy();t._shell=this._shell.copy().reverse(),t._holes=new Array(this._holes.length).fill(null);for(var e=0;e<this._holes.length;e++)t._holes[e]=this._holes[e].copy().reverse();return t},e.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},e.prototype.compareToSameClass=function(){if(1===arguments.length){var t=arguments[0],e=this._shell,n=t._shell;return e.compareToSameClass(n)}if(2===arguments.length){var i=arguments[0],r=arguments[1],o=i,s=this._shell,a=o._shell,u=s.compareToSameClass(a,r);if(0!==u)return u;for(var l=this.getNumInteriorRing(),c=o.getNumInteriorRing(),p=0;p<l&&p<c;){var h=this.getInteriorRingN(p),f=o.getInteriorRingN(p),g=h.compareToSameClass(f,r);if(0!==g)return g;p++}return p<l?1:p<c?-1:0}},e.prototype.apply=function(t){if(T(t,ft)){this._shell.apply(t);for(var e=0;e<this._holes.length;e++)this._holes[e].apply(t)}else if(T(t,Ut)){if(this._shell.apply(t),!t.isDone())for(var n=0;n<this._holes.length&&(this._holes[n].apply(t),!t.isDone());n++);t.isGeometryChanged()&&this.geometryChanged()}else if(T(t,Vt))t.filter(this);else if(T(t,lt)){t.filter(this),this._shell.apply(t);for(var i=0;i<this._holes.length;i++)this._holes[i].apply(t)}},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var t=new Array(this._holes.length+1).fill(null);t[0]=this._shell;for(var e=0;e<this._holes.length;e++)t[e+1]=this._holes[e];return t.length<=1?this.getFactory().createLinearRing(t[0].getCoordinateSequence()):this.getFactory().createMultiLineString(t)},e.prototype.clone=function(){var e=t.prototype.clone.call(this);e._shell=this._shell.clone(),e._holes=new Array(this._holes.length).fill(null);for(var n=0;n<this._holes.length;n++)e._holes[n]=this._holes[n].clone();return e},e.prototype.getGeometryType=function(){return\"Polygon\"},e.prototype.copy=function(){for(var t=this._shell.copy(),n=new Array(this._holes.length).fill(null),i=0;i<n.length;i++)n[i]=this._holes[i].copy();return new e(t,n,this._factory)},e.prototype.getExteriorRing=function(){return this._shell},e.prototype.isEmpty=function(){return this._shell.isEmpty()},e.prototype.getInteriorRingN=function(t){return this._holes[t]},e.prototype.interfaces_=function(){return[Zt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(e,n),e}(ct),te=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOINT},e.prototype.isValid=function(){return!0},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getCoordinate=function(){if(1===arguments.length){var e=arguments[0];return this._geometries[e].getCoordinate()}return t.prototype.getCoordinate.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return qt.FALSE},e.prototype.getDimension=function(){return 0},e.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},e.prototype.getGeometryType=function(){return\"MultiPoint\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Jt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x6fb1ed4162e0fc00},Object.defineProperties(e,n),e}(zt),ee=function(t){function e(e,n){e instanceof C&&n instanceof _e&&(e=n.getCoordinateSequenceFactory().create(e)),t.call(this,e,n),this.validateConstruction()}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_LINEARRING},e.prototype.getBoundaryDimension=function(){return qt.FALSE},e.prototype.isClosed=function(){return!!this.isEmpty()||t.prototype.isClosed.call(this)},e.prototype.reverse=function(){var t=this._points.copy();Wt.reverse(t);return this.getFactory().createLinearRing(t)},e.prototype.validateConstruction=function(){if(!this.isEmpty()&&!t.prototype.isClosed.call(this))throw new m(\"Points of LinearRing do not form a closed linestring\");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<e.MINIMUM_VALID_SIZE)throw new m(\"Invalid number of points in LinearRing (found \"+this.getCoordinateSequence().size()+\" - must be 0 or >= 4)\")},e.prototype.getGeometryType=function(){return\"LinearRing\"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Kt),ne=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return ct.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n<this._geometries.length;n++)e[n]=this._geometries[n].reverse();return this.getFactory().createMultiPolygon(e)},e.prototype.getBoundary=function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var t=new Nt,e=0;e<this._geometries.length;e++)for(var n=this._geometries[e].getBoundary(),i=0;i<n.getNumGeometries();i++)t.add(n.getGeometryN(i));var r=new Array(t.size()).fill(null);return this.getFactory().createMultiLineString(t.toArray(r))},e.prototype.getGeometryType=function(){return\"MultiPolygon\"},e.prototype.copy=function(){for(var t=new Array(this._geometries.length).fill(null),n=0;n<t.length;n++)t[n]=this._geometries[n].copy();return new e(t,this._factory)},e.prototype.interfaces_=function(){return[Zt]},e.prototype.getClass=function(){return e},n.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(e,n),e}(zt),ie=function(t){this._factory=t||null,this._isUserDataCopied=!1},re={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};ie.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},ie.prototype.edit=function(t,e){if(null===t)return null;var n=this.editInternal(t,e);return this._isUserDataCopied&&n.setUserData(t.getUserData()),n},ie.prototype.editInternal=function(t,e){return null===this._factory&&(this._factory=t.getFactory()),t instanceof zt?this.editGeometryCollection(t,e):t instanceof $t?this.editPolygon(t,e):t instanceof Qt?e.edit(t,this._factory):t instanceof Kt?e.edit(t,this._factory):(et.shouldNeverReachHere(\"Unsupported Geometry class: \"+t.getClass().getName()),null)},ie.prototype.editGeometryCollection=function(t,e){for(var n=e.edit(t,this._factory),i=new Nt,r=0;r<n.getNumGeometries();r++){var o=this.edit(n.getGeometryN(r),e);null===o||o.isEmpty()||i.add(o)}return n.getClass()===te?this._factory.createMultiPoint(i.toArray([])):n.getClass()===Xt?this._factory.createMultiLineString(i.toArray([])):n.getClass()===ne?this._factory.createMultiPolygon(i.toArray([])):this._factory.createGeometryCollection(i.toArray([]))},ie.prototype.editPolygon=function(t,e){var n=e.edit(t,this._factory);if(null===n&&(n=this._factory.createPolygon(null)),n.isEmpty())return n;var i=this.edit(n.getExteriorRing(),e);if(null===i||i.isEmpty())return this._factory.createPolygon();for(var r=new Nt,o=0;o<n.getNumInteriorRing();o++){var s=this.edit(n.getInteriorRingN(o),e);null===s||s.isEmpty()||r.add(s)}return this._factory.createPolygon(i,r.toArray([]))},ie.prototype.interfaces_=function(){return[]},ie.prototype.getClass=function(){return ie},ie.GeometryEditorOperation=function(){},re.NoOpGeometryOperation.get=function(){return oe},re.CoordinateOperation.get=function(){return se},re.CoordinateSequenceOperation.get=function(){return ae},Object.defineProperties(ie,re);var oe=function(){};oe.prototype.edit=function(t,e){return t},oe.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},oe.prototype.getClass=function(){return oe};var se=function(){};se.prototype.edit=function(t,e){var n=this.editCoordinates(t.getCoordinates(),t);return null===n?t:t instanceof ee?e.createLinearRing(n):t instanceof Kt?e.createLineString(n):t instanceof Qt?n.length>0?e.createPoint(n[0]):e.createPoint():t},se.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},se.prototype.getClass=function(){return se};var ae=function(){};ae.prototype.edit=function(t,e){return t instanceof ee?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Kt?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof Qt?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ae.prototype.interfaces_=function(){return[ie.GeometryEditorOperation]},ae.prototype.getClass=function(){return ae};var ue=function(){if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var t=arguments[0];this._coordinates=new Array(t).fill(null);for(var e=0;e<t;e++)this._coordinates[e]=new C}else if(T(arguments[0],V)){var n=arguments[0];if(null===n)return this._coordinates=new Array(0).fill(null),null;this._dimension=n.getDimension(),this._coordinates=new Array(n.size()).fill(null);for(var i=0;i<this._coordinates.length;i++)this._coordinates[i]=n.getCoordinateCopy(i)}}else if(2===arguments.length)if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var r=arguments[0],o=arguments[1];this._coordinates=r,this._dimension=o,null===r&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var s=arguments[0],a=arguments[1];this._coordinates=new Array(s).fill(null),this._dimension=a;for(var u=0;u<s;u++)this._coordinates[u]=new C}},le={serialVersionUID:{configurable:!0}};ue.prototype.setOrdinate=function(t,e,n){switch(e){case V.X:this._coordinates[t].x=n;break;case V.Y:this._coordinates[t].y=n;break;case V.Z:this._coordinates[t].z=n;break;default:throw new m(\"invalid ordinateIndex\")}},ue.prototype.size=function(){return this._coordinates.length},ue.prototype.getOrdinate=function(t,e){switch(e){case V.X:return this._coordinates[t].x;case V.Y:return this._coordinates[t].y;case V.Z:return this._coordinates[t].z}return v.NaN},ue.prototype.getCoordinate=function(){if(1===arguments.length){var t=arguments[0];return this._coordinates[t]}if(2===arguments.length){var e=arguments[0],n=arguments[1];n.x=this._coordinates[e].x,n.y=this._coordinates[e].y,n.z=this._coordinates[e].z}},ue.prototype.getCoordinateCopy=function(t){return new C(this._coordinates[t])},ue.prototype.getDimension=function(){return this._dimension},ue.prototype.getX=function(t){return this._coordinates[t].x},ue.prototype.clone=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].clone();return new ue(t,this._dimension)},ue.prototype.expandEnvelope=function(t){for(var e=0;e<this._coordinates.length;e++)t.expandToInclude(this._coordinates[e]);return t},ue.prototype.copy=function(){for(var t=new Array(this.size()).fill(null),e=0;e<this._coordinates.length;e++)t[e]=this._coordinates[e].copy();return new ue(t,this._dimension)},ue.prototype.toString=function(){if(this._coordinates.length>0){var t=new D(17*this._coordinates.length);t.append(\"(\"),t.append(this._coordinates[0]);for(var e=1;e<this._coordinates.length;e++)t.append(\", \"),t.append(this._coordinates[e]);return t.append(\")\"),t.toString()}return\"()\"},ue.prototype.getY=function(t){return this._coordinates[t].y},ue.prototype.toCoordinateArray=function(){return this._coordinates},ue.prototype.interfaces_=function(){return[V,e]},ue.prototype.getClass=function(){return ue},le.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(ue,le);var ce=function(){},pe={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ce.prototype.readResolve=function(){return ce.instance()},ce.prototype.create=function(){if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new ue(t)}if(T(arguments[0],V)){var e=arguments[0];return new ue(e)}}else if(2===arguments.length){var n=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new ue(n):new ue(n,i)}},ce.prototype.interfaces_=function(){return[b,e]},ce.prototype.getClass=function(){return ce},ce.instance=function(){return ce.instanceObject},pe.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},pe.instanceObject.get=function(){return new ce},Object.defineProperties(ce,pe);var he=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new Nt,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new Pt;return this.map_.entries().forEach(function(e){return t.add(e)}),t},e.prototype.size=function(){return this.map_.size()},e}(Tt),fe=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof de){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if(\"number\"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var i=arguments[0];this._modelType=i._modelType,this._scale=i._scale}},ge={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};fe.prototype.equals=function(t){if(!(t instanceof fe))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},fe.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new M(n).compareTo(new M(i))},fe.prototype.getScale=function(){return this._scale},fe.prototype.isFloating=function(){return this._modelType===fe.FLOATING||this._modelType===fe.FLOATING_SINGLE},fe.prototype.getType=function(){return this._modelType},fe.prototype.toString=function(){var t=\"UNKNOWN\";return this._modelType===fe.FLOATING?t=\"Floating\":this._modelType===fe.FLOATING_SINGLE?t=\"Floating-Single\":this._modelType===fe.FIXED&&(t=\"Fixed (Scale=\"+this.getScale()+\")\"),t},fe.prototype.makePrecise=function(){if(\"number\"==typeof arguments[0]){var t=arguments[0];if(v.isNaN(t))return t;if(this._modelType===fe.FLOATING_SINGLE){return t}return this._modelType===fe.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof C){var e=arguments[0];if(this._modelType===fe.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},fe.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===fe.FLOATING?t=16:this._modelType===fe.FLOATING_SINGLE?t=6:this._modelType===fe.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},fe.prototype.setScale=function(t){this._scale=Math.abs(t)},fe.prototype.interfaces_=function(){return[e,E]},fe.prototype.getClass=function(){return fe},fe.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},ge.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},ge.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(fe,ge);var de=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},ye={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};de.prototype.readResolve=function(){return de.nameToTypeMap.get(this._name)},de.prototype.toString=function(){return this._name},de.prototype.interfaces_=function(){return[e]},de.prototype.getClass=function(){return de},ye.serialVersionUID.get=function(){return-552860263173159e4},ye.nameToTypeMap.get=function(){return new he},Object.defineProperties(de,ye),fe.Type=de,fe.FIXED=new de(\"FIXED\"),fe.FLOATING=new de(\"FLOATING\"),fe.FLOATING_SINGLE=new de(\"FLOATING SINGLE\");var _e=function t(){this._precisionModel=new fe,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?T(arguments[0],b)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof fe&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},me={serialVersionUID:{configurable:!0}};_e.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new C(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new C(t.getMinX(),t.getMinY()),new C(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new C(t.getMinX(),t.getMinY()),new C(t.getMinX(),t.getMaxY()),new C(t.getMaxX(),t.getMaxY()),new C(t.getMaxX(),t.getMinY()),new C(t.getMinX(),t.getMinY())]),null)},_e.prototype.createLineString=function(t){return t?t instanceof Array?new Kt(this.getCoordinateSequenceFactory().create(t),this):T(t,V)?new Kt(t,this):void 0:new Kt(this.getCoordinateSequenceFactory().create([]),this)},_e.prototype.createMultiLineString=function(){if(0===arguments.length)return new Xt(null,this);if(1===arguments.length){var t=arguments[0];return new Xt(t,this)}},_e.prototype.buildGeometry=function(t){for(var e=null,n=!1,i=!1,r=t.iterator();r.hasNext();){var o=r.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(null===e)return this.createGeometryCollection();if(n||i)return this.createGeometryCollection(_e.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof $t)return this.createMultiPolygon(_e.toPolygonArray(t));if(a instanceof Kt)return this.createMultiLineString(_e.toLineStringArray(t));if(a instanceof Qt)return this.createMultiPoint(_e.toPointArray(t));et.shouldNeverReachHere(\"Unhandled class: \"+a.getClass().getName())}return a},_e.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},_e.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof C){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(T(arguments[0],V)){var e=arguments[0];return new Qt(e,this)}}},_e.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},_e.prototype.createPolygon=function(){if(0===arguments.length)return new $t(null,null,this);if(1===arguments.length){if(T(arguments[0],V)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof ee){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];return new $t(i,r,this)}},_e.prototype.getSRID=function(){return this._SRID},_e.prototype.createGeometryCollection=function(){if(0===arguments.length)return new zt(null,this);if(1===arguments.length){var t=arguments[0];return new zt(t,this)}},_e.prototype.createGeometry=function(t){return new ie(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},_e.prototype.getPrecisionModel=function(){return this._precisionModel},_e.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(T(arguments[0],V)){var e=arguments[0];return new ee(e,this)}}},_e.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ne(null,this);if(1===arguments.length){var t=arguments[0];return new ne(t,this)}},_e.prototype.createMultiPoint=function(){if(0===arguments.length)return new te(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return new te(t,this)}if(arguments[0]instanceof Array){var e=arguments[0];return this.createMultiPoint(null!==e?this.getCoordinateSequenceFactory().create(e):null)}if(T(arguments[0],V)){var n=arguments[0];if(null===n)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(n.size()).fill(null),r=0;r<n.size();r++){var o=this.getCoordinateSequenceFactory().create(1,n.getDimension());Wt.copy(n,r,o,0,1),i[r]=this.createPoint(o)}return this.createMultiPoint(i)}}},_e.prototype.interfaces_=function(){return[e]},_e.prototype.getClass=function(){return _e},_e.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toGeometryArray=function(t){if(null===t)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.getDefaultCoordinateSequenceFactory=function(){return ce.instance()},_e.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},_e.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},me.serialVersionUID.get=function(){return-0x5ea75f2051eeb400},Object.defineProperties(_e,me);var ve=[\"Point\",\"MultiPoint\",\"LineString\",\"MultiLineString\",\"Polygon\",\"MultiPolygon\"],Ie=function(t){this.geometryFactory=t||new _e};Ie.prototype.read=function(t){var e,n=(e=\"string\"==typeof t?JSON.parse(t):t).type;if(!Ee[n])throw new Error(\"Unknown GeoJSON type: \"+e.type);return-1!==ve.indexOf(n)?Ee[n].apply(this,[e.coordinates]):\"GeometryCollection\"===n?Ee[n].apply(this,[e.geometries]):Ee[n].apply(this,[e])},Ie.prototype.write=function(t){var e=t.getGeometryType();if(!xe[e])throw new Error(\"Geometry is not supported\");return xe[e].apply(this,[t])};var Ee={Feature:function(t){var e={};for(var n in t)e[n]=t[n];if(t.geometry){var i=t.geometry.type;if(!Ee[i])throw new Error(\"Unknown GeoJSON type: \"+t.type);e.geometry=this.read(t.geometry)}return t.bbox&&(e.bbox=Ee.bbox.apply(this,[t.bbox])),e},FeatureCollection:function(t){var e={};if(t.features){e.features=[];for(var n=0;n<t.features.length;++n)e.features.push(this.read(t.features[n]))}return t.bbox&&(e.bbox=this.parse.bbox.apply(this,[t.bbox])),e},coordinates:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(new C(i[0],i[1]))}return e},bbox:function(t){return this.geometryFactory.createLinearRing([new C(t[0],t[1]),new C(t[2],t[1]),new C(t[2],t[3]),new C(t[0],t[3]),new C(t[0],t[1])])},Point:function(t){var e=new C(t[0],t[1]);return this.geometryFactory.createPoint(e)},MultiPoint:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ee.Point.apply(this,[t[n]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(t){var e=Ee.coordinates.apply(this,[t]);return this.geometryFactory.createLineString(e)},MultiLineString:function(t){for(var e=[],n=0;n<t.length;++n)e.push(Ee.LineString.apply(this,[t[n]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(t){for(var e=Ee.coordinates.apply(this,[t[0]]),n=this.geometryFactory.createLinearRing(e),i=[],r=1;r<t.length;++r){var o=t[r],s=Ee.coordinates.apply(this,[o]),a=this.geometryFactory.createLinearRing(s);i.push(a)}return this.geometryFactory.createPolygon(n,i)},MultiPolygon:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(Ee.Polygon.apply(this,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(t){for(var e=[],n=0;n<t.length;++n){var i=t[n];e.push(this.read(i))}return this.geometryFactory.createGeometryCollection(e)}},xe={coordinate:function(t){return[t.x,t.y]},Point:function(t){return{type:\"Point\",coordinates:xe.coordinate.apply(this,[t.getCoordinate()])}},MultiPoint:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=xe.Point.apply(this,[i]);e.push(r.coordinates)}return{type:\"MultiPoint\",coordinates:e}},LineString:function(t){for(var e=[],n=t.getCoordinates(),i=0;i<n.length;++i){var r=n[i];e.push(xe.coordinate.apply(this,[r]))}return{type:\"LineString\",coordinates:e}},MultiLineString:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=xe.LineString.apply(this,[i]);e.push(r.coordinates)}return{type:\"MultiLineString\",coordinates:e}},Polygon:function(t){var e=[],n=xe.LineString.apply(this,[t._shell]);e.push(n.coordinates);for(var i=0;i<t._holes.length;++i){var r=t._holes[i],o=xe.LineString.apply(this,[r]);e.push(o.coordinates)}return{type:\"Polygon\",coordinates:e}},MultiPolygon:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=xe.Polygon.apply(this,[i]);e.push(r.coordinates)}return{type:\"MultiPolygon\",coordinates:e}},GeometryCollection:function(t){for(var e=[],n=0;n<t._geometries.length;++n){var i=t._geometries[n],r=i.getGeometryType();e.push(xe[r].apply(this,[i]))}return{type:\"GeometryCollection\",geometries:e}}},Ne=function(t){this.geometryFactory=t||new _e,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new Ie(this.geometryFactory)};Ne.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===fe.FIXED&&this.reducePrecision(e),e},Ne.prototype.reducePrecision=function(t){var e,n;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(e=0,n=t.points.length;e<n;e++)this.precisionModel.makePrecise(t.points[e]);else if(t.geometries)for(e=0,n=t.geometries.length;e<n;e++)this.reducePrecision(t.geometries[e])};var Ce=function(){this.parser=new Ie(this.geometryFactory)};Ce.prototype.write=function(t){return this.parser.write(t)};var Se=function(){},Le={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};Se.prototype.interfaces_=function(){return[]},Se.prototype.getClass=function(){return Se},Se.opposite=function(t){return t===Se.LEFT?Se.RIGHT:t===Se.RIGHT?Se.LEFT:t},Le.ON.get=function(){return 0},Le.LEFT.get=function(){return 1},Le.RIGHT.get=function(){return 2},Object.defineProperties(Se,Le),(d.prototype=new Error).name=\"EmptyStackException\",(y.prototype=new xt).add=function(t){return this.array_.push(t),!0},y.prototype.get=function(t){if(t<0||t>=this.size())throw new Error;return this.array_[t]},y.prototype.push=function(t){return this.array_.push(t),t},y.prototype.pop=function(t){if(0===this.array_.length)throw new d;return this.array_.pop()},y.prototype.peek=function(){if(0===this.array_.length)throw new d;return this.array_[this.array_.length-1]},y.prototype.empty=function(){return 0===this.array_.length},y.prototype.isEmpty=function(){return this.empty()},y.prototype.search=function(t){return this.array_.indexOf(t)},y.prototype.size=function(){return this.array_.length},y.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e<n;e++)t.push(this.array_[e]);return t};var be=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};be.prototype.getCoordinate=function(){return this._minCoord},be.prototype.getRightmostSide=function(t,e){var n=this.getRightmostSideOfSegment(t,e);return n<0&&(n=this.getRightmostSideOfSegment(t,e-1)),n<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),n},be.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();et.isTrue(this._minIndex>0&&this._minIndex<t.length,\"rightmost point expected to be interior vertex of edge\");var e=t[this._minIndex-1],n=t[this._minIndex+1],i=at.computeOrientation(this._minCoord,n,e),r=!1;e.y<this._minCoord.y&&n.y<this._minCoord.y&&i===at.COUNTERCLOCKWISE?r=!0:e.y>this._minCoord.y&&n.y>this._minCoord.y&&i===at.CLOCKWISE&&(r=!0),r&&(this._minIndex=this._minIndex-1)},be.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var i=Se.LEFT;return n[e].y<n[e+1].y&&(i=Se.RIGHT),i},be.prototype.getEdge=function(){return this._orientedDe},be.prototype.checkForRightmostCoordinate=function(t){for(var e=t.getEdge().getCoordinates(),n=0;n<e.length-1;n++)(null===this._minCoord||e[n].x>this._minCoord.x)&&(this._minDe=t,this._minIndex=n,this._minCoord=e[n])},be.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},be.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}et.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),\"inconsistency in rightmost processing\"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;this.getRightmostSide(this._minDe,this._minIndex)===Se.LEFT&&(this._orientedDe=this._minDe.getSym())},be.prototype.interfaces_=function(){return[]},be.prototype.getClass=function(){return be};var we=function(t){function e(n,i){t.call(this,e.msgWithCoord(n,i)),this.pt=i?new C(i):null,this.name=\"TopologyException\"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+\" [ \"+e+\" ]\"},e}($),Oe=function(){this.array_=[]};Oe.prototype.addLast=function(t){this.array_.push(t)},Oe.prototype.removeFirst=function(){return this.array_.shift()},Oe.prototype.isEmpty=function(){return 0===this.array_.length};var Te=function(){this._finder=null,this._dirEdgeList=new Nt,this._nodes=new Nt,this._rightMostCoord=null,this._env=null,this._finder=new be};Te.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){t.next().setVisited(!1)}},Te.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Te.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var i=n.next();if(i.isVisited()||i.getSym().isVisited()){e=i;break}}if(null===e)throw new we(\"unable to find edge to compute depths at \"+t.getCoordinate());t.getEdges().computeDepths(e);for(var r=t.getEdges().iterator();r.hasNext();){var o=r.next();o.setVisited(!0),this.copySymDepths(o)}},Te.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Se.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Te.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Te.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Se.RIGHT)>=1&&e.getDepth(Se.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Te.prototype.computeDepths=function(t){var e=new Pt,n=new Oe,i=t.getNode();for(n.addLast(i),e.add(i),t.setVisited(!0);!n.isEmpty();){var r=n.removeFirst();e.add(r),this.computeNodeDepth(r);for(var o=r.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Te.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},Te.prototype.getEnvelope=function(){if(null===this._env){for(var t=new j,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),i=0;i<n.length-1;i++)t.expandToInclude(n[i]);this._env=t}return this._env},Te.prototype.addReachable=function(t){var e=new y;for(e.add(t);!e.empty();){var n=e.pop();this.add(n,e)}},Te.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(Se.LEFT,t.getDepth(Se.RIGHT)),e.setDepth(Se.RIGHT,t.getDepth(Se.LEFT))},Te.prototype.add=function(t,e){t.setVisited(!0),this._nodes.add(t);for(var n=t.getEdges().iterator();n.hasNext();){var i=n.next();this._dirEdgeList.add(i);var r=i.getSym().getNode();r.isVisited()||e.push(r)}},Te.prototype.getNodes=function(){return this._nodes},Te.prototype.getDirectedEdges=function(){return this._dirEdgeList},Te.prototype.interfaces_=function(){return[E]},Te.prototype.getClass=function(){return Te};var Re=function t(){if(this.location=null,1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var n=arguments[0];this.init(1),this.location[Se.ON]=n}else if(arguments[0]instanceof t){var i=arguments[0];if(this.init(i.location.length),null!==i)for(var r=0;r<this.location.length;r++)this.location[r]=i.location[r]}}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.init(3),this.location[Se.ON]=o,this.location[Se.LEFT]=s,this.location[Se.RIGHT]=a}};Re.prototype.setAllLocations=function(t){for(var e=0;e<this.location.length;e++)this.location[e]=t},Re.prototype.isNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]!==w.NONE)return!1;return!0},Re.prototype.setAllLocationsIfNull=function(t){for(var e=0;e<this.location.length;e++)this.location[e]===w.NONE&&(this.location[e]=t)},Re.prototype.isLine=function(){return 1===this.location.length},Re.prototype.merge=function(t){if(t.location.length>this.location.length){var e=new Array(3).fill(null);e[Se.ON]=this.location[Se.ON],e[Se.LEFT]=w.NONE,e[Se.RIGHT]=w.NONE,this.location=e}for(var n=0;n<this.location.length;n++)this.location[n]===w.NONE&&n<t.location.length&&(this.location[n]=t.location[n])},Re.prototype.getLocations=function(){return this.location},Re.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[Se.LEFT];this.location[Se.LEFT]=this.location[Se.RIGHT],this.location[Se.RIGHT]=t},Re.prototype.toString=function(){var t=new D;return this.location.length>1&&t.append(w.toLocationSymbol(this.location[Se.LEFT])),t.append(w.toLocationSymbol(this.location[Se.ON])),this.location.length>1&&t.append(w.toLocationSymbol(this.location[Se.RIGHT])),t.toString()},Re.prototype.setLocations=function(t,e,n){this.location[Se.ON]=t,this.location[Se.LEFT]=e,this.location[Se.RIGHT]=n},Re.prototype.get=function(t){return t<this.location.length?this.location[t]:w.NONE},Re.prototype.isArea=function(){return this.location.length>1},Re.prototype.isAnyNull=function(){for(var t=0;t<this.location.length;t++)if(this.location[t]===w.NONE)return!0;return!1},Re.prototype.setLocation=function(){if(1===arguments.length){var t=arguments[0];this.setLocation(Se.ON,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.location[e]=n}},Re.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(w.NONE)},Re.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},Re.prototype.allPositionsEqual=function(t){for(var e=0;e<this.location.length;e++)if(this.location[e]!==t)return!1;return!0},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re};var Pe=function t(){if(this.elt=new Array(2).fill(null),1===arguments.length){if(Number.isInteger(arguments[0])){var e=arguments[0];this.elt[0]=new Re(e),this.elt[1]=new Re(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.elt[0]=new Re(n.elt[0]),this.elt[1]=new Re(n.elt[1])}}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.elt[0]=new Re(w.NONE),this.elt[1]=new Re(w.NONE),this.elt[i].setLocation(r)}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];this.elt[0]=new Re(o,s,a),this.elt[1]=new Re(o,s,a)}else if(4===arguments.length){var u=arguments[0],l=arguments[1],c=arguments[2],p=arguments[3];this.elt[0]=new Re(w.NONE,w.NONE,w.NONE),this.elt[1]=new Re(w.NONE,w.NONE,w.NONE),this.elt[u].setLocations(l,c,p)}};Pe.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Pe.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Pe.prototype.isNull=function(t){return this.elt[t].isNull()},Pe.prototype.setAllLocationsIfNull=function(){if(1===arguments.length){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.elt[e].setAllLocationsIfNull(n)}},Pe.prototype.isLine=function(t){return this.elt[t].isLine()},Pe.prototype.merge=function(t){for(var e=0;e<2;e++)null===this.elt[e]&&null!==t.elt[e]?this.elt[e]=new Re(t.elt[e]):this.elt[e].merge(t.elt[e])},Pe.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Pe.prototype.getLocation=function(){if(1===arguments.length){var t=arguments[0];return this.elt[t].get(Se.ON)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return this.elt[e].get(n)}},Pe.prototype.toString=function(){var t=new D;return null!==this.elt[0]&&(t.append(\"A:\"),t.append(this.elt[0].toString())),null!==this.elt[1]&&(t.append(\" B:\"),t.append(this.elt[1].toString())),t.toString()},Pe.prototype.isArea=function(){if(0===arguments.length)return this.elt[0].isArea()||this.elt[1].isArea();if(1===arguments.length){var t=arguments[0];return this.elt[t].isArea()}},Pe.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Pe.prototype.setLocation=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(Se.ON,e)}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this.elt[n].setLocation(i,r)}},Pe.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Pe.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Pe.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new Re(this.elt[t].location[0]))},Pe.prototype.interfaces_=function(){return[]},Pe.prototype.getClass=function(){return Pe},Pe.toLineLabel=function(t){for(var e=new Pe(w.NONE),n=0;n<2;n++)e.setLocation(n,t.getLocation(n));return e};var De=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new Nt,this._pts=new Nt,this._label=new Pe(w.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new Nt,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};De.prototype.computeRing=function(){if(null!==this._ring)return null;for(var t=new Array(this._pts.size()).fill(null),e=0;e<this._pts.size();e++)t[e]=this._pts.get(e);this._ring=this._geometryFactory.createLinearRing(t),this._isHole=at.isCCW(this._ring.getCoordinates())},De.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},De.prototype.computePoints=function(t){this._startDe=t;var e=t,n=!0;do{if(null===e)throw new we(\"Found null DirectedEdge\");if(e.getEdgeRing()===this)throw new we(\"Directed Edge visited twice during ring-building at \"+e.getCoordinate());this._edges.add(e);var i=e.getLabel();et.isTrue(i.isArea()),this.mergeLabel(i),this.addPoints(e.getEdge(),e.isForward(),n),n=!1,this.setEdgeRing(e,this),e=this.getNext(e)}while(e!==this._startDe)},De.prototype.getLinearRing=function(){return this._ring},De.prototype.getCoordinate=function(t){return this._pts.get(t)},De.prototype.computeMaxNodeDegree=function(){this._maxNodeDegree=0;var t=this._startDe;do{var e=t.getNode().getEdges().getOutgoingDegree(this);e>this._maxNodeDegree&&(this._maxNodeDegree=e),t=this.getNext(t)}while(t!==this._startDe);this._maxNodeDegree*=2},De.prototype.addPoints=function(t,e,n){var i=t.getCoordinates();if(e){var r=1;n&&(r=0);for(var o=r;o<i.length;o++)this._pts.add(i[o])}else{var s=i.length-2;n&&(s=i.length-1);for(var a=s;a>=0;a--)this._pts.add(i[a])}},De.prototype.isHole=function(){return this._isHole},De.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},De.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!at.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();){if(n.next().containsPoint(t))return!1}return!0},De.prototype.addHole=function(t){this._holes.add(t)},De.prototype.isShell=function(){return null===this._shell},De.prototype.getLabel=function(){return this._label},De.prototype.getEdges=function(){return this._edges},De.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},De.prototype.getShell=function(){return this._shell},De.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=e.getLocation(n,Se.RIGHT);if(i===w.NONE)return null;if(this._label.getLocation(n)===w.NONE)return this._label.setLocation(n,i),null}},De.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},De.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n<this._holes.size();n++)e[n]=this._holes.get(n).getLinearRing();return t.createPolygon(this.getLinearRing(),e)},De.prototype.interfaces_=function(){return[]},De.prototype.getClass=function(){return De};var Me=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setEdgeRing=function(t,e){t.setMinEdgeRing(e)},e.prototype.getNext=function(t){return t.getNextMin()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(De),Ae=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildMinimalRings=function(){var t=new Nt,e=this._startDe;do{if(null===e.getMinEdgeRing()){var n=new Me(e,this._geometryFactory);t.add(n)}e=e.getNext()}while(e!==this._startDe);return t},e.prototype.setEdgeRing=function(t,e){t.setEdgeRing(e)},e.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var t=this._startDe;do{t.getNode().getEdges().linkMinimalDirectedEdges(this),t=t.getNext()}while(t!==this._startDe)},e.prototype.getNext=function(t){return t.getNext()},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(De),Fe=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._label=t}};Fe.prototype.setVisited=function(t){this._isVisited=t},Fe.prototype.setInResult=function(t){this._isInResult=t},Fe.prototype.isCovered=function(){return this._isCovered},Fe.prototype.isCoveredSet=function(){return this._isCoveredSet},Fe.prototype.setLabel=function(t){this._label=t},Fe.prototype.getLabel=function(){return this._label},Fe.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Fe.prototype.updateIM=function(t){et.isTrue(this._label.getGeometryCount()>=2,\"found partial label\"),this.computeIM(t)},Fe.prototype.isInResult=function(){return this._isInResult},Fe.prototype.isVisited=function(){return this._isVisited},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe};var Ge=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new Pe(0,w.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();){if(t.next().getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println(\"node \"+this._coord+\" lbl: \"+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=w.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var i=t.getLocation(e);n!==w.BOUNDARY&&(n=i)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new Pe(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){if(arguments[0]instanceof e){var t=arguments[0];this.mergeLabel(t._label)}else if(arguments[0]instanceof Pe)for(var n=arguments[0],i=0;i<2;i++){var r=this.computeMergedLocation(n,i);this._label.getLocation(i)===w.NONE&&this._label.setLocation(i,r)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=w.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case w.BOUNDARY:n=w.INTERIOR;break;case w.INTERIOR:default:n=w.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Fe),qe=function(){this.nodeMap=new p,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};qe.prototype.find=function(t){return this.nodeMap.get(t)},qe.prototype.addNode=function(){if(arguments[0]instanceof C){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Ge){var n=arguments[0],i=this.nodeMap.get(n.getCoordinate());return null===i?(this.nodeMap.put(n.getCoordinate(),n),n):(i.mergeLabel(n),i)}},qe.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){e.next().print(t)}},qe.prototype.iterator=function(){return this.nodeMap.values().iterator()},qe.prototype.values=function(){return this.nodeMap.values()},qe.prototype.getBoundaryNodes=function(t){for(var e=new Nt,n=this.iterator();n.hasNext();){var i=n.next();i.getLabel().getLocation(t)===w.BOUNDARY&&e.add(i)}return e},qe.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},qe.prototype.interfaces_=function(){return[]},qe.prototype.getClass=function(){return qe};var Be=function(){},Ve={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be},Be.isNorthern=function(t){return t===Be.NE||t===Be.NW},Be.isOpposite=function(t,e){if(t===e)return!1;return 2===(t-e+4)%4},Be.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=t<e?t:e;return 0===n&&3===(t>e?t:e)?3:n},Be.isInHalfPlane=function(t,e){return e===Be.SE?t===Be.SE||t===Be.SW:t===e||t===e+1},Be.quadrant=function(){if(\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new m(\"Cannot compute the quadrant for point ( \"+t+\", \"+e+\" )\");return t>=0?e>=0?Be.NE:Be.SE:e>=0?Be.NW:Be.SW}if(arguments[0]instanceof C&&arguments[1]instanceof C){var n=arguments[0],i=arguments[1];if(i.x===n.x&&i.y===n.y)throw new m(\"Cannot compute the quadrant for two identical points \"+n);return i.x>=n.x?i.y>=n.y?Be.NE:Be.SE:i.y>=n.y?Be.NW:Be.SW}},Ve.NE.get=function(){return 0},Ve.NW.get=function(){return 1},Ve.SW.get=function(){return 2},Ve.SE.get=function(){return 3},Object.defineProperties(Be,Ve);var Ue=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];this._edge=e,this.init(n,i),this._label=null}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this._edge=r,this.init(o,s),this._label=a}};Ue.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:at.computeOrientation(t._p0,t._p1,this._p1)},Ue.prototype.getDy=function(){return this._dy},Ue.prototype.getCoordinate=function(){return this._p0},Ue.prototype.setNode=function(t){this._node=t},Ue.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),n=this.getClass().getName(),i=n.lastIndexOf(\".\"),r=n.substring(i+1);t.print(\" \"+r+\": \"+this._p0+\" - \"+this._p1+\" \"+this._quadrant+\":\"+e+\" \"+this._label)},Ue.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Ue.prototype.getDirectedCoordinate=function(){return this._p1},Ue.prototype.getDx=function(){return this._dx},Ue.prototype.getLabel=function(){return this._label},Ue.prototype.getEdge=function(){return this._edge},Ue.prototype.getQuadrant=function(){return this._quadrant},Ue.prototype.getNode=function(){return this._node},Ue.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),n=e.lastIndexOf(\".\");return\" \"+e.substring(n+1)+\": \"+this._p0+\" - \"+this._p1+\" \"+this._quadrant+\":\"+t+\" \"+this._label},Ue.prototype.computeLabel=function(t){},Ue.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Be.quadrant(this._dx,this._dy),et.isTrue(!(0===this._dx&&0===this._dy),\"EdgeEnd with identical endpoints found\")},Ue.prototype.interfaces_=function(){return[E]},Ue.prototype.getClass=function(){return Ue};var ze=function(t){function e(){var e=arguments[0],n=arguments[1];if(t.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=n,n)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getNextMin=function(){return this._nextMin},e.prototype.getDepth=function(t){return this._depth[t]},e.prototype.setVisited=function(t){this._isVisited=t},e.prototype.computeDirectedLabel=function(){this._label=new Pe(this._edge.getLabel()),this._isForward||this._label.flip()},e.prototype.getNext=function(){return this._next},e.prototype.setDepth=function(t,e){if(-999!==this._depth[t]&&this._depth[t]!==e)throw new we(\"assigned depths do not match\",this.getCoordinate());this._depth[t]=e},e.prototype.isInteriorAreaEdge=function(){for(var t=!0,e=0;e<2;e++)this._label.isArea(e)&&this._label.getLocation(e,Se.LEFT)===w.INTERIOR&&this._label.getLocation(e,Se.RIGHT)===w.INTERIOR||(t=!1);return t},e.prototype.setNextMin=function(t){this._nextMin=t},e.prototype.print=function(e){t.prototype.print.call(this,e),e.print(\" \"+this._depth[Se.LEFT]+\"/\"+this._depth[Se.RIGHT]),e.print(\" (\"+this.getDepthDelta()+\")\"),this._isInResult&&e.print(\" inResult\")},e.prototype.setMinEdgeRing=function(t){this._minEdgeRing=t},e.prototype.isLineEdge=function(){var t=this._label.isLine(0)||this._label.isLine(1),e=!this._label.isArea(0)||this._label.allPositionsEqual(0,w.EXTERIOR),n=!this._label.isArea(1)||this._label.allPositionsEqual(1,w.EXTERIOR);return t&&e&&n},e.prototype.setEdgeRing=function(t){this._edgeRing=t},e.prototype.getMinEdgeRing=function(){return this._minEdgeRing},e.prototype.getDepthDelta=function(){var t=this._edge.getDepthDelta();return this._isForward||(t=-t),t},e.prototype.setInResult=function(t){this._isInResult=t},e.prototype.getSym=function(){return this._sym},e.prototype.isForward=function(){return this._isForward},e.prototype.getEdge=function(){return this._edge},e.prototype.printEdge=function(t){this.print(t),t.print(\" \"),this._isForward?this._edge.print(t):this._edge.printReverse(t)},e.prototype.setSym=function(t){this._sym=t},e.prototype.setVisitedEdge=function(t){this.setVisited(t),this._sym.setVisited(t)},e.prototype.setEdgeDepths=function(t,e){var n=this.getEdge().getDepthDelta();this._isForward||(n=-n);var i=1;t===Se.LEFT&&(i=-1);var r=Se.opposite(t),o=e+n*i;this.setDepth(t,e),this.setDepth(r,o)},e.prototype.getEdgeRing=function(){return this._edgeRing},e.prototype.isInResult=function(){return this._isInResult},e.prototype.setNext=function(t){this._next=t},e.prototype.isVisited=function(){return this._isVisited},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.depthFactor=function(t,e){return t===w.EXTERIOR&&e===w.INTERIOR?1:t===w.INTERIOR&&e===w.EXTERIOR?-1:0},e}(Ue),Xe=function(){};Xe.prototype.createNode=function(t){return new Ge(t,null)},Xe.prototype.interfaces_=function(){return[]},Xe.prototype.getClass=function(){return Xe};var Ye=function(){if(this._edges=new Nt,this._nodes=null,this._edgeEndList=new Nt,0===arguments.length)this._nodes=new qe(new Xe);else if(1===arguments.length){var t=arguments[0];this._nodes=new qe(t)}};Ye.prototype.printEdges=function(t){t.println(\"Edges:\");for(var e=0;e<this._edges.size();e++){t.println(\"edge \"+e+\":\");var n=this._edges.get(e);n.print(t),n.eiList.print(t)}},Ye.prototype.find=function(t){return this._nodes.find(t)},Ye.prototype.addNode=function(){if(arguments[0]instanceof Ge){var t=arguments[0];return this._nodes.addNode(t)}if(arguments[0]instanceof C){var e=arguments[0];return this._nodes.addNode(e)}},Ye.prototype.getNodeIterator=function(){return this._nodes.iterator()},Ye.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkResultDirectedEdges()}},Ye.prototype.debugPrintln=function(t){Y.out.println(t)},Ye.prototype.isBoundaryNode=function(t,e){var n=this._nodes.find(e);if(null===n)return!1;var i=n.getLabel();return null!==i&&i.getLocation(t)===w.BOUNDARY},Ye.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){t.next().getEdges().linkAllDirectedEdges()}},Ye.prototype.matchInSameDirection=function(t,e,n,i){return!!t.equals(n)&&(at.computeOrientation(t,e,i)===at.COLLINEAR&&Be.quadrant(t,e)===Be.quadrant(n,i))},Ye.prototype.getEdgeEnds=function(){return this._edgeEndList},Ye.prototype.debugPrint=function(t){Y.out.print(t)},Ye.prototype.getEdgeIterator=function(){return this._edges.iterator()},Ye.prototype.findEdgeInSameDirection=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(this.matchInSameDirection(t,e,r[0],r[1]))return i;if(this.matchInSameDirection(t,e,r[r.length-1],r[r.length-2]))return i}return null},Ye.prototype.insertEdge=function(t){this._edges.add(t)},Ye.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var n=e.next();if(n.getEdge()===t)return n}return null},Ye.prototype.addEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this._edges.add(n);var i=new ze(n,!0),r=new ze(n,!1);i.setSym(r),r.setSym(i),this.add(i),this.add(r)}},Ye.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},Ye.prototype.getNodes=function(){return this._nodes.values()},Ye.prototype.findEdge=function(t,e){for(var n=0;n<this._edges.size();n++){var i=this._edges.get(n),r=i.getCoordinates();if(t.equals(r[0])&&e.equals(r[1]))return i}return null},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye},Ye.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){e.next().getEdges().linkResultDirectedEdges()}};var ke=function(){this._geometryFactory=null,this._shellList=new Nt;var t=arguments[0];this._geometryFactory=t};ke.prototype.sortShellsAndHoles=function(t,e,n){for(var i=t.iterator();i.hasNext();){var r=i.next();r.isHole()?n.add(r):e.add(r)}},ke.prototype.computePolygons=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next().toPolygon(this._geometryFactory);e.add(i)}return e},ke.prototype.placeFreeHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(null===i.getShell()){var r=this.findEdgeRingContaining(i,t);if(null===r)throw new we(\"unable to assign hole to a shell\",i.getCoordinate(0));i.setShell(r)}}},ke.prototype.buildMinimalEdgeRings=function(t,e,n){for(var i=new Nt,r=t.iterator();r.hasNext();){var o=r.next();if(o.getMaxNodeDegree()>2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else i.add(o)}return i},ke.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){if(e.next().containsPoint(t))return!0}return!1},ke.prototype.buildMaximalEdgeRings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();if(i.isInResult()&&i.getLabel().isArea()&&null===i.getEdgeRing()){var r=new Ae(i,this._geometryFactory);e.add(r),r.setInResult()}}return e},ke.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();i.isHole()&&i.setShell(t)}},ke.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},ke.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),i=n.getEnvelopeInternal(),r=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),l=u.getLinearRing(),c=l.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var p=!1;c.contains(i)&&at.isPointInRing(r,l.getCoordinates())&&(p=!0),p&&(null===o||s.contains(c))&&(o=u)}return o},ke.prototype.findShell=function(t){for(var e=0,n=null,i=t.iterator();i.hasNext();){var r=i.next();r.isHole()||(n=r,e++)}return et.isTrue(e<=1,\"found two shells in MinimalEdgeRing list\"),n},ke.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Ye.linkResultDirectedEdges(n);var i=this.buildMaximalEdgeRings(e),r=new Nt,o=this.buildMinimalEdgeRings(i,this._shellList,r);this.sortShellsAndHoles(o,this._shellList,r),this.placeFreeHoles(this._shellList,r)}},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke};var je=function(){};je.prototype.getBounds=function(){},je.prototype.interfaces_=function(){return[]},je.prototype.getClass=function(){return je};var He=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};He.prototype.getItem=function(){return this._item},He.prototype.getBounds=function(){return this._bounds},He.prototype.interfaces_=function(){return[je,e]},He.prototype.getClass=function(){return He};var We=function(){this._size=null,this._items=null,this._size=0,this._items=new Nt,this._items.add(null)};We.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},We.prototype.size=function(){return this._size},We.prototype.reorder=function(t){for(var e=null,n=this._items.get(t);2*t<=this._size&&((e=2*t)!==this._size&&this._items.get(e+1).compareTo(this._items.get(e))<0&&e++,this._items.get(e).compareTo(n)<0);t=e)this._items.set(t,this._items.get(e));this._items.set(t,n)},We.prototype.clear=function(){this._size=0,this._items.clear()},We.prototype.isEmpty=function(){return 0===this._size},We.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},We.prototype.interfaces_=function(){return[]},We.prototype.getClass=function(){return We};var Ke=function(){};Ke.prototype.visitItem=function(t){},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var Je=function(){};Je.prototype.insert=function(t,e){},Je.prototype.remove=function(t,e){},Je.prototype.query=function(){},Je.prototype.interfaces_=function(){return[]},Je.prototype.getClass=function(){return Je};var Qe=function(){if(this._childBoundables=new Nt,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},Ze={serialVersionUID:{configurable:!0}};Qe.prototype.getLevel=function(){return this._level},Qe.prototype.size=function(){return this._childBoundables.size()},Qe.prototype.getChildBoundables=function(){return this._childBoundables},Qe.prototype.addChildBoundable=function(t){et.isTrue(null===this._bounds),this._childBoundables.add(t)},Qe.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Qe.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},Qe.prototype.interfaces_=function(){return[je,e]},Qe.prototype.getClass=function(){return Qe},Ze.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(Qe,Ze);var $e=function(){};$e.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},$e.min=function(t){return $e.sort(t),t.get(0)},$e.sort=function(t,e){var n=t.toArray();e?Gt.sort(n,e):Gt.sort(n);for(var i=t.iterator(),r=0,o=n.length;r<o;r++)i.next(),i.set(n[r])},$e.singletonList=function(t){var e=new Nt;return e.add(t),e};var tn=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],n=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=n,this._distance=this.distance()};tn.prototype.expandToQueue=function(t,e){var n=tn.isComposite(this._boundable1),i=tn.isComposite(this._boundable2);if(n&&i)return tn.area(this._boundable1)>tn.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new m(\"neither boundable is composite\")},tn.prototype.isLeaves=function(){return!(tn.isComposite(this._boundable1)||tn.isComposite(this._boundable2))},tn.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},tn.prototype.expand=function(t,e,n,i){for(var r=t.getChildBoundables().iterator();r.hasNext();){var o=r.next(),s=new tn(o,e,this._itemDistance);s.getDistance()<i&&n.add(s)}},tn.prototype.getBoundable=function(t){return 0===t?this._boundable1:this._boundable2},tn.prototype.getDistance=function(){return this._distance},tn.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},tn.prototype.interfaces_=function(){return[E]},tn.prototype.getClass=function(){return tn},tn.area=function(t){return t.getBounds().getArea()},tn.isComposite=function(t){return t instanceof Qe};var en=function t(){if(this._root=null,this._built=!1,this._itemBoundables=new Nt,this._nodeCapacity=null,0===arguments.length){var e=t.DEFAULT_NODE_CAPACITY;this._nodeCapacity=e}else if(1===arguments.length){var n=arguments[0];et.isTrue(n>1,\"Node capacity must be greater than 1\"),this._nodeCapacity=n}},nn={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};en.prototype.getNodeCapacity=function(){return this._nodeCapacity},en.prototype.lastNode=function(t){return t.get(t.size()-1)},en.prototype.size=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();n instanceof Qe?t+=this.size(n):n instanceof He&&(t+=1)}return t}},en.prototype.removeItem=function(t,e){for(var n=null,i=t.getChildBoundables().iterator();i.hasNext();){var r=i.next();r instanceof He&&r.getItem()===e&&(n=r)}return null!==n&&(t.getChildBoundables().remove(n),!0)},en.prototype.itemsTree=function(){if(0===arguments.length){this.build();var t=this.itemsTree(this._root);return null===t?new Nt:t}if(1===arguments.length){for(var e=arguments[0],n=new Nt,i=e.getChildBoundables().iterator();i.hasNext();){var r=i.next();if(r instanceof Qe){var o=this.itemsTree(r);null!==o&&n.add(o)}else r instanceof He?n.add(r.getItem()):et.shouldNeverReachHere()}return n.size()<=0?null:n}},en.prototype.insert=function(t,e){et.isTrue(!this._built,\"Cannot insert items into an STR packed R-tree after it has been built.\"),this._itemBoundables.add(new He(t,e))},en.prototype.boundablesAtLevel=function(){if(1===arguments.length){var t=arguments[0],e=new Nt;return this.boundablesAtLevel(t,this._root,e),e}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];if(et.isTrue(n>-2),i.getLevel()===n)return r.add(i),null;for(var o=i.getChildBoundables().iterator();o.hasNext();){var s=o.next();s instanceof Qe?this.boundablesAtLevel(n,s,r):(et.isTrue(s instanceof He),-1===n&&r.add(s))}return null}},en.prototype.query=function(){if(1===arguments.length){var t=arguments[0];this.build();var e=new Nt;return this.isEmpty()?e:(this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.query(t,this._root,e),e)}if(2===arguments.length){var n=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.query(n,this._root,i)}else if(3===arguments.length)if(T(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe)for(var r=arguments[0],o=arguments[1],s=arguments[2],a=o.getChildBoundables(),u=0;u<a.size();u++){var l=a.get(u);this.getIntersectsOp().intersects(l.getBounds(),r)&&(l instanceof Qe?this.query(r,l,s):l instanceof He?s.visitItem(l.getItem()):et.shouldNeverReachHere())}else if(T(arguments[2],xt)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe)for(var c=arguments[0],p=arguments[1],h=arguments[2],f=p.getChildBoundables(),g=0;g<f.size();g++){var d=f.get(g);this.getIntersectsOp().intersects(d.getBounds(),c)&&(d instanceof Qe?this.query(c,d,h):d instanceof He?h.add(d.getItem()):et.shouldNeverReachHere())}},en.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},en.prototype.getRoot=function(){return this.build(),this._root},en.prototype.remove=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),t)&&this.remove(t,this._root,e)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=this.removeItem(i,r);if(o)return!0;for(var s=null,a=i.getChildBoundables().iterator();a.hasNext();){var u=a.next();if(this.getIntersectsOp().intersects(u.getBounds(),n)&&(u instanceof Qe&&(o=this.remove(n,u,r)))){s=u;break}}return null!==s&&s.getChildBoundables().isEmpty()&&i.getChildBoundables().remove(s),o}},en.prototype.createHigherLevels=function(t,e){et.isTrue(!t.isEmpty());var n=this.createParentBoundables(t,e+1);return 1===n.size()?n.get(0):this.createHigherLevels(n,e+1)},en.prototype.depth=function(){if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(1===arguments.length){for(var t=0,e=arguments[0].getChildBoundables().iterator();e.hasNext();){var n=e.next();if(n instanceof Qe){var i=this.depth(n);i>t&&(t=i)}}return t+1}},en.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var n=new Nt;n.add(this.createNode(e));var i=new Nt(t);$e.sort(i,this.getComparator());for(var r=i.iterator();r.hasNext();){var o=r.next();this.lastNode(n).getChildBoundables().size()===this.getNodeCapacity()&&n.add(this.createNode(e)),this.lastNode(n).addChildBoundable(o)}return n},en.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},en.prototype.interfaces_=function(){return[e]},en.prototype.getClass=function(){return en},en.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},nn.IntersectsOp.get=function(){return rn},nn.serialVersionUID.get=function(){return-0x35ef64c82d4c5400},nn.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(en,nn);var rn=function(){},on=function(){};on.prototype.distance=function(t,e){},on.prototype.interfaces_=function(){return[]},on.prototype.getClass=function(){return on};var sn=function(t){function n(e){e=e||n.DEFAULT_NODE_CAPACITY,t.call(this,e)}t&&(n.__proto__=t),(n.prototype=Object.create(t&&t.prototype)).constructor=n;var i={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return n.prototype.createParentBoundablesFromVerticalSlices=function(t,e){et.isTrue(t.length>0);for(var n=new Nt,i=0;i<t.length;i++)n.addAll(this.createParentBoundablesFromVerticalSlice(t[i],e));return n},n.prototype.createNode=function(t){return new an(t)},n.prototype.size=function(){return 0===arguments.length?t.prototype.size.call(this):t.prototype.size.apply(this,arguments)},n.prototype.insert=function(){if(2!==arguments.length)return t.prototype.insert.apply(this,arguments);var e=arguments[0],n=arguments[1];if(e.isNull())return null;t.prototype.insert.call(this,e,n)},n.prototype.getIntersectsOp=function(){return n.intersectsOp},n.prototype.verticalSlices=function(t,e){for(var n=Math.trunc(Math.ceil(t.size()/e)),i=new Array(e).fill(null),r=t.iterator(),o=0;o<e;o++){i[o]=new Nt;for(var s=0;r.hasNext()&&s<n;){var a=r.next();i[o].add(a),s++}}return i},n.prototype.query=function(){if(1===arguments.length){var e=arguments[0];return t.prototype.query.call(this,e)}if(2===arguments.length){var n=arguments[0],i=arguments[1];t.prototype.query.call(this,n,i)}else if(3===arguments.length)if(T(arguments[2],Ke)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe){var r=arguments[0],o=arguments[1],s=arguments[2];t.prototype.query.call(this,r,o,s)}else if(T(arguments[2],xt)&&arguments[0]instanceof Object&&arguments[1]instanceof Qe){var a=arguments[0],u=arguments[1],l=arguments[2];t.prototype.query.call(this,a,u,l)}},n.prototype.getComparator=function(){return n.yComparator},n.prototype.createParentBoundablesFromVerticalSlice=function(e,n){return t.prototype.createParentBoundables.call(this,e,n)},n.prototype.remove=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return t.prototype.remove.call(this,e,n)}return t.prototype.remove.apply(this,arguments)},n.prototype.depth=function(){return 0===arguments.length?t.prototype.depth.call(this):t.prototype.depth.apply(this,arguments)},n.prototype.createParentBoundables=function(t,e){et.isTrue(!t.isEmpty());var i=Math.trunc(Math.ceil(t.size()/this.getNodeCapacity())),r=new Nt(t);$e.sort(r,n.xComparator);var o=this.verticalSlices(r,Math.trunc(Math.ceil(Math.sqrt(i))));return this.createParentBoundablesFromVerticalSlices(o,e)},n.prototype.nearestNeighbour=function(){if(1===arguments.length){if(T(arguments[0],on)){var t=arguments[0],e=new tn(this.getRoot(),this.getRoot(),t);return this.nearestNeighbour(e)}if(arguments[0]instanceof tn){var i=arguments[0];return this.nearestNeighbour(i,v.POSITIVE_INFINITY)}}else if(2===arguments.length){if(arguments[0]instanceof n&&T(arguments[1],on)){var r=arguments[0],o=arguments[1],s=new tn(this.getRoot(),r.getRoot(),o);return this.nearestNeighbour(s)}if(arguments[0]instanceof tn&&\"number\"==typeof arguments[1]){var a=arguments[0],u=arguments[1],l=null,c=new We;for(c.add(a);!c.isEmpty()&&u>0;){var p=c.poll(),h=p.getDistance();if(h>=u)break;p.isLeaves()?(u=h,l=p):p.expandToQueue(c,u)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var f=arguments[0],g=arguments[1],d=arguments[2],y=new He(f,g),_=new tn(this.getRoot(),y,d);return this.nearestNeighbour(_)[0]}},n.prototype.interfaces_=function(){return[Je,e]},n.prototype.getClass=function(){return n},n.centreX=function(t){return n.avg(t.getMinX(),t.getMaxX())},n.avg=function(t,e){return(t+e)/2},n.centreY=function(t){return n.avg(t.getMinY(),t.getMaxY())},i.STRtreeNode.get=function(){return an},i.serialVersionUID.get=function(){return 0x39920f7d5f261e0},i.xComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreX(e.getBounds()),n.centreX(i.getBounds()))}}},i.yComparator.get=function(){return{interfaces_:function(){return[N]},compare:function(e,i){return t.compareDoubles(n.centreY(e.getBounds()),n.centreY(i.getBounds()))}}},i.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},i.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(n,i),n}(en),an=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new j(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Qe),un=function(){};un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.relativeSign=function(t,e){return t<e?-1:t>e?1:0},un.compare=function(t,e,n){if(e.equals2D(n))return 0;var i=un.relativeSign(e.x,n.x),r=un.relativeSign(e.y,n.y);switch(t){case 0:return un.compareValue(i,r);case 1:return un.compareValue(r,i);case 2:return un.compareValue(r,-i);case 3:return un.compareValue(-i,r);case 4:return un.compareValue(-i,-r);case 5:return un.compareValue(-r,-i);case 6:return un.compareValue(-r,i);case 7:return un.compareValue(i,-r)}return et.shouldNeverReachHere(\"invalid octant value\"),0},un.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ln=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._segString=t,this.coord=new C(e),this.segmentIndex=n,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(n))};ln.prototype.getCoordinate=function(){return this.coord},ln.prototype.print=function(t){t.print(this.coord),t.print(\" seg # = \"+this.segmentIndex)},ln.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:un.compare(this._segmentOctant,this.coord,e.coord)},ln.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},ln.prototype.isInterior=function(){return this._isInterior},ln.prototype.interfaces_=function(){return[E]},ln.prototype.getClass=function(){return ln};var cn=function(){this._nodeMap=new p,this._edge=null;var t=arguments[0];this._edge=t};cn.prototype.getSplitCoordinates=function(){var t=new St;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next();this.addEdgeCoordinates(n,i,t),n=i}return t.toCoordinateArray()},cn.prototype.addCollapsedNodes=function(){var t=new Nt;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},cn.prototype.print=function(t){t.println(\"Intersections:\");for(var e=this.iterator();e.hasNext();){e.next().print(t)}},cn.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e<this._edge.size()-2;e++){var n=this._edge.getCoordinate(e),i=this._edge.getCoordinate(e+2);n.equals2D(i)&&t.add(new M(e+1))}},cn.prototype.addEdgeCoordinates=function(t,e,n){var i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);n.add(new C(t.coord),!1);for(var o=t.segmentIndex+1;o<=e.segmentIndex;o++)n.add(this._edge.getCoordinate(o));r&&n.add(new C(e.coord))},cn.prototype.iterator=function(){return this._nodeMap.values().iterator()},cn.prototype.addSplitEdges=function(t){this.addEndpoints(),this.addCollapsedNodes();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},cn.prototype.findCollapseIndex=function(t,e,n){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,1===i&&(n[0]=t.segmentIndex+1,!0)},cn.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=new Array(1).fill(null),n=this.iterator(),i=n.next();n.hasNext();){var r=n.next();this.findCollapseIndex(i,r,e)&&t.add(new M(e[0])),i=r}},cn.prototype.getEdge=function(){return this._edge},cn.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},cn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this._edge.getCoordinate(e.segmentIndex),r=e.isInterior()||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this._edge.getCoordinate(a);return r&&(o[s]=new C(e.coord)),new gn(o,this._edge.getData())},cn.prototype.add=function(t,e){var n=new ln(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(n);return null!==i?(et.isTrue(i.coord.equals2D(t),\"Found equal nodes with different coordinates\"),i):(this._nodeMap.put(n,n),n)},cn.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),n=t.get(0).getCoordinate(0);if(!n.equals2D(e[0]))throw new $(\"bad split edge start point at \"+n);var i=t.get(t.size()-1).getCoordinates(),r=i[i.length-1];if(!r.equals2D(e[e.length-1]))throw new $(\"bad split edge end point at \"+r)},cn.prototype.interfaces_=function(){return[]},cn.prototype.getClass=function(){return cn};var pn=function(){};pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn},pn.octant=function(){if(\"number\"==typeof arguments[0]&&\"number\"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new m(\"Cannot compute the octant for point ( \"+t+\", \"+e+\" )\");var n=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?n>=i?0:1:n>=i?7:6:e>=0?n>=i?3:2:n>=i?4:5}if(arguments[0]instanceof C&&arguments[1]instanceof C){var r=arguments[0],o=arguments[1],s=o.x-r.x,a=o.y-r.y;if(0===s&&0===a)throw new m(\"Cannot compute the octant for two identical points \"+r);return pn.octant(s,a)}};var hn=function(){};hn.prototype.getCoordinates=function(){},hn.prototype.size=function(){},hn.prototype.getCoordinate=function(t){},hn.prototype.isClosed=function(){},hn.prototype.setData=function(t){},hn.prototype.getData=function(){},hn.prototype.interfaces_=function(){return[]},hn.prototype.getClass=function(){return hn};var fn=function(){};fn.prototype.addIntersection=function(t,e){},fn.prototype.interfaces_=function(){return[hn]},fn.prototype.getClass=function(){return fn};var gn=function(){this._nodeList=new cn(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};gn.prototype.getCoordinates=function(){return this._pts},gn.prototype.size=function(){return this._pts.length},gn.prototype.getCoordinate=function(t){return this._pts[t]},gn.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},gn.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},gn.prototype.setData=function(t){this._data=t},gn.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:pn.octant(t,e)},gn.prototype.getData=function(){return this._data},gn.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[3],o=new C(n.getIntersection(r));this.addIntersection(o,i)}},gn.prototype.toString=function(){return Z.toLineString(new ue(this._pts))},gn.prototype.getNodeList=function(){return this._nodeList},gn.prototype.addIntersectionNode=function(t,e){var n=e,i=n+1;if(i<this._pts.length){var r=this._pts[i];t.equals2D(r)&&(n=i)}return this._nodeList.add(t,n)},gn.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},gn.prototype.interfaces_=function(){return[fn]},gn.prototype.getClass=function(){return gn},gn.getNodedSubstrings=function(){if(1===arguments.length){var t=arguments[0],e=new Nt;return gn.getNodedSubstrings(t,e),e}if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();){r.next().getNodeList().addSplitEdges(i)}};var dn=function(){if(this.p0=null,this.p1=null,0===arguments.length)this.p0=new C,this.p1=new C;else if(1===arguments.length){var t=arguments[0];this.p0=new C(t.p0),this.p1=new C(t.p1)}else if(2===arguments.length)this.p0=arguments[0],this.p1=arguments[1];else if(4===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3];this.p0=new C(e,n),this.p1=new C(i,r)}},yn={serialVersionUID:{configurable:!0}};dn.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},dn.prototype.orientationIndex=function(){if(arguments[0]instanceof dn){var t=arguments[0],e=at.orientationIndex(this.p0,this.p1,t.p0),n=at.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&n>=0?Math.max(e,n):e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof C){var i=arguments[0];return at.orientationIndex(this.p0,this.p1,i)}},dn.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},dn.prototype.isVertical=function(){return this.p0.x===this.p1.x},dn.prototype.equals=function(t){if(!(t instanceof dn))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},dn.prototype.intersection=function(t){var e=new rt;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},dn.prototype.project=function(){if(arguments[0]instanceof C){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new C(t);var e=this.projectionFactor(t),n=new C;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof dn){var i=arguments[0],r=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(r>=1&&o>=1)return null;if(r<=0&&o<=0)return null;var s=this.project(i.p0);r<0&&(s=this.p0),r>1&&(s=this.p1);var a=this.project(i.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new dn(s,a)}},dn.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},dn.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},dn.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},dn.prototype.distancePerpendicular=function(t){return at.distancePointLinePerpendicular(t,this.p0,this.p1)},dn.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},dn.prototype.midPoint=function(){return dn.midPoint(this.p0,this.p1)},dn.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,i=e*e+n*n;if(i<=0)return v.NaN;return((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/i},dn.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),i=v.MAX_VALUE,r=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(r=s.distance(t.p1))<i&&(i=r,n[0]=s,n[1]=t.p1);var a=t.closestPoint(this.p0);(r=a.distance(this.p0))<i&&(i=r,n[0]=this.p0,n[1]=a);var u=t.closestPoint(this.p1);return(r=u.distance(this.p1))<i&&(i=r,n[0]=this.p1,n[1]=u),n},dn.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);return this.p0.distance(t)<this.p1.distance(t)?this.p0:this.p1},dn.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},dn.prototype.getLength=function(){return this.p0.distance(this.p1)},dn.prototype.compareTo=function(t){var e=t,n=this.p0.compareTo(e.p0);return 0!==n?n:this.p1.compareTo(e.p1)},dn.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},dn.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},dn.prototype.lineIntersection=function(t){try{return k.intersection(this.p0,this.p1,t.p0,t.p1)}catch(t){if(!(t instanceof X))throw t}return null},dn.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},dn.prototype.pointAlongOffset=function(t,e){var n=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),r=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,s=Math.sqrt(r*r+o*o),a=0,u=0;if(0!==e){if(s<=0)throw new Error(\"Cannot compute offset from zero-length line segment\");a=e*r/s,u=e*o/s}return new C(n-u,i+a)},dn.prototype.setCoordinates=function(){if(1===arguments.length){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=n.x,this.p1.y=n.y}},dn.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||v.isNaN(e))&&(e=1),e},dn.prototype.toString=function(){return\"LINESTRING( \"+this.p0.x+\" \"+this.p0.y+\", \"+this.p1.x+\" \"+this.p1.y+\")\"},dn.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},dn.prototype.distance=function(){if(arguments[0]instanceof dn){var t=arguments[0];return at.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof C){var e=arguments[0];return at.distancePointLine(e,this.p0,this.p1)}},dn.prototype.pointAlong=function(t){var e=new C;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},dn.prototype.hashCode=function(){var t=v.doubleToLongBits(this.p0.x);t^=31*v.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=v.doubleToLongBits(this.p1.x);n^=31*v.doubleToLongBits(this.p1.y);return e^(Math.trunc(n)^Math.trunc(n>>32))},dn.prototype.interfaces_=function(){return[E,e]},dn.prototype.getClass=function(){return dn},dn.midPoint=function(t,e){return new C((t.x+e.x)/2,(t.y+e.y)/2)},yn.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(dn,yn);var _n=function(){this.tempEnv1=new j,this.tempEnv2=new j,this._overlapSeg1=new dn,this._overlapSeg2=new dn};_n.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},_n.prototype.interfaces_=function(){return[]},_n.prototype.getClass=function(){return _n};var mn=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=i};mn.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},mn.prototype.computeSelect=function(t,e,n,i){var r=this._pts[e],o=this._pts[n];if(i.tempEnv1.init(r,o),n-e==1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var s=Math.trunc((e+n)/2);e<s&&this.computeSelect(t,e,s,i),s<n&&this.computeSelect(t,s,n,i)},mn.prototype.getCoordinates=function(){for(var t=new Array(this._end-this._start+1).fill(null),e=0,n=this._start;n<=this._end;n++)t[e++]=this._pts[n];return t},mn.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},mn.prototype.setId=function(t){this._id=t},mn.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},mn.prototype.getEnvelope=function(){if(null===this._env){var t=this._pts[this._start],e=this._pts[this._end];this._env=new j(t,e)}return this._env},mn.prototype.getEndIndex=function(){return this._end},mn.prototype.getStartIndex=function(){return this._start},mn.prototype.getContext=function(){return this._context},mn.prototype.getId=function(){return this._id},mn.prototype.computeOverlapsInternal=function(t,e,n,i,r,o){var s=this._pts[t],a=this._pts[e],u=n._pts[i],l=n._pts[r];if(e-t==1&&r-i==1)return o.overlap(this,t,n,i),null;if(o.tempEnv1.init(s,a),o.tempEnv2.init(u,l),!o.tempEnv1.intersects(o.tempEnv2))return null;var c=Math.trunc((t+e)/2),p=Math.trunc((i+r)/2);t<c&&(i<p&&this.computeOverlapsInternal(t,c,n,i,p,o),p<r&&this.computeOverlapsInternal(t,c,n,p,r,o)),c<e&&(i<p&&this.computeOverlapsInternal(c,e,n,i,p,o),p<r&&this.computeOverlapsInternal(c,e,n,p,r,o))},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn};var vn=function(){};vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn},vn.getChainStartIndices=function(t){var e=0,n=new Nt;n.add(new M(e));do{var i=vn.findChainEnd(t,e);n.add(new M(i)),e=i}while(e<t.length-1);return vn.toIntArray(n)},vn.findChainEnd=function(t,e){for(var n=e;n<t.length-1&&t[n].equals2D(t[n+1]);)n++;if(n>=t.length-1)return t.length-1;for(var i=Be.quadrant(t[n],t[n+1]),r=e+1;r<t.length;){if(!t[r-1].equals2D(t[r])){if(Be.quadrant(t[r-1],t[r])!==i)break}r++}return r-1},vn.getChains=function(){if(1===arguments.length){var t=arguments[0];return vn.getChains(t,null)}if(2===arguments.length){for(var e=arguments[0],n=arguments[1],i=new Nt,r=vn.getChainStartIndices(e),o=0;o<r.length-1;o++){var s=new mn(e,r[o],r[o+1],n);i.add(s)}return i}},vn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var In=function(){};In.prototype.computeNodes=function(t){},In.prototype.getNodedSubstrings=function(){},In.prototype.interfaces_=function(){return[]},In.prototype.getClass=function(){return In};var En=function(){if(this._segInt=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this.setSegmentIntersector(t)}};En.prototype.setSegmentIntersector=function(t){this._segInt=t},En.prototype.interfaces_=function(){return[In]},En.prototype.getClass=function(){return En};var xn=function(t){function e(e){e?t.call(this,e):t.call(this),this._monoChains=new Nt,this._index=new sn,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var n={SegmentOverlapAction:{configurable:!0}};return e.prototype.getMonotoneChains=function(){return this._monoChains},e.prototype.getNodedSubstrings=function(){return gn.getNodedSubstrings(this._nodedSegStrings)},e.prototype.getIndex=function(){return this._index},e.prototype.add=function(t){for(var e=vn.getChains(t.getCoordinates(),t).iterator();e.hasNext();){var n=e.next();n.setId(this._idCounter++),this._index.insert(n.getEnvelope(),n),this._monoChains.add(n)}},e.prototype.computeNodes=function(t){this._nodedSegStrings=t;for(var e=t.iterator();e.hasNext();)this.add(e.next());this.intersectChains()},e.prototype.intersectChains=function(){for(var t=new Nn(this._segInt),e=this._monoChains.iterator();e.hasNext();)for(var n=e.next(),i=this._index.query(n.getEnvelope()).iterator();i.hasNext();){var r=i.next();if(r.getId()>n.getId()&&(n.computeOverlaps(r,t),this._nOverlaps++),this._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return Nn},Object.defineProperties(e,n),e}(En),Nn=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],i=arguments[2],r=arguments[3],o=e.getContext(),s=i.getContext();this._si.processIntersections(o,n,s,r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(_n),Cn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],i=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(i)}else if(4===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(r),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Sn={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Cn.prototype.getEndCapStyle=function(){return this._endCapStyle},Cn.prototype.isSingleSided=function(){return this._isSingleSided},Cn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Cn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Cn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Cn.JOIN_ROUND&&(this._quadrantSegments=Cn.DEFAULT_QUADRANT_SEGMENTS)},Cn.prototype.getJoinStyle=function(){return this._joinStyle},Cn.prototype.setJoinStyle=function(t){this._joinStyle=t},Cn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Cn.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Cn.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Cn.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Cn.prototype.getMitreLimit=function(){return this._mitreLimit},Cn.prototype.setMitreLimit=function(t){this._mitreLimit=t},Cn.prototype.setSingleSided=function(t){this._isSingleSided=t},Cn.prototype.interfaces_=function(){return[]},Cn.prototype.getClass=function(){return Cn},Cn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Sn.CAP_ROUND.get=function(){return 1},Sn.CAP_FLAT.get=function(){return 2},Sn.CAP_SQUARE.get=function(){return 3},Sn.JOIN_ROUND.get=function(){return 1},Sn.JOIN_MITRE.get=function(){return 2},Sn.JOIN_BEVEL.get=function(){return 3},Sn.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Sn.DEFAULT_MITRE_LIMIT.get=function(){return 5},Sn.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Cn,Sn);var Ln=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=at.COUNTERCLOCKWISE,this._inputLine=t||null},bn={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Ln.prototype.isDeletable=function(t,e,n,i){var r=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(r,o,s)&&(!!this.isShallow(r,o,s,i)&&this.isShallowSampled(r,o,t,n,i))},Ln.prototype.deleteShallowConcavities=function(){for(var t=1,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e),i=!1;n<this._inputLine.length;){var r=!1;this.isDeletable(t,e,n,this._distanceTol)&&(this._isDeleted[e]=Ln.DELETE,r=!0,i=!0),t=r?n:e,e=this.findNextNonDeletedIndex(t),n=this.findNextNonDeletedIndex(e)}return i},Ln.prototype.isShallowConcavity=function(t,e,n,i){if(!(at.computeOrientation(t,e,n)===this._angleOrientation))return!1;return at.distancePointLine(e,t,n)<i},Ln.prototype.isShallowSampled=function(t,e,n,i,r){var o=Math.trunc((i-n)/Ln.NUM_PTS_TO_CHECK);o<=0&&(o=1);for(var s=n;s<i;s+=o)if(!this.isShallow(t,e,this._inputLine[s],r))return!1;return!0},Ln.prototype.isConcave=function(t,e,n){var i=at.computeOrientation(t,e,n)===this._angleOrientation;return i},Ln.prototype.simplify=function(t){this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=at.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var e=!1;do{e=this.deleteShallowConcavities()}while(e);return this.collapseLine()},Ln.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===Ln.DELETE;)e++;return e},Ln.prototype.isShallow=function(t,e,n,i){return at.distancePointLine(e,t,n)<i},Ln.prototype.collapseLine=function(){for(var t=new St,e=0;e<this._inputLine.length;e++)this._isDeleted[e]!==Ln.DELETE&&t.add(this._inputLine[e]);return t.toCoordinateArray()},Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln},Ln.simplify=function(t,e){return new Ln(t).simplify(e)},bn.INIT.get=function(){return 0},bn.DELETE.get=function(){return 1},bn.KEEP.get=function(){return 1},bn.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(Ln,bn);var wn=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new Nt},On={COORDINATE_ARRAY_TYPE:{configurable:!0}};wn.prototype.getCoordinates=function(){return this._ptList.toArray(wn.COORDINATE_ARRAY_TYPE)},wn.prototype.setPrecisionModel=function(t){this._precisionModel=t},wn.prototype.addPt=function(t){var e=new C(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},wn.prototype.revere=function(){},wn.prototype.addPts=function(t,e){if(e)for(var n=0;n<t.length;n++)this.addPt(t[n]);else for(var i=t.length-1;i>=0;i--)this.addPt(t[i])},wn.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)<this._minimimVertexDistance},wn.prototype.toString=function(){return(new _e).createLineString(this.getCoordinates()).toString()},wn.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new C(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},wn.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},wn.prototype.interfaces_=function(){return[]},wn.prototype.getClass=function(){return wn},On.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(wn,On);var Tn=function(){},Rn={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn},Tn.toDegrees=function(t){return 180*t/Math.PI},Tn.normalize=function(t){for(;t>Math.PI;)t-=Tn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Tn.PI_TIMES_2;return t},Tn.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],i=n.x-e.x,r=n.y-e.y;return Math.atan2(r,i)}},Tn.isAcute=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)>0},Tn.isObtuse=function(t,e,n){var i=t.x-e.x,r=t.y-e.y;return i*(n.x-e.x)+r*(n.y-e.y)<0},Tn.interiorAngle=function(t,e,n){var i=Tn.angle(e,t),r=Tn.angle(e,n);return Math.abs(r-i)},Tn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Tn.PI_TIMES_2;t>=Tn.PI_TIMES_2&&(t=0)}else{for(;t>=Tn.PI_TIMES_2;)t-=Tn.PI_TIMES_2;t<0&&(t=0)}return t},Tn.angleBetween=function(t,e,n){var i=Tn.angle(e,t),r=Tn.angle(e,n);return Tn.diff(i,r)},Tn.diff=function(t,e){var n=null;return(n=t<e?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},Tn.toRadians=function(t){return t*Math.PI/180},Tn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Tn.COUNTERCLOCKWISE:n<0?Tn.CLOCKWISE:Tn.NONE},Tn.angleBetweenOriented=function(t,e,n){var i=Tn.angle(e,t),r=Tn.angle(e,n)-i;return r<=-Math.PI?r+Tn.PI_TIMES_2:r>Math.PI?r-Tn.PI_TIMES_2:r},Rn.PI_TIMES_2.get=function(){return 2*Math.PI},Rn.PI_OVER_2.get=function(){return Math.PI/2},Rn.PI_OVER_4.get=function(){return Math.PI/4},Rn.COUNTERCLOCKWISE.get=function(){return at.COUNTERCLOCKWISE},Rn.CLOCKWISE.get=function(){return at.CLOCKWISE},Rn.NONE.get=function(){return at.COLLINEAR},Object.defineProperties(Tn,Rn);var Pn=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new dn,this._seg1=new dn,this._offset0=new dn,this._offset1=new dn,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new rt,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Cn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(i)},Dn={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};Pn.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=at.computeOrientation(this._s0,this._s1,this._s2),i=n===at.CLOCKWISE&&this._side===Se.LEFT||n===at.COUNTERCLOCKWISE&&this._side===Se.RIGHT;0===n?this.addCollinear(e):i?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},Pn.prototype.addLineEndCap=function(t,e){var n=new dn(t,e),i=new dn;this.computeOffsetSegment(n,Se.LEFT,this._distance,i);var r=new dn;this.computeOffsetSegment(n,Se.RIGHT,this._distance,r);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,at.CLOCKWISE,this._distance),this._segList.addPt(r.p1);break;case Cn.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(r.p1);break;case Cn.CAP_SQUARE:var u=new C;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var l=new C(i.p1.x+u.x,i.p1.y+u.y),c=new C(r.p1.x+u.x,r.p1.y+u.y);this._segList.addPt(l),this._segList.addPt(c)}},Pn.prototype.getCoordinates=function(){return this._segList.getCoordinates()},Pn.prototype.addMitreJoin=function(t,e,n,i){var r=!0,o=null;try{o=k.intersection(e.p0,e.p1,n.p0,n.p1);(i<=0?1:o.distance(t)/Math.abs(i))>this._bufParams.getMitreLimit()&&(r=!1)}catch(t){if(!(t instanceof X))throw t;o=new C(0,0),r=!1}r?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,i,this._bufParams.getMitreLimit())},Pn.prototype.addFilletCorner=function(t,e,n,i,r){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,l=n.y-t.y,c=Math.atan2(l,u);i===at.CLOCKWISE?a<=c&&(a+=2*Math.PI):a>=c&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,c,i,r),this._segList.addPt(n)},Pn.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},Pn.prototype.createSquare=function(t){this._segList.addPt(new C(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new C(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new C(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new C(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},Pn.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},Pn.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},Pn.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},Pn.prototype.initSideSegments=function(t,e,n){this._s1=t,this._s2=e,this._side=n,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,n,this._distance,this._offset1)},Pn.prototype.addLimitedMitreJoin=function(t,e,n,i){var r=this._seg0.p1,o=Tn.angle(r,this._seg0.p0),s=Tn.angleBetweenOriented(this._seg0.p0,r,this._seg1.p1)/2,a=Tn.normalize(o+s),u=Tn.normalize(a+Math.PI),l=i*n,c=n-l*Math.abs(Math.sin(s)),p=r.x+l*Math.cos(u),h=r.y+l*Math.sin(u),f=new C(p,h),g=new dn(r,f),d=g.pointAlongOffset(1,c),y=g.pointAlongOffset(1,-c);this._side===Se.LEFT?(this._segList.addPt(d),this._segList.addPt(y)):(this._segList.addPt(y),this._segList.addPt(d))},Pn.prototype.computeOffsetSegment=function(t,e,n,i){var r=e===Se.LEFT?1:-1,o=t.p1.x-t.p0.x,s=t.p1.y-t.p0.y,a=Math.sqrt(o*o+s*s),u=r*n*o/a,l=r*n*s/a;i.p0.x=t.p0.x-l,i.p0.y=t.p0.y+u,i.p1.x=t.p1.x-l,i.p1.y=t.p1.y+u},Pn.prototype.addFilletArc=function(t,e,n,i,r){var o=i===at.CLOCKWISE?-1:1,s=Math.abs(e-n),a=Math.trunc(s/this._filletAngleQuantum+.5);if(a<1)return null;for(var u=s/a,l=0,c=new C;l<s;){var p=e+o*l;c.x=t.x+r*Math.cos(p),c.y=t.y+r*Math.sin(p),this._segList.addPt(c),l+=u}},Pn.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*Pn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var n=new C((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var i=new C((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},Pn.prototype.createCircle=function(t){var e=new C(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},Pn.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},Pn.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new wn,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*Pn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},Pn.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Cn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Cn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,at.CLOCKWISE,this._distance))},Pn.prototype.closeRing=function(){this._segList.closeRing()},Pn.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},Pn.prototype.interfaces_=function(){return[]},Pn.prototype.getClass=function(){return Pn},Dn.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Dn.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Dn.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Dn.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(Pn,Dn);var Mn=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};Mn.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,i=Math.abs(e),r=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],r):this.computeOffsetCurve(t,n,r);var o=r.getCoordinates();return n&&Lt.reverse(o),o},Mn.prototype.computeSingleSidedBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var r=Ln.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Se.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{n.addSegments(t,!1);var a=Ln.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Se.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment(),n.closeRing()},Mn.prototype.computeRingBufferCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);e===Se.RIGHT&&(i=-i);var r=Ln.simplify(t,i),o=r.length-1;n.initSideSegments(r[o-1],r[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(r[s],a)}n.closeRing()},Mn.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),i=Ln.simplify(t,n),r=i.length-1;e.initSideSegments(i[0],i[1],Se.LEFT);for(var o=2;o<=r;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[r-1],i[r]);var s=Ln.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Se.LEFT);for(var u=a-2;u>=0;u--)e.addNextSegment(s[u],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},Mn.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Cn.CAP_ROUND:e.createCircle(t);break;case Cn.CAP_SQUARE:e.createSquare(t)}},Mn.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),i=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var r=e<0;this.computeSingleSidedBufferCurve(t,r,i)}else this.computeLineBufferCurve(t,i);return i.getCoordinates()},Mn.prototype.getBufferParameters=function(){return this._bufParams},Mn.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},Mn.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return Mn.copyCoordinates(t);var i=this.getSegGen(n);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},Mn.prototype.computeOffsetCurve=function(t,e,n){var i=this.simplifyTolerance(this._distance);if(e){var r=Ln.simplify(t,-i),o=r.length-1;n.initSideSegments(r[o],r[o-1],Se.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(r[s],!0)}else{var a=Ln.simplify(t,i),u=a.length-1;n.initSideSegments(a[0],a[1],Se.LEFT),n.addFirstSegment();for(var l=2;l<=u;l++)n.addNextSegment(a[l],!0)}n.addLastSegment()},Mn.prototype.getSegGen=function(t){return new Pn(this._precisionModel,this._bufParams,t)},Mn.prototype.interfaces_=function(){return[]},Mn.prototype.getClass=function(){return Mn},Mn.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;n<e.length;n++)e[n]=new C(t[n]);return e};var An=function(){this._subgraphs=null,this._seg=new dn,this._cga=new at;var t=arguments[0];this._subgraphs=t},Fn={DepthSegment:{configurable:!0}};An.prototype.findStabbedSegments=function(){if(1===arguments.length){for(var t=arguments[0],e=new Nt,n=this._subgraphs.iterator();n.hasNext();){var i=n.next(),r=i.getEnvelope();t.y<r.getMinY()||t.y>r.getMaxY()||this.findStabbedSegments(t,i.getDirectedEdges(),e)}return e}if(3===arguments.length)if(T(arguments[2],xt)&&arguments[0]instanceof C&&arguments[1]instanceof ze)for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getEdge().getCoordinates(),l=0;l<u.length-1;l++){this._seg.p0=u[l],this._seg.p1=u[l+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse();if(!(Math.max(this._seg.p0.x,this._seg.p1.x)<o.x)&&!(this._seg.isHorizontal()||o.y<this._seg.p0.y||o.y>this._seg.p1.y||at.computeOrientation(this._seg.p0,this._seg.p1,o)===at.RIGHT)){var c=s.getDepth(Se.LEFT);this._seg.p0.equals(u[l])||(c=s.getDepth(Se.RIGHT));var p=new Gn(this._seg,c);a.add(p)}}else if(T(arguments[2],xt)&&arguments[0]instanceof C&&T(arguments[1],xt))for(var h=arguments[0],f=arguments[1],g=arguments[2],d=f.iterator();d.hasNext();){var y=d.next();y.isForward()&&this.findStabbedSegments(h,y,g)}},An.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(0===e.size())return 0;return $e.min(e)._leftDepth},An.prototype.interfaces_=function(){return[]},An.prototype.getClass=function(){return An},Fn.DepthSegment.get=function(){return Gn},Object.defineProperties(An,Fn);var Gn=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new dn(t),this._leftDepth=e};Gn.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n?n:0!=(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Gn.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Gn.prototype.toString=function(){return this._upwardSeg.toString()},Gn.prototype.interfaces_=function(){return[E]},Gn.prototype.getClass=function(){return Gn};var qn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};qn.prototype.area=function(){return qn.area(this.p0,this.p1,this.p2)},qn.prototype.signedArea=function(){return qn.signedArea(this.p0,this.p1,this.p2)},qn.prototype.interpolateZ=function(t){if(null===t)throw new m(\"Supplied point is null.\");return qn.interpolateZ(t,this.p0,this.p1,this.p2)},qn.prototype.longestSideLength=function(){return qn.longestSideLength(this.p0,this.p1,this.p2)},qn.prototype.isAcute=function(){return qn.isAcute(this.p0,this.p1,this.p2)},qn.prototype.circumcentre=function(){return qn.circumcentre(this.p0,this.p1,this.p2)},qn.prototype.area3D=function(){return qn.area3D(this.p0,this.p1,this.p2)},qn.prototype.centroid=function(){return qn.centroid(this.p0,this.p1,this.p2)},qn.prototype.inCentre=function(){return qn.inCentre(this.p0,this.p1,this.p2)},qn.prototype.interfaces_=function(){return[]},qn.prototype.getClass=function(){return qn},qn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},qn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},qn.det=function(t,e,n,i){return t*i-e*n},qn.interpolateZ=function(t,e,n,i){var r=e.x,o=e.y,s=n.x-r,a=i.x-r,u=n.y-o,l=i.y-o,c=s*l-a*u,p=t.x-r,h=t.y-o,f=(l*p-a*h)/c,g=(-u*p+s*h)/c;return e.z+f*(n.z-e.z)+g*(i.z-e.z)},qn.longestSideLength=function(t,e,n){var i=t.distance(e),r=e.distance(n),o=n.distance(t),s=i;return r>s&&(s=r),o>s&&(s=o),s},qn.isAcute=function(t,e,n){return!!Tn.isAcute(t,e,n)&&(!!Tn.isAcute(e,n,t)&&!!Tn.isAcute(n,t,e))},qn.circumcentre=function(t,e,n){var i=n.x,r=n.y,o=t.x-i,s=t.y-r,a=e.x-i,u=e.y-r,l=2*qn.det(o,s,a,u),c=qn.det(s,o*o+s*s,u,a*a+u*u),p=qn.det(o,o*o+s*s,a,a*a+u*u);return new C(i-c/l,r+p/l)},qn.perpendicularBisector=function(t,e){var n=e.x-t.x,i=e.y-t.y,r=new k(t.x+n/2,t.y+i/2,1),o=new k(t.x-i+n/2,t.y+n+i/2,1);return new k(r,o)},qn.angleBisector=function(t,e,n){var i=e.distance(t),r=i/(i+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new C(t.x+r*o,t.y+r*s)},qn.area3D=function(t,e,n){var i=e.x-t.x,r=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,u=n.z-t.z,l=r*u-o*a,c=o*s-i*u,p=i*a-r*s,h=l*l+c*c+p*p,f=Math.sqrt(h)/2;return f},qn.centroid=function(t,e,n){var i=(t.x+e.x+n.x)/3,r=(t.y+e.y+n.y)/3;return new C(i,r)},qn.inCentre=function(t,e,n){var i=e.distance(n),r=t.distance(n),o=t.distance(e),s=i+r+o,a=(i*t.x+r*e.x+o*n.x)/s,u=(i*t.y+r*e.y+o*n.y)/s;return new C(a,u)};var Bn=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new Nt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Bn.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,w.EXTERIOR,w.INTERIOR)},Bn.prototype.addPolygon=function(t){var e=this._distance,n=Se.LEFT;this._distance<0&&(e=-this._distance,n=Se.RIGHT);var i=t.getExteriorRing(),r=Lt.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&r.length<3)return null;this.addPolygonRing(r,e,n,w.EXTERIOR,w.INTERIOR);for(var o=0;o<t.getNumInteriorRing();o++){var s=t.getInteriorRingN(o),a=Lt.removeRepeatedPoints(s.getCoordinates());this._distance>0&&this.isErodedCompletely(s,-this._distance)||this.addPolygonRing(a,e,Se.opposite(n),w.INTERIOR,w.EXTERIOR)}},Bn.prototype.isTriangleErodedCompletely=function(t,e){var n=new qn(t[0],t[1],t[2]),i=n.inCentre();return at.distancePointLine(i,n.p0,n.p1)<Math.abs(e)},Bn.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Lt.removeRepeatedPoints(t.getCoordinates()),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,w.EXTERIOR,w.INTERIOR)},Bn.prototype.addCurve=function(t,e,n){if(null===t||t.length<2)return null;var i=new gn(t,new Pe(0,w.BOUNDARY,e,n));this._curveList.add(i)},Bn.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Bn.prototype.addPolygonRing=function(t,e,n,i,r){if(0===e&&t.length<ee.MINIMUM_VALID_SIZE)return null;var o=i,s=r;t.length>=ee.MINIMUM_VALID_SIZE&&at.isCCW(t)&&(o=r,s=i,n=Se.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},Bn.prototype.add=function(t){if(t.isEmpty())return null;t instanceof $t?this.addPolygon(t):t instanceof Kt?this.addLineString(t):t instanceof Qt?this.addPoint(t):t instanceof te?this.addCollection(t):t instanceof Xt?this.addCollection(t):t instanceof ne?this.addCollection(t):t instanceof zt&&this.addCollection(t)},Bn.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var i=t.getEnvelopeInternal(),r=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>r},Bn.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},Bn.prototype.interfaces_=function(){return[]},Bn.prototype.getClass=function(){return Bn};var Vn=function(){};Vn.prototype.locate=function(t){},Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn};var Un=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};Un.prototype.next=function(){if(this._atStart)return this._atStart=!1,Un.isAtomic(this._parent)&&this._index++,this._parent;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new i;var t=this._parent.getGeometryN(this._index++);return t instanceof zt?(this._subcollectionIterator=new Un(t),this._subcollectionIterator.next()):t},Un.prototype.remove=function(){throw new Error(this.getClass().getName())},Un.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Un.prototype.interfaces_=function(){return[Et]},Un.prototype.getClass=function(){return Un},Un.isAtomic=function(t){return!(t instanceof zt)};var zn=function(){this._geom=null;var t=arguments[0];this._geom=t};zn.prototype.locate=function(t){return zn.locate(t,this._geom)},zn.prototype.interfaces_=function(){return[Vn]},zn.prototype.getClass=function(){return zn},zn.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&at.isPointInRing(t,e.getCoordinates())},zn.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!zn.isPointInRing(t,n))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var r=e.getInteriorRingN(i);if(zn.isPointInRing(t,r))return!1}return!0},zn.containsPoint=function(t,e){if(e instanceof $t)return zn.containsPointInPolygon(t,e);if(e instanceof zt)for(var n=new Un(e);n.hasNext();){var i=n.next();if(i!==e&&zn.containsPoint(t,i))return!0}return!1},zn.locate=function(t,e){return e.isEmpty()?w.EXTERIOR:zn.containsPoint(t,e)?w.INTERIOR:w.EXTERIOR};var Xn=function(){this._edgeMap=new p,this._edgeList=null,this._ptInAreaLocation=[w.NONE,w.NONE]};Xn.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),n=e-1;return 0===e&&(n=this._edgeList.size()-1),this._edgeList.get(n)},Xn.prototype.propagateSideLabels=function(t){for(var e=w.NONE,n=this.iterator();n.hasNext();){var i=n.next().getLabel();i.isArea(t)&&i.getLocation(t,Se.LEFT)!==w.NONE&&(e=i.getLocation(t,Se.LEFT))}if(e===w.NONE)return null;for(var r=e,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getLabel();if(a.getLocation(t,Se.ON)===w.NONE&&a.setLocation(t,Se.ON,r),a.isArea(t)){var u=a.getLocation(t,Se.LEFT),l=a.getLocation(t,Se.RIGHT);if(l!==w.NONE){if(l!==r)throw new we(\"side location conflict\",s.getCoordinate());u===w.NONE&&et.shouldNeverReachHere(\"found single null side (at \"+s.getCoordinate()+\")\"),r=u}else et.isTrue(a.getLocation(t,Se.LEFT)===w.NONE,\"found single null side\"),a.setLocation(t,Se.RIGHT,r),a.setLocation(t,Se.LEFT,r)}}},Xn.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;return t.next().getCoordinate()},Xn.prototype.print=function(t){Y.out.println(\"EdgeEndStar: \"+this.getCoordinate());for(var e=this.iterator();e.hasNext();){e.next().print(t)}},Xn.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Xn.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var n=e.size()-1,i=e.get(n).getLabel().getLocation(t,Se.LEFT);et.isTrue(i!==w.NONE,\"Found unlabelled area edge\");for(var r=i,o=this.iterator();o.hasNext();){var s=o.next().getLabel();et.isTrue(s.isArea(t),\"Found non-area edge\");var a=s.getLocation(t,Se.LEFT),u=s.getLocation(t,Se.RIGHT);if(a===u)return!1;if(u!==r)return!1;r=a}return!0},Xn.prototype.findIndex=function(t){this.iterator();for(var e=0;e<this._edgeList.size();e++){if(this._edgeList.get(e)===t)return e}return-1},Xn.prototype.iterator=function(){return this.getEdges().iterator()},Xn.prototype.getEdges=function(){return null===this._edgeList&&(this._edgeList=new Nt(this._edgeMap.values())),this._edgeList},Xn.prototype.getLocation=function(t,e,n){return this._ptInAreaLocation[t]===w.NONE&&(this._ptInAreaLocation[t]=zn.locate(e,n[t].getGeometry())),this._ptInAreaLocation[t]},Xn.prototype.toString=function(){var t=new D;t.append(\"EdgeEndStar: \"+this.getCoordinate()),t.append(\"\\n\");for(var e=this.iterator();e.hasNext();){var n=e.next();t.append(n),t.append(\"\\n\")}return t.toString()},Xn.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){e.next().computeLabel(t)}},Xn.prototype.computeLabelling=function(t){this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var e=[!1,!1],n=this.iterator();n.hasNext();)for(var i=n.next().getLabel(),r=0;r<2;r++)i.isLine(r)&&i.getLocation(r)===w.BOUNDARY&&(e[r]=!0);for(var o=this.iterator();o.hasNext();)for(var s=o.next(),a=s.getLabel(),u=0;u<2;u++)if(a.isAnyNull(u)){var l=w.NONE;if(e[u])l=w.EXTERIOR;else{var c=s.getCoordinate();l=this.getLocation(u,c,t)}a.setAllLocationsIfNull(u,l)}},Xn.prototype.getDegree=function(){return this._edgeMap.size()},Xn.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Xn.prototype.interfaces_=function(){return[]},Xn.prototype.getClass=function(){return Xn};var Yn=function(t){function e(){t.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.linkResultDirectedEdges=function(){this.getResultAreaEdges();for(var t=null,e=null,n=this._SCANNING_FOR_INCOMING,i=0;i<this._resultAreaEdgeList.size();i++){var r=this._resultAreaEdgeList.get(i),o=r.getSym();if(r.getLabel().isArea())switch(null===t&&r.isInResult()&&(t=r),n){case this._SCANNING_FOR_INCOMING:if(!o.isInResult())continue;e=o,n=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!r.isInResult())continue;e.setNext(r),n=this._SCANNING_FOR_INCOMING}}if(n===this._LINKING_TO_OUTGOING){if(null===t)throw new we(\"no outgoing dirEdge found\",this.getCoordinate());et.isTrue(t.isInResult(),\"unable to link last incoming dirEdge\"),e.setNext(t)}},e.prototype.insert=function(t){var e=t;this.insertEdgeEnd(e,e)},e.prototype.getRightmostEdge=function(){var t=this.getEdges(),e=t.size();if(e<1)return null;var n=t.get(0);if(1===e)return n;var i=t.get(e-1),r=n.getQuadrant(),o=i.getQuadrant();return Be.isNorthern(r)&&Be.isNorthern(o)?n:Be.isNorthern(r)||Be.isNorthern(o)?0!==n.getDy()?n:0!==i.getDy()?i:(et.shouldNeverReachHere(\"found two horizontal edges incident on node\"),null):i},e.prototype.print=function(t){Y.out.println(\"DirectedEdgeStar: \"+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var n=e.next();t.print(\"out \"),n.print(t),t.println(),t.print(\"in \"),n.getSym().print(t),t.println()}},e.prototype.getResultAreaEdges=function(){if(null!==this._resultAreaEdgeList)return this._resultAreaEdgeList;this._resultAreaEdgeList=new Nt;for(var t=this.iterator();t.hasNext();){var e=t.next();(e.isInResult()||e.getSym().isInResult())&&this._resultAreaEdgeList.add(e)}return this._resultAreaEdgeList},e.prototype.updateLabelling=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next().getLabel();n.setAllLocationsIfNull(0,t.getLocation(0)),n.setAllLocationsIfNull(1,t.getLocation(1))}},e.prototype.linkAllDirectedEdges=function(){this.getEdges();for(var t=null,e=null,n=this._edgeList.size()-1;n>=0;n--){var i=this._edgeList.get(n),r=i.getSym();null===e&&(e=r),null!==t&&r.setNext(t),t=i}e.setNext(t)},e.prototype.computeDepths=function(){if(1===arguments.length){var t=arguments[0],e=this.findIndex(t),n=t.getDepth(Se.LEFT),i=t.getDepth(Se.RIGHT),r=this.computeDepths(e+1,this._edgeList.size(),n);if(this.computeDepths(0,e,r)!==i)throw new we(\"depth mismatch at \"+t.getCoordinate())}else if(3===arguments.length){for(var o=arguments[0],s=arguments[1],a=arguments[2],u=o;u<s;u++){var l=this._edgeList.get(u);l.setEdgeDepths(Se.RIGHT,a),a=l.getDepth(Se.LEFT)}return a}},e.prototype.mergeSymLabels=function(){for(var t=this.iterator();t.hasNext();){var e=t.next();e.getLabel().merge(e.getSym().getLabel())}},e.prototype.linkMinimalDirectedEdges=function(t){for(var e=null,n=null,i=this._SCANNING_FOR_INCOMING,r=this._resultAreaEdgeList.size()-1;r>=0;r--){var o=this._resultAreaEdgeList.get(r),s=o.getSym();switch(null===e&&o.getEdgeRing()===t&&(e=o),i){case this._SCANNING_FOR_INCOMING:if(s.getEdgeRing()!==t)continue;n=s,i=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(o.getEdgeRing()!==t)continue;n.setNextMin(o),i=this._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(et.isTrue(null!==e,\"found null for first outgoing dirEdge\"),et.isTrue(e.getEdgeRing()===t,\"unable to link last incoming dirEdge\"),n.setNextMin(e))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();){e.next().isInResult()&&t++}return t}if(1===arguments.length){for(var n=arguments[0],i=0,r=this.iterator();r.hasNext();){r.next().getEdgeRing()===n&&i++}return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=w.NONE,e=this.iterator();e.hasNext();){var n=e.next(),i=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=w.INTERIOR;break}if(i.isInResult()){t=w.EXTERIOR;break}}}if(t===w.NONE)return null;for(var r=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(r===w.INTERIOR):(s.isInResult()&&(r=w.EXTERIOR),a.isInResult()&&(r=w.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new Pe(w.NONE);for(var n=this.iterator();n.hasNext();)for(var i=n.next().getEdge().getLabel(),r=0;r<2;r++){var o=i.getLocation(r);o!==w.INTERIOR&&o!==w.BOUNDARY||this._label.setLocation(r,w.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xn),kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Ge(t,new Yn)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Xe),jn=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};jn.prototype.compareTo=function(t){var e=t;return jn.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},jn.prototype.interfaces_=function(){return[E]},jn.prototype.getClass=function(){return jn},jn.orientation=function(t){return 1===Lt.increasingDirection(t)},jn.compareOriented=function(t,e,n,i){for(var r=e?1:-1,o=i?1:-1,s=e?t.length:-1,a=i?n.length:-1,u=e?0:t.length-1,l=i?0:n.length-1;;){var c=t[u].compareTo(n[l]);if(0!==c)return c;var p=(u+=r)===s,h=(l+=o)===a;if(p&&!h)return-1;if(!p&&h)return 1;if(p&&h)return 0}};var Hn=function(){this._edges=new Nt,this._ocaMap=new p};Hn.prototype.print=function(t){t.print(\"MULTILINESTRING ( \");for(var e=0;e<this._edges.size();e++){var n=this._edges.get(e);e>0&&t.print(\",\"),t.print(\"(\");for(var i=n.getCoordinates(),r=0;r<i.length;r++)r>0&&t.print(\",\"),t.print(i[r].x+\" \"+i[r].y);t.println(\")\")}t.print(\") \")},Hn.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Hn.prototype.findEdgeIndex=function(t){for(var e=0;e<this._edges.size();e++)if(this._edges.get(e).equals(t))return e;return-1},Hn.prototype.iterator=function(){return this._edges.iterator()},Hn.prototype.getEdges=function(){return this._edges},Hn.prototype.get=function(t){return this._edges.get(t)},Hn.prototype.findEqualEdge=function(t){var e=new jn(t.getCoordinates());return this._ocaMap.get(e)},Hn.prototype.add=function(t){this._edges.add(t);var e=new jn(t.getCoordinates());this._ocaMap.put(e,t)},Hn.prototype.interfaces_=function(){return[]},Hn.prototype.getClass=function(){return Hn};var Wn=function(){};Wn.prototype.processIntersections=function(t,e,n,i){},Wn.prototype.isDone=function(){},Wn.prototype.interfaces_=function(){return[]},Wn.prototype.getClass=function(){return Wn};var Kn=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};Kn.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(Kn.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.size()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},Kn.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Kn.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Kn.prototype.getLineIntersector=function(){return this._li},Kn.prototype.hasProperIntersection=function(){return this._hasProper},Kn.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},Kn.prototype.hasIntersection=function(){return this._hasIntersection},Kn.prototype.isDone=function(){return!1},Kn.prototype.hasInteriorIntersection=function(){return this._hasInterior},Kn.prototype.interfaces_=function(){return[Wn]},Kn.prototype.getClass=function(){return Kn},Kn.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var Jn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],n=arguments[2];this.coord=new C(t),this.segmentIndex=e,this.dist=n};Jn.prototype.getSegmentIndex=function(){return this.segmentIndex},Jn.prototype.getCoordinate=function(){return this.coord},Jn.prototype.print=function(t){t.print(this.coord),t.print(\" seg # = \"+this.segmentIndex),t.println(\" dist = \"+this.dist)},Jn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Jn.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&0===this.dist||this.segmentIndex===t},Jn.prototype.toString=function(){return this.coord+\" seg # = \"+this.segmentIndex+\" dist = \"+this.dist},Jn.prototype.getDistance=function(){return this.dist},Jn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Jn.prototype.interfaces_=function(){return[E]},Jn.prototype.getClass=function(){return Jn};var Qn=function(){this._nodeMap=new p,this.edge=null;var t=arguments[0];this.edge=t};Qn.prototype.print=function(t){t.println(\"Intersections:\");for(var e=this.iterator();e.hasNext();){e.next().print(t)}},Qn.prototype.iterator=function(){return this._nodeMap.values().iterator()},Qn.prototype.addSplitEdges=function(t){this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var i=e.next(),r=this.createSplitEdge(n,i);t.add(r),n=i}},Qn.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},Qn.prototype.createSplitEdge=function(t,e){var n=e.segmentIndex-t.segmentIndex+2,i=this.edge.pts[e.segmentIndex],r=e.dist>0||!e.coord.equals2D(i);r||n--;var o=new Array(n).fill(null),s=0;o[s++]=new C(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return r&&(o[s]=e.coord),new ni(o,new Pe(this.edge._label))},Qn.prototype.add=function(t,e,n){var i=new Jn(t,e,n),r=this._nodeMap.get(i);return null!==r?r:(this._nodeMap.put(i,i),i)},Qn.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){if(e.next().coord.equals(t))return!0}return!1},Qn.prototype.interfaces_=function(){return[]},Qn.prototype.getClass=function(){return Qn};var Zn=function(){};Zn.prototype.getChainStartIndices=function(t){var e=0,n=new Nt;n.add(new M(e));do{var i=this.findChainEnd(t,e);n.add(new M(i)),e=i}while(e<t.length-1);return Zn.toIntArray(n)},Zn.prototype.findChainEnd=function(t,e){for(var n=Be.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){if(Be.quadrant(t[i-1],t[i])!==n)break;i++}return i-1},Zn.prototype.interfaces_=function(){return[]},Zn.prototype.getClass=function(){return Zn},Zn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),n=0;n<e.length;n++)e[n]=t.get(n).intValue();return e};var $n=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new j,this.env2=new j;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Zn;this.startIndex=e.getChainStartIndices(this.pts)};$n.prototype.getCoordinates=function(){return this.pts},$n.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e>n?e:n},$n.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return e<n?e:n},$n.prototype.computeIntersectsForChain=function(){if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[n],e.startIndex[n+1],i)}else if(6===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],u=arguments[4],l=arguments[5],c=this.pts[r],p=this.pts[o],h=s.pts[a],f=s.pts[u];if(o-r==1&&u-a==1)return l.addIntersections(this.e,r,s.e,a),null;if(this.env1.init(c,p),this.env2.init(h,f),!this.env1.intersects(this.env2))return null;var g=Math.trunc((r+o)/2),d=Math.trunc((a+u)/2);r<g&&(a<d&&this.computeIntersectsForChain(r,g,s,a,d,l),d<u&&this.computeIntersectsForChain(r,g,s,d,u,l)),g<o&&(a<d&&this.computeIntersectsForChain(g,o,s,a,d,l),d<u&&this.computeIntersectsForChain(g,o,s,d,u,l))}},$n.prototype.getStartIndexes=function(){return this.startIndex},$n.prototype.computeIntersects=function(t,e){for(var n=0;n<this.startIndex.length-1;n++)for(var i=0;i<t.startIndex.length-1;i++)this.computeIntersectsForChain(n,t,i,e)},$n.prototype.interfaces_=function(){return[]},$n.prototype.getClass=function(){return $n};var ti=function t(){this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var n=0;n<3;n++)this._depth[e][n]=t.NULL_VALUE},ei={NULL_VALUE:{configurable:!0}};ti.prototype.getDepth=function(t,e){return this._depth[t][e]},ti.prototype.setDepth=function(t,e,n){this._depth[t][e]=n},ti.prototype.isNull=function(){if(0===arguments.length){for(var t=0;t<2;t++)for(var e=0;e<3;e++)if(this._depth[t][e]!==ti.NULL_VALUE)return!1;return!0}if(1===arguments.length){var n=arguments[0];return this._depth[n][1]===ti.NULL_VALUE}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._depth[i][r]===ti.NULL_VALUE}},ti.prototype.normalize=function(){for(var t=0;t<2;t++)if(!this.isNull(t)){var e=this._depth[t][1];this._depth[t][2]<e&&(e=this._depth[t][2]),e<0&&(e=0);for(var n=1;n<3;n++){var i=0;this._depth[t][n]>e&&(i=1),this._depth[t][n]=i}}},ti.prototype.getDelta=function(t){return this._depth[t][Se.RIGHT]-this._depth[t][Se.LEFT]},ti.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?w.EXTERIOR:w.INTERIOR},ti.prototype.toString=function(){return\"A: \"+this._depth[0][1]+\",\"+this._depth[0][2]+\" B: \"+this._depth[1][1]+\",\"+this._depth[1][2]},ti.prototype.add=function(){if(1===arguments.length)for(var t=arguments[0],e=0;e<2;e++)for(var n=1;n<3;n++){var i=t.getLocation(e,n);i!==w.EXTERIOR&&i!==w.INTERIOR||(this.isNull(e,n)?this._depth[e][n]=ti.depthAtLocation(i):this._depth[e][n]+=ti.depthAtLocation(i))}else if(3===arguments.length){var r=arguments[0],o=arguments[1];arguments[2]===w.INTERIOR&&this._depth[r][o]++}},ti.prototype.interfaces_=function(){return[]},ti.prototype.getClass=function(){return ti},ti.depthAtLocation=function(t){return t===w.EXTERIOR?0:t===w.INTERIOR?1:ti.NULL_VALUE},ei.NULL_VALUE.get=function(){return-1},Object.defineProperties(ti,ei);var ni=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Qn(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ti,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var i=arguments[0],r=arguments[1];this.pts=i,this._label=r}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);t[0]=this.pts[0],t[1]=this.pts[1];return new e(t,Pe.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var i=!0,r=!0,o=this.pts.length,s=0;s<this.pts.length;s++)if(this.pts[s].equals2D(n.pts[s])||(i=!1),this.pts[s].equals2D(n.pts[--o])||(r=!1),!i&&!r)return!1;return!0},e.prototype.getCoordinate=function(){if(0===arguments.length)return this.pts.length>0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print(\"edge \"+this._name+\": \"),t.print(\"LINESTRING (\");for(var e=0;e<this.pts.length;e++)e>0&&t.print(\",\"),t.print(this.pts[e].x+\" \"+this.pts[e].y);t.print(\") \"+this._label+\" \"+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&(3===this.pts.length&&!!this.pts[0].equals(this.pts[2]))},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print(\"edge \"+this._name+\": \");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+\" \");t.println(\"\")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new $n(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new j;for(var t=0;t<this.pts.length;t++)this._env.expandToInclude(this.pts[t])}return this._env},e.prototype.addIntersection=function(t,e,n,i){var r=new C(t.getIntersection(i)),o=e,s=t.getEdgeDistance(n,i),a=o+1;if(a<this.pts.length){var u=this.pts[a];r.equals2D(u)&&(o=a,s=0)}this.eiList.add(r,o,s)},e.prototype.toString=function(){var t=new D;t.append(\"edge \"+this._name+\": \"),t.append(\"LINESTRING (\");for(var e=0;e<this.pts.length;e++)e>0&&t.append(\",\"),t.append(this.pts[e].x+\" \"+this.pts[e].y);return t.append(\") \"+this._label+\" \"+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;e<this.pts.length;e++)if(!this.pts[e].equals2D(t.pts[e]))return!1;return!0},e.prototype.setDepthDelta=function(t){this._depthDelta=t},e.prototype.getEdgeIntersectionList=function(){return this.eiList},e.prototype.addIntersections=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++)this.addIntersection(t,e,n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.updateIM=function(){if(2!==arguments.length)return t.prototype.updateIM.apply(this,arguments);var e=arguments[0],n=arguments[1];n.setAtLeastIfValid(e.getLocation(0,Se.ON),e.getLocation(1,Se.ON),1),e.isArea()&&(n.setAtLeastIfValid(e.getLocation(0,Se.LEFT),e.getLocation(1,Se.LEFT),2),n.setAtLeastIfValid(e.getLocation(0,Se.RIGHT),e.getLocation(1,Se.RIGHT),2))},e}(Fe),ii=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Hn,this._bufParams=t||null};ii.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},ii.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip(),n.merge(i);var r=ii.depthDelta(i),o=e.getDepthDelta()+r;e.setDepthDelta(o)}else this._edgeList.add(t),t.setDepthDelta(ii.depthDelta(t.getLabel()))},ii.prototype.buildSubgraphs=function(t,e){for(var n=new Nt,i=t.iterator();i.hasNext();){var r=i.next(),o=r.getRightmostCoordinate(),s=new An(n).getDepth(o);r.computeDepth(s),r.findResultEdges(),n.add(r),e.add(r.getDirectedEdges(),r.getNodes())}},ii.prototype.createSubgraphs=function(t){for(var e=new Nt,n=t.getNodes().iterator();n.hasNext();){var i=n.next();if(!i.isVisited()){var r=new Te;r.create(i),e.add(r)}}return $e.sort(e,$e.reverseOrder()),e},ii.prototype.createEmptyResultGeometry=function(){return this._geomFact.createPolygon()},ii.prototype.getNoder=function(t){if(null!==this._workingNoder)return this._workingNoder;var e=new xn,n=new rt;return n.setPrecisionModel(t),e.setSegmentIntersector(new Kn(n)),e},ii.prototype.buffer=function(t,e){var n=this._workingPrecisionModel;null===n&&(n=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new Mn(n,this._bufParams),r=new Bn(t,e,i).getCurves();if(r.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(r,n),this._graph=new Ye(new kn),this._graph.addEdges(this._edgeList.getEdges());var o=this.createSubgraphs(this._graph),s=new ke(this._geomFact);this.buildSubgraphs(o,s);var a=s.getPolygons();if(a.size()<=0)return this.createEmptyResultGeometry();return this._geomFact.buildGeometry(a)},ii.prototype.computeNodedEdges=function(t,e){var n=this.getNoder(e);n.computeNodes(t);for(var i=n.getNodedSubstrings().iterator();i.hasNext();){var r=i.next(),o=r.getCoordinates();if(2!==o.length||!o[0].equals2D(o[1])){var s=r.getData(),a=new ni(r.getCoordinates(),new Pe(s));this.insertUniqueEdge(a)}}},ii.prototype.setNoder=function(t){this._workingNoder=t},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii},ii.depthDelta=function(t){var e=t.getLocation(0,Se.LEFT),n=t.getLocation(0,Se.RIGHT);return e===w.INTERIOR&&n===w.EXTERIOR?1:e===w.EXTERIOR&&n===w.INTERIOR?-1:0},ii.convertSegStrings=function(t){for(var e=new _e,n=new Nt;t.hasNext();){var i=t.next(),r=e.createLineString(i.getCoordinates());n.add(r)}return e.buildGeometry(n)};var ri=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,2===arguments.length){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(4===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=arguments[3];this._noder=n,this._scaleFactor=i,this._offsetX=r,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};ri.prototype.rescale=function(){if(T(arguments[0],It))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.rescale(e.getCoordinates())}else if(arguments[0]instanceof Array){for(var n=arguments[0],i=0;i<n.length;i++)n[i].x=n[i].x/this._scaleFactor+this._offsetX,n[i].y=n[i].y/this._scaleFactor+this._offsetY;2===n.length&&n[0].equals2D(n[1])&&Y.out.println(n)}},ri.prototype.scale=function(){if(T(arguments[0],It)){for(var t=arguments[0],e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new gn(this.scale(i.getCoordinates()),i.getData()))}return e}if(arguments[0]instanceof Array){for(var r=arguments[0],o=new Array(r.length).fill(null),s=0;s<r.length;s++)o[s]=new C(Math.round((r[s].x-this._offsetX)*this._scaleFactor),Math.round((r[s].y-this._offsetY)*this._scaleFactor),r[s].z);return Lt.removeRepeatedPoints(o)}},ri.prototype.isIntegerPrecision=function(){return 1===this._scaleFactor},ri.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},ri.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},ri.prototype.interfaces_=function(){return[In]},ri.prototype.getClass=function(){return ri};var oi=function(){this._li=new rt,this._segStrings=null;var t=arguments[0];this._segStrings=t},si={fact:{configurable:!0}};oi.prototype.checkEndPtVertexIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next().getCoordinates();this.checkEndPtVertexIntersections(e[0],this._segStrings),this.checkEndPtVertexIntersections(e[e.length-1],this._segStrings)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1].iterator();i.hasNext();)for(var r=i.next().getCoordinates(),o=1;o<r.length-1;o++)if(r[o].equals(n))throw new $(\"found endpt/interior pt intersection at index \"+o+\" :pt \"+n)},oi.prototype.checkInteriorIntersections=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();)for(var e=t.next(),n=this._segStrings.iterator();n.hasNext();){var i=n.next();this.checkInteriorIntersections(e,i)}else if(2===arguments.length)for(var r=arguments[0],o=arguments[1],s=r.getCoordinates(),a=o.getCoordinates(),u=0;u<s.length-1;u++)for(var l=0;l<a.length-1;l++)this.checkInteriorIntersections(r,u,o,l);else if(4===arguments.length){var c=arguments[0],p=arguments[1],h=arguments[2],f=arguments[3];if(c===h&&p===f)return null;var g=c.getCoordinates()[p],d=c.getCoordinates()[p+1],y=h.getCoordinates()[f],_=h.getCoordinates()[f+1];if(this._li.computeIntersection(g,d,y,_),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,g,d)||this.hasInteriorIntersection(this._li,y,_)))throw new $(\"found non-noded intersection at \"+g+\"-\"+d+\" and \"+y+\"-\"+_)}},oi.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},oi.prototype.checkCollapses=function(){if(0===arguments.length)for(var t=this._segStrings.iterator();t.hasNext();){var e=t.next();this.checkCollapses(e)}else if(1===arguments.length)for(var n=arguments[0].getCoordinates(),i=0;i<n.length-2;i++)this.checkCollapse(n[i],n[i+1],n[i+2])},oi.prototype.hasInteriorIntersection=function(t,e,n){for(var i=0;i<t.getIntersectionNum();i++){var r=t.getIntersection(i);if(!r.equals(e)&&!r.equals(n))return!0}return!1},oi.prototype.checkCollapse=function(t,e,n){if(t.equals(n))throw new $(\"found non-noded collapse at \"+oi.fact.createLineString([t,e,n]))},oi.prototype.interfaces_=function(){return[]},oi.prototype.getClass=function(){return oi},si.fact.get=function(){return new _e},Object.defineProperties(oi,si);var ai=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],n=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=n,e<=0)throw new m(\"Scale factor must be non-zero\");1!==e&&(this._pt=new C(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new C,this._p1Scaled=new C),this.initCorners(this._pt)},ui={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};ai.prototype.intersectsScaled=function(t,e){var n=Math.min(t.x,e.x),i=Math.max(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.y,e.y),s=this._maxx<n||this._minx>i||this._maxy<r||this._miny>o;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return et.isTrue(!(s&&a),\"Found bad envelope test\"),a},ai.prototype.initCorners=function(t){this._minx=t.x-.5,this._maxx=t.x+.5,this._miny=t.y-.5,this._maxy=t.y+.5,this._corner[0]=new C(this._maxx,this._maxy),this._corner[1]=new C(this._minx,this._maxy),this._corner[2]=new C(this._minx,this._miny),this._corner[3]=new C(this._maxx,this._miny)},ai.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},ai.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},ai.prototype.getCoordinate=function(){return this._originalPt},ai.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},ai.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=ai.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new j(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},ai.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},ai.prototype.intersectsToleranceSquare=function(t,e){var n=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||(!(!n||!i)||(!!t.equals(this._pt)||!!e.equals(this._pt))))))},ai.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),i=t.getCoordinate(e+1);return!!this.intersects(n,i)&&(t.addIntersection(this.getCoordinate(),e),!0)},ai.prototype.interfaces_=function(){return[]},ai.prototype.getClass=function(){return ai},ui.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(ai,ui);var li=function(){this.tempEnv1=new j,this.selectedSegment=new dn};li.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},li.prototype.interfaces_=function(){return[]},li.prototype.getClass=function(){return li};var ci=function(){this._index=null;var t=arguments[0];this._index=t},pi={HotPixelSnapAction:{configurable:!0}};ci.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2],r=e.getSafeEnvelope(),o=new hi(e,n,i);return this._index.query(r,{interfaces_:function(){return[Ke]},visitItem:function(t){t.select(r,o)}}),o.isNodeAdded()}},ci.prototype.interfaces_=function(){return[]},ci.prototype.getClass=function(){return ci},pi.HotPixelSnapAction.get=function(){return hi},Object.defineProperties(ci,pi);var hi=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],i=e.getContext();if(null!==this._parentEdge&&i===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(li),fi=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new Nt};fi.prototype.processIntersections=function(t,e,n,i){if(t===n&&e===i)return null;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];if(this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u<this._li.getIntersectionNum();u++)this._interiorIntersections.add(this._li.getIntersection(u));t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)}},fi.prototype.isDone=function(){return!1},fi.prototype.getInteriorIntersections=function(){return this._interiorIntersections},fi.prototype.interfaces_=function(){return[Wn]},fi.prototype.getClass=function(){return fi};var gi=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new rt,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};gi.prototype.checkCorrectness=function(t){var e=gn.getNodedSubstrings(t),n=new oi(e);try{n.checkValid()}catch(t){if(!(t instanceof z))throw t;t.printStackTrace()}},gi.prototype.getNodedSubstrings=function(){return gn.getNodedSubstrings(this._nodedSegStrings)},gi.prototype.snapRound=function(t,e){var n=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(n),this.computeVertexSnaps(t)},gi.prototype.findInteriorIntersections=function(t,e){var n=new fi(e);return this._noder.setSegmentIntersector(n),this._noder.computeNodes(t),n.getInteriorIntersections()},gi.prototype.computeVertexSnaps=function(){if(T(arguments[0],It))for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.computeVertexSnaps(e)}else if(arguments[0]instanceof gn)for(var n=arguments[0],i=n.getCoordinates(),r=0;r<i.length;r++){var o=new ai(i[r],this._scaleFactor,this._li);this._pointSnapper.snap(o,n,r)&&n.addIntersection(i[r],r)}},gi.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new xn,this._pointSnapper=new ci(this._noder.getIndex()),this.snapRound(t,this._li)},gi.prototype.computeIntersectionSnaps=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=new ai(n,this._scaleFactor,this._li);this._pointSnapper.snap(i)}},gi.prototype.interfaces_=function(){return[In]},gi.prototype.getClass=function(){return gi};var di=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new Cn,this._resultGeometry=null,this._saveException=null,1===arguments.length){var t=arguments[0];this._argGeom=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._argGeom=e,this._bufParams=n}},yi={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};di.prototype.bufferFixedPrecision=function(t){var e=new ri(new gi(new fe(1)),t.getScale()),n=new ii(this._bufParams);n.setWorkingPrecisionModel(t),n.setNoder(e),this._resultGeometry=n.buffer(this._argGeom,this._distance)},di.prototype.bufferReducedPrecision=function(){var t=this;if(0===arguments.length){for(var e=di.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof we))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],i=di.precisionScaleFactor(this._argGeom,this._distance,n),r=new fe(i);this.bufferFixedPrecision(r)}},di.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===fe.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},di.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},di.prototype.bufferOriginalPrecision=function(){try{var t=new ii(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof $))throw t;this._saveException=t}},di.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},di.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di},di.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new di(t).getResultGeometry(e)}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof ct&&\"number\"==typeof arguments[1]){var n=arguments[0],i=arguments[1],r=arguments[2],o=new di(n);o.setQuadrantSegments(r);return o.getResultGeometry(i)}if(arguments[2]instanceof Cn&&arguments[0]instanceof ct&&\"number\"==typeof arguments[1]){var s=arguments[0],a=arguments[1],u=arguments[2];return new di(s,u).getResultGeometry(a)}}else if(4===arguments.length){var l=arguments[0],c=arguments[1],p=arguments[2],h=arguments[3],f=new di(l);f.setQuadrantSegments(p),f.setEndCapStyle(h);return f.getResultGeometry(c)}},di.precisionScaleFactor=function(t,e,n){var i=t.getEnvelopeInternal(),r=R.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(r)/Math.log(10)+1);return Math.pow(10,o)},yi.CAP_ROUND.get=function(){return Cn.CAP_ROUND},yi.CAP_BUTT.get=function(){return Cn.CAP_FLAT},yi.CAP_FLAT.get=function(){return Cn.CAP_FLAT},yi.CAP_SQUARE.get=function(){return Cn.CAP_SQUARE},yi.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(di,yi);var _i=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};_i.prototype.getCoordinates=function(){return this._pt},_i.prototype.getCoordinate=function(t){return this._pt[t]},_i.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},_i.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},_i.prototype.getDistance=function(){return this._distance},_i.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},_i.prototype.interfaces_=function(){return[]},_i.prototype.getClass=function(){return _i};var mi=function(){};mi.prototype.interfaces_=function(){return[]},mi.prototype.getClass=function(){return mi},mi.computeDistance=function(){if(arguments[2]instanceof _i&&arguments[0]instanceof Kt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=t.getCoordinates(),r=new dn,o=0;o<i.length-1;o++){r.setCoordinates(i[o],i[o+1]);var s=r.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof _i&&arguments[0]instanceof $t&&arguments[1]instanceof C){var a=arguments[0],u=arguments[1],l=arguments[2];mi.computeDistance(a.getExteriorRing(),u,l);for(var c=0;c<a.getNumInteriorRing();c++)mi.computeDistance(a.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof _i&&arguments[0]instanceof ct&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1],f=arguments[2];if(p instanceof Kt)mi.computeDistance(p,h,f);else if(p instanceof $t)mi.computeDistance(p,h,f);else if(p instanceof zt)for(var g=p,d=0;d<g.getNumGeometries();d++){var y=g.getGeometryN(d);mi.computeDistance(y,h,f)}else f.setMinimum(p.getCoordinate(),h)}else if(arguments[2]instanceof _i&&arguments[0]instanceof dn&&arguments[1]instanceof C){var _=arguments[0],m=arguments[1],v=arguments[2],I=_.closestPoint(m);v.setMinimum(I,m)}};var vi=function(t){this._maxPtDist=new _i,this._inputGeom=t||null},Ii={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};vi.prototype.computeMaxMidpointDistance=function(t){var e=new xi(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},vi.prototype.computeMaxVertexDistance=function(t){var e=new Ei(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},vi.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},vi.prototype.getDistancePoints=function(){return this._maxPtDist},vi.prototype.interfaces_=function(){return[]},vi.prototype.getClass=function(){return vi},Ii.MaxPointDistanceFilter.get=function(){return Ei},Ii.MaxMidpointDistanceFilter.get=function(){return xi},Object.defineProperties(vi,Ii);var Ei=function(t){this._maxPtDist=new _i,this._minPtDist=new _i,this._geom=t||null};Ei.prototype.filter=function(t){this._minPtDist.initialize(),mi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ei.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ei.prototype.interfaces_=function(){return[ft]},Ei.prototype.getClass=function(){return Ei};var xi=function(t){this._maxPtDist=new _i,this._minPtDist=new _i,this._geom=t||null};xi.prototype.filter=function(t,e){if(0===e)return null;var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=new C((n.x+i.x)/2,(n.y+i.y)/2);this._minPtDist.initialize(),mi.computeDistance(this._geom,r,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},xi.prototype.isDone=function(){return!1},xi.prototype.isGeometryChanged=function(){return!1},xi.prototype.getMaxPointDistance=function(){return this._maxPtDist},xi.prototype.interfaces_=function(){return[Ut]},xi.prototype.getClass=function(){return xi};var Ni=function(t){this._comps=t||null};Ni.prototype.filter=function(t){t instanceof $t&&this._comps.add(t)},Ni.prototype.interfaces_=function(){return[Vt]},Ni.prototype.getClass=function(){return Ni},Ni.getPolygons=function(){if(1===arguments.length){var t=arguments[0];return Ni.getPolygons(t,new Nt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof $t?n.add(e):e instanceof zt&&e.apply(new Ni(n)),n}};var Ci=function(){if(this._lines=null,this._isForcedToLineString=!1,1===arguments.length){var t=arguments[0];this._lines=t}else if(2===arguments.length){var e=arguments[0],n=arguments[1];this._lines=e,this._isForcedToLineString=n}};Ci.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof ee){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof Kt&&this._lines.add(t)},Ci.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Ci.prototype.interfaces_=function(){return[lt]},Ci.prototype.getClass=function(){return Ci},Ci.getGeometry=function(){if(1===arguments.length){var t=arguments[0];return t.getFactory().buildGeometry(Ci.getLines(t))}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().buildGeometry(Ci.getLines(e,n))}},Ci.getLines=function(){if(1===arguments.length){var t=arguments[0];return Ci.getLines(t,!1)}if(2===arguments.length){if(T(arguments[0],It)&&T(arguments[1],It)){for(var e=arguments[0],n=arguments[1],i=e.iterator();i.hasNext();){var r=i.next();Ci.getLines(r,n)}return n}if(arguments[0]instanceof ct&&\"boolean\"==typeof arguments[1]){var o=arguments[0],s=arguments[1],a=new Nt;return o.apply(new Ci(a,s)),a}if(arguments[0]instanceof ct&&T(arguments[1],It)){var u=arguments[0],l=arguments[1];return u instanceof Kt?l.add(u):u.apply(new Ci(l)),l}}else if(3===arguments.length){if(\"boolean\"==typeof arguments[2]&&T(arguments[0],It)&&T(arguments[1],It)){for(var c=arguments[0],p=arguments[1],h=arguments[2],f=c.iterator();f.hasNext();){var g=f.next();Ci.getLines(g,p,h)}return p}if(\"boolean\"==typeof arguments[2]&&arguments[0]instanceof ct&&T(arguments[1],It)){var d=arguments[0],y=arguments[1],_=arguments[2];return d.apply(new Ci(y,_)),y}}};var Si=function(){if(this._boundaryRule=gt.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];if(null===t)throw new m(\"Rule must be non-null\");this._boundaryRule=t}};Si.prototype.locateInternal=function(){if(arguments[0]instanceof C&&arguments[1]instanceof $t){var t=arguments[0],e=arguments[1];if(e.isEmpty())return w.EXTERIOR;var n=e.getExteriorRing(),i=this.locateInPolygonRing(t,n);if(i===w.EXTERIOR)return w.EXTERIOR;if(i===w.BOUNDARY)return w.BOUNDARY;for(var r=0;r<e.getNumInteriorRing();r++){var o=e.getInteriorRingN(r),s=this.locateInPolygonRing(t,o);if(s===w.INTERIOR)return w.EXTERIOR;if(s===w.BOUNDARY)return w.BOUNDARY}return w.INTERIOR}if(arguments[0]instanceof C&&arguments[1]instanceof Kt){var a=arguments[0],u=arguments[1];if(!u.getEnvelopeInternal().intersects(a))return w.EXTERIOR;var l=u.getCoordinates();return u.isClosed()||!a.equals(l[0])&&!a.equals(l[l.length-1])?at.isOnLine(a,l)?w.INTERIOR:w.EXTERIOR:w.BOUNDARY}if(arguments[0]instanceof C&&arguments[1]instanceof Qt){var c=arguments[0];return arguments[1].getCoordinate().equals2D(c)?w.INTERIOR:w.EXTERIOR}},Si.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?at.locatePointInRing(t,e.getCoordinates()):w.EXTERIOR},Si.prototype.intersects=function(t,e){return this.locate(t,e)!==w.EXTERIOR},Si.prototype.updateLocationInfo=function(t){t===w.INTERIOR&&(this._isIn=!0),t===w.BOUNDARY&&this._numBoundaries++},Si.prototype.computeLocation=function(t,e){if(e instanceof Qt&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof Kt)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof $t)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Xt)for(var n=e,i=0;i<n.getNumGeometries();i++){var r=n.getGeometryN(i);this.updateLocationInfo(this.locateInternal(t,r))}else if(e instanceof ne)for(var o=e,s=0;s<o.getNumGeometries();s++){var a=o.getGeometryN(s);this.updateLocationInfo(this.locateInternal(t,a))}else if(e instanceof zt)for(var u=new Un(e);u.hasNext();){var l=u.next();l!==e&&this.computeLocation(t,l)}},Si.prototype.locate=function(t,e){return e.isEmpty()?w.EXTERIOR:e instanceof Kt?this.locateInternal(t,e):e instanceof $t?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?w.BOUNDARY:this._numBoundaries>0||this._isIn?w.INTERIOR:w.EXTERIOR)},Si.prototype.interfaces_=function(){return[]},Si.prototype.getClass=function(){return Si};var Li=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._component=i,this._segIndex=r,this._pt=o}},bi={INSIDE_AREA:{configurable:!0}};Li.prototype.isInsideArea=function(){return this._segIndex===Li.INSIDE_AREA},Li.prototype.getCoordinate=function(){return this._pt},Li.prototype.getGeometryComponent=function(){return this._component},Li.prototype.getSegmentIndex=function(){return this._segIndex},Li.prototype.interfaces_=function(){return[]},Li.prototype.getClass=function(){return Li},bi.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Li,bi);var wi=function(t){this._pts=t||null};wi.prototype.filter=function(t){t instanceof Qt&&this._pts.add(t)},wi.prototype.interfaces_=function(){return[Vt]},wi.prototype.getClass=function(){return wi},wi.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof Qt?$e.singletonList(t):wi.getPoints(t,new Nt)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof Qt?n.add(e):e instanceof zt&&e.apply(new wi(n)),n}};var Oi=function(){this._locations=null;var t=arguments[0];this._locations=t};Oi.prototype.filter=function(t){(t instanceof Qt||t instanceof Kt||t instanceof $t)&&this._locations.add(new Li(t,0,t.getCoordinate()))},Oi.prototype.interfaces_=function(){return[Vt]},Oi.prototype.getClass=function(){return Oi},Oi.getLocations=function(t){var e=new Nt;return t.apply(new Oi(e)),e};var Ti=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Si,this._minDistanceLocation=null,this._minDistance=v.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=i,this._terminateDistance=r}};Ti.prototype.computeContainmentDistance=function(){if(0===arguments.length){var t=new Array(2).fill(null);if(this.computeContainmentDistance(0,t),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=1-e,r=Ni.getPolygons(this._geom[e]);if(r.size()>0){var o=Oi.getLocations(this._geom[i]);if(this.computeContainmentDistance(o,r,n),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=n[0],this._minDistanceLocation[e]=n[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&T(arguments[0],xt)&&T(arguments[1],xt)){for(var s=arguments[0],a=arguments[1],u=arguments[2],l=0;l<s.size();l++)for(var c=s.get(l),p=0;p<a.size();p++)if(this.computeContainmentDistance(c,a.get(p),u),this._minDistance<=this._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof Li&&arguments[1]instanceof $t){var h=arguments[0],f=arguments[1],g=arguments[2],d=h.getCoordinate();if(w.EXTERIOR!==this._ptLocator.locate(d,f))return this._minDistance=0,g[0]=h,g[1]=new Li(f,d),null}},Ti.prototype.computeMinDistanceLinesPoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ti.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Ci.getLines(this._geom[0]),n=Ci.getLines(this._geom[1]),i=wi.getPoints(this._geom[0]),r=wi.getPoints(this._geom[1]);return this.computeMinDistanceLines(e,n,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(n,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance?null:(t[0]=null,t[1]=null,this.computeMinDistancePoints(i,r,t),void this.updateMinDistance(t,!1))))},Ti.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},Ti.prototype.updateMinDistance=function(t,e){if(null===t[0])return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},Ti.prototype.nearestPoints=function(){this.computeMinDistance();return[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()]},Ti.prototype.computeMinDistance=function(){if(0===arguments.length){if(null!==this._minDistanceLocation)return null;if(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance)return null;this.computeFacetDistance()}else if(3===arguments.length)if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Qt){var t=arguments[0],e=arguments[1],n=arguments[2];if(t.getEnvelopeInternal().distance(e.getEnvelopeInternal())>this._minDistance)return null;for(var i=t.getCoordinates(),r=e.getCoordinate(),o=0;o<i.length-1;o++){var s=at.distancePointLine(r,i[o],i[o+1]);if(s<this._minDistance){this._minDistance=s;var a=new dn(i[o],i[o+1]).closestPoint(r);n[0]=new Li(t,o,a),n[1]=new Li(e,0,r)}if(this._minDistance<=this._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof Kt&&arguments[1]instanceof Kt){var u=arguments[0],l=arguments[1],c=arguments[2];if(u.getEnvelopeInternal().distance(l.getEnvelopeInternal())>this._minDistance)return null;for(var p=u.getCoordinates(),h=l.getCoordinates(),f=0;f<p.length-1;f++)for(var g=0;g<h.length-1;g++){var d=at.distanceLineLine(p[f],p[f+1],h[g],h[g+1]);if(d<this._minDistance){this._minDistance=d;var y=new dn(p[f],p[f+1]),_=new dn(h[g],h[g+1]),m=y.closestPoints(_);c[0]=new Li(u,f,m[0]),c[1]=new Li(l,g,m[1])}if(this._minDistance<=this._terminateDistance)return null}}},Ti.prototype.computeMinDistancePoints=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o),a=r.getCoordinate().distance(s.getCoordinate());if(a<this._minDistance&&(this._minDistance=a,n[0]=new Li(r,0,r.getCoordinate()),n[1]=new Li(s,0,s.getCoordinate())),this._minDistance<=this._terminateDistance)return null}},Ti.prototype.distance=function(){if(null===this._geom[0]||null===this._geom[1])throw new m(\"null geometries are not supported\");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},Ti.prototype.computeMinDistanceLines=function(t,e,n){for(var i=0;i<t.size();i++)for(var r=t.get(i),o=0;o<e.size();o++){var s=e.get(o);if(this.computeMinDistance(r,s,n),this._minDistance<=this._terminateDistance)return null}},Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti},Ti.distance=function(t,e){return new Ti(t,e).distance()},Ti.isWithinDistance=function(t,e,n){return new Ti(t,e,n).distance()<=n},Ti.nearestPoints=function(t,e){return new Ti(t,e).nearestPoints()};var Ri=function(){this._pt=[new C,new C],this._distance=v.NaN,this._isNull=!0};Ri.prototype.getCoordinates=function(){return this._pt},Ri.prototype.getCoordinate=function(t){return this._pt[t]},Ri.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i<this._distance&&this.initialize(e,n,i)}},Ri.prototype.initialize=function(){if(0===arguments.length)this._isNull=!0;else if(2===arguments.length){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2];this._pt[0].setCoordinate(n),this._pt[1].setCoordinate(i),this._distance=r,this._isNull=!1}},Ri.prototype.toString=function(){return Z.toLineString(this._pt[0],this._pt[1])},Ri.prototype.getDistance=function(){return this._distance},Ri.prototype.setMaximum=function(){if(1===arguments.length){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var i=e.distance(n);i>this._distance&&this.initialize(e,n,i)}},Ri.prototype.interfaces_=function(){return[]},Ri.prototype.getClass=function(){return Ri};var Pi=function(){};Pi.prototype.interfaces_=function(){return[]},Pi.prototype.getClass=function(){return Pi},Pi.computeDistance=function(){if(arguments[2]instanceof Ri&&arguments[0]instanceof Kt&&arguments[1]instanceof C)for(var t=arguments[0],e=arguments[1],n=arguments[2],i=new dn,r=t.getCoordinates(),o=0;o<r.length-1;o++){i.setCoordinates(r[o],r[o+1]);var s=i.closestPoint(e);n.setMinimum(s,e)}else if(arguments[2]instanceof Ri&&arguments[0]instanceof $t&&arguments[1]instanceof C){var a=arguments[0],u=arguments[1],l=arguments[2];Pi.computeDistance(a.getExteriorRing(),u,l);for(var c=0;c<a.getNumInteriorRing();c++)Pi.computeDistance(a.getInteriorRingN(c),u,l)}else if(arguments[2]instanceof Ri&&arguments[0]instanceof ct&&arguments[1]instanceof C){var p=arguments[0],h=arguments[1],f=arguments[2];if(p instanceof Kt)Pi.computeDistance(p,h,f);else if(p instanceof $t)Pi.computeDistance(p,h,f);else if(p instanceof zt)for(var g=p,d=0;d<g.getNumGeometries();d++){var y=g.getGeometryN(d);Pi.computeDistance(y,h,f)}else f.setMinimum(p.getCoordinate(),h)}else if(arguments[2]instanceof Ri&&arguments[0]instanceof dn&&arguments[1]instanceof C){var _=arguments[0],m=arguments[1],v=arguments[2],I=_.closestPoint(m);v.setMinimum(I,m)}};var Di=function(){this._g0=null,this._g1=null,this._ptDist=new Ri,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Mi={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};Di.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},Di.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new m(\"Fraction is not in range (0.0 - 1.0]\");this._densifyFrac=t},Di.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Di.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Di.prototype.computeOrientedDistance=function(t,e,n){var i=new Ai(e);if(t.apply(i),n.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var r=new Fi(e,this._densifyFrac);t.apply(r),n.setMaximum(r.getMaxPointDistance())}},Di.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Di.prototype.interfaces_=function(){return[]},Di.prototype.getClass=function(){return Di},Di.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return new Di(t,e).distance()}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new Di(n,i);return o.setDensifyFraction(r),o.distance()}},Mi.MaxPointDistanceFilter.get=function(){return Ai},Mi.MaxDensifiedByFractionDistanceFilter.get=function(){return Fi},Object.defineProperties(Di,Mi);var Ai=function(){this._maxPtDist=new Ri,this._minPtDist=new Ri,this._euclideanDist=new Pi,this._geom=null;var t=arguments[0];this._geom=t};Ai.prototype.filter=function(t){this._minPtDist.initialize(),Pi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Ai.prototype.getMaxPointDistance=function(){return this._maxPtDist},Ai.prototype.interfaces_=function(){return[ft]},Ai.prototype.getClass=function(){return Ai};var Fi=function(){this._maxPtDist=new Ri,this._minPtDist=new Ri,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Fi.prototype.filter=function(t,e){if(0===e)return null;for(var n=t.getCoordinate(e-1),i=t.getCoordinate(e),r=(i.x-n.x)/this._numSubSegs,o=(i.y-n.y)/this._numSubSegs,s=0;s<this._numSubSegs;s++){var a=n.x+s*r,u=n.y+s*o,l=new C(a,u);this._minPtDist.initialize(),Pi.computeDistance(this._geom,l,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)}},Fi.prototype.isDone=function(){return!1},Fi.prototype.isGeometryChanged=function(){return!1},Fi.prototype.getMaxPointDistance=function(){return this._maxPtDist},Fi.prototype.interfaces_=function(){return[Ut]},Fi.prototype.getClass=function(){return Fi};var Gi=function(t,e,n){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=n||null},qi={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Gi.prototype.checkMaximumDistance=function(t,e,n){var i=new Di(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>n){this._isValid=!1;var r=i.getCoordinates();this._errorLocation=r[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg=\"Distance between buffer curve and input is too large (\"+this._maxDistanceFound+\" at \"+Z.toLineString(r[0],r[1])+\")\"}},Gi.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Gi.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Gi.VERBOSE&&Y.out.println(\"Min Dist= \"+this._minDistanceFound+\" err= \"+(1-this._minDistanceFound/this._bufDistance)+\" Max Dist= \"+this._maxDistanceFound+\" err= \"+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Gi.prototype.checkNegativeValid=function(){if(!(this._input instanceof $t||this._input instanceof ne||this._input instanceof zt))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Gi.prototype.getErrorIndicator=function(){return this._errorIndicator},Gi.prototype.checkMinimumDistance=function(t,e,n){var i=new Ti(t,e,n);if(this._minDistanceFound=i.distance(),this._minDistanceFound<n){this._isValid=!1;var r=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(r),this._errMsg=\"Distance between buffer curve and input is too small (\"+this._minDistanceFound+\" at \"+Z.toLineString(r[0],r[1])+\" )\"}},Gi.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Gi.prototype.getErrorLocation=function(){return this._errorLocation},Gi.prototype.getPolygonLines=function(t){for(var e=new Nt,n=new Ci(e),i=Ni.getPolygons(t).iterator();i.hasNext();){i.next().apply(n)}return t.getFactory().buildGeometry(e)},Gi.prototype.getErrorMessage=function(){return this._errMsg},Gi.prototype.interfaces_=function(){return[]},Gi.prototype.getClass=function(){return Gi},qi.VERBOSE.get=function(){return!1},qi.MAX_DISTANCE_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Gi,qi);var Bi=function(t,e,n){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=n||null},Vi={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Bi.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Bi.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Bi.MAX_ENV_DIFF_FRAC;0===t&&(t=.001);var e=new j(this._input.getEnvelopeInternal());e.expandBy(this._distance);var n=new j(this._result.getEnvelopeInternal());n.expandBy(t),n.contains(e)||(this._isValid=!1,this._errorMsg=\"Buffer envelope is incorrect\",this._errorIndicator=this._input.getFactory().toGeometry(n)),this.report(\"Envelope\")},Bi.prototype.checkDistance=function(){var t=new Gi(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report(\"Distance\")},Bi.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg=\"Area of positive buffer is smaller than input\",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg=\"Area of negative buffer is larger than input\",this._errorIndicator=this._result),this.report(\"Area\")},Bi.prototype.checkPolygonal=function(){this._result instanceof $t||this._result instanceof ne||(this._isValid=!1),this._errorMsg=\"Result is not polygonal\",this._errorIndicator=this._result,this.report(\"Polygonal\")},Bi.prototype.getErrorIndicator=function(){return this._errorIndicator},Bi.prototype.getErrorLocation=function(){return this._errorLocation},Bi.prototype.checkExpectedEmpty=function(){return this._input.getDimension()>=2?null:this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg=\"Result is non-empty\",this._errorIndicator=this._result),void this.report(\"ExpectedEmpty\"))},Bi.prototype.report=function(t){if(!Bi.VERBOSE)return null;Y.out.println(\"Check \"+t+\": \"+(this._isValid?\"passed\":\"FAILED\"))},Bi.prototype.getErrorMessage=function(){return this._errorMsg},Bi.prototype.interfaces_=function(){return[]},Bi.prototype.getClass=function(){return Bi},Bi.isValidMsg=function(t,e,n){var i=new Bi(t,e,n);return i.isValid()?null:i.getErrorMessage()},Bi.isValid=function(t,e,n){return!!new Bi(t,e,n).isValid()},Vi.VERBOSE.get=function(){return!1},Vi.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Bi,Vi);var Ui=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ui.prototype.getCoordinates=function(){return this._pts},Ui.prototype.size=function(){return this._pts.length},Ui.prototype.getCoordinate=function(t){return this._pts[t]},Ui.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Ui.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:pn.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Ui.prototype.setData=function(t){this._data=t},Ui.prototype.getData=function(){return this._data},Ui.prototype.toString=function(){return Z.toLineString(new ue(this._pts))},Ui.prototype.interfaces_=function(){return[hn]},Ui.prototype.getClass=function(){return Ui};var zi=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new Nt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};zi.prototype.getInteriorIntersection=function(){return this._interiorIntersection},zi.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},zi.prototype.getIntersectionSegments=function(){return this._intSegments},zi.prototype.count=function(){return this._intersectionCount},zi.prototype.getIntersections=function(){return this._intersections},zi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},zi.prototype.setKeepIntersections=function(t){this._keepIntersections=t},zi.prototype.processIntersections=function(t,e,n,i){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===i)return null;if(this._isCheckEndSegmentsOnly){if(!(this.isEndSegment(t,e)||this.isEndSegment(n,i)))return null}var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=r,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},zi.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},zi.prototype.hasIntersection=function(){return null!==this._interiorIntersection},zi.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},zi.prototype.interfaces_=function(){return[Wn]},zi.prototype.getClass=function(){return zi},zi.createAllIntersectionsFinder=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e},zi.createAnyIntersectionFinder=function(t){return new zi(t)},zi.createIntersectionCounter=function(t){var e=new zi(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Xi=function(){this._li=new rt,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Xi.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Xi.prototype.getIntersections=function(){return this._segInt.getIntersections()},Xi.prototype.isValid=function(){return this.execute(),this._isValid},Xi.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Xi.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new zi(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new xn;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Xi.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new we(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Xi.prototype.getErrorMessage=function(){if(this._isValid)return\"no intersections found\";var t=this._segInt.getIntersectionSegments();return\"found non-noded intersection between \"+Z.toLineString(t[0],t[1])+\" and \"+Z.toLineString(t[2],t[3])},Xi.prototype.interfaces_=function(){return[]},Xi.prototype.getClass=function(){return Xi},Xi.computeIntersections=function(t){var e=new Xi(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Yi=function t(){this._nv=null;var e=arguments[0];this._nv=new Xi(t.toSegmentStrings(e))};Yi.prototype.checkValid=function(){this._nv.checkValid()},Yi.prototype.interfaces_=function(){return[]},Yi.prototype.getClass=function(){return Yi},Yi.toSegmentStrings=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next();e.add(new Ui(i.getCoordinates(),i))}return e},Yi.checkValid=function(t){new Yi(t).checkValid()};var ki=function(t){this._mapOp=t};ki.prototype.map=function(t){for(var e=new Nt,n=0;n<t.getNumGeometries();n++){var i=this._mapOp.map(t.getGeometryN(n));i.isEmpty()||e.add(i)}return t.getFactory().createGeometryCollection(_e.toGeometryArray(e))},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki},ki.map=function(t,e){return new ki(e).map(t)};var ji=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new Nt,this._resultLineList=new Nt;var t=arguments[0],e=arguments[1],n=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=n};ji.prototype.collectLines=function(t){for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next();this.collectLineEdge(n,t,this._lineEdgesList),this.collectBoundaryTouchEdge(n,t,this._lineEdgesList)}},ji.prototype.labelIsolatedLine=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,n)},ji.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},ji.prototype.collectLineEdge=function(t,e,n){var i=t.getLabel(),r=t.getEdge();t.isLineEdge()&&(t.isVisited()||!Lr.isResultOfOp(i,e)||r.isCovered()||(n.add(r),t.setVisitedEdge(!0)))},ji.prototype.findCoveredLineEdges=function(){for(var t=this._op.getGraph().getNodes().iterator();t.hasNext();){t.next().getEdges().findCoveredLineEdges()}for(var e=this._op.getGraph().getEdgeEnds().iterator();e.hasNext();){var n=e.next(),i=n.getEdge();if(n.isLineEdge()&&!i.isCoveredSet()){var r=this._op.isCoveredByA(n.getCoordinate());i.setCovered(r)}}},ji.prototype.labelIsolatedLines=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next(),i=n.getLabel();n.isIsolated()&&(i.isNull(0)?this.labelIsolatedLine(n,0):this.labelIsolatedLine(n,1))}},ji.prototype.buildLines=function(t){for(var e=this._lineEdgesList.iterator();e.hasNext();){var n=e.next(),i=this._geometryFactory.createLineString(n.getCoordinates());this._resultLineList.add(i),n.setInResult(!0)}},ji.prototype.collectBoundaryTouchEdge=function(t,e,n){var i=t.getLabel();return t.isLineEdge()?null:t.isVisited()?null:t.isInteriorAreaEdge()?null:t.getEdge().isInResult()?null:(et.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),void(Lr.isResultOfOp(i,e)&&e===Lr.INTERSECTION&&(n.add(t.getEdge()),t.setVisitedEdge(!0))))},ji.prototype.interfaces_=function(){return[]},ji.prototype.getClass=function(){return ji};var Hi=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new Nt;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};Hi.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var n=this._geometryFactory.createPoint(e);this._resultPointList.add(n)}},Hi.prototype.extractNonCoveredResultNodes=function(t){for(var e=this._op.getGraph().getNodes().iterator();e.hasNext();){var n=e.next();if(!n.isInResult()&&(!n.isIncidentEdgeInResult()&&(0===n.getEdges().getDegree()||t===Lr.INTERSECTION))){var i=n.getLabel();Lr.isResultOfOp(i,t)&&this.filterCoveredNodeToPoint(n)}}},Hi.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},Hi.prototype.interfaces_=function(){return[]},Hi.prototype.getClass=function(){return Hi};var Wi=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};Wi.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},Wi.prototype.transformPolygon=function(t,e){var n=!0,i=this.transformLinearRing(t.getExteriorRing(),t);null!==i&&i instanceof ee&&!i.isEmpty()||(n=!1);for(var r=new Nt,o=0;o<t.getNumInteriorRing();o++){var s=this.transformLinearRing(t.getInteriorRingN(o),t);null===s||s.isEmpty()||(s instanceof ee||(n=!1),r.add(s))}if(n)return this._factory.createPolygon(i,r.toArray([]));var a=new Nt;return null!==i&&a.add(i),a.addAll(r),this._factory.buildGeometry(a)},Wi.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},Wi.prototype.getInputGeometry=function(){return this._inputGeom},Wi.prototype.transformMultiLineString=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transformLineString(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Wi.prototype.transformCoordinates=function(t,e){return this.copy(t)},Wi.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},Wi.prototype.transformMultiPoint=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transformPoint(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Wi.prototype.transformMultiPolygon=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transformPolygon(t.getGeometryN(i),t);null!==r&&(r.isEmpty()||n.add(r))}return this._factory.buildGeometry(n)},Wi.prototype.copy=function(t){return t.copy()},Wi.prototype.transformGeometryCollection=function(t,e){for(var n=new Nt,i=0;i<t.getNumGeometries();i++){var r=this.transform(t.getGeometryN(i));null!==r&&(this._pruneEmptyGeometry&&r.isEmpty()||n.add(r))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(_e.toGeometryArray(n)):this._factory.buildGeometry(n)},Wi.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof Qt)return this.transformPoint(t,null);if(t instanceof te)return this.transformMultiPoint(t,null);if(t instanceof ee)return this.transformLinearRing(t,null);if(t instanceof Kt)return this.transformLineString(t,null);if(t instanceof Xt)return this.transformMultiLineString(t,null);if(t instanceof $t)return this.transformPolygon(t,null);if(t instanceof ne)return this.transformMultiPolygon(t,null);if(t instanceof zt)return this.transformGeometryCollection(t,null);throw new m(\"Unknown Geometry subtype: \"+t.getClass().getName())},Wi.prototype.transformLinearRing=function(t,e){var n=this.transformCoordinates(t.getCoordinateSequence(),t);if(null===n)return this._factory.createLinearRing(null);var i=n.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Wi.prototype.interfaces_=function(){return[]},Wi.prototype.getClass=function(){return Wi};var Ki=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new dn,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Kt&&\"number\"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&\"number\"==typeof arguments[1]){var i=arguments[0],r=arguments[1];this._srcPts=i,this._isClosed=t.isClosed(i),this._snapTolerance=r}};Ki.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),i=0;i<n;i++){var r=t.get(i),o=this.findSnapForVertex(r,e);null!==o&&(t.set(i,new C(o)),0===i&&this._isClosed&&t.set(t.size()-1,new C(o)))}},Ki.prototype.findSnapForVertex=function(t,e){for(var n=0;n<e.length;n++){if(t.equals2D(e[n]))return null;if(t.distance(e[n])<this._snapTolerance)return e[n]}return null},Ki.prototype.snapTo=function(t){var e=new St(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);return e.toCoordinateArray()},Ki.prototype.snapSegments=function(t,e){if(0===e.length)return null;var n=e.length;e[0].equals2D(e[e.length-1])&&(n=e.length-1);for(var i=0;i<n;i++){var r=e[i],o=this.findSegmentIndexToSnap(r,t);o>=0&&t.add(o+1,new C(r),!1)}},Ki.prototype.findSegmentIndexToSnap=function(t,e){for(var n=v.MAX_VALUE,i=-1,r=0;r<e.size()-1;r++){if(this._seg.p0=e.get(r),this._seg.p1=e.get(r+1),this._seg.p0.equals2D(t)||this._seg.p1.equals2D(t)){if(this._allowSnappingToSourceVertices)continue;return-1}var o=this._seg.distance(t);o<this._snapTolerance&&o<n&&(n=o,i=r)}return i},Ki.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},Ki.prototype.interfaces_=function(){return[]},Ki.prototype.getClass=function(){return Ki},Ki.isClosed=function(t){return!(t.length<=1)&&t[0].equals2D(t[t.length-1])};var Ji=function(t){this._srcGeom=t||null},Qi={SNAP_PRECISION_FACTOR:{configurable:!0}};Ji.prototype.snapTo=function(t,e){var n=this.extractTargetCoordinates(t);return new Zi(e,n).transform(this._srcGeom)},Ji.prototype.snapToSelf=function(t,e){var n=this.extractTargetCoordinates(this._srcGeom),i=new Zi(t,n,!0).transform(this._srcGeom),r=i;return e&&T(r,Zt)&&(r=i.buffer(0)),r},Ji.prototype.computeSnapTolerance=function(t){return this.computeMinimumSegmentLength(t)/10},Ji.prototype.extractTargetCoordinates=function(t){for(var e=new f,n=t.getCoordinates(),i=0;i<n.length;i++)e.add(n[i]);return e.toArray(new Array(0).fill(null))},Ji.prototype.computeMinimumSegmentLength=function(t){for(var e=v.MAX_VALUE,n=0;n<t.length-1;n++){var i=t[n].distance(t[n+1]);i<e&&(e=i)}return e},Ji.prototype.interfaces_=function(){return[]},Ji.prototype.getClass=function(){return Ji},Ji.snap=function(t,e,n){var i=new Array(2).fill(null),r=new Ji(t);i[0]=r.snapTo(e,n);var o=new Ji(e);return i[1]=o.snapTo(i[0],n),i},Ji.computeOverlaySnapTolerance=function(){if(1===arguments.length){var t=arguments[0],e=Ji.computeSizeBasedSnapTolerance(t),n=t.getPrecisionModel();if(n.getType()===fe.FIXED){var i=1/n.getScale()*2/1.415;i>e&&(e=i)}return e}if(2===arguments.length){var r=arguments[0],o=arguments[1];return Math.min(Ji.computeOverlaySnapTolerance(r),Ji.computeOverlaySnapTolerance(o))}},Ji.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*Ji.SNAP_PRECISION_FACTOR},Ji.snapToSelf=function(t,e,n){return new Ji(t).snapToSelf(e,n)},Qi.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(Ji,Qi);var Zi=function(t){function e(e,n,i){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==i&&i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new Ki(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),i=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),$i=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};$i.prototype.getCommon=function(){return v.longBitsToDouble(this._commonBits)},$i.prototype.add=function(t){var e=v.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=$i.signExpBits(this._commonBits),this._isFirst=!1,null;if($i.signExpBits(e)!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=$i.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=$i.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},$i.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=v.longBitsToDouble(t),n=\"0000000000000000000000000000000000000000000000000000000000000000\"+v.toBinaryString(t),i=n.substring(n.length-64);return i.substring(0,1)+\" \"+i.substring(1,12)+\"(exp) \"+i.substring(12)+\" [ \"+e+\" ]\"}},$i.prototype.interfaces_=function(){return[]},$i.prototype.getClass=function(){return $i},$i.getBit=function(t,e){return 0!=(t&1<<e)?1:0},$i.signExpBits=function(t){return t>>52},$i.zeroLowerBits=function(t,e){return t&~((1<<e)-1)},$i.numCommonMostSigMantissaBits=function(t,e){for(var n=0,i=52;i>=0;i--){if($i.getBit(t,i)!==$i.getBit(e,i))return n;n++}return 52};var tr=function(){this._commonCoord=null,this._ccFilter=new nr},er={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};tr.prototype.addCommonBits=function(t){var e=new ir(this._commonCoord);t.apply(e),t.geometryChanged()},tr.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new C(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ir(e);return t.apply(n),t.geometryChanged(),t},tr.prototype.getCommonCoordinate=function(){return this._commonCoord},tr.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr},er.CommonCoordinateFilter.get=function(){return nr},er.Translater.get=function(){return ir},Object.defineProperties(tr,er);var nr=function(){this._commonBitsX=new $i,this._commonBitsY=new $i};nr.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},nr.prototype.getCommonCoordinate=function(){return new C(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},nr.prototype.interfaces_=function(){return[ft]},nr.prototype.getClass=function(){return nr};var ir=function(){this.trans=null;var t=arguments[0];this.trans=t};ir.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,i)},ir.prototype.isDone=function(){return!1},ir.prototype.isGeometryChanged=function(){return!0},ir.prototype.interfaces_=function(){return[Ut]},ir.prototype.getClass=function(){return ir};var rr=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};rr.prototype.selfSnap=function(t){return new Ji(t).snapTo(t,this._snapTolerance)},rr.prototype.removeCommonBits=function(t){this._cbr=new tr,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},rr.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},rr.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Lr.overlayOp(e[0],e[1],t);return this.prepareResult(n)},rr.prototype.checkValid=function(t){t.isValid()||Y.out.println(\"Snapped geometry is invalid\")},rr.prototype.computeSnapTolerance=function(){this._snapTolerance=Ji.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},rr.prototype.snap=function(t){var e=this.removeCommonBits(t);return Ji.snap(e[0],e[1],this._snapTolerance)},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.overlayOp=function(t,e,n){return new rr(t,e).getResultGeometry(n)},rr.union=function(t,e){return rr.overlayOp(t,e,Lr.UNION)},rr.intersection=function(t,e){return rr.overlayOp(t,e,Lr.INTERSECTION)},rr.symDifference=function(t,e){return rr.overlayOp(t,e,Lr.SYMDIFFERENCE)},rr.difference=function(t,e){return rr.overlayOp(t,e,Lr.DIFFERENCE)};var or=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};or.prototype.getResultGeometry=function(t){var e=null,n=!1,i=null;try{e=Lr.overlayOp(this._geom[0],this._geom[1],t);n=!0}catch(t){if(!(t instanceof $))throw t;i=t}if(!n)try{e=rr.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof $?i:t}return e},or.prototype.interfaces_=function(){return[]},or.prototype.getClass=function(){return or},or.overlayOp=function(t,e,n){return new or(t,e).getResultGeometry(n)},or.union=function(t,e){return or.overlayOp(t,e,Lr.UNION)},or.intersection=function(t,e){return or.overlayOp(t,e,Lr.INTERSECTION)},or.symDifference=function(t,e){return or.overlayOp(t,e,Lr.SYMDIFFERENCE)},or.difference=function(t,e){return or.overlayOp(t,e,Lr.DIFFERENCE)};var sr=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};sr.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},sr.prototype.interfaces_=function(){return[]},sr.prototype.getClass=function(){return sr};var ar=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=i,this._xValue=r,this._obj=o}},ur={INSERT:{configurable:!0},DELETE:{configurable:!0}};ar.prototype.isDelete=function(){return this._eventType===ar.DELETE},ar.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},ar.prototype.getObject=function(){return this._obj},ar.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},ar.prototype.getInsertEvent=function(){return this._insertEvent},ar.prototype.isInsert=function(){return this._eventType===ar.INSERT},ar.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},ar.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},ar.prototype.interfaces_=function(){return[E]},ar.prototype.getClass=function(){return ar},ur.INSERT.get=function(){return 1},ur.DELETE.get=function(){return 2},Object.defineProperties(ar,ur);var lr=function(){};lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr};var cr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};cr.prototype.isTrivialIntersection=function(t,e,n,i){if(t===n&&1===this._li.getIntersectionNum()){if(cr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var r=t.getNumPoints()-1;if(0===e&&i===r||0===i&&e===r)return!0}}return!1},cr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},cr.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},cr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},cr.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next().getCoordinate();if(t.isIntersection(i))return!0}return!1},cr.prototype.hasProperIntersection=function(){return this._hasProper},cr.prototype.hasIntersection=function(){return this._hasIntersection},cr.prototype.isDone=function(){return this._isDone},cr.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},cr.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},cr.prototype.addIntersections=function(t,e,n,i){if(t===n&&e===i)return null;this.numTests++;var r=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[i],a=n.getCoordinates()[i+1];this._li.computeIntersection(r,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,i)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr},cr.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var pr=function(t){function e(){t.call(this),this.events=new Nt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){$e.sort(this.events);for(var t=0;t<this.events.size();t++){var e=this.events.get(t);e.isDelete()&&e.getInsertEvent().setDeleteEventIndex(t)}},e.prototype.computeIntersections=function(){if(1===arguments.length){var t=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var e=0;e<this.events.size();e++){var n=this.events.get(e);if(n.isInsert()&&this.processOverlaps(e,n.getDeleteEventIndex(),n,t),t.isDone())break}}else if(3===arguments.length)if(arguments[2]instanceof cr&&T(arguments[0],xt)&&T(arguments[1],xt)){var i=arguments[0],r=arguments[1],o=arguments[2];this.addEdges(i,i),this.addEdges(r,r),this.computeIntersections(o)}else if(\"boolean\"==typeof arguments[2]&&T(arguments[0],xt)&&arguments[1]instanceof cr){var s=arguments[0],a=arguments[1];arguments[2]?this.addEdges(s,null):this.addEdges(s),this.computeIntersections(a)}},e.prototype.addEdge=function(t,e){for(var n=t.getMonotoneChainEdge(),i=n.getStartIndexes(),r=0;r<i.length-1;r++){var o=new sr(n,r),s=new ar(e,n.getMinX(r),o);this.events.add(s),this.events.add(new ar(n.getMaxX(r),s))}},e.prototype.processOverlaps=function(t,e,n,i){for(var r=n.getObject(),o=t;o<e;o++){var s=this.events.get(o);if(s.isInsert()){var a=s.getObject();n.isSameLabel(s)||(r.computeIntersections(a,i),this.nOverlaps++)}}},e.prototype.addEdges=function(){if(1===arguments.length)for(var t=arguments[0].iterator();t.hasNext();){var e=t.next();this.addEdge(e,e)}else if(2===arguments.length)for(var n=arguments[0],i=arguments[1],r=n.iterator();r.hasNext();){var o=r.next();this.addEdge(o,i)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(lr),hr=function(){this._min=v.POSITIVE_INFINITY,this._max=v.NEGATIVE_INFINITY},fr={NodeComparator:{configurable:!0}};hr.prototype.getMin=function(){return this._min},hr.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},hr.prototype.getMax=function(){return this._max},hr.prototype.toString=function(){return Z.toLineString(new C(this._min,0),new C(this._max,0))},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},fr.NodeComparator.get=function(){return gr},Object.defineProperties(hr,fr);var gr=function(){};gr.prototype.compare=function(t,e){var n=t,i=e,r=(n._min+n._max)/2,o=(i._min+i._max)/2;return r<o?-1:r>o?1:0},gr.prototype.interfaces_=function(){return[N]},gr.prototype.getClass=function(){return gr};var dr=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],i=arguments[2];this._min=e,this._max=n,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),yr=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hr),_r=function(){this._leaves=new Nt,this._root=null,this._level=0};_r.prototype.buildTree=function(){$e.sort(this._leaves,new hr.NodeComparator);for(var t=this._leaves,e=null,n=new Nt;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},_r.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error(\"Index cannot be added to once it has been queried\");this._leaves.add(new dr(t,e,n))},_r.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},_r.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},_r.prototype.printNode=function(t){Y.out.println(Z.toLineString(new C(t._min,this._level),new C(t._max,this._level)))},_r.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},_r.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n<t.size();n+=2){var i=t.get(n);if(null===(n+1<t.size()?t.get(n):null))e.add(i);else{var r=new yr(t.get(n),t.get(n+1));e.add(r)}}},_r.prototype.interfaces_=function(){return[]},_r.prototype.getClass=function(){return _r};var mr=function(){this._items=new Nt};mr.prototype.visitItem=function(t){this._items.add(t)},mr.prototype.getItems=function(){return this._items},mr.prototype.interfaces_=function(){return[Ke]},mr.prototype.getClass=function(){return mr};var vr=function(){this._index=null;var t=arguments[0];if(!T(t,Zt))throw new m(\"Argument must be Polygonal\");this._index=new xr(t)},Ir={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};vr.prototype.locate=function(t){var e=new st(t),n=new Er(e);return this._index.query(t.y,t.y,n),e.getLocation()},vr.prototype.interfaces_=function(){return[Vn]},vr.prototype.getClass=function(){return vr},Ir.SegmentVisitor.get=function(){return Er},Ir.IntervalIndexedGeometry.get=function(){return xr},Object.defineProperties(vr,Ir);var Er=function(){this._counter=null;var t=arguments[0];this._counter=t};Er.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},Er.prototype.interfaces_=function(){return[Ke]},Er.prototype.getClass=function(){return Er};var xr=function(){this._index=new _r;var t=arguments[0];this.init(t)};xr.prototype.init=function(t){for(var e=Ci.getLines(t).iterator();e.hasNext();){var n=e.next().getCoordinates();this.addLine(n)}},xr.prototype.addLine=function(t){for(var e=1;e<t.length;e++){var n=new dn(t[e-1],t[e]),i=Math.min(n.p0.y,n.p1.y),r=Math.max(n.p0.y,n.p1.y);this._index.insert(i,r,n)}},xr.prototype.query=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new mr;return this._index.query(t,e,n),n.getItems()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];this._index.query(i,r,o)}},xr.prototype.interfaces_=function(){return[]},xr.prototype.getClass=function(){return xr};var Nr=function(t){function e(){if(t.call(this),this._parentGeom=null,this._lineEdgeMap=new he,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new Si,2===arguments.length){var e=arguments[0],n=arguments[1],i=gt.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=n,this._boundaryNodeRule=i,null!==n&&this.add(n)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];this._argIndex=r,this._parentGeom=o,this._boundaryNodeRule=s,null!==o&&this.add(o)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertBoundaryPoint=function(t,n){var i=this._nodes.addNode(n).getLabel(),r=1;w.NONE;i.getLocation(t,Se.ON)===w.BOUNDARY&&r++;var o=e.determineBoundary(this._boundaryNodeRule,r);i.setLocation(t,o)},e.prototype.computeSelfNodes=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];return this.computeSelfNodes(t,e,!1)}if(3===arguments.length){var n=arguments[0],i=arguments[1],r=arguments[2],o=new cr(n,!0,!1);o.setIsDoneIfProperInt(r);var s=this.createEdgeSetIntersector(),a=this._parentGeom instanceof ee||this._parentGeom instanceof $t||this._parentGeom instanceof ne,u=i||!a;return s.computeIntersections(this._edges,o,u),this.addSelfIntersectionNodes(this._argIndex),o}},e.prototype.computeSplitEdges=function(t){for(var e=this._edges.iterator();e.hasNext();){e.next().eiList.addSplitEdges(t)}},e.prototype.computeEdgeIntersections=function(t,e,n){var i=new cr(e,n,!0);i.setBoundaryNodes(this.getBoundaryNodes(),t.getBoundaryNodes());return this.createEdgeSetIntersector().computeIntersections(this._edges,t._edges,i),i},e.prototype.getGeometry=function(){return this._parentGeom},e.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},e.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},e.prototype.addPoint=function(){if(arguments[0]instanceof Qt){var t=arguments[0].getCoordinate();this.insertPoint(this._argIndex,t,w.INTERIOR)}else if(arguments[0]instanceof C){var e=arguments[0];this.insertPoint(this._argIndex,e,w.INTERIOR)}},e.prototype.addPolygon=function(t){this.addPolygonRing(t.getExteriorRing(),w.EXTERIOR,w.INTERIOR);for(var e=0;e<t.getNumInteriorRing();e++){var n=t.getInteriorRingN(e);this.addPolygonRing(n,w.INTERIOR,w.EXTERIOR)}},e.prototype.addEdge=function(t){this.insertEdge(t);var e=t.getCoordinates();this.insertPoint(this._argIndex,e[0],w.BOUNDARY),this.insertPoint(this._argIndex,e[e.length-1],w.BOUNDARY)},e.prototype.addLineString=function(t){var e=Lt.removeRepeatedPoints(t.getCoordinates());if(e.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=e[0],null;var n=new ni(e,new Pe(this._argIndex,w.INTERIOR));this._lineEdgeMap.put(t,n),this.insertEdge(n),et.isTrue(e.length>=2,\"found LineString with single point\"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,i=t.iterator();i.hasNext();){var r=i.next();e[n++]=r.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===w.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var i=Lt.removeRepeatedPoints(t.getCoordinates());if(i.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var r=e,o=n;at.isCCW(i)&&(r=n,o=e);var s=new ni(i,new Pe(this._argIndex,w.BOUNDARY,r,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,i[0],w.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var i=this._nodes.addNode(e),r=i.getLabel();null===r?i._label=new Pe(t,n):r.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new pr},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),i=n.getLabel().getLocation(t),r=n.eiList.iterator();r.hasNext();){var o=r.next();this.addSelfIntersectionNode(t,o.coord,i)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ne&&(this._useBoundaryDeterminationRule=!1),e instanceof $t)this.addPolygon(e);else if(e instanceof Kt)this.addLineString(e);else if(e instanceof Qt)this.addPoint(e);else if(e instanceof te)this.addCollection(e);else if(e instanceof Xt)this.addCollection(e);else if(e instanceof ne)this.addCollection(e);else{if(!(e instanceof zt))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e<t.getNumGeometries();e++){var n=t.getGeometryN(e);this.add(n)}},e.prototype.locate=function(t){return T(this._parentGeom,Zt)&&this._parentGeom.getNumGeometries()>50?(null===this._areaPtLocator&&(this._areaPtLocator=new vr(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?w.BOUNDARY:w.INTERIOR},e}(Ye),Cr=function(){if(this._li=new rt,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Nr(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],i=gt.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,e,i),this._arg[1]=new Nr(1,n,i)}else if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];r.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(r.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Nr(0,r,s),this._arg[1]=new Nr(1,o,s)}};Cr.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Cr.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Cr.prototype.interfaces_=function(){return[]},Cr.prototype.getClass=function(){return Cr};var Sr=function(){};Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Sr.map=function(){if(arguments[0]instanceof ct&&T(arguments[1],Sr.MapOp)){for(var t=arguments[0],e=arguments[1],n=new Nt,i=0;i<t.getNumGeometries();i++){var r=e.map(t.getGeometryN(i));null!==r&&n.add(r)}return t.getFactory().buildGeometry(n)}if(T(arguments[0],It)&&T(arguments[1],Sr.MapOp)){for(var o=arguments[0],s=arguments[1],a=new Nt,u=o.iterator();u.hasNext();){var l=u.next(),c=s.map(l);null!==c&&a.add(c)}return a}},Sr.MapOp=function(){};var Lr=function(t){function e(){var e=arguments[0],n=arguments[1];t.call(this,e,n),this._ptLocator=new Si,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new Hn,this._resultPolyList=new Nt,this._resultLineList=new Nt,this._resultPointList=new Nt,this._graph=new Ye(new kn),this._geomFact=e.getFactory()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(null!==e){var n=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Pe(t.getLabel())).flip();var r=e.getDepth();r.isNull()&&r.add(n),r.add(i),n.merge(i)}else this._edgeList.add(t)},e.prototype.getGraph=function(){return this._graph},e.prototype.cancelDuplicateResultEdges=function(){for(var t=this._graph.getEdgeEnds().iterator();t.hasNext();){var e=t.next(),n=e.getSym();e.isInResult()&&n.isInResult()&&(e.setInResult(!1),n.setInResult(!1))}},e.prototype.isCoveredByLA=function(t){return!!this.isCovered(t,this._resultLineList)||!!this.isCovered(t,this._resultPolyList)},e.prototype.computeGeometry=function(t,n,i,r){var o=new Nt;return o.addAll(t),o.addAll(n),o.addAll(i),o.isEmpty()?e.createEmptyResult(r,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(o)},e.prototype.mergeSymLabels=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().mergeSymLabels()}},e.prototype.isCovered=function(t,e){for(var n=e.iterator();n.hasNext();){var i=n.next();if(this._ptLocator.locate(t,i)!==w.EXTERIOR)return!0}return!1},e.prototype.replaceCollapsedEdges=function(){for(var t=new Nt,e=this._edgeList.iterator();e.hasNext();){var n=e.next();n.isCollapsed()&&(e.remove(),t.add(n.getCollapsedEdge()))}this._edgeList.addAll(t)},e.prototype.updateNodeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getEdges().getLabel();e.getLabel().merge(n)}},e.prototype.getResultGeometry=function(t){return this.computeOverlay(t),this._resultGeom},e.prototype.insertUniqueEdges=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();this.insertUniqueEdge(n)}},e.prototype.computeOverlay=function(t){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var e=new Nt;this._arg[0].computeSplitEdges(e),this._arg[1].computeSplitEdges(e),this.insertUniqueEdges(e),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),Yi.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(t),this.cancelDuplicateResultEdges();var n=new ke(this._geomFact);n.add(this._graph),this._resultPolyList=n.getPolygons();var i=new ji(this,this._geomFact,this._ptLocator);this._resultLineList=i.build(t);var r=new Hi(this,this._geomFact,this._ptLocator);this._resultPointList=r.build(t),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,t)},e.prototype.labelIncompleteNode=function(t,e){var n=this._ptLocator.locate(t.getCoordinate(),this._arg[e].getGeometry());t.getLabel().setLocation(e,n)},e.prototype.copyPoints=function(t){for(var e=this._arg[t].getNodeIterator();e.hasNext();){var n=e.next();this._graph.addNode(n.getCoordinate()).setLabel(t,n.getLabel().getLocation(t))}},e.prototype.findResultAreaEdges=function(t){for(var n=this._graph.getEdgeEnds().iterator();n.hasNext();){var i=n.next(),r=i.getLabel();r.isArea()&&!i.isInteriorAreaEdge()&&e.isResultOfOp(r.getLocation(0,Se.RIGHT),r.getLocation(1,Se.RIGHT),t)&&i.setInResult(!0)}},e.prototype.computeLabelsFromDepths=function(){for(var t=this._edgeList.iterator();t.hasNext();){var e=t.next(),n=e.getLabel(),i=e.getDepth();if(!i.isNull()){i.normalize();for(var r=0;r<2;r++)n.isNull(r)||!n.isArea()||i.isNull(r)||(0===i.getDelta(r)?n.toLine(r):(et.isTrue(!i.isNull(r,Se.LEFT),\"depth of LEFT side has not been initialized\"),n.setLocation(r,Se.LEFT,i.getLocation(r,Se.LEFT)),et.isTrue(!i.isNull(r,Se.RIGHT),\"depth of RIGHT side has not been initialized\"),n.setLocation(r,Se.RIGHT,i.getLocation(r,Se.RIGHT))))}}},e.prototype.computeLabelling=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){t.next().getEdges().computeLabelling(this._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},e.prototype.labelIncompleteNodes=function(){for(var t=this._graph.getNodes().iterator();t.hasNext();){var e=t.next(),n=e.getLabel();e.isIsolated()&&(n.isNull(0)?this.labelIncompleteNode(e,0):this.labelIncompleteNode(e,1)),e.getEdges().updateLabelling(n)}},e.prototype.isCoveredByA=function(t){return!!this.isCovered(t,this._resultPolyList)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Cr);Lr.overlayOp=function(t,e,n){return new Lr(t,e).getResultGeometry(n)},Lr.intersection=function(t,e){if(t.isEmpty()||e.isEmpty())return Lr.createEmptyResult(Lr.INTERSECTION,t,e,t.getFactory());if(t.isGeometryCollection()){var n=e;return ki.map(t,{interfaces_:function(){return[Sr.MapOp]},map:function(t){return t.intersection(n)}})}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.INTERSECTION)},Lr.symDifference=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Lr.createEmptyResult(Lr.SYMDIFFERENCE,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.SYMDIFFERENCE)},Lr.resultDimension=function(t,e,n){var i=e.getDimension(),r=n.getDimension(),o=-1;switch(t){case Lr.INTERSECTION:o=Math.min(i,r);break;case Lr.UNION:o=Math.max(i,r);break;case Lr.DIFFERENCE:o=i;break;case Lr.SYMDIFFERENCE:o=Math.max(i,r)}return o},Lr.createEmptyResult=function(t,e,n,i){var r=null;switch(Lr.resultDimension(t,e,n)){case-1:r=i.createGeometryCollection(new Array(0).fill(null));break;case 0:r=i.createPoint();break;case 1:r=i.createLineString();break;case 2:r=i.createPolygon()}return r},Lr.difference=function(t,e){return t.isEmpty()?Lr.createEmptyResult(Lr.DIFFERENCE,t,e,t.getFactory()):e.isEmpty()?t.copy():(t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.DIFFERENCE))},Lr.isResultOfOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=t.getLocation(0),i=t.getLocation(1);return Lr.isResultOfOp(n,i,e)}if(3===arguments.length){var r=arguments[0],o=arguments[1],s=arguments[2];switch(r===w.BOUNDARY&&(r=w.INTERIOR),o===w.BOUNDARY&&(o=w.INTERIOR),s){case Lr.INTERSECTION:return r===w.INTERIOR&&o===w.INTERIOR;case Lr.UNION:return r===w.INTERIOR||o===w.INTERIOR;case Lr.DIFFERENCE:return r===w.INTERIOR&&o!==w.INTERIOR;case Lr.SYMDIFFERENCE:return r===w.INTERIOR&&o!==w.INTERIOR||r!==w.INTERIOR&&o===w.INTERIOR}return!1}},Lr.INTERSECTION=1,Lr.UNION=2,Lr.DIFFERENCE=3,Lr.SYMDIFFERENCE=4;var br=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new Si,this._seg=new dn;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};br.prototype.isWithinToleranceOfBoundary=function(t){for(var e=0;e<this._linework.getNumGeometries();e++)for(var n=this._linework.getGeometryN(e).getCoordinateSequence(),i=0;i<n.size()-1;i++){n.getCoordinate(i,this._seg.p0),n.getCoordinate(i+1,this._seg.p1);if(this._seg.distance(t)<=this._boundaryDistanceTolerance)return!0}return!1},br.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?w.BOUNDARY:this._ptLocator.locate(t,this._g)},br.prototype.extractLinework=function(t){var e=new wr;t.apply(e);var n=e.getLinework(),i=_e.toLineStringArray(n);return t.getFactory().createMultiLineString(i)},br.prototype.interfaces_=function(){return[]},br.prototype.getClass=function(){return br};var wr=function(){this._linework=null,this._linework=new Nt};wr.prototype.getLinework=function(){return this._linework},wr.prototype.filter=function(t){if(t instanceof $t){var e=t;this._linework.add(e.getExteriorRing());for(var n=0;n<e.getNumInteriorRing();n++)this._linework.add(e.getInteriorRingN(n))}},wr.prototype.interfaces_=function(){return[Vt]},wr.prototype.getClass=function(){return wr};var Or=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Or.prototype.extractPoints=function(t,e,n){for(var i=t.getCoordinates(),r=0;r<i.length-1;r++)this.computeOffsetPoints(i[r],i[r+1],e,n)},Or.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Or.prototype.getPoints=function(t){for(var e=new Nt,n=Ci.getLines(this._g).iterator();n.hasNext();){var i=n.next();this.extractPoints(i,t,e)}return e},Or.prototype.computeOffsetPoints=function(t,e,n,i){var r=e.x-t.x,o=e.y-t.y,s=Math.sqrt(r*r+o*o),a=n*r/s,u=n*o/s,l=(e.x+t.x)/2,c=(e.y+t.y)/2;if(this._doLeft){var p=new C(l-u,c+a);i.add(p)}if(this._doRight){var h=new C(l+u,c-a);i.add(h)}},Or.prototype.interfaces_=function(){return[]},Or.prototype.getClass=function(){return Or};var Tr=function t(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=t.TOLERANCE,this._testCoords=new Nt;var e=arguments[0],n=arguments[1],i=arguments[2];this._boundaryDistanceTolerance=t.computeBoundaryDistanceTolerance(e,n),this._geom=[e,n,i],this._locFinder=[new br(this._geom[0],this._boundaryDistanceTolerance),new br(this._geom[1],this._boundaryDistanceTolerance),new br(this._geom[2],this._boundaryDistanceTolerance)]},Rr={TOLERANCE:{configurable:!0}};Tr.prototype.reportResult=function(t,e,n){Y.out.println(\"Overlay result invalid - A:\"+w.toLocationSymbol(e[0])+\" B:\"+w.toLocationSymbol(e[1])+\" expected:\"+(n?\"i\":\"e\")+\" actual:\"+w.toLocationSymbol(e[2]))},Tr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Tr.prototype.checkValid=function(){if(1===arguments.length){for(var t=arguments[0],e=0;e<this._testCoords.size();e++){var n=this._testCoords.get(e);if(!this.checkValid(t,n))return this._invalidLocation=n,!1}return!0}if(2===arguments.length){var i=arguments[0],r=arguments[1];return this._location[0]=this._locFinder[0].getLocation(r),this._location[1]=this._locFinder[1].getLocation(r),this._location[2]=this._locFinder[2].getLocation(r),!!Tr.hasLocation(this._location,w.BOUNDARY)||this.isValidResult(i,this._location)}},Tr.prototype.addTestPts=function(t){var e=new Or(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Tr.prototype.isValidResult=function(t,e){var n=Lr.isResultOfOp(e[0],e[1],t),i=!(n^e[2]===w.INTERIOR);return i||this.reportResult(t,e,n),i},Tr.prototype.getInvalidLocation=function(){return this._invalidLocation},Tr.prototype.interfaces_=function(){return[]},Tr.prototype.getClass=function(){return Tr},Tr.hasLocation=function(t,e){for(var n=0;n<3;n++)if(t[n]===e)return!0;return!1},Tr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(Ji.computeSizeBasedSnapTolerance(t),Ji.computeSizeBasedSnapTolerance(e))},Tr.isValid=function(t,e,n,i){return new Tr(t,e,i).isValid(n)},Rr.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Tr,Rr);var Pr=function t(e){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=t.extractFactory(e),this._inputGeoms=e};Pr.prototype.extractElements=function(t,e){if(null===t)return null;for(var n=0;n<t.getNumGeometries();n++){var i=t.getGeometryN(n);this._skipEmpty&&i.isEmpty()||e.add(i)}},Pr.prototype.combine=function(){for(var t=new Nt,e=this._inputGeoms.iterator();e.hasNext();){var n=e.next();this.extractElements(n,t)}return 0===t.size()?null!==this._geomFactory?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(t)},Pr.prototype.interfaces_=function(){return[]},Pr.prototype.getClass=function(){return Pr},Pr.combine=function(){if(1===arguments.length){var t=arguments[0];return new Pr(t).combine()}if(2===arguments.length){var e=arguments[0],n=arguments[1];return new Pr(Pr.createList(e,n)).combine()}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2];return new Pr(Pr.createList(i,r,o)).combine()}},Pr.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Pr.createList=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new Nt;return n.add(t),n.add(e),n}if(3===arguments.length){var i=arguments[0],r=arguments[1],o=arguments[2],s=new Nt;return s.add(i),s.add(r),s.add(o),s}};var Dr=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,null===this._inputPolys&&(this._inputPolys=new Nt)},Mr={STRTREE_NODE_CAPACITY:{configurable:!0}};Dr.prototype.reduceToGeometries=function(t){for(var e=new Nt,n=t.iterator();n.hasNext();){var i=n.next(),r=null;T(i,xt)?r=this.unionTree(i):i instanceof ct&&(r=i),e.add(r)}return e},Dr.prototype.extractByEnvelope=function(t,e,n){for(var i=new Nt,r=0;r<e.getNumGeometries();r++){var o=e.getGeometryN(r);o.getEnvelopeInternal().intersects(t)?i.add(o):n.add(o)}return this._geomFactory.buildGeometry(i)},Dr.prototype.unionOptimized=function(t,e){var n=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!n.intersects(i)){return Pr.combine(t,e)}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var r=n.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,r)},Dr.prototype.union=function(){if(null===this._inputPolys)throw new Error(\"union() method cannot be called twice\");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new sn(Dr.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var n=e.next();t.insert(n.getEnvelopeInternal(),n)}this._inputPolys=null;var i=t.itemsTree();return this.unionTree(i)},Dr.prototype.binaryUnion=function(){if(1===arguments.length){var t=arguments[0];return this.binaryUnion(t,0,t.size())}if(3===arguments.length){var e=arguments[0],n=arguments[1],i=arguments[2];if(i-n<=1){var r=Dr.getGeometry(e,n);return this.unionSafe(r,null)}if(i-n==2)return this.unionSafe(Dr.getGeometry(e,n),Dr.getGeometry(e,n+1));var o=Math.trunc((i+n)/2),s=this.binaryUnion(e,n,o),a=this.binaryUnion(e,o,i);return this.unionSafe(s,a)}},Dr.prototype.repeatedUnion=function(t){for(var e=null,n=t.iterator();n.hasNext();){var i=n.next();e=null===e?i.copy():e.union(i)}return e},Dr.prototype.unionSafe=function(t,e){return null===t&&null===e?null:null===t?e.copy():null===e?t.copy():this.unionOptimized(t,e)},Dr.prototype.unionActual=function(t,e){return Dr.restrictToPolygons(t.union(e))},Dr.prototype.unionTree=function(t){var e=this.reduceToGeometries(t);return this.binaryUnion(e)},Dr.prototype.unionUsingEnvelopeIntersection=function(t,e,n){var i=new Nt,r=this.extractByEnvelope(n,t,i),o=this.extractByEnvelope(n,e,i),s=this.unionActual(r,o);i.add(s);return Pr.combine(i)},Dr.prototype.bufferUnion=function(){if(1===arguments.length){var t=arguments[0];return t.get(0).getFactory().buildGeometry(t).buffer(0)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e.getFactory().createGeometryCollection([e,n]).buffer(0)}},Dr.prototype.interfaces_=function(){return[]},Dr.prototype.getClass=function(){return Dr},Dr.restrictToPolygons=function(t){if(T(t,Zt))return t;var e=Ni.getPolygons(t);return 1===e.size()?e.get(0):t.getFactory().createMultiPolygon(_e.toPolygonArray(e))},Dr.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Dr.union=function(t){return new Dr(t).union()},Mr.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Dr,Mr);var Ar=function(){};Ar.prototype.interfaces_=function(){return[]},Ar.prototype.getClass=function(){return Ar},Ar.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Lr.createEmptyResult(Lr.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),or.overlayOp(t,e,Lr.UNION)},t.GeoJSONReader=Ne,t.GeoJSONWriter=Ce,t.OverlayOp=Lr,t.UnionOp=Ar,t.BufferOp=di,Object.defineProperty(t,\"__esModule\",{value:!0})});\n","\"use strict\";\n\n// Note: This regex matches even invalid JSON strings, but since we’re\n// working on the output of `JSON.stringify` we know that only valid strings\n// are present (unless the user supplied a weird `options.indent` but in\n// that case we don’t care since the output would be invalid anyway).\nvar stringOrChar = /(\"(?:[^\\\\\"]|\\\\.)*\")|[:,]/g;\n\nmodule.exports = function stringify(passedObj, options) {\n var indent, maxLength, replacer;\n\n options = options || {};\n indent = JSON.stringify(\n [1],\n undefined,\n options.indent === undefined ? 2 : options.indent\n ).slice(2, -3);\n maxLength =\n indent === \"\"\n ? Infinity\n : options.maxLength === undefined\n ? 80\n : options.maxLength;\n replacer = options.replacer;\n\n return (function _stringify(obj, currentIndent, reserved) {\n // prettier-ignore\n var end, index, items, key, keyPart, keys, length, nextIndent, prettified, start, string, value;\n\n if (obj && typeof obj.toJSON === \"function\") {\n obj = obj.toJSON();\n }\n\n string = JSON.stringify(obj, replacer);\n\n if (string === undefined) {\n return string;\n }\n\n length = maxLength - currentIndent.length - reserved;\n\n if (string.length <= length) {\n prettified = string.replace(\n stringOrChar,\n function (match, stringLiteral) {\n return stringLiteral || match + \" \";\n }\n );\n if (prettified.length <= length) {\n return prettified;\n }\n }\n\n if (replacer != null) {\n obj = JSON.parse(string);\n replacer = undefined;\n }\n\n if (typeof obj === \"object\" && obj !== null) {\n nextIndent = currentIndent + indent;\n items = [];\n index = 0;\n\n if (Array.isArray(obj)) {\n start = \"[\";\n end = \"]\";\n length = obj.length;\n for (; index < length; index++) {\n items.push(\n _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) ||\n \"null\"\n );\n }\n } else {\n start = \"{\";\n end = \"}\";\n keys = Object.keys(obj);\n length = keys.length;\n for (; index < length; index++) {\n key = keys[index];\n keyPart = JSON.stringify(key) + \": \";\n value = _stringify(\n obj[key],\n nextIndent,\n keyPart.length + (index === length - 1 ? 0 : 1)\n );\n if (value !== undefined) {\n items.push(keyPart + value);\n }\n }\n }\n\n if (items.length > 0) {\n return [start, indent + items.join(\",\\n\" + nextIndent), end].join(\n \"\\n\" + currentIndent\n );\n }\n }\n\n return string;\n })(passedObj, \"\", 0);\n};\n","import {MODULE_INJECTORS_VS, MODULE_INJECTORS_FS} from '../modules/module-injectors';\nimport {VERTEX_SHADER, FRAGMENT_SHADER} from './constants';\nimport {assert} from '../utils';\n\n// TODO - experimental\nconst MODULE_INJECTORS = {\n [VERTEX_SHADER]: MODULE_INJECTORS_VS,\n [FRAGMENT_SHADER]: MODULE_INJECTORS_FS\n};\n\nexport const DECLARATION_INJECT_MARKER = '__LUMA_INJECT_DECLARATIONS__'; // Uniform/attribute declarations\n\nconst REGEX_START_OF_MAIN = /void\\s+main\\s*\\([^)]*\\)\\s*\\{\\n?/; // Beginning of main\nconst REGEX_END_OF_MAIN = /}\\n?[^{}]*$/; // End of main, assumes main is last function\nconst fragments = [];\n\n// A minimal shader injection/templating system.\n// RFC: https://github.com/visgl/luma.gl/blob/7.0-release/dev-docs/RFCs/v6.0/shader-injection-rfc.md\n/* eslint-disable complexity */\nexport default function injectShader(source, type, inject, injectStandardStubs = false) {\n const isVertex = type === VERTEX_SHADER;\n\n for (const key in inject) {\n const fragmentData = inject[key];\n fragmentData.sort((a, b) => a.order - b.order);\n fragments.length = fragmentData.length;\n for (let i = 0, len = fragmentData.length; i < len; ++i) {\n fragments[i] = fragmentData[i].injection;\n }\n const fragmentString = `${fragments.join('\\n')}\\n`;\n switch (key) {\n // declarations are injected before the main function\n case 'vs:#decl':\n if (isVertex) {\n source = source.replace(DECLARATION_INJECT_MARKER, fragmentString);\n }\n break;\n // inject code at the beginning of the main function\n case 'vs:#main-start':\n if (isVertex) {\n source = source.replace(REGEX_START_OF_MAIN, match => match + fragmentString);\n }\n break;\n // inject code at the end of main function\n case 'vs:#main-end':\n if (isVertex) {\n source = source.replace(REGEX_END_OF_MAIN, match => fragmentString + match);\n }\n break;\n // declarations are injected before the main function\n case 'fs:#decl':\n if (!isVertex) {\n source = source.replace(DECLARATION_INJECT_MARKER, fragmentString);\n }\n break;\n // inject code at the beginning of the main function\n case 'fs:#main-start':\n if (!isVertex) {\n source = source.replace(REGEX_START_OF_MAIN, match => match + fragmentString);\n }\n break;\n // inject code at the end of main function\n case 'fs:#main-end':\n if (!isVertex) {\n source = source.replace(REGEX_END_OF_MAIN, match => fragmentString + match);\n }\n break;\n\n default:\n // TODO(Tarek): I think this usage should be deprecated.\n\n // inject code after key, leaving key in place\n source = source.replace(key, match => match + fragmentString);\n }\n }\n\n // Remove if it hasn't already been replaced\n source = source.replace(DECLARATION_INJECT_MARKER, '');\n\n // Finally, if requested, insert an automatic module injector chunk\n if (injectStandardStubs) {\n source = source.replace(/\\}\\s*$/, match => match + MODULE_INJECTORS[type]);\n }\n\n return source;\n}\n\n/* eslint-enable complexity */\n\n// Takes an array of inject objects and combines them into one\nexport function combineInjects(injects) {\n const result = {};\n assert(Array.isArray(injects) && injects.length > 1);\n injects.forEach(inject => {\n for (const key in inject) {\n result[key] = result[key] ? `${result[key]}\\n${inject[key]}` : inject[key];\n }\n });\n return result;\n}\n","export const MODULE_INJECTORS_VS = `\\\n#ifdef MODULE_LOGDEPTH\n logdepth_adjustPosition(gl_Position);\n#endif\n`;\n\nexport const MODULE_INJECTORS_FS = `\\\n#ifdef MODULE_MATERIAL\n gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n logdepth_setFragDepth();\n#endif\n`;\n","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useEventCallback from '../utils/useEventCallback';\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = React.useState(false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = clsx(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = useEventCallback(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/React.createElement(\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: childClassName\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Ripple from './Ripple';\nvar DURATION = 550;\nexport var DELAY_RIPPLE = 80;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = React.useState([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = React.useRef(0);\n var rippleCallback = React.useRef(null);\n React.useEffect(function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = React.useRef(false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = React.useRef(null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = React.useRef(null);\n var container = React.useRef(null);\n React.useEffect(function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = React.useCallback(function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(_toConsumableArray(oldRipples), [/*#__PURE__*/React.createElement(Ripple, {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = React.useCallback(function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = React.useCallback(function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = React.useCallback(function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n React.useImperativeHandle(ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/React.createElement(TransitionGroup, {\n component: null,\n exit: true\n }, ripples));\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/React.memo(TouchRipple));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport clsx from 'clsx';\nimport { elementTypeAcceptingRef, refType } from '@material-ui/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport TouchRipple from './TouchRipple';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native <a /> element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = _objectWithoutProperties(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = React.useRef(null);\n\n function getButtonNode() {\n // #StrictMode ready\n return ReactDOM.findDOMNode(buttonRef.current);\n }\n\n var rippleRef = React.useRef(null);\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n React.useImperativeHandle(action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n React.useEffect(function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return useEventCallback(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = useEventCallback(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = React.useRef(false);\n var handleKeyDown = useEventCallback(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = useEventCallback(function (event) {\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0\n if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {\n keydownRef.current = false;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.pulsate(event);\n });\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {\n onClick(event);\n }\n });\n var ComponentProp = component;\n\n if (ComponentProp === 'button' && other.href) {\n ComponentProp = 'a';\n }\n\n var buttonProps = {};\n\n if (ComponentProp === 'button') {\n buttonProps.type = type;\n buttonProps.disabled = disabled;\n } else {\n if (ComponentProp !== 'a' || !other.href) {\n buttonProps.role = 'button';\n }\n\n buttonProps['aria-disabled'] = disabled;\n }\n\n var handleUserRef = useForkRef(buttonRefProp, ref);\n var handleOwnRef = useForkRef(focusVisibleRef, buttonRef);\n var handleRef = useForkRef(handleUserRef, handleOwnRef);\n\n var _React$useState2 = React.useState(false),\n mountedState = _React$useState2[0],\n setMountedState = _React$useState2[1];\n\n React.useEffect(function () {\n setMountedState(true);\n }, []);\n var enableTouchRipple = mountedState && !disableRipple && !disabled;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(function () {\n if (enableTouchRipple && !rippleRef.current) {\n console.error(['Material-UI: The `component` prop provided to ButtonBase is invalid.', 'Please make sure the children prop is rendered in this custom component.'].join('\\n'));\n }\n }, [enableTouchRipple]);\n }\n\n return /*#__PURE__*/React.createElement(ComponentProp, _extends({\n className: clsx(classes.root, className, focusVisible && [classes.focusVisible, focusVisibleClassName], disabled && classes.disabled),\n onBlur: handleBlur,\n onClick: onClick,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n onMouseDown: handleMouseDown,\n onMouseLeave: handleMouseLeave,\n onMouseUp: handleMouseUp,\n onDragLeave: handleDragLeave,\n onTouchEnd: handleTouchEnd,\n onTouchMove: handleTouchMove,\n onTouchStart: handleTouchStart,\n ref: handleRef,\n tabIndex: disabled ? -1 : tabIndex\n }, buttonProps, other), children, enableTouchRipple ?\n /*#__PURE__*/\n\n /* TouchRipple is only needed client-side, x2 boost on the server. */\n React.createElement(TouchRipple, _extends({\n ref: rippleRef,\n center: centerRipple\n }, TouchRippleProps)) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? ButtonBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: refType,\n\n /**\n * @ignore\n *\n * Use that prop to pass a ref to the native button component.\n * @deprecated Use `ref` instead.\n */\n buttonRef: deprecatedPropType(refType, 'Use `ref` instead.'),\n\n /**\n * If `true`, the ripples will be centered.\n * They won't start at the cursor interaction position.\n */\n centerRipple: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n\n /**\n * If `true`, the base button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If `true`, the touch ripple effect will be disabled.\n */\n disableTouchRipple: PropTypes.bool,\n\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n */\n focusRipple: PropTypes.bool,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * @ignore\n */\n href: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onDragLeave: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseUp: PropTypes.func,\n\n /**\n * @ignore\n */\n onTouchEnd: PropTypes.func,\n\n /**\n * @ignore\n */\n onTouchMove: PropTypes.func,\n\n /**\n * @ignore\n */\n onTouchStart: PropTypes.func,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: PropTypes.object,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButtonBase'\n})(ButtonBase);","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright JS Foundation and other contributors <https://js.foundation/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = isEqual;\n","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.matchesSelector = matchesSelector;\nexports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;\nexports.addEvent = addEvent;\nexports.removeEvent = removeEvent;\nexports.outerHeight = outerHeight;\nexports.outerWidth = outerWidth;\nexports.innerHeight = innerHeight;\nexports.innerWidth = innerWidth;\nexports.offsetXYFromParent = offsetXYFromParent;\nexports.createCSSTransform = createCSSTransform;\nexports.createSVGTransform = createSVGTransform;\nexports.getTranslation = getTranslation;\nexports.getTouch = getTouch;\nexports.getTouchIdentifier = getTouchIdentifier;\nexports.addUserSelectStyles = addUserSelectStyles;\nexports.removeUserSelectStyles = removeUserSelectStyles;\nexports.addClassName = addClassName;\nexports.removeClassName = removeClassName;\n\nvar _shims = require(\"./shims\");\n\nvar _getPrefix = _interopRequireWildcard(require(\"./getPrefix\"));\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar matchesSelectorFunc = '';\n\nfunction matchesSelector(el\n/*: Node*/\n, selector\n/*: string*/\n)\n/*: boolean*/\n{\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {\n // $FlowIgnore: Doesn't think elements are indexable\n return (0, _shims.isFunction)(el[method]);\n });\n } // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n\n\n if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false; // $FlowIgnore: Doesn't think elements are indexable\n\n return el[matchesSelectorFunc](selector);\n} // Works up the tree to the draggable itself attempting to match selector.\n\n\nfunction matchesSelectorAndParentsTo(el\n/*: Node*/\n, selector\n/*: string*/\n, baseNode\n/*: Node*/\n)\n/*: boolean*/\n{\n var node = el;\n\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nfunction addEvent(el\n/*: ?Node*/\n, event\n/*: string*/\n, handler\n/*: Function*/\n, inputOptions\n/*: Object*/\n)\n/*: void*/\n{\n if (!el) return;\n\n var options = _objectSpread({\n capture: true\n }, inputOptions);\n\n if (el.addEventListener) {\n el.addEventListener(event, handler, options);\n } else if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nfunction removeEvent(el\n/*: ?Node*/\n, event\n/*: string*/\n, handler\n/*: Function*/\n, inputOptions\n/*: Object*/\n)\n/*: void*/\n{\n if (!el) return;\n\n var options = _objectSpread({\n capture: true\n }, inputOptions);\n\n if (el.removeEventListener) {\n el.removeEventListener(event, handler, options);\n } else if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nfunction outerHeight(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n var height = node.clientHeight;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += (0, _shims.int)(computedStyle.borderTopWidth);\n height += (0, _shims.int)(computedStyle.borderBottomWidth);\n return height;\n}\n\nfunction outerWidth(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n var width = node.clientWidth;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += (0, _shims.int)(computedStyle.borderLeftWidth);\n width += (0, _shims.int)(computedStyle.borderRightWidth);\n return width;\n}\n\nfunction innerHeight(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n var height = node.clientHeight;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= (0, _shims.int)(computedStyle.paddingTop);\n height -= (0, _shims.int)(computedStyle.paddingBottom);\n return height;\n}\n\nfunction innerWidth(node\n/*: HTMLElement*/\n)\n/*: number*/\n{\n var width = node.clientWidth;\n var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= (0, _shims.int)(computedStyle.paddingLeft);\n width -= (0, _shims.int)(computedStyle.paddingRight);\n return width;\n} // Get from offsetParent\n\n\nfunction offsetXYFromParent(evt\n/*: {clientX: number, clientY: number}*/\n, offsetParent\n/*: HTMLElement*/\n, scale\n/*: number*/\n)\n/*: ControlPosition*/\n{\n var isBody = offsetParent === offsetParent.ownerDocument.body;\n var offsetParentRect = isBody ? {\n left: 0,\n top: 0\n } : offsetParent.getBoundingClientRect();\n var x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;\n var y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;\n return {\n x: x,\n y: y\n };\n}\n\nfunction createCSSTransform(controlPos\n/*: ControlPosition*/\n, positionOffset\n/*: PositionOffsetControlPosition*/\n)\n/*: Object*/\n{\n var translation = getTranslation(controlPos, positionOffset, 'px');\n return _defineProperty({}, (0, _getPrefix.browserPrefixToKey)('transform', _getPrefix.default), translation);\n}\n\nfunction createSVGTransform(controlPos\n/*: ControlPosition*/\n, positionOffset\n/*: PositionOffsetControlPosition*/\n)\n/*: string*/\n{\n var translation = getTranslation(controlPos, positionOffset, '');\n return translation;\n}\n\nfunction getTranslation(_ref2, positionOffset\n/*: PositionOffsetControlPosition*/\n, unitSuffix\n/*: string*/\n)\n/*: string*/\n{\n var x = _ref2.x,\n y = _ref2.y;\n var translation = \"translate(\".concat(x).concat(unitSuffix, \",\").concat(y).concat(unitSuffix, \")\");\n\n if (positionOffset) {\n var defaultX = \"\".concat(typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);\n var defaultY = \"\".concat(typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);\n translation = \"translate(\".concat(defaultX, \", \").concat(defaultY, \")\") + translation;\n }\n\n return translation;\n}\n\nfunction getTouch(e\n/*: MouseTouchEvent*/\n, identifier\n/*: number*/\n)\n/*: ?{clientX: number, clientY: number}*/\n{\n return e.targetTouches && (0, _shims.findInArray)(e.targetTouches, function (t) {\n return identifier === t.identifier;\n }) || e.changedTouches && (0, _shims.findInArray)(e.changedTouches, function (t) {\n return identifier === t.identifier;\n });\n}\n\nfunction getTouchIdentifier(e\n/*: MouseTouchEvent*/\n)\n/*: ?number*/\n{\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n} // User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n// Note we're passing `document` b/c we could be iframed\n\n\nfunction addUserSelectStyles(doc\n/*: ?Document*/\n) {\n if (!doc) return;\n var styleEl = doc.getElementById('react-draggable-style-el');\n\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nfunction removeUserSelectStyles(doc\n/*: ?Document*/\n) {\n if (!doc) return;\n\n try {\n if (doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection'); // $FlowIgnore: IE\n\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n // Remove selection caused by scroll, unless it's a focused input\n // (we use doc.defaultView in case we're in an iframe)\n var selection = (doc.defaultView || window).getSelection();\n\n if (selection && selection.type !== 'Caret') {\n selection.removeAllRanges();\n }\n }\n } catch (e) {// probably IE\n }\n}\n\nfunction addClassName(el\n/*: HTMLElement*/\n, className\n/*: string*/\n) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\")))) {\n el.className += \" \".concat(className);\n }\n }\n}\n\nfunction removeClassName(el\n/*: HTMLElement*/\n, className\n/*: string*/\n) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(\"(?:^|\\\\s)\".concat(className, \"(?!\\\\S)\"), 'g'), '');\n }\n}","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","'use strict';\n\nvar URI = require('uri-js')\n , equal = require('fast-deep-equal')\n , util = require('./util')\n , SchemaObject = require('./schema_obj')\n , traverse = require('json-schema-traverse');\n\nmodule.exports = resolve;\n\nresolve.normalizeId = normalizeId;\nresolve.fullPath = getFullPath;\nresolve.url = resolveUrl;\nresolve.ids = resolveIds;\nresolve.inlineRef = inlineRef;\nresolve.schema = resolveSchema;\n\n/**\n * [resolve and compile the references ($ref)]\n * @this Ajv\n * @param {Function} compile reference to schema compilation funciton (localCompile)\n * @param {Object} root object with information about the root schema for the current schema\n * @param {String} ref reference to resolve\n * @return {Object|Function} schema object (if the schema can be inlined) or validation function\n */\nfunction resolve(compile, root, ref) {\n /* jshint validthis: true */\n var refVal = this._refs[ref];\n if (typeof refVal == 'string') {\n if (this._refs[refVal]) refVal = this._refs[refVal];\n else return resolve.call(this, compile, root, refVal);\n }\n\n refVal = refVal || this._schemas[ref];\n if (refVal instanceof SchemaObject) {\n return inlineRef(refVal.schema, this._opts.inlineRefs)\n ? refVal.schema\n : refVal.validate || this._compile(refVal);\n }\n\n var res = resolveSchema.call(this, root, ref);\n var schema, v, baseId;\n if (res) {\n schema = res.schema;\n root = res.root;\n baseId = res.baseId;\n }\n\n if (schema instanceof SchemaObject) {\n v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId);\n } else if (schema !== undefined) {\n v = inlineRef(schema, this._opts.inlineRefs)\n ? schema\n : compile.call(this, schema, root, undefined, baseId);\n }\n\n return v;\n}\n\n\n/**\n * Resolve schema, its root and baseId\n * @this Ajv\n * @param {Object} root root object with properties schema, refVal, refs\n * @param {String} ref reference to resolve\n * @return {Object} object with properties schema, root, baseId\n */\nfunction resolveSchema(root, ref) {\n /* jshint validthis: true */\n var p = URI.parse(ref)\n , refPath = _getFullPath(p)\n , baseId = getFullPath(this._getId(root.schema));\n if (Object.keys(root.schema).length === 0 || refPath !== baseId) {\n var id = normalizeId(refPath);\n var refVal = this._refs[id];\n if (typeof refVal == 'string') {\n return resolveRecursive.call(this, root, refVal, p);\n } else if (refVal instanceof SchemaObject) {\n if (!refVal.validate) this._compile(refVal);\n root = refVal;\n } else {\n refVal = this._schemas[id];\n if (refVal instanceof SchemaObject) {\n if (!refVal.validate) this._compile(refVal);\n if (id == normalizeId(ref))\n return { schema: refVal, root: root, baseId: baseId };\n root = refVal;\n } else {\n return;\n }\n }\n if (!root.schema) return;\n baseId = getFullPath(this._getId(root.schema));\n }\n return getJsonPointer.call(this, p, baseId, root.schema, root);\n}\n\n\n/* @this Ajv */\nfunction resolveRecursive(root, ref, parsedRef) {\n /* jshint validthis: true */\n var res = resolveSchema.call(this, root, ref);\n if (res) {\n var schema = res.schema;\n var baseId = res.baseId;\n root = res.root;\n var id = this._getId(schema);\n if (id) baseId = resolveUrl(baseId, id);\n return getJsonPointer.call(this, parsedRef, baseId, schema, root);\n }\n}\n\n\nvar PREVENT_SCOPE_CHANGE = util.toHash(['properties', 'patternProperties', 'enum', 'dependencies', 'definitions']);\n/* @this Ajv */\nfunction getJsonPointer(parsedRef, baseId, schema, root) {\n /* jshint validthis: true */\n parsedRef.fragment = parsedRef.fragment || '';\n if (parsedRef.fragment.slice(0,1) != '/') return;\n var parts = parsedRef.fragment.split('/');\n\n for (var i = 1; i < parts.length; i++) {\n var part = parts[i];\n if (part) {\n part = util.unescapeFragment(part);\n schema = schema[part];\n if (schema === undefined) break;\n var id;\n if (!PREVENT_SCOPE_CHANGE[part]) {\n id = this._getId(schema);\n if (id) baseId = resolveUrl(baseId, id);\n if (schema.$ref) {\n var $ref = resolveUrl(baseId, schema.$ref);\n var res = resolveSchema.call(this, root, $ref);\n if (res) {\n schema = res.schema;\n root = res.root;\n baseId = res.baseId;\n }\n }\n }\n }\n }\n if (schema !== undefined && schema !== root.schema)\n return { schema: schema, root: root, baseId: baseId };\n}\n\n\nvar SIMPLE_INLINED = util.toHash([\n 'type', 'format', 'pattern',\n 'maxLength', 'minLength',\n 'maxProperties', 'minProperties',\n 'maxItems', 'minItems',\n 'maximum', 'minimum',\n 'uniqueItems', 'multipleOf',\n 'required', 'enum'\n]);\nfunction inlineRef(schema, limit) {\n if (limit === false) return false;\n if (limit === undefined || limit === true) return checkNoRef(schema);\n else if (limit) return countKeys(schema) <= limit;\n}\n\n\nfunction checkNoRef(schema) {\n var item;\n if (Array.isArray(schema)) {\n for (var i=0; i<schema.length; i++) {\n item = schema[i];\n if (typeof item == 'object' && !checkNoRef(item)) return false;\n }\n } else {\n for (var key in schema) {\n if (key == '$ref') return false;\n item = schema[key];\n if (typeof item == 'object' && !checkNoRef(item)) return false;\n }\n }\n return true;\n}\n\n\nfunction countKeys(schema) {\n var count = 0, item;\n if (Array.isArray(schema)) {\n for (var i=0; i<schema.length; i++) {\n item = schema[i];\n if (typeof item == 'object') count += countKeys(item);\n if (count == Infinity) return Infinity;\n }\n } else {\n for (var key in schema) {\n if (key == '$ref') return Infinity;\n if (SIMPLE_INLINED[key]) {\n count++;\n } else {\n item = schema[key];\n if (typeof item == 'object') count += countKeys(item) + 1;\n if (count == Infinity) return Infinity;\n }\n }\n }\n return count;\n}\n\n\nfunction getFullPath(id, normalize) {\n if (normalize !== false) id = normalizeId(id);\n var p = URI.parse(id);\n return _getFullPath(p);\n}\n\n\nfunction _getFullPath(p) {\n return URI.serialize(p).split('#')[0] + '#';\n}\n\n\nvar TRAILING_SLASH_HASH = /#\\/?$/;\nfunction normalizeId(id) {\n return id ? id.replace(TRAILING_SLASH_HASH, '') : '';\n}\n\n\nfunction resolveUrl(baseId, id) {\n id = normalizeId(id);\n return URI.resolve(baseId, id);\n}\n\n\n/* @this Ajv */\nfunction resolveIds(schema) {\n var schemaId = normalizeId(this._getId(schema));\n var baseIds = {'': schemaId};\n var fullPaths = {'': getFullPath(schemaId, false)};\n var localRefs = {};\n var self = this;\n\n traverse(schema, {allKeys: true}, function(sch, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (jsonPtr === '') return;\n var id = self._getId(sch);\n var baseId = baseIds[parentJsonPtr];\n var fullPath = fullPaths[parentJsonPtr] + '/' + parentKeyword;\n if (keyIndex !== undefined)\n fullPath += '/' + (typeof keyIndex == 'number' ? keyIndex : util.escapeFragment(keyIndex));\n\n if (typeof id == 'string') {\n id = baseId = normalizeId(baseId ? URI.resolve(baseId, id) : id);\n\n var refVal = self._refs[id];\n if (typeof refVal == 'string') refVal = self._refs[refVal];\n if (refVal && refVal.schema) {\n if (!equal(sch, refVal.schema))\n throw new Error('id \"' + id + '\" resolves to more than one schema');\n } else if (id != normalizeId(fullPath)) {\n if (id[0] == '#') {\n if (localRefs[id] && !equal(sch, localRefs[id]))\n throw new Error('id \"' + id + '\" resolves to more than one schema');\n localRefs[id] = sch;\n } else {\n self._refs[id] = fullPath;\n }\n }\n }\n baseIds[jsonPtr] = baseId;\n fullPaths[jsonPtr] = fullPath;\n });\n\n return localRefs;\n}\n","'use strict';\n\nvar resolve = require('./resolve');\n\nmodule.exports = {\n Validation: errorSubclass(ValidationError),\n MissingRef: errorSubclass(MissingRefError)\n};\n\n\nfunction ValidationError(errors) {\n this.message = 'validation failed';\n this.errors = errors;\n this.ajv = this.validation = true;\n}\n\n\nMissingRefError.message = function (baseId, ref) {\n return 'can\\'t resolve reference ' + ref + ' from id ' + baseId;\n};\n\n\nfunction MissingRefError(baseId, ref, message) {\n this.message = message || MissingRefError.message(baseId, ref);\n this.missingRef = resolve.url(baseId, ref);\n this.missingSchema = resolve.normalizeId(resolve.fullPath(this.missingRef));\n}\n\n\nfunction errorSubclass(Subclass) {\n Subclass.prototype = Object.create(Error.prototype);\n Subclass.prototype.constructor = Subclass;\n return Subclass;\n}\n","import {concatenateArrayBuffers} from '../binary-utils/array-buffer-utils';\n\n// GENERAL UTILITIES\n\n/**\n * Iterate over async iterator, without resetting iterator if end is not reached\n * - forEach intentionally does not reset iterator if exiting loop prematurely\n * so that iteration can continue in a second loop\n * - It is recommended to use a standard for-await as last loop to ensure\n * iterator gets properly reset\n *\n * TODO - optimize using sync iteration if argument is an Iterable?\n *\n * @param iterator\n * @param visitor\n */\nexport async function forEach(iterator, visitor) {\n // eslint-disable-next-line\n while (true) {\n const {done, value} = await iterator.next();\n if (done) {\n iterator.return();\n return;\n }\n const cancel = visitor(value);\n if (cancel) {\n return;\n }\n }\n}\n\n// Breaking big data into iterable chunks, concatenating iterable chunks into big data objects\n\n/**\n * Concatenates all data chunks yielded by an (async) iterator\n * This function can e.g. be used to enable atomic parsers to work on (async) iterator inputs\n */\n\nexport async function concatenateArrayBuffersAsync(\n asyncIterator: AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>\n): Promise<ArrayBuffer> {\n const arrayBuffers: ArrayBuffer[] = [];\n for await (const chunk of asyncIterator) {\n arrayBuffers.push(chunk);\n }\n return concatenateArrayBuffers(...arrayBuffers);\n}\n\nexport async function concatenateStringsAsync(\n asyncIterator: AsyncIterable<string> | Iterable<string>\n): Promise<string> {\n const strings: string[] = [];\n for await (const chunk of asyncIterator) {\n strings.push(chunk);\n }\n return strings.join('');\n}\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","export default function requirePropFactory(componentNameInError) {\n if (process.env.NODE_ENV === 'production') {\n return function () {\n return null;\n };\n }\n\n var requireProp = function requireProp(requiredProp) {\n return function (props, propName, componentName, location, propFullName) {\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameInError, \"` must be used on `\").concat(requiredProp, \"`.\"));\n }\n\n return null;\n };\n };\n\n return requireProp;\n}","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` is not supported. Please remove it.\"));\n }\n\n return null;\n}","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2019 Denis Pushkarev (zloirock.ru)'\n});\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","exports.f = Object.getOwnPropertySymbols;\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","module.exports = {};\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","exports.f = require('./_wks');\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","var baseForOwn = require('./_baseForOwn'),\n castFunction = require('./_castFunction');\n\n/**\n * Iterates over own enumerable string keyed properties of an object and\n * invokes `iteratee` for each property. The iteratee is invoked with three\n * arguments: (value, key, object). Iteratee functions may exit iteration\n * early by explicitly returning `false`.\n *\n * @static\n * @memberOf _\n * @since 0.3.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns `object`.\n * @see _.forOwnRight\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.forOwn(new Foo, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forOwn(object, iteratee) {\n return object && baseForOwn(object, castFunction(iteratee));\n}\n\nmodule.exports = forOwn;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Checkboard = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _checkboard = require('../../helpers/checkboard');\n\nvar checkboard = _interopRequireWildcard(_checkboard);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Checkboard = exports.Checkboard = function Checkboard(_ref) {\n var white = _ref.white,\n grey = _ref.grey,\n size = _ref.size,\n renderers = _ref.renderers,\n borderRadius = _ref.borderRadius,\n boxShadow = _ref.boxShadow;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n grid: {\n borderRadius: borderRadius,\n boxShadow: boxShadow,\n absolute: '0px 0px 0px 0px',\n background: 'url(' + checkboard.get(white, grey, size, renderers.canvas) + ') center left'\n }\n }\n });\n\n return _react2.default.createElement('div', { style: styles.grid });\n};\n\nCheckboard.defaultProps = {\n size: 8,\n white: 'transparent',\n grey: 'rgba(0,0,0,.08)',\n renderers: {}\n};\n\nexports.default = Checkboard;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar invariant_1 = require(\"@turf/invariant\");\n/**\n * Returns true if a point is on a line. Accepts a optional parameter to ignore the\n * start and end vertices of the linestring.\n *\n * @name booleanPointOnLine\n * @param {Coord} pt GeoJSON Point\n * @param {Feature<LineString>} line GeoJSON LineString\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.ignoreEndVertices=false] whether to ignore the start and end vertices.\n * @returns {boolean} true/false\n * @example\n * var pt = turf.point([0, 0]);\n * var line = turf.lineString([[-1, -1],[1, 1],[1.5, 2.2]]);\n * var isPointOnLine = turf.booleanPointOnLine(pt, line);\n * //=true\n */\nfunction booleanPointOnLine(pt, line, options) {\n if (options === void 0) { options = {}; }\n // Normalize inputs\n var ptCoords = invariant_1.getCoord(pt);\n var lineCoords = invariant_1.getCoords(line);\n // Main\n for (var i = 0; i < lineCoords.length - 1; i++) {\n var ignoreBoundary = false;\n if (options.ignoreEndVertices) {\n if (i === 0) {\n ignoreBoundary = \"start\";\n }\n if (i === lineCoords.length - 2) {\n ignoreBoundary = \"end\";\n }\n if (i === 0 && i + 1 === lineCoords.length - 1) {\n ignoreBoundary = \"both\";\n }\n }\n if (isPointOnLineSegment(lineCoords[i], lineCoords[i + 1], ptCoords, ignoreBoundary)) {\n return true;\n }\n }\n return false;\n}\n// See http://stackoverflow.com/a/4833823/1979085\n/**\n * @private\n * @param {Position} lineSegmentStart coord pair of start of line\n * @param {Position} lineSegmentEnd coord pair of end of line\n * @param {Position} pt coord pair of point to check\n * @param {boolean|string} excludeBoundary whether the point is allowed to fall on the line ends.\n * If true which end to ignore.\n * @returns {boolean} true/false\n */\nfunction isPointOnLineSegment(lineSegmentStart, lineSegmentEnd, pt, excludeBoundary) {\n var x = pt[0];\n var y = pt[1];\n var x1 = lineSegmentStart[0];\n var y1 = lineSegmentStart[1];\n var x2 = lineSegmentEnd[0];\n var y2 = lineSegmentEnd[1];\n var dxc = pt[0] - x1;\n var dyc = pt[1] - y1;\n var dxl = x2 - x1;\n var dyl = y2 - y1;\n var cross = dxc * dyl - dyc * dxl;\n if (cross !== 0) {\n return false;\n }\n if (!excludeBoundary) {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0 ? x1 <= x && x <= x2 : x2 <= x && x <= x1;\n }\n return dyl > 0 ? y1 <= y && y <= y2 : y2 <= y && y <= y1;\n }\n else if (excludeBoundary === \"start\") {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0 ? x1 < x && x <= x2 : x2 <= x && x < x1;\n }\n return dyl > 0 ? y1 < y && y <= y2 : y2 <= y && y < y1;\n }\n else if (excludeBoundary === \"end\") {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0 ? x1 <= x && x < x2 : x2 < x && x <= x1;\n }\n return dyl > 0 ? y1 <= y && y < y2 : y2 < y && y <= y1;\n }\n else if (excludeBoundary === \"both\") {\n if (Math.abs(dxl) >= Math.abs(dyl)) {\n return dxl > 0 ? x1 < x && x < x2 : x2 < x && x < x1;\n }\n return dyl > 0 ? y1 < y && y < y2 : y2 < y && y < y1;\n }\n return false;\n}\nexports.default = booleanPointOnLine;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar bearing_1 = require(\"@turf/bearing\");\nvar distance_1 = require(\"@turf/distance\");\nvar destination_1 = require(\"@turf/destination\");\nvar line_intersect_1 = require(\"@turf/line-intersect\");\nvar meta_1 = require(\"@turf/meta\");\nvar helpers_1 = require(\"@turf/helpers\");\nvar invariant_1 = require(\"@turf/invariant\");\n/**\n * Takes a {@link Point} and a {@link LineString} and calculates the closest Point on the (Multi)LineString.\n *\n * @name nearestPointOnLine\n * @param {Geometry|Feature<LineString|MultiLineString>} lines lines to snap to\n * @param {Geometry|Feature<Point>|number[]} pt point to snap from\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {Feature<Point>} closest point on the `line` to `point`. The properties object will contain three values: `index`: closest point was found on nth line part, `dist`: distance between pt and the closest point, `location`: distance along the line between start and the closest point.\n * @example\n * var line = turf.lineString([\n * [-77.031669, 38.878605],\n * [-77.029609, 38.881946],\n * [-77.020339, 38.884084],\n * [-77.025661, 38.885821],\n * [-77.021884, 38.889563],\n * [-77.019824, 38.892368]\n * ]);\n * var pt = turf.point([-77.037076, 38.884017]);\n *\n * var snapped = turf.nearestPointOnLine(line, pt, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [line, pt, snapped];\n * snapped.properties['marker-color'] = '#00f';\n */\nfunction nearestPointOnLine(lines, pt, options) {\n if (options === void 0) { options = {}; }\n var closestPt = helpers_1.point([Infinity, Infinity], {\n dist: Infinity\n });\n var length = 0.0;\n meta_1.flattenEach(lines, function (line) {\n var coords = invariant_1.getCoords(line);\n for (var i = 0; i < coords.length - 1; i++) {\n //start\n var start = helpers_1.point(coords[i]);\n start.properties.dist = distance_1.default(pt, start, options);\n //stop\n var stop_1 = helpers_1.point(coords[i + 1]);\n stop_1.properties.dist = distance_1.default(pt, stop_1, options);\n // sectionLength\n var sectionLength = distance_1.default(start, stop_1, options);\n //perpendicular\n var heightDistance = Math.max(start.properties.dist, stop_1.properties.dist);\n var direction = bearing_1.default(start, stop_1);\n var perpendicularPt1 = destination_1.default(pt, heightDistance, direction + 90, options);\n var perpendicularPt2 = destination_1.default(pt, heightDistance, direction - 90, options);\n var intersect = line_intersect_1.default(helpers_1.lineString([perpendicularPt1.geometry.coordinates, perpendicularPt2.geometry.coordinates]), helpers_1.lineString([start.geometry.coordinates, stop_1.geometry.coordinates]));\n var intersectPt = null;\n if (intersect.features.length > 0) {\n intersectPt = intersect.features[0];\n intersectPt.properties.dist = distance_1.default(pt, intersectPt, options);\n intersectPt.properties.location = length + distance_1.default(start, intersectPt, options);\n }\n if (start.properties.dist < closestPt.properties.dist) {\n closestPt = start;\n closestPt.properties.index = i;\n closestPt.properties.location = length;\n }\n if (stop_1.properties.dist < closestPt.properties.dist) {\n closestPt = stop_1;\n closestPt.properties.index = i + 1;\n closestPt.properties.location = length + sectionLength;\n }\n if (intersectPt && intersectPt.properties.dist < closestPt.properties.dist) {\n closestPt = intersectPt;\n closestPt.properties.index = i;\n }\n // update length\n length += sectionLength;\n }\n });\n return closestPt;\n}\nexports.default = nearestPointOnLine;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar arePropertyDescriptorsSupported = function () {\n\tvar obj = {};\n\ttry {\n\t\torigDefineProperty(obj, 'x', { enumerable: false, value: obj });\n\t\t// eslint-disable-next-line no-unused-vars, no-restricted-syntax\n\t\tfor (var _ in obj) { // jscs:ignore disallowUnusedVariables\n\t\t\treturn false;\n\t\t}\n\t\treturn obj.x === obj;\n\t} catch (e) { /* this is IE 8. */\n\t\treturn false;\n\t}\n};\nvar supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value;\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","/* eslint-env browser */\n\nimport { GeoJsonLayer, ScatterplotLayer, IconLayer, TextLayer } from '@deck.gl/layers';\n\nimport {\n ViewMode,\n ModifyMode,\n TranslateMode,\n ScaleMode,\n RotateMode,\n DuplicateMode,\n SplitPolygonMode,\n ExtrudeMode,\n ElevationMode,\n DrawPointMode,\n DrawLineStringMode,\n DrawPolygonMode,\n DrawRectangleMode,\n DrawSquareFromCenterMode,\n DrawCircleFromCenterMode,\n DrawCircleByDiameterMode,\n DrawEllipseByBoundingBoxMode,\n DrawRectangleUsingThreePointsMode,\n DrawEllipseUsingThreePointsMode,\n Draw90DegreePolygonMode,\n DrawPolygonByDraggingMode,\n SnappableMode,\n TransformMode,\n EditAction,\n ClickEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n PointerMoveEvent,\n GeoJsonEditModeType,\n GeoJsonEditModeConstructor,\n FeatureCollection,\n} from '@nebula.gl/edit-modes';\n\nimport EditableLayer from './editable-layer';\n\nconst DEFAULT_LINE_COLOR = [0x0, 0x0, 0x0, 0x99];\nconst DEFAULT_FILL_COLOR = [0x0, 0x0, 0x0, 0x90];\nconst DEFAULT_SELECTED_LINE_COLOR = [0x0, 0x0, 0x0, 0xff];\nconst DEFAULT_SELECTED_FILL_COLOR = [0x0, 0x0, 0x90, 0x90];\nconst DEFAULT_TENTATIVE_LINE_COLOR = [0x90, 0x90, 0x90, 0xff];\nconst DEFAULT_TENTATIVE_FILL_COLOR = [0x90, 0x90, 0x90, 0x90];\nconst DEFAULT_EDITING_EXISTING_POINT_COLOR = [0xc0, 0x0, 0x0, 0xff];\nconst DEFAULT_EDITING_INTERMEDIATE_POINT_COLOR = [0x0, 0x0, 0x0, 0x80];\nconst DEFAULT_EDITING_SNAP_POINT_COLOR = [0x7c, 0x00, 0xc0, 0xff];\nconst DEFAULT_EDITING_POINT_OUTLINE_COLOR = [0xff, 0xff, 0xff, 0xff];\nconst DEFAULT_EDITING_EXISTING_POINT_RADIUS = 5;\nconst DEFAULT_EDITING_INTERMEDIATE_POINT_RADIUS = 3;\nconst DEFAULT_EDITING_SNAP_POINT_RADIUS = 7;\n\nconst DEFAULT_EDIT_MODE = DrawPolygonMode;\n\nfunction guideAccessor(accessor) {\n if (!accessor || typeof accessor !== 'function') {\n return accessor;\n }\n return (guideMaybeWrapped) => accessor(unwrapGuide(guideMaybeWrapped));\n}\n\n// The object handed to us from deck.gl is different depending on the version of deck.gl used, unwrap as necessary\nfunction unwrapGuide(guideMaybeWrapped) {\n if (guideMaybeWrapped.__source) {\n return guideMaybeWrapped.__source.object;\n } else if (guideMaybeWrapped.sourceFeature) {\n return guideMaybeWrapped.sourceFeature.feature;\n }\n // It is not wrapped, return as is\n return guideMaybeWrapped;\n}\n\nfunction getEditHandleColor(handle) {\n switch (handle.properties.editHandleType) {\n case 'existing':\n return DEFAULT_EDITING_EXISTING_POINT_COLOR;\n case 'snap-source':\n return DEFAULT_EDITING_SNAP_POINT_COLOR;\n case 'intermediate':\n default:\n return DEFAULT_EDITING_INTERMEDIATE_POINT_COLOR;\n }\n}\n\nfunction getEditHandleOutlineColor(handle) {\n return DEFAULT_EDITING_POINT_OUTLINE_COLOR;\n}\n\nfunction getEditHandleRadius(handle) {\n switch (handle.properties.editHandleType) {\n case 'existing':\n return DEFAULT_EDITING_EXISTING_POINT_RADIUS;\n case 'snap':\n return DEFAULT_EDITING_SNAP_POINT_RADIUS;\n case 'intermediate':\n default:\n return DEFAULT_EDITING_INTERMEDIATE_POINT_RADIUS;\n }\n}\n\nconst defaultProps = {\n mode: DEFAULT_EDIT_MODE,\n\n // Edit and interaction events\n onEdit: () => {},\n\n pickable: true,\n pickingRadius: 10,\n pickingDepth: 5,\n fp64: false,\n filled: true,\n stroked: true,\n lineWidthScale: 1,\n lineWidthMinPixels: 1,\n lineWidthMaxPixels: Number.MAX_SAFE_INTEGER,\n lineWidthUnits: 'pixels',\n lineJointRounded: false,\n lineMiterLimit: 4,\n pointRadiusScale: 1,\n pointRadiusMinPixels: 2,\n pointRadiusMaxPixels: Number.MAX_SAFE_INTEGER,\n getLineColor: (feature, isSelected, mode) =>\n isSelected ? DEFAULT_SELECTED_LINE_COLOR : DEFAULT_LINE_COLOR,\n getFillColor: (feature, isSelected, mode) =>\n isSelected ? DEFAULT_SELECTED_FILL_COLOR : DEFAULT_FILL_COLOR,\n getRadius: (f) =>\n (f && f.properties && f.properties.radius) || (f && f.properties && f.properties.size) || 1,\n getLineWidth: (f) => (f && f.properties && f.properties.lineWidth) || 3,\n\n // Tentative feature rendering\n getTentativeLineColor: (f) => DEFAULT_TENTATIVE_LINE_COLOR,\n getTentativeFillColor: (f) => DEFAULT_TENTATIVE_FILL_COLOR,\n getTentativeLineWidth: (f) => (f && f.properties && f.properties.lineWidth) || 3,\n\n editHandleType: 'point',\n\n // point handles\n editHandlePointRadiusScale: 1,\n editHandlePointOutline: true,\n editHandlePointStrokeWidth: 2,\n editHandlePointRadiusMinPixels: 4,\n editHandlePointRadiusMaxPixels: 8,\n getEditHandlePointColor: getEditHandleColor,\n getEditHandlePointOutlineColor: getEditHandleOutlineColor,\n getEditHandlePointRadius: getEditHandleRadius,\n\n // icon handles\n editHandleIconAtlas: null,\n editHandleIconMapping: null,\n editHandleIconSizeScale: 1,\n getEditHandleIcon: (handle) => handle.properties.editHandleType,\n getEditHandleIconSize: 10,\n getEditHandleIconColor: getEditHandleColor,\n getEditHandleIconAngle: 0,\n\n // misc\n billboard: true,\n};\n\n// Mapping of mode name to mode class (for legacy purposes)\nconst modeNameMapping = {\n view: ViewMode,\n\n // Alter modes\n modify: ModifyMode,\n translate: new SnappableMode(new TranslateMode()),\n\n transform: new SnappableMode(new TransformMode()),\n scale: ScaleMode,\n rotate: RotateMode,\n duplicate: DuplicateMode,\n split: SplitPolygonMode,\n extrude: ExtrudeMode,\n elevation: ElevationMode,\n\n // Draw modes\n drawPoint: DrawPointMode,\n drawLineString: DrawLineStringMode,\n drawPolygon: DrawPolygonMode,\n drawRectangle: DrawRectangleMode,\n drawSquareFromCenter: DrawSquareFromCenterMode,\n drawCircleFromCenter: DrawCircleFromCenterMode,\n drawCircleByBoundingBox: DrawCircleByDiameterMode,\n drawEllipseByBoundingBox: DrawEllipseByBoundingBoxMode,\n drawRectangleUsing3Points: DrawRectangleUsingThreePointsMode,\n drawEllipseUsing3Points: DrawEllipseUsingThreePointsMode,\n draw90DegreePolygon: Draw90DegreePolygonMode,\n drawPolygonByDragging: DrawPolygonByDraggingMode,\n};\n\ntype Props = {\n mode: string | GeoJsonEditModeConstructor | GeoJsonEditModeType;\n onEdit: (arg0: EditAction<FeatureCollection>) => void;\n // TODO: type the rest\n\n [key: string]: any;\n};\n\n// type State = {\n// mode: GeoJsonEditMode,\n// tentativeFeature: ?Feature,\n// editHandles: any[],\n// selectedFeatures: Feature[]\n// };\n\nexport default class EditableGeoJsonLayer extends EditableLayer {\n static layerName = 'EditableGeoJsonLayer';\n static defaultProps = defaultProps;\n // props: Props;\n\n // setState: ($Shape<State>) => void;\n renderLayers() {\n const subLayerProps = this.getSubLayerProps({\n id: 'geojson',\n\n // Proxy most GeoJsonLayer props as-is\n data: this.props.data,\n fp64: this.props.fp64,\n filled: this.props.filled,\n stroked: this.props.stroked,\n lineWidthScale: this.props.lineWidthScale,\n lineWidthMinPixels: this.props.lineWidthMinPixels,\n lineWidthMaxPixels: this.props.lineWidthMaxPixels,\n lineWidthUnits: this.props.lineWidthUnits,\n lineJointRounded: this.props.lineJointRounded,\n lineMiterLimit: this.props.lineMiterLimit,\n pointRadiusScale: this.props.pointRadiusScale,\n pointRadiusMinPixels: this.props.pointRadiusMinPixels,\n pointRadiusMaxPixels: this.props.pointRadiusMaxPixels,\n getLineColor: this.selectionAwareAccessor(this.props.getLineColor),\n getFillColor: this.selectionAwareAccessor(this.props.getFillColor),\n getRadius: this.selectionAwareAccessor(this.props.getRadius),\n getLineWidth: this.selectionAwareAccessor(this.props.getLineWidth),\n\n _subLayerProps: {\n 'line-strings': {\n billboard: this.props.billboard,\n },\n 'polygons-stroke': {\n billboard: this.props.billboard,\n },\n },\n\n updateTriggers: {\n getLineColor: [this.props.selectedFeatureIndexes, this.props.mode],\n getFillColor: [this.props.selectedFeatureIndexes, this.props.mode],\n getRadius: [this.props.selectedFeatureIndexes, this.props.mode],\n getLineWidth: [this.props.selectedFeatureIndexes, this.props.mode],\n },\n });\n\n let layers: any = [new GeoJsonLayer(subLayerProps)];\n\n layers = layers.concat(this.createGuidesLayers(), this.createTooltipsLayers());\n\n return layers;\n }\n\n initializeState() {\n super.initializeState();\n\n this.setState({\n selectedFeatures: [],\n editHandles: [],\n });\n }\n\n // TODO: is this the best way to properly update state from an outside event handler?\n shouldUpdateState(opts: any) {\n // console.log(\n // 'shouldUpdateState',\n // opts.changeFlags.propsOrDataChanged,\n // opts.changeFlags.stateChanged\n // );\n return super.shouldUpdateState(opts) || opts.changeFlags.stateChanged;\n }\n\n updateState({\n props,\n oldProps,\n changeFlags,\n }: {\n props: Props;\n oldProps: Props;\n changeFlags: any;\n }) {\n // @ts-ignore\n super.updateState({ oldProps, props, changeFlags });\n\n if (changeFlags.propsOrDataChanged) {\n const modePropChanged = Object.keys(oldProps).length === 0 || props.mode !== oldProps.mode;\n if (modePropChanged) {\n let mode;\n if (typeof props.mode === 'function') {\n // They passed a constructor/class, so new it up\n const ModeConstructor = props.mode;\n mode = new ModeConstructor();\n } else if (typeof props.mode === 'string') {\n // Lookup the mode based on its name (for backwards compatibility)\n mode = modeNameMapping[props.mode];\n // eslint-disable-next-line no-console\n console.warn(\n \"Deprecated use of passing `mode` as a string. Pass the mode's class constructor instead.\"\n );\n } else {\n // Should be an instance of EditMode in this case\n mode = props.mode;\n }\n\n if (!mode) {\n console.warn(`No mode configured for ${String(props.mode)}`); // eslint-disable-line no-console,no-undef\n // Use default mode\n mode = new DEFAULT_EDIT_MODE();\n }\n\n if (mode !== this.state.mode) {\n this.setState({ mode, cursor: null });\n }\n }\n }\n\n let selectedFeatures = [];\n if (Array.isArray(props.selectedFeatureIndexes)) {\n // TODO: needs improved testing, i.e. checking for duplicates, NaNs, out of range numbers, ...\n selectedFeatures = props.selectedFeatureIndexes.map((elem) => props.data.features[elem]);\n }\n\n this.setState({ selectedFeatures });\n }\n\n getModeProps(props: Props) {\n return {\n modeConfig: props.modeConfig,\n data: props.data,\n selectedIndexes: props.selectedFeatureIndexes,\n lastPointerMoveEvent: this.state.lastPointerMoveEvent,\n cursor: this.state.cursor,\n onEdit: (editAction: EditAction<FeatureCollection>) => {\n // Force a re-render\n // This supports double-click where we need to ensure that there's a re-render between the two clicks\n // even though the data wasn't changed, just the internal tentative feature.\n this.setNeedsUpdate();\n props.onEdit(editAction);\n },\n onUpdateCursor: (cursor: string | null | undefined) => {\n this.setState({ cursor });\n },\n };\n }\n\n selectionAwareAccessor(accessor: any) {\n if (typeof accessor !== 'function') {\n return accessor;\n }\n return (feature: Record<string, any>) =>\n accessor(feature, this.isFeatureSelected(feature), this.props.mode);\n }\n\n isFeatureSelected(feature: Record<string, any>) {\n if (!this.props.data || !this.props.selectedFeatureIndexes) {\n return false;\n }\n if (!this.props.selectedFeatureIndexes.length) {\n return false;\n }\n const featureIndex = this.props.data.features.indexOf(feature);\n return this.props.selectedFeatureIndexes.includes(featureIndex);\n }\n\n getPickingInfo({ info, sourceLayer }: Record<string, any>) {\n if (sourceLayer.id.endsWith('guides')) {\n // If user is picking an editing handle, add additional data to the info\n info.isGuide = true;\n }\n\n return info;\n }\n\n createGuidesLayers() {\n const mode = this.getActiveMode();\n const guides: FeatureCollection = mode.getGuides(this.getModeProps(this.props));\n\n if (!guides || !guides.features.length) {\n return [];\n }\n\n let pointLayerProps;\n if (this.props.editHandleType === 'icon') {\n pointLayerProps = {\n type: IconLayer,\n iconAtlas: this.props.editHandleIconAtlas,\n iconMapping: this.props.editHandleIconMapping,\n sizeScale: this.props.editHandleIconSizeScale,\n getIcon: guideAccessor(this.props.getEditHandleIcon),\n getSize: guideAccessor(this.props.getEditHandleIconSize),\n getColor: guideAccessor(this.props.getEditHandleIconColor),\n getAngle: guideAccessor(this.props.getEditHandleIconAngle),\n };\n } else {\n pointLayerProps = {\n type: ScatterplotLayer,\n radiusScale: this.props.editHandlePointRadiusScale,\n stroked: this.props.editHandlePointOutline,\n getLineWidth: this.props.editHandlePointStrokeWidth,\n radiusMinPixels: this.props.editHandlePointRadiusMinPixels,\n radiusMaxPixels: this.props.editHandlePointRadiusMaxPixels,\n getRadius: guideAccessor(this.props.getEditHandlePointRadius),\n getFillColor: guideAccessor(this.props.getEditHandlePointColor),\n getLineColor: guideAccessor(this.props.getEditHandlePointOutlineColor),\n };\n }\n\n const layer = new GeoJsonLayer(\n this.getSubLayerProps({\n id: `guides`,\n data: guides,\n fp64: this.props.fp64,\n _subLayerProps: {\n points: pointLayerProps,\n },\n lineWidthScale: this.props.lineWidthScale,\n lineWidthMinPixels: this.props.lineWidthMinPixels,\n lineWidthMaxPixels: this.props.lineWidthMaxPixels,\n lineWidthUnits: this.props.lineWidthUnits,\n lineJointRounded: this.props.lineJointRounded,\n lineMiterLimit: this.props.lineMiterLimit,\n getLineColor: guideAccessor(this.props.getTentativeLineColor),\n getLineWidth: guideAccessor(this.props.getTentativeLineWidth),\n getFillColor: guideAccessor(this.props.getTentativeFillColor),\n })\n );\n\n return [layer];\n }\n\n createTooltipsLayers() {\n const mode = this.getActiveMode();\n const tooltips = mode.getTooltips(this.getModeProps(this.props));\n\n const layer = new TextLayer(\n this.getSubLayerProps({\n id: `tooltips`,\n data: tooltips,\n })\n );\n\n return [layer];\n }\n\n onLayerClick(event: ClickEvent) {\n this.getActiveMode().handleClick(event, this.getModeProps(this.props));\n }\n\n onLayerKeyUp(event: KeyboardEvent) {\n this.getActiveMode().handleKeyUp(event, this.getModeProps(this.props));\n }\n\n onStartDragging(event: StartDraggingEvent) {\n this.getActiveMode().handleStartDragging(event, this.getModeProps(this.props));\n }\n\n onDragging(event: DraggingEvent) {\n this.getActiveMode().handleDragging(event, this.getModeProps(this.props));\n }\n\n onStopDragging(event: StopDraggingEvent) {\n this.getActiveMode().handleStopDragging(event, this.getModeProps(this.props));\n }\n\n onPointerMove(event: PointerMoveEvent) {\n this.setState({ lastPointerMoveEvent: event });\n this.getActiveMode().handlePointerMove(event, this.getModeProps(this.props));\n }\n\n getCursor({ isDragging }: { isDragging: boolean }) {\n if (this.state === null) {\n // Layer in 'Awaiting state'\n return null;\n }\n\n let { cursor } = this.state;\n if (!cursor) {\n // default cursor\n cursor = isDragging ? 'grabbing' : 'grab';\n }\n return cursor;\n }\n\n getActiveMode(): GeoJsonEditModeType {\n return this.state.mode;\n }\n}\n","import { point, lineString as toLineString } from '@turf/helpers';\nimport {\n recursivelyTraverseNestedArrays,\n nearestPointOnProjectedLine,\n nearestPointOnLine,\n getEditHandlesForGeometry,\n getPickedEditHandles,\n getPickedEditHandle,\n getPickedExistingEditHandle,\n getPickedIntermediateEditHandle,\n NearestPointType,\n} from '../utils';\nimport { LineString, Point, FeatureCollection, FeatureOf } from '../geojson-types';\nimport {\n ModeProps,\n ClickEvent,\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n Viewport,\n GuideFeatureCollection,\n} from '../types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class ModifyMode extends GeoJsonEditMode {\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const handles = [];\n\n const { data, lastPointerMoveEvent } = props;\n const { features } = data;\n const picks = lastPointerMoveEvent && lastPointerMoveEvent.picks;\n const mapCoords = lastPointerMoveEvent && lastPointerMoveEvent.mapCoords;\n\n for (const index of props.selectedIndexes) {\n if (index < features.length) {\n const { geometry } = features[index];\n handles.push(...getEditHandlesForGeometry(geometry, index));\n } else {\n console.warn(`selectedFeatureIndexes out of range ${index}`); // eslint-disable-line no-console,no-undef\n }\n }\n\n // intermediate edit handle\n if (picks && picks.length && mapCoords) {\n const existingEditHandle = getPickedExistingEditHandle(picks);\n // don't show intermediate point when too close to an existing edit handle\n const featureAsPick = !existingEditHandle && picks.find((pick) => !pick.isGuide);\n\n // is the feature in the pick selected\n if (\n featureAsPick &&\n !featureAsPick.object.geometry.type.includes('Point') &&\n props.selectedIndexes.includes(featureAsPick.index)\n ) {\n let intermediatePoint: NearestPointType | null | undefined = null;\n let positionIndexPrefix = [];\n const referencePoint = point(mapCoords);\n // process all lines of the (single) feature\n recursivelyTraverseNestedArrays(\n featureAsPick.object.geometry.coordinates,\n [],\n (lineString, prefix) => {\n const lineStringFeature = toLineString(lineString);\n const candidateIntermediatePoint = this.getNearestPoint(\n // @ts-ignore\n lineStringFeature,\n referencePoint,\n props.modeConfig && props.modeConfig.viewport\n );\n if (\n !intermediatePoint ||\n candidateIntermediatePoint.properties.dist < intermediatePoint.properties.dist\n ) {\n intermediatePoint = candidateIntermediatePoint;\n positionIndexPrefix = prefix;\n }\n }\n );\n // tack on the lone intermediate point to the set of handles\n if (intermediatePoint) {\n const {\n geometry: { coordinates: position },\n properties: { index },\n } = intermediatePoint;\n handles.push({\n type: 'Feature',\n properties: {\n guideType: 'editHandle',\n editHandleType: 'intermediate',\n featureIndex: featureAsPick.index,\n positionIndexes: [...positionIndexPrefix, index + 1],\n },\n geometry: {\n type: 'Point',\n coordinates: position,\n },\n });\n }\n }\n }\n\n return {\n type: 'FeatureCollection',\n features: handles,\n };\n }\n\n // turf.js does not support elevation for nearestPointOnLine\n getNearestPoint(\n line: FeatureOf<LineString>,\n inPoint: FeatureOf<Point>,\n viewport: Viewport | null | undefined\n ): NearestPointType {\n const { coordinates } = line.geometry;\n if (coordinates.some((coord) => coord.length > 2)) {\n if (viewport) {\n // This line has elevation, we need to use alternative algorithm\n return nearestPointOnProjectedLine(line, inPoint, viewport);\n }\n // eslint-disable-next-line no-console,no-undef\n console.log(\n 'Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.'\n );\n }\n return nearestPointOnLine(line, inPoint, viewport);\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const pickedExistingHandle = getPickedExistingEditHandle(event.picks);\n const pickedIntermediateHandle = getPickedIntermediateEditHandle(event.picks);\n\n if (pickedExistingHandle) {\n const { featureIndex, positionIndexes } = pickedExistingHandle.properties;\n\n let updatedData;\n try {\n updatedData = new ImmutableFeatureCollection(props.data)\n .removePosition(featureIndex, positionIndexes)\n .getObject();\n } catch (ignored) {\n // This happens if user attempts to remove the last point\n }\n\n if (updatedData) {\n props.onEdit({\n updatedData,\n editType: 'removePosition',\n editContext: {\n featureIndexes: [featureIndex],\n positionIndexes,\n position: pickedExistingHandle.geometry.coordinates,\n },\n });\n }\n } else if (pickedIntermediateHandle) {\n const { featureIndex, positionIndexes } = pickedIntermediateHandle.properties;\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .addPosition(featureIndex, positionIndexes, pickedIntermediateHandle.geometry.coordinates)\n .getObject();\n\n if (updatedData) {\n props.onEdit({\n updatedData,\n editType: 'addPosition',\n editContext: {\n featureIndexes: [featureIndex],\n positionIndexes,\n position: pickedIntermediateHandle.geometry.coordinates,\n },\n });\n }\n }\n }\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>): void {\n const editHandle = getPickedEditHandle(event.pointerDownPicks);\n\n if (editHandle) {\n // Cancel map panning if pointer went down on an edit handle\n event.cancelPan();\n\n const editHandleProperties = editHandle.properties;\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .replacePosition(\n editHandleProperties.featureIndex,\n editHandleProperties.positionIndexes,\n event.mapCoords\n )\n .getObject();\n\n props.onEdit({\n updatedData,\n editType: 'movePosition',\n editContext: {\n featureIndexes: [editHandleProperties.featureIndex],\n positionIndexes: editHandleProperties.positionIndexes,\n position: event.mapCoords,\n },\n });\n }\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>): void {\n const cursor = this.getCursor(event);\n props.onUpdateCursor(cursor);\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n const selectedFeatureIndexes = props.selectedIndexes;\n\n const editHandle = getPickedIntermediateEditHandle(event.picks);\n if (selectedFeatureIndexes.length && editHandle) {\n const editHandleProperties = editHandle.properties;\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .addPosition(\n editHandleProperties.featureIndex,\n editHandleProperties.positionIndexes,\n event.mapCoords\n )\n .getObject();\n\n props.onEdit({\n updatedData,\n editType: 'addPosition',\n editContext: {\n featureIndexes: [editHandleProperties.featureIndex],\n positionIndexes: editHandleProperties.positionIndexes,\n position: event.mapCoords,\n },\n });\n }\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n const selectedFeatureIndexes = props.selectedIndexes;\n const editHandle = getPickedEditHandle(event.picks);\n if (selectedFeatureIndexes.length && editHandle) {\n const editHandleProperties = editHandle.properties;\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .replacePosition(\n editHandleProperties.featureIndex,\n editHandleProperties.positionIndexes,\n event.mapCoords\n )\n .getObject();\n\n props.onEdit({\n updatedData,\n editType: 'finishMovePosition',\n editContext: {\n featureIndexes: [editHandleProperties.featureIndex],\n positionIndexes: editHandleProperties.positionIndexes,\n position: event.mapCoords,\n },\n });\n }\n }\n\n getCursor(event: PointerMoveEvent): string | null | undefined {\n const picks = (event && event.picks) || [];\n\n const handlesPicked = getPickedEditHandles(picks);\n if (handlesPicked.length) {\n return 'cell';\n }\n return null;\n }\n}\n","import turfBearing from '@turf/bearing';\nimport turfDistance from '@turf/distance';\nimport turfTransformTranslate from '@turf/transform-translate';\nimport { point } from '@turf/helpers';\nimport { FeatureCollection, Position } from '../geojson-types';\nimport {\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n ModeProps,\n} from '../types';\nimport { GeoJsonEditMode, GeoJsonEditAction } from './geojson-edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class TranslateMode extends GeoJsonEditMode {\n _geometryBeforeTranslate: FeatureCollection | null | undefined;\n _isTranslatable: boolean;\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>) {\n if (!this._isTranslatable) {\n // Nothing to do\n return;\n }\n\n if (this._geometryBeforeTranslate) {\n // Translate the geometry\n const editAction = this.getTranslateAction(\n event.pointerDownMapCoords,\n event.mapCoords,\n 'translating',\n props\n );\n\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n\n // cancel map panning\n event.cancelPan();\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n this._isTranslatable = this.isSelectionPicked(event.pointerDownPicks || event.picks, props);\n\n this.updateCursor(props);\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (!this._isTranslatable) {\n return;\n }\n\n this._geometryBeforeTranslate = this.getSelectedFeaturesAsFeatureCollection(props);\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this._geometryBeforeTranslate) {\n // Translate the geometry\n const editAction = this.getTranslateAction(\n event.pointerDownMapCoords,\n event.mapCoords,\n 'translated',\n props\n );\n\n if (editAction) {\n props.onEdit(editAction);\n }\n\n this._geometryBeforeTranslate = null;\n }\n }\n\n updateCursor(props: ModeProps<FeatureCollection>) {\n if (this._isTranslatable) {\n props.onUpdateCursor('move');\n } else {\n props.onUpdateCursor(null);\n }\n }\n\n getTranslateAction(\n startDragPoint: Position,\n currentPoint: Position,\n editType: string,\n props: ModeProps<FeatureCollection>\n ): GeoJsonEditAction | null | undefined {\n if (!this._geometryBeforeTranslate) {\n return null;\n }\n const p1 = point(startDragPoint);\n const p2 = point(currentPoint);\n\n const distanceMoved = turfDistance(p1, p2);\n const direction = turfBearing(p1, p2);\n\n const movedFeatures = turfTransformTranslate(\n // @ts-ignore\n this._geometryBeforeTranslate,\n distanceMoved,\n direction\n );\n\n let updatedData = new ImmutableFeatureCollection(props.data);\n\n const selectedIndexes = props.selectedIndexes;\n for (let i = 0; i < selectedIndexes.length; i++) {\n const selectedIndex = selectedIndexes[i];\n const movedFeature = movedFeatures.features[i];\n updatedData = updatedData.replaceGeometry(selectedIndex, movedFeature.geometry);\n }\n\n return {\n updatedData: updatedData.getObject(),\n editType,\n editContext: {\n featureIndexes: selectedIndexes,\n },\n };\n }\n}\n","import {\n ClickEvent,\n PointerMoveEvent,\n ModeProps,\n GuideFeatureCollection,\n TentativeFeature,\n} from '../types';\nimport { Polygon, FeatureCollection } from '../geojson-types';\nimport { getPickedEditHandle } from '../utils';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class DrawPolygonMode extends GeoJsonEditMode {\n createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature {\n const { lastPointerMoveEvent } = props;\n const clickSequence = this.getClickSequence();\n\n const lastCoords = lastPointerMoveEvent ? [lastPointerMoveEvent.mapCoords] : [];\n\n let tentativeFeature;\n if (clickSequence.length === 1 || clickSequence.length === 2) {\n tentativeFeature = {\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'LineString',\n coordinates: [...clickSequence, ...lastCoords],\n },\n };\n } else if (clickSequence.length > 2) {\n tentativeFeature = {\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'Polygon',\n coordinates: [[...clickSequence, ...lastCoords, clickSequence[0]]],\n },\n };\n }\n\n return tentativeFeature;\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const clickSequence = this.getClickSequence();\n\n const guides = {\n type: 'FeatureCollection',\n features: [],\n };\n\n const tentativeFeature = this.createTentativeFeature(props);\n if (tentativeFeature) {\n guides.features.push(tentativeFeature);\n }\n\n const editHandles = clickSequence.map((clickedCoord, index) => ({\n type: 'Feature',\n properties: {\n guideType: 'editHandle',\n editHandleType: 'existing',\n featureIndex: -1,\n positionIndexes: [index],\n },\n geometry: {\n type: 'Point',\n coordinates: clickedCoord,\n },\n }));\n\n guides.features.push(...editHandles);\n // @ts-ignore\n return guides;\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const { picks } = event;\n const clickedEditHandle = getPickedEditHandle(picks);\n\n let positionAdded = false;\n if (!clickedEditHandle) {\n // Don't add another point right next to an existing one\n this.addClickSequence(event);\n positionAdded = true;\n }\n const clickSequence = this.getClickSequence();\n\n if (\n clickSequence.length > 2 &&\n clickedEditHandle &&\n Array.isArray(clickedEditHandle.properties.positionIndexes) &&\n (clickedEditHandle.properties.positionIndexes[0] === 0 ||\n clickedEditHandle.properties.positionIndexes[0] === clickSequence.length - 1)\n ) {\n // They clicked the first or last point (or double-clicked), so complete the polygon\n\n // Remove the hovered position\n const polygonToAdd: Polygon = {\n type: 'Polygon',\n coordinates: [[...clickSequence, clickSequence[0]]],\n };\n\n this.resetClickSequence();\n\n const editAction = this.getAddFeatureOrBooleanPolygonAction(polygonToAdd, props);\n if (editAction) {\n props.onEdit(editAction);\n }\n } else if (positionAdded) {\n // new tentative point\n props.onEdit({\n // data is the same\n updatedData: props.data,\n editType: 'addTentativePosition',\n editContext: {\n position: event.mapCoords,\n },\n });\n }\n }\n handleKeyUp(event: KeyboardEvent, props: ModeProps<FeatureCollection>) {\n if (event.key === 'Enter') {\n const clickSequence = this.getClickSequence();\n if (clickSequence.length > 2) {\n const polygonToAdd: Polygon = {\n type: 'Polygon',\n coordinates: [[...clickSequence, clickSequence[0]]],\n };\n this.resetClickSequence();\n\n const editAction = this.getAddFeatureOrBooleanPolygonAction(polygonToAdd, props);\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n }\n }\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n super.handlePointerMove(event, props);\n }\n}\n","export default class DeckCache<TORIG, TCONV> {\n objects: TCONV[];\n originals: TORIG[];\n updateTrigger: number;\n _idToPosition: Map<string, number>;\n _getData: () => TORIG[];\n _convert: (arg0: TORIG) => TCONV;\n\n constructor(getData: () => TORIG[], convert: (arg0: TORIG) => TCONV) {\n this.objects = [];\n this.originals = [];\n this.updateTrigger = 0;\n\n this._idToPosition = new Map();\n this._getData = getData;\n this._convert = convert;\n }\n\n updateAllDeckObjects() {\n if (!this._getData || !this._convert) return;\n\n this.originals.length = 0;\n this.objects.length = 0;\n this._idToPosition.clear();\n\n this._getData().forEach((d) => {\n this._idToPosition.set((d as any).id, this.objects.length);\n this.originals.push(d);\n this.objects.push(this._convert(d));\n });\n\n this.triggerUpdate();\n }\n\n updateDeckObjectsByIds(ids: string[]) {\n if (!this._getData || !this._convert) return;\n\n ids.forEach((id) => {\n const p = this._idToPosition.get(id);\n if (p !== undefined) {\n this.objects[p] = this._convert(this.originals[p]);\n }\n });\n\n this.triggerUpdate();\n }\n\n triggerUpdate() {\n this.updateTrigger++;\n }\n\n getDeckObjectById(id: string): TCONV | null | undefined {\n const p = this._idToPosition.get(id);\n return p !== undefined ? this.objects[p] : null;\n }\n\n getOriginalById(id: string): TORIG | null | undefined {\n const p = this._idToPosition.get(id);\n return p !== undefined ? this.originals[p] : null;\n }\n}\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers\n}\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _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(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","var unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nfunction _createForOfIteratorHelper(o) {\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (o = unsupportedIterableToArray(o))) {\n var i = 0;\n\n var F = function F() {};\n\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var it,\n normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = o[Symbol.iterator]();\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\nmodule.exports = _createForOfIteratorHelper;","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst {ANY} = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","// Adds floating point numbers with twice the normal precision.\n// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and\n// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)\n// 305–363 (1997).\n// Code adapted from GeographicLib by Charles F. F. Karney,\n// http://geographiclib.sourceforge.net/\n\nexport default function() {\n return new Adder;\n}\n\nfunction Adder() {\n this.reset();\n}\n\nAdder.prototype = {\n constructor: Adder,\n reset: function() {\n this.s = // rounded value\n this.t = 0; // exact error\n },\n add: function(y) {\n add(temp, y, this.t);\n add(this, temp.s, this.s);\n if (this.s) this.t += temp.t;\n else this.s = temp.t;\n },\n valueOf: function() {\n return this.s;\n }\n};\n\nvar temp = new Adder;\n\nfunction add(adder, a, b) {\n var x = adder.s = a + b,\n bv = x - a,\n av = x - bv;\n adder.t = (a - av) + (b - bv);\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","import adder from \"./adder\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math\";\nimport noop from \"./noop\";\nimport stream from \"./stream\";\n\nexport var areaRingSum = adder();\n\nvar areaSum = adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum.reset();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum.reset();\n stream(object, areaStream);\n return areaSum * 2;\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import adder from \"./adder\";\nimport {areaStream, areaRingSum} from \"./area\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian\";\nimport {abs, degrees, epsilon, radians} from \"./math\";\nimport stream from \"./stream\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n lambda2, // previous lambda-coordinate\n lambda00, phi00, // first point\n p0, // previous 3D point\n deltaSum = adder(),\n ranges,\n range;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum.reset();\n areaStream.polygonStart();\n },\n polygonEnd: function() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n else if (deltaSum > epsilon) phi1 = 90;\n else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n var i, n, a, b, merged, deltaMax, delta;\n\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream);\n\n // First, sort ranges by their minimum longitudes.\n if (n = ranges.length) {\n ranges.sort(rangeCompare);\n\n // Then, merge any ranges that overlap.\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n\n // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n\n return lambda0 === Infinity || phi0 === Infinity\n ? [[NaN, NaN], [NaN, NaN]]\n : [[lambda0, phi0], [lambda1, phi1]];\n}\n","import {asin, atan2, cos, degrees, epsilon, epsilon2, radians, sin, sqrt} from \"./math\";\nimport noop from \"./noop\";\nimport stream from \"./stream\";\n\nvar W0, W1,\n X0, Y0, Z0,\n X1, Y1, Z1,\n X2, Y2, Z2,\n lambda00, phi00, // first point\n x0, y0, z0; // previous point\n\nvar centroidStream = {\n sphere: noop,\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n ++W0;\n X0 += (x - X0) / W0;\n Y0 += (y - Y0) / W0;\n Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidStream.point = centroidLinePoint;\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n centroidRingPoint(lambda00, phi00);\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n centroidStream.point = centroidRingPoint;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n cx = y0 * z - z0 * y,\n cy = z0 * x - x0 * z,\n cz = x0 * y - y0 * x,\n m = sqrt(cx * cx + cy * cy + cz * cz),\n w = asin(m), // line weight = angle\n v = m && -w / m; // area weight multiplier\n X2 += v * cx;\n Y2 += v * cy;\n Z2 += v * cz;\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nexport default function(object) {\n W0 = W1 =\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 =\n X2 = Y2 = Z2 = 0;\n stream(object, centroidStream);\n\n var x = X2,\n y = Y2,\n z = Z2,\n m = x * x + y * y + z * z;\n\n // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n if (m < epsilon2) {\n x = X1, y = Y1, z = Z1;\n // If the feature has zero length, fall back to arithmetic mean of point vectors.\n if (W1 < epsilon) x = X0, y = Y0, z = Z0;\n m = x * x + y * y + z * z;\n // If the feature still has an undefined ccentroid, then return.\n if (m < epsilon2) return [NaN, NaN];\n }\n\n return [atan2(y, x) * degrees, asin(z / sqrt(m)) * degrees];\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","import compose from \"./compose\";\nimport {asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math\";\n\nfunction rotationIdentity(lambda, phi) {\n return [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian\";\nimport constant from \"./constant\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math\";\nimport {rotateRadians} from \"./rotation\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(6),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import noop from \"../noop\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y) {\n line.push([x, y]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","import {abs, epsilon} from \"./math\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import pointEqual from \"../pointEqual\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n // If the first and last points of a segment are coincident, then treat as a\n // closed ring. TODO if all rings are closed, then the winding order of the\n // exterior ring should be checked.\n if (pointEqual(p0, p1)) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending\";\nimport bisector from \"./bisector\";\n\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport default bisectRight;\n","import ascending from \"./ascending\";\n\nexport default function(compare) {\n if (compare.length === 1) compare = ascendingComparator(compare);\n return {\n left: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n },\n right: function(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n var mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n };\n}\n\nfunction ascendingComparator(f) {\n return function(d, x) {\n return ascending(f(d), x);\n };\n}\n","import {pair} from \"./pairs\";\n\nexport default function(values0, values1, reduce) {\n var n0 = values0.length,\n n1 = values1.length,\n values = new Array(n0 * n1),\n i0,\n i1,\n i,\n value0;\n\n if (reduce == null) reduce = pair;\n\n for (i0 = i = 0; i0 < n0; ++i0) {\n for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {\n values[i] = reduce(value0, values1[i1]);\n }\n }\n\n return values;\n}\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array(n = Math.ceil(stop - start + 1));\n while (++i < n) ticks[i] = (start + i) * step;\n } else {\n start = Math.floor(start * step);\n stop = Math.ceil(stop * step);\n ticks = new Array(n = Math.ceil(start - stop + 1));\n while (++i < n) ticks[i] = (start - i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","export default function(values) {\n return Math.ceil(Math.log(values.length) / Math.LN2) + 1;\n}\n","export default function(arrays) {\n var n = arrays.length,\n m,\n i = -1,\n j = 0,\n merged,\n array;\n\n while (++i < n) j += arrays[i].length;\n merged = new Array(j);\n\n while (--n >= 0) {\n array = arrays[n];\n m = array.length;\n while (--m >= 0) {\n merged[--j] = array[m];\n }\n }\n\n return merged;\n}\n","import {abs, epsilon} from \"../math\";\nimport clipBuffer from \"./buffer\";\nimport clipLine from \"./line\";\nimport clipPolygon from \"./polygon\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport function clipExtent(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipPolygon(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n\nexport default function() {\n var x0 = 0,\n y0 = 0,\n x1 = 960,\n y1 = 500,\n cache,\n cacheStream,\n clip;\n\n return clip = {\n stream: function(stream) {\n return cache && cacheStream === stream ? cache : cache = clipExtent(x0, y0, x1, y1)(cacheStream = stream);\n },\n extent: function(_) {\n return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];\n }\n };\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","import adder from \"./adder\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian\";\nimport {asin, atan2, cos, epsilon, pi, quarterPi, sin, tau} from \"./math\";\n\nvar sum = adder();\n\nexport default function(polygon, point) {\n var lambda = point[0],\n phi = point[1],\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n sum.reset();\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = point0[0],\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = point1[0],\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon) ^ (winding & 1);\n}\n","import adder from \"./adder\";\nimport {abs, atan2, cos, radians, sin, sqrt} from \"./math\";\nimport noop from \"./noop\";\nimport stream from \"./stream\";\n\nvar lengthSum = adder(),\n lambda0,\n sinPhi0,\n cosPhi0;\n\nvar lengthStream = {\n sphere: noop,\n point: noop,\n lineStart: lengthLineStart,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop\n};\n\nfunction lengthLineStart() {\n lengthStream.point = lengthPointFirst;\n lengthStream.lineEnd = lengthLineEnd;\n}\n\nfunction lengthLineEnd() {\n lengthStream.point = lengthStream.lineEnd = noop;\n}\n\nfunction lengthPointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi);\n lengthStream.point = lengthPoint;\n}\n\nfunction lengthPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var sinPhi = sin(phi),\n cosPhi = cos(phi),\n delta = abs(lambda - lambda0),\n cosDelta = cos(delta),\n sinDelta = sin(delta),\n x = cosPhi * sinDelta,\n y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,\n z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;\n lengthSum.add(atan2(sqrt(x * x + y * y), z));\n lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;\n}\n\nexport default function(object) {\n lengthSum.reset();\n stream(object, lengthStream);\n return +lengthSum;\n}\n","import {asin, atan2, cos, degrees, haversin, radians, sin, sqrt} from \"./math\";\n\nexport default function(a, b) {\n var x0 = a[0] * radians,\n y0 = a[1] * radians,\n x1 = b[0] * radians,\n y1 = b[1] * radians,\n cy0 = cos(y0),\n sy0 = sin(y0),\n cy1 = cos(y1),\n sy1 = sin(y1),\n kx0 = cy0 * cos(x0),\n ky0 = cy0 * sin(x0),\n kx1 = cy1 * cos(x1),\n ky1 = cy1 * sin(x1),\n d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))),\n k = sin(d);\n\n var interpolate = d ? function(t) {\n var B = sin(t *= d) / k,\n A = sin(d - t) / k,\n x = A * kx0 + B * kx1,\n y = A * ky0 + B * ky1,\n z = A * sy0 + B * sy1;\n return [\n atan2(y, x) * degrees,\n atan2(z, sqrt(x * x + y * y)) * degrees\n ];\n } : function() {\n return [x0 * degrees, y0 * degrees];\n };\n\n interpolate.distance = d;\n\n return interpolate;\n}\n","export default function(x) {\n return x;\n}\n","import adder from \"../adder\";\nimport {abs} from \"../math\";\nimport noop from \"../noop\";\n\nvar areaSum = adder(),\n areaRingSum = adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum.reset();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum.reset();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import noop from \"../noop\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {tau} from \"../math\";\nimport noop from \"../noop\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n","import adder from \"../adder\";\nimport {sqrt} from \"../math\";\nimport noop from \"../noop\";\n\nvar lengthSum = adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum.reset();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","export default function PathString() {\n this._string = [];\n}\n\nPathString.prototype = {\n _radius: 4.5,\n _circle: circle(4.5),\n pointRadius: function(_) {\n if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n return this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._string.push(\"Z\");\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._string.push(\"M\", x, \",\", y);\n this._point = 1;\n break;\n }\n case 1: {\n this._string.push(\"L\", x, \",\", y);\n break;\n }\n default: {\n if (this._circle == null) this._circle = circle(this._radius);\n this._string.push(\"M\", x, \",\", y, this._circle);\n break;\n }\n }\n },\n result: function() {\n if (this._string.length) {\n var result = this._string.join(\"\");\n this._string = [];\n return result;\n } else {\n return null;\n }\n }\n};\n\nfunction circle(radius) {\n return \"m0,\" + radius\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius\n + \"z\";\n}\n","import identity from \"../identity\";\nimport stream from \"../stream\";\nimport pathArea from \"./area\";\nimport pathBounds from \"./bounds\";\nimport pathCentroid from \"./centroid\";\nimport PathContext from \"./context\";\nimport pathMeasure from \"./measure\";\nimport PathString from \"./string\";\n\nexport default function(projection, context) {\n var pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n return contextStream.result();\n }\n\n path.area = function(object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function(object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function(object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function(object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function(_) {\n return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection;\n };\n\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n return path.projection(projection).context(context);\n}\n","import clipBuffer from \"./buffer\";\nimport clipPolygon from \"./polygon\";\nimport {epsilon, halfPi} from \"../math\";\nimport polygonContains from \"../polygonContains\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(rotate, sink) {\n var line = clipLine(sink),\n rotatedStart = rotate.invert(start[0], start[1]),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, rotatedStart);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipPolygon(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n var point = rotate(lambda, phi);\n if (pointVisible(lambda = point[0], phi = point[1])) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n var point = rotate(lambda, phi);\n line.point(point[0], point[1]);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n var point = rotate(lambda, phi);\n ringSink.point(point[0], point[1]);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","import clip from \"./index\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian\";\nimport {circleStream} from \"../circle\";\nimport {abs, cos, epsilon, pi, sqrt} from \"../math\";\nimport pointEqual from \"../pointEqual\";\nimport clip from \"./index\";\n\nexport default function(radius, delta) {\n var cr = cos(radius),\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n // Handle degeneracies.\n // TODO ignore if not clipping polygons.\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2)) {\n point1[0] += epsilon;\n point1[1] += epsilon;\n v = visible(point1[0], point1[1]);\n }\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1]);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","import {default as geoStream} from \"../stream\";\nimport boundsStream from \"../path/bounds\";\n\nexport function fitExtent(projection, extent, object) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n clip = projection.clipExtent && projection.clipExtent();\n\n projection\n .scale(150)\n .translate([0, 0]);\n\n if (clip != null) projection.clipExtent(null);\n\n geoStream(object, projection.stream(boundsStream));\n\n var b = boundsStream.result(),\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n\n if (clip != null) projection.clipExtent(clip);\n\n return projection\n .scale(k * 150)\n .translate([x, y]);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n","import {cartesian} from \"../cartesian\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math\";\nimport {transformer} from \"../transform\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import clipAntimeridian from \"../clip/antimeridian\";\nimport clipCircle from \"../clip/circle\";\nimport {clipExtent} from \"../clip/extent\";\nimport compose from \"../compose\";\nimport identity from \"../identity\";\nimport {degrees, radians, sqrt} from \"../math\";\nimport {rotateRadians} from \"../rotation\";\nimport {transformer} from \"../transform\";\nimport {fitExtent, fitSize} from \"./fit\";\nimport resample from \"./resample\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n dx, dy, lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, projectRotate, // rotate\n theta = null, preclip = clipAntimeridian, // clip angle\n x0 = null, y0, x1, y1, postclip = identity, // clip extent\n delta2 = 0.5, projectResample = resample(projectTransform, delta2), // precision\n cache,\n cacheStream;\n\n function projection(point) {\n point = projectRotate(point[0] * radians, point[1] * radians);\n return [point[0] * k + dx, dy - point[1] * k];\n }\n\n function invert(point) {\n point = projectRotate.invert((point[0] - dx) / k, (dy - point[1]) / k);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n function projectTransform(x, y) {\n return x = project(x, y), [x[0] * k + dx, dy - x[1] * k];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(preclip(rotate, projectResample(postclip(cacheStream = stream))));\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians, 6 * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n function recenter() {\n projectRotate = compose(rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma), project);\n var center = project(lambda, phi);\n dx = x - center[0] * k;\n dy = y + center[1] * k;\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","import {asin, atan2, cos, sin, sqrt} from \"../math\";\n\nexport function azimuthalRaw(scale) {\n return function(x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n return [\n k * cy * sin(x),\n k * sin(y)\n ];\n }\n}\n\nexport function azimuthalInvert(angle) {\n return function(x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [\n atan2(x * sc, z * cc),\n asin(z && y * sc / z)\n ];\n }\n}\n","import {asin, sqrt} from \"../math\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal\";\nimport projection from \"./index\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n return 2 * asin(z / 2);\n});\n\nexport default function() {\n return projection(azimuthalEqualAreaRaw)\n .scale(124.75)\n .clipAngle(180 - 1e-3);\n}\n","import {acos, sin} from \"../math\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal\";\nimport projection from \"./index\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n return z;\n});\n\nexport default function() {\n return projection(azimuthalEquidistantRaw)\n .scale(79.4188)\n .clipAngle(180 - 1e-3);\n}\n","import {atan, exp, halfPi, log, pi, tan, tau} from \"../math\";\nimport rotation from \"../rotation\";\nimport projection from \"./index\";\n\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n return mercatorProjection(mercatorRaw)\n .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null, y0, x1, y1; // clip extent\n\n m.scale = function(_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function(_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function(_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function(_) {\n return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null\n ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}\n","import projection from \"./index\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n","import {atan, cos, sin} from \"../math\";\nimport {azimuthalInvert} from \"./azimuthal\";\nimport projection from \"./index\";\n\nexport function gnomonicRaw(x, y) {\n var cy = cos(y), k = cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n return projection(gnomonicRaw)\n .scale(144.049)\n .clipAngle(60);\n}\n","import projection from \"./index\";\nimport {abs, epsilon} from \"../math\";\n\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n return [\n lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n var phi = y, i = 25, delta;\n do {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n return [\n x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n phi\n ];\n};\n\nexport default function() {\n return projection(naturalEarth1Raw)\n .scale(175.295);\n}\n","import {asin, cos, epsilon, sin} from \"../math\";\nimport {azimuthalInvert} from \"./azimuthal\";\nimport projection from \"./index\";\n\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n return projection(orthographicRaw)\n .scale(249.5)\n .clipAngle(90 + epsilon);\n}\n","import {atan, cos, sin} from \"../math\";\nimport {azimuthalInvert} from \"./azimuthal\";\nimport projection from \"./index\";\n\nexport function stereographicRaw(x, y) {\n var cy = cos(y), k = 1 + cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n return 2 * atan(z);\n});\n\nexport default function() {\n return projection(stereographicRaw)\n .scale(250)\n .clipAngle(142);\n}\n","import {atan, exp, halfPi, log, tan} from \"../math\";\nimport {mercatorProjection} from \"./mercator\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n var m = mercatorProjection(transverseMercatorRaw),\n center = m.center,\n rotate = m.rotate;\n\n m.center = function(_) {\n return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n };\n\n m.rotate = function(_) {\n return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n };\n\n return rotate([0, 0, 90])\n .scale(159.155);\n}\n","import center from '@turf/center';\nimport { GeoJSONReader, BufferOp, GeoJSONWriter } from 'turf-jsts';\nimport { featureEach, geomEach } from '@turf/meta';\nimport { geoAzimuthalEquidistant } from 'd3-geo';\nimport { featureCollection, earthRadius, radiansToLength, lengthToRadians, feature } from '@turf/helpers';\n\n/**\n * Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.\n *\n * When using a negative radius, the resulting geometry may be invalid if\n * it's too small compared to the radius magnitude. If the input is a\n * FeatureCollection, only valid members will be returned in the output\n * FeatureCollection - i.e., the output collection may have fewer members than\n * the input, or even be empty.\n *\n * @name buffer\n * @param {FeatureCollection|Geometry|Feature<any>} geojson input to be buffered\n * @param {number} radius distance to draw the buffer (negative values are allowed)\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units=\"kilometers\"] any of the options supported by turf units\n * @param {number} [options.steps=8] number of steps\n * @returns {FeatureCollection|Feature<Polygon|MultiPolygon>|undefined} buffered features\n * @example\n * var point = turf.point([-90.548630, 14.616599]);\n * var buffered = turf.buffer(point, 500, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [point, buffered]\n */\nfunction buffer(geojson, radius, options) {\n // Optional params\n options = options || {};\n\n // use user supplied options or default values\n var units = options.units || \"kilometers\";\n var steps = options.steps || 8;\n\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (typeof options !== \"object\") throw new Error(\"options must be an object\");\n if (typeof steps !== \"number\") throw new Error(\"steps must be an number\");\n\n // Allow negative buffers (\"erosion\") or zero-sized buffers (\"repair geometry\")\n if (radius === undefined) throw new Error(\"radius is required\");\n if (steps <= 0) throw new Error(\"steps must be greater than 0\");\n\n var results = [];\n switch (geojson.type) {\n case \"GeometryCollection\":\n geomEach(geojson, function (geometry) {\n var buffered = bufferFeature(geometry, radius, units, steps);\n if (buffered) results.push(buffered);\n });\n return featureCollection(results);\n case \"FeatureCollection\":\n featureEach(geojson, function (feature) {\n var multiBuffered = bufferFeature(feature, radius, units, steps);\n if (multiBuffered) {\n featureEach(multiBuffered, function (buffered) {\n if (buffered) results.push(buffered);\n });\n }\n });\n return featureCollection(results);\n }\n return bufferFeature(geojson, radius, units, steps);\n}\n\n/**\n * Buffer single Feature/Geometry\n *\n * @private\n * @param {Feature<any>} geojson input to be buffered\n * @param {number} radius distance to draw the buffer\n * @param {string} [units='kilometers'] any of the options supported by turf units\n * @param {number} [steps=8] number of steps\n * @returns {Feature<Polygon|MultiPolygon>} buffered feature\n */\nfunction bufferFeature(geojson, radius, units, steps) {\n var properties = geojson.properties || {};\n var geometry = geojson.type === \"Feature\" ? geojson.geometry : geojson;\n\n // Geometry Types faster than jsts\n if (geometry.type === \"GeometryCollection\") {\n var results = [];\n geomEach(geojson, function (geometry) {\n var buffered = bufferFeature(geometry, radius, units, steps);\n if (buffered) results.push(buffered);\n });\n return featureCollection(results);\n }\n\n // Project GeoJSON to Azimuthal Equidistant projection (convert to Meters)\n var projection = defineProjection(geometry);\n var projected = {\n type: geometry.type,\n coordinates: projectCoords(geometry.coordinates, projection),\n };\n\n // JSTS buffer operation\n var reader = new GeoJSONReader();\n var geom = reader.read(projected);\n var distance = radiansToLength(lengthToRadians(radius, units), \"meters\");\n var buffered = BufferOp.bufferOp(geom, distance, steps);\n var writer = new GeoJSONWriter();\n buffered = writer.write(buffered);\n\n // Detect if empty geometries\n if (coordsIsNaN(buffered.coordinates)) return undefined;\n\n // Unproject coordinates (convert to Degrees)\n var result = {\n type: buffered.type,\n coordinates: unprojectCoords(buffered.coordinates, projection),\n };\n\n return feature(result, properties);\n}\n\n/**\n * Coordinates isNaN\n *\n * @private\n * @param {Array<any>} coords GeoJSON Coordinates\n * @returns {boolean} if NaN exists\n */\nfunction coordsIsNaN(coords) {\n if (Array.isArray(coords[0])) return coordsIsNaN(coords[0]);\n return isNaN(coords[0]);\n}\n\n/**\n * Project coordinates to projection\n *\n * @private\n * @param {Array<any>} coords to project\n * @param {GeoProjection} proj D3 Geo Projection\n * @returns {Array<any>} projected coordinates\n */\nfunction projectCoords(coords, proj) {\n if (typeof coords[0] !== \"object\") return proj(coords);\n return coords.map(function (coord) {\n return projectCoords(coord, proj);\n });\n}\n\n/**\n * Un-Project coordinates to projection\n *\n * @private\n * @param {Array<any>} coords to un-project\n * @param {GeoProjection} proj D3 Geo Projection\n * @returns {Array<any>} un-projected coordinates\n */\nfunction unprojectCoords(coords, proj) {\n if (typeof coords[0] !== \"object\") return proj.invert(coords);\n return coords.map(function (coord) {\n return unprojectCoords(coord, proj);\n });\n}\n\n/**\n * Define Azimuthal Equidistant projection\n *\n * @private\n * @param {Geometry|Feature<any>} geojson Base projection on center of GeoJSON\n * @returns {GeoProjection} D3 Geo Azimuthal Equidistant Projection\n */\nfunction defineProjection(geojson) {\n var coords = center(geojson).geometry.coordinates;\n var rotation = [-coords[0], -coords[1]];\n return geoAzimuthalEquidistant().rotate(rotation).scale(earthRadius);\n}\n\nexport default buffer;\n","import {assert} from '../env-utils/assert';\n\nconst workerURLCache = new Map();\n\n/**\n * Creates a loadable URL from worker source or URL\n * that can be used to create `Worker` instances.\n * Due to CORS issues it may be necessary to wrap a URL in a small importScripts\n * @param props\n * @param props.source Worker source\n * @param props.url Worker URL\n * @returns loadable url\n */\nexport function getLoadableWorkerURL(props: {source?: string; url?: string}) {\n assert((props.source && !props.url) || (!props.source && props.url)); // Either source or url must be defined\n\n let workerURL = workerURLCache.get(props.source || props.url);\n if (!workerURL) {\n // Differentiate worker urls from worker source code\n if (props.url) {\n workerURL = getLoadableWorkerURLFromURL(props.url);\n workerURLCache.set(props.url, workerURL);\n }\n\n if (props.source) {\n workerURL = getLoadableWorkerURLFromSource(props.source);\n workerURLCache.set(props.source, workerURL);\n }\n }\n\n assert(workerURL);\n return workerURL;\n}\n\n/**\n * Build a loadable worker URL from worker URL\n * @param url\n * @returns loadable URL\n */\nfunction getLoadableWorkerURLFromURL(url: string): string {\n // A local script url, we can use it to initialize a Worker directly\n if (!url.startsWith('http')) {\n return url;\n }\n\n // A remote script, we need to use `importScripts` to load from different origin\n const workerSource = buildScriptSource(url);\n return getLoadableWorkerURLFromSource(workerSource);\n}\n\n/**\n * Build a loadable worker URL from worker source\n * @param workerSource\n * @returns loadable url\n */\nfunction getLoadableWorkerURLFromSource(workerSource: string): string {\n // NOTE: webworkify was previously used\n // const blob = webworkify(workerSource, {bare: true});\n const blob = new Blob([workerSource], {type: 'application/javascript'});\n return URL.createObjectURL(blob);\n}\n\n/**\n * Per spec, worker cannot be initialized with a script from a different origin\n * However a local worker script can still import scripts from other origins,\n * so we simply build a wrapper script.\n *\n * @param workerUrl\n * @returns source\n */\nfunction buildScriptSource(workerUrl: string): string {\n return `\\\ntry {\n importScripts('${workerUrl}');\n} catch (error) {\n console.error(error);\n throw error;\n}`;\n}\n","// NOTE - there is a copy of this function is both in core and loader-utils\n// core does not need all the utils in loader-utils, just this one.\n\n/**\n * Returns an array of Transferrable objects that can be used with postMessage\n * https://developer.mozilla.org/en-US/docs/Web/API/Worker/postMessage\n * @param object data to be sent via postMessage\n * @param recursive - not for application use\n * @param transfers - not for application use\n * @returns a transfer list that can be passed to postMessage\n */\nexport function getTransferList(\n object: any,\n recursive: boolean = true,\n transfers?: Set<any>\n): Transferable[] {\n // Make sure that items in the transfer list is unique\n const transfersSet = transfers || new Set();\n\n if (!object) {\n // ignore\n } else if (isTransferable(object)) {\n transfersSet.add(object);\n } else if (isTransferable(object.buffer)) {\n // Typed array\n transfersSet.add(object.buffer);\n } else if (ArrayBuffer.isView(object)) {\n // object is a TypeArray viewing into a SharedArrayBuffer (not transferable)\n // Do not iterate through the content in this case\n } else if (recursive && typeof object === 'object') {\n for (const key in object) {\n // Avoid perf hit - only go one level deep\n getTransferList(object[key], recursive, transfersSet);\n }\n }\n\n // If transfers is defined, is internal recursive call\n // Otherwise it's called by the user\n return transfers === undefined ? Array.from(transfersSet) : [];\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Transferable\nfunction isTransferable(object) {\n if (!object) {\n return false;\n }\n if (object instanceof ArrayBuffer) {\n return true;\n }\n if (typeof MessagePort !== 'undefined' && object instanceof MessagePort) {\n return true;\n }\n if (typeof ImageBitmap !== 'undefined' && object instanceof ImageBitmap) {\n return true;\n }\n // @ts-ignore\n if (typeof OffscreenCanvas !== 'undefined' && object instanceof OffscreenCanvas) {\n return true;\n }\n return false;\n}\n","import {assert} from '../env-utils/assert';\nimport {getLoadableWorkerURL} from '../worker-utils/get-loadable-worker-url';\nimport {getTransferList} from '../worker-utils/get-transfer-list';\n\nconst NOOP = () => {};\n\nexport type WorkerThreadProps = {\n name: string;\n source?: string;\n url?: string;\n};\n\n/**\n * Represents one worker thread\n */\nexport default class WorkerThread {\n readonly name: string;\n readonly source: string | undefined;\n readonly url: string | undefined;\n terminated: boolean = false;\n worker: Worker;\n onMessage: (message: any) => void;\n onError: (error: Error) => void;\n\n private _loadableURL: string = '';\n\n static isSupported(): boolean {\n return typeof Worker !== 'undefined';\n }\n\n constructor(props: WorkerThreadProps) {\n const {name, source, url} = props;\n assert(source || url); // Either source or url must be defined\n this.name = name;\n this.source = source;\n this.url = url;\n this.onMessage = NOOP;\n this.onError = (error) => console.log(error); // eslint-disable-line\n\n this.worker = this._createBrowserWorker();\n }\n\n /**\n * Terminate this worker thread\n * @note Can free up significant memory\n */\n destroy(): void {\n this.onMessage = NOOP;\n this.onError = NOOP;\n // @ts-ignore\n this.worker.terminate();\n this.terminated = true;\n }\n\n get isRunning() {\n return Boolean(this.onMessage);\n }\n\n /**\n * Send a message to this worker thread\n * @param data any data structure, ideally consisting mostly of transferrable objects\n * @param transferList If not supplied, calculated automatically by traversing data\n */\n postMessage(data: any, transferList?: any[]): void {\n transferList = transferList || getTransferList(data);\n // @ts-ignore\n this.worker.postMessage(data, transferList);\n }\n\n // PRIVATE\n\n /**\n * Generate a standard Error from an ErrorEvent\n * @param {ErrorEvent} event\n */\n _getErrorFromErrorEvent(event) {\n // Note Error object does not have the expected fields if loading failed completely\n // https://developer.mozilla.org/en-US/docs/Web/API/Worker#Event_handlers\n // https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent\n let message = 'Failed to load ';\n message += `worker ${this.name}. `;\n if (event.message) {\n message += `${event.message} in `;\n }\n // const hasFilename = event.filename && !event.filename.startsWith('blob:');\n // message += hasFilename ? event.filename : this.source.slice(0, 100);\n if (event.lineno) {\n message += `:${event.lineno}:${event.colno}`;\n }\n return new Error(message);\n }\n\n /**\n * Creates a worker thread on the browser\n */\n _createBrowserWorker() {\n this._loadableURL = getLoadableWorkerURL({source: this.source, url: this.url});\n const worker = new Worker(this._loadableURL, {name: this.name});\n\n worker.onmessage = (event) => {\n if (!event.data) {\n this.onError(new Error('No data received'));\n } else {\n this.onMessage(event.data);\n }\n };\n // This callback represents an uncaught exception in the worker thread\n worker.onerror = (error) => {\n this.onError(this._getErrorFromErrorEvent(error));\n this.terminated = true;\n };\n // TODO - not clear when this would be called, for now just log in case it happens\n worker.onmessageerror = (event) => console.error(event); // eslint-disable-line\n\n return worker;\n }\n}\n","import type {WorkerMessageType, WorkerMessagePayload} from '../../types';\nimport WorkerThread from './worker-thread';\nimport {assert} from '../env-utils/assert';\n\n/**\n * Represents one Job handled by a WorkerPool or WorkerFarm\n */\nexport default class WorkerJob {\n readonly name: string;\n readonly workerThread: WorkerThread;\n isRunning: boolean;\n /** Promise that resolves when Job is done */\n readonly result: Promise<any>;\n\n private _resolve: (value: any) => void;\n private _reject: (reason?: any) => void;\n\n constructor(jobName: string, workerThread: WorkerThread) {\n this.name = jobName;\n this.workerThread = workerThread;\n this.isRunning = true;\n this._resolve = () => {};\n this._reject = () => {};\n this.result = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n\n /**\n * Send a message to the job's worker thread\n * @param data any data structure, ideally consisting mostly of transferrable objects\n */\n postMessage(type: WorkerMessageType, payload: WorkerMessagePayload): void {\n this.workerThread.postMessage({\n source: 'loaders.gl', // Lets worker ignore unrelated messages\n type,\n payload\n });\n }\n\n /**\n * Call to resolve the `result` Promise with the supplied value\n */\n done(value): void {\n assert(this.isRunning);\n this.isRunning = false;\n this._resolve(value);\n }\n\n /**\n * Call to reject the `result` Promise with the supplied error\n */\n error(error): void {\n assert(this.isRunning);\n this.isRunning = false;\n this._reject(error);\n }\n}\n","import type {WorkerMessageType, WorkerMessagePayload} from '../../types';\nimport {isMobile} from '../env-utils/globals';\nimport WorkerThread from './worker-thread';\nimport WorkerJob from './worker-job';\n\n/** WorkerPool onDebug Callback Parameters */\ntype OnDebugParameters = {\n message: string;\n worker: string;\n name: string;\n job: string;\n backlog: number;\n workerThread: WorkerThread;\n};\n\n/** WorkerPool Properties */\nexport type WorkerPoolProps = {\n name?: string;\n source?: string; // | Function;\n url?: string;\n maxConcurrency?: number;\n maxMobileConcurrency?: number;\n onDebug?: (options: OnDebugParameters) => any;\n reuseWorkers?: boolean;\n};\n\n/** Private helper types */\ntype OnMessage = (job: WorkerJob, type: WorkerMessageType, payload: WorkerMessagePayload) => void;\ntype OnError = (job: WorkerJob, error: Error) => void;\n\ntype QueuedJob = {\n name: string;\n onMessage: OnMessage;\n onError: OnError;\n onStart: (value: any) => void; // Resolve job start promise\n};\n\n/**\n * Process multiple data messages with small pool of identical workers\n */\nexport default class WorkerPool {\n name: string = 'unnamed';\n source?: string; // | Function;\n url?: string;\n maxConcurrency: number = 1;\n maxMobileConcurrency: number = 1;\n onDebug: (options: OnDebugParameters) => any = () => {};\n reuseWorkers: boolean = true;\n\n private props: WorkerPoolProps = {};\n private jobQueue: QueuedJob[] = [];\n private idleQueue: WorkerThread[] = [];\n private count = 0;\n private isDestroyed = false;\n\n /**\n * @param processor - worker function\n * @param maxConcurrency - max count of workers\n */\n constructor(props: WorkerPoolProps) {\n this.source = props.source;\n this.url = props.url;\n this.setProps(props);\n }\n\n /**\n * Terminates all workers in the pool\n * @note Can free up significant memory\n */\n destroy(): void {\n // Destroy idle workers, active Workers will be destroyed on completion\n this.idleQueue.forEach((worker) => worker.destroy());\n this.isDestroyed = true;\n }\n\n setProps(props: WorkerPoolProps) {\n this.props = {...this.props, ...props};\n\n if (props.name !== undefined) {\n this.name = props.name;\n }\n if (props.maxConcurrency !== undefined) {\n this.maxConcurrency = props.maxConcurrency;\n }\n if (props.maxMobileConcurrency !== undefined) {\n this.maxMobileConcurrency = props.maxMobileConcurrency;\n }\n if (props.reuseWorkers !== undefined) {\n this.reuseWorkers = props.reuseWorkers;\n }\n if (props.onDebug !== undefined) {\n this.onDebug = props.onDebug;\n }\n }\n\n async startJob(\n name: string,\n onMessage: OnMessage = (job, type, data) => job.done(data),\n onError: OnError = (job, error) => job.error(error)\n ): Promise<WorkerJob> {\n // Promise resolves when thread starts working on this job\n const startPromise = new Promise<WorkerJob>((onStart) => {\n // Promise resolves when thread completes or fails working on this job\n this.jobQueue.push({name, onMessage, onError, onStart});\n return this;\n });\n this._startQueuedJob(); // eslint-disable-line @typescript-eslint/no-floating-promises\n return await startPromise;\n }\n\n // PRIVATE\n\n /**\n * Starts first queued job if worker is available or can be created\n * Called when job is started and whenever a worker returns to the idleQueue\n */\n async _startQueuedJob(): Promise<void> {\n if (!this.jobQueue.length) {\n return;\n }\n\n const workerThread = this._getAvailableWorker();\n if (!workerThread) {\n return;\n }\n\n // We have a worker, dequeue and start the job\n const queuedJob = this.jobQueue.shift();\n if (queuedJob) {\n // Emit a debug event\n // @ts-ignore\n this.onDebug({\n message: 'Starting job',\n name: queuedJob.name,\n workerThread,\n backlog: this.jobQueue.length\n });\n\n // Create a worker job to let the app access thread and manage job completion\n const job = new WorkerJob(queuedJob.name, workerThread);\n\n // Set the worker thread's message handlers\n workerThread.onMessage = (data) => queuedJob.onMessage(job, data.type, data.payload);\n workerThread.onError = (error) => queuedJob.onError(job, error);\n\n // Resolve the start promise so that the app can start sending messages to worker\n queuedJob.onStart(job);\n\n // Wait for the app to signal that the job is complete, then return worker to queue\n try {\n await job.result;\n } finally {\n this.returnWorkerToQueue(workerThread);\n }\n }\n }\n\n /**\n * Returns a worker to the idle queue\n * Destroys the worker if\n * - pool is destroyed\n * - if this pool doesn't reuse workers\n * - if maxConcurrency has been lowered\n * @param worker\n */\n returnWorkerToQueue(worker: WorkerThread) {\n const shouldDestroyWorker =\n this.isDestroyed || !this.reuseWorkers || this.count > this._getMaxConcurrency();\n\n if (shouldDestroyWorker) {\n worker.destroy();\n this.count--;\n } else {\n this.idleQueue.push(worker);\n }\n\n if (!this.isDestroyed) {\n this._startQueuedJob(); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n }\n\n /**\n * Returns idle worker or creates new worker if maxConcurrency has not been reached\n */\n _getAvailableWorker(): WorkerThread | null {\n // If a worker has completed and returned to the queue, it can be used\n if (this.idleQueue.length > 0) {\n return this.idleQueue.shift() || null;\n }\n\n // Create fresh worker if we haven't yet created the max amount of worker threads for this worker source\n if (this.count < this._getMaxConcurrency()) {\n this.count++;\n const name = `${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;\n return new WorkerThread({name, source: this.source, url: this.url});\n }\n\n // No worker available, have to wait\n return null;\n }\n\n _getMaxConcurrency() {\n return isMobile ? this.maxMobileConcurrency : this.maxConcurrency;\n }\n}\n","import WorkerPool from './worker-pool';\nimport WorkerThread from './worker-thread';\n\n/**\n * @param maxConcurrency {number} - max count of workers\n */\nexport type WorkerFarmProps = {\n maxConcurrency?: number;\n maxMobileConcurrency?: number;\n reuseWorkers?: boolean;\n onDebug?: () => void;\n};\n\nconst DEFAULT_PROPS: WorkerFarmProps = {\n maxConcurrency: 3,\n maxMobileConcurrency: 1,\n onDebug: () => {},\n reuseWorkers: true\n};\n\n/**\n * Process multiple jobs with a \"farm\" of different workers in worker pools.\n */\nexport default class WorkerFarm {\n private props: WorkerFarmProps;\n private workerPools = new Map<string, WorkerPool>();\n // singleton\n private static _workerFarm?: WorkerFarm;\n\n /** Check if Workers are supported */\n static isSupported(): boolean {\n return WorkerThread.isSupported();\n }\n\n /** Get the singleton instance of the global worker farm */\n static getWorkerFarm(props: WorkerFarmProps = {}): WorkerFarm {\n WorkerFarm._workerFarm = WorkerFarm._workerFarm || new WorkerFarm({});\n WorkerFarm._workerFarm.setProps(props);\n return WorkerFarm._workerFarm;\n }\n\n /** get global instance with WorkerFarm.getWorkerFarm() */\n private constructor(props: WorkerFarmProps) {\n this.props = {...DEFAULT_PROPS};\n this.setProps(props);\n /** @type Map<string, WorkerPool>} */\n this.workerPools = new Map();\n }\n\n /**\n * Terminate all workers in the farm\n * @note Can free up significant memory\n */\n destroy(): void {\n for (const workerPool of this.workerPools.values()) {\n workerPool.destroy();\n }\n }\n\n /**\n * Set props used when initializing worker pools\n * @param props\n */\n setProps(props: WorkerFarmProps): void {\n this.props = {...this.props, ...props};\n // Update worker pool props\n for (const workerPool of this.workerPools.values()) {\n workerPool.setProps(this._getWorkerPoolProps());\n }\n }\n\n /**\n * Returns a worker pool for the specified worker\n * @param options - only used first time for a specific worker name\n * @param options.name - the name of the worker - used to identify worker pool\n * @param options.url -\n * @param options.source -\n * @example\n * const job = WorkerFarm.getWorkerFarm().getWorkerPool({name, url}).startJob(...);\n */\n getWorkerPool(options: {name: string; source?: string; url?: string}): WorkerPool {\n const {name, source, url} = options;\n let workerPool = this.workerPools.get(name);\n if (!workerPool) {\n workerPool = new WorkerPool({\n name,\n source,\n url\n });\n workerPool.setProps(this._getWorkerPoolProps());\n this.workerPools.set(name, workerPool);\n }\n return workerPool;\n }\n\n _getWorkerPoolProps() {\n return {\n maxConcurrency: this.props.maxConcurrency,\n maxMobileConcurrency: this.props.maxMobileConcurrency,\n reuseWorkers: this.props.reuseWorkers,\n onDebug: this.props.onDebug\n };\n }\n}\n","import type {WorkerObject, WorkerOptions} from '../../types';\nimport {assert} from '../env-utils/assert';\nimport {VERSION as __VERSION__} from '../env-utils/version';\n\nconst NPM_TAG = 'latest';\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : NPM_TAG;\n\n/**\n * Gets worker object's name (for debugging in Chrome thread inspector window)\n */\nexport function getWorkerName(worker: WorkerObject): string {\n const warning = worker.version !== VERSION ? ` (worker-utils@${VERSION})` : '';\n return `${worker.name}@${worker.version}${warning}`;\n}\n\n/**\n * Generate a worker URL based on worker object and options\n * @returns A URL to one of the following:\n * - a published worker on unpkg CDN\n * - a local test worker\n * - a URL provided by the user in options\n */\nexport function getWorkerURL(worker: WorkerObject, options: WorkerOptions = {}): string {\n const workerOptions = options[worker.id] || {};\n\n const workerFile = `${worker.id}-worker.js`;\n\n let url = workerOptions.workerUrl;\n\n // If URL is test, generate local loaders.gl url\n // @ts-ignore _workerType\n if (options._workerType === 'test') {\n url = `modules/${worker.module}/dist/${workerFile}`;\n }\n\n // If url override is not provided, generate a URL to published version on npm CDN unpkg.com\n if (!url) {\n // GENERATE\n let version = worker.version;\n // On master we need to load npm alpha releases published with the `beta` tag\n if (version === 'latest') {\n // throw new Error('latest worker version specified');\n version = NPM_TAG;\n }\n const versionTag = version ? `@${version}` : '';\n url = `https://unpkg.com/@loaders.gl/${worker.module}${versionTag}/dist/${workerFile}`;\n }\n\n assert(url);\n\n // Allow user to override location\n return url;\n}\n","import type {WorkerJob, WorkerMessageType, WorkerMessagePayload} from '@loaders.gl/worker-utils';\nimport type {Loader, LoaderOptions, LoaderContext} from '../../types';\nimport {WorkerFarm, getWorkerURL} from '@loaders.gl/worker-utils';\n\n/**\n * Determines if a loader can parse with worker\n * @param loader\n * @param options\n */\nexport function canParseWithWorker(loader: Loader, options?: LoaderOptions) {\n if (!WorkerFarm.isSupported()) {\n return false;\n }\n\n return loader.worker && options?.worker;\n}\n\n/**\n * this function expects that the worker function sends certain messages,\n * this can be automated if the worker is wrapper by a call to createLoaderWorker in @loaders.gl/loader-utils.\n */\nexport async function parseWithWorker(\n loader: Loader,\n data,\n options?: LoaderOptions,\n context?: LoaderContext,\n parseOnMainThread?: (arrayBuffer: ArrayBuffer, options: {[key: string]: any}) => Promise<void>\n) {\n const name = loader.id; // TODO\n const url = getWorkerURL(loader, options);\n\n const workerFarm = WorkerFarm.getWorkerFarm(options);\n const workerPool = workerFarm.getWorkerPool({name, url});\n\n // options.log object contains functions which cannot be transferred\n // TODO - decide how to handle logging on workers\n options = JSON.parse(JSON.stringify(options));\n\n const job = await workerPool.startJob(\n 'process-on-worker',\n // eslint-disable-next-line\n onMessage.bind(null, parseOnMainThread)\n );\n\n job.postMessage('process', {\n // @ts-ignore\n input: data,\n options\n });\n\n const result = await job.result;\n return await result.result;\n}\n\n/**\n * Handle worker's responses to the main thread\n * @param job\n * @param type\n * @param payload\n */\nasync function onMessage(\n parseOnMainThread,\n job: WorkerJob,\n type: WorkerMessageType,\n payload: WorkerMessagePayload\n) {\n switch (type) {\n case 'done':\n job.done(payload);\n break;\n\n case 'error':\n job.error(payload.error);\n break;\n\n case 'process':\n // Worker is asking for main thread to parseO\n const {id, input, options} = payload;\n try {\n const result = await parseOnMainThread(input, options);\n job.postMessage('done', {id, result});\n } catch (error) {\n const message = error instanceof Error ? error.message : 'unknown error';\n job.postMessage('error', {id, error: message});\n }\n break;\n\n default:\n // eslint-disable-next-line\n console.warn(`parse-with-worker unknown message ${type}`);\n }\n}\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\nimport { degreesToRadians, lengthToRadians, point, radiansToDegrees, } from \"@turf/helpers\";\nimport { getCoord } from \"@turf/invariant\";\n/**\n * Takes a {@link Point} and calculates the location of a destination point given a distance in\n * degrees, radians, miles, or kilometers; and bearing in degrees.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name destination\n * @param {Coord} origin starting point\n * @param {number} distance distance from the origin point\n * @param {number} bearing ranging from -180 to 180\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] Translate properties to Point\n * @returns {Feature<Point>} destination point\n * @example\n * var point = turf.point([-75.343, 39.984]);\n * var distance = 50;\n * var bearing = 90;\n * var options = {units: 'miles'};\n *\n * var destination = turf.destination(point, distance, bearing, options);\n *\n * //addToMap\n * var addToMap = [point, destination]\n * destination.properties['marker-color'] = '#f00';\n * point.properties['marker-color'] = '#0f0';\n */\nexport default function destination(origin, distance, bearing, options) {\n if (options === void 0) { options = {}; }\n // Handle input\n var coordinates1 = getCoord(origin);\n var longitude1 = degreesToRadians(coordinates1[0]);\n var latitude1 = degreesToRadians(coordinates1[1]);\n var bearingRad = degreesToRadians(bearing);\n var radians = lengthToRadians(distance, options.units);\n // Main\n var latitude2 = Math.asin(Math.sin(latitude1) * Math.cos(radians) +\n Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearingRad));\n var longitude2 = longitude1 +\n Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1), Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));\n var lng = radiansToDegrees(longitude2);\n var lat = radiansToDegrees(latitude2);\n return point([lng, lat], options.properties);\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import destination from \"@turf/destination\";\nimport { polygon, } from \"@turf/helpers\";\n/**\n * Takes a {@link Point} and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.\n *\n * @name circle\n * @param {Feature<Point>|number[]} center center point\n * @param {number} radius radius of the circle\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.steps=64] number of steps\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] properties\n * @returns {Feature<Polygon>} circle polygon\n * @example\n * var center = [-75.343, 39.984];\n * var radius = 5;\n * var options = {steps: 10, units: 'kilometers', properties: {foo: 'bar'}};\n * var circle = turf.circle(center, radius, options);\n *\n * //addToMap\n * var addToMap = [turf.point(center), circle]\n */\nfunction circle(center, radius, options) {\n if (options === void 0) { options = {}; }\n // default params\n var steps = options.steps || 64;\n var properties = options.properties\n ? options.properties\n : !Array.isArray(center) && center.type === \"Feature\" && center.properties\n ? center.properties\n : {};\n // main\n var coordinates = [];\n for (var i = 0; i < steps; i++) {\n coordinates.push(destination(center, radius, (i * -360) / steps, options).geometry\n .coordinates);\n }\n coordinates.push(coordinates[0]);\n return polygon([coordinates], properties);\n}\nexport default circle;\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import { featureCollection, lineString, multiLineString } from \"@turf/helpers\";\nimport { getGeom } from \"@turf/invariant\";\n/**\n * Converts a {@link Polygon} to {@link LineString|(Multi)LineString} or {@link MultiPolygon} to a\n * {@link FeatureCollection} of {@link LineString|(Multi)LineString}.\n *\n * @name polygonToLine\n * @param {Feature<Polygon|MultiPolygon>} poly Feature to convert\n * @param {Object} [options={}] Optional parameters\n * @param {Object} [options.properties={}] translates GeoJSON properties to Feature\n * @returns {FeatureCollection|Feature<LineString|MultiLinestring>} converted (Multi)Polygon to (Multi)LineString\n * @example\n * var poly = turf.polygon([[[125, -30], [145, -30], [145, -20], [125, -20], [125, -30]]]);\n *\n * var line = turf.polygonToLine(poly);\n *\n * //addToMap\n * var addToMap = [line];\n */\nexport default function (poly, options) {\n if (options === void 0) { options = {}; }\n var geom = getGeom(poly);\n if (!options.properties && poly.type === \"Feature\") {\n options.properties = poly.properties;\n }\n switch (geom.type) {\n case \"Polygon\":\n return polygonToLine(geom, options);\n case \"MultiPolygon\":\n return multiPolygonToLine(geom, options);\n default:\n throw new Error(\"invalid poly\");\n }\n}\n/**\n * @private\n */\nexport function polygonToLine(poly, options) {\n if (options === void 0) { options = {}; }\n var geom = getGeom(poly);\n var coords = geom.coordinates;\n var properties = options.properties\n ? options.properties\n : poly.type === \"Feature\"\n ? poly.properties\n : {};\n return coordsToLine(coords, properties);\n}\n/**\n * @private\n */\nexport function multiPolygonToLine(multiPoly, options) {\n if (options === void 0) { options = {}; }\n var geom = getGeom(multiPoly);\n var coords = geom.coordinates;\n var properties = options.properties\n ? options.properties\n : multiPoly.type === \"Feature\"\n ? multiPoly.properties\n : {};\n var lines = [];\n coords.forEach(function (coord) {\n lines.push(coordsToLine(coord, properties));\n });\n return featureCollection(lines);\n}\n/**\n * @private\n */\nexport function coordsToLine(coords, properties) {\n if (coords.length > 1) {\n return multiLineString(coords, properties);\n }\n return lineString(coords[0], properties);\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport Layer from './layer';\nimport debug from '../debug';\nimport {flatten} from '../utils/flatten';\n\nconst TRACE_RENDER_LAYERS = 'compositeLayer.renderLayers';\n\nexport default class CompositeLayer extends Layer {\n get isComposite() {\n return true;\n }\n\n get isLoaded() {\n return super.isLoaded && this.getSubLayers().every(layer => layer.isLoaded);\n }\n\n getSubLayers() {\n return (this.internalState && this.internalState.subLayers) || [];\n }\n\n // initializeState is usually not needed for composite layers\n // Provide empty definition to disable check for missing definition\n initializeState() {}\n\n // Updates selected state members and marks the composite layer to need rerender\n setState(updateObject) {\n super.setState(updateObject);\n // Trigger a layer update\n // Although conceptually layer.draw and compositeLayer.renderLayers are equivalent,\n // they are executed during different lifecycles.\n // draw can be called without calling updateState (e.g. most viewport changes),\n // while renderLayers can only be called during a recursive layer update.\n this.setNeedsUpdate();\n }\n\n // called to augment the info object that is bubbled up from a sublayer\n // override Layer.getPickingInfo() because decoding / setting uniform do\n // not apply to a composite layer.\n // @return null to cancel event\n getPickingInfo({info}) {\n const {object} = info;\n const isDataWrapped =\n object && object.__source && object.__source.parent && object.__source.parent.id === this.id;\n\n if (!isDataWrapped) {\n return info;\n }\n\n // override object with picked data\n info.object = object.__source.object;\n info.index = object.__source.index;\n\n return info;\n }\n\n // Implement to generate subLayers\n renderLayers() {\n return null;\n }\n\n /**\n * Filters sub layers at draw time\n * @param {Layer} context.layer - sub layer instance\n * @param {Viewport} context.viewport - the viewport being rendered in\n * @param {Boolean} context.isPicking - whether it is a picking pass\n * @param {String} context.pass - the current pass\n * @return {Boolean} true if the sub layer should be drawn\n */\n filterSubLayer(context) {\n return true;\n }\n\n // Returns true if sub layer needs to be rendered\n shouldRenderSubLayer(id, data) {\n return data && data.length;\n }\n\n // Returns sub layer class for a specific sublayer\n getSubLayerClass(id, DefaultLayerClass) {\n const {_subLayerProps: overridingProps} = this.props;\n\n return (\n (overridingProps && overridingProps[id] && overridingProps[id].type) || DefaultLayerClass\n );\n }\n\n // When casting user data into another format to pass to sublayers,\n // add reference to the original object and object index\n getSubLayerRow(row, sourceObject, sourceObjectIndex) {\n row.__source = {\n parent: this,\n object: sourceObject,\n index: sourceObjectIndex\n };\n return row;\n }\n\n // Some composite layers cast user data into another format before passing to sublayers\n // We need to unwrap them before calling the accessor so that they see the original data\n // objects\n getSubLayerAccessor(accessor) {\n if (typeof accessor === 'function') {\n const objectInfo = {\n data: this.props.data,\n target: []\n };\n return (x, i) => {\n if (x && x.__source) {\n objectInfo.index = x.__source.index;\n return accessor(x.__source.object, objectInfo);\n }\n return accessor(x, i);\n };\n }\n return accessor;\n }\n\n // Returns sub layer props for a specific sublayer\n // eslint-disable-next-line complexity\n getSubLayerProps(sublayerProps = {}) {\n const {\n opacity,\n pickable,\n visible,\n parameters,\n getPolygonOffset,\n highlightedObjectIndex,\n autoHighlight,\n highlightColor,\n coordinateSystem,\n coordinateOrigin,\n wrapLongitude,\n positionFormat,\n modelMatrix,\n extensions,\n fetch,\n _subLayerProps: overridingProps\n } = this.props;\n const newProps = {\n opacity,\n pickable,\n visible,\n parameters,\n getPolygonOffset,\n highlightedObjectIndex,\n autoHighlight,\n highlightColor,\n coordinateSystem,\n coordinateOrigin,\n wrapLongitude,\n positionFormat,\n modelMatrix,\n extensions,\n fetch\n };\n\n const overridingSublayerProps = overridingProps && overridingProps[sublayerProps.id];\n const overridingSublayerTriggers =\n overridingSublayerProps && overridingSublayerProps.updateTriggers;\n const sublayerId = sublayerProps.id || 'sublayer';\n\n if (overridingSublayerProps) {\n const propTypes = this.constructor._propTypes;\n const subLayerPropTypes = sublayerProps.type ? sublayerProps.type._propTypes : {};\n for (const key in overridingSublayerProps) {\n const propType = subLayerPropTypes[key] || propTypes[key];\n // eslint-disable-next-line\n if (propType && propType.type === 'accessor') {\n overridingSublayerProps[key] = this.getSubLayerAccessor(overridingSublayerProps[key]);\n }\n }\n }\n\n Object.assign(\n newProps,\n sublayerProps,\n // experimental feature that allows users to override sublayer props via parent layer prop\n overridingSublayerProps\n );\n newProps.id = `${this.props.id}-${sublayerId}`;\n newProps.updateTriggers = {\n all: this.props.updateTriggers.all,\n ...sublayerProps.updateTriggers,\n ...overridingSublayerTriggers\n };\n\n // Pass through extension props\n for (const extension of extensions) {\n const passThroughProps = extension.getSubLayerProps.call(this, extension);\n if (passThroughProps) {\n Object.assign(newProps, passThroughProps, {\n updateTriggers: Object.assign(newProps.updateTriggers, passThroughProps.updateTriggers)\n });\n }\n }\n\n return newProps;\n }\n\n _updateAutoHighlight(info) {\n for (const layer of this.getSubLayers()) {\n layer.updateAutoHighlight(info);\n }\n }\n\n _getAttributeManager() {\n return null;\n }\n\n // Called by layer manager to render subLayers\n _renderLayers() {\n let {subLayers} = this.internalState;\n const shouldUpdate = !subLayers || this.needsUpdate();\n if (shouldUpdate) {\n subLayers = this.renderLayers();\n // Flatten the returned array, removing any null, undefined or false\n // this allows layers to render sublayers conditionally\n // (see CompositeLayer.renderLayers docs)\n subLayers = flatten(subLayers, Boolean);\n this.internalState.subLayers = subLayers;\n }\n debug(TRACE_RENDER_LAYERS, this, shouldUpdate, subLayers);\n\n // populate reference to parent layer (this layer)\n // NOTE: needs to be done even when reusing layers as the parent may have changed\n for (const layer of subLayers) {\n layer.parent = this;\n }\n }\n}\n\nCompositeLayer.layerName = 'CompositeLayer';\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","import { coordEach } from \"@turf/meta\";\nimport { point } from \"@turf/helpers\";\n/**\n * Takes one or more features and calculates the centroid using the mean of all vertices.\n * This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.\n *\n * @name centroid\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional Parameters\n * @param {Object} [options.properties={}] an Object that is used as the {@link Feature}'s properties\n * @returns {Feature<Point>} the centroid of the input features\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var centroid = turf.centroid(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, centroid]\n */\nfunction centroid(geojson, options) {\n if (options === void 0) { options = {}; }\n var xSum = 0;\n var ySum = 0;\n var len = 0;\n coordEach(geojson, function (coord) {\n xSum += coord[0];\n ySum += coord[1];\n len++;\n }, true);\n return point([xSum / len, ySum / len], options.properties);\n}\nexport default centroid;\n","import centroid from '@turf/centroid';\nimport rhumbBearing from '@turf/rhumb-bearing';\nimport rhumbDistance from '@turf/rhumb-distance';\nimport rhumbDestination from '@turf/rhumb-destination';\nimport clone from '@turf/clone';\nimport { coordEach } from '@turf/meta';\nimport { getCoords } from '@turf/invariant';\nimport { isObject } from '@turf/helpers';\n\n/**\n * Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point.\n *\n * @name transformRotate\n * @param {GeoJSON} geojson object to be rotated\n * @param {number} angle of rotation in decimal degrees, positive clockwise\n * @param {Object} [options={}] Optional parameters\n * @param {Coord} [options.pivot='centroid'] point around which the rotation will be performed\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON} the rotated GeoJSON feature\n * @example\n * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * var options = {pivot: [0, 25]};\n * var rotatedPoly = turf.transformRotate(poly, 10, options);\n *\n * //addToMap\n * var addToMap = [poly, rotatedPoly];\n * rotatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformRotate(geojson, angle, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var pivot = options.pivot;\n var mutate = options.mutate;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (angle === undefined || angle === null || isNaN(angle))\n throw new Error(\"angle is required\");\n\n // Shortcut no-rotation\n if (angle === 0) return geojson;\n\n // Use centroid of GeoJSON if pivot is not provided\n if (!pivot) pivot = centroid(geojson);\n\n // Clone geojson to avoid side effects\n if (mutate === false || mutate === undefined) geojson = clone(geojson);\n\n // Rotate each coordinate\n coordEach(geojson, function (pointCoords) {\n var initialAngle = rhumbBearing(pivot, pointCoords);\n var finalAngle = initialAngle + angle;\n var distance = rhumbDistance(pivot, pointCoords);\n var newCoords = getCoords(rhumbDestination(pivot, distance, finalAngle));\n pointCoords[0] = newCoords[0];\n pointCoords[1] = newCoords[1];\n });\n return geojson;\n}\n\nexport default transformRotate;\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","function isJSON(text) {\n const firstChar = text[0];\n const lastChar = text[text.length - 1];\n return (firstChar === '{' && lastChar === '}') || (firstChar === '[' && lastChar === ']');\n}\n\n// TODO - replace with the version in loaders.gl\nexport default {\n name: 'JSON',\n // TODO - can we stream process geojson?\n extensions: ['json', 'geojson'],\n mimeTypes: ['application/json', 'application/geo+json'],\n testText: isJSON,\n parseTextSync: JSON.parse\n};\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {registerLoaders} from '@loaders.gl/core';\nimport {ImageLoader} from '@loaders.gl/images';\n\nimport {global} from 'probe.gl/env';\nimport log from '../utils/log';\nimport {register} from '../debug';\nimport jsonLoader from '../utils/json-loader';\n\n// Version detection using babel plugin\n// Fallback for tests and SSR since global variable is defined by Webpack.\n/* global __VERSION__ */\nconst version =\n typeof __VERSION__ !== 'undefined' ? __VERSION__ : global.DECK_VERSION || 'untranspiled source';\n\n// Note: a `deck` object not created by deck.gl may exist in the global scope\nconst existingVersion = global.deck && global.deck.VERSION;\n\nif (existingVersion && existingVersion !== version) {\n throw new Error(`deck.gl - multiple versions detected: ${existingVersion} vs ${version}`);\n}\n\nif (!existingVersion) {\n log.log(1, `deck.gl ${version}`)();\n\n global.deck = Object.assign(global.deck || {}, {\n VERSION: version,\n version,\n log,\n // experimental\n _registerLoggers: register\n });\n\n registerLoaders([jsonLoader, [ImageLoader, {imagebitmap: {premultiplyAlpha: 'none'}}]]);\n}\n\nexport default global.deck;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar react = require('react');\n\nfunction createContext() {\n var ZustandContext = react.createContext(undefined);\n\n var Provider = function Provider(_ref) {\n var initialStore = _ref.initialStore,\n createStore = _ref.createStore,\n children = _ref.children;\n var storeRef = react.useRef();\n\n if (!storeRef.current) {\n if (initialStore) {\n console.warn('Provider initialStore is deprecated and will be removed in the next version.');\n\n if (!createStore) {\n createStore = function createStore() {\n return initialStore;\n };\n }\n }\n\n storeRef.current = createStore();\n }\n\n return react.createElement(ZustandContext.Provider, {\n value: storeRef.current\n }, children);\n };\n\n var useStore = function useStore(selector, equalityFn) {\n if (equalityFn === void 0) {\n equalityFn = Object.is;\n }\n\n var useProviderStore = react.useContext(ZustandContext);\n\n if (!useProviderStore) {\n throw new Error('Seems like you have not used zustand provider as an ancestor.');\n }\n\n return useProviderStore(selector, equalityFn);\n };\n\n var useStoreApi = function useStoreApi() {\n var useProviderStore = react.useContext(ZustandContext);\n\n if (!useProviderStore) {\n throw new Error('Seems like you have not used zustand provider as an ancestor.');\n }\n\n return react.useMemo(function () {\n return {\n getState: useProviderStore.getState,\n setState: useProviderStore.setState,\n subscribe: useProviderStore.subscribe,\n destroy: useProviderStore.destroy\n };\n }, [useProviderStore]);\n };\n\n return {\n Provider: Provider,\n useStore: useStore,\n useStoreApi: useStoreApi\n };\n}\n\nexports['default'] = createContext;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction shallow(objA, objB) {\n if (Object.is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n\n if (keysA.length !== Object.keys(objB).length) {\n return false;\n }\n\n for (var i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !Object.is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nexports['default'] = shallow;\n","module.exports = require(\"./build/ReactGridLayout\").default;\nmodule.exports.utils = require(\"./build/utils\");\nmodule.exports.Responsive = require(\"./build/ResponsiveReactGridLayout\").default;\nmodule.exports.Responsive.utils = require(\"./build/responsiveUtils\");\nmodule.exports.WidthProvider = require(\"./build/components/WidthProvider\").default;\n","/**\n * typed-function\n *\n * Type checking for JavaScript functions\n *\n * https://github.com/josdejong/typed-function\n */\n'use strict';\n\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else if (typeof exports === 'object') {\n // OldNode. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like OldNode.\n module.exports = factory();\n } else {\n // Browser globals (root is window)\n root.typed = factory();\n }\n}(this, function () {\n\n function ok () {\n return true;\n }\n\n function notOk () {\n return false;\n }\n\n function undef () {\n return undefined;\n }\n\n /**\n * @typedef {{\n * params: Param[],\n * fn: function\n * }} Signature\n *\n * @typedef {{\n * types: Type[],\n * restParam: boolean\n * }} Param\n *\n * @typedef {{\n * name: string,\n * typeIndex: number,\n * test: function,\n * conversion?: ConversionDef,\n * conversionIndex: number,\n * }} Type\n *\n * @typedef {{\n * from: string,\n * to: string,\n * convert: function (*) : *\n * }} ConversionDef\n *\n * @typedef {{\n * name: string,\n * test: function(*) : boolean\n * }} TypeDef\n */\n\n // create a new instance of typed-function\n function create () {\n // data type tests\n var _types = [\n { name: 'number', test: function (x) { return typeof x === 'number' } },\n { name: 'string', test: function (x) { return typeof x === 'string' } },\n { name: 'boolean', test: function (x) { return typeof x === 'boolean' } },\n { name: 'Function', test: function (x) { return typeof x === 'function'} },\n { name: 'Array', test: Array.isArray },\n { name: 'Date', test: function (x) { return x instanceof Date } },\n { name: 'RegExp', test: function (x) { return x instanceof RegExp } },\n { name: 'Object', test: function (x) {\n return typeof x === 'object' && x !== null && x.constructor === Object\n }},\n { name: 'null', test: function (x) { return x === null } },\n { name: 'undefined', test: function (x) { return x === undefined } }\n ];\n\n var anyType = {\n name: 'any',\n test: ok\n }\n\n // types which need to be ignored\n var _ignore = [];\n\n // type conversions\n var _conversions = [];\n\n // This is a temporary object, will be replaced with a typed function at the end\n var typed = {\n types: _types,\n conversions: _conversions,\n ignore: _ignore\n };\n\n /**\n * Find the test function for a type\n * @param {String} typeName\n * @return {TypeDef} Returns the type definition when found,\n * Throws a TypeError otherwise\n */\n function findTypeByName (typeName) {\n var entry = findInArray(typed.types, function (entry) {\n return entry.name === typeName;\n });\n\n if (entry) {\n return entry;\n }\n\n if (typeName === 'any') { // special baked-in case 'any'\n return anyType;\n }\n\n var hint = findInArray(typed.types, function (entry) {\n return entry.name.toLowerCase() === typeName.toLowerCase();\n });\n\n throw new TypeError('Unknown type \"' + typeName + '\"' +\n (hint ? ('. Did you mean \"' + hint.name + '\"?') : ''));\n }\n\n /**\n * Find the index of a type definition. Handles special case 'any'\n * @param {TypeDef} type\n * @return {number}\n */\n function findTypeIndex(type) {\n if (type === anyType) {\n return 999;\n }\n\n return typed.types.indexOf(type);\n }\n\n /**\n * Find a type that matches a value.\n * @param {*} value\n * @return {string} Returns the name of the first type for which\n * the type test matches the value.\n */\n function findTypeName(value) {\n var entry = findInArray(typed.types, function (entry) {\n return entry.test(value);\n });\n\n if (entry) {\n return entry.name;\n }\n\n throw new TypeError('Value has unknown type. Value: ' + value);\n }\n\n /**\n * Find a specific signature from a (composed) typed function, for example:\n *\n * typed.find(fn, ['number', 'string'])\n * typed.find(fn, 'number, string')\n *\n * Function find only only works for exact matches.\n *\n * @param {Function} fn A typed-function\n * @param {string | string[]} signature Signature to be found, can be\n * an array or a comma separated string.\n * @return {Function} Returns the matching signature, or\n * throws an error when no signature\n * is found.\n */\n function find (fn, signature) {\n if (!fn.signatures) {\n throw new TypeError('Function is no typed-function');\n }\n\n // normalize input\n var arr;\n if (typeof signature === 'string') {\n arr = signature.split(',');\n for (var i = 0; i < arr.length; i++) {\n arr[i] = arr[i].trim();\n }\n }\n else if (Array.isArray(signature)) {\n arr = signature;\n }\n else {\n throw new TypeError('String array or a comma separated string expected');\n }\n\n var str = arr.join(',');\n\n // find an exact match\n var match = fn.signatures[str];\n if (match) {\n return match;\n }\n\n // TODO: extend find to match non-exact signatures\n\n throw new TypeError('Signature not found (signature: ' + (fn.name || 'unnamed') + '(' + arr.join(', ') + '))');\n }\n\n /**\n * Convert a given value to another data type.\n * @param {*} value\n * @param {string} type\n */\n function convert (value, type) {\n var from = findTypeName(value);\n\n // check conversion is needed\n if (type === from) {\n return value;\n }\n\n for (var i = 0; i < typed.conversions.length; i++) {\n var conversion = typed.conversions[i];\n if (conversion.from === from && conversion.to === type) {\n return conversion.convert(value);\n }\n }\n\n throw new Error('Cannot convert from ' + from + ' to ' + type);\n }\n \n /**\n * Stringify parameters in a normalized way\n * @param {Param[]} params\n * @return {string}\n */\n function stringifyParams (params) {\n return params\n .map(function (param) {\n var typeNames = param.types.map(getTypeName);\n\n return (param.restParam ? '...' : '') + typeNames.join('|');\n })\n .join(',');\n }\n\n /**\n * Parse a parameter, like \"...number | boolean\"\n * @param {string} param\n * @param {ConversionDef[]} conversions\n * @return {Param} param\n */\n function parseParam (param, conversions) {\n var restParam = param.indexOf('...') === 0;\n var types = (!restParam)\n ? param\n : (param.length > 3)\n ? param.slice(3)\n : 'any';\n\n var typeNames = types.split('|').map(trim)\n .filter(notEmpty)\n .filter(notIgnore);\n\n var matchingConversions = filterConversions(conversions, typeNames);\n\n var exactTypes = typeNames.map(function (typeName) {\n var type = findTypeByName(typeName);\n\n return {\n name: typeName,\n typeIndex: findTypeIndex(type),\n test: type.test,\n conversion: null,\n conversionIndex: -1\n };\n });\n\n var convertibleTypes = matchingConversions.map(function (conversion) {\n var type = findTypeByName(conversion.from);\n\n return {\n name: conversion.from,\n typeIndex: findTypeIndex(type),\n test: type.test,\n conversion: conversion,\n conversionIndex: conversions.indexOf(conversion)\n };\n });\n\n return {\n types: exactTypes.concat(convertibleTypes),\n restParam: restParam\n };\n }\n\n /**\n * Parse a signature with comma separated parameters,\n * like \"number | boolean, ...string\"\n * @param {string} signature\n * @param {function} fn\n * @param {ConversionDef[]} conversions\n * @return {Signature | null} signature\n */\n function parseSignature (signature, fn, conversions) {\n var params = [];\n\n if (signature.trim() !== '') {\n params = signature\n .split(',')\n .map(trim)\n .map(function (param, index, array) {\n var parsedParam = parseParam(param, conversions);\n\n if (parsedParam.restParam && (index !== array.length - 1)) {\n throw new SyntaxError('Unexpected rest parameter \"' + param + '\": ' +\n 'only allowed for the last parameter');\n }\n\n return parsedParam;\n });\n }\n\n if (params.some(isInvalidParam)) {\n // invalid signature: at least one parameter has no types\n // (they may have been filtered)\n return null;\n }\n\n return {\n params: params,\n fn: fn\n };\n }\n\n /**\n * Test whether a set of params contains a restParam\n * @param {Param[]} params\n * @return {boolean} Returns true when the last parameter is a restParam\n */\n function hasRestParam(params) {\n var param = last(params)\n return param ? param.restParam : false;\n }\n\n /**\n * Test whether a parameter contains conversions\n * @param {Param} param\n * @return {boolean} Returns true when at least one of the parameters\n * contains a conversion.\n */\n function hasConversions(param) {\n return param.types.some(function (type) {\n return type.conversion != null;\n });\n }\n\n /**\n * Create a type test for a single parameter, which can have one or multiple\n * types.\n * @param {Param} param\n * @return {function(x: *) : boolean} Returns a test function\n */\n function compileTest(param) {\n if (!param || param.types.length === 0) {\n // nothing to do\n return ok;\n }\n else if (param.types.length === 1) {\n return findTypeByName(param.types[0].name).test;\n }\n else if (param.types.length === 2) {\n var test0 = findTypeByName(param.types[0].name).test;\n var test1 = findTypeByName(param.types[1].name).test;\n return function or(x) {\n return test0(x) || test1(x);\n }\n }\n else { // param.types.length > 2\n var tests = param.types.map(function (type) {\n return findTypeByName(type.name).test;\n })\n return function or(x) {\n for (var i = 0; i < tests.length; i++) {\n if (tests[i](x)) {\n return true;\n }\n }\n return false;\n }\n }\n }\n\n /**\n * Create a test for all parameters of a signature\n * @param {Param[]} params\n * @return {function(args: Array<*>) : boolean}\n */\n function compileTests(params) {\n var tests, test0, test1;\n\n if (hasRestParam(params)) {\n // variable arguments like '...number'\n tests = initial(params).map(compileTest);\n var varIndex = tests.length;\n var lastTest = compileTest(last(params));\n var testRestParam = function (args) {\n for (var i = varIndex; i < args.length; i++) {\n if (!lastTest(args[i])) {\n return false;\n }\n }\n return true;\n }\n\n return function testArgs(args) {\n for (var i = 0; i < tests.length; i++) {\n if (!tests[i](args[i])) {\n return false;\n }\n }\n return testRestParam(args) && (args.length >= varIndex + 1);\n };\n }\n else {\n // no variable arguments\n if (params.length === 0) {\n return function testArgs(args) {\n return args.length === 0;\n };\n }\n else if (params.length === 1) {\n test0 = compileTest(params[0]);\n return function testArgs(args) {\n return test0(args[0]) && args.length === 1;\n };\n }\n else if (params.length === 2) {\n test0 = compileTest(params[0]);\n test1 = compileTest(params[1]);\n return function testArgs(args) {\n return test0(args[0]) && test1(args[1]) && args.length === 2;\n };\n }\n else { // arguments.length > 2\n tests = params.map(compileTest);\n return function testArgs(args) {\n for (var i = 0; i < tests.length; i++) {\n if (!tests[i](args[i])) {\n return false;\n }\n }\n return args.length === tests.length;\n };\n }\n }\n }\n\n /**\n * Find the parameter at a specific index of a signature.\n * Handles rest parameters.\n * @param {Signature} signature\n * @param {number} index\n * @return {Param | null} Returns the matching parameter when found,\n * null otherwise.\n */\n function getParamAtIndex(signature, index) {\n return index < signature.params.length\n ? signature.params[index]\n : hasRestParam(signature.params)\n ? last(signature.params)\n : null\n }\n\n /**\n * Get all type names of a parameter\n * @param {Signature} signature\n * @param {number} index\n * @param {boolean} excludeConversions\n * @return {string[]} Returns an array with type names\n */\n function getExpectedTypeNames (signature, index, excludeConversions) {\n var param = getParamAtIndex(signature, index);\n var types = param\n ? excludeConversions\n ? param.types.filter(isExactType)\n : param.types\n : [];\n\n return types.map(getTypeName);\n }\n\n /**\n * Returns the name of a type\n * @param {Type} type\n * @return {string} Returns the type name\n */\n function getTypeName(type) {\n return type.name;\n }\n\n /**\n * Test whether a type is an exact type or conversion\n * @param {Type} type\n * @return {boolean} Returns true when\n */\n function isExactType(type) {\n return type.conversion === null || type.conversion === undefined;\n }\n\n /**\n * Helper function for creating error messages: create an array with\n * all available types on a specific argument index.\n * @param {Signature[]} signatures\n * @param {number} index\n * @return {string[]} Returns an array with available types\n */\n function mergeExpectedParams(signatures, index) {\n var typeNames = uniq(flatMap(signatures, function (signature) {\n return getExpectedTypeNames(signature, index, false);\n }));\n\n return (typeNames.indexOf('any') !== -1) ? ['any'] : typeNames;\n }\n\n /**\n * Create\n * @param {string} name The name of the function\n * @param {array.<*>} args The actual arguments passed to the function\n * @param {Signature[]} signatures A list with available signatures\n * @return {TypeError} Returns a type error with additional data\n * attached to it in the property `data`\n */\n function createError(name, args, signatures) {\n var err, expected;\n var _name = name || 'unnamed';\n\n // test for wrong type at some index\n var matchingSignatures = signatures;\n var index;\n for (index = 0; index < args.length; index++) {\n var nextMatchingDefs = matchingSignatures.filter(function (signature) {\n var test = compileTest(getParamAtIndex(signature, index));\n return (index < signature.params.length || hasRestParam(signature.params)) &&\n test(args[index]);\n });\n\n if (nextMatchingDefs.length === 0) {\n // no matching signatures anymore, throw error \"wrong type\"\n expected = mergeExpectedParams(matchingSignatures, index);\n if (expected.length > 0) {\n var actualType = findTypeName(args[index]);\n\n err = new TypeError('Unexpected type of argument in function ' + _name +\n ' (expected: ' + expected.join(' or ') +\n ', actual: ' + actualType + ', index: ' + index + ')');\n err.data = {\n category: 'wrongType',\n fn: _name,\n index: index,\n actual: actualType,\n expected: expected\n }\n return err;\n }\n }\n else {\n matchingSignatures = nextMatchingDefs;\n }\n }\n\n // test for too few arguments\n var lengths = matchingSignatures.map(function (signature) {\n return hasRestParam(signature.params) ? Infinity : signature.params.length;\n });\n if (args.length < Math.min.apply(null, lengths)) {\n expected = mergeExpectedParams(matchingSignatures, index);\n err = new TypeError('Too few arguments in function ' + _name +\n ' (expected: ' + expected.join(' or ') +\n ', index: ' + args.length + ')');\n err.data = {\n category: 'tooFewArgs',\n fn: _name,\n index: args.length,\n expected: expected\n }\n return err;\n }\n\n // test for too many arguments\n var maxLength = Math.max.apply(null, lengths);\n if (args.length > maxLength) {\n err = new TypeError('Too many arguments in function ' + _name +\n ' (expected: ' + maxLength + ', actual: ' + args.length + ')');\n err.data = {\n category: 'tooManyArgs',\n fn: _name,\n index: args.length,\n expectedLength: maxLength\n }\n return err;\n }\n\n err = new TypeError('Arguments of type \"' + args.join(', ') +\n '\" do not match any of the defined signatures of function ' + _name + '.');\n err.data = {\n category: 'mismatch',\n actual: args.map(findTypeName)\n }\n return err;\n }\n\n /**\n * Find the lowest index of all exact types of a parameter (no conversions)\n * @param {Param} param\n * @return {number} Returns the index of the lowest type in typed.types\n */\n function getLowestTypeIndex (param) {\n var min = 999;\n\n for (var i = 0; i < param.types.length; i++) {\n if (isExactType(param.types[i])) {\n min = Math.min(min, param.types[i].typeIndex);\n }\n }\n\n return min;\n }\n\n /**\n * Find the lowest index of the conversion of all types of the parameter\n * having a conversion\n * @param {Param} param\n * @return {number} Returns the lowest index of the conversions of this type\n */\n function getLowestConversionIndex (param) {\n var min = 999;\n\n for (var i = 0; i < param.types.length; i++) {\n if (!isExactType(param.types[i])) {\n min = Math.min(min, param.types[i].conversionIndex);\n }\n }\n\n return min;\n }\n\n /**\n * Compare two params\n * @param {Param} param1\n * @param {Param} param2\n * @return {number} returns a negative number when param1 must get a lower\n * index than param2, a positive number when the opposite,\n * or zero when both are equal\n */\n function compareParams (param1, param2) {\n var c;\n\n // compare having a rest parameter or not\n c = param1.restParam - param2.restParam;\n if (c !== 0) {\n return c;\n }\n\n // compare having conversions or not\n c = hasConversions(param1) - hasConversions(param2);\n if (c !== 0) {\n return c;\n }\n\n // compare the index of the types\n c = getLowestTypeIndex(param1) - getLowestTypeIndex(param2);\n if (c !== 0) {\n return c;\n }\n\n // compare the index of any conversion\n return getLowestConversionIndex(param1) - getLowestConversionIndex(param2);\n }\n\n /**\n * Compare two signatures\n * @param {Signature} signature1\n * @param {Signature} signature2\n * @return {number} returns a negative number when param1 must get a lower\n * index than param2, a positive number when the opposite,\n * or zero when both are equal\n */\n function compareSignatures (signature1, signature2) {\n var len = Math.min(signature1.params.length, signature2.params.length);\n var i;\n var c;\n\n // compare whether the params have conversions at all or not\n c = signature1.params.some(hasConversions) - signature2.params.some(hasConversions)\n if (c !== 0) {\n return c;\n }\n\n // next compare whether the params have conversions one by one\n for (i = 0; i < len; i++) {\n c = hasConversions(signature1.params[i]) - hasConversions(signature2.params[i]);\n if (c !== 0) {\n return c;\n }\n }\n\n // compare the types of the params one by one\n for (i = 0; i < len; i++) {\n c = compareParams(signature1.params[i], signature2.params[i]);\n if (c !== 0) {\n return c;\n }\n }\n\n // compare the number of params\n return signature1.params.length - signature2.params.length;\n }\n\n /**\n * Get params containing all types that can be converted to the defined types.\n *\n * @param {ConversionDef[]} conversions\n * @param {string[]} typeNames\n * @return {ConversionDef[]} Returns the conversions that are available\n * for every type (if any)\n */\n function filterConversions(conversions, typeNames) {\n var matches = {};\n\n conversions.forEach(function (conversion) {\n if (typeNames.indexOf(conversion.from) === -1 &&\n typeNames.indexOf(conversion.to) !== -1 &&\n !matches[conversion.from]) {\n matches[conversion.from] = conversion;\n }\n });\n\n return Object.keys(matches).map(function (from) {\n return matches[from];\n });\n }\n\n /**\n * Preprocess arguments before calling the original function:\n * - if needed convert the parameters\n * - in case of rest parameters, move the rest parameters into an Array\n * @param {Param[]} params\n * @param {function} fn\n * @return {function} Returns a wrapped function\n */\n function compileArgsPreprocessing(params, fn) {\n var fnConvert = fn;\n\n // TODO: can we make this wrapper function smarter/simpler?\n\n if (params.some(hasConversions)) {\n var restParam = hasRestParam(params);\n var compiledConversions = params.map(compileArgConversion)\n\n fnConvert = function convertArgs() {\n var args = [];\n var last = restParam ? arguments.length - 1 : arguments.length;\n for (var i = 0; i < last; i++) {\n args[i] = compiledConversions[i](arguments[i]);\n }\n if (restParam) {\n args[last] = arguments[last].map(compiledConversions[last]);\n }\n\n return fn.apply(this, args);\n }\n }\n\n var fnPreprocess = fnConvert;\n if (hasRestParam(params)) {\n var offset = params.length - 1;\n\n fnPreprocess = function preprocessRestParams () {\n return fnConvert.apply(this,\n slice(arguments, 0, offset).concat([slice(arguments, offset)]));\n }\n }\n\n return fnPreprocess;\n }\n\n /**\n * Compile conversion for a parameter to the right type\n * @param {Param} param\n * @return {function} Returns the wrapped function that will convert arguments\n *\n */\n function compileArgConversion(param) {\n var test0, test1, conversion0, conversion1;\n var tests = [];\n var conversions = [];\n\n param.types.forEach(function (type) {\n if (type.conversion) {\n tests.push(findTypeByName(type.conversion.from).test);\n conversions.push(type.conversion.convert);\n }\n });\n\n // create optimized conversion functions depending on the number of conversions\n switch (conversions.length) {\n case 0:\n return function convertArg(arg) {\n return arg;\n }\n\n case 1:\n test0 = tests[0]\n conversion0 = conversions[0];\n return function convertArg(arg) {\n if (test0(arg)) {\n return conversion0(arg)\n }\n return arg;\n }\n\n case 2:\n test0 = tests[0]\n test1 = tests[1]\n conversion0 = conversions[0];\n conversion1 = conversions[1];\n return function convertArg(arg) {\n if (test0(arg)) {\n return conversion0(arg)\n }\n if (test1(arg)) {\n return conversion1(arg)\n }\n return arg;\n }\n\n default:\n return function convertArg(arg) {\n for (var i = 0; i < conversions.length; i++) {\n if (tests[i](arg)) {\n return conversions[i](arg);\n }\n }\n return arg;\n }\n }\n }\n\n /**\n * Convert an array with signatures into a map with signatures,\n * where signatures with union types are split into separate signatures\n *\n * Throws an error when there are conflicting types\n *\n * @param {Signature[]} signatures\n * @return {Object.<string, function>} Returns a map with signatures\n * as key and the original function\n * of this signature as value.\n */\n function createSignaturesMap(signatures) {\n var signaturesMap = {};\n signatures.forEach(function (signature) {\n if (!signature.params.some(hasConversions)) {\n splitParams(signature.params, true).forEach(function (params) {\n signaturesMap[stringifyParams(params)] = signature.fn;\n });\n }\n });\n\n return signaturesMap;\n }\n\n /**\n * Split params with union types in to separate params.\n *\n * For example:\n *\n * splitParams([['Array', 'Object'], ['string', 'RegExp'])\n * // returns:\n * // [\n * // ['Array', 'string'],\n * // ['Array', 'RegExp'],\n * // ['Object', 'string'],\n * // ['Object', 'RegExp']\n * // ]\n *\n * @param {Param[]} params\n * @param {boolean} ignoreConversionTypes\n * @return {Param[]}\n */\n function splitParams(params, ignoreConversionTypes) {\n function _splitParams(params, index, types) {\n if (index < params.length) {\n var param = params[index]\n var filteredTypes = ignoreConversionTypes\n ? param.types.filter(isExactType)\n : param.types;\n var typeGroups\n\n if (param.restParam) {\n // split the types of a rest parameter in two:\n // one with only exact types, and one with exact types and conversions\n var exactTypes = filteredTypes.filter(isExactType)\n typeGroups = exactTypes.length < filteredTypes.length\n ? [exactTypes, filteredTypes]\n : [filteredTypes]\n\n }\n else {\n // split all the types of a regular parameter into one type per group\n typeGroups = filteredTypes.map(function (type) {\n return [type]\n })\n }\n\n // recurse over the groups with types\n return flatMap(typeGroups, function (typeGroup) {\n return _splitParams(params, index + 1, types.concat([typeGroup]));\n });\n\n }\n else {\n // we've reached the end of the parameters. Now build a new Param\n var splittedParams = types.map(function (type, typeIndex) {\n return {\n types: type,\n restParam: (typeIndex === params.length - 1) && hasRestParam(params)\n }\n });\n\n return [splittedParams];\n }\n }\n\n return _splitParams(params, 0, []);\n }\n\n /**\n * Test whether two signatures have a conflicting signature\n * @param {Signature} signature1\n * @param {Signature} signature2\n * @return {boolean} Returns true when the signatures conflict, false otherwise.\n */\n function hasConflictingParams(signature1, signature2) {\n var ii = Math.max(signature1.params.length, signature2.params.length);\n\n for (var i = 0; i < ii; i++) {\n var typesNames1 = getExpectedTypeNames(signature1, i, true);\n var typesNames2 = getExpectedTypeNames(signature2, i, true);\n\n if (!hasOverlap(typesNames1, typesNames2)) {\n return false;\n }\n }\n\n var len1 = signature1.params.length;\n var len2 = signature2.params.length;\n var restParam1 = hasRestParam(signature1.params);\n var restParam2 = hasRestParam(signature2.params);\n\n return restParam1\n ? restParam2 ? (len1 === len2) : (len2 >= len1)\n : restParam2 ? (len1 >= len2) : (len1 === len2)\n }\n\n /**\n * Create a typed function\n * @param {String} name The name for the typed function\n * @param {Object.<string, function>} signaturesMap\n * An object with one or\n * multiple signatures as key, and the\n * function corresponding to the\n * signature as value.\n * @return {function} Returns the created typed function.\n */\n function createTypedFunction(name, signaturesMap) {\n if (Object.keys(signaturesMap).length === 0) {\n throw new SyntaxError('No signatures provided');\n }\n\n // parse the signatures, and check for conflicts\n var parsedSignatures = [];\n Object.keys(signaturesMap)\n .map(function (signature) {\n return parseSignature(signature, signaturesMap[signature], typed.conversions);\n })\n .filter(notNull)\n .forEach(function (parsedSignature) {\n // check whether this parameter conflicts with already parsed signatures\n var conflictingSignature = findInArray(parsedSignatures, function (s) {\n return hasConflictingParams(s, parsedSignature)\n });\n if (conflictingSignature) {\n throw new TypeError('Conflicting signatures \"' +\n stringifyParams(conflictingSignature.params) + '\" and \"' +\n stringifyParams(parsedSignature.params) + '\".');\n }\n\n parsedSignatures.push(parsedSignature);\n });\n\n // split and filter the types of the signatures, and then order them\n var signatures = flatMap(parsedSignatures, function (parsedSignature) {\n var params = parsedSignature ? splitParams(parsedSignature.params, false) : []\n\n return params.map(function (params) {\n return {\n params: params,\n fn: parsedSignature.fn\n };\n });\n }).filter(notNull);\n\n signatures.sort(compareSignatures);\n\n // we create a highly optimized checks for the first couple of signatures with max 2 arguments\n var ok0 = signatures[0] && signatures[0].params.length <= 2 && !hasRestParam(signatures[0].params);\n var ok1 = signatures[1] && signatures[1].params.length <= 2 && !hasRestParam(signatures[1].params);\n var ok2 = signatures[2] && signatures[2].params.length <= 2 && !hasRestParam(signatures[2].params);\n var ok3 = signatures[3] && signatures[3].params.length <= 2 && !hasRestParam(signatures[3].params);\n var ok4 = signatures[4] && signatures[4].params.length <= 2 && !hasRestParam(signatures[4].params);\n var ok5 = signatures[5] && signatures[5].params.length <= 2 && !hasRestParam(signatures[5].params);\n var allOk = ok0 && ok1 && ok2 && ok3 && ok4 && ok5;\n\n // compile the tests\n var tests = signatures.map(function (signature) {\n return compileTests(signature.params);\n });\n\n var test00 = ok0 ? compileTest(signatures[0].params[0]) : notOk;\n var test10 = ok1 ? compileTest(signatures[1].params[0]) : notOk;\n var test20 = ok2 ? compileTest(signatures[2].params[0]) : notOk;\n var test30 = ok3 ? compileTest(signatures[3].params[0]) : notOk;\n var test40 = ok4 ? compileTest(signatures[4].params[0]) : notOk;\n var test50 = ok5 ? compileTest(signatures[5].params[0]) : notOk;\n\n var test01 = ok0 ? compileTest(signatures[0].params[1]) : notOk;\n var test11 = ok1 ? compileTest(signatures[1].params[1]) : notOk;\n var test21 = ok2 ? compileTest(signatures[2].params[1]) : notOk;\n var test31 = ok3 ? compileTest(signatures[3].params[1]) : notOk;\n var test41 = ok4 ? compileTest(signatures[4].params[1]) : notOk;\n var test51 = ok5 ? compileTest(signatures[5].params[1]) : notOk;\n\n // compile the functions\n var fns = signatures.map(function(signature) {\n return compileArgsPreprocessing(signature.params, signature.fn);\n });\n\n var fn0 = ok0 ? fns[0] : undef;\n var fn1 = ok1 ? fns[1] : undef;\n var fn2 = ok2 ? fns[2] : undef;\n var fn3 = ok3 ? fns[3] : undef;\n var fn4 = ok4 ? fns[4] : undef;\n var fn5 = ok5 ? fns[5] : undef;\n\n var len0 = ok0 ? signatures[0].params.length : -1;\n var len1 = ok1 ? signatures[1].params.length : -1;\n var len2 = ok2 ? signatures[2].params.length : -1;\n var len3 = ok3 ? signatures[3].params.length : -1;\n var len4 = ok4 ? signatures[4].params.length : -1;\n var len5 = ok5 ? signatures[5].params.length : -1;\n\n // simple and generic, but also slow\n var iStart = allOk ? 6 : 0;\n var iEnd = signatures.length;\n var generic = function generic() {\n 'use strict';\n\n for (var i = iStart; i < iEnd; i++) {\n if (tests[i](arguments)) {\n return fns[i].apply(this, arguments);\n }\n }\n\n throw createError(name, arguments, signatures);\n }\n\n // create the typed function\n // fast, specialized version. Falls back to the slower, generic one if needed\n var fn = function fn(arg0, arg1) {\n 'use strict';\n\n if (arguments.length === len0 && test00(arg0) && test01(arg1)) { return fn0.apply(fn, arguments); }\n if (arguments.length === len1 && test10(arg0) && test11(arg1)) { return fn1.apply(fn, arguments); }\n if (arguments.length === len2 && test20(arg0) && test21(arg1)) { return fn2.apply(fn, arguments); }\n if (arguments.length === len3 && test30(arg0) && test31(arg1)) { return fn3.apply(fn, arguments); }\n if (arguments.length === len4 && test40(arg0) && test41(arg1)) { return fn4.apply(fn, arguments); }\n if (arguments.length === len5 && test50(arg0) && test51(arg1)) { return fn5.apply(fn, arguments); }\n\n return generic.apply(fn, arguments);\n }\n\n // attach name the typed function\n try {\n Object.defineProperty(fn, 'name', {value: name});\n }\n catch (err) {\n // old browsers do not support Object.defineProperty and some don't support setting the name property\n // the function name is not essential for the functioning, it's mostly useful for debugging,\n // so it's fine to have unnamed functions.\n }\n\n // attach signatures to the function\n fn.signatures = createSignaturesMap(signatures);\n\n return fn;\n }\n\n /**\n * Test whether a type should be NOT be ignored\n * @param {string} typeName\n * @return {boolean}\n */\n function notIgnore(typeName) {\n return typed.ignore.indexOf(typeName) === -1;\n }\n\n /**\n * trim a string\n * @param {string} str\n * @return {string}\n */\n function trim(str) {\n return str.trim();\n }\n\n /**\n * Test whether a string is not empty\n * @param {string} str\n * @return {boolean}\n */\n function notEmpty(str) {\n return !!str;\n }\n\n /**\n * test whether a value is not strict equal to null\n * @param {*} value\n * @return {boolean}\n */\n function notNull(value) {\n return value !== null;\n }\n\n /**\n * Test whether a parameter has no types defined\n * @param {Param} param\n * @return {boolean}\n */\n function isInvalidParam (param) {\n return param.types.length === 0;\n }\n\n /**\n * Return all but the last items of an array\n * @param {Array} arr\n * @return {Array}\n */\n function initial(arr) {\n return arr.slice(0, arr.length - 1);\n }\n\n /**\n * return the last item of an array\n * @param {Array} arr\n * @return {*}\n */\n function last(arr) {\n return arr[arr.length - 1];\n }\n\n /**\n * Slice an array or function Arguments\n * @param {Array | Arguments | IArguments} arr\n * @param {number} start\n * @param {number} [end]\n * @return {Array}\n */\n function slice(arr, start, end) {\n return Array.prototype.slice.call(arr, start, end);\n }\n\n /**\n * Test whether an array contains some item\n * @param {Array} array\n * @param {*} item\n * @return {boolean} Returns true if array contains item, false if not.\n */\n function contains(array, item) {\n return array.indexOf(item) !== -1;\n }\n\n /**\n * Test whether two arrays have overlapping items\n * @param {Array} array1\n * @param {Array} array2\n * @return {boolean} Returns true when at least one item exists in both arrays\n */\n function hasOverlap(array1, array2) {\n for (var i = 0; i < array1.length; i++) {\n if (contains(array2, array1[i])) {\n return true;\n }\n }\n\n return false;\n }\n\n /**\n * Return the first item from an array for which test(arr[i]) returns true\n * @param {Array} arr\n * @param {function} test\n * @return {* | undefined} Returns the first matching item\n * or undefined when there is no match\n */\n function findInArray(arr, test) {\n for (var i = 0; i < arr.length; i++) {\n if (test(arr[i])) {\n return arr[i];\n }\n }\n return undefined;\n }\n\n /**\n * Filter unique items of an array with strings\n * @param {string[]} arr\n * @return {string[]}\n */\n function uniq(arr) {\n var entries = {}\n for (var i = 0; i < arr.length; i++) {\n entries[arr[i]] = true;\n }\n return Object.keys(entries);\n }\n\n /**\n * Flat map the result invoking a callback for every item in an array.\n * https://gist.github.com/samgiles/762ee337dff48623e729\n * @param {Array} arr\n * @param {function} callback\n * @return {Array}\n */\n function flatMap(arr, callback) {\n return Array.prototype.concat.apply([], arr.map(callback));\n }\n\n /**\n * Retrieve the function name from a set of typed functions,\n * and check whether the name of all functions match (if given)\n * @param {function[]} fns\n */\n function getName (fns) {\n var name = '';\n\n for (var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n\n // check whether the names are the same when defined\n if ((typeof fn.signatures === 'object' || typeof fn.signature === 'string') && fn.name !== '') {\n if (name === '') {\n name = fn.name;\n }\n else if (name !== fn.name) {\n var err = new Error('Function names do not match (expected: ' + name + ', actual: ' + fn.name + ')');\n err.data = {\n actual: fn.name,\n expected: name\n };\n throw err;\n }\n }\n }\n\n return name;\n }\n\n // extract and merge all signatures of a list with typed functions\n function extractSignatures(fns) {\n var err;\n var signaturesMap = {};\n\n function validateUnique(_signature, _fn) {\n if (signaturesMap.hasOwnProperty(_signature) && _fn !== signaturesMap[_signature]) {\n err = new Error('Signature \"' + _signature + '\" is defined twice');\n err.data = {signature: _signature};\n throw err;\n // else: both signatures point to the same function, that's fine\n }\n }\n\n for (var i = 0; i < fns.length; i++) {\n var fn = fns[i];\n\n // test whether this is a typed-function\n if (typeof fn.signatures === 'object') {\n // merge the signatures\n for (var signature in fn.signatures) {\n if (fn.signatures.hasOwnProperty(signature)) {\n validateUnique(signature, fn.signatures[signature]);\n signaturesMap[signature] = fn.signatures[signature];\n }\n }\n }\n else if (typeof fn.signature === 'string') {\n validateUnique(fn.signature, fn);\n signaturesMap[fn.signature] = fn;\n }\n else {\n err = new TypeError('Function is no typed-function (index: ' + i + ')');\n err.data = {index: i};\n throw err;\n }\n }\n\n return signaturesMap;\n }\n\n typed = createTypedFunction('typed', {\n 'string, Object': createTypedFunction,\n 'Object': function (signaturesMap) {\n // find existing name\n var fns = [];\n for (var signature in signaturesMap) {\n if (signaturesMap.hasOwnProperty(signature)) {\n fns.push(signaturesMap[signature]);\n }\n }\n var name = getName(fns);\n return createTypedFunction(name, signaturesMap);\n },\n '...Function': function (fns) {\n return createTypedFunction(getName(fns), extractSignatures(fns));\n },\n 'string, ...Function': function (name, fns) {\n return createTypedFunction(name, extractSignatures(fns));\n }\n });\n\n typed.create = create;\n typed.types = _types;\n typed.conversions = _conversions;\n typed.ignore = _ignore;\n typed.convert = convert;\n typed.find = find;\n\n /**\n * add a type\n * @param {{name: string, test: function}} type\n * @param {boolean} [beforeObjectTest=true]\n * If true, the new test will be inserted before\n * the test with name 'Object' (if any), since\n * tests for Object match Array and classes too.\n */\n typed.addType = function (type, beforeObjectTest) {\n if (!type || typeof type.name !== 'string' || typeof type.test !== 'function') {\n throw new TypeError('Object with properties {name: string, test: function} expected');\n }\n\n if (beforeObjectTest !== false) {\n for (var i = 0; i < typed.types.length; i++) {\n if (typed.types[i].name === 'Object') {\n typed.types.splice(i, 0, type);\n return\n }\n }\n }\n\n typed.types.push(type);\n };\n\n // add a conversion\n typed.addConversion = function (conversion) {\n if (!conversion\n || typeof conversion.from !== 'string'\n || typeof conversion.to !== 'string'\n || typeof conversion.convert !== 'function') {\n throw new TypeError('Object with properties {from: string, to: string, convert: function} expected');\n }\n\n typed.conversions.push(conversion);\n };\n\n return typed;\n }\n\n return create();\n}));\n","// A library of seedable RNGs implemented in Javascript.\n//\n// Usage:\n//\n// var seedrandom = require('seedrandom');\n// var random = seedrandom(1); // or any seed.\n// var x = random(); // 0 <= x < 1. Every bit is random.\n// var x = random.quick(); // 0 <= x < 1. 32 bits of randomness.\n\n// alea, a 53-bit multiply-with-carry generator by Johannes Baagøe.\n// Period: ~2^116\n// Reported to pass all BigCrush tests.\nvar alea = require('./lib/alea');\n\n// xor128, a pure xor-shift generator by George Marsaglia.\n// Period: 2^128-1.\n// Reported to fail: MatrixRank and LinearComp.\nvar xor128 = require('./lib/xor128');\n\n// xorwow, George Marsaglia's 160-bit xor-shift combined plus weyl.\n// Period: 2^192-2^32\n// Reported to fail: CollisionOver, SimpPoker, and LinearComp.\nvar xorwow = require('./lib/xorwow');\n\n// xorshift7, by François Panneton and Pierre L'ecuyer, takes\n// a different approach: it adds robustness by allowing more shifts\n// than Marsaglia's original three. It is a 7-shift generator\n// with 256 bits, that passes BigCrush with no systmatic failures.\n// Period 2^256-1.\n// No systematic BigCrush failures reported.\nvar xorshift7 = require('./lib/xorshift7');\n\n// xor4096, by Richard Brent, is a 4096-bit xor-shift with a\n// very long period that also adds a Weyl generator. It also passes\n// BigCrush with no systematic failures. Its long period may\n// be useful if you have many generators and need to avoid\n// collisions.\n// Period: 2^4128-2^32.\n// No systematic BigCrush failures reported.\nvar xor4096 = require('./lib/xor4096');\n\n// Tyche-i, by Samuel Neves and Filipe Araujo, is a bit-shifting random\n// number generator derived from ChaCha, a modern stream cipher.\n// https://eden.dei.uc.pt/~sneves/pubs/2011-snfa2.pdf\n// Period: ~2^127\n// No systematic BigCrush failures reported.\nvar tychei = require('./lib/tychei');\n\n// The original ARC4-based prng included in this library.\n// Period: ~2^1600\nvar sr = require('./seedrandom');\n\nsr.alea = alea;\nsr.xor128 = xor128;\nsr.xorwow = xorwow;\nsr.xorshift7 = xorshift7;\nsr.xor4096 = xor4096;\nsr.tychei = tychei;\n\nmodule.exports = sr;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7 14l5-5 5 5z\"\n}), 'ArrowDropUp');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');\n\nexports.default = _default;","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n this.pos = 0;\n this.type = 0;\n this.length = this.buf.length;\n}\n\nPbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\n// Threshold chosen based on both benchmarking and knowledge about browser string\n// data structures (which currently switch structure types at 12 bytes or more)\nvar TEXT_DECODER_MIN_LENGTH = 12;\nvar utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');\n\nPbf.prototype = {\n\n destroy: function() {\n this.buf = null;\n },\n\n // === READING =================================================================\n\n readFields: function(readField, result, end) {\n end = end || this.length;\n\n while (this.pos < end) {\n var val = this.readVarint(),\n tag = val >> 3,\n startPos = this.pos;\n\n this.type = val & 0x7;\n readField(tag, result, this);\n\n if (this.pos === startPos) this.skip(val);\n }\n return result;\n },\n\n readMessage: function(readField, result) {\n return this.readFields(readField, result, this.readVarint() + this.pos);\n },\n\n readFixed32: function() {\n var val = readUInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n readSFixed32: function() {\n var val = readInt32(this.buf, this.pos);\n this.pos += 4;\n return val;\n },\n\n // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n readFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readSFixed64: function() {\n var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n this.pos += 8;\n return val;\n },\n\n readFloat: function() {\n var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n this.pos += 4;\n return val;\n },\n\n readDouble: function() {\n var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n this.pos += 8;\n return val;\n },\n\n readVarint: function(isSigned) {\n var buf = this.buf,\n val, b;\n\n b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n b = buf[this.pos]; val |= (b & 0x0f) << 28;\n\n return readVarintRemainder(val, isSigned, this);\n },\n\n readVarint64: function() { // for compatibility with v2.0.1\n return this.readVarint(true);\n },\n\n readSVarint: function() {\n var num = this.readVarint();\n return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n },\n\n readBoolean: function() {\n return Boolean(this.readVarint());\n },\n\n readString: function() {\n var end = this.readVarint() + this.pos;\n var pos = this.pos;\n this.pos = end;\n\n if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {\n // longer strings are fast with the built-in browser TextDecoder API\n return readUtf8TextDecoder(this.buf, pos, end);\n }\n // short strings are fast with our custom implementation\n return readUtf8(this.buf, pos, end);\n },\n\n readBytes: function() {\n var end = this.readVarint() + this.pos,\n buffer = this.buf.subarray(this.pos, end);\n this.pos = end;\n return buffer;\n },\n\n // verbose for performance reasons; doesn't affect gzipped size\n\n readPackedVarint: function(arr, isSigned) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readVarint(isSigned));\n return arr;\n },\n readPackedSVarint: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSVarint());\n return arr;\n },\n readPackedBoolean: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readBoolean());\n return arr;\n },\n readPackedFloat: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFloat());\n return arr;\n },\n readPackedDouble: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readDouble());\n return arr;\n },\n readPackedFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed32());\n return arr;\n },\n readPackedSFixed32: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed32());\n return arr;\n },\n readPackedFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readFixed64());\n return arr;\n },\n readPackedSFixed64: function(arr) {\n if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());\n var end = readPackedEnd(this);\n arr = arr || [];\n while (this.pos < end) arr.push(this.readSFixed64());\n return arr;\n },\n\n skip: function(val) {\n var type = val & 0x7;\n if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n else if (type === Pbf.Fixed32) this.pos += 4;\n else if (type === Pbf.Fixed64) this.pos += 8;\n else throw new Error('Unimplemented type: ' + type);\n },\n\n // === WRITING =================================================================\n\n writeTag: function(tag, type) {\n this.writeVarint((tag << 3) | type);\n },\n\n realloc: function(min) {\n var length = this.length || 16;\n\n while (length < this.pos + min) length *= 2;\n\n if (length !== this.length) {\n var buf = new Uint8Array(length);\n buf.set(this.buf);\n this.buf = buf;\n this.length = length;\n }\n },\n\n finish: function() {\n this.length = this.pos;\n this.pos = 0;\n return this.buf.subarray(0, this.length);\n },\n\n writeFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeSFixed32: function(val) {\n this.realloc(4);\n writeInt32(this.buf, val, this.pos);\n this.pos += 4;\n },\n\n writeFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeSFixed64: function(val) {\n this.realloc(8);\n writeInt32(this.buf, val & -1, this.pos);\n writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n this.pos += 8;\n },\n\n writeVarint: function(val) {\n val = +val || 0;\n\n if (val > 0xfffffff || val < 0) {\n writeBigVarint(val, this);\n return;\n }\n\n this.realloc(4);\n\n this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n this.buf[this.pos++] = (val >>> 7) & 0x7f;\n },\n\n writeSVarint: function(val) {\n this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n },\n\n writeBoolean: function(val) {\n this.writeVarint(Boolean(val));\n },\n\n writeString: function(str) {\n str = String(str);\n this.realloc(str.length * 4);\n\n this.pos++; // reserve 1 byte for short string length\n\n var startPos = this.pos;\n // write the string directly to the buffer and see how much was written\n this.pos = writeUtf8(this.buf, str, this.pos);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeFloat: function(val) {\n this.realloc(4);\n ieee754.write(this.buf, val, this.pos, true, 23, 4);\n this.pos += 4;\n },\n\n writeDouble: function(val) {\n this.realloc(8);\n ieee754.write(this.buf, val, this.pos, true, 52, 8);\n this.pos += 8;\n },\n\n writeBytes: function(buffer) {\n var len = buffer.length;\n this.writeVarint(len);\n this.realloc(len);\n for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n },\n\n writeRawMessage: function(fn, obj) {\n this.pos++; // reserve 1 byte for short message length\n\n // write the message directly to the buffer and see how much was written\n var startPos = this.pos;\n fn(obj, this);\n var len = this.pos - startPos;\n\n if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n // finally, write the message length in the reserved place and restore the position\n this.pos = startPos - 1;\n this.writeVarint(len);\n this.pos += len;\n },\n\n writeMessage: function(tag, fn, obj) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeRawMessage(fn, obj);\n },\n\n writePackedVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr); },\n writePackedSVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr); },\n writePackedBoolean: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr); },\n writePackedFloat: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr); },\n writePackedDouble: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr); },\n writePackedFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr); },\n writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },\n writePackedFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr); },\n writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },\n\n writeBytesField: function(tag, buffer) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeBytes(buffer);\n },\n writeFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFixed32(val);\n },\n writeSFixed32Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeSFixed32(val);\n },\n writeFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeFixed64(val);\n },\n writeSFixed64Field: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeSFixed64(val);\n },\n writeVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeVarint(val);\n },\n writeSVarintField: function(tag, val) {\n this.writeTag(tag, Pbf.Varint);\n this.writeSVarint(val);\n },\n writeStringField: function(tag, str) {\n this.writeTag(tag, Pbf.Bytes);\n this.writeString(str);\n },\n writeFloatField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed32);\n this.writeFloat(val);\n },\n writeDoubleField: function(tag, val) {\n this.writeTag(tag, Pbf.Fixed64);\n this.writeDouble(val);\n },\n writeBooleanField: function(tag, val) {\n this.writeVarintField(tag, Boolean(val));\n }\n};\n\nfunction readVarintRemainder(l, s, p) {\n var buf = p.buf,\n h, b;\n\n b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n return pbf.type === Pbf.Bytes ?\n pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n if (isSigned) {\n return high * 0x100000000 + (low >>> 0);\n }\n\n return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n var low, high;\n\n if (val >= 0) {\n low = (val % 0x100000000) | 0;\n high = (val / 0x100000000) | 0;\n } else {\n low = ~(-val % 0x100000000);\n high = ~(-val / 0x100000000);\n\n if (low ^ 0xffffffff) {\n low = (low + 1) | 0;\n } else {\n low = 0;\n high = (high + 1) | 0;\n }\n }\n\n if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n throw new Error('Given varint doesn\\'t fit into 10 bytes');\n }\n\n pbf.realloc(10);\n\n writeBigVarintLow(low, high, pbf);\n writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n pbf.buf[pbf.pos] = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n var lsb = (high & 0x07) << 4;\n\n pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n pbf.buf[pbf.pos++] = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n var extraLen =\n len <= 0x3fff ? 1 :\n len <= 0x1fffff ? 2 :\n len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));\n\n // if 1 byte isn't enough for encoding message length, shift the data to the right\n pbf.realloc(extraLen);\n for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }\nfunction writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }\nfunction writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }\nfunction writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }\nfunction writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }\nfunction writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n buf[pos] = val;\n buf[pos + 1] = (val >>> 8);\n buf[pos + 2] = (val >>> 16);\n buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n return ((buf[pos]) |\n (buf[pos + 1] << 8) |\n (buf[pos + 2] << 16)) +\n (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n var str = '';\n var i = pos;\n\n while (i < end) {\n var b0 = buf[i];\n var c = null; // codepoint\n var bytesPerSequence =\n b0 > 0xEF ? 4 :\n b0 > 0xDF ? 3 :\n b0 > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence > end) break;\n\n var b1, b2, b3;\n\n if (bytesPerSequence === 1) {\n if (b0 < 0x80) {\n c = b0;\n }\n } else if (bytesPerSequence === 2) {\n b1 = buf[i + 1];\n if ((b1 & 0xC0) === 0x80) {\n c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n if (c <= 0x7F) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 3) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n c = null;\n }\n }\n } else if (bytesPerSequence === 4) {\n b1 = buf[i + 1];\n b2 = buf[i + 2];\n b3 = buf[i + 3];\n if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n if (c <= 0xFFFF || c >= 0x110000) {\n c = null;\n }\n }\n }\n\n if (c === null) {\n c = 0xFFFD;\n bytesPerSequence = 1;\n\n } else if (c > 0xFFFF) {\n c -= 0x10000;\n str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n c = 0xDC00 | c & 0x3FF;\n }\n\n str += String.fromCharCode(c);\n i += bytesPerSequence;\n }\n\n return str;\n}\n\nfunction readUtf8TextDecoder(buf, pos, end) {\n return utf8TextDecoder.decode(buf.subarray(pos, end));\n}\n\nfunction writeUtf8(buf, str, pos) {\n for (var i = 0, c, lead; i < str.length; i++) {\n c = str.charCodeAt(i); // code point\n\n if (c > 0xD7FF && c < 0xE000) {\n if (lead) {\n if (c < 0xDC00) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = c;\n continue;\n } else {\n c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n lead = null;\n }\n } else {\n if (c > 0xDBFF || (i + 1 === str.length)) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n } else {\n lead = c;\n }\n continue;\n }\n } else if (lead) {\n buf[pos++] = 0xEF;\n buf[pos++] = 0xBF;\n buf[pos++] = 0xBD;\n lead = null;\n }\n\n if (c < 0x80) {\n buf[pos++] = c;\n } else {\n if (c < 0x800) {\n buf[pos++] = c >> 0x6 | 0xC0;\n } else {\n if (c < 0x10000) {\n buf[pos++] = c >> 0xC | 0xE0;\n } else {\n buf[pos++] = c >> 0x12 | 0xF0;\n buf[pos++] = c >> 0xC & 0x3F | 0x80;\n }\n buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n }\n buf[pos++] = c & 0x3F | 0x80;\n }\n }\n return pos;\n}\n","function e({modulePath:e=\".\",importFunctionName:t=\"__import__\"}={}){try{self[t]=new Function(\"u\",\"return import(u)\")}catch(o){const r=new URL(e,location),n=e=>{URL.revokeObjectURL(e.src),e.remove()};self[t]=e=>new Promise((o,a)=>{const c=new URL(e,r);if(self[t].moduleMap[c])return o(self[t].moduleMap[c]);const l=new Blob([`import * as m from '${c}';`,`${t}.moduleMap['${c}']=m;`],{type:\"text/javascript\"}),m=Object.assign(document.createElement(\"script\"),{type:\"module\",src:URL.createObjectURL(l),onerror(){a(new Error(`Failed to import: ${e}`)),n(m)},onload(){o(self[t].moduleMap[c]),n(m)}});document.head.appendChild(m)}),self[t].moduleMap={}}}var t=Object.freeze({initialize:e});export default t;export{e as initialize};\n","import { HTTPStore, openArray, slice } from 'zarr';\n\nfunction multivecChunksToTileDenseArray(chunks, tileShape, isRow) {\n // Allocate a Float32Array for the tile (with length tile_size).\n const fullTileLength = (isRow ? tileShape[1] : tileShape[0] * tileShape[1]);\n const fullTileArray = new Float32Array(fullTileLength);\n\n // Fill in the data for each sample and chunk.\n let offset = 0;\n if(isRow) {\n // Single row, no need to iterate over samples.\n for (const chunk of chunks) {\n const chunkData = chunk.data;\n fullTileArray.set(chunkData, offset);\n offset += chunkData.length;\n }\n } else {\n // Multi-row, need to iterate over samples.\n const numSamples = tileShape[0];\n for (let sampleI = 0; sampleI < numSamples; sampleI++) {\n for (const chunk of chunks) {\n const chunkData = chunk.data[sampleI];\n fullTileArray.set(chunkData, offset);\n offset += chunkData.length;\n }\n }\n }\n \n return fullTileArray;\n}\n\nconst ZarrMultivecDataFetcher = function ZarrMultivecDataFetcher(HGC, ...args) {\n\n if (!new.target) {\n throw new Error(\n 'Uncaught TypeError: Class constructor cannot be invoked without \"new\"',\n );\n }\n\n const { slugid } = HGC.libraries;\n const {\n absToChr,\n parseChromsizesRows,\n genomicRangeToChromosomeChunks,\n DenseDataExtrema1D,\n minNonZero,\n maxNonZero,\n } = HGC.utils;\n\n class ZarrMultivecDataFetcherClass {\n constructor(dataConfig) {\n this.dataConfig = dataConfig;\n this.trackUid = slugid.nice();\n \n if (dataConfig.url) {\n // console.assert(dataConfig.url.endsWith('.zarr'));\n // S3 bucket must have a CORS policy to allow reading from any origin.\n this.store = new HTTPStore(dataConfig.url, { supportedMethods: ['GET'] });\n }\n\n if(dataConfig.row !== undefined) {\n this.row = dataConfig.row;\n }\n }\n\n tilesetInfo(callback) {\n this.tilesetInfoLoading = true;\n \n // Use the tileset_info stored as JSON in file.zarr/.zattrs\n return this.store\n .getItem('.zattrs')\n .then(bytes => {\n const decoder = new TextDecoder('utf-8');\n const json = JSON.parse(decoder.decode(bytes));\n return json;\n })\n .then(attrs => {\n this.tilesetInfoLoading = false;\n\n const chromSizes = attrs.multiscales.map(d => ([d.name, d.metadata.chromsize]));\n \n const finalChrom = attrs.multiscales[attrs.multiscales.length - 1];\n const maxPos = finalChrom.metadata.chromoffset + finalChrom.metadata.chromsize;\n const tileSize = attrs.shape[1];\n const retVal = {\n ...attrs,\n shape: [attrs.shape[1], attrs.shape[0]],\n chromSizes,\n tile_size: tileSize,\n max_width: maxPos,\n min_pos: [0],\n max_pos: [maxPos],\n max_zoom: Math.ceil(Math.log(maxPos / tileSize) / Math.log(2)),\n };\n \n if (callback) {\n callback(retVal);\n }\n \n return retVal;\n })\n .catch(err => {\n this.tilesetInfoLoading = false;\n \n if (callback) {\n callback({\n error: `Error parsing zarr multivec: ${err}`,\n });\n }\n });\n }\n \n fetchTilesDebounced(receivedTiles, tileIds) {\n const tiles = {};\n \n const validTileIds = [];\n const tilePromises = [];\n \n for (const tileId of tileIds) {\n const parts = tileId.split('.');\n const z = parseInt(parts[0], 10);\n const x = parseInt(parts[1], 10);\n \n if (Number.isNaN(x) || Number.isNaN(z)) {\n console.warn('Invalid tile zoom or position:', z, x);\n continue;\n }\n \n validTileIds.push(tileId);\n tilePromises.push(this.tile(z, x, tileId));\n }\n \n Promise.all(tilePromises).then(values => {\n for (let i = 0; i < values.length; i++) {\n const validTileId = validTileIds[i];\n tiles[validTileId] = values[i];\n tiles[validTileId].tilePositionId = validTileId;\n }\n receivedTiles(tiles);\n });\n return tiles;\n }\n \n tile(z, x, tileId) {\n const { store } = this;\n return this.tilesetInfo().then(tsInfo => {\n // const multiscales = tsInfo.multiscales;\n \n // Adapted from clodius.tiles.multivec.get_single_tile\n // Reference: https://github.com/higlass/clodius/blob/develop/clodius/tiles/multivec.py#L66\n \n // z is the index of the resolution that should be selected.\n // Resolution is size of each bin (except for the last bin in each chromosome).\n const resolution = +tsInfo.resolutions[z];\n const tileSize = +tsInfo.tile_size;\n const binSize = resolution;\n \n // Where in the data does the tile start and end?\n const tileStart = x * tileSize * resolution;\n const tileEnd = tileStart + tileSize * resolution;\n \n // chromSizes is an array of \"tuples\" [ [\"chr1\", 1000], ... ]\n const chromSizes = tsInfo.chromSizes;\n \n // Adapted from clodius.tiles.multivec.get_tile\n // Reference: https://github.com/higlass/clodius/blob/develop/clodius/tiles/multivec.py#L110\n\n const chromInfo = parseChromsizesRows(chromSizes);\n const [chrStart, chrStartPos] = absToChr(tileStart, chromInfo);\n const [chrEnd, chrEndPos] = absToChr(tileEnd, chromInfo);\n const genomicStart = { chr: chrStart, pos: chrStartPos };\n const genomicEnd = { chr: chrEnd, pos: chrEndPos };\n \n // Using the [genomicStart, genomicEnd] range, get an array of \"chromosome chunks\",\n // where each chunk range starts and ends with the same chromosome.\n // Start a new chromosome chunk at each chromosome boundary.\n const chrChunks = genomicRangeToChromosomeChunks(\n chromSizes,\n genomicStart,\n genomicEnd,\n binSize,\n tileSize,\n );\n \n // Get the zarr data for each chromosome chunk,\n // since data for each chromosome is stored in a separate zarr array.\n return Promise.all(\n chrChunks.map(([chrName, zStart, zEnd]) => {\n return openArray({\n store,\n path: `/chromosomes/${chrName}/${resolution}/`,\n mode: 'r',\n }).then(arr => (this.row !== undefined\n ? arr.getRaw([this.row, slice(zStart, zEnd)])\n : arr.get([null, slice(zStart, zEnd)])\n ));\n }),\n ).then(chunks => {\n const dense = multivecChunksToTileDenseArray(chunks, [tsInfo.shape[1], tsInfo.shape[0]], this.row !== undefined);\n return Promise.resolve({\n dense,\n denseDataExtrema: new DenseDataExtrema1D(dense),\n dtype: 'float32',\n min_value: Math.min.apply(null, dense),\n max_value: Math.max.apply(null, dense),\n minNonZero: minNonZero(dense),\n maxNonZero: maxNonZero(dense),\n server: null,\n size: 1,\n shape: tsInfo.shape,\n tileId,\n tilePos: [x],\n tilePositionId: tileId,\n tilesetUid: null,\n zoomLevel: z,\n });\n });\n });\n }\n } // end class\n return new ZarrMultivecDataFetcherClass(...args);\n} // end function wrapper\n\n\nZarrMultivecDataFetcher.config = {\n type: 'zarr-multivec',\n};\n\nexport default ZarrMultivecDataFetcher;\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nmodule.exports = {\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: require('./internal/constants').SEMVER_SPEC_VERSION,\n SemVer: require('./classes/semver'),\n compareIdentifiers: require('./internal/identifiers').compareIdentifiers,\n rcompareIdentifiers: require('./internal/identifiers').rcompareIdentifiers,\n parse: require('./functions/parse'),\n valid: require('./functions/valid'),\n clean: require('./functions/clean'),\n inc: require('./functions/inc'),\n diff: require('./functions/diff'),\n major: require('./functions/major'),\n minor: require('./functions/minor'),\n patch: require('./functions/patch'),\n prerelease: require('./functions/prerelease'),\n compare: require('./functions/compare'),\n rcompare: require('./functions/rcompare'),\n compareLoose: require('./functions/compare-loose'),\n compareBuild: require('./functions/compare-build'),\n sort: require('./functions/sort'),\n rsort: require('./functions/rsort'),\n gt: require('./functions/gt'),\n lt: require('./functions/lt'),\n eq: require('./functions/eq'),\n neq: require('./functions/neq'),\n gte: require('./functions/gte'),\n lte: require('./functions/lte'),\n cmp: require('./functions/cmp'),\n coerce: require('./functions/coerce'),\n Comparator: require('./classes/comparator'),\n Range: require('./classes/range'),\n satisfies: require('./functions/satisfies'),\n toComparators: require('./ranges/to-comparators'),\n maxSatisfying: require('./ranges/max-satisfying'),\n minSatisfying: require('./ranges/min-satisfying'),\n minVersion: require('./ranges/min-version'),\n validRange: require('./ranges/valid'),\n outside: require('./ranges/outside'),\n gtr: require('./ranges/gtr'),\n ltr: require('./ranges/ltr'),\n intersects: require('./ranges/intersects'),\n simplifyRange: require('./ranges/simplify'),\n subset: require('./ranges/subset'),\n}\n","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.4\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n}\n","/**\n * Helper method that determines when to recalculate row or column metadata.\n */\nexport default function calculateSizeAndPositionDataAndUpdateScrollOffset(_ref) {\n var cellCount = _ref.cellCount,\n cellSize = _ref.cellSize,\n computeMetadataCallback = _ref.computeMetadataCallback,\n computeMetadataCallbackProps = _ref.computeMetadataCallbackProps,\n nextCellsCount = _ref.nextCellsCount,\n nextCellSize = _ref.nextCellSize,\n nextScrollToIndex = _ref.nextScrollToIndex,\n scrollToIndex = _ref.scrollToIndex,\n updateScrollOffsetForScrollToIndex = _ref.updateScrollOffsetForScrollToIndex;\n\n // Don't compare cell sizes if they are functions because inline functions would cause infinite loops.\n // In that event users should use the manual recompute methods to inform of changes.\n if (cellCount !== nextCellsCount || (typeof cellSize === 'number' || typeof nextCellSize === 'number') && cellSize !== nextCellSize) {\n computeMetadataCallback(computeMetadataCallbackProps); // Updated cell metadata may have hidden the previous scrolled-to item.\n // In this case we should also update the scrollTop to ensure it stays visible.\n\n if (scrollToIndex >= 0 && scrollToIndex === nextScrollToIndex) {\n updateScrollOffsetForScrollToIndex();\n }\n }\n}","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\n/**\n * Just-in-time calculates and caches size and position information for a collection of cells.\n */\nvar CellSizeAndPositionManager =\n/*#__PURE__*/\nfunction () {\n // Cache of size and position data for cells, mapped by cell index.\n // Note that invalid values may exist in this map so only rely on cells up to this._lastMeasuredIndex\n // Measurements for cells up to this index can be trusted; cells afterward should be estimated.\n // Used in deferred mode to track which cells have been queued for measurement.\n function CellSizeAndPositionManager(_ref) {\n var cellCount = _ref.cellCount,\n cellSizeGetter = _ref.cellSizeGetter,\n estimatedCellSize = _ref.estimatedCellSize;\n\n _classCallCheck(this, CellSizeAndPositionManager);\n\n _defineProperty(this, \"_cellSizeAndPositionData\", {});\n\n _defineProperty(this, \"_lastMeasuredIndex\", -1);\n\n _defineProperty(this, \"_lastBatchedIndex\", -1);\n\n _defineProperty(this, \"_cellCount\", void 0);\n\n _defineProperty(this, \"_cellSizeGetter\", void 0);\n\n _defineProperty(this, \"_estimatedCellSize\", void 0);\n\n this._cellSizeGetter = cellSizeGetter;\n this._cellCount = cellCount;\n this._estimatedCellSize = estimatedCellSize;\n }\n\n _createClass(CellSizeAndPositionManager, [{\n key: \"areOffsetsAdjusted\",\n value: function areOffsetsAdjusted() {\n return false;\n }\n }, {\n key: \"configure\",\n value: function configure(_ref2) {\n var cellCount = _ref2.cellCount,\n estimatedCellSize = _ref2.estimatedCellSize,\n cellSizeGetter = _ref2.cellSizeGetter;\n this._cellCount = cellCount;\n this._estimatedCellSize = estimatedCellSize;\n this._cellSizeGetter = cellSizeGetter;\n }\n }, {\n key: \"getCellCount\",\n value: function getCellCount() {\n return this._cellCount;\n }\n }, {\n key: \"getEstimatedCellSize\",\n value: function getEstimatedCellSize() {\n return this._estimatedCellSize;\n }\n }, {\n key: \"getLastMeasuredIndex\",\n value: function getLastMeasuredIndex() {\n return this._lastMeasuredIndex;\n }\n }, {\n key: \"getOffsetAdjustment\",\n value: function getOffsetAdjustment() {\n return 0;\n }\n /**\n * This method returns the size and position for the cell at the specified index.\n * It just-in-time calculates (or used cached values) for cells leading up to the index.\n */\n\n }, {\n key: \"getSizeAndPositionOfCell\",\n value: function getSizeAndPositionOfCell(index) {\n if (index < 0 || index >= this._cellCount) {\n throw Error(\"Requested index \".concat(index, \" is outside of range 0..\").concat(this._cellCount));\n }\n\n if (index > this._lastMeasuredIndex) {\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n var offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\n\n for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {\n var size = this._cellSizeGetter({\n index: i\n }); // undefined or NaN probably means a logic error in the size getter.\n // null means we're using CellMeasurer and haven't yet measured a given index.\n\n\n if (size === undefined || isNaN(size)) {\n throw Error(\"Invalid size returned for cell \".concat(i, \" of value \").concat(size));\n } else if (size === null) {\n this._cellSizeAndPositionData[i] = {\n offset: offset,\n size: 0\n };\n this._lastBatchedIndex = index;\n } else {\n this._cellSizeAndPositionData[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n this._lastMeasuredIndex = index;\n }\n }\n }\n\n return this._cellSizeAndPositionData[index];\n }\n }, {\n key: \"getSizeAndPositionOfLastMeasuredCell\",\n value: function getSizeAndPositionOfLastMeasuredCell() {\n return this._lastMeasuredIndex >= 0 ? this._cellSizeAndPositionData[this._lastMeasuredIndex] : {\n offset: 0,\n size: 0\n };\n }\n /**\n * Total size of all cells being measured.\n * This value will be completely estimated initially.\n * As cells are measured, the estimate will be updated.\n */\n\n }, {\n key: \"getTotalSize\",\n value: function getTotalSize() {\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n var totalSizeOfMeasuredCells = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\n var numUnmeasuredCells = this._cellCount - this._lastMeasuredIndex - 1;\n var totalSizeOfUnmeasuredCells = numUnmeasuredCells * this._estimatedCellSize;\n return totalSizeOfMeasuredCells + totalSizeOfUnmeasuredCells;\n }\n /**\n * Determines a new offset that ensures a certain cell is visible, given the current offset.\n * If the cell is already visible then the current offset will be returned.\n * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible.\n *\n * @param align Desired alignment within container; one of \"auto\" (default), \"start\", or \"end\"\n * @param containerSize Size (width or height) of the container viewport\n * @param currentOffset Container's current (x or y) offset\n * @param totalSize Total size (width or height) of all cells\n * @return Offset to use to ensure the specified cell is visible\n */\n\n }, {\n key: \"getUpdatedOffsetForIndex\",\n value: function getUpdatedOffsetForIndex(_ref3) {\n var _ref3$align = _ref3.align,\n align = _ref3$align === void 0 ? 'auto' : _ref3$align,\n containerSize = _ref3.containerSize,\n currentOffset = _ref3.currentOffset,\n targetIndex = _ref3.targetIndex;\n\n if (containerSize <= 0) {\n return 0;\n }\n\n var datum = this.getSizeAndPositionOfCell(targetIndex);\n var maxOffset = datum.offset;\n var minOffset = maxOffset - containerSize + datum.size;\n var idealOffset;\n\n switch (align) {\n case 'start':\n idealOffset = maxOffset;\n break;\n\n case 'end':\n idealOffset = minOffset;\n break;\n\n case 'center':\n idealOffset = maxOffset - (containerSize - datum.size) / 2;\n break;\n\n default:\n idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));\n break;\n }\n\n var totalSize = this.getTotalSize();\n return Math.max(0, Math.min(totalSize - containerSize, idealOffset));\n }\n }, {\n key: \"getVisibleCellRange\",\n value: function getVisibleCellRange(params) {\n var containerSize = params.containerSize,\n offset = params.offset;\n var totalSize = this.getTotalSize();\n\n if (totalSize === 0) {\n return {};\n }\n\n var maxOffset = offset + containerSize;\n\n var start = this._findNearestCell(offset);\n\n var datum = this.getSizeAndPositionOfCell(start);\n offset = datum.offset + datum.size;\n var stop = start;\n\n while (offset < maxOffset && stop < this._cellCount - 1) {\n stop++;\n offset += this.getSizeAndPositionOfCell(stop).size;\n }\n\n return {\n start: start,\n stop: stop\n };\n }\n /**\n * Clear all cached values for cells after the specified index.\n * This method should be called for any cell that has changed its size.\n * It will not immediately perform any calculations; they'll be performed the next time getSizeAndPositionOfCell() is called.\n */\n\n }, {\n key: \"resetCell\",\n value: function resetCell(index) {\n this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);\n }\n }, {\n key: \"_binarySearch\",\n value: function _binarySearch(high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = this.getSizeAndPositionOfCell(middle).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n }\n }, {\n key: \"_exponentialSearch\",\n value: function _exponentialSearch(index, offset) {\n var interval = 1;\n\n while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);\n }\n /**\n * Searches for the cell (index) nearest the specified offset.\n *\n * If no exact match is found the next lowest cell index will be returned.\n * This allows partially visible cells (with offsets just before/above the fold) to be visible.\n */\n\n }, {\n key: \"_findNearestCell\",\n value: function _findNearestCell(offset) {\n if (isNaN(offset)) {\n throw Error(\"Invalid offset \".concat(offset, \" specified\"));\n } // Our search algorithms find the nearest match at or below the specified offset.\n // So make sure the offset is at least 0 or no match will be found.\n\n\n offset = Math.max(0, offset);\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\n var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);\n\n if (lastMeasuredCellSizeAndPosition.offset >= offset) {\n // If we've already measured cells within this range just use a binary search as it's faster.\n return this._binarySearch(lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of cells as a binary search would.\n // The overall complexity for this approach is O(log n).\n return this._exponentialSearch(lastMeasuredIndex, offset);\n }\n }\n }]);\n\n return CellSizeAndPositionManager;\n}();\n\nexport { CellSizeAndPositionManager as default };\nimport { bpfrpt_proptype_Alignment } from \"../types\";\nimport { bpfrpt_proptype_CellSizeGetter } from \"../types\";\nimport { bpfrpt_proptype_VisibleCellRange } from \"../types\";","var DEFAULT_MAX_ELEMENT_SIZE = 1500000;\nvar CHROME_MAX_ELEMENT_SIZE = 1.67771e7;\n\nvar isBrowser = function isBrowser() {\n return typeof window !== 'undefined';\n};\n\nvar isChrome = function isChrome() {\n return !!window.chrome;\n};\n\nexport var getMaxElementSize = function getMaxElementSize() {\n if (isBrowser()) {\n if (isChrome()) {\n return CHROME_MAX_ELEMENT_SIZE;\n }\n }\n\n return DEFAULT_MAX_ELEMENT_SIZE;\n};","import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport CellSizeAndPositionManager from './CellSizeAndPositionManager';\nimport { getMaxElementSize } from './maxElementSize.js';\n\n/**\n * Extends CellSizeAndPositionManager and adds scaling behavior for lists that are too large to fit within a browser's native limits.\n */\nvar ScalingCellSizeAndPositionManager =\n/*#__PURE__*/\nfunction () {\n function ScalingCellSizeAndPositionManager(_ref) {\n var _ref$maxScrollSize = _ref.maxScrollSize,\n maxScrollSize = _ref$maxScrollSize === void 0 ? getMaxElementSize() : _ref$maxScrollSize,\n params = _objectWithoutProperties(_ref, [\"maxScrollSize\"]);\n\n _classCallCheck(this, ScalingCellSizeAndPositionManager);\n\n _defineProperty(this, \"_cellSizeAndPositionManager\", void 0);\n\n _defineProperty(this, \"_maxScrollSize\", void 0);\n\n // Favor composition over inheritance to simplify IE10 support\n this._cellSizeAndPositionManager = new CellSizeAndPositionManager(params);\n this._maxScrollSize = maxScrollSize;\n }\n\n _createClass(ScalingCellSizeAndPositionManager, [{\n key: \"areOffsetsAdjusted\",\n value: function areOffsetsAdjusted() {\n return this._cellSizeAndPositionManager.getTotalSize() > this._maxScrollSize;\n }\n }, {\n key: \"configure\",\n value: function configure(params) {\n this._cellSizeAndPositionManager.configure(params);\n }\n }, {\n key: \"getCellCount\",\n value: function getCellCount() {\n return this._cellSizeAndPositionManager.getCellCount();\n }\n }, {\n key: \"getEstimatedCellSize\",\n value: function getEstimatedCellSize() {\n return this._cellSizeAndPositionManager.getEstimatedCellSize();\n }\n }, {\n key: \"getLastMeasuredIndex\",\n value: function getLastMeasuredIndex() {\n return this._cellSizeAndPositionManager.getLastMeasuredIndex();\n }\n /**\n * Number of pixels a cell at the given position (offset) should be shifted in order to fit within the scaled container.\n * The offset passed to this function is scaled (safe) as well.\n */\n\n }, {\n key: \"getOffsetAdjustment\",\n value: function getOffsetAdjustment(_ref2) {\n var containerSize = _ref2.containerSize,\n offset = _ref2.offset;\n\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n\n var safeTotalSize = this.getTotalSize();\n\n var offsetPercentage = this._getOffsetPercentage({\n containerSize: containerSize,\n offset: offset,\n totalSize: safeTotalSize\n });\n\n return Math.round(offsetPercentage * (safeTotalSize - totalSize));\n }\n }, {\n key: \"getSizeAndPositionOfCell\",\n value: function getSizeAndPositionOfCell(index) {\n return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);\n }\n }, {\n key: \"getSizeAndPositionOfLastMeasuredCell\",\n value: function getSizeAndPositionOfLastMeasuredCell() {\n return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();\n }\n /** See CellSizeAndPositionManager#getTotalSize */\n\n }, {\n key: \"getTotalSize\",\n value: function getTotalSize() {\n return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());\n }\n /** See CellSizeAndPositionManager#getUpdatedOffsetForIndex */\n\n }, {\n key: \"getUpdatedOffsetForIndex\",\n value: function getUpdatedOffsetForIndex(_ref3) {\n var _ref3$align = _ref3.align,\n align = _ref3$align === void 0 ? 'auto' : _ref3$align,\n containerSize = _ref3.containerSize,\n currentOffset = _ref3.currentOffset,\n targetIndex = _ref3.targetIndex;\n currentOffset = this._safeOffsetToOffset({\n containerSize: containerSize,\n offset: currentOffset\n });\n\n var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({\n align: align,\n containerSize: containerSize,\n currentOffset: currentOffset,\n targetIndex: targetIndex\n });\n\n return this._offsetToSafeOffset({\n containerSize: containerSize,\n offset: offset\n });\n }\n /** See CellSizeAndPositionManager#getVisibleCellRange */\n\n }, {\n key: \"getVisibleCellRange\",\n value: function getVisibleCellRange(_ref4) {\n var containerSize = _ref4.containerSize,\n offset = _ref4.offset;\n offset = this._safeOffsetToOffset({\n containerSize: containerSize,\n offset: offset\n });\n return this._cellSizeAndPositionManager.getVisibleCellRange({\n containerSize: containerSize,\n offset: offset\n });\n }\n }, {\n key: \"resetCell\",\n value: function resetCell(index) {\n this._cellSizeAndPositionManager.resetCell(index);\n }\n }, {\n key: \"_getOffsetPercentage\",\n value: function _getOffsetPercentage(_ref5) {\n var containerSize = _ref5.containerSize,\n offset = _ref5.offset,\n totalSize = _ref5.totalSize;\n return totalSize <= containerSize ? 0 : offset / (totalSize - containerSize);\n }\n }, {\n key: \"_offsetToSafeOffset\",\n value: function _offsetToSafeOffset(_ref6) {\n var containerSize = _ref6.containerSize,\n offset = _ref6.offset;\n\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n\n var safeTotalSize = this.getTotalSize();\n\n if (totalSize === safeTotalSize) {\n return offset;\n } else {\n var offsetPercentage = this._getOffsetPercentage({\n containerSize: containerSize,\n offset: offset,\n totalSize: totalSize\n });\n\n return Math.round(offsetPercentage * (safeTotalSize - containerSize));\n }\n }\n }, {\n key: \"_safeOffsetToOffset\",\n value: function _safeOffsetToOffset(_ref7) {\n var containerSize = _ref7.containerSize,\n offset = _ref7.offset;\n\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\n\n var safeTotalSize = this.getTotalSize();\n\n if (totalSize === safeTotalSize) {\n return offset;\n } else {\n var offsetPercentage = this._getOffsetPercentage({\n containerSize: containerSize,\n offset: offset,\n totalSize: safeTotalSize\n });\n\n return Math.round(offsetPercentage * (totalSize - containerSize));\n }\n }\n }]);\n\n return ScalingCellSizeAndPositionManager;\n}();\n\nexport { ScalingCellSizeAndPositionManager as default };\nimport { bpfrpt_proptype_Alignment } from \"../types\";\nimport { bpfrpt_proptype_CellSizeGetter } from \"../types\";\nimport { bpfrpt_proptype_VisibleCellRange } from \"../types\";","/**\n * Helper utility that updates the specified callback whenever any of the specified indices have changed.\n */\nexport default function createCallbackMemoizer() {\n var requireAllKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var cachedIndices = {};\n return function (_ref) {\n var callback = _ref.callback,\n indices = _ref.indices;\n var keys = Object.keys(indices);\n var allInitialized = !requireAllKeys || keys.every(function (key) {\n var value = indices[key];\n return Array.isArray(value) ? value.length > 0 : value >= 0;\n });\n var indexChanged = keys.length !== Object.keys(cachedIndices).length || keys.some(function (key) {\n var cachedValue = cachedIndices[key];\n var value = indices[key];\n return Array.isArray(value) ? cachedValue.join(',') !== value.join(',') : cachedValue !== value;\n });\n cachedIndices = indices;\n\n if (allInitialized && indexChanged) {\n callback(indices);\n }\n };\n}","import ScalingCellSizeAndPositionManager from './ScalingCellSizeAndPositionManager.js';\n/**\n * Helper function that determines when to update scroll offsets to ensure that a scroll-to-index remains visible.\n * This function also ensures that the scroll ofset isn't past the last column/row of cells.\n */\n\nexport default function updateScrollIndexHelper(_ref) {\n var cellSize = _ref.cellSize,\n cellSizeAndPositionManager = _ref.cellSizeAndPositionManager,\n previousCellsCount = _ref.previousCellsCount,\n previousCellSize = _ref.previousCellSize,\n previousScrollToAlignment = _ref.previousScrollToAlignment,\n previousScrollToIndex = _ref.previousScrollToIndex,\n previousSize = _ref.previousSize,\n scrollOffset = _ref.scrollOffset,\n scrollToAlignment = _ref.scrollToAlignment,\n scrollToIndex = _ref.scrollToIndex,\n size = _ref.size,\n sizeJustIncreasedFromZero = _ref.sizeJustIncreasedFromZero,\n updateScrollIndexCallback = _ref.updateScrollIndexCallback;\n var cellCount = cellSizeAndPositionManager.getCellCount();\n var hasScrollToIndex = scrollToIndex >= 0 && scrollToIndex < cellCount;\n var sizeHasChanged = size !== previousSize || sizeJustIncreasedFromZero || !previousCellSize || typeof cellSize === 'number' && cellSize !== previousCellSize; // If we have a new scroll target OR if height/row-height has changed,\n // We should ensure that the scroll target is visible.\n\n if (hasScrollToIndex && (sizeHasChanged || scrollToAlignment !== previousScrollToAlignment || scrollToIndex !== previousScrollToIndex)) {\n updateScrollIndexCallback(scrollToIndex); // If we don't have a selected item but list size or number of children have decreased,\n // Make sure we aren't scrolled too far past the current content.\n } else if (!hasScrollToIndex && cellCount > 0 && (size < previousSize || cellCount < previousCellsCount)) {\n // We need to ensure that the current scroll offset is still within the collection's range.\n // To do this, we don't need to measure everything; CellMeasurer would perform poorly.\n // Just check to make sure we're still okay.\n // Only adjust the scroll position if we've scrolled below the last set of rows.\n if (scrollOffset > cellSizeAndPositionManager.getTotalSize() - size) {\n updateScrollIndexCallback(cellCount - 1);\n }\n }\n}\nimport { bpfrpt_proptype_Alignment } from \"../types\";\nimport { bpfrpt_proptype_CellSize } from \"../types\";","export default !!(typeof window !== 'undefined' && window.document && window.document.createElement);","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}","// Properly handle server-side rendering.\nvar win;\n\nif (typeof window !== 'undefined') {\n win = window;\n} else if (typeof self !== 'undefined') {\n win = self;\n} else {\n win = {};\n} // requestAnimationFrame() shim by Paul Irish\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n\n\nvar request = win.requestAnimationFrame || win.webkitRequestAnimationFrame || win.mozRequestAnimationFrame || win.oRequestAnimationFrame || win.msRequestAnimationFrame || function (callback) {\n return win.setTimeout(callback, 1000 / 60);\n};\n\nvar cancel = win.cancelAnimationFrame || win.webkitCancelAnimationFrame || win.mozCancelAnimationFrame || win.oCancelAnimationFrame || win.msCancelAnimationFrame || function (id) {\n win.clearTimeout(id);\n};\n\nexport var raf = request;\nexport var caf = cancel;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar _class, _temp;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport calculateSizeAndPositionDataAndUpdateScrollOffset from './utils/calculateSizeAndPositionDataAndUpdateScrollOffset';\nimport ScalingCellSizeAndPositionManager from './utils/ScalingCellSizeAndPositionManager';\nimport createCallbackMemoizer from '../utils/createCallbackMemoizer';\nimport defaultOverscanIndicesGetter, { SCROLL_DIRECTION_BACKWARD, SCROLL_DIRECTION_FORWARD } from './defaultOverscanIndicesGetter';\nimport updateScrollIndexHelper from './utils/updateScrollIndexHelper';\nimport defaultCellRangeRenderer from './defaultCellRangeRenderer';\nimport scrollbarSize from 'dom-helpers/scrollbarSize';\nimport { polyfill } from 'react-lifecycles-compat';\nimport { requestAnimationTimeout, cancelAnimationTimeout } from '../utils/requestAnimationTimeout';\n/**\n * Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\n\nexport var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;\n/**\n * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.\n * This prevents Grid from interrupting mouse-wheel animations (see issue #2).\n */\n\nvar SCROLL_POSITION_CHANGE_REASONS = {\n OBSERVED: 'observed',\n REQUESTED: 'requested'\n};\n\nvar renderNull = function renderNull() {\n return null;\n};\n\n/**\n * Renders tabular data with virtualization along the vertical and horizontal axes.\n * Row heights and column widths must be known ahead of time and specified as properties.\n */\nvar Grid = (_temp = _class =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(Grid, _React$PureComponent);\n\n // Invokes onSectionRendered callback only when start/stop row or column indices change\n function Grid(props) {\n var _this;\n\n _classCallCheck(this, Grid);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Grid).call(this, props));\n\n _defineProperty(_assertThisInitialized(_this), \"_onGridRenderedMemoizer\", createCallbackMemoizer());\n\n _defineProperty(_assertThisInitialized(_this), \"_onScrollMemoizer\", createCallbackMemoizer(false));\n\n _defineProperty(_assertThisInitialized(_this), \"_deferredInvalidateColumnIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_deferredInvalidateRowIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_recomputeScrollLeftFlag\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"_recomputeScrollTopFlag\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"_horizontalScrollBarSize\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_verticalScrollBarSize\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_scrollbarPresenceChanged\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"_scrollingContainer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_childrenToDisplay\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_columnStartIndex\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_columnStopIndex\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_rowStartIndex\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_rowStopIndex\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_renderedColumnStartIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_renderedColumnStopIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_renderedRowStartIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_renderedRowStopIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_initialScrollTop\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_initialScrollLeft\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_disablePointerEventsTimeoutId\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_styleCache\", {});\n\n _defineProperty(_assertThisInitialized(_this), \"_cellCache\", {});\n\n _defineProperty(_assertThisInitialized(_this), \"_debounceScrollEndedCallback\", function () {\n _this._disablePointerEventsTimeoutId = null; // isScrolling is used to determine if we reset styleCache\n\n _this.setState({\n isScrolling: false,\n needToResetStyleCache: false\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_invokeOnGridRenderedHelper\", function () {\n var onSectionRendered = _this.props.onSectionRendered;\n\n _this._onGridRenderedMemoizer({\n callback: onSectionRendered,\n indices: {\n columnOverscanStartIndex: _this._columnStartIndex,\n columnOverscanStopIndex: _this._columnStopIndex,\n columnStartIndex: _this._renderedColumnStartIndex,\n columnStopIndex: _this._renderedColumnStopIndex,\n rowOverscanStartIndex: _this._rowStartIndex,\n rowOverscanStopIndex: _this._rowStopIndex,\n rowStartIndex: _this._renderedRowStartIndex,\n rowStopIndex: _this._renderedRowStopIndex\n }\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_setScrollingContainerRef\", function (ref) {\n _this._scrollingContainer = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScroll\", function (event) {\n // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.\n // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.\n // See issue #404 for more information.\n if (event.target === _this._scrollingContainer) {\n _this.handleScrollEvent(event.target);\n }\n });\n\n var columnSizeAndPositionManager = new ScalingCellSizeAndPositionManager({\n cellCount: props.columnCount,\n cellSizeGetter: function cellSizeGetter(params) {\n return Grid._wrapSizeGetter(props.columnWidth)(params);\n },\n estimatedCellSize: Grid._getEstimatedColumnSize(props)\n });\n var rowSizeAndPositionManager = new ScalingCellSizeAndPositionManager({\n cellCount: props.rowCount,\n cellSizeGetter: function cellSizeGetter(params) {\n return Grid._wrapSizeGetter(props.rowHeight)(params);\n },\n estimatedCellSize: Grid._getEstimatedRowSize(props)\n });\n _this.state = {\n instanceProps: {\n columnSizeAndPositionManager: columnSizeAndPositionManager,\n rowSizeAndPositionManager: rowSizeAndPositionManager,\n prevColumnWidth: props.columnWidth,\n prevRowHeight: props.rowHeight,\n prevColumnCount: props.columnCount,\n prevRowCount: props.rowCount,\n prevIsScrolling: props.isScrolling === true,\n prevScrollToColumn: props.scrollToColumn,\n prevScrollToRow: props.scrollToRow,\n scrollbarSize: 0,\n scrollbarSizeMeasured: false\n },\n isScrolling: false,\n scrollDirectionHorizontal: SCROLL_DIRECTION_FORWARD,\n scrollDirectionVertical: SCROLL_DIRECTION_FORWARD,\n scrollLeft: 0,\n scrollTop: 0,\n scrollPositionChangeReason: null,\n needToResetStyleCache: false\n };\n\n if (props.scrollToRow > 0) {\n _this._initialScrollTop = _this._getCalculatedScrollTop(props, _this.state);\n }\n\n if (props.scrollToColumn > 0) {\n _this._initialScrollLeft = _this._getCalculatedScrollLeft(props, _this.state);\n }\n\n return _this;\n }\n /**\n * Gets offsets for a given cell and alignment.\n */\n\n\n _createClass(Grid, [{\n key: \"getOffsetForCell\",\n value: function getOffsetForCell() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$alignment = _ref.alignment,\n alignment = _ref$alignment === void 0 ? this.props.scrollToAlignment : _ref$alignment,\n _ref$columnIndex = _ref.columnIndex,\n columnIndex = _ref$columnIndex === void 0 ? this.props.scrollToColumn : _ref$columnIndex,\n _ref$rowIndex = _ref.rowIndex,\n rowIndex = _ref$rowIndex === void 0 ? this.props.scrollToRow : _ref$rowIndex;\n\n var offsetProps = _objectSpread({}, this.props, {\n scrollToAlignment: alignment,\n scrollToColumn: columnIndex,\n scrollToRow: rowIndex\n });\n\n return {\n scrollLeft: this._getCalculatedScrollLeft(offsetProps),\n scrollTop: this._getCalculatedScrollTop(offsetProps)\n };\n }\n /**\n * Gets estimated total rows' height.\n */\n\n }, {\n key: \"getTotalRowsHeight\",\n value: function getTotalRowsHeight() {\n return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize();\n }\n /**\n * Gets estimated total columns' width.\n */\n\n }, {\n key: \"getTotalColumnsWidth\",\n value: function getTotalColumnsWidth() {\n return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize();\n }\n /**\n * This method handles a scroll event originating from an external scroll control.\n * It's an advanced method and should probably not be used unless you're implementing a custom scroll-bar solution.\n */\n\n }, {\n key: \"handleScrollEvent\",\n value: function handleScrollEvent(_ref2) {\n var _ref2$scrollLeft = _ref2.scrollLeft,\n scrollLeftParam = _ref2$scrollLeft === void 0 ? 0 : _ref2$scrollLeft,\n _ref2$scrollTop = _ref2.scrollTop,\n scrollTopParam = _ref2$scrollTop === void 0 ? 0 : _ref2$scrollTop;\n\n // On iOS, we can arrive at negative offsets by swiping past the start.\n // To prevent flicker here, we make playing in the negative offset zone cause nothing to happen.\n if (scrollTopParam < 0) {\n return;\n } // Prevent pointer events from interrupting a smooth scroll\n\n\n this._debounceScrollEnded();\n\n var _this$props = this.props,\n autoHeight = _this$props.autoHeight,\n autoWidth = _this$props.autoWidth,\n height = _this$props.height,\n width = _this$props.width;\n var instanceProps = this.state.instanceProps; // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,\n // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.\n // This causes a series of rapid renders that is slow for long lists.\n // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.\n\n var scrollbarSize = instanceProps.scrollbarSize;\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n var scrollLeft = Math.min(Math.max(0, totalColumnsWidth - width + scrollbarSize), scrollLeftParam);\n var scrollTop = Math.min(Math.max(0, totalRowsHeight - height + scrollbarSize), scrollTopParam); // Certain devices (like Apple touchpad) rapid-fire duplicate events.\n // Don't force a re-render if this is the case.\n // The mouse may move faster then the animation frame does.\n // Use requestAnimationFrame to avoid over-updating.\n\n if (this.state.scrollLeft !== scrollLeft || this.state.scrollTop !== scrollTop) {\n // Track scrolling direction so we can more efficiently overscan rows to reduce empty space around the edges while scrolling.\n // Don't change direction for an axis unless scroll offset has changed.\n var scrollDirectionHorizontal = scrollLeft !== this.state.scrollLeft ? scrollLeft > this.state.scrollLeft ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionHorizontal;\n var scrollDirectionVertical = scrollTop !== this.state.scrollTop ? scrollTop > this.state.scrollTop ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD : this.state.scrollDirectionVertical;\n var newState = {\n isScrolling: true,\n scrollDirectionHorizontal: scrollDirectionHorizontal,\n scrollDirectionVertical: scrollDirectionVertical,\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.OBSERVED\n };\n\n if (!autoHeight) {\n newState.scrollTop = scrollTop;\n }\n\n if (!autoWidth) {\n newState.scrollLeft = scrollLeft;\n }\n\n newState.needToResetStyleCache = false;\n this.setState(newState);\n }\n\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n totalColumnsWidth: totalColumnsWidth,\n totalRowsHeight: totalRowsHeight\n });\n }\n /**\n * Invalidate Grid size and recompute visible cells.\n * This is a deferred wrapper for recomputeGridSize().\n * It sets a flag to be evaluated on cDM/cDU to avoid unnecessary renders.\n * This method is intended for advanced use-cases like CellMeasurer.\n */\n // @TODO (bvaughn) Add automated test coverage for this.\n\n }, {\n key: \"invalidateCellSizeAfterRender\",\n value: function invalidateCellSizeAfterRender(_ref3) {\n var columnIndex = _ref3.columnIndex,\n rowIndex = _ref3.rowIndex;\n this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;\n this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;\n }\n /**\n * Pre-measure all columns and rows in a Grid.\n * Typically cells are only measured as needed and estimated sizes are used for cells that have not yet been measured.\n * This method ensures that the next call to getTotalSize() returns an exact size (as opposed to just an estimated one).\n */\n\n }, {\n key: \"measureAllCells\",\n value: function measureAllCells() {\n var _this$props2 = this.props,\n columnCount = _this$props2.columnCount,\n rowCount = _this$props2.rowCount;\n var instanceProps = this.state.instanceProps;\n instanceProps.columnSizeAndPositionManager.getSizeAndPositionOfCell(columnCount - 1);\n instanceProps.rowSizeAndPositionManager.getSizeAndPositionOfCell(rowCount - 1);\n }\n /**\n * Forced recompute of row heights and column widths.\n * This function should be called if dynamic column or row sizes have changed but nothing else has.\n * Since Grid only receives :columnCount and :rowCount it has no way of detecting when the underlying data changes.\n */\n\n }, {\n key: \"recomputeGridSize\",\n value: function recomputeGridSize() {\n var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref4$columnIndex = _ref4.columnIndex,\n columnIndex = _ref4$columnIndex === void 0 ? 0 : _ref4$columnIndex,\n _ref4$rowIndex = _ref4.rowIndex,\n rowIndex = _ref4$rowIndex === void 0 ? 0 : _ref4$rowIndex;\n\n var _this$props3 = this.props,\n scrollToColumn = _this$props3.scrollToColumn,\n scrollToRow = _this$props3.scrollToRow;\n var instanceProps = this.state.instanceProps;\n instanceProps.columnSizeAndPositionManager.resetCell(columnIndex);\n instanceProps.rowSizeAndPositionManager.resetCell(rowIndex); // Cell sizes may be determined by a function property.\n // In this case the cDU handler can't know if they changed.\n // Store this flag to let the next cDU pass know it needs to recompute the scroll offset.\n\n this._recomputeScrollLeftFlag = scrollToColumn >= 0 && (this.state.scrollDirectionHorizontal === SCROLL_DIRECTION_FORWARD ? columnIndex <= scrollToColumn : columnIndex >= scrollToColumn);\n this._recomputeScrollTopFlag = scrollToRow >= 0 && (this.state.scrollDirectionVertical === SCROLL_DIRECTION_FORWARD ? rowIndex <= scrollToRow : rowIndex >= scrollToRow); // Clear cell cache in case we are scrolling;\n // Invalid row heights likely mean invalid cached content as well.\n\n this._styleCache = {};\n this._cellCache = {};\n this.forceUpdate();\n }\n /**\n * Ensure column and row are visible.\n */\n\n }, {\n key: \"scrollToCell\",\n value: function scrollToCell(_ref5) {\n var columnIndex = _ref5.columnIndex,\n rowIndex = _ref5.rowIndex;\n var columnCount = this.props.columnCount;\n var props = this.props; // Don't adjust scroll offset for single-column grids (eg List, Table).\n // This can cause a funky scroll offset because of the vertical scrollbar width.\n\n if (columnCount > 1 && columnIndex !== undefined) {\n this._updateScrollLeftForScrollToColumn(_objectSpread({}, props, {\n scrollToColumn: columnIndex\n }));\n }\n\n if (rowIndex !== undefined) {\n this._updateScrollTopForScrollToRow(_objectSpread({}, props, {\n scrollToRow: rowIndex\n }));\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props4 = this.props,\n getScrollbarSize = _this$props4.getScrollbarSize,\n height = _this$props4.height,\n scrollLeft = _this$props4.scrollLeft,\n scrollToColumn = _this$props4.scrollToColumn,\n scrollTop = _this$props4.scrollTop,\n scrollToRow = _this$props4.scrollToRow,\n width = _this$props4.width;\n var instanceProps = this.state.instanceProps; // Reset initial offsets to be ignored in browser\n\n this._initialScrollTop = 0;\n this._initialScrollLeft = 0; // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.\n // We must do this at the start of the method as we may calculate and update scroll position below.\n\n this._handleInvalidatedGridSize(); // If this component was first rendered server-side, scrollbar size will be undefined.\n // In that event we need to remeasure.\n\n\n if (!instanceProps.scrollbarSizeMeasured) {\n this.setState(function (prevState) {\n var stateUpdate = _objectSpread({}, prevState, {\n needToResetStyleCache: false\n });\n\n stateUpdate.instanceProps.scrollbarSize = getScrollbarSize();\n stateUpdate.instanceProps.scrollbarSizeMeasured = true;\n return stateUpdate;\n });\n }\n\n if (typeof scrollLeft === 'number' && scrollLeft >= 0 || typeof scrollTop === 'number' && scrollTop >= 0) {\n var stateUpdate = Grid._getScrollToPositionStateUpdate({\n prevState: this.state,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n } // refs don't work in `react-test-renderer`\n\n\n if (this._scrollingContainer) {\n // setting the ref's scrollLeft and scrollTop.\n // Somehow in MultiGrid the main grid doesn't trigger a update on mount.\n if (this._scrollingContainer.scrollLeft !== this.state.scrollLeft) {\n this._scrollingContainer.scrollLeft = this.state.scrollLeft;\n }\n\n if (this._scrollingContainer.scrollTop !== this.state.scrollTop) {\n this._scrollingContainer.scrollTop = this.state.scrollTop;\n }\n } // Don't update scroll offset if the size is 0; we don't render any cells in this case.\n // Setting a state may cause us to later thing we've updated the offce when we haven't.\n\n\n var sizeIsBiggerThanZero = height > 0 && width > 0;\n\n if (scrollToColumn >= 0 && sizeIsBiggerThanZero) {\n this._updateScrollLeftForScrollToColumn();\n }\n\n if (scrollToRow >= 0 && sizeIsBiggerThanZero) {\n this._updateScrollTopForScrollToRow();\n } // Update onRowsRendered callback\n\n\n this._invokeOnGridRenderedHelper(); // Initialize onScroll callback\n\n\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft || 0,\n scrollTop: scrollTop || 0,\n totalColumnsWidth: instanceProps.columnSizeAndPositionManager.getTotalSize(),\n totalRowsHeight: instanceProps.rowSizeAndPositionManager.getTotalSize()\n });\n\n this._maybeCallOnScrollbarPresenceChange();\n }\n /**\n * @private\n * This method updates scrollLeft/scrollTop in state for the following conditions:\n * 1) New scroll-to-cell props have been set\n */\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var _this2 = this;\n\n var _this$props5 = this.props,\n autoHeight = _this$props5.autoHeight,\n autoWidth = _this$props5.autoWidth,\n columnCount = _this$props5.columnCount,\n height = _this$props5.height,\n rowCount = _this$props5.rowCount,\n scrollToAlignment = _this$props5.scrollToAlignment,\n scrollToColumn = _this$props5.scrollToColumn,\n scrollToRow = _this$props5.scrollToRow,\n width = _this$props5.width;\n var _this$state = this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollPositionChangeReason = _this$state.scrollPositionChangeReason,\n scrollTop = _this$state.scrollTop,\n instanceProps = _this$state.instanceProps; // If cell sizes have been invalidated (eg we are using CellMeasurer) then reset cached positions.\n // We must do this at the start of the method as we may calculate and update scroll position below.\n\n this._handleInvalidatedGridSize(); // Handle edge case where column or row count has only just increased over 0.\n // In this case we may have to restore a previously-specified scroll offset.\n // For more info see bvaughn/react-virtualized/issues/218\n\n\n var columnOrRowCountJustIncreasedFromZero = columnCount > 0 && prevProps.columnCount === 0 || rowCount > 0 && prevProps.rowCount === 0; // Make sure requested changes to :scrollLeft or :scrollTop get applied.\n // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,\n // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).\n // So we only set these when we require an adjustment of the scroll position.\n // See issue #2 for more information.\n\n if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {\n // @TRICKY :autoHeight and :autoWidth properties instructs Grid to leave :scrollTop and :scrollLeft management to an external HOC (eg WindowScroller).\n // In this case we should avoid checking scrollingContainer.scrollTop and scrollingContainer.scrollLeft since it forces layout/flow.\n if (!autoWidth && scrollLeft >= 0 && (scrollLeft !== this._scrollingContainer.scrollLeft || columnOrRowCountJustIncreasedFromZero)) {\n this._scrollingContainer.scrollLeft = scrollLeft;\n }\n\n if (!autoHeight && scrollTop >= 0 && (scrollTop !== this._scrollingContainer.scrollTop || columnOrRowCountJustIncreasedFromZero)) {\n this._scrollingContainer.scrollTop = scrollTop;\n }\n } // Special case where the previous size was 0:\n // In this case we don't show any windowed cells at all.\n // So we should always recalculate offset afterwards.\n\n\n var sizeJustIncreasedFromZero = (prevProps.width === 0 || prevProps.height === 0) && height > 0 && width > 0; // Update scroll offsets if the current :scrollToColumn or :scrollToRow values requires it\n // @TODO Do we also need this check or can the one in componentWillUpdate() suffice?\n\n if (this._recomputeScrollLeftFlag) {\n this._recomputeScrollLeftFlag = false;\n\n this._updateScrollLeftForScrollToColumn(this.props);\n } else {\n updateScrollIndexHelper({\n cellSizeAndPositionManager: instanceProps.columnSizeAndPositionManager,\n previousCellsCount: prevProps.columnCount,\n previousCellSize: prevProps.columnWidth,\n previousScrollToAlignment: prevProps.scrollToAlignment,\n previousScrollToIndex: prevProps.scrollToColumn,\n previousSize: prevProps.width,\n scrollOffset: scrollLeft,\n scrollToAlignment: scrollToAlignment,\n scrollToIndex: scrollToColumn,\n size: width,\n sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,\n updateScrollIndexCallback: function updateScrollIndexCallback() {\n return _this2._updateScrollLeftForScrollToColumn(_this2.props);\n }\n });\n }\n\n if (this._recomputeScrollTopFlag) {\n this._recomputeScrollTopFlag = false;\n\n this._updateScrollTopForScrollToRow(this.props);\n } else {\n updateScrollIndexHelper({\n cellSizeAndPositionManager: instanceProps.rowSizeAndPositionManager,\n previousCellsCount: prevProps.rowCount,\n previousCellSize: prevProps.rowHeight,\n previousScrollToAlignment: prevProps.scrollToAlignment,\n previousScrollToIndex: prevProps.scrollToRow,\n previousSize: prevProps.height,\n scrollOffset: scrollTop,\n scrollToAlignment: scrollToAlignment,\n scrollToIndex: scrollToRow,\n size: height,\n sizeJustIncreasedFromZero: sizeJustIncreasedFromZero,\n updateScrollIndexCallback: function updateScrollIndexCallback() {\n return _this2._updateScrollTopForScrollToRow(_this2.props);\n }\n });\n } // Update onRowsRendered callback if start/stop indices have changed\n\n\n this._invokeOnGridRenderedHelper(); // Changes to :scrollLeft or :scrollTop should also notify :onScroll listeners\n\n\n if (scrollLeft !== prevState.scrollLeft || scrollTop !== prevState.scrollTop) {\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n totalColumnsWidth: totalColumnsWidth,\n totalRowsHeight: totalRowsHeight\n });\n }\n\n this._maybeCallOnScrollbarPresenceChange();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this._disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(this._disablePointerEventsTimeoutId);\n }\n }\n /**\n * This method updates scrollLeft/scrollTop in state for the following conditions:\n * 1) Empty content (0 rows or columns)\n * 2) New scroll props overriding the current state\n * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid\n */\n\n }, {\n key: \"render\",\n value: function render() {\n var _this$props6 = this.props,\n autoContainerWidth = _this$props6.autoContainerWidth,\n autoHeight = _this$props6.autoHeight,\n autoWidth = _this$props6.autoWidth,\n className = _this$props6.className,\n containerProps = _this$props6.containerProps,\n containerRole = _this$props6.containerRole,\n containerStyle = _this$props6.containerStyle,\n height = _this$props6.height,\n id = _this$props6.id,\n noContentRenderer = _this$props6.noContentRenderer,\n role = _this$props6.role,\n style = _this$props6.style,\n tabIndex = _this$props6.tabIndex,\n width = _this$props6.width;\n var _this$state2 = this.state,\n instanceProps = _this$state2.instanceProps,\n needToResetStyleCache = _this$state2.needToResetStyleCache;\n\n var isScrolling = this._isScrolling();\n\n var gridStyle = {\n boxSizing: 'border-box',\n direction: 'ltr',\n height: autoHeight ? 'auto' : height,\n position: 'relative',\n width: autoWidth ? 'auto' : width,\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform'\n };\n\n if (needToResetStyleCache) {\n this._styleCache = {};\n } // calculate _styleCache here\n // if state.isScrolling (not from _isScrolling) then reset\n\n\n if (!this.state.isScrolling) {\n this._resetStyleCache();\n } // calculate children to render here\n\n\n this._calculateChildrenToRender(this.props, this.state);\n\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize(); // Force browser to hide scrollbars when we know they aren't necessary.\n // Otherwise once scrollbars appear they may not disappear again.\n // For more info see issue #116\n\n var verticalScrollBarSize = totalRowsHeight > height ? instanceProps.scrollbarSize : 0;\n var horizontalScrollBarSize = totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;\n\n if (horizontalScrollBarSize !== this._horizontalScrollBarSize || verticalScrollBarSize !== this._verticalScrollBarSize) {\n this._horizontalScrollBarSize = horizontalScrollBarSize;\n this._verticalScrollBarSize = verticalScrollBarSize;\n this._scrollbarPresenceChanged = true;\n } // Also explicitly init styles to 'auto' if scrollbars are required.\n // This works around an obscure edge case where external CSS styles have not yet been loaded,\n // But an initial scroll index of offset is set as an external prop.\n // Without this style, Grid would render the correct range of cells but would NOT update its internal offset.\n // This was originally reported via clauderic/react-infinite-calendar/issues/23\n\n\n gridStyle.overflowX = totalColumnsWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';\n gridStyle.overflowY = totalRowsHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';\n var childrenToDisplay = this._childrenToDisplay;\n var showNoContentRenderer = childrenToDisplay.length === 0 && height > 0 && width > 0;\n return React.createElement(\"div\", _extends({\n ref: this._setScrollingContainerRef\n }, containerProps, {\n \"aria-label\": this.props['aria-label'],\n \"aria-readonly\": this.props['aria-readonly'],\n className: clsx('ReactVirtualized__Grid', className),\n id: id,\n onScroll: this._onScroll,\n role: role,\n style: _objectSpread({}, gridStyle, {}, style),\n tabIndex: tabIndex\n }), childrenToDisplay.length > 0 && React.createElement(\"div\", {\n className: \"ReactVirtualized__Grid__innerScrollContainer\",\n role: containerRole,\n style: _objectSpread({\n width: autoContainerWidth ? 'auto' : totalColumnsWidth,\n height: totalRowsHeight,\n maxWidth: totalColumnsWidth,\n maxHeight: totalRowsHeight,\n overflow: 'hidden',\n pointerEvents: isScrolling ? 'none' : '',\n position: 'relative'\n }, containerStyle)\n }, childrenToDisplay), showNoContentRenderer && noContentRenderer());\n }\n /* ---------------------------- Helper methods ---------------------------- */\n\n }, {\n key: \"_calculateChildrenToRender\",\n value: function _calculateChildrenToRender() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n var cellRenderer = props.cellRenderer,\n cellRangeRenderer = props.cellRangeRenderer,\n columnCount = props.columnCount,\n deferredMeasurementCache = props.deferredMeasurementCache,\n height = props.height,\n overscanColumnCount = props.overscanColumnCount,\n overscanIndicesGetter = props.overscanIndicesGetter,\n overscanRowCount = props.overscanRowCount,\n rowCount = props.rowCount,\n width = props.width,\n isScrollingOptOut = props.isScrollingOptOut;\n var scrollDirectionHorizontal = state.scrollDirectionHorizontal,\n scrollDirectionVertical = state.scrollDirectionVertical,\n instanceProps = state.instanceProps;\n var scrollTop = this._initialScrollTop > 0 ? this._initialScrollTop : state.scrollTop;\n var scrollLeft = this._initialScrollLeft > 0 ? this._initialScrollLeft : state.scrollLeft;\n\n var isScrolling = this._isScrolling(props, state);\n\n this._childrenToDisplay = []; // Render only enough columns and rows to cover the visible area of the grid.\n\n if (height > 0 && width > 0) {\n var visibleColumnIndices = instanceProps.columnSizeAndPositionManager.getVisibleCellRange({\n containerSize: width,\n offset: scrollLeft\n });\n var visibleRowIndices = instanceProps.rowSizeAndPositionManager.getVisibleCellRange({\n containerSize: height,\n offset: scrollTop\n });\n var horizontalOffsetAdjustment = instanceProps.columnSizeAndPositionManager.getOffsetAdjustment({\n containerSize: width,\n offset: scrollLeft\n });\n var verticalOffsetAdjustment = instanceProps.rowSizeAndPositionManager.getOffsetAdjustment({\n containerSize: height,\n offset: scrollTop\n }); // Store for _invokeOnGridRenderedHelper()\n\n this._renderedColumnStartIndex = visibleColumnIndices.start;\n this._renderedColumnStopIndex = visibleColumnIndices.stop;\n this._renderedRowStartIndex = visibleRowIndices.start;\n this._renderedRowStopIndex = visibleRowIndices.stop;\n var overscanColumnIndices = overscanIndicesGetter({\n direction: 'horizontal',\n cellCount: columnCount,\n overscanCellsCount: overscanColumnCount,\n scrollDirection: scrollDirectionHorizontal,\n startIndex: typeof visibleColumnIndices.start === 'number' ? visibleColumnIndices.start : 0,\n stopIndex: typeof visibleColumnIndices.stop === 'number' ? visibleColumnIndices.stop : -1\n });\n var overscanRowIndices = overscanIndicesGetter({\n direction: 'vertical',\n cellCount: rowCount,\n overscanCellsCount: overscanRowCount,\n scrollDirection: scrollDirectionVertical,\n startIndex: typeof visibleRowIndices.start === 'number' ? visibleRowIndices.start : 0,\n stopIndex: typeof visibleRowIndices.stop === 'number' ? visibleRowIndices.stop : -1\n }); // Store for _invokeOnGridRenderedHelper()\n\n var columnStartIndex = overscanColumnIndices.overscanStartIndex;\n var columnStopIndex = overscanColumnIndices.overscanStopIndex;\n var rowStartIndex = overscanRowIndices.overscanStartIndex;\n var rowStopIndex = overscanRowIndices.overscanStopIndex; // Advanced use-cases (eg CellMeasurer) require batched measurements to determine accurate sizes.\n\n if (deferredMeasurementCache) {\n // If rows have a dynamic height, scan the rows we are about to render.\n // If any have not yet been measured, then we need to render all columns initially,\n // Because the height of the row is equal to the tallest cell within that row,\n // (And so we can't know the height without measuring all column-cells first).\n if (!deferredMeasurementCache.hasFixedHeight()) {\n for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\n if (!deferredMeasurementCache.has(rowIndex, 0)) {\n columnStartIndex = 0;\n columnStopIndex = columnCount - 1;\n break;\n }\n }\n } // If columns have a dynamic width, scan the columns we are about to render.\n // If any have not yet been measured, then we need to render all rows initially,\n // Because the width of the column is equal to the widest cell within that column,\n // (And so we can't know the width without measuring all row-cells first).\n\n\n if (!deferredMeasurementCache.hasFixedWidth()) {\n for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\n if (!deferredMeasurementCache.has(0, columnIndex)) {\n rowStartIndex = 0;\n rowStopIndex = rowCount - 1;\n break;\n }\n }\n }\n }\n\n this._childrenToDisplay = cellRangeRenderer({\n cellCache: this._cellCache,\n cellRenderer: cellRenderer,\n columnSizeAndPositionManager: instanceProps.columnSizeAndPositionManager,\n columnStartIndex: columnStartIndex,\n columnStopIndex: columnStopIndex,\n deferredMeasurementCache: deferredMeasurementCache,\n horizontalOffsetAdjustment: horizontalOffsetAdjustment,\n isScrolling: isScrolling,\n isScrollingOptOut: isScrollingOptOut,\n parent: this,\n rowSizeAndPositionManager: instanceProps.rowSizeAndPositionManager,\n rowStartIndex: rowStartIndex,\n rowStopIndex: rowStopIndex,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n styleCache: this._styleCache,\n verticalOffsetAdjustment: verticalOffsetAdjustment,\n visibleColumnIndices: visibleColumnIndices,\n visibleRowIndices: visibleRowIndices\n }); // update the indices\n\n this._columnStartIndex = columnStartIndex;\n this._columnStopIndex = columnStopIndex;\n this._rowStartIndex = rowStartIndex;\n this._rowStopIndex = rowStopIndex;\n }\n }\n /**\n * Sets an :isScrolling flag for a small window of time.\n * This flag is used to disable pointer events on the scrollable portion of the Grid.\n * This prevents jerky/stuttery mouse-wheel scrolling.\n */\n\n }, {\n key: \"_debounceScrollEnded\",\n value: function _debounceScrollEnded() {\n var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;\n\n if (this._disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(this._disablePointerEventsTimeoutId);\n }\n\n this._disablePointerEventsTimeoutId = requestAnimationTimeout(this._debounceScrollEndedCallback, scrollingResetTimeInterval);\n }\n }, {\n key: \"_handleInvalidatedGridSize\",\n\n /**\n * Check for batched CellMeasurer size invalidations.\n * This will occur the first time one or more previously unmeasured cells are rendered.\n */\n value: function _handleInvalidatedGridSize() {\n if (typeof this._deferredInvalidateColumnIndex === 'number' && typeof this._deferredInvalidateRowIndex === 'number') {\n var columnIndex = this._deferredInvalidateColumnIndex;\n var rowIndex = this._deferredInvalidateRowIndex;\n this._deferredInvalidateColumnIndex = null;\n this._deferredInvalidateRowIndex = null;\n this.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n }\n }\n }, {\n key: \"_invokeOnScrollMemoizer\",\n value: function _invokeOnScrollMemoizer(_ref6) {\n var _this3 = this;\n\n var scrollLeft = _ref6.scrollLeft,\n scrollTop = _ref6.scrollTop,\n totalColumnsWidth = _ref6.totalColumnsWidth,\n totalRowsHeight = _ref6.totalRowsHeight;\n\n this._onScrollMemoizer({\n callback: function callback(_ref7) {\n var scrollLeft = _ref7.scrollLeft,\n scrollTop = _ref7.scrollTop;\n var _this3$props = _this3.props,\n height = _this3$props.height,\n onScroll = _this3$props.onScroll,\n width = _this3$props.width;\n onScroll({\n clientHeight: height,\n clientWidth: width,\n scrollHeight: totalRowsHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: totalColumnsWidth\n });\n },\n indices: {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n }\n });\n }\n }, {\n key: \"_isScrolling\",\n value: function _isScrolling() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n // If isScrolling is defined in props, use it to override the value in state\n // This is a performance optimization for WindowScroller + Grid\n return Object.hasOwnProperty.call(props, 'isScrolling') ? Boolean(props.isScrolling) : Boolean(state.isScrolling);\n }\n }, {\n key: \"_maybeCallOnScrollbarPresenceChange\",\n value: function _maybeCallOnScrollbarPresenceChange() {\n if (this._scrollbarPresenceChanged) {\n var onScrollbarPresenceChange = this.props.onScrollbarPresenceChange;\n this._scrollbarPresenceChanged = false;\n onScrollbarPresenceChange({\n horizontal: this._horizontalScrollBarSize > 0,\n size: this.state.instanceProps.scrollbarSize,\n vertical: this._verticalScrollBarSize > 0\n });\n }\n }\n }, {\n key: \"scrollToPosition\",\n\n /**\n * Scroll to the specified offset(s).\n * Useful for animating position changes.\n */\n value: function scrollToPosition(_ref8) {\n var scrollLeft = _ref8.scrollLeft,\n scrollTop = _ref8.scrollTop;\n\n var stateUpdate = Grid._getScrollToPositionStateUpdate({\n prevState: this.state,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n }\n }, {\n key: \"_getCalculatedScrollLeft\",\n value: function _getCalculatedScrollLeft() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n return Grid._getCalculatedScrollLeft(props, state);\n }\n }, {\n key: \"_updateScrollLeftForScrollToColumn\",\n value: function _updateScrollLeftForScrollToColumn() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n var stateUpdate = Grid._getScrollLeftForScrollToColumnStateUpdate(props, state);\n\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n }\n }, {\n key: \"_getCalculatedScrollTop\",\n value: function _getCalculatedScrollTop() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n return Grid._getCalculatedScrollTop(props, state);\n }\n }, {\n key: \"_resetStyleCache\",\n value: function _resetStyleCache() {\n var styleCache = this._styleCache;\n var cellCache = this._cellCache;\n var isScrollingOptOut = this.props.isScrollingOptOut; // Reset cell and style caches once scrolling stops.\n // This makes Grid simpler to use (since cells commonly change).\n // And it keeps the caches from growing too large.\n // Performance is most sensitive when a user is scrolling.\n // Don't clear visible cells from cellCache if isScrollingOptOut is specified.\n // This keeps the cellCache to a resonable size.\n\n this._cellCache = {};\n this._styleCache = {}; // Copy over the visible cell styles so avoid unnecessary re-render.\n\n for (var rowIndex = this._rowStartIndex; rowIndex <= this._rowStopIndex; rowIndex++) {\n for (var columnIndex = this._columnStartIndex; columnIndex <= this._columnStopIndex; columnIndex++) {\n var key = \"\".concat(rowIndex, \"-\").concat(columnIndex);\n this._styleCache[key] = styleCache[key];\n\n if (isScrollingOptOut) {\n this._cellCache[key] = cellCache[key];\n }\n }\n }\n }\n }, {\n key: \"_updateScrollTopForScrollToRow\",\n value: function _updateScrollTopForScrollToRow() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.state;\n\n var stateUpdate = Grid._getScrollTopForScrollToRowStateUpdate(props, state);\n\n if (stateUpdate) {\n stateUpdate.needToResetStyleCache = false;\n this.setState(stateUpdate);\n }\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n var newState = {};\n\n if (nextProps.columnCount === 0 && prevState.scrollLeft !== 0 || nextProps.rowCount === 0 && prevState.scrollTop !== 0) {\n newState.scrollLeft = 0;\n newState.scrollTop = 0; // only use scroll{Left,Top} from props if scrollTo{Column,Row} isn't specified\n // scrollTo{Column,Row} should override scroll{Left,Top}\n } else if (nextProps.scrollLeft !== prevState.scrollLeft && nextProps.scrollToColumn < 0 || nextProps.scrollTop !== prevState.scrollTop && nextProps.scrollToRow < 0) {\n Object.assign(newState, Grid._getScrollToPositionStateUpdate({\n prevState: prevState,\n scrollLeft: nextProps.scrollLeft,\n scrollTop: nextProps.scrollTop\n }));\n }\n\n var instanceProps = prevState.instanceProps; // Initially we should not clearStyleCache\n\n newState.needToResetStyleCache = false;\n\n if (nextProps.columnWidth !== instanceProps.prevColumnWidth || nextProps.rowHeight !== instanceProps.prevRowHeight) {\n // Reset cache. set it to {} in render\n newState.needToResetStyleCache = true;\n }\n\n instanceProps.columnSizeAndPositionManager.configure({\n cellCount: nextProps.columnCount,\n estimatedCellSize: Grid._getEstimatedColumnSize(nextProps),\n cellSizeGetter: Grid._wrapSizeGetter(nextProps.columnWidth)\n });\n instanceProps.rowSizeAndPositionManager.configure({\n cellCount: nextProps.rowCount,\n estimatedCellSize: Grid._getEstimatedRowSize(nextProps),\n cellSizeGetter: Grid._wrapSizeGetter(nextProps.rowHeight)\n });\n\n if (instanceProps.prevColumnCount === 0 || instanceProps.prevRowCount === 0) {\n instanceProps.prevColumnCount = 0;\n instanceProps.prevRowCount = 0;\n } // If scrolling is controlled outside this component, clear cache when scrolling stops\n\n\n if (nextProps.autoHeight && nextProps.isScrolling === false && instanceProps.prevIsScrolling === true) {\n Object.assign(newState, {\n isScrolling: false\n });\n }\n\n var maybeStateA;\n var maybeStateB;\n calculateSizeAndPositionDataAndUpdateScrollOffset({\n cellCount: instanceProps.prevColumnCount,\n cellSize: typeof instanceProps.prevColumnWidth === 'number' ? instanceProps.prevColumnWidth : null,\n computeMetadataCallback: function computeMetadataCallback() {\n return instanceProps.columnSizeAndPositionManager.resetCell(0);\n },\n computeMetadataCallbackProps: nextProps,\n nextCellsCount: nextProps.columnCount,\n nextCellSize: typeof nextProps.columnWidth === 'number' ? nextProps.columnWidth : null,\n nextScrollToIndex: nextProps.scrollToColumn,\n scrollToIndex: instanceProps.prevScrollToColumn,\n updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {\n maybeStateA = Grid._getScrollLeftForScrollToColumnStateUpdate(nextProps, prevState);\n }\n });\n calculateSizeAndPositionDataAndUpdateScrollOffset({\n cellCount: instanceProps.prevRowCount,\n cellSize: typeof instanceProps.prevRowHeight === 'number' ? instanceProps.prevRowHeight : null,\n computeMetadataCallback: function computeMetadataCallback() {\n return instanceProps.rowSizeAndPositionManager.resetCell(0);\n },\n computeMetadataCallbackProps: nextProps,\n nextCellsCount: nextProps.rowCount,\n nextCellSize: typeof nextProps.rowHeight === 'number' ? nextProps.rowHeight : null,\n nextScrollToIndex: nextProps.scrollToRow,\n scrollToIndex: instanceProps.prevScrollToRow,\n updateScrollOffsetForScrollToIndex: function updateScrollOffsetForScrollToIndex() {\n maybeStateB = Grid._getScrollTopForScrollToRowStateUpdate(nextProps, prevState);\n }\n });\n instanceProps.prevColumnCount = nextProps.columnCount;\n instanceProps.prevColumnWidth = nextProps.columnWidth;\n instanceProps.prevIsScrolling = nextProps.isScrolling === true;\n instanceProps.prevRowCount = nextProps.rowCount;\n instanceProps.prevRowHeight = nextProps.rowHeight;\n instanceProps.prevScrollToColumn = nextProps.scrollToColumn;\n instanceProps.prevScrollToRow = nextProps.scrollToRow; // getting scrollBarSize (moved from componentWillMount)\n\n instanceProps.scrollbarSize = nextProps.getScrollbarSize();\n\n if (instanceProps.scrollbarSize === undefined) {\n instanceProps.scrollbarSizeMeasured = false;\n instanceProps.scrollbarSize = 0;\n } else {\n instanceProps.scrollbarSizeMeasured = true;\n }\n\n newState.instanceProps = instanceProps;\n return _objectSpread({}, newState, {}, maybeStateA, {}, maybeStateB);\n }\n }, {\n key: \"_getEstimatedColumnSize\",\n value: function _getEstimatedColumnSize(props) {\n return typeof props.columnWidth === 'number' ? props.columnWidth : props.estimatedColumnSize;\n }\n }, {\n key: \"_getEstimatedRowSize\",\n value: function _getEstimatedRowSize(props) {\n return typeof props.rowHeight === 'number' ? props.rowHeight : props.estimatedRowSize;\n }\n }, {\n key: \"_getScrollToPositionStateUpdate\",\n\n /**\n * Get the updated state after scrolling to\n * scrollLeft and scrollTop\n */\n value: function _getScrollToPositionStateUpdate(_ref9) {\n var prevState = _ref9.prevState,\n scrollLeft = _ref9.scrollLeft,\n scrollTop = _ref9.scrollTop;\n var newState = {\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED\n };\n\n if (typeof scrollLeft === 'number' && scrollLeft >= 0) {\n newState.scrollDirectionHorizontal = scrollLeft > prevState.scrollLeft ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD;\n newState.scrollLeft = scrollLeft;\n }\n\n if (typeof scrollTop === 'number' && scrollTop >= 0) {\n newState.scrollDirectionVertical = scrollTop > prevState.scrollTop ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_BACKWARD;\n newState.scrollTop = scrollTop;\n }\n\n if (typeof scrollLeft === 'number' && scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft || typeof scrollTop === 'number' && scrollTop >= 0 && scrollTop !== prevState.scrollTop) {\n return newState;\n }\n\n return {};\n }\n }, {\n key: \"_wrapSizeGetter\",\n value: function _wrapSizeGetter(value) {\n return typeof value === 'function' ? value : function () {\n return value;\n };\n }\n }, {\n key: \"_getCalculatedScrollLeft\",\n value: function _getCalculatedScrollLeft(nextProps, prevState) {\n var columnCount = nextProps.columnCount,\n height = nextProps.height,\n scrollToAlignment = nextProps.scrollToAlignment,\n scrollToColumn = nextProps.scrollToColumn,\n width = nextProps.width;\n var scrollLeft = prevState.scrollLeft,\n instanceProps = prevState.instanceProps;\n\n if (columnCount > 0) {\n var finalColumn = columnCount - 1;\n var targetIndex = scrollToColumn < 0 ? finalColumn : Math.min(finalColumn, scrollToColumn);\n var totalRowsHeight = instanceProps.rowSizeAndPositionManager.getTotalSize();\n var scrollBarSize = instanceProps.scrollbarSizeMeasured && totalRowsHeight > height ? instanceProps.scrollbarSize : 0;\n return instanceProps.columnSizeAndPositionManager.getUpdatedOffsetForIndex({\n align: scrollToAlignment,\n containerSize: width - scrollBarSize,\n currentOffset: scrollLeft,\n targetIndex: targetIndex\n });\n }\n\n return 0;\n }\n }, {\n key: \"_getScrollLeftForScrollToColumnStateUpdate\",\n value: function _getScrollLeftForScrollToColumnStateUpdate(nextProps, prevState) {\n var scrollLeft = prevState.scrollLeft;\n\n var calculatedScrollLeft = Grid._getCalculatedScrollLeft(nextProps, prevState);\n\n if (typeof calculatedScrollLeft === 'number' && calculatedScrollLeft >= 0 && scrollLeft !== calculatedScrollLeft) {\n return Grid._getScrollToPositionStateUpdate({\n prevState: prevState,\n scrollLeft: calculatedScrollLeft,\n scrollTop: -1\n });\n }\n\n return {};\n }\n }, {\n key: \"_getCalculatedScrollTop\",\n value: function _getCalculatedScrollTop(nextProps, prevState) {\n var height = nextProps.height,\n rowCount = nextProps.rowCount,\n scrollToAlignment = nextProps.scrollToAlignment,\n scrollToRow = nextProps.scrollToRow,\n width = nextProps.width;\n var scrollTop = prevState.scrollTop,\n instanceProps = prevState.instanceProps;\n\n if (rowCount > 0) {\n var finalRow = rowCount - 1;\n var targetIndex = scrollToRow < 0 ? finalRow : Math.min(finalRow, scrollToRow);\n var totalColumnsWidth = instanceProps.columnSizeAndPositionManager.getTotalSize();\n var scrollBarSize = instanceProps.scrollbarSizeMeasured && totalColumnsWidth > width ? instanceProps.scrollbarSize : 0;\n return instanceProps.rowSizeAndPositionManager.getUpdatedOffsetForIndex({\n align: scrollToAlignment,\n containerSize: height - scrollBarSize,\n currentOffset: scrollTop,\n targetIndex: targetIndex\n });\n }\n\n return 0;\n }\n }, {\n key: \"_getScrollTopForScrollToRowStateUpdate\",\n value: function _getScrollTopForScrollToRowStateUpdate(nextProps, prevState) {\n var scrollTop = prevState.scrollTop;\n\n var calculatedScrollTop = Grid._getCalculatedScrollTop(nextProps, prevState);\n\n if (typeof calculatedScrollTop === 'number' && calculatedScrollTop >= 0 && scrollTop !== calculatedScrollTop) {\n return Grid._getScrollToPositionStateUpdate({\n prevState: prevState,\n scrollLeft: -1,\n scrollTop: calculatedScrollTop\n });\n }\n\n return {};\n }\n }]);\n\n return Grid;\n}(React.PureComponent), _defineProperty(_class, \"propTypes\", process.env.NODE_ENV === 'production' ? null : {\n \"aria-label\": PropTypes.string.isRequired,\n \"aria-readonly\": PropTypes.bool,\n\n /**\n * Set the width of the inner scrollable container to 'auto'.\n * This is useful for single-column Grids to ensure that the column doesn't extend below a vertical scrollbar.\n */\n \"autoContainerWidth\": PropTypes.bool.isRequired,\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height of rows can stretch the window.\n * Intended for use with WindowScroller\n */\n \"autoHeight\": PropTypes.bool.isRequired,\n\n /**\n * Removes fixed width from the scrollingContainer so that the total width of rows can stretch the window.\n * Intended for use with WindowScroller\n */\n \"autoWidth\": PropTypes.bool.isRequired,\n\n /** Responsible for rendering a cell given an row and column index. */\n \"cellRenderer\": function cellRenderer() {\n return (typeof bpfrpt_proptype_CellRenderer === \"function\" ? bpfrpt_proptype_CellRenderer.isRequired ? bpfrpt_proptype_CellRenderer.isRequired : bpfrpt_proptype_CellRenderer : PropTypes.shape(bpfrpt_proptype_CellRenderer).isRequired).apply(this, arguments);\n },\n\n /** Responsible for rendering a group of cells given their index ranges. */\n \"cellRangeRenderer\": function cellRangeRenderer() {\n return (typeof bpfrpt_proptype_CellRangeRenderer === \"function\" ? bpfrpt_proptype_CellRangeRenderer.isRequired ? bpfrpt_proptype_CellRangeRenderer.isRequired : bpfrpt_proptype_CellRangeRenderer : PropTypes.shape(bpfrpt_proptype_CellRangeRenderer).isRequired).apply(this, arguments);\n },\n\n /** Optional custom CSS class name to attach to root Grid element. */\n \"className\": PropTypes.string,\n\n /** Number of columns in grid. */\n \"columnCount\": PropTypes.number.isRequired,\n\n /** Either a fixed column width (number) or a function that returns the width of a column given its index. */\n \"columnWidth\": function columnWidth() {\n return (typeof bpfrpt_proptype_CellSize === \"function\" ? bpfrpt_proptype_CellSize.isRequired ? bpfrpt_proptype_CellSize.isRequired : bpfrpt_proptype_CellSize : PropTypes.shape(bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n },\n\n /** Unfiltered props for the Grid container. */\n \"containerProps\": PropTypes.object,\n\n /** ARIA role for the cell-container. */\n \"containerRole\": PropTypes.string.isRequired,\n\n /** Optional inline style applied to inner cell-container */\n \"containerStyle\": PropTypes.object.isRequired,\n\n /**\n * If CellMeasurer is used to measure this Grid's children, this should be a pointer to its CellMeasurerCache.\n * A shared CellMeasurerCache reference enables Grid and CellMeasurer to share measurement data.\n */\n \"deferredMeasurementCache\": PropTypes.object,\n\n /**\n * Used to estimate the total width of a Grid before all of its columns have actually been measured.\n * The estimated total width is adjusted as columns are rendered.\n */\n \"estimatedColumnSize\": PropTypes.number.isRequired,\n\n /**\n * Used to estimate the total height of a Grid before all of its rows have actually been measured.\n * The estimated total height is adjusted as rows are rendered.\n */\n \"estimatedRowSize\": PropTypes.number.isRequired,\n\n /** Exposed for testing purposes only. */\n \"getScrollbarSize\": PropTypes.func.isRequired,\n\n /** Height of Grid; this property determines the number of visible (vs virtualized) rows. */\n \"height\": PropTypes.number.isRequired,\n\n /** Optional custom id to attach to root Grid element. */\n \"id\": PropTypes.string,\n\n /**\n * Override internal is-scrolling state tracking.\n * This property is primarily intended for use with the WindowScroller component.\n */\n \"isScrolling\": PropTypes.bool,\n\n /**\n * Opt-out of isScrolling param passed to cellRangeRenderer.\n * To avoid the extra render when scroll stops.\n */\n \"isScrollingOptOut\": PropTypes.bool.isRequired,\n\n /** Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0. */\n \"noContentRenderer\": function noContentRenderer() {\n return (typeof bpfrpt_proptype_NoContentRenderer === \"function\" ? bpfrpt_proptype_NoContentRenderer.isRequired ? bpfrpt_proptype_NoContentRenderer.isRequired : bpfrpt_proptype_NoContentRenderer : PropTypes.shape(bpfrpt_proptype_NoContentRenderer).isRequired).apply(this, arguments);\n },\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n */\n \"onScroll\": PropTypes.func.isRequired,\n\n /**\n * Called whenever a horizontal or vertical scrollbar is added or removed.\n * This prop is not intended for end-user use;\n * It is used by MultiGrid to support fixed-row/fixed-column scroll syncing.\n */\n \"onScrollbarPresenceChange\": PropTypes.func.isRequired,\n\n /** Callback invoked with information about the section of the Grid that was just rendered. */\n \"onSectionRendered\": PropTypes.func.isRequired,\n\n /**\n * Number of columns to render before/after the visible section of the grid.\n * These columns can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.\n */\n \"overscanColumnCount\": PropTypes.number.isRequired,\n\n /**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n \"overscanIndicesGetter\": function overscanIndicesGetter() {\n return (typeof bpfrpt_proptype_OverscanIndicesGetter === \"function\" ? bpfrpt_proptype_OverscanIndicesGetter.isRequired ? bpfrpt_proptype_OverscanIndicesGetter.isRequired : bpfrpt_proptype_OverscanIndicesGetter : PropTypes.shape(bpfrpt_proptype_OverscanIndicesGetter).isRequired).apply(this, arguments);\n },\n\n /**\n * Number of rows to render above/below the visible section of the grid.\n * These rows can help for smoother scrolling on touch devices or browsers that send scroll events infrequently.\n */\n \"overscanRowCount\": PropTypes.number.isRequired,\n\n /** ARIA role for the grid element. */\n \"role\": PropTypes.string.isRequired,\n\n /**\n * Either a fixed row height (number) or a function that returns the height of a row given its index.\n * Should implement the following interface: ({ index: number }): number\n */\n \"rowHeight\": function rowHeight() {\n return (typeof bpfrpt_proptype_CellSize === \"function\" ? bpfrpt_proptype_CellSize.isRequired ? bpfrpt_proptype_CellSize.isRequired : bpfrpt_proptype_CellSize : PropTypes.shape(bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n },\n\n /** Number of rows in grid. */\n \"rowCount\": PropTypes.number.isRequired,\n\n /** Wait this amount of time after the last scroll event before resetting Grid `pointer-events`. */\n \"scrollingResetTimeInterval\": PropTypes.number.isRequired,\n\n /** Horizontal offset. */\n \"scrollLeft\": PropTypes.number,\n\n /**\n * Controls scroll-to-cell behavior of the Grid.\n * The default (\"auto\") scrolls the least amount possible to ensure that the specified cell is fully visible.\n * Use \"start\" to align cells to the top/left of the Grid and \"end\" to align bottom/right.\n */\n \"scrollToAlignment\": function scrollToAlignment() {\n return (typeof bpfrpt_proptype_Alignment === \"function\" ? bpfrpt_proptype_Alignment.isRequired ? bpfrpt_proptype_Alignment.isRequired : bpfrpt_proptype_Alignment : PropTypes.shape(bpfrpt_proptype_Alignment).isRequired).apply(this, arguments);\n },\n\n /** Column index to ensure visible (by forcefully scrolling if necessary) */\n \"scrollToColumn\": PropTypes.number.isRequired,\n\n /** Vertical offset. */\n \"scrollTop\": PropTypes.number,\n\n /** Row index to ensure visible (by forcefully scrolling if necessary) */\n \"scrollToRow\": PropTypes.number.isRequired,\n\n /** Optional inline style */\n \"style\": PropTypes.object.isRequired,\n\n /** Tab index for focus */\n \"tabIndex\": PropTypes.number,\n\n /** Width of Grid; this property determines the number of visible (vs virtualized) columns. */\n \"width\": PropTypes.number.isRequired\n}), _temp);\n\n_defineProperty(Grid, \"defaultProps\", {\n 'aria-label': 'grid',\n 'aria-readonly': true,\n autoContainerWidth: false,\n autoHeight: false,\n autoWidth: false,\n cellRangeRenderer: defaultCellRangeRenderer,\n containerRole: 'rowgroup',\n containerStyle: {},\n estimatedColumnSize: 100,\n estimatedRowSize: 30,\n getScrollbarSize: scrollbarSize,\n noContentRenderer: renderNull,\n onScroll: function onScroll() {},\n onScrollbarPresenceChange: function onScrollbarPresenceChange() {},\n onSectionRendered: function onSectionRendered() {},\n overscanColumnCount: 0,\n overscanIndicesGetter: defaultOverscanIndicesGetter,\n overscanRowCount: 10,\n role: 'grid',\n scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,\n scrollToAlignment: 'auto',\n scrollToColumn: -1,\n scrollToRow: -1,\n style: {},\n tabIndex: 0,\n isScrollingOptOut: false\n});\n\npolyfill(Grid);\nexport default Grid;\nimport { bpfrpt_proptype_CellRenderer } from \"./types\";\nimport { bpfrpt_proptype_CellRangeRenderer } from \"./types\";\nimport { bpfrpt_proptype_CellPosition } from \"./types\";\nimport { bpfrpt_proptype_CellSize } from \"./types\";\nimport { bpfrpt_proptype_CellSizeGetter } from \"./types\";\nimport { bpfrpt_proptype_NoContentRenderer } from \"./types\";\nimport { bpfrpt_proptype_Scroll } from \"./types\";\nimport { bpfrpt_proptype_ScrollbarPresenceChange } from \"./types\";\nimport { bpfrpt_proptype_RenderedSection } from \"./types\";\nimport { bpfrpt_proptype_OverscanIndicesGetter } from \"./types\";\nimport { bpfrpt_proptype_Alignment } from \"./types\";\nimport { bpfrpt_proptype_CellCache } from \"./types\";\nimport { bpfrpt_proptype_StyleCache } from \"./types\";\nimport { bpfrpt_proptype_AnimationTimeoutId } from \"../utils/requestAnimationTimeout\";\nimport PropTypes from \"prop-types\";","import { caf, raf } from './animationFrame';\nvar bpfrpt_proptype_AnimationTimeoutId = process.env.NODE_ENV === 'production' ? null : {\n \"id\": PropTypes.number.isRequired\n};\nexport var cancelAnimationTimeout = function cancelAnimationTimeout(frame) {\n return caf(frame.id);\n};\n/**\n * Recursively calls requestAnimationFrame until a specified delay has been met or exceeded.\n * When the delay time has been reached the function you're timing out will be called.\n *\n * Credit: Joe Lambert (https://gist.github.com/joelambert/1002116#file-requesttimeout-js)\n */\n\nexport var requestAnimationTimeout = function requestAnimationTimeout(callback, delay) {\n var start; // wait for end of processing current event handler, because event handler may be long\n\n Promise.resolve().then(function () {\n start = Date.now();\n });\n\n var timeout = function timeout() {\n if (Date.now() - start >= delay) {\n callback.call();\n } else {\n frame.id = raf(timeout);\n }\n };\n\n var frame = {\n id: raf(timeout)\n };\n return frame;\n};\nimport PropTypes from \"prop-types\";\nexport { bpfrpt_proptype_AnimationTimeoutId };","export var SCROLL_DIRECTION_BACKWARD = -1;\nexport var SCROLL_DIRECTION_FORWARD = 1;\nexport var SCROLL_DIRECTION_HORIZONTAL = 'horizontal';\nexport var SCROLL_DIRECTION_VERTICAL = 'vertical';\n/**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n\nexport default function defaultOverscanIndicesGetter(_ref) {\n var cellCount = _ref.cellCount,\n overscanCellsCount = _ref.overscanCellsCount,\n scrollDirection = _ref.scrollDirection,\n startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n\n if (scrollDirection === SCROLL_DIRECTION_FORWARD) {\n return {\n overscanStartIndex: Math.max(0, startIndex),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\n };\n } else {\n return {\n overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex)\n };\n }\n}\nimport { bpfrpt_proptype_OverscanIndicesGetterParams } from \"./types\";\nimport { bpfrpt_proptype_OverscanIndices } from \"./types\";","/**\n * Default implementation of cellRangeRenderer used by Grid.\n * This renderer supports cell-caching while the user is scrolling.\n */\nexport default function defaultCellRangeRenderer(_ref) {\n var cellCache = _ref.cellCache,\n cellRenderer = _ref.cellRenderer,\n columnSizeAndPositionManager = _ref.columnSizeAndPositionManager,\n columnStartIndex = _ref.columnStartIndex,\n columnStopIndex = _ref.columnStopIndex,\n deferredMeasurementCache = _ref.deferredMeasurementCache,\n horizontalOffsetAdjustment = _ref.horizontalOffsetAdjustment,\n isScrolling = _ref.isScrolling,\n isScrollingOptOut = _ref.isScrollingOptOut,\n parent = _ref.parent,\n rowSizeAndPositionManager = _ref.rowSizeAndPositionManager,\n rowStartIndex = _ref.rowStartIndex,\n rowStopIndex = _ref.rowStopIndex,\n styleCache = _ref.styleCache,\n verticalOffsetAdjustment = _ref.verticalOffsetAdjustment,\n visibleColumnIndices = _ref.visibleColumnIndices,\n visibleRowIndices = _ref.visibleRowIndices;\n var renderedCells = []; // Browsers have native size limits for elements (eg Chrome 33M pixels, IE 1.5M pixes).\n // User cannot scroll beyond these size limitations.\n // In order to work around this, ScalingCellSizeAndPositionManager compresses offsets.\n // We should never cache styles for compressed offsets though as this can lead to bugs.\n // See issue #576 for more.\n\n var areOffsetsAdjusted = columnSizeAndPositionManager.areOffsetsAdjusted() || rowSizeAndPositionManager.areOffsetsAdjusted();\n var canCacheStyle = !isScrolling && !areOffsetsAdjusted;\n\n for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\n var rowDatum = rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex);\n\n for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\n var columnDatum = columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);\n var isVisible = columnIndex >= visibleColumnIndices.start && columnIndex <= visibleColumnIndices.stop && rowIndex >= visibleRowIndices.start && rowIndex <= visibleRowIndices.stop;\n var key = \"\".concat(rowIndex, \"-\").concat(columnIndex);\n var style = void 0; // Cache style objects so shallow-compare doesn't re-render unnecessarily.\n\n if (canCacheStyle && styleCache[key]) {\n style = styleCache[key];\n } else {\n // In deferred mode, cells will be initially rendered before we know their size.\n // Don't interfere with CellMeasurer's measurements by setting an invalid size.\n if (deferredMeasurementCache && !deferredMeasurementCache.has(rowIndex, columnIndex)) {\n // Position not-yet-measured cells at top/left 0,0,\n // And give them width/height of 'auto' so they can grow larger than the parent Grid if necessary.\n // Positioning them further to the right/bottom influences their measured size.\n style = {\n height: 'auto',\n left: 0,\n position: 'absolute',\n top: 0,\n width: 'auto'\n };\n } else {\n style = {\n height: rowDatum.size,\n left: columnDatum.offset + horizontalOffsetAdjustment,\n position: 'absolute',\n top: rowDatum.offset + verticalOffsetAdjustment,\n width: columnDatum.size\n };\n styleCache[key] = style;\n }\n }\n\n var cellRendererParams = {\n columnIndex: columnIndex,\n isScrolling: isScrolling,\n isVisible: isVisible,\n key: key,\n parent: parent,\n rowIndex: rowIndex,\n style: style\n };\n var renderedCell = void 0; // Avoid re-creating cells while scrolling.\n // This can lead to the same cell being created many times and can cause performance issues for \"heavy\" cells.\n // If a scroll is in progress- cache and reuse cells.\n // This cache will be thrown away once scrolling completes.\n // However if we are scaling scroll positions and sizes, we should also avoid caching.\n // This is because the offset changes slightly as scroll position changes and caching leads to stale values.\n // For more info refer to issue #395\n //\n // If isScrollingOptOut is specified, we always cache cells.\n // For more info refer to issue #1028\n\n if ((isScrollingOptOut || isScrolling) && !horizontalOffsetAdjustment && !verticalOffsetAdjustment) {\n if (!cellCache[key]) {\n cellCache[key] = cellRenderer(cellRendererParams);\n }\n\n renderedCell = cellCache[key]; // If the user is no longer scrolling, don't cache cells.\n // This makes dynamic cell content difficult for users and would also lead to a heavier memory footprint.\n } else {\n renderedCell = cellRenderer(cellRendererParams);\n }\n\n if (renderedCell == null || renderedCell === false) {\n continue;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n warnAboutMissingStyle(parent, renderedCell);\n }\n\n renderedCells.push(renderedCell);\n }\n }\n\n return renderedCells;\n}\n\nfunction warnAboutMissingStyle(parent, renderedCell) {\n if (process.env.NODE_ENV !== 'production') {\n if (renderedCell) {\n // If the direct child is a CellMeasurer, then we should check its child\n // See issue #611\n if (renderedCell.type && renderedCell.type.__internalCellMeasurerFlag) {\n renderedCell = renderedCell.props.children;\n }\n\n if (renderedCell && renderedCell.props && renderedCell.props.style === undefined && parent.__warnedAboutMissingStyle !== true) {\n parent.__warnedAboutMissingStyle = true;\n console.warn('Rendered cell should include style property for positioning.');\n }\n }\n }\n}\n\nimport { bpfrpt_proptype_CellRangeRendererParams } from \"./types\";","export var SCROLL_DIRECTION_BACKWARD = -1;\nexport var SCROLL_DIRECTION_FORWARD = 1;\nexport var SCROLL_DIRECTION_HORIZONTAL = 'horizontal';\nexport var SCROLL_DIRECTION_VERTICAL = 'vertical';\n/**\n * Calculates the number of cells to overscan before and after a specified range.\n * This function ensures that overscanning doesn't exceed the available cells.\n */\n\nexport default function defaultOverscanIndicesGetter(_ref) {\n var cellCount = _ref.cellCount,\n overscanCellsCount = _ref.overscanCellsCount,\n scrollDirection = _ref.scrollDirection,\n startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n // Make sure we render at least 1 cell extra before and after (except near boundaries)\n // This is necessary in order to support keyboard navigation (TAB/SHIFT+TAB) in some cases\n // For more info see issues #625\n overscanCellsCount = Math.max(1, overscanCellsCount);\n\n if (scrollDirection === SCROLL_DIRECTION_FORWARD) {\n return {\n overscanStartIndex: Math.max(0, startIndex - 1),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\n };\n } else {\n return {\n overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + 1)\n };\n }\n}\nimport { bpfrpt_proptype_OverscanIndicesGetterParams } from \"./types\";\nimport { bpfrpt_proptype_OverscanIndices } from \"./types\";","var bpfrpt_proptype_ScrollIndices = process.env.NODE_ENV === 'production' ? null : {\n \"scrollToColumn\": PropTypes.number.isRequired,\n \"scrollToRow\": PropTypes.number.isRequired\n};\nimport PropTypes from \"prop-types\";\nexport { bpfrpt_proptype_ScrollIndices };","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar _class, _temp;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\n/**\n * This HOC decorates a virtualized component and responds to arrow-key events by scrolling one row or column at a time.\n */\n\nvar ArrowKeyStepper = (_temp = _class =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(ArrowKeyStepper, _React$PureComponent);\n\n function ArrowKeyStepper() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, ArrowKeyStepper);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ArrowKeyStepper)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n scrollToColumn: 0,\n scrollToRow: 0,\n instanceProps: {\n prevScrollToColumn: 0,\n prevScrollToRow: 0\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_columnStartIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_columnStopIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_rowStartIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_rowStopIndex\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onKeyDown\", function (event) {\n var _this$props = _this.props,\n columnCount = _this$props.columnCount,\n disabled = _this$props.disabled,\n mode = _this$props.mode,\n rowCount = _this$props.rowCount;\n\n if (disabled) {\n return;\n }\n\n var _this$_getScrollState = _this._getScrollState(),\n scrollToColumnPrevious = _this$_getScrollState.scrollToColumn,\n scrollToRowPrevious = _this$_getScrollState.scrollToRow;\n\n var _this$_getScrollState2 = _this._getScrollState(),\n scrollToColumn = _this$_getScrollState2.scrollToColumn,\n scrollToRow = _this$_getScrollState2.scrollToRow; // The above cases all prevent default event event behavior.\n // This is to keep the grid from scrolling after the snap-to update.\n\n\n switch (event.key) {\n case 'ArrowDown':\n scrollToRow = mode === 'cells' ? Math.min(scrollToRow + 1, rowCount - 1) : Math.min(_this._rowStopIndex + 1, rowCount - 1);\n break;\n\n case 'ArrowLeft':\n scrollToColumn = mode === 'cells' ? Math.max(scrollToColumn - 1, 0) : Math.max(_this._columnStartIndex - 1, 0);\n break;\n\n case 'ArrowRight':\n scrollToColumn = mode === 'cells' ? Math.min(scrollToColumn + 1, columnCount - 1) : Math.min(_this._columnStopIndex + 1, columnCount - 1);\n break;\n\n case 'ArrowUp':\n scrollToRow = mode === 'cells' ? Math.max(scrollToRow - 1, 0) : Math.max(_this._rowStartIndex - 1, 0);\n break;\n }\n\n if (scrollToColumn !== scrollToColumnPrevious || scrollToRow !== scrollToRowPrevious) {\n event.preventDefault();\n\n _this._updateScrollState({\n scrollToColumn: scrollToColumn,\n scrollToRow: scrollToRow\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onSectionRendered\", function (_ref) {\n var columnStartIndex = _ref.columnStartIndex,\n columnStopIndex = _ref.columnStopIndex,\n rowStartIndex = _ref.rowStartIndex,\n rowStopIndex = _ref.rowStopIndex;\n _this._columnStartIndex = columnStartIndex;\n _this._columnStopIndex = columnStopIndex;\n _this._rowStartIndex = rowStartIndex;\n _this._rowStopIndex = rowStopIndex;\n });\n\n return _this;\n }\n\n _createClass(ArrowKeyStepper, [{\n key: \"setScrollIndexes\",\n value: function setScrollIndexes(_ref2) {\n var scrollToColumn = _ref2.scrollToColumn,\n scrollToRow = _ref2.scrollToRow;\n this.setState({\n scrollToRow: scrollToRow,\n scrollToColumn: scrollToColumn\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n className = _this$props2.className,\n children = _this$props2.children;\n\n var _this$_getScrollState3 = this._getScrollState(),\n scrollToColumn = _this$_getScrollState3.scrollToColumn,\n scrollToRow = _this$_getScrollState3.scrollToRow;\n\n return React.createElement(\"div\", {\n className: className,\n onKeyDown: this._onKeyDown\n }, children({\n onSectionRendered: this._onSectionRendered,\n scrollToColumn: scrollToColumn,\n scrollToRow: scrollToRow\n }));\n }\n }, {\n key: \"_getScrollState\",\n value: function _getScrollState() {\n return this.props.isControlled ? this.props : this.state;\n }\n }, {\n key: \"_updateScrollState\",\n value: function _updateScrollState(_ref3) {\n var scrollToColumn = _ref3.scrollToColumn,\n scrollToRow = _ref3.scrollToRow;\n var _this$props3 = this.props,\n isControlled = _this$props3.isControlled,\n onScrollToChange = _this$props3.onScrollToChange;\n\n if (typeof onScrollToChange === 'function') {\n onScrollToChange({\n scrollToColumn: scrollToColumn,\n scrollToRow: scrollToRow\n });\n }\n\n if (!isControlled) {\n this.setState({\n scrollToColumn: scrollToColumn,\n scrollToRow: scrollToRow\n });\n }\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.isControlled) {\n return {};\n }\n\n if (nextProps.scrollToColumn !== prevState.instanceProps.prevScrollToColumn || nextProps.scrollToRow !== prevState.instanceProps.prevScrollToRow) {\n return _objectSpread({}, prevState, {\n scrollToColumn: nextProps.scrollToColumn,\n scrollToRow: nextProps.scrollToRow,\n instanceProps: {\n prevScrollToColumn: nextProps.scrollToColumn,\n prevScrollToRow: nextProps.scrollToRow\n }\n });\n }\n\n return {};\n }\n }]);\n\n return ArrowKeyStepper;\n}(React.PureComponent), _defineProperty(_class, \"propTypes\", process.env.NODE_ENV === 'production' ? null : {\n \"children\": PropTypes.func.isRequired,\n \"className\": PropTypes.string,\n \"columnCount\": PropTypes.number.isRequired,\n \"disabled\": PropTypes.bool.isRequired,\n \"isControlled\": PropTypes.bool.isRequired,\n \"mode\": PropTypes.oneOf([\"cells\", \"edges\"]).isRequired,\n \"onScrollToChange\": PropTypes.func,\n \"rowCount\": PropTypes.number.isRequired,\n \"scrollToColumn\": PropTypes.number.isRequired,\n \"scrollToRow\": PropTypes.number.isRequired\n}), _temp);\n\n_defineProperty(ArrowKeyStepper, \"defaultProps\", {\n disabled: false,\n isControlled: false,\n mode: 'edges',\n scrollToColumn: 0,\n scrollToRow: 0\n});\n\npolyfill(ArrowKeyStepper);\nexport default ArrowKeyStepper;\nimport { bpfrpt_proptype_RenderedSection } from \"../Grid\";\nimport { bpfrpt_proptype_ScrollIndices } from \"./types\";\nimport PropTypes from \"prop-types\";","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar _class, _temp;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport * as React from 'react';\nimport createDetectElementResize from '../vendor/detectElementResize';\nvar AutoSizer = (_temp = _class =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(AutoSizer, _React$Component);\n\n function AutoSizer() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, AutoSizer);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(AutoSizer)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n height: _this.props.defaultHeight || 0,\n width: _this.props.defaultWidth || 0\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_parentNode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_autoSizer\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_window\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_detectElementResize\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_onResize\", function () {\n var _this$props = _this.props,\n disableHeight = _this$props.disableHeight,\n disableWidth = _this$props.disableWidth,\n onResize = _this$props.onResize;\n\n if (_this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n var height = _this._parentNode.offsetHeight || 0;\n var width = _this._parentNode.offsetWidth || 0;\n var win = _this._window || window;\n var style = win.getComputedStyle(_this._parentNode) || {};\n var paddingLeft = parseInt(style.paddingLeft, 10) || 0;\n var paddingRight = parseInt(style.paddingRight, 10) || 0;\n var paddingTop = parseInt(style.paddingTop, 10) || 0;\n var paddingBottom = parseInt(style.paddingBottom, 10) || 0;\n var newHeight = height - paddingTop - paddingBottom;\n var newWidth = width - paddingLeft - paddingRight;\n\n if (!disableHeight && _this.state.height !== newHeight || !disableWidth && _this.state.width !== newWidth) {\n _this.setState({\n height: height - paddingTop - paddingBottom,\n width: width - paddingLeft - paddingRight\n });\n\n onResize({\n height: height,\n width: width\n });\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_setRef\", function (autoSizer) {\n _this._autoSizer = autoSizer;\n });\n\n return _this;\n }\n\n _createClass(AutoSizer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var nonce = this.props.nonce;\n\n if (this._autoSizer && this._autoSizer.parentNode && this._autoSizer.parentNode.ownerDocument && this._autoSizer.parentNode.ownerDocument.defaultView && this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = this._autoSizer.parentNode;\n this._window = this._autoSizer.parentNode.ownerDocument.defaultView; // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n\n this._detectElementResize = createDetectElementResize(nonce, this._window);\n\n this._detectElementResize.addResizeListener(this._parentNode, this._onResize);\n\n this._onResize();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this._detectElementResize && this._parentNode) {\n this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n children = _this$props2.children,\n className = _this$props2.className,\n disableHeight = _this$props2.disableHeight,\n disableWidth = _this$props2.disableWidth,\n style = _this$props2.style;\n var _this$state = this.state,\n height = _this$state.height,\n width = _this$state.width; // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n\n var outerStyle = {\n overflow: 'visible'\n };\n var childParams = {};\n\n if (!disableHeight) {\n outerStyle.height = 0;\n childParams.height = height;\n }\n\n if (!disableWidth) {\n outerStyle.width = 0;\n childParams.width = width;\n }\n /**\n * TODO: Avoid rendering children before the initial measurements have been collected.\n * At best this would just be wasting cycles.\n * Add this check into version 10 though as it could break too many ref callbacks in version 9.\n * Note that if default width/height props were provided this would still work with SSR.\n if (\n height !== 0 &&\n width !== 0\n ) {\n child = children({ height, width })\n }\n */\n\n\n return React.createElement(\"div\", {\n className: className,\n ref: this._setRef,\n style: _objectSpread({}, outerStyle, {}, style)\n }, children(childParams));\n }\n }]);\n\n return AutoSizer;\n}(React.Component), _defineProperty(_class, \"propTypes\", process.env.NODE_ENV === 'production' ? null : {\n /** Function responsible for rendering children.*/\n \"children\": PropTypes.func.isRequired,\n\n /** Optional custom CSS class name to attach to root AutoSizer element. */\n \"className\": PropTypes.string,\n\n /** Default height to use for initial render; useful for SSR */\n \"defaultHeight\": PropTypes.number,\n\n /** Default width to use for initial render; useful for SSR */\n \"defaultWidth\": PropTypes.number,\n\n /** Disable dynamic :height property */\n \"disableHeight\": PropTypes.bool.isRequired,\n\n /** Disable dynamic :width property */\n \"disableWidth\": PropTypes.bool.isRequired,\n\n /** Nonce of the inlined stylesheet for Content Security Policy */\n \"nonce\": PropTypes.string,\n\n /** Callback to be invoked on-resize */\n \"onResize\": PropTypes.func.isRequired,\n\n /** Optional inline style */\n \"style\": PropTypes.object\n}), _temp);\n\n_defineProperty(AutoSizer, \"defaultProps\", {\n onResize: function onResize() {},\n disableHeight: false,\n disableWidth: false,\n style: {}\n});\n\nexport { AutoSizer as default };\nimport PropTypes from \"prop-types\";","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar _class, _temp;\n\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\n\n/**\n * Wraps a cell and measures its rendered content.\n * Measurements are stored in a per-cell cache.\n * Cached-content is not be re-measured.\n */\nvar CellMeasurer = (_temp = _class =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(CellMeasurer, _React$PureComponent);\n\n function CellMeasurer() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, CellMeasurer);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CellMeasurer)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"_child\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_measure\", function () {\n var _this$props = _this.props,\n cache = _this$props.cache,\n _this$props$columnInd = _this$props.columnIndex,\n columnIndex = _this$props$columnInd === void 0 ? 0 : _this$props$columnInd,\n parent = _this$props.parent,\n _this$props$rowIndex = _this$props.rowIndex,\n rowIndex = _this$props$rowIndex === void 0 ? _this.props.index || 0 : _this$props$rowIndex;\n\n var _this$_getCellMeasure = _this._getCellMeasurements(),\n height = _this$_getCellMeasure.height,\n width = _this$_getCellMeasure.width;\n\n if (height !== cache.getHeight(rowIndex, columnIndex) || width !== cache.getWidth(rowIndex, columnIndex)) {\n cache.set(rowIndex, columnIndex, width, height);\n\n if (parent && typeof parent.recomputeGridSize === 'function') {\n parent.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_registerChild\", function (element) {\n if (element && !(element instanceof Element)) {\n console.warn('CellMeasurer registerChild expects to be passed Element or null');\n }\n\n _this._child = element;\n\n if (element) {\n _this._maybeMeasureCell();\n }\n });\n\n return _this;\n }\n\n _createClass(CellMeasurer, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this._maybeMeasureCell();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this._maybeMeasureCell();\n }\n }, {\n key: \"render\",\n value: function render() {\n var children = this.props.children;\n return typeof children === 'function' ? children({\n measure: this._measure,\n registerChild: this._registerChild\n }) : children;\n }\n }, {\n key: \"_getCellMeasurements\",\n value: function _getCellMeasurements() {\n var cache = this.props.cache;\n var node = this._child || findDOMNode(this); // TODO Check for a bad combination of fixedWidth and missing numeric width or vice versa with height\n\n if (node && node.ownerDocument && node.ownerDocument.defaultView && node instanceof node.ownerDocument.defaultView.HTMLElement) {\n var styleWidth = node.style.width;\n var styleHeight = node.style.height; // If we are re-measuring a cell that has already been measured,\n // It will have a hard-coded width/height from the previous measurement.\n // The fact that we are measuring indicates this measurement is probably stale,\n // So explicitly clear it out (eg set to \"auto\") so we can recalculate.\n // See issue #593 for more info.\n // Even if we are measuring initially- if we're inside of a MultiGrid component,\n // Explicitly clear width/height before measuring to avoid being tainted by another Grid.\n // eg top/left Grid renders before bottom/right Grid\n // Since the CellMeasurerCache is shared between them this taints derived cell size values.\n\n if (!cache.hasFixedWidth()) {\n node.style.width = 'auto';\n }\n\n if (!cache.hasFixedHeight()) {\n node.style.height = 'auto';\n }\n\n var height = Math.ceil(node.offsetHeight);\n var width = Math.ceil(node.offsetWidth); // Reset after measuring to avoid breaking styles; see #660\n\n if (styleWidth) {\n node.style.width = styleWidth;\n }\n\n if (styleHeight) {\n node.style.height = styleHeight;\n }\n\n return {\n height: height,\n width: width\n };\n } else {\n return {\n height: 0,\n width: 0\n };\n }\n }\n }, {\n key: \"_maybeMeasureCell\",\n value: function _maybeMeasureCell() {\n var _this$props2 = this.props,\n cache = _this$props2.cache,\n _this$props2$columnIn = _this$props2.columnIndex,\n columnIndex = _this$props2$columnIn === void 0 ? 0 : _this$props2$columnIn,\n parent = _this$props2.parent,\n _this$props2$rowIndex = _this$props2.rowIndex,\n rowIndex = _this$props2$rowIndex === void 0 ? this.props.index || 0 : _this$props2$rowIndex;\n\n if (!cache.has(rowIndex, columnIndex)) {\n var _this$_getCellMeasure2 = this._getCellMeasurements(),\n height = _this$_getCellMeasure2.height,\n width = _this$_getCellMeasure2.width;\n\n cache.set(rowIndex, columnIndex, width, height); // If size has changed, let Grid know to re-render.\n\n if (parent && typeof parent.invalidateCellSizeAfterRender === 'function') {\n parent.invalidateCellSizeAfterRender({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n }\n }\n }\n }]);\n\n return CellMeasurer;\n}(React.PureComponent), _defineProperty(_class, \"propTypes\", process.env.NODE_ENV === 'production' ? null : {\n \"cache\": function cache() {\n return (typeof bpfrpt_proptype_CellMeasureCache === \"function\" ? bpfrpt_proptype_CellMeasureCache.isRequired ? bpfrpt_proptype_CellMeasureCache.isRequired : bpfrpt_proptype_CellMeasureCache : PropTypes.shape(bpfrpt_proptype_CellMeasureCache).isRequired).apply(this, arguments);\n },\n \"children\": PropTypes.oneOfType([PropTypes.func, PropTypes.node]).isRequired,\n \"columnIndex\": PropTypes.number,\n \"index\": PropTypes.number,\n \"parent\": PropTypes.shape({\n invalidateCellSizeAfterRender: PropTypes.func,\n recomputeGridSize: PropTypes.func\n }).isRequired,\n \"rowIndex\": PropTypes.number\n}), _temp); // Used for DEV mode warning check\n\n_defineProperty(CellMeasurer, \"__internalCellMeasurerFlag\", false);\n\nexport { CellMeasurer as default };\n\nif (process.env.NODE_ENV !== 'production') {\n CellMeasurer.__internalCellMeasurerFlag = true;\n}\n\nimport { bpfrpt_proptype_CellMeasureCache } from \"./types\";\nimport PropTypes from \"prop-types\";","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport createCallbackMemoizer from '../utils/createCallbackMemoizer';\nimport getScrollbarSize from 'dom-helpers/scrollbarSize'; // @TODO Merge Collection and CollectionView\n\n/**\n * Specifies the number of milliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\n\nvar IS_SCROLLING_TIMEOUT = 150;\n/**\n * Controls whether the Grid updates the DOM element's scrollLeft/scrollTop based on the current state or just observes it.\n * This prevents Grid from interrupting mouse-wheel animations (see issue #2).\n */\n\nvar SCROLL_POSITION_CHANGE_REASONS = {\n OBSERVED: 'observed',\n REQUESTED: 'requested'\n};\n/**\n * Monitors changes in properties (eg. cellCount) and state (eg. scroll offsets) to determine when rendering needs to occur.\n * This component does not render any visible content itself; it defers to the specified :cellLayoutManager.\n */\n\nvar CollectionView =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(CollectionView, _React$PureComponent);\n\n // Invokes callbacks only when their values have changed.\n function CollectionView() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, CollectionView);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(CollectionView)).call.apply(_getPrototypeOf2, [this].concat(args))); // If this component is being rendered server-side, getScrollbarSize() will return undefined.\n // We handle this case in componentDidMount()\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n isScrolling: false,\n scrollLeft: 0,\n scrollTop: 0\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_calculateSizeAndPositionDataOnNextUpdate\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"_onSectionRenderedMemoizer\", createCallbackMemoizer());\n\n _defineProperty(_assertThisInitialized(_this), \"_onScrollMemoizer\", createCallbackMemoizer(false));\n\n _defineProperty(_assertThisInitialized(_this), \"_invokeOnSectionRenderedHelper\", function () {\n var _this$props = _this.props,\n cellLayoutManager = _this$props.cellLayoutManager,\n onSectionRendered = _this$props.onSectionRendered;\n\n _this._onSectionRenderedMemoizer({\n callback: onSectionRendered,\n indices: {\n indices: cellLayoutManager.getLastRenderedIndices()\n }\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_setScrollingContainerRef\", function (ref) {\n _this._scrollingContainer = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_updateScrollPositionForScrollToCell\", function () {\n var _this$props2 = _this.props,\n cellLayoutManager = _this$props2.cellLayoutManager,\n height = _this$props2.height,\n scrollToAlignment = _this$props2.scrollToAlignment,\n scrollToCell = _this$props2.scrollToCell,\n width = _this$props2.width;\n var _this$state = _this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop;\n\n if (scrollToCell >= 0) {\n var scrollPosition = cellLayoutManager.getScrollPositionForCell({\n align: scrollToAlignment,\n cellIndex: scrollToCell,\n height: height,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n width: width\n });\n\n if (scrollPosition.scrollLeft !== scrollLeft || scrollPosition.scrollTop !== scrollTop) {\n _this._setScrollPosition(scrollPosition);\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScroll\", function (event) {\n // In certain edge-cases React dispatches an onScroll event with an invalid target.scrollLeft / target.scrollTop.\n // This invalid event can be detected by comparing event.target to this component's scrollable DOM element.\n // See issue #404 for more information.\n if (event.target !== _this._scrollingContainer) {\n return;\n } // Prevent pointer events from interrupting a smooth scroll\n\n\n _this._enablePointerEventsAfterDelay(); // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,\n // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.\n // This causes a series of rapid renders that is slow for long lists.\n // We can avoid that by doing some simple bounds checking to ensure that scrollTop never exceeds the total height.\n\n\n var _this$props3 = _this.props,\n cellLayoutManager = _this$props3.cellLayoutManager,\n height = _this$props3.height,\n isScrollingChange = _this$props3.isScrollingChange,\n width = _this$props3.width;\n var scrollbarSize = _this._scrollbarSize;\n\n var _cellLayoutManager$ge = cellLayoutManager.getTotalSize(),\n totalHeight = _cellLayoutManager$ge.height,\n totalWidth = _cellLayoutManager$ge.width;\n\n var scrollLeft = Math.max(0, Math.min(totalWidth - width + scrollbarSize, event.target.scrollLeft));\n var scrollTop = Math.max(0, Math.min(totalHeight - height + scrollbarSize, event.target.scrollTop)); // Certain devices (like Apple touchpad) rapid-fire duplicate events.\n // Don't force a re-render if this is the case.\n // The mouse may move faster then the animation frame does.\n // Use requestAnimationFrame to avoid over-updating.\n\n if (_this.state.scrollLeft !== scrollLeft || _this.state.scrollTop !== scrollTop) {\n // Browsers with cancelable scroll events (eg. Firefox) interrupt scrolling animations if scrollTop/scrollLeft is set.\n // Other browsers (eg. Safari) don't scroll as well without the help under certain conditions (DOM or style changes during scrolling).\n // All things considered, this seems to be the best current work around that I'm aware of.\n // For more information see https://github.com/bvaughn/react-virtualized/pull/124\n var scrollPositionChangeReason = event.cancelable ? SCROLL_POSITION_CHANGE_REASONS.OBSERVED : SCROLL_POSITION_CHANGE_REASONS.REQUESTED; // Synchronously set :isScrolling the first time (since _setNextState will reschedule its animation frame each time it's called)\n\n if (!_this.state.isScrolling) {\n isScrollingChange(true);\n }\n\n _this.setState({\n isScrolling: true,\n scrollLeft: scrollLeft,\n scrollPositionChangeReason: scrollPositionChangeReason,\n scrollTop: scrollTop\n });\n }\n\n _this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n totalWidth: totalWidth,\n totalHeight: totalHeight\n });\n });\n\n _this._scrollbarSize = getScrollbarSize();\n\n if (_this._scrollbarSize === undefined) {\n _this._scrollbarSizeMeasured = false;\n _this._scrollbarSize = 0;\n } else {\n _this._scrollbarSizeMeasured = true;\n }\n\n return _this;\n }\n /**\n * Forced recompute of cell sizes and positions.\n * This function should be called if cell sizes have changed but nothing else has.\n * Since cell positions are calculated by callbacks, the collection view has no way of detecting when the underlying data has changed.\n */\n\n\n _createClass(CollectionView, [{\n key: \"recomputeCellSizesAndPositions\",\n value: function recomputeCellSizesAndPositions() {\n this._calculateSizeAndPositionDataOnNextUpdate = true;\n this.forceUpdate();\n }\n /* ---------------------------- Component lifecycle methods ---------------------------- */\n\n /**\n * @private\n * This method updates scrollLeft/scrollTop in state for the following conditions:\n * 1) Empty content (0 rows or columns)\n * 2) New scroll props overriding the current state\n * 3) Cells-count or cells-size has changed, making previous scroll offsets invalid\n */\n\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props4 = this.props,\n cellLayoutManager = _this$props4.cellLayoutManager,\n scrollLeft = _this$props4.scrollLeft,\n scrollToCell = _this$props4.scrollToCell,\n scrollTop = _this$props4.scrollTop; // If this component was first rendered server-side, scrollbar size will be undefined.\n // In that event we need to remeasure.\n\n if (!this._scrollbarSizeMeasured) {\n this._scrollbarSize = getScrollbarSize();\n this._scrollbarSizeMeasured = true;\n this.setState({});\n }\n\n if (scrollToCell >= 0) {\n this._updateScrollPositionForScrollToCell();\n } else if (scrollLeft >= 0 || scrollTop >= 0) {\n this._setScrollPosition({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n } // Update onSectionRendered callback.\n\n\n this._invokeOnSectionRenderedHelper();\n\n var _cellLayoutManager$ge2 = cellLayoutManager.getTotalSize(),\n totalHeight = _cellLayoutManager$ge2.height,\n totalWidth = _cellLayoutManager$ge2.width; // Initialize onScroll callback.\n\n\n this._invokeOnScrollMemoizer({\n scrollLeft: scrollLeft || 0,\n scrollTop: scrollTop || 0,\n totalHeight: totalHeight,\n totalWidth: totalWidth\n });\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var _this$props5 = this.props,\n height = _this$props5.height,\n scrollToAlignment = _this$props5.scrollToAlignment,\n scrollToCell = _this$props5.scrollToCell,\n width = _this$props5.width;\n var _this$state2 = this.state,\n scrollLeft = _this$state2.scrollLeft,\n scrollPositionChangeReason = _this$state2.scrollPositionChangeReason,\n scrollTop = _this$state2.scrollTop; // Make sure requested changes to :scrollLeft or :scrollTop get applied.\n // Assigning to scrollLeft/scrollTop tells the browser to interrupt any running scroll animations,\n // And to discard any pending async changes to the scroll position that may have happened in the meantime (e.g. on a separate scrolling thread).\n // So we only set these when we require an adjustment of the scroll position.\n // See issue #2 for more information.\n\n if (scrollPositionChangeReason === SCROLL_POSITION_CHANGE_REASONS.REQUESTED) {\n if (scrollLeft >= 0 && scrollLeft !== prevState.scrollLeft && scrollLeft !== this._scrollingContainer.scrollLeft) {\n this._scrollingContainer.scrollLeft = scrollLeft;\n }\n\n if (scrollTop >= 0 && scrollTop !== prevState.scrollTop && scrollTop !== this._scrollingContainer.scrollTop) {\n this._scrollingContainer.scrollTop = scrollTop;\n }\n } // Update scroll offsets if the current :scrollToCell values requires it\n\n\n if (height !== prevProps.height || scrollToAlignment !== prevProps.scrollToAlignment || scrollToCell !== prevProps.scrollToCell || width !== prevProps.width) {\n this._updateScrollPositionForScrollToCell();\n } // Update onRowsRendered callback if start/stop indices have changed\n\n\n this._invokeOnSectionRenderedHelper();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this._disablePointerEventsTimeoutId) {\n clearTimeout(this._disablePointerEventsTimeoutId);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props6 = this.props,\n autoHeight = _this$props6.autoHeight,\n cellCount = _this$props6.cellCount,\n cellLayoutManager = _this$props6.cellLayoutManager,\n className = _this$props6.className,\n height = _this$props6.height,\n horizontalOverscanSize = _this$props6.horizontalOverscanSize,\n id = _this$props6.id,\n noContentRenderer = _this$props6.noContentRenderer,\n style = _this$props6.style,\n verticalOverscanSize = _this$props6.verticalOverscanSize,\n width = _this$props6.width;\n var _this$state3 = this.state,\n isScrolling = _this$state3.isScrolling,\n scrollLeft = _this$state3.scrollLeft,\n scrollTop = _this$state3.scrollTop; // Memoization reset\n\n if (this._lastRenderedCellCount !== cellCount || this._lastRenderedCellLayoutManager !== cellLayoutManager || this._calculateSizeAndPositionDataOnNextUpdate) {\n this._lastRenderedCellCount = cellCount;\n this._lastRenderedCellLayoutManager = cellLayoutManager;\n this._calculateSizeAndPositionDataOnNextUpdate = false;\n cellLayoutManager.calculateSizeAndPositionData();\n }\n\n var _cellLayoutManager$ge3 = cellLayoutManager.getTotalSize(),\n totalHeight = _cellLayoutManager$ge3.height,\n totalWidth = _cellLayoutManager$ge3.width; // Safely expand the rendered area by the specified overscan amount\n\n\n var left = Math.max(0, scrollLeft - horizontalOverscanSize);\n var top = Math.max(0, scrollTop - verticalOverscanSize);\n var right = Math.min(totalWidth, scrollLeft + width + horizontalOverscanSize);\n var bottom = Math.min(totalHeight, scrollTop + height + verticalOverscanSize);\n var childrenToDisplay = height > 0 && width > 0 ? cellLayoutManager.cellRenderers({\n height: bottom - top,\n isScrolling: isScrolling,\n width: right - left,\n x: left,\n y: top\n }) : [];\n var collectionStyle = {\n boxSizing: 'border-box',\n direction: 'ltr',\n height: autoHeight ? 'auto' : height,\n position: 'relative',\n WebkitOverflowScrolling: 'touch',\n width: width,\n willChange: 'transform'\n }; // Force browser to hide scrollbars when we know they aren't necessary.\n // Otherwise once scrollbars appear they may not disappear again.\n // For more info see issue #116\n\n var verticalScrollBarSize = totalHeight > height ? this._scrollbarSize : 0;\n var horizontalScrollBarSize = totalWidth > width ? this._scrollbarSize : 0; // Also explicitly init styles to 'auto' if scrollbars are required.\n // This works around an obscure edge case where external CSS styles have not yet been loaded,\n // But an initial scroll index of offset is set as an external prop.\n // Without this style, Grid would render the correct range of cells but would NOT update its internal offset.\n // This was originally reported via clauderic/react-infinite-calendar/issues/23\n\n collectionStyle.overflowX = totalWidth + verticalScrollBarSize <= width ? 'hidden' : 'auto';\n collectionStyle.overflowY = totalHeight + horizontalScrollBarSize <= height ? 'hidden' : 'auto';\n return React.createElement(\"div\", {\n ref: this._setScrollingContainerRef,\n \"aria-label\": this.props['aria-label'],\n className: clsx('ReactVirtualized__Collection', className),\n id: id,\n onScroll: this._onScroll,\n role: \"grid\",\n style: _objectSpread({}, collectionStyle, {}, style),\n tabIndex: 0\n }, cellCount > 0 && React.createElement(\"div\", {\n className: \"ReactVirtualized__Collection__innerScrollContainer\",\n style: {\n height: totalHeight,\n maxHeight: totalHeight,\n maxWidth: totalWidth,\n overflow: 'hidden',\n pointerEvents: isScrolling ? 'none' : '',\n width: totalWidth\n }\n }, childrenToDisplay), cellCount === 0 && noContentRenderer());\n }\n /* ---------------------------- Helper methods ---------------------------- */\n\n /**\n * Sets an :isScrolling flag for a small window of time.\n * This flag is used to disable pointer events on the scrollable portion of the Collection.\n * This prevents jerky/stuttery mouse-wheel scrolling.\n */\n\n }, {\n key: \"_enablePointerEventsAfterDelay\",\n value: function _enablePointerEventsAfterDelay() {\n var _this2 = this;\n\n if (this._disablePointerEventsTimeoutId) {\n clearTimeout(this._disablePointerEventsTimeoutId);\n }\n\n this._disablePointerEventsTimeoutId = setTimeout(function () {\n var isScrollingChange = _this2.props.isScrollingChange;\n isScrollingChange(false);\n _this2._disablePointerEventsTimeoutId = null;\n\n _this2.setState({\n isScrolling: false\n });\n }, IS_SCROLLING_TIMEOUT);\n }\n }, {\n key: \"_invokeOnScrollMemoizer\",\n value: function _invokeOnScrollMemoizer(_ref) {\n var _this3 = this;\n\n var scrollLeft = _ref.scrollLeft,\n scrollTop = _ref.scrollTop,\n totalHeight = _ref.totalHeight,\n totalWidth = _ref.totalWidth;\n\n this._onScrollMemoizer({\n callback: function callback(_ref2) {\n var scrollLeft = _ref2.scrollLeft,\n scrollTop = _ref2.scrollTop;\n var _this3$props = _this3.props,\n height = _this3$props.height,\n onScroll = _this3$props.onScroll,\n width = _this3$props.width;\n onScroll({\n clientHeight: height,\n clientWidth: width,\n scrollHeight: totalHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: totalWidth\n });\n },\n indices: {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n }\n });\n }\n }, {\n key: \"_setScrollPosition\",\n value: function _setScrollPosition(_ref3) {\n var scrollLeft = _ref3.scrollLeft,\n scrollTop = _ref3.scrollTop;\n var newState = {\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED\n };\n\n if (scrollLeft >= 0) {\n newState.scrollLeft = scrollLeft;\n }\n\n if (scrollTop >= 0) {\n newState.scrollTop = scrollTop;\n }\n\n if (scrollLeft >= 0 && scrollLeft !== this.state.scrollLeft || scrollTop >= 0 && scrollTop !== this.state.scrollTop) {\n this.setState(newState);\n }\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.cellCount === 0 && (prevState.scrollLeft !== 0 || prevState.scrollTop !== 0)) {\n return {\n scrollLeft: 0,\n scrollTop: 0,\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED\n };\n } else if (nextProps.scrollLeft !== prevState.scrollLeft || nextProps.scrollTop !== prevState.scrollTop) {\n return {\n scrollLeft: nextProps.scrollLeft != null ? nextProps.scrollLeft : prevState.scrollLeft,\n scrollTop: nextProps.scrollTop != null ? nextProps.scrollTop : prevState.scrollTop,\n scrollPositionChangeReason: SCROLL_POSITION_CHANGE_REASONS.REQUESTED\n };\n }\n\n return null;\n }\n }]);\n\n return CollectionView;\n}(React.PureComponent);\n\n_defineProperty(CollectionView, \"defaultProps\", {\n 'aria-label': 'grid',\n horizontalOverscanSize: 0,\n noContentRenderer: function noContentRenderer() {\n return null;\n },\n onScroll: function onScroll() {\n return null;\n },\n onSectionRendered: function onSectionRendered() {\n return null;\n },\n scrollToAlignment: 'auto',\n scrollToCell: -1,\n style: {},\n verticalOverscanSize: 0\n});\n\nCollectionView.propTypes = process.env.NODE_ENV !== \"production\" ? {\n 'aria-label': PropTypes.string,\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height\n * of rows can stretch the window. Intended for use with WindowScroller\n */\n autoHeight: PropTypes.bool,\n\n /**\n * Number of cells in collection.\n */\n cellCount: PropTypes.number.isRequired,\n\n /**\n * Calculates cell sizes and positions and manages rendering the appropriate cells given a specified window.\n */\n cellLayoutManager: PropTypes.object.isRequired,\n\n /**\n * Optional custom CSS class name to attach to root Collection element.\n */\n className: PropTypes.string,\n\n /**\n * Height of Collection; this property determines the number of visible (vs virtualized) rows.\n */\n height: PropTypes.number.isRequired,\n\n /**\n * Optional custom id to attach to root Collection element.\n */\n id: PropTypes.string,\n\n /**\n * Enables the `Collection` to horiontally \"overscan\" its content similar to how `Grid` does.\n * This can reduce flicker around the edges when a user scrolls quickly.\n */\n horizontalOverscanSize: PropTypes.number.isRequired,\n isScrollingChange: PropTypes.func,\n\n /**\n * Optional renderer to be used in place of rows when either :rowCount or :cellCount is 0.\n */\n noContentRenderer: PropTypes.func.isRequired,\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n * ({ clientHeight, clientWidth, scrollHeight, scrollLeft, scrollTop, scrollWidth }): void\n */\n onScroll: PropTypes.func.isRequired,\n\n /**\n * Callback invoked with information about the section of the Collection that was just rendered.\n * This callback is passed a named :indices parameter which is an Array of the most recently rendered section indices.\n */\n onSectionRendered: PropTypes.func.isRequired,\n\n /**\n * Horizontal offset.\n */\n scrollLeft: PropTypes.number,\n\n /**\n * Controls scroll-to-cell behavior of the Grid.\n * The default (\"auto\") scrolls the least amount possible to ensure that the specified cell is fully visible.\n * Use \"start\" to align cells to the top/left of the Grid and \"end\" to align bottom/right.\n */\n scrollToAlignment: PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired,\n\n /**\n * Cell index to ensure visible (by forcefully scrolling if necessary).\n */\n scrollToCell: PropTypes.number.isRequired,\n\n /**\n * Vertical offset.\n */\n scrollTop: PropTypes.number,\n\n /**\n * Optional custom inline style to attach to root Collection element.\n */\n style: PropTypes.object,\n\n /**\n * Enables the `Collection` to vertically \"overscan\" its content similar to how `Grid` does.\n * This can reduce flicker around the edges when a user scrolls quickly.\n */\n verticalOverscanSize: PropTypes.number.isRequired,\n\n /**\n * Width of Collection; this property determines the number of visible (vs virtualized) columns.\n */\n width: PropTypes.number.isRequired\n} : {};\npolyfill(CollectionView);\nexport default CollectionView;","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\n\n/**\n * A section of the Window.\n * Window Sections are used to group nearby cells.\n * This enables us to more quickly determine which cells to display in a given region of the Window.\n * Sections have a fixed size and contain 0 to many cells (tracked by their indices).\n */\nvar Section =\n/*#__PURE__*/\nfunction () {\n function Section(_ref) {\n var height = _ref.height,\n width = _ref.width,\n x = _ref.x,\n y = _ref.y;\n\n _classCallCheck(this, Section);\n\n this.height = height;\n this.width = width;\n this.x = x;\n this.y = y;\n this._indexMap = {};\n this._indices = [];\n }\n /** Add a cell to this section. */\n\n\n _createClass(Section, [{\n key: \"addCellIndex\",\n value: function addCellIndex(_ref2) {\n var index = _ref2.index;\n\n if (!this._indexMap[index]) {\n this._indexMap[index] = true;\n\n this._indices.push(index);\n }\n }\n /** Get all cell indices that have been added to this section. */\n\n }, {\n key: \"getCellIndices\",\n value: function getCellIndices() {\n return this._indices;\n }\n /** Intended for debugger/test purposes only */\n\n }, {\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.x, \",\").concat(this.y, \" \").concat(this.width, \"x\").concat(this.height);\n }\n }]);\n\n return Section;\n}();\n\nexport { Section as default };\nimport { bpfrpt_proptype_Index } from \"./types\";\nimport { bpfrpt_proptype_SizeAndPositionInfo } from \"./types\";","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\n\n/**\n * Window Sections are used to group nearby cells.\n * This enables us to more quickly determine which cells to display in a given region of the Window.\n * \n */\nimport Section from './Section';\nvar SECTION_SIZE = 100;\n\n/**\n * Contains 0 to many Sections.\n * Grows (and adds Sections) dynamically as cells are registered.\n * Automatically adds cells to the appropriate Section(s).\n */\nvar SectionManager =\n/*#__PURE__*/\nfunction () {\n function SectionManager() {\n var sectionSize = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : SECTION_SIZE;\n\n _classCallCheck(this, SectionManager);\n\n this._sectionSize = sectionSize;\n this._cellMetadata = [];\n this._sections = {};\n }\n /**\n * Gets all cell indices contained in the specified region.\n * A region may encompass 1 or more Sections.\n */\n\n\n _createClass(SectionManager, [{\n key: \"getCellIndices\",\n value: function getCellIndices(_ref) {\n var height = _ref.height,\n width = _ref.width,\n x = _ref.x,\n y = _ref.y;\n var indices = {};\n this.getSections({\n height: height,\n width: width,\n x: x,\n y: y\n }).forEach(function (section) {\n return section.getCellIndices().forEach(function (index) {\n indices[index] = index;\n });\n }); // Object keys are strings; this function returns numbers\n\n return Object.keys(indices).map(function (index) {\n return indices[index];\n });\n }\n /** Get size and position information for the cell specified. */\n\n }, {\n key: \"getCellMetadata\",\n value: function getCellMetadata(_ref2) {\n var index = _ref2.index;\n return this._cellMetadata[index];\n }\n /** Get all Sections overlapping the specified region. */\n\n }, {\n key: \"getSections\",\n value: function getSections(_ref3) {\n var height = _ref3.height,\n width = _ref3.width,\n x = _ref3.x,\n y = _ref3.y;\n var sectionXStart = Math.floor(x / this._sectionSize);\n var sectionXStop = Math.floor((x + width - 1) / this._sectionSize);\n var sectionYStart = Math.floor(y / this._sectionSize);\n var sectionYStop = Math.floor((y + height - 1) / this._sectionSize);\n var sections = [];\n\n for (var sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) {\n for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) {\n var key = \"\".concat(sectionX, \".\").concat(sectionY);\n\n if (!this._sections[key]) {\n this._sections[key] = new Section({\n height: this._sectionSize,\n width: this._sectionSize,\n x: sectionX * this._sectionSize,\n y: sectionY * this._sectionSize\n });\n }\n\n sections.push(this._sections[key]);\n }\n }\n\n return sections;\n }\n /** Total number of Sections based on the currently registered cells. */\n\n }, {\n key: \"getTotalSectionCount\",\n value: function getTotalSectionCount() {\n return Object.keys(this._sections).length;\n }\n /** Intended for debugger/test purposes only */\n\n }, {\n key: \"toString\",\n value: function toString() {\n var _this = this;\n\n return Object.keys(this._sections).map(function (index) {\n return _this._sections[index].toString();\n });\n }\n /** Adds a cell to the appropriate Sections and registers it metadata for later retrievable. */\n\n }, {\n key: \"registerCell\",\n value: function registerCell(_ref4) {\n var cellMetadatum = _ref4.cellMetadatum,\n index = _ref4.index;\n this._cellMetadata[index] = cellMetadatum;\n this.getSections(cellMetadatum).forEach(function (section) {\n return section.addCellIndex({\n index: index\n });\n });\n }\n }]);\n\n return SectionManager;\n}();\n\nexport { SectionManager as default };\nimport { bpfrpt_proptype_Index } from \"./types\";\nimport { bpfrpt_proptype_SizeAndPositionInfo } from \"./types\";","/**\n * Determines a new offset that ensures a certain cell is visible, given the current offset.\n * If the cell is already visible then the current offset will be returned.\n * If the current offset is too great or small, it will be adjusted just enough to ensure the specified index is visible.\n *\n * @param align Desired alignment within container; one of \"auto\" (default), \"start\", or \"end\"\n * @param cellOffset Offset (x or y) position for cell\n * @param cellSize Size (width or height) of cell\n * @param containerSize Total size (width or height) of the container\n * @param currentOffset Container's current (x or y) offset\n * @return Offset to use to ensure the specified cell is visible\n */\nexport default function getUpdatedOffsetForIndex(_ref) {\n var _ref$align = _ref.align,\n align = _ref$align === void 0 ? 'auto' : _ref$align,\n cellOffset = _ref.cellOffset,\n cellSize = _ref.cellSize,\n containerSize = _ref.containerSize,\n currentOffset = _ref.currentOffset;\n var maxOffset = cellOffset;\n var minOffset = maxOffset - containerSize + cellSize;\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return maxOffset - (containerSize - cellSize) / 2;\n\n default:\n return Math.max(minOffset, Math.min(maxOffset, currentOffset));\n }\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport CollectionView from './CollectionView';\nimport _calculateSizeAndPositionData from './utils/calculateSizeAndPositionData';\nimport getUpdatedOffsetForIndex from '../utils/getUpdatedOffsetForIndex';\n\n/**\n * Renders scattered or non-linear data.\n * Unlike Grid, which renders checkerboard data, Collection can render arbitrarily positioned- even overlapping- data.\n */\nvar Collection =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(Collection, _React$PureComponent);\n\n function Collection(props, context) {\n var _this;\n\n _classCallCheck(this, Collection);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Collection).call(this, props, context));\n _this._cellMetadata = [];\n _this._lastRenderedCellIndices = []; // Cell cache during scroll (for performance)\n\n _this._cellCache = [];\n _this._isScrollingChange = _this._isScrollingChange.bind(_assertThisInitialized(_this));\n _this._setCollectionViewRef = _this._setCollectionViewRef.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Collection, [{\n key: \"forceUpdate\",\n value: function forceUpdate() {\n if (this._collectionView !== undefined) {\n this._collectionView.forceUpdate();\n }\n }\n /** See Collection#recomputeCellSizesAndPositions */\n\n }, {\n key: \"recomputeCellSizesAndPositions\",\n value: function recomputeCellSizesAndPositions() {\n this._cellCache = [];\n\n this._collectionView.recomputeCellSizesAndPositions();\n }\n /** React lifecycle methods */\n\n }, {\n key: \"render\",\n value: function render() {\n var props = _extends({}, this.props);\n\n return React.createElement(CollectionView, _extends({\n cellLayoutManager: this,\n isScrollingChange: this._isScrollingChange,\n ref: this._setCollectionViewRef\n }, props));\n }\n /** CellLayoutManager interface */\n\n }, {\n key: \"calculateSizeAndPositionData\",\n value: function calculateSizeAndPositionData() {\n var _this$props = this.props,\n cellCount = _this$props.cellCount,\n cellSizeAndPositionGetter = _this$props.cellSizeAndPositionGetter,\n sectionSize = _this$props.sectionSize;\n\n var data = _calculateSizeAndPositionData({\n cellCount: cellCount,\n cellSizeAndPositionGetter: cellSizeAndPositionGetter,\n sectionSize: sectionSize\n });\n\n this._cellMetadata = data.cellMetadata;\n this._sectionManager = data.sectionManager;\n this._height = data.height;\n this._width = data.width;\n }\n /**\n * Returns the most recently rendered set of cell indices.\n */\n\n }, {\n key: \"getLastRenderedIndices\",\n value: function getLastRenderedIndices() {\n return this._lastRenderedCellIndices;\n }\n /**\n * Calculates the minimum amount of change from the current scroll position to ensure the specified cell is (fully) visible.\n */\n\n }, {\n key: \"getScrollPositionForCell\",\n value: function getScrollPositionForCell(_ref) {\n var align = _ref.align,\n cellIndex = _ref.cellIndex,\n height = _ref.height,\n scrollLeft = _ref.scrollLeft,\n scrollTop = _ref.scrollTop,\n width = _ref.width;\n var cellCount = this.props.cellCount;\n\n if (cellIndex >= 0 && cellIndex < cellCount) {\n var cellMetadata = this._cellMetadata[cellIndex];\n scrollLeft = getUpdatedOffsetForIndex({\n align: align,\n cellOffset: cellMetadata.x,\n cellSize: cellMetadata.width,\n containerSize: width,\n currentOffset: scrollLeft,\n targetIndex: cellIndex\n });\n scrollTop = getUpdatedOffsetForIndex({\n align: align,\n cellOffset: cellMetadata.y,\n cellSize: cellMetadata.height,\n containerSize: height,\n currentOffset: scrollTop,\n targetIndex: cellIndex\n });\n }\n\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n }\n }, {\n key: \"getTotalSize\",\n value: function getTotalSize() {\n return {\n height: this._height,\n width: this._width\n };\n }\n }, {\n key: \"cellRenderers\",\n value: function cellRenderers(_ref2) {\n var _this2 = this;\n\n var height = _ref2.height,\n isScrolling = _ref2.isScrolling,\n width = _ref2.width,\n x = _ref2.x,\n y = _ref2.y;\n var _this$props2 = this.props,\n cellGroupRenderer = _this$props2.cellGroupRenderer,\n cellRenderer = _this$props2.cellRenderer; // Store for later calls to getLastRenderedIndices()\n\n this._lastRenderedCellIndices = this._sectionManager.getCellIndices({\n height: height,\n width: width,\n x: x,\n y: y\n });\n return cellGroupRenderer({\n cellCache: this._cellCache,\n cellRenderer: cellRenderer,\n cellSizeAndPositionGetter: function cellSizeAndPositionGetter(_ref3) {\n var index = _ref3.index;\n return _this2._sectionManager.getCellMetadata({\n index: index\n });\n },\n indices: this._lastRenderedCellIndices,\n isScrolling: isScrolling\n });\n }\n }, {\n key: \"_isScrollingChange\",\n value: function _isScrollingChange(isScrolling) {\n if (!isScrolling) {\n this._cellCache = [];\n }\n }\n }, {\n key: \"_setCollectionViewRef\",\n value: function _setCollectionViewRef(ref) {\n this._collectionView = ref;\n }\n }]);\n\n return Collection;\n}(React.PureComponent);\n\n_defineProperty(Collection, \"defaultProps\", {\n 'aria-label': 'grid',\n cellGroupRenderer: defaultCellGroupRenderer\n});\n\nexport { Collection as default };\nCollection.propTypes = process.env.NODE_ENV !== \"production\" ? {\n 'aria-label': PropTypes.string,\n\n /**\n * Number of cells in Collection.\n */\n cellCount: PropTypes.number.isRequired,\n\n /**\n * Responsible for rendering a group of cells given their indices.\n * Should implement the following interface: ({\n * cellSizeAndPositionGetter:Function,\n * indices: Array<number>,\n * cellRenderer: Function\n * }): Array<PropTypes.node>\n */\n cellGroupRenderer: PropTypes.func.isRequired,\n\n /**\n * Responsible for rendering a cell given an row and column index.\n * Should implement the following interface: ({ index: number, key: string, style: object }): PropTypes.element\n */\n cellRenderer: PropTypes.func.isRequired,\n\n /**\n * Callback responsible for returning size and offset/position information for a given cell (index).\n * ({ index: number }): { height: number, width: number, x: number, y: number }\n */\n cellSizeAndPositionGetter: PropTypes.func.isRequired,\n\n /**\n * Optionally override the size of the sections a Collection's cells are split into.\n */\n sectionSize: PropTypes.number\n} : {};\n\nfunction defaultCellGroupRenderer(_ref4) {\n var cellCache = _ref4.cellCache,\n cellRenderer = _ref4.cellRenderer,\n cellSizeAndPositionGetter = _ref4.cellSizeAndPositionGetter,\n indices = _ref4.indices,\n isScrolling = _ref4.isScrolling;\n return indices.map(function (index) {\n var cellMetadata = cellSizeAndPositionGetter({\n index: index\n });\n var cellRendererProps = {\n index: index,\n isScrolling: isScrolling,\n key: index,\n style: {\n height: cellMetadata.height,\n left: cellMetadata.x,\n position: 'absolute',\n top: cellMetadata.y,\n width: cellMetadata.width\n }\n }; // Avoid re-creating cells while scrolling.\n // This can lead to the same cell being created many times and can cause performance issues for \"heavy\" cells.\n // If a scroll is in progress- cache and reuse cells.\n // This cache will be thrown away once scrolling complets.\n\n if (isScrolling) {\n if (!(index in cellCache)) {\n cellCache[index] = cellRenderer(cellRendererProps);\n }\n\n return cellCache[index];\n } else {\n return cellRenderer(cellRendererProps);\n }\n }).filter(function (renderedCell) {\n return !!renderedCell;\n });\n}\n\nimport { bpfrpt_proptype_ScrollPosition } from \"./types\";\nimport { bpfrpt_proptype_SizeInfo } from \"./types\";","import SectionManager from '../SectionManager';\nexport default function calculateSizeAndPositionData(_ref) {\n var cellCount = _ref.cellCount,\n cellSizeAndPositionGetter = _ref.cellSizeAndPositionGetter,\n sectionSize = _ref.sectionSize;\n var cellMetadata = [];\n var sectionManager = new SectionManager(sectionSize);\n var height = 0;\n var width = 0;\n\n for (var index = 0; index < cellCount; index++) {\n var cellMetadatum = cellSizeAndPositionGetter({\n index: index\n });\n\n if (cellMetadatum.height == null || isNaN(cellMetadatum.height) || cellMetadatum.width == null || isNaN(cellMetadatum.width) || cellMetadatum.x == null || isNaN(cellMetadatum.x) || cellMetadatum.y == null || isNaN(cellMetadatum.y)) {\n throw Error(\"Invalid metadata returned for cell \".concat(index, \":\\n x:\").concat(cellMetadatum.x, \", y:\").concat(cellMetadatum.y, \", width:\").concat(cellMetadatum.width, \", height:\").concat(cellMetadatum.height));\n }\n\n height = Math.max(height, cellMetadatum.y + cellMetadatum.height);\n width = Math.max(width, cellMetadatum.x + cellMetadatum.width);\n cellMetadata[index] = cellMetadatum;\n sectionManager.registerCell({\n cellMetadatum: cellMetadatum,\n index: index\n });\n }\n\n return {\n cellMetadata: cellMetadata,\n height: height,\n sectionManager: sectionManager,\n width: width\n };\n}","import Collection from './Collection';\nexport default Collection;\nexport { Collection };","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\n/**\n * High-order component that auto-calculates column-widths for `Grid` cells.\n */\n\nvar ColumnSizer =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(ColumnSizer, _React$PureComponent);\n\n function ColumnSizer(props, context) {\n var _this;\n\n _classCallCheck(this, ColumnSizer);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ColumnSizer).call(this, props, context));\n _this._registerChild = _this._registerChild.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(ColumnSizer, [{\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props = this.props,\n columnMaxWidth = _this$props.columnMaxWidth,\n columnMinWidth = _this$props.columnMinWidth,\n columnCount = _this$props.columnCount,\n width = _this$props.width;\n\n if (columnMaxWidth !== prevProps.columnMaxWidth || columnMinWidth !== prevProps.columnMinWidth || columnCount !== prevProps.columnCount || width !== prevProps.width) {\n if (this._registeredChild) {\n this._registeredChild.recomputeGridSize();\n }\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props2 = this.props,\n children = _this$props2.children,\n columnMaxWidth = _this$props2.columnMaxWidth,\n columnMinWidth = _this$props2.columnMinWidth,\n columnCount = _this$props2.columnCount,\n width = _this$props2.width;\n var safeColumnMinWidth = columnMinWidth || 1;\n var safeColumnMaxWidth = columnMaxWidth ? Math.min(columnMaxWidth, width) : width;\n var columnWidth = width / columnCount;\n columnWidth = Math.max(safeColumnMinWidth, columnWidth);\n columnWidth = Math.min(safeColumnMaxWidth, columnWidth);\n columnWidth = Math.floor(columnWidth);\n var adjustedWidth = Math.min(width, columnWidth * columnCount);\n return children({\n adjustedWidth: adjustedWidth,\n columnWidth: columnWidth,\n getColumnWidth: function getColumnWidth() {\n return columnWidth;\n },\n registerChild: this._registerChild\n });\n }\n }, {\n key: \"_registerChild\",\n value: function _registerChild(child) {\n if (child && typeof child.recomputeGridSize !== 'function') {\n throw Error('Unexpected child type registered; only Grid/MultiGrid children are supported.');\n }\n\n this._registeredChild = child;\n\n if (this._registeredChild) {\n this._registeredChild.recomputeGridSize();\n }\n }\n }]);\n\n return ColumnSizer;\n}(React.PureComponent);\n\nexport { ColumnSizer as default };\nColumnSizer.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * Function responsible for rendering a virtualized Grid.\n * This function should implement the following signature:\n * ({ adjustedWidth, getColumnWidth, registerChild }) => PropTypes.element\n *\n * The specified :getColumnWidth function should be passed to the Grid's :columnWidth property.\n * The :registerChild should be passed to the Grid's :ref property.\n * The :adjustedWidth property is optional; it reflects the lesser of the overall width or the width of all columns.\n */\n children: PropTypes.func.isRequired,\n\n /** Optional maximum allowed column width */\n columnMaxWidth: PropTypes.number,\n\n /** Optional minimum allowed column width */\n columnMinWidth: PropTypes.number,\n\n /** Number of columns in Grid or Table child */\n columnCount: PropTypes.number.isRequired,\n\n /** Width of Grid or Table child */\n width: PropTypes.number.isRequired\n} : {};","import ColumnSizer from './ColumnSizer';\nexport default ColumnSizer;\nexport { ColumnSizer };","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport createCallbackMemoizer from '../utils/createCallbackMemoizer';\n/**\n * Higher-order component that manages lazy-loading for \"infinite\" data.\n * This component decorates a virtual component and just-in-time prefetches rows as a user scrolls.\n * It is intended as a convenience component; fork it if you'd like finer-grained control over data-loading.\n */\n\nvar InfiniteLoader =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(InfiniteLoader, _React$PureComponent);\n\n function InfiniteLoader(props, context) {\n var _this;\n\n _classCallCheck(this, InfiniteLoader);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(InfiniteLoader).call(this, props, context));\n _this._loadMoreRowsMemoizer = createCallbackMemoizer();\n _this._onRowsRendered = _this._onRowsRendered.bind(_assertThisInitialized(_this));\n _this._registerChild = _this._registerChild.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(InfiniteLoader, [{\n key: \"resetLoadMoreRowsCache\",\n value: function resetLoadMoreRowsCache(autoReload) {\n this._loadMoreRowsMemoizer = createCallbackMemoizer();\n\n if (autoReload) {\n this._doStuff(this._lastRenderedStartIndex, this._lastRenderedStopIndex);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var children = this.props.children;\n return children({\n onRowsRendered: this._onRowsRendered,\n registerChild: this._registerChild\n });\n }\n }, {\n key: \"_loadUnloadedRanges\",\n value: function _loadUnloadedRanges(unloadedRanges) {\n var _this2 = this;\n\n var loadMoreRows = this.props.loadMoreRows;\n unloadedRanges.forEach(function (unloadedRange) {\n var promise = loadMoreRows(unloadedRange);\n\n if (promise) {\n promise.then(function () {\n // Refresh the visible rows if any of them have just been loaded.\n // Otherwise they will remain in their unloaded visual state.\n if (isRangeVisible({\n lastRenderedStartIndex: _this2._lastRenderedStartIndex,\n lastRenderedStopIndex: _this2._lastRenderedStopIndex,\n startIndex: unloadedRange.startIndex,\n stopIndex: unloadedRange.stopIndex\n })) {\n if (_this2._registeredChild) {\n forceUpdateReactVirtualizedComponent(_this2._registeredChild, _this2._lastRenderedStartIndex);\n }\n }\n });\n }\n });\n }\n }, {\n key: \"_onRowsRendered\",\n value: function _onRowsRendered(_ref) {\n var startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n this._lastRenderedStartIndex = startIndex;\n this._lastRenderedStopIndex = stopIndex;\n\n this._doStuff(startIndex, stopIndex);\n }\n }, {\n key: \"_doStuff\",\n value: function _doStuff(startIndex, stopIndex) {\n var _ref2,\n _this3 = this;\n\n var _this$props = this.props,\n isRowLoaded = _this$props.isRowLoaded,\n minimumBatchSize = _this$props.minimumBatchSize,\n rowCount = _this$props.rowCount,\n threshold = _this$props.threshold;\n var unloadedRanges = scanForUnloadedRanges({\n isRowLoaded: isRowLoaded,\n minimumBatchSize: minimumBatchSize,\n rowCount: rowCount,\n startIndex: Math.max(0, startIndex - threshold),\n stopIndex: Math.min(rowCount - 1, stopIndex + threshold)\n }); // For memoize comparison\n\n var squashedUnloadedRanges = (_ref2 = []).concat.apply(_ref2, _toConsumableArray(unloadedRanges.map(function (_ref3) {\n var startIndex = _ref3.startIndex,\n stopIndex = _ref3.stopIndex;\n return [startIndex, stopIndex];\n })));\n\n this._loadMoreRowsMemoizer({\n callback: function callback() {\n _this3._loadUnloadedRanges(unloadedRanges);\n },\n indices: {\n squashedUnloadedRanges: squashedUnloadedRanges\n }\n });\n }\n }, {\n key: \"_registerChild\",\n value: function _registerChild(registeredChild) {\n this._registeredChild = registeredChild;\n }\n }]);\n\n return InfiniteLoader;\n}(React.PureComponent);\n/**\n * Determines if the specified start/stop range is visible based on the most recently rendered range.\n */\n\n\n_defineProperty(InfiniteLoader, \"defaultProps\", {\n minimumBatchSize: 10,\n rowCount: 0,\n threshold: 15\n});\n\nexport { InfiniteLoader as default };\nInfiniteLoader.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * Function responsible for rendering a virtualized component.\n * This function should implement the following signature:\n * ({ onRowsRendered, registerChild }) => PropTypes.element\n *\n * The specified :onRowsRendered function should be passed through to the child's :onRowsRendered property.\n * The :registerChild callback should be set as the virtualized component's :ref.\n */\n children: PropTypes.func.isRequired,\n\n /**\n * Function responsible for tracking the loaded state of each row.\n * It should implement the following signature: ({ index: number }): boolean\n */\n isRowLoaded: PropTypes.func.isRequired,\n\n /**\n * Callback to be invoked when more rows must be loaded.\n * It should implement the following signature: ({ startIndex, stopIndex }): Promise\n * The returned Promise should be resolved once row data has finished loading.\n * It will be used to determine when to refresh the list with the newly-loaded data.\n * This callback may be called multiple times in reaction to a single scroll event.\n */\n loadMoreRows: PropTypes.func.isRequired,\n\n /**\n * Minimum number of rows to be loaded at a time.\n * This property can be used to batch requests to reduce HTTP requests.\n */\n minimumBatchSize: PropTypes.number.isRequired,\n\n /**\n * Number of rows in list; can be arbitrary high number if actual number is unknown.\n */\n rowCount: PropTypes.number.isRequired,\n\n /**\n * Threshold at which to pre-fetch data.\n * A threshold X means that data will start loading when a user scrolls within X rows.\n * This value defaults to 15.\n */\n threshold: PropTypes.number.isRequired\n} : {};\nexport function isRangeVisible(_ref4) {\n var lastRenderedStartIndex = _ref4.lastRenderedStartIndex,\n lastRenderedStopIndex = _ref4.lastRenderedStopIndex,\n startIndex = _ref4.startIndex,\n stopIndex = _ref4.stopIndex;\n return !(startIndex > lastRenderedStopIndex || stopIndex < lastRenderedStartIndex);\n}\n/**\n * Returns all of the ranges within a larger range that contain unloaded rows.\n */\n\nexport function scanForUnloadedRanges(_ref5) {\n var isRowLoaded = _ref5.isRowLoaded,\n minimumBatchSize = _ref5.minimumBatchSize,\n rowCount = _ref5.rowCount,\n startIndex = _ref5.startIndex,\n stopIndex = _ref5.stopIndex;\n var unloadedRanges = [];\n var rangeStartIndex = null;\n var rangeStopIndex = null;\n\n for (var index = startIndex; index <= stopIndex; index++) {\n var loaded = isRowLoaded({\n index: index\n });\n\n if (!loaded) {\n rangeStopIndex = index;\n\n if (rangeStartIndex === null) {\n rangeStartIndex = index;\n }\n } else if (rangeStopIndex !== null) {\n unloadedRanges.push({\n startIndex: rangeStartIndex,\n stopIndex: rangeStopIndex\n });\n rangeStartIndex = rangeStopIndex = null;\n }\n } // If :rangeStopIndex is not null it means we haven't ran out of unloaded rows.\n // Scan forward to try filling our :minimumBatchSize.\n\n\n if (rangeStopIndex !== null) {\n var potentialStopIndex = Math.min(Math.max(rangeStopIndex, rangeStartIndex + minimumBatchSize - 1), rowCount - 1);\n\n for (var _index = rangeStopIndex + 1; _index <= potentialStopIndex; _index++) {\n if (!isRowLoaded({\n index: _index\n })) {\n rangeStopIndex = _index;\n } else {\n break;\n }\n }\n\n unloadedRanges.push({\n startIndex: rangeStartIndex,\n stopIndex: rangeStopIndex\n });\n } // Check to see if our first range ended prematurely.\n // In this case we should scan backwards to try filling our :minimumBatchSize.\n\n\n if (unloadedRanges.length) {\n var firstUnloadedRange = unloadedRanges[0];\n\n while (firstUnloadedRange.stopIndex - firstUnloadedRange.startIndex + 1 < minimumBatchSize && firstUnloadedRange.startIndex > 0) {\n var _index2 = firstUnloadedRange.startIndex - 1;\n\n if (!isRowLoaded({\n index: _index2\n })) {\n firstUnloadedRange.startIndex = _index2;\n } else {\n break;\n }\n }\n }\n\n return unloadedRanges;\n}\n/**\n * Since RV components use shallowCompare we need to force a render (even though props haven't changed).\n * However InfiniteLoader may wrap a Grid or it may wrap a Table or List.\n * In the first case the built-in React forceUpdate() method is sufficient to force a re-render,\n * But in the latter cases we need to use the RV-specific forceUpdateGrid() method.\n * Else the inner Grid will not be re-rendered and visuals may be stale.\n *\n * Additionally, while a Grid is scrolling the cells can be cached,\n * So it's important to invalidate that cache by recalculating sizes\n * before forcing a rerender.\n */\n\nexport function forceUpdateReactVirtualizedComponent(component) {\n var currentIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var recomputeSize = typeof component.recomputeGridSize === 'function' ? component.recomputeGridSize : component.recomputeRowHeights;\n\n if (recomputeSize) {\n recomputeSize.call(component, currentIndex);\n } else {\n component.forceUpdate();\n }\n}","import InfiniteLoader from './InfiniteLoader';\nexport default InfiniteLoader;\nexport { InfiniteLoader };","import _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar _class, _temp;\n\nimport Grid, { accessibilityOverscanIndicesGetter } from '../Grid';\nimport * as React from 'react';\nimport clsx from 'clsx';\n/**\n * It is inefficient to create and manage a large list of DOM elements within a scrolling container\n * if only a few of those elements are visible. The primary purpose of this component is to improve\n * performance by only rendering the DOM nodes that a user is able to see based on their current\n * scroll position.\n *\n * This component renders a virtualized list of elements with either fixed or dynamic heights.\n */\n\nvar List = (_temp = _class =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(List, _React$PureComponent);\n\n function List() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, List);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(List)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"Grid\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_cellRenderer\", function (_ref) {\n var parent = _ref.parent,\n rowIndex = _ref.rowIndex,\n style = _ref.style,\n isScrolling = _ref.isScrolling,\n isVisible = _ref.isVisible,\n key = _ref.key;\n var rowRenderer = _this.props.rowRenderer; // TRICKY The style object is sometimes cached by Grid.\n // This prevents new style objects from bypassing shallowCompare().\n // However as of React 16, style props are auto-frozen (at least in dev mode)\n // Check to make sure we can still modify the style before proceeding.\n // https://github.com/facebook/react/commit/977357765b44af8ff0cfea327866861073095c12#commitcomment-20648713\n\n var widthDescriptor = Object.getOwnPropertyDescriptor(style, 'width');\n\n if (widthDescriptor && widthDescriptor.writable) {\n // By default, List cells should be 100% width.\n // This prevents them from flowing under a scrollbar (if present).\n style.width = '100%';\n }\n\n return rowRenderer({\n index: rowIndex,\n style: style,\n isScrolling: isScrolling,\n isVisible: isVisible,\n key: key,\n parent: parent\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_setRef\", function (ref) {\n _this.Grid = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScroll\", function (_ref2) {\n var clientHeight = _ref2.clientHeight,\n scrollHeight = _ref2.scrollHeight,\n scrollTop = _ref2.scrollTop;\n var onScroll = _this.props.onScroll;\n onScroll({\n clientHeight: clientHeight,\n scrollHeight: scrollHeight,\n scrollTop: scrollTop\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onSectionRendered\", function (_ref3) {\n var rowOverscanStartIndex = _ref3.rowOverscanStartIndex,\n rowOverscanStopIndex = _ref3.rowOverscanStopIndex,\n rowStartIndex = _ref3.rowStartIndex,\n rowStopIndex = _ref3.rowStopIndex;\n var onRowsRendered = _this.props.onRowsRendered;\n onRowsRendered({\n overscanStartIndex: rowOverscanStartIndex,\n overscanStopIndex: rowOverscanStopIndex,\n startIndex: rowStartIndex,\n stopIndex: rowStopIndex\n });\n });\n\n return _this;\n }\n\n _createClass(List, [{\n key: \"forceUpdateGrid\",\n value: function forceUpdateGrid() {\n if (this.Grid) {\n this.Grid.forceUpdate();\n }\n }\n /** See Grid#getOffsetForCell */\n\n }, {\n key: \"getOffsetForRow\",\n value: function getOffsetForRow(_ref4) {\n var alignment = _ref4.alignment,\n index = _ref4.index;\n\n if (this.Grid) {\n var _this$Grid$getOffsetF = this.Grid.getOffsetForCell({\n alignment: alignment,\n rowIndex: index,\n columnIndex: 0\n }),\n scrollTop = _this$Grid$getOffsetF.scrollTop;\n\n return scrollTop;\n }\n\n return 0;\n }\n /** CellMeasurer compatibility */\n\n }, {\n key: \"invalidateCellSizeAfterRender\",\n value: function invalidateCellSizeAfterRender(_ref5) {\n var columnIndex = _ref5.columnIndex,\n rowIndex = _ref5.rowIndex;\n\n if (this.Grid) {\n this.Grid.invalidateCellSizeAfterRender({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n /** See Grid#measureAllCells */\n\n }, {\n key: \"measureAllRows\",\n value: function measureAllRows() {\n if (this.Grid) {\n this.Grid.measureAllCells();\n }\n }\n /** CellMeasurer compatibility */\n\n }, {\n key: \"recomputeGridSize\",\n value: function recomputeGridSize() {\n var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref6$columnIndex = _ref6.columnIndex,\n columnIndex = _ref6$columnIndex === void 0 ? 0 : _ref6$columnIndex,\n _ref6$rowIndex = _ref6.rowIndex,\n rowIndex = _ref6$rowIndex === void 0 ? 0 : _ref6$rowIndex;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n /** See Grid#recomputeGridSize */\n\n }, {\n key: \"recomputeRowHeights\",\n value: function recomputeRowHeights() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: index,\n columnIndex: 0\n });\n }\n }\n /** See Grid#scrollToPosition */\n\n }, {\n key: \"scrollToPosition\",\n value: function scrollToPosition() {\n var scrollTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToPosition({\n scrollTop: scrollTop\n });\n }\n }\n /** See Grid#scrollToCell */\n\n }, {\n key: \"scrollToRow\",\n value: function scrollToRow() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToCell({\n columnIndex: 0,\n rowIndex: index\n });\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n className = _this$props.className,\n noRowsRenderer = _this$props.noRowsRenderer,\n scrollToIndex = _this$props.scrollToIndex,\n width = _this$props.width;\n var classNames = clsx('ReactVirtualized__List', className);\n return React.createElement(Grid, _extends({}, this.props, {\n autoContainerWidth: true,\n cellRenderer: this._cellRenderer,\n className: classNames,\n columnWidth: width,\n columnCount: 1,\n noContentRenderer: noRowsRenderer,\n onScroll: this._onScroll,\n onSectionRendered: this._onSectionRendered,\n ref: this._setRef,\n scrollToRow: scrollToIndex\n }));\n }\n }]);\n\n return List;\n}(React.PureComponent), _defineProperty(_class, \"propTypes\", process.env.NODE_ENV === 'production' ? null : {\n \"aria-label\": PropTypes.string,\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height\n * of rows can stretch the window. Intended for use with WindowScroller\n */\n \"autoHeight\": PropTypes.bool.isRequired,\n\n /** Optional CSS class name */\n \"className\": PropTypes.string,\n\n /**\n * Used to estimate the total height of a List before all of its rows have actually been measured.\n * The estimated total height is adjusted as rows are rendered.\n */\n \"estimatedRowSize\": PropTypes.number.isRequired,\n\n /** Height constraint for list (determines how many actual rows are rendered) */\n \"height\": PropTypes.number.isRequired,\n\n /** Optional renderer to be used in place of rows when rowCount is 0 */\n \"noRowsRenderer\": function noRowsRenderer() {\n return (typeof bpfrpt_proptype_NoContentRenderer === \"function\" ? bpfrpt_proptype_NoContentRenderer.isRequired ? bpfrpt_proptype_NoContentRenderer.isRequired : bpfrpt_proptype_NoContentRenderer : PropTypes.shape(bpfrpt_proptype_NoContentRenderer).isRequired).apply(this, arguments);\n },\n\n /** Callback invoked with information about the slice of rows that were just rendered. */\n \"onRowsRendered\": PropTypes.func.isRequired,\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n */\n \"onScroll\": PropTypes.func.isRequired,\n\n /** See Grid#overscanIndicesGetter */\n \"overscanIndicesGetter\": function overscanIndicesGetter() {\n return (typeof bpfrpt_proptype_OverscanIndicesGetter === \"function\" ? bpfrpt_proptype_OverscanIndicesGetter.isRequired ? bpfrpt_proptype_OverscanIndicesGetter.isRequired : bpfrpt_proptype_OverscanIndicesGetter : PropTypes.shape(bpfrpt_proptype_OverscanIndicesGetter).isRequired).apply(this, arguments);\n },\n\n /**\n * Number of rows to render above/below the visible bounds of the list.\n * These rows can help for smoother scrolling on touch devices.\n */\n \"overscanRowCount\": PropTypes.number.isRequired,\n\n /** Either a fixed row height (number) or a function that returns the height of a row given its index. */\n \"rowHeight\": function rowHeight() {\n return (typeof bpfrpt_proptype_CellSize === \"function\" ? bpfrpt_proptype_CellSize.isRequired ? bpfrpt_proptype_CellSize.isRequired : bpfrpt_proptype_CellSize : PropTypes.shape(bpfrpt_proptype_CellSize).isRequired).apply(this, arguments);\n },\n\n /** Responsible for rendering a row given an index; ({ index: number }): node */\n \"rowRenderer\": function rowRenderer() {\n return (typeof bpfrpt_proptype_RowRenderer === \"function\" ? bpfrpt_proptype_RowRenderer.isRequired ? bpfrpt_proptype_RowRenderer.isRequired : bpfrpt_proptype_RowRenderer : PropTypes.shape(bpfrpt_proptype_RowRenderer).isRequired).apply(this, arguments);\n },\n\n /** Number of rows in list. */\n \"rowCount\": PropTypes.number.isRequired,\n\n /** See Grid#scrollToAlignment */\n \"scrollToAlignment\": function scrollToAlignment() {\n return (typeof bpfrpt_proptype_Alignment === \"function\" ? bpfrpt_proptype_Alignment.isRequired ? bpfrpt_proptype_Alignment.isRequired : bpfrpt_proptype_Alignment : PropTypes.shape(bpfrpt_proptype_Alignment).isRequired).apply(this, arguments);\n },\n\n /** Row index to ensure visible (by forcefully scrolling if necessary) */\n \"scrollToIndex\": PropTypes.number.isRequired,\n\n /** Vertical offset. */\n \"scrollTop\": PropTypes.number,\n\n /** Optional inline style */\n \"style\": PropTypes.object.isRequired,\n\n /** Tab index for focus */\n \"tabIndex\": PropTypes.number,\n\n /** Width of list */\n \"width\": PropTypes.number.isRequired\n}), _temp);\n\n_defineProperty(List, \"defaultProps\", {\n autoHeight: false,\n estimatedRowSize: 30,\n onScroll: function onScroll() {},\n noRowsRenderer: function noRowsRenderer() {\n return null;\n },\n onRowsRendered: function onRowsRendered() {},\n overscanIndicesGetter: accessibilityOverscanIndicesGetter,\n overscanRowCount: 10,\n scrollToAlignment: 'auto',\n scrollToIndex: -1,\n style: {}\n});\n\nexport { List as default };\nimport { bpfrpt_proptype_NoContentRenderer } from \"../Grid\";\nimport { bpfrpt_proptype_Alignment } from \"../Grid\";\nimport { bpfrpt_proptype_CellSize } from \"../Grid\";\nimport { bpfrpt_proptype_CellPosition } from \"../Grid\";\nimport { bpfrpt_proptype_OverscanIndicesGetter } from \"../Grid\";\nimport { bpfrpt_proptype_RenderedSection } from \"../Grid\";\nimport { bpfrpt_proptype_CellRendererParams } from \"../Grid\";\nimport { bpfrpt_proptype_Scroll as bpfrpt_proptype_GridScroll } from \"../Grid\";\nimport { bpfrpt_proptype_RowRenderer } from \"./types\";\nimport { bpfrpt_proptype_RenderedRows } from \"./types\";\nimport { bpfrpt_proptype_Scroll } from \"./types\";\nimport PropTypes from \"prop-types\";","/**\n * Binary Search Bounds\n * https://github.com/mikolalysenko/binary-search-bounds\n * Mikola Lysenko\n *\n * Inlined because of Content Security Policy issue caused by the use of `new Function(...)` syntax.\n * Issue reported here: https://github.com/mikolalysenko/binary-search-bounds/issues/5\n **/\nfunction _GEA(a, l, h, y) {\n var i = h + 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (x >= y) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n\n return i;\n}\n\nfunction _GEP(a, l, h, y, c) {\n var i = h + 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (c(x, y) >= 0) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n\n return i;\n}\n\nfunction dispatchBsearchGE(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _GEP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _GEA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _GTA(a, l, h, y) {\n var i = h + 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (x > y) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n\n return i;\n}\n\nfunction _GTP(a, l, h, y, c) {\n var i = h + 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (c(x, y) > 0) {\n i = m;\n h = m - 1;\n } else {\n l = m + 1;\n }\n }\n\n return i;\n}\n\nfunction dispatchBsearchGT(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _GTP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _GTA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _LTA(a, l, h, y) {\n var i = l - 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (x < y) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n\n return i;\n}\n\nfunction _LTP(a, l, h, y, c) {\n var i = l - 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (c(x, y) < 0) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n\n return i;\n}\n\nfunction dispatchBsearchLT(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _LTP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _LTA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _LEA(a, l, h, y) {\n var i = l - 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (x <= y) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n\n return i;\n}\n\nfunction _LEP(a, l, h, y, c) {\n var i = l - 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (c(x, y) <= 0) {\n i = m;\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n\n return i;\n}\n\nfunction dispatchBsearchLE(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _LEP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _LEA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nfunction _EQA(a, l, h, y) {\n l - 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n\n if (x === y) {\n return m;\n } else if (x <= y) {\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n\n return -1;\n}\n\nfunction _EQP(a, l, h, y, c) {\n l - 1;\n\n while (l <= h) {\n var m = l + h >>> 1,\n x = a[m];\n var p = c(x, y);\n\n if (p === 0) {\n return m;\n } else if (p <= 0) {\n l = m + 1;\n } else {\n h = m - 1;\n }\n }\n\n return -1;\n}\n\nfunction dispatchBsearchEQ(a, y, c, l, h) {\n if (typeof c === 'function') {\n return _EQP(a, l === void 0 ? 0 : l | 0, h === void 0 ? a.length - 1 : h | 0, y, c);\n } else {\n return _EQA(a, c === void 0 ? 0 : c | 0, l === void 0 ? a.length - 1 : l | 0, y);\n }\n}\n\nexport default {\n ge: dispatchBsearchGE,\n gt: dispatchBsearchGT,\n lt: dispatchBsearchLT,\n le: dispatchBsearchLE,\n eq: dispatchBsearchEQ\n};","/**\n * Binary Search Bounds\n * https://github.com/mikolalysenko/interval-tree-1d\n * Mikola Lysenko\n *\n * Inlined because of Content Security Policy issue caused by the use of `new Function(...)` syntax in an upstream dependency.\n * Issue reported here: https://github.com/mikolalysenko/binary-search-bounds/issues/5\n **/\nimport bounds from './binarySearchBounds';\nvar NOT_FOUND = 0;\nvar SUCCESS = 1;\nvar EMPTY = 2;\n\nfunction IntervalTreeNode(mid, left, right, leftPoints, rightPoints) {\n this.mid = mid;\n this.left = left;\n this.right = right;\n this.leftPoints = leftPoints;\n this.rightPoints = rightPoints;\n this.count = (left ? left.count : 0) + (right ? right.count : 0) + leftPoints.length;\n}\n\nvar proto = IntervalTreeNode.prototype;\n\nfunction copy(a, b) {\n a.mid = b.mid;\n a.left = b.left;\n a.right = b.right;\n a.leftPoints = b.leftPoints;\n a.rightPoints = b.rightPoints;\n a.count = b.count;\n}\n\nfunction rebuild(node, intervals) {\n var ntree = createIntervalTree(intervals);\n node.mid = ntree.mid;\n node.left = ntree.left;\n node.right = ntree.right;\n node.leftPoints = ntree.leftPoints;\n node.rightPoints = ntree.rightPoints;\n node.count = ntree.count;\n}\n\nfunction rebuildWithInterval(node, interval) {\n var intervals = node.intervals([]);\n intervals.push(interval);\n rebuild(node, intervals);\n}\n\nfunction rebuildWithoutInterval(node, interval) {\n var intervals = node.intervals([]);\n var idx = intervals.indexOf(interval);\n\n if (idx < 0) {\n return NOT_FOUND;\n }\n\n intervals.splice(idx, 1);\n rebuild(node, intervals);\n return SUCCESS;\n}\n\nproto.intervals = function (result) {\n result.push.apply(result, this.leftPoints);\n\n if (this.left) {\n this.left.intervals(result);\n }\n\n if (this.right) {\n this.right.intervals(result);\n }\n\n return result;\n};\n\nproto.insert = function (interval) {\n var weight = this.count - this.leftPoints.length;\n this.count += 1;\n\n if (interval[1] < this.mid) {\n if (this.left) {\n if (4 * (this.left.count + 1) > 3 * (weight + 1)) {\n rebuildWithInterval(this, interval);\n } else {\n this.left.insert(interval);\n }\n } else {\n this.left = createIntervalTree([interval]);\n }\n } else if (interval[0] > this.mid) {\n if (this.right) {\n if (4 * (this.right.count + 1) > 3 * (weight + 1)) {\n rebuildWithInterval(this, interval);\n } else {\n this.right.insert(interval);\n }\n } else {\n this.right = createIntervalTree([interval]);\n }\n } else {\n var l = bounds.ge(this.leftPoints, interval, compareBegin);\n var r = bounds.ge(this.rightPoints, interval, compareEnd);\n this.leftPoints.splice(l, 0, interval);\n this.rightPoints.splice(r, 0, interval);\n }\n};\n\nproto.remove = function (interval) {\n var weight = this.count - this.leftPoints;\n\n if (interval[1] < this.mid) {\n if (!this.left) {\n return NOT_FOUND;\n }\n\n var rw = this.right ? this.right.count : 0;\n\n if (4 * rw > 3 * (weight - 1)) {\n return rebuildWithoutInterval(this, interval);\n }\n\n var r = this.left.remove(interval);\n\n if (r === EMPTY) {\n this.left = null;\n this.count -= 1;\n return SUCCESS;\n } else if (r === SUCCESS) {\n this.count -= 1;\n }\n\n return r;\n } else if (interval[0] > this.mid) {\n if (!this.right) {\n return NOT_FOUND;\n }\n\n var lw = this.left ? this.left.count : 0;\n\n if (4 * lw > 3 * (weight - 1)) {\n return rebuildWithoutInterval(this, interval);\n }\n\n var r = this.right.remove(interval);\n\n if (r === EMPTY) {\n this.right = null;\n this.count -= 1;\n return SUCCESS;\n } else if (r === SUCCESS) {\n this.count -= 1;\n }\n\n return r;\n } else {\n if (this.count === 1) {\n if (this.leftPoints[0] === interval) {\n return EMPTY;\n } else {\n return NOT_FOUND;\n }\n }\n\n if (this.leftPoints.length === 1 && this.leftPoints[0] === interval) {\n if (this.left && this.right) {\n var p = this;\n var n = this.left;\n\n while (n.right) {\n p = n;\n n = n.right;\n }\n\n if (p === this) {\n n.right = this.right;\n } else {\n var l = this.left;\n var r = this.right;\n p.count -= n.count;\n p.right = n.left;\n n.left = l;\n n.right = r;\n }\n\n copy(this, n);\n this.count = (this.left ? this.left.count : 0) + (this.right ? this.right.count : 0) + this.leftPoints.length;\n } else if (this.left) {\n copy(this, this.left);\n } else {\n copy(this, this.right);\n }\n\n return SUCCESS;\n }\n\n for (var l = bounds.ge(this.leftPoints, interval, compareBegin); l < this.leftPoints.length; ++l) {\n if (this.leftPoints[l][0] !== interval[0]) {\n break;\n }\n\n if (this.leftPoints[l] === interval) {\n this.count -= 1;\n this.leftPoints.splice(l, 1);\n\n for (var r = bounds.ge(this.rightPoints, interval, compareEnd); r < this.rightPoints.length; ++r) {\n if (this.rightPoints[r][1] !== interval[1]) {\n break;\n } else if (this.rightPoints[r] === interval) {\n this.rightPoints.splice(r, 1);\n return SUCCESS;\n }\n }\n }\n }\n\n return NOT_FOUND;\n }\n};\n\nfunction reportLeftRange(arr, hi, cb) {\n for (var i = 0; i < arr.length && arr[i][0] <= hi; ++i) {\n var r = cb(arr[i]);\n\n if (r) {\n return r;\n }\n }\n}\n\nfunction reportRightRange(arr, lo, cb) {\n for (var i = arr.length - 1; i >= 0 && arr[i][1] >= lo; --i) {\n var r = cb(arr[i]);\n\n if (r) {\n return r;\n }\n }\n}\n\nfunction reportRange(arr, cb) {\n for (var i = 0; i < arr.length; ++i) {\n var r = cb(arr[i]);\n\n if (r) {\n return r;\n }\n }\n}\n\nproto.queryPoint = function (x, cb) {\n if (x < this.mid) {\n if (this.left) {\n var r = this.left.queryPoint(x, cb);\n\n if (r) {\n return r;\n }\n }\n\n return reportLeftRange(this.leftPoints, x, cb);\n } else if (x > this.mid) {\n if (this.right) {\n var r = this.right.queryPoint(x, cb);\n\n if (r) {\n return r;\n }\n }\n\n return reportRightRange(this.rightPoints, x, cb);\n } else {\n return reportRange(this.leftPoints, cb);\n }\n};\n\nproto.queryInterval = function (lo, hi, cb) {\n if (lo < this.mid && this.left) {\n var r = this.left.queryInterval(lo, hi, cb);\n\n if (r) {\n return r;\n }\n }\n\n if (hi > this.mid && this.right) {\n var r = this.right.queryInterval(lo, hi, cb);\n\n if (r) {\n return r;\n }\n }\n\n if (hi < this.mid) {\n return reportLeftRange(this.leftPoints, hi, cb);\n } else if (lo > this.mid) {\n return reportRightRange(this.rightPoints, lo, cb);\n } else {\n return reportRange(this.leftPoints, cb);\n }\n};\n\nfunction compareNumbers(a, b) {\n return a - b;\n}\n\nfunction compareBegin(a, b) {\n var d = a[0] - b[0];\n\n if (d) {\n return d;\n }\n\n return a[1] - b[1];\n}\n\nfunction compareEnd(a, b) {\n var d = a[1] - b[1];\n\n if (d) {\n return d;\n }\n\n return a[0] - b[0];\n}\n\nfunction createIntervalTree(intervals) {\n if (intervals.length === 0) {\n return null;\n }\n\n var pts = [];\n\n for (var i = 0; i < intervals.length; ++i) {\n pts.push(intervals[i][0], intervals[i][1]);\n }\n\n pts.sort(compareNumbers);\n var mid = pts[pts.length >> 1];\n var leftIntervals = [];\n var rightIntervals = [];\n var centerIntervals = [];\n\n for (var i = 0; i < intervals.length; ++i) {\n var s = intervals[i];\n\n if (s[1] < mid) {\n leftIntervals.push(s);\n } else if (mid < s[0]) {\n rightIntervals.push(s);\n } else {\n centerIntervals.push(s);\n }\n } //Split center intervals\n\n\n var leftPoints = centerIntervals;\n var rightPoints = centerIntervals.slice();\n leftPoints.sort(compareBegin);\n rightPoints.sort(compareEnd);\n return new IntervalTreeNode(mid, createIntervalTree(leftIntervals), createIntervalTree(rightIntervals), leftPoints, rightPoints);\n} //User friendly wrapper that makes it possible to support empty trees\n\n\nfunction IntervalTree(root) {\n this.root = root;\n}\n\nvar tproto = IntervalTree.prototype;\n\ntproto.insert = function (interval) {\n if (this.root) {\n this.root.insert(interval);\n } else {\n this.root = new IntervalTreeNode(interval[0], null, null, [interval], [interval]);\n }\n};\n\ntproto.remove = function (interval) {\n if (this.root) {\n var r = this.root.remove(interval);\n\n if (r === EMPTY) {\n this.root = null;\n }\n\n return r !== NOT_FOUND;\n }\n\n return false;\n};\n\ntproto.queryPoint = function (p, cb) {\n if (this.root) {\n return this.root.queryPoint(p, cb);\n }\n};\n\ntproto.queryInterval = function (lo, hi, cb) {\n if (lo <= hi && this.root) {\n return this.root.queryInterval(lo, hi, cb);\n }\n};\n\nObject.defineProperty(tproto, 'count', {\n get: function get() {\n if (this.root) {\n return this.root.count;\n }\n\n return 0;\n }\n});\nObject.defineProperty(tproto, 'intervals', {\n get: function get() {\n if (this.root) {\n return this.root.intervals([]);\n }\n\n return [];\n }\n});\nexport default function createWrapper(intervals) {\n if (!intervals || intervals.length === 0) {\n return new IntervalTree(null);\n }\n\n return new IntervalTree(createIntervalTree(intervals));\n}","import _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport createIntervalTree from '../vendor/intervalTree';\n\n// Position cache requirements:\n// O(log(n)) lookup of cells to render for a given viewport size\n// O(1) lookup of shortest measured column (so we know when to enter phase 1)\nvar PositionCache =\n/*#__PURE__*/\nfunction () {\n function PositionCache() {\n _classCallCheck(this, PositionCache);\n\n _defineProperty(this, \"_columnSizeMap\", {});\n\n _defineProperty(this, \"_intervalTree\", createIntervalTree());\n\n _defineProperty(this, \"_leftMap\", {});\n }\n\n _createClass(PositionCache, [{\n key: \"estimateTotalHeight\",\n value: function estimateTotalHeight(cellCount, columnCount, defaultCellHeight) {\n var unmeasuredCellCount = cellCount - this.count;\n return this.tallestColumnSize + Math.ceil(unmeasuredCellCount / columnCount) * defaultCellHeight;\n } // Render all cells visible within the viewport range defined.\n\n }, {\n key: \"range\",\n value: function range(scrollTop, clientHeight, renderCallback) {\n var _this = this;\n\n this._intervalTree.queryInterval(scrollTop, scrollTop + clientHeight, function (_ref) {\n var _ref2 = _slicedToArray(_ref, 3),\n top = _ref2[0],\n _ = _ref2[1],\n index = _ref2[2];\n\n return renderCallback(index, _this._leftMap[index], top);\n });\n }\n }, {\n key: \"setPosition\",\n value: function setPosition(index, left, top, height) {\n this._intervalTree.insert([top, top + height, index]);\n\n this._leftMap[index] = left;\n var columnSizeMap = this._columnSizeMap;\n var columnHeight = columnSizeMap[left];\n\n if (columnHeight === undefined) {\n columnSizeMap[left] = top + height;\n } else {\n columnSizeMap[left] = Math.max(columnHeight, top + height);\n }\n }\n }, {\n key: \"count\",\n get: function get() {\n return this._intervalTree.count;\n }\n }, {\n key: \"shortestColumnSize\",\n get: function get() {\n var columnSizeMap = this._columnSizeMap;\n var size = 0;\n\n for (var i in columnSizeMap) {\n var height = columnSizeMap[i];\n size = size === 0 ? height : Math.min(size, height);\n }\n\n return size;\n }\n }, {\n key: \"tallestColumnSize\",\n get: function get() {\n var columnSizeMap = this._columnSizeMap;\n var size = 0;\n\n for (var i in columnSizeMap) {\n var height = columnSizeMap[i];\n size = Math.max(size, height);\n }\n\n return size;\n }\n }]);\n\n return PositionCache;\n}();\n\nexport { PositionCache as default };","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar _class, _temp;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport clsx from 'clsx';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport PositionCache from './PositionCache';\nimport { requestAnimationTimeout, cancelAnimationTimeout } from '../utils/requestAnimationTimeout';\nvar emptyObject = {};\n/**\n * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\n\nexport var DEFAULT_SCROLLING_RESET_TIME_INTERVAL = 150;\n/**\n * This component efficiently displays arbitrarily positioned cells using windowing techniques.\n * Cell position is determined by an injected `cellPositioner` property.\n * Windowing is vertical; this component does not support horizontal scrolling.\n *\n * Rendering occurs in two phases:\n * 1) First pass uses estimated cell sizes (provided by the cache) to determine how many cells to measure in a batch.\n * Batch size is chosen using a fast, naive layout algorithm that stacks images in order until the viewport has been filled.\n * After measurement is complete (componentDidMount or componentDidUpdate) this component evaluates positioned cells\n * in order to determine if another measurement pass is required (eg if actual cell sizes were less than estimated sizes).\n * All measurements are permanently cached (keyed by `keyMapper`) for performance purposes.\n * 2) Second pass uses the external `cellPositioner` to layout cells.\n * At this time the positioner has access to cached size measurements for all cells.\n * The positions it returns are cached by Masonry for fast access later.\n * Phase one is repeated if the user scrolls beyond the current layout's bounds.\n * If the layout is invalidated due to eg a resize, cached positions can be cleared using `recomputeCellPositions()`.\n *\n * Animation constraints:\n * Simple animations are supported (eg translate/slide into place on initial reveal).\n * More complex animations are not (eg flying from one position to another on resize).\n *\n * Layout constraints:\n * This component supports multi-column layout.\n * The height of each item may vary.\n * The width of each item must not exceed the width of the column it is \"in\".\n * The left position of all items within a column must align.\n * (Items may not span multiple columns.)\n */\n\nvar Masonry = (_temp = _class =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(Masonry, _React$PureComponent);\n\n function Masonry() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, Masonry);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Masonry)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n isScrolling: false,\n scrollTop: 0\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_debounceResetIsScrollingId\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_invalidateOnUpdateStartIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_invalidateOnUpdateStopIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_positionCache\", new PositionCache());\n\n _defineProperty(_assertThisInitialized(_this), \"_startIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_startIndexMemoized\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_stopIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_stopIndexMemoized\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_debounceResetIsScrollingCallback\", function () {\n _this.setState({\n isScrolling: false\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_setScrollingContainerRef\", function (ref) {\n _this._scrollingContainer = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScroll\", function (event) {\n var height = _this.props.height;\n var eventScrollTop = event.currentTarget.scrollTop; // When this component is shrunk drastically, React dispatches a series of back-to-back scroll events,\n // Gradually converging on a scrollTop that is within the bounds of the new, smaller height.\n // This causes a series of rapid renders that is slow for long lists.\n // We can avoid that by doing some simple bounds checking to ensure that scroll offsets never exceed their bounds.\n\n var scrollTop = Math.min(Math.max(0, _this._getEstimatedTotalHeight() - height), eventScrollTop); // On iOS, we can arrive at negative offsets by swiping past the start or end.\n // Avoid re-rendering in this case as it can cause problems; see #532 for more.\n\n if (eventScrollTop !== scrollTop) {\n return;\n } // Prevent pointer events from interrupting a smooth scroll\n\n\n _this._debounceResetIsScrolling(); // Certain devices (like Apple touchpad) rapid-fire duplicate events.\n // Don't force a re-render if this is the case.\n // The mouse may move faster then the animation frame does.\n // Use requestAnimationFrame to avoid over-updating.\n\n\n if (_this.state.scrollTop !== scrollTop) {\n _this.setState({\n isScrolling: true,\n scrollTop: scrollTop\n });\n }\n });\n\n return _this;\n }\n\n _createClass(Masonry, [{\n key: \"clearCellPositions\",\n value: function clearCellPositions() {\n this._positionCache = new PositionCache();\n this.forceUpdate();\n } // HACK This method signature was intended for Grid\n\n }, {\n key: \"invalidateCellSizeAfterRender\",\n value: function invalidateCellSizeAfterRender(_ref) {\n var index = _ref.rowIndex;\n\n if (this._invalidateOnUpdateStartIndex === null) {\n this._invalidateOnUpdateStartIndex = index;\n this._invalidateOnUpdateStopIndex = index;\n } else {\n this._invalidateOnUpdateStartIndex = Math.min(this._invalidateOnUpdateStartIndex, index);\n this._invalidateOnUpdateStopIndex = Math.max(this._invalidateOnUpdateStopIndex, index);\n }\n }\n }, {\n key: \"recomputeCellPositions\",\n value: function recomputeCellPositions() {\n var stopIndex = this._positionCache.count - 1;\n this._positionCache = new PositionCache();\n\n this._populatePositionCache(0, stopIndex);\n\n this.forceUpdate();\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this._checkInvalidateOnUpdate();\n\n this._invokeOnScrollCallback();\n\n this._invokeOnCellsRenderedCallback();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n this._checkInvalidateOnUpdate();\n\n this._invokeOnScrollCallback();\n\n this._invokeOnCellsRenderedCallback();\n\n if (this.props.scrollTop !== prevProps.scrollTop) {\n this._debounceResetIsScrolling();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this._debounceResetIsScrollingId) {\n cancelAnimationTimeout(this._debounceResetIsScrollingId);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n autoHeight = _this$props.autoHeight,\n cellCount = _this$props.cellCount,\n cellMeasurerCache = _this$props.cellMeasurerCache,\n cellRenderer = _this$props.cellRenderer,\n className = _this$props.className,\n height = _this$props.height,\n id = _this$props.id,\n keyMapper = _this$props.keyMapper,\n overscanByPixels = _this$props.overscanByPixels,\n role = _this$props.role,\n style = _this$props.style,\n tabIndex = _this$props.tabIndex,\n width = _this$props.width,\n rowDirection = _this$props.rowDirection;\n var _this$state = this.state,\n isScrolling = _this$state.isScrolling,\n scrollTop = _this$state.scrollTop;\n var children = [];\n\n var estimateTotalHeight = this._getEstimatedTotalHeight();\n\n var shortestColumnSize = this._positionCache.shortestColumnSize;\n var measuredCellCount = this._positionCache.count;\n var startIndex = 0;\n var stopIndex;\n\n this._positionCache.range(Math.max(0, scrollTop - overscanByPixels), height + overscanByPixels * 2, function (index, left, top) {\n var _style;\n\n if (typeof stopIndex === 'undefined') {\n startIndex = index;\n stopIndex = index;\n } else {\n startIndex = Math.min(startIndex, index);\n stopIndex = Math.max(stopIndex, index);\n }\n\n children.push(cellRenderer({\n index: index,\n isScrolling: isScrolling,\n key: keyMapper(index),\n parent: _this2,\n style: (_style = {\n height: cellMeasurerCache.getHeight(index)\n }, _defineProperty(_style, rowDirection === 'ltr' ? 'left' : 'right', left), _defineProperty(_style, \"position\", 'absolute'), _defineProperty(_style, \"top\", top), _defineProperty(_style, \"width\", cellMeasurerCache.getWidth(index)), _style)\n }));\n }); // We need to measure additional cells for this layout\n\n\n if (shortestColumnSize < scrollTop + height + overscanByPixels && measuredCellCount < cellCount) {\n var batchSize = Math.min(cellCount - measuredCellCount, Math.ceil((scrollTop + height + overscanByPixels - shortestColumnSize) / cellMeasurerCache.defaultHeight * width / cellMeasurerCache.defaultWidth));\n\n for (var _index = measuredCellCount; _index < measuredCellCount + batchSize; _index++) {\n stopIndex = _index;\n children.push(cellRenderer({\n index: _index,\n isScrolling: isScrolling,\n key: keyMapper(_index),\n parent: this,\n style: {\n width: cellMeasurerCache.getWidth(_index)\n }\n }));\n }\n }\n\n this._startIndex = startIndex;\n this._stopIndex = stopIndex;\n return React.createElement(\"div\", {\n ref: this._setScrollingContainerRef,\n \"aria-label\": this.props['aria-label'],\n className: clsx('ReactVirtualized__Masonry', className),\n id: id,\n onScroll: this._onScroll,\n role: role,\n style: _objectSpread({\n boxSizing: 'border-box',\n direction: 'ltr',\n height: autoHeight ? 'auto' : height,\n overflowX: 'hidden',\n overflowY: estimateTotalHeight < height ? 'hidden' : 'auto',\n position: 'relative',\n width: width,\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform'\n }, style),\n tabIndex: tabIndex\n }, React.createElement(\"div\", {\n className: \"ReactVirtualized__Masonry__innerScrollContainer\",\n style: {\n width: '100%',\n height: estimateTotalHeight,\n maxWidth: '100%',\n maxHeight: estimateTotalHeight,\n overflow: 'hidden',\n pointerEvents: isScrolling ? 'none' : '',\n position: 'relative'\n }\n }, children));\n }\n }, {\n key: \"_checkInvalidateOnUpdate\",\n value: function _checkInvalidateOnUpdate() {\n if (typeof this._invalidateOnUpdateStartIndex === 'number') {\n var startIndex = this._invalidateOnUpdateStartIndex;\n var stopIndex = this._invalidateOnUpdateStopIndex;\n this._invalidateOnUpdateStartIndex = null;\n this._invalidateOnUpdateStopIndex = null; // Query external layout logic for position of newly-measured cells\n\n this._populatePositionCache(startIndex, stopIndex);\n\n this.forceUpdate();\n }\n }\n }, {\n key: \"_debounceResetIsScrolling\",\n value: function _debounceResetIsScrolling() {\n var scrollingResetTimeInterval = this.props.scrollingResetTimeInterval;\n\n if (this._debounceResetIsScrollingId) {\n cancelAnimationTimeout(this._debounceResetIsScrollingId);\n }\n\n this._debounceResetIsScrollingId = requestAnimationTimeout(this._debounceResetIsScrollingCallback, scrollingResetTimeInterval);\n }\n }, {\n key: \"_getEstimatedTotalHeight\",\n value: function _getEstimatedTotalHeight() {\n var _this$props2 = this.props,\n cellCount = _this$props2.cellCount,\n cellMeasurerCache = _this$props2.cellMeasurerCache,\n width = _this$props2.width;\n var estimatedColumnCount = Math.max(1, Math.floor(width / cellMeasurerCache.defaultWidth));\n return this._positionCache.estimateTotalHeight(cellCount, estimatedColumnCount, cellMeasurerCache.defaultHeight);\n }\n }, {\n key: \"_invokeOnScrollCallback\",\n value: function _invokeOnScrollCallback() {\n var _this$props3 = this.props,\n height = _this$props3.height,\n onScroll = _this$props3.onScroll;\n var scrollTop = this.state.scrollTop;\n\n if (this._onScrollMemoized !== scrollTop) {\n onScroll({\n clientHeight: height,\n scrollHeight: this._getEstimatedTotalHeight(),\n scrollTop: scrollTop\n });\n this._onScrollMemoized = scrollTop;\n }\n }\n }, {\n key: \"_invokeOnCellsRenderedCallback\",\n value: function _invokeOnCellsRenderedCallback() {\n if (this._startIndexMemoized !== this._startIndex || this._stopIndexMemoized !== this._stopIndex) {\n var onCellsRendered = this.props.onCellsRendered;\n onCellsRendered({\n startIndex: this._startIndex,\n stopIndex: this._stopIndex\n });\n this._startIndexMemoized = this._startIndex;\n this._stopIndexMemoized = this._stopIndex;\n }\n }\n }, {\n key: \"_populatePositionCache\",\n value: function _populatePositionCache(startIndex, stopIndex) {\n var _this$props4 = this.props,\n cellMeasurerCache = _this$props4.cellMeasurerCache,\n cellPositioner = _this$props4.cellPositioner;\n\n for (var _index2 = startIndex; _index2 <= stopIndex; _index2++) {\n var _cellPositioner = cellPositioner(_index2),\n left = _cellPositioner.left,\n top = _cellPositioner.top;\n\n this._positionCache.setPosition(_index2, left, top, cellMeasurerCache.getHeight(_index2));\n }\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.scrollTop !== undefined && prevState.scrollTop !== nextProps.scrollTop) {\n return {\n isScrolling: true,\n scrollTop: nextProps.scrollTop\n };\n }\n\n return null;\n }\n }]);\n\n return Masonry;\n}(React.PureComponent), _defineProperty(_class, \"propTypes\", process.env.NODE_ENV === 'production' ? null : {\n \"autoHeight\": PropTypes.bool.isRequired,\n \"cellCount\": PropTypes.number.isRequired,\n \"cellMeasurerCache\": function cellMeasurerCache() {\n return (typeof CellMeasurerCache === \"function\" ? PropTypes.instanceOf(CellMeasurerCache).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n \"cellPositioner\": function cellPositioner() {\n return (typeof Positioner === \"function\" ? PropTypes.instanceOf(Positioner).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n \"cellRenderer\": function cellRenderer() {\n return (typeof CellRenderer === \"function\" ? PropTypes.instanceOf(CellRenderer).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n \"className\": PropTypes.string,\n \"height\": PropTypes.number.isRequired,\n \"id\": PropTypes.string,\n \"keyMapper\": function keyMapper() {\n return (typeof KeyMapper === \"function\" ? PropTypes.instanceOf(KeyMapper).isRequired : PropTypes.any.isRequired).apply(this, arguments);\n },\n \"onCellsRendered\": function onCellsRendered() {\n return (typeof OnCellsRenderedCallback === \"function\" ? PropTypes.instanceOf(OnCellsRenderedCallback) : PropTypes.any).apply(this, arguments);\n },\n \"onScroll\": function onScroll() {\n return (typeof OnScrollCallback === \"function\" ? PropTypes.instanceOf(OnScrollCallback) : PropTypes.any).apply(this, arguments);\n },\n \"overscanByPixels\": PropTypes.number.isRequired,\n \"role\": PropTypes.string.isRequired,\n \"scrollingResetTimeInterval\": PropTypes.number.isRequired,\n \"style\": function style(props, propName, componentName) {\n if (!Object.prototype.hasOwnProperty.call(props, propName)) {\n throw new Error(\"Prop `\".concat(propName, \"` has type 'any' or 'mixed', but was not provided to `\").concat(componentName, \"`. Pass undefined or any other value.\"));\n }\n },\n \"tabIndex\": PropTypes.number.isRequired,\n \"width\": PropTypes.number.isRequired,\n \"rowDirection\": PropTypes.string.isRequired,\n \"scrollTop\": PropTypes.number\n}), _temp);\n\n_defineProperty(Masonry, \"defaultProps\", {\n autoHeight: false,\n keyMapper: identity,\n onCellsRendered: noop,\n onScroll: noop,\n overscanByPixels: 20,\n role: 'grid',\n scrollingResetTimeInterval: DEFAULT_SCROLLING_RESET_TIME_INTERVAL,\n style: emptyObject,\n tabIndex: 0,\n rowDirection: 'ltr'\n});\n\nfunction identity(value) {\n return value;\n}\n\nfunction noop() {}\n\nvar bpfrpt_proptype_CellMeasurerCache = process.env.NODE_ENV === 'production' ? null : {\n \"defaultHeight\": PropTypes.number.isRequired,\n \"defaultWidth\": PropTypes.number.isRequired,\n \"getHeight\": PropTypes.func.isRequired,\n \"getWidth\": PropTypes.func.isRequired\n};\npolyfill(Masonry);\nexport default Masonry;\nvar bpfrpt_proptype_Positioner = process.env.NODE_ENV === 'production' ? null : PropTypes.func;\nimport { bpfrpt_proptype_AnimationTimeoutId } from \"../utils/requestAnimationTimeout\";\nimport PropTypes from \"prop-types\";\nexport { bpfrpt_proptype_CellMeasurerCache };\nexport { bpfrpt_proptype_Positioner };","import createCellPositioner from './createCellPositioner';\nimport Masonry from './Masonry';\nexport default Masonry;\nexport { createCellPositioner, Masonry };","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport { CellMeasurerCache } from '../CellMeasurer';\n\n/**\n * Caches measurements for a given cell.\n */\nvar CellMeasurerCacheDecorator =\n/*#__PURE__*/\nfunction () {\n function CellMeasurerCacheDecorator() {\n var _this = this;\n\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, CellMeasurerCacheDecorator);\n\n _defineProperty(this, \"_cellMeasurerCache\", void 0);\n\n _defineProperty(this, \"_columnIndexOffset\", void 0);\n\n _defineProperty(this, \"_rowIndexOffset\", void 0);\n\n _defineProperty(this, \"columnWidth\", function (_ref) {\n var index = _ref.index;\n\n _this._cellMeasurerCache.columnWidth({\n index: index + _this._columnIndexOffset\n });\n });\n\n _defineProperty(this, \"rowHeight\", function (_ref2) {\n var index = _ref2.index;\n\n _this._cellMeasurerCache.rowHeight({\n index: index + _this._rowIndexOffset\n });\n });\n\n var cellMeasurerCache = params.cellMeasurerCache,\n _params$columnIndexOf = params.columnIndexOffset,\n columnIndexOffset = _params$columnIndexOf === void 0 ? 0 : _params$columnIndexOf,\n _params$rowIndexOffse = params.rowIndexOffset,\n rowIndexOffset = _params$rowIndexOffse === void 0 ? 0 : _params$rowIndexOffse;\n this._cellMeasurerCache = cellMeasurerCache;\n this._columnIndexOffset = columnIndexOffset;\n this._rowIndexOffset = rowIndexOffset;\n }\n\n _createClass(CellMeasurerCacheDecorator, [{\n key: \"clear\",\n value: function clear(rowIndex, columnIndex) {\n this._cellMeasurerCache.clear(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: \"clearAll\",\n value: function clearAll() {\n this._cellMeasurerCache.clearAll();\n }\n }, {\n key: \"hasFixedHeight\",\n value: function hasFixedHeight() {\n return this._cellMeasurerCache.hasFixedHeight();\n }\n }, {\n key: \"hasFixedWidth\",\n value: function hasFixedWidth() {\n return this._cellMeasurerCache.hasFixedWidth();\n }\n }, {\n key: \"getHeight\",\n value: function getHeight(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return this._cellMeasurerCache.getHeight(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: \"getWidth\",\n value: function getWidth(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return this._cellMeasurerCache.getWidth(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: \"has\",\n value: function has(rowIndex) {\n var columnIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return this._cellMeasurerCache.has(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset);\n }\n }, {\n key: \"set\",\n value: function set(rowIndex, columnIndex, width, height) {\n this._cellMeasurerCache.set(rowIndex + this._rowIndexOffset, columnIndex + this._columnIndexOffset, width, height);\n }\n }, {\n key: \"defaultHeight\",\n get: function get() {\n return this._cellMeasurerCache.defaultHeight;\n }\n }, {\n key: \"defaultWidth\",\n get: function get() {\n return this._cellMeasurerCache.defaultWidth;\n }\n }]);\n\n return CellMeasurerCacheDecorator;\n}();\n\nexport { CellMeasurerCacheDecorator as default };","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { polyfill } from 'react-lifecycles-compat';\nimport CellMeasurerCacheDecorator from './CellMeasurerCacheDecorator';\nimport Grid from '../Grid';\nvar SCROLLBAR_SIZE_BUFFER = 20;\n/**\n * Renders 1, 2, or 4 Grids depending on configuration.\n * A main (body) Grid will always be rendered.\n * Optionally, 1-2 Grids for sticky header rows will also be rendered.\n * If no sticky columns, only 1 sticky header Grid will be rendered.\n * If sticky columns, 2 sticky header Grids will be rendered.\n */\n\nvar MultiGrid =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(MultiGrid, _React$PureComponent);\n\n function MultiGrid(props, context) {\n var _this;\n\n _classCallCheck(this, MultiGrid);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(MultiGrid).call(this, props, context));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n scrollLeft: 0,\n scrollTop: 0,\n scrollbarSize: 0,\n showHorizontalScrollbar: false,\n showVerticalScrollbar: false\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_deferredInvalidateColumnIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_deferredInvalidateRowIndex\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"_bottomLeftGridRef\", function (ref) {\n _this._bottomLeftGrid = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_bottomRightGridRef\", function (ref) {\n _this._bottomRightGrid = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_cellRendererBottomLeftGrid\", function (_ref) {\n var rowIndex = _ref.rowIndex,\n rest = _objectWithoutProperties(_ref, [\"rowIndex\"]);\n\n var _this$props = _this.props,\n cellRenderer = _this$props.cellRenderer,\n fixedRowCount = _this$props.fixedRowCount,\n rowCount = _this$props.rowCount;\n\n if (rowIndex === rowCount - fixedRowCount) {\n return React.createElement(\"div\", {\n key: rest.key,\n style: _objectSpread({}, rest.style, {\n height: SCROLLBAR_SIZE_BUFFER\n })\n });\n } else {\n return cellRenderer(_objectSpread({}, rest, {\n parent: _assertThisInitialized(_this),\n rowIndex: rowIndex + fixedRowCount\n }));\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_cellRendererBottomRightGrid\", function (_ref2) {\n var columnIndex = _ref2.columnIndex,\n rowIndex = _ref2.rowIndex,\n rest = _objectWithoutProperties(_ref2, [\"columnIndex\", \"rowIndex\"]);\n\n var _this$props2 = _this.props,\n cellRenderer = _this$props2.cellRenderer,\n fixedColumnCount = _this$props2.fixedColumnCount,\n fixedRowCount = _this$props2.fixedRowCount;\n return cellRenderer(_objectSpread({}, rest, {\n columnIndex: columnIndex + fixedColumnCount,\n parent: _assertThisInitialized(_this),\n rowIndex: rowIndex + fixedRowCount\n }));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_cellRendererTopRightGrid\", function (_ref3) {\n var columnIndex = _ref3.columnIndex,\n rest = _objectWithoutProperties(_ref3, [\"columnIndex\"]);\n\n var _this$props3 = _this.props,\n cellRenderer = _this$props3.cellRenderer,\n columnCount = _this$props3.columnCount,\n fixedColumnCount = _this$props3.fixedColumnCount;\n\n if (columnIndex === columnCount - fixedColumnCount) {\n return React.createElement(\"div\", {\n key: rest.key,\n style: _objectSpread({}, rest.style, {\n width: SCROLLBAR_SIZE_BUFFER\n })\n });\n } else {\n return cellRenderer(_objectSpread({}, rest, {\n columnIndex: columnIndex + fixedColumnCount,\n parent: _assertThisInitialized(_this)\n }));\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_columnWidthRightGrid\", function (_ref4) {\n var index = _ref4.index;\n var _this$props4 = _this.props,\n columnCount = _this$props4.columnCount,\n fixedColumnCount = _this$props4.fixedColumnCount,\n columnWidth = _this$props4.columnWidth;\n var _this$state = _this.state,\n scrollbarSize = _this$state.scrollbarSize,\n showHorizontalScrollbar = _this$state.showHorizontalScrollbar; // An extra cell is added to the count\n // This gives the smaller Grid extra room for offset,\n // In case the main (bottom right) Grid has a scrollbar\n // If no scrollbar, the extra space is overflow:hidden anyway\n\n if (showHorizontalScrollbar && index === columnCount - fixedColumnCount) {\n return scrollbarSize;\n }\n\n return typeof columnWidth === 'function' ? columnWidth({\n index: index + fixedColumnCount\n }) : columnWidth;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScroll\", function (scrollInfo) {\n var scrollLeft = scrollInfo.scrollLeft,\n scrollTop = scrollInfo.scrollTop;\n\n _this.setState({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n\n var onScroll = _this.props.onScroll;\n\n if (onScroll) {\n onScroll(scrollInfo);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScrollbarPresenceChange\", function (_ref5) {\n var horizontal = _ref5.horizontal,\n size = _ref5.size,\n vertical = _ref5.vertical;\n var _this$state2 = _this.state,\n showHorizontalScrollbar = _this$state2.showHorizontalScrollbar,\n showVerticalScrollbar = _this$state2.showVerticalScrollbar;\n\n if (horizontal !== showHorizontalScrollbar || vertical !== showVerticalScrollbar) {\n _this.setState({\n scrollbarSize: size,\n showHorizontalScrollbar: horizontal,\n showVerticalScrollbar: vertical\n });\n\n var onScrollbarPresenceChange = _this.props.onScrollbarPresenceChange;\n\n if (typeof onScrollbarPresenceChange === 'function') {\n onScrollbarPresenceChange({\n horizontal: horizontal,\n size: size,\n vertical: vertical\n });\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScrollLeft\", function (scrollInfo) {\n var scrollLeft = scrollInfo.scrollLeft;\n\n _this._onScroll({\n scrollLeft: scrollLeft,\n scrollTop: _this.state.scrollTop\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onScrollTop\", function (scrollInfo) {\n var scrollTop = scrollInfo.scrollTop;\n\n _this._onScroll({\n scrollTop: scrollTop,\n scrollLeft: _this.state.scrollLeft\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_rowHeightBottomGrid\", function (_ref6) {\n var index = _ref6.index;\n var _this$props5 = _this.props,\n fixedRowCount = _this$props5.fixedRowCount,\n rowCount = _this$props5.rowCount,\n rowHeight = _this$props5.rowHeight;\n var _this$state3 = _this.state,\n scrollbarSize = _this$state3.scrollbarSize,\n showVerticalScrollbar = _this$state3.showVerticalScrollbar; // An extra cell is added to the count\n // This gives the smaller Grid extra room for offset,\n // In case the main (bottom right) Grid has a scrollbar\n // If no scrollbar, the extra space is overflow:hidden anyway\n\n if (showVerticalScrollbar && index === rowCount - fixedRowCount) {\n return scrollbarSize;\n }\n\n return typeof rowHeight === 'function' ? rowHeight({\n index: index + fixedRowCount\n }) : rowHeight;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_topLeftGridRef\", function (ref) {\n _this._topLeftGrid = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_topRightGridRef\", function (ref) {\n _this._topRightGrid = ref;\n });\n\n var deferredMeasurementCache = props.deferredMeasurementCache,\n _fixedColumnCount = props.fixedColumnCount,\n _fixedRowCount = props.fixedRowCount;\n\n _this._maybeCalculateCachedStyles(true);\n\n if (deferredMeasurementCache) {\n _this._deferredMeasurementCacheBottomLeftGrid = _fixedRowCount > 0 ? new CellMeasurerCacheDecorator({\n cellMeasurerCache: deferredMeasurementCache,\n columnIndexOffset: 0,\n rowIndexOffset: _fixedRowCount\n }) : deferredMeasurementCache;\n _this._deferredMeasurementCacheBottomRightGrid = _fixedColumnCount > 0 || _fixedRowCount > 0 ? new CellMeasurerCacheDecorator({\n cellMeasurerCache: deferredMeasurementCache,\n columnIndexOffset: _fixedColumnCount,\n rowIndexOffset: _fixedRowCount\n }) : deferredMeasurementCache;\n _this._deferredMeasurementCacheTopRightGrid = _fixedColumnCount > 0 ? new CellMeasurerCacheDecorator({\n cellMeasurerCache: deferredMeasurementCache,\n columnIndexOffset: _fixedColumnCount,\n rowIndexOffset: 0\n }) : deferredMeasurementCache;\n }\n\n return _this;\n }\n\n _createClass(MultiGrid, [{\n key: \"forceUpdateGrids\",\n value: function forceUpdateGrids() {\n this._bottomLeftGrid && this._bottomLeftGrid.forceUpdate();\n this._bottomRightGrid && this._bottomRightGrid.forceUpdate();\n this._topLeftGrid && this._topLeftGrid.forceUpdate();\n this._topRightGrid && this._topRightGrid.forceUpdate();\n }\n /** See Grid#invalidateCellSizeAfterRender */\n\n }, {\n key: \"invalidateCellSizeAfterRender\",\n value: function invalidateCellSizeAfterRender() {\n var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref7$columnIndex = _ref7.columnIndex,\n columnIndex = _ref7$columnIndex === void 0 ? 0 : _ref7$columnIndex,\n _ref7$rowIndex = _ref7.rowIndex,\n rowIndex = _ref7$rowIndex === void 0 ? 0 : _ref7$rowIndex;\n\n this._deferredInvalidateColumnIndex = typeof this._deferredInvalidateColumnIndex === 'number' ? Math.min(this._deferredInvalidateColumnIndex, columnIndex) : columnIndex;\n this._deferredInvalidateRowIndex = typeof this._deferredInvalidateRowIndex === 'number' ? Math.min(this._deferredInvalidateRowIndex, rowIndex) : rowIndex;\n }\n /** See Grid#measureAllCells */\n\n }, {\n key: \"measureAllCells\",\n value: function measureAllCells() {\n this._bottomLeftGrid && this._bottomLeftGrid.measureAllCells();\n this._bottomRightGrid && this._bottomRightGrid.measureAllCells();\n this._topLeftGrid && this._topLeftGrid.measureAllCells();\n this._topRightGrid && this._topRightGrid.measureAllCells();\n }\n /** See Grid#recomputeGridSize */\n\n }, {\n key: \"recomputeGridSize\",\n value: function recomputeGridSize() {\n var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref8$columnIndex = _ref8.columnIndex,\n columnIndex = _ref8$columnIndex === void 0 ? 0 : _ref8$columnIndex,\n _ref8$rowIndex = _ref8.rowIndex,\n rowIndex = _ref8$rowIndex === void 0 ? 0 : _ref8$rowIndex;\n\n var _this$props6 = this.props,\n fixedColumnCount = _this$props6.fixedColumnCount,\n fixedRowCount = _this$props6.fixedRowCount;\n var adjustedColumnIndex = Math.max(0, columnIndex - fixedColumnCount);\n var adjustedRowIndex = Math.max(0, rowIndex - fixedRowCount);\n this._bottomLeftGrid && this._bottomLeftGrid.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: adjustedRowIndex\n });\n this._bottomRightGrid && this._bottomRightGrid.recomputeGridSize({\n columnIndex: adjustedColumnIndex,\n rowIndex: adjustedRowIndex\n });\n this._topLeftGrid && this._topLeftGrid.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n this._topRightGrid && this._topRightGrid.recomputeGridSize({\n columnIndex: adjustedColumnIndex,\n rowIndex: rowIndex\n });\n this._leftGridWidth = null;\n this._topGridHeight = null;\n\n this._maybeCalculateCachedStyles(true);\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this$props7 = this.props,\n scrollLeft = _this$props7.scrollLeft,\n scrollTop = _this$props7.scrollTop;\n\n if (scrollLeft > 0 || scrollTop > 0) {\n var newState = {};\n\n if (scrollLeft > 0) {\n newState.scrollLeft = scrollLeft;\n }\n\n if (scrollTop > 0) {\n newState.scrollTop = scrollTop;\n }\n\n this.setState(newState);\n }\n\n this._handleInvalidatedGridSize();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this._handleInvalidatedGridSize();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props8 = this.props,\n onScroll = _this$props8.onScroll,\n onSectionRendered = _this$props8.onSectionRendered,\n onScrollbarPresenceChange = _this$props8.onScrollbarPresenceChange,\n scrollLeftProp = _this$props8.scrollLeft,\n scrollToColumn = _this$props8.scrollToColumn,\n scrollTopProp = _this$props8.scrollTop,\n scrollToRow = _this$props8.scrollToRow,\n rest = _objectWithoutProperties(_this$props8, [\"onScroll\", \"onSectionRendered\", \"onScrollbarPresenceChange\", \"scrollLeft\", \"scrollToColumn\", \"scrollTop\", \"scrollToRow\"]);\n\n this._prepareForRender(); // Don't render any of our Grids if there are no cells.\n // This mirrors what Grid does,\n // And prevents us from recording inaccurage measurements when used with CellMeasurer.\n\n\n if (this.props.width === 0 || this.props.height === 0) {\n return null;\n } // scrollTop and scrollLeft props are explicitly filtered out and ignored\n\n\n var _this$state4 = this.state,\n scrollLeft = _this$state4.scrollLeft,\n scrollTop = _this$state4.scrollTop;\n return React.createElement(\"div\", {\n style: this._containerOuterStyle\n }, React.createElement(\"div\", {\n style: this._containerTopStyle\n }, this._renderTopLeftGrid(rest), this._renderTopRightGrid(_objectSpread({}, rest, {\n onScroll: onScroll,\n scrollLeft: scrollLeft\n }))), React.createElement(\"div\", {\n style: this._containerBottomStyle\n }, this._renderBottomLeftGrid(_objectSpread({}, rest, {\n onScroll: onScroll,\n scrollTop: scrollTop\n })), this._renderBottomRightGrid(_objectSpread({}, rest, {\n onScroll: onScroll,\n onSectionRendered: onSectionRendered,\n scrollLeft: scrollLeft,\n scrollToColumn: scrollToColumn,\n scrollToRow: scrollToRow,\n scrollTop: scrollTop\n }))));\n }\n }, {\n key: \"_getBottomGridHeight\",\n value: function _getBottomGridHeight(props) {\n var height = props.height;\n\n var topGridHeight = this._getTopGridHeight(props);\n\n return height - topGridHeight;\n }\n }, {\n key: \"_getLeftGridWidth\",\n value: function _getLeftGridWidth(props) {\n var fixedColumnCount = props.fixedColumnCount,\n columnWidth = props.columnWidth;\n\n if (this._leftGridWidth == null) {\n if (typeof columnWidth === 'function') {\n var leftGridWidth = 0;\n\n for (var index = 0; index < fixedColumnCount; index++) {\n leftGridWidth += columnWidth({\n index: index\n });\n }\n\n this._leftGridWidth = leftGridWidth;\n } else {\n this._leftGridWidth = columnWidth * fixedColumnCount;\n }\n }\n\n return this._leftGridWidth;\n }\n }, {\n key: \"_getRightGridWidth\",\n value: function _getRightGridWidth(props) {\n var width = props.width;\n\n var leftGridWidth = this._getLeftGridWidth(props);\n\n return width - leftGridWidth;\n }\n }, {\n key: \"_getTopGridHeight\",\n value: function _getTopGridHeight(props) {\n var fixedRowCount = props.fixedRowCount,\n rowHeight = props.rowHeight;\n\n if (this._topGridHeight == null) {\n if (typeof rowHeight === 'function') {\n var topGridHeight = 0;\n\n for (var index = 0; index < fixedRowCount; index++) {\n topGridHeight += rowHeight({\n index: index\n });\n }\n\n this._topGridHeight = topGridHeight;\n } else {\n this._topGridHeight = rowHeight * fixedRowCount;\n }\n }\n\n return this._topGridHeight;\n }\n }, {\n key: \"_handleInvalidatedGridSize\",\n value: function _handleInvalidatedGridSize() {\n if (typeof this._deferredInvalidateColumnIndex === 'number') {\n var columnIndex = this._deferredInvalidateColumnIndex;\n var rowIndex = this._deferredInvalidateRowIndex;\n this._deferredInvalidateColumnIndex = null;\n this._deferredInvalidateRowIndex = null;\n this.recomputeGridSize({\n columnIndex: columnIndex,\n rowIndex: rowIndex\n });\n this.forceUpdate();\n }\n }\n /**\n * Avoid recreating inline styles each render; this bypasses Grid's shallowCompare.\n * This method recalculates styles only when specific props change.\n */\n\n }, {\n key: \"_maybeCalculateCachedStyles\",\n value: function _maybeCalculateCachedStyles(resetAll) {\n var _this$props9 = this.props,\n columnWidth = _this$props9.columnWidth,\n enableFixedColumnScroll = _this$props9.enableFixedColumnScroll,\n enableFixedRowScroll = _this$props9.enableFixedRowScroll,\n height = _this$props9.height,\n fixedColumnCount = _this$props9.fixedColumnCount,\n fixedRowCount = _this$props9.fixedRowCount,\n rowHeight = _this$props9.rowHeight,\n style = _this$props9.style,\n styleBottomLeftGrid = _this$props9.styleBottomLeftGrid,\n styleBottomRightGrid = _this$props9.styleBottomRightGrid,\n styleTopLeftGrid = _this$props9.styleTopLeftGrid,\n styleTopRightGrid = _this$props9.styleTopRightGrid,\n width = _this$props9.width;\n var sizeChange = resetAll || height !== this._lastRenderedHeight || width !== this._lastRenderedWidth;\n var leftSizeChange = resetAll || columnWidth !== this._lastRenderedColumnWidth || fixedColumnCount !== this._lastRenderedFixedColumnCount;\n var topSizeChange = resetAll || fixedRowCount !== this._lastRenderedFixedRowCount || rowHeight !== this._lastRenderedRowHeight;\n\n if (resetAll || sizeChange || style !== this._lastRenderedStyle) {\n this._containerOuterStyle = _objectSpread({\n height: height,\n overflow: 'visible',\n // Let :focus outline show through\n width: width\n }, style);\n }\n\n if (resetAll || sizeChange || topSizeChange) {\n this._containerTopStyle = {\n height: this._getTopGridHeight(this.props),\n position: 'relative',\n width: width\n };\n this._containerBottomStyle = {\n height: height - this._getTopGridHeight(this.props),\n overflow: 'visible',\n // Let :focus outline show through\n position: 'relative',\n width: width\n };\n }\n\n if (resetAll || styleBottomLeftGrid !== this._lastRenderedStyleBottomLeftGrid) {\n this._bottomLeftGridStyle = _objectSpread({\n left: 0,\n overflowX: 'hidden',\n overflowY: enableFixedColumnScroll ? 'auto' : 'hidden',\n position: 'absolute'\n }, styleBottomLeftGrid);\n }\n\n if (resetAll || leftSizeChange || styleBottomRightGrid !== this._lastRenderedStyleBottomRightGrid) {\n this._bottomRightGridStyle = _objectSpread({\n left: this._getLeftGridWidth(this.props),\n position: 'absolute'\n }, styleBottomRightGrid);\n }\n\n if (resetAll || styleTopLeftGrid !== this._lastRenderedStyleTopLeftGrid) {\n this._topLeftGridStyle = _objectSpread({\n left: 0,\n overflowX: 'hidden',\n overflowY: 'hidden',\n position: 'absolute',\n top: 0\n }, styleTopLeftGrid);\n }\n\n if (resetAll || leftSizeChange || styleTopRightGrid !== this._lastRenderedStyleTopRightGrid) {\n this._topRightGridStyle = _objectSpread({\n left: this._getLeftGridWidth(this.props),\n overflowX: enableFixedRowScroll ? 'auto' : 'hidden',\n overflowY: 'hidden',\n position: 'absolute',\n top: 0\n }, styleTopRightGrid);\n }\n\n this._lastRenderedColumnWidth = columnWidth;\n this._lastRenderedFixedColumnCount = fixedColumnCount;\n this._lastRenderedFixedRowCount = fixedRowCount;\n this._lastRenderedHeight = height;\n this._lastRenderedRowHeight = rowHeight;\n this._lastRenderedStyle = style;\n this._lastRenderedStyleBottomLeftGrid = styleBottomLeftGrid;\n this._lastRenderedStyleBottomRightGrid = styleBottomRightGrid;\n this._lastRenderedStyleTopLeftGrid = styleTopLeftGrid;\n this._lastRenderedStyleTopRightGrid = styleTopRightGrid;\n this._lastRenderedWidth = width;\n }\n }, {\n key: \"_prepareForRender\",\n value: function _prepareForRender() {\n if (this._lastRenderedColumnWidth !== this.props.columnWidth || this._lastRenderedFixedColumnCount !== this.props.fixedColumnCount) {\n this._leftGridWidth = null;\n }\n\n if (this._lastRenderedFixedRowCount !== this.props.fixedRowCount || this._lastRenderedRowHeight !== this.props.rowHeight) {\n this._topGridHeight = null;\n }\n\n this._maybeCalculateCachedStyles();\n\n this._lastRenderedColumnWidth = this.props.columnWidth;\n this._lastRenderedFixedColumnCount = this.props.fixedColumnCount;\n this._lastRenderedFixedRowCount = this.props.fixedRowCount;\n this._lastRenderedRowHeight = this.props.rowHeight;\n }\n }, {\n key: \"_renderBottomLeftGrid\",\n value: function _renderBottomLeftGrid(props) {\n var enableFixedColumnScroll = props.enableFixedColumnScroll,\n fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount,\n rowCount = props.rowCount,\n hideBottomLeftGridScrollbar = props.hideBottomLeftGridScrollbar;\n var showVerticalScrollbar = this.state.showVerticalScrollbar;\n\n if (!fixedColumnCount) {\n return null;\n }\n\n var additionalRowCount = showVerticalScrollbar ? 1 : 0,\n height = this._getBottomGridHeight(props),\n width = this._getLeftGridWidth(props),\n scrollbarSize = this.state.showVerticalScrollbar ? this.state.scrollbarSize : 0,\n gridWidth = hideBottomLeftGridScrollbar ? width + scrollbarSize : width;\n\n var bottomLeftGrid = React.createElement(Grid, _extends({}, props, {\n cellRenderer: this._cellRendererBottomLeftGrid,\n className: this.props.classNameBottomLeftGrid,\n columnCount: fixedColumnCount,\n deferredMeasurementCache: this._deferredMeasurementCacheBottomLeftGrid,\n height: height,\n onScroll: enableFixedColumnScroll ? this._onScrollTop : undefined,\n ref: this._bottomLeftGridRef,\n rowCount: Math.max(0, rowCount - fixedRowCount) + additionalRowCount,\n rowHeight: this._rowHeightBottomGrid,\n style: this._bottomLeftGridStyle,\n tabIndex: null,\n width: gridWidth\n }));\n\n if (hideBottomLeftGridScrollbar) {\n return React.createElement(\"div\", {\n className: \"BottomLeftGrid_ScrollWrapper\",\n style: _objectSpread({}, this._bottomLeftGridStyle, {\n height: height,\n width: width,\n overflowY: 'hidden'\n })\n }, bottomLeftGrid);\n }\n\n return bottomLeftGrid;\n }\n }, {\n key: \"_renderBottomRightGrid\",\n value: function _renderBottomRightGrid(props) {\n var columnCount = props.columnCount,\n fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount,\n rowCount = props.rowCount,\n scrollToColumn = props.scrollToColumn,\n scrollToRow = props.scrollToRow;\n return React.createElement(Grid, _extends({}, props, {\n cellRenderer: this._cellRendererBottomRightGrid,\n className: this.props.classNameBottomRightGrid,\n columnCount: Math.max(0, columnCount - fixedColumnCount),\n columnWidth: this._columnWidthRightGrid,\n deferredMeasurementCache: this._deferredMeasurementCacheBottomRightGrid,\n height: this._getBottomGridHeight(props),\n onScroll: this._onScroll,\n onScrollbarPresenceChange: this._onScrollbarPresenceChange,\n ref: this._bottomRightGridRef,\n rowCount: Math.max(0, rowCount - fixedRowCount),\n rowHeight: this._rowHeightBottomGrid,\n scrollToColumn: scrollToColumn - fixedColumnCount,\n scrollToRow: scrollToRow - fixedRowCount,\n style: this._bottomRightGridStyle,\n width: this._getRightGridWidth(props)\n }));\n }\n }, {\n key: \"_renderTopLeftGrid\",\n value: function _renderTopLeftGrid(props) {\n var fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount;\n\n if (!fixedColumnCount || !fixedRowCount) {\n return null;\n }\n\n return React.createElement(Grid, _extends({}, props, {\n className: this.props.classNameTopLeftGrid,\n columnCount: fixedColumnCount,\n height: this._getTopGridHeight(props),\n ref: this._topLeftGridRef,\n rowCount: fixedRowCount,\n style: this._topLeftGridStyle,\n tabIndex: null,\n width: this._getLeftGridWidth(props)\n }));\n }\n }, {\n key: \"_renderTopRightGrid\",\n value: function _renderTopRightGrid(props) {\n var columnCount = props.columnCount,\n enableFixedRowScroll = props.enableFixedRowScroll,\n fixedColumnCount = props.fixedColumnCount,\n fixedRowCount = props.fixedRowCount,\n scrollLeft = props.scrollLeft,\n hideTopRightGridScrollbar = props.hideTopRightGridScrollbar;\n var _this$state5 = this.state,\n showHorizontalScrollbar = _this$state5.showHorizontalScrollbar,\n scrollbarSize = _this$state5.scrollbarSize;\n\n if (!fixedRowCount) {\n return null;\n }\n\n var additionalColumnCount = showHorizontalScrollbar ? 1 : 0,\n height = this._getTopGridHeight(props),\n width = this._getRightGridWidth(props),\n additionalHeight = showHorizontalScrollbar ? scrollbarSize : 0;\n\n var gridHeight = height,\n style = this._topRightGridStyle;\n\n if (hideTopRightGridScrollbar) {\n gridHeight = height + additionalHeight;\n style = _objectSpread({}, this._topRightGridStyle, {\n left: 0\n });\n }\n\n var topRightGrid = React.createElement(Grid, _extends({}, props, {\n cellRenderer: this._cellRendererTopRightGrid,\n className: this.props.classNameTopRightGrid,\n columnCount: Math.max(0, columnCount - fixedColumnCount) + additionalColumnCount,\n columnWidth: this._columnWidthRightGrid,\n deferredMeasurementCache: this._deferredMeasurementCacheTopRightGrid,\n height: gridHeight,\n onScroll: enableFixedRowScroll ? this._onScrollLeft : undefined,\n ref: this._topRightGridRef,\n rowCount: fixedRowCount,\n scrollLeft: scrollLeft,\n style: style,\n tabIndex: null,\n width: width\n }));\n\n if (hideTopRightGridScrollbar) {\n return React.createElement(\"div\", {\n className: \"TopRightGrid_ScrollWrapper\",\n style: _objectSpread({}, this._topRightGridStyle, {\n height: height,\n width: width,\n overflowX: 'hidden'\n })\n }, topRightGrid);\n }\n\n return topRightGrid;\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps, prevState) {\n if (nextProps.scrollLeft !== prevState.scrollLeft || nextProps.scrollTop !== prevState.scrollTop) {\n return {\n scrollLeft: nextProps.scrollLeft != null && nextProps.scrollLeft >= 0 ? nextProps.scrollLeft : prevState.scrollLeft,\n scrollTop: nextProps.scrollTop != null && nextProps.scrollTop >= 0 ? nextProps.scrollTop : prevState.scrollTop\n };\n }\n\n return null;\n }\n }]);\n\n return MultiGrid;\n}(React.PureComponent);\n\n_defineProperty(MultiGrid, \"defaultProps\", {\n classNameBottomLeftGrid: '',\n classNameBottomRightGrid: '',\n classNameTopLeftGrid: '',\n classNameTopRightGrid: '',\n enableFixedColumnScroll: false,\n enableFixedRowScroll: false,\n fixedColumnCount: 0,\n fixedRowCount: 0,\n scrollToColumn: -1,\n scrollToRow: -1,\n style: {},\n styleBottomLeftGrid: {},\n styleBottomRightGrid: {},\n styleTopLeftGrid: {},\n styleTopRightGrid: {},\n hideTopRightGridScrollbar: false,\n hideBottomLeftGridScrollbar: false\n});\n\nMultiGrid.propTypes = process.env.NODE_ENV !== \"production\" ? {\n classNameBottomLeftGrid: PropTypes.string.isRequired,\n classNameBottomRightGrid: PropTypes.string.isRequired,\n classNameTopLeftGrid: PropTypes.string.isRequired,\n classNameTopRightGrid: PropTypes.string.isRequired,\n enableFixedColumnScroll: PropTypes.bool.isRequired,\n enableFixedRowScroll: PropTypes.bool.isRequired,\n fixedColumnCount: PropTypes.number.isRequired,\n fixedRowCount: PropTypes.number.isRequired,\n onScrollbarPresenceChange: PropTypes.func,\n style: PropTypes.object.isRequired,\n styleBottomLeftGrid: PropTypes.object.isRequired,\n styleBottomRightGrid: PropTypes.object.isRequired,\n styleTopLeftGrid: PropTypes.object.isRequired,\n styleTopRightGrid: PropTypes.object.isRequired,\n hideTopRightGridScrollbar: PropTypes.bool,\n hideBottomLeftGridScrollbar: PropTypes.bool\n} : {};\npolyfill(MultiGrid);\nexport default MultiGrid;","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\n/**\n * HOC that simplifies the process of synchronizing scrolling between two or more virtualized components.\n */\n\nvar ScrollSync =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(ScrollSync, _React$PureComponent);\n\n function ScrollSync(props, context) {\n var _this;\n\n _classCallCheck(this, ScrollSync);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ScrollSync).call(this, props, context));\n _this.state = {\n clientHeight: 0,\n clientWidth: 0,\n scrollHeight: 0,\n scrollLeft: 0,\n scrollTop: 0,\n scrollWidth: 0\n };\n _this._onScroll = _this._onScroll.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(ScrollSync, [{\n key: \"render\",\n value: function render() {\n var children = this.props.children;\n var _this$state = this.state,\n clientHeight = _this$state.clientHeight,\n clientWidth = _this$state.clientWidth,\n scrollHeight = _this$state.scrollHeight,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop,\n scrollWidth = _this$state.scrollWidth;\n return children({\n clientHeight: clientHeight,\n clientWidth: clientWidth,\n onScroll: this._onScroll,\n scrollHeight: scrollHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: scrollWidth\n });\n }\n }, {\n key: \"_onScroll\",\n value: function _onScroll(_ref) {\n var clientHeight = _ref.clientHeight,\n clientWidth = _ref.clientWidth,\n scrollHeight = _ref.scrollHeight,\n scrollLeft = _ref.scrollLeft,\n scrollTop = _ref.scrollTop,\n scrollWidth = _ref.scrollWidth;\n this.setState({\n clientHeight: clientHeight,\n clientWidth: clientWidth,\n scrollHeight: scrollHeight,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollWidth: scrollWidth\n });\n }\n }]);\n\n return ScrollSync;\n}(React.PureComponent);\n\nexport { ScrollSync as default };\nScrollSync.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * Function responsible for rendering 2 or more virtualized components.\n * This function should implement the following signature:\n * ({ onScroll, scrollLeft, scrollTop }) => PropTypes.element\n */\n children: PropTypes.func.isRequired\n} : {};","import * as React from 'react';\nexport default function defaultHeaderRowRenderer(_ref) {\n var className = _ref.className,\n columns = _ref.columns,\n style = _ref.style;\n return React.createElement(\"div\", {\n className: className,\n role: \"row\",\n style: style\n }, columns);\n}\ndefaultHeaderRowRenderer.propTypes = process.env.NODE_ENV === 'production' ? null : bpfrpt_proptype_HeaderRowRendererParams === PropTypes.any ? {} : bpfrpt_proptype_HeaderRowRendererParams;\nimport { bpfrpt_proptype_HeaderRowRendererParams } from \"./types\";\nimport PropTypes from \"prop-types\";","var SortDirection = {\n /**\n * Sort items in ascending order.\n * This means arranging from the lowest value to the highest (e.g. a-z, 0-9).\n */\n ASC: 'ASC',\n\n /**\n * Sort items in descending order.\n * This means arranging from the highest value to the lowest (e.g. z-a, 9-0).\n */\n DESC: 'DESC'\n};\nexport default SortDirection;","import clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport SortDirection from './SortDirection';\n/**\n * Displayed beside a header to indicate that a Table is currently sorted by this column.\n */\n\nexport default function SortIndicator(_ref) {\n var sortDirection = _ref.sortDirection;\n var classNames = clsx('ReactVirtualized__Table__sortableHeaderIcon', {\n 'ReactVirtualized__Table__sortableHeaderIcon--ASC': sortDirection === SortDirection.ASC,\n 'ReactVirtualized__Table__sortableHeaderIcon--DESC': sortDirection === SortDirection.DESC\n });\n return React.createElement(\"svg\", {\n className: classNames,\n width: 18,\n height: 18,\n viewBox: \"0 0 24 24\"\n }, sortDirection === SortDirection.ASC ? React.createElement(\"path\", {\n d: \"M7 14l5-5 5 5z\"\n }) : React.createElement(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n }), React.createElement(\"path\", {\n d: \"M0 0h24v24H0z\",\n fill: \"none\"\n }));\n}\nSortIndicator.propTypes = process.env.NODE_ENV !== \"production\" ? {\n sortDirection: PropTypes.oneOf([SortDirection.ASC, SortDirection.DESC])\n} : {};","import * as React from 'react';\nimport SortIndicator from './SortIndicator';\n\n/**\n * Default table header renderer.\n */\nexport default function defaultHeaderRenderer(_ref) {\n var dataKey = _ref.dataKey,\n label = _ref.label,\n sortBy = _ref.sortBy,\n sortDirection = _ref.sortDirection;\n var showSortIndicator = sortBy === dataKey;\n var children = [React.createElement(\"span\", {\n className: \"ReactVirtualized__Table__headerTruncatedText\",\n key: \"label\",\n title: typeof label === 'string' ? label : null\n }, label)];\n\n if (showSortIndicator) {\n children.push(React.createElement(SortIndicator, {\n key: \"SortIndicator\",\n sortDirection: sortDirection\n }));\n }\n\n return children;\n}\ndefaultHeaderRenderer.propTypes = process.env.NODE_ENV === 'production' ? null : bpfrpt_proptype_HeaderRendererParams === PropTypes.any ? {} : bpfrpt_proptype_HeaderRendererParams;\nimport { bpfrpt_proptype_HeaderRendererParams } from \"./types\";\nimport PropTypes from \"prop-types\";","import _extends from \"@babel/runtime/helpers/extends\";\nimport * as React from 'react';\n\n/**\n * Default row renderer for Table.\n */\nexport default function defaultRowRenderer(_ref) {\n var className = _ref.className,\n columns = _ref.columns,\n index = _ref.index,\n key = _ref.key,\n onRowClick = _ref.onRowClick,\n onRowDoubleClick = _ref.onRowDoubleClick,\n onRowMouseOut = _ref.onRowMouseOut,\n onRowMouseOver = _ref.onRowMouseOver,\n onRowRightClick = _ref.onRowRightClick,\n rowData = _ref.rowData,\n style = _ref.style;\n var a11yProps = {\n 'aria-rowindex': index + 1\n };\n\n if (onRowClick || onRowDoubleClick || onRowMouseOut || onRowMouseOver || onRowRightClick) {\n a11yProps['aria-label'] = 'row';\n a11yProps.tabIndex = 0;\n\n if (onRowClick) {\n a11yProps.onClick = function (event) {\n return onRowClick({\n event: event,\n index: index,\n rowData: rowData\n });\n };\n }\n\n if (onRowDoubleClick) {\n a11yProps.onDoubleClick = function (event) {\n return onRowDoubleClick({\n event: event,\n index: index,\n rowData: rowData\n });\n };\n }\n\n if (onRowMouseOut) {\n a11yProps.onMouseOut = function (event) {\n return onRowMouseOut({\n event: event,\n index: index,\n rowData: rowData\n });\n };\n }\n\n if (onRowMouseOver) {\n a11yProps.onMouseOver = function (event) {\n return onRowMouseOver({\n event: event,\n index: index,\n rowData: rowData\n });\n };\n }\n\n if (onRowRightClick) {\n a11yProps.onContextMenu = function (event) {\n return onRowRightClick({\n event: event,\n index: index,\n rowData: rowData\n });\n };\n }\n }\n\n return React.createElement(\"div\", _extends({}, a11yProps, {\n className: className,\n key: key,\n role: \"row\",\n style: style\n }), columns);\n}\ndefaultRowRenderer.propTypes = process.env.NODE_ENV === 'production' ? null : bpfrpt_proptype_RowRendererParams === PropTypes.any ? {} : bpfrpt_proptype_RowRendererParams;\nimport { bpfrpt_proptype_RowRendererParams } from \"./types\";\nimport PropTypes from \"prop-types\";","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport defaultHeaderRenderer from './defaultHeaderRenderer';\nimport defaultCellRenderer from './defaultCellRenderer';\nimport defaultCellDataGetter from './defaultCellDataGetter';\nimport SortDirection from './SortDirection';\n/**\n * Describes the header and cell contents of a table column.\n */\n\nvar Column =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Column, _React$Component);\n\n function Column() {\n _classCallCheck(this, Column);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Column).apply(this, arguments));\n }\n\n return Column;\n}(React.Component);\n\n_defineProperty(Column, \"defaultProps\", {\n cellDataGetter: defaultCellDataGetter,\n cellRenderer: defaultCellRenderer,\n defaultSortDirection: SortDirection.ASC,\n flexGrow: 0,\n flexShrink: 1,\n headerRenderer: defaultHeaderRenderer,\n style: {}\n});\n\nexport { Column as default };\nColumn.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /** Optional aria-label value to set on the column header */\n 'aria-label': PropTypes.string,\n\n /**\n * Callback responsible for returning a cell's data, given its :dataKey\n * ({ columnData: any, dataKey: string, rowData: any }): any\n */\n cellDataGetter: PropTypes.func,\n\n /**\n * Callback responsible for rendering a cell's contents.\n * ({ cellData: any, columnData: any, dataKey: string, rowData: any, rowIndex: number }): node\n */\n cellRenderer: PropTypes.func,\n\n /** Optional CSS class to apply to cell */\n className: PropTypes.string,\n\n /** Optional additional data passed to this column's :cellDataGetter */\n columnData: PropTypes.object,\n\n /** Uniquely identifies the row-data attribute corresponding to this cell */\n dataKey: PropTypes.any.isRequired,\n\n /** Optional direction to be used when clicked the first time */\n defaultSortDirection: PropTypes.oneOf([SortDirection.ASC, SortDirection.DESC]),\n\n /** If sort is enabled for the table at large, disable it for this column */\n disableSort: PropTypes.bool,\n\n /** Flex grow style; defaults to 0 */\n flexGrow: PropTypes.number,\n\n /** Flex shrink style; defaults to 1 */\n flexShrink: PropTypes.number,\n\n /** Optional CSS class to apply to this column's header */\n headerClassName: PropTypes.string,\n\n /**\n * Optional callback responsible for rendering a column header contents.\n * ({ columnData: object, dataKey: string, disableSort: boolean, label: node, sortBy: string, sortDirection: string }): PropTypes.node\n */\n headerRenderer: PropTypes.func.isRequired,\n\n /** Optional inline style to apply to this column's header */\n headerStyle: PropTypes.object,\n\n /** Optional id to set on the column header */\n id: PropTypes.string,\n\n /** Header label for this column */\n label: PropTypes.node,\n\n /** Maximum width of column; this property will only be used if :flexGrow is > 0. */\n maxWidth: PropTypes.number,\n\n /** Minimum width of column. */\n minWidth: PropTypes.number,\n\n /** Optional inline style to apply to cell */\n style: PropTypes.object,\n\n /** Flex basis (width) for this column; This value can grow or shrink based on :flexGrow and :flexShrink properties. */\n width: PropTypes.number.isRequired\n} : {};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport clsx from 'clsx';\nimport Column from './Column';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { findDOMNode } from 'react-dom';\nimport Grid, { accessibilityOverscanIndicesGetter } from '../Grid';\nimport defaultRowRenderer from './defaultRowRenderer';\nimport defaultHeaderRowRenderer from './defaultHeaderRowRenderer';\nimport SortDirection from './SortDirection';\n/**\n * Table component with fixed headers and virtualized rows for improved performance with large data sets.\n * This component expects explicit width, height, and padding parameters.\n */\n\nvar Table =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(Table, _React$PureComponent);\n\n function Table(props) {\n var _this;\n\n _classCallCheck(this, Table);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(Table).call(this, props));\n _this.state = {\n scrollbarWidth: 0\n };\n _this._createColumn = _this._createColumn.bind(_assertThisInitialized(_this));\n _this._createRow = _this._createRow.bind(_assertThisInitialized(_this));\n _this._onScroll = _this._onScroll.bind(_assertThisInitialized(_this));\n _this._onSectionRendered = _this._onSectionRendered.bind(_assertThisInitialized(_this));\n _this._setRef = _this._setRef.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(Table, [{\n key: \"forceUpdateGrid\",\n value: function forceUpdateGrid() {\n if (this.Grid) {\n this.Grid.forceUpdate();\n }\n }\n /** See Grid#getOffsetForCell */\n\n }, {\n key: \"getOffsetForRow\",\n value: function getOffsetForRow(_ref) {\n var alignment = _ref.alignment,\n index = _ref.index;\n\n if (this.Grid) {\n var _this$Grid$getOffsetF = this.Grid.getOffsetForCell({\n alignment: alignment,\n rowIndex: index\n }),\n scrollTop = _this$Grid$getOffsetF.scrollTop;\n\n return scrollTop;\n }\n\n return 0;\n }\n /** CellMeasurer compatibility */\n\n }, {\n key: \"invalidateCellSizeAfterRender\",\n value: function invalidateCellSizeAfterRender(_ref2) {\n var columnIndex = _ref2.columnIndex,\n rowIndex = _ref2.rowIndex;\n\n if (this.Grid) {\n this.Grid.invalidateCellSizeAfterRender({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n /** See Grid#measureAllCells */\n\n }, {\n key: \"measureAllRows\",\n value: function measureAllRows() {\n if (this.Grid) {\n this.Grid.measureAllCells();\n }\n }\n /** CellMeasurer compatibility */\n\n }, {\n key: \"recomputeGridSize\",\n value: function recomputeGridSize() {\n var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref3$columnIndex = _ref3.columnIndex,\n columnIndex = _ref3$columnIndex === void 0 ? 0 : _ref3$columnIndex,\n _ref3$rowIndex = _ref3.rowIndex,\n rowIndex = _ref3$rowIndex === void 0 ? 0 : _ref3$rowIndex;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: rowIndex,\n columnIndex: columnIndex\n });\n }\n }\n /** See Grid#recomputeGridSize */\n\n }, {\n key: \"recomputeRowHeights\",\n value: function recomputeRowHeights() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.recomputeGridSize({\n rowIndex: index\n });\n }\n }\n /** See Grid#scrollToPosition */\n\n }, {\n key: \"scrollToPosition\",\n value: function scrollToPosition() {\n var scrollTop = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToPosition({\n scrollTop: scrollTop\n });\n }\n }\n /** See Grid#scrollToCell */\n\n }, {\n key: \"scrollToRow\",\n value: function scrollToRow() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n if (this.Grid) {\n this.Grid.scrollToCell({\n columnIndex: 0,\n rowIndex: index\n });\n }\n }\n }, {\n key: \"getScrollbarWidth\",\n value: function getScrollbarWidth() {\n if (this.Grid) {\n var _Grid = findDOMNode(this.Grid);\n\n var clientWidth = _Grid.clientWidth || 0;\n var offsetWidth = _Grid.offsetWidth || 0;\n return offsetWidth - clientWidth;\n }\n\n return 0;\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this._setScrollbarWidth();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this._setScrollbarWidth();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n children = _this$props.children,\n className = _this$props.className,\n disableHeader = _this$props.disableHeader,\n gridClassName = _this$props.gridClassName,\n gridStyle = _this$props.gridStyle,\n headerHeight = _this$props.headerHeight,\n headerRowRenderer = _this$props.headerRowRenderer,\n height = _this$props.height,\n id = _this$props.id,\n noRowsRenderer = _this$props.noRowsRenderer,\n rowClassName = _this$props.rowClassName,\n rowStyle = _this$props.rowStyle,\n scrollToIndex = _this$props.scrollToIndex,\n style = _this$props.style,\n width = _this$props.width;\n var scrollbarWidth = this.state.scrollbarWidth;\n var availableRowsHeight = disableHeader ? height : height - headerHeight;\n var rowClass = typeof rowClassName === 'function' ? rowClassName({\n index: -1\n }) : rowClassName;\n var rowStyleObject = typeof rowStyle === 'function' ? rowStyle({\n index: -1\n }) : rowStyle; // Precompute and cache column styles before rendering rows and columns to speed things up\n\n this._cachedColumnStyles = [];\n React.Children.toArray(children).forEach(function (column, index) {\n var flexStyles = _this2._getFlexStyleForColumn(column, column.props.style);\n\n _this2._cachedColumnStyles[index] = _objectSpread({\n overflow: 'hidden'\n }, flexStyles);\n }); // Note that we specify :rowCount, :scrollbarWidth, :sortBy, and :sortDirection as properties on Grid even though these have nothing to do with Grid.\n // This is done because Grid is a pure component and won't update unless its properties or state has changed.\n // Any property that should trigger a re-render of Grid then is specified here to avoid a stale display.\n\n return React.createElement(\"div\", {\n \"aria-label\": this.props['aria-label'],\n \"aria-labelledby\": this.props['aria-labelledby'],\n \"aria-colcount\": React.Children.toArray(children).length,\n \"aria-rowcount\": this.props.rowCount,\n className: clsx('ReactVirtualized__Table', className),\n id: id,\n role: \"grid\",\n style: style\n }, !disableHeader && headerRowRenderer({\n className: clsx('ReactVirtualized__Table__headerRow', rowClass),\n columns: this._getHeaderColumns(),\n style: _objectSpread({\n height: headerHeight,\n overflow: 'hidden',\n paddingRight: scrollbarWidth,\n width: width\n }, rowStyleObject)\n }), React.createElement(Grid, _extends({}, this.props, {\n \"aria-readonly\": null,\n autoContainerWidth: true,\n className: clsx('ReactVirtualized__Table__Grid', gridClassName),\n cellRenderer: this._createRow,\n columnWidth: width,\n columnCount: 1,\n height: availableRowsHeight,\n id: undefined,\n noContentRenderer: noRowsRenderer,\n onScroll: this._onScroll,\n onSectionRendered: this._onSectionRendered,\n ref: this._setRef,\n role: \"rowgroup\",\n scrollbarWidth: scrollbarWidth,\n scrollToRow: scrollToIndex,\n style: _objectSpread({}, gridStyle, {\n overflowX: 'hidden'\n })\n })));\n }\n }, {\n key: \"_createColumn\",\n value: function _createColumn(_ref4) {\n var column = _ref4.column,\n columnIndex = _ref4.columnIndex,\n isScrolling = _ref4.isScrolling,\n parent = _ref4.parent,\n rowData = _ref4.rowData,\n rowIndex = _ref4.rowIndex;\n var onColumnClick = this.props.onColumnClick;\n var _column$props = column.props,\n cellDataGetter = _column$props.cellDataGetter,\n cellRenderer = _column$props.cellRenderer,\n className = _column$props.className,\n columnData = _column$props.columnData,\n dataKey = _column$props.dataKey,\n id = _column$props.id;\n var cellData = cellDataGetter({\n columnData: columnData,\n dataKey: dataKey,\n rowData: rowData\n });\n var renderedCell = cellRenderer({\n cellData: cellData,\n columnData: columnData,\n columnIndex: columnIndex,\n dataKey: dataKey,\n isScrolling: isScrolling,\n parent: parent,\n rowData: rowData,\n rowIndex: rowIndex\n });\n\n var onClick = function onClick(event) {\n onColumnClick && onColumnClick({\n columnData: columnData,\n dataKey: dataKey,\n event: event\n });\n };\n\n var style = this._cachedColumnStyles[columnIndex];\n var title = typeof renderedCell === 'string' ? renderedCell : null; // Avoid using object-spread syntax with multiple objects here,\n // Since it results in an extra method call to 'babel-runtime/helpers/extends'\n // See PR https://github.com/bvaughn/react-virtualized/pull/942\n\n return React.createElement(\"div\", {\n \"aria-colindex\": columnIndex + 1,\n \"aria-describedby\": id,\n className: clsx('ReactVirtualized__Table__rowColumn', className),\n key: 'Row' + rowIndex + '-' + 'Col' + columnIndex,\n onClick: onClick,\n role: \"gridcell\",\n style: style,\n title: title\n }, renderedCell);\n }\n }, {\n key: \"_createHeader\",\n value: function _createHeader(_ref5) {\n var column = _ref5.column,\n index = _ref5.index;\n var _this$props2 = this.props,\n headerClassName = _this$props2.headerClassName,\n headerStyle = _this$props2.headerStyle,\n onHeaderClick = _this$props2.onHeaderClick,\n sort = _this$props2.sort,\n sortBy = _this$props2.sortBy,\n sortDirection = _this$props2.sortDirection;\n var _column$props2 = column.props,\n columnData = _column$props2.columnData,\n dataKey = _column$props2.dataKey,\n defaultSortDirection = _column$props2.defaultSortDirection,\n disableSort = _column$props2.disableSort,\n headerRenderer = _column$props2.headerRenderer,\n id = _column$props2.id,\n label = _column$props2.label;\n var sortEnabled = !disableSort && sort;\n var classNames = clsx('ReactVirtualized__Table__headerColumn', headerClassName, column.props.headerClassName, {\n ReactVirtualized__Table__sortableHeaderColumn: sortEnabled\n });\n\n var style = this._getFlexStyleForColumn(column, _objectSpread({}, headerStyle, {}, column.props.headerStyle));\n\n var renderedHeader = headerRenderer({\n columnData: columnData,\n dataKey: dataKey,\n disableSort: disableSort,\n label: label,\n sortBy: sortBy,\n sortDirection: sortDirection\n });\n var headerOnClick, headerOnKeyDown, headerTabIndex, headerAriaSort, headerAriaLabel;\n\n if (sortEnabled || onHeaderClick) {\n // If this is a sortable header, clicking it should update the table data's sorting.\n var isFirstTimeSort = sortBy !== dataKey; // If this is the firstTime sort of this column, use the column default sort order.\n // Otherwise, invert the direction of the sort.\n\n var newSortDirection = isFirstTimeSort ? defaultSortDirection : sortDirection === SortDirection.DESC ? SortDirection.ASC : SortDirection.DESC;\n\n var onClick = function onClick(event) {\n sortEnabled && sort({\n defaultSortDirection: defaultSortDirection,\n event: event,\n sortBy: dataKey,\n sortDirection: newSortDirection\n });\n onHeaderClick && onHeaderClick({\n columnData: columnData,\n dataKey: dataKey,\n event: event\n });\n };\n\n var onKeyDown = function onKeyDown(event) {\n if (event.key === 'Enter' || event.key === ' ') {\n onClick(event);\n }\n };\n\n headerAriaLabel = column.props['aria-label'] || label || dataKey;\n headerAriaSort = 'none';\n headerTabIndex = 0;\n headerOnClick = onClick;\n headerOnKeyDown = onKeyDown;\n }\n\n if (sortBy === dataKey) {\n headerAriaSort = sortDirection === SortDirection.ASC ? 'ascending' : 'descending';\n } // Avoid using object-spread syntax with multiple objects here,\n // Since it results in an extra method call to 'babel-runtime/helpers/extends'\n // See PR https://github.com/bvaughn/react-virtualized/pull/942\n\n\n return React.createElement(\"div\", {\n \"aria-label\": headerAriaLabel,\n \"aria-sort\": headerAriaSort,\n className: classNames,\n id: id,\n key: 'Header-Col' + index,\n onClick: headerOnClick,\n onKeyDown: headerOnKeyDown,\n role: \"columnheader\",\n style: style,\n tabIndex: headerTabIndex\n }, renderedHeader);\n }\n }, {\n key: \"_createRow\",\n value: function _createRow(_ref6) {\n var _this3 = this;\n\n var index = _ref6.rowIndex,\n isScrolling = _ref6.isScrolling,\n key = _ref6.key,\n parent = _ref6.parent,\n style = _ref6.style;\n var _this$props3 = this.props,\n children = _this$props3.children,\n onRowClick = _this$props3.onRowClick,\n onRowDoubleClick = _this$props3.onRowDoubleClick,\n onRowRightClick = _this$props3.onRowRightClick,\n onRowMouseOver = _this$props3.onRowMouseOver,\n onRowMouseOut = _this$props3.onRowMouseOut,\n rowClassName = _this$props3.rowClassName,\n rowGetter = _this$props3.rowGetter,\n rowRenderer = _this$props3.rowRenderer,\n rowStyle = _this$props3.rowStyle;\n var scrollbarWidth = this.state.scrollbarWidth;\n var rowClass = typeof rowClassName === 'function' ? rowClassName({\n index: index\n }) : rowClassName;\n var rowStyleObject = typeof rowStyle === 'function' ? rowStyle({\n index: index\n }) : rowStyle;\n var rowData = rowGetter({\n index: index\n });\n var columns = React.Children.toArray(children).map(function (column, columnIndex) {\n return _this3._createColumn({\n column: column,\n columnIndex: columnIndex,\n isScrolling: isScrolling,\n parent: parent,\n rowData: rowData,\n rowIndex: index,\n scrollbarWidth: scrollbarWidth\n });\n });\n var className = clsx('ReactVirtualized__Table__row', rowClass);\n\n var flattenedStyle = _objectSpread({}, style, {\n height: this._getRowHeight(index),\n overflow: 'hidden',\n paddingRight: scrollbarWidth\n }, rowStyleObject);\n\n return rowRenderer({\n className: className,\n columns: columns,\n index: index,\n isScrolling: isScrolling,\n key: key,\n onRowClick: onRowClick,\n onRowDoubleClick: onRowDoubleClick,\n onRowRightClick: onRowRightClick,\n onRowMouseOver: onRowMouseOver,\n onRowMouseOut: onRowMouseOut,\n rowData: rowData,\n style: flattenedStyle\n });\n }\n /**\n * Determines the flex-shrink, flex-grow, and width values for a cell (header or column).\n */\n\n }, {\n key: \"_getFlexStyleForColumn\",\n value: function _getFlexStyleForColumn(column) {\n var customStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var flexValue = \"\".concat(column.props.flexGrow, \" \").concat(column.props.flexShrink, \" \").concat(column.props.width, \"px\");\n\n var style = _objectSpread({}, customStyle, {\n flex: flexValue,\n msFlex: flexValue,\n WebkitFlex: flexValue\n });\n\n if (column.props.maxWidth) {\n style.maxWidth = column.props.maxWidth;\n }\n\n if (column.props.minWidth) {\n style.minWidth = column.props.minWidth;\n }\n\n return style;\n }\n }, {\n key: \"_getHeaderColumns\",\n value: function _getHeaderColumns() {\n var _this4 = this;\n\n var _this$props4 = this.props,\n children = _this$props4.children,\n disableHeader = _this$props4.disableHeader;\n var items = disableHeader ? [] : React.Children.toArray(children);\n return items.map(function (column, index) {\n return _this4._createHeader({\n column: column,\n index: index\n });\n });\n }\n }, {\n key: \"_getRowHeight\",\n value: function _getRowHeight(rowIndex) {\n var rowHeight = this.props.rowHeight;\n return typeof rowHeight === 'function' ? rowHeight({\n index: rowIndex\n }) : rowHeight;\n }\n }, {\n key: \"_onScroll\",\n value: function _onScroll(_ref7) {\n var clientHeight = _ref7.clientHeight,\n scrollHeight = _ref7.scrollHeight,\n scrollTop = _ref7.scrollTop;\n var onScroll = this.props.onScroll;\n onScroll({\n clientHeight: clientHeight,\n scrollHeight: scrollHeight,\n scrollTop: scrollTop\n });\n }\n }, {\n key: \"_onSectionRendered\",\n value: function _onSectionRendered(_ref8) {\n var rowOverscanStartIndex = _ref8.rowOverscanStartIndex,\n rowOverscanStopIndex = _ref8.rowOverscanStopIndex,\n rowStartIndex = _ref8.rowStartIndex,\n rowStopIndex = _ref8.rowStopIndex;\n var onRowsRendered = this.props.onRowsRendered;\n onRowsRendered({\n overscanStartIndex: rowOverscanStartIndex,\n overscanStopIndex: rowOverscanStopIndex,\n startIndex: rowStartIndex,\n stopIndex: rowStopIndex\n });\n }\n }, {\n key: \"_setRef\",\n value: function _setRef(ref) {\n this.Grid = ref;\n }\n }, {\n key: \"_setScrollbarWidth\",\n value: function _setScrollbarWidth() {\n var scrollbarWidth = this.getScrollbarWidth();\n this.setState({\n scrollbarWidth: scrollbarWidth\n });\n }\n }]);\n\n return Table;\n}(React.PureComponent);\n\n_defineProperty(Table, \"defaultProps\", {\n disableHeader: false,\n estimatedRowSize: 30,\n headerHeight: 0,\n headerStyle: {},\n noRowsRenderer: function noRowsRenderer() {\n return null;\n },\n onRowsRendered: function onRowsRendered() {\n return null;\n },\n onScroll: function onScroll() {\n return null;\n },\n overscanIndicesGetter: accessibilityOverscanIndicesGetter,\n overscanRowCount: 10,\n rowRenderer: defaultRowRenderer,\n headerRowRenderer: defaultHeaderRowRenderer,\n rowStyle: {},\n scrollToAlignment: 'auto',\n scrollToIndex: -1,\n style: {}\n});\n\nexport { Table as default };\nTable.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /** This is just set on the grid top element. */\n 'aria-label': PropTypes.string,\n\n /** This is just set on the grid top element. */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * Removes fixed height from the scrollingContainer so that the total height\n * of rows can stretch the window. Intended for use with WindowScroller\n */\n autoHeight: PropTypes.bool,\n\n /** One or more Columns describing the data displayed in this row */\n children: function children(props) {\n var children = React.Children.toArray(props.children);\n\n for (var i = 0; i < children.length; i++) {\n var childType = children[i].type;\n\n if (childType !== Column && !(childType.prototype instanceof Column)) {\n return new Error('Table only accepts children of type Column');\n }\n }\n },\n\n /** Optional CSS class name */\n className: PropTypes.string,\n\n /** Disable rendering the header at all */\n disableHeader: PropTypes.bool,\n\n /**\n * Used to estimate the total height of a Table before all of its rows have actually been measured.\n * The estimated total height is adjusted as rows are rendered.\n */\n estimatedRowSize: PropTypes.number.isRequired,\n\n /** Optional custom CSS class name to attach to inner Grid element. */\n gridClassName: PropTypes.string,\n\n /** Optional inline style to attach to inner Grid element. */\n gridStyle: PropTypes.object,\n\n /** Optional CSS class to apply to all column headers */\n headerClassName: PropTypes.string,\n\n /** Fixed height of header row */\n headerHeight: PropTypes.number.isRequired,\n\n /**\n * Responsible for rendering a table row given an array of columns:\n * Should implement the following interface: ({\n * className: string,\n * columns: any[],\n * style: any\n * }): PropTypes.node\n */\n headerRowRenderer: PropTypes.func,\n\n /** Optional custom inline style to attach to table header columns. */\n headerStyle: PropTypes.object,\n\n /** Fixed/available height for out DOM element */\n height: PropTypes.number.isRequired,\n\n /** Optional id */\n id: PropTypes.string,\n\n /** Optional renderer to be used in place of table body rows when rowCount is 0 */\n noRowsRenderer: PropTypes.func,\n\n /**\n * Optional callback when a column is clicked.\n * ({ columnData: any, dataKey: string }): void\n */\n onColumnClick: PropTypes.func,\n\n /**\n * Optional callback when a column's header is clicked.\n * ({ columnData: any, dataKey: string }): void\n */\n onHeaderClick: PropTypes.func,\n\n /**\n * Callback invoked when a user clicks on a table row.\n * ({ index: number }): void\n */\n onRowClick: PropTypes.func,\n\n /**\n * Callback invoked when a user double-clicks on a table row.\n * ({ index: number }): void\n */\n onRowDoubleClick: PropTypes.func,\n\n /**\n * Callback invoked when the mouse leaves a table row.\n * ({ index: number }): void\n */\n onRowMouseOut: PropTypes.func,\n\n /**\n * Callback invoked when a user moves the mouse over a table row.\n * ({ index: number }): void\n */\n onRowMouseOver: PropTypes.func,\n\n /**\n * Callback invoked when a user right-clicks on a table row.\n * ({ index: number }): void\n */\n onRowRightClick: PropTypes.func,\n\n /**\n * Callback invoked with information about the slice of rows that were just rendered.\n * ({ startIndex, stopIndex }): void\n */\n onRowsRendered: PropTypes.func,\n\n /**\n * Callback invoked whenever the scroll offset changes within the inner scrollable region.\n * This callback can be used to sync scrolling between lists, tables, or grids.\n * ({ clientHeight, scrollHeight, scrollTop }): void\n */\n onScroll: PropTypes.func.isRequired,\n\n /** See Grid#overscanIndicesGetter */\n overscanIndicesGetter: PropTypes.func.isRequired,\n\n /**\n * Number of rows to render above/below the visible bounds of the list.\n * These rows can help for smoother scrolling on touch devices.\n */\n overscanRowCount: PropTypes.number.isRequired,\n\n /**\n * Optional CSS class to apply to all table rows (including the header row).\n * This property can be a CSS class name (string) or a function that returns a class name.\n * If a function is provided its signature should be: ({ index: number }): string\n */\n rowClassName: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n\n /**\n * Callback responsible for returning a data row given an index.\n * ({ index: number }): any\n */\n rowGetter: PropTypes.func.isRequired,\n\n /**\n * Either a fixed row height (number) or a function that returns the height of a row given its index.\n * ({ index: number }): number\n */\n rowHeight: PropTypes.oneOfType([PropTypes.number, PropTypes.func]).isRequired,\n\n /** Number of rows in table. */\n rowCount: PropTypes.number.isRequired,\n\n /**\n * Responsible for rendering a table row given an array of columns:\n * Should implement the following interface: ({\n * className: string,\n * columns: Array,\n * index: number,\n * isScrolling: boolean,\n * onRowClick: ?Function,\n * onRowDoubleClick: ?Function,\n * onRowMouseOver: ?Function,\n * onRowMouseOut: ?Function,\n * rowData: any,\n * style: any\n * }): PropTypes.node\n */\n rowRenderer: PropTypes.func,\n\n /** Optional custom inline style to attach to table rows. */\n rowStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,\n\n /** See Grid#scrollToAlignment */\n scrollToAlignment: PropTypes.oneOf(['auto', 'end', 'start', 'center']).isRequired,\n\n /** Row index to ensure visible (by forcefully scrolling if necessary) */\n scrollToIndex: PropTypes.number.isRequired,\n\n /** Vertical offset. */\n scrollTop: PropTypes.number,\n\n /**\n * Sort function to be called if a sortable header is clicked.\n * Should implement the following interface: ({\n * defaultSortDirection: 'ASC' | 'DESC',\n * event: MouseEvent,\n * sortBy: string,\n * sortDirection: SortDirection\n * }): void\n */\n sort: PropTypes.func,\n\n /** Table data is currently sorted by this :dataKey (if it is sorted at all) */\n sortBy: PropTypes.string,\n\n /** Table data is currently sorted in this direction (if it is sorted at all) */\n sortDirection: PropTypes.oneOf([SortDirection.ASC, SortDirection.DESC]),\n\n /** Optional inline style */\n style: PropTypes.object,\n\n /** Tab index for focus */\n tabIndex: PropTypes.number,\n\n /** Width of list */\n width: PropTypes.number.isRequired\n} : {};\nimport { bpfrpt_proptype_CellPosition } from \"../Grid\";","/**\n * Default accessor for returning a cell value for a given attribute.\n * This function expects to operate on either a vanilla Object or an Immutable Map.\n * You should override the column's cellDataGetter if your data is some other type of object.\n */\nexport default function defaultCellDataGetter(_ref) {\n var dataKey = _ref.dataKey,\n rowData = _ref.rowData;\n\n if (typeof rowData.get === 'function') {\n return rowData.get(dataKey);\n } else {\n return rowData[dataKey];\n }\n}\nimport { bpfrpt_proptype_CellDataGetterParams } from \"./types\";","/**\n * Default cell renderer that displays an attribute as a simple string\n * You should override the column's cellRenderer if your data is some other type of object.\n */\nexport default function defaultCellRenderer(_ref) {\n var cellData = _ref.cellData;\n\n if (cellData == null) {\n return '';\n } else {\n return String(cellData);\n }\n}\nimport { bpfrpt_proptype_CellRendererParams } from \"./types\";","import createMultiSort from './createMultiSort';\nimport defaultCellDataGetter from './defaultCellDataGetter';\nimport defaultCellRenderer from './defaultCellRenderer';\nimport defaultHeaderRowRenderer from './defaultHeaderRowRenderer.js';\nimport defaultHeaderRenderer from './defaultHeaderRenderer';\nimport defaultRowRenderer from './defaultRowRenderer';\nimport Column from './Column';\nimport SortDirection from './SortDirection';\nimport SortIndicator from './SortIndicator';\nimport Table from './Table';\nexport default Table;\nexport { createMultiSort, defaultCellDataGetter, defaultCellRenderer, defaultHeaderRowRenderer, defaultHeaderRenderer, defaultRowRenderer, Column, SortDirection, SortIndicator, Table };","import { requestAnimationTimeout, cancelAnimationTimeout } from '../../utils/requestAnimationTimeout';\nvar mountedInstances = [];\nvar originalBodyPointerEvents = null;\nvar disablePointerEventsTimeoutId = null;\n\nfunction enablePointerEventsIfDisabled() {\n if (disablePointerEventsTimeoutId) {\n disablePointerEventsTimeoutId = null;\n\n if (document.body && originalBodyPointerEvents != null) {\n document.body.style.pointerEvents = originalBodyPointerEvents;\n }\n\n originalBodyPointerEvents = null;\n }\n}\n\nfunction enablePointerEventsAfterDelayCallback() {\n enablePointerEventsIfDisabled();\n mountedInstances.forEach(function (instance) {\n return instance.__resetIsScrolling();\n });\n}\n\nfunction enablePointerEventsAfterDelay() {\n if (disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(disablePointerEventsTimeoutId);\n }\n\n var maximumTimeout = 0;\n mountedInstances.forEach(function (instance) {\n maximumTimeout = Math.max(maximumTimeout, instance.props.scrollingResetTimeInterval);\n });\n disablePointerEventsTimeoutId = requestAnimationTimeout(enablePointerEventsAfterDelayCallback, maximumTimeout);\n}\n\nfunction onScrollWindow(event) {\n if (event.currentTarget === window && originalBodyPointerEvents == null && document.body) {\n originalBodyPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = 'none';\n }\n\n enablePointerEventsAfterDelay();\n mountedInstances.forEach(function (instance) {\n if (instance.props.scrollElement === event.currentTarget) {\n instance.__handleWindowScrollEvent();\n }\n });\n}\n\nexport function registerScrollListener(component, element) {\n if (!mountedInstances.some(function (instance) {\n return instance.props.scrollElement === element;\n })) {\n element.addEventListener('scroll', onScrollWindow);\n }\n\n mountedInstances.push(component);\n}\nexport function unregisterScrollListener(component, element) {\n mountedInstances = mountedInstances.filter(function (instance) {\n return instance !== component;\n });\n\n if (!mountedInstances.length) {\n element.removeEventListener('scroll', onScrollWindow);\n\n if (disablePointerEventsTimeoutId) {\n cancelAnimationTimeout(disablePointerEventsTimeoutId);\n enablePointerEventsIfDisabled();\n }\n }\n}\nimport { bpfrpt_proptype_WindowScroller } from \"../WindowScroller.js\";","/**\n * Gets the dimensions of the element, accounting for API differences between\n * `window` and other DOM elements.\n */\n// TODO Move this into WindowScroller and import from there\nvar isWindow = function isWindow(element) {\n return element === window;\n};\n\nvar getBoundingBox = function getBoundingBox(element) {\n return element.getBoundingClientRect();\n};\n\nexport function getDimensions(scrollElement, props) {\n if (!scrollElement) {\n return {\n height: props.serverHeight,\n width: props.serverWidth\n };\n } else if (isWindow(scrollElement)) {\n var _window = window,\n innerHeight = _window.innerHeight,\n innerWidth = _window.innerWidth;\n return {\n height: typeof innerHeight === 'number' ? innerHeight : 0,\n width: typeof innerWidth === 'number' ? innerWidth : 0\n };\n } else {\n return getBoundingBox(scrollElement);\n }\n}\n/**\n * Gets the vertical and horizontal position of an element within its scroll container.\n * Elements that have been “scrolled past” return negative values.\n * Handles edge-case where a user is navigating back (history) from an already-scrolled page.\n * In this case the body’s top or left position will be a negative number and this element’s top or left will be increased (by that amount).\n */\n\nexport function getPositionOffset(element, container) {\n if (isWindow(container) && document.documentElement) {\n var containerElement = document.documentElement;\n var elementRect = getBoundingBox(element);\n var containerRect = getBoundingBox(containerElement);\n return {\n top: elementRect.top - containerRect.top,\n left: elementRect.left - containerRect.left\n };\n } else {\n var scrollOffset = getScrollOffset(container);\n\n var _elementRect = getBoundingBox(element);\n\n var _containerRect = getBoundingBox(container);\n\n return {\n top: _elementRect.top + scrollOffset.top - _containerRect.top,\n left: _elementRect.left + scrollOffset.left - _containerRect.left\n };\n }\n}\n/**\n * Gets the vertical and horizontal scroll amount of the element, accounting for IE compatibility\n * and API differences between `window` and other DOM elements.\n */\n\nexport function getScrollOffset(element) {\n if (isWindow(element) && document.documentElement) {\n return {\n top: 'scrollY' in window ? window.scrollY : document.documentElement.scrollTop,\n left: 'scrollX' in window ? window.scrollX : document.documentElement.scrollLeft\n };\n } else {\n return {\n top: element.scrollTop,\n left: element.scrollLeft\n };\n }\n}","import _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _possibleConstructorReturn from \"@babel/runtime/helpers/possibleConstructorReturn\";\nimport _getPrototypeOf from \"@babel/runtime/helpers/getPrototypeOf\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/assertThisInitialized\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n\nvar _class, _temp;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { registerScrollListener, unregisterScrollListener } from './utils/onScroll';\nimport { getDimensions, getPositionOffset, getScrollOffset } from './utils/dimensions';\nimport createDetectElementResize from '../vendor/detectElementResize';\n\n/**\n * Specifies the number of miliseconds during which to disable pointer events while a scroll is in progress.\n * This improves performance and makes scrolling smoother.\n */\nexport var IS_SCROLLING_TIMEOUT = 150;\n\nvar getWindow = function getWindow() {\n return typeof window !== 'undefined' ? window : undefined;\n};\n\nvar WindowScroller = (_temp = _class =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n _inherits(WindowScroller, _React$PureComponent);\n\n function WindowScroller() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, WindowScroller);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(WindowScroller)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty(_assertThisInitialized(_this), \"_window\", getWindow());\n\n _defineProperty(_assertThisInitialized(_this), \"_isMounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"_positionFromTop\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_positionFromLeft\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_detectElementResize\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"_child\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"state\", _objectSpread({}, getDimensions(_this.props.scrollElement, _this.props), {\n isScrolling: false,\n scrollLeft: 0,\n scrollTop: 0\n }));\n\n _defineProperty(_assertThisInitialized(_this), \"_registerChild\", function (element) {\n if (element && !(element instanceof Element)) {\n console.warn('WindowScroller registerChild expects to be passed Element or null');\n }\n\n _this._child = element;\n\n _this.updatePosition();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onChildScroll\", function (_ref) {\n var scrollTop = _ref.scrollTop;\n\n if (_this.state.scrollTop === scrollTop) {\n return;\n }\n\n var scrollElement = _this.props.scrollElement;\n\n if (scrollElement) {\n if (typeof scrollElement.scrollTo === 'function') {\n scrollElement.scrollTo(0, scrollTop + _this._positionFromTop);\n } else {\n scrollElement.scrollTop = scrollTop + _this._positionFromTop;\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_registerResizeListener\", function (element) {\n if (element === window) {\n window.addEventListener('resize', _this._onResize, false);\n } else {\n _this._detectElementResize.addResizeListener(element, _this._onResize);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_unregisterResizeListener\", function (element) {\n if (element === window) {\n window.removeEventListener('resize', _this._onResize, false);\n } else if (element) {\n _this._detectElementResize.removeResizeListener(element, _this._onResize);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"_onResize\", function () {\n _this.updatePosition();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"__handleWindowScrollEvent\", function () {\n if (!_this._isMounted) {\n return;\n }\n\n var onScroll = _this.props.onScroll;\n var scrollElement = _this.props.scrollElement;\n\n if (scrollElement) {\n var scrollOffset = getScrollOffset(scrollElement);\n var scrollLeft = Math.max(0, scrollOffset.left - _this._positionFromLeft);\n var scrollTop = Math.max(0, scrollOffset.top - _this._positionFromTop);\n\n _this.setState({\n isScrolling: true,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n\n onScroll({\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n });\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"__resetIsScrolling\", function () {\n _this.setState({\n isScrolling: false\n });\n });\n\n return _this;\n }\n\n _createClass(WindowScroller, [{\n key: \"updatePosition\",\n value: function updatePosition() {\n var scrollElement = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.scrollElement;\n var onResize = this.props.onResize;\n var _this$state = this.state,\n height = _this$state.height,\n width = _this$state.width;\n var thisNode = this._child || ReactDOM.findDOMNode(this);\n\n if (thisNode instanceof Element && scrollElement) {\n var offset = getPositionOffset(thisNode, scrollElement);\n this._positionFromTop = offset.top;\n this._positionFromLeft = offset.left;\n }\n\n var dimensions = getDimensions(scrollElement, this.props);\n\n if (height !== dimensions.height || width !== dimensions.width) {\n this.setState({\n height: dimensions.height,\n width: dimensions.width\n });\n onResize({\n height: dimensions.height,\n width: dimensions.width\n });\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var scrollElement = this.props.scrollElement;\n this._detectElementResize = createDetectElementResize();\n this.updatePosition(scrollElement);\n\n if (scrollElement) {\n registerScrollListener(this, scrollElement);\n\n this._registerResizeListener(scrollElement);\n }\n\n this._isMounted = true;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var scrollElement = this.props.scrollElement;\n var prevScrollElement = prevProps.scrollElement;\n\n if (prevScrollElement !== scrollElement && prevScrollElement != null && scrollElement != null) {\n this.updatePosition(scrollElement);\n unregisterScrollListener(this, prevScrollElement);\n registerScrollListener(this, scrollElement);\n\n this._unregisterResizeListener(prevScrollElement);\n\n this._registerResizeListener(scrollElement);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var scrollElement = this.props.scrollElement;\n\n if (scrollElement) {\n unregisterScrollListener(this, scrollElement);\n\n this._unregisterResizeListener(scrollElement);\n }\n\n this._isMounted = false;\n }\n }, {\n key: \"render\",\n value: function render() {\n var children = this.props.children;\n var _this$state2 = this.state,\n isScrolling = _this$state2.isScrolling,\n scrollTop = _this$state2.scrollTop,\n scrollLeft = _this$state2.scrollLeft,\n height = _this$state2.height,\n width = _this$state2.width;\n return children({\n onChildScroll: this._onChildScroll,\n registerChild: this._registerChild,\n height: height,\n isScrolling: isScrolling,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n width: width\n });\n }\n }]);\n\n return WindowScroller;\n}(React.PureComponent), _defineProperty(_class, \"propTypes\", process.env.NODE_ENV === 'production' ? null : {\n /**\n * Function responsible for rendering children.\n * This function should implement the following signature:\n * ({ height, isScrolling, scrollLeft, scrollTop, width }) => PropTypes.element\n */\n \"children\": PropTypes.func.isRequired,\n\n /** Callback to be invoked on-resize: ({ height, width }) */\n \"onResize\": PropTypes.func.isRequired,\n\n /** Callback to be invoked on-scroll: ({ scrollLeft, scrollTop }) */\n \"onScroll\": PropTypes.func.isRequired,\n\n /** Element to attach scroll event listeners. Defaults to window. */\n \"scrollElement\": PropTypes.oneOfType([PropTypes.any, function () {\n return (typeof Element === \"function\" ? PropTypes.instanceOf(Element) : PropTypes.any).apply(this, arguments);\n }]),\n\n /**\n * Wait this amount of time after the last scroll event before resetting child `pointer-events`.\n */\n \"scrollingResetTimeInterval\": PropTypes.number.isRequired,\n\n /** Height used for server-side rendering */\n \"serverHeight\": PropTypes.number.isRequired,\n\n /** Width used for server-side rendering */\n \"serverWidth\": PropTypes.number.isRequired\n}), _temp);\n\n_defineProperty(WindowScroller, \"defaultProps\", {\n onResize: function onResize() {},\n onScroll: function onScroll() {},\n scrollingResetTimeInterval: IS_SCROLLING_TIMEOUT,\n scrollElement: getWindow(),\n serverHeight: 0,\n serverWidth: 0\n});\n\nexport { WindowScroller as default };\nimport PropTypes from \"prop-types\";","export { ArrowKeyStepper } from './ArrowKeyStepper';\nexport { AutoSizer } from './AutoSizer';\nexport { CellMeasurer, CellMeasurerCache } from './CellMeasurer';\nexport { Collection } from './Collection';\nexport { ColumnSizer } from './ColumnSizer';\nexport { accessibilityOverscanIndicesGetter, defaultCellRangeRenderer, defaultOverscanIndicesGetter, Grid } from './Grid';\nexport { InfiniteLoader } from './InfiniteLoader';\nexport { List } from './List';\nexport { createCellPositioner as createMasonryCellPositioner, Masonry } from './Masonry';\nexport { MultiGrid } from './MultiGrid';\nexport { ScrollSync } from './ScrollSync';\nexport { createMultiSort as createTableMultiSort, defaultCellDataGetter as defaultTableCellDataGetter, defaultCellRenderer as defaultTableCellRenderer, defaultHeaderRenderer as defaultTableHeaderRenderer, defaultHeaderRowRenderer as defaultTableHeaderRowRenderer, defaultRowRenderer as defaultTableRowRenderer, Table, Column, SortDirection, SortIndicator } from './Table';\nexport { WindowScroller } from './WindowScroller';","export default function(x) {\n return x;\n}\n","import identity from \"./identity.js\";\n\nexport default function(transform) {\n if (transform == null) return identity;\n var x0,\n y0,\n kx = transform.scale[0],\n ky = transform.scale[1],\n dx = transform.translate[0],\n dy = transform.translate[1];\n return function(input, i) {\n if (!i) x0 = y0 = 0;\n var j = 2, n = input.length, output = new Array(n);\n output[0] = (x0 += input[0]) * kx + dx;\n output[1] = (y0 += input[1]) * ky + dy;\n while (j < n) output[j] = input[j], ++j;\n return output;\n };\n}\n","import reverse from \"./reverse.js\";\nimport transform from \"./transform.js\";\n\nexport default function(topology, o) {\n if (typeof o === \"string\") o = topology.objects[o];\n return o.type === \"GeometryCollection\"\n ? {type: \"FeatureCollection\", features: o.geometries.map(function(o) { return feature(topology, o); })}\n : feature(topology, o);\n}\n\nfunction feature(topology, o) {\n var id = o.id,\n bbox = o.bbox,\n properties = o.properties == null ? {} : o.properties,\n geometry = object(topology, o);\n return id == null && bbox == null ? {type: \"Feature\", properties: properties, geometry: geometry}\n : bbox == null ? {type: \"Feature\", id: id, properties: properties, geometry: geometry}\n : {type: \"Feature\", id: id, bbox: bbox, properties: properties, geometry: geometry};\n}\n\nexport function object(topology, o) {\n var transformPoint = transform(topology.transform),\n arcs = topology.arcs;\n\n function arc(i, points) {\n if (points.length) points.pop();\n for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) {\n points.push(transformPoint(a[k], k));\n }\n if (i < 0) reverse(points, n);\n }\n\n function point(p) {\n return transformPoint(p);\n }\n\n function line(arcs) {\n var points = [];\n for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points);\n if (points.length < 2) points.push(points[0]); // This should never happen per the specification.\n return points;\n }\n\n function ring(arcs) {\n var points = line(arcs);\n while (points.length < 4) points.push(points[0]); // This may happen if an arc has only two points.\n return points;\n }\n\n function polygon(arcs) {\n return arcs.map(ring);\n }\n\n function geometry(o) {\n var type = o.type, coordinates;\n switch (type) {\n case \"GeometryCollection\": return {type: type, geometries: o.geometries.map(geometry)};\n case \"Point\": coordinates = point(o.coordinates); break;\n case \"MultiPoint\": coordinates = o.coordinates.map(point); break;\n case \"LineString\": coordinates = line(o.arcs); break;\n case \"MultiLineString\": coordinates = o.arcs.map(line); break;\n case \"Polygon\": coordinates = polygon(o.arcs); break;\n case \"MultiPolygon\": coordinates = o.arcs.map(polygon); break;\n default: return null;\n }\n return {type: type, coordinates: coordinates};\n }\n\n return geometry(o);\n}\n","export default function(array, n) {\n var t, j = array.length, i = j - n;\n while (i < --j) t = array[i], array[i++] = array[j], array[j] = t;\n}\n","export default function(topology, arcs) {\n var stitchedArcs = {},\n fragmentByStart = {},\n fragmentByEnd = {},\n fragments = [],\n emptyIndex = -1;\n\n // Stitch empty arcs first, since they may be subsumed by other arcs.\n arcs.forEach(function(i, j) {\n var arc = topology.arcs[i < 0 ? ~i : i], t;\n if (arc.length < 3 && !arc[1][0] && !arc[1][1]) {\n t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t;\n }\n });\n\n arcs.forEach(function(i) {\n var e = ends(i),\n start = e[0],\n end = e[1],\n f, g;\n\n if (f = fragmentByEnd[start]) {\n delete fragmentByEnd[f.end];\n f.push(i);\n f.end = end;\n if (g = fragmentByStart[end]) {\n delete fragmentByStart[g.start];\n var fg = g === f ? f : f.concat(g);\n fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg;\n } else {\n fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n }\n } else if (f = fragmentByStart[end]) {\n delete fragmentByStart[f.start];\n f.unshift(i);\n f.start = start;\n if (g = fragmentByEnd[start]) {\n delete fragmentByEnd[g.end];\n var gf = g === f ? f : g.concat(f);\n fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf;\n } else {\n fragmentByStart[f.start] = fragmentByEnd[f.end] = f;\n }\n } else {\n f = [i];\n fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f;\n }\n });\n\n function ends(i) {\n var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1;\n if (topology.transform) p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; });\n else p1 = arc[arc.length - 1];\n return i < 0 ? [p1, p0] : [p0, p1];\n }\n\n function flush(fragmentByEnd, fragmentByStart) {\n for (var k in fragmentByEnd) {\n var f = fragmentByEnd[k];\n delete fragmentByStart[f.start];\n delete f.start;\n delete f.end;\n f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; });\n fragments.push(f);\n }\n }\n\n flush(fragmentByEnd, fragmentByStart);\n flush(fragmentByStart, fragmentByEnd);\n arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) fragments.push([i]); });\n\n return fragments;\n}\n","import {object} from \"./feature.js\";\nimport stitch from \"./stitch.js\";\n\nexport default function(topology) {\n return object(topology, meshArcs.apply(this, arguments));\n}\n\nexport function meshArcs(topology, object, filter) {\n var arcs, i, n;\n if (arguments.length > 1) arcs = extractArcs(topology, object, filter);\n else for (i = 0, arcs = new Array(n = topology.arcs.length); i < n; ++i) arcs[i] = i;\n return {type: \"MultiLineString\", arcs: stitch(topology, arcs)};\n}\n\nfunction extractArcs(topology, object, filter) {\n var arcs = [],\n geomsByArc = [],\n geom;\n\n function extract0(i) {\n var j = i < 0 ? ~i : i;\n (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom});\n }\n\n function extract1(arcs) {\n arcs.forEach(extract0);\n }\n\n function extract2(arcs) {\n arcs.forEach(extract1);\n }\n\n function extract3(arcs) {\n arcs.forEach(extract2);\n }\n\n function geometry(o) {\n switch (geom = o, o.type) {\n case \"GeometryCollection\": o.geometries.forEach(geometry); break;\n case \"LineString\": extract1(o.arcs); break;\n case \"MultiLineString\": case \"Polygon\": extract2(o.arcs); break;\n case \"MultiPolygon\": extract3(o.arcs); break;\n }\n }\n\n geometry(object);\n\n geomsByArc.forEach(filter == null\n ? function(geoms) { arcs.push(geoms[0].i); }\n : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) arcs.push(geoms[0].i); });\n\n return arcs;\n}\n","export {default as bbox} from \"./bbox.js\";\nexport {default as feature} from \"./feature.js\";\nexport {default as mesh, meshArcs} from \"./mesh.js\";\nexport {default as merge, mergeArcs} from \"./merge.js\";\nexport {default as neighbors} from \"./neighbors.js\";\nexport {default as quantize} from \"./quantize.js\";\nexport {default as transform} from \"./transform.js\";\nexport {default as untransform} from \"./untransform.js\";\n","import ShaderModule from './shader-module';\nimport {assert} from '../utils';\n\n// Instantiate shader modules and any dependencies resolve dependencies\nexport function resolveModules(modules) {\n return getShaderDependencies(instantiateModules(modules));\n}\n\n/**\n * Takes a list of shader module names and returns a new list of\n * shader module names that includes all dependencies, sorted so\n * that modules that are dependencies of other modules come first.\n *\n * If the shader glsl code from the returned modules is concatenated\n * in the reverse order, it is guaranteed that all functions be resolved and\n * that all function and variable definitions come before use.\n *\n * @param {String[]} modules - Array of modules (inline modules or module names)\n * @return {String[]} - Array of modules\n */\nfunction getShaderDependencies(modules) {\n const moduleMap = {};\n const moduleDepth = {};\n getDependencyGraph({modules, level: 0, moduleMap, moduleDepth});\n\n // Return a reverse sort so that dependencies come before the modules that use them\n return Object.keys(moduleDepth)\n .sort((a, b) => moduleDepth[b] - moduleDepth[a])\n .map(name => moduleMap[name]);\n}\n\n/**\n * Recursively checks module dpendencies to calculate dependency\n * level of each module.\n *\n * @param {object} options\n * @param {object[]} options.modules - Array of modules\n * @param {number} options.level - Current level\n * @param {object} options.moduleMap -\n * @param {object} options.moduleDepth - Current level\n * @return {object} - Map of module name to its level\n */\n// Adds another level of dependencies to the result map\nfunction getDependencyGraph({modules, level, moduleMap, moduleDepth}) {\n if (level >= 5) {\n throw new Error('Possible loop in shader dependency graph');\n }\n\n // Update level on all current modules\n for (const module of modules) {\n moduleMap[module.name] = module;\n if (moduleDepth[module.name] === undefined || moduleDepth[module.name] < level) {\n moduleDepth[module.name] = level;\n }\n }\n\n // Recurse\n for (const module of modules) {\n if (module.dependencies) {\n getDependencyGraph({modules: module.dependencies, level: level + 1, moduleMap, moduleDepth});\n }\n }\n}\n\nfunction instantiateModules(modules, seen) {\n return modules.map(module => {\n if (module instanceof ShaderModule) {\n return module;\n }\n\n assert(\n typeof module !== 'string',\n `Shader module use by name is deprecated. Import shader module '${module}' and use it directly.`\n );\n assert(module.name, 'shader module has no name');\n\n module = new ShaderModule(module);\n module.dependencies = instantiateModules(module.dependencies);\n\n return module;\n });\n}\n\nexport const TEST_EXPORTS = {\n getShaderDependencies,\n getDependencyGraph\n};\n","// opts allows user agent to be overridden for testing\nexport default function isOldIE(opts = {}) {\n const navigator = typeof window !== 'undefined' ? window.navigator || {} : {};\n // @ts-ignore\n const userAgent = opts.userAgent || navigator.userAgent || '';\n // We only care about older versions of IE (IE 11 and below). Newer versions of IE (Edge)\n // have much better web standards support.\n const isMSIE = userAgent.indexOf('MSIE ') !== -1;\n const isTrident = userAgent.indexOf('Trident/') !== -1;\n return isMSIE || isTrident;\n}\n","// Feature detection for WebGL\n//\n// Provides a function that enables simple checking of which WebGL features are\n// available in an WebGL1 or WebGL2 environment.\n\n/* eslint-disable no-inline-comments, max-len */\nimport isOldIE from './is-old-ie';\nimport assert from './assert';\n\nconst GL_VENDOR = 0x1f00;\nconst GL_RENDERER = 0x1f01;\nconst GL_VERSION = 0x1f02;\nconst GL_SHADING_LANGUAGE_VERSION = 0x8b8c;\n\n// Defines luma.gl \"feature\" names and semantics\nconst WEBGL_FEATURES = {\n // GLSL extensions\n GLSL_FRAG_DATA: ['WEBGL_draw_buffers', true], // TODO - name makes no sense in GLSL 3.00\n GLSL_FRAG_DEPTH: ['EXT_frag_depth', true],\n GLSL_DERIVATIVES: ['OES_standard_derivatives', true],\n GLSL_TEXTURE_LOD: ['EXT_shader_texture_lod', true]\n};\n\n// Create a key-mirrored FEATURES array\nconst FEATURES = {};\nObject.keys(WEBGL_FEATURES).forEach(key => {\n FEATURES[key] = key;\n});\n\nexport {FEATURES};\n\nfunction isWebGL2(gl) {\n if (typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext) {\n return true;\n }\n return Boolean(gl && gl._version === 2);\n}\n\nexport function getContextInfo(gl) {\n const info = gl.getExtension('WEBGL_debug_renderer_info');\n const vendor = gl.getParameter((info && info.UNMASKED_VENDOR_WEBGL) || GL_VENDOR);\n const renderer = gl.getParameter((info && info.UNMASKED_RENDERER_WEBGL) || GL_RENDERER);\n const gpuVendor = identifyGPUVendor(vendor, renderer);\n const gpuInfo = {\n gpuVendor,\n vendor,\n renderer,\n version: gl.getParameter(GL_VERSION),\n shadingLanguageVersion: gl.getParameter(GL_SHADING_LANGUAGE_VERSION)\n };\n return gpuInfo;\n}\n\nfunction identifyGPUVendor(vendor, renderer) {\n if (vendor.match(/NVIDIA/i) || renderer.match(/NVIDIA/i)) {\n return 'NVIDIA';\n }\n if (vendor.match(/INTEL/i) || renderer.match(/INTEL/i)) {\n return 'INTEL';\n }\n if (\n vendor.match(/AMD/i) ||\n renderer.match(/AMD/i) ||\n vendor.match(/ATI/i) ||\n renderer.match(/ATI/i)\n ) {\n return 'AMD';\n }\n return 'UNKNOWN GPU';\n}\n\nconst compiledGlslExtensions = {};\n\n// Enables feature detection in IE11 due to a bug where gl.getExtension may return true\n// but fail to compile when the extension is enabled in the shader. Specifically,\n// the OES_standard_derivatives and WEBGL_draw_buffers extensions fails to compile in IE11 even though its included\n// in the list of supported extensions.\n// opts allows user agent to be overridden for testing\n/*\n* Inputs :\n* gl : WebGL context\n* cap : Key of WEBGL_FEATURES object identifying the extension\n* opts :\n* behavior : behavior of extension to be tested, by defualt `enable` is used\n* Returns : true, if shader is compiled successfully, false otherwise\n*/\nexport function canCompileGLGSExtension(gl, cap, opts = {}) {\n const feature = WEBGL_FEATURES[cap];\n assert(feature, cap);\n\n if (!isOldIE(opts)) {\n return true;\n }\n\n if (cap in compiledGlslExtensions) {\n return compiledGlslExtensions[cap];\n }\n\n const extensionName = feature[0];\n const behavior = opts.behavior || 'enable';\n const source = `#extension GL_${extensionName} : ${behavior}\\nvoid main(void) {}`;\n\n const shader = gl.createShader(gl.VERTEX_SHADER);\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n const canCompile = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n gl.deleteShader(shader);\n compiledGlslExtensions[cap] = canCompile;\n return canCompile;\n}\n\n// TODO - cache the value\nfunction getFeature(gl, cap) {\n const feature = WEBGL_FEATURES[cap];\n assert(feature, cap);\n\n // Get extension name from table\n const extensionName = isWebGL2(gl) ? feature[1] || feature[0] : feature[0];\n\n // Check if the value is dependent on checking an extension\n const value =\n typeof extensionName === 'string' ? Boolean(gl.getExtension(extensionName)) : extensionName;\n\n assert(value === false || value === true);\n\n return value;\n}\n\nexport function hasFeatures(gl, features) {\n features = Array.isArray(features) ? features : [features];\n return features.every(feature => getFeature(gl, feature));\n}\n","// TRANSPILATION TABLES\n\nfunction testVariable(qualifier) {\n /*\n should match:\n in float weight;\n out vec4 positions[2];\n should not match:\n void f(out float a, in float b) {}\n */\n return new RegExp(`\\\\b${qualifier}[ \\\\t]+(\\\\w+[ \\\\t]+\\\\w+(\\\\[\\\\w+\\\\])?;)`, 'g');\n}\n\n/** Simple regex replacements for GLSL ES 1.00 syntax that has changed in GLSL ES 3.00 */\nconst ES300_REPLACEMENTS = [\n // Fix poorly formatted version directive\n [/^(#version[ \\t]+(100|300[ \\t]+es))?[ \\t]*\\n/, '#version 300 es\\n'],\n // The individual `texture...()` functions were replaced with `texture()` overloads\n [/\\btexture(2D|2DProj|Cube)Lod(EXT)?\\(/g, 'textureLod('],\n [/\\btexture(2D|2DProj|Cube)(EXT)?\\(/g, 'texture(']\n];\n\nconst ES300_VERTEX_REPLACEMENTS = [\n ...ES300_REPLACEMENTS,\n // `attribute` keyword replaced with `in`\n [testVariable('attribute'), 'in $1'],\n // `varying` keyword replaced with `out`\n [testVariable('varying'), 'out $1']\n];\n\n/** Simple regex replacements for GLSL ES 1.00 syntax that has changed in GLSL ES 3.00 */\nconst ES300_FRAGMENT_REPLACEMENTS = [\n ...ES300_REPLACEMENTS,\n // `varying` keyword replaced with `in`\n [testVariable('varying'), 'in $1']\n];\n\nconst ES100_REPLACEMENTS = [\n [/^#version[ \\t]+300[ \\t]+es/, '#version 100'],\n\n // In GLSL 1.00 ES these functions are provided by an extension\n [/\\btexture(2D|2DProj|Cube)Lod\\(/g, 'texture$1LodEXT('],\n\n // Overloads in GLSL 3.00 map to individual functions. Note that we cannot\n // differentiate 2D,2DProj,Cube without type analysis so we choose the most common variant.\n [/\\btexture\\(/g, 'texture2D('],\n [/\\btextureLod\\(/g, 'texture2DLodEXT(']\n];\n\nconst ES100_VERTEX_REPLACEMENTS = [\n ...ES100_REPLACEMENTS,\n [testVariable('in'), 'attribute $1'],\n [testVariable('out'), 'varying $1']\n];\n\nconst ES100_FRAGMENT_REPLACEMENTS = [\n ...ES100_REPLACEMENTS,\n // Replace `in` with `varying`\n [testVariable('in'), 'varying $1']\n];\n\nconst ES100_FRAGMENT_OUTPUT_NAME = 'gl_FragColor';\nconst ES300_FRAGMENT_OUTPUT_REGEX = /\\bout[ \\t]+vec4[ \\t]+(\\w+)[ \\t]*;\\n?/;\n\nconst REGEX_START_OF_MAIN = /void\\s+main\\s*\\([^)]*\\)\\s*\\{\\n?/; // Beginning of main\n\n// Transpiles shader source code to target GLSL version\n// Note: We always run transpiler even if same version e.g. 3.00 => 3.00\n// RFC: https://github.com/visgl/luma.gl/blob/7.0-release/dev-docs/RFCs/v6.0/portable-glsl-300-rfc.md\nexport default function transpileShader(source, targetGLSLVersion, isVertex) {\n switch (targetGLSLVersion) {\n case 300:\n return isVertex\n ? convertShader(source, ES300_VERTEX_REPLACEMENTS)\n : convertFragmentShaderTo300(source);\n case 100:\n return isVertex\n ? convertShader(source, ES100_VERTEX_REPLACEMENTS)\n : convertFragmentShaderTo100(source);\n default:\n throw new Error(`unknown GLSL version ${targetGLSLVersion}`);\n }\n}\n\nfunction convertShader(source, replacements) {\n for (const [pattern, replacement] of replacements) {\n source = source.replace(pattern, replacement);\n }\n return source;\n}\n\nfunction convertFragmentShaderTo300(source) {\n source = convertShader(source, ES300_FRAGMENT_REPLACEMENTS);\n\n const outputMatch = source.match(ES300_FRAGMENT_OUTPUT_REGEX);\n if (outputMatch) {\n const outputName = outputMatch[1];\n source = source.replace(new RegExp(`\\\\b${ES100_FRAGMENT_OUTPUT_NAME}\\\\b`, 'g'), outputName);\n } else {\n const outputName = 'fragmentColor';\n source = source\n .replace(REGEX_START_OF_MAIN, match => `out vec4 ${outputName};\\n${match}`)\n .replace(new RegExp(`\\\\b${ES100_FRAGMENT_OUTPUT_NAME}\\\\b`, 'g'), outputName);\n }\n\n return source;\n}\n\nfunction convertFragmentShaderTo100(source) {\n source = convertShader(source, ES100_FRAGMENT_REPLACEMENTS);\n\n const outputMatch = source.match(ES300_FRAGMENT_OUTPUT_REGEX);\n if (outputMatch) {\n const outputName = outputMatch[1];\n source = source\n .replace(ES300_FRAGMENT_OUTPUT_REGEX, '')\n .replace(new RegExp(`\\\\b${outputName}\\\\b`, 'g'), ES100_FRAGMENT_OUTPUT_NAME);\n }\n\n return source;\n}\n","import {VERTEX_SHADER, FRAGMENT_SHADER} from './constants';\nimport {resolveModules} from './resolve-modules';\nimport {getPlatformShaderDefines, getVersionDefines} from './platform-defines';\nimport injectShader, {DECLARATION_INJECT_MARKER} from './inject-shader';\nimport transpileShader from './transpile-shader';\nimport {assert} from '../utils';\n\nconst INJECT_SHADER_DECLARATIONS = `\\n\\n${DECLARATION_INJECT_MARKER}\\n\\n`;\n\nconst SHADER_TYPE = {\n [VERTEX_SHADER]: 'vertex',\n [FRAGMENT_SHADER]: 'fragment'\n};\n\n// Precision prologue to inject before functions are injected in shader\n// TODO - extract any existing prologue in the fragment source and move it up...\nconst FRAGMENT_SHADER_PROLOGUE = `\\\nprecision highp float;\n\n`;\n\n// Inject a list of modules\nexport function assembleShaders(gl, opts) {\n const {vs, fs} = opts;\n const modules = resolveModules(opts.modules || []);\n return {\n gl,\n vs: assembleShader(gl, Object.assign({}, opts, {source: vs, type: VERTEX_SHADER, modules})),\n fs: assembleShader(gl, Object.assign({}, opts, {source: fs, type: FRAGMENT_SHADER, modules})),\n getUniforms: assembleGetUniforms(modules)\n };\n}\n\n// Pulls together complete source code for either a vertex or a fragment shader\n// adding prologues, requested module chunks, and any final injections.\nfunction assembleShader(\n gl,\n {\n id,\n source,\n type,\n modules,\n defines = {},\n hookFunctions = [],\n inject = {},\n transpileToGLSL100 = false,\n prologue = true,\n log\n }\n) {\n assert(typeof source === 'string', 'shader source must be a string');\n\n const isVertex = type === VERTEX_SHADER;\n\n const sourceLines = source.split('\\n');\n let glslVersion = 100;\n let versionLine = '';\n let coreSource = source;\n // Extract any version directive string from source.\n // TODO : keep all pre-processor statements at the begining of the shader.\n if (sourceLines[0].indexOf('#version ') === 0) {\n glslVersion = 300; // TODO - regexp that matches actual version number\n versionLine = sourceLines[0];\n coreSource = sourceLines.slice(1).join('\\n');\n } else {\n versionLine = `#version ${glslVersion}`;\n }\n\n // Combine Module and Application Defines\n const allDefines = {};\n modules.forEach(module => {\n Object.assign(allDefines, module.getDefines());\n });\n Object.assign(allDefines, defines);\n\n // Add platform defines (use these to work around platform-specific bugs and limitations)\n // Add common defines (GLSL version compatibility, feature detection)\n // Add precision declaration for fragment shaders\n let assembledSource = prologue\n ? `\\\n${versionLine}\n${getShaderName({id, source, type})}\n${getShaderType({type})}\n${getPlatformShaderDefines(gl)}\n${getVersionDefines(gl, glslVersion, !isVertex)}\n${getApplicationDefines(allDefines)}\n${isVertex ? '' : FRAGMENT_SHADER_PROLOGUE}\n`\n : `${versionLine}\n`;\n\n const hookFunctionMap = normalizeHookFunctions(hookFunctions);\n\n // Add source of dependent modules in resolved order\n const hookInjections = {};\n const declInjections = {};\n const mainInjections = {};\n\n for (const key in inject) {\n const injection =\n typeof inject[key] === 'string' ? {injection: inject[key], order: 0} : inject[key];\n const match = key.match(/^(v|f)s:(#)?([\\w-]+)$/);\n if (match) {\n const hash = match[2];\n const name = match[3];\n if (hash) {\n if (name === 'decl') {\n declInjections[key] = [injection];\n } else {\n mainInjections[key] = [injection];\n }\n } else {\n hookInjections[key] = [injection];\n }\n } else {\n // Regex injection\n mainInjections[key] = [injection];\n }\n }\n\n for (const module of modules) {\n if (log) {\n module.checkDeprecations(coreSource, log);\n }\n const moduleSource = module.getModuleSource(type, glslVersion);\n // Add the module source, and a #define that declares it presence\n assembledSource += moduleSource;\n\n const injections = module.injections[type];\n for (const key in injections) {\n const match = key.match(/^(v|f)s:#([\\w-]+)$/);\n if (match) {\n const name = match[2];\n const injectionType = name === 'decl' ? declInjections : mainInjections;\n injectionType[key] = injectionType[key] || [];\n injectionType[key].push(injections[key]);\n } else {\n hookInjections[key] = hookInjections[key] || [];\n hookInjections[key].push(injections[key]);\n }\n }\n }\n\n // For injectShader\n assembledSource += INJECT_SHADER_DECLARATIONS;\n\n assembledSource = injectShader(assembledSource, type, declInjections);\n\n assembledSource += getHookFunctions(hookFunctionMap[type], hookInjections);\n\n // Add the version directive and actual source of this shader\n assembledSource += coreSource;\n\n // Apply any requested shader injections\n assembledSource = injectShader(assembledSource, type, mainInjections);\n\n assembledSource = transpileShader(\n assembledSource,\n transpileToGLSL100 ? 100 : glslVersion,\n isVertex\n );\n\n return assembledSource;\n}\n\n// Returns a combined `getUniforms` covering the options for all the modules,\n// the created function will pass on options to the inidividual `getUniforms`\n// function of each shader module and combine the results into one object that\n// can be passed to setUniforms.\nfunction assembleGetUniforms(modules) {\n return function getUniforms(opts) {\n const uniforms = {};\n for (const module of modules) {\n // `modules` is already sorted by dependency level. This guarantees that\n // modules have access to the uniforms that are generated by their dependencies.\n const moduleUniforms = module.getUniforms(opts, uniforms);\n Object.assign(uniforms, moduleUniforms);\n }\n return uniforms;\n };\n}\n\nfunction getShaderType({type}) {\n return `\n#define SHADER_TYPE_${SHADER_TYPE[type].toUpperCase()}\n`;\n}\n\n// Generate \"glslify-compatible\" SHADER_NAME defines\n// These are understood by the GLSL error parsing function\n// If id is provided and no SHADER_NAME constant is present in source, create one\nfunction getShaderName({id, source, type}) {\n const injectShaderName = id && typeof id === 'string' && source.indexOf('SHADER_NAME') === -1;\n return injectShaderName\n ? `\n#define SHADER_NAME ${id}_${SHADER_TYPE[type]}\n\n`\n : '';\n}\n\n// Generates application defines from an object\nfunction getApplicationDefines(defines = {}) {\n let count = 0;\n let sourceText = '';\n for (const define in defines) {\n if (count === 0) {\n sourceText += '\\n// APPLICATION DEFINES\\n';\n }\n count++;\n\n const value = defines[define];\n if (value || Number.isFinite(value)) {\n sourceText += `#define ${define.toUpperCase()} ${defines[define]}\\n`;\n }\n }\n if (count === 0) {\n sourceText += '\\n';\n }\n return sourceText;\n}\n\nfunction getHookFunctions(hookFunctions, hookInjections) {\n let result = '';\n for (const hookName in hookFunctions) {\n const hookFunction = hookFunctions[hookName];\n result += `void ${hookFunction.signature} {\\n`;\n if (hookFunction.header) {\n result += ` ${hookFunction.header}`;\n }\n if (hookInjections[hookName]) {\n const injections = hookInjections[hookName];\n injections.sort((a, b) => a.order - b.order);\n for (const injection of injections) {\n result += ` ${injection.injection}\\n`;\n }\n }\n if (hookFunction.footer) {\n result += ` ${hookFunction.footer}`;\n }\n result += '}\\n';\n }\n\n return result;\n}\n\nfunction normalizeHookFunctions(hookFunctions) {\n const result = {\n vs: {},\n fs: {}\n };\n\n hookFunctions.forEach(hook => {\n let opts;\n if (typeof hook !== 'string') {\n opts = hook;\n hook = opts.hook;\n } else {\n opts = {};\n }\n hook = hook.trim();\n const [stage, signature] = hook.split(':');\n const name = hook.replace(/\\(.+/, '');\n result[stage][name] = Object.assign(opts, {signature});\n });\n\n return result;\n}\n","import {getContextInfo, hasFeatures, canCompileGLGSExtension, FEATURES} from '../utils/webgl-info';\n\nexport function getPlatformShaderDefines(gl) {\n const debugInfo = getContextInfo(gl);\n\n switch (debugInfo.gpuVendor.toLowerCase()) {\n case 'nvidia':\n return `\\\n#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n`;\n\n case 'intel':\n return `\\\n#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n`;\n\n case 'amd':\n // AMD Does not eliminate fp64 code\n return `\\\n#define AMD_GPU\n`;\n\n default:\n // We don't know what GPU it is, could be that the GPU driver or\n // browser is not implementing UNMASKED_RENDERER constant and not\n // reporting a correct name\n return `\\\n#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n`;\n }\n}\n\nexport function getVersionDefines(gl, glslVersion, isFragment) {\n // Add shadertools defines to let shaders portably v1/v3 check for features\n let versionDefines = `\\\n#if (__VERSION__ > 120)\n\n# define FEATURE_GLSL_DERIVATIVES\n# define FEATURE_GLSL_DRAW_BUFFERS\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FEATURE_GLSL_TEXTURE_LOD\n\n// DEPRECATED FLAGS, remove in v9\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n`;\n\n if (hasFeatures(gl, FEATURES.GLSL_FRAG_DEPTH)) {\n versionDefines += `\\\n\n// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n`;\n }\n if (\n hasFeatures(gl, FEATURES.GLSL_DERIVATIVES) &&\n canCompileGLGSExtension(gl, FEATURES.GLSL_DERIVATIVES)\n ) {\n versionDefines += `\\\n\n// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define FEATURE_GLSL_DERIVATIVES\n# define DERIVATIVES\n#endif\n`;\n }\n if (\n hasFeatures(gl, FEATURES.GLSL_FRAG_DATA) &&\n canCompileGLGSExtension(gl, FEATURES.GLSL_FRAG_DATA, {behavior: 'require'})\n ) {\n versionDefines += `\\\n\n// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define FEATURE_GLSL_DRAW_BUFFERS\n#define DRAW_BUFFERS\n#endif\n`;\n }\n if (hasFeatures(gl, FEATURES.GLSL_TEXTURE_LOD)) {\n versionDefines += `\\\n// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n\n# define FEATURE_GLSL_TEXTURE_LOD\n# define TEXTURE_LOD\n\n#endif\n`;\n }\n return versionDefines;\n}\n","import {assembleShaders} from '@luma.gl/shadertools';\nimport {Program} from '@luma.gl/webgl';\n\nexport default class ProgramManager {\n static getDefaultProgramManager(gl) {\n gl.luma = gl.luma || {};\n gl.luma.defaultProgramManager = gl.luma.defaultProgramManager || new ProgramManager(gl);\n\n return gl.luma.defaultProgramManager;\n }\n\n constructor(gl) {\n this.gl = gl;\n\n this._programCache = {};\n this._getUniforms = {};\n this._registeredModules = {}; // TODO: Remove? This isn't used anywhere in luma.gl\n this._hookFunctions = [];\n this._defaultModules = [];\n\n this._hashes = {};\n this._hashCounter = 0;\n this.stateHash = 0; // Used change hashing if hooks are modified\n this._useCounts = {};\n }\n\n addDefaultModule(module) {\n if (!this._defaultModules.find(m => m.name === module.name)) {\n this._defaultModules.push(module);\n }\n\n this.stateHash++;\n }\n\n removeDefaultModule(module) {\n const moduleName = typeof module === 'string' ? module : module.name;\n this._defaultModules = this._defaultModules.filter(m => m.name !== moduleName);\n this.stateHash++;\n }\n\n addShaderHook(hook, opts) {\n if (opts) {\n hook = Object.assign(opts, {hook});\n }\n\n this._hookFunctions.push(hook);\n\n this.stateHash++;\n }\n\n get(props = {}) {\n const {\n vs = '',\n fs = '',\n defines = {},\n inject = {},\n varyings = [],\n bufferMode = 0x8c8d,\n transpileToGLSL100 = false\n } = props; // varyings/bufferMode for xform feedback, 0x8c8d = SEPARATE_ATTRIBS\n\n const modules = this._getModuleList(props.modules); // Combine with default modules\n\n const vsHash = this._getHash(vs);\n const fsHash = this._getHash(fs);\n const moduleHashes = modules.map(m => this._getHash(m.name)).sort();\n const varyingHashes = varyings.map(v => this._getHash(v));\n\n const defineKeys = Object.keys(defines).sort();\n const injectKeys = Object.keys(inject).sort();\n const defineHashes = [];\n const injectHashes = [];\n\n for (const key of defineKeys) {\n defineHashes.push(this._getHash(key));\n defineHashes.push(this._getHash(defines[key]));\n }\n\n for (const key of injectKeys) {\n injectHashes.push(this._getHash(key));\n injectHashes.push(this._getHash(inject[key]));\n }\n\n const hash = `${vsHash}/${fsHash}D${defineHashes.join('/')}M${moduleHashes.join(\n '/'\n )}I${injectHashes.join('/')}V${varyingHashes.join('/')}H${this.stateHash}B${bufferMode}${\n transpileToGLSL100 ? 'T' : ''\n }`;\n\n if (!this._programCache[hash]) {\n const assembled = assembleShaders(this.gl, {\n vs,\n fs,\n modules,\n inject,\n defines,\n hookFunctions: this._hookFunctions,\n transpileToGLSL100\n });\n\n this._programCache[hash] = new Program(this.gl, {\n hash,\n vs: assembled.vs,\n fs: assembled.fs,\n varyings,\n bufferMode\n });\n\n this._getUniforms[hash] = assembled.getUniforms || (x => {});\n this._useCounts[hash] = 0;\n }\n\n this._useCounts[hash]++;\n\n return this._programCache[hash];\n }\n\n getUniforms(program) {\n return this._getUniforms[program.hash] || null;\n }\n\n release(program) {\n const hash = program.hash;\n this._useCounts[hash]--;\n\n if (this._useCounts[hash] === 0) {\n this._programCache[hash].delete();\n delete this._programCache[hash];\n delete this._getUniforms[hash];\n delete this._useCounts[hash];\n }\n }\n\n _getHash(key) {\n if (this._hashes[key] === undefined) {\n this._hashes[key] = this._hashCounter++;\n }\n\n return this._hashes[key];\n }\n\n // Dedup and combine with default modules\n _getModuleList(appModules = []) {\n const modules = new Array(this._defaultModules.length + appModules.length);\n const seen = {};\n let count = 0;\n\n for (let i = 0, len = this._defaultModules.length; i < len; ++i) {\n const module = this._defaultModules[i];\n const name = module.name;\n modules[count++] = module;\n seen[name] = true;\n }\n\n for (let i = 0, len = appModules.length; i < len; ++i) {\n const module = appModules[i];\n const name = module.name;\n if (!seen[name]) {\n modules[count++] = module;\n seen[name] = true;\n }\n }\n\n modules.length = count;\n\n return modules;\n }\n}\n","var noop = {value: function() {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","import GL from '@luma.gl/constants';\nimport {assert} from '../utils/assert';\n\n// Returns number of components in a specific readPixels WebGL format\nexport function glFormatToComponents(format) {\n switch (format) {\n case GL.ALPHA:\n case GL.R32F:\n case GL.RED:\n return 1;\n case GL.RG32F:\n case GL.RG:\n return 2;\n case GL.RGB:\n case GL.RGB32F:\n return 3;\n case GL.RGBA:\n case GL.RGBA32F:\n return 4;\n // TODO: Add support for additional WebGL2 formats\n default:\n assert(false);\n return 0;\n }\n}\n\n// Return byte count for given readPixels WebGL type\nexport function glTypeToBytes(type) {\n switch (type) {\n case GL.UNSIGNED_BYTE:\n return 1;\n case GL.UNSIGNED_SHORT_5_6_5:\n case GL.UNSIGNED_SHORT_4_4_4_4:\n case GL.UNSIGNED_SHORT_5_5_5_1:\n return 2;\n case GL.FLOAT:\n return 4;\n // TODO: Add support for additional WebGL2 types\n default:\n assert(false);\n return 0;\n }\n}\n","import GL from '@luma.gl/constants';\nimport Buffer from './buffer';\nimport Framebuffer from './framebuffer';\nimport Texture from './texture';\nimport {assertWebGL2Context, withParameters, log} from '@luma.gl/gltools';\nimport {flipRows, scalePixels} from '../webgl-utils/typed-array-utils';\nimport {getTypedArrayFromGLType, getGLTypeFromTypedArray} from '../webgl-utils/typed-array-utils';\nimport {glFormatToComponents, glTypeToBytes} from '../webgl-utils/format-utils';\nimport {toFramebuffer} from '../webgl-utils/texture-utils';\nimport {assert} from '../utils/assert';\n\n// NOTE: Slow requires roundtrip to GPU\n// Copies data from a Framebuffer or a Texture object into ArrayBuffer object.\n// App can provide targetPixelArray or have it auto allocated by this method\n// @returns {Uint8Array|Uint16Array|FloatArray} - pixel array,\n// newly allocated by this method unless provided by app.\nexport function readPixelsToArray(source, options = {}) {\n const {sourceX = 0, sourceY = 0, sourceFormat = GL.RGBA} = options;\n let {\n sourceAttachment = GL.COLOR_ATTACHMENT0, // TODO - support gl.readBuffer\n target = null,\n // following parameters are auto deduced if not provided\n sourceWidth,\n sourceHeight,\n sourceType\n } = options;\n\n const {framebuffer, deleteFramebuffer} = getFramebuffer(source);\n assert(framebuffer);\n const {gl, handle, attachments} = framebuffer;\n sourceWidth = sourceWidth || framebuffer.width;\n sourceHeight = sourceHeight || framebuffer.height;\n\n // TODO - Set and unset gl.readBuffer\n if (sourceAttachment === GL.COLOR_ATTACHMENT0 && handle === null) {\n sourceAttachment = GL.FRONT;\n }\n\n assert(attachments[sourceAttachment]);\n\n // Deduce the type from color attachment if not provided.\n sourceType = sourceType || attachments[sourceAttachment].type;\n\n // Deduce type and allocated pixelArray if needed\n target = getPixelArray(target, sourceType, sourceFormat, sourceWidth, sourceHeight);\n\n // Pixel array available, if necessary, deduce type from it.\n sourceType = sourceType || getGLTypeFromTypedArray(target);\n\n const prevHandle = gl.bindFramebuffer(GL.FRAMEBUFFER, handle);\n gl.readPixels(sourceX, sourceY, sourceWidth, sourceHeight, sourceFormat, sourceType, target);\n // @ts-ignore\n gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);\n if (deleteFramebuffer) {\n framebuffer.delete();\n }\n return target;\n}\n\n// NOTE: doesn't wait for copy to be complete, it programs GPU to perform a DMA transffer.\n// Copies data from a Framebuffer or a Texture object into a Buffer object.\nexport function readPixelsToBuffer(\n source,\n {\n sourceX = 0,\n sourceY = 0,\n sourceFormat = GL.RGBA,\n target = null, // A new Buffer object is created when not provided.\n targetByteOffset = 0, // byte offset in buffer object\n // following parameters are auto deduced if not provided\n sourceWidth,\n sourceHeight,\n sourceType\n }\n) {\n const {framebuffer, deleteFramebuffer} = getFramebuffer(source);\n assert(framebuffer);\n sourceWidth = sourceWidth || framebuffer.width;\n sourceHeight = sourceHeight || framebuffer.height;\n\n // Asynchronus read (PIXEL_PACK_BUFFER) is WebGL2 only feature\n const gl2 = assertWebGL2Context(framebuffer.gl);\n\n // deduce type if not available.\n sourceType = sourceType || (target ? target.type : GL.UNSIGNED_BYTE);\n\n if (!target) {\n // Create new buffer with enough size\n const components = glFormatToComponents(sourceFormat);\n const byteCount = glTypeToBytes(sourceType);\n const byteLength = targetByteOffset + sourceWidth * sourceHeight * components * byteCount;\n target = new Buffer(gl2, {byteLength, accessor: {type: sourceType, size: components}});\n }\n\n target.bind({target: GL.PIXEL_PACK_BUFFER});\n withParameters(gl2, {framebuffer}, () => {\n gl2.readPixels(\n sourceX,\n sourceY,\n sourceWidth,\n sourceHeight,\n sourceFormat,\n sourceType,\n targetByteOffset\n );\n });\n target.unbind({target: GL.PIXEL_PACK_BUFFER});\n if (deleteFramebuffer) {\n framebuffer.delete();\n }\n\n return target;\n}\n\n// Reads pixels from a Framebuffer or Texture object to a dataUrl\nexport function copyToDataUrl(\n source,\n {\n sourceAttachment = GL.COLOR_ATTACHMENT0, // TODO - support gl.readBuffer\n targetMaxHeight = Number.MAX_SAFE_INTEGER\n } = {}\n) {\n let data = readPixelsToArray(source, {sourceAttachment});\n\n // Scale down\n let {width, height} = source;\n while (height > targetMaxHeight) {\n ({data, width, height} = scalePixels({data, width, height}));\n }\n\n // Flip to top down coordinate system\n flipRows({data, width, height});\n\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n const context = canvas.getContext('2d');\n\n // Copy the pixels to a 2D canvas\n const imageData = context.createImageData(width, height);\n imageData.data.set(data);\n context.putImageData(imageData, 0, 0);\n\n return canvas.toDataURL();\n}\n\n// Reads pixels from a Framebuffer or Texture object into an HTML Image\nexport function copyToImage(\n source,\n {\n sourceAttachment = GL.COLOR_ATTACHMENT0, // TODO - support gl.readBuffer\n targetImage = null\n } = {}\n) {\n const dataUrl = copyToDataUrl(source, {sourceAttachment});\n targetImage = targetImage || new Image();\n targetImage.src = dataUrl;\n return targetImage;\n}\n\n// Copy a rectangle from a Framebuffer or Texture object into a texture (at an offset)\n// eslint-disable-next-line complexity, max-statements\nexport function copyToTexture(source, target, options = {}) {\n const {\n sourceX = 0,\n sourceY = 0,\n // attachment = GL.COLOR_ATTACHMENT0, // TODO - support gl.readBuffer\n targetMipmaplevel = 0,\n targetInternalFormat = GL.RGBA\n } = options;\n let {\n targetX,\n targetY,\n targetZ,\n width, // defaults to target width\n height // defaults to target height\n } = options;\n\n const {framebuffer, deleteFramebuffer} = getFramebuffer(source);\n assert(framebuffer);\n const {gl, handle} = framebuffer;\n const isSubCopy =\n typeof targetX !== 'undefined' ||\n typeof targetY !== 'undefined' ||\n typeof targetZ !== 'undefined';\n targetX = targetX || 0;\n targetY = targetY || 0;\n targetZ = targetZ || 0;\n const prevHandle = gl.bindFramebuffer(GL.FRAMEBUFFER, handle);\n // TODO - support gl.readBuffer (WebGL2 only)\n // const prevBuffer = gl.readBuffer(attachment);\n assert(target);\n let texture = null;\n if (target instanceof Texture) {\n texture = target;\n width = Number.isFinite(width) ? width : texture.width;\n height = Number.isFinite(height) ? height : texture.height;\n texture.bind(0);\n target = texture.target;\n }\n\n if (!isSubCopy) {\n gl.copyTexImage2D(\n target,\n targetMipmaplevel,\n targetInternalFormat,\n sourceX,\n sourceY,\n width,\n height,\n 0 /* border must be 0 */\n );\n } else {\n switch (target) {\n case GL.TEXTURE_2D:\n case GL.TEXTURE_CUBE_MAP:\n gl.copyTexSubImage2D(\n target,\n targetMipmaplevel,\n targetX,\n targetY,\n sourceX,\n sourceY,\n width,\n height\n );\n break;\n case GL.TEXTURE_2D_ARRAY:\n case GL.TEXTURE_3D:\n const gl2 = assertWebGL2Context(gl);\n gl2.copyTexSubImage3D(\n target,\n targetMipmaplevel,\n targetX,\n targetY,\n targetZ,\n sourceX,\n sourceY,\n width,\n height\n );\n break;\n default:\n }\n }\n if (texture) {\n texture.unbind();\n }\n // @ts-ignore\n gl.bindFramebuffer(GL.FRAMEBUFFER, prevHandle || null);\n if (deleteFramebuffer) {\n framebuffer.delete();\n }\n return texture;\n}\n\n// NOTE: WEBLG2 only\n// Copies a rectangle of pixels between Framebuffer or Texture objects\n// eslint-disable-next-line max-statements, complexity\nexport function blit(source, target, options = {}) {\n const {\n sourceX0 = 0,\n sourceY0 = 0,\n targetX0 = 0,\n targetY0 = 0,\n color = true,\n depth = false,\n stencil = false,\n filter = GL.NEAREST\n } = options;\n\n let {\n sourceX1,\n sourceY1,\n targetX1,\n targetY1,\n sourceAttachment = GL.COLOR_ATTACHMENT0,\n mask = 0\n } = options;\n\n const {framebuffer: srcFramebuffer, deleteFramebuffer: deleteSrcFramebuffer} = getFramebuffer(\n source\n );\n const {framebuffer: dstFramebuffer, deleteFramebuffer: deleteDstFramebuffer} = getFramebuffer(\n target\n );\n\n assert(srcFramebuffer);\n assert(dstFramebuffer);\n // @ts-ignore\n const {gl, handle, width, height, readBuffer} = dstFramebuffer;\n const gl2 = assertWebGL2Context(gl);\n\n if (!srcFramebuffer.handle && sourceAttachment === GL.COLOR_ATTACHMENT0) {\n sourceAttachment = GL.FRONT;\n }\n\n if (color) {\n mask |= GL.COLOR_BUFFER_BIT;\n }\n if (depth) {\n mask |= GL.DEPTH_BUFFER_BIT;\n }\n if (stencil) {\n mask |= GL.STENCIL_BUFFER_BIT;\n }\n\n if (deleteSrcFramebuffer || deleteDstFramebuffer) {\n // Either source or destiantion was a texture object, which is wrapped in a Framebuffer objecgt as color attachment.\n // Overwrite the mask to `COLOR_BUFFER_BIT`\n if (mask & (GL.DEPTH_BUFFER_BIT | GL.STENCIL_BUFFER_BIT)) {\n mask = GL.COLOR_BUFFER_BIT;\n log.warn('Blitting from or into a Texture object, forcing mask to GL.COLOR_BUFFER_BIT')();\n }\n }\n assert(mask);\n\n sourceX1 = sourceX1 === undefined ? srcFramebuffer.width : sourceX1;\n sourceY1 = sourceY1 === undefined ? srcFramebuffer.height : sourceY1;\n targetX1 = targetX1 === undefined ? width : targetX1;\n targetY1 = targetY1 === undefined ? height : targetY1;\n\n const prevDrawHandle = gl.bindFramebuffer(GL.DRAW_FRAMEBUFFER, handle);\n const prevReadHandle = gl.bindFramebuffer(GL.READ_FRAMEBUFFER, srcFramebuffer.handle);\n gl2.readBuffer(sourceAttachment);\n gl2.blitFramebuffer(\n sourceX0,\n sourceY0,\n sourceX1,\n sourceY1,\n targetX0,\n targetY0,\n targetX1,\n targetY1,\n mask,\n filter\n );\n gl2.readBuffer(readBuffer);\n // @ts-ignore\n gl2.bindFramebuffer(GL.READ_FRAMEBUFFER, prevReadHandle || null);\n // @ts-ignore\n gl2.bindFramebuffer(GL.DRAW_FRAMEBUFFER, prevDrawHandle || null);\n if (deleteSrcFramebuffer) {\n srcFramebuffer.delete();\n }\n if (deleteDstFramebuffer) {\n dstFramebuffer.delete();\n }\n\n return dstFramebuffer;\n}\n\n// Helper methods\n\nfunction getFramebuffer(source) {\n if (!(source instanceof Framebuffer)) {\n return {framebuffer: toFramebuffer(source), deleteFramebuffer: true};\n }\n return {framebuffer: source, deleteFramebuffer: false};\n}\n\nfunction getPixelArray(pixelArray, type, format, width, height) {\n if (pixelArray) {\n return pixelArray;\n }\n // Allocate pixel array if not already available, using supplied type\n type = type || GL.UNSIGNED_BYTE;\n const ArrayType = getTypedArrayFromGLType(type, {clamped: false});\n const components = glFormatToComponents(format);\n // TODO - check for composite type (components = 1).\n return new ArrayType(width * height * components);\n}\n","const TYPE_DEFINITIONS = {\n number: {\n validate(value, propType) {\n return (\n Number.isFinite(value) &&\n (!('max' in propType) || value <= propType.max) &&\n (!('min' in propType) || value >= propType.min)\n );\n }\n },\n array: {\n validate(value, propType) {\n return Array.isArray(value) || ArrayBuffer.isView(value);\n }\n }\n};\n\nexport function parsePropTypes(propDefs) {\n const propTypes = {};\n for (const propName in propDefs) {\n const propDef = propDefs[propName];\n const propType = parsePropType(propDef);\n propTypes[propName] = propType;\n }\n return propTypes;\n}\n\n// Parses one property definition entry. Either contains:\n// * a valid prop type object ({type, ...})\n// * or just a default value, in which case type and name inference is used\nfunction parsePropType(propDef) {\n let type = getTypeOf(propDef);\n if (type === 'object') {\n if (!propDef) {\n return {type: 'object', value: null};\n }\n if ('type' in propDef) {\n return Object.assign({}, propDef, TYPE_DEFINITIONS[propDef.type]);\n }\n if (!('value' in propDef)) {\n // If no type and value this object is likely the value\n return {type: 'object', value: propDef};\n }\n type = getTypeOf(propDef.value);\n return Object.assign({type}, propDef, TYPE_DEFINITIONS[type]);\n }\n return Object.assign({type, value: propDef}, TYPE_DEFINITIONS[type]);\n}\n\n// improved version of javascript typeof that can distinguish arrays and null values\nfunction getTypeOf(value) {\n if (Array.isArray(value) || ArrayBuffer.isView(value)) {\n return 'array';\n }\n return typeof value;\n}\n","import {assert} from '../utils';\nimport {parsePropTypes} from './filters/prop-types';\n\nconst VERTEX_SHADER = 'vs';\nconst FRAGMENT_SHADER = 'fs';\n\nexport default class ShaderModule {\n constructor({\n name,\n vs,\n fs,\n dependencies = [],\n uniforms,\n getUniforms,\n deprecations = [],\n defines = {},\n inject = {},\n // DEPRECATED\n vertexShader,\n fragmentShader\n }) {\n assert(typeof name === 'string');\n this.name = name;\n this.vs = vs || vertexShader;\n this.fs = fs || fragmentShader;\n this.getModuleUniforms = getUniforms;\n this.dependencies = dependencies;\n this.deprecations = this._parseDeprecationDefinitions(deprecations);\n this.defines = defines;\n this.injections = normalizeInjections(inject);\n\n if (uniforms) {\n this.uniforms = parsePropTypes(uniforms);\n }\n }\n\n // Extracts the source code chunk for the specified shader type from the named shader module\n getModuleSource(type) {\n let moduleSource;\n switch (type) {\n case VERTEX_SHADER:\n moduleSource = this.vs || '';\n break;\n case FRAGMENT_SHADER:\n moduleSource = this.fs || '';\n break;\n default:\n assert(false);\n }\n\n return `\\\n#define MODULE_${this.name.toUpperCase().replace(/[^0-9a-z]/gi, '_')}\n${moduleSource}\\\n// END MODULE_${this.name}\n\n`;\n }\n\n getUniforms(opts, uniforms) {\n if (this.getModuleUniforms) {\n return this.getModuleUniforms(opts, uniforms);\n }\n // Build uniforms from the uniforms array\n if (this.uniforms) {\n return this._defaultGetUniforms(opts);\n }\n return {};\n }\n\n getDefines() {\n return this.defines;\n }\n\n // Warn about deprecated uniforms or functions\n checkDeprecations(shaderSource, log) {\n this.deprecations.forEach(def => {\n if (def.regex.test(shaderSource)) {\n if (def.deprecated) {\n log.deprecated(def.old, def.new)();\n } else {\n log.removed(def.old, def.new)();\n }\n }\n });\n }\n\n _parseDeprecationDefinitions(deprecations) {\n deprecations.forEach(def => {\n switch (def.type) {\n case 'function':\n def.regex = new RegExp(`\\\\b${def.old}\\\\(`);\n break;\n default:\n def.regex = new RegExp(`${def.type} ${def.old};`);\n }\n });\n\n return deprecations;\n }\n\n _defaultGetUniforms(opts = {}) {\n const uniforms = {};\n const propTypes = this.uniforms;\n\n for (const key in propTypes) {\n const propDef = propTypes[key];\n if (key in opts && !propDef.private) {\n if (propDef.validate) {\n assert(propDef.validate(opts[key], propDef), `${this.name}: invalid ${key}`);\n }\n uniforms[key] = opts[key];\n } else {\n uniforms[key] = propDef.value;\n }\n }\n\n return uniforms;\n }\n}\n\n// This utility mutates the original module\n// Keeping for backward compatibility\n// TODO - remove in v8\nexport function normalizeShaderModule(module) {\n if (!module.normalized) {\n module.normalized = true;\n if (module.uniforms && !module.getUniforms) {\n const shaderModule = new ShaderModule(module);\n module.getUniforms = shaderModule.getUniforms.bind(shaderModule);\n }\n }\n return module;\n}\n\nfunction normalizeInjections(injections) {\n const result = {\n vs: {},\n fs: {}\n };\n\n for (const hook in injections) {\n let injection = injections[hook];\n const stage = hook.slice(0, 2);\n\n if (typeof injection === 'string') {\n injection = {\n order: 0,\n injection\n };\n }\n\n result[stage][hook] = injection;\n }\n\n return result;\n}\n","import React from 'react';\nimport ThemeContext from './ThemeContext';\nexport default function useTheme() {\n var theme = React.useContext(ThemeContext);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n\n return theme;\n}","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _lodash = _interopRequireDefault(require(\"lodash.isequal\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _utils = require(\"./utils\");\n\nvar _calculateUtils = require(\"./calculateUtils\");\n\nvar _GridItem = _interopRequireDefault(require(\"./GridItem\"));\n\nvar _ReactGridLayoutPropTypes = _interopRequireDefault(require(\"./ReactGridLayoutPropTypes\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// End Types\nvar layoutClassName = \"react-grid-layout\";\nvar isFirefox = false; // Try...catch will protect from navigator not existing (e.g. node) or a bad implementation of navigator\n\ntry {\n isFirefox = /firefox/i.test(navigator.userAgent);\n} catch (e) {\n /* Ignore */\n}\n/**\n * A reactive, fluid grid layout with draggable, resizable components.\n */\n\n\nvar ReactGridLayout = /*#__PURE__*/function (_React$Component) {\n _inherits(ReactGridLayout, _React$Component);\n\n var _super = _createSuper(ReactGridLayout);\n\n // TODO publish internal ReactClass displayName transform\n // Refactored to another module to make way for preval\n function ReactGridLayout(props\n /*: Props*/\n , context\n /*: any*/\n )\n /*: void*/\n {\n var _this;\n\n _classCallCheck(this, ReactGridLayout);\n\n _this = _super.call(this, props, context);\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n activeDrag: null,\n layout: (0, _utils.synchronizeLayoutWithChildren)(_this.props.layout, _this.props.children, _this.props.cols, // Legacy support for verticalCompact: false\n (0, _utils.compactType)(_this.props)),\n mounted: false,\n oldDragItem: null,\n oldLayout: null,\n oldResizeItem: null,\n droppingDOMNode: null,\n children: []\n });\n\n _defineProperty(_assertThisInitialized(_this), \"dragEnterCounter\", 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragOver\", function (e\n /*: DragOverEvent*/\n ) {\n // we should ignore events from layout's children in Firefox\n // to avoid unpredictable jumping of a dropping placeholder\n // FIXME remove this hack\n if (isFirefox && e.nativeEvent.target.className.indexOf(layoutClassName) === -1) {\n return false;\n }\n\n var _this$props = _this.props,\n droppingItem = _this$props.droppingItem,\n margin = _this$props.margin,\n cols = _this$props.cols,\n rowHeight = _this$props.rowHeight,\n maxRows = _this$props.maxRows,\n width = _this$props.width,\n containerPadding = _this$props.containerPadding;\n var layout = _this.state.layout; // This is relative to the DOM element that this event fired for.\n\n var _e$nativeEvent = e.nativeEvent,\n layerX = _e$nativeEvent.layerX,\n layerY = _e$nativeEvent.layerY;\n var droppingPosition = {\n left: layerX,\n top: layerY,\n e: e\n };\n\n if (!_this.state.droppingDOMNode) {\n var positionParams\n /*: PositionParams*/\n = {\n cols: cols,\n margin: margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n containerWidth: width,\n containerPadding: containerPadding || margin\n };\n var calculatedPosition = (0, _calculateUtils.calcXY)(positionParams, layerY, layerX, droppingItem.w, droppingItem.h);\n\n _this.setState({\n droppingDOMNode: /*#__PURE__*/_react.default.createElement(\"div\", {\n key: droppingItem.i\n }),\n droppingPosition: droppingPosition,\n layout: [].concat(_toConsumableArray(layout), [_objectSpread(_objectSpread({}, droppingItem), {}, {\n x: calculatedPosition.x,\n y: calculatedPosition.y,\n static: false,\n isDraggable: true\n })])\n });\n } else if (_this.state.droppingPosition) {\n var _this$state$droppingP = _this.state.droppingPosition,\n left = _this$state$droppingP.left,\n top = _this$state$droppingP.top;\n var shouldUpdatePosition = left != layerX || top != layerY;\n\n if (shouldUpdatePosition) {\n _this.setState({\n droppingPosition: droppingPosition\n });\n }\n }\n\n e.stopPropagation();\n e.preventDefault();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"removeDroppingPlaceholder\", function () {\n var _this$props2 = _this.props,\n droppingItem = _this$props2.droppingItem,\n cols = _this$props2.cols;\n var layout = _this.state.layout;\n var newLayout = (0, _utils.compact)(layout.filter(function (l) {\n return l.i !== droppingItem.i;\n }), (0, _utils.compactType)(_this.props), cols);\n\n _this.setState({\n layout: newLayout,\n droppingDOMNode: null,\n activeDrag: null,\n droppingPosition: undefined\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragLeave\", function () {\n _this.dragEnterCounter--; // onDragLeave can be triggered on each layout's child.\n // But we know that count of dragEnter and dragLeave events\n // will be balanced after leaving the layout's container\n // so we can increase and decrease count of dragEnter and\n // when it'll be equal to 0 we'll remove the placeholder\n\n if (_this.dragEnterCounter === 0) {\n _this.removeDroppingPlaceholder();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragEnter\", function () {\n _this.dragEnterCounter++;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDrop\", function (e\n /*: Event*/\n ) {\n var droppingItem = _this.props.droppingItem;\n var layout = _this.state.layout;\n var item = layout.find(function (l) {\n return l.i === droppingItem.i;\n }); // reset gragEnter counter on drop\n\n _this.dragEnterCounter = 0;\n\n _this.removeDroppingPlaceholder();\n\n _this.props.onDrop(layout, item, e);\n });\n\n (0, _utils.autoBindHandlers)(_assertThisInitialized(_this), [\"onDragStart\", \"onDrag\", \"onDragStop\", \"onResizeStart\", \"onResize\", \"onResizeStop\"]);\n return _this;\n }\n\n _createClass(ReactGridLayout, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setState({\n mounted: true\n }); // Possibly call back with layout on mount. This should be done after correcting the layout width\n // to ensure we don't rerender with the wrong width.\n\n this.onLayoutMaybeChanged(this.state.layout, this.props.layout);\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps\n /*: Props*/\n , nextState\n /*: State*/\n ) {\n return (// NOTE: this is almost always unequal. Therefore the only way to get better performance\n // from SCU is if the user intentionally memoizes children. If they do, and they can\n // handle changes properly, performance will increase.\n this.props.children !== nextProps.children || !(0, _utils.fastRGLPropsEqual)(this.props, nextProps, _lodash.default) || this.state.activeDrag !== nextState.activeDrag || this.state.mounted !== nextState.mounted || this.state.droppingPosition !== nextState.droppingPosition\n );\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps\n /*: Props*/\n , prevState\n /*: State*/\n ) {\n if (!this.state.activeDrag) {\n var newLayout = this.state.layout;\n var oldLayout = prevState.layout;\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n }\n /**\n * Calculates a pixel value for the container.\n * @return {String} Container height in pixels.\n */\n\n }, {\n key: \"containerHeight\",\n value: function containerHeight() {\n if (!this.props.autoSize) return;\n var nbRow = (0, _utils.bottom)(this.state.layout);\n var containerPaddingY = this.props.containerPadding ? this.props.containerPadding[1] : this.props.margin[1];\n return nbRow * this.props.rowHeight + (nbRow - 1) * this.props.margin[1] + containerPaddingY * 2 + \"px\";\n }\n /**\n * When dragging starts\n * @param {String} i Id of the child\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n\n }, {\n key: \"onDragStart\",\n value: function onDragStart(i\n /*: string*/\n , x\n /*: number*/\n , y\n /*: number*/\n , _ref) {\n var e = _ref.e,\n node = _ref.node;\n var layout = this.state.layout;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n this.setState({\n oldDragItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: this.state.layout\n });\n return this.props.onDragStart(layout, l, l, null, e, node);\n }\n /**\n * Each drag movement create a new dragelement and move the element to the dragged location\n * @param {String} i Id of the child\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n\n }, {\n key: \"onDrag\",\n value: function onDrag(i\n /*: string*/\n , x\n /*: number*/\n , y\n /*: number*/\n , _ref2) {\n var e = _ref2.e,\n node = _ref2.node;\n var oldDragItem = this.state.oldDragItem;\n var layout = this.state.layout;\n var cols = this.props.cols;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return; // Create placeholder (display only)\n\n var placeholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n placeholder: true,\n i: i\n }; // Move the element to the dragged location.\n\n var isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, this.props.preventCollision, (0, _utils.compactType)(this.props), cols);\n this.props.onDrag(layout, oldDragItem, l, placeholder, e, node);\n this.setState({\n layout: (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols),\n activeDrag: placeholder\n });\n }\n /**\n * When dragging stops, figure out which position the element is closest to and update its x and y.\n * @param {String} i Index of the child.\n * @param {Number} x X position of the move\n * @param {Number} y Y position of the move\n * @param {Event} e The mousedown event\n * @param {Element} node The current dragging DOM element\n */\n\n }, {\n key: \"onDragStop\",\n value: function onDragStop(i\n /*: string*/\n , x\n /*: number*/\n , y\n /*: number*/\n , _ref3) {\n var e = _ref3.e,\n node = _ref3.node;\n if (!this.state.activeDrag) return;\n var oldDragItem = this.state.oldDragItem;\n var layout = this.state.layout;\n var _this$props3 = this.props,\n cols = _this$props3.cols,\n preventCollision = _this$props3.preventCollision;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return; // Move the element here\n\n var isUserAction = true;\n layout = (0, _utils.moveElement)(layout, l, x, y, isUserAction, preventCollision, (0, _utils.compactType)(this.props), cols);\n this.props.onDragStop(layout, oldDragItem, l, null, e, node); // Set state\n\n var newLayout = (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols);\n var oldLayout = this.state.oldLayout;\n this.setState({\n activeDrag: null,\n layout: newLayout,\n oldDragItem: null,\n oldLayout: null\n });\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n }, {\n key: \"onLayoutMaybeChanged\",\n value: function onLayoutMaybeChanged(newLayout\n /*: Layout*/\n , oldLayout\n /*: ?Layout*/\n ) {\n if (!oldLayout) oldLayout = this.state.layout;\n\n if (!(0, _lodash.default)(oldLayout, newLayout)) {\n this.props.onLayoutChange(newLayout);\n }\n }\n }, {\n key: \"onResizeStart\",\n value: function onResizeStart(i\n /*: string*/\n , w\n /*: number*/\n , h\n /*: number*/\n , _ref4) {\n var e = _ref4.e,\n node = _ref4.node;\n var layout = this.state.layout;\n var l = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return;\n this.setState({\n oldResizeItem: (0, _utils.cloneLayoutItem)(l),\n oldLayout: this.state.layout\n });\n this.props.onResizeStart(layout, l, l, null, e, node);\n }\n }, {\n key: \"onResize\",\n value: function onResize(i\n /*: string*/\n , w\n /*: number*/\n , h\n /*: number*/\n , _ref5) {\n var e = _ref5.e,\n node = _ref5.node;\n var _this$state = this.state,\n layout = _this$state.layout,\n oldResizeItem = _this$state.oldResizeItem;\n var _this$props4 = this.props,\n cols = _this$props4.cols,\n preventCollision = _this$props4.preventCollision;\n var l\n /*: ?LayoutItem*/\n = (0, _utils.getLayoutItem)(layout, i);\n if (!l) return; // Something like quad tree should be used\n // to find collisions faster\n\n var hasCollisions;\n\n if (preventCollision) {\n var collisions = (0, _utils.getAllCollisions)(layout, _objectSpread(_objectSpread({}, l), {}, {\n w: w,\n h: h\n })).filter(function (layoutItem) {\n return layoutItem.i !== l.i;\n });\n hasCollisions = collisions.length > 0; // If we're colliding, we need adjust the placeholder.\n\n if (hasCollisions) {\n // adjust w && h to maximum allowed space\n var leastX = Infinity,\n leastY = Infinity;\n collisions.forEach(function (layoutItem) {\n if (layoutItem.x > l.x) leastX = Math.min(leastX, layoutItem.x);\n if (layoutItem.y > l.y) leastY = Math.min(leastY, layoutItem.y);\n });\n if (Number.isFinite(leastX)) l.w = leastX - l.x;\n if (Number.isFinite(leastY)) l.h = leastY - l.y;\n }\n }\n\n if (!hasCollisions) {\n // Set new width and height.\n l.w = w;\n l.h = h;\n } // Create placeholder element (display only)\n\n\n var placeholder = {\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n static: true,\n i: i\n };\n this.props.onResize(layout, oldResizeItem, l, placeholder, e, node); // Re-compact the layout and set the drag placeholder.\n\n this.setState({\n layout: (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols),\n activeDrag: placeholder\n });\n }\n }, {\n key: \"onResizeStop\",\n value: function onResizeStop(i\n /*: string*/\n , w\n /*: number*/\n , h\n /*: number*/\n , _ref6) {\n var e = _ref6.e,\n node = _ref6.node;\n var _this$state2 = this.state,\n layout = _this$state2.layout,\n oldResizeItem = _this$state2.oldResizeItem;\n var cols = this.props.cols;\n var l = (0, _utils.getLayoutItem)(layout, i);\n this.props.onResizeStop(layout, oldResizeItem, l, null, e, node); // Set state\n\n var newLayout = (0, _utils.compact)(layout, (0, _utils.compactType)(this.props), cols);\n var oldLayout = this.state.oldLayout;\n this.setState({\n activeDrag: null,\n layout: newLayout,\n oldResizeItem: null,\n oldLayout: null\n });\n this.onLayoutMaybeChanged(newLayout, oldLayout);\n }\n /**\n * Create a placeholder object.\n * @return {Element} Placeholder div.\n */\n\n }, {\n key: \"placeholder\",\n value: function placeholder()\n /*: ?ReactElement<any>*/\n {\n var activeDrag = this.state.activeDrag;\n if (!activeDrag) return null;\n var _this$props5 = this.props,\n width = _this$props5.width,\n cols = _this$props5.cols,\n margin = _this$props5.margin,\n containerPadding = _this$props5.containerPadding,\n rowHeight = _this$props5.rowHeight,\n maxRows = _this$props5.maxRows,\n useCSSTransforms = _this$props5.useCSSTransforms,\n transformScale = _this$props5.transformScale; // {...this.state.activeDrag} is pretty slow, actually\n\n return /*#__PURE__*/_react.default.createElement(_GridItem.default, {\n w: activeDrag.w,\n h: activeDrag.h,\n x: activeDrag.x,\n y: activeDrag.y,\n i: activeDrag.i,\n className: \"react-grid-placeholder\",\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n isDraggable: false,\n isResizable: false,\n isBounded: false,\n useCSSTransforms: useCSSTransforms,\n transformScale: transformScale\n }, /*#__PURE__*/_react.default.createElement(\"div\", null));\n }\n /**\n * Given a grid item, set its style attributes & surround in a <Draggable>.\n * @param {Element} child React element.\n * @return {Element} Element wrapped in draggable and properly placed.\n */\n\n }, {\n key: \"processGridItem\",\n value: function processGridItem(child\n /*: ReactElement<any>*/\n , isDroppingItem\n /*: boolean*/\n )\n /*: ?ReactElement<any>*/\n {\n if (!child || !child.key) return;\n var l = (0, _utils.getLayoutItem)(this.state.layout, String(child.key));\n if (!l) return null;\n var _this$props6 = this.props,\n width = _this$props6.width,\n cols = _this$props6.cols,\n margin = _this$props6.margin,\n containerPadding = _this$props6.containerPadding,\n rowHeight = _this$props6.rowHeight,\n maxRows = _this$props6.maxRows,\n isDraggable = _this$props6.isDraggable,\n isResizable = _this$props6.isResizable,\n isBounded = _this$props6.isBounded,\n useCSSTransforms = _this$props6.useCSSTransforms,\n transformScale = _this$props6.transformScale,\n draggableCancel = _this$props6.draggableCancel,\n draggableHandle = _this$props6.draggableHandle,\n resizeHandles = _this$props6.resizeHandles;\n var _this$state3 = this.state,\n mounted = _this$state3.mounted,\n droppingPosition = _this$state3.droppingPosition; // Determine user manipulations possible.\n // If an item is static, it can't be manipulated by default.\n // Any properties defined directly on the grid item will take precedence.\n\n var draggable = typeof l.isDraggable === \"boolean\" ? l.isDraggable : !l.static && isDraggable;\n var resizable = typeof l.isResizable === \"boolean\" ? l.isResizable : !l.static && isResizable;\n var resizeHandlesOptions = l.resizeHandles || resizeHandles; // isBounded set on child if set on parent, and child is not explicitly false\n\n var bounded = draggable && isBounded && l.isBounded !== false;\n return /*#__PURE__*/_react.default.createElement(_GridItem.default, {\n containerWidth: width,\n cols: cols,\n margin: margin,\n containerPadding: containerPadding || margin,\n maxRows: maxRows,\n rowHeight: rowHeight,\n cancel: draggableCancel,\n handle: draggableHandle,\n onDragStop: this.onDragStop,\n onDragStart: this.onDragStart,\n onDrag: this.onDrag,\n onResizeStart: this.onResizeStart,\n onResize: this.onResize,\n onResizeStop: this.onResizeStop,\n isDraggable: draggable,\n isResizable: resizable,\n isBounded: bounded,\n useCSSTransforms: useCSSTransforms && mounted,\n usePercentages: !mounted,\n transformScale: transformScale,\n w: l.w,\n h: l.h,\n x: l.x,\n y: l.y,\n i: l.i,\n minH: l.minH,\n minW: l.minW,\n maxH: l.maxH,\n maxW: l.maxW,\n static: l.static,\n droppingPosition: isDroppingItem ? droppingPosition : undefined,\n resizeHandles: resizeHandlesOptions\n }, child);\n } // Called while dragging an element. Part of browser native drag/drop API.\n // Native event target might be the layout itself, or an element within the layout.\n\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props7 = this.props,\n className = _this$props7.className,\n style = _this$props7.style,\n isDroppable = _this$props7.isDroppable,\n innerRef = _this$props7.innerRef;\n var mergedClassName = (0, _classnames.default)(layoutClassName, className);\n\n var mergedStyle = _objectSpread({\n height: this.containerHeight()\n }, style);\n\n return /*#__PURE__*/_react.default.createElement(\"div\", {\n ref: innerRef,\n className: mergedClassName,\n style: mergedStyle,\n onDrop: isDroppable ? this.onDrop : _utils.noop,\n onDragLeave: isDroppable ? this.onDragLeave : _utils.noop,\n onDragEnter: isDroppable ? this.onDragEnter : _utils.noop,\n onDragOver: isDroppable ? this.onDragOver : _utils.noop\n }, _react.default.Children.map(this.props.children, function (child) {\n return _this2.processGridItem(child);\n }), isDroppable && this.state.droppingDOMNode && this.processGridItem(this.state.droppingDOMNode, true), this.placeholder());\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps\n /*: Props*/\n , prevState\n /*: State*/\n ) {\n var newLayoutBase;\n\n if (prevState.activeDrag) {\n return null;\n } // Legacy support for compactType\n // Allow parent to set layout directly.\n\n\n if (!(0, _lodash.default)(nextProps.layout, prevState.propsLayout) || nextProps.compactType !== prevState.compactType) {\n newLayoutBase = nextProps.layout;\n } else if (!(0, _utils.childrenEqual)(nextProps.children, prevState.children)) {\n // If children change, also regenerate the layout. Use our state\n // as the base in case because it may be more up to date than\n // what is in props.\n newLayoutBase = prevState.layout;\n } // We need to regenerate the layout.\n\n\n if (newLayoutBase) {\n var newLayout = (0, _utils.synchronizeLayoutWithChildren)(newLayoutBase, nextProps.children, nextProps.cols, (0, _utils.compactType)(nextProps));\n return {\n layout: newLayout,\n // We need to save these props to state for using\n // getDerivedStateFromProps instead of componentDidMount (in which we would get extra rerender)\n compactType: nextProps.compactType,\n children: nextProps.children,\n propsLayout: nextProps.layout\n };\n }\n\n return null;\n }\n }]);\n\n return ReactGridLayout;\n}(_react.default.Component);\n\nexports.default = ReactGridLayout;\n\n_defineProperty(ReactGridLayout, \"displayName\", \"ReactGridLayout\");\n\n_defineProperty(ReactGridLayout, \"propTypes\", _ReactGridLayoutPropTypes.default);\n\n_defineProperty(ReactGridLayout, \"defaultProps\", {\n autoSize: true,\n cols: 12,\n className: \"\",\n style: {},\n draggableHandle: \"\",\n draggableCancel: \"\",\n containerPadding: null,\n rowHeight: 150,\n maxRows: Infinity,\n // infinite vertical growth\n layout: [],\n margin: [10, 10],\n isBounded: false,\n isDraggable: true,\n isResizable: true,\n isDroppable: false,\n useCSSTransforms: true,\n transformScale: 1,\n verticalCompact: true,\n compactType: \"vertical\",\n preventCollision: false,\n droppingItem: {\n i: \"__dropping-elem__\",\n h: 1,\n w: 1\n },\n resizeHandles: [\"se\"],\n onLayoutChange: _utils.noop,\n onDragStart: _utils.noop,\n onDrag: _utils.noop,\n onDragStop: _utils.noop,\n onResizeStart: _utils.noop,\n onResize: _utils.noop,\n onResizeStop: _utils.noop,\n onDrop: _utils.noop\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.calcGridColWidth = calcGridColWidth;\nexports.calcGridItemWHPx = calcGridItemWHPx;\nexports.calcGridItemPosition = calcGridItemPosition;\nexports.calcXY = calcXY;\nexports.calcWH = calcWH;\nexports.clamp = clamp;\n\n/*:: import type { Position } from \"./utils\";*/\n\n/*:: export type PositionParams = {\n margin: [number, number],\n containerPadding: [number, number],\n containerWidth: number,\n cols: number,\n rowHeight: number,\n maxRows: number\n};*/\n// Helper for generating column width\nfunction calcGridColWidth(positionParams\n/*: PositionParams*/\n)\n/*: number*/\n{\n var margin = positionParams.margin,\n containerPadding = positionParams.containerPadding,\n containerWidth = positionParams.containerWidth,\n cols = positionParams.cols;\n return (containerWidth - margin[0] * (cols - 1) - containerPadding[0] * 2) / cols;\n} // This can either be called:\n// calcGridItemWHPx(w, colWidth, margin[0])\n// or\n// calcGridItemWHPx(h, rowHeight, margin[1])\n\n\nfunction calcGridItemWHPx(gridUnits\n/*: number*/\n, colOrRowSize\n/*: number*/\n, marginPx\n/*: number*/\n) {\n // 0 * Infinity === NaN, which causes problems with resize contraints\n if (!Number.isFinite(gridUnits)) return gridUnits;\n return Math.round(colOrRowSize * gridUnits + Math.max(0, gridUnits - 1) * marginPx);\n}\n/**\n * Return position on the page given an x, y, w, h.\n * left, top, width, height are all in pixels.\n * @param {PositionParams} positionParams Parameters of grid needed for coordinates calculations.\n * @param {Number} x X coordinate in grid units.\n * @param {Number} y Y coordinate in grid units.\n * @param {Number} w W coordinate in grid units.\n * @param {Number} h H coordinate in grid units.\n * @return {Position} Object containing coords.\n */\n\n\nfunction calcGridItemPosition(positionParams\n/*: PositionParams*/\n, x\n/*: number*/\n, y\n/*: number*/\n, w\n/*: number*/\n, h\n/*: number*/\n, state\n/*: ?Object*/\n)\n/*: Position*/\n{\n var margin = positionParams.margin,\n containerPadding = positionParams.containerPadding,\n rowHeight = positionParams.rowHeight;\n var colWidth = calcGridColWidth(positionParams);\n var out = {}; // If resizing, use the exact width and height as returned from resizing callbacks.\n\n if (state && state.resizing) {\n out.width = Math.round(state.resizing.width);\n out.height = Math.round(state.resizing.height);\n } // Otherwise, calculate from grid units.\n else {\n out.width = calcGridItemWHPx(w, colWidth, margin[0]);\n out.height = calcGridItemWHPx(h, rowHeight, margin[1]);\n } // If dragging, use the exact width and height as returned from dragging callbacks.\n\n\n if (state && state.dragging) {\n out.top = Math.round(state.dragging.top);\n out.left = Math.round(state.dragging.left);\n } // Otherwise, calculate from grid units.\n else {\n out.top = Math.round((rowHeight + margin[1]) * y + containerPadding[1]);\n out.left = Math.round((colWidth + margin[0]) * x + containerPadding[0]);\n }\n\n return out;\n}\n/**\n * Translate x and y coordinates from pixels to grid units.\n * @param {PositionParams} positionParams Parameters of grid needed for coordinates calculations.\n * @param {Number} top Top position (relative to parent) in pixels.\n * @param {Number} left Left position (relative to parent) in pixels.\n * @param {Number} w W coordinate in grid units.\n * @param {Number} h H coordinate in grid units.\n * @return {Object} x and y in grid units.\n */\n\n\nfunction calcXY(positionParams\n/*: PositionParams*/\n, top\n/*: number*/\n, left\n/*: number*/\n, w\n/*: number*/\n, h\n/*: number*/\n)\n/*: { x: number, y: number }*/\n{\n var margin = positionParams.margin,\n cols = positionParams.cols,\n rowHeight = positionParams.rowHeight,\n maxRows = positionParams.maxRows;\n var colWidth = calcGridColWidth(positionParams); // left = colWidth * x + margin * (x + 1)\n // l = cx + m(x+1)\n // l = cx + mx + m\n // l - m = cx + mx\n // l - m = x(c + m)\n // (l - m) / (c + m) = x\n // x = (left - margin) / (coldWidth + margin)\n\n var x = Math.round((left - margin[0]) / (colWidth + margin[0]));\n var y = Math.round((top - margin[1]) / (rowHeight + margin[1])); // Capping\n\n x = clamp(x, 0, cols - w);\n y = clamp(y, 0, maxRows - h);\n return {\n x: x,\n y: y\n };\n}\n/**\n * Given a height and width in pixel values, calculate grid units.\n * @param {PositionParams} positionParams Parameters of grid needed for coordinates calcluations.\n * @param {Number} height Height in pixels.\n * @param {Number} width Width in pixels.\n * @param {Number} x X coordinate in grid units.\n * @param {Number} y Y coordinate in grid units.\n * @return {Object} w, h as grid units.\n */\n\n\nfunction calcWH(positionParams\n/*: PositionParams*/\n, width\n/*: number*/\n, height\n/*: number*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: { w: number, h: number }*/\n{\n var margin = positionParams.margin,\n maxRows = positionParams.maxRows,\n cols = positionParams.cols,\n rowHeight = positionParams.rowHeight;\n var colWidth = calcGridColWidth(positionParams); // width = colWidth * w - (margin * (w - 1))\n // ...\n // w = (width + margin) / (colWidth + margin)\n\n var w = Math.round((width + margin[0]) / (colWidth + margin[0]));\n var h = Math.round((height + margin[1]) / (rowHeight + margin[1])); // Capping\n\n w = clamp(w, 0, cols - x);\n h = clamp(h, 0, maxRows - y);\n return {\n w: w,\n h: h\n };\n} // Similar to _.clamp\n\n\nfunction clamp(num\n/*: number*/\n, lowerBound\n/*: number*/\n, upperBound\n/*: number*/\n) {\n return Math.max(Math.min(num, upperBound), lowerBound);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getBoundPosition = getBoundPosition;\nexports.snapToGrid = snapToGrid;\nexports.canDragX = canDragX;\nexports.canDragY = canDragY;\nexports.getControlPosition = getControlPosition;\nexports.createCoreData = createCoreData;\nexports.createDraggableData = createDraggableData;\n\nvar _shims = require(\"./shims\");\n\nvar _domFns = require(\"./domFns\");\n\nfunction getBoundPosition(draggable\n/*: Draggable*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: [number, number]*/\n{\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y]; // Clone new bounds\n\n var bounds = draggable.props.bounds;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n var node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n var ownerDocument = node.ownerDocument;\n var ownerWindow = ownerDocument.defaultView;\n var boundNode;\n\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n\n var nodeStyle = ownerWindow.getComputedStyle(node);\n var boundNodeStyle = ownerWindow.getComputedStyle(boundNode); // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n\n bounds = {\n left: -node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),\n top: -node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),\n right: (0, _domFns.innerWidth)(boundNode) - (0, _domFns.outerWidth)(node) - node.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),\n bottom: (0, _domFns.innerHeight)(boundNode) - (0, _domFns.outerHeight)(node) - node.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)\n };\n } // Keep x and y below right and bottom limits...\n\n\n if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);\n if ((0, _shims.isNum)(bounds.bottom)) y = Math.min(y, bounds.bottom); // But above left and top limits.\n\n if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);\n if ((0, _shims.isNum)(bounds.top)) y = Math.max(y, bounds.top);\n return [x, y];\n}\n\nfunction snapToGrid(grid\n/*: [number, number]*/\n, pendingX\n/*: number*/\n, pendingY\n/*: number*/\n)\n/*: [number, number]*/\n{\n var x = Math.round(pendingX / grid[0]) * grid[0];\n var y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nfunction canDragX(draggable\n/*: Draggable*/\n)\n/*: boolean*/\n{\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nfunction canDragY(draggable\n/*: Draggable*/\n)\n/*: boolean*/\n{\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n} // Get {x, y} positions from event.\n\n\nfunction getControlPosition(e\n/*: MouseTouchEvent*/\n, touchIdentifier\n/*: ?number*/\n, draggableCore\n/*: DraggableCore*/\n)\n/*: ?ControlPosition*/\n{\n var touchObj = typeof touchIdentifier === 'number' ? (0, _domFns.getTouch)(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n\n var node = findDOMNode(draggableCore); // User can provide an offsetParent if desired.\n\n var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return (0, _domFns.offsetXYFromParent)(touchObj || e, offsetParent, draggableCore.props.scale);\n} // Create an data object exposed by <DraggableCore>'s events\n\n\nfunction createCoreData(draggable\n/*: DraggableCore*/\n, x\n/*: number*/\n, y\n/*: number*/\n)\n/*: DraggableData*/\n{\n var state = draggable.state;\n var isStart = !(0, _shims.isNum)(state.lastX);\n var node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node: node,\n deltaX: 0,\n deltaY: 0,\n lastX: x,\n lastY: y,\n x: x,\n y: y\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node: node,\n deltaX: x - state.lastX,\n deltaY: y - state.lastY,\n lastX: state.lastX,\n lastY: state.lastY,\n x: x,\n y: y\n };\n }\n} // Create an data exposed by <Draggable>'s events\n\n\nfunction createDraggableData(draggable\n/*: Draggable*/\n, coreData\n/*: DraggableData*/\n)\n/*: DraggableData*/\n{\n var scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + coreData.deltaX / scale,\n y: draggable.state.y + coreData.deltaY / scale,\n deltaX: coreData.deltaX / scale,\n deltaY: coreData.deltaY / scale,\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n} // A lot faster than stringify/parse\n\n\nfunction cloneBounds(bounds\n/*: Bounds*/\n)\n/*: Bounds*/\n{\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable\n/*: Draggable | DraggableCore*/\n)\n/*: HTMLElement*/\n{\n var node = draggable.findDOMNode();\n\n if (!node) {\n throw new Error('<DraggableCore>: Unmounted during event!');\n } // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n\n\n return node;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = log;\n\n/*eslint no-console:0*/\nfunction log() {\n var _console;\n\n if (undefined) (_console = console).log.apply(_console, arguments);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDraggable = require(\"react-draggable\");\n\nvar _utils = require(\"./utils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Resizable =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Resizable, _React$Component);\n\n function Resizable() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n slackW: 0,\n slackH: 0\n });\n\n return _this;\n }\n\n var _proto = Resizable.prototype;\n\n _proto.lockAspectRatio = function lockAspectRatio(width, height, aspectRatio) {\n height = width / aspectRatio;\n width = height * aspectRatio;\n return [width, height];\n } // If you do this, be careful of constraints\n ;\n\n _proto.runConstraints = function runConstraints(width, height) {\n var _ref = [this.props.minConstraints, this.props.maxConstraints],\n min = _ref[0],\n max = _ref[1];\n if (!min && !max) return [width, height]; // Fit width & height to aspect ratio\n\n if (this.props.lockAspectRatio) {\n if (height === this.props.height) {\n var ratio = this.props.width / this.props.height;\n height = width / ratio;\n width = height * ratio;\n } else {\n // Take into account vertical resize with N/S handles on locked aspect\n // ratio. Calculate the change height-first, instead of width-first\n var _ratio = this.props.height / this.props.width;\n\n width = height / _ratio;\n height = width * _ratio;\n }\n }\n\n var oldW = width,\n oldH = height; // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n\n var _this$state = this.state,\n slackW = _this$state.slackW,\n slackH = _this$state.slackH;\n width += slackW;\n height += slackH;\n\n if (min) {\n width = Math.max(min[0], width);\n height = Math.max(min[1], height);\n }\n\n if (max) {\n width = Math.min(max[0], width);\n height = Math.min(max[1], height);\n } // If the numbers changed, we must have introduced some slack. Record it for the next iteration.\n\n\n slackW += oldW - width;\n slackH += oldH - height;\n\n if (slackW !== this.state.slackW || slackH !== this.state.slackH) {\n this.setState({\n slackW: slackW,\n slackH: slackH\n });\n }\n\n return [width, height];\n }\n /**\n * Wrapper around drag events to provide more useful data.\n *\n * @param {String} handlerName Handler name to wrap.\n * @return {Function} Handler function.\n */\n ;\n\n _proto.resizeHandler = function resizeHandler(handlerName, axis) {\n var _this2 = this;\n\n return function (e, _ref2) {\n var node = _ref2.node,\n deltaX = _ref2.deltaX,\n deltaY = _ref2.deltaY;\n deltaX /= _this2.props.transformScale;\n deltaY /= _this2.props.transformScale; // Axis restrictions\n\n var canDragX = (_this2.props.axis === 'both' || _this2.props.axis === 'x') && ['n', 's'].indexOf(axis) === -1;\n var canDragY = (_this2.props.axis === 'both' || _this2.props.axis === 'y') && ['e', 'w'].indexOf(axis) === -1; // reverse delta if using top or left drag handles\n\n if (canDragX && axis[axis.length - 1] === 'w') {\n deltaX = -deltaX;\n }\n\n if (canDragY && axis[0] === 'n') {\n deltaY = -deltaY;\n } // Update w/h\n\n\n var width = _this2.props.width + (canDragX ? deltaX : 0);\n var height = _this2.props.height + (canDragY ? deltaY : 0); // Early return if no change\n\n var widthChanged = width !== _this2.props.width,\n heightChanged = height !== _this2.props.height;\n if (handlerName === 'onResize' && !widthChanged && !heightChanged) return;\n\n var _this2$runConstraints = _this2.runConstraints(width, height);\n\n width = _this2$runConstraints[0];\n height = _this2$runConstraints[1];\n // Set the appropriate state for this handler.\n var newState = {};\n\n if (handlerName === 'onResizeStart') {// nothing\n } else if (handlerName === 'onResizeStop') {\n newState.slackW = newState.slackH = 0;\n } else {\n // Early return if no change after constraints\n if (width === _this2.props.width && height === _this2.props.height) return;\n }\n\n var hasCb = typeof _this2.props[handlerName] === 'function';\n\n if (hasCb) {\n // $FlowIgnore isn't refining this correctly to SyntheticEvent\n if (typeof e.persist === 'function') e.persist();\n\n _this2.setState(newState, function () {\n return _this2.props[handlerName](e, {\n node: node,\n size: {\n width: width,\n height: height\n },\n handle: axis\n });\n });\n } else {\n _this2.setState(newState);\n }\n };\n };\n\n _proto.renderResizeHandle = function renderResizeHandle(resizeHandle) {\n var handle = this.props.handle;\n\n if (handle) {\n if (typeof handle === 'function') {\n return handle(resizeHandle);\n }\n\n return handle;\n }\n\n return _react.default.createElement(\"span\", {\n className: \"react-resizable-handle react-resizable-handle-\" + resizeHandle\n });\n };\n\n _proto.render = function render() {\n var _this3 = this;\n\n // eslint-disable-next-line no-unused-vars\n var _this$props = this.props,\n children = _this$props.children,\n draggableOpts = _this$props.draggableOpts,\n width = _this$props.width,\n height = _this$props.height,\n handleSize = _this$props.handleSize,\n lockAspectRatio = _this$props.lockAspectRatio,\n axis = _this$props.axis,\n minConstraints = _this$props.minConstraints,\n maxConstraints = _this$props.maxConstraints,\n onResize = _this$props.onResize,\n onResizeStop = _this$props.onResizeStop,\n onResizeStart = _this$props.onResizeStart,\n resizeHandles = _this$props.resizeHandles,\n transformScale = _this$props.transformScale,\n p = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"draggableOpts\", \"width\", \"height\", \"handleSize\", \"lockAspectRatio\", \"axis\", \"minConstraints\", \"maxConstraints\", \"onResize\", \"onResizeStop\", \"onResizeStart\", \"resizeHandles\", \"transformScale\"]);\n\n var className = p.className ? p.className + \" react-resizable\" : 'react-resizable'; // What we're doing here is getting the child of this element, and cloning it with this element's props.\n // We are then defining its children as:\n // Its original children (resizable's child's children), and\n // One or more draggable handles.\n\n return (0, _utils.cloneElement)(children, _objectSpread({}, p, {\n className: className,\n children: [children.props.children, resizeHandles.map(function (h) {\n return _react.default.createElement(_reactDraggable.DraggableCore, _extends({}, draggableOpts, {\n key: \"resizableHandle-\" + h,\n onStop: _this3.resizeHandler('onResizeStop', h),\n onStart: _this3.resizeHandler('onResizeStart', h),\n onDrag: _this3.resizeHandler('onResize', h)\n }), _this3.renderResizeHandle(h));\n })]\n }));\n };\n\n return Resizable;\n}(_react.default.Component);\n\nexports.default = Resizable;\n\n_defineProperty(Resizable, \"propTypes\", {\n //\n // Required Props\n //\n // Require that one and only one child be present.\n children: _propTypes.default.element.isRequired,\n // Initial w/h\n width: _propTypes.default.number.isRequired,\n height: _propTypes.default.number.isRequired,\n //\n // Optional props\n //\n // Custom resize handle\n handle: _propTypes.default.element,\n // If you change this, be sure to update your css\n handleSize: _propTypes.default.array,\n // Defines which resize handles should be rendered (default: 'se')\n // Allows for any combination of:\n // 's' - South handle (bottom-center)\n // 'w' - West handle (left-center)\n // 'e' - East handle (right-center)\n // 'n' - North handle (top-center)\n // 'sw' - Southwest handle (bottom-left)\n // 'nw' - Northwest handle (top-left)\n // 'se' - Southeast handle (bottom-right)\n // 'ne' - Northeast handle (top-center)\n resizeHandles: _propTypes.default.arrayOf(_propTypes.default.oneOf(['s', 'w', 'e', 'n', 'sw', 'nw', 'se', 'ne'])),\n transformScale: _propTypes.default.number,\n // If true, will only allow width/height to move in lockstep\n lockAspectRatio: _propTypes.default.bool,\n // Restricts resizing to a particular axis (default: 'both')\n // 'both' - allows resizing by width or height\n // 'x' - only allows the width to be changed\n // 'y' - only allows the height to be changed\n // 'none' - disables resizing altogether\n axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n // Min/max size\n minConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n maxConstraints: _propTypes.default.arrayOf(_propTypes.default.number),\n // Callbacks\n onResizeStop: _propTypes.default.func,\n onResizeStart: _propTypes.default.func,\n onResize: _propTypes.default.func,\n // These will be passed wholesale to react-draggable's DraggableCore\n draggableOpts: _propTypes.default.object\n});\n\n_defineProperty(Resizable, \"defaultProps\", {\n handleSize: [20, 20],\n lockAspectRatio: false,\n axis: 'both',\n minConstraints: [20, 20],\n maxConstraints: [Infinity, Infinity],\n resizeHandles: ['se'],\n transformScale: 1\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getBreakpointFromWidth = getBreakpointFromWidth;\nexports.getColsFromBreakpoint = getColsFromBreakpoint;\nexports.findOrGenerateResponsiveLayout = findOrGenerateResponsiveLayout;\nexports.sortBreakpoints = sortBreakpoints;\n\nvar _utils = require(\"./utils\");\n\n/**\n * Given a width, find the highest breakpoint that matches is valid for it (width > breakpoint).\n *\n * @param {Object} breakpoints Breakpoints object (e.g. {lg: 1200, md: 960, ...})\n * @param {Number} width Screen width.\n * @return {String} Highest breakpoint that is less than width.\n */\nfunction getBreakpointFromWidth(breakpoints\n/*: Breakpoints<Breakpoint>*/\n, width\n/*: number*/\n)\n/*: Breakpoint*/\n{\n var sorted = sortBreakpoints(breakpoints);\n var matching = sorted[0];\n\n for (var i = 1, len = sorted.length; i < len; i++) {\n var breakpointName = sorted[i];\n if (width > breakpoints[breakpointName]) matching = breakpointName;\n }\n\n return matching;\n}\n/**\n * Given a breakpoint, get the # of cols set for it.\n * @param {String} breakpoint Breakpoint name.\n * @param {Object} cols Map of breakpoints to cols.\n * @return {Number} Number of cols.\n */\n\n\nfunction getColsFromBreakpoint(breakpoint\n/*: Breakpoint*/\n, cols\n/*: Breakpoints<Breakpoint>*/\n)\n/*: number*/\n{\n if (!cols[breakpoint]) {\n throw new Error(\"ResponsiveReactGridLayout: `cols` entry for breakpoint \" + breakpoint + \" is missing!\");\n }\n\n return cols[breakpoint];\n}\n/**\n * Given existing layouts and a new breakpoint, find or generate a new layout.\n *\n * This finds the layout above the new one and generates from it, if it exists.\n *\n * @param {Object} layouts Existing layouts.\n * @param {Array} breakpoints All breakpoints.\n * @param {String} breakpoint New breakpoint.\n * @param {String} breakpoint Last breakpoint (for fallback).\n * @param {Number} cols Column count at new breakpoint.\n * @param {Boolean} verticalCompact Whether or not to compact the layout\n * vertically.\n * @return {Array} New layout.\n */\n\n\nfunction findOrGenerateResponsiveLayout(layouts\n/*: ResponsiveLayout<Breakpoint>*/\n, breakpoints\n/*: Breakpoints<Breakpoint>*/\n, breakpoint\n/*: Breakpoint*/\n, lastBreakpoint\n/*: Breakpoint*/\n, cols\n/*: number*/\n, compactType\n/*: CompactType*/\n)\n/*: Layout*/\n{\n // If it already exists, just return it.\n if (layouts[breakpoint]) return (0, _utils.cloneLayout)(layouts[breakpoint]); // Find or generate the next layout\n\n var layout = layouts[lastBreakpoint];\n var breakpointsSorted = sortBreakpoints(breakpoints);\n var breakpointsAbove = breakpointsSorted.slice(breakpointsSorted.indexOf(breakpoint));\n\n for (var i = 0, len = breakpointsAbove.length; i < len; i++) {\n var b = breakpointsAbove[i];\n\n if (layouts[b]) {\n layout = layouts[b];\n break;\n }\n }\n\n layout = (0, _utils.cloneLayout)(layout || []); // clone layout so we don't modify existing items\n\n return (0, _utils.compact)((0, _utils.correctBounds)(layout, {\n cols: cols\n }), compactType, cols);\n}\n/**\n * Given breakpoints, return an array of breakpoints sorted by width. This is usually\n * e.g. ['xxs', 'xs', 'sm', ...]\n *\n * @param {Object} breakpoints Key/value pair of breakpoint names to widths.\n * @return {Array} Sorted breakpoints.\n */\n\n\nfunction sortBreakpoints(breakpoints\n/*: Breakpoints<Breakpoint>*/\n)\n/*: Array<Breakpoint>*/\n{\n var keys\n /*: Array<string>*/\n = Object.keys(breakpoints);\n return keys.sort(function (a, b) {\n return breakpoints[a] - breakpoints[b];\n });\n}","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","'use strict';\n\nvar util = require('./util');\n\nmodule.exports = SchemaObject;\n\nfunction SchemaObject(obj) {\n util.copy(obj, this);\n}\n","'use strict';\nmodule.exports = function generate_validate(it, $keyword, $ruleType) {\n var out = '';\n var $async = it.schema.$async === true,\n $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),\n $id = it.self._getId(it.schema);\n if (it.opts.strictKeywords) {\n var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);\n if ($unknownKwd) {\n var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;\n if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);\n else throw new Error($keywordsMsg);\n }\n }\n if (it.isTop) {\n out += ' var validate = ';\n if ($async) {\n it.async = true;\n out += 'async ';\n }\n out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \\'use strict\\'; ';\n if ($id && (it.opts.sourceCode || it.opts.processCode)) {\n out += ' ' + ('/\\*# sourceURL=' + $id + ' */') + ' ';\n }\n }\n if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {\n var $keyword = 'false schema';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n if (it.schema === false) {\n if (it.isTop) {\n $breakOnError = true;\n } else {\n out += ' var ' + ($valid) + ' = false; ';\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'false schema') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'boolean schema is false\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n } else {\n if (it.isTop) {\n if ($async) {\n out += ' return data; ';\n } else {\n out += ' validate.errors = null; return true; ';\n }\n } else {\n out += ' var ' + ($valid) + ' = true; ';\n }\n }\n if (it.isTop) {\n out += ' }; return validate; ';\n }\n return out;\n }\n if (it.isTop) {\n var $top = it.isTop,\n $lvl = it.level = 0,\n $dataLvl = it.dataLevel = 0,\n $data = 'data';\n it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));\n it.baseId = it.baseId || it.rootId;\n delete it.isTop;\n it.dataPathArr = [undefined];\n if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored in the schema root';\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n out += ' var vErrors = null; ';\n out += ' var errors = 0; ';\n out += ' if (rootData === undefined) rootData = data; ';\n } else {\n var $lvl = it.level,\n $dataLvl = it.dataLevel,\n $data = 'data' + ($dataLvl || '');\n if ($id) it.baseId = it.resolve.url(it.baseId, $id);\n if ($async && !it.async) throw new Error('async schema in sync schema');\n out += ' var errs_' + ($lvl) + ' = errors;';\n }\n var $valid = 'valid' + $lvl,\n $breakOnError = !it.opts.allErrors,\n $closingBraces1 = '',\n $closingBraces2 = '';\n var $errorKeyword;\n var $typeSchema = it.schema.type,\n $typeIsArray = Array.isArray($typeSchema);\n if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {\n if ($typeIsArray) {\n if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null');\n } else if ($typeSchema != 'null') {\n $typeSchema = [$typeSchema, 'null'];\n $typeIsArray = true;\n }\n }\n if ($typeIsArray && $typeSchema.length == 1) {\n $typeSchema = $typeSchema[0];\n $typeIsArray = false;\n }\n if (it.schema.$ref && $refKeywords) {\n if (it.opts.extendRefs == 'fail') {\n throw new Error('$ref: validation keywords used in schema at path \"' + it.errSchemaPath + '\" (see option extendRefs)');\n } else if (it.opts.extendRefs !== true) {\n $refKeywords = false;\n it.logger.warn('$ref: keywords ignored in schema at path \"' + it.errSchemaPath + '\"');\n }\n }\n if (it.schema.$comment && it.opts.$comment) {\n out += ' ' + (it.RULES.all.$comment.code(it, '$comment'));\n }\n if ($typeSchema) {\n if (it.opts.coerceTypes) {\n var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);\n }\n var $rulesGroup = it.RULES.types[$typeSchema];\n if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type';\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type',\n $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';\n out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { ';\n if ($coerceToTypes) {\n var $dataType = 'dataType' + $lvl,\n $coerced = 'coerced' + $lvl;\n out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; ';\n if (it.opts.coerceTypes == 'array') {\n out += ' if (' + ($dataType) + ' == \\'object\\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \\'array\\'; ';\n }\n out += ' var ' + ($coerced) + ' = undefined; ';\n var $bracesCoercion = '';\n var arr1 = $coerceToTypes;\n if (arr1) {\n var $type, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $type = arr1[$i += 1];\n if ($i) {\n out += ' if (' + ($coerced) + ' === undefined) { ';\n $bracesCoercion += '}';\n }\n if (it.opts.coerceTypes == 'array' && $type != 'array') {\n out += ' if (' + ($dataType) + ' == \\'array\\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } ';\n }\n if ($type == 'string') {\n out += ' if (' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\') ' + ($coerced) + ' = \\'\\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \\'\\'; ';\n } else if ($type == 'number' || $type == 'integer') {\n out += ' if (' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \\'string\\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';\n if ($type == 'integer') {\n out += ' && !(' + ($data) + ' % 1)';\n }\n out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';\n } else if ($type == 'boolean') {\n out += ' if (' + ($data) + ' === \\'false\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \\'true\\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';\n } else if ($type == 'null') {\n out += ' if (' + ($data) + ' === \\'\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';\n } else if (it.opts.coerceTypes == 'array' && $type == 'array') {\n out += ' if (' + ($dataType) + ' == \\'string\\' || ' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';\n }\n }\n }\n out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',\n $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';\n out += ' ' + ($data) + ' = ' + ($coerced) + '; ';\n if (!$dataLvl) {\n out += 'if (' + ($parentData) + ' !== undefined)';\n }\n out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';\n } else {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n }\n out += ' } ';\n }\n }\n if (it.schema.$ref && !$refKeywords) {\n out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';\n if ($breakOnError) {\n out += ' } if (errors === ';\n if ($top) {\n out += '0';\n } else {\n out += 'errs_' + ($lvl);\n }\n out += ') { ';\n $closingBraces2 += '}';\n }\n } else {\n var arr2 = it.RULES;\n if (arr2) {\n var $rulesGroup, i2 = -1,\n l2 = arr2.length - 1;\n while (i2 < l2) {\n $rulesGroup = arr2[i2 += 1];\n if ($shouldUseGroup($rulesGroup)) {\n if ($rulesGroup.type) {\n out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { ';\n }\n if (it.opts.useDefaults) {\n if ($rulesGroup.type == 'object' && it.schema.properties) {\n var $schema = it.schema.properties,\n $schemaKeys = Object.keys($schema);\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ($sch.default !== undefined) {\n var $passData = $data + it.util.getProperty($propertyKey);\n if (it.compositeRule) {\n if (it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored for: ' + $passData;\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n } else {\n out += ' if (' + ($passData) + ' === undefined ';\n if (it.opts.useDefaults == 'empty') {\n out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \\'\\' ';\n }\n out += ' ) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'shared') {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n } else {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {\n var arr4 = it.schema.items;\n if (arr4) {\n var $sch, $i = -1,\n l4 = arr4.length - 1;\n while ($i < l4) {\n $sch = arr4[$i += 1];\n if ($sch.default !== undefined) {\n var $passData = $data + '[' + $i + ']';\n if (it.compositeRule) {\n if (it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored for: ' + $passData;\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n } else {\n out += ' if (' + ($passData) + ' === undefined ';\n if (it.opts.useDefaults == 'empty') {\n out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \\'\\' ';\n }\n out += ' ) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'shared') {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n } else {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n }\n }\n var arr5 = $rulesGroup.rules;\n if (arr5) {\n var $rule, i5 = -1,\n l5 = arr5.length - 1;\n while (i5 < l5) {\n $rule = arr5[i5 += 1];\n if ($shouldUseRule($rule)) {\n var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);\n if ($code) {\n out += ' ' + ($code) + ' ';\n if ($breakOnError) {\n $closingBraces1 += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces1) + ' ';\n $closingBraces1 = '';\n }\n if ($rulesGroup.type) {\n out += ' } ';\n if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {\n out += ' else { ';\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (errors === ';\n if ($top) {\n out += '0';\n } else {\n out += 'errs_' + ($lvl);\n }\n out += ') { ';\n $closingBraces2 += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces2) + ' ';\n }\n if ($top) {\n if ($async) {\n out += ' if (errors === 0) return data; ';\n out += ' else throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; ';\n out += ' return errors === 0; ';\n }\n out += ' }; return validate;';\n } else {\n out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';\n }\n out = it.util.cleanUpCode(out);\n if ($top) {\n out = it.util.finalCleanUpCode(out, $async);\n }\n\n function $shouldUseGroup($rulesGroup) {\n var rules = $rulesGroup.rules;\n for (var i = 0; i < rules.length; i++)\n if ($shouldUseRule(rules[i])) return true;\n }\n\n function $shouldUseRule($rule) {\n return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));\n }\n\n function $ruleImplementsSomeKeyword($rule) {\n var impl = $rule.implements;\n for (var i = 0; i < impl.length; i++)\n if (it.schema[impl[i]] !== undefined) return true;\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limit(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $isMax = $keyword == 'maximum',\n $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum',\n $schemaExcl = it.schema[$exclusiveKeyword],\n $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data,\n $op = $isMax ? '<' : '>',\n $notOp = $isMax ? '>' : '<',\n $errorKeyword = undefined;\n if ($isDataExcl) {\n var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n $exclusive = 'exclusive' + $lvl,\n $exclType = 'exclType' + $lvl,\n $exclIsNumber = 'exclIsNumber' + $lvl,\n $opExpr = 'op' + $lvl,\n $opStr = '\\' + ' + $opExpr + ' + \\'';\n out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n $schemaValueExcl = 'schemaExcl' + $lvl;\n out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \\'boolean\\' && ' + ($exclType) + ' != \\'undefined\\' && ' + ($exclType) + ' != \\'number\\') { ';\n var $errorKeyword = $exclusiveKeyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($exclType) + ' == \\'number\\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\'; ';\n if ($schema === undefined) {\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $schemaValue = $schemaValueExcl;\n $isData = $isDataExcl;\n }\n } else {\n var $exclIsNumber = typeof $schemaExcl == 'number',\n $opStr = $op;\n if ($exclIsNumber && $isData) {\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';\n } else {\n if ($exclIsNumber && $schema === undefined) {\n $exclusive = true;\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $schemaValue = $schemaExcl;\n $notOp += '=';\n } else {\n if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);\n if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {\n $exclusive = true;\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $notOp += '=';\n } else {\n $exclusive = false;\n $opStr += '=';\n }\n }\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';\n }\n }\n $errorKeyword = $errorKeyword || $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ' + ($opStr) + ' ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schemaValue) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitItems(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $op = $keyword == 'maxItems' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxItems') {\n out += 'more';\n } else {\n out += 'fewer';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitLength(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $op = $keyword == 'maxLength' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n if (it.opts.unicode === false) {\n out += ' ' + ($data) + '.length ';\n } else {\n out += ' ucs2length(' + ($data) + ') ';\n }\n out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitLength') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be ';\n if ($keyword == 'maxLength') {\n out += 'longer';\n } else {\n out += 'shorter';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' characters\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitProperties(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $op = $keyword == 'maxProperties' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxProperties') {\n out += 'more';\n } else {\n out += 'fewer';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' properties\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport Vector from './base/vector';\nimport {config, isArray} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\n\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec2 from 'gl-matrix/vec2';\n// eslint-disable-next-line camelcase\nimport {vec2_transformMat4AsVector} from '../lib/gl-matrix-extras';\n\nexport default class Vector2 extends Vector {\n // Creates a new, empty vec2\n constructor(x = 0, y = 0) {\n // PERF NOTE: initialize elements as double precision numbers\n super(2); // -0, -0);\n if (isArray(x) && arguments.length === 1) {\n this.copy(x);\n } else {\n if (config.debug) {\n checkNumber(x);\n checkNumber(y);\n }\n this[0] = x;\n this[1] = y;\n }\n }\n\n set(x, y) {\n this[0] = x;\n this[1] = y;\n return this.check();\n }\n\n copy(array) {\n this[0] = array[0];\n this[1] = array[1];\n return this.check();\n }\n\n fromObject(object) {\n if (config.debug) {\n checkNumber(object.x);\n checkNumber(object.y);\n }\n this[0] = object.x;\n this[1] = object.y;\n return this.check();\n }\n\n toObject(object) {\n object.x = this[0];\n object.y = this[1];\n return object;\n }\n\n // Getters/setters\n get ELEMENTS() {\n return 2;\n }\n\n // x,y inherited from Vector\n\n horizontalAngle() {\n return Math.atan2(this.y, this.x);\n }\n\n verticalAngle() {\n return Math.atan2(this.x, this.y);\n }\n\n // Transforms\n\n transform(matrix4) {\n return this.transformAsPoint(matrix4);\n }\n\n // transforms as point (4th component is implicitly 1)\n transformAsPoint(matrix4) {\n vec2.transformMat4(this, this, matrix4);\n return this.check();\n }\n\n // transforms as vector (4th component is implicitly 0, ignores translation. slightly faster)\n transformAsVector(matrix4) {\n vec2_transformMat4AsVector(this, this, matrix4);\n return this.check();\n }\n\n transformByMatrix3(matrix3) {\n vec2.transformMat3(this, this, matrix3);\n return this.check();\n }\n\n transformByMatrix2x3(matrix2x3) {\n vec2.transformMat2d(this, this, matrix2x3);\n return this.check();\n }\n\n transformByMatrix2(matrix2) {\n vec2.transformMat2(this, this, matrix2);\n return this.check();\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport Vector from './base/vector';\nimport {config, isArray} from '../lib/common';\nimport {checkNumber} from '../lib/validators';\n\n// @ts-ignore: error TS2307: Cannot find module 'gl-matrix/...'.\nimport * as vec4 from 'gl-matrix/vec3';\n// eslint-disable-next-line camelcase\nimport {vec4_transformMat2, vec4_transformMat3} from '../lib/gl-matrix-extras';\n\nconst constants = {};\n\nexport default class Vector4 extends Vector {\n static get ZERO() {\n return (constants.ZERO = constants.ZERO || Object.freeze(new Vector4(0, 0, 0, 0)));\n }\n\n constructor(x = 0, y = 0, z = 0, w = 0) {\n // PERF NOTE: initialize elements as double precision numbers\n super(-0, -0, -0, -0);\n if (isArray(x) && arguments.length === 1) {\n this.copy(x);\n } else {\n // this.set(x, y, z, w);\n if (config.debug) {\n checkNumber(x);\n checkNumber(y);\n checkNumber(z);\n checkNumber(w);\n }\n this[0] = x;\n this[1] = y;\n this[2] = z;\n this[3] = w;\n }\n }\n\n set(x, y, z, w) {\n this[0] = x;\n this[1] = y;\n this[2] = z;\n this[3] = w;\n return this.check();\n }\n\n copy(array) {\n this[0] = array[0];\n this[1] = array[1];\n this[2] = array[2];\n this[3] = array[3];\n return this.check();\n }\n\n fromObject(object) {\n if (config.debug) {\n checkNumber(object.x);\n checkNumber(object.y);\n checkNumber(object.z);\n checkNumber(object.w);\n }\n this[0] = object.x;\n this[1] = object.y;\n this[2] = object.z;\n this[3] = object.w;\n return this;\n }\n\n toObject(object) {\n object.x = this[0];\n object.y = this[1];\n object.z = this[2];\n object.w = this[3];\n return object;\n }\n\n // Getters/setters\n /* eslint-disable no-multi-spaces, brace-style, no-return-assign */\n get ELEMENTS() {\n return 4;\n }\n\n // x,y inherited from Vector\n\n get z() {\n return this[2];\n }\n\n set z(value) {\n this[2] = checkNumber(value);\n }\n\n get w() {\n return this[3];\n }\n\n set w(value) {\n this[3] = checkNumber(value);\n }\n /* eslint-enable no-multi-spaces, brace-style, no-return-assign */\n\n transform(matrix4) {\n vec4.transformMat4(this, this, matrix4);\n return this.check();\n }\n\n transformByMatrix3(matrix3) {\n vec4_transformMat3(this, this, matrix3);\n return this.check();\n }\n\n transformByMatrix2(matrix2) {\n vec4_transformMat2(this, this, matrix2);\n return this.check();\n }\n\n transformByQuaternion(quaternion) {\n vec4.transformQuat(this, this, quaternion);\n return this.check();\n }\n\n // three.js compatibility\n applyMatrix4(m) {\n m.transform(this, this);\n return this;\n }\n}\n","// WebGL1/WebGL2 extension polyfill support\n//\n// Provides a function that creates polyfills for WebGL2 functions based\n// on available extensions and installs them on a supplied target (could be\n// the WebGLContext or its prototype, or a separate object).\n//\n// This is intended to be a stand-alone file with minimal dependencies,\n// easy to reuse or repurpose in other projects.\n\n/** @typedef {import('./polyfill-context')} types */\n\nimport {polyfillVertexArrayObject} from './polyfill-vertex-array-object';\nimport {assert} from '../utils/assert';\n\nimport {WEBGL2_CONTEXT_POLYFILLS, WEBGL2_CONTEXT_OVERRIDES} from './polyfill-table';\n\n/** @type {types['polyfillContext']} */\nexport function polyfillContext(gl) {\n // @ts-ignore\n gl.luma = gl.luma || {};\n // @ts-ignore\n const {luma} = gl;\n\n if (!luma.polyfilled) {\n polyfillVertexArrayObject(gl);\n initializeExtensions(gl);\n installPolyfills(gl, WEBGL2_CONTEXT_POLYFILLS);\n installOverrides(gl, {target: luma, target2: gl});\n luma.polyfilled = true;\n }\n\n // TODO - only supporting a few members\n /** @type {WebGL2RenderingContext} */\n // @ts-ignore\n return gl;\n}\n\n// TODO - is this still required?\nconst global_ = typeof global !== 'undefined' ? global : window;\n// @ts-ignore\nglobal_.polyfillContext = polyfillContext;\n\nfunction initializeExtensions(gl) {\n gl.luma.extensions = {};\n // `getSupportedExtensions` can return null when context is lost.\n const EXTENSIONS = gl.getSupportedExtensions() || [];\n for (const extension of EXTENSIONS) {\n gl.luma[extension] = gl.getExtension(extension);\n }\n}\n\n// Install simple overrides (mostly get* functions)\nfunction installOverrides(gl, {target, target2}) {\n Object.keys(WEBGL2_CONTEXT_OVERRIDES).forEach(key => {\n if (typeof WEBGL2_CONTEXT_OVERRIDES[key] === 'function') {\n // install an override, if no implementation was detected\n const originalFunc = gl[key] ? gl[key].bind(gl) : () => {};\n const polyfill = WEBGL2_CONTEXT_OVERRIDES[key].bind(null, gl, originalFunc);\n target[key] = polyfill;\n target2[key] = polyfill;\n }\n });\n}\n\nfunction installPolyfills(gl, polyfills) {\n for (const extension of Object.getOwnPropertyNames(polyfills)) {\n if (extension !== 'overrides') {\n polyfillExtension(gl, {extension, target: gl.luma, target2: gl});\n }\n }\n}\n\n// Polyfills a single WebGL extension into the `target` object\nfunction polyfillExtension(gl, {extension, target, target2}) {\n const defaults = WEBGL2_CONTEXT_POLYFILLS[extension];\n assert(defaults);\n\n const {meta = {}} = defaults;\n const {suffix = ''} = meta;\n\n const ext = gl.getExtension(extension);\n\n for (const key of Object.keys(defaults)) {\n const extKey = `${key}${suffix}`;\n\n let polyfill = null;\n if (key === 'meta') {\n // ignore\n } else if (typeof gl[key] === 'function') {\n // WebGL2 implementation is already\n } else if (ext && typeof ext[extKey] === 'function') {\n // pick extension implemenentation,if available\n polyfill = (...args) => ext[extKey](...args);\n } else if (typeof defaults[key] === 'function') {\n // pick the mock implementation, if no implementation was detected\n polyfill = defaults[key].bind(target);\n }\n\n if (polyfill) {\n target[key] = polyfill;\n target2[key] = polyfill;\n }\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport project from '../project/project';\n\nconst vs = `\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n vec3 projectedPosition = project_position(position, position64Low);\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n // offset is specified as ENU\n // when in globe projection, rotate offset so that the ground alighs with the surface of the globe\n mat3 rotation = project_get_orientation_matrix(projectedPosition);\n offset = rotation * offset;\n }\n commonPosition = vec4(projectedPosition + offset, 1.0);\n return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset\n) {\n vec4 commonPosition;\n return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n`;\n\nexport default {\n name: 'project32',\n dependencies: [project],\n vs\n};\n","import {picking} from '@luma.gl/core';\n\nexport default {\n inject: {\n 'vs:DECKGL_FILTER_COLOR': `\n picking_setPickingColor(geometry.pickingColor);\n // for picking depth values\n picking_setPickingAttribute(geometry.position.z);\n `,\n 'fs:DECKGL_FILTER_COLOR': {\n order: 99,\n injection: `\n // use highlight color if this fragment belongs to the selected object.\n color = picking_filterHighlightColor(color);\n\n // use picking color if rendering to picking FBO.\n color = picking_filterPickingColor(color);\n `\n }\n },\n ...picking\n};\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport {createIterable, getAccessorFromBuffer} from './iterable-utils';\nimport defaultTypedArrayManager from './typed-array-manager';\nimport assert from './assert';\n\nimport {Buffer} from '@luma.gl/core';\n\nexport default class Tesselator {\n constructor(opts = {}) {\n const {attributes = {}} = opts;\n\n this.typedArrayManager = defaultTypedArrayManager;\n this.indexStarts = null;\n this.vertexStarts = null;\n this.vertexCount = 0;\n this.instanceCount = 0;\n this.attributes = {};\n this._attributeDefs = attributes;\n this.opts = opts;\n\n this.updateGeometry(opts);\n\n Object.seal(this);\n }\n\n /* Public methods */\n updateGeometry(opts) {\n Object.assign(this.opts, opts);\n const {\n data,\n buffers = {},\n getGeometry,\n geometryBuffer,\n positionFormat,\n dataChanged,\n normalize = true\n } = this.opts;\n this.data = data;\n this.getGeometry = getGeometry;\n this.positionSize =\n (geometryBuffer && geometryBuffer.size) || (positionFormat === 'XY' ? 2 : 3);\n this.buffers = buffers;\n this.normalize = normalize;\n\n // Handle external logical value\n if (geometryBuffer) {\n assert(data.startIndices); // binary data missing startIndices\n this.getGeometry = this.getGeometryFromBuffer(geometryBuffer);\n\n if (!normalize) {\n // skip packing and set attribute value directly\n // TODO - avoid mutating user-provided object\n buffers.positions = geometryBuffer;\n }\n }\n this.geometryBuffer = buffers.positions;\n\n if (Array.isArray(dataChanged)) {\n // is partial update\n for (const dataRange of dataChanged) {\n this._rebuildGeometry(dataRange);\n }\n } else {\n this._rebuildGeometry();\n }\n }\n\n updatePartialGeometry({startRow, endRow}) {\n this._rebuildGeometry({startRow, endRow});\n }\n\n /* Subclass interface */\n normalizeGeometry(geometry) {\n return geometry;\n }\n\n // Update the positions of a single geometry\n updateGeometryAttributes(geometry, startIndex, size) {\n throw new Error('Not implemented');\n }\n\n // Returns the number of vertices in a geometry\n getGeometrySize(geometry) {\n throw new Error('Not implemented');\n }\n\n getGeometryFromBuffer(geometryBuffer) {\n const value = geometryBuffer.value || geometryBuffer;\n assert(ArrayBuffer.isView(value)); // invalid binary geometries\n\n return getAccessorFromBuffer(value, {\n size: this.positionSize,\n offset: geometryBuffer.offset,\n stride: geometryBuffer.stride,\n startIndices: this.data.startIndices\n });\n }\n\n /* Private utility methods */\n _allocate(instanceCount, copy) {\n // allocate attributes\n const {attributes, buffers, _attributeDefs, typedArrayManager} = this;\n for (const name in _attributeDefs) {\n if (name in buffers) {\n // Use external buffer\n typedArrayManager.release(attributes[name]);\n attributes[name] = null;\n } else {\n const def = _attributeDefs[name];\n // If dataRange is supplied, this is a partial update.\n // In case we need to reallocate the typed array, it will need the old values copied\n // before performing partial update.\n def.copy = copy;\n\n attributes[name] = typedArrayManager.allocate(attributes[name], instanceCount, def);\n }\n }\n }\n\n /**\n * Visit all objects\n * `data` is expected to be an iterable consistent with the base Layer expectation\n */\n _forEachGeometry(visitor, startRow, endRow) {\n const {data, getGeometry} = this;\n const {iterable, objectInfo} = createIterable(data, startRow, endRow);\n for (const object of iterable) {\n objectInfo.index++;\n const geometry = getGeometry(object, objectInfo);\n visitor(geometry, objectInfo.index);\n }\n }\n\n /* eslint-disable complexity,max-statements */\n _rebuildGeometry(dataRange) {\n if (!this.data || !this.getGeometry) {\n return;\n }\n\n let {indexStarts, vertexStarts, instanceCount} = this;\n const {data, geometryBuffer} = this;\n const {startRow = 0, endRow = Infinity} = dataRange || {};\n\n const normalizedData = {};\n\n if (!dataRange) {\n // Full update - regenerate buffer layout from scratch\n indexStarts = [0];\n vertexStarts = [0];\n }\n if (this.normalize || !geometryBuffer) {\n this._forEachGeometry(\n (geometry, dataIndex) => {\n geometry = this.normalizeGeometry(geometry);\n normalizedData[dataIndex] = geometry;\n vertexStarts[dataIndex + 1] = vertexStarts[dataIndex] + this.getGeometrySize(geometry);\n },\n startRow,\n endRow\n );\n // count instances\n instanceCount = vertexStarts[vertexStarts.length - 1];\n } else if (geometryBuffer.buffer instanceof Buffer) {\n const byteStride = geometryBuffer.stride || this.positionSize * 4;\n // assume user provided data is already normalized\n vertexStarts = data.startIndices;\n instanceCount = vertexStarts[data.length] || geometryBuffer.buffer.byteLength / byteStride;\n } else {\n const bufferValue = geometryBuffer.value || geometryBuffer;\n const elementStride =\n geometryBuffer.stride / bufferValue.BYTES_PER_ELEMENT || this.positionSize;\n // assume user provided data is already normalized\n vertexStarts = data.startIndices;\n instanceCount = vertexStarts[data.length] || bufferValue.length / elementStride;\n }\n\n // allocate attributes\n this._allocate(instanceCount, Boolean(dataRange));\n\n this.indexStarts = indexStarts;\n this.vertexStarts = vertexStarts;\n this.instanceCount = instanceCount;\n\n const context = {};\n\n this._forEachGeometry(\n (geometry, dataIndex) => {\n geometry = normalizedData[dataIndex] || geometry;\n context.vertexStart = vertexStarts[dataIndex];\n context.indexStart = indexStarts[dataIndex];\n const vertexEnd =\n dataIndex < vertexStarts.length - 1 ? vertexStarts[dataIndex + 1] : instanceCount;\n context.geometrySize = vertexEnd - vertexStarts[dataIndex];\n context.geometryIndex = dataIndex;\n this.updateGeometryAttributes(geometry, context);\n },\n startRow,\n endRow\n );\n\n this.vertexCount = indexStarts[indexStarts.length - 1];\n }\n}\n","import {Stats} from '@probe.gl/stats';\n\ntype Handle = any;\ntype DoneFunction = () => any;\ntype GetPriorityFunction = () => number;\ntype RequestResult = {\n done: DoneFunction;\n} | null;\n\n/** RequestScheduler Options */\nexport type RequestSchedulerProps = {\n id?: string;\n throttleRequests?: boolean;\n maxRequests?: number;\n};\n\nconst STAT_QUEUED_REQUESTS = 'Queued Requests';\nconst STAT_ACTIVE_REQUESTS = 'Active Requests';\nconst STAT_CANCELLED_REQUESTS = 'Cancelled Requests';\nconst STAT_QUEUED_REQUESTS_EVER = 'Queued Requests Ever';\nconst STAT_ACTIVE_REQUESTS_EVER = 'Active Requests Ever';\n\nconst DEFAULT_PROPS: Required<RequestSchedulerProps> = {\n id: 'request-scheduler',\n // Specifies if the request scheduler should throttle incoming requests, mainly for comparative testing\n throttleRequests: true,\n // The maximum number of simultaneous active requests. Un-throttled requests do not observe this limit.\n maxRequests: 6\n};\n\n/** Tracks one request */\ntype Request = {\n handle: Handle;\n priority: number;\n getPriority: GetPriorityFunction;\n resolve?: (value: any) => any;\n};\n\n/**\n * Used to issue a request, without having them \"deeply queued\" by the browser.\n * @todo - Track requests globally, across multiple servers\n */\nexport default class RequestScheduler {\n readonly props: Required<RequestSchedulerProps>;\n readonly stats: Stats;\n activeRequestCount: number = 0;\n\n /** Tracks the number of active requests and prioritizes/cancels queued requests. */\n private requestQueue: Request[] = [];\n private requestMap: Map<Handle, Promise<RequestResult>> = new Map();\n private deferredUpdate: any = null;\n\n constructor(props: RequestSchedulerProps = {}) {\n this.props = {...DEFAULT_PROPS, ...props};\n\n // Returns the statistics used by the request scheduler.\n this.stats = new Stats({id: this.props.id});\n this.stats.get(STAT_QUEUED_REQUESTS);\n this.stats.get(STAT_ACTIVE_REQUESTS);\n this.stats.get(STAT_CANCELLED_REQUESTS);\n this.stats.get(STAT_QUEUED_REQUESTS_EVER);\n this.stats.get(STAT_ACTIVE_REQUESTS_EVER);\n }\n\n /**\n * Called by an application that wants to issue a request, without having it deeply queued by the browser\n *\n * When the returned promise resolved, it is OK for the application to issue a request.\n * The promise resolves to an object that contains a `done` method.\n * When the application's request has completed (or failed), the application must call the `done` function\n *\n * @param handle\n * @param getPriority will be called when request \"slots\" open up,\n * allowing the caller to update priority or cancel the request\n * Highest priority executes first, priority < 0 cancels the request\n * @returns a promise\n * - resolves to a object (with a `done` field) when the request can be issued without queueing,\n * - resolves to `null` if the request has been cancelled (by the callback return < 0).\n * In this case the application should not issue the request\n */\n scheduleRequest(\n handle: Handle,\n getPriority: GetPriorityFunction = () => 0\n ): Promise<RequestResult> {\n // Allows throttling to be disabled\n if (!this.props.throttleRequests) {\n return Promise.resolve({done: () => {}});\n }\n\n // dedupe\n if (this.requestMap.has(handle)) {\n return this.requestMap.get(handle) as Promise<any>;\n }\n\n const request: Request = {handle, priority: 0, getPriority};\n const promise = new Promise<RequestResult>((resolve) => {\n // @ts-ignore\n request.resolve = resolve;\n return request;\n });\n\n this.requestQueue.push(request);\n this.requestMap.set(handle, promise);\n this._issueNewRequests();\n return promise;\n }\n\n // PRIVATE\n\n _issueRequest(request: Request): Promise<any> {\n const {handle, resolve} = request;\n let isDone = false;\n\n const done = () => {\n // can only be called once\n if (!isDone) {\n isDone = true;\n\n // Stop tracking a request - it has completed, failed, cancelled etc\n this.requestMap.delete(handle);\n this.activeRequestCount--;\n // A slot just freed up, see if any queued requests are waiting\n this._issueNewRequests();\n }\n };\n\n // Track this request\n this.activeRequestCount++;\n\n return resolve ? resolve({done}) : Promise.resolve({done});\n }\n\n /** We check requests asynchronously, to prevent multiple updates */\n _issueNewRequests(): void {\n if (!this.deferredUpdate) {\n this.deferredUpdate = setTimeout(() => this._issueNewRequestsAsync(), 0);\n }\n }\n\n /** Refresh all requests */\n _issueNewRequestsAsync() {\n // TODO - shouldn't we clear the timeout?\n this.deferredUpdate = null;\n\n const freeSlots = Math.max(this.props.maxRequests - this.activeRequestCount, 0);\n\n if (freeSlots === 0) {\n return;\n }\n\n this._updateAllRequests();\n\n // Resolve pending promises for the top-priority requests\n for (let i = 0; i < freeSlots; ++i) {\n const request = this.requestQueue.shift();\n if (request) {\n this._issueRequest(request); // eslint-disable-line @typescript-eslint/no-floating-promises\n }\n }\n\n // Uncomment to debug\n // console.log(`${freeSlots} free slots, ${this.requestQueue.length} queued requests`);\n }\n\n /** Ensure all requests have updated priorities, and that no longer valid requests are cancelled */\n _updateAllRequests() {\n const requestQueue = this.requestQueue;\n for (let i = 0; i < requestQueue.length; ++i) {\n const request = requestQueue[i];\n if (!this._updateRequest(request)) {\n // Remove the element and make sure to adjust the counter to account for shortened array\n requestQueue.splice(i, 1);\n this.requestMap.delete(request.handle);\n i--;\n }\n }\n\n // Sort the remaining requests based on priority\n requestQueue.sort((a, b) => a.priority - b.priority);\n }\n\n /** Update a single request by calling the callback */\n _updateRequest(request) {\n request.priority = request.getPriority(request.handle); // eslint-disable-line callback-return\n\n // by returning a negative priority, the callback cancels the request\n if (request.priority < 0) {\n request.resolve(null);\n return false;\n }\n return true;\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport {deepEqual} from '../utils/deep-equal';\n\nexport default class LayerExtension {\n constructor(opts = {}) {\n this.opts = opts;\n }\n\n equals(extension) {\n if (this === extension) {\n return true;\n }\n\n return this.constructor === extension.constructor && deepEqual(this.opts, extension.opts);\n }\n\n getShaders(extension) {\n return null;\n }\n\n getSubLayerProps(extension) {\n const {defaultProps = {}} = extension.constructor;\n const newProps = {\n updateTriggers: {}\n };\n\n /* eslint-disable max-depth */\n for (const key in defaultProps) {\n if (key in this.props) {\n const propDef = defaultProps[key];\n const propValue = this.props[key];\n newProps[key] = propValue;\n if (propDef && propDef.type === 'accessor') {\n newProps.updateTriggers[key] = this.props.updateTriggers[key];\n if (typeof propValue === 'function') {\n newProps[key] = this.getSubLayerAccessor(propValue, true);\n }\n }\n }\n }\n /* eslint-enable max-depth */\n return newProps;\n }\n\n initializeState(context, extension) {}\n\n updateState(params, extension) {}\n\n draw(params, extension) {}\n\n finalizeState(extension) {}\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {CompositeLayer, createIterable, log} from '@deck.gl/core';\nimport SolidPolygonLayer from '../solid-polygon-layer/solid-polygon-layer';\nimport PathLayer from '../path-layer/path-layer';\nimport * as Polygon from '../solid-polygon-layer/polygon';\nimport {replaceInRange} from '../utils';\n\nconst defaultLineColor = [0, 0, 0, 255];\nconst defaultFillColor = [0, 0, 0, 255];\n\nconst defaultProps = {\n stroked: true,\n filled: true,\n extruded: false,\n elevationScale: 1,\n wireframe: false,\n _normalize: true,\n _windingOrder: 'CW',\n\n lineWidthUnits: 'meters',\n lineWidthScale: 1,\n lineWidthMinPixels: 0,\n lineWidthMaxPixels: Number.MAX_SAFE_INTEGER,\n lineJointRounded: false,\n lineMiterLimit: 4,\n\n getPolygon: {type: 'accessor', value: f => f.polygon},\n // Polygon fill color\n getFillColor: {type: 'accessor', value: defaultFillColor},\n // Point, line and polygon outline color\n getLineColor: {type: 'accessor', value: defaultLineColor},\n // Line and polygon outline accessors\n getLineWidth: {type: 'accessor', value: 1},\n // Polygon extrusion accessor\n getElevation: {type: 'accessor', value: 1000},\n\n // Optional material for 'lighting' shader module\n material: true\n};\n\nexport default class PolygonLayer extends CompositeLayer {\n initializeState() {\n this.state = {\n paths: []\n };\n\n if (this.props.getLineDashArray) {\n log.removed('getLineDashArray', 'PathStyleExtension')();\n }\n }\n\n updateState({oldProps, props, changeFlags}) {\n const geometryChanged =\n changeFlags.dataChanged ||\n (changeFlags.updateTriggersChanged &&\n (changeFlags.updateTriggersChanged.all || changeFlags.updateTriggersChanged.getPolygon));\n\n if (geometryChanged && Array.isArray(changeFlags.dataChanged)) {\n const paths = this.state.paths.slice();\n const pathsDiff = changeFlags.dataChanged.map(dataRange =>\n replaceInRange({\n data: paths,\n getIndex: p => p.__source.index,\n dataRange,\n replace: this._getPaths(dataRange)\n })\n );\n this.setState({paths, pathsDiff});\n } else if (geometryChanged) {\n this.setState({\n paths: this._getPaths(),\n pathsDiff: null\n });\n }\n }\n\n _getPaths(dataRange = {}) {\n const {data, getPolygon, positionFormat, _normalize} = this.props;\n const paths = [];\n const positionSize = positionFormat === 'XY' ? 2 : 3;\n const {startRow, endRow} = dataRange;\n\n const {iterable, objectInfo} = createIterable(data, startRow, endRow);\n for (const object of iterable) {\n objectInfo.index++;\n let polygon = getPolygon(object, objectInfo);\n if (_normalize) {\n polygon = Polygon.normalize(polygon, positionSize);\n }\n const {holeIndices} = polygon;\n const positions = polygon.positions || polygon;\n\n if (holeIndices) {\n // split the positions array into `holeIndices.length + 1` rings\n // holeIndices[-1] falls back to 0\n // holeIndices[holeIndices.length] falls back to positions.length\n for (let i = 0; i <= holeIndices.length; i++) {\n const path = positions.slice(holeIndices[i - 1] || 0, holeIndices[i] || positions.length);\n paths.push(this.getSubLayerRow({path}, object, objectInfo.index));\n }\n } else {\n paths.push(this.getSubLayerRow({path: positions}, object, objectInfo.index));\n }\n }\n return paths;\n }\n\n /* eslint-disable complexity */\n renderLayers() {\n // Layer composition props\n const {\n data,\n _dataDiff,\n stroked,\n filled,\n extruded,\n wireframe,\n _normalize,\n _windingOrder,\n elevationScale,\n transitions,\n positionFormat\n } = this.props;\n\n // Rendering props underlying layer\n const {\n lineWidthUnits,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n lineJointRounded,\n lineMiterLimit,\n lineDashJustified\n } = this.props;\n\n // Accessor props for underlying layers\n const {\n getFillColor,\n getLineColor,\n getLineWidth,\n getLineDashArray,\n getElevation,\n getPolygon,\n updateTriggers,\n material\n } = this.props;\n\n const {paths, pathsDiff} = this.state;\n\n const FillLayer = this.getSubLayerClass('fill', SolidPolygonLayer);\n const StrokeLayer = this.getSubLayerClass('stroke', PathLayer);\n\n // Filled Polygon Layer\n const polygonLayer =\n this.shouldRenderSubLayer('fill', paths) &&\n new FillLayer(\n {\n _dataDiff,\n extruded,\n elevationScale,\n\n filled,\n wireframe,\n _normalize,\n _windingOrder,\n\n getElevation,\n getFillColor,\n getLineColor: extruded && wireframe ? getLineColor : defaultLineColor,\n\n material,\n transitions\n },\n this.getSubLayerProps({\n id: 'fill',\n updateTriggers: {\n getPolygon: updateTriggers.getPolygon,\n getElevation: updateTriggers.getElevation,\n getFillColor: updateTriggers.getFillColor,\n // using a legacy API to invalid lineColor attributes\n // if (extruded && wireframe) has changed\n lineColors: extruded && wireframe,\n getLineColor: updateTriggers.getLineColor\n }\n }),\n {\n data,\n positionFormat,\n getPolygon\n }\n );\n\n // Polygon line layer\n const polygonLineLayer =\n !extruded &&\n stroked &&\n this.shouldRenderSubLayer('stroke', paths) &&\n new StrokeLayer(\n {\n _dataDiff: pathsDiff && (() => pathsDiff),\n widthUnits: lineWidthUnits,\n widthScale: lineWidthScale,\n widthMinPixels: lineWidthMinPixels,\n widthMaxPixels: lineWidthMaxPixels,\n jointRounded: lineJointRounded,\n miterLimit: lineMiterLimit,\n dashJustified: lineDashJustified,\n\n // Already normalized\n _pathType: 'loop',\n\n transitions: transitions && {\n getWidth: transitions.getLineWidth,\n getColor: transitions.getLineColor,\n getPath: transitions.getPolygon\n },\n\n getColor: this.getSubLayerAccessor(getLineColor),\n getWidth: this.getSubLayerAccessor(getLineWidth),\n getDashArray: this.getSubLayerAccessor(getLineDashArray)\n },\n this.getSubLayerProps({\n id: 'stroke',\n updateTriggers: {\n getWidth: updateTriggers.getLineWidth,\n getColor: updateTriggers.getLineColor,\n getDashArray: updateTriggers.getLineDashArray\n }\n }),\n {\n data: paths,\n positionFormat,\n getPath: x => x.path\n }\n );\n\n return [\n // If not extruded: flat fill layer is drawn below outlines\n !extruded && polygonLayer,\n polygonLineLayer,\n // If extruded: draw fill layer last for correct blending behavior\n extruded && polygonLayer\n ];\n }\n /* eslint-enable complexity */\n}\n\nPolygonLayer.layerName = 'PolygonLayer';\nPolygonLayer.defaultProps = defaultProps;\n","import View from './view';\nimport Viewport from '../viewports/viewport';\n\nimport {Matrix4} from 'math.gl';\nimport {pixelsToWorld} from '@math.gl/web-mercator';\nimport * as vec2 from 'gl-matrix/vec2';\nimport OrthographicController from '../controllers/orthographic-controller';\n\nconst viewMatrix = new Matrix4().lookAt({eye: [0, 0, 1]});\n\nfunction getProjectionMatrix({width, height, near, far}) {\n // Make sure Matrix4.ortho doesn't crash on 0 width/height\n width = width || 1;\n height = height || 1;\n\n return new Matrix4().ortho({\n left: -width / 2,\n right: width / 2,\n bottom: -height / 2,\n top: height / 2,\n near,\n far\n });\n}\n\nclass OrthographicViewport extends Viewport {\n constructor(props) {\n const {\n width,\n height,\n near = 0.1,\n far = 1000,\n zoom = 0,\n target = [0, 0, 0],\n flipY = true\n } = props;\n const zoomX = Array.isArray(zoom) ? zoom[0] : zoom;\n const zoomY = Array.isArray(zoom) ? zoom[1] : zoom;\n const zoom_ = Math.min(zoomX, zoomY);\n const scale = Math.pow(2, zoom_);\n\n super({\n ...props,\n // in case viewState contains longitude/latitude values,\n // make sure that the base Viewport class does not treat this as a geospatial viewport\n longitude: null,\n position: target,\n viewMatrix: viewMatrix.clone().scale([scale, scale * (flipY ? -1 : 1), scale]),\n projectionMatrix: getProjectionMatrix({width, height, near, far}),\n zoom: zoom_\n });\n\n if (zoomX !== zoomY) {\n const scaleX = Math.pow(2, zoomX);\n const scaleY = Math.pow(2, zoomY);\n\n this.distanceScales = {\n unitsPerMeter: [scaleX / scale, scaleY / scale, 1],\n metersPerUnit: [scale / scaleX, scale / scaleY, 1]\n };\n }\n }\n\n projectFlat([X, Y]) {\n const {unitsPerMeter} = this.distanceScales;\n return [X * unitsPerMeter[0], Y * unitsPerMeter[1]];\n }\n\n unprojectFlat([x, y]) {\n const {metersPerUnit} = this.distanceScales;\n return [x * metersPerUnit[0], y * metersPerUnit[1]];\n }\n\n /* Needed by LinearInterpolator */\n panByPosition(coords, pixel) {\n const fromLocation = pixelsToWorld(pixel, this.pixelUnprojectionMatrix);\n const toLocation = this.projectFlat(coords);\n\n const translate = vec2.add([], toLocation, vec2.negate([], fromLocation));\n const newCenter = vec2.add([], this.center, translate);\n\n return {target: newCenter};\n }\n}\n\nexport default class OrthographicView extends View {\n constructor(props) {\n super({\n ...props,\n type: OrthographicViewport\n });\n }\n\n get controller() {\n return this._getControllerProps({\n type: OrthographicController\n });\n }\n}\n\nOrthographicView.displayName = 'OrthographicView';\n","import View from './view';\nimport Viewport from '../viewports/viewport';\n\nimport {Matrix4} from 'math.gl';\nimport {pixelsToWorld, fovyToAltitude} from '@math.gl/web-mercator';\nimport OrbitController from '../controllers/orbit-controller';\n\nconst DEGREES_TO_RADIANS = Math.PI / 180;\n\nfunction getViewMatrix({height, focalDistance, orbitAxis, rotationX, rotationOrbit, zoom}) {\n // We position the camera so that one common space unit (world space unit scaled by zoom)\n // at the target maps to one screen pixel.\n // This is a similar technique to that used in web mercator projection\n // By doing so we are able to convert between common space and screen space sizes efficiently\n // in the vertex shader.\n const up = orbitAxis === 'Z' ? [0, 0, 1] : [0, 1, 0];\n const eye = orbitAxis === 'Z' ? [0, -focalDistance, 0] : [0, 0, focalDistance];\n\n const viewMatrix = new Matrix4().lookAt({eye, up});\n\n viewMatrix.rotateX(rotationX * DEGREES_TO_RADIANS);\n if (orbitAxis === 'Z') {\n viewMatrix.rotateZ(rotationOrbit * DEGREES_TO_RADIANS);\n } else {\n viewMatrix.rotateY(rotationOrbit * DEGREES_TO_RADIANS);\n }\n\n // When height increases, we need to increase the distance from the camera to the target to\n // keep the 1:1 mapping. However, this also changes the projected depth of each position by\n // moving them further away between the near/far plane.\n // Without modifying the default near/far planes, we instead scale down the common space to\n // remove the distortion to the depth field.\n const projectionScale = Math.pow(2, zoom) / (height || 1);\n viewMatrix.scale(projectionScale);\n\n return viewMatrix;\n}\n\nclass OrbitViewport extends Viewport {\n constructor(props) {\n const {\n height,\n\n projectionMatrix,\n\n fovy = 50, // For setting camera position\n orbitAxis, // Orbit axis with 360 degrees rotating freedom, can only be 'Y' or 'Z'\n target = [0, 0, 0], // Which point is camera looking at, default origin\n\n rotationX = 0, // Rotating angle around X axis\n rotationOrbit = 0, // Rotating angle around orbit axis\n\n zoom = 0\n } = props;\n\n const focalDistance = projectionMatrix ? projectionMatrix[5] / 2 : fovyToAltitude(fovy);\n\n super({\n ...props,\n // in case viewState contains longitude/latitude values,\n // make sure that the base Viewport class does not treat this as a geospatial viewport\n longitude: null,\n viewMatrix: getViewMatrix({\n height,\n focalDistance,\n orbitAxis,\n rotationX,\n rotationOrbit,\n zoom\n }),\n fovy,\n focalDistance,\n position: target,\n zoom\n });\n\n this.projectedCenter = this.project(this.center);\n }\n\n unproject(xyz, {topLeft = true} = {}) {\n const [x, y, z = this.projectedCenter[2]] = xyz;\n\n const y2 = topLeft ? y : this.height - y;\n const [X, Y, Z] = pixelsToWorld([x, y2, z], this.pixelUnprojectionMatrix);\n return [X, Y, Z];\n }\n\n panByPosition(coords, pixel) {\n const p0 = this.project(coords);\n const nextCenter = [\n this.width / 2 + p0[0] - pixel[0],\n this.height / 2 + p0[1] - pixel[1],\n this.projectedCenter[2]\n ];\n return {\n target: this.unproject(nextCenter)\n };\n }\n}\n\nexport default class OrbitView extends View {\n constructor(props = {}) {\n const {orbitAxis = 'Z'} = props;\n\n super({\n ...props,\n orbitAxis,\n type: OrbitViewport\n });\n }\n\n get controller() {\n return this._getControllerProps({\n type: OrbitController\n });\n }\n}\n\nOrbitView.displayName = 'OrbitView';\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var root = require('./_root');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/define-property\"), __esModule: true };","\"use strict\";\n\nexports.__esModule = true;\n\nvar _iterator = require(\"../core-js/symbol/iterator\");\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _symbol = require(\"../core-js/symbol\");\n\nvar _symbol2 = _interopRequireDefault(_symbol);\n\nvar _typeof = typeof _symbol2.default === \"function\" && typeof _iterator2.default === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = typeof _symbol2.default === \"function\" && _typeof(_iterator2.default) === \"symbol\" ? function (obj) {\n return typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n} : function (obj) {\n return obj && typeof _symbol2.default === \"function\" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","module.exports = require('./_hide');\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ColorWrap = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _debounce = require('lodash/debounce');\n\nvar _debounce2 = _interopRequireDefault(_debounce);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ColorWrap = exports.ColorWrap = function ColorWrap(Picker) {\n var ColorPicker = function (_ref) {\n _inherits(ColorPicker, _ref);\n\n function ColorPicker(props) {\n _classCallCheck(this, ColorPicker);\n\n var _this = _possibleConstructorReturn(this, (ColorPicker.__proto__ || Object.getPrototypeOf(ColorPicker)).call(this));\n\n _this.handleChange = function (data, event) {\n var isValidColor = _color2.default.simpleCheckForValidColor(data);\n if (isValidColor) {\n var colors = _color2.default.toState(data, data.h || _this.state.oldHue);\n _this.setState(colors);\n _this.props.onChangeComplete && _this.debounce(_this.props.onChangeComplete, colors, event);\n _this.props.onChange && _this.props.onChange(colors, event);\n }\n };\n\n _this.handleSwatchHover = function (data, event) {\n var isValidColor = _color2.default.simpleCheckForValidColor(data);\n if (isValidColor) {\n var colors = _color2.default.toState(data, data.h || _this.state.oldHue);\n _this.props.onSwatchHover && _this.props.onSwatchHover(colors, event);\n }\n };\n\n _this.state = _extends({}, _color2.default.toState(props.color, 0));\n\n _this.debounce = (0, _debounce2.default)(function (fn, data, event) {\n fn(data, event);\n }, 100);\n return _this;\n }\n\n _createClass(ColorPicker, [{\n key: 'render',\n value: function render() {\n var optionalEvents = {};\n if (this.props.onSwatchHover) {\n optionalEvents.onSwatchHover = this.handleSwatchHover;\n }\n\n return _react2.default.createElement(Picker, _extends({}, this.props, this.state, {\n onChange: this.handleChange\n }, optionalEvents));\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, state) {\n return _extends({}, _color2.default.toState(nextProps.color, state.oldHue));\n }\n }]);\n\n return ColorPicker;\n }(_react.PureComponent || _react.Component);\n\n ColorPicker.propTypes = _extends({}, Picker.propTypes);\n\n ColorPicker.defaultProps = _extends({}, Picker.defaultProps, {\n color: {\n h: 250,\n s: 0.50,\n l: 0.20,\n a: 1\n }\n });\n\n return ColorPicker;\n};\n\nexports.default = ColorWrap;","export var red = {\"50\":\"#ffebee\",\"100\":\"#ffcdd2\",\"200\":\"#ef9a9a\",\"300\":\"#e57373\",\"400\":\"#ef5350\",\"500\":\"#f44336\",\"600\":\"#e53935\",\"700\":\"#d32f2f\",\"800\":\"#c62828\",\"900\":\"#b71c1c\",\"a100\":\"#ff8a80\",\"a200\":\"#ff5252\",\"a400\":\"#ff1744\",\"a700\":\"#d50000\"};\nexport var pink = {\"50\":\"#fce4ec\",\"100\":\"#f8bbd0\",\"200\":\"#f48fb1\",\"300\":\"#f06292\",\"400\":\"#ec407a\",\"500\":\"#e91e63\",\"600\":\"#d81b60\",\"700\":\"#c2185b\",\"800\":\"#ad1457\",\"900\":\"#880e4f\",\"a100\":\"#ff80ab\",\"a200\":\"#ff4081\",\"a400\":\"#f50057\",\"a700\":\"#c51162\"};\nexport var purple = {\"50\":\"#f3e5f5\",\"100\":\"#e1bee7\",\"200\":\"#ce93d8\",\"300\":\"#ba68c8\",\"400\":\"#ab47bc\",\"500\":\"#9c27b0\",\"600\":\"#8e24aa\",\"700\":\"#7b1fa2\",\"800\":\"#6a1b9a\",\"900\":\"#4a148c\",\"a100\":\"#ea80fc\",\"a200\":\"#e040fb\",\"a400\":\"#d500f9\",\"a700\":\"#aa00ff\"};\nexport var deepPurple = {\"50\":\"#ede7f6\",\"100\":\"#d1c4e9\",\"200\":\"#b39ddb\",\"300\":\"#9575cd\",\"400\":\"#7e57c2\",\"500\":\"#673ab7\",\"600\":\"#5e35b1\",\"700\":\"#512da8\",\"800\":\"#4527a0\",\"900\":\"#311b92\",\"a100\":\"#b388ff\",\"a200\":\"#7c4dff\",\"a400\":\"#651fff\",\"a700\":\"#6200ea\"};\nexport var indigo = {\"50\":\"#e8eaf6\",\"100\":\"#c5cae9\",\"200\":\"#9fa8da\",\"300\":\"#7986cb\",\"400\":\"#5c6bc0\",\"500\":\"#3f51b5\",\"600\":\"#3949ab\",\"700\":\"#303f9f\",\"800\":\"#283593\",\"900\":\"#1a237e\",\"a100\":\"#8c9eff\",\"a200\":\"#536dfe\",\"a400\":\"#3d5afe\",\"a700\":\"#304ffe\"};\nexport var blue = {\"50\":\"#e3f2fd\",\"100\":\"#bbdefb\",\"200\":\"#90caf9\",\"300\":\"#64b5f6\",\"400\":\"#42a5f5\",\"500\":\"#2196f3\",\"600\":\"#1e88e5\",\"700\":\"#1976d2\",\"800\":\"#1565c0\",\"900\":\"#0d47a1\",\"a100\":\"#82b1ff\",\"a200\":\"#448aff\",\"a400\":\"#2979ff\",\"a700\":\"#2962ff\"};\nexport var lightBlue = {\"50\":\"#e1f5fe\",\"100\":\"#b3e5fc\",\"200\":\"#81d4fa\",\"300\":\"#4fc3f7\",\"400\":\"#29b6f6\",\"500\":\"#03a9f4\",\"600\":\"#039be5\",\"700\":\"#0288d1\",\"800\":\"#0277bd\",\"900\":\"#01579b\",\"a100\":\"#80d8ff\",\"a200\":\"#40c4ff\",\"a400\":\"#00b0ff\",\"a700\":\"#0091ea\"};\nexport var cyan = {\"50\":\"#e0f7fa\",\"100\":\"#b2ebf2\",\"200\":\"#80deea\",\"300\":\"#4dd0e1\",\"400\":\"#26c6da\",\"500\":\"#00bcd4\",\"600\":\"#00acc1\",\"700\":\"#0097a7\",\"800\":\"#00838f\",\"900\":\"#006064\",\"a100\":\"#84ffff\",\"a200\":\"#18ffff\",\"a400\":\"#00e5ff\",\"a700\":\"#00b8d4\"};\nexport var teal = {\"50\":\"#e0f2f1\",\"100\":\"#b2dfdb\",\"200\":\"#80cbc4\",\"300\":\"#4db6ac\",\"400\":\"#26a69a\",\"500\":\"#009688\",\"600\":\"#00897b\",\"700\":\"#00796b\",\"800\":\"#00695c\",\"900\":\"#004d40\",\"a100\":\"#a7ffeb\",\"a200\":\"#64ffda\",\"a400\":\"#1de9b6\",\"a700\":\"#00bfa5\"};\nexport var green = {\"50\":\"#e8f5e9\",\"100\":\"#c8e6c9\",\"200\":\"#a5d6a7\",\"300\":\"#81c784\",\"400\":\"#66bb6a\",\"500\":\"#4caf50\",\"600\":\"#43a047\",\"700\":\"#388e3c\",\"800\":\"#2e7d32\",\"900\":\"#1b5e20\",\"a100\":\"#b9f6ca\",\"a200\":\"#69f0ae\",\"a400\":\"#00e676\",\"a700\":\"#00c853\"};\nexport var lightGreen = {\"50\":\"#f1f8e9\",\"100\":\"#dcedc8\",\"200\":\"#c5e1a5\",\"300\":\"#aed581\",\"400\":\"#9ccc65\",\"500\":\"#8bc34a\",\"600\":\"#7cb342\",\"700\":\"#689f38\",\"800\":\"#558b2f\",\"900\":\"#33691e\",\"a100\":\"#ccff90\",\"a200\":\"#b2ff59\",\"a400\":\"#76ff03\",\"a700\":\"#64dd17\"};\nexport var lime = {\"50\":\"#f9fbe7\",\"100\":\"#f0f4c3\",\"200\":\"#e6ee9c\",\"300\":\"#dce775\",\"400\":\"#d4e157\",\"500\":\"#cddc39\",\"600\":\"#c0ca33\",\"700\":\"#afb42b\",\"800\":\"#9e9d24\",\"900\":\"#827717\",\"a100\":\"#f4ff81\",\"a200\":\"#eeff41\",\"a400\":\"#c6ff00\",\"a700\":\"#aeea00\"};\nexport var yellow = {\"50\":\"#fffde7\",\"100\":\"#fff9c4\",\"200\":\"#fff59d\",\"300\":\"#fff176\",\"400\":\"#ffee58\",\"500\":\"#ffeb3b\",\"600\":\"#fdd835\",\"700\":\"#fbc02d\",\"800\":\"#f9a825\",\"900\":\"#f57f17\",\"a100\":\"#ffff8d\",\"a200\":\"#ffff00\",\"a400\":\"#ffea00\",\"a700\":\"#ffd600\"};\nexport var amber = {\"50\":\"#fff8e1\",\"100\":\"#ffecb3\",\"200\":\"#ffe082\",\"300\":\"#ffd54f\",\"400\":\"#ffca28\",\"500\":\"#ffc107\",\"600\":\"#ffb300\",\"700\":\"#ffa000\",\"800\":\"#ff8f00\",\"900\":\"#ff6f00\",\"a100\":\"#ffe57f\",\"a200\":\"#ffd740\",\"a400\":\"#ffc400\",\"a700\":\"#ffab00\"};\nexport var orange = {\"50\":\"#fff3e0\",\"100\":\"#ffe0b2\",\"200\":\"#ffcc80\",\"300\":\"#ffb74d\",\"400\":\"#ffa726\",\"500\":\"#ff9800\",\"600\":\"#fb8c00\",\"700\":\"#f57c00\",\"800\":\"#ef6c00\",\"900\":\"#e65100\",\"a100\":\"#ffd180\",\"a200\":\"#ffab40\",\"a400\":\"#ff9100\",\"a700\":\"#ff6d00\"};\nexport var deepOrange = {\"50\":\"#fbe9e7\",\"100\":\"#ffccbc\",\"200\":\"#ffab91\",\"300\":\"#ff8a65\",\"400\":\"#ff7043\",\"500\":\"#ff5722\",\"600\":\"#f4511e\",\"700\":\"#e64a19\",\"800\":\"#d84315\",\"900\":\"#bf360c\",\"a100\":\"#ff9e80\",\"a200\":\"#ff6e40\",\"a400\":\"#ff3d00\",\"a700\":\"#dd2c00\"};\nexport var brown = {\"50\":\"#efebe9\",\"100\":\"#d7ccc8\",\"200\":\"#bcaaa4\",\"300\":\"#a1887f\",\"400\":\"#8d6e63\",\"500\":\"#795548\",\"600\":\"#6d4c41\",\"700\":\"#5d4037\",\"800\":\"#4e342e\",\"900\":\"#3e2723\"};\nexport var grey = {\"50\":\"#fafafa\",\"100\":\"#f5f5f5\",\"200\":\"#eeeeee\",\"300\":\"#e0e0e0\",\"400\":\"#bdbdbd\",\"500\":\"#9e9e9e\",\"600\":\"#757575\",\"700\":\"#616161\",\"800\":\"#424242\",\"900\":\"#212121\"};\nexport var blueGrey = {\"50\":\"#eceff1\",\"100\":\"#cfd8dc\",\"200\":\"#b0bec5\",\"300\":\"#90a4ae\",\"400\":\"#78909c\",\"500\":\"#607d8b\",\"600\":\"#546e7a\",\"700\":\"#455a64\",\"800\":\"#37474f\",\"900\":\"#263238\"};\nexport var darkText = {\"primary\":\"rgba(0, 0, 0, 0.87)\",\"secondary\":\"rgba(0, 0, 0, 0.54)\",\"disabled\":\"rgba(0, 0, 0, 0.38)\",\"dividers\":\"rgba(0, 0, 0, 0.12)\"};\nexport var lightText = {\"primary\":\"rgba(255, 255, 255, 1)\",\"secondary\":\"rgba(255, 255, 255, 0.7)\",\"disabled\":\"rgba(255, 255, 255, 0.5)\",\"dividers\":\"rgba(255, 255, 255, 0.12)\"};\nexport var darkIcons = {\"active\":\"rgba(0, 0, 0, 0.54)\",\"inactive\":\"rgba(0, 0, 0, 0.38)\"};\nexport var lightIcons = {\"active\":\"rgba(255, 255, 255, 1)\",\"inactive\":\"rgba(255, 255, 255, 0.5)\"};\nexport var white = \"#ffffff\";\nexport var black = \"#000000\";\n\nexport default {\n red: red,\n pink: pink,\n purple: purple,\n deepPurple: deepPurple,\n indigo: indigo,\n blue: blue,\n lightBlue: lightBlue,\n cyan: cyan,\n teal: teal,\n green: green,\n lightGreen: lightGreen,\n lime: lime,\n yellow: yellow,\n amber: amber,\n orange: orange,\n deepOrange: deepOrange,\n brown: brown,\n grey: grey,\n blueGrey: blueGrey,\n darkText: darkText,\n lightText: lightText,\n darkIcons: darkIcons,\n lightIcons: lightIcons,\n white: white,\n black: black\n};\n","var rbush = require('rbush');\nvar helpers = require('@turf/helpers');\nvar meta = require('@turf/meta');\nvar turfBBox = require('@turf/bbox').default;\nvar featureEach = meta.featureEach;\nvar coordEach = meta.coordEach;\nvar polygon = helpers.polygon;\nvar featureCollection = helpers.featureCollection;\n\n/**\n * GeoJSON implementation of [RBush](https://github.com/mourner/rbush#rbush) spatial index.\n *\n * @name rbush\n * @param {number} [maxEntries=9] defines the maximum number of entries in a tree node. 9 (used by default) is a\n * reasonable choice for most applications. Higher value means faster insertion and slower search, and vice versa.\n * @returns {RBush} GeoJSON RBush\n * @example\n * var geojsonRbush = require('geojson-rbush').default;\n * var tree = geojsonRbush();\n */\nfunction geojsonRbush(maxEntries) {\n var tree = rbush(maxEntries);\n /**\n * [insert](https://github.com/mourner/rbush#data-format)\n *\n * @param {Feature} feature insert single GeoJSON Feature\n * @returns {RBush} GeoJSON RBush\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n * tree.insert(poly)\n */\n tree.insert = function (feature) {\n if (feature.type !== 'Feature') throw new Error('invalid feature');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n return rbush.prototype.insert.call(this, feature);\n };\n\n /**\n * [load](https://github.com/mourner/rbush#bulk-inserting-data)\n *\n * @param {FeatureCollection|Array<Feature>} features load entire GeoJSON FeatureCollection\n * @returns {RBush} GeoJSON RBush\n * @example\n * var polys = turf.polygons([\n * [[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]],\n * [[[-93, 32], [-83, 32], [-83, 39], [-93, 39], [-93, 32]]]\n * ]);\n * tree.load(polys);\n */\n tree.load = function (features) {\n var load = [];\n // Load an Array of Features\n if (Array.isArray(features)) {\n features.forEach(function (feature) {\n if (feature.type !== 'Feature') throw new Error('invalid features');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n load.push(feature);\n });\n } else {\n // Load a FeatureCollection\n featureEach(features, function (feature) {\n if (feature.type !== 'Feature') throw new Error('invalid features');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n load.push(feature);\n });\n }\n return rbush.prototype.load.call(this, load);\n };\n\n /**\n * [remove](https://github.com/mourner/rbush#removing-data)\n *\n * @param {Feature} feature remove single GeoJSON Feature\n * @param {Function} equals Pass a custom equals function to compare by value for removal.\n * @returns {RBush} GeoJSON RBush\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n *\n * tree.remove(poly);\n */\n tree.remove = function (feature, equals) {\n if (feature.type !== 'Feature') throw new Error('invalid feature');\n feature.bbox = feature.bbox ? feature.bbox : turfBBox(feature);\n return rbush.prototype.remove.call(this, feature, equals);\n };\n\n /**\n * [clear](https://github.com/mourner/rbush#removing-data)\n *\n * @returns {RBush} GeoJSON Rbush\n * @example\n * tree.clear()\n */\n tree.clear = function () {\n return rbush.prototype.clear.call(this);\n };\n\n /**\n * [search](https://github.com/mourner/rbush#search)\n *\n * @param {BBox|FeatureCollection|Feature} geojson search with GeoJSON\n * @returns {FeatureCollection} all features that intersects with the given GeoJSON.\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n *\n * tree.search(poly);\n */\n tree.search = function (geojson) {\n var features = rbush.prototype.search.call(this, this.toBBox(geojson));\n return featureCollection(features);\n };\n\n /**\n * [collides](https://github.com/mourner/rbush#collisions)\n *\n * @param {BBox|FeatureCollection|Feature} geojson collides with GeoJSON\n * @returns {boolean} true if there are any items intersecting the given GeoJSON, otherwise false.\n * @example\n * var poly = turf.polygon([[[-78, 41], [-67, 41], [-67, 48], [-78, 48], [-78, 41]]]);\n *\n * tree.collides(poly);\n */\n tree.collides = function (geojson) {\n return rbush.prototype.collides.call(this, this.toBBox(geojson));\n };\n\n /**\n * [all](https://github.com/mourner/rbush#search)\n *\n * @returns {FeatureCollection} all the features in RBush\n * @example\n * tree.all()\n */\n tree.all = function () {\n var features = rbush.prototype.all.call(this);\n return featureCollection(features);\n };\n\n /**\n * [toJSON](https://github.com/mourner/rbush#export-and-import)\n *\n * @returns {any} export data as JSON object\n * @example\n * var exported = tree.toJSON()\n */\n tree.toJSON = function () {\n return rbush.prototype.toJSON.call(this);\n };\n\n /**\n * [fromJSON](https://github.com/mourner/rbush#export-and-import)\n *\n * @param {any} json import previously exported data\n * @returns {RBush} GeoJSON RBush\n * @example\n * var exported = {\n * \"children\": [\n * {\n * \"type\": \"Feature\",\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * },\n * \"properties\": {},\n * \"bbox\": [110, 50, 110, 50]\n * }\n * ],\n * \"height\": 1,\n * \"leaf\": true,\n * \"minX\": 110,\n * \"minY\": 50,\n * \"maxX\": 110,\n * \"maxY\": 50\n * }\n * tree.fromJSON(exported)\n */\n tree.fromJSON = function (json) {\n return rbush.prototype.fromJSON.call(this, json);\n };\n\n /**\n * Converts GeoJSON to {minX, minY, maxX, maxY} schema\n *\n * @private\n * @param {BBox|FeatureCollection|Feature} geojson feature(s) to retrieve BBox from\n * @returns {Object} converted to {minX, minY, maxX, maxY}\n */\n tree.toBBox = function (geojson) {\n var bbox;\n if (geojson.bbox) bbox = geojson.bbox;\n else if (Array.isArray(geojson) && geojson.length === 4) bbox = geojson;\n else if (Array.isArray(geojson) && geojson.length === 6) bbox = [geojson[0], geojson[1], geojson[3], geojson[4]];\n else if (geojson.type === 'Feature') bbox = turfBBox(geojson);\n else if (geojson.type === 'FeatureCollection') bbox = turfBBox(geojson);\n else throw new Error('invalid geojson')\n\n return {\n minX: bbox[0],\n minY: bbox[1],\n maxX: bbox[2],\n maxY: bbox[3]\n };\n };\n return tree;\n}\n\nmodule.exports = geojsonRbush;\nmodule.exports.default = geojsonRbush;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar helpers_1 = require(\"@turf/helpers\");\nvar invariant_1 = require(\"@turf/invariant\");\nvar meta_1 = require(\"@turf/meta\");\n/**\n * Creates a {@link FeatureCollection} of 2-vertex {@link LineString} segments from a\n * {@link LineString|(Multi)LineString} or {@link Polygon|(Multi)Polygon}.\n *\n * @name lineSegment\n * @param {GeoJSON} geojson GeoJSON Polygon or LineString\n * @returns {FeatureCollection<LineString>} 2-vertex line segments\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n * var segments = turf.lineSegment(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, segments]\n */\nfunction lineSegment(geojson) {\n if (!geojson) {\n throw new Error(\"geojson is required\");\n }\n var results = [];\n meta_1.flattenEach(geojson, function (feature) {\n lineSegmentFeature(feature, results);\n });\n return helpers_1.featureCollection(results);\n}\n/**\n * Line Segment\n *\n * @private\n * @param {Feature<LineString|Polygon>} geojson Line or polygon feature\n * @param {Array} results push to results\n * @returns {void}\n */\nfunction lineSegmentFeature(geojson, results) {\n var coords = [];\n var geometry = geojson.geometry;\n if (geometry !== null) {\n switch (geometry.type) {\n case \"Polygon\":\n coords = invariant_1.getCoords(geometry);\n break;\n case \"LineString\":\n coords = [invariant_1.getCoords(geometry)];\n }\n coords.forEach(function (coord) {\n var segments = createSegments(coord, geojson.properties);\n segments.forEach(function (segment) {\n segment.id = results.length;\n results.push(segment);\n });\n });\n }\n}\n/**\n * Create Segments from LineString coordinates\n *\n * @private\n * @param {Array<Array<number>>} coords LineString coordinates\n * @param {*} properties GeoJSON properties\n * @returns {Array<Feature<LineString>>} line segments\n */\nfunction createSegments(coords, properties) {\n var segments = [];\n coords.reduce(function (previousCoords, currentCoords) {\n var segment = helpers_1.lineString([previousCoords, currentCoords], properties);\n segment.bbox = bbox(previousCoords, currentCoords);\n segments.push(segment);\n return currentCoords;\n });\n return segments;\n}\n/**\n * Create BBox between two coordinates (faster than @turf/bbox)\n *\n * @private\n * @param {Array<number>} coords1 Point coordinate\n * @param {Array<number>} coords2 Point coordinate\n * @returns {BBox} [west, south, east, north]\n */\nfunction bbox(coords1, coords2) {\n var x1 = coords1[0];\n var y1 = coords1[1];\n var x2 = coords2[0];\n var y2 = coords2[1];\n var west = (x1 < x2) ? x1 : x2;\n var south = (y1 < y2) ? y1 : y2;\n var east = (x1 > x2) ? x1 : x2;\n var north = (y1 > y2) ? y1 : y2;\n return [west, south, east, north];\n}\nexports.default = lineSegment;\n","var objectKeys = require('object-keys');\nvar isArguments = require('is-arguments');\nvar is = require('object-is');\nvar isRegex = require('is-regex');\nvar flags = require('regexp.prototype.flags');\nvar isDate = require('is-date-object');\n\nvar getTime = Date.prototype.getTime;\n\nfunction deepEqual(actual, expected, options) {\n var opts = options || {};\n\n // 7.1. All identical values are equivalent, as determined by ===.\n if (opts.strict ? is(actual, expected) : actual === expected) {\n return true;\n }\n\n // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.\n if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {\n return opts.strict ? is(actual, expected) : actual == expected;\n }\n\n /*\n * 7.4. For all other Object pairs, including Array objects, equivalence is\n * determined by having the same number of owned properties (as verified\n * with Object.prototype.hasOwnProperty.call), the same set of keys\n * (although not necessarily the same order), equivalent values for every\n * corresponding key, and an identical 'prototype' property. Note: this\n * accounts for both named and indexed properties on Arrays.\n */\n // eslint-disable-next-line no-use-before-define\n return objEquiv(actual, expected, opts);\n}\n\nfunction isUndefinedOrNull(value) {\n return value === null || value === undefined;\n}\n\nfunction isBuffer(x) {\n if (!x || typeof x !== 'object' || typeof x.length !== 'number') {\n return false;\n }\n if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {\n return false;\n }\n if (x.length > 0 && typeof x[0] !== 'number') {\n return false;\n }\n return true;\n}\n\nfunction objEquiv(a, b, opts) {\n /* eslint max-statements: [2, 50] */\n var i, key;\n if (typeof a !== typeof b) { return false; }\n if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; }\n\n // an identical 'prototype' property.\n if (a.prototype !== b.prototype) { return false; }\n\n if (isArguments(a) !== isArguments(b)) { return false; }\n\n var aIsRegex = isRegex(a);\n var bIsRegex = isRegex(b);\n if (aIsRegex !== bIsRegex) { return false; }\n if (aIsRegex || bIsRegex) {\n return a.source === b.source && flags(a) === flags(b);\n }\n\n if (isDate(a) && isDate(b)) {\n return getTime.call(a) === getTime.call(b);\n }\n\n var aIsBuffer = isBuffer(a);\n var bIsBuffer = isBuffer(b);\n if (aIsBuffer !== bIsBuffer) { return false; }\n if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here\n if (a.length !== b.length) { return false; }\n for (i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) { return false; }\n }\n return true;\n }\n\n if (typeof a !== typeof b) { return false; }\n\n try {\n var ka = objectKeys(a);\n var kb = objectKeys(b);\n } catch (e) { // happens when one is a string literal and the other isn't\n return false;\n }\n // having the same number of owned properties (keys incorporates hasOwnProperty)\n if (ka.length !== kb.length) { return false; }\n\n // the same set of keys (although not necessarily the same order),\n ka.sort();\n kb.sort();\n // ~~~cheap key test\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] != kb[i]) { return false; }\n }\n // equivalent values for every corresponding key, and ~~~possibly expensive deep test\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!deepEqual(a[key], b[key], opts)) { return false; }\n }\n\n return true;\n}\n\nmodule.exports = deepEqual;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\nvar $Object = Object;\nvar $TypeError = TypeError;\n\nmodule.exports = function flags() {\n\tif (this != null && this !== $Object(this)) {\n\t\tthrow new $TypeError('RegExp.prototype.flags getter called on non-object');\n\t}\n\tvar result = '';\n\tif (this.global) {\n\t\tresult += 'g';\n\t}\n\tif (this.ignoreCase) {\n\t\tresult += 'i';\n\t}\n\tif (this.multiline) {\n\t\tresult += 'm';\n\t}\n\tif (this.dotAll) {\n\t\tresult += 's';\n\t}\n\tif (this.unicode) {\n\t\tresult += 'u';\n\t}\n\tif (this.sticky) {\n\t\tresult += 'y';\n\t}\n\treturn result;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar $gOPD = Object.getOwnPropertyDescriptor;\nvar $TypeError = TypeError;\n\nmodule.exports = function getPolyfill() {\n\tif (!supportsDescriptors) {\n\t\tthrow new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tif ((/a/mig).flags === 'gim') {\n\t\tvar descriptor = $gOPD(RegExp.prototype, 'flags');\n\t\tif (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') {\n\t\t\treturn descriptor.get;\n\t\t}\n\t}\n\treturn implementation;\n};\n","// Describes the arrow style of polylines\nexport const ArrowStyles = {\n NONE: 0,\n FORWARD: 1,\n BACKWARD: 2,\n BOTH: 3,\n};\n\nexport const DEFAULT_ARROWS = 1;\nexport const MAX_ARROWS = 3;\n\nexport const DEFAULT_STYLE = {\n arrowColor: [0, 0, 0, 1],\n arrowCount: DEFAULT_ARROWS,\n arrowStyle: ArrowStyles.NONE,\n fillColor: [0, 0, 0, 1],\n lineColor: [0, 0, 0, 1],\n lineWidthMeters: 5,\n outlineRadiusMeters: 0,\n opacity: 1,\n zLevel: 0,\n};\n","import { PolygonLayer } from '@deck.gl/layers';\nimport { point, polygon } from '@turf/helpers';\nimport turfBbox from '@turf/bbox';\nimport turfBboxPolygon from '@turf/bbox-polygon';\nimport turfBuffer from '@turf/buffer';\nimport turfDifference from '@turf/difference';\nimport turfDistance from '@turf/distance';\n\nconst POLYGON_LINE_COLOR = [0, 255, 0, 255];\nconst POLYGON_FILL_COLOR = [255, 255, 255, 90];\nconst POLYGON_LINE_WIDTH = 2;\nconst POLYGON_DASHES = [20, 20];\nconst POLYGON_THRESHOLD = 0.01;\nconst EXPANSION_KM = 10;\nconst LAYER_ID_VIEW = 'DeckDrawerView';\nconst LAYER_ID_PICK = 'DeckDrawerPick';\n\nexport const SELECTION_TYPE = {\n NONE: null,\n RECTANGLE: 'rectangle',\n POLYGON: 'polygon',\n};\n\nexport default class DeckDrawer {\n nebula: Record<string, any>;\n usePolygon: boolean;\n validPolygon: boolean;\n landPoints: [number, number][];\n mousePoints: [number, number][];\n\n constructor(nebula: Record<string, any>) {\n this.nebula = nebula;\n this.usePolygon = false;\n this.landPoints = [];\n this.mousePoints = [];\n }\n\n _getLayerIds() {\n // TODO: sort by mouse priority\n return this.nebula.deckgl.props.layers\n .filter((l) => l && l.props && l.props.nebulaLayer && l.props.nebulaLayer.enableSelection)\n .map((l) => l.id);\n }\n\n _selectFromPickingInfos(pickingInfos: Record<string, any>[]) {\n const objects = pickingInfos.map(\n ({ layer, index, object }) =>\n object.original || layer.props.nebulaLayer.deckCache.originals[index]\n );\n this.nebula.props.onSelection(objects);\n }\n\n _getBoundingBox(): Record<string, any> {\n const { mousePoints } = this;\n const allX = mousePoints.map((mousePoint) => mousePoint[0]);\n const allY = mousePoints.map((mousePoint) => mousePoint[1]);\n const x = Math.min(...allX);\n const y = Math.min(...allY);\n const maxX = Math.max(...allX);\n const maxY = Math.max(...allY);\n\n return { x, y, width: maxX - x, height: maxY - y };\n }\n\n _selectRectangleObjects() {\n if (this.landPoints.length !== 2) return;\n\n const [x1, y1] = this.mousePoints[0];\n const [x2, y2] = this.mousePoints[1];\n const pickingInfos = this.nebula.deckgl.pickObjects({\n x: Math.min(x1, x2),\n y: Math.min(y1, y2),\n width: Math.abs(x2 - x1),\n height: Math.abs(y2 - y1),\n layerIds: this._getLayerIds(),\n });\n\n this._selectFromPickingInfos(pickingInfos);\n }\n\n _selectPolygonObjects() {\n const pickingInfos = this.nebula.deckgl.pickObjects({\n ...this._getBoundingBox(),\n layerIds: [LAYER_ID_PICK, ...this._getLayerIds()],\n });\n\n this._selectFromPickingInfos(pickingInfos.filter((item) => item.layer.id !== LAYER_ID_PICK));\n }\n\n _getMousePosFromEvent(event: Record<string, any>): [number, number] {\n const { offsetX, offsetY } = event;\n return [offsetX, offsetY];\n }\n\n handleEvent(\n event: Record<string, any>,\n lngLat: [number, number],\n selectionType: number\n ): { redraw: boolean; deactivate: boolean } {\n // capture all events (mouse-up is needed to prevent us stuck in moving map)\n if (event.type !== 'mouseup') event.stopPropagation();\n // @ts-ignore\n this.usePolygon = selectionType === SELECTION_TYPE.POLYGON;\n\n let redraw = false;\n let deactivate = false;\n\n const { usePolygon, landPoints, mousePoints } = this;\n\n if (event.type === 'mousedown') {\n if (usePolygon && landPoints.length) {\n // if landPoints.length is zero we want to insert two points (so we let it run the else)\n // also don't insert if polygon is invalid\n if (this.landPoints.length < 3 || this.validPolygon) {\n landPoints.push(lngLat);\n mousePoints.push(this._getMousePosFromEvent(event));\n }\n } else {\n this.landPoints = [lngLat, lngLat];\n const m = this._getMousePosFromEvent(event);\n this.mousePoints = [m, m];\n }\n redraw = true;\n } else if (event.type === 'mousemove' && landPoints.length) {\n // update last point\n landPoints[landPoints.length - 1] = lngLat;\n mousePoints[mousePoints.length - 1] = this._getMousePosFromEvent(event);\n redraw = true;\n } else if (event.type === 'mouseup') {\n if (usePolygon) {\n // check to see if completed\n // TODO: Maybe double-click to finish?\n if (\n landPoints.length > 4 &&\n turfDistance(landPoints[0], landPoints[landPoints.length - 1]) < POLYGON_THRESHOLD &&\n this.validPolygon\n ) {\n this._selectPolygonObjects();\n this.reset();\n redraw = true;\n deactivate = true;\n }\n } else {\n this._selectRectangleObjects();\n this.reset();\n redraw = true;\n deactivate = true;\n }\n }\n\n return { redraw, deactivate };\n }\n\n reset() {\n this.landPoints = [];\n this.mousePoints = [];\n }\n\n _makeStartPointHighlight(center: [number, number]): number[] {\n const buffer = turfBuffer(point(center), POLYGON_THRESHOLD / 4.0);\n // @ts-ignore\n return turfBboxPolygon(turfBbox(buffer)).geometry.coordinates;\n }\n\n render() {\n const data = [];\n const dataPick = [];\n\n if (!this.usePolygon && this.landPoints.length === 2) {\n // Use mouse points instead of land points so we get the right shape\n // no matter what bearing is.\n const [[x1, y1], [x2, y2]] = this.mousePoints;\n const selPolygon = [\n [x1, y1],\n [x1, y2],\n [x2, y2],\n [x2, y1],\n [x1, y1],\n ].map((mousePos) => this.nebula.unprojectMousePosition(mousePos));\n data.push({\n polygon: selPolygon,\n lineColor: POLYGON_LINE_COLOR,\n fillColor: POLYGON_FILL_COLOR,\n });\n } else if (this.usePolygon && this.landPoints.length) {\n data.push({\n polygon: this.landPoints,\n lineColor: POLYGON_LINE_COLOR,\n fillColor: POLYGON_FILL_COLOR,\n });\n\n // Hack: use a polygon to hide the outside, because pickObjects()\n // does not support polygons\n if (this.landPoints.length >= 3) {\n const landPointsPoly = polygon([[...this.landPoints, this.landPoints[0]]]);\n const bigBuffer = turfBuffer(point(this.landPoints[0]), EXPANSION_KM);\n let bigPolygon;\n try {\n // turfDifference throws an exception if the polygon\n // intersects with itself\n bigPolygon = turfDifference(bigBuffer, landPointsPoly);\n dataPick.push({\n polygon: bigPolygon.geometry.coordinates,\n fillColor: [0, 0, 0, 1],\n });\n this.validPolygon = true;\n } catch (e) {\n // invalid selection polygon\n this.validPolygon = false;\n }\n }\n }\n\n if (this.landPoints.length) {\n // highlight start point\n data.push({\n polygon: this._makeStartPointHighlight(this.landPoints[0]),\n lineColor: [0, 0, 0, 0],\n fillColor: POLYGON_LINE_COLOR,\n });\n }\n\n // Hack to make the PolygonLayer() stay active,\n // otherwise it takes 3 seconds (!) to init!\n // TODO: fix this\n data.push({ polygon: [[0, 0]] });\n dataPick.push({ polygon: [[0, 0]] });\n\n return [\n new PolygonLayer({\n id: LAYER_ID_VIEW,\n data,\n // @ts-ignore\n fp64: false,\n opacity: 1.0,\n pickable: false,\n lineWidthMinPixels: POLYGON_LINE_WIDTH,\n lineWidthMaxPixels: POLYGON_LINE_WIDTH,\n lineDashJustified: true,\n getLineDashArray: (x) => POLYGON_DASHES,\n // @ts-ignore\n getLineColor: (obj) => obj.lineColor || [0, 0, 0, 255],\n // @ts-ignore\n getFillColor: (obj) => obj.fillColor || [0, 0, 0, 255],\n // @ts-ignore\n getPolygon: (o) => o.polygon,\n }),\n new PolygonLayer({\n id: LAYER_ID_PICK,\n data: dataPick,\n // @ts-ignore\n getLineColor: (obj) => obj.lineColor || [0, 0, 0, 255],\n // @ts-ignore\n getFillColor: (obj) => obj.fillColor || [0, 0, 0, 255],\n // @ts-ignore\n fp64: false,\n opacity: 1.0,\n stroked: false,\n pickable: true,\n // @ts-ignore\n getPolygon: (o) => o.polygon,\n }),\n ];\n }\n}\n","import { Position } from 'geojson';\n\nexport default class LayerMouseEvent {\n canceled: boolean;\n // original item that this event is related to\n data: Record<string, any>;\n // internal nebula info about the object\n metadata: Record<string, any>;\n // the mouse [lng,lat] raycasted onto the ground\n groundPoint: Position;\n // browser event\n nativeEvent: MouseEvent;\n // reference to nebula\n nebula: Record<string, any>;\n\n constructor(\n nativeEvent: MouseEvent,\n { data, groundPoint, nebula, metadata }: Record<string, any>\n ) {\n this.nativeEvent = nativeEvent;\n\n this.data = data;\n this.groundPoint = groundPoint;\n this.nebula = nebula;\n this.metadata = metadata;\n }\n\n stopPropagation() {\n this.nativeEvent.stopPropagation();\n this.canceled = true;\n }\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n","export {WebMercatorViewport as default} from '@math.gl/web-mercator';\nexport * from '@math.gl/web-mercator';\n","/* eslint-disable prettier/prettier */\nimport bbox from '@turf/bbox';\nimport turfCentroid from '@turf/centroid';\nimport turfBearing from '@turf/bearing';\nimport bboxPolygon from '@turf/bbox-polygon';\nimport { point, featureCollection } from '@turf/helpers';\nimport polygonToLine from '@turf/polygon-to-line';\nimport { coordEach } from '@turf/meta';\nimport turfDistance from '@turf/distance';\nimport turfTransformScale from '@turf/transform-scale';\nimport { getCoord, getGeom } from '@turf/invariant';\nimport { FeatureCollection, Position } from '../geojson-types';\nimport {\n ModeProps,\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n EditHandleFeature,\n GuideFeatureCollection,\n} from '../types';\nimport { getPickedEditHandle } from '../utils';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class ScaleMode extends GeoJsonEditMode {\n _geometryBeingScaled: FeatureCollection | null | undefined;\n _selectedEditHandle: EditHandleFeature | null | undefined;\n _cornerGuidePoints: Array<EditHandleFeature>;\n _cursor: string | null | undefined;\n _isScaling = false;\n\n _isSinglePointGeometrySelected = (geometry: FeatureCollection | null | undefined): boolean => {\n const { features } = geometry || {};\n if (Array.isArray(features) && features.length === 1) {\n // @ts-ignore\n const { type } = getGeom(features[0]);\n return type === 'Point';\n }\n return false;\n };\n\n _getOppositeScaleHandle = (selectedHandle: EditHandleFeature) => {\n const selectedHandleIndex =\n selectedHandle &&\n selectedHandle.properties &&\n Array.isArray(selectedHandle.properties.positionIndexes) &&\n selectedHandle.properties.positionIndexes[0];\n\n if (typeof selectedHandleIndex !== 'number') {\n return null;\n }\n const guidePointCount = this._cornerGuidePoints.length;\n const oppositeIndex = (selectedHandleIndex + guidePointCount / 2) % guidePointCount;\n return this._cornerGuidePoints.find((p) => {\n if (!Array.isArray(p.properties.positionIndexes)) {\n return false;\n }\n return p.properties.positionIndexes[0] === oppositeIndex;\n });\n };\n\n _getUpdatedData = (props: ModeProps<FeatureCollection>, editedData: FeatureCollection) => {\n let updatedData = new ImmutableFeatureCollection(props.data);\n const selectedIndexes = props.selectedIndexes;\n for (let i = 0; i < selectedIndexes.length; i++) {\n const selectedIndex = selectedIndexes[i];\n const movedFeature = editedData.features[i];\n updatedData = updatedData.replaceGeometry(selectedIndex, movedFeature.geometry);\n }\n return updatedData.getObject();\n };\n\n isEditHandleSelected = (): boolean => Boolean(this._selectedEditHandle);\n\n getScaleAction = (\n startDragPoint: Position,\n currentPoint: Position,\n editType: string,\n props: ModeProps<FeatureCollection>\n ) => {\n if (!this._selectedEditHandle) {\n return null;\n }\n\n const oppositeHandle = this._getOppositeScaleHandle(this._selectedEditHandle);\n const origin = getCoord(oppositeHandle);\n // @ts-ignore\n const scaleFactor = getScaleFactor(origin, startDragPoint, currentPoint);\n // @ts-ignore\n const scaledFeatures: FeatureCollection = turfTransformScale(\n // @ts-ignore\n this._geometryBeingScaled,\n scaleFactor,\n { origin }\n );\n\n return {\n updatedData: this._getUpdatedData(props, scaledFeatures),\n editType,\n editContext: {\n featureIndexes: props.selectedIndexes,\n },\n };\n };\n\n updateCursor = (props: ModeProps<FeatureCollection>) => {\n if (this._selectedEditHandle) {\n if (this._cursor) {\n props.onUpdateCursor(this._cursor);\n }\n const cursorGeometry = this.getSelectedFeaturesAsFeatureCollection(props);\n\n // Get resize cursor direction from the hovered scale editHandle (e.g. nesw or nwse)\n const centroid = turfCentroid(cursorGeometry);\n const bearing = turfBearing(centroid, this._selectedEditHandle);\n const positiveBearing = bearing < 0 ? bearing + 180 : bearing;\n if (\n (positiveBearing >= 0 && positiveBearing <= 90) ||\n (positiveBearing >= 180 && positiveBearing <= 270)\n ) {\n this._cursor = 'nesw-resize';\n props.onUpdateCursor('nesw-resize');\n } else {\n this._cursor = 'nwse-resize';\n props.onUpdateCursor('nwse-resize');\n }\n } else {\n props.onUpdateCursor(null);\n this._cursor = null;\n }\n };\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n if (!this._isScaling) {\n const selectedEditHandle = getPickedEditHandle(event.picks);\n this._selectedEditHandle =\n selectedEditHandle && selectedEditHandle.properties.editHandleType === 'scale'\n ? selectedEditHandle\n : null;\n\n if (selectedEditHandle) {\n this.updateCursor(props);\n }\n }\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this._selectedEditHandle) {\n this._isScaling = true;\n this._geometryBeingScaled = this.getSelectedFeaturesAsFeatureCollection(props);\n }\n }\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>) {\n if (!this._isScaling) {\n return;\n }\n\n props.onUpdateCursor(this._cursor);\n\n const scaleAction = this.getScaleAction(\n event.pointerDownMapCoords,\n event.mapCoords,\n 'scaling',\n props\n );\n if (scaleAction) {\n props.onEdit(scaleAction);\n }\n\n event.cancelPan();\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this._isScaling) {\n // Scale the geometry\n const scaleAction = this.getScaleAction(\n event.pointerDownMapCoords,\n event.mapCoords,\n 'scaled',\n props\n );\n if (scaleAction) {\n props.onEdit(scaleAction);\n }\n\n props.onUpdateCursor(null);\n\n this._geometryBeingScaled = null;\n this._selectedEditHandle = null;\n this._cursor = null;\n this._isScaling = false;\n }\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n this._cornerGuidePoints = [];\n const selectedGeometry = this.getSelectedFeaturesAsFeatureCollection(props);\n\n // Add buffer to the enveloping box if a single Point feature is selected\n if (this._isSinglePointGeometrySelected(selectedGeometry)) {\n return { type: 'FeatureCollection', features: [] };\n }\n\n const boundingBox = bboxPolygon(bbox(selectedGeometry));\n boundingBox.properties.mode = 'scale';\n const cornerGuidePoints = [];\n\n coordEach(boundingBox, (coord, coordIndex) => {\n if (coordIndex < 4) {\n // Get corner midpoint guides from the enveloping box\n const cornerPoint = point(coord, {\n guideType: 'editHandle',\n editHandleType: 'scale',\n positionIndexes: [coordIndex],\n });\n cornerGuidePoints.push(cornerPoint);\n }\n });\n\n this._cornerGuidePoints = cornerGuidePoints;\n // @ts-ignore\n return featureCollection([polygonToLine(boundingBox), ...this._cornerGuidePoints]);\n }\n}\n\nfunction getScaleFactor(centroid: Position, startDragPoint: Position, currentPoint: Position) {\n const startDistance = turfDistance(centroid, startDragPoint);\n const endDistance = turfDistance(centroid, currentPoint);\n return endDistance / startDistance;\n}\n","/* eslint-disable prettier/prettier */\nimport bbox from '@turf/bbox';\nimport turfCentroid from '@turf/centroid';\nimport turfBearing from '@turf/bearing';\nimport bboxPolygon from '@turf/bbox-polygon';\nimport turfDistance from '@turf/distance';\nimport { coordEach } from '@turf/meta';\nimport { getGeom } from '@turf/invariant';\nimport { point, featureCollection, lineString } from '@turf/helpers';\nimport turfTransformRotate from '@turf/transform-rotate';\nimport polygonToLine from '@turf/polygon-to-line';\nimport {\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n ModeProps,\n EditHandleFeature,\n GuideFeatureCollection,\n} from '../types';\nimport { getPickedEditHandle } from '../utils';\nimport { FeatureCollection, Position } from '../geojson-types';\nimport { GeoJsonEditMode, GeoJsonEditAction, getIntermediatePosition } from './geojson-edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class RotateMode extends GeoJsonEditMode {\n _selectedEditHandle: EditHandleFeature | null | undefined;\n _geometryBeingRotated: FeatureCollection | null | undefined;\n _isRotating = false;\n\n _isSinglePointGeometrySelected = (geometry: FeatureCollection | null | undefined): boolean => {\n const { features } = geometry || {};\n if (Array.isArray(features) && features.length === 1) {\n // @ts-ignore\n const { type } = getGeom(features[0]);\n return type === 'Point';\n }\n return false;\n };\n\n getIsRotating = () => this._isRotating;\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const selectedGeometry =\n this._geometryBeingRotated || this.getSelectedFeaturesAsFeatureCollection(props);\n\n if (this._isSinglePointGeometrySelected(selectedGeometry)) {\n return { type: 'FeatureCollection', features: [] };\n }\n\n if (this._isRotating) {\n // Display rotate pivot\n return featureCollection([turfCentroid(selectedGeometry)]) as GuideFeatureCollection;\n }\n\n const boundingBox = bboxPolygon(bbox(selectedGeometry));\n\n let previousCoord = null;\n let topEdgeMidpointCoords = null;\n let longestEdgeLength = 0;\n\n coordEach(boundingBox, (coord) => {\n if (previousCoord) {\n // @ts-ignore\n const edgeMidpoint = getIntermediatePosition(coord, previousCoord);\n if (!topEdgeMidpointCoords || edgeMidpoint[1] > topEdgeMidpointCoords[1]) {\n // Get the top edge midpoint of the enveloping box\n topEdgeMidpointCoords = edgeMidpoint;\n }\n // Get the length of the longest edge of the enveloping box\n const edgeDistance = turfDistance(coord, previousCoord);\n longestEdgeLength = Math.max(longestEdgeLength, edgeDistance);\n }\n previousCoord = coord;\n });\n\n // Scale the length of the line between the rotate handler and the enveloping box\n // relative to the length of the longest edge of the enveloping box\n const rotateHandleCoords = topEdgeMidpointCoords && [\n topEdgeMidpointCoords[0],\n topEdgeMidpointCoords[1] + longestEdgeLength / 1000,\n ];\n\n const lineFromEnvelopeToRotateHandle = lineString([topEdgeMidpointCoords, rotateHandleCoords]);\n const rotateHandle = point(rotateHandleCoords, {\n guideType: 'editHandle',\n editHandleType: 'rotate',\n });\n // @ts-ignore\n return featureCollection([\n // @ts-ignore\n polygonToLine(boundingBox),\n // @ts-ignore\n rotateHandle,\n // @ts-ignore\n lineFromEnvelopeToRotateHandle,\n ]);\n }\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>) {\n if (!this._isRotating) {\n return;\n }\n\n const rotateAction = this.getRotateAction(\n event.pointerDownMapCoords,\n event.mapCoords,\n 'rotating',\n props\n );\n if (rotateAction) {\n props.onEdit(rotateAction);\n }\n\n event.cancelPan();\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n if (!this._isRotating) {\n const selectedEditHandle = getPickedEditHandle(event.picks);\n this._selectedEditHandle =\n selectedEditHandle && selectedEditHandle.properties.editHandleType === 'rotate'\n ? selectedEditHandle\n : null;\n }\n\n this.updateCursor(props);\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this._selectedEditHandle) {\n this._isRotating = true;\n this._geometryBeingRotated = this.getSelectedFeaturesAsFeatureCollection(props);\n }\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this._isRotating) {\n // Rotate the geometry\n const rotateAction = this.getRotateAction(\n event.pointerDownMapCoords,\n event.mapCoords,\n 'rotated',\n props\n );\n\n if (rotateAction) {\n props.onEdit(rotateAction);\n }\n\n this._geometryBeingRotated = null;\n this._selectedEditHandle = null;\n this._isRotating = false;\n }\n }\n\n updateCursor(props: ModeProps<FeatureCollection>) {\n if (this._selectedEditHandle) {\n // TODO: look at doing SVG cursors to get a better \"rotate\" cursor\n props.onUpdateCursor('crosshair');\n } else {\n props.onUpdateCursor(null);\n }\n }\n\n getRotateAction(\n startDragPoint: Position,\n currentPoint: Position,\n editType: string,\n props: ModeProps<FeatureCollection>\n ): GeoJsonEditAction | null | undefined {\n if (!this._geometryBeingRotated) {\n return null;\n }\n\n const centroid = turfCentroid(this._geometryBeingRotated);\n const angle = getRotationAngle(centroid, startDragPoint, currentPoint);\n // @ts-ignore\n const rotatedFeatures: FeatureCollection = turfTransformRotate(\n // @ts-ignore\n this._geometryBeingRotated,\n angle,\n {\n pivot: centroid,\n }\n );\n\n let updatedData = new ImmutableFeatureCollection(props.data);\n\n const selectedIndexes = props.selectedIndexes;\n for (let i = 0; i < selectedIndexes.length; i++) {\n const selectedIndex = selectedIndexes[i];\n const movedFeature = rotatedFeatures.features[i];\n updatedData = updatedData.replaceGeometry(selectedIndex, movedFeature.geometry);\n }\n\n return {\n updatedData: updatedData.getObject(),\n editType,\n editContext: {\n featureIndexes: selectedIndexes,\n },\n };\n }\n}\n\nfunction getRotationAngle(centroid: Position, startDragPoint: Position, currentPoint: Position) {\n const bearing1 = turfBearing(centroid, startDragPoint);\n const bearing2 = turfBearing(centroid, currentPoint);\n return bearing2 - bearing1;\n}\n","import { FeatureCollection } from '../geojson-types';\nimport {\n ModeProps,\n ClickEvent,\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n GuideFeatureCollection,\n} from '../types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class CompositeMode extends GeoJsonEditMode {\n _modes: Array<GeoJsonEditMode>;\n\n constructor(modes: Array<GeoJsonEditMode>) {\n super();\n this._modes = modes;\n }\n\n _coalesce<T>(\n callback: (arg0: GeoJsonEditMode) => T,\n resultEval: (arg0: T) => boolean | null | undefined = null\n ): T {\n let result: T;\n\n for (let i = 0; i < this._modes.length; i++) {\n result = callback(this._modes[i]);\n if (resultEval ? resultEval(result) : result) {\n break;\n }\n }\n\n return result as any;\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>): void {\n this._coalesce((handler) => handler.handleClick(event, props));\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>): void {\n return this._coalesce((handler) => handler.handlePointerMove(event, props));\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>): void {\n return this._coalesce((handler) => handler.handleStartDragging(event, props));\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>): void {\n return this._coalesce((handler) => handler.handleStopDragging(event, props));\n }\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>): void {\n return this._coalesce((handler) => handler.handleDragging(event, props));\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n // TODO: Combine the guides *BUT* make sure if none of the results have\n // changed to return the same object so that \"guides !== this.state.guides\"\n // in editable-geojson-layer works.\n\n const allGuides = [];\n for (const mode of this._modes) {\n allGuides.push(...mode.getGuides(props).features);\n }\n\n return {\n type: 'FeatureCollection',\n features: allGuides,\n };\n }\n}\n","import {\n ClickEvent,\n PointerMoveEvent,\n ModeProps,\n GuideFeatureCollection,\n TentativeFeature,\n} from '../types';\nimport { Position, Polygon, FeatureOf, FeatureCollection } from '../geojson-types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class ThreeClickPolygonMode extends GeoJsonEditMode {\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n this.addClickSequence(event);\n const clickSequence = this.getClickSequence();\n const tentativeFeature = this.getTentativeGuide(props);\n\n if (\n clickSequence.length > 2 &&\n tentativeFeature &&\n tentativeFeature.geometry.type === 'Polygon'\n ) {\n const editAction = this.getAddFeatureOrBooleanPolygonAction(tentativeFeature.geometry, props);\n this.resetClickSequence();\n\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const { lastPointerMoveEvent, modeConfig } = props;\n const clickSequence = this.getClickSequence();\n\n const guides: GuideFeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (clickSequence.length === 0) {\n // nothing to do yet\n return guides;\n }\n\n const hoveredCoord = lastPointerMoveEvent.mapCoords;\n\n if (clickSequence.length === 1) {\n guides.features.push({\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'LineString',\n coordinates: [clickSequence[0], hoveredCoord],\n },\n });\n } else {\n const polygon = this.getThreeClickPolygon(\n clickSequence[0],\n clickSequence[1],\n hoveredCoord,\n modeConfig\n );\n if (polygon) {\n guides.features.push({\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: polygon.geometry,\n });\n }\n }\n\n return guides;\n }\n\n getThreeClickPolygon(\n coord1: Position,\n coord2: Position,\n coord3: Position,\n modeConfig: any\n ): FeatureOf<Polygon> | null | undefined {\n return null;\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n super.handlePointerMove(event, props);\n }\n\n createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature {\n const { lastPointerMoveEvent } = props;\n const clickSequence = this.getClickSequence();\n\n const lastCoords = lastPointerMoveEvent ? [lastPointerMoveEvent.mapCoords] : [];\n\n let tentativeFeature;\n if (clickSequence.length === 2) {\n tentativeFeature = this.getThreeClickPolygon(\n clickSequence[0],\n clickSequence[1],\n lastCoords[0],\n props.modeConfig\n );\n }\n\n return tentativeFeature;\n }\n}\n","// port from @deck.gl/core\nfunction isEqual(a: any, b: any) {\n if (a === b) {\n return true;\n }\n if (Array.isArray(a)) {\n // Special treatment for arrays: compare 1-level deep\n // This is to support equality of matrix/coordinate props\n const len = a.length;\n if (!b || b.length !== len) {\n return false;\n }\n\n for (let i = 0; i < len; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n\n/**\n * Speed up consecutive function calls by caching the result of calls with identical input\n * https://en.wikipedia.org/wiki/Memoization\n * @param {function} compute - the function to be memoized\n */\nexport default function memoize(compute: Function) {\n let cachedArgs = {};\n let cachedResult;\n\n return (args: any) => {\n for (const key in args) {\n if (!isEqual(args[key], cachedArgs[key])) {\n cachedResult = compute(args);\n cachedArgs = args;\n break;\n }\n }\n return cachedResult;\n };\n}\n","/* eslint-env browser */\n\nimport { CompositeLayer } from '@deck.gl/core';\nimport {\n ClickEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n PointerMoveEvent,\n} from '@nebula.gl/edit-modes';\n\nconst EVENT_TYPES = ['anyclick', 'pointermove', 'panstart', 'panmove', 'panend', 'keyup'];\n\nexport default class EditableLayer extends CompositeLayer<any> {\n static layerName = 'EditableLayer';\n // Overridable interaction event handlers\n onLayerClick(event: ClickEvent) {\n // default implementation - do nothing\n }\n\n onStartDragging(event: StartDraggingEvent) {\n // default implementation - do nothing\n }\n\n onStopDragging(event: StopDraggingEvent) {\n // default implementation - do nothing\n }\n\n onDragging(event: DraggingEvent) {\n // default implementation - do nothing\n }\n\n onPointerMove(event: PointerMoveEvent) {\n // default implementation - do nothing\n }\n\n onLayerKeyUp(event: KeyboardEvent): void {\n // default implementation - do nothing;\n }\n // TODO: implement onCancelDragging (e.g. drag off screen)\n\n initializeState() {\n this.setState({\n _editableLayerState: {\n // Picked objects at the time the pointer went down\n pointerDownPicks: null,\n // Screen coordinates where the pointer went down\n pointerDownScreenCoords: null,\n // Ground coordinates where the pointer went down\n pointerDownMapCoords: null,\n\n // Keep track of the mjolnir.js event handler so it can be deregistered\n eventHandler: this._forwardEventToCurrentLayer.bind(this),\n },\n });\n\n this._addEventHandlers();\n }\n\n finalizeState() {\n this._removeEventHandlers();\n }\n\n _addEventHandlers() {\n // @ts-ignore\n const { eventManager } = this.context.deck;\n const { eventHandler } = this.state._editableLayerState;\n\n for (const eventType of EVENT_TYPES) {\n eventManager.on(eventType, eventHandler, {\n // give nebula a higher priority so that it can stop propagation to deck.gl's map panning handlers\n priority: 100,\n });\n }\n }\n\n _removeEventHandlers() {\n // @ts-ignore\n const { eventManager } = this.context.deck;\n const { eventHandler } = this.state._editableLayerState;\n\n for (const eventType of EVENT_TYPES) {\n eventManager.off(eventType, eventHandler);\n }\n }\n\n // A new layer instance is created on every render, so forward the event to the current layer\n // This means that the first layer instance will stick around to be the event listener, but will forward the event\n // to the latest layer instance.\n _forwardEventToCurrentLayer(event: any) {\n const currentLayer = this.getCurrentLayer();\n\n // Use a naming convention to find the event handling function for this event type\n const func = currentLayer[`_on${event.type}`].bind(currentLayer);\n if (!func) {\n console.warn(`no handler for mjolnir.js event ${event.type}`); // eslint-disable-line\n return;\n }\n func(event);\n }\n\n _onanyclick({ srcEvent }: any) {\n const screenCoords = this.getScreenCoords(srcEvent);\n const mapCoords = this.getMapCoords(screenCoords);\n // @ts-ignore\n const picks = this.getPicks(screenCoords);\n\n this.onLayerClick({\n mapCoords,\n // @ts-ignore\n screenCoords,\n picks,\n sourceEvent: srcEvent,\n });\n }\n\n _onkeyup({ srcEvent }: { srcEvent: KeyboardEvent }) {\n this.onLayerKeyUp(srcEvent);\n }\n\n _onpanstart(event: any) {\n const screenCoords = this.getScreenCoords(event.srcEvent);\n const mapCoords = this.getMapCoords(screenCoords);\n // @ts-ignore\n const picks = this.getPicks(screenCoords);\n\n this.setState({\n _editableLayerState: {\n ...this.state._editableLayerState,\n pointerDownScreenCoords: screenCoords,\n pointerDownMapCoords: mapCoords,\n pointerDownPicks: picks,\n },\n });\n\n this.onStartDragging({\n picks,\n // @ts-ignore\n screenCoords,\n // @ts-ignore\n mapCoords,\n // @ts-ignore\n pointerDownScreenCoords: screenCoords,\n pointerDownMapCoords: mapCoords,\n cancelPan: event.stopImmediatePropagation,\n sourceEvent: event.srcEvent,\n });\n }\n\n _onpanmove(event: any) {\n const { srcEvent } = event;\n const screenCoords = this.getScreenCoords(srcEvent);\n const mapCoords = this.getMapCoords(screenCoords);\n\n const {\n pointerDownPicks,\n pointerDownScreenCoords,\n pointerDownMapCoords,\n } = this.state._editableLayerState;\n // @ts-ignore\n const picks = this.getPicks(screenCoords);\n\n this.onDragging({\n // @ts-ignore\n screenCoords,\n mapCoords,\n picks,\n pointerDownPicks,\n pointerDownScreenCoords,\n pointerDownMapCoords,\n sourceEvent: srcEvent,\n cancelPan: event.stopImmediatePropagation,\n // another (hacky) approach for cancelling map panning\n // const controller = this.context.deck.viewManager.controllers[\n // Object.keys(this.context.deck.viewManager.controllers)[0]\n // ];\n // controller._state.isDragging = false;\n });\n }\n\n _onpanend({ srcEvent }: any) {\n const screenCoords = this.getScreenCoords(srcEvent);\n const mapCoords = this.getMapCoords(screenCoords);\n\n const {\n pointerDownPicks,\n pointerDownScreenCoords,\n pointerDownMapCoords,\n } = this.state._editableLayerState;\n // @ts-ignore\n const picks = this.getPicks(screenCoords);\n\n this.onStopDragging({\n picks,\n // @ts-ignore\n screenCoords,\n mapCoords,\n pointerDownPicks,\n pointerDownScreenCoords,\n pointerDownMapCoords,\n sourceEvent: srcEvent,\n });\n\n this.setState({\n _editableLayerState: {\n ...this.state._editableLayerState,\n pointerDownScreenCoords: null,\n pointerDownMapCoords: null,\n pointerDownPicks: null,\n },\n });\n }\n\n _onpointermove(event: any) {\n const { srcEvent } = event;\n const screenCoords = this.getScreenCoords(srcEvent);\n const mapCoords = this.getMapCoords(screenCoords);\n\n const {\n pointerDownPicks,\n pointerDownScreenCoords,\n pointerDownMapCoords,\n } = this.state._editableLayerState;\n // @ts-ignore\n const picks = this.getPicks(screenCoords);\n\n this.onPointerMove({\n // @ts-ignore\n screenCoords,\n mapCoords,\n picks,\n pointerDownPicks,\n pointerDownScreenCoords,\n pointerDownMapCoords,\n sourceEvent: srcEvent,\n });\n }\n\n getPicks(screenCoords: [number, number]) {\n // @ts-ignore\n return this.context.deck.pickMultipleObjects({\n x: screenCoords[0],\n y: screenCoords[1],\n layerIds: [this.props.id],\n radius: this.props.pickingRadius,\n depth: this.props.pickingDepth,\n });\n }\n\n getScreenCoords(pointerEvent: any) {\n return [\n pointerEvent.clientX -\n (this.context.gl.canvas as HTMLCanvasElement).getBoundingClientRect().left,\n pointerEvent.clientY -\n (this.context.gl.canvas as HTMLCanvasElement).getBoundingClientRect().top,\n ];\n }\n\n getMapCoords(screenCoords: number[]) {\n // @ts-ignore\n return this.context.viewport.unproject([screenCoords[0], screenCoords[1]]);\n }\n}\n","import {getFirstCharacters} from '../binary-utils/get-first-characters';\n\n/**\n * Minimal JSON parser that throws more meaningful error messages\n */\nexport function parseJSON(string: string): any {\n try {\n return JSON.parse(string);\n } catch (_) {\n throw new Error(`Failed to parse JSON from data starting with \"${getFirstCharacters(string)}\"`);\n }\n}\n","import { PathLayer } from '@deck.gl/layers';\nimport GL from '@luma.gl/constants';\nimport { Framebuffer, Texture2D } from '@luma.gl/core';\nimport outline from '../../shaderlib/outline/outline';\n\n// TODO - this should be built into assembleShaders\nfunction injectShaderCode({ source, code = '' }) {\n const INJECT_CODE = /}[^{}]*$/;\n return source.replace(INJECT_CODE, code.concat('\\n}\\n'));\n}\n\nconst VS_CODE = `\\\n outline_setUV(gl_Position);\n outline_setZLevel(instanceZLevel);\n`;\n\nconst FS_CODE = `\\\n gl_FragColor = outline_filterColor(gl_FragColor);\n`;\n\nconst defaultProps = {\n getZLevel: { type: 'accessor', value: 0 },\n};\n\nexport default class PathOutlineLayer extends PathLayer<any> {\n static layerName = 'PathOutlineLayer';\n static defaultProps = defaultProps;\n\n // Override getShaders to inject the outline module\n getShaders() {\n const shaders = super.getShaders();\n return Object.assign({}, shaders, {\n modules: shaders.modules.concat([outline]),\n vs: injectShaderCode({ source: shaders.vs, code: VS_CODE }),\n fs: injectShaderCode({ source: shaders.fs, code: FS_CODE }),\n });\n }\n\n initializeState(context: any) {\n super.initializeState(context);\n\n // Create an outline \"shadow\" map\n // TODO - we should create a single outlineMap for all layers\n this.setState({\n outlineFramebuffer: new Framebuffer(context.gl),\n dummyTexture: new Texture2D(context.gl),\n });\n\n // Create an attribute manager\n this.state.attributeManager.addInstanced({\n instanceZLevel: {\n size: 1,\n type: GL.UNSIGNED_BYTE,\n update: this.calculateZLevels,\n accessor: 'getZLevel',\n },\n });\n }\n\n // Override draw to add render module\n draw({ moduleParameters = {}, parameters, uniforms, context }) {\n // Need to calculate same uniforms as base layer\n const {\n rounded,\n miterLimit,\n widthScale,\n widthMinPixels,\n widthMaxPixels,\n dashJustified,\n } = this.props;\n\n uniforms = Object.assign({}, uniforms, {\n jointType: Number(rounded),\n alignMode: Number(dashJustified),\n widthScale,\n miterLimit,\n widthMinPixels,\n widthMaxPixels,\n });\n\n // Render the outline shadowmap (based on segment z orders)\n const { outlineFramebuffer, dummyTexture } = this.state;\n outlineFramebuffer.resize();\n outlineFramebuffer.clear({ color: true, depth: true });\n\n this.state.model.updateModuleSettings({\n outlineEnabled: true,\n outlineRenderShadowmap: true,\n outlineShadowmap: dummyTexture,\n });\n\n this.state.model.draw({\n uniforms: Object.assign({}, uniforms, {\n jointType: 0,\n widthScale: this.props.widthScale * 1.3,\n }),\n parameters: {\n depthTest: false,\n // Biggest value needs to go into buffer\n blendEquation: GL.MAX,\n },\n framebuffer: outlineFramebuffer,\n });\n\n // Now use the outline shadowmap to render the lines (with outlines)\n this.state.model.updateModuleSettings({\n outlineEnabled: true,\n outlineRenderShadowmap: false,\n outlineShadowmap: outlineFramebuffer,\n });\n this.state.model.draw({\n uniforms: Object.assign({}, uniforms, {\n jointType: Number(rounded),\n widthScale: this.props.widthScale,\n }),\n parameters: {\n depthTest: false,\n },\n });\n }\n\n calculateZLevels(attribute) {\n const { getZLevel } = this.props;\n const { pathTesselator } = this.state;\n\n attribute.value = pathTesselator._updateAttribute({\n target: attribute.value,\n size: 1,\n getValue: (object, index) => [getZLevel(object, index) || 0],\n });\n }\n}\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {ArcLayer} from '@deck.gl/layers';\n\n// This layer has been merged into the core ArcLayer\n// Keeping for backward-compatibility\nexport default class GreatCircleLayer extends ArcLayer {}\n\nGreatCircleLayer.layerName = 'GreatCircleLayer';\nGreatCircleLayer.defaultProps = {\n getHeight: {type: 'accessor', value: 0},\n greatCircle: true\n};\n","/*\nAdapted from s2-geometry\n\nISC License (ISC)\n\nCopyright (c) 2012-2016, Jon Atkins <github@jonatkins.com>\nCopyright (c) 2016, AJ ONeal <aj@daplie.com>\n\nPermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n*/\n\nimport Long from 'long';\n\n//\n// Functional Style\n//\nconst FACE_BITS = 3;\nconst MAX_LEVEL = 30;\nconst POS_BITS = 2 * MAX_LEVEL + 1; // 61 (60 bits of data, 1 bit lsb marker)\nconst RADIAN_TO_DEGREE = 180 / Math.PI;\n\nexport function IJToST(ij, order, offsets) {\n const maxSize = 1 << order;\n\n return [(ij[0] + offsets[0]) / maxSize, (ij[1] + offsets[1]) / maxSize];\n}\n\nfunction singleSTtoUV(st) {\n if (st >= 0.5) {\n return (1 / 3.0) * (4 * st * st - 1);\n }\n return (1 / 3.0) * (1 - 4 * (1 - st) * (1 - st));\n}\n\nexport function STToUV(st) {\n return [singleSTtoUV(st[0]), singleSTtoUV(st[1])];\n}\n\nexport function FaceUVToXYZ(face, [u, v]) {\n switch (face) {\n case 0:\n return [1, u, v];\n case 1:\n return [-u, 1, v];\n case 2:\n return [-u, -v, 1];\n case 3:\n return [-1, -v, -u];\n case 4:\n return [v, -1, -u];\n case 5:\n return [v, u, -1];\n default:\n throw new Error('Invalid face');\n }\n}\n\nexport function XYZToLngLat([x, y, z]) {\n const lat = Math.atan2(z, Math.sqrt(x * x + y * y));\n const lng = Math.atan2(y, x);\n\n return [lng * RADIAN_TO_DEGREE, lat * RADIAN_TO_DEGREE];\n}\n\nexport function toHilbertQuadkey(idS) {\n let bin = Long.fromString(idS, true, 10).toString(2);\n\n while (bin.length < FACE_BITS + POS_BITS) {\n // eslint-disable-next-line prefer-template\n bin = '0' + bin;\n }\n\n // MUST come AFTER binstr has been left-padded with '0's\n const lsbIndex = bin.lastIndexOf('1');\n // substr(start, len)\n // substring(start, end) // includes start, does not include end\n const faceB = bin.substring(0, 3);\n // posB will always be a multiple of 2 (or it's invalid)\n const posB = bin.substring(3, lsbIndex);\n const levelN = posB.length / 2;\n\n const faceS = Long.fromString(faceB, true, 2).toString(10);\n let posS = Long.fromString(posB, true, 2).toString(4);\n\n while (posS.length < levelN) {\n // eslint-disable-next-line prefer-template\n posS = '0' + posS;\n }\n\n return `${faceS}/${posS}`;\n}\n\nfunction rotateAndFlipQuadrant(n, point, rx, ry) {\n if (ry === 0) {\n if (rx === 1) {\n point[0] = n - 1 - point[0];\n point[1] = n - 1 - point[1];\n }\n\n const x = point[0];\n point[0] = point[1];\n point[1] = x;\n }\n}\n\nexport function FromHilbertQuadKey(hilbertQuadkey) {\n const parts = hilbertQuadkey.split('/');\n const face = parseInt(parts[0], 10);\n const position = parts[1];\n const maxLevel = position.length;\n const point = [0, 0];\n let level;\n\n for (let i = maxLevel - 1; i >= 0; i--) {\n level = maxLevel - i;\n const bit = position[i];\n let rx = 0;\n let ry = 0;\n if (bit === '1') {\n ry = 1;\n } else if (bit === '2') {\n rx = 1;\n ry = 1;\n } else if (bit === '3') {\n rx = 1;\n }\n\n const val = Math.pow(2, level - 1);\n rotateAndFlipQuadrant(val, point, rx, ry);\n\n point[0] += val * rx;\n point[1] += val * ry;\n }\n\n if (face % 2 === 1) {\n const t = point[0];\n point[0] = point[1];\n point[1] = t;\n }\n\n return {face, ij: point, level};\n}\n","// s2-geometry is a pure JavaScript port of Google/Niantic's S2 Geometry library\n// which is perfect since it works in the browser.\nimport {\n toHilbertQuadkey,\n FromHilbertQuadKey,\n IJToST,\n STToUV,\n FaceUVToXYZ,\n XYZToLngLat\n} from './s2-geometry';\nimport Long from 'long';\n\n/**\n * Given an S2 token this function convert the token to 64 bit id\n https://github.com/google/s2-geometry-library-java/blob/c04b68bf3197a9c34082327eeb3aec7ab7c85da1/src/com/google/common/geometry/S2CellId.java#L439\n * */\nfunction getIdFromToken(token) {\n // pad token with zeros to make the length 16\n const paddedToken = token.padEnd(16, '0');\n return Long.fromString(paddedToken, 16);\n}\n\nconst MAX_RESOLUTION = 100;\n\n/* Adapted from s2-geometry's S2Cell.getCornerLatLngs */\n/* eslint-disable max-statements */\nfunction getGeoBounds({face, ij, level}) {\n const offsets = [[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]];\n\n // The S2 cell edge is curved: http://s2geometry.io/\n // This is more prominent at lower levels\n // resolution is the number of segments to generate per edge.\n // We exponentially reduce resolution as level increases so it doesn't affect perf\n // when there are a large number of cells\n const resolution = Math.max(1, Math.ceil(MAX_RESOLUTION * Math.pow(2, -level)));\n const result = new Float64Array(4 * resolution * 2 + 2);\n let ptIndex = 0;\n let prevLng = 0;\n\n for (let i = 0; i < 4; i++) {\n const offset = offsets[i].slice(0);\n const nextOffset = offsets[i + 1];\n const stepI = (nextOffset[0] - offset[0]) / resolution;\n const stepJ = (nextOffset[1] - offset[1]) / resolution;\n\n for (let j = 0; j < resolution; j++) {\n offset[0] += stepI;\n offset[1] += stepJ;\n // Cell can be represented by coordinates IJ, ST, UV, XYZ\n // http://s2geometry.io/devguide/s2cell_hierarchy#coordinate-systems\n const st = IJToST(ij, level, offset);\n const uv = STToUV(st);\n const xyz = FaceUVToXYZ(face, uv);\n const lngLat = XYZToLngLat(xyz);\n\n // Adjust longitude for Web Mercator projection\n if (Math.abs(lngLat[1]) > 89.999) {\n lngLat[0] = prevLng;\n }\n const deltaLng = lngLat[0] - prevLng;\n lngLat[0] += deltaLng > 180 ? -360 : deltaLng < -180 ? 360 : 0;\n\n result[ptIndex++] = lngLat[0];\n result[ptIndex++] = lngLat[1];\n prevLng = lngLat[0];\n }\n }\n // close the loop\n result[ptIndex++] = result[0];\n result[ptIndex++] = result[1];\n return result;\n}\n/* eslint-enable max-statements */\n\nexport function getS2QuadKey(token) {\n if (typeof token === 'string') {\n if (token.indexOf('/') > 0) {\n // is Hilbert quad key\n return token;\n }\n // is S2 token\n token = getIdFromToken(token);\n }\n // is Long id\n return toHilbertQuadkey(token.toString());\n}\n\n/**\n * Get a polygon with corner coordinates for an s2 cell\n * @param {*} cell - This can be an S2 key or token\n * @return {Array} - a simple polygon in array format: [[lng, lat], ...]\n * - each coordinate is an array [lng, lat]\n * - the polygon is closed, i.e. last coordinate is a copy of the first coordinate\n */\nexport function getS2Polygon(token) {\n const key = getS2QuadKey(token);\n const s2cell = FromHilbertQuadKey(key);\n\n return getGeoBounds(s2cell);\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {CompositeLayer} from '@deck.gl/core';\nimport {PolygonLayer} from '@deck.gl/layers';\n\nimport {getS2Polygon} from './s2-utils';\n\nconst defaultProps = {\n ...PolygonLayer.defaultProps,\n getS2Token: {type: 'accessor', value: d => d.token}\n};\n\nexport default class S2Layer extends CompositeLayer {\n renderLayers() {\n // Layer prop\n const {data, getS2Token} = this.props;\n\n // Rendering props underlying layer\n const {\n elevationScale,\n extruded,\n wireframe,\n filled,\n stroked,\n lineWidthUnits,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n lineJointRounded,\n lineMiterLimit,\n lineDashJustified,\n getElevation,\n getFillColor,\n getLineColor,\n getLineWidth,\n getLineDashArray\n } = this.props;\n\n // Accessor props for underlying layers\n const {updateTriggers, material} = this.props;\n\n // Filled Polygon Layer\n const CellLayer = this.getSubLayerClass('cell', PolygonLayer);\n return new CellLayer(\n {\n filled,\n wireframe,\n\n extruded,\n elevationScale,\n\n stroked,\n lineWidthUnits,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n lineJointRounded,\n lineMiterLimit,\n lineDashJustified,\n\n material,\n\n getElevation,\n getFillColor,\n getLineColor,\n getLineWidth,\n getLineDashArray\n },\n this.getSubLayerProps({\n id: 'cell',\n updateTriggers: {\n getElevation: updateTriggers.getElevation,\n getFillColor: updateTriggers.getFillColor,\n getLineColor: updateTriggers.getLineColor,\n getLineWidth: updateTriggers.getLineWidth,\n getLineDashArray: updateTriggers.getLineDashArray\n }\n }),\n {\n data,\n _normalize: false,\n positionFormat: 'XY',\n getPolygon: (x, objectInfo) => getS2Polygon(getS2Token(x, objectInfo))\n }\n );\n }\n}\n\nS2Layer.layerName = 'S2Layer';\nS2Layer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {PathLayer} from '@deck.gl/layers';\n\nconst defaultProps = {\n fadeTrail: true,\n trailLength: {type: 'number', value: 120, min: 0},\n currentTime: {type: 'number', value: 0, min: 0},\n getTimestamps: {type: 'accessor', value: null}\n};\n\nexport default class TripsLayer extends PathLayer {\n getShaders() {\n const shaders = super.getShaders();\n shaders.inject = {\n 'vs:#decl': `\\\nuniform float trailLength;\nattribute float instanceTimestamps;\nattribute float instanceNextTimestamps;\nvarying float vTime;\n`,\n // Timestamp of the vertex\n 'vs:#main-end': `\\\nvTime = instanceTimestamps + (instanceNextTimestamps - instanceTimestamps) * vPathPosition.y / vPathLength;\n`,\n 'fs:#decl': `\\\nuniform bool fadeTrail;\nuniform float trailLength;\nuniform float currentTime;\nvarying float vTime;\n`,\n // Drop the segments outside of the time window\n 'fs:#main-start': `\\\nif(vTime > currentTime || (fadeTrail && (vTime < currentTime - trailLength))) {\n discard;\n}\n`,\n // Fade the color (currentTime - 100%, end of trail - 0%)\n 'fs:DECKGL_FILTER_COLOR': `\\\nif(fadeTrail) {\n color.a *= 1.0 - (currentTime - vTime) / trailLength;\n}\n`\n };\n return shaders;\n }\n\n initializeState(params) {\n super.initializeState(params);\n\n const attributeManager = this.getAttributeManager();\n attributeManager.addInstanced({\n timestamps: {\n size: 1,\n accessor: 'getTimestamps',\n shaderAttributes: {\n instanceTimestamps: {\n vertexOffset: 0\n },\n instanceNextTimestamps: {\n vertexOffset: 1\n }\n }\n }\n });\n }\n\n draw(params) {\n const {fadeTrail, trailLength, currentTime} = this.props;\n\n params.uniforms = {\n ...params.uniforms,\n fadeTrail,\n trailLength,\n currentTime\n };\n\n super.draw(params);\n }\n}\n\nTripsLayer.layerName = 'TripsLayer';\nTripsLayer.defaultProps = defaultProps;\n","import {h3SetToMultiPolygon} from 'h3-js';\n\nimport {CompositeLayer, createIterable} from '@deck.gl/core';\nimport {PolygonLayer} from '@deck.gl/layers';\n\nconst defaultProps = {\n ...PolygonLayer.defaultProps,\n getHexagons: {type: 'accessor', value: d => d.hexagons}\n};\n\nexport default class H3ClusterLayer extends CompositeLayer {\n updateState({props, oldProps, changeFlags}) {\n if (\n changeFlags.dataChanged ||\n (changeFlags.updateTriggers && changeFlags.updateTriggers.getHexagons)\n ) {\n const {data, getHexagons} = props;\n const polygons = [];\n\n const {iterable, objectInfo} = createIterable(data);\n for (const object of iterable) {\n objectInfo.index++;\n const hexagons = getHexagons(object, objectInfo);\n const multiPolygon = h3SetToMultiPolygon(hexagons, true);\n\n for (const polygon of multiPolygon) {\n polygons.push(this.getSubLayerRow({polygon}, object, objectInfo.index));\n }\n }\n\n this.setState({polygons});\n }\n }\n\n renderLayers() {\n const {\n elevationScale,\n extruded,\n wireframe,\n filled,\n stroked,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n lineJointRounded,\n lineMiterLimit,\n lineDashJustified,\n material,\n\n getFillColor,\n getLineColor,\n getLineWidth,\n getLineDashArray,\n getElevation,\n transitions,\n updateTriggers\n } = this.props;\n\n const SubLayerClass = this.getSubLayerClass('cluster-region', PolygonLayer);\n\n return new SubLayerClass(\n {\n filled,\n wireframe,\n\n extruded,\n elevationScale,\n\n stroked,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n lineJointRounded,\n lineMiterLimit,\n lineDashJustified,\n\n material,\n transitions,\n\n getFillColor: this.getSubLayerAccessor(getFillColor),\n getLineColor: this.getSubLayerAccessor(getLineColor),\n getLineWidth: this.getSubLayerAccessor(getLineWidth),\n getLineDashArray: this.getSubLayerAccessor(getLineDashArray),\n getElevation: this.getSubLayerAccessor(getElevation)\n },\n this.getSubLayerProps({\n id: 'cluster-region',\n updateTriggers\n }),\n {\n data: this.state.polygons,\n getPolygon: d => d.polygon\n }\n );\n }\n}\n\nH3ClusterLayer.defaultProps = defaultProps;\nH3ClusterLayer.layerName = 'H3ClusterLayer';\n","import {\n h3ToGeoBoundary,\n h3GetResolution,\n h3ToGeo,\n geoToH3,\n h3IsPentagon,\n h3Distance,\n edgeLength,\n UNITS\n} from 'h3-js';\nimport {lerp} from 'math.gl';\nimport {CompositeLayer, createIterable} from '@deck.gl/core';\nimport {ColumnLayer, PolygonLayer} from '@deck.gl/layers';\n\n// There is a cost to updating the instanced geometries when using highPrecision: false\n// This constant defines the distance between two hexagons that leads to \"significant\n// distortion.\" Smaller value makes the column layer more sensitive to viewport change.\nconst UPDATE_THRESHOLD_KM = 10;\n\n// normalize longitudes w.r.t center (refLng), when not provided first vertex\nexport function normalizeLongitudes(vertices, refLng) {\n refLng = refLng === undefined ? vertices[0][0] : refLng;\n for (const pt of vertices) {\n const deltaLng = pt[0] - refLng;\n if (deltaLng > 180) {\n pt[0] -= 360;\n } else if (deltaLng < -180) {\n pt[0] += 360;\n }\n }\n}\n\n// scale polygon vertices w.r.t center (hexId)\nexport function scalePolygon(hexId, vertices, factor) {\n const [lat, lng] = h3ToGeo(hexId);\n const actualCount = vertices.length;\n\n // normalize with respect to center\n normalizeLongitudes(vertices, lng);\n\n // `h3ToGeoBoundary` returns same array object for first and last vertex (closed polygon),\n // if so skip scaling the last vertex\n const vertexCount = vertices[0] === vertices[actualCount - 1] ? actualCount - 1 : actualCount;\n for (let i = 0; i < vertexCount; i++) {\n vertices[i][0] = lerp(lng, vertices[i][0], factor);\n vertices[i][1] = lerp(lat, vertices[i][1], factor);\n }\n}\n\nfunction getHexagonCentroid(getHexagon, object, objectInfo) {\n const hexagonId = getHexagon(object, objectInfo);\n const [lat, lng] = h3ToGeo(hexagonId);\n return [lng, lat];\n}\n\nfunction h3ToPolygon(hexId, coverage = 1, flatten) {\n const vertices = h3ToGeoBoundary(hexId, true);\n\n if (coverage !== 1) {\n // scale and normalize vertices w.r.t to center\n scalePolygon(hexId, vertices, coverage);\n } else {\n // normalize w.r.t to start vertex\n normalizeLongitudes(vertices);\n }\n\n if (flatten) {\n const positions = new Float64Array(vertices.length * 2);\n let i = 0;\n for (const pt of vertices) {\n positions[i++] = pt[0];\n positions[i++] = pt[1];\n }\n return positions;\n }\n\n return vertices;\n}\n\nfunction mergeTriggers(getHexagon, coverage) {\n let trigger;\n if (getHexagon === undefined || getHexagon === null) {\n trigger = coverage;\n } else if (typeof getHexagon === 'object') {\n trigger = {...getHexagon, coverage};\n } else {\n trigger = {getHexagon, coverage};\n }\n return trigger;\n}\n\nconst defaultProps = {\n ...PolygonLayer.defaultProps,\n highPrecision: 'auto',\n coverage: {type: 'number', min: 0, max: 1, value: 1},\n centerHexagon: null,\n getHexagon: {type: 'accessor', value: x => x.hexagon},\n extruded: true\n};\n\n// not supported\ndelete defaultProps.getLineDashArray;\n\n/**\n * A subclass of HexagonLayer that uses H3 hexagonIds in data objects\n * rather than centroid lat/longs. The shape of each hexagon is determined\n * based on a single \"center\" hexagon, which can be selected by passing in\n * a center lat/lon pair. If not provided, the map center will be used.\n *\n * Also sets the `hexagonId` field in the onHover/onClick callback's info\n * objects. Since this is calculated using math, hexagonId will be present\n * even when no corresponding hexagon is in the data set. You can check\n * index !== -1 to see if picking matches an actual object.\n */\nexport default class H3HexagonLayer extends CompositeLayer {\n shouldUpdateState({changeFlags}) {\n return this._shouldUseHighPrecision()\n ? changeFlags.propsOrDataChanged\n : changeFlags.somethingChanged;\n }\n\n updateState({props, oldProps, changeFlags}) {\n if (\n props.highPrecision !== true &&\n (changeFlags.dataChanged ||\n (changeFlags.updateTriggers && changeFlags.updateTriggers.getHexagon))\n ) {\n const dataProps = this._calculateH3DataProps(props);\n this.setState(dataProps);\n }\n\n this._updateVertices(this.context.viewport);\n }\n\n _calculateH3DataProps(props) {\n let resolution = -1;\n let hasPentagon = false;\n let hasMultipleRes = false;\n\n const {iterable, objectInfo} = createIterable(props.data);\n for (const object of iterable) {\n objectInfo.index++;\n const hexId = props.getHexagon(object, objectInfo);\n // Take the resolution of the first hex\n const hexResolution = h3GetResolution(hexId);\n if (resolution < 0) {\n resolution = hexResolution;\n if (!props.highPrecision) break;\n } else if (resolution !== hexResolution) {\n hasMultipleRes = true;\n break;\n }\n if (h3IsPentagon(hexId)) {\n hasPentagon = true;\n break;\n }\n }\n\n return {\n resolution,\n edgeLengthKM: resolution >= 0 ? edgeLength(resolution, UNITS.km) : 0,\n hasMultipleRes,\n hasPentagon\n };\n }\n\n _shouldUseHighPrecision() {\n if (this.props.highPrecision === 'auto') {\n const {resolution, hasPentagon, hasMultipleRes} = this.state;\n const {viewport} = this.context;\n return (\n viewport.resolution || hasMultipleRes || hasPentagon || (resolution >= 0 && resolution <= 5)\n );\n }\n\n return this.props.highPrecision;\n }\n\n _updateVertices(viewport) {\n if (this._shouldUseHighPrecision()) {\n return;\n }\n const {resolution, edgeLengthKM, centerHex} = this.state;\n if (resolution < 0) {\n return;\n }\n const hex =\n this.props.centerHexagon || geoToH3(viewport.latitude, viewport.longitude, resolution);\n if (centerHex === hex) {\n return;\n }\n if (centerHex) {\n const distance = h3Distance(centerHex, hex);\n // h3Distance returns a negative number if the distance could not be computed\n // due to the two indexes very far apart or on opposite sides of a pentagon.\n if (distance >= 0 && distance * edgeLengthKM < UPDATE_THRESHOLD_KM) {\n return;\n }\n }\n\n const {unitsPerMeter} = viewport.distanceScales;\n\n let vertices = h3ToPolygon(hex);\n const [centerLat, centerLng] = h3ToGeo(hex);\n\n const [centerX, centerY] = viewport.projectFlat([centerLng, centerLat]);\n vertices = vertices.map(p => {\n const worldPosition = viewport.projectFlat(p);\n return [\n (worldPosition[0] - centerX) / unitsPerMeter[0],\n (worldPosition[1] - centerY) / unitsPerMeter[1]\n ];\n });\n\n this.setState({centerHex: hex, vertices});\n }\n\n renderLayers() {\n return this._shouldUseHighPrecision() ? this._renderPolygonLayer() : this._renderColumnLayer();\n }\n\n _getForwardProps() {\n const {\n elevationScale,\n material,\n coverage,\n extruded,\n wireframe,\n stroked,\n filled,\n lineWidthUnits,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n getFillColor,\n getElevation,\n getLineColor,\n getLineWidth,\n transitions,\n updateTriggers\n } = this.props;\n\n return {\n elevationScale,\n extruded,\n coverage,\n wireframe,\n stroked,\n filled,\n lineWidthUnits,\n lineWidthScale,\n lineWidthMinPixels,\n lineWidthMaxPixels,\n material,\n getElevation,\n getFillColor,\n getLineColor,\n getLineWidth,\n transitions,\n updateTriggers: {\n getFillColor: updateTriggers.getFillColor,\n getElevation: updateTriggers.getElevation,\n getLineColor: updateTriggers.getLineColor,\n getLineWidth: updateTriggers.getLineWidth\n }\n };\n }\n\n _renderPolygonLayer() {\n const {data, getHexagon, updateTriggers, coverage} = this.props;\n\n const SubLayerClass = this.getSubLayerClass('hexagon-cell-hifi', PolygonLayer);\n const forwardProps = this._getForwardProps();\n\n forwardProps.updateTriggers.getPolygon = mergeTriggers(updateTriggers.getHexagon, coverage);\n\n return new SubLayerClass(\n forwardProps,\n this.getSubLayerProps({\n id: 'hexagon-cell-hifi',\n updateTriggers: forwardProps.updateTriggers\n }),\n {\n data,\n _normalize: false,\n _windingOrder: 'CCW',\n positionFormat: 'XY',\n getPolygon: (object, objectInfo) => {\n const hexagonId = getHexagon(object, objectInfo);\n return h3ToPolygon(hexagonId, coverage, true);\n }\n }\n );\n }\n\n _renderColumnLayer() {\n const {data, getHexagon, updateTriggers} = this.props;\n\n const SubLayerClass = this.getSubLayerClass('hexagon-cell', ColumnLayer);\n const forwardProps = this._getForwardProps();\n forwardProps.updateTriggers.getPosition = updateTriggers.getHexagon;\n\n return new SubLayerClass(\n forwardProps,\n this.getSubLayerProps({\n id: 'hexagon-cell',\n updateTriggers: forwardProps.updateTriggers\n }),\n {\n data,\n diskResolution: 6, // generate an extruded hexagon as the base geometry\n radius: 1,\n vertices: this.state.vertices,\n getPosition: getHexagonCentroid.bind(null, getHexagon)\n }\n );\n }\n}\n\nH3HexagonLayer.defaultProps = defaultProps;\nH3HexagonLayer.layerName = 'H3HexagonLayer';\n","import {GLTFMaterialParser} from '@luma.gl/experimental';\nimport {Model, pbr} from '@luma.gl/core';\nimport GL from '@luma.gl/constants';\nimport {SimpleMeshLayer} from '@deck.gl/mesh-layers';\n\nimport vs from './mesh-layer-vertex.glsl';\nimport fs from './mesh-layer-fragment.glsl';\n\nfunction validateGeometryAttributes(attributes) {\n const hasColorAttribute = attributes.COLOR_0 || attributes.colors;\n if (!hasColorAttribute) {\n attributes.colors = {constant: true, value: new Float32Array([1, 1, 1])};\n }\n if (!attributes.uvRegions) {\n attributes.uvRegions = {constant: true, value: new Float32Array([0, 0, 1, 1])};\n }\n}\n\nconst defaultProps = {\n // PBR material object. _lighting must be pbr for this to work\n pbrMaterial: {type: 'object', value: null},\n featureIds: {type: 'array', value: null, optional: true}\n};\n\nexport default class _MeshLayer extends SimpleMeshLayer {\n getShaders() {\n const shaders = super.getShaders();\n const modules = shaders.modules;\n modules.push(pbr);\n return {...shaders, vs, fs};\n }\n\n initializeState() {\n const {featureIds} = this.props;\n super.initializeState();\n\n if (featureIds) {\n this.state.attributeManager.add({\n featureIdsPickingColors: {\n type: GL.UNSIGNED_BYTE,\n size: 3,\n noAlloc: true,\n update: this.calculateFeatureIdsPickingColors\n }\n });\n }\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n if (props.pbrMaterial !== oldProps.pbrMaterial) {\n this.updatePbrMaterialUniforms(props.pbrMaterial);\n }\n }\n\n draw(opts) {\n const {featureIds} = this.props;\n if (!this.state.model) {\n return;\n }\n this.state.model.setUniforms({\n // Needed for PBR (TODO: find better way to get it)\n u_Camera: this.state.model.getUniforms().project_uCameraPosition,\n u_pickFeatureIds: Boolean(featureIds)\n });\n\n super.draw(opts);\n }\n\n getModel(mesh) {\n const {id, pbrMaterial} = this.props;\n const materialParser = this.parseMaterial(pbrMaterial, mesh);\n const shaders = this.getShaders();\n validateGeometryAttributes(mesh.attributes);\n const model = new Model(this.context.gl, {\n ...this.getShaders(),\n id,\n geometry: mesh,\n defines: {...shaders.defines, ...materialParser?.defines},\n parameters: materialParser?.parameters,\n isInstanced: true\n });\n\n return model;\n }\n\n updatePbrMaterialUniforms(pbrMaterial) {\n const {model} = this.state;\n if (model) {\n const {mesh} = this.props;\n const materialParser = this.parseMaterial(pbrMaterial, mesh);\n model.setUniforms(materialParser.uniforms);\n }\n }\n\n parseMaterial(pbrMaterial, mesh) {\n const unlit = Boolean(\n pbrMaterial.pbrMetallicRoughness && pbrMaterial.pbrMetallicRoughness.baseColorTexture\n );\n const materialParser = new GLTFMaterialParser(this.context.gl, {\n attributes: {NORMAL: mesh.attributes.normals, TEXCOORD_0: mesh.attributes.texCoords},\n material: {unlit, ...pbrMaterial},\n pbrDebug: false,\n imageBasedLightingEnvironment: null,\n lights: true,\n useTangents: false\n });\n return materialParser;\n }\n\n calculateFeatureIdsPickingColors(attribute) {\n const {featureIds} = this.props;\n const value = new Uint8ClampedArray(featureIds.length * attribute.size);\n\n const pickingColor = [];\n for (let index = 0; index < featureIds.length; index++) {\n this.encodePickingColor(featureIds[index], pickingColor);\n\n value[index * 3] = pickingColor[0];\n value[index * 3 + 1] = pickingColor[1];\n value[index * 3 + 2] = pickingColor[2];\n }\n\n attribute.value = value;\n }\n}\n\n_MeshLayer.layerName = '_MeshLayer';\n_MeshLayer.defaultProps = defaultProps;\n","export default `#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\nuniform bool composeModelMatrix;\nuniform bool u_pickFeatureIds;\n\n// Primitive attributes\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\nin vec4 uvRegions;\nin vec3 featureIdsPickingColors;\n\n// Instance attributes\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\n\n// Outputs to fragment shader\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvoid main(void) {\n // https://github.com/Esri/i3s-spec/blob/master/docs/1.7/geometryUVRegion.cmn.md\n vec2 uv = fract(texCoords) * (uvRegions.zw - uvRegions.xy) + uvRegions.xy;\n\n geometry.uv = uv;\n geometry.uv = texCoords;\n\n if (u_pickFeatureIds) {\n geometry.pickingColor = featureIdsPickingColors;\n } else {\n geometry.pickingColor = instancePickingColors;\n }\n\n #ifdef MODULE_PBR\n // set PBR data\n #ifdef HAS_NORMALS\n pbr_vNormal = project_normal(instanceModelMatrix * normals);\n geometry.normal = pbr_vNormal;\n #endif\n\n #ifdef HAS_UV\n pbr_vUV = uv;\n #else\n pbr_vUV = vec2(0., 0.);\n #endif\n geometry.uv = pbr_vUV;\n #endif\n\n vTexCoord = uv;\n cameraPosition = project_uCameraPosition;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n geometry.normal = normals_commonspace;\n\n vec3 pos = (instanceModelMatrix * positions) * sizeScale;\n vec3 projectedPosition = project_position(positions);\n position_commonspace = vec4(projectedPosition, 1.0);\n gl_Position = project_common_position_to_clipspace(position_commonspace);\n\n geometry.position = position_commonspace;\n\n #ifdef MODULE_PBR\n // set PBR data\n pbr_vPosition = geometry.position.xyz;\n #endif\n\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","export default `#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n \n#ifdef MODULE_PBR\n\n fragColor = vColor * pbr_filterColor(vec4(0));\n geometry.uv = pbr_vUV;\n fragColor.a *= opacity;\n\n#else\n\n geometry.uv = vTexCoord;\n\n vec3 normal;\n if (flatShading) {\n\n// NOTE(Tarek): This is necessary because\n// headless.gl reports the extension as\n// available but does not support it in\n// the shader.\n#ifdef DERIVATIVES_AVAILABLE\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n normal = vec3(0.0, 0.0, 1.0);\n#endif\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, color.a * opacity);\n\n#endif\n\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n`;\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {Vector3, isArray, toRadians, toDegrees, config} from '@math.gl/core';\nimport {WGS84_CONSTANTS} from './constants';\n\nconst noop = (x) => x;\n\nconst scratchVector = new Vector3();\n\nexport function fromCartographic(cartographic, result, map = noop) {\n if (isArray(cartographic)) {\n result[0] = map(cartographic[0]);\n result[1] = map(cartographic[1]);\n result[2] = cartographic[2];\n } else if ('longitude' in cartographic) {\n result[0] = map(cartographic.longitude);\n result[1] = map(cartographic.latitude);\n result[2] = cartographic.height;\n } else {\n result[0] = map(cartographic.x);\n result[1] = map(cartographic.y);\n result[2] = cartographic.z;\n }\n return result;\n}\n\nexport function fromCartographicToRadians(cartographic, vector = scratchVector) {\n return fromCartographic(cartographic, vector, config._cartographicRadians ? noop : toRadians);\n}\n\nexport function fromCartographicToDegrees(cartographic, vector = scratchVector) {\n return fromCartographic(cartographic, vector, config._cartographicRadians ? toDegrees : noop);\n}\n\nexport function toCartographic(vector, cartographic, map = noop) {\n if (isArray(cartographic)) {\n cartographic[0] = map(vector[0]);\n cartographic[1] = map(vector[1]);\n cartographic[2] = vector[2];\n } else if ('longitude' in cartographic) {\n cartographic.longitude = map(vector[0]);\n cartographic.latitude = map(vector[1]);\n cartographic.height = vector[2];\n } else {\n cartographic.x = map(vector[0]);\n cartographic.y = map(vector[1]);\n cartographic.z = vector[2];\n }\n return cartographic;\n}\n\nexport function toCartographicFromRadians(vector, cartographic) {\n return toCartographic(vector, cartographic, config._cartographicRadians ? noop : toDegrees);\n}\n\nexport function toCartographicFromDegrees(vector, cartographic) {\n return toCartographic(vector, cartographic, config._cartographicRadians ? toRadians : noop);\n}\n\nexport function isWGS84(vector) {\n if (!vector) {\n return false;\n }\n scratchVector.from(vector);\n const {oneOverRadiiSquared, centerToleranceSquared} = WGS84_CONSTANTS;\n const x2 = vector[0] * vector[0] * oneOverRadiiSquared[0];\n const y2 = vector[1] * vector[1] * oneOverRadiiSquared[1];\n const z2 = vector[2] * vector[2] * oneOverRadiiSquared[2];\n return Math.abs(x2 + y2 + z2 - 1) < centerToleranceSquared;\n}\n","/* eslint-disable */\nimport {Vector3, assert, _MathUtils} from '@math.gl/core';\nimport * as vec3 from 'gl-matrix/vec3';\n\nconst scratchVector = new Vector3();\nconst scaleToGeodeticSurfaceIntersection = new Vector3();\nconst scaleToGeodeticSurfaceGradient = new Vector3();\n\n// Scales the provided Cartesian position along the geodetic surface normal\n// so that it is on the surface of this ellipsoid. If the position is\n// at the center of the ellipsoid, this function returns undefined.\nexport default function scaleToGeodeticSurface(cartesian, ellipsoid, result = new Vector3()) {\n const {oneOverRadii, oneOverRadiiSquared, centerToleranceSquared} = ellipsoid;\n\n scratchVector.from(cartesian);\n\n const positionX = cartesian.x;\n const positionY = cartesian.y;\n const positionZ = cartesian.z;\n\n const oneOverRadiiX = oneOverRadii.x;\n const oneOverRadiiY = oneOverRadii.y;\n const oneOverRadiiZ = oneOverRadii.z;\n\n const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;\n const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;\n const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;\n\n // Compute the squared ellipsoid norm.\n const squaredNorm = x2 + y2 + z2;\n const ratio = Math.sqrt(1.0 / squaredNorm);\n\n // When very close to center or at center\n if (!Number.isFinite(ratio)) {\n return undefined;\n }\n\n // As an initial approximation, assume that the radial intersection is the projection point.\n const intersection = scaleToGeodeticSurfaceIntersection;\n intersection.copy(cartesian).scale(ratio);\n\n // If the position is near the center, the iteration will not converge.\n if (squaredNorm < centerToleranceSquared) {\n return intersection.to(result);\n }\n\n const oneOverRadiiSquaredX = oneOverRadiiSquared.x;\n const oneOverRadiiSquaredY = oneOverRadiiSquared.y;\n const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;\n\n // Use the gradient at the intersection point in place of the true unit normal.\n // The difference in magnitude will be absorbed in the multiplier.\n const gradient = scaleToGeodeticSurfaceGradient;\n gradient.set(\n intersection.x * oneOverRadiiSquaredX * 2.0,\n intersection.y * oneOverRadiiSquaredY * 2.0,\n intersection.z * oneOverRadiiSquaredZ * 2.0\n );\n\n // Compute the initial guess at the normal vector multiplier, lambda.\n let lambda = ((1.0 - ratio) * cartesian.len()) / (0.5 * gradient.len());\n let correction = 0.0;\n\n let xMultiplier;\n let yMultiplier;\n let zMultiplier;\n let func;\n\n do {\n lambda -= correction;\n\n xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);\n yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);\n zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);\n\n const xMultiplier2 = xMultiplier * xMultiplier;\n const yMultiplier2 = yMultiplier * yMultiplier;\n const zMultiplier2 = zMultiplier * zMultiplier;\n\n const xMultiplier3 = xMultiplier2 * xMultiplier;\n const yMultiplier3 = yMultiplier2 * yMultiplier;\n const zMultiplier3 = zMultiplier2 * zMultiplier;\n\n func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;\n\n // \"denominator\" here refers to the use of this expression in the velocity and acceleration\n // computations in the sections to follow.\n const denominator =\n x2 * xMultiplier3 * oneOverRadiiSquaredX +\n y2 * yMultiplier3 * oneOverRadiiSquaredY +\n z2 * zMultiplier3 * oneOverRadiiSquaredZ;\n\n const derivative = -2.0 * denominator;\n\n correction = func / derivative;\n } while (Math.abs(func) > _MathUtils.EPSILON12);\n\n return scratchVector.scale([xMultiplier, yMultiplier, zMultiplier]).to(result);\n}\n","import {Vector3, assert, equals as equalsEpsilon} from '@math.gl/core';\n\nconst EPSILON14 = 1e-14;\n\nconst scratchOrigin = new Vector3();\n\n// Caclulate third axis from given two axii\nconst VECTOR_PRODUCT_LOCAL_FRAME = {\n up: {\n south: 'east',\n north: 'west',\n west: 'south',\n east: 'north'\n },\n down: {\n south: 'west',\n north: 'east',\n west: 'north',\n east: 'south'\n },\n south: {\n up: 'west',\n down: 'east',\n west: 'down',\n east: 'up'\n },\n north: {\n up: 'east',\n down: 'west',\n west: 'up',\n east: 'down'\n },\n west: {\n up: 'north',\n down: 'south',\n north: 'down',\n south: 'up'\n },\n east: {\n up: 'south',\n down: 'north',\n north: 'up',\n south: 'down'\n }\n};\n\nconst degeneratePositionLocalFrame = {\n north: [-1, 0, 0],\n east: [0, 1, 0],\n up: [0, 0, 1],\n south: [1, 0, 0],\n west: [0, -1, 0],\n down: [0, 0, -1]\n};\n\nconst scratchAxisVectors = {\n east: new Vector3(),\n north: new Vector3(),\n up: new Vector3(),\n west: new Vector3(),\n south: new Vector3(),\n down: new Vector3()\n};\n\nconst scratchVector1 = new Vector3();\nconst scratchVector2 = new Vector3();\nconst scratchVector3 = new Vector3();\n\n// Computes a 4x4 transformation matrix from a reference frame\n// centered at the provided origin to the provided ellipsoid's fixed reference frame.\n// eslint-disable-next-line max-statements, max-params, complexity\nexport default function localFrameToFixedFrame(\n ellipsoid,\n firstAxis,\n secondAxis,\n thirdAxis,\n cartesianOrigin,\n result\n) {\n const thirdAxisInferred =\n VECTOR_PRODUCT_LOCAL_FRAME[firstAxis] && VECTOR_PRODUCT_LOCAL_FRAME[firstAxis][secondAxis];\n // firstAxis and secondAxis must be east, north, up, west, south or down.');\n assert(thirdAxisInferred && (!thirdAxis || thirdAxis === thirdAxisInferred));\n\n let firstAxisVector;\n let secondAxisVector;\n let thirdAxisVector;\n\n const origin = scratchOrigin.copy(cartesianOrigin);\n\n // If x and y are zero, assume origin is at a pole, which is a special case.\n const atPole = equalsEpsilon(origin.x, 0.0, EPSILON14) && equalsEpsilon(origin.y, 0.0, EPSILON14);\n\n if (atPole) {\n // Look up axis value and adjust\n const sign = Math.sign(origin.z);\n\n firstAxisVector = scratchVector1.fromArray(degeneratePositionLocalFrame[firstAxis]);\n if (firstAxis !== 'east' && firstAxis !== 'west') {\n firstAxisVector.scale(sign);\n }\n\n secondAxisVector = scratchVector2.fromArray(degeneratePositionLocalFrame[secondAxis]);\n if (secondAxis !== 'east' && secondAxis !== 'west') {\n secondAxisVector.scale(sign);\n }\n\n thirdAxisVector = scratchVector3.fromArray(degeneratePositionLocalFrame[thirdAxis]);\n if (thirdAxis !== 'east' && thirdAxis !== 'west') {\n thirdAxisVector.scale(sign);\n }\n } else {\n // Calculate all axis\n const {up, east, north} = scratchAxisVectors;\n\n east.set(-origin.y, origin.x, 0.0).normalize();\n ellipsoid.geodeticSurfaceNormal(origin, up);\n north.copy(up).cross(east);\n\n const {down, west, south} = scratchAxisVectors;\n\n down.copy(up).scale(-1);\n west.copy(east).scale(-1);\n south.copy(north).scale(-1);\n\n // Pick three axis based on desired orientation\n firstAxisVector = scratchAxisVectors[firstAxis];\n secondAxisVector = scratchAxisVectors[secondAxis];\n thirdAxisVector = scratchAxisVectors[thirdAxis];\n }\n\n // TODO - assuming the result is column-major\n result[0] = firstAxisVector.x;\n result[1] = firstAxisVector.y;\n result[2] = firstAxisVector.z;\n result[3] = 0.0;\n result[4] = secondAxisVector.x;\n result[5] = secondAxisVector.y;\n result[6] = secondAxisVector.z;\n result[7] = 0.0;\n result[8] = thirdAxisVector.x;\n result[9] = thirdAxisVector.y;\n result[10] = thirdAxisVector.z;\n result[11] = 0.0;\n result[12] = origin.x;\n result[13] = origin.y;\n result[14] = origin.z;\n result[15] = 1.0;\n return result;\n}\n","// This file is derived from the Cesium math library under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n/* eslint-disable */\nimport {Vector3, Matrix4, toRadians, toDegrees, assert, equals, _MathUtils} from '@math.gl/core';\nimport * as vec3 from 'gl-matrix/vec3';\n\nimport {WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z} from '../constants';\nimport {fromCartographicToRadians, toCartographicFromRadians} from '../type-utils';\n\nimport scaleToGeodeticSurface from './helpers/scale-to-geodetic-surface';\nimport localFrameToFixedFrame from './helpers/ellipsoid-transform';\n\nconst scratchVector = new Vector3();\nconst scratchNormal = new Vector3();\nconst scratchK = new Vector3();\nconst scratchPosition = new Vector3();\nconst scratchHeight = new Vector3();\nconst scratchCartesian = new Vector3();\n\nlet wgs84;\n\n// A quadratic surface defined in Cartesian coordinates by the equation\n// <code>(x / a)^2 + (y / b)^2 + (z / c)^2 = 1</code>. Primarily used\n// to represent the shape of planetary bodies.\nexport default class Ellipsoid {\n // An Ellipsoid instance initialized to the WGS84 standard.\n static get WGS84() {\n wgs84 = wgs84 || new Ellipsoid(WGS84_RADIUS_X, WGS84_RADIUS_Y, WGS84_RADIUS_Z);\n return wgs84;\n }\n\n // Creates an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.\n constructor(x = 0.0, y = 0.0, z = 0.0) {\n assert(x >= 0.0);\n assert(y >= 0.0);\n assert(z >= 0.0);\n\n this.radii = new Vector3(x, y, z);\n\n this.radiiSquared = new Vector3(x * x, y * y, z * z);\n\n this.radiiToTheFourth = new Vector3(x * x * x * x, y * y * y * y, z * z * z * z);\n\n this.oneOverRadii = new Vector3(\n x === 0.0 ? 0.0 : 1.0 / x,\n y === 0.0 ? 0.0 : 1.0 / y,\n z === 0.0 ? 0.0 : 1.0 / z\n );\n\n this.oneOverRadiiSquared = new Vector3(\n x === 0.0 ? 0.0 : 1.0 / (x * x),\n y === 0.0 ? 0.0 : 1.0 / (y * y),\n z === 0.0 ? 0.0 : 1.0 / (z * z)\n );\n\n this.minimumRadius = Math.min(x, y, z);\n\n this.maximumRadius = Math.max(x, y, z);\n\n this.centerToleranceSquared = _MathUtils.EPSILON1;\n\n if (this.radiiSquared.z !== 0) {\n this.squaredXOverSquaredZ = this.radiiSquared.x / this.radiiSquared.z;\n }\n\n Object.freeze(this);\n }\n\n // Compares this Ellipsoid against the provided Ellipsoid componentwise and returns\n equals(right) {\n return this === right || Boolean(right && this.radii.equals(right.radii));\n }\n\n // Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.\n toString() {\n return this.radii.toString();\n }\n\n // Converts the provided cartographic to Cartesian representation.\n cartographicToCartesian(cartographic, result = [0, 0, 0]) {\n const normal = scratchNormal;\n const k = scratchK;\n\n const [, , height] = cartographic;\n this.geodeticSurfaceNormalCartographic(cartographic, normal);\n k.copy(this.radiiSquared).scale(normal);\n\n const gamma = Math.sqrt(normal.dot(k));\n k.scale(1 / gamma);\n\n normal.scale(height);\n\n k.add(normal);\n\n return k.to(result);\n }\n\n // Converts the provided cartesian to cartographic (lng/lat/z) representation.\n // The cartesian is undefined at the center of the ellipsoid.\n cartesianToCartographic(cartesian, result = [0, 0, 0]) {\n scratchCartesian.from(cartesian);\n const point = this.scaleToGeodeticSurface(scratchCartesian, scratchPosition);\n\n if (!point) {\n return undefined;\n }\n\n const normal = this.geodeticSurfaceNormal(point, scratchNormal);\n\n const h = scratchHeight;\n h.copy(scratchCartesian).subtract(point);\n\n const longitude = Math.atan2(normal.y, normal.x);\n const latitude = Math.asin(normal.z);\n const height = Math.sign(vec3.dot(h, scratchCartesian)) * vec3.length(h);\n\n return toCartographicFromRadians([longitude, latitude, height], result);\n }\n\n // Computes a 4x4 transformation matrix from a reference frame with an east-north-up axes\n // centered at the provided origin to the provided ellipsoid's fixed reference frame.\n eastNorthUpToFixedFrame(origin, result = new Matrix4()) {\n return localFrameToFixedFrame(this, 'east', 'north', 'up', origin, result);\n }\n\n // Computes a 4x4 transformation matrix from a reference frame centered at\n // the provided origin to the ellipsoid's fixed reference frame.\n localFrameToFixedFrame(firstAxis, secondAxis, thirdAxis, origin, result = new Matrix4()) {\n return localFrameToFixedFrame(this, firstAxis, secondAxis, thirdAxis, origin, result);\n }\n\n // Computes the unit vector directed from the center of this ellipsoid toward\n // the provided Cartesian position.\n geocentricSurfaceNormal(cartesian, result = [0, 0, 0]) {\n return scratchVector.from(cartesian).normalize().to(result);\n }\n\n // Computes the normal of the plane tangent to the surface of the ellipsoid at provided position.\n geodeticSurfaceNormalCartographic(cartographic, result = [0, 0, 0]) {\n const cartographicVectorRadians = fromCartographicToRadians(cartographic);\n\n const longitude = cartographicVectorRadians[0];\n const latitude = cartographicVectorRadians[1];\n\n const cosLatitude = Math.cos(latitude);\n\n scratchVector\n .set(cosLatitude * Math.cos(longitude), cosLatitude * Math.sin(longitude), Math.sin(latitude))\n .normalize();\n\n return scratchVector.to(result);\n }\n\n // Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.\n geodeticSurfaceNormal(cartesian, result = [0, 0, 0]) {\n return scratchVector.from(cartesian).scale(this.oneOverRadiiSquared).normalize().to(result);\n }\n\n // Scales the provided Cartesian position along the geodetic surface normal\n // so that it is on the surface of this ellipsoid. If the position is\n // at the center of the ellipsoid, this function returns undefined.\n scaleToGeodeticSurface(cartesian, result) {\n return scaleToGeodeticSurface(cartesian, this, result);\n }\n\n // Scales the provided Cartesian position along the geocentric surface normal\n // so that it is on the surface of this ellipsoid.\n scaleToGeocentricSurface(cartesian, result = [0, 0, 0]) {\n scratchPosition.from(cartesian);\n\n const positionX = scratchPosition.x;\n const positionY = scratchPosition.y;\n const positionZ = scratchPosition.z;\n const oneOverRadiiSquared = this.oneOverRadiiSquared;\n\n const beta =\n 1.0 /\n Math.sqrt(\n positionX * positionX * oneOverRadiiSquared.x +\n positionY * positionY * oneOverRadiiSquared.y +\n positionZ * positionZ * oneOverRadiiSquared.z\n );\n\n return scratchPosition.multiplyScalar(beta).to(result);\n }\n\n // Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying\n // its components by the result of `Ellipsoid#oneOverRadii`\n transformPositionToScaledSpace(position, result = [0, 0, 0]) {\n return scratchPosition.from(position).scale(this.oneOverRadii).to(result);\n }\n\n // Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying\n // its components by the result of `Ellipsoid#radii`.\n transformPositionFromScaledSpace(position, result = [0, 0, 0]) {\n return scratchPosition.from(position).scale(this.radii).to(result);\n }\n\n // Computes a point which is the intersection of the surface normal with the z-axis.\n getSurfaceNormalIntersectionWithZAxis(position, buffer = 0.0, result = [0, 0, 0]) {\n // Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)\n assert(equals(this.radii.x, this.radii.y, _MathUtils.EPSILON15));\n assert(this.radii.z > 0);\n\n scratchPosition.from(position);\n const z = scratchPosition.z * (1 - this.squaredXOverSquaredZ);\n\n if (Math.abs(z) >= this.radii.z - buffer) {\n return undefined;\n }\n\n return scratchPosition.set(0.0, 0.0, z).to(result);\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n/**\n * Doubly linked list node\n *\n * @private\n */\nexport default class DoublyLinkedListNode {\n constructor(item, previous, next) {\n this.item = item;\n this.previous = previous;\n this.next = next;\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport DoublyLinkedListNode from '../utils/doubly-linked-list-node';\n\n/**\n * Doubly linked list\n *\n * @private\n */\nexport default class DoublyLinkedList {\n constructor() {\n this.head = null;\n this.tail = null;\n this._length = 0;\n }\n\n get length() {\n return this._length;\n }\n\n /**\n * Adds the item to the end of the list\n * @param {*} [item]\n * @return {DoublyLinkedListNode}\n */\n add(item) {\n const node = new DoublyLinkedListNode(item, this.tail, null);\n\n if (this.tail) {\n this.tail.next = node;\n this.tail = node;\n } else {\n this.head = node;\n this.tail = node;\n }\n\n ++this._length;\n\n return node;\n }\n\n /**\n * Removes the given node from the list\n * @param {DoublyLinkedListNode} node\n */\n remove(node) {\n if (!node) {\n return;\n }\n\n if (node.previous && node.next) {\n node.previous.next = node.next;\n node.next.previous = node.previous;\n } else if (node.previous) {\n // Remove last node\n node.previous.next = null;\n this.tail = node.previous;\n } else if (node.next) {\n // Remove first node\n node.next.previous = null;\n this.head = node.next;\n } else {\n // Remove last node in the linked list\n this.head = null;\n this.tail = null;\n }\n\n node.next = null;\n node.previous = null;\n\n --this._length;\n }\n\n /**\n * Moves nextNode after node\n * @param {DoublyLinkedListNode} node\n * @param {DoublyLinkedListNode} nextNode\n */\n splice(node, nextNode) {\n if (node === nextNode) {\n return;\n }\n\n // Remove nextNode, then insert after node\n this.remove(nextNode);\n this._insert(node, nextNode);\n }\n\n _insert(node, nextNode) {\n const oldNodeNext = node.next;\n node.next = nextNode;\n\n // nextNode is the new tail\n if (this.tail === node) {\n this.tail = nextNode;\n } else {\n oldNodeNext.previous = nextNode;\n }\n\n nextNode.next = oldNodeNext;\n nextNode.previous = node;\n\n ++this._length;\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport DoublyLinkedList from '../utils/doubly-linked-list';\n\nfunction defined(x) {\n return x !== undefined && x !== null;\n}\n\n/**\n * Stores tiles with content loaded.\n *\n * @private\n */\nexport default class TilesetCache {\n private _list: DoublyLinkedList;\n private _sentinel: any;\n private _trimTiles: boolean;\n\n constructor() {\n // [head, sentinel) -> tiles that weren't selected this frame and may be removed from the cache\n // (sentinel, tail] -> tiles that were selected this frame\n this._list = new DoublyLinkedList();\n this._sentinel = this._list.add('sentinel');\n this._trimTiles = false;\n }\n\n reset() {\n // Move sentinel node to the tail so, at the start of the frame, all tiles\n // may be potentially replaced. Tiles are moved to the right of the sentinel\n // when they are selected so they will not be replaced.\n this._list.splice(this._list.tail, this._sentinel);\n }\n\n touch(tile) {\n const node = tile._cacheNode;\n if (defined(node)) {\n this._list.splice(this._sentinel, node);\n }\n }\n\n add(tileset, tile, addCallback) {\n if (!defined(tile._cacheNode)) {\n tile._cacheNode = this._list.add(tile);\n\n if (addCallback) {\n addCallback(tileset, tile);\n }\n }\n }\n\n unloadTile(tileset, tile, unloadCallback?) {\n const node = tile._cacheNode;\n if (!defined(node)) {\n return;\n }\n\n this._list.remove(node);\n tile._cacheNode = undefined;\n if (unloadCallback) {\n unloadCallback(tileset, tile);\n }\n }\n\n unloadTiles(tileset, unloadCallback) {\n const trimTiles = this._trimTiles;\n this._trimTiles = false;\n\n const list = this._list;\n\n const maximumMemoryUsageInBytes = tileset.maximumMemoryUsage * 1024 * 1024;\n\n // Traverse the list only to the sentinel since tiles/nodes to the\n // right of the sentinel were used this frame.\n // The sub-list to the left of the sentinel is ordered from LRU to MRU.\n const sentinel = this._sentinel;\n let node = list.head;\n\n while (\n node !== sentinel &&\n (tileset.gpuMemoryUsageInBytes > maximumMemoryUsageInBytes || trimTiles)\n ) {\n const tile = node.item;\n node = node.next;\n this.unloadTile(tileset, tile, unloadCallback);\n }\n }\n\n trim() {\n this._trimTiles = true;\n }\n}\n","import {Vector3} from '@math.gl/core';\nimport {CullingVolume, Plane} from '@math.gl/culling';\nimport {Ellipsoid} from '@math.gl/geospatial';\n\nexport type FrameState = {\n camera: {\n position: number[];\n direction: number[];\n up: number[];\n };\n viewport: {[key: string]: any};\n height: number;\n cullingVolume: CullingVolume;\n frameNumber: number; // TODO: This can be the same between updates, what number is unique for between updates?\n sseDenominator: number; // Assumes fovy = 60 degrees\n};\n\nconst scratchVector = new Vector3();\nconst scratchPosition = new Vector3();\nconst cullingVolume = new CullingVolume([\n new Plane(),\n new Plane(),\n new Plane(),\n new Plane(),\n new Plane(),\n new Plane()\n]);\n\n// Extracts a frame state appropriate for tile culling from a deck.gl viewport\n// TODO - this could likely be generalized and merged back into deck.gl for other culling scenarios\nexport function getFrameState(viewport, frameNumber: number): FrameState {\n // Traverse and and request. Update _selectedTiles so that we know what to render.\n const {cameraDirection, cameraUp, height} = viewport;\n const {metersPerUnit} = viewport.distanceScales;\n\n const viewportCenterCartographic = [viewport.longitude, viewport.latitude, 0];\n // TODO - Ellipsoid.eastNorthUpToFixedFrame() breaks on raw array, create a Vector.\n // TODO - Ellipsoid.eastNorthUpToFixedFrame() takes a cartesian, is that intuitive?\n const viewportCenterCartesian = Ellipsoid.WGS84.cartographicToCartesian(\n viewportCenterCartographic,\n new Vector3()\n );\n const enuToFixedTransform = Ellipsoid.WGS84.eastNorthUpToFixedFrame(viewportCenterCartesian);\n\n const cameraPositionCartographic = viewport.unprojectPosition(viewport.cameraPosition);\n const cameraPositionCartesian = Ellipsoid.WGS84.cartographicToCartesian(\n cameraPositionCartographic,\n new Vector3()\n );\n\n // These should still be normalized as the transform has scale 1 (goes from meters to meters)\n const cameraDirectionCartesian = new Vector3(\n // @ts-ignore\n enuToFixedTransform.transformAsVector(new Vector3(cameraDirection).scale(metersPerUnit))\n ).normalize();\n const cameraUpCartesian = new Vector3(\n // @ts-ignore\n enuToFixedTransform.transformAsVector(new Vector3(cameraUp).scale(metersPerUnit))\n ).normalize();\n\n commonSpacePlanesToWGS84(viewport, viewportCenterCartesian);\n\n // TODO: make a file/class for frameState and document what needs to be attached to this so that traversal can function\n return {\n camera: {\n position: cameraPositionCartesian,\n direction: cameraDirectionCartesian,\n up: cameraUpCartesian\n },\n viewport,\n height,\n cullingVolume,\n frameNumber, // TODO: This can be the same between updates, what number is unique for between updates?\n sseDenominator: 1.15 // Assumes fovy = 60 degrees\n };\n}\n\nfunction commonSpacePlanesToWGS84(viewport, viewportCenterCartesian) {\n // Extract frustum planes based on current view.\n const frustumPlanes = viewport.getFrustumPlanes();\n let i = 0;\n for (const dir in frustumPlanes) {\n const plane = frustumPlanes[dir];\n const distanceToCenter = plane.normal.dot(viewport.center);\n scratchPosition\n .copy(plane.normal)\n .scale(plane.distance - distanceToCenter)\n .add(viewport.center);\n const cartographicPos = viewport.unprojectPosition(scratchPosition);\n\n const cartesianPos = Ellipsoid.WGS84.cartographicToCartesian(cartographicPos, new Vector3());\n\n cullingVolume.planes[i++].fromPointNormal(\n cartesianPos,\n // Want the normal to point into the frustum since that's what culling expects\n scratchVector.copy(viewportCenterCartesian).subtract(cartesianPos)\n );\n }\n}\n","import {Vector3} from '@math.gl/core';\n\nconst WGS84_RADIUS_X = 6378137.0;\nconst WGS84_RADIUS_Y = 6378137.0;\nconst WGS84_RADIUS_Z = 6356752.3142451793;\n\nconst scratchVector = new Vector3();\n\n/**\n * Calculate appropriate zoom value for a particular boundingVolume\n * @param {BoundingSphere, OrientedBoundingBox} boundingVolume - the instance of bounding volume\n * @returns {number} - zoom value\n */\nexport function getZoomFromBoundingVolume(boundingVolume) {\n const {halfAxes, radius, width, height} = boundingVolume;\n\n if (halfAxes) {\n // OrientedBoundingBox\n const obbSize = getObbSize(halfAxes);\n // Use WGS84_RADIUS_Z to allign with BoundingSphere algorithm\n return Math.log2(WGS84_RADIUS_Z / obbSize);\n } else if (radius) {\n // BoundingSphere\n return Math.log2(WGS84_RADIUS_Z / radius);\n } else if (height && width) {\n // BoundingRectangle\n const zoomX = Math.log2(WGS84_RADIUS_X / width);\n const zoomY = Math.log2(WGS84_RADIUS_Y / height);\n\n return (zoomX + zoomY) / 2;\n }\n\n return 1;\n}\n\nfunction getObbSize(halfAxes) {\n halfAxes.getColumn(0, scratchVector);\n const axeY = halfAxes.getColumn(1);\n const axeZ = halfAxes.getColumn(2);\n const farthestVertex = scratchVector.add(axeY).add(axeZ);\n const size = farthestVertex.len();\n return size;\n}\n","export const TILE_CONTENT_STATE = {\n UNLOADED: 0, // Has never been requested\n LOADING: 1, // Is waiting on a pending request\n PROCESSING: 2, // Request received. Contents are being processed for rendering. Depending on the content, it might make its own requests for external data.\n READY: 3, // Ready to render.\n EXPIRED: 4, // Is expired and will be unloaded once new content is loaded.\n FAILED: 5 // Request failed.\n};\n\nexport const TILE_REFINEMENT = {\n ADD: 1, // Render tile and, if screen space error exceeded, also refine to its children.\n REPLACE: 2 // Render tile or, if screen space error exceeded, refine to its descendants instead.\n};\n\nexport const TILE_TYPE = {\n EMPTY: 'empty',\n SCENEGRAPH: 'scenegraph',\n POINTCLOUD: 'pointcloud',\n MESH: 'mesh'\n};\n\nexport const TILESET_TYPE = {\n I3S: 'I3S',\n TILES3D: 'TILES3D'\n};\n\nexport const LOD_METRIC_TYPE = {\n GEOMETRIC_ERROR: 'geometricError',\n MAX_SCREEN_THRESHOLD: 'maxScreenThreshold'\n};\n\n// Cesium 3D Tiles Specific\nexport const TILE3D_OPTIMIZATION_HINT = {\n NOT_COMPUTED: -1,\n USE_OPTIMIZATION: 1,\n SKIP_OPTIMIZATION: 0\n};\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n/* eslint-disable */\nimport {Quaternion, Vector3, Matrix3, Matrix4, degrees} from '@math.gl/core';\nimport {BoundingSphere, OrientedBoundingBox} from '@math.gl/culling';\nimport {Ellipsoid} from '@math.gl/geospatial';\nimport {assert} from '@loaders.gl/loader-utils';\n\n// const scratchProjectedBoundingSphere = new BoundingSphere();\n\nfunction defined(x) {\n return x !== undefined && x !== null;\n}\n\n// const scratchMatrix = new Matrix3();\nconst scratchScale = new Vector3();\nconst scratchNorthWest = new Vector3();\nconst scratchSouthEast = new Vector3();\n// const scratchRectangle = new Rectangle();\n// const scratchOrientedBoundingBox = new OrientedBoundingBox();\n// const scratchTransform = new Matrix4();\n\n/**\n * Create a bounding volume from the tile's bounding volume header.\n * @param {Object} boundingVolumeHeader The tile's bounding volume header.\n * @param {Matrix4} transform The transform to apply to the bounding volume.\n * @param [result] The object onto which to store the result.\n * @returns The modified result parameter or a new TileBoundingVolume instance if none was provided.\n */\nexport function createBoundingVolume(boundingVolumeHeader, transform, result) {\n assert(boundingVolumeHeader, '3D Tile: boundingVolume must be defined');\n\n // boundingVolume schema:\n // https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/specification/schema/boundingVolume.schema.json\n if (boundingVolumeHeader.box) {\n return createBox(boundingVolumeHeader.box, transform, result);\n }\n if (boundingVolumeHeader.region) {\n // [west, south, east, north, minimum height, maximum height]\n // Latitudes and longitudes are in the WGS 84 datum as defined in EPSG 4979 and are in radians.\n // Heights are in meters above (or below) the WGS 84 ellipsoid.\n const [west, south, east, north, minHeight, maxHeight] = boundingVolumeHeader.region;\n\n const northWest = Ellipsoid.WGS84.cartographicToCartesian(\n [degrees(west), degrees(north), minHeight],\n scratchNorthWest\n );\n const southEast = Ellipsoid.WGS84.cartographicToCartesian(\n [degrees(east), degrees(south), maxHeight],\n scratchSouthEast\n );\n const centerInCartesian = new Vector3().addVectors(northWest, southEast).multiplyScalar(0.5);\n const radius = new Vector3().subVectors(northWest, southEast).len() / 2.0;\n\n // TODO improve region boundingVolume\n // for now, create a sphere as the boundingVolume instead of box\n return createSphere(\n [centerInCartesian[0], centerInCartesian[1], centerInCartesian[2], radius],\n new Matrix4()\n );\n }\n\n if (boundingVolumeHeader.sphere) {\n return createSphere(boundingVolumeHeader.sphere, transform, result);\n }\n\n throw new Error('3D Tile: boundingVolume must contain a sphere, region, or box');\n}\n\nfunction createBox(box, transform, result) {\n // https://math.gl/modules/culling/docs/api-reference/oriented-bounding-box\n // 1. A half-axes based representation.\n // box: An array of 12 numbers that define an oriented bounding box.\n // The first three elements define the x, y, and z values for the center of the box.\n // The next three elements (with indices 3, 4, and 5) define the x axis direction and half-length.\n // The next three elements (indices 6, 7, and 8) define the y axis direction and half-length.\n // The last three elements (indices 9, 10, and 11) define the z axis direction and half-length.\n // 2. A half-size-quaternion based representation.\n // box: An array of 10 numbers that define an oriented bounding box.\n // The first three elements define the x, y, and z values for the center of the box in a right-handed 3-axis (x, y, z) Cartesian coordinate system where the z-axis is up.\n // The next three elements (with indices 3, 4, and 5) define the halfSize.\n // The last four elements (indices 6, 7, 8 and 10) define the quaternion.\n const center = new Vector3(box[0], box[1], box[2]);\n transform.transform(center, center);\n let origin: number[] = [];\n if (box.length === 10) {\n const halfSize = box.slice(3, 6);\n const quaternion = new Quaternion();\n quaternion.fromArray(box, 6);\n const x = new Vector3([1, 0, 0]);\n const y = new Vector3([0, 1, 0]);\n const z = new Vector3([0, 0, 1]);\n x.transformByQuaternion(quaternion);\n x.scale(halfSize[0]);\n y.transformByQuaternion(quaternion);\n y.scale(halfSize[1]);\n z.transformByQuaternion(quaternion);\n z.scale(halfSize[2]);\n origin = [...x.toArray(), ...y.toArray(), ...z.toArray()];\n } else {\n origin = [...box.slice(3, 6), ...box.slice(6, 9), ...box.slice(9, 12)];\n }\n const xAxis = transform.transformAsVector(origin.slice(0, 3));\n const yAxis = transform.transformAsVector(origin.slice(3, 6));\n const zAxis = transform.transformAsVector(origin.slice(6, 9));\n const halfAxes = new Matrix3([\n xAxis[0],\n xAxis[1],\n xAxis[2],\n yAxis[0],\n yAxis[1],\n yAxis[2],\n zAxis[0],\n zAxis[1],\n zAxis[2]\n ]);\n\n if (defined(result)) {\n result.center = center;\n result.halfAxes = halfAxes;\n return result;\n }\n\n return new OrientedBoundingBox(center, halfAxes);\n}\n\n/*\nfunction createBoxFromTransformedRegion(region, transform, initialTransform, result) {\n const rectangle = Rectangle.unpack(region, 0, scratchRectangle);\n const minimumHeight = region[4];\n const maximumHeight = region[5];\n\n const orientedBoundingBox = OrientedBoundingBox.fromRectangle(\n rectangle,\n minimumHeight,\n maximumHeight,\n Ellipsoid.WGS84,\n scratchOrientedBoundingBox\n );\n const center = orientedBoundingBox.center;\n const halfAxes = orientedBoundingBox.halfAxes;\n\n // A region bounding volume is not transformed by the transform in the tileset JSON,\n // but may be transformed by additional transforms applied in Cesium.\n // This is why the transform is calculated as the difference between the initial transform and the current transform.\n transform = Matrix4.multiplyTransformation(\n transform,\n Matrix4.inverseTransformation(initialTransform, scratchTransform),\n scratchTransform\n );\n center = Matrix4.multiplyByPoint(transform, center, center);\n const rotationScale = Matrix4.getRotation(transform, scratchMatrix);\n halfAxes = Matrix3.multiply(rotationScale, halfAxes, halfAxes);\n\n if (defined(result) && result instanceof TileOrientedBoundingBox) {\n result.update(center, halfAxes);\n return result;\n }\n\n return new TileOrientedBoundingBox(center, halfAxes);\n}\n\nfunction createRegion(region, transform, initialTransform, result) {\n if (!Matrix4.equalsEpsilon(transform, initialTransform, CesiumMath.EPSILON8)) {\n return createBoxFromTransformedRegion(region, transform, initialTransform, result);\n }\n\n if (defined(result)) {\n return result;\n }\n\n const rectangleRegion = Rectangle.unpack(region, 0, scratchRectangle);\n\n return new TileBoundingRegion({\n rectangle: rectangleRegion,\n minimumHeight: region[4],\n maximumHeight: region[5]\n });\n}\n*/\n\nfunction createSphere(sphere, transform, result?) {\n // Find the transformed center\n const center = new Vector3(sphere[0], sphere[1], sphere[2]);\n transform.transform(center, center);\n const scale = transform.getScale(scratchScale);\n\n const uniformScale = Math.max(Math.max(scale[0], scale[1]), scale[2]);\n const radius = sphere[3] * uniformScale;\n\n if (defined(result)) {\n result.center = center;\n result.radius = radius;\n return result;\n }\n\n return new BoundingSphere(center, radius);\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// TODO - Dynamic screen space error provides an optimization when looking at\n// tilesets from above\n\n/* eslint-disable */\n// @ts-nocheck\nimport {Matrix4, Vector3, clamp} from '@math.gl/core';\n\nconst scratchPositionNormal = new Vector3();\nconst scratchCartographic = new Vector3();\nconst scratchMatrix = new Matrix4();\nconst scratchCenter = new Vector3();\nconst scratchPosition = new Vector3();\nconst scratchDirection = new Vector3();\n\n// eslint-disable-next-line max-statements, complexity\nexport function calculateDynamicScreenSpaceError(root, {camera, mapProjection}, options = {}) {\n const {dynamicScreenSpaceErrorHeightFalloff = 0.25, dynamicScreenSpaceErrorDensity = 0.00278} =\n options;\n\n let up;\n let direction;\n let height;\n let minimumHeight;\n let maximumHeight;\n\n const tileBoundingVolume = root.contentBoundingVolume;\n\n if (tileBoundingVolume instanceof TileBoundingRegion) {\n up = Cartesian3.normalize(camera.positionWC, scratchPositionNormal);\n direction = camera.directionWC;\n height = camera.positionCartographic.height;\n minimumHeight = tileBoundingVolume.minimumHeight;\n maximumHeight = tileBoundingVolume.maximumHeight;\n } else {\n // Transform camera position and direction into the local coordinate system of the tileset\n const transformLocal = Matrix4.inverseTransformation(root.computedTransform, scratchMatrix);\n const ellipsoid = mapProjection.ellipsoid;\n const boundingVolume = tileBoundingVolume.boundingVolume;\n const centerLocal = Matrix4.multiplyByPoint(\n transformLocal,\n boundingVolume.center,\n scratchCenter\n );\n if (Cartesian3.magnitude(centerLocal) > ellipsoid.minimumRadius) {\n // The tileset is defined in WGS84. Approximate the minimum and maximum height.\n const centerCartographic = Cartographic.fromCartesian(\n centerLocal,\n ellipsoid,\n scratchCartographic\n );\n up = Cartesian3.normalize(camera.positionWC, scratchPositionNormal);\n direction = camera.directionWC;\n height = camera.positionCartographic.height;\n minimumHeight = 0.0;\n maximumHeight = centerCartographic.height * 2.0;\n } else {\n // The tileset is defined in local coordinates (z-up)\n const positionLocal = Matrix4.multiplyByPoint(\n transformLocal,\n camera.positionWC,\n scratchPosition\n );\n up = Cartesian3.UNIT_Z;\n direction = Matrix4.multiplyByPointAsVector(\n transformLocal,\n camera.directionWC,\n scratchDirection\n );\n direction = Cartesian3.normalize(direction, direction);\n height = positionLocal.z;\n if (tileBoundingVolume instanceof TileOrientedBoundingBox) {\n // Assuming z-up, the last component stores the half-height of the box\n const boxHeight = root._header.boundingVolume.box[11];\n minimumHeight = centerLocal.z - boxHeight;\n maximumHeight = centerLocal.z + boxHeight;\n } else if (tileBoundingVolume instanceof TileBoundingSphere) {\n const radius = boundingVolume.radius;\n minimumHeight = centerLocal.z - radius;\n maximumHeight = centerLocal.z + radius;\n }\n }\n }\n\n // The range where the density starts to lessen. Start at the quarter height of the tileset.\n const heightFalloff = dynamicScreenSpaceErrorHeightFalloff;\n const heightClose = minimumHeight + (maximumHeight - minimumHeight) * heightFalloff;\n const heightFar = maximumHeight;\n\n const t = clamp((height - heightClose) / (heightFar - heightClose), 0.0, 1.0);\n\n // Increase density as the camera tilts towards the horizon\n const dot = Math.abs(Cartesian3.dot(direction, up));\n\n let horizonFactor = 1.0 - dot;\n\n // Weaken the horizon factor as the camera height increases, implying the camera is further away from the tileset.\n // The goal is to increase density for the \"street view\", not when viewing the tileset from a distance.\n horizonFactor = horizonFactor * (1.0 - t);\n\n return dynamicScreenSpaceErrorDensity * horizonFactor;\n}\n\nexport function fog(distanceToCamera, density) {\n const scalar = distanceToCamera * density;\n return 1.0 - Math.exp(-(scalar * scalar));\n}\n\nexport function getDynamicScreenSpaceError(tileset, distanceToCamera) {\n if (tileset.dynamicScreenSpaceError && tileset.dynamicScreenSpaceErrorComputedDensity) {\n const density = tileset.dynamicScreenSpaceErrorComputedDensity;\n const factor = tileset.dynamicScreenSpaceErrorFactor;\n // TODO: Refined screen space error that minimizes tiles in non-first-person\n const dynamicError = fog(distanceToCamera, density) * factor;\n return dynamicError;\n }\n\n return 0;\n}\n\nexport function getTiles3DScreenSpaceError(tile, frameState, useParentLodMetric) {\n const tileset = tile.tileset;\n const parentLodMetricValue = (tile.parent && tile.parent.lodMetricValue) || tile.lodMetricValue;\n const lodMetricValue = useParentLodMetric ? parentLodMetricValue : tile.lodMetricValue;\n\n // Leaf tiles do not have any error so save the computation\n if (lodMetricValue === 0.0) {\n return 0.0;\n }\n\n // TODO: Orthographic Frustum needs special treatment?\n // this._getOrthograhicScreenSpaceError();\n\n // Avoid divide by zero when viewer is inside the tile\n const distance = Math.max(tile._distanceToCamera, 1e-7);\n const {height, sseDenominator} = frameState;\n const {viewDistanceScale} = tileset.options;\n let error = (lodMetricValue * height * (viewDistanceScale || 1.0)) / (distance * sseDenominator);\n\n error -= getDynamicScreenSpaceError(tileset, distance);\n\n return error;\n}\n","import {toRadians} from '@math.gl/core';\n\nconst WGS84_RADIUS_X = 6378137.0;\n// use this to bias the lod switching (1+ results in increasing the LOD quality)\nconst qualityFactor = Math.PI / 2; // empirical derived bias factor\n/* eslint-disable max-statements */\nexport function lodJudge(tile, frameState) {\n const viewport = frameState.viewport;\n const metersPerPixel = viewport.metersPerPixel;\n\n const mbsLat = tile.header.mbs[1];\n const mbsLon = tile.header.mbs[0];\n const mbsZ = tile.header.mbs[2];\n const mbsR = tile.header.mbs[3];\n\n const {height, width, latitude, longitude} = viewport;\n\n const viewportCenter = [longitude, latitude];\n const mbsCenter = [mbsLon, mbsLat, mbsZ];\n const mbsLatProjected = [longitude, mbsLat];\n const mbsLonProjected = [mbsLon, latitude];\n\n const diagonalInMeters = Math.sqrt(height * height + width * width) * metersPerPixel[0];\n const distanceInMeters = getDistanceFromLatLon(viewportCenter, mbsCenter);\n\n const visibleHeight = height * 0.5 + mbsR / WGS84_RADIUS_X;\n const visibleWidth = width * 0.5 + mbsR / WGS84_RADIUS_X;\n\n if (distanceInMeters > diagonalInMeters + mbsR / WGS84_RADIUS_X) {\n return 'OUT';\n }\n if (getDistanceFromLatLon(viewportCenter, mbsLatProjected) > visibleHeight) {\n return 'OUT';\n }\n if (getDistanceFromLatLon(viewportCenter, mbsLonProjected) > visibleWidth) {\n return 'OUT';\n }\n\n if (tile.lodMetricValue === 0) {\n return 'DIG';\n }\n\n // For the maxScreenThreshold error metric, maxError means that you should replace the node with it's children\n // as soon as the nodes bounding sphere has a screen radius larger than maxError pixels.\n // In this sense a value of 0 means you should always load it's children,\n // or if it's a leaf node, you should always display it.\n let screenSize = getI3ScreenSize(tile, frameState); // in pixels\n screenSize *= qualityFactor;\n if (screenSize < 0.5) {\n return 'OUT';\n }\n if (!tile.header.children || screenSize <= tile.lodMetricValue) {\n return 'DRAW';\n } else if (tile.header.children) {\n return 'DIG';\n }\n return 'OUT';\n}\n\n/* eslint-enable max-statements */\n\nfunction projectVertexToSphere([x, y, z]) {\n const azim = toRadians(x);\n const incl = toRadians(y);\n const radius = 1.0 + z / WGS84_RADIUS_X;\n const radCosInc = radius * Math.cos(incl);\n x = radCosInc * Math.cos(azim);\n y = radCosInc * Math.sin(azim);\n z = radius * Math.sin(incl);\n return [x, y, z];\n}\n\nfunction getDistanceFromLatLon(observer: number[], center: number[]) {\n const [observerLon, observerLat, observerZ = 0.0] = observer;\n const [centerLon, centerLat, centerZ = 0.0] = center;\n\n const projectedCenter = projectVertexToSphere([centerLon, centerLat, centerZ]);\n const projectedObserver = projectVertexToSphere([observerLon, observerLat, observerZ]);\n const dx = projectedObserver[0] - projectedCenter[0];\n const dy = projectedObserver[1] - projectedCenter[1];\n const dz = projectedObserver[2] - projectedCenter[2];\n return dx * dx + dy * dy + dz * dz;\n}\n\nexport function getI3ScreenSize(tile, frameState) {\n const viewport = frameState.viewport;\n const mbsLat = tile.header.mbs[1];\n const mbsLon = tile.header.mbs[0];\n const mbsZ = tile.header.mbs[2];\n const mbsR = tile.header.mbs[3];\n\n const mbsCenter = [mbsLon, mbsLat, mbsZ];\n const cameraPositionCartographic = viewport.unprojectPosition(viewport.cameraPosition);\n const dSquared = getDistanceFromLatLon(cameraPositionCartographic, mbsCenter);\n const mbsRNormalized = mbsR / WGS84_RADIUS_X;\n const d = dSquared - mbsRNormalized * mbsRNormalized;\n const fltMax = 3.4028235e38; // convert from 0x7f7fffff which is the maximum\n if (d <= 0.0) {\n return 0.5 * fltMax;\n }\n // https://stackoverflow.com/questions/21648630/radius-of-projected-sphere-in-screen-space\n // There is a formula there to calculate projected radius:\n // return 1.0 / Math.tan(fov) * r / Math.sqrt(d * d - r * r); // Right\n // Hack: 300 is a Magic number to get the correct LoD. Possibly, d and r are calculated in a wrong way.\n const screenSizeFactor =\n ((getTanOfHalfVFAngle(frameState) * mbsRNormalized) / Math.sqrt(d)) * 300;\n return screenSizeFactor;\n}\n\nfunction getTanOfHalfVFAngle(frameState) {\n const {projectionMatrix} = frameState.viewport;\n const t = projectionMatrix[5];\n return t;\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {assert} from '@loaders.gl/loader-utils';\n\n/**\n * A wrapper around arrays so that the internal length of the array can be manually managed.\n *\n * @alias ManagedArray\n * @constructor\n * @private\n *\n * @param {Number} [length=0] The initial length of the array.\n */\nexport default class ManagedArray {\n constructor(length = 0) {\n this._array = new Array(length);\n this._map = new Map();\n this._length = length;\n }\n\n /**\n * Gets or sets the length of the array.\n * If the set length is greater than the length of the internal array, the internal array is resized.\n *\n * @memberof ManagedArray.prototype\n * @type Number\n */\n get length() {\n return this._length;\n }\n\n set length(length) {\n this._length = length;\n if (length > this._array.length) {\n this._array.length = length;\n }\n }\n\n /**\n * Gets the internal array.\n *\n * @memberof ManagedArray.prototype\n * @type Array\n * @readonly\n */\n get values() {\n return this._array;\n }\n\n /**\n * Gets the element at an index.\n *\n * @param {Number} index The index to get.\n */\n get(index) {\n assert(index < this._array.length);\n return this._array[index];\n }\n\n /**\n * Sets the element at an index. Resizes the array if index is greater than the length of the array.\n *\n * @param {Number} index The index to set.\n * @param {*} element The element to set at index.\n */\n set(index, element) {\n assert(index >= 0);\n\n if (index >= this.length) {\n this.length = index + 1;\n }\n\n if (this._map.has(this._array[index])) {\n this._map.delete(this._array[index]);\n }\n\n this._array[index] = element;\n this._map.set(element, index);\n }\n\n delete(element) {\n const index = this._map.get(element);\n if (index >= 0) {\n this._array.splice(index, 1);\n this._map.delete(element);\n this.length--;\n }\n }\n\n /**\n * Returns the last element in the array without modifying the array.\n *\n * @returns {*} The last element in the array.\n */\n peek() {\n return this._array[this._length - 1];\n }\n\n /**\n * Push an element into the array.\n *\n * @param {*} element The element to push.\n */\n push(element) {\n if (!this._map.has(element)) {\n const index = this.length++;\n this._array[index] = element;\n this._map.set(element, index);\n }\n }\n\n /**\n * Pop an element from the array.\n *\n * @returns {*} The last element in the array.\n */\n pop() {\n const element = this._array[--this.length];\n this._map.delete(element);\n return element;\n }\n\n /**\n * Resize the internal array if length > _array.length.\n *\n * @param {Number} length The length.\n */\n reserve(length) {\n assert(length >= 0);\n\n if (length > this._array.length) {\n this._array.length = length;\n }\n }\n\n /**\n * Resize the array.\n *\n * @param {Number} length The length.\n */\n resize(length) {\n assert(length >= 0);\n\n this.length = length;\n }\n\n /**\n * Trim the internal array to the specified length. Defaults to the current length.\n *\n * @param {Number} [length] The length.\n */\n trim(length) {\n if (length === null || length === undefined) {\n length = this.length;\n }\n this._array.length = length;\n }\n\n reset() {\n this._array = [];\n this._map = new Map();\n this._length = 0;\n }\n\n find(target) {\n return this._map.has(target);\n }\n}\n","import ManagedArray from '../../utils/managed-array';\nimport {TILE_REFINEMENT} from '../../constants';\n\nexport type TilesetTraverserProps = {\n loadSiblings?: boolean;\n skipLevelOfDetail?: boolean;\n maximumScreenSpaceError?: number;\n onTraversalEnd?: (frameState) => any;\n viewportTraversersMap?: {[key: string]: any};\n basePath?: string;\n};\n\nexport type Props = {\n loadSiblings: boolean;\n skipLevelOfDetail: boolean;\n updateTransforms: boolean;\n maximumScreenSpaceError: number;\n onTraversalEnd: (frameState) => any;\n viewportTraversersMap: {[key: string]: any};\n basePath: string;\n};\n\nexport const DEFAULT_PROPS: Props = {\n loadSiblings: false,\n skipLevelOfDetail: false,\n maximumScreenSpaceError: 2,\n updateTransforms: true,\n onTraversalEnd: () => {},\n viewportTraversersMap: {},\n basePath: ''\n};\n\nexport default class TilesetTraverser {\n options: Props;\n\n root: any;\n requestedTiles: object;\n selectedTiles: object;\n emptyTiles: object;\n\n protected _traversalStack: ManagedArray;\n protected _emptyTraversalStack: ManagedArray;\n protected _frameNumber: number | null;\n\n // TODO nested props\n constructor(options: TilesetTraverserProps) {\n this.options = {...DEFAULT_PROPS, ...options};\n // TRAVERSAL\n // temporary storage to hold the traversed tiles during a traversal\n this._traversalStack = new ManagedArray();\n this._emptyTraversalStack = new ManagedArray();\n\n // set in every traverse cycle\n this._frameNumber = null;\n\n // fulfill in traverse call\n this.root = null;\n\n // RESULT\n // tiles should be rendered\n this.selectedTiles = {};\n // tiles should be loaded from server\n this.requestedTiles = {};\n // tiles does not have render content\n this.emptyTiles = {};\n }\n\n // tiles should be visible\n traverse(root, frameState, options) {\n this.root = root; // for root screen space error\n this.options = {...this.options, ...options};\n\n // reset result\n this.reset();\n\n // update tile (visibility and expiration)\n this.updateTile(root, frameState);\n\n this._frameNumber = frameState.frameNumber;\n this.executeTraversal(root, frameState);\n }\n\n reset() {\n this.requestedTiles = {};\n this.selectedTiles = {};\n this.emptyTiles = {};\n this._traversalStack.reset();\n this._emptyTraversalStack.reset();\n }\n\n // execute traverse\n // Depth-first traversal that traverses all visible tiles and marks tiles for selection.\n // If skipLevelOfDetail is off then a tile does not refine until all children are loaded.\n // This is the traditional replacement refinement approach and is called the base traversal.\n // Tiles that have a greater screen space error than the base screen space error are part of the base traversal,\n // all other tiles are part of the skip traversal. The skip traversal allows for skipping levels of the tree\n // and rendering children and parent tiles simultaneously.\n /* eslint-disable-next-line complexity, max-statements */\n executeTraversal(root, frameState) {\n // stack to store traversed tiles, only visible tiles should be added to stack\n // visible: visible in the current view frustum\n const stack = this._traversalStack;\n root._selectionDepth = 1;\n\n stack.push(root);\n while (stack.length > 0) {\n // 1. pop tile\n const tile = stack.pop();\n\n // 2. check if tile needs to be refine, needs refine if a tile's LoD is not sufficient and tile has available children (available content)\n let shouldRefine = false;\n if (this.canTraverse(tile, frameState)) {\n this.updateChildTiles(tile, frameState);\n shouldRefine = this.updateAndPushChildren(\n tile,\n frameState,\n stack,\n tile.hasRenderContent ? tile._selectionDepth + 1 : tile._selectionDepth\n );\n }\n\n // 3. decide if should render (select) this tile\n // - tile does not have render content\n // - tile has render content and tile is `add` type (pointcloud)\n // - tile has render content and tile is `replace` type (photogrammetry) and can't refine any further\n const parent = tile.parent;\n const parentRefines = Boolean(!parent || parent._shouldRefine);\n const stoppedRefining = !shouldRefine;\n\n if (!tile.hasRenderContent) {\n this.emptyTiles[tile.id] = tile;\n this.loadTile(tile, frameState);\n if (stoppedRefining) {\n this.selectTile(tile, frameState);\n }\n // additive tiles\n } else if (tile.refine === TILE_REFINEMENT.ADD) {\n // Additive tiles are always loaded and selected\n this.loadTile(tile, frameState);\n this.selectTile(tile, frameState);\n\n // replace tiles\n } else if (tile.refine === TILE_REFINEMENT.REPLACE) {\n // Always load tiles in the base traversal\n // Select tiles that can't refine further\n this.loadTile(tile, frameState);\n if (stoppedRefining) {\n this.selectTile(tile, frameState);\n }\n }\n\n // 3. update cache, most recent touched tiles have higher priority to be fetched from server\n this.touchTile(tile, frameState);\n\n // 4. update tile refine prop and parent refinement status to trickle down to the descendants\n tile._shouldRefine = shouldRefine && parentRefines;\n }\n\n this.options.onTraversalEnd(frameState);\n }\n\n updateChildTiles(tile, frameState) {\n const children = tile.children;\n for (const child of children) {\n this.updateTile(child, frameState);\n }\n return true;\n }\n\n /* eslint-disable complexity, max-statements */\n updateAndPushChildren(tile, frameState, stack, depth) {\n const {loadSiblings, skipLevelOfDetail} = this.options;\n\n const children = tile.children;\n\n // sort children tiles\n children.sort(this.compareDistanceToCamera.bind(this));\n\n // For traditional replacement refinement only refine if all children are loaded.\n // Empty tiles are exempt since it looks better if children stream in as they are loaded to fill the empty space.\n const checkRefines =\n tile.refine === TILE_REFINEMENT.REPLACE && tile.hasRenderContent && !skipLevelOfDetail;\n\n let hasVisibleChild = false;\n let refines = true;\n\n for (const child of children) {\n child._selectionDepth = depth;\n if (child.isVisibleAndInRequestVolume) {\n if (stack.find(child)) {\n stack.delete(child);\n }\n stack.push(child);\n hasVisibleChild = true;\n } else if (checkRefines || loadSiblings) {\n // Keep non-visible children loaded since they are still needed before the parent can refine.\n // Or loadSiblings is true so always load tiles regardless of visibility.\n this.loadTile(child, frameState);\n this.touchTile(child, frameState);\n }\n\n if (checkRefines) {\n let childRefines;\n if (!child._inRequestVolume) {\n childRefines = false;\n } else if (!child.hasRenderContent) {\n childRefines = this.executeEmptyTraversal(child, frameState);\n } else {\n childRefines = child.contentAvailable;\n }\n refines = refines && childRefines;\n\n if (!refines) {\n return false;\n }\n }\n }\n\n if (!hasVisibleChild) {\n refines = false;\n }\n return refines;\n }\n /* eslint-enable complexity, max-statements */\n\n updateTile(tile, frameState) {\n this.updateTileVisibility(tile, frameState);\n }\n\n // tile to render in the browser\n selectTile(tile, frameState) {\n if (this.shouldSelectTile(tile)) {\n // The tile can be selected right away and does not require traverseAndSelect\n tile._selectedFrame = frameState.frameNumber;\n this.selectedTiles[tile.id] = tile;\n }\n }\n\n // tile to load from server\n loadTile(tile, frameState) {\n if (this.shouldLoadTile(tile)) {\n tile._requestedFrame = frameState.frameNumber;\n tile._priority = tile._getPriority();\n this.requestedTiles[tile.id] = tile;\n }\n }\n\n // cache tile\n touchTile(tile, frameState) {\n tile.tileset._cache.touch(tile);\n tile._touchedFrame = frameState.frameNumber;\n }\n\n // tile should be visible\n // tile should have children\n // tile LoD (level of detail) is not sufficient under current viewport\n canTraverse(tile, frameState, useParentMetric = false, ignoreVisibility = false) {\n if (!tile.hasChildren) {\n return false;\n }\n\n // cesium specific\n if (tile.hasTilesetContent) {\n // Traverse external this to visit its root tile\n // Don't traverse if the subtree is expired because it will be destroyed\n return !tile.contentExpired;\n }\n\n if (!ignoreVisibility && !tile.isVisibleAndInRequestVolume) {\n return false;\n }\n\n return this.shouldRefine(tile, frameState, useParentMetric);\n }\n\n shouldLoadTile(tile) {\n // if request tile is in current frame\n // and has unexpired render content\n return tile.hasUnloadedContent || tile.contentExpired;\n }\n\n shouldSelectTile(tile) {\n // if select tile is in current frame\n // and content available\n return tile.contentAvailable && !this.options.skipLevelOfDetail;\n }\n\n // Decide if tile LoD (level of detail) is not sufficient under current viewport\n shouldRefine(tile, frameState, useParentMetric) {\n let screenSpaceError = tile._screenSpaceError;\n if (useParentMetric) {\n screenSpaceError = tile.getScreenSpaceError(frameState, true);\n }\n\n return screenSpaceError > this.options.maximumScreenSpaceError;\n }\n\n updateTileVisibility(tile, frameState) {\n const viewportIds: string[] = [];\n if (this.options.viewportTraversersMap) {\n for (const key in this.options.viewportTraversersMap) {\n const value = this.options.viewportTraversersMap[key];\n if (value === frameState.viewport.id) {\n viewportIds.push(key);\n }\n }\n } else {\n viewportIds.push(frameState.viewport.id);\n }\n tile.updateVisibility(frameState, viewportIds);\n }\n\n // UTILITIES\n\n compareDistanceToCamera(b, a) {\n return b._distanceToCamera - a._distanceToCamera;\n }\n\n anyChildrenVisible(tile, frameState) {\n let anyVisible = false;\n for (const child of tile.children) {\n child.updateVisibility(frameState);\n anyVisible = anyVisible || child.isVisibleAndInRequestVolume;\n }\n return anyVisible;\n }\n\n // Depth-first traversal that checks if all nearest descendants with content are loaded.\n // Ignores visibility.\n executeEmptyTraversal(root, frameState) {\n let allDescendantsLoaded = true;\n const stack = this._emptyTraversalStack;\n\n stack.push(root);\n\n while (stack.length > 0 && allDescendantsLoaded) {\n const tile = stack.pop();\n\n this.updateTile(tile, frameState);\n\n if (!tile.isVisibleAndInRequestVolume) {\n // Load tiles that aren't visible since they are still needed for the parent to refine\n this.loadTile(tile, frameState);\n }\n\n this.touchTile(tile, frameState);\n\n // Only traverse if the tile is empty - traversal stop at descendants with content\n const traverse = !tile.hasRenderContent && this.canTraverse(tile, frameState, false, true);\n\n if (traverse) {\n const children = tile.children;\n for (const child of children) {\n // eslint-disable-next-line max-depth\n if (stack.find(child)) {\n stack.delete(child);\n }\n stack.push(child);\n }\n } else if (!tile.contentAvailable) {\n allDescendantsLoaded = false;\n }\n }\n\n return allDescendantsLoaded;\n }\n}\n\n// TODO\n// enable expiration\n// enable optimization hint\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\nimport {Vector3, Matrix4} from '@math.gl/core';\nimport {CullingVolume} from '@math.gl/culling';\n\nimport {load} from '@loaders.gl/core';\nimport {TILE_REFINEMENT, TILE_CONTENT_STATE, TILESET_TYPE} from '../constants';\n\nimport {FrameState} from './helpers/frame-state';\nimport {createBoundingVolume} from './helpers/bounding-volume';\nimport {getTiles3DScreenSpaceError} from './helpers/tiles-3d-lod';\nimport {getI3ScreenSize} from './helpers/i3s-lod';\nimport {get3dTilesOptions} from './helpers/3d-tiles-options';\nimport TilesetTraverser from './traversers/tileset-traverser';\n\n// Note: circular dependency\nimport type Tileset3D from './tileset-3d';\n\nconst scratchVector = new Vector3();\n\nfunction defined(x) {\n return x !== undefined && x !== null;\n}\n\n/**\n * @param tileset - Tileset3D instance\n * @param header - tile header - JSON loaded from a dataset\n * @param parentHeader - parent TileHeader instance\n * @param extendedId - optional ID to separate copies of a tile for different viewports.\n * const extendedId = `${tile.id}-${frameState.viewport.id}`;\n */\nexport type TileHeaderProps = {\n tileset: Tileset3D;\n header: Object;\n parentHeader: TileHeader;\n extendedId: string;\n};\n\n/**\n * A Tile3DHeader represents a tile as Tileset3D. When a tile is first created, its content is not loaded;\n * the content is loaded on-demand when needed based on the view.\n * Do not construct this directly, instead access tiles through {@link Tileset3D#tileVisible}.\n */\nexport default class TileHeader {\n tileset: Tileset3D;\n header: any;\n id: string;\n url: string;\n parent: TileHeader;\n refine: number;\n type: string;\n contentUrl: string;\n lodMetricType: string;\n lodMetricValue: number;\n boundingVolume: any;\n content: any;\n contentState: any;\n gpuMemoryUsageInBytes: number;\n children: TileHeader[];\n depth: number;\n viewportIds: any[];\n transform: Matrix4;\n\n // Container to store application specific data\n userData: {[key: string]: any};\n computedTransform: any;\n hasEmptyContent: boolean;\n hasTilesetContent: boolean;\n\n traverser: object;\n\n // @ts-ignore\n private _cacheNode: any;\n private _frameNumber: any;\n // TODO i3s specific, needs to remove\n // @ts-ignore\n private _lodJudge: any;\n // TODO Cesium 3d tiles specific\n private _expireDate: any;\n private _expiredContent: any;\n // @ts-ignore\n private _shouldRefine: boolean;\n\n // Members this are updated every frame for tree traversal and rendering optimizations:\n // @ts-ignore\n private _distanceToCamera: number;\n // @ts-ignore\n private _centerZDepth: number;\n private _screenSpaceError: number;\n private _visibilityPlaneMask: any;\n private _visible?: boolean;\n private _inRequestVolume: boolean;\n\n // @ts-ignore\n private _stackLength: number;\n // @ts-ignore\n private _selectionDepth: number;\n\n // @ts-ignore\n private _touchedFrame: number;\n // @ts-ignore\n private _visitedFrame: number;\n private _selectedFrame: number;\n // @ts-ignore\n private _requestedFrame: number;\n\n // @ts-ignore\n private _priority: number;\n\n private _contentBoundingVolume: any;\n private _viewerRequestVolume: any;\n\n _initialTransform: Matrix4;\n\n /**\n * @constructs\n * Create a TileHeader instance\n * @param tileset - Tileset3D instance\n * @param header - tile header - JSON loaded from a dataset\n * @param parentHeader - parent TileHeader instance\n * @param extendedId - optional ID to separate copies of a tile for different viewports.\n * const extendedId = `${tile.id}-${frameState.viewport.id}`;\n */\n // eslint-disable-next-line max-statements\n constructor(\n tileset: Tileset3D,\n header: {[key: string]: any},\n parentHeader?: TileHeader,\n extendedId = ''\n ) {\n // PUBLIC MEMBERS\n // original tile data\n this.header = header;\n\n // The tileset containing this tile.\n this.tileset = tileset;\n this.id = extendedId || header.id;\n this.url = header.url;\n\n // This tile's parent or `undefined` if this tile is the root.\n // @ts-ignore\n this.parent = parentHeader;\n this.refine = this._getRefine(header.refine);\n this.type = header.type;\n this.contentUrl = header.contentUrl;\n\n // The error, in meters, introduced if this tile is rendered and its children are not.\n this.lodMetricType = 'geometricError';\n this.lodMetricValue = 0;\n\n // Specifies the type of refine that is used when traversing this tile for rendering.\n this.boundingVolume = null;\n\n // The tile's content. This represents the actual tile's payload,\n // not the content's metadata in the tileset JSON file.\n this.content = null;\n this.contentState = TILE_CONTENT_STATE.UNLOADED;\n this.gpuMemoryUsageInBytes = 0;\n\n // The tile's children - an array of Tile3D objects.\n this.children = [];\n\n this.hasEmptyContent = false;\n this.hasTilesetContent = false;\n\n this.depth = 0;\n this.viewportIds = [];\n\n // Container to store application specific data\n this.userData = {};\n\n // PRIVATE MEMBERS\n this._priority = 0;\n this._touchedFrame = 0;\n this._visitedFrame = 0;\n this._selectedFrame = 0;\n this._requestedFrame = 0;\n this._screenSpaceError = 0;\n\n this._cacheNode = null;\n this._frameNumber = null;\n this._cacheNode = null;\n\n this.traverser = new TilesetTraverser({});\n this._shouldRefine = false;\n this._distanceToCamera = 0;\n this._centerZDepth = 0;\n this._visible = undefined;\n this._inRequestVolume = false;\n this._stackLength = 0;\n this._selectionDepth = 0;\n this._initialTransform = new Matrix4();\n this.transform = new Matrix4();\n\n this._initializeLodMetric(header);\n this._initializeTransforms(header);\n this._initializeBoundingVolumes(header);\n this._initializeContent(header);\n this._initializeRenderingState(header);\n\n // TODO i3s specific, needs to remove\n this._lodJudge = null;\n\n // TODO Cesium 3d tiles specific\n this._expireDate = null;\n this._expiredContent = null;\n\n Object.seal(this);\n }\n\n destroy() {\n this.header = null;\n }\n\n isDestroyed() {\n return this.header === null;\n }\n\n get selected() {\n return this._selectedFrame === this.tileset._frameNumber;\n }\n\n get isVisible() {\n return this._visible;\n }\n\n get isVisibleAndInRequestVolume() {\n return this._visible && this._inRequestVolume;\n }\n\n /** Returns true if tile is not an empty tile and not an external tileset */\n get hasRenderContent() {\n return !this.hasEmptyContent && !this.hasTilesetContent;\n }\n\n /** Returns true if tile has children */\n get hasChildren() {\n return this.children.length > 0 || (this.header.children && this.header.children.length > 0);\n }\n\n /**\n * Determines if the tile's content is ready. This is automatically `true` for\n * tiles with empty content.\n */\n get contentReady() {\n return this.contentState === TILE_CONTENT_STATE.READY || this.hasEmptyContent;\n }\n\n /**\n * Determines if the tile has available content to render. `true` if the tile's\n * content is ready or if it has expired content this renders while new content loads; otherwise,\n */\n get contentAvailable() {\n return Boolean(\n (this.contentReady && this.hasRenderContent) || (this._expiredContent && !this.contentFailed)\n );\n }\n\n /** Returns true if tile has renderable content but it's unloaded */\n get hasUnloadedContent() {\n return this.hasRenderContent && this.contentUnloaded;\n }\n\n /**\n * Determines if the tile's content has not be requested. `true` if tile's\n * content has not be requested; otherwise, `false`.\n */\n get contentUnloaded() {\n return this.contentState === TILE_CONTENT_STATE.UNLOADED;\n }\n\n /**\n * Determines if the tile's content is expired. `true` if tile's\n * content is expired; otherwise, `false`.\n */\n get contentExpired() {\n return this.contentState === TILE_CONTENT_STATE.EXPIRED;\n }\n\n // Determines if the tile's content failed to load. `true` if the tile's\n // content failed to load; otherwise, `false`.\n get contentFailed() {\n return this.contentState === TILE_CONTENT_STATE.FAILED;\n }\n\n /** Get the tile's screen space error. */\n getScreenSpaceError(frameState, useParentLodMetric) {\n switch (this.tileset.type) {\n case TILESET_TYPE.I3S:\n return getI3ScreenSize(this, frameState);\n case TILESET_TYPE.TILES3D:\n return getTiles3DScreenSpaceError(this, frameState, useParentLodMetric);\n default:\n // eslint-disable-next-line\n throw new Error('Unsupported tileset type');\n }\n }\n\n /*\n * If skipLevelOfDetail is off try to load child tiles as soon as possible so that their parent can refine sooner.\n * Tiles are prioritized by screen space error.\n */\n _getPriority() {\n const traverser = this.tileset._traverser;\n const {skipLevelOfDetail} = traverser.options;\n\n /*\n * Tiles that are outside of the camera's frustum could be skipped if we are in 'ADD' mode\n * or if we are using 'Skip Traversal' in 'REPLACE' mode.\n * Otherewise, all 'touched' child tiles have to be loaded and displayed,\n * this may include tiles that are outide of the camera frustum (so that we can hide the parent tile).\n */\n const maySkipTile = this.refine === TILE_REFINEMENT.ADD || skipLevelOfDetail;\n\n // Check if any reason to abort\n if (maySkipTile && !this.isVisible && this._visible !== undefined) {\n return -1;\n }\n // Condition used in `cancelOutOfViewRequests` function in CesiumJS/Cesium3DTileset.js\n if (this.tileset._frameNumber - this._touchedFrame >= 1) {\n return -1;\n }\n if (this.contentState === TILE_CONTENT_STATE.UNLOADED) {\n return -1;\n }\n\n // Based on the priority function `getPriorityReverseScreenSpaceError` in CesiumJS. Scheduling priority is based on the parent's screen space error when possible.\n const parent = this.parent;\n const useParentScreenSpaceError =\n parent && (!maySkipTile || this._screenSpaceError === 0.0 || parent.hasTilesetContent);\n const screenSpaceError = useParentScreenSpaceError\n ? parent._screenSpaceError\n : this._screenSpaceError;\n\n const rootScreenSpaceError = traverser.root ? traverser.root._screenSpaceError : 0.0;\n\n // Map higher SSE to lower values (e.g. root tile is highest priority)\n return Math.max(rootScreenSpaceError - screenSpaceError, 0);\n }\n\n /**\n * Requests the tile's content.\n * The request may not be made if the Request Scheduler can't prioritize it.\n */\n // eslint-disable-next-line max-statements, complexity\n async loadContent(): Promise<boolean> {\n if (this.hasEmptyContent) {\n return false;\n }\n\n if (this.content) {\n return true;\n }\n\n const expired = this.contentExpired;\n\n if (expired) {\n this._expireDate = null;\n }\n\n this.contentState = TILE_CONTENT_STATE.LOADING;\n\n const requestToken = await this.tileset._requestScheduler.scheduleRequest(\n this.id,\n this._getPriority.bind(this)\n );\n\n if (!requestToken) {\n // cancelled\n this.contentState = TILE_CONTENT_STATE.UNLOADED;\n return false;\n }\n\n try {\n const contentUrl = this.tileset.getTileUrl(this.contentUrl);\n // The content can be a binary tile ot a JSON tileset\n const loader = this.tileset.loader;\n const options = {\n ...this.tileset.loadOptions,\n [loader.id]: {\n ...this.tileset.loadOptions[loader.id],\n isTileset: this.type === 'json',\n ...this._getLoaderSpecificOptions(loader.id)\n }\n };\n\n this.content = await load(contentUrl, loader, options);\n\n if (this.tileset.options.contentLoader) {\n await this.tileset.options.contentLoader(this);\n }\n\n if (this._isTileset()) {\n // Add tile headers for the nested tilset's subtree\n // Async update of the tree should be fine since there would never be edits to the same node\n // TODO - we need to capture the child tileset's URL\n this.tileset._initializeTileHeaders(this.content, this);\n }\n\n this.contentState = TILE_CONTENT_STATE.READY;\n this._onContentLoaded();\n return true;\n } catch (error) {\n // Tile is unloaded before the content finishes loading\n this.contentState = TILE_CONTENT_STATE.FAILED;\n throw error;\n } finally {\n requestToken.done();\n }\n }\n\n // Unloads the tile's content.\n unloadContent() {\n if (this.content && this.content.destroy) {\n this.content.destroy();\n }\n this.content = null;\n if (this.header.content && this.header.content.destroy) {\n this.header.content.destroy();\n }\n this.header.content = null;\n this.contentState = TILE_CONTENT_STATE.UNLOADED;\n return true;\n }\n\n /**\n * Update the tile's visibility\n * @param {Object} frameState - frame state for tile culling\n * @param {string[]} viewportIds - a list of viewport ids that show this tile\n * @return {void}\n */\n updateVisibility(frameState, viewportIds) {\n if (this._frameNumber === frameState.frameNumber) {\n // Return early if visibility has already been checked during the traversal.\n // The visibility may have already been checked if the cullWithChildrenBounds optimization is used.\n return;\n }\n\n const parent = this.parent;\n const parentVisibilityPlaneMask = parent\n ? parent._visibilityPlaneMask\n : CullingVolume.MASK_INDETERMINATE;\n\n if (this.tileset._traverser.options.updateTransforms) {\n const parentTransform = parent ? parent.computedTransform : this.tileset.modelMatrix;\n this._updateTransform(parentTransform);\n }\n\n this._distanceToCamera = this.distanceToTile(frameState);\n this._screenSpaceError = this.getScreenSpaceError(frameState, false);\n this._visibilityPlaneMask = this.visibility(frameState, parentVisibilityPlaneMask); // Use parent's plane mask to speed up visibility test\n this._visible = this._visibilityPlaneMask !== CullingVolume.MASK_OUTSIDE;\n this._inRequestVolume = this.insideViewerRequestVolume(frameState);\n\n this._frameNumber = frameState.frameNumber;\n this.viewportIds = viewportIds;\n }\n\n // Determines whether the tile's bounding volume intersects the culling volume.\n // @param {FrameState} frameState The frame state.\n // @param {Number} parentVisibilityPlaneMask The parent's plane mask to speed up the visibility check.\n // @returns {Number} A plane mask as described above in {@link CullingVolume#computeVisibilityWithPlaneMask}.\n visibility(frameState, parentVisibilityPlaneMask) {\n const {cullingVolume} = frameState;\n const {boundingVolume} = this;\n\n // TODO Cesium specific - restore clippingPlanes\n // const {clippingPlanes, clippingPlanesOriginMatrix} = tileset;\n // if (clippingPlanes && clippingPlanes.enabled) {\n // const intersection = clippingPlanes.computeIntersectionWithBoundingVolume(\n // boundingVolume,\n // clippingPlanesOriginMatrix\n // );\n // this._isClipped = intersection !== Intersect.INSIDE;\n // if (intersection === Intersect.OUTSIDE) {\n // return CullingVolume.MASK_OUTSIDE;\n // }\n // }\n\n // return cullingVolume.computeVisibilityWithPlaneMask(boundingVolume, parentVisibilityPlaneMask);\n return cullingVolume.computeVisibilityWithPlaneMask(boundingVolume, parentVisibilityPlaneMask);\n }\n\n // Assuming the tile's bounding volume intersects the culling volume, determines\n // whether the tile's content's bounding volume intersects the culling volume.\n // @param {FrameState} frameState The frame state.\n // @returns {Intersect} The result of the intersection: the tile's content is completely outside, completely inside, or intersecting the culling volume.\n contentVisibility() {\n return true;\n\n // TODO restore\n /*\n // Assumes the tile's bounding volume intersects the culling volume already, so\n // just return Intersect.INSIDE if there is no content bounding volume.\n if (!defined(this.contentBoundingVolume)) {\n return Intersect.INSIDE;\n }\n\n if (this._visibilityPlaneMask === CullingVolume.MASK_INSIDE) {\n // The tile's bounding volume is completely inside the culling volume so\n // the content bounding volume must also be inside.\n return Intersect.INSIDE;\n }\n\n // PERFORMANCE_IDEA: is it possible to burn less CPU on this test since we know the\n // tile's (not the content's) bounding volume intersects the culling volume?\n const cullingVolume = frameState.cullingVolume;\n const boundingVolume = tile.contentBoundingVolume;\n\n const tileset = this.tileset;\n const clippingPlanes = tileset.clippingPlanes;\n if (defined(clippingPlanes) && clippingPlanes.enabled) {\n const intersection = clippingPlanes.computeIntersectionWithBoundingVolume(\n boundingVolume,\n tileset.clippingPlanesOriginMatrix\n );\n this._isClipped = intersection !== Intersect.INSIDE;\n if (intersection === Intersect.OUTSIDE) {\n return Intersect.OUTSIDE;\n }\n }\n\n return cullingVolume.computeVisibility(boundingVolume);\n */\n }\n\n /**\n * Computes the (potentially approximate) distance from the closest point of the tile's bounding volume to the camera.\n * @param frameState The frame state.\n * @returns {Number} The distance, in meters, or zero if the camera is inside the bounding volume.\n */\n distanceToTile(frameState: FrameState): number {\n const boundingVolume = this.boundingVolume;\n return Math.sqrt(Math.max(boundingVolume.distanceSquaredTo(frameState.camera.position), 0));\n }\n\n /**\n * Computes the tile's camera-space z-depth.\n * @param frameState The frame state.\n * @returns The distance, in meters.\n */\n cameraSpaceZDepth({camera}): number {\n const boundingVolume = this.boundingVolume; // Gets the underlying OrientedBoundingBox or BoundingSphere\n scratchVector.subVectors(boundingVolume.center, camera.position);\n return camera.direction.dot(scratchVector);\n }\n\n /**\n * Checks if the camera is inside the viewer request volume.\n * @param {FrameState} frameState The frame state.\n * @returns {Boolean} Whether the camera is inside the volume.\n */\n insideViewerRequestVolume(frameState: FrameState) {\n const viewerRequestVolume = this._viewerRequestVolume;\n return (\n !viewerRequestVolume || viewerRequestVolume.distanceSquaredTo(frameState.camera.position) <= 0\n );\n }\n\n // TODO Cesium specific\n\n // Update whether the tile has expired.\n updateExpiration() {\n if (defined(this._expireDate) && this.contentReady && !this.hasEmptyContent) {\n const now = Date.now();\n // @ts-ignore Date.lessThan - replace with ms compare?\n if (Date.lessThan(this._expireDate, now)) {\n this.contentState = TILE_CONTENT_STATE.EXPIRED;\n this._expiredContent = this.content;\n }\n }\n }\n\n get extras() {\n return this.header.extras;\n }\n\n // INTERNAL METHODS\n\n _initializeLodMetric(header) {\n if ('lodMetricType' in header) {\n this.lodMetricType = header.lodMetricType;\n } else {\n this.lodMetricType = (this.parent && this.parent.lodMetricType) || this.tileset.lodMetricType;\n // eslint-disable-next-line\n console.warn(`3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType`);\n }\n\n // This is used to compute screen space error, i.e., the error measured in pixels.\n if ('lodMetricValue' in header) {\n this.lodMetricValue = header.lodMetricValue;\n } else {\n this.lodMetricValue =\n (this.parent && this.parent.lodMetricValue) || this.tileset.lodMetricValue;\n // eslint-disable-next-line\n console.warn(\n '3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue'\n );\n }\n }\n\n _initializeTransforms(tileHeader) {\n // The local transform of this tile.\n this.transform = tileHeader.transform ? new Matrix4(tileHeader.transform) : new Matrix4();\n\n const parent = this.parent;\n const tileset = this.tileset;\n\n const parentTransform =\n parent && parent.computedTransform\n ? parent.computedTransform.clone()\n : tileset.modelMatrix.clone();\n this.computedTransform = new Matrix4(parentTransform).multiplyRight(this.transform);\n\n const parentInitialTransform =\n parent && parent._initialTransform ? parent._initialTransform.clone() : new Matrix4();\n this._initialTransform = new Matrix4(parentInitialTransform).multiplyRight(this.transform);\n }\n\n _initializeBoundingVolumes(tileHeader) {\n this._contentBoundingVolume = null;\n this._viewerRequestVolume = null;\n\n this._updateBoundingVolume(tileHeader);\n }\n\n _initializeContent(tileHeader) {\n // Empty tile by default\n this.content = {_tileset: this.tileset, _tile: this};\n this.hasEmptyContent = true;\n this.contentState = TILE_CONTENT_STATE.UNLOADED;\n\n // When `true`, the tile's content points to an external tileset.\n // This is `false` until the tile's content is loaded.\n this.hasTilesetContent = false;\n\n if (tileHeader.contentUrl) {\n this.content = null;\n this.hasEmptyContent = false;\n }\n }\n\n // TODO - remove anything not related to basic visibility detection\n _initializeRenderingState(header) {\n this.depth = header.level || (this.parent ? this.parent.depth + 1 : 0);\n this._shouldRefine = false;\n\n // Members this are updated every frame for tree traversal and rendering optimizations:\n this._distanceToCamera = 0;\n this._centerZDepth = 0;\n this._screenSpaceError = 0;\n this._visibilityPlaneMask = CullingVolume.MASK_INDETERMINATE;\n this._visible = undefined;\n this._inRequestVolume = false;\n\n this._stackLength = 0;\n this._selectionDepth = 0;\n\n this._frameNumber = 0;\n this._touchedFrame = 0;\n this._visitedFrame = 0;\n this._selectedFrame = 0;\n this._requestedFrame = 0;\n\n this._priority = 0.0;\n }\n\n _getRefine(refine) {\n // Inherit from parent tile if omitted.\n return refine || (this.parent && this.parent.refine) || TILE_REFINEMENT.REPLACE;\n }\n\n _isTileset() {\n return this.contentUrl.indexOf('.json') !== -1;\n }\n\n _onContentLoaded() {\n // Vector and Geometry tile rendering do not support the skip LOD optimization.\n switch (this.content && this.content.type) {\n case 'vctr':\n case 'geom':\n // @ts-ignore\n this.tileset._traverser.disableSkipLevelOfDetail = true;\n break;\n default:\n }\n\n // The content may be tileset json\n if (this._isTileset()) {\n this.hasTilesetContent = true;\n }\n }\n\n _updateBoundingVolume(header) {\n // Update the bounding volumes\n this.boundingVolume = createBoundingVolume(\n header.boundingVolume,\n this.computedTransform,\n this.boundingVolume\n );\n\n const content = header.content;\n if (!content) {\n return;\n }\n\n // TODO Cesium specific\n // Non-leaf tiles may have a content bounding-volume, which is a tight-fit bounding volume\n // around only the features in the tile. This box is useful for culling for rendering,\n // but not for culling for traversing the tree since it does not guarantee spatial coherence, i.e.,\n // since it only bounds features in the tile, not the entire tile, children may be\n // outside of this box.\n if (content.boundingVolume) {\n this._contentBoundingVolume = createBoundingVolume(\n content.boundingVolume,\n this.computedTransform,\n this._contentBoundingVolume\n );\n }\n if (header.viewerRequestVolume) {\n this._viewerRequestVolume = createBoundingVolume(\n header.viewerRequestVolume,\n this.computedTransform,\n this._viewerRequestVolume\n );\n }\n }\n\n // Update the tile's transform. The transform is applied to the tile's bounding volumes.\n _updateTransform(parentTransform = new Matrix4()) {\n const computedTransform = parentTransform.clone().multiplyRight(this.transform);\n const didTransformChange = !computedTransform.equals(this.computedTransform);\n\n if (!didTransformChange) {\n return;\n }\n\n this.computedTransform = computedTransform;\n\n this._updateBoundingVolume(this.header);\n }\n\n // Get options which are applicable only for the particular loader\n _getLoaderSpecificOptions(loaderId) {\n switch (loaderId) {\n case 'i3s':\n return {\n ...this.tileset.options.i3s,\n tile: this.header,\n tileset: this.tileset.tileset,\n isTileHeader: false\n };\n case '3d-tiles':\n case 'cesium-ion':\n default:\n return get3dTilesOptions(this.tileset.tileset);\n }\n }\n}\n","export function get3dTilesOptions(tileset) {\n return {\n assetGltfUpAxis: (tileset.asset && tileset.asset.gltfUpAxis) || 'Y'\n };\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {TILE3D_OPTIMIZATION_HINT, TILE_REFINEMENT} from '../../constants';\nimport TilesetTraverser from './tileset-traverser';\n\nexport default class Tileset3DTraverser extends TilesetTraverser {\n compareDistanceToCamera(a, b) {\n // Sort by farthest child first since this is going on a stack\n return b._distanceToCamera === 0 && a._distanceToCamera === 0\n ? b._centerZDepth - a._centerZDepth\n : b._distanceToCamera - a._distanceToCamera;\n }\n\n updateTileVisibility(tile, frameState) {\n super.updateTileVisibility(tile, frameState);\n\n // Optimization - if none of the tile's children are visible then this tile isn't visible\n if (!tile.isVisibleAndInRequestVolume) {\n return;\n }\n\n const hasChildren = tile.children.length > 0;\n if (tile.hasTilesetContent && hasChildren) {\n // Use the root tile's visibility instead of this tile's visibility.\n // The root tile may be culled by the children bounds optimization in which\n // case this tile should also be culled.\n const firstChild = tile.children[0];\n this.updateTileVisibility(firstChild, frameState);\n tile._visible = firstChild._visible;\n return;\n }\n\n if (this.meetsScreenSpaceErrorEarly(tile, frameState)) {\n tile._visible = false;\n return;\n }\n\n const replace = tile.refine === TILE_REFINEMENT.REPLACE;\n const useOptimization =\n tile._optimChildrenWithinParent === TILE3D_OPTIMIZATION_HINT.USE_OPTIMIZATION;\n if (replace && useOptimization && hasChildren) {\n if (!this.anyChildrenVisible(tile, frameState)) {\n tile._visible = false;\n return;\n }\n }\n }\n\n meetsScreenSpaceErrorEarly(tile, frameState) {\n const {parent} = tile;\n if (!parent || parent.hasTilesetContent || parent.refine !== TILE_REFINEMENT.ADD) {\n return false;\n }\n\n // Use parent's geometric error with child's box to see if the tile already meet the SSE\n return !this.shouldRefine(tile, frameState, true);\n }\n}\n","const STATUS = {\n REQUESTED: 'REQUESTED',\n COMPLETED: 'COMPLETED',\n ERROR: 'ERROR'\n};\n\n// A helper class to manage tile metadata fetching\nexport default class I3STileManager {\n private _statusMap: object;\n\n constructor() {\n this._statusMap = {};\n }\n\n add(request, key, callback, frameState) {\n if (!this._statusMap[key]) {\n this._statusMap[key] = {request, callback, key, frameState, status: STATUS.REQUESTED};\n request()\n .then((data) => {\n this._statusMap[key].status = STATUS.COMPLETED;\n this._statusMap[key].callback(data, frameState);\n })\n .catch((error) => {\n this._statusMap[key].status = STATUS.ERROR;\n callback(error);\n });\n }\n }\n\n update(key, frameState) {\n if (this._statusMap[key]) {\n this._statusMap[key].frameState = frameState;\n }\n }\n\n find(key) {\n return this._statusMap[key];\n }\n}\n","import {load} from '@loaders.gl/core';\nimport TilesetTraverser from './tileset-traverser';\n\nimport {lodJudge} from '../helpers/i3s-lod';\nimport TileHeader from '../tile-3d';\nimport I3STileManager from './i3s-tile-manager';\n\nexport default class I3STilesetTraverser extends TilesetTraverser {\n private _tileManager: I3STileManager;\n\n constructor(options) {\n super(options);\n this._tileManager = new I3STileManager();\n }\n\n shouldRefine(tile, frameState) {\n // TODO refactor loaJudge\n tile._lodJudge = lodJudge(tile, frameState);\n return tile._lodJudge === 'DIG';\n }\n\n updateChildTiles(tile, frameState): boolean {\n const children = tile.header.children || [];\n // children which are already fetched and constructed as Tile3D instances\n const childTiles = tile.children;\n const tileset = tile.tileset;\n\n for (const child of children) {\n const extendedId = `${child.id}-${frameState.viewport.id}`;\n // if child tile is not fetched\n const childTile = childTiles && childTiles.find((t) => t.id === extendedId);\n if (!childTile) {\n let request = () => this._loadTile(child.id, tileset);\n const cachedRequest = this._tileManager.find(extendedId);\n if (!cachedRequest) {\n // eslint-disable-next-line max-depth\n if (tileset.tileset.nodePages) {\n request = () => tileset.tileset.nodePagesTile.formTileFromNodePages(child.id);\n }\n this._tileManager.add(\n request,\n extendedId,\n (header) => this._onTileLoad(header, tile, extendedId),\n frameState\n );\n } else {\n // update frameNumber since it is still needed in current frame\n this._tileManager.update(extendedId, frameState);\n }\n } else if (childTile) {\n // if child tile is fetched and available\n this.updateTile(childTile, frameState);\n }\n }\n return false;\n }\n\n async _loadTile(nodeId, tileset) {\n const {loader} = tileset;\n const nodeUrl = tileset.getTileUrl(`${tileset.url}/nodes/${nodeId}`);\n // load metadata\n const options = {\n ...tileset.loadOptions,\n i3s: {\n ...tileset.loadOptions.i3s,\n isTileHeader: true,\n loadContent: false\n }\n };\n\n return await load(nodeUrl, loader, options);\n }\n\n /**\n * The callback to init TileHeader instance after loading the tile JSON\n * @param {Object} header - the tile JSON from a dataset\n * @param {TileHeader} tile - the parent TileHeader instance\n * @param {string} extendedId - optional ID to separate copies of a tile for different viewports.\n * const extendedId = `${tile.id}-${frameState.viewport.id}`;\n * @return {void}\n */\n _onTileLoad(header, tile, extendedId) {\n // after child tile is fetched\n const childTile = new TileHeader(tile.tileset, header, tile, extendedId);\n tile.children.push(childTile);\n const frameState = this._tileManager.find(childTile.id).frameState;\n this.updateTile(childTile, frameState);\n\n // after tile fetched, resume traversal if still in current update/traversal frame\n if (this._frameNumber === frameState.frameNumber) {\n this.executeTraversal(childTile, frameState);\n }\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n/*\n\n The Tileset loading and rendering flow is as below,\n A rendered (i.e. deck.gl `Tile3DLayer`) triggers `tileset.update()` after a `tileset` is loaded\n `tileset` starts traversing the tile tree and update `requestTiles` (tiles of which content need\n to be fetched) and `selectedTiles` (tiles ready for rendering under the current viewport).\n `Tile3DLayer` will update rendering based on `selectedTiles`.\n `Tile3DLayer` also listens to `onTileLoad` callback and trigger another round of `update and then traversal`\n when new tiles are loaded.\n\n As I3S tileset have stored `tileHeader` file (metadata) and tile content files (geometry, texture, ...) separately.\n During each traversal, it issues `tilHeader` requests if that `tileHeader` is not yet fetched,\n after the tile header is fulfilled, it will resume the traversal starting from the tile just fetched (not root).\n\n Tile3DLayer\n |\n await load(tileset)\n |\n tileset.update()\n | async load tileHeader\n tileset.traverse() -------------------------- Queued\n | resume traversal after fetched |\n |----------------------------------------|\n |\n | async load tile content\n tilset.requestedTiles ----------------------------- RequestScheduler\n |\n tilset.selectedTiles (ready for rendering) |\n | Listen to |\n Tile3DLayer ----------- onTileLoad ----------------------|\n | | notify new tile is available\n updateLayers |\n tileset.update // trigger another round of update\n*/\n\nimport {Matrix4, Vector3} from '@math.gl/core';\nimport {Ellipsoid} from '@math.gl/geospatial';\nimport {Stats} from '@probe.gl/stats';\nimport {\n RequestScheduler,\n assert,\n path,\n LoaderWithParser,\n LoaderOptions\n} from '@loaders.gl/loader-utils';\nimport TilesetCache from './tileset-cache';\nimport {calculateTransformProps} from './helpers/transform-utils';\nimport {FrameState, getFrameState} from './helpers/frame-state';\nimport {getZoomFromBoundingVolume} from './helpers/zoom';\nimport Tile3D from './tile-3d';\nimport Tileset3DTraverser from './traversers/tileset-3d-traverser';\nimport TilesetTraverser from './traversers/tileset-traverser';\nimport I3SetTraverser from './traversers/i3s-tileset-traverser';\nimport {TILESET_TYPE} from '../constants';\n\nexport type Tileset3DProps = {\n // loading\n throttleRequests?: boolean;\n maxRequests?: number;\n loadOptions?: LoaderOptions;\n loadTiles?: boolean;\n basePath?: string;\n maximumMemoryUsage?: number;\n\n // Metadata\n description?: string;\n attributions?: string[];\n\n // Transforms\n ellipsoid?: object;\n modelMatrix?: Matrix4;\n\n // Traversal\n maximumScreenSpaceError?: number;\n viewportTraversersMap?: any;\n updateTransforms?: boolean;\n viewDistanceScale?: number;\n\n // Callbacks\n onTileLoad?: (tile: Tile3D) => any;\n onTileUnload?: (tile: Tile3D) => any;\n onTileError?: (tile: Tile3D, message: string, url: string) => any;\n contentLoader?: (tile: Tile3D) => Promise<void>;\n onTraversalComplete?: (selectedTiles: Tile3D[]) => Tile3D[];\n};\n\ntype Props = {\n description: string;\n ellipsoid: object;\n modelMatrix: Matrix4;\n throttleRequests: boolean;\n maximumMemoryUsage: number;\n onTileLoad: (tile: Tile3D) => any;\n onTileUnload: (tile: Tile3D) => any;\n onTileError: (tile: Tile3D, message: string, url: string) => any;\n onTraversalComplete: (selectedTiles: Tile3D[]) => Tile3D[];\n maximumScreenSpaceError: number;\n viewportTraversersMap: any;\n attributions: string[];\n maxRequests: number;\n loadTiles: boolean;\n loadOptions: LoaderOptions;\n updateTransforms: boolean;\n viewDistanceScale: number;\n basePath: string;\n contentLoader?: (tile: Tile3D) => Promise<void>;\n i3s: {[key: string]: any};\n};\n\nconst DEFAULT_PROPS: Props = {\n description: '',\n\n ellipsoid: Ellipsoid.WGS84,\n // A 4x4 transformation matrix this transforms the entire tileset.\n modelMatrix: new Matrix4(),\n\n // Set to false to disable network request throttling\n throttleRequests: true,\n\n // Number of simultaneous requsts, if throttleRequests is true\n maxRequests: 64,\n\n maximumMemoryUsage: 32,\n\n /**\n * Callback. Indicates this a tile's content was loaded\n * @param tile {TileHeader}\n */\n onTileLoad: () => {},\n /**\n * Callback. Indicates this a tile's content was unloaded\n * @param tile {TileHeader}\n */\n onTileUnload: () => {},\n onTileError: () => {},\n /**\n * Callback. Allows post-process selectedTiles right after traversal.\n * @param selectedTiles {TileHeader[]}\n * @returns TileHeader[] - output array of tiles to return to deck.gl\n */\n onTraversalComplete: (selectedTiles: Tile3D[]) => selectedTiles,\n\n // Optional async tile content loader\n contentLoader: undefined,\n\n // View distance scale modifier\n viewDistanceScale: 1.0,\n\n // TODO CESIUM\n // The maximum screen space error used to drive level of detail refinement.\n maximumScreenSpaceError: 8,\n\n loadTiles: true,\n updateTransforms: true,\n viewportTraversersMap: null,\n\n loadOptions: {fetch: {}},\n\n attributions: [],\n basePath: '',\n\n i3s: {}\n};\n\n// Tracked Stats\nconst TILES_TOTAL = 'Tiles In Tileset(s)';\nconst TILES_IN_MEMORY = 'Tiles In Memory';\nconst TILES_IN_VIEW = 'Tiles In View';\nconst TILES_RENDERABLE = 'Tiles To Render';\nconst TILES_LOADED = 'Tiles Loaded';\nconst TILES_LOADING = 'Tiles Loading';\nconst TILES_UNLOADED = 'Tiles Unloaded';\nconst TILES_LOAD_FAILED = 'Failed Tile Loads';\nconst POINTS_COUNT = 'Points';\nconst TILES_GPU_MEMORY = 'Tile Memory Use';\n\nexport default class Tileset3D {\n // props: Tileset3DProps;\n options: Props;\n loadOptions: {[key: string]: any};\n\n type: string;\n tileset: {[key: string]: any};\n loader: LoaderWithParser;\n url: string;\n basePath: string;\n modelMatrix: Matrix4;\n ellipsoid: any;\n lodMetricType: string;\n lodMetricValue: number;\n refine: string;\n root: Tile3D | null;\n roots: {[key: string]: Tile3D};\n asset: {[key: string]: any};\n\n description: string;\n properties: any;\n extras: any;\n attributions: any;\n credits: any;\n\n stats: Stats;\n\n traverseCounter: number;\n geometricError: number;\n selectedTiles: Tile3D[];\n\n cartographicCenter: Vector3 | null;\n cartesianCenter: Vector3 | null;\n zoom: number;\n boundingVolume: any;\n\n // METRICS\n // The maximum amount of GPU memory (in MB) that may be used to cache tiles.\n // Tiles not in view are unloaded to enforce private\n // The total amount of GPU memory in bytes used by the tileset.\n gpuMemoryUsageInBytes: any;\n dynamicScreenSpaceErrorComputedDensity: any;\n\n // TRAVERSAL\n _traverser: TilesetTraverser;\n private _cache: TilesetCache;\n _requestScheduler: RequestScheduler;\n\n _frameNumber: number;\n private _queryParamsString: string;\n private _queryParams: any;\n private _extensionsUsed: any;\n private _tiles: {[id: string]: Tile3D};\n\n // counter for tracking tiles requests\n private _pendingCount: any;\n\n // HOLD TRAVERSAL RESULTS\n private lastUpdatedVieports: any[] | null;\n private _requestedTiles: any;\n private _emptyTiles: any;\n private frameStateData: any;\n\n maximumMemoryUsage: number;\n\n /**\n * Create a new Tileset3D\n * @param json\n * @param props\n */\n // eslint-disable-next-line max-statements\n constructor(json: any, options?: Tileset3DProps) {\n assert(json);\n\n // PUBLIC MEMBERS\n this.options = {...DEFAULT_PROPS, ...options};\n // raw data\n this.tileset = json;\n this.loader = json.loader;\n // could be 3d tiles, i3s\n this.type = json.type;\n // The url to a tileset JSON file.\n this.url = json.url;\n this.basePath = json.basePath || path.dirname(this.url);\n this.modelMatrix = this.options.modelMatrix;\n this.ellipsoid = this.options.ellipsoid;\n\n // Geometric error when the tree is not rendered at all\n this.lodMetricType = json.lodMetricType;\n this.lodMetricValue = json.lodMetricValue;\n this.refine = json.root.refine;\n\n this.loadOptions = this.options.loadOptions || {};\n\n this.root = null;\n this.roots = {};\n // view props\n this.cartographicCenter = null;\n this.cartesianCenter = null;\n this.zoom = 1;\n this.boundingVolume = null;\n\n // TRAVERSAL\n this.traverseCounter = 0;\n this.geometricError = 0;\n this._traverser = this._initializeTraverser();\n this._cache = new TilesetCache();\n this._requestScheduler = new RequestScheduler({\n throttleRequests: this.options.throttleRequests,\n maxRequests: this.options.maxRequests\n });\n // update tracker\n // increase in each update cycle\n this._frameNumber = 0;\n\n // counter for tracking tiles requests\n this._pendingCount = 0;\n\n // HOLD TRAVERSAL RESULTS\n this._tiles = {};\n this.selectedTiles = [];\n this._emptyTiles = [];\n this._requestedTiles = [];\n this.frameStateData = {};\n this.lastUpdatedVieports = null;\n\n this._queryParams = {};\n this._queryParamsString = '';\n\n // METRICS\n // The maximum amount of GPU memory (in MB) that may be used to cache tiles.\n // Tiles not in view are unloaded to enforce this.\n this.maximumMemoryUsage = this.options.maximumMemoryUsage || 32;\n // The total amount of GPU memory in bytes used by the tileset.\n this.gpuMemoryUsageInBytes = 0;\n this.stats = new Stats({id: this.url});\n this._initializeStats();\n\n // EXTRACTED FROM TILESET\n this._extensionsUsed = undefined;\n this.dynamicScreenSpaceErrorComputedDensity = 0.0; // Updated based on the camera position and direction\n // Metadata for the entire tileset\n this.extras = null;\n this.asset = {};\n this.credits = {};\n this.description = this.options.description || '';\n\n this._initializeTileSet(json);\n }\n\n /** Release resources */\n destroy(): void {\n this._destroy();\n }\n\n /** Is the tileset loaded (update needs to have been called at least once) */\n isLoaded(): boolean {\n // Check that `_frameNumber !== 0` which means that update was called at least once\n return this._pendingCount === 0 && this._frameNumber !== 0;\n }\n\n get tiles(): object[] {\n return Object.values(this._tiles);\n }\n\n get frameNumber(): number {\n return this._frameNumber;\n }\n\n get queryParams(): string {\n if (!this._queryParamsString) {\n this._queryParamsString = getQueryParamString(this._queryParams);\n }\n return this._queryParamsString;\n }\n\n setProps(props: Tileset3DProps): void {\n this.options = {...this.options, ...props};\n }\n\n /** @deprecated */\n setOptions(options: Tileset3DProps): void {\n this.options = {...this.options, ...options};\n }\n\n /**\n * Return a loadable tile url for a specific tile subpath\n * @param tilePath a tile subpath\n */\n getTileUrl(tilePath: string): string {\n const isDataUrl = tilePath.startsWith('data:');\n if (isDataUrl) {\n return tilePath;\n }\n return `${tilePath}${this.queryParams}`;\n }\n\n // TODO CESIUM specific\n hasExtension(extensionName: string): boolean {\n return Boolean(this._extensionsUsed && this._extensionsUsed.indexOf(extensionName) > -1);\n }\n\n /**\n * Update visible tiles relying on a list of viewports\n * @param viewports - list of viewports\n */\n // eslint-disable-next-line max-statements, complexity\n update(viewports: any[]): void {\n if ('loadTiles' in this.options && !this.options.loadTiles) {\n return;\n }\n if (this.traverseCounter > 0) {\n return;\n }\n if (!viewports && this.lastUpdatedVieports) {\n viewports = this.lastUpdatedVieports;\n } else {\n this.lastUpdatedVieports = viewports;\n }\n if (!(viewports instanceof Array)) {\n viewports = [viewports];\n }\n\n this._cache.reset();\n this._frameNumber++;\n this.traverseCounter = viewports.length;\n const viewportsToTraverse: string[] = [];\n // First loop to decrement traverseCounter\n for (const viewport of viewports) {\n const id = viewport.id as string;\n if (this._needTraverse(id)) {\n viewportsToTraverse.push(id);\n } else {\n this.traverseCounter--;\n }\n }\n\n // Second loop to traverse\n for (const viewport of viewports) {\n const id = viewport.id as string;\n if (!this.roots[id]) {\n this.roots[id] = this._initializeTileHeaders(this.tileset, null);\n }\n\n if (!viewportsToTraverse.includes(id)) {\n continue; // eslint-disable-line no-continue\n }\n const frameState = getFrameState(viewport, this._frameNumber);\n this._traverser.traverse(this.roots[id], frameState, this.options);\n }\n }\n\n /**\n * Check if traversal is needed for particular viewport\n * @param {string} viewportId - id of a viewport\n * @return {boolean}\n */\n _needTraverse(viewportId: string): boolean {\n let traverserId = viewportId;\n if (this.options.viewportTraversersMap) {\n traverserId = this.options.viewportTraversersMap[viewportId];\n }\n if (traverserId !== viewportId) {\n return false;\n }\n\n return true;\n }\n\n /**\n * The callback to post-process tiles after traversal procedure\n * @param frameState - frame state for tile culling\n */\n _onTraversalEnd(frameState: FrameState): void {\n const id = frameState.viewport.id;\n if (!this.frameStateData[id]) {\n this.frameStateData[id] = {selectedTiles: [], _requestedTiles: [], _emptyTiles: []};\n }\n const currentFrameStateData = this.frameStateData[id];\n const selectedTiles = Object.values(this._traverser.selectedTiles);\n currentFrameStateData.selectedTiles = selectedTiles;\n currentFrameStateData._requestedTiles = Object.values(this._traverser.requestedTiles);\n currentFrameStateData._emptyTiles = Object.values(this._traverser.emptyTiles);\n\n this.traverseCounter--;\n if (this.traverseCounter > 0) {\n return;\n }\n\n this._updateTiles();\n }\n\n /**\n * Update tiles relying on data from all traversers\n */\n _updateTiles(): void {\n this.selectedTiles = [];\n this._requestedTiles = [];\n this._emptyTiles = [];\n\n for (const frameStateKey in this.frameStateData) {\n const frameStateDataValue = this.frameStateData[frameStateKey];\n this.selectedTiles = this.selectedTiles.concat(frameStateDataValue.selectedTiles);\n this._requestedTiles = this._requestedTiles.concat(frameStateDataValue._requestedTiles);\n this._emptyTiles = this._emptyTiles.concat(frameStateDataValue._emptyTiles);\n }\n\n this.selectedTiles = this.options.onTraversalComplete(this.selectedTiles);\n\n for (const tile of this.selectedTiles) {\n this._tiles[tile.id] = tile;\n }\n\n this._loadTiles();\n this._unloadTiles();\n this._updateStats();\n }\n\n _tilesChanged(oldSelectedTiles, selectedTiles) {\n if (oldSelectedTiles.length !== selectedTiles.length) {\n return true;\n }\n const set1 = new Set(oldSelectedTiles.map((t) => t.id));\n const set2 = new Set(selectedTiles.map((t) => t.id));\n let changed = oldSelectedTiles.filter((x) => !set2.has(x.id)).length > 0;\n changed = changed || selectedTiles.filter((x) => !set1.has(x.id)).length > 0;\n return changed;\n }\n\n _loadTiles() {\n // Sort requests by priority before making any requests.\n // This makes it less likely this requests will be cancelled after being issued.\n // requestedTiles.sort((a, b) => a._priority - b._priority);\n for (const tile of this._requestedTiles) {\n if (tile.contentUnloaded) {\n this._loadTile(tile);\n }\n }\n }\n\n _unloadTiles() {\n // unload tiles from cache when hit maximumMemoryUsage\n this._cache.unloadTiles(this, (tileset, tile) => tileset._unloadTile(tile));\n }\n\n _updateStats() {\n let tilesRenderable = 0;\n let pointsRenderable = 0;\n for (const tile of this.selectedTiles) {\n if (tile.contentAvailable && tile.content) {\n tilesRenderable++;\n if (tile.content.pointCount) {\n pointsRenderable += tile.content.pointCount;\n }\n }\n }\n\n this.stats.get(TILES_IN_VIEW).count = this.selectedTiles.length;\n this.stats.get(TILES_RENDERABLE).count = tilesRenderable;\n this.stats.get(POINTS_COUNT).count = pointsRenderable;\n }\n\n _initializeTileSet(tilesetJson) {\n this.root = this._initializeTileHeaders(tilesetJson, null);\n\n // TODO CESIUM Specific\n if (this.type === TILESET_TYPE.TILES3D) {\n this._initializeCesiumTileset(tilesetJson);\n }\n\n if (this.type === TILESET_TYPE.I3S) {\n this._initializeI3STileset();\n }\n // Calculate cartographicCenter & zoom props to help apps center view on tileset\n this._calculateViewProps();\n }\n\n // Called during initialize Tileset to initialize the tileset's cartographic center (longitude, latitude) and zoom.\n _calculateViewProps() {\n const root = this.root as Tile3D;\n assert(root);\n const {center} = root.boundingVolume;\n // TODO - handle all cases\n if (!center) {\n // eslint-disable-next-line\n console.warn('center was not pre-calculated for the root tile');\n this.cartographicCenter = new Vector3();\n this.zoom = 1;\n return;\n }\n this.cartographicCenter = Ellipsoid.WGS84.cartesianToCartographic(center, new Vector3());\n this.cartesianCenter = center;\n this.zoom = getZoomFromBoundingVolume(root.boundingVolume);\n }\n\n _initializeStats() {\n this.stats.get(TILES_TOTAL);\n this.stats.get(TILES_LOADING);\n this.stats.get(TILES_IN_MEMORY);\n this.stats.get(TILES_IN_VIEW);\n this.stats.get(TILES_RENDERABLE);\n this.stats.get(TILES_LOADED);\n this.stats.get(TILES_UNLOADED);\n this.stats.get(TILES_LOAD_FAILED);\n this.stats.get(POINTS_COUNT, 'memory');\n this.stats.get(TILES_GPU_MEMORY, 'memory');\n }\n\n // Installs the main tileset JSON file or a tileset JSON file referenced from a tile.\n // eslint-disable-next-line max-statements\n _initializeTileHeaders(tilesetJson, parentTileHeader) {\n // A tileset JSON file referenced from a tile may exist in a different directory than the root tileset.\n // Get the basePath relative to the external tileset.\n const rootTile = new Tile3D(this, tilesetJson.root, parentTileHeader); // resource\n\n // If there is a parentTileHeader, add the root of the currently loading tileset\n // to parentTileHeader's children, and update its depth.\n if (parentTileHeader) {\n parentTileHeader.children.push(rootTile);\n rootTile.depth = parentTileHeader.depth + 1;\n }\n\n // Cesium 3d tiles knows the hierarchy beforehand\n if (this.type === TILESET_TYPE.TILES3D) {\n const stack: Tile3D[] = [];\n stack.push(rootTile);\n\n while (stack.length > 0) {\n const tile = stack.pop() as Tile3D;\n this.stats.get(TILES_TOTAL).incrementCount();\n const children = tile.header.children || [];\n for (const childHeader of children) {\n const childTile = new Tile3D(this, childHeader, tile);\n tile.children.push(childTile);\n childTile.depth = tile.depth + 1;\n stack.push(childTile);\n }\n }\n }\n\n return rootTile;\n }\n\n _initializeTraverser() {\n let TraverserClass;\n const type = this.type;\n switch (type) {\n case TILESET_TYPE.TILES3D:\n TraverserClass = Tileset3DTraverser;\n break;\n case TILESET_TYPE.I3S:\n TraverserClass = I3SetTraverser;\n break;\n default:\n TraverserClass = TilesetTraverser;\n }\n\n return new TraverserClass({\n basePath: this.basePath,\n onTraversalEnd: this._onTraversalEnd.bind(this)\n });\n }\n\n _destroyTileHeaders(parentTile) {\n this._destroySubtree(parentTile);\n }\n\n async _loadTile(tile) {\n let loaded;\n try {\n this._onStartTileLoading();\n loaded = await tile.loadContent();\n } catch (error) {\n this._onTileLoadError(tile, error);\n } finally {\n this._onEndTileLoading();\n this._onTileLoad(tile, loaded);\n }\n }\n\n _onTileLoadError(tile, error) {\n this.stats.get(TILES_LOAD_FAILED).incrementCount();\n\n const message = error.message || error.toString();\n const url = tile.url;\n // TODO - Allow for probe log to be injected instead of console?\n console.error(`A 3D tile failed to load: ${tile.url} ${message}`); // eslint-disable-line\n this.options.onTileError(tile, message, url);\n }\n\n _onTileLoad(tile, loaded) {\n if (!loaded) {\n return;\n }\n\n // add coordinateOrigin and modelMatrix to tile\n if (tile && tile.content) {\n calculateTransformProps(tile, tile.content);\n }\n\n this._addTileToCache(tile);\n this.options.onTileLoad(tile);\n }\n\n _onStartTileLoading() {\n this._pendingCount++;\n this.stats.get(TILES_LOADING).incrementCount();\n }\n\n _onEndTileLoading() {\n this._pendingCount--;\n this.stats.get(TILES_LOADING).decrementCount();\n }\n\n _addTileToCache(tile) {\n this._cache.add(this, tile, (tileset) => tileset._updateCacheStats(tile));\n }\n\n _updateCacheStats(tile) {\n this.stats.get(TILES_LOADED).incrementCount();\n this.stats.get(TILES_IN_MEMORY).incrementCount();\n\n // Good enough? Just use the raw binary ArrayBuffer's byte length.\n this.gpuMemoryUsageInBytes += tile.content.byteLength || 0;\n this.stats.get(TILES_GPU_MEMORY).count = this.gpuMemoryUsageInBytes;\n }\n\n _unloadTile(tile) {\n this.gpuMemoryUsageInBytes -= (tile.content && tile.content.byteLength) || 0;\n\n this.stats.get(TILES_IN_MEMORY).decrementCount();\n this.stats.get(TILES_UNLOADED).incrementCount();\n this.stats.get(TILES_GPU_MEMORY).count = this.gpuMemoryUsageInBytes;\n\n this.options.onTileUnload(tile);\n tile.unloadContent();\n }\n\n // Traverse the tree and destroy all tiles\n _destroy() {\n const stack: Tile3D[] = [];\n\n if (this.root) {\n stack.push(this.root);\n }\n\n while (stack.length > 0) {\n const tile: Tile3D = stack.pop() as Tile3D;\n\n for (const child of tile.children) {\n stack.push(child);\n }\n\n this._destroyTile(tile);\n }\n this.root = null;\n }\n\n // Traverse the tree and destroy all sub tiles\n _destroySubtree(tile) {\n const root = tile;\n const stack: Tile3D[] = [];\n stack.push(root);\n while (stack.length > 0) {\n tile = stack.pop();\n for (const child of tile.children) {\n stack.push(child);\n }\n if (tile !== root) {\n this._destroyTile(tile);\n }\n }\n root.children = [];\n }\n\n _destroyTile(tile) {\n this._cache.unloadTile(this, tile);\n this._unloadTile(tile);\n tile.destroy();\n }\n\n _initializeCesiumTileset(tilesetJson) {\n this.asset = tilesetJson.asset;\n if (!this.asset) {\n throw new Error('Tileset must have an asset property.');\n }\n if (this.asset.version !== '0.0' && this.asset.version !== '1.0') {\n throw new Error('The tileset must be 3D Tiles version 0.0 or 1.0.');\n }\n\n // Note: `asset.tilesetVersion` is version of the tileset itself (not the version of the 3D TILES standard)\n // We add this version as a `v=1.0` query param to fetch the right version and not get an older cached version\n if ('tilesetVersion' in this.asset) {\n this._queryParams.v = this.asset.tilesetVersion;\n }\n\n // TODO - ion resources have a credits property we can use for additional attribution.\n this.credits = {\n attributions: this.options.attributions || []\n };\n this.description = this.options.description || '';\n\n // Gets the tileset's properties dictionary object, which contains metadata about per-feature properties.\n this.properties = tilesetJson.properties;\n this.geometricError = tilesetJson.geometricError;\n this._extensionsUsed = tilesetJson.extensionsUsed;\n // Returns the extras property at the top of the tileset JSON (application specific metadata).\n this.extras = tilesetJson.extras;\n }\n\n _initializeI3STileset() {\n if (this.loadOptions.i3s && 'token' in this.loadOptions.i3s) {\n this._queryParams.token = this.loadOptions.i3s.token;\n }\n }\n}\n\nfunction getQueryParamString(queryParams): string {\n const queryParamStrings: string[] = [];\n for (const key of Object.keys(queryParams)) {\n queryParamStrings.push(`${key}=${queryParams[key]}`);\n }\n switch (queryParamStrings.length) {\n case 0:\n return '';\n case 1:\n return `?${queryParamStrings[0]}`;\n default:\n return `?${queryParamStrings.join('&')}`;\n }\n}\n","import {Ellipsoid} from '@math.gl/geospatial';\nimport {Matrix4, Vector3} from '@math.gl/core';\nimport {assert} from '@loaders.gl/loader-utils';\n\nexport function calculateTransformProps(tileHeader, tile) {\n assert(tileHeader);\n assert(tile);\n\n const {rtcCenter, gltfUpAxis} = tile;\n const {\n computedTransform,\n boundingVolume: {center}\n } = tileHeader;\n\n let modelMatrix = new Matrix4(computedTransform);\n\n // Translate if appropriate\n if (rtcCenter) {\n modelMatrix.translate(rtcCenter);\n }\n\n // glTF models need to be rotated from Y to Z up\n // https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up\n switch (gltfUpAxis) {\n case 'Z':\n break;\n case 'Y':\n const rotationY = new Matrix4().rotateX(Math.PI / 2);\n modelMatrix = modelMatrix.multiplyRight(rotationY);\n break;\n case 'X':\n const rotationX = new Matrix4().rotateY(-Math.PI / 2);\n modelMatrix = modelMatrix.multiplyRight(rotationX);\n break;\n default:\n break;\n }\n\n // Scale/offset positions if normalized integers\n if (tile.isQuantized) {\n modelMatrix.translate(tile.quantizedVolumeOffset).scale(tile.quantizedVolumeScale);\n }\n\n // Option 1: Cartesian matrix and origin\n const cartesianOrigin = new Vector3(center);\n\n tile.cartesianModelMatrix = modelMatrix;\n tile.cartesianOrigin = cartesianOrigin;\n\n // Option 2: Cartographic matrix and origin\n const cartographicOrigin = Ellipsoid.WGS84.cartesianToCartographic(\n cartesianOrigin,\n new Vector3()\n );\n const fromFixedFrameMatrix = Ellipsoid.WGS84.eastNorthUpToFixedFrame(cartesianOrigin);\n const toFixedFrameMatrix = fromFixedFrameMatrix.invert();\n\n tile.cartographicModelMatrix = toFixedFrameMatrix.multiplyRight(modelMatrix);\n tile.cartographicOrigin = cartographicOrigin;\n\n // Deprecated, drop\n tile.modelMatrix = tile.cartographicModelMatrix;\n}\n","// Version constant cannot be imported, it needs to correspond to the build version of **this** module.\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nexport const VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {assert} from '@loaders.gl/loader-utils';\n\n// Decode the JSON binary array into clear text\nexport function getStringFromArrayBuffer(arrayBuffer, byteOffset, byteLength) {\n assert(arrayBuffer instanceof ArrayBuffer);\n const textDecoder = new TextDecoder('utf8');\n const typedArray = new Uint8Array(arrayBuffer, byteOffset, byteLength);\n const string = textDecoder.decode(typedArray);\n return string;\n}\n\n// Decode the JSON binary array into clear text\nexport function getStringFromTypedArray(typedArray) {\n assert(ArrayBuffer.isView(typedArray));\n const textDecoder = new TextDecoder('utf8');\n const string = textDecoder.decode(typedArray);\n return string;\n}\n\nexport function getMagicString(arrayBuffer, byteOffset = 0) {\n const dataView = new DataView(arrayBuffer);\n return `\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 0))}\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 1))}\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 2))}\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 3))}`;\n}\n","// Subset of WebGL constants\n\nexport const GL_PRIMITIVE = {\n POINTS: 0x0000, // Points. single points.\n LINES: 0x0001, // Lines. Each vertex connects to the one after it.\n TRIANGLES: 0x0004 // Triangles. Each set of three vertices creates a separate triangle.\n};\n\n// Primitive modes\nexport const GL_PRIMITIVE_MODE = {\n POINTS: 0x0000, // Points. single points.\n LINES: 0x0001, // Lines. Each vertex connects to the one after it.\n LINE_LOOP: 0x0002, // Lines. Each set of two vertices is treated as a separate line segment.\n LINE_STRIP: 0x0003, // Lines/ a connected group of line segments from the first vertex to the last\n TRIANGLES: 0x0004, // Triangles. Each set of three vertices creates a separate triangle.\n TRIANGLE_STRIP: 0x0005, // Triangles. A connected group of triangles.\n TRIANGLE_FAN: 0x0006 // Triangles. A connected group of triangles.\n // Each vertex connects to the previous and the first vertex in the fan.\n};\n\ntype glType = {\n BYTE: number;\n UNSIGNED_BYTE: number;\n SHORT: number;\n UNSIGNED_SHORT: number;\n INT: number;\n UNSIGNED_INT: number;\n FLOAT: number;\n DOUBLE: number;\n};\n\nexport const GL_TYPE: glType = {\n BYTE: 5120,\n UNSIGNED_BYTE: 5121,\n SHORT: 5122,\n UNSIGNED_SHORT: 5123,\n INT: 5124,\n UNSIGNED_INT: 5125,\n FLOAT: 5126,\n DOUBLE: 5130\n};\n\nexport const GL = {\n ...GL_PRIMITIVE_MODE,\n ...GL_TYPE\n};\n","import {TypedArray} from '../types';\nimport {GL_TYPE as GL} from '../constants';\n\nconst GL_TYPE_TO_ARRAY_TYPE = {\n [GL.DOUBLE]: Float64Array,\n [GL.FLOAT]: Float32Array,\n [GL.UNSIGNED_SHORT]: Uint16Array,\n [GL.UNSIGNED_INT]: Uint32Array,\n [GL.UNSIGNED_BYTE]: Uint8Array,\n [GL.BYTE]: Int8Array,\n [GL.SHORT]: Int16Array,\n [GL.INT]: Int32Array\n};\ntype GlTypeMap = {\n [index: string]: number;\n};\nconst NAME_TO_GL_TYPE: GlTypeMap = {\n DOUBLE: GL.DOUBLE,\n FLOAT: GL.FLOAT,\n UNSIGNED_SHORT: GL.UNSIGNED_SHORT,\n UNSIGNED_INT: GL.UNSIGNED_INT,\n UNSIGNED_BYTE: GL.UNSIGNED_BYTE,\n BYTE: GL.BYTE,\n SHORT: GL.SHORT,\n INT: GL.INT\n};\nconst ERR_TYPE_CONVERSION = 'Failed to convert GL type';\n// Converts TYPED ARRAYS to corresponding GL constant\n// Used to auto deduce gl parameter types\nexport default class GLType {\n // Signature: fromTypedArray(new Uint8Array())\n // Signature: fromTypedArray(Uint8Array)\n /**\n * Returns the size, in bytes, of the corresponding datatype\n * @param arrayOrType\n * @returns glType a a string\n */\n static fromTypedArray(arrayOrType: TypedArray | Function): string {\n // If typed array, look up constructor\n arrayOrType = ArrayBuffer.isView(arrayOrType) ? arrayOrType.constructor : arrayOrType;\n for (const glType in GL_TYPE_TO_ARRAY_TYPE) {\n const ArrayType = GL_TYPE_TO_ARRAY_TYPE[glType];\n if (ArrayType === arrayOrType) {\n return glType;\n }\n }\n throw new Error(ERR_TYPE_CONVERSION);\n }\n /**\n * Extracts name for glType from array NAME_TO_GL_TYPE\n * @param name\n * @returns glType as a number\n */\n static fromName(name: string): number {\n const glType = NAME_TO_GL_TYPE[name];\n if (!glType) {\n throw new Error(ERR_TYPE_CONVERSION);\n }\n return glType;\n }\n // Converts GL constant to corresponding typed array type\n // eslint-disable-next-line complexity\n static getArrayType(glType: number) {\n switch (glType) {\n /*eslint-disable*/\n // @ts-ignore\n case GL.UNSIGNED_SHORT_5_6_5:\n // @ts-ignore\n case GL.UNSIGNED_SHORT_4_4_4_4:\n // @ts-ignore\n case GL.UNSIGNED_SHORT_5_5_5_1:\n /* eslint-enable*/\n return Uint16Array;\n default:\n const ArrayType = GL_TYPE_TO_ARRAY_TYPE[glType];\n if (!ArrayType) {\n throw new Error(ERR_TYPE_CONVERSION);\n }\n return ArrayType;\n }\n }\n /**\n * Returns the size in bytes of one element of the provided WebGL type\n * @param glType\n * @returns size of glType\n */\n static getByteSize(glType: number): number {\n const ArrayType = GLType.getArrayType(glType);\n return ArrayType.BYTES_PER_ELEMENT;\n }\n /**\n * Returns `true` if `glType` is a valid WebGL data type.\n * @param glType\n * @returns boolean\n */\n static validate(glType: number): boolean {\n return Boolean(GLType.getArrayType(glType));\n }\n /**\n * Creates a typed view of an array of bytes\n * @param glType The type of typed array (ArrayBuffer view) to create\n * @param buffer The buffer storage to use for the view.\n * @param byteOffset The offset, in bytes, to the first element in the view\n * @param length The number of elements in the view. Defaults to buffer length\n * @returns A typed array view of the buffer\n */\n static createTypedArray(\n glType: number,\n buffer: TypedArray,\n byteOffset: number = 0,\n length?: number\n ): TypedArray {\n if (length === undefined) {\n length = (buffer.byteLength - byteOffset) / GLType.getByteSize(glType);\n }\n const ArrayType = GLType.getArrayType(glType);\n return new ArrayType(buffer, byteOffset, length);\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {GL, GLType} from '@loaders.gl/math';\n\n// Reference:\n// https://github.com/AnalyticalGraphicsInc/cesium/blob/1de96d087f0b17575eb1a3f736407b348c765d59/Source/Scene/Cesium3DTileFeatureTable.js\nexport default class Tile3DFeatureTable {\n constructor(featureTableJson, featureTableBinary) {\n this.json = featureTableJson;\n this.buffer = featureTableBinary;\n this.featuresLength = 0;\n this._cachedTypedArrays = {};\n }\n\n getExtension(extensionName) {\n return this.json.extensions && this.json.extensions[extensionName];\n }\n\n hasProperty(propertyName) {\n return Boolean(this.json[propertyName]);\n }\n\n getGlobalProperty(propertyName, componentType = GL.UNSIGNED_INT, componentLength = 1) {\n const jsonValue = this.json[propertyName];\n\n if (jsonValue && Number.isFinite(jsonValue.byteOffset)) {\n return this._getTypedArrayFromBinary(\n propertyName,\n componentType,\n componentLength,\n 1,\n jsonValue.byteOffset\n );\n }\n\n return jsonValue;\n }\n\n getPropertyArray(propertyName, componentType, componentLength) {\n const jsonValue = this.json[propertyName];\n\n if (jsonValue && Number.isFinite(jsonValue.byteOffset)) {\n if ('componentType' in jsonValue) {\n componentType = GLType.fromName(jsonValue.componentType);\n }\n return this._getTypedArrayFromBinary(\n propertyName,\n componentType,\n componentLength,\n this.featuresLength,\n jsonValue.byteOffset\n );\n }\n\n return this._getTypedArrayFromArray(propertyName, componentType, jsonValue);\n }\n\n getProperty(propertyName, componentType, componentLength, featureId, result) {\n const jsonValue = this.json[propertyName];\n if (!jsonValue) {\n return jsonValue;\n }\n\n const typedArray = this.getPropertyArray(propertyName, componentType, componentLength);\n\n if (componentLength === 1) {\n return typedArray[featureId];\n }\n\n for (let i = 0; i < componentLength; ++i) {\n result[i] = typedArray[componentLength * featureId + i];\n }\n\n return result;\n }\n\n // HELPERS\n\n _getTypedArrayFromBinary(propertyName, componentType, componentLength, count, byteOffset) {\n const cachedTypedArrays = this._cachedTypedArrays;\n let typedArray = cachedTypedArrays[propertyName];\n if (!typedArray) {\n typedArray = GLType.createTypedArray(\n componentType,\n this.buffer.buffer,\n this.buffer.byteOffset + byteOffset,\n count * componentLength\n );\n cachedTypedArrays[propertyName] = typedArray;\n }\n return typedArray;\n }\n\n _getTypedArrayFromArray(propertyName, componentType, array) {\n const cachedTypedArrays = this._cachedTypedArrays;\n let typedArray = cachedTypedArrays[propertyName];\n if (!typedArray) {\n typedArray = GLType.createTypedArray(componentType, array);\n cachedTypedArrays[propertyName] = typedArray;\n }\n return typedArray;\n }\n}\n","import {GLType} from '@loaders.gl/math'; // '@math.gl/geometry';\nimport {assert} from '@loaders.gl/loader-utils';\n\nconst COMPONENTS_PER_ATTRIBUTE = {\n SCALAR: 1,\n VEC2: 2,\n VEC3: 3,\n VEC4: 4,\n MAT2: 4,\n MAT3: 9,\n MAT4: 16\n};\n\n// TODO - could just return typed array views...\n// prettier-ignore\nconst UNPACKER = {\n SCALAR: (values, i) => values[i],\n VEC2: (values, i) => [values[2 * i + 0], values[2 * i + 1]],\n VEC3: (values, i) => [values[3 * i + 0], values[3 * i + 1], values[3 * i + 2]],\n VEC4: (values, i) => [values[4 * i + 0], values[4 * i + 1], values[4 * i + 2], values[4 * i + 3]],\n // TODO: check column major\n MAT2: (values, i) => [\n values[4 * i + 0], values[4 * i + 1],\n values[4 * i + 2], values[4 * i + 3]\n ],\n MAT3: (values, i) => [\n values[9 * i + 0], values[9 * i + 1], values[9 * i + 2],\n values[9 * i + 3], values[9 * i + 4], values[9 * i + 5],\n values[9 * i + 6], values[9 * i + 7], values[9 * i + 8]\n ],\n MAT4: (values, i) => [\n values[16 * i + 0], values[16 * i + 1], values[16 * i + 2], values[16 * i + 3],\n values[16 * i + 4], values[16 * i + 5], values[16 * i + 6], values[16 * i + 7],\n values[16 * i + 8], values[16 * i + 9], values[16 * i + 10], values[16 * i + 11],\n values[16 * i + 12], values[16 * i + 13], values[16 * i + 14], values[16 * i + 15]\n ]\n};\n\nconst PACKER = {\n SCALAR: (x, values, i) => {\n values[i] = x;\n },\n VEC2: (x, values, i) => {\n values[2 * i + 0] = x[0];\n values[2 * i + 1] = x[1];\n },\n VEC3: (x, values, i) => {\n values[3 * i + 0] = x[0];\n values[3 * i + 1] = x[1];\n values[3 * i + 2] = x[2];\n },\n VEC4: (x, values, i) => {\n values[4 * i + 0] = x[0];\n values[4 * i + 1] = x[1];\n values[4 * i + 2] = x[2];\n values[4 * i + 3] = x[3];\n },\n // TODO: check column major correctness\n MAT2: (x, values, i) => {\n values[4 * i + 0] = x[0];\n values[4 * i + 1] = x[1];\n values[4 * i + 2] = x[2];\n values[4 * i + 3] = x[3];\n },\n MAT3: (x, values, i) => {\n values[9 * i + 0] = x[0];\n values[9 * i + 1] = x[1];\n values[9 * i + 2] = x[2];\n values[9 * i + 3] = x[3];\n values[9 * i + 4] = x[4];\n values[9 * i + 5] = x[5];\n values[9 * i + 6] = x[6];\n values[9 * i + 7] = x[7];\n values[9 * i + 8] = x[8];\n values[9 * i + 9] = x[9];\n },\n MAT4: (x, values, i) => {\n values[16 * i + 0] = x[0];\n values[16 * i + 1] = x[1];\n values[16 * i + 2] = x[2];\n values[16 * i + 3] = x[3];\n values[16 * i + 4] = x[4];\n values[16 * i + 5] = x[5];\n values[16 * i + 6] = x[6];\n values[16 * i + 7] = x[7];\n values[16 * i + 8] = x[8];\n values[16 * i + 9] = x[9];\n values[16 * i + 10] = x[10];\n values[16 * i + 11] = x[11];\n values[16 * i + 12] = x[12];\n values[16 * i + 13] = x[13];\n values[16 * i + 14] = x[14];\n values[16 * i + 15] = x[15];\n }\n};\n\nexport function createTypedArrayFromAccessor(tile3DAccessor, buffer, byteOffset, length) {\n const {componentType} = tile3DAccessor;\n assert(tile3DAccessor.componentType);\n const type = typeof componentType === 'string' ? GLType.fromName(componentType) : componentType;\n const size = COMPONENTS_PER_ATTRIBUTE[tile3DAccessor.type];\n const unpacker = UNPACKER[tile3DAccessor.type];\n const packer = PACKER[tile3DAccessor.type];\n\n byteOffset += tile3DAccessor.byteOffset;\n const values = GLType.createTypedArray(type, buffer, byteOffset, size * length);\n\n return {\n values,\n type,\n size,\n unpacker,\n packer\n };\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// TODO - Finish hierarchy suypport: this file is only half ported\n/* eslint-disable */\n// @ts-nocheck\nconst defined = (x) => x !== undefined;\n\nexport function initializeHierarchy(batchTable, jsonHeader, binaryBody) {\n if (!jsonHeader) {\n return null;\n }\n\n let hierarchy = batchTable.getExtension('3DTILES_batch_table_hierarchy');\n\n const legacyHierarchy = jsonHeader.HIERARCHY;\n if (legacyHierarchy) {\n // eslint-disable-next-line\n console.warn('3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy.');\n jsonHeader.extensions = jsonHeader.extensions || {};\n jsonHeader.extensions['3DTILES_batch_table_hierarchy'] = legacyHierarchy;\n hierarchy = legacyHierarchy;\n }\n\n if (!hierarchy) {\n return null;\n }\n\n return initializeHierarchyValues(hierarchy, binaryBody);\n}\n\n// eslint-disable-next-line max-statements\nfunction initializeHierarchyValues(hierarchyJson, binaryBody) {\n let i;\n let classId;\n let binaryAccessor;\n\n const instancesLength = hierarchyJson.instancesLength;\n const classes = hierarchyJson.classes;\n let classIds = hierarchyJson.classIds;\n let parentCounts = hierarchyJson.parentCounts;\n let parentIds = hierarchyJson.parentIds;\n let parentIdsLength = instancesLength;\n\n if (defined(classIds.byteOffset)) {\n classIds.componentType = defaultValue(classIds.componentType, GL.UNSIGNED_SHORT);\n classIds.type = AttributeType.SCALAR;\n binaryAccessor = getBinaryAccessor(classIds);\n classIds = binaryAccessor.createArrayBufferView(\n binaryBody.buffer,\n binaryBody.byteOffset + classIds.byteOffset,\n instancesLength\n );\n }\n\n let parentIndexes;\n if (defined(parentCounts)) {\n if (defined(parentCounts.byteOffset)) {\n parentCounts.componentType = defaultValue(parentCounts.componentType, GL.UNSIGNED_SHORT);\n parentCounts.type = AttributeType.SCALAR;\n binaryAccessor = getBinaryAccessor(parentCounts);\n parentCounts = binaryAccessor.createArrayBufferView(\n binaryBody.buffer,\n binaryBody.byteOffset + parentCounts.byteOffset,\n instancesLength\n );\n }\n parentIndexes = new Uint16Array(instancesLength);\n parentIdsLength = 0;\n for (i = 0; i < instancesLength; ++i) {\n parentIndexes[i] = parentIdsLength;\n parentIdsLength += parentCounts[i];\n }\n }\n\n if (defined(parentIds) && defined(parentIds.byteOffset)) {\n parentIds.componentType = defaultValue(parentIds.componentType, GL.UNSIGNED_SHORT);\n parentIds.type = AttributeType.SCALAR;\n binaryAccessor = getBinaryAccessor(parentIds);\n parentIds = binaryAccessor.createArrayBufferView(\n binaryBody.buffer,\n binaryBody.byteOffset + parentIds.byteOffset,\n parentIdsLength\n );\n }\n\n const classesLength = classes.length;\n for (i = 0; i < classesLength; ++i) {\n const classInstancesLength = classes[i].length;\n const properties = classes[i].instances;\n const binaryProperties = getBinaryProperties(classInstancesLength, properties, binaryBody);\n classes[i].instances = combine(binaryProperties, properties);\n }\n\n const classCounts = new Array(classesLength).fill(0);\n const classIndexes = new Uint16Array(instancesLength);\n for (i = 0; i < instancesLength; ++i) {\n classId = classIds[i];\n classIndexes[i] = classCounts[classId];\n ++classCounts[classId];\n }\n\n const hierarchy = {\n classes,\n classIds,\n classIndexes,\n parentCounts,\n parentIndexes,\n parentIds\n };\n\n validateHierarchy(hierarchy);\n\n return hierarchy;\n}\n\n// HELPER CODE\n\n// Traverse over the hierarchy and process each instance with the endConditionCallback.\n// When the endConditionCallback returns a value, the traversal stops and that value is returned.\nexport function traverseHierarchy(hierarchy, instanceIndex, endConditionCallback) {\n if (!hierarchy) {\n return;\n }\n\n const parentCounts = hierarchy.parentCounts;\n const parentIds = hierarchy.parentIds;\n if (parentIds) {\n return endConditionCallback(hierarchy, instanceIndex);\n }\n if (parentCounts > 0) {\n return traverseHierarchyMultipleParents(hierarchy, instanceIndex, endConditionCallback);\n }\n return traverseHierarchySingleParent(hierarchy, instanceIndex, endConditionCallback);\n}\n\n// eslint-disable-next-line max-statements\nfunction traverseHierarchyMultipleParents(hierarchy, instanceIndex, endConditionCallback) {\n const classIds = hierarchy.classIds;\n const parentCounts = hierarchy.parentCounts;\n const parentIds = hierarchy.parentIds;\n const parentIndexes = hierarchy.parentIndexes;\n const instancesLength = classIds.length;\n\n // Ignore instances that have already been visited. This occurs in diamond inheritance situations.\n // Use a marker value to indicate that an instance has been visited, which increments with each run.\n // This is more efficient than clearing the visited array every time.\n const visited = scratchVisited;\n visited.length = Math.max(visited.length, instancesLength);\n const visitedMarker = ++marker;\n\n const stack = scratchStack;\n stack.length = 0;\n stack.push(instanceIndex);\n\n while (stack.length > 0) {\n instanceIndex = stack.pop();\n if (visited[instanceIndex] === visitedMarker) {\n // This instance has already been visited, stop traversal\n continue;\n }\n visited[instanceIndex] = visitedMarker;\n const result = endConditionCallback(hierarchy, instanceIndex);\n if (defined(result)) {\n // The end condition was met, stop the traversal and return the result\n return result;\n }\n const parentCount = parentCounts[instanceIndex];\n const parentIndex = parentIndexes[instanceIndex];\n for (let i = 0; i < parentCount; ++i) {\n const parentId = parentIds[parentIndex + i];\n // Stop the traversal when the instance has no parent (its parentId equals itself)\n // else add the parent to the stack to continue the traversal.\n if (parentId !== instanceIndex) {\n stack.push(parentId);\n }\n }\n }\n\n return null;\n}\n\nfunction traverseHierarchySingleParent(hierarchy, instanceIndex, endConditionCallback) {\n let hasParent = true;\n while (hasParent) {\n const result = endConditionCallback(hierarchy, instanceIndex);\n if (defined(result)) {\n // The end condition was met, stop the traversal and return the result\n return result;\n }\n const parentId = hierarchy.parentIds[instanceIndex];\n hasParent = parentId !== instanceIndex;\n instanceIndex = parentId;\n }\n throw new Error('traverseHierarchySingleParent');\n}\n\n// DEBUG CODE\n\nfunction validateHierarchy(hierarchy) {\n const scratchValidateStack = [];\n\n const classIds = hierarchy.classIds;\n const instancesLength = classIds.length;\n\n for (let i = 0; i < instancesLength; ++i) {\n validateInstance(hierarchy, i, stack);\n }\n}\n\nfunction validateInstance(hierarchy, instanceIndex, stack) {\n const parentCounts = hierarchy.parentCounts;\n const parentIds = hierarchy.parentIds;\n const parentIndexes = hierarchy.parentIndexes;\n const classIds = hierarchy.classIds;\n const instancesLength = classIds.length;\n\n if (!defined(parentIds)) {\n // No need to validate if there are no parents\n return;\n }\n\n assert(\n instanceIndex < instancesLength,\n `Parent index ${instanceIndex} exceeds the total number of instances: ${instancesLength}`\n );\n assert(\n stack.indexOf(instanceIndex) === -1,\n 'Circular dependency detected in the batch table hierarchy.'\n );\n\n stack.push(instanceIndex);\n const parentCount = defined(parentCounts) ? parentCounts[instanceIndex] : 1;\n const parentIndex = defined(parentCounts) ? parentIndexes[instanceIndex] : instanceIndex;\n for (let i = 0; i < parentCount; ++i) {\n const parentId = parentIds[parentIndex + i];\n // Stop the traversal when the instance has no parent (its parentId equals itself), else continue the traversal.\n if (parentId !== instanceIndex) {\n validateInstance(hierarchy, parentId, stack);\n }\n }\n stack.pop(instanceIndex);\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {assert} from '@loaders.gl/loader-utils';\n\nimport {createTypedArrayFromAccessor} from './helpers/tile-3d-accessor-utils';\nimport {initializeHierarchy, traverseHierarchy} from './tile-3d-batch-table-hierarchy';\n\nfunction defined(x) {\n return x !== undefined && x !== null;\n}\n\nconst clone = (x, y) => x;\n\n// These top level fields in the batch table json are not properties\nconst IGNORED_PROPERTY_FIELDS = {\n HIERARCHY: true, // Deprecated HIERARCHY property\n extensions: true,\n extras: true\n};\n\n// The size of this array equals the maximum instance count among all loaded tiles, which has the potential to be large.\nexport default class Tile3DBatchTableParser {\n constructor(json, binary, featureCount, options = {}) {\n assert(featureCount >= 0);\n this.json = json || {};\n this.binary = binary;\n this.featureCount = featureCount;\n\n this._extensions = this.json?.extensions || {};\n\n // Copy all top-level property fields from the json object, ignoring special fields\n this._properties = {};\n for (const propertyName in this.json) {\n if (!IGNORED_PROPERTY_FIELDS[propertyName]) {\n this._properties[propertyName] = this.json[propertyName];\n }\n }\n\n this._binaryProperties = this._initializeBinaryProperties();\n\n // TODO: hierarchy support is only partially implemented and not tested\n if (options['3DTILES_batch_table_hierarchy']) {\n this._hierarchy = initializeHierarchy(this, this.json, this.binary);\n }\n }\n\n getExtension(extensionName) {\n return this.json && this.json.extensions && this.json.extensions[extensionName];\n }\n\n memorySizeInBytes() {\n return 0;\n }\n\n isClass(batchId, className) {\n this._checkBatchId(batchId);\n assert(typeof className === 'string', className);\n\n // extension: 3DTILES_batch_table_hierarchy\n if (this._hierarchy) {\n // PERFORMANCE_IDEA : cache results in the ancestor classes\n // to speed up this check if this area becomes a hotspot\n // PERFORMANCE_IDEA : treat class names as integers for faster comparisons\n const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {\n const classId = hierarchy.classIds[instanceIndex];\n const instanceClass = hierarchy.classes[classId];\n return instanceClass.name === className;\n });\n return defined(result);\n }\n\n return false;\n }\n\n isExactClass(batchId, className) {\n assert(typeof className === 'string', className);\n\n return this.getExactClassName(batchId) === className;\n }\n\n getExactClassName(batchId) {\n this._checkBatchId(batchId);\n\n // extension: 3DTILES_batch_table_hierarchy\n if (this._hierarchy) {\n const classId = this._hierarchy.classIds[batchId];\n const instanceClass = this._hierarchy.classes[classId];\n return instanceClass.name;\n }\n\n return undefined;\n }\n\n hasProperty(batchId, name) {\n this._checkBatchId(batchId);\n assert(typeof name === 'string', name);\n\n return defined(this._properties[name]) || this._hasPropertyInHierarchy(batchId, name);\n }\n\n getPropertyNames(batchId, results) {\n this._checkBatchId(batchId);\n\n results = defined(results) ? results : [];\n results.length = 0;\n\n const propertyNames = Object.keys(this._properties);\n results.push(...propertyNames);\n\n if (this._hierarchy) {\n this._getPropertyNamesInHierarchy(batchId, results);\n }\n\n return results;\n }\n\n getProperty(batchId, name) {\n this._checkBatchId(batchId);\n assert(typeof name === 'string', name);\n\n if (this._binaryProperties) {\n const binaryProperty = this._binaryProperties[name];\n if (defined(binaryProperty)) {\n return this._getBinaryProperty(binaryProperty, batchId);\n }\n }\n\n const propertyValues = this._properties[name];\n if (defined(propertyValues)) {\n return clone(propertyValues[batchId], true);\n }\n\n // EXTENSION: 3DTILES_batch_table_hierarchy\n if (this._hierarchy) {\n const hierarchyProperty = this._getHierarchyProperty(batchId, name);\n if (defined(hierarchyProperty)) {\n return hierarchyProperty;\n }\n }\n\n return undefined;\n }\n\n setProperty(batchId, name, value) {\n const featureCount = this.featureCount;\n\n this._checkBatchId(batchId);\n assert(typeof name === 'string', name);\n\n if (this._binaryProperties) {\n const binaryProperty = this._binaryProperties[name];\n if (binaryProperty) {\n this._setBinaryProperty(binaryProperty, batchId, value);\n return;\n }\n }\n\n // EXTENSION: 3DTILES_batch_table_hierarchy\n if (this._hierarchy) {\n if (this._setHierarchyProperty(this, batchId, name, value)) {\n return;\n }\n }\n\n let propertyValues = this._properties[name];\n if (!defined(propertyValues)) {\n // Property does not exist. Create it.\n this._properties[name] = new Array(featureCount);\n propertyValues = this._properties[name];\n }\n\n propertyValues[batchId] = clone(value, true);\n }\n\n // PRIVATE METHODS\n\n _checkBatchId(batchId) {\n const valid = batchId >= 0 && batchId < this.featureCount;\n if (!valid) {\n throw new Error(`batchId not in range [0, featureCount - 1].`);\n }\n }\n\n _getBinaryProperty(binaryProperty, index) {\n return binaryProperty.unpack(binaryProperty.typedArray, index);\n }\n\n _setBinaryProperty(binaryProperty, index, value) {\n binaryProperty.pack(value, binaryProperty.typedArray, index);\n }\n\n _initializeBinaryProperties() {\n let binaryProperties = null;\n for (const name in this._properties) {\n const property = this._properties[name];\n const binaryProperty = this._initializeBinaryProperty(name, property);\n // Store any information needed to access the binary data, including the typed array,\n // componentCount (e.g. a VEC4 would be 4), and the type used to pack and unpack (e.g. Cartesian4).\n if (binaryProperty) {\n binaryProperties = binaryProperties || {};\n binaryProperties[name] = binaryProperty;\n }\n }\n return binaryProperties;\n }\n\n _initializeBinaryProperty(name, property) {\n if ('byteOffset' in property) {\n // This is a binary property\n const tile3DAccessor = property;\n\n assert(this.binary, `Property ${name} requires a batch table binary.`);\n assert(tile3DAccessor.type, `Property ${name} requires a type.`);\n\n const accessor = createTypedArrayFromAccessor(\n tile3DAccessor,\n this.binary.buffer,\n this.binary.byteOffset | 0,\n this.featureCount\n );\n\n // Store any information needed to access the binary data, including the typed array,\n // componentCount (e.g. a VEC4 would be 4), and the type used to pack and unpack (e.g. Cartesian4).\n return {\n typedArray: accessor.values,\n componentCount: accessor.size,\n unpack: accessor.unpacker,\n pack: accessor.packer\n };\n }\n\n return null;\n }\n\n // EXTENSION SUPPORT: 3DTILES_batch_table_hierarchy\n\n _hasPropertyInHierarchy(batchId, name) {\n if (!this._hierarchy) {\n return false;\n }\n\n const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {\n const classId = hierarchy.classIds[instanceIndex];\n const instances = hierarchy.classes[classId].instances;\n return defined(instances[name]);\n });\n\n return defined(result);\n }\n\n _getPropertyNamesInHierarchy(batchId, results) {\n traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {\n const classId = hierarchy.classIds[instanceIndex];\n const instances = hierarchy.classes[classId].instances;\n for (const name in instances) {\n if (instances.hasOwnProperty(name)) {\n if (results.indexOf(name) === -1) {\n results.push(name);\n }\n }\n }\n });\n }\n\n _getHierarchyProperty(batchId, name) {\n return traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {\n const classId = hierarchy.classIds[instanceIndex];\n const instanceClass = hierarchy.classes[classId];\n const indexInClass = hierarchy.classIndexes[instanceIndex];\n const propertyValues = instanceClass.instances[name];\n if (defined(propertyValues)) {\n if (defined(propertyValues.typedArray)) {\n return this._getBinaryProperty(propertyValues, indexInClass);\n }\n return clone(propertyValues[indexInClass], true);\n }\n return null;\n });\n }\n\n _setHierarchyProperty(batchTable, batchId, name, value) {\n const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {\n const classId = hierarchy.classIds[instanceIndex];\n const instanceClass = hierarchy.classes[classId];\n const indexInClass = hierarchy.classIndexes[instanceIndex];\n const propertyValues = instanceClass.instances[name];\n if (defined(propertyValues)) {\n assert(instanceIndex === batchId, `Inherited property \"${name}\" is read-only.`);\n if (defined(propertyValues.typedArray)) {\n this._setBinaryProperty(propertyValues, indexInClass, value);\n } else {\n propertyValues[indexInClass] = clone(value, true);\n }\n return true;\n }\n return false;\n });\n return defined(result);\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nconst SIZEOF_UINT32 = 4;\n\n/* PARSE FIXED HEADER:\nPopulates\n magic, // identifies type of tile\n type, // String version of magic\n version,\n byteLength\n */\nexport function parse3DTileHeaderSync(tile, arrayBuffer, byteOffset = 0) {\n const view = new DataView(arrayBuffer);\n\n tile.magic = view.getUint32(byteOffset, true);\n byteOffset += SIZEOF_UINT32;\n\n tile.version = view.getUint32(byteOffset, true);\n byteOffset += SIZEOF_UINT32;\n\n tile.byteLength = view.getUint32(byteOffset, true);\n byteOffset += SIZEOF_UINT32;\n\n // TODO - move version check into each tile parser?\n if (tile.version !== 1) {\n throw new Error(`3D Tile Version ${tile.version} not supported`);\n }\n\n return byteOffset; // Indicates where the parsing ended\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {getStringFromArrayBuffer} from './parse-utils';\n\nconst SIZEOF_UINT32 = 4;\nconst DEPRECATION_WARNING = `b3dm tile in legacy format.`;\n\n// eslint-disable-next-line max-statements\nexport function parse3DTileTablesHeaderSync(tile, arrayBuffer, byteOffset) {\n const view = new DataView(arrayBuffer);\n let batchLength;\n\n tile.header = tile.header || {};\n\n let featureTableJsonByteLength = view.getUint32(byteOffset, true);\n byteOffset += SIZEOF_UINT32;\n\n let featureTableBinaryByteLength = view.getUint32(byteOffset, true);\n byteOffset += SIZEOF_UINT32;\n\n let batchTableJsonByteLength = view.getUint32(byteOffset, true);\n byteOffset += SIZEOF_UINT32;\n\n let batchTableBinaryByteLength = view.getUint32(byteOffset, true);\n byteOffset += SIZEOF_UINT32;\n\n // First legacy header format - [batchLength] [batchTableByteLength] ('batchTableJsonByteLength': JSON starts with a quotation mark or the glTF magic)\n // Second legacy format - [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength] (Second legacy format is similar as first but here we check 'batchTableBinaryByteLength' instead)\n // Current header format - [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength]\n // First byte will be 0x22 or 0x67. The minimum uint32 expected is 0x22000000 = 570425344 = 570MB.\n if (batchTableJsonByteLength >= 570425344) {\n byteOffset -= SIZEOF_UINT32 * 2;\n batchLength = featureTableJsonByteLength;\n batchTableJsonByteLength = featureTableBinaryByteLength;\n batchTableBinaryByteLength = 0;\n featureTableJsonByteLength = 0;\n featureTableBinaryByteLength = 0;\n\n console.warn(DEPRECATION_WARNING); // eslint-disable-line\n } else if (batchTableBinaryByteLength >= 570425344) {\n byteOffset -= SIZEOF_UINT32;\n batchLength = batchTableJsonByteLength;\n batchTableJsonByteLength = featureTableJsonByteLength;\n batchTableBinaryByteLength = featureTableBinaryByteLength;\n featureTableJsonByteLength = 0;\n featureTableBinaryByteLength = 0;\n\n console.warn(DEPRECATION_WARNING); // eslint-disable-line\n }\n\n tile.header.featureTableJsonByteLength = featureTableJsonByteLength;\n tile.header.featureTableBinaryByteLength = featureTableBinaryByteLength;\n tile.header.batchTableJsonByteLength = batchTableJsonByteLength;\n tile.header.batchTableBinaryByteLength = batchTableBinaryByteLength;\n tile.header.batchLength = batchLength;\n\n return byteOffset;\n}\n\nexport function parse3DTileTablesSync(tile, arrayBuffer, byteOffset, options) {\n byteOffset = parse3DTileFeatureTable(tile, arrayBuffer, byteOffset, options);\n byteOffset = parse3DTileBatchTable(tile, arrayBuffer, byteOffset, options);\n return byteOffset;\n}\n\nfunction parse3DTileFeatureTable(tile, arrayBuffer, byteOffset, options) {\n const {featureTableJsonByteLength, featureTableBinaryByteLength, batchLength} = tile.header;\n\n tile.featureTableJson = {\n BATCH_LENGTH: batchLength || 0\n };\n\n if (featureTableJsonByteLength > 0) {\n const featureTableString = getStringFromArrayBuffer(\n arrayBuffer,\n byteOffset,\n featureTableJsonByteLength\n );\n tile.featureTableJson = JSON.parse(featureTableString);\n }\n byteOffset += featureTableJsonByteLength;\n\n tile.featureTableBinary = new Uint8Array(arrayBuffer, byteOffset, featureTableBinaryByteLength);\n byteOffset += featureTableBinaryByteLength;\n\n /*\n const featureTable = parseFeatureTable(featureTableJson, featureTableBinary);\n\n const batchLength = featureTable.getGlobalProperty('BATCH_LENGTH');\n featureTable.featuresLength = batchLength;\n */\n\n return byteOffset;\n}\n\nfunction parse3DTileBatchTable(tile, arrayBuffer, byteOffset, options) {\n const {batchTableJsonByteLength, batchTableBinaryByteLength} = tile.header;\n\n if (batchTableJsonByteLength > 0) {\n const batchTableString = getStringFromArrayBuffer(\n arrayBuffer,\n byteOffset,\n batchTableJsonByteLength\n );\n tile.batchTableJson = JSON.parse(batchTableString);\n byteOffset += batchTableJsonByteLength;\n\n if (batchTableBinaryByteLength > 0) {\n // Has a batch table binary\n tile.batchTableBinary = new Uint8Array(arrayBuffer, byteOffset, batchTableBinaryByteLength);\n // Copy the batchTableBinary section and let the underlying ArrayBuffer be freed\n tile.batchTableBinary = new Uint8Array(tile.batchTableBinary);\n\n byteOffset += batchTableBinaryByteLength;\n }\n }\n\n return byteOffset;\n}\n","/**\n * Decode color values\n * @param rgb565\n * @param target\n * @returns target\n */\nexport function decodeRGB565(rgb565: number, target: number[] = [0, 0, 0]): number[] {\n const r5 = (rgb565 >> 11) & 31;\n const g6 = (rgb565 >> 5) & 63;\n const b5 = rgb565 & 31;\n\n target[0] = r5 << 3;\n target[1] = g6 << 2;\n target[2] = b5 << 3;\n\n return target;\n}\n\n/**\n * Encode color values\n * @param rgb\n * @returns color\n */\nexport function encodeRGB565(rgb: number[]): number {\n const r5 = Math.floor(rgb[0] / 8) + 4;\n const g6 = Math.floor(rgb[1] / 4) + 2;\n const b5 = Math.floor(rgb[2] / 8) + 4;\n return r5 + (g6 << 5) + (b5 << 11);\n}\n","import {decodeRGB565, GL} from '@loaders.gl/math';\n\n/* eslint-disable complexity*/\nexport function normalize3DTileColorAttribute(tile, colors, batchTable) {\n // no colors defined\n if (!colors && (!tile || !tile.batchIds || !batchTable)) {\n return null;\n }\n\n const {batchIds, isRGB565, pointCount} = tile;\n // Batch table, look up colors in table\n if (batchIds && batchTable) {\n const colorArray = new Uint8ClampedArray(pointCount * 3);\n for (let i = 0; i < pointCount; i++) {\n const batchId = batchIds[i];\n // TODO figure out what is `dimensions` used for\n const dimensions = batchTable.getProperty(batchId, 'dimensions');\n const color = dimensions.map((d) => d * 255);\n colorArray[i * 3] = color[0];\n colorArray[i * 3 + 1] = color[1];\n colorArray[i * 3 + 2] = color[2];\n }\n return {\n type: GL.UNSIGNED_BYTE,\n value: colorArray,\n size: 3,\n normalized: true\n };\n }\n\n // RGB565 case, convert to RGB\n if (isRGB565) {\n const colorArray = new Uint8ClampedArray(pointCount * 3);\n for (let i = 0; i < pointCount; i++) {\n const color = decodeRGB565(colors[i]);\n colorArray[i * 3] = color[0];\n colorArray[i * 3 + 1] = color[1];\n colorArray[i * 3 + 2] = color[2];\n }\n return {\n type: GL.UNSIGNED_BYTE,\n value: colorArray,\n size: 3,\n normalized: true\n };\n }\n\n // RGB case (tile.isTranslucent)\n if (colors && colors.length === pointCount * 3) {\n return {\n type: GL.UNSIGNED_BYTE,\n value: colors,\n size: 3,\n normalized: true\n };\n }\n\n // DEFAULT: RGBA case\n return {\n type: GL.UNSIGNED_BYTE,\n value: colors,\n size: 4,\n normalized: true\n };\n}\n/* eslint-enable complexity*/\n","/**\n * Throws error message\n * @param condition checks if an attribute equal to condition\n * @param message error message\n */\nexport function assert(condition: any, message?: any): void {\n if (!condition) {\n throw new Error(`math.gl assertion failed. ${message}`);\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// Attribute compression and decompression functions.\n\nimport {Vector2, Vector3, clamp, _MathUtils} from '@math.gl/core';\nimport {Vector4} from '../types';\nimport {assert} from '../utils/assert';\n\nconst RIGHT_SHIFT = 1.0 / 256.0;\nconst LEFT_SHIFT = 256.0;\n\nconst scratchVector2 = new Vector2();\nconst scratchVector3 = new Vector3();\nconst scratchEncodeVector2 = new Vector2();\nconst octEncodeScratch = new Vector2();\n\nconst uint8ForceArray = new Uint8Array(1);\n\n/**\n * Force a value to Uint8\n *\n * @param value\n * @returns\n */\nfunction forceUint8(value: number): number {\n uint8ForceArray[0] = value;\n return uint8ForceArray[0];\n}\n\n/**\n * Converts a SNORM value in the range [0, rangeMaximum] to a scalar in the range [-1.0, 1.0].\n *\n * @param value SNORM value in the range [0, rangeMaximum]\n * @param [rangeMaximum=255] The maximum value in the SNORM range, 255 by default.\n * @returns Scalar in the range [-1.0, 1.0].\n *\n * @see CesiumMath.toSNorm\n */\nfunction fromSNorm(value: number, rangeMaximum = 255): number {\n return (clamp(value, 0.0, rangeMaximum) / rangeMaximum) * 2.0 - 1.0;\n}\n\n/**\n * Converts a scalar value in the range [-1.0, 1.0] to a SNORM in the range [0, rangeMaximum].\n *\n * @param value The scalar value in the range [-1.0, 1.0]\n * @param [rangeMaximum=255] The maximum value in the mapped range, 255 by default.\n * @returns A SNORM value, where 0 maps to -1.0 and rangeMaximum maps to 1.0.\n *\n * @see CesiumMath.fromSNorm\n */\nfunction toSNorm(value: number, rangeMaximum = 255): number {\n return Math.round((clamp(value, -1.0, 1.0) * 0.5 + 0.5) * rangeMaximum);\n}\n\n/**\n * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative.\n * This is similar to `Math.sign` except that returns 1.0 instead of\n * 0.0 when the input value is 0.0.\n *\n * @param value The value to return the sign of.\n * @returns The sign of value.\n */\nfunction signNotZero(value: number): number {\n return value < 0.0 ? -1.0 : 1.0;\n}\n\n/**\n * Encodes a normalized vector into 2 SNORM values in the range of [0-rangeMax] following the 'oct' encoding.\n *\n * Oct encoding is a compact representation of unit length vectors.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: {@link http://jcgt.org/published/0003/02/01/}\n *\n * @param vector The normalized vector to be compressed into 2 component 'oct' encoding.\n * @param result The 2 component oct-encoded unit length vector.\n * @param rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.\n * @returns The 2 component oct-encoded unit length vector.\n *\n * @exception vector must be normalized.\n *\n * @see octDecodeInRange\n */\nexport function octEncodeInRange(vector: Vector3, rangeMax: number, result: Vector2): Vector2 {\n assert(vector);\n assert(result);\n\n const vector3 = scratchVector3.from(vector);\n\n assert(Math.abs(vector3.magnitudeSquared() - 1.0) <= _MathUtils.EPSILON6);\n\n result.x = vector.x / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));\n result.y = vector.y / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));\n\n if (vector.z < 0) {\n const x = result.x;\n const y = result.y;\n result.x = (1.0 - Math.abs(y)) * signNotZero(x);\n result.y = (1.0 - Math.abs(x)) * signNotZero(y);\n }\n\n result.x = toSNorm(result.x, rangeMax);\n result.y = toSNorm(result.y, rangeMax);\n\n return result;\n}\n\n/**\n * Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding.\n *\n * @param vector The normalized vector to be compressed into 2 byte 'oct' encoding.\n * @param result The 2 byte oct-encoded unit length vector.\n * @returns he 2 byte oct-encoded unit length vector.\n *\n * @exception vector must be normalized.\n *\n * @see octEncodeInRange\n * @see octDecode\n */\nexport function octEncode(vector: Vector3, result: Vector2): Vector2 {\n return octEncodeInRange(vector, 255, result);\n}\n\n/**\n * Encodes a normalized vector into 4-byte vector\n * @param vector The normalized vector to be compressed into 4 byte 'oct' encoding.\n * @param result The 4 byte oct-encoded unit length vector.\n * @returns The 4 byte oct-encoded unit length vector.\n *\n * @exception vector must be normalized.\n *\n * @see octEncodeInRange\n * @see octDecodeFromVector4\n */\nexport function octEncodeToVector4(vector: Vector3, result: Vector4): Vector4 {\n octEncodeInRange(vector, 65535, octEncodeScratch);\n result.x = forceUint8(octEncodeScratch.x * RIGHT_SHIFT);\n result.y = forceUint8(octEncodeScratch.x);\n result.z = forceUint8(octEncodeScratch.y * RIGHT_SHIFT);\n result.w = forceUint8(octEncodeScratch.y);\n return result;\n}\n\n/**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component vector.\n *\n * @param x The x component of the oct-encoded unit length vector.\n * @param y The y component of the oct-encoded unit length vector.\n * @param rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.\n * @param result The decoded and normalized vector\n * @returns The decoded and normalized vector.\n *\n * @exception x and y must be unsigned normalized integers between 0 and rangeMax.\n *\n * @see octEncodeInRange\n */\nexport function octDecodeInRange(x: number, y: number, rangeMax: number, result: Vector3): Vector3 {\n assert(result);\n if (x < 0 || x > rangeMax || y < 0 || y > rangeMax) {\n throw new Error(`x and y must be unsigned normalized integers between 0 and ${rangeMax}`);\n }\n\n result.x = fromSNorm(x, rangeMax);\n result.y = fromSNorm(y, rangeMax);\n result.z = 1.0 - (Math.abs(result.x) + Math.abs(result.y));\n\n if (result.z < 0.0) {\n const oldVX = result.x;\n result.x = (1.0 - Math.abs(result.y)) * signNotZero(oldVX);\n result.y = (1.0 - Math.abs(oldVX)) * signNotZero(result.y);\n }\n\n return result.normalize();\n}\n\n/**\n * Decodes a unit-length vector in 2 byte 'oct' encoding to a normalized 3-component vector.\n *\n * @param x The x component of the oct-encoded unit length vector.\n * @param y The y component of the oct-encoded unit length vector.\n * @param result The decoded and normalized vector.\n * @returns he decoded and normalized vector.\n *\n * @exception x and y must be an unsigned normalized integer between 0 and 255.\n *\n * @see octDecodeInRange\n */\nexport function octDecode(x: number, y: number, result: Vector3): Vector3 {\n return octDecodeInRange(x, y, 255, result);\n}\n\n/**\n * Decodes a unit-length vector in 4 byte 'oct' encoding to a normalized 3-component vector.\n *\n * @param encoded The oct-encoded unit length vector.\n * @param esult The decoded and normalized vector.\n * @returns The decoded and normalized vector.\n *\n * @exception x, y, z, and w must be unsigned normalized integers between 0 and 255.\n *\n * @see octDecodeInRange\n * @see octEncodeToVector4\n */\nexport function octDecodeFromVector4(encoded: Vector4, result: Vector3): Vector3 {\n assert(encoded);\n assert(result);\n const x = encoded.x;\n const y = encoded.y;\n const z = encoded.z;\n const w = encoded.w;\n\n if (x < 0 || x > 255 || y < 0 || y > 255 || z < 0 || z > 255 || w < 0 || w > 255) {\n throw new Error('x, y, z, and w must be unsigned normalized integers between 0 and 255');\n }\n\n const xOct16 = x * LEFT_SHIFT + y;\n const yOct16 = z * LEFT_SHIFT + w;\n return octDecodeInRange(xOct16, yOct16, 65535, result);\n}\n\n/**\n * Packs an oct encoded vector into a single floating-point number.\n *\n * @param encoded The oct encoded vector.\n * @returns The oct encoded vector packed into a single float.\n *\n */\nexport function octPackFloat(encoded: Vector2): number {\n const vector2 = scratchVector2.from(encoded);\n return 256.0 * vector2.x + vector2.y;\n}\n\n/**\n * Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding and\n * stores those values in a single float-point number.\n *\n * @param vector The normalized vector to be compressed into 2 byte 'oct' encoding.\n * @returns The 2 byte oct-encoded unit length vector.\n *\n * @exception vector must be normalized.\n */\nexport function octEncodeFloat(vector: Vector3): number {\n octEncode(vector, scratchEncodeVector2);\n return octPackFloat(scratchEncodeVector2);\n}\n\n/**\n * Decodes a unit-length vector in 'oct' encoding packed in a floating-point number to a normalized 3-component vector.\n *\n * @param value The oct-encoded unit length vector stored as a single floating-point number.\n * @param result The decoded and normalized vector\n * @returns The decoded and normalized vector.\n *\n */\nexport function octDecodeFloat(value: number, result: Vector3): Vector3 {\n assert(Number.isFinite(value));\n\n const temp = value / 256.0;\n const x = Math.floor(temp);\n const y = (temp - x) * 256.0;\n\n return octDecode(x, y, result);\n}\n\n/**\n * Encodes three normalized vectors into 6 SNORM values in the range of [0-255] following the 'oct' encoding and\n * packs those into two floating-point numbers.\n *\n * @param v1 A normalized vector to be compressed.\n * @param v2 A normalized vector to be compressed.\n * @param v3 A normalized vector to be compressed.\n * @param result The 'oct' encoded vectors packed into two floating-point numbers.\n * @returns The 'oct' encoded vectors packed into two floating-point numbers.\n *\n */\nexport function octPack(v1: Vector3, v2: Vector3, v3: Vector3, result: Vector2): Vector2 {\n assert(v1);\n assert(v2);\n assert(v3);\n assert(result);\n\n const encoded1 = octEncodeFloat(v1);\n const encoded2 = octEncodeFloat(v2);\n\n const encoded3 = octEncode(v3, scratchEncodeVector2);\n result.x = 65536.0 * encoded3.x + encoded1;\n result.y = 65536.0 * encoded3.y + encoded2;\n return result;\n}\n\n/**\n * Decodes three unit-length vectors in 'oct' encoding packed into a floating-point number to a normalized 3-component vector.\n *\n * @param packed The three oct-encoded unit length vectors stored as two floating-point number.\n * @param v1 One decoded and normalized vector.\n * @param v2 One decoded and normalized vector.\n * @param v3 One decoded and normalized vector.\n */\nexport function octUnpack(packed: Vector2, v1: Vector3, v2: Vector3, v3: Vector3): void {\n let temp = packed.x / 65536.0;\n const x = Math.floor(temp);\n const encodedFloat1 = (temp - x) * 65536.0;\n\n temp = packed.y / 65536.0;\n const y = Math.floor(temp);\n const encodedFloat2 = (temp - y) * 65536.0;\n\n octDecodeFloat(encodedFloat1, v1);\n octDecodeFloat(encodedFloat2, v2);\n octDecode(x, y, v3);\n}\n\n/**\n * Pack texture coordinates into a single float. The texture coordinates will only preserve 12 bits of precision.\n *\n * @param textureCoordinates The texture coordinates to compress. Both coordinates must be in the range 0.0-1.0.\n * @returns The packed texture coordinates.\n *\n */\nexport function compressTextureCoordinates(textureCoordinates: Vector2): number {\n // Move x and y to the range 0-4095;\n const x = (textureCoordinates.x * 4095.0) | 0;\n const y = (textureCoordinates.y * 4095.0) | 0;\n return 4096.0 * x + y;\n}\n\n/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @param compressed The compressed texture coordinates.\n * @param result The decompressed texture coordinates.\n * @returns The modified result parameter.\n *\n */\nexport function decompressTextureCoordinates(compressed: number, result: Vector2): Vector2 {\n const temp = compressed / 4096.0;\n const xZeroTo4095 = Math.floor(temp);\n result.x = xZeroTo4095 / 4095.0;\n result.y = (compressed - xZeroTo4095 * 4096) / 4095;\n return result;\n}\n\n/**\n * Decodes delta and ZigZag encoded vertices. This modifies the buffers in place.\n *\n * @param uBuffer The buffer view of u values.\n * @param vBuffer The buffer view of v values.\n * @param [heightBuffer] The buffer view of height values.\n *\n * @link https://github.com/AnalyticalGraphicsInc/quantized-mesh|quantized-mesh-1.0 terrain format\n */\nexport function zigZagDeltaDecode(\n uBuffer: Uint16Array,\n vBuffer: Uint16Array,\n heightBuffer?: Uint16Array | number[]\n) {\n assert(uBuffer);\n assert(vBuffer);\n assert(uBuffer.length === vBuffer.length);\n if (heightBuffer) {\n assert(uBuffer.length === heightBuffer.length);\n }\n\n function zigZagDecode(value: number) {\n return (value >> 1) ^ -(value & 1);\n }\n\n let u = 0;\n let v = 0;\n let height = 0;\n\n for (let i = 0; i < uBuffer.length; ++i) {\n u += zigZagDecode(uBuffer[i]);\n v += zigZagDecode(vBuffer[i]);\n\n uBuffer[i] = u;\n vBuffer[i] = v;\n\n if (heightBuffer) {\n height += zigZagDecode(heightBuffer[i]);\n heightBuffer[i] = height;\n }\n }\n}\n","import {Vector3} from '@math.gl/core';\nimport {GL, octDecode} from '@loaders.gl/math';\n\nconst scratchNormal = new Vector3();\n\nexport function normalize3DTileNormalAttribute(tile, normals) {\n if (!normals) {\n return null;\n }\n\n if (tile.isOctEncoded16P) {\n const decodedArray = new Float32Array(tile.pointsLength * 3);\n for (let i = 0; i < tile.pointsLength; i++) {\n octDecode(normals[i * 2], normals[i * 2 + 1], scratchNormal);\n // @ts-ignore\n scratchNormal.toArray(decodedArray, i * 3);\n }\n\n return {\n type: GL.FLOAT,\n size: 2,\n value: decodedArray\n };\n }\n\n return {\n type: GL.FLOAT,\n size: 2,\n value: normals\n };\n}\n","import {Vector3} from '@math.gl/core';\nimport {GL} from '@loaders.gl/math';\n\n// Prepare attribute for positions\nexport function normalize3DTilePositionAttribute(tile, positions, options) {\n if (!tile.isQuantized) {\n return positions;\n }\n\n // For quantized posititions, either expand to Float32Array or return custom accessor\n // https://github.com/AnalyticalGraphicsInc/3d-tiles/blob/master/specification/TileFormats/Instanced3DModel/README.md#quantized-positions\n\n // Optionally decodes quantized positions on GPU, for simpler renderers that don't accept normalized attributes\n if (options['3d-tiles'] && options['3d-tiles'].decodeQuantizedPositions) {\n tile.isQuantized = false;\n return decodeQuantizedPositions(tile, positions);\n }\n\n // Default: Use normalized shorts directly, no copying/processing.\n // NOTE: The \"missing\" offset/scaling operations are automatically added to modelMatrix if `tile.isQuantized === true`\n return {\n type: GL.UNSIGNED_SHORT,\n value: positions,\n size: 3,\n normalized: true\n };\n}\n\n// Pre-scale quantized positions on CPU\nfunction decodeQuantizedPositions(tile, positions) {\n const scratchPosition = new Vector3();\n const decodedArray = new Float32Array(tile.pointCount * 3);\n\n for (let i = 0; i < tile.pointCount; i++) {\n // POSITION = POSITION_QUANTIZED / 65535.0 * QUANTIZED_VOLUME_SCALE + QUANTIZED_VOLUME_OFFSET\n scratchPosition\n .set(positions[i * 3], positions[i * 3 + 1], positions[i * 3 + 2])\n .scale(1 / tile.quantizedRange)\n .multiply(tile.quantizedVolumeScale)\n .add(tile.quantizedVolumeOffset)\n .toArray(decodedArray, i * 3);\n }\n\n return decodedArray;\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {DracoLoader} from '@loaders.gl/draco';\nimport {GL} from '@loaders.gl/math';\nimport {Vector3} from '@math.gl/core';\n\nimport Tile3DFeatureTable from '../classes/tile-3d-feature-table';\nimport Tile3DBatchTable from '../classes/tile-3d-batch-table';\nimport {parse3DTileHeaderSync} from './helpers/parse-3d-tile-header';\nimport {parse3DTileTablesHeaderSync, parse3DTileTablesSync} from './helpers/parse-3d-tile-tables';\nimport {normalize3DTileColorAttribute} from './helpers/normalize-3d-tile-colors';\nimport {normalize3DTileNormalAttribute} from './helpers/normalize-3d-tile-normals';\nimport {normalize3DTilePositionAttribute} from './helpers/normalize-3d-tile-positions';\n\nexport async function parsePointCloud3DTile(tile, arrayBuffer, byteOffset, options, context) {\n byteOffset = parse3DTileHeaderSync(tile, arrayBuffer, byteOffset);\n byteOffset = parse3DTileTablesHeaderSync(tile, arrayBuffer, byteOffset);\n byteOffset = parse3DTileTablesSync(tile, arrayBuffer, byteOffset, options);\n initializeTile(tile);\n\n const {featureTable, batchTable} = parsePointCloudTables(tile);\n\n await parseDraco(tile, featureTable, batchTable, options, context);\n\n parsePositions(tile, featureTable, options);\n parseColors(tile, featureTable, batchTable);\n parseNormals(tile, featureTable);\n\n return byteOffset;\n}\n\nfunction initializeTile(tile) {\n // Initialize point cloud tile defaults\n tile.attributes = {\n positions: null,\n colors: null,\n normals: null,\n batchIds: null\n };\n tile.isQuantized = false;\n tile.isTranslucent = false;\n tile.isRGB565 = false;\n tile.isOctEncoded16P = false;\n}\n\nfunction parsePointCloudTables(tile) {\n const featureTable = new Tile3DFeatureTable(tile.featureTableJson, tile.featureTableBinary);\n\n const pointsLength = featureTable.getGlobalProperty('POINTS_LENGTH');\n if (!Number.isFinite(pointsLength)) {\n throw new Error('POINTS_LENGTH must be defined');\n }\n featureTable.featuresLength = pointsLength;\n\n tile.featuresLength = pointsLength;\n tile.pointsLength = pointsLength;\n tile.pointCount = pointsLength;\n\n tile.rtcCenter = featureTable.getGlobalProperty('RTC_CENTER', GL.FLOAT, 3);\n\n const batchTable = parseBatchIds(tile, featureTable);\n\n return {featureTable, batchTable};\n}\n\nfunction parsePositions(tile, featureTable, options) {\n if (!tile.attributes.positions) {\n if (featureTable.hasProperty('POSITION')) {\n tile.attributes.positions = featureTable.getPropertyArray('POSITION', GL.FLOAT, 3);\n } else if (featureTable.hasProperty('POSITION_QUANTIZED')) {\n const positions = featureTable.getPropertyArray('POSITION_QUANTIZED', GL.UNSIGNED_SHORT, 3);\n\n tile.isQuantized = true;\n tile.quantizedRange = (1 << 16) - 1;\n\n tile.quantizedVolumeScale = featureTable.getGlobalProperty(\n 'QUANTIZED_VOLUME_SCALE',\n GL.FLOAT,\n 3\n );\n if (!tile.quantizedVolumeScale) {\n throw new Error('QUANTIZED_VOLUME_SCALE must be defined for quantized positions.');\n }\n\n tile.quantizedVolumeOffset = featureTable.getGlobalProperty(\n 'QUANTIZED_VOLUME_OFFSET',\n GL.FLOAT,\n 3\n );\n if (!tile.quantizedVolumeOffset) {\n throw new Error('QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.');\n }\n\n tile.attributes.positions = normalize3DTilePositionAttribute(tile, positions, options);\n }\n }\n\n if (!tile.attributes.positions) {\n throw new Error('Either POSITION or POSITION_QUANTIZED must be defined.');\n }\n}\n\nfunction parseColors(tile, featureTable, batchTable) {\n if (!tile.attributes.colors) {\n let colors = null;\n if (featureTable.hasProperty('RGBA')) {\n colors = featureTable.getPropertyArray('RGBA', GL.UNSIGNED_BYTE, 4);\n tile.isTranslucent = true;\n } else if (featureTable.hasProperty('RGB')) {\n colors = featureTable.getPropertyArray('RGB', GL.UNSIGNED_BYTE, 3);\n } else if (featureTable.hasProperty('RGB565')) {\n colors = featureTable.getPropertyArray('RGB565', GL.UNSIGNED_SHORT, 1);\n tile.isRGB565 = true;\n }\n\n tile.attributes.colors = normalize3DTileColorAttribute(tile, colors, batchTable);\n }\n\n if (featureTable.hasProperty('CONSTANT_RGBA')) {\n tile.constantRGBA = featureTable.getGlobalProperty('CONSTANT_RGBA', GL.UNSIGNED_BYTE, 4);\n }\n}\n\nfunction parseNormals(tile, featureTable) {\n if (!tile.attributes.normals) {\n let normals = null;\n if (featureTable.hasProperty('NORMAL')) {\n normals = featureTable.getPropertyArray('NORMAL', GL.FLOAT, 3);\n } else if (featureTable.hasProperty('NORMAL_OCT16P')) {\n normals = featureTable.getPropertyArray('NORMAL_OCT16P', GL.UNSIGNED_BYTE, 2);\n tile.isOctEncoded16P = true;\n }\n\n tile.attributes.normals = normalize3DTileNormalAttribute(tile, normals);\n }\n}\n\nfunction parseBatchIds(tile, featureTable) {\n let batchTable = null;\n if (!tile.batchIds && featureTable.hasProperty('BATCH_ID')) {\n tile.batchIds = featureTable.getPropertyArray('BATCH_ID', GL.UNSIGNED_SHORT, 1);\n\n if (tile.batchIds) {\n const batchFeatureLength = featureTable.getGlobalProperty('BATCH_LENGTH');\n if (!batchFeatureLength) {\n throw new Error('Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.');\n }\n const {batchTableJson, batchTableBinary} = tile;\n batchTable = new Tile3DBatchTable(batchTableJson, batchTableBinary, batchFeatureLength);\n }\n }\n return batchTable;\n}\n\n// eslint-disable-next-line complexity\nasync function parseDraco(tile, featureTable, batchTable, options, context) {\n let dracoBuffer;\n let dracoFeatureTableProperties;\n let dracoBatchTableProperties;\n const batchTableDraco =\n tile.batchTableJson &&\n tile.batchTableJson.extensions &&\n tile.batchTableJson.extensions['3DTILES_draco_point_compression'];\n if (batchTableDraco) {\n dracoBatchTableProperties = batchTableDraco.properties;\n }\n\n const featureTableDraco = featureTable.getExtension('3DTILES_draco_point_compression');\n if (featureTableDraco) {\n dracoFeatureTableProperties = featureTableDraco.properties;\n const dracoByteOffset = featureTableDraco.byteOffset;\n const dracoByteLength = featureTableDraco.byteLength;\n if (!dracoFeatureTableProperties || !Number.isFinite(dracoByteOffset) || !dracoByteLength) {\n throw new Error('Draco properties, byteOffset, and byteLength must be defined');\n }\n\n dracoBuffer = tile.featureTableBinary.slice(dracoByteOffset, dracoByteOffset + dracoByteLength);\n\n tile.hasPositions = Number.isFinite(dracoFeatureTableProperties.POSITION);\n tile.hasColors =\n Number.isFinite(dracoFeatureTableProperties.RGB) ||\n Number.isFinite(dracoFeatureTableProperties.RGBA);\n tile.hasNormals = Number.isFinite(dracoFeatureTableProperties.NORMAL);\n tile.hasBatchIds = Number.isFinite(dracoFeatureTableProperties.BATCH_ID);\n tile.isTranslucent = Number.isFinite(dracoFeatureTableProperties.RGBA);\n }\n\n if (!dracoBuffer) {\n return true;\n }\n\n const dracoData = {\n buffer: dracoBuffer,\n properties: {...dracoFeatureTableProperties, ...dracoBatchTableProperties},\n featureTableProperties: dracoFeatureTableProperties,\n batchTableProperties: dracoBatchTableProperties,\n dequantizeInShader: false\n };\n\n return await loadDraco(tile, dracoData, options, context);\n}\n\n// eslint-disable-next-line complexity, max-statements\nexport async function loadDraco(tile, dracoData, options, context) {\n const {parse} = context;\n const dracoOptions = {\n ...options,\n draco: {\n ...options.draco,\n extraAttributes: dracoData.batchTableProperties || {}\n }\n };\n\n // The entire tileset might be included, too expensive to serialize\n delete dracoOptions['3d-tiles'];\n\n const data = await parse(dracoData.buffer, DracoLoader, dracoOptions);\n\n const decodedPositions = data.attributes.POSITION && data.attributes.POSITION.value;\n const decodedColors = data.attributes.COLOR_0 && data.attributes.COLOR_0.value;\n const decodedNormals = data.attributes.NORMAL && data.attributes.NORMAL.value;\n const decodedBatchIds = data.attributes.BATCH_ID && data.attributes.BATCH_ID.value;\n const isQuantizedDraco = decodedPositions && data.attributes.POSITION.value.quantization;\n const isOctEncodedDraco = decodedNormals && data.attributes.NORMAL.value.quantization;\n if (isQuantizedDraco) {\n // Draco quantization range == quantized volume scale - size in meters of the quantized volume\n // Internal quantized range is the range of values of the quantized data, e.g. 255 for 8-bit, 1023 for 10-bit, etc\n const quantization = data.POSITION.data.quantization;\n const range = quantization.range;\n tile.quantizedVolumeScale = new Vector3(range, range, range);\n tile.quantizedVolumeOffset = new Vector3(quantization.minValues);\n tile.quantizedRange = (1 << quantization.quantizationBits) - 1.0;\n tile.isQuantizedDraco = true;\n }\n if (isOctEncodedDraco) {\n tile.octEncodedRange = (1 << data.NORMAL.data.quantization.quantizationBits) - 1.0;\n tile.isOctEncodedDraco = true;\n }\n\n // Extra batch table attributes\n const batchTableAttributes = {};\n if (dracoData.batchTableProperties) {\n for (const attributeName of Object.keys(dracoData.batchTableProperties)) {\n if (data.attributes[attributeName] && data.attributes[attributeName].value) {\n batchTableAttributes[attributeName.toLowerCase()] = data.attributes[attributeName].value;\n }\n }\n }\n\n tile.attributes = {\n positions: decodedPositions,\n colors: normalize3DTileColorAttribute(tile, decodedColors),\n normals: decodedNormals,\n batchIds: decodedBatchIds,\n ...batchTableAttributes\n };\n}\n\n// TODO - this is the remaining code from Cesium's parser\n/*\n const batchTable = new Tile3DBatchTable(tile);\n\n // parseDracoBuffer(tile, featureTable, batchTable);\n\n if (!tile.attributes.positions) {\n throw new Error('Either POSITION or POSITION_QUANTIZED must be defined.');\n }\n}\n/*\n\n if (!tile.attributes.positions) {\n if (featureTable.hasProperty('POSITION')) {\n tile.attributes.positions = featureTable.getPropertyArray('POSITION', GL.FLOAT, 3);\n } else if (featureTable.hasProperty('POSITION_QUANTIZED')) {\n tile.attributes.positions = featureTable.getPropertyArray('POSITION_QUANTIZED', GL.UNSIGNED_SHORT, 3);\n\n\n if (!tile.colors) {\n if (featureTable.hasProperty('RGBA')) {\n tile.colors = featureTable.getPropertyArray('RGBA', GL.UNSIGNED_BYTE, 4);\n tile.isTranslucent = true;\n } else if (featureTable.hasProperty('RGB')) {\n tile.colors = featureTable.getPropertyArray('RGB', GL.UNSIGNED_BYTE, 3);\n } else if (featureTable.hasPropertry('RGB565')) {\n tile.colors = featureTable.getPropertyArray('RGB565', GL.UNSIGNED_SHORT, 1);\n tile.isRGB565 = true;\n }\n }\n\n if (!tile.attributes.normals) {\n if (featureTable.getPropertry('NORMAL')) {\n tile.attributes.normals = featureTable.getPropertyArray('NORMAL', GL.FLOAT, 3);\n } else if (featureTable.getProperty('NORMAL_OCT16P')) {\n tile.attributes.normals = featureTable.getPropertyArray('NORMAL_OCT16P', GL.UNSIGNED_BYTE, 2);\n tile.isOctEncoded16P = true;\n }\n }\n\n if (!tile.batchIds) {\n if (featureTable.hasProperty('BATCH_ID')) {\n tile.batchIds = featureTable.getPropertyArray('BATCH_ID', GL.UNSIGNED_SHORT, 1);\n }\n }\n\n if (!tile.attributes.positions) {\n throw new Error('Either POSITION or POSITION_QUANTIZED must be defined.');\n }\n\n if (featureTable.getPropertry('CONSTANT_RGBA')) {\n tile.constantRGBA = featureTable.getGlobalProperty('CONSTANT_RGBA', GL.UNSIGNED_BYTE, 4);\n }\n\n if (tile.batchIds) {\n const batchLength = featureTable.getGlobalProperty('BATCH_LENGTH');\n if (!defined(batchLength)) {\n throw new Error('Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.');\n }\n\n if (defined(batchTableBinary)) {\n // Copy the batchTableBinary section and let the underlying ArrayBuffer be freed\n batchTableBinary = new Uint8Array(batchTableBinary);\n }\n\n if (defined(pointCloud._batchTableLoaded)) {\n pointCloud._batchTableLoaded(batchLength, batchTableJson, batchTableBinary);\n }\n }\n\n // If points are not batched and there are per-point properties, use these properties for styling purposes\n var styleableProperties;\n if (!hasBatchIds && defined(batchTableBinary)) {\n tile.styleableProperties = Cesium3DTileBatchTable.getBinaryProperties(\n pointsLength,\n batchTableJson,\n batchTableBinary\n );\n }\n\n tile.draco = draco;\n}\n\n// Separate parsing and decoding of Draco\nexport function parseDracoBuffer(tile, featureTable, batchTable) {\n let dracoBuffer;\n let dracoFeatureTableProperties;\n let dracoBatchTableProperties;\n\n const batchTableDraco = batchTable.getExtension('3DTILES_draco_point_compression');\n if (batchTableDraco) {\n dracoBatchTableProperties = batchTableDraco.properties;\n }\n\n const featureTableDraco = featureTable.getExtension('3DTILES_draco_point_compression');\n if (featureTableDraco) {\n dracoFeatureTableProperties = featureTableDraco.properties;\n const dracoByteOffset = featureTableDraco.byteOffset;\n const dracoByteLength = featureTableDraco.byteLength;\n if (!dracoFeatureTableProperties || !dracoByteOffset || !dracoByteLength) {\n throw new Error('Draco properties, byteOffset, and byteLength must be defined');\n }\n\n dracoBuffer = arraySlice(\n featureTableBinary,\n dracoByteOffset,\n dracoByteOffset + dracoByteLength\n );\n tile.hasPositions = dracoFeatureTableProperties.POSITION;\n tile.hasColors = dracoFeatureTableProperties.RGB || dracoFeatureTableProperties.RGBA;\n tile.hasNormals = dracoFeatureTableProperties.NORMAL;\n tile.hasBatchIds = dracoFeatureTableProperties.BATCH_ID;\n tile.isTranslucent = dracoFeatureTableProperties.RGBA;\n }\n\n if (dracoBuffer) {\n tile.draco = {\n buffer: dracoBuffer,\n properties: {...dracoFeatureTableProperties, ...dracoBatchTableProperties},\n featureTableProperties: dracoFeatureTableProperties,\n batchTableProperties: dracoBatchTableProperties,\n dequantizeInShader: false\n };\n\n tile.decodingState = DECODING_STATE.NEEDS_DECODE;\n }\n}\n\n/*\nfunction decodeDraco(tile, context) {\n if (tile.decodingState === DECODING_STATE.READY) {\n return false;\n }\n if (tile.decodingState === DECODING_STATE.NEEDS_DECODE) {\n var parsedContent = tile._parsedContent;\n var draco = parsedContent.draco;\n var decodePromise = DracoLoader.decodePointCloud(draco, context);\n if (defined(decodePromise)) {\n tile.decodingState = DECODING_STATE.DECODING;\n decodePromise.then(function(result) {\n tile.decodingState = DECODING_STATE.READY;\n var decodedPositions = defined(result.POSITION) ? result.POSITION.array : undefined;\n var decodedRgb = defined(result.RGB) ? result.RGB.array : undefined;\n var decodedRgba = defined(result.RGBA) ? result.RGBA.array : undefined;\n var decodedNormals = defined(result.NORMAL) ? result.NORMAL.array : undefined;\n var decodedBatchIds = defined(result.BATCH_ID) ? result.BATCH_ID.array : undefined;\n var isQuantizedDraco = defined(decodedPositions) && defined(result.POSITION.data.quantization);\n var isOctEncodedDraco = defined(decodedNormals) && defined(result.NORMAL.data.quantization);\n if (isQuantizedDraco) {\n // Draco quantization range == quantized volume scale - size in meters of the quantized volume\n // Internal quantized range is the range of values of the quantized data, e.g. 255 for 8-bit, 1023 for 10-bit, etc\n var quantization = result.POSITION.data.quantization;\n var range = quantization.range;\n tile._quantizedVolumeScale = Cartesian3.fromElements(range, range, range);\n tile._quantizedVolumeOffset = Cartesian3.unpack(quantization.minValues);\n tile._quantizedRange = (1 << quantization.quantizationBits) - 1.0;\n tile._isQuantizedDraco = true;\n }\n if (isOctEncodedDraco) {\n tile._octEncodedRange = (1 << result.NORMAL.data.quantization.quantizationBits) - 1.0;\n tile._isOctEncodedDraco = true;\n }\n var styleableProperties = parsedContent.styleableProperties;\n var batchTableProperties = draco.batchTableProperties;\n for (var name in batchTableProperties) {\n if (batchTableProperties.hasOwnProperty(name)) {\n var property = result[name];\n if (!defined(styleableProperties)) {\n styleableProperties = {};\n }\n styleableProperties[name] = {\n typedArray : property.array,\n componentCount : property.data.componentsPerAttribute\n };\n }\n }\n parsedContent.positions = defaultValue(decodedPositions, parsedContent.positions);\n parsedContent.colors = defaultValue(defaultValue(decodedRgba, decodedRgb), parsedContent.colors);\n parsedContent.normals = defaultValue(decodedNormals, parsedContent.normals);\n parsedContent.batchIds = defaultValue(decodedBatchIds, parsedContent.batchIds);\n parsedContent.styleableProperties = styleableProperties;\n }).otherwise(function(error) {\n tile.decodingState = DECODING_STATE.FAILED;\n tile._readyPromise.reject(error);\n });\n }\n }\n return true;\n}\n*/\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// TODO - should we automatically parse the embedded glTF or leave it to the app?\n// - I.e. some apps might work directly on a GLB, in that case no need for us to decode...\n// - And if we decode, do we still keep the GLB in case it is needed?\n// - Do we add an option to control this?\n// - Also, should we have hard dependency on gltf module or use injection or auto-discovery for gltf parser?\n\nimport {GLTFLoader} from '@loaders.gl/gltf';\nimport {sliceArrayBuffer} from '@loaders.gl/loader-utils';\n\nexport const GLTF_FORMAT = {\n URI: 0,\n EMBEDDED: 1\n};\n\nexport function parse3DTileGLTFViewSync(tile, arrayBuffer, byteOffset, options) {\n // Set flags\n // glTF models need to be rotated from Y to Z up\n // https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification#y-up-to-z-up\n tile.rotateYtoZ = true;\n\n // Assume glTF consumes rest of tile\n const gltfByteLength = tile.byteOffset + tile.byteLength - byteOffset;\n if (gltfByteLength === 0) {\n throw new Error('glTF byte length must be greater than 0.');\n }\n\n // Save gltf up axis\n tile.gltfUpAxis =\n options['3d-tiles'] && options['3d-tiles'].assetGltfUpAxis\n ? options['3d-tiles'].assetGltfUpAxis\n : 'Y';\n\n // TODO - We can avoid copy if already 4-byte aligned...\n // However the rest of the code may not be able to accept byteOffsets, so copy anyway\n tile.gltfArrayBuffer = sliceArrayBuffer(arrayBuffer, byteOffset, gltfByteLength);\n tile.gltfByteOffset = 0;\n tile.gltfByteLength = gltfByteLength;\n\n if (byteOffset % 4 === 0) {\n // tile.gltfArrayBuffer = arrayBuffer;\n // tile.gltfByteOffset = byteOffset;\n // tile.gltfByteLength = gltfByteLength;\n } else {\n // Create a copy of the glb so that it is 4-byte aligned\n // eslint-disable-next-line\n console.warn(`${tile.type}: embedded glb is not aligned to a 4-byte boundary.`);\n }\n\n // Entire tile is consumed\n return tile.byteOffset + tile.byteLength;\n}\n\nexport async function extractGLTF(tile, gltfFormat, options, context) {\n const tile3DOptions = options['3d-tiles'] || {};\n\n extractGLTFBufferOrURL(tile, gltfFormat, options);\n\n if (tile3DOptions.loadGLTF) {\n const {parse, fetch} = context;\n if (tile.gltfUrl) {\n tile.gltfArrayBuffer = await fetch(tile.gltfUrl, options);\n tile.gltfByteOffset = 0;\n }\n if (tile.gltfArrayBuffer) {\n // TODO - Should handle byteOffset... However, not used now...\n tile.gltf = await parse(tile.gltfArrayBuffer, GLTFLoader, options, context);\n delete tile.gltfArrayBuffer;\n delete tile.gltfByteOffset;\n delete tile.gltfByteLength;\n }\n }\n}\n\nfunction extractGLTFBufferOrURL(tile, gltfFormat, options) {\n switch (gltfFormat) {\n case GLTF_FORMAT.URI:\n // We need to remove padding from the end of the model URL in case this tile was part of a composite tile.\n // This removes all white space and null characters from the end of the string.\n const gltfUrlBytes = new Uint8Array(tile.gltfArrayBuffer, tile.gltfByteOffset);\n const textDecoder = new TextDecoder();\n const gltfUrl = textDecoder.decode(gltfUrlBytes);\n tile.gltfUrl = gltfUrl.replace(/[\\s\\0]+$/, '');\n delete tile.gltfArrayBuffer;\n delete tile.gltfByteOffset;\n delete tile.gltfByteLength;\n break;\n case GLTF_FORMAT.EMBEDDED:\n break;\n default:\n throw new Error(`b3dm: Illegal glTF format field`);\n }\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {GL} from '@loaders.gl/math'; // math.gl/geometry;\nimport Tile3DFeatureTable from '../classes/tile-3d-feature-table';\n// import Tile3DBatchTable from '../classes/tile-3d-batch-table';\n\nimport {parse3DTileHeaderSync} from './helpers/parse-3d-tile-header';\nimport {parse3DTileTablesHeaderSync, parse3DTileTablesSync} from './helpers/parse-3d-tile-tables';\nimport {parse3DTileGLTFViewSync, extractGLTF, GLTF_FORMAT} from './helpers/parse-3d-tile-gltf-view';\n\nexport async function parseBatchedModel3DTile(tile, arrayBuffer, byteOffset, options, context) {\n byteOffset = parseBatchedModel(tile, arrayBuffer, byteOffset, options, context);\n await extractGLTF(tile, GLTF_FORMAT.EMBEDDED, options, context);\n\n const extensions = tile?.gltf?.extensions;\n if (extensions && extensions.CESIUM_RTC) {\n tile.rtcCenter = extensions.CESIUM_RTC.center;\n }\n\n return byteOffset;\n}\n\nfunction parseBatchedModel(tile, arrayBuffer, byteOffset, options, context) {\n byteOffset = parse3DTileHeaderSync(tile, arrayBuffer, byteOffset);\n\n byteOffset = parse3DTileTablesHeaderSync(tile, arrayBuffer, byteOffset);\n byteOffset = parse3DTileTablesSync(tile, arrayBuffer, byteOffset, options);\n\n byteOffset = parse3DTileGLTFViewSync(tile, arrayBuffer, byteOffset, options);\n\n const featureTable = new Tile3DFeatureTable(tile.featureTableJson, tile.featureTableBinary);\n tile.rtcCenter = featureTable.getGlobalProperty('RTC_CENTER', GL.FLOAT, 3);\n\n return byteOffset;\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {Vector3, Matrix3, Matrix4, Quaternion} from '@math.gl/core';\nimport {Ellipsoid} from '@math.gl/geospatial';\nimport {GL} from '@loaders.gl/math'; // 'math.gl/geometry';\nimport Tile3DFeatureTable from '../classes/tile-3d-feature-table';\nimport Tile3DBatchTable from '../classes/tile-3d-batch-table';\n\nimport {parse3DTileHeaderSync} from './helpers/parse-3d-tile-header';\nimport {parse3DTileTablesHeaderSync, parse3DTileTablesSync} from './helpers/parse-3d-tile-tables';\nimport {parse3DTileGLTFViewSync, extractGLTF} from './helpers/parse-3d-tile-gltf-view';\n\nexport async function parseInstancedModel3DTile(tile, arrayBuffer, byteOffset, options, context) {\n byteOffset = parseInstancedModel(tile, arrayBuffer, byteOffset, options, context);\n await extractGLTF(tile, tile.gltfFormat, options, context);\n return byteOffset;\n}\n\nfunction parseInstancedModel(tile, arrayBuffer, byteOffset, options, context) {\n byteOffset = parse3DTileHeaderSync(tile, arrayBuffer, byteOffset);\n if (tile.version !== 1) {\n throw new Error(`Instanced 3D Model version ${tile.version} is not supported`);\n }\n\n byteOffset = parse3DTileTablesHeaderSync(tile, arrayBuffer, byteOffset);\n\n const view = new DataView(arrayBuffer);\n\n tile.gltfFormat = view.getUint32(byteOffset, true);\n byteOffset += 4;\n\n // PARSE FEATURE TABLE\n byteOffset = parse3DTileTablesSync(tile, arrayBuffer, byteOffset, options);\n\n byteOffset = parse3DTileGLTFViewSync(tile, arrayBuffer, byteOffset, options);\n\n // TODO - Is the feature table sometimes optional or can check be moved into table header parser?\n if (tile.featureTableJsonByteLength === 0) {\n throw new Error('i3dm parser: featureTableJsonByteLength is zero.');\n }\n\n const featureTable = new Tile3DFeatureTable(tile.featureTableJson, tile.featureTableBinary);\n\n const instancesLength = featureTable.getGlobalProperty('INSTANCES_LENGTH');\n featureTable.featuresLength = instancesLength;\n\n if (!Number.isFinite(instancesLength)) {\n throw new Error('i3dm parser: INSTANCES_LENGTH must be defined');\n }\n\n tile.eastNorthUp = featureTable.getGlobalProperty('EAST_NORTH_UP');\n tile.rtcCenter = featureTable.getGlobalProperty('RTC_CENTER', GL.FLOAT, 3);\n\n const batchTable = new Tile3DBatchTable(\n tile.batchTableJson,\n tile.batchTableBinary,\n instancesLength\n );\n\n extractInstancedAttributes(tile, featureTable, batchTable, instancesLength);\n\n return byteOffset;\n}\n\n// eslint-disable-next-line max-statements, complexity\nfunction extractInstancedAttributes(tile, featureTable, batchTable, instancesLength) {\n // Create model instance collection\n const collectionOptions = {\n instances: new Array(instancesLength),\n batchTable: tile._batchTable,\n cull: false, // Already culled by 3D Tiles\n url: undefined,\n // requestType: RequestType.TILES3D,\n gltf: undefined,\n basePath: undefined,\n incrementallyLoadTextures: false,\n // TODO - tileset is not available at this stage, tile is parsed independently\n // upAxis: (tileset && tileset._gltfUpAxis) || [0, 1, 0],\n forwardAxis: [1, 0, 0]\n };\n\n const instances = collectionOptions.instances;\n const instancePosition = new Vector3();\n const instanceNormalRight = new Vector3();\n const instanceNormalUp = new Vector3();\n const instanceNormalForward = new Vector3();\n const instanceRotation = new Matrix3();\n const instanceQuaternion = new Quaternion();\n const instanceScale = new Vector3();\n const instanceTranslationRotationScale = {};\n const instanceTransform = new Matrix4();\n const scratch1 = [];\n const scratch2 = [];\n const scratchVector1 = new Vector3();\n const scratchVector2 = new Vector3();\n\n for (let i = 0; i < instancesLength; i++) {\n let position;\n\n // Get the instance position\n if (featureTable.hasProperty('POSITION')) {\n position = featureTable.getProperty('POSITION', GL.FLOAT, 3, i, instancePosition);\n } else if (featureTable.hasProperty('POSITION_QUANTIZED')) {\n position = featureTable.getProperty(\n 'POSITION_QUANTIZED',\n GL.UNSIGNED_SHORT,\n 3,\n i,\n instancePosition\n );\n\n const quantizedVolumeOffset = featureTable.getGlobalProperty(\n 'QUANTIZED_VOLUME_OFFSET',\n GL.FLOAT,\n 3,\n scratchVector1\n );\n if (!quantizedVolumeOffset) {\n throw new Error(\n 'i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.'\n );\n }\n\n const quantizedVolumeScale = featureTable.getGlobalProperty(\n 'QUANTIZED_VOLUME_SCALE',\n GL.FLOAT,\n 3,\n scratchVector2\n );\n if (!quantizedVolumeScale) {\n throw new Error(\n 'i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.'\n );\n }\n\n const MAX_UNSIGNED_SHORT = 65535.0;\n for (let j = 0; j < 3; j++) {\n position[j] =\n (position[j] / MAX_UNSIGNED_SHORT) * quantizedVolumeScale[j] + quantizedVolumeOffset[j];\n }\n }\n\n if (!position) {\n throw new Error('i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.');\n }\n\n instancePosition.copy(position);\n instanceTranslationRotationScale.translation = instancePosition;\n\n // Get the instance rotation\n tile.normalUp = featureTable.getProperty('NORMAL_UP', GL.FLOAT, 3, i, scratch1);\n tile.normalRight = featureTable.getProperty('NORMAL_RIGHT', GL.FLOAT, 3, i, scratch2);\n\n const hasCustomOrientation = false;\n if (tile.normalUp) {\n if (!tile.normalRight) {\n throw new Error('i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.');\n }\n // Vector3.unpack(normalUp, 0, instanceNormalUp);\n // Vector3.unpack(normalRight, 0, instanceNormalRight);\n tile.hasCustomOrientation = true;\n } else {\n tile.octNormalUp = featureTable.getProperty(\n 'NORMAL_UP_OCT32P',\n GL.UNSIGNED_SHORT,\n 2,\n scratch1\n );\n tile.octNormalRight = featureTable.getProperty(\n 'NORMAL_RIGHT_OCT32P',\n GL.UNSIGNED_SHORT,\n 2,\n scratch2\n );\n\n if (tile.octNormalUp) {\n if (!tile.octNormalRight) {\n throw new Error(\n 'i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P'\n );\n }\n\n throw new Error('i3dm: oct-encoded orientation not implemented');\n /*\n AttributeCompression.octDecodeInRange(octNormalUp[0], octNormalUp[1], 65535, instanceNormalUp);\n AttributeCompression.octDecodeInRange(octNormalRight[0], octNormalRight[1], 65535, instanceNormalRight);\n hasCustomOrientation = true;\n */\n } else if (tile.eastNorthUp) {\n Ellipsoid.WGS84.eastNorthUpToFixedFrame(instancePosition, instanceTransform);\n instanceTransform.getRotationMatrix3(instanceRotation);\n } else {\n instanceRotation.identity();\n }\n }\n\n if (hasCustomOrientation) {\n instanceNormalForward.copy(instanceNormalRight).cross(instanceNormalUp).normalize();\n instanceRotation.setColumn(0, instanceNormalRight);\n instanceRotation.setColumn(1, instanceNormalUp);\n instanceRotation.setColumn(2, instanceNormalForward);\n }\n\n instanceQuaternion.fromMatrix3(instanceRotation);\n instanceTranslationRotationScale.rotation = instanceQuaternion;\n\n // Get the instance scale\n instanceScale.set(1.0, 1.0, 1.0);\n const scale = featureTable.getProperty('SCALE', GL.FLOAT, 1, i);\n if (Number.isFinite(scale)) {\n instanceScale.multiplyByScalar(scale);\n }\n const nonUniformScale = featureTable.getProperty('SCALE_NON_UNIFORM', GL.FLOAT, 3, i, scratch1);\n if (nonUniformScale) {\n instanceScale.scale(nonUniformScale);\n }\n\n instanceTranslationRotationScale.scale = instanceScale;\n\n // Get the batchId\n let batchId = featureTable.getProperty('BATCH_ID', GL.UNSIGNED_SHORT, 1, i);\n if (batchId === undefined) {\n // If BATCH_ID semantic is undefined, batchId is just the instance number\n batchId = i;\n }\n\n const rotationMatrix = new Matrix4().fromQuaternion(instanceTranslationRotationScale.rotation);\n\n // Create the model matrix and the instance\n instanceTransform.identity();\n instanceTransform.translate(instanceTranslationRotationScale.translation);\n instanceTransform.multiplyRight(rotationMatrix);\n instanceTransform.scale(instanceTranslationRotationScale.scale);\n\n const modelMatrix = instanceTransform.clone();\n instances[i] = {\n modelMatrix,\n batchId\n };\n }\n\n tile.instances = instances;\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\n// Reference code:\n// https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Composite3DTileContent.js#L182\n\nimport {parse3DTileHeaderSync} from './helpers/parse-3d-tile-header';\n\n// eslint-disable-next-line max-params\nexport async function parseComposite3DTile(\n tile,\n arrayBuffer,\n byteOffset,\n options,\n context,\n parse3DTile\n) {\n byteOffset = parse3DTileHeaderSync(tile, arrayBuffer, byteOffset);\n\n const view = new DataView(arrayBuffer);\n\n // Extract number of tiles\n tile.tilesLength = view.getUint32(byteOffset, true);\n byteOffset += 4;\n\n // extract each tile from the byte stream\n tile.tiles = [];\n while (tile.tiles.length < tile.tilesLength && tile.byteLength - byteOffset > 12) {\n const subtile = {};\n tile.tiles.push(subtile);\n byteOffset = await parse3DTile(arrayBuffer, byteOffset, options, context, subtile);\n // TODO - do we need to add any padding in between tiles?\n }\n\n return byteOffset;\n}\n","// This file is derived from the Cesium code base under Apache 2 license\n// See LICENSE.md and https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md\n\nimport {TILE3D_TYPE} from '../constants';\nimport {getMagicString} from './helpers/parse-utils';\n\nimport {parsePointCloud3DTile} from './parse-3d-tile-point-cloud';\nimport {parseBatchedModel3DTile} from './parse-3d-tile-batched-model';\nimport {parseInstancedModel3DTile} from './parse-3d-tile-instanced-model';\nimport {parseComposite3DTile} from './parse-3d-tile-composite';\n\n// Extracts\nexport async function parse3DTile(arrayBuffer, byteOffset = 0, options, context, tile = {}) {\n tile.byteOffset = byteOffset;\n tile.type = getMagicString(arrayBuffer, byteOffset);\n\n switch (tile.type) {\n case TILE3D_TYPE.COMPOSITE:\n // Note: We pass this function as argument so that embedded tiles can be parsed recursively\n return await parseComposite3DTile(\n tile,\n arrayBuffer,\n byteOffset,\n options,\n context,\n parse3DTile\n );\n\n case TILE3D_TYPE.BATCHED_3D_MODEL:\n return await parseBatchedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.INSTANCED_3D_MODEL:\n return await parseInstancedModel3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n case TILE3D_TYPE.POINT_CLOUD:\n return await parsePointCloud3DTile(tile, arrayBuffer, byteOffset, options, context);\n\n default:\n throw new Error(`3DTileLoader: unknown type ${tile.type}`); // eslint-disable-line\n }\n}\n","import {LOD_METRIC_TYPE, TILE_REFINEMENT, TILE_TYPE} from '@loaders.gl/tiles';\n\nfunction getTileType(tile) {\n if (!tile.contentUrl) {\n return TILE_TYPE.EMPTY;\n }\n\n const contentUrl = tile.contentUrl;\n const fileExtension = contentUrl.split('.').pop();\n switch (fileExtension) {\n case 'pnts':\n return TILE_TYPE.POINTCLOUD;\n case 'i3dm':\n case 'b3dm':\n return TILE_TYPE.SCENEGRAPH;\n default:\n return fileExtension;\n }\n}\n\nfunction getRefine(refine) {\n switch (refine) {\n case 'REPLACE':\n case 'replace':\n return TILE_REFINEMENT.REPLACE;\n case 'ADD':\n case 'add':\n return TILE_REFINEMENT.ADD;\n default:\n return refine;\n }\n}\n\nexport function normalizeTileData(tile, options) {\n if (tile.content) {\n const contentUri = tile.content.uri || tile.content.url;\n tile.contentUrl = `${options.basePath}/${contentUri}`;\n }\n tile.id = tile.contentUrl;\n tile.lodMetricType = LOD_METRIC_TYPE.GEOMETRIC_ERROR;\n tile.lodMetricValue = tile.geometricError;\n tile.transformMatrix = tile.transform;\n tile.type = getTileType(tile);\n tile.refine = getRefine(tile.refine);\n return tile;\n}\n\n// normalize tile headers\nexport function normalizeTileHeaders(tileset) {\n const basePath = tileset.basePath;\n const root = normalizeTileData(tileset.root, tileset);\n\n const stack = [];\n stack.push(root);\n\n while (stack.length > 0) {\n const tile = stack.pop();\n const children = tile.children || [];\n for (const childHeader of children) {\n normalizeTileData(childHeader, {basePath});\n stack.push(childHeader);\n }\n }\n\n return root;\n}\n","import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {path} from '@loaders.gl/loader-utils';\nimport {TILESET_TYPE, LOD_METRIC_TYPE} from '@loaders.gl/tiles';\nimport {VERSION} from './lib/utils/version';\nimport {parse3DTile} from './lib/parsers/parse-3d-tile';\nimport {normalizeTileHeaders} from './lib/parsers/parse-3d-tile-header';\n\n/**\n * Loader for 3D Tiles\n */\nexport const Tiles3DLoader: LoaderWithParser = {\n id: '3d-tiles',\n name: '3D Tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n tests: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n parse,\n options: {\n '3d-tiles': {\n loadGLTF: true,\n decodeQuantizedPositions: false,\n isTileset: 'auto',\n assetGltfUpAxis: null\n }\n }\n};\n\nfunction getBaseUri(tileset) {\n return path.dirname(tileset.url);\n}\n\nasync function parseTile(arrayBuffer, options, context) {\n const tile = {\n content: {\n featureIds: null\n }\n };\n const byteOffset = 0;\n await parse3DTile(arrayBuffer, byteOffset, options, context, tile.content);\n return tile.content;\n}\n\nasync function parseTileset(data, options, context) {\n const tilesetJson = JSON.parse(new TextDecoder().decode(data));\n // eslint-disable-next-line no-use-before-define\n tilesetJson.loader = options.loader || Tiles3DLoader;\n tilesetJson.url = context.url;\n // base path that non-absolute paths in tileset are relative to.\n tilesetJson.basePath = getBaseUri(tilesetJson);\n tilesetJson.root = normalizeTileHeaders(tilesetJson);\n tilesetJson.type = TILESET_TYPE.TILES3D;\n\n tilesetJson.lodMetricType = LOD_METRIC_TYPE.GEOMETRIC_ERROR;\n tilesetJson.lodMetricValue = tilesetJson.root.lodMetricValue;\n\n return tilesetJson;\n}\n\nasync function parse(data, options, context) {\n // auto detect file type\n const loaderOptions = options['3d-tiles'] || {};\n let isTileset;\n if (loaderOptions.isTileset === 'auto') {\n isTileset = context.url && context.url.indexOf('.json') !== -1;\n } else {\n isTileset = loaderOptions.isTileset;\n }\n\n if (isTileset) {\n data = await parseTileset(data, options, context);\n } else {\n data = await parseTile(data, options, context);\n }\n\n return data;\n}\n","import GL from '@luma.gl/constants';\nimport {Geometry} from '@luma.gl/core';\nimport {COORDINATE_SYSTEM, CompositeLayer} from '@deck.gl/core';\nimport {PointCloudLayer} from '@deck.gl/layers';\nimport {ScenegraphLayer} from '@deck.gl/mesh-layers';\nimport {default as _MeshLayer} from '../mesh-layer/mesh-layer';\nimport {log} from '@deck.gl/core';\n\nimport {load} from '@loaders.gl/core';\nimport {Tileset3D, TILE_TYPE} from '@loaders.gl/tiles';\nimport {Tiles3DLoader} from '@loaders.gl/3d-tiles';\n\nconst SINGLE_DATA = [0];\n\nconst defaultProps = {\n getPointColor: {type: 'accessor', value: [0, 0, 0, 255]},\n pointSize: 1.0,\n\n data: null,\n loader: Tiles3DLoader,\n\n onTilesetLoad: {type: 'function', value: tileset3d => {}, compare: false},\n onTileLoad: {type: 'function', value: tileHeader => {}, compare: false},\n onTileUnload: {type: 'function', value: tileHeader => {}, compare: false},\n onTileError: {type: 'function', value: (tile, message, url) => {}, compare: false},\n _getMeshColor: {type: 'function', value: tileHeader => [255, 255, 255], compare: false}\n};\n\nexport default class Tile3DLayer extends CompositeLayer {\n initializeState() {\n if ('onTileLoadFail' in this.props) {\n log.removed('onTileLoadFail', 'onTileError')();\n }\n // prop verification\n this.state = {\n layerMap: {},\n tileset3d: null,\n activeViewports: {},\n lastUpdatedViewports: null\n };\n }\n\n get isLoaded() {\n const {tileset3d} = this.state;\n return tileset3d && tileset3d.isLoaded();\n }\n\n shouldUpdateState({changeFlags}) {\n return changeFlags.somethingChanged;\n }\n\n updateState({props, oldProps, changeFlags}) {\n if (props.data && props.data !== oldProps.data) {\n this._loadTileset(props.data);\n }\n\n if (changeFlags.viewportChanged) {\n const {activeViewports} = this.state;\n const viewportsNumber = Object.keys(activeViewports).length;\n if (viewportsNumber) {\n this._updateTileset(activeViewports);\n this.state.lastUpdatedViewports = activeViewports;\n this.state.activeViewports = {};\n }\n }\n if (changeFlags.propsChanged) {\n const {layerMap} = this.state;\n for (const key in layerMap) {\n layerMap[key].needsUpdate = true;\n }\n }\n }\n\n activateViewport(viewport) {\n const {activeViewports, lastUpdatedViewports} = this.state;\n this.internalState.viewport = viewport;\n\n activeViewports[viewport.id] = viewport;\n const lastViewport = lastUpdatedViewports?.[viewport.id];\n if (!lastViewport || !viewport.equals(lastViewport)) {\n this.setChangeFlags({viewportChanged: true});\n this.setNeedsUpdate();\n }\n }\n\n getPickingInfo({info, sourceLayer}) {\n const {layerMap} = this.state;\n const layerId = sourceLayer && sourceLayer.id;\n if (layerId) {\n // layerId: this.id-[scenegraph|pointcloud]-tileId\n const substr = layerId.substring(this.id.length + 1);\n const tileId = substr.substring(substr.indexOf('-') + 1);\n info.object = layerMap[tileId] && layerMap[tileId].tile;\n }\n\n return info;\n }\n\n filterSubLayer({layer, viewport}) {\n const {tile} = layer.props;\n const {id: viewportId} = viewport;\n return tile.selected && tile.viewportIds.includes(viewportId);\n }\n\n _updateAutoHighlight(info) {\n if (info.sourceLayer) {\n info.sourceLayer.updateAutoHighlight(info);\n }\n }\n\n async _loadTileset(tilesetUrl) {\n const {loadOptions = {}} = this.props;\n\n // TODO: deprecate `loader` in v9.0\n let loader = this.props.loader || this.props.loaders;\n if (Array.isArray(loader)) {\n loader = loader[0];\n }\n\n const options = {loadOptions: {...loadOptions}};\n if (loader.preload) {\n const preloadOptions = await loader.preload(tilesetUrl, loadOptions);\n\n if (preloadOptions.headers) {\n options.loadOptions.fetch = {\n ...options.loadOptions.fetch,\n headers: preloadOptions.headers\n };\n }\n Object.assign(options, preloadOptions);\n }\n const tilesetJson = await load(tilesetUrl, loader, options.loadOptions);\n\n const tileset3d = new Tileset3D(tilesetJson, {\n onTileLoad: this._onTileLoad.bind(this),\n onTileUnload: this._onTileUnload.bind(this),\n onTileLoadFail: this.props.onTileError,\n ...options\n });\n\n this.setState({\n tileset3d,\n layerMap: {}\n });\n\n this._updateTileset(this.state.activeViewports);\n this.props.onTilesetLoad(tileset3d);\n }\n\n _onTileLoad(tileHeader) {\n const {lastUpdatedViewports} = this.state;\n this.props.onTileLoad(tileHeader);\n this._updateTileset(lastUpdatedViewports);\n this.setNeedsUpdate();\n }\n\n _onTileUnload(tileHeader) {\n // Was cleaned up from tileset cache. We no longer need to track it.\n delete this.state.layerMap[tileHeader.id];\n this.props.onTileUnload(tileHeader);\n }\n\n _updateTileset(viewports) {\n const {tileset3d} = this.state;\n const {timeline} = this.context;\n const viewportsNumber = Object.keys(viewports).length;\n if (!timeline || !viewportsNumber || !tileset3d) {\n return;\n }\n const frameNumber = tileset3d.update(Object.values(viewports));\n const tilesetChanged = this.state.frameNumber !== frameNumber;\n if (tilesetChanged) {\n this.setState({frameNumber});\n }\n }\n\n _getSubLayer(tileHeader, oldLayer) {\n if (!tileHeader.content) {\n return null;\n }\n\n switch (tileHeader.type) {\n case TILE_TYPE.POINTCLOUD:\n return this._makePointCloudLayer(tileHeader, oldLayer);\n case TILE_TYPE.SCENEGRAPH:\n return this._make3DModelLayer(tileHeader, oldLayer);\n case TILE_TYPE.MESH:\n return this._makeSimpleMeshLayer(tileHeader, oldLayer);\n default:\n throw new Error(`Tile3DLayer: Failed to render layer of type ${tileHeader.content.type}`);\n }\n }\n\n _makePointCloudLayer(tileHeader, oldLayer) {\n const {\n attributes,\n pointCount,\n constantRGBA,\n cartographicOrigin,\n modelMatrix\n } = tileHeader.content;\n const {positions, normals, colors} = attributes;\n\n if (!positions) {\n return null;\n }\n const data = (oldLayer && oldLayer.props.data) || {\n header: {\n vertexCount: pointCount\n },\n attributes: {\n POSITION: positions,\n NORMAL: normals,\n COLOR_0: colors\n }\n };\n\n const {pointSize, getPointColor} = this.props;\n const SubLayerClass = this.getSubLayerClass('pointcloud', PointCloudLayer);\n return new SubLayerClass(\n {\n pointSize\n },\n this.getSubLayerProps({\n id: 'pointcloud'\n }),\n {\n id: `${this.id}-pointcloud-${tileHeader.id}`,\n tile: tileHeader,\n data,\n coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS,\n coordinateOrigin: cartographicOrigin,\n modelMatrix,\n getColor: constantRGBA || getPointColor,\n _offset: 0\n }\n );\n }\n\n _make3DModelLayer(tileHeader) {\n const {gltf, instances, cartographicOrigin, modelMatrix} = tileHeader.content;\n\n const SubLayerClass = this.getSubLayerClass('scenegraph', ScenegraphLayer);\n\n return new SubLayerClass(\n {\n _lighting: 'pbr'\n },\n this.getSubLayerProps({\n id: 'scenegraph'\n }),\n {\n id: `${this.id}-scenegraph-${tileHeader.id}`,\n tile: tileHeader,\n data: instances || SINGLE_DATA,\n scenegraph: gltf,\n\n coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS,\n coordinateOrigin: cartographicOrigin,\n modelMatrix,\n getTransformMatrix: instance => instance.modelMatrix,\n getPosition: [0, 0, 0],\n _offset: 0\n }\n );\n }\n\n _makeSimpleMeshLayer(tileHeader, oldLayer) {\n const content = tileHeader.content;\n const {attributes, indices, modelMatrix, cartographicOrigin, material, featureIds} = content;\n const {_getMeshColor} = this.props;\n\n const geometry =\n (oldLayer && oldLayer.props.mesh) ||\n new Geometry({\n drawMode: GL.TRIANGLES,\n attributes: getMeshGeometry(attributes),\n indices\n });\n\n const SubLayerClass = this.getSubLayerClass('mesh', _MeshLayer);\n\n return new SubLayerClass(\n this.getSubLayerProps({\n id: 'mesh'\n }),\n {\n id: `${this.id}-mesh-${tileHeader.id}`,\n tile: tileHeader,\n mesh: geometry,\n data: SINGLE_DATA,\n getColor: _getMeshColor(tileHeader),\n pbrMaterial: material,\n modelMatrix,\n coordinateOrigin: cartographicOrigin,\n coordinateSystem: COORDINATE_SYSTEM.METER_OFFSETS,\n featureIds,\n _offset: 0\n }\n );\n }\n\n renderLayers() {\n const {tileset3d, layerMap} = this.state;\n if (!tileset3d) {\n return null;\n }\n\n return tileset3d.tiles\n .map(tile => {\n const layerCache = (layerMap[tile.id] = layerMap[tile.id] || {tile});\n let {layer} = layerCache;\n if (tile.selected) {\n // render selected tiles\n if (!layer) {\n // create layer\n layer = this._getSubLayer(tile);\n } else if (layerCache.needsUpdate) {\n // props have changed, rerender layer\n layer = this._getSubLayer(tile, layer);\n layerCache.needsUpdate = false;\n }\n }\n layerCache.layer = layer;\n return layer;\n })\n .filter(Boolean);\n }\n}\n\nfunction getMeshGeometry(contentAttributes) {\n const attributes = {};\n attributes.positions = {\n ...contentAttributes.positions,\n value: new Float32Array(contentAttributes.positions.value)\n };\n if (contentAttributes.normals) {\n attributes.normals = contentAttributes.normals;\n }\n if (contentAttributes.texCoords) {\n attributes.texCoords = contentAttributes.texCoords;\n }\n if (contentAttributes.colors) {\n attributes.colors = contentAttributes.colors;\n }\n if (contentAttributes.uvRegions) {\n attributes.uvRegions = contentAttributes.uvRegions;\n }\n return attributes;\n}\n\nTile3DLayer.layerName = 'Tile3DLayer';\nTile3DLayer.defaultProps = defaultProps;\n","import type {Loader} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\n\n/**\n * Worker loader for quantized meshes\n */\nexport const TerrainLoader = {\n name: 'Terrain',\n id: 'terrain',\n module: 'terrain',\n version: VERSION,\n worker: true,\n extensions: ['png', 'pngraw'],\n mimeTypes: ['image/png'],\n options: {\n terrain: {\n tesselator: 'auto',\n bounds: null,\n meshMaxError: 10,\n elevationDecoder: {\n rScaler: 1,\n gScaler: 0,\n bScaler: 0,\n offset: 0\n },\n skirtHeight: null\n }\n }\n};\n\n/**\n * Loader for quantized meshes\n */\nexport const _typecheckTerrainWorkerLoader: Loader = TerrainLoader;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {CompositeLayer, log} from '@deck.gl/core';\nimport {SimpleMeshLayer} from '@deck.gl/mesh-layers';\nimport {WebMercatorViewport, COORDINATE_SYSTEM} from '@deck.gl/core';\nimport {TerrainWorkerLoader} from '@loaders.gl/terrain';\nimport TileLayer from '../tile-layer/tile-layer';\nimport {urlType, getURLFromTemplate} from '../tile-layer/utils';\n\nconst DUMMY_DATA = [1];\n\nconst defaultProps = {\n ...TileLayer.defaultProps,\n // Image url that encodes height data\n elevationData: urlType,\n // Image url to use as texture\n texture: {...urlType, optional: true},\n // Martini error tolerance in meters, smaller number -> more detailed mesh\n meshMaxError: {type: 'number', value: 4.0},\n // Bounding box of the terrain image, [minX, minY, maxX, maxY] in world coordinates\n bounds: {type: 'array', value: null, optional: true, compare: true},\n // Color to use if texture is unavailable\n color: {type: 'color', value: [255, 255, 255]},\n // Object to decode height data, from (r, g, b) to height in meters\n elevationDecoder: {\n type: 'object',\n value: {\n rScaler: 1,\n gScaler: 0,\n bScaler: 0,\n offset: 0\n }\n },\n // Supply url to local terrain worker bundle. Only required if running offline and cannot access CDN.\n workerUrl: {type: 'string', value: null},\n // Same as SimpleMeshLayer wireframe\n wireframe: false,\n material: true,\n\n loaders: [TerrainWorkerLoader]\n};\n\n// Turns array of templates into a single string to work around shallow change\nfunction urlTemplateToUpdateTrigger(template) {\n if (Array.isArray(template)) {\n return template.join(';');\n }\n return template;\n}\n\n/**\n * state: {\n * isTiled: True renders TileLayer of many SimpleMeshLayers, false renders one SimpleMeshLayer\n * terrain: Mesh object. Only defined when isTiled is false.\n * }\n */\nexport default class TerrainLayer extends CompositeLayer {\n updateState({props, oldProps}) {\n const elevationDataChanged = props.elevationData !== oldProps.elevationData;\n if (elevationDataChanged) {\n const {elevationData} = props;\n const isTiled =\n elevationData &&\n (Array.isArray(elevationData) ||\n (elevationData.includes('{x}') && elevationData.includes('{y}')));\n this.setState({isTiled});\n }\n\n // Reloading for single terrain mesh\n const shouldReload =\n elevationDataChanged ||\n props.meshMaxError !== oldProps.meshMaxError ||\n props.elevationDecoder !== oldProps.elevationDecoder ||\n props.bounds !== oldProps.bounds;\n\n if (!this.state.isTiled && shouldReload) {\n const terrain = this.loadTerrain(props);\n this.setState({terrain});\n }\n\n // TODO - remove in v9\n if (props.workerUrl) {\n log.removed('workerUrl', 'loadOptions.terrain.workerUrl')();\n }\n }\n\n loadTerrain({elevationData, bounds, elevationDecoder, meshMaxError, signal}) {\n if (!elevationData) {\n return null;\n }\n let loadOptions = this.getLoadOptions();\n loadOptions = {\n ...loadOptions,\n terrain: {\n skirtHeight: this.state.isTiled ? meshMaxError * 2 : 0,\n ...loadOptions?.terrain,\n bounds,\n meshMaxError,\n elevationDecoder\n }\n };\n const {fetch} = this.props;\n return fetch(elevationData, {propName: 'elevationData', layer: this, loadOptions, signal});\n }\n\n getTiledTerrainData(tile) {\n const {elevationData, fetch, texture, elevationDecoder, meshMaxError} = this.props;\n const dataUrl = getURLFromTemplate(elevationData, tile);\n const textureUrl = getURLFromTemplate(texture, tile);\n\n const {bbox, signal, z} = tile;\n const viewport = new WebMercatorViewport({\n longitude: (bbox.west + bbox.east) / 2,\n latitude: (bbox.north + bbox.south) / 2,\n zoom: z\n });\n const bottomLeft = viewport.projectFlat([bbox.west, bbox.south]);\n const topRight = viewport.projectFlat([bbox.east, bbox.north]);\n const bounds = [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]];\n\n const terrain = this.loadTerrain({\n elevationData: dataUrl,\n bounds,\n elevationDecoder,\n meshMaxError,\n signal\n });\n const surface = textureUrl\n ? // If surface image fails to load, the tile should still be displayed\n fetch(textureUrl, {propName: 'texture', layer: this, loaders: [], signal}).catch(_ => null)\n : Promise.resolve(null);\n\n return Promise.all([terrain, surface]);\n }\n\n renderSubLayers(props) {\n const SubLayerClass = this.getSubLayerClass('mesh', SimpleMeshLayer);\n const {data, color} = props;\n\n if (!data) {\n return null;\n }\n\n const [mesh, texture] = data;\n\n return new SubLayerClass(props, {\n data: DUMMY_DATA,\n mesh,\n texture,\n coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,\n getPosition: d => [0, 0, 0],\n getColor: color\n });\n }\n\n // Update zRange of viewport\n onViewportLoad(tiles) {\n if (!tiles) {\n return;\n }\n\n const {zRange} = this.state;\n const ranges = tiles\n .map(tile => tile.content)\n .filter(Boolean)\n .map(arr => {\n const bounds = arr[0].header.boundingBox;\n return bounds.map(bound => bound[2]);\n });\n if (ranges.length === 0) {\n return;\n }\n const minZ = Math.min(...ranges.map(x => x[0]));\n const maxZ = Math.max(...ranges.map(x => x[1]));\n\n if (!zRange || minZ < zRange[0] || maxZ > zRange[1]) {\n this.setState({zRange: [minZ, maxZ]});\n }\n }\n\n renderLayers() {\n const {\n color,\n material,\n elevationData,\n texture,\n wireframe,\n meshMaxError,\n elevationDecoder,\n tileSize,\n maxZoom,\n minZoom,\n extent,\n maxRequests,\n onTileLoad,\n onTileUnload,\n onTileError,\n maxCacheSize,\n maxCacheByteSize,\n refinementStrategy\n } = this.props;\n\n if (this.state.isTiled) {\n return new TileLayer(\n this.getSubLayerProps({\n id: 'tiles'\n }),\n {\n wireframe,\n color,\n material,\n getTileData: this.getTiledTerrainData.bind(this),\n renderSubLayers: this.renderSubLayers.bind(this),\n updateTriggers: {\n getTileData: {\n elevationData: urlTemplateToUpdateTrigger(elevationData),\n texture: urlTemplateToUpdateTrigger(texture),\n meshMaxError,\n elevationDecoder\n }\n },\n onViewportLoad: this.onViewportLoad.bind(this),\n zRange: this.state.zRange || null,\n tileSize,\n maxZoom,\n minZoom,\n extent,\n maxRequests,\n onTileLoad,\n onTileUnload,\n onTileError,\n maxCacheSize,\n maxCacheByteSize,\n refinementStrategy\n }\n );\n }\n\n const SubLayerClass = this.getSubLayerClass('mesh', SimpleMeshLayer);\n return new SubLayerClass(\n this.getSubLayerProps({\n id: 'mesh'\n }),\n {\n data: DUMMY_DATA,\n mesh: this.state.terrain,\n texture,\n _instanced: false,\n getPosition: d => [0, 0, 0],\n getColor: color,\n material,\n wireframe\n }\n );\n }\n}\n\nTerrainLayer.layerName = 'TerrainLayer';\nTerrainLayer.defaultProps = defaultProps;\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n/* eslint-disable */\n\nexport default class VectorTileFeature {\n static get types() {\n return ['Unknown', 'Point', 'LineString', 'Polygon'];\n }\n\n constructor(pbf, end, extent, keys, values) {\n // Public\n this.properties = {};\n this.extent = extent;\n this.type = 0;\n this.id = null;\n\n // Private\n this._pbf = pbf;\n this._geometry = -1;\n this._keys = keys;\n this._values = values;\n\n pbf.readFields(readFeature, this, end);\n }\n\n // eslint-disable-next-line complexity, max-statements\n loadGeometry() {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n const end = pbf.readVarint() + pbf.pos;\n let cmd = 1;\n let length = 0;\n let x = 0;\n let y = 0;\n const lines = [];\n let line;\n\n while (pbf.pos < end) {\n if (length <= 0) {\n const cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n\n if (cmd === 1) {\n // moveTo\n if (line) lines.push(line);\n line = [];\n }\n // @ts-ignore\n line.push([x, y]);\n } else if (cmd === 7) {\n // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90\n if (line) {\n line.push(line[0].slice()); // closePolygon\n }\n } else {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n if (line) lines.push(line);\n\n return lines;\n }\n\n // eslint-disable-next-line max-statements\n bbox() {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n const end = pbf.readVarint() + pbf.pos;\n let cmd = 1;\n let length = 0;\n let x = 0;\n let y = 0;\n let x1 = Infinity;\n let x2 = -Infinity;\n let y1 = Infinity;\n let y2 = -Infinity;\n\n while (pbf.pos < end) {\n if (length <= 0) {\n const cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n if (x < x1) x1 = x;\n if (x > x2) x2 = x;\n if (y < y1) y1 = y;\n if (y > y2) y2 = y;\n } else if (cmd !== 7) {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n return [x1, y1, x2, y2];\n }\n\n _toGeoJSON(transform) {\n let coords = this.loadGeometry();\n let type = VectorTileFeature.types[this.type];\n let i;\n let j;\n\n switch (this.type) {\n case 1:\n var points = [];\n for (i = 0; i < coords.length; i++) {\n points[i] = coords[i][0];\n }\n coords = points;\n transform(coords, this);\n break;\n\n case 2:\n for (i = 0; i < coords.length; i++) {\n transform(coords[i], this);\n }\n break;\n\n case 3:\n coords = classifyRings(coords);\n for (i = 0; i < coords.length; i++) {\n for (j = 0; j < coords[i].length; j++) {\n transform(coords[i][j], this);\n }\n }\n break;\n }\n\n if (coords.length === 1) {\n coords = coords[0];\n } else {\n type = `Multi${type}`;\n }\n\n const result = {\n type: 'Feature',\n geometry: {\n type,\n coordinates: coords\n },\n properties: this.properties\n };\n\n if (this.id !== null) {\n result.id = this.id;\n }\n\n return result;\n }\n\n toGeoJSON(options) {\n if (typeof options === 'function') {\n return this._toGeoJSON(options);\n }\n const {x, y, z} = options;\n const size = this.extent * Math.pow(2, z);\n const x0 = this.extent * x;\n const y0 = this.extent * y;\n\n function project(line) {\n for (let j = 0; j < line.length; j++) {\n const p = line[j];\n p[0] = ((p[0] + x0) * 360) / size - 180;\n const y2 = 180 - ((p[1] + y0) * 360) / size;\n p[1] = (360 / Math.PI) * Math.atan(Math.exp((y2 * Math.PI) / 180)) - 90;\n }\n }\n return this._toGeoJSON(project);\n }\n}\n\n/**\n * Classifies an array of rings into polygons with outer rings and holes\n */\n\nfunction classifyRings(rings) {\n const len = rings.length;\n\n if (len <= 1) return [rings];\n\n const polygons = [];\n let polygon;\n let ccw;\n\n for (let i = 0; i < len; i++) {\n const area = signedArea(rings[i]);\n if (area === 0) continue;\n\n if (ccw === undefined) ccw = area < 0;\n\n if (ccw === area < 0) {\n if (polygon) polygons.push(polygon);\n polygon = [rings[i]];\n } else {\n // @ts-ignore\n polygon.push(rings[i]);\n }\n }\n if (polygon) polygons.push(polygon);\n\n return polygons;\n}\n\nfunction signedArea(ring) {\n let sum = 0;\n for (let i = 0, j = ring.length - 1, p1, p2; i < ring.length; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2[0] - p1[0]) * (p1[1] + p2[1]);\n }\n return sum;\n}\n\nfunction readFeature(tag, feature, pbf) {\n if (tag === 1) feature.id = pbf.readVarint();\n else if (tag === 2) readTag(pbf, feature);\n else if (tag === 3) feature.type = pbf.readVarint();\n else if (tag === 4) feature._geometry = pbf.pos;\n}\n\nfunction readTag(pbf, feature) {\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const key = feature._keys[pbf.readVarint()];\n const value = feature._values[pbf.readVarint()];\n feature.properties[key] = value;\n }\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport VectorTileFeature from './vector-tile-feature.js';\n\nexport default class VectorTileLayer {\n constructor(pbf, end) {\n // Public\n this.version = 1;\n this.name = null;\n this.extent = 4096;\n this.length = 0;\n\n // Private\n this._pbf = pbf;\n this._keys = [];\n this._values = [];\n this._features = [];\n\n pbf.readFields(readLayer, this, end);\n\n this.length = this._features.length;\n }\n\n // return feature `i` from this layer as a `VectorTileFeature`\n feature(i) {\n if (i < 0 || i >= this._features.length) {\n throw new Error('feature index out of bounds');\n }\n\n this._pbf.pos = this._features[i];\n\n const end = this._pbf.readVarint() + this._pbf.pos;\n return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values);\n }\n}\n\nfunction readLayer(tag, layer, pbf) {\n if (tag === 15) layer.version = pbf.readVarint();\n else if (tag === 1) layer.name = pbf.readString();\n else if (tag === 5) layer.extent = pbf.readVarint();\n else if (tag === 2) layer._features.push(pbf.pos);\n else if (tag === 3) layer._keys.push(pbf.readString());\n else if (tag === 4) layer._values.push(readValueMessage(pbf));\n}\n\nfunction readValueMessage(pbf) {\n let value = null;\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const tag = pbf.readVarint() >> 3;\n\n value =\n tag === 1\n ? pbf.readString()\n : tag === 2\n ? pbf.readFloat()\n : tag === 3\n ? pbf.readDouble()\n : tag === 4\n ? pbf.readVarint64()\n : tag === 5\n ? pbf.readVarint()\n : tag === 6\n ? pbf.readSVarint()\n : tag === 7\n ? pbf.readBoolean()\n : null;\n }\n\n return value;\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport VectorTileLayer from './vector-tile-layer';\n\nexport default class VectorTile {\n constructor(pbf, end) {\n this.layers = pbf.readFields(readTile, {}, end);\n }\n}\n\nfunction readTile(tag, layers, pbf) {\n if (tag === 3) {\n const layer = new VectorTileLayer(pbf, pbf.readVarint() + pbf.pos);\n if (layer.length) {\n layers[layer.name] = layer;\n }\n }\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n/* eslint-disable */\n\nimport {getPolygonSignedArea} from '@math.gl/polygon';\n\n// Reduce GC by reusing variables\nlet endPos, cmd, cmdLen, length, x, y, i;\n\nexport const TEST_EXPORTS = {\n classifyRings\n};\n\nexport default class VectorTileFeature {\n static get types() {\n return ['Unknown', 'Point', 'LineString', 'Polygon'];\n }\n\n constructor(pbf, end, extent, keys, values, firstPassData) {\n // Public\n this.properties = {};\n this.extent = extent;\n this.type = 0;\n this.id = null;\n\n // Private\n this._pbf = pbf;\n this._geometry = -1;\n this._keys = keys;\n this._values = values;\n this._firstPassData = firstPassData;\n\n pbf.readFields(readFeature, this, end);\n }\n\n // eslint-disable-next-line complexity, max-statements\n loadGeometry() {\n const pbf = this._pbf;\n pbf.pos = this._geometry;\n\n endPos = pbf.readVarint() + pbf.pos;\n cmd = 1;\n length = 0;\n x = 0;\n y = 0;\n i = 0;\n\n // Note: I attempted to replace the `data` array with a\n // Float32Array, but performance was worse, both using\n // `set()` and direct index access. Also, we cannot\n // know how large the buffer should be, so it would\n // increase memory usage\n const lines = []; // Indices where lines start\n const data = []; // Flat array of coordinate data\n\n while (pbf.pos < endPos) {\n if (length <= 0) {\n cmdLen = pbf.readVarint();\n cmd = cmdLen & 0x7;\n length = cmdLen >> 3;\n }\n\n length--;\n\n if (cmd === 1 || cmd === 2) {\n x += pbf.readSVarint();\n y += pbf.readSVarint();\n\n if (cmd === 1) {\n // New line\n lines.push(i);\n }\n data.push(x, y);\n i += 2;\n } else if (cmd === 7) {\n // Workaround for https://github.com/mapbox/mapnik-vector-tile/issues/90\n if (i > 0) {\n const start = lines[lines.length - 1]; // start index of polygon\n data.push(data[start], data[start + 1]); // closePolygon\n i += 2;\n }\n } else {\n throw new Error(`unknown command ${cmd}`);\n }\n }\n\n return {data, lines};\n }\n\n _toBinaryCoordinates(transform) {\n // Expands the protobuf data to an intermediate `lines`\n // data format, which maps closely to the binary data buffers.\n // It is similar to GeoJSON, but rather than storing the coordinates\n // in multidimensional arrays, we have a 1D `data` with all the\n // coordinates, and then index into this using the `lines`\n // parameter, e.g.\n //\n // geometry: {\n // type: 'Point', data: [1,2], lines: [0]\n // }\n // geometry: {\n // type: 'LineString', data: [1,2,3,4,...], lines: [0]\n // }\n // geometry: {\n // type: 'Polygon', data: [1,2,3,4,...], lines: [[0, 2]]\n // }\n // Thus the lines member lets us look up the relevant range\n // from the data array.\n // The Multi* versions of the above types share the same data\n // structure, just with multiple elements in the lines array\n let geom = this.loadGeometry();\n\n // Apply the supplied transformation to data\n transform(geom.data, this);\n\n const coordLength = 2;\n\n switch (this.type) {\n case 1: // Point\n this._firstPassData.pointFeaturesCount++;\n this._firstPassData.pointPositionsCount += geom.lines.length;\n break;\n\n case 2: // LineString\n this._firstPassData.lineFeaturesCount++;\n this._firstPassData.linePathsCount += geom.lines.length;\n this._firstPassData.linePositionsCount += geom.data.length / coordLength;\n break;\n\n case 3: // Polygon\n const classified = classifyRings(geom);\n\n // Unlike Point & LineString geom.lines is a 2D array, thanks\n // to the classifyRings method\n this._firstPassData.polygonFeaturesCount++;\n this._firstPassData.polygonObjectsCount += classified.lines.length;\n\n for (const lines of classified.lines) {\n this._firstPassData.polygonRingsCount += lines.length;\n }\n this._firstPassData.polygonPositionsCount += classified.data.length / coordLength;\n\n // @ts-ignore\n geom = classified;\n break;\n }\n\n geom.type = VectorTileFeature.types[this.type];\n if (geom.lines.length > 1) {\n geom.type = `Multi${geom.type}`;\n }\n\n const result = {\n type: 'Feature',\n geometry: geom,\n properties: this.properties\n };\n\n if (this.id !== null) {\n result.id = this.id;\n }\n\n return result;\n }\n\n toBinaryCoordinates(options) {\n if (typeof options === 'function') {\n return this._toBinaryCoordinates(options);\n }\n const {x, y, z} = options;\n const size = this.extent * Math.pow(2, z);\n const x0 = this.extent * x;\n const y0 = this.extent * y;\n\n function project(data) {\n for (let j = 0, jl = data.length; j < jl; j += 2) {\n data[j] = ((data[j] + x0) * 360) / size - 180;\n const y2 = 180 - ((data[j + 1] + y0) * 360) / size;\n data[j + 1] = (360 / Math.PI) * Math.atan(Math.exp((y2 * Math.PI) / 180)) - 90;\n }\n }\n return this._toBinaryCoordinates(project);\n }\n}\n\n/**\n * Classifies an array of rings into polygons with outer rings and holes\n * The function also detects holes which have zero area and\n * removes them. In doing so it modifies the input\n * `geom.data` array to remove the unneeded data\n */\nfunction classifyRings(geom) {\n const len = geom.lines.length;\n\n if (len <= 1) {\n return {\n data: geom.data,\n areas: [[getPolygonSignedArea(geom.data)]],\n lines: [geom.lines]\n };\n }\n\n const areas = [];\n const polygons = [];\n let ringAreas;\n let polygon;\n let ccw;\n let offset = 0;\n\n for (let i = 0, startIndex, endIndex; i < len; i++) {\n startIndex = geom.lines[i] - offset;\n\n endIndex = geom.lines[i + 1] - offset || geom.data.length;\n const shape = geom.data.slice(startIndex, endIndex);\n const area = getPolygonSignedArea(shape);\n\n if (area === 0) {\n // This polygon has no area, so remove it from the shape\n // Remove the section from the data array\n const before = geom.data.slice(0, startIndex);\n const after = geom.data.slice(endIndex);\n geom.data = before.concat(after);\n\n // Need to offset any remaining indices as we have\n // modified the data buffer\n offset += endIndex - startIndex;\n\n // Do not add this index to the output and process next shape\n continue;\n }\n\n if (ccw === undefined) ccw = area < 0;\n\n if (ccw === area < 0) {\n if (polygon) {\n areas.push(ringAreas);\n polygons.push(polygon);\n }\n polygon = [startIndex];\n ringAreas = [area];\n } else {\n // @ts-ignore\n ringAreas.push(area);\n // @ts-ignore\n polygon.push(startIndex);\n }\n }\n if (ringAreas) areas.push(ringAreas);\n if (polygon) polygons.push(polygon);\n\n return {areas, lines: polygons, data: geom.data};\n}\n\n// All code below is unchanged from the original Mapbox implemenation\n\nfunction readFeature(tag, feature, pbf) {\n if (tag === 1) feature.id = pbf.readVarint();\n else if (tag === 2) readTag(pbf, feature);\n else if (tag === 3) feature.type = pbf.readVarint();\n else if (tag === 4) feature._geometry = pbf.pos;\n}\n\nfunction readTag(pbf, feature) {\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const key = feature._keys[pbf.readVarint()];\n const value = feature._values[pbf.readVarint()];\n feature.properties[key] = value;\n }\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport VectorTileFeature from './vector-tile-feature.js';\n\nexport default class VectorTileLayer {\n constructor(pbf, end) {\n // Public\n this.version = 1;\n this.name = null;\n this.extent = 4096;\n this.length = 0;\n\n // Private\n this._pbf = pbf;\n this._keys = [];\n this._values = [];\n this._features = [];\n\n pbf.readFields(readLayer, this, end);\n\n this.length = this._features.length;\n }\n\n // return feature `i` from this layer as a `VectorTileFeature`\n feature(i, firstPassData) {\n if (i < 0 || i >= this._features.length) {\n throw new Error('feature index out of bounds');\n }\n\n this._pbf.pos = this._features[i];\n\n const end = this._pbf.readVarint() + this._pbf.pos;\n return new VectorTileFeature(\n this._pbf,\n end,\n this.extent,\n this._keys,\n this._values,\n firstPassData\n );\n }\n}\n\nfunction readLayer(tag, layer, pbf) {\n if (tag === 15) layer.version = pbf.readVarint();\n else if (tag === 1) layer.name = pbf.readString();\n else if (tag === 5) layer.extent = pbf.readVarint();\n else if (tag === 2) layer._features.push(pbf.pos);\n else if (tag === 3) layer._keys.push(pbf.readString());\n else if (tag === 4) layer._values.push(readValueMessage(pbf));\n}\n\nfunction readValueMessage(pbf) {\n let value = null;\n const end = pbf.readVarint() + pbf.pos;\n\n while (pbf.pos < end) {\n const tag = pbf.readVarint() >> 3;\n\n value =\n tag === 1\n ? pbf.readString()\n : tag === 2\n ? pbf.readFloat()\n : tag === 3\n ? pbf.readDouble()\n : tag === 4\n ? pbf.readVarint64()\n : tag === 5\n ? pbf.readVarint()\n : tag === 6\n ? pbf.readSVarint()\n : tag === 7\n ? pbf.readBoolean()\n : null;\n }\n\n return value;\n}\n","// This code is forked from https://github.com/mapbox/vector-tile-js under BSD 3-clause license.\n\nimport VectorTileLayer from './vector-tile-layer';\n\nexport default class VectorTile {\n constructor(pbf, end) {\n this.layers = pbf.readFields(readTile, {}, end);\n }\n}\n\nfunction readTile(tag, layers, pbf) {\n if (tag === 3) {\n const layer = new VectorTileLayer(pbf, pbf.readVarint() + pbf.pos);\n if (layer.length) {\n layers[layer.name] = layer;\n }\n }\n}\n","// @ts-nocheck\nimport {earcut} from '@math.gl/polygon';\n\n/**\n * Convert binary features to flat binary arrays. Similar to\n * `geojsonToBinary` helper function, except that it expects\n * a binary representation of the feature data, which enables\n * 2X-3X speed increase in parse speed, compared to using\n * geoJSON. See `binary-vector-tile/VectorTileFeature` for\n * data format detais\n */\nexport function featuresToBinary(features, firstPassData, options = {}) {\n return fillArrays(features, firstPassData, {\n numericPropKeys: options.numericPropKeys || extractNumericPropKeys(features),\n PositionDataType: options.PositionDataType || Float32Array\n });\n}\n\nexport const TEST_EXPORTS = {\n extractNumericPropKeys,\n fillArrays\n};\n\n// Extracts properties that are always numeric\n// eslint-disable-next-line complexity, max-statements\nfunction extractNumericPropKeys(features) {\n const numericPropKeys = {};\n for (const feature of features) {\n if (feature.properties) {\n for (const key in feature.properties) {\n // If property has not been seen before, or if property has been numeric\n // in all previous features, check if numeric in this feature\n // If not numeric, false is stored to prevent rechecking in the future\n const numericSoFar = numericPropKeys[key];\n // eslint-disable-next-line max-depth\n if (numericSoFar || numericSoFar === undefined) {\n const val = feature.properties[key];\n numericPropKeys[key] = isNumeric(val);\n }\n }\n }\n }\n\n return Object.keys(numericPropKeys).filter((k) => numericPropKeys[k]);\n}\n\n// Fills coordinates into pre-allocated typed arrays\n// eslint-disable-next-line complexity\nfunction fillArrays(features, firstPassData = {}, options = {}) {\n const {\n pointPositionsCount,\n pointFeaturesCount,\n linePositionsCount,\n linePathsCount,\n lineFeaturesCount,\n polygonPositionsCount,\n polygonObjectsCount,\n polygonRingsCount,\n polygonFeaturesCount\n } = firstPassData;\n const {numericPropKeys, PositionDataType = Float32Array} = options;\n const hasGlobalId = features[0] && 'id' in features[0];\n const coordLength = 2;\n const GlobalFeatureIdsDataType = features.length > 65535 ? Uint32Array : Uint16Array;\n const points = {\n positions: new PositionDataType(pointPositionsCount * coordLength),\n globalFeatureIds: new GlobalFeatureIdsDataType(pointPositionsCount),\n featureIds:\n pointFeaturesCount > 65535\n ? new Uint32Array(pointPositionsCount)\n : new Uint16Array(pointPositionsCount),\n numericProps: {},\n properties: [],\n fields: []\n };\n const lines = {\n pathIndices:\n linePositionsCount > 65535\n ? new Uint32Array(linePathsCount + 1)\n : new Uint16Array(linePathsCount + 1),\n positions: new PositionDataType(linePositionsCount * coordLength),\n globalFeatureIds: new GlobalFeatureIdsDataType(linePositionsCount),\n featureIds:\n lineFeaturesCount > 65535\n ? new Uint32Array(linePositionsCount)\n : new Uint16Array(linePositionsCount),\n numericProps: {},\n properties: [],\n fields: []\n };\n const polygons = {\n polygonIndices:\n polygonPositionsCount > 65535\n ? new Uint32Array(polygonObjectsCount + 1)\n : new Uint16Array(polygonObjectsCount + 1),\n primitivePolygonIndices:\n polygonPositionsCount > 65535\n ? new Uint32Array(polygonRingsCount + 1)\n : new Uint16Array(polygonRingsCount + 1),\n positions: new PositionDataType(polygonPositionsCount * coordLength),\n triangles: [],\n globalFeatureIds: new GlobalFeatureIdsDataType(polygonPositionsCount),\n featureIds:\n polygonFeaturesCount > 65535\n ? new Uint32Array(polygonPositionsCount)\n : new Uint16Array(polygonPositionsCount),\n numericProps: {},\n properties: [],\n fields: []\n };\n\n // Instantiate numeric properties arrays; one value per vertex\n for (const object of [points, lines, polygons]) {\n for (const propName of numericPropKeys) {\n // If property has been numeric in all previous features in which the property existed, check\n // if numeric in this feature\n object.numericProps[propName] = new Float32Array(object.positions.length / coordLength);\n }\n }\n\n // Set last element of path/polygon indices as positions length\n lines.pathIndices[linePathsCount] = linePositionsCount;\n polygons.polygonIndices[polygonObjectsCount] = polygonPositionsCount;\n polygons.primitivePolygonIndices[polygonRingsCount] = polygonPositionsCount;\n\n const indexMap = {\n pointPosition: 0,\n pointFeature: 0,\n linePosition: 0,\n linePath: 0,\n lineFeature: 0,\n polygonPosition: 0,\n polygonObject: 0,\n polygonRing: 0,\n polygonFeature: 0,\n feature: 0\n };\n\n for (const feature of features) {\n const geometry = feature.geometry;\n const properties = feature.properties || {};\n\n switch (geometry.type) {\n case 'Point':\n case 'MultiPoint':\n handlePoint(geometry, points, indexMap, coordLength, properties);\n points.properties.push(keepStringProperties(properties, numericPropKeys));\n if (hasGlobalId) {\n points.fields.push({id: feature.id});\n }\n indexMap.pointFeature++;\n break;\n case 'LineString':\n case 'MultiLineString':\n handleLineString(geometry, lines, indexMap, coordLength, properties);\n lines.properties.push(keepStringProperties(properties, numericPropKeys));\n if (hasGlobalId) {\n lines.fields.push({id: feature.id});\n }\n indexMap.lineFeature++;\n break;\n case 'Polygon':\n case 'MultiPolygon':\n handlePolygon(geometry, polygons, indexMap, coordLength, properties);\n polygons.properties.push(keepStringProperties(properties, numericPropKeys));\n if (hasGlobalId) {\n polygons.fields.push({id: feature.id});\n }\n indexMap.polygonFeature++;\n break;\n default:\n throw new Error('Invalid geometry type');\n }\n\n indexMap.feature++;\n }\n\n // Wrap each array in an accessor object with value and size keys\n return makeAccessorObjects(points, lines, polygons, coordLength);\n}\n\n// Fills (Multi)Point coordinates into points object of arrays\nfunction handlePoint(geometry, points, indexMap, coordLength, properties) {\n points.positions.set(geometry.data, indexMap.pointPosition * coordLength);\n\n const nPositions = geometry.data.length / coordLength;\n fillNumericProperties(points, properties, indexMap.pointPosition, nPositions);\n points.globalFeatureIds.fill(\n indexMap.feature,\n indexMap.pointPosition,\n indexMap.pointPosition + nPositions\n );\n points.featureIds.fill(\n indexMap.pointFeature,\n indexMap.pointPosition,\n indexMap.pointPosition + nPositions\n );\n\n indexMap.pointPosition += nPositions;\n}\n\n// Fills (Multi)LineString coordinates into lines object of arrays\nfunction handleLineString(geometry, lines, indexMap, coordLength, properties) {\n lines.positions.set(geometry.data, indexMap.linePosition * coordLength);\n\n const nPositions = geometry.data.length / coordLength;\n fillNumericProperties(lines, properties, indexMap.linePosition, nPositions);\n\n lines.globalFeatureIds.fill(\n indexMap.feature,\n indexMap.linePosition,\n indexMap.linePosition + nPositions\n );\n lines.featureIds.fill(\n indexMap.lineFeature,\n indexMap.linePosition,\n indexMap.linePosition + nPositions\n );\n\n for (let i = 0, il = geometry.lines.length; i < il; ++i) {\n // Extract range of data we are working with, defined by start\n // and end indices (these index into the geometry.data array)\n const start = geometry.lines[i];\n const end =\n i === il - 1\n ? geometry.data.length // last line, so read to end of data\n : geometry.lines[i + 1]; // start index for next line\n\n lines.pathIndices[indexMap.linePath++] = indexMap.linePosition;\n indexMap.linePosition += (end - start) / coordLength;\n }\n}\n\n// Fills (Multi)Polygon coordinates into polygons object of arrays\nfunction handlePolygon(geometry, polygons, indexMap, coordLength, properties) {\n polygons.positions.set(geometry.data, indexMap.polygonPosition * coordLength);\n\n const nPositions = geometry.data.length / coordLength;\n fillNumericProperties(polygons, properties, indexMap.polygonPosition, nPositions);\n polygons.globalFeatureIds.fill(\n indexMap.feature,\n indexMap.polygonPosition,\n indexMap.polygonPosition + nPositions\n );\n polygons.featureIds.fill(\n indexMap.polygonFeature,\n indexMap.polygonPosition,\n indexMap.polygonPosition + nPositions\n );\n\n // Unlike Point & LineString geometry.lines is a 2D array\n for (let l = 0, ll = geometry.lines.length; l < ll; ++l) {\n const startPosition = indexMap.polygonPosition;\n polygons.polygonIndices[indexMap.polygonObject++] = startPosition;\n\n const areas = geometry.areas[l];\n const lines = geometry.lines[l];\n const nextLines = geometry.lines[l + 1];\n\n for (let i = 0, il = lines.length; i < il; ++i) {\n const start = lines[i];\n const end =\n i === il - 1\n ? // last line, so either read to:\n nextLines === undefined\n ? geometry.data.length // end of data (no next lines)\n : nextLines[0] // start of first line in nextLines\n : lines[i + 1]; // start index for next line\n\n polygons.primitivePolygonIndices[indexMap.polygonRing++] = indexMap.polygonPosition;\n indexMap.polygonPosition += (end - start) / coordLength;\n }\n\n const endPosition = indexMap.polygonPosition;\n triangulatePolygon(polygons, areas, lines, {startPosition, endPosition, coordLength});\n }\n}\n\n/**\n * Triangulate polygon using earcut\n */\nfunction triangulatePolygon(polygons, areas, lines, {startPosition, endPosition, coordLength}) {\n const start = startPosition * coordLength;\n const end = endPosition * coordLength;\n\n // Extract positions and holes for just this polygon\n const polygonPositions = polygons.positions.subarray(start, end);\n\n // Holes are referenced relative to outer polygon\n const offset = lines[0];\n const holes = lines.slice(1).map((n) => (n - offset) / coordLength);\n\n // Compute triangulation\n const indices = earcut(polygonPositions, holes, coordLength, areas);\n\n // Indices returned by triangulation are relative to start\n // of polygon, so we need to offset\n for (let t = 0, tl = indices.length; t < tl; ++t) {\n polygons.triangles.push(startPosition + indices[t]);\n }\n}\n\n// Wrap each array in an accessor object with value and size keys\nfunction makeAccessorObjects(points, lines, polygons, coordLength) {\n const returnObj = {\n points: {\n ...points,\n positions: {value: points.positions, size: coordLength},\n globalFeatureIds: {value: points.globalFeatureIds, size: 1},\n featureIds: {value: points.featureIds, size: 1}\n },\n lines: {\n ...lines,\n pathIndices: {value: lines.pathIndices, size: 1},\n positions: {value: lines.positions, size: coordLength},\n globalFeatureIds: {value: lines.globalFeatureIds, size: 1},\n featureIds: {value: lines.featureIds, size: 1}\n },\n polygons: {\n ...polygons,\n polygonIndices: {value: polygons.polygonIndices, size: 1},\n primitivePolygonIndices: {value: polygons.primitivePolygonIndices, size: 1},\n positions: {value: polygons.positions, size: coordLength},\n triangles: {value: new Uint32Array(polygons.triangles), size: 1},\n globalFeatureIds: {value: polygons.globalFeatureIds, size: 1},\n featureIds: {value: polygons.featureIds, size: 1}\n }\n };\n\n for (const geomType in returnObj) {\n for (const numericProp in returnObj[geomType].numericProps) {\n returnObj[geomType].numericProps[numericProp] = {\n value: returnObj[geomType].numericProps[numericProp],\n size: 1\n };\n }\n }\n return returnObj;\n}\n\n// Add numeric properties to object\nfunction fillNumericProperties(object, properties, index, length) {\n for (const numericPropName in object.numericProps) {\n if (numericPropName in properties) {\n object.numericProps[numericPropName].fill(properties[numericPropName], index, index + length);\n }\n }\n}\n\n// Keep string properties in object\nfunction keepStringProperties(properties, numericKeys) {\n const props = {};\n for (const key in properties) {\n if (!numericKeys.includes(key)) {\n props[key] = properties[key];\n }\n }\n return props;\n}\n\nfunction isNumeric(x) {\n return Number.isFinite(x);\n}\n","// import {VectorTile} from '@mapbox/vector-tile';\nimport VectorTile from './mapbox-vector-tile/vector-tile';\nimport BinaryVectorTile from './binary-vector-tile/vector-tile';\n\nimport {featuresToBinary} from './binary-vector-tile/features-to-binary';\nimport Protobuf from 'pbf';\n\n/*\n * Parse MVT arrayBuffer and return GeoJSON.\n *\n * @param {arrayBuffer} _ A MVT arrayBuffer\n * @return {?Object} A GeoJSON geometry object or a binary representation\n */\nexport default function parseMVT(arrayBuffer, options) {\n options = normalizeOptions(options);\n\n const binary = options.gis.format === 'binary';\n const features = [];\n const firstPassData = {\n pointPositionsCount: 0,\n pointFeaturesCount: 0,\n linePositionsCount: 0,\n linePathsCount: 0,\n lineFeaturesCount: 0,\n polygonPositionsCount: 0,\n polygonObjectsCount: 0,\n polygonRingsCount: 0,\n polygonFeaturesCount: 0\n };\n\n if (arrayBuffer.byteLength > 0) {\n const tile = binary\n ? new BinaryVectorTile(new Protobuf(arrayBuffer))\n : new VectorTile(new Protobuf(arrayBuffer));\n const loaderOptions = options.mvt;\n\n const selectedLayers = Array.isArray(loaderOptions.layers)\n ? loaderOptions.layers\n : Object.keys(tile.layers);\n\n selectedLayers.forEach((layerName) => {\n const vectorTileLayer = tile.layers[layerName];\n const featureOptions = {...loaderOptions, layerName};\n\n if (!vectorTileLayer) {\n return;\n }\n\n for (let i = 0; i < vectorTileLayer.length; i++) {\n const vectorTileFeature = vectorTileLayer.feature(i, firstPassData);\n\n const decodedFeature = binary\n ? getDecodedFeatureBinary(vectorTileFeature, featureOptions)\n : getDecodedFeature(vectorTileFeature, featureOptions);\n features.push(decodedFeature);\n }\n });\n }\n\n if (binary) {\n const data = featuresToBinary(features, firstPassData, options.gis);\n // Add the original byteLength (as a reasonable approximation of the size of the binary data)\n // TODO decide where to store extra fields like byteLength (header etc) and document\n // @ts-ignore\n data.byteLength = arrayBuffer.byteLength;\n return data;\n }\n\n return features;\n}\n\nfunction normalizeOptions(options) {\n options = {\n ...options,\n mvt: options.mvt || {},\n gis: options.gis || {}\n };\n\n // Validate\n const wgs84Coordinates = options.coordinates === 'wgs84';\n const {tileIndex} = options;\n const hasTileIndex =\n tileIndex &&\n Number.isFinite(tileIndex.x) &&\n Number.isFinite(tileIndex.y) &&\n Number.isFinite(tileIndex.z);\n\n if (wgs84Coordinates && !hasTileIndex) {\n throw new Error('MVT Loader: WGS84 coordinates need tileIndex property. Check documentation.');\n }\n\n return options;\n}\n\nfunction getDecodedFeature(feature, options = {}) {\n const decodedFeature = feature.toGeoJSON(\n options.coordinates === 'wgs84' ? options.tileIndex : transformToLocalCoordinates\n );\n\n // Add layer name to GeoJSON properties\n if (options.layerProperty) {\n decodedFeature.properties[options.layerProperty] = options.layerName;\n }\n\n return decodedFeature;\n}\n\nfunction getDecodedFeatureBinary(feature, options = {}) {\n const decodedFeature = feature.toBinaryCoordinates(\n options.coordinates === 'wgs84' ? options.tileIndex : transformToLocalCoordinatesBinary\n );\n\n // Add layer name to GeoJSON properties\n if (options.layerProperty) {\n decodedFeature.properties[options.layerProperty] = options.layerName;\n }\n\n return decodedFeature;\n}\n\nfunction transformToLocalCoordinates(line, feature) {\n // This function transforms local coordinates in a\n // [0 - bufferSize, this.extent + bufferSize] range to a\n // [0 - (bufferSize / this.extent), 1 + (bufferSize / this.extent)] range.\n // The resulting extent would be 1.\n const {extent} = feature;\n\n for (let i = 0; i < line.length; i++) {\n const p = line[i];\n p[0] /= extent;\n p[1] /= extent;\n }\n}\n\nfunction transformToLocalCoordinatesBinary(data, feature) {\n // For the binary code path, the feature data is just\n // one big flat array, so we just divide each value\n const {extent} = feature;\n for (let i = 0, il = data.length; i < il; ++i) {\n data[i] /= extent;\n }\n}\n","import type {Loader, LoaderWithParser} from '@loaders.gl/loader-utils';\nimport parseMVT from './lib/parse-mvt';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n/**\n * Worker loader for the Mapbox Vector Tile format\n */\nexport const MVTWorkerLoader: Loader = {\n name: 'Mapbox Vector Tile',\n id: 'mvt',\n module: 'mvt',\n version: VERSION,\n // Note: ArcGIS uses '.pbf' extension and 'application/octet-stream'\n extensions: ['mvt', 'pbf'],\n mimeTypes: [\n 'application/vnd.mapbox-vector-tile',\n 'application/x-protobuf'\n // 'application/octet-stream'\n ],\n worker: true,\n category: 'geometry',\n options: {\n mvt: {\n coordinates: 'local',\n layerProperty: 'layerName',\n layers: null,\n tileIndex: null\n }\n }\n};\n\n/**\n * Loader for the Mapbox Vector Tile format\n */\nexport const MVTLoader: LoaderWithParser = {\n ...MVTWorkerLoader,\n parse: async (arrayBuffer, options) => parseMVT(arrayBuffer, options),\n parseSync: parseMVT,\n binary: true\n};\n","import type {\n BinaryGeometry,\n BinaryFeatures,\n BinaryGeometryType,\n BinaryPointFeatures,\n BinaryLineFeatures,\n BinaryPolygonFeatures,\n BinaryAttribute\n} from '@loaders.gl/schema';\nimport type {Feature, Geometry, Position, GeoJsonProperties} from '@loaders.gl/schema';\nimport type {\n Point,\n MultiPoint,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon\n} from '@loaders.gl/schema';\n\n// Note:L We do not handle GeometryCollection, define a limited Geometry type that always has coordinates.\n// type FeatureGeometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon;\n\ntype BinaryToGeoJsonOptions = {\n type?: BinaryGeometryType;\n globalFeatureId?: number;\n};\n\n/**\n * Convert binary geometry representation to GeoJSON\n * @param data geometry data in binary representation\n * @param options\n * @param options.type Input data type: Point, LineString, or Polygon\n * @param options.featureId Global feature id. If specified, only a single feature is extracted\n * @return GeoJSON objects\n */\nexport function binaryToGeojson(\n data: BinaryFeatures,\n options?: BinaryToGeoJsonOptions\n): Feature[] | Feature {\n const globalFeatureId = options?.globalFeatureId;\n if (globalFeatureId !== undefined) {\n return getSingleFeature(data, globalFeatureId);\n }\n return parseFeatures(data, options?.type);\n}\n\n/** @deprecated use `binaryToGeojson` or `binaryToGeometry` instead */\nexport function binaryToGeoJson(\n data: BinaryGeometry | BinaryFeatures,\n type?: BinaryGeometryType,\n format: 'feature' | 'geometry' = 'feature'\n): Geometry | Feature[] {\n switch (format) {\n case 'feature':\n return parseFeatures(data as BinaryFeatures, type);\n case 'geometry':\n return binaryToGeometry(data as BinaryGeometry);\n default:\n throw new Error(format);\n }\n}\n\n/**\n * Return a single feature from a binary geometry representation as GeoJSON\n * @param data geometry data in binary representation\n * @return GeoJSON feature\n */\nfunction getSingleFeature(data: BinaryFeatures, globalFeatureId: number): Feature {\n const dataArray = normalizeInput(data);\n for (const data of dataArray) {\n let lastIndex = 0;\n let lastValue = data.featureIds.value[0];\n\n // Scan through data until we find matching feature\n for (let i = 0; i < data.featureIds.value.length; i++) {\n const currValue = data.featureIds.value[i];\n if (currValue === lastValue) {\n // eslint-disable-next-line no-continue\n continue;\n }\n if (globalFeatureId === data.globalFeatureIds.value[lastIndex]) {\n return parseFeature(data, lastIndex, i);\n }\n lastIndex = i;\n lastValue = currValue;\n }\n\n if (globalFeatureId === data.globalFeatureIds.value[lastIndex]) {\n return parseFeature(data, lastIndex, data.featureIds.value.length);\n }\n }\n\n throw new Error(`featureId:${globalFeatureId} not found`);\n}\n\nfunction parseFeatures(data: BinaryFeatures, type?: BinaryGeometryType): Feature[] {\n const dataArray = normalizeInput(data, type);\n return parseFeatureCollection(dataArray);\n}\n\n/** Parse input binary data and return a valid GeoJSON geometry object */\nexport function binaryToGeometry(\n data: BinaryGeometry,\n startIndex?: number,\n endIndex?: number\n): Geometry {\n switch (data.type) {\n case 'Point':\n return pointToGeoJson(data, startIndex, endIndex);\n case 'LineString':\n return lineStringToGeoJson(data, startIndex, endIndex);\n case 'Polygon':\n return polygonToGeoJson(data, startIndex, endIndex);\n default:\n const unexpectedInput: never = data;\n throw new Error(`Unsupported geometry type: ${(unexpectedInput as any)?.type}`);\n }\n}\n\ntype BinaryFeature = BinaryPointFeatures | BinaryLineFeatures | BinaryPolygonFeatures;\ntype BinaryFeaturesArray = BinaryFeature[];\n\n// Normalize features\n// Return an array of data objects, each of which have a type key\nfunction normalizeInput(data: BinaryFeatures, type?: BinaryGeometryType): BinaryFeaturesArray {\n const isHeterogeneousType = Boolean(data.points || data.lines || data.polygons);\n\n if (!isHeterogeneousType) {\n // @ts-expect-error This is a legacy check which allowed `data` to be an instance of the values\n // here. Aka the new data.points, data.lines, or data.polygons.\n data.type = type || parseType(data);\n return [data] as BinaryFeaturesArray;\n }\n\n const features: BinaryFeaturesArray = [];\n if (data.points) {\n data.points.type = 'Point';\n features.push(data.points);\n }\n if (data.lines) {\n data.lines.type = 'LineString';\n features.push(data.lines);\n }\n if (data.polygons) {\n data.polygons.type = 'Polygon';\n features.push(data.polygons);\n }\n\n return features;\n}\n\n/** Parse input binary data and return an array of GeoJSON Features */\nfunction parseFeatureCollection(dataArray): Feature[] {\n const features: Feature[] = [];\n for (const data of dataArray) {\n if (data.featureIds.value.length === 0) {\n // eslint-disable-next-line no-continue\n continue;\n }\n let lastIndex = 0;\n let lastValue = data.featureIds.value[0];\n\n // Need to deduce start, end indices of each feature\n for (let i = 0; i < data.featureIds.value.length; i++) {\n const currValue = data.featureIds.value[i];\n if (currValue === lastValue) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n features.push(parseFeature(data, lastIndex, i));\n lastIndex = i;\n lastValue = currValue;\n }\n\n // Last feature\n features.push(parseFeature(data, lastIndex, data.featureIds.value.length));\n }\n return features;\n}\n\n/** Parse input binary data and return a single GeoJSON Feature */\nfunction parseFeature(data, startIndex?: number, endIndex?: number): Feature {\n const geometry = binaryToGeometry(data, startIndex, endIndex);\n const properties = parseProperties(data, startIndex, endIndex);\n const fields = parseFields(data, startIndex, endIndex);\n return {type: 'Feature', geometry, properties, ...fields};\n}\n\n/** Parse input binary data and return an object of fields */\nfunction parseFields(data, startIndex: number = 0, endIndex?: number): GeoJsonProperties {\n return data.fields && data.fields[data.featureIds.value[startIndex]];\n}\n\n/** Parse input binary data and return an object of properties */\nfunction parseProperties(data, startIndex: number = 0, endIndex?: number): GeoJsonProperties {\n const properties = Object.assign({}, data.properties[data.featureIds.value[startIndex]]);\n for (const key in data.numericProps) {\n properties[key] = data.numericProps[key].value[startIndex];\n }\n return properties;\n}\n\n/** Parse binary data of type Polygon */\nfunction polygonToGeoJson(\n data,\n startIndex: number = -Infinity,\n endIndex: number = Infinity\n): Polygon | MultiPolygon {\n const {positions} = data;\n const polygonIndices = data.polygonIndices.value.filter((x) => x >= startIndex && x <= endIndex);\n const primitivePolygonIndices = data.primitivePolygonIndices.value.filter(\n (x) => x >= startIndex && x <= endIndex\n );\n const multi = polygonIndices.length > 2;\n\n // Polygon\n if (!multi) {\n const coordinates: Position[][] = [];\n for (let i = 0; i < primitivePolygonIndices.length - 1; i++) {\n const startRingIndex = primitivePolygonIndices[i];\n const endRingIndex = primitivePolygonIndices[i + 1];\n const ringCoordinates = ringToGeoJson(positions, startRingIndex, endRingIndex);\n coordinates.push(ringCoordinates);\n }\n\n return {type: 'Polygon', coordinates};\n }\n\n // MultiPolygon\n const coordinates: Position[][][] = [];\n for (let i = 0; i < polygonIndices.length - 1; i++) {\n const startPolygonIndex = polygonIndices[i];\n const endPolygonIndex = polygonIndices[i + 1];\n const polygonCoordinates = polygonToGeoJson(\n data,\n startPolygonIndex,\n endPolygonIndex\n ).coordinates;\n coordinates.push(polygonCoordinates as Position[][]);\n }\n\n return {type: 'MultiPolygon', coordinates};\n}\n\n/** Parse binary data of type LineString */\nfunction lineStringToGeoJson(\n data,\n startIndex: number = -Infinity,\n endIndex: number = Infinity\n): LineString | MultiLineString {\n const {positions} = data;\n const pathIndices = data.pathIndices.value.filter((x) => x >= startIndex && x <= endIndex);\n const multi = pathIndices.length > 2;\n\n if (!multi) {\n const coordinates = ringToGeoJson(positions, pathIndices[0], pathIndices[1]);\n return {type: 'LineString', coordinates};\n }\n\n const coordinates: Position[][] = [];\n for (let i = 0; i < pathIndices.length - 1; i++) {\n const ringCoordinates = ringToGeoJson(positions, pathIndices[i], pathIndices[i + 1]);\n coordinates.push(ringCoordinates);\n }\n\n return {type: 'MultiLineString', coordinates};\n}\n\n/** Parse binary data of type Point */\nfunction pointToGeoJson(data, startIndex, endIndex): Point | MultiPoint {\n const {positions} = data;\n const coordinates = ringToGeoJson(positions, startIndex, endIndex);\n const multi = coordinates.length > 1;\n\n if (multi) {\n return {type: 'MultiPoint', coordinates};\n }\n\n return {type: 'Point', coordinates: coordinates[0]};\n}\n\n/**\n * Parse a linear ring of positions to a GeoJSON linear ring\n *\n * @param positions Positions TypedArray\n * @param startIndex Start index to include in ring\n * @param endIndex End index to include in ring\n * @returns GeoJSON ring\n */\nfunction ringToGeoJson(\n positions: BinaryAttribute,\n startIndex?: number,\n endIndex?: number\n): Position[] {\n startIndex = startIndex || 0;\n endIndex = endIndex || positions.value.length / positions.size;\n\n const ringCoordinates: Position[] = [];\n for (let j = startIndex; j < endIndex; j++) {\n const coord = Array<number>();\n for (let k = j * positions.size; k < (j + 1) * positions.size; k++) {\n coord.push(Number(positions.value[k]));\n }\n ringCoordinates.push(coord);\n }\n return ringCoordinates;\n}\n\n// Deduce geometry type of data object\nfunction parseType(data) {\n if (data.pathIndices) {\n return 'LineString';\n }\n\n if (data.polygonIndices) {\n return 'Polygon';\n }\n\n return 'Point';\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {LayerExtension} from '@deck.gl/core';\n\nconst defaultProps = {\n clipBounds: [0, 0, 1, 1]\n};\n\nconst shaderFunction = `\nuniform vec4 clip_bounds;\n\nbool clip_isInBounds(vec2 position) {\n return position.x >= clip_bounds[0] && position.y >= clip_bounds[1] && position.x < clip_bounds[2] && position.y < clip_bounds[3];\n}\n`;\n\n/*\n * The vertex-shader version clips geometries by their anchor position\n * e.g. ScatterplotLayer - show if the center of a circle is within bounds\n */\nconst shaderModuleVs = {\n name: 'clip-vs',\n vs: shaderFunction\n};\n\nconst injectionVs = {\n 'vs:#decl': `\nvarying float clip_isVisible;\n`,\n 'vs:DECKGL_FILTER_GL_POSITION': `\n clip_isVisible = float(clip_isInBounds(geometry.worldPosition.xy));\n`,\n 'fs:#decl': `\nvarying float clip_isVisible;\n`,\n 'fs:DECKGL_FILTER_COLOR': `\n if (clip_isVisible < 0.5) discard;\n`\n};\n\n/*\n * The fragment-shader version clips pixels at the bounds\n * e.g. PolygonLayer - show the part of the polygon that intersect with the bounds \n */\nconst shaderModuleFs = {\n name: 'clip-fs',\n fs: shaderFunction\n};\n\nconst injectionFs = {\n 'vs:#decl': `\nvarying vec2 clip_commonPosition;\n`,\n 'vs:DECKGL_FILTER_GL_POSITION': `\n clip_commonPosition = geometry.position.xy;\n`,\n 'fs:#decl': `\nvarying vec2 clip_commonPosition;\n`,\n 'fs:DECKGL_FILTER_COLOR': `\n if (!clip_isInBounds(clip_commonPosition)) discard;\n`\n};\n\nexport default class ClipExtension extends LayerExtension {\n getShaders() {\n // If `clipByInstance: true`, the entire object is shown/hidden based on its anchor position (done by vertex shader)\n // Otherwise, the object is trimmed by the clip bounds (done by fragment shader)\n\n // Default behavior: consider a layer instanced if it has attribute `instancePositions`\n let clipByInstance = 'instancePositions' in this.getAttributeManager().attributes;\n // Users can override by setting the `clipByInstance` prop\n if ('clipByInstance' in this.props) {\n clipByInstance = this.props.clipByInstance;\n }\n this.state.clipByInstance = clipByInstance;\n\n return clipByInstance\n ? {\n modules: [shaderModuleVs],\n inject: injectionVs\n }\n : {\n modules: [shaderModuleFs],\n inject: injectionFs\n };\n }\n\n draw({uniforms}) {\n const {clipBounds = defaultProps.clipBounds} = this.props;\n if (this.state.clipByInstance) {\n uniforms.clip_bounds = clipBounds;\n } else {\n const corner0 = this.projectPosition([clipBounds[0], clipBounds[1], 0]);\n const corner1 = this.projectPosition([clipBounds[2], clipBounds[3], 0]);\n\n uniforms.clip_bounds = [\n Math.min(corner0[0], corner1[0]),\n Math.min(corner0[1], corner1[1]),\n Math.max(corner0[0], corner1[0]),\n Math.max(corner0[1], corner1[1])\n ];\n }\n }\n}\n\nClipExtension.extensionName = 'ClipExtension';\nClipExtension.defaultProps = defaultProps;\n","import {lerp} from 'math.gl';\n\nconst availableTransformations = {\n Point,\n MultiPoint,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon\n};\n\nfunction Point([pointX, pointY], [nw, se], viewport) {\n const x = lerp(nw[0], se[0], pointX);\n const y = lerp(nw[1], se[1], pointY);\n\n return viewport.unprojectFlat([x, y]);\n}\n\nfunction getPoints(geometry, bbox, viewport) {\n return geometry.map(g => Point(g, bbox, viewport));\n}\n\nfunction MultiPoint(multiPoint, bbox, viewport) {\n return getPoints(multiPoint, bbox, viewport);\n}\n\nfunction LineString(line, bbox, viewport) {\n return getPoints(line, bbox, viewport);\n}\n\nfunction MultiLineString(multiLineString, bbox, viewport) {\n return multiLineString.map(lineString => LineString(lineString, bbox, viewport));\n}\n\nfunction Polygon(polygon, bbox, viewport) {\n return polygon.map(polygonRing => getPoints(polygonRing, bbox, viewport));\n}\n\nfunction MultiPolygon(multiPolygon, bbox, viewport) {\n return multiPolygon.map(polygon => Polygon(polygon, bbox, viewport));\n}\n\nexport function transform(geometry, bbox, viewport) {\n const nw = viewport.projectFlat([bbox.west, bbox.north]);\n const se = viewport.projectFlat([bbox.east, bbox.south]);\n const projectedBbox = [nw, se];\n\n return {\n ...geometry,\n coordinates: availableTransformations[geometry.type](\n geometry.coordinates,\n projectedBbox,\n viewport\n )\n };\n}\n","const GEOM_TYPES = ['points', 'lines', 'polygons'];\n/**\n * Return the index of feature (numericProps or featureIds) for given feature id\n * Example: findIndexBinary(data, 'id', 33) will return the index in the array of numericProps\n * of the feature 33.\n * @param {Object} data - The data in binary format\n * @param {String} uniqueIdProperty - Name of the unique id property\n * @param {Number|String} featureId - feature id to find\n * @param {String} layerName - the layer to search in\n */\nexport default function findIndexBinary(data, uniqueIdProperty, featureId, layerName) {\n for (const gt of GEOM_TYPES) {\n const index = data[gt] && findIndexByType(data[gt], uniqueIdProperty, featureId, layerName);\n if (index >= 0) {\n return index;\n }\n }\n\n return -1;\n}\n\nfunction findIndexByType(geomData, uniqueIdProperty, featureId, layerName) {\n const featureIds = geomData.featureIds.value;\n\n if (!featureIds.length) {\n return -1;\n }\n\n let startFeatureIndex = 0;\n let endFeatureIndex = featureIds[featureIds.length - 1] + 1;\n if (layerName) {\n const layerRange = getLayerRange(geomData, layerName);\n if (layerRange) {\n startFeatureIndex = layerRange[0];\n endFeatureIndex = layerRange[1] + 1;\n } else {\n return -1;\n }\n }\n\n // Look for the uniqueIdProperty\n let featureIndex = -1;\n if (uniqueIdProperty in geomData.numericProps) {\n const vertexIndex = geomData.numericProps[uniqueIdProperty].value.findIndex(\n (x, i) =>\n x === featureId && featureIds[i] >= startFeatureIndex && featureIds[i] < endFeatureIndex\n );\n return vertexIndex >= 0 ? geomData.globalFeatureIds.value[vertexIndex] : -1;\n } else if (uniqueIdProperty) {\n featureIndex = findIndex(\n geomData.properties,\n elem => elem[uniqueIdProperty] === featureId,\n startFeatureIndex,\n endFeatureIndex\n );\n } else {\n featureIndex = findIndex(\n geomData.fields,\n elem => elem.id === featureId,\n startFeatureIndex,\n endFeatureIndex\n );\n }\n return featureIndex >= 0 ? getGlobalFeatureId(geomData, featureIndex) : -1;\n}\n\n// Returns [firstFeatureIndex, lastFeatureIndex]\n// MVTLoader parses tiles layer-by-layer, so each layer is a continuous range\nfunction getLayerRange(geomData, layerName) {\n if (!geomData.__layers) {\n // Cache a map from properties.layerName to index ranges\n const layerNames = {};\n const {properties} = geomData;\n for (let i = 0; i < properties.length; i++) {\n const {layerName: key} = properties[i];\n if (!key) {\n // ignore\n } else if (layerNames[key]) {\n layerNames[key][1] = i;\n } else {\n layerNames[key] = [i, i];\n }\n }\n geomData.__layers = layerNames;\n }\n return geomData.__layers[layerName];\n}\n\n// Returns global feature id\nfunction getGlobalFeatureId(geomData, featureIndex) {\n if (!geomData.__ids) {\n // Cache a map from featureId to globalFeatureId\n const result = [];\n const featureIds = geomData.featureIds.value;\n const globalFeatureIds = geomData.globalFeatureIds.value;\n for (let i = 0; i < featureIds.length; i++) {\n result[featureIds[i]] = globalFeatureIds[i];\n }\n geomData.__ids = result;\n }\n return geomData.__ids[featureIndex];\n}\n\n// Like array.findIndex, but only search within a range\nfunction findIndex(array, predicate, startIndex, endIndex) {\n for (let i = startIndex; i < endIndex; i++) {\n if (predicate(array[i], i)) {\n return i;\n }\n }\n return -1;\n}\n","import {log} from '@deck.gl/core';\nimport {Matrix4} from 'math.gl';\nimport {MVTWorkerLoader} from '@loaders.gl/mvt';\nimport {binaryToGeojson} from '@loaders.gl/gis';\nimport {COORDINATE_SYSTEM} from '@deck.gl/core';\nimport {ClipExtension} from '@deck.gl/extensions';\n\nimport TileLayer from '../tile-layer/tile-layer';\nimport {getURLFromTemplate, isURLTemplate} from '../tile-layer/utils';\nimport {transform} from './coordinate-transform';\nimport findIndexBinary from './find-index-binary';\n\nimport {GeoJsonLayer} from '@deck.gl/layers';\n\nconst WORLD_SIZE = 512;\n\nconst defaultProps = {\n uniqueIdProperty: {type: 'string', value: ''},\n highlightedFeatureId: null,\n loaders: [MVTWorkerLoader],\n binary: true\n};\n\nexport default class MVTLayer extends TileLayer {\n initializeState() {\n super.initializeState();\n this.setState({\n data: null,\n tileJSON: null\n });\n }\n\n get isLoaded() {\n return this.state.data && this.state.tileset && super.isLoaded;\n }\n\n updateState({props, oldProps, context, changeFlags}) {\n if (changeFlags.dataChanged) {\n this._updateTileData();\n }\n\n if (this.state.data) {\n super.updateState({props, oldProps, context, changeFlags});\n this._setWGS84PropertyForTiles();\n }\n }\n\n /* eslint-disable complexity */\n async _updateTileData() {\n let {data} = this.props;\n let tileJSON = null;\n\n if (typeof data === 'string' && !isURLTemplate(data)) {\n const {onDataLoad, fetch} = this.props;\n this.setState({data: null, tileJSON: null});\n try {\n tileJSON = await fetch(data, {propName: 'data', layer: this, loaders: []});\n } catch (error) {\n this.raiseError(error, 'loading TileJSON');\n data = null;\n }\n\n if (onDataLoad) {\n onDataLoad(tileJSON);\n }\n } else if (data.tilejson) {\n tileJSON = data;\n }\n\n if (tileJSON) {\n data = tileJSON.tiles;\n }\n\n this.setState({data, tileJSON});\n }\n\n _getTilesetOptions(props) {\n const opts = super._getTilesetOptions(props);\n const {tileJSON} = this.state;\n\n if (tileJSON) {\n if (Number.isFinite(tileJSON.minzoom) && tileJSON.minzoom > props.minZoom) {\n opts.minZoom = tileJSON.minzoom;\n }\n\n if (\n Number.isFinite(tileJSON.maxzoom) &&\n (!Number.isFinite(props.maxZoom) || tileJSON.maxzoom < props.maxZoom)\n ) {\n opts.maxZoom = tileJSON.maxzoom;\n }\n }\n return opts;\n }\n\n /* eslint-disable complexity */\n\n renderLayers() {\n if (!this.state.data) return null;\n return super.renderLayers();\n }\n\n getTileData(tile) {\n const url = getURLFromTemplate(this.state.data, tile);\n if (!url) {\n return Promise.reject('Invalid URL');\n }\n let loadOptions = this.getLoadOptions();\n const {binary, fetch} = this.props;\n const {signal, x, y, z} = tile;\n loadOptions = {\n ...loadOptions,\n mimeType: 'application/x-protobuf',\n mvt: {\n ...loadOptions?.mvt,\n coordinates: this.context.viewport.resolution ? 'wgs84' : 'local',\n tileIndex: {x, y, z}\n // Local worker debug\n // workerUrl: `modules/mvt/dist/mvt-loader.worker.js`\n // Set worker to null to skip web workers\n // workerUrl: null\n },\n gis: binary ? {format: 'binary'} : {}\n };\n return fetch(url, {propName: 'data', layer: this, loadOptions, signal});\n }\n\n renderSubLayers(props) {\n const {tile} = props;\n const worldScale = Math.pow(2, tile.z);\n\n const xScale = WORLD_SIZE / worldScale;\n const yScale = -xScale;\n\n const xOffset = (WORLD_SIZE * tile.x) / worldScale;\n const yOffset = WORLD_SIZE * (1 - tile.y / worldScale);\n\n const modelMatrix = new Matrix4().scale([xScale, yScale, 1]);\n\n props.autoHighlight = false;\n\n if (!this.context.viewport.resolution) {\n props.modelMatrix = modelMatrix;\n props.coordinateOrigin = [xOffset, yOffset, 0];\n props.coordinateSystem = COORDINATE_SYSTEM.CARTESIAN;\n props.extensions = [...(props.extensions || []), new ClipExtension()];\n }\n\n const subLayers = super.renderSubLayers(props);\n\n if (this.props.binary && !(subLayers instanceof GeoJsonLayer)) {\n log.warn('renderSubLayers() must return GeoJsonLayer when using binary:true')();\n }\n\n return subLayers;\n }\n\n _updateAutoHighlight(info) {\n const {uniqueIdProperty} = this.props;\n\n const {hoveredFeatureId, hoveredFeatureLayerName} = this.state;\n const hoveredFeature = info.object;\n let newHoveredFeatureId;\n let newHoveredFeatureLayerName;\n\n if (hoveredFeature) {\n newHoveredFeatureId = getFeatureUniqueId(hoveredFeature, uniqueIdProperty);\n newHoveredFeatureLayerName = getFeatureLayerName(hoveredFeature);\n }\n\n if (\n hoveredFeatureId !== newHoveredFeatureId ||\n hoveredFeatureLayerName !== newHoveredFeatureLayerName\n ) {\n this.setState({\n hoveredFeatureId: newHoveredFeatureId,\n hoveredFeatureLayerName: newHoveredFeatureLayerName\n });\n }\n }\n\n getPickingInfo(params) {\n const info = super.getPickingInfo(params);\n\n const isWGS84 = this.context.viewport.resolution;\n\n if (this.props.binary && info.index !== -1) {\n const {data} = params.sourceLayer.props;\n info.object = binaryToGeojson(data, {globalFeatureId: info.index});\n }\n if (info.object && !isWGS84) {\n info.object = transformTileCoordsToWGS84(info.object, info.tile.bbox, this.context.viewport);\n }\n\n return info;\n }\n\n getHighlightedObjectIndex(tile) {\n const {hoveredFeatureId, hoveredFeatureLayerName} = this.state;\n const {uniqueIdProperty, highlightedFeatureId, binary} = this.props;\n const data = tile.content;\n\n const isHighlighted = isFeatureIdDefined(highlightedFeatureId);\n const isFeatureIdPresent = isFeatureIdDefined(hoveredFeatureId) || isHighlighted;\n\n if (!isFeatureIdPresent) {\n return -1;\n }\n\n const featureIdToHighlight = isHighlighted ? highlightedFeatureId : hoveredFeatureId;\n\n // Iterable data\n if (Array.isArray(data)) {\n return data.findIndex(feature => {\n const isMatchingId = getFeatureUniqueId(feature, uniqueIdProperty) === featureIdToHighlight;\n const isMatchingLayer =\n isHighlighted || getFeatureLayerName(feature) === hoveredFeatureLayerName;\n return isMatchingId && isMatchingLayer;\n });\n\n // Non-iterable data\n } else if (data && binary) {\n // Get the feature index of the selected item to highlight\n return findIndexBinary(\n data,\n uniqueIdProperty,\n featureIdToHighlight,\n isHighlighted ? '' : hoveredFeatureLayerName\n );\n }\n\n return -1;\n }\n\n _pickObjects(maxObjects) {\n const {deck, viewport} = this.context;\n const width = viewport.width;\n const height = viewport.height;\n const x = viewport.x;\n const y = viewport.y;\n const layerIds = [this.id];\n return deck.pickObjects({x, y, width, height, layerIds, maxObjects});\n }\n\n getRenderedFeatures(maxFeatures = null) {\n const features = this._pickObjects(maxFeatures);\n const featureCache = new Set();\n const renderedFeatures = [];\n\n for (const f of features) {\n const featureId = getFeatureUniqueId(f.object, this.props.uniqueIdProperty);\n\n if (featureId === undefined) {\n // we have no id for the feature, we just add to the list\n renderedFeatures.push(f.object);\n } else if (!featureCache.has(featureId)) {\n // Add removing duplicates\n featureCache.add(featureId);\n renderedFeatures.push(f.object);\n }\n }\n\n return renderedFeatures;\n }\n\n _setWGS84PropertyForTiles() {\n const propName = 'dataInWGS84';\n const {tileset} = this.state;\n\n tileset.selectedTiles.forEach(tile => {\n if (!tile.hasOwnProperty(propName)) {\n // eslint-disable-next-line accessor-pairs\n Object.defineProperty(tile, propName, {\n get: () => {\n // Still loading or encountered an error\n if (!tile.content) {\n return null;\n }\n\n if (this.props.binary && Array.isArray(tile.content) && !tile.content.length) {\n // TODO: @loaders.gl/mvt returns [] when no content. It should return a valid empty binary.\n // https://github.com/visgl/loaders.gl/pull/1137\n return [];\n }\n\n if (tile._contentWGS84 === undefined) {\n // Create a cache to transform only once\n const content = this.props.binary ? binaryToGeojson(tile.content) : tile.content;\n tile._contentWGS84 = content.map(feature =>\n transformTileCoordsToWGS84(feature, tile.bbox, this.context.viewport)\n );\n }\n return tile._contentWGS84;\n }\n });\n }\n });\n }\n}\n\nfunction getFeatureUniqueId(feature, uniqueIdProperty) {\n if (uniqueIdProperty) {\n return feature.properties[uniqueIdProperty];\n }\n\n if ('id' in feature) {\n return feature.id;\n }\n\n return undefined;\n}\n\nfunction getFeatureLayerName(feature) {\n return feature.properties?.layerName || null;\n}\n\nfunction isFeatureIdDefined(value) {\n return value !== undefined && value !== null && value !== '';\n}\n\nfunction transformTileCoordsToWGS84(object, bbox, viewport) {\n const feature = {\n ...object,\n geometry: {\n type: object.geometry.type\n }\n };\n\n // eslint-disable-next-line accessor-pairs\n Object.defineProperty(feature.geometry, 'coordinates', {\n get: () => {\n const wgs84Geom = transform(object.geometry, bbox, viewport);\n return wgs84Geom.coordinates;\n }\n });\n\n return feature;\n}\n\nMVTLayer.layerName = 'MVTLayer';\nMVTLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {deepEqual} from '../utils/deep-equal';\nimport log from '../utils/log';\nimport {flatten} from '../utils/flatten';\n\nexport default class ViewManager {\n constructor(props = {}) {\n // List of view descriptors, gets re-evaluated when width/height changes\n this.views = [];\n this.width = 100;\n this.height = 100;\n this.viewState = {};\n this.controllers = {};\n this.timeline = props.timeline;\n\n this._viewports = []; // Generated viewports\n this._viewportMap = {};\n this._isUpdating = false;\n this._needsRedraw = 'Initial render';\n this._needsUpdate = true;\n\n this._eventManager = props.eventManager;\n this._eventCallbacks = {\n onViewStateChange: props.onViewStateChange,\n onInteractionStateChange: props.onInteractionStateChange\n };\n\n Object.seal(this);\n\n // Init with default map viewport\n this.setProps(props);\n }\n\n finalize() {\n for (const key in this.controllers) {\n if (this.controllers[key]) {\n this.controllers[key].finalize();\n }\n }\n this.controllers = {};\n }\n\n // Check if a redraw is needed\n needsRedraw(opts = {clearRedrawFlags: false}) {\n const redraw = this._needsRedraw;\n if (opts.clearRedrawFlags) {\n this._needsRedraw = false;\n }\n return redraw;\n }\n\n // Layers will be updated deeply (in next animation frame)\n // Potentially regenerating attributes and sub layers\n setNeedsUpdate(reason) {\n this._needsUpdate = this._needsUpdate || reason;\n this._needsRedraw = this._needsRedraw || reason;\n }\n\n // Checks each viewport for transition updates\n updateViewStates() {\n for (const viewId in this.controllers) {\n const controller = this.controllers[viewId];\n if (controller) {\n controller.updateTransition();\n }\n }\n }\n\n /** Get a set of viewports for a given width and height\n * TODO - Intention is for deck.gl to autodeduce width and height and drop the need for props\n * @param rect (object, optional) - filter the viewports\n * + not provided - return all viewports\n * + {x, y} - only return viewports that contain this pixel\n * + {x, y, width, height} - only return viewports that overlap with this rectangle\n */\n getViewports(rect) {\n if (rect) {\n return this._viewports.filter(viewport => viewport.containsPixel(rect));\n }\n return this._viewports;\n }\n\n getViews() {\n const viewMap = {};\n this.views.forEach(view => {\n viewMap[view.id] = view;\n });\n return viewMap;\n }\n\n // Resolves a viewId string to a View, if already a View returns it.\n getView(viewOrViewId) {\n return typeof viewOrViewId === 'string'\n ? this.views.find(view => view.id === viewOrViewId)\n : viewOrViewId;\n }\n\n // Returns the viewState for a specific viewId. Matches the viewState by\n // 1. view.viewStateId\n // 2. view.id\n // 3. root viewState\n // then applies the view's filter if any\n getViewState(viewId) {\n const view = this.getView(viewId);\n // Backward compatibility: view state for single view\n const viewState = (view && this.viewState[view.getViewStateId()]) || this.viewState;\n return view ? view.filterViewState(viewState) : viewState;\n }\n\n getViewport(viewId) {\n return this._viewportMap[viewId];\n }\n\n /**\n * Unproject pixel coordinates on screen onto world coordinates,\n * (possibly [lon, lat]) on map.\n * - [x, y] => [lng, lat]\n * - [x, y, z] => [lng, lat, Z]\n * @param {Array} xyz -\n * @param {Object} opts - options\n * @param {Object} opts.topLeft=true - Whether origin is top left\n * @return {Array|null} - [lng, lat, Z] or [X, Y, Z]\n */\n unproject(xyz, opts) {\n const viewports = this.getViewports();\n const pixel = {x: xyz[0], y: xyz[1]};\n for (let i = viewports.length - 1; i >= 0; --i) {\n const viewport = viewports[i];\n if (viewport.containsPixel(pixel)) {\n const p = xyz.slice();\n p[0] -= viewport.x;\n p[1] -= viewport.y;\n return viewport.unproject(p, opts);\n }\n }\n return null;\n }\n\n setProps(props) {\n if ('views' in props) {\n this._setViews(props.views);\n }\n\n // TODO - support multiple view states\n if ('viewState' in props) {\n this._setViewState(props.viewState);\n }\n\n if ('width' in props || 'height' in props) {\n this._setSize(props.width, props.height);\n }\n\n // Important: avoid invoking _update() inside itself\n // Nested updates result in unexpected side effects inside _rebuildViewports()\n // when using auto control in pure-js\n if (!this._isUpdating) {\n this._update();\n }\n }\n\n _update() {\n this._isUpdating = true;\n\n // Only rebuild viewports if the update flag is set\n if (this._needsUpdate) {\n this._needsUpdate = false;\n this._rebuildViewports();\n }\n\n // If viewport transition(s) are triggered during viewports update, controller(s)\n // will immediately call `onViewStateChange` which calls `viewManager.setProps` again.\n if (this._needsUpdate) {\n this._needsUpdate = false;\n this._rebuildViewports();\n }\n\n this._isUpdating = false;\n }\n\n _setSize(width, height) {\n if (width !== this.width || height !== this.height) {\n this.width = width;\n this.height = height;\n this.setNeedsUpdate('Size changed');\n }\n }\n\n // Update the view descriptor list and set change flag if needed\n // Does not actually rebuild the `Viewport`s until `getViewports` is called\n _setViews(views) {\n views = flatten(views, Boolean);\n\n const viewsChanged = this._diffViews(views, this.views);\n if (viewsChanged) {\n this.setNeedsUpdate('views changed');\n }\n\n this.views = views;\n }\n\n _setViewState(viewState) {\n if (viewState) {\n const viewStateChanged = !deepEqual(viewState, this.viewState);\n\n if (viewStateChanged) {\n this.setNeedsUpdate('viewState changed');\n }\n\n this.viewState = viewState;\n } else {\n log.warn('missing `viewState` or `initialViewState`')();\n }\n }\n\n //\n // PRIVATE METHODS\n //\n\n _onViewStateChange(viewId, event) {\n event.viewId = viewId;\n if (this._eventCallbacks.onViewStateChange) {\n this._eventCallbacks.onViewStateChange(event);\n }\n }\n\n _createController(view, props) {\n const Controller = props.type;\n\n const controller = new Controller({\n timeline: this.timeline,\n eventManager: this._eventManager,\n // Set an internal callback that calls the prop callback if provided\n onViewStateChange: this._onViewStateChange.bind(this, props.id),\n onStateChange: this._eventCallbacks.onInteractionStateChange,\n makeViewport: viewState =>\n view._getViewport(viewState, {\n width: viewState.width,\n height: viewState.height\n }),\n ...props\n });\n\n return controller;\n }\n\n _updateController(view, viewState, viewport, controller) {\n let controllerProps = view.controller;\n if (controllerProps) {\n controllerProps = {\n ...viewState,\n ...view.props,\n ...controllerProps,\n id: view.id,\n x: viewport.x,\n y: viewport.y,\n width: viewport.width,\n height: viewport.height\n };\n\n // TODO - check if view / controller type has changed, and replace the controller\n if (controller) {\n controller.setProps(controllerProps);\n } else {\n controller = this._createController(view, controllerProps);\n }\n return controller;\n }\n return null;\n }\n\n // Rebuilds viewports from descriptors towards a certain window size\n _rebuildViewports() {\n const {width, height, views} = this;\n\n const oldControllers = this.controllers;\n this._viewports = [];\n this.controllers = {};\n\n let invalidateControllers = false;\n // Create controllers in reverse order, so that views on top receive events first\n for (let i = views.length; i--; ) {\n const view = views[i];\n const viewState = this.getViewState(view);\n const viewport = view.makeViewport({width, height, viewState});\n\n let oldController = oldControllers[view.id];\n if (view.controller && !oldController) {\n // When a new controller is added, invalidate all controllers below it so that\n // events are registered in the correct order\n invalidateControllers = true;\n }\n if ((invalidateControllers || !view.controller) && oldController) {\n // Remove and reattach invalidated controller\n oldController.finalize();\n oldController = null;\n }\n\n // Update the controller\n this.controllers[view.id] = this._updateController(view, viewState, viewport, oldController);\n\n this._viewports.unshift(viewport);\n }\n\n // Remove unused controllers\n for (const id in oldControllers) {\n if (oldControllers[id] && !this.controllers[id]) {\n oldControllers[id].finalize();\n }\n }\n\n this._buildViewportMap();\n }\n\n _buildViewportMap() {\n // Build a view id to view index\n this._viewportMap = {};\n this._viewports.forEach(viewport => {\n if (viewport.id) {\n // TODO - issue warning if multiple viewports use same id\n this._viewportMap[viewport.id] = this._viewportMap[viewport.id] || viewport;\n }\n });\n }\n\n // Check if viewport array has changed, returns true if any change\n // Note that descriptors can be the same\n _diffViews(newViews, oldViews) {\n if (newViews.length !== oldViews.length) {\n return true;\n }\n\n return newViews.some((_, i) => !newViews[i].equals(oldViews[i]));\n }\n}\n","import {deepEqual} from '../utils/deep-equal';\nimport {default as LightingEffect} from '../effects/lighting/lighting-effect';\n\nconst DEFAULT_LIGHTING_EFFECT = new LightingEffect();\n\nexport default class EffectManager {\n constructor() {\n this.effects = [];\n this._internalEffects = [];\n this._needsRedraw = 'Initial render';\n this.setEffects();\n }\n\n setProps(props) {\n if ('effects' in props) {\n if (props.effects.length !== this.effects.length || !deepEqual(props.effects, this.effects)) {\n this.setEffects(props.effects);\n this._needsRedraw = 'effects changed';\n }\n }\n }\n\n needsRedraw(opts = {clearRedrawFlags: false}) {\n const redraw = this._needsRedraw;\n if (opts.clearRedrawFlags) {\n this._needsRedraw = false;\n }\n return redraw;\n }\n\n getEffects() {\n return this._internalEffects;\n }\n\n finalize() {\n this.cleanup();\n }\n\n // Private\n setEffects(effects = []) {\n this.cleanup();\n this.effects = effects;\n this._createInternalEffects();\n }\n\n cleanup() {\n for (const effect of this.effects) {\n effect.cleanup();\n }\n\n for (const effect of this._internalEffects) {\n effect.cleanup();\n }\n this.effects.length = 0;\n this._internalEffects.length = 0;\n }\n\n _createInternalEffects() {\n this._internalEffects = this.effects.slice();\n if (!this.effects.some(effect => effect instanceof LightingEffect)) {\n this._internalEffects.push(DEFAULT_LIGHTING_EFFECT);\n }\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport log from '../../utils/log';\n\nconst NO_PICKED_OBJECT = {\n pickedColor: null,\n pickedLayer: null,\n pickedObjectIndex: -1\n};\n\n/* eslint-disable max-depth, max-statements */\n/**\n * Pick at a specified pixel with a tolerance radius\n * Returns the closest object to the pixel in shape `{pickedColor, pickedLayer, pickedObjectIndex}`\n */\nexport function getClosestObject({\n pickedColors,\n decodePickingColor,\n deviceX,\n deviceY,\n deviceRadius,\n deviceRect\n}) {\n if (pickedColors) {\n // Traverse all pixels in picking results and find the one closest to the supplied\n // [deviceX, deviceY]\n const {x, y, width, height} = deviceRect;\n let minSquareDistanceToCenter = deviceRadius * deviceRadius;\n let closestPixelIndex = -1;\n let i = 0;\n\n for (let row = 0; row < height; row++) {\n const dy = row + y - deviceY;\n const dy2 = dy * dy;\n\n if (dy2 > minSquareDistanceToCenter) {\n // skip this row\n i += 4 * width;\n } else {\n for (let col = 0; col < width; col++) {\n // Decode picked layer from color\n const pickedLayerIndex = pickedColors[i + 3] - 1;\n\n if (pickedLayerIndex >= 0) {\n const dx = col + x - deviceX;\n const d2 = dx * dx + dy2;\n\n if (d2 <= minSquareDistanceToCenter) {\n minSquareDistanceToCenter = d2;\n closestPixelIndex = i;\n }\n }\n i += 4;\n }\n }\n }\n\n if (closestPixelIndex >= 0) {\n // Decode picked object index from color\n const pickedColor = pickedColors.slice(closestPixelIndex, closestPixelIndex + 4);\n const pickedObject = decodePickingColor(pickedColor);\n if (pickedObject) {\n const dy = Math.floor(closestPixelIndex / 4 / width);\n const dx = closestPixelIndex / 4 - dy * width;\n return {\n ...pickedObject,\n pickedColor,\n pickedX: x + dx,\n pickedY: y + dy\n };\n }\n log.error('Picked non-existent layer. Is picking buffer corrupt?')();\n }\n }\n return NO_PICKED_OBJECT;\n}\n\n/**\n * Examines a picking buffer for unique colors\n * Returns array of unique objects in shape `{x, y, pickedColor, pickedLayer, pickedObjectIndex}`\n */\nexport function getUniqueObjects({pickedColors, decodePickingColor}) {\n const uniqueColors = new Map();\n\n // Traverse all pixels in picking results and get unique colors\n if (pickedColors) {\n for (let i = 0; i < pickedColors.length; i += 4) {\n // Decode picked layer from color\n const pickedLayerIndex = pickedColors[i + 3] - 1;\n\n if (pickedLayerIndex >= 0) {\n const pickedColor = pickedColors.slice(i, i + 4);\n const colorKey = pickedColor.join(',');\n // eslint-disable-next-line\n if (!uniqueColors.has(colorKey)) {\n const pickedObject = decodePickingColor(pickedColor);\n // eslint-disable-next-line\n if (pickedObject) {\n uniqueColors.set(colorKey, {\n ...pickedObject,\n pickedColor\n });\n } else {\n log.error('Picked non-existent layer. Is picking buffer corrupt?')();\n }\n }\n }\n }\n }\n\n return Array.from(uniqueColors.values());\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n// Even if nothing gets picked, we need to expose some information of the picking action:\n// x, y, coordinates etc.\nexport function getEmptyPickingInfo({pickInfo, viewports, pixelRatio, x, y, z}) {\n // If more than one viewports are used in the picking pass, locate the viewport that\n // drew the picked pixel\n let pickedViewport = viewports[0];\n if (viewports.length > 1) {\n // Find the viewport that contain the picked pixel\n pickedViewport = getViewportFromCoordinates(pickInfo?.pickedViewports || viewports, {x, y});\n }\n const coordinate =\n pickedViewport &&\n pickedViewport.unproject([x - pickedViewport.x, y - pickedViewport.y], {targetZ: z});\n\n return {\n color: null,\n layer: null,\n viewport: pickedViewport,\n index: -1,\n picked: false,\n x,\n y,\n pixel: [x, y],\n coordinate,\n devicePixel: pickInfo && [pickInfo.pickedX, pickInfo.pickedY],\n pixelRatio\n };\n}\n\n/* eslint-disable max-depth */\nexport function processPickInfo(opts) {\n const {pickInfo, lastPickedInfo, mode, layers} = opts;\n const {pickedColor, pickedLayer, pickedObjectIndex} = pickInfo;\n\n const affectedLayers = pickedLayer ? [pickedLayer] : [];\n\n if (mode === 'hover') {\n // only invoke onHover events if picked object has changed\n const lastPickedObjectIndex = lastPickedInfo.index;\n const lastPickedLayerId = lastPickedInfo.layerId;\n const pickedLayerId = pickedLayer && pickedLayer.props.id;\n\n // proceed only if picked object changed\n if (pickedLayerId !== lastPickedLayerId || pickedObjectIndex !== lastPickedObjectIndex) {\n if (pickedLayerId !== lastPickedLayerId) {\n // We cannot store a ref to lastPickedLayer in the context because\n // the state of an outdated layer is no longer valid\n // and the props may have changed\n const lastPickedLayer = layers.find(layer => layer.props.id === lastPickedLayerId);\n if (lastPickedLayer) {\n // Let leave event fire before enter event\n affectedLayers.unshift(lastPickedLayer);\n }\n }\n\n // Update layer manager context\n lastPickedInfo.layerId = pickedLayerId;\n lastPickedInfo.index = pickedObjectIndex;\n lastPickedInfo.info = null;\n }\n }\n\n const baseInfo = getEmptyPickingInfo(opts);\n\n // Use a Map to store all picking infos.\n // The following two forEach loops are the result of\n // https://github.com/visgl/deck.gl/issues/443\n // Please be very careful when changing this pattern\n const infos = new Map();\n\n // Make sure infos always contain something even if no layer is affected\n infos.set(null, baseInfo);\n\n affectedLayers.forEach(layer => {\n let info = {...baseInfo};\n\n if (layer === pickedLayer) {\n info.color = pickedColor;\n info.index = pickedObjectIndex;\n info.picked = true;\n }\n\n info = getLayerPickingInfo({layer, info, mode});\n\n if (layer === pickedLayer && mode === 'hover') {\n lastPickedInfo.info = info;\n }\n\n // This guarantees that there will be only one copy of info for\n // one composite layer\n infos.set(info.layer.id, info);\n\n if (mode === 'hover') {\n info.layer.updateAutoHighlight(info);\n }\n });\n\n return infos;\n}\n\n// Walk up the layer composite chain to populate the info object\nexport function getLayerPickingInfo({layer, info, mode}) {\n while (layer && info) {\n // For a composite layer, sourceLayer will point to the sublayer\n // where the event originates from.\n // It provides additional context for the composite layer's\n // getPickingInfo() method to populate the info object\n const sourceLayer = info.layer || null;\n info.sourceLayer = sourceLayer;\n info.layer = layer;\n // layer.pickLayer() function requires a non-null ```layer.state```\n // object to function properly. So the layer referenced here\n // must be the \"current\" layer, not an \"out-dated\" / \"invalidated\" layer\n info = layer.getPickingInfo({info, mode, sourceLayer});\n layer = layer.parent;\n }\n return info;\n}\n\n// Indentifies which viewport, if any corresponds to x and y\n// If multiple viewports contain the target pixel, last viewport drawn is returend\n// Returns first viewport if no match\nfunction getViewportFromCoordinates(viewports, pixel) {\n // find the last viewport that contains the pixel\n for (let i = viewports.length - 1; i >= 0; i--) {\n const viewport = viewports[i];\n if (viewport.containsPixel(pixel)) {\n return viewport;\n }\n }\n return viewports[0];\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n Framebuffer,\n Texture2D,\n isWebGL2,\n readPixelsToArray,\n cssToDeviceRatio,\n cssToDevicePixels\n} from '@luma.gl/core';\nimport GL from '@luma.gl/constants';\nimport PickLayersPass from '../passes/pick-layers-pass';\nimport {getClosestObject, getUniqueObjects} from './picking/query-object';\nimport {processPickInfo, getLayerPickingInfo, getEmptyPickingInfo} from './picking/pick-info';\n\nexport default class DeckPicker {\n constructor(gl) {\n this.gl = gl;\n this.pickingFBO = null;\n this.pickLayersPass = new PickLayersPass(gl);\n this.layerFilter = null;\n this.lastPickedInfo = {\n // For callback tracking and auto highlight\n index: -1,\n layerId: null,\n info: null\n };\n }\n\n setProps(props) {\n if ('layerFilter' in props) {\n this.layerFilter = props.layerFilter;\n }\n\n if ('_pickable' in props) {\n this._pickable = props._pickable;\n }\n }\n\n finalize() {\n if (this.pickingFBO) {\n this.pickingFBO.delete();\n }\n if (this.depthFBO) {\n this.depthFBO.color.delete();\n this.depthFBO.delete();\n }\n }\n\n // Pick the closest info at given coordinate\n pickObject(opts) {\n return this._pickClosestObject(opts);\n }\n\n // Get all unique infos within a bounding box\n pickObjects(opts) {\n return this._pickVisibleObjects(opts);\n }\n\n // Returns a new picking info object by assuming the last picked object is still picked\n getLastPickedObject({x, y, layers, viewports}, lastPickedInfo = this.lastPickedInfo.info) {\n const lastPickedLayerId = lastPickedInfo && lastPickedInfo.layer && lastPickedInfo.layer.id;\n const lastPickedViewportId =\n lastPickedInfo && lastPickedInfo.viewport && lastPickedInfo.viewport.id;\n const layer = lastPickedLayerId ? layers.find(l => l.id === lastPickedLayerId) : null;\n const viewport =\n (lastPickedViewportId && viewports.find(v => v.id === lastPickedViewportId)) || viewports[0];\n const coordinate = viewport && viewport.unproject([x - viewport.x, y - viewport.y]);\n\n const info = {\n x,\n y,\n viewport,\n coordinate,\n layer\n };\n\n if (layer) {\n return {...lastPickedInfo, ...info};\n }\n return Object.assign(info, {color: null, object: null, index: -1});\n }\n\n // Private\n _resizeBuffer() {\n const {gl} = this;\n\n // Create a frame buffer if not already available\n if (!this.pickingFBO) {\n this.pickingFBO = new Framebuffer(gl);\n if (Framebuffer.isSupported(gl, {colorBufferFloat: true})) {\n this.depthFBO = new Framebuffer(gl);\n this.depthFBO.attach({\n [GL.COLOR_ATTACHMENT0]: new Texture2D(gl, {\n format: isWebGL2(gl) ? GL.RGBA32F : GL.RGBA,\n type: GL.FLOAT\n })\n });\n }\n }\n // Resize it to current canvas size (this is a noop if size hasn't changed)\n this.pickingFBO.resize({width: gl.canvas.width, height: gl.canvas.height});\n if (this.depthFBO) {\n this.depthFBO.resize({width: gl.canvas.width, height: gl.canvas.height});\n }\n return this.pickingFBO;\n }\n\n // picking can only handle up to 255 layers. Drop non-pickable/invisible layers from the list.\n _getPickable(layers) {\n if (this._pickable === false) {\n return null;\n }\n const pickableLayers = layers.filter(layer => layer.isPickable() && !layer.isComposite);\n return pickableLayers.length ? pickableLayers : null;\n }\n\n // Pick the closest object at the given (x,y) coordinate\n // eslint-disable-next-line max-statements,complexity\n _pickClosestObject({\n layers,\n views,\n viewports,\n x,\n y,\n radius = 0,\n depth = 1,\n mode = 'query',\n unproject3D,\n onViewportActive\n }) {\n layers = this._getPickable(layers);\n\n if (!layers) {\n return {\n result: [],\n emptyInfo: getEmptyPickingInfo({viewports, x, y})\n };\n }\n\n this._resizeBuffer();\n\n // Convert from canvas top-left to WebGL bottom-left coordinates\n // Top-left coordinates [x, y] to bottom-left coordinates [deviceX, deviceY]\n // And compensate for pixelRatio\n const pixelRatio = cssToDeviceRatio(this.gl);\n const devicePixelRange = cssToDevicePixels(this.gl, [x, y], true);\n const devicePixel = [\n devicePixelRange.x + Math.floor(devicePixelRange.width / 2),\n devicePixelRange.y + Math.floor(devicePixelRange.height / 2)\n ];\n\n const deviceRadius = Math.round(radius * pixelRatio);\n const {width, height} = this.pickingFBO;\n const deviceRect = this._getPickingRect({\n deviceX: devicePixel[0],\n deviceY: devicePixel[1],\n deviceRadius,\n deviceWidth: width,\n deviceHeight: height\n });\n\n let infos;\n const result = [];\n const affectedLayers = {};\n\n for (let i = 0; i < depth; i++) {\n const pickedResult =\n deviceRect &&\n this._drawAndSample({\n layers,\n views,\n viewports,\n onViewportActive,\n deviceRect,\n pass: `picking:${mode}`,\n redrawReason: mode\n });\n\n const pickInfo = getClosestObject({\n ...pickedResult,\n deviceX: devicePixel[0],\n deviceY: devicePixel[1],\n deviceRadius,\n deviceRect\n });\n\n let z;\n if (pickInfo.pickedLayer && unproject3D && this.depthFBO) {\n const pickedResultPass2 = this._drawAndSample({\n layers: [pickInfo.pickedLayer],\n views,\n viewports,\n onViewportActive,\n deviceRect: {x: pickInfo.pickedX, y: pickInfo.pickedY, width: 1, height: 1},\n pass: `picking:${mode}`,\n redrawReason: 'pick-z',\n pickZ: true\n });\n // picked value is in common space (pixels) from the camera target (viewport.position)\n // convert it to meters from the ground\n z =\n pickedResultPass2.pickedColors[0] * viewports[0].distanceScales.metersPerUnit[2] +\n viewports[0].position[2];\n }\n\n // Only exclude if we need to run picking again.\n // We need to run picking again if an object is detected AND\n // we have not exhausted the requested depth.\n if (pickInfo.pickedColor && i + 1 < depth) {\n const layerId = pickInfo.pickedColor[3] - 1;\n affectedLayers[layerId] = true;\n layers[layerId].disablePickingIndex(pickInfo.pickedObjectIndex);\n }\n\n // This logic needs to run even if no object is picked.\n infos = processPickInfo({\n pickInfo,\n lastPickedInfo: this.lastPickedInfo,\n mode,\n layers,\n viewports,\n x,\n y,\n z,\n pixelRatio\n });\n\n for (const info of infos.values()) {\n if (info.layer) {\n result.push(info);\n }\n }\n\n // If no object is picked stop.\n if (!pickInfo.pickedColor) {\n break;\n }\n }\n\n // reset only affected buffers\n for (const layerId in affectedLayers) {\n layers[layerId].restorePickingColors();\n }\n\n return {result, emptyInfo: infos && infos.get(null)};\n }\n\n // Pick all objects within the given bounding box\n _pickVisibleObjects({\n layers,\n views,\n viewports,\n x,\n y,\n width = 1,\n height = 1,\n mode = 'query',\n maxObjects = null,\n onViewportActive\n }) {\n layers = this._getPickable(layers);\n\n if (!layers) {\n return [];\n }\n\n this._resizeBuffer();\n // Convert from canvas top-left to WebGL bottom-left coordinates\n // And compensate for pixelRatio\n const pixelRatio = cssToDeviceRatio(this.gl);\n const leftTop = cssToDevicePixels(this.gl, [x, y], true);\n\n // take left and top (y inverted in device pixels) from start location\n const deviceLeft = leftTop.x;\n const deviceTop = leftTop.y + leftTop.height;\n\n // take right and bottom (y inverted in device pixels) from end location\n const rightBottom = cssToDevicePixels(this.gl, [x + width, y + height], true);\n const deviceRight = rightBottom.x + rightBottom.width;\n const deviceBottom = rightBottom.y;\n\n const deviceRect = {\n x: deviceLeft,\n y: deviceBottom,\n // deviceTop and deviceRight represent the first pixel outside the desired rect\n width: deviceRight - deviceLeft,\n height: deviceTop - deviceBottom\n };\n\n const pickedResult = this._drawAndSample({\n layers,\n views,\n viewports,\n onViewportActive,\n deviceRect,\n pass: `picking:${mode}`,\n redrawReason: mode\n });\n\n const pickInfos = getUniqueObjects(pickedResult);\n\n // Only return unique infos, identified by info.object\n const uniqueInfos = new Map();\n\n const isMaxObjects = Number.isFinite(maxObjects);\n\n for (let i = 0; i < pickInfos.length; i++) {\n if (isMaxObjects && uniqueInfos.size >= maxObjects) {\n break;\n }\n const pickInfo = pickInfos[i];\n let info = {\n color: pickInfo.pickedColor,\n layer: null,\n index: pickInfo.pickedObjectIndex,\n picked: true,\n x,\n y,\n width,\n height,\n pixelRatio\n };\n\n info = getLayerPickingInfo({layer: pickInfo.pickedLayer, info, mode});\n if (!uniqueInfos.has(info.object)) {\n uniqueInfos.set(info.object, info);\n }\n }\n\n return Array.from(uniqueInfos.values());\n }\n\n // returns pickedColor or null if no pickable layers found.\n _drawAndSample({\n layers,\n views,\n viewports,\n onViewportActive,\n deviceRect,\n pass,\n redrawReason,\n pickZ\n }) {\n const pickingFBO = pickZ ? this.depthFBO : this.pickingFBO;\n\n const {decodePickingColor} = this.pickLayersPass.render({\n layers,\n layerFilter: this.layerFilter,\n views,\n viewports,\n onViewportActive,\n pickingFBO,\n deviceRect,\n pass,\n redrawReason,\n pickZ\n });\n\n // Read from an already rendered picking buffer\n // Returns an Uint8ClampedArray of picked pixels\n const {x, y, width, height} = deviceRect;\n const pickedColors = new (pickZ ? Float32Array : Uint8Array)(width * height * 4);\n readPixelsToArray(pickingFBO, {\n sourceX: x,\n sourceY: y,\n sourceWidth: width,\n sourceHeight: height,\n target: pickedColors\n });\n\n return {pickedColors, decodePickingColor};\n }\n\n // Calculate a picking rect centered on deviceX and deviceY and clipped to device\n // Returns null if pixel is outside of device\n _getPickingRect({deviceX, deviceY, deviceRadius, deviceWidth, deviceHeight}) {\n // Create a box of size `radius * 2 + 1` centered at [deviceX, deviceY]\n const x = Math.max(0, deviceX - deviceRadius);\n const y = Math.max(0, deviceY - deviceRadius);\n const width = Math.min(deviceWidth, deviceX + deviceRadius + 1) - x;\n const height = Math.min(deviceHeight, deviceY + deviceRadius + 1) - y;\n\n // x, y out of bounds.\n if (width <= 0 || height <= 0) {\n return null;\n }\n\n return {x, y, width, height};\n }\n}\n","// Copyright (c) 2015 - 2019 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* global document */\nconst defaultStyle = {\n zIndex: 1,\n position: 'absolute',\n pointerEvents: 'none',\n color: '#a0a7b4',\n backgroundColor: '#29323c',\n padding: '10px',\n top: 0,\n left: 0,\n display: 'none'\n};\n\nexport default class Tooltip {\n constructor(canvas) {\n const canvasParent = canvas.parentElement;\n\n if (canvasParent) {\n this.el = document.createElement('div');\n this.el.className = 'deck-tooltip';\n Object.assign(this.el.style, defaultStyle);\n canvasParent.appendChild(this.el);\n }\n\n this.isVisible = false;\n }\n\n setTooltip(displayInfo, x, y) {\n const el = this.el;\n\n if (typeof displayInfo === 'string') {\n el.innerText = displayInfo;\n } else if (!displayInfo) {\n this.isVisible = false;\n el.style.display = 'none';\n return;\n } else {\n if ('text' in displayInfo) {\n el.innerText = displayInfo.text;\n }\n if ('html' in displayInfo) {\n el.innerHTML = displayInfo.html;\n }\n if ('className' in displayInfo) {\n el.className = displayInfo.className;\n }\n Object.assign(el.style, displayInfo.style);\n }\n this.isVisible = true;\n el.style.display = 'block';\n el.style.transform = `translate(${x}px, ${y}px)`;\n }\n\n remove() {\n if (this.el) {\n this.el.remove();\n }\n }\n}\n","/**\n * This file contains overrides the default\n * hammer.js functions to add our own utility\n */\n\n/* Hammer.js constants */\nconst INPUT_START = 1;\nconst INPUT_MOVE = 2;\nconst INPUT_END = 4;\nconst MOUSE_INPUT_MAP = {\n mousedown: INPUT_START,\n mousemove: INPUT_MOVE,\n mouseup: INPUT_END\n};\n\n/**\n * Helper function that returns true if any element in an array meets given criteria.\n * Because older browsers do not support `Array.prototype.some`\n * @params array {Array}\n * @params predict {Function}\n */\nfunction some(array, predict) {\n for (let i = 0; i < array.length; i++) {\n if (predict(array[i])) {\n return true;\n }\n }\n return false;\n}\n\n/* eslint-disable no-invalid-this */\nexport function enhancePointerEventInput(PointerEventInput) {\n const oldHandler = PointerEventInput.prototype.handler;\n\n // overrides PointerEventInput.handler to accept right mouse button\n PointerEventInput.prototype.handler = function handler(ev) {\n const store = this.store;\n\n // Allow non-left mouse buttons through\n if (ev.button > 0 && ev.type === 'pointerdown') {\n if (!some(store, e => e.pointerId === ev.pointerId)) {\n store.push(ev);\n }\n }\n\n oldHandler.call(this, ev);\n };\n}\n\n// overrides MouseInput.handler to accept right mouse button\nexport function enhanceMouseInput(MouseInput) {\n MouseInput.prototype.handler = function handler(ev) {\n let eventType = MOUSE_INPUT_MAP[ev.type];\n\n // on start we want to have the mouse button down\n if (eventType & INPUT_START && ev.button >= 0) {\n this.pressed = true;\n }\n\n if (eventType & INPUT_MOVE && ev.which === 0) {\n eventType = INPUT_END;\n }\n\n // mouse must be down\n if (!this.pressed) {\n return;\n }\n\n if (eventType & INPUT_END) {\n this.pressed = false;\n }\n\n this.callback(this.manager, eventType, {\n pointers: [ev],\n changedPointers: [ev],\n pointerType: 'mouse',\n srcEvent: ev\n });\n };\n}\n","import hammerjs from 'hammerjs';\nimport {enhancePointerEventInput, enhanceMouseInput} from './hammer-overrides';\n\nenhancePointerEventInput(hammerjs.PointerEventInput);\nenhanceMouseInput(hammerjs.MouseInput);\n\nexport const Manager = hammerjs.Manager;\n\nexport default hammerjs;\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {INPUT_EVENT_TYPES} from '../constants';\nimport {window, userAgent, passiveSupported} from '../utils/globals';\n\nconst firefox = userAgent.indexOf('firefox') !== -1;\n\nconst {WHEEL_EVENTS} = INPUT_EVENT_TYPES;\nconst EVENT_TYPE = 'wheel';\n\n// Constants for normalizing input delta\nconst WHEEL_DELTA_MAGIC_SCALER = 4.000244140625;\nconst WHEEL_DELTA_PER_LINE = 40;\n// Slow down zoom if shift key is held for more precise zooming\nconst SHIFT_MULTIPLIER = 0.25;\n\nexport default class WheelInput {\n constructor(element, callback, options = {}) {\n this.element = element;\n this.callback = callback;\n\n this.options = Object.assign({enable: true}, options);\n\n this.events = WHEEL_EVENTS.concat(options.events || []);\n\n this.handleEvent = this.handleEvent.bind(this);\n this.events.forEach(event =>\n element.addEventListener(event, this.handleEvent, passiveSupported ? {passive: false} : false)\n );\n }\n\n destroy() {\n this.events.forEach(event => this.element.removeEventListener(event, this.handleEvent));\n }\n\n /**\n * Enable this input (begin processing events)\n * if the specified event type is among those handled by this input.\n */\n enableEventType(eventType, enabled) {\n if (eventType === EVENT_TYPE) {\n this.options.enable = enabled;\n }\n }\n\n /* eslint-disable complexity, max-statements */\n handleEvent(event) {\n if (!this.options.enable) {\n return;\n }\n\n let value = event.deltaY;\n if (window.WheelEvent) {\n // Firefox doubles the values on retina screens...\n if (firefox && event.deltaMode === window.WheelEvent.DOM_DELTA_PIXEL) {\n value /= window.devicePixelRatio;\n }\n if (event.deltaMode === window.WheelEvent.DOM_DELTA_LINE) {\n value *= WHEEL_DELTA_PER_LINE;\n }\n }\n\n const wheelPosition = {\n x: event.clientX,\n y: event.clientY\n };\n\n if (value !== 0 && value % WHEEL_DELTA_MAGIC_SCALER === 0) {\n // This one is definitely a mouse wheel event.\n // Normalize this value to match trackpad.\n value = Math.floor(value / WHEEL_DELTA_MAGIC_SCALER);\n }\n\n if (event.shiftKey && value) {\n value = value * SHIFT_MULTIPLIER;\n }\n\n this._onWheel(event, -value, wheelPosition);\n }\n\n _onWheel(srcEvent, delta, position) {\n this.callback({\n type: EVENT_TYPE,\n center: position,\n delta,\n srcEvent,\n pointerType: 'mouse',\n target: srcEvent.target\n });\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {INPUT_EVENT_TYPES} from '../constants';\n\nconst {MOUSE_EVENTS} = INPUT_EVENT_TYPES;\nconst MOVE_EVENT_TYPE = 'pointermove';\nconst OVER_EVENT_TYPE = 'pointerover';\nconst OUT_EVENT_TYPE = 'pointerout';\nconst LEAVE_EVENT_TYPE = 'pointerleave';\n\n/**\n * Hammer.js swallows 'move' events (for pointer/touch/mouse)\n * when the pointer is not down. This class sets up a handler\n * specifically for these events to work around this limitation.\n * Note that this could be extended to more intelligently handle\n * move events across input types, e.g. storing multiple simultaneous\n * pointer/touch events, calculating speed/direction, etc.\n */\nexport default class MoveInput {\n constructor(element, callback, options = {}) {\n this.element = element;\n this.callback = callback;\n this.pressed = false;\n\n this.options = Object.assign({enable: true}, options);\n this.enableMoveEvent = this.options.enable;\n this.enableLeaveEvent = this.options.enable;\n this.enableOutEvent = this.options.enable;\n this.enableOverEvent = this.options.enable;\n\n this.events = MOUSE_EVENTS.concat(options.events || []);\n\n this.handleEvent = this.handleEvent.bind(this);\n this.events.forEach(event => element.addEventListener(event, this.handleEvent));\n }\n\n destroy() {\n this.events.forEach(event => this.element.removeEventListener(event, this.handleEvent));\n }\n\n /**\n * Enable this input (begin processing events)\n * if the specified event type is among those handled by this input.\n */\n enableEventType(eventType, enabled) {\n if (eventType === MOVE_EVENT_TYPE) {\n this.enableMoveEvent = enabled;\n }\n if (eventType === OVER_EVENT_TYPE) {\n this.enableOverEvent = enabled;\n }\n if (eventType === OUT_EVENT_TYPE) {\n this.enableOutEvent = enabled;\n }\n if (eventType === LEAVE_EVENT_TYPE) {\n this.enableLeaveEvent = enabled;\n }\n }\n\n handleEvent(event) {\n this.handleOverEvent(event);\n this.handleOutEvent(event);\n this.handleLeaveEvent(event);\n this.handleMoveEvent(event);\n }\n\n handleOverEvent(event) {\n if (this.enableOverEvent) {\n if (event.type === 'mouseover') {\n this.callback({\n type: OVER_EVENT_TYPE,\n srcEvent: event,\n pointerType: 'mouse',\n target: event.target\n });\n }\n }\n }\n\n handleOutEvent(event) {\n if (this.enableOutEvent) {\n if (event.type === 'mouseout') {\n this.callback({\n type: OUT_EVENT_TYPE,\n srcEvent: event,\n pointerType: 'mouse',\n target: event.target\n });\n }\n }\n }\n\n handleLeaveEvent(event) {\n if (this.enableLeaveEvent) {\n if (event.type === 'mouseleave') {\n this.callback({\n type: LEAVE_EVENT_TYPE,\n srcEvent: event,\n pointerType: 'mouse',\n target: event.target\n });\n }\n }\n }\n\n handleMoveEvent(event) {\n if (this.enableMoveEvent) {\n switch (event.type) {\n case 'mousedown':\n if (event.button >= 0) {\n // Button is down\n this.pressed = true;\n }\n break;\n case 'mousemove':\n // Move events use `which` to track the button being pressed\n if (event.which === 0) {\n // Button is not down\n this.pressed = false;\n }\n if (!this.pressed) {\n // Drag events are emitted by hammer already\n // we just need to emit the move event on hover\n this.callback({\n type: MOVE_EVENT_TYPE,\n srcEvent: event,\n pointerType: 'mouse',\n target: event.target\n });\n }\n break;\n case 'mouseup':\n this.pressed = false;\n break;\n default:\n }\n }\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {INPUT_EVENT_TYPES} from '../constants';\n\nconst {KEY_EVENTS} = INPUT_EVENT_TYPES;\nconst DOWN_EVENT_TYPE = 'keydown';\nconst UP_EVENT_TYPE = 'keyup';\n\nexport default class KeyInput {\n constructor(element, callback, options = {}) {\n this.element = element;\n this.callback = callback;\n\n this.options = Object.assign({enable: true}, options);\n this.enableDownEvent = this.options.enable;\n this.enableUpEvent = this.options.enable;\n\n this.events = KEY_EVENTS.concat(options.events || []);\n\n this.handleEvent = this.handleEvent.bind(this);\n\n element.tabIndex = options.tabIndex || 0;\n element.style.outline = 'none';\n this.events.forEach(event => element.addEventListener(event, this.handleEvent));\n }\n\n destroy() {\n this.events.forEach(event => this.element.removeEventListener(event, this.handleEvent));\n }\n\n /**\n * Enable this input (begin processing events)\n * if the specified event type is among those handled by this input.\n */\n enableEventType(eventType, enabled) {\n if (eventType === DOWN_EVENT_TYPE) {\n this.enableDownEvent = enabled;\n }\n if (eventType === UP_EVENT_TYPE) {\n this.enableUpEvent = enabled;\n }\n }\n\n handleEvent(event) {\n // Ignore if focused on text input\n const targetElement = event.target || event.srcElement;\n if (\n (targetElement.tagName === 'INPUT' && targetElement.type === 'text') ||\n targetElement.tagName === 'TEXTAREA'\n ) {\n return;\n }\n\n if (this.enableDownEvent && event.type === 'keydown') {\n this.callback({\n type: DOWN_EVENT_TYPE,\n srcEvent: event,\n key: event.key,\n target: event.target\n });\n }\n\n if (this.enableUpEvent && event.type === 'keyup') {\n this.callback({\n type: UP_EVENT_TYPE,\n srcEvent: event,\n key: event.key,\n target: event.target\n });\n }\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst EVENT_TYPE = 'contextmenu';\n\nexport default class ContextmenuInput {\n constructor(element, callback, options = {}) {\n this.element = element;\n this.callback = callback;\n\n this.options = Object.assign({enable: true}, options);\n\n this.handleEvent = this.handleEvent.bind(this);\n element.addEventListener('contextmenu', this.handleEvent);\n }\n\n destroy() {\n this.element.removeEventListener('contextmenu', this.handleEvent);\n }\n\n /**\n * Enable this input (begin processing events)\n * if the specified event type is among those handled by this input.\n */\n enableEventType(eventType, enabled) {\n if (eventType === EVENT_TYPE) {\n this.options.enable = enabled;\n }\n }\n\n handleEvent(event) {\n if (!this.options.enable) {\n return;\n }\n\n this.callback({\n type: EVENT_TYPE,\n center: {\n x: event.clientX,\n y: event.clientY\n },\n srcEvent: event,\n pointerType: 'mouse',\n target: event.target\n });\n }\n}\n","/* Constants */\nconst DOWN_EVENT = 1;\nconst MOVE_EVENT = 2;\nconst UP_EVENT = 4;\nconst MOUSE_EVENTS = {\n pointerdown: DOWN_EVENT,\n pointermove: MOVE_EVENT,\n pointerup: UP_EVENT,\n mousedown: DOWN_EVENT,\n mousemove: MOVE_EVENT,\n mouseup: UP_EVENT\n};\n\n// MouseEvent.which https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/which\nconst MOUSE_EVENT_WHICH_LEFT = 1;\nconst MOUSE_EVENT_WHICH_MIDDLE = 2;\nconst MOUSE_EVENT_WHICH_RIGHT = 3;\n// MouseEvent.button https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\nconst MOUSE_EVENT_BUTTON_LEFT = 0;\nconst MOUSE_EVENT_BUTTON_MIDDLE = 1;\nconst MOUSE_EVENT_BUTTON_RIGHT = 2;\n// MouseEvent.buttons https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\nconst MOUSE_EVENT_BUTTONS_LEFT_MASK = 1;\nconst MOUSE_EVENT_BUTTONS_RIGHT_MASK = 2;\nconst MOUSE_EVENT_BUTTONS_MIDDLE_MASK = 4;\n\n/**\n * Extract the involved mouse button\n */\nexport function whichButtons(event) {\n const eventType = MOUSE_EVENTS[event.srcEvent.type];\n if (!eventType) {\n // Not a mouse evet\n return null;\n }\n\n const {buttons, button, which} = event.srcEvent;\n let leftButton = false;\n let middleButton = false;\n let rightButton = false;\n\n if (\n // button is up, need to find out which one was pressed before\n eventType === UP_EVENT ||\n // moving but does not support `buttons` API\n (eventType === MOVE_EVENT && !Number.isFinite(buttons))\n ) {\n leftButton = which === MOUSE_EVENT_WHICH_LEFT;\n middleButton = which === MOUSE_EVENT_WHICH_MIDDLE;\n rightButton = which === MOUSE_EVENT_WHICH_RIGHT;\n } else if (eventType === MOVE_EVENT) {\n leftButton = Boolean(buttons & MOUSE_EVENT_BUTTONS_LEFT_MASK);\n middleButton = Boolean(buttons & MOUSE_EVENT_BUTTONS_MIDDLE_MASK);\n rightButton = Boolean(buttons & MOUSE_EVENT_BUTTONS_RIGHT_MASK);\n } else if (eventType === DOWN_EVENT) {\n leftButton = button === MOUSE_EVENT_BUTTON_LEFT;\n middleButton = button === MOUSE_EVENT_BUTTON_MIDDLE;\n rightButton = button === MOUSE_EVENT_BUTTON_RIGHT;\n }\n\n return {leftButton, middleButton, rightButton};\n}\n\n/**\n * Calculate event position relative to the root element\n */\nexport function getOffsetPosition(event, rootElement) {\n const {srcEvent} = event;\n\n // `center` is a hammer.js event property\n if (!event.center && !Number.isFinite(srcEvent.clientX)) {\n // Not a gestural event\n return null;\n }\n\n const center = event.center || {\n x: srcEvent.clientX,\n y: srcEvent.clientY\n };\n\n const rect = rootElement.getBoundingClientRect();\n\n // Fix scale for map affected by a CSS transform.\n // See https://stackoverflow.com/a/26893663/3528533\n const scaleX = rect.width / rootElement.offsetWidth || 1;\n const scaleY = rect.height / rootElement.offsetHeight || 1;\n\n // Calculate center relative to the root element\n const offsetCenter = {\n x: (center.x - rect.left - rootElement.clientLeft) / scaleX,\n y: (center.y - rect.top - rootElement.clientTop) / scaleY\n };\n\n return {center, offsetCenter};\n}\n","import {whichButtons, getOffsetPosition} from './event-utils';\n\nconst DEFAULT_OPTIONS = {\n srcElement: 'root',\n priority: 0\n};\n\nexport default class EventRegistrar {\n constructor(eventManager) {\n this.eventManager = eventManager;\n this.handlers = [];\n // Element -> handler map\n this.handlersByElement = new Map();\n\n this.handleEvent = this.handleEvent.bind(this);\n this._active = false;\n }\n\n // Returns true if there are no non-passive handlers\n isEmpty() {\n return !this._active;\n }\n\n add(type, handler, opts, once = false, passive = false) {\n const {handlers, handlersByElement} = this;\n\n if (opts && (typeof opts !== 'object' || opts.addEventListener)) {\n // is DOM element, backward compatibility\n opts = {srcElement: opts};\n }\n opts = opts ? Object.assign({}, DEFAULT_OPTIONS, opts) : DEFAULT_OPTIONS;\n\n let entries = handlersByElement.get(opts.srcElement);\n if (!entries) {\n entries = [];\n handlersByElement.set(opts.srcElement, entries);\n }\n const entry = {type, handler, srcElement: opts.srcElement, priority: opts.priority};\n if (once) {\n entry.once = true;\n }\n if (passive) {\n entry.passive = true;\n }\n handlers.push(entry);\n this._active = this._active || !entry.passive;\n\n // Sort handlers by descending priority\n // Handlers with the same priority are excuted in the order of registration\n let insertPosition = entries.length - 1;\n while (insertPosition >= 0) {\n if (entries[insertPosition].priority >= entry.priority) {\n break;\n }\n insertPosition--;\n }\n entries.splice(insertPosition + 1, 0, entry);\n }\n\n remove(type, handler) {\n const {handlers, handlersByElement} = this;\n\n for (let i = handlers.length - 1; i >= 0; i--) {\n const entry = handlers[i];\n\n if (entry.type === type && entry.handler === handler) {\n handlers.splice(i, 1);\n const entries = handlersByElement.get(entry.srcElement);\n entries.splice(entries.indexOf(entry), 1);\n if (entries.length === 0) {\n handlersByElement.delete(entry.srcElement);\n }\n }\n }\n this._active = handlers.some(entry => !entry.passive);\n }\n\n /**\n * Handles hammerjs event\n */\n handleEvent(event) {\n if (this.isEmpty()) {\n return;\n }\n\n const mjolnirEvent = this._normalizeEvent(event);\n let target = event.srcEvent.target;\n\n while (target && target !== mjolnirEvent.rootElement) {\n this._emit(mjolnirEvent, target);\n if (mjolnirEvent.handled) {\n return;\n }\n target = target.parentNode;\n }\n this._emit(mjolnirEvent, 'root');\n }\n\n /**\n * Invoke handlers on a particular element\n */\n _emit(event, srcElement) {\n const entries = this.handlersByElement.get(srcElement);\n\n if (entries) {\n let immediatePropagationStopped = false;\n\n // Prevents the current event from bubbling up\n const stopPropagation = () => {\n event.handled = true;\n };\n // Prevent any remaining listeners from being called\n const stopImmediatePropagation = () => {\n event.handled = true;\n immediatePropagationStopped = true;\n };\n const entriesToRemove = [];\n\n for (let i = 0; i < entries.length; i++) {\n const {type, handler, once} = entries[i];\n handler(\n Object.assign({}, event, {\n type,\n stopPropagation,\n stopImmediatePropagation\n })\n );\n if (once) {\n entriesToRemove.push(entries[i]);\n }\n if (immediatePropagationStopped) {\n break;\n }\n }\n\n for (let i = 0; i < entriesToRemove.length; i++) {\n const {type, handler} = entriesToRemove[i];\n this.remove(type, handler);\n }\n }\n }\n\n /**\n * Normalizes hammerjs and custom events to have predictable fields.\n */\n _normalizeEvent(event) {\n const rootElement = this.eventManager.element;\n\n return Object.assign({}, event, whichButtons(event), getOffsetPosition(event, rootElement), {\n handled: false,\n rootElement\n });\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Manager} from './utils/hammer';\n\nimport WheelInput from './inputs/wheel-input';\nimport MoveInput from './inputs/move-input';\nimport KeyInput from './inputs/key-input';\nimport ContextmenuInput from './inputs/contextmenu-input';\n\nimport EventRegistrar from './utils/event-registrar';\n\nimport {\n BASIC_EVENT_ALIASES,\n EVENT_RECOGNIZER_MAP,\n GESTURE_EVENT_ALIASES,\n RECOGNIZERS,\n RECOGNIZER_COMPATIBLE_MAP,\n RECOGNIZER_FALLBACK_MAP\n} from './constants';\n\nconst DEFAULT_OPTIONS = {\n // event handlers\n events: null,\n // custom recognizers\n recognizers: null,\n recognizerOptions: {},\n // Manager class\n Manager,\n // allow browser default touch action\n // https://github.com/uber/react-map-gl/issues/506\n touchAction: 'none',\n tabIndex: 0\n};\n\n// Unified API for subscribing to events about both\n// basic input events (e.g. 'mousemove', 'touchstart', 'wheel')\n// and gestural input (e.g. 'click', 'tap', 'panstart').\n// Delegates gesture related event registration and handling to Hammer.js.\nexport default class EventManager {\n constructor(element = null, options = {}) {\n this.options = Object.assign({}, DEFAULT_OPTIONS, options);\n this.events = new Map();\n\n this._onBasicInput = this._onBasicInput.bind(this);\n this._onOtherEvent = this._onOtherEvent.bind(this);\n\n this.setElement(element);\n\n // Register all passed events.\n const {events} = options;\n if (events) {\n this.on(events);\n }\n }\n\n setElement(element) {\n if (this.element) {\n // unregister all events\n this.destroy();\n }\n this.element = element;\n if (!element) {\n return;\n }\n\n const {options} = this;\n const ManagerClass = options.Manager;\n\n this.manager = new ManagerClass(element, {\n touchAction: options.touchAction,\n recognizers: options.recognizers || RECOGNIZERS\n }).on('hammer.input', this._onBasicInput);\n\n if (!options.recognizers) {\n // Set default recognize withs\n // http://hammerjs.github.io/recognize-with/\n Object.keys(RECOGNIZER_COMPATIBLE_MAP).forEach(name => {\n const recognizer = this.manager.get(name);\n if (recognizer) {\n RECOGNIZER_COMPATIBLE_MAP[name].forEach(otherName => {\n recognizer.recognizeWith(otherName);\n });\n }\n });\n }\n\n // Set recognizer options\n for (const recognizerName in options.recognizerOptions) {\n const recognizer = this.manager.get(recognizerName);\n if (recognizer) {\n const recognizerOption = options.recognizerOptions[recognizerName];\n // `enable` is managed by the event registrations\n delete recognizerOption.enable;\n recognizer.set(recognizerOption);\n }\n }\n\n // Handle events not handled by Hammer.js:\n // - mouse wheel\n // - pointer/touch/mouse move\n this.wheelInput = new WheelInput(element, this._onOtherEvent, {\n enable: false\n });\n this.moveInput = new MoveInput(element, this._onOtherEvent, {\n enable: false\n });\n this.keyInput = new KeyInput(element, this._onOtherEvent, {\n enable: false,\n tabIndex: options.tabIndex\n });\n this.contextmenuInput = new ContextmenuInput(element, this._onOtherEvent, {\n enable: false\n });\n\n // Register all existing events\n for (const [eventAlias, eventRegistrar] of this.events) {\n if (!eventRegistrar.isEmpty()) {\n // Enable recognizer for this event.\n this._toggleRecognizer(eventRegistrar.recognizerName, true);\n this.manager.on(eventAlias, eventRegistrar.handleEvent);\n }\n }\n }\n\n // Tear down internal event management implementations.\n destroy() {\n if (this.element) {\n // wheelInput etc. are created in setElement() and therefore\n // cannot exist if there is no element\n this.wheelInput.destroy();\n this.moveInput.destroy();\n this.keyInput.destroy();\n this.contextmenuInput.destroy();\n this.manager.destroy();\n\n this.wheelInput = null;\n this.moveInput = null;\n this.keyInput = null;\n this.contextmenuInput = null;\n this.manager = null;\n this.element = null;\n }\n }\n\n // Register an event handler function to be called on `event`.\n on(event, handler, opts) {\n this._addEventHandler(event, handler, opts, false);\n }\n\n // Register an event handler function to be called on `event`, then remove it\n once(event, handler, opts) {\n this._addEventHandler(event, handler, opts, true);\n }\n\n // Register an event handler function to be called on `event`\n // This handler does not ask the event to be recognized at all times.\n // Instead, it only \"intercepts\" the event if some other handler is getting it.\n watch(event, handler, opts) {\n this._addEventHandler(event, handler, opts, false, true);\n }\n\n /**\n * Deregister a previously-registered event handler.\n * @param {string|Object} event An event name (String) or map of event names to handlers\n * @param {Function} [handler] The function to be called on `event`.\n */\n off(event, handler) {\n this._removeEventHandler(event, handler);\n }\n\n /*\n * Enable/disable recognizer for the given event\n */\n _toggleRecognizer(name, enabled) {\n const {manager} = this;\n if (!manager) {\n return;\n }\n const recognizer = manager.get(name);\n if (recognizer && recognizer.options.enable !== enabled) {\n recognizer.set({enable: enabled});\n\n const fallbackRecognizers = RECOGNIZER_FALLBACK_MAP[name];\n if (fallbackRecognizers && !this.options.recognizers) {\n // Set default require failures\n // http://hammerjs.github.io/require-failure/\n fallbackRecognizers.forEach(otherName => {\n const otherRecognizer = manager.get(otherName);\n if (enabled) {\n // Wait for this recognizer to fail\n otherRecognizer.requireFailure(name);\n /**\n * This seems to be a bug in hammerjs:\n * requireFailure() adds both ways\n * dropRequireFailure() only drops one way\n * https://github.com/hammerjs/hammer.js/blob/master/src/recognizerjs/\n recognizer-constructor.js#L136\n */\n recognizer.dropRequireFailure(otherName);\n } else {\n // Do not wait for this recognizer to fail\n otherRecognizer.dropRequireFailure(name);\n }\n });\n }\n }\n this.wheelInput.enableEventType(name, enabled);\n this.moveInput.enableEventType(name, enabled);\n this.keyInput.enableEventType(name, enabled);\n this.contextmenuInput.enableEventType(name, enabled);\n }\n\n /**\n * Process the event registration for a single event + handler.\n */\n _addEventHandler(event, handler, opts, once, passive) {\n if (typeof event !== 'string') {\n opts = handler;\n // If `event` is a map, call `on()` for each entry.\n for (const eventName in event) {\n this._addEventHandler(eventName, event[eventName], opts, once, passive);\n }\n return;\n }\n\n const {manager, events} = this;\n // Alias to a recognized gesture as necessary.\n const eventAlias = GESTURE_EVENT_ALIASES[event] || event;\n\n let eventRegistrar = events.get(eventAlias);\n if (!eventRegistrar) {\n eventRegistrar = new EventRegistrar(this);\n events.set(eventAlias, eventRegistrar);\n // Enable recognizer for this event.\n eventRegistrar.recognizerName = EVENT_RECOGNIZER_MAP[eventAlias] || eventAlias;\n // Listen to the event\n if (manager) {\n manager.on(eventAlias, eventRegistrar.handleEvent);\n }\n }\n eventRegistrar.add(event, handler, opts, once, passive);\n if (!eventRegistrar.isEmpty()) {\n this._toggleRecognizer(eventRegistrar.recognizerName, true);\n }\n }\n\n /**\n * Process the event deregistration for a single event + handler.\n */\n _removeEventHandler(event, handler) {\n if (typeof event !== 'string') {\n // If `event` is a map, call `off()` for each entry.\n for (const eventName in event) {\n this._removeEventHandler(eventName, event[eventName]);\n }\n return;\n }\n\n const {events} = this;\n // Alias to a recognized gesture as necessary.\n const eventAlias = GESTURE_EVENT_ALIASES[event] || event;\n\n const eventRegistrar = events.get(eventAlias);\n\n if (!eventRegistrar) {\n return;\n }\n\n eventRegistrar.remove(event, handler);\n\n if (eventRegistrar.isEmpty()) {\n const {recognizerName} = eventRegistrar;\n // Disable recognizer if no more handlers are attached to its events\n let isRecognizerUsed = false;\n for (const eh of events.values()) {\n if (eh.recognizerName === recognizerName && !eh.isEmpty()) {\n isRecognizerUsed = true;\n break;\n }\n }\n if (!isRecognizerUsed) {\n this._toggleRecognizer(recognizerName, false);\n }\n }\n }\n\n /**\n * Handle basic events using the 'hammer.input' Hammer.js API:\n * Before running Recognizers, Hammer emits a 'hammer.input' event\n * with the basic event info. This function emits all basic events\n * aliased to the \"class\" of event received.\n * See constants.BASIC_EVENT_CLASSES basic event class definitions.\n */\n _onBasicInput(event) {\n const {srcEvent} = event;\n const alias = BASIC_EVENT_ALIASES[srcEvent.type];\n if (alias) {\n // fire all events aliased to srcEvent.type\n this.manager.emit(alias, event);\n }\n }\n\n /**\n * Handle events not supported by Hammer.js,\n * and pipe back out through same (Hammer) channel used by other events.\n */\n _onOtherEvent(event) {\n // console.log('onotherevent', event.type, event)\n this.manager.emit(event.type, event);\n }\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport LayerManager from './layer-manager';\nimport ViewManager from './view-manager';\nimport MapView from '../views/map-view';\nimport EffectManager from './effect-manager';\nimport Effect from './effect';\nimport DeckRenderer from './deck-renderer';\nimport DeckPicker from './deck-picker';\nimport Tooltip from './tooltip';\nimport log from '../utils/log';\nimport {deepEqual} from '../utils/deep-equal';\nimport typedArrayManager from '../utils/typed-array-manager';\nimport deckGlobal from './init';\n\nimport {getBrowser} from 'probe.gl/env';\nimport GL from '@luma.gl/constants';\nimport {\n AnimationLoop,\n createGLContext,\n instrumentGLContext,\n setParameters,\n Timeline,\n lumaStats\n} from '@luma.gl/core';\nimport {Stats} from 'probe.gl';\nimport {EventManager} from 'mjolnir.js';\n\nimport assert from '../utils/assert';\nimport {EVENTS} from './constants';\n/* global document */\n\nfunction noop() {}\n\nconst getCursor = ({isDragging}) => (isDragging ? 'grabbing' : 'grab');\n\nfunction getPropTypes(PropTypes) {\n // Note: Arrays (layers, views, ) can contain falsy values\n return {\n id: PropTypes.string,\n width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n // layer/view/controller settings\n layers: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n layerFilter: PropTypes.func,\n views: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n viewState: PropTypes.object,\n effects: PropTypes.arrayOf(PropTypes.instanceOf(Effect)),\n controller: PropTypes.oneOfType([PropTypes.func, PropTypes.bool, PropTypes.object]),\n\n // GL settings\n gl: PropTypes.object,\n glOptions: PropTypes.object,\n parameters: PropTypes.object,\n pickingRadius: PropTypes.number,\n useDevicePixels: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),\n touchAction: PropTypes.string,\n eventRecognizerOptions: PropTypes.object,\n\n // Callbacks\n onWebGLInitialized: PropTypes.func,\n onResize: PropTypes.func,\n onViewStateChange: PropTypes.func,\n onInteractionStateChange: PropTypes.func,\n onBeforeRender: PropTypes.func,\n onAfterRender: PropTypes.func,\n onLoad: PropTypes.func,\n onError: PropTypes.func,\n\n // Debug settings\n debug: PropTypes.bool,\n drawPickingColors: PropTypes.bool,\n\n // Experimental props\n _framebuffer: PropTypes.object,\n // Forces a redraw every animation frame\n _animate: PropTypes.bool,\n\n // UNSAFE options - not exhaustively tested, not guaranteed to work in all cases, use at your own risk\n\n // Set to false to disable picking - avoiding picking buffer creation can save memory for mobile web browsers\n _pickable: PropTypes.bool,\n\n // Adjust parameters of typed array manager, can save memory e.g. for mobile web browsers\n _typedArrayManagerProps: PropTypes.object // {overAlloc: number, poolSize: number}\n };\n}\n\nconst defaultProps = {\n id: '',\n width: '100%',\n height: '100%',\n\n pickingRadius: 0,\n layerFilter: null,\n glOptions: {},\n gl: null,\n layers: [],\n effects: [],\n views: null,\n controller: null, // Rely on external controller, e.g. react-map-gl\n useDevicePixels: true,\n touchAction: 'none',\n eventRecognizerOptions: {},\n _framebuffer: null,\n _animate: false,\n _pickable: true,\n _typedArrayManagerProps: {},\n\n onWebGLInitialized: noop,\n onResize: noop,\n onViewStateChange: noop,\n onInteractionStateChange: noop,\n onBeforeRender: noop,\n onAfterRender: noop,\n onLoad: noop,\n onError: (error, layer) => log.error(error)(),\n _onMetrics: null,\n\n getCursor,\n\n debug: false,\n drawPickingColors: false\n};\n\n/* eslint-disable max-statements */\nexport default class Deck {\n constructor(props) {\n props = {...defaultProps, ...props};\n this.props = {};\n\n this.width = 0; // \"read-only\", auto-updated from canvas\n this.height = 0; // \"read-only\", auto-updated from canvas\n\n // Maps view descriptors to vieports, rebuilds when width/height/viewState/views change\n this.viewManager = null;\n this.layerManager = null;\n this.effectManager = null;\n this.deckRenderer = null;\n this.deckPicker = null;\n\n this._needsRedraw = true;\n this._pickRequest = {};\n // Pick and store the object under the pointer on `pointerdown`.\n // This object is reused for subsequent `onClick` and `onDrag*` callbacks.\n this._lastPointerDownInfo = null;\n\n this.viewState = null; // Internal view state if no callback is supplied\n this.interactiveState = {\n isHovering: false, // Whether the cursor is over a pickable object\n isDragging: false // Whether the cursor is down\n };\n\n // Bind methods\n this._onEvent = this._onEvent.bind(this);\n this._onPointerDown = this._onPointerDown.bind(this);\n this._onPointerMove = this._onPointerMove.bind(this);\n\n if (props.viewState && props.initialViewState) {\n log.warn(\n 'View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.'\n )();\n }\n if (getBrowser() === 'IE') {\n log.warn('IE 11 support will be deprecated in v8.0')();\n }\n\n if (!props.gl) {\n // Note: LayerManager creation deferred until gl context available\n if (typeof document !== 'undefined') {\n this.canvas = this._createCanvas(props);\n }\n }\n this.animationLoop = this._createAnimationLoop(props);\n\n this.stats = new Stats({id: 'deck.gl'});\n this.metrics = {\n fps: 0,\n setPropsTime: 0,\n updateAttributesTime: 0,\n framesRedrawn: 0,\n pickTime: 0,\n pickCount: 0,\n gpuTime: 0,\n gpuTimePerFrame: 0,\n cpuTime: 0,\n cpuTimePerFrame: 0,\n bufferMemory: 0,\n textureMemory: 0,\n renderbufferMemory: 0,\n gpuMemory: 0\n };\n this._metricsCounter = 0;\n\n this.setProps(props);\n\n // UNSAFE/experimental prop: only set at initialization to avoid performance hit\n if (props._typedArrayManagerProps) {\n typedArrayManager.setProps(props._typedArrayManagerProps);\n }\n\n this.animationLoop.start();\n }\n\n finalize() {\n this.animationLoop.stop();\n this.animationLoop = null;\n this._lastPointerDownInfo = null;\n\n if (this.layerManager) {\n this.layerManager.finalize();\n this.layerManager = null;\n\n this.viewManager.finalize();\n this.viewManager = null;\n\n this.effectManager.finalize();\n this.effectManager = null;\n\n this.deckRenderer.finalize();\n this.deckRenderer = null;\n\n this.deckPicker.finalize();\n this.deckPicker = null;\n\n this.eventManager.destroy();\n this.eventManager = null;\n\n this.tooltip.remove();\n this.tooltip = null;\n }\n\n if (!this.props.canvas && !this.props.gl && this.canvas) {\n // remove internally created canvas\n this.canvas.parentElement.removeChild(this.canvas);\n this.canvas = null;\n }\n }\n\n setProps(props) {\n this.stats.get('setProps Time').timeStart();\n\n if ('onLayerHover' in props) {\n log.removed('onLayerHover', 'onHover')();\n }\n if ('onLayerClick' in props) {\n log.removed('onLayerClick', 'onClick')();\n }\n if (props.initialViewState && !deepEqual(this.props.initialViewState, props.initialViewState)) {\n // Overwrite internal view state\n this.viewState = props.initialViewState;\n }\n\n // Merge with existing props\n Object.assign(this.props, props);\n\n // Update CSS size of canvas\n this._setCanvasSize(this.props);\n\n // We need to overwrite CSS style width and height with actual, numeric values\n const resolvedProps = Object.create(this.props);\n Object.assign(resolvedProps, {\n views: this._getViews(),\n width: this.width,\n height: this.height,\n viewState: this._getViewState()\n });\n\n // Update the animation loop\n this.animationLoop.setProps(resolvedProps);\n\n // If initialized, update sub manager props\n if (this.layerManager) {\n this.viewManager.setProps(resolvedProps);\n // Make sure that any new layer gets initialized with the current viewport\n this.layerManager.activateViewport(this.getViewports()[0]);\n this.layerManager.setProps(resolvedProps);\n this.effectManager.setProps(resolvedProps);\n this.deckRenderer.setProps(resolvedProps);\n this.deckPicker.setProps(resolvedProps);\n }\n\n this.stats.get('setProps Time').timeEnd();\n }\n\n // Public API\n // Check if a redraw is needed\n // Returns `false` or a string summarizing the redraw reason\n // opts.clearRedrawFlags (Boolean) - clear the redraw flag. Default `true`\n needsRedraw(opts = {clearRedrawFlags: false}) {\n if (this.props._animate) {\n return 'Deck._animate';\n }\n\n let redraw = this._needsRedraw;\n\n if (opts.clearRedrawFlags) {\n this._needsRedraw = false;\n }\n\n const viewManagerNeedsRedraw = this.viewManager.needsRedraw(opts);\n const layerManagerNeedsRedraw = this.layerManager.needsRedraw(opts);\n const effectManagerNeedsRedraw = this.effectManager.needsRedraw(opts);\n const deckRendererNeedsRedraw = this.deckRenderer.needsRedraw(opts);\n\n redraw =\n redraw ||\n viewManagerNeedsRedraw ||\n layerManagerNeedsRedraw ||\n effectManagerNeedsRedraw ||\n deckRendererNeedsRedraw;\n return redraw;\n }\n\n redraw(force) {\n if (!this.layerManager) {\n // Not yet initialized\n return;\n }\n // If force is falsy, check if we need to redraw\n const redrawReason = force || this.needsRedraw({clearRedrawFlags: true});\n\n if (!redrawReason) {\n return;\n }\n\n this.stats.get('Redraw Count').incrementCount();\n if (this.props._customRender) {\n this.props._customRender(redrawReason);\n } else {\n this._drawLayers(redrawReason);\n }\n }\n\n getViews() {\n return this.viewManager.views;\n }\n\n // Get a set of viewports for a given width and height\n getViewports(rect) {\n return this.viewManager.getViewports(rect);\n }\n\n /* {x, y, radius = 0, layerIds = null, unproject3D} */\n pickObject(opts) {\n const infos = this._pick('pickObject', 'pickObject Time', opts).result;\n return infos.length ? infos[0] : null;\n }\n\n /* {x, y, radius = 0, layerIds = null, unproject3D, depth = 10} */\n pickMultipleObjects(opts) {\n opts.depth = opts.depth || 10;\n return this._pick('pickObject', 'pickMultipleObjects Time', opts).result;\n }\n\n /* {x, y, width = 1, height = 1, layerIds = null} */\n pickObjects(opts) {\n return this._pick('pickObjects', 'pickObjects Time', opts);\n }\n\n // Experimental\n\n _addResources(resources, forceUpdate = false) {\n for (const id in resources) {\n this.layerManager.resourceManager.add({resourceId: id, data: resources[id], forceUpdate});\n }\n }\n\n _removeResources(resourceIds) {\n for (const id of resourceIds) {\n this.layerManager.resourceManager.remove(id);\n }\n }\n\n // Private Methods\n\n _pick(method, statKey, opts) {\n const {stats} = this;\n\n stats.get('Pick Count').incrementCount();\n stats.get(statKey).timeStart();\n\n const infos = this.deckPicker[method]({\n layers: this.layerManager.getLayers(opts),\n views: this.viewManager.getViews(),\n viewports: this.getViewports(opts),\n onViewportActive: this.layerManager.activateViewport,\n ...opts\n });\n\n stats.get(statKey).timeEnd();\n\n return infos;\n }\n\n // canvas, either string, canvas or `null`\n _createCanvas(props) {\n let canvas = props.canvas;\n\n // TODO EventManager should accept element id\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n assert(canvas);\n }\n\n if (!canvas) {\n canvas = document.createElement('canvas');\n canvas.id = props.id || 'deckgl-overlay';\n const parent = props.parent || document.body;\n parent.appendChild(canvas);\n }\n\n Object.assign(canvas.style, props.style);\n\n return canvas;\n }\n\n // Updates canvas width and/or height, if provided as props\n _setCanvasSize(props) {\n if (!this.canvas) {\n return;\n }\n\n let {width, height} = props;\n // Set size ONLY if props are being provided, otherwise let canvas be layouted freely\n if (width || width === 0) {\n width = Number.isFinite(width) ? `${width}px` : width;\n this.canvas.style.width = width;\n }\n if (height || height === 0) {\n height = Number.isFinite(height) ? `${height}px` : height;\n // Note: position==='absolute' required for height 100% to work\n this.canvas.style.position = 'absolute';\n this.canvas.style.height = height;\n }\n }\n\n // If canvas size has changed, updates\n _updateCanvasSize() {\n if (this._checkForCanvasSizeChange()) {\n const {width, height} = this;\n this.viewManager.setProps({width, height});\n this.props.onResize({width: this.width, height: this.height});\n }\n }\n\n // If canvas size has changed, reads out the new size and returns true\n _checkForCanvasSizeChange() {\n const {canvas} = this;\n if (!canvas) {\n return false;\n }\n // Fallback to width/height when clientWidth/clientHeight are 0 or undefined.\n const newWidth = canvas.clientWidth || canvas.width;\n const newHeight = canvas.clientHeight || canvas.height;\n if (newWidth !== this.width || newHeight !== this.height) {\n this.width = newWidth;\n this.height = newHeight;\n return true;\n }\n return false;\n }\n\n _createAnimationLoop(props) {\n const {\n width,\n height,\n gl,\n glOptions,\n debug,\n onError,\n onBeforeRender,\n onAfterRender,\n useDevicePixels,\n autoResizeDrawingBuffer\n } = props;\n\n return new AnimationLoop({\n width,\n height,\n useDevicePixels,\n autoResizeDrawingBuffer,\n autoResizeViewport: false,\n gl,\n onCreateContext: opts =>\n createGLContext({\n ...glOptions,\n ...opts,\n canvas: this.canvas,\n debug,\n onContextLost: () => this._onContextLost()\n }),\n onInitialize: context => this._setGLContext(context.gl),\n onRender: this._onRenderFrame.bind(this),\n onBeforeRender,\n onAfterRender,\n onError\n });\n }\n\n // Get the most relevant view state: props.viewState, if supplied, shadows internal viewState\n // TODO: For backwards compatibility ensure numeric width and height is added to the viewState\n _getViewState() {\n return this.props.viewState || this.viewState;\n }\n\n // Get the view descriptor list\n _getViews() {\n // Default to a full screen map view port\n let views = this.props.views || [new MapView({id: 'default-view'})];\n views = Array.isArray(views) ? views : [views];\n if (views.length && this.props.controller) {\n // Backward compatibility: support controller prop\n views[0].props.controller = this.props.controller;\n }\n return views;\n }\n\n _onContextLost() {\n const {onError} = this.props;\n if (this.animationLoop && onError) {\n onError(new Error(`WebGL context is lost`));\n }\n }\n\n // The `pointermove` event may fire multiple times in between two animation frames,\n // it's a waste of time to run picking without rerender. Instead we save the last pick\n // request and only do it once on the next animation frame.\n _onPointerMove(event) {\n const {_pickRequest} = this;\n if (event.type === 'pointerleave') {\n _pickRequest.x = -1;\n _pickRequest.y = -1;\n _pickRequest.radius = 0;\n } else if (event.leftButton || event.rightButton) {\n // Do not trigger onHover callbacks if mouse button is down.\n return;\n } else {\n const pos = event.offsetCenter;\n // Do not trigger callbacks when click/hover position is invalid. Doing so will cause a\n // assertion error when attempting to unproject the position.\n if (!pos) {\n return;\n }\n _pickRequest.x = pos.x;\n _pickRequest.y = pos.y;\n _pickRequest.radius = this.props.pickingRadius;\n }\n\n if (this.layerManager) {\n this.layerManager.context.mousePosition = {x: _pickRequest.x, y: _pickRequest.y};\n }\n\n _pickRequest.event = event;\n _pickRequest.mode = 'hover';\n }\n\n // Actually run picking\n _pickAndCallback() {\n const {_pickRequest} = this;\n\n if (_pickRequest.event) {\n // Perform picking\n const {result, emptyInfo} = this._pick('pickObject', 'pickObject Time', _pickRequest);\n this.interactiveState.isHovering = result.length > 0;\n\n // There are 4 possible scenarios:\n // result is [outInfo, pickedInfo] (moved from one pickable layer to another)\n // result is [outInfo] (moved outside of a pickable layer)\n // result is [pickedInfo] (moved into or over a pickable layer)\n // result is [] (nothing is or was picked)\n //\n // `layer.props.onHover` should be called on all affected layers (out/over)\n // `deck.props.onHover` should be called with the picked info if any, or empty info otherwise\n // `deck.props.getTooltip` should be called with the picked info if any, or empty info otherwise\n\n // Execute callbacks\n let pickedInfo = emptyInfo;\n let handled = false;\n for (const info of result) {\n pickedInfo = info;\n handled = info.layer.onHover(info, _pickRequest.event);\n }\n if (!handled && this.props.onHover) {\n this.props.onHover(pickedInfo, _pickRequest.event);\n }\n\n // Update tooltip\n if (this.props.getTooltip) {\n const displayInfo = this.props.getTooltip(pickedInfo);\n this.tooltip.setTooltip(displayInfo, pickedInfo.x, pickedInfo.y);\n }\n\n // Clear pending pickRequest\n _pickRequest.event = null;\n }\n }\n\n _updateCursor() {\n const container = this.props.parent || this.canvas;\n if (container) {\n container.style.cursor = this.props.getCursor(this.interactiveState);\n }\n }\n\n _setGLContext(gl) {\n if (this.layerManager) {\n return;\n }\n\n // if external context...\n if (!this.canvas) {\n this.canvas = gl.canvas;\n instrumentGLContext(gl, {enable: true, copyState: true});\n }\n\n this.tooltip = new Tooltip(this.canvas);\n\n setParameters(gl, {\n blend: true,\n blendFunc: [GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA, GL.ONE, GL.ONE_MINUS_SRC_ALPHA],\n polygonOffsetFill: true,\n depthTest: true,\n depthFunc: GL.LEQUAL\n });\n\n this.props.onWebGLInitialized(gl);\n\n // timeline for transitions\n const timeline = new Timeline();\n timeline.play();\n this.animationLoop.attachTimeline(timeline);\n\n this.eventManager = new EventManager(this.props.parent || gl.canvas, {\n touchAction: this.props.touchAction,\n recognizerOptions: this.props.eventRecognizerOptions,\n events: {\n pointerdown: this._onPointerDown,\n pointermove: this._onPointerMove,\n pointerleave: this._onPointerMove\n }\n });\n for (const eventType in EVENTS) {\n this.eventManager.on(eventType, this._onEvent);\n }\n\n this.viewManager = new ViewManager({\n timeline,\n eventManager: this.eventManager,\n onViewStateChange: this._onViewStateChange.bind(this),\n onInteractionStateChange: this._onInteractionStateChange.bind(this),\n views: this._getViews(),\n viewState: this._getViewState(),\n width: this.width,\n height: this.height\n });\n\n // viewManager must be initialized before layerManager\n // layerManager depends on viewport created by viewManager.\n const viewport = this.viewManager.getViewports()[0];\n\n // Note: avoid React setState due GL animation loop / setState timing issue\n this.layerManager = new LayerManager(gl, {\n deck: this,\n stats: this.stats,\n viewport,\n timeline\n });\n\n this.effectManager = new EffectManager();\n\n this.deckRenderer = new DeckRenderer(gl);\n\n this.deckPicker = new DeckPicker(gl);\n\n this.setProps(this.props);\n\n this._updateCanvasSize();\n this.props.onLoad();\n }\n\n _drawLayers(redrawReason, renderOptions) {\n const {gl} = this.layerManager.context;\n\n setParameters(gl, this.props.parameters);\n\n this.props.onBeforeRender({gl});\n\n this.deckRenderer.renderLayers({\n target: this.props._framebuffer,\n layers: this.layerManager.getLayers(),\n viewports: this.viewManager.getViewports(),\n onViewportActive: this.layerManager.activateViewport,\n views: this.viewManager.getViews(),\n pass: 'screen',\n redrawReason,\n effects: this.effectManager.getEffects(),\n ...renderOptions\n });\n\n this.props.onAfterRender({gl});\n }\n\n // Callbacks\n\n _onRenderFrame(animationProps) {\n this._getFrameStats();\n\n // Log perf stats every second\n if (this._metricsCounter++ % 60 === 0) {\n this._getMetrics();\n this.stats.reset();\n log.table(4, this.metrics)();\n\n // Experimental: report metrics\n if (this.props._onMetrics) {\n this.props._onMetrics(this.metrics);\n }\n }\n\n this._updateCanvasSize();\n\n this._updateCursor();\n\n // If view state has changed, clear tooltip\n if (this.tooltip.isVisible && this.viewManager.needsRedraw()) {\n this.tooltip.setTooltip(null);\n }\n\n // Update layers if needed (e.g. some async prop has loaded)\n // Note: This can trigger a redraw\n this.layerManager.updateLayers();\n\n // Perform picking request if any\n this._pickAndCallback();\n\n // Redraw if necessary\n this.redraw(false);\n\n // Update viewport transition if needed\n // Note: this can trigger `onViewStateChange`, and affect layers\n // We want to defer these changes to the next frame\n if (this.viewManager) {\n this.viewManager.updateViewStates();\n }\n }\n\n // Callbacks\n\n _onViewStateChange(params) {\n // Let app know that view state is changing, and give it a chance to change it\n const viewState = this.props.onViewStateChange(params) || params.viewState;\n\n // If initialViewState was set on creation, auto track position\n if (this.viewState) {\n this.viewState = {...this.viewState, [params.viewId]: viewState};\n if (!this.props.viewState) {\n // Apply internal view state\n if (this.viewManager) {\n this.viewManager.setProps({viewState: this.viewState});\n }\n }\n }\n }\n\n _onInteractionStateChange(interactionState) {\n this.interactiveState.isDragging = interactionState.isDragging;\n this.props.onInteractionStateChange(interactionState);\n }\n\n _onEvent(event) {\n const eventOptions = EVENTS[event.type];\n const pos = event.offsetCenter;\n\n if (!eventOptions || !pos) {\n return;\n }\n\n // Reuse last picked object\n const layers = this.layerManager.getLayers();\n const info = this.deckPicker.getLastPickedObject(\n {\n x: pos.x,\n y: pos.y,\n layers,\n viewports: this.getViewports(pos)\n },\n this._lastPointerDownInfo\n );\n\n const {layer} = info;\n const layerHandler =\n layer && (layer[eventOptions.handler] || layer.props[eventOptions.handler]);\n const rootHandler = this.props[eventOptions.handler];\n let handled = false;\n\n if (layerHandler) {\n handled = layerHandler.call(layer, info, event);\n }\n if (!handled && rootHandler) {\n rootHandler(info, event);\n }\n }\n\n _onPointerDown(event) {\n const pos = event.offsetCenter;\n this._lastPointerDownInfo = this.pickObject({\n x: pos.x,\n y: pos.y,\n radius: this.props.pickingRadius\n });\n }\n\n _getFrameStats() {\n const {stats} = this;\n stats.get('frameRate').timeEnd();\n stats.get('frameRate').timeStart();\n\n // Get individual stats from luma.gl so reset works\n const animationLoopStats = this.animationLoop.stats;\n stats.get('GPU Time').addTime(animationLoopStats.get('GPU Time').lastTiming);\n stats.get('CPU Time').addTime(animationLoopStats.get('CPU Time').lastTiming);\n }\n\n _getMetrics() {\n const {metrics, stats} = this;\n metrics.fps = stats.get('frameRate').getHz();\n metrics.setPropsTime = stats.get('setProps Time').time;\n metrics.updateAttributesTime = stats.get('Update Attributes').time;\n metrics.framesRedrawn = stats.get('Redraw Count').count;\n metrics.pickTime =\n stats.get('pickObject Time').time +\n stats.get('pickMultipleObjects Time').time +\n stats.get('pickObjects Time').time;\n metrics.pickCount = stats.get('Pick Count').count;\n\n // Luma stats\n metrics.gpuTime = stats.get('GPU Time').time;\n metrics.cpuTime = stats.get('CPU Time').time;\n metrics.gpuTimePerFrame = stats.get('GPU Time').getAverageTime();\n metrics.cpuTimePerFrame = stats.get('CPU Time').getAverageTime();\n\n const memoryStats = lumaStats.get('Memory Usage');\n metrics.bufferMemory = memoryStats.get('Buffer Memory').count;\n metrics.textureMemory = memoryStats.get('Texture Memory').count;\n metrics.renderbufferMemory = memoryStats.get('Renderbuffer Memory').count;\n metrics.gpuMemory = memoryStats.get('GPU Memory').count;\n }\n}\n\nDeck.getPropTypes = getPropTypes;\nDeck.defaultProps = defaultProps;\n\n// This is used to defeat tree shaking of init.js\n// https://github.com/visgl/deck.gl/issues/3213\nDeck.VERSION = deckGlobal.VERSION;\n","import {Vector3, Matrix4} from '@math.gl/core';\nimport {assert, uid} from '@luma.gl/webgl';\n\nexport default class ScenegraphNode {\n constructor(props = {}) {\n const {id} = props;\n\n this.id = id || uid(this.constructor.name);\n\n this.display = true; // whether to display the object at all\n this.position = new Vector3();\n this.rotation = new Vector3();\n this.scale = new Vector3(1, 1, 1);\n this.matrix = new Matrix4();\n this.userData = {};\n\n this.props = {};\n this._setScenegraphNodeProps(props);\n }\n\n delete() {}\n\n setProps(props) {\n this._setScenegraphNodeProps(props);\n return this;\n }\n\n toString() {\n return `{type: ScenegraphNode, id: ${this.id})}`;\n }\n\n setPosition(position) {\n assert(position.length === 3, 'setPosition requires vector argument');\n this.position = position;\n return this;\n }\n\n setRotation(rotation) {\n assert(rotation.length === 3, 'setRotation requires vector argument');\n this.rotation = rotation;\n return this;\n }\n\n setScale(scale) {\n assert(scale.length === 3, 'setScale requires vector argument');\n this.scale = scale;\n return this;\n }\n\n setMatrix(matrix, copyMatrix = true) {\n if (copyMatrix) {\n this.matrix.copy(matrix);\n } else {\n this.matrix = matrix;\n }\n }\n\n setMatrixComponents({position, rotation, scale, update = true}) {\n if (position) {\n this.setPosition(position);\n }\n if (rotation) {\n this.setRotation(rotation);\n }\n if (scale) {\n this.setScale(scale);\n }\n if (update) {\n this.updateMatrix();\n }\n return this;\n }\n\n updateMatrix() {\n const pos = this.position;\n const rot = this.rotation;\n const scale = this.scale;\n\n this.matrix.identity();\n this.matrix.translate(pos);\n this.matrix.rotateXYZ(rot);\n this.matrix.scale(scale);\n return this;\n }\n\n update(options = {}) {\n const {position, rotation, scale} = options;\n if (position) {\n this.setPosition(position);\n }\n if (rotation) {\n this.setRotation(rotation);\n }\n if (scale) {\n this.setScale(scale);\n }\n this.updateMatrix();\n return this;\n }\n\n getCoordinateUniforms(viewMatrix, modelMatrix) {\n // TODO - solve multiple class problem\n // assert(viewMatrix instanceof Matrix4);\n assert(viewMatrix);\n modelMatrix = modelMatrix || this.matrix;\n const worldMatrix = new Matrix4(viewMatrix).multiplyRight(modelMatrix);\n const worldInverse = worldMatrix.invert();\n const worldInverseTranspose = worldInverse.transpose();\n\n return {\n viewMatrix,\n modelMatrix,\n objectMatrix: modelMatrix,\n worldMatrix,\n worldInverseMatrix: worldInverse,\n worldInverseTransposeMatrix: worldInverseTranspose\n };\n }\n\n // TODO - copied code, not yet vetted\n /*\n transform() {\n if (!this.parent) {\n this.endPosition.set(this.position);\n this.endRotation.set(this.rotation);\n this.endScale.set(this.scale);\n } else {\n const parent = this.parent;\n this.endPosition.set(this.position.add(parent.endPosition));\n this.endRotation.set(this.rotation.add(parent.endRotation));\n this.endScale.set(this.scale.add(parent.endScale));\n }\n\n const ch = this.children;\n for (let i = 0; i < ch.length; ++i) {\n ch[i].transform();\n }\n\n return this;\n }\n */\n\n _setScenegraphNodeProps(props) {\n if ('display' in props) {\n this.display = props.display;\n }\n\n if ('position' in props) {\n this.setPosition(props.position);\n }\n if ('rotation' in props) {\n this.setRotation(props.rotation);\n }\n if ('scale' in props) {\n this.setScale(props.scale);\n }\n\n // Matrix overwrites other props\n if ('matrix' in props) {\n this.setMatrix(props.matrix);\n }\n\n Object.assign(this.props, props);\n }\n}\n","import {Matrix4} from '@math.gl/core';\nimport {log} from '@luma.gl/webgl';\nimport ScenegraphNode from './scenegraph-node';\n\nexport default class GroupNode extends ScenegraphNode {\n constructor(props = {}) {\n props = Array.isArray(props) ? {children: props} : props;\n const {children = []} = props;\n log.assert(\n children.every(child => child instanceof ScenegraphNode),\n 'every child must an instance of ScenegraphNode'\n );\n super(props);\n this.children = children;\n }\n\n // Unpacks arrays and nested arrays of children\n add(...children) {\n for (const child of children) {\n if (Array.isArray(child)) {\n this.add(...child);\n } else {\n this.children.push(child);\n }\n }\n return this;\n }\n\n remove(child) {\n const children = this.children;\n const indexOf = children.indexOf(child);\n if (indexOf > -1) {\n children.splice(indexOf, 1);\n }\n return this;\n }\n\n removeAll() {\n this.children = [];\n return this;\n }\n\n delete() {\n this.children.forEach(child => child.delete());\n this.removeAll();\n super.delete();\n }\n\n traverse(visitor, {worldMatrix = new Matrix4()} = {}) {\n const modelMatrix = new Matrix4(worldMatrix).multiplyRight(this.matrix);\n\n for (const child of this.children) {\n if (child instanceof GroupNode) {\n child.traverse(visitor, {worldMatrix: modelMatrix});\n } else {\n visitor(child, {worldMatrix: modelMatrix});\n }\n }\n }\n}\n","import {assert, log} from '@luma.gl/webgl';\nimport {Matrix4, Quaternion} from '@math.gl/core';\n\n// TODO: import from loaders.gl?\nexport const ATTRIBUTE_TYPE_TO_COMPONENTS = {\n SCALAR: 1,\n VEC2: 2,\n VEC3: 3,\n VEC4: 4,\n MAT2: 4,\n MAT3: 9,\n MAT4: 16\n};\n\nexport const ATTRIBUTE_COMPONENT_TYPE_TO_ARRAY = {\n 5120: Int8Array,\n 5121: Uint8Array,\n 5122: Int16Array,\n 5123: Uint16Array,\n 5125: Uint32Array,\n 5126: Float32Array\n};\n//\n\nfunction accessorToJsArray(accessor) {\n if (!accessor._animation) {\n const ArrayType = ATTRIBUTE_COMPONENT_TYPE_TO_ARRAY[accessor.componentType];\n const components = ATTRIBUTE_TYPE_TO_COMPONENTS[accessor.type];\n const length = components * accessor.count;\n const {buffer, byteOffset} = accessor.bufferView.data;\n\n const array = new ArrayType(buffer, byteOffset + (accessor.byteOffset || 0), length);\n\n if (components === 1) {\n accessor._animation = Array.from(array);\n } else {\n // Slice array\n const slicedArray = [];\n for (let i = 0; i < array.length; i += components) {\n slicedArray.push(Array.from(array.slice(i, i + components)));\n }\n accessor._animation = slicedArray;\n }\n }\n\n return accessor._animation;\n}\n\n// TODO: share with GLTFInstantiator\nconst helperMatrix = new Matrix4();\nfunction applyTranslationRotationScale(gltfNode, node) {\n node.matrix.identity();\n\n if (gltfNode.translation) {\n node.matrix.translate(gltfNode.translation);\n }\n\n if (gltfNode.rotation) {\n const rotationMatrix = helperMatrix.fromQuaternion(gltfNode.rotation);\n node.matrix.multiplyRight(rotationMatrix);\n }\n\n if (gltfNode.scale) {\n node.matrix.scale(gltfNode.scale);\n }\n}\n\nconst quaternion = new Quaternion();\nfunction linearInterpolate(target, path, start, stop, ratio) {\n if (path === 'rotation') {\n // SLERP when path is rotation\n quaternion.slerp({start, target: stop, ratio});\n for (let i = 0; i < quaternion.length; i++) {\n target[path][i] = quaternion[i];\n }\n } else {\n // regular interpolation\n for (let i = 0; i < start.length; i++) {\n target[path][i] = ratio * stop[i] + (1 - ratio) * start[i];\n }\n }\n}\n\nfunction cubicsplineInterpolate(target, path, {p0, outTangent0, inTangent1, p1, tDiff, ratio: t}) {\n // TODO: Quaternion might need normalization\n for (let i = 0; i < target[path].length; i++) {\n const m0 = outTangent0[i] * tDiff;\n const m1 = inTangent1[i] * tDiff;\n target[path][i] =\n (2 * Math.pow(t, 3) - 3 * Math.pow(t, 2) + 1) * p0[i] +\n (Math.pow(t, 3) - 2 * Math.pow(t, 2) + t) * m0 +\n (-2 * Math.pow(t, 3) + 3 * Math.pow(t, 2)) * p1[i] +\n (Math.pow(t, 3) - Math.pow(t, 2)) * m1;\n }\n}\n\nfunction stepInterpolate(target, path, value) {\n for (let i = 0; i < value.length; i++) {\n target[path][i] = value[i];\n }\n}\n\nfunction interpolate(time, {input, interpolation, output}, target, path) {\n const maxTime = input[input.length - 1];\n const animationTime = time % maxTime;\n\n const nextIndex = input.findIndex(t => t >= animationTime);\n const previousIndex = Math.max(0, nextIndex - 1);\n\n if (!Array.isArray(target[path])) {\n switch (path) {\n case 'translation':\n target[path] = [0, 0, 0];\n break;\n\n case 'rotation':\n target[path] = [0, 0, 0, 1];\n break;\n\n case 'scale':\n target[path] = [1, 1, 1];\n break;\n\n default:\n log.warn(`Bad animation path ${path}`)();\n }\n }\n\n assert(target[path].length === output[previousIndex].length);\n const previousTime = input[previousIndex];\n const nextTime = input[nextIndex];\n\n switch (interpolation) {\n case 'STEP':\n stepInterpolate(target, path, output[previousIndex]);\n break;\n\n case 'LINEAR':\n if (nextTime > previousTime) {\n const ratio = (animationTime - previousTime) / (nextTime - previousTime);\n linearInterpolate(target, path, output[previousIndex], output[nextIndex], ratio);\n }\n break;\n\n case 'CUBICSPLINE':\n if (nextTime > previousTime) {\n const ratio = (animationTime - previousTime) / (nextTime - previousTime);\n const tDiff = nextTime - previousTime;\n\n const p0 = output[3 * previousIndex + 1];\n const outTangent0 = output[3 * previousIndex + 2];\n const inTangent1 = output[3 * nextIndex + 0];\n const p1 = output[3 * nextIndex + 1];\n\n cubicsplineInterpolate(target, path, {p0, outTangent0, inTangent1, p1, tDiff, ratio});\n }\n break;\n\n default:\n log.warn(`Interpolation ${interpolation} not supported`)();\n break;\n }\n}\n\nclass GLTFAnimation {\n constructor(props) {\n this.startTime = 0;\n this.playing = true;\n this.speed = 1;\n this.channels = [];\n\n Object.assign(this, props);\n }\n\n animate(timeMs) {\n if (!this.playing) {\n return;\n }\n\n const absTime = timeMs / 1000;\n const time = (absTime - this.startTime) * this.speed;\n\n this.channels.forEach(({sampler, target, path}) => {\n interpolate(time, sampler, target, path);\n applyTranslationRotationScale(target, target._node);\n });\n }\n}\n\nexport default class GLTFAnimator {\n constructor(gltf) {\n this.animations = gltf.animations.map((animation, index) => {\n const name = animation.name || `Animation-${index}`;\n const samplers = animation.samplers.map(({input, interpolation = 'LINEAR', output}) => ({\n input: accessorToJsArray(gltf.accessors[input]),\n interpolation,\n output: accessorToJsArray(gltf.accessors[output])\n }));\n const channels = animation.channels.map(({sampler, target}) => ({\n sampler: samplers[sampler],\n target: gltf.nodes[target.node],\n path: target.path\n }));\n return new GLTFAnimation({name, channels});\n });\n }\n\n // TODO(Tarek): This should be removed? (deck.gl is using this)\n animate(time) {\n this.setTime(time);\n }\n\n setTime(time) {\n this.animations.forEach(animation => animation.animate(time));\n }\n\n getAnimations() {\n return this.animations;\n }\n}\n","import {Model} from '@luma.gl/engine';\nimport ScenegraphNode from './scenegraph-node';\n\nexport default class ModelNode extends ScenegraphNode {\n constructor(gl, props = {}) {\n super(props);\n\n // pverride callbacks to make sure we call them with this\n this.onBeforeRender = null;\n this.AfterRender = null;\n\n // Create new Model or used supplied Model\n if (gl instanceof Model) {\n this.model = gl;\n this._setModelNodeProps(props);\n } else {\n this.model = new Model(gl, props);\n }\n\n this.managedResources = props.managedResources || [];\n }\n\n setProps(props) {\n super.setProps(props);\n this._setModelNodeProps(props);\n return this;\n }\n\n delete() {\n if (this.model) {\n this.model.delete();\n this.model = null;\n }\n\n this.managedResources.forEach(resource => resource.delete());\n this.managedResources = [];\n }\n\n // Forward node methods\n draw(...args) {\n // Return value indicates if something was actually drawn\n return this.model.draw(...args);\n }\n\n setUniforms(...args) {\n this.model.setUniforms(...args);\n return this;\n }\n\n setAttributes(...args) {\n this.model.setAttributes(...args);\n return this;\n }\n\n updateModuleSettings(...args) {\n this.model.updateModuleSettings(...args);\n return this;\n }\n\n // PRIVATE\n\n _setModelNodeProps(props) {\n this.model.setProps(props);\n }\n}\n","import {isWebGL2} from '@luma.gl/gltools';\nimport {log} from '@luma.gl/webgl';\nimport {pbr} from '@luma.gl/shadertools';\nimport ModelNode from '../scenegraph/model-node';\nimport GLTFMaterialParser from './gltf-material-parser';\n\nconst vs = `\n#if (__VERSION__ < 300)\n #define _attr attribute\n#else\n #define _attr in\n#endif\n\n _attr vec4 POSITION;\n\n #ifdef HAS_NORMALS\n _attr vec4 NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _attr vec4 TANGENT;\n #endif\n\n #ifdef HAS_UV\n _attr vec2 TEXCOORD_0;\n #endif\n\n void main(void) {\n vec4 _NORMAL = vec4(0.);\n vec4 _TANGENT = vec4(0.);\n vec2 _TEXCOORD_0 = vec2(0.);\n\n #ifdef HAS_NORMALS\n _NORMAL = NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _TANGENT = TANGENT;\n #endif\n\n #ifdef HAS_UV\n _TEXCOORD_0 = TEXCOORD_0;\n #endif\n\n pbr_setPositionNormalTangentUV(POSITION, _NORMAL, _TANGENT, _TEXCOORD_0);\n gl_Position = u_MVPMatrix * POSITION;\n }\n`;\n\nconst fs = `\n#if (__VERSION__ < 300)\n #define fragmentColor gl_FragColor\n#else\n out vec4 fragmentColor;\n#endif\n\n void main(void) {\n fragmentColor = pbr_filterColor(vec4(0));\n }\n`;\n\nfunction addVersionToShader(gl, source) {\n if (isWebGL2(gl)) {\n return `#version 300 es\\n${source}`;\n }\n\n return source;\n}\n\nexport default function createGLTFModel(gl, options) {\n const {id, drawMode, vertexCount, attributes, modelOptions} = options;\n const materialParser = new GLTFMaterialParser(gl, options);\n\n log.info(4, 'createGLTFModel defines: ', materialParser.defines)();\n\n // Calculate managedResources\n // TODO: Implement resource management logic that will\n // not deallocate resources/textures/buffers that are shared\n const managedResources = [];\n managedResources.push(...materialParser.generatedTextures);\n managedResources.push(...Object.values(attributes).map(attribute => attribute.buffer));\n\n const model = new ModelNode(\n gl,\n Object.assign(\n {\n id,\n drawMode,\n vertexCount,\n modules: [pbr],\n defines: materialParser.defines,\n parameters: materialParser.parameters,\n vs: addVersionToShader(gl, vs),\n fs: addVersionToShader(gl, fs),\n managedResources\n },\n modelOptions\n )\n );\n\n model.setProps({attributes});\n model.setUniforms(materialParser.uniforms);\n\n return model;\n}\n","import {Matrix4} from '@math.gl/core';\nimport {Buffer, Accessor, log} from '@luma.gl/webgl';\nimport GroupNode from '../scenegraph/group-node';\n\nimport GLTFAnimator from './gltf-animator';\nimport createGLTFModel from './create-gltf-model';\n\n// TODO: import {ATTRIBUTE_TYPE_TO_COMPONENTS} from '@loaders.gl/gltf';\nconst ATTRIBUTE_TYPE_TO_COMPONENTS = {\n SCALAR: 1,\n VEC2: 2,\n VEC3: 3,\n VEC4: 4,\n MAT2: 4,\n MAT3: 9,\n MAT4: 16\n};\n\nconst DEFAULT_OPTIONS = {\n modelOptions: {},\n pbrDebug: false,\n imageBasedLightingEnvironment: null,\n lights: true,\n useTangents: false\n};\n\n// GLTF instantiator for luma.gl\n// Walks the parsed and resolved glTF structure and builds a luma.gl scenegraph\nexport default class GLTFInstantiator {\n constructor(gl, options = {}) {\n this.gl = gl;\n this.options = Object.assign({}, DEFAULT_OPTIONS, options);\n }\n\n instantiate(gltf) {\n this.gltf = gltf;\n const scenes = (gltf.scenes || []).map(scene => this.createScene(scene));\n return scenes;\n }\n\n createAnimator() {\n if (Array.isArray(this.gltf.animations)) {\n return new GLTFAnimator(this.gltf);\n }\n\n return null;\n }\n\n createScene(gltfScene) {\n const gltfNodes = gltfScene.nodes || [];\n const nodes = gltfNodes.map(node => this.createNode(node));\n const scene = new GroupNode({\n id: gltfScene.name || gltfScene.id,\n children: nodes\n });\n return scene;\n }\n\n createNode(gltfNode) {\n if (!gltfNode._node) {\n const gltfChildren = gltfNode.children || [];\n const children = gltfChildren.map(child => this.createNode(child));\n\n // Node can have children nodes and meshes at the same time\n if (gltfNode.mesh) {\n children.push(this.createMesh(gltfNode.mesh));\n }\n\n const node = new GroupNode({\n id: gltfNode.name || gltfNode.id,\n children\n });\n\n if (gltfNode.matrix) {\n node.setMatrix(gltfNode.matrix);\n } else {\n node.matrix.identity();\n\n if (gltfNode.translation) {\n node.matrix.translate(gltfNode.translation);\n }\n\n if (gltfNode.rotation) {\n const rotationMatrix = new Matrix4().fromQuaternion(gltfNode.rotation);\n node.matrix.multiplyRight(rotationMatrix);\n }\n\n if (gltfNode.scale) {\n node.matrix.scale(gltfNode.scale);\n }\n }\n gltfNode._node = node;\n }\n\n return gltfNode._node;\n }\n\n createMesh(gltfMesh) {\n // TODO: avoid changing the gltf\n if (!gltfMesh._mesh) {\n const gltfPrimitives = gltfMesh.primitives || [];\n const primitives = gltfPrimitives.map((gltfPrimitive, i) =>\n this.createPrimitive(gltfPrimitive, i, gltfMesh)\n );\n const mesh = new GroupNode({\n id: gltfMesh.name || gltfMesh.id,\n children: primitives\n });\n gltfMesh._mesh = mesh;\n }\n\n return gltfMesh._mesh;\n }\n\n getVertexCount(attributes) {\n // TODO: implement this\n log.warn('getVertexCount() not found')();\n }\n\n createPrimitive(gltfPrimitive, i, gltfMesh) {\n return createGLTFModel(\n this.gl,\n Object.assign(\n {\n id: gltfPrimitive.name || `${gltfMesh.name || gltfMesh.id}-primitive-${i}`,\n drawMode: gltfPrimitive.mode || 4,\n vertexCount: gltfPrimitive.indices\n ? gltfPrimitive.indices.count\n : this.getVertexCount(gltfPrimitive.attributes),\n attributes: this.createAttributes(gltfPrimitive.attributes, gltfPrimitive.indices),\n material: gltfPrimitive.material\n },\n this.options\n )\n );\n }\n\n createAttributes(attributes, indices) {\n const loadedAttributes = {};\n\n Object.keys(attributes).forEach(attrName => {\n loadedAttributes[attrName] = this.createAccessor(\n attributes[attrName],\n this.createBuffer(attributes[attrName], this.gl.ARRAY_BUFFER)\n );\n });\n\n if (indices) {\n loadedAttributes.indices = this.createAccessor(\n indices,\n this.createBuffer(indices, this.gl.ELEMENT_ARRAY_BUFFER)\n );\n }\n\n log.info(4, 'glTF Attributes', {attributes, indices, generated: loadedAttributes})();\n\n return loadedAttributes;\n }\n\n createBuffer(attribute, target) {\n if (!attribute.bufferView) {\n // Draco decoded files do not have a bufferView\n attribute.bufferView = {};\n }\n\n const {bufferView} = attribute;\n if (!bufferView.lumaBuffers) {\n bufferView.lumaBuffers = {};\n }\n\n if (!bufferView.lumaBuffers[target]) {\n bufferView.lumaBuffers[target] = new Buffer(this.gl, {\n id: `from-${bufferView.id}`,\n // Draco decoded files have attribute.value\n data: bufferView.data || attribute.value,\n target\n });\n }\n\n return bufferView.lumaBuffers[target];\n }\n\n createAccessor(accessor, buffer) {\n return new Accessor({\n buffer,\n offset: accessor.byteOffset || 0,\n stride: accessor.bufferView.byteStride || 0,\n type: accessor.componentType,\n size: ATTRIBUTE_TYPE_TO_COMPONENTS[accessor.type]\n });\n }\n\n // TODO - create sampler in WebGL2\n createSampler(gltfSampler) {\n return gltfSampler;\n }\n\n // Helper methods (move to GLTFLoader.resolve...?)\n\n needsPOT() {\n // Has a wrapping mode (either wrapS or wrapT) equal to REPEAT or MIRRORED_REPEAT, or\n // Has a minification filter (minFilter) that uses mipmapping\n // (NEAREST_MIPMAP_NEAREST, NEAREST_MIPMAP_LINEAR,\n // LINEAR_MIPMAP_NEAREST, or LINEAR_MIPMAP_LINEAR).\n return false;\n }\n}\n","/* global requestAnimationFrame */\n\nexport async function waitForGLTFAssets(gltfObjects) {\n const remaining = [];\n\n gltfObjects.scenes.forEach(scene => {\n scene.traverse(model => {\n Object.values(model.model.getUniforms()).forEach(uniform => {\n if (uniform.loaded === false) {\n remaining.push(uniform);\n }\n });\n });\n });\n\n return await waitWhileCondition(() => remaining.some(uniform => !uniform.loaded));\n}\n\nasync function waitWhileCondition(condition) {\n while (condition()) {\n await new Promise(resolve => requestAnimationFrame(resolve));\n }\n}\n","// Copyright (c) 2019 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, picking, log} from '@deck.gl/core';\nimport {isWebGL2} from '@luma.gl/core';\nimport {pbr} from '@luma.gl/shadertools';\nimport {ScenegraphNode, createGLTFObjects} from '@luma.gl/experimental';\nimport GL from '@luma.gl/constants';\nimport {GLTFLoader} from '@loaders.gl/gltf';\nimport {waitForGLTFAssets} from './gltf-utils';\n\nimport {MATRIX_ATTRIBUTES, shouldComposeModelMatrix} from '../utils/matrix';\n\nimport vs from './scenegraph-layer-vertex.glsl';\nimport fs from './scenegraph-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [255, 255, 255, 255];\n\nconst defaultProps = {\n scenegraph: {type: 'object', value: null, async: true},\n getScene: gltf => {\n if (gltf && gltf.scenes) {\n // gltf post processor replaces `gltf.scene` number with the scene `object`\n return typeof gltf.scene === 'object' ? gltf.scene : gltf.scenes[gltf.scene || 0];\n }\n return gltf;\n },\n getAnimator: scenegraph => scenegraph && scenegraph.animator,\n _animations: null,\n\n sizeScale: {type: 'number', value: 1, min: 0},\n sizeMinPixels: {type: 'number', min: 0, value: 0},\n sizeMaxPixels: {type: 'number', min: 0, value: Number.MAX_SAFE_INTEGER},\n\n getPosition: {type: 'accessor', value: x => x.position},\n getColor: {type: 'accessor', value: DEFAULT_COLOR},\n\n // flat or pbr\n _lighting: 'flat',\n // _lighting must be pbr for this to work\n _imageBasedLightingEnvironment: null,\n\n // yaw, pitch and roll are in degrees\n // https://en.wikipedia.org/wiki/Euler_angles\n // [pitch, yaw, roll]\n getOrientation: {type: 'accessor', value: [0, 0, 0]},\n getScale: {type: 'accessor', value: [1, 1, 1]},\n getTranslation: {type: 'accessor', value: [0, 0, 0]},\n // 4x4 matrix\n getTransformMatrix: {type: 'accessor', value: []},\n\n loaders: [GLTFLoader]\n};\n\nexport default class ScenegraphLayer extends Layer {\n getShaders() {\n const modules = [project32, picking];\n\n if (this.props._lighting === 'pbr') {\n modules.push(pbr);\n }\n\n return {vs, fs, modules};\n }\n\n initializeState() {\n const attributeManager = this.getAttributeManager();\n attributeManager.addInstanced({\n instancePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n accessor: 'getPosition',\n transition: true\n },\n instanceColors: {\n type: GL.UNSIGNED_BYTE,\n size: this.props.colorFormat.length,\n accessor: 'getColor',\n normalized: true,\n defaultValue: DEFAULT_COLOR,\n transition: true\n },\n instanceModelMatrix: MATRIX_ATTRIBUTES\n });\n }\n\n updateState(params) {\n super.updateState(params);\n const {props, oldProps} = params;\n\n if (props.scenegraph !== oldProps.scenegraph) {\n this._updateScenegraph(props);\n } else if (props._animations !== oldProps._animations) {\n this._applyAnimationsProp(this.state.scenegraph, this.state.animator, props._animations);\n }\n }\n\n finalizeState() {\n super.finalizeState();\n this._deleteScenegraph();\n }\n\n _updateScenegraph(props) {\n const {gl} = this.context;\n let scenegraphData = null;\n if (props.scenegraph instanceof ScenegraphNode) {\n // Signature 1: props.scenegraph is a proper luma.gl Scenegraph\n scenegraphData = {scenes: [props.scenegraph]};\n } else if (props.scenegraph && !props.scenegraph.gltf) {\n // Converts loaders.gl gltf to luma.gl scenegraph using the undocumented @luma.gl/experimental function\n const gltf = props.scenegraph;\n const gltfObjects = createGLTFObjects(gl, gltf, this._getModelOptions());\n scenegraphData = {gltf, ...gltfObjects};\n\n waitForGLTFAssets(gltfObjects).then(() => this.setNeedsRedraw());\n } else if (props.scenegraph) {\n // DEPRECATED PATH: Assumes this data was loaded through GLTFScenegraphLoader\n log.deprecated(\n 'ScenegraphLayer.props.scenegraph',\n 'Use GLTFLoader instead of GLTFScenegraphLoader'\n )();\n scenegraphData = props.scenegraph;\n }\n\n const options = {layer: this, gl};\n const scenegraph = props.getScene(scenegraphData, options);\n const animator = props.getAnimator(scenegraphData, options);\n\n if (scenegraph instanceof ScenegraphNode) {\n this._deleteScenegraph();\n this._applyAllAttributes(scenegraph);\n this._applyAnimationsProp(scenegraph, animator, props._animations);\n this.setState({scenegraph, animator});\n } else if (scenegraph !== null) {\n log.warn('invalid scenegraph:', scenegraph)();\n }\n }\n\n _applyAllAttributes(scenegraph) {\n if (this.state.attributesAvailable) {\n const allAttributes = this.getAttributeManager().getAttributes();\n scenegraph.traverse(model => {\n this._setModelAttributes(model.model, allAttributes);\n });\n }\n }\n\n _applyAnimationsProp(scenegraph, animator, animationsProp) {\n if (!scenegraph || !animator || !animationsProp) {\n return;\n }\n\n const animations = animator.getAnimations();\n\n // sort() to ensure '*' comes first so that other values can override\n Object.keys(animationsProp)\n .sort()\n .forEach(key => {\n // Key can be:\n // - number for index number\n // - name for animation name\n // - * to affect all animations\n const value = animationsProp[key];\n\n if (key === '*') {\n animations.forEach(animation => {\n Object.assign(animation, value);\n });\n } else if (Number.isFinite(Number(key))) {\n const number = Number(key);\n if (number >= 0 && number < animations.length) {\n Object.assign(animations[number], value);\n } else {\n log.warn(`animation ${key} not found`)();\n }\n } else {\n const findResult = animations.find(({name}) => name === key);\n if (findResult) {\n Object.assign(findResult, value);\n } else {\n log.warn(`animation ${key} not found`)();\n }\n }\n });\n }\n\n _deleteScenegraph() {\n const {scenegraph} = this.state;\n if (scenegraph instanceof ScenegraphNode) {\n scenegraph.delete();\n }\n }\n\n _getModelOptions() {\n const {_imageBasedLightingEnvironment} = this.props;\n\n let env = null;\n if (_imageBasedLightingEnvironment) {\n if (typeof _imageBasedLightingEnvironment === 'function') {\n env = _imageBasedLightingEnvironment({gl: this.context.gl, layer: this});\n } else {\n env = _imageBasedLightingEnvironment;\n }\n }\n\n return {\n gl: this.context.gl,\n waitForFullLoad: true,\n imageBasedLightingEnvironment: env,\n modelOptions: {\n isInstanced: true,\n transpileToGLSL100: !isWebGL2(this.context.gl),\n ...this.getShaders()\n },\n // tangents are not supported\n useTangents: false\n };\n }\n\n updateAttributes(changedAttributes) {\n this.setState({attributesAvailable: true});\n if (!this.state.scenegraph) return;\n\n this.state.scenegraph.traverse(model => {\n this._setModelAttributes(model.model, changedAttributes);\n });\n }\n\n draw({moduleParameters = null, parameters = {}, context}) {\n if (!this.state.scenegraph) return;\n\n if (this.props._animations && this.state.animator) {\n this.state.animator.animate(context.timeline.getTime());\n this.setNeedsRedraw();\n }\n\n const {viewport} = this.context;\n const {sizeScale, sizeMinPixels, sizeMaxPixels, opacity, coordinateSystem} = this.props;\n const numInstances = this.getNumInstances();\n this.state.scenegraph.traverse((model, {worldMatrix}) => {\n model.model.setInstanceCount(numInstances);\n model.updateModuleSettings(moduleParameters);\n model.draw({\n parameters,\n uniforms: {\n sizeScale,\n opacity,\n sizeMinPixels,\n sizeMaxPixels,\n composeModelMatrix: shouldComposeModelMatrix(viewport, coordinateSystem),\n sceneModelMatrix: worldMatrix,\n // Needed for PBR (TODO: find better way to get it)\n u_Camera: model.model.getUniforms().project_uCameraPosition\n }\n });\n });\n }\n}\n\nScenegraphLayer.layerName = 'ScenegraphLayer';\nScenegraphLayer.defaultProps = defaultProps;\n","export default `\\\n#version 300 es\n\n// Instance attributes\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\n\n// Uniforms\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform mat4 sceneModelMatrix;\nuniform bool composeModelMatrix;\n\n// Attributes\nin vec4 POSITION;\n\n#ifdef HAS_UV\n in vec2 TEXCOORD_0;\n#endif\n\n#ifdef MODULE_PBR\n #ifdef HAS_NORMALS\n in vec4 NORMAL;\n #endif\n#endif\n\n// Varying\nout vec4 vColor;\n\n// MODULE_PBR contains all the varying definitions needed\n#ifndef MODULE_PBR\n #ifdef HAS_UV\n out vec2 vTEXCOORD_0;\n #endif\n#endif\n\n// Main\nvoid main(void) {\n #if defined(HAS_UV) && !defined(MODULE_PBR)\n vTEXCOORD_0 = TEXCOORD_0;\n geometry.uv = vTEXCOORD_0;\n #endif\n\n geometry.worldPosition = instancePositions;\n geometry.pickingColor = instancePickingColors;\n\n #ifdef MODULE_PBR\n // set PBR data\n #ifdef HAS_NORMALS\n pbr_vNormal = project_normal(instanceModelMatrix * (sceneModelMatrix * vec4(NORMAL.xyz, 0.0)).xyz);\n geometry.normal = pbr_vNormal;\n #endif\n\n #ifdef HAS_UV\n pbr_vUV = TEXCOORD_0;\n #else\n pbr_vUV = vec2(0., 0.);\n #endif\n geometry.uv = pbr_vUV;\n #endif\n\n float originalSize = project_size_to_pixel(sizeScale);\n float clampedSize = clamp(originalSize, sizeMinPixels, sizeMaxPixels);\n\n vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale * (clampedSize / originalSize) + instanceTranslation;\n if(composeModelMatrix) {\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n }\n else {\n pos = project_size(pos);\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, geometry.position);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n #ifdef MODULE_PBR\n // set PBR data\n pbr_vPosition = geometry.position.xyz;\n #endif\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","export default `\\\n#version 300 es\n\n// Uniforms\nuniform float opacity;\n\n// Varying\nin vec4 vColor;\n\nout vec4 fragmentColor;\n\n// MODULE_PBR contains all the varying definitions needed\n#ifndef MODULE_PBR\n #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n in vec2 vTEXCOORD_0;\n uniform sampler2D u_BaseColorSampler;\n #endif\n#endif\n\nvoid main(void) {\n #ifdef MODULE_PBR\n fragmentColor = vColor * pbr_filterColor(vec4(0));\n geometry.uv = pbr_vUV;\n #else\n #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n fragmentColor = vColor * texture2D(u_BaseColorSampler, vTEXCOORD_0);\n geometry.uv = vTEXCOORD_0;\n #else\n fragmentColor = vColor;\n #endif\n #endif\n\n fragmentColor.a *= opacity;\n DECKGL_FILTER_COLOR(fragmentColor, geometry);\n}\n`;\n","import GLTFInstantiator from './gltf-instantiator';\n\nexport default function createGLTFObjects(gl, gltf, options) {\n const instantiator = new GLTFInstantiator(gl, options);\n const scenes = instantiator.instantiate(gltf);\n const animator = instantiator.createAnimator();\n\n return {scenes, animator};\n}\n","// This module implement some utility functions to work with\n// the geojson-binary format defined at loaders.gl:\n// https://github.com/visgl/loaders.gl/blob/master/modules/gis/docs/api-reference/geojson-to-binary.md\n\n/**\n * Return the feature for an accesor\n *\n * @param {Object} data - The data in binary format\n * @param {Number} index - The requested index\n */\nexport function binaryToFeatureForAccesor(data, index) {\n if (!data) {\n return null;\n }\n\n const featureIndex = 'startIndices' in data ? data.startIndices[index] : index;\n const geometryIndex = data.featureIds.value[featureIndex];\n\n if (featureIndex !== -1) {\n return getPropertiesForIndex(data, geometryIndex, featureIndex);\n }\n\n return null;\n}\n\nfunction getPropertiesForIndex(data, propertiesIndex, numericPropsIndex) {\n const feature = {\n properties: {...data.properties[propertiesIndex]}\n };\n\n for (const prop in data.numericProps) {\n feature.properties[prop] = data.numericProps[prop].value[numericPropsIndex];\n }\n\n return feature;\n}\n\n// Custom picking color to keep binary indexes\nexport function calculatePickingColors(geojsonBinary, encodePickingColor) {\n const pickingColors = {\n points: null,\n lines: null,\n polygons: null\n };\n for (const key in pickingColors) {\n const featureIds = geojsonBinary[key].globalFeatureIds.value;\n pickingColors[key] = new Uint8ClampedArray(featureIds.length * 3);\n const pickingColor = [];\n for (let i = 0; i < featureIds.length; i++) {\n encodePickingColor(featureIds[i], pickingColor);\n pickingColors[key][i * 3 + 0] = pickingColor[0];\n pickingColors[key][i * 3 + 1] = pickingColor[1];\n pickingColors[key][i * 3 + 2] = pickingColor[2];\n }\n }\n\n return pickingColors;\n}\n","import IconLayer from '../icon-layer/icon-layer';\nimport ScatterplotLayer from '../scatterplot-layer/scatterplot-layer';\nimport TextLayer from '../text-layer/text-layer';\nimport PathLayer from '../path-layer/path-layer';\nimport SolidPolygonLayer from '../solid-polygon-layer/solid-polygon-layer';\n\nexport const POINT_LAYER = {\n circle: {\n type: ScatterplotLayer,\n props: {\n filled: 'filled',\n stroked: 'stroked',\n\n lineWidthMaxPixels: 'lineWidthMaxPixels',\n lineWidthMinPixels: 'lineWidthMinPixels',\n lineWidthScale: 'lineWidthScale',\n lineWidthUnits: 'lineWidthUnits',\n pointRadiusMaxPixels: 'radiusMaxPixels',\n pointRadiusMinPixels: 'radiusMinPixels',\n pointRadiusScale: 'radiusScale',\n pointRadiusUnits: 'radiusUnits',\n pointAntialiasing: 'antialiasing',\n\n getFillColor: 'getFillColor',\n getLineColor: 'getLineColor',\n getLineWidth: 'getLineWidth',\n getPointRadius: 'getRadius'\n }\n },\n icon: {\n type: IconLayer,\n props: {\n iconAtlas: 'iconAtlas',\n iconMapping: 'iconMapping',\n\n iconSizeMaxPixels: 'sizeMaxPixels',\n iconSizeMinPixels: 'sizeMinPixels',\n iconSizeScale: 'sizeScale',\n iconSizeUnits: 'sizeUnits',\n\n getIcon: 'getIcon',\n getIconAngle: 'getAngle',\n getIconColor: 'getColor',\n getIconPixelOffset: 'getPixelOffset',\n getIconSize: 'getSize'\n }\n },\n text: {\n type: TextLayer,\n props: {\n textSizeMaxPixels: 'sizeMaxPixels',\n textSizeMinPixels: 'sizeMinPixels',\n textSizeScale: 'sizeScale',\n textSizeUnits: 'sizeUnits',\n\n textBackground: 'background',\n textBackgroundPadding: 'backgroundPadding',\n textFontFamily: 'fontFamily',\n textFontWeight: 'fontWeight',\n textLineHeight: 'lineHeight',\n textMaxWidth: 'maxWidth',\n textOutlineColor: 'outlineColor',\n textOutlineWidth: 'outlineWidth',\n textWordBreak: 'wordBreak',\n textCharacterSet: 'characterSet',\n\n getText: 'getText',\n getTextAngle: 'getAngle',\n getTextColor: 'getColor',\n getTextPixelOffset: 'getPixelOffset',\n getTextSize: 'getSize',\n getTextAnchor: 'getTextAnchor',\n getTextAlignmentBaseline: 'getAlignmentBaseline',\n getTextBackgroundColor: 'getBackgroundColor',\n getTextBorderColor: 'getBorderColor',\n getTextBorderWidth: 'getBorderWidth'\n }\n }\n};\n\nexport const LINE_LAYER = {\n type: PathLayer,\n props: {\n lineWidthUnits: 'widthUnits',\n lineWidthScale: 'widthScale',\n lineWidthMinPixels: 'widthMinPixels',\n lineWidthMaxPixels: 'widthMaxPixels',\n lineJointRounded: 'jointRounded',\n lineCapRounded: 'capRounded',\n lineMiterLimit: 'miterLimit',\n\n getLineColor: 'getColor',\n getLineWidth: 'getWidth'\n }\n};\n\nexport const POLYGON_LAYER = {\n type: SolidPolygonLayer,\n props: {\n extruded: 'extruded',\n filled: 'filled',\n wireframe: 'wireframe',\n elevationScale: 'elevationScale',\n material: 'material',\n\n getElevation: 'getElevation',\n getFillColor: 'getFillColor',\n getLineColor: 'getLineColor'\n }\n};\n\nexport function getDefaultProps({type, props}) {\n const result = {};\n for (const key in props) {\n result[key] = type.defaultProps[props[key]];\n }\n return result;\n}\n\nexport function forwardProps(layer, mapping) {\n const {transitions, updateTriggers} = layer.props;\n const result = {\n updateTriggers: {},\n transitions: transitions && {\n getPosition: transitions.geometry\n }\n };\n\n for (const sourceKey in mapping) {\n const targetKey = mapping[sourceKey];\n let value = layer.props[sourceKey];\n if (sourceKey.startsWith('get')) {\n // isAccessor\n value = layer.getSubLayerAccessor(value);\n result.updateTriggers[targetKey] = updateTriggers[sourceKey];\n if (transitions) {\n result.transitions[targetKey] = transitions[sourceKey];\n }\n }\n result[targetKey] = value;\n }\n return result;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\nimport {log} from '@deck.gl/core';\n\n/**\n * \"Normalizes\" complete or partial GeoJSON data into iterable list of features\n * Can accept GeoJSON geometry or \"Feature\", \"FeatureCollection\" in addition\n * to plain arrays and iterables.\n * Works by extracting the feature array or wrapping single objects in an array,\n * so that subsequent code can simply iterate over features.\n *\n * @param {object} geojson - geojson data\n * @param {Object|Array} data - geojson object (FeatureCollection, Feature or\n * Geometry) or array of features\n * @return {Array|\"iteratable\"} - iterable list of features\n */\nexport function getGeojsonFeatures(geojson) {\n // If array, assume this is a list of features\n if (Array.isArray(geojson)) {\n return geojson;\n }\n\n log.assert(geojson.type, 'GeoJSON does not have type');\n\n switch (geojson.type) {\n case 'Feature':\n // Wrap the feature in a 'Features' array\n return [geojson];\n case 'FeatureCollection':\n // Just return the 'Features' array from the collection\n log.assert(Array.isArray(geojson.features), 'GeoJSON does not have features array');\n return geojson.features;\n default:\n // Assume it's a geometry, we'll check type in separateGeojsonFeatures\n // Wrap the geometry object in a 'Feature' object and wrap in an array\n return [{geometry: geojson}];\n }\n}\n\n// Linearize\nexport function separateGeojsonFeatures(features, wrapFeature, dataRange = {}) {\n const separated = {\n pointFeatures: [],\n lineFeatures: [],\n polygonFeatures: [],\n polygonOutlineFeatures: []\n };\n const {startRow = 0, endRow = features.length} = dataRange;\n\n for (let featureIndex = startRow; featureIndex < endRow; featureIndex++) {\n const feature = features[featureIndex];\n\n log.assert(feature && feature.geometry, 'GeoJSON does not have geometry');\n\n const {geometry} = feature;\n\n if (geometry.type === 'GeometryCollection') {\n log.assert(Array.isArray(geometry.geometries), 'GeoJSON does not have geometries array');\n const {geometries} = geometry;\n for (let i = 0; i < geometries.length; i++) {\n const subGeometry = geometries[i];\n separateGeometry(subGeometry, separated, wrapFeature, feature, featureIndex);\n }\n } else {\n separateGeometry(geometry, separated, wrapFeature, feature, featureIndex);\n }\n }\n\n return separated;\n}\n\nfunction separateGeometry(geometry, separated, wrapFeature, sourceFeature, sourceFeatureIndex) {\n const {type, coordinates} = geometry;\n const {pointFeatures, lineFeatures, polygonFeatures, polygonOutlineFeatures} = separated;\n\n if (!validateGeometry(type, coordinates)) {\n // Avoid hard failure if some features are malformed\n log.warn(`${type} coordinates are malformed`)();\n return;\n }\n\n // Split each feature, but keep track of the source feature and index (for Multi* geometries)\n switch (type) {\n case 'Point':\n pointFeatures.push(\n wrapFeature(\n {\n geometry\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n break;\n case 'MultiPoint':\n coordinates.forEach(point => {\n pointFeatures.push(\n wrapFeature(\n {\n geometry: {type: 'Point', coordinates: point}\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n });\n break;\n case 'LineString':\n lineFeatures.push(\n wrapFeature(\n {\n geometry\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n break;\n case 'MultiLineString':\n // Break multilinestrings into multiple lines\n coordinates.forEach(path => {\n lineFeatures.push(\n wrapFeature(\n {\n geometry: {type: 'LineString', coordinates: path}\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n });\n break;\n case 'Polygon':\n polygonFeatures.push(\n wrapFeature(\n {\n geometry\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n // Break polygon into multiple lines\n coordinates.forEach(path => {\n polygonOutlineFeatures.push(\n wrapFeature(\n {\n geometry: {type: 'LineString', coordinates: path}\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n });\n break;\n case 'MultiPolygon':\n // Break multipolygons into multiple polygons\n coordinates.forEach(polygon => {\n polygonFeatures.push(\n wrapFeature(\n {\n geometry: {type: 'Polygon', coordinates: polygon}\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n // Break polygon into multiple lines\n polygon.forEach(path => {\n polygonOutlineFeatures.push(\n wrapFeature(\n {\n geometry: {type: 'LineString', coordinates: path}\n },\n sourceFeature,\n sourceFeatureIndex\n )\n );\n });\n });\n break;\n default:\n }\n}\n\n/**\n * Simple GeoJSON validation util. For perf reasons we do not validate against the full spec,\n * only the following:\n - geometry.type is supported\n - geometry.coordinate has correct nesting level\n */\nconst COORDINATE_NEST_LEVEL = {\n Point: 1,\n MultiPoint: 2,\n LineString: 2,\n MultiLineString: 3,\n Polygon: 3,\n MultiPolygon: 4\n};\n\nexport function validateGeometry(type, coordinates) {\n let nestLevel = COORDINATE_NEST_LEVEL[type];\n\n log.assert(nestLevel, `Unknown GeoJSON type ${type}`);\n\n while (coordinates && --nestLevel > 0) {\n coordinates = coordinates[0];\n }\n\n return coordinates && Number.isFinite(coordinates[0]);\n}\n","import {calculatePickingColors} from './geojson-binary';\n\nfunction createEmptyLayerProps() {\n return {\n points: {},\n lines: {},\n polygons: {},\n polygonsOutline: {}\n };\n}\n\nfunction getCoordinates(f) {\n return f.geometry.coordinates;\n}\n\nexport function createLayerPropsFromFeatures(features, featuresDiff) {\n const layerProps = createEmptyLayerProps();\n const {pointFeatures, lineFeatures, polygonFeatures, polygonOutlineFeatures} = features;\n\n layerProps.points.data = pointFeatures;\n layerProps.points._dataDiff = featuresDiff.pointFeatures && (() => featuresDiff.pointFeatures);\n layerProps.points.getPosition = getCoordinates;\n\n layerProps.lines.data = lineFeatures;\n layerProps.lines._dataDiff = featuresDiff.lineFeatures && (() => featuresDiff.lineFeatures);\n layerProps.lines.getPath = getCoordinates;\n\n layerProps.polygons.data = polygonFeatures;\n layerProps.polygons._dataDiff =\n featuresDiff.polygonFeatures && (() => featuresDiff.polygonFeatures);\n layerProps.polygons.getPolygon = getCoordinates;\n\n layerProps.polygonsOutline.data = polygonOutlineFeatures;\n layerProps.polygonsOutline._dataDiff =\n featuresDiff.polygonOutlineFeatures && (() => featuresDiff.polygonOutlineFeatures);\n layerProps.polygonsOutline.getPath = getCoordinates;\n\n return layerProps;\n}\n\nexport function createLayerPropsFromBinary(geojsonBinary, encodePickingColor) {\n const layerProps = createEmptyLayerProps();\n const {points, lines, polygons} = geojsonBinary;\n\n const customPickingColors = calculatePickingColors(geojsonBinary, encodePickingColor);\n\n layerProps.points.data = {\n length: points.positions.value.length / points.positions.size,\n attributes: {\n getPosition: points.positions,\n instancePickingColors: {\n size: 3,\n value: customPickingColors.points\n }\n },\n properties: points.properties,\n numericProps: points.numericProps,\n featureIds: points.featureIds\n };\n\n layerProps.lines.data = {\n length: lines.pathIndices.value.length - 1,\n startIndices: lines.pathIndices.value,\n attributes: {\n getPath: lines.positions,\n instancePickingColors: {\n size: 3,\n value: customPickingColors.lines\n }\n },\n properties: lines.properties,\n numericProps: lines.numericProps,\n featureIds: lines.featureIds\n };\n layerProps.lines._pathType = 'open';\n\n layerProps.polygons.data = {\n length: polygons.polygonIndices.value.length - 1,\n startIndices: polygons.polygonIndices.value,\n attributes: {\n getPolygon: polygons.positions,\n pickingColors: {\n size: 3,\n value: customPickingColors.polygons\n }\n },\n properties: polygons.properties,\n numericProps: polygons.numericProps,\n featureIds: polygons.featureIds\n };\n layerProps.polygons._normalize = false;\n if (polygons.triangles) {\n layerProps.polygons.data.attributes.indices = polygons.triangles.value;\n }\n\n layerProps.polygonsOutline.data = {\n length: polygons.primitivePolygonIndices.value.length - 1,\n startIndices: polygons.primitivePolygonIndices.value,\n attributes: {\n getPath: polygons.positions,\n instancePickingColors: {\n size: 3,\n value: customPickingColors.polygons\n }\n },\n properties: polygons.properties,\n numericProps: polygons.numericProps,\n featureIds: polygons.featureIds\n };\n layerProps.polygonsOutline._pathType = 'open';\n\n return layerProps;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {CompositeLayer, log} from '@deck.gl/core';\nimport {replaceInRange} from '../utils';\nimport {binaryToFeatureForAccesor} from './geojson-binary';\nimport {\n POINT_LAYER,\n LINE_LAYER,\n POLYGON_LAYER,\n getDefaultProps,\n forwardProps\n} from './sub-layer-map';\n\nimport {getGeojsonFeatures, separateGeojsonFeatures} from './geojson';\nimport {createLayerPropsFromFeatures, createLayerPropsFromBinary} from './geojson-layer-props';\n\nconst defaultProps = {\n ...getDefaultProps(POINT_LAYER.circle),\n ...getDefaultProps(POINT_LAYER.icon),\n ...getDefaultProps(POINT_LAYER.text),\n ...getDefaultProps(LINE_LAYER),\n ...getDefaultProps(POLYGON_LAYER),\n\n // Overwrite sub layer defaults\n stroked: true,\n filled: true,\n extruded: false,\n wireframe: false,\n iconAtlas: {type: 'object', value: null},\n iconMapping: {type: 'object', value: {}},\n getIcon: {type: 'accessor', value: f => f.properties.icon},\n getText: {type: 'accessor', value: f => f.properties.text},\n\n // Self props\n pointType: 'circle',\n\n // TODO: deprecated, remove in v9\n getRadius: {deprecatedFor: 'getPointRadius'}\n};\n\nexport default class GeoJsonLayer extends CompositeLayer {\n initializeState() {\n this.state = {\n layerProps: {},\n features: {}\n };\n\n if (this.props.getLineDashArray) {\n log.removed('getLineDashArray', 'PathStyleExtension')();\n }\n }\n\n updateState({props, changeFlags}) {\n if (!changeFlags.dataChanged) {\n return;\n }\n const {data} = this.props;\n const binary = data && 'points' in data && 'polygons' in data && 'lines' in data;\n\n this.setState({binary});\n\n if (binary) {\n this._updateStateBinary({props, changeFlags});\n } else {\n this._updateStateJSON({props, changeFlags});\n }\n }\n\n _updateStateBinary({props, changeFlags}) {\n const layerProps = createLayerPropsFromBinary(props.data, this.encodePickingColor);\n this.setState({layerProps});\n }\n\n _updateStateJSON({props, changeFlags}) {\n const features = getGeojsonFeatures(props.data);\n const wrapFeature = this.getSubLayerRow.bind(this);\n let newFeatures = {};\n const featuresDiff = {};\n\n if (Array.isArray(changeFlags.dataChanged)) {\n const oldFeatures = this.state.features;\n for (const key in oldFeatures) {\n newFeatures[key] = oldFeatures[key].slice();\n featuresDiff[key] = [];\n }\n\n for (const dataRange of changeFlags.dataChanged) {\n const partialFeatures = separateGeojsonFeatures(features, wrapFeature, dataRange);\n for (const key in oldFeatures) {\n featuresDiff[key].push(\n replaceInRange({\n data: newFeatures[key],\n getIndex: f => f.__source.index,\n dataRange,\n replace: partialFeatures[key]\n })\n );\n }\n }\n } else {\n newFeatures = separateGeojsonFeatures(features, wrapFeature);\n }\n\n const layerProps = createLayerPropsFromFeatures(newFeatures, featuresDiff);\n\n this.setState({\n features: newFeatures,\n featuresDiff,\n layerProps\n });\n }\n\n _updateAutoHighlight(info) {\n // All sub layers except the points layer use source feature index to encode the picking color\n // The points layer uses indices from the points data array.\n const pointLayerIdPrefix = `${this.id}-points-`;\n const sourceIsPoints = info.sourceLayer.id.startsWith(pointLayerIdPrefix);\n for (const layer of this.getSubLayers()) {\n if (layer.id.startsWith(pointLayerIdPrefix) === sourceIsPoints) {\n layer.updateAutoHighlight(info);\n }\n }\n }\n\n _renderPolygonLayer() {\n const {extruded, wireframe} = this.props;\n const {layerProps} = this.state;\n const id = 'polygons-fill';\n\n const PolygonFillLayer =\n this.shouldRenderSubLayer(id, layerProps.polygons.data) &&\n this.getSubLayerClass(id, POLYGON_LAYER.type);\n\n if (PolygonFillLayer) {\n const forwardedProps = forwardProps(this, POLYGON_LAYER.props);\n // Avoid building the lineColors attribute if wireframe is off\n const useLineColor = extruded && wireframe;\n if (!useLineColor) {\n delete forwardedProps.getLineColor;\n }\n // using a legacy API to invalid lineColor attributes\n forwardedProps.updateTriggers.lineColors = useLineColor;\n\n return new PolygonFillLayer(\n forwardedProps,\n this.getSubLayerProps({\n id,\n updateTriggers: forwardedProps.updateTriggers\n }),\n layerProps.polygons\n );\n }\n return null;\n }\n\n _renderLineLayers() {\n const {extruded, stroked} = this.props;\n const {layerProps} = this.state;\n const polygonStrokeLayerId = 'polygons-stroke';\n const lineStringsLayerId = 'linestrings';\n\n const PolygonStrokeLayer =\n !extruded &&\n stroked &&\n this.shouldRenderSubLayer(polygonStrokeLayerId, layerProps.polygonsOutline.data) &&\n this.getSubLayerClass(polygonStrokeLayerId, LINE_LAYER.type);\n const LineStringsLayer =\n this.shouldRenderSubLayer(lineStringsLayerId, layerProps.lines.data) &&\n this.getSubLayerClass(lineStringsLayerId, LINE_LAYER.type);\n\n if (PolygonStrokeLayer || LineStringsLayer) {\n const forwardedProps = forwardProps(this, LINE_LAYER.props);\n\n return [\n PolygonStrokeLayer &&\n new PolygonStrokeLayer(\n forwardedProps,\n this.getSubLayerProps({\n id: polygonStrokeLayerId,\n updateTriggers: forwardedProps.updateTriggers\n }),\n layerProps.polygonsOutline\n ),\n\n LineStringsLayer &&\n new LineStringsLayer(\n forwardedProps,\n this.getSubLayerProps({\n id: lineStringsLayerId,\n updateTriggers: forwardedProps.updateTriggers\n }),\n layerProps.lines\n )\n ];\n }\n return null;\n }\n\n _renderPointLayers() {\n const {pointType} = this.props;\n const {layerProps, binary} = this.state;\n let {highlightedObjectIndex} = this.props;\n\n if (!binary && Number.isFinite(highlightedObjectIndex)) {\n highlightedObjectIndex = layerProps.points.data.findIndex(\n d => d.__source.index === highlightedObjectIndex\n );\n }\n\n // Avoid duplicate sub layer ids\n const types = new Set(pointType.split('+'));\n const pointLayers = [];\n for (const type of types) {\n const id = `points-${type}`;\n const PointLayerMapping = POINT_LAYER[type];\n const PointsLayer =\n PointLayerMapping &&\n this.shouldRenderSubLayer(id, layerProps.points.data) &&\n this.getSubLayerClass(id, PointLayerMapping.type);\n if (PointsLayer) {\n const forwardedProps = forwardProps(this, PointLayerMapping.props);\n\n pointLayers.push(\n new PointsLayer(\n forwardedProps,\n this.getSubLayerProps({\n id,\n updateTriggers: forwardedProps.updateTriggers,\n highlightedObjectIndex\n }),\n layerProps.points\n )\n );\n }\n }\n return pointLayers;\n }\n\n renderLayers() {\n const {extruded} = this.props;\n\n const polygonFillLayer = this._renderPolygonLayer();\n const lineLayers = this._renderLineLayers();\n const pointLayers = this._renderPointLayers();\n\n return [\n // If not extruded: flat fill layer is drawn below outlines\n !extruded && polygonFillLayer,\n lineLayers,\n pointLayers,\n // If extruded: draw fill layer last for correct blending behavior\n extruded && polygonFillLayer\n ];\n }\n\n getSubLayerAccessor(accessor) {\n const {binary} = this.state;\n if (!binary || typeof accessor !== 'function') {\n return super.getSubLayerAccessor(accessor);\n }\n\n return (object, info) => {\n const {data, index} = info;\n const feature = binaryToFeatureForAccesor(data, index);\n return accessor(feature, info);\n };\n }\n}\n\nGeoJsonLayer.layerName = 'GeoJsonLayer';\nGeoJsonLayer.defaultProps = defaultProps;\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import { getCoord } from \"@turf/invariant\";\nimport { radiansToLength, degreesToRadians, } from \"@turf/helpers\";\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name distance\n * @param {Coord | Point} from origin point or coordinate\n * @param {Coord | Point} to destination point or coordinate\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction distance(from, to, options) {\n if (options === void 0) { options = {}; }\n var coordinates1 = getCoord(from);\n var coordinates2 = getCoord(to);\n var dLat = degreesToRadians(coordinates2[1] - coordinates1[1]);\n var dLon = degreesToRadians(coordinates2[0] - coordinates1[0]);\n var lat1 = degreesToRadians(coordinates1[1]);\n var lat2 = degreesToRadians(coordinates2[1]);\n var a = Math.pow(Math.sin(dLat / 2), 2) +\n Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n return radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);\n}\nexport default distance;\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","// Taken from http://geomalgorithms.com/a02-_lines.html\nimport getDistance from \"@turf/distance\";\nimport { convertLength, feature, lineString, point, } from \"@turf/helpers\";\nimport { featureOf } from \"@turf/invariant\";\nimport { segmentEach } from \"@turf/meta\";\nimport getPlanarDistance from \"@turf/rhumb-distance\";\n/**\n * Returns the minimum distance between a {@link Point} and a {@link LineString}, being the distance from a line the\n * minimum distance between the point and any segment of the `LineString`.\n *\n * @name pointToLineDistance\n * @param {Feature<Point>|Array<number>} pt Feature or Geometry\n * @param {Feature<LineString>} line GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units=\"kilometers\"] can be anything supported by turf/convertLength\n * (ex: degrees, radians, miles, or kilometers)\n * @param {string} [options.method=\"geodesic\"] wether to calculate the distance based on geodesic (spheroid) or\n * planar (flat) method. Valid options are 'geodesic' or 'planar'.\n * @returns {number} distance between point and line\n * @example\n * var pt = turf.point([0, 0]);\n * var line = turf.lineString([[1, 1],[-1, 1]]);\n *\n * var distance = turf.pointToLineDistance(pt, line, {units: 'miles'});\n * //=69.11854715938406\n */\nfunction pointToLineDistance(pt, line, options) {\n if (options === void 0) { options = {}; }\n // Optional parameters\n if (!options.method) {\n options.method = \"geodesic\";\n }\n if (!options.units) {\n options.units = \"kilometers\";\n }\n // validation\n if (!pt) {\n throw new Error(\"pt is required\");\n }\n if (Array.isArray(pt)) {\n pt = point(pt);\n }\n else if (pt.type === \"Point\") {\n pt = feature(pt);\n }\n else {\n featureOf(pt, \"Point\", \"point\");\n }\n if (!line) {\n throw new Error(\"line is required\");\n }\n if (Array.isArray(line)) {\n line = lineString(line);\n }\n else if (line.type === \"LineString\") {\n line = feature(line);\n }\n else {\n featureOf(line, \"LineString\", \"line\");\n }\n var distance = Infinity;\n var p = pt.geometry.coordinates;\n segmentEach(line, function (segment) {\n var a = segment.geometry.coordinates[0];\n var b = segment.geometry.coordinates[1];\n var d = distanceToSegment(p, a, b, options);\n if (d < distance) {\n distance = d;\n }\n });\n return convertLength(distance, \"degrees\", options.units);\n}\n/**\n * Returns the distance between a point P on a segment AB.\n *\n * @private\n * @param {Array<number>} p external point\n * @param {Array<number>} a first segment point\n * @param {Array<number>} b second segment point\n * @param {Object} [options={}] Optional parameters\n * @returns {number} distance\n */\nfunction distanceToSegment(p, a, b, options) {\n var v = [b[0] - a[0], b[1] - a[1]];\n var w = [p[0] - a[0], p[1] - a[1]];\n var c1 = dot(w, v);\n if (c1 <= 0) {\n return calcDistance(p, a, { method: options.method, units: \"degrees\" });\n }\n var c2 = dot(v, v);\n if (c2 <= c1) {\n return calcDistance(p, b, { method: options.method, units: \"degrees\" });\n }\n var b2 = c1 / c2;\n var Pb = [a[0] + b2 * v[0], a[1] + b2 * v[1]];\n return calcDistance(p, Pb, { method: options.method, units: \"degrees\" });\n}\nfunction dot(u, v) {\n return u[0] * v[0] + u[1] * v[1];\n}\nfunction calcDistance(a, b, options) {\n return options.method === \"planar\"\n ? getPlanarDistance(a, b, options)\n : getDistance(a, b, options);\n}\nexport default pointToLineDistance;\n","import {lerp} from 'math.gl';\n\nconst DEFAULT_INDICES = new Uint16Array([0, 2, 1, 0, 3, 2]);\nconst DEFAULT_TEX_COORDS = new Float32Array([0, 1, 0, 0, 1, 0, 1, 1]);\n\n/*\n 1 ---- 2\n | |\n | |\n 0 ---- 3\n*/\n/* eslint-disable max-statements */\nexport default function createMesh(bounds, resolution) {\n if (!resolution) {\n return createQuad(bounds);\n }\n const maxXSpan = Math.max(\n Math.abs(bounds[0][0] - bounds[3][0]),\n Math.abs(bounds[1][0] - bounds[2][0])\n );\n const maxYSpan = Math.max(\n Math.abs(bounds[1][1] - bounds[0][1]),\n Math.abs(bounds[2][1] - bounds[3][1])\n );\n const uCount = Math.ceil(maxXSpan / resolution) + 1;\n const vCount = Math.ceil(maxYSpan / resolution) + 1;\n\n const vertexCount = (uCount - 1) * (vCount - 1) * 6;\n const indices = new Uint32Array(vertexCount);\n const texCoords = new Float32Array(uCount * vCount * 2);\n const positions = new Float64Array(uCount * vCount * 3);\n\n // Tesselate\n let vertex = 0;\n let index = 0;\n for (let u = 0; u < uCount; u++) {\n const ut = u / (uCount - 1);\n for (let v = 0; v < vCount; v++) {\n const vt = v / (vCount - 1);\n const p = interpolateQuad(bounds, ut, vt);\n\n positions[vertex * 3 + 0] = p[0];\n positions[vertex * 3 + 1] = p[1];\n positions[vertex * 3 + 2] = p[2] || 0;\n\n texCoords[vertex * 2 + 0] = ut;\n texCoords[vertex * 2 + 1] = 1 - vt;\n\n if (u > 0 && v > 0) {\n indices[index++] = vertex - vCount;\n indices[index++] = vertex - vCount - 1;\n indices[index++] = vertex - 1;\n indices[index++] = vertex - vCount;\n indices[index++] = vertex - 1;\n indices[index++] = vertex;\n }\n\n vertex++;\n }\n }\n return {\n vertexCount,\n positions,\n indices,\n texCoords\n };\n}\n\nfunction createQuad(bounds) {\n const positions = new Float64Array(12);\n // [[minX, minY], [minX, maxY], [maxX, maxY], [maxX, minY]]\n for (let i = 0; i < bounds.length; i++) {\n positions[i * 3 + 0] = bounds[i][0];\n positions[i * 3 + 1] = bounds[i][1];\n positions[i * 3 + 2] = bounds[i][2] || 0;\n }\n\n return {\n vertexCount: 6,\n positions,\n indices: DEFAULT_INDICES,\n texCoords: DEFAULT_TEX_COORDS\n };\n}\n\nfunction interpolateQuad(quad, ut, vt) {\n return lerp(lerp(quad[0], quad[1], vt), lerp(quad[3], quad[2], vt), ut);\n}\n","export default `\n#define SHADER_NAME bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float coordinateConversion;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n geometry.worldPosition = positions;\n geometry.uv = texCoords;\n geometry.pickingColor = pickingColor;\n\n gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vTexCoord = texCoords;\n\n if (coordinateConversion < -0.5) {\n vTexPos = geometry.position.xy;\n } else if (coordinateConversion > 0.5) {\n vTexPos = geometry.worldPosition.xy;\n }\n\n vec4 color = vec4(0.0);\n DECKGL_FILTER_COLOR(color, geometry);\n}\n`;\n","/**\n * Pack the top 12 bits of two normalized floats into 3 8-bit (rgb) values\n * This enables addressing 4096x4096 individual pixels\n *\n * returns vec3 encoded RGB colors\n * result.r - top 8 bits of u\n * result.g - top 8 bits of v\n * result.b - next 4 bits of u and v: (u + v * 16)\n */\nconst packUVsIntoRGB = `\nvec3 packUVsIntoRGB(vec2 uv) {\n // Extract the top 8 bits. We want values to be truncated down so we can add a fraction\n vec2 uv8bit = floor(uv * 256.);\n\n // Calculate the normalized remainders of u and v parts that do not fit into 8 bits\n // Scale and clamp to 0-1 range\n vec2 uvFraction = fract(uv * 256.);\n vec2 uvFraction4bit = floor(uvFraction * 16.);\n\n // Remainder can be encoded in blue channel, encode as 4 bits for pixel coordinates\n float fractions = uvFraction4bit.x + uvFraction4bit.y * 16.;\n\n return vec3(uv8bit, fractions) / 255.;\n}\n`;\n\nexport default `\n#define SHADER_NAME bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision highp float;\n#endif\n\nuniform sampler2D bitmapTexture;\n\nvarying vec2 vTexCoord;\nvarying vec2 vTexPos;\n\nuniform float desaturate;\nuniform vec4 transparentColor;\nuniform vec3 tintColor;\nuniform float opacity;\n\nuniform float coordinateConversion;\nuniform vec4 bounds;\n\n/* projection utils */\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / PI / 2.0;\n\n// from degrees to Web Mercator\nvec2 lnglat_to_mercator(vec2 lnglat) {\n float x = lnglat.x;\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\n// from Web Mercator to degrees\nvec2 mercator_to_lnglat(vec2 xy) {\n xy /= WORLD_SCALE;\n return degrees(vec2(\n xy.x - PI,\n atan(exp(xy.y - PI)) * 2.0 - PI * 0.5\n ));\n}\n/* End projection utils */\n\n// apply desaturation\nvec3 color_desaturate(vec3 color) {\n float luminance = (color.r + color.g + color.b) * 0.333333333;\n return mix(color, vec3(luminance), desaturate);\n}\n\n// apply tint\nvec3 color_tint(vec3 color) {\n return color * tintColor;\n}\n\n// blend with background color\nvec4 apply_opacity(vec3 color, float alpha) {\n return mix(transparentColor, vec4(color, 1.0), alpha);\n}\n\nvec2 getUV(vec2 pos) {\n return vec2(\n (pos.x - bounds[0]) / (bounds[2] - bounds[0]),\n (pos.y - bounds[3]) / (bounds[1] - bounds[3])\n );\n}\n\n${packUVsIntoRGB}\n\nvoid main(void) {\n vec2 uv = vTexCoord;\n if (coordinateConversion < -0.5) {\n vec2 lnglat = mercator_to_lnglat(vTexPos);\n uv = getUV(lnglat);\n } else if (coordinateConversion > 0.5) {\n vec2 commonPos = lnglat_to_mercator(vTexPos);\n uv = getUV(commonPos);\n }\n vec4 bitmapColor = texture2D(bitmapTexture, uv);\n\n gl_FragColor = apply_opacity(color_tint(color_desaturate(bitmapColor.rgb)), bitmapColor.a * opacity);\n\n geometry.uv = uv;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n\n if (picking_uActive) {\n // Since instance information is not used, we can use picking color for pixel index\n gl_FragColor.rgb = packUVsIntoRGB(uv);\n }\n}\n`;\n","// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport GL from '@luma.gl/constants';\nimport {Layer, project32, picking, COORDINATE_SYSTEM} from '@deck.gl/core';\nimport {Model, Geometry} from '@luma.gl/core';\nimport {lngLatToWorld} from '@math.gl/web-mercator';\n\nimport createMesh from './create-mesh';\n\nimport vs from './bitmap-layer-vertex';\nimport fs from './bitmap-layer-fragment';\n\nconst defaultProps = {\n image: {type: 'image', value: null, async: true},\n bounds: {type: 'array', value: [1, 0, 0, 1], compare: true},\n _imageCoordinateSystem: COORDINATE_SYSTEM.DEFAULT,\n\n desaturate: {type: 'number', min: 0, max: 1, value: 0},\n // More context: because of the blending mode we're using for ground imagery,\n // alpha is not effective when blending the bitmap layers with the base map.\n // Instead we need to manually dim/blend rgb values with a background color.\n transparentColor: {type: 'color', value: [0, 0, 0, 0]},\n tintColor: {type: 'color', value: [255, 255, 255]}\n};\n\n/*\n * @class\n * @param {object} props\n * @param {number} props.transparentColor - color to interpret transparency to\n * @param {number} props.tintColor - color bias\n */\nexport default class BitmapLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, picking]});\n }\n\n initializeState() {\n const attributeManager = this.getAttributeManager();\n\n attributeManager.remove(['instancePickingColors']);\n const noAlloc = true;\n\n attributeManager.add({\n indices: {\n size: 1,\n isIndexed: true,\n update: attribute => (attribute.value = this.state.mesh.indices),\n noAlloc\n },\n positions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n update: attribute => (attribute.value = this.state.mesh.positions),\n noAlloc\n },\n texCoords: {\n size: 2,\n update: attribute => (attribute.value = this.state.mesh.texCoords),\n noAlloc\n }\n });\n }\n\n updateState({props, oldProps, changeFlags}) {\n // setup model first\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n this.getAttributeManager().invalidateAll();\n }\n\n const attributeManager = this.getAttributeManager();\n\n if (props.bounds !== oldProps.bounds) {\n const oldMesh = this.state.mesh;\n const mesh = this._createMesh();\n this.state.model.setVertexCount(mesh.vertexCount);\n for (const key in mesh) {\n if (oldMesh && oldMesh[key] !== mesh[key]) {\n attributeManager.invalidate(key);\n }\n }\n this.setState({mesh, ...this._getCoordinateUniforms()});\n } else if (props._imageCoordinateSystem !== oldProps._imageCoordinateSystem) {\n this.setState(this._getCoordinateUniforms());\n }\n }\n\n getPickingInfo({info}) {\n const {image} = this.props;\n\n if (!info.color || !image) {\n info.bitmap = null;\n return info;\n }\n\n const {width, height} = image;\n\n // Picking color doesn't represent object index in this layer\n info.index = 0;\n\n // Calculate uv and pixel in bitmap\n const uv = unpackUVsFromRGB(info.color);\n\n const pixel = [Math.floor(uv[0] * width), Math.floor(uv[1] * height)];\n\n info.bitmap = {\n size: {width, height}, // Size of bitmap\n uv, // Floating point precision in 0-1 range\n pixel // Truncated to integer and scaled to pixel size\n };\n\n return info;\n }\n\n // Override base Layer multi-depth picking logic\n disablePickingIndex() {\n this.setState({disablePicking: true});\n }\n\n restorePickingColors() {\n this.setState({disablePicking: false});\n }\n\n _updateAutoHighlight(info) {\n super._updateAutoHighlight({\n ...info,\n color: this.encodePickingColor(0)\n });\n }\n\n _createMesh() {\n const {bounds} = this.props;\n\n let normalizedBounds = bounds;\n // bounds as [minX, minY, maxX, maxY]\n if (Number.isFinite(bounds[0])) {\n /*\n (minX0, maxY3) ---- (maxX2, maxY3)\n | |\n | |\n | |\n (minX0, minY1) ---- (maxX2, minY1)\n */\n normalizedBounds = [\n [bounds[0], bounds[1]],\n [bounds[0], bounds[3]],\n [bounds[2], bounds[3]],\n [bounds[2], bounds[1]]\n ];\n }\n\n return createMesh(normalizedBounds, this.context.viewport.resolution);\n }\n\n _getModel(gl) {\n if (!gl) {\n return null;\n }\n\n /*\n 0,0 --- 1,0\n | |\n 0,1 --- 1,1\n */\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLES,\n vertexCount: 6\n }),\n isInstanced: false\n });\n }\n\n draw(opts) {\n const {uniforms, moduleParameters} = opts;\n const {model, coordinateConversion, bounds, disablePicking} = this.state;\n const {image, desaturate, transparentColor, tintColor} = this.props;\n\n if (moduleParameters.pickingActive && disablePicking) {\n return;\n }\n\n // // TODO fix zFighting\n // Render the image\n if (image && model) {\n model\n .setUniforms(uniforms)\n .setUniforms({\n bitmapTexture: image,\n desaturate,\n transparentColor: transparentColor.map(x => x / 255),\n tintColor: tintColor.slice(0, 3).map(x => x / 255),\n coordinateConversion,\n bounds\n })\n .draw();\n }\n }\n\n _getCoordinateUniforms() {\n const {LNGLAT, CARTESIAN, DEFAULT} = COORDINATE_SYSTEM;\n let {_imageCoordinateSystem: imageCoordinateSystem} = this.props;\n if (imageCoordinateSystem !== DEFAULT) {\n const {bounds} = this.props;\n if (!Number.isFinite(bounds[0])) {\n throw new Error('_imageCoordinateSystem only supports rectangular bounds');\n }\n\n // The default behavior (linearly interpolated tex coords)\n const defaultImageCoordinateSystem = this.context.viewport.resolution ? LNGLAT : CARTESIAN;\n imageCoordinateSystem = imageCoordinateSystem === LNGLAT ? LNGLAT : CARTESIAN;\n\n if (imageCoordinateSystem === LNGLAT && defaultImageCoordinateSystem === CARTESIAN) {\n // LNGLAT in Mercator, e.g. display LNGLAT-encoded image in WebMercator projection\n return {coordinateConversion: -1, bounds};\n }\n if (imageCoordinateSystem === CARTESIAN && defaultImageCoordinateSystem === LNGLAT) {\n // Mercator in LNGLAT, e.g. display WebMercator encoded image in Globe projection\n const bottomLeft = lngLatToWorld([bounds[0], bounds[1]]);\n const topRight = lngLatToWorld([bounds[2], bounds[3]]);\n return {\n coordinateConversion: 1,\n bounds: [bottomLeft[0], bottomLeft[1], topRight[0], topRight[1]]\n };\n }\n }\n return {\n coordinateConversion: 0,\n bounds: [0, 0, 0, 0]\n };\n }\n}\n\nBitmapLayer.layerName = 'BitmapLayer';\nBitmapLayer.defaultProps = defaultProps;\n\n/**\n * Decode uv floats from rgb bytes where b contains 4-bit fractions of uv\n * @param {number[]} color\n * @returns {number[]} uvs\n * https://stackoverflow.com/questions/30242013/glsl-compressing-packing-multiple-0-1-colours-var4-into-a-single-var4-variab\n */\nfunction unpackUVsFromRGB(color) {\n const [u, v, fracUV] = color;\n const vFrac = (fracUV & 0xf0) / 256;\n const uFrac = (fracUV & 0x0f) / 16;\n return [(u + uFrac) / 256, (v + vFrac) / 256];\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, picking, UNIT} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry} from '@luma.gl/core';\n\nimport vs from './line-layer-vertex.glsl';\nimport fs from './line-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst defaultProps = {\n getSourcePosition: {type: 'accessor', value: x => x.sourcePosition},\n getTargetPosition: {type: 'accessor', value: x => x.targetPosition},\n getColor: {type: 'accessor', value: DEFAULT_COLOR},\n getWidth: {type: 'accessor', value: 1},\n\n widthUnits: 'pixels',\n widthScale: {type: 'number', value: 1, min: 0},\n widthMinPixels: {type: 'number', value: 0, min: 0},\n widthMaxPixels: {type: 'number', value: Number.MAX_SAFE_INTEGER, min: 0}\n};\n\nexport default class LineLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, picking]});\n }\n\n // This layer has its own wrapLongitude logic\n get wrapLongitude() {\n return false;\n }\n\n initializeState() {\n const attributeManager = this.getAttributeManager();\n\n /* eslint-disable max-len */\n attributeManager.addInstanced({\n instanceSourcePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getSourcePosition'\n },\n instanceTargetPositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getTargetPosition'\n },\n instanceColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: true,\n accessor: 'getColor',\n defaultValue: [0, 0, 0, 255]\n },\n instanceWidths: {\n size: 1,\n transition: true,\n accessor: 'getWidth',\n defaultValue: 1\n }\n });\n /* eslint-enable max-len */\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n this.getAttributeManager().invalidateAll();\n }\n }\n\n draw({uniforms}) {\n const {widthUnits, widthScale, widthMinPixels, widthMaxPixels, wrapLongitude} = this.props;\n\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n widthUnits: UNIT[widthUnits],\n widthScale,\n widthMinPixels,\n widthMaxPixels,\n useShortestPath: wrapLongitude ? 1 : 0\n })\n .draw();\n\n if (wrapLongitude) {\n // Render a second copy for the clipped lines at the 180th meridian\n this.state.model\n .setUniforms({\n useShortestPath: -1\n })\n .draw();\n }\n }\n\n _getModel(gl) {\n /*\n * (0, -1)-------------_(1, -1)\n * | _,-\" |\n * o _,-\" o\n * | _,-\" |\n * (0, 1)\"-------------(1, 1)\n */\n const positions = [0, -1, 0, 0, 1, 0, 1, -1, 0, 1, 1, 0];\n\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_STRIP,\n attributes: {\n positions: new Float32Array(positions)\n }\n }),\n isInstanced: true\n });\n }\n}\n\nLineLayer.layerName = 'LineLayer';\nLineLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME line-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\n\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float useShortestPath;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nvec3 splitLine(vec3 a, vec3 b, float x) {\n float t = (x - a.x) / (b.x - a.x);\n return vec3(x, mix(a.yz, b.yz, t));\n}\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n vec3 source_world_64low = instanceSourcePositions64Low;\n vec3 target_world_64low = instanceTargetPositions64Low;\n\n if (useShortestPath > 0.5 || useShortestPath < -0.5) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n float deltaLng = target_world.x - source_world.x;\n\n if (deltaLng * useShortestPath > 180.) {\n source_world.x += 360. * useShortestPath;\n source_world = splitLine(source_world, target_world, 180. * useShortestPath);\n source_world_64low = vec3(0.0);\n } else if (deltaLng * useShortestPath < -180.) {\n target_world.x += 360. * useShortestPath;\n target_world = splitLine(source_world, target_world, 180. * useShortestPath);\n target_world_64low = vec3(0.0);\n } else if (useShortestPath < 0.) {\n // Line is not split, abort\n gl_Position = vec4(0.);\n return;\n }\n }\n\n // Position\n vec4 source_commonspace;\n vec4 target_commonspace;\n vec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\n vec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\n \n // linear interpolation of source & target to pick right coord\n float segmentIndex = positions.x;\n vec4 p = mix(source, target, segmentIndex);\n geometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\n uv = positions.xy;\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n // Multiply out width and clamp to limits\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n\n // extrude\n vec3 offset = vec3(\n getExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Color\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME line-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\n\nvoid main(void) {\n geometry.uv = uv;\n\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, picking, UNIT} from '@deck.gl/core';\n\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry} from '@luma.gl/core';\n\nimport vs from './arc-layer-vertex.glsl';\nimport fs from './arc-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst defaultProps = {\n getSourcePosition: {type: 'accessor', value: x => x.sourcePosition},\n getTargetPosition: {type: 'accessor', value: x => x.targetPosition},\n getSourceColor: {type: 'accessor', value: DEFAULT_COLOR},\n getTargetColor: {type: 'accessor', value: DEFAULT_COLOR},\n getWidth: {type: 'accessor', value: 1},\n getHeight: {type: 'accessor', value: 1},\n getTilt: {type: 'accessor', value: 0},\n\n greatCircle: false,\n\n widthUnits: 'pixels',\n widthScale: {type: 'number', value: 1, min: 0},\n widthMinPixels: {type: 'number', value: 0, min: 0},\n widthMaxPixels: {type: 'number', value: Number.MAX_SAFE_INTEGER, min: 0}\n};\n\nexport default class ArcLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, picking]}); // 'project' module added by default.\n }\n\n // This layer has its own wrapLongitude logic\n get wrapLongitude() {\n return false;\n }\n\n initializeState() {\n const attributeManager = this.getAttributeManager();\n\n /* eslint-disable max-len */\n attributeManager.addInstanced({\n instanceSourcePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getSourcePosition'\n },\n instanceTargetPositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getTargetPosition'\n },\n instanceSourceColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: true,\n accessor: 'getSourceColor',\n defaultValue: DEFAULT_COLOR\n },\n instanceTargetColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: true,\n accessor: 'getTargetColor',\n defaultValue: DEFAULT_COLOR\n },\n instanceWidths: {\n size: 1,\n transition: true,\n accessor: 'getWidth',\n defaultValue: 1\n },\n instanceHeights: {\n size: 1,\n transition: true,\n accessor: 'getHeight',\n defaultValue: 1\n },\n instanceTilts: {\n size: 1,\n transition: true,\n accessor: 'getTilt',\n defaultValue: 0\n }\n });\n /* eslint-enable max-len */\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n // Re-generate model if geometry changed\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n this.getAttributeManager().invalidateAll();\n }\n }\n\n draw({uniforms}) {\n const {\n widthUnits,\n widthScale,\n widthMinPixels,\n widthMaxPixels,\n greatCircle,\n wrapLongitude\n } = this.props;\n\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n greatCircle,\n widthUnits: UNIT[widthUnits],\n widthScale,\n widthMinPixels,\n widthMaxPixels,\n useShortestPath: wrapLongitude\n })\n .draw();\n }\n\n _getModel(gl) {\n let positions = [];\n const NUM_SEGMENTS = 50;\n /*\n * (0, -1)-------------_(1, -1)\n * | _,-\" |\n * o _,-\" o\n * | _,-\" |\n * (0, 1)\"-------------(1, 1)\n */\n for (let i = 0; i < NUM_SEGMENTS; i++) {\n positions = positions.concat([i, 1, 0, i, -1, 0]);\n }\n\n const model = new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_STRIP,\n attributes: {\n positions: new Float32Array(positions)\n }\n }),\n isInstanced: true\n });\n\n model.setUniforms({numSegments: NUM_SEGMENTS});\n\n return model;\n }\n}\n\nArcLayer.layerName = 'ArcLayer';\nArcLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME arc-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec4 instanceSourceColors;\nattribute vec4 instanceTargetColors;\nattribute vec3 instanceSourcePositions;\nattribute vec3 instanceSourcePositions64Low;\nattribute vec3 instanceTargetPositions;\nattribute vec3 instanceTargetPositions64Low;\nattribute vec3 instancePickingColors;\nattribute float instanceWidths;\nattribute float instanceHeights;\nattribute float instanceTilts;\n\nuniform bool greatCircle;\nuniform bool useShortestPath;\nuniform float numSegments;\nuniform float opacity;\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform int widthUnits;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nfloat paraboloid(float distance, float sourceZ, float targetZ, float ratio) {\n // d: distance on the xy plane\n // r: ratio of the current point\n // p: ratio of the peak of the arc\n // h: height multiplier\n // z = f(r) = sqrt(r * (p * 2 - r)) * d * h\n // f(0) = 0\n // f(1) = dz\n\n float deltaZ = targetZ - sourceZ;\n float dh = distance * instanceHeights;\n if (dh == 0.0) {\n return sourceZ + deltaZ * ratio;\n }\n float unitZ = deltaZ / dh;\n float p2 = unitZ * unitZ + 1.0;\n\n // sqrt does not deal with negative values, manually flip source and target if delta.z < 0\n float dir = step(deltaZ, 0.0);\n float z0 = mix(sourceZ, targetZ, dir);\n float r = mix(ratio, 1.0 - ratio, dir);\n return sqrt(r * (p2 - r)) * dh + z0;\n}\n\n// offset vector by strokeWidth pixels\n// offset_direction is -1 (left) or 1 (right)\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace * project_uViewportSize);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n return dir_screenspace * offset_direction * width / 2.0;\n}\n\nfloat getSegmentRatio(float index) {\n return smoothstep(0.0, 1.0, index / (numSegments - 1.0));\n}\n\nvec3 interpolateFlat(vec3 source, vec3 target, float segmentRatio) {\n float distance = length(source.xy - target.xy);\n float z = paraboloid(distance, source.z, target.z, segmentRatio);\n\n float tiltAngle = radians(instanceTilts);\n vec2 tiltDirection = normalize(target.xy - source.xy);\n vec2 tilt = vec2(-tiltDirection.y, tiltDirection.x) * z * sin(tiltAngle);\n\n return vec3(\n mix(source.xy, target.xy, segmentRatio) + tilt,\n z * cos(tiltAngle)\n );\n}\n\n/* Great circle interpolation\n * http://www.movable-type.co.uk/scripts/latlong.html\n */\nfloat getAngularDist (vec2 source, vec2 target) {\n vec2 sourceRadians = radians(source);\n vec2 targetRadians = radians(target);\n vec2 sin_half_delta = sin((sourceRadians - targetRadians) / 2.0);\n vec2 shd_sq = sin_half_delta * sin_half_delta;\n\n float a = shd_sq.y + cos(sourceRadians.y) * cos(targetRadians.y) * shd_sq.x;\n return 2.0 * asin(sqrt(a));\n}\n\nvec3 interpolateGreatCircle(vec3 source, vec3 target, vec3 source3D, vec3 target3D, float angularDist, float t) {\n vec2 lngLat;\n\n // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\n if(abs(angularDist - PI) < 0.001) {\n lngLat = (1.0 - t) * source.xy + t * target.xy;\n } else {\n float a = sin((1.0 - t) * angularDist);\n float b = sin(t * angularDist);\n vec3 p = source3D.yxz * a + target3D.yxz * b;\n lngLat = degrees(vec2(atan(p.y, -p.x), atan(p.z, length(p.xy))));\n }\n\n float z = paraboloid(angularDist * EARTH_RADIUS, source.z, target.z, t);\n\n return vec3(lngLat, z);\n}\n\n/* END GREAT CIRCLE */\n\nvoid main(void) {\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n float segmentIndex = positions.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n float prevSegmentRatio = getSegmentRatio(max(0.0, segmentIndex - 1.0));\n float nextSegmentRatio = getSegmentRatio(min(numSegments - 1.0, segmentIndex + 1.0));\n\n // if it's the first point, use next - current as direction\n // otherwise use current - prev\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n isValid = 1.0;\n\n uv = vec2(segmentRatio, positions.y);\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n vec4 curr;\n vec4 next;\n vec3 source;\n vec3 target;\n\n if ((greatCircle || project_uProjectionMode == PROJECTION_MODE_GLOBE) && project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n source = project_globe_(vec3(instanceSourcePositions.xy, 0.0));\n target = project_globe_(vec3(instanceTargetPositions.xy, 0.0));\n float angularDist = getAngularDist(instanceSourcePositions.xy, instanceTargetPositions.xy);\n\n vec3 prevPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, prevSegmentRatio);\n vec3 currPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, segmentRatio);\n vec3 nextPos = interpolateGreatCircle(instanceSourcePositions, instanceTargetPositions, source, target, angularDist, nextSegmentRatio);\n\n if (abs(currPos.x - prevPos.x) > 180.0) {\n indexDir = -1.0;\n isValid = 0.0;\n } else if (abs(currPos.x - nextPos.x) > 180.0) {\n indexDir = 1.0;\n isValid = 0.0;\n }\n nextPos = indexDir < 0.0 ? prevPos : nextPos;\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n\n if (isValid == 0.0) {\n // split at the 180th meridian\n nextPos.x += nextPos.x > 0.0 ? -360.0 : 360.0;\n float t = ((currPos.x > 0.0 ? 180.0 : -180.0) - currPos.x) / (nextPos.x - currPos.x);\n currPos = mix(currPos, nextPos, t);\n segmentRatio = mix(segmentRatio, nextSegmentRatio, t);\n }\n\n vec3 currPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, segmentRatio);\n vec3 nextPos64Low = mix(instanceSourcePositions64Low, instanceTargetPositions64Low, nextSegmentRatio);\n \n curr = project_position_to_clipspace(currPos, currPos64Low, vec3(0.0), geometry.position);\n next = project_position_to_clipspace(nextPos, nextPos64Low, vec3(0.0));\n \n } else {\n vec3 source_world = instanceSourcePositions;\n vec3 target_world = instanceTargetPositions;\n if (useShortestPath) {\n source_world.x = mod(source_world.x + 180., 360.0) - 180.;\n target_world.x = mod(target_world.x + 180., 360.0) - 180.;\n\n float deltaLng = target_world.x - source_world.x;\n if (deltaLng > 180.) target_world.x -= 360.;\n if (deltaLng < -180.) source_world.x -= 360.;\n }\n source = project_position(source_world, instanceSourcePositions64Low);\n target = project_position(target_world, instanceTargetPositions64Low);\n\n // common x at longitude=-180\n float antiMeridianX = 0.0;\n\n if (useShortestPath) {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n antiMeridianX = -(project_uCoordinateOrigin.x + 180.) / 360. * TILE_SIZE;\n }\n float thresholdRatio = (antiMeridianX - source.x) / (target.x - source.x);\n\n if (prevSegmentRatio <= thresholdRatio && nextSegmentRatio > thresholdRatio) {\n isValid = 0.0;\n indexDir = sign(segmentRatio - thresholdRatio);\n segmentRatio = thresholdRatio;\n }\n }\n\n nextSegmentRatio = indexDir < 0.0 ? prevSegmentRatio : nextSegmentRatio;\n vec3 currPos = interpolateFlat(source, target, segmentRatio);\n vec3 nextPos = interpolateFlat(source, target, nextSegmentRatio);\n\n if (useShortestPath) {\n if (nextPos.x < antiMeridianX) {\n currPos.x += TILE_SIZE;\n nextPos.x += TILE_SIZE;\n }\n }\n\n curr = project_common_position_to_clipspace(vec4(currPos, 1.0));\n next = project_common_position_to_clipspace(vec4(nextPos, 1.0));\n geometry.position = vec4(currPos, 1.0);\n }\n\n // Multiply out width and clamp to limits\n // mercator pixels are interpreted as screen pixels\n float widthPixels = clamp(\n project_size_to_pixel(instanceWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels\n );\n\n // extrude\n vec3 offset = vec3(\n getExtrusionOffset((next.xy - curr.xy) * indexDir, positions.y, widthPixels),\n 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n gl_Position = curr + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n vec4 color = mix(instanceSourceColors, instanceTargetColors, segmentRatio);\n vColor = vec4(color.rgb, color.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME arc-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 uv;\nvarying float isValid;\n\nvoid main(void) {\n if (isValid == 0.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n geometry.uv = uv;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, gouraudLighting, picking, UNIT} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry} from '@luma.gl/core';\n\nimport vs from './point-cloud-layer-vertex.glsl';\nimport fs from './point-cloud-layer-fragment.glsl';\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\nconst DEFAULT_NORMAL = [0, 0, 1];\n\nconst defaultProps = {\n sizeUnits: 'pixels',\n pointSize: {type: 'number', min: 0, value: 10}, // point radius in pixels\n\n getPosition: {type: 'accessor', value: x => x.position},\n getNormal: {type: 'accessor', value: DEFAULT_NORMAL},\n getColor: {type: 'accessor', value: DEFAULT_COLOR},\n\n material: true,\n\n // Depreated\n radiusPixels: {deprecatedFor: 'pointSize'}\n};\n\n// support loaders.gl point cloud format\nfunction normalizeData(data) {\n const {header, attributes} = data;\n if (!header || !attributes) {\n return;\n }\n\n data.length = header.vertexCount;\n\n if (attributes.POSITION) {\n attributes.instancePositions = attributes.POSITION;\n }\n if (attributes.NORMAL) {\n attributes.instanceNormals = attributes.NORMAL;\n }\n if (attributes.COLOR_0) {\n attributes.instanceColors = attributes.COLOR_0;\n }\n}\n\nexport default class PointCloudLayer extends Layer {\n getShaders() {\n return super.getShaders({vs, fs, modules: [project32, gouraudLighting, picking]});\n }\n\n initializeState() {\n /* eslint-disable max-len */\n this.getAttributeManager().addInstanced({\n instancePositions: {\n size: 3,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n transition: true,\n accessor: 'getPosition'\n },\n instanceNormals: {\n size: 3,\n transition: true,\n accessor: 'getNormal',\n defaultValue: DEFAULT_NORMAL\n },\n instanceColors: {\n size: this.props.colorFormat.length,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n transition: true,\n accessor: 'getColor',\n defaultValue: DEFAULT_COLOR\n }\n });\n /* eslint-enable max-len */\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n if (changeFlags.extensionsChanged) {\n const {gl} = this.context;\n this.state.model?.delete();\n this.state.model = this._getModel(gl);\n this.getAttributeManager().invalidateAll();\n }\n if (changeFlags.dataChanged) {\n normalizeData(props.data);\n }\n }\n\n draw({uniforms}) {\n const {pointSize, sizeUnits} = this.props;\n\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n sizeUnits: UNIT[sizeUnits],\n radiusPixels: pointSize\n })\n .draw();\n }\n\n _getModel(gl) {\n // a triangle that minimally cover the unit circle\n const positions = [];\n for (let i = 0; i < 3; i++) {\n const angle = (i / 3) * Math.PI * 2;\n positions.push(Math.cos(angle) * 2, Math.sin(angle) * 2, 0);\n }\n\n return new Model(gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: new Geometry({\n drawMode: GL.TRIANGLES,\n attributes: {\n positions: new Float32Array(positions)\n }\n }),\n isInstanced: true\n });\n }\n}\n\nPointCloudLayer.layerName = 'PointCloudLayer';\nPointCloudLayer.defaultProps = defaultProps;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME point-cloud-layer-vertex-shader\n\nattribute vec3 positions;\nattribute vec3 instanceNormals;\nattribute vec4 instanceColors;\nattribute vec3 instancePositions;\nattribute vec3 instancePositions64Low;\nattribute vec3 instancePickingColors;\n\nuniform float opacity;\nuniform float radiusPixels;\nuniform int sizeUnits;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.normal = project_normal(instanceNormals);\n\n // position on the containing square in [-1, 1] space\n unitPosition = positions.xy;\n geometry.uv = unitPosition;\n geometry.pickingColor = instancePickingColors;\n\n // Find the center of the point and add the current vertex\n vec3 offset = vec3(positions.xy * project_size_to_pixel(radiusPixels, sizeUnits), 0.0);\n DECKGL_FILTER_SIZE(offset, geometry);\n\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, vec3(0.), geometry.position);\n gl_Position.xy += project_pixel_size_to_clipspace(offset.xy);\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n // Apply lighting\n vec3 lightColor = lighting_getLightColor(instanceColors.rgb, project_uCameraPosition, geometry.position.xyz, geometry.normal);\n\n // Apply opacity to instance color, or return instance picking color\n vColor = vec4(lightColor, instanceColors.a * opacity);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nexport default `\\\n#define SHADER_NAME point-cloud-layer-fragment-shader\n\nprecision highp float;\n\nvarying vec4 vColor;\nvarying vec2 unitPosition;\n\nvoid main(void) {\n geometry.uv = unitPosition;\n\n float distToCenter = length(unitPosition);\n\n if (distToCenter > 1.0) {\n discard;\n }\n\n gl_FragColor = vColor;\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n`;\n","// Note: This file will either be moved back to deck.gl or reformatted to web-monorepo standards\n// Disabling lint temporarily to facilitate copying code in and out of this repo\n/* eslint-disable */\n\n// Copyright (c) 2015 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {Layer, project32, phongLighting, picking, COORDINATE_SYSTEM, log} from '@deck.gl/core';\nimport GL from '@luma.gl/constants';\nimport {Model, Geometry, Texture2D, isWebGL2} from '@luma.gl/core';\nimport {hasFeature, FEATURES} from '@luma.gl/webgl';\n\nimport {MATRIX_ATTRIBUTES, shouldComposeModelMatrix} from '../utils/matrix';\n\nimport vs from './simple-mesh-layer-vertex.glsl';\nimport fs from './simple-mesh-layer-fragment.glsl';\n\nfunction validateGeometryAttributes(attributes, useMeshColors) {\n const hasColorAttribute = attributes.COLOR_0 || attributes.colors;\n const useColorAttribute = hasColorAttribute && useMeshColors;\n if (!useColorAttribute) {\n attributes.colors = {constant: true, value: new Float32Array([1, 1, 1])};\n }\n log.assert(\n attributes.positions || attributes.POSITION,\n 'no \"postions\" or \"POSITION\" attribute in mesh'\n );\n}\n\n/*\n * Convert mesh data into geometry\n * @returns {Geometry} geometry\n */\nfunction getGeometry(data, useMeshColors) {\n if (data.attributes) {\n validateGeometryAttributes(data.attributes, useMeshColors);\n if (data instanceof Geometry) {\n return data;\n } else {\n return new Geometry(data);\n }\n } else if (data.positions || data.POSITION) {\n validateGeometryAttributes(data, useMeshColors);\n return new Geometry({\n attributes: data\n });\n }\n throw Error('Invalid mesh');\n}\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\n\nconst defaultProps = {\n mesh: {value: null, type: 'object', async: true},\n texture: {type: 'image', value: null, async: true},\n sizeScale: {type: 'number', value: 1, min: 0},\n // Whether the color attribute in a mesh will be used\n // This prop will be removed and set to true in next major release\n _useMeshColors: {type: 'boolean', value: false},\n\n // _instanced is a hack to use world position instead of meter offsets in mesh\n // TODO - formalize API\n _instanced: true,\n // NOTE(Tarek): Quick and dirty wireframe. Just draws\n // the same mesh with LINE_STRIPS. Won't follow edges\n // of the original mesh.\n wireframe: false,\n // Optional material for 'lighting' shader module\n material: true,\n getPosition: {type: 'accessor', value: x => x.position},\n getColor: {type: 'accessor', value: DEFAULT_COLOR},\n\n // yaw, pitch and roll are in degrees\n // https://en.wikipedia.org/wiki/Euler_angles\n // [pitch, yaw, roll]\n getOrientation: {type: 'accessor', value: [0, 0, 0]},\n getScale: {type: 'accessor', value: [1, 1, 1]},\n getTranslation: {type: 'accessor', value: [0, 0, 0]},\n // 4x4 matrix\n getTransformMatrix: {type: 'accessor', value: []}\n};\n\nexport default class SimpleMeshLayer extends Layer {\n getShaders() {\n const transpileToGLSL100 = !isWebGL2(this.context.gl);\n\n const defines = {};\n\n if (hasFeature(this.context.gl, FEATURES.GLSL_DERIVATIVES)) {\n defines.DERIVATIVES_AVAILABLE = 1;\n }\n\n return super.getShaders({\n vs,\n fs,\n modules: [project32, phongLighting, picking],\n transpileToGLSL100,\n defines\n });\n }\n\n initializeState() {\n const attributeManager = this.getAttributeManager();\n\n attributeManager.addInstanced({\n instancePositions: {\n transition: true,\n type: GL.DOUBLE,\n fp64: this.use64bitPositions(),\n size: 3,\n accessor: 'getPosition'\n },\n instanceColors: {\n type: GL.UNSIGNED_BYTE,\n transition: true,\n size: this.props.colorFormat.length,\n normalized: true,\n accessor: 'getColor',\n defaultValue: [0, 0, 0, 255]\n },\n instanceModelMatrix: MATRIX_ATTRIBUTES\n });\n\n this.setState({\n // Avoid luma.gl's missing uniform warning\n // TODO - add feature to luma.gl to specify ignored uniforms?\n emptyTexture: new Texture2D(this.context.gl, {\n data: new Uint8Array(4),\n width: 1,\n height: 1\n })\n });\n }\n\n updateState({props, oldProps, changeFlags}) {\n super.updateState({props, oldProps, changeFlags});\n\n if (props.mesh !== oldProps.mesh || changeFlags.extensionsChanged) {\n this.state.model?.delete();\n if (props.mesh) {\n this.state.model = this.getModel(props.mesh);\n\n const attributes = props.mesh.attributes || props.mesh;\n this.setState({\n hasNormals: Boolean(attributes.NORMAL || attributes.normals)\n });\n }\n this.getAttributeManager().invalidateAll();\n }\n\n if (props.texture !== oldProps.texture) {\n this.setTexture(props.texture);\n }\n\n if (this.state.model) {\n this.state.model.setDrawMode(this.props.wireframe ? GL.LINE_STRIP : GL.TRIANGLES);\n }\n }\n\n finalizeState() {\n super.finalizeState();\n\n this.state.emptyTexture.delete();\n }\n\n draw({uniforms}) {\n if (!this.state.model) {\n return;\n }\n\n const {viewport} = this.context;\n const {sizeScale, coordinateSystem, _instanced} = this.props;\n\n this.state.model\n .setUniforms(uniforms)\n .setUniforms({\n sizeScale,\n composeModelMatrix: !_instanced || shouldComposeModelMatrix(viewport, coordinateSystem),\n flatShading: !this.state.hasNormals\n })\n .draw();\n }\n\n getModel(mesh) {\n const model = new Model(this.context.gl, {\n ...this.getShaders(),\n id: this.props.id,\n geometry: getGeometry(mesh, this.props._useMeshColors),\n isInstanced: true\n });\n\n const {texture} = this.props;\n const {emptyTexture} = this.state;\n model.setUniforms({\n sampler: texture || emptyTexture,\n hasTexture: Boolean(texture)\n });\n\n return model;\n }\n\n setTexture(texture) {\n const {emptyTexture, model} = this.state;\n\n // props.mesh may not be ready at this time.\n // The sampler will be set when `getModel` is called\n model?.setUniforms({\n sampler: texture || emptyTexture,\n hasTexture: Boolean(texture)\n });\n }\n}\n\nSimpleMeshLayer.layerName = 'SimpleMeshLayer';\nSimpleMeshLayer.defaultProps = defaultProps;\n","export default `#version 300 es\n#define SHADER_NAME simple-mesh-layer-vs\n\n// Scale the model\nuniform float sizeScale;\nuniform bool composeModelMatrix;\n\n// Primitive attributes\nin vec3 positions;\nin vec3 normals;\nin vec3 colors;\nin vec2 texCoords;\n\n// Instance attributes\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\n\n// Outputs to fragment shader\nout vec2 vTexCoord;\nout vec3 cameraPosition;\nout vec3 normals_commonspace;\nout vec4 position_commonspace;\nout vec4 vColor;\n\nvoid main(void) {\n geometry.worldPosition = instancePositions;\n geometry.uv = texCoords;\n geometry.pickingColor = instancePickingColors;\n\n vTexCoord = texCoords;\n cameraPosition = project_uCameraPosition;\n normals_commonspace = project_normal(instanceModelMatrix * normals);\n vColor = vec4(colors * instanceColors.rgb, instanceColors.a);\n geometry.normal = normals_commonspace;\n\n vec3 pos = (instanceModelMatrix * positions) * sizeScale + instanceTranslation;\n\n if (composeModelMatrix) {\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), position_commonspace);\n }\n else {\n pos = project_size(pos);\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, position_commonspace);\n }\n\n geometry.position = position_commonspace;\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n`;\n","export default `#version 300 es\n#define SHADER_NAME simple-mesh-layer-fs\n\nprecision highp float;\n\nuniform bool hasTexture;\nuniform sampler2D sampler;\nuniform bool flatShading;\nuniform float opacity;\n\nin vec2 vTexCoord;\nin vec3 cameraPosition;\nin vec3 normals_commonspace;\nin vec4 position_commonspace;\nin vec4 vColor;\n\nout vec4 fragColor;\n\nvoid main(void) {\n geometry.uv = vTexCoord;\n\n vec3 normal;\n if (flatShading) {\n\n// NOTE(Tarek): This is necessary because\n// headless.gl reports the extension as\n// available but does not support it in\n// the shader.\n#ifdef DERIVATIVES_AVAILABLE\n normal = normalize(cross(dFdx(position_commonspace.xyz), dFdy(position_commonspace.xyz)));\n#else\n normal = vec3(0.0, 0.0, 1.0);\n#endif\n } else {\n normal = normals_commonspace;\n }\n\n vec4 color = hasTexture ? texture(sampler, vTexCoord) : vColor;\n vec3 lightColor = lighting_getLightColor(color.rgb, cameraPosition, position_commonspace.xyz, normal);\n fragColor = vec4(lightColor, color.a * opacity);\n\n DECKGL_FILTER_COLOR(fragColor, geometry);\n}\n`;\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import { isObject, isNumber, degreesToRadians, polygon } from '@turf/helpers';\nimport rhumbDestination from '@turf/rhumb-destination';\nimport transformRotate from '@turf/transform-rotate';\nimport { getCoord } from '@turf/invariant';\n\n/**\n * Takes a {@link Point} and calculates the ellipse polygon given two semi-axes expressed in variable units and steps for precision.\n *\n * @param {Coord} center center point\n * @param {number} xSemiAxis semi (major) axis of the ellipse along the x-axis\n * @param {number} ySemiAxis semi (minor) axis of the ellipse along the y-axis\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.angle=0] angle of rotation in decimal degrees, positive clockwise\n * @param {Coord} [options.pivot='origin'] point around which the rotation will be performed\n * @param {number} [options.steps=64] number of steps\n * @param {string} [options.units='kilometers'] unit of measurement for axes\n * @param {Object} [options.properties={}] properties\n * @returns {Feature<Polygon>} ellipse polygon\n * @example\n * var center = [-75, 40];\n * var xSemiAxis = 5;\n * var ySemiAxis = 2;\n * var ellipse = turf.ellipse(center, xSemiAxis, ySemiAxis);\n *\n * //addToMap\n * var addToMap = [turf.point(center), ellipse]\n */\nfunction ellipse(center, xSemiAxis, ySemiAxis, options) {\n // Optional params\n options = options || {};\n var steps = options.steps || 64;\n var units = options.units || \"kilometers\";\n var angle = options.angle || 0;\n var pivot = options.pivot || center;\n var properties = options.properties || center.properties || {};\n\n // validation\n if (!center) throw new Error(\"center is required\");\n if (!xSemiAxis) throw new Error(\"xSemiAxis is required\");\n if (!ySemiAxis) throw new Error(\"ySemiAxis is required\");\n if (!isObject(options)) throw new Error(\"options must be an object\");\n if (!isNumber(steps)) throw new Error(\"steps must be a number\");\n if (!isNumber(angle)) throw new Error(\"angle must be a number\");\n\n var centerCoords = getCoord(center);\n if (units === \"degrees\") {\n var angleRad = degreesToRadians(angle);\n } else {\n xSemiAxis = rhumbDestination(center, xSemiAxis, 90, { units: units });\n ySemiAxis = rhumbDestination(center, ySemiAxis, 0, { units: units });\n xSemiAxis = getCoord(xSemiAxis)[0] - centerCoords[0];\n ySemiAxis = getCoord(ySemiAxis)[1] - centerCoords[1];\n }\n\n var coordinates = [];\n for (var i = 0; i < steps; i += 1) {\n var stepAngle = (i * -360) / steps;\n var x =\n (xSemiAxis * ySemiAxis) /\n Math.sqrt(\n Math.pow(ySemiAxis, 2) +\n Math.pow(xSemiAxis, 2) * Math.pow(getTanDeg(stepAngle), 2)\n );\n var y =\n (xSemiAxis * ySemiAxis) /\n Math.sqrt(\n Math.pow(xSemiAxis, 2) +\n Math.pow(ySemiAxis, 2) / Math.pow(getTanDeg(stepAngle), 2)\n );\n\n if (stepAngle < -90 && stepAngle >= -270) x = -x;\n if (stepAngle < -180 && stepAngle >= -360) y = -y;\n if (units === \"degrees\") {\n var newx = x * Math.cos(angleRad) + y * Math.sin(angleRad);\n var newy = y * Math.cos(angleRad) - x * Math.sin(angleRad);\n x = newx;\n y = newy;\n }\n\n coordinates.push([x + centerCoords[0], y + centerCoords[1]]);\n }\n coordinates.push(coordinates[0]);\n if (units === \"degrees\") {\n return polygon([coordinates], properties);\n } else {\n return transformRotate(polygon([coordinates], properties), angle, {\n pivot: pivot,\n });\n }\n}\n\n/**\n * Get Tan Degrees\n *\n * @private\n * @param {number} deg Degrees\n * @returns {number} Tan Degrees\n */\nfunction getTanDeg(deg) {\n var rad = (deg * Math.PI) / 180;\n return Math.tan(rad);\n}\n\nexport default ellipse;\n","import * as React from 'react';\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nexport default function useId(idOverride) {\n var _React$useState = React.useState(idOverride),\n defaultId = _React$useState[0],\n setDefaultId = _React$useState[1];\n\n var id = idOverride || defaultId;\n React.useEffect(function () {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(\"mui-\".concat(Math.round(Math.random() * 1e5)));\n }\n }, [defaultId]);\n return id;\n}","export { default as capitalize } from './capitalize';\nexport { default as createChainedFunction } from './createChainedFunction';\nexport { default as createSvgIcon } from './createSvgIcon';\nexport { default as debounce } from './debounce';\nexport { default as deprecatedPropType } from './deprecatedPropType';\nexport { default as isMuiElement } from './isMuiElement';\nexport { default as ownerDocument } from './ownerDocument';\nexport { default as ownerWindow } from './ownerWindow';\nexport { default as requirePropFactory } from './requirePropFactory';\nexport { default as setRef } from './setRef';\nexport { default as unsupportedProp } from './unsupportedProp';\nexport { default as useControlled } from './useControlled';\nexport { default as useEventCallback } from './useEventCallback';\nexport { default as useForkRef } from './useForkRef'; // eslint-disable-next-line camelcase\n\nexport { default as unstable_useId } from './unstable_useId';\nexport { default as useIsFocusVisible } from './useIsFocusVisible';","export default `\\\n\nuniform float lighting_uAmbient;\nuniform float lighting_uDiffuse;\nuniform float lighting_uShininess;\nuniform vec3 lighting_uSpecularColor;\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 light_direction, vec3 view_direction, vec3 normal_worldspace, vec3 color) {\n vec3 halfway_direction = normalize(light_direction + view_direction);\n float lambertian = dot(light_direction, normal_worldspace);\n float specular = 0.0;\n if (lambertian > 0.0) {\n float specular_angle = max(dot(normal_worldspace, halfway_direction), 0.0);\n specular = pow(specular_angle, lighting_uShininess);\n }\n lambertian = max(lambertian, 0.0);\n return (lambertian * lighting_uDiffuse * surfaceColor + specular * lighting_uSpecularColor) * color;\n}\n\nvec3 lighting_getLightColor(vec3 surfaceColor, vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = surfaceColor;\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n lightColor = lighting_uAmbient * surfaceColor * lighting_uAmbientLight.color;\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n\nvec3 lighting_getSpecularLightColor(vec3 cameraPosition, vec3 position_worldspace, vec3 normal_worldspace) {\n vec3 lightColor = vec3(0, 0, 0);\n vec3 surfaceColor = vec3(0, 0, 0);\n\n if (lighting_uEnabled) {\n vec3 view_direction = normalize(cameraPosition - position_worldspace);\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uPointLightCount) {\n break;\n }\n PointLight pointLight = lighting_uPointLight[i];\n vec3 light_position_worldspace = pointLight.position;\n vec3 light_direction = normalize(light_position_worldspace - position_worldspace);\n lightColor += lighting_getLightColor(surfaceColor, light_direction, view_direction, normal_worldspace, pointLight.color);\n }\n\n for (int i = 0; i < MAX_LIGHTS; i++) {\n if (i >= lighting_uDirectionalLightCount) {\n break;\n }\n DirectionalLight directionalLight = lighting_uDirectionalLight[i];\n lightColor += lighting_getLightColor(surfaceColor, -directionalLight.direction, view_direction, normal_worldspace, directionalLight.color);\n }\n }\n return lightColor;\n}\n`;\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nimport {lights} from '../lights/lights';\nimport lightingShader from './phong-lighting.glsl';\n\nconst INITIAL_MODULE_OPTIONS = {};\n\nfunction getMaterialUniforms(material) {\n const {ambient = 0.35, diffuse = 0.6, shininess = 32, specularColor = [30, 30, 30]} = material;\n\n return {\n lighting_uAmbient: ambient,\n lighting_uDiffuse: diffuse,\n lighting_uShininess: shininess,\n lighting_uSpecularColor: specularColor.map(x => x / 255)\n };\n}\n\nfunction getUniforms(opts = INITIAL_MODULE_OPTIONS) {\n if (!('material' in opts)) {\n return {};\n }\n\n const {material} = opts;\n\n if (!material) {\n return {lighting_uEnabled: false};\n }\n\n return getMaterialUniforms(material);\n}\n\n/** @type {ShaderModule} */\nexport const gouraudLighting = {\n name: 'gouraud-lighting',\n dependencies: [lights],\n vs: lightingShader,\n defines: {\n LIGHTING_VERTEX: 1\n },\n getUniforms\n};\n\n/** @type {ShaderModule} */\nexport const phongLighting = {\n name: 'phong-lighting',\n dependencies: [lights],\n fs: lightingShader,\n defines: {\n LIGHTING_FRAGMENT: 1\n },\n getUniforms\n};\n","'use strict';\n\nconst nodeToJson = require('./node2json');\nconst xmlToNodeobj = require('./xmlstr2xmlnode');\nconst x2xmlnode = require('./xmlstr2xmlnode');\nconst buildOptions = require('./util').buildOptions;\nconst validator = require('./validator');\n\nexports.parse = function(xmlData, givenOptions = {}, validationOption) {\n if( validationOption){\n if(validationOption === true) validationOption = {}\n \n const result = validator.validate(xmlData, validationOption);\n if (result !== true) {\n throw Error( result.err.msg)\n }\n }\n if(givenOptions.parseTrueNumberOnly \n && givenOptions.parseNodeValue !== false\n && !givenOptions.numParseOptions){\n \n givenOptions.numParseOptions = {\n leadingZeros: false,\n }\n }\n let options = buildOptions(givenOptions, x2xmlnode.defaultOptions, x2xmlnode.props);\n\n const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options)\n //print(traversableObj, \" \");\n return nodeToJson.convertToJson(traversableObj, options);\n};\nexports.convertTonimn = require('./nimndata').convert2nimn;\nexports.getTraversalObj = xmlToNodeobj.getTraversalObj;\nexports.convertToJson = nodeToJson.convertToJson;\nexports.convertToJsonString = require('./node2json_str').convertToJsonString;\nexports.validate = validator.validate;\nexports.j2xParser = require('./json2xml');\nexports.parseToNimn = function(xmlData, schema, options) {\n return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options);\n};\n\n\nfunction print(xmlNode, indentation){\n if(xmlNode){\n console.log(indentation + \"{\")\n console.log(indentation + \" \\\"tagName\\\": \\\"\" + xmlNode.tagname + \"\\\", \");\n if(xmlNode.parent){\n console.log(indentation + \" \\\"parent\\\": \\\"\" + xmlNode.parent.tagname + \"\\\", \");\n }\n console.log(indentation + \" \\\"val\\\": \\\"\" + xmlNode.val + \"\\\", \");\n console.log(indentation + \" \\\"attrs\\\": \" + JSON.stringify(xmlNode.attrsMap,null,4) + \", \");\n\n if(xmlNode.child){\n console.log(indentation + \"\\\"child\\\": {\")\n const indentation2 = indentation + indentation;\n Object.keys(xmlNode.child).forEach( function(key) {\n const node = xmlNode.child[key];\n\n if(Array.isArray(node)){\n console.log(indentation + \"\\\"\"+key+\"\\\" :[\")\n node.forEach( function(item,index) {\n //console.log(indentation + \" \\\"\"+index+\"\\\" : [\")\n print(item, indentation2);\n })\n console.log(indentation + \"],\") \n }else{\n console.log(indentation + \" \\\"\"+key+\"\\\" : {\")\n print(node, indentation2);\n console.log(indentation + \"},\") \n }\n });\n console.log(indentation + \"},\")\n }\n console.log(indentation + \"},\")\n }\n}\n","/*\n** Copyright (c) 2015 The Khronos Group Inc.\n**\n** Permission is hereby granted, free of charge, to any person obtaining a\n** copy of this software and/or associated documentation files (the\n** \"Materials\"), to deal in the Materials without restriction, including\n** without limitation the rights to use, copy, modify, merge, publish,\n** distribute, sublicense, and/or sell copies of the Materials, and to\n** permit persons to whom the Materials are furnished to do so, subject to\n** the following conditions:\n**\n** The above copyright notice and this permission notice shall be included\n** in all copies or substantial portions of the Materials.\n**\n** THE MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.\n*/\n\n// Modified to use ES6 and polyfill a provided context rather than\n// the global class.\n\n// @ts-nocheck external code\n\nimport {global} from 'probe.gl/env';\n\nconst glErrorShadow = {};\n\nfunction error(msg) {\n if (global.console && global.console.error) {\n global.console.error(msg);\n }\n}\n\nfunction log(msg) {\n if (global.console && global.console.log) {\n global.console.log(msg);\n }\n}\n\nfunction synthesizeGLError(err, opt_msg) {\n glErrorShadow[err] = true;\n if (opt_msg !== undefined) {\n error(opt_msg);\n }\n}\n\nfunction wrapGLError(gl) {\n const f = gl.getError;\n gl.getError = function getError() {\n let err;\n do {\n err = f.apply(gl);\n if (err !== gl.NO_ERROR) {\n glErrorShadow[err] = true;\n }\n } while (err !== gl.NO_ERROR);\n\n for (err in glErrorShadow) {\n if (glErrorShadow[err]) {\n delete glErrorShadow[err];\n return parseInt(err, 10);\n }\n }\n\n return gl.NO_ERROR;\n };\n}\n\nconst WebGLVertexArrayObjectOES = function WebGLVertexArrayObjectOES(ext) {\n const gl = ext.gl;\n\n this.ext = ext;\n this.isAlive = true;\n this.hasBeenBound = false;\n\n this.elementArrayBuffer = null;\n this.attribs = new Array(ext.maxVertexAttribs);\n for (let n = 0; n < this.attribs.length; n++) {\n const attrib = new WebGLVertexArrayObjectOES.VertexAttrib(gl);\n this.attribs[n] = attrib;\n }\n\n this.maxAttrib = 0;\n};\n\nWebGLVertexArrayObjectOES.VertexAttrib = function VertexAttrib(gl) {\n this.enabled = false;\n this.buffer = null;\n this.size = 4;\n this.type = gl.FLOAT;\n this.normalized = false;\n this.stride = 16;\n this.offset = 0;\n\n this.cached = '';\n this.recache();\n};\nWebGLVertexArrayObjectOES.VertexAttrib.prototype.recache = function recache() {\n this.cached = [this.size, this.type, this.normalized, this.stride, this.offset].join(':');\n};\n\nconst OESVertexArrayObject = function OESVertexArrayObject(gl) {\n const self = this;\n this.gl = gl;\n\n wrapGLError(gl);\n\n const original = (this.original = {\n getParameter: gl.getParameter,\n enableVertexAttribArray: gl.enableVertexAttribArray,\n disableVertexAttribArray: gl.disableVertexAttribArray,\n bindBuffer: gl.bindBuffer,\n getVertexAttrib: gl.getVertexAttrib,\n vertexAttribPointer: gl.vertexAttribPointer\n });\n\n gl.getParameter = function getParameter(pname) {\n if (pname === self.VERTEX_ARRAY_BINDING_OES) {\n if (self.currentVertexArrayObject === self.defaultVertexArrayObject) {\n return null;\n }\n return self.currentVertexArrayObject;\n }\n return original.getParameter.apply(this, arguments);\n };\n\n gl.enableVertexAttribArray = function enableVertexAttribArray(index) {\n const vao = self.currentVertexArrayObject;\n vao.maxAttrib = Math.max(vao.maxAttrib, index);\n const attrib = vao.attribs[index];\n attrib.enabled = true;\n return original.enableVertexAttribArray.apply(this, arguments);\n };\n gl.disableVertexAttribArray = function disableVertexAttribArray(index) {\n const vao = self.currentVertexArrayObject;\n vao.maxAttrib = Math.max(vao.maxAttrib, index);\n const attrib = vao.attribs[index];\n attrib.enabled = false;\n return original.disableVertexAttribArray.apply(this, arguments);\n };\n\n gl.bindBuffer = function bindBuffer(target, buffer) {\n switch (target) {\n case gl.ARRAY_BUFFER:\n self.currentArrayBuffer = buffer;\n break;\n case gl.ELEMENT_ARRAY_BUFFER:\n self.currentVertexArrayObject.elementArrayBuffer = buffer;\n break;\n default:\n }\n return original.bindBuffer.apply(this, arguments);\n };\n\n gl.getVertexAttrib = function getVertexAttrib(index, pname) {\n const vao = self.currentVertexArrayObject;\n const attrib = vao.attribs[index];\n switch (pname) {\n case gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:\n return attrib.buffer;\n case gl.VERTEX_ATTRIB_ARRAY_ENABLED:\n return attrib.enabled;\n case gl.VERTEX_ATTRIB_ARRAY_SIZE:\n return attrib.size;\n case gl.VERTEX_ATTRIB_ARRAY_STRIDE:\n return attrib.stride;\n case gl.VERTEX_ATTRIB_ARRAY_TYPE:\n return attrib.type;\n case gl.VERTEX_ATTRIB_ARRAY_NORMALIZED:\n return attrib.normalized;\n default:\n return original.getVertexAttrib.apply(this, arguments);\n }\n };\n\n gl.vertexAttribPointer = function vertexAttribPointer(\n indx,\n size,\n type,\n normalized,\n stride,\n offset\n ) {\n const vao = self.currentVertexArrayObject;\n vao.maxAttrib = Math.max(vao.maxAttrib, indx);\n const attrib = vao.attribs[indx];\n attrib.buffer = self.currentArrayBuffer;\n attrib.size = size;\n attrib.type = type;\n attrib.normalized = normalized;\n attrib.stride = stride;\n attrib.offset = offset;\n attrib.recache();\n return original.vertexAttribPointer.apply(this, arguments);\n };\n\n if (gl.instrumentExtension) {\n gl.instrumentExtension(this, 'OES_vertex_array_object');\n }\n\n // undefined for headless gl\n if (gl.canvas) {\n gl.canvas.addEventListener(\n 'webglcontextrestored',\n () => {\n log('OESVertexArrayObject emulation library context restored');\n self.reset_();\n },\n true\n );\n }\n\n this.reset_();\n};\n\nOESVertexArrayObject.prototype.VERTEX_ARRAY_BINDING_OES = 0x85b5;\n\nOESVertexArrayObject.prototype.reset_ = function reset_() {\n const contextWasLost = this.vertexArrayObjects !== undefined;\n if (contextWasLost) {\n for (let ii = 0; ii < this.vertexArrayObjects.length; ++ii) {\n this.vertexArrayObjects.isAlive = false;\n }\n }\n const gl = this.gl;\n this.maxVertexAttribs = gl.getParameter(gl.MAX_VERTEX_ATTRIBS);\n\n this.defaultVertexArrayObject = new WebGLVertexArrayObjectOES(this);\n this.currentVertexArrayObject = null;\n this.currentArrayBuffer = null;\n this.vertexArrayObjects = [this.defaultVertexArrayObject];\n\n this.bindVertexArrayOES(null);\n};\n\nOESVertexArrayObject.prototype.createVertexArrayOES = function createVertexArrayOES() {\n const arrayObject = new WebGLVertexArrayObjectOES(this);\n this.vertexArrayObjects.push(arrayObject);\n return arrayObject;\n};\n\nOESVertexArrayObject.prototype.deleteVertexArrayOES = function deleteVertexArrayOES(arrayObject) {\n arrayObject.isAlive = false;\n this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(arrayObject), 1);\n if (this.currentVertexArrayObject === arrayObject) {\n this.bindVertexArrayOES(null);\n }\n};\n\nOESVertexArrayObject.prototype.isVertexArrayOES = function isVertexArrayOES(arrayObject) {\n if (arrayObject && arrayObject instanceof WebGLVertexArrayObjectOES) {\n if (arrayObject.hasBeenBound && arrayObject.ext === this) {\n return true;\n }\n }\n return false;\n};\n\nOESVertexArrayObject.prototype.bindVertexArrayOES = function bindVertexArrayOES(arrayObject) {\n const gl = this.gl;\n if (arrayObject && !arrayObject.isAlive) {\n synthesizeGLError(\n gl.INVALID_OPERATION,\n 'bindVertexArrayOES: attempt to bind deleted arrayObject'\n );\n return;\n }\n const original = this.original;\n\n const oldVAO = this.currentVertexArrayObject;\n this.currentVertexArrayObject = arrayObject || this.defaultVertexArrayObject;\n this.currentVertexArrayObject.hasBeenBound = true;\n const newVAO = this.currentVertexArrayObject;\n\n if (oldVAO === newVAO) {\n return;\n }\n\n if (!oldVAO || newVAO.elementArrayBuffer !== oldVAO.elementArrayBuffer) {\n original.bindBuffer.call(gl, gl.ELEMENT_ARRAY_BUFFER, newVAO.elementArrayBuffer);\n }\n\n let currentBinding = this.currentArrayBuffer;\n const maxAttrib = Math.max(oldVAO ? oldVAO.maxAttrib : 0, newVAO.maxAttrib);\n for (let n = 0; n <= maxAttrib; n++) {\n const attrib = newVAO.attribs[n];\n const oldAttrib = oldVAO ? oldVAO.attribs[n] : null;\n\n if (!oldVAO || attrib.enabled !== oldAttrib.enabled) {\n if (attrib.enabled) {\n original.enableVertexAttribArray.call(gl, n);\n } else {\n original.disableVertexAttribArray.call(gl, n);\n }\n }\n\n if (attrib.enabled) {\n let bufferChanged = false;\n if (!oldVAO || attrib.buffer !== oldAttrib.buffer) {\n if (currentBinding !== attrib.buffer) {\n original.bindBuffer.call(gl, gl.ARRAY_BUFFER, attrib.buffer);\n currentBinding = attrib.buffer;\n }\n bufferChanged = true;\n }\n\n if (bufferChanged || attrib.cached !== oldAttrib.cached) {\n original.vertexAttribPointer.call(\n gl,\n n,\n attrib.size,\n attrib.type,\n attrib.normalized,\n attrib.stride,\n attrib.offset\n );\n }\n }\n }\n\n if (this.currentArrayBuffer !== currentBinding) {\n original.bindBuffer.call(gl, gl.ARRAY_BUFFER, this.currentArrayBuffer);\n }\n};\n\nexport function polyfillVertexArrayObject(gl) {\n if (typeof gl.createVertexArray === 'function') {\n // VAOs directly supported on object (i.e. WebGL 2 context)\n return;\n }\n\n const original_getSupportedExtensions = gl.getSupportedExtensions;\n gl.getSupportedExtensions = function getSupportedExtensions() {\n const list = original_getSupportedExtensions.call(this) || [];\n if (list.indexOf('OES_vertex_array_object') < 0) {\n list.push('OES_vertex_array_object');\n }\n return list;\n };\n\n const original_getExtension = gl.getExtension;\n gl.getExtension = function getExtension(name) {\n const ext = original_getExtension.call(this, name);\n if (ext) {\n return ext;\n }\n if (name !== 'OES_vertex_array_object') {\n return null;\n }\n\n if (!gl.__OESVertexArrayObject) {\n this.__OESVertexArrayObject = new OESVertexArrayObject(this);\n }\n return this.__OESVertexArrayObject;\n };\n}\n","// TODO: Two subdirectories must not depend on each other (classes vs utils)!\nimport Texture2D from '../classes/texture-2d';\nimport TextureCube from '../classes/texture-cube';\nimport Texture3D from '../classes/texture-3d';\nimport Framebuffer from '../classes/framebuffer';\nimport GL from '@luma.gl/constants';\nimport {assert} from '../utils/assert';\n\n// Clone a new texture object from a reference texture object.\n/** @type {import('./texture-utils').cloneTextureFrom} */\nexport function cloneTextureFrom(refTexture, overrides) {\n assert(\n refTexture instanceof Texture2D ||\n refTexture instanceof TextureCube ||\n refTexture instanceof Texture3D\n );\n\n const TextureType = refTexture.constructor;\n\n const {gl, width, height, format, type, dataFormat, border, mipmaps} = refTexture;\n\n const textureOptions = Object.assign(\n {\n width,\n height,\n format,\n type,\n dataFormat,\n border,\n mipmaps\n },\n overrides\n );\n\n // TODO: move this to `Texture` class as instance method and use this.constructor\n return new TextureType(gl, textureOptions);\n}\n\n// Wraps a given texture into a framebuffer object, that can be further used\n// to read data from the texture object.\n/** @type {import('./texture-utils').toFramebuffer} */\nexport function toFramebuffer(texture, opts) {\n const {gl, width, height, id} = texture;\n const framebuffer = new Framebuffer(\n gl,\n Object.assign({}, opts, {\n id: `framebuffer-for-${id}`,\n width,\n height,\n attachments: {\n [GL.COLOR_ATTACHMENT0]: texture\n }\n })\n );\n return framebuffer;\n}\n","import GL from '@luma.gl/constants';\nimport {log, assertWebGLContext} from '@luma.gl/gltools';\nimport Texture from './texture';\n\nconst FACES = [\n GL.TEXTURE_CUBE_MAP_POSITIVE_X,\n GL.TEXTURE_CUBE_MAP_NEGATIVE_X,\n GL.TEXTURE_CUBE_MAP_POSITIVE_Y,\n GL.TEXTURE_CUBE_MAP_NEGATIVE_Y,\n GL.TEXTURE_CUBE_MAP_POSITIVE_Z,\n GL.TEXTURE_CUBE_MAP_NEGATIVE_Z\n];\n\nexport default class TextureCube extends Texture {\n constructor(gl, props = {}) {\n assertWebGLContext(gl);\n\n super(gl, Object.assign({}, props, {target: GL.TEXTURE_CUBE_MAP}));\n\n this.initialize(props);\n\n Object.seal(this);\n }\n\n initialize(props = {}) {\n const {mipmaps = true, parameters = {}} = props;\n\n // Store props for accessors\n this.opts = props;\n\n // @ts-ignore\n this.setCubeMapImageData(props).then(() => {\n this.loaded = true;\n\n // TODO - should genMipmap() be called on the cubemap or on the faces?\n // TODO - without generateMipmap() cube textures do not work at all!!! Why?\n if (mipmaps) {\n this.generateMipmap(props);\n }\n\n this.setParameters(parameters);\n });\n return this;\n }\n\n subImage({face, data, x = 0, y = 0, mipmapLevel = 0}) {\n // @ts-ignore TODO - is this a bug?\n return this._subImage({target: face, data, x, y, mipmapLevel});\n }\n\n /* eslint-disable max-statements, max-len */\n async setCubeMapImageData({\n width,\n height,\n pixels,\n data,\n border = 0,\n format = GL.RGBA,\n type = GL.UNSIGNED_BYTE\n }) {\n const {gl} = this;\n const imageDataMap = pixels || data;\n\n // pixel data (imageDataMap) is an Object from Face to Image or Promise.\n // For example:\n // {\n // GL.TEXTURE_CUBE_MAP_POSITIVE_X : Image-or-Promise,\n // GL.TEXTURE_CUBE_MAP_NEGATIVE_X : Image-or-Promise,\n // ... }\n // To provide multiple level-of-details (LODs) this can be Face to Array\n // of Image or Promise, like this\n // {\n // GL.TEXTURE_CUBE_MAP_POSITIVE_X : [Image-or-Promise-LOD-0, Image-or-Promise-LOD-1],\n // GL.TEXTURE_CUBE_MAP_NEGATIVE_X : [Image-or-Promise-LOD-0, Image-or-Promise-LOD-1],\n // ... }\n\n const resolvedFaces = await Promise.all(\n FACES.map(face => {\n const facePixels = imageDataMap[face];\n return Promise.all(Array.isArray(facePixels) ? facePixels : [facePixels]);\n })\n );\n\n this.bind();\n\n FACES.forEach((face, index) => {\n if (resolvedFaces[index].length > 1 && this.opts.mipmaps !== false) {\n // If the user provides multiple LODs, then automatic mipmap\n // generation generateMipmap() should be disabled to avoid overwritting them.\n log.warn(`${this.id} has mipmap and multiple LODs.`)();\n }\n resolvedFaces[index].forEach((image, lodLevel) => {\n // TODO: adjust width & height for LOD!\n if (width && height) {\n gl.texImage2D(face, lodLevel, format, width, height, border, format, type, image);\n } else {\n gl.texImage2D(face, lodLevel, format, format, type, image);\n }\n });\n });\n\n this.unbind();\n }\n\n // TODO: update this method to accept LODs\n setImageDataForFace(options) {\n const {\n face,\n width,\n height,\n pixels,\n data,\n border = 0,\n format = GL.RGBA,\n type = GL.UNSIGNED_BYTE\n // generateMipmap = false // TODO\n } = options;\n\n const {gl} = this;\n\n const imageData = pixels || data;\n\n this.bind();\n if (imageData instanceof Promise) {\n imageData.then(resolvedImageData =>\n this.setImageDataForFace(\n Object.assign({}, options, {\n face,\n data: resolvedImageData,\n pixels: resolvedImageData\n })\n )\n );\n } else if (this.width || this.height) {\n gl.texImage2D(face, 0, format, width, height, border, format, type, imageData);\n } else {\n gl.texImage2D(face, 0, format, format, type, imageData);\n }\n\n return this;\n }\n}\n\nTextureCube.FACES = FACES;\n","import GL from '@luma.gl/constants';\nimport {isWebGL2, assertWebGL2Context, withParameters} from '@luma.gl/gltools';\nimport Texture from './texture';\nimport {DATA_FORMAT_CHANNELS, TYPE_SIZES} from './texture-formats';\nimport Buffer from './buffer';\n\nexport default class Texture3D extends Texture {\n static isSupported(gl) {\n return isWebGL2(gl);\n }\n\n constructor(gl, props = {}) {\n assertWebGL2Context(gl);\n props = Object.assign({depth: 1}, props, {target: GL.TEXTURE_3D, unpackFlipY: false});\n super(gl, props);\n this.initialize(props);\n\n Object.seal(this);\n }\n\n // Image 3D copies from Typed Array or WebGLBuffer\n setImageData({\n level = 0,\n dataFormat = GL.RGBA,\n width,\n height,\n depth = 1,\n border = 0,\n format,\n type = GL.UNSIGNED_BYTE,\n offset = 0,\n data,\n parameters = {}\n }) {\n this._trackDeallocatedMemory('Texture');\n\n this.gl.bindTexture(this.target, this.handle);\n\n withParameters(this.gl, parameters, () => {\n if (ArrayBuffer.isView(data)) {\n // @ts-ignore\n this.gl.texImage3D(\n this.target,\n level,\n dataFormat,\n width,\n height,\n depth,\n border,\n format,\n type,\n data\n );\n }\n\n if (data instanceof Buffer) {\n this.gl.bindBuffer(GL.PIXEL_UNPACK_BUFFER, data.handle);\n // @ts-ignore\n this.gl.texImage3D(\n this.target,\n level,\n dataFormat,\n width,\n height,\n depth,\n border,\n format,\n type,\n offset\n );\n }\n });\n\n if (data && data.byteLength) {\n this._trackAllocatedMemory(data.byteLength, 'Texture');\n } else {\n // NOTE(Tarek): Default to RGBA bytes\n // @ts-ignore\n const channels = DATA_FORMAT_CHANNELS[this.dataFormat] || 4;\n // @ts-ignore\n const channelSize = TYPE_SIZES[this.type] || 1;\n\n this._trackAllocatedMemory(\n this.width * this.height * this.depth * channels * channelSize,\n 'Texture'\n );\n }\n\n this.loaded = true;\n\n return this;\n }\n}\n","import {Loader} from '@loaders.gl/loader-utils';\nimport {normalizeLoader} from '../loader-utils/normalize-loader';\nimport {getGlobalLoaderState} from '../loader-utils/option-utils';\n\n// Store global registered loaders on the global object to increase chances of cross loaders-version interoperability\n// This use case is not reliable but can help when testing new versions of loaders.gl with existing frameworks\nconst getGlobalLoaderRegistry = () => {\n const state = getGlobalLoaderState();\n state.loaderRegistry = state.loaderRegistry || [];\n return state.loaderRegistry;\n};\n\nexport function registerLoaders(loaders: Loader[]) {\n const loaderRegistry = getGlobalLoaderRegistry();\n\n loaders = Array.isArray(loaders) ? loaders : [loaders];\n\n for (const loader of loaders) {\n const normalizedLoader = normalizeLoader(loader);\n if (!loaderRegistry.find((registeredLoader) => normalizedLoader === registeredLoader)) {\n // add to the beginning of the loaderRegistry, so the last registeredLoader get picked\n loaderRegistry.unshift(normalizedLoader);\n }\n }\n}\n\nexport function getRegisteredLoaders(): Loader[] {\n return getGlobalLoaderRegistry();\n}\n\n// For testing\nexport function _unregisterLoaders() {\n const state = getGlobalLoaderState();\n state.loaderRegistry = [];\n}\n","'use strict';\n\nmodule.exports = TinySDF;\nmodule.exports.default = TinySDF;\n\nvar INF = 1e20;\n\nfunction TinySDF(fontSize, buffer, radius, cutoff, fontFamily, fontWeight) {\n this.fontSize = fontSize || 24;\n this.buffer = buffer === undefined ? 3 : buffer;\n this.cutoff = cutoff || 0.25;\n this.fontFamily = fontFamily || 'sans-serif';\n this.fontWeight = fontWeight || 'normal';\n this.radius = radius || 8;\n\n // For backwards compatibility, we honor the implicit contract that the\n // size of the returned bitmap will be fontSize + buffer * 2\n var size = this.size = this.fontSize + this.buffer * 2;\n // Glyphs may be slightly larger than their fontSize. The canvas already\n // has buffer space, but create extra buffer space in the output grid for the\n // \"halo\" to extend into (if metric extraction is enabled)\n var gridSize = size + this.buffer * 2;\n\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.canvas.height = size;\n\n this.ctx = this.canvas.getContext('2d');\n this.ctx.font = this.fontWeight + ' ' + this.fontSize + 'px ' + this.fontFamily;\n\n this.ctx.textAlign = 'left'; // Necessary so that RTL text doesn't have different alignment\n this.ctx.fillStyle = 'black';\n\n // temporary arrays for the distance transform\n this.gridOuter = new Float64Array(gridSize * gridSize);\n this.gridInner = new Float64Array(gridSize * gridSize);\n this.f = new Float64Array(gridSize);\n this.z = new Float64Array(gridSize + 1);\n this.v = new Uint16Array(gridSize);\n\n this.useMetrics = this.ctx.measureText('A').actualBoundingBoxLeft !== undefined;\n\n // hack around https://bugzilla.mozilla.org/show_bug.cgi?id=737852\n this.middle = Math.round((size / 2) * (navigator.userAgent.indexOf('Gecko/') >= 0 ? 1.2 : 1));\n}\n\nfunction prepareGrids(imgData, width, height, glyphWidth, glyphHeight, gridOuter, gridInner) {\n // Initialize grids outside the glyph range to alpha 0\n gridOuter.fill(INF, 0, width * height);\n gridInner.fill(0, 0, width * height);\n\n var offset = (width - glyphWidth) / 2; // This is zero if we're not extracting metrics\n\n for (var y = 0; y < glyphHeight; y++) {\n for (var x = 0; x < glyphWidth; x++) {\n var j = (y + offset) * width + x + offset;\n var a = imgData.data[4 * (y * glyphWidth + x) + 3] / 255; // alpha value\n if (a === 1) {\n gridOuter[j] = 0;\n gridInner[j] = INF;\n } else if (a === 0) {\n gridOuter[j] = INF;\n gridInner[j] = 0;\n } else {\n var b = Math.max(0, 0.5 - a);\n var c = Math.max(0, a - 0.5);\n gridOuter[j] = b * b;\n gridInner[j] = c * c;\n }\n }\n }\n}\n\nfunction extractAlpha(alphaChannel, width, height, gridOuter, gridInner, radius, cutoff) {\n for (var i = 0; i < width * height; i++) {\n var d = Math.sqrt(gridOuter[i]) - Math.sqrt(gridInner[i]);\n alphaChannel[i] = Math.round(255 - 255 * (d / radius + cutoff));\n }\n}\n\nTinySDF.prototype._draw = function (char, getMetrics) {\n var textMetrics = this.ctx.measureText(char);\n // Older browsers only expose the glyph width\n // This is enough for basic layout with all glyphs using the same fixed size\n var advance = textMetrics.width;\n\n var doubleBuffer = 2 * this.buffer;\n var width, glyphWidth, height, glyphHeight, top;\n\n var imgTop, imgLeft, baselinePosition;\n // If the browser supports bounding box metrics, we can generate a smaller\n // SDF. This is a significant performance win.\n if (getMetrics && this.useMetrics) {\n // The integer/pixel part of the top alignment is encoded in metrics.top\n // The remainder is implicitly encoded in the rasterization\n top = Math.floor(textMetrics.actualBoundingBoxAscent);\n baselinePosition = this.buffer + Math.ceil(textMetrics.actualBoundingBoxAscent);\n imgTop = this.buffer;\n imgLeft = this.buffer;\n\n // If the glyph overflows the canvas size, it will be clipped at the\n // bottom/right\n glyphWidth = Math.min(this.size,\n Math.ceil(textMetrics.actualBoundingBoxRight - textMetrics.actualBoundingBoxLeft));\n glyphHeight = Math.min(this.size - imgTop,\n Math.ceil(textMetrics.actualBoundingBoxAscent + textMetrics.actualBoundingBoxDescent));\n\n width = glyphWidth + doubleBuffer;\n height = glyphHeight + doubleBuffer;\n this.ctx.textBaseline = 'alphabetic';\n } else {\n width = glyphWidth = this.size;\n height = glyphHeight = this.size;\n // 19 points is an approximation of the \"cap height\" ascent from alphabetic\n // baseline (even though actual drawing is from middle baseline, we can\n // use the approximation because every glyph fills the em box)\n top = 19 * this.fontSize / 24;\n imgTop = imgLeft = 0;\n baselinePosition = this.middle;\n this.ctx.textBaseline = 'middle';\n }\n\n var imgData;\n if (glyphWidth && glyphHeight) {\n this.ctx.clearRect(imgLeft, imgTop, glyphWidth, glyphHeight);\n this.ctx.fillText(char, this.buffer, baselinePosition);\n imgData = this.ctx.getImageData(imgLeft, imgTop, glyphWidth, glyphHeight);\n }\n\n var alphaChannel = new Uint8ClampedArray(width * height);\n\n prepareGrids(imgData, width, height, glyphWidth, glyphHeight, this.gridOuter, this.gridInner);\n\n edt(this.gridOuter, width, height, this.f, this.v, this.z);\n edt(this.gridInner, width, height, this.f, this.v, this.z);\n\n extractAlpha(alphaChannel, width, height, this.gridOuter, this.gridInner, this.radius, this.cutoff);\n\n return {\n data: alphaChannel,\n metrics: {\n width: glyphWidth,\n height: glyphHeight,\n sdfWidth: width,\n sdfHeight: height,\n top: top,\n left: 0,\n advance: advance\n }\n };\n};\n\nTinySDF.prototype.draw = function (char) {\n return this._draw(char, false).data;\n};\n\nTinySDF.prototype.drawWithMetrics = function (char) {\n return this._draw(char, true);\n};\n\n// 2D Euclidean squared distance transform by Felzenszwalb & Huttenlocher https://cs.brown.edu/~pff/papers/dt-final.pdf\nfunction edt(data, width, height, f, v, z) {\n for (var x = 0; x < width; x++) edt1d(data, x, width, height, f, v, z);\n for (var y = 0; y < height; y++) edt1d(data, y * width, 1, width, f, v, z);\n}\n\n// 1D squared distance transform\nfunction edt1d(grid, offset, stride, length, f, v, z) {\n var q, k, s, r;\n v[0] = 0;\n z[0] = -INF;\n z[1] = INF;\n\n for (q = 0; q < length; q++) f[q] = grid[offset + q * stride];\n\n for (q = 1, k = 0, s = 0; q < length; q++) {\n do {\n r = v[k];\n s = (f[q] - f[r] + q * q - r * r) / (q - r) / 2;\n } while (s <= z[k] && --k > -1);\n\n k++;\n v[k] = q;\n z[k] = s;\n z[k + 1] = INF;\n }\n\n for (q = 0, k = 0; q < length; q++) {\n while (z[k + 1] < q) k++;\n r = v[k];\n grid[offset + q * stride] = f[r] + (q - r) * (q - r);\n }\n}\n","'use strict';\n\nmodule.exports = earcut;\nmodule.exports.default = earcut;\n\nfunction earcut(data, holeIndices, dim) {\n\n dim = dim || 2;\n\n var hasHoles = holeIndices && holeIndices.length,\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\n outerNode = linkedList(data, 0, outerLen, dim, true),\n triangles = [];\n\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\n\n var minX, minY, maxX, maxY, x, y, invSize;\n\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\n\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\n if (data.length > 80 * dim) {\n minX = maxX = data[0];\n minY = maxY = data[1];\n\n for (var i = dim; i < outerLen; i += dim) {\n x = data[i];\n y = data[i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n }\n\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\n invSize = Math.max(maxX - minX, maxY - minY);\n invSize = invSize !== 0 ? 1 / invSize : 0;\n }\n\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\n\n return triangles;\n}\n\n// create a circular doubly linked list from polygon points in the specified winding order\nfunction linkedList(data, start, end, dim, clockwise) {\n var i, last;\n\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\n } else {\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\n }\n\n if (last && equals(last, last.next)) {\n removeNode(last);\n last = last.next;\n }\n\n return last;\n}\n\n// eliminate colinear or duplicate points\nfunction filterPoints(start, end) {\n if (!start) return start;\n if (!end) end = start;\n\n var p = start,\n again;\n do {\n again = false;\n\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\n removeNode(p);\n p = end = p.prev;\n if (p === p.next) break;\n again = true;\n\n } else {\n p = p.next;\n }\n } while (again || p !== end);\n\n return end;\n}\n\n// main ear slicing loop which triangulates a polygon (given as a linked list)\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\n if (!ear) return;\n\n // interlink polygon nodes in z-order\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\n\n var stop = ear,\n prev, next;\n\n // iterate through ears, slicing them one by one\n while (ear.prev !== ear.next) {\n prev = ear.prev;\n next = ear.next;\n\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\n // cut off the triangle\n triangles.push(prev.i / dim);\n triangles.push(ear.i / dim);\n triangles.push(next.i / dim);\n\n removeNode(ear);\n\n // skipping the next vertex leads to less sliver triangles\n ear = next.next;\n stop = next.next;\n\n continue;\n }\n\n ear = next;\n\n // if we looped through the whole remaining polygon and can't find any more ears\n if (ear === stop) {\n // try filtering points and slicing again\n if (!pass) {\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\n\n // if this didn't work, try curing all small self-intersections locally\n } else if (pass === 1) {\n ear = cureLocalIntersections(filterPoints(ear), triangles, dim);\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\n\n // as a last resort, try splitting the remaining polygon into two\n } else if (pass === 2) {\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\n }\n\n break;\n }\n }\n}\n\n// check whether a polygon node forms a valid ear with adjacent nodes\nfunction isEar(ear) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // now make sure we don't have other points inside the potential ear\n var p = ear.next.next;\n\n while (p !== ear.prev) {\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.next;\n }\n\n return true;\n}\n\nfunction isEarHashed(ear, minX, minY, invSize) {\n var a = ear.prev,\n b = ear,\n c = ear.next;\n\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\n\n // triangle bbox; min & max are calculated like this for speed\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\n\n // z-order range for the current triangle bbox;\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\n\n var p = ear.prevZ,\n n = ear.nextZ;\n\n // look for points inside the triangle in both directions\n while (p && p.z >= minZ && n && n.z <= maxZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n // look for remaining points in decreasing z-order\n while (p && p.z >= minZ) {\n if (p !== ear.prev && p !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\n area(p.prev, p, p.next) >= 0) return false;\n p = p.prevZ;\n }\n\n // look for remaining points in increasing z-order\n while (n && n.z <= maxZ) {\n if (n !== ear.prev && n !== ear.next &&\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\n area(n.prev, n, n.next) >= 0) return false;\n n = n.nextZ;\n }\n\n return true;\n}\n\n// go through all polygon nodes and cure small local self-intersections\nfunction cureLocalIntersections(start, triangles, dim) {\n var p = start;\n do {\n var a = p.prev,\n b = p.next.next;\n\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\n\n triangles.push(a.i / dim);\n triangles.push(p.i / dim);\n triangles.push(b.i / dim);\n\n // remove two nodes involved\n removeNode(p);\n removeNode(p.next);\n\n p = start = b;\n }\n p = p.next;\n } while (p !== start);\n\n return filterPoints(p);\n}\n\n// try splitting polygon into two and triangulate them independently\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\n // look for a valid diagonal that divides the polygon into two\n var a = start;\n do {\n var b = a.next.next;\n while (b !== a.prev) {\n if (a.i !== b.i && isValidDiagonal(a, b)) {\n // split the polygon in two by the diagonal\n var c = splitPolygon(a, b);\n\n // filter colinear points around the cuts\n a = filterPoints(a, a.next);\n c = filterPoints(c, c.next);\n\n // run earcut on each half\n earcutLinked(a, triangles, dim, minX, minY, invSize);\n earcutLinked(c, triangles, dim, minX, minY, invSize);\n return;\n }\n b = b.next;\n }\n a = a.next;\n } while (a !== start);\n}\n\n// link every hole into the outer loop, producing a single-ring polygon without holes\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\n var queue = [],\n i, len, start, end, list;\n\n for (i = 0, len = holeIndices.length; i < len; i++) {\n start = holeIndices[i] * dim;\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n list = linkedList(data, start, end, dim, false);\n if (list === list.next) list.steiner = true;\n queue.push(getLeftmost(list));\n }\n\n queue.sort(compareX);\n\n // process holes from left to right\n for (i = 0; i < queue.length; i++) {\n outerNode = eliminateHole(queue[i], outerNode);\n outerNode = filterPoints(outerNode, outerNode.next);\n }\n\n return outerNode;\n}\n\nfunction compareX(a, b) {\n return a.x - b.x;\n}\n\n// find a bridge between vertices that connects hole with an outer ring and and link it\nfunction eliminateHole(hole, outerNode) {\n var bridge = findHoleBridge(hole, outerNode);\n if (!bridge) {\n return outerNode;\n }\n\n var bridgeReverse = splitPolygon(bridge, hole);\n\n // filter collinear points around the cuts\n var filteredBridge = filterPoints(bridge, bridge.next);\n filterPoints(bridgeReverse, bridgeReverse.next);\n\n // Check if input node was removed by the filtering\n return outerNode === bridge ? filteredBridge : outerNode;\n}\n\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\nfunction findHoleBridge(hole, outerNode) {\n var p = outerNode,\n hx = hole.x,\n hy = hole.y,\n qx = -Infinity,\n m;\n\n // find a segment intersected by a ray from the hole's leftmost point to the left;\n // segment's endpoint with lesser x will be potential connection point\n do {\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\n if (x <= hx && x > qx) {\n qx = x;\n if (x === hx) {\n if (hy === p.y) return p;\n if (hy === p.next.y) return p.next;\n }\n m = p.x < p.next.x ? p : p.next;\n }\n }\n p = p.next;\n } while (p !== outerNode);\n\n if (!m) return null;\n\n if (hx === qx) return m; // hole touches outer segment; pick leftmost endpoint\n\n // look for points inside the triangle of hole point, segment intersection and endpoint;\n // if there are no points found, we have a valid connection;\n // otherwise choose the point of the minimum angle with the ray as connection point\n\n var stop = m,\n mx = m.x,\n my = m.y,\n tanMin = Infinity,\n tan;\n\n p = m;\n\n do {\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\n\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\n\n if (locallyInside(p, hole) &&\n (tan < tanMin || (tan === tanMin && (p.x > m.x || (p.x === m.x && sectorContainsSector(m, p)))))) {\n m = p;\n tanMin = tan;\n }\n }\n\n p = p.next;\n } while (p !== stop);\n\n return m;\n}\n\n// whether sector in vertex m contains sector in vertex p in the same coordinates\nfunction sectorContainsSector(m, p) {\n return area(m.prev, m, p.prev) < 0 && area(p.next, m, m.next) < 0;\n}\n\n// interlink polygon nodes in z-order\nfunction indexCurve(start, minX, minY, invSize) {\n var p = start;\n do {\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\n p.prevZ = p.prev;\n p.nextZ = p.next;\n p = p.next;\n } while (p !== start);\n\n p.prevZ.nextZ = null;\n p.prevZ = null;\n\n sortLinked(p);\n}\n\n// Simon Tatham's linked list merge sort algorithm\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\nfunction sortLinked(list) {\n var i, p, q, e, tail, numMerges, pSize, qSize,\n inSize = 1;\n\n do {\n p = list;\n list = null;\n tail = null;\n numMerges = 0;\n\n while (p) {\n numMerges++;\n q = p;\n pSize = 0;\n for (i = 0; i < inSize; i++) {\n pSize++;\n q = q.nextZ;\n if (!q) break;\n }\n qSize = inSize;\n\n while (pSize > 0 || (qSize > 0 && q)) {\n\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\n e = p;\n p = p.nextZ;\n pSize--;\n } else {\n e = q;\n q = q.nextZ;\n qSize--;\n }\n\n if (tail) tail.nextZ = e;\n else list = e;\n\n e.prevZ = tail;\n tail = e;\n }\n\n p = q;\n }\n\n tail.nextZ = null;\n inSize *= 2;\n\n } while (numMerges > 1);\n\n return list;\n}\n\n// z-order of a point given coords and inverse of the longer side of data bbox\nfunction zOrder(x, y, minX, minY, invSize) {\n // coords are transformed into non-negative 15-bit integer range\n x = 32767 * (x - minX) * invSize;\n y = 32767 * (y - minY) * invSize;\n\n x = (x | (x << 8)) & 0x00FF00FF;\n x = (x | (x << 4)) & 0x0F0F0F0F;\n x = (x | (x << 2)) & 0x33333333;\n x = (x | (x << 1)) & 0x55555555;\n\n y = (y | (y << 8)) & 0x00FF00FF;\n y = (y | (y << 4)) & 0x0F0F0F0F;\n y = (y | (y << 2)) & 0x33333333;\n y = (y | (y << 1)) & 0x55555555;\n\n return x | (y << 1);\n}\n\n// find the leftmost node of a polygon ring\nfunction getLeftmost(start) {\n var p = start,\n leftmost = start;\n do {\n if (p.x < leftmost.x || (p.x === leftmost.x && p.y < leftmost.y)) leftmost = p;\n p = p.next;\n } while (p !== start);\n\n return leftmost;\n}\n\n// check if a point lies within a convex triangle\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\n}\n\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\nfunction isValidDiagonal(a, b) {\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) && // dones't intersect other edges\n (locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b) && // locally visible\n (area(a.prev, a, b.prev) || area(a, b.prev, b)) || // does not create opposite-facing sectors\n equals(a, b) && area(a.prev, a, a.next) > 0 && area(b.prev, b, b.next) > 0); // special zero-length case\n}\n\n// signed area of a triangle\nfunction area(p, q, r) {\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\n}\n\n// check if two points are equal\nfunction equals(p1, p2) {\n return p1.x === p2.x && p1.y === p2.y;\n}\n\n// check if two segments intersect\nfunction intersects(p1, q1, p2, q2) {\n var o1 = sign(area(p1, q1, p2));\n var o2 = sign(area(p1, q1, q2));\n var o3 = sign(area(p2, q2, p1));\n var o4 = sign(area(p2, q2, q1));\n\n if (o1 !== o2 && o3 !== o4) return true; // general case\n\n if (o1 === 0 && onSegment(p1, p2, q1)) return true; // p1, q1 and p2 are collinear and p2 lies on p1q1\n if (o2 === 0 && onSegment(p1, q2, q1)) return true; // p1, q1 and q2 are collinear and q2 lies on p1q1\n if (o3 === 0 && onSegment(p2, p1, q2)) return true; // p2, q2 and p1 are collinear and p1 lies on p2q2\n if (o4 === 0 && onSegment(p2, q1, q2)) return true; // p2, q2 and q1 are collinear and q1 lies on p2q2\n\n return false;\n}\n\n// for collinear points p, q, r, check if point q lies on segment pr\nfunction onSegment(p, q, r) {\n return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);\n}\n\nfunction sign(num) {\n return num > 0 ? 1 : num < 0 ? -1 : 0;\n}\n\n// check if a polygon diagonal intersects any polygon segments\nfunction intersectsPolygon(a, b) {\n var p = a;\n do {\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\n intersects(p, p.next, a, b)) return true;\n p = p.next;\n } while (p !== a);\n\n return false;\n}\n\n// check if a polygon diagonal is locally inside the polygon\nfunction locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}\n\n// check if the middle point of a polygon diagonal is inside the polygon\nfunction middleInside(a, b) {\n var p = a,\n inside = false,\n px = (a.x + b.x) / 2,\n py = (a.y + b.y) / 2;\n do {\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\n inside = !inside;\n p = p.next;\n } while (p !== a);\n\n return inside;\n}\n\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\nfunction splitPolygon(a, b) {\n var a2 = new Node(a.i, a.x, a.y),\n b2 = new Node(b.i, b.x, b.y),\n an = a.next,\n bp = b.prev;\n\n a.next = b;\n b.prev = a;\n\n a2.next = an;\n an.prev = a2;\n\n b2.next = a2;\n a2.prev = b2;\n\n bp.next = b2;\n b2.prev = bp;\n\n return b2;\n}\n\n// create a node and optionally link it with previous one (in a circular doubly linked list)\nfunction insertNode(i, x, y, last) {\n var p = new Node(i, x, y);\n\n if (!last) {\n p.prev = p;\n p.next = p;\n\n } else {\n p.next = last.next;\n p.prev = last;\n last.next.prev = p;\n last.next = p;\n }\n return p;\n}\n\nfunction removeNode(p) {\n p.next.prev = p.prev;\n p.prev.next = p.next;\n\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\n}\n\nfunction Node(i, x, y) {\n // vertex index in coordinates array\n this.i = i;\n\n // vertex coordinates\n this.x = x;\n this.y = y;\n\n // previous and next vertex nodes in a polygon ring\n this.prev = null;\n this.next = null;\n\n // z-order curve value\n this.z = null;\n\n // previous and next nodes in z-order\n this.prevZ = null;\n this.nextZ = null;\n\n // indicates whether this is a steiner point\n this.steiner = false;\n}\n\n// return a percentage difference between the polygon area and its triangulation area;\n// used to verify correctness of triangulation\nearcut.deviation = function (data, holeIndices, dim, triangles) {\n var hasHoles = holeIndices && holeIndices.length;\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\n\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\n if (hasHoles) {\n for (var i = 0, len = holeIndices.length; i < len; i++) {\n var start = holeIndices[i] * dim;\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\n }\n }\n\n var trianglesArea = 0;\n for (i = 0; i < triangles.length; i += 3) {\n var a = triangles[i] * dim;\n var b = triangles[i + 1] * dim;\n var c = triangles[i + 2] * dim;\n trianglesArea += Math.abs(\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\n }\n\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\n Math.abs((trianglesArea - polygonArea) / polygonArea);\n};\n\nfunction signedArea(data, start, end, dim) {\n var sum = 0;\n for (var i = start, j = end - dim; i < end; i += dim) {\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\n j = i;\n }\n return sum;\n}\n\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\nearcut.flatten = function (data) {\n var dim = data[0][0].length,\n result = {vertices: [], holes: [], dimensions: dim},\n holeIndex = 0;\n\n for (var i = 0; i < data.length; i++) {\n for (var j = 0; j < data[i].length; j++) {\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\n }\n if (i > 0) {\n holeIndex += data[i - 1].length;\n result.holes.push(holeIndex);\n }\n }\n return result;\n};\n","/* jshint forin: false, bitwise: false */\n/*\nCopyright 2015-2018 Esri\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nA copy of the license and additional notices are located with the\nsource distribution at:\n\nhttp://github.com/Esri/lerc/\n\nContributors: Johannes Schmid, (LERC v1)\n Chayanika Khatua, (LERC v1)\n Wenxue Ju (LERC v1, v2.x)\n*/\n\n/* Copyright 2015-2018 Esri. Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */\n\n/**\n * a module for decoding LERC blobs\n * @module Lerc\n */\n(function() {\n //the original LercDecode for Version 1\n var LercDecode = (function() {\n\n // WARNING: This decoder version can only read old version 1 Lerc blobs. Use with caution.\n\n // Note: currently, this module only has an implementation for decoding LERC data, not encoding. The name of\n // the class was chosen to be future proof.\n\n var CntZImage = {};\n\n CntZImage.defaultNoDataValue = -3.4027999387901484e+38; // smallest Float32 value\n\n /**\n * Decode a LERC byte stream and return an object containing the pixel data and some required and optional\n * information about it, such as the image's width and height.\n *\n * @param {ArrayBuffer} input The LERC input byte stream\n * @param {object} [options] Decoding options, containing any of the following properties:\n * @config {number} [inputOffset = 0]\n * Skip the first inputOffset bytes of the input byte stream. A valid LERC file is expected at that position.\n * @config {Uint8Array} [encodedMask = null]\n * If specified, the decoder will not read mask information from the input and use the specified encoded\n * mask data instead. Mask header/data must not be present in the LERC byte stream in this case.\n * @config {number} [noDataValue = LercCode.defaultNoDataValue]\n * Pixel value to use for masked pixels.\n * @config {ArrayBufferView|Array} [pixelType = Float32Array]\n * The desired type of the pixelData array in the return value. Note that it is the caller's responsibility to\n * provide an appropriate noDataValue if the default pixelType is overridden.\n * @config {boolean} [returnMask = false]\n * If true, the return value will contain a maskData property of type Uint8Array which has one element per\n * pixel, the value of which is 1 or 0 depending on whether that pixel's data is present or masked. If the\n * input LERC data does not contain a mask, maskData will not be returned.\n * @config {boolean} [returnEncodedMask = false]\n * If true, the return value will contain a encodedMaskData property, which can be passed into encode() as\n * encodedMask.\n * @config {boolean} [returnFileInfo = false]\n * If true, the return value will have a fileInfo property that contains metadata obtained from the\n * LERC headers and the decoding process.\n * @config {boolean} [computeUsedBitDepths = false]\n * If true, the fileInfo property in the return value will contain the set of all block bit depths\n * encountered during decoding. Will only have an effect if returnFileInfo option is true.\n * @returns {{width, height, pixelData, minValue, maxValue, noDataValue, maskData, encodedMaskData, fileInfo}}\n */\n CntZImage.decode = function(input, options) {\n options = options || {};\n\n var skipMask = options.encodedMaskData || (options.encodedMaskData === null);\n var parsedData = parse(input, options.inputOffset || 0, skipMask);\n\n var noDataValue = (options.noDataValue !== null) ? options.noDataValue : CntZImage.defaultNoDataValue;\n\n var uncompressedData = uncompressPixelValues(parsedData, options.pixelType || Float32Array,\n options.encodedMaskData, noDataValue, options.returnMask);\n\n var result = {\n width: parsedData.width,\n height: parsedData.height,\n pixelData: uncompressedData.resultPixels,\n minValue: uncompressedData.minValue,\n maxValue: parsedData.pixels.maxValue,\n noDataValue: noDataValue\n };\n\n if (uncompressedData.resultMask) {\n result.maskData = uncompressedData.resultMask;\n }\n\n if (options.returnEncodedMask && parsedData.mask) {\n result.encodedMaskData = parsedData.mask.bitset ? parsedData.mask.bitset : null;\n }\n\n if (options.returnFileInfo) {\n result.fileInfo = formatFileInfo(parsedData);\n if (options.computeUsedBitDepths) {\n result.fileInfo.bitDepths = computeUsedBitDepths(parsedData);\n }\n }\n\n return result;\n };\n\n var uncompressPixelValues = function(data, TypedArrayClass, maskBitset, noDataValue, storeDecodedMask) {\n var blockIdx = 0;\n var numX = data.pixels.numBlocksX;\n var numY = data.pixels.numBlocksY;\n var blockWidth = Math.floor(data.width / numX);\n var blockHeight = Math.floor(data.height / numY);\n var scale = 2 * data.maxZError;\n var minValue = Number.MAX_VALUE, currentValue;\n maskBitset = maskBitset || ((data.mask) ? data.mask.bitset : null);\n\n var resultPixels, resultMask;\n resultPixels = new TypedArrayClass(data.width * data.height);\n if (storeDecodedMask && maskBitset) {\n resultMask = new Uint8Array(data.width * data.height);\n }\n var blockDataBuffer = new Float32Array(blockWidth * blockHeight);\n\n var xx, yy;\n for (var y = 0; y <= numY; y++) {\n var thisBlockHeight = (y !== numY) ? blockHeight : (data.height % numY);\n if (thisBlockHeight === 0) {\n continue;\n }\n for (var x = 0; x <= numX; x++) {\n var thisBlockWidth = (x !== numX) ? blockWidth : (data.width % numX);\n if (thisBlockWidth === 0) {\n continue;\n }\n\n var outPtr = y * data.width * blockHeight + x * blockWidth;\n var outStride = data.width - thisBlockWidth;\n\n var block = data.pixels.blocks[blockIdx];\n\n var blockData, blockPtr, constValue;\n if (block.encoding < 2) {\n // block is either uncompressed or bit-stuffed (encodings 0 and 1)\n if (block.encoding === 0) {\n // block is uncompressed\n blockData = block.rawData;\n } else {\n // block is bit-stuffed\n unstuff(block.stuffedData, block.bitsPerPixel, block.numValidPixels, block.offset, scale, blockDataBuffer, data.pixels.maxValue);\n blockData = blockDataBuffer;\n }\n blockPtr = 0;\n }\n else if (block.encoding === 2) {\n // block is all 0\n constValue = 0;\n }\n else {\n // block has constant value (encoding === 3)\n constValue = block.offset;\n }\n\n var maskByte;\n if (maskBitset) {\n for (yy = 0; yy < thisBlockHeight; yy++) {\n if (outPtr & 7) {\n //\n maskByte = maskBitset[outPtr >> 3];\n maskByte <<= outPtr & 7;\n }\n for (xx = 0; xx < thisBlockWidth; xx++) {\n if (!(outPtr & 7)) {\n // read next byte from mask\n maskByte = maskBitset[outPtr >> 3];\n }\n if (maskByte & 128) {\n // pixel data present\n if (resultMask) {\n resultMask[outPtr] = 1;\n }\n currentValue = (block.encoding < 2) ? blockData[blockPtr++] : constValue;\n minValue = minValue > currentValue ? currentValue : minValue;\n resultPixels[outPtr++] = currentValue;\n } else {\n // pixel data not present\n if (resultMask) {\n resultMask[outPtr] = 0;\n }\n resultPixels[outPtr++] = noDataValue;\n }\n maskByte <<= 1;\n }\n outPtr += outStride;\n }\n } else {\n // mask not present, simply copy block over\n if (block.encoding < 2) {\n // duplicating this code block for performance reasons\n // blockData case:\n for (yy = 0; yy < thisBlockHeight; yy++) {\n for (xx = 0; xx < thisBlockWidth; xx++) {\n currentValue = blockData[blockPtr++];\n minValue = minValue > currentValue ? currentValue : minValue;\n resultPixels[outPtr++] = currentValue;\n }\n outPtr += outStride;\n }\n }\n else {\n // constValue case:\n minValue = minValue > constValue ? constValue : minValue;\n for (yy = 0; yy < thisBlockHeight; yy++) {\n for (xx = 0; xx < thisBlockWidth; xx++) {\n resultPixels[outPtr++] = constValue;\n }\n outPtr += outStride;\n }\n }\n }\n if ((block.encoding === 1) && (blockPtr !== block.numValidPixels)) {\n throw \"Block and Mask do not match\";\n }\n blockIdx++;\n }\n }\n\n return {\n resultPixels: resultPixels,\n resultMask: resultMask,\n minValue: minValue\n };\n };\n\n var formatFileInfo = function(data) {\n return {\n \"fileIdentifierString\": data.fileIdentifierString,\n \"fileVersion\": data.fileVersion,\n \"imageType\": data.imageType,\n \"height\": data.height,\n \"width\": data.width,\n \"maxZError\": data.maxZError,\n \"eofOffset\": data.eofOffset,\n \"mask\": data.mask ? {\n \"numBlocksX\": data.mask.numBlocksX,\n \"numBlocksY\": data.mask.numBlocksY,\n \"numBytes\": data.mask.numBytes,\n \"maxValue\": data.mask.maxValue\n } : null,\n \"pixels\": {\n \"numBlocksX\": data.pixels.numBlocksX,\n \"numBlocksY\": data.pixels.numBlocksY,\n \"numBytes\": data.pixels.numBytes,\n \"maxValue\": data.pixels.maxValue,\n \"noDataValue\": data.noDataValue\n }\n };\n };\n\n var computeUsedBitDepths = function(data) {\n var numBlocks = data.pixels.numBlocksX * data.pixels.numBlocksY;\n var bitDepths = {};\n for (var i = 0; i < numBlocks; i++) {\n var block = data.pixels.blocks[i];\n if (block.encoding === 0) {\n bitDepths.float32 = true;\n } else if (block.encoding === 1) {\n bitDepths[block.bitsPerPixel] = true;\n } else {\n bitDepths[0] = true;\n }\n }\n\n return Object.keys(bitDepths);\n };\n\n var parse = function(input, fp, skipMask) {\n var data = {};\n\n // File header\n var fileIdView = new Uint8Array(input, fp, 10);\n data.fileIdentifierString = String.fromCharCode.apply(null, fileIdView);\n if (data.fileIdentifierString.trim() !== \"CntZImage\") {\n throw \"Unexpected file identifier string: \" + data.fileIdentifierString;\n }\n fp += 10;\n var view = new DataView(input, fp, 24);\n data.fileVersion = view.getInt32(0, true);\n data.imageType = view.getInt32(4, true);\n data.height = view.getUint32(8, true);\n data.width = view.getUint32(12, true);\n data.maxZError = view.getFloat64(16, true);\n fp += 24;\n\n // Mask Header\n if (!skipMask) {\n view = new DataView(input, fp, 16);\n data.mask = {};\n data.mask.numBlocksY = view.getUint32(0, true);\n data.mask.numBlocksX = view.getUint32(4, true);\n data.mask.numBytes = view.getUint32(8, true);\n data.mask.maxValue = view.getFloat32(12, true);\n fp += 16;\n\n // Mask Data\n if (data.mask.numBytes > 0) {\n var bitset = new Uint8Array(Math.ceil(data.width * data.height / 8));\n view = new DataView(input, fp, data.mask.numBytes);\n var cnt = view.getInt16(0, true);\n var ip = 2, op = 0;\n do {\n if (cnt > 0) {\n while (cnt--) { bitset[op++] = view.getUint8(ip++); }\n } else {\n var val = view.getUint8(ip++);\n cnt = -cnt;\n while (cnt--) { bitset[op++] = val; }\n }\n cnt = view.getInt16(ip, true);\n ip += 2;\n } while (ip < data.mask.numBytes);\n if ((cnt !== -32768) || (op < bitset.length)) {\n throw \"Unexpected end of mask RLE encoding\";\n }\n data.mask.bitset = bitset;\n fp += data.mask.numBytes;\n }\n else if ((data.mask.numBytes | data.mask.numBlocksY | data.mask.maxValue) === 0) { // Special case, all nodata\n data.mask.bitset = new Uint8Array(Math.ceil(data.width * data.height / 8));\n }\n }\n\n // Pixel Header\n view = new DataView(input, fp, 16);\n data.pixels = {};\n data.pixels.numBlocksY = view.getUint32(0, true);\n data.pixels.numBlocksX = view.getUint32(4, true);\n data.pixels.numBytes = view.getUint32(8, true);\n data.pixels.maxValue = view.getFloat32(12, true);\n fp += 16;\n\n var numBlocksX = data.pixels.numBlocksX;\n var numBlocksY = data.pixels.numBlocksY;\n // the number of blocks specified in the header does not take into account the blocks at the end of\n // each row/column with a special width/height that make the image complete in case the width is not\n // evenly divisible by the number of blocks.\n var actualNumBlocksX = numBlocksX + ((data.width % numBlocksX) > 0 ? 1 : 0);\n var actualNumBlocksY = numBlocksY + ((data.height % numBlocksY) > 0 ? 1 : 0);\n data.pixels.blocks = new Array(actualNumBlocksX * actualNumBlocksY);\n var blockI = 0;\n for (var blockY = 0; blockY < actualNumBlocksY; blockY++) {\n for (var blockX = 0; blockX < actualNumBlocksX; blockX++) {\n\n // Block\n var size = 0;\n var bytesLeft = input.byteLength - fp;\n view = new DataView(input, fp, Math.min(10, bytesLeft));\n var block = {};\n data.pixels.blocks[blockI++] = block;\n var headerByte = view.getUint8(0); size++;\n block.encoding = headerByte & 63;\n if (block.encoding > 3) {\n throw \"Invalid block encoding (\" + block.encoding + \")\";\n }\n if (block.encoding === 2) {\n fp++;\n continue;\n }\n if ((headerByte !== 0) && (headerByte !== 2)) {\n headerByte >>= 6;\n block.offsetType = headerByte;\n if (headerByte === 2) {\n block.offset = view.getInt8(1); size++;\n } else if (headerByte === 1) {\n block.offset = view.getInt16(1, true); size += 2;\n } else if (headerByte === 0) {\n block.offset = view.getFloat32(1, true); size += 4;\n } else {\n throw \"Invalid block offset type\";\n }\n\n if (block.encoding === 1) {\n headerByte = view.getUint8(size); size++;\n block.bitsPerPixel = headerByte & 63;\n headerByte >>= 6;\n block.numValidPixelsType = headerByte;\n if (headerByte === 2) {\n block.numValidPixels = view.getUint8(size); size++;\n } else if (headerByte === 1) {\n block.numValidPixels = view.getUint16(size, true); size += 2;\n } else if (headerByte === 0) {\n block.numValidPixels = view.getUint32(size, true); size += 4;\n } else {\n throw \"Invalid valid pixel count type\";\n }\n }\n }\n fp += size;\n\n if (block.encoding === 3) {\n continue;\n }\n\n var arrayBuf, store8;\n if (block.encoding === 0) {\n var numPixels = (data.pixels.numBytes - 1) / 4;\n if (numPixels !== Math.floor(numPixels)) {\n throw \"uncompressed block has invalid length\";\n }\n arrayBuf = new ArrayBuffer(numPixels * 4);\n store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, fp, numPixels * 4));\n var rawData = new Float32Array(arrayBuf);\n block.rawData = rawData;\n fp += numPixels * 4;\n } else if (block.encoding === 1) {\n var dataBytes = Math.ceil(block.numValidPixels * block.bitsPerPixel / 8);\n var dataWords = Math.ceil(dataBytes / 4);\n arrayBuf = new ArrayBuffer(dataWords * 4);\n store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, fp, dataBytes));\n block.stuffedData = new Uint32Array(arrayBuf);\n fp += dataBytes;\n }\n }\n }\n data.eofOffset = fp;\n return data;\n };\n\n var unstuff = function(src, bitsPerPixel, numPixels, offset, scale, dest, maxValue) {\n var bitMask = (1 << bitsPerPixel) - 1;\n var i = 0, o;\n var bitsLeft = 0;\n var n, buffer;\n var nmax = Math.ceil((maxValue - offset) / scale);\n // get rid of trailing bytes that are already part of next block\n var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);\n src[src.length - 1] <<= 8 * numInvalidTailBytes;\n\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n }\n if (bitsLeft >= bitsPerPixel) {\n n = (buffer >>> (bitsLeft - bitsPerPixel)) & bitMask;\n bitsLeft -= bitsPerPixel;\n } else {\n var missingBits = (bitsPerPixel - bitsLeft);\n n = ((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n += (buffer >>> bitsLeft);\n }\n //pixel values may exceed max due to quantization\n dest[o] = n < nmax ? offset + n * scale : maxValue;\n }\n return dest;\n };\n\n return CntZImage;\n })();\n\n //version 2. Supports 2.1, 2.2, 2.3\n var Lerc2Decode = (function() {\n \"use strict\";\n // Note: currently, this module only has an implementation for decoding LERC data, not encoding. The name of\n // the class was chosen to be future proof, following LercDecode.\n\n /*****************************************\n * private static class bitsutffer used by Lerc2Decode\n *******************************************/\n var BitStuffer = {\n //methods ending with 2 are for the new byte order used by Lerc2.3 and above.\n //originalUnstuff is used to unpack Huffman code table. code is duplicated to unstuffx for performance reasons.\n unstuff: function(src, dest, bitsPerPixel, numPixels, lutArr, offset, scale, maxValue) {\n var bitMask = (1 << bitsPerPixel) - 1;\n var i = 0, o;\n var bitsLeft = 0;\n var n, buffer, missingBits, nmax;\n\n // get rid of trailing bytes that are already part of next block\n var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);\n src[src.length - 1] <<= 8 * numInvalidTailBytes;\n if (lutArr) {\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n }\n if (bitsLeft >= bitsPerPixel) {\n n = (buffer >>> (bitsLeft - bitsPerPixel)) & bitMask;\n bitsLeft -= bitsPerPixel;\n }\n else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = ((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n += (buffer >>> bitsLeft);\n }\n dest[o] = lutArr[n];//offset + lutArr[n] * scale;\n }\n }\n else {\n nmax = Math.ceil((maxValue - offset) / scale);\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n }\n if (bitsLeft >= bitsPerPixel) {\n n = (buffer >>> (bitsLeft - bitsPerPixel)) & bitMask;\n bitsLeft -= bitsPerPixel;\n }\n else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = ((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n += (buffer >>> bitsLeft);\n }\n //pixel values may exceed max due to quantization\n dest[o] = n < nmax ? offset + n * scale : maxValue;\n }\n }\n },\n\n unstuffLUT: function(src, bitsPerPixel, numPixels, offset, scale, maxValue) {\n var bitMask = (1 << bitsPerPixel) - 1;\n var i = 0, o = 0, missingBits = 0, bitsLeft = 0, n = 0;\n var buffer;\n var dest = [];\n\n // get rid of trailing bytes that are already part of next block\n var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);\n src[src.length - 1] <<= 8 * numInvalidTailBytes;\n\n var nmax = Math.ceil((maxValue - offset) / scale);\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n }\n if (bitsLeft >= bitsPerPixel) {\n n = (buffer >>> (bitsLeft - bitsPerPixel)) & bitMask;\n bitsLeft -= bitsPerPixel;\n } else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = ((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n += (buffer >>> bitsLeft);\n }\n //dest.push(n);\n dest[o] = n < nmax ? offset + n * scale : maxValue;\n }\n dest.unshift(offset);//1st one\n return dest;\n },\n\n unstuff2: function(src, dest, bitsPerPixel, numPixels, lutArr, offset, scale, maxValue) {\n var bitMask = (1 << bitsPerPixel) - 1;\n var i = 0, o;\n var bitsLeft = 0, bitPos = 0;\n var n, buffer, missingBits;\n if (lutArr) {\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n bitPos = 0;\n }\n if (bitsLeft >= bitsPerPixel) {\n n = ((buffer >>> bitPos) & bitMask);\n bitsLeft -= bitsPerPixel;\n bitPos += bitsPerPixel;\n } else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = (buffer >>> bitPos) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n |= (buffer & ((1 << missingBits) - 1)) << (bitsPerPixel - missingBits);\n bitPos = missingBits;\n }\n dest[o] = lutArr[n];\n }\n }\n else {\n var nmax = Math.ceil((maxValue - offset) / scale);\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n bitPos = 0;\n }\n if (bitsLeft >= bitsPerPixel) {\n //no unsigned left shift\n n = ((buffer >>> bitPos) & bitMask);\n bitsLeft -= bitsPerPixel;\n bitPos += bitsPerPixel;\n } else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = (buffer >>> bitPos) & bitMask;//((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n |= (buffer & ((1 << missingBits) - 1)) << (bitsPerPixel - missingBits);\n bitPos = missingBits;\n }\n //pixel values may exceed max due to quantization\n dest[o] = n < nmax ? offset + n * scale : maxValue;\n }\n }\n return dest;\n },\n\n unstuffLUT2: function(src, bitsPerPixel, numPixels, offset, scale, maxValue) {\n var bitMask = (1 << bitsPerPixel) - 1;\n var i = 0, o = 0, missingBits = 0, bitsLeft = 0, n = 0, bitPos = 0;\n var buffer;\n var dest = [];\n var nmax = Math.ceil((maxValue - offset) / scale);\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n bitPos = 0;\n }\n if (bitsLeft >= bitsPerPixel) {\n //no unsigned left shift\n n = ((buffer >>> bitPos) & bitMask);\n bitsLeft -= bitsPerPixel;\n bitPos += bitsPerPixel;\n } else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = (buffer >>> bitPos) & bitMask;//((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n |= (buffer & ((1 << missingBits) - 1)) << (bitsPerPixel - missingBits);\n bitPos = missingBits;\n }\n //dest.push(n);\n dest[o] = n < nmax ? offset + n * scale : maxValue;\n }\n dest.unshift(offset);\n return dest;\n },\n\n originalUnstuff: function(src, dest, bitsPerPixel, numPixels) {\n var bitMask = (1 << bitsPerPixel) - 1;\n var i = 0, o;\n var bitsLeft = 0;\n var n, buffer, missingBits;\n\n // get rid of trailing bytes that are already part of next block\n var numInvalidTailBytes = src.length * 4 - Math.ceil(bitsPerPixel * numPixels / 8);\n src[src.length - 1] <<= 8 * numInvalidTailBytes;\n\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n }\n if (bitsLeft >= bitsPerPixel) {\n n = (buffer >>> (bitsLeft - bitsPerPixel)) & bitMask;\n bitsLeft -= bitsPerPixel;\n }\n else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = ((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n += (buffer >>> bitsLeft);\n }\n dest[o] = n;\n }\n return dest;\n },\n\n originalUnstuff2: function(src, dest, bitsPerPixel, numPixels) {\n var bitMask = (1 << bitsPerPixel) - 1;\n var i = 0, o;\n var bitsLeft = 0, bitPos = 0;\n var n, buffer, missingBits;\n //micro-optimizations\n for (o = 0; o < numPixels; o++) {\n if (bitsLeft === 0) {\n buffer = src[i++];\n bitsLeft = 32;\n bitPos = 0;\n }\n if (bitsLeft >= bitsPerPixel) {\n //no unsigned left shift\n n = ((buffer >>> bitPos) & bitMask);\n bitsLeft -= bitsPerPixel;\n bitPos += bitsPerPixel;\n } else {\n missingBits = (bitsPerPixel - bitsLeft);\n n = (buffer >>> bitPos) & bitMask;//((buffer & bitMask) << missingBits) & bitMask;\n buffer = src[i++];\n bitsLeft = 32 - missingBits;\n n |= (buffer & ((1 << missingBits) - 1)) << (bitsPerPixel - missingBits);\n bitPos = missingBits;\n }\n dest[o] = n;\n }\n return dest;\n }\n };\n\n /*****************************************\n *private static class used by Lerc2Decode\n ******************************************/\n var Lerc2Helpers = {\n HUFFMAN_LUT_BITS_MAX: 12, //use 2^12 lut, treat it like constant\n computeChecksumFletcher32: function(input) {\n\n var sum1 = 0xffff, sum2 = 0xffff;\n var len = input.length;\n var words = Math.floor(len / 2);\n var i = 0;\n while (words) {\n var tlen = (words >= 359) ? 359 : words;\n words -= tlen;\n do {\n sum1 += (input[i++] << 8);\n sum2 += sum1 += input[i++];\n } while (--tlen);\n\n sum1 = (sum1 & 0xffff) + (sum1 >>> 16);\n sum2 = (sum2 & 0xffff) + (sum2 >>> 16);\n }\n\n // add the straggler byte if it exists\n if (len & 1) {\n sum2 += sum1 += (input[i] << 8);\n }\n // second reduction step to reduce sums to 16 bits\n sum1 = (sum1 & 0xffff) + (sum1 >>> 16);\n sum2 = (sum2 & 0xffff) + (sum2 >>> 16);\n\n return (sum2 << 16 | sum1) >>> 0;\n },\n\n readHeaderInfo: function(input, data) {\n var ptr = data.ptr;\n var fileIdView = new Uint8Array(input, ptr, 6);\n var headerInfo = {};\n headerInfo.fileIdentifierString = String.fromCharCode.apply(null, fileIdView);\n if (headerInfo.fileIdentifierString.lastIndexOf(\"Lerc2\", 0) !== 0) {\n throw \"Unexpected file identifier string (expect Lerc2 ): \" + headerInfo.fileIdentifierString;\n }\n ptr += 6;\n var view = new DataView(input, ptr, 8);\n var fileVersion = view.getInt32(0, true);\n headerInfo.fileVersion = fileVersion;\n ptr += 4;\n if (fileVersion >= 3) {\n headerInfo.checksum = view.getUint32(4, true); //nrows\n ptr += 4;\n }\n\n //keys start from here\n view = new DataView(input, ptr, 12);\n headerInfo.height = view.getUint32(0, true); //nrows\n headerInfo.width = view.getUint32(4, true); //ncols\n ptr += 8;\n if (fileVersion >= 4) {\n headerInfo.numDims = view.getUint32(8, true);\n ptr += 4;\n }\n else {\n headerInfo.numDims = 1;\n }\n\n view = new DataView(input, ptr, 40);\n headerInfo.numValidPixel = view.getUint32(0, true);\n headerInfo.microBlockSize = view.getInt32(4, true);\n headerInfo.blobSize = view.getInt32(8, true);\n headerInfo.imageType = view.getInt32(12, true);\n\n headerInfo.maxZError = view.getFloat64(16, true);\n headerInfo.zMin = view.getFloat64(24, true);\n headerInfo.zMax = view.getFloat64(32, true);\n ptr += 40;\n data.headerInfo = headerInfo;\n data.ptr = ptr;\n\n var checksum, keyLength;\n if (fileVersion >= 3) {\n keyLength = fileVersion >= 4 ? 52 : 48;\n checksum = this.computeChecksumFletcher32(new Uint8Array(input, ptr - keyLength, headerInfo.blobSize - 14));\n if (checksum !== headerInfo.checksum) {\n throw \"Checksum failed.\";\n }\n }\n return true;\n },\n\n checkMinMaxRanges: function(input, data) {\n var headerInfo = data.headerInfo;\n var OutPixelTypeArray = this.getDataTypeArray(headerInfo.imageType);\n var rangeBytes = headerInfo.numDims * this.getDataTypeSize(headerInfo.imageType);\n var minValues = this.readSubArray(input, data.ptr, OutPixelTypeArray, rangeBytes);\n var maxValues = this.readSubArray(input, data.ptr + rangeBytes, OutPixelTypeArray, rangeBytes);\n data.ptr += (2 * rangeBytes);\n var i, equal = true;\n for (i = 0; i < headerInfo.numDims; i++) {\n if (minValues[i] !== maxValues[i]) {\n equal = false;\n break;\n }\n }\n headerInfo.minValues = minValues;\n headerInfo.maxValues = maxValues;\n return equal;\n },\n\n readSubArray: function(input, ptr, OutPixelTypeArray, numBytes) {\n var rawData;\n if (OutPixelTypeArray === Uint8Array) {\n rawData = new Uint8Array(input, ptr, numBytes);\n }\n else {\n var arrayBuf = new ArrayBuffer(numBytes);\n var store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, ptr, numBytes));\n rawData = new OutPixelTypeArray(arrayBuf);\n }\n return rawData;\n },\n\n readMask: function(input, data) {\n var ptr = data.ptr;\n var headerInfo = data.headerInfo;\n var numPixels = headerInfo.width * headerInfo.height;\n var numValidPixel = headerInfo.numValidPixel;\n\n var view = new DataView(input, ptr, 4);\n var mask = {};\n mask.numBytes = view.getUint32(0, true);\n ptr += 4;\n\n // Mask Data\n if ((0 === numValidPixel || numPixels === numValidPixel) && 0 !== mask.numBytes) {\n throw (\"invalid mask\");\n }\n var bitset, resultMask;\n if (numValidPixel === 0) {\n bitset = new Uint8Array(Math.ceil(numPixels / 8));\n mask.bitset = bitset;\n resultMask = new Uint8Array(numPixels);\n data.pixels.resultMask = resultMask;\n ptr += mask.numBytes;\n }// ????? else if (data.mask.numBytes > 0 && data.mask.numBytes< data.numValidPixel) {\n else if (mask.numBytes > 0) {\n bitset = new Uint8Array(Math.ceil(numPixels / 8));\n view = new DataView(input, ptr, mask.numBytes);\n var cnt = view.getInt16(0, true);\n var ip = 2, op = 0, val = 0;\n do {\n if (cnt > 0) {\n while (cnt--) { bitset[op++] = view.getUint8(ip++); }\n } else {\n val = view.getUint8(ip++);\n cnt = -cnt;\n while (cnt--) { bitset[op++] = val; }\n }\n cnt = view.getInt16(ip, true);\n ip += 2;\n } while (ip < mask.numBytes);\n if ((cnt !== -32768) || (op < bitset.length)) {\n throw \"Unexpected end of mask RLE encoding\";\n }\n\n resultMask = new Uint8Array(numPixels);\n var mb = 0, k = 0;\n\n for (k = 0; k < numPixels; k++) {\n if (k & 7) {\n mb = bitset[k >> 3];\n mb <<= k & 7;\n }\n else {\n mb = bitset[k >> 3];\n }\n if (mb & 128) {\n resultMask[k] = 1;\n }\n }\n data.pixels.resultMask = resultMask;\n\n mask.bitset = bitset;\n ptr += mask.numBytes;\n }\n data.ptr = ptr;\n data.mask = mask;\n return true;\n },\n\n readDataOneSweep: function(input, data, OutPixelTypeArray) {\n var ptr = data.ptr;\n var headerInfo = data.headerInfo;\n var numDims = headerInfo.numDims;\n var numPixels = headerInfo.width * headerInfo.height;\n var imageType = headerInfo.imageType;\n var numBytes = headerInfo.numValidPixel * Lerc2Helpers.getDataTypeSize(imageType) * numDims;\n //data.pixels.numBytes = numBytes;\n var rawData;\n var mask = data.pixels.resultMask;\n if (OutPixelTypeArray === Uint8Array) {\n rawData = new Uint8Array(input, ptr, numBytes);\n }\n else {\n var arrayBuf = new ArrayBuffer(numBytes);\n var store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, ptr, numBytes));\n rawData = new OutPixelTypeArray(arrayBuf);\n }\n if (rawData.length === numPixels * numDims) {\n data.pixels.resultPixels = rawData;\n }\n else //mask\n {\n data.pixels.resultPixels = new OutPixelTypeArray(numPixels * numDims);\n var z = 0, k = 0, i = 0, nStart = 0;\n if (numDims > 1) {\n for (i=0; i < numDims; i++) {\n nStart = i * numPixels;\n for (k = 0; k < numPixels; k++) {\n if (mask[k]) {\n data.pixels.resultPixels[nStart + k] = rawData[z++];\n }\n }\n }\n }\n else {\n for (k = 0; k < numPixels; k++) {\n if (mask[k]) {\n data.pixels.resultPixels[k] = rawData[z++];\n }\n }\n }\n }\n ptr += numBytes;\n data.ptr = ptr; //return data;\n return true;\n },\n\n readHuffmanTree: function(input, data) {\n var BITS_MAX = this.HUFFMAN_LUT_BITS_MAX; //8 is slow for the large test image\n //var size_max = 1 << BITS_MAX;\n /* ************************\n * reading code table\n *************************/\n var view = new DataView(input, data.ptr, 16);\n data.ptr += 16;\n var version = view.getInt32(0, true);\n if (version < 2) {\n throw \"unsupported Huffman version\";\n }\n var size = view.getInt32(4, true);\n var i0 = view.getInt32(8, true);\n var i1 = view.getInt32(12, true);\n if (i0 >= i1) {\n return false;\n }\n var blockDataBuffer = new Uint32Array(i1 - i0);\n Lerc2Helpers.decodeBits(input, data, blockDataBuffer);\n var codeTable = []; //size\n var i, j, k, len;\n\n for (i = i0; i < i1; i++) {\n j = i - (i < size ? 0 : size);//wrap around\n codeTable[j] = { first: blockDataBuffer[i - i0], second: null };\n }\n\n var dataBytes = input.byteLength - data.ptr;\n var dataWords = Math.ceil(dataBytes / 4);\n var arrayBuf = new ArrayBuffer(dataWords * 4);\n var store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, data.ptr, dataBytes));\n var stuffedData = new Uint32Array(arrayBuf); //must start from x*4\n var bitPos = 0, word, srcPtr = 0;\n word = stuffedData[0];\n for (i = i0; i < i1; i++) {\n j = i - (i < size ? 0 : size);//wrap around\n len = codeTable[j].first;\n if (len > 0) {\n codeTable[j].second = (word << bitPos) >>> (32 - len);\n\n if (32 - bitPos >= len) {\n bitPos += len;\n if (bitPos === 32) {\n bitPos = 0;\n srcPtr++;\n word = stuffedData[srcPtr];\n }\n }\n else {\n bitPos += len - 32;\n srcPtr++;\n word = stuffedData[srcPtr];\n codeTable[j].second |= word >>> (32 - bitPos);\n }\n }\n }\n\n //finished reading code table\n\n /* ************************\n * building lut\n *************************/\n var numBitsLUT = 0, numBitsLUTQick = 0;\n var tree = new TreeNode();\n for (i = 0; i < codeTable.length; i++) {\n if (codeTable[i] !== undefined) {\n numBitsLUT = Math.max(numBitsLUT, codeTable[i].first);\n }\n }\n if (numBitsLUT >= BITS_MAX) {\n numBitsLUTQick = BITS_MAX;\n }\n else {\n numBitsLUTQick = numBitsLUT;\n }\n if (numBitsLUT >= 30) {\n console.log(\"WARning, large NUM LUT BITS IS \" + numBitsLUT);\n }\n var decodeLut = [], entry, code, numEntries, jj, currentBit, node;\n for (i = i0; i < i1; i++) {\n j = i - (i < size ? 0 : size);//wrap around\n len = codeTable[j].first;\n if (len > 0) {\n entry = [len, j];\n if (len <= numBitsLUTQick) {\n code = codeTable[j].second << (numBitsLUTQick - len);\n numEntries = 1 << (numBitsLUTQick - len);\n for (k = 0; k < numEntries; k++) {\n decodeLut[code | k] = entry;\n }\n }\n else {\n //build tree\n code = codeTable[j].second;\n node = tree;\n for (jj = len - 1; jj >= 0; jj--) {\n currentBit = code >>> jj & 1; //no left shift as length could be 30,31\n if (currentBit) {\n if (!node.right) {\n node.right = new TreeNode();\n }\n node = node.right;\n }\n else {\n if (!node.left) {\n node.left = new TreeNode();\n }\n node = node.left;\n }\n if (jj === 0 && !node.val) {\n node.val = entry[1];\n }\n }\n }\n }\n }\n return {\n decodeLut: decodeLut,\n numBitsLUTQick: numBitsLUTQick,\n numBitsLUT: numBitsLUT,\n tree: tree,\n stuffedData: stuffedData,\n srcPtr: srcPtr,\n bitPos: bitPos\n };\n },\n\n readHuffman: function(input, data, OutPixelTypeArray) {\n var headerInfo = data.headerInfo;\n var numDims = headerInfo.numDims;\n var height = data.headerInfo.height;\n var width = data.headerInfo.width;\n var numPixels = width * height;\n //var size_max = 1 << BITS_MAX;\n /* ************************\n * reading huffman structure info\n *************************/\n var huffmanInfo = this.readHuffmanTree(input, data);\n var decodeLut = huffmanInfo.decodeLut;\n var tree = huffmanInfo.tree;\n //stuffedData includes huffman headers\n var stuffedData = huffmanInfo.stuffedData;\n var srcPtr = huffmanInfo.srcPtr;\n var bitPos = huffmanInfo.bitPos;\n var numBitsLUTQick = huffmanInfo.numBitsLUTQick;\n var numBitsLUT = huffmanInfo.numBitsLUT;\n var offset = data.headerInfo.imageType === 0 ? 128 : 0;\n /*************************\n * decode\n ***************************/\n var node, val, delta, mask = data.pixels.resultMask, valTmp, valTmpQuick, currentBit;\n var i, j, k, ii;\n var prevVal = 0;\n if (bitPos > 0) {\n srcPtr++;\n bitPos = 0;\n }\n var word = stuffedData[srcPtr];\n var deltaEncode = data.encodeMode === 1;\n var resultPixelsAllDim = new OutPixelTypeArray(numPixels * numDims);\n var resultPixels = resultPixelsAllDim;\n var iDim;\n for (iDim = 0; iDim < headerInfo.numDims; iDim++) {\n if (numDims > 1) {\n //get the mem block of current dimension\n resultPixels = new OutPixelTypeArray(resultPixelsAllDim.buffer, numPixels * iDim, numPixels);\n prevVal = 0;\n }\n if (data.headerInfo.numValidPixel === width * height) { //all valid\n for (k = 0, i = 0; i < height; i++) {\n for (j = 0; j < width; j++, k++) {\n val = 0;\n valTmp = (word << bitPos) >>> (32 - numBitsLUTQick);\n valTmpQuick = valTmp;// >>> deltaBits;\n if (32 - bitPos < numBitsLUTQick) {\n valTmp |= ((stuffedData[srcPtr + 1]) >>> (64 - bitPos - numBitsLUTQick));\n valTmpQuick = valTmp;// >>> deltaBits;\n }\n if (decodeLut[valTmpQuick]) // if there, move the correct number of bits and done\n {\n val = decodeLut[valTmpQuick][1];\n bitPos += decodeLut[valTmpQuick][0];\n }\n else {\n valTmp = (word << bitPos) >>> (32 - numBitsLUT);\n valTmpQuick = valTmp;// >>> deltaBits;\n if (32 - bitPos < numBitsLUT) {\n valTmp |= ((stuffedData[srcPtr + 1]) >>> (64 - bitPos - numBitsLUT));\n valTmpQuick = valTmp;// >>> deltaBits;\n }\n node = tree;\n for (ii = 0; ii < numBitsLUT; ii++) {\n currentBit = valTmp >>> (numBitsLUT - ii - 1) & 1;\n node = currentBit ? node.right : node.left;\n if (!(node.left || node.right)) {\n val = node.val;\n bitPos = bitPos + ii + 1;\n break;\n }\n }\n }\n\n if (bitPos >= 32) {\n bitPos -= 32;\n srcPtr++;\n word = stuffedData[srcPtr];\n }\n\n delta = val - offset;\n if (deltaEncode) {\n if (j > 0) {\n delta += prevVal; // use overflow\n }\n else if (i > 0) {\n delta += resultPixels[k - width];\n }\n else {\n delta += prevVal;\n }\n delta &= 0xFF; //overflow\n resultPixels[k] = delta;//overflow\n prevVal = delta;\n }\n else {\n resultPixels[k] = delta;\n }\n }\n }\n }\n else { //not all valid, use mask\n for (k = 0, i = 0; i < height; i++) {\n for (j = 0; j < width; j++, k++) {\n if (mask[k]) {\n val = 0;\n valTmp = (word << bitPos) >>> (32 - numBitsLUTQick);\n valTmpQuick = valTmp;// >>> deltaBits;\n if (32 - bitPos < numBitsLUTQick) {\n valTmp |= ((stuffedData[srcPtr + 1]) >>> (64 - bitPos - numBitsLUTQick));\n valTmpQuick = valTmp;// >>> deltaBits;\n }\n if (decodeLut[valTmpQuick]) // if there, move the correct number of bits and done\n {\n val = decodeLut[valTmpQuick][1];\n bitPos += decodeLut[valTmpQuick][0];\n }\n else {\n valTmp = (word << bitPos) >>> (32 - numBitsLUT);\n valTmpQuick = valTmp;// >>> deltaBits;\n if (32 - bitPos < numBitsLUT) {\n valTmp |= ((stuffedData[srcPtr + 1]) >>> (64 - bitPos - numBitsLUT));\n valTmpQuick = valTmp;// >>> deltaBits;\n }\n node = tree;\n for (ii = 0; ii < numBitsLUT; ii++) {\n currentBit = valTmp >>> (numBitsLUT - ii - 1) & 1;\n node = currentBit ? node.right : node.left;\n if (!(node.left || node.right)) {\n val = node.val;\n bitPos = bitPos + ii + 1;\n break;\n }\n }\n }\n\n if (bitPos >= 32) {\n bitPos -= 32;\n srcPtr++;\n word = stuffedData[srcPtr];\n }\n\n delta = val - offset;\n if (deltaEncode) {\n if (j > 0 && mask[k - 1]) {\n delta += prevVal; // use overflow\n }\n else if (i > 0 && mask[k - width]) {\n delta += resultPixels[k - width];\n }\n else {\n delta += prevVal;\n }\n\n delta &= 0xFF; //overflow\n resultPixels[k] = delta;//overflow\n prevVal = delta;\n }\n else {\n resultPixels[k] = delta;\n }\n }\n }\n }\n }\n data.ptr = data.ptr + (srcPtr + 1) * 4 + (bitPos > 0 ? 4 : 0);\n }\n data.pixels.resultPixels = resultPixelsAllDim;\n },\n\n decodeBits: function(input, data, blockDataBuffer, offset, iDim) {\n {\n //bitstuff encoding is 3\n var headerInfo = data.headerInfo;\n var fileVersion = headerInfo.fileVersion;\n //var block = {};\n var blockPtr = 0;\n var view = new DataView(input, data.ptr, 5);//to do\n var headerByte = view.getUint8(0);\n blockPtr++;\n var bits67 = headerByte >> 6;\n var n = (bits67 === 0) ? 4 : 3 - bits67;\n var doLut = (headerByte & 32) > 0 ? true : false;//5th bit\n var numBits = headerByte & 31;\n var numElements = 0;\n if (n === 1) {\n numElements = view.getUint8(blockPtr); blockPtr++;\n } else if (n === 2) {\n numElements = view.getUint16(blockPtr, true); blockPtr += 2;\n } else if (n === 4) {\n numElements = view.getUint32(blockPtr, true); blockPtr += 4;\n } else {\n throw \"Invalid valid pixel count type\";\n }\n //fix: huffman codes are bit stuffed, but not bound by data's max value, so need to use originalUnstuff\n //offset = offset || 0;\n var scale = 2 * headerInfo.maxZError;\n var stuffedData, arrayBuf, store8, dataBytes, dataWords;\n var lutArr, lutData, lutBytes, lutBitsPerElement, bitsPerPixel;\n var zMax = headerInfo.numDims > 1 ? headerInfo.maxValues[iDim] : headerInfo.zMax;\n if (doLut) {\n data.counter.lut++;\n lutBytes = view.getUint8(blockPtr);\n lutBitsPerElement = numBits;\n blockPtr++;\n dataBytes = Math.ceil((lutBytes - 1) * numBits / 8);\n dataWords = Math.ceil(dataBytes / 4);\n arrayBuf = new ArrayBuffer(dataWords * 4);\n store8 = new Uint8Array(arrayBuf);\n\n data.ptr += blockPtr;\n store8.set(new Uint8Array(input, data.ptr, dataBytes));\n\n lutData = new Uint32Array(arrayBuf);\n data.ptr += dataBytes;\n\n bitsPerPixel = 0;\n while ((lutBytes - 1) >>> bitsPerPixel) {\n bitsPerPixel++;\n }\n dataBytes = Math.ceil(numElements * bitsPerPixel / 8);\n dataWords = Math.ceil(dataBytes / 4);\n arrayBuf = new ArrayBuffer(dataWords * 4);\n store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, data.ptr, dataBytes));\n stuffedData = new Uint32Array(arrayBuf);\n data.ptr += dataBytes;\n if (fileVersion >= 3) {\n lutArr = BitStuffer.unstuffLUT2(lutData, numBits, lutBytes - 1, offset, scale, zMax);\n }\n else {\n lutArr = BitStuffer.unstuffLUT(lutData, numBits, lutBytes - 1, offset, scale, zMax);\n }\n //lutArr.unshift(0);\n if (fileVersion >= 3) {\n //BitStuffer.unstuff2(block, blockDataBuffer, headerInfo.zMax);\n BitStuffer.unstuff2(stuffedData, blockDataBuffer, bitsPerPixel, numElements, lutArr);\n }\n else {\n BitStuffer.unstuff(stuffedData, blockDataBuffer, bitsPerPixel, numElements, lutArr);\n }\n }\n else {\n //console.debug(\"bitstuffer\");\n data.counter.bitstuffer++;\n bitsPerPixel = numBits;\n data.ptr += blockPtr;\n if (bitsPerPixel > 0) {\n dataBytes = Math.ceil(numElements * bitsPerPixel / 8);\n dataWords = Math.ceil(dataBytes / 4);\n arrayBuf = new ArrayBuffer(dataWords * 4);\n store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, data.ptr, dataBytes));\n stuffedData = new Uint32Array(arrayBuf);\n data.ptr += dataBytes;\n if (fileVersion >= 3) {\n if (offset == null) {\n BitStuffer.originalUnstuff2(stuffedData, blockDataBuffer, bitsPerPixel, numElements);\n }\n else {\n BitStuffer.unstuff2(stuffedData, blockDataBuffer, bitsPerPixel, numElements, false, offset, scale, zMax);\n }\n }\n else {\n if (offset == null) {\n BitStuffer.originalUnstuff(stuffedData, blockDataBuffer, bitsPerPixel, numElements);\n }\n else {\n BitStuffer.unstuff(stuffedData, blockDataBuffer, bitsPerPixel, numElements, false, offset, scale, zMax);\n }\n }\n }\n }\n }\n\n },\n\n readTiles: function(input, data, OutPixelTypeArray) {\n var headerInfo = data.headerInfo;\n var width = headerInfo.width;\n var height = headerInfo.height;\n var microBlockSize = headerInfo.microBlockSize;\n var imageType = headerInfo.imageType;\n var dataTypeSize = Lerc2Helpers.getDataTypeSize(imageType);\n var numBlocksX = Math.ceil(width / microBlockSize);\n var numBlocksY = Math.ceil(height / microBlockSize);\n data.pixels.numBlocksY = numBlocksY;\n data.pixels.numBlocksX = numBlocksX;\n data.pixels.ptr = 0;\n var row = 0, col = 0, blockY = 0, blockX = 0, thisBlockHeight = 0, thisBlockWidth = 0, bytesLeft = 0, headerByte = 0, bits67 = 0, testCode = 0, outPtr = 0, outStride = 0, numBytes = 0, bytesleft = 0, z = 0, blockPtr = 0;\n var view, block, arrayBuf, store8, rawData;\n var blockEncoding;\n var blockDataBuffer = new OutPixelTypeArray(microBlockSize * microBlockSize);\n var lastBlockHeight = (height % microBlockSize) || microBlockSize;\n var lastBlockWidth = (width % microBlockSize) || microBlockSize;\n var offsetType, offset;\n var numDims = headerInfo.numDims, iDim;\n var mask = data.pixels.resultMask;\n var resultPixels = data.pixels.resultPixels;\n for (blockY = 0; blockY < numBlocksY; blockY++) {\n thisBlockHeight = (blockY !== numBlocksY - 1) ? microBlockSize : lastBlockHeight;\n for (blockX = 0; blockX < numBlocksX; blockX++) {\n //console.debug(\"y\" + blockY + \" x\" + blockX);\n thisBlockWidth = (blockX !== numBlocksX - 1) ? microBlockSize : lastBlockWidth;\n\n outPtr = blockY * width * microBlockSize + blockX * microBlockSize;\n outStride = width - thisBlockWidth;\n\n\n for (iDim = 0; iDim < numDims; iDim++) {\n if (numDims > 1) {\n resultPixels = new OutPixelTypeArray(data.pixels.resultPixels.buffer, width * height * iDim * dataTypeSize, width * height);\n }\n bytesLeft = input.byteLength - data.ptr;\n view = new DataView(input, data.ptr, Math.min(10, bytesLeft));\n block = {};\n blockPtr = 0;\n headerByte = view.getUint8(0);\n blockPtr++;\n bits67 = (headerByte >> 6) & 0xFF;\n testCode = (headerByte >> 2) & 15; // use bits 2345 for integrity check\n if (testCode !== (((blockX * microBlockSize) >> 3) & 15)) {\n throw \"integrity issue\";\n //return false;\n }\n\n blockEncoding = headerByte & 3;\n if (blockEncoding > 3) {\n data.ptr += blockPtr;\n throw \"Invalid block encoding (\" + blockEncoding + \")\";\n }\n else if (blockEncoding === 2) { //constant 0\n data.counter.constant++;\n data.ptr += blockPtr;\n continue;\n }\n else if (blockEncoding === 0) { //uncompressed\n data.counter.uncompressed++;\n data.ptr += blockPtr;\n numBytes = thisBlockHeight * thisBlockWidth * dataTypeSize;\n bytesleft = input.byteLength - data.ptr;\n numBytes = numBytes < bytesleft ? numBytes : bytesleft;\n //bit alignment\n arrayBuf = new ArrayBuffer((numBytes % dataTypeSize) === 0 ? numBytes : (numBytes + dataTypeSize - numBytes % dataTypeSize));\n store8 = new Uint8Array(arrayBuf);\n store8.set(new Uint8Array(input, data.ptr, numBytes));\n rawData = new OutPixelTypeArray(arrayBuf);\n z = 0;\n if (mask) {\n for (row = 0; row < thisBlockHeight; row++) {\n for (col = 0; col < thisBlockWidth; col++) {\n if (mask[outPtr]) {\n resultPixels[outPtr] = rawData[z++];\n }\n outPtr++;\n }\n outPtr += outStride;\n }\n }\n else {//all valid\n for (row = 0; row < thisBlockHeight; row++) {\n for (col = 0; col < thisBlockWidth; col++) {\n resultPixels[outPtr++] = rawData[z++];\n }\n outPtr += outStride;\n }\n }\n data.ptr += z * dataTypeSize;\n }\n else { //1 or 3\n offsetType = Lerc2Helpers.getDataTypeUsed(imageType, bits67);\n offset = Lerc2Helpers.getOnePixel(block, blockPtr, offsetType, view);\n blockPtr += Lerc2Helpers.getDataTypeSize(offsetType);\n if (blockEncoding === 3) //constant offset value\n {\n data.ptr += blockPtr;\n data.counter.constantoffset++;\n //you can delete the following resultMask case in favor of performance because val is constant and users use nodata mask, otherwise nodatavalue post processing handles it too.\n //while the above statement is true, we're not doing it as we want to keep invalid pixel value at 0 rather than arbitrary values\n if (mask) {\n for (row = 0; row < thisBlockHeight; row++) {\n for (col = 0; col < thisBlockWidth; col++) {\n if (mask[outPtr]) {\n resultPixels[outPtr] = offset;\n }\n outPtr++;\n }\n outPtr += outStride;\n }\n }\n else {\n for (row = 0; row < thisBlockHeight; row++) {\n for (col = 0; col < thisBlockWidth; col++) {\n resultPixels[outPtr++] = offset;\n }\n outPtr += outStride;\n }\n }\n }\n else { //bitstuff encoding is 3\n data.ptr += blockPtr;\n //heavy lifting\n Lerc2Helpers.decodeBits(input, data, blockDataBuffer, offset, iDim);\n blockPtr = 0;\n if (mask) {\n for (row = 0; row < thisBlockHeight; row++) {\n for (col = 0; col < thisBlockWidth; col++) {\n if (mask[outPtr]) {\n resultPixels[outPtr] = blockDataBuffer[blockPtr++];\n }\n outPtr++;\n }\n outPtr += outStride;\n }\n }\n else {\n for (row = 0; row < thisBlockHeight; row++) {\n for (col = 0; col < thisBlockWidth; col++) {\n resultPixels[outPtr++] = blockDataBuffer[blockPtr++];\n }\n outPtr += outStride;\n }\n }\n }\n }\n }\n }\n }\n },\n\n /*****************\n * private methods (helper methods)\n *****************/\n\n formatFileInfo: function(data) {\n return {\n \"fileIdentifierString\": data.headerInfo.fileIdentifierString,\n \"fileVersion\": data.headerInfo.fileVersion,\n \"imageType\": data.headerInfo.imageType,\n \"height\": data.headerInfo.height,\n \"width\": data.headerInfo.width,\n \"numValidPixel\": data.headerInfo.numValidPixel,\n \"microBlockSize\": data.headerInfo.microBlockSize,\n \"blobSize\": data.headerInfo.blobSize,\n \"maxZError\": data.headerInfo.maxZError,\n \"pixelType\": Lerc2Helpers.getPixelType(data.headerInfo.imageType),\n \"eofOffset\": data.eofOffset,\n \"mask\": data.mask ? {\n \"numBytes\": data.mask.numBytes\n } : null,\n \"pixels\": {\n \"numBlocksX\": data.pixels.numBlocksX,\n \"numBlocksY\": data.pixels.numBlocksY,\n //\"numBytes\": data.pixels.numBytes,\n \"maxValue\": data.headerInfo.zMax,\n \"minValue\": data.headerInfo.zMin,\n \"noDataValue\": data.noDataValue\n }\n };\n },\n\n constructConstantSurface: function(data) {\n var val = data.headerInfo.zMax;\n var numDims = data.headerInfo.numDims;\n var numPixels = data.headerInfo.height * data.headerInfo.width;\n var numPixelAllDims = numPixels * numDims;\n var i=0, k = 0, nStart=0;\n var mask = data.pixels.resultMask;\n if (mask) {\n if (numDims > 1) {\n for (i=0; i < numDims; i++) {\n nStart = i * numPixels;\n for (k = 0; k < numPixels; k++) {\n if (mask[k]) {\n data.pixels.resultPixels[nStart + k] = val;\n }\n }\n }\n }\n else {\n for (k = 0; k < numPixels; k++) {\n if (mask[k]) {\n data.pixels.resultPixels[k] = val;\n }\n }\n }\n }\n else {\n if (data.pixels.resultPixels.fill) {\n data.pixels.resultPixels.fill(val);\n }\n else {\n for (k = 0; k < numPixelAllDims; k++) {\n data.pixels.resultPixels[k] = val;\n }\n }\n }\n return;\n },\n\n getDataTypeArray: function(t) {\n var tp;\n switch (t) {\n case 0: //char\n tp = Int8Array;\n break;\n case 1: //byte\n tp = Uint8Array;\n break;\n case 2: //short\n tp = Int16Array;\n break;\n case 3: //ushort\n tp = Uint16Array;\n break;\n case 4:\n tp = Int32Array;\n break;\n case 5:\n tp = Uint32Array;\n break;\n case 6:\n tp = Float32Array;\n break;\n case 7:\n tp = Float64Array;\n break;\n default:\n tp = Float32Array;\n }\n return tp;\n },\n\n getPixelType: function(t) {\n var tp;\n switch (t) {\n case 0: //char\n tp = \"S8\";\n break;\n case 1: //byte\n tp = \"U8\";\n break;\n case 2: //short\n tp = \"S16\";\n break;\n case 3: //ushort\n tp = \"U16\";\n break;\n case 4:\n tp = \"S32\";\n break;\n case 5:\n tp = \"U32\";\n break;\n case 6:\n tp = \"F32\";\n break;\n case 7:\n tp = \"F64\"; //not supported\n break;\n default:\n tp = \"F32\";\n }\n return tp;\n },\n\n isValidPixelValue: function(t, val) {\n if (val == null) {\n return false;\n }\n var isValid;\n switch (t) {\n case 0: //char\n isValid = val >= -128 && val <= 127;\n break;\n case 1: //byte (unsigned char)\n isValid = val >= 0 && val <= 255;\n break;\n case 2: //short\n isValid = val >= -32768 && val <= 32767;\n break;\n case 3: //ushort\n isValid = val >= 0 && val <= 65536;\n break;\n case 4: //int 32\n isValid = val >= -2147483648 && val <= 2147483647;\n break;\n case 5: //uinit 32\n isValid = val >= 0 && val <= 4294967296;\n break;\n case 6:\n isValid = val >= -3.4027999387901484e+38 && val <= 3.4027999387901484e+38;\n break;\n case 7:\n isValid = val >= 5e-324 && val <= 1.7976931348623157e+308;\n break;\n default:\n isValid = false;\n }\n return isValid;\n },\n\n getDataTypeSize: function(t) {\n var s = 0;\n switch (t) {\n case 0: //ubyte\n case 1: //byte\n s = 1;\n break;\n case 2: //short\n case 3: //ushort\n s = 2;\n break;\n case 4:\n case 5:\n case 6:\n s = 4;\n break;\n case 7:\n s = 8;\n break;\n default:\n s = t;\n }\n return s;\n },\n\n getDataTypeUsed: function(dt, tc) {\n var t = dt;\n switch (dt) {\n case 2: //short\n case 4: //long\n t = dt - tc;\n break;\n case 3: //ushort\n case 5: //ulong\n t = dt - 2 * tc;\n break;\n case 6: //float\n if (0 === tc) {\n t = dt;\n }\n else if (1 === tc) {\n t = 2;\n }\n else {\n t = 1;//byte\n }\n break;\n case 7: //double\n if (0 === tc) {\n t = dt;\n }\n else {\n t = dt - 2 * tc + 1;\n }\n break;\n default:\n t = dt;\n break;\n }\n return t;\n },\n\n getOnePixel: function(block, blockPtr, offsetType, view) {\n var temp = 0;\n switch (offsetType) {\n case 0: //char\n temp = view.getInt8(blockPtr);\n break;\n case 1: //byte\n temp = view.getUint8(blockPtr);\n break;\n case 2:\n temp = view.getInt16(blockPtr, true);\n break;\n case 3:\n temp = view.getUint16(blockPtr, true);\n break;\n case 4:\n temp = view.getInt32(blockPtr, true);\n break;\n case 5:\n temp = view.getUInt32(blockPtr, true);\n break;\n case 6:\n temp = view.getFloat32(blockPtr, true);\n break;\n case 7:\n //temp = view.getFloat64(blockPtr, true);\n //blockPtr += 8;\n //lerc2 encoding doesnt handle float 64, force to float32???\n temp = view.getFloat64(blockPtr, true);\n break;\n default:\n throw (\"the decoder does not understand this pixel type\");\n }\n return temp;\n }\n };\n\n /***************************************************\n *private class for a tree node. Huffman code is in Lerc2Helpers\n ****************************************************/\n var TreeNode = function(val, left, right) {\n this.val = val;\n this.left = left;\n this.right = right;\n };\n\n var Lerc2Decode = {\n /*\n * ********removed options compared to LERC1. We can bring some of them back if needed.\n * removed pixel type. LERC2 is typed and doesn't require user to give pixel type\n * changed encodedMaskData to maskData. LERC2 's js version make it faster to use maskData directly.\n * removed returnMask. mask is used by LERC2 internally and is cost free. In case of user input mask, it's returned as well and has neglible cost.\n * removed nodatavalue. Because LERC2 pixels are typed, nodatavalue will sacrify a useful value for many types (8bit, 16bit) etc,\n * user has to be knowledgable enough about raster and their data to avoid usability issues. so nodata value is simply removed now.\n * We can add it back later if their's a clear requirement.\n * removed encodedMask. This option was not implemented in LercDecode. It can be done after decoding (less efficient)\n * removed computeUsedBitDepths.\n *\n *\n * response changes compared to LERC1\n * 1. encodedMaskData is not available\n * 2. noDataValue is optional (returns only if user's noDataValue is with in the valid data type range)\n * 3. maskData is always available\n */\n /*****************\n * public properties\n ******************/\n //HUFFMAN_LUT_BITS_MAX: 12, //use 2^12 lut, not configurable\n\n /*****************\n * public methods\n *****************/\n\n /**\n * Decode a LERC2 byte stream and return an object containing the pixel data and optional metadata.\n *\n * @param {ArrayBuffer} input The LERC input byte stream\n * @param {object} [options] options Decoding options\n * @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid LERC file is expected at that position\n * @param {boolean} [options.returnFileInfo] If true, the return value will have a fileInfo property that contains metadata obtained from the LERC headers and the decoding process\n */\n decode: function(/*byte array*/ input, /*object*/ options) {\n //currently there's a bug in the sparse array, so please do not set to false\n options = options || {};\n var noDataValue = options.noDataValue;\n\n //initialize\n var i = 0, data = {};\n data.ptr = options.inputOffset || 0;\n data.pixels = {};\n\n // File header\n if (!Lerc2Helpers.readHeaderInfo(input, data)) {\n return;\n }\n var headerInfo = data.headerInfo;\n var fileVersion = headerInfo.fileVersion;\n var OutPixelTypeArray = Lerc2Helpers.getDataTypeArray(headerInfo.imageType);\n\n // Mask Header\n Lerc2Helpers.readMask(input, data);\n if (headerInfo.numValidPixel !== headerInfo.width * headerInfo.height && !data.pixels.resultMask) {\n data.pixels.resultMask = options.maskData;\n }\n\n var numPixels = headerInfo.width * headerInfo.height;\n data.pixels.resultPixels = new OutPixelTypeArray(numPixels * headerInfo.numDims);\n\n data.counter = {\n onesweep: 0,\n uncompressed: 0,\n lut: 0,\n bitstuffer: 0,\n constant: 0,\n constantoffset: 0\n };\n if (headerInfo.numValidPixel !== 0) {\n //not tested\n if (headerInfo.zMax === headerInfo.zMin) //constant surface\n {\n Lerc2Helpers.constructConstantSurface(data);\n }\n else if (fileVersion >= 4 && Lerc2Helpers.checkMinMaxRanges(input, data)) {\n Lerc2Helpers.constructConstantSurface(data);\n }\n else {\n var view = new DataView(input, data.ptr, 2);\n var bReadDataOneSweep = view.getUint8(0);\n data.ptr++;\n if (bReadDataOneSweep) {\n //console.debug(\"OneSweep\");\n Lerc2Helpers.readDataOneSweep(input, data, OutPixelTypeArray);\n }\n else {\n //lerc2.1: //bitstuffing + lut\n //lerc2.2: //bitstuffing + lut + huffman\n //lerc2.3: new bitstuffer\n if (fileVersion > 1 && headerInfo.imageType <= 1 && Math.abs(headerInfo.maxZError - 0.5) < 0.00001) {\n //this is 2.x plus 8 bit (unsigned and signed) data, possiblity of Huffman\n var flagHuffman = view.getUint8(1);\n data.ptr++;\n data.encodeMode = flagHuffman;\n if (flagHuffman > 2 || (fileVersion < 4 && flagHuffman > 1)) {\n throw \"Invalid Huffman flag \" + flagHuffman;\n }\n if (flagHuffman) {//1 - delta Huffman, 2 - Huffman\n //console.log(\"Huffman\");\n Lerc2Helpers.readHuffman(input, data, OutPixelTypeArray);\n }\n else {\n //console.log(\"Tiles\");\n Lerc2Helpers.readTiles(input, data, OutPixelTypeArray);\n }\n }\n else { //lerc2.x non-8 bit data\n //console.log(\"Tiles\");\n Lerc2Helpers.readTiles(input, data, OutPixelTypeArray);\n }\n }\n }\n }\n\n data.eofOffset = data.ptr;\n var diff;\n if (options.inputOffset) {\n diff = data.headerInfo.blobSize + options.inputOffset - data.ptr;\n if (Math.abs(diff) >= 1) {\n //console.debug(\"incorrect eof: dataptr \" + data.ptr + \" offset \" + options.inputOffset + \" blobsize \" + data.headerInfo.blobSize + \" diff: \" + diff);\n data.eofOffset = options.inputOffset + data.headerInfo.blobSize;\n }\n }\n else {\n diff = data.headerInfo.blobSize - data.ptr;\n if (Math.abs(diff) >= 1) {\n //console.debug(\"incorrect first band eof: dataptr \" + data.ptr + \" blobsize \" + data.headerInfo.blobSize + \" diff: \" + diff);\n data.eofOffset = data.headerInfo.blobSize;\n }\n }\n\n var result = {\n width: headerInfo.width,\n height: headerInfo.height,\n pixelData: data.pixels.resultPixels,\n minValue: headerInfo.zMin,\n maxValue: headerInfo.zMax,\n validPixelCount: headerInfo.numValidPixel,\n dimCount: headerInfo.numDims,\n dimStats: {\n minValues: headerInfo.minValues,\n maxValues: headerInfo.maxValues\n },\n maskData: data.pixels.resultMask\n //noDataValue: noDataValue\n };\n\n //we should remove this if there's no existing client\n //optional noDataValue processing, it's user's responsiblity\n if (data.pixels.resultMask && Lerc2Helpers.isValidPixelValue(headerInfo.imageType, noDataValue)) {\n var mask = data.pixels.resultMask;\n for (i = 0; i < numPixels; i++) {\n if (!mask[i]) {\n result.pixelData[i] = noDataValue;\n }\n }\n result.noDataValue = noDataValue;\n }\n data.noDataValue = noDataValue;\n if (options.returnFileInfo) {\n result.fileInfo = Lerc2Helpers.formatFileInfo(data);\n }\n return result;\n },\n\n getBandCount: function(/*byte array*/ input) {\n var count = 0;\n var i = 0;\n var temp = {};\n temp.ptr = 0;\n temp.pixels = {};\n while (i < input.byteLength - 58) {\n Lerc2Helpers.readHeaderInfo(input, temp);\n i += temp.headerInfo.blobSize;\n count++;\n temp.ptr = i;\n }\n return count;\n }\n };\n\n return Lerc2Decode;\n })();\n\n var isPlatformLittleEndian = (function() {\n var a = new ArrayBuffer(4);\n var b = new Uint8Array(a);\n var c = new Uint32Array(a);\n c[0] = 1;\n return b[0] === 1;\n })();\n\n var Lerc = {\n /************wrapper**********************************************/\n /**\n * A wrapper for decoding both LERC1 and LERC2 byte streams capable of handling multiband pixel blocks for various pixel types.\n *\n * @alias module:Lerc\n * @param {ArrayBuffer} input The LERC input byte stream\n * @param {object} [options] The decoding options below are optional.\n * @param {number} [options.inputOffset] The number of bytes to skip in the input byte stream. A valid Lerc file is expected at that position.\n * @param {string} [options.pixelType] (LERC1 only) Default value is F32. Valid pixel types for input are U8/S8/S16/U16/S32/U32/F32.\n * @param {number} [options.noDataValue] (LERC1 only). It is recommended to use the returned mask instead of setting this value.\n * @returns {{width, height, pixels, pixelType, mask, statistics}}\n * @property {number} width Width of decoded image.\n * @property {number} height Height of decoded image.\n * @property {array} pixels [band1, band2, …] Each band is a typed array of width*height.\n * @property {string} pixelType The type of pixels represented in the output.\n * @property {mask} mask Typed array with a size of width*height, or null if all pixels are valid.\n * @property {array} statistics [statistics_band1, statistics_band2, …] Each element is a statistics object representing min and max values\n **/\n decode: function(encodedData, options) {\n if (!isPlatformLittleEndian) {\n throw \"Big endian system is not supported.\";\n }\n options = options || {};\n var inputOffset = options.inputOffset || 0;\n var fileIdView = new Uint8Array(encodedData, inputOffset, 10);\n var fileIdentifierString = String.fromCharCode.apply(null, fileIdView);\n var lerc, majorVersion;\n if (fileIdentifierString.trim() === \"CntZImage\") {\n lerc = LercDecode;\n majorVersion = 1;\n }\n else if (fileIdentifierString.substring(0, 5) === \"Lerc2\") {\n lerc = Lerc2Decode;\n majorVersion = 2;\n }\n else {\n throw \"Unexpected file identifier string: \" + fileIdentifierString;\n }\n\n var iPlane = 0, eof = encodedData.byteLength - 10, encodedMaskData, bandMasks = [], bandMask, maskData;\n var decodedPixelBlock = {\n width: 0,\n height: 0,\n pixels: [],\n pixelType: options.pixelType,\n mask: null,\n statistics: []\n };\n\n while (inputOffset < eof) {\n var result = lerc.decode(encodedData, {\n inputOffset: inputOffset,//for both lerc1 and lerc2\n encodedMaskData: encodedMaskData,//lerc1 only\n maskData: maskData,//lerc2 only\n returnMask: iPlane === 0 ? true : false,//lerc1 only\n returnEncodedMask: iPlane === 0 ? true : false,//lerc1 only\n returnFileInfo: true,//for both lerc1 and lerc2\n pixelType: options.pixelType || null,//lerc1 only\n noDataValue: options.noDataValue || null//lerc1 only\n });\n\n inputOffset = result.fileInfo.eofOffset;\n if (iPlane === 0) {\n encodedMaskData = result.encodedMaskData;//lerc1\n maskData = result.maskData;//lerc2\n decodedPixelBlock.width = result.width;\n decodedPixelBlock.height = result.height;\n decodedPixelBlock.dimCount = result.dimCount || 1;\n //decodedPixelBlock.dimStats = decodedPixelBlock.dimStats;\n decodedPixelBlock.pixelType = result.pixelType || result.fileInfo.pixelType;\n decodedPixelBlock.mask = result.maskData;\n }\n if (majorVersion >1 && result.fileInfo.mask && result.fileInfo.mask.numBytes > 0) {\n bandMasks.push(result.maskData);\n }\n\n iPlane++;\n decodedPixelBlock.pixels.push(result.pixelData);\n decodedPixelBlock.statistics.push({\n minValue: result.minValue,\n maxValue: result.maxValue,\n noDataValue: result.noDataValue,\n dimStats: result.dimStats\n });\n }\n var i, j, numPixels;\n if (majorVersion > 1 && bandMasks.length > 1) {\n numPixels = decodedPixelBlock.width * decodedPixelBlock.height;\n decodedPixelBlock.bandMasks = bandMasks;\n maskData = new Uint8Array(numPixels);\n maskData.set(bandMasks[0]);\n for (i = 1; i < bandMasks.length; i++) {\n bandMask = bandMasks[i];\n for (j = 0; j < numPixels; j++) {\n maskData[j] = maskData[j] & bandMask[j];\n }\n }\n decodedPixelBlock.maskData = maskData;\n }\n\n return decodedPixelBlock;\n }\n };\n\n if (typeof define === \"function\" && define.amd) {/* jshint ignore:line */\n //amd loaders such as dojo and requireJS\n //http://wiki.commonjs.org/wiki/Modules/AsynchronousDefinition\n define([], function() { return Lerc; });/* jshint ignore:line */\n }\n else if (typeof module !== \"undefined\" && module.exports) {/* jshint ignore:line */\n //commonJS module 1.0/1.1/1.1.1 systems, such as nodeJS\n //http://wiki.commonjs.org/wiki/Modules\n module.exports = Lerc;/* jshint ignore:line */\n }\n else {\n //assign to this, most likely window\n this.Lerc = Lerc;\n }\n\n})();\n","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","import http from 'http';\nimport https from 'https';\nimport urlMod from 'url';\n\nimport { BaseClient, BaseResponse } from './base';\nimport { AbortError } from '../../utils';\n\n\nclass HttpResponse extends BaseResponse {\n /**\n * BaseResponse facade for node HTTP/HTTPS API Response\n * @param {http.ServerResponse} response\n */\n constructor(response, dataPromise) {\n super();\n this.response = response;\n this.dataPromise = dataPromise;\n }\n\n get status() {\n return this.response.statusCode;\n }\n\n getHeader(name) {\n return this.response.headers[name];\n }\n\n async getData() {\n const data = await this.dataPromise;\n return data;\n }\n}\n\nexport class HttpClient extends BaseClient {\n constructor(url) {\n super(url);\n this.parsedUrl = urlMod.parse(this.url);\n this.httpApi = (this.parsedUrl.protocol === 'http:' ? http : https);\n }\n constructRequest(headers, signal) {\n return new Promise((resolve, reject) => {\n const request = this.httpApi.get(\n {\n ...this.parsedUrl,\n headers,\n },\n (response) => {\n const dataPromise = new Promise((resolve) => {\n const chunks = [];\n\n // collect chunks\n response.on('data', (chunk) => {\n chunks.push(chunk);\n });\n\n // concatenate all chunks and resolve the promise with the resulting buffer\n response.on('end', () => {\n const data = Buffer.concat(chunks).buffer;\n resolve(data);\n });\n response.on('error', reject);\n });\n resolve(new HttpResponse(response, dataPromise));\n },\n );\n request.on('error', reject);\n\n if (signal) {\n if (signal.aborted) {\n request.destroy(new AbortError('Request aborted'));\n }\n signal.addEventListener('abort', () => request.destroy(new AbortError('Request aborted')));\n }\n });\n }\n async request({ headers, signal } = {}) {\n const response = await this.constructRequest(headers, signal);\n return response;\n }\n}\n","import fs from 'fs';\nimport { BaseSource } from './basesource';\n\nfunction closeAsync(fd) {\n return new Promise((resolve, reject) => {\n fs.close(fd, (err) => {\n if (err) {\n reject(err);\n } else {\n resolve();\n }\n });\n });\n}\n\nfunction openAsync(path, flags, mode = undefined) {\n return new Promise((resolve, reject) => {\n fs.open(path, flags, mode, (err, fd) => {\n if (err) {\n reject(err);\n } else {\n resolve(fd);\n }\n });\n });\n}\n\nfunction readAsync(...args) {\n return new Promise((resolve, reject) => {\n fs.read(...args, (err, bytesRead, buffer) => {\n if (err) {\n reject(err);\n } else {\n resolve({ bytesRead, buffer });\n }\n });\n });\n}\n\nclass FileSource extends BaseSource {\n constructor(path) {\n super();\n this.path = path;\n this.openRequest = openAsync(path, 'r');\n }\n\n async fetchSlice(slice) {\n // TODO: use `signal`\n const fd = await this.openRequest;\n const { buffer } = await readAsync(\n fd,\n Buffer.alloc(slice.length),\n 0,\n slice.length,\n slice.offset,\n );\n return buffer.buffer;\n }\n\n async close() {\n const fd = await this.openRequest;\n await closeAsync(fd);\n }\n}\n\nexport function makeFileSource(path) {\n return new FileSource(path);\n}\n","(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\r\n typeof define === 'function' && define.amd ? define(factory) :\r\n global.shortNumber = factory();\r\n}(this, function (num) {\r\n 'use strict';\r\n\r\n return function (num) {\r\n if(typeof num !== 'number') {\r\n throw new TypeError('Expected a number');\r\n }\r\n\r\n if(num > 1e19) {\r\n throw new RangeError('Input expected to be < 1e19');\r\n }\r\n\r\n if(num < -1e19) {\r\n throw new RangeError('Input expected to be > 1e19');\r\n }\r\n\r\n if(Math.abs(num) < 1000) {\r\n return num;\r\n }\r\n\r\n var shortNumber;\r\n var exponent;\r\n var size;\r\n var sign = num < 0 ? '-' : '';\r\n var suffixes = {\r\n 'K': 6,\r\n 'M': 9,\r\n 'B': 12,\r\n 'T': 16\r\n };\r\n\r\n num = Math.abs(num);\r\n size = Math.floor(num).toString().length;\r\n\r\n exponent = size % 3 === 0 ? size - 3 : size - (size % 3);\r\n shortNumber = Math.round(10 * (num / Math.pow(10, exponent))) / 10;\r\n\r\n for(var suffix in suffixes) {\r\n if(exponent < suffixes[suffix]) {\r\n shortNumber += suffix;\r\n break;\r\n }\r\n }\r\n\r\n return sign + shortNumber;\r\n };\r\n}));\r\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = global || self, factory(global.json2csv = {}));\n}(this, function (exports) { 'use strict';\n\n var domain;\n\n // This constructor is used to store event handlers. Instantiating this is\n // faster than explicitly calling `Object.create(null)` to get a \"clean\" empty\n // object (tested with v8 v4.9).\n function EventHandlers() {}\n EventHandlers.prototype = Object.create(null);\n\n function EventEmitter() {\n EventEmitter.init.call(this);\n }\n\n // nodejs oddity\n // require('events') === require('events').EventEmitter\n EventEmitter.EventEmitter = EventEmitter;\n\n EventEmitter.usingDomains = false;\n\n EventEmitter.prototype.domain = undefined;\n EventEmitter.prototype._events = undefined;\n EventEmitter.prototype._maxListeners = undefined;\n\n // By default EventEmitters will print a warning if more than 10 listeners are\n // added to it. This is a useful default which helps finding memory leaks.\n EventEmitter.defaultMaxListeners = 10;\n\n EventEmitter.init = function() {\n this.domain = null;\n if (EventEmitter.usingDomains) {\n // if there is an active domain, then attach to it.\n if (domain.active && !(this instanceof domain.Domain)) ;\n }\n\n if (!this._events || this._events === Object.getPrototypeOf(this)._events) {\n this._events = new EventHandlers();\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n };\n\n // Obviously not all Emitters should be limited to 10. This function allows\n // that to be increased. Set to zero for unlimited.\n EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || isNaN(n))\n throw new TypeError('\"n\" argument must be a positive number');\n this._maxListeners = n;\n return this;\n };\n\n function $getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n }\n\n EventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return $getMaxListeners(this);\n };\n\n // These standalone emit* functions are used to optimize calling of event\n // handlers for fast cases because emit() itself often has a variable number of\n // arguments and can be deoptimized because of that. These functions always have\n // the same number of arguments and thus do not get deoptimized, so the code\n // inside them can execute faster.\n function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }\n function emitOne(handler, isFn, self, arg1) {\n if (isFn)\n handler.call(self, arg1);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1);\n }\n }\n function emitTwo(handler, isFn, self, arg1, arg2) {\n if (isFn)\n handler.call(self, arg1, arg2);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1, arg2);\n }\n }\n function emitThree(handler, isFn, self, arg1, arg2, arg3) {\n if (isFn)\n handler.call(self, arg1, arg2, arg3);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self, arg1, arg2, arg3);\n }\n }\n\n function emitMany(handler, isFn, self, args) {\n if (isFn)\n handler.apply(self, args);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].apply(self, args);\n }\n }\n\n EventEmitter.prototype.emit = function emit(type) {\n var er, handler, len, args, i, events, domain;\n var doError = (type === 'error');\n\n events = this._events;\n if (events)\n doError = (doError && events.error == null);\n else if (!doError)\n return false;\n\n domain = this.domain;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n er = arguments[1];\n if (domain) {\n if (!er)\n er = new Error('Uncaught, unspecified \"error\" event');\n er.domainEmitter = this;\n er.domain = domain;\n er.domainThrown = false;\n domain.emit('error', er);\n } else if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n return false;\n }\n\n handler = events[type];\n\n if (!handler)\n return false;\n\n var isFn = typeof handler === 'function';\n len = arguments.length;\n switch (len) {\n // fast cases\n case 1:\n emitNone(handler, isFn, this);\n break;\n case 2:\n emitOne(handler, isFn, this, arguments[1]);\n break;\n case 3:\n emitTwo(handler, isFn, this, arguments[1], arguments[2]);\n break;\n case 4:\n emitThree(handler, isFn, this, arguments[1], arguments[2], arguments[3]);\n break;\n // slower\n default:\n args = new Array(len - 1);\n for (i = 1; i < len; i++)\n args[i - 1] = arguments[i];\n emitMany(handler, isFn, this, args);\n }\n\n return true;\n };\n\n function _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n\n events = target._events;\n if (!events) {\n events = target._events = new EventHandlers();\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (!existing) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] = prepend ? [listener, existing] :\n [existing, listener];\n } else {\n // If we've already got an array, just append.\n if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n }\n\n // Check for listener leak\n if (!existing.warned) {\n m = $getMaxListeners(target);\n if (m && m > 0 && existing.length > m) {\n existing.warned = true;\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + type + ' listeners added. ' +\n 'Use emitter.setMaxListeners() to increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n emitWarning(w);\n }\n }\n }\n\n return target;\n }\n function emitWarning(e) {\n typeof console.warn === 'function' ? console.warn(e) : console.log(e);\n }\n EventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n };\n\n EventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\n EventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\n function _onceWrap(target, type, listener) {\n var fired = false;\n function g() {\n target.removeListener(type, g);\n if (!fired) {\n fired = true;\n listener.apply(target, arguments);\n }\n }\n g.listener = listener;\n return g;\n }\n\n EventEmitter.prototype.once = function once(type, listener) {\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n this.on(type, _onceWrap(this, type, listener));\n return this;\n };\n\n EventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n // emits a 'removeListener' event iff the listener was removed\n EventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n if (typeof listener !== 'function')\n throw new TypeError('\"listener\" argument must be a function');\n\n events = this._events;\n if (!events)\n return this;\n\n list = events[type];\n if (!list)\n return this;\n\n if (list === listener || (list.listener && list.listener === listener)) {\n if (--this._eventsCount === 0)\n this._events = new EventHandlers();\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length; i-- > 0;) {\n if (list[i] === listener ||\n (list[i].listener && list[i].listener === listener)) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (list.length === 1) {\n list[0] = undefined;\n if (--this._eventsCount === 0) {\n this._events = new EventHandlers();\n return this;\n } else {\n delete events[type];\n }\n } else {\n spliceOne(list, position);\n }\n\n if (events.removeListener)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\n EventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events;\n\n events = this._events;\n if (!events)\n return this;\n\n // not listening for removeListener, no need to emit\n if (!events.removeListener) {\n if (arguments.length === 0) {\n this._events = new EventHandlers();\n this._eventsCount = 0;\n } else if (events[type]) {\n if (--this._eventsCount === 0)\n this._events = new EventHandlers();\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n for (var i = 0, key; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = new EventHandlers();\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n do {\n this.removeListener(type, listeners[listeners.length - 1]);\n } while (listeners[0]);\n }\n\n return this;\n };\n\n EventEmitter.prototype.listeners = function listeners(type) {\n var evlistener;\n var ret;\n var events = this._events;\n\n if (!events)\n ret = [];\n else {\n evlistener = events[type];\n if (!evlistener)\n ret = [];\n else if (typeof evlistener === 'function')\n ret = [evlistener.listener || evlistener];\n else\n ret = unwrapListeners(evlistener);\n }\n\n return ret;\n };\n\n EventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n };\n\n EventEmitter.prototype.listenerCount = listenerCount;\n function listenerCount(type) {\n var events = this._events;\n\n if (events) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener) {\n return evlistener.length;\n }\n }\n\n return 0;\n }\n\n EventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];\n };\n\n // About 1.5x faster than the two-arg version of Array#splice().\n function spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1)\n list[i] = list[k];\n list.pop();\n }\n\n function arrayClone(arr, i) {\n var copy = new Array(i);\n while (i--)\n copy[i] = arr[i];\n return copy;\n }\n\n function unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n }\n\n var global$1 = (typeof global !== \"undefined\" ? global :\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window : {});\n\n var lookup = [];\n var revLookup = [];\n var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n var inited = false;\n function init () {\n inited = true;\n var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n for (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i];\n revLookup[code.charCodeAt(i)] = i;\n }\n\n revLookup['-'.charCodeAt(0)] = 62;\n revLookup['_'.charCodeAt(0)] = 63;\n }\n\n function toByteArray (b64) {\n if (!inited) {\n init();\n }\n var i, j, l, tmp, placeHolders, arr;\n var len = b64.length;\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // the number of equal signs (place holders)\n // if there are two placeholders, than the two characters before it\n // represent one byte\n // if there is only one, then the three characters before it represent 2 bytes\n // this is just a cheap hack to not do indexOf twice\n placeHolders = b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0;\n\n // base64 is 4/3 + up to two characters of the original data\n arr = new Arr(len * 3 / 4 - placeHolders);\n\n // if there are placeholders, only get up to the last complete 4 chars\n l = placeHolders > 0 ? len - 4 : len;\n\n var L = 0;\n\n for (i = 0, j = 0; i < l; i += 4, j += 3) {\n tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)];\n arr[L++] = (tmp >> 16) & 0xFF;\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n if (placeHolders === 2) {\n tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4);\n arr[L++] = tmp & 0xFF;\n } else if (placeHolders === 1) {\n tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2);\n arr[L++] = (tmp >> 8) & 0xFF;\n arr[L++] = tmp & 0xFF;\n }\n\n return arr\n }\n\n function tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]\n }\n\n function encodeChunk (uint8, start, end) {\n var tmp;\n var output = [];\n for (var i = start; i < end; i += 3) {\n tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]);\n output.push(tripletToBase64(tmp));\n }\n return output.join('')\n }\n\n function fromByteArray (uint8) {\n if (!inited) {\n init();\n }\n var tmp;\n var len = uint8.length;\n var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes\n var output = '';\n var parts = [];\n var maxChunkLength = 16383; // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)));\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1];\n output += lookup[tmp >> 2];\n output += lookup[(tmp << 4) & 0x3F];\n output += '==';\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + (uint8[len - 1]);\n output += lookup[tmp >> 10];\n output += lookup[(tmp >> 4) & 0x3F];\n output += lookup[(tmp << 2) & 0x3F];\n output += '=';\n }\n\n parts.push(output);\n\n return parts.join('')\n }\n\n function read (buffer, offset, isLE, mLen, nBytes) {\n var e, m;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var nBits = -7;\n var i = isLE ? (nBytes - 1) : 0;\n var d = isLE ? -1 : 1;\n var s = buffer[offset + i];\n\n i += d;\n\n e = s & ((1 << (-nBits)) - 1);\n s >>= (-nBits);\n nBits += eLen;\n for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1);\n e >>= (-nBits);\n nBits += mLen;\n for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias;\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen);\n e = e - eBias;\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n }\n\n function write (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c;\n var eLen = nBytes * 8 - mLen - 1;\n var eMax = (1 << eLen) - 1;\n var eBias = eMax >> 1;\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);\n var i = isLE ? 0 : (nBytes - 1);\n var d = isLE ? 1 : -1;\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;\n\n value = Math.abs(value);\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0;\n e = eMax;\n } else {\n e = Math.floor(Math.log(value) / Math.LN2);\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--;\n c *= 2;\n }\n if (e + eBias >= 1) {\n value += rt / c;\n } else {\n value += rt * Math.pow(2, 1 - eBias);\n }\n if (value * c >= 2) {\n e++;\n c /= 2;\n }\n\n if (e + eBias >= eMax) {\n m = 0;\n e = eMax;\n } else if (e + eBias >= 1) {\n m = (value * c - 1) * Math.pow(2, mLen);\n e = e + eBias;\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n e = 0;\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m;\n eLen += mLen;\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128;\n }\n\n var toString = {}.toString;\n\n var isArray = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n };\n\n var INSPECT_MAX_BYTES = 50;\n\n /**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\n Buffer.TYPED_ARRAY_SUPPORT = global$1.TYPED_ARRAY_SUPPORT !== undefined\n ? global$1.TYPED_ARRAY_SUPPORT\n : true;\n\n function kMaxLength () {\n return Buffer.TYPED_ARRAY_SUPPORT\n ? 0x7fffffff\n : 0x3fffffff\n }\n\n function createBuffer (that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length')\n }\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n that.length = length;\n }\n\n return that\n }\n\n /**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\n function Buffer (arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length)\n }\n\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error(\n 'If encoding is specified then the first argument must be a string'\n )\n }\n return allocUnsafe(this, arg)\n }\n return from(this, arg, encodingOrOffset, length)\n }\n\n Buffer.poolSize = 8192; // not used by this implementation\n\n // TODO: Legacy, not needed anymore. Remove in next major version.\n Buffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr\n };\n\n function from (that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number')\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length)\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset)\n }\n\n return fromObject(that, value)\n }\n\n /**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\n Buffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length)\n };\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n }\n\n function assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number')\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative')\n }\n }\n\n function alloc (that, size, fill, encoding) {\n assertSize(size);\n if (size <= 0) {\n return createBuffer(that, size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(that, size).fill(fill, encoding)\n : createBuffer(that, size).fill(fill)\n }\n return createBuffer(that, size)\n }\n\n /**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\n Buffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding)\n };\n\n function allocUnsafe (that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n return that\n }\n\n /**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\n Buffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size)\n };\n /**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\n Buffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size)\n };\n\n function fromString (that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding')\n }\n\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n\n var actual = that.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n\n return that\n }\n\n function fromArrayLike (that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n return that\n }\n\n function fromArrayBuffer (that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds')\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n return that\n }\n\n function fromObject (that, obj) {\n if (internalIsBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n\n if (that.length === 0) {\n return that\n }\n\n obj.copy(that, 0, 0, len);\n return that\n }\n\n if (obj) {\n if ((typeof ArrayBuffer !== 'undefined' &&\n obj.buffer instanceof ArrayBuffer) || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0)\n }\n return fromArrayLike(that, obj)\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data)\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')\n }\n\n function checked (length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + kMaxLength().toString(16) + ' bytes')\n }\n return length | 0\n }\n Buffer.isBuffer = isBuffer;\n function internalIsBuffer (b) {\n return !!(b != null && b._isBuffer)\n }\n\n Buffer.compare = function compare (a, b) {\n if (!internalIsBuffer(a) || !internalIsBuffer(b)) {\n throw new TypeError('Arguments must be Buffers')\n }\n\n if (a === b) return 0\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n };\n\n Buffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n };\n\n Buffer.concat = function concat (list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i;\n if (length === undefined) {\n length = 0;\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n if (!internalIsBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n return buffer\n };\n\n function byteLength (string, encoding) {\n if (internalIsBuffer(string)) {\n return string.length\n }\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&\n (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n string = '' + string;\n }\n\n var len = string.length;\n if (len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) return utf8ToBytes(string).length // assume utf8\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n }\n Buffer.byteLength = byteLength;\n\n function slowToString (encoding, start, end) {\n var loweredCase = false;\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0;\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n }\n\n // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n // Buffer instances.\n Buffer.prototype._isBuffer = true;\n\n function swap (b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n }\n\n Buffer.prototype.swap16 = function swap16 () {\n var len = this.length;\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n return this\n };\n\n Buffer.prototype.swap32 = function swap32 () {\n var len = this.length;\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n return this\n };\n\n Buffer.prototype.swap64 = function swap64 () {\n var len = this.length;\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n return this\n };\n\n Buffer.prototype.toString = function toString () {\n var length = this.length | 0;\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n };\n\n Buffer.prototype.equals = function equals (b) {\n if (!internalIsBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n };\n\n Buffer.prototype.inspect = function inspect () {\n var str = '';\n var max = INSPECT_MAX_BYTES;\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n return '<Buffer ' + str + '>'\n };\n\n Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (!internalIsBuffer(target)) {\n throw new TypeError('Argument must be a Buffer')\n }\n\n if (start === undefined) {\n start = 0;\n }\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n if (thisStart === undefined) {\n thisStart = 0;\n }\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n };\n\n // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n // OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n //\n // Arguments:\n // - buffer - a Buffer to search\n // - val - a string, Buffer, or number\n // - byteOffset - an index into `buffer`; will be clamped to an int32\n // - encoding - an optional encoding, relevant is val is a string\n // - dir - true for indexOf, false for lastIndexOf\n function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n byteOffset = +byteOffset; // Coerce to Number.\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1);\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (internalIsBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n if (Buffer.TYPED_ARRAY_SUPPORT &&\n typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n }\n\n function arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i;\n if (dir) {\n var foundIndex = -1;\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n }\n\n Buffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n };\n\n Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n };\n\n Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n };\n\n function hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n if (length > remaining) {\n length = remaining;\n }\n }\n\n // must be an even number of digits\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i\n buf[offset + i] = parsed;\n }\n return i\n }\n\n function utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n }\n\n function asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n }\n\n function latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n }\n\n function base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n }\n\n function ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n }\n\n Buffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0;\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0;\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n }\n // legacy write(string, encoding, offset, length) - remove in v0.13\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8';\n\n var loweredCase = false;\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n };\n\n Buffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n };\n\n function base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return fromByteArray(buf)\n } else {\n return fromByteArray(buf.slice(start, end))\n }\n }\n\n function utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n\n var i = start;\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1;\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n break\n case 2:\n secondByte = buf[i + 1];\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F);\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F);\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n break\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F);\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res)\n }\n\n // Based on http://stackoverflow.com/a/22747272/680742, the browser with\n // the lowest limit is Chrome, with 0x10000 args.\n // We go 1 magnitude less, for safety\n var MAX_ARGUMENTS_LENGTH = 0x1000;\n\n function decodeCodePointsArray (codePoints) {\n var len = codePoints.length;\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = '';\n var i = 0;\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n );\n }\n return res\n }\n\n function asciiSlice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n return ret\n }\n\n function latin1Slice (buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n return ret\n }\n\n function hexSlice (buf, start, end) {\n var len = buf.length;\n\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n\n var out = '';\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n return out\n }\n\n function utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n return res\n }\n\n Buffer.prototype.slice = function slice (start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n\n var newBuf;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n\n return newBuf\n };\n\n /*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\n function checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n }\n\n Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val\n };\n\n Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n var val = this[offset + --byteLength];\n var mul = 1;\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val\n };\n\n Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset]\n };\n\n Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | (this[offset + 1] << 8)\n };\n\n Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return (this[offset] << 8) | this[offset + 1]\n };\n\n Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n };\n\n Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n };\n\n Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var val = this[offset];\n var mul = 1;\n var i = 0;\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n };\n\n Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n mul *= 0x80;\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\n return val\n };\n\n Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n };\n\n Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | (this[offset + 1] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n };\n\n Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | (this[offset] << 8);\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n };\n\n Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n };\n\n Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n };\n\n Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, true, 23, 4)\n };\n\n Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return read(this, offset, false, 23, 4)\n };\n\n Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, true, 52, 8)\n };\n\n Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return read(this, offset, false, 52, 8)\n };\n\n function checkInt (buf, value, offset, ext, max, min) {\n if (!internalIsBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n }\n\n Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n };\n\n Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF;\n }\n\n return offset + byteLength\n };\n\n Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = (value & 0xff);\n return offset + 1\n };\n\n function objectWriteUInt16 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\n (littleEndian ? i : 1 - i) * 8;\n }\n }\n\n Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n };\n\n Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n };\n\n function objectWriteUInt32 (buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff;\n }\n }\n\n Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = (value >>> 24);\n this[offset + 2] = (value >>> 16);\n this[offset + 1] = (value >>> 8);\n this[offset] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n };\n\n Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n };\n\n Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n };\n\n Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength\n };\n\n Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = (value & 0xff);\n return offset + 1\n };\n\n Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n return offset + 2\n };\n\n Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 8);\n this[offset + 1] = (value & 0xff);\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n return offset + 2\n };\n\n Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value & 0xff);\n this[offset + 1] = (value >>> 8);\n this[offset + 2] = (value >>> 16);\n this[offset + 3] = (value >>> 24);\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n return offset + 4\n };\n\n Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = (value >>> 24);\n this[offset + 1] = (value >>> 16);\n this[offset + 2] = (value >>> 8);\n this[offset + 3] = (value & 0xff);\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n return offset + 4\n };\n\n function checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n }\n\n function writeFloat (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);\n }\n write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4\n }\n\n Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n };\n\n Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n };\n\n function writeDouble (buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);\n }\n write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8\n }\n\n Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n };\n\n Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n };\n\n // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n Buffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start;\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length;\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n var len = end - start;\n var i;\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, start + len),\n targetStart\n );\n }\n\n return len\n };\n\n // Usage:\n // buffer.fill(number[, offset[, end]])\n // buffer.fill(buffer[, offset[, end]])\n // buffer.fill(string[, offset[, end]][, encoding])\n Buffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n if (code < 256) {\n val = code;\n }\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n\n if (!val) val = 0;\n\n var i;\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = internalIsBuffer(val)\n ? val\n : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this\n };\n\n // HELPER FUNCTIONS\n // ================\n\n var INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\n function base64clean (str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, '');\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n return str\n }\n\n function stringtrim (str) {\n if (str.trim) return str.trim()\n return str.replace(/^\\s+|\\s+$/g, '')\n }\n\n function toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n }\n\n function utf8ToBytes (string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i);\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint;\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null;\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n );\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n }\n\n function asciiToBytes (str) {\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n return byteArray\n }\n\n function utf16leToBytes (str, units) {\n var c, hi, lo;\n var byteArray = [];\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray\n }\n\n\n function base64ToBytes (str) {\n return toByteArray(base64clean(str))\n }\n\n function blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i];\n }\n return i\n }\n\n function isnan (val) {\n return val !== val // eslint-disable-line no-self-compare\n }\n\n\n // the following is from is-buffer, also by Feross Aboukhadijeh and with same lisence\n // The _isBuffer check is for Safari 5-7 support, because it's missing\n // Object.prototype.constructor. Remove this eventually\n function isBuffer(obj) {\n return obj != null && (!!obj._isBuffer || isFastBuffer(obj) || isSlowBuffer(obj))\n }\n\n function isFastBuffer (obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)\n }\n\n // For Node v0.10 support. Remove this eventually.\n function isSlowBuffer (obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isFastBuffer(obj.slice(0, 0))\n }\n\n // shim for using process in browser\n // based off https://github.com/defunctzombie/node-process/blob/master/browser.js\n\n function defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n }\n function defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n }\n var cachedSetTimeout = defaultSetTimout;\n var cachedClearTimeout = defaultClearTimeout;\n if (typeof global$1.setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n }\n if (typeof global$1.clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n }\n\n function runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n }\n function runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n }\n var queue = [];\n var draining = false;\n var currentQueue;\n var queueIndex = -1;\n\n function cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n }\n\n function drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n }\n function nextTick(fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n }\n // v8 likes predictible objects\n function Item(fun, array) {\n this.fun = fun;\n this.array = array;\n }\n Item.prototype.run = function () {\n this.fun.apply(null, this.array);\n };\n var title = 'browser';\n var platform = 'browser';\n var browser = true;\n var env = {};\n var argv = [];\n var version = ''; // empty string to avoid regexp issues\n var versions = {};\n var release = {};\n var config = {};\n\n function noop() {}\n\n var on = noop;\n var addListener = noop;\n var once = noop;\n var off = noop;\n var removeListener = noop;\n var removeAllListeners = noop;\n var emit = noop;\n\n function binding(name) {\n throw new Error('process.binding is not supported');\n }\n\n function cwd () { return '/' }\n function chdir (dir) {\n throw new Error('process.chdir is not supported');\n }function umask() { return 0; }\n\n // from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js\n var performance = global$1.performance || {};\n var performanceNow =\n performance.now ||\n performance.mozNow ||\n performance.msNow ||\n performance.oNow ||\n performance.webkitNow ||\n function(){ return (new Date()).getTime() };\n\n // generate timestamp or delta\n // see http://nodejs.org/api/process.html#process_process_hrtime\n function hrtime(previousTimestamp){\n var clocktime = performanceNow.call(performance)*1e-3;\n var seconds = Math.floor(clocktime);\n var nanoseconds = Math.floor((clocktime%1)*1e9);\n if (previousTimestamp) {\n seconds = seconds - previousTimestamp[0];\n nanoseconds = nanoseconds - previousTimestamp[1];\n if (nanoseconds<0) {\n seconds--;\n nanoseconds += 1e9;\n }\n }\n return [seconds,nanoseconds]\n }\n\n var startTime = new Date();\n function uptime() {\n var currentTime = new Date();\n var dif = currentTime - startTime;\n return dif / 1000;\n }\n\n var process = {\n nextTick: nextTick,\n title: title,\n browser: browser,\n env: env,\n argv: argv,\n version: version,\n versions: versions,\n on: on,\n addListener: addListener,\n once: once,\n off: off,\n removeListener: removeListener,\n removeAllListeners: removeAllListeners,\n emit: emit,\n binding: binding,\n cwd: cwd,\n chdir: chdir,\n umask: umask,\n hrtime: hrtime,\n platform: platform,\n release: release,\n config: config,\n uptime: uptime\n };\n\n var inherits;\n if (typeof Object.create === 'function'){\n inherits = function inherits(ctor, superCtor) {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n } else {\n inherits = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n };\n }\n var inherits$1 = inherits;\n\n var formatRegExp = /%[sdj%]/g;\n function format(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n }\n\n // Mark that a method should not be used.\n // Returns a modified function which warns once by default.\n // If --no-deprecation is set, then it is a no-op.\n function deprecate(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global$1.process)) {\n return function() {\n return deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n }\n\n var debugs = {};\n var debugEnviron;\n function debuglog(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = 0;\n debugs[set] = function() {\n var msg = format.apply(null, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n }\n\n /**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n /* legacy: obj, showHidden, depth, colors*/\n function inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n _extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n }\n\n // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\n inspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n };\n\n // Don't use 'blue' not visible on cmd.exe\n inspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n };\n\n\n function stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n }\n\n\n function stylizeNoColor(str, styleType) {\n return str;\n }\n\n\n function arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n }\n\n\n function formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray$1(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n }\n\n\n function formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n }\n\n\n function formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n }\n\n\n function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n }\n\n\n function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n }\n\n\n function reduceToSingleString(output, base, braces) {\n var length = output.reduce(function(prev, cur) {\n if (cur.indexOf('\\n') >= 0) ;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n }\n\n\n // NOTE: These type checking functions intentionally don't use `instanceof`\n // because it is fragile and can be easily faked with `Object.create()`.\n function isArray$1(ar) {\n return Array.isArray(ar);\n }\n\n function isBoolean(arg) {\n return typeof arg === 'boolean';\n }\n\n function isNull(arg) {\n return arg === null;\n }\n\n function isNumber(arg) {\n return typeof arg === 'number';\n }\n\n function isString(arg) {\n return typeof arg === 'string';\n }\n\n function isUndefined(arg) {\n return arg === void 0;\n }\n\n function isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n }\n\n function isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n }\n\n function isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n }\n\n function isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n }\n\n function isFunction(arg) {\n return typeof arg === 'function';\n }\n\n function objectToString(o) {\n return Object.prototype.toString.call(o);\n }\n\n function _extend(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n }\n function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n }\n\n function BufferList() {\n this.head = null;\n this.tail = null;\n this.length = 0;\n }\n\n BufferList.prototype.push = function (v) {\n var entry = { data: v, next: null };\n if (this.length > 0) this.tail.next = entry;else this.head = entry;\n this.tail = entry;\n ++this.length;\n };\n\n BufferList.prototype.unshift = function (v) {\n var entry = { data: v, next: this.head };\n if (this.length === 0) this.tail = entry;\n this.head = entry;\n ++this.length;\n };\n\n BufferList.prototype.shift = function () {\n if (this.length === 0) return;\n var ret = this.head.data;\n if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;\n --this.length;\n return ret;\n };\n\n BufferList.prototype.clear = function () {\n this.head = this.tail = null;\n this.length = 0;\n };\n\n BufferList.prototype.join = function (s) {\n if (this.length === 0) return '';\n var p = this.head;\n var ret = '' + p.data;\n while (p = p.next) {\n ret += s + p.data;\n }return ret;\n };\n\n BufferList.prototype.concat = function (n) {\n if (this.length === 0) return Buffer.alloc(0);\n if (this.length === 1) return this.head.data;\n var ret = Buffer.allocUnsafe(n >>> 0);\n var p = this.head;\n var i = 0;\n while (p) {\n p.data.copy(ret, i);\n i += p.data.length;\n p = p.next;\n }\n return ret;\n };\n\n // Copyright Joyent, Inc. and other Node contributors.\n var isBufferEncoding = Buffer.isEncoding\n || function(encoding) {\n switch (encoding && encoding.toLowerCase()) {\n case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true;\n default: return false;\n }\n };\n\n\n function assertEncoding(encoding) {\n if (encoding && !isBufferEncoding(encoding)) {\n throw new Error('Unknown encoding: ' + encoding);\n }\n }\n\n // StringDecoder provides an interface for efficiently splitting a series of\n // buffers into a series of JS strings without breaking apart multi-byte\n // characters. CESU-8 is handled as part of the UTF-8 encoding.\n //\n // @TODO Handling all encodings inside a single object makes it very difficult\n // to reason about this code, so it should be split up in the future.\n // @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code\n // points as used by CESU-8.\n function StringDecoder(encoding) {\n this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, '');\n assertEncoding(encoding);\n switch (this.encoding) {\n case 'utf8':\n // CESU-8 represents each of Surrogate Pair by 3-bytes\n this.surrogateSize = 3;\n break;\n case 'ucs2':\n case 'utf16le':\n // UTF-16 represents each of Surrogate Pair by 2-bytes\n this.surrogateSize = 2;\n this.detectIncompleteChar = utf16DetectIncompleteChar;\n break;\n case 'base64':\n // Base-64 stores 3 bytes in 4 chars, and pads the remainder.\n this.surrogateSize = 3;\n this.detectIncompleteChar = base64DetectIncompleteChar;\n break;\n default:\n this.write = passThroughWrite;\n return;\n }\n\n // Enough space to store all bytes of a single character. UTF-8 needs 4\n // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate).\n this.charBuffer = new Buffer(6);\n // Number of bytes received for the current incomplete multi-byte character.\n this.charReceived = 0;\n // Number of bytes expected for the current incomplete multi-byte character.\n this.charLength = 0;\n }\n\n // write decodes the given buffer and returns it as JS string that is\n // guaranteed to not contain any partial multi-byte characters. Any partial\n // character found at the end of the buffer is buffered up, and will be\n // returned when calling write again with the remaining bytes.\n //\n // Note: Converting a Buffer containing an orphan surrogate to a String\n // currently works, but converting a String to a Buffer (via `new Buffer`, or\n // Buffer#write) will replace incomplete surrogates with the unicode\n // replacement character. See https://codereview.chromium.org/121173009/ .\n StringDecoder.prototype.write = function(buffer) {\n var charStr = '';\n // if our last write ended with an incomplete multibyte character\n while (this.charLength) {\n // determine how many remaining bytes this buffer has to offer for this char\n var available = (buffer.length >= this.charLength - this.charReceived) ?\n this.charLength - this.charReceived :\n buffer.length;\n\n // add the new bytes to the char buffer\n buffer.copy(this.charBuffer, this.charReceived, 0, available);\n this.charReceived += available;\n\n if (this.charReceived < this.charLength) {\n // still not enough chars in this buffer? wait for more ...\n return '';\n }\n\n // remove bytes belonging to the current character from the buffer\n buffer = buffer.slice(available, buffer.length);\n\n // get the character that was split\n charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding);\n\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n var charCode = charStr.charCodeAt(charStr.length - 1);\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n this.charLength += this.surrogateSize;\n charStr = '';\n continue;\n }\n this.charReceived = this.charLength = 0;\n\n // if there are no more bytes in this buffer, just emit our char\n if (buffer.length === 0) {\n return charStr;\n }\n break;\n }\n\n // determine and set charLength / charReceived\n this.detectIncompleteChar(buffer);\n\n var end = buffer.length;\n if (this.charLength) {\n // buffer the incomplete character bytes we got\n buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end);\n end -= this.charReceived;\n }\n\n charStr += buffer.toString(this.encoding, 0, end);\n\n var end = charStr.length - 1;\n var charCode = charStr.charCodeAt(end);\n // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character\n if (charCode >= 0xD800 && charCode <= 0xDBFF) {\n var size = this.surrogateSize;\n this.charLength += size;\n this.charReceived += size;\n this.charBuffer.copy(this.charBuffer, size, 0, size);\n buffer.copy(this.charBuffer, 0, 0, size);\n return charStr.substring(0, end);\n }\n\n // or just emit the charStr\n return charStr;\n };\n\n // detectIncompleteChar determines if there is an incomplete UTF-8 character at\n // the end of the given buffer. If so, it sets this.charLength to the byte\n // length that character, and sets this.charReceived to the number of bytes\n // that are available for this character.\n StringDecoder.prototype.detectIncompleteChar = function(buffer) {\n // determine how many bytes we have to check at the end of this buffer\n var i = (buffer.length >= 3) ? 3 : buffer.length;\n\n // Figure out if one of the last i bytes of our buffer announces an\n // incomplete char.\n for (; i > 0; i--) {\n var c = buffer[buffer.length - i];\n\n // See http://en.wikipedia.org/wiki/UTF-8#Description\n\n // 110XXXXX\n if (i == 1 && c >> 5 == 0x06) {\n this.charLength = 2;\n break;\n }\n\n // 1110XXXX\n if (i <= 2 && c >> 4 == 0x0E) {\n this.charLength = 3;\n break;\n }\n\n // 11110XXX\n if (i <= 3 && c >> 3 == 0x1E) {\n this.charLength = 4;\n break;\n }\n }\n this.charReceived = i;\n };\n\n StringDecoder.prototype.end = function(buffer) {\n var res = '';\n if (buffer && buffer.length)\n res = this.write(buffer);\n\n if (this.charReceived) {\n var cr = this.charReceived;\n var buf = this.charBuffer;\n var enc = this.encoding;\n res += buf.slice(0, cr).toString(enc);\n }\n\n return res;\n };\n\n function passThroughWrite(buffer) {\n return buffer.toString(this.encoding);\n }\n\n function utf16DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 2;\n this.charLength = this.charReceived ? 2 : 0;\n }\n\n function base64DetectIncompleteChar(buffer) {\n this.charReceived = buffer.length % 3;\n this.charLength = this.charReceived ? 3 : 0;\n }\n\n Readable.ReadableState = ReadableState;\n\n var debug = debuglog('stream');\n inherits$1(Readable, EventEmitter);\n\n function prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') {\n return emitter.prependListener(event, fn);\n } else {\n // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n if (!emitter._events || !emitter._events[event])\n emitter.on(event, fn);\n else if (Array.isArray(emitter._events[event]))\n emitter._events[event].unshift(fn);\n else\n emitter._events[event] = [fn, emitter._events[event]];\n }\n }\n function listenerCount$1 (emitter, type) {\n return emitter.listeners(type).length;\n }\n function ReadableState(options, stream) {\n\n options = options || {};\n\n // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;\n\n // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // when piping, we only care about 'readable' events that happen\n // after read()ing all the bytes and not getting any pushback.\n this.ranOut = false;\n\n // the number of writers that are awaiting a drain event in .pipe()s\n this.awaitDrain = 0;\n\n // if true, a maybeReadMore has been scheduled\n this.readingMore = false;\n\n this.decoder = null;\n this.encoding = null;\n if (options.encoding) {\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n }\n function Readable(options) {\n\n if (!(this instanceof Readable)) return new Readable(options);\n\n this._readableState = new ReadableState(options, this);\n\n // legacy\n this.readable = true;\n\n if (options && typeof options.read === 'function') this._read = options.read;\n\n EventEmitter.call(this);\n }\n\n // Manually shove something into the read() buffer.\n // This returns true if the highWaterMark has not been hit yet,\n // similar to how Writable.write() returns true if you should\n // write() some more.\n Readable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n\n if (!state.objectMode && typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n }\n\n return readableAddChunk(this, state, chunk, encoding, false);\n };\n\n // Unshift should *always* be something directly out of read()\n Readable.prototype.unshift = function (chunk) {\n var state = this._readableState;\n return readableAddChunk(this, state, chunk, '', true);\n };\n\n Readable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n };\n\n function readableAddChunk(stream, state, chunk, encoding, addToFront) {\n var er = chunkInvalid(state, chunk);\n if (er) {\n stream.emit('error', er);\n } else if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (state.ended && !addToFront) {\n var e = new Error('stream.push() after EOF');\n stream.emit('error', e);\n } else if (state.endEmitted && addToFront) {\n var _e = new Error('stream.unshift() after end event');\n stream.emit('error', _e);\n } else {\n var skipAdd;\n if (state.decoder && !addToFront && !encoding) {\n chunk = state.decoder.write(chunk);\n skipAdd = !state.objectMode && chunk.length === 0;\n }\n\n if (!addToFront) state.reading = false;\n\n // Don't add to the buffer if we've decoded to an empty string chunk and\n // we're not in object mode\n if (!skipAdd) {\n // if we want the data now, just emit it.\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n\n if (state.needReadable) emitReadable(stream);\n }\n }\n\n maybeReadMore(stream, state);\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n\n return needMoreData(state);\n }\n\n // if it's past the high water mark, we can push in some more.\n // Also, if we have no data yet, we can stand some\n // more bytes. This is to work around cases where hwm=0,\n // such as the repl. Also, if the push() triggered a\n // readable event, and the user called read(largeNumber) such that\n // needReadable was set, then we ought to push more, so that another\n // 'readable' event will be triggered.\n function needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n }\n\n // backwards compatibility.\n Readable.prototype.setEncoding = function (enc) {\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n };\n\n // Don't raise the hwm > 8MB\n var MAX_HWM = 0x800000;\n function computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n return n;\n }\n\n // This function is designed to be inlinable, so please take care when making\n // changes to the function body.\n function howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n }\n // If we're asking for more than the current hwm, then raise the hwm.\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n;\n // Don't have enough\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n return state.length;\n }\n\n // you can override either this method, or the async _read(n) below.\n Readable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n\n if (n !== 0) state.emittedReadable = false;\n\n // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state);\n\n // if we've ended, and we're now clear, then finish it up.\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n }\n\n // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n\n // if we need a readable event, then we need to do some reading.\n var doRead = state.needReadable;\n debug('need readable', doRead);\n\n // if we currently have less than the highWaterMark, then also read some\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n }\n\n // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true;\n // if the length is currently zero, then we *need* a readable event.\n if (state.length === 0) state.needReadable = true;\n // call internal read method\n this._read(state.highWaterMark);\n state.sync = false;\n // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true;\n\n // If we tried to read() past the EOF, then emit end on the next tick.\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n\n return ret;\n };\n\n function chunkInvalid(state, chunk) {\n var er = null;\n if (!isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n return er;\n }\n\n function onEofChunk(stream, state) {\n if (state.ended) return;\n if (state.decoder) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n state.ended = true;\n\n // emit 'readable' now to make sure it gets picked up.\n emitReadable(stream);\n }\n\n // Don't emit readable right away in sync mode, because this can trigger\n // another read() call => stack overflow. This way, it might trigger\n // a nextTick recursion warning, but that's not so bad.\n function emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n }\n\n function emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n }\n\n // at this point, the user has presumably seen the 'readable' event,\n // and called read() to consume some data. that may have triggered\n // in turn another _read(n) call, in which case reading = true if\n // it's in progress.\n // However, if we're not ended, or reading, and the length < hwm,\n // then go ahead and try to read some more preemptively.\n function maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n nextTick(maybeReadMore_, stream, state);\n }\n }\n\n function maybeReadMore_(stream, state) {\n var len = state.length;\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length)\n // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n state.readingMore = false;\n }\n\n // abstract method. to be overridden in specific implementation classes.\n // call cb(er, data) where data is <= n in length.\n // for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n // arbitrary, and perhaps not very meaningful.\n Readable.prototype._read = function (n) {\n this.emit('error', new Error('not implemented'));\n };\n\n Readable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n default:\n state.pipes.push(dest);\n break;\n }\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n\n var doEnd = (!pipeOpts || pipeOpts.end !== false);\n\n var endFn = doEnd ? onend : cleanup;\n if (state.endEmitted) nextTick(endFn);else src.once('end', endFn);\n\n dest.on('unpipe', onunpipe);\n function onunpipe(readable) {\n debug('onunpipe');\n if (readable === src) {\n cleanup();\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n }\n\n // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n\n var cleanedUp = false;\n function cleanup() {\n debug('cleanup');\n // cleanup event handlers once the pipe is broken\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', cleanup);\n src.removeListener('data', ondata);\n\n cleanedUp = true;\n\n // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n }\n\n // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n src.pause();\n }\n }\n\n // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (listenerCount$1(dest, 'error') === 0) dest.emit('error', er);\n }\n\n // Make sure our error handler is attached before userland ones.\n prependListener(dest, 'error', onerror);\n\n // Both close and finish should trigger unpipe, but only once.\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n dest.once('close', onclose);\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n }\n\n // tell the dest that it's being piped to\n dest.emit('pipe', src);\n\n // start the flow if it hasn't been started already.\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n };\n\n function pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n if (state.awaitDrain === 0 && src.listeners('data').length) {\n state.flowing = true;\n flow(src);\n }\n };\n }\n\n Readable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n\n // if we're not piping anywhere, then do nothing.\n if (state.pipesCount === 0) return this;\n\n // just one destination. most common case.\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n\n if (!dest) dest = state.pipes;\n\n // got a match.\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this);\n return this;\n }\n\n // slow case. multiple pipe destinations.\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var _i = 0; _i < len; _i++) {\n dests[_i].emit('unpipe', this);\n }return this;\n }\n\n // try to find the right one.\n var i = indexOf(state.pipes, dest);\n if (i === -1) return this;\n\n state.pipes.splice(i, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n\n dest.emit('unpipe', this);\n\n return this;\n };\n\n // set up data events if they are asked for\n // Ensure readable listeners eventually get something\n Readable.prototype.on = function (ev, fn) {\n var res = EventEmitter.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n if (!state.reading) {\n nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this, state);\n }\n }\n }\n\n return res;\n };\n Readable.prototype.addListener = Readable.prototype.on;\n\n function nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n }\n\n // pause() and resume() are remnants of the legacy readable stream API\n // If the user uses them, then switch into old mode.\n Readable.prototype.resume = function () {\n var state = this._readableState;\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n return this;\n };\n\n function resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n nextTick(resume_, stream, state);\n }\n }\n\n function resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n }\n\n Readable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n return this;\n };\n\n function flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n while (state.flowing && stream.read() !== null) {}\n }\n\n // wrap an old-style stream as the async data source.\n // This is *not* part of the readable stream interface.\n // It is an ugly unfortunate mess of history.\n Readable.prototype.wrap = function (stream) {\n var state = this._readableState;\n var paused = false;\n\n var self = this;\n stream.on('end', function () {\n debug('wrapped end');\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) self.push(chunk);\n }\n\n self.push(null);\n });\n\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk);\n\n // don't skip over falsy values in objectMode\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = self.push(chunk);\n if (!ret) {\n paused = true;\n stream.pause();\n }\n });\n\n // proxy all the other methods.\n // important when wrapping filters and duplexes.\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n }\n\n // proxy certain important events.\n var events = ['error', 'close', 'destroy', 'pause', 'resume'];\n forEach(events, function (ev) {\n stream.on(ev, self.emit.bind(self, ev));\n });\n\n // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n self._read = function (n) {\n debug('wrapped _read', n);\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return self;\n };\n\n // exposed for testing purposes only.\n Readable._fromList = fromList;\n\n // Pluck off n bytes from an array of buffers.\n // Length is the combined lengths of all the buffers in the list.\n // This function is designed to be inlinable, so please take care when making\n // changes to the function body.\n function fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n\n return ret;\n }\n\n // Extracts only enough buffered data to satisfy the amount requested.\n // This function is designed to be inlinable, so please take care when making\n // changes to the function body.\n function fromListPartial(n, list, hasStrings) {\n var ret;\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n return ret;\n }\n\n // Copies a specified amount of characters from the list of buffered data\n // chunks.\n // This function is designed to be inlinable, so please take care when making\n // changes to the function body.\n function copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n }\n\n // Copies a specified amount of bytes from the list of buffered data chunks.\n // This function is designed to be inlinable, so please take care when making\n // changes to the function body.\n function copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n break;\n }\n ++c;\n }\n list.length -= c;\n return ret;\n }\n\n function endReadable(stream) {\n var state = stream._readableState;\n\n // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n nextTick(endReadableNT, state, stream);\n }\n }\n\n function endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n }\n\n function forEach(xs, f) {\n for (var i = 0, l = xs.length; i < l; i++) {\n f(xs[i], i);\n }\n }\n\n function indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n return -1;\n }\n\n // A bit simpler than readable streams.\n Writable.WritableState = WritableState;\n inherits$1(Writable, EventEmitter);\n\n function nop() {}\n\n function WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n }\n\n function WritableState(options, stream) {\n Object.defineProperty(this, 'buffer', {\n get: deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')\n });\n options = options || {};\n\n // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n this.objectMode = !!options.objectMode;\n\n if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;\n\n // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n var hwm = options.highWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;\n\n // cast to ints.\n this.highWaterMark = ~ ~this.highWaterMark;\n\n this.needDrain = false;\n // at the start of calling end()\n this.ending = false;\n // when end() has been called, and returned\n this.ended = false;\n // when 'finish' is emitted\n this.finished = false;\n\n // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode;\n\n // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n this.defaultEncoding = options.defaultEncoding || 'utf8';\n\n // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n this.length = 0;\n\n // a flag to see when we're in the middle of a write.\n this.writing = false;\n\n // when true all writes will be buffered until .uncork() call\n this.corked = 0;\n\n // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n this.sync = true;\n\n // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n this.bufferProcessing = false;\n\n // the callback that's passed to _write(chunk,cb)\n this.onwrite = function (er) {\n onwrite(stream, er);\n };\n\n // the callback that the user supplies to write(chunk,encoding,cb)\n this.writecb = null;\n\n // the amount that is being written when _write is called.\n this.writelen = 0;\n\n this.bufferedRequest = null;\n this.lastBufferedRequest = null;\n\n // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n this.pendingcb = 0;\n\n // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n this.prefinished = false;\n\n // True if the error was already emitted and should not be thrown again\n this.errorEmitted = false;\n\n // count buffered requests\n this.bufferedRequestCount = 0;\n\n // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n this.corkedRequestsFree = new CorkedRequest(this);\n }\n\n WritableState.prototype.getBuffer = function writableStateGetBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n while (current) {\n out.push(current);\n current = current.next;\n }\n return out;\n };\n function Writable(options) {\n\n // Writable ctor is applied to Duplexes, though they're not\n // instanceof Writable, they're instanceof Readable.\n if (!(this instanceof Writable) && !(this instanceof Duplex)) return new Writable(options);\n\n this._writableState = new WritableState(options, this);\n\n // legacy.\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n\n if (typeof options.writev === 'function') this._writev = options.writev;\n }\n\n EventEmitter.call(this);\n }\n\n // Otherwise people can pipe Writable streams, which is just wrong.\n Writable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n };\n\n function writeAfterEnd(stream, cb) {\n var er = new Error('write after end');\n // TODO: defer error events consistently everywhere, not just the cb\n stream.emit('error', er);\n nextTick(cb, er);\n }\n\n // If we get something that is not a buffer, string, null, or undefined,\n // and we're not in objectMode, then that's an error.\n // Otherwise stream chunks are all considered to be of length=1, and the\n // watermarks determine how many objects to keep in the buffer, rather than\n // how many bytes or characters.\n function validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n // Always throw error if a null is written\n // if we are not in object mode then throw\n // if it is not a buffer, string, or undefined.\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n if (er) {\n stream.emit('error', er);\n nextTick(cb, er);\n valid = false;\n }\n return valid;\n }\n\n Writable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n\n if (typeof cb !== 'function') cb = nop;\n\n if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, chunk, encoding, cb);\n }\n\n return ret;\n };\n\n Writable.prototype.cork = function () {\n var state = this._writableState;\n\n state.corked++;\n };\n\n Writable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n };\n\n Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n };\n\n function decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n return chunk;\n }\n\n // if we're already writing something, then just put this\n // in the queue, and wait our turn. Otherwise, call _write\n // If we return false, then we need a drain event, so set that flag.\n function writeOrBuffer(stream, state, chunk, encoding, cb) {\n chunk = decodeChunk(state, chunk, encoding);\n\n if (Buffer.isBuffer(chunk)) encoding = 'buffer';\n var len = state.objectMode ? 1 : chunk.length;\n\n state.length += len;\n\n var ret = state.length < state.highWaterMark;\n // we must ensure that previous needDrain will not be reset to false.\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n }\n\n function doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n }\n\n function onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n if (sync) nextTick(cb, er);else cb(er);\n\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n }\n\n function onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n }\n\n function onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n\n onwriteStateUpdate(state);\n\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /*<replacement>*/\n nextTick(afterWrite, stream, state, finished, cb);\n /*</replacement>*/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n }\n\n function afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n }\n\n // Must force callback to be called on nextTick, so that we don't\n // emit 'drain' before the write() consumer gets the 'false' return\n // value, and has a chance to attach a 'drain' listener.\n function onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n }\n\n // if there's something in the buffer waiting, then process it\n function clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n\n var count = 0;\n while (entry) {\n buffer[count] = entry;\n entry = entry.next;\n count += 1;\n }\n\n doWrite(stream, state, true, state.length, buffer, '', holder.finish);\n\n // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n state.pendingcb++;\n state.lastBufferedRequest = null;\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequestCount = 0;\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n }\n\n Writable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('not implemented'));\n };\n\n Writable.prototype._writev = null;\n\n Writable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);\n\n // .end() fully uncorks\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n }\n\n // ignore unnecessary end() calls.\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n };\n\n function needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n }\n\n function prefinish(stream, state) {\n if (!state.prefinished) {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n\n function finishMaybe(stream, state) {\n var need = needFinish(state);\n if (need) {\n if (state.pendingcb === 0) {\n prefinish(stream, state);\n state.finished = true;\n stream.emit('finish');\n } else {\n prefinish(stream, state);\n }\n }\n return need;\n }\n\n function endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n if (cb) {\n if (state.finished) nextTick(cb);else stream.once('finish', cb);\n }\n state.ended = true;\n stream.writable = false;\n }\n\n // It seems a linked list but it is not\n // there will be only 2 of these for each stream\n function CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function (err) {\n var entry = _this.entry;\n _this.entry = null;\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = _this;\n } else {\n state.corkedRequestsFree = _this;\n }\n };\n }\n\n inherits$1(Duplex, Readable);\n\n var keys = Object.keys(Writable.prototype);\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n function Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n\n Readable.call(this, options);\n Writable.call(this, options);\n\n if (options && options.readable === false) this.readable = false;\n\n if (options && options.writable === false) this.writable = false;\n\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n\n this.once('end', onend);\n }\n\n // the no-half-open enforcer\n function onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return;\n\n // no more data can be written.\n // But allow more writes to happen in this tick.\n nextTick(onEndNT, this);\n }\n\n function onEndNT(self) {\n self.end();\n }\n\n // a transform stream is a readable/writable stream where you do\n inherits$1(Transform, Duplex);\n\n function TransformState(stream) {\n this.afterTransform = function (er, data) {\n return afterTransform(stream, er, data);\n };\n\n this.needTransform = false;\n this.transforming = false;\n this.writecb = null;\n this.writechunk = null;\n this.writeencoding = null;\n }\n\n function afterTransform(stream, er, data) {\n var ts = stream._transformState;\n ts.transforming = false;\n\n var cb = ts.writecb;\n\n if (!cb) return stream.emit('error', new Error('no writecb in Transform class'));\n\n ts.writechunk = null;\n ts.writecb = null;\n\n if (data !== null && data !== undefined) stream.push(data);\n\n cb(er);\n\n var rs = stream._readableState;\n rs.reading = false;\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n stream._read(rs.highWaterMark);\n }\n }\n function Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n\n Duplex.call(this, options);\n\n this._transformState = new TransformState(this);\n\n // when the writable side finishes, then flush out anything remaining.\n var stream = this;\n\n // start out asking for a readable event once data is transformed.\n this._readableState.needReadable = true;\n\n // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n\n if (typeof options.flush === 'function') this._flush = options.flush;\n }\n\n this.once('prefinish', function () {\n if (typeof this._flush === 'function') this._flush(function (er) {\n done(stream, er);\n });else done(stream);\n });\n }\n\n Transform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n };\n\n // This is the part where you do stuff!\n // override this function in implementation classes.\n // 'chunk' is an input chunk.\n //\n // Call `push(newChunk)` to pass along transformed output\n // to the readable side. You may call 'push' zero or more times.\n //\n // Call `cb(err)` when you are done with this chunk. If you pass\n // an error, then that'll put the hurt on the whole operation. If you\n // never call cb(), then you'll never get another chunk.\n Transform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('Not implemented');\n };\n\n Transform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n };\n\n // Doesn't matter what the args are here.\n // _transform does all the work.\n // That we got here means that the readable side wants more data.\n Transform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n };\n\n function done(stream, er) {\n if (er) return stream.emit('error', er);\n\n // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n var ws = stream._writableState;\n var ts = stream._transformState;\n\n if (ws.length) throw new Error('Calling transform done when ws.length != 0');\n\n if (ts.transforming) throw new Error('Calling transform done when still transforming');\n\n return stream.push(null);\n }\n\n inherits$1(PassThrough, Transform);\n function PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n\n Transform.call(this, options);\n }\n\n PassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n };\n\n inherits$1(Stream, EventEmitter);\n Stream.Readable = Readable;\n Stream.Writable = Writable;\n Stream.Duplex = Duplex;\n Stream.Transform = Transform;\n Stream.PassThrough = PassThrough;\n\n // Backwards-compat with node 0.4.x\n Stream.Stream = Stream;\n\n // old-style streams. Note that the pipe method (the only relevant\n // part of this class) is overridden in the Readable class.\n\n function Stream() {\n EventEmitter.call(this);\n }\n\n Stream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EventEmitter.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n };\n\n function _typeof(obj) {\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\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n }\n\n function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }\n\n /*\n The MIT License (MIT)\n\n Copyright (c) 2016 CoderPuppy\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n */\n var _endianness;\n function endianness() {\n if (typeof _endianness === 'undefined') {\n var a = new ArrayBuffer(2);\n var b = new Uint8Array(a);\n var c = new Uint16Array(a);\n b[0] = 1;\n b[1] = 2;\n if (c[0] === 258) {\n _endianness = 'BE';\n } else if (c[0] === 513){\n _endianness = 'LE';\n } else {\n throw new Error('unable to figure out endianess');\n }\n }\n return _endianness;\n }\n\n function hostname() {\n if (typeof global$1.location !== 'undefined') {\n return global$1.location.hostname\n } else return '';\n }\n\n function loadavg() {\n return [];\n }\n\n function uptime$1() {\n return 0;\n }\n\n function freemem() {\n return Number.MAX_VALUE;\n }\n\n function totalmem() {\n return Number.MAX_VALUE;\n }\n\n function cpus() {\n return [];\n }\n\n function type() {\n return 'Browser';\n }\n\n function release$1 () {\n if (typeof global$1.navigator !== 'undefined') {\n return global$1.navigator.appVersion;\n }\n return '';\n }\n\n function networkInterfaces(){}\n function getNetworkInterfaces(){}\n\n function tmpDir() {\n return '/tmp';\n }\n var tmpdir = tmpDir;\n\n var EOL = '\\n';\n var os = {\n EOL: EOL,\n tmpdir: tmpdir,\n tmpDir: tmpDir,\n networkInterfaces:networkInterfaces,\n getNetworkInterfaces: getNetworkInterfaces,\n release: release$1,\n type: type,\n cpus: cpus,\n totalmem: totalmem,\n freemem: freemem,\n uptime: uptime$1,\n loadavg: loadavg,\n hostname: hostname,\n endianness: endianness,\n };\n\n var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n /**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n /** Used as the `TypeError` message for \"Functions\" methods. */\n var FUNC_ERROR_TEXT = 'Expected a function';\n\n /** Used to stand-in for `undefined` hash values. */\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n /** Used as references for various `Number` constants. */\n var INFINITY = 1 / 0;\n\n /** `Object#toString` result references. */\n var funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n /** Used to match property names within property paths. */\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n /**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n /** Used to match backslashes in property paths. */\n var reEscapeChar = /\\\\(\\\\)?/g;\n\n /** Used to detect host constructors (Safari). */\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n /** Detect free variable `global` from Node.js. */\n var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;\n\n /** Detect free variable `self`. */\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n /** Used as a reference to the global object. */\n var root = freeGlobal || freeSelf || Function('return this')();\n\n /**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n function getValue(object, key) {\n return object == null ? undefined : object[key];\n }\n\n /**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\n function isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n }\n\n /** Used for built-in method references. */\n var arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n /** Used to detect overreaching core-js shims. */\n var coreJsData = root['__core-js_shared__'];\n\n /** Used to detect methods masquerading as native. */\n var maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n }());\n\n /** Used to resolve the decompiled source of functions. */\n var funcToString = funcProto.toString;\n\n /** Used to check objects for own properties. */\n var hasOwnProperty$1 = objectProto.hasOwnProperty;\n\n /**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n var objectToString$1 = objectProto.toString;\n\n /** Used to detect if a method is native. */\n var reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty$1).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n );\n\n /** Built-in value references. */\n var Symbol$1 = root.Symbol,\n splice = arrayProto.splice;\n\n /* Built-in method references that are verified to be native. */\n var Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n /** Used to convert symbols to primitives and strings. */\n var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n /**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n function hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n }\n\n /**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n }\n\n /**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty$1.call(data, key) ? data[key] : undefined;\n }\n\n /**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty$1.call(data, key);\n }\n\n /**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n function hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n }\n\n // Add methods to `Hash`.\n Hash.prototype.clear = hashClear;\n Hash.prototype['delete'] = hashDelete;\n Hash.prototype.get = hashGet;\n Hash.prototype.has = hashHas;\n Hash.prototype.set = hashSet;\n\n /**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n function listCacheClear() {\n this.__data__ = [];\n }\n\n /**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n }\n\n /**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n }\n\n /**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n }\n\n /**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n function listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n }\n\n // Add methods to `ListCache`.\n ListCache.prototype.clear = listCacheClear;\n ListCache.prototype['delete'] = listCacheDelete;\n ListCache.prototype.get = listCacheGet;\n ListCache.prototype.has = listCacheHas;\n ListCache.prototype.set = listCacheSet;\n\n /**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n function MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n }\n\n /**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n function mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n }\n\n /**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n function mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n }\n\n /**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n function mapCacheGet(key) {\n return getMapData(this, key).get(key);\n }\n\n /**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n function mapCacheHas(key) {\n return getMapData(this, key).has(key);\n }\n\n /**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n function mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n }\n\n // Add methods to `MapCache`.\n MapCache.prototype.clear = mapCacheClear;\n MapCache.prototype['delete'] = mapCacheDelete;\n MapCache.prototype.get = mapCacheGet;\n MapCache.prototype.has = mapCacheHas;\n MapCache.prototype.set = mapCacheSet;\n\n /**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n function assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n }\n\n /**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n function baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n }\n\n /**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n function baseIsNative(value) {\n if (!isObject$1(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction$1(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n }\n\n /**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n function baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\n function castPath(value) {\n return isArray$2(value) ? value : stringToPath(value);\n }\n\n /**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n function getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n }\n\n /**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n function getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n }\n\n /**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n function isKey(value, object) {\n if (isArray$2(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n }\n\n /**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n function isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n }\n\n /**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n function isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n }\n\n /**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n var stringToPath = memoize(function(string) {\n string = toString$1(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n });\n\n /**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n function toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n }\n\n /**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\n function toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n }\n\n /**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n function memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n }\n\n // Assign cache to `_.memoize`.\n memoize.Cache = MapCache;\n\n /**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n function eq(value, other) {\n return value === other || (value !== value && other !== other);\n }\n\n /**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n var isArray$2 = Array.isArray;\n\n /**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n function isFunction$1(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject$1(value) ? objectToString$1.call(value) : '';\n return tag == funcTag || tag == genTag;\n }\n\n /**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n function isObject$1(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n }\n\n /**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n function isObjectLike(value) {\n return !!value && typeof value == 'object';\n }\n\n /**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n function isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString$1.call(value) == symbolTag);\n }\n\n /**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n function toString$1(value) {\n return value == null ? '' : baseToString(value);\n }\n\n /**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n function get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n }\n\n var lodash_get = get;\n\n function getProp(obj, path, defaultValue) {\n return obj[path] === undefined || obj[path] === null ? defaultValue : obj[path];\n }\n\n function setProp(obj, path, value) {\n var pathArray = Array.isArray(path) ? path : path.split('.');\n var key = pathArray[0];\n var newValue = pathArray.length > 1 ? setProp(obj[key] || {}, pathArray.slice(1), value) : value;\n return Object.assign({}, obj, _defineProperty({}, key, newValue));\n }\n\n function flattenReducer(acc, arr) {\n try {\n // This is faster but susceptible to `RangeError: Maximum call stack size exceeded`\n acc.push.apply(acc, _toConsumableArray(arr));\n return acc;\n } catch (err) {\n // Fallback to a slower but safer option\n return acc.concat(arr);\n }\n }\n\n function fastJoin(arr, separator) {\n var isFirst = true;\n return arr.reduce(function (acc, elem) {\n if (elem === null || elem === undefined) {\n elem = '';\n }\n\n if (isFirst) {\n isFirst = false;\n return \"\".concat(elem);\n }\n\n return \"\".concat(acc).concat(separator).concat(elem);\n }, '');\n }\n\n var utils = {\n getProp: getProp,\n setProp: setProp,\n fastJoin: fastJoin,\n flattenReducer: flattenReducer\n };\n\n var getProp$1 = utils.getProp,\n setProp$1 = utils.setProp,\n fastJoin$1 = utils.fastJoin,\n flattenReducer$1 = utils.flattenReducer;\n\n var JSON2CSVBase =\n /*#__PURE__*/\n function () {\n function JSON2CSVBase(opts) {\n _classCallCheck(this, JSON2CSVBase);\n\n this.opts = this.preprocessOpts(opts);\n this.preprocessRow = this.memoizePreprocessRow();\n }\n /**\n * Check passing opts and set defaults.\n *\n * @param {Json2CsvOptions} opts Options object containing fields,\n * delimiter, default value, quote mark, header, etc.\n */\n\n\n _createClass(JSON2CSVBase, [{\n key: \"preprocessOpts\",\n value: function preprocessOpts(opts) {\n var processedOpts = Object.assign({}, opts);\n processedOpts.unwind = !Array.isArray(processedOpts.unwind) ? processedOpts.unwind ? [processedOpts.unwind] : [] : processedOpts.unwind;\n processedOpts.delimiter = processedOpts.delimiter || ',';\n processedOpts.flattenSeparator = processedOpts.flattenSeparator || '.';\n processedOpts.eol = processedOpts.eol || os.EOL;\n processedOpts.quote = typeof processedOpts.quote === 'string' ? opts.quote : '\"';\n processedOpts.doubleQuote = typeof processedOpts.doubleQuote === 'string' ? processedOpts.doubleQuote : processedOpts.quote + processedOpts.quote;\n processedOpts.header = processedOpts.header !== false;\n processedOpts.includeEmptyRows = processedOpts.includeEmptyRows || false;\n processedOpts.withBOM = processedOpts.withBOM || false;\n return processedOpts;\n }\n /**\n * Check and normalize the fields configuration.\n *\n * @param {(string|object)[]} fields Fields configuration provided by the user\n * or inferred from the data\n * @returns {object[]} preprocessed FieldsInfo array\n */\n\n }, {\n key: \"preprocessFieldsInfo\",\n value: function preprocessFieldsInfo(fields) {\n var _this = this;\n\n return fields.map(function (fieldInfo) {\n if (typeof fieldInfo === 'string') {\n return {\n label: fieldInfo,\n value: fieldInfo.includes('.') || fieldInfo.includes('[') ? function (row) {\n return lodash_get(row, fieldInfo, _this.opts.defaultValue);\n } : function (row) {\n return getProp$1(row, fieldInfo, _this.opts.defaultValue);\n },\n stringify: true\n };\n }\n\n if (_typeof(fieldInfo) === 'object') {\n var defaultValue = 'default' in fieldInfo ? fieldInfo.default : _this.opts.defaultValue;\n\n if (typeof fieldInfo.value === 'string') {\n return {\n label: fieldInfo.label || fieldInfo.value,\n value: fieldInfo.value.includes('.') || fieldInfo.value.includes('[') ? function (row) {\n return lodash_get(row, fieldInfo.value, defaultValue);\n } : function (row) {\n return getProp$1(row, fieldInfo.value, defaultValue);\n },\n stringify: fieldInfo.stringify !== undefined ? fieldInfo.stringify : true\n };\n }\n\n if (typeof fieldInfo.value === 'function') {\n var label = fieldInfo.label || fieldInfo.value.name || '';\n var field = {\n label: label,\n default: defaultValue\n };\n return {\n label: label,\n value: function value(row) {\n var value = fieldInfo.value(row, field);\n return value === null || value === undefined ? defaultValue : value;\n },\n stringify: fieldInfo.stringify !== undefined ? fieldInfo.stringify : true\n };\n }\n }\n\n throw new Error('Invalid field info option. ' + JSON.stringify(fieldInfo));\n });\n }\n /**\n * Create the title row with all the provided fields as column headings\n *\n * @returns {String} titles as a string\n */\n\n }, {\n key: \"getHeader\",\n value: function getHeader() {\n var _this2 = this;\n\n return fastJoin$1(this.opts.fields.map(function (fieldInfo) {\n return _this2.processValue(fieldInfo.label, true);\n }), this.opts.delimiter);\n }\n }, {\n key: \"memoizePreprocessRow\",\n value: function memoizePreprocessRow() {\n if (this.opts.unwind && this.opts.unwind.length) {\n if (this.opts.flatten) {\n return function (row) {\n var _this3 = this;\n\n return this.unwindData(row, this.opts.unwind).map(function (row) {\n return _this3.flatten(row, _this3.opts.flattenSeparator);\n });\n };\n }\n\n return function (row) {\n return this.unwindData(row, this.opts.unwind);\n };\n }\n\n if (this.opts.flatten) {\n return function (row) {\n return [this.flatten(row, this.opts.flattenSeparator)];\n };\n }\n\n return function (row) {\n return [row];\n };\n }\n /**\n * Preprocess each object according to the give opts (unwind, flatten, etc.).\n * The actual body of the function is dynamically set on the constructor by the\n * `memoizePreprocessRow` method after parsing the options.\n *\n * @param {Object} row JSON object to be converted in a CSV row\n */\n\n }, {\n key: \"preprocessRow\",\n value: function preprocessRow() {}\n /**\n * Create the content of a specific CSV row\n *\n * @param {Object} row JSON object to be converted in a CSV row\n * @returns {String} CSV string (row)\n */\n\n }, {\n key: \"processRow\",\n value: function processRow(row) {\n var _this4 = this;\n\n if (!row) {\n return undefined;\n }\n\n var processedRow = this.opts.fields.map(function (fieldInfo) {\n return _this4.processCell(row, fieldInfo);\n });\n\n if (!this.opts.includeEmptyRows && processedRow.every(function (field) {\n return field === undefined;\n })) {\n return undefined;\n }\n\n return fastJoin$1(processedRow, this.opts.delimiter);\n }\n /**\n * Create the content of a specfic CSV row cell\n *\n * @param {Object} row JSON object representing the CSV row that the cell belongs to\n * @param {FieldInfo} fieldInfo Details of the field to process to be a CSV cell\n * @returns {String} CSV string (cell)\n */\n\n }, {\n key: \"processCell\",\n value: function processCell(row, fieldInfo) {\n return this.processValue(fieldInfo.value(row), fieldInfo.stringify);\n }\n /**\n * Create the content of a specfic CSV row cell\n *\n * @param {Any} value Value to be included in a CSV cell\n * @param {Boolean} stringify Details of the field to process to be a CSV cell\n * @returns {String} Value stringified and processed\n */\n\n }, {\n key: \"processValue\",\n value: function processValue(value, stringify) {\n if (value === null || value === undefined) {\n return undefined;\n }\n\n var valueType = _typeof(value);\n\n if (valueType !== 'boolean' && valueType !== 'number' && valueType !== 'string') {\n value = JSON.stringify(value);\n\n if (value === undefined) {\n return undefined;\n }\n\n if (value[0] === '\"') {\n value = value.replace(/^\"(.+)\"$/, '$1');\n }\n }\n\n if (typeof value === 'string') {\n if (value.includes(this.opts.quote)) {\n value = value.replace(new RegExp(this.opts.quote, 'g'), this.opts.doubleQuote);\n } // This should probably be remove together with the whole strignify option\n\n\n if (stringify) {\n value = \"\".concat(this.opts.quote).concat(value).concat(this.opts.quote);\n } else {\n value = value.replace(new RegExp(\"^\".concat(this.opts.doubleQuote)), this.opts.quote).replace(new RegExp(\"\".concat(this.opts.doubleQuote, \"$\")), this.opts.quote);\n }\n\n if (this.opts.excelStrings) {\n value = \"\\\"=\\\"\".concat(value, \"\\\"\\\"\");\n }\n }\n\n return value;\n }\n /**\n * Performs the flattening of a data row recursively\n *\n * @param {Object} dataRow Original JSON object\n * @param {String} separator Separator to be used as the flattened field name\n * @returns {Object} Flattened object\n */\n\n }, {\n key: \"flatten\",\n value: function flatten(dataRow, separator) {\n function step(obj, flatDataRow, currentPath) {\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n var newPath = currentPath ? \"\".concat(currentPath).concat(separator).concat(key) : key;\n\n if (_typeof(value) !== 'object' || value === null || Array.isArray(value) || Object.prototype.toString.call(value.toJSON) === '[object Function]' || !Object.keys(value).length) {\n flatDataRow[newPath] = value;\n return;\n }\n\n step(value, flatDataRow, newPath);\n });\n return flatDataRow;\n }\n\n return step(dataRow, {});\n }\n /**\n * Performs the unwind recursively in specified sequence\n *\n * @param {Object} dataRow Original JSON object\n * @param {String[]} unwindPaths The paths as strings to be used to deconstruct the array\n * @returns {Array} Array of objects containing all rows after unwind of chosen paths\n */\n\n }, {\n key: \"unwindData\",\n value: function unwindData(dataRow, unwindPaths) {\n var _this5 = this;\n\n var unwind = function unwind(rows, unwindPath) {\n return rows.map(function (row) {\n var unwindArray = lodash_get(row, unwindPath);\n\n if (!Array.isArray(unwindArray)) {\n return row;\n }\n\n if (!unwindArray.length) {\n return setProp$1(row, unwindPath, undefined);\n }\n\n return unwindArray.map(function (unwindRow, index) {\n var clonedRow = _this5.opts.unwindBlank && index > 0 ? {} : row;\n return setProp$1(clonedRow, unwindPath, unwindRow);\n });\n }).reduce(flattenReducer$1, []);\n };\n\n return unwindPaths.reduce(unwind, [dataRow]);\n }\n }]);\n\n return JSON2CSVBase;\n }();\n\n var JSON2CSVBase_1 = JSON2CSVBase;\n\n var fastJoin$2 = utils.fastJoin,\n flattenReducer$2 = utils.flattenReducer;\n\n var JSON2CSVParser =\n /*#__PURE__*/\n function (_JSON2CSVBase) {\n _inherits(JSON2CSVParser, _JSON2CSVBase);\n\n function JSON2CSVParser(opts) {\n var _this;\n\n _classCallCheck(this, JSON2CSVParser);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(JSON2CSVParser).call(this, opts));\n\n if (_this.opts.fields) {\n _this.opts.fields = _this.preprocessFieldsInfo(_this.opts.fields);\n }\n\n return _this;\n }\n /**\n * Main function that converts json to csv.\n *\n * @param {Array|Object} data Array of JSON objects to be converted to CSV\n * @returns {String} The CSV formated data as a string\n */\n\n\n _createClass(JSON2CSVParser, [{\n key: \"parse\",\n value: function parse(data) {\n var processedData = this.preprocessData(data);\n\n if (!this.opts.fields) {\n this.opts.fields = processedData.reduce(function (fields, item) {\n Object.keys(item).forEach(function (field) {\n if (!fields.includes(field)) {\n fields.push(field);\n }\n });\n return fields;\n }, []);\n this.opts.fields = this.preprocessFieldsInfo(this.opts.fields);\n }\n\n var header = this.opts.header ? this.getHeader() : '';\n var rows = this.processData(processedData);\n var csv = (this.opts.withBOM ? \"\\uFEFF\" : '') + header + (header && rows ? this.opts.eol : '') + rows;\n return csv;\n }\n /**\n * Preprocess the data according to the give opts (unwind, flatten, etc.)\n and calculate the fields and field names if they are not provided.\n *\n * @param {Array|Object} data Array or object to be converted to CSV\n */\n\n }, {\n key: \"preprocessData\",\n value: function preprocessData(data) {\n var _this2 = this;\n\n var processedData = Array.isArray(data) ? data : [data];\n\n if (!this.opts.fields && (processedData.length === 0 || _typeof(processedData[0]) !== 'object')) {\n throw new Error('Data should not be empty or the \"fields\" option should be included');\n }\n\n if ((!this.opts.unwind || !this.opts.unwind.length) && !this.opts.flatten) {\n return processedData;\n }\n\n return processedData.map(function (row) {\n return _this2.preprocessRow(row);\n }).reduce(flattenReducer$2, []);\n }\n /**\n * Create the content row by row below the header\n *\n * @param {Array} data Array of JSON objects to be converted to CSV\n * @returns {String} CSV string (body)\n */\n\n }, {\n key: \"processData\",\n value: function processData(data) {\n var _this3 = this;\n\n return fastJoin$2(data.map(function (row) {\n return _this3.processRow(row);\n }).filter(function (row) {\n return row;\n }), // Filter empty rows\n this.opts.eol);\n }\n }]);\n\n return JSON2CSVParser;\n }(JSON2CSVBase_1);\n\n var JSON2CSVParser_1 = JSON2CSVParser;\n\n /*global Buffer*/\n // Named constants with unique integer values\n var C = {};\n // Tokens\n var LEFT_BRACE = C.LEFT_BRACE = 0x1;\n var RIGHT_BRACE = C.RIGHT_BRACE = 0x2;\n var LEFT_BRACKET = C.LEFT_BRACKET = 0x3;\n var RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4;\n var COLON = C.COLON = 0x5;\n var COMMA = C.COMMA = 0x6;\n var TRUE = C.TRUE = 0x7;\n var FALSE = C.FALSE = 0x8;\n var NULL = C.NULL = 0x9;\n var STRING = C.STRING = 0xa;\n var NUMBER = C.NUMBER = 0xb;\n // Tokenizer States\n var START = C.START = 0x11;\n var STOP = C.STOP = 0x12;\n var TRUE1 = C.TRUE1 = 0x21;\n var TRUE2 = C.TRUE2 = 0x22;\n var TRUE3 = C.TRUE3 = 0x23;\n var FALSE1 = C.FALSE1 = 0x31;\n var FALSE2 = C.FALSE2 = 0x32;\n var FALSE3 = C.FALSE3 = 0x33;\n var FALSE4 = C.FALSE4 = 0x34;\n var NULL1 = C.NULL1 = 0x41;\n var NULL2 = C.NULL2 = 0x42;\n var NULL3 = C.NULL3 = 0x43;\n var NUMBER1 = C.NUMBER1 = 0x51;\n var NUMBER3 = C.NUMBER3 = 0x53;\n var STRING1 = C.STRING1 = 0x61;\n var STRING2 = C.STRING2 = 0x62;\n var STRING3 = C.STRING3 = 0x63;\n var STRING4 = C.STRING4 = 0x64;\n var STRING5 = C.STRING5 = 0x65;\n var STRING6 = C.STRING6 = 0x66;\n // Parser States\n var VALUE = C.VALUE = 0x71;\n var KEY = C.KEY = 0x72;\n // Parser Modes\n var OBJECT = C.OBJECT = 0x81;\n var ARRAY = C.ARRAY = 0x82;\n // Character constants\n var BACK_SLASH = \"\\\\\".charCodeAt(0);\n var FORWARD_SLASH = \"\\/\".charCodeAt(0);\n var BACKSPACE = \"\\b\".charCodeAt(0);\n var FORM_FEED = \"\\f\".charCodeAt(0);\n var NEWLINE = \"\\n\".charCodeAt(0);\n var CARRIAGE_RETURN = \"\\r\".charCodeAt(0);\n var TAB = \"\\t\".charCodeAt(0);\n\n var STRING_BUFFER_SIZE = 64 * 1024;\n\n function Parser() {\n this.tState = START;\n this.value = undefined;\n\n this.string = undefined; // string data\n this.stringBuffer = Buffer.alloc ? Buffer.alloc(STRING_BUFFER_SIZE) : new Buffer(STRING_BUFFER_SIZE);\n this.stringBufferOffset = 0;\n this.unicode = undefined; // unicode escapes\n this.highSurrogate = undefined;\n\n this.key = undefined;\n this.mode = undefined;\n this.stack = [];\n this.state = VALUE;\n this.bytes_remaining = 0; // number of bytes remaining in multi byte utf8 char to read after split boundary\n this.bytes_in_sequence = 0; // bytes in multi byte utf8 char to read\n this.temp_buffs = { \"2\": new Buffer(2), \"3\": new Buffer(3), \"4\": new Buffer(4) }; // for rebuilding chars split before boundary is reached\n\n // Stream offset\n this.offset = -1;\n }\n\n // Slow code to string converter (only used when throwing syntax errors)\n Parser.toknam = function (code) {\n var keys = Object.keys(C);\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n if (C[key] === code) { return key; }\n }\n return code && (\"0x\" + code.toString(16));\n };\n\n var proto = Parser.prototype;\n proto.onError = function (err) { throw err; };\n proto.charError = function (buffer, i) {\n this.tState = STOP;\n this.onError(new Error(\"Unexpected \" + JSON.stringify(String.fromCharCode(buffer[i])) + \" at position \" + i + \" in state \" + Parser.toknam(this.tState)));\n };\n proto.appendStringChar = function (char) {\n if (this.stringBufferOffset >= STRING_BUFFER_SIZE) {\n this.string += this.stringBuffer.toString('utf8');\n this.stringBufferOffset = 0;\n }\n\n this.stringBuffer[this.stringBufferOffset++] = char;\n };\n proto.appendStringBuf = function (buf, start, end) {\n var size = buf.length;\n if (typeof start === 'number') {\n if (typeof end === 'number') {\n if (end < 0) {\n // adding a negative end decreeses the size\n size = buf.length - start + end;\n } else {\n size = end - start;\n }\n } else {\n size = buf.length - start;\n }\n }\n\n if (size < 0) {\n size = 0;\n }\n\n if (this.stringBufferOffset + size > STRING_BUFFER_SIZE) {\n this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);\n this.stringBufferOffset = 0;\n }\n\n buf.copy(this.stringBuffer, this.stringBufferOffset, start, end);\n this.stringBufferOffset += size;\n };\n proto.write = function (buffer) {\n if (typeof buffer === \"string\") buffer = new Buffer(buffer);\n var n;\n for (var i = 0, l = buffer.length; i < l; i++) {\n if (this.tState === START){\n n = buffer[i];\n this.offset++;\n if(n === 0x7b){ this.onToken(LEFT_BRACE, \"{\"); // {\n }else if(n === 0x7d){ this.onToken(RIGHT_BRACE, \"}\"); // }\n }else if(n === 0x5b){ this.onToken(LEFT_BRACKET, \"[\"); // [\n }else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, \"]\"); // ]\n }else if(n === 0x3a){ this.onToken(COLON, \":\"); // :\n }else if(n === 0x2c){ this.onToken(COMMA, \",\"); // ,\n }else if(n === 0x74){ this.tState = TRUE1; // t\n }else if(n === 0x66){ this.tState = FALSE1; // f\n }else if(n === 0x6e){ this.tState = NULL1; // n\n }else if(n === 0x22){ // \"\n this.string = \"\";\n this.stringBufferOffset = 0;\n this.tState = STRING1;\n }else if(n === 0x2d){ this.string = \"-\"; this.tState = NUMBER1; // -\n }else{\n if (n >= 0x30 && n < 0x40) { // 1-9\n this.string = String.fromCharCode(n); this.tState = NUMBER3;\n } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) ; else {\n return this.charError(buffer, i);\n }\n }\n }else if (this.tState === STRING1){ // After open quote\n n = buffer[i]; // get current byte from buffer\n // check for carry over of a multi byte char split between data chunks\n // & fill temp buffer it with start of this data chunk up to the boundary limit set in the last iteration\n if (this.bytes_remaining > 0) {\n for (var j = 0; j < this.bytes_remaining; j++) {\n this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + j] = buffer[j];\n }\n\n this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]);\n this.bytes_in_sequence = this.bytes_remaining = 0;\n i = i + j - 1;\n } else if (this.bytes_remaining === 0 && n >= 128) { // else if no remainder bytes carried over, parse multi byte (>=128) chars one at a time\n if (n <= 193 || n > 244) {\n return this.onError(new Error(\"Invalid UTF-8 character at position \" + i + \" in state \" + Parser.toknam(this.tState)));\n }\n if ((n >= 194) && (n <= 223)) this.bytes_in_sequence = 2;\n if ((n >= 224) && (n <= 239)) this.bytes_in_sequence = 3;\n if ((n >= 240) && (n <= 244)) this.bytes_in_sequence = 4;\n if ((this.bytes_in_sequence + i) > buffer.length) { // if bytes needed to complete char fall outside buffer length, we have a boundary split\n for (var k = 0; k <= (buffer.length - 1 - i); k++) {\n this.temp_buffs[this.bytes_in_sequence][k] = buffer[i + k]; // fill temp buffer of correct size with bytes available in this chunk\n }\n this.bytes_remaining = (i + this.bytes_in_sequence) - buffer.length;\n i = buffer.length - 1;\n } else {\n this.appendStringBuf(buffer, i, i + this.bytes_in_sequence);\n i = i + this.bytes_in_sequence - 1;\n }\n } else if (n === 0x22) {\n this.tState = START;\n this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);\n this.stringBufferOffset = 0;\n this.onToken(STRING, this.string);\n this.offset += Buffer.byteLength(this.string, 'utf8') + 1;\n this.string = undefined;\n }\n else if (n === 0x5c) {\n this.tState = STRING2;\n }\n else if (n >= 0x20) { this.appendStringChar(n); }\n else {\n return this.charError(buffer, i);\n }\n }else if (this.tState === STRING2){ // After backslash\n n = buffer[i];\n if(n === 0x22){ this.appendStringChar(n); this.tState = STRING1;\n }else if(n === 0x5c){ this.appendStringChar(BACK_SLASH); this.tState = STRING1;\n }else if(n === 0x2f){ this.appendStringChar(FORWARD_SLASH); this.tState = STRING1;\n }else if(n === 0x62){ this.appendStringChar(BACKSPACE); this.tState = STRING1;\n }else if(n === 0x66){ this.appendStringChar(FORM_FEED); this.tState = STRING1;\n }else if(n === 0x6e){ this.appendStringChar(NEWLINE); this.tState = STRING1;\n }else if(n === 0x72){ this.appendStringChar(CARRIAGE_RETURN); this.tState = STRING1;\n }else if(n === 0x74){ this.appendStringChar(TAB); this.tState = STRING1;\n }else if(n === 0x75){ this.unicode = \"\"; this.tState = STRING3;\n }else{\n return this.charError(buffer, i);\n }\n }else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes\n n = buffer[i];\n // 0-9 A-F a-f\n if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) {\n this.unicode += String.fromCharCode(n);\n if (this.tState++ === STRING6) {\n var intVal = parseInt(this.unicode, 16);\n this.unicode = undefined;\n if (this.highSurrogate !== undefined && intVal >= 0xDC00 && intVal < (0xDFFF + 1)) { //<56320,57343> - lowSurrogate\n this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate, intVal)));\n this.highSurrogate = undefined;\n } else if (this.highSurrogate === undefined && intVal >= 0xD800 && intVal < (0xDBFF + 1)) { //<55296,56319> - highSurrogate\n this.highSurrogate = intVal;\n } else {\n if (this.highSurrogate !== undefined) {\n this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate)));\n this.highSurrogate = undefined;\n }\n this.appendStringBuf(new Buffer(String.fromCharCode(intVal)));\n }\n this.tState = STRING1;\n }\n } else {\n return this.charError(buffer, i);\n }\n } else if (this.tState === NUMBER1 || this.tState === NUMBER3) {\n n = buffer[i];\n\n switch (n) {\n case 0x30: // 0\n case 0x31: // 1\n case 0x32: // 2\n case 0x33: // 3\n case 0x34: // 4\n case 0x35: // 5\n case 0x36: // 6\n case 0x37: // 7\n case 0x38: // 8\n case 0x39: // 9\n case 0x2e: // .\n case 0x65: // e\n case 0x45: // E\n case 0x2b: // +\n case 0x2d: // -\n this.string += String.fromCharCode(n);\n this.tState = NUMBER3;\n break;\n default:\n this.tState = START;\n var result = Number(this.string);\n\n if (isNaN(result)){\n return this.charError(buffer, i);\n }\n\n if ((this.string.match(/[0-9]+/) == this.string) && (result.toString() != this.string)) {\n // Long string of digits which is an ID string and not valid and/or safe JavaScript integer Number\n this.onToken(STRING, this.string);\n } else {\n this.onToken(NUMBER, result);\n }\n\n this.offset += this.string.length - 1;\n this.string = undefined;\n i--;\n break;\n }\n }else if (this.tState === TRUE1){ // r\n if (buffer[i] === 0x72) { this.tState = TRUE2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === TRUE2){ // u\n if (buffer[i] === 0x75) { this.tState = TRUE3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === TRUE3){ // e\n if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); this.offset+= 3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE1){ // a\n if (buffer[i] === 0x61) { this.tState = FALSE2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE2){ // l\n if (buffer[i] === 0x6c) { this.tState = FALSE3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE3){ // s\n if (buffer[i] === 0x73) { this.tState = FALSE4; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE4){ // e\n if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); this.offset+= 4; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL1){ // u\n if (buffer[i] === 0x75) { this.tState = NULL2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL2){ // l\n if (buffer[i] === 0x6c) { this.tState = NULL3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL3){ // l\n if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); this.offset += 3; }\n else { return this.charError(buffer, i); }\n }\n }\n };\n proto.onToken = function (token, value) {\n // Override this to get events\n };\n\n proto.parseError = function (token, value) {\n this.tState = STOP;\n this.onError(new Error(\"Unexpected \" + Parser.toknam(token) + (value ? (\"(\" + JSON.stringify(value) + \")\") : \"\") + \" in state \" + Parser.toknam(this.state)));\n };\n proto.push = function () {\n this.stack.push({value: this.value, key: this.key, mode: this.mode});\n };\n proto.pop = function () {\n var value = this.value;\n var parent = this.stack.pop();\n this.value = parent.value;\n this.key = parent.key;\n this.mode = parent.mode;\n this.emit(value);\n if (!this.mode) { this.state = VALUE; }\n };\n proto.emit = function (value) {\n if (this.mode) { this.state = COMMA; }\n this.onValue(value);\n };\n proto.onValue = function (value) {\n // Override me\n };\n proto.onToken = function (token, value) {\n if(this.state === VALUE){\n if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){\n if (this.value) {\n this.value[this.key] = value;\n }\n this.emit(value);\n }else if(token === LEFT_BRACE){\n this.push();\n if (this.value) {\n this.value = this.value[this.key] = {};\n } else {\n this.value = {};\n }\n this.key = undefined;\n this.state = KEY;\n this.mode = OBJECT;\n }else if(token === LEFT_BRACKET){\n this.push();\n if (this.value) {\n this.value = this.value[this.key] = [];\n } else {\n this.value = [];\n }\n this.key = 0;\n this.mode = ARRAY;\n this.state = VALUE;\n }else if(token === RIGHT_BRACE){\n if (this.mode === OBJECT) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else if(token === RIGHT_BRACKET){\n if (this.mode === ARRAY) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else{\n return this.parseError(token, value);\n }\n }else if(this.state === KEY){\n if (token === STRING) {\n this.key = value;\n this.state = COLON;\n } else if (token === RIGHT_BRACE) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else if(this.state === COLON){\n if (token === COLON) { this.state = VALUE; }\n else { return this.parseError(token, value); }\n }else if(this.state === COMMA){\n if (token === COMMA) {\n if (this.mode === ARRAY) { this.key++; this.state = VALUE; }\n else if (this.mode === OBJECT) { this.state = KEY; }\n\n } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else{\n return this.parseError(token, value);\n }\n };\n\n Parser.C = C;\n\n var jsonparse = Parser;\n\n var Transform$1 = Stream.Transform;\n\n var JSON2CSVTransform =\n /*#__PURE__*/\n function (_Transform) {\n _inherits(JSON2CSVTransform, _Transform);\n\n function JSON2CSVTransform(opts, transformOpts) {\n var _this;\n\n _classCallCheck(this, JSON2CSVTransform);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(JSON2CSVTransform).call(this, transformOpts)); // Inherit methods from JSON2CSVBase since extends doesn't\n // allow multiple inheritance and manually preprocess opts\n\n Object.getOwnPropertyNames(JSON2CSVBase_1.prototype).forEach(function (key) {\n return _this[key] = JSON2CSVBase_1.prototype[key];\n });\n _this.opts = _this.preprocessOpts(opts);\n _this.preprocessRow = _this.memoizePreprocessRow();\n _this._data = '';\n _this._hasWritten = false;\n\n if (_this._readableState.objectMode) {\n _this.initObjectModeParse();\n } else if (_this.opts.ndjson) {\n _this.initNDJSONParse();\n } else {\n _this.initJSONParser();\n }\n\n if (_this.opts.withBOM) {\n _this.push(\"\\uFEFF\");\n }\n\n if (_this.opts.fields) {\n _this.opts.fields = _this.preprocessFieldsInfo(_this.opts.fields);\n\n _this.pushHeader();\n }\n\n return _this;\n }\n /**\n * Init the transform with a parser to process data in object mode.\n * It receives JSON objects one by one and send them to `pushLine for processing.\n */\n\n\n _createClass(JSON2CSVTransform, [{\n key: \"initObjectModeParse\",\n value: function initObjectModeParse() {\n var transform = this;\n this.parser = {\n write: function write(line) {\n transform.pushLine(line);\n },\n getPendingData: function getPendingData() {\n return undefined;\n }\n };\n }\n /**\n * Init the transform with a parser to process NDJSON data.\n * It maintains a buffer of received data, parses each line\n * as JSON and send it to `pushLine for processing.\n */\n\n }, {\n key: \"initNDJSONParse\",\n value: function initNDJSONParse() {\n var transform = this;\n this.parser = {\n _data: '',\n write: function write(chunk) {\n this._data += chunk.toString();\n\n var lines = this._data.split('\\n').map(function (line) {\n return line.trim();\n }).filter(function (line) {\n return line !== '';\n });\n\n var pendingData = false;\n lines.forEach(function (line, i) {\n try {\n transform.pushLine(JSON.parse(line));\n } catch (e) {\n if (i === lines.length - 1) {\n pendingData = true;\n } else {\n e.message = 'Invalid JSON (' + line + ')';\n transform.emit('error', e);\n }\n }\n });\n this._data = pendingData ? this._data.slice(this._data.lastIndexOf('\\n')) : '';\n },\n getPendingData: function getPendingData() {\n return this._data;\n }\n };\n }\n /**\n * Init the transform with a parser to process JSON data.\n * It maintains a buffer of received data, parses each as JSON \n * item if the data is an array or the data itself otherwise\n * and send it to `pushLine` for processing.\n */\n\n }, {\n key: \"initJSONParser\",\n value: function initJSONParser() {\n var transform = this;\n this.parser = new jsonparse();\n\n this.parser.onValue = function (value) {\n if (this.stack.length !== this.depthToEmit) return;\n transform.pushLine(value);\n };\n\n this.parser._onToken = this.parser.onToken;\n\n this.parser.onToken = function (token, value) {\n transform.parser._onToken(token, value);\n\n if (this.stack.length === 0 && !transform.opts.fields && this.mode !== jsonparse.C.ARRAY && this.mode !== jsonparse.C.OBJECT) {\n this.onError(new Error('Data should not be empty or the \"fields\" option should be included'));\n }\n\n if (this.stack.length === 1) {\n if (this.depthToEmit === undefined) {\n // If Array emit its content, else emit itself\n this.depthToEmit = this.mode === jsonparse.C.ARRAY ? 1 : 0;\n }\n\n if (this.depthToEmit !== 0 && this.stack.length === 1) {\n // No need to store the whole root array in memory\n this.value = undefined;\n }\n }\n };\n\n this.parser.getPendingData = function () {\n return this.value;\n };\n\n this.parser.onError = function (err) {\n if (err.message.includes('Unexpected')) {\n err.message = 'Invalid JSON (' + err.message + ')';\n }\n\n transform.emit('error', err);\n };\n }\n /**\n * Main function that send data to the parse to be processed.\n *\n * @param {Buffer} chunk Incoming data\n * @param {String} encoding Encoding of the incoming data. Defaults to 'utf8'\n * @param {Function} done Called when the proceesing of the supplied chunk is done\n */\n\n }, {\n key: \"_transform\",\n value: function _transform(chunk, encoding, done) {\n this.parser.write(chunk);\n done();\n }\n }, {\n key: \"_flush\",\n value: function _flush(done) {\n if (this.parser.getPendingData()) {\n done(new Error('Invalid data received from stdin', this.parser.getPendingData()));\n }\n\n done();\n }\n /**\n * Generate the csv header and pushes it downstream.\n */\n\n }, {\n key: \"pushHeader\",\n value: function pushHeader() {\n if (this.opts.header) {\n var header = this.getHeader();\n this.emit('header', header);\n this.push(header);\n this._hasWritten = true;\n }\n }\n /**\n * Transforms an incoming json data to csv and pushes it downstream.\n *\n * @param {Object} data JSON object to be converted in a CSV row\n */\n\n }, {\n key: \"pushLine\",\n value: function pushLine(data) {\n var _this2 = this;\n\n var processedData = this.preprocessRow(data);\n\n if (!this._hasWritten) {\n this.opts.fields = this.opts.fields || this.preprocessFieldsInfo(Object.keys(processedData[0]));\n this.pushHeader();\n }\n\n processedData.forEach(function (row) {\n var line = _this2.processRow(row, _this2.opts);\n\n if (line === undefined) return;\n\n _this2.emit('line', line);\n\n _this2.push(_this2._hasWritten ? _this2.opts.eol + line : line);\n\n _this2._hasWritten = true;\n });\n }\n }]);\n\n return JSON2CSVTransform;\n }(Transform$1);\n\n var JSON2CSVTransform_1 = JSON2CSVTransform;\n\n var Transform$2 = Stream.Transform;\n var fastJoin$3 = utils.fastJoin;\n\n var JSON2CSVAsyncParser =\n /*#__PURE__*/\n function () {\n function JSON2CSVAsyncParser(opts, transformOpts) {\n _classCallCheck(this, JSON2CSVAsyncParser);\n\n this.input = new Transform$2(transformOpts);\n\n this.input._read = function () {};\n\n this.transform = new JSON2CSVTransform_1(opts, transformOpts);\n this.processor = this.input.pipe(this.transform);\n }\n\n _createClass(JSON2CSVAsyncParser, [{\n key: \"fromInput\",\n value: function fromInput(input) {\n if (this._input) {\n throw new Error('Async parser already has an input.');\n }\n\n this._input = input;\n this.input = this._input.pipe(this.processor);\n return this;\n }\n }, {\n key: \"throughTransform\",\n value: function throughTransform(transform) {\n if (this._output) {\n throw new Error('Can\\'t add transforms once an output has been added.');\n }\n\n this.processor = this.processor.pipe(transform);\n return this;\n }\n }, {\n key: \"toOutput\",\n value: function toOutput(output) {\n if (this._output) {\n throw new Error('Async parser already has an output.');\n }\n\n this._output = output;\n this.processor = this.processor.pipe(output);\n return this;\n }\n }, {\n key: \"promise\",\n value: function promise() {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n var csvBuffer = [];\n\n _this.processor.on('data', function (chunk) {\n return csvBuffer.push(chunk.toString());\n }).on('finish', function () {\n return resolve(fastJoin$3(csvBuffer, ''));\n }).on('error', function (err) {\n return reject(err);\n });\n });\n }\n }]);\n\n return JSON2CSVAsyncParser;\n }();\n\n var JSON2CSVAsyncParser_1 = JSON2CSVAsyncParser;\n\n var Readable$1 = Stream.Readable;\n var Parser$1 = JSON2CSVParser_1;\n var AsyncParser = JSON2CSVAsyncParser_1;\n var Transform$3 = JSON2CSVTransform_1; // Convenience method to keep the API similar to version 3.X\n\n var parse = function parse(data, opts) {\n return new JSON2CSVParser_1(opts).parse(data);\n };\n\n var parseAsync = function parseAsync(data, opts, transformOpts) {\n try {\n if (!(data instanceof Readable$1)) {\n transformOpts = Object.assign({}, transformOpts, {\n objectMode: true\n });\n }\n\n var asyncParser = new JSON2CSVAsyncParser_1(opts, transformOpts);\n var promise = asyncParser.promise();\n\n if (Array.isArray(data)) {\n data.forEach(function (item) {\n return asyncParser.input.push(item);\n });\n asyncParser.input.push(null);\n } else if (data instanceof Readable$1) {\n asyncParser.fromInput(data);\n } else {\n asyncParser.input.push(data);\n asyncParser.input.push(null);\n }\n\n return promise;\n } catch (err) {\n return Promise.reject(err);\n }\n };\n\n var json2csv = {\n Parser: Parser$1,\n AsyncParser: AsyncParser,\n Transform: Transform$3,\n parse: parse,\n parseAsync: parseAsync\n };\n\n exports.default = json2csv;\n exports.Parser = Parser$1;\n exports.AsyncParser = AsyncParser;\n exports.Transform = Transform$3;\n exports.parse = parse;\n exports.parseAsync = parseAsync;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","'use strict';\n\nvar RBush = require('rbush');\nvar Queue = require('tinyqueue');\nvar pointInPolygon = require('point-in-polygon');\nvar orient = require('robust-predicates/umd/orient2d.min.js').orient2d;\n\n// Fix for require issue in webpack https://github.com/mapbox/concaveman/issues/18\nif (Queue.default) {\n Queue = Queue.default;\n}\n\nmodule.exports = concaveman;\nmodule.exports.default = concaveman;\n\nfunction concaveman(points, concavity, lengthThreshold) {\n // a relative measure of concavity; higher value means simpler hull\n concavity = Math.max(0, concavity === undefined ? 2 : concavity);\n\n // when a segment goes below this length threshold, it won't be drilled down further\n lengthThreshold = lengthThreshold || 0;\n\n // start with a convex hull of the points\n var hull = fastConvexHull(points);\n\n // index the points with an R-tree\n var tree = new RBush(16);\n tree.toBBox = function (a) {\n return {\n minX: a[0],\n minY: a[1],\n maxX: a[0],\n maxY: a[1]\n };\n };\n tree.compareMinX = function (a, b) { return a[0] - b[0]; };\n tree.compareMinY = function (a, b) { return a[1] - b[1]; };\n\n tree.load(points);\n\n // turn the convex hull into a linked list and populate the initial edge queue with the nodes\n var queue = [];\n for (var i = 0, last; i < hull.length; i++) {\n var p = hull[i];\n tree.remove(p);\n last = insertNode(p, last);\n queue.push(last);\n }\n\n // index the segments with an R-tree (for intersection checks)\n var segTree = new RBush(16);\n for (i = 0; i < queue.length; i++) segTree.insert(updateBBox(queue[i]));\n\n var sqConcavity = concavity * concavity;\n var sqLenThreshold = lengthThreshold * lengthThreshold;\n\n // process edges one by one\n while (queue.length) {\n var node = queue.shift();\n var a = node.p;\n var b = node.next.p;\n\n // skip the edge if it's already short enough\n var sqLen = getSqDist(a, b);\n if (sqLen < sqLenThreshold) continue;\n\n var maxSqLen = sqLen / sqConcavity;\n\n // find the best connection point for the current edge to flex inward to\n p = findCandidate(tree, node.prev.p, a, b, node.next.next.p, maxSqLen, segTree);\n\n // if we found a connection and it satisfies our concavity measure\n if (p && Math.min(getSqDist(p, a), getSqDist(p, b)) <= maxSqLen) {\n // connect the edge endpoints through this point and add 2 new edges to the queue\n queue.push(node);\n queue.push(insertNode(p, node));\n\n // update point and segment indexes\n tree.remove(p);\n segTree.remove(node);\n segTree.insert(updateBBox(node));\n segTree.insert(updateBBox(node.next));\n }\n }\n\n // convert the resulting hull linked list to an array of points\n node = last;\n var concave = [];\n do {\n concave.push(node.p);\n node = node.next;\n } while (node !== last);\n\n concave.push(node.p);\n\n return concave;\n}\n\nfunction findCandidate(tree, a, b, c, d, maxDist, segTree) {\n var queue = new Queue([], compareDist);\n var node = tree.data;\n\n // search through the point R-tree with a depth-first search using a priority queue\n // in the order of distance to the edge (b, c)\n while (node) {\n for (var i = 0; i < node.children.length; i++) {\n var child = node.children[i];\n\n var dist = node.leaf ? sqSegDist(child, b, c) : sqSegBoxDist(b, c, child);\n if (dist > maxDist) continue; // skip the node if it's farther than we ever need\n\n queue.push({\n node: child,\n dist: dist\n });\n }\n\n while (queue.length && !queue.peek().node.children) {\n var item = queue.pop();\n var p = item.node;\n\n // skip all points that are as close to adjacent edges (a,b) and (c,d),\n // and points that would introduce self-intersections when connected\n var d0 = sqSegDist(p, a, b);\n var d1 = sqSegDist(p, c, d);\n if (item.dist < d0 && item.dist < d1 &&\n noIntersections(b, p, segTree) &&\n noIntersections(c, p, segTree)) return p;\n }\n\n node = queue.pop();\n if (node) node = node.node;\n }\n\n return null;\n}\n\nfunction compareDist(a, b) {\n return a.dist - b.dist;\n}\n\n// square distance from a segment bounding box to the given one\nfunction sqSegBoxDist(a, b, bbox) {\n if (inside(a, bbox) || inside(b, bbox)) return 0;\n var d1 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.minX, bbox.minY, bbox.maxX, bbox.minY);\n if (d1 === 0) return 0;\n var d2 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.minX, bbox.minY, bbox.minX, bbox.maxY);\n if (d2 === 0) return 0;\n var d3 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.maxX, bbox.minY, bbox.maxX, bbox.maxY);\n if (d3 === 0) return 0;\n var d4 = sqSegSegDist(a[0], a[1], b[0], b[1], bbox.minX, bbox.maxY, bbox.maxX, bbox.maxY);\n if (d4 === 0) return 0;\n return Math.min(d1, d2, d3, d4);\n}\n\nfunction inside(a, bbox) {\n return a[0] >= bbox.minX &&\n a[0] <= bbox.maxX &&\n a[1] >= bbox.minY &&\n a[1] <= bbox.maxY;\n}\n\n// check if the edge (a,b) doesn't intersect any other edges\nfunction noIntersections(a, b, segTree) {\n var minX = Math.min(a[0], b[0]);\n var minY = Math.min(a[1], b[1]);\n var maxX = Math.max(a[0], b[0]);\n var maxY = Math.max(a[1], b[1]);\n\n var edges = segTree.search({minX: minX, minY: minY, maxX: maxX, maxY: maxY});\n for (var i = 0; i < edges.length; i++) {\n if (intersects(edges[i].p, edges[i].next.p, a, b)) return false;\n }\n return true;\n}\n\nfunction cross(p1, p2, p3) {\n return orient(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\n// check if the edges (p1,q1) and (p2,q2) intersect\nfunction intersects(p1, q1, p2, q2) {\n return p1 !== q2 && q1 !== p2 &&\n cross(p1, q1, p2) > 0 !== cross(p1, q1, q2) > 0 &&\n cross(p2, q2, p1) > 0 !== cross(p2, q2, q1) > 0;\n}\n\n// update the bounding box of a node's edge\nfunction updateBBox(node) {\n var p1 = node.p;\n var p2 = node.next.p;\n node.minX = Math.min(p1[0], p2[0]);\n node.minY = Math.min(p1[1], p2[1]);\n node.maxX = Math.max(p1[0], p2[0]);\n node.maxY = Math.max(p1[1], p2[1]);\n return node;\n}\n\n// speed up convex hull by filtering out points inside quadrilateral formed by 4 extreme points\nfunction fastConvexHull(points) {\n var left = points[0];\n var top = points[0];\n var right = points[0];\n var bottom = points[0];\n\n // find the leftmost, rightmost, topmost and bottommost points\n for (var i = 0; i < points.length; i++) {\n var p = points[i];\n if (p[0] < left[0]) left = p;\n if (p[0] > right[0]) right = p;\n if (p[1] < top[1]) top = p;\n if (p[1] > bottom[1]) bottom = p;\n }\n\n // filter out points that are inside the resulting quadrilateral\n var cull = [left, top, right, bottom];\n var filtered = cull.slice();\n for (i = 0; i < points.length; i++) {\n if (!pointInPolygon(points[i], cull)) filtered.push(points[i]);\n }\n\n // get convex hull around the filtered points\n return convexHull(filtered);\n}\n\n// create a new node in a doubly linked list\nfunction insertNode(p, prev) {\n var node = {\n p: p,\n prev: null,\n next: null,\n minX: 0,\n minY: 0,\n maxX: 0,\n maxY: 0\n };\n\n if (!prev) {\n node.prev = node;\n node.next = node;\n\n } else {\n node.next = prev.next;\n node.prev = prev;\n prev.next.prev = node;\n prev.next = node;\n }\n return node;\n}\n\n// square distance between 2 points\nfunction getSqDist(p1, p2) {\n\n var dx = p1[0] - p2[0],\n dy = p1[1] - p2[1];\n\n return dx * dx + dy * dy;\n}\n\n// square distance from a point to a segment\nfunction sqSegDist(p, p1, p2) {\n\n var x = p1[0],\n y = p1[1],\n dx = p2[0] - x,\n dy = p2[1] - y;\n\n if (dx !== 0 || dy !== 0) {\n\n var t = ((p[0] - x) * dx + (p[1] - y) * dy) / (dx * dx + dy * dy);\n\n if (t > 1) {\n x = p2[0];\n y = p2[1];\n\n } else if (t > 0) {\n x += dx * t;\n y += dy * t;\n }\n }\n\n dx = p[0] - x;\n dy = p[1] - y;\n\n return dx * dx + dy * dy;\n}\n\n// segment to segment distance, ported from http://geomalgorithms.com/a07-_distance.html by Dan Sunday\nfunction sqSegSegDist(x0, y0, x1, y1, x2, y2, x3, y3) {\n var ux = x1 - x0;\n var uy = y1 - y0;\n var vx = x3 - x2;\n var vy = y3 - y2;\n var wx = x0 - x2;\n var wy = y0 - y2;\n var a = ux * ux + uy * uy;\n var b = ux * vx + uy * vy;\n var c = vx * vx + vy * vy;\n var d = ux * wx + uy * wy;\n var e = vx * wx + vy * wy;\n var D = a * c - b * b;\n\n var sc, sN, tc, tN;\n var sD = D;\n var tD = D;\n\n if (D === 0) {\n sN = 0;\n sD = 1;\n tN = e;\n tD = c;\n } else {\n sN = b * e - c * d;\n tN = a * e - b * d;\n if (sN < 0) {\n sN = 0;\n tN = e;\n tD = c;\n } else if (sN > sD) {\n sN = sD;\n tN = e + b;\n tD = c;\n }\n }\n\n if (tN < 0.0) {\n tN = 0.0;\n if (-d < 0.0) sN = 0.0;\n else if (-d > a) sN = sD;\n else {\n sN = -d;\n sD = a;\n }\n } else if (tN > tD) {\n tN = tD;\n if ((-d + b) < 0.0) sN = 0;\n else if (-d + b > a) sN = sD;\n else {\n sN = -d + b;\n sD = a;\n }\n }\n\n sc = sN === 0 ? 0 : sN / sD;\n tc = tN === 0 ? 0 : tN / tD;\n\n var cx = (1 - sc) * x0 + sc * x1;\n var cy = (1 - sc) * y0 + sc * y1;\n var cx2 = (1 - tc) * x2 + tc * x3;\n var cy2 = (1 - tc) * y2 + tc * y3;\n var dx = cx2 - cx;\n var dy = cy2 - cy;\n\n return dx * dx + dy * dy;\n}\n\nfunction compareByX(a, b) {\n return a[0] === b[0] ? a[1] - b[1] : a[0] - b[0];\n}\n\nfunction convexHull(points) {\n points.sort(compareByX);\n\n var lower = [];\n for (var i = 0; i < points.length; i++) {\n while (lower.length >= 2 && cross(lower[lower.length - 2], lower[lower.length - 1], points[i]) <= 0) {\n lower.pop();\n }\n lower.push(points[i]);\n }\n\n var upper = [];\n for (var ii = points.length - 1; ii >= 0; ii--) {\n while (upper.length >= 2 && cross(upper[upper.length - 2], upper[upper.length - 1], points[ii]) <= 0) {\n upper.pop();\n }\n upper.push(points[ii]);\n }\n\n upper.pop();\n lower.pop();\n return lower.concat(upper);\n}\n","export class InternMap extends Map {\n constructor(entries, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (entries != null) for (const [key, value] of entries) this.set(key, value);\n }\n get(key) {\n return super.get(intern_get(this, key));\n }\n has(key) {\n return super.has(intern_get(this, key));\n }\n set(key, value) {\n return super.set(intern_set(this, key), value);\n }\n delete(key) {\n return super.delete(intern_delete(this, key));\n }\n}\n\nexport class InternSet extends Set {\n constructor(values, key = keyof) {\n super();\n Object.defineProperties(this, {_intern: {value: new Map()}, _key: {value: key}});\n if (values != null) for (const value of values) this.add(value);\n }\n has(value) {\n return super.has(intern_get(this, value));\n }\n add(value) {\n return super.add(intern_set(this, value));\n }\n delete(value) {\n return super.delete(intern_delete(this, value));\n }\n}\n\nfunction intern_get({_intern, _key}, value) {\n const key = _key(value);\n return _intern.has(key) ? _intern.get(key) : value;\n}\n\nfunction intern_set({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) return _intern.get(key);\n _intern.set(key, value);\n return value;\n}\n\nfunction intern_delete({_intern, _key}, value) {\n const key = _key(value);\n if (_intern.has(key)) {\n value = _intern.get(key);\n _intern.delete(key);\n }\n return value;\n}\n\nfunction keyof(value) {\n return value !== null && typeof value === \"object\" ? value.valueOf() : value;\n}\n","export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n","import isBrowser from './isBrowser';\n\nconst timeoutDuration = (function(){\n const longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (let i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}());\n\nexport function microtaskDebounce(fn) {\n let called = false\n return () => {\n if (called) {\n return\n }\n called = true\n window.Promise.resolve().then(() => {\n called = false\n fn()\n })\n }\n}\n\nexport function taskDebounce(fn) {\n let scheduled = false;\n return () => {\n if (!scheduled) {\n scheduled = true;\n setTimeout(() => {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nconst supportsMicroTasks = isBrowser && window.Promise\n\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nexport default (supportsMicroTasks\n ? microtaskDebounce\n : taskDebounce);\n","/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nexport default function isFunction(functionToCheck) {\n const getType = {};\n return (\n functionToCheck &&\n getType.toString.call(functionToCheck) === '[object Function]'\n );\n}\n","/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nexport default function getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n const window = element.ownerDocument.defaultView;\n const css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n","/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nexport default function getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nexport default function getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body\n case '#document':\n return element.body\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getStyleComputedProperty(element);\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n","/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nexport default function getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n","import isBrowser from './isBrowser';\n\nconst isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nconst isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nexport default function isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nexport default function getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n const noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n let offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n const nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (\n ['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 &&\n getStyleComputedProperty(offsetParent, 'position') === 'static'\n ) {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n","/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nexport default function getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n","import isOffsetContainer from './isOffsetContainer';\nimport getRoot from './getRoot';\nimport getOffsetParent from './getOffsetParent';\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nexport default function findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n const order =\n element1.compareDocumentPosition(element2) &\n Node.DOCUMENT_POSITION_FOLLOWING;\n const start = order ? element1 : element2;\n const end = order ? element2 : element1;\n\n // Get common ancestor container\n const range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n const { commonAncestorContainer } = range;\n\n // Both nodes are inside #document\n if (\n (element1 !== commonAncestorContainer &&\n element2 !== commonAncestorContainer) ||\n start.contains(end)\n ) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n const element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n","import getOffsetParent from './getOffsetParent';\n\nexport default function isOffsetContainer(element) {\n const { nodeName } = element;\n if (nodeName === 'BODY') {\n return false;\n }\n return (\n nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element\n );\n}\n","/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nexport default function getScroll(element, side = 'top') {\n const upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n const nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n const html = element.ownerDocument.documentElement;\n const scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n","import getScroll from './getScroll';\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nexport default function includeScroll(rect, element, subtract = false) {\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n const modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n","/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nexport default function getBordersSize(styles, axis) {\n const sideA = axis === 'x' ? 'Left' : 'Top';\n const sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return (\n parseFloat(styles[`border${sideA}Width`]) +\n parseFloat(styles[`border${sideB}Width`])\n );\n}\n","import isIE from './isIE';\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(\n body[`offset${axis}`],\n body[`scroll${axis}`],\n html[`client${axis}`],\n html[`offset${axis}`],\n html[`scroll${axis}`],\n isIE(10)\n ? (parseInt(html[`offset${axis}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Top' : 'Left'}`]) + \n parseInt(computedStyle[`margin${axis === 'Height' ? 'Bottom' : 'Right'}`]))\n : 0 \n );\n}\n\nexport default function getWindowSizes(document) {\n const body = document.body;\n const html = document.documentElement;\n const computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle),\n };\n}\n","/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nexport default function getClientRect(offsets) {\n return {\n ...offsets,\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height,\n };\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getBordersSize from './getBordersSize';\nimport getWindowSizes from './getWindowSizes';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\nimport isIE from './isIE';\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nexport default function getBoundingClientRect(element) {\n let rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n const scrollTop = getScroll(element, 'top');\n const scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n }\n else {\n rect = element.getBoundingClientRect();\n }\n }\n catch(e){}\n\n const result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top,\n };\n\n // subtract scrollbar size from sizes\n const sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n const width =\n sizes.width || element.clientWidth || result.width;\n const height =\n sizes.height || element.clientHeight || result.height;\n\n let horizScrollbar = element.offsetWidth - width;\n let vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n const styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport includeScroll from './includeScroll';\nimport getScrollParent from './getScrollParent';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport runIsIE from './isIE';\nimport getClientRect from './getClientRect';\n\nexport default function getOffsetRectRelativeToArbitraryNode(children, parent, fixedPosition = false) {\n const isIE10 = runIsIE(10);\n const isHTML = parent.nodeName === 'HTML';\n const childrenRect = getBoundingClientRect(children);\n const parentRect = getBoundingClientRect(parent);\n const scrollParent = getScrollParent(children);\n\n const styles = getStyleComputedProperty(parent);\n const borderTopWidth = parseFloat(styles.borderTopWidth);\n const borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if(fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n let offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height,\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n const marginTop = parseFloat(styles.marginTop);\n const marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (\n isIE10 && !fixedPosition\n ? parent.contains(scrollParent)\n : parent === scrollParent && scrollParent.nodeName !== 'BODY'\n ) {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n","import getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getScroll from './getScroll';\nimport getClientRect from './getClientRect';\n\nexport default function getViewportOffsetRectRelativeToArtbitraryNode(element, excludeScroll = false) {\n const html = element.ownerDocument.documentElement;\n const relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n const width = Math.max(html.clientWidth, window.innerWidth || 0);\n const height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n const scrollTop = !excludeScroll ? getScroll(html) : 0;\n const scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n const offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width,\n height,\n };\n\n return getClientRect(offset);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport getParentNode from './getParentNode';\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nexport default function isFixed(element) {\n const nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n const parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n","import getStyleComputedProperty from './getStyleComputedProperty';\nimport isIE from './isIE';\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nexport default function getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n let el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n\n}\n","import getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getReferenceNode from './getReferenceNode';\nimport findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getViewportOffsetRectRelativeToArtbitraryNode from './getViewportOffsetRectRelativeToArtbitraryNode';\nimport getWindowSizes from './getWindowSizes';\nimport isFixed from './isFixed';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nexport default function getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement,\n fixedPosition = false\n) {\n // NOTE: 1 DOM access here\n\n let boundaries = { top: 0, left: 0 };\n const offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport' ) {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n }\n\n else {\n // Handle other cases based on DOM element used as boundaries\n let boundariesNode;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n const offsets = getOffsetRectRelativeToArbitraryNode(\n boundariesNode,\n offsetParent,\n fixedPosition\n );\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n const { height, width } = getWindowSizes(popper.ownerDocument);\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n const isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0; \n boundaries.top += isPaddingNumber ? padding : padding.top || 0; \n boundaries.right -= isPaddingNumber ? padding : padding.right || 0; \n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; \n\n return boundaries;\n}\n","import getBoundaries from '../utils/getBoundaries';\n\nfunction getArea({ width, height }) {\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeAutoPlacement(\n placement,\n refRect,\n popper,\n reference,\n boundariesElement,\n padding = 0\n) {\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n const boundaries = getBoundaries(\n popper,\n reference,\n padding,\n boundariesElement\n );\n\n const rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top,\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height,\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom,\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height,\n },\n };\n\n const sortedAreas = Object.keys(rects)\n .map(key => ({\n key,\n ...rects[key],\n area: getArea(rects[key]),\n }))\n .sort((a, b) => b.area - a.area);\n\n const filteredAreas = sortedAreas.filter(\n ({ width, height }) =>\n width >= popper.clientWidth && height >= popper.clientHeight\n );\n\n const computedPlacement = filteredAreas.length > 0\n ? filteredAreas[0].key\n : sortedAreas[0].key;\n\n const variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? `-${variation}` : '');\n}\n","import findCommonOffsetParent from './findCommonOffsetParent';\nimport getOffsetRectRelativeToArbitraryNode from './getOffsetRectRelativeToArbitraryNode';\nimport getFixedPositionOffsetParent from './getFixedPositionOffsetParent';\nimport getReferenceNode from './getReferenceNode';\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nexport default function getReferenceOffsets(state, popper, reference, fixedPosition = null) {\n const commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n","/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nexport default function getOuterSizes(element) {\n const window = element.ownerDocument.defaultView;\n const styles = window.getComputedStyle(element);\n const x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n const y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n const result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x,\n };\n return result;\n}\n","/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nexport default function getOppositePlacement(placement) {\n const hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, matched => hash[matched]);\n}\n","import getOuterSizes from './getOuterSizes';\nimport getOppositePlacement from './getOppositePlacement';\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nexport default function getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n const popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n const popperOffsets = {\n width: popperRect.width,\n height: popperRect.height,\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n const isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n const mainSide = isHoriz ? 'top' : 'left';\n const secondarySide = isHoriz ? 'left' : 'top';\n const measurement = isHoriz ? 'height' : 'width';\n const secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] =\n referenceOffsets[mainSide] +\n referenceOffsets[measurement] / 2 -\n popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] =\n referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] =\n referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n","/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n","import isFunction from './isFunction';\nimport findIndex from './findIndex';\nimport getClientRect from '../utils/getClientRect';\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nexport default function runModifiers(modifiers, data, ends) {\n const modifiersToRun = ends === undefined\n ? modifiers\n : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(modifier => {\n if (modifier['function']) { // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n const fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n","import find from './find';\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nexport default function findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(cur => cur[prop] === value);\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n const match = find(arr, obj => obj[prop] === value);\n return arr.indexOf(match);\n}\n","import computeAutoPlacement from '../utils/computeAutoPlacement';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.<br />\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nexport default function update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n let data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {},\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(\n this.state,\n this.popper,\n this.reference,\n this.options.positionFixed\n );\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(\n this.options.placement,\n data.offsets.reference,\n this.popper,\n this.reference,\n this.options.modifiers.flip.boundariesElement,\n this.options.modifiers.flip.padding\n );\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(\n this.popper,\n data.offsets.reference,\n data.placement\n );\n\n data.offsets.popper.position = this.options.positionFixed\n ? 'fixed'\n : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n","/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nexport default function isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(\n ({ name, enabled }) => enabled && name === modifierName\n );\n}\n","/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nexport default function getSupportedPropertyName(property) {\n const prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n const upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (let i = 0; i < prefixes.length; i++) {\n const prefix = prefixes[i];\n const toCheck = prefix ? `${prefix}${upperProp}` : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n","import isModifierEnabled from '../utils/isModifierEnabled';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nexport default function destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n","/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nexport default function getWindow(element) {\n const ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n","import getScrollParent from './getScrollParent';\nimport getWindow from './getWindow';\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n const isBody = scrollParent.nodeName === 'BODY';\n const target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(\n getScrollParent(target.parentNode),\n event,\n callback,\n scrollParents\n );\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function setupEventListeners(\n reference,\n options,\n state,\n updateBound\n) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n const scrollElement = getScrollParent(reference);\n attachToScrollParents(\n scrollElement,\n 'scroll',\n state.updateBound,\n state.scrollParents\n );\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n","import setupEventListeners from '../utils/setupEventListeners';\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nexport default function enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(\n this.reference,\n this.options,\n this.state,\n this.scheduleUpdate\n );\n }\n}\n","import removeEventListeners from '../utils/removeEventListeners';\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nexport default function disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n","import getWindow from './getWindow';\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nexport default function removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(target => {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n","/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nexport default function isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n","import isNumeric from './isNumeric';\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setStyles(element, styles) {\n Object.keys(styles).forEach(prop => {\n let unit = '';\n // add unit if the value is numeric and is one of the following\n if (\n ['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !==\n -1 &&\n isNumeric(styles[prop])\n ) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n","import getSupportedPropertyName from '../utils/getSupportedPropertyName';\nimport find from '../utils/find';\nimport getOffsetParent from '../utils/getOffsetParent';\nimport getBoundingClientRect from '../utils/getBoundingClientRect';\nimport getRoundedOffsets from '../utils/getRoundedOffsets';\nimport isBrowser from '../utils/isBrowser';\n\nconst isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function computeStyle(data, options) {\n const { x, y } = options;\n const { popper } = data.offsets;\n\n // Remove this legacy support in Popper.js v2\n const legacyGpuAccelerationOption = find(\n data.instance.modifiers,\n modifier => modifier.name === 'applyStyle'\n ).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn(\n 'WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'\n );\n }\n const gpuAcceleration =\n legacyGpuAccelerationOption !== undefined\n ? legacyGpuAccelerationOption\n : options.gpuAcceleration;\n\n const offsetParent = getOffsetParent(data.instance.popper);\n const offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n const styles = {\n position: popper.position,\n };\n\n const offsets = getRoundedOffsets(\n data,\n window.devicePixelRatio < 2 || !isFirefox\n );\n\n const sideA = x === 'bottom' ? 'top' : 'bottom';\n const sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n const prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n let left, top;\n if (sideA === 'bottom') {\n // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = `translate3d(${left}px, ${top}px, 0)`;\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n const invertTop = sideA === 'bottom' ? -1 : 1;\n const invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = `${sideA}, ${sideB}`;\n }\n\n // Attributes\n const attributes = {\n 'x-placement': data.placement,\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = { ...attributes, ...data.attributes };\n data.styles = { ...styles, ...data.styles };\n data.arrowStyles = { ...data.offsets.arrow, ...data.arrowStyles };\n\n return data;\n}\n","import find from './find';\n\n/**\n * Helper used to know if the given modifier depends from another one.<br />\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nexport default function isModifierRequired(\n modifiers,\n requestingName,\n requestedName\n) {\n const requesting = find(modifiers, ({ name }) => name === requestingName);\n\n const isRequired =\n !!requesting &&\n modifiers.some(modifier => {\n return (\n modifier.name === requestedName &&\n modifier.enabled &&\n modifier.order < requesting.order\n );\n });\n\n if (!isRequired) {\n const requesting = `\\`${requestingName}\\``;\n const requested = `\\`${requestedName}\\``;\n console.warn(\n `${requested} modifier is required by ${requesting} modifier in order to work, be sure to include it before ${requesting}!`\n );\n }\n return isRequired;\n}\n","/**\n * List of accepted placements to use as values of the `placement` option.<br />\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.<br />\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nexport default [\n 'auto-start',\n 'auto',\n 'auto-end',\n 'top-start',\n 'top',\n 'top-end',\n 'right-start',\n 'right',\n 'right-end',\n 'bottom-end',\n 'bottom',\n 'bottom-start',\n 'left-end',\n 'left',\n 'left-start',\n];\n","import placements from '../methods/placements';\n\n// Get rid of `auto` `auto-start` and `auto-end`\nconst validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nexport default function clockwise(placement, counter = false) {\n const index = validPlacements.indexOf(placement);\n const arr = validPlacements\n .slice(index + 1)\n .concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n","import getOppositePlacement from '../utils/getOppositePlacement';\nimport getOppositeVariation from '../utils/getOppositeVariation';\nimport getPopperOffsets from '../utils/getPopperOffsets';\nimport runModifiers from '../utils/runModifiers';\nimport getBoundaries from '../utils/getBoundaries';\nimport isModifierEnabled from '../utils/isModifierEnabled';\nimport clockwise from '../utils/clockwise';\n\nconst BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise',\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n options.boundariesElement,\n data.positionFixed\n );\n\n let placement = data.placement.split('-')[0];\n let placementOpposite = getOppositePlacement(placement);\n let variation = data.placement.split('-')[1] || '';\n\n let flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach((step, index) => {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n const popperOffsets = data.offsets.popper;\n const refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n const floor = Math.floor;\n const overlapsRef =\n (placement === 'left' &&\n floor(popperOffsets.right) > floor(refOffsets.left)) ||\n (placement === 'right' &&\n floor(popperOffsets.left) < floor(refOffsets.right)) ||\n (placement === 'top' &&\n floor(popperOffsets.bottom) > floor(refOffsets.top)) ||\n (placement === 'bottom' &&\n floor(popperOffsets.top) < floor(refOffsets.bottom));\n\n const overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n const overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n const overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n const overflowsBottom =\n floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n const overflowsBoundaries =\n (placement === 'left' && overflowsLeft) ||\n (placement === 'right' && overflowsRight) ||\n (placement === 'top' && overflowsTop) ||\n (placement === 'bottom' && overflowsBottom);\n\n // flip the variation if required\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n const flippedVariationByRef =\n !!options.flipVariations &&\n ((isVertical && variation === 'start' && overflowsLeft) ||\n (isVertical && variation === 'end' && overflowsRight) ||\n (!isVertical && variation === 'start' && overflowsTop) ||\n (!isVertical && variation === 'end' && overflowsBottom));\n\n // flips variation if popper content overflows boundaries\n const flippedVariationByContent =\n !!options.flipVariationsByContent &&\n ((isVertical && variation === 'start' && overflowsRight) ||\n (isVertical && variation === 'end' && overflowsLeft) ||\n (!isVertical && variation === 'start' && overflowsBottom) ||\n (!isVertical && variation === 'end' && overflowsTop));\n\n const flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = {\n ...data.offsets.popper,\n ...getPopperOffsets(\n data.instance.popper,\n data.offsets.reference,\n data.placement\n ),\n };\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n","import isNumeric from '../utils/isNumeric';\nimport getClientRect from '../utils/getClientRect';\nimport find from '../utils/find';\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nexport function toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n const split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n const value = +split[1];\n const unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n let element;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n const rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n let size;\n if (unit === 'vh') {\n size = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n } else {\n size = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nexport function parseOffset(\n offset,\n popperOffsets,\n referenceOffsets,\n basePlacement\n) {\n const offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n const useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n const fragments = offset.split(/(\\+|\\-)/).map(frag => frag.trim());\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n const divider = fragments.indexOf(\n find(fragments, frag => frag.search(/,|\\s/) !== -1)\n );\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn(\n 'Offsets separated by white space(s) are deprecated, use a comma (,) instead.'\n );\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n const splitRegex = /\\s*,\\s*|\\s+/;\n let ops = divider !== -1\n ? [\n fragments\n .slice(0, divider)\n .concat([fragments[divider].split(splitRegex)[0]]),\n [fragments[divider].split(splitRegex)[1]].concat(\n fragments.slice(divider + 1)\n ),\n ]\n : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map((op, index) => {\n // Most of the units rely on the orientation of the popper\n const measurement = (index === 1 ? !useHeight : useHeight)\n ? 'height'\n : 'width';\n let mergeWithPrevious = false;\n return (\n op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce((a, b) => {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(str => toValue(str, measurement, popperOffsets, referenceOffsets))\n );\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach((op, index) => {\n op.forEach((frag, index2) => {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nexport default function offset(data, { offset }) {\n const { placement, offsets: { popper, reference } } = data;\n const basePlacement = placement.split('-')[0];\n\n let offsets;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n","import applyStyle, { applyStyleOnLoad } from './applyStyle';\nimport computeStyle from './computeStyle';\nimport arrow from './arrow';\nimport flip from './flip';\nimport keepTogether from './keepTogether';\nimport offset from './offset';\nimport preventOverflow from './preventOverflow';\nimport shift from './shift';\nimport hide from './hide';\nimport inner from './inner';\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.<br />\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.<br />\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nexport default {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.<br />\n * It will read the variation of the `placement` property.<br />\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift,\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.<br />\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.<br />\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.<br />\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0,\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.<br />\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".<br />\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent',\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether,\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]',\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false,\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner,\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide,\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right',\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined,\n },\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n","import modifiers from '../modifiers/index';\n\n/**\n * Default options provided to Popper.js constructor.<br />\n * These can be overridden using the `options` argument of Popper.js.<br />\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nexport default {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.<br />\n * By default, it is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: () => {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.<br />\n * By default, it is set to no-op.<br />\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: () => {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers,\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function shift(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n const { reference, popper } = data.offsets;\n const isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n const side = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n const shiftOffsets = {\n start: { [side]: reference[side] },\n end: {\n [side]: reference[side] + reference[measurement] - popper[measurement],\n },\n };\n\n data.offsets.popper = { ...popper, ...shiftOffsets[shiftvariation] };\n }\n\n return data;\n}\n","import getOffsetParent from '../utils/getOffsetParent';\nimport getBoundaries from '../utils/getBoundaries';\nimport getSupportedPropertyName from '../utils/getSupportedPropertyName';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function preventOverflow(data, options) {\n let boundariesElement =\n options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n const transformProp = getSupportedPropertyName('transform');\n const popperStyles = data.instance.popper.style; // assignment to help minification\n const { top, left, [transformProp]: transform } = popperStyles;\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n const boundaries = getBoundaries(\n data.instance.popper,\n data.instance.reference,\n options.padding,\n boundariesElement,\n data.positionFixed\n );\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n const order = options.priority;\n let popper = data.offsets.popper;\n\n const check = {\n primary(placement) {\n let value = popper[placement];\n if (\n popper[placement] < boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return { [placement]: value };\n },\n secondary(placement) {\n const mainSide = placement === 'right' ? 'left' : 'top';\n let value = popper[mainSide];\n if (\n popper[placement] > boundaries[placement] &&\n !options.escapeWithReference\n ) {\n value = Math.min(\n popper[mainSide],\n boundaries[placement] -\n (placement === 'right' ? popper.width : popper.height)\n );\n }\n return { [mainSide]: value };\n },\n };\n\n order.forEach(placement => {\n const side =\n ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = { ...popper, ...check[side](placement) };\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n","/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function keepTogether(data) {\n const { popper, reference } = data.offsets;\n const placement = data.placement.split('-')[0];\n const floor = Math.floor;\n const isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n const side = isVertical ? 'right' : 'bottom';\n const opSide = isVertical ? 'left' : 'top';\n const measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] =\n floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOuterSizes from '../utils/getOuterSizes';\nimport isModifierRequired from '../utils/isModifierRequired';\nimport getStyleComputedProperty from '../utils/getStyleComputedProperty';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function arrow(data, options) {\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n let arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn(\n 'WARNING: `arrow.element` must be child of its popper element!'\n );\n return data;\n }\n }\n\n const placement = data.placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n const len = isVertical ? 'height' : 'width';\n const sideCapitalized = isVertical ? 'Top' : 'Left';\n const side = sideCapitalized.toLowerCase();\n const altSide = isVertical ? 'left' : 'top';\n const opSide = isVertical ? 'bottom' : 'right';\n const arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -=\n popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] +=\n reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n const center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n const css = getStyleComputedProperty(data.instance.popper);\n const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);\n const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);\n let sideValue =\n center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = {\n [side]: Math.round(sideValue),\n [altSide]: '', // make sure to unset any eventual altSide value from the DOM node\n };\n\n return data;\n}\n","/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nexport default function getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n","import getClientRect from '../utils/getClientRect';\nimport getOppositePlacement from '../utils/getOppositePlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function inner(data) {\n const placement = data.placement;\n const basePlacement = placement.split('-')[0];\n const { popper, reference } = data.offsets;\n const isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n const subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] =\n reference[basePlacement] -\n (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n","import isModifierRequired from '../utils/isModifierRequired';\nimport find from '../utils/find';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nexport default function hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n const refRect = data.offsets.reference;\n const bound = find(\n data.instance.modifiers,\n modifier => modifier.name === 'preventOverflow'\n ).boundaries;\n\n if (\n refRect.bottom < bound.top ||\n refRect.left > bound.right ||\n refRect.top > bound.bottom ||\n refRect.right < bound.left\n ) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n","/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nexport default function getRoundedOffsets(data, shouldRound) {\n const { popper, reference } = data.offsets;\n const { round, floor } = Math;\n const noRound = v => v;\n \n const referenceWidth = round(reference.width);\n const popperWidth = round(popper.width);\n \n const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n const isVariation = data.placement.indexOf('-') !== -1;\n const sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n const bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n const horizontalToInteger = !shouldRound\n ? noRound\n : isVertical || isVariation || sameWidthParity\n ? round\n : floor;\n const verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(\n bothOddWidth && !isVariation && shouldRound\n ? popper.left - 1\n : popper.left\n ),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right),\n };\n}\n","import setStyles from '../utils/setStyles';\nimport setAttributes from '../utils/setAttributes';\nimport getReferenceOffsets from '../utils/getReferenceOffsets';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nexport default function applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nexport function applyStyleOnLoad(\n reference,\n popper,\n options,\n modifierOptions,\n state\n) {\n // compute reference element offsets\n const referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n const placement = computeAutoPlacement(\n options.placement,\n referenceOffsets,\n popper,\n reference,\n options.modifiers.flip.boundariesElement,\n options.modifiers.flip.padding\n );\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n","/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nexport default function setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function(prop) {\n const value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z\"\n}), 'Settings');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z\"\n}), 'CloudDownload');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');\n\nexports.default = _default;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","var baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n baseUniq = require('./_baseUniq'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of unique values, in order, from all given arrays using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {...Array} [arrays] The arrays to inspect.\n * @returns {Array} Returns the new array of combined values.\n * @example\n *\n * _.union([2], [1, 2]);\n * // => [2, 1]\n */\nvar union = baseRest(function(arrays) {\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\n});\n\nmodule.exports = union;\n","var baseDifference = require('./_baseDifference'),\n baseFlatten = require('./_baseFlatten'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order and references of result values are\n * determined by the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\nmodule.exports = difference;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CustomPicker = exports.TwitterPicker = exports.SwatchesPicker = exports.SliderPicker = exports.SketchPicker = exports.PhotoshopPicker = exports.MaterialPicker = exports.HuePicker = exports.GithubPicker = exports.CompactPicker = exports.ChromePicker = exports.default = exports.CirclePicker = exports.BlockPicker = exports.AlphaPicker = undefined;\n\nvar _Alpha = require('./components/alpha/Alpha');\n\nObject.defineProperty(exports, 'AlphaPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Alpha).default;\n }\n});\n\nvar _Block = require('./components/block/Block');\n\nObject.defineProperty(exports, 'BlockPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Block).default;\n }\n});\n\nvar _Circle = require('./components/circle/Circle');\n\nObject.defineProperty(exports, 'CirclePicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Circle).default;\n }\n});\n\nvar _Chrome = require('./components/chrome/Chrome');\n\nObject.defineProperty(exports, 'ChromePicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Chrome).default;\n }\n});\n\nvar _Compact = require('./components/compact/Compact');\n\nObject.defineProperty(exports, 'CompactPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Compact).default;\n }\n});\n\nvar _Github = require('./components/github/Github');\n\nObject.defineProperty(exports, 'GithubPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Github).default;\n }\n});\n\nvar _Hue = require('./components/hue/Hue');\n\nObject.defineProperty(exports, 'HuePicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Hue).default;\n }\n});\n\nvar _Material = require('./components/material/Material');\n\nObject.defineProperty(exports, 'MaterialPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Material).default;\n }\n});\n\nvar _Photoshop = require('./components/photoshop/Photoshop');\n\nObject.defineProperty(exports, 'PhotoshopPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Photoshop).default;\n }\n});\n\nvar _Sketch = require('./components/sketch/Sketch');\n\nObject.defineProperty(exports, 'SketchPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Sketch).default;\n }\n});\n\nvar _Slider = require('./components/slider/Slider');\n\nObject.defineProperty(exports, 'SliderPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Slider).default;\n }\n});\n\nvar _Swatches = require('./components/swatches/Swatches');\n\nObject.defineProperty(exports, 'SwatchesPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Swatches).default;\n }\n});\n\nvar _Twitter = require('./components/twitter/Twitter');\n\nObject.defineProperty(exports, 'TwitterPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_Twitter).default;\n }\n});\n\nvar _ColorWrap = require('./components/common/ColorWrap');\n\nObject.defineProperty(exports, 'CustomPicker', {\n enumerable: true,\n get: function get() {\n return _interopRequireDefault(_ColorWrap).default;\n }\n});\n\nvar _Chrome2 = _interopRequireDefault(_Chrome);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nexports.default = _Chrome2.default;","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports['default'] = addEventListener;\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _EventObject = require('./EventObject');\n\nvar _EventObject2 = _interopRequireDefault(_EventObject);\n\nfunction addEventListener(target, eventType, callback, option) {\n function wrapCallback(e) {\n var ne = new _EventObject2['default'](e);\n callback.call(target, ne);\n }\n\n if (target.addEventListener) {\n var _ret = (function () {\n var useCapture = false;\n if (typeof option === 'object') {\n useCapture = option.capture || false;\n } else if (typeof option === 'boolean') {\n useCapture = option;\n }\n\n target.addEventListener(eventType, wrapCallback, option || false);\n\n return {\n v: {\n remove: function remove() {\n target.removeEventListener(eventType, wrapCallback, useCapture);\n }\n }\n };\n })();\n\n if (typeof _ret === 'object') return _ret.v;\n } else if (target.attachEvent) {\n target.attachEvent('on' + eventType, wrapCallback);\n return {\n remove: function remove() {\n target.detachEvent('on' + eventType, wrapCallback);\n }\n };\n }\n}\n\nmodule.exports = exports['default'];","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar bbox_1 = require(\"@turf/bbox\");\nvar boolean_point_on_line_1 = require(\"@turf/boolean-point-on-line\");\nvar boolean_point_in_polygon_1 = require(\"@turf/boolean-point-in-polygon\");\nvar invariant_1 = require(\"@turf/invariant\");\n/**\n * Boolean-within returns true if the first geometry is completely within the second geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the primary (geometry a)\n * must not intersect the exterior of the secondary (geometry b).\n * Boolean-within returns the exact opposite result of the `@turf/boolean-contains`.\n *\n * @name booleanWithin\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanWithin(point, line);\n * //=true\n */\nfunction booleanWithin(feature1, feature2) {\n var type1 = invariant_1.getType(feature1);\n var type2 = invariant_1.getType(feature2);\n var geom1 = invariant_1.getGeom(feature1);\n var geom2 = invariant_1.getGeom(feature2);\n switch (type1) {\n case 'Point':\n switch (type2) {\n case 'MultiPoint':\n return isPointInMultiPoint(geom1, geom2);\n case 'LineString':\n return boolean_point_on_line_1.default(geom1, geom2, { ignoreEndVertices: true });\n case 'Polygon':\n case 'MultiPolygon':\n return boolean_point_in_polygon_1.default(geom1, geom2, { ignoreBoundary: true });\n default:\n throw new Error('feature2 ' + type2 + ' geometry not supported');\n }\n case 'MultiPoint':\n switch (type2) {\n case 'MultiPoint':\n return isMultiPointInMultiPoint(geom1, geom2);\n case 'LineString':\n return isMultiPointOnLine(geom1, geom2);\n case 'Polygon':\n case 'MultiPolygon':\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error('feature2 ' + type2 + ' geometry not supported');\n }\n case 'LineString':\n switch (type2) {\n case 'LineString':\n return isLineOnLine(geom1, geom2);\n case 'Polygon':\n case 'MultiPolygon':\n return isLineInPoly(geom1, geom2);\n default:\n throw new Error('feature2 ' + type2 + ' geometry not supported');\n }\n case 'Polygon':\n switch (type2) {\n case 'Polygon':\n case 'MultiPolygon':\n return isPolyInPoly(geom1, geom2);\n default:\n throw new Error('feature2 ' + type2 + ' geometry not supported');\n }\n default:\n throw new Error('feature1 ' + type1 + ' geometry not supported');\n }\n}\nfunction isPointInMultiPoint(point, multiPoint) {\n var i;\n var output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], point.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\nfunction isMultiPointInMultiPoint(multiPoint1, multiPoint2) {\n for (var i = 0; i < multiPoint1.coordinates.length; i++) {\n var anyMatch = false;\n for (var i2 = 0; i2 < multiPoint2.coordinates.length; i2++) {\n if (compareCoords(multiPoint1.coordinates[i], multiPoint2.coordinates[i2])) {\n anyMatch = true;\n }\n }\n if (!anyMatch) {\n return false;\n }\n }\n return true;\n}\nfunction isMultiPointOnLine(multiPoint, lineString) {\n var foundInsidePoint = false;\n for (var i = 0; i < multiPoint.coordinates.length; i++) {\n if (!boolean_point_on_line_1.default(multiPoint.coordinates[i], lineString)) {\n return false;\n }\n if (!foundInsidePoint) {\n foundInsidePoint = boolean_point_on_line_1.default(multiPoint.coordinates[i], lineString, { ignoreEndVertices: true });\n }\n }\n return foundInsidePoint;\n}\nfunction isMultiPointInPoly(multiPoint, polygon) {\n var output = true;\n var oneInside = false;\n for (var i = 0; i < multiPoint.coordinates.length; i++) {\n var isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[1], polygon);\n if (!isInside) {\n output = false;\n break;\n }\n if (!oneInside) {\n isInside = boolean_point_in_polygon_1.default(multiPoint.coordinates[1], polygon, { ignoreBoundary: true });\n }\n }\n return output && isInside;\n}\nfunction isLineOnLine(lineString1, lineString2) {\n for (var i = 0; i < lineString1.coordinates.length; i++) {\n if (!boolean_point_on_line_1.default(lineString1.coordinates[i], lineString2)) {\n return false;\n }\n }\n return true;\n}\nfunction isLineInPoly(linestring, polygon) {\n var polyBbox = bbox_1.default(polygon);\n var lineBbox = bbox_1.default(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n var foundInsidePoint = false;\n for (var i = 0; i < linestring.coordinates.length - 1; i++) {\n if (!boolean_point_in_polygon_1.default(linestring.coordinates[i], polygon)) {\n return false;\n }\n if (!foundInsidePoint) {\n foundInsidePoint = boolean_point_in_polygon_1.default(linestring.coordinates[i], polygon, { ignoreBoundary: true });\n }\n if (!foundInsidePoint) {\n var midpoint = getMidpoint(linestring.coordinates[i], linestring.coordinates[i + 1]);\n foundInsidePoint = boolean_point_in_polygon_1.default(midpoint, polygon, { ignoreBoundary: true });\n }\n }\n return foundInsidePoint;\n}\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(feature1, feature2) {\n var poly1Bbox = bbox_1.default(feature1);\n var poly2Bbox = bbox_1.default(feature2);\n if (!doBBoxOverlap(poly2Bbox, poly1Bbox)) {\n return false;\n }\n for (var i = 0; i < feature1.coordinates[0].length; i++) {\n if (!boolean_point_in_polygon_1.default(feature1.coordinates[0][i], feature2)) {\n return false;\n }\n }\n return true;\n}\nfunction doBBoxOverlap(bbox1, bbox2) {\n if (bbox1[0] > bbox2[0])\n return false;\n if (bbox1[2] < bbox2[2])\n return false;\n if (bbox1[1] > bbox2[1])\n return false;\n if (bbox1[3] < bbox2[3])\n return false;\n return true;\n}\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1, pair2) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\n/**\n * getMidpoint\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {Position} midpoint of pair1 and pair2\n */\nfunction getMidpoint(pair1, pair2) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\nexports.default = booleanWithin;\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar bbox_1 = __importDefault(require(\"@turf/bbox\"));\nvar boolean_point_in_polygon_1 = __importDefault(require(\"@turf/boolean-point-in-polygon\"));\nvar boolean_point_on_line_1 = __importDefault(require(\"@turf/boolean-point-on-line\"));\nvar invariant_1 = require(\"@turf/invariant\");\n/**\n * Boolean-contains returns True if the second geometry is completely contained by the first geometry.\n * The interiors of both geometries must intersect and, the interior and boundary of the secondary (geometry b)\n * must not intersect the exterior of the primary (geometry a).\n * Boolean-contains returns the exact opposite result of the `@turf/boolean-within`.\n *\n * @name booleanContains\n * @param {Geometry|Feature<any>} feature1 GeoJSON Feature or Geometry\n * @param {Geometry|Feature<any>} feature2 GeoJSON Feature or Geometry\n * @returns {boolean} true/false\n * @example\n * var line = turf.lineString([[1, 1], [1, 2], [1, 3], [1, 4]]);\n * var point = turf.point([1, 2]);\n *\n * turf.booleanContains(line, point);\n * //=true\n */\nfunction booleanContains(feature1, feature2) {\n var geom1 = invariant_1.getGeom(feature1);\n var geom2 = invariant_1.getGeom(feature2);\n var type1 = invariant_1.getType(feature1);\n var type2 = invariant_1.getType(feature2);\n var coords1 = invariant_1.getCoords(feature1);\n var coords2 = invariant_1.getCoords(feature2);\n switch (type1) {\n case \"Point\":\n switch (type2) {\n case \"Point\":\n return compareCoords(coords1, coords2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"MultiPoint\":\n switch (type2) {\n case \"Point\":\n return isPointInMultiPoint(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInMultiPoint(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"LineString\":\n switch (type2) {\n case \"Point\":\n return boolean_point_on_line_1.default(geom2, geom1, { ignoreEndVertices: true });\n case \"LineString\":\n return isLineOnLine(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointOnLine(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n case \"Polygon\":\n switch (type2) {\n case \"Point\":\n return boolean_point_in_polygon_1.default(geom2, geom1, { ignoreBoundary: true });\n case \"LineString\":\n return isLineInPoly(geom1, geom2);\n case \"Polygon\":\n return isPolyInPoly(geom1, geom2);\n case \"MultiPoint\":\n return isMultiPointInPoly(geom1, geom2);\n default:\n throw new Error(\"feature2 \" + type2 + \" geometry not supported\");\n }\n default:\n throw new Error(\"feature1 \" + type1 + \" geometry not supported\");\n }\n}\nexports.default = booleanContains;\nfunction isPointInMultiPoint(multiPoint, pt) {\n var i;\n var output = false;\n for (i = 0; i < multiPoint.coordinates.length; i++) {\n if (compareCoords(multiPoint.coordinates[i], pt.coordinates)) {\n output = true;\n break;\n }\n }\n return output;\n}\nexports.isPointInMultiPoint = isPointInMultiPoint;\nfunction isMultiPointInMultiPoint(multiPoint1, multiPoint2) {\n for (var _i = 0, _a = multiPoint2.coordinates; _i < _a.length; _i++) {\n var coord2 = _a[_i];\n var matchFound = false;\n for (var _b = 0, _c = multiPoint1.coordinates; _b < _c.length; _b++) {\n var coord1 = _c[_b];\n if (compareCoords(coord2, coord1)) {\n matchFound = true;\n break;\n }\n }\n if (!matchFound) {\n return false;\n }\n }\n return true;\n}\nexports.isMultiPointInMultiPoint = isMultiPointInMultiPoint;\nfunction isMultiPointOnLine(lineString, multiPoint) {\n var haveFoundInteriorPoint = false;\n for (var _i = 0, _a = multiPoint.coordinates; _i < _a.length; _i++) {\n var coord = _a[_i];\n if (boolean_point_on_line_1.default(coord, lineString, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!boolean_point_on_line_1.default(coord, lineString)) {\n return false;\n }\n }\n if (haveFoundInteriorPoint) {\n return true;\n }\n return false;\n}\nexports.isMultiPointOnLine = isMultiPointOnLine;\nfunction isMultiPointInPoly(polygon, multiPoint) {\n for (var _i = 0, _a = multiPoint.coordinates; _i < _a.length; _i++) {\n var coord = _a[_i];\n if (!boolean_point_in_polygon_1.default(coord, polygon, { ignoreBoundary: true })) {\n return false;\n }\n }\n return true;\n}\nexports.isMultiPointInPoly = isMultiPointInPoly;\nfunction isLineOnLine(lineString1, lineString2) {\n var haveFoundInteriorPoint = false;\n for (var _i = 0, _a = lineString2.coordinates; _i < _a.length; _i++) {\n var coords = _a[_i];\n if (boolean_point_on_line_1.default({ type: \"Point\", coordinates: coords }, lineString1, { ignoreEndVertices: true })) {\n haveFoundInteriorPoint = true;\n }\n if (!boolean_point_on_line_1.default({ type: \"Point\", coordinates: coords }, lineString1, { ignoreEndVertices: false })) {\n return false;\n }\n }\n return haveFoundInteriorPoint;\n}\nexports.isLineOnLine = isLineOnLine;\nfunction isLineInPoly(polygon, linestring) {\n var output = false;\n var i = 0;\n var polyBbox = bbox_1.default(polygon);\n var lineBbox = bbox_1.default(linestring);\n if (!doBBoxOverlap(polyBbox, lineBbox)) {\n return false;\n }\n for (i; i < linestring.coordinates.length - 1; i++) {\n var midPoint = getMidpoint(linestring.coordinates[i], linestring.coordinates[i + 1]);\n if (boolean_point_in_polygon_1.default({ type: \"Point\", coordinates: midPoint }, polygon, { ignoreBoundary: true })) {\n output = true;\n break;\n }\n }\n return output;\n}\nexports.isLineInPoly = isLineInPoly;\n/**\n * Is Polygon2 in Polygon1\n * Only takes into account outer rings\n *\n * @private\n * @param {Geometry|Feature<Polygon>} feature1 Polygon1\n * @param {Geometry|Feature<Polygon>} feature2 Polygon2\n * @returns {boolean} true/false\n */\nfunction isPolyInPoly(feature1, feature2) {\n // Handle Nulls\n if (feature1.type === \"Feature\" && feature1.geometry === null) {\n return false;\n }\n if (feature2.type === \"Feature\" && feature2.geometry === null) {\n return false;\n }\n var poly1Bbox = bbox_1.default(feature1);\n var poly2Bbox = bbox_1.default(feature2);\n if (!doBBoxOverlap(poly1Bbox, poly2Bbox)) {\n return false;\n }\n var coords = invariant_1.getGeom(feature2).coordinates;\n for (var _i = 0, coords_1 = coords; _i < coords_1.length; _i++) {\n var ring = coords_1[_i];\n for (var _a = 0, ring_1 = ring; _a < ring_1.length; _a++) {\n var coord = ring_1[_a];\n if (!boolean_point_in_polygon_1.default(coord, feature1)) {\n return false;\n }\n }\n }\n return true;\n}\nexports.isPolyInPoly = isPolyInPoly;\nfunction doBBoxOverlap(bbox1, bbox2) {\n if (bbox1[0] > bbox2[0]) {\n return false;\n }\n if (bbox1[2] < bbox2[2]) {\n return false;\n }\n if (bbox1[1] > bbox2[1]) {\n return false;\n }\n if (bbox1[3] < bbox2[3]) {\n return false;\n }\n return true;\n}\nexports.doBBoxOverlap = doBBoxOverlap;\n/**\n * compareCoords\n *\n * @private\n * @param {Position} pair1 point [x,y]\n * @param {Position} pair2 point [x,y]\n * @returns {boolean} true/false if coord pairs match\n */\nfunction compareCoords(pair1, pair2) {\n return pair1[0] === pair2[0] && pair1[1] === pair2[1];\n}\nexports.compareCoords = compareCoords;\nfunction getMidpoint(pair1, pair2) {\n return [(pair1[0] + pair2[0]) / 2, (pair1[1] + pair2[1]) / 2];\n}\nexports.getMidpoint = getMidpoint;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar meta_1 = require(\"@turf/meta\");\nvar invariant_1 = require(\"@turf/invariant\");\nvar line_overlap_1 = require(\"@turf/line-overlap\");\nvar line_intersect_1 = require(\"@turf/line-intersect\");\nvar GeojsonEquality = require(\"geojson-equality\");\n/**\n * Compares two geometries of the same dimension and returns true if their intersection set results in a geometry\n * different from both but of the same dimension. It applies to Polygon/Polygon, LineString/LineString,\n * Multipoint/Multipoint, MultiLineString/MultiLineString and MultiPolygon/MultiPolygon.\n *\n * @name booleanOverlap\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} feature1 input\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} feature2 input\n * @returns {boolean} true/false\n * @example\n * var poly1 = turf.polygon([[[0,0],[0,5],[5,5],[5,0],[0,0]]]);\n * var poly2 = turf.polygon([[[1,1],[1,6],[6,6],[6,1],[1,1]]]);\n * var poly3 = turf.polygon([[[10,10],[10,15],[15,15],[15,10],[10,10]]]);\n *\n * turf.booleanOverlap(poly1, poly2)\n * //=true\n * turf.booleanOverlap(poly2, poly3)\n * //=false\n */\nfunction booleanOverlap(feature1, feature2) {\n // validation\n if (!feature1)\n throw new Error('feature1 is required');\n if (!feature2)\n throw new Error('feature2 is required');\n var type1 = invariant_1.getType(feature1);\n var type2 = invariant_1.getType(feature2);\n if (type1 !== type2)\n throw new Error('features must be of the same type');\n if (type1 === 'Point')\n throw new Error('Point geometry not supported');\n // features must be not equal\n var equality = new GeojsonEquality({ precision: 6 });\n if (equality.compare(feature1, feature2))\n return false;\n var overlap = 0;\n switch (type1) {\n case 'MultiPoint':\n var coords1 = meta_1.coordAll(feature1);\n var coords2 = meta_1.coordAll(feature2);\n coords1.forEach(function (coord1) {\n coords2.forEach(function (coord2) {\n if (coord1[0] === coord2[0] && coord1[1] === coord2[1])\n overlap++;\n });\n });\n break;\n case 'LineString':\n case 'MultiLineString':\n meta_1.segmentEach(feature1, function (segment1) {\n meta_1.segmentEach(feature2, function (segment2) {\n if (line_overlap_1.default(segment1, segment2).features.length)\n overlap++;\n });\n });\n break;\n case 'Polygon':\n case 'MultiPolygon':\n meta_1.segmentEach(feature1, function (segment1) {\n meta_1.segmentEach(feature2, function (segment2) {\n if (line_intersect_1.default(segment1, segment2).features.length)\n overlap++;\n });\n });\n break;\n }\n return overlap > 0;\n}\nexports.default = booleanOverlap;\n","import {Texture2D, hasFeature, FEATURES, log} from '@luma.gl/webgl';\n\nexport default class GLTFMaterialParser {\n constructor(\n gl,\n {attributes, material, pbrDebug, imageBasedLightingEnvironment, lights, useTangents}\n ) {\n this.gl = gl;\n\n this.defines = {\n // TODO: Use EXT_sRGB if available (Standard in WebGL 2.0)\n MANUAL_SRGB: 1,\n SRGB_FAST_APPROXIMATION: 1\n };\n\n if (hasFeature(gl, FEATURES.GLSL_TEXTURE_LOD)) {\n this.defines.USE_TEX_LOD = 1;\n }\n\n this.uniforms = {\n // TODO: find better values?\n u_Camera: [0, 0, 0], // Model should override\n\n u_MetallicRoughnessValues: [1, 1] // Default is 1 and 1\n };\n\n this.parameters = {};\n this.generatedTextures = [];\n\n if (imageBasedLightingEnvironment) {\n this.uniforms.u_DiffuseEnvSampler = imageBasedLightingEnvironment.getDiffuseEnvSampler();\n this.uniforms.u_SpecularEnvSampler = imageBasedLightingEnvironment.getSpecularEnvSampler();\n this.uniforms.u_brdfLUT = imageBasedLightingEnvironment.getBrdfTexture();\n this.uniforms.u_ScaleIBLAmbient = [1, 1];\n }\n\n if (pbrDebug) {\n // Override final color for reference app visualization\n // of various parameters in the lighting equation.\n this.uniforms.u_ScaleDiffBaseMR = [0, 0, 0, 0];\n this.uniforms.u_ScaleFGDSpec = [0, 0, 0, 0];\n }\n\n this.defineIfPresent(attributes.NORMAL, 'HAS_NORMALS');\n this.defineIfPresent(attributes.TANGENT && useTangents, 'HAS_TANGENTS');\n this.defineIfPresent(attributes.TEXCOORD_0, 'HAS_UV');\n\n this.defineIfPresent(imageBasedLightingEnvironment, 'USE_IBL');\n this.defineIfPresent(lights, 'USE_LIGHTS');\n this.defineIfPresent(pbrDebug, 'PBR_DEBUG');\n\n if (material) {\n this.parseMaterial(material);\n }\n }\n\n defineIfPresent(value, name) {\n if (value) {\n this.defines[name] = 1;\n }\n }\n\n parseTexture(gltfTexture, name, define = null) {\n const parameters =\n (gltfTexture.texture &&\n gltfTexture.texture.sampler &&\n gltfTexture.texture.sampler.parameters) ||\n {};\n\n const image = gltfTexture.texture.source.image;\n let textureOptions;\n let specialTextureParameters = {};\n if (image.compressed) {\n textureOptions = image;\n specialTextureParameters = {\n [this.gl.TEXTURE_MIN_FILTER]:\n image.data.length > 1 ? this.gl.LINEAR_MIPMAP_NEAREST : this.gl.LINEAR\n };\n } else {\n // Texture2D accepts a promise that returns an image as data (Async Textures)\n textureOptions = {data: image};\n }\n\n const texture = new Texture2D(this.gl, {\n id: gltfTexture.name || gltfTexture.id,\n parameters: {\n ...parameters,\n ...specialTextureParameters\n },\n pixelStore: {\n [this.gl.UNPACK_FLIP_Y_WEBGL]: false\n },\n ...textureOptions\n });\n this.uniforms[name] = texture;\n this.defineIfPresent(define, define);\n this.generatedTextures.push(texture);\n }\n\n parsePbrMetallicRoughness(pbrMetallicRoughness) {\n if (pbrMetallicRoughness.baseColorTexture) {\n this.parseTexture(\n pbrMetallicRoughness.baseColorTexture,\n 'u_BaseColorSampler',\n 'HAS_BASECOLORMAP'\n );\n }\n this.uniforms.u_BaseColorFactor = pbrMetallicRoughness.baseColorFactor || [1, 1, 1, 1];\n\n if (pbrMetallicRoughness.metallicRoughnessTexture) {\n this.parseTexture(\n pbrMetallicRoughness.metallicRoughnessTexture,\n 'u_MetallicRoughnessSampler',\n 'HAS_METALROUGHNESSMAP'\n );\n }\n const {metallicFactor = 1, roughnessFactor = 1} = pbrMetallicRoughness;\n this.uniforms.u_MetallicRoughnessValues = [metallicFactor, roughnessFactor];\n }\n\n parseMaterial(material) {\n this.uniforms.pbr_uUnlit = Boolean(material.unlit);\n\n if (material.pbrMetallicRoughness) {\n this.parsePbrMetallicRoughness(material.pbrMetallicRoughness);\n }\n if (material.normalTexture) {\n this.parseTexture(material.normalTexture, 'u_NormalSampler', 'HAS_NORMALMAP');\n\n const {scale = 1} = material.normalTexture;\n this.uniforms.u_NormalScale = scale;\n }\n if (material.occlusionTexture) {\n this.parseTexture(material.occlusionTexture, 'u_OcclusionSampler', 'HAS_OCCLUSIONMAP');\n\n const {strength = 1} = material.occlusionTexture;\n this.uniforms.u_OcclusionStrength = strength;\n }\n if (material.emissiveTexture) {\n this.parseTexture(material.emissiveTexture, 'u_EmissiveSampler', 'HAS_EMISSIVEMAP');\n this.uniforms.u_EmissiveFactor = material.emissiveFactor || [0, 0, 0];\n }\n if (material.alphaMode === 'MASK') {\n const {alphaCutoff = 0.5} = material;\n this.defines.ALPHA_CUTOFF = 1;\n this.uniforms.u_AlphaCutoff = alphaCutoff;\n } else if (material.alphaMode === 'BLEND') {\n log.warn('BLEND alphaMode might not work well because it requires mesh sorting')();\n Object.assign(this.parameters, {\n blend: true,\n blendEquation: this.gl.FUNC_ADD,\n blendFunc: [\n this.gl.SRC_ALPHA,\n this.gl.ONE_MINUS_SRC_ALPHA,\n this.gl.ONE,\n this.gl.ONE_MINUS_SRC_ALPHA\n ]\n });\n }\n }\n}\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z\"\n}), 'Lens');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'MoreVert');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z\"\n}), 'RemoveCircle');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n}), 'Visibility');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n}), 'VisibilityOff');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n}), 'ExpandMore');\n\nexports.default = _default;","window.higlassTracks = window.higlassTracks || {};\nwindow.higlassTracksByType = window.higlassTracksByType || {};\nwindow.higlassDataFetchersByType = window.higlassDataFetchersByType || {};\n\nconst getRandomName = () => Math.random().toString(36).substring(2, 8);\n\nconst registerTrack = (trackDef, { force = false } = {}) => {\n // The following is only needed for backward compatibility\n let name = getRandomName();\n while (window.higlassTracks[name]) {\n name = getRandomName();\n }\n\n trackDef.name = name;\n window.higlassTracks[trackDef.name] = trackDef;\n // backward compatibility: end\n\n if (window.higlassTracksByType[trackDef.config.type] && !force) {\n // eslint-disable-next-line\n console.warn(\n `A track with the same type (${trackDef.config.type}) was already ` +\n 'registered. To override it, set force to true.',\n );\n } else {\n window.higlassTracksByType[trackDef.config.type] = trackDef;\n }\n};\n\nconst registerDataFetcher = (dataFetcherDef, { force = false } = {}) => {\n if (window.higlassDataFetchersByType[dataFetcherDef.config.type] && !force) {\n // eslint-disable-next-line\n console.warn(\n `A data fetcher with the same type (${dataFetcherDef.config.type}) was already ` +\n 'registered. To override it, set force to true.',\n );\n } else {\n window.higlassDataFetchersByType[dataFetcherDef.config.type] = dataFetcherDef;\n }\n};\n\nconst register = (definition, options = {}) => {\n const { pluginType = 'track' } = options;\n if (pluginType === 'track') {\n registerTrack(definition, options);\n } else if (pluginType === 'dataFetcher') {\n registerDataFetcher(definition, options);\n }\n};\n\nexport default register;\n","var clone = (function() {\n'use strict';\n\nfunction _instanceof(obj, type) {\n return type != null && obj instanceof type;\n}\n\nvar nativeMap;\ntry {\n nativeMap = Map;\n} catch(_) {\n // maybe a reference error because no `Map`. Give it a dummy value that no\n // value will ever be an instanceof.\n nativeMap = function() {};\n}\n\nvar nativeSet;\ntry {\n nativeSet = Set;\n} catch(_) {\n nativeSet = function() {};\n}\n\nvar nativePromise;\ntry {\n nativePromise = Promise;\n} catch(_) {\n nativePromise = function() {};\n}\n\n/**\n * Clones (copies) an Object using deep copying.\n *\n * This function supports circular references by default, but if you are certain\n * there are no circular references in your object, you can save some CPU time\n * by calling clone(obj, false).\n *\n * Caution: if `circular` is false and `parent` contains circular references,\n * your program may enter an infinite loop and crash.\n *\n * @param `parent` - the object to be cloned\n * @param `circular` - set to true if the object to be cloned may contain\n * circular references. (optional - true by default)\n * @param `depth` - set to a number if the object is only to be cloned to\n * a particular depth. (optional - defaults to Infinity)\n * @param `prototype` - sets the prototype to be used when cloning an object.\n * (optional - defaults to parent prototype).\n * @param `includeNonEnumerable` - set to true if the non-enumerable properties\n * should be cloned as well. Non-enumerable properties on the prototype\n * chain will be ignored. (optional - false by default)\n*/\nfunction clone(parent, circular, depth, prototype, includeNonEnumerable) {\n if (typeof circular === 'object') {\n depth = circular.depth;\n prototype = circular.prototype;\n includeNonEnumerable = circular.includeNonEnumerable;\n circular = circular.circular;\n }\n // maintain two arrays for circular references, where corresponding parents\n // and children have the same index\n var allParents = [];\n var allChildren = [];\n\n var useBuffer = typeof Buffer != 'undefined';\n\n if (typeof circular == 'undefined')\n circular = true;\n\n if (typeof depth == 'undefined')\n depth = Infinity;\n\n // recurse this function so we don't reset allParents and allChildren\n function _clone(parent, depth) {\n // cloning null always returns null\n if (parent === null)\n return null;\n\n if (depth === 0)\n return parent;\n\n var child;\n var proto;\n if (typeof parent != 'object') {\n return parent;\n }\n\n if (_instanceof(parent, nativeMap)) {\n child = new nativeMap();\n } else if (_instanceof(parent, nativeSet)) {\n child = new nativeSet();\n } else if (_instanceof(parent, nativePromise)) {\n child = new nativePromise(function (resolve, reject) {\n parent.then(function(value) {\n resolve(_clone(value, depth - 1));\n }, function(err) {\n reject(_clone(err, depth - 1));\n });\n });\n } else if (clone.__isArray(parent)) {\n child = [];\n } else if (clone.__isRegExp(parent)) {\n child = new RegExp(parent.source, __getRegExpFlags(parent));\n if (parent.lastIndex) child.lastIndex = parent.lastIndex;\n } else if (clone.__isDate(parent)) {\n child = new Date(parent.getTime());\n } else if (useBuffer && Buffer.isBuffer(parent)) {\n if (Buffer.allocUnsafe) {\n // Node.js >= 4.5.0\n child = Buffer.allocUnsafe(parent.length);\n } else {\n // Older Node.js versions\n child = new Buffer(parent.length);\n }\n parent.copy(child);\n return child;\n } else if (_instanceof(parent, Error)) {\n child = Object.create(parent);\n } else {\n if (typeof prototype == 'undefined') {\n proto = Object.getPrototypeOf(parent);\n child = Object.create(proto);\n }\n else {\n child = Object.create(prototype);\n proto = prototype;\n }\n }\n\n if (circular) {\n var index = allParents.indexOf(parent);\n\n if (index != -1) {\n return allChildren[index];\n }\n allParents.push(parent);\n allChildren.push(child);\n }\n\n if (_instanceof(parent, nativeMap)) {\n parent.forEach(function(value, key) {\n var keyChild = _clone(key, depth - 1);\n var valueChild = _clone(value, depth - 1);\n child.set(keyChild, valueChild);\n });\n }\n if (_instanceof(parent, nativeSet)) {\n parent.forEach(function(value) {\n var entryChild = _clone(value, depth - 1);\n child.add(entryChild);\n });\n }\n\n for (var i in parent) {\n var attrs;\n if (proto) {\n attrs = Object.getOwnPropertyDescriptor(proto, i);\n }\n\n if (attrs && attrs.set == null) {\n continue;\n }\n child[i] = _clone(parent[i], depth - 1);\n }\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(parent);\n for (var i = 0; i < symbols.length; i++) {\n // Don't need to worry about cloning a symbol because it is a primitive,\n // like a number or string.\n var symbol = symbols[i];\n var descriptor = Object.getOwnPropertyDescriptor(parent, symbol);\n if (descriptor && !descriptor.enumerable && !includeNonEnumerable) {\n continue;\n }\n child[symbol] = _clone(parent[symbol], depth - 1);\n if (!descriptor.enumerable) {\n Object.defineProperty(child, symbol, {\n enumerable: false\n });\n }\n }\n }\n\n if (includeNonEnumerable) {\n var allPropertyNames = Object.getOwnPropertyNames(parent);\n for (var i = 0; i < allPropertyNames.length; i++) {\n var propertyName = allPropertyNames[i];\n var descriptor = Object.getOwnPropertyDescriptor(parent, propertyName);\n if (descriptor && descriptor.enumerable) {\n continue;\n }\n child[propertyName] = _clone(parent[propertyName], depth - 1);\n Object.defineProperty(child, propertyName, {\n enumerable: false\n });\n }\n }\n\n return child;\n }\n\n return _clone(parent, depth);\n}\n\n/**\n * Simple flat clone using prototype, accepts only objects, usefull for property\n * override on FLAT configuration object (no nested props).\n *\n * USE WITH CAUTION! This may not behave as you wish if you do not know how this\n * works.\n */\nclone.clonePrototype = function clonePrototype(parent) {\n if (parent === null)\n return null;\n\n var c = function () {};\n c.prototype = parent;\n return new c();\n};\n\n// private utility functions\n\nfunction __objToStr(o) {\n return Object.prototype.toString.call(o);\n}\nclone.__objToStr = __objToStr;\n\nfunction __isDate(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Date]';\n}\nclone.__isDate = __isDate;\n\nfunction __isArray(o) {\n return typeof o === 'object' && __objToStr(o) === '[object Array]';\n}\nclone.__isArray = __isArray;\n\nfunction __isRegExp(o) {\n return typeof o === 'object' && __objToStr(o) === '[object RegExp]';\n}\nclone.__isRegExp = __isRegExp;\n\nfunction __getRegExpFlags(re) {\n var flags = '';\n if (re.global) flags += 'g';\n if (re.ignoreCase) flags += 'i';\n if (re.multiline) flags += 'm';\n return flags;\n}\nclone.__getRegExpFlags = __getRegExpFlags;\n\nreturn clone;\n})();\n\nif (typeof module === 'object' && module.exports) {\n module.exports = clone;\n}\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.bowser=t():e.bowser=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=90)}({17:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n=r(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||\"\"},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||\"\"},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case\"NT\":return\"NT\";case\"XP\":return\"XP\";case\"NT 5.0\":return\"2000\";case\"NT 5.1\":return\"XP\";case\"NT 5.2\":return\"2003\";case\"NT 6.0\":return\"Vista\";case\"NT 6.1\":return\"7\";case\"NT 6.2\":return\"8\";case\"NT 6.3\":return\"8.1\";case\"NT 10.0\":return\"10\";default:return}},e.getMacOSVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),10===t[0])switch(t[1]){case 5:return\"Leopard\";case 6:return\"Snow Leopard\";case 7:return\"Lion\";case 8:return\"Mountain Lion\";case 9:return\"Mavericks\";case 10:return\"Yosemite\";case 11:return\"El Capitan\";case 12:return\"Sierra\";case 13:return\"High Sierra\";case 14:return\"Mojave\";case 15:return\"Catalina\";default:return}},e.getAndroidVersionName=function(e){var t=e.split(\".\").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?\"Cupcake\":1===t[0]&&t[1]>=6?\"Donut\":2===t[0]&&t[1]<2?\"Eclair\":2===t[0]&&2===t[1]?\"Froyo\":2===t[0]&&t[1]>2?\"Gingerbread\":3===t[0]?\"Honeycomb\":4===t[0]&&t[1]<1?\"Ice Cream Sandwich\":4===t[0]&&t[1]<4?\"Jelly Bean\":4===t[0]&&t[1]>=4?\"KitKat\":5===t[0]?\"Lollipop\":6===t[0]?\"Marshmallow\":7===t[0]?\"Nougat\":8===t[0]?\"Oreo\":9===t[0]?\"Pie\":void 0},e.getVersionPrecision=function(e){return e.split(\".\").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var i=e.getVersionPrecision(t),s=e.getVersionPrecision(r),a=Math.max(i,s),o=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(\".0\");return e.map(n.split(\".\"),(function(e){return new Array(20-e.length).join(\"0\")+e})).reverse()}));for(n&&(o=a-Math.min(i,s)),a-=1;a>=o;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===o)return 0;a-=1}else if(u[0][a]<u[1][a])return-1}},e.map=function(e,t){var r,n=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(r=0;r<e.length;r+=1)n.push(t(e[r]));return n},e.find=function(e,t){var r,n;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(r=0,n=e.length;r<n;r+=1){var i=e[r];if(t(i,r))return i}},e.assign=function(e){for(var t,r,n=e,i=arguments.length,s=new Array(i>1?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];if(Object.assign)return Object.assign.apply(Object,[e].concat(s));var o=function(){var e=s[t];\"object\"==typeof e&&null!==e&&Object.keys(e).forEach((function(t){n[t]=e[t]}))};for(t=0,r=s.length;t<r;t+=1)o();return e},e.getBrowserAlias=function(e){return n.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return n.BROWSER_MAP[e]||\"\"},e}();t.default=i,e.exports=t.default},18:function(e,t,r){\"use strict\";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0;t.BROWSER_ALIASES_MAP={\"Amazon Silk\":\"amazon_silk\",\"Android Browser\":\"android\",Bada:\"bada\",BlackBerry:\"blackberry\",Chrome:\"chrome\",Chromium:\"chromium\",Electron:\"electron\",Epiphany:\"epiphany\",Firefox:\"firefox\",Focus:\"focus\",Generic:\"generic\",\"Google Search\":\"google_search\",Googlebot:\"googlebot\",\"Internet Explorer\":\"ie\",\"K-Meleon\":\"k_meleon\",Maxthon:\"maxthon\",\"Microsoft Edge\":\"edge\",\"MZ Browser\":\"mz\",\"NAVER Whale Browser\":\"naver\",Opera:\"opera\",\"Opera Coast\":\"opera_coast\",PhantomJS:\"phantomjs\",Puffin:\"puffin\",QupZilla:\"qupzilla\",QQ:\"qq\",QQLite:\"qqlite\",Safari:\"safari\",Sailfish:\"sailfish\",\"Samsung Internet for Android\":\"samsung_internet\",SeaMonkey:\"seamonkey\",Sleipnir:\"sleipnir\",Swing:\"swing\",Tizen:\"tizen\",\"UC Browser\":\"uc\",Vivaldi:\"vivaldi\",\"WebOS Browser\":\"webos\",WeChat:\"wechat\",\"Yandex Browser\":\"yandex\",Roku:\"roku\"};t.BROWSER_MAP={amazon_silk:\"Amazon Silk\",android:\"Android Browser\",bada:\"Bada\",blackberry:\"BlackBerry\",chrome:\"Chrome\",chromium:\"Chromium\",electron:\"Electron\",epiphany:\"Epiphany\",firefox:\"Firefox\",focus:\"Focus\",generic:\"Generic\",googlebot:\"Googlebot\",google_search:\"Google Search\",ie:\"Internet Explorer\",k_meleon:\"K-Meleon\",maxthon:\"Maxthon\",edge:\"Microsoft Edge\",mz:\"MZ Browser\",naver:\"NAVER Whale Browser\",opera:\"Opera\",opera_coast:\"Opera Coast\",phantomjs:\"PhantomJS\",puffin:\"Puffin\",qupzilla:\"QupZilla\",qq:\"QQ Browser\",qqlite:\"QQ Browser Lite\",safari:\"Safari\",sailfish:\"Sailfish\",samsung_internet:\"Samsung Internet for Android\",seamonkey:\"SeaMonkey\",sleipnir:\"Sleipnir\",swing:\"Swing\",tizen:\"Tizen\",uc:\"UC Browser\",vivaldi:\"Vivaldi\",webos:\"WebOS Browser\",wechat:\"WeChat\",yandex:\"Yandex Browser\"};t.PLATFORMS_MAP={tablet:\"tablet\",mobile:\"mobile\",desktop:\"desktop\",tv:\"tv\"};t.OS_MAP={WindowsPhone:\"Windows Phone\",Windows:\"Windows\",MacOS:\"macOS\",iOS:\"iOS\",Android:\"Android\",WebOS:\"WebOS\",BlackBerry:\"BlackBerry\",Bada:\"Bada\",Tizen:\"Tizen\",Linux:\"Linux\",ChromeOS:\"Chrome OS\",PlayStation4:\"PlayStation 4\",Roku:\"Roku\"};t.ENGINE_MAP={EdgeHTML:\"EdgeHTML\",Blink:\"Blink\",Trident:\"Trident\",Presto:\"Presto\",Gecko:\"Gecko\",WebKit:\"WebKit\"}},90:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(91))&&n.__esModule?n:{default:n},s=r(18);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=function(){function e(){}var t,r,n;return e.getParser=function(e,t){if(void 0===t&&(t=!1),\"string\"!=typeof e)throw new Error(\"UserAgent should be a string\");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,n=[{key:\"BROWSER_MAP\",get:function(){return s.BROWSER_MAP}},{key:\"ENGINE_MAP\",get:function(){return s.ENGINE_MAP}},{key:\"OS_MAP\",get:function(){return s.OS_MAP}},{key:\"PLATFORMS_MAP\",get:function(){return s.PLATFORMS_MAP}}],(r=null)&&a(t.prototype,r),n&&a(t,n),e}();t.default=o,e.exports=t.default},91:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n=u(r(92)),i=u(r(93)),s=u(r(94)),a=u(r(95)),o=u(r(17));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||\"\"===e)throw new Error(\"UserAgent parameter can't be empty\");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=o.default.find(n.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||\"\":this.getBrowser().name||\"\"},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=o.default.find(i.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||\"\":t||\"\"},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||\"\":t||\"\"},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=o.default.find(s.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||\"\":this.getEngine().name||\"\"},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=o.default.find(a.default,(function(t){if(\"function\"==typeof t.test)return t.test(e);if(t.test instanceof Array)return t.test.some((function(t){return e.test(t)}));throw new Error(\"Browser's test function is not valid\")}));return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return o.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,r={},n=0,i={},s=0;if(Object.keys(e).forEach((function(t){var a=e[t];\"string\"==typeof a?(i[t]=a,s+=1):\"object\"==typeof a&&(r[t]=a,n+=1)})),n>0){var a=Object.keys(r),u=o.default.find(a,(function(e){return t.isOS(e)}));if(u){var d=this.satisfies(r[u]);if(void 0!==d)return d}var c=o.default.find(a,(function(e){return t.isPlatform(e)}));if(c){var f=this.satisfies(r[c]);if(void 0!==f)return f}}if(s>0){var l=Object.keys(i),h=o.default.find(l,(function(e){return t.isBrowser(e,!0)}));if(void 0!==h)return this.compareVersion(i[h])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),i=o.default.getBrowserTypeByAlias(n);return t&&i&&(n=i.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,i=this.getBrowserVersion();if(\"string\"==typeof i)return\">\"===e[0]||\"<\"===e[0]?(r=e.substr(1),\"=\"===e[1]?(n=!0,r=e.substr(2)):t=[],\">\"===e[0]?t.push(1):t.push(-1)):\"=\"===e[0]?r=e.substr(1):\"~\"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(o.default.compareVersions(i,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=d,e.exports=t.default},92:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n};var s=/version\\/(\\d+(\\.?_?\\d+)+)/i,a=[{test:[/googlebot/i],describe:function(e){var t={name:\"Googlebot\"},r=i.default.getFirstMatch(/googlebot\\/(\\d+(\\.\\d+))/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/opera/i],describe:function(e){var t={name:\"Opera\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:opera)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\\/|opios/i],describe:function(e){var t={name:\"Opera\"},r=i.default.getFirstMatch(/(?:opr|opios)[\\s/](\\S+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:\"Samsung Internet for Android\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:\"NAVER Whale Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:whale)[\\s/](\\d+(?:\\.\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:\"MZ Browser\"},r=i.default.getFirstMatch(/(?:MZBrowser)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:\"Focus\"},r=i.default.getFirstMatch(/(?:focus)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:\"Swing\"},r=i.default.getFirstMatch(/(?:swing)[\\s/](\\d+(?:\\.\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:\"Opera Coast\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:coast)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\\/\\d+(?:.?_?\\d+)+/i],describe:function(e){var t={name:\"Opera Touch\"},r=i.default.getFirstMatch(/(?:opt)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:\"Yandex Browser\"},r=i.default.getFirstMatch(/(?:yabrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:\"UC Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:ucbrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:\"Maxthon\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:\"Epiphany\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:epiphany)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:\"Puffin\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:puffin)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:\"Sleipnir\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:sleipnir)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:\"K-Meleon\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/(?:k-meleon)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:\"WeChat\"},r=i.default.getFirstMatch(/(?:micromessenger)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?\"QQ Browser Lite\":\"QQ Browser\"},r=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:\"Internet Explorer\"},r=i.default.getFirstMatch(/(?:msie |rv:)(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\\sedg\\//i],describe:function(e){var t={name:\"Microsoft Edge\"},r=i.default.getFirstMatch(/\\sedg\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:\"Microsoft Edge\"},r=i.default.getSecondMatch(/edg([ea]|ios)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:\"Vivaldi\"},r=i.default.getFirstMatch(/vivaldi\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:\"SeaMonkey\"},r=i.default.getFirstMatch(/seamonkey\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:\"Sailfish\"},r=i.default.getFirstMatch(/sailfish\\s?browser\\/(\\d+(\\.\\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:\"Amazon Silk\"},r=i.default.getFirstMatch(/silk\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:\"PhantomJS\"},r=i.default.getFirstMatch(/phantomjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:\"SlimerJS\"},r=i.default.getFirstMatch(/slimerjs\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t={name:\"BlackBerry\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/blackberry[\\d]+\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:\"WebOS Browser\"},r=i.default.getFirstMatch(s,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:\"Bada\"},r=i.default.getFirstMatch(/dolfin\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:\"Tizen\"},r=i.default.getFirstMatch(/(?:tizen\\s?)?browser\\/(\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:\"QupZilla\"},r=i.default.getFirstMatch(/(?:qupzilla)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:\"Firefox\"},r=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:\"Electron\"},r=i.default.getFirstMatch(/(?:electron)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:\"Miui\"},r=i.default.getFirstMatch(/(?:MiuiBrowser)[\\s/](\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/chromium/i],describe:function(e){var t={name:\"Chromium\"},r=i.default.getFirstMatch(/(?:chromium)[\\s/](\\d+(\\.?_?\\d+)+)/i,e)||i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:\"Chrome\"},r=i.default.getFirstMatch(/(?:chrome|crios|crmo)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:\"Google Search\"},r=i.default.getFirstMatch(/(?:GSA)\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:\"Android Browser\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:\"PlayStation 4\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:\"Safari\"},r=i.default.getFirstMatch(s,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search(\"\\\\(\")?/^(.*)\\/(.*)[ \\t]\\((.*)/:/^(.*)\\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/Roku\\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\\/DVP-(\\d+\\.\\d+)/i,e);return{name:s.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\\s?(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \\d\\d?.\\d)?)/i,e),r=i.default.getWindowsVersionName(t);return{name:s.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe:function(e){var t={name:s.OS_MAP.iOS},r=i.default.getSecondMatch(/(Version\\/)(\\d[\\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\\d+(\\.?_?\\d+)+)/i,e).replace(/[_\\s]/g,\".\"),r=i.default.getMacOSVersionName(t),n={name:s.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\\d+([_\\s]\\d+)*) like mac os x/i,e).replace(/[_\\s]/g,\".\");return{name:s.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=i.default.getFirstMatch(/android[\\s/-](\\d+(\\.\\d+)*)/i,e),r=i.default.getAndroidVersionName(t),n={name:s.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\\/(\\d+(\\.\\d+)*)/i,e),r={name:s.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\\bbb\\d+/i,/rim\\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\\stablet\\sos\\s(\\d+(\\.\\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\\d+\\/(\\d+([_\\s]\\d+)*)/i,e)||i.default.getFirstMatch(/\\bbb(\\d+)/i,e);return{name:s.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\\/(\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:s.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:s.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\\s](\\d+(\\.\\d+)*)/i,e);return{name:s.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:[/googlebot/i],describe:function(){return{type:\"bot\",vendor:\"Google\"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&\"Nova\",r={type:s.PLATFORMS_MAP.mobile,vendor:\"Huawei\"};return t&&(r.model=t),r}},{test:[/nexus\\s*(?:7|8|9|10).*/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Nexus\"}}},{test:[/ipad/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Apple\",model:\"iPad\"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\\//],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Apple\",model:\"iPad\"}}},{test:[/kftt build/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\",model:\"Kindle Fire HD 7\"}}},{test:[/silk/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet,vendor:\"Amazon\"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:s.PLATFORMS_MAP.mobile,vendor:\"Apple\",model:t}}},{test:[/nexus\\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Nexus\"}}},{test:[/[^-]mobi/i],describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"blackberry\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"BlackBerry\"}}},{test:function(e){return\"bada\"===e.getBrowserName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"windows phone\"===e.getBrowserName()},describe:function(){return{type:s.PLATFORMS_MAP.mobile,vendor:\"Microsoft\"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(\".\")[0]);return\"android\"===e.getOSName(!0)&&t>=3},describe:function(){return{type:s.PLATFORMS_MAP.tablet}}},{test:function(e){return\"android\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.mobile}}},{test:function(e){return\"macos\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop,vendor:\"Apple\"}}},{test:function(e){return\"windows\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"linux\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.desktop}}},{test:function(e){return\"playstation 4\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}},{test:function(e){return\"roku\"===e.getOSName(!0)},describe:function(){return{type:s.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){\"use strict\";t.__esModule=!0,t.default=void 0;var n,i=(n=r(17))&&n.__esModule?n:{default:n},s=r(18);var a=[{test:function(e){return\"microsoft edge\"===e.getBrowserName(!0)},describe:function(e){if(/\\sedg\\//i.test(e))return{name:s.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\\/(\\d+(\\.?_?\\d+)+)/i,e);return{name:s.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:s.ENGINE_MAP.Trident},r=i.default.getFirstMatch(/trident\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:s.ENGINE_MAP.Presto},r=i.default.getFirstMatch(/presto\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:s.ENGINE_MAP.Gecko},r=i.default.getFirstMatch(/gecko\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\\/537\\.36/i],describe:function(){return{name:s.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:s.ENGINE_MAP.WebKit},r=i.default.getFirstMatch(/webkit\\/(\\d+(\\.?_?\\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})}));","export default function contains(root, n) {\n var node = n;\n\n while (node) {\n if (node === root) {\n return true;\n }\n\n node = node.parentNode;\n }\n\n return false;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nexport function fillRef(ref, node) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (_typeof(ref) === 'object' && ref && 'current' in ref) {\n ref.current = node;\n }\n}\n/**\n * Merge refs into one ref function to support ref passing.\n */\n\nexport function composeRef() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return function (node) {\n refs.forEach(function (ref) {\n fillRef(ref, node);\n });\n };\n}\nexport function supportRef(nodeOrComponent) {\n // Function component node\n if (nodeOrComponent.type && nodeOrComponent.type.prototype && !nodeOrComponent.type.prototype.render) {\n return false;\n } // Class component\n\n\n if (typeof nodeOrComponent === 'function' && nodeOrComponent.prototype && !nodeOrComponent.prototype.render) {\n return false;\n }\n\n return true;\n}\n/* eslint-enable */","import addDOMEventListener from 'add-dom-event-listener';\nimport ReactDOM from 'react-dom';\nexport default function addEventListenerWrap(target, eventType, cb, option) {\n /* eslint camelcase: 2 */\n var callback = ReactDOM.unstable_batchedUpdates ? function run(e) {\n ReactDOM.unstable_batchedUpdates(cb, e);\n } : cb;\n return addDOMEventListener(target, eventType, callback, option);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\n\nvar Portal =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inherits(Portal, _React$Component);\n\n function Portal() {\n _classCallCheck(this, Portal);\n\n return _possibleConstructorReturn(this, _getPrototypeOf(Portal).apply(this, arguments));\n }\n\n _createClass(Portal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.createContainer();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var didUpdate = this.props.didUpdate;\n\n if (didUpdate) {\n didUpdate(prevProps);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.removeContainer();\n }\n }, {\n key: \"createContainer\",\n value: function createContainer() {\n this._container = this.props.getContainer();\n this.forceUpdate();\n }\n }, {\n key: \"removeContainer\",\n value: function removeContainer() {\n if (this._container) {\n this._container.parentNode.removeChild(this._container);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this._container) {\n return ReactDOM.createPortal(this.props.children, this._container);\n }\n\n return null;\n }\n }]);\n\n return Portal;\n}(React.Component);\n\nPortal.propTypes = {\n getContainer: PropTypes.func.isRequired,\n children: PropTypes.node.isRequired,\n didUpdate: PropTypes.func\n};\nexport { Portal as default };","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction isPointsEq(a1, a2, isAlignPoint) {\n if (isAlignPoint) {\n return a1[0] === a2[0];\n }\n\n return a1[0] === a2[0] && a1[1] === a2[1];\n}\n\nexport function getAlignFromPlacement(builtinPlacements, placementStr, align) {\n var baseAlign = builtinPlacements[placementStr] || {};\n return _objectSpread(_objectSpread({}, baseAlign), align);\n}\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n var points = align.points;\n var placements = Object.keys(builtinPlacements);\n\n for (var i = 0; i < placements.length; i += 1) {\n var placement = placements[i];\n\n if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {\n return \"\".concat(prefixCls, \"-placement-\").concat(placement);\n }\n }\n\n return '';\n}","let vendorPrefix;\n\nconst jsCssMap = {\n Webkit: '-webkit-',\n Moz: '-moz-',\n // IE did it wrong again ...\n ms: '-ms-',\n O: '-o-',\n};\n\nfunction getVendorPrefix() {\n if (vendorPrefix !== undefined) {\n return vendorPrefix;\n }\n vendorPrefix = '';\n const style = document.createElement('p').style;\n const testProp = 'Transform';\n for (const key in jsCssMap) {\n if (key + testProp in style) {\n vendorPrefix = key;\n }\n }\n return vendorPrefix;\n}\n\nfunction getTransitionName() {\n return getVendorPrefix()\n ? `${getVendorPrefix()}TransitionProperty`\n : 'transitionProperty';\n}\n\nexport function getTransformName() {\n return getVendorPrefix() ? `${getVendorPrefix()}Transform` : 'transform';\n}\n\nexport function setTransitionProperty(node, value) {\n const name = getTransitionName();\n if (name) {\n node.style[name] = value;\n if (name !== 'transitionProperty') {\n node.style.transitionProperty = value;\n }\n }\n}\n\nfunction setTransform(node, value) {\n const name = getTransformName();\n if (name) {\n node.style[name] = value;\n if (name !== 'transform') {\n node.style.transform = value;\n }\n }\n}\n\nexport function getTransitionProperty(node) {\n return node.style.transitionProperty || node.style[getTransitionName()];\n}\n\nexport function getTransformXY(node) {\n const style = window.getComputedStyle(node, null);\n const transform =\n style.getPropertyValue('transform') ||\n style.getPropertyValue(getTransformName());\n if (transform && transform !== 'none') {\n const matrix = transform.replace(/[^0-9\\-.,]/g, '').split(',');\n return {\n x: parseFloat(matrix[12] || matrix[4], 0),\n y: parseFloat(matrix[13] || matrix[5], 0),\n };\n }\n return {\n x: 0,\n y: 0,\n };\n}\n\nconst matrix2d = /matrix\\((.*)\\)/;\nconst matrix3d = /matrix3d\\((.*)\\)/;\n\nexport function setTransformXY(node, xy) {\n const style = window.getComputedStyle(node, null);\n const transform =\n style.getPropertyValue('transform') ||\n style.getPropertyValue(getTransformName());\n if (transform && transform !== 'none') {\n let arr;\n let match2d = transform.match(matrix2d);\n if (match2d) {\n match2d = match2d[1];\n arr = match2d.split(',').map(item => {\n return parseFloat(item, 10);\n });\n arr[4] = xy.x;\n arr[5] = xy.y;\n setTransform(node, `matrix(${arr.join(',')})`);\n } else {\n const match3d = transform.match(matrix3d)[1];\n arr = match3d.split(',').map(item => {\n return parseFloat(item, 10);\n });\n arr[12] = xy.x;\n arr[13] = xy.y;\n setTransform(node, `matrix3d(${arr.join(',')})`);\n }\n } else {\n setTransform(\n node,\n `translateX(${xy.x}px) translateY(${xy.y}px) translateZ(0)`,\n );\n }\n}\n","import utils from './utils';\n\n/**\n * 得到会导致元素显示不全的祖先元素\n */\nconst { getParent } = utils;\n\nfunction getOffsetParent(element) {\n if (utils.isWindow(element) || element.nodeType === 9) {\n return null;\n }\n // ie 这个也不是完全可行\n /*\n <div style=\"width: 50px;height: 100px;overflow: hidden\">\n <div style=\"width: 50px;height: 100px;position: relative;\" id=\"d6\">\n 元素 6 高 100px 宽 50px<br/>\n </div>\n </div>\n */\n // element.offsetParent does the right thing in ie7 and below. Return parent with layout!\n // In other browsers it only includes elements with position absolute, relative or\n // fixed, not elements with overflow set to auto or scroll.\n // if (UA.ie && ieMode < 8) {\n // return element.offsetParent;\n // }\n // 统一的 offsetParent 方法\n const doc = utils.getDocument(element);\n const body = doc.body;\n let parent;\n let positionStyle = utils.css(element, 'position');\n const skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute';\n\n if (!skipStatic) {\n return element.nodeName.toLowerCase() === 'html'\n ? null\n : getParent(element);\n }\n\n for (\n parent = getParent(element);\n parent && parent !== body && parent.nodeType !== 9;\n parent = getParent(parent)\n ) {\n positionStyle = utils.css(parent, 'position');\n if (positionStyle !== 'static') {\n return parent;\n }\n }\n return null;\n}\n\nexport default getOffsetParent;\n","import utils from './utils';\n\nconst { getParent } = utils;\n\nexport default function isAncestorFixed(element) {\n if (utils.isWindow(element) || element.nodeType === 9) {\n return false;\n }\n\n const doc = utils.getDocument(element);\n const body = doc.body;\n let parent = null;\n for (\n parent = getParent(element);\n parent && parent !== body;\n parent = getParent(parent)\n ) {\n const positionStyle = utils.css(parent, 'position');\n if (positionStyle === 'fixed') {\n return true;\n }\n }\n return false;\n}\n","import utils from './utils';\nimport getOffsetParent from './getOffsetParent';\nimport isAncestorFixed from './isAncestorFixed';\n\n/**\n * 获得元素的显示部分的区域\n */\nfunction getVisibleRectForElement(element, alwaysByViewport) {\n const visibleRect = {\n left: 0,\n right: Infinity,\n top: 0,\n bottom: Infinity,\n };\n let el = getOffsetParent(element);\n const doc = utils.getDocument(element);\n const win = doc.defaultView || doc.parentWindow;\n const body = doc.body;\n const documentElement = doc.documentElement;\n\n // Determine the size of the visible rect by climbing the dom accounting for\n // all scrollable containers.\n while (el) {\n // clientWidth is zero for inline block elements in ie.\n if (\n (navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) &&\n // body may have overflow set on it, yet we still get the entire\n // viewport. In some browsers, el.offsetParent may be\n // document.documentElement, so check for that too.\n (el !== body &&\n el !== documentElement &&\n utils.css(el, 'overflow') !== 'visible')\n ) {\n const pos = utils.offset(el);\n // add border\n pos.left += el.clientLeft;\n pos.top += el.clientTop;\n visibleRect.top = Math.max(visibleRect.top, pos.top);\n visibleRect.right = Math.min(\n visibleRect.right,\n // consider area without scrollBar\n pos.left + el.clientWidth,\n );\n visibleRect.bottom = Math.min(\n visibleRect.bottom,\n pos.top + el.clientHeight,\n );\n visibleRect.left = Math.max(visibleRect.left, pos.left);\n } else if (el === body || el === documentElement) {\n break;\n }\n el = getOffsetParent(el);\n }\n\n // Set element position to fixed\n // make sure absolute element itself don't affect it's visible area\n // https://github.com/ant-design/ant-design/issues/7601\n let originalPosition = null;\n if (!utils.isWindow(element) && element.nodeType !== 9) {\n originalPosition = element.style.position;\n const position = utils.css(element, 'position');\n if (position === 'absolute') {\n element.style.position = 'fixed';\n }\n }\n\n const scrollX = utils.getWindowScrollLeft(win);\n const scrollY = utils.getWindowScrollTop(win);\n const viewportWidth = utils.viewportWidth(win);\n const viewportHeight = utils.viewportHeight(win);\n let documentWidth = documentElement.scrollWidth;\n let documentHeight = documentElement.scrollHeight;\n\n // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX.\n // We should cut this ourself.\n const bodyStyle = window.getComputedStyle(body);\n if (bodyStyle.overflowX === 'hidden') {\n documentWidth = win.innerWidth;\n }\n if (bodyStyle.overflowY === 'hidden') {\n documentHeight = win.innerHeight;\n }\n\n // Reset element position after calculate the visible area\n if (element.style) {\n element.style.position = originalPosition;\n }\n\n if (alwaysByViewport || isAncestorFixed(element)) {\n // Clip by viewport's size.\n visibleRect.left = Math.max(visibleRect.left, scrollX);\n visibleRect.top = Math.max(visibleRect.top, scrollY);\n visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth);\n visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight);\n } else {\n // Clip by document's size.\n const maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth);\n visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth);\n\n const maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight);\n visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight);\n }\n\n return visibleRect.top >= 0 &&\n visibleRect.left >= 0 &&\n visibleRect.bottom > visibleRect.top &&\n visibleRect.right > visibleRect.left\n ? visibleRect\n : null;\n}\n\nexport default getVisibleRectForElement;\n","import utils from './utils';\n\nfunction getRegion(node) {\n let offset;\n let w;\n let h;\n if (!utils.isWindow(node) && node.nodeType !== 9) {\n offset = utils.offset(node);\n w = utils.outerWidth(node);\n h = utils.outerHeight(node);\n } else {\n const win = utils.getWindow(node);\n offset = {\n left: utils.getWindowScrollLeft(win),\n top: utils.getWindowScrollTop(win),\n };\n w = utils.viewportWidth(win);\n h = utils.viewportHeight(win);\n }\n offset.width = w;\n offset.height = h;\n return offset;\n}\n\nexport default getRegion;\n","/**\n * 获取 node 上的 align 对齐点 相对于页面的坐标\n */\n\nfunction getAlignOffset(region, align) {\n const V = align.charAt(0);\n const H = align.charAt(1);\n const w = region.width;\n const h = region.height;\n\n let x = region.left;\n let y = region.top;\n\n if (V === 'c') {\n y += h / 2;\n } else if (V === 'b') {\n y += h;\n }\n\n if (H === 'c') {\n x += w / 2;\n } else if (H === 'r') {\n x += w;\n }\n\n return {\n left: x,\n top: y,\n };\n}\n\nexport default getAlignOffset;\n","import getAlignOffset from './getAlignOffset';\n\nfunction getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) {\n const p1 = getAlignOffset(refNodeRegion, points[1]);\n const p2 = getAlignOffset(elRegion, points[0]);\n const diff = [p2.left - p1.left, p2.top - p1.top];\n\n return {\n left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]),\n top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1]),\n };\n}\n\nexport default getElFuturePos;\n","/**\n * align dom node flexibly\n * @author yiminghe@gmail.com\n */\n\nimport utils from '../utils';\nimport getVisibleRectForElement from '../getVisibleRectForElement';\nimport adjustForViewport from '../adjustForViewport';\nimport getRegion from '../getRegion';\nimport getElFuturePos from '../getElFuturePos';\n\n// http://yiminghe.iteye.com/blog/1124720\n\nfunction isFailX(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.left < visibleRect.left ||\n elFuturePos.left + elRegion.width > visibleRect.right\n );\n}\n\nfunction isFailY(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.top < visibleRect.top ||\n elFuturePos.top + elRegion.height > visibleRect.bottom\n );\n}\n\nfunction isCompleteFailX(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.left > visibleRect.right ||\n elFuturePos.left + elRegion.width < visibleRect.left\n );\n}\n\nfunction isCompleteFailY(elFuturePos, elRegion, visibleRect) {\n return (\n elFuturePos.top > visibleRect.bottom ||\n elFuturePos.top + elRegion.height < visibleRect.top\n );\n}\n\nfunction flip(points, reg, map) {\n const ret = [];\n utils.each(points, p => {\n ret.push(\n p.replace(reg, m => {\n return map[m];\n }),\n );\n });\n return ret;\n}\n\nfunction flipOffset(offset, index) {\n offset[index] = -offset[index];\n return offset;\n}\n\nfunction convertOffset(str, offsetLen) {\n let n;\n if (/%$/.test(str)) {\n n = (parseInt(str.substring(0, str.length - 1), 10) / 100) * offsetLen;\n } else {\n n = parseInt(str, 10);\n }\n return n || 0;\n}\n\nfunction normalizeOffset(offset, el) {\n offset[0] = convertOffset(offset[0], el.width);\n offset[1] = convertOffset(offset[1], el.height);\n}\n\n/**\n * @param el\n * @param tgtRegion 参照节点所占的区域: { left, top, width, height }\n * @param align\n */\nfunction doAlign(el, tgtRegion, align, isTgtRegionVisible) {\n let points = align.points;\n let offset = align.offset || [0, 0];\n let targetOffset = align.targetOffset || [0, 0];\n let overflow = align.overflow;\n const source = align.source || el;\n offset = [].concat(offset);\n targetOffset = [].concat(targetOffset);\n overflow = overflow || {};\n const newOverflowCfg = {};\n let fail = 0;\n const alwaysByViewport = !!(overflow && overflow.alwaysByViewport);\n // 当前节点可以被放置的显示区域\n const visibleRect = getVisibleRectForElement(source, alwaysByViewport);\n // 当前节点所占的区域, left/top/width/height\n const elRegion = getRegion(source);\n // 将 offset 转换成数值,支持百分比\n normalizeOffset(offset, elRegion);\n normalizeOffset(targetOffset, tgtRegion);\n // 当前节点将要被放置的位置\n let elFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n points,\n offset,\n targetOffset,\n );\n // 当前节点将要所处的区域\n let newElRegion = utils.merge(elRegion, elFuturePos);\n\n // 如果可视区域不能完全放置当前节点时允许调整\n if (\n visibleRect &&\n (overflow.adjustX || overflow.adjustY) &&\n isTgtRegionVisible\n ) {\n if (overflow.adjustX) {\n // 如果横向不能放下\n if (isFailX(elFuturePos, elRegion, visibleRect)) {\n // 对齐位置反下\n const newPoints = flip(points, /[lr]/gi, {\n l: 'r',\n r: 'l',\n });\n // 偏移量也反下\n const newOffset = flipOffset(offset, 0);\n const newTargetOffset = flipOffset(targetOffset, 0);\n const newElFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n newPoints,\n newOffset,\n newTargetOffset,\n );\n\n if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {\n fail = 1;\n points = newPoints;\n offset = newOffset;\n targetOffset = newTargetOffset;\n }\n }\n }\n\n if (overflow.adjustY) {\n // 如果纵向不能放下\n if (isFailY(elFuturePos, elRegion, visibleRect)) {\n // 对齐位置反下\n const newPoints = flip(points, /[tb]/gi, {\n t: 'b',\n b: 't',\n });\n // 偏移量也反下\n const newOffset = flipOffset(offset, 1);\n const newTargetOffset = flipOffset(targetOffset, 1);\n const newElFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n newPoints,\n newOffset,\n newTargetOffset,\n );\n\n if (!isCompleteFailY(newElFuturePos, elRegion, visibleRect)) {\n fail = 1;\n points = newPoints;\n offset = newOffset;\n targetOffset = newTargetOffset;\n }\n }\n }\n\n // 如果失败,重新计算当前节点将要被放置的位置\n if (fail) {\n elFuturePos = getElFuturePos(\n elRegion,\n tgtRegion,\n points,\n offset,\n targetOffset,\n );\n utils.mix(newElRegion, elFuturePos);\n }\n const isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);\n const isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);\n // 检查反下后的位置是否可以放下了,如果仍然放不下:\n // 1. 复原修改过的定位参数\n if (isStillFailX || isStillFailY) {\n points = align.points;\n offset = align.offset || [0, 0];\n targetOffset = align.targetOffset || [0, 0];\n }\n // 2. 只有指定了可以调整当前方向才调整\n newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;\n newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;\n\n // 确实要调整,甚至可能会调整高度宽度\n if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {\n newElRegion = adjustForViewport(\n elFuturePos,\n elRegion,\n visibleRect,\n newOverflowCfg,\n );\n }\n }\n\n // need judge to in case set fixed with in css on height auto element\n if (newElRegion.width !== elRegion.width) {\n utils.css(\n source,\n 'width',\n utils.width(source) + newElRegion.width - elRegion.width,\n );\n }\n\n if (newElRegion.height !== elRegion.height) {\n utils.css(\n source,\n 'height',\n utils.height(source) + newElRegion.height - elRegion.height,\n );\n }\n\n // https://github.com/kissyteam/kissy/issues/190\n // 相对于屏幕位置没变,而 left/top 变了\n // 例如 <div 'relative'><el absolute></div>\n utils.offset(\n source,\n {\n left: newElRegion.left,\n top: newElRegion.top,\n },\n {\n useCssRight: align.useCssRight,\n useCssBottom: align.useCssBottom,\n useCssTransform: align.useCssTransform,\n ignoreShake: align.ignoreShake,\n },\n );\n\n return {\n points,\n offset,\n targetOffset,\n overflow: newOverflowCfg,\n };\n}\n\nexport default doAlign;\n/**\n * 2012-04-26 yiminghe@gmail.com\n * - 优化智能对齐算法\n * - 慎用 resizeXX\n *\n * 2011-07-13 yiminghe@gmail.com note:\n * - 增加智能对齐,以及大小调整选项\n **/\n","import utils from './utils';\n\nfunction adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {\n const pos = utils.clone(elFuturePos);\n const size = {\n width: elRegion.width,\n height: elRegion.height,\n };\n\n if (overflow.adjustX && pos.left < visibleRect.left) {\n pos.left = visibleRect.left;\n }\n\n // Left edge inside and right edge outside viewport, try to resize it.\n if (\n overflow.resizeWidth &&\n pos.left >= visibleRect.left &&\n pos.left + size.width > visibleRect.right\n ) {\n size.width -= pos.left + size.width - visibleRect.right;\n }\n\n // Right edge outside viewport, try to move it.\n if (overflow.adjustX && pos.left + size.width > visibleRect.right) {\n // 保证左边界和可视区域左边界对齐\n pos.left = Math.max(visibleRect.right - size.width, visibleRect.left);\n }\n\n // Top edge outside viewport, try to move it.\n if (overflow.adjustY && pos.top < visibleRect.top) {\n pos.top = visibleRect.top;\n }\n\n // Top edge inside and bottom edge outside viewport, try to resize it.\n if (\n overflow.resizeHeight &&\n pos.top >= visibleRect.top &&\n pos.top + size.height > visibleRect.bottom\n ) {\n size.height -= pos.top + size.height - visibleRect.bottom;\n }\n\n // Bottom edge outside viewport, try to move it.\n if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) {\n // 保证上边界和可视区域上边界对齐\n pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top);\n }\n\n return utils.mix(pos, size);\n}\n\nexport default adjustForViewport;\n","import doAlign from './align';\nimport getOffsetParent from '../getOffsetParent';\nimport getVisibleRectForElement from '../getVisibleRectForElement';\nimport getRegion from '../getRegion';\n\nfunction isOutOfVisibleRect(target, alwaysByViewport) {\n const visibleRect = getVisibleRectForElement(target, alwaysByViewport);\n const targetRegion = getRegion(target);\n\n return (\n !visibleRect ||\n targetRegion.left + targetRegion.width <= visibleRect.left ||\n targetRegion.top + targetRegion.height <= visibleRect.top ||\n targetRegion.left >= visibleRect.right ||\n targetRegion.top >= visibleRect.bottom\n );\n}\n\nfunction alignElement(el, refNode, align) {\n const target = align.target || refNode;\n const refNodeRegion = getRegion(target);\n\n const isTargetNotOutOfVisible = !isOutOfVisibleRect(\n target,\n align.overflow && align.overflow.alwaysByViewport,\n );\n\n return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible);\n}\n\nalignElement.__getOffsetParent = getOffsetParent;\n\nalignElement.__getVisibleRectForElement = getVisibleRectForElement;\n\nexport default alignElement;\n","import utils from '../utils';\nimport doAlign from './align';\n\n/**\n * `tgtPoint`: { pageX, pageY } or { clientX, clientY }.\n * If client position provided, will internal convert to page position.\n */\n\nfunction alignPoint(el, tgtPoint, align) {\n let pageX;\n let pageY;\n\n const doc = utils.getDocument(el);\n const win = doc.defaultView || doc.parentWindow;\n\n const scrollX = utils.getWindowScrollLeft(win);\n const scrollY = utils.getWindowScrollTop(win);\n const viewportWidth = utils.viewportWidth(win);\n const viewportHeight = utils.viewportHeight(win);\n\n if ('pageX' in tgtPoint) {\n pageX = tgtPoint.pageX;\n } else {\n pageX = scrollX + tgtPoint.clientX;\n }\n\n if ('pageY' in tgtPoint) {\n pageY = tgtPoint.pageY;\n } else {\n pageY = scrollY + tgtPoint.clientY;\n }\n\n const tgtRegion = {\n left: pageX,\n top: pageY,\n width: 0,\n height: 0,\n };\n\n const pointInView =\n pageX >= 0 &&\n pageX <= scrollX + viewportWidth &&\n (pageY >= 0 && pageY <= scrollY + viewportHeight);\n\n // Provide default target point\n const points = [align.points[0], 'cc'];\n\n return doAlign(el, tgtRegion, { ...align, points }, pointInView);\n}\n\nexport default alignPoint;\n","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport ResizeObserver from 'resize-observer-polyfill';\nimport contains from \"rc-util/es/Dom/contains\";\nexport function isSamePoint(prev, next) {\n if (prev === next) return true;\n if (!prev || !next) return false;\n\n if ('pageX' in next && 'pageY' in next) {\n return prev.pageX === next.pageX && prev.pageY === next.pageY;\n }\n\n if ('clientX' in next && 'clientY' in next) {\n return prev.clientX === next.clientX && prev.clientY === next.clientY;\n }\n\n return false;\n}\nexport function restoreFocus(activeElement, container) {\n // Focus back if is in the container\n if (activeElement !== document.activeElement && contains(container, activeElement)) {\n activeElement.focus();\n }\n}\nexport function monitorResize(element, callback) {\n var prevWidth = null;\n var prevHeight = null;\n\n function onResize(_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n target = _ref2[0].target;\n\n var _target$getBoundingCl = target.getBoundingClientRect(),\n width = _target$getBoundingCl.width,\n height = _target$getBoundingCl.height;\n\n var fixedWidth = Math.floor(width);\n var fixedHeight = Math.floor(height);\n\n if (prevWidth !== fixedWidth || prevHeight !== fixedHeight) {\n callback({\n width: fixedWidth,\n height: fixedHeight\n });\n }\n\n prevWidth = fixedWidth;\n prevHeight = fixedHeight;\n }\n\n var resizeObserver = new ResizeObserver(onResize);\n\n if (element) {\n resizeObserver.observe(element);\n }\n\n return function () {\n resizeObserver.disconnect();\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\n * Removed props:\n * - childrenProps\n */\nimport React from 'react';\nimport { composeRef } from \"rc-util/es/ref\";\nimport { alignElement, alignPoint } from 'dom-align';\nimport addEventListener from \"rc-util/es/Dom/addEventListener\";\nimport { isSamePoint, restoreFocus, monitorResize } from './util';\nimport useBuffer from './hooks/useBuffer';\n\nfunction getElement(func) {\n if (typeof func !== 'function') return null;\n return func();\n}\n\nfunction getPoint(point) {\n if (_typeof(point) !== 'object' || !point) return null;\n return point;\n}\n\nvar Align = function Align(_ref, ref) {\n var children = _ref.children,\n disabled = _ref.disabled,\n target = _ref.target,\n align = _ref.align,\n onAlign = _ref.onAlign,\n monitorWindowResize = _ref.monitorWindowResize,\n _ref$monitorBufferTim = _ref.monitorBufferTime,\n monitorBufferTime = _ref$monitorBufferTim === void 0 ? 0 : _ref$monitorBufferTim;\n var cacheRef = React.useRef({});\n var nodeRef = React.useRef();\n var childNode = React.Children.only(children); // ===================== Align ======================\n // We save the props here to avoid closure makes props ood\n\n var forceAlignPropsRef = React.useRef({});\n forceAlignPropsRef.current.disabled = disabled;\n forceAlignPropsRef.current.target = target;\n forceAlignPropsRef.current.onAlign = onAlign;\n\n var _useBuffer = useBuffer(function () {\n var _forceAlignPropsRef$c = forceAlignPropsRef.current,\n latestDisabled = _forceAlignPropsRef$c.disabled,\n latestTarget = _forceAlignPropsRef$c.target;\n\n if (!latestDisabled && latestTarget) {\n var source = nodeRef.current;\n var result;\n var element = getElement(latestTarget);\n var point = getPoint(latestTarget);\n cacheRef.current.element = element;\n cacheRef.current.point = point; // IE lose focus after element realign\n // We should record activeElement and restore later\n\n var _document = document,\n activeElement = _document.activeElement;\n\n if (element) {\n result = alignElement(source, element, align);\n } else if (point) {\n result = alignPoint(source, point, align);\n }\n\n restoreFocus(activeElement, source);\n\n if (onAlign) {\n onAlign(source, result);\n }\n\n return true;\n }\n\n return false;\n }, monitorBufferTime),\n _useBuffer2 = _slicedToArray(_useBuffer, 2),\n _forceAlign = _useBuffer2[0],\n cancelForceAlign = _useBuffer2[1]; // ===================== Effect =====================\n // Listen for target updated\n\n\n var resizeMonitor = React.useRef({\n cancel: function cancel() {}\n }); // Listen for source updated\n\n var sourceResizeMonitor = React.useRef({\n cancel: function cancel() {}\n });\n React.useEffect(function () {\n var element = getElement(target);\n var point = getPoint(target);\n\n if (nodeRef.current !== sourceResizeMonitor.current.element) {\n sourceResizeMonitor.current.cancel();\n sourceResizeMonitor.current.element = nodeRef.current;\n sourceResizeMonitor.current.cancel = monitorResize(nodeRef.current, _forceAlign);\n }\n\n if (cacheRef.current.element !== element || !isSamePoint(cacheRef.current.point, point)) {\n _forceAlign(); // Add resize observer\n\n\n if (resizeMonitor.current.element !== element) {\n resizeMonitor.current.cancel();\n resizeMonitor.current.element = element;\n resizeMonitor.current.cancel = monitorResize(element, _forceAlign);\n }\n }\n }); // Listen for disabled change\n\n React.useEffect(function () {\n if (!disabled) {\n _forceAlign();\n } else {\n cancelForceAlign();\n }\n }, [disabled]); // Listen for window resize\n\n var winResizeRef = React.useRef(null);\n React.useEffect(function () {\n if (monitorWindowResize) {\n if (!winResizeRef.current) {\n winResizeRef.current = addEventListener(window, 'resize', _forceAlign);\n }\n } else if (winResizeRef.current) {\n winResizeRef.current.remove();\n winResizeRef.current = null;\n }\n }, [monitorWindowResize]); // Clear all if unmount\n\n React.useEffect(function () {\n return function () {\n resizeMonitor.current.cancel();\n sourceResizeMonitor.current.cancel();\n if (winResizeRef.current) winResizeRef.current.remove();\n cancelForceAlign();\n };\n }, []); // ====================== Ref =======================\n\n React.useImperativeHandle(ref, function () {\n return {\n forceAlign: function forceAlign() {\n return _forceAlign(true);\n }\n };\n }); // ===================== Render =====================\n\n if (React.isValidElement(childNode)) {\n childNode = React.cloneElement(childNode, {\n ref: composeRef(childNode.ref, nodeRef)\n });\n }\n\n return childNode;\n};\n\nvar RefAlign = React.forwardRef(Align);\nRefAlign.displayName = 'Align';\nexport default RefAlign;","import React from 'react';\nexport default (function (callback, buffer) {\n var calledRef = React.useRef(false);\n var timeoutRef = React.useRef(null);\n\n function cancelTrigger() {\n window.clearTimeout(timeoutRef.current);\n }\n\n function trigger(force) {\n if (!calledRef.current || force === true) {\n if (callback() === false) {\n // Not delay since callback cancelled self\n return;\n }\n\n calledRef.current = true;\n cancelTrigger();\n timeoutRef.current = window.setTimeout(function () {\n calledRef.current = false;\n }, buffer);\n } else {\n cancelTrigger();\n timeoutRef.current = window.setTimeout(function () {\n calledRef.current = false;\n trigger();\n }, buffer);\n }\n }\n\n return [trigger, function () {\n calledRef.current = false;\n cancelTrigger();\n }];\n});","// export this package's api\nimport Align from './Align';\nexport default Align;","var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// ================= Transition =================\n// Event wrapper. Copy from react source code\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n prefixes['ms' + styleProp] = 'MS' + eventName;\n prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();\n\n return prefixes;\n}\n\nexport function getVendorPrefixes(domSupport, win) {\n var prefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n };\n\n if (domSupport) {\n if (!('AnimationEvent' in win)) {\n delete prefixes.animationend.animation;\n }\n\n if (!('TransitionEvent' in win)) {\n delete prefixes.transitionend.transition;\n }\n }\n\n return prefixes;\n}\n\nvar vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {});\n\nvar style = {};\n\nif (canUseDOM) {\n style = document.createElement('div').style;\n}\n\nvar prefixedEventNames = {};\n\nexport function getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n if (prefixMap) {\n var stylePropList = Object.keys(prefixMap);\n var len = stylePropList.length;\n for (var i = 0; i < len; i += 1) {\n var styleProp = stylePropList[i];\n if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {\n prefixedEventNames[eventName] = prefixMap[styleProp];\n return prefixedEventNames[eventName];\n }\n }\n }\n\n return '';\n}\n\nexport var animationEndName = getVendorPrefixedEventName('animationend');\nexport var transitionEndName = getVendorPrefixedEventName('transitionend');\nexport var supportTransition = !!(animationEndName && transitionEndName);\n\nexport function getTransitionName(transitionName, transitionType) {\n if (!transitionName) return null;\n\n if (typeof transitionName === 'object') {\n var type = transitionType.replace(/-\\w/g, function (match) {\n return match[1].toUpperCase();\n });\n return transitionName[type];\n }\n\n return transitionName + '-' + transitionType;\n}","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */\nimport React from 'react';\nimport findDOMNode from 'rc-util/es/Dom/findDOMNode';\nimport classNames from 'classnames';\nimport raf from 'raf';\nimport { getTransitionName, animationEndName, transitionEndName, supportTransition } from './util/motion';\n\nvar STATUS_NONE = 'none';\nvar STATUS_APPEAR = 'appear';\nvar STATUS_ENTER = 'enter';\nvar STATUS_LEAVE = 'leave';\n\n/**\n * `transitionSupport` is used for none transition test case.\n * Default we use browser transition event support check.\n */\nexport function genCSSMotion(config) {\n var transitionSupport = config;\n var forwardRef = !!React.forwardRef;\n\n if (typeof config === 'object') {\n transitionSupport = config.transitionSupport;\n forwardRef = 'forwardRef' in config ? config.forwardRef : forwardRef;\n }\n\n function isSupportTransition(props) {\n return !!(props.motionName && transitionSupport);\n }\n\n var CSSMotion = function (_React$Component) {\n _inherits(CSSMotion, _React$Component);\n\n function CSSMotion() {\n _classCallCheck(this, CSSMotion);\n\n var _this = _possibleConstructorReturn(this, (CSSMotion.__proto__ || Object.getPrototypeOf(CSSMotion)).call(this));\n\n _this.onDomUpdate = function () {\n var _this$state = _this.state,\n status = _this$state.status,\n newStatus = _this$state.newStatus;\n var _this$props = _this.props,\n onAppearStart = _this$props.onAppearStart,\n onEnterStart = _this$props.onEnterStart,\n onLeaveStart = _this$props.onLeaveStart,\n onAppearActive = _this$props.onAppearActive,\n onEnterActive = _this$props.onEnterActive,\n onLeaveActive = _this$props.onLeaveActive,\n motionAppear = _this$props.motionAppear,\n motionEnter = _this$props.motionEnter,\n motionLeave = _this$props.motionLeave;\n\n\n if (!isSupportTransition(_this.props)) {\n return;\n }\n\n // Event injection\n var $ele = _this.getElement();\n if (_this.$cacheEle !== $ele) {\n _this.removeEventListener(_this.$cacheEle);\n _this.addEventListener($ele);\n _this.$cacheEle = $ele;\n }\n\n // Init status\n if (newStatus && status === STATUS_APPEAR && motionAppear) {\n _this.updateStatus(onAppearStart, null, null, function () {\n _this.updateActiveStatus(onAppearActive, STATUS_APPEAR);\n });\n } else if (newStatus && status === STATUS_ENTER && motionEnter) {\n _this.updateStatus(onEnterStart, null, null, function () {\n _this.updateActiveStatus(onEnterActive, STATUS_ENTER);\n });\n } else if (newStatus && status === STATUS_LEAVE && motionLeave) {\n _this.updateStatus(onLeaveStart, null, null, function () {\n _this.updateActiveStatus(onLeaveActive, STATUS_LEAVE);\n });\n }\n };\n\n _this.onMotionEnd = function (event) {\n var _this$state2 = _this.state,\n status = _this$state2.status,\n statusActive = _this$state2.statusActive;\n var _this$props2 = _this.props,\n onAppearEnd = _this$props2.onAppearEnd,\n onEnterEnd = _this$props2.onEnterEnd,\n onLeaveEnd = _this$props2.onLeaveEnd;\n\n if (status === STATUS_APPEAR && statusActive) {\n _this.updateStatus(onAppearEnd, { status: STATUS_NONE }, event);\n } else if (status === STATUS_ENTER && statusActive) {\n _this.updateStatus(onEnterEnd, { status: STATUS_NONE }, event);\n } else if (status === STATUS_LEAVE && statusActive) {\n _this.updateStatus(onLeaveEnd, { status: STATUS_NONE }, event);\n }\n };\n\n _this.setNodeRef = function (node) {\n var internalRef = _this.props.internalRef;\n\n _this.node = node;\n\n if (typeof internalRef === 'function') {\n internalRef(node);\n } else if (internalRef && 'current' in internalRef) {\n internalRef.current = node;\n }\n };\n\n _this.getElement = function () {\n try {\n return findDOMNode(_this.node || _this);\n } catch (e) {\n /**\n * Fallback to cache element.\n * This is only happen when `motionDeadline` trigger but element removed.\n */\n return _this.$cacheEle;\n }\n };\n\n _this.addEventListener = function ($ele) {\n if (!$ele) return;\n\n $ele.addEventListener(transitionEndName, _this.onMotionEnd);\n $ele.addEventListener(animationEndName, _this.onMotionEnd);\n };\n\n _this.removeEventListener = function ($ele) {\n if (!$ele) return;\n\n $ele.removeEventListener(transitionEndName, _this.onMotionEnd);\n $ele.removeEventListener(animationEndName, _this.onMotionEnd);\n };\n\n _this.updateStatus = function (styleFunc, additionalState, event, callback) {\n var statusStyle = styleFunc ? styleFunc(_this.getElement(), event) : null;\n\n if (statusStyle === false || _this._destroyed) return;\n\n var nextStep = void 0;\n if (callback) {\n nextStep = function nextStep() {\n _this.nextFrame(callback);\n };\n }\n\n _this.setState(_extends({\n statusStyle: typeof statusStyle === 'object' ? statusStyle : null,\n newStatus: false\n }, additionalState), nextStep); // Trigger before next frame & after `componentDidMount`\n };\n\n _this.updateActiveStatus = function (styleFunc, currentStatus) {\n // `setState` use `postMessage` to trigger at the end of frame.\n // Let's use requestAnimationFrame to update new state in next frame.\n _this.nextFrame(function () {\n var status = _this.state.status;\n\n if (status !== currentStatus) return;\n\n var motionDeadline = _this.props.motionDeadline;\n\n\n _this.updateStatus(styleFunc, { statusActive: true });\n\n if (motionDeadline > 0) {\n setTimeout(function () {\n _this.onMotionEnd({\n deadline: true\n });\n }, motionDeadline);\n }\n });\n };\n\n _this.nextFrame = function (func) {\n _this.cancelNextFrame();\n _this.raf = raf(func);\n };\n\n _this.cancelNextFrame = function () {\n if (_this.raf) {\n raf.cancel(_this.raf);\n _this.raf = null;\n }\n };\n\n _this.state = {\n status: STATUS_NONE,\n statusActive: false,\n newStatus: false,\n statusStyle: null\n };\n _this.$cacheEle = null;\n _this.node = null;\n _this.raf = null;\n return _this;\n }\n\n _createClass(CSSMotion, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n this.onDomUpdate();\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate() {\n this.onDomUpdate();\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this._destroyed = true;\n this.removeEventListener(this.$cacheEle);\n this.cancelNextFrame();\n }\n }, {\n key: 'render',\n value: function render() {\n var _classNames;\n\n var _state = this.state,\n status = _state.status,\n statusActive = _state.statusActive,\n statusStyle = _state.statusStyle;\n var _props = this.props,\n children = _props.children,\n motionName = _props.motionName,\n visible = _props.visible,\n removeOnLeave = _props.removeOnLeave,\n leavedClassName = _props.leavedClassName,\n eventProps = _props.eventProps;\n\n\n if (!children) return null;\n\n if (status === STATUS_NONE || !isSupportTransition(this.props)) {\n if (visible) {\n return children(_extends({}, eventProps), this.setNodeRef);\n } else if (!removeOnLeave) {\n return children(_extends({}, eventProps, { className: leavedClassName }), this.setNodeRef);\n }\n\n return null;\n }\n\n return children(_extends({}, eventProps, {\n className: classNames((_classNames = {}, _defineProperty(_classNames, getTransitionName(motionName, status), status !== STATUS_NONE), _defineProperty(_classNames, getTransitionName(motionName, status + '-active'), status !== STATUS_NONE && statusActive), _defineProperty(_classNames, motionName, typeof motionName === 'string'), _classNames)),\n style: statusStyle\n }), this.setNodeRef);\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(props, _ref) {\n var prevProps = _ref.prevProps,\n prevStatus = _ref.status;\n\n if (!isSupportTransition(props)) return {};\n\n var visible = props.visible,\n motionAppear = props.motionAppear,\n motionEnter = props.motionEnter,\n motionLeave = props.motionLeave,\n motionLeaveImmediately = props.motionLeaveImmediately;\n\n var newState = {\n prevProps: props\n };\n\n // Clean up status if prop set to false\n if (prevStatus === STATUS_APPEAR && !motionAppear || prevStatus === STATUS_ENTER && !motionEnter || prevStatus === STATUS_LEAVE && !motionLeave) {\n newState.status = STATUS_NONE;\n newState.statusActive = false;\n newState.newStatus = false;\n }\n\n // Appear\n if (!prevProps && visible && motionAppear) {\n newState.status = STATUS_APPEAR;\n newState.statusActive = false;\n newState.newStatus = true;\n }\n\n // Enter\n if (prevProps && !prevProps.visible && visible && motionEnter) {\n newState.status = STATUS_ENTER;\n newState.statusActive = false;\n newState.newStatus = true;\n }\n\n // Leave\n if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) {\n newState.status = STATUS_LEAVE;\n newState.statusActive = false;\n newState.newStatus = true;\n }\n\n return newState;\n }\n }]);\n\n return CSSMotion;\n }(React.Component);\n\n CSSMotion.defaultProps = {\n visible: true,\n motionEnter: true,\n motionAppear: true,\n motionLeave: true,\n removeOnLeave: true\n };\n\n\n if (!forwardRef) {\n return CSSMotion;\n }\n\n return React.forwardRef(function (props, ref) {\n return React.createElement(CSSMotion, _extends({ internalRef: ref }, props));\n });\n}\n\nexport default genCSSMotion(supportTransition);","import React from 'react';\nimport classNames from 'classnames';\n\nvar PopupInner = function PopupInner(props, ref) {\n var prefixCls = props.prefixCls,\n className = props.className,\n visible = props.visible,\n style = props.style,\n children = props.children,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n onMouseDown = props.onMouseDown,\n onTouchStart = props.onTouchStart;\n var childNode = children;\n\n if (React.Children.count(children) > 1) {\n childNode = React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-content\")\n }, children);\n }\n\n return React.createElement(\"div\", {\n ref: ref,\n className: classNames(className, !visible && \"\".concat(props.hiddenClassName)),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseDown: onMouseDown,\n onTouchStart: onTouchStart,\n style: style\n }, childNode);\n};\n\nvar RefPopupInner = React.forwardRef(PopupInner);\nRefPopupInner.displayName = 'PopupInner';\nexport default RefPopupInner;","export function getMotion(_ref) {\n var prefixCls = _ref.prefixCls,\n motion = _ref.motion,\n animation = _ref.animation,\n transitionName = _ref.transitionName;\n\n if (motion) {\n return motion;\n }\n\n if (animation) {\n return {\n motionName: \"\".concat(prefixCls, \"-\").concat(animation)\n };\n }\n\n if (transitionName) {\n return {\n motionName: transitionName\n };\n }\n\n return null;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/* eslint-disable no-param-reassign */\nimport React, { Component } from 'react';\nimport raf from 'raf';\nimport Align from 'rc-align';\nimport { composeRef } from \"rc-util/es/ref\";\nimport classNames from 'classnames';\nimport RawCSSMotion from \"rc-animate/es/CSSMotion\";\nimport PopupInner from './PopupInner';\nimport { getMotion } from './utils/legacyUtil';\nvar CSSMotion = RawCSSMotion;\n\nfunction supportMotion(motion) {\n return motion && motion.motionName;\n}\n\nvar Popup = /*#__PURE__*/function (_Component) {\n _inherits(Popup, _Component);\n\n var _super = _createSuper(Popup);\n\n function Popup() {\n var _this;\n\n _classCallCheck(this, Popup);\n\n _this = _super.apply(this, arguments);\n _this.state = {\n targetWidth: undefined,\n targetHeight: undefined,\n status: null,\n prevVisible: null,\n alignClassName: null\n };\n _this.popupRef = React.createRef();\n _this.alignRef = React.createRef();\n _this.nextFrameState = null;\n _this.nextFrameId = null;\n\n _this.onAlign = function (popupDomNode, align) {\n var status = _this.state.status;\n var _this$props = _this.props,\n getClassNameFromAlign = _this$props.getClassNameFromAlign,\n onAlign = _this$props.onAlign;\n var alignClassName = getClassNameFromAlign(align);\n\n if (status === 'align') {\n _this.setState({\n alignClassName: alignClassName,\n status: 'aligned'\n }, function () {\n _this.alignRef.current.forceAlign();\n });\n } else if (status === 'aligned') {\n _this.setState({\n alignClassName: alignClassName,\n status: 'afterAlign'\n });\n\n onAlign(popupDomNode, align);\n } else {\n _this.setState({\n alignClassName: alignClassName\n });\n }\n };\n\n _this.onMotionEnd = function () {\n var visible = _this.props.visible;\n\n _this.setState({\n status: visible ? 'AfterMotion' : 'stable'\n });\n };\n\n _this.setStateOnNextFrame = function (state) {\n _this.cancelFrameState();\n\n _this.nextFrameState = _objectSpread(_objectSpread({}, _this.nextFrameState), state);\n _this.nextFrameId = raf(function () {\n var submitState = _objectSpread({}, _this.nextFrameState);\n\n _this.nextFrameState = null;\n\n _this.setState(submitState);\n });\n };\n\n _this.getMotion = function () {\n return _objectSpread({}, getMotion(_this.props));\n }; // `target` on `rc-align` can accept as a function to get the bind element or a point.\n // ref: https://www.npmjs.com/package/rc-align\n\n\n _this.getAlignTarget = function () {\n var _this$props2 = _this.props,\n point = _this$props2.point,\n getRootDomNode = _this$props2.getRootDomNode;\n\n if (point) {\n return point;\n }\n\n return getRootDomNode;\n };\n\n _this.cancelFrameState = function () {\n raf.cancel(_this.nextFrameId);\n };\n\n _this.renderPopupElement = function () {\n var _this$state = _this.state,\n status = _this$state.status,\n targetHeight = _this$state.targetHeight,\n targetWidth = _this$state.targetWidth,\n alignClassName = _this$state.alignClassName;\n var _this$props3 = _this.props,\n prefixCls = _this$props3.prefixCls,\n className = _this$props3.className,\n style = _this$props3.style,\n stretch = _this$props3.stretch,\n visible = _this$props3.visible,\n align = _this$props3.align,\n destroyPopupOnHide = _this$props3.destroyPopupOnHide,\n onMouseEnter = _this$props3.onMouseEnter,\n onMouseLeave = _this$props3.onMouseLeave,\n onMouseDown = _this$props3.onMouseDown,\n onTouchStart = _this$props3.onTouchStart,\n children = _this$props3.children;\n var mergedClassName = classNames(prefixCls, className, alignClassName);\n var hiddenClassName = \"\".concat(prefixCls, \"-hidden\"); // ================== Style ==================\n\n var sizeStyle = {};\n\n if (stretch) {\n // Stretch with target\n if (stretch.indexOf('height') !== -1) {\n sizeStyle.height = targetHeight;\n } else if (stretch.indexOf('minHeight') !== -1) {\n sizeStyle.minHeight = targetHeight;\n }\n\n if (stretch.indexOf('width') !== -1) {\n sizeStyle.width = targetWidth;\n } else if (stretch.indexOf('minWidth') !== -1) {\n sizeStyle.minWidth = targetWidth;\n }\n }\n\n var mergedStyle = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, sizeStyle), _this.getZIndexStyle()), style), {}, {\n opacity: status === 'stable' || !visible ? undefined : 0\n }); // ================= Motions =================\n\n\n var mergedMotion = _this.getMotion();\n\n var mergedMotionVisible = visible;\n\n if (visible && status !== 'beforeMotion' && status !== 'motion' && status !== 'stable') {\n mergedMotion.motionAppear = false;\n mergedMotion.motionEnter = false;\n mergedMotion.motionLeave = false;\n }\n\n if (status === 'afterAlign' || status === 'beforeMotion') {\n mergedMotionVisible = false;\n } // ================== Align ==================\n\n\n var mergedAlignDisabled = !visible || status !== 'align' && status !== 'aligned' && status !== 'stable'; // ================== Popup ==================\n\n var mergedPopupVisible = true;\n\n if (status === 'stable') {\n mergedPopupVisible = visible;\n } // Only remove popup since mask may still need animation\n\n\n if (destroyPopupOnHide && !mergedPopupVisible) {\n return null;\n }\n\n return React.createElement(CSSMotion, Object.assign({\n visible: mergedMotionVisible\n }, mergedMotion, {\n removeOnLeave: false,\n onEnterEnd: _this.onMotionEnd,\n onLeaveEnd: _this.onMotionEnd\n }), function (_ref, motionRef) {\n var motionStyle = _ref.style,\n motionClassName = _ref.className;\n return React.createElement(Align, {\n target: _this.getAlignTarget(),\n key: \"popup\",\n ref: _this.alignRef,\n monitorWindowResize: true,\n disabled: mergedAlignDisabled,\n align: align,\n onAlign: _this.onAlign\n }, React.createElement(PopupInner, {\n prefixCls: prefixCls,\n visible: mergedPopupVisible,\n hiddenClassName: hiddenClassName,\n className: classNames(mergedClassName, motionClassName),\n ref: composeRef(motionRef, _this.popupRef),\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n onMouseDown: onMouseDown,\n onTouchStart: onTouchStart,\n style: _objectSpread(_objectSpread({}, mergedStyle), motionStyle)\n }, children));\n });\n };\n\n _this.renderMaskElement = function () {\n var _this$props4 = _this.props,\n mask = _this$props4.mask,\n maskMotion = _this$props4.maskMotion,\n maskTransitionName = _this$props4.maskTransitionName,\n maskAnimation = _this$props4.maskAnimation,\n prefixCls = _this$props4.prefixCls,\n visible = _this$props4.visible;\n\n if (!mask) {\n return null;\n }\n\n var motion = {};\n\n if (maskMotion && maskMotion.motionName) {\n motion = _objectSpread({\n motionAppear: true\n }, getMotion({\n motion: maskMotion,\n prefixCls: prefixCls,\n transitionName: maskTransitionName,\n animation: maskAnimation\n }));\n }\n\n return React.createElement(CSSMotion, Object.assign({}, motion, {\n visible: visible,\n removeOnLeave: true\n }), function (_ref2) {\n var className = _ref2.className;\n return React.createElement(\"div\", {\n style: _this.getZIndexStyle(),\n key: \"mask\",\n className: classNames(\"\".concat(prefixCls, \"-mask\"), className)\n });\n });\n };\n\n return _this;\n }\n\n _createClass(Popup, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var status = this.state.status;\n var _this$props5 = this.props,\n getRootDomNode = _this$props5.getRootDomNode,\n visible = _this$props5.visible,\n stretch = _this$props5.stretch; // If there is a pending state update, cancel it, a new one will be set if necessary\n\n this.cancelFrameState();\n\n if (visible && status !== 'stable') {\n switch (status) {\n case null:\n {\n this.setStateOnNextFrame({\n status: stretch ? 'measure' : 'align'\n });\n break;\n }\n\n case 'afterAlign':\n {\n this.setStateOnNextFrame({\n status: supportMotion(this.getMotion()) ? 'beforeMotion' : 'stable'\n });\n break;\n }\n\n case 'AfterMotion':\n {\n this.setStateOnNextFrame({\n status: 'stable'\n });\n break;\n }\n\n default:\n {\n // Go to next status\n var queue = ['measure', 'align', null, 'beforeMotion', 'motion'];\n var index = queue.indexOf(status);\n var nextStatus = queue[index + 1];\n\n if (index !== -1 && nextStatus) {\n this.setStateOnNextFrame({\n status: nextStatus\n });\n }\n }\n }\n } // Measure stretch size\n\n\n if (status === 'measure') {\n var $ele = getRootDomNode();\n\n if ($ele) {\n this.setStateOnNextFrame({\n targetHeight: $ele.offsetHeight,\n targetWidth: $ele.offsetWidth\n });\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.cancelFrameState();\n }\n }, {\n key: \"getZIndexStyle\",\n value: function getZIndexStyle() {\n var zIndex = this.props.zIndex;\n return {\n zIndex: zIndex\n };\n }\n }, {\n key: \"render\",\n value: function render() {\n return React.createElement(\"div\", null, this.renderMaskElement(), this.renderPopupElement());\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref3, _ref4) {\n var visible = _ref3.visible,\n props = _objectWithoutProperties(_ref3, [\"visible\"]);\n\n var prevVisible = _ref4.prevVisible,\n status = _ref4.status;\n var newState = {\n prevVisible: visible,\n status: status\n };\n var mergedMotion = getMotion(props);\n\n if (prevVisible === null && visible === false) {\n // Init render should always be stable\n newState.status = 'stable';\n } else if (visible !== prevVisible) {\n if (visible || supportMotion(mergedMotion) && ['motion', 'AfterMotion', 'stable'].includes(status)) {\n newState.status = null;\n } else {\n newState.status = 'stable';\n }\n\n if (visible) {\n newState.alignClassName = null;\n }\n }\n\n return newState;\n }\n }]);\n\n return Popup;\n}(Component);\n\nexport default Popup;\n/* eslint-enable */","import React from 'react';\nvar TriggerContext = React.createContext(null);\nexport default TriggerContext;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport contains from \"rc-util/es/Dom/contains\";\nimport findDOMNode from \"rc-util/es/Dom/findDOMNode\";\nimport { composeRef, supportRef } from \"rc-util/es/ref\";\nimport addEventListener from \"rc-util/es/Dom/addEventListener\";\nimport Portal from \"rc-util/es/Portal\";\nimport classNames from 'classnames';\nimport { getAlignFromPlacement, getAlignPopupClassName } from './utils/alignUtil';\nimport Popup from './Popup';\nimport TriggerContext from './context';\n\nfunction noop() {}\n\nfunction returnEmptyString() {\n return '';\n}\n\nfunction returnDocument() {\n return window.document;\n}\n\nvar ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];\n/**\n * Internal usage. Do not use in your code since this will be removed.\n */\n\nexport function generateTrigger(PortalComponent) {\n var Trigger = /*#__PURE__*/function (_React$Component) {\n _inherits(Trigger, _React$Component);\n\n var _super = _createSuper(Trigger);\n\n function Trigger(props) {\n var _this;\n\n _classCallCheck(this, Trigger);\n\n _this = _super.call(this, props);\n _this.popupRef = React.createRef();\n _this.triggerRef = React.createRef();\n\n _this.onMouseEnter = function (e) {\n var mouseEnterDelay = _this.props.mouseEnterDelay;\n\n _this.fireEvents('onMouseEnter', e);\n\n _this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);\n };\n\n _this.onMouseMove = function (e) {\n _this.fireEvents('onMouseMove', e);\n\n _this.setPoint(e);\n };\n\n _this.onMouseLeave = function (e) {\n _this.fireEvents('onMouseLeave', e);\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onPopupMouseEnter = function () {\n _this.clearDelayTimer();\n };\n\n _this.onPopupMouseLeave = function (e) {\n // https://github.com/react-component/trigger/pull/13\n // react bug?\n if (e.relatedTarget && !e.relatedTarget.setTimeout && _this.popupRef.current && _this.popupRef.current.popupRef.current && contains(_this.popupRef.current.popupRef.current, e.relatedTarget)) {\n return;\n }\n\n _this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);\n };\n\n _this.onFocus = function (e) {\n _this.fireEvents('onFocus', e); // incase focusin and focusout\n\n\n _this.clearDelayTimer();\n\n if (_this.isFocusToShow()) {\n _this.focusTime = Date.now();\n\n _this.delaySetPopupVisible(true, _this.props.focusDelay);\n }\n };\n\n _this.onMouseDown = function (e) {\n _this.fireEvents('onMouseDown', e);\n\n _this.preClickTime = Date.now();\n };\n\n _this.onTouchStart = function (e) {\n _this.fireEvents('onTouchStart', e);\n\n _this.preTouchTime = Date.now();\n };\n\n _this.onBlur = function (e) {\n _this.fireEvents('onBlur', e);\n\n _this.clearDelayTimer();\n\n if (_this.isBlurToHide()) {\n _this.delaySetPopupVisible(false, _this.props.blurDelay);\n }\n };\n\n _this.onContextMenu = function (e) {\n e.preventDefault();\n\n _this.fireEvents('onContextMenu', e);\n\n _this.setPopupVisible(true, e);\n };\n\n _this.onContextMenuClose = function () {\n if (_this.isContextMenuToShow()) {\n _this.close();\n }\n };\n\n _this.onClick = function (event) {\n _this.fireEvents('onClick', event); // focus will trigger click\n\n\n if (_this.focusTime) {\n var preTime;\n\n if (_this.preClickTime && _this.preTouchTime) {\n preTime = Math.min(_this.preClickTime, _this.preTouchTime);\n } else if (_this.preClickTime) {\n preTime = _this.preClickTime;\n } else if (_this.preTouchTime) {\n preTime = _this.preTouchTime;\n }\n\n if (Math.abs(preTime - _this.focusTime) < 20) {\n return;\n }\n\n _this.focusTime = 0;\n }\n\n _this.preClickTime = 0;\n _this.preTouchTime = 0; // Only prevent default when all the action is click.\n // https://github.com/ant-design/ant-design/issues/17043\n // https://github.com/ant-design/ant-design/issues/17291\n\n if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {\n event.preventDefault();\n }\n\n var nextVisible = !_this.state.popupVisible;\n\n if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {\n _this.setPopupVisible(!_this.state.popupVisible, event);\n }\n };\n\n _this.onPopupMouseDown = function () {\n _this.hasPopupMouseDown = true;\n clearTimeout(_this.mouseDownTimeout);\n _this.mouseDownTimeout = window.setTimeout(function () {\n _this.hasPopupMouseDown = false;\n }, 0);\n\n if (_this.context) {\n var _this$context;\n\n (_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);\n }\n };\n\n _this.onDocumentClick = function (event) {\n if (_this.props.mask && !_this.props.maskClosable) {\n return;\n }\n\n var target = event.target;\n\n var root = _this.getRootDomNode();\n\n var popupNode = _this.getPopupDomNode();\n\n if (!contains(root, target) && !contains(popupNode, target) && !_this.hasPopupMouseDown) {\n _this.close();\n }\n };\n\n _this.getRootDomNode = function () {\n var getTriggerDOMNode = _this.props.getTriggerDOMNode;\n\n if (getTriggerDOMNode) {\n return getTriggerDOMNode(_this.triggerRef.current);\n }\n\n try {\n var domNode = findDOMNode(_this.triggerRef.current);\n\n if (domNode) {\n return domNode;\n }\n } catch (err) {// Do nothing\n }\n\n return ReactDOM.findDOMNode(_assertThisInitialized(_this));\n };\n\n _this.getPopupClassNameFromAlign = function (align) {\n var className = [];\n var _this$props = _this.props,\n popupPlacement = _this$props.popupPlacement,\n builtinPlacements = _this$props.builtinPlacements,\n prefixCls = _this$props.prefixCls,\n alignPoint = _this$props.alignPoint,\n getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;\n\n if (popupPlacement && builtinPlacements) {\n className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));\n }\n\n if (getPopupClassNameFromAlign) {\n className.push(getPopupClassNameFromAlign(align));\n }\n\n return className.join(' ');\n };\n\n _this.getComponent = function () {\n var _this$props2 = _this.props,\n prefixCls = _this$props2.prefixCls,\n destroyPopupOnHide = _this$props2.destroyPopupOnHide,\n popupClassName = _this$props2.popupClassName,\n onPopupAlign = _this$props2.onPopupAlign,\n popupMotion = _this$props2.popupMotion,\n popupAnimation = _this$props2.popupAnimation,\n popupTransitionName = _this$props2.popupTransitionName,\n popupStyle = _this$props2.popupStyle,\n mask = _this$props2.mask,\n maskAnimation = _this$props2.maskAnimation,\n maskTransitionName = _this$props2.maskTransitionName,\n maskMotion = _this$props2.maskMotion,\n zIndex = _this$props2.zIndex,\n popup = _this$props2.popup,\n stretch = _this$props2.stretch,\n alignPoint = _this$props2.alignPoint;\n var _this$state = _this.state,\n popupVisible = _this$state.popupVisible,\n point = _this$state.point;\n\n var align = _this.getPopupAlign();\n\n var mouseProps = {};\n\n if (_this.isMouseEnterToShow()) {\n mouseProps.onMouseEnter = _this.onPopupMouseEnter;\n }\n\n if (_this.isMouseLeaveToHide()) {\n mouseProps.onMouseLeave = _this.onPopupMouseLeave;\n }\n\n mouseProps.onMouseDown = _this.onPopupMouseDown;\n mouseProps.onTouchStart = _this.onPopupMouseDown;\n return React.createElement(Popup, Object.assign({\n prefixCls: prefixCls,\n destroyPopupOnHide: destroyPopupOnHide,\n visible: popupVisible,\n point: alignPoint && point,\n className: popupClassName,\n align: align,\n onAlign: onPopupAlign,\n animation: popupAnimation,\n getClassNameFromAlign: _this.getPopupClassNameFromAlign\n }, mouseProps, {\n stretch: stretch,\n getRootDomNode: _this.getRootDomNode,\n style: popupStyle,\n mask: mask,\n zIndex: zIndex,\n transitionName: popupTransitionName,\n maskAnimation: maskAnimation,\n maskTransitionName: maskTransitionName,\n maskMotion: maskMotion,\n ref: _this.popupRef,\n motion: popupMotion\n }), typeof popup === 'function' ? popup() : popup);\n };\n\n _this.getContainer = function () {\n var _assertThisInitialize = _assertThisInitialized(_this),\n props = _assertThisInitialize.props;\n\n var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing\n // https://github.com/react-component/trigger/issues/41\n\n popupContainer.style.position = 'absolute';\n popupContainer.style.top = '0';\n popupContainer.style.left = '0';\n popupContainer.style.width = '100%';\n var mountNode = props.getPopupContainer ? props.getPopupContainer(_this.getRootDomNode()) : props.getDocument().body;\n mountNode.appendChild(popupContainer);\n return popupContainer;\n };\n\n _this.setPoint = function (point) {\n var alignPoint = _this.props.alignPoint;\n if (!alignPoint || !point) return;\n\n _this.setState({\n point: {\n pageX: point.pageX,\n pageY: point.pageY\n }\n });\n };\n\n _this.handlePortalUpdate = function () {\n if (_this.state.prevPopupVisible !== _this.state.popupVisible) {\n _this.props.afterPopupVisibleChange(_this.state.popupVisible);\n }\n };\n\n var popupVisible;\n\n if ('popupVisible' in props) {\n popupVisible = !!props.popupVisible;\n } else {\n popupVisible = !!props.defaultPopupVisible;\n }\n\n _this.state = {\n prevPopupVisible: popupVisible,\n popupVisible: popupVisible\n };\n ALL_HANDLERS.forEach(function (h) {\n _this[\"fire\".concat(h)] = function (e) {\n _this.fireEvents(h, e);\n };\n });\n return _this;\n }\n\n _createClass(Trigger, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.componentDidUpdate();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n var props = this.props;\n var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:\n // https://github.com/ant-design/ant-design/issues/5804\n // https://github.com/react-component/calendar/issues/250\n // https://github.com/react-component/trigger/issues/50\n\n if (state.popupVisible) {\n var currentDocument;\n\n if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {\n currentDocument = props.getDocument();\n this.clickOutsideHandler = addEventListener(currentDocument, 'mousedown', this.onDocumentClick);\n } // always hide on mobile\n\n\n if (!this.touchOutsideHandler) {\n currentDocument = currentDocument || props.getDocument();\n this.touchOutsideHandler = addEventListener(currentDocument, 'touchstart', this.onDocumentClick);\n } // close popup when trigger type contains 'onContextMenu' and document is scrolling.\n\n\n if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {\n currentDocument = currentDocument || props.getDocument();\n this.contextMenuOutsideHandler1 = addEventListener(currentDocument, 'scroll', this.onContextMenuClose);\n } // close popup when trigger type contains 'onContextMenu' and window is blur.\n\n\n if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {\n this.contextMenuOutsideHandler2 = addEventListener(window, 'blur', this.onContextMenuClose);\n }\n\n return;\n }\n\n this.clearOutsideHandler();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.clearDelayTimer();\n this.clearOutsideHandler();\n clearTimeout(this.mouseDownTimeout);\n }\n }, {\n key: \"getPopupDomNode\",\n value: function getPopupDomNode() {\n // for test\n if (this.popupRef.current && this.popupRef.current.popupRef.current) {\n return this.popupRef.current.popupRef.current;\n }\n\n return null;\n }\n }, {\n key: \"getPopupAlign\",\n value: function getPopupAlign() {\n var props = this.props;\n var popupPlacement = props.popupPlacement,\n popupAlign = props.popupAlign,\n builtinPlacements = props.builtinPlacements;\n\n if (popupPlacement && builtinPlacements) {\n return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);\n }\n\n return popupAlign;\n }\n /**\n * @param popupVisible Show or not the popup element\n * @param event SyntheticEvent, used for `pointAlign`\n */\n\n }, {\n key: \"setPopupVisible\",\n value: function setPopupVisible(popupVisible, event) {\n var alignPoint = this.props.alignPoint;\n var prevPopupVisible = this.state.popupVisible;\n this.clearDelayTimer();\n\n if (prevPopupVisible !== popupVisible) {\n if (!('popupVisible' in this.props)) {\n this.setState({\n popupVisible: popupVisible,\n prevPopupVisible: prevPopupVisible\n });\n }\n\n this.props.onPopupVisibleChange(popupVisible);\n } // Always record the point position since mouseEnterDelay will delay the show\n\n\n if (alignPoint && event) {\n this.setPoint(event);\n }\n }\n }, {\n key: \"delaySetPopupVisible\",\n value: function delaySetPopupVisible(visible, delayS, event) {\n var _this2 = this;\n\n var delay = delayS * 1000;\n this.clearDelayTimer();\n\n if (delay) {\n var point = event ? {\n pageX: event.pageX,\n pageY: event.pageY\n } : null;\n this.delayTimer = window.setTimeout(function () {\n _this2.setPopupVisible(visible, point);\n\n _this2.clearDelayTimer();\n }, delay);\n } else {\n this.setPopupVisible(visible, event);\n }\n }\n }, {\n key: \"clearDelayTimer\",\n value: function clearDelayTimer() {\n if (this.delayTimer) {\n clearTimeout(this.delayTimer);\n this.delayTimer = null;\n }\n }\n }, {\n key: \"clearOutsideHandler\",\n value: function clearOutsideHandler() {\n if (this.clickOutsideHandler) {\n this.clickOutsideHandler.remove();\n this.clickOutsideHandler = null;\n }\n\n if (this.contextMenuOutsideHandler1) {\n this.contextMenuOutsideHandler1.remove();\n this.contextMenuOutsideHandler1 = null;\n }\n\n if (this.contextMenuOutsideHandler2) {\n this.contextMenuOutsideHandler2.remove();\n this.contextMenuOutsideHandler2 = null;\n }\n\n if (this.touchOutsideHandler) {\n this.touchOutsideHandler.remove();\n this.touchOutsideHandler = null;\n }\n }\n }, {\n key: \"createTwoChains\",\n value: function createTwoChains(event) {\n var childPros = this.props.children.props;\n var props = this.props;\n\n if (childPros[event] && props[event]) {\n return this[\"fire\".concat(event)];\n }\n\n return childPros[event] || props[event];\n }\n }, {\n key: \"isClickToShow\",\n value: function isClickToShow() {\n var _this$props3 = this.props,\n action = _this$props3.action,\n showAction = _this$props3.showAction;\n return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isContextMenuToShow\",\n value: function isContextMenuToShow() {\n var _this$props4 = this.props,\n action = _this$props4.action,\n showAction = _this$props4.showAction;\n return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;\n }\n }, {\n key: \"isClickToHide\",\n value: function isClickToHide() {\n var _this$props5 = this.props,\n action = _this$props5.action,\n hideAction = _this$props5.hideAction;\n return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;\n }\n }, {\n key: \"isMouseEnterToShow\",\n value: function isMouseEnterToShow() {\n var _this$props6 = this.props,\n action = _this$props6.action,\n showAction = _this$props6.showAction;\n return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;\n }\n }, {\n key: \"isMouseLeaveToHide\",\n value: function isMouseLeaveToHide() {\n var _this$props7 = this.props,\n action = _this$props7.action,\n hideAction = _this$props7.hideAction;\n return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;\n }\n }, {\n key: \"isFocusToShow\",\n value: function isFocusToShow() {\n var _this$props8 = this.props,\n action = _this$props8.action,\n showAction = _this$props8.showAction;\n return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;\n }\n }, {\n key: \"isBlurToHide\",\n value: function isBlurToHide() {\n var _this$props9 = this.props,\n action = _this$props9.action,\n hideAction = _this$props9.hideAction;\n return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;\n }\n }, {\n key: \"forcePopupAlign\",\n value: function forcePopupAlign() {\n if (this.state.popupVisible && this.popupRef.current && this.popupRef.current.alignRef.current) {\n this.popupRef.current.alignRef.current.forceAlign();\n }\n }\n }, {\n key: \"fireEvents\",\n value: function fireEvents(type, e) {\n var childCallback = this.props.children.props[type];\n\n if (childCallback) {\n childCallback(e);\n }\n\n var callback = this.props[type];\n\n if (callback) {\n callback(e);\n }\n }\n }, {\n key: \"close\",\n value: function close() {\n this.setPopupVisible(false);\n }\n }, {\n key: \"render\",\n value: function render() {\n var popupVisible = this.state.popupVisible;\n var _this$props10 = this.props,\n children = _this$props10.children,\n forceRender = _this$props10.forceRender,\n alignPoint = _this$props10.alignPoint,\n className = _this$props10.className;\n var child = React.Children.only(children);\n var newChildProps = {\n key: 'trigger'\n };\n\n if (this.isContextMenuToShow()) {\n newChildProps.onContextMenu = this.onContextMenu;\n } else {\n newChildProps.onContextMenu = this.createTwoChains('onContextMenu');\n }\n\n if (this.isClickToHide() || this.isClickToShow()) {\n newChildProps.onClick = this.onClick;\n newChildProps.onMouseDown = this.onMouseDown;\n newChildProps.onTouchStart = this.onTouchStart;\n } else {\n newChildProps.onClick = this.createTwoChains('onClick');\n newChildProps.onMouseDown = this.createTwoChains('onMouseDown');\n newChildProps.onTouchStart = this.createTwoChains('onTouchStart');\n }\n\n if (this.isMouseEnterToShow()) {\n newChildProps.onMouseEnter = this.onMouseEnter;\n\n if (alignPoint) {\n newChildProps.onMouseMove = this.onMouseMove;\n }\n } else {\n newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');\n }\n\n if (this.isMouseLeaveToHide()) {\n newChildProps.onMouseLeave = this.onMouseLeave;\n } else {\n newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');\n }\n\n if (this.isFocusToShow() || this.isBlurToHide()) {\n newChildProps.onFocus = this.onFocus;\n newChildProps.onBlur = this.onBlur;\n } else {\n newChildProps.onFocus = this.createTwoChains('onFocus');\n newChildProps.onBlur = this.createTwoChains('onBlur');\n }\n\n var childrenClassName = classNames(child && child.props && child.props.className, className);\n\n if (childrenClassName) {\n newChildProps.className = childrenClassName;\n }\n\n var cloneProps = _objectSpread({}, newChildProps);\n\n if (supportRef(child)) {\n cloneProps.ref = composeRef(this.triggerRef, child.ref);\n }\n\n var trigger = React.cloneElement(child, cloneProps);\n var portal; // prevent unmounting after it's rendered\n\n if (popupVisible || this.popupRef.current || forceRender) {\n portal = React.createElement(PortalComponent, {\n key: \"portal\",\n getContainer: this.getContainer,\n didUpdate: this.handlePortalUpdate\n }, this.getComponent());\n }\n\n return React.createElement(TriggerContext.Provider, {\n value: {\n onPopupMouseDown: this.onPopupMouseDown\n }\n }, trigger, portal);\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(_ref, prevState) {\n var popupVisible = _ref.popupVisible;\n var newState = {};\n\n if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {\n newState.popupVisible = popupVisible;\n newState.prevPopupVisible = prevState.popupVisible;\n }\n\n return newState;\n }\n }]);\n\n return Trigger;\n }(React.Component);\n\n Trigger.contextType = TriggerContext;\n Trigger.defaultProps = {\n prefixCls: 'rc-trigger-popup',\n getPopupClassNameFromAlign: returnEmptyString,\n getDocument: returnDocument,\n onPopupVisibleChange: noop,\n afterPopupVisibleChange: noop,\n onPopupAlign: noop,\n popupClassName: '',\n mouseEnterDelay: 0,\n mouseLeaveDelay: 0.1,\n focusDelay: 0,\n blurDelay: 0.15,\n popupStyle: {},\n destroyPopupOnHide: false,\n popupAlign: {},\n defaultPopupVisible: false,\n mask: false,\n maskClosable: true,\n action: [],\n showAction: [],\n hideAction: []\n };\n return Trigger;\n}\nexport default generateTrigger(Portal);","var autoAdjustOverflow = {\n adjustX: 1,\n adjustY: 1\n};\nvar targetOffset = [0, 0];\nexport var placements = {\n left: {\n points: ['cr', 'cl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n },\n right: {\n points: ['cl', 'cr'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n top: {\n points: ['bc', 'tc'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n bottom: {\n points: ['tc', 'bc'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n topLeft: {\n points: ['bl', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n leftTop: {\n points: ['tr', 'tl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n },\n topRight: {\n points: ['br', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [0, -4],\n targetOffset: targetOffset\n },\n rightTop: {\n points: ['tl', 'tr'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n bottomRight: {\n points: ['tr', 'br'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n rightBottom: {\n points: ['bl', 'br'],\n overflow: autoAdjustOverflow,\n offset: [4, 0],\n targetOffset: targetOffset\n },\n bottomLeft: {\n points: ['tl', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [0, 4],\n targetOffset: targetOffset\n },\n leftBottom: {\n points: ['br', 'bl'],\n overflow: autoAdjustOverflow,\n offset: [-4, 0],\n targetOffset: targetOffset\n }\n};\nexport default placements;","import React from 'react';\n\nvar Content = function Content(props) {\n var overlay = props.overlay,\n prefixCls = props.prefixCls,\n id = props.id;\n return React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-inner\"),\n id: id,\n role: \"tooltip\"\n }, typeof overlay === 'function' ? overlay() : overlay);\n};\n\nexport default Content;","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React, { useRef, useImperativeHandle, forwardRef } from 'react';\nimport Trigger from 'rc-trigger';\nimport { placements } from './placements';\nimport Content from './Content';\n\nvar Tooltip = function Tooltip(props, ref) {\n var overlayClassName = props.overlayClassName,\n _props$trigger = props.trigger,\n trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,\n _props$mouseEnterDela = props.mouseEnterDelay,\n mouseEnterDelay = _props$mouseEnterDela === void 0 ? 0 : _props$mouseEnterDela,\n _props$mouseLeaveDela = props.mouseLeaveDelay,\n mouseLeaveDelay = _props$mouseLeaveDela === void 0 ? 0.1 : _props$mouseLeaveDela,\n overlayStyle = props.overlayStyle,\n _props$prefixCls = props.prefixCls,\n prefixCls = _props$prefixCls === void 0 ? 'rc-tooltip' : _props$prefixCls,\n children = props.children,\n onVisibleChange = props.onVisibleChange,\n afterVisibleChange = props.afterVisibleChange,\n transitionName = props.transitionName,\n animation = props.animation,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'right' : _props$placement,\n _props$align = props.align,\n align = _props$align === void 0 ? {} : _props$align,\n _props$destroyTooltip = props.destroyTooltipOnHide,\n destroyTooltipOnHide = _props$destroyTooltip === void 0 ? false : _props$destroyTooltip,\n defaultVisible = props.defaultVisible,\n getTooltipContainer = props.getTooltipContainer,\n restProps = _objectWithoutProperties(props, [\"overlayClassName\", \"trigger\", \"mouseEnterDelay\", \"mouseLeaveDelay\", \"overlayStyle\", \"prefixCls\", \"children\", \"onVisibleChange\", \"afterVisibleChange\", \"transitionName\", \"animation\", \"placement\", \"align\", \"destroyTooltipOnHide\", \"defaultVisible\", \"getTooltipContainer\"]);\n\n var domRef = useRef(null);\n useImperativeHandle(ref, function () {\n return domRef.current;\n });\n\n var extraProps = _objectSpread({}, restProps);\n\n if ('visible' in props) {\n extraProps.popupVisible = props.visible;\n }\n\n var getPopupElement = function getPopupElement() {\n var _props$arrowContent = props.arrowContent,\n arrowContent = _props$arrowContent === void 0 ? null : _props$arrowContent,\n overlay = props.overlay,\n id = props.id;\n return [React.createElement(\"div\", {\n className: \"\".concat(prefixCls, \"-arrow\"),\n key: \"arrow\"\n }, arrowContent), React.createElement(Content, {\n key: \"content\",\n prefixCls: prefixCls,\n id: id,\n overlay: overlay\n })];\n };\n\n return React.createElement(Trigger, Object.assign({\n popupClassName: overlayClassName,\n prefixCls: prefixCls,\n popup: getPopupElement,\n action: trigger,\n builtinPlacements: placements,\n popupPlacement: placement,\n ref: domRef,\n popupAlign: align,\n getPopupContainer: getTooltipContainer,\n onPopupVisibleChange: onVisibleChange,\n afterPopupVisibleChange: afterVisibleChange,\n popupTransitionName: transitionName,\n popupAnimation: animation,\n defaultPopupVisible: defaultVisible,\n destroyPopupOnHide: destroyTooltipOnHide,\n mouseLeaveDelay: mouseLeaveDelay,\n popupStyle: overlayStyle,\n mouseEnterDelay: mouseEnterDelay\n }, extraProps), children);\n};\n\nexport default forwardRef(Tooltip);","import Tooltip from './Tooltip';\nexport default Tooltip;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport var keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nexport default function createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n } : _breakpoints$values,\n _breakpoints$unit = breakpoints.unit,\n unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,\n _breakpoints$step = breakpoints.step,\n step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,\n other = _objectWithoutProperties(breakpoints, [\"values\", \"unit\", \"step\"]);\n\n function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n }\n\n function down(key) {\n var endIndex = keys.indexOf(key) + 1;\n var upperbound = values[keys[endIndex]];\n\n if (endIndex === keys.length) {\n // xl down applies to all sizes\n return up('xs');\n }\n\n var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;\n return \"@media (max-width:\".concat(value - step / 100).concat(unit, \")\");\n }\n\n function between(start, end) {\n var endIndex = keys.indexOf(end);\n\n if (endIndex === keys.length - 1) {\n return up(start);\n }\n\n return \"@media (min-width:\".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, \") and \") + \"(max-width:\".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, \")\");\n }\n\n function only(key) {\n return between(key, key);\n }\n\n var warnedOnce = false;\n\n function width(key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.warn([\"Material-UI: The `theme.breakpoints.width` utility is deprecated because it's redundant.\", 'Use the `theme.breakpoints.values` instead.'].join('\\n'));\n }\n }\n\n return values[key];\n }\n\n return _extends({\n keys: keys,\n values: values,\n up: up,\n down: down,\n between: between,\n only: only,\n width: width\n }, other);\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nexport default function createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return _extends({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n console.warn(['Material-UI: theme.mixins.gutters() is deprecated.', 'You can use the source of the mixin directly:', \"\\n paddingLeft: theme.spacing(2),\\n paddingRight: theme.spacing(2),\\n [theme.breakpoints.up('sm')]: {\\n paddingLeft: theme.spacing(3),\\n paddingRight: theme.spacing(3),\\n },\\n \"].join('\\n'));\n return _extends({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, _defineProperty({}, breakpoints.up('sm'), _extends({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, _defineProperty(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), _defineProperty(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}","var common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","var indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\nexport default indigo;","var pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\nexport default pink;","var red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","var orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","var blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","var green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\nimport { deepmerge } from '@material-ui/utils';\nimport common from '../colors/common';\nimport grey from '../colors/grey';\nimport indigo from '../colors/indigo';\nimport pink from '../colors/pink';\nimport red from '../colors/red';\nimport orange from '../colors/orange';\nimport blue from '../colors/blue';\nimport green from '../colors/green';\nimport { darken, getContrastRatio, lighten } from './colorManipulator';\nexport var light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: grey[50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport var dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: grey[800],\n default: '#303030'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\n\nexport default function createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: indigo[300],\n main: indigo[500],\n dark: indigo[700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: pink.A200,\n main: pink.A400,\n dark: pink.A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: red[300],\n main: red[500],\n dark: red[700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: orange[300],\n main: orange[500],\n dark: orange[700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: blue[300],\n main: blue[500],\n dark: blue[700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: green[300],\n main: green[500],\n dark: green[700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = _objectWithoutProperties(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n\n function getContrastText(background) {\n var contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (process.env.NODE_ENV !== 'production') {\n var contrast = getContrastRatio(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = _extends({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : _formatMuiErrorMessage(4, mainShade));\n }\n\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : _formatMuiErrorMessage(5, JSON.stringify(color.main)));\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (process.env.NODE_ENV !== 'production') {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = deepmerge(_extends({\n // A collection of common colors.\n common: common,\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar warnedOnce = false;\n\nfunction roundWithDeprecationWarning(value) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['Material-UI: The `theme.typography.round` helper is deprecated.', 'Head to https://material-ui.com/r/migration-v4/#theme for a migration path.'].join('\\n'));\n warnedOnce = true;\n }\n }\n\n return round(value);\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nexport default function createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = _objectWithoutProperties(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return _extends({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return deepmerge(_extends({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: roundWithDeprecationWarning,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}","var shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","var shape = {\n borderRadius: 4\n};\nexport default shape;","import { createUnarySpacing } from '@material-ui/system';\nvar warnOnce;\nexport default function createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = createUnarySpacing({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnOnce || process.env.NODE_ENV === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport { deepmerge } from '@material-ui/utils';\nimport createBreakpoints from './createBreakpoints';\nimport createMixins from './createMixins';\nimport createPalette from './createPalette';\nimport createTypography from './createTypography';\nimport shadows from './shadows';\nimport shape from './shape';\nimport createSpacing from './createSpacing';\nimport transitions from './transitions';\nimport zIndex from './zIndex';\n\nfunction createTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = _objectWithoutProperties(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n\n var palette = createPalette(paletteInput);\n var breakpoints = createBreakpoints(breakpointsInput);\n var spacing = createSpacing(spacingInput);\n var muiTheme = deepmerge({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: createMixins(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: shadows,\n typography: createTypography(palette, typographyInput),\n spacing: spacing,\n shape: shape,\n transitions: transitions,\n zIndex: zIndex\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return deepmerge(acc, argument);\n }, muiTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: _defineProperty({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\nvar warnedOnce = false;\nexport function createMuiTheme() {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@material-ui/core/styles'`\"].join('\\n'));\n }\n }\n\n return createTheme.apply(void 0, arguments);\n}\nexport default createTheme;","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@material-ui/utils/macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe iff we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n\n /* eslint-disable prefer-template */\n var url = 'https://material-ui.com/production-error/?code=' + code;\n\n for (var i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n\n return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","// Feature detection for WebGL\n//\n// Provides a function that enables simple checking of which WebGL features are\n// available in an WebGL1 or WebGL2 environment.\n\nimport WEBGL_FEATURES from './webgl-features-table';\nimport {isWebGL2, log} from '@luma.gl/gltools';\nimport {assert} from '../utils/assert';\n\nconst LOG_UNSUPPORTED_FEATURE = 2;\n\n// Check one feature\nexport function hasFeature(gl, feature) {\n return hasFeatures(gl, feature);\n}\n\n// Check one or more features\nexport function hasFeatures(gl, features) {\n features = Array.isArray(features) ? features : [features];\n return features.every(feature => {\n return isFeatureSupported(gl, feature);\n });\n}\n\n// Return a list of supported features\nexport function getFeatures(gl) {\n gl.luma = gl.luma || {};\n gl.luma.caps = gl.luma.caps || {};\n for (const cap in WEBGL_FEATURES) {\n if (gl.luma.caps[cap] === undefined) {\n gl.luma.caps[cap] = isFeatureSupported(gl, cap);\n }\n }\n return gl.luma.caps;\n}\n\n// TODO - cache the value\nfunction isFeatureSupported(gl, cap) {\n gl.luma = gl.luma || {};\n gl.luma.caps = gl.luma.caps || {};\n\n if (gl.luma.caps[cap] === undefined) {\n gl.luma.caps[cap] = queryFeature(gl, cap);\n }\n\n if (!gl.luma.caps[cap]) {\n log.log(LOG_UNSUPPORTED_FEATURE, `Feature: ${cap} not supported`)();\n }\n\n return gl.luma.caps[cap];\n}\n\nfunction queryFeature(gl, cap) {\n const feature = WEBGL_FEATURES[cap];\n assert(feature, cap);\n\n let isSupported;\n\n // Get extension name from table\n const featureDefinition = isWebGL2(gl) ? feature[1] || feature[0] : feature[0];\n\n // Check if the value is dependent on checking one or more extensions\n if (typeof featureDefinition === 'function') {\n isSupported = featureDefinition(gl);\n } else if (Array.isArray(featureDefinition)) {\n isSupported = true;\n for (const extension of featureDefinition) {\n isSupported = isSupported && Boolean(gl.getExtension(extension));\n }\n } else if (typeof featureDefinition === 'string') {\n isSupported = Boolean(gl.getExtension(featureDefinition));\n } else if (typeof featureDefinition === 'boolean') {\n isSupported = featureDefinition;\n } else {\n assert(false);\n }\n\n return isSupported;\n}\n","var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob()\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n}\n\nfunction isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n}\n\nif (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\n// Build a destructive iterator for the value list\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n}\n\nexport function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nHeaders.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n}\n\nHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nHeaders.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n}\n\nHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nHeaders.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push(name)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.values = function() {\n var items = []\n this.forEach(function(value) {\n items.push(value)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nif (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n}\n\nfunction consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n}\n\nfunction fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n}\n\nfunction readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n}\n\nfunction readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n}\n\nfunction readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n}\n\nfunction bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n}\n\nfunction Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n this._bodyText = body = Object.prototype.toString.call(body)\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n}\n\n// HTTP methods whose capitalization should be normalized\nvar methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\nfunction normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return methods.indexOf(upcased) > -1 ? upcased : method\n}\n\nexport function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n this.signal = input.signal\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.signal = options.signal || this.signal\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n}\n\nRequest.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n}\n\nfunction decode(body) {\n var form = new FormData()\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n}\n\nfunction parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n}\n\nBody.call(Request.prototype)\n\nexport function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n}\n\nBody.call(Response.prototype)\n\nResponse.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n}\n\nResponse.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n}\n\nvar redirectStatuses = [301, 302, 303, 307, 308]\n\nResponse.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n}\n\nexport var DOMException = self.DOMException\ntry {\n new DOMException()\n} catch (err) {\n DOMException = function(message, name) {\n this.message = message\n this.name = name\n var error = Error(message)\n this.stack = error.stack\n }\n DOMException.prototype = Object.create(Error.prototype)\n DOMException.prototype.constructor = DOMException\n}\n\nexport function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n\n if (request.signal && request.signal.aborted) {\n return reject(new DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest()\n\n function abortXhr() {\n xhr.abort()\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.onabort = function() {\n reject(new DOMException('Aborted', 'AbortError'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr)\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr)\n }\n }\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n}\n\nfetch.polyfill = true\n\nif (!self.fetch) {\n self.fetch = fetch\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n}\n","/** @license React v16.14.0\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),n=require(\"object-assign\"),r=require(\"scheduler\");function u(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}if(!aa)throw Error(u(227));\nfunction ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(a){da=!0;ea=a}};function ja(a,b,c,d,e,f,g,h,k){da=!1;ea=null;ba.apply(ia,arguments)}function ka(a,b,c,d,e,f,g,h,k){ja.apply(this,arguments);if(da){if(da){var l=ea;da=!1;ea=null}else throw Error(u(198));fa||(fa=!0,ha=l)}}var la=null,ma=null,na=null;\nfunction oa(a,b,c){var d=a.type||\"unknown-event\";a.currentTarget=na(c);ka(d,b,void 0,a);a.currentTarget=null}var pa=null,qa={};\nfunction ra(){if(pa)for(var a in qa){var b=qa[a],c=pa.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!sa[c]){if(!b.extractEvents)throw Error(u(97,a));sa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(ta.hasOwnProperty(h))throw Error(u(99,h));ta[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ua(k[e],g,h);e=!0}else f.registrationName?(ua(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}\nfunction ua(a,b,c){if(va[a])throw Error(u(100,a));va[a]=b;wa[a]=b.eventTypes[c].dependencies}var sa=[],ta={},va={},wa={};function xa(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!qa.hasOwnProperty(c)||qa[c]!==d){if(qa[c])throw Error(u(102,c));qa[c]=d;b=!0}}b&&ra()}var ya=!(\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement),za=null,Aa=null,Ba=null;\nfunction Ca(a){if(a=ma(a)){if(\"function\"!==typeof za)throw Error(u(280));var b=a.stateNode;b&&(b=la(b),za(a.stateNode,a.type,b))}}function Da(a){Aa?Ba?Ba.push(a):Ba=[a]:Aa=a}function Ea(){if(Aa){var a=Aa,b=Ba;Ba=Aa=null;Ca(a);if(b)for(a=0;a<b.length;a++)Ca(b[a])}}function Fa(a,b){return a(b)}function Ga(a,b,c,d,e){return a(b,c,d,e)}function Ha(){}var Ia=Fa,Ja=!1,Ka=!1;function La(){if(null!==Aa||null!==Ba)Ha(),Ea()}\nfunction Ma(a,b,c){if(Ka)return a(b,c);Ka=!0;try{return Ia(a,b,c)}finally{Ka=!1,La()}}var Na=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,Oa=Object.prototype.hasOwnProperty,Pa={},Qa={};\nfunction Ra(a){if(Oa.call(Qa,a))return!0;if(Oa.call(Pa,a))return!1;if(Na.test(a))return Qa[a]=!0;Pa[a]=!0;return!1}function Sa(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case \"function\":case \"symbol\":return!0;case \"boolean\":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return\"data-\"!==a&&\"aria-\"!==a;default:return!1}}\nfunction Ta(a,b,c,d){if(null===b||\"undefined\"===typeof b||Sa(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function v(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){C[a]=new v(a,0,!1,a,null,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];C[b]=new v(b,1,!1,a[1],null,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){C[a]=new v(a,2,!1,a.toLowerCase(),null,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){C[a]=new v(a,2,!1,a,null,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){C[a]=new v(a,3,!1,a.toLowerCase(),null,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){C[a]=new v(a,3,!0,a,null,!1)});[\"capture\",\"download\"].forEach(function(a){C[a]=new v(a,4,!1,a,null,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){C[a]=new v(a,6,!1,a,null,!1)});[\"rowSpan\",\"start\"].forEach(function(a){C[a]=new v(a,5,!1,a.toLowerCase(),null,!1)});var Ua=/[\\-:]([a-z])/g;function Va(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(Ua,\nVa);C[b]=new v(b,1,!1,a,null,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(Ua,Va);C[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!1)});\nC.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){C[a]=new v(a,1,!1,a.toLowerCase(),null,!0)});var Wa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Wa.hasOwnProperty(\"ReactCurrentDispatcher\")||(Wa.ReactCurrentDispatcher={current:null});Wa.hasOwnProperty(\"ReactCurrentBatchConfig\")||(Wa.ReactCurrentBatchConfig={suspense:null});\nfunction Xa(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||\"o\"!==b[0]&&\"O\"!==b[0]||\"n\"!==b[1]&&\"N\"!==b[1]?!1:!0;f||(Ta(b,c,e,d)&&(c=null),d||null===e?Ra(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,\"\"+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:\"\":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?\"\":\"\"+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}\nvar Ya=/^(.*)[\\\\\\/]/,E=\"function\"===typeof Symbol&&Symbol.for,Za=E?Symbol.for(\"react.element\"):60103,$a=E?Symbol.for(\"react.portal\"):60106,ab=E?Symbol.for(\"react.fragment\"):60107,bb=E?Symbol.for(\"react.strict_mode\"):60108,cb=E?Symbol.for(\"react.profiler\"):60114,db=E?Symbol.for(\"react.provider\"):60109,eb=E?Symbol.for(\"react.context\"):60110,fb=E?Symbol.for(\"react.concurrent_mode\"):60111,gb=E?Symbol.for(\"react.forward_ref\"):60112,hb=E?Symbol.for(\"react.suspense\"):60113,ib=E?Symbol.for(\"react.suspense_list\"):\n60120,jb=E?Symbol.for(\"react.memo\"):60115,kb=E?Symbol.for(\"react.lazy\"):60116,lb=E?Symbol.for(\"react.block\"):60121,mb=\"function\"===typeof Symbol&&Symbol.iterator;function nb(a){if(null===a||\"object\"!==typeof a)return null;a=mb&&a[mb]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}function ob(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}\nfunction pb(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ab:return\"Fragment\";case $a:return\"Portal\";case cb:return\"Profiler\";case bb:return\"StrictMode\";case hb:return\"Suspense\";case ib:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case eb:return\"Context.Consumer\";case db:return\"Context.Provider\";case gb:var b=a.render;b=b.displayName||b.name||\"\";return a.displayName||(\"\"!==b?\"ForwardRef(\"+b+\")\":\n\"ForwardRef\");case jb:return pb(a.type);case lb:return pb(a.render);case kb:if(a=1===a._status?a._result:null)return pb(a)}return null}function qb(a){var b=\"\";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c=\"\";break a;default:var d=a._debugOwner,e=a._debugSource,f=pb(a.type);c=null;d&&(c=pb(d.type));d=f;f=\"\";e?f=\" (at \"+e.fileName.replace(Ya,\"\")+\":\"+e.lineNumber+\")\":c&&(f=\" (created by \"+c+\")\");c=\"\\n in \"+(d||\"Unknown\")+f}b+=c;a=a.return}while(a);return b}\nfunction rb(a){switch(typeof a){case \"boolean\":case \"number\":case \"object\":case \"string\":case \"undefined\":return a;default:return\"\"}}function sb(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction tb(a){var b=sb(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function xb(a){a._valueTracker||(a._valueTracker=tb(a))}function yb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=sb(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function zb(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}\nfunction Ab(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=rb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function Bb(a,b){b=b.checked;null!=b&&Xa(a,\"checked\",b,!1)}\nfunction Cb(a,b){Bb(a,b);var c=rb(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?Db(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&Db(a,b.type,rb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction Eb(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction Db(a,b,c){if(\"number\"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}function Fb(a){var b=\"\";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Gb(a,b){a=n({children:void 0},b);if(b=Fb(b.children))a.children=b;return a}\nfunction Hb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b[\"$\"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty(\"$\"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=\"\"+rb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}\nfunction Ib(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(u(91));return n({},b,{value:void 0,defaultValue:void 0,children:\"\"+a._wrapperState.initialValue})}function Jb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(u(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(u(93));c=c[0]}b=c}null==b&&(b=\"\");c=b}a._wrapperState={initialValue:rb(c)}}\nfunction Kb(a,b){var c=rb(b.value),d=rb(b.defaultValue);null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=\"\"+d)}function Lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&\"\"!==b&&null!==b&&(a.value=b)}var Mb={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Nb(a){switch(a){case \"svg\":return\"http://www.w3.org/2000/svg\";case \"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Ob(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Nb(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar Pb,Qb=function(a){return\"undefined\"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Mb.svg||\"innerHTML\"in a)a.innerHTML=b;else{Pb=Pb||document.createElement(\"div\");Pb.innerHTML=\"<svg>\"+b.valueOf().toString()+\"</svg>\";for(b=Pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction Rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Sb(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;return c}var Tb={animationend:Sb(\"Animation\",\"AnimationEnd\"),animationiteration:Sb(\"Animation\",\"AnimationIteration\"),animationstart:Sb(\"Animation\",\"AnimationStart\"),transitionend:Sb(\"Transition\",\"TransitionEnd\")},Ub={},Vb={};\nya&&(Vb=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Tb.animationend.animation,delete Tb.animationiteration.animation,delete Tb.animationstart.animation),\"TransitionEvent\"in window||delete Tb.transitionend.transition);function Wb(a){if(Ub[a])return Ub[a];if(!Tb[a])return a;var b=Tb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Vb)return Ub[a]=b[c];return a}\nvar Xb=Wb(\"animationend\"),Yb=Wb(\"animationiteration\"),Zb=Wb(\"animationstart\"),$b=Wb(\"transitionend\"),ac=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),bc=new (\"function\"===typeof WeakMap?WeakMap:Map);function cc(a){var b=bc.get(a);void 0===b&&(b=new Map,bc.set(a,b));return b}\nfunction dc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function ec(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function fc(a){if(dc(a)!==a)throw Error(u(188));}\nfunction gc(a){var b=a.alternate;if(!b){b=dc(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return fc(e),a;if(f===d)return fc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===\nc){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function hc(a){a=gc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}\nfunction ic(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function jc(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var kc=null;\nfunction lc(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)oa(a,b[d],c[d]);else b&&oa(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function mc(a){null!==a&&(kc=ic(kc,a));a=kc;kc=null;if(a){jc(a,lc);if(kc)throw Error(u(95));if(fa)throw a=ha,fa=!1,ha=null,a;}}\nfunction nc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function oc(a){if(!ya)return!1;a=\"on\"+a;var b=a in document;b||(b=document.createElement(\"div\"),b.setAttribute(a,\"return;\"),b=\"function\"===typeof b[a]);return b}var pc=[];function qc(a){a.topLevelType=null;a.nativeEvent=null;a.targetInst=null;a.ancestors.length=0;10>pc.length&&pc.push(a)}\nfunction rc(a,b,c,d){if(pc.length){var e=pc.pop();e.topLevelType=a;e.eventSystemFlags=d;e.nativeEvent=b;e.targetInst=c;return e}return{topLevelType:a,eventSystemFlags:d,nativeEvent:b,targetInst:c,ancestors:[]}}\nfunction sc(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=tc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=nc(a.nativeEvent);d=a.topLevelType;var f=a.nativeEvent,g=a.eventSystemFlags;0===c&&(g|=64);for(var h=null,k=0;k<sa.length;k++){var l=sa[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=\nic(h,l))}mc(h)}}function uc(a,b,c){if(!c.has(a)){switch(a){case \"scroll\":vc(b,\"scroll\",!0);break;case \"focus\":case \"blur\":vc(b,\"focus\",!0);vc(b,\"blur\",!0);c.set(\"blur\",null);c.set(\"focus\",null);break;case \"cancel\":case \"close\":oc(a)&&vc(b,a,!0);break;case \"invalid\":case \"submit\":case \"reset\":break;default:-1===ac.indexOf(a)&&F(a,b)}c.set(a,null)}}\nvar wc,xc,yc,zc=!1,Ac=[],Bc=null,Cc=null,Dc=null,Ec=new Map,Fc=new Map,Gc=[],Hc=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit\".split(\" \"),Ic=\"focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture\".split(\" \");\nfunction Jc(a,b){var c=cc(b);Hc.forEach(function(a){uc(a,b,c)});Ic.forEach(function(a){uc(a,b,c)})}function Kc(a,b,c,d,e){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:e,container:d}}\nfunction Lc(a,b){switch(a){case \"focus\":case \"blur\":Bc=null;break;case \"dragenter\":case \"dragleave\":Cc=null;break;case \"mouseover\":case \"mouseout\":Dc=null;break;case \"pointerover\":case \"pointerout\":Ec.delete(b.pointerId);break;case \"gotpointercapture\":case \"lostpointercapture\":Fc.delete(b.pointerId)}}function Mc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=Kc(b,c,d,e,f),null!==b&&(b=Nc(b),null!==b&&xc(b)),a;a.eventSystemFlags|=d;return a}\nfunction Oc(a,b,c,d,e){switch(b){case \"focus\":return Bc=Mc(Bc,a,b,c,d,e),!0;case \"dragenter\":return Cc=Mc(Cc,a,b,c,d,e),!0;case \"mouseover\":return Dc=Mc(Dc,a,b,c,d,e),!0;case \"pointerover\":var f=e.pointerId;Ec.set(f,Mc(Ec.get(f)||null,a,b,c,d,e));return!0;case \"gotpointercapture\":return f=e.pointerId,Fc.set(f,Mc(Fc.get(f)||null,a,b,c,d,e)),!0}return!1}\nfunction Pc(a){var b=tc(a.target);if(null!==b){var c=dc(b);if(null!==c)if(b=c.tag,13===b){if(b=ec(c),null!==b){a.blockedOn=b;r.unstable_runWithPriority(a.priority,function(){yc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Qc(a){if(null!==a.blockedOn)return!1;var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);if(null!==b){var c=Nc(b);null!==c&&xc(c);a.blockedOn=b;return!1}return!0}\nfunction Sc(a,b,c){Qc(a)&&c.delete(b)}function Tc(){for(zc=!1;0<Ac.length;){var a=Ac[0];if(null!==a.blockedOn){a=Nc(a.blockedOn);null!==a&&wc(a);break}var b=Rc(a.topLevelType,a.eventSystemFlags,a.container,a.nativeEvent);null!==b?a.blockedOn=b:Ac.shift()}null!==Bc&&Qc(Bc)&&(Bc=null);null!==Cc&&Qc(Cc)&&(Cc=null);null!==Dc&&Qc(Dc)&&(Dc=null);Ec.forEach(Sc);Fc.forEach(Sc)}function Uc(a,b){a.blockedOn===b&&(a.blockedOn=null,zc||(zc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Tc)))}\nfunction Vc(a){function b(b){return Uc(b,a)}if(0<Ac.length){Uc(Ac[0],a);for(var c=1;c<Ac.length;c++){var d=Ac[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==Bc&&Uc(Bc,a);null!==Cc&&Uc(Cc,a);null!==Dc&&Uc(Dc,a);Ec.forEach(b);Fc.forEach(b);for(c=0;c<Gc.length;c++)d=Gc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<Gc.length&&(c=Gc[0],null===c.blockedOn);)Pc(c),null===c.blockedOn&&Gc.shift()}\nvar Wc={},Yc=new Map,Zc=new Map,$c=[\"abort\",\"abort\",Xb,\"animationEnd\",Yb,\"animationIteration\",Zb,\"animationStart\",\"canplay\",\"canPlay\",\"canplaythrough\",\"canPlayThrough\",\"durationchange\",\"durationChange\",\"emptied\",\"emptied\",\"encrypted\",\"encrypted\",\"ended\",\"ended\",\"error\",\"error\",\"gotpointercapture\",\"gotPointerCapture\",\"load\",\"load\",\"loadeddata\",\"loadedData\",\"loadedmetadata\",\"loadedMetadata\",\"loadstart\",\"loadStart\",\"lostpointercapture\",\"lostPointerCapture\",\"playing\",\"playing\",\"progress\",\"progress\",\"seeking\",\n\"seeking\",\"stalled\",\"stalled\",\"suspend\",\"suspend\",\"timeupdate\",\"timeUpdate\",$b,\"transitionEnd\",\"waiting\",\"waiting\"];function ad(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f=\"on\"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+\"Capture\"},dependencies:[d],eventPriority:b};Zc.set(d,b);Yc.set(d,f);Wc[e]=f}}\nad(\"blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange\".split(\" \"),0);\nad(\"drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel\".split(\" \"),1);ad($c,2);for(var bd=\"change selectionchange textInput compositionstart compositionend compositionupdate\".split(\" \"),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);\nvar dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function F(a,b){vc(b,a,!1)}function vc(a,b,c){var d=Zc.get(b);switch(void 0===d?2:d){case 0:d=gd.bind(null,b,1,a);break;case 1:d=hd.bind(null,b,1,a);break;default:d=id.bind(null,b,1,a)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function gd(a,b,c,d){Ja||Ha();var e=id,f=Ja;Ja=!0;try{Ga(e,a,b,c,d)}finally{(Ja=f)||La()}}function hd(a,b,c,d){ed(dd,id.bind(null,a,b,c,d))}\nfunction id(a,b,c,d){if(fd)if(0<Ac.length&&-1<Hc.indexOf(a))a=Kc(null,a,b,c,d),Ac.push(a);else{var e=Rc(a,b,c,d);if(null===e)Lc(a,d);else if(-1<Hc.indexOf(a))a=Kc(e,a,b,c,d),Ac.push(a);else if(!Oc(e,a,b,c,d)){Lc(a,d);a=rc(a,d,null,b);try{Ma(sc,a)}finally{qc(a)}}}}\nfunction Rc(a,b,c,d){c=nc(d);c=tc(c);if(null!==c){var e=dc(c);if(null===e)c=null;else{var f=e.tag;if(13===f){c=ec(e);if(null!==c)return c;c=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null}else e!==c&&(c=null)}}a=rc(a,d,c,b);try{Ma(sc,a)}finally{qc(a)}return null}\nvar jd={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,\nfloodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kd=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(jd).forEach(function(a){kd.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);jd[b]=jd[a]})});function ld(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||jd.hasOwnProperty(a)&&jd[a]?(\"\"+b).trim():b+\"px\"}\nfunction md(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=ld(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var nd=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction od(a,b){if(b){if(nd[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(u(137,a,\"\"));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(u(60));if(!(\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML))throw Error(u(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(u(62,\"\"));}}\nfunction pd(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var qd=Mb.html;function rd(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=cc(a);b=wa[b];for(var d=0;d<b.length;d++)uc(b[d],a,c)}function sd(){}\nfunction td(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ud(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function vd(a,b){var c=ud(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ud(c)}}\nfunction wd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wd(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xd(){for(var a=window,b=td();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=td(a.document)}return b}\nfunction yd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}var zd=\"$\",Ad=\"/$\",Bd=\"$?\",Cd=\"$!\",Dd=null,Ed=null;function Fd(a,b){switch(a){case \"button\":case \"input\":case \"select\":case \"textarea\":return!!b.autoFocus}return!1}\nfunction Gd(a,b){return\"textarea\"===a||\"option\"===a||\"noscript\"===a||\"string\"===typeof b.children||\"number\"===typeof b.children||\"object\"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var Hd=\"function\"===typeof setTimeout?setTimeout:void 0,Id=\"function\"===typeof clearTimeout?clearTimeout:void 0;function Jd(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}\nfunction Kd(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===zd||c===Cd||c===Bd){if(0===b)return a;b--}else c===Ad&&b++}a=a.previousSibling}return null}var Ld=Math.random().toString(36).slice(2),Md=\"__reactInternalInstance$\"+Ld,Nd=\"__reactEventHandlers$\"+Ld,Od=\"__reactContainere$\"+Ld;\nfunction tc(a){var b=a[Md];if(b)return b;for(var c=a.parentNode;c;){if(b=c[Od]||c[Md]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Kd(a);null!==a;){if(c=a[Md])return c;a=Kd(a)}return b}a=c;c=a.parentNode}return null}function Nc(a){a=a[Md]||a[Od];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Pd(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function Qd(a){return a[Nd]||null}\nfunction Rd(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}\nfunction Sd(a,b){var c=a.stateNode;if(!c)return null;var d=la(c);if(!d)return null;c=d[b];a:switch(b){case \"onClick\":case \"onClickCapture\":case \"onDoubleClick\":case \"onDoubleClickCapture\":case \"onMouseDown\":case \"onMouseDownCapture\":case \"onMouseMove\":case \"onMouseMoveCapture\":case \"onMouseUp\":case \"onMouseUpCapture\":case \"onMouseEnter\":(d=!d.disabled)||(a=a.type,d=!(\"button\"===a||\"input\"===a||\"select\"===a||\"textarea\"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&\"function\"!==typeof c)throw Error(u(231,\nb,typeof c));return c}function Td(a,b,c){if(b=Sd(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a)}function Ud(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Rd(b);for(b=c.length;0<b--;)Td(c[b],\"captured\",a);for(b=0;b<c.length;b++)Td(c[b],\"bubbled\",a)}}\nfunction Vd(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Sd(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=ic(c._dispatchListeners,b),c._dispatchInstances=ic(c._dispatchInstances,a))}function Wd(a){a&&a.dispatchConfig.registrationName&&Vd(a._targetInst,null,a)}function Xd(a){jc(a,Ud)}var Yd=null,Zd=null,$d=null;\nfunction ae(){if($d)return $d;var a,b=Zd,c=b.length,d,e=\"value\"in Yd?Yd.value:Yd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return $d=e.slice(a,1<d?1-d:void 0)}function be(){return!0}function ce(){return!1}\nfunction G(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):\"target\"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?be:ce;this.isPropagationStopped=ce;return this}\nn(G.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():\"unknown\"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=be)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():\"unknown\"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=be)},persist:function(){this.isPersistent=be},isPersistent:ce,destructor:function(){var a=this.constructor.Interface,\nb;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=ce;this._dispatchInstances=this._dispatchListeners=null}});G.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};\nG.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;de(c);return c};de(G);function ee(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}\nfunction fe(a){if(!(a instanceof this))throw Error(u(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function de(a){a.eventPool=[];a.getPooled=ee;a.release=fe}var ge=G.extend({data:null}),he=G.extend({data:null}),ie=[9,13,27,32],je=ya&&\"CompositionEvent\"in window,ke=null;ya&&\"documentMode\"in document&&(ke=document.documentMode);\nvar le=ya&&\"TextEvent\"in window&&!ke,me=ya&&(!je||ke&&8<ke&&11>=ke),ne=String.fromCharCode(32),oe={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"blur compositionend keydown keypress keyup mousedown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"blur compositionstart keydown keypress keyup mousedown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"blur compositionupdate keydown keypress keyup mousedown\".split(\" \")}},pe=!1;\nfunction qe(a,b){switch(a){case \"keyup\":return-1!==ie.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"blur\":return!0;default:return!1}}function re(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var se=!1;function te(a,b){switch(a){case \"compositionend\":return re(b);case \"keypress\":if(32!==b.which)return null;pe=!0;return ne;case \"textInput\":return a=b.data,a===ne&&pe?null:a;default:return null}}\nfunction ue(a,b){if(se)return\"compositionend\"===a||!je&&qe(a,b)?(a=ae(),$d=Zd=Yd=null,se=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case \"compositionend\":return me&&\"ko\"!==b.locale?null:b.data;default:return null}}\nvar ve={eventTypes:oe,extractEvents:function(a,b,c,d){var e;if(je)b:{switch(a){case \"compositionstart\":var f=oe.compositionStart;break b;case \"compositionend\":f=oe.compositionEnd;break b;case \"compositionupdate\":f=oe.compositionUpdate;break b}f=void 0}else se?qe(a,c)&&(f=oe.compositionEnd):\"keydown\"===a&&229===c.keyCode&&(f=oe.compositionStart);f?(me&&\"ko\"!==c.locale&&(se||f!==oe.compositionStart?f===oe.compositionEnd&&se&&(e=ae()):(Yd=d,Zd=\"value\"in Yd?Yd.value:Yd.textContent,se=!0)),f=ge.getPooled(f,\nb,c,d),e?f.data=e:(e=re(c),null!==e&&(f.data=e)),Xd(f),e=f):e=null;(a=le?te(a,c):ue(a,c))?(b=he.getPooled(oe.beforeInput,b,c,d),b.data=a,Xd(b)):b=null;return null===e?b:null===b?e:[e,b]}},we={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function xe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return\"input\"===b?!!we[a.type]:\"textarea\"===b?!0:!1}\nvar ye={change:{phasedRegistrationNames:{bubbled:\"onChange\",captured:\"onChangeCapture\"},dependencies:\"blur change click focus input keydown keyup selectionchange\".split(\" \")}};function ze(a,b,c){a=G.getPooled(ye.change,a,b,c);a.type=\"change\";Da(c);Xd(a);return a}var Ae=null,Be=null;function Ce(a){mc(a)}function De(a){var b=Pd(a);if(yb(b))return a}function Ee(a,b){if(\"change\"===a)return b}var Fe=!1;ya&&(Fe=oc(\"input\")&&(!document.documentMode||9<document.documentMode));\nfunction Ge(){Ae&&(Ae.detachEvent(\"onpropertychange\",He),Be=Ae=null)}function He(a){if(\"value\"===a.propertyName&&De(Be))if(a=ze(Be,a,nc(a)),Ja)mc(a);else{Ja=!0;try{Fa(Ce,a)}finally{Ja=!1,La()}}}function Ie(a,b,c){\"focus\"===a?(Ge(),Ae=b,Be=c,Ae.attachEvent(\"onpropertychange\",He)):\"blur\"===a&&Ge()}function Je(a){if(\"selectionchange\"===a||\"keyup\"===a||\"keydown\"===a)return De(Be)}function Ke(a,b){if(\"click\"===a)return De(b)}function Le(a,b){if(\"input\"===a||\"change\"===a)return De(b)}\nvar Me={eventTypes:ye,_isInputEventSupported:Fe,extractEvents:function(a,b,c,d){var e=b?Pd(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if(\"select\"===f||\"input\"===f&&\"file\"===e.type)var g=Ee;else if(xe(e))if(Fe)g=Le;else{g=Je;var h=Ie}else(f=e.nodeName)&&\"input\"===f.toLowerCase()&&(\"checkbox\"===e.type||\"radio\"===e.type)&&(g=Ke);if(g&&(g=g(a,b)))return ze(g,c,d);h&&h(a,e,b);\"blur\"===a&&(a=e._wrapperState)&&a.controlled&&\"number\"===e.type&&Db(e,\"number\",e.value)}},Ne=G.extend({view:null,detail:null}),\nOe={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pe(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Oe[a])?!!b[a]:!1}function Qe(){return Pe}\nvar Re=0,Se=0,Te=!1,Ue=!1,Ve=Ne.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Qe,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if(\"movementX\"in a)return a.movementX;var b=Re;Re=a.screenX;return Te?\"mousemove\"===a.type?a.screenX-b:0:(Te=!0,0)},movementY:function(a){if(\"movementY\"in a)return a.movementY;\nvar b=Se;Se=a.screenY;return Ue?\"mousemove\"===a.type?a.screenY-b:0:(Ue=!0,0)}}),We=Ve.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Xe={mouseEnter:{registrationName:\"onMouseEnter\",dependencies:[\"mouseout\",\"mouseover\"]},mouseLeave:{registrationName:\"onMouseLeave\",dependencies:[\"mouseout\",\"mouseover\"]},pointerEnter:{registrationName:\"onPointerEnter\",dependencies:[\"pointerout\",\"pointerover\"]},pointerLeave:{registrationName:\"onPointerLeave\",\ndependencies:[\"pointerout\",\"pointerover\"]}},Ye={eventTypes:Xe,extractEvents:function(a,b,c,d,e){var f=\"mouseover\"===a||\"pointerover\"===a,g=\"mouseout\"===a||\"pointerout\"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?tc(b):null,null!==b){var h=dc(b);if(b!==h||5!==b.tag&&6!==b.tag)b=null}}else g=null;if(g===b)return null;if(\"mouseout\"===a||\"mouseover\"===\na){var k=Ve;var l=Xe.mouseLeave;var m=Xe.mouseEnter;var p=\"mouse\"}else if(\"pointerout\"===a||\"pointerover\"===a)k=We,l=Xe.pointerLeave,m=Xe.pointerEnter,p=\"pointer\";a=null==g?f:Pd(g);f=null==b?f:Pd(b);l=k.getPooled(l,g,c,d);l.type=p+\"leave\";l.target=a;l.relatedTarget=f;c=k.getPooled(m,b,c,d);c.type=p+\"enter\";c.target=f;c.relatedTarget=a;d=g;p=b;if(d&&p)a:{k=d;m=p;g=0;for(a=k;a;a=Rd(a))g++;a=0;for(b=m;b;b=Rd(b))a++;for(;0<g-a;)k=Rd(k),g--;for(;0<a-g;)m=Rd(m),a--;for(;g--;){if(k===m||k===m.alternate)break a;\nk=Rd(k);m=Rd(m)}k=null}else k=null;m=k;for(k=[];d&&d!==m;){g=d.alternate;if(null!==g&&g===m)break;k.push(d);d=Rd(d)}for(d=[];p&&p!==m;){g=p.alternate;if(null!==g&&g===m)break;d.push(p);p=Rd(p)}for(p=0;p<k.length;p++)Vd(k[p],\"bubbled\",l);for(p=d.length;0<p--;)Vd(d[p],\"captured\",c);return 0===(e&64)?[l]:[l,c]}};function Ze(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var $e=\"function\"===typeof Object.is?Object.is:Ze,af=Object.prototype.hasOwnProperty;\nfunction bf(a,b){if($e(a,b))return!0;if(\"object\"!==typeof a||null===a||\"object\"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!af.call(b,c[d])||!$e(a[c[d]],b[c[d]]))return!1;return!0}\nvar cf=ya&&\"documentMode\"in document&&11>=document.documentMode,df={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange\".split(\" \")}},ef=null,ff=null,gf=null,hf=!1;\nfunction jf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(hf||null==ef||ef!==td(c))return null;c=ef;\"selectionStart\"in c&&yd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return gf&&bf(gf,c)?null:(gf=c,a=G.getPooled(df.select,ff,a,b),a.type=\"select\",a.target=ef,Xd(a),a)}\nvar kf={eventTypes:df,extractEvents:function(a,b,c,d,e,f){e=f||(d.window===d?d.document:9===d.nodeType?d:d.ownerDocument);if(!(f=!e)){a:{e=cc(e);f=wa.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?Pd(b):window;switch(a){case \"focus\":if(xe(e)||\"true\"===e.contentEditable)ef=e,ff=b,gf=null;break;case \"blur\":gf=ff=ef=null;break;case \"mousedown\":hf=!0;break;case \"contextmenu\":case \"mouseup\":case \"dragend\":return hf=!1,jf(c,d);case \"selectionchange\":if(cf)break;\ncase \"keydown\":case \"keyup\":return jf(c,d)}return null}},lf=G.extend({animationName:null,elapsedTime:null,pseudoElement:null}),mf=G.extend({clipboardData:function(a){return\"clipboardData\"in a?a.clipboardData:window.clipboardData}}),nf=Ne.extend({relatedTarget:null});function of(a){var b=a.keyCode;\"charCode\"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}\nvar pf={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},qf={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",\n116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},rf=Ne.extend({key:function(a){if(a.key){var b=pf[a.key]||a.key;if(\"Unidentified\"!==b)return b}return\"keypress\"===a.type?(a=of(a),13===a?\"Enter\":String.fromCharCode(a)):\"keydown\"===a.type||\"keyup\"===a.type?qf[a.keyCode]||\"Unidentified\":\"\"},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Qe,charCode:function(a){return\"keypress\"===\na.type?of(a):0},keyCode:function(a){return\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0},which:function(a){return\"keypress\"===a.type?of(a):\"keydown\"===a.type||\"keyup\"===a.type?a.keyCode:0}}),sf=Ve.extend({dataTransfer:null}),tf=Ne.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Qe}),uf=G.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),vf=Ve.extend({deltaX:function(a){return\"deltaX\"in a?a.deltaX:\"wheelDeltaX\"in\na?-a.wheelDeltaX:0},deltaY:function(a){return\"deltaY\"in a?a.deltaY:\"wheelDeltaY\"in a?-a.wheelDeltaY:\"wheelDelta\"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),wf={eventTypes:Wc,extractEvents:function(a,b,c,d){var e=Yc.get(a);if(!e)return null;switch(a){case \"keypress\":if(0===of(c))return null;case \"keydown\":case \"keyup\":a=rf;break;case \"blur\":case \"focus\":a=nf;break;case \"click\":if(2===c.button)return null;case \"auxclick\":case \"dblclick\":case \"mousedown\":case \"mousemove\":case \"mouseup\":case \"mouseout\":case \"mouseover\":case \"contextmenu\":a=\nVe;break;case \"drag\":case \"dragend\":case \"dragenter\":case \"dragexit\":case \"dragleave\":case \"dragover\":case \"dragstart\":case \"drop\":a=sf;break;case \"touchcancel\":case \"touchend\":case \"touchmove\":case \"touchstart\":a=tf;break;case Xb:case Yb:case Zb:a=lf;break;case $b:a=uf;break;case \"scroll\":a=Ne;break;case \"wheel\":a=vf;break;case \"copy\":case \"cut\":case \"paste\":a=mf;break;case \"gotpointercapture\":case \"lostpointercapture\":case \"pointercancel\":case \"pointerdown\":case \"pointermove\":case \"pointerout\":case \"pointerover\":case \"pointerup\":a=\nWe;break;default:a=G}b=a.getPooled(e,b,c,d);Xd(b);return b}};if(pa)throw Error(u(101));pa=Array.prototype.slice.call(\"ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin\".split(\" \"));ra();var xf=Nc;la=Qd;ma=xf;na=Pd;xa({SimpleEventPlugin:wf,EnterLeaveEventPlugin:Ye,ChangeEventPlugin:Me,SelectEventPlugin:kf,BeforeInputEventPlugin:ve});var yf=[],zf=-1;function H(a){0>zf||(a.current=yf[zf],yf[zf]=null,zf--)}\nfunction I(a,b){zf++;yf[zf]=a.current;a.current=b}var Af={},J={current:Af},K={current:!1},Bf=Af;function Cf(a,b){var c=a.type.contextTypes;if(!c)return Af;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}\nfunction Df(){H(K);H(J)}function Ef(a,b,c){if(J.current!==Af)throw Error(u(168));I(J,b);I(K,c)}function Ff(a,b,c){var d=a.stateNode;a=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,pb(b)||\"Unknown\",e));return n({},c,{},d)}function Gf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Af;Bf=J.current;I(J,a);I(K,K.current);return!0}\nfunction Hf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(a=Ff(a,b,Bf),d.__reactInternalMemoizedMergedChildContext=a,H(K),H(J),I(J,a)):H(K);I(K,c)}\nvar If=r.unstable_runWithPriority,Jf=r.unstable_scheduleCallback,Kf=r.unstable_cancelCallback,Lf=r.unstable_requestPaint,Mf=r.unstable_now,Nf=r.unstable_getCurrentPriorityLevel,Of=r.unstable_ImmediatePriority,Pf=r.unstable_UserBlockingPriority,Qf=r.unstable_NormalPriority,Rf=r.unstable_LowPriority,Sf=r.unstable_IdlePriority,Tf={},Uf=r.unstable_shouldYield,Vf=void 0!==Lf?Lf:function(){},Wf=null,Xf=null,Yf=!1,Zf=Mf(),$f=1E4>Zf?Mf:function(){return Mf()-Zf};\nfunction ag(){switch(Nf()){case Of:return 99;case Pf:return 98;case Qf:return 97;case Rf:return 96;case Sf:return 95;default:throw Error(u(332));}}function bg(a){switch(a){case 99:return Of;case 98:return Pf;case 97:return Qf;case 96:return Rf;case 95:return Sf;default:throw Error(u(332));}}function cg(a,b){a=bg(a);return If(a,b)}function dg(a,b,c){a=bg(a);return Jf(a,b,c)}function eg(a){null===Wf?(Wf=[a],Xf=Jf(Of,fg)):Wf.push(a);return Tf}function gg(){if(null!==Xf){var a=Xf;Xf=null;Kf(a)}fg()}\nfunction fg(){if(!Yf&&null!==Wf){Yf=!0;var a=0;try{var b=Wf;cg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Wf=null}catch(c){throw null!==Wf&&(Wf=Wf.slice(a+1)),Jf(Of,gg),c;}finally{Yf=!1}}}function hg(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function ig(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var jg={current:null},kg=null,lg=null,mg=null;function ng(){mg=lg=kg=null}\nfunction og(a){var b=jg.current;H(jg);a.type._context._currentValue=b}function pg(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function qg(a,b){kg=a;mg=lg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(rg=!0),a.firstContext=null)}\nfunction sg(a,b){if(mg!==a&&!1!==b&&0!==b){if(\"number\"!==typeof b||1073741823===b)mg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===lg){if(null===kg)throw Error(u(308));lg=b;kg.dependencies={expirationTime:0,firstContext:b,responders:null}}else lg=lg.next=b}return a._currentValue}var tg=!1;function ug(a){a.updateQueue={baseState:a.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}\nfunction vg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,baseQueue:a.baseQueue,shared:a.shared,effects:a.effects})}function wg(a,b){a={expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null};return a.next=a}function xg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}\nfunction yg(a,b){var c=a.alternate;null!==c&&vg(c,a);a=a.updateQueue;c=a.baseQueue;null===c?(a.baseQueue=b.next=b,b.next=b):(b.next=c.next,c.next=b)}\nfunction zg(a,b,c,d){var e=a.updateQueue;tg=!1;var f=e.baseQueue,g=e.shared.pending;if(null!==g){if(null!==f){var h=f.next;f.next=g.next;g.next=h}f=g;e.shared.pending=null;h=a.alternate;null!==h&&(h=h.updateQueue,null!==h&&(h.baseQueue=g))}if(null!==f){h=f.next;var k=e.baseState,l=0,m=null,p=null,x=null;if(null!==h){var z=h;do{g=z.expirationTime;if(g<d){var ca={expirationTime:z.expirationTime,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null};null===x?(p=x=\nca,m=k):x=x.next=ca;g>l&&(l=g)}else{null!==x&&(x=x.next={expirationTime:1073741823,suspenseConfig:z.suspenseConfig,tag:z.tag,payload:z.payload,callback:z.callback,next:null});Ag(g,z.suspenseConfig);a:{var D=a,t=z;g=b;ca=c;switch(t.tag){case 1:D=t.payload;if(\"function\"===typeof D){k=D.call(ca,k,g);break a}k=D;break a;case 3:D.effectTag=D.effectTag&-4097|64;case 0:D=t.payload;g=\"function\"===typeof D?D.call(ca,k,g):D;if(null===g||void 0===g)break a;k=n({},k,g);break a;case 2:tg=!0}}null!==z.callback&&\n(a.effectTag|=32,g=e.effects,null===g?e.effects=[z]:g.push(z))}z=z.next;if(null===z||z===h)if(g=e.shared.pending,null===g)break;else z=f.next=g.next,g.next=h,e.baseQueue=f=g,e.shared.pending=null}while(1)}null===x?m=k:x.next=p;e.baseState=m;e.baseQueue=x;Bg(l);a.expirationTime=l;a.memoizedState=k}}\nfunction Cg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=e;e=c;if(\"function\"!==typeof d)throw Error(u(191,d));d.call(e)}}}var Dg=Wa.ReactCurrentBatchConfig,Eg=(new aa.Component).refs;function Fg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.expirationTime&&(a.updateQueue.baseState=c)}\nvar Jg={isMounted:function(a){return(a=a._reactInternalFiber)?dc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e=wg(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);xg(a,e);Ig(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Gg(),d=Dg.suspense;\nc=Hg(c,a,d);d=wg(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);xg(a,d);Ig(a,c)}};function Kg(a,b,c,d,e,f,g){a=a.stateNode;return\"function\"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!bf(c,d)||!bf(e,f):!0}\nfunction Lg(a,b,c){var d=!1,e=Af;var f=b.contextType;\"object\"===typeof f&&null!==f?f=sg(f):(e=L(b)?Bf:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Cf(a,e):Af);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Jg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}\nfunction Mg(a,b,c,d){a=b.state;\"function\"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);\"function\"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Jg.enqueueReplaceState(b,b.state,null)}\nfunction Ng(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Eg;ug(a);var f=b.contextType;\"object\"===typeof f&&null!==f?e.context=sg(f):(f=L(b)?Bf:J.current,e.context=Cf(a,f));zg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;\"function\"===typeof f&&(Fg(a,b,f,c),e.state=a.memoizedState);\"function\"===typeof b.getDerivedStateFromProps||\"function\"===typeof e.getSnapshotBeforeUpdate||\"function\"!==typeof e.UNSAFE_componentWillMount&&\"function\"!==typeof e.componentWillMount||\n(b=e.state,\"function\"===typeof e.componentWillMount&&e.componentWillMount(),\"function\"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Jg.enqueueReplaceState(e,e.state,null),zg(a,c,e,d),e.state=a.memoizedState);\"function\"===typeof e.componentDidMount&&(a.effectTag|=4)}var Og=Array.isArray;\nfunction Pg(a,b,c){a=c.ref;if(null!==a&&\"function\"!==typeof a&&\"object\"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(u(309));var d=c.stateNode}if(!d)throw Error(u(147,a));var e=\"\"+a;if(null!==b&&null!==b.ref&&\"function\"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Eg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if(\"string\"!==typeof a)throw Error(u(284));if(!c._owner)throw Error(u(290,a));}return a}\nfunction Qg(a,b){if(\"textarea\"!==a.type)throw Error(u(31,\"[object Object]\"===Object.prototype.toString.call(b)?\"object with keys {\"+Object.keys(b).join(\", \")+\"}\":b,\"\"));}\nfunction Rg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Sg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=\n2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Tg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Pg(a,b,c),d.return=a,d;d=Ug(c.type,c.key,c.props,null,a.mode,d);d.ref=Pg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==\nc.implementation)return b=Vg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Wg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function p(a,b,c){if(\"string\"===typeof b||\"number\"===typeof b)return b=Tg(\"\"+b,a.mode,c),b.return=a,b;if(\"object\"===typeof b&&null!==b){switch(b.$$typeof){case Za:return c=Ug(b.type,b.key,b.props,null,a.mode,c),c.ref=Pg(a,null,b),c.return=a,c;case $a:return b=Vg(b,a.mode,c),b.return=a,b}if(Og(b)||\nnb(b))return b=Wg(b,a.mode,c,null),b.return=a,b;Qg(a,b)}return null}function x(a,b,c,d){var e=null!==b?b.key:null;if(\"string\"===typeof c||\"number\"===typeof c)return null!==e?null:h(a,b,\"\"+c,d);if(\"object\"===typeof c&&null!==c){switch(c.$$typeof){case Za:return c.key===e?c.type===ab?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case $a:return c.key===e?l(a,b,c,d):null}if(Og(c)||nb(c))return null!==e?null:m(a,b,c,d,null);Qg(a,c)}return null}function z(a,b,c,d,e){if(\"string\"===typeof d||\"number\"===typeof d)return a=\na.get(c)||null,h(b,a,\"\"+d,e);if(\"object\"===typeof d&&null!==d){switch(d.$$typeof){case Za:return a=a.get(null===d.key?c:d.key)||null,d.type===ab?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case $a:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Og(d)||nb(d))return a=a.get(c)||null,m(b,a,d,e,null);Qg(b,d)}return null}function ca(e,g,h,k){for(var l=null,t=null,m=g,y=g=0,A=null;null!==m&&y<h.length;y++){m.index>y?(A=m,m=null):A=m.sibling;var q=x(e,m,h[y],k);if(null===q){null===m&&(m=A);break}a&&\nm&&null===q.alternate&&b(e,m);g=f(q,g,y);null===t?l=q:t.sibling=q;t=q;m=A}if(y===h.length)return c(e,m),l;if(null===m){for(;y<h.length;y++)m=p(e,h[y],k),null!==m&&(g=f(m,g,y),null===t?l=m:t.sibling=m,t=m);return l}for(m=d(e,m);y<h.length;y++)A=z(m,e,y,h[y],k),null!==A&&(a&&null!==A.alternate&&m.delete(null===A.key?y:A.key),g=f(A,g,y),null===t?l=A:t.sibling=A,t=A);a&&m.forEach(function(a){return b(e,a)});return l}function D(e,g,h,l){var k=nb(h);if(\"function\"!==typeof k)throw Error(u(150));h=k.call(h);\nif(null==h)throw Error(u(151));for(var m=k=null,t=g,y=g=0,A=null,q=h.next();null!==t&&!q.done;y++,q=h.next()){t.index>y?(A=t,t=null):A=t.sibling;var D=x(e,t,q.value,l);if(null===D){null===t&&(t=A);break}a&&t&&null===D.alternate&&b(e,t);g=f(D,g,y);null===m?k=D:m.sibling=D;m=D;t=A}if(q.done)return c(e,t),k;if(null===t){for(;!q.done;y++,q=h.next())q=p(e,q.value,l),null!==q&&(g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);return k}for(t=d(e,t);!q.done;y++,q=h.next())q=z(t,e,y,q.value,l),null!==q&&(a&&null!==\nq.alternate&&t.delete(null===q.key?y:q.key),g=f(q,g,y),null===m?k=q:m.sibling=q,m=q);a&&t.forEach(function(a){return b(e,a)});return k}return function(a,d,f,h){var k=\"object\"===typeof f&&null!==f&&f.type===ab&&null===f.key;k&&(f=f.props.children);var l=\"object\"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Za:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ab){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,\nk.sibling);d=e(k,f.props);d.ref=Pg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ab?(d=Wg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Ug(f.type,f.key,f.props,null,a.mode,h),h.ref=Pg(a,d,f),h.return=a,a=h)}return g(a);case $a:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=\nd.sibling}d=Vg(f,a.mode,h);d.return=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Tg(f,a.mode,h),d.return=a,a=d),g(a);if(Og(f))return ca(a,d,f,h);if(nb(f))return D(a,d,f,h);l&&Qg(a,f);if(\"undefined\"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||\"Component\"));}return c(a,d)}}var Xg=Rg(!0),Yg=Rg(!1),Zg={},$g={current:Zg},ah={current:Zg},bh={current:Zg};\nfunction ch(a){if(a===Zg)throw Error(u(174));return a}function dh(a,b){I(bh,b);I(ah,a);I($g,Zg);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Ob(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Ob(b,a)}H($g);I($g,b)}function eh(){H($g);H(ah);H(bh)}function fh(a){ch(bh.current);var b=ch($g.current);var c=Ob(b,a.type);b!==c&&(I(ah,a),I($g,c))}function gh(a){ah.current===a&&(H($g),H(ah))}var M={current:0};\nfunction hh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===Bd||c.data===Cd))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function ih(a,b){return{responder:a,props:b}}\nvar jh=Wa.ReactCurrentDispatcher,kh=Wa.ReactCurrentBatchConfig,lh=0,N=null,O=null,P=null,mh=!1;function Q(){throw Error(u(321));}function nh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!$e(a[c],b[c]))return!1;return!0}\nfunction oh(a,b,c,d,e,f){lh=f;N=b;b.memoizedState=null;b.updateQueue=null;b.expirationTime=0;jh.current=null===a||null===a.memoizedState?ph:qh;a=c(d,e);if(b.expirationTime===lh){f=0;do{b.expirationTime=0;if(!(25>f))throw Error(u(301));f+=1;P=O=null;b.updateQueue=null;jh.current=rh;a=c(d,e)}while(b.expirationTime===lh)}jh.current=sh;b=null!==O&&null!==O.next;lh=0;P=O=N=null;mh=!1;if(b)throw Error(u(300));return a}\nfunction th(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===P?N.memoizedState=P=a:P=P.next=a;return P}function uh(){if(null===O){var a=N.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===P?N.memoizedState:P.next;if(null!==b)P=b,O=a;else{if(null===a)throw Error(u(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===P?N.memoizedState=P=a:P=P.next=a}return P}\nfunction vh(a,b){return\"function\"===typeof b?b(a):b}\nfunction wh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.expirationTime;if(l<lh){var m={expirationTime:k.expirationTime,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=m,f=d):h=h.next=m;l>N.expirationTime&&\n(N.expirationTime=l,Bg(l))}else null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:k.suspenseConfig,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),Ag(l,k.suspenseConfig),d=k.eagerReducer===a?k.eagerState:a(d,k.action);k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;$e(d,b.memoizedState)||(rg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}\nfunction xh(a){var b=uh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);$e(f,b.memoizedState)||(rg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}\nfunction yh(a){var b=th();\"function\"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:vh,lastRenderedState:a};a=a.dispatch=zh.bind(null,N,a);return[b.memoizedState,a]}function Ah(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=N.updateQueue;null===b?(b={lastEffect:null},N.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}\nfunction Bh(){return uh().memoizedState}function Ch(a,b,c,d){var e=th();N.effectTag|=a;e.memoizedState=Ah(1|b,c,void 0,void 0===d?null:d)}function Dh(a,b,c,d){var e=uh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&nh(d,g.deps)){Ah(b,c,f,d);return}}N.effectTag|=a;e.memoizedState=Ah(1|b,c,f,d)}function Eh(a,b){return Ch(516,4,a,b)}function Fh(a,b){return Dh(516,4,a,b)}function Gh(a,b){return Dh(4,2,a,b)}\nfunction Hh(a,b){if(\"function\"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Ih(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Dh(4,2,Hh.bind(null,b,a),c)}function Jh(){}function Kh(a,b){th().memoizedState=[a,void 0===b?null:b];return a}function Lh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}\nfunction Mh(a,b){var c=uh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&nh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Nh(a,b,c){var d=ag();cg(98>d?98:d,function(){a(!0)});cg(97<d?97:d,function(){var d=kh.suspense;kh.suspense=void 0===b?null:b;try{a(!1),c()}finally{kh.suspense=d}})}\nfunction zh(a,b,c){var d=Gg(),e=Dg.suspense;d=Hg(d,a,e);e={expirationTime:d,suspenseConfig:e,action:c,eagerReducer:null,eagerState:null,next:null};var f=b.pending;null===f?e.next=e:(e.next=f.next,f.next=e);b.pending=e;f=a.alternate;if(a===N||null!==f&&f===N)mh=!0,e.expirationTime=lh,N.expirationTime=lh;else{if(0===a.expirationTime&&(null===f||0===f.expirationTime)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.eagerReducer=f;e.eagerState=h;if($e(h,g))return}catch(k){}finally{}Ig(a,\nd)}}\nvar sh={readContext:sg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useResponder:Q,useDeferredValue:Q,useTransition:Q},ph={readContext:sg,useCallback:Kh,useContext:sg,useEffect:Eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ch(4,2,Hh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ch(4,2,a,b)},useMemo:function(a,b){var c=th();b=void 0===b?null:b;a=a();c.memoizedState=[a,\nb];return a},useReducer:function(a,b,c){var d=th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=zh.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=th();a={current:a};return b.memoizedState=a},useState:yh,useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=yh(a),d=c[0],e=c[1];Eh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=\nc}},[a,b]);return d},useTransition:function(a){var b=yh(!1),c=b[0];b=b[1];return[Kh(Nh.bind(null,b,a),[b,a]),c]}},qh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:wh,useRef:Bh,useState:function(){return wh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=wh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=\nwh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,b,a),[b,a]),c]}},rh={readContext:sg,useCallback:Lh,useContext:sg,useEffect:Fh,useImperativeHandle:Ih,useLayoutEffect:Gh,useMemo:Mh,useReducer:xh,useRef:Bh,useState:function(){return xh(vh)},useDebugValue:Jh,useResponder:ih,useDeferredValue:function(a,b){var c=xh(vh),d=c[0],e=c[1];Fh(function(){var c=kh.suspense;kh.suspense=void 0===b?null:b;try{e(a)}finally{kh.suspense=c}},[a,b]);return d},useTransition:function(a){var b=xh(vh),c=b[0];b=b[1];return[Lh(Nh.bind(null,\nb,a),[b,a]),c]}},Oh=null,Ph=null,Qh=!1;function Rh(a,b){var c=Sh(5,null,null,0);c.elementType=\"DELETED\";c.type=\"DELETED\";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}\nfunction Th(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=\"\"===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}\nfunction Uh(a){if(Qh){var b=Ph;if(b){var c=b;if(!Th(a,b)){b=Jd(c.nextSibling);if(!b||!Th(a,b)){a.effectTag=a.effectTag&-1025|2;Qh=!1;Oh=a;return}Rh(Oh,c)}Oh=a;Ph=Jd(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,Qh=!1,Oh=a}}function Vh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;Oh=a}\nfunction Wh(a){if(a!==Oh)return!1;if(!Qh)return Vh(a),Qh=!0,!1;var b=a.type;if(5!==a.tag||\"head\"!==b&&\"body\"!==b&&!Gd(b,a.memoizedProps))for(b=Ph;b;)Rh(a,b),b=Jd(b.nextSibling);Vh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===Ad){if(0===b){Ph=Jd(a.nextSibling);break a}b--}else c!==zd&&c!==Cd&&c!==Bd||b++}a=a.nextSibling}Ph=null}}else Ph=Oh?Jd(a.stateNode.nextSibling):null;return!0}\nfunction Xh(){Ph=Oh=null;Qh=!1}var Yh=Wa.ReactCurrentOwner,rg=!1;function R(a,b,c,d){b.child=null===a?Yg(b,null,c,d):Xg(b,a.child,c,d)}function Zh(a,b,c,d,e){c=c.render;var f=b.ref;qg(b,e);d=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}\nfunction ai(a,b,c,d,e,f){if(null===a){var g=c.type;if(\"function\"===typeof g&&!bi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ci(a,b,g,d,e,f);a=Ug(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:bf,c(e,d)&&a.ref===b.ref))return $h(a,b,f);b.effectTag|=1;a=Sg(g,d);a.ref=b.ref;a.return=b;return b.child=a}\nfunction ci(a,b,c,d,e,f){return null!==a&&bf(a.memoizedProps,d)&&a.ref===b.ref&&(rg=!1,e<f)?(b.expirationTime=a.expirationTime,$h(a,b,f)):di(a,b,c,d,f)}function ei(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function di(a,b,c,d,e){var f=L(c)?Bf:J.current;f=Cf(b,f);qg(b,e);c=oh(a,b,c,d,f,e);if(null!==a&&!rg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,c,e);return b.child}\nfunction fi(a,b,c,d,e){if(L(c)){var f=!0;Gf(b)}else f=!1;qg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Lg(b,c,d),Ng(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;\"object\"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l));var m=c.getDerivedStateFromProps,p=\"function\"===typeof m||\"function\"===typeof g.getSnapshotBeforeUpdate;p||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\n\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l);tg=!1;var x=b.memoizedState;g.state=x;zg(b,d,g,e);k=b.memoizedState;h!==d||x!==k||K.current||tg?(\"function\"===typeof m&&(Fg(b,c,m,d),k=b.memoizedState),(h=tg||Kg(b,c,h,d,x,k,l))?(p||\"function\"!==typeof g.UNSAFE_componentWillMount&&\"function\"!==typeof g.componentWillMount||(\"function\"===typeof g.componentWillMount&&g.componentWillMount(),\"function\"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),\"function\"===\ntypeof g.componentDidMount&&(b.effectTag|=4)):(\"function\"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):(\"function\"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,vg(a,b),h=b.memoizedProps,g.props=b.type===b.elementType?h:ig(b.type,h),k=g.context,l=c.contextType,\"object\"===typeof l&&null!==l?l=sg(l):(l=L(c)?Bf:J.current,l=Cf(b,l)),m=c.getDerivedStateFromProps,(p=\"function\"===typeof m||\"function\"===\ntypeof g.getSnapshotBeforeUpdate)||\"function\"!==typeof g.UNSAFE_componentWillReceiveProps&&\"function\"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Mg(b,g,d,l),tg=!1,k=b.memoizedState,g.state=k,zg(b,d,g,e),x=b.memoizedState,h!==d||k!==x||K.current||tg?(\"function\"===typeof m&&(Fg(b,c,m,d),x=b.memoizedState),(m=tg||Kg(b,c,h,d,k,x,l))?(p||\"function\"!==typeof g.UNSAFE_componentWillUpdate&&\"function\"!==typeof g.componentWillUpdate||(\"function\"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,\nx,l),\"function\"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,l)),\"function\"===typeof g.componentDidUpdate&&(b.effectTag|=4),\"function\"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=l,d=m):\n(\"function\"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),\"function\"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return gi(a,b,c,d,f,e)}\nfunction gi(a,b,c,d,e,f){ei(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Hf(b,c,!1),$h(a,b,f);d=b.stateNode;Yh.current=b;var h=g&&\"function\"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=Xg(b,a.child,null,f),b.child=Xg(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Hf(b,c,!0);return b.child}function hi(a){var b=a.stateNode;b.pendingContext?Ef(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Ef(a,b.context,!1);dh(a,b.containerInfo)}\nvar ii={dehydrated:null,retryTime:0};\nfunction ji(a,b,c){var d=b.mode,e=b.pendingProps,f=M.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(M,f&1);if(null===a){void 0!==e.fallback&&Uh(b);if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=\nb;e.sibling=c;b.memoizedState=ii;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Yg(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Sg(a,a.pendingProps);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=Sg(d,e);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=ii;b.child=c;return d}c=Xg(b,a.child,e.children,c);b.memoizedState=null;return b.child=\nc}a=a.child;if(g){g=e.fallback;e=Wg(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Wg(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=ii;b.child=e;return c}b.memoizedState=null;return b.child=Xg(b,a,e.children,c)}\nfunction ki(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);pg(a.return,b)}function li(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}\nfunction mi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&ki(a,c);else if(19===a.tag)ki(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(M,d);if(0===(b.mode&2))b.memoizedState=\nnull;else switch(e){case \"forwards\":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===hh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);li(b,!1,e,c,f,b.lastEffect);break;case \"backwards\":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===hh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}li(b,!0,c,null,f,b.lastEffect);break;case \"together\":li(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}\nfunction $h(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&Bg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(u(153));if(null!==b.child){a=b.child;c=Sg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Sg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}var ni,oi,pi,qi;\nni=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};oi=function(){};\npi=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;ch($g.current);a=null;switch(c){case \"input\":f=zb(g,f);d=zb(g,d);a=[];break;case \"option\":f=Gb(g,f);d=Gb(g,d);a=[];break;case \"select\":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case \"textarea\":f=Ib(g,f);d=Ib(g,d);a=[];break;default:\"function\"!==typeof f.onClick&&\"function\"===typeof d.onClick&&(g.onclick=sd)}od(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if(\"style\"===\nh)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]=\"\");else\"dangerouslySetInnerHTML\"!==h&&\"children\"!==h&&\"suppressContentEditableWarning\"!==h&&\"suppressHydrationWarning\"!==h&&\"autoFocus\"!==h&&(va.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if(\"style\"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]=\"\");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),\nc[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else\"dangerouslySetInnerHTML\"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,l)):\"children\"===h?g===l||\"string\"!==typeof l&&\"number\"!==typeof l||(a=a||[]).push(h,\"\"+l):\"suppressContentEditableWarning\"!==h&&\"suppressHydrationWarning\"!==h&&(va.hasOwnProperty(h)?(null!=l&&rd(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push(\"style\",c);e=a;if(b.updateQueue=e)b.effectTag|=4}};\nqi=function(a,b,c,d){c!==d&&(b.effectTag|=4)};function ri(a,b){switch(a.tailMode){case \"hidden\":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case \"collapsed\":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}\nfunction si(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return L(b.type)&&Df(),null;case 3:return eh(),H(K),H(J),c=b.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==a&&null!==a.child||!Wh(b)||(b.effectTag|=4),oi(b),null;case 5:gh(b);c=ch(bh.current);var e=b.type;if(null!==a&&null!=b.stateNode)pi(a,b,e,d,c),a.ref!==b.ref&&(b.effectTag|=128);else{if(!d){if(null===b.stateNode)throw Error(u(166));\nreturn null}a=ch($g.current);if(Wh(b)){d=b.stateNode;e=b.type;var f=b.memoizedProps;d[Md]=b;d[Nd]=f;switch(e){case \"iframe\":case \"object\":case \"embed\":F(\"load\",d);break;case \"video\":case \"audio\":for(a=0;a<ac.length;a++)F(ac[a],d);break;case \"source\":F(\"error\",d);break;case \"img\":case \"image\":case \"link\":F(\"error\",d);F(\"load\",d);break;case \"form\":F(\"reset\",d);F(\"submit\",d);break;case \"details\":F(\"toggle\",d);break;case \"input\":Ab(d,f);F(\"invalid\",d);rd(c,\"onChange\");break;case \"select\":d._wrapperState=\n{wasMultiple:!!f.multiple};F(\"invalid\",d);rd(c,\"onChange\");break;case \"textarea\":Jb(d,f),F(\"invalid\",d),rd(c,\"onChange\")}od(e,f);a=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];\"children\"===g?\"string\"===typeof h?d.textContent!==h&&(a=[\"children\",h]):\"number\"===typeof h&&d.textContent!==\"\"+h&&(a=[\"children\",\"\"+h]):va.hasOwnProperty(g)&&null!=h&&rd(c,g)}switch(e){case \"input\":xb(d);Eb(d,f,!0);break;case \"textarea\":xb(d);Lb(d);break;case \"select\":case \"option\":break;default:\"function\"===typeof f.onClick&&\n(d.onclick=sd)}c=a;b.updateQueue=c;null!==c&&(b.effectTag|=4)}else{g=9===c.nodeType?c:c.ownerDocument;a===qd&&(a=Nb(e));a===qd?\"script\"===e?(a=g.createElement(\"div\"),a.innerHTML=\"<script>\\x3c/script>\",a=a.removeChild(a.firstChild)):\"string\"===typeof d.is?a=g.createElement(e,{is:d.is}):(a=g.createElement(e),\"select\"===e&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,e);a[Md]=b;a[Nd]=d;ni(a,b,!1,!1);b.stateNode=a;g=pd(e,d);switch(e){case \"iframe\":case \"object\":case \"embed\":F(\"load\",\na);h=d;break;case \"video\":case \"audio\":for(h=0;h<ac.length;h++)F(ac[h],a);h=d;break;case \"source\":F(\"error\",a);h=d;break;case \"img\":case \"image\":case \"link\":F(\"error\",a);F(\"load\",a);h=d;break;case \"form\":F(\"reset\",a);F(\"submit\",a);h=d;break;case \"details\":F(\"toggle\",a);h=d;break;case \"input\":Ab(a,d);h=zb(a,d);F(\"invalid\",a);rd(c,\"onChange\");break;case \"option\":h=Gb(a,d);break;case \"select\":a._wrapperState={wasMultiple:!!d.multiple};h=n({},d,{value:void 0});F(\"invalid\",a);rd(c,\"onChange\");break;case \"textarea\":Jb(a,\nd);h=Ib(a,d);F(\"invalid\",a);rd(c,\"onChange\");break;default:h=d}od(e,h);var k=h;for(f in k)if(k.hasOwnProperty(f)){var l=k[f];\"style\"===f?md(a,l):\"dangerouslySetInnerHTML\"===f?(l=l?l.__html:void 0,null!=l&&Qb(a,l)):\"children\"===f?\"string\"===typeof l?(\"textarea\"!==e||\"\"!==l)&&Rb(a,l):\"number\"===typeof l&&Rb(a,\"\"+l):\"suppressContentEditableWarning\"!==f&&\"suppressHydrationWarning\"!==f&&\"autoFocus\"!==f&&(va.hasOwnProperty(f)?null!=l&&rd(c,f):null!=l&&Xa(a,f,l,g))}switch(e){case \"input\":xb(a);Eb(a,d,!1);\nbreak;case \"textarea\":xb(a);Lb(a);break;case \"option\":null!=d.value&&a.setAttribute(\"value\",\"\"+rb(d.value));break;case \"select\":a.multiple=!!d.multiple;c=d.value;null!=c?Hb(a,!!d.multiple,c,!1):null!=d.defaultValue&&Hb(a,!!d.multiple,d.defaultValue,!0);break;default:\"function\"===typeof h.onClick&&(a.onclick=sd)}Fd(e,d)&&(b.effectTag|=4)}null!==b.ref&&(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)qi(a,b,a.memoizedProps,d);else{if(\"string\"!==typeof d&&null===b.stateNode)throw Error(u(166));\nc=ch(bh.current);ch($g.current);Wh(b)?(c=b.stateNode,d=b.memoizedProps,c[Md]=b,c.nodeValue!==d&&(b.effectTag|=4)):(c=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),c[Md]=b,b.stateNode=c)}return null;case 13:H(M);d=b.memoizedState;if(0!==(b.effectTag&64))return b.expirationTime=c,b;c=null!==d;d=!1;null===a?void 0!==b.memoizedProps.fallback&&Wh(b):(e=a.memoizedState,d=null!==e,c||null===e||(e=a.child.sibling,null!==e&&(f=b.firstEffect,null!==f?(b.firstEffect=e,e.nextEffect=f):(b.firstEffect=b.lastEffect=\ne,e.nextEffect=null),e.effectTag=8)));if(c&&!d&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(M.current&1))S===ti&&(S=ui);else{if(S===ti||S===ui)S=vi;0!==wi&&null!==T&&(xi(T,U),yi(T,wi))}if(c||d)b.effectTag|=4;return null;case 4:return eh(),oi(b),null;case 10:return og(b),null;case 17:return L(b.type)&&Df(),null;case 19:H(M);d=b.memoizedState;if(null===d)return null;e=0!==(b.effectTag&64);f=d.rendering;if(null===f)if(e)ri(d,!1);else{if(S!==ti||null!==a&&0!==(a.effectTag&\n64))for(f=b.child;null!==f;){a=hh(f);if(null!==a){b.effectTag|=64;ri(d,!1);e=a.updateQueue;null!==e&&(b.updateQueue=e,b.effectTag|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;for(d=b.child;null!==d;)e=d,f=c,e.effectTag&=2,e.nextEffect=null,e.firstEffect=null,e.lastEffect=null,a=e.alternate,null===a?(e.childExpirationTime=0,e.expirationTime=f,e.child=null,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null):(e.childExpirationTime=a.childExpirationTime,\ne.expirationTime=a.expirationTime,e.child=a.child,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,f=a.dependencies,e.dependencies=null===f?null:{expirationTime:f.expirationTime,firstContext:f.firstContext,responders:f.responders}),d=d.sibling;I(M,M.current&1|2);return b.child}f=f.sibling}}else{if(!e)if(a=hh(f),null!==a){if(b.effectTag|=64,e=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.effectTag|=4),ri(d,!0),null===d.tail&&\"hidden\"===d.tailMode&&!f.alternate)return b=\nb.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*$f()-d.renderingStartTime>d.tailExpiration&&1<c&&(b.effectTag|=64,e=!0,ri(d,!1),b.expirationTime=b.childExpirationTime=c-1);d.isBackwards?(f.sibling=b.child,b.child=f):(c=d.last,null!==c?c.sibling=f:b.child=f,d.last=f)}return null!==d.tail?(0===d.tailExpiration&&(d.tailExpiration=$f()+500),c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=$f(),c.sibling=null,b=M.current,I(M,e?b&1|2:b&1),c):null}throw Error(u(156,\nb.tag));}function zi(a){switch(a.tag){case 1:L(a.type)&&Df();var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:eh();H(K);H(J);b=a.effectTag;if(0!==(b&64))throw Error(u(285));a.effectTag=b&-4097|64;return a;case 5:return gh(a),null;case 13:return H(M),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return H(M),null;case 4:return eh(),null;case 10:return og(a),null;default:return null}}function Ai(a,b){return{value:a,source:b,stack:qb(b)}}\nvar Bi=\"function\"===typeof WeakSet?WeakSet:Set;function Ci(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=qb(c));null!==c&&pb(c.type);b=b.value;null!==a&&1===a.tag&&pb(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Di(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Ei(a,c)}}function Fi(a){var b=a.ref;if(null!==b)if(\"function\"===typeof b)try{b(null)}catch(c){Ei(a,c)}else b.current=null}\nfunction Gi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ig(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(u(163));}\nfunction Hi(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.destroy;c.destroy=void 0;void 0!==d&&d()}c=c.next}while(c!==b)}}function Ii(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}\nfunction Ji(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:Ii(3,c);return;case 1:a=c.stateNode;if(c.effectTag&4)if(null===b)a.componentDidMount();else{var d=c.elementType===c.type?b.memoizedProps:ig(c.type,b.memoizedProps);a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}b=c.updateQueue;null!==b&&Cg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Cg(c,b,a)}return;\ncase 5:a=c.stateNode;null===b&&c.effectTag&4&&Fd(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Vc(c))));return;case 19:case 17:case 20:case 21:return}throw Error(u(163));}\nfunction Ki(a,b,c){\"function\"===typeof Li&&Li(b);switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;cg(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Ei(g,h)}}a=a.next}while(a!==d)})}break;case 1:Fi(b);c=b.stateNode;\"function\"===typeof c.componentWillUnmount&&Di(b,c);break;case 5:Fi(b);break;case 4:Mi(a,b,c)}}\nfunction Ni(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;a.stateNode=null;null!==b&&Ni(b)}function Oi(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Pi(a){a:{for(var b=a.return;null!==b;){if(Oi(b)){var c=b;break a}b=b.return}throw Error(u(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(u(161));}c.effectTag&16&&(Rb(b,\"\"),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Oi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;\nif(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}d?Qi(a,c,b):Ri(a,c,b)}\nfunction Qi(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=sd));else if(4!==d&&(a=a.child,null!==a))for(Qi(a,b,c),a=a.sibling;null!==a;)Qi(a,b,c),a=a.sibling}\nfunction Ri(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Ri(a,b,c),a=a.sibling;null!==a;)Ri(a,b,c),a=a.sibling}\nfunction Mi(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(u(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Ki(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break a;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=\nf,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Ki(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}\nfunction Si(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:Hi(3,b);return;case 1:return;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Nd]=d;\"input\"===a&&\"radio\"===d.type&&null!=d.name&&Bb(c,d);pd(a,e);b=pd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];\"style\"===g?md(c,h):\"dangerouslySetInnerHTML\"===g?Qb(c,h):\"children\"===g?Rb(c,h):Xa(c,g,h,b)}switch(a){case \"input\":Cb(c,d);break;\ncase \"textarea\":Kb(c,d);break;case \"select\":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Hb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Hb(c,!!d.multiple,d.defaultValue,!0):Hb(c,!!d.multiple,d.multiple?[]:\"\",!1))}}}return;case 6:if(null===b.stateNode)throw Error(u(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,Vc(b.containerInfo));return;case 12:return;case 13:c=b;null===b.memoizedState?\nd=!1:(d=!0,c=b.child,Ti=$f());if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,\"function\"===typeof f.setProperty?f.setProperty(\"display\",\"none\",\"important\"):f.display=\"none\"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty(\"display\")?e.display:null,f.style.display=ld(\"display\",e));else if(6===a.tag)a.stateNode.nodeValue=d?\"\":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=\nf;continue}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===c)break;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Ui(b);return;case 19:Ui(b);return;case 17:return}throw Error(u(163));}function Ui(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Bi);b.forEach(function(b){var d=Vi.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nvar Wi=\"function\"===typeof WeakMap?WeakMap:Map;function Xi(a,b,c){c=wg(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Yi||(Yi=!0,Zi=d);Ci(a,b)};return c}\nfunction $i(a,b,c){c=wg(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if(\"function\"===typeof d){var e=b.value;c.payload=function(){Ci(a,b);return d(e)}}var f=a.stateNode;null!==f&&\"function\"===typeof f.componentDidCatch&&(c.callback=function(){\"function\"!==typeof d&&(null===aj?aj=new Set([this]):aj.add(this),Ci(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:\"\"})});return c}\nvar bj=Math.ceil,cj=Wa.ReactCurrentDispatcher,dj=Wa.ReactCurrentOwner,V=0,ej=8,fj=16,gj=32,ti=0,hj=1,ij=2,ui=3,vi=4,jj=5,W=V,T=null,X=null,U=0,S=ti,kj=null,lj=1073741823,mj=1073741823,nj=null,wi=0,oj=!1,Ti=0,pj=500,Y=null,Yi=!1,Zi=null,aj=null,qj=!1,rj=null,sj=90,tj=null,uj=0,vj=null,wj=0;function Gg(){return(W&(fj|gj))!==V?1073741821-($f()/10|0):0!==wj?wj:wj=1073741821-($f()/10|0)}\nfunction Hg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=ag();if(0===(b&4))return 99===d?1073741823:1073741822;if((W&fj)!==V)return U;if(null!==c)a=hg(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=hg(a,150,100);break;case 97:case 96:a=hg(a,5E3,250);break;case 95:a=2;break;default:throw Error(u(326));}null!==T&&a===U&&--a;return a}\nfunction Ig(a,b){if(50<uj)throw uj=0,vj=null,Error(u(185));a=xj(a,b);if(null!==a){var c=ag();1073741823===b?(W&ej)!==V&&(W&(fj|gj))===V?yj(a):(Z(a),W===V&&gg()):Z(a);(W&4)===V||98!==c&&99!==c||(null===tj?tj=new Map([[a,b]]):(c=tj.get(a),(void 0===c||c>b)&&tj.set(a,b)))}}\nfunction xj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(T===e&&(Bg(b),S===vi&&xi(e,U)),yi(e,b));return e}\nfunction zj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Aj(a,b))return b;var c=a.lastPingedTime;a=a.nextKnownPendingLevel;a=c>a?c:a;return 2>=a&&b!==a?0:a}\nfunction Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=eg(yj.bind(null,a));else{var b=zj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Gg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Tf&&Kf(c)}a.callbackExpirationTime=\nb;a.callbackPriority=d;b=1073741823===b?eg(yj.bind(null,a)):dg(d,Bj.bind(null,a),{timeout:10*(1073741821-b)-$f()});a.callbackNode=b}}}\nfunction Bj(a,b){wj=0;if(b)return b=Gg(),Cj(a,b),Z(a),null;var c=zj(a);if(0!==c){b=a.callbackNode;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&c===U||Ej(a,c);if(null!==X){var d=W;W|=fj;var e=Fj();do try{Gj();break}catch(h){Hj(a,h)}while(1);ng();W=d;cj.current=e;if(S===hj)throw b=kj,Ej(a,c),xi(a,c),Z(a),b;if(null===X)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=S,T=null,d){case ti:case hj:throw Error(u(345));case ij:Cj(a,2<c?2:c);break;case ui:xi(a,c);d=a.lastSuspendedTime;\nc===d&&(a.nextKnownPendingLevel=Ij(e));if(1073741823===lj&&(e=Ti+pj-$f(),10<e)){if(oj){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=c;Ej(a,c);break}}f=zj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=Hd(Jj.bind(null,a),e);break}Jj(a);break;case vi:xi(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Ij(e));if(oj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Ej(a,c);break}e=zj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=\nd;break}1073741823!==mj?d=10*(1073741821-mj)-$f():1073741823===lj?d=0:(d=10*(1073741821-lj)-5E3,e=$f(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*bj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=Hd(Jj.bind(null,a),d);break}Jj(a);break;case jj:if(1073741823!==lj&&null!==nj){f=lj;var g=nj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=$f()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){xi(a,c);a.timeoutHandle=\nHd(Jj.bind(null,a),d);break}}Jj(a);break;default:throw Error(u(329));}Z(a);if(a.callbackNode===b)return Bj.bind(null,a)}}return null}\nfunction yj(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if((W&(fj|gj))!==V)throw Error(u(327));Dj();a===T&&b===U||Ej(a,b);if(null!==X){var c=W;W|=fj;var d=Fj();do try{Kj();break}catch(e){Hj(a,e)}while(1);ng();W=c;cj.current=d;if(S===hj)throw c=kj,Ej(a,b),xi(a,b),Z(a),c;if(null!==X)throw Error(u(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;T=null;Jj(a);Z(a)}return null}function Lj(){if(null!==tj){var a=tj;tj=null;a.forEach(function(a,c){Cj(c,a);Z(c)});gg()}}\nfunction Mj(a,b){var c=W;W|=1;try{return a(b)}finally{W=c,W===V&&gg()}}function Nj(a,b){var c=W;W&=-2;W|=ej;try{return a(b)}finally{W=c,W===V&&gg()}}\nfunction Ej(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Id(c));if(null!==X)for(c=X.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Df();break;case 3:eh();H(K);H(J);break;case 5:gh(d);break;case 4:eh();break;case 13:H(M);break;case 19:H(M);break;case 10:og(d)}c=c.return}T=a;X=Sg(a.current,null);U=b;S=ti;kj=null;mj=lj=1073741823;nj=null;wi=0;oj=!1}\nfunction Hj(a,b){do{try{ng();jh.current=sh;if(mh)for(var c=N.memoizedState;null!==c;){var d=c.queue;null!==d&&(d.pending=null);c=c.next}lh=0;P=O=N=null;mh=!1;if(null===X||null===X.return)return S=hj,kj=b,X=null;a:{var e=a,f=X.return,g=X,h=b;b=U;g.effectTag|=2048;g.firstEffect=g.lastEffect=null;if(null!==h&&\"object\"===typeof h&&\"function\"===typeof h.then){var k=h;if(0===(g.mode&2)){var l=g.alternate;l?(g.updateQueue=l.updateQueue,g.memoizedState=l.memoizedState,g.expirationTime=l.expirationTime):(g.updateQueue=\nnull,g.memoizedState=null)}var m=0!==(M.current&1),p=f;do{var x;if(x=13===p.tag){var z=p.memoizedState;if(null!==z)x=null!==z.dehydrated?!0:!1;else{var ca=p.memoizedProps;x=void 0===ca.fallback?!1:!0!==ca.unstable_avoidThisFallback?!0:m?!1:!0}}if(x){var D=p.updateQueue;if(null===D){var t=new Set;t.add(k);p.updateQueue=t}else D.add(k);if(0===(p.mode&2)){p.effectTag|=64;g.effectTag&=-2981;if(1===g.tag)if(null===g.alternate)g.tag=17;else{var y=wg(1073741823,null);y.tag=2;xg(g,y)}g.expirationTime=1073741823;\nbreak a}h=void 0;g=b;var A=e.pingCache;null===A?(A=e.pingCache=new Wi,h=new Set,A.set(k,h)):(h=A.get(k),void 0===h&&(h=new Set,A.set(k,h)));if(!h.has(g)){h.add(g);var q=Oj.bind(null,e,k,g);k.then(q,q)}p.effectTag|=4096;p.expirationTime=b;break a}p=p.return}while(null!==p);h=Error((pb(g.type)||\"A React component\")+\" suspended while rendering, but no fallback UI was specified.\\n\\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.\"+qb(g))}S!==\njj&&(S=ij);h=Ai(h,g);p=f;do{switch(p.tag){case 3:k=h;p.effectTag|=4096;p.expirationTime=b;var B=Xi(p,k,b);yg(p,B);break a;case 1:k=h;var w=p.type,ub=p.stateNode;if(0===(p.effectTag&64)&&(\"function\"===typeof w.getDerivedStateFromError||null!==ub&&\"function\"===typeof ub.componentDidCatch&&(null===aj||!aj.has(ub)))){p.effectTag|=4096;p.expirationTime=b;var vb=$i(p,k,b);yg(p,vb);break a}}p=p.return}while(null!==p)}X=Pj(X)}catch(Xc){b=Xc;continue}break}while(1)}\nfunction Fj(){var a=cj.current;cj.current=sh;return null===a?sh:a}function Ag(a,b){a<lj&&2<a&&(lj=a);null!==b&&a<mj&&2<a&&(mj=a,nj=b)}function Bg(a){a>wi&&(wi=a)}function Kj(){for(;null!==X;)X=Qj(X)}function Gj(){for(;null!==X&&!Uf();)X=Qj(X)}function Qj(a){var b=Rj(a.alternate,a,U);a.memoizedProps=a.pendingProps;null===b&&(b=Pj(a));dj.current=null;return b}\nfunction Pj(a){X=a;do{var b=X.alternate;a=X.return;if(0===(X.effectTag&2048)){b=si(b,X,U);if(1===U||1!==X.childExpirationTime){for(var c=0,d=X.child;null!==d;){var e=d.expirationTime,f=d.childExpirationTime;e>c&&(c=e);f>c&&(c=f);d=d.sibling}X.childExpirationTime=c}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=X.firstEffect),null!==X.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=X.firstEffect),a.lastEffect=X.lastEffect),1<X.effectTag&&(null!==\na.lastEffect?a.lastEffect.nextEffect=X:a.firstEffect=X,a.lastEffect=X))}else{b=zi(X);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=X.sibling;if(null!==b)return b;X=a}while(null!==X);S===ti&&(S=jj);return null}function Ij(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Jj(a){var b=ag();cg(99,Sj.bind(null,a,b));return null}\nfunction Sj(a,b){do Dj();while(null!==rj);if((W&(fj|gj))!==V)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Ij(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=\nd-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===T&&(X=T=null,U=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=W;W|=gj;dj.current=null;Dd=fd;var g=xd();if(yd(g)){if(\"selectionStart\"in g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var k=h.getSelection&&h.getSelection();if(k&&0!==k.rangeCount){h=k.anchorNode;var l=k.anchorOffset,\nm=k.focusNode;k=k.focusOffset;try{h.nodeType,m.nodeType}catch(wb){h=null;break a}var p=0,x=-1,z=-1,ca=0,D=0,t=g,y=null;b:for(;;){for(var A;;){t!==h||0!==l&&3!==t.nodeType||(x=p+l);t!==m||0!==k&&3!==t.nodeType||(z=p+k);3===t.nodeType&&(p+=t.nodeValue.length);if(null===(A=t.firstChild))break;y=t;t=A}for(;;){if(t===g)break b;y===h&&++ca===l&&(x=p);y===m&&++D===k&&(z=p);if(null!==(A=t.nextSibling))break;t=y;y=t.parentNode}t=A}h=-1===x||-1===z?null:{start:x,end:z}}else h=null}h=h||{start:0,end:0}}else h=\nnull;Ed={activeElementDetached:null,focusedElem:g,selectionRange:h};fd=!1;Y=e;do try{Tj()}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(g=a,h=b;null!==Y;){var q=Y.effectTag;q&16&&Rb(Y.stateNode,\"\");if(q&128){var B=Y.alternate;if(null!==B){var w=B.ref;null!==w&&(\"function\"===typeof w?w(null):w.current=null)}}switch(q&1038){case 2:Pi(Y);Y.effectTag&=-3;break;case 6:Pi(Y);Y.effectTag&=-3;Si(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=\n-1025;Si(Y.alternate,Y);break;case 4:Si(Y.alternate,Y);break;case 8:l=Y,Mi(g,l,h),Ni(l)}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);w=Ed;B=xd();q=w.focusedElem;h=w.selectionRange;if(B!==q&&q&&q.ownerDocument&&wd(q.ownerDocument.documentElement,q)){null!==h&&yd(q)&&(B=h.start,w=h.end,void 0===w&&(w=B),\"selectionStart\"in q?(q.selectionStart=B,q.selectionEnd=Math.min(w,q.value.length)):(w=(B=q.ownerDocument||document)&&B.defaultView||window,w.getSelection&&\n(w=w.getSelection(),l=q.textContent.length,g=Math.min(h.start,l),h=void 0===h.end?g:Math.min(h.end,l),!w.extend&&g>h&&(l=h,h=g,g=l),l=vd(q,g),m=vd(q,h),l&&m&&(1!==w.rangeCount||w.anchorNode!==l.node||w.anchorOffset!==l.offset||w.focusNode!==m.node||w.focusOffset!==m.offset)&&(B=B.createRange(),B.setStart(l.node,l.offset),w.removeAllRanges(),g>h?(w.addRange(B),w.extend(m.node,m.offset)):(B.setEnd(m.node,m.offset),w.addRange(B))))));B=[];for(w=q;w=w.parentNode;)1===w.nodeType&&B.push({element:w,left:w.scrollLeft,\ntop:w.scrollTop});\"function\"===typeof q.focus&&q.focus();for(q=0;q<B.length;q++)w=B[q],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}fd=!!Dd;Ed=Dd=null;a.current=c;Y=e;do try{for(q=a;null!==Y;){var ub=Y.effectTag;ub&36&&Ji(q,Y.alternate,Y);if(ub&128){B=void 0;var vb=Y.ref;if(null!==vb){var Xc=Y.stateNode;switch(Y.tag){case 5:B=Xc;break;default:B=Xc}\"function\"===typeof vb?vb(B):vb.current=B}}Y=Y.nextEffect}}catch(wb){if(null===Y)throw Error(u(330));Ei(Y,wb);Y=Y.nextEffect}while(null!==Y);Y=\nnull;Vf();W=f}else a.current=c;if(qj)qj=!1,rj=a,sj=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(aj=null);1073741823===b?a===vj?uj++:(uj=0,vj=a):uj=0;\"function\"===typeof Uj&&Uj(c.stateNode,d);Z(a);if(Yi)throw Yi=!1,a=Zi,Zi=null,a;if((W&ej)!==V)return null;gg();return null}function Tj(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Gi(Y.alternate,Y);0===(a&512)||qj||(qj=!0,dg(97,function(){Dj();return null}));Y=Y.nextEffect}}\nfunction Dj(){if(90!==sj){var a=97<sj?97:sj;sj=90;return cg(a,Vj)}}function Vj(){if(null===rj)return!1;var a=rj;rj=null;if((W&(fj|gj))!==V)throw Error(u(331));var b=W;W|=gj;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:case 22:Hi(5,c),Ii(5,c)}}catch(d){if(null===a)throw Error(u(330));Ei(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}W=b;gg();return!0}\nfunction Wj(a,b,c){b=Ai(c,b);b=Xi(a,b,1073741823);xg(a,b);a=xj(a,1073741823);null!==a&&Z(a)}function Ei(a,b){if(3===a.tag)Wj(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){Wj(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if(\"function\"===typeof c.type.getDerivedStateFromError||\"function\"===typeof d.componentDidCatch&&(null===aj||!aj.has(d))){a=Ai(b,a);a=$i(c,a,1073741823);xg(c,a);c=xj(c,1073741823);null!==c&&Z(c);break}}c=c.return}}\nfunction Oj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);T===a&&U===c?S===vi||S===ui&&1073741823===lj&&$f()-Ti<pj?Ej(a,U):oj=!0:Aj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,Z(a)))}function Vi(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=Gg(),b=Hg(b,a,null));a=xj(a,b);null!==a&&Z(a)}var Rj;\nRj=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)rg=!0;else{if(d<c){rg=!1;switch(b.tag){case 3:hi(b);Xh();break;case 5:fh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:L(b.type)&&Gf(b);break;case 4:dh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;e=b.type._context;I(jg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;\nif(0!==d&&d>=c)return ji(a,b,c);I(M,M.current&1);b=$h(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return mi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current);if(!d)return null}return $h(a,b,c)}rg=!1}}else rg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Cf(b,J.current);qg(b,c);e=oh(null,\nb,d,a,e,c);b.effectTag|=1;if(\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(L(d)){var f=!0;Gf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;ug(b);var g=d.getDerivedStateFromProps;\"function\"===typeof g&&Fg(b,d,g,a);e.updater=Jg;b.stateNode=e;e._reactInternalFiber=b;Ng(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:a:{e=b.elementType;null!==a&&(a.alternate=\nnull,b.alternate=null,b.effectTag|=2);a=b.pendingProps;ob(e);if(1!==e._status)throw e._result;e=e._result;b.type=e;f=b.tag=Xj(e);a=ig(e,a);switch(f){case 0:b=di(null,b,e,a,c);break a;case 1:b=fi(null,b,e,a,c);break a;case 11:b=Zh(null,b,e,a,c);break a;case 14:b=ai(null,b,e,ig(e.type,a),d,c);break a}throw Error(u(306,e,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),fi(a,b,d,e,c);\ncase 3:hi(b);d=b.updateQueue;if(null===a||null===d)throw Error(u(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;vg(a,b);zg(b,d,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=Jd(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Yg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return fh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:\nnull,g=e.children,Gd(d,e)?g=null:null!==f&&Gd(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return dh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Xg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,\nb,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(jg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=$e(h,f)?0:(\"function\"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==\nk){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=wg(c,null),l.tag=2,xg(h,l));h.expirationTime<c&&(h.expirationTime=c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);pg(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=\ng}R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,qg(b,c),e=sg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,R(a,b,d,c),b.child;case 14:return e=b.type,f=ig(e,b.pendingProps),f=ig(e.type,f),ai(a,b,e,f,d,c);case 15:return ci(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ig(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,L(d)?(a=!0,Gf(b)):a=!1,qg(b,c),Lg(b,d,e),Ng(b,d,e,c),gi(null,\nb,d,!0,a,c);case 19:return mi(a,b,c)}throw Error(u(156,b.tag));};var Uj=null,Li=null;function Yj(a){if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Uj=function(a){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(e){}};Li=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}\nfunction Zj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Sh(a,b,c,d){return new Zj(a,b,c,d)}\nfunction bi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Xj(a){if(\"function\"===typeof a)return bi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===gb)return 11;if(a===jb)return 14}return 2}\nfunction Sg(a,b){var c=a.alternate;null===c?(c=Sh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,\nfirstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Ug(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bi(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ab:return Wg(c.children,e,f,b);case fb:g=8;e|=7;break;case bb:g=8;e|=1;break;case cb:return a=Sh(12,c,b,e|8),a.elementType=cb,a.type=cb,a.expirationTime=f,a;case hb:return a=Sh(13,c,b,e),a.type=hb,a.elementType=hb,a.expirationTime=f,a;case ib:return a=Sh(19,c,b,e),a.elementType=ib,a.expirationTime=f,a;default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case db:g=\n10;break a;case eb:g=9;break a;case gb:g=11;break a;case jb:g=14;break a;case kb:g=16;d=null;break a;case lb:g=22;break a}throw Error(u(130,null==a?a:typeof a,\"\"));}b=Sh(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Wg(a,b,c,d){a=Sh(7,a,d,b);a.expirationTime=c;return a}function Tg(a,b,c){a=Sh(6,a,null,b);a.expirationTime=c;return a}\nfunction Vg(a,b,c){b=Sh(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction ak(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}\nfunction Aj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function xi(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}\nfunction yi(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Cj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}\nfunction bk(a,b,c,d){var e=b.current,f=Gg(),g=Dg.suspense;f=Hg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(dc(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=Ff(c,k,h);break a}}c=h}else c=Af;null===b.context?b.context=c:b.pendingContext=c;b=wg(f,g);b.payload={element:a};d=void 0===\nd?null:d;null!==d&&(b.callback=d);xg(e,b);Ig(e,f);return f}function ck(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function dk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function ek(a,b){dk(a,b);(a=a.alternate)&&dk(a,b)}\nfunction fk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new ak(a,b,c),e=Sh(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;ug(e);a[Od]=d.current;c&&0!==b&&Jc(a,9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}fk.prototype.render=function(a){bk(a,this._internalRoot,null,null)};fk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;bk(null,a,null,function(){b[Od]=null})};\nfunction gk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||\" react-mount-point-unstable \"!==a.nodeValue))}function hk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute(\"data-reactroot\")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new fk(a,0,b?{hydrate:!0}:void 0)}\nfunction ik(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if(\"function\"===typeof e){var h=e;e=function(){var a=ck(g);h.call(a)}}bk(b,g,a,e)}else{f=c._reactRootContainer=hk(c,d);g=f._internalRoot;if(\"function\"===typeof e){var k=e;e=function(){var a=ck(g);k.call(a)}}Nj(function(){bk(b,g,a,e)})}return ck(g)}function jk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:$a,key:null==d?null:\"\"+d,children:a,containerInfo:b,implementation:c}}\nwc=function(a){if(13===a.tag){var b=hg(Gg(),150,100);Ig(a,b);ek(a,b)}};xc=function(a){13===a.tag&&(Ig(a,3),ek(a,3))};yc=function(a){if(13===a.tag){var b=Gg();b=Hg(b,a,null);Ig(a,b);ek(a,b)}};\nza=function(a,b,c){switch(b){case \"input\":Cb(a,c);b=c.name;if(\"radio\"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+b)+'][type=\"radio\"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Qd(d);if(!e)throw Error(u(90));yb(d);Cb(d,e)}}}break;case \"textarea\":Kb(a,c);break;case \"select\":b=c.value,null!=b&&Hb(a,!!c.multiple,b,!1)}};Fa=Mj;\nGa=function(a,b,c,d,e){var f=W;W|=4;try{return cg(98,a.bind(null,b,c,d,e))}finally{W=f,W===V&&gg()}};Ha=function(){(W&(1|fj|gj))===V&&(Lj(),Dj())};Ia=function(a,b){var c=W;W|=2;try{return a(b)}finally{W=c,W===V&&gg()}};function kk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gk(b))throw Error(u(200));return jk(a,b,null,c)}var lk={Events:[Nc,Pd,Qd,xa,ta,Xd,function(a){jc(a,Wd)},Da,Ea,id,mc,Dj,{current:!1}]};\n(function(a){var b=a.findFiberByHostInstance;return Yj(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=hc(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:\"16.14.0\",\nrendererPackageName:\"react-dom\"});exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;exports.createPortal=kk;exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if(\"function\"===typeof a.render)throw Error(u(188));throw Error(u(268,Object.keys(a)));}a=hc(b);a=null===a?null:a.stateNode;return a};\nexports.flushSync=function(a,b){if((W&(fj|gj))!==V)throw Error(u(187));var c=W;W|=1;try{return cg(99,a.bind(null,b))}finally{W=c,gg()}};exports.hydrate=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!0,c)};exports.render=function(a,b,c){if(!gk(b))throw Error(u(200));return ik(null,a,b,!1,c)};\nexports.unmountComponentAtNode=function(a){if(!gk(a))throw Error(u(40));return a._reactRootContainer?(Nj(function(){ik(null,null,a,!1,function(){a._reactRootContainer=null;a[Od]=null})}),!0):!1};exports.unstable_batchedUpdates=Mj;exports.unstable_createPortal=function(a,b){return kk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};\nexports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!gk(c))throw Error(u(200));if(null==a||void 0===a._reactInternalFiber)throw Error(u(38));return ik(a,b,c,!1,d)};exports.version=\"16.14.0\";\n","/** @license React v16.14.0\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var l=require(\"object-assign\"),n=\"function\"===typeof Symbol&&Symbol.for,p=n?Symbol.for(\"react.element\"):60103,q=n?Symbol.for(\"react.portal\"):60106,r=n?Symbol.for(\"react.fragment\"):60107,t=n?Symbol.for(\"react.strict_mode\"):60108,u=n?Symbol.for(\"react.profiler\"):60114,v=n?Symbol.for(\"react.provider\"):60109,w=n?Symbol.for(\"react.context\"):60110,x=n?Symbol.for(\"react.forward_ref\"):60112,y=n?Symbol.for(\"react.suspense\"):60113,z=n?Symbol.for(\"react.memo\"):60115,A=n?Symbol.for(\"react.lazy\"):\n60116,B=\"function\"===typeof Symbol&&Symbol.iterator;function C(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;c<arguments.length;c++)b+=\"&args[]=\"+encodeURIComponent(arguments[c]);return\"Minified React error #\"+a+\"; visit \"+b+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}\nvar D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E={};function F(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}F.prototype.isReactComponent={};F.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(C(85));this.updater.enqueueSetState(this,a,b,\"setState\")};F.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};\nfunction G(){}G.prototype=F.prototype;function H(a,b,c){this.props=a;this.context=b;this.refs=E;this.updater=c||D}var I=H.prototype=new G;I.constructor=H;l(I,F.prototype);I.isPureReactComponent=!0;var J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=\"\"+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:k,props:d,_owner:J.current}}\nfunction N(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+(\"\"+a).replace(/[=:]/g,function(a){return b[a]})}var P=/\\/+/g,Q=[];function R(a,b,c,e){if(Q.length){var d=Q.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}}\nfunction S(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q.length&&Q.push(a)}\nfunction T(a,b,c,e){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,\"\"===b?\".\"+U(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U(d,k);g+=T(d,f,c,e)}else if(null===a||\"object\"!==typeof a?f=null:(f=B&&a[B]||a[\"@@iterator\"],f=\"function\"===typeof f?f:null),\"function\"===typeof f)for(a=f.call(a),k=\n0;!(d=a.next()).done;)d=d.value,f=b+U(d,k++),g+=T(d,f,c,e);else if(\"object\"===d)throw c=\"\"+a,Error(C(31,\"[object Object]\"===c?\"object with keys {\"+Object.keys(a).join(\", \")+\"}\":c,\"\"));return g}function V(a,b,c){return null==a?0:T(a,\"\",b,c)}function U(a,b){return\"object\"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W(a,b){a.func.call(a.context,b,a.count++)}\nfunction aa(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X(a,e,c,function(a){return a}):null!=a&&(O(a)&&(a=N(a,d+(!a.key||b&&b.key===a.key?\"\":(\"\"+a.key).replace(P,\"$&/\")+\"/\")+c)),e.push(a))}function X(a,b,c,e,d){var g=\"\";null!=c&&(g=(\"\"+c).replace(P,\"$&/\")+\"/\");b=R(b,g,e,d);V(a,aa,b);S(b)}var Y={current:null};function Z(){var a=Y.current;if(null===a)throw Error(C(321));return a}\nvar ba={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:l};exports.Children={map:function(a,b,c){if(null==a)return a;var e=[];X(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R(null,null,b,c);V(a,W,b);S(b)},count:function(a){return V(a,function(){return null},null)},toArray:function(a){var b=[];X(a,b,null,function(a){return a});return b},only:function(a){if(!O(a))throw Error(C(143));return a}};\nexports.Component=F;exports.Fragment=r;exports.Profiler=u;exports.PureComponent=H;exports.StrictMode=t;exports.Suspense=y;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba;\nexports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C(267,a));var e=l({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J.current);void 0!==b.key&&(d=\"\"+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K.call(b,h)&&!L.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type,\nkey:d,ref:g,props:e,_owner:k}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a};exports.createElement=M;exports.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:x,render:a}};exports.isValidElement=O;\nexports.lazy=function(a){return{$$typeof:A,_ctor:a,_status:-1,_result:null}};exports.memo=function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return Z().useCallback(a,b)};exports.useContext=function(a,b){return Z().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return Z().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return Z().useImperativeHandle(a,b,c)};\nexports.useLayoutEffect=function(a,b){return Z().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return Z().useMemo(a,b)};exports.useReducer=function(a,b,c){return Z().useReducer(a,b,c)};exports.useRef=function(a){return Z().useRef(a)};exports.useState=function(a){return Z().useState(a)};exports.version=\"16.14.0\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/** @license React v0.19.1\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var f,g,h,k,l;\nif(\"undefined\"===typeof window||\"function\"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,\ny=window.setTimeout,z=window.clearTimeout;if(\"undefined\"!==typeof console){var A=window.cancelAnimationFrame;\"function\"!==typeof window.requestAnimationFrame&&console.error(\"This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\");\"function\"!==typeof A&&console.error(\"This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills\")}if(\"object\"===\ntypeof w&&\"function\"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported\"):F=0<a?Math.floor(1E3/a):5};var H=new MessageChannel,I=H.port2;H.port1.onmessage=\nfunction(){if(null!==D){var a=exports.unstable_now();G=a+F;try{D(!0,a)?I.postMessage(null):(C=!1,D=null)}catch(b){throw I.postMessage(null),b;}}else C=!1};f=function(a){D=a;C||(C=!0,I.postMessage(null))};g=function(a,b){E=y(function(){a(exports.unstable_now())},b)};h=function(){z(E);E=-1}}function J(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<K(e,b))a[d]=b,a[c]=e,c=d;else break a}}function L(a){a=a[0];return void 0===a?null:a}\nfunction M(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;\nfunction V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}\nfunction X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}\nfunction Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};\nexports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=Z;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};\nexports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if(\"object\"===typeof c&&null!==c){var e=c.delay;e=\"number\"===typeof e&&0<e?d+e:d;c=\"number\"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),e=d;c=e+c;a={id:P++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};\nexports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<Q.expirationTime||k()};exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","var Symbol = require('./_Symbol'),\n Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]';\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","// this file was prevaled\nmodule.exports = function fastRGLPropsEqual(a, b, isEqualImpl) {\n if (a === b) return true;\n return a.className === b.className && isEqualImpl(a.style, b.style) && a.width === b.width && a.autoSize === b.autoSize && a.cols === b.cols && a.draggableCancel === b.draggableCancel && a.draggableHandle === b.draggableHandle && isEqualImpl(a.verticalCompact, b.verticalCompact) && isEqualImpl(a.compactType, b.compactType) && isEqualImpl(a.layout, b.layout) && isEqualImpl(a.margin, b.margin) && isEqualImpl(a.containerPadding, b.containerPadding) && a.rowHeight === b.rowHeight && a.maxRows === b.maxRows && a.isBounded === b.isBounded && a.isDraggable === b.isDraggable && a.isResizable === b.isResizable && a.preventCollision === b.preventCollision && a.useCSSTransforms === b.useCSSTransforms && a.transformScale === b.transformScale && a.isDroppable === b.isDroppable && isEqualImpl(a.resizeHandles, b.resizeHandles) && a.onLayoutChange === b.onLayoutChange && a.onDragStart === b.onDragStart && a.onDrag === b.onDrag && a.onDragStop === b.onDragStop && a.onResizeStart === b.onResizeStart && a.onResize === b.onResize && a.onResizeStop === b.onResizeStop && a.onDrop === b.onDrop && isEqualImpl(a.droppingItem, b.droppingItem) && isEqualImpl(a.innerRef, b.innerRef);\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDraggable = require(\"react-draggable\");\n\nvar _reactResizable = require(\"react-resizable\");\n\nvar _utils = require(\"./utils\");\n\nvar _calculateUtils = require(\"./calculateUtils\");\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * An individual item within a ReactGridLayout.\n */\nvar GridItem = /*#__PURE__*/function (_React$Component) {\n _inherits(GridItem, _React$Component);\n\n var _super = _createSuper(GridItem);\n\n function GridItem() {\n var _this;\n\n _classCallCheck(this, GridItem);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n resizing: null,\n dragging: null,\n className: \"\"\n });\n\n _defineProperty(_assertThisInitialized(_this), \"currentNode\", void 0);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStart\", function (e\n /*: Event*/\n , _ref) {\n var node = _ref.node;\n var onDragStart = _this.props.onDragStart;\n if (!onDragStart) return;\n var newPosition\n /*: PartialPosition*/\n = {\n top: 0,\n left: 0\n }; // TODO: this wont work on nested parents\n\n var offsetParent = node.offsetParent;\n if (!offsetParent) return;\n var parentRect = offsetParent.getBoundingClientRect();\n var clientRect = node.getBoundingClientRect();\n var cLeft = clientRect.left / _this.props.transformScale;\n var pLeft = parentRect.left / _this.props.transformScale;\n var cTop = clientRect.top / _this.props.transformScale;\n var pTop = parentRect.top / _this.props.transformScale;\n newPosition.left = cLeft - pLeft + offsetParent.scrollLeft;\n newPosition.top = cTop - pTop + offsetParent.scrollTop;\n\n _this.setState({\n dragging: newPosition\n }); // Call callback with this data\n\n\n var _calcXY = (0, _calculateUtils.calcXY)(_this.getPositionParams(), newPosition.top, newPosition.left, _this.props.w, _this.props.h),\n x = _calcXY.x,\n y = _calcXY.y;\n\n return onDragStart.call(_assertThisInitialized(_this), _this.props.i, x, y, {\n e: e,\n node: node,\n newPosition: newPosition\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDrag\", function (e\n /*: Event*/\n , _ref2) {\n var node = _ref2.node,\n deltaX = _ref2.deltaX,\n deltaY = _ref2.deltaY;\n var _this$props = _this.props,\n onDrag = _this$props.onDrag,\n transformScale = _this$props.transformScale;\n if (!onDrag) return;\n deltaX /= transformScale;\n deltaY /= transformScale;\n\n if (!_this.state.dragging) {\n throw new Error(\"onDrag called before onDragStart.\");\n }\n\n var top = _this.state.dragging.top + deltaY;\n var left = _this.state.dragging.left + deltaX;\n var _this$props2 = _this.props,\n isBounded = _this$props2.isBounded,\n i = _this$props2.i,\n w = _this$props2.w,\n h = _this$props2.h,\n containerWidth = _this$props2.containerWidth;\n\n var positionParams = _this.getPositionParams(); // Boundary calculations; keeps items within the grid\n\n\n if (isBounded) {\n var offsetParent = node.offsetParent;\n\n if (offsetParent) {\n var _this$props3 = _this.props,\n margin = _this$props3.margin,\n rowHeight = _this$props3.rowHeight;\n var bottomBoundary = offsetParent.clientHeight - (0, _calculateUtils.calcGridItemWHPx)(h, rowHeight, margin[1]);\n top = (0, _calculateUtils.clamp)(top, 0, bottomBoundary);\n var colWidth = (0, _calculateUtils.calcGridColWidth)(positionParams);\n var rightBoundary = containerWidth - (0, _calculateUtils.calcGridItemWHPx)(w, colWidth, margin[0]);\n left = (0, _calculateUtils.clamp)(left, 0, rightBoundary);\n }\n }\n\n var newPosition\n /*: PartialPosition*/\n = {\n top: top,\n left: left\n };\n\n _this.setState({\n dragging: newPosition\n }); // Call callback with this data\n\n\n var _calcXY2 = (0, _calculateUtils.calcXY)(positionParams, top, left, w, h),\n x = _calcXY2.x,\n y = _calcXY2.y;\n\n return onDrag.call(_assertThisInitialized(_this), i, x, y, {\n e: e,\n node: node,\n newPosition: newPosition\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStop\", function (e\n /*: Event*/\n , _ref3) {\n var node = _ref3.node;\n var onDragStop = _this.props.onDragStop;\n if (!onDragStop) return;\n\n if (!_this.state.dragging) {\n throw new Error(\"onDragEnd called before onDragStart.\");\n }\n\n var _this$props4 = _this.props,\n w = _this$props4.w,\n h = _this$props4.h,\n i = _this$props4.i;\n var _this$state$dragging = _this.state.dragging,\n left = _this$state$dragging.left,\n top = _this$state$dragging.top;\n var newPosition\n /*: PartialPosition*/\n = {\n top: top,\n left: left\n };\n\n _this.setState({\n dragging: null\n });\n\n var _calcXY3 = (0, _calculateUtils.calcXY)(_this.getPositionParams(), top, left, w, h),\n x = _calcXY3.x,\n y = _calcXY3.y;\n\n return onDragStop.call(_assertThisInitialized(_this), i, x, y, {\n e: e,\n node: node,\n newPosition: newPosition\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResizeStop\", function (e\n /*: Event*/\n , callbackData\n /*: { node: HTMLElement, size: Position }*/\n ) {\n _this.onResizeHandler(e, callbackData, \"onResizeStop\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResizeStart\", function (e\n /*: Event*/\n , callbackData\n /*: { node: HTMLElement, size: Position }*/\n ) {\n _this.onResizeHandler(e, callbackData, \"onResizeStart\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResize\", function (e\n /*: Event*/\n , callbackData\n /*: { node: HTMLElement, size: Position }*/\n ) {\n _this.onResizeHandler(e, callbackData, \"onResize\");\n });\n\n return _this;\n }\n\n _createClass(GridItem, [{\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps\n /*: Props*/\n , nextState\n /*: State*/\n ) {\n // We can't deeply compare children. If the developer memoizes them, we can\n // use this optimization.\n if (this.props.children !== nextProps.children) return true;\n if (this.props.droppingPosition !== nextProps.droppingPosition) return true; // TODO memoize these calculations so they don't take so long?\n\n var oldPosition = (0, _calculateUtils.calcGridItemPosition)(this.getPositionParams(this.props), this.props.x, this.props.y, this.props.w, this.props.h, this.state);\n var newPosition = (0, _calculateUtils.calcGridItemPosition)(this.getPositionParams(nextProps), nextProps.x, nextProps.y, nextProps.w, nextProps.h, nextState);\n return !(0, _utils.fastPositionEqual)(oldPosition, newPosition) || this.props.useCSSTransforms !== nextProps.useCSSTransforms;\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.moveDroppingItem({});\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps\n /*: Props*/\n ) {\n this.moveDroppingItem(prevProps);\n } // When a droppingPosition is present, this means we should fire a move event, as if we had moved\n // this element by `x, y` pixels.\n\n }, {\n key: \"moveDroppingItem\",\n value: function moveDroppingItem(prevProps\n /*: Props*/\n ) {\n var droppingPosition = this.props.droppingPosition;\n if (!droppingPosition) return;\n var prevDroppingPosition = prevProps.droppingPosition || {\n left: 0,\n top: 0\n };\n var dragging = this.state.dragging;\n\n if (!this.currentNode) {\n // eslint-disable-next-line react/no-find-dom-node\n this.currentNode = ((_reactDom.default.findDOMNode(this)\n /*: any*/\n )\n /*: HTMLElement*/\n );\n }\n\n var shouldDrag = dragging && droppingPosition.left !== prevDroppingPosition.left || droppingPosition.top !== prevDroppingPosition.top;\n\n if (!dragging) {\n this.onDragStart(droppingPosition.e, {\n node: this.currentNode,\n deltaX: droppingPosition.left,\n deltaY: droppingPosition.top\n });\n } else if (shouldDrag) {\n var deltaX = droppingPosition.left - dragging.left;\n var deltaY = droppingPosition.top - dragging.top;\n this.onDrag(droppingPosition.e, {\n node: this.currentNode,\n deltaX: deltaX,\n deltaY: deltaY\n });\n }\n }\n }, {\n key: \"getPositionParams\",\n value: function getPositionParams()\n /*: PositionParams*/\n {\n var props\n /*: Props*/\n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n return {\n cols: props.cols,\n containerPadding: props.containerPadding,\n containerWidth: props.containerWidth,\n margin: props.margin,\n maxRows: props.maxRows,\n rowHeight: props.rowHeight\n };\n }\n /**\n * This is where we set the grid item's absolute placement. It gets a little tricky because we want to do it\n * well when server rendering, and the only way to do that properly is to use percentage width/left because\n * we don't know exactly what the browser viewport is.\n * Unfortunately, CSS Transforms, which are great for performance, break in this instance because a percentage\n * left is relative to the item itself, not its container! So we cannot use them on the server rendering pass.\n *\n * @param {Object} pos Position object with width, height, left, top.\n * @return {Object} Style object.\n */\n\n }, {\n key: \"createStyle\",\n value: function createStyle(pos\n /*: Position*/\n )\n /*: { [key: string]: ?string }*/\n {\n var _this$props5 = this.props,\n usePercentages = _this$props5.usePercentages,\n containerWidth = _this$props5.containerWidth,\n useCSSTransforms = _this$props5.useCSSTransforms;\n var style; // CSS Transforms support (default)\n\n if (useCSSTransforms) {\n style = (0, _utils.setTransform)(pos);\n } else {\n // top,left (slow)\n style = (0, _utils.setTopLeft)(pos); // This is used for server rendering.\n\n if (usePercentages) {\n style.left = (0, _utils.perc)(pos.left / containerWidth);\n style.width = (0, _utils.perc)(pos.width / containerWidth);\n }\n }\n\n return style;\n }\n /**\n * Mix a Draggable instance into a child.\n * @param {Element} child Child element.\n * @return {Element} Child wrapped in Draggable.\n */\n\n }, {\n key: \"mixinDraggable\",\n value: function mixinDraggable(child\n /*: ReactElement<any>*/\n , isDraggable\n /*: boolean*/\n )\n /*: ReactElement<any>*/\n {\n return /*#__PURE__*/_react.default.createElement(_reactDraggable.DraggableCore, {\n disabled: !isDraggable,\n onStart: this.onDragStart,\n onDrag: this.onDrag,\n onStop: this.onDragStop,\n handle: this.props.handle,\n cancel: \".react-resizable-handle\" + (this.props.cancel ? \",\" + this.props.cancel : \"\"),\n scale: this.props.transformScale\n }, child);\n }\n /**\n * Mix a Resizable instance into a child.\n * @param {Element} child Child element.\n * @param {Object} position Position object (pixel values)\n * @return {Element} Child wrapped in Resizable.\n */\n\n }, {\n key: \"mixinResizable\",\n value: function mixinResizable(child\n /*: ReactElement<any>*/\n , position\n /*: Position*/\n , isResizable\n /*: boolean*/\n )\n /*: ReactElement<any>*/\n {\n var _this$props6 = this.props,\n cols = _this$props6.cols,\n x = _this$props6.x,\n minW = _this$props6.minW,\n minH = _this$props6.minH,\n maxW = _this$props6.maxW,\n maxH = _this$props6.maxH,\n transformScale = _this$props6.transformScale,\n resizeHandles = _this$props6.resizeHandles;\n var positionParams = this.getPositionParams(); // This is the max possible width - doesn't go to infinity because of the width of the window\n\n var maxWidth = (0, _calculateUtils.calcGridItemPosition)(positionParams, 0, 0, cols - x, 0).width; // Calculate min/max constraints using our min & maxes\n\n var mins = (0, _calculateUtils.calcGridItemPosition)(positionParams, 0, 0, minW, minH);\n var maxes = (0, _calculateUtils.calcGridItemPosition)(positionParams, 0, 0, maxW, maxH);\n var minConstraints = [mins.width, mins.height];\n var maxConstraints = [Math.min(maxes.width, maxWidth), Math.min(maxes.height, Infinity)];\n return /*#__PURE__*/_react.default.createElement(_reactResizable.Resizable, {\n draggableOpts: {\n disabled: !isResizable\n },\n className: isResizable ? undefined : \"react-resizable-hide\",\n width: position.width,\n height: position.height,\n minConstraints: minConstraints,\n maxConstraints: maxConstraints,\n onResizeStop: this.onResizeStop,\n onResizeStart: this.onResizeStart,\n onResize: this.onResize,\n transformScale: transformScale,\n resizeHandles: resizeHandles\n }, child);\n }\n /**\n * onDragStart event handler\n * @param {Event} e event data\n * @param {Object} callbackData an object with node, delta and position information\n */\n\n }, {\n key: \"onResizeHandler\",\n\n /**\n * Wrapper around drag events to provide more useful data.\n * All drag events call the function with the given handler name,\n * with the signature (index, x, y).\n *\n * @param {String} handlerName Handler name to wrap.\n * @return {Function} Handler function.\n */\n value: function onResizeHandler(e\n /*: Event*/\n , _ref4, handlerName\n /*: string*/\n ) {\n var node = _ref4.node,\n size = _ref4.size;\n var handler = this.props[handlerName];\n if (!handler) return;\n var _this$props7 = this.props,\n cols = _this$props7.cols,\n x = _this$props7.x,\n y = _this$props7.y,\n i = _this$props7.i,\n maxH = _this$props7.maxH,\n minH = _this$props7.minH;\n var _this$props8 = this.props,\n minW = _this$props8.minW,\n maxW = _this$props8.maxW; // Get new XY\n\n var _calcWH = (0, _calculateUtils.calcWH)(this.getPositionParams(), size.width, size.height, x, y),\n w = _calcWH.w,\n h = _calcWH.h; // minW should be at least 1 (TODO propTypes validation?)\n\n\n minW = Math.max(minW, 1); // maxW should be at most (cols - x)\n\n maxW = Math.min(maxW, cols - x); // Min/max capping\n\n w = (0, _calculateUtils.clamp)(w, minW, maxW);\n h = (0, _calculateUtils.clamp)(h, minH, maxH);\n this.setState({\n resizing: handlerName === \"onResizeStop\" ? null : size\n });\n handler.call(this, i, w, h, {\n e: e,\n node: node,\n size: size\n });\n }\n }, {\n key: \"render\",\n value: function render()\n /*: ReactNode*/\n {\n var _this$props9 = this.props,\n x = _this$props9.x,\n y = _this$props9.y,\n w = _this$props9.w,\n h = _this$props9.h,\n isDraggable = _this$props9.isDraggable,\n isResizable = _this$props9.isResizable,\n droppingPosition = _this$props9.droppingPosition,\n useCSSTransforms = _this$props9.useCSSTransforms;\n var pos = (0, _calculateUtils.calcGridItemPosition)(this.getPositionParams(), x, y, w, h, this.state);\n\n var child = _react.default.Children.only(this.props.children); // Create the child element. We clone the existing element but modify its className and style.\n\n\n var newChild = /*#__PURE__*/_react.default.cloneElement(child, {\n className: (0, _classnames.default)(\"react-grid-item\", child.props.className, this.props.className, {\n static: this.props.static,\n resizing: Boolean(this.state.resizing),\n \"react-draggable\": isDraggable,\n \"react-draggable-dragging\": Boolean(this.state.dragging),\n dropping: Boolean(droppingPosition),\n cssTransforms: useCSSTransforms\n }),\n // We can set the width and height on the child, but unfortunately we can't set the position.\n style: _objectSpread(_objectSpread(_objectSpread({}, this.props.style), child.props.style), this.createStyle(pos))\n }); // Resizable support. This is usually on but the user can toggle it off.\n\n\n newChild = this.mixinResizable(newChild, pos, isResizable); // Draggable support. This is always on, except for with placeholders.\n\n newChild = this.mixinDraggable(newChild, isDraggable);\n return newChild;\n }\n }]);\n\n return GridItem;\n}(_react.default.Component);\n\nexports.default = GridItem;\n\n_defineProperty(GridItem, \"propTypes\", {\n // Children must be only a single element\n children: _propTypes.default.element,\n // General grid attributes\n cols: _propTypes.default.number.isRequired,\n containerWidth: _propTypes.default.number.isRequired,\n rowHeight: _propTypes.default.number.isRequired,\n margin: _propTypes.default.array.isRequired,\n maxRows: _propTypes.default.number.isRequired,\n containerPadding: _propTypes.default.array.isRequired,\n // These are all in grid units\n x: _propTypes.default.number.isRequired,\n y: _propTypes.default.number.isRequired,\n w: _propTypes.default.number.isRequired,\n h: _propTypes.default.number.isRequired,\n // All optional\n minW: function minW(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minWidth not Number\");\n if (value > props.w || value > props.maxW) return new Error(\"minWidth larger than item width/maxWidth\");\n },\n maxW: function maxW(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxWidth not Number\");\n if (value < props.w || value < props.minW) return new Error(\"maxWidth smaller than item width/minWidth\");\n },\n minH: function minH(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"minHeight not Number\");\n if (value > props.h || value > props.maxH) return new Error(\"minHeight larger than item height/maxHeight\");\n },\n maxH: function maxH(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var value = props[propName];\n if (typeof value !== \"number\") return new Error(\"maxHeight not Number\");\n if (value < props.h || value < props.minH) return new Error(\"maxHeight smaller than item height/minHeight\");\n },\n // ID is nice to have for callbacks\n i: _propTypes.default.string.isRequired,\n // Functions\n onDragStop: _propTypes.default.func,\n onDragStart: _propTypes.default.func,\n onDrag: _propTypes.default.func,\n onResizeStop: _propTypes.default.func,\n onResizeStart: _propTypes.default.func,\n onResize: _propTypes.default.func,\n // Flags\n isDraggable: _propTypes.default.bool.isRequired,\n isResizable: _propTypes.default.bool.isRequired,\n isBounded: _propTypes.default.bool.isRequired,\n static: _propTypes.default.bool,\n // Use CSS transforms instead of top/left\n useCSSTransforms: _propTypes.default.bool.isRequired,\n transformScale: _propTypes.default.number,\n // Others\n className: _propTypes.default.string,\n // Selector for draggable handle\n handle: _propTypes.default.string,\n // Selector for draggable cancel (see react-draggable)\n cancel: _propTypes.default.string,\n // Current position of a dropping element\n droppingPosition: _propTypes.default.shape({\n e: _propTypes.default.object.isRequired,\n left: _propTypes.default.number.isRequired,\n top: _propTypes.default.number.isRequired\n })\n});\n\n_defineProperty(GridItem, \"defaultProps\", {\n className: \"\",\n cancel: \"\",\n handle: \"\",\n minH: 1,\n minW: 1,\n maxH: Infinity,\n maxW: Infinity,\n transformScale: 1\n});","\"use strict\";\n\nvar _require = require('./Draggable'),\n Draggable = _require.default,\n DraggableCore = _require.DraggableCore; // Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\n\n\nmodule.exports = Draggable;\nmodule.exports.default = Draggable;\nmodule.exports.DraggableCore = DraggableCore;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"DraggableCore\", {\n enumerable: true,\n get: function get() {\n return _DraggableCore.default;\n }\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _domFns = require(\"./utils/domFns\");\n\nvar _positionFns = require(\"./utils/positionFns\");\n\nvar _shims = require(\"./utils/shims\");\n\nvar _DraggableCore = _interopRequireDefault(require(\"./DraggableCore\"));\n\nvar _log = _interopRequireDefault(require(\"./utils/log\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n// Define <Draggable>\n//\nvar Draggable = /*#__PURE__*/function (_React$Component) {\n _inherits(Draggable, _React$Component);\n\n var _super = _createSuper(Draggable);\n\n _createClass(Draggable, null, [{\n key: \"getDerivedStateFromProps\",\n // React 16.3+\n // Arity (props, state)\n value: function getDerivedStateFromProps(_ref, _ref2) {\n var position = _ref.position;\n var prevPropsPosition = _ref2.prevPropsPosition;\n\n // Set x/y if a new position is provided in props that is different than the previous.\n if (position && (!prevPropsPosition || position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y)) {\n (0, _log.default)('Draggable: getDerivedStateFromProps %j', {\n position: position,\n prevPropsPosition: prevPropsPosition\n });\n return {\n x: position.x,\n y: position.y,\n prevPropsPosition: _objectSpread({}, position)\n };\n }\n\n return null;\n }\n }]);\n\n function Draggable(props\n /*: DraggableProps*/\n ) {\n var _this;\n\n _classCallCheck(this, Draggable);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStart\", function (e, coreData) {\n (0, _log.default)('Draggable: onDragStart: %j', coreData); // Short-circuit if user's callback killed it.\n\n var shouldStart = _this.props.onStart(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData)); // Kills start event on core as well, so move handlers are never bound.\n\n\n if (shouldStart === false) return false;\n\n _this.setState({\n dragging: true,\n dragged: true\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDrag\", function (e, coreData) {\n if (!_this.state.dragging) return false;\n (0, _log.default)('Draggable: onDrag: %j', coreData);\n var uiData = (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData);\n var newState\n /*: $Shape<DraggableState>*/\n = {\n x: uiData.x,\n y: uiData.y\n }; // Keep within bounds.\n\n if (_this.props.bounds) {\n // Save original x and y.\n var x = newState.x,\n y = newState.y; // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n\n newState.x += _this.state.slackX;\n newState.y += _this.state.slackY; // Get bound position. This will ceil/floor the x and y within the boundaries.\n\n var _getBoundPosition = (0, _positionFns.getBoundPosition)(_assertThisInitialized(_this), newState.x, newState.y),\n _getBoundPosition2 = _slicedToArray(_getBoundPosition, 2),\n newStateX = _getBoundPosition2[0],\n newStateY = _getBoundPosition2[1];\n\n newState.x = newStateX;\n newState.y = newStateY; // Recalculate slack by noting how much was shaved by the boundPosition handler.\n\n newState.slackX = _this.state.slackX + (x - newState.x);\n newState.slackY = _this.state.slackY + (y - newState.y); // Update the event we fire to reflect what really happened after bounds took effect.\n\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - _this.state.x;\n uiData.deltaY = newState.y - _this.state.y;\n } // Short-circuit if user's callback killed it.\n\n\n var shouldUpdate = _this.props.onDrag(e, uiData);\n\n if (shouldUpdate === false) return false;\n\n _this.setState(newState);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDragStop\", function (e, coreData) {\n if (!_this.state.dragging) return false; // Short-circuit if user's callback killed it.\n\n var shouldContinue = _this.props.onStop(e, (0, _positionFns.createDraggableData)(_assertThisInitialized(_this), coreData));\n\n if (shouldContinue === false) return false;\n (0, _log.default)('Draggable: onDragStop: %j', coreData);\n var newState\n /*: $Shape<DraggableState>*/\n = {\n dragging: false,\n slackX: 0,\n slackY: 0\n }; // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n\n var controlled = Boolean(_this.props.position);\n\n if (controlled) {\n var _this$props$position = _this.props.position,\n x = _this$props$position.x,\n y = _this$props$position.y;\n newState.x = x;\n newState.y = y;\n }\n\n _this.setState(newState);\n });\n\n _this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n // Whether or not we have been dragged before.\n dragged: false,\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n prevPropsPosition: _objectSpread({}, props.position),\n // Used for compensating for out-of-bounds drags\n slackX: 0,\n slackY: 0,\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n if (props.position && !(props.onDrag || props.onStop)) {\n // eslint-disable-next-line no-console\n console.warn('A `position` was applied to this <Draggable>, without drag handlers. This will make this ' + 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' + '`position` of this element.');\n }\n\n return _this;\n }\n\n _createClass(Draggable, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if (typeof window.SVGElement !== 'undefined' && this.findDOMNode() instanceof window.SVGElement) {\n this.setState({\n isElementSVG: true\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.setState({\n dragging: false\n }); // prevents invariant if unmounted while dragging\n } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n\n }, {\n key: \"findDOMNode\",\n value: function findDOMNode()\n /*: ?HTMLElement*/\n {\n return this.props.nodeRef ? this.props.nodeRef.current : _reactDom.default.findDOMNode(this);\n }\n }, {\n key: \"render\",\n value: function render()\n /*: ReactElement<any>*/\n {\n var _classNames;\n\n var _this$props = this.props,\n axis = _this$props.axis,\n bounds = _this$props.bounds,\n children = _this$props.children,\n defaultPosition = _this$props.defaultPosition,\n defaultClassName = _this$props.defaultClassName,\n defaultClassNameDragging = _this$props.defaultClassNameDragging,\n defaultClassNameDragged = _this$props.defaultClassNameDragged,\n position = _this$props.position,\n positionOffset = _this$props.positionOffset,\n scale = _this$props.scale,\n draggableCoreProps = _objectWithoutProperties(_this$props, [\"axis\", \"bounds\", \"children\", \"defaultPosition\", \"defaultClassName\", \"defaultClassNameDragging\", \"defaultClassNameDragged\", \"position\", \"positionOffset\", \"scale\"]);\n\n var style = {};\n var svgTransform = null; // If this is controlled, we don't want to move it - unless it's dragging.\n\n var controlled = Boolean(position);\n var draggable = !controlled || this.state.dragging;\n var validPosition = position || defaultPosition;\n var transformOpts = {\n // Set left if horizontal drag is enabled\n x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,\n // Set top if vertical drag is enabled\n y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y\n }; // If this element was SVG, we use the `transform` attribute.\n\n if (this.state.isElementSVG) {\n svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>\n // has a clean slate.\n style = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);\n } // Mark with class while dragging\n\n\n var className = (0, _classnames.default)(children.props.className || '', defaultClassName, (_classNames = {}, _defineProperty(_classNames, defaultClassNameDragging, this.state.dragging), _defineProperty(_classNames, defaultClassNameDragged, this.state.dragged), _classNames)); // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n\n return /*#__PURE__*/React.createElement(_DraggableCore.default, _extends({}, draggableCoreProps, {\n onStart: this.onDragStart,\n onDrag: this.onDrag,\n onStop: this.onDragStop\n }), React.cloneElement(React.Children.only(children), {\n className: className,\n style: _objectSpread(_objectSpread({}, children.props.style), style),\n transform: svgTransform\n }));\n }\n }]);\n\n return Draggable;\n}(React.Component);\n\nexports.default = Draggable;\n\n_defineProperty(Draggable, \"displayName\", 'Draggable');\n\n_defineProperty(Draggable, \"propTypes\", _objectSpread(_objectSpread({}, _DraggableCore.default.propTypes), {}, {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: _propTypes.default.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable bounds={{right: 300, bottom: 300}}>\n * <div>Content</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n bounds: _propTypes.default.oneOfType([_propTypes.default.shape({\n left: _propTypes.default.number,\n right: _propTypes.default.number,\n top: _propTypes.default.number,\n bottom: _propTypes.default.number\n }), _propTypes.default.string, _propTypes.default.oneOf([false])]),\n defaultClassName: _propTypes.default.string,\n defaultClassNameDragging: _propTypes.default.string,\n defaultClassNameDragged: _propTypes.default.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable defaultPosition={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n defaultPosition: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n positionOffset: _propTypes.default.shape({\n x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),\n y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable position={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n position: _propTypes.default.shape({\n x: _propTypes.default.number,\n y: _propTypes.default.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n}));\n\n_defineProperty(Draggable, \"defaultProps\", _objectSpread(_objectSpread({}, _DraggableCore.default.defaultProps), {}, {\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {\n x: 0,\n y: 0\n },\n position: null,\n scale: 1\n}));","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getPrefix = getPrefix;\nexports.browserPrefixToKey = browserPrefixToKey;\nexports.browserPrefixToStyle = browserPrefixToStyle;\nexports.default = void 0;\nvar prefixes = ['Moz', 'Webkit', 'O', 'ms'];\n\nfunction getPrefix()\n/*: string*/\n{\n var prop\n /*: string*/\n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n var style = window.document.documentElement.style;\n if (prop in style) return '';\n\n for (var i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nfunction browserPrefixToKey(prop\n/*: string*/\n, prefix\n/*: string*/\n)\n/*: string*/\n{\n return prefix ? \"\".concat(prefix).concat(kebabToTitleCase(prop)) : prop;\n}\n\nfunction browserPrefixToStyle(prop\n/*: string*/\n, prefix\n/*: string*/\n)\n/*: string*/\n{\n return prefix ? \"-\".concat(prefix.toLowerCase(), \"-\").concat(prop) : prop;\n}\n\nfunction kebabToTitleCase(str\n/*: string*/\n)\n/*: string*/\n{\n var out = '';\n var shouldCapitalize = true;\n\n for (var i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n\n return out;\n} // Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\n\n\nvar _default = getPrefix();\n\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nvar _domFns = require(\"./utils/domFns\");\n\nvar _positionFns = require(\"./utils/positionFns\");\n\nvar _shims = require(\"./utils/shims\");\n\nvar _log = _interopRequireDefault(require(\"./utils/log\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Simple abstraction for dragging events names.\nvar eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n}; // Default to mouse events.\n\nvar dragEventFor = eventsFor.mouse;\n/*:: type DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};*/\n\n/*:: export type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};*/\n\n/*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;*/\n\n/*:: export type ControlPosition = {x: number, y: number};*/\n\n/*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/\n\n/*:: export type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement<any>,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n nodeRef?: ?React.ElementRef<any>,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n scale: number,\n};*/\n\n//\n// Define <DraggableCore>.\n//\n// <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\nvar DraggableCore = /*#__PURE__*/function (_React$Component) {\n _inherits(DraggableCore, _React$Component);\n\n var _super = _createSuper(DraggableCore);\n\n function DraggableCore() {\n var _this;\n\n _classCallCheck(this, DraggableCore);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN,\n lastY: NaN,\n touchIdentifier: null\n });\n\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"handleDragStart\", function (e) {\n // Make it possible to attach event handlers on top of this one.\n _this.props.onMouseDown(e); // Only accept left-clicks.\n\n\n if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; // Get nodes. Be sure to grab relative document (could be iframed)\n\n var thisNode = _this.findDOMNode();\n\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error('<DraggableCore> not mounted on DragStart!');\n }\n\n var ownerDocument = thisNode.ownerDocument; // Short circuit if handle or cancel prop was provided and selector doesn't match.\n\n if (_this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.handle, thisNode) || _this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e.target, _this.props.cancel, thisNode)) {\n return;\n } // Prevent scrolling on mobile devices, like ipad/iphone.\n // Important that this is after handle/cancel.\n\n\n if (e.type === 'touchstart') e.preventDefault(); // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n\n var touchIdentifier = (0, _domFns.getTouchIdentifier)(e);\n\n _this.setState({\n touchIdentifier: touchIdentifier\n }); // Get the current drag point from the event. This is used as the offset.\n\n\n var position = (0, _positionFns.getControlPosition)(e, touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return; // not possible but satisfies flow\n\n var x = position.x,\n y = position.y; // Create an event object with all the data parents need to make a decision here.\n\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);\n (0, _log.default)('DraggableCore: handleDragStart: %j', coreEvent); // Call event handler. If it returns explicit false, cancel.\n\n (0, _log.default)('calling', _this.props.onStart);\n\n var shouldUpdate = _this.props.onStart(e, coreEvent);\n\n if (shouldUpdate === false || _this.mounted === false) return; // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n\n if (_this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument); // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n\n _this.setState({\n dragging: true,\n lastX: x,\n lastY: y\n }); // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n\n\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.move, _this.handleDrag);\n (0, _domFns.addEvent)(ownerDocument, dragEventFor.stop, _this.handleDragStop);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleDrag\", function (e) {\n // Get the current drag point from the event. This is used as the offset.\n var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return;\n var x = position.x,\n y = position.y; // Snap to grid if prop has been provided\n\n if (Array.isArray(_this.props.grid)) {\n var deltaX = x - _this.state.lastX,\n deltaY = y - _this.state.lastY;\n\n var _snapToGrid = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);\n\n var _snapToGrid2 = _slicedToArray(_snapToGrid, 2);\n\n deltaX = _snapToGrid2[0];\n deltaY = _snapToGrid2[1];\n if (!deltaX && !deltaY) return; // skip useless drag\n\n x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY;\n }\n\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y);\n (0, _log.default)('DraggableCore: handleDrag: %j', coreEvent); // Call event handler. If it returns explicit false, trigger end.\n\n var shouldUpdate = _this.props.onDrag(e, coreEvent);\n\n if (shouldUpdate === false || _this.mounted === false) {\n try {\n // $FlowIgnore\n _this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n var event = ((document.createEvent('MouseEvents')\n /*: any*/\n )\n /*: MouseTouchEvent*/\n ); // I see why this insanity was deprecated\n // $FlowIgnore\n\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n\n _this.handleDragStop(event);\n }\n\n return;\n }\n\n _this.setState({\n lastX: x,\n lastY: y\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"handleDragStop\", function (e) {\n if (!_this.state.dragging) return;\n var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));\n if (position == null) return;\n var x = position.x,\n y = position.y;\n var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); // Call event handler\n\n var shouldContinue = _this.props.onStop(e, coreEvent);\n\n if (shouldContinue === false || _this.mounted === false) return false;\n\n var thisNode = _this.findDOMNode();\n\n if (thisNode) {\n // Remove user-select hack\n if (_this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);\n }\n\n (0, _log.default)('DraggableCore: handleDragStop: %j', coreEvent); // Reset the el.\n\n _this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n if (thisNode) {\n // Remove event handlers\n (0, _log.default)('DraggableCore: Removing handlers');\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, _this.handleDrag);\n (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, _this.handleDragStop);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseDown\", function (e) {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return _this.handleDragStart(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onMouseUp\", function (e) {\n dragEventFor = eventsFor.mouse;\n return _this.handleDragStop(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTouchStart\", function (e) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return _this.handleDragStart(e);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTouchEnd\", function (e) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n return _this.handleDragStop(e);\n });\n\n return _this;\n }\n\n _createClass(DraggableCore, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true; // Touch handlers must be added with {passive: false} to be cancelable.\n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\n var thisNode = this.findDOMNode();\n\n if (thisNode) {\n (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mounted = false; // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n\n var thisNode = this.findDOMNode();\n\n if (thisNode) {\n var ownerDocument = thisNode.ownerDocument;\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.move, this.handleDrag);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {\n passive: false\n });\n if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument);\n }\n } // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find\n // the underlying DOM node ourselves. See the README for more information.\n\n }, {\n key: \"findDOMNode\",\n value: function findDOMNode()\n /*: ?HTMLElement*/\n {\n return this.props.nodeRef ? this.props.nodeRef.current : _reactDom.default.findDOMNode(this);\n }\n }, {\n key: \"render\",\n value: function render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onMouseUp: this.onMouseUp,\n // onTouchStart is added on `componentDidMount` so they can be added with\n // {passive: false}, which allows it to cancel. See \n // https://developers.google.com/web/updates/2017/01/scrolling-intervention\n onTouchEnd: this.onTouchEnd\n });\n }\n }]);\n\n return DraggableCore;\n}(React.Component);\n\nexports.default = DraggableCore;\n\n_defineProperty(DraggableCore, \"displayName\", 'DraggableCore');\n\n_defineProperty(DraggableCore, \"propTypes\", {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: _propTypes.default.bool,\n\n /**\n * `disabled`, if true, stops the <Draggable> from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: _propTypes.default.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: _propTypes.default.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function offsetParent(props\n /*: DraggableCoreProps*/\n , propName\n /*: $Keys<DraggableCoreProps>*/\n ) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: _propTypes.default.arrayOf(_propTypes.default.number),\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable handle=\".handle\">\n * <div>\n * <div className=\"handle\">Click me to drag</div>\n * <div>This is some other content</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n handle: _propTypes.default.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * <Draggable cancel=\".cancel\">\n * <div>\n * <div className=\"cancel\">You can't drag from here</div>\n * <div>Dragging here works fine</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n cancel: _propTypes.default.string,\n\n /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.\n * Unfortunately, in order for <Draggable> to work properly, we need raw access\n * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`\n * as in this example:\n *\n * function MyComponent() {\n * const nodeRef = React.useRef(null);\n * return (\n * <Draggable nodeRef={nodeRef}>\n * <div ref={nodeRef}>Example Target</div>\n * </Draggable>\n * );\n * }\n *\n * This can be used for arbitrarily nested components, so long as the ref ends up\n * pointing to the actual child DOM node and not a custom component.\n */\n nodeRef: _propTypes.default.object,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: _propTypes.default.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: _propTypes.default.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: _propTypes.default.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: _propTypes.default.func,\n\n /**\n * `scale`, if set, applies scaling while dragging an element\n */\n scale: _propTypes.default.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: _shims.dontSetMe,\n style: _shims.dontSetMe,\n transform: _shims.dontSetMe\n});\n\n_defineProperty(DraggableCore, \"defaultProps\", {\n allowAnyClick: false,\n // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function onStart() {},\n onDrag: function onDrag() {},\n onStop: function onStop() {},\n onMouseDown: function onMouseDown() {},\n scale: 1\n});","'use strict';\nmodule.exports = function() {\n throw new Error(\"Don't instantiate Resizable directly! Use require('react-resizable').Resizable\");\n};\n\nmodule.exports.Resizable = require('./build/Resizable').default;\nmodule.exports.ResizableBox = require('./build/ResizableBox').default;\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__2__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","const {default: Draggable, DraggableCore} = require('./Draggable');\n\n// Previous versions of this lib exported <Draggable> as the root export. As to no-// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nmodule.exports = Draggable;\nmodule.exports.default = Draggable;\nmodule.exports.DraggableCore = DraggableCore;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array<any> | TouchList, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n if (!isFunction(el[matchesSelectorFunc])) return false;\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nexport function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode: Node): boolean {\n let node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParent(evt: {clientX: number, clientY: number}, offsetParent: HTMLElement, scale: number): ControlPosition {\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;\n const y = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;\n\n return {x, y};\n}\n\nexport function createCSSTransform(controlPos: ControlPosition, positionOffset: PositionOffsetControlPosition): Object {\n const translation = getTranslation(controlPos, positionOffset, 'px');\n return {[browserPrefixToKey('transform', browserPrefix)]: translation };\n}\n\nexport function createSVGTransform(controlPos: ControlPosition, positionOffset: PositionOffsetControlPosition): string {\n const translation = getTranslation(controlPos, positionOffset, '');\n return translation;\n}\nexport function getTranslation({x, y}: ControlPosition, positionOffset: PositionOffsetControlPosition, unitSuffix: string): string {\n let translation = `translate(${x}${unitSuffix},${y}${unitSuffix})`;\n if (positionOffset) {\n const defaultX = `${(typeof positionOffset.x === 'string') ? positionOffset.x : positionOffset.x + unitSuffix}`;\n const defaultY = `${(typeof positionOffset.y === 'string') ? positionOffset.y : positionOffset.y + unitSuffix}`;\n translation = `translate(${defaultX}, ${defaultY})` + translation;\n }\n return translation;\n}\n\nexport function getTouch(e: MouseTouchEvent, identifier: number): ?{clientX: number, clientY: number} {\n return (e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier)) ||\n (e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier));\n}\n\nexport function getTouchIdentifier(e: MouseTouchEvent): ?number {\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nexport function addUserSelectStyles(doc: ?Document) {\n if (!doc) return;\n let styleEl = doc.getElementById('react-draggable-style-el');\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nexport function removeUserSelectStyles(doc: ?Document) {\n try {\n if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n // $FlowIgnore: IE\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n window.getSelection().removeAllRanges(); // remove selection caused by scroll\n }\n } catch (e) {\n // probably IE\n }\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\nexport function addClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`))) {\n el.className += ` ${className}`;\n }\n }\n}\n\nexport function removeClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`, 'g'), '');\n }\n}\n","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {getTouch, innerWidth, innerHeight, offsetXYFromParent, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n const {ownerDocument} = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft +\n int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop +\n int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseTouchEvent, touchIdentifier: ?number, draggableCore: DraggableCore): ?ControlPosition {\n const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n const node = findDOMNode(draggableCore);\n // User can provide an offsetParent if desired.\n const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return offsetXYFromParent(touchObj || e, offsetParent, draggableCore.props.scale);\n}\n\n// Create an data object exposed by <DraggableCore>'s events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n const state = draggable.state;\n const isStart = !isNum(state.lastX);\n const node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node,\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x, y,\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x, y,\n };\n }\n}\n\n// Create an data exposed by <Draggable>'s events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n const scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + (coreData.deltaX / scale),\n y: draggable.state.y + (coreData.deltaY / scale),\n deltaX: (coreData.deltaX / scale),\n deltaY: (coreData.deltaY / scale),\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable: Draggable | DraggableCore): HTMLElement {\n const node = ReactDOM.findDOMNode(draggable);\n if (!node) {\n throw new Error('<DraggableCore>: Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport {matchesSelectorAndParentsTo, addEvent, removeEvent, addUserSelectStyles, getTouchIdentifier,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler, MouseTouchEvent} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};\n\nexport type DraggableBounds = {\n left: number,\n right: number,\n top: number,\n bottom: number,\n};\n\nexport type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};\n\nexport type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;\n\nexport type ControlPosition = {x: number, y: number};\nexport type PositionOffsetControlPosition = {x: number|string, y: number|string};\n\nexport type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement<any>,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n scale: number,\n};\n\n//\n// Define <DraggableCore>.\n//\n// <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component<DraggableCoreProps, DraggableCoreState> {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the <Draggable> from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function(props: DraggableCoreProps, propName: $Keys<DraggableCoreProps>) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n \n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable handle=\".handle\">\n * <div>\n * <div className=\"handle\">Click me to drag</div>\n * <div>This is some other content</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * <Draggable cancel=\".cancel\">\n * <div>\n * <div className=\"cancel\">You can't drag from here</div>\n * <div>Dragging here works fine</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * `scale`, if set, applies scaling while dragging an element\n */\n scale: PropTypes.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){},\n scale: 1,\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n const {ownerDocument} = thisNode;\n removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);\n }\n }\n\n handleDragStart: EventHandler<MouseTouchEvent> = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Get nodes. Be sure to grab relative document (could be iframed)\n const thisNode = ReactDOM.findDOMNode(this);\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error('<DraggableCore> not mounted on DragStart!');\n }\n const {ownerDocument} = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof ownerDocument.defaultView.Node)) ||\n (this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode)) ||\n (this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n const touchIdentifier = getTouchIdentifier(e);\n this.setState({touchIdentifier});\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {x, y} = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(ownerDocument, dragEventFor.move, this.handleDrag);\n addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler<MouseTouchEvent> = (e) => {\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n if (e.type === 'touchmove') e.preventDefault();\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n let {x, y} = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n try {\n // $FlowIgnore\n this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);\n // I see why this insanity was deprecated\n // $FlowIgnore\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.handleDragStop(event);\n }\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler<MouseTouchEvent> = (e) => {\n if (!this.state.dragging) return;\n\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n const {x, y} = position;\n const coreEvent = createCoreData(this, x, y);\n\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);\n }\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n if (thisNode) {\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n };\n\n onMouseDown: EventHandler<MouseTouchEvent> = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler<MouseTouchEvent> = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler<MouseTouchEvent> = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler<MouseTouchEvent> = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport type {ControlPosition, PositionOffsetControlPosition, DraggableBounds, DraggableCoreProps} from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean,\n prevPropsPosition: ?ControlPosition,\n};\n\nexport type DraggableProps = {\n ...$Exact<DraggableCoreProps>,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: DraggableBounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n positionOffset: PositionOffsetControlPosition,\n position: ControlPosition,\n scale: number\n};\n\n//\n// Define <Draggable>\n//\n\nclass Draggable extends React.Component<DraggableProps, DraggableState> {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props <DraggableCore> accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable bounds={{right: 300, bottom: 300}}>\n * <div>Content</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n defaultClassName: PropTypes.string,\n defaultClassNameDragging: PropTypes.string,\n defaultClassNameDragged: PropTypes.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable defaultPosition={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n positionOffset: PropTypes.shape({\n x: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n y: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable position={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {x: 0, y: 0},\n position: null,\n scale: 1\n };\n\n // React 16.3+\n // Arity (props, state)\n static getDerivedStateFromProps({position}: DraggableProps, {prevPropsPosition}: DraggableState) {\n // Set x/y if a new position is provided in props that is different than the previous.\n if (\n position &&\n (!prevPropsPosition || \n position.x !== prevPropsPosition.x || position.y !== prevPropsPosition.y\n )\n ) {\n log('Draggable: getDerivedStateFromProps %j', {position, prevPropsPosition});\n return {\n x: position.x, \n y: position.y, \n prevPropsPosition: {...position}\n };\n }\n return null;\n }\n\n constructor(props: DraggableProps) {\n super(props);\n\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n\n prevPropsPosition: {...props.position},\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n if (props.position && !(props.onDrag || props.onStop)) {\n // eslint-disable-next-line no-console\n console.warn('A `position` was applied to this <Draggable>, without drag handlers. This will make this ' +\n 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n '`position` of this element.');\n }\n }\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {\n this.setState({isElementSVG: true});\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape<DraggableState> = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y);\n newState.x = newStateX;\n newState.y = newStateY;\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n const newState: $Shape<DraggableState> = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {x, y} = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n\n this.setState(newState);\n };\n\n render(): ReactElement<any> {\n const {\n axis,\n bounds,\n children,\n defaultPosition,\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged,\n position,\n positionOffset,\n scale,\n ...draggableCoreProps\n } = this.props;\n\n let style = {};\n let svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(position);\n const draggable = !controlled || this.state.dragging;\n\n const validPosition = position || defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && draggable ?\n this.state.x :\n validPosition.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && draggable ?\n this.state.y :\n validPosition.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts, positionOffset);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>\n // has a clean slate.\n style = createCSSTransform(transformOpts, positionOffset);\n }\n\n // Mark with class while dragging\n const className = classNames((children.props.className || ''), defaultClassName, {\n [defaultClassNameDragging]: this.state.dragging,\n [defaultClassNameDragged]: this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n <DraggableCore {...draggableCoreProps} onStart={this.onDragStart} onDrag={this.onDrag} onStop={this.onDragStop}>\n {React.cloneElement(React.Children.only(children), {\n className: className,\n style: {...children.props.style, ...style},\n transform: svgTransform\n })}\n </DraggableCore>\n );\n }\n}\n\nexport {Draggable as default, DraggableCore};\n","\"use strict\";\n\nexports.__esModule = true;\nexports.cloneElement = cloneElement;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// React.addons.cloneWithProps look-alike that merges style & className.\nfunction cloneElement(element, props) {\n if (props.style && element.props.style) {\n props.style = _objectSpread({}, element.props.style, {}, props.style);\n }\n\n if (props.className && element.props.className) {\n props.className = element.props.className + \" \" + props.className;\n }\n\n return _react.default.cloneElement(element, props);\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _Resizable = _interopRequireDefault(require(\"./Resizable\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// An example use of Resizable.\nvar ResizableBox =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ResizableBox, _React$Component);\n\n function ResizableBox() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n width: _this.props.width,\n height: _this.props.height,\n propsWidth: _this.props.width,\n propsHeight: _this.props.height\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onResize\", function (e, data) {\n var size = data.size;\n var width = size.width,\n height = size.height;\n\n if (_this.props.onResize) {\n e.persist && e.persist();\n\n _this.setState(size, function () {\n return _this.props.onResize && _this.props.onResize(e, data);\n });\n } else {\n _this.setState(size);\n }\n });\n\n return _this;\n }\n\n ResizableBox.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {\n // If parent changes height/width, set that in our state.\n if (state.propsWidth !== props.width || state.propsHeight !== props.height) {\n return {\n width: props.width,\n height: props.height,\n propsWidth: props.width,\n propsHeight: props.height\n };\n }\n\n return null;\n };\n\n var _proto = ResizableBox.prototype;\n\n _proto.render = function render() {\n // Basic wrapper around a Resizable instance.\n // If you use Resizable directly, you are responsible for updating the child component\n // with a new width and height.\n var _this$props = this.props,\n handle = _this$props.handle,\n handleSize = _this$props.handleSize,\n onResize = _this$props.onResize,\n onResizeStart = _this$props.onResizeStart,\n onResizeStop = _this$props.onResizeStop,\n draggableOpts = _this$props.draggableOpts,\n minConstraints = _this$props.minConstraints,\n maxConstraints = _this$props.maxConstraints,\n lockAspectRatio = _this$props.lockAspectRatio,\n axis = _this$props.axis,\n width = _this$props.width,\n height = _this$props.height,\n resizeHandles = _this$props.resizeHandles,\n props = _objectWithoutPropertiesLoose(_this$props, [\"handle\", \"handleSize\", \"onResize\", \"onResizeStart\", \"onResizeStop\", \"draggableOpts\", \"minConstraints\", \"maxConstraints\", \"lockAspectRatio\", \"axis\", \"width\", \"height\", \"resizeHandles\"]);\n\n return _react.default.createElement(_Resizable.default, {\n handle: handle,\n handleSize: handleSize,\n width: this.state.width,\n height: this.state.height,\n onResizeStart: onResizeStart,\n onResize: this.onResize,\n onResizeStop: onResizeStop,\n draggableOpts: draggableOpts,\n minConstraints: minConstraints,\n maxConstraints: maxConstraints,\n lockAspectRatio: lockAspectRatio,\n axis: axis,\n resizeHandles: resizeHandles\n }, _react.default.createElement(\"div\", _extends({\n style: {\n width: this.state.width + 'px',\n height: this.state.height + 'px'\n }\n }, props)));\n };\n\n return ResizableBox;\n}(_react.default.Component);\n\nexports.default = ResizableBox;\n\n_defineProperty(ResizableBox, \"propTypes\", {\n height: _propTypes.default.number,\n width: _propTypes.default.number\n});\n\n_defineProperty(ResizableBox, \"defaultProps\", {\n handleSize: [20, 20]\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n //\n // Basic props\n //\n className: _propTypes.default.string,\n style: _propTypes.default.object,\n // This can be set explicitly. If it is not set, it will automatically\n // be set to the container width. Note that resizes will *not* cause this to adjust.\n // If you need that behavior, use WidthProvider.\n width: _propTypes.default.number,\n // If true, the container height swells and contracts to fit contents\n autoSize: _propTypes.default.bool,\n // # of cols.\n cols: _propTypes.default.number,\n // A selector that will not be draggable.\n draggableCancel: _propTypes.default.string,\n // A selector for the draggable handler\n draggableHandle: _propTypes.default.string,\n // Deprecated\n verticalCompact: function verticalCompact(props\n /*: Props*/\n ) {\n if (props.verticalCompact === false && process.env.NODE_ENV !== \"production\") {\n console.warn( // eslint-disable-line no-console\n \"`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. \" + 'Use `compactType`: \"horizontal\" | \"vertical\" | null.');\n }\n },\n // Choose vertical or hotizontal compaction\n compactType: _propTypes.default.oneOf([\"vertical\", \"horizontal\"]),\n // layout is an array of object with the format:\n // {x: Number, y: Number, w: Number, h: Number, i: String}\n layout: function layout(props\n /*: Props*/\n ) {\n var layout = props.layout; // I hope you're setting the data-grid property on the grid items\n\n if (layout === undefined) return;\n\n require(\"./utils\").validateLayout(layout, \"layout\");\n },\n //\n // Grid Dimensions\n //\n // Margin between items [x, y] in px\n margin: _propTypes.default.arrayOf(_propTypes.default.number),\n // Padding inside the container [x, y] in px\n containerPadding: _propTypes.default.arrayOf(_propTypes.default.number),\n // Rows have a static height, but you can change this based on breakpoints if you like\n rowHeight: _propTypes.default.number,\n // Default Infinity, but you can specify a max here if you like.\n // Note that this isn't fully fleshed out and won't error if you specify a layout that\n // extends beyond the row capacity. It will, however, not allow users to drag/resize\n // an item past the barrier. They can push items beyond the barrier, though.\n // Intentionally not documented for this reason.\n maxRows: _propTypes.default.number,\n //\n // Flags\n //\n isBounded: _propTypes.default.bool,\n isDraggable: _propTypes.default.bool,\n isResizable: _propTypes.default.bool,\n // If true, grid items won't change position when being dragged over.\n preventCollision: _propTypes.default.bool,\n // Use CSS transforms instead of top/left\n useCSSTransforms: _propTypes.default.bool,\n // parent layout transform scale\n transformScale: _propTypes.default.number,\n // If true, an external element can trigger onDrop callback with a specific grid position as a parameter\n isDroppable: _propTypes.default.bool,\n // Defines which resize handles should be rendered (default: 'se')\n // Allows for any combination of:\n // 's' - South handle (bottom-center)\n // 'w' - West handle (left-center)\n // 'e' - East handle (right-center)\n // 'n' - North handle (top-center)\n // 'sw' - Southwest handle (bottom-left)\n // 'nw' - Northwest handle (top-left)\n // 'se' - Southeast handle (bottom-right)\n // 'ne' - Northeast handle (top-right)\n resizeHandles: _propTypes.default.arrayOf(_propTypes.default.oneOf([\"s\", \"w\", \"e\", \"n\", \"sw\", \"nw\", \"se\", \"ne\"])),\n //\n // Callbacks\n //\n // Callback so you can save the layout. Calls after each drag & resize stops.\n onLayoutChange: _propTypes.default.func,\n // Calls when drag starts. Callback is of the signature (layout, oldItem, newItem, placeholder, e, ?node).\n // All callbacks below have the same signature. 'start' and 'stop' callbacks omit the 'placeholder'.\n onDragStart: _propTypes.default.func,\n // Calls on each drag movement.\n onDrag: _propTypes.default.func,\n // Calls when drag is complete.\n onDragStop: _propTypes.default.func,\n //Calls when resize starts.\n onResizeStart: _propTypes.default.func,\n // Calls when resize movement happens.\n onResize: _propTypes.default.func,\n // Calls when resize is complete.\n onResizeStop: _propTypes.default.func,\n // Calls when some element is dropped.\n onDrop: _propTypes.default.func,\n //\n // Other validations\n //\n droppingItem: _propTypes.default.shape({\n i: _propTypes.default.string.isRequired,\n w: _propTypes.default.number.isRequired,\n h: _propTypes.default.number.isRequired\n }),\n // Children must not have duplicate keys.\n children: function children(props\n /*: Props*/\n , propName\n /*: string*/\n ) {\n var children = props[propName]; // Check children keys for duplicates. Throw if found.\n\n var keys = {};\n\n _react.default.Children.forEach(children, function (child) {\n if (keys[child.key]) {\n throw new Error('Duplicate child key \"' + child.key + '\" found! This will cause problems in ReactGridLayout.');\n }\n\n keys[child.key] = true;\n });\n },\n // Optional ref for getting a reference for the wrapping div.\n innerRef: _propTypes.default.any\n};\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _lodash = _interopRequireDefault(require(\"lodash.isequal\"));\n\nvar _utils = require(\"./utils\");\n\nvar _responsiveUtils = require(\"./responsiveUtils\");\n\nvar _ReactGridLayout = _interopRequireDefault(require(\"./ReactGridLayout\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar type = function type(obj) {\n return Object.prototype.toString.call(obj);\n};\n/**\n * Get a value of margin or containerPadding.\n *\n * @param {Array | Object} param Margin | containerPadding, e.g. [10, 10] | {lg: [10, 10], ...}.\n * @param {String} breakpoint Breakpoint: lg, md, sm, xs and etc.\n * @return {Array}\n */\n\n\nfunction getIndentationValue\n/*:: <T: ?[number, number]>*/\n(param\n/*: { [key: string]: T } | T*/\n, breakpoint\n/*: string*/\n)\n/*: T*/\n{\n // $FlowIssue doesn't seem to understand this\n if (param == null) return null;\n return Array.isArray(param) ? param : param[breakpoint];\n}\n/*:: type State = {\n layout: Layout,\n breakpoint: string,\n cols: number,\n layouts?: { [key: string]: Layout }\n};*/\n\n/*:: type Props<Breakpoint: string = string> = {|\n ...React.ElementConfig<typeof ReactGridLayout>,\n\n // Responsive config\n breakpoint?: ?Breakpoint,\n breakpoints: Breakpoints<Breakpoint>,\n cols: { [key: Breakpoint]: number },\n layouts: ResponsiveLayout<Breakpoint>,\n width: number,\n margin: { [key: Breakpoint]: [number, number] } | [number, number],\n /* prettier-ignore *-/\n containerPadding: { [key: Breakpoint]: ?[number, number] } | ?[number, number],\n\n // Callbacks\n onBreakpointChange: (Breakpoint, cols: number) => void,\n onLayoutChange: (Layout, { [key: Breakpoint]: Layout }) => void,\n onWidthChange: (\n containerWidth: number,\n margin: [number, number],\n cols: number,\n containerPadding: ?[number, number]\n ) => void\n|};*/\n\n\nvar ResponsiveReactGridLayout = /*#__PURE__*/function (_React$Component) {\n _inherits(ResponsiveReactGridLayout, _React$Component);\n\n var _super = _createSuper(ResponsiveReactGridLayout);\n\n function ResponsiveReactGridLayout() {\n var _this;\n\n _classCallCheck(this, ResponsiveReactGridLayout);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", _this.generateInitialState());\n\n _defineProperty(_assertThisInitialized(_this), \"onLayoutChange\", function (layout\n /*: Layout*/\n ) {\n _this.props.onLayoutChange(layout, _objectSpread(_objectSpread({}, _this.props.layouts), {}, _defineProperty({}, _this.state.breakpoint, layout)));\n });\n\n return _this;\n }\n\n _createClass(ResponsiveReactGridLayout, [{\n key: \"generateInitialState\",\n value: function generateInitialState()\n /*: State*/\n {\n var _this$props = this.props,\n width = _this$props.width,\n breakpoints = _this$props.breakpoints,\n layouts = _this$props.layouts,\n cols = _this$props.cols;\n var breakpoint = (0, _responsiveUtils.getBreakpointFromWidth)(breakpoints, width);\n var colNo = (0, _responsiveUtils.getColsFromBreakpoint)(breakpoint, cols); // verticalCompact compatibility, now deprecated\n\n var compactType = this.props.verticalCompact === false ? null : this.props.compactType; // Get the initial layout. This can tricky; we try to generate one however possible if one doesn't exist\n // for this layout.\n\n var initialLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(layouts, breakpoints, breakpoint, breakpoint, colNo, compactType);\n return {\n layout: initialLayout,\n breakpoint: breakpoint,\n cols: colNo\n };\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps\n /*: Props<*>*/\n ) {\n // Allow parent to set width or breakpoint directly.\n if (this.props.width != prevProps.width || this.props.breakpoint !== prevProps.breakpoint || !(0, _lodash.default)(this.props.breakpoints, prevProps.breakpoints) || !(0, _lodash.default)(this.props.cols, prevProps.cols)) {\n this.onWidthChange(prevProps);\n }\n } // wrap layouts so we do not need to pass layouts to child\n\n }, {\n key: \"onWidthChange\",\n\n /**\n * When the width changes work through breakpoints and reset state with the new width & breakpoint.\n * Width changes are necessary to figure out the widget widths.\n */\n value: function onWidthChange(prevProps\n /*: Props<*>*/\n ) {\n var _this$props2 = this.props,\n breakpoints = _this$props2.breakpoints,\n cols = _this$props2.cols,\n layouts = _this$props2.layouts,\n compactType = _this$props2.compactType;\n var newBreakpoint = this.props.breakpoint || (0, _responsiveUtils.getBreakpointFromWidth)(this.props.breakpoints, this.props.width);\n var lastBreakpoint = this.state.breakpoint;\n var newCols\n /*: number*/\n = (0, _responsiveUtils.getColsFromBreakpoint)(newBreakpoint, cols);\n\n var newLayouts = _objectSpread({}, layouts); // Breakpoint change\n\n\n if (lastBreakpoint !== newBreakpoint || prevProps.breakpoints !== breakpoints || prevProps.cols !== cols) {\n // Preserve the current layout if the current breakpoint is not present in the next layouts.\n if (!(lastBreakpoint in newLayouts)) newLayouts[lastBreakpoint] = (0, _utils.cloneLayout)(this.state.layout); // Find or generate a new layout.\n\n var layout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(newLayouts, breakpoints, newBreakpoint, lastBreakpoint, newCols, compactType); // This adds missing items.\n\n layout = (0, _utils.synchronizeLayoutWithChildren)(layout, this.props.children, newCols, compactType); // Store the new layout.\n\n newLayouts[newBreakpoint] = layout; // callbacks\n\n this.props.onLayoutChange(layout, newLayouts);\n this.props.onBreakpointChange(newBreakpoint, newCols);\n this.setState({\n breakpoint: newBreakpoint,\n layout: layout,\n cols: newCols\n });\n }\n\n var margin = getIndentationValue(this.props.margin, newBreakpoint);\n var containerPadding = getIndentationValue(this.props.containerPadding, newBreakpoint); //call onWidthChange on every change of width, not only on breakpoint changes\n\n this.props.onWidthChange(this.props.width, margin, newCols, containerPadding);\n }\n }, {\n key: \"render\",\n value: function render() {\n /* eslint-disable no-unused-vars */\n var _this$props3 = this.props,\n breakpoint = _this$props3.breakpoint,\n breakpoints = _this$props3.breakpoints,\n cols = _this$props3.cols,\n layouts = _this$props3.layouts,\n margin = _this$props3.margin,\n containerPadding = _this$props3.containerPadding,\n onBreakpointChange = _this$props3.onBreakpointChange,\n onLayoutChange = _this$props3.onLayoutChange,\n onWidthChange = _this$props3.onWidthChange,\n other = _objectWithoutProperties(_this$props3, [\"breakpoint\", \"breakpoints\", \"cols\", \"layouts\", \"margin\", \"containerPadding\", \"onBreakpointChange\", \"onLayoutChange\", \"onWidthChange\"]);\n /* eslint-enable no-unused-vars */\n\n\n return /*#__PURE__*/React.createElement(_ReactGridLayout.default, _extends({}, other, {\n margin: getIndentationValue(margin, this.state.breakpoint),\n containerPadding: getIndentationValue(containerPadding, this.state.breakpoint),\n onLayoutChange: this.onLayoutChange,\n layout: this.state.layout,\n cols: this.state.cols\n }));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps\n /*: Props<*>*/\n , prevState\n /*: State*/\n ) {\n if (!(0, _lodash.default)(nextProps.layouts, prevState.layouts)) {\n // Allow parent to set layouts directly.\n var breakpoint = prevState.breakpoint,\n _cols = prevState.cols; // Since we're setting an entirely new layout object, we must generate a new responsive layout\n // if one does not exist.\n\n var newLayout = (0, _responsiveUtils.findOrGenerateResponsiveLayout)(nextProps.layouts, nextProps.breakpoints, breakpoint, breakpoint, _cols, nextProps.compactType);\n return {\n layout: newLayout,\n layouts: nextProps.layouts\n };\n }\n\n return null;\n }\n }]);\n\n return ResponsiveReactGridLayout;\n}(React.Component);\n\nexports.default = ResponsiveReactGridLayout;\n\n_defineProperty(ResponsiveReactGridLayout, \"propTypes\", {\n //\n // Basic props\n //\n // Optional, but if you are managing width yourself you may want to set the breakpoint\n // yourself as well.\n breakpoint: _propTypes.default.string,\n // {name: pxVal}, e.g. {lg: 1200, md: 996, sm: 768, xs: 480}\n breakpoints: _propTypes.default.object,\n // # of cols. This is a breakpoint -> cols map\n cols: _propTypes.default.object,\n // # of margin. This is a breakpoint -> margin map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Margin between items [x, y] in px\n // e.g. [10, 10]\n margin: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // # of containerPadding. This is a breakpoint -> containerPadding map\n // e.g. { lg: [5, 5], md: [10, 10], sm: [15, 15] }\n // Padding inside the container [x, y] in px\n // e.g. [10, 10]\n containerPadding: _propTypes.default.oneOfType([_propTypes.default.array, _propTypes.default.object]),\n // layouts is an object mapping breakpoints to layouts.\n // e.g. {lg: Layout, md: Layout, ...}\n layouts: function layouts(props\n /*: Props<>*/\n , propName\n /*: string*/\n ) {\n if (type(props[propName]) !== \"[object Object]\") {\n throw new Error(\"Layout property must be an object. Received: \" + type(props[propName]));\n }\n\n Object.keys(props[propName]).forEach(function (key) {\n if (!(key in props.breakpoints)) {\n throw new Error(\"Each key in layouts must align with a key in breakpoints.\");\n }\n\n (0, _utils.validateLayout)(props.layouts[key], \"layouts.\" + key);\n });\n },\n // The width of this component.\n // Required in this propTypes stanza because generateInitialState() will fail without it.\n width: _propTypes.default.number.isRequired,\n //\n // Callbacks\n //\n // Calls back with breakpoint and new # cols\n onBreakpointChange: _propTypes.default.func,\n // Callback so you can save the layout.\n // Calls back with (currentLayout, allLayouts). allLayouts are keyed by breakpoint.\n onLayoutChange: _propTypes.default.func,\n // Calls back with (containerWidth, margin, cols, containerPadding)\n onWidthChange: _propTypes.default.func\n});\n\n_defineProperty(ResponsiveReactGridLayout, \"defaultProps\", {\n breakpoints: {\n lg: 1200,\n md: 996,\n sm: 768,\n xs: 480,\n xxs: 0\n },\n cols: {\n lg: 12,\n md: 10,\n sm: 6,\n xs: 4,\n xxs: 2\n },\n layouts: {},\n margin: [10, 10],\n containerPadding: {\n lg: null,\n md: null,\n sm: null,\n xs: null,\n xxs: null\n },\n onBreakpointChange: _utils.noop,\n onLayoutChange: _utils.noop,\n onWidthChange: _utils.noop\n});","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = WidthProvider;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _getRequireWildcardCache() { if (typeof WeakMap !== \"function\") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/*\n * A simple HOC that provides facility for listening to container resizes.\n *\n * The Flow type is pretty janky here. I can't just spread `WPProps` into this returned object - I wish I could - but it triggers\n * a flow bug of some sort that causes it to stop typechecking.\n */\nfunction WidthProvider\n/*:: <Config>*/\n(ComposedComponent\n/*: React.AbstractComponent<Config>*/\n)\n/*: React.AbstractComponent<{|\n ...Config,\n measureBeforeMount?: boolean,\n className?: string,\n style?: Object,\n width?: number\n|}>*/\n{\n var _class, _temp;\n\n return _temp = _class = /*#__PURE__*/function (_React$Component) {\n _inherits(WidthProvider, _React$Component);\n\n var _super = _createSuper(WidthProvider);\n\n function WidthProvider() {\n var _this;\n\n _classCallCheck(this, WidthProvider);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"state\", {\n width: 1280\n });\n\n _defineProperty(_assertThisInitialized(_this), \"mounted\", false);\n\n _defineProperty(_assertThisInitialized(_this), \"onWindowResize\", function () {\n if (!_this.mounted) return; // eslint-disable-next-line react/no-find-dom-node\n\n var node = _reactDom.default.findDOMNode(_assertThisInitialized(_this)); // Flow casts this to Text | Element\n\n\n if (node instanceof HTMLElement) _this.setState({\n width: node.offsetWidth\n });\n });\n\n return _this;\n }\n\n _createClass(WidthProvider, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.mounted = true;\n window.addEventListener(\"resize\", this.onWindowResize); // Call to properly set the breakpoint and resize the elements.\n // Note that if you're doing a full-width element, this can get a little wonky if a scrollbar\n // appears because of the grid. In that case, fire your own resize event, or set `overflow: scroll` on your body.\n\n this.onWindowResize();\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.mounted = false;\n window.removeEventListener(\"resize\", this.onWindowResize);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n measureBeforeMount = _this$props.measureBeforeMount,\n rest = _objectWithoutProperties(_this$props, [\"measureBeforeMount\"]);\n\n if (measureBeforeMount && !this.mounted) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: this.props.className,\n style: this.props.style\n });\n }\n\n return /*#__PURE__*/React.createElement(ComposedComponent, _extends({}, rest, this.state));\n }\n }]);\n\n return WidthProvider;\n }(React.Component), _defineProperty(_class, \"defaultProps\", {\n measureBeforeMount: false\n }), _defineProperty(_class, \"propTypes\", {\n // If true, will not render children until mounted. Useful for getting the exact width before\n // rendering, to prevent any unsightly resizing.\n measureBeforeMount: _propTypes.default.bool\n }), _temp;\n}","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","'use strict';\n\nvar resolve = require('./resolve')\n , util = require('./util')\n , errorClasses = require('./error_classes')\n , stableStringify = require('fast-json-stable-stringify');\n\nvar validateGenerator = require('../dotjs/validate');\n\n/**\n * Functions below are used inside compiled validations function\n */\n\nvar ucs2length = util.ucs2length;\nvar equal = require('fast-deep-equal');\n\n// this error is thrown by async schemas to return validation errors via exception\nvar ValidationError = errorClasses.Validation;\n\nmodule.exports = compile;\n\n\n/**\n * Compiles schema to validation function\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Object} root object with information about the root schema for this schema\n * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution\n * @param {String} baseId base ID for IDs in the schema\n * @return {Function} validation function\n */\nfunction compile(schema, root, localRefs, baseId) {\n /* jshint validthis: true, evil: true */\n /* eslint no-shadow: 0 */\n var self = this\n , opts = this._opts\n , refVal = [ undefined ]\n , refs = {}\n , patterns = []\n , patternsHash = {}\n , defaults = []\n , defaultsHash = {}\n , customRules = [];\n\n root = root || { schema: schema, refVal: refVal, refs: refs };\n\n var c = checkCompiling.call(this, schema, root, baseId);\n var compilation = this._compilations[c.index];\n if (c.compiling) return (compilation.callValidate = callValidate);\n\n var formats = this._formats;\n var RULES = this.RULES;\n\n try {\n var v = localCompile(schema, root, localRefs, baseId);\n compilation.validate = v;\n var cv = compilation.callValidate;\n if (cv) {\n cv.schema = v.schema;\n cv.errors = null;\n cv.refs = v.refs;\n cv.refVal = v.refVal;\n cv.root = v.root;\n cv.$async = v.$async;\n if (opts.sourceCode) cv.source = v.source;\n }\n return v;\n } finally {\n endCompiling.call(this, schema, root, baseId);\n }\n\n /* @this {*} - custom context, see passContext option */\n function callValidate() {\n /* jshint validthis: true */\n var validate = compilation.validate;\n var result = validate.apply(this, arguments);\n callValidate.errors = validate.errors;\n return result;\n }\n\n function localCompile(_schema, _root, localRefs, baseId) {\n var isRoot = !_root || (_root && _root.schema == _schema);\n if (_root.schema != root.schema)\n return compile.call(self, _schema, _root, localRefs, baseId);\n\n var $async = _schema.$async === true;\n\n var sourceCode = validateGenerator({\n isTop: true,\n schema: _schema,\n isRoot: isRoot,\n baseId: baseId,\n root: _root,\n schemaPath: '',\n errSchemaPath: '#',\n errorPath: '\"\"',\n MissingRefError: errorClasses.MissingRef,\n RULES: RULES,\n validate: validateGenerator,\n util: util,\n resolve: resolve,\n resolveRef: resolveRef,\n usePattern: usePattern,\n useDefault: useDefault,\n useCustomRule: useCustomRule,\n opts: opts,\n formats: formats,\n logger: self.logger,\n self: self\n });\n\n sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)\n + vars(defaults, defaultCode) + vars(customRules, customRuleCode)\n + sourceCode;\n\n if (opts.processCode) sourceCode = opts.processCode(sourceCode);\n // console.log('\\n\\n\\n *** \\n', JSON.stringify(sourceCode));\n var validate;\n try {\n var makeValidate = new Function(\n 'self',\n 'RULES',\n 'formats',\n 'root',\n 'refVal',\n 'defaults',\n 'customRules',\n 'equal',\n 'ucs2length',\n 'ValidationError',\n sourceCode\n );\n\n validate = makeValidate(\n self,\n RULES,\n formats,\n root,\n refVal,\n defaults,\n customRules,\n equal,\n ucs2length,\n ValidationError\n );\n\n refVal[0] = validate;\n } catch(e) {\n self.logger.error('Error compiling schema, function code:', sourceCode);\n throw e;\n }\n\n validate.schema = _schema;\n validate.errors = null;\n validate.refs = refs;\n validate.refVal = refVal;\n validate.root = isRoot ? validate : _root;\n if ($async) validate.$async = true;\n if (opts.sourceCode === true) {\n validate.source = {\n code: sourceCode,\n patterns: patterns,\n defaults: defaults\n };\n }\n\n return validate;\n }\n\n function resolveRef(baseId, ref, isRoot) {\n ref = resolve.url(baseId, ref);\n var refIndex = refs[ref];\n var _refVal, refCode;\n if (refIndex !== undefined) {\n _refVal = refVal[refIndex];\n refCode = 'refVal[' + refIndex + ']';\n return resolvedRef(_refVal, refCode);\n }\n if (!isRoot && root.refs) {\n var rootRefId = root.refs[ref];\n if (rootRefId !== undefined) {\n _refVal = root.refVal[rootRefId];\n refCode = addLocalRef(ref, _refVal);\n return resolvedRef(_refVal, refCode);\n }\n }\n\n refCode = addLocalRef(ref);\n var v = resolve.call(self, localCompile, root, ref);\n if (v === undefined) {\n var localSchema = localRefs && localRefs[ref];\n if (localSchema) {\n v = resolve.inlineRef(localSchema, opts.inlineRefs)\n ? localSchema\n : compile.call(self, localSchema, root, localRefs, baseId);\n }\n }\n\n if (v === undefined) {\n removeLocalRef(ref);\n } else {\n replaceLocalRef(ref, v);\n return resolvedRef(v, refCode);\n }\n }\n\n function addLocalRef(ref, v) {\n var refId = refVal.length;\n refVal[refId] = v;\n refs[ref] = refId;\n return 'refVal' + refId;\n }\n\n function removeLocalRef(ref) {\n delete refs[ref];\n }\n\n function replaceLocalRef(ref, v) {\n var refId = refs[ref];\n refVal[refId] = v;\n }\n\n function resolvedRef(refVal, code) {\n return typeof refVal == 'object' || typeof refVal == 'boolean'\n ? { code: code, schema: refVal, inline: true }\n : { code: code, $async: refVal && !!refVal.$async };\n }\n\n function usePattern(regexStr) {\n var index = patternsHash[regexStr];\n if (index === undefined) {\n index = patternsHash[regexStr] = patterns.length;\n patterns[index] = regexStr;\n }\n return 'pattern' + index;\n }\n\n function useDefault(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n return '' + value;\n case 'string':\n return util.toQuotedString(value);\n case 'object':\n if (value === null) return 'null';\n var valueStr = stableStringify(value);\n var index = defaultsHash[valueStr];\n if (index === undefined) {\n index = defaultsHash[valueStr] = defaults.length;\n defaults[index] = value;\n }\n return 'default' + index;\n }\n }\n\n function useCustomRule(rule, schema, parentSchema, it) {\n if (self._opts.validateSchema !== false) {\n var deps = rule.definition.dependencies;\n if (deps && !deps.every(function(keyword) {\n return Object.prototype.hasOwnProperty.call(parentSchema, keyword);\n }))\n throw new Error('parent schema must have all required keywords: ' + deps.join(','));\n\n var validateSchema = rule.definition.validateSchema;\n if (validateSchema) {\n var valid = validateSchema(schema);\n if (!valid) {\n var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);\n if (self._opts.validateSchema == 'log') self.logger.error(message);\n else throw new Error(message);\n }\n }\n }\n\n var compile = rule.definition.compile\n , inline = rule.definition.inline\n , macro = rule.definition.macro;\n\n var validate;\n if (compile) {\n validate = compile.call(self, schema, parentSchema, it);\n } else if (macro) {\n validate = macro.call(self, schema, parentSchema, it);\n if (opts.validateSchema !== false) self.validateSchema(validate, true);\n } else if (inline) {\n validate = inline.call(self, it, rule.keyword, schema, parentSchema);\n } else {\n validate = rule.definition.validate;\n if (!validate) return;\n }\n\n if (validate === undefined)\n throw new Error('custom keyword \"' + rule.keyword + '\"failed to compile');\n\n var index = customRules.length;\n customRules[index] = validate;\n\n return {\n code: 'customRule' + index,\n validate: validate\n };\n }\n}\n\n\n/**\n * Checks if the schema is currently compiled\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n * @return {Object} object with properties \"index\" (compilation index) and \"compiling\" (boolean)\n */\nfunction checkCompiling(schema, root, baseId) {\n /* jshint validthis: true */\n var index = compIndex.call(this, schema, root, baseId);\n if (index >= 0) return { index: index, compiling: true };\n index = this._compilations.length;\n this._compilations[index] = {\n schema: schema,\n root: root,\n baseId: baseId\n };\n return { index: index, compiling: false };\n}\n\n\n/**\n * Removes the schema from the currently compiled list\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n */\nfunction endCompiling(schema, root, baseId) {\n /* jshint validthis: true */\n var i = compIndex.call(this, schema, root, baseId);\n if (i >= 0) this._compilations.splice(i, 1);\n}\n\n\n/**\n * Index of schema compilation in the currently compiled list\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n * @return {Integer} compilation index\n */\nfunction compIndex(schema, root, baseId) {\n /* jshint validthis: true */\n for (var i=0; i<this._compilations.length; i++) {\n var c = this._compilations[i];\n if (c.schema == schema && c.root == root && c.baseId == baseId) return i;\n }\n return -1;\n}\n\n\nfunction patternCode(i, patterns) {\n return 'var pattern' + i + ' = new RegExp(' + util.toQuotedString(patterns[i]) + ');';\n}\n\n\nfunction defaultCode(i) {\n return 'var default' + i + ' = defaults[' + i + '];';\n}\n\n\nfunction refValCode(i, refVal) {\n return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];';\n}\n\n\nfunction customRuleCode(i) {\n return 'var customRule' + i + ' = customRules[' + i + '];';\n}\n\n\nfunction vars(arr, statement) {\n if (!arr.length) return '';\n var code = '';\n for (var i=0; i<arr.length; i++)\n code += statement(i, arr);\n return code;\n}\n","import 'array-flat-polyfill';\nimport { default as clone_ } from 'clone';\nimport deepEqual_ from 'fast-deep-equal';\nimport stableStringify from 'fast-json-stable-stringify';\nimport { hasOwnProperty, isNumber, isString, splitAccessPath, stringValue, writeConfig } from 'vega-util';\nimport { isLogicalAnd, isLogicalNot, isLogicalOr } from './logical';\nexport const deepEqual = deepEqual_;\nexport const duplicate = clone_;\n/**\n * Creates an object composed of the picked object properties.\n *\n * var object = {'a': 1, 'b': '2', 'c': 3};\n * pick(object, ['a', 'c']);\n * // → {'a': 1, 'c': 3}\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function pick(obj, props) {\n const copy = {};\n for (const prop of props) {\n if (hasOwnProperty(obj, prop)) {\n copy[prop] = obj[prop];\n }\n }\n return copy;\n}\n/**\n * The opposite of _.pick; this method creates an object composed of the own\n * and inherited enumerable string keyed properties of object that are not omitted.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function omit(obj, props) {\n const copy = Object.assign({}, obj);\n for (const prop of props) {\n delete copy[prop];\n }\n return copy;\n}\n/**\n * Monkey patch Set so that `stringify` produces a string representation of sets.\n */\nSet.prototype['toJSON'] = function () {\n return `Set(${[...this].map(x => stableStringify(x)).join(',')})`;\n};\n/**\n * Converts any object to a string representation that can be consumed by humans.\n */\nexport const stringify = stableStringify;\n/**\n * Converts any object to a string of limited size, or a number.\n */\nexport function hash(a) {\n if (isNumber(a)) {\n return a;\n }\n const str = isString(a) ? a : stableStringify(a);\n // short strings can be used as hash directly, longer strings are hashed to reduce memory usage\n if (str.length < 250) {\n return str;\n }\n // from http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/\n let h = 0;\n for (let i = 0; i < str.length; i++) {\n const char = str.charCodeAt(i);\n h = (h << 5) - h + char;\n h = h & h; // Convert to 32bit integer\n }\n return h;\n}\nexport function isNullOrFalse(x) {\n return x === false || x === null;\n}\nexport function contains(array, item) {\n return array.includes(item);\n}\n/**\n * Returns true if any item returns true.\n */\nexport function some(arr, f) {\n let i = 0;\n for (const [k, a] of arr.entries()) {\n if (f(a, k, i++)) {\n return true;\n }\n }\n return false;\n}\n/**\n * Returns true if all items return true.\n */\nexport function every(arr, f) {\n let i = 0;\n for (const [k, a] of arr.entries()) {\n if (!f(a, k, i++)) {\n return false;\n }\n }\n return true;\n}\n/**\n * recursively merges src into dest\n */\nexport function mergeDeep(dest, ...src) {\n for (const s of src) {\n deepMerge_(dest, s !== null && s !== void 0 ? s : {});\n }\n return dest;\n}\nfunction deepMerge_(dest, src) {\n for (const property of keys(src)) {\n writeConfig(dest, property, src[property], true);\n }\n}\nexport function unique(values, f) {\n const results = [];\n const u = {};\n let v;\n for (const val of values) {\n v = f(val);\n if (v in u) {\n continue;\n }\n u[v] = 1;\n results.push(val);\n }\n return results;\n}\n/**\n * Returns true if the two dictionaries disagree. Applies only to defined values.\n */\nexport function isEqual(dict, other) {\n const dictKeys = keys(dict);\n const otherKeys = keys(other);\n if (dictKeys.length !== otherKeys.length) {\n return false;\n }\n for (const key of dictKeys) {\n if (dict[key] !== other[key]) {\n return false;\n }\n }\n return true;\n}\nexport function setEqual(a, b) {\n if (a.size !== b.size) {\n return false;\n }\n for (const e of a) {\n if (!b.has(e)) {\n return false;\n }\n }\n return true;\n}\nexport function hasIntersection(a, b) {\n for (const key of a) {\n if (b.has(key)) {\n return true;\n }\n }\n return false;\n}\nexport function prefixGenerator(a) {\n const prefixes = new Set();\n for (const x of a) {\n const splitField = splitAccessPath(x);\n // Wrap every element other than the first in `[]`\n const wrappedWithAccessors = splitField.map((y, i) => (i === 0 ? y : `[${y}]`));\n const computedPrefixes = wrappedWithAccessors.map((_, i) => wrappedWithAccessors.slice(0, i + 1).join(''));\n for (const y of computedPrefixes) {\n prefixes.add(y);\n }\n }\n return prefixes;\n}\n/**\n * Returns true if a and b have an intersection. Also return true if a or b are undefined\n * since this means we don't know what fields a node produces or depends on.\n */\nexport function fieldIntersection(a, b) {\n if (a === undefined || b === undefined) {\n return true;\n }\n return hasIntersection(prefixGenerator(a), prefixGenerator(b));\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isEmpty(obj) {\n return keys(obj).length === 0;\n}\n// This is a stricter version of Object.keys but with better types. See https://github.com/Microsoft/TypeScript/pull/12253#issuecomment-263132208\nexport const keys = Object.keys;\nexport const vals = Object.values;\nexport const entries = Object.entries;\nexport function isBoolean(b) {\n return b === true || b === false;\n}\n/**\n * Convert a string into a valid variable name\n */\nexport function varName(s) {\n // Replace non-alphanumeric characters (anything besides a-zA-Z0-9_) with _\n const alphanumericS = s.replace(/\\W/g, '_');\n // Add _ if the string has leading numbers.\n return (s.match(/^\\d+/) ? '_' : '') + alphanumericS;\n}\nexport function logicalExpr(op, cb) {\n if (isLogicalNot(op)) {\n return `!(${logicalExpr(op.not, cb)})`;\n }\n else if (isLogicalAnd(op)) {\n return `(${op.and.map((and) => logicalExpr(and, cb)).join(') && (')})`;\n }\n else if (isLogicalOr(op)) {\n return `(${op.or.map((or) => logicalExpr(or, cb)).join(') || (')})`;\n }\n else {\n return cb(op);\n }\n}\n/**\n * Delete nested property of an object, and delete the ancestors of the property if they become empty.\n */\nexport function deleteNestedProperty(obj, orderedProps) {\n if (orderedProps.length === 0) {\n return true;\n }\n const prop = orderedProps.shift(); // eslint-disable-line @typescript-eslint/no-non-null-assertion\n if (prop in obj && deleteNestedProperty(obj[prop], orderedProps)) {\n delete obj[prop];\n }\n return isEmpty(obj);\n}\nexport function titleCase(s) {\n return s.charAt(0).toUpperCase() + s.substr(1);\n}\n/**\n * Converts a path to an access path with datum.\n * @param path The field name.\n * @param datum The string to use for `datum`.\n */\nexport function accessPathWithDatum(path, datum = 'datum') {\n const pieces = splitAccessPath(path);\n const prefixes = [];\n for (let i = 1; i <= pieces.length; i++) {\n const prefix = `[${pieces.slice(0, i).map(stringValue).join('][')}]`;\n prefixes.push(`${datum}${prefix}`);\n }\n return prefixes.join(' && ');\n}\n/**\n * Return access with datum to the flattened field.\n *\n * @param path The field name.\n * @param datum The string to use for `datum`.\n */\nexport function flatAccessWithDatum(path, datum = 'datum') {\n return `${datum}[${stringValue(splitAccessPath(path).join('.'))}]`;\n}\nfunction escapePathAccess(string) {\n return string.replace(/(\\[|\\]|\\.|'|\")/g, '\\\\$1');\n}\n/**\n * Replaces path accesses with access to non-nested field.\n * For example, `foo[\"bar\"].baz` becomes `foo\\\\.bar\\\\.baz`.\n */\nexport function replacePathInField(path) {\n return `${splitAccessPath(path).map(escapePathAccess).join('\\\\.')}`;\n}\n/**\n * Replace all occurrences of a string with another string.\n *\n * @param string the string to replace in\n * @param find the string to replace\n * @param replacement the replacement\n */\nexport function replaceAll(string, find, replacement) {\n return string.replace(new RegExp(find.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'g'), replacement);\n}\n/**\n * Remove path accesses with access from field.\n * For example, `foo[\"bar\"].baz` becomes `foo.bar.baz`.\n */\nexport function removePathFromField(path) {\n return `${splitAccessPath(path).join('.')}`;\n}\n/**\n * Count the depth of the path. Returns 1 for fields that are not nested.\n */\nexport function accessPathDepth(path) {\n if (!path) {\n return 0;\n }\n return splitAccessPath(path).length;\n}\n/**\n * This is a replacement for chained || for numeric properties or properties that respect null so that 0 will be included.\n */\nexport function getFirstDefined(...args) {\n for (const arg of args) {\n if (arg !== undefined) {\n return arg;\n }\n }\n return undefined;\n}\n// variable used to generate id\nlet idCounter = 42;\n/**\n * Returns a new random id every time it gets called.\n *\n * Has side effect!\n */\nexport function uniqueId(prefix) {\n const id = ++idCounter;\n return prefix ? String(prefix) + id : id;\n}\n/**\n * Resets the id counter used in uniqueId. This can be useful for testing.\n */\nexport function resetIdCounter() {\n idCounter = 42;\n}\nexport function internalField(name) {\n return isInternalField(name) ? name : `__${name}`;\n}\nexport function isInternalField(name) {\n return name.startsWith('__');\n}\n/**\n * Normalize angle to be within [0,360).\n */\nexport function normalizeAngle(angle) {\n if (angle === undefined) {\n return undefined;\n }\n return ((angle % 360) + 360) % 360;\n}\n/**\n * Returns whether the passed in value is a valid number.\n */\nexport function isNumeric(value) {\n if (isNumber(value)) {\n return true;\n }\n return !isNaN(value) && !isNaN(parseFloat(value));\n}\n//# sourceMappingURL=util.js.map","import { URIRegExps } from \"./uri\";\nimport { merge, subexp } from \"./util\";\n\nexport function buildExps(isIRI:boolean):URIRegExps {\n\tconst\n\t\tALPHA$$ = \"[A-Za-z]\",\n\t\tCR$ = \"[\\\\x0D]\",\n\t\tDIGIT$$ = \"[0-9]\",\n\t\tDQUOTE$$ = \"[\\\\x22]\",\n\t\tHEXDIG$$ = merge(DIGIT$$, \"[A-Fa-f]\"), //case-insensitive\n\t\tLF$$ = \"[\\\\x0A]\",\n\t\tSP$$ = \"[\\\\x20]\",\n\t\tPCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)), //expanded\n\t\tGEN_DELIMS$$ = \"[\\\\:\\\\/\\\\?\\\\#\\\\[\\\\]\\\\@]\",\n\t\tSUB_DELIMS$$ = \"[\\\\!\\\\$\\\\&\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\=]\",\n\t\tRESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),\n\t\tUCSCHAR$$ = isIRI ? \"[\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF]\" : \"[]\", //subset, excludes bidi control characters\n\t\tIPRIVATE$$ = isIRI ? \"[\\\\uE000-\\\\uF8FF]\" : \"[]\", //subset\n\t\tUNRESERVED$$ = merge(ALPHA$$, DIGIT$$, \"[\\\\-\\\\.\\\\_\\\\~]\", UCSCHAR$$),\n\t\tSCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\") + \"*\"),\n\t\tUSERINFO$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\")) + \"*\"),\n\t\tDEC_OCTET$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"[1-9]\" + DIGIT$$) + \"|\" + DIGIT$$),\n\t\tDEC_OCTET_RELAXED$ = subexp(subexp(\"25[0-5]\") + \"|\" + subexp(\"2[0-4]\" + DIGIT$$) + \"|\" + subexp(\"1\" + DIGIT$$ + DIGIT$$) + \"|\" + subexp(\"0?[1-9]\" + DIGIT$$) + \"|0?0?\" + DIGIT$$), //relaxed parsing rules\n\t\tIPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$ + \"\\\\.\" + DEC_OCTET_RELAXED$),\n\t\tH16$ = subexp(HEXDIG$$ + \"{1,4}\"),\n\t\tLS32$ = subexp(subexp(H16$ + \"\\\\:\" + H16$) + \"|\" + IPV4ADDRESS$),\n\t\tIPV6ADDRESS1$ = subexp( subexp(H16$ + \"\\\\:\") + \"{6}\" + LS32$), // 6( h16 \":\" ) ls32\n\t\tIPV6ADDRESS2$ = subexp( \"\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{5}\" + LS32$), // \"::\" 5( h16 \":\" ) ls32\n\t\tIPV6ADDRESS3$ = subexp(subexp( H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{4}\" + LS32$), //[ h16 ] \"::\" 4( h16 \":\" ) ls32\n\t\tIPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,1}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{3}\" + LS32$), //[ *1( h16 \":\" ) h16 ] \"::\" 3( h16 \":\" ) ls32\n\t\tIPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,2}\" + H16$) + \"?\\\\:\\\\:\" + subexp(H16$ + \"\\\\:\") + \"{2}\" + LS32$), //[ *2( h16 \":\" ) h16 ] \"::\" 2( h16 \":\" ) ls32\n\t\tIPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,3}\" + H16$) + \"?\\\\:\\\\:\" + H16$ + \"\\\\:\" + LS32$), //[ *3( h16 \":\" ) h16 ] \"::\" h16 \":\" ls32\n\t\tIPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,4}\" + H16$) + \"?\\\\:\\\\:\" + LS32$), //[ *4( h16 \":\" ) h16 ] \"::\" ls32\n\t\tIPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,5}\" + H16$) + \"?\\\\:\\\\:\" + H16$ ), //[ *5( h16 \":\" ) h16 ] \"::\" h16\n\t\tIPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + \"\\\\:\") + \"{0,6}\" + H16$) + \"?\\\\:\\\\:\" ), //[ *6( h16 \":\" ) h16 ] \"::\"\n\t\tIPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join(\"|\")),\n\t\tZONEID$ = subexp(subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$) + \"+\"), //RFC 6874\n\t\tIPV6ADDRZ$ = subexp(IPV6ADDRESS$ + \"\\\\%25\" + ZONEID$), //RFC 6874\n\t\tIPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + ZONEID$), //RFC 6874, with relaxed parsing rules\n\t\tIPVFUTURE$ = subexp(\"[vV]\" + HEXDIG$$ + \"+\\\\.\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:]\") + \"+\"),\n\t\tIP_LITERAL$ = subexp(\"\\\\[\" + subexp(IPV6ADDRZ_RELAXED$ + \"|\" + IPV6ADDRESS$ + \"|\" + IPVFUTURE$) + \"\\\\]\"), //RFC 6874\n\t\tREG_NAME$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$)) + \"*\"),\n\t\tHOST$ = subexp(IP_LITERAL$ + \"|\" + IPV4ADDRESS$ + \"(?!\" + REG_NAME$ + \")\" + \"|\" + REG_NAME$),\n\t\tPORT$ = subexp(DIGIT$$ + \"*\"),\n\t\tAUTHORITY$ = subexp(subexp(USERINFO$ + \"@\") + \"?\" + HOST$ + subexp(\"\\\\:\" + PORT$) + \"?\"),\n\t\tPCHAR$ = subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@]\")),\n\t\tSEGMENT$ = subexp(PCHAR$ + \"*\"),\n\t\tSEGMENT_NZ$ = subexp(PCHAR$ + \"+\"),\n\t\tSEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + \"|\" + merge(UNRESERVED$$, SUB_DELIMS$$, \"[\\\\@]\")) + \"+\"),\n\t\tPATH_ABEMPTY$ = subexp(subexp(\"\\\\/\" + SEGMENT$) + \"*\"),\n\t\tPATH_ABSOLUTE$ = subexp(\"\\\\/\" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + \"?\"), //simplified\n\t\tPATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified\n\t\tPATH_EMPTY$ = \"(?!\" + PCHAR$ + \")\",\n\t\tPATH$ = subexp(PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tQUERY$ = subexp(subexp(PCHAR$ + \"|\" + merge(\"[\\\\/\\\\?]\", IPRIVATE$$)) + \"*\"),\n\t\tFRAGMENT$ = subexp(subexp(PCHAR$ + \"|[\\\\/\\\\?]\") + \"*\"),\n\t\tHIER_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$),\n\t\tURI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tRELATIVE_PART$ = subexp(subexp(\"\\\\/\\\\/\" + AUTHORITY$ + PATH_ABEMPTY$) + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$),\n\t\tRELATIVE$ = subexp(RELATIVE_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\" + subexp(\"\\\\#\" + FRAGMENT$) + \"?\"),\n\t\tURI_REFERENCE$ = subexp(URI$ + \"|\" + RELATIVE$),\n\t\tABSOLUTE_URI$ = subexp(SCHEME$ + \"\\\\:\" + HIER_PART$ + subexp(\"\\\\?\" + QUERY$) + \"?\"),\n\n\t\tGENERIC_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tRELATIVE_REF$ = \"^(){0}\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_NOSCHEME$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tABSOLUTE_REF$ = \"^(\" + SCHEME$ + \")\\\\:\" + subexp(subexp(\"\\\\/\\\\/(\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?)\") + \"?(\" + PATH_ABEMPTY$ + \"|\" + PATH_ABSOLUTE$ + \"|\" + PATH_ROOTLESS$ + \"|\" + PATH_EMPTY$ + \")\") + subexp(\"\\\\?(\" + QUERY$ + \")\") + \"?$\",\n\t\tSAMEDOC_REF$ = \"^\" + subexp(\"\\\\#(\" + FRAGMENT$ + \")\") + \"?$\",\n\t\tAUTHORITY_REF$ = \"^\" + subexp(\"(\" + USERINFO$ + \")@\") + \"?(\" + HOST$ + \")\" + subexp(\"\\\\:(\" + PORT$ + \")\") + \"?$\"\n\t;\n\n\treturn {\n\t\tNOT_SCHEME : new RegExp(merge(\"[^]\", ALPHA$$, DIGIT$$, \"[\\\\+\\\\-\\\\.]\"), \"g\"),\n\t\tNOT_USERINFO : new RegExp(merge(\"[^\\\\%\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_HOST : new RegExp(merge(\"[^\\\\%\\\\[\\\\]\\\\:]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH : new RegExp(merge(\"[^\\\\%\\\\/\\\\:\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_PATH_NOSCHEME : new RegExp(merge(\"[^\\\\%\\\\/\\\\@]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tNOT_QUERY : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\", IPRIVATE$$), \"g\"),\n\t\tNOT_FRAGMENT : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, SUB_DELIMS$$, \"[\\\\:\\\\@\\\\/\\\\?]\"), \"g\"),\n\t\tESCAPE : new RegExp(merge(\"[^]\", UNRESERVED$$, SUB_DELIMS$$), \"g\"),\n\t\tUNRESERVED : new RegExp(UNRESERVED$$, \"g\"),\n\t\tOTHER_CHARS : new RegExp(merge(\"[^\\\\%]\", UNRESERVED$$, RESERVED$$), \"g\"),\n\t\tPCT_ENCODED : new RegExp(PCT_ENCODED$, \"g\"),\n\t\tIPV4ADDRESS : new RegExp(\"^(\" + IPV4ADDRESS$ + \")$\"),\n\t\tIPV6ADDRESS : new RegExp(\"^\\\\[?(\" + IPV6ADDRESS$ + \")\" + subexp(subexp(\"\\\\%25|\\\\%(?!\" + HEXDIG$$ + \"{2})\") + \"(\" + ZONEID$ + \")\") + \"?\\\\]?$\") //RFC 6874, with relaxed parsing rules\n\t};\n}\n\nexport default buildExps(false);\n","import { URIRegExps } from \"./uri\";\nimport { buildExps } from \"./regexps-uri\";\n\nexport default buildExps(true);\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport default punycode;\n","/**\n * URI.js\n *\n * @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.\n * @author <a href=\"mailto:gary.court@gmail.com\">Gary Court</a>\n * @see http://github.com/garycourt/uri-js\n */\n\n/**\n * Copyright 2011 Gary Court. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without modification, are\n * permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n *\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list\n * of conditions and the following disclaimer in the documentation and/or other materials\n * provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED\n * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * The views and conclusions contained in the software and documentation are those of the\n * authors and should not be interpreted as representing official policies, either expressed\n * or implied, of Gary Court.\n */\n\nimport URI_PROTOCOL from \"./regexps-uri\";\nimport IRI_PROTOCOL from \"./regexps-iri\";\nimport punycode from \"punycode\";\nimport { toUpperCase, typeOf, assign } from \"./util\";\n\nexport interface URIComponents {\n\tscheme?:string;\n\tuserinfo?:string;\n\thost?:string;\n\tport?:number|string;\n\tpath?:string;\n\tquery?:string;\n\tfragment?:string;\n\treference?:string;\n\terror?:string;\n}\n\nexport interface URIOptions {\n\tscheme?:string;\n\treference?:string;\n\ttolerant?:boolean;\n\tabsolutePath?:boolean;\n\tiri?:boolean;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n}\n\nexport interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {\n\tscheme:string;\n\tparse(components:ParentComponents, options:Options):Components;\n\tserialize(components:Components, options:Options):ParentComponents;\n\tunicodeSupport?:boolean;\n\tdomainHost?:boolean;\n\tabsolutePath?:boolean;\n}\n\nexport interface URIRegExps {\n\tNOT_SCHEME : RegExp,\n\tNOT_USERINFO : RegExp,\n\tNOT_HOST : RegExp,\n\tNOT_PATH : RegExp,\n\tNOT_PATH_NOSCHEME : RegExp,\n\tNOT_QUERY : RegExp,\n\tNOT_FRAGMENT : RegExp,\n\tESCAPE : RegExp,\n\tUNRESERVED : RegExp,\n\tOTHER_CHARS : RegExp,\n\tPCT_ENCODED : RegExp,\n\tIPV4ADDRESS : RegExp,\n\tIPV6ADDRESS : RegExp,\n}\n\nexport const SCHEMES:{[scheme:string]:URISchemeHandler} = {};\n\nexport function pctEncChar(chr:string):string {\n\tconst c = chr.charCodeAt(0);\n\tlet e:string;\n\n\tif (c < 16) e = \"%0\" + c.toString(16).toUpperCase();\n\telse if (c < 128) e = \"%\" + c.toString(16).toUpperCase();\n\telse if (c < 2048) e = \"%\" + ((c >> 6) | 192).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\telse e = \"%\" + ((c >> 12) | 224).toString(16).toUpperCase() + \"%\" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + \"%\" + ((c & 63) | 128).toString(16).toUpperCase();\n\n\treturn e;\n}\n\nexport function pctDecChars(str:string):string {\n\tlet newStr = \"\";\n\tlet i = 0;\n\tconst il = str.length;\n\n\twhile (i < il) {\n\t\tconst c = parseInt(str.substr(i + 1, 2), 16);\n\n\t\tif (c < 128) {\n\t\t\tnewStr += String.fromCharCode(c);\n\t\t\ti += 3;\n\t\t}\n\t\telse if (c >= 194 && c < 224) {\n\t\t\tif ((il - i) >= 6) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 6);\n\t\t\t}\n\t\t\ti += 6;\n\t\t}\n\t\telse if (c >= 224) {\n\t\t\tif ((il - i) >= 9) {\n\t\t\t\tconst c2 = parseInt(str.substr(i + 4, 2), 16);\n\t\t\t\tconst c3 = parseInt(str.substr(i + 7, 2), 16);\n\t\t\t\tnewStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\n\t\t\t} else {\n\t\t\t\tnewStr += str.substr(i, 9);\n\t\t\t}\n\t\t\ti += 9;\n\t\t}\n\t\telse {\n\t\t\tnewStr += str.substr(i, 3);\n\t\t\ti += 3;\n\t\t}\n\t}\n\n\treturn newStr;\n}\n\nfunction _normalizeComponentEncoding(components:URIComponents, protocol:URIRegExps) {\n\tfunction decodeUnreserved(str:string):string {\n\t\tconst decStr = pctDecChars(str);\n\t\treturn (!decStr.match(protocol.UNRESERVED) ? str : decStr);\n\t}\n\n\tif (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, \"\");\n\tif (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\tif (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);\n\n\treturn components;\n};\n\nfunction _stripLeadingZeros(str:string):string {\n\treturn str.replace(/^0*(.*)/, \"$1\") || \"0\";\n}\n\nfunction _normalizeIPv4(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV4ADDRESS) || [];\n\tconst [, address] = matches;\n\t\n\tif (address) {\n\t\treturn address.split(\".\").map(_stripLeadingZeros).join(\".\");\n\t} else {\n\t\treturn host;\n\t}\n}\n\nfunction _normalizeIPv6(host:string, protocol:URIRegExps):string {\n\tconst matches = host.match(protocol.IPV6ADDRESS) || [];\n\tconst [, address, zone] = matches;\n\n\tif (address) {\n\t\tconst [last, first] = address.toLowerCase().split('::').reverse();\n\t\tconst firstFields = first ? first.split(\":\").map(_stripLeadingZeros) : [];\n\t\tconst lastFields = last.split(\":\").map(_stripLeadingZeros);\n\t\tconst isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);\n\t\tconst fieldCount = isLastFieldIPv4Address ? 7 : 8;\n\t\tconst lastFieldsStart = lastFields.length - fieldCount;\n\t\tconst fields = Array<string>(fieldCount);\n\n\t\tfor (let x = 0; x < fieldCount; ++x) {\n\t\t\tfields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';\n\t\t}\n\n\t\tif (isLastFieldIPv4Address) {\n\t\t\tfields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);\n\t\t}\n\n\t\tconst allZeroFields = fields.reduce<Array<{index:number,length:number}>>((acc, field, index) => {\n\t\t\tif (!field || field === \"0\") {\n\t\t\t\tconst lastLongest = acc[acc.length - 1];\n\t\t\t\tif (lastLongest && lastLongest.index + lastLongest.length === index) {\n\t\t\t\t\tlastLongest.length++;\n\t\t\t\t} else {\n\t\t\t\t\tacc.push({ index, length : 1 });\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, []);\n\n\t\tconst longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];\n\n\t\tlet newHost:string;\n\t\tif (longestZeroFields && longestZeroFields.length > 1) {\n\t\t\tconst newFirst = fields.slice(0, longestZeroFields.index) ;\n\t\t\tconst newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);\n\t\t\tnewHost = newFirst.join(\":\") + \"::\" + newLast.join(\":\");\n\t\t} else {\n\t\t\tnewHost = fields.join(\":\");\n\t\t}\n\n\t\tif (zone) {\n\t\t\tnewHost += \"%\" + zone;\n\t\t}\n\n\t\treturn newHost;\n\t} else {\n\t\treturn host;\n\t}\n}\n\nconst URI_PARSE = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:([^\\/?#@]*)@)?(\\[[^\\/?#\\]]+\\]|[^\\/?#:]*)(?:\\:(\\d*))?))?([^?#]*)(?:\\?([^#]*))?(?:#((?:.|\\n|\\r)*))?/i;\nconst NO_MATCH_IS_UNDEFINED = (<RegExpMatchArray>(\"\").match(/(){0}/))[1] === undefined;\n\nexport function parse(uriString:string, options:URIOptions = {}):URIComponents {\n\tconst components:URIComponents = {};\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\n\tif (options.reference === \"suffix\") uriString = (options.scheme ? options.scheme + \":\" : \"\") + \"//\" + uriString;\n\n\tconst matches = uriString.match(URI_PARSE);\n\n\tif (matches) {\n\t\tif (NO_MATCH_IS_UNDEFINED) {\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1];\n\t\t\tcomponents.userinfo = matches[3];\n\t\t\tcomponents.host = matches[4];\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = matches[7];\n\t\t\tcomponents.fragment = matches[8];\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = matches[5];\n\t\t\t}\n\t\t} else { //IE FIX for improper RegExp matching\n\t\t\t//store each component\n\t\t\tcomponents.scheme = matches[1] || undefined;\n\t\t\tcomponents.userinfo = (uriString.indexOf(\"@\") !== -1 ? matches[3] : undefined);\n\t\t\tcomponents.host = (uriString.indexOf(\"//\") !== -1 ? matches[4] : undefined);\n\t\t\tcomponents.port = parseInt(matches[5], 10);\n\t\t\tcomponents.path = matches[6] || \"\";\n\t\t\tcomponents.query = (uriString.indexOf(\"?\") !== -1 ? matches[7] : undefined);\n\t\t\tcomponents.fragment = (uriString.indexOf(\"#\") !== -1 ? matches[8] : undefined);\n\n\t\t\t//fix port number\n\t\t\tif (isNaN(components.port)) {\n\t\t\t\tcomponents.port = (uriString.match(/\\/\\/(?:.|\\n)*\\:(?:\\/|\\?|\\#|$)/) ? matches[4] : undefined);\n\t\t\t}\n\t\t}\n\n\t\tif (components.host) {\n\t\t\t//normalize IP hosts\n\t\t\tcomponents.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);\n\t\t}\n\n\t\t//determine reference type\n\t\tif (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {\n\t\t\tcomponents.reference = \"same-document\";\n\t\t} else if (components.scheme === undefined) {\n\t\t\tcomponents.reference = \"relative\";\n\t\t} else if (components.fragment === undefined) {\n\t\t\tcomponents.reference = \"absolute\";\n\t\t} else {\n\t\t\tcomponents.reference = \"uri\";\n\t\t}\n\n\t\t//check for reference errors\n\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== components.reference) {\n\t\t\tcomponents.error = components.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t}\n\n\t\t//find scheme handler\n\t\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t\t//check if scheme can't handle IRIs\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {\n\t\t\t//if host component is a domain name\n\t\t\tif (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\tcomponents.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//convert IRI -> URI\n\t\t\t_normalizeComponentEncoding(components, URI_PROTOCOL);\n\t\t} else {\n\t\t\t//normalize encodings\n\t\t\t_normalizeComponentEncoding(components, protocol);\n\t\t}\n\n\t\t//perform scheme specific parsing\n\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\tschemeHandler.parse(components, options);\n\t\t}\n\t} else {\n\t\tcomponents.error = components.error || \"URI can not be parsed.\";\n\t}\n\n\treturn components;\n};\n\nfunction _recomposeAuthority(components:URIComponents, options:URIOptions):string|undefined {\n\tconst protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array<string> = [];\n\n\tif (components.userinfo !== undefined) {\n\t\turiTokens.push(components.userinfo);\n\t\turiTokens.push(\"@\");\n\t}\n\n\tif (components.host !== undefined) {\n\t\t//normalize IP hosts, add brackets and escape zone separator for IPv6\n\t\turiTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => \"[\" + $1 + ($2 ? \"%25\" + $2 : \"\") + \"]\"));\n\t}\n\n\tif (typeof components.port === \"number\") {\n\t\turiTokens.push(\":\");\n\t\turiTokens.push(components.port.toString(10));\n\t}\n\n\treturn uriTokens.length ? uriTokens.join(\"\") : undefined;\n};\n\nconst RDS1 = /^\\.\\.?\\//;\nconst RDS2 = /^\\/\\.(\\/|$)/;\nconst RDS3 = /^\\/\\.\\.(\\/|$)/;\nconst RDS4 = /^\\.\\.?$/;\nconst RDS5 = /^\\/?(?:.|\\n)*?(?=\\/|$)/;\n\nexport function removeDotSegments(input:string):string {\n\tconst output:Array<string> = [];\n\n\twhile (input.length) {\n\t\tif (input.match(RDS1)) {\n\t\t\tinput = input.replace(RDS1, \"\");\n\t\t} else if (input.match(RDS2)) {\n\t\t\tinput = input.replace(RDS2, \"/\");\n\t\t} else if (input.match(RDS3)) {\n\t\t\tinput = input.replace(RDS3, \"/\");\n\t\t\toutput.pop();\n\t\t} else if (input === \".\" || input === \"..\") {\n\t\t\tinput = \"\";\n\t\t} else {\n\t\t\tconst im = input.match(RDS5);\n\t\t\tif (im) {\n\t\t\t\tconst s = im[0];\n\t\t\t\tinput = input.slice(s.length);\n\t\t\t\toutput.push(s);\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Unexpected dot segment condition\");\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output.join(\"\");\n};\n\nexport function serialize(components:URIComponents, options:URIOptions = {}):string {\n\tconst protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);\n\tconst uriTokens:Array<string> = [];\n\n\t//find scheme handler\n\tconst schemeHandler = SCHEMES[(options.scheme || components.scheme || \"\").toLowerCase()];\n\n\t//perform scheme specific serialization\n\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);\n\n\tif (components.host) {\n\t\t//if host component is an IPv6 address\n\t\tif (protocol.IPV6ADDRESS.test(components.host)) {\n\t\t\t//TODO: normalize IPv6 address as per RFC 5952\n\t\t}\n\n\t\t//if host component is a domain name\n\t\telse if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {\n\t\t\t//convert IDN via punycode\n\t\t\ttry {\n\t\t\t\tcomponents.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));\n\t\t\t} catch (e) {\n\t\t\t\tcomponents.error = components.error || \"Host's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t}\n\t\t}\n\t}\n\n\t//normalize encoding\n\t_normalizeComponentEncoding(components, protocol);\n\n\tif (options.reference !== \"suffix\" && components.scheme) {\n\t\turiTokens.push(components.scheme);\n\t\turiTokens.push(\":\");\n\t}\n\n\tconst authority = _recomposeAuthority(components, options);\n\tif (authority !== undefined) {\n\t\tif (options.reference !== \"suffix\") {\n\t\t\turiTokens.push(\"//\");\n\t\t}\n\n\t\turiTokens.push(authority);\n\n\t\tif (components.path && components.path.charAt(0) !== \"/\") {\n\t\t\turiTokens.push(\"/\");\n\t\t}\n\t}\n\n\tif (components.path !== undefined) {\n\t\tlet s = components.path;\n\n\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {\n\t\t\ts = removeDotSegments(s);\n\t\t}\n\n\t\tif (authority === undefined) {\n\t\t\ts = s.replace(/^\\/\\//, \"/%2F\"); //don't allow the path to start with \"//\"\n\t\t}\n\n\t\turiTokens.push(s);\n\t}\n\n\tif (components.query !== undefined) {\n\t\turiTokens.push(\"?\");\n\t\turiTokens.push(components.query);\n\t}\n\n\tif (components.fragment !== undefined) {\n\t\turiTokens.push(\"#\");\n\t\turiTokens.push(components.fragment);\n\t}\n\n\treturn uriTokens.join(\"\"); //merge tokens into a string\n};\n\nexport function resolveComponents(base:URIComponents, relative:URIComponents, options:URIOptions = {}, skipNormalization?:boolean):URIComponents {\n\tconst target:URIComponents = {};\n\n\tif (!skipNormalization) {\n\t\tbase = parse(serialize(base, options), options); //normalize base components\n\t\trelative = parse(serialize(relative, options), options); //normalize relative components\n\t}\n\toptions = options || {};\n\n\tif (!options.tolerant && relative.scheme) {\n\t\ttarget.scheme = relative.scheme;\n\t\t//target.authority = relative.authority;\n\t\ttarget.userinfo = relative.userinfo;\n\t\ttarget.host = relative.host;\n\t\ttarget.port = relative.port;\n\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\ttarget.query = relative.query;\n\t} else {\n\t\tif (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {\n\t\t\t//target.authority = relative.authority;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (!relative.path) {\n\t\t\t\ttarget.path = base.path;\n\t\t\t\tif (relative.query !== undefined) {\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t} else {\n\t\t\t\t\ttarget.query = base.query;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (relative.path.charAt(0) === \"/\") {\n\t\t\t\t\ttarget.path = removeDotSegments(relative.path);\n\t\t\t\t} else {\n\t\t\t\t\tif ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {\n\t\t\t\t\t\ttarget.path = \"/\" + relative.path;\n\t\t\t\t\t} else if (!base.path) {\n\t\t\t\t\t\ttarget.path = relative.path;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t}\n\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t}\n\t\t\t\ttarget.query = relative.query;\n\t\t\t}\n\t\t\t//target.authority = base.authority;\n\t\t\ttarget.userinfo = base.userinfo;\n\t\t\ttarget.host = base.host;\n\t\t\ttarget.port = base.port;\n\t\t}\n\t\ttarget.scheme = base.scheme;\n\t}\n\n\ttarget.fragment = relative.fragment;\n\n\treturn target;\n};\n\nexport function resolve(baseURI:string, relativeURI:string, options?:URIOptions):string {\n\tconst schemelessOptions = assign({ scheme : 'null' }, options);\n\treturn serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);\n};\n\nexport function normalize(uri:string, options?:URIOptions):string;\nexport function normalize(uri:URIComponents, options?:URIOptions):URIComponents;\nexport function normalize(uri:any, options?:URIOptions):any {\n\tif (typeof uri === \"string\") {\n\t\turi = serialize(parse(uri, options), options);\n\t} else if (typeOf(uri) === \"object\") {\n\t\turi = parse(serialize(<URIComponents>uri, options), options);\n\t}\n\n\treturn uri;\n};\n\nexport function equal(uriA:string, uriB:string, options?: URIOptions):boolean;\nexport function equal(uriA:URIComponents, uriB:URIComponents, options?:URIOptions):boolean;\nexport function equal(uriA:any, uriB:any, options?:URIOptions):boolean {\n\tif (typeof uriA === \"string\") {\n\t\turiA = serialize(parse(uriA, options), options);\n\t} else if (typeOf(uriA) === \"object\") {\n\t\turiA = serialize(<URIComponents>uriA, options);\n\t}\n\n\tif (typeof uriB === \"string\") {\n\t\turiB = serialize(parse(uriB, options), options);\n\t} else if (typeOf(uriB) === \"object\") {\n\t\turiB = serialize(<URIComponents>uriB, options);\n\t}\n\n\treturn uriA === uriB;\n};\n\nexport function escapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);\n};\n\nexport function unescapeComponent(str:string, options?:URIOptions):string {\n\treturn str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);\n};\n","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"http\",\n\n\tdomainHost : true,\n\n\tparse : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//report missing host\n\t\tif (!components.host) {\n\t\t\tcomponents.error = components.error || \"HTTP URIs must have a host.\";\n\t\t}\n\n\t\treturn components;\n\t},\n\n\tserialize : function (components:URIComponents, options:URIOptions):URIComponents {\n\t\t//normalize the default port\n\t\tif (components.port === (String(components.scheme).toLowerCase() !== \"https\" ? 80 : 443) || components.port === \"\") {\n\t\t\tcomponents.port = undefined;\n\t\t}\n\t\t\n\t\t//normalize the empty path\n\t\tif (!components.path) {\n\t\t\tcomponents.path = \"/\";\n\t\t}\n\n\t\t//NOTE: We do not parse query strings for HTTP URIs\n\t\t//as WWW Form Url Encoded query strings are part of the HTML4+ spec,\n\t\t//and not the HTTP spec.\n\n\t\treturn components;\n\t}\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport http from \"./http\";\n\nconst handler:URISchemeHandler = {\n\tscheme : \"https\",\n\tdomainHost : http.domainHost,\n\tparse : http.parse,\n\tserialize : http.serialize\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, pctDecChars, unescapeComponent } from \"../uri\";\nimport punycode from \"punycode\";\nimport { merge, subexp, toUpperCase, toArray } from \"../util\";\n\nexport interface MailtoHeaders {\n\t[hfname:string]:string\n}\n\nexport interface MailtoComponents extends URIComponents {\n\tto:Array<string>,\n\theaders?:MailtoHeaders,\n\tsubject?:string,\n\tbody?:string\n}\n\nconst O:MailtoHeaders = {};\nconst isIRI = true;\n\n//RFC 3986\nconst UNRESERVED$$ = \"[A-Za-z0-9\\\\-\\\\.\\\\_\\\\~\" + (isIRI ? \"\\\\xA0-\\\\u200D\\\\u2010-\\\\u2029\\\\u202F-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFEF\" : \"\") + \"]\";\nconst HEXDIG$$ = \"[0-9A-Fa-f]\"; //case-insensitive\nconst PCT_ENCODED$ = subexp(subexp(\"%[EFef]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%[89A-Fa-f]\" + HEXDIG$$ + \"%\" + HEXDIG$$ + HEXDIG$$) + \"|\" + subexp(\"%\" + HEXDIG$$ + HEXDIG$$)); //expanded\n\n//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =\n//const ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\#\\\\$\\\\%\\\\&\\\\'\\\\*\\\\+\\\\-\\\\/\\\\=\\\\?\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QTEXT$$ = \"[\\\\x01-\\\\x08\\\\x0B\\\\x0C\\\\x0E-\\\\x1F\\\\x7F]\"; //(%d1-8 / %d11-12 / %d14-31 / %d127)\n//const QTEXT$$ = merge(\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]\", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext\n//const VCHAR$$ = \"[\\\\x21-\\\\x7E]\";\n//const WSP$$ = \"[\\\\x20\\\\x09]\";\n//const OBS_QP$ = subexp(\"\\\\\\\\\" + merge(\"[\\\\x00\\\\x0D\\\\x0A]\", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext\n//const FWS$ = subexp(subexp(WSP$$ + \"*\" + \"\\\\x0D\\\\x0A\") + \"?\" + WSP$$ + \"+\");\n//const QUOTED_PAIR$ = subexp(subexp(\"\\\\\\\\\" + subexp(VCHAR$$ + \"|\" + WSP$$)) + \"|\" + OBS_QP$);\n//const QUOTED_STRING$ = subexp('\\\\\"' + subexp(FWS$ + \"?\" + QCONTENT$) + \"*\" + FWS$ + \"?\" + '\\\\\"');\nconst ATEXT$$ = \"[A-Za-z0-9\\\\!\\\\$\\\\%\\\\'\\\\*\\\\+\\\\-\\\\^\\\\_\\\\`\\\\{\\\\|\\\\}\\\\~]\";\nconst QTEXT$$ = \"[\\\\!\\\\$\\\\%\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\-\\\\.0-9\\\\<\\\\>A-Z\\\\x5E-\\\\x7E]\";\nconst VCHAR$$ = merge(QTEXT$$, \"[\\\\\\\"\\\\\\\\]\");\nconst DOT_ATOM_TEXT$ = subexp(ATEXT$$ + \"+\" + subexp(\"\\\\.\" + ATEXT$$ + \"+\") + \"*\");\nconst QUOTED_PAIR$ = subexp(\"\\\\\\\\\" + VCHAR$$);\nconst QCONTENT$ = subexp(QTEXT$$ + \"|\" + QUOTED_PAIR$);\nconst QUOTED_STRING$ = subexp('\\\\\"' + QCONTENT$ + \"*\" + '\\\\\"');\n\n//RFC 6068\nconst DTEXT_NO_OBS$$ = \"[\\\\x21-\\\\x5A\\\\x5E-\\\\x7E]\"; //%d33-90 / %d94-126\nconst SOME_DELIMS$$ = \"[\\\\!\\\\$\\\\'\\\\(\\\\)\\\\*\\\\+\\\\,\\\\;\\\\:\\\\@]\";\nconst QCHAR$ = subexp(UNRESERVED$$ + \"|\" + PCT_ENCODED$ + \"|\" + SOME_DELIMS$$);\nconst DOMAIN$ = subexp(DOT_ATOM_TEXT$ + \"|\" + \"\\\\[\" + DTEXT_NO_OBS$$ + \"*\" + \"\\\\]\");\nconst LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + \"|\" + QUOTED_STRING$);\nconst ADDR_SPEC$ = subexp(LOCAL_PART$ + \"\\\\@\" + DOMAIN$);\nconst TO$ = subexp(ADDR_SPEC$ + subexp(\"\\\\,\" + ADDR_SPEC$) + \"*\");\nconst HFNAME$ = subexp(QCHAR$ + \"*\");\nconst HFVALUE$ = HFNAME$;\nconst HFIELD$ = subexp(HFNAME$ + \"\\\\=\" + HFVALUE$);\nconst HFIELDS2$ = subexp(HFIELD$ + subexp(\"\\\\&\" + HFIELD$) + \"*\");\nconst HFIELDS$ = subexp(\"\\\\?\" + HFIELDS2$);\nconst MAILTO_URI = new RegExp(\"^mailto\\\\:\" + TO$ + \"?\" + HFIELDS$ + \"?$\");\n\nconst UNRESERVED = new RegExp(UNRESERVED$$, \"g\");\nconst PCT_ENCODED = new RegExp(PCT_ENCODED$, \"g\");\nconst NOT_LOCAL_PART = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", '[\\\\\"]', VCHAR$$), \"g\");\nconst NOT_DOMAIN = new RegExp(merge(\"[^]\", ATEXT$$, \"[\\\\.]\", \"[\\\\[]\", DTEXT_NO_OBS$$, \"[\\\\]]\"), \"g\");\nconst NOT_HFNAME = new RegExp(merge(\"[^]\", UNRESERVED$$, SOME_DELIMS$$), \"g\");\nconst NOT_HFVALUE = NOT_HFNAME;\nconst TO = new RegExp(\"^\" + TO$ + \"$\");\nconst HFIELDS = new RegExp(\"^\" + HFIELDS2$ + \"$\");\n\nfunction decodeUnreserved(str:string):string {\n\tconst decStr = pctDecChars(str);\n\treturn (!decStr.match(UNRESERVED) ? str : decStr);\n}\n\nconst handler:URISchemeHandler<MailtoComponents> = {\n\tscheme : \"mailto\",\n\n\tparse : function (components:URIComponents, options:URIOptions):MailtoComponents {\n\t\tconst mailtoComponents = components as MailtoComponents;\n\t\tconst to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(\",\") : []);\n\t\tmailtoComponents.path = undefined;\n\n\t\tif (mailtoComponents.query) {\n\t\t\tlet unknownHeaders = false\n\t\t\tconst headers:MailtoHeaders = {};\n\t\t\tconst hfields = mailtoComponents.query.split(\"&\");\n\n\t\t\tfor (let x = 0, xl = hfields.length; x < xl; ++x) {\n\t\t\t\tconst hfield = hfields[x].split(\"=\");\n\n\t\t\t\tswitch (hfield[0]) {\n\t\t\t\t\tcase \"to\":\n\t\t\t\t\t\tconst toAddrs = hfield[1].split(\",\");\n\t\t\t\t\t\tfor (let x = 0, xl = toAddrs.length; x < xl; ++x) {\n\t\t\t\t\t\t\tto.push(toAddrs[x]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"subject\":\n\t\t\t\t\t\tmailtoComponents.subject = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"body\":\n\t\t\t\t\t\tmailtoComponents.body = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunknownHeaders = true;\n\t\t\t\t\t\theaders[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (unknownHeaders) mailtoComponents.headers = headers;\n\t\t}\n\n\t\tmailtoComponents.query = undefined;\n\n\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\tconst addr = to[x].split(\"@\");\n\n\t\t\taddr[0] = unescapeComponent(addr[0]);\n\n\t\t\tif (!options.unicodeSupport) {\n\t\t\t\t//convert Unicode IDN -> ASCII IDN\n\t\t\t\ttry {\n\t\t\t\t\taddr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());\n\t\t\t\t} catch (e) {\n\t\t\t\t\tmailtoComponents.error = mailtoComponents.error || \"Email address's domain name can not be converted to ASCII via punycode: \" + e;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\taddr[1] = unescapeComponent(addr[1], options).toLowerCase();\n\t\t\t}\n\n\t\t\tto[x] = addr.join(\"@\");\n\t\t}\n\n\t\treturn mailtoComponents;\n\t},\n\n\tserialize : function (mailtoComponents:MailtoComponents, options:URIOptions):URIComponents {\n\t\tconst components = mailtoComponents as URIComponents;\n\t\tconst to = toArray(mailtoComponents.to);\n\t\tif (to) {\n\t\t\tfor (let x = 0, xl = to.length; x < xl; ++x) {\n\t\t\t\tconst toAddr = String(to[x]);\n\t\t\t\tconst atIdx = toAddr.lastIndexOf(\"@\");\n\t\t\t\tconst localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);\n\t\t\t\tlet domain = toAddr.slice(atIdx + 1);\n\n\t\t\t\t//convert IDN via punycode\n\t\t\t\ttry {\n\t\t\t\t\tdomain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcomponents.error = components.error || \"Email address's domain name can not be converted to \" + (!options.iri ? \"ASCII\" : \"Unicode\") + \" via punycode: \" + e;\n\t\t\t\t}\n\n\t\t\t\tto[x] = localPart + \"@\" + domain;\n\t\t\t}\n\n\t\t\tcomponents.path = to.join(\",\");\n\t\t}\n\n\t\tconst headers = mailtoComponents.headers = mailtoComponents.headers || {};\n\n\t\tif (mailtoComponents.subject) headers[\"subject\"] = mailtoComponents.subject;\n\t\tif (mailtoComponents.body) headers[\"body\"] = mailtoComponents.body;\n\n\t\tconst fields = [];\n\t\tfor (const name in headers) {\n\t\t\tif (headers[name] !== O[name]) {\n\t\t\t\tfields.push(\n\t\t\t\t\tname.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +\n\t\t\t\t\t\"=\" +\n\t\t\t\t\theaders[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (fields.length) {\n\t\t\tcomponents.query = fields.join(\"&\");\n\t\t}\n\n\t\treturn components;\n\t}\n}\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { pctEncChar, SCHEMES } from \"../uri\";\n\nexport interface URNComponents extends URIComponents {\n\tnid?:string;\n\tnss?:string;\n}\n\nexport interface URNOptions extends URIOptions {\n\tnid?:string;\n}\n\nconst NID$ = \"(?:[0-9A-Za-z][0-9A-Za-z\\\\-]{1,31})\";\nconst PCT_ENCODED$ = \"(?:\\\\%[0-9A-Fa-f]{2})\";\nconst TRANS$$ = \"[0-9A-Za-z\\\\(\\\\)\\\\+\\\\,\\\\-\\\\.\\\\:\\\\=\\\\@\\\\;\\\\$\\\\_\\\\!\\\\*\\\\'\\\\/\\\\?\\\\#]\";\nconst NSS$ = \"(?:(?:\" + PCT_ENCODED$ + \"|\" + TRANS$$ + \")+)\";\nconst URN_SCHEME = new RegExp(\"^urn\\\\:(\" + NID$ + \")$\");\nconst URN_PATH = new RegExp(\"^(\" + NID$ + \")\\\\:(\" + NSS$ + \")$\");\nconst URN_PARSE = /^([^\\:]+)\\:(.*)/;\nconst URN_EXCLUDED = /[\\x00-\\x20\\\\\\\"\\&\\<\\>\\[\\]\\^\\`\\{\\|\\}\\~\\x7F-\\xFF]/g;\n\n//RFC 2141\nconst handler:URISchemeHandler<URNComponents,URNOptions> = {\n\tscheme : \"urn\",\n\n\tparse : function (components:URIComponents, options:URNOptions):URNComponents {\n\t\tconst matches = components.path && components.path.match(URN_PARSE);\n\t\tlet urnComponents = components as URNComponents;\n\n\t\tif (matches) {\n\t\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\t\tconst nid = matches[1].toLowerCase();\n\t\t\tconst nss = matches[2];\n\t\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\t\turnComponents.nid = nid;\n\t\t\turnComponents.nss = nss;\n\t\t\turnComponents.path = undefined;\n\n\t\t\tif (schemeHandler) {\n\t\t\t\turnComponents = schemeHandler.parse(urnComponents, options) as URNComponents;\n\t\t\t}\n\t\t} else {\n\t\t\turnComponents.error = urnComponents.error || \"URN can not be parsed.\";\n\t\t}\n\n\t\treturn urnComponents;\n\t},\n\n\tserialize : function (urnComponents:URNComponents, options:URNOptions):URIComponents {\n\t\tconst scheme = options.scheme || urnComponents.scheme || \"urn\";\n\t\tconst nid = urnComponents.nid;\n\t\tconst urnScheme = `${scheme}:${options.nid || nid}`;\n\t\tconst schemeHandler = SCHEMES[urnScheme];\n\n\t\tif (schemeHandler) {\n\t\t\turnComponents = schemeHandler.serialize(urnComponents, options) as URNComponents;\n\t\t}\n\n\t\tconst uriComponents = urnComponents as URIComponents;\n\t\tconst nss = urnComponents.nss;\n\t\turiComponents.path = `${nid || options.nid}:${nss}`;\n\n\t\treturn uriComponents;\n\t},\n};\n\nexport default handler;","import { URISchemeHandler, URIComponents, URIOptions } from \"../uri\";\nimport { URNComponents } from \"./urn\";\nimport { SCHEMES } from \"../uri\";\n\nexport interface UUIDComponents extends URNComponents {\n\tuuid?: string;\n}\n\nconst UUID = /^[0-9A-Fa-f]{8}(?:\\-[0-9A-Fa-f]{4}){3}\\-[0-9A-Fa-f]{12}$/;\nconst UUID_PARSE = /^[0-9A-Fa-f\\-]{36}/;\n\n//RFC 4122\nconst handler:URISchemeHandler<UUIDComponents, URIOptions, URNComponents> = {\n\tscheme : \"urn:uuid\",\n\n\tparse : function (urnComponents:URNComponents, options:URIOptions):UUIDComponents {\n\t\tconst uuidComponents = urnComponents as UUIDComponents;\n\t\tuuidComponents.uuid = uuidComponents.nss;\n\t\tuuidComponents.nss = undefined;\n\n\t\tif (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {\n\t\t\tuuidComponents.error = uuidComponents.error || \"UUID is not valid.\";\n\t\t}\n\n\t\treturn uuidComponents;\n\t},\n\n\tserialize : function (uuidComponents:UUIDComponents, options:URIOptions):URNComponents {\n\t\tconst urnComponents = uuidComponents as URNComponents;\n\t\t//normalize UUID\n\t\turnComponents.nss = (uuidComponents.uuid || \"\").toLowerCase();\n\t\treturn urnComponents;\n\t},\n};\n\nexport default handler;","'use strict';\n\n// https://mathiasbynens.be/notes/javascript-encoding\n// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode\nmodule.exports = function ucs2length(str) {\n var length = 0\n , len = str.length\n , pos = 0\n , value;\n while (pos < len) {\n length++;\n value = str.charCodeAt(pos++);\n if (value >= 0xD800 && value <= 0xDBFF && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate\n }\n }\n return length;\n};\n","'use strict';\n\nvar traverse = module.exports = function (schema, opts, cb) {\n // Legacy support for v0.3.1 and earlier.\n if (typeof opts == 'function') {\n cb = opts;\n opts = {};\n }\n\n cb = opts.cb || cb;\n var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};\n var post = cb.post || function() {};\n\n _traverse(opts, pre, post, schema, '', schema);\n};\n\n\ntraverse.keywords = {\n additionalItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n propertyNames: true,\n not: true\n};\n\ntraverse.arrayKeywords = {\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\n\ntraverse.propsKeywords = {\n definitions: true,\n properties: true,\n patternProperties: true,\n dependencies: true\n};\n\ntraverse.skipKeywords = {\n default: true,\n enum: true,\n const: true,\n required: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\n\n\nfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n if (schema && typeof schema == 'object' && !Array.isArray(schema)) {\n pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n for (var key in schema) {\n var sch = schema[key];\n if (Array.isArray(sch)) {\n if (key in traverse.arrayKeywords) {\n for (var i=0; i<sch.length; i++)\n _traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);\n }\n } else if (key in traverse.propsKeywords) {\n if (sch && typeof sch == 'object') {\n for (var prop in sch)\n _traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);\n }\n } else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {\n _traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);\n }\n }\n post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n }\n}\n\n\nfunction escapeJsonPtr(str) {\n return str.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n","'use strict';\n\n\nvar Cache = module.exports = function Cache() {\n this._cache = {};\n};\n\n\nCache.prototype.put = function Cache_put(key, value) {\n this._cache[key] = value;\n};\n\n\nCache.prototype.get = function Cache_get(key) {\n return this._cache[key];\n};\n\n\nCache.prototype.del = function Cache_del(key) {\n delete this._cache[key];\n};\n\n\nCache.prototype.clear = function Cache_clear() {\n this._cache = {};\n};\n","'use strict';\n\nvar util = require('./util');\n\nvar DATE = /^(\\d\\d\\d\\d)-(\\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d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)|(?:[a-z0-9\\-._~!$&'\"()*+,;=]|%[0-9a-f]{2})*)(?::\\d*)?(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*|\\/(?:(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})+(?:\\/(?:[a-z0-9\\-._~!$&'\"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\\?(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\\-._~!$&'\"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;\n// uri-template: https://tools.ietf.org/html/rfc6570\nvar URITEMPLATE = /^(?:(?:[^\\x00-\\x20\"'<>%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i;\n// For the source: https://gist.github.com/dperini/729294\n// For test cases: https://mathiasbynens.be/demo/url-regex\n// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.\n// var URL = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu;\nvar URL = /^(?:(?:http[s\\u017F]?|ftp):\\/\\/)(?:(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+(?::(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])*)?@)?(?:(?!10(?:\\.[0-9]{1,3}){3})(?!127(?:\\.[0-9]{1,3}){3})(?!169\\.254(?:\\.[0-9]{1,3}){2})(?!192\\.168(?:\\.[0-9]{1,3}){2})(?!172\\.(?:1[6-9]|2[0-9]|3[01])(?:\\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+-?)*(?:[0-9KSa-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+)(?:\\.(?:(?:[0-9KSa-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+-?)*(?:[0-9KSa-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+)*(?:\\.(?:(?:[KSa-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\\/(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])*)?$/i;\nvar UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;\nvar JSON_POINTER = /^(?:\\/(?:[^~/]|~0|~1)*)*$/;\nvar JSON_POINTER_URI_FRAGMENT = /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;\nvar RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/;\n\n\nmodule.exports = formats;\n\nfunction formats(mode) {\n mode = mode == 'full' ? 'full' : 'fast';\n return util.copy(formats[mode]);\n}\n\n\nformats.fast = {\n // date: http://tools.ietf.org/html/rfc3339#section-5.6\n date: /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/,\n // date-time: http://tools.ietf.org/html/rfc3339#section-5.6\n time: /^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,\n 'date-time': /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,\n // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js\n uri: /^(?:[a-z][a-z0-9+-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n 'uri-template': URITEMPLATE,\n url: URL,\n // email (sources from jsen validator):\n // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363\n // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')\n email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,\n hostname: HOSTNAME,\n // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,\n // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses\n ipv6: /^\\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(?:%.+)?\\s*$/i,\n regex: regex,\n // uuid: http://tools.ietf.org/html/rfc4122\n uuid: UUID,\n // JSON-pointer: https://tools.ietf.org/html/rfc6901\n // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A\n 'json-pointer': JSON_POINTER,\n 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,\n // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00\n 'relative-json-pointer': RELATIVE_JSON_POINTER\n};\n\n\nformats.full = {\n date: date,\n time: time,\n 'date-time': date_time,\n uri: uri,\n 'uri-reference': URIREF,\n 'uri-template': URITEMPLATE,\n url: URL,\n email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,\n hostname: HOSTNAME,\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,\n ipv6: /^\\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d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,\n 'json-pointer': JSON_POINTER,\n 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,\n 'relative-json-pointer': RELATIVE_JSON_POINTER\n};\n\n\nfunction isLeapYear(year) {\n // https://tools.ietf.org/html/rfc3339#appendix-C\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\n\nfunction date(str) {\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n var matches = str.match(DATE);\n if (!matches) return false;\n\n var year = +matches[1];\n var month = +matches[2];\n var day = +matches[3];\n\n return month >= 1 && month <= 12 && day >= 1 &&\n day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]);\n}\n\n\nfunction time(str, full) {\n var matches = str.match(TIME);\n if (!matches) return false;\n\n var hour = matches[1];\n var minute = matches[2];\n var second = matches[3];\n var timeZone = matches[5];\n return ((hour <= 23 && minute <= 59 && second <= 59) ||\n (hour == 23 && minute == 59 && second == 60)) &&\n (!full || timeZone);\n}\n\n\nvar DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n var dateTime = str.split(DATE_TIME_SEPARATOR);\n return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);\n}\n\n\nvar NOT_URI_FRAGMENT = /\\/|:/;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\n\n\nvar Z_ANCHOR = /[^\\\\]\\\\Z/;\nfunction regex(str) {\n if (Z_ANCHOR.test(str)) return false;\n try {\n new RegExp(str);\n return true;\n } catch(e) {\n return false;\n }\n}\n","'use strict';\n\nvar ruleModules = require('../dotjs')\n , toHash = require('./util').toHash;\n\nmodule.exports = function rules() {\n var RULES = [\n { type: 'number',\n rules: [ { 'maximum': ['exclusiveMaximum'] },\n { 'minimum': ['exclusiveMinimum'] }, 'multipleOf', 'format'] },\n { type: 'string',\n rules: [ 'maxLength', 'minLength', 'pattern', 'format' ] },\n { type: 'array',\n rules: [ 'maxItems', 'minItems', 'items', 'contains', 'uniqueItems' ] },\n { type: 'object',\n rules: [ 'maxProperties', 'minProperties', 'required', 'dependencies', 'propertyNames',\n { 'properties': ['additionalProperties', 'patternProperties'] } ] },\n { rules: [ '$ref', 'const', 'enum', 'not', 'anyOf', 'oneOf', 'allOf', 'if' ] }\n ];\n\n var ALL = [ 'type', '$comment' ];\n var KEYWORDS = [\n '$schema', '$id', 'id', '$data', '$async', 'title',\n 'description', 'default', 'definitions',\n 'examples', 'readOnly', 'writeOnly',\n 'contentMediaType', 'contentEncoding',\n 'additionalItems', 'then', 'else'\n ];\n var TYPES = [ 'number', 'integer', 'string', 'array', 'object', 'boolean', 'null' ];\n RULES.all = toHash(ALL);\n RULES.types = toHash(TYPES);\n\n RULES.forEach(function (group) {\n group.rules = group.rules.map(function (keyword) {\n var implKeywords;\n if (typeof keyword == 'object') {\n var key = Object.keys(keyword)[0];\n implKeywords = keyword[key];\n keyword = key;\n implKeywords.forEach(function (k) {\n ALL.push(k);\n RULES.all[k] = true;\n });\n }\n ALL.push(keyword);\n var rule = RULES.all[keyword] = {\n keyword: keyword,\n code: ruleModules[keyword],\n implements: implKeywords\n };\n return rule;\n });\n\n RULES.all.$comment = {\n keyword: '$comment',\n code: ruleModules.$comment\n };\n\n if (group.type) RULES.types[group.type] = group;\n });\n\n RULES.keywords = toHash(ALL.concat(KEYWORDS));\n RULES.custom = {};\n\n return RULES;\n};\n","'use strict';\n\n//all requires must be explicit because browserify won't work with dynamic requires\nmodule.exports = {\n '$ref': require('./ref'),\n allOf: require('./allOf'),\n anyOf: require('./anyOf'),\n '$comment': require('./comment'),\n const: require('./const'),\n contains: require('./contains'),\n dependencies: require('./dependencies'),\n 'enum': require('./enum'),\n format: require('./format'),\n 'if': require('./if'),\n items: require('./items'),\n maximum: require('./_limit'),\n minimum: require('./_limit'),\n maxItems: require('./_limitItems'),\n minItems: require('./_limitItems'),\n maxLength: require('./_limitLength'),\n minLength: require('./_limitLength'),\n maxProperties: require('./_limitProperties'),\n minProperties: require('./_limitProperties'),\n multipleOf: require('./multipleOf'),\n not: require('./not'),\n oneOf: require('./oneOf'),\n pattern: require('./pattern'),\n properties: require('./properties'),\n propertyNames: require('./propertyNames'),\n required: require('./required'),\n uniqueItems: require('./uniqueItems'),\n validate: require('./validate')\n};\n","'use strict';\nmodule.exports = function generate_ref(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $async, $refCode;\n if ($schema == '#' || $schema == '#/') {\n if (it.isRoot) {\n $async = it.async;\n $refCode = 'validate';\n } else {\n $async = it.root.schema.$async === true;\n $refCode = 'root.refVal[0]';\n }\n } else {\n var $refVal = it.resolveRef(it.baseId, $schema, it.isRoot);\n if ($refVal === undefined) {\n var $message = it.MissingRefError.message(it.baseId, $schema);\n if (it.opts.missingRefs == 'fail') {\n it.logger.error($message);\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('$ref') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { ref: \\'' + (it.util.escapeQuotes($schema)) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'can\\\\\\'t resolve reference ' + (it.util.escapeQuotes($schema)) + '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ' + (it.util.toQuotedString($schema)) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n } else if (it.opts.missingRefs == 'ignore') {\n it.logger.warn($message);\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n } else {\n throw new it.MissingRefError(it.baseId, $schema, $message);\n }\n } else if ($refVal.inline) {\n var $it = it.util.copy(it);\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n $it.schema = $refVal.schema;\n $it.schemaPath = '';\n $it.errSchemaPath = $schema;\n var $code = it.validate($it).replace(/validate\\.schema/g, $refVal.code);\n out += ' ' + ($code) + ' ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n }\n } else {\n $async = $refVal.$async === true || (it.async && $refVal.$async !== false);\n $refCode = $refVal.code;\n }\n }\n if ($refCode) {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n if (it.opts.passContext) {\n out += ' ' + ($refCode) + '.call(this, ';\n } else {\n out += ' ' + ($refCode) + '( ';\n }\n out += ' ' + ($data) + ', (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',\n $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';\n out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ', rootData) ';\n var __callValidate = out;\n out = $$outStack.pop();\n if ($async) {\n if (!it.async) throw new Error('async schema referenced by sync schema');\n if ($breakOnError) {\n out += ' var ' + ($valid) + '; ';\n }\n out += ' try { await ' + (__callValidate) + '; ';\n if ($breakOnError) {\n out += ' ' + ($valid) + ' = true; ';\n }\n out += ' } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ';\n if ($breakOnError) {\n out += ' ' + ($valid) + ' = false; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($valid) + ') { ';\n }\n } else {\n out += ' if (!' + (__callValidate) + ') { if (vErrors === null) vErrors = ' + ($refCode) + '.errors; else vErrors = vErrors.concat(' + ($refCode) + '.errors); errors = vErrors.length; } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_allOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $currentBaseId = $it.baseId,\n $allSchemasEmpty = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {\n $allSchemasEmpty = false;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($breakOnError) {\n if ($allSchemasEmpty) {\n out += ' if (true) { ';\n } else {\n out += ' ' + ($closingBraces.slice(0, -1)) + ' ';\n }\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n","'use strict';\nmodule.exports = function generate_anyOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $noEmptySchema = $schema.every(function($sch) {\n return (it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all));\n });\n if ($noEmptySchema) {\n var $currentBaseId = $it.baseId;\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';\n $closingBraces += '}';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('anyOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match some schema in anyOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n out = it.util.cleanUpCode(out);\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_comment(it, $keyword, $ruleType) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $comment = it.util.toQuotedString($schema);\n if (it.opts.$comment === true) {\n out += ' console.log(' + ($comment) + ');';\n } else if (typeof it.opts.$comment == 'function') {\n out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_const(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('const') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to constant\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_contains(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $idx = 'i' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $currentBaseId = it.baseId,\n $nonEmptySchema = (it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all));\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if ($nonEmptySchema) {\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (' + ($nextValid) + ') break; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';\n } else {\n out += ' if (' + ($data) + '.length == 0) {';\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('contains') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should contain a valid item\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n if ($nonEmptySchema) {\n out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n }\n if (it.opts.allErrors) {\n out += ' } ';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n","'use strict';\nmodule.exports = function generate_dependencies(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $schemaDeps = {},\n $propertyDeps = {},\n $ownProperties = it.opts.ownProperties;\n for ($property in $schema) {\n var $sch = $schema[$property];\n var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps;\n $deps[$property] = $sch;\n }\n out += 'var ' + ($errs) + ' = errors;';\n var $currentErrorPath = it.errorPath;\n out += 'var missing' + ($lvl) + ';';\n for (var $property in $propertyDeps) {\n $deps = $propertyDeps[$property];\n if ($deps.length) {\n out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($property)) + '\\') ';\n }\n if ($breakOnError) {\n out += ' && ( ';\n var arr1 = $deps;\n if (arr1) {\n var $propertyKey, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $propertyKey = arr1[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty($propertyKey),\n $useData = $data + $prop;\n out += ' ( ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';\n }\n }\n out += ')) { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('dependencies') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \\'' + (it.util.escapeQuotes($property)) + '\\', missingProperty: \\'' + ($missingProperty) + '\\', depsCount: ' + ($deps.length) + ', deps: \\'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(\", \"))) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should have ';\n if ($deps.length == 1) {\n out += 'property ' + (it.util.escapeQuotes($deps[0]));\n } else {\n out += 'properties ' + (it.util.escapeQuotes($deps.join(\", \")));\n }\n out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n } else {\n out += ' ) { ';\n var arr2 = $deps;\n if (arr2) {\n var $propertyKey, i2 = -1,\n l2 = arr2.length - 1;\n while (i2 < l2) {\n $propertyKey = arr2[i2 += 1];\n var $prop = it.util.getProperty($propertyKey),\n $missingProperty = it.util.escapeQuotes($propertyKey),\n $useData = $data + $prop;\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('dependencies') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \\'' + (it.util.escapeQuotes($property)) + '\\', missingProperty: \\'' + ($missingProperty) + '\\', depsCount: ' + ($deps.length) + ', deps: \\'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(\", \"))) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should have ';\n if ($deps.length == 1) {\n out += 'property ' + (it.util.escapeQuotes($deps[0]));\n } else {\n out += 'properties ' + (it.util.escapeQuotes($deps.join(\", \")));\n }\n out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n }\n }\n }\n out += ' } ';\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n }\n it.errorPath = $currentErrorPath;\n var $currentBaseId = $it.baseId;\n for (var $property in $schemaDeps) {\n var $sch = $schemaDeps[$property];\n if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {\n out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($property)) + '\\') ';\n }\n out += ') { ';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + it.util.getProperty($property);\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n","'use strict';\nmodule.exports = function generate_enum(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $i = 'i' + $lvl,\n $vSchema = 'schema' + $lvl;\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ';';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('enum') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to one of the allowed values\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_format(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n if (it.opts.format === false) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n }\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $unknownFormats = it.opts.unknownFormats,\n $allowUnknown = Array.isArray($unknownFormats);\n if ($isData) {\n var $format = 'format' + $lvl,\n $isObject = 'isObject' + $lvl,\n $formatType = 'formatType' + $lvl;\n out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \\'object\\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \\'string\\'; if (' + ($isObject) + ') { ';\n if (it.async) {\n out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';\n }\n out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' (';\n if ($unknownFormats != 'ignore') {\n out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';\n if ($allowUnknown) {\n out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';\n }\n out += ') || ';\n }\n out += ' (' + ($format) + ' && ' + ($formatType) + ' == \\'' + ($ruleType) + '\\' && !(typeof ' + ($format) + ' == \\'function\\' ? ';\n if (it.async) {\n out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';\n } else {\n out += ' ' + ($format) + '(' + ($data) + ') ';\n }\n out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';\n } else {\n var $format = it.formats[$schema];\n if (!$format) {\n if ($unknownFormats == 'ignore') {\n it.logger.warn('unknown format \"' + $schema + '\" ignored in schema at path \"' + it.errSchemaPath + '\"');\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n } else {\n throw new Error('unknown format \"' + $schema + '\" is used in schema at path \"' + it.errSchemaPath + '\"');\n }\n }\n var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;\n var $formatType = $isObject && $format.type || 'string';\n if ($isObject) {\n var $async = $format.async === true;\n $format = $format.validate;\n }\n if ($formatType != $ruleType) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n }\n if ($async) {\n if (!it.async) throw new Error('async format in sync schema');\n var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';\n out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { ';\n } else {\n out += ' if (! ';\n var $formatRef = 'formats' + it.util.getProperty($schema);\n if ($isObject) $formatRef += '.validate';\n if (typeof $format == 'function') {\n out += ' ' + ($formatRef) + '(' + ($data) + ') ';\n } else {\n out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';\n }\n out += ') { ';\n }\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('format') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match format \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_if(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $thenSch = it.schema['then'],\n $elseSch = it.schema['else'],\n $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? typeof $thenSch == 'object' && Object.keys($thenSch).length > 0 : it.util.schemaHasRules($thenSch, it.RULES.all)),\n $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? typeof $elseSch == 'object' && Object.keys($elseSch).length > 0 : it.util.schemaHasRules($elseSch, it.RULES.all)),\n $currentBaseId = $it.baseId;\n if ($thenPresent || $elsePresent) {\n var $ifClause;\n $it.createErrors = false;\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n $it.createErrors = true;\n out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n if ($thenPresent) {\n out += ' if (' + ($nextValid) + ') { ';\n $it.schema = it.schema['then'];\n $it.schemaPath = it.schemaPath + '.then';\n $it.errSchemaPath = it.errSchemaPath + '/then';\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';\n if ($thenPresent && $elsePresent) {\n $ifClause = 'ifClause' + $lvl;\n out += ' var ' + ($ifClause) + ' = \\'then\\'; ';\n } else {\n $ifClause = '\\'then\\'';\n }\n out += ' } ';\n if ($elsePresent) {\n out += ' else { ';\n }\n } else {\n out += ' if (!' + ($nextValid) + ') { ';\n }\n if ($elsePresent) {\n $it.schema = it.schema['else'];\n $it.schemaPath = it.schemaPath + '.else';\n $it.errSchemaPath = it.errSchemaPath + '/else';\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';\n if ($thenPresent && $elsePresent) {\n $ifClause = 'ifClause' + $lvl;\n out += ' var ' + ($ifClause) + ' = \\'else\\'; ';\n } else {\n $ifClause = '\\'else\\'';\n }\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('if') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match \"\\' + ' + ($ifClause) + ' + \\'\" schema\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n out = it.util.cleanUpCode(out);\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_items(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $idx = 'i' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $currentBaseId = it.baseId;\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if (Array.isArray($schema)) {\n var $additionalItems = it.schema.additionalItems;\n if ($additionalItems === false) {\n out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('additionalItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have more than ' + ($schema.length) + ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {\n out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';\n var $passData = $data + '[' + $i + ']';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);\n $it.dataPathArr[$dataNxt] = $i;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0 : it.util.schemaHasRules($additionalItems, it.RULES.all))) {\n $it.schema = $additionalItems;\n $it.schemaPath = it.schemaPath + '.additionalItems';\n $it.errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' } } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n } else if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' }';\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n","'use strict';\nmodule.exports = function generate_multipleOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n out += 'var division' + ($lvl) + ';if (';\n if ($isData) {\n out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \\'number\\' || ';\n }\n out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';\n if (it.opts.multipleOfPrecision) {\n out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';\n } else {\n out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';\n }\n out += ' ) ';\n if ($isData) {\n out += ' ) ';\n }\n out += ' ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('multipleOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be multiple of ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schemaValue) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_not(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.createErrors = false;\n var $allErrorsOption;\n if ($it.opts.allErrors) {\n $allErrorsOption = $it.opts.allErrors;\n $it.opts.allErrors = false;\n }\n out += ' ' + (it.validate($it)) + ' ';\n $it.createErrors = true;\n if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (' + ($nextValid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n } else {\n out += ' var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_oneOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $currentBaseId = $it.baseId,\n $prevValid = 'prevValid' + $lvl,\n $passingSchemas = 'passingSchemas' + $lvl;\n out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n } else {\n out += ' var ' + ($nextValid) + ' = true; ';\n }\n if ($i) {\n out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { ';\n $closingBraces += '}';\n }\n out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('oneOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match exactly one schema in oneOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_pattern(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('pattern') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match pattern \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_properties(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $key = 'key' + $lvl,\n $idx = 'idx' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $dataProperties = 'dataProperties' + $lvl;\n var $schemaKeys = Object.keys($schema || {}),\n $pProperties = it.schema.patternProperties || {},\n $pPropertyKeys = Object.keys($pProperties),\n $aProperties = it.schema.additionalProperties,\n $someProperties = $schemaKeys.length || $pPropertyKeys.length,\n $noAdditional = $aProperties === false,\n $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,\n $removeAdditional = it.opts.removeAdditional,\n $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,\n $ownProperties = it.opts.ownProperties,\n $currentBaseId = it.baseId;\n var $required = it.schema.required;\n if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required);\n out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';\n if ($ownProperties) {\n out += ' var ' + ($dataProperties) + ' = undefined;';\n }\n if ($checkAdditional) {\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n if ($someProperties) {\n out += ' var isAdditional' + ($lvl) + ' = !(false ';\n if ($schemaKeys.length) {\n if ($schemaKeys.length > 8) {\n out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') ';\n } else {\n var arr1 = $schemaKeys;\n if (arr1) {\n var $propertyKey, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $propertyKey = arr1[i1 += 1];\n out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr2 = $pPropertyKeys;\n if (arr2) {\n var $pProperty, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $pProperty = arr2[$i += 1];\n out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';\n }\n }\n }\n out += ' ); if (isAdditional' + ($lvl) + ') { ';\n }\n if ($removeAdditional == 'all') {\n out += ' delete ' + ($data) + '[' + ($key) + ']; ';\n } else {\n var $currentErrorPath = it.errorPath;\n var $additionalProperty = '\\' + ' + $key + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n }\n if ($noAdditional) {\n if ($removeAdditional) {\n out += ' delete ' + ($data) + '[' + ($key) + ']; ';\n } else {\n out += ' ' + ($nextValid) + ' = false; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalProperties';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('additionalProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \\'' + ($additionalProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is an invalid additional property';\n } else {\n out += 'should NOT have additional properties';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n out += ' break; ';\n }\n }\n } else if ($additionalIsSchema) {\n if ($removeAdditional == 'failing') {\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n } else {\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n }\n }\n it.errorPath = $currentErrorPath;\n }\n if ($someProperties) {\n out += ' } ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n var $useDefaults = it.opts.useDefaults && !it.compositeRule;\n if ($schemaKeys.length) {\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {\n var $prop = it.util.getProperty($propertyKey),\n $passData = $data + $prop,\n $hasDefault = $useDefaults && $sch.default !== undefined;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + $prop;\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);\n $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);\n $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n $code = it.util.varReplace($code, $nextData, $passData);\n var $useData = $passData;\n } else {\n var $useData = $nextData;\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';\n }\n if ($hasDefault) {\n out += ' ' + ($code) + ' ';\n } else {\n if ($requiredHash && $requiredHash[$propertyKey]) {\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { ' + ($nextValid) + ' = false; ';\n var $currentErrorPath = it.errorPath,\n $currErrSchemaPath = $errSchemaPath,\n $missingProperty = it.util.escapeQuotes($propertyKey);\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n $errSchemaPath = it.errSchemaPath + '/required';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n it.errorPath = $currentErrorPath;\n out += ' } else { ';\n } else {\n if ($breakOnError) {\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { ' + ($nextValid) + ' = true; } else { ';\n } else {\n out += ' if (' + ($useData) + ' !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ' ) { ';\n }\n }\n out += ' ' + ($code) + ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr4 = $pPropertyKeys;\n if (arr4) {\n var $pProperty, i4 = -1,\n l4 = arr4.length - 1;\n while (i4 < l4) {\n $pProperty = arr4[i4 += 1];\n var $sch = $pProperties[$pProperty];\n if ((it.opts.strictKeywords ? typeof $sch == 'object' && Object.keys($sch).length > 0 : it.util.schemaHasRules($sch, it.RULES.all))) {\n $it.schema = $sch;\n $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);\n $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else ' + ($nextValid) + ' = true; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n","'use strict';\nmodule.exports = function generate_propertyNames(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n out += 'var ' + ($errs) + ' = errors;';\n if ((it.opts.strictKeywords ? typeof $schema == 'object' && Object.keys($schema).length > 0 : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n var $key = 'key' + $lvl,\n $idx = 'idx' + $lvl,\n $i = 'i' + $lvl,\n $invalidName = '\\' + ' + $key + ' + \\'',\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $dataProperties = 'dataProperties' + $lvl,\n $ownProperties = it.opts.ownProperties,\n $currentBaseId = it.baseId;\n if ($ownProperties) {\n out += ' var ' + ($dataProperties) + ' = undefined; ';\n }\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n out += ' var startErrs' + ($lvl) + ' = errors; ';\n var $passData = $key;\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '<errors; ' + ($i) + '++) { vErrors[' + ($i) + '].propertyName = ' + ($key) + '; } var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('propertyNames') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { propertyName: \\'' + ($invalidName) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'property name \\\\\\'' + ($invalidName) + '\\\\\\' is invalid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n if ($breakOnError) {\n out += ' break; ';\n }\n out += ' } }';\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n out = it.util.cleanUpCode(out);\n return out;\n}\n","'use strict';\nmodule.exports = function generate_required(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $vSchema = 'schema' + $lvl;\n if (!$isData) {\n if ($schema.length < it.opts.loopRequired && it.schema.properties && Object.keys(it.schema.properties).length) {\n var $required = [];\n var arr1 = $schema;\n if (arr1) {\n var $property, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $property = arr1[i1 += 1];\n var $propertySch = it.schema.properties[$property];\n if (!($propertySch && (it.opts.strictKeywords ? typeof $propertySch == 'object' && Object.keys($propertySch).length > 0 : it.util.schemaHasRules($propertySch, it.RULES.all)))) {\n $required[$required.length] = $property;\n }\n }\n }\n } else {\n var $required = $schema;\n }\n }\n if ($isData || $required.length) {\n var $currentErrorPath = it.errorPath,\n $loopRequired = $isData || $required.length >= it.opts.loopRequired,\n $ownProperties = it.opts.ownProperties;\n if ($breakOnError) {\n out += ' var missing' + ($lvl) + '; ';\n if ($loopRequired) {\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n out += ' var ' + ($valid) + ' = true; ';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';\n }\n out += '; if (!' + ($valid) + ') break; } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n } else {\n out += ' if ( ';\n var arr2 = $required;\n if (arr2) {\n var $propertyKey, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $propertyKey = arr2[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty($propertyKey),\n $useData = $data + $prop;\n out += ' ( ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';\n }\n }\n out += ') { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n }\n } else {\n if ($loopRequired) {\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n if ($isData) {\n out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';\n }\n out += ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';\n if ($isData) {\n out += ' } ';\n }\n } else {\n var arr3 = $required;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $prop = it.util.getProperty($propertyKey),\n $missingProperty = it.util.escapeQuotes($propertyKey),\n $useData = $data + $prop;\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n }\n }\n }\n }\n it.errorPath = $currentErrorPath;\n } else if ($breakOnError) {\n out += ' if (true) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_uniqueItems(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (($schema || $isData) && it.opts.uniqueItems !== false) {\n if ($isData) {\n out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'boolean\\') ' + ($valid) + ' = false; else { ';\n }\n out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';\n var $itemType = it.schema.items && it.schema.items.type,\n $typeIsArray = Array.isArray($itemType);\n if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {\n out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';\n } else {\n out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';\n var $method = 'checkDataType' + ($typeIsArray ? 's' : '');\n out += ' if (' + (it.util[$method]($itemType, 'item', true)) + ') continue; ';\n if ($typeIsArray) {\n out += ' if (typeof item == \\'string\\') item = \\'\"\\' + item; ';\n }\n out += ' if (typeof itemIndices[item] == \\'number\\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';\n }\n out += ' } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('uniqueItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have duplicate items (items ## \\' + j + \\' and \\' + i + \\' are identical)\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\n\nvar KEYWORDS = [\n 'multipleOf',\n 'maximum',\n 'exclusiveMaximum',\n 'minimum',\n 'exclusiveMinimum',\n 'maxLength',\n 'minLength',\n 'pattern',\n 'additionalItems',\n 'maxItems',\n 'minItems',\n 'uniqueItems',\n 'maxProperties',\n 'minProperties',\n 'required',\n 'additionalProperties',\n 'enum',\n 'format',\n 'const'\n];\n\nmodule.exports = function (metaSchema, keywordsJsonPointers) {\n for (var i=0; i<keywordsJsonPointers.length; i++) {\n metaSchema = JSON.parse(JSON.stringify(metaSchema));\n var segments = keywordsJsonPointers[i].split('/');\n var keywords = metaSchema;\n var j;\n for (j=1; j<segments.length; j++)\n keywords = keywords[segments[j]];\n\n for (j=0; j<KEYWORDS.length; j++) {\n var key = KEYWORDS[j];\n var schema = keywords[key];\n if (schema) {\n keywords[key] = {\n anyOf: [\n schema,\n { $ref: 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' }\n ]\n };\n }\n }\n }\n\n return metaSchema;\n};\n","'use strict';\n\nvar MissingRefError = require('./error_classes').MissingRef;\n\nmodule.exports = compileAsync;\n\n\n/**\n * Creates validating function for passed schema with asynchronous loading of missing schemas.\n * `loadSchema` option should be a function that accepts schema uri and returns promise that resolves with the schema.\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Boolean} meta optional true to compile meta-schema; this parameter can be skipped\n * @param {Function} callback an optional node-style callback, it is called with 2 parameters: error (or null) and validating function.\n * @return {Promise} promise that resolves with a validating function.\n */\nfunction compileAsync(schema, meta, callback) {\n /* eslint no-shadow: 0 */\n /* global Promise */\n /* jshint validthis: true */\n var self = this;\n if (typeof this._opts.loadSchema != 'function')\n throw new Error('options.loadSchema should be a function');\n\n if (typeof meta == 'function') {\n callback = meta;\n meta = undefined;\n }\n\n var p = loadMetaSchemaOf(schema).then(function () {\n var schemaObj = self._addSchema(schema, undefined, meta);\n return schemaObj.validate || _compileAsync(schemaObj);\n });\n\n if (callback) {\n p.then(\n function(v) { callback(null, v); },\n callback\n );\n }\n\n return p;\n\n\n function loadMetaSchemaOf(sch) {\n var $schema = sch.$schema;\n return $schema && !self.getSchema($schema)\n ? compileAsync.call(self, { $ref: $schema }, true)\n : Promise.resolve();\n }\n\n\n function _compileAsync(schemaObj) {\n try { return self._compile(schemaObj); }\n catch(e) {\n if (e instanceof MissingRefError) return loadMissingSchema(e);\n throw e;\n }\n\n\n function loadMissingSchema(e) {\n var ref = e.missingSchema;\n if (added(ref)) throw new Error('Schema ' + ref + ' is loaded but ' + e.missingRef + ' cannot be resolved');\n\n var schemaPromise = self._loadingSchemas[ref];\n if (!schemaPromise) {\n schemaPromise = self._loadingSchemas[ref] = self._opts.loadSchema(ref);\n schemaPromise.then(removePromise, removePromise);\n }\n\n return schemaPromise.then(function (sch) {\n if (!added(ref)) {\n return loadMetaSchemaOf(sch).then(function () {\n if (!added(ref)) self.addSchema(sch, ref, undefined, meta);\n });\n }\n }).then(function() {\n return _compileAsync(schemaObj);\n });\n\n function removePromise() {\n delete self._loadingSchemas[ref];\n }\n\n function added(ref) {\n return self._refs[ref] || self._schemas[ref];\n }\n }\n }\n}\n","'use strict';\n\nvar IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;\nvar customRuleCode = require('./dotjs/custom');\nvar definitionSchema = require('./definition_schema');\n\nmodule.exports = {\n add: addKeyword,\n get: getKeyword,\n remove: removeKeyword,\n validate: validateKeyword\n};\n\n\n/**\n * Define custom keyword\n * @this Ajv\n * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).\n * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.\n * @return {Ajv} this for method chaining\n */\nfunction addKeyword(keyword, definition) {\n /* jshint validthis: true */\n /* eslint no-shadow: 0 */\n var RULES = this.RULES;\n if (RULES.keywords[keyword])\n throw new Error('Keyword ' + keyword + ' is already defined');\n\n if (!IDENTIFIER.test(keyword))\n throw new Error('Keyword ' + keyword + ' is not a valid identifier');\n\n if (definition) {\n this.validateKeyword(definition, true);\n\n var dataType = definition.type;\n if (Array.isArray(dataType)) {\n for (var i=0; i<dataType.length; i++)\n _addRule(keyword, dataType[i], definition);\n } else {\n _addRule(keyword, dataType, definition);\n }\n\n var metaSchema = definition.metaSchema;\n if (metaSchema) {\n if (definition.$data && this._opts.$data) {\n metaSchema = {\n anyOf: [\n metaSchema,\n { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/data.json#' }\n ]\n };\n }\n definition.validateSchema = this.compile(metaSchema, true);\n }\n }\n\n RULES.keywords[keyword] = RULES.all[keyword] = true;\n\n\n function _addRule(keyword, dataType, definition) {\n var ruleGroup;\n for (var i=0; i<RULES.length; i++) {\n var rg = RULES[i];\n if (rg.type == dataType) {\n ruleGroup = rg;\n break;\n }\n }\n\n if (!ruleGroup) {\n ruleGroup = { type: dataType, rules: [] };\n RULES.push(ruleGroup);\n }\n\n var rule = {\n keyword: keyword,\n definition: definition,\n custom: true,\n code: customRuleCode,\n implements: definition.implements\n };\n ruleGroup.rules.push(rule);\n RULES.custom[keyword] = rule;\n }\n\n return this;\n}\n\n\n/**\n * Get keyword\n * @this Ajv\n * @param {String} keyword pre-defined or custom keyword.\n * @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.\n */\nfunction getKeyword(keyword) {\n /* jshint validthis: true */\n var rule = this.RULES.custom[keyword];\n return rule ? rule.definition : this.RULES.keywords[keyword] || false;\n}\n\n\n/**\n * Remove keyword\n * @this Ajv\n * @param {String} keyword pre-defined or custom keyword.\n * @return {Ajv} this for method chaining\n */\nfunction removeKeyword(keyword) {\n /* jshint validthis: true */\n var RULES = this.RULES;\n delete RULES.keywords[keyword];\n delete RULES.all[keyword];\n delete RULES.custom[keyword];\n for (var i=0; i<RULES.length; i++) {\n var rules = RULES[i].rules;\n for (var j=0; j<rules.length; j++) {\n if (rules[j].keyword == keyword) {\n rules.splice(j, 1);\n break;\n }\n }\n }\n return this;\n}\n\n\n/**\n * Validate keyword definition\n * @this Ajv\n * @param {Object} definition keyword definition object.\n * @param {Boolean} throwError true to throw exception if definition is invalid\n * @return {boolean} validation result\n */\nfunction validateKeyword(definition, throwError) {\n validateKeyword.errors = null;\n var v = this._validateKeyword = this._validateKeyword\n || this.compile(definitionSchema, true);\n\n if (v(definition)) return true;\n validateKeyword.errors = v.errors;\n if (throwError)\n throw new Error('custom keyword definition is invalid: ' + this.errorsText(v.errors));\n else\n return false;\n}\n","'use strict';\nmodule.exports = function generate_custom(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $rule = this,\n $definition = 'definition' + $lvl,\n $rDef = $rule.definition,\n $closingBraces = '';\n var $compile, $inline, $macro, $ruleValidate, $validateCode;\n if ($isData && $rDef.$data) {\n $validateCode = 'keywordValidate' + $lvl;\n var $validateSchema = $rDef.validateSchema;\n out += ' var ' + ($definition) + ' = RULES.custom[\\'' + ($keyword) + '\\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';\n } else {\n $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);\n if (!$ruleValidate) return;\n $schemaValue = 'validate.schema' + $schemaPath;\n $validateCode = $ruleValidate.code;\n $compile = $rDef.compile;\n $inline = $rDef.inline;\n $macro = $rDef.macro;\n }\n var $ruleErrs = $validateCode + '.errors',\n $i = 'i' + $lvl,\n $ruleErr = 'ruleErr' + $lvl,\n $asyncKeyword = $rDef.async;\n if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');\n if (!($inline || $macro)) {\n out += '' + ($ruleErrs) + ' = null;';\n }\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if ($isData && $rDef.$data) {\n $closingBraces += '}';\n out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';\n if ($validateSchema) {\n $closingBraces += '}';\n out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';\n }\n }\n if ($inline) {\n if ($rDef.statements) {\n out += ' ' + ($ruleValidate.validate) + ' ';\n } else {\n out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';\n }\n } else if ($macro) {\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n $it.schema = $ruleValidate.validate;\n $it.schemaPath = '';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it).replace(/validate\\.schema/g, $validateCode);\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($code);\n } else {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n out += ' ' + ($validateCode) + '.call( ';\n if (it.opts.passContext) {\n out += 'this';\n } else {\n out += 'self';\n }\n if ($compile || $rDef.schema === false) {\n out += ' , ' + ($data) + ' ';\n } else {\n out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';\n }\n out += ' , (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',\n $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';\n out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';\n var def_callRuleValidate = out;\n out = $$outStack.pop();\n if ($rDef.errors === false) {\n out += ' ' + ($valid) + ' = ';\n if ($asyncKeyword) {\n out += 'await ';\n }\n out += '' + (def_callRuleValidate) + '; ';\n } else {\n if ($asyncKeyword) {\n $ruleErrs = 'customErrors' + $lvl;\n out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';\n } else {\n out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';\n }\n }\n }\n if ($rDef.modifying) {\n out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';\n }\n out += '' + ($closingBraces);\n if ($rDef.valid) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n } else {\n out += ' if ( ';\n if ($rDef.valid === undefined) {\n out += ' !';\n if ($macro) {\n out += '' + ($nextValid);\n } else {\n out += '' + ($valid);\n }\n } else {\n out += ' ' + (!$rDef.valid) + ' ';\n }\n out += ') { ';\n $errorKeyword = $rule.keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n var def_customError = out;\n out = $$outStack.pop();\n if ($inline) {\n if ($rDef.errors) {\n if ($rDef.errors != 'full') {\n out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \\'\\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = \"' + ($errSchemaPath) + '\"; } ';\n if (it.opts.verbose) {\n out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';\n }\n out += ' } ';\n }\n } else {\n if ($rDef.errors === false) {\n out += ' ' + (def_customError) + ' ';\n } else {\n out += ' if (' + ($errs) + ' == errors) { ' + (def_customError) + ' } else { for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \\'\\') + ' + (it.errorPath) + '; if (' + ($ruleErr) + '.schemaPath === undefined) { ' + ($ruleErr) + '.schemaPath = \"' + ($errSchemaPath) + '\"; } ';\n if (it.opts.verbose) {\n out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';\n }\n out += ' } } ';\n }\n }\n } else if ($macro) {\n out += ' var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n } else {\n if ($rDef.errors === false) {\n out += ' ' + (def_customError) + ' ';\n } else {\n out += ' if (Array.isArray(' + ($ruleErrs) + ')) { if (vErrors === null) vErrors = ' + ($ruleErrs) + '; else vErrors = vErrors.concat(' + ($ruleErrs) + '); errors = vErrors.length; for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '<errors; ' + ($i) + '++) { var ' + ($ruleErr) + ' = vErrors[' + ($i) + ']; if (' + ($ruleErr) + '.dataPath === undefined) ' + ($ruleErr) + '.dataPath = (dataPath || \\'\\') + ' + (it.errorPath) + '; ' + ($ruleErr) + '.schemaPath = \"' + ($errSchemaPath) + '\"; ';\n if (it.opts.verbose) {\n out += ' ' + ($ruleErr) + '.schema = ' + ($schemaValue) + '; ' + ($ruleErr) + '.data = ' + ($data) + '; ';\n }\n out += ' } } else { ' + (def_customError) + ' } ';\n }\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n }\n return out;\n}\n","'use strict';\n\nvar metaSchema = require('./refs/json-schema-draft-07.json');\n\nmodule.exports = {\n $id: 'https://github.com/epoberezkin/ajv/blob/master/lib/definition_schema.js',\n definitions: {\n simpleTypes: metaSchema.definitions.simpleTypes\n },\n type: 'object',\n dependencies: {\n schema: ['validate'],\n $data: ['validate'],\n statements: ['inline'],\n valid: {not: {required: ['macro']}}\n },\n properties: {\n type: metaSchema.properties.type,\n schema: {type: 'boolean'},\n statements: {type: 'boolean'},\n dependencies: {\n type: 'array',\n items: {type: 'string'}\n },\n metaSchema: {type: 'object'},\n modifying: {type: 'boolean'},\n valid: {type: 'boolean'},\n $data: {type: 'boolean'},\n async: {type: 'boolean'},\n errors: {\n anyOf: [\n {type: 'boolean'},\n {const: 'full'}\n ]\n }\n }\n};\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","/** @license React v16.14.0\n * react-jsx-dev-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';require(\"react\");exports.Fragment=60107;if(\"function\"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a(\"react.fragment\")}exports.jsxDEV=void 0;\n","'use strict';\n\nconst util = require('./util');\n\nconst convertToJson = function(node, options, parentTagName) {\n const jObj = {};\n\n // when no child node or attr is present\n if (!options.alwaysCreateTextNode && (!node.child || util.isEmptyObject(node.child)) && (!node.attrsMap || util.isEmptyObject(node.attrsMap))) {\n return util.isExist(node.val) ? node.val : '';\n }\n\n // otherwise create a textnode if node has some text\n if (util.isExist(node.val) && !(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) {\n const asArray = util.isTagNameInArrayMode(node.tagname, options.arrayMode, parentTagName)\n jObj[options.textNodeName] = asArray ? [node.val] : node.val;\n }\n\n util.merge(jObj, node.attrsMap, options.arrayMode);\n\n const keys = Object.keys(node.child);\n for (let index = 0; index < keys.length; index++) {\n const tagName = keys[index];\n if (node.child[tagName] && node.child[tagName].length > 1) {\n jObj[tagName] = [];\n for (let tag in node.child[tagName]) {\n if (node.child[tagName].hasOwnProperty(tag)) {\n jObj[tagName].push(convertToJson(node.child[tagName][tag], options, tagName));\n }\n }\n } else {\n const result = convertToJson(node.child[tagName][0], options, tagName);\n const asArray = (options.arrayMode === true && typeof result === 'object') || util.isTagNameInArrayMode(tagName, options.arrayMode, parentTagName);\n jObj[tagName] = asArray ? [result] : result;\n }\n }\n\n //add value\n return jObj;\n};\n\nexports.convertToJson = convertToJson;\n","'use strict';\n\nmodule.exports = function(tagname, parent, val) {\n this.tagname = tagname;\n this.parent = parent;\n this.child = {}; //child tags\n this.attrsMap = {}; //attributes map\n this.val = val; //text only\n this.addChild = function(child) {\n if (Array.isArray(this.child[child.tagname])) {\n //already presents\n this.child[child.tagname].push(child);\n } else {\n this.child[child.tagname] = [child];\n }\n };\n};\n","const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(0*)(\\.[0-9]+([eE]\\-?[0-9]+)?|[0-9]+(\\.[0-9]+([eE]\\-?[0-9]+)?)?)$/;\n// const octRegex = /0x[a-z0-9]+/;\n// const binRegex = /0x[a-z0-9]+/;\n\n\n//polyfill\nif (!Number.parseInt && window.parseInt) {\n Number.parseInt = window.parseInt;\n}\nif (!Number.parseFloat && window.parseFloat) {\n Number.parseFloat = window.parseFloat;\n}\n\n \nconst consider = {\n hex : true,\n leadingZeros: true,\n decimalPoint: \"\\.\",\n eNotation: true\n //skipLike: /regex/\n};\n\nfunction toNumber(str, options = {}){\n // const options = Object.assign({}, consider);\n // if(opt.leadingZeros === false){\n // options.leadingZeros = false;\n // }else if(opt.hex === false){\n // options.hex = false;\n // }\n\n options = Object.assign({}, consider, options );\n if(!str || typeof str !== \"string\" ) return str;\n \n let trimmedStr = str.trim();\n // if(trimmedStr === \"0.0\") return 0;\n // else if(trimmedStr === \"+0.0\") return 0;\n // else if(trimmedStr === \"-0.0\") return -0;\n\n if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str;\n else if (options.hex && hexRegex.test(trimmedStr)) {\n return Number.parseInt(trimmedStr, 16);\n // } else if (options.parseOct && octRegex.test(str)) {\n // return Number.parseInt(val, 8);\n // }else if (options.parseBin && binRegex.test(str)) {\n // return Number.parseInt(val, 2);\n }else{\n //separate negative sign, leading zeros, and rest number\n const match = numRegex.exec(trimmedStr);\n if(match){\n const sign = match[1];\n const leadingZeros = match[2];\n let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros\n //trim ending zeros for floating number\n \n const eNotation = match[4] || match[6];\n if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== \".\") return str; //-0123\n else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== \".\") return str; //0123\n else{//no leading zeros or leading zeros are allowed\n const num = Number(trimmedStr);\n const numStr = \"\" + num;\n if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation\n if(options.eNotation) return num;\n else return str;\n }else if(eNotation){ //given number has enotation\n if(options.eNotation) return num;\n else return str;\n }else if(trimmedStr.indexOf(\".\") !== -1){ //floating number\n // const decimalPart = match[5].substr(1);\n // const intPart = trimmedStr.substr(0,trimmedStr.indexOf(\".\"));\n\n \n // const p = numStr.indexOf(\".\");\n // const givenIntPart = numStr.substr(0,p);\n // const givenDecPart = numStr.substr(p+1);\n if(numStr === \"0\" && (numTrimmedByZeros === \"\") ) return num; //0.0\n else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000\n else if( sign && numStr === \"-\"+numTrimmedByZeros) return num;\n else return str;\n }\n \n if(leadingZeros){\n // if(numTrimmedByZeros === numStr){\n // if(options.leadingZeros) return num;\n // else return str;\n // }else return str;\n if(numTrimmedByZeros === numStr) return num;\n else if(sign+numTrimmedByZeros === numStr) return num;\n else return str;\n }\n\n if(trimmedStr === numStr) return num;\n else if(trimmedStr === sign+numStr) return num;\n // else{\n // //number with +/- sign\n // trimmedStr.test(/[-+][0-9]);\n\n // }\n return str;\n }\n // else if(!eNotation && trimmedStr && trimmedStr !== Number(trimmedStr) ) return str;\n \n }else{ //non-numeric string\n return str;\n }\n }\n}\n\n/**\n * \n * @param {string} numStr without leading zeros\n * @returns \n */\nfunction trimZeros(numStr){\n if(numStr && numStr.indexOf(\".\") !== -1){//float\n numStr = numStr.replace(/0+$/, \"\"); //remove ending zeros\n if(numStr === \".\") numStr = \"0\";\n else if(numStr[0] === \".\") numStr = \"0\"+numStr;\n else if(numStr[numStr.length-1] === \".\") numStr = numStr.substr(0,numStr.length-1);\n return numStr;\n }\n return numStr;\n}\nmodule.exports = toNumber\n","'use strict';\n\nconst util = require('./util');\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n};\n\nconst props = ['allowBooleanAttributes'];\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nexports.validate = function (xmlData, options) {\n options = util.buildOptions(options, defaultOptions, props);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/(<!DOCTYPE[\\s\\w\\\"\\.\\/\\-\\:]+(\\[.*\\])*\\s*>)/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n\n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\"+tagName+\"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\"+tagName+\"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\"+otg.tagName+\"' (opened in line \"+openPos.line+\", col \"+openPos.col+\") instead of closing tag '\"+tagName+\"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else {\n tags.push({tagName, tagStartPos});\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if (xmlData[i] === ' ' || xmlData[i] === '\\t' || xmlData[i] === '\\n' || xmlData[i] === '\\r') {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n }else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\"+tags[0].tagName+\"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n }else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '')+\n \"' found.\", {line: 1, col: 1});\n }\n\n return true;\n};\n\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return util.isName(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return util.isName(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n","'use strict';\nconst char = function(a) {\n return String.fromCharCode(a);\n};\n\nconst chars = {\n nilChar: char(176),\n missingChar: char(201),\n nilPremitive: char(175),\n missingPremitive: char(200),\n\n emptyChar: char(178),\n emptyValue: char(177), //empty Premitive\n\n boundryChar: char(179),\n\n objStart: char(198),\n arrStart: char(204),\n arrayEnd: char(185),\n};\n\nconst charsArr = [\n chars.nilChar,\n chars.nilPremitive,\n chars.missingChar,\n chars.missingPremitive,\n chars.boundryChar,\n chars.emptyChar,\n chars.emptyValue,\n chars.arrayEnd,\n chars.objStart,\n chars.arrStart,\n];\n\nconst _e = function(node, e_schema, options) {\n if (typeof e_schema === 'string') {\n //premitive\n if (node && node[0] && node[0].val !== undefined) {\n return getValue(node[0].val, e_schema);\n } else {\n return getValue(node, e_schema);\n }\n } else {\n const hasValidData = hasData(node);\n if (hasValidData === true) {\n let str = '';\n if (Array.isArray(e_schema)) {\n //attributes can't be repeated. hence check in children tags only\n str += chars.arrStart;\n const itemSchema = e_schema[0];\n //const itemSchemaType = itemSchema;\n const arr_len = node.length;\n\n if (typeof itemSchema === 'string') {\n for (let arr_i = 0; arr_i < arr_len; arr_i++) {\n const r = getValue(node[arr_i].val, itemSchema);\n str = processValue(str, r);\n }\n } else {\n for (let arr_i = 0; arr_i < arr_len; arr_i++) {\n const r = _e(node[arr_i], itemSchema, options);\n str = processValue(str, r);\n }\n }\n str += chars.arrayEnd; //indicates that next item is not array item\n } else {\n //object\n str += chars.objStart;\n const keys = Object.keys(e_schema);\n if (Array.isArray(node)) {\n node = node[0];\n }\n for (let i in keys) {\n const key = keys[i];\n //a property defined in schema can be present either in attrsMap or children tags\n //options.textNodeName will not present in both maps, take it's value from val\n //options.attrNodeName will be present in attrsMap\n let r;\n if (!options.ignoreAttributes && node.attrsMap && node.attrsMap[key]) {\n r = _e(node.attrsMap[key], e_schema[key], options);\n } else if (key === options.textNodeName) {\n r = _e(node.val, e_schema[key], options);\n } else {\n r = _e(node.child[key], e_schema[key], options);\n }\n str = processValue(str, r);\n }\n }\n return str;\n } else {\n return hasValidData;\n }\n }\n};\n\nconst getValue = function(a /*, type*/) {\n switch (a) {\n case undefined:\n return chars.missingPremitive;\n case null:\n return chars.nilPremitive;\n case '':\n return chars.emptyValue;\n default:\n return a;\n }\n};\n\nconst processValue = function(str, r) {\n if (!isAppChar(r[0]) && !isAppChar(str[str.length - 1])) {\n str += chars.boundryChar;\n }\n return str + r;\n};\n\nconst isAppChar = function(ch) {\n return charsArr.indexOf(ch) !== -1;\n};\n\nfunction hasData(jObj) {\n if (jObj === undefined) {\n return chars.missingChar;\n } else if (jObj === null) {\n return chars.nilChar;\n } else if (\n jObj.child &&\n Object.keys(jObj.child).length === 0 &&\n (!jObj.attrsMap || Object.keys(jObj.attrsMap).length === 0)\n ) {\n return chars.emptyChar;\n } else {\n return true;\n }\n}\n\nconst x2j = require('./xmlstr2xmlnode');\nconst buildOptions = require('./util').buildOptions;\n\nconst convert2nimn = function(node, e_schema, options) {\n options = buildOptions(options, x2j.defaultOptions, x2j.props);\n return _e(node, e_schema, options);\n};\n\nexports.convert2nimn = convert2nimn;\n","'use strict';\n\nconst util = require('./util');\nconst buildOptions = require('./util').buildOptions;\nconst x2j = require('./xmlstr2xmlnode');\n\n//TODO: do it later\nconst convertToJsonString = function(node, options) {\n options = buildOptions(options, x2j.defaultOptions, x2j.props);\n\n options.indentBy = options.indentBy || '';\n return _cToJsonStr(node, options, 0);\n};\n\nconst _cToJsonStr = function(node, options, level) {\n let jObj = '{';\n\n //traver through all the children\n const keys = Object.keys(node.child);\n\n for (let index = 0; index < keys.length; index++) {\n const tagname = keys[index];\n if (node.child[tagname] && node.child[tagname].length > 1) {\n jObj += '\"' + tagname + '\" : [ ';\n for (let tag in node.child[tagname]) {\n jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , ';\n }\n jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last\n } else {\n jObj += '\"' + tagname + '\" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,';\n }\n }\n util.merge(jObj, node.attrsMap);\n //add attrsMap as new children\n if (util.isEmptyObject(jObj)) {\n return util.isExist(node.val) ? node.val : '';\n } else {\n if (util.isExist(node.val)) {\n if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) {\n jObj += '\"' + options.textNodeName + '\" : ' + stringval(node.val);\n }\n }\n }\n //add value\n if (jObj[jObj.length - 1] === ',') {\n jObj = jObj.substr(0, jObj.length - 2);\n }\n return jObj + '}';\n};\n\nfunction stringval(v) {\n if (v === true || v === false || !isNaN(v)) {\n return v;\n } else {\n return '\"' + v + '\"';\n }\n}\n\nfunction indentate(options, level) {\n return options.indentBy.repeat(level);\n}\n\nexports.convertToJsonString = convertToJsonString;\n","'use strict';\n//parse Empty Node as self closing node\nconst buildOptions = require('./util').buildOptions;\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attrNodeName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataTagName: false,\n cdataPositionChar: '\\\\c',\n format: false,\n indentBy: ' ',\n supressEmptyNode: false,\n tagValueProcessor: function(a) {\n return a;\n },\n attrValueProcessor: function(a) {\n return a;\n },\n};\n\nconst props = [\n 'attributeNamePrefix',\n 'attrNodeName',\n 'textNodeName',\n 'ignoreAttributes',\n 'cdataTagName',\n 'cdataPositionChar',\n 'format',\n 'indentBy',\n 'supressEmptyNode',\n 'tagValueProcessor',\n 'attrValueProcessor',\n 'rootNodeName', //when array as root\n];\n\nfunction Parser(options) {\n this.options = buildOptions(options, defaultOptions, props);\n if (this.options.ignoreAttributes || this.options.attrNodeName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n if (this.options.cdataTagName) {\n this.isCDATA = isCDATA;\n } else {\n this.isCDATA = function(/*a*/) {\n return false;\n };\n }\n this.replaceCDATAstr = replaceCDATAstr;\n this.replaceCDATAarr = replaceCDATAarr;\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n\n if (this.options.supressEmptyNode) {\n this.buildTextNode = buildEmptyTextNode;\n this.buildObjNode = buildEmptyObjNode;\n } else {\n this.buildTextNode = buildTextValNode;\n this.buildObjNode = buildObjectNode;\n }\n\n this.buildTextValNode = buildTextValNode;\n this.buildObjectNode = buildObjectNode;\n}\n\nParser.prototype.parse = function(jObj) {\n if(Array.isArray(jObj) && this.options.rootNodeName && this.options.rootNodeName.length > 1){\n jObj = {\n [this.options.rootNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n};\n\nParser.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += ' ' + attr + '=\"' + this.options.attrValueProcessor('' + jObj[key]) + '\"';\n } else if (this.isCDATA(key)) {\n if (jObj[this.options.textNodeName]) {\n val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]);\n } else {\n val += this.replaceCDATAstr('', jObj[key]);\n }\n } else {\n //tag value\n if (key === this.options.textNodeName) {\n if (jObj[this.options.cdataTagName]) {\n //value will added while processing cdata\n } else {\n val += this.options.tagValueProcessor('' + jObj[key]);\n }\n } else {\n val += this.buildTextNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n if (this.isCDATA(key)) {\n val += this.indentate(level);\n if (jObj[this.options.textNodeName]) {\n val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]);\n } else {\n val += this.replaceCDATAarr('', jObj[key]);\n }\n } else {\n //nested nodes\n const arrLen = jObj[key].length;\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n val += this.processTextOrObjNode(item, key, level)\n } else {\n val += this.buildTextNode(item, key, '', level);\n }\n }\n }\n } else {\n //nested node\n if (this.options.attrNodeName && key === this.options.attrNodeName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += ' ' + Ks[j] + '=\"' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '\"';\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextNode(result.val, key, result.attrStr, level);\n } else {\n return this.buildObjNode(result.val, key, result.attrStr, level);\n }\n}\n\nfunction replaceCDATAstr(str, cdata) {\n str = this.options.tagValueProcessor('' + str);\n if (this.options.cdataPositionChar === '' || str === '') {\n return str + '<![CDATA[' + cdata + ']]' + this.tagEndChar;\n } else {\n return str.replace(this.options.cdataPositionChar, '<![CDATA[' + cdata + ']]' + this.tagEndChar);\n }\n}\n\nfunction replaceCDATAarr(str, cdata) {\n str = this.options.tagValueProcessor('' + str);\n if (this.options.cdataPositionChar === '' || str === '') {\n return str + '<![CDATA[' + cdata.join(']]><![CDATA[') + ']]' + this.tagEndChar;\n } else {\n for (let v in cdata) {\n str = str.replace(this.options.cdataPositionChar, '<![CDATA[' + cdata[v] + ']]>');\n }\n return str + this.newLine;\n }\n}\n\nfunction buildObjectNode(val, key, attrStr, level) {\n if (attrStr && val.indexOf('<') === -1) {\n return (\n this.indentate(level) +\n '<' +\n key +\n attrStr +\n '>' +\n val +\n //+ this.newLine\n // + this.indentate(level)\n '</' +\n key +\n this.tagEndChar\n );\n } else {\n return (\n this.indentate(level) +\n '<' +\n key +\n attrStr +\n this.tagEndChar +\n val +\n //+ this.newLine\n this.indentate(level) +\n '</' +\n key +\n this.tagEndChar\n );\n }\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n //+ this.newLine\n }\n}\n\nfunction buildTextValNode(val, key, attrStr, level) {\n return (\n this.indentate(level) +\n '<' +\n key +\n attrStr +\n '>' +\n this.options.tagValueProcessor(val) +\n '</' +\n key +\n this.tagEndChar\n );\n}\n\nfunction buildEmptyTextNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildTextValNode(val, key, attrStr, level);\n } else {\n return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n }\n}\n\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n if (name.startsWith(this.options.attributeNamePrefix)) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\n\nfunction isCDATA(name) {\n return name === this.options.cdataTagName;\n}\n\n//formatting\n//indentation\n//\\n after each closing or self closing tag\n\nmodule.exports = Parser;\n","function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","// ENVIRONMENT\nexport {self, window, global, document, process, console} from './globals';\nexport {default as isBrowser, isBrowserMainThread} from './is-browser';\nexport {default as getBrowser, isMobile} from './get-browser';\nexport {default as isElectron} from './is-electron';\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","// A port of an algorithm by Johannes Baagøe <baagoe@baagoe.com>, 2010\n// http://baagoe.com/en/RandomMusings/javascript/\n// https://github.com/nquinlan/better-random-numbers-for-javascript-mirror\n// Original work is under MIT license -\n\n// Copyright (C) 2010 by Johannes Baagøe <baagoe@baagoe.org>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n\n\n(function(global, module, define) {\n\nfunction Alea(seed) {\n var me = this, mash = Mash();\n\n me.next = function() {\n var t = 2091639 * me.s0 + me.c * 2.3283064365386963e-10; // 2^-32\n me.s0 = me.s1;\n me.s1 = me.s2;\n return me.s2 = t - (me.c = t | 0);\n };\n\n // Apply the seeding algorithm from Baagoe.\n me.c = 1;\n me.s0 = mash(' ');\n me.s1 = mash(' ');\n me.s2 = mash(' ');\n me.s0 -= mash(seed);\n if (me.s0 < 0) { me.s0 += 1; }\n me.s1 -= mash(seed);\n if (me.s1 < 0) { me.s1 += 1; }\n me.s2 -= mash(seed);\n if (me.s2 < 0) { me.s2 += 1; }\n mash = null;\n}\n\nfunction copy(f, t) {\n t.c = f.c;\n t.s0 = f.s0;\n t.s1 = f.s1;\n t.s2 = f.s2;\n return t;\n}\n\nfunction impl(seed, opts) {\n var xg = new Alea(seed),\n state = opts && opts.state,\n prng = xg.next;\n prng.int32 = function() { return (xg.next() * 0x100000000) | 0; }\n prng.double = function() {\n return prng() + (prng() * 0x200000 | 0) * 1.1102230246251565e-16; // 2^-53\n };\n prng.quick = prng;\n if (state) {\n if (typeof(state) == 'object') copy(state, xg);\n prng.state = function() { return copy(xg, {}); }\n }\n return prng;\n}\n\nfunction Mash() {\n var n = 0xefc8249d;\n\n var mash = function(data) {\n data = String(data);\n for (var i = 0; i < data.length; i++) {\n n += data.charCodeAt(i);\n var h = 0.02519603282416938 * n;\n n = h >>> 0;\n h -= n;\n h *= n;\n n = h >>> 0;\n h -= n;\n n += h * 0x100000000; // 2^32\n }\n return (n >>> 0) * 2.3283064365386963e-10; // 2^-32\n };\n\n return mash;\n}\n\n\nif (module && module.exports) {\n module.exports = impl;\n} else if (define && define.amd) {\n define(function() { return impl; });\n} else {\n this.alea = impl;\n}\n\n})(\n this,\n (typeof module) == 'object' && module, // present in node.js\n (typeof define) == 'function' && define // present with an AMD loader\n);\n\n\n","// A Javascript implementaion of the \"xor128\" prng algorithm by\n// George Marsaglia. See http://www.jstatsoft.org/v08/i14/paper\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n var me = this, strseed = '';\n\n me.x = 0;\n me.y = 0;\n me.z = 0;\n me.w = 0;\n\n // Set up generator function.\n me.next = function() {\n var t = me.x ^ (me.x << 11);\n me.x = me.y;\n me.y = me.z;\n me.z = me.w;\n return me.w ^= (me.w >>> 19) ^ t ^ (t >>> 8);\n };\n\n if (seed === (seed | 0)) {\n // Integer seed.\n me.x = seed;\n } else {\n // String seed.\n strseed += seed;\n }\n\n // Mix in string seed, then discard an initial batch of 64 values.\n for (var k = 0; k < strseed.length + 64; k++) {\n me.x ^= strseed.charCodeAt(k) | 0;\n me.next();\n }\n}\n\nfunction copy(f, t) {\n t.x = f.x;\n t.y = f.y;\n t.z = f.z;\n t.w = f.w;\n return t;\n}\n\nfunction impl(seed, opts) {\n var xg = new XorGen(seed),\n state = opts && opts.state,\n prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11,\n bot = (xg.next() >>> 0) / 0x100000000,\n result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof(state) == 'object') copy(state, xg);\n prng.state = function() { return copy(xg, {}); }\n }\n return prng;\n}\n\nif (module && module.exports) {\n module.exports = impl;\n} else if (define && define.amd) {\n define(function() { return impl; });\n} else {\n this.xor128 = impl;\n}\n\n})(\n this,\n (typeof module) == 'object' && module, // present in node.js\n (typeof define) == 'function' && define // present with an AMD loader\n);\n\n\n","// A Javascript implementaion of the \"xorwow\" prng algorithm by\n// George Marsaglia. See http://www.jstatsoft.org/v08/i14/paper\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n var me = this, strseed = '';\n\n // Set up generator function.\n me.next = function() {\n var t = (me.x ^ (me.x >>> 2));\n me.x = me.y; me.y = me.z; me.z = me.w; me.w = me.v;\n return (me.d = (me.d + 362437 | 0)) +\n (me.v = (me.v ^ (me.v << 4)) ^ (t ^ (t << 1))) | 0;\n };\n\n me.x = 0;\n me.y = 0;\n me.z = 0;\n me.w = 0;\n me.v = 0;\n\n if (seed === (seed | 0)) {\n // Integer seed.\n me.x = seed;\n } else {\n // String seed.\n strseed += seed;\n }\n\n // Mix in string seed, then discard an initial batch of 64 values.\n for (var k = 0; k < strseed.length + 64; k++) {\n me.x ^= strseed.charCodeAt(k) | 0;\n if (k == strseed.length) {\n me.d = me.x << 10 ^ me.x >>> 4;\n }\n me.next();\n }\n}\n\nfunction copy(f, t) {\n t.x = f.x;\n t.y = f.y;\n t.z = f.z;\n t.w = f.w;\n t.v = f.v;\n t.d = f.d;\n return t;\n}\n\nfunction impl(seed, opts) {\n var xg = new XorGen(seed),\n state = opts && opts.state,\n prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11,\n bot = (xg.next() >>> 0) / 0x100000000,\n result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof(state) == 'object') copy(state, xg);\n prng.state = function() { return copy(xg, {}); }\n }\n return prng;\n}\n\nif (module && module.exports) {\n module.exports = impl;\n} else if (define && define.amd) {\n define(function() { return impl; });\n} else {\n this.xorwow = impl;\n}\n\n})(\n this,\n (typeof module) == 'object' && module, // present in node.js\n (typeof define) == 'function' && define // present with an AMD loader\n);\n\n\n","// A Javascript implementaion of the \"xorshift7\" algorithm by\n// François Panneton and Pierre L'ecuyer:\n// \"On the Xorgshift Random Number Generators\"\n// http://saluc.engr.uconn.edu/refs/crypto/rng/panneton05onthexorshift.pdf\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n var me = this;\n\n // Set up generator function.\n me.next = function() {\n // Update xor generator.\n var X = me.x, i = me.i, t, v, w;\n t = X[i]; t ^= (t >>> 7); v = t ^ (t << 24);\n t = X[(i + 1) & 7]; v ^= t ^ (t >>> 10);\n t = X[(i + 3) & 7]; v ^= t ^ (t >>> 3);\n t = X[(i + 4) & 7]; v ^= t ^ (t << 7);\n t = X[(i + 7) & 7]; t = t ^ (t << 13); v ^= t ^ (t << 9);\n X[i] = v;\n me.i = (i + 1) & 7;\n return v;\n };\n\n function init(me, seed) {\n var j, w, X = [];\n\n if (seed === (seed | 0)) {\n // Seed state array using a 32-bit integer.\n w = X[0] = seed;\n } else {\n // Seed state using a string.\n seed = '' + seed;\n for (j = 0; j < seed.length; ++j) {\n X[j & 7] = (X[j & 7] << 15) ^\n (seed.charCodeAt(j) + X[(j + 1) & 7] << 13);\n }\n }\n // Enforce an array length of 8, not all zeroes.\n while (X.length < 8) X.push(0);\n for (j = 0; j < 8 && X[j] === 0; ++j);\n if (j == 8) w = X[7] = -1; else w = X[j];\n\n me.x = X;\n me.i = 0;\n\n // Discard an initial 256 values.\n for (j = 256; j > 0; --j) {\n me.next();\n }\n }\n\n init(me, seed);\n}\n\nfunction copy(f, t) {\n t.x = f.x.slice();\n t.i = f.i;\n return t;\n}\n\nfunction impl(seed, opts) {\n if (seed == null) seed = +(new Date);\n var xg = new XorGen(seed),\n state = opts && opts.state,\n prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11,\n bot = (xg.next() >>> 0) / 0x100000000,\n result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (state.x) copy(state, xg);\n prng.state = function() { return copy(xg, {}); }\n }\n return prng;\n}\n\nif (module && module.exports) {\n module.exports = impl;\n} else if (define && define.amd) {\n define(function() { return impl; });\n} else {\n this.xorshift7 = impl;\n}\n\n})(\n this,\n (typeof module) == 'object' && module, // present in node.js\n (typeof define) == 'function' && define // present with an AMD loader\n);\n\n","// A Javascript implementaion of Richard Brent's Xorgens xor4096 algorithm.\n//\n// This fast non-cryptographic random number generator is designed for\n// use in Monte-Carlo algorithms. It combines a long-period xorshift\n// generator with a Weyl generator, and it passes all common batteries\n// of stasticial tests for randomness while consuming only a few nanoseconds\n// for each prng generated. For background on the generator, see Brent's\n// paper: \"Some long-period random number generators using shifts and xors.\"\n// http://arxiv.org/pdf/1004.3115v1.pdf\n//\n// Usage:\n//\n// var xor4096 = require('xor4096');\n// random = xor4096(1); // Seed with int32 or string.\n// assert.equal(random(), 0.1520436450538547); // (0, 1) range, 53 bits.\n// assert.equal(random.int32(), 1806534897); // signed int32, 32 bits.\n//\n// For nonzero numeric keys, this impelementation provides a sequence\n// identical to that by Brent's xorgens 3 implementaion in C. This\n// implementation also provides for initalizing the generator with\n// string seeds, or for saving and restoring the state of the generator.\n//\n// On Chrome, this prng benchmarks about 2.1 times slower than\n// Javascript's built-in Math.random().\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n var me = this;\n\n // Set up generator function.\n me.next = function() {\n var w = me.w,\n X = me.X, i = me.i, t, v;\n // Update Weyl generator.\n me.w = w = (w + 0x61c88647) | 0;\n // Update xor generator.\n v = X[(i + 34) & 127];\n t = X[i = ((i + 1) & 127)];\n v ^= v << 13;\n t ^= t << 17;\n v ^= v >>> 15;\n t ^= t >>> 12;\n // Update Xor generator array state.\n v = X[i] = v ^ t;\n me.i = i;\n // Result is the combination.\n return (v + (w ^ (w >>> 16))) | 0;\n };\n\n function init(me, seed) {\n var t, v, i, j, w, X = [], limit = 128;\n if (seed === (seed | 0)) {\n // Numeric seeds initialize v, which is used to generates X.\n v = seed;\n seed = null;\n } else {\n // String seeds are mixed into v and X one character at a time.\n seed = seed + '\\0';\n v = 0;\n limit = Math.max(limit, seed.length);\n }\n // Initialize circular array and weyl value.\n for (i = 0, j = -32; j < limit; ++j) {\n // Put the unicode characters into the array, and shuffle them.\n if (seed) v ^= seed.charCodeAt((j + 32) % seed.length);\n // After 32 shuffles, take v as the starting w value.\n if (j === 0) w = v;\n v ^= v << 10;\n v ^= v >>> 15;\n v ^= v << 4;\n v ^= v >>> 13;\n if (j >= 0) {\n w = (w + 0x61c88647) | 0; // Weyl.\n t = (X[j & 127] ^= (v + w)); // Combine xor and weyl to init array.\n i = (0 == t) ? i + 1 : 0; // Count zeroes.\n }\n }\n // We have detected all zeroes; make the key nonzero.\n if (i >= 128) {\n X[(seed && seed.length || 0) & 127] = -1;\n }\n // Run the generator 512 times to further mix the state before using it.\n // Factoring this as a function slows the main generator, so it is just\n // unrolled here. The weyl generator is not advanced while warming up.\n i = 127;\n for (j = 4 * 128; j > 0; --j) {\n v = X[(i + 34) & 127];\n t = X[i = ((i + 1) & 127)];\n v ^= v << 13;\n t ^= t << 17;\n v ^= v >>> 15;\n t ^= t >>> 12;\n X[i] = v ^ t;\n }\n // Storing state as object members is faster than using closure variables.\n me.w = w;\n me.X = X;\n me.i = i;\n }\n\n init(me, seed);\n}\n\nfunction copy(f, t) {\n t.i = f.i;\n t.w = f.w;\n t.X = f.X.slice();\n return t;\n};\n\nfunction impl(seed, opts) {\n if (seed == null) seed = +(new Date);\n var xg = new XorGen(seed),\n state = opts && opts.state,\n prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11,\n bot = (xg.next() >>> 0) / 0x100000000,\n result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (state.X) copy(state, xg);\n prng.state = function() { return copy(xg, {}); }\n }\n return prng;\n}\n\nif (module && module.exports) {\n module.exports = impl;\n} else if (define && define.amd) {\n define(function() { return impl; });\n} else {\n this.xor4096 = impl;\n}\n\n})(\n this, // window object or global\n (typeof module) == 'object' && module, // present in node.js\n (typeof define) == 'function' && define // present with an AMD loader\n);\n","// A Javascript implementaion of the \"Tyche-i\" prng algorithm by\n// Samuel Neves and Filipe Araujo.\n// See https://eden.dei.uc.pt/~sneves/pubs/2011-snfa2.pdf\n\n(function(global, module, define) {\n\nfunction XorGen(seed) {\n var me = this, strseed = '';\n\n // Set up generator function.\n me.next = function() {\n var b = me.b, c = me.c, d = me.d, a = me.a;\n b = (b << 25) ^ (b >>> 7) ^ c;\n c = (c - d) | 0;\n d = (d << 24) ^ (d >>> 8) ^ a;\n a = (a - b) | 0;\n me.b = b = (b << 20) ^ (b >>> 12) ^ c;\n me.c = c = (c - d) | 0;\n me.d = (d << 16) ^ (c >>> 16) ^ a;\n return me.a = (a - b) | 0;\n };\n\n /* The following is non-inverted tyche, which has better internal\n * bit diffusion, but which is about 25% slower than tyche-i in JS.\n me.next = function() {\n var a = me.a, b = me.b, c = me.c, d = me.d;\n a = (me.a + me.b | 0) >>> 0;\n d = me.d ^ a; d = d << 16 ^ d >>> 16;\n c = me.c + d | 0;\n b = me.b ^ c; b = b << 12 ^ d >>> 20;\n me.a = a = a + b | 0;\n d = d ^ a; me.d = d = d << 8 ^ d >>> 24;\n me.c = c = c + d | 0;\n b = b ^ c;\n return me.b = (b << 7 ^ b >>> 25);\n }\n */\n\n me.a = 0;\n me.b = 0;\n me.c = 2654435769 | 0;\n me.d = 1367130551;\n\n if (seed === Math.floor(seed)) {\n // Integer seed.\n me.a = (seed / 0x100000000) | 0;\n me.b = seed | 0;\n } else {\n // String seed.\n strseed += seed;\n }\n\n // Mix in string seed, then discard an initial batch of 64 values.\n for (var k = 0; k < strseed.length + 20; k++) {\n me.b ^= strseed.charCodeAt(k) | 0;\n me.next();\n }\n}\n\nfunction copy(f, t) {\n t.a = f.a;\n t.b = f.b;\n t.c = f.c;\n t.d = f.d;\n return t;\n};\n\nfunction impl(seed, opts) {\n var xg = new XorGen(seed),\n state = opts && opts.state,\n prng = function() { return (xg.next() >>> 0) / 0x100000000; };\n prng.double = function() {\n do {\n var top = xg.next() >>> 11,\n bot = (xg.next() >>> 0) / 0x100000000,\n result = (top + bot) / (1 << 21);\n } while (result === 0);\n return result;\n };\n prng.int32 = xg.next;\n prng.quick = prng;\n if (state) {\n if (typeof(state) == 'object') copy(state, xg);\n prng.state = function() { return copy(xg, {}); }\n }\n return prng;\n}\n\nif (module && module.exports) {\n module.exports = impl;\n} else if (define && define.amd) {\n define(function() { return impl; });\n} else {\n this.tychei = impl;\n}\n\n})(\n this,\n (typeof module) == 'object' && module, // present in node.js\n (typeof define) == 'function' && define // present with an AMD loader\n);\n\n\n","/*\nCopyright 2019 David Bau.\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n*/\n\n(function (global, pool, math) {\n//\n// The following constants are related to IEEE 754 limits.\n//\n\nvar width = 256, // each RC4 output is 0 <= x < 256\n chunks = 6, // at least six RC4 outputs for each double\n digits = 52, // there are 52 significant digits in a double\n rngname = 'random', // rngname: name for Math.random and Math.seedrandom\n startdenom = math.pow(width, chunks),\n significance = math.pow(2, digits),\n overflow = significance * 2,\n mask = width - 1,\n nodecrypto; // node.js crypto module, initialized at the bottom.\n\n//\n// seedrandom()\n// This is the seedrandom function described above.\n//\nfunction seedrandom(seed, options, callback) {\n var key = [];\n options = (options == true) ? { entropy: true } : (options || {});\n\n // Flatten the seed string or build one from local entropy if needed.\n var shortseed = mixkey(flatten(\n options.entropy ? [seed, tostring(pool)] :\n (seed == null) ? autoseed() : seed, 3), key);\n\n // Use the seed to initialize an ARC4 generator.\n var arc4 = new ARC4(key);\n\n // This function returns a random double in [0, 1) that contains\n // randomness in every bit of the mantissa of the IEEE 754 value.\n var prng = function() {\n var n = arc4.g(chunks), // Start with a numerator n < 2 ^ 48\n d = startdenom, // and denominator d = 2 ^ 48.\n x = 0; // and no 'extra last byte'.\n while (n < significance) { // Fill up all significant digits by\n n = (n + x) * width; // shifting numerator and\n d *= width; // denominator and generating a\n x = arc4.g(1); // new least-significant-byte.\n }\n while (n >= overflow) { // To avoid rounding up, before adding\n n /= 2; // last byte, shift everything\n d /= 2; // right using integer math until\n x >>>= 1; // we have exactly the desired bits.\n }\n return (n + x) / d; // Form the number within [0, 1).\n };\n\n prng.int32 = function() { return arc4.g(4) | 0; }\n prng.quick = function() { return arc4.g(4) / 0x100000000; }\n prng.double = prng;\n\n // Mix the randomness into accumulated entropy.\n mixkey(tostring(arc4.S), pool);\n\n // Calling convention: what to return as a function of prng, seed, is_math.\n return (options.pass || callback ||\n function(prng, seed, is_math_call, state) {\n if (state) {\n // Load the arc4 state from the given state if it has an S array.\n if (state.S) { copy(state, arc4); }\n // Only provide the .state method if requested via options.state.\n prng.state = function() { return copy(arc4, {}); }\n }\n\n // If called as a method of Math (Math.seedrandom()), mutate\n // Math.random because that is how seedrandom.js has worked since v1.0.\n if (is_math_call) { math[rngname] = prng; return seed; }\n\n // Otherwise, it is a newer calling convention, so return the\n // prng directly.\n else return prng;\n })(\n prng,\n shortseed,\n 'global' in options ? options.global : (this == math),\n options.state);\n}\n\n//\n// ARC4\n//\n// An ARC4 implementation. The constructor takes a key in the form of\n// an array of at most (width) integers that should be 0 <= x < (width).\n//\n// The g(count) method returns a pseudorandom integer that concatenates\n// the next (count) outputs from ARC4. Its return value is a number x\n// that is in the range 0 <= x < (width ^ count).\n//\nfunction ARC4(key) {\n var t, keylen = key.length,\n me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];\n\n // The empty key [] is treated as [0].\n if (!keylen) { key = [keylen++]; }\n\n // Set up S using the standard key scheduling algorithm.\n while (i < width) {\n s[i] = i++;\n }\n for (i = 0; i < width; i++) {\n s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];\n s[j] = t;\n }\n\n // The \"g\" method returns the next (count) outputs as one number.\n (me.g = function(count) {\n // Using instance members instead of closure state nearly doubles speed.\n var t, r = 0,\n i = me.i, j = me.j, s = me.S;\n while (count--) {\n t = s[i = mask & (i + 1)];\n r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];\n }\n me.i = i; me.j = j;\n return r;\n // For robust unpredictability, the function call below automatically\n // discards an initial batch of values. This is called RC4-drop[256].\n // See http://google.com/search?q=rsa+fluhrer+response&btnI\n })(width);\n}\n\n//\n// copy()\n// Copies internal state of ARC4 to or from a plain object.\n//\nfunction copy(f, t) {\n t.i = f.i;\n t.j = f.j;\n t.S = f.S.slice();\n return t;\n};\n\n//\n// flatten()\n// Converts an object tree to nested arrays of strings.\n//\nfunction flatten(obj, depth) {\n var result = [], typ = (typeof obj), prop;\n if (depth && typ == 'object') {\n for (prop in obj) {\n try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}\n }\n }\n return (result.length ? result : typ == 'string' ? obj : obj + '\\0');\n}\n\n//\n// mixkey()\n// Mixes a string seed into a key that is an array of integers, and\n// returns a shortened string seed that is equivalent to the result key.\n//\nfunction mixkey(seed, key) {\n var stringseed = seed + '', smear, j = 0;\n while (j < stringseed.length) {\n key[mask & j] =\n mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));\n }\n return tostring(key);\n}\n\n//\n// autoseed()\n// Returns an object for autoseeding, using window.crypto and Node crypto\n// module if available.\n//\nfunction autoseed() {\n try {\n var out;\n if (nodecrypto && (out = nodecrypto.randomBytes)) {\n // The use of 'out' to remember randomBytes makes tight minified code.\n out = out(width);\n } else {\n out = new Uint8Array(width);\n (global.crypto || global.msCrypto).getRandomValues(out);\n }\n return tostring(out);\n } catch (e) {\n var browser = global.navigator,\n plugins = browser && browser.plugins;\n return [+new Date, global, plugins, global.screen, tostring(pool)];\n }\n}\n\n//\n// tostring()\n// Converts an array of charcodes to a string\n//\nfunction tostring(a) {\n return String.fromCharCode.apply(0, a);\n}\n\n//\n// When seedrandom.js is loaded, we immediately mix a few bits\n// from the built-in RNG into the entropy pool. Because we do\n// not want to interfere with deterministic PRNG state later,\n// seedrandom will not call math.random on its own again after\n// initialization.\n//\nmixkey(math.random(), pool);\n\n//\n// Nodejs and AMD support: export the implementation as a module using\n// either convention.\n//\nif ((typeof module) == 'object' && module.exports) {\n module.exports = seedrandom;\n // When in node.js, try using crypto package for autoseeding.\n try {\n nodecrypto = require('crypto');\n } catch (ex) {}\n} else if ((typeof define) == 'function' && define.amd) {\n define(function() { return seedrandom; });\n} else {\n // When included as a plain script, set up Math.seedrandom global.\n math['seed' + rngname] = seedrandom;\n}\n\n\n// End anonymous scope, and pass initial values.\n})(\n // global: `self` in browsers (including strict mode and web workers),\n // otherwise `this` in Node and other environments\n (typeof self !== 'undefined') ? self : this,\n [], // pool: entropy pool starts empty\n Math // math: package containing random, pow, and seedrandom\n);\n","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=t||self).RBush=i()}(this,function(){\"use strict\";function t(t,r,e,a,h){!function t(n,r,e,a,h){for(;a>e;){if(a-e>600){var o=a-e+1,s=r-e+1,l=Math.log(o),f=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*f*(o-f)/o)*(s-o/2<0?-1:1),m=Math.max(e,Math.floor(r-s*f/o+u)),c=Math.min(a,Math.floor(r+(o-s)*f/o+u));t(n,r,m,c,h)}var p=n[r],d=e,x=a;for(i(n,e,r),h(n[a],p)>0&&i(n,e,a);d<x;){for(i(n,d,x),d++,x--;h(n[d],p)<0;)d++;for(;h(n[x],p)>0;)x--}0===h(n[e],p)?i(n,e,x):i(n,++x,a),x<=r&&(e=x+1),r<=x&&(a=x-1)}}(t,r,e||0,a||t.length-1,h||n)}function i(t,i,n){var r=t[i];t[i]=t[n],t[n]=r}function n(t,i){return t<i?-1:t>i?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function e(t,i,n){if(!n)return i.indexOf(t);for(var r=0;r<i.length;r++)if(n(t,i[r]))return r;return-1}function a(t,i){h(t,0,t.children.length,i,t)}function h(t,i,n,r,e){e||(e=p(null)),e.minX=1/0,e.minY=1/0,e.maxX=-1/0,e.maxY=-1/0;for(var a=i;a<n;a++){var h=t.children[a];o(e,t.leaf?r(h):h)}return e}function o(t,i){return t.minX=Math.min(t.minX,i.minX),t.minY=Math.min(t.minY,i.minY),t.maxX=Math.max(t.maxX,i.maxX),t.maxY=Math.max(t.maxY,i.maxY),t}function s(t,i){return t.minX-i.minX}function l(t,i){return t.minY-i.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function m(t,i){return t.minX<=i.minX&&t.minY<=i.minY&&i.maxX<=t.maxX&&i.maxY<=t.maxY}function c(t,i){return i.minX<=t.maxX&&i.minY<=t.maxY&&i.maxX>=t.minX&&i.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,e,a){for(var h=[n,r];h.length;)if(!((r=h.pop())-(n=h.pop())<=e)){var o=n+Math.ceil((r-n)/e/2)*e;t(i,o,n,r,a),h.push(n,o,o,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var i=this.data,n=[];if(!c(t,i))return n;for(var r=this.toBBox,e=[];i;){for(var a=0;a<i.children.length;a++){var h=i.children[a],o=i.leaf?r(h):h;c(t,o)&&(i.leaf?n.push(h):m(t,o)?this._all(h,n):e.push(h))}i=e.pop()}return n},r.prototype.collides=function(t){var i=this.data;if(!c(t,i))return!1;for(var n=[];i;){for(var r=0;r<i.children.length;r++){var e=i.children[r],a=i.leaf?this.toBBox(e):e;if(c(t,a)){if(i.leaf||m(t,a))return!0;n.push(e)}}i=n.pop()}return!1},r.prototype.load=function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var i=0;i<t.length;i++)this.insert(t[i]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},r.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},r.prototype.clear=function(){return this.data=p([]),this},r.prototype.remove=function(t,i){if(!t)return this;for(var n,r,a,h=this.data,o=this.toBBox(t),s=[],l=[];h||s.length;){if(h||(h=s.pop(),r=s[s.length-1],n=l.pop(),a=!0),h.leaf){var f=e(t,h.children,i);if(-1!==f)return h.children.splice(f,1),s.push(h),this._condense(s),this}a||h.leaf||!m(h,o)?r?(n++,h=r.children[n],a=!1):h=null:(s.push(h),l.push(n),n=0,r=h,h=h.children[0])}return this},r.prototype.toBBox=function(t){return t},r.prototype.compareMinX=function(t,i){return t.minX-i.minX},r.prototype.compareMinY=function(t,i){return t.minY-i.minY},r.prototype.toJSON=function(){return this.data},r.prototype.fromJSON=function(t){return this.data=t,this},r.prototype._all=function(t,i){for(var n=[];t;)t.leaf?i.push.apply(i,t.children):n.push.apply(n,t.children),t=n.pop();return i},r.prototype._build=function(t,i,n,r){var e,h=n-i+1,o=this._maxEntries;if(h<=o)return a(e=p(t.slice(i,n+1)),this.toBBox),e;r||(r=Math.ceil(Math.log(h)/Math.log(o)),o=Math.ceil(h/Math.pow(o,r-1))),(e=p([])).leaf=!1,e.height=r;var s=Math.ceil(h/o),l=s*Math.ceil(Math.sqrt(o));d(t,i,n,l,this.compareMinX);for(var f=i;f<=n;f+=l){var u=Math.min(f+l-1,n);d(t,f,u,s,this.compareMinY);for(var m=f;m<=u;m+=s){var c=Math.min(m+s-1,u);e.children.push(this._build(t,m,c,r-1))}}return a(e,this.toBBox),e},r.prototype._chooseSubtree=function(t,i,n,r){for(;r.push(i),!i.leaf&&r.length-1!==n;){for(var e=1/0,a=1/0,h=void 0,o=0;o<i.children.length;o++){var s=i.children[o],l=f(s),u=(m=t,c=s,(Math.max(c.maxX,m.maxX)-Math.min(c.minX,m.minX))*(Math.max(c.maxY,m.maxY)-Math.min(c.minY,m.minY))-l);u<a?(a=u,e=l<e?l:e,h=s):u===a&&l<e&&(e=l,h=s)}i=h||i.children[0]}var m,c;return i},r.prototype._insert=function(t,i,n){var r=n?t:this.toBBox(t),e=[],a=this._chooseSubtree(r,this.data,i,e);for(a.children.push(t),o(a,r);i>=0&&e[i].children.length>this._maxEntries;)this._split(e,i),i--;this._adjustParentBBoxes(r,e,i)},r.prototype._split=function(t,i){var n=t[i],r=n.children.length,e=this._minEntries;this._chooseSplitAxis(n,e,r);var h=this._chooseSplitIndex(n,e,r),o=p(n.children.splice(h,n.children.length-h));o.height=n.height,o.leaf=n.leaf,a(n,this.toBBox),a(o,this.toBBox),i?t[i-1].children.push(o):this._splitRoot(n,o)},r.prototype._splitRoot=function(t,i){this.data=p([t,i]),this.data.height=t.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,i,n){for(var r,e,a,o,s,l,u,m=1/0,c=1/0,p=i;p<=n-i;p++){var d=h(t,0,p,this.toBBox),x=h(t,p,n,this.toBBox),v=(e=d,a=x,o=void 0,s=void 0,l=void 0,u=void 0,o=Math.max(e.minX,a.minX),s=Math.max(e.minY,a.minY),l=Math.min(e.maxX,a.maxX),u=Math.min(e.maxY,a.maxY),Math.max(0,l-o)*Math.max(0,u-s)),M=f(d)+f(x);v<m?(m=v,r=p,c=M<c?M:c):v===m&&M<c&&(c=M,r=p)}return r||n-i},r.prototype._chooseSplitAxis=function(t,i,n){var r=t.leaf?this.compareMinX:s,e=t.leaf?this.compareMinY:l;this._allDistMargin(t,i,n,r)<this._allDistMargin(t,i,n,e)&&t.children.sort(r)},r.prototype._allDistMargin=function(t,i,n,r){t.children.sort(r);for(var e=this.toBBox,a=h(t,0,i,e),s=h(t,n-i,n,e),l=u(a)+u(s),f=i;f<n-i;f++){var m=t.children[f];o(a,t.leaf?e(m):m),l+=u(a)}for(var c=n-i-1;c>=i;c--){var p=t.children[c];o(s,t.leaf?e(p):p),l+=u(s)}return l},r.prototype._adjustParentBBoxes=function(t,i,n){for(var r=n;r>=0;r--)o(i[r],t)},r.prototype._condense=function(t){for(var i=t.length-1,n=void 0;i>=0;i--)0===t[i].children.length?i>0?(n=t[i-1].children).splice(n.indexOf(t[i]),1):this.clear():a(t[i],this.toBBox)},r});\n","(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\ntypeof define === 'function' && define.amd ? define(factory) :\n(global = global || self, global.TinyQueue = factory());\n}(this, function () { 'use strict';\n\nvar TinyQueue = function TinyQueue(data, compare) {\n if ( data === void 0 ) data = [];\n if ( compare === void 0 ) compare = defaultCompare;\n\n this.data = data;\n this.length = this.data.length;\n this.compare = compare;\n\n if (this.length > 0) {\n for (var i = (this.length >> 1) - 1; i >= 0; i--) { this._down(i); }\n }\n};\n\nTinyQueue.prototype.push = function push (item) {\n this.data.push(item);\n this.length++;\n this._up(this.length - 1);\n};\n\nTinyQueue.prototype.pop = function pop () {\n if (this.length === 0) { return undefined; }\n\n var top = this.data[0];\n var bottom = this.data.pop();\n this.length--;\n\n if (this.length > 0) {\n this.data[0] = bottom;\n this._down(0);\n }\n\n return top;\n};\n\nTinyQueue.prototype.peek = function peek () {\n return this.data[0];\n};\n\nTinyQueue.prototype._up = function _up (pos) {\n var ref = this;\n var data = ref.data;\n var compare = ref.compare;\n var item = data[pos];\n\n while (pos > 0) {\n var parent = (pos - 1) >> 1;\n var current = data[parent];\n if (compare(item, current) >= 0) { break; }\n data[pos] = current;\n pos = parent;\n }\n\n data[pos] = item;\n};\n\nTinyQueue.prototype._down = function _down (pos) {\n var ref = this;\n var data = ref.data;\n var compare = ref.compare;\n var halfLength = this.length >> 1;\n var item = data[pos];\n\n while (pos < halfLength) {\n var left = (pos << 1) + 1;\n var best = data[left];\n var right = left + 1;\n\n if (right < this.length && compare(data[right], best) < 0) {\n left = right;\n best = data[right];\n }\n if (compare(best, item) >= 0) { break; }\n\n data[pos] = best;\n pos = left;\n }\n\n data[pos] = item;\n};\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn TinyQueue;\n\n}));\n","var pointInPolygonFlat = require('./flat.js')\nvar pointInPolygonNested = require('./nested.js')\n\nmodule.exports = function pointInPolygon (point, vs, start, end) {\n if (vs.length > 0 && Array.isArray(vs[0])) {\n return pointInPolygonNested(point, vs, start, end);\n } else {\n return pointInPolygonFlat(point, vs, start, end);\n }\n}\nmodule.exports.nested = pointInPolygonNested\nmodule.exports.flat = pointInPolygonFlat\n","module.exports = function pointInPolygonFlat (point, vs, start, end) {\n var x = point[0], y = point[1];\n var inside = false;\n if (start === undefined) start = 0;\n if (end === undefined) end = vs.length;\n var len = (end-start)/2;\n for (var i = 0, j = len - 1; i < len; j = i++) {\n var xi = vs[start+i*2+0], yi = vs[start+i*2+1];\n var xj = vs[start+j*2+0], yj = vs[start+j*2+1];\n var intersect = ((yi > y) !== (yj > y))\n && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) inside = !inside;\n }\n return inside;\n};\n","// ray-casting algorithm based on\n// https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html\n\nmodule.exports = function pointInPolygonNested (point, vs, start, end) {\n var x = point[0], y = point[1];\n var inside = false;\n if (start === undefined) start = 0;\n if (end === undefined) end = vs.length;\n var len = end - start;\n for (var i = 0, j = len - 1; i < len; j = i++) {\n var xi = vs[i+start][0], yi = vs[i+start][1];\n var xj = vs[j+start][0], yj = vs[j+start][1];\n var intersect = ((yi > y) !== (yj > y))\n && (x < (xj - xi) * (y - yi) / (yj - yi) + xi);\n if (intersect) inside = !inside;\n }\n return inside;\n};\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?e(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],e):e((t=t||self).predicates={})}(this,function(t){\"use strict\";const e=134217729,n=33306690738754706e-32;function r(t,e,n,r,o){let f,i,u,c,s=e[0],a=r[0],d=0,l=0;a>s==a>-s?(f=s,s=e[++d]):(f=a,a=r[++l]);let p=0;if(d<t&&l<n)for(a>s==a>-s?(u=f-((i=s+f)-s),s=e[++d]):(u=f-((i=a+f)-a),a=r[++l]),f=i,0!==u&&(o[p++]=u);d<t&&l<n;)a>s==a>-s?(u=f-((i=f+s)-(c=i-f))+(s-c),s=e[++d]):(u=f-((i=f+a)-(c=i-f))+(a-c),a=r[++l]),f=i,0!==u&&(o[p++]=u);for(;d<t;)u=f-((i=f+s)-(c=i-f))+(s-c),s=e[++d],f=i,0!==u&&(o[p++]=u);for(;l<n;)u=f-((i=f+a)-(c=i-f))+(a-c),a=r[++l],f=i,0!==u&&(o[p++]=u);return 0===f&&0!==p||(o[p++]=f),p}function o(t){return new Float64Array(t)}const f=33306690738754716e-32,i=22204460492503146e-32,u=11093356479670487e-47,c=o(4),s=o(8),a=o(12),d=o(16),l=o(4);t.orient2d=function(t,o,p,b,y,h){const M=(o-h)*(p-y),x=(t-y)*(b-h),j=M-x;if(0===M||0===x||M>0!=x>0)return j;const m=Math.abs(M+x);return Math.abs(j)>=f*m?j:-function(t,o,f,p,b,y,h){let M,x,j,m,_,v,w,A,F,O,P,g,k,q,z,B,C,D;const E=t-b,G=f-b,H=o-y,I=p-y;_=(z=(A=E-(w=(v=e*E)-(v-E)))*(O=I-(F=(v=e*I)-(v-I)))-((q=E*I)-w*F-A*F-w*O))-(P=z-(C=(A=H-(w=(v=e*H)-(v-H)))*(O=G-(F=(v=e*G)-(v-G)))-((B=H*G)-w*F-A*F-w*O))),c[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),c[1]=k-(P+_)+(_-B),_=(D=g+P)-g,c[2]=g-(D-_)+(P-_),c[3]=D;let J=function(t,e){let n=e[0];for(let r=1;r<t;r++)n+=e[r];return n}(4,c),K=i*h;if(J>=K||-J>=K)return J;if(M=t-(E+(_=t-E))+(_-b),j=f-(G+(_=f-G))+(_-b),x=o-(H+(_=o-H))+(_-y),m=p-(I+(_=p-I))+(_-y),0===M&&0===x&&0===j&&0===m)return J;if(K=u*h+n*Math.abs(J),(J+=E*m+I*M-(H*j+G*x))>=K||-J>=K)return J;_=(z=(A=M-(w=(v=e*M)-(v-M)))*(O=I-(F=(v=e*I)-(v-I)))-((q=M*I)-w*F-A*F-w*O))-(P=z-(C=(A=x-(w=(v=e*x)-(v-x)))*(O=G-(F=(v=e*G)-(v-G)))-((B=x*G)-w*F-A*F-w*O))),l[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),l[1]=k-(P+_)+(_-B),_=(D=g+P)-g,l[2]=g-(D-_)+(P-_),l[3]=D;const L=r(4,c,4,l,s);_=(z=(A=E-(w=(v=e*E)-(v-E)))*(O=m-(F=(v=e*m)-(v-m)))-((q=E*m)-w*F-A*F-w*O))-(P=z-(C=(A=H-(w=(v=e*H)-(v-H)))*(O=j-(F=(v=e*j)-(v-j)))-((B=H*j)-w*F-A*F-w*O))),l[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),l[1]=k-(P+_)+(_-B),_=(D=g+P)-g,l[2]=g-(D-_)+(P-_),l[3]=D;const N=r(L,s,4,l,a);_=(z=(A=M-(w=(v=e*M)-(v-M)))*(O=m-(F=(v=e*m)-(v-m)))-((q=M*m)-w*F-A*F-w*O))-(P=z-(C=(A=x-(w=(v=e*x)-(v-x)))*(O=j-(F=(v=e*j)-(v-j)))-((B=x*j)-w*F-A*F-w*O))),l[0]=z-(P+_)+(_-C),_=(k=q-((g=q+P)-(_=g-q))+(P-_))-(P=k-B),l[1]=k-(P+_)+(_-B),_=(D=g+P)-g,l[2]=g-(D-_)+(P-_),l[3]=D;const Q=r(N,a,4,l,d);return d[Q-1]}(t,o,p,b,y,h,m)},t.orient2dfast=function(t,e,n,r,o,f){return(e-f)*(n-o)-(t-o)*(r-f)},Object.defineProperty(t,\"__esModule\",{value:!0})});\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\n","var baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","/** @license React v16.13.0\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nmodule.exports = _nonIterableSpread;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nmodule.exports = _nonIterableRest;","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n","module.exports = { \"default\": require(\"core-js/library/fn/object/assign\"), __esModule: true };","require('../../modules/es6.object.assign');\nmodule.exports = require('../../modules/_core').Object.assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar DESCRIPTORS = require('./_descriptors');\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","require('../../modules/es6.object.define-property');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function defineProperty(it, key, desc) {\n return $Object.defineProperty(it, key, desc);\n};\n","var $export = require('./_export');\n// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)\n$export($export.S + $export.F * !require('./_descriptors'), 'Object', { defineProperty: require('./_object-dp').f });\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol/iterator\"), __esModule: true };","require('../../modules/es6.string.iterator');\nrequire('../../modules/web.dom.iterable');\nmodule.exports = require('../../modules/_wks-ext').f('iterator');\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","require('./es6.array.iterator');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar TO_STRING_TAG = require('./_wks')('toStringTag');\n\nvar DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +\n 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +\n 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +\n 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +\n 'TextTrackList,TouchList').split(',');\n\nfor (var i = 0; i < DOMIterables.length; i++) {\n var NAME = DOMIterables[i];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = Iterators.Array;\n}\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","module.exports = function () { /* empty */ };\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/symbol\"), __esModule: true };","require('../../modules/es6.symbol');\nrequire('../../modules/es6.object.to-string');\nrequire('../../modules/es7.symbol.async-iterator');\nrequire('../../modules/es7.symbol.observable');\nmodule.exports = require('../../modules/_core').Symbol;\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toObject = require('./_to-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $GOPS = require('./_object-gops');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n $GOPS.f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\nvar FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });\n\n$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return $GOPS.f(toObject(it));\n }\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","require('./_wks-define')('asyncIterator');\n","require('./_wks-define')('observable');\n","module.exports = { \"default\": require(\"core-js/library/fn/object/set-prototype-of\"), __esModule: true };","require('../../modules/es6.object.set-prototype-of');\nmodule.exports = require('../../modules/_core').Object.setPrototypeOf;\n","// 19.1.3.19 Object.setPrototypeOf(O, proto)\nvar $export = require('./_export');\n$export($export.S, 'Object', { setPrototypeOf: require('./_set-proto').set });\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","module.exports = { \"default\": require(\"core-js/library/fn/object/create\"), __esModule: true };","require('../../modules/es6.object.create');\nvar $Object = require('../../modules/_core').Object;\nmodule.exports = function create(P, D) {\n return $Object.create(P, D);\n};\n","var $export = require('./_export');\n// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\n$export($export.S, 'Object', { create: require('./_object-create') });\n","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AlphaPicker = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _common = require('../common');\n\nvar _AlphaPointer = require('./AlphaPointer');\n\nvar _AlphaPointer2 = _interopRequireDefault(_AlphaPointer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AlphaPicker = exports.AlphaPicker = function AlphaPicker(_ref) {\n var rgb = _ref.rgb,\n hsl = _ref.hsl,\n width = _ref.width,\n height = _ref.height,\n onChange = _ref.onChange,\n direction = _ref.direction,\n style = _ref.style,\n renderers = _ref.renderers,\n pointer = _ref.pointer,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n position: 'relative',\n width: width,\n height: height\n },\n alpha: {\n radius: '2px',\n style: style\n }\n }\n });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.picker, className: 'alpha-picker ' + className },\n _react2.default.createElement(_common.Alpha, _extends({}, styles.alpha, {\n rgb: rgb,\n hsl: hsl,\n pointer: pointer,\n renderers: renderers,\n onChange: onChange,\n direction: direction\n }))\n );\n};\n\nAlphaPicker.defaultProps = {\n width: '316px',\n height: '16px',\n direction: 'horizontal',\n pointer: _AlphaPointer2.default\n};\n\nexports.default = (0, _common.ColorWrap)(AlphaPicker);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.flattenNames = undefined;\n\nvar _isString2 = require('lodash/isString');\n\nvar _isString3 = _interopRequireDefault(_isString2);\n\nvar _forOwn2 = require('lodash/forOwn');\n\nvar _forOwn3 = _interopRequireDefault(_forOwn2);\n\nvar _isPlainObject2 = require('lodash/isPlainObject');\n\nvar _isPlainObject3 = _interopRequireDefault(_isPlainObject2);\n\nvar _map2 = require('lodash/map');\n\nvar _map3 = _interopRequireDefault(_map2);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar flattenNames = exports.flattenNames = function flattenNames() {\n var things = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var names = [];\n\n (0, _map3.default)(things, function (thing) {\n if (Array.isArray(thing)) {\n flattenNames(thing).map(function (name) {\n return names.push(name);\n });\n } else if ((0, _isPlainObject3.default)(thing)) {\n (0, _forOwn3.default)(thing, function (value, key) {\n value === true && names.push(key);\n names.push(key + '-' + value);\n });\n } else if ((0, _isString3.default)(thing)) {\n names.push(thing);\n }\n });\n\n return names;\n};\n\nexports.default = flattenNames;","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\n","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.mergeClasses = undefined;\n\nvar _forOwn2 = require('lodash/forOwn');\n\nvar _forOwn3 = _interopRequireDefault(_forOwn2);\n\nvar _cloneDeep2 = require('lodash/cloneDeep');\n\nvar _cloneDeep3 = _interopRequireDefault(_cloneDeep2);\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar mergeClasses = exports.mergeClasses = function mergeClasses(classes) {\n var activeNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n var styles = classes.default && (0, _cloneDeep3.default)(classes.default) || {};\n activeNames.map(function (name) {\n var toMerge = classes[name];\n if (toMerge) {\n (0, _forOwn3.default)(toMerge, function (value, key) {\n if (!styles[key]) {\n styles[key] = {};\n }\n\n styles[key] = _extends({}, styles[key], toMerge[key]);\n });\n }\n\n return name;\n });\n return styles;\n};\n\nexports.default = mergeClasses;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.autoprefix = undefined;\n\nvar _forOwn2 = require('lodash/forOwn');\n\nvar _forOwn3 = _interopRequireDefault(_forOwn2);\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar transforms = {\n borderRadius: function borderRadius(value) {\n return {\n msBorderRadius: value,\n MozBorderRadius: value,\n OBorderRadius: value,\n WebkitBorderRadius: value,\n borderRadius: value\n };\n },\n boxShadow: function boxShadow(value) {\n return {\n msBoxShadow: value,\n MozBoxShadow: value,\n OBoxShadow: value,\n WebkitBoxShadow: value,\n boxShadow: value\n };\n },\n userSelect: function userSelect(value) {\n return {\n WebkitTouchCallout: value,\n KhtmlUserSelect: value,\n MozUserSelect: value,\n msUserSelect: value,\n WebkitUserSelect: value,\n userSelect: value\n };\n },\n\n flex: function flex(value) {\n return {\n WebkitBoxFlex: value,\n MozBoxFlex: value,\n WebkitFlex: value,\n msFlex: value,\n flex: value\n };\n },\n flexBasis: function flexBasis(value) {\n return {\n WebkitFlexBasis: value,\n flexBasis: value\n };\n },\n justifyContent: function justifyContent(value) {\n return {\n WebkitJustifyContent: value,\n justifyContent: value\n };\n },\n\n transition: function transition(value) {\n return {\n msTransition: value,\n MozTransition: value,\n OTransition: value,\n WebkitTransition: value,\n transition: value\n };\n },\n\n transform: function transform(value) {\n return {\n msTransform: value,\n MozTransform: value,\n OTransform: value,\n WebkitTransform: value,\n transform: value\n };\n },\n absolute: function absolute(value) {\n var direction = value && value.split(' ');\n return {\n position: 'absolute',\n top: direction && direction[0],\n right: direction && direction[1],\n bottom: direction && direction[2],\n left: direction && direction[3]\n };\n },\n extend: function extend(name, otherElementStyles) {\n var otherStyle = otherElementStyles[name];\n if (otherStyle) {\n return otherStyle;\n }\n return {\n 'extend': name\n };\n }\n};\n\nvar autoprefix = exports.autoprefix = function autoprefix(elements) {\n var prefixed = {};\n (0, _forOwn3.default)(elements, function (styles, element) {\n var expanded = {};\n (0, _forOwn3.default)(styles, function (value, key) {\n var transform = transforms[key];\n if (transform) {\n expanded = _extends({}, expanded, transform(value));\n } else {\n expanded[key] = value;\n }\n });\n prefixed[element] = expanded;\n });\n return prefixed;\n};\n\nexports.default = autoprefix;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hover = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar hover = exports.hover = function hover(Component) {\n var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span';\n\n return function (_React$Component) {\n _inherits(Hover, _React$Component);\n\n function Hover() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Hover);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Hover.__proto__ || Object.getPrototypeOf(Hover)).call.apply(_ref, [this].concat(args))), _this), _this.state = { hover: false }, _this.handleMouseOver = function () {\n return _this.setState({ hover: true });\n }, _this.handleMouseOut = function () {\n return _this.setState({ hover: false });\n }, _this.render = function () {\n return _react2.default.createElement(\n Span,\n { onMouseOver: _this.handleMouseOver, onMouseOut: _this.handleMouseOut },\n _react2.default.createElement(Component, _extends({}, _this.props, _this.state))\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return Hover;\n }(_react2.default.Component);\n};\n\nexports.default = hover;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.active = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar active = exports.active = function active(Component) {\n var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span';\n\n return function (_React$Component) {\n _inherits(Active, _React$Component);\n\n function Active() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Active);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Active.__proto__ || Object.getPrototypeOf(Active)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: false }, _this.handleMouseDown = function () {\n return _this.setState({ active: true });\n }, _this.handleMouseUp = function () {\n return _this.setState({ active: false });\n }, _this.render = function () {\n return _react2.default.createElement(\n Span,\n { onMouseDown: _this.handleMouseDown, onMouseUp: _this.handleMouseUp },\n _react2.default.createElement(Component, _extends({}, _this.props, _this.state))\n );\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n return Active;\n }(_react2.default.Component);\n};\n\nexports.default = active;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar loopable = function loopable(i, length) {\n var props = {};\n var setProp = function setProp(name) {\n var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n props[name] = value;\n };\n\n i === 0 && setProp('first-child');\n i === length - 1 && setProp('last-child');\n (i === 0 || i % 2 === 0) && setProp('even');\n Math.abs(i % 2) === 1 && setProp('odd');\n setProp('nth-child', i);\n\n return props;\n};\n\nexports.default = loopable;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Alpha = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _alpha = require('../../helpers/alpha');\n\nvar alpha = _interopRequireWildcard(_alpha);\n\nvar _Checkboard = require('./Checkboard');\n\nvar _Checkboard2 = _interopRequireDefault(_Checkboard);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Alpha = exports.Alpha = function (_ref) {\n _inherits(Alpha, _ref);\n\n function Alpha() {\n var _ref2;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Alpha);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = Alpha.__proto__ || Object.getPrototypeOf(Alpha)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e) {\n var change = alpha.calculateChange(e, _this.props.hsl, _this.props.direction, _this.props.a, _this.container);\n change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e);\n }, _this.handleMouseDown = function (e) {\n _this.handleChange(e);\n window.addEventListener('mousemove', _this.handleChange);\n window.addEventListener('mouseup', _this.handleMouseUp);\n }, _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n }, _this.unbindEventListeners = function () {\n window.removeEventListener('mousemove', _this.handleChange);\n window.removeEventListener('mouseup', _this.handleMouseUp);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Alpha, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.unbindEventListeners();\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var rgb = this.props.rgb;\n var styles = (0, _reactcss2.default)({\n 'default': {\n alpha: {\n absolute: '0px 0px 0px 0px',\n borderRadius: this.props.radius\n },\n checkboard: {\n absolute: '0px 0px 0px 0px',\n overflow: 'hidden',\n borderRadius: this.props.radius\n },\n gradient: {\n absolute: '0px 0px 0px 0px',\n background: 'linear-gradient(to right, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)',\n boxShadow: this.props.shadow,\n borderRadius: this.props.radius\n },\n container: {\n position: 'relative',\n height: '100%',\n margin: '0 3px'\n },\n pointer: {\n position: 'absolute',\n left: rgb.a * 100 + '%'\n },\n slider: {\n width: '4px',\n borderRadius: '1px',\n height: '8px',\n boxShadow: '0 0 2px rgba(0, 0, 0, .6)',\n background: '#fff',\n marginTop: '1px',\n transform: 'translateX(-2px)'\n }\n },\n 'vertical': {\n gradient: {\n background: 'linear-gradient(to bottom, rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 0) 0%,\\n rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ', 1) 100%)'\n },\n pointer: {\n left: 0,\n top: rgb.a * 100 + '%'\n }\n },\n 'overwrite': _extends({}, this.props.style)\n }, {\n vertical: this.props.direction === 'vertical',\n overwrite: true\n });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(\n 'div',\n { style: styles.checkboard },\n _react2.default.createElement(_Checkboard2.default, { renderers: this.props.renderers })\n ),\n _react2.default.createElement('div', { style: styles.gradient }),\n _react2.default.createElement(\n 'div',\n {\n style: styles.container,\n ref: function ref(container) {\n return _this2.container = container;\n },\n onMouseDown: this.handleMouseDown,\n onTouchMove: this.handleChange,\n onTouchStart: this.handleChange\n },\n _react2.default.createElement(\n 'div',\n { style: styles.pointer },\n this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.slider })\n )\n )\n );\n }\n }]);\n\n return Alpha;\n}(_react.PureComponent || _react.Component);\n\nexports.default = Alpha;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar calculateChange = exports.calculateChange = function calculateChange(e, hsl, direction, initialA, container) {\n var containerWidth = container.clientWidth;\n var containerHeight = container.clientHeight;\n var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX;\n var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY;\n var left = x - (container.getBoundingClientRect().left + window.pageXOffset);\n var top = y - (container.getBoundingClientRect().top + window.pageYOffset);\n\n if (direction === 'vertical') {\n var a = void 0;\n if (top < 0) {\n a = 0;\n } else if (top > containerHeight) {\n a = 1;\n } else {\n a = Math.round(top * 100 / containerHeight) / 100;\n }\n\n if (hsl.a !== a) {\n return {\n h: hsl.h,\n s: hsl.s,\n l: hsl.l,\n a: a,\n source: 'rgb'\n };\n }\n } else {\n var _a = void 0;\n if (left < 0) {\n _a = 0;\n } else if (left > containerWidth) {\n _a = 1;\n } else {\n _a = Math.round(left * 100 / containerWidth) / 100;\n }\n\n if (initialA !== _a) {\n return {\n h: hsl.h,\n s: hsl.s,\n l: hsl.l,\n a: _a,\n source: 'rgb'\n };\n }\n }\n return null;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar checkboardCache = {};\n\nvar render = exports.render = function render(c1, c2, size, serverCanvas) {\n if (typeof document === 'undefined' && !serverCanvas) {\n return null;\n }\n var canvas = serverCanvas ? new serverCanvas() : document.createElement('canvas');\n canvas.width = size * 2;\n canvas.height = size * 2;\n var ctx = canvas.getContext('2d');\n if (!ctx) {\n return null;\n } // If no context can be found, return early.\n ctx.fillStyle = c1;\n ctx.fillRect(0, 0, canvas.width, canvas.height);\n ctx.fillStyle = c2;\n ctx.fillRect(0, 0, size, size);\n ctx.translate(size, size);\n ctx.fillRect(0, 0, size, size);\n return canvas.toDataURL();\n};\n\nvar get = exports.get = function get(c1, c2, size, serverCanvas) {\n var key = c1 + '-' + c2 + '-' + size + (serverCanvas ? '-server' : '');\n\n if (checkboardCache[key]) {\n return checkboardCache[key];\n }\n\n var checkboard = render(c1, c2, size, serverCanvas);\n checkboardCache[key] = checkboard;\n return checkboard;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.EditableInput = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar DEFAULT_ARROW_OFFSET = 1;\n\nvar UP_KEY_CODE = 38;\nvar DOWN_KEY_CODE = 40;\nvar VALID_KEY_CODES = [UP_KEY_CODE, DOWN_KEY_CODE];\nvar isValidKeyCode = function isValidKeyCode(keyCode) {\n return VALID_KEY_CODES.indexOf(keyCode) > -1;\n};\n\nvar getFormattedPercentage = function getFormattedPercentage(number) {\n return number + '%';\n};\nvar getNumberValue = function getNumberValue(value) {\n return Number(String(value).replace(/%/g, ''));\n};\nvar getIsPercentage = function getIsPercentage(value) {\n return String(value).indexOf('%') > -1;\n};\n\nvar EditableInput = exports.EditableInput = function (_ref) {\n _inherits(EditableInput, _ref);\n\n function EditableInput(props) {\n _classCallCheck(this, EditableInput);\n\n var _this = _possibleConstructorReturn(this, (EditableInput.__proto__ || Object.getPrototypeOf(EditableInput)).call(this));\n\n _this.handleBlur = function () {\n if (_this.state.blurValue) {\n _this.setState({ value: _this.state.blurValue, blurValue: null });\n }\n };\n\n _this.handleChange = function (e) {\n _this.setUpdatedValue(e.target.value, e);\n };\n\n _this.handleKeyDown = function (e) {\n // In case `e.target.value` is a percentage remove the `%` character\n // and update accordingly with a percentage\n // https://github.com/casesandberg/react-color/issues/383\n var value = getNumberValue(e.target.value);\n if (!isNaN(value) && isValidKeyCode(e.keyCode)) {\n var offset = _this.getArrowOffset();\n var updatedValue = e.keyCode === UP_KEY_CODE ? value + offset : value - offset;\n\n _this.setUpdatedValue(updatedValue, e);\n }\n };\n\n _this.handleDrag = function (e) {\n if (_this.props.dragLabel) {\n var newValue = Math.round(_this.props.value + e.movementX);\n if (newValue >= 0 && newValue <= _this.props.dragMax) {\n _this.props.onChange && _this.props.onChange(_this.getValueObjectWithLabel(newValue), e);\n }\n }\n };\n\n _this.handleMouseDown = function (e) {\n if (_this.props.dragLabel) {\n e.preventDefault();\n _this.handleDrag(e);\n window.addEventListener('mousemove', _this.handleDrag);\n window.addEventListener('mouseup', _this.handleMouseUp);\n }\n };\n\n _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n };\n\n _this.unbindEventListeners = function () {\n window.removeEventListener('mousemove', _this.handleDrag);\n window.removeEventListener('mouseup', _this.handleMouseUp);\n };\n\n _this.state = {\n value: String(props.value).toUpperCase(),\n blurValue: String(props.value).toUpperCase()\n };\n return _this;\n }\n\n _createClass(EditableInput, [{\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n if (this.props.value !== this.state.value && (prevProps.value !== this.props.value || prevState.value !== this.state.value)) {\n if (this.input === document.activeElement) {\n this.setState({ blurValue: String(this.props.value).toUpperCase() });\n } else {\n this.setState({ value: String(this.props.value).toUpperCase(), blurValue: !this.state.blurValue && String(this.props.value).toUpperCase() });\n }\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.unbindEventListeners();\n }\n }, {\n key: 'getValueObjectWithLabel',\n value: function getValueObjectWithLabel(value) {\n return _defineProperty({}, this.props.label, value);\n }\n }, {\n key: 'getArrowOffset',\n value: function getArrowOffset() {\n return this.props.arrowOffset || DEFAULT_ARROW_OFFSET;\n }\n }, {\n key: 'setUpdatedValue',\n value: function setUpdatedValue(value, e) {\n var onChangeValue = this.props.label ? this.getValueObjectWithLabel(value) : value;\n this.props.onChange && this.props.onChange(onChangeValue, e);\n\n var isPercentage = getIsPercentage(e.target.value);\n this.setState({\n value: isPercentage ? getFormattedPercentage(value) : value\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n wrap: {\n position: 'relative'\n }\n },\n 'user-override': {\n wrap: this.props.style && this.props.style.wrap ? this.props.style.wrap : {},\n input: this.props.style && this.props.style.input ? this.props.style.input : {},\n label: this.props.style && this.props.style.label ? this.props.style.label : {}\n },\n 'dragLabel-true': {\n label: {\n cursor: 'ew-resize'\n }\n }\n }, {\n 'user-override': true\n }, this.props);\n\n return _react2.default.createElement(\n 'div',\n { style: styles.wrap },\n _react2.default.createElement('input', {\n style: styles.input,\n ref: function ref(input) {\n return _this2.input = input;\n },\n value: this.state.value,\n onKeyDown: this.handleKeyDown,\n onChange: this.handleChange,\n onBlur: this.handleBlur,\n placeholder: this.props.placeholder,\n spellCheck: 'false'\n }),\n this.props.label && !this.props.hideLabel ? _react2.default.createElement(\n 'span',\n { style: styles.label, onMouseDown: this.handleMouseDown },\n this.props.label\n ) : null\n );\n }\n }]);\n\n return EditableInput;\n}(_react.PureComponent || _react.Component);\n\nexports.default = EditableInput;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Hue = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _hue = require('../../helpers/hue');\n\nvar hue = _interopRequireWildcard(_hue);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Hue = exports.Hue = function (_ref) {\n _inherits(Hue, _ref);\n\n function Hue() {\n var _ref2;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Hue);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref2 = Hue.__proto__ || Object.getPrototypeOf(Hue)).call.apply(_ref2, [this].concat(args))), _this), _this.handleChange = function (e) {\n var change = hue.calculateChange(e, _this.props.direction, _this.props.hsl, _this.container);\n change && typeof _this.props.onChange === 'function' && _this.props.onChange(change, e);\n }, _this.handleMouseDown = function (e) {\n _this.handleChange(e);\n window.addEventListener('mousemove', _this.handleChange);\n window.addEventListener('mouseup', _this.handleMouseUp);\n }, _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Hue, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.unbindEventListeners();\n }\n }, {\n key: 'unbindEventListeners',\n value: function unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _props$direction = this.props.direction,\n direction = _props$direction === undefined ? 'horizontal' : _props$direction;\n\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n hue: {\n absolute: '0px 0px 0px 0px',\n borderRadius: this.props.radius,\n boxShadow: this.props.shadow\n },\n container: {\n padding: '0 2px',\n position: 'relative',\n height: '100%',\n borderRadius: this.props.radius\n },\n pointer: {\n position: 'absolute',\n left: this.props.hsl.h * 100 / 360 + '%'\n },\n slider: {\n marginTop: '1px',\n width: '4px',\n borderRadius: '1px',\n height: '8px',\n boxShadow: '0 0 2px rgba(0, 0, 0, .6)',\n background: '#fff',\n transform: 'translateX(-2px)'\n }\n },\n 'vertical': {\n pointer: {\n left: '0px',\n top: -(this.props.hsl.h * 100 / 360) + 100 + '%'\n }\n }\n }, { vertical: direction === 'vertical' });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.hue },\n _react2.default.createElement(\n 'div',\n {\n className: 'hue-' + direction,\n style: styles.container,\n ref: function ref(container) {\n return _this2.container = container;\n },\n onMouseDown: this.handleMouseDown,\n onTouchMove: this.handleChange,\n onTouchStart: this.handleChange\n },\n _react2.default.createElement(\n 'style',\n null,\n '\\n .hue-horizontal {\\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n }\\n\\n .hue-vertical {\\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\\n }\\n '\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.pointer },\n this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.slider })\n )\n )\n );\n }\n }]);\n\n return Hue;\n}(_react.PureComponent || _react.Component);\n\nexports.default = Hue;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar calculateChange = exports.calculateChange = function calculateChange(e, direction, hsl, container) {\n var containerWidth = container.clientWidth;\n var containerHeight = container.clientHeight;\n var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX;\n var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY;\n var left = x - (container.getBoundingClientRect().left + window.pageXOffset);\n var top = y - (container.getBoundingClientRect().top + window.pageYOffset);\n\n if (direction === 'vertical') {\n var h = void 0;\n if (top < 0) {\n h = 359;\n } else if (top > containerHeight) {\n h = 0;\n } else {\n var percent = -(top * 100 / containerHeight) + 100;\n h = 360 * percent / 100;\n }\n\n if (hsl.h !== h) {\n return {\n h: h,\n s: hsl.s,\n l: hsl.l,\n a: hsl.a,\n source: 'rgb'\n };\n }\n } else {\n var _h = void 0;\n if (left < 0) {\n _h = 0;\n } else if (left > containerWidth) {\n _h = 359;\n } else {\n var _percent = left * 100 / containerWidth;\n _h = 360 * _percent / 100;\n }\n\n if (hsl.h !== _h) {\n return {\n h: _h,\n s: hsl.s,\n l: hsl.l,\n a: hsl.a,\n source: 'rgb'\n };\n }\n }\n return null;\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Raised = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Raised = exports.Raised = function Raised(_ref) {\n var zDepth = _ref.zDepth,\n radius = _ref.radius,\n background = _ref.background,\n children = _ref.children,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n wrap: {\n position: 'relative',\n display: 'inline-block'\n },\n content: {\n position: 'relative'\n },\n bg: {\n absolute: '0px 0px 0px 0px',\n boxShadow: '0 ' + zDepth + 'px ' + zDepth * 4 + 'px rgba(0,0,0,.24)',\n borderRadius: radius,\n background: background\n }\n },\n 'zDepth-0': {\n bg: {\n boxShadow: 'none'\n }\n },\n\n 'zDepth-1': {\n bg: {\n boxShadow: '0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)'\n }\n },\n 'zDepth-2': {\n bg: {\n boxShadow: '0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)'\n }\n },\n 'zDepth-3': {\n bg: {\n boxShadow: '0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)'\n }\n },\n 'zDepth-4': {\n bg: {\n boxShadow: '0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)'\n }\n },\n 'zDepth-5': {\n bg: {\n boxShadow: '0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)'\n }\n },\n 'square': {\n bg: {\n borderRadius: '0'\n }\n },\n 'circle': {\n bg: {\n borderRadius: '50%'\n }\n }\n }, passedStyles), { 'zDepth-1': zDepth === 1 });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.wrap },\n _react2.default.createElement('div', { style: styles.bg }),\n _react2.default.createElement(\n 'div',\n { style: styles.content },\n children\n )\n );\n};\n\nRaised.propTypes = {\n background: _propTypes2.default.string,\n zDepth: _propTypes2.default.oneOf([0, 1, 2, 3, 4, 5]),\n radius: _propTypes2.default.number,\n styles: _propTypes2.default.object\n};\n\nRaised.defaultProps = {\n background: '#fff',\n zDepth: 1,\n radius: 2,\n styles: {}\n};\n\nexports.default = Raised;","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Saturation = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _throttle = require('lodash/throttle');\n\nvar _throttle2 = _interopRequireDefault(_throttle);\n\nvar _saturation = require('../../helpers/saturation');\n\nvar saturation = _interopRequireWildcard(_saturation);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Saturation = exports.Saturation = function (_ref) {\n _inherits(Saturation, _ref);\n\n function Saturation(props) {\n _classCallCheck(this, Saturation);\n\n var _this = _possibleConstructorReturn(this, (Saturation.__proto__ || Object.getPrototypeOf(Saturation)).call(this, props));\n\n _this.handleChange = function (e) {\n typeof _this.props.onChange === 'function' && _this.throttle(_this.props.onChange, saturation.calculateChange(e, _this.props.hsl, _this.container), e);\n };\n\n _this.handleMouseDown = function (e) {\n _this.handleChange(e);\n window.addEventListener('mousemove', _this.handleChange);\n window.addEventListener('mouseup', _this.handleMouseUp);\n };\n\n _this.handleMouseUp = function () {\n _this.unbindEventListeners();\n };\n\n _this.throttle = (0, _throttle2.default)(function (fn, data, e) {\n fn(data, e);\n }, 50);\n return _this;\n }\n\n _createClass(Saturation, [{\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n this.throttle.cancel();\n this.unbindEventListeners();\n }\n }, {\n key: 'unbindEventListeners',\n value: function unbindEventListeners() {\n window.removeEventListener('mousemove', this.handleChange);\n window.removeEventListener('mouseup', this.handleMouseUp);\n }\n }, {\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var _ref2 = this.props.style || {},\n color = _ref2.color,\n white = _ref2.white,\n black = _ref2.black,\n pointer = _ref2.pointer,\n circle = _ref2.circle;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n color: {\n absolute: '0px 0px 0px 0px',\n background: 'hsl(' + this.props.hsl.h + ',100%, 50%)',\n borderRadius: this.props.radius\n },\n white: {\n absolute: '0px 0px 0px 0px',\n borderRadius: this.props.radius\n },\n black: {\n absolute: '0px 0px 0px 0px',\n boxShadow: this.props.shadow,\n borderRadius: this.props.radius\n },\n pointer: {\n position: 'absolute',\n top: -(this.props.hsv.v * 100) + 100 + '%',\n left: this.props.hsv.s * 100 + '%',\n cursor: 'default'\n },\n circle: {\n width: '4px',\n height: '4px',\n boxShadow: '0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\\n 0 0 1px 2px rgba(0,0,0,.4)',\n borderRadius: '50%',\n cursor: 'hand',\n transform: 'translate(-2px, -2px)'\n }\n },\n 'custom': {\n color: color,\n white: white,\n black: black,\n pointer: pointer,\n circle: circle\n }\n }, { 'custom': !!this.props.style });\n\n return _react2.default.createElement(\n 'div',\n {\n style: styles.color,\n ref: function ref(container) {\n return _this2.container = container;\n },\n onMouseDown: this.handleMouseDown,\n onTouchMove: this.handleChange,\n onTouchStart: this.handleChange\n },\n _react2.default.createElement(\n 'style',\n null,\n '\\n .saturation-white {\\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\\n }\\n .saturation-black {\\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\\n }\\n '\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.white, className: 'saturation-white' },\n _react2.default.createElement('div', { style: styles.black, className: 'saturation-black' }),\n _react2.default.createElement(\n 'div',\n { style: styles.pointer },\n this.props.pointer ? _react2.default.createElement(this.props.pointer, this.props) : _react2.default.createElement('div', { style: styles.circle })\n )\n )\n );\n }\n }]);\n\n return Saturation;\n}(_react.PureComponent || _react.Component);\n\nexports.default = Saturation;","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nvar calculateChange = exports.calculateChange = function calculateChange(e, hsl, container) {\n var _container$getBoundin = container.getBoundingClientRect(),\n containerWidth = _container$getBoundin.width,\n containerHeight = _container$getBoundin.height;\n\n var x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX;\n var y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY;\n var left = x - (container.getBoundingClientRect().left + window.pageXOffset);\n var top = y - (container.getBoundingClientRect().top + window.pageYOffset);\n\n if (left < 0) {\n left = 0;\n } else if (left > containerWidth) {\n left = containerWidth;\n }\n\n if (top < 0) {\n top = 0;\n } else if (top > containerHeight) {\n top = containerHeight;\n }\n\n var saturation = left / containerWidth;\n var bright = 1 - top / containerHeight;\n\n return {\n h: hsl.h,\n s: saturation,\n v: bright,\n a: hsl.a,\n source: 'rgb'\n };\n};","module.exports = require('./forEach');\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Swatch = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _interaction = require('../../helpers/interaction');\n\nvar _Checkboard = require('./Checkboard');\n\nvar _Checkboard2 = _interopRequireDefault(_Checkboard);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ENTER = 13;\n\nvar Swatch = exports.Swatch = function Swatch(_ref) {\n var color = _ref.color,\n style = _ref.style,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === undefined ? function () {} : _ref$onClick,\n onHover = _ref.onHover,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? color : _ref$title,\n children = _ref.children,\n focus = _ref.focus,\n _ref$focusStyle = _ref.focusStyle,\n focusStyle = _ref$focusStyle === undefined ? {} : _ref$focusStyle;\n\n var transparent = color === 'transparent';\n var styles = (0, _reactcss2.default)({\n default: {\n swatch: _extends({\n background: color,\n height: '100%',\n width: '100%',\n cursor: 'pointer',\n position: 'relative',\n outline: 'none'\n }, style, focus ? focusStyle : {})\n }\n });\n\n var handleClick = function handleClick(e) {\n return onClick(color, e);\n };\n var handleKeyDown = function handleKeyDown(e) {\n return e.keyCode === ENTER && onClick(color, e);\n };\n var handleHover = function handleHover(e) {\n return onHover(color, e);\n };\n\n var optionalEvents = {};\n if (onHover) {\n optionalEvents.onMouseOver = handleHover;\n }\n\n return _react2.default.createElement(\n 'div',\n _extends({\n style: styles.swatch,\n onClick: handleClick,\n title: title,\n tabIndex: 0,\n onKeyDown: handleKeyDown\n }, optionalEvents),\n children,\n transparent && _react2.default.createElement(_Checkboard2.default, {\n borderRadius: styles.swatch.borderRadius,\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,0.1)'\n })\n );\n};\n\nexports.default = (0, _interaction.handleFocus)(Swatch);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.handleFocus = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable no-invalid-this */\n\n\nvar handleFocus = exports.handleFocus = function handleFocus(Component) {\n var Span = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'span';\n return function (_React$Component) {\n _inherits(Focus, _React$Component);\n\n function Focus() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Focus);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Focus.__proto__ || Object.getPrototypeOf(Focus)).call.apply(_ref, [this].concat(args))), _this), _this.state = { focus: false }, _this.handleFocus = function () {\n return _this.setState({ focus: true });\n }, _this.handleBlur = function () {\n return _this.setState({ focus: false });\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Focus, [{\n key: 'render',\n value: function render() {\n return _react2.default.createElement(\n Span,\n { onFocus: this.handleFocus, onBlur: this.handleBlur },\n _react2.default.createElement(Component, _extends({}, this.props, this.state))\n );\n }\n }]);\n\n return Focus;\n }(_react2.default.Component);\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.AlphaPointer = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar AlphaPointer = exports.AlphaPointer = function AlphaPointer(_ref) {\n var direction = _ref.direction;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n width: '18px',\n height: '18px',\n borderRadius: '50%',\n transform: 'translate(-9px, -1px)',\n backgroundColor: 'rgb(248, 248, 248)',\n boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)'\n }\n },\n 'vertical': {\n picker: {\n transform: 'translate(-3px, -9px)'\n }\n }\n }, { vertical: direction === 'vertical' });\n\n return _react2.default.createElement('div', { style: styles.picker });\n};\n\nexports.default = AlphaPointer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Block = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nvar _BlockSwatches = require('./BlockSwatches');\n\nvar _BlockSwatches2 = _interopRequireDefault(_BlockSwatches);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Block = exports.Block = function Block(_ref) {\n var onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n hex = _ref.hex,\n colors = _ref.colors,\n width = _ref.width,\n triangle = _ref.triangle,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var transparent = hex === 'transparent';\n var handleChange = function handleChange(hexCode, e) {\n _color2.default.isValidHex(hexCode) && onChange({\n hex: hexCode,\n source: 'hex'\n }, e);\n };\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n card: {\n width: width,\n background: '#fff',\n boxShadow: '0 1px rgba(0,0,0,.1)',\n borderRadius: '6px',\n position: 'relative'\n },\n head: {\n height: '110px',\n background: hex,\n borderRadius: '6px 6px 0 0',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative'\n },\n body: {\n padding: '10px'\n },\n label: {\n fontSize: '18px',\n color: _color2.default.getContrastingColor(hex),\n position: 'relative'\n },\n triangle: {\n width: '0px',\n height: '0px',\n borderStyle: 'solid',\n borderWidth: '0 10px 10px 10px',\n borderColor: 'transparent transparent ' + hex + ' transparent',\n position: 'absolute',\n top: '-10px',\n left: '50%',\n marginLeft: '-10px'\n },\n input: {\n width: '100%',\n fontSize: '12px',\n color: '#666',\n border: '0px',\n outline: 'none',\n height: '22px',\n boxShadow: 'inset 0 0 0 1px #ddd',\n borderRadius: '4px',\n padding: '0 7px',\n boxSizing: 'border-box'\n }\n },\n 'hide-triangle': {\n triangle: {\n display: 'none'\n }\n }\n }, passedStyles), { 'hide-triangle': triangle === 'hide' });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.card, className: 'block-picker ' + className },\n _react2.default.createElement('div', { style: styles.triangle }),\n _react2.default.createElement(\n 'div',\n { style: styles.head },\n transparent && _react2.default.createElement(_common.Checkboard, { borderRadius: '6px 6px 0 0' }),\n _react2.default.createElement(\n 'div',\n { style: styles.label },\n hex\n )\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.body },\n _react2.default.createElement(_BlockSwatches2.default, { colors: colors, onClick: handleChange, onSwatchHover: onSwatchHover }),\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input },\n value: hex,\n onChange: handleChange\n })\n )\n );\n};\n\nBlock.propTypes = {\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n colors: _propTypes2.default.arrayOf(_propTypes2.default.string),\n triangle: _propTypes2.default.oneOf(['top', 'hide']),\n styles: _propTypes2.default.object\n};\n\nBlock.defaultProps = {\n width: 170,\n colors: ['#D9E3F0', '#F47373', '#697689', '#37D67A', '#2CCCE4', '#555555', '#dce775', '#ff8a65', '#ba68c8'],\n triangle: 'top',\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Block);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.BlockSwatches = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _map = require('lodash/map');\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar BlockSwatches = exports.BlockSwatches = function BlockSwatches(_ref) {\n var colors = _ref.colors,\n onClick = _ref.onClick,\n onSwatchHover = _ref.onSwatchHover;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n swatches: {\n marginRight: '-10px'\n },\n swatch: {\n width: '22px',\n height: '22px',\n float: 'left',\n marginRight: '10px',\n marginBottom: '10px',\n borderRadius: '4px'\n },\n clear: {\n clear: 'both'\n }\n }\n });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.swatches },\n (0, _map2.default)(colors, function (c) {\n return _react2.default.createElement(_common.Swatch, {\n key: c,\n color: c,\n style: styles.swatch,\n onClick: onClick,\n onHover: onSwatchHover,\n focusStyle: {\n boxShadow: '0 0 4px ' + c\n }\n });\n }),\n _react2.default.createElement('div', { style: styles.clear })\n );\n};\n\nexports.default = BlockSwatches;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Circle = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _map = require('lodash/map');\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _materialColors = require('material-colors');\n\nvar material = _interopRequireWildcard(_materialColors);\n\nvar _common = require('../common');\n\nvar _CircleSwatch = require('./CircleSwatch');\n\nvar _CircleSwatch2 = _interopRequireDefault(_CircleSwatch);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Circle = exports.Circle = function Circle(_ref) {\n var width = _ref.width,\n onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n colors = _ref.colors,\n hex = _ref.hex,\n circleSize = _ref.circleSize,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n circleSpacing = _ref.circleSpacing,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n card: {\n width: width,\n display: 'flex',\n flexWrap: 'wrap',\n marginRight: -circleSpacing,\n marginBottom: -circleSpacing\n }\n }\n }, passedStyles));\n\n var handleChange = function handleChange(hexCode, e) {\n return onChange({ hex: hexCode, source: 'hex' }, e);\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.card, className: 'circle-picker ' + className },\n (0, _map2.default)(colors, function (c) {\n return _react2.default.createElement(_CircleSwatch2.default, {\n key: c,\n color: c,\n onClick: handleChange,\n onSwatchHover: onSwatchHover,\n active: hex === c.toLowerCase(),\n circleSize: circleSize,\n circleSpacing: circleSpacing\n });\n })\n );\n};\n\nCircle.propTypes = {\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n circleSize: _propTypes2.default.number,\n circleSpacing: _propTypes2.default.number,\n styles: _propTypes2.default.object\n};\n\nCircle.defaultProps = {\n width: 252,\n circleSize: 28,\n circleSpacing: 14,\n colors: [material.red['500'], material.pink['500'], material.purple['500'], material.deepPurple['500'], material.indigo['500'], material.blue['500'], material.lightBlue['500'], material.cyan['500'], material.teal['500'], material.green['500'], material.lightGreen['500'], material.lime['500'], material.yellow['500'], material.amber['500'], material.orange['500'], material.deepOrange['500'], material.brown['500'], material.blueGrey['500']],\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Circle);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CircleSwatch = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar CircleSwatch = exports.CircleSwatch = function CircleSwatch(_ref) {\n var color = _ref.color,\n onClick = _ref.onClick,\n onSwatchHover = _ref.onSwatchHover,\n hover = _ref.hover,\n active = _ref.active,\n circleSize = _ref.circleSize,\n circleSpacing = _ref.circleSpacing;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n swatch: {\n width: circleSize,\n height: circleSize,\n marginRight: circleSpacing,\n marginBottom: circleSpacing,\n transform: 'scale(1)',\n transition: '100ms transform ease'\n },\n Swatch: {\n borderRadius: '50%',\n background: 'transparent',\n boxShadow: 'inset 0 0 0 ' + circleSize / 2 + 'px ' + color,\n transition: '100ms box-shadow ease'\n }\n },\n 'hover': {\n swatch: {\n transform: 'scale(1.2)'\n }\n },\n 'active': {\n Swatch: {\n boxShadow: 'inset 0 0 0 3px ' + color\n }\n }\n }, { hover: hover, active: active });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement(_common.Swatch, {\n style: styles.Swatch,\n color: color,\n onClick: onClick,\n onHover: onSwatchHover,\n focusStyle: { boxShadow: styles.Swatch.boxShadow + ', 0 0 5px ' + color }\n })\n );\n};\n\nCircleSwatch.defaultProps = {\n circleSize: 28,\n circleSpacing: 14\n};\n\nexports.default = (0, _reactcss.handleHover)(CircleSwatch);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Chrome = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _common = require('../common');\n\nvar _ChromeFields = require('./ChromeFields');\n\nvar _ChromeFields2 = _interopRequireDefault(_ChromeFields);\n\nvar _ChromePointer = require('./ChromePointer');\n\nvar _ChromePointer2 = _interopRequireDefault(_ChromePointer);\n\nvar _ChromePointerCircle = require('./ChromePointerCircle');\n\nvar _ChromePointerCircle2 = _interopRequireDefault(_ChromePointerCircle);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Chrome = exports.Chrome = function Chrome(_ref) {\n var width = _ref.width,\n onChange = _ref.onChange,\n disableAlpha = _ref.disableAlpha,\n rgb = _ref.rgb,\n hsl = _ref.hsl,\n hsv = _ref.hsv,\n hex = _ref.hex,\n renderers = _ref.renderers,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className,\n defaultView = _ref.defaultView;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n picker: {\n width: width,\n background: '#fff',\n borderRadius: '2px',\n boxShadow: '0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)',\n boxSizing: 'initial',\n fontFamily: 'Menlo'\n },\n saturation: {\n width: '100%',\n paddingBottom: '55%',\n position: 'relative',\n borderRadius: '2px 2px 0 0',\n overflow: 'hidden'\n },\n Saturation: {\n radius: '2px 2px 0 0'\n },\n body: {\n padding: '16px 16px 12px'\n },\n controls: {\n display: 'flex'\n },\n color: {\n width: '32px'\n },\n swatch: {\n marginTop: '6px',\n width: '16px',\n height: '16px',\n borderRadius: '8px',\n position: 'relative',\n overflow: 'hidden'\n },\n active: {\n absolute: '0px 0px 0px 0px',\n borderRadius: '8px',\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.1)',\n background: 'rgba(' + rgb.r + ', ' + rgb.g + ', ' + rgb.b + ', ' + rgb.a + ')',\n zIndex: '2'\n },\n toggles: {\n flex: '1'\n },\n hue: {\n height: '10px',\n position: 'relative',\n marginBottom: '8px'\n },\n Hue: {\n radius: '2px'\n },\n alpha: {\n height: '10px',\n position: 'relative'\n },\n Alpha: {\n radius: '2px'\n }\n },\n 'disableAlpha': {\n color: {\n width: '22px'\n },\n alpha: {\n display: 'none'\n },\n hue: {\n marginBottom: '0px'\n },\n swatch: {\n width: '10px',\n height: '10px',\n marginTop: '0px'\n }\n }\n }, passedStyles), { disableAlpha: disableAlpha });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.picker, className: 'chrome-picker ' + className },\n _react2.default.createElement(\n 'div',\n { style: styles.saturation },\n _react2.default.createElement(_common.Saturation, {\n style: styles.Saturation,\n hsl: hsl,\n hsv: hsv,\n pointer: _ChromePointerCircle2.default,\n onChange: onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.body },\n _react2.default.createElement(\n 'div',\n { style: styles.controls, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.color },\n _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement('div', { style: styles.active }),\n _react2.default.createElement(_common.Checkboard, { renderers: renderers })\n )\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.toggles },\n _react2.default.createElement(\n 'div',\n { style: styles.hue },\n _react2.default.createElement(_common.Hue, {\n style: styles.Hue,\n hsl: hsl,\n pointer: _ChromePointer2.default,\n onChange: onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(_common.Alpha, {\n style: styles.Alpha,\n rgb: rgb,\n hsl: hsl,\n pointer: _ChromePointer2.default,\n renderers: renderers,\n onChange: onChange\n })\n )\n )\n ),\n _react2.default.createElement(_ChromeFields2.default, {\n rgb: rgb,\n hsl: hsl,\n hex: hex,\n view: defaultView,\n onChange: onChange,\n disableAlpha: disableAlpha\n })\n )\n );\n};\n\nChrome.propTypes = {\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n disableAlpha: _propTypes2.default.bool,\n styles: _propTypes2.default.object,\n defaultView: _propTypes2.default.oneOf([\"hex\", \"rgb\", \"hsl\"])\n};\n\nChrome.defaultProps = {\n width: 225,\n disableAlpha: false,\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Chrome);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ChromeFields = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nvar _UnfoldMoreHorizontalIcon = require('@icons/material/UnfoldMoreHorizontalIcon');\n\nvar _UnfoldMoreHorizontalIcon2 = _interopRequireDefault(_UnfoldMoreHorizontalIcon);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint-disable react/no-did-mount-set-state, no-param-reassign */\n\nvar ChromeFields = exports.ChromeFields = function (_React$Component) {\n _inherits(ChromeFields, _React$Component);\n\n function ChromeFields(props) {\n _classCallCheck(this, ChromeFields);\n\n var _this = _possibleConstructorReturn(this, (ChromeFields.__proto__ || Object.getPrototypeOf(ChromeFields)).call(this));\n\n _this.toggleViews = function () {\n if (_this.state.view === 'hex') {\n _this.setState({ view: 'rgb' });\n } else if (_this.state.view === 'rgb') {\n _this.setState({ view: 'hsl' });\n } else if (_this.state.view === 'hsl') {\n if (_this.props.hsl.a === 1) {\n _this.setState({ view: 'hex' });\n } else {\n _this.setState({ view: 'rgb' });\n }\n }\n };\n\n _this.handleChange = function (data, e) {\n if (data.hex) {\n _color2.default.isValidHex(data.hex) && _this.props.onChange({\n hex: data.hex,\n source: 'hex'\n }, e);\n } else if (data.r || data.g || data.b) {\n _this.props.onChange({\n r: data.r || _this.props.rgb.r,\n g: data.g || _this.props.rgb.g,\n b: data.b || _this.props.rgb.b,\n source: 'rgb'\n }, e);\n } else if (data.a) {\n if (data.a < 0) {\n data.a = 0;\n } else if (data.a > 1) {\n data.a = 1;\n }\n\n _this.props.onChange({\n h: _this.props.hsl.h,\n s: _this.props.hsl.s,\n l: _this.props.hsl.l,\n a: Math.round(data.a * 100) / 100,\n source: 'rgb'\n }, e);\n } else if (data.h || data.s || data.l) {\n // Remove any occurances of '%'.\n if (typeof data.s === 'string' && data.s.includes('%')) {\n data.s = data.s.replace('%', '');\n }\n if (typeof data.l === 'string' && data.l.includes('%')) {\n data.l = data.l.replace('%', '');\n }\n\n _this.props.onChange({\n h: data.h || _this.props.hsl.h,\n s: Number(data.s && data.s || _this.props.hsl.s),\n l: Number(data.l && data.l || _this.props.hsl.l),\n source: 'hsl'\n }, e);\n }\n };\n\n _this.showHighlight = function (e) {\n e.currentTarget.style.background = '#eee';\n };\n\n _this.hideHighlight = function (e) {\n e.currentTarget.style.background = 'transparent';\n };\n\n if (props.hsl.a !== 1 && props.view === \"hex\") {\n _this.state = {\n view: \"rgb\"\n };\n } else {\n _this.state = {\n view: props.view\n };\n }\n return _this;\n }\n\n _createClass(ChromeFields, [{\n key: 'render',\n value: function render() {\n var _this2 = this;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n wrap: {\n paddingTop: '16px',\n display: 'flex'\n },\n fields: {\n flex: '1',\n display: 'flex',\n marginLeft: '-6px'\n },\n field: {\n paddingLeft: '6px',\n width: '100%'\n },\n alpha: {\n paddingLeft: '6px',\n width: '100%'\n },\n toggle: {\n width: '32px',\n textAlign: 'right',\n position: 'relative'\n },\n icon: {\n marginRight: '-4px',\n marginTop: '12px',\n cursor: 'pointer',\n position: 'relative'\n },\n iconHighlight: {\n position: 'absolute',\n width: '24px',\n height: '28px',\n background: '#eee',\n borderRadius: '4px',\n top: '10px',\n left: '12px',\n display: 'none'\n },\n input: {\n fontSize: '11px',\n color: '#333',\n width: '100%',\n borderRadius: '2px',\n border: 'none',\n boxShadow: 'inset 0 0 0 1px #dadada',\n height: '21px',\n textAlign: 'center'\n },\n label: {\n textTransform: 'uppercase',\n fontSize: '11px',\n lineHeight: '11px',\n color: '#969696',\n textAlign: 'center',\n display: 'block',\n marginTop: '12px'\n },\n svg: {\n fill: '#333',\n width: '24px',\n height: '24px',\n border: '1px transparent solid',\n borderRadius: '5px'\n }\n },\n 'disableAlpha': {\n alpha: {\n display: 'none'\n }\n }\n }, this.props, this.state);\n\n var fields = void 0;\n if (this.state.view === 'hex') {\n fields = _react2.default.createElement(\n 'div',\n { style: styles.fields, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.field },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'hex', value: this.props.hex,\n onChange: this.handleChange\n })\n )\n );\n } else if (this.state.view === 'rgb') {\n fields = _react2.default.createElement(\n 'div',\n { style: styles.fields, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.field },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'r',\n value: this.props.rgb.r,\n onChange: this.handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.field },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'g',\n value: this.props.rgb.g,\n onChange: this.handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.field },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'b',\n value: this.props.rgb.b,\n onChange: this.handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'a',\n value: this.props.rgb.a,\n arrowOffset: 0.01,\n onChange: this.handleChange\n })\n )\n );\n } else if (this.state.view === 'hsl') {\n fields = _react2.default.createElement(\n 'div',\n { style: styles.fields, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.field },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'h',\n value: Math.round(this.props.hsl.h),\n onChange: this.handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.field },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 's',\n value: Math.round(this.props.hsl.s * 100) + '%',\n onChange: this.handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.field },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'l',\n value: Math.round(this.props.hsl.l * 100) + '%',\n onChange: this.handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'a',\n value: this.props.hsl.a,\n arrowOffset: 0.01,\n onChange: this.handleChange\n })\n )\n );\n }\n\n return _react2.default.createElement(\n 'div',\n { style: styles.wrap, className: 'flexbox-fix' },\n fields,\n _react2.default.createElement(\n 'div',\n { style: styles.toggle },\n _react2.default.createElement(\n 'div',\n { style: styles.icon, onClick: this.toggleViews, ref: function ref(icon) {\n return _this2.icon = icon;\n } },\n _react2.default.createElement(_UnfoldMoreHorizontalIcon2.default, {\n style: styles.svg,\n onMouseOver: this.showHighlight,\n onMouseEnter: this.showHighlight,\n onMouseOut: this.hideHighlight\n })\n )\n )\n );\n }\n }], [{\n key: 'getDerivedStateFromProps',\n value: function getDerivedStateFromProps(nextProps, state) {\n if (nextProps.hsl.a !== 1 && state.view === 'hex') {\n return { view: 'rgb' };\n }\n return null;\n }\n }]);\n\n return ChromeFields;\n}(_react2.default.Component);\n\nChromeFields.defaultProps = {\n view: \"hex\"\n};\n\nexports.default = ChromeFields;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar DEFAULT_SIZE = 24;\n\nexports.default = function (_ref) {\n var _ref$fill = _ref.fill,\n fill = _ref$fill === undefined ? 'currentColor' : _ref$fill,\n _ref$width = _ref.width,\n width = _ref$width === undefined ? DEFAULT_SIZE : _ref$width,\n _ref$height = _ref.height,\n height = _ref$height === undefined ? DEFAULT_SIZE : _ref$height,\n _ref$style = _ref.style,\n style = _ref$style === undefined ? {} : _ref$style,\n props = _objectWithoutProperties(_ref, ['fill', 'width', 'height', 'style']);\n\n return _react2.default.createElement(\n 'svg',\n _extends({\n viewBox: '0 0 ' + DEFAULT_SIZE + ' ' + DEFAULT_SIZE,\n style: _extends({ fill: fill, width: width, height: height }, style)\n }, props),\n _react2.default.createElement('path', { d: 'M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z' })\n );\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ChromePointer = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ChromePointer = exports.ChromePointer = function ChromePointer() {\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n width: '12px',\n height: '12px',\n borderRadius: '6px',\n transform: 'translate(-6px, -1px)',\n backgroundColor: 'rgb(248, 248, 248)',\n boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)'\n }\n }\n });\n\n return _react2.default.createElement('div', { style: styles.picker });\n};\n\nexports.default = ChromePointer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.ChromePointerCircle = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ChromePointerCircle = exports.ChromePointerCircle = function ChromePointerCircle() {\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n width: '12px',\n height: '12px',\n borderRadius: '6px',\n boxShadow: 'inset 0 0 0 1px #fff',\n transform: 'translate(-6px, -6px)'\n }\n }\n });\n\n return _react2.default.createElement('div', { style: styles.picker });\n};\n\nexports.default = ChromePointerCircle;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Compact = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _map = require('lodash/map');\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nvar _CompactColor = require('./CompactColor');\n\nvar _CompactColor2 = _interopRequireDefault(_CompactColor);\n\nvar _CompactFields = require('./CompactFields');\n\nvar _CompactFields2 = _interopRequireDefault(_CompactFields);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Compact = exports.Compact = function Compact(_ref) {\n var onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n colors = _ref.colors,\n hex = _ref.hex,\n rgb = _ref.rgb,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n Compact: {\n background: '#f6f6f6',\n radius: '4px'\n },\n compact: {\n paddingTop: '5px',\n paddingLeft: '5px',\n boxSizing: 'initial',\n width: '240px'\n },\n clear: {\n clear: 'both'\n }\n }\n }, passedStyles));\n\n var handleChange = function handleChange(data, e) {\n if (data.hex) {\n _color2.default.isValidHex(data.hex) && onChange({\n hex: data.hex,\n source: 'hex'\n }, e);\n } else {\n onChange(data, e);\n }\n };\n\n return _react2.default.createElement(\n _common.Raised,\n { style: styles.Compact, styles: passedStyles },\n _react2.default.createElement(\n 'div',\n { style: styles.compact, className: 'compact-picker ' + className },\n _react2.default.createElement(\n 'div',\n null,\n (0, _map2.default)(colors, function (c) {\n return _react2.default.createElement(_CompactColor2.default, {\n key: c,\n color: c,\n active: c.toLowerCase() === hex,\n onClick: handleChange,\n onSwatchHover: onSwatchHover\n });\n }),\n _react2.default.createElement('div', { style: styles.clear })\n ),\n _react2.default.createElement(_CompactFields2.default, { hex: hex, rgb: rgb, onChange: handleChange })\n )\n );\n};\n\nCompact.propTypes = {\n colors: _propTypes2.default.arrayOf(_propTypes2.default.string),\n styles: _propTypes2.default.object\n};\n\nCompact.defaultProps = {\n colors: ['#4D4D4D', '#999999', '#FFFFFF', '#F44E3B', '#FE9200', '#FCDC00', '#DBDF00', '#A4DD00', '#68CCCA', '#73D8FF', '#AEA1FF', '#FDA1FF', '#333333', '#808080', '#cccccc', '#D33115', '#E27300', '#FCC400', '#B0BC00', '#68BC00', '#16A5A5', '#009CE0', '#7B64FF', '#FA28FF', '#000000', '#666666', '#B3B3B3', '#9F0500', '#C45100', '#FB9E00', '#808900', '#194D33', '#0C797D', '#0062B1', '#653294', '#AB149E'],\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Compact);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CompactColor = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar CompactColor = exports.CompactColor = function CompactColor(_ref) {\n var color = _ref.color,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === undefined ? function () {} : _ref$onClick,\n onSwatchHover = _ref.onSwatchHover,\n active = _ref.active;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n color: {\n background: color,\n width: '15px',\n height: '15px',\n float: 'left',\n marginRight: '5px',\n marginBottom: '5px',\n position: 'relative',\n cursor: 'pointer'\n },\n dot: {\n absolute: '5px 5px 5px 5px',\n background: _color2.default.getContrastingColor(color),\n borderRadius: '50%',\n opacity: '0'\n }\n },\n 'active': {\n dot: {\n opacity: '1'\n }\n },\n 'color-#FFFFFF': {\n color: {\n boxShadow: 'inset 0 0 0 1px #ddd'\n },\n dot: {\n background: '#000'\n }\n },\n 'transparent': {\n dot: {\n background: '#000'\n }\n }\n }, { active: active, 'color-#FFFFFF': color === '#FFFFFF', 'transparent': color === 'transparent' });\n\n return _react2.default.createElement(\n _common.Swatch,\n {\n style: styles.color,\n color: color,\n onClick: onClick,\n onHover: onSwatchHover,\n focusStyle: { boxShadow: '0 0 4px ' + color }\n },\n _react2.default.createElement('div', { style: styles.dot })\n );\n};\n\nexports.default = CompactColor;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CompactFields = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar CompactFields = exports.CompactFields = function CompactFields(_ref) {\n var hex = _ref.hex,\n rgb = _ref.rgb,\n onChange = _ref.onChange;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n fields: {\n display: 'flex',\n paddingBottom: '6px',\n paddingRight: '5px',\n position: 'relative'\n },\n active: {\n position: 'absolute',\n top: '6px',\n left: '5px',\n height: '9px',\n width: '9px',\n background: hex\n },\n HEXwrap: {\n flex: '6',\n position: 'relative'\n },\n HEXinput: {\n width: '80%',\n padding: '0px',\n paddingLeft: '20%',\n border: 'none',\n outline: 'none',\n background: 'none',\n fontSize: '12px',\n color: '#333',\n height: '16px'\n },\n HEXlabel: {\n display: 'none'\n },\n RGBwrap: {\n flex: '3',\n position: 'relative'\n },\n RGBinput: {\n width: '70%',\n padding: '0px',\n paddingLeft: '30%',\n border: 'none',\n outline: 'none',\n background: 'none',\n fontSize: '12px',\n color: '#333',\n height: '16px'\n },\n RGBlabel: {\n position: 'absolute',\n top: '3px',\n left: '0px',\n lineHeight: '16px',\n textTransform: 'uppercase',\n fontSize: '12px',\n color: '#999'\n }\n }\n });\n\n var handleChange = function handleChange(data, e) {\n if (data.r || data.g || data.b) {\n onChange({\n r: data.r || rgb.r,\n g: data.g || rgb.g,\n b: data.b || rgb.b,\n source: 'rgb'\n }, e);\n } else {\n onChange({\n hex: data.hex,\n source: 'hex'\n }, e);\n }\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.fields, className: 'flexbox-fix' },\n _react2.default.createElement('div', { style: styles.active }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel },\n label: 'hex',\n value: hex,\n onChange: handleChange\n }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'r',\n value: rgb.r,\n onChange: handleChange\n }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'g',\n value: rgb.g,\n onChange: handleChange\n }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'b',\n value: rgb.b,\n onChange: handleChange\n })\n );\n};\n\nexports.default = CompactFields;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Github = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _map = require('lodash/map');\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _common = require('../common');\n\nvar _GithubSwatch = require('./GithubSwatch');\n\nvar _GithubSwatch2 = _interopRequireDefault(_GithubSwatch);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Github = exports.Github = function Github(_ref) {\n var width = _ref.width,\n colors = _ref.colors,\n onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n triangle = _ref.triangle,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n card: {\n width: width,\n background: '#fff',\n border: '1px solid rgba(0,0,0,0.2)',\n boxShadow: '0 3px 12px rgba(0,0,0,0.15)',\n borderRadius: '4px',\n position: 'relative',\n padding: '5px',\n display: 'flex',\n flexWrap: 'wrap'\n },\n triangle: {\n position: 'absolute',\n border: '7px solid transparent',\n borderBottomColor: '#fff'\n },\n triangleShadow: {\n position: 'absolute',\n border: '8px solid transparent',\n borderBottomColor: 'rgba(0,0,0,0.15)'\n }\n },\n 'hide-triangle': {\n triangle: {\n display: 'none'\n },\n triangleShadow: {\n display: 'none'\n }\n },\n 'top-left-triangle': {\n triangle: {\n top: '-14px',\n left: '10px'\n },\n triangleShadow: {\n top: '-16px',\n left: '9px'\n }\n },\n 'top-right-triangle': {\n triangle: {\n top: '-14px',\n right: '10px'\n },\n triangleShadow: {\n top: '-16px',\n right: '9px'\n }\n },\n 'bottom-left-triangle': {\n triangle: {\n top: '35px',\n left: '10px',\n transform: 'rotate(180deg)'\n },\n triangleShadow: {\n top: '37px',\n left: '9px',\n transform: 'rotate(180deg)'\n }\n },\n 'bottom-right-triangle': {\n triangle: {\n top: '35px',\n right: '10px',\n transform: 'rotate(180deg)'\n },\n triangleShadow: {\n top: '37px',\n right: '9px',\n transform: 'rotate(180deg)'\n }\n }\n }, passedStyles), {\n 'hide-triangle': triangle === 'hide',\n 'top-left-triangle': triangle === 'top-left',\n 'top-right-triangle': triangle === 'top-right',\n 'bottom-left-triangle': triangle === 'bottom-left',\n 'bottom-right-triangle': triangle === 'bottom-right'\n });\n\n var handleChange = function handleChange(hex, e) {\n return onChange({ hex: hex, source: 'hex' }, e);\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.card, className: 'github-picker ' + className },\n _react2.default.createElement('div', { style: styles.triangleShadow }),\n _react2.default.createElement('div', { style: styles.triangle }),\n (0, _map2.default)(colors, function (c) {\n return _react2.default.createElement(_GithubSwatch2.default, {\n color: c,\n key: c,\n onClick: handleChange,\n onSwatchHover: onSwatchHover\n });\n })\n );\n};\n\nGithub.propTypes = {\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n colors: _propTypes2.default.arrayOf(_propTypes2.default.string),\n triangle: _propTypes2.default.oneOf(['hide', 'top-left', 'top-right', 'bottom-left', 'bottom-right']),\n styles: _propTypes2.default.object\n};\n\nGithub.defaultProps = {\n width: 200,\n colors: ['#B80000', '#DB3E00', '#FCCB00', '#008B02', '#006B76', '#1273DE', '#004DCF', '#5300EB', '#EB9694', '#FAD0C3', '#FEF3BD', '#C1E1C5', '#BEDADC', '#C4DEF6', '#BED3F3', '#D4C4FB'],\n triangle: 'top-left',\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Github);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.GithubSwatch = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar GithubSwatch = exports.GithubSwatch = function GithubSwatch(_ref) {\n var hover = _ref.hover,\n color = _ref.color,\n onClick = _ref.onClick,\n onSwatchHover = _ref.onSwatchHover;\n\n var hoverSwatch = {\n position: 'relative',\n zIndex: '2',\n outline: '2px solid #fff',\n boxShadow: '0 0 5px 2px rgba(0,0,0,0.25)'\n };\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n swatch: {\n width: '25px',\n height: '25px',\n fontSize: '0'\n }\n },\n 'hover': {\n swatch: hoverSwatch\n }\n }, { hover: hover });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement(_common.Swatch, {\n color: color,\n onClick: onClick,\n onHover: onSwatchHover,\n focusStyle: hoverSwatch\n })\n );\n};\n\nexports.default = (0, _reactcss.handleHover)(GithubSwatch);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.HuePicker = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _common = require('../common');\n\nvar _HuePointer = require('./HuePointer');\n\nvar _HuePointer2 = _interopRequireDefault(_HuePointer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar HuePicker = exports.HuePicker = function HuePicker(_ref) {\n var width = _ref.width,\n height = _ref.height,\n onChange = _ref.onChange,\n hsl = _ref.hsl,\n direction = _ref.direction,\n pointer = _ref.pointer,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n picker: {\n position: 'relative',\n width: width,\n height: height\n },\n hue: {\n radius: '2px'\n }\n }\n }, passedStyles));\n\n // Overwrite to provide pure hue color\n var handleChange = function handleChange(data) {\n return onChange({ a: 1, h: data.h, l: 0.5, s: 1 });\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.picker, className: 'hue-picker ' + className },\n _react2.default.createElement(_common.Hue, _extends({}, styles.hue, {\n hsl: hsl,\n pointer: pointer,\n onChange: handleChange,\n direction: direction\n }))\n );\n};\n\nHuePicker.propTypes = {\n styles: _propTypes2.default.object\n};\nHuePicker.defaultProps = {\n width: '316px',\n height: '16px',\n direction: 'horizontal',\n pointer: _HuePointer2.default,\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(HuePicker);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SliderPointer = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SliderPointer = exports.SliderPointer = function SliderPointer(_ref) {\n var direction = _ref.direction;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n width: '18px',\n height: '18px',\n borderRadius: '50%',\n transform: 'translate(-9px, -1px)',\n backgroundColor: 'rgb(248, 248, 248)',\n boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)'\n }\n },\n 'vertical': {\n picker: {\n transform: 'translate(-3px, -9px)'\n }\n }\n }, { vertical: direction === 'vertical' });\n\n return _react2.default.createElement('div', { style: styles.picker });\n};\n\nexports.default = SliderPointer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Material = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Material = exports.Material = function Material(_ref) {\n var onChange = _ref.onChange,\n hex = _ref.hex,\n rgb = _ref.rgb,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n material: {\n width: '98px',\n height: '98px',\n padding: '16px',\n fontFamily: 'Roboto'\n },\n HEXwrap: {\n position: 'relative'\n },\n HEXinput: {\n width: '100%',\n marginTop: '12px',\n fontSize: '15px',\n color: '#333',\n padding: '0px',\n border: '0px',\n borderBottom: '2px solid ' + hex,\n outline: 'none',\n height: '30px'\n },\n HEXlabel: {\n position: 'absolute',\n top: '0px',\n left: '0px',\n fontSize: '11px',\n color: '#999999',\n textTransform: 'capitalize'\n },\n Hex: {\n style: {}\n },\n RGBwrap: {\n position: 'relative'\n },\n RGBinput: {\n width: '100%',\n marginTop: '12px',\n fontSize: '15px',\n color: '#333',\n padding: '0px',\n border: '0px',\n borderBottom: '1px solid #eee',\n outline: 'none',\n height: '30px'\n },\n RGBlabel: {\n position: 'absolute',\n top: '0px',\n left: '0px',\n fontSize: '11px',\n color: '#999999',\n textTransform: 'capitalize'\n },\n split: {\n display: 'flex',\n marginRight: '-10px',\n paddingTop: '11px'\n },\n third: {\n flex: '1',\n paddingRight: '10px'\n }\n }\n }, passedStyles));\n\n var handleChange = function handleChange(data, e) {\n if (data.hex) {\n _color2.default.isValidHex(data.hex) && onChange({\n hex: data.hex,\n source: 'hex'\n }, e);\n } else if (data.r || data.g || data.b) {\n onChange({\n r: data.r || rgb.r,\n g: data.g || rgb.g,\n b: data.b || rgb.b,\n source: 'rgb'\n }, e);\n }\n };\n\n return _react2.default.createElement(\n _common.Raised,\n { styles: passedStyles },\n _react2.default.createElement(\n 'div',\n { style: styles.material, className: 'material-picker ' + className },\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel },\n label: 'hex',\n value: hex,\n onChange: handleChange\n }),\n _react2.default.createElement(\n 'div',\n { style: styles.split, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.third },\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'r', value: rgb.r,\n onChange: handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.third },\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'g',\n value: rgb.g,\n onChange: handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.third },\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'b',\n value: rgb.b,\n onChange: handleChange\n })\n )\n )\n )\n );\n};\n\nexports.default = (0, _common.ColorWrap)(Material);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Photoshop = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _common = require('../common');\n\nvar _PhotoshopFields = require('./PhotoshopFields');\n\nvar _PhotoshopFields2 = _interopRequireDefault(_PhotoshopFields);\n\nvar _PhotoshopPointerCircle = require('./PhotoshopPointerCircle');\n\nvar _PhotoshopPointerCircle2 = _interopRequireDefault(_PhotoshopPointerCircle);\n\nvar _PhotoshopPointer = require('./PhotoshopPointer');\n\nvar _PhotoshopPointer2 = _interopRequireDefault(_PhotoshopPointer);\n\nvar _PhotoshopButton = require('./PhotoshopButton');\n\nvar _PhotoshopButton2 = _interopRequireDefault(_PhotoshopButton);\n\nvar _PhotoshopPreviews = require('./PhotoshopPreviews');\n\nvar _PhotoshopPreviews2 = _interopRequireDefault(_PhotoshopPreviews);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Photoshop = exports.Photoshop = function (_React$Component) {\n _inherits(Photoshop, _React$Component);\n\n function Photoshop(props) {\n _classCallCheck(this, Photoshop);\n\n var _this = _possibleConstructorReturn(this, (Photoshop.__proto__ || Object.getPrototypeOf(Photoshop)).call(this));\n\n _this.state = {\n currentColor: props.hex\n };\n return _this;\n }\n\n _createClass(Photoshop, [{\n key: 'render',\n value: function render() {\n var _props = this.props,\n _props$styles = _props.styles,\n passedStyles = _props$styles === undefined ? {} : _props$styles,\n _props$className = _props.className,\n className = _props$className === undefined ? '' : _props$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n picker: {\n background: '#DCDCDC',\n borderRadius: '4px',\n boxShadow: '0 0 0 1px rgba(0,0,0,.25), 0 8px 16px rgba(0,0,0,.15)',\n boxSizing: 'initial',\n width: '513px'\n },\n head: {\n backgroundImage: 'linear-gradient(-180deg, #F0F0F0 0%, #D4D4D4 100%)',\n borderBottom: '1px solid #B1B1B1',\n boxShadow: 'inset 0 1px 0 0 rgba(255,255,255,.2), inset 0 -1px 0 0 rgba(0,0,0,.02)',\n height: '23px',\n lineHeight: '24px',\n borderRadius: '4px 4px 0 0',\n fontSize: '13px',\n color: '#4D4D4D',\n textAlign: 'center'\n },\n body: {\n padding: '15px 15px 0',\n display: 'flex'\n },\n saturation: {\n width: '256px',\n height: '256px',\n position: 'relative',\n border: '2px solid #B3B3B3',\n borderBottom: '2px solid #F0F0F0',\n overflow: 'hidden'\n },\n hue: {\n position: 'relative',\n height: '256px',\n width: '19px',\n marginLeft: '10px',\n border: '2px solid #B3B3B3',\n borderBottom: '2px solid #F0F0F0'\n },\n controls: {\n width: '180px',\n marginLeft: '10px'\n },\n top: {\n display: 'flex'\n },\n previews: {\n width: '60px'\n },\n actions: {\n flex: '1',\n marginLeft: '20px'\n }\n }\n }, passedStyles));\n\n return _react2.default.createElement(\n 'div',\n { style: styles.picker, className: 'photoshop-picker ' + className },\n _react2.default.createElement(\n 'div',\n { style: styles.head },\n this.props.header\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.body, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.saturation },\n _react2.default.createElement(_common.Saturation, {\n hsl: this.props.hsl,\n hsv: this.props.hsv,\n pointer: _PhotoshopPointerCircle2.default,\n onChange: this.props.onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.hue },\n _react2.default.createElement(_common.Hue, {\n direction: 'vertical',\n hsl: this.props.hsl,\n pointer: _PhotoshopPointer2.default,\n onChange: this.props.onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.controls },\n _react2.default.createElement(\n 'div',\n { style: styles.top, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.previews },\n _react2.default.createElement(_PhotoshopPreviews2.default, {\n rgb: this.props.rgb,\n currentColor: this.state.currentColor\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.actions },\n _react2.default.createElement(_PhotoshopButton2.default, { label: 'OK', onClick: this.props.onAccept, active: true }),\n _react2.default.createElement(_PhotoshopButton2.default, { label: 'Cancel', onClick: this.props.onCancel }),\n _react2.default.createElement(_PhotoshopFields2.default, {\n onChange: this.props.onChange,\n rgb: this.props.rgb,\n hsv: this.props.hsv,\n hex: this.props.hex\n })\n )\n )\n )\n )\n );\n }\n }]);\n\n return Photoshop;\n}(_react2.default.Component);\n\nPhotoshop.propTypes = {\n header: _propTypes2.default.string,\n styles: _propTypes2.default.object\n};\n\nPhotoshop.defaultProps = {\n header: 'Color Picker',\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Photoshop);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PhotoshopPicker = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PhotoshopPicker = exports.PhotoshopPicker = function PhotoshopPicker(_ref) {\n var onChange = _ref.onChange,\n rgb = _ref.rgb,\n hsv = _ref.hsv,\n hex = _ref.hex;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n fields: {\n paddingTop: '5px',\n paddingBottom: '9px',\n width: '80px',\n position: 'relative'\n },\n divider: {\n height: '5px'\n },\n RGBwrap: {\n position: 'relative'\n },\n RGBinput: {\n marginLeft: '40%',\n width: '40%',\n height: '18px',\n border: '1px solid #888888',\n boxShadow: 'inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC',\n marginBottom: '5px',\n fontSize: '13px',\n paddingLeft: '3px',\n marginRight: '10px'\n },\n RGBlabel: {\n left: '0px',\n width: '34px',\n textTransform: 'uppercase',\n fontSize: '13px',\n height: '18px',\n lineHeight: '22px',\n position: 'absolute'\n },\n HEXwrap: {\n position: 'relative'\n },\n HEXinput: {\n marginLeft: '20%',\n width: '80%',\n height: '18px',\n border: '1px solid #888888',\n boxShadow: 'inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC',\n marginBottom: '6px',\n fontSize: '13px',\n paddingLeft: '3px'\n },\n HEXlabel: {\n position: 'absolute',\n top: '0px',\n left: '0px',\n width: '14px',\n textTransform: 'uppercase',\n fontSize: '13px',\n height: '18px',\n lineHeight: '22px'\n },\n fieldSymbols: {\n position: 'absolute',\n top: '5px',\n right: '-7px',\n fontSize: '13px'\n },\n symbol: {\n height: '20px',\n lineHeight: '22px',\n paddingBottom: '7px'\n }\n }\n });\n\n var handleChange = function handleChange(data, e) {\n if (data['#']) {\n _color2.default.isValidHex(data['#']) && onChange({\n hex: data['#'],\n source: 'hex'\n }, e);\n } else if (data.r || data.g || data.b) {\n onChange({\n r: data.r || rgb.r,\n g: data.g || rgb.g,\n b: data.b || rgb.b,\n source: 'rgb'\n }, e);\n } else if (data.h || data.s || data.v) {\n onChange({\n h: data.h || hsv.h,\n s: data.s || hsv.s,\n v: data.v || hsv.v,\n source: 'hsv'\n }, e);\n }\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.fields },\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'h',\n value: Math.round(hsv.h),\n onChange: handleChange\n }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 's',\n value: Math.round(hsv.s * 100),\n onChange: handleChange\n }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'v',\n value: Math.round(hsv.v * 100),\n onChange: handleChange\n }),\n _react2.default.createElement('div', { style: styles.divider }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'r',\n value: rgb.r,\n onChange: handleChange\n }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'g',\n value: rgb.g,\n onChange: handleChange\n }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.RGBwrap, input: styles.RGBinput, label: styles.RGBlabel },\n label: 'b',\n value: rgb.b,\n onChange: handleChange\n }),\n _react2.default.createElement('div', { style: styles.divider }),\n _react2.default.createElement(_common.EditableInput, {\n style: { wrap: styles.HEXwrap, input: styles.HEXinput, label: styles.HEXlabel },\n label: '#',\n value: hex.replace('#', ''),\n onChange: handleChange\n }),\n _react2.default.createElement(\n 'div',\n { style: styles.fieldSymbols },\n _react2.default.createElement(\n 'div',\n { style: styles.symbol },\n '\\xB0'\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.symbol },\n '%'\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.symbol },\n '%'\n )\n )\n );\n};\n\nexports.default = PhotoshopPicker;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PhotoshopPointerCircle = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function PhotoshopPointerCircle(_ref) {\n var hsl = _ref.hsl;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n width: '12px',\n height: '12px',\n borderRadius: '6px',\n boxShadow: 'inset 0 0 0 1px #fff',\n transform: 'translate(-6px, -6px)'\n }\n },\n 'black-outline': {\n picker: {\n boxShadow: 'inset 0 0 0 1px #000'\n }\n }\n }, { 'black-outline': hsl.l > 0.5 });\n\n return _react2.default.createElement('div', { style: styles.picker });\n};\n\nexports.default = PhotoshopPointerCircle;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PhotoshopPointerCircle = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PhotoshopPointerCircle = exports.PhotoshopPointerCircle = function PhotoshopPointerCircle() {\n var styles = (0, _reactcss2.default)({\n 'default': {\n triangle: {\n width: 0,\n height: 0,\n borderStyle: 'solid',\n borderWidth: '4px 0 4px 6px',\n borderColor: 'transparent transparent transparent #fff',\n position: 'absolute',\n top: '1px',\n left: '1px'\n },\n triangleBorder: {\n width: 0,\n height: 0,\n borderStyle: 'solid',\n borderWidth: '5px 0 5px 8px',\n borderColor: 'transparent transparent transparent #555'\n },\n\n left: {\n Extend: 'triangleBorder',\n transform: 'translate(-13px, -4px)'\n },\n leftInside: {\n Extend: 'triangle',\n transform: 'translate(-8px, -5px)'\n },\n\n right: {\n Extend: 'triangleBorder',\n transform: 'translate(20px, -14px) rotate(180deg)'\n },\n rightInside: {\n Extend: 'triangle',\n transform: 'translate(-8px, -5px)'\n }\n }\n });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.pointer },\n _react2.default.createElement(\n 'div',\n { style: styles.left },\n _react2.default.createElement('div', { style: styles.leftInside })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.right },\n _react2.default.createElement('div', { style: styles.rightInside })\n )\n );\n};\n\nexports.default = PhotoshopPointerCircle;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PhotoshopButton = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PhotoshopButton = exports.PhotoshopButton = function PhotoshopButton(_ref) {\n var onClick = _ref.onClick,\n label = _ref.label,\n children = _ref.children,\n active = _ref.active;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n button: {\n backgroundImage: 'linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)',\n border: '1px solid #878787',\n borderRadius: '2px',\n height: '20px',\n boxShadow: '0 1px 0 0 #EAEAEA',\n fontSize: '14px',\n color: '#000',\n lineHeight: '20px',\n textAlign: 'center',\n marginBottom: '10px',\n cursor: 'pointer'\n }\n },\n 'active': {\n button: {\n boxShadow: '0 0 0 1px #878787'\n }\n }\n }, { active: active });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.button, onClick: onClick },\n label || children\n );\n};\n\nexports.default = PhotoshopButton;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PhotoshopPreviews = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar PhotoshopPreviews = exports.PhotoshopPreviews = function PhotoshopPreviews(_ref) {\n var rgb = _ref.rgb,\n currentColor = _ref.currentColor;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n swatches: {\n border: '1px solid #B3B3B3',\n borderBottom: '1px solid #F0F0F0',\n marginBottom: '2px',\n marginTop: '1px'\n },\n new: {\n height: '34px',\n background: 'rgb(' + rgb.r + ',' + rgb.g + ', ' + rgb.b + ')',\n boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000'\n },\n current: {\n height: '34px',\n background: currentColor,\n boxShadow: 'inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000'\n },\n label: {\n fontSize: '14px',\n color: '#000',\n textAlign: 'center'\n }\n }\n });\n\n return _react2.default.createElement(\n 'div',\n null,\n _react2.default.createElement(\n 'div',\n { style: styles.label },\n 'new'\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.swatches },\n _react2.default.createElement('div', { style: styles.new }),\n _react2.default.createElement('div', { style: styles.current })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.label },\n 'current'\n )\n );\n};\n\nexports.default = PhotoshopPreviews;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Sketch = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _common = require('../common');\n\nvar _SketchFields = require('./SketchFields');\n\nvar _SketchFields2 = _interopRequireDefault(_SketchFields);\n\nvar _SketchPresetColors = require('./SketchPresetColors');\n\nvar _SketchPresetColors2 = _interopRequireDefault(_SketchPresetColors);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Sketch = exports.Sketch = function Sketch(_ref) {\n var width = _ref.width,\n rgb = _ref.rgb,\n hex = _ref.hex,\n hsv = _ref.hsv,\n hsl = _ref.hsl,\n onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n disableAlpha = _ref.disableAlpha,\n presetColors = _ref.presetColors,\n renderers = _ref.renderers,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': _extends({\n picker: {\n width: width,\n padding: '10px 10px 0',\n boxSizing: 'initial',\n background: '#fff',\n borderRadius: '4px',\n boxShadow: '0 0 0 1px rgba(0,0,0,.15), 0 8px 16px rgba(0,0,0,.15)'\n },\n saturation: {\n width: '100%',\n paddingBottom: '75%',\n position: 'relative',\n overflow: 'hidden'\n },\n Saturation: {\n radius: '3px',\n shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n },\n controls: {\n display: 'flex'\n },\n sliders: {\n padding: '4px 0',\n flex: '1'\n },\n color: {\n width: '24px',\n height: '24px',\n position: 'relative',\n marginTop: '4px',\n marginLeft: '4px',\n borderRadius: '3px'\n },\n activeColor: {\n absolute: '0px 0px 0px 0px',\n borderRadius: '2px',\n background: 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + rgb.a + ')',\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n },\n hue: {\n position: 'relative',\n height: '10px',\n overflow: 'hidden'\n },\n Hue: {\n radius: '2px',\n shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n },\n\n alpha: {\n position: 'relative',\n height: '10px',\n marginTop: '4px',\n overflow: 'hidden'\n },\n Alpha: {\n radius: '2px',\n shadow: 'inset 0 0 0 1px rgba(0,0,0,.15), inset 0 0 4px rgba(0,0,0,.25)'\n }\n }, passedStyles),\n 'disableAlpha': {\n color: {\n height: '10px'\n },\n hue: {\n height: '10px'\n },\n alpha: {\n display: 'none'\n }\n }\n }, passedStyles), { disableAlpha: disableAlpha });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.picker, className: 'sketch-picker ' + className },\n _react2.default.createElement(\n 'div',\n { style: styles.saturation },\n _react2.default.createElement(_common.Saturation, {\n style: styles.Saturation,\n hsl: hsl,\n hsv: hsv,\n onChange: onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.controls, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.sliders },\n _react2.default.createElement(\n 'div',\n { style: styles.hue },\n _react2.default.createElement(_common.Hue, {\n style: styles.Hue,\n hsl: hsl,\n onChange: onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(_common.Alpha, {\n style: styles.Alpha,\n rgb: rgb,\n hsl: hsl,\n renderers: renderers,\n onChange: onChange\n })\n )\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.color },\n _react2.default.createElement(_common.Checkboard, null),\n _react2.default.createElement('div', { style: styles.activeColor })\n )\n ),\n _react2.default.createElement(_SketchFields2.default, {\n rgb: rgb,\n hsl: hsl,\n hex: hex,\n onChange: onChange,\n disableAlpha: disableAlpha\n }),\n _react2.default.createElement(_SketchPresetColors2.default, {\n colors: presetColors,\n onClick: onChange,\n onSwatchHover: onSwatchHover\n })\n );\n};\n\nSketch.propTypes = {\n disableAlpha: _propTypes2.default.bool,\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n styles: _propTypes2.default.object\n};\n\nSketch.defaultProps = {\n disableAlpha: false,\n width: 200,\n styles: {},\n presetColors: ['#D0021B', '#F5A623', '#F8E71C', '#8B572A', '#7ED321', '#417505', '#BD10E0', '#9013FE', '#4A90E2', '#50E3C2', '#B8E986', '#000000', '#4A4A4A', '#9B9B9B', '#FFFFFF']\n};\n\nexports.default = (0, _common.ColorWrap)(Sketch);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SketchFields = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable no-param-reassign */\n\nvar SketchFields = exports.SketchFields = function SketchFields(_ref) {\n var onChange = _ref.onChange,\n rgb = _ref.rgb,\n hsl = _ref.hsl,\n hex = _ref.hex,\n disableAlpha = _ref.disableAlpha;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n fields: {\n display: 'flex',\n paddingTop: '4px'\n },\n single: {\n flex: '1',\n paddingLeft: '6px'\n },\n alpha: {\n flex: '1',\n paddingLeft: '6px'\n },\n double: {\n flex: '2'\n },\n input: {\n width: '80%',\n padding: '4px 10% 3px',\n border: 'none',\n boxShadow: 'inset 0 0 0 1px #ccc',\n fontSize: '11px'\n },\n label: {\n display: 'block',\n textAlign: 'center',\n fontSize: '11px',\n color: '#222',\n paddingTop: '3px',\n paddingBottom: '4px',\n textTransform: 'capitalize'\n }\n },\n 'disableAlpha': {\n alpha: {\n display: 'none'\n }\n }\n }, { disableAlpha: disableAlpha });\n\n var handleChange = function handleChange(data, e) {\n if (data.hex) {\n _color2.default.isValidHex(data.hex) && onChange({\n hex: data.hex,\n source: 'hex'\n }, e);\n } else if (data.r || data.g || data.b) {\n onChange({\n r: data.r || rgb.r,\n g: data.g || rgb.g,\n b: data.b || rgb.b,\n a: rgb.a,\n source: 'rgb'\n }, e);\n } else if (data.a) {\n if (data.a < 0) {\n data.a = 0;\n } else if (data.a > 100) {\n data.a = 100;\n }\n\n data.a /= 100;\n onChange({\n h: hsl.h,\n s: hsl.s,\n l: hsl.l,\n a: data.a,\n source: 'rgb'\n }, e);\n }\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.fields, className: 'flexbox-fix' },\n _react2.default.createElement(\n 'div',\n { style: styles.double },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'hex',\n value: hex.replace('#', ''),\n onChange: handleChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.single },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'r',\n value: rgb.r,\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '255'\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.single },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'g',\n value: rgb.g,\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '255'\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.single },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'b',\n value: rgb.b,\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '255'\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.alpha },\n _react2.default.createElement(_common.EditableInput, {\n style: { input: styles.input, label: styles.label },\n label: 'a',\n value: Math.round(rgb.a * 100),\n onChange: handleChange,\n dragLabel: 'true',\n dragMax: '100'\n })\n )\n );\n};\n\nexports.default = SketchFields;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SketchPresetColors = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SketchPresetColors = exports.SketchPresetColors = function SketchPresetColors(_ref) {\n var colors = _ref.colors,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === undefined ? function () {} : _ref$onClick,\n onSwatchHover = _ref.onSwatchHover;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n colors: {\n margin: '0 -10px',\n padding: '10px 0 0 10px',\n borderTop: '1px solid #eee',\n display: 'flex',\n flexWrap: 'wrap',\n position: 'relative'\n },\n swatchWrap: {\n width: '16px',\n height: '16px',\n margin: '0 10px 10px 0'\n },\n swatch: {\n borderRadius: '3px',\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15)'\n }\n },\n 'no-presets': {\n colors: {\n display: 'none'\n }\n }\n }, {\n 'no-presets': !colors || !colors.length\n });\n\n var handleClick = function handleClick(hex, e) {\n onClick({\n hex: hex,\n source: 'hex'\n }, e);\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.colors, className: 'flexbox-fix' },\n colors.map(function (colorObjOrString) {\n var c = typeof colorObjOrString === 'string' ? { color: colorObjOrString } : colorObjOrString;\n var key = '' + c.color + (c.title || '');\n return _react2.default.createElement(\n 'div',\n { key: key, style: styles.swatchWrap },\n _react2.default.createElement(_common.Swatch, _extends({}, c, {\n style: styles.swatch,\n onClick: handleClick,\n onHover: onSwatchHover,\n focusStyle: {\n boxShadow: 'inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px ' + c.color\n }\n }))\n );\n })\n );\n};\n\nSketchPresetColors.propTypes = {\n colors: _propTypes2.default.arrayOf(_propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n color: _propTypes2.default.string,\n title: _propTypes2.default.string\n })])).isRequired\n};\n\nexports.default = SketchPresetColors;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Slider = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _common = require('../common');\n\nvar _SliderSwatches = require('./SliderSwatches');\n\nvar _SliderSwatches2 = _interopRequireDefault(_SliderSwatches);\n\nvar _SliderPointer = require('./SliderPointer');\n\nvar _SliderPointer2 = _interopRequireDefault(_SliderPointer);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Slider = exports.Slider = function Slider(_ref) {\n var hsl = _ref.hsl,\n onChange = _ref.onChange,\n pointer = _ref.pointer,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n hue: {\n height: '12px',\n position: 'relative'\n },\n Hue: {\n radius: '2px'\n }\n }\n }, passedStyles));\n\n return _react2.default.createElement(\n 'div',\n { style: styles.wrap || {}, className: 'slider-picker ' + className },\n _react2.default.createElement(\n 'div',\n { style: styles.hue },\n _react2.default.createElement(_common.Hue, {\n style: styles.Hue,\n hsl: hsl,\n pointer: pointer,\n onChange: onChange\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.swatches },\n _react2.default.createElement(_SliderSwatches2.default, { hsl: hsl, onClick: onChange })\n )\n );\n};\n\nSlider.propTypes = {\n styles: _propTypes2.default.object\n};\nSlider.defaultProps = {\n pointer: _SliderPointer2.default,\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Slider);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SliderSwatches = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _SliderSwatch = require('./SliderSwatch');\n\nvar _SliderSwatch2 = _interopRequireDefault(_SliderSwatch);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SliderSwatches = exports.SliderSwatches = function SliderSwatches(_ref) {\n var onClick = _ref.onClick,\n hsl = _ref.hsl;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n swatches: {\n marginTop: '20px'\n },\n swatch: {\n boxSizing: 'border-box',\n width: '20%',\n paddingRight: '1px',\n float: 'left'\n },\n clear: {\n clear: 'both'\n }\n }\n });\n\n // Acceptible difference in floating point equality\n var epsilon = 0.1;\n\n return _react2.default.createElement(\n 'div',\n { style: styles.swatches },\n _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement(_SliderSwatch2.default, {\n hsl: hsl,\n offset: '.80',\n active: Math.abs(hsl.l - 0.80) < epsilon && Math.abs(hsl.s - 0.50) < epsilon,\n onClick: onClick,\n first: true\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement(_SliderSwatch2.default, {\n hsl: hsl,\n offset: '.65',\n active: Math.abs(hsl.l - 0.65) < epsilon && Math.abs(hsl.s - 0.50) < epsilon,\n onClick: onClick\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement(_SliderSwatch2.default, {\n hsl: hsl,\n offset: '.50',\n active: Math.abs(hsl.l - 0.50) < epsilon && Math.abs(hsl.s - 0.50) < epsilon,\n onClick: onClick\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement(_SliderSwatch2.default, {\n hsl: hsl,\n offset: '.35',\n active: Math.abs(hsl.l - 0.35) < epsilon && Math.abs(hsl.s - 0.50) < epsilon,\n onClick: onClick\n })\n ),\n _react2.default.createElement(\n 'div',\n { style: styles.swatch },\n _react2.default.createElement(_SliderSwatch2.default, {\n hsl: hsl,\n offset: '.20',\n active: Math.abs(hsl.l - 0.20) < epsilon && Math.abs(hsl.s - 0.50) < epsilon,\n onClick: onClick,\n last: true\n })\n ),\n _react2.default.createElement('div', { style: styles.clear })\n );\n};\n\nexports.default = SliderSwatches;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SliderSwatch = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SliderSwatch = exports.SliderSwatch = function SliderSwatch(_ref) {\n var hsl = _ref.hsl,\n offset = _ref.offset,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === undefined ? function () {} : _ref$onClick,\n active = _ref.active,\n first = _ref.first,\n last = _ref.last;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n swatch: {\n height: '12px',\n background: 'hsl(' + hsl.h + ', 50%, ' + offset * 100 + '%)',\n cursor: 'pointer'\n }\n },\n 'first': {\n swatch: {\n borderRadius: '2px 0 0 2px'\n }\n },\n 'last': {\n swatch: {\n borderRadius: '0 2px 2px 0'\n }\n },\n 'active': {\n swatch: {\n transform: 'scaleY(1.8)',\n borderRadius: '3.6px/2px'\n }\n }\n }, { active: active, first: first, last: last });\n\n var handleClick = function handleClick(e) {\n return onClick({\n h: hsl.h,\n s: 0.5,\n l: offset,\n source: 'hsl'\n }, e);\n };\n\n return _react2.default.createElement('div', { style: styles.swatch, onClick: handleClick });\n};\n\nexports.default = SliderSwatch;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SliderPointer = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SliderPointer = exports.SliderPointer = function SliderPointer() {\n var styles = (0, _reactcss2.default)({\n 'default': {\n picker: {\n width: '14px',\n height: '14px',\n borderRadius: '6px',\n transform: 'translate(-7px, -1px)',\n backgroundColor: 'rgb(248, 248, 248)',\n boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)'\n }\n }\n });\n\n return _react2.default.createElement('div', { style: styles.picker });\n};\n\nexports.default = SliderPointer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Swatches = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _map = require('lodash/map');\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _materialColors = require('material-colors');\n\nvar material = _interopRequireWildcard(_materialColors);\n\nvar _common = require('../common');\n\nvar _SwatchesGroup = require('./SwatchesGroup');\n\nvar _SwatchesGroup2 = _interopRequireDefault(_SwatchesGroup);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Swatches = exports.Swatches = function Swatches(_ref) {\n var width = _ref.width,\n height = _ref.height,\n onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n colors = _ref.colors,\n hex = _ref.hex,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n picker: {\n width: width,\n height: height\n },\n overflow: {\n height: height,\n overflowY: 'scroll'\n },\n body: {\n padding: '16px 0 6px 16px'\n },\n clear: {\n clear: 'both'\n }\n }\n }, passedStyles));\n\n var handleChange = function handleChange(data, e) {\n _color2.default.isValidHex(data) && onChange({\n hex: data,\n source: 'hex'\n }, e);\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.picker, className: 'swatches-picker ' + className },\n _react2.default.createElement(\n _common.Raised,\n null,\n _react2.default.createElement(\n 'div',\n { style: styles.overflow },\n _react2.default.createElement(\n 'div',\n { style: styles.body },\n (0, _map2.default)(colors, function (group) {\n return _react2.default.createElement(_SwatchesGroup2.default, {\n key: group.toString(),\n group: group,\n active: hex,\n onClick: handleChange,\n onSwatchHover: onSwatchHover\n });\n }),\n _react2.default.createElement('div', { style: styles.clear })\n )\n )\n )\n );\n};\n\nSwatches.propTypes = {\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n height: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n colors: _propTypes2.default.arrayOf(_propTypes2.default.arrayOf(_propTypes2.default.string)),\n styles: _propTypes2.default.object\n\n /* eslint-disable max-len */\n};Swatches.defaultProps = {\n width: 320,\n height: 240,\n colors: [[material.red['900'], material.red['700'], material.red['500'], material.red['300'], material.red['100']], [material.pink['900'], material.pink['700'], material.pink['500'], material.pink['300'], material.pink['100']], [material.purple['900'], material.purple['700'], material.purple['500'], material.purple['300'], material.purple['100']], [material.deepPurple['900'], material.deepPurple['700'], material.deepPurple['500'], material.deepPurple['300'], material.deepPurple['100']], [material.indigo['900'], material.indigo['700'], material.indigo['500'], material.indigo['300'], material.indigo['100']], [material.blue['900'], material.blue['700'], material.blue['500'], material.blue['300'], material.blue['100']], [material.lightBlue['900'], material.lightBlue['700'], material.lightBlue['500'], material.lightBlue['300'], material.lightBlue['100']], [material.cyan['900'], material.cyan['700'], material.cyan['500'], material.cyan['300'], material.cyan['100']], [material.teal['900'], material.teal['700'], material.teal['500'], material.teal['300'], material.teal['100']], ['#194D33', material.green['700'], material.green['500'], material.green['300'], material.green['100']], [material.lightGreen['900'], material.lightGreen['700'], material.lightGreen['500'], material.lightGreen['300'], material.lightGreen['100']], [material.lime['900'], material.lime['700'], material.lime['500'], material.lime['300'], material.lime['100']], [material.yellow['900'], material.yellow['700'], material.yellow['500'], material.yellow['300'], material.yellow['100']], [material.amber['900'], material.amber['700'], material.amber['500'], material.amber['300'], material.amber['100']], [material.orange['900'], material.orange['700'], material.orange['500'], material.orange['300'], material.orange['100']], [material.deepOrange['900'], material.deepOrange['700'], material.deepOrange['500'], material.deepOrange['300'], material.deepOrange['100']], [material.brown['900'], material.brown['700'], material.brown['500'], material.brown['300'], material.brown['100']], [material.blueGrey['900'], material.blueGrey['700'], material.blueGrey['500'], material.blueGrey['300'], material.blueGrey['100']], ['#000000', '#525252', '#969696', '#D9D9D9', '#FFFFFF']],\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Swatches);","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SwatchesGroup = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _map = require('lodash/map');\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _SwatchesColor = require('./SwatchesColor');\n\nvar _SwatchesColor2 = _interopRequireDefault(_SwatchesColor);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SwatchesGroup = exports.SwatchesGroup = function SwatchesGroup(_ref) {\n var onClick = _ref.onClick,\n onSwatchHover = _ref.onSwatchHover,\n group = _ref.group,\n active = _ref.active;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n group: {\n paddingBottom: '10px',\n width: '40px',\n float: 'left',\n marginRight: '10px'\n }\n }\n });\n\n return _react2.default.createElement(\n 'div',\n { style: styles.group },\n (0, _map2.default)(group, function (color, i) {\n return _react2.default.createElement(_SwatchesColor2.default, {\n key: color,\n color: color,\n active: color.toLowerCase() === active,\n first: i === 0,\n last: i === group.length - 1,\n onClick: onClick,\n onSwatchHover: onSwatchHover\n });\n })\n );\n};\n\nexports.default = SwatchesGroup;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.SwatchesColor = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nvar _CheckIcon = require('@icons/material/CheckIcon');\n\nvar _CheckIcon2 = _interopRequireDefault(_CheckIcon);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar SwatchesColor = exports.SwatchesColor = function SwatchesColor(_ref) {\n var color = _ref.color,\n _ref$onClick = _ref.onClick,\n onClick = _ref$onClick === undefined ? function () {} : _ref$onClick,\n onSwatchHover = _ref.onSwatchHover,\n first = _ref.first,\n last = _ref.last,\n active = _ref.active;\n\n var styles = (0, _reactcss2.default)({\n 'default': {\n color: {\n width: '40px',\n height: '24px',\n cursor: 'pointer',\n background: color,\n marginBottom: '1px'\n },\n check: {\n color: _color2.default.getContrastingColor(color),\n marginLeft: '8px',\n display: 'none'\n }\n },\n 'first': {\n color: {\n overflow: 'hidden',\n borderRadius: '2px 2px 0 0'\n }\n },\n 'last': {\n color: {\n overflow: 'hidden',\n borderRadius: '0 0 2px 2px'\n }\n },\n 'active': {\n check: {\n display: 'block'\n }\n },\n 'color-#FFFFFF': {\n color: {\n boxShadow: 'inset 0 0 0 1px #ddd'\n },\n check: {\n color: '#333'\n }\n },\n 'transparent': {\n check: {\n color: '#333'\n }\n }\n }, {\n first: first,\n last: last,\n active: active,\n 'color-#FFFFFF': color === '#FFFFFF',\n 'transparent': color === 'transparent'\n });\n\n return _react2.default.createElement(\n _common.Swatch,\n {\n color: color,\n style: styles.color,\n onClick: onClick,\n onHover: onSwatchHover,\n focusStyle: { boxShadow: '0 0 4px ' + color }\n },\n _react2.default.createElement(\n 'div',\n { style: styles.check },\n _react2.default.createElement(_CheckIcon2.default, null)\n )\n );\n};\n\nexports.default = SwatchesColor;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar DEFAULT_SIZE = 24;\n\nexports.default = function (_ref) {\n var _ref$fill = _ref.fill,\n fill = _ref$fill === undefined ? 'currentColor' : _ref$fill,\n _ref$width = _ref.width,\n width = _ref$width === undefined ? DEFAULT_SIZE : _ref$width,\n _ref$height = _ref.height,\n height = _ref$height === undefined ? DEFAULT_SIZE : _ref$height,\n _ref$style = _ref.style,\n style = _ref$style === undefined ? {} : _ref$style,\n props = _objectWithoutProperties(_ref, ['fill', 'width', 'height', 'style']);\n\n return _react2.default.createElement(\n 'svg',\n _extends({\n viewBox: '0 0 ' + DEFAULT_SIZE + ' ' + DEFAULT_SIZE,\n style: _extends({ fill: fill, width: width, height: height }, style)\n }, props),\n _react2.default.createElement('path', { d: 'M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z' })\n );\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Twitter = undefined;\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _reactcss = require('reactcss');\n\nvar _reactcss2 = _interopRequireDefault(_reactcss);\n\nvar _map = require('lodash/map');\n\nvar _map2 = _interopRequireDefault(_map);\n\nvar _merge = require('lodash/merge');\n\nvar _merge2 = _interopRequireDefault(_merge);\n\nvar _color = require('../../helpers/color');\n\nvar _color2 = _interopRequireDefault(_color);\n\nvar _common = require('../common');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar Twitter = exports.Twitter = function Twitter(_ref) {\n var onChange = _ref.onChange,\n onSwatchHover = _ref.onSwatchHover,\n hex = _ref.hex,\n colors = _ref.colors,\n width = _ref.width,\n triangle = _ref.triangle,\n _ref$styles = _ref.styles,\n passedStyles = _ref$styles === undefined ? {} : _ref$styles,\n _ref$className = _ref.className,\n className = _ref$className === undefined ? '' : _ref$className;\n\n var styles = (0, _reactcss2.default)((0, _merge2.default)({\n 'default': {\n card: {\n width: width,\n background: '#fff',\n border: '0 solid rgba(0,0,0,0.25)',\n boxShadow: '0 1px 4px rgba(0,0,0,0.25)',\n borderRadius: '4px',\n position: 'relative'\n },\n body: {\n padding: '15px 9px 9px 15px'\n },\n label: {\n fontSize: '18px',\n color: '#fff'\n },\n triangle: {\n width: '0px',\n height: '0px',\n borderStyle: 'solid',\n borderWidth: '0 9px 10px 9px',\n borderColor: 'transparent transparent #fff transparent',\n position: 'absolute'\n },\n triangleShadow: {\n width: '0px',\n height: '0px',\n borderStyle: 'solid',\n borderWidth: '0 9px 10px 9px',\n borderColor: 'transparent transparent rgba(0,0,0,.1) transparent',\n position: 'absolute'\n },\n hash: {\n background: '#F0F0F0',\n height: '30px',\n width: '30px',\n borderRadius: '4px 0 0 4px',\n float: 'left',\n color: '#98A1A4',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n },\n input: {\n width: '100px',\n fontSize: '14px',\n color: '#666',\n border: '0px',\n outline: 'none',\n height: '28px',\n boxShadow: 'inset 0 0 0 1px #F0F0F0',\n boxSizing: 'content-box',\n borderRadius: '0 4px 4px 0',\n float: 'left',\n paddingLeft: '8px'\n },\n swatch: {\n width: '30px',\n height: '30px',\n float: 'left',\n borderRadius: '4px',\n margin: '0 6px 6px 0'\n },\n clear: {\n clear: 'both'\n }\n },\n 'hide-triangle': {\n triangle: {\n display: 'none'\n },\n triangleShadow: {\n display: 'none'\n }\n },\n 'top-left-triangle': {\n triangle: {\n top: '-10px',\n left: '12px'\n },\n triangleShadow: {\n top: '-11px',\n left: '12px'\n }\n },\n 'top-right-triangle': {\n triangle: {\n top: '-10px',\n right: '12px'\n },\n triangleShadow: {\n top: '-11px',\n right: '12px'\n }\n }\n }, passedStyles), {\n 'hide-triangle': triangle === 'hide',\n 'top-left-triangle': triangle === 'top-left',\n 'top-right-triangle': triangle === 'top-right'\n });\n\n var handleChange = function handleChange(hexcode, e) {\n _color2.default.isValidHex(hexcode) && onChange({\n hex: hexcode,\n source: 'hex'\n }, e);\n };\n\n return _react2.default.createElement(\n 'div',\n { style: styles.card, className: 'twitter-picker ' + className },\n _react2.default.createElement('div', { style: styles.triangleShadow }),\n _react2.default.createElement('div', { style: styles.triangle }),\n _react2.default.createElement(\n 'div',\n { style: styles.body },\n (0, _map2.default)(colors, function (c, i) {\n return _react2.default.createElement(_common.Swatch, {\n key: i,\n color: c,\n hex: c,\n style: styles.swatch,\n onClick: handleChange,\n onHover: onSwatchHover,\n focusStyle: {\n boxShadow: '0 0 4px ' + c\n }\n });\n }),\n _react2.default.createElement(\n 'div',\n { style: styles.hash },\n '#'\n ),\n _react2.default.createElement(_common.EditableInput, {\n label: null,\n style: { input: styles.input },\n value: hex.replace('#', ''),\n onChange: handleChange\n }),\n _react2.default.createElement('div', { style: styles.clear })\n )\n );\n};\n\nTwitter.propTypes = {\n width: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]),\n triangle: _propTypes2.default.oneOf(['hide', 'top-left', 'top-right']),\n colors: _propTypes2.default.arrayOf(_propTypes2.default.string),\n styles: _propTypes2.default.object\n};\n\nTwitter.defaultProps = {\n width: 276,\n colors: ['#FF6900', '#FCB900', '#7BDCB5', '#00D084', '#8ED1FC', '#0693E3', '#ABB8C3', '#EB144C', '#F78DA7', '#9900EF'],\n triangle: 'top-left',\n styles: {}\n};\n\nexports.default = (0, _common.ColorWrap)(Twitter);","/**\n * @ignore\n * event object for dom\n * @author yiminghe@gmail.com\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar _EventBaseObject = require('./EventBaseObject');\n\nvar _EventBaseObject2 = _interopRequireDefault(_EventBaseObject);\n\nvar _objectAssign = require('object-assign');\n\nvar _objectAssign2 = _interopRequireDefault(_objectAssign);\n\nvar TRUE = true;\nvar FALSE = false;\nvar commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type'];\n\nfunction isNullOrUndefined(w) {\n return w === null || w === undefined;\n}\n\nvar eventNormalizers = [{\n reg: /^key/,\n props: ['char', 'charCode', 'key', 'keyCode', 'which'],\n fix: function fix(event, nativeEvent) {\n if (isNullOrUndefined(event.which)) {\n event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode;\n }\n\n // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs)\n if (event.metaKey === undefined) {\n event.metaKey = event.ctrlKey;\n }\n }\n}, {\n reg: /^touch/,\n props: ['touches', 'changedTouches', 'targetTouches']\n}, {\n reg: /^hashchange$/,\n props: ['newURL', 'oldURL']\n}, {\n reg: /^gesturechange$/i,\n props: ['rotation', 'scale']\n}, {\n reg: /^(mousewheel|DOMMouseScroll)$/,\n props: [],\n fix: function fix(event, nativeEvent) {\n var deltaX = undefined;\n var deltaY = undefined;\n var delta = undefined;\n var wheelDelta = nativeEvent.wheelDelta;\n var axis = nativeEvent.axis;\n var wheelDeltaY = nativeEvent.wheelDeltaY;\n var wheelDeltaX = nativeEvent.wheelDeltaX;\n var detail = nativeEvent.detail;\n\n // ie/webkit\n if (wheelDelta) {\n delta = wheelDelta / 120;\n }\n\n // gecko\n if (detail) {\n // press control e.detail == 1 else e.detail == 3\n delta = 0 - (detail % 3 === 0 ? detail / 3 : detail);\n }\n\n // Gecko\n if (axis !== undefined) {\n if (axis === event.HORIZONTAL_AXIS) {\n deltaY = 0;\n deltaX = 0 - delta;\n } else if (axis === event.VERTICAL_AXIS) {\n deltaX = 0;\n deltaY = delta;\n }\n }\n\n // Webkit\n if (wheelDeltaY !== undefined) {\n deltaY = wheelDeltaY / 120;\n }\n if (wheelDeltaX !== undefined) {\n deltaX = -1 * wheelDeltaX / 120;\n }\n\n // 默认 deltaY (ie)\n if (!deltaX && !deltaY) {\n deltaY = delta;\n }\n\n if (deltaX !== undefined) {\n /**\n * deltaX of mousewheel event\n * @property deltaX\n * @member Event.DomEvent.Object\n */\n event.deltaX = deltaX;\n }\n\n if (deltaY !== undefined) {\n /**\n * deltaY of mousewheel event\n * @property deltaY\n * @member Event.DomEvent.Object\n */\n event.deltaY = deltaY;\n }\n\n if (delta !== undefined) {\n /**\n * delta of mousewheel event\n * @property delta\n * @member Event.DomEvent.Object\n */\n event.delta = delta;\n }\n }\n}, {\n reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i,\n props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'],\n fix: function fix(event, nativeEvent) {\n var eventDoc = undefined;\n var doc = undefined;\n var body = undefined;\n var target = event.target;\n var button = nativeEvent.button;\n\n // Calculate pageX/Y if missing and clientX/Y available\n if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) {\n eventDoc = target.ownerDocument || document;\n doc = eventDoc.documentElement;\n body = eventDoc.body;\n event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n }\n\n // which for click: 1 === left; 2 === middle; 3 === right\n // do not use button\n if (!event.which && button !== undefined) {\n if (button & 1) {\n event.which = 1;\n } else if (button & 2) {\n event.which = 3;\n } else if (button & 4) {\n event.which = 2;\n } else {\n event.which = 0;\n }\n }\n\n // add relatedTarget, if necessary\n if (!event.relatedTarget && event.fromElement) {\n event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement;\n }\n\n return event;\n }\n}];\n\nfunction retTrue() {\n return TRUE;\n}\n\nfunction retFalse() {\n return FALSE;\n}\n\nfunction DomEventObject(nativeEvent) {\n var type = nativeEvent.type;\n\n var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean';\n\n _EventBaseObject2['default'].call(this);\n\n this.nativeEvent = nativeEvent;\n\n // in case dom event has been mark as default prevented by lower dom node\n var isDefaultPrevented = retFalse;\n if ('defaultPrevented' in nativeEvent) {\n isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse;\n } else if ('getPreventDefault' in nativeEvent) {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=691151\n isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse;\n } else if ('returnValue' in nativeEvent) {\n isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse;\n }\n\n this.isDefaultPrevented = isDefaultPrevented;\n\n var fixFns = [];\n var fixFn = undefined;\n var l = undefined;\n var prop = undefined;\n var props = commonProps.concat();\n\n eventNormalizers.forEach(function (normalizer) {\n if (type.match(normalizer.reg)) {\n props = props.concat(normalizer.props);\n if (normalizer.fix) {\n fixFns.push(normalizer.fix);\n }\n }\n });\n\n l = props.length;\n\n // clone properties of the original event object\n while (l) {\n prop = props[--l];\n this[prop] = nativeEvent[prop];\n }\n\n // fix target property, if necessary\n if (!this.target && isNative) {\n this.target = nativeEvent.srcElement || document; // srcElement might not be defined either\n }\n\n // check if target is a text node (safari)\n if (this.target && this.target.nodeType === 3) {\n this.target = this.target.parentNode;\n }\n\n l = fixFns.length;\n\n while (l) {\n fixFn = fixFns[--l];\n fixFn(this, nativeEvent);\n }\n\n this.timeStamp = nativeEvent.timeStamp || Date.now();\n}\n\nvar EventBaseObjectProto = _EventBaseObject2['default'].prototype;\n\n(0, _objectAssign2['default'])(DomEventObject.prototype, EventBaseObjectProto, {\n constructor: DomEventObject,\n\n preventDefault: function preventDefault() {\n var e = this.nativeEvent;\n\n // if preventDefault exists run it on the original event\n if (e.preventDefault) {\n e.preventDefault();\n } else {\n // otherwise set the returnValue property of the original event to FALSE (IE)\n e.returnValue = FALSE;\n }\n\n EventBaseObjectProto.preventDefault.call(this);\n },\n\n stopPropagation: function stopPropagation() {\n var e = this.nativeEvent;\n\n // if stopPropagation exists run it on the original event\n if (e.stopPropagation) {\n e.stopPropagation();\n } else {\n // otherwise set the cancelBubble property of the original event to TRUE (IE)\n e.cancelBubble = TRUE;\n }\n\n EventBaseObjectProto.stopPropagation.call(this);\n }\n});\n\nexports['default'] = DomEventObject;\nmodule.exports = exports['default'];","/**\n * @ignore\n * base event object for custom and dom event.\n * @author yiminghe@gmail.com\n */\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nfunction returnFalse() {\n return false;\n}\n\nfunction returnTrue() {\n return true;\n}\n\nfunction EventBaseObject() {\n this.timeStamp = Date.now();\n this.target = undefined;\n this.currentTarget = undefined;\n}\n\nEventBaseObject.prototype = {\n isEventObject: 1,\n\n constructor: EventBaseObject,\n\n isDefaultPrevented: returnFalse,\n\n isPropagationStopped: returnFalse,\n\n isImmediatePropagationStopped: returnFalse,\n\n preventDefault: function preventDefault() {\n this.isDefaultPrevented = returnTrue;\n },\n\n stopPropagation: function stopPropagation() {\n this.isPropagationStopped = returnTrue;\n },\n\n stopImmediatePropagation: function stopImmediatePropagation() {\n this.isImmediatePropagationStopped = returnTrue;\n // fixed 1.2\n // call stopPropagation implicitly\n this.stopPropagation();\n },\n\n halt: function halt(immediate) {\n if (immediate) {\n this.stopImmediatePropagation();\n } else {\n this.stopPropagation();\n }\n this.preventDefault();\n }\n};\n\nexports[\"default\"] = EventBaseObject;\nmodule.exports = exports[\"default\"];","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar geojson_rbush_1 = require(\"geojson-rbush\");\nvar line_segment_1 = require(\"@turf/line-segment\");\nvar nearest_point_on_line_1 = require(\"@turf/nearest-point-on-line\");\nvar boolean_point_on_line_1 = require(\"@turf/boolean-point-on-line\");\nvar invariant_1 = require(\"@turf/invariant\");\nvar meta_1 = require(\"@turf/meta\");\nvar helpers_1 = require(\"@turf/helpers\");\nvar equal = require(\"deep-equal\");\n/**\n * Takes any LineString or Polygon and returns the overlapping lines between both features.\n *\n * @name lineOverlap\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line1 any LineString or Polygon\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=0] Tolerance distance to match overlapping line segments (in kilometers)\n * @returns {FeatureCollection<LineString>} lines(s) that are overlapping between both features\n * @example\n * var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\n * var line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n *\n * var overlapping = turf.lineOverlap(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, overlapping]\n */\nfunction lineOverlap(line1, line2, options) {\n if (options === void 0) { options = {}; }\n // Optional parameters\n options = options || {};\n if (!helpers_1.isObject(options))\n throw new Error('options is invalid');\n var tolerance = options.tolerance || 0;\n // Containers\n var features = [];\n // Create Spatial Index\n var tree = geojson_rbush_1.default();\n // To-Do -- HACK way to support typescript\n var line = line_segment_1.default(line1);\n tree.load(line);\n var overlapSegment;\n // Line Intersection\n // Iterate over line segments\n meta_1.segmentEach(line2, function (segment) {\n var doesOverlaps = false;\n // Iterate over each segments which falls within the same bounds\n meta_1.featureEach(tree.search(segment), function (match) {\n if (doesOverlaps === false) {\n var coordsSegment = invariant_1.getCoords(segment).sort();\n var coordsMatch = invariant_1.getCoords(match).sort();\n // Segment overlaps feature\n if (equal(coordsSegment, coordsMatch)) {\n doesOverlaps = true;\n // Overlaps already exists - only append last coordinate of segment\n if (overlapSegment)\n overlapSegment = concatSegment(overlapSegment, segment);\n else\n overlapSegment = segment;\n // Match segments which don't share nodes (Issue #901)\n }\n else if ((tolerance === 0) ?\n boolean_point_on_line_1.default(coordsSegment[0], match) && boolean_point_on_line_1.default(coordsSegment[1], match) :\n nearest_point_on_line_1.default(match, coordsSegment[0]).properties.dist <= tolerance &&\n nearest_point_on_line_1.default(match, coordsSegment[1]).properties.dist <= tolerance) {\n doesOverlaps = true;\n if (overlapSegment)\n overlapSegment = concatSegment(overlapSegment, segment);\n else\n overlapSegment = segment;\n }\n else if ((tolerance === 0) ?\n boolean_point_on_line_1.default(coordsMatch[0], segment) && boolean_point_on_line_1.default(coordsMatch[1], segment) :\n nearest_point_on_line_1.default(segment, coordsMatch[0]).properties.dist <= tolerance &&\n nearest_point_on_line_1.default(segment, coordsMatch[1]).properties.dist <= tolerance) {\n // Do not define (doesOverlap = true) since more matches can occur within the same segment\n // doesOverlaps = true;\n if (overlapSegment)\n overlapSegment = concatSegment(overlapSegment, match);\n else\n overlapSegment = match;\n }\n }\n });\n // Segment doesn't overlap - add overlaps to results & reset\n if (doesOverlaps === false && overlapSegment) {\n features.push(overlapSegment);\n overlapSegment = undefined;\n }\n });\n // Add last segment if exists\n if (overlapSegment)\n features.push(overlapSegment);\n return helpers_1.featureCollection(features);\n}\n/**\n * Concat Segment\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {Feature<LineString>} segment 2-vertex LineString\n * @returns {Feature<LineString>} concat linestring\n */\nfunction concatSegment(line, segment) {\n var coords = invariant_1.getCoords(segment);\n var lineCoords = invariant_1.getCoords(line);\n var start = lineCoords[0];\n var end = lineCoords[lineCoords.length - 1];\n var geom = line.geometry.coordinates;\n if (equal(coords[0], start))\n geom.unshift(coords[1]);\n else if (equal(coords[0], end))\n geom.push(coords[1]);\n else if (equal(coords[1], start))\n geom.unshift(coords[0]);\n else if (equal(coords[1], end))\n geom.push(coords[0]);\n return line;\n}\nexports.default = lineOverlap;\n","'use strict';\n\nmodule.exports = rbush;\nmodule.exports.default = rbush;\n\nvar quickselect = require('quickselect');\n\nfunction rbush(maxEntries, format) {\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\n\n // max entries in a node is 9 by default; min node fill is 40% for best performance\n this._maxEntries = Math.max(4, maxEntries || 9);\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n\n if (format) {\n this._initFormat(format);\n }\n\n this.clear();\n}\n\nrbush.prototype = {\n\n all: function () {\n return this._all(this.data, []);\n },\n\n search: function (bbox) {\n\n var node = this.data,\n result = [],\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return result;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf) result.push(child);\n else if (contains(bbox, childBBox)) this._all(child, result);\n else nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return result;\n },\n\n collides: function (bbox) {\n\n var node = this.data,\n toBBox = this.toBBox;\n\n if (!intersects(bbox, node)) return false;\n\n var nodesToSearch = [],\n i, len, child, childBBox;\n\n while (node) {\n for (i = 0, len = node.children.length; i < len; i++) {\n\n child = node.children[i];\n childBBox = node.leaf ? toBBox(child) : child;\n\n if (intersects(bbox, childBBox)) {\n if (node.leaf || contains(bbox, childBBox)) return true;\n nodesToSearch.push(child);\n }\n }\n node = nodesToSearch.pop();\n }\n\n return false;\n },\n\n load: function (data) {\n if (!(data && data.length)) return this;\n\n if (data.length < this._minEntries) {\n for (var i = 0, len = data.length; i < len; i++) {\n this.insert(data[i]);\n }\n return this;\n }\n\n // recursively build the tree with the given data from scratch using OMT algorithm\n var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n if (!this.data.children.length) {\n // save as is if tree is empty\n this.data = node;\n\n } else if (this.data.height === node.height) {\n // split root if trees have the same height\n this._splitRoot(this.data, node);\n\n } else {\n if (this.data.height < node.height) {\n // swap trees if inserted one is bigger\n var tmpNode = this.data;\n this.data = node;\n node = tmpNode;\n }\n\n // insert the small tree into the large tree at appropriate level\n this._insert(node, this.data.height - node.height - 1, true);\n }\n\n return this;\n },\n\n insert: function (item) {\n if (item) this._insert(item, this.data.height - 1);\n return this;\n },\n\n clear: function () {\n this.data = createNode([]);\n return this;\n },\n\n remove: function (item, equalsFn) {\n if (!item) return this;\n\n var node = this.data,\n bbox = this.toBBox(item),\n path = [],\n indexes = [],\n i, parent, index, goingUp;\n\n // depth-first iterative tree traversal\n while (node || path.length) {\n\n if (!node) { // go up\n node = path.pop();\n parent = path[path.length - 1];\n i = indexes.pop();\n goingUp = true;\n }\n\n if (node.leaf) { // check current node\n index = findItem(item, node.children, equalsFn);\n\n if (index !== -1) {\n // item found, remove the item and condense tree upwards\n node.children.splice(index, 1);\n path.push(node);\n this._condense(path);\n return this;\n }\n }\n\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n path.push(node);\n indexes.push(i);\n i = 0;\n parent = node;\n node = node.children[0];\n\n } else if (parent) { // go right\n i++;\n node = parent.children[i];\n goingUp = false;\n\n } else node = null; // nothing found\n }\n\n return this;\n },\n\n toBBox: function (item) { return item; },\n\n compareMinX: compareNodeMinX,\n compareMinY: compareNodeMinY,\n\n toJSON: function () { return this.data; },\n\n fromJSON: function (data) {\n this.data = data;\n return this;\n },\n\n _all: function (node, result) {\n var nodesToSearch = [];\n while (node) {\n if (node.leaf) result.push.apply(result, node.children);\n else nodesToSearch.push.apply(nodesToSearch, node.children);\n\n node = nodesToSearch.pop();\n }\n return result;\n },\n\n _build: function (items, left, right, height) {\n\n var N = right - left + 1,\n M = this._maxEntries,\n node;\n\n if (N <= M) {\n // reached leaf level; return leaf\n node = createNode(items.slice(left, right + 1));\n calcBBox(node, this.toBBox);\n return node;\n }\n\n if (!height) {\n // target height of the bulk-loaded tree\n height = Math.ceil(Math.log(N) / Math.log(M));\n\n // target number of root entries to maximize storage utilization\n M = Math.ceil(N / Math.pow(M, height - 1));\n }\n\n node = createNode([]);\n node.leaf = false;\n node.height = height;\n\n // split the items into M mostly square tiles\n\n var N2 = Math.ceil(N / M),\n N1 = N2 * Math.ceil(Math.sqrt(M)),\n i, j, right2, right3;\n\n multiSelect(items, left, right, N1, this.compareMinX);\n\n for (i = left; i <= right; i += N1) {\n\n right2 = Math.min(i + N1 - 1, right);\n\n multiSelect(items, i, right2, N2, this.compareMinY);\n\n for (j = i; j <= right2; j += N2) {\n\n right3 = Math.min(j + N2 - 1, right2);\n\n // pack each entry recursively\n node.children.push(this._build(items, j, right3, height - 1));\n }\n }\n\n calcBBox(node, this.toBBox);\n\n return node;\n },\n\n _chooseSubtree: function (bbox, node, level, path) {\n\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\n\n while (true) {\n path.push(node);\n\n if (node.leaf || path.length - 1 === level) break;\n\n minArea = minEnlargement = Infinity;\n\n for (i = 0, len = node.children.length; i < len; i++) {\n child = node.children[i];\n area = bboxArea(child);\n enlargement = enlargedArea(bbox, child) - area;\n\n // choose entry with the least area enlargement\n if (enlargement < minEnlargement) {\n minEnlargement = enlargement;\n minArea = area < minArea ? area : minArea;\n targetNode = child;\n\n } else if (enlargement === minEnlargement) {\n // otherwise choose one with the smallest area\n if (area < minArea) {\n minArea = area;\n targetNode = child;\n }\n }\n }\n\n node = targetNode || node.children[0];\n }\n\n return node;\n },\n\n _insert: function (item, level, isNode) {\n\n var toBBox = this.toBBox,\n bbox = isNode ? item : toBBox(item),\n insertPath = [];\n\n // find the best node for accommodating the item, saving all nodes along the path too\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n // put the item into the node\n node.children.push(item);\n extend(node, bbox);\n\n // split on node overflow; propagate upwards if necessary\n while (level >= 0) {\n if (insertPath[level].children.length > this._maxEntries) {\n this._split(insertPath, level);\n level--;\n } else break;\n }\n\n // adjust bboxes along the insertion path\n this._adjustParentBBoxes(bbox, insertPath, level);\n },\n\n // split overflowed node into two\n _split: function (insertPath, level) {\n\n var node = insertPath[level],\n M = node.children.length,\n m = this._minEntries;\n\n this._chooseSplitAxis(node, m, M);\n\n var splitIndex = this._chooseSplitIndex(node, m, M);\n\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n newNode.height = node.height;\n newNode.leaf = node.leaf;\n\n calcBBox(node, this.toBBox);\n calcBBox(newNode, this.toBBox);\n\n if (level) insertPath[level - 1].children.push(newNode);\n else this._splitRoot(node, newNode);\n },\n\n _splitRoot: function (node, newNode) {\n // split root node\n this.data = createNode([node, newNode]);\n this.data.height = node.height + 1;\n this.data.leaf = false;\n calcBBox(this.data, this.toBBox);\n },\n\n _chooseSplitIndex: function (node, m, M) {\n\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\n\n minOverlap = minArea = Infinity;\n\n for (i = m; i <= M - m; i++) {\n bbox1 = distBBox(node, 0, i, this.toBBox);\n bbox2 = distBBox(node, i, M, this.toBBox);\n\n overlap = intersectionArea(bbox1, bbox2);\n area = bboxArea(bbox1) + bboxArea(bbox2);\n\n // choose distribution with minimum overlap\n if (overlap < minOverlap) {\n minOverlap = overlap;\n index = i;\n\n minArea = area < minArea ? area : minArea;\n\n } else if (overlap === minOverlap) {\n // otherwise choose distribution with minimum area\n if (area < minArea) {\n minArea = area;\n index = i;\n }\n }\n }\n\n return index;\n },\n\n // sorts node children by the best axis for split\n _chooseSplitAxis: function (node, m, M) {\n\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\n xMargin = this._allDistMargin(node, m, M, compareMinX),\n yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n // if total distributions margin value is minimal for x, sort by minX,\n // otherwise it's already sorted by minY\n if (xMargin < yMargin) node.children.sort(compareMinX);\n },\n\n // total margin of all possible split distributions where each node is at least m full\n _allDistMargin: function (node, m, M, compare) {\n\n node.children.sort(compare);\n\n var toBBox = this.toBBox,\n leftBBox = distBBox(node, 0, m, toBBox),\n rightBBox = distBBox(node, M - m, M, toBBox),\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\n i, child;\n\n for (i = m; i < M - m; i++) {\n child = node.children[i];\n extend(leftBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(leftBBox);\n }\n\n for (i = M - m - 1; i >= m; i--) {\n child = node.children[i];\n extend(rightBBox, node.leaf ? toBBox(child) : child);\n margin += bboxMargin(rightBBox);\n }\n\n return margin;\n },\n\n _adjustParentBBoxes: function (bbox, path, level) {\n // adjust bboxes along the given tree path\n for (var i = level; i >= 0; i--) {\n extend(path[i], bbox);\n }\n },\n\n _condense: function (path) {\n // go through the path, removing empty nodes and updating bboxes\n for (var i = path.length - 1, siblings; i >= 0; i--) {\n if (path[i].children.length === 0) {\n if (i > 0) {\n siblings = path[i - 1].children;\n siblings.splice(siblings.indexOf(path[i]), 1);\n\n } else this.clear();\n\n } else calcBBox(path[i], this.toBBox);\n }\n },\n\n _initFormat: function (format) {\n // data format (minX, minY, maxX, maxY accessors)\n\n // uses eval-type function compilation instead of just accepting a toBBox function\n // because the algorithms are very sensitive to sorting functions performance,\n // so they should be dead simple and without inner calls\n\n var compareArr = ['return a', ' - b', ';'];\n\n this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));\n this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));\n\n this.toBBox = new Function('a',\n 'return {minX: a' + format[0] +\n ', minY: a' + format[1] +\n ', maxX: a' + format[2] +\n ', maxY: a' + format[3] + '};');\n }\n};\n\nfunction findItem(item, items, equalsFn) {\n if (!equalsFn) return items.indexOf(item);\n\n for (var i = 0; i < items.length; i++) {\n if (equalsFn(item, items[i])) return i;\n }\n return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n if (!destNode) destNode = createNode(null);\n destNode.minX = Infinity;\n destNode.minY = Infinity;\n destNode.maxX = -Infinity;\n destNode.maxY = -Infinity;\n\n for (var i = k, child; i < p; i++) {\n child = node.children[i];\n extend(destNode, node.leaf ? toBBox(child) : child);\n }\n\n return destNode;\n}\n\nfunction extend(a, b) {\n a.minX = Math.min(a.minX, b.minX);\n a.minY = Math.min(a.minY, b.minY);\n a.maxX = Math.max(a.maxX, b.maxX);\n a.maxY = Math.max(a.maxY, b.maxY);\n return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n var minX = Math.max(a.minX, b.minX),\n minY = Math.max(a.minY, b.minY),\n maxX = Math.min(a.maxX, b.maxX),\n maxY = Math.min(a.maxY, b.maxY);\n\n return Math.max(0, maxX - minX) *\n Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n return a.minX <= b.minX &&\n a.minY <= b.minY &&\n b.maxX <= a.maxX &&\n b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n return b.minX <= a.maxX &&\n b.minY <= a.maxY &&\n b.maxX >= a.minX &&\n b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n return {\n children: children,\n height: 1,\n leaf: true,\n minX: Infinity,\n minY: Infinity,\n maxX: -Infinity,\n maxY: -Infinity\n };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n var stack = [left, right],\n mid;\n\n while (stack.length) {\n right = stack.pop();\n left = stack.pop();\n\n if (right - left <= n) continue;\n\n mid = left + Math.ceil((right - left) / n / 2) * n;\n quickselect(arr, mid, left, right, compare);\n\n stack.push(left, mid, mid, right);\n }\n}\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.quickselect = factory());\n}(this, (function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n while (right > left) {\n if (right - left > 600) {\n var n = right - left + 1;\n var m = k - left + 1;\n var z = Math.log(n);\n var s = 0.5 * Math.exp(2 * z / 3);\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselectStep(arr, k, newLeft, newRight, compare);\n }\n\n var t = arr[k];\n var i = left;\n var j = right;\n\n swap(arr, left, k);\n if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n while (i < j) {\n swap(arr, i, j);\n i++;\n j--;\n while (compare(arr[i], t) < 0) i++;\n while (compare(arr[j], t) > 0) j--;\n }\n\n if (compare(arr[left], t) === 0) swap(arr, left, j);\n else {\n j++;\n swap(arr, j, right);\n }\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn quickselect;\n\n})));\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\nvar toStr = Object.prototype.toString;\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn toStr.call(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\ttoStr.call(value) !== '[object Array]' &&\n\t\ttoStr.call(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\n// http://www.ecma-international.org/ecma-262/6.0/#sec-object.is\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar has = require('has');\nvar regexExec = RegExp.prototype.exec;\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nvar tryRegexExecCall = function tryRegexExec(value) {\n\ttry {\n\t\tvar lastIndex = value.lastIndex;\n\t\tvalue.lastIndex = 0; // eslint-disable-line no-param-reassign\n\n\t\tregexExec.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\tvalue.lastIndex = lastIndex; // eslint-disable-line no-param-reassign\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar regexClass = '[object RegExp]';\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nmodule.exports = function isRegex(value) {\n\tif (!value || typeof value !== 'object') {\n\t\treturn false;\n\t}\n\tif (!hasToStringTag) {\n\t\treturn toStr.call(value) === regexClass;\n\t}\n\n\tvar descriptor = gOPD(value, 'lastIndex');\n\tvar hasLastIndexDataProperty = descriptor && has(descriptor, 'value');\n\tif (!hasLastIndexDataProperty) {\n\t\treturn false;\n\t}\n\n\treturn tryRegexExecCall(value);\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('es-abstract/helpers/callBind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar flagsBound = callBind(implementation);\n\ndefine(flagsBound, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = flagsBound;\n","'use strict';\n\nvar bind = require('function-bind');\n\nvar GetIntrinsic = require('../GetIntrinsic');\n\nvar $Function = GetIntrinsic('%Function%');\nvar $apply = $Function.apply;\nvar $call = $Function.call;\n\nmodule.exports = function callBind() {\n\treturn bind.apply($call, arguments);\n};\n\nmodule.exports.apply = function applyBind() {\n\treturn bind.apply($apply, arguments);\n};\n","'use strict';\n\n/* globals\n\tAtomics,\n\tSharedArrayBuffer,\n*/\n\nvar undefined;\n\nvar $TypeError = TypeError;\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () { throw new $TypeError(); };\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar generator; // = function * () {};\nvar generatorFunction = generator ? getProto(generator) : undefined;\nvar asyncFn; // async function() {};\nvar asyncFunction = asyncFn ? asyncFn.constructor : undefined;\nvar asyncGen; // async function * () {};\nvar asyncGenFunction = asyncGen ? getProto(asyncGen) : undefined;\nvar asyncGenIterator = asyncGen ? asyncGen() : undefined;\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%ArrayPrototype%': Array.prototype,\n\t'%ArrayProto_entries%': Array.prototype.entries,\n\t'%ArrayProto_forEach%': Array.prototype.forEach,\n\t'%ArrayProto_keys%': Array.prototype.keys,\n\t'%ArrayProto_values%': Array.prototype.values,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': asyncFunction,\n\t'%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined,\n\t'%AsyncGenerator%': asyncGen ? getProto(asyncGenIterator) : undefined,\n\t'%AsyncGeneratorFunction%': asyncGenFunction,\n\t'%AsyncGeneratorPrototype%': asyncGenFunction ? asyncGenFunction.prototype : undefined,\n\t'%AsyncIteratorPrototype%': asyncGenIterator && hasSymbols && Symbol.asyncIterator ? asyncGenIterator[Symbol.asyncIterator]() : undefined,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%Boolean%': Boolean,\n\t'%BooleanPrototype%': Boolean.prototype,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype,\n\t'%Date%': Date,\n\t'%DatePrototype%': Date.prototype,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%ErrorPrototype%': Error.prototype,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%EvalErrorPrototype%': EvalError.prototype,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype,\n\t'%Function%': Function,\n\t'%FunctionPrototype%': Function.prototype,\n\t'%Generator%': generator ? getProto(generator()) : undefined,\n\t'%GeneratorFunction%': generatorFunction,\n\t'%GeneratorPrototype%': generatorFunction ? generatorFunction.prototype : undefined,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype,\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%NumberPrototype%': Number.prototype,\n\t'%Object%': Object,\n\t'%ObjectPrototype%': Object.prototype,\n\t'%ObjProto_toString%': Object.prototype.toString,\n\t'%ObjProto_valueOf%': Object.prototype.valueOf,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype,\n\t'%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then,\n\t'%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all,\n\t'%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject,\n\t'%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%RangeErrorPrototype%': RangeError.prototype,\n\t'%ReferenceError%': ReferenceError,\n\t'%ReferenceErrorPrototype%': ReferenceError.prototype,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%RegExpPrototype%': RegExp.prototype,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype,\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%StringPrototype%': String.prototype,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined,\n\t'%SyntaxError%': SyntaxError,\n\t'%SyntaxErrorPrototype%': SyntaxError.prototype,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined,\n\t'%TypeError%': $TypeError,\n\t'%TypeErrorPrototype%': $TypeError.prototype,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype,\n\t'%URIError%': URIError,\n\t'%URIErrorPrototype%': URIError.prototype,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,\n\t'%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype\n};\n\nvar bind = require('function-bind');\nvar $replace = bind.call(Function.call, String.prototype.replace);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tif (!(name in INTRINSICS)) {\n\t\tthrow new SyntaxError('intrinsic ' + name + ' does not exist!');\n\t}\n\n\t// istanbul ignore if // hopefully this is impossible to test :-)\n\tif (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {\n\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t}\n\n\treturn INTRINSICS[name];\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tvar parts = stringToPath(name);\n\n\tvar value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);\n\tfor (var i = 1; i < parts.length; i += 1) {\n\t\tif (value != null) {\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, parts[i]);\n\t\t\t\tif (!allowMissing && !(parts[i] in value)) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\tvalue = desc ? (desc.get || desc.value) : value[parts[i]];\n\t\t\t} else {\n\t\t\t\tvalue = value[parts[i]];\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar origSymbol = global.Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar supportsDescriptors = require('define-properties').supportsDescriptors;\nvar getPolyfill = require('./polyfill');\nvar gOPD = Object.getOwnPropertyDescriptor;\nvar defineProperty = Object.defineProperty;\nvar TypeErr = TypeError;\nvar getProto = Object.getPrototypeOf;\nvar regex = /a/;\n\nmodule.exports = function shimFlags() {\n\tif (!supportsDescriptors || !getProto) {\n\t\tthrow new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');\n\t}\n\tvar polyfill = getPolyfill();\n\tvar proto = getProto(regex);\n\tvar descriptor = gOPD(proto, 'flags');\n\tif (!descriptor || descriptor.get !== polyfill) {\n\t\tdefineProperty(proto, 'flags', {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tget: polyfill\n\t\t});\n\t}\n\treturn polyfill;\n};\n","'use strict';\n\nvar getDay = Date.prototype.getDay;\nvar tryDateObject = function tryDateGetDayCall(value) {\n\ttry {\n\t\tgetDay.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n\nvar toStr = Object.prototype.toString;\nvar dateClass = '[object Date]';\nvar hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';\n\nmodule.exports = function isDateObject(value) {\n\tif (typeof value !== 'object' || value === null) {\n\t\treturn false;\n\t}\n\treturn hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;\n};\n","//index.js\nvar deepEqual = require('deep-equal');\n\nvar Equality = function(opt) {\n this.precision = opt && opt.precision ? opt.precision : 17;\n this.direction = opt && opt.direction ? opt.direction : false;\n this.pseudoNode = opt && opt.pseudoNode ? opt.pseudoNode : false;\n this.objectComparator = opt && opt.objectComparator ? opt.objectComparator : objectComparator;\n};\n\nEquality.prototype.compare = function(g1,g2) {\n if (g1.type !== g2.type || !sameLength(g1,g2)) return false;\n\n switch(g1.type) {\n case 'Point':\n return this.compareCoord(g1.coordinates, g2.coordinates);\n break;\n case 'LineString':\n return this.compareLine(g1.coordinates, g2.coordinates,0,false);\n break;\n case 'Polygon':\n return this.comparePolygon(g1,g2);\n break;\n case 'Feature':\n return this.compareFeature(g1, g2);\n default:\n if (g1.type.indexOf('Multi') === 0) {\n var context = this;\n var g1s = explode(g1);\n var g2s = explode(g2);\n return g1s.every(function(g1part) {\n return this.some(function(g2part) {\n return context.compare(g1part,g2part);\n });\n },g2s);\n }\n }\n return false;\n};\n\nfunction explode(g) {\n return g.coordinates.map(function(part) {\n return {\n type: g.type.replace('Multi', ''),\n coordinates: part}\n });\n}\n//compare length of coordinates/array\nfunction sameLength(g1,g2) {\n return g1.hasOwnProperty('coordinates') ?\n g1.coordinates.length === g2.coordinates.length\n : g1.length === g2.length;\n}\n\n// compare the two coordinates [x,y]\nEquality.prototype.compareCoord = function(c1,c2) {\n if (c1.length !== c2.length) {\n return false;\n }\n\n for (var i=0; i < c1.length; i++) {\n if (c1[i].toFixed(this.precision) !== c2[i].toFixed(this.precision)) {\n return false;\n }\n }\n return true;\n};\n\nEquality.prototype.compareLine = function(path1,path2,ind,isPoly) {\n if (!sameLength(path1,path2)) return false;\n var p1 = this.pseudoNode ? path1 : this.removePseudo(path1);\n var p2 = this.pseudoNode ? path2 : this.removePseudo(path2);\n if (isPoly && !this.compareCoord(p1[0],p2[0])) {\n // fix start index of both to same point\n p2 = this.fixStartIndex(p2,p1);\n if(!p2) return;\n }\n // for linestring ind =0 and for polygon ind =1\n var sameDirection = this.compareCoord(p1[ind],p2[ind]);\n if (this.direction || sameDirection\n ) {\n return this.comparePath(p1, p2);\n } else {\n if (this.compareCoord(p1[ind],p2[p2.length - (1+ind)])\n ) {\n return this.comparePath(p1.slice().reverse(), p2);\n }\n return false;\n }\n};\nEquality.prototype.fixStartIndex = function(sourcePath,targetPath) {\n //make sourcePath first point same as of targetPath\n var correctPath,ind = -1;\n for (var i=0; i< sourcePath.length; i++) {\n if(this.compareCoord(sourcePath[i],targetPath[0])) {\n ind = i;\n break;\n }\n }\n if (ind >= 0) {\n correctPath = [].concat(\n sourcePath.slice(ind,sourcePath.length),\n sourcePath.slice(1,ind+1));\n }\n return correctPath;\n};\nEquality.prototype.comparePath = function (p1,p2) {\n var cont = this;\n return p1.every(function(c,i) {\n return cont.compareCoord(c,this[i]);\n },p2);\n};\n\nEquality.prototype.comparePolygon = function(g1,g2) {\n if (this.compareLine(g1.coordinates[0],g2.coordinates[0],1,true)) {\n var holes1 = g1.coordinates.slice(1,g1.coordinates.length);\n var holes2 = g2.coordinates.slice(1,g2.coordinates.length);\n var cont = this;\n return holes1.every(function(h1) {\n return this.some(function(h2) {\n return cont.compareLine(h1,h2,1,true);\n });\n },holes2);\n } else {\n return false;\n }\n};\n\nEquality.prototype.compareFeature = function(g1,g2) {\n if (\n g1.id !== g2.id ||\n !this.objectComparator(g1.properties, g2.properties) ||\n !this.compareBBox(g1,g2)\n ) {\n return false;\n }\n return this.compare(g1.geometry, g2.geometry);\n};\n\nEquality.prototype.compareBBox = function(g1,g2) {\n if (\n (!g1.bbox && !g2.bbox) || \n (\n g1.bbox && g2.bbox &&\n this.compareCoord(g1.bbox, g2.bbox)\n )\n ) {\n return true;\n }\n return false;\n};\nEquality.prototype.removePseudo = function(path) {\n //TODO to be implement\n return path;\n};\n\nfunction objectComparator(obj1, obj2) {\n return deepEqual(obj1, obj2, {strict: true});\n}\n\nmodule.exports = Equality;\n","import { Feature as GeoJson, Geometry } from 'geojson';\n\nimport { Style } from '../types';\n\nexport default class Feature {\n // geo json coordinates\n geoJson: GeoJson<Geometry>;\n style: Style;\n original: any | null | undefined;\n metadata: Record<string, any>;\n\n constructor(\n geoJson: GeoJson<Geometry>,\n style: Style,\n original: any | null | undefined = null,\n metadata: Record<string, any> = {}\n ) {\n this.geoJson = geoJson;\n this.style = style;\n this.original = original;\n this.metadata = metadata;\n }\n\n getCoords(): any {\n // @ts-ignore\n return this.geoJson.geometry.coordinates;\n }\n}\n","import { JunctionScatterplotLayer } from '@nebula.gl/layers';\nimport NebulaLayer from '../nebula-layer';\nimport { toDeckColor } from '../utils';\nimport DeckCache from '../deck-renderer/deck-cache';\n\nexport default class JunctionsLayer extends NebulaLayer {\n deckCache: DeckCache<any, any>;\n\n constructor(config: Record<string, any>) {\n super(config);\n this.deckCache = new DeckCache(config.getData, (data) => config.toNebulaFeature(data));\n this.enablePicking = true;\n }\n\n render({ nebula }: Record<string, any>) {\n const defaultColor = [0x0, 0x0, 0x0, 0xff];\n const { objects, updateTrigger } = this.deckCache;\n\n return new JunctionScatterplotLayer({\n id: `junctions-${this.id}`,\n data: objects,\n opacity: 1,\n // @ts-ignore\n fp64: false,\n pickable: true,\n getPosition: (nf) => nf.geoJson.geometry.coordinates,\n getFillColor: (nf) => toDeckColor(nf.style.fillColor) || defaultColor,\n getStrokeColor: (nf) =>\n toDeckColor(nf.style.outlineColor) || toDeckColor(nf.style.fillColor) || defaultColor,\n getRadius: (nf) => nf.style.pointRadiusMeters + nf.style.outlineRadiusMeters || 1,\n getInnerRadius: (nf) => nf.style.pointRadiusMeters || 0.5,\n parameters: {\n depthTest: false,\n blend: false,\n },\n\n updateTriggers: { all: updateTrigger },\n\n nebulaLayer: this,\n });\n }\n}\n","// generated with build-style.sh\nexport default `.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box; }\n .vega-embed.has-actions {\n padding-right: 38px; }\n .vega-embed details:not([open]) > :not(summary) {\n display: none !important; }\n .vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n outline: none;\n cursor: pointer;\n line-height: 0px; }\n .vega-embed summary::-webkit-details-marker {\n display: none; }\n .vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset; }\n .vega-embed summary svg {\n width: 14px;\n height: 14px; }\n .vega-embed details[open] summary {\n opacity: 0.7; }\n .vega-embed:hover summary,\n .vega-embed:focus summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease; }\n .vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left; }\n .vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none; }\n .vega-embed .vega-actions a:hover {\n background-color: #f7f7f9;\n color: black; }\n .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: \"\";\n display: inline-block;\n position: absolute; }\n .vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid #0000;\n border-bottom-color: #d9d9d9; }\n .vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid #0000;\n border-bottom-color: #fff; }\n .vega-embed .chart-wrapper.fit-x {\n width: 100%; }\n .vega-embed .chart-wrapper.fit-y {\n height: 100%; }\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px; }\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6); }\n to {\n opacity: 1;\n transform: scale(1); } }\n`;\n","import nearestPointOnLine from '@turf/nearest-point-on-line';\nimport { point, lineString as toLineString } from '@turf/helpers';\nimport circle from '@turf/circle';\nimport distance from '@turf/distance';\nimport turfCenter from '@turf/center';\nimport {\n recursivelyTraverseNestedArrays,\n nearestPointOnProjectedLine,\n getPickedEditHandles,\n getPickedEditHandle,\n NearestPointType,\n} from '../utils';\nimport { LineString, Point, FeatureCollection, FeatureOf } from '../geojson-types';\nimport {\n ModeProps,\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n Viewport,\n EditHandleFeature,\n GuideFeatureCollection,\n} from '../types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class ResizeCircleMode extends GeoJsonEditMode {\n _selectedEditHandle: EditHandleFeature | null | undefined;\n _isResizing = false;\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const handles = [];\n const selectedFeatureIndexes = props.selectedIndexes;\n\n const { lastPointerMoveEvent } = props;\n const picks = lastPointerMoveEvent && lastPointerMoveEvent.picks;\n const mapCoords = lastPointerMoveEvent && lastPointerMoveEvent.mapCoords;\n\n // intermediate edit handle\n if (\n picks &&\n picks.length &&\n mapCoords &&\n selectedFeatureIndexes.length === 1 &&\n !this._isResizing\n ) {\n const featureAsPick = picks.find((pick) => !pick.isGuide);\n\n // is the feature in the pick selected\n if (\n featureAsPick &&\n featureAsPick.object.properties.shape &&\n featureAsPick.object.properties.shape.includes('Circle') &&\n props.selectedIndexes.includes(featureAsPick.index)\n ) {\n let intermediatePoint: NearestPointType | null | undefined = null;\n let positionIndexPrefix = [];\n const referencePoint = point(mapCoords);\n // process all lines of the (single) feature\n recursivelyTraverseNestedArrays(\n featureAsPick.object.geometry.coordinates,\n [],\n (lineString, prefix) => {\n const lineStringFeature = toLineString(lineString);\n const candidateIntermediatePoint = this.getNearestPoint(\n // @ts-ignore\n lineStringFeature,\n referencePoint,\n props.modeConfig && props.modeConfig.viewport\n );\n if (\n !intermediatePoint ||\n candidateIntermediatePoint.properties.dist < intermediatePoint.properties.dist\n ) {\n intermediatePoint = candidateIntermediatePoint;\n positionIndexPrefix = prefix;\n }\n }\n );\n // tack on the lone intermediate point to the set of handles\n if (intermediatePoint) {\n const {\n geometry: { coordinates: position },\n properties: { index },\n } = intermediatePoint;\n handles.push({\n type: 'Feature',\n properties: {\n guideType: 'editHandle',\n editHandleType: 'intermediate',\n featureIndex: featureAsPick.index,\n positionIndexes: [...positionIndexPrefix, index + 1],\n },\n geometry: {\n type: 'Point',\n coordinates: position,\n },\n });\n }\n }\n }\n\n return {\n type: 'FeatureCollection',\n features: handles,\n };\n }\n\n // turf.js does not support elevation for nearestPointOnLine\n getNearestPoint(\n line: FeatureOf<LineString>,\n inPoint: FeatureOf<Point>,\n viewport: Viewport | null | undefined\n ): NearestPointType {\n const { coordinates } = line.geometry;\n if (coordinates.some((coord) => coord.length > 2)) {\n if (viewport) {\n // This line has elevation, we need to use alternative algorithm\n return nearestPointOnProjectedLine(line, inPoint, viewport);\n }\n // eslint-disable-next-line no-console,no-undef\n console.log(\n 'Editing 3D point but modeConfig.viewport not provided. Falling back to 2D logic.'\n );\n }\n\n return nearestPointOnLine(line, inPoint);\n }\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>): void {\n const editHandle = getPickedEditHandle(event.pointerDownPicks);\n\n if (editHandle) {\n // Cancel map panning if pointer went down on an edit handle\n event.cancelPan();\n\n const editHandleProperties = editHandle.properties;\n\n const feature = this.getSelectedFeature(props);\n const center = turfCenter(feature).geometry.coordinates;\n const numberOfSteps = Object.entries(feature.geometry.coordinates[0]).length - 1;\n const radius = Math.max(distance(center, event.mapCoords), 0.001);\n\n const { steps = numberOfSteps } = {};\n const options = { steps };\n const updatedFeature = circle(center, radius, options);\n const geometry = updatedFeature.geometry;\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .replaceGeometry(editHandleProperties.featureIndex, geometry)\n .getObject();\n\n props.onEdit({\n updatedData,\n editType: 'unionGeometry',\n editContext: {\n featureIndexes: [editHandleProperties.featureIndex],\n },\n });\n }\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>): void {\n if (!this._isResizing) {\n const selectedEditHandle = getPickedEditHandle(event.picks);\n this._selectedEditHandle =\n selectedEditHandle && selectedEditHandle.properties.editHandleType === 'intermediate'\n ? selectedEditHandle\n : null;\n }\n\n const cursor = this.getCursor(event);\n props.onUpdateCursor(cursor);\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this._selectedEditHandle) {\n this._isResizing = true;\n }\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this._isResizing) {\n this._selectedEditHandle = null;\n this._isResizing = false;\n }\n }\n\n getCursor(event: PointerMoveEvent): string | null | undefined {\n const picks = (event && event.picks) || [];\n\n const handlesPicked = getPickedEditHandles(picks);\n if (handlesPicked.length) {\n return 'cell';\n }\n return null;\n }\n}\n","import { StartDraggingEvent, ModeProps } from '../types';\nimport { FeatureCollection } from '../geojson-types';\nimport { TranslateMode } from './translate-mode';\n\nexport class DuplicateMode extends TranslateMode {\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n super.handleStartDragging(event, props);\n\n if (this._geometryBeforeTranslate) {\n props.onEdit(this.getAddManyFeaturesAction(this._geometryBeforeTranslate, props.data));\n }\n }\n\n updateCursor(props: ModeProps<FeatureCollection>) {\n if (this._isTranslatable) {\n props.onUpdateCursor('copy');\n } else {\n props.onUpdateCursor(null);\n }\n }\n}\n","import { Position, LineString, FeatureCollection } from '../geojson-types';\nimport { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection } from '../types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class ExtendLineStringMode extends GeoJsonEditMode {\n getSingleSelectedLineString(props: ModeProps<FeatureCollection>): LineString | null | undefined {\n const selectedGeometry = this.getSelectedGeometry(props);\n\n if (selectedGeometry && selectedGeometry.type === 'LineString') {\n return selectedGeometry;\n }\n return null;\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const { selectedIndexes } = props;\n const selectedLineString = this.getSingleSelectedLineString(props);\n\n if (!selectedLineString) {\n console.warn(`ExtendLineStringMode only supported for single LineString selection`); // eslint-disable-line\n return;\n }\n\n // Extend the LineString\n let positionIndexes = [selectedLineString.coordinates.length];\n\n const modeConfig = props.modeConfig;\n if (modeConfig && modeConfig.drawAtFront) {\n positionIndexes = [0];\n }\n const featureIndex = selectedIndexes[0];\n const updatedData = new ImmutableFeatureCollection(props.data)\n .addPosition(featureIndex, positionIndexes, event.mapCoords)\n .getObject();\n\n props.onEdit({\n updatedData,\n editType: 'addPosition',\n editContext: {\n featureIndexes: [featureIndex],\n positionIndexes,\n position: event.mapCoords,\n },\n });\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const guides = {\n type: 'FeatureCollection',\n features: [],\n };\n\n const selectedLineString = this.getSingleSelectedLineString(props);\n if (!selectedLineString) {\n // nothing to do\n // @ts-ignore\n return guides;\n }\n\n const mapCoords = props.lastPointerMoveEvent && props.lastPointerMoveEvent.mapCoords;\n\n // Draw an extension line starting from one end of the selected LineString to the cursor\n let startPosition: Position | null | undefined = null;\n const { modeConfig } = props;\n if (modeConfig && modeConfig.drawAtFront) {\n startPosition = selectedLineString.coordinates[0];\n } else {\n startPosition = selectedLineString.coordinates[selectedLineString.coordinates.length - 1];\n }\n\n guides.features.push({\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'LineString',\n coordinates: [startPosition, mapCoords],\n },\n });\n // @ts-ignore\n return guides;\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n }\n}\n","import booleanPointInPolygon from '@turf/boolean-point-in-polygon';\nimport turfDifference from '@turf/difference';\nimport turfBuffer from '@turf/buffer';\nimport lineIntersect from '@turf/line-intersect';\nimport { lineString } from '@turf/helpers';\nimport turfBearing from '@turf/bearing';\nimport turfDistance from '@turf/distance';\nimport turfDestination from '@turf/destination';\nimport turfPolygonToLine from '@turf/polygon-to-line';\nimport nearestPointOnLine from '@turf/nearest-point-on-line';\nimport { generatePointsParallelToLinePoints } from '../utils';\nimport { FeatureCollection } from '../geojson-types';\nimport {\n ClickEvent,\n PointerMoveEvent,\n ModeProps,\n GuideFeatureCollection,\n TentativeFeature,\n} from '../types';\nimport { GeoJsonEditMode, GeoJsonEditAction } from './geojson-edit-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class SplitPolygonMode extends GeoJsonEditMode {\n calculateMapCoords(clickSequence: any, mapCoords: any, props: ModeProps<FeatureCollection>) {\n const modeConfig = props.modeConfig;\n if (!modeConfig || !modeConfig.lock90Degree || !clickSequence.length) {\n return mapCoords;\n }\n if (clickSequence.length === 1) {\n // if first point is clicked, then find closest polygon point and build ~90deg vector\n const firstPoint = clickSequence[0];\n const selectedGeometry = this.getSelectedGeometry(props);\n // @ts-ignore\n const feature = turfPolygonToLine(selectedGeometry);\n\n const lines = feature.type === 'FeatureCollection' ? feature.features : [feature];\n let minDistance = Number.MAX_SAFE_INTEGER;\n let closestPoint = null;\n // If Multipolygon, then we should find nearest polygon line and stick split to it.\n lines.forEach((line) => {\n const snapPoint = nearestPointOnLine(line, firstPoint);\n const distanceFromOrigin = turfDistance(snapPoint, firstPoint);\n if (minDistance > distanceFromOrigin) {\n minDistance = distanceFromOrigin;\n closestPoint = snapPoint;\n }\n });\n\n if (closestPoint) {\n // closest point is used as 90degree entry to the polygon\n const lastBearing = turfBearing(firstPoint, closestPoint);\n const currentDistance = turfDistance(firstPoint, mapCoords, { units: 'meters' });\n return turfDestination(firstPoint, currentDistance, lastBearing, {\n units: 'meters',\n }).geometry.coordinates;\n }\n return mapCoords;\n }\n // Allow only 90 degree turns\n const lastPoint = clickSequence[clickSequence.length - 1];\n const [approximatePoint] = generatePointsParallelToLinePoints(\n clickSequence[clickSequence.length - 2],\n lastPoint,\n mapCoords\n );\n // align point with current ground\n const nearestPt = nearestPointOnLine(lineString([lastPoint, approximatePoint]), mapCoords)\n .geometry.coordinates;\n return nearestPt;\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const clickSequence = this.getClickSequence();\n\n const guides: GuideFeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (clickSequence.length === 0 || !props.lastPointerMoveEvent) {\n // nothing to do yet\n return guides;\n }\n\n const { mapCoords } = props.lastPointerMoveEvent;\n\n guides.features.push({\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'LineString',\n coordinates: [...clickSequence, this.calculateMapCoords(clickSequence, mapCoords, props)],\n },\n });\n\n return guides;\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const tentativeFeature = this.getTentativeGuide(props);\n\n const selectedGeometry = this.getSelectedGeometry(props);\n\n if (!selectedGeometry) {\n // eslint-disable-next-line no-console,no-undef\n console.warn('A polygon must be selected for splitting');\n return;\n }\n\n const clickSequence = this.getClickSequence();\n if (tentativeFeature && tentativeFeature.geometry.type === 'LineString') {\n clickSequence.push(\n tentativeFeature.geometry.coordinates[tentativeFeature.geometry.coordinates.length - 1]\n );\n } else {\n this.addClickSequence(event);\n }\n\n const pt = {\n type: 'Point',\n coordinates: clickSequence[clickSequence.length - 1],\n };\n // @ts-ignore\n const isPointInPolygon = booleanPointInPolygon(pt, selectedGeometry);\n if (clickSequence.length > 1 && tentativeFeature && !isPointInPolygon) {\n this.resetClickSequence();\n // @ts-ignore\n const isLineInterectingWithPolygon = lineIntersect(tentativeFeature, selectedGeometry);\n if (isLineInterectingWithPolygon.features.length === 0) {\n return;\n }\n\n const editAction = this.splitPolygon(tentativeFeature, props);\n\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n }\n\n splitPolygon(tentativeFeature: TentativeFeature, props: ModeProps<FeatureCollection>) {\n const selectedGeometry = this.getSelectedGeometry(props);\n const featureIndex = props.selectedIndexes[0];\n const modeConfig = props.modeConfig || {};\n\n // Default gap in between the polygon\n let { gap = 0.1, units = 'centimeters' } = modeConfig;\n if (gap === 0) {\n gap = 0.1;\n units = 'centimeters';\n }\n\n const buffer = turfBuffer(tentativeFeature, gap, { units });\n // @ts-ignore\n const updatedGeometry = turfDifference(selectedGeometry, buffer);\n if (!updatedGeometry) {\n // eslint-disable-next-line no-console,no-undef\n console.warn('Canceling edit. Split Polygon erased');\n return null;\n }\n\n const { type, coordinates } = updatedGeometry.geometry;\n let updatedCoordinates = [];\n if (type === 'Polygon') {\n // Update the coordinates as per Multipolygon\n // @ts-ignore\n updatedCoordinates = coordinates.map((c) => [c]);\n } else {\n // Handle Case when Multipolygon has holes\n // @ts-ignore\n updatedCoordinates = coordinates.reduce((agg, prev) => {\n prev.forEach((p) => {\n agg.push([p]);\n });\n return agg;\n }, []);\n }\n\n // Update the type to Mulitpolygon\n const updatedData = new ImmutableFeatureCollection(props.data).replaceGeometry(featureIndex, {\n type: 'MultiPolygon',\n coordinates: updatedCoordinates,\n });\n\n const editAction: GeoJsonEditAction = {\n updatedData: updatedData.getObject(),\n editType: 'split',\n editContext: {\n featureIndexes: [featureIndex],\n },\n };\n\n return editAction;\n }\n}\n","import bearing from '@turf/bearing';\nimport {\n generatePointsParallelToLinePoints,\n getPickedEditHandle,\n getPickedIntermediateEditHandle,\n} from '../utils';\nimport { FeatureCollection } from '../geojson-types';\nimport { ModeProps, StartDraggingEvent, StopDraggingEvent, DraggingEvent } from '../types';\nimport { ModifyMode } from './modify-mode';\nimport { ImmutableFeatureCollection } from './immutable-feature-collection';\n\nexport class ExtrudeMode extends ModifyMode {\n // this mode is busted =(\n\n isPointAdded = false;\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>): void {\n const editHandle = getPickedEditHandle(event.pointerDownPicks);\n\n if (editHandle) {\n const { featureIndex } = editHandle.properties;\n let { positionIndexes } = editHandle.properties;\n\n const size = this.coordinatesSize(positionIndexes, featureIndex, props.data);\n positionIndexes = this.isPointAdded\n ? this.nextPositionIndexes(positionIndexes, size)\n : positionIndexes;\n // p1 and p1 are end points for edge\n const p1 = this.getPointForPositionIndexes(\n this.prevPositionIndexes(positionIndexes, size),\n featureIndex,\n props.data\n );\n const p2 = this.getPointForPositionIndexes(positionIndexes, featureIndex, props.data);\n if (p1 && p2) {\n // p3 and p4 are end points for moving (extruding) edge\n const [p3, p4] = generatePointsParallelToLinePoints(p1, p2, event.mapCoords);\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .replacePosition(featureIndex, this.prevPositionIndexes(positionIndexes, size), p4)\n .replacePosition(featureIndex, positionIndexes, p3)\n .getObject();\n\n props.onEdit({\n updatedData,\n editType: 'extruding',\n editContext: {\n featureIndexes: [featureIndex],\n positionIndexes: this.nextPositionIndexes(positionIndexes, size),\n position: p3,\n },\n });\n\n event.cancelPan();\n }\n }\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n const selectedFeatureIndexes = props.selectedIndexes;\n\n const editHandle = getPickedIntermediateEditHandle(event.picks);\n if (selectedFeatureIndexes.length && editHandle) {\n const { positionIndexes, featureIndex } = editHandle.properties;\n\n const size = this.coordinatesSize(positionIndexes, featureIndex, props.data);\n // p1 and p1 are end points for edge\n const p1 = this.getPointForPositionIndexes(\n this.prevPositionIndexes(positionIndexes, size),\n featureIndex,\n props.data\n );\n const p2 = this.getPointForPositionIndexes(positionIndexes, featureIndex, props.data);\n\n if (p1 && p2) {\n let updatedData = new ImmutableFeatureCollection(props.data);\n if (!this.isOrthogonal(positionIndexes, featureIndex, size, props.data)) {\n updatedData = updatedData.addPosition(featureIndex, positionIndexes, p2);\n }\n if (\n !this.isOrthogonal(\n this.prevPositionIndexes(positionIndexes, size),\n featureIndex,\n size,\n props.data\n )\n ) {\n updatedData = updatedData.addPosition(featureIndex, positionIndexes, p1);\n this.isPointAdded = true;\n }\n\n props.onEdit({\n updatedData: updatedData.getObject(),\n editType: 'startExtruding',\n editContext: {\n featureIndexes: [featureIndex],\n positionIndexes,\n position: p1,\n },\n });\n }\n }\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n const selectedFeatureIndexes = props.selectedIndexes;\n const editHandle = getPickedEditHandle(event.pointerDownPicks);\n if (selectedFeatureIndexes.length && editHandle) {\n const { featureIndex } = editHandle.properties;\n let { positionIndexes } = editHandle.properties;\n\n const size = this.coordinatesSize(positionIndexes, featureIndex, props.data);\n positionIndexes = this.isPointAdded\n ? this.nextPositionIndexes(positionIndexes, size)\n : positionIndexes;\n // p1 and p1 are end points for edge\n const p1 = this.getPointForPositionIndexes(\n this.prevPositionIndexes(positionIndexes, size),\n featureIndex,\n props.data\n );\n const p2 = this.getPointForPositionIndexes(positionIndexes, featureIndex, props.data);\n\n if (p1 && p2) {\n // p3 and p4 are end points for new moved (extruded) edge\n const [p3, p4] = generatePointsParallelToLinePoints(p1, p2, event.mapCoords);\n\n const updatedData = new ImmutableFeatureCollection(props.data)\n .replacePosition(featureIndex, this.prevPositionIndexes(positionIndexes, size), p4)\n .replacePosition(featureIndex, positionIndexes, p3)\n .getObject();\n\n props.onEdit({\n updatedData,\n editType: 'extruded',\n editContext: {\n featureIndexes: [featureIndex],\n positionIndexes,\n position: p3,\n },\n });\n }\n }\n this.isPointAdded = false;\n }\n\n coordinatesSize(\n positionIndexes: number[] | null | undefined,\n featureIndex: number,\n { features }: FeatureCollection\n ) {\n let size = 0;\n if (Array.isArray(positionIndexes)) {\n const feature = features[featureIndex];\n const coordinates: any = feature.geometry.coordinates;\n // for Multi polygons, length will be 3\n if (positionIndexes.length === 3) {\n const [a, b] = positionIndexes;\n if (coordinates.length && coordinates[a].length) {\n size = coordinates[a][b].length;\n }\n } else {\n const [b] = positionIndexes;\n if (coordinates.length && coordinates[b].length) {\n size = coordinates[b].length;\n }\n }\n }\n return size;\n }\n\n getBearing(p1: any, p2: any) {\n const angle = bearing(p1, p2);\n if (angle < 0) {\n return Math.floor(360 + angle);\n }\n return Math.floor(angle);\n }\n\n isOrthogonal(\n positionIndexes: number[] | null | undefined,\n featureIndex: number,\n size: number,\n features: FeatureCollection\n ) {\n if (!Array.isArray(positionIndexes)) {\n return false;\n }\n if (positionIndexes[positionIndexes.length - 1] === size - 1) {\n positionIndexes[positionIndexes.length - 1] = 0;\n }\n const prevPoint = this.getPointForPositionIndexes(\n this.prevPositionIndexes(positionIndexes, size),\n featureIndex,\n features\n );\n const nextPoint = this.getPointForPositionIndexes(\n this.nextPositionIndexes(positionIndexes, size),\n featureIndex,\n features\n );\n const currentPoint = this.getPointForPositionIndexes(positionIndexes, featureIndex, features);\n const prevAngle = this.getBearing(currentPoint, prevPoint);\n const nextAngle = this.getBearing(currentPoint, nextPoint);\n return [89, 90, 91, 269, 270, 271].includes(Math.abs(prevAngle - nextAngle));\n }\n\n nextPositionIndexes(positionIndexes: number[] | null | undefined, size: number): number[] {\n if (!Array.isArray(positionIndexes)) {\n return [];\n }\n const next = [...positionIndexes];\n if (next.length) {\n next[next.length - 1] = next[next.length - 1] === size - 1 ? 0 : next[next.length - 1] + 1;\n }\n return next;\n }\n\n prevPositionIndexes(positionIndexes: number[] | null | undefined, size: number): number[] {\n if (!Array.isArray(positionIndexes)) {\n return [];\n }\n const prev = [...positionIndexes];\n if (prev.length) {\n prev[prev.length - 1] = prev[prev.length - 1] === 0 ? size - 2 : prev[prev.length - 1] - 1;\n }\n return prev;\n }\n\n getPointForPositionIndexes(\n positionIndexes: number[] | null | undefined,\n featureIndex: number,\n { features }: FeatureCollection\n ) {\n let p1;\n if (Array.isArray(positionIndexes)) {\n const feature = features[featureIndex];\n const coordinates: any = feature.geometry.coordinates;\n // for Multi polygons, length will be 3\n if (positionIndexes.length === 3) {\n const [a, b, c] = positionIndexes;\n if (coordinates.length && coordinates[a].length) {\n p1 = coordinates[a][b][c];\n }\n } else {\n const [b, c] = positionIndexes;\n if (coordinates.length && coordinates[b].length) {\n p1 = coordinates[b][c];\n }\n }\n }\n return p1;\n }\n}\n","import { ModeProps, PointerMoveEvent, StopDraggingEvent } from '../types';\nimport { Position, FeatureCollection } from '../geojson-types';\nimport { getPickedEditHandle } from '../utils';\nimport { ModifyMode } from './modify-mode';\n\nfunction defaultCalculateElevationChange({\n pointerDownScreenCoords,\n screenCoords,\n}: {\n pointerDownScreenCoords: Position;\n screenCoords: Position;\n}) {\n return 10 * (pointerDownScreenCoords[1] - screenCoords[1]);\n}\n\nexport class ElevationMode extends ModifyMode {\n makeElevatedEvent(\n event: PointerMoveEvent | StopDraggingEvent,\n position: Position,\n props: ModeProps<FeatureCollection>\n ): Record<string, any> {\n const {\n minElevation = 0,\n maxElevation = 20000,\n calculateElevationChange = defaultCalculateElevationChange,\n } = props.modeConfig || {};\n\n if (!event.pointerDownScreenCoords) {\n return event;\n }\n\n // $FlowFixMe - really, I know it has something at index 2\n let elevation = position.length === 3 ? position[2] : 0;\n\n // calculateElevationChange is configurable because (at this time) modes are not aware of the viewport\n elevation += calculateElevationChange({\n pointerDownScreenCoords: event.pointerDownScreenCoords,\n screenCoords: event.screenCoords,\n });\n elevation = Math.min(elevation, maxElevation);\n elevation = Math.max(elevation, minElevation);\n\n return Object.assign({}, event, {\n mapCoords: [position[0], position[1], elevation],\n });\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n const editHandle = getPickedEditHandle(event.pointerDownPicks);\n const position = editHandle ? editHandle.geometry.coordinates : event.mapCoords;\n // @ts-ignore\n super.handlePointerMove(this.makeElevatedEvent(event, position, props), props);\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n const editHandle = getPickedEditHandle(event.picks);\n const position = editHandle ? editHandle.geometry.coordinates : event.mapCoords;\n // @ts-ignore\n super.handleStopDragging(this.makeElevatedEvent(event, position, props), props);\n }\n\n getCursor(event: PointerMoveEvent): string | null | undefined {\n let cursor = super.getCursor(event);\n if (cursor === 'cell') {\n cursor = 'ns-resize';\n }\n return cursor;\n }\n\n static calculateElevationChangeWithViewport(\n viewport: any,\n {\n pointerDownScreenCoords,\n screenCoords,\n }: {\n pointerDownScreenCoords: Position;\n screenCoords: Position;\n }\n ): number {\n // Source: https://gis.stackexchange.com/a/127949/111804\n const metersPerPixel =\n (156543.03392 * Math.cos((viewport.latitude * Math.PI) / 180)) / Math.pow(2, viewport.zoom);\n\n return (metersPerPixel * (pointerDownScreenCoords[1] - screenCoords[1])) / 2;\n }\n}\n","import { featureCollection } from '@turf/helpers';\nimport { PointerMoveEvent, ModeProps, StartDraggingEvent } from '../types';\nimport { FeatureCollection } from '../geojson-types';\nimport { TranslateMode } from './translate-mode';\nimport { ScaleMode } from './scale-mode';\nimport { RotateMode } from './rotate-mode';\n\nimport { CompositeMode } from './composite-mode';\n\nexport class TransformMode extends CompositeMode {\n constructor() {\n super([new TranslateMode(), new ScaleMode(), new RotateMode()]);\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n let updatedCursor = null;\n super.handlePointerMove(event, {\n ...props,\n onUpdateCursor: (cursor) => {\n updatedCursor = cursor || updatedCursor;\n },\n });\n props.onUpdateCursor(updatedCursor);\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n let scaleMode = null;\n let translateMode = null;\n const filteredModes = [];\n\n // If the user selects a scaling edit handle that overlaps with part of the selected feature,\n // it is possible for both scale and translate actions to be triggered. This logic prevents\n // this simultaneous action trigger from happening by putting a higher priority on scaling\n // since the user needs to be more precise to hover over a scaling edit handle.\n this._modes.forEach((mode) => {\n if (mode instanceof TranslateMode) {\n translateMode = mode;\n } else {\n if (mode instanceof ScaleMode) {\n scaleMode = mode;\n }\n filteredModes.push(mode);\n }\n });\n\n if (scaleMode instanceof ScaleMode && !scaleMode.isEditHandleSelected()) {\n filteredModes.push(translateMode);\n }\n\n filteredModes.filter(Boolean).forEach((mode) => mode.handleStartDragging(event, props));\n }\n\n getGuides(props: ModeProps<FeatureCollection>) {\n let compositeGuides = super.getGuides(props);\n const rotateMode = (this._modes || []).find((mode) => mode instanceof RotateMode);\n\n if (rotateMode instanceof RotateMode) {\n const nonEnvelopeGuides = compositeGuides.features.filter((guide) => {\n const { editHandleType, mode } = (guide.properties as any) || {};\n // Both scale and rotate modes have the same enveloping box as a guide - only need one\n const guidesToFilterOut = [mode];\n // Do not render scaling edit handles if rotating\n if (rotateMode.getIsRotating()) {\n guidesToFilterOut.push(editHandleType);\n }\n return !guidesToFilterOut.includes('scale');\n });\n // @ts-ignore\n compositeGuides = featureCollection(nonEnvelopeGuides);\n }\n return compositeGuides;\n }\n}\n","import { ClickEvent, PointerMoveEvent, ModeProps, TentativeFeature } from '../types';\nimport { FeatureCollection } from '../geojson-types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class DrawPointMode extends GeoJsonEditMode {\n createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature {\n const { lastPointerMoveEvent } = props;\n const lastCoords = lastPointerMoveEvent ? [lastPointerMoveEvent.mapCoords] : [];\n\n return {\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'Point',\n coordinates: lastCoords[0],\n },\n };\n }\n\n handleClick({ mapCoords }: ClickEvent, props: ModeProps<FeatureCollection>): void {\n const geometry = {\n type: 'Point',\n coordinates: mapCoords,\n };\n // @ts-ignore\n props.onEdit(this.getAddFeatureAction(geometry, props.data));\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n super.handlePointerMove(event, props);\n }\n}\n","import { LineString, FeatureCollection } from '../geojson-types';\nimport { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection } from '../types';\nimport { getPickedEditHandle } from '../utils';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class DrawLineStringMode extends GeoJsonEditMode {\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const { picks } = event;\n const clickedEditHandle = getPickedEditHandle(picks);\n\n let positionAdded = false;\n if (!clickedEditHandle) {\n // Don't add another point right next to an existing one\n this.addClickSequence(event);\n positionAdded = true;\n }\n const clickSequence = this.getClickSequence();\n\n if (\n clickSequence.length > 1 &&\n clickedEditHandle &&\n Array.isArray(clickedEditHandle.properties.positionIndexes) &&\n clickedEditHandle.properties.positionIndexes[0] === clickSequence.length - 1\n ) {\n // They clicked the last point (or double-clicked), so add the LineString\n\n const lineStringToAdd: LineString = {\n type: 'LineString',\n coordinates: [...clickSequence],\n };\n\n this.resetClickSequence();\n\n const editAction = this.getAddFeatureAction(lineStringToAdd, props.data);\n if (editAction) {\n props.onEdit(editAction);\n }\n } else if (positionAdded) {\n // new tentative point\n props.onEdit({\n // data is the same\n updatedData: props.data,\n editType: 'addTentativePosition',\n editContext: {\n position: event.mapCoords,\n },\n });\n }\n }\n handleKeyUp(event: KeyboardEvent, props: ModeProps<FeatureCollection>) {\n const { key } = event;\n if (key === 'Enter') {\n const clickSequence = this.getClickSequence();\n if (clickSequence.length > 1) {\n const lineStringToAdd: LineString = {\n type: 'LineString',\n coordinates: [...clickSequence],\n };\n this.resetClickSequence();\n const editAction = this.getAddFeatureAction(lineStringToAdd, props.data);\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n }\n }\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const { lastPointerMoveEvent } = props;\n const clickSequence = this.getClickSequence();\n\n const lastCoords = lastPointerMoveEvent ? [lastPointerMoveEvent.mapCoords] : [];\n\n const guides = {\n type: 'FeatureCollection',\n features: [],\n };\n\n let tentativeFeature;\n if (clickSequence.length > 0) {\n tentativeFeature = {\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'LineString',\n coordinates: [...clickSequence, ...lastCoords],\n },\n };\n }\n\n if (tentativeFeature) {\n guides.features.push(tentativeFeature);\n }\n\n const editHandles = clickSequence.map((clickedCoord, index) => ({\n type: 'Feature',\n properties: {\n guideType: 'editHandle',\n editHandleType: 'existing',\n featureIndex: -1,\n positionIndexes: [index],\n },\n geometry: {\n type: 'Point',\n coordinates: clickedCoord,\n },\n }));\n\n guides.features.push(...editHandles);\n // @ts-ignore\n return guides;\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n }\n}\n","import bboxPolygon from '@turf/bbox-polygon';\nimport { Position, Polygon, FeatureOf } from '../geojson-types';\nimport { TwoClickPolygonMode } from './two-click-polygon-mode';\n\nexport class DrawRectangleMode extends TwoClickPolygonMode {\n getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon> {\n const rectangle = bboxPolygon([coord1[0], coord1[1], coord2[0], coord2[1]]);\n rectangle.properties = rectangle.properties || {};\n rectangle.properties.shape = 'Rectangle';\n\n // @ts-ignore\n return rectangle;\n }\n}\n","import bboxPolygon from '@turf/bbox-polygon';\nimport turfDistance from '@turf/distance';\nimport turfAlong from '@turf/along';\nimport { point, lineString as turfLineString } from '@turf/helpers';\nimport { Position, Polygon, FeatureOf } from '../geojson-types';\nimport { TwoClickPolygonMode } from './two-click-polygon-mode';\n\nexport class DrawSquareFromCenterMode extends TwoClickPolygonMode {\n getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon> {\n // get the coordinates of the other two rectangle vertices\n const coord3 = [coord2[0], coord1[1]];\n const coord4 = [coord1[0], coord2[1]];\n\n // determine the shortest distance to the origin, which will be the length of each square side\n const distance1 = turfDistance(point(coord3), point(coord1));\n const distance2 = turfDistance(point(coord4), point(coord1));\n const shortestDistance = distance1 <= distance2 ? distance1 : distance2;\n\n // determine which coordinate pair of the two is closest to the origin\n const closestPoint = distance1 <= distance2 ? coord3 : coord4;\n\n // create a linestring which will used to locate the second square vertex\n const line = turfLineString([closestPoint, coord2]);\n\n // get the coordinates of the second square vertex\n const newPoint = turfAlong(line, shortestDistance);\n const corner = newPoint.geometry.coordinates;\n\n // determine the longitude and latitude values of the opposite corner\n const longitude =\n coord1[0] > corner[0]\n ? coord1[0] + Math.abs(coord1[0] - corner[0])\n : coord1[0] - Math.abs(coord1[0] - corner[0]);\n const latitude =\n coord1[1] > corner[1]\n ? coord1[1] + Math.abs(coord1[1] - corner[1])\n : coord1[1] - Math.abs(coord1[1] - corner[1]);\n\n const square = bboxPolygon([longitude, latitude, corner[0], corner[1]]);\n square.properties = square.properties || {};\n square.properties.shape = 'Square';\n\n // @ts-ignore\n return square;\n }\n}\n","import circle from '@turf/circle';\nimport distance from '@turf/distance';\nimport { Position, Polygon, FeatureOf } from '../geojson-types';\nimport { getIntermediatePosition } from './geojson-edit-mode';\nimport { TwoClickPolygonMode } from './two-click-polygon-mode';\n\nexport class DrawCircleByDiameterMode extends TwoClickPolygonMode {\n getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon> {\n // Default turf value for circle is 64\n const { steps = 64 } = modeConfig || {};\n const options = { steps };\n\n if (steps < 4) {\n console.warn(`Minimum steps to draw a circle is 4 `); // eslint-disable-line no-console,no-undef\n options.steps = 4;\n }\n\n const centerCoordinates = getIntermediatePosition(coord1, coord2);\n const radius = Math.max(distance(coord1, centerCoordinates), 0.001);\n\n const geometry = circle(centerCoordinates, radius, options);\n\n geometry.properties = geometry.properties || {};\n geometry.properties.shape = 'Circle';\n\n return geometry;\n }\n}\n","import circle from '@turf/circle';\nimport distance from '@turf/distance';\nimport { Position, Polygon, FeatureOf } from '../geojson-types';\nimport { TwoClickPolygonMode } from './two-click-polygon-mode';\n\nexport class DrawCircleFromCenterMode extends TwoClickPolygonMode {\n getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon> {\n // Default turf value for circle is 64\n const { steps = 64 } = modeConfig || {};\n const options = { steps };\n\n if (steps < 4) {\n console.warn(`Minimum steps to draw a circle is 4 `); // eslint-disable-line no-console,no-undef\n options.steps = 4;\n }\n\n const radius = Math.max(distance(coord1, coord2), 0.001);\n const geometry = circle(coord1, radius, options);\n\n geometry.properties = geometry.properties || {};\n geometry.properties.shape = 'Circle';\n\n return geometry;\n }\n}\n","import bboxPolygon from '@turf/bbox-polygon';\nimport distance from '@turf/distance';\nimport ellipse from '@turf/ellipse';\nimport { point } from '@turf/helpers';\nimport { Position, Polygon, FeatureOf } from '../geojson-types';\nimport { getIntermediatePosition } from './geojson-edit-mode';\nimport { TwoClickPolygonMode } from './two-click-polygon-mode';\n\nexport class DrawEllipseByBoundingBoxMode extends TwoClickPolygonMode {\n getTwoClickPolygon(coord1: Position, coord2: Position, modeConfig: any): FeatureOf<Polygon> {\n const minX = Math.min(coord1[0], coord2[0]);\n const minY = Math.min(coord1[1], coord2[1]);\n const maxX = Math.max(coord1[0], coord2[0]);\n const maxY = Math.max(coord1[1], coord2[1]);\n\n const polygonPoints = bboxPolygon([minX, minY, maxX, maxY]).geometry.coordinates[0];\n const centerCoordinates = getIntermediatePosition(coord1, coord2);\n\n const xSemiAxis = Math.max(distance(point(polygonPoints[0]), point(polygonPoints[1])), 0.001);\n const ySemiAxis = Math.max(distance(point(polygonPoints[0]), point(polygonPoints[3])), 0.001);\n\n // @ts-ignore\n return ellipse(centerCoordinates, xSemiAxis, ySemiAxis);\n }\n}\n","import distance from '@turf/distance';\nimport ellipse from '@turf/ellipse';\nimport bearing from '@turf/bearing';\nimport { point } from '@turf/helpers';\nimport { Position, Polygon, FeatureOf } from '../geojson-types';\nimport { getIntermediatePosition } from './geojson-edit-mode';\nimport { ThreeClickPolygonMode } from './three-click-polygon-mode';\n\nexport class DrawEllipseUsingThreePointsMode extends ThreeClickPolygonMode {\n getThreeClickPolygon(\n coord1: Position,\n coord2: Position,\n coord3: Position,\n modeConfig: any\n ): FeatureOf<Polygon> | null | undefined {\n const centerCoordinates = getIntermediatePosition(coord1, coord2);\n const xSemiAxis = Math.max(distance(centerCoordinates, point(coord3)), 0.001);\n const ySemiAxis = Math.max(distance(coord1, coord2), 0.001) / 2;\n const options = { angle: bearing(coord1, coord2) };\n // @ts-ignore\n return ellipse(centerCoordinates, xSemiAxis, ySemiAxis, options);\n }\n}\n","import { generatePointsParallelToLinePoints } from '../utils';\nimport { Position, Polygon, FeatureOf } from '../geojson-types';\nimport { ThreeClickPolygonMode } from './three-click-polygon-mode';\n\nexport class DrawRectangleUsingThreePointsMode extends ThreeClickPolygonMode {\n getThreeClickPolygon(\n coord1: Position,\n coord2: Position,\n coord3: Position,\n modeConfig: any\n ): FeatureOf<Polygon> | null | undefined {\n const [p3, p4] = generatePointsParallelToLinePoints(coord1, coord2, coord3);\n\n return {\n type: 'Feature',\n properties: {\n shape: 'Rectangle',\n },\n geometry: {\n type: 'Polygon',\n coordinates: [\n [\n // Draw a polygon containing all the points of the LineString,\n // then the points orthogonal to the lineString,\n // then back to the starting position\n coord1,\n coord2,\n p3,\n p4,\n coord1,\n ],\n ],\n },\n };\n }\n}\n","import destination from '@turf/destination';\nimport bearing from '@turf/bearing';\nimport lineIntersect from '@turf/line-intersect';\nimport turfDistance from '@turf/distance';\nimport { point, lineString as turfLineString } from '@turf/helpers';\nimport {\n generatePointsParallelToLinePoints,\n getPickedEditHandle,\n getEditHandlesForGeometry,\n} from '../utils';\nimport {\n ClickEvent,\n PointerMoveEvent,\n ModeProps,\n GuideFeatureCollection,\n TentativeFeature,\n} from '../types';\nimport { Polygon, LineString, Position, FeatureCollection } from '../geojson-types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class Draw90DegreePolygonMode extends GeoJsonEditMode {\n createTentativeFeature(props: ModeProps<FeatureCollection>): TentativeFeature {\n const clickSequence = this.getClickSequence();\n\n const { mapCoords } = props.lastPointerMoveEvent;\n\n let p3;\n if (clickSequence.length === 1) {\n p3 = mapCoords;\n } else {\n const p1 = clickSequence[clickSequence.length - 2];\n const p2 = clickSequence[clickSequence.length - 1];\n [p3] = generatePointsParallelToLinePoints(p1, p2, mapCoords);\n }\n\n let tentativeFeature;\n\n if (clickSequence.length < 3) {\n // Draw a LineString connecting all the clicked points with the hovered point\n tentativeFeature = {\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'LineString',\n coordinates: [...clickSequence, p3],\n },\n };\n } else {\n // Draw a Polygon connecting all the clicked points with the hovered point\n tentativeFeature = {\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'Polygon',\n coordinates: [[...clickSequence, p3, clickSequence[0]]],\n },\n };\n }\n\n return tentativeFeature;\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const guides: GuideFeatureCollection = {\n type: 'FeatureCollection',\n features: [],\n };\n\n const clickSequence = this.getClickSequence();\n\n if (clickSequence.length === 0 || !props.lastPointerMoveEvent) {\n return guides;\n }\n const tentativeFeature = this.createTentativeFeature(props);\n\n guides.features.push(tentativeFeature);\n\n guides.features = guides.features.concat(\n getEditHandlesForGeometry(tentativeFeature.geometry, -1)\n );\n\n // Slice off the handles that are are next to the pointer\n guides.features = guides.features.slice(0, -1);\n\n return guides;\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n super.handlePointerMove(event, props);\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const { picks } = event;\n const tentativeFeature = this.getTentativeGuide(props);\n this.addClickSequence(event);\n const clickSequence = this.getClickSequence();\n\n if (!tentativeFeature) {\n // nothing else to do\n return;\n }\n\n if (clickSequence.length === 3 && tentativeFeature.geometry.type === 'LineString') {\n const lineString: LineString = tentativeFeature.geometry;\n\n // Tweak the clicked position to be the snapped 90 degree point along the polygon\n clickSequence[clickSequence.length - 1] =\n lineString.coordinates[lineString.coordinates.length - 1];\n } else if (clickSequence.length > 3 && tentativeFeature.geometry.type === 'Polygon') {\n const polygon: Polygon = tentativeFeature.geometry;\n\n // Tweak the clicked position to be the snapped 90 degree point along the polygon\n clickSequence[clickSequence.length - 1] =\n polygon.coordinates[0][polygon.coordinates[0].length - 2];\n\n const clickedEditHandle = getPickedEditHandle(picks);\n\n if (\n clickedEditHandle &&\n Array.isArray(clickedEditHandle.properties.positionIndexes) &&\n (clickedEditHandle.properties.positionIndexes[1] === 0 ||\n clickedEditHandle.properties.positionIndexes[1] === polygon.coordinates[0].length - 3)\n ) {\n // They clicked the first or last point (or double-clicked), so complete the polygon\n const polygonToAdd: Polygon = {\n type: 'Polygon',\n coordinates: this.finalizedCoordinates([...polygon.coordinates[0]]),\n };\n\n this.resetClickSequence();\n\n const editAction = this.getAddFeatureOrBooleanPolygonAction(polygonToAdd, props);\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n }\n\n // Trigger pointer move right away in order for it to update edit handles (to support double-click)\n const fakePointerMoveEvent: PointerMoveEvent = {\n screenCoords: [-1, -1],\n mapCoords: event.mapCoords,\n picks: [],\n pointerDownPicks: null,\n pointerDownScreenCoords: null,\n pointerDownMapCoords: null,\n cancelPan: () => {},\n sourceEvent: null,\n };\n\n this.handlePointerMove(fakePointerMoveEvent, props);\n }\n\n finalizedCoordinates(coords: Position[]) {\n // Remove the hovered position\n let coordinates = [[...coords.slice(0, -2), coords[0]]];\n let pt = this.getIntermediatePoint([...coords]);\n if (!pt) {\n // if intermediate point with 90 degree not available\n // try remove the last clicked point and get the intermediate point.\n const tc = [...coords];\n tc.splice(-3, 1);\n pt = this.getIntermediatePoint([...tc]);\n if (pt) {\n coordinates = [[...coords.slice(0, -3), pt, coords[0]]];\n }\n } else {\n coordinates = [[...coords.slice(0, -2), pt, coords[0]]];\n }\n return coordinates;\n }\n\n getIntermediatePoint(coordinates: Position[]) {\n let pt;\n if (coordinates.length > 4) {\n const [p1, p2] = [...coordinates];\n const angle1 = bearing(p1, p2);\n const p3 = coordinates[coordinates.length - 3];\n const p4 = coordinates[coordinates.length - 4];\n const angle2 = bearing(p3, p4);\n\n const angles = { first: [], second: [] };\n // calculate 3 right angle points for first and last points in lineString\n [1, 2, 3].forEach((factor) => {\n const newAngle1 = angle1 + factor * 90;\n // convert angles to 0 to -180 for anti-clock and 0 to 180 for clock wise\n angles.first.push(newAngle1 > 180 ? newAngle1 - 360 : newAngle1);\n const newAngle2 = angle2 + factor * 90;\n angles.second.push(newAngle2 > 180 ? newAngle2 - 360 : newAngle2);\n });\n\n const distance = turfDistance(point(p1), point(p3));\n // Draw imaginary right angle lines for both first and last points in lineString\n // If there is intersection point for any 2 lines, will be the 90 degree point.\n [0, 1, 2].forEach((indexFirst) => {\n const line1 = turfLineString([\n p1,\n destination(p1, distance, angles.first[indexFirst]).geometry.coordinates,\n ]);\n [0, 1, 2].forEach((indexSecond) => {\n const line2 = turfLineString([\n p3,\n destination(p3, distance, angles.second[indexSecond]).geometry.coordinates,\n ]);\n const fc = lineIntersect(line1, line2);\n if (fc && fc.features.length) {\n // found the intersect point\n pt = fc.features[0].geometry.coordinates;\n }\n });\n });\n }\n return pt;\n }\n}\n","import throttle from 'lodash.throttle';\nimport {\n ClickEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n ModeProps,\n} from '../types';\nimport { Polygon, FeatureCollection } from '../geojson-types';\nimport { getPickedEditHandle } from '../utils';\nimport { DrawPolygonMode } from './draw-polygon-mode';\n\ntype DraggingHandler = (event: DraggingEvent, props: ModeProps<FeatureCollection>) => void;\n\nexport class DrawPolygonByDraggingMode extends DrawPolygonMode {\n handleDraggingThrottled: DraggingHandler | null | undefined = null;\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n // No-op\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n event.cancelPan();\n if (props.modeConfig && props.modeConfig.throttleMs) {\n this.handleDraggingThrottled = throttle(this.handleDraggingAux, props.modeConfig.throttleMs);\n } else {\n this.handleDraggingThrottled = this.handleDraggingAux;\n }\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n this.addClickSequence(event);\n const clickSequence = this.getClickSequence();\n // @ts-ignore\n if (this.handleDraggingThrottled && this.handleDraggingThrottled.cancel) {\n // @ts-ignore\n this.handleDraggingThrottled.cancel();\n }\n\n if (clickSequence.length > 2) {\n // Complete the polygon.\n const polygonToAdd: Polygon = {\n type: 'Polygon',\n coordinates: [[...clickSequence, clickSequence[0]]],\n };\n\n this.resetClickSequence();\n\n const editAction = this.getAddFeatureOrBooleanPolygonAction(polygonToAdd, props);\n if (editAction) {\n props.onEdit(editAction);\n }\n }\n }\n\n handleDraggingAux(event: DraggingEvent, props: ModeProps<FeatureCollection>) {\n const { picks } = event;\n const clickedEditHandle = getPickedEditHandle(picks);\n\n if (!clickedEditHandle) {\n // Don't add another point right next to an existing one.\n this.addClickSequence(event);\n }\n }\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>) {\n if (this.handleDraggingThrottled) {\n this.handleDraggingThrottled(event, props);\n }\n }\n}\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n","import { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class ViewMode extends GeoJsonEditMode {}\n","import turfDistance from '@turf/distance';\nimport { FeatureCollection } from '../geojson-types';\nimport { ClickEvent, PointerMoveEvent, ModeProps, GuideFeatureCollection, Tooltip } from '../types';\nimport { getPickedEditHandle } from '../utils';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nexport class MeasureDistanceMode extends GeoJsonEditMode {\n _isMeasuringSessionFinished = false;\n _currentTooltips = [];\n _currentDistance = 0;\n\n _calculateDistanceForTooltip = ({ positionA, positionB, modeConfig }) => {\n const { turfOptions, measurementCallback } = modeConfig || {};\n const distance = turfDistance(positionA, positionB, turfOptions);\n\n if (measurementCallback) {\n measurementCallback(distance);\n }\n\n return distance;\n };\n\n _formatTooltip(distance, modeConfig?) {\n const { formatTooltip, turfOptions } = modeConfig || {};\n const units = (turfOptions && turfOptions.units) || 'kilometers';\n\n let text;\n if (formatTooltip) {\n text = formatTooltip(distance);\n } else {\n // By default, round to 2 decimal places and append units\n text = `${parseFloat(distance).toFixed(2)} ${units}`;\n }\n\n return text;\n }\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const { modeConfig, data, onEdit } = props;\n\n // restart measuring session\n if (this._isMeasuringSessionFinished) {\n this._isMeasuringSessionFinished = false;\n this.resetClickSequence();\n this._currentTooltips = [];\n this._currentDistance = 0;\n }\n\n const { picks } = event;\n const clickedEditHandle = getPickedEditHandle(picks);\n\n let positionAdded = false;\n if (!clickedEditHandle) {\n // Don't add another point right next to an existing one\n this.addClickSequence(event);\n positionAdded = true;\n }\n const clickSequence = this.getClickSequence();\n\n if (\n clickSequence.length > 1 &&\n clickedEditHandle &&\n Array.isArray(clickedEditHandle.properties.positionIndexes) &&\n clickedEditHandle.properties.positionIndexes[0] === clickSequence.length - 1\n ) {\n // They clicked the last point (or double-clicked), so add the LineString\n this._isMeasuringSessionFinished = true;\n } else if (positionAdded) {\n if (clickSequence.length > 1) {\n this._currentDistance += this._calculateDistanceForTooltip({\n positionA: clickSequence[clickSequence.length - 2],\n positionB: clickSequence[clickSequence.length - 1],\n modeConfig,\n });\n this._currentTooltips.push({\n position: event.mapCoords,\n text: this._formatTooltip(this._currentDistance, modeConfig),\n });\n }\n\n // new tentative point\n onEdit({\n // data is the same\n updatedData: data,\n editType: 'addTentativePosition',\n editContext: {\n position: event.mapCoords,\n },\n });\n }\n }\n\n handleKeyUp(event: KeyboardEvent, props: ModeProps<FeatureCollection>) {\n if (this._isMeasuringSessionFinished) return;\n\n event.stopPropagation();\n const { key } = event;\n\n const clickSequenceLength = this.getClickSequence().length;\n\n switch (key) {\n case 'Escape':\n this._isMeasuringSessionFinished = true;\n if (clickSequenceLength === 1) {\n this.resetClickSequence();\n this._currentTooltips = [];\n }\n // force update drawings\n props.onUpdateCursor('cell');\n break;\n case 'Enter':\n this.handleClick(props.lastPointerMoveEvent, props);\n this._isMeasuringSessionFinished = true;\n break;\n default:\n break;\n }\n }\n\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const { lastPointerMoveEvent } = props;\n const clickSequence = this.getClickSequence();\n\n const lastCoords =\n lastPointerMoveEvent && !this._isMeasuringSessionFinished\n ? [lastPointerMoveEvent.mapCoords]\n : [];\n\n const guides = {\n type: 'FeatureCollection',\n features: [],\n };\n\n if (clickSequence.length > 0) {\n guides.features.push({\n type: 'Feature',\n properties: {\n guideType: 'tentative',\n },\n geometry: {\n type: 'LineString',\n coordinates: [...clickSequence, ...lastCoords],\n },\n });\n }\n\n const editHandles = clickSequence.map((clickedCoord, index) => ({\n type: 'Feature',\n properties: {\n guideType: 'editHandle',\n editHandleType: 'existing',\n featureIndex: -1,\n positionIndexes: [index],\n },\n geometry: {\n type: 'Point',\n coordinates: clickedCoord,\n },\n }));\n\n guides.features.push(...editHandles);\n // @ts-ignore\n return guides;\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n props.onUpdateCursor('cell');\n }\n\n getTooltips(props: ModeProps<FeatureCollection>): Tooltip[] {\n const { lastPointerMoveEvent, modeConfig } = props;\n const positions = this.getClickSequence();\n\n if (positions.length > 0 && lastPointerMoveEvent && !this._isMeasuringSessionFinished) {\n const distance = this._calculateDistanceForTooltip({\n positionA: positions[positions.length - 1],\n positionB: lastPointerMoveEvent.mapCoords,\n modeConfig: props.modeConfig,\n });\n return [\n ...this._currentTooltips,\n {\n position: lastPointerMoveEvent.mapCoords,\n text: this._formatTooltip(this._currentDistance + distance, modeConfig),\n },\n ];\n }\n\n return this._currentTooltips;\n }\n}\n","import turfArea from '@turf/area';\nimport turfCentroid from '@turf/centroid';\nimport { ClickEvent, Tooltip, ModeProps } from '../types';\nimport { FeatureCollection } from '../geojson-types';\nimport { DrawPolygonMode } from './draw-polygon-mode';\n\nconst DEFAULT_TOOLTIPS = [];\n\nexport class MeasureAreaMode extends DrawPolygonMode {\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>) {\n const propsWithoutEdit = {\n ...props,\n // @ts-ignore\n onEdit: () => {},\n };\n\n super.handleClick(event, propsWithoutEdit);\n }\n\n getTooltips(props: ModeProps<FeatureCollection>): Tooltip[] {\n const tentativeGuide = this.getTentativeGuide(props);\n\n if (tentativeGuide && tentativeGuide.geometry.type === 'Polygon') {\n const { modeConfig } = props;\n const { formatTooltip, measurementCallback } = modeConfig || {};\n const units = 'sq. m';\n\n const centroid = turfCentroid(tentativeGuide);\n const area = turfArea(tentativeGuide);\n\n let text;\n if (formatTooltip) {\n text = formatTooltip(area);\n } else {\n // By default, round to 2 decimal places and append units\n // @ts-ignore\n text = `${parseFloat(area).toFixed(2)} ${units}`;\n }\n\n if (measurementCallback) {\n measurementCallback(area);\n }\n\n return [\n {\n position: centroid.geometry.coordinates,\n text,\n },\n ];\n }\n return DEFAULT_TOOLTIPS;\n }\n}\n","import turfBearing from '@turf/bearing';\n// @ts-ignore\nimport turfCenter from '@turf/center';\n// @ts-ignore\nimport memoize from '../memoize';\n\nimport { ClickEvent, PointerMoveEvent, Tooltip, ModeProps, GuideFeatureCollection } from '../types';\nimport { FeatureCollection } from '../geojson-types';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\nconst DEFAULT_TOOLTIPS = [];\n\nexport class MeasureAngleMode extends GeoJsonEditMode {\n _getTooltips = memoize(({ modeConfig, vertex, point1, point2 }) => {\n let tooltips = DEFAULT_TOOLTIPS;\n\n if (vertex && point1 && point2) {\n const { formatTooltip, measurementCallback } = modeConfig || {};\n const units = 'deg';\n\n const angle1 = turfBearing(vertex, point1);\n const angle2 = turfBearing(vertex, point2);\n let angle = Math.abs(angle1 - angle2);\n if (angle > 180) {\n angle = 360 - angle;\n }\n\n let text;\n if (formatTooltip) {\n text = formatTooltip(angle);\n } else {\n // By default, round to 2 decimal places and append units\n // @ts-ignore\n text = `${parseFloat(angle).toFixed(2)} ${units}`;\n }\n\n if (measurementCallback) {\n measurementCallback(angle);\n }\n\n const position = turfCenter({\n type: 'FeatureCollection',\n features: [point1, point2].map((p) => ({\n type: 'Feature',\n geometry: {\n type: 'Point',\n coordinates: p,\n },\n })),\n }).geometry.coordinates;\n\n tooltips = [\n {\n position,\n text,\n },\n ];\n }\n\n return tooltips;\n });\n\n handleClick(event: ClickEvent, props: ModeProps<FeatureCollection>): void {\n if (this.getClickSequence().length >= 3) {\n this.resetClickSequence();\n }\n\n this.addClickSequence(event);\n }\n\n // Called when the pointer moved, regardless of whether the pointer is down, up, and whether something was picked\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>): void {\n props.onUpdateCursor('cell');\n }\n\n getPoints(props: ModeProps<FeatureCollection>) {\n const clickSequence = this.getClickSequence();\n\n const points = [...clickSequence];\n\n if (clickSequence.length < 3 && props.lastPointerMoveEvent) {\n points.push(props.lastPointerMoveEvent.mapCoords);\n }\n\n return points;\n }\n\n // Return features that can be used as a guide for editing the data\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const guides: GuideFeatureCollection = { type: 'FeatureCollection', features: [] };\n const { features } = guides;\n\n const points = this.getPoints(props);\n\n if (points.length > 2) {\n features.push({\n type: 'Feature',\n properties: { guideType: 'tentative' },\n geometry: {\n type: 'LineString',\n coordinates: [points[1], points[0], points[2]],\n },\n });\n } else if (points.length > 1) {\n features.push({\n type: 'Feature',\n properties: { guideType: 'tentative' },\n geometry: {\n type: 'LineString',\n coordinates: [points[1], points[0]],\n },\n });\n }\n\n return guides;\n }\n\n getTooltips(props: ModeProps<FeatureCollection>): Tooltip[] {\n const points = this.getPoints(props);\n\n return this._getTooltips({\n modeConfig: props.modeConfig,\n vertex: points[0],\n point1: points[1],\n point2: points[2],\n });\n }\n}\n","import { Position, Feature, FeatureCollection } from '../geojson-types';\nimport {\n PointerMoveEvent,\n StartDraggingEvent,\n StopDraggingEvent,\n DraggingEvent,\n ModeProps,\n Pick,\n GuideFeatureCollection,\n EditHandleFeature,\n} from '../types';\nimport {\n getPickedSnapSourceEditHandle,\n getPickedEditHandles,\n getEditHandlesForGeometry,\n} from '../utils';\nimport { GeoJsonEditMode } from './geojson-edit-mode';\n\ntype MovementTypeEvent = PointerMoveEvent | StartDraggingEvent | StopDraggingEvent | DraggingEvent;\n\nexport class SnappableMode extends GeoJsonEditMode {\n _handler: GeoJsonEditMode;\n\n constructor(handler: GeoJsonEditMode) {\n super();\n this._handler = handler;\n }\n\n _getSnappedMouseEvent<T extends MovementTypeEvent>(\n event: T,\n snapSource: EditHandleFeature,\n snapTarget: EditHandleFeature\n ): T {\n return Object.assign(event, {\n mapCoords: snapTarget.geometry.coordinates,\n pointerDownMapCoords: snapSource && snapSource.geometry.coordinates,\n });\n }\n\n _getPickedSnapTarget(picks: Pick[]): EditHandleFeature | null | undefined {\n return getPickedEditHandles(picks).find(\n (handle) => handle.properties.editHandleType === 'snap-target'\n );\n }\n\n _getPickedSnapSource(\n pointerDownPicks: Pick[] | null | undefined\n ): EditHandleFeature | null | undefined {\n return getPickedSnapSourceEditHandle(pointerDownPicks);\n }\n\n _getUpdatedSnapSourceHandle(\n snapSourceHandle: EditHandleFeature,\n data: FeatureCollection\n ): EditHandleFeature {\n const { featureIndex, positionIndexes } = snapSourceHandle.properties;\n if (!Array.isArray(positionIndexes)) {\n return snapSourceHandle;\n }\n const snapSourceFeature = data.features[featureIndex];\n\n // $FlowFixMe\n const snapSourceCoordinates: Position = positionIndexes.reduce(\n (a: any[], b: number) => a[b],\n snapSourceFeature.geometry.coordinates\n );\n\n return {\n ...snapSourceHandle,\n geometry: {\n type: 'Point',\n coordinates: snapSourceCoordinates,\n },\n };\n }\n\n // If additionalSnapTargets is present in modeConfig and is populated, this\n // method will return those features along with the features\n // that live in the current layer. Otherwise, this method will simply return the\n // features from the current layer\n _getSnapTargets(props: ModeProps<FeatureCollection>): Feature[] {\n let { additionalSnapTargets } = props.modeConfig || {};\n additionalSnapTargets = additionalSnapTargets || [];\n\n const features = [...props.data.features, ...additionalSnapTargets];\n return features;\n }\n\n _getSnapTargetHandles(props: ModeProps<FeatureCollection>): EditHandleFeature[] {\n const handles = [];\n const features = this._getSnapTargets(props);\n\n for (let i = 0; i < features.length; i++) {\n // Filter out the currently selected feature(s)\n const isCurrentIndexFeatureNotSelected = !props.selectedIndexes.includes(i);\n\n if (isCurrentIndexFeatureNotSelected) {\n const { geometry } = features[i];\n handles.push(...getEditHandlesForGeometry(geometry, i, 'snap-target'));\n }\n }\n return handles;\n }\n\n // If no snap handle has been picked, only display the edit handles of the\n // selected feature. If a snap handle has been picked, display said snap handle\n // along with all snappable points on all non-selected features.\n getGuides(props: ModeProps<FeatureCollection>): GuideFeatureCollection {\n const { modeConfig, lastPointerMoveEvent } = props;\n const { enableSnapping } = modeConfig || {};\n\n const guides: GuideFeatureCollection = {\n type: 'FeatureCollection',\n features: [...this._handler.getGuides(props).features],\n };\n\n if (!enableSnapping) {\n return guides;\n }\n\n const snapSourceHandle: EditHandleFeature | null | undefined =\n lastPointerMoveEvent && this._getPickedSnapSource(lastPointerMoveEvent.pointerDownPicks);\n\n // They started dragging a handle\n // So render the picked handle (in its updated location) and all possible snap targets\n if (snapSourceHandle) {\n guides.features.push(\n ...this._getSnapTargetHandles(props),\n this._getUpdatedSnapSourceHandle(snapSourceHandle, props.data)\n );\n\n return guides;\n }\n\n // Render the possible snap source handles\n const { features } = props.data;\n for (const index of props.selectedIndexes) {\n if (index < features.length) {\n const { geometry } = features[index];\n guides.features.push(...getEditHandlesForGeometry(geometry, index, 'snap-source'));\n }\n }\n\n return guides;\n }\n\n _getSnapAwareEvent<T extends MovementTypeEvent>(\n event: T,\n props: ModeProps<FeatureCollection>\n ): T {\n const snapSource = this._getPickedSnapSource(props.lastPointerMoveEvent.pointerDownPicks);\n const snapTarget = this._getPickedSnapTarget(event.picks);\n\n return snapSource && snapTarget\n ? this._getSnappedMouseEvent(event, snapSource, snapTarget)\n : event;\n }\n\n handleStartDragging(event: StartDraggingEvent, props: ModeProps<FeatureCollection>) {\n this._handler.handleStartDragging(event, props);\n }\n\n handleStopDragging(event: StopDraggingEvent, props: ModeProps<FeatureCollection>) {\n this._handler.handleStopDragging(this._getSnapAwareEvent(event, props), props);\n }\n\n handleDragging(event: DraggingEvent, props: ModeProps<FeatureCollection>) {\n this._handler.handleDragging(this._getSnapAwareEvent(event, props), props);\n }\n\n handlePointerMove(event: PointerMoveEvent, props: ModeProps<FeatureCollection>) {\n this._handler.handlePointerMove(this._getSnapAwareEvent(event, props), props);\n }\n}\n","/* eslint-env browser */\n\nimport { H3ClusterLayer } from '@deck.gl/geo-layers';\nimport { ViewMode } from '@nebula.gl/edit-modes';\nimport { polyfill, geoToH3 } from 'h3-js';\nimport EditableGeoJsonLayer from './editable-geojson-layer';\nimport EditableLayer from './editable-layer';\n\nconst DEFAULT_EDIT_MODE = ViewMode;\nconst DEFAULT_H3_RESOLUTION = 9;\nconst EMPTY_FEATURE_COLLECTION = {\n type: 'FeatureCollection',\n features: [],\n};\n\nconst defaultProps = {\n mode: DEFAULT_EDIT_MODE,\n\n // EditableGeoJsonLayer\n ...EditableGeoJsonLayer.defaultProps,\n\n // h3 layer\n data: [],\n selectedIndexes: [],\n filled: false,\n stroked: true,\n lineWidthScale: 1,\n lineWidthMinPixels: 1,\n lineWidthMaxPixels: Number.MAX_SAFE_INTEGER,\n lineWidthUnits: 'pixels',\n getHexagons: (d) => d.hexIds,\n getEditedCluster: (updatedHexagons, existingCluster) => {\n if (existingCluster) {\n return {\n ...existingCluster,\n hexIds: updatedHexagons,\n };\n }\n return {\n hexIds: updatedHexagons,\n };\n },\n resolution: DEFAULT_H3_RESOLUTION,\n};\n\nexport default class EditableH3ClusterLayer extends EditableLayer {\n static layerName = 'EditableH3ClusterLayer';\n static defaultProps = defaultProps;\n\n initializeState() {\n super.initializeState();\n\n this.setState({\n tentativeHexagonIDs: [],\n });\n }\n\n // convert array of (lng, lat) coords to cluster of hexes\n getDerivedHexagonIDs(coords) {\n return polyfill(coords, this.props.resolution, true);\n }\n\n // convert pair of (lng, lat) coords into single hex\n getDerivedHexagonID(coords) {\n return geoToH3(coords[1], coords[0], this.props.resolution);\n }\n\n renderLayers() {\n const layers: any = [\n new EditableGeoJsonLayer(\n this.getSubLayerProps({\n id: 'editable-geojson',\n\n mode: this.props.mode,\n data: EMPTY_FEATURE_COLLECTION,\n selectedFeatureIndexes: [],\n\n onEdit: (editAction) => {\n const { editType, editContext } = editAction;\n\n switch (editType) {\n case 'updateTentativeFeature':\n // tentative feature updates, updated on every pointer move\n if (editContext.feature.geometry.type === 'Polygon') {\n const coords = editContext.feature.geometry.coordinates;\n const hexIDs = this.getDerivedHexagonIDs(coords);\n\n this.setState({ tentativeHexagonIDs: hexIDs });\n } else if (editContext.feature.geometry.type === 'Point') {\n const coords = editContext.feature.geometry.coordinates;\n const hexID = this.getDerivedHexagonID(coords);\n\n this.setState({ tentativeHexagonIDs: [hexID] });\n }\n break;\n case 'addFeature':\n const updatedData = [...this.props.data];\n const { modeConfig } = this.props;\n\n if (!modeConfig || !modeConfig.booleanOperation) {\n // add new h3 cluster\n updatedData.push(\n this.props.getEditedCluster(this.state.tentativeHexagonIDs, null)\n );\n } else if (this.props.selectedIndexes.length !== 1) {\n // eslint-disable-next-line no-console,no-undef\n console.warn('booleanOperation only supported for single cluster selection');\n } else {\n // they're affecting a selected cluster\n let finalHexagonIDs;\n const committedHexagonIDs = new Set(this.getSelectedHexIDs());\n const tentativeHexagonIDs = new Set(this.state.tentativeHexagonIDs);\n\n switch (modeConfig.booleanOperation) {\n case 'union':\n default:\n finalHexagonIDs = [\n ...new Set([...committedHexagonIDs, ...tentativeHexagonIDs]),\n ];\n break;\n case 'intersection':\n finalHexagonIDs = [...committedHexagonIDs].filter((hexID: string) =>\n tentativeHexagonIDs.has(hexID)\n );\n break;\n case 'difference':\n finalHexagonIDs = [...committedHexagonIDs].filter(\n (hexID: string) => !tentativeHexagonIDs.has(hexID)\n );\n break;\n }\n\n const selectedIndex = this.props.selectedIndexes[0];\n const existingCluster = this.props.data[selectedIndex];\n updatedData[selectedIndex] = this.props.getEditedCluster(\n finalHexagonIDs,\n existingCluster\n );\n }\n\n this.setState({\n tentativeHexagonIDs: [],\n });\n\n this.props.onEdit({ updatedData });\n\n break;\n default:\n break;\n }\n },\n })\n ),\n\n new H3ClusterLayer(\n this.getSubLayerProps({\n id: 'hexagons',\n data: this.props.data,\n getHexagons: this.props.getHexagons,\n })\n ),\n new H3ClusterLayer(\n this.getSubLayerProps({\n id: 'tentative-hexagons',\n data: [\n {\n hexIds: this.state.tentativeHexagonIDs,\n },\n ],\n getHexagons: (d) => d.hexIds,\n })\n ),\n ];\n return layers;\n }\n\n // because data is an array of hexagon data, we take the cumulative of all selected indexes,\n // using props.getHexagons to support multiple data types\n getSelectedHexIDs() {\n let cumulativeHexIDs = [];\n this.props.selectedIndexes.forEach((index) => {\n const selectedCluster = this.props.data[index];\n const hexIDs = this.props.getHexagons(selectedCluster);\n cumulativeHexIDs = cumulativeHexIDs.concat(hexIDs);\n });\n return cumulativeHexIDs;\n }\n\n getCursor({ isDragging }: { isDragging: boolean }) {\n let { cursor } = this.state;\n if (!cursor) {\n // default cursor\n cursor = isDragging ? 'grabbing' : 'grab';\n }\n return cursor;\n }\n}\n","/* eslint-env browser */\nimport { CompositeLayer } from '@deck.gl/core';\nimport { PolygonLayer } from '@deck.gl/layers';\nimport { polygon } from '@turf/helpers';\nimport turfBuffer from '@turf/buffer';\nimport turfDifference from '@turf/difference';\nimport { DrawRectangleMode, DrawPolygonMode, ViewMode } from '@nebula.gl/edit-modes';\n\nimport EditableGeoJsonLayer from './editable-geojson-layer';\n\nexport const SELECTION_TYPE = {\n NONE: null,\n RECTANGLE: 'rectangle',\n POLYGON: 'polygon',\n};\n\nconst MODE_MAP = {\n [SELECTION_TYPE.RECTANGLE]: DrawRectangleMode,\n [SELECTION_TYPE.POLYGON]: DrawPolygonMode,\n};\n\nconst MODE_CONFIG_MAP = {\n [SELECTION_TYPE.RECTANGLE]: { dragToDraw: true },\n};\n\nconst defaultProps = {\n selectionType: SELECTION_TYPE.RECTANGLE,\n layerIds: [],\n onSelect: () => {},\n};\n\nconst EMPTY_DATA = {\n type: 'FeatureCollection',\n features: [],\n};\n\nconst EXPANSION_KM = 50;\nconst LAYER_ID_GEOJSON = 'selection-geojson';\nconst LAYER_ID_BLOCKER = 'selection-blocker';\n\nconst PASS_THROUGH_PROPS = [\n 'lineWidthScale',\n 'lineWidthMinPixels',\n 'lineWidthMaxPixels',\n 'lineWidthUnits',\n 'lineJointRounded',\n 'lineMiterLimit',\n 'pointRadiusScale',\n 'pointRadiusMinPixels',\n 'pointRadiusMaxPixels',\n 'lineDashJustified',\n 'getLineColor',\n 'getFillColor',\n 'getRadius',\n 'getLineWidth',\n 'getLineDashArray',\n 'getTentativeLineDashArray',\n 'getTentativeLineColor',\n 'getTentativeFillColor',\n 'getTentativeLineWidth',\n];\n\nexport default class SelectionLayer extends CompositeLayer<any> {\n static layerName = 'SelectionLayer';\n static defaultProps = defaultProps;\n\n _selectRectangleObjects(coordinates: any) {\n const { layerIds, onSelect } = this.props;\n // @ts-ignore\n const [x1, y1] = this.context.viewport.project(coordinates[0][0]);\n // @ts-ignore\n const [x2, y2] = this.context.viewport.project(coordinates[0][2]);\n // @ts-ignore\n const pickingInfos = this.context.deck.pickObjects({\n x: Math.min(x1, x2),\n y: Math.min(y1, y2),\n width: Math.abs(x2 - x1),\n height: Math.abs(y2 - y1),\n layerIds,\n });\n\n onSelect({ pickingInfos });\n }\n\n _selectPolygonObjects(coordinates: any) {\n const { layerIds, onSelect } = this.props;\n // @ts-ignore\n const mousePoints = coordinates[0].map((c) => this.context.viewport.project(c));\n\n const allX = mousePoints.map((mousePoint) => mousePoint[0]);\n const allY = mousePoints.map((mousePoint) => mousePoint[1]);\n const x = Math.min(...allX);\n const y = Math.min(...allY);\n const maxX = Math.max(...allX);\n const maxY = Math.max(...allY);\n\n // Use a polygon to hide the outside, because pickObjects()\n // does not support polygons\n const landPointsPoly = polygon(coordinates);\n const bigBuffer = turfBuffer(landPointsPoly, EXPANSION_KM);\n let bigPolygon;\n try {\n // turfDifference throws an exception if the polygon\n // intersects with itself (TODO: check if true in all versions)\n bigPolygon = turfDifference(bigBuffer, landPointsPoly);\n } catch (e) {\n // invalid selection polygon\n console.log('turfDifference() error', e); // eslint-disable-line\n return;\n }\n\n this.setState({\n pendingPolygonSelection: {\n bigPolygon,\n },\n });\n\n const blockerId = `${this.props.id}-${LAYER_ID_BLOCKER}`;\n\n // HACK, find a better way\n setTimeout(() => {\n // @ts-ignore\n const pickingInfos = this.context.deck.pickObjects({\n x,\n y,\n width: maxX - x,\n height: maxY - y,\n layerIds: [blockerId, ...layerIds],\n });\n\n onSelect({\n pickingInfos: pickingInfos.filter((item) => item.layer.id !== this.props.id),\n });\n }, 250);\n }\n\n renderLayers() {\n const { pendingPolygonSelection } = this.state;\n\n const mode = MODE_MAP[this.props.selectionType] || ViewMode;\n const modeConfig = MODE_CONFIG_MAP[this.props.selectionType];\n\n const inheritedProps = {};\n PASS_THROUGH_PROPS.forEach((p) => {\n if (this.props[p] !== undefined) inheritedProps[p] = this.props[p];\n });\n\n const layers = [\n new EditableGeoJsonLayer(\n this.getSubLayerProps({\n id: LAYER_ID_GEOJSON,\n pickable: true,\n mode,\n modeConfig,\n selectedFeatureIndexes: [],\n data: EMPTY_DATA,\n onEdit: ({ updatedData, editType }) => {\n if (editType === 'addFeature') {\n const { coordinates } = updatedData.features[0].geometry;\n\n if (this.props.selectionType === SELECTION_TYPE.RECTANGLE) {\n this._selectRectangleObjects(coordinates);\n } else if (this.props.selectionType === SELECTION_TYPE.POLYGON) {\n this._selectPolygonObjects(coordinates);\n }\n }\n },\n ...inheritedProps,\n })\n ),\n ];\n\n if (pendingPolygonSelection) {\n const { bigPolygon } = pendingPolygonSelection;\n layers.push(\n new PolygonLayer(\n // @ts-ignore\n this.getSubLayerProps({\n id: LAYER_ID_BLOCKER,\n pickable: true,\n stroked: false,\n opacity: 1.0,\n data: [bigPolygon],\n getLineColor: (obj) => [0, 0, 0, 1],\n getFillColor: (obj) => [0, 0, 0, 1],\n getPolygon: (o) => o.geometry.coordinates,\n })\n )\n );\n }\n\n return layers;\n }\n\n shouldUpdateState({ changeFlags: { stateChanged, propsOrDataChanged } }: Record<string, any>) {\n return stateChanged || propsOrDataChanged;\n }\n}\n","/* eslint-env browser */\n\nimport { CompositeLayer } from '@deck.gl/core';\nimport { ScatterplotLayer, LineLayer } from '@deck.gl/layers';\n\nconst defaultProps = {};\n\nexport default class ElevatedEditHandleLayer extends CompositeLayer<any> {\n static layerName = 'ElevatedEditHandleLayer';\n static defaultProps = defaultProps;\n renderLayers() {\n const handles = new ScatterplotLayer(\n Object.assign({}, this.props, {\n id: `${this.props.id}-ScatterplotLayer`,\n data: this.props.data,\n })\n );\n\n const lines = new LineLayer(\n Object.assign({}, this.props, {\n id: `${this.props.id}-LineLayer`,\n data: this.props.data,\n pickable: false,\n getSourcePosition: ({ position }) => [position[0], position[1], 0],\n getTargetPosition: ({ position }) => [position[0], position[1], position[2] || 0],\n getColor: [150, 150, 150, 200],\n getStrokeWidth: 3,\n })\n );\n\n return [handles, lines];\n }\n}\n","/* eslint-disable camelcase */\nconst INITIAL_STATE: Record<string, any> = {\n outlineEnabled: false,\n outlineRenderShadowmap: false,\n outlineShadowmap: null,\n};\n\nfunction getUniforms({ outlineEnabled, outlineRenderShadowmap, outlineShadowmap } = INITIAL_STATE) {\n const uniforms: Record<string, any> = {};\n if (outlineEnabled !== undefined) {\n // ? 1.0 : 0.0;\n uniforms.outline_uEnabled = outlineEnabled;\n }\n if (outlineRenderShadowmap !== undefined) {\n // ? 1.0 : 0.0;\n uniforms.outline_uRenderOutlines = outlineRenderShadowmap;\n }\n if (outlineShadowmap !== undefined) {\n uniforms.outline_uShadowmap = outlineShadowmap;\n }\n return uniforms;\n}\n\nconst vs = `\\\nattribute float instanceZLevel;\nvarying float outline_vzLevel;\nvarying vec4 outline_vPosition;\n\n// Set the z level for the outline shadowmap rendering\nvoid outline_setZLevel(float zLevel) {\n outline_vzLevel = zLevel;\n}\n\n// Store an adjusted position for texture2DProj\nvoid outline_setUV(vec4 position) {\n // mat4(\n // 0.5, 0.0, 0.0, 0.0,\n // 0.0, 0.5, 0.0, 0.0,\n // 0.0, 0.0, 0.5, 0.0,\n // 0.5, 0.5, 0.5, 1.0\n // ) * position;\n outline_vPosition = vec4(position.xyz * 0.5 + position.w * 0.5, position.w);\n}\n`;\n\nconst fs = `\\\nuniform bool outline_uEnabled;\nuniform bool outline_uRenderOutlines;\nuniform sampler2D outline_uShadowmap;\n\nvarying float outline_vzLevel;\n// varying vec2 outline_vUV;\nvarying vec4 outline_vPosition;\n\nconst float OUTLINE_Z_LEVEL_ERROR = 0.01;\n\n// Return a darker color in shadowmap\nvec4 outline_filterShadowColor(vec4 color) {\n return vec4(outline_vzLevel / 255., outline_vzLevel / 255., outline_vzLevel / 255., 1.);\n}\n\n// Return a darker color if in shadowmap\nvec4 outline_filterDarkenColor(vec4 color) {\n if (outline_uEnabled) {\n float maxZLevel;\n if (outline_vPosition.q > 0.0) {\n maxZLevel = texture2DProj(outline_uShadowmap, outline_vPosition).r * 255.;\n } else {\n discard;\n }\n if (maxZLevel < outline_vzLevel + OUTLINE_Z_LEVEL_ERROR) {\n vec4(color.rgb * 0.5, color.a);\n } else {\n discard;\n }\n }\n return color;\n}\n\n// if enabled and rendering outlines - Render depth to shadowmap\n// if enabled and rendering colors - Return a darker color if in shadowmap\n// if disabled, just return color\nvec4 outline_filterColor(vec4 color) {\n if (outline_uEnabled) {\n return outline_uRenderOutlines ?\n outline_filterShadowColor(color) :\n outline_filterDarkenColor(color);\n }\n return color;\n}\n`;\n\nexport default {\n name: 'outline',\n vs,\n fs,\n getUniforms,\n};\n","import { CompositeLayer, COORDINATE_SYSTEM } from '@deck.gl/core';\nimport { ScatterplotLayer } from '@deck.gl/layers';\nimport { SimpleMeshLayer } from '@deck.gl/mesh-layers';\nimport PathOutlineLayer from '../path-outline-layer/path-outline-layer';\nimport Arrow2DGeometry from './arrow-2d-geometry';\n\nimport createPathMarkers from './create-path-markers';\nimport { getClosestPointOnPolyline } from './polyline';\n\nconst DISTANCE_FOR_MULTI_ARROWS = 0.1;\nconst ARROW_HEAD_SIZE = 0.2;\nconst ARROW_TAIL_WIDTH = 0.05;\n// const ARROW_CENTER_ADJUST = -0.8;\n\nconst DEFAULT_MARKER_LAYER = SimpleMeshLayer;\n\nconst DEFAULT_MARKER_LAYER_PROPS = {\n mesh: new Arrow2DGeometry({ headSize: ARROW_HEAD_SIZE, tailWidth: ARROW_TAIL_WIDTH }),\n};\n\nconst defaultProps = Object.assign({}, PathOutlineLayer.defaultProps, {\n MarkerLayer: DEFAULT_MARKER_LAYER,\n markerLayerProps: DEFAULT_MARKER_LAYER_PROPS,\n\n sizeScale: 100,\n fp64: false,\n\n hightlightIndex: -1,\n highlightPoint: null,\n\n getPath: (x) => x.path,\n getColor: (x) => x.color,\n getMarkerColor: (x) => [0, 0, 0, 255],\n getDirection: (x) => x.direction,\n getMarkerPercentages: (object, { lineLength }) =>\n lineLength > DISTANCE_FOR_MULTI_ARROWS ? [0.25, 0.5, 0.75] : [0.5],\n});\n\nexport default class PathMarkerLayer extends CompositeLayer<any> {\n static layerName = 'PathMarkerLayer';\n static defaultProps = defaultProps;\n\n initializeState() {\n this.state = {\n markers: [],\n mesh: new Arrow2DGeometry({ headSize: ARROW_HEAD_SIZE, tailWidth: ARROW_TAIL_WIDTH }),\n closestPoint: null,\n };\n }\n // @ts-ignore\n projectFlat(xyz, viewport, coordinateSystem, coordinateOrigin) {\n if (coordinateSystem === COORDINATE_SYSTEM.METER_OFFSETS) {\n const [dx, dy] = viewport.metersToLngLatDelta(xyz);\n const [x, y] = coordinateOrigin;\n return viewport.projectFlat([x + dx, dy + y]);\n } else if (coordinateSystem === COORDINATE_SYSTEM.LNGLAT_OFFSETS) {\n const [dx, dy] = xyz;\n const [x, y] = coordinateOrigin;\n return viewport.projectFlat([x + dx, dy + y]);\n }\n\n return viewport.projectFlat(xyz);\n }\n\n updateState({ props, oldProps, changeFlags }) {\n if (changeFlags.dataChanged || changeFlags.updateTriggersChanged) {\n const {\n data,\n getPath,\n getDirection,\n getMarkerColor,\n getMarkerPercentages,\n coordinateSystem,\n coordinateOrigin,\n } = this.props;\n // @ts-ignore\n const { viewport } = this.context;\n const projectFlat = (o) => this.projectFlat(o, viewport, coordinateSystem, coordinateOrigin);\n this.state.markers = createPathMarkers({\n data,\n getPath,\n getDirection,\n getColor: getMarkerColor,\n getMarkerPercentages,\n projectFlat,\n });\n this._recalculateClosestPoint();\n }\n if (changeFlags.propsChanged) {\n if (props.point !== oldProps.point) {\n this._recalculateClosestPoint();\n }\n }\n }\n\n _recalculateClosestPoint() {\n const { highlightPoint, highlightIndex } = this.props;\n if (highlightPoint && highlightIndex >= 0) {\n const object = this.props.data[highlightIndex];\n const points = this.props.getPath(object);\n const { point } = getClosestPointOnPolyline({ points, p: highlightPoint });\n this.state.closestPoints = [\n {\n position: point,\n },\n ];\n } else {\n this.state.closestPoints = [];\n }\n }\n\n getPickingInfo({ info }) {\n return Object.assign(info, {\n // override object with picked feature\n object: (info.object && info.object.path) || info.object,\n });\n }\n\n renderLayers() {\n return [\n new PathOutlineLayer(\n this.props,\n // @ts-ignore\n this.getSubLayerProps({\n id: 'paths',\n // Note: data has to be passed explicitly like this to avoid being empty\n data: this.props.data,\n })\n ),\n new this.props.MarkerLayer(\n this.getSubLayerProps(\n Object.assign({}, this.props.markerLayerProps, {\n id: 'markers',\n data: this.state.markers,\n getOrientation: (x) => [0, -x.angle, 0],\n getColor: (x) => x.color,\n sizeScale: this.props.sizeScale,\n fp64: this.props.fp64,\n pickable: false,\n parameters: {\n blend: false,\n depthTest: false,\n },\n })\n )\n ),\n this.state.closestPoints &&\n new ScatterplotLayer({\n id: `${this.props.id}-highlight`,\n data: this.state.closestPoints,\n // @ts-ignore\n fp64: this.props.fp64,\n }),\n ];\n }\n}\n","import { Geometry } from '@luma.gl/core';\n\nexport default class Arrow2DGeometry extends Geometry {\n constructor(opts = {}) {\n super(\n Object.assign({}, opts, {\n attributes: getArrowAttributes(opts),\n })\n );\n }\n}\n\nfunction getArrowAttributes({ length = 1, headSize = 0.2, tailWidth = 0.05, tailStart = 0.05 }) {\n const texCoords = [\n // HEAD\n 0.5,\n 1.0,\n 0,\n 0.5 - headSize / 2,\n 1.0 - headSize,\n 0,\n 0.5 + headSize / 2,\n 1.0 - headSize,\n 0,\n 0.5 - tailWidth / 2,\n tailStart,\n 0,\n 0.5 + tailWidth / 2,\n 1.0 - headSize,\n 0,\n 0.5 + tailWidth / 2,\n tailStart,\n 0,\n 0.5 - tailWidth / 2,\n tailStart,\n 0,\n 0.5 - tailWidth / 2,\n 1.0 - headSize,\n 0,\n 0.5 + tailWidth / 2,\n 1.0 - headSize,\n 0,\n ];\n\n const normals = [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1];\n\n // Center and scale\n const positions = new Array(texCoords.length);\n for (let i = 0; i < texCoords.length / 3; i++) {\n const i3 = i * 3;\n positions[i3 + 0] = (texCoords[i3 + 0] - 0.5) * length;\n positions[i3 + 1] = (texCoords[i3 + 1] - 0.5) * length;\n positions[i3 + 2] = 0;\n }\n return {\n positions: new Float32Array(positions),\n normals: new Float32Array(normals),\n texCoords: new Float32Array(texCoords),\n };\n}\n","import { Vector2 } from 'math.gl';\n\nfunction getLineLength(vPoints) {\n // calculate total length\n let lineLength = 0;\n for (let i = 0; i < vPoints.length - 1; i++) {\n lineLength += vPoints[i].distance(vPoints[i + 1]);\n }\n return lineLength;\n}\n\nconst DEFAULT_COLOR = [0, 0, 0, 255];\nconst DEFAULT_DIRECTION = { forward: true, backward: false };\n\nexport default function createPathMarkers({\n data,\n getPath = (x) => x.path,\n getDirection = (x) => x.direction,\n getColor = (x) => DEFAULT_COLOR,\n getMarkerPercentages = (x) => [0.5],\n projectFlat,\n}) {\n const markers = [];\n\n for (const object of data) {\n const path = getPath(object);\n const direction = getDirection(object) || DEFAULT_DIRECTION;\n const color = getColor(object);\n\n const vPoints = path.map((p) => new Vector2(p));\n const vPointsReverse = vPoints.slice(0).reverse();\n\n // calculate total length\n const lineLength = getLineLength(vPoints);\n\n // Ask for where to put markers\n // @ts-ignore\n const percentages = getMarkerPercentages(object, { lineLength });\n\n // Create the markers\n for (const percentage of percentages) {\n if (direction.forward) {\n const marker = createMarkerAlongPath({\n path: vPoints,\n percentage,\n lineLength,\n color,\n object,\n projectFlat,\n });\n markers.push(marker);\n }\n\n if (direction.backward) {\n const marker = createMarkerAlongPath({\n path: vPointsReverse,\n percentage,\n lineLength,\n color,\n object,\n projectFlat,\n });\n markers.push(marker);\n }\n }\n }\n\n return markers;\n}\n\nfunction createMarkerAlongPath({ path, percentage, lineLength, color, object, projectFlat }) {\n const distanceAlong = lineLength * percentage;\n let currentDistance = 0;\n let previousDistance = 0;\n let i = 0;\n for (i = 0; i < path.length - 1; i++) {\n currentDistance += path[i].distance(path[i + 1]);\n if (currentDistance > distanceAlong) {\n break;\n }\n previousDistance = currentDistance;\n }\n\n const vDirection = path[i + 1].clone().subtract(path[i]).normalize();\n const along = distanceAlong - previousDistance;\n const vCenter = vDirection.clone().multiply(new Vector2(along, along)).add(path[i]);\n\n const vDirection2 = new Vector2(projectFlat(path[i + 1])).subtract(projectFlat(path[i]));\n\n const angle = (vDirection2.verticalAngle() * 180) / Math.PI;\n\n return { position: [vCenter.x, vCenter.y, 0], angle, color, object };\n}\n","import { Vector3, clamp } from 'math.gl';\n\n// Return the closest point on a line segment\nexport function getClosestPointOnLine({ p, p1, p2, clampToLine = true }) {\n const lineVector = new Vector3(p2).subtract(p1);\n const pointVector = new Vector3(p).subtract(p1);\n let dotProduct = lineVector.dot(pointVector);\n if (clampToLine) {\n dotProduct = clamp(dotProduct, 0, 1);\n }\n // @ts-ignore\n return lineVector.lerp(dotProduct);\n}\n\n// Return the closest point on a line segment\nexport function getClosestPointOnPolyline({ p, points }) {\n p = new Vector3(p);\n let pClosest = null;\n let distanceSquared = Infinity;\n let index = -1;\n for (let i = 0; i < points.length - 1; ++i) {\n const p1 = points[i];\n const p2 = points[i + 1];\n const pClosestOnLine = getClosestPointOnLine({ p, p1, p2 });\n const distanceToLineSquared = p.distanceSquared(pClosestOnLine);\n if (distanceToLineSquared < distanceSquared) {\n distanceSquared = distanceToLineSquared;\n pClosest = pClosestOnLine;\n index = i;\n }\n }\n return {\n point: pClosest,\n index,\n p1: points[index],\n p2: points[index + 1],\n distanceSquared,\n distance: Math.sqrt(distanceSquared),\n };\n}\n","import { CompositeLayer } from '@deck.gl/core';\nimport { ScatterplotLayer } from '@deck.gl/layers';\n\nexport default class JunctionScatterplotLayer extends CompositeLayer<any> {\n static layerName = 'JunctionScatterplotLayer';\n static defaultProps = {\n // @ts-ignore\n ...ScatterplotLayer.defaultProps,\n getFillColor: (d) => [0, 0, 0, 255],\n getStrokeColor: (d) => [255, 255, 255, 255],\n getInnerRadius: (d) => 1,\n };\n\n renderLayers() {\n const { id, getFillColor, getStrokeColor, getInnerRadius, updateTriggers } = this.props;\n\n // data needs to be passed explicitly after deck.gl 5.3\n return [\n // the full circles\n new ScatterplotLayer({\n ...this.props,\n id: `${id}-full`,\n data: this.props.data,\n getLineColor: getStrokeColor,\n updateTriggers: {\n ...updateTriggers,\n getStrokeColor: updateTriggers.getStrokeColor,\n },\n }), // the inner part\n new ScatterplotLayer({\n ...this.props,\n id: `${id}-inner`,\n data: this.props.data,\n getFillColor,\n getRadius: getInnerRadius,\n pickable: false,\n updateTriggers: {\n ...updateTriggers,\n getFillColor: updateTriggers.getFillColor,\n getRadius: updateTriggers.getInnerRadius,\n },\n }),\n ];\n }\n}\n","import { TextLayer } from '@deck.gl/layers';\n\nimport NebulaLayer from '../nebula-layer';\nimport { toDeckColor } from '../utils';\nimport DeckCache from '../deck-renderer/deck-cache';\n\nexport default class TextsLayer extends NebulaLayer {\n deckCache: DeckCache<any, any>;\n\n constructor(config: Record<string, any>) {\n super(config);\n this.deckCache = new DeckCache(config.getData, (data) => config.toNebulaFeature(data));\n }\n\n render({ nebula }: Record<string, any>) {\n const defaultColor = [0x0, 0x0, 0x0, 0xff];\n const { objects, updateTrigger } = this.deckCache;\n\n const { zoom } = nebula.props.viewport;\n\n return new TextLayer({\n id: `texts-${this.id}`,\n data: objects,\n opacity: 1,\n fp64: false,\n pickable: false,\n\n getText: (nf) => nf.style.text,\n getPosition: (nf) => nf.geoJson.geometry.coordinates,\n // @ts-ignore\n getColor: (nf) => toDeckColor(nf.style.fillColor) || defaultColor,\n\n // TODO: layer should offer option to scale with zoom\n sizeScale: 1 / Math.pow(2, 20 - zoom),\n\n updateTriggers: { all: updateTrigger },\n\n nebulaLayer: this,\n });\n }\n}\n","import { PathMarkerLayer } from '@nebula.gl/layers';\nimport { GL } from '@luma.gl/constants';\n\nimport { ArrowStyles, DEFAULT_STYLE, MAX_ARROWS } from '../style';\nimport NebulaLayer from '../nebula-layer';\nimport { toDeckColor } from '../utils';\nimport DeckCache from '../deck-renderer/deck-cache';\n\nconst NEBULA_TO_DECK_DIRECTIONS = {\n [ArrowStyles.NONE]: { forward: false, backward: false },\n [ArrowStyles.FORWARD]: { forward: true, backward: false },\n [ArrowStyles.BACKWARD]: { forward: false, backward: true },\n [ArrowStyles.BOTH]: { forward: true, backward: true },\n};\n\nexport default class SegmentsLayer extends NebulaLayer {\n deckCache: DeckCache<any, any>;\n noBlend: boolean;\n highlightColor: [number, number, number, number];\n arrowSize: number;\n rounded: boolean;\n dashed: boolean;\n markerLayerProps: Record<string, any> | null | undefined;\n\n constructor(config: Record<string, any>) {\n super(config);\n this.deckCache = new DeckCache(config.getData, (data) => config.toNebulaFeature(data));\n this.enableSelection = true;\n const {\n enablePicking = true,\n noBlend = false,\n rounded = true,\n dashed = false,\n markerLayerProps = null,\n } = config;\n Object.assign(this, { enablePicking, noBlend, rounded, dashed, markerLayerProps });\n }\n\n getMouseOverSegment(): any {\n // TODO: remove references\n return null;\n }\n\n _calcMarkerPercentages(nf: Record<string, any>): number[] {\n const { arrowPercentages } = nf.style;\n if (arrowPercentages) {\n return arrowPercentages;\n }\n\n const arrowStyle = nf.style.arrowStyle || DEFAULT_STYLE.arrowStyle;\n if (arrowStyle === ArrowStyles.NONE) return [];\n\n const arrowCount = Math.min(nf.style.arrowCount || DEFAULT_STYLE.arrowCount, MAX_ARROWS);\n return [[0.5], [0.33, 0.66], [0.25, 0.5, 0.75]][arrowCount - 1];\n }\n\n _getHighlightedObjectIndex({ nebula }: Record<string, any>): number {\n const { deckglMouseOverInfo } = nebula;\n if (deckglMouseOverInfo) {\n const { originalLayer, index } = deckglMouseOverInfo;\n if (originalLayer === this) {\n return index;\n }\n }\n\n // no object\n return -1;\n }\n\n render({ nebula }: Record<string, any>) {\n const defaultColor = [0x0, 0x0, 0x0, 0xff];\n const { objects, updateTrigger } = this.deckCache;\n\n return new PathMarkerLayer({\n id: `segments-${this.id}`,\n data: objects,\n opacity: 1,\n // @ts-ignore\n fp64: false,\n rounded: this.rounded,\n pickable: true,\n sizeScale: this.arrowSize || 6,\n parameters: {\n depthTest: false,\n blend: !this.noBlend,\n blendEquation: GL.MAX,\n },\n getPath: (nf: any) => nf.geoJson.geometry.coordinates,\n // @ts-ignore\n getColor: (nf: any) => toDeckColor(nf.style.lineColor, defaultColor),\n getWidth: (nf: any) => nf.style.lineWidthMeters || 1,\n getZLevel: (nf: any) => nf.style.zLevel * 255,\n getDirection: (nf: any) => NEBULA_TO_DECK_DIRECTIONS[nf.style.arrowStyle],\n // @ts-ignore\n getMarkerColor: (nf: any) => toDeckColor(nf.style.arrowColor, defaultColor),\n getMarkerPercentages: this._calcMarkerPercentages,\n updateTriggers: { all: updateTrigger },\n\n highlightedObjectIndex: this._getHighlightedObjectIndex({ nebula }),\n highlightColor: toDeckColor(this.highlightColor),\n\n dashJustified: this.dashed,\n getDashArray: this.dashed ? (nf) => nf.style.dashArray : null,\n markerLayerProps:\n this.markerLayerProps ||\n (PathMarkerLayer as Record<string, any>).defaultProps.markerLayerProps,\n\n nebulaLayer: this,\n });\n }\n}\n","import { EventEmitter } from 'events';\n\nimport document from 'global/document';\nimport window from 'global/window';\nimport { WebMercatorViewport } from '@deck.gl/core';\n\nimport DeckDrawer from './deck-renderer/deck-drawer';\nimport LayerMouseEvent from './layer-mouse-event';\nimport NebulaLayer from './nebula-layer';\n\nconst LOGGER_PREFIX = 'Nebula: ';\n\nexport default class Nebula {\n init(props: Record<string, any>) {\n this.props = props;\n this.wmViewport = new WebMercatorViewport(this.props.viewport);\n\n // TODO: Properly use pointer events: ['click', 'pointermove', 'pointerup', 'pointerdown']\n ['click', 'mousemove', 'mouseup', 'mousedown'].forEach((name) =>\n document.addEventListener(name, this._onMouseEvent, true)\n );\n }\n\n detach() {\n // TODO: Properly use pointer events: ['click', 'pointermove', 'pointerup', 'pointerdown']\n ['click', 'mousemove', 'mouseup', 'mousedown'].forEach((name) =>\n document.removeEventListener(name, this._onMouseEvent, true)\n );\n }\n\n updateProps(newProps: Record<string, any>) {\n this.props = newProps;\n const { viewport } = this.props;\n\n this.wmViewport = new WebMercatorViewport(viewport);\n }\n\n props: Record<string, any>;\n deckgl: Record<string, any> | null;\n mainContainer: Record<string, any> | null;\n deckglMouseOverInfo: Record<string, any> | null | undefined;\n _deckDrawer: DeckDrawer;\n _mouseWasDown: boolean;\n wmViewport: WebMercatorViewport;\n queryObjectEvents: EventEmitter = new EventEmitter();\n forceUpdate: Function;\n inited: boolean;\n\n log(message: string) {\n const { logger } = this.props;\n if (logger && logger.info) {\n logger.info(LOGGER_PREFIX + message);\n }\n }\n\n updateAllDeckObjects() {\n this.getAllLayers().forEach((layer) => {\n if (layer && layer.deckCache) {\n (layer.deckCache as any).updateAllDeckObjects();\n }\n });\n this.forceUpdate();\n }\n\n updateDeckObjectsByIds(ids: string[]) {\n this.getAllLayers().forEach((layer) => {\n if (layer && layer.deckCache) {\n (layer.deckCache as any).updateDeckObjectsByIds(ids);\n }\n });\n this.forceUpdate();\n }\n\n rerenderLayers() {\n this.updateAllDeckObjects();\n }\n\n _isNebulaEvent({ buttons, target, type }: Record<string, any>) {\n const { viewport } = this.props;\n\n // allow mouseup event aggressively to cancel drag properly\n // TODO: use pointer capture setPointerCapture() to capture mouseup properly after deckgl\n if (this._mouseWasDown && type === 'mouseup') {\n this._mouseWasDown = false;\n return true;\n }\n\n // allow mousemove event while dragging\n if (type === 'mousemove' && buttons > 0) {\n return true;\n }\n\n if (!target.getBoundingClientRect) {\n return false;\n }\n\n const rect = target.getBoundingClientRect();\n // Only listen to events coming from the basemap\n // identified by the canvas of the same size as viewport.\n // Need to round the rect dimension as some monitors\n // have some sub-pixel difference with viewport.\n return (\n Math.round(rect.width) === Math.round(viewport.width) &&\n Math.round(rect.height) === Math.round(viewport.height)\n );\n }\n\n _onMouseEvent = (event: window.MouseEvent) => {\n if (!this._isNebulaEvent(event)) {\n return;\n }\n\n if (event.type === 'mousedown') {\n this._mouseWasDown = true;\n }\n\n // offsetX/Y of the MouseEvent provides the offset in the X/Y coordinate\n // of the mouse pointer between that event and the padding edge of the target node.\n // We set our listener to document so we need to adjust offsetX/Y\n // in case the target is not be our WebGL canvas.\n const { top = 0, left = 0 } = this.mainContainer\n ? this.mainContainer.getBoundingClientRect()\n : {};\n const proxyEvent = new Proxy(event, {\n get: (original: any, propertyName: string) => {\n if (propertyName === 'offsetX') {\n return original.pageX - left;\n }\n\n if (propertyName === 'offsetY') {\n return original.pageY - top;\n }\n\n // TODO: Properly use pointer events\n if (propertyName === 'type') {\n return original.type.replace('pointer', 'mouse');\n }\n\n const result = original[propertyName];\n if (typeof result === 'function') {\n return result.bind(original);\n }\n return result;\n },\n });\n\n this._handleDeckGLEvent(proxyEvent);\n };\n\n getMouseGroundPosition(event: Record<string, any>) {\n return this.wmViewport.unproject([event.offsetX, event.offsetY]);\n }\n\n unprojectMousePosition(mousePosition: [number, number]): [number, number] {\n // @ts-ignore\n return this.wmViewport.unproject(mousePosition);\n }\n\n _handleDeckGLEvent(event: Record<string, any>) {\n const {\n deckgl,\n props: { onMapMouseEvent, selectionType, eventFilter },\n } = this;\n let sendMapEvent = true;\n let cursor = 'auto';\n\n if (event && deckgl && selectionType) {\n if (!this._deckDrawer) this._deckDrawer = new DeckDrawer(this);\n\n const lngLat = this.getMouseGroundPosition(event);\n if (eventFilter && !eventFilter(lngLat, event)) return;\n // @ts-ignore\n const drawerResult = this._deckDrawer.handleEvent(event, lngLat, selectionType);\n if (drawerResult.redraw) this.forceUpdate();\n return;\n }\n\n if (event && deckgl && (!event.buttons || event.type !== 'mousemove')) {\n // TODO: sort by mouse priority\n const layerIds = deckgl.props.layers\n .filter(\n (l: any) => l && l.props && l.props.nebulaLayer && l.props.nebulaLayer.enablePicking\n )\n .map((l: any) => l.id);\n\n const pickingInfo = deckgl.pickObject({\n x: event.offsetX,\n y: event.offsetY,\n radius: 5,\n layerIds,\n });\n this.queryObjectEvents.emit('pick', { event, pickingInfo });\n if (pickingInfo) {\n sendMapEvent = false;\n\n const { index, lngLat } = pickingInfo;\n if (eventFilter && !eventFilter(lngLat, event)) return;\n\n const { layer: deckLayer, object } = pickingInfo;\n\n if (\n deckLayer &&\n deckLayer.props &&\n deckLayer.props.nebulaLayer &&\n deckLayer.props.nebulaLayer.eventHandler\n ) {\n deckLayer.props.nebulaLayer.eventHandler(event, pickingInfo);\n }\n\n const original =\n object.original ||\n (deckLayer.props.nebulaLayer &&\n deckLayer.props.nebulaLayer.deckCache &&\n deckLayer.props.nebulaLayer.deckCache.originals[index]);\n\n if (original) {\n this.deckglMouseOverInfo = { originalLayer: deckLayer.props.nebulaLayer, index };\n // @ts-ignore\n const nebulaMouseEvent = new LayerMouseEvent(event, {\n data: original,\n metadata: object.metadata,\n groundPoint: lngLat,\n nebula: this,\n });\n deckLayer.props.nebulaLayer.emit(event.type, nebulaMouseEvent);\n this.forceUpdate();\n }\n\n cursor = 'pointer';\n }\n }\n\n if (document.documentElement) {\n document.documentElement.style.cursor = cursor;\n }\n\n if (sendMapEvent) {\n this.deckglMouseOverInfo = null;\n\n const lngLat = this.getMouseGroundPosition(event);\n if (eventFilter && !eventFilter(lngLat, event)) return;\n\n // send to layers first\n // @ts-ignore\n const nebulaMouseEvent = new LayerMouseEvent(event, {\n groundPoint: lngLat,\n nebula: this,\n });\n this.getAllLayers()\n .filter((layer) => layer && layer.usesMapEvents)\n .forEach((layer) => layer.emit('mapMouseEvent', nebulaMouseEvent));\n\n this.getAllLayers()\n .filter(\n (layer) =>\n layer && layer.props && layer.props.nebulaLayer && layer.props.nebulaLayer.mapMouseEvent\n )\n .forEach((layer) => layer.props.nebulaLayer.mapMouseEvent(nebulaMouseEvent, layer));\n\n if (onMapMouseEvent) {\n onMapMouseEvent(event, lngLat);\n }\n }\n }\n\n getExtraDeckLayers(): Record<string, any>[] {\n const result = [];\n\n if (this._deckDrawer) result.push(...this._deckDrawer.render());\n\n return result;\n }\n\n renderDeckLayers() {\n return this.getAllLayers()\n .map((layer) => (layer instanceof NebulaLayer ? layer.render({ nebula: this }) : layer))\n .filter(Boolean);\n }\n\n getAllLayers() {\n const result = [];\n\n this.props.layers.filter(Boolean).forEach((layer) => {\n result.push(layer);\n // Only NebulaLayers have helpers, Deck GL layers don't.\n if (layer instanceof NebulaLayer) {\n result.push(...layer.helperLayers);\n }\n });\n\n return result.filter(Boolean);\n }\n\n getRenderedLayers() {\n return [...this.renderDeckLayers(), ...this.getExtraDeckLayers()];\n }\n\n updateAndGetRenderedLayers(\n layers: Record<string, any>[],\n viewport: WebMercatorViewport,\n container: Record<string, any>\n ) {\n if (this.inited) {\n this.updateProps({ layers, viewport });\n this.forceUpdate = () => container.forceUpdate();\n } else {\n this.inited = true;\n this.init({ layers, viewport });\n this.forceUpdate = () => container.forceUpdate();\n this.updateAllDeckObjects();\n }\n\n return this.getRenderedLayers();\n }\n\n setDeck(deckgl: Record<string, any> | null) {\n if (deckgl) {\n this.deckgl = deckgl;\n }\n }\n\n setMainContainer(mainContainer: Record<string, any> | null) {\n if (mainContainer) {\n this.mainContainer = mainContainer;\n }\n }\n}\n","var topLevel = typeof global !== 'undefined' ? global :\n typeof window !== 'undefined' ? window : {}\nvar minDoc = require('min-document');\n\nvar doccy;\n\nif (typeof document !== 'undefined') {\n doccy = document;\n} else {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\n\n if (!doccy) {\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\n }\n}\n\nmodule.exports = doccy;\n","/**\n * The base implementation of `_.clamp` which doesn't coerce arguments.\n *\n * @private\n * @param {number} number The number to clamp.\n * @param {number} [lower] The lower bound.\n * @param {number} upper The upper bound.\n * @returns {number} Returns the clamped number.\n */\nfunction baseClamp(number, lower, upper) {\n if (number === number) {\n if (upper !== undefined) {\n number = number <= upper ? number : upper;\n }\n if (lower !== undefined) {\n number = number >= lower ? number : lower;\n }\n }\n return number;\n}\n\nmodule.exports = baseClamp;\n","'use strict';\n\n// http://stackoverflow.com/questions/10343913/how-to-create-a-web-worker-from-a-string\n\nvar URL = window.URL || window.webkitURL;\n\nmodule.exports = function (content, url) {\n try {\n try {\n var blob;\n\n try {\n // BlobBuilder = Deprecated, but widely implemented\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;\n\n blob = new BlobBuilder();\n\n blob.append(content);\n\n blob = blob.getBlob();\n } catch (e) {\n // The proposed API\n blob = new Blob([content]);\n }\n\n return new Worker(URL.createObjectURL(blob));\n } catch (e) {\n return new Worker('data:application/javascript,' + encodeURIComponent(content));\n }\n } catch (e) {\n if (!url) {\n throw Error('Inline worker is not supported');\n }\n\n return new Worker(url);\n }\n};","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier) => {\n if (typeof (options) === 'string') {\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(version, options).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse')\nconst eq = require('./eq')\n\nconst diff = (version1, version2) => {\n if (eq(version1, version2)) {\n return null\n } else {\n const v1 = parse(version1)\n const v2 = parse(version2)\n const hasPre = v1.prerelease.length || v2.prerelease.length\n const prefix = hasPre ? 'pre' : ''\n const defaultResult = hasPre ? 'prerelease' : ''\n for (const key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst {re, t} = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n let next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null)\n return null\n\n return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)\n}\nmodule.exports = coerce\n","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","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\nmodule.exports = _nonIterableSpread;","'use strict'\n\n// A linked list to keep track of recently-used-ness\nconst Yallist = require('yallist')\n\nconst MAX = Symbol('max')\nconst LENGTH = Symbol('length')\nconst LENGTH_CALCULATOR = Symbol('lengthCalculator')\nconst ALLOW_STALE = Symbol('allowStale')\nconst MAX_AGE = Symbol('maxAge')\nconst DISPOSE = Symbol('dispose')\nconst NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet')\nconst LRU_LIST = Symbol('lruList')\nconst CACHE = Symbol('cache')\nconst UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet')\n\nconst naiveLength = () => 1\n\n// lruList is a yallist where the head is the youngest\n// item, and the tail is the oldest. the list contains the Hit\n// objects as the entries.\n// Each Hit object has a reference to its Yallist.Node. This\n// never changes.\n//\n// cache is a Map (or PseudoMap) that matches the keys to\n// the Yallist.Node object.\nclass LRUCache {\n constructor (options) {\n if (typeof options === 'number')\n options = { max: options }\n\n if (!options)\n options = {}\n\n if (options.max && (typeof options.max !== 'number' || options.max < 0))\n throw new TypeError('max must be a non-negative number')\n // Kind of weird to have a default max of Infinity, but oh well.\n const max = this[MAX] = options.max || Infinity\n\n const lc = options.length || naiveLength\n this[LENGTH_CALCULATOR] = (typeof lc !== 'function') ? naiveLength : lc\n this[ALLOW_STALE] = options.stale || false\n if (options.maxAge && typeof options.maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n this[MAX_AGE] = options.maxAge || 0\n this[DISPOSE] = options.dispose\n this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false\n this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false\n this.reset()\n }\n\n // resize the cache when the max changes.\n set max (mL) {\n if (typeof mL !== 'number' || mL < 0)\n throw new TypeError('max must be a non-negative number')\n\n this[MAX] = mL || Infinity\n trim(this)\n }\n get max () {\n return this[MAX]\n }\n\n set allowStale (allowStale) {\n this[ALLOW_STALE] = !!allowStale\n }\n get allowStale () {\n return this[ALLOW_STALE]\n }\n\n set maxAge (mA) {\n if (typeof mA !== 'number')\n throw new TypeError('maxAge must be a non-negative number')\n\n this[MAX_AGE] = mA\n trim(this)\n }\n get maxAge () {\n return this[MAX_AGE]\n }\n\n // resize the cache when the lengthCalculator changes.\n set lengthCalculator (lC) {\n if (typeof lC !== 'function')\n lC = naiveLength\n\n if (lC !== this[LENGTH_CALCULATOR]) {\n this[LENGTH_CALCULATOR] = lC\n this[LENGTH] = 0\n this[LRU_LIST].forEach(hit => {\n hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)\n this[LENGTH] += hit.length\n })\n }\n trim(this)\n }\n get lengthCalculator () { return this[LENGTH_CALCULATOR] }\n\n get length () { return this[LENGTH] }\n get itemCount () { return this[LRU_LIST].length }\n\n rforEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].tail; walker !== null;) {\n const prev = walker.prev\n forEachStep(this, fn, walker, thisp)\n walker = prev\n }\n }\n\n forEach (fn, thisp) {\n thisp = thisp || this\n for (let walker = this[LRU_LIST].head; walker !== null;) {\n const next = walker.next\n forEachStep(this, fn, walker, thisp)\n walker = next\n }\n }\n\n keys () {\n return this[LRU_LIST].toArray().map(k => k.key)\n }\n\n values () {\n return this[LRU_LIST].toArray().map(k => k.value)\n }\n\n reset () {\n if (this[DISPOSE] &&\n this[LRU_LIST] &&\n this[LRU_LIST].length) {\n this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value))\n }\n\n this[CACHE] = new Map() // hash of items by key\n this[LRU_LIST] = new Yallist() // list of items in order of use recency\n this[LENGTH] = 0 // length of items in the list\n }\n\n dump () {\n return this[LRU_LIST].map(hit =>\n isStale(this, hit) ? false : {\n k: hit.key,\n v: hit.value,\n e: hit.now + (hit.maxAge || 0)\n }).toArray().filter(h => h)\n }\n\n dumpLru () {\n return this[LRU_LIST]\n }\n\n set (key, value, maxAge) {\n maxAge = maxAge || this[MAX_AGE]\n\n if (maxAge && typeof maxAge !== 'number')\n throw new TypeError('maxAge must be a number')\n\n const now = maxAge ? Date.now() : 0\n const len = this[LENGTH_CALCULATOR](value, key)\n\n if (this[CACHE].has(key)) {\n if (len > this[MAX]) {\n del(this, this[CACHE].get(key))\n return false\n }\n\n const node = this[CACHE].get(key)\n const item = node.value\n\n // dispose of the old one before overwriting\n // split out into 2 ifs for better coverage tracking\n if (this[DISPOSE]) {\n if (!this[NO_DISPOSE_ON_SET])\n this[DISPOSE](key, item.value)\n }\n\n item.now = now\n item.maxAge = maxAge\n item.value = value\n this[LENGTH] += len - item.length\n item.length = len\n this.get(key)\n trim(this)\n return true\n }\n\n const hit = new Entry(key, value, len, now, maxAge)\n\n // oversized objects fall out of cache automatically.\n if (hit.length > this[MAX]) {\n if (this[DISPOSE])\n this[DISPOSE](key, value)\n\n return false\n }\n\n this[LENGTH] += hit.length\n this[LRU_LIST].unshift(hit)\n this[CACHE].set(key, this[LRU_LIST].head)\n trim(this)\n return true\n }\n\n has (key) {\n if (!this[CACHE].has(key)) return false\n const hit = this[CACHE].get(key).value\n return !isStale(this, hit)\n }\n\n get (key) {\n return get(this, key, true)\n }\n\n peek (key) {\n return get(this, key, false)\n }\n\n pop () {\n const node = this[LRU_LIST].tail\n if (!node)\n return null\n\n del(this, node)\n return node.value\n }\n\n del (key) {\n del(this, this[CACHE].get(key))\n }\n\n load (arr) {\n // reset the cache\n this.reset()\n\n const now = Date.now()\n // A previous serialized cache has the most recent items first\n for (let l = arr.length - 1; l >= 0; l--) {\n const hit = arr[l]\n const expiresAt = hit.e || 0\n if (expiresAt === 0)\n // the item was created without expiration in a non aged cache\n this.set(hit.k, hit.v)\n else {\n const maxAge = expiresAt - now\n // dont add already expired items\n if (maxAge > 0) {\n this.set(hit.k, hit.v, maxAge)\n }\n }\n }\n }\n\n prune () {\n this[CACHE].forEach((value, key) => get(this, key, false))\n }\n}\n\nconst get = (self, key, doUse) => {\n const node = self[CACHE].get(key)\n if (node) {\n const hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n return undefined\n } else {\n if (doUse) {\n if (self[UPDATE_AGE_ON_GET])\n node.value.now = Date.now()\n self[LRU_LIST].unshiftNode(node)\n }\n }\n return hit.value\n }\n}\n\nconst isStale = (self, hit) => {\n if (!hit || (!hit.maxAge && !self[MAX_AGE]))\n return false\n\n const diff = Date.now() - hit.now\n return hit.maxAge ? diff > hit.maxAge\n : self[MAX_AGE] && (diff > self[MAX_AGE])\n}\n\nconst trim = self => {\n if (self[LENGTH] > self[MAX]) {\n for (let walker = self[LRU_LIST].tail;\n self[LENGTH] > self[MAX] && walker !== null;) {\n // We know that we're about to delete this one, and also\n // what the next least recently used key will be, so just\n // go ahead and set it now.\n const prev = walker.prev\n del(self, walker)\n walker = prev\n }\n }\n}\n\nconst del = (self, node) => {\n if (node) {\n const hit = node.value\n if (self[DISPOSE])\n self[DISPOSE](hit.key, hit.value)\n\n self[LENGTH] -= hit.length\n self[CACHE].delete(hit.key)\n self[LRU_LIST].removeNode(node)\n }\n}\n\nclass Entry {\n constructor (key, value, length, now, maxAge) {\n this.key = key\n this.value = value\n this.length = length\n this.now = now\n this.maxAge = maxAge || 0\n }\n}\n\nconst forEachStep = (self, fn, node, thisp) => {\n let hit = node.value\n if (isStale(self, hit)) {\n del(self, node)\n if (!self[ALLOW_STALE])\n hit = undefined\n }\n if (hit)\n fn.call(thisp, hit.value, hit.key, self)\n}\n\nmodule.exports = LRUCache\n","'use strict'\nmodule.exports = Yallist\n\nYallist.Node = Node\nYallist.create = Yallist\n\nfunction Yallist (list) {\n var self = this\n if (!(self instanceof Yallist)) {\n self = new Yallist()\n }\n\n self.tail = null\n self.head = null\n self.length = 0\n\n if (list && typeof list.forEach === 'function') {\n list.forEach(function (item) {\n self.push(item)\n })\n } else if (arguments.length > 0) {\n for (var i = 0, l = arguments.length; i < l; i++) {\n self.push(arguments[i])\n }\n }\n\n return self\n}\n\nYallist.prototype.removeNode = function (node) {\n if (node.list !== this) {\n throw new Error('removing node which does not belong to this list')\n }\n\n var next = node.next\n var prev = node.prev\n\n if (next) {\n next.prev = prev\n }\n\n if (prev) {\n prev.next = next\n }\n\n if (node === this.head) {\n this.head = next\n }\n if (node === this.tail) {\n this.tail = prev\n }\n\n node.list.length--\n node.next = null\n node.prev = null\n node.list = null\n\n return next\n}\n\nYallist.prototype.unshiftNode = function (node) {\n if (node === this.head) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var head = this.head\n node.list = this\n node.next = head\n if (head) {\n head.prev = node\n }\n\n this.head = node\n if (!this.tail) {\n this.tail = node\n }\n this.length++\n}\n\nYallist.prototype.pushNode = function (node) {\n if (node === this.tail) {\n return\n }\n\n if (node.list) {\n node.list.removeNode(node)\n }\n\n var tail = this.tail\n node.list = this\n node.prev = tail\n if (tail) {\n tail.next = node\n }\n\n this.tail = node\n if (!this.head) {\n this.head = node\n }\n this.length++\n}\n\nYallist.prototype.push = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n push(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.unshift = function () {\n for (var i = 0, l = arguments.length; i < l; i++) {\n unshift(this, arguments[i])\n }\n return this.length\n}\n\nYallist.prototype.pop = function () {\n if (!this.tail) {\n return undefined\n }\n\n var res = this.tail.value\n this.tail = this.tail.prev\n if (this.tail) {\n this.tail.next = null\n } else {\n this.head = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.shift = function () {\n if (!this.head) {\n return undefined\n }\n\n var res = this.head.value\n this.head = this.head.next\n if (this.head) {\n this.head.prev = null\n } else {\n this.tail = null\n }\n this.length--\n return res\n}\n\nYallist.prototype.forEach = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.head, i = 0; walker !== null; i++) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.next\n }\n}\n\nYallist.prototype.forEachReverse = function (fn, thisp) {\n thisp = thisp || this\n for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {\n fn.call(thisp, walker.value, i, this)\n walker = walker.prev\n }\n}\n\nYallist.prototype.get = function (n) {\n for (var i = 0, walker = this.head; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.next\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.getReverse = function (n) {\n for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {\n // abort out of the list early if we hit a cycle\n walker = walker.prev\n }\n if (i === n && walker !== null) {\n return walker.value\n }\n}\n\nYallist.prototype.map = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.head; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.next\n }\n return res\n}\n\nYallist.prototype.mapReverse = function (fn, thisp) {\n thisp = thisp || this\n var res = new Yallist()\n for (var walker = this.tail; walker !== null;) {\n res.push(fn.call(thisp, walker.value, this))\n walker = walker.prev\n }\n return res\n}\n\nYallist.prototype.reduce = function (fn, initial) {\n var acc\n var walker = this.head\n if (arguments.length > 1) {\n acc = initial\n } else if (this.head) {\n walker = this.head.next\n acc = this.head.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = 0; walker !== null; i++) {\n acc = fn(acc, walker.value, i)\n walker = walker.next\n }\n\n return acc\n}\n\nYallist.prototype.reduceReverse = function (fn, initial) {\n var acc\n var walker = this.tail\n if (arguments.length > 1) {\n acc = initial\n } else if (this.tail) {\n walker = this.tail.prev\n acc = this.tail.value\n } else {\n throw new TypeError('Reduce of empty list with no initial value')\n }\n\n for (var i = this.length - 1; walker !== null; i--) {\n acc = fn(acc, walker.value, i)\n walker = walker.prev\n }\n\n return acc\n}\n\nYallist.prototype.toArray = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.head; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.next\n }\n return arr\n}\n\nYallist.prototype.toArrayReverse = function () {\n var arr = new Array(this.length)\n for (var i = 0, walker = this.tail; walker !== null; i++) {\n arr[i] = walker.value\n walker = walker.prev\n }\n return arr\n}\n\nYallist.prototype.slice = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = 0, walker = this.head; walker !== null && i < from; i++) {\n walker = walker.next\n }\n for (; walker !== null && i < to; i++, walker = walker.next) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.sliceReverse = function (from, to) {\n to = to || this.length\n if (to < 0) {\n to += this.length\n }\n from = from || 0\n if (from < 0) {\n from += this.length\n }\n var ret = new Yallist()\n if (to < from || to < 0) {\n return ret\n }\n if (from < 0) {\n from = 0\n }\n if (to > this.length) {\n to = this.length\n }\n for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {\n walker = walker.prev\n }\n for (; walker !== null && i > from; i--, walker = walker.prev) {\n ret.push(walker.value)\n }\n return ret\n}\n\nYallist.prototype.splice = function (start, deleteCount, ...nodes) {\n if (start > this.length) {\n start = this.length - 1\n }\n if (start < 0) {\n start = this.length + start;\n }\n\n for (var i = 0, walker = this.head; walker !== null && i < start; i++) {\n walker = walker.next\n }\n\n var ret = []\n for (var i = 0; walker && i < deleteCount; i++) {\n ret.push(walker.value)\n walker = this.removeNode(walker)\n }\n if (walker === null) {\n walker = this.tail\n }\n\n if (walker !== this.head && walker !== this.tail) {\n walker = walker.prev\n }\n\n for (var i = 0; i < nodes.length; i++) {\n walker = insert(this, walker, nodes[i])\n }\n return ret;\n}\n\nYallist.prototype.reverse = function () {\n var head = this.head\n var tail = this.tail\n for (var walker = head; walker !== null; walker = walker.prev) {\n var p = walker.prev\n walker.prev = walker.next\n walker.next = p\n }\n this.head = tail\n this.tail = head\n return this\n}\n\nfunction insert (self, node, value) {\n var inserted = node === self.head ?\n new Node(value, null, node, self) :\n new Node(value, node, node.next, self)\n\n if (inserted.next === null) {\n self.tail = inserted\n }\n if (inserted.prev === null) {\n self.head = inserted\n }\n\n self.length++\n\n return inserted\n}\n\nfunction push (self, item) {\n self.tail = new Node(item, self.tail, null, self)\n if (!self.head) {\n self.head = self.tail\n }\n self.length++\n}\n\nfunction unshift (self, item) {\n self.head = new Node(item, null, self.head, self)\n if (!self.tail) {\n self.tail = self.head\n }\n self.length++\n}\n\nfunction Node (value, prev, next, list) {\n if (!(this instanceof Node)) {\n return new Node(value, prev, next, list)\n }\n\n this.list = list\n this.value = value\n\n if (prev) {\n prev.next = this\n this.prev = prev\n } else {\n this.prev = null\n }\n\n if (next) {\n next.prev = this\n this.next = next\n } else {\n this.next = null\n }\n}\n\ntry {\n // add if support for Symbol.iterator is present\n require('./iterator.js')(Yallist)\n} catch (er) {}\n","'use strict'\nmodule.exports = function (Yallist) {\n Yallist.prototype[Symbol.iterator] = function* () {\n for (let walker = this.head; walker; walker = walker.next) {\n yield walker.value\n }\n }\n}\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin)))\n minver = setMin\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let min = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!min)\n min = version\n } else {\n if (prev) {\n set.push([min, prev])\n }\n prev = null\n min = null\n }\n }\n if (min)\n set.push([min, null])\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max)\n ranges.push(min)\n else if (!max && min === v[0])\n ranges.push('*')\n else if (!max)\n ranges.push(`>=${min}`)\n else if (min === v[0])\n ranges.push(`<=${max}`)\n else\n ranges.push(`${min} - ${max}`)\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","var arrayWithHoles = require(\"./arrayWithHoles\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableRest = require(\"./nonIterableRest\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;","function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom)\n return true\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub)\n continue OUTER\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull)\n return false\n }\n return true\n}\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom)\n return true\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY)\n return true\n else if (options.includePrerelease)\n sub = [ new Comparator('>=0.0.0-0') ]\n else\n sub = [ new Comparator('>=0.0.0') ]\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease)\n return true\n else\n dom = [ new Comparator('>=0.0.0') ]\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=')\n gt = higherGT(gt, c, options)\n else if (c.operator === '<' || c.operator === '<=')\n lt = lowerLT(lt, c, options)\n else\n eqSet.add(c.semver)\n }\n\n if (eqSet.size > 1)\n return null\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0)\n return null\n else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<='))\n return null\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options))\n return null\n\n if (lt && !satisfies(eq, String(lt), options))\n return null\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options))\n return false\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt)\n return false\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options))\n return false\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt)\n return false\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options))\n return false\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0)\n return false\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0)\n return false\n\n if (lt && hasDomGT && !gt && gtltComp !== 0)\n return false\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre)\n return false\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a)\n return b\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a)\n return b\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","Array.prototype.flat||Object.defineProperty(Array.prototype,\"flat\",{configurable:!0,value:function r(){var t=isNaN(arguments[0])?1:Number(arguments[0]);return t?Array.prototype.reduce.call(this,function(a,e){return Array.isArray(e)?a.push.apply(a,r.call(e,t-1)):a.push(e),a},[]):Array.prototype.slice.call(this)},writable:!0}),Array.prototype.flatMap||Object.defineProperty(Array.prototype,\"flatMap\",{configurable:!0,value:function(r){return Array.prototype.map.apply(this,arguments).flat()},writable:!0})\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n// find the complete implementation of crypto (msCrypto) on IE11.\nvar getRandomValues = typeof crypto != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != 'undefined' && typeof msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto);\nvar rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\nexport default function rng() {\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n\n return getRandomValues(rnds8);\n}","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex; // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n\n return [bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], '-', bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]], bth[buf[i++]]].join('');\n}\n\nexport default bytesToUuid;","import rng from './rng.js';\nimport bytesToUuid from './bytesToUuid.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nexport default v1;","import bytesToUuid from './bytesToUuid.js';\n\nfunction uuidToBytes(uuid) {\n // Note: We assume we're being passed a valid uuid string\n var bytes = [];\n uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) {\n bytes.push(parseInt(hex, 16));\n });\n return bytes;\n}\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = new Array(str.length);\n\n for (var i = 0; i < str.length; i++) {\n bytes[i] = str.charCodeAt(i);\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n var generateUUID = function generateUUID(value, namespace, buf, offset) {\n var off = buf && offset || 0;\n if (typeof value == 'string') value = stringToBytes(value);\n if (typeof namespace == 'string') namespace = uuidToBytes(namespace);\n if (!Array.isArray(value)) throw TypeError('value must be an array of bytes');\n if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); // Per 4.3\n\n var bytes = hashfunc(namespace.concat(value));\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n for (var idx = 0; idx < 16; ++idx) {\n buf[off + idx] = bytes[idx];\n }\n }\n\n return buf || bytesToUuid(bytes);\n }; // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name;\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes == 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Array(msg.length);\n\n for (var i = 0; i < msg.length; i++) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var i;\n var x;\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n var hex;\n\n for (i = 0; i < length32; i += 8) {\n x = input[i >> 5] >>> i % 32 & 0xff;\n hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[(len + 64 >>> 9 << 4) + 14] = len;\n var i;\n var olda;\n var oldb;\n var oldc;\n var oldd;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (i = 0; i < x.length; i += 16) {\n olda = a;\n oldb = b;\n oldc = c;\n oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n var i;\n var output = [];\n output[(input.length >> 2) - 1] = undefined;\n\n for (i = 0; i < output.length; i += 1) {\n output[i] = 0;\n }\n\n var length8 = input.length * 8;\n\n for (i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","import rng from './rng.js';\nimport bytesToUuid from './bytesToUuid.js';\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof options == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nexport default v4;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes == 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Array(msg.length);\n\n for (var i = 0; i < msg.length; i++) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var i = 0; i < N; i++) {\n M[i] = new Array(16);\n\n for (var j = 0; j < 16; j++) {\n M[i][j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];\n }\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var i = 0; i < N; i++) {\n var W = new Array(80);\n\n for (var t = 0; t < 16; t++) {\n W[t] = M[i][t];\n }\n\n for (var t = 16; t < 80; t++) {\n W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var t = 0; t < 80; t++) {\n var s = Math.floor(t / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export { default as v1 } from './v1.js';\nexport { default as v3 } from './v3.js';\nexport { default as v4 } from './v4.js';\nexport { default as v5 } from './v5.js';","import { getCoords } from \"@turf/invariant\";\n/**\n * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.\n *\n * @name booleanClockwise\n * @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated\n * @returns {boolean} true/false\n * @example\n * var clockwiseRing = turf.lineString([[0,0],[1,1],[1,0],[0,0]]);\n * var counterClockwiseRing = turf.lineString([[0,0],[1,0],[1,1],[0,0]]);\n *\n * turf.booleanClockwise(clockwiseRing)\n * //=true\n * turf.booleanClockwise(counterClockwiseRing)\n * //=false\n */\nexport default function booleanClockwise(line) {\n var ring = getCoords(line);\n var sum = 0;\n var i = 1;\n var prev;\n var cur;\n while (i < ring.length) {\n prev = cur || ring[0];\n cur = ring[i];\n sum += (cur[0] - prev[0]) * (cur[1] + prev[1]);\n i++;\n }\n return sum > 0;\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import clone from '@turf/clone';\nimport booleanClockwise from '@turf/boolean-clockwise';\nimport { featureEach, geomEach } from '@turf/meta';\nimport { getCoords } from '@turf/invariant';\nimport { isObject, featureCollection } from '@turf/helpers';\n\n/**\n * Rewind {@link LineString|(Multi)LineString} or {@link Polygon|(Multi)Polygon} outer ring counterclockwise and inner rings clockwise (Uses {@link http://en.wikipedia.org/wiki/Shoelace_formula|Shoelace Formula}).\n *\n * @name rewind\n * @param {GeoJSON} geojson input GeoJSON Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.reverse=false] enable reverse winding\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON} rewind Polygon\n * @example\n * var polygon = turf.polygon([[[121, -29], [138, -29], [138, -18], [121, -18], [121, -29]]]);\n *\n * var rewind = turf.rewind(polygon);\n *\n * //addToMap\n * var addToMap = [rewind];\n */\nfunction rewind(geojson, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var reverse = options.reverse || false;\n var mutate = options.mutate || false;\n\n // validation\n if (!geojson) throw new Error(\"<geojson> is required\");\n if (typeof reverse !== \"boolean\")\n throw new Error(\"<reverse> must be a boolean\");\n if (typeof mutate !== \"boolean\")\n throw new Error(\"<mutate> must be a boolean\");\n\n // prevent input mutation\n if (mutate === false) geojson = clone(geojson);\n\n // Support Feature Collection or Geometry Collection\n var results = [];\n switch (geojson.type) {\n case \"GeometryCollection\":\n geomEach(geojson, function (geometry) {\n rewindFeature(geometry, reverse);\n });\n return geojson;\n case \"FeatureCollection\":\n featureEach(geojson, function (feature) {\n featureEach(rewindFeature(feature, reverse), function (result) {\n results.push(result);\n });\n });\n return featureCollection(results);\n }\n // Support Feature or Geometry Objects\n return rewindFeature(geojson, reverse);\n}\n\n/**\n * Rewind\n *\n * @private\n * @param {Geometry|Feature<any>} geojson Geometry or Feature\n * @param {Boolean} [reverse=false] enable reverse winding\n * @returns {Geometry|Feature<any>} rewind Geometry or Feature\n */\nfunction rewindFeature(geojson, reverse) {\n var type = geojson.type === \"Feature\" ? geojson.geometry.type : geojson.type;\n\n // Support all GeoJSON Geometry Objects\n switch (type) {\n case \"GeometryCollection\":\n geomEach(geojson, function (geometry) {\n rewindFeature(geometry, reverse);\n });\n return geojson;\n case \"LineString\":\n rewindLineString(getCoords(geojson), reverse);\n return geojson;\n case \"Polygon\":\n rewindPolygon(getCoords(geojson), reverse);\n return geojson;\n case \"MultiLineString\":\n getCoords(geojson).forEach(function (lineCoords) {\n rewindLineString(lineCoords, reverse);\n });\n return geojson;\n case \"MultiPolygon\":\n getCoords(geojson).forEach(function (lineCoords) {\n rewindPolygon(lineCoords, reverse);\n });\n return geojson;\n case \"Point\":\n case \"MultiPoint\":\n return geojson;\n }\n}\n\n/**\n * Rewind LineString - outer ring clockwise\n *\n * @private\n * @param {Array<Array<number>>} coords GeoJSON LineString geometry coordinates\n * @param {Boolean} [reverse=false] enable reverse winding\n * @returns {void} mutates coordinates\n */\nfunction rewindLineString(coords, reverse) {\n if (booleanClockwise(coords) === reverse) coords.reverse();\n}\n\n/**\n * Rewind Polygon - outer ring counterclockwise and inner rings clockwise.\n *\n * @private\n * @param {Array<Array<Array<number>>>} coords GeoJSON Polygon geometry coordinates\n * @param {Boolean} [reverse=false] enable reverse winding\n * @returns {void} mutates coordinates\n */\nfunction rewindPolygon(coords, reverse) {\n // outer ring\n if (booleanClockwise(coords[0]) !== reverse) {\n coords[0].reverse();\n }\n // inner rings\n for (var i = 1; i < coords.length; i++) {\n if (booleanClockwise(coords[i]) === reverse) {\n coords[i].reverse();\n }\n }\n}\n\nexport default rewind;\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","import { coordEach } from \"@turf/meta\";\nimport { point } from \"@turf/helpers\";\n/**\n * Takes one or more features and calculates the centroid using the mean of all vertices.\n * This lessens the effect of small islands and artifacts when calculating the centroid of a set of polygons.\n *\n * @name centroid\n * @param {GeoJSON} geojson GeoJSON to be centered\n * @param {Object} [options={}] Optional Parameters\n * @param {Object} [options.properties={}] an Object that is used as the {@link Feature}'s properties\n * @returns {Feature<Point>} the centroid of the input features\n * @example\n * var polygon = turf.polygon([[[-81, 41], [-88, 36], [-84, 31], [-80, 33], [-77, 39], [-81, 41]]]);\n *\n * var centroid = turf.centroid(polygon);\n *\n * //addToMap\n * var addToMap = [polygon, centroid]\n */\nfunction centroid(geojson, options) {\n if (options === void 0) { options = {}; }\n var xSum = 0;\n var ySum = 0;\n var len = 0;\n coordEach(geojson, function (coord) {\n xSum += coord[0];\n ySum += coord[1];\n len++;\n }, true);\n return point([xSum / len, ySum / len], options.properties);\n}\nexport default centroid;\n","import { coordEach } from \"@turf/meta\";\n/**\n * Takes a set of features, calculates the bbox of all input features, and returns a bounding box.\n *\n * @name bbox\n * @param {GeoJSON} geojson any GeoJSON object\n * @returns {BBox} bbox extent in [minX, minY, maxX, maxY] order\n * @example\n * var line = turf.lineString([[-74, 40], [-78, 42], [-82, 35]]);\n * var bbox = turf.bbox(line);\n * var bboxPolygon = turf.bboxPolygon(bbox);\n *\n * //addToMap\n * var addToMap = [line, bboxPolygon]\n */\nfunction bbox(geojson) {\n var result = [Infinity, Infinity, -Infinity, -Infinity];\n coordEach(geojson, function (coord) {\n if (result[0] > coord[0]) {\n result[0] = coord[0];\n }\n if (result[1] > coord[1]) {\n result[1] = coord[1];\n }\n if (result[2] < coord[0]) {\n result[2] = coord[0];\n }\n if (result[3] < coord[1]) {\n result[3] = coord[1];\n }\n });\n return result;\n}\nbbox[\"default\"] = bbox;\nexport default bbox;\n","import clone from '@turf/clone';\nimport center from '@turf/center';\nimport centroid from '@turf/centroid';\nimport turfBBox from '@turf/bbox';\nimport rhumbBearing from '@turf/rhumb-bearing';\nimport rhumbDistance from '@turf/rhumb-distance';\nimport rhumbDestination from '@turf/rhumb-destination';\nimport { featureEach, coordEach } from '@turf/meta';\nimport { isObject, point } from '@turf/helpers';\nimport { getType, getCoords, getCoord } from '@turf/invariant';\n\n/**\n * Scale a GeoJSON from a given point by a factor of scaling (ex: factor=2 would make the GeoJSON 200% larger).\n * If a FeatureCollection is provided, the origin point will be calculated based on each individual Feature.\n *\n * @name transformScale\n * @param {GeoJSON} geojson GeoJSON to be scaled\n * @param {number} factor of scaling, positive or negative values greater than 0\n * @param {Object} [options={}] Optional parameters\n * @param {string|Coord} [options.origin='centroid'] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON} scaled GeoJSON\n * @example\n * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * var scaledPoly = turf.transformScale(poly, 3);\n *\n * //addToMap\n * var addToMap = [poly, scaledPoly];\n * scaledPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformScale(geojson, factor, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var origin = options.origin;\n var mutate = options.mutate;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson required\");\n if (typeof factor !== \"number\" || factor === 0)\n throw new Error(\"invalid factor\");\n var originIsPoint = Array.isArray(origin) || typeof origin === \"object\";\n\n // Clone geojson to avoid side effects\n if (mutate !== true) geojson = clone(geojson);\n\n // Scale each Feature separately\n if (geojson.type === \"FeatureCollection\" && !originIsPoint) {\n featureEach(geojson, function (feature, index) {\n geojson.features[index] = scale(feature, factor, origin);\n });\n return geojson;\n }\n // Scale Feature/Geometry\n return scale(geojson, factor, origin);\n}\n\n/**\n * Scale Feature/Geometry\n *\n * @private\n * @param {Feature|Geometry} feature GeoJSON Feature/Geometry\n * @param {number} factor of scaling, positive or negative values greater than 0\n * @param {string|Coord} [origin=\"centroid\"] Point from which the scaling will occur (string options: sw/se/nw/ne/center/centroid)\n * @returns {Feature|Geometry} scaled GeoJSON Feature/Geometry\n */\nfunction scale(feature, factor, origin) {\n // Default params\n var isPoint = getType(feature) === \"Point\";\n origin = defineOrigin(feature, origin);\n\n // Shortcut no-scaling\n if (factor === 1 || isPoint) return feature;\n\n // Scale each coordinate\n coordEach(feature, function (coord) {\n var originalDistance = rhumbDistance(origin, coord);\n var bearing = rhumbBearing(origin, coord);\n var newDistance = originalDistance * factor;\n var newCoord = getCoords(rhumbDestination(origin, newDistance, bearing));\n coord[0] = newCoord[0];\n coord[1] = newCoord[1];\n if (coord.length === 3) coord[2] *= factor;\n });\n\n return feature;\n}\n\n/**\n * Define Origin\n *\n * @private\n * @param {GeoJSON} geojson GeoJSON\n * @param {string|Coord} origin sw/se/nw/ne/center/centroid\n * @returns {Feature<Point>} Point origin\n */\nfunction defineOrigin(geojson, origin) {\n // Default params\n if (origin === undefined || origin === null) origin = \"centroid\";\n\n // Input Coord\n if (Array.isArray(origin) || typeof origin === \"object\")\n return getCoord(origin);\n\n // Define BBox\n var bbox = geojson.bbox ? geojson.bbox : turfBBox(geojson);\n var west = bbox[0];\n var south = bbox[1];\n var east = bbox[2];\n var north = bbox[3];\n\n switch (origin) {\n case \"sw\":\n case \"southwest\":\n case \"westsouth\":\n case \"bottomleft\":\n return point([west, south]);\n case \"se\":\n case \"southeast\":\n case \"eastsouth\":\n case \"bottomright\":\n return point([east, south]);\n case \"nw\":\n case \"northwest\":\n case \"westnorth\":\n case \"topleft\":\n return point([west, north]);\n case \"ne\":\n case \"northeast\":\n case \"eastnorth\":\n case \"topright\":\n return point([east, north]);\n case \"center\":\n return center(geojson);\n case undefined:\n case null:\n case \"centroid\":\n return centroid(geojson);\n default:\n throw new Error(\"invalid origin\");\n }\n}\n\nexport default transformScale;\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import { degreesToRadians, radiansToDegrees } from \"@turf/helpers\";\nimport { getCoord } from \"@turf/invariant\";\n// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Takes two {@link Point|points} and finds the geographic bearing between them,\n * i.e. the angle measured in degrees from the north line (0 degrees)\n *\n * @name bearing\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.final=false] calculates the final bearing if true\n * @returns {number} bearing in decimal degrees, between -180 and 180 degrees (positive clockwise)\n * @example\n * var point1 = turf.point([-75.343, 39.984]);\n * var point2 = turf.point([-75.534, 39.123]);\n *\n * var bearing = turf.bearing(point1, point2);\n *\n * //addToMap\n * var addToMap = [point1, point2]\n * point1.properties['marker-color'] = '#f00'\n * point2.properties['marker-color'] = '#0f0'\n * point1.properties.bearing = bearing\n */\nexport default function bearing(start, end, options) {\n if (options === void 0) { options = {}; }\n // Reverse calculation\n if (options.final === true) {\n return calculateFinalBearing(start, end);\n }\n var coordinates1 = getCoord(start);\n var coordinates2 = getCoord(end);\n var lon1 = degreesToRadians(coordinates1[0]);\n var lon2 = degreesToRadians(coordinates2[0]);\n var lat1 = degreesToRadians(coordinates1[1]);\n var lat2 = degreesToRadians(coordinates2[1]);\n var a = Math.sin(lon2 - lon1) * Math.cos(lat2);\n var b = Math.cos(lat1) * Math.sin(lat2) -\n Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1);\n return radiansToDegrees(Math.atan2(a, b));\n}\n/**\n * Calculates Final Bearing\n *\n * @private\n * @param {Coord} start starting Point\n * @param {Coord} end ending Point\n * @returns {number} bearing\n */\nfunction calculateFinalBearing(start, end) {\n // Swap start & end\n var bear = bearing(end, start);\n bear = (bear + 180) % 360;\n return bear;\n}\n","// http://en.wikipedia.org/wiki/Haversine_formula\n// http://www.movable-type.co.uk/scripts/latlong.html\nimport { degreesToRadians, lengthToRadians, point, radiansToDegrees, } from \"@turf/helpers\";\nimport { getCoord } from \"@turf/invariant\";\n/**\n * Takes a {@link Point} and calculates the location of a destination point given a distance in\n * degrees, radians, miles, or kilometers; and bearing in degrees.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name destination\n * @param {Coord} origin starting point\n * @param {number} distance distance from the origin point\n * @param {number} bearing ranging from -180 to 180\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] miles, kilometers, degrees, or radians\n * @param {Object} [options.properties={}] Translate properties to Point\n * @returns {Feature<Point>} destination point\n * @example\n * var point = turf.point([-75.343, 39.984]);\n * var distance = 50;\n * var bearing = 90;\n * var options = {units: 'miles'};\n *\n * var destination = turf.destination(point, distance, bearing, options);\n *\n * //addToMap\n * var addToMap = [point, destination]\n * destination.properties['marker-color'] = '#f00';\n * point.properties['marker-color'] = '#0f0';\n */\nexport default function destination(origin, distance, bearing, options) {\n if (options === void 0) { options = {}; }\n // Handle input\n var coordinates1 = getCoord(origin);\n var longitude1 = degreesToRadians(coordinates1[0]);\n var latitude1 = degreesToRadians(coordinates1[1]);\n var bearingRad = degreesToRadians(bearing);\n var radians = lengthToRadians(distance, options.units);\n // Main\n var latitude2 = Math.asin(Math.sin(latitude1) * Math.cos(radians) +\n Math.cos(latitude1) * Math.sin(radians) * Math.cos(bearingRad));\n var longitude2 = longitude1 +\n Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1), Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));\n var lng = radiansToDegrees(longitude2);\n var lat = radiansToDegrees(latitude2);\n return point([lng, lat], options.properties);\n}\n","import { getCoord } from \"@turf/invariant\";\nimport { radiansToLength, degreesToRadians, } from \"@turf/helpers\";\n//http://en.wikipedia.org/wiki/Haversine_formula\n//http://www.movable-type.co.uk/scripts/latlong.html\n/**\n * Calculates the distance between two {@link Point|points} in degrees, radians, miles, or kilometers.\n * This uses the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula) to account for global curvature.\n *\n * @name distance\n * @param {Coord | Point} from origin point or coordinate\n * @param {Coord | Point} to destination point or coordinate\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, or kilometers\n * @returns {number} distance between the two points\n * @example\n * var from = turf.point([-75.343, 39.984]);\n * var to = turf.point([-75.534, 39.123]);\n * var options = {units: 'miles'};\n *\n * var distance = turf.distance(from, to, options);\n *\n * //addToMap\n * var addToMap = [from, to];\n * from.properties.distance = distance;\n * to.properties.distance = distance;\n */\nfunction distance(from, to, options) {\n if (options === void 0) { options = {}; }\n var coordinates1 = getCoord(from);\n var coordinates2 = getCoord(to);\n var dLat = degreesToRadians(coordinates2[1] - coordinates1[1]);\n var dLon = degreesToRadians(coordinates2[0] - coordinates1[0]);\n var lat1 = degreesToRadians(coordinates1[1]);\n var lat2 = degreesToRadians(coordinates2[1]);\n var a = Math.pow(Math.sin(dLat / 2), 2) +\n Math.pow(Math.sin(dLon / 2), 2) * Math.cos(lat1) * Math.cos(lat2);\n return radiansToLength(2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)), options.units);\n}\nexport default distance;\n","import bearing from \"@turf/bearing\";\nimport destination from \"@turf/destination\";\nimport measureDistance from \"@turf/distance\";\nimport { point } from \"@turf/helpers\";\nimport { getGeom } from \"@turf/invariant\";\n/**\n * Takes a {@link LineString} and returns a {@link Point} at a specified distance along the line.\n *\n * @name along\n * @param {Feature<LineString>} line input line\n * @param {number} distance distance along the line\n * @param {Object} [options] Optional parameters\n * @param {string} [options.units=\"kilometers\"] can be degrees, radians, miles, or kilometers\n * @returns {Feature<Point>} Point `distance` `units` along the line\n * @example\n * var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]]);\n * var options = {units: 'miles'};\n *\n * var along = turf.along(line, 200, options);\n *\n * //addToMap\n * var addToMap = [along, line]\n */\nexport default function along(line, distance, options) {\n if (options === void 0) { options = {}; }\n // Get Coords\n var geom = getGeom(line);\n var coords = geom.coordinates;\n var travelled = 0;\n for (var i = 0; i < coords.length; i++) {\n if (distance >= travelled && i === coords.length - 1) {\n break;\n }\n else if (travelled >= distance) {\n var overshot = distance - travelled;\n if (!overshot) {\n return point(coords[i]);\n }\n else {\n var direction = bearing(coords[i], coords[i - 1]) - 180;\n var interpolated = destination(coords[i], overshot, direction, options);\n return interpolated;\n }\n }\n else {\n travelled += measureDistance(coords[i], coords[i + 1], options);\n }\n }\n return point(coords[coords.length - 1]);\n}\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","import { coordEach } from '@turf/meta';\nimport { isObject } from '@turf/helpers';\nimport { getCoords } from '@turf/invariant';\nimport clone from '@turf/clone';\nimport rhumbDestination from '@turf/rhumb-destination';\n\n/**\n * Moves any geojson Feature or Geometry of a specified distance along a Rhumb Line\n * on the provided direction angle.\n *\n * @name transformTranslate\n * @param {GeoJSON} geojson object to be translated\n * @param {number} distance length of the motion; negative values determine motion in opposite direction\n * @param {number} direction of the motion; angle from North in decimal degrees, positive clockwise\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] in which `distance` will be express; miles, kilometers, degrees, or radians\n * @param {number} [options.zTranslation=0] length of the vertical motion, same unit of distance\n * @param {boolean} [options.mutate=false] allows GeoJSON input to be mutated (significant performance increase if true)\n * @returns {GeoJSON} the translated GeoJSON object\n * @example\n * var poly = turf.polygon([[[0,29],[3.5,29],[2.5,32],[0,29]]]);\n * var translatedPoly = turf.transformTranslate(poly, 100, 35);\n *\n * //addToMap\n * var addToMap = [poly, translatedPoly];\n * translatedPoly.properties = {stroke: '#F00', 'stroke-width': 4};\n */\nfunction transformTranslate(geojson, distance, direction, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var zTranslation = options.zTranslation;\n var mutate = options.mutate;\n\n // Input validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n if (zTranslation && typeof zTranslation !== \"number\" && isNaN(zTranslation))\n throw new Error(\"zTranslation is not a number\");\n\n // Shortcut no-motion\n zTranslation = zTranslation !== undefined ? zTranslation : 0;\n if (distance === 0 && zTranslation === 0) return geojson;\n\n if (direction === undefined || direction === null || isNaN(direction))\n throw new Error(\"direction is required\");\n\n // Invert with negative distances\n if (distance < 0) {\n distance = -distance;\n direction = direction + 180;\n }\n\n // Clone geojson to avoid side effects\n if (mutate === false || mutate === undefined) geojson = clone(geojson);\n\n // Translate each coordinate\n coordEach(geojson, function (pointCoords) {\n var newCoords = getCoords(\n rhumbDestination(pointCoords, distance, direction, { units: units })\n );\n pointCoords[0] = newCoords[0];\n pointCoords[1] = newCoords[1];\n if (zTranslation && pointCoords.length === 3)\n pointCoords[2] += zTranslation;\n });\n return geojson;\n}\n\nexport default transformTranslate;\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import polygonClipping from \"polygon-clipping\";\nimport { getGeom } from \"@turf/invariant\";\nimport { multiPolygon, polygon } from \"@turf/helpers\";\n/**\n * Takes two {@link (Multi)Polygon(s)} and returns a combined polygon. If the input polygons are not contiguous, this function returns a {@link MultiPolygon} feature.\n *\n * @name union\n * @param {Feature<Polygon|MultiPolygon>} polygon1 input Polygon feature\n * @param {Feature<Polygon|MultiPolygon>} polygon2 Polygon feature to difference from polygon1\n * @param {Object} [options={}] Optional Parameters\n * @param {Object} [options.properties={}] Translate Properties to output Feature\n * @returns {Feature<(Polygon|MultiPolygon)>} a combined {@link Polygon} or {@link MultiPolygon} feature, or null if the inputs are empty\n * @example\n * var poly1 = turf.polygon([[\n * [-82.574787, 35.594087],\n * [-82.574787, 35.615581],\n * [-82.545261, 35.615581],\n * [-82.545261, 35.594087],\n * [-82.574787, 35.594087]\n * ]], {\"fill\": \"#0f0\"});\n * var poly2 = turf.polygon([[\n * [-82.560024, 35.585153],\n * [-82.560024, 35.602602],\n * [-82.52964, 35.602602],\n * [-82.52964, 35.585153],\n * [-82.560024, 35.585153]\n * ]], {\"fill\": \"#00f\"});\n *\n * var union = turf.union(poly1, poly2);\n *\n * //addToMap\n * var addToMap = [poly1, poly2, union];\n */\nfunction union(poly1, poly2, options) {\n if (options === void 0) { options = {}; }\n var geom1 = getGeom(poly1);\n var geom2 = getGeom(poly2);\n var unioned = polygonClipping.union(geom1.coordinates, geom2.coordinates);\n if (unioned.length === 0)\n return null;\n if (unioned.length === 1)\n return polygon(unioned[0], options.properties);\n else\n return multiPolygon(unioned, options.properties);\n}\nexport default union;\n","/**\n * @module helpers\n */\n/**\n * Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.\n *\n * @memberof helpers\n * @type {number}\n */\nexport var earthRadius = 6371008.8;\n/**\n * Unit of measurement factors using a spherical (non-ellipsoid) earth radius.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var factors = {\n centimeters: earthRadius * 100,\n centimetres: earthRadius * 100,\n degrees: earthRadius / 111325,\n feet: earthRadius * 3.28084,\n inches: earthRadius * 39.37,\n kilometers: earthRadius / 1000,\n kilometres: earthRadius / 1000,\n meters: earthRadius,\n metres: earthRadius,\n miles: earthRadius / 1609.344,\n millimeters: earthRadius * 1000,\n millimetres: earthRadius * 1000,\n nauticalmiles: earthRadius / 1852,\n radians: 1,\n yards: earthRadius * 1.0936,\n};\n/**\n * Units of measurement factors based on 1 meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var unitsFactors = {\n centimeters: 100,\n centimetres: 100,\n degrees: 1 / 111325,\n feet: 3.28084,\n inches: 39.37,\n kilometers: 1 / 1000,\n kilometres: 1 / 1000,\n meters: 1,\n metres: 1,\n miles: 1 / 1609.344,\n millimeters: 1000,\n millimetres: 1000,\n nauticalmiles: 1 / 1852,\n radians: 1 / earthRadius,\n yards: 1.0936133,\n};\n/**\n * Area of measurement factors based on 1 square meter.\n *\n * @memberof helpers\n * @type {Object}\n */\nexport var areaFactors = {\n acres: 0.000247105,\n centimeters: 10000,\n centimetres: 10000,\n feet: 10.763910417,\n hectares: 0.0001,\n inches: 1550.003100006,\n kilometers: 0.000001,\n kilometres: 0.000001,\n meters: 1,\n metres: 1,\n miles: 3.86e-7,\n millimeters: 1000000,\n millimetres: 1000000,\n yards: 1.195990046,\n};\n/**\n * Wraps a GeoJSON {@link Geometry} in a GeoJSON {@link Feature}.\n *\n * @name feature\n * @param {Geometry} geometry input geometry\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature} a GeoJSON Feature\n * @example\n * var geometry = {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 50]\n * };\n *\n * var feature = turf.feature(geometry);\n *\n * //=feature\n */\nexport function feature(geom, properties, options) {\n if (options === void 0) { options = {}; }\n var feat = { type: \"Feature\" };\n if (options.id === 0 || options.id) {\n feat.id = options.id;\n }\n if (options.bbox) {\n feat.bbox = options.bbox;\n }\n feat.properties = properties || {};\n feat.geometry = geom;\n return feat;\n}\n/**\n * Creates a GeoJSON {@link Geometry} from a Geometry string type & coordinates.\n * For GeometryCollection type use `helpers.geometryCollection`\n *\n * @name geometry\n * @param {string} type Geometry Type\n * @param {Array<any>} coordinates Coordinates\n * @param {Object} [options={}] Optional Parameters\n * @returns {Geometry} a GeoJSON Geometry\n * @example\n * var type = \"Point\";\n * var coordinates = [110, 50];\n * var geometry = turf.geometry(type, coordinates);\n * // => geometry\n */\nexport function geometry(type, coordinates, _options) {\n if (_options === void 0) { _options = {}; }\n switch (type) {\n case \"Point\":\n return point(coordinates).geometry;\n case \"LineString\":\n return lineString(coordinates).geometry;\n case \"Polygon\":\n return polygon(coordinates).geometry;\n case \"MultiPoint\":\n return multiPoint(coordinates).geometry;\n case \"MultiLineString\":\n return multiLineString(coordinates).geometry;\n case \"MultiPolygon\":\n return multiPolygon(coordinates).geometry;\n default:\n throw new Error(type + \" is invalid\");\n }\n}\n/**\n * Creates a {@link Point} {@link Feature} from a Position.\n *\n * @name point\n * @param {Array<number>} coordinates longitude, latitude position (each in decimal degrees)\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Point>} a Point feature\n * @example\n * var point = turf.point([-75.343, 39.984]);\n *\n * //=point\n */\nexport function point(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (!coordinates) {\n throw new Error(\"coordinates is required\");\n }\n if (!Array.isArray(coordinates)) {\n throw new Error(\"coordinates must be an Array\");\n }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be at least 2 numbers long\");\n }\n if (!isNumber(coordinates[0]) || !isNumber(coordinates[1])) {\n throw new Error(\"coordinates must contain numbers\");\n }\n var geom = {\n type: \"Point\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Point} {@link FeatureCollection} from an Array of Point coordinates.\n *\n * @name points\n * @param {Array<Array<number>>} coordinates an array of Points\n * @param {Object} [properties={}] Translate these properties to each Feature\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Point>} Point Feature\n * @example\n * var points = turf.points([\n * [-75, 39],\n * [-80, 45],\n * [-78, 50]\n * ]);\n *\n * //=points\n */\nexport function points(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return point(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link Polygon} {@link Feature} from an Array of LinearRings.\n *\n * @name polygon\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<Polygon>} Polygon Feature\n * @example\n * var polygon = turf.polygon([[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]], { name: 'poly1' });\n *\n * //=polygon\n */\nexport function polygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n for (var _i = 0, coordinates_1 = coordinates; _i < coordinates_1.length; _i++) {\n var ring = coordinates_1[_i];\n if (ring.length < 4) {\n throw new Error(\"Each LinearRing of a Polygon must have 4 or more Positions.\");\n }\n for (var j = 0; j < ring[ring.length - 1].length; j++) {\n // Check if first point of Polygon contains two numbers\n if (ring[ring.length - 1][j] !== ring[0][j]) {\n throw new Error(\"First and last Position are not equivalent.\");\n }\n }\n }\n var geom = {\n type: \"Polygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Polygon} {@link FeatureCollection} from an Array of Polygon coordinates.\n *\n * @name polygons\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygon coordinates\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<Polygon>} Polygon FeatureCollection\n * @example\n * var polygons = turf.polygons([\n * [[[-5, 52], [-4, 56], [-2, 51], [-7, 54], [-5, 52]]],\n * [[[-15, 42], [-14, 46], [-12, 41], [-17, 44], [-15, 42]]],\n * ]);\n *\n * //=polygons\n */\nexport function polygons(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return polygon(coords, properties);\n }), options);\n}\n/**\n * Creates a {@link LineString} {@link Feature} from an Array of Positions.\n *\n * @name lineString\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<LineString>} LineString Feature\n * @example\n * var linestring1 = turf.lineString([[-24, 63], [-23, 60], [-25, 65], [-20, 69]], {name: 'line 1'});\n * var linestring2 = turf.lineString([[-14, 43], [-13, 40], [-15, 45], [-10, 49]], {name: 'line 2'});\n *\n * //=linestring1\n * //=linestring2\n */\nexport function lineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n if (coordinates.length < 2) {\n throw new Error(\"coordinates must be an array of two or more positions\");\n }\n var geom = {\n type: \"LineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link LineString} {@link FeatureCollection} from an Array of LineString coordinates.\n *\n * @name lineStrings\n * @param {Array<Array<Array<number>>>} coordinates an array of LinearRings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north]\n * associated with the FeatureCollection\n * @param {string|number} [options.id] Identifier associated with the FeatureCollection\n * @returns {FeatureCollection<LineString>} LineString FeatureCollection\n * @example\n * var linestrings = turf.lineStrings([\n * [[-24, 63], [-23, 60], [-25, 65], [-20, 69]],\n * [[-14, 43], [-13, 40], [-15, 45], [-10, 49]]\n * ]);\n *\n * //=linestrings\n */\nexport function lineStrings(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n return featureCollection(coordinates.map(function (coords) {\n return lineString(coords, properties);\n }), options);\n}\n/**\n * Takes one or more {@link Feature|Features} and creates a {@link FeatureCollection}.\n *\n * @name featureCollection\n * @param {Feature[]} features input features\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {FeatureCollection} FeatureCollection of Features\n * @example\n * var locationA = turf.point([-75.343, 39.984], {name: 'Location A'});\n * var locationB = turf.point([-75.833, 39.284], {name: 'Location B'});\n * var locationC = turf.point([-75.534, 39.123], {name: 'Location C'});\n *\n * var collection = turf.featureCollection([\n * locationA,\n * locationB,\n * locationC\n * ]);\n *\n * //=collection\n */\nexport function featureCollection(features, options) {\n if (options === void 0) { options = {}; }\n var fc = { type: \"FeatureCollection\" };\n if (options.id) {\n fc.id = options.id;\n }\n if (options.bbox) {\n fc.bbox = options.bbox;\n }\n fc.features = features;\n return fc;\n}\n/**\n * Creates a {@link Feature<MultiLineString>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiLineString\n * @param {Array<Array<Array<number>>>} coordinates an array of LineStrings\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiLineString>} a MultiLineString feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiLine = turf.multiLineString([[[0,0],[10,10]]]);\n *\n * //=multiLine\n */\nexport function multiLineString(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiLineString\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPoint>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPoint\n * @param {Array<Array<number>>} coordinates an array of Positions\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPoint>} a MultiPoint feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPt = turf.multiPoint([[0,0],[10,10]]);\n *\n * //=multiPt\n */\nexport function multiPoint(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPoint\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<MultiPolygon>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name multiPolygon\n * @param {Array<Array<Array<Array<number>>>>} coordinates an array of Polygons\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<MultiPolygon>} a multipolygon feature\n * @throws {Error} if no coordinates are passed\n * @example\n * var multiPoly = turf.multiPolygon([[[[0,0],[0,10],[10,10],[10,0],[0,0]]]]);\n *\n * //=multiPoly\n *\n */\nexport function multiPolygon(coordinates, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"MultiPolygon\",\n coordinates: coordinates,\n };\n return feature(geom, properties, options);\n}\n/**\n * Creates a {@link Feature<GeometryCollection>} based on a\n * coordinate array. Properties can be added optionally.\n *\n * @name geometryCollection\n * @param {Array<Geometry>} geometries an array of GeoJSON Geometries\n * @param {Object} [properties={}] an Object of key-value pairs to add as properties\n * @param {Object} [options={}] Optional Parameters\n * @param {Array<number>} [options.bbox] Bounding Box Array [west, south, east, north] associated with the Feature\n * @param {string|number} [options.id] Identifier associated with the Feature\n * @returns {Feature<GeometryCollection>} a GeoJSON GeometryCollection Feature\n * @example\n * var pt = turf.geometry(\"Point\", [100, 0]);\n * var line = turf.geometry(\"LineString\", [[101, 0], [102, 1]]);\n * var collection = turf.geometryCollection([pt, line]);\n *\n * // => collection\n */\nexport function geometryCollection(geometries, properties, options) {\n if (options === void 0) { options = {}; }\n var geom = {\n type: \"GeometryCollection\",\n geometries: geometries,\n };\n return feature(geom, properties, options);\n}\n/**\n * Round number to precision\n *\n * @param {number} num Number\n * @param {number} [precision=0] Precision\n * @returns {number} rounded number\n * @example\n * turf.round(120.4321)\n * //=120\n *\n * turf.round(120.4321, 2)\n * //=120.43\n */\nexport function round(num, precision) {\n if (precision === void 0) { precision = 0; }\n if (precision && !(precision >= 0)) {\n throw new Error(\"precision must be a positive number\");\n }\n var multiplier = Math.pow(10, precision || 0);\n return Math.round(num * multiplier) / multiplier;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from radians to a more friendly unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name radiansToLength\n * @param {number} radians in radians across the sphere\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} distance\n */\nexport function radiansToLength(radians, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return radians * factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into radians\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @name lengthToRadians\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} radians\n */\nexport function lengthToRadians(distance, units) {\n if (units === void 0) { units = \"kilometers\"; }\n var factor = factors[units];\n if (!factor) {\n throw new Error(units + \" units is invalid\");\n }\n return distance / factor;\n}\n/**\n * Convert a distance measurement (assuming a spherical Earth) from a real-world unit into degrees\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, centimeters, kilometres, feet\n *\n * @name lengthToDegrees\n * @param {number} distance in real units\n * @param {string} [units=\"kilometers\"] can be degrees, radians, miles, inches, yards, metres,\n * meters, kilometres, kilometers.\n * @returns {number} degrees\n */\nexport function lengthToDegrees(distance, units) {\n return radiansToDegrees(lengthToRadians(distance, units));\n}\n/**\n * Converts any bearing angle from the north line direction (positive clockwise)\n * and returns an angle between 0-360 degrees (positive clockwise), 0 being the north line\n *\n * @name bearingToAzimuth\n * @param {number} bearing angle, between -180 and +180 degrees\n * @returns {number} angle between 0 and 360 degrees\n */\nexport function bearingToAzimuth(bearing) {\n var angle = bearing % 360;\n if (angle < 0) {\n angle += 360;\n }\n return angle;\n}\n/**\n * Converts an angle in radians to degrees\n *\n * @name radiansToDegrees\n * @param {number} radians angle in radians\n * @returns {number} degrees between 0 and 360 degrees\n */\nexport function radiansToDegrees(radians) {\n var degrees = radians % (2 * Math.PI);\n return (degrees * 180) / Math.PI;\n}\n/**\n * Converts an angle in degrees to radians\n *\n * @name degreesToRadians\n * @param {number} degrees angle between 0 and 360 degrees\n * @returns {number} angle in radians\n */\nexport function degreesToRadians(degrees) {\n var radians = degrees % 360;\n return (radians * Math.PI) / 180;\n}\n/**\n * Converts a length to the requested unit.\n * Valid units: miles, nauticalmiles, inches, yards, meters, metres, kilometers, centimeters, feet\n *\n * @param {number} length to be converted\n * @param {Units} [originalUnit=\"kilometers\"] of the length\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted length\n */\nexport function convertLength(length, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"kilometers\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(length >= 0)) {\n throw new Error(\"length must be a positive number\");\n }\n return radiansToLength(lengthToRadians(length, originalUnit), finalUnit);\n}\n/**\n * Converts a area to the requested unit.\n * Valid units: kilometers, kilometres, meters, metres, centimetres, millimeters, acres, miles, yards, feet, inches, hectares\n * @param {number} area to be converted\n * @param {Units} [originalUnit=\"meters\"] of the distance\n * @param {Units} [finalUnit=\"kilometers\"] returned unit\n * @returns {number} the converted area\n */\nexport function convertArea(area, originalUnit, finalUnit) {\n if (originalUnit === void 0) { originalUnit = \"meters\"; }\n if (finalUnit === void 0) { finalUnit = \"kilometers\"; }\n if (!(area >= 0)) {\n throw new Error(\"area must be a positive number\");\n }\n var startFactor = areaFactors[originalUnit];\n if (!startFactor) {\n throw new Error(\"invalid original units\");\n }\n var finalFactor = areaFactors[finalUnit];\n if (!finalFactor) {\n throw new Error(\"invalid final units\");\n }\n return (area / startFactor) * finalFactor;\n}\n/**\n * isNumber\n *\n * @param {*} num Number to validate\n * @returns {boolean} true/false\n * @example\n * turf.isNumber(123)\n * //=true\n * turf.isNumber('foo')\n * //=false\n */\nexport function isNumber(num) {\n return !isNaN(num) && num !== null && !Array.isArray(num);\n}\n/**\n * isObject\n *\n * @param {*} input variable to validate\n * @returns {boolean} true/false\n * @example\n * turf.isObject({elevation: 10})\n * //=true\n * turf.isObject('foo')\n * //=false\n */\nexport function isObject(input) {\n return !!input && input.constructor === Object;\n}\n/**\n * Validate BBox\n *\n * @private\n * @param {Array<number>} bbox BBox to validate\n * @returns {void}\n * @throws Error if BBox is not valid\n * @example\n * validateBBox([-180, -40, 110, 50])\n * //=OK\n * validateBBox([-180, -40])\n * //=Error\n * validateBBox('Foo')\n * //=Error\n * validateBBox(5)\n * //=Error\n * validateBBox(null)\n * //=Error\n * validateBBox(undefined)\n * //=Error\n */\nexport function validateBBox(bbox) {\n if (!bbox) {\n throw new Error(\"bbox is required\");\n }\n if (!Array.isArray(bbox)) {\n throw new Error(\"bbox must be an Array\");\n }\n if (bbox.length !== 4 && bbox.length !== 6) {\n throw new Error(\"bbox must be an Array of 4 or 6 numbers\");\n }\n bbox.forEach(function (num) {\n if (!isNumber(num)) {\n throw new Error(\"bbox must only contain numbers\");\n }\n });\n}\n/**\n * Validate Id\n *\n * @private\n * @param {string|number} id Id to validate\n * @returns {void}\n * @throws Error if Id is not valid\n * @example\n * validateId([-180, -40, 110, 50])\n * //=Error\n * validateId([-180, -40])\n * //=Error\n * validateId('Foo')\n * //=OK\n * validateId(5)\n * //=OK\n * validateId(null)\n * //=Error\n * validateId(undefined)\n * //=Error\n */\nexport function validateId(id) {\n if (!id) {\n throw new Error(\"id is required\");\n }\n if ([\"string\", \"number\"].indexOf(typeof id) === -1) {\n throw new Error(\"id must be a number or a string\");\n }\n}\n","import { isNumber, } from \"@turf/helpers\";\n/**\n * Unwrap a coordinate from a Point Feature, Geometry or a single coordinate.\n *\n * @name getCoord\n * @param {Array<number>|Geometry<Point>|Feature<Point>} coord GeoJSON Point or an Array of numbers\n * @returns {Array<number>} coordinates\n * @example\n * var pt = turf.point([10, 10]);\n *\n * var coord = turf.getCoord(pt);\n * //= [10, 10]\n */\nexport function getCoord(coord) {\n if (!coord) {\n throw new Error(\"coord is required\");\n }\n if (!Array.isArray(coord)) {\n if (coord.type === \"Feature\" &&\n coord.geometry !== null &&\n coord.geometry.type === \"Point\") {\n return coord.geometry.coordinates;\n }\n if (coord.type === \"Point\") {\n return coord.coordinates;\n }\n }\n if (Array.isArray(coord) &&\n coord.length >= 2 &&\n !Array.isArray(coord[0]) &&\n !Array.isArray(coord[1])) {\n return coord;\n }\n throw new Error(\"coord must be GeoJSON Point or an Array of numbers\");\n}\n/**\n * Unwrap coordinates from a Feature, Geometry Object or an Array\n *\n * @name getCoords\n * @param {Array<any>|Geometry|Feature} coords Feature, Geometry Object or an Array\n * @returns {Array<any>} coordinates\n * @example\n * var poly = turf.polygon([[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]);\n *\n * var coords = turf.getCoords(poly);\n * //= [[[119.32, -8.7], [119.55, -8.69], [119.51, -8.54], [119.32, -8.7]]]\n */\nexport function getCoords(coords) {\n if (Array.isArray(coords)) {\n return coords;\n }\n // Feature\n if (coords.type === \"Feature\") {\n if (coords.geometry !== null) {\n return coords.geometry.coordinates;\n }\n }\n else {\n // Geometry\n if (coords.coordinates) {\n return coords.coordinates;\n }\n }\n throw new Error(\"coords must be GeoJSON Feature, Geometry Object or an Array\");\n}\n/**\n * Checks if coordinates contains a number\n *\n * @name containsNumber\n * @param {Array<any>} coordinates GeoJSON Coordinates\n * @returns {boolean} true if Array contains a number\n */\nexport function containsNumber(coordinates) {\n if (coordinates.length > 1 &&\n isNumber(coordinates[0]) &&\n isNumber(coordinates[1])) {\n return true;\n }\n if (Array.isArray(coordinates[0]) && coordinates[0].length) {\n return containsNumber(coordinates[0]);\n }\n throw new Error(\"coordinates must only contain numbers\");\n}\n/**\n * Enforce expectations about types of GeoJSON objects for Turf.\n *\n * @name geojsonType\n * @param {GeoJSON} value any GeoJSON object\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function geojsonType(value, type, name) {\n if (!type || !name) {\n throw new Error(\"type and name required\");\n }\n if (!value || value.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n value.type);\n }\n}\n/**\n * Enforce expectations about types of {@link Feature} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name featureOf\n * @param {Feature} feature a feature with an expected geometry type\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} error if value is not the expected type.\n */\nexport function featureOf(feature, type, name) {\n if (!feature) {\n throw new Error(\"No feature passed\");\n }\n if (!name) {\n throw new Error(\".featureOf() requires a name\");\n }\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n}\n/**\n * Enforce expectations about types of {@link FeatureCollection} inputs for Turf.\n * Internally this uses {@link geojsonType} to judge geometry types.\n *\n * @name collectionOf\n * @param {FeatureCollection} featureCollection a FeatureCollection for which features will be judged\n * @param {string} type expected GeoJSON type\n * @param {string} name name of calling function\n * @throws {Error} if value is not the expected type.\n */\nexport function collectionOf(featureCollection, type, name) {\n if (!featureCollection) {\n throw new Error(\"No featureCollection passed\");\n }\n if (!name) {\n throw new Error(\".collectionOf() requires a name\");\n }\n if (!featureCollection || featureCollection.type !== \"FeatureCollection\") {\n throw new Error(\"Invalid input to \" + name + \", FeatureCollection required\");\n }\n for (var _i = 0, _a = featureCollection.features; _i < _a.length; _i++) {\n var feature = _a[_i];\n if (!feature || feature.type !== \"Feature\" || !feature.geometry) {\n throw new Error(\"Invalid input to \" + name + \", Feature with geometry required\");\n }\n if (!feature.geometry || feature.geometry.type !== type) {\n throw new Error(\"Invalid input to \" +\n name +\n \": must be a \" +\n type +\n \", given \" +\n feature.geometry.type);\n }\n }\n}\n/**\n * Get Geometry from Feature or Geometry Object\n *\n * @param {Feature|Geometry} geojson GeoJSON Feature or Geometry Object\n * @returns {Geometry|null} GeoJSON Geometry Object\n * @throws {Error} if geojson is not a Feature or Geometry Object\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getGeom(point)\n * //={\"type\": \"Point\", \"coordinates\": [110, 40]}\n */\nexport function getGeom(geojson) {\n if (geojson.type === \"Feature\") {\n return geojson.geometry;\n }\n return geojson;\n}\n/**\n * Get GeoJSON object's type, Geometry type is prioritize.\n *\n * @param {GeoJSON} geojson GeoJSON object\n * @param {string} [name=\"geojson\"] name of the variable to display in error message (unused)\n * @returns {string} GeoJSON type\n * @example\n * var point = {\n * \"type\": \"Feature\",\n * \"properties\": {},\n * \"geometry\": {\n * \"type\": \"Point\",\n * \"coordinates\": [110, 40]\n * }\n * }\n * var geom = turf.getType(point)\n * //=\"Point\"\n */\nexport function getType(geojson, _name) {\n if (geojson.type === \"FeatureCollection\") {\n return \"FeatureCollection\";\n }\n if (geojson.type === \"GeometryCollection\") {\n return \"GeometryCollection\";\n }\n if (geojson.type === \"Feature\" && geojson.geometry !== null) {\n return geojson.geometry.type;\n }\n return geojson.type;\n}\n","import { multiPolygon, polygon, } from \"@turf/helpers\";\nimport { getGeom } from \"@turf/invariant\";\nimport polygonClipping from \"polygon-clipping\";\n/**\n * Takes two {@link Polygon|polygon} or {@link MultiPolygon|multi-polygon} geometries and\n * finds their polygonal intersection. If they don't intersect, returns null.\n *\n * @name intersect\n * @param {Feature<Polygon | MultiPolygon>} poly1 the first polygon or multipolygon\n * @param {Feature<Polygon | MultiPolygon>} poly2 the second polygon or multipolygon\n * @param {Object} [options={}] Optional Parameters\n * @param {Object} [options.properties={}] Translate GeoJSON Properties to Feature\n * @returns {Feature|null} returns a feature representing the area they share (either a {@link Polygon} or\n * {@link MultiPolygon}). If they do not share any area, returns `null`.\n * @example\n * var poly1 = turf.polygon([[\n * [-122.801742, 45.48565],\n * [-122.801742, 45.60491],\n * [-122.584762, 45.60491],\n * [-122.584762, 45.48565],\n * [-122.801742, 45.48565]\n * ]]);\n *\n * var poly2 = turf.polygon([[\n * [-122.520217, 45.535693],\n * [-122.64038, 45.553967],\n * [-122.720031, 45.526554],\n * [-122.669906, 45.507309],\n * [-122.723464, 45.446643],\n * [-122.532577, 45.408574],\n * [-122.487258, 45.477466],\n * [-122.520217, 45.535693]\n * ]]);\n *\n * var intersection = turf.intersect(poly1, poly2);\n *\n * //addToMap\n * var addToMap = [poly1, poly2, intersection];\n */\nexport default function intersect(poly1, poly2, options) {\n if (options === void 0) { options = {}; }\n var geom1 = getGeom(poly1);\n var geom2 = getGeom(poly2);\n var intersection = polygonClipping.intersection(geom1.coordinates, geom2.coordinates);\n if (intersection.length === 0)\n return null;\n if (intersection.length === 1)\n return polygon(intersection[0], options.properties);\n return multiPolygon(intersection, options.properties);\n}\n","import { feature, lineString, isObject, point } from '@turf/helpers';\n\n/**\n * Callback for coordEach\n *\n * @callback coordEachCallback\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Iterate over coordinates in any GeoJSON object, similar to Array.forEach()\n *\n * @name coordEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentCoord, coordIndex, featureIndex, multiFeatureIndex)\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordEach(features, function (currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction coordEach(geojson, callback, excludeWrapCoord) {\n // Handles null Geometry -- Skips this GeoJSON\n if (geojson === null) return;\n var j,\n k,\n l,\n geometry,\n stopG,\n coords,\n geometryMaybeCollection,\n wrapShrink = 0,\n coordIndex = 0,\n isGeometryCollection,\n type = geojson.type,\n isFeatureCollection = type === \"FeatureCollection\",\n isFeature = type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (var featureIndex = 0; featureIndex < stop; featureIndex++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[featureIndex].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (var geomIndex = 0; geomIndex < stopG; geomIndex++) {\n var multiFeatureIndex = 0;\n var geometryIndex = 0;\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[geomIndex]\n : geometryMaybeCollection;\n\n // Handles null Geometry -- Skips this geometry\n if (geometry === null) continue;\n coords = geometry.coordinates;\n var geomType = geometry.type;\n\n wrapShrink =\n excludeWrapCoord &&\n (geomType === \"Polygon\" || geomType === \"MultiPolygon\")\n ? 1\n : 0;\n\n switch (geomType) {\n case null:\n break;\n case \"Point\":\n if (\n callback(\n coords,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n multiFeatureIndex++;\n break;\n case \"LineString\":\n case \"MultiPoint\":\n for (j = 0; j < coords.length; j++) {\n if (\n callback(\n coords[j],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n if (geomType === \"MultiPoint\") multiFeatureIndex++;\n }\n if (geomType === \"LineString\") multiFeatureIndex++;\n break;\n case \"Polygon\":\n case \"MultiLineString\":\n for (j = 0; j < coords.length; j++) {\n for (k = 0; k < coords[j].length - wrapShrink; k++) {\n if (\n callback(\n coords[j][k],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n if (geomType === \"MultiLineString\") multiFeatureIndex++;\n if (geomType === \"Polygon\") geometryIndex++;\n }\n if (geomType === \"Polygon\") multiFeatureIndex++;\n break;\n case \"MultiPolygon\":\n for (j = 0; j < coords.length; j++) {\n geometryIndex = 0;\n for (k = 0; k < coords[j].length; k++) {\n for (l = 0; l < coords[j][k].length - wrapShrink; l++) {\n if (\n callback(\n coords[j][k][l],\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n coordIndex++;\n }\n geometryIndex++;\n }\n multiFeatureIndex++;\n }\n break;\n case \"GeometryCollection\":\n for (j = 0; j < geometry.geometries.length; j++)\n if (\n coordEach(geometry.geometries[j], callback, excludeWrapCoord) ===\n false\n )\n return false;\n break;\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n }\n}\n\n/**\n * Callback for coordReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback coordReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Array<number>} currentCoord The current coordinate being processed.\n * @param {number} coordIndex The current index of the coordinate being processed.\n * Starts at index 0, if an initialValue is provided, and at index 1 otherwise.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n */\n\n/**\n * Reduce coordinates in any GeoJSON object, similar to Array.reduce()\n *\n * @name coordReduce\n * @param {FeatureCollection|Geometry|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentCoord, coordIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @param {boolean} [excludeWrapCoord=false] whether or not to include the final coordinate of LinearRings that wraps the ring in its iteration.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.coordReduce(features, function (previousValue, currentCoord, coordIndex, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentCoord\n * //=coordIndex\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentCoord;\n * });\n */\nfunction coordReduce(geojson, callback, initialValue, excludeWrapCoord) {\n var previousValue = initialValue;\n coordEach(\n geojson,\n function (\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) {\n if (coordIndex === 0 && initialValue === undefined)\n previousValue = currentCoord;\n else\n previousValue = callback(\n previousValue,\n currentCoord,\n coordIndex,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n },\n excludeWrapCoord\n );\n return previousValue;\n}\n\n/**\n * Callback for propEach\n *\n * @callback propEachCallback\n * @param {Object} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over properties in any GeoJSON object, similar to Array.forEach()\n *\n * @name propEach\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentProperties, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propEach(features, function (currentProperties, featureIndex) {\n * //=currentProperties\n * //=featureIndex\n * });\n */\nfunction propEach(geojson, callback) {\n var i;\n switch (geojson.type) {\n case \"FeatureCollection\":\n for (i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i].properties, i) === false) break;\n }\n break;\n case \"Feature\":\n callback(geojson.properties, 0);\n break;\n }\n}\n\n/**\n * Callback for propReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback propReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {*} currentProperties The current Properties being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce properties in any GeoJSON object into a single value,\n * similar to how Array.reduce works. However, in this case we lazily run\n * the reduction, so an array of all properties is unnecessary.\n *\n * @name propReduce\n * @param {FeatureCollection|Feature} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentProperties, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.propReduce(features, function (previousValue, currentProperties, featureIndex) {\n * //=previousValue\n * //=currentProperties\n * //=featureIndex\n * return currentProperties\n * });\n */\nfunction propReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n propEach(geojson, function (currentProperties, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentProperties;\n else\n previousValue = callback(previousValue, currentProperties, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Callback for featureEach\n *\n * @callback featureEachCallback\n * @param {Feature<any>} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Iterate over features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name featureEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.featureEach(features, function (currentFeature, featureIndex) {\n * //=currentFeature\n * //=featureIndex\n * });\n */\nfunction featureEach(geojson, callback) {\n if (geojson.type === \"Feature\") {\n callback(geojson, 0);\n } else if (geojson.type === \"FeatureCollection\") {\n for (var i = 0; i < geojson.features.length; i++) {\n if (callback(geojson.features[i], i) === false) break;\n }\n }\n}\n\n/**\n * Callback for featureReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback featureReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name featureReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {\"foo\": \"bar\"}),\n * turf.point([36, 53], {\"hello\": \"world\"})\n * ]);\n *\n * turf.featureReduce(features, function (previousValue, currentFeature, featureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * return currentFeature\n * });\n */\nfunction featureReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n featureEach(geojson, function (currentFeature, featureIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentFeature;\n else previousValue = callback(previousValue, currentFeature, featureIndex);\n });\n return previousValue;\n}\n\n/**\n * Get all coordinates from any GeoJSON object.\n *\n * @name coordAll\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @returns {Array<Array<number>>} coordinate position array\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * var coords = turf.coordAll(features);\n * //= [[26, 37], [36, 53]]\n */\nfunction coordAll(geojson) {\n var coords = [];\n coordEach(geojson, function (coord) {\n coords.push(coord);\n });\n return coords;\n}\n\n/**\n * Callback for geomEach\n *\n * @callback geomEachCallback\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Iterate over each geometry in any GeoJSON object, similar to Array.forEach()\n *\n * @name geomEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @returns {void}\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomEach(features, function (currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * });\n */\nfunction geomEach(geojson, callback) {\n var i,\n j,\n g,\n geometry,\n stopG,\n geometryMaybeCollection,\n isGeometryCollection,\n featureProperties,\n featureBBox,\n featureId,\n featureIndex = 0,\n isFeatureCollection = geojson.type === \"FeatureCollection\",\n isFeature = geojson.type === \"Feature\",\n stop = isFeatureCollection ? geojson.features.length : 1;\n\n // This logic may look a little weird. The reason why it is that way\n // is because it's trying to be fast. GeoJSON supports multiple kinds\n // of objects at its root: FeatureCollection, Features, Geometries.\n // This function has the responsibility of handling all of them, and that\n // means that some of the `for` loops you see below actually just don't apply\n // to certain inputs. For instance, if you give this just a\n // Point geometry, then both loops are short-circuited and all we do\n // is gradually rename the input until it's called 'geometry'.\n //\n // This also aims to allocate as few resources as possible: just a\n // few numbers and booleans, rather than any temporary arrays as would\n // be required with the normalization approach.\n for (i = 0; i < stop; i++) {\n geometryMaybeCollection = isFeatureCollection\n ? geojson.features[i].geometry\n : isFeature\n ? geojson.geometry\n : geojson;\n featureProperties = isFeatureCollection\n ? geojson.features[i].properties\n : isFeature\n ? geojson.properties\n : {};\n featureBBox = isFeatureCollection\n ? geojson.features[i].bbox\n : isFeature\n ? geojson.bbox\n : undefined;\n featureId = isFeatureCollection\n ? geojson.features[i].id\n : isFeature\n ? geojson.id\n : undefined;\n isGeometryCollection = geometryMaybeCollection\n ? geometryMaybeCollection.type === \"GeometryCollection\"\n : false;\n stopG = isGeometryCollection\n ? geometryMaybeCollection.geometries.length\n : 1;\n\n for (g = 0; g < stopG; g++) {\n geometry = isGeometryCollection\n ? geometryMaybeCollection.geometries[g]\n : geometryMaybeCollection;\n\n // Handle null Geometry\n if (geometry === null) {\n if (\n callback(\n null,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n continue;\n }\n switch (geometry.type) {\n case \"Point\":\n case \"LineString\":\n case \"MultiPoint\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\": {\n if (\n callback(\n geometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n break;\n }\n case \"GeometryCollection\": {\n for (j = 0; j < geometry.geometries.length; j++) {\n if (\n callback(\n geometry.geometries[j],\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) === false\n )\n return false;\n }\n break;\n }\n default:\n throw new Error(\"Unknown Geometry Type\");\n }\n }\n // Only increase `featureIndex` per each feature\n featureIndex++;\n }\n}\n\n/**\n * Callback for geomReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback geomReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Geometry} currentGeometry The current Geometry being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {Object} featureProperties The current Feature Properties being processed.\n * @param {Array<number>} featureBBox The current Feature BBox being processed.\n * @param {number|string} featureId The current Feature Id being processed.\n */\n\n/**\n * Reduce geometry in any GeoJSON object, similar to Array.reduce().\n *\n * @name geomReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.point([36, 53], {hello: 'world'})\n * ]);\n *\n * turf.geomReduce(features, function (previousValue, currentGeometry, featureIndex, featureProperties, featureBBox, featureId) {\n * //=previousValue\n * //=currentGeometry\n * //=featureIndex\n * //=featureProperties\n * //=featureBBox\n * //=featureId\n * return currentGeometry\n * });\n */\nfunction geomReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n geomEach(\n geojson,\n function (\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n ) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentGeometry;\n else\n previousValue = callback(\n previousValue,\n currentGeometry,\n featureIndex,\n featureProperties,\n featureBBox,\n featureId\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for flattenEach\n *\n * @callback flattenEachCallback\n * @param {Feature} currentFeature The current flattened feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Iterate over flattened features in any GeoJSON object, similar to\n * Array.forEach.\n *\n * @name flattenEach\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (currentFeature, featureIndex, multiFeatureIndex)\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenEach(features, function (currentFeature, featureIndex, multiFeatureIndex) {\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * });\n */\nfunction flattenEach(geojson, callback) {\n geomEach(geojson, function (geometry, featureIndex, properties, bbox, id) {\n // Callback for single geometry\n var type = geometry === null ? null : geometry.type;\n switch (type) {\n case null:\n case \"Point\":\n case \"LineString\":\n case \"Polygon\":\n if (\n callback(\n feature(geometry, properties, { bbox: bbox, id: id }),\n featureIndex,\n 0\n ) === false\n )\n return false;\n return;\n }\n\n var geomType;\n\n // Callback for multi-geometry\n switch (type) {\n case \"MultiPoint\":\n geomType = \"Point\";\n break;\n case \"MultiLineString\":\n geomType = \"LineString\";\n break;\n case \"MultiPolygon\":\n geomType = \"Polygon\";\n break;\n }\n\n for (\n var multiFeatureIndex = 0;\n multiFeatureIndex < geometry.coordinates.length;\n multiFeatureIndex++\n ) {\n var coordinate = geometry.coordinates[multiFeatureIndex];\n var geom = {\n type: geomType,\n coordinates: coordinate,\n };\n if (\n callback(feature(geom, properties), featureIndex, multiFeatureIndex) ===\n false\n )\n return false;\n }\n });\n}\n\n/**\n * Callback for flattenReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback flattenReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature} currentFeature The current Feature being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n */\n\n/**\n * Reduce flattened features in any GeoJSON object, similar to Array.reduce().\n *\n * @name flattenReduce\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON object\n * @param {Function} callback a method that takes (previousValue, currentFeature, featureIndex, multiFeatureIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var features = turf.featureCollection([\n * turf.point([26, 37], {foo: 'bar'}),\n * turf.multiPoint([[40, 30], [36, 53]], {hello: 'world'})\n * ]);\n *\n * turf.flattenReduce(features, function (previousValue, currentFeature, featureIndex, multiFeatureIndex) {\n * //=previousValue\n * //=currentFeature\n * //=featureIndex\n * //=multiFeatureIndex\n * return currentFeature\n * });\n */\nfunction flattenReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n flattenEach(\n geojson,\n function (currentFeature, featureIndex, multiFeatureIndex) {\n if (\n featureIndex === 0 &&\n multiFeatureIndex === 0 &&\n initialValue === undefined\n )\n previousValue = currentFeature;\n else\n previousValue = callback(\n previousValue,\n currentFeature,\n featureIndex,\n multiFeatureIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for segmentEach\n *\n * @callback segmentEachCallback\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n * @returns {void}\n */\n\n/**\n * Iterate over 2-vertex line segment in any GeoJSON object, similar to Array.forEach()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex)\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentEach(polygon, function (currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //=currentSegment\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * //=segmentIndex\n * });\n *\n * // Calculate the total number of segments\n * var total = 0;\n * turf.segmentEach(polygon, function () {\n * total++;\n * });\n */\nfunction segmentEach(geojson, callback) {\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n var segmentIndex = 0;\n\n // Exclude null Geometries\n if (!feature.geometry) return;\n // (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n var type = feature.geometry.type;\n if (type === \"Point\" || type === \"MultiPoint\") return;\n\n // Generate 2-vertex line segments\n var previousCoords;\n var previousFeatureIndex = 0;\n var previousMultiIndex = 0;\n var prevGeomIndex = 0;\n if (\n coordEach(\n feature,\n function (\n currentCoord,\n coordIndex,\n featureIndexCoord,\n multiPartIndexCoord,\n geometryIndex\n ) {\n // Simulating a meta.coordReduce() since `reduce` operations cannot be stopped by returning `false`\n if (\n previousCoords === undefined ||\n featureIndex > previousFeatureIndex ||\n multiPartIndexCoord > previousMultiIndex ||\n geometryIndex > prevGeomIndex\n ) {\n previousCoords = currentCoord;\n previousFeatureIndex = featureIndex;\n previousMultiIndex = multiPartIndexCoord;\n prevGeomIndex = geometryIndex;\n segmentIndex = 0;\n return;\n }\n var currentSegment = lineString(\n [previousCoords, currentCoord],\n feature.properties\n );\n if (\n callback(\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) === false\n )\n return false;\n segmentIndex++;\n previousCoords = currentCoord;\n }\n ) === false\n )\n return false;\n });\n}\n\n/**\n * Callback for segmentReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback segmentReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentSegment The current Segment being processed.\n * @param {number} featureIndex The current index of the Feature being processed.\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed.\n * @param {number} geometryIndex The current index of the Geometry being processed.\n * @param {number} segmentIndex The current index of the Segment being processed.\n */\n\n/**\n * Reduce 2-vertex line segment in any GeoJSON object, similar to Array.reduce()\n * (Multi)Point geometries do not contain segments therefore they are ignored during this operation.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson any GeoJSON\n * @param {Function} callback a method that takes (previousValue, currentSegment, currentIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {void}\n * @example\n * var polygon = turf.polygon([[[-50, 5], [-40, -10], [-50, -10], [-40, 5], [-50, 5]]]);\n *\n * // Iterate over GeoJSON by 2-vertex segments\n * turf.segmentReduce(polygon, function (previousSegment, currentSegment, featureIndex, multiFeatureIndex, geometryIndex, segmentIndex) {\n * //= previousSegment\n * //= currentSegment\n * //= featureIndex\n * //= multiFeatureIndex\n * //= geometryIndex\n * //= segmentIndex\n * return currentSegment\n * });\n *\n * // Calculate the total number of segments\n * var initialValue = 0\n * var total = turf.segmentReduce(polygon, function (previousValue) {\n * previousValue++;\n * return previousValue;\n * }, initialValue);\n */\nfunction segmentReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n var started = false;\n segmentEach(\n geojson,\n function (\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n ) {\n if (started === false && initialValue === undefined)\n previousValue = currentSegment;\n else\n previousValue = callback(\n previousValue,\n currentSegment,\n featureIndex,\n multiFeatureIndex,\n geometryIndex,\n segmentIndex\n );\n started = true;\n }\n );\n return previousValue;\n}\n\n/**\n * Callback for lineEach\n *\n * @callback lineEachCallback\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Iterate over line or ring coordinates in LineString, Polygon, MultiLineString, MultiPolygon Features or Geometries,\n * similar to Array.forEach.\n *\n * @name lineEach\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @example\n * var multiLine = turf.multiLineString([\n * [[26, 37], [35, 45]],\n * [[36, 53], [38, 50], [41, 55]]\n * ]);\n *\n * turf.lineEach(multiLine, function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * });\n */\nfunction lineEach(geojson, callback) {\n // validation\n if (!geojson) throw new Error(\"geojson is required\");\n\n flattenEach(geojson, function (feature, featureIndex, multiFeatureIndex) {\n if (feature.geometry === null) return;\n var type = feature.geometry.type;\n var coords = feature.geometry.coordinates;\n switch (type) {\n case \"LineString\":\n if (callback(feature, featureIndex, multiFeatureIndex, 0, 0) === false)\n return false;\n break;\n case \"Polygon\":\n for (\n var geometryIndex = 0;\n geometryIndex < coords.length;\n geometryIndex++\n ) {\n if (\n callback(\n lineString(coords[geometryIndex], feature.properties),\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n ) === false\n )\n return false;\n }\n break;\n }\n });\n}\n\n/**\n * Callback for lineReduce\n *\n * The first time the callback function is called, the values provided as arguments depend\n * on whether the reduce method has an initialValue argument.\n *\n * If an initialValue is provided to the reduce method:\n * - The previousValue argument is initialValue.\n * - The currentValue argument is the value of the first element present in the array.\n *\n * If an initialValue is not provided:\n * - The previousValue argument is the value of the first element present in the array.\n * - The currentValue argument is the value of the second element present in the array.\n *\n * @callback lineReduceCallback\n * @param {*} previousValue The accumulated value previously returned in the last invocation\n * of the callback, or initialValue, if supplied.\n * @param {Feature<LineString>} currentLine The current LineString|LinearRing being processed.\n * @param {number} featureIndex The current index of the Feature being processed\n * @param {number} multiFeatureIndex The current index of the Multi-Feature being processed\n * @param {number} geometryIndex The current index of the Geometry being processed\n */\n\n/**\n * Reduce features in any GeoJSON object, similar to Array.reduce().\n *\n * @name lineReduce\n * @param {Geometry|Feature<LineString|Polygon|MultiLineString|MultiPolygon>} geojson object\n * @param {Function} callback a method that takes (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex)\n * @param {*} [initialValue] Value to use as the first argument to the first call of the callback.\n * @returns {*} The value that results from the reduction.\n * @example\n * var multiPoly = turf.multiPolygon([\n * turf.polygon([[[12,48],[2,41],[24,38],[12,48]], [[9,44],[13,41],[13,45],[9,44]]]),\n * turf.polygon([[[5, 5], [0, 0], [2, 2], [4, 4], [5, 5]]])\n * ]);\n *\n * turf.lineReduce(multiPoly, function (previousValue, currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n * //=previousValue\n * //=currentLine\n * //=featureIndex\n * //=multiFeatureIndex\n * //=geometryIndex\n * return currentLine\n * });\n */\nfunction lineReduce(geojson, callback, initialValue) {\n var previousValue = initialValue;\n lineEach(\n geojson,\n function (currentLine, featureIndex, multiFeatureIndex, geometryIndex) {\n if (featureIndex === 0 && initialValue === undefined)\n previousValue = currentLine;\n else\n previousValue = callback(\n previousValue,\n currentLine,\n featureIndex,\n multiFeatureIndex,\n geometryIndex\n );\n }\n );\n return previousValue;\n}\n\n/**\n * Finds a particular 2-vertex LineString Segment from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n * Point & MultiPoint will always return null.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.segmentIndex=0] Segment Index\n * @param {Object} [options.properties={}] Translate Properties to output LineString\n * @param {BBox} [options.bbox={}] Translate BBox to output LineString\n * @param {number|string} [options.id={}] Translate Id to output LineString\n * @returns {Feature<LineString>} 2-vertex GeoJSON Feature LineString\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findSegment(multiLine);\n * // => Feature<LineString<[[10, 10], [50, 30]]>>\n *\n * // First Segment of 2nd Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: 1});\n * // => Feature<LineString<[[-10, -10], [-50, -30]]>>\n *\n * // Last Segment of Last Multi Feature\n * turf.findSegment(multiLine, {multiFeatureIndex: -1, segmentIndex: -1});\n * // => Feature<LineString<[[-50, -30], [-30, -40]]>>\n */\nfunction findSegment(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var segmentIndex = options.segmentIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find SegmentIndex\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n if (segmentIndex < 0) segmentIndex = coords.length + segmentIndex - 1;\n return lineString(\n [coords[segmentIndex], coords[segmentIndex + 1]],\n properties,\n options\n );\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[geometryIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[geometryIndex][segmentIndex],\n coords[geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (segmentIndex < 0)\n segmentIndex = coords[multiFeatureIndex].length + segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][segmentIndex],\n coords[multiFeatureIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (segmentIndex < 0)\n segmentIndex =\n coords[multiFeatureIndex][geometryIndex].length - segmentIndex - 1;\n return lineString(\n [\n coords[multiFeatureIndex][geometryIndex][segmentIndex],\n coords[multiFeatureIndex][geometryIndex][segmentIndex + 1],\n ],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\n/**\n * Finds a particular Point from a GeoJSON using `@turf/meta` indexes.\n *\n * Negative indexes are permitted.\n *\n * @param {FeatureCollection|Feature|Geometry} geojson Any GeoJSON Feature or Geometry\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.featureIndex=0] Feature Index\n * @param {number} [options.multiFeatureIndex=0] Multi-Feature Index\n * @param {number} [options.geometryIndex=0] Geometry Index\n * @param {number} [options.coordIndex=0] Coord Index\n * @param {Object} [options.properties={}] Translate Properties to output Point\n * @param {BBox} [options.bbox={}] Translate BBox to output Point\n * @param {number|string} [options.id={}] Translate Id to output Point\n * @returns {Feature<Point>} 2-vertex GeoJSON Feature Point\n * @example\n * var multiLine = turf.multiLineString([\n * [[10, 10], [50, 30], [30, 40]],\n * [[-10, -10], [-50, -30], [-30, -40]]\n * ]);\n *\n * // First Segment (defaults are 0)\n * turf.findPoint(multiLine);\n * // => Feature<Point<[10, 10]>>\n *\n * // First Segment of the 2nd Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: 1});\n * // => Feature<Point<[-10, -10]>>\n *\n * // Last Segment of last Multi-Feature\n * turf.findPoint(multiLine, {multiFeatureIndex: -1, coordIndex: -1});\n * // => Feature<Point<[-30, -40]>>\n */\nfunction findPoint(geojson, options) {\n // Optional Parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var featureIndex = options.featureIndex || 0;\n var multiFeatureIndex = options.multiFeatureIndex || 0;\n var geometryIndex = options.geometryIndex || 0;\n var coordIndex = options.coordIndex || 0;\n\n // Find FeatureIndex\n var properties = options.properties;\n var geometry;\n\n switch (geojson.type) {\n case \"FeatureCollection\":\n if (featureIndex < 0)\n featureIndex = geojson.features.length + featureIndex;\n properties = properties || geojson.features[featureIndex].properties;\n geometry = geojson.features[featureIndex].geometry;\n break;\n case \"Feature\":\n properties = properties || geojson.properties;\n geometry = geojson.geometry;\n break;\n case \"Point\":\n case \"MultiPoint\":\n return null;\n case \"LineString\":\n case \"Polygon\":\n case \"MultiLineString\":\n case \"MultiPolygon\":\n geometry = geojson;\n break;\n default:\n throw new Error(\"geojson is invalid\");\n }\n\n // Find Coord Index\n if (geometry === null) return null;\n var coords = geometry.coordinates;\n switch (geometry.type) {\n case \"Point\":\n return point(coords, properties, options);\n case \"MultiPoint\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n return point(coords[multiFeatureIndex], properties, options);\n case \"LineString\":\n if (coordIndex < 0) coordIndex = coords.length + coordIndex;\n return point(coords[coordIndex], properties, options);\n case \"Polygon\":\n if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;\n if (coordIndex < 0)\n coordIndex = coords[geometryIndex].length + coordIndex;\n return point(coords[geometryIndex][coordIndex], properties, options);\n case \"MultiLineString\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (coordIndex < 0)\n coordIndex = coords[multiFeatureIndex].length + coordIndex;\n return point(coords[multiFeatureIndex][coordIndex], properties, options);\n case \"MultiPolygon\":\n if (multiFeatureIndex < 0)\n multiFeatureIndex = coords.length + multiFeatureIndex;\n if (geometryIndex < 0)\n geometryIndex = coords[multiFeatureIndex].length + geometryIndex;\n if (coordIndex < 0)\n coordIndex =\n coords[multiFeatureIndex][geometryIndex].length - coordIndex;\n return point(\n coords[multiFeatureIndex][geometryIndex][coordIndex],\n properties,\n options\n );\n }\n throw new Error(\"geojson is invalid\");\n}\n\nexport { coordAll, coordEach, coordReduce, featureEach, featureReduce, findPoint, findSegment, flattenEach, flattenReduce, geomEach, geomReduce, lineEach, lineReduce, propEach, propReduce, segmentEach, segmentReduce };\n","import { geomReduce } from \"@turf/meta\";\n// Note: change RADIUS => earthRadius\nvar RADIUS = 6378137;\n/**\n * Takes one or more features and returns their area in square meters.\n *\n * @name area\n * @param {GeoJSON} geojson input GeoJSON feature(s)\n * @returns {number} area in square meters\n * @example\n * var polygon = turf.polygon([[[125, -15], [113, -22], [154, -27], [144, -15], [125, -15]]]);\n *\n * var area = turf.area(polygon);\n *\n * //addToMap\n * var addToMap = [polygon]\n * polygon.properties.area = area\n */\nexport default function area(geojson) {\n return geomReduce(geojson, function (value, geom) {\n return value + calculateArea(geom);\n }, 0);\n}\n/**\n * Calculate Area\n *\n * @private\n * @param {Geometry} geom GeoJSON Geometries\n * @returns {number} area\n */\nfunction calculateArea(geom) {\n var total = 0;\n var i;\n switch (geom.type) {\n case \"Polygon\":\n return polygonArea(geom.coordinates);\n case \"MultiPolygon\":\n for (i = 0; i < geom.coordinates.length; i++) {\n total += polygonArea(geom.coordinates[i]);\n }\n return total;\n case \"Point\":\n case \"MultiPoint\":\n case \"LineString\":\n case \"MultiLineString\":\n return 0;\n }\n return 0;\n}\nfunction polygonArea(coords) {\n var total = 0;\n if (coords && coords.length > 0) {\n total += Math.abs(ringArea(coords[0]));\n for (var i = 1; i < coords.length; i++) {\n total -= Math.abs(ringArea(coords[i]));\n }\n }\n return total;\n}\n/**\n * @private\n * Calculate the approximate area of the polygon were it projected onto the earth.\n * Note that this area will be positive if ring is oriented clockwise, otherwise it will be negative.\n *\n * Reference:\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for Polygons on a Sphere\",\n * JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007 https://trs.jpl.nasa.gov/handle/2014/40409\n *\n * @param {Array<Array<number>>} coords Ring Coordinates\n * @returns {number} The approximate signed geodesic area of the polygon in square meters.\n */\nfunction ringArea(coords) {\n var p1;\n var p2;\n var p3;\n var lowerIndex;\n var middleIndex;\n var upperIndex;\n var i;\n var total = 0;\n var coordsLength = coords.length;\n if (coordsLength > 2) {\n for (i = 0; i < coordsLength; i++) {\n if (i === coordsLength - 2) {\n // i = N-2\n lowerIndex = coordsLength - 2;\n middleIndex = coordsLength - 1;\n upperIndex = 0;\n }\n else if (i === coordsLength - 1) {\n // i = N-1\n lowerIndex = coordsLength - 1;\n middleIndex = 0;\n upperIndex = 1;\n }\n else {\n // i = 0 to N-3\n lowerIndex = i;\n middleIndex = i + 1;\n upperIndex = i + 2;\n }\n p1 = coords[lowerIndex];\n p2 = coords[middleIndex];\n p3 = coords[upperIndex];\n total += (rad(p3[0]) - rad(p1[0])) * Math.sin(rad(p2[1]));\n }\n total = (total * RADIUS * RADIUS) / 2;\n }\n return total;\n}\nfunction rad(num) {\n return (num * Math.PI) / 180;\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport function isPlainObject(item) {\n return item && _typeof(item) === 'object' && item.constructor === Object;\n}\nexport default function deepmerge(target, source) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n clone: true\n };\n var output = options.clone ? _extends({}, target) : target;\n\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(function (key) {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n\n if (isPlainObject(source[key]) && key in target) {\n output[key] = deepmerge(target[key], source[key], options);\n } else {\n output[key] = source[key];\n }\n });\n }\n\n return output;\n}","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nconst DEFAULT_HIGHLIGHT_COLOR = new Uint8Array([0, 255, 255, 255]);\n\nconst DEFAULT_MODULE_OPTIONS = {\n pickingSelectedColor: null, // Set to a picking color to visually highlight that item\n pickingHighlightColor: DEFAULT_HIGHLIGHT_COLOR, // Color of visual highlight of \"selected\" item\n pickingActive: false, // Set to true when rendering to off-screen \"picking\" buffer\n pickingAttribute: false // Set to true when picking an attribute value instead of object index\n};\n\n/* eslint-disable camelcase */\nfunction getUniforms(opts = DEFAULT_MODULE_OPTIONS) {\n const uniforms = {};\n if (opts.pickingSelectedColor !== undefined) {\n if (!opts.pickingSelectedColor) {\n uniforms.picking_uSelectedColorValid = 0;\n } else {\n const selectedColor = opts.pickingSelectedColor.slice(0, 3);\n uniforms.picking_uSelectedColorValid = 1;\n uniforms.picking_uSelectedColor = selectedColor;\n }\n }\n if (opts.pickingHighlightColor) {\n const color = Array.from(opts.pickingHighlightColor, x => x / 255);\n if (!Number.isFinite(color[3])) {\n color[3] = 1;\n }\n uniforms.picking_uHighlightColor = color;\n }\n if (opts.pickingActive !== undefined) {\n uniforms.picking_uActive = Boolean(opts.pickingActive);\n uniforms.picking_uAttribute = Boolean(opts.pickingAttribute);\n }\n return uniforms;\n}\n\nconst vs = `\\\nuniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;\n\nout vec4 picking_vRGBcolor_Avalid;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool picking_isColorValid(vec3 color) {\n return dot(color, vec3(1.0)) > 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n picking_uSelectedColorValid &&\n !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n if (picking_uActive) {\n // Use alpha as the validity flag. If pickingColor is [0, 0, 0] fragment is non-pickable\n picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n if (!picking_uAttribute) {\n // Stores the picking color so that the fragment shader can render it during picking\n picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n }\n } else {\n // Do the comparison with selected item color in vertex shader as it should mean fewer compares\n picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n }\n}\n\nvoid picking_setPickingAttribute(float value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.r = value;\n }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rg = value;\n }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = value;\n }\n}\n`;\n\nconst fs = `\\\nuniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\n\n/*\n * Returns highlight color if this item is selected.\n */\nvec4 picking_filterHighlightColor(vec4 color) {\n if (picking_uActive) {\n return color;\n }\n bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n if (selected) {\n float highLightAlpha = picking_uHighlightColor.a;\n float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n float highLightRatio = highLightAlpha / blendedAlpha;\n\n vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n } else {\n return color;\n }\n}\n\n/*\n * Returns picking color if picking enabled else unmodified argument.\n */\nvec4 picking_filterPickingColor(vec4 color) {\n if (picking_uActive) {\n if (picking_vRGBcolor_Avalid.a == 0.0) {\n discard;\n }\n return picking_vRGBcolor_Avalid;\n }\n return color;\n}\n\n/*\n * Returns picking color if picking is enabled if not\n * highlight color if this item is selected, otherwise unmodified argument.\n */\nvec4 picking_filterColor(vec4 color) {\n vec4 highightColor = picking_filterHighlightColor(color);\n return picking_filterPickingColor(highightColor);\n}\n\n`;\n\n/** @type {ShaderModule} */\nexport const picking = {\n name: 'picking',\n vs,\n fs,\n getUniforms\n};\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 12,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE 11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -12,\n '$sizeSmall&': {\n marginLeft: -3\n }\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -12,\n '$sizeSmall&': {\n marginRight: -3\n }\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: 3,\n fontSize: theme.typography.pxToRem(18)\n },\n\n /* Styles applied to the children container element. */\n label: {\n width: '100%',\n display: 'flex',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n }\n };\n};\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nvar IconButton = /*#__PURE__*/React.forwardRef(function IconButton(props, ref) {\n var _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"edge\", \"children\", \"classes\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, className, color !== 'default' && classes[\"color\".concat(capitalize(color))], disabled && classes.disabled, size === \"small\" && classes[\"size\".concat(capitalize(size))], {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge]),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes = {\n /**\n * The icon element.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n var found = React.Children.toArray(props.children).some(function (child) {\n return /*#__PURE__*/React.isValidElement(child) && child.props.onClick;\n });\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener ' + 'to a child of a button element.', 'Firefox will never trigger the event.', 'You should move the onClick listener to the parent button element.', 'https://github.com/mui-org/material-ui/issues/13957'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: PropTypes.oneOf(['start', 'end', false]),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['small', 'medium'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiIconButton'\n})(IconButton);","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType } from '@material-ui/utils';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport setRef from '../utils/setRef';\nimport useForkRef from '../utils/useForkRef';\n\nfunction getContainer(container) {\n container = typeof container === 'function' ? container() : container; // #StrictMode ready\n\n return ReactDOM.findDOMNode(container);\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n */\n\nvar Portal = /*#__PURE__*/React.forwardRef(function Portal(props, ref) {\n var children = props.children,\n container = props.container,\n _props$disablePortal = props.disablePortal,\n disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n onRendered = props.onRendered;\n\n var _React$useState = React.useState(null),\n mountNode = _React$useState[0],\n setMountNode = _React$useState[1];\n\n var handleRef = useForkRef( /*#__PURE__*/React.isValidElement(children) ? children.ref : null, ref);\n useEnhancedEffect(function () {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(function () {\n if (mountNode && !disablePortal) {\n setRef(ref, mountNode);\n return function () {\n setRef(ref, null);\n };\n }\n\n return undefined;\n }, [ref, mountNode, disablePortal]);\n useEnhancedEffect(function () {\n if (onRendered && (mountNode || disablePortal)) {\n onRendered();\n }\n }, [onRendered, mountNode, disablePortal]);\n\n if (disablePortal) {\n if ( /*#__PURE__*/React.isValidElement(children)) {\n return /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef\n });\n }\n\n return children;\n }\n\n return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.instanceOf(React.Component), PropTypes.func]),\n\n /**\n * Disable the portal behavior.\n * The children stay within it's parent DOM hierarchy.\n */\n disablePortal: PropTypes.bool,\n\n /**\n * Callback fired once the children has been mounted into the `container`.\n *\n * This prop will be removed in v5, the ref can be used instead.\n * @deprecated Use the ref instead.\n */\n onRendered: deprecatedPropType(PropTypes.func, 'Use the ref instead.')\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\n\nexport default Portal;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n margin: 0\n },\n\n /* Styles applied to the root element if `variant=\"body2\"`. */\n body2: theme.typography.body2,\n\n /* Styles applied to the root element if `variant=\"body1\"`. */\n body1: theme.typography.body1,\n\n /* Styles applied to the root element if `variant=\"caption\"`. */\n caption: theme.typography.caption,\n\n /* Styles applied to the root element if `variant=\"button\"`. */\n button: theme.typography.button,\n\n /* Styles applied to the root element if `variant=\"h1\"`. */\n h1: theme.typography.h1,\n\n /* Styles applied to the root element if `variant=\"h2\"`. */\n h2: theme.typography.h2,\n\n /* Styles applied to the root element if `variant=\"h3\"`. */\n h3: theme.typography.h3,\n\n /* Styles applied to the root element if `variant=\"h4\"`. */\n h4: theme.typography.h4,\n\n /* Styles applied to the root element if `variant=\"h5\"`. */\n h5: theme.typography.h5,\n\n /* Styles applied to the root element if `variant=\"h6\"`. */\n h6: theme.typography.h6,\n\n /* Styles applied to the root element if `variant=\"subtitle1\"`. */\n subtitle1: theme.typography.subtitle1,\n\n /* Styles applied to the root element if `variant=\"subtitle2\"`. */\n subtitle2: theme.typography.subtitle2,\n\n /* Styles applied to the root element if `variant=\"overline\"`. */\n overline: theme.typography.overline,\n\n /* Styles applied to the root element if `variant=\"srOnly\"`. Only accessible to screen readers. */\n srOnly: {\n position: 'absolute',\n height: 1,\n width: 1,\n overflow: 'hidden'\n },\n\n /* Styles applied to the root element if `align=\"left\"`. */\n alignLeft: {\n textAlign: 'left'\n },\n\n /* Styles applied to the root element if `align=\"center\"`. */\n alignCenter: {\n textAlign: 'center'\n },\n\n /* Styles applied to the root element if `align=\"right\"`. */\n alignRight: {\n textAlign: 'right'\n },\n\n /* Styles applied to the root element if `align=\"justify\"`. */\n alignJustify: {\n textAlign: 'justify'\n },\n\n /* Styles applied to the root element if `nowrap={true}`. */\n noWrap: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the root element if `gutterBottom={true}`. */\n gutterBottom: {\n marginBottom: '0.35em'\n },\n\n /* Styles applied to the root element if `paragraph={true}`. */\n paragraph: {\n marginBottom: 16\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"textPrimary\"`. */\n colorTextPrimary: {\n color: theme.palette.text.primary\n },\n\n /* Styles applied to the root element if `color=\"textSecondary\"`. */\n colorTextSecondary: {\n color: theme.palette.text.secondary\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `display=\"inline\"`. */\n displayInline: {\n display: 'inline'\n },\n\n /* Styles applied to the root element if `display=\"block\"`. */\n displayBlock: {\n display: 'block'\n }\n };\n};\nvar defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p'\n};\nvar Typography = /*#__PURE__*/React.forwardRef(function Typography(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'initial' : _props$color,\n component = props.component,\n _props$display = props.display,\n display = _props$display === void 0 ? 'initial' : _props$display,\n _props$gutterBottom = props.gutterBottom,\n gutterBottom = _props$gutterBottom === void 0 ? false : _props$gutterBottom,\n _props$noWrap = props.noWrap,\n noWrap = _props$noWrap === void 0 ? false : _props$noWrap,\n _props$paragraph = props.paragraph,\n paragraph = _props$paragraph === void 0 ? false : _props$paragraph,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'body1' : _props$variant,\n _props$variantMapping = props.variantMapping,\n variantMapping = _props$variantMapping === void 0 ? defaultVariantMapping : _props$variantMapping,\n other = _objectWithoutProperties(props, [\"align\", \"classes\", \"className\", \"color\", \"component\", \"display\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"]);\n\n var Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, variant !== 'inherit' && classes[variant], color !== 'initial' && classes[\"color\".concat(capitalize(color))], noWrap && classes.noWrap, gutterBottom && classes.gutterBottom, paragraph && classes.paragraph, align !== 'inherit' && classes[\"align\".concat(capitalize(align))], display !== 'initial' && classes[\"display\".concat(capitalize(display))]),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Typography.propTypes = {\n /**\n * Set the text-align on the component.\n */\n align: PropTypes.oneOf(['inherit', 'left', 'center', 'right', 'justify']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n * Overrides the behavior of the `variantMapping` prop.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Controls the display type\n */\n display: PropTypes.oneOf(['initial', 'block', 'inline']),\n\n /**\n * If `true`, the text will have a bottom margin.\n */\n gutterBottom: PropTypes.bool,\n\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap: PropTypes.bool,\n\n /**\n * If `true`, the text will have a bottom margin.\n */\n paragraph: PropTypes.bool,\n\n /**\n * Applies the theme typography styles.\n */\n variant: PropTypes.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline', 'srOnly', 'inherit']),\n\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to `<h6>`.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n */\n variantMapping: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTypography'\n})(Typography);","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nfunction getStorage(type) {\n try {\n /** @type {Storage} */\n // @ts-ignore\n const storage = window[type];\n const x = '__storage_test__';\n storage.setItem(x, x);\n storage.removeItem(x);\n return storage;\n } catch (e) {\n return null;\n }\n}\n\n// Store keys in local storage via simple interface\nexport default class LocalStorage {\n constructor(id, defaultSettings, type = 'sessionStorage') {\n this.storage = getStorage(type);\n this.id = id;\n this.config = {};\n Object.assign(this.config, defaultSettings);\n this._loadConfiguration();\n }\n\n getConfiguration() {\n return this.config;\n }\n\n setConfiguration(configuration) {\n this.config = {};\n return this.updateConfiguration(configuration);\n }\n\n updateConfiguration(configuration) {\n Object.assign(this.config, configuration);\n if (this.storage) {\n const serialized = JSON.stringify(this.config);\n this.storage.setItem(this.id, serialized);\n }\n return this;\n }\n\n // Get config from persistent store, if available\n _loadConfiguration() {\n let configuration = {};\n if (this.storage) {\n const serializedConfiguration = this.storage.getItem(this.id);\n configuration = serializedConfiguration ? JSON.parse(serializedConfiguration) : {};\n }\n Object.assign(this.config, configuration);\n return this;\n }\n}\n","// TODO: Currently unused, keeping in case we want it later for log formatting\nexport function formatTime(ms) {\n let formatted;\n if (ms < 10) {\n formatted = `${ms.toFixed(2)}ms`;\n } else if (ms < 100) {\n formatted = `${ms.toFixed(1)}ms`;\n } else if (ms < 1000) {\n formatted = `${ms.toFixed(0)}ms`;\n } else {\n formatted = `${(ms / 1000).toFixed(2)}s`;\n }\n return formatted;\n}\n\nexport function leftPad(string, length = 8) {\n const padLength = Math.max(length - string.length, 0);\n return `${' '.repeat(padLength)}${string}`;\n}\n\nexport function rightPad(string, length = 8) {\n const padLength = Math.max(length - string.length, 0);\n return `${string}${' '.repeat(padLength)}`;\n}\n\nexport function formatValue(v, opts = {}) {\n const EPSILON = 1e-16;\n const {isInteger = false} = opts;\n if (Array.isArray(v) || ArrayBuffer.isView(v)) {\n return formatArrayValue(v, opts);\n }\n if (!Number.isFinite(v)) {\n return String(v);\n }\n if (Math.abs(v) < EPSILON) {\n return isInteger ? '0' : '0.';\n }\n if (isInteger) {\n return v.toFixed(0);\n }\n if (Math.abs(v) > 100 && Math.abs(v) < 10000) {\n return v.toFixed(0);\n }\n const string = v.toPrecision(2);\n const decimal = string.indexOf('.0');\n return decimal === string.length - 2 ? string.slice(0, -1) : string;\n}\n\n// Helper to formatValue\nfunction formatArrayValue(v, opts) {\n const {maxElts = 16, size = 1} = opts;\n let string = '[';\n for (let i = 0; i < v.length && i < maxElts; ++i) {\n if (i > 0) {\n string += `,${i % size === 0 ? ' ' : ''}`;\n }\n string += formatValue(v[i], opts);\n }\n const terminator = v.length > maxElts ? '...' : ']';\n return `${string}${terminator}`;\n}\n\n// Inspired by https://github.com/hughsk/console-image (MIT license)\nexport function formatImage(image, message, scale, maxWidth = 600) {\n const imageUrl = image.src.replace(/\\(/g, '%28').replace(/\\)/g, '%29');\n\n if (image.width > maxWidth) {\n scale = Math.min(scale, maxWidth / image.width);\n }\n\n const width = image.width * scale;\n const height = image.height * scale;\n\n const style = [\n 'font-size:1px;',\n `padding:${Math.floor(height / 2)}px ${Math.floor(width / 2)}px;`,\n `line-height:${height}px;`,\n `background:url(${imageUrl});`,\n `background-size:${width}px ${height}px;`,\n 'color:transparent;'\n ].join('');\n\n return [`${message} %c+`, style];\n}\n","import {isBrowser} from './globals';\n\nexport const COLOR = {\n BLACK: 30,\n RED: 31,\n GREEN: 32,\n YELLOW: 33,\n BLUE: 34,\n MAGENTA: 35,\n CYAN: 36,\n WHITE: 37,\n\n BRIGHT_BLACK: 90,\n BRIGHT_RED: 91,\n BRIGHT_GREEN: 92,\n BRIGHT_YELLOW: 93,\n BRIGHT_BLUE: 94,\n BRIGHT_MAGENTA: 95,\n BRIGHT_CYAN: 96,\n BRIGHT_WHITE: 97\n};\n\nfunction getColor(color) {\n return typeof color === 'string' ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;\n}\n\nexport function addColor(string, color, background) {\n if (!isBrowser && typeof string === 'string') {\n if (color) {\n color = getColor(color);\n string = `\\u001b[${color}m${string}\\u001b[39m`;\n }\n if (background) {\n // background colors values are +10\n color = getColor(background);\n string = `\\u001b[${background + 10}m${string}\\u001b[49m`;\n }\n }\n return string;\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/**\n * Binds the \"this\" argument of all functions on a class instance to the instance\n * @param {Object} obj - class instance (typically a react component)\n */\nexport function autobind(obj, predefined = ['constructor']) {\n const proto = Object.getPrototypeOf(obj);\n const propNames = Object.getOwnPropertyNames(proto);\n for (const key of propNames) {\n if (typeof obj[key] === 'function') {\n if (!predefined.find(name => key === name)) {\n obj[key] = obj[key].bind(obj);\n }\n }\n }\n}\n","// Copyright (c) 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/* eslint-disable no-console */\nimport {VERSION, isBrowser} from '../utils/globals';\nimport LocalStorage from '../utils/local-storage';\nimport {formatImage, formatTime, leftPad} from '../utils/formatters';\nimport {addColor} from '../utils/color';\nimport {autobind} from '../utils/autobind';\nimport assert from '../utils/assert';\nimport getHiResTimestamp from '../utils/hi-res-timestamp';\n\n/* eslint-disable no-console */\n\n// Instrumentation in other packages may override console methods, so preserve them here\nconst originalConsole = {\n debug: isBrowser ? console.debug || console.log : console.log,\n log: console.log,\n info: console.info,\n warn: console.warn,\n error: console.error\n};\n\nconst DEFAULT_SETTINGS = {\n enabled: true,\n level: 0\n};\n\nfunction noop() {}\n\nconst cache = {};\nconst ONCE = {once: true};\n\n/*\nfunction throttle(tag, timeout) {\n const prevTime = cache[tag];\n const time = Date.now();\n if (!prevTime || (time - prevTime > timeout)) {\n cache[tag] = time;\n return true;\n }\n return false;\n}\n\n// Assertions don't generate standard exceptions and don't print nicely\nfunction checkForAssertionErrors(args) {\n const isAssertion =\n args &&\n args.length > 0 &&\n typeof args[0] === 'object' &&\n args[0] !== null &&\n args[0].name === 'AssertionError';\n\n if (isAssertion) {\n args = Array.prototype.slice.call(args);\n args.unshift(`assert(${args[0].message})`);\n }\n return args;\n}\n*/\n\nfunction getTableHeader(table) {\n for (const key in table) {\n for (const title in table[key]) {\n return title || 'untitled';\n }\n }\n return 'empty';\n}\n\n// A console wrapper\n\nexport default class Log {\n constructor({id} = {id: ''}) {\n this.id = id;\n this.VERSION = VERSION;\n this._startTs = getHiResTimestamp();\n this._deltaTs = getHiResTimestamp();\n // TODO - fix support from throttling groups\n this.LOG_THROTTLE_TIMEOUT = 0; // Time before throttled messages are logged again\n this._storage = new LocalStorage(`__probe-${this.id}__`, DEFAULT_SETTINGS);\n this.userData = {};\n\n this.timeStamp(`${this.id} started`);\n\n autobind(this);\n Object.seal(this);\n }\n\n set level(newLevel) {\n this.setLevel(newLevel);\n }\n\n get level() {\n return this.getLevel();\n }\n\n isEnabled() {\n return this._storage.config.enabled;\n }\n\n getLevel() {\n return this._storage.config.level;\n }\n\n // @return {Number} milliseconds, with fractions\n getTotal() {\n return Number((getHiResTimestamp() - this._startTs).toPrecision(10));\n }\n\n // @return {Number} milliseconds, with fractions\n getDelta() {\n return Number((getHiResTimestamp() - this._deltaTs).toPrecision(10));\n }\n\n // Deprecated\n set priority(newPriority) {\n this.level = newPriority;\n }\n\n get priority() {\n return this.level;\n }\n\n getPriority() {\n return this.level;\n }\n\n // Configure\n\n enable(enabled = true) {\n this._storage.updateConfiguration({enabled});\n return this;\n }\n\n setLevel(level) {\n this._storage.updateConfiguration({level});\n return this;\n }\n\n // Unconditional logging\n\n assert(condition, message) {\n assert(condition, message);\n }\n\n // Warn, but only once, no console flooding\n warn(message) {\n // @ts-ignore\n return this._getLogFunction(0, message, originalConsole.warn, arguments, ONCE);\n }\n\n // Print an error\n error(message) {\n // @ts-ignore\n return this._getLogFunction(0, message, originalConsole.error, arguments);\n }\n\n deprecated(oldUsage, newUsage) {\n return this.warn(`\\`${oldUsage}\\` is deprecated and will be removed \\\nin a later version. Use \\`${newUsage}\\` instead`);\n }\n\n removed(oldUsage, newUsage) {\n return this.error(`\\`${oldUsage}\\` has been removed. Use \\`${newUsage}\\` instead`);\n }\n\n // Conditional logging\n\n // Log to a group\n probe(logLevel, message) {\n // @ts-ignore\n return this._getLogFunction(logLevel, message, originalConsole.log, arguments, {\n time: true,\n once: true\n });\n }\n\n // Log a debug message\n log(logLevel, message) {\n // @ts-ignore\n return this._getLogFunction(logLevel, message, originalConsole.debug, arguments);\n }\n\n // Log a normal message\n info(logLevel, message) {\n // @ts-ignore\n return this._getLogFunction(logLevel, message, console.info, arguments);\n }\n\n // Log a normal message, but only once, no console flooding\n once(logLevel, message) {\n return this._getLogFunction(\n logLevel,\n message,\n originalConsole.debug || originalConsole.info,\n // @ts-ignore\n arguments,\n ONCE\n );\n }\n\n // Logs an object as a table\n table(logLevel, table, columns) {\n if (table) {\n return this._getLogFunction(logLevel, table, console.table || noop, columns && [columns], {\n tag: getTableHeader(table)\n });\n }\n return noop;\n }\n\n // logs an image under Chrome\n image({logLevel, priority, image, message = '', scale = 1}) {\n if (!this._shouldLog(logLevel || priority)) {\n return noop;\n }\n return isBrowser\n ? logImageInBrowser({image, message, scale})\n : logImageInNode({image, message, scale});\n }\n\n // Logs the current settings as a table\n settings() {\n if (console.table) {\n console.table(this._storage.config);\n } else {\n console.log(this._storage.config);\n }\n }\n\n // logs the current status of the setting\n get(setting) {\n return this._storage.config[setting];\n }\n\n // update the status of the setting\n set(setting, value) {\n this._storage.updateConfiguration({[setting]: value});\n }\n\n time(logLevel, message) {\n return this._getLogFunction(logLevel, message, console.time ? console.time : console.info);\n }\n\n timeEnd(logLevel, message) {\n return this._getLogFunction(\n logLevel,\n message,\n console.timeEnd ? console.timeEnd : console.info\n );\n }\n\n timeStamp(logLevel, message) {\n return this._getLogFunction(logLevel, message, console.timeStamp || noop);\n }\n\n group(logLevel, message, opts = {collapsed: false}) {\n opts = normalizeArguments({logLevel, message, opts});\n const {collapsed} = opts;\n opts.method = (collapsed ? console.groupCollapsed : console.group) || console.info;\n\n return this._getLogFunction(opts);\n }\n\n groupCollapsed(logLevel, message, opts = {}) {\n return this.group(logLevel, message, Object.assign({}, opts, {collapsed: true}));\n }\n\n groupEnd(logLevel) {\n return this._getLogFunction(logLevel, '', console.groupEnd || noop);\n }\n\n // EXPERIMENTAL\n\n withGroup(logLevel, message, func) {\n this.group(logLevel, message)();\n\n try {\n func();\n } finally {\n this.groupEnd(logLevel)();\n }\n }\n\n trace() {\n if (console.trace) {\n console.trace();\n }\n }\n\n // PRIVATE METHODS\n\n _shouldLog(logLevel) {\n return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);\n }\n\n _getLogFunction(logLevel, message, method, args = [], opts) {\n if (this._shouldLog(logLevel)) {\n // normalized opts + timings\n opts = normalizeArguments({logLevel, message, args, opts});\n method = method || opts.method;\n assert(method);\n\n opts.total = this.getTotal();\n opts.delta = this.getDelta();\n // reset delta timer\n this._deltaTs = getHiResTimestamp();\n\n const tag = opts.tag || opts.message;\n\n if (opts.once) {\n if (!cache[tag]) {\n cache[tag] = getHiResTimestamp();\n } else {\n return noop;\n }\n }\n\n // TODO - Make throttling work with groups\n // if (opts.nothrottle || !throttle(tag, this.LOG_THROTTLE_TIMEOUT)) {\n // return noop;\n // }\n\n message = decorateMessage(this.id, opts.message, opts);\n\n // Bind console function so that it can be called after being returned\n return method.bind(console, message, ...opts.args);\n }\n return noop;\n }\n}\n\nLog.VERSION = VERSION;\n\n// Get logLevel from first argument:\n// - log(logLevel, message, args) => logLevel\n// - log(message, args) => 0\n// - log({logLevel, ...}, message, args) => logLevel\n// - log({logLevel, message, args}) => logLevel\nfunction normalizeLogLevel(logLevel) {\n if (!logLevel) {\n return 0;\n }\n let resolvedLevel;\n\n switch (typeof logLevel) {\n case 'number':\n resolvedLevel = logLevel;\n break;\n\n case 'object':\n // Backward compatibility\n // TODO - deprecate `priority`\n resolvedLevel = logLevel.logLevel || logLevel.priority || 0;\n break;\n\n default:\n return 0;\n }\n // 'log level must be a number'\n assert(Number.isFinite(resolvedLevel) && resolvedLevel >= 0);\n\n return resolvedLevel;\n}\n\n// \"Normalizes\" the various argument patterns into an object with known types\n// - log(logLevel, message, args) => {logLevel, message, args}\n// - log(message, args) => {logLevel: 0, message, args}\n// - log({logLevel, ...}, message, args) => {logLevel, message, args}\n// - log({logLevel, message, args}) => {logLevel, message, args}\nexport function normalizeArguments(opts) {\n const {logLevel, message} = opts;\n opts.logLevel = normalizeLogLevel(logLevel);\n // We use `arguments` instead of rest parameters (...args) because IE\n // does not support the syntax. Rest parameters is transpiled to code with\n // perf impact. Doing it here instead avoids constructing args when logging is\n // disabled.\n // TODO - remove when/if IE support is dropped\n const args = opts.args ? Array.from(opts.args) : [];\n /* eslint-disable no-empty */\n // args should only contain arguments that appear after `message`\n while (args.length && args.shift() !== message) {}\n /* eslint-enable no-empty */\n opts.args = args;\n\n switch (typeof logLevel) {\n case 'string':\n case 'function':\n if (message !== undefined) {\n args.unshift(message);\n }\n opts.message = logLevel;\n break;\n\n case 'object':\n Object.assign(opts, logLevel);\n break;\n\n default:\n }\n\n // Resolve functions into strings by calling them\n if (typeof opts.message === 'function') {\n opts.message = opts.message();\n }\n const messageType = typeof opts.message;\n // 'log message must be a string' or object\n assert(messageType === 'string' || messageType === 'object');\n\n // original opts + normalized opts + opts arg + fixed up message\n return Object.assign(opts, opts.opts);\n}\n\nfunction decorateMessage(id, message, opts) {\n if (typeof message === 'string') {\n const time = opts.time ? leftPad(formatTime(opts.total)) : '';\n message = opts.time ? `${id}: ${time} ${message}` : `${id}: ${message}`;\n message = addColor(message, opts.color, opts.background);\n }\n return message;\n}\n\n// Use the asciify module to log an image under node.js\nfunction logImageInNode({image, message = '', scale = 1}) {\n // Note: Runtime load of the \"asciify-image\" module, avoids including in browser bundles\n let asciify = null;\n try {\n asciify = module.require('asciify-image');\n } catch (error) {\n // asciify not installed, silently ignore\n }\n if (asciify) {\n return () =>\n asciify(image, {fit: 'box', width: `${Math.round(80 * scale)}%`}).then(data =>\n console.log(data)\n );\n }\n return noop;\n}\n\nfunction logImageInBrowser({image, message = '', scale = 1}) {\n if (typeof image === 'string') {\n const img = new Image();\n img.onload = () => {\n const args = formatImage(img, message, scale);\n console.log(...args);\n };\n img.src = image;\n return noop;\n }\n const element = image.nodeName || '';\n if (element.toLowerCase() === 'img') {\n console.log(...formatImage(image, message, scale));\n return noop;\n }\n if (element.toLowerCase() === 'canvas') {\n const img = new Image();\n img.onload = () => console.log(...formatImage(img, message, scale));\n img.src = image.toDataURL();\n return noop;\n }\n return noop;\n}\n","// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\nexport default multiKeyStore;","/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nexport function increment() {\n indexCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { deepmerge } from '@material-ui/utils';\nimport noopTheme from './noopTheme';\nexport default function getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (process.env.NODE_ENV !== 'production') {\n if (_typeof(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (process.env.NODE_ENV !== 'production') {\n if (themingEnabled === true && theme === noopTheme) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = _extends({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = deepmerge(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}","// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\nexport default noopTheme;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getDynamicStyles } from 'jss';\nimport mergeClasses from '../mergeClasses';\nimport multiKeyStore from './multiKeyStore';\nimport useTheme from '../useTheme';\nimport { StylesContext } from '../StylesProvider';\nimport { increment } from './indexCounter';\nimport getStylesCreator from '../getStylesCreator';\nimport noopTheme from '../getStylesCreator/noopTheme';\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = mergeClasses({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n multiKeyStore.set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = _extends({}, stylesCreator.options, stylesOptions, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = multiKeyStore.get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, _extends({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n multiKeyStore.set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = getDynamicStyles(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, _extends({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = mergeClasses({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = multiKeyStore.get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n multiKeyStore.delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = React.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = React.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n React.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nexport default function makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? noopTheme : _options$defaultTheme,\n stylesOptions2 = _objectWithoutProperties(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = getStylesCreator(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: increment(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = useTheme() || defaultTheme;\n\n var stylesOptions = _extends({}, React.useContext(StylesContext), stylesOptions2);\n\n var instance = React.useRef();\n var shouldUpdate = React.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n React.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}","export default {\n disabled: false\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { makeStyles as makeStylesWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\n\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return makeStylesWithoutDefault(stylesOrCreator, _extends({\n defaultTheme: defaultTheme\n }, options));\n}\n\nexport default makeStyles;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getDisplayName } from '@material-ui/utils';\nexport default function mergeClasses() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var baseClasses = options.baseClasses,\n newClasses = options.newClasses,\n Component = options.Component;\n\n if (!newClasses) {\n return baseClasses;\n }\n\n var nextClasses = _extends({}, baseClasses);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof newClasses === 'string') {\n console.error([\"Material-UI: The value `\".concat(newClasses, \"` \") + \"provided to the classes prop of \".concat(getDisplayName(Component), \" is incorrect.\"), 'You might want to use the className prop instead.'].join('\\n'));\n return baseClasses;\n }\n }\n\n Object.keys(newClasses).forEach(function (key) {\n if (process.env.NODE_ENV !== 'production') {\n if (!baseClasses[key] && newClasses[key]) {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not implemented in \".concat(getDisplayName(Component), \".\"), \"You can only override one of the following: \".concat(Object.keys(baseClasses).join(','), \".\")].join('\\n'));\n }\n\n if (newClasses[key] && typeof newClasses[key] !== 'string') {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not valid for \".concat(getDisplayName(Component), \".\"), \"You need to provide a non empty string instead of: \".concat(newClasses[key], \".\")].join('\\n'));\n }\n }\n\n if (newClasses[key]) {\n nextClasses[key] = \"\".concat(baseClasses[key], \" \").concat(newClasses[key]);\n }\n });\n return nextClasses;\n}","import nested from '../ThemeProvider/nested';\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nexport default function createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (process.env.NODE_ENV !== 'production') {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[nested] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (process.env.NODE_ENV === 'production') {\n return \"\".concat(seedPrefix).concat(productionPrefix).concat(getNextCounterId());\n }\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}","export default function(values, valueof) {\n let min;\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n return [min, max];\n}\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nconst fp32shader = `\\\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n\n// All these functions are for substituting tan() function from Intel GPU only\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01; // 1/3!\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03; // 1/5!\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04; // 1/7!\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06; // 1/9!\n\nfloat sin_taylor_fp32(float a) {\n float r, s, t, x;\n\n if (a == 0.0) {\n return 0.0;\n }\n\n x = -a * a;\n s = a;\n r = a;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_3;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_5;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_7;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_9;\n s = s + t;\n\n return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n if (a == 0.0) {\n sin_t = 0.0;\n cos_t = 1.0;\n }\n sin_t = sin_taylor_fp32(a);\n cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n float sin_a;\n float cos_a;\n\n if (a == 0.0) {\n return 0.0;\n }\n\n // 2pi range reduction\n float z = floor(a / TWO_PI);\n float r = a - TWO_PI * z;\n\n float t;\n float q = floor(r / PI_2 + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return 1.0 / 0.0;\n }\n\n t = r - PI_2 * q;\n\n q = floor(t / PI_16 + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return 1.0 / 0.0;\n } else {\n t = t - PI_16 * q;\n }\n\n float u = 0.0;\n float v = 0.0;\n\n float sin_t, cos_t;\n float s, c;\n sincos_taylor_fp32(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0;\n v = SIN_TABLE_0;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1;\n v = SIN_TABLE_1;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2;\n v = SIN_TABLE_2;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3;\n v = SIN_TABLE_3;\n }\n if (k > 0) {\n s = u * sin_t + v * cos_t;\n c = u * cos_t - v * sin_t;\n } else {\n s = u * sin_t - v * cos_t;\n c = u * cos_t + v * sin_t;\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }\n return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n return tan_taylor_fp32(a);\n#else\n return tan(a);\n#endif\n}\n`;\n\nexport const fp32 = {\n name: 'fp32',\n vs: fp32shader,\n fs: null\n};\n","import GL from '@luma.gl/constants';\nimport {isWebGL2, assertWebGL2Context, log} from '@luma.gl/gltools';\nimport Resource from './resource';\nimport Buffer from './buffer';\nimport {isObjectEmpty} from '../utils/utils';\n\n// NOTE: The `bindOnUse` flag is a major workaround:\n// See https://github.com/KhronosGroup/WebGL/issues/2346\n\nexport default class TransformFeedback extends Resource {\n static isSupported(gl) {\n return isWebGL2(gl);\n }\n\n constructor(gl, props = {}) {\n assertWebGL2Context(gl);\n super(gl, props);\n\n this.initialize(props);\n this.stubRemovedMethods('TransformFeedback', 'v6.0', ['pause', 'resume']);\n Object.seal(this);\n }\n\n initialize(props = {}) {\n this.buffers = {};\n this.unused = {};\n this.configuration = null;\n this.bindOnUse = true;\n\n // Unbind any currently bound buffers\n if (!isObjectEmpty(this.buffers)) {\n this.bind(() => this._unbindBuffers());\n }\n\n this.setProps(props);\n return this;\n }\n\n setProps(props) {\n if ('program' in props) {\n this.configuration = props.program && props.program.configuration;\n }\n if ('configuration' in props) {\n this.configuration = props.configuration;\n }\n if ('bindOnUse' in props) {\n props = props.bindOnUse;\n }\n if ('buffers' in props) {\n this.setBuffers(props.buffers);\n }\n }\n\n setBuffers(buffers = {}) {\n this.bind(() => {\n for (const bufferName in buffers) {\n this.setBuffer(bufferName, buffers[bufferName]);\n }\n });\n return this;\n }\n\n setBuffer(locationOrName, bufferOrParams) {\n const location = this._getVaryingIndex(locationOrName);\n const {buffer, byteSize, byteOffset} = this._getBufferParams(bufferOrParams);\n\n if (location < 0) {\n this.unused[locationOrName] = buffer;\n log.warn(() => `${this.id} unused varying buffer ${locationOrName}`)();\n return this;\n }\n\n this.buffers[location] = bufferOrParams;\n\n // Need to avoid chrome bug where buffer that is already bound to a different target\n // cannot be bound to 'TRANSFORM_FEEDBACK_BUFFER' target.\n if (!this.bindOnUse) {\n this._bindBuffer(location, buffer, byteOffset, byteSize);\n }\n\n return this;\n }\n\n begin(primitiveMode = GL.POINTS) {\n // @ts-ignore\n this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, this.handle);\n this._bindBuffers();\n // @ts-ignore\n this.gl.beginTransformFeedback(primitiveMode);\n return this;\n }\n\n end() {\n // @ts-ignore\n this.gl.endTransformFeedback();\n this._unbindBuffers();\n // @ts-ignore\n this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, null);\n return this;\n }\n\n // PRIVATE METHODS\n\n _getBufferParams(bufferOrParams) {\n let byteOffset;\n let byteSize;\n let buffer;\n if (bufferOrParams instanceof Buffer === false) {\n buffer = bufferOrParams.buffer;\n byteSize = bufferOrParams.byteSize;\n byteOffset = bufferOrParams.byteOffset;\n } else {\n buffer = bufferOrParams;\n }\n // to use bindBufferRange, either offset or size must be specified, use default value for the other.\n if (byteOffset !== undefined || byteSize !== undefined) {\n byteOffset = byteOffset || 0;\n byteSize = byteSize || buffer.byteLength - byteOffset;\n }\n return {buffer, byteOffset, byteSize};\n }\n\n _getVaryingInfo(locationOrName) {\n return this.configuration && this.configuration.getVaryingInfo(locationOrName);\n }\n\n _getVaryingIndex(locationOrName) {\n if (this.configuration) {\n return this.configuration.getVaryingInfo(locationOrName).location;\n }\n const location = Number(locationOrName);\n return Number.isFinite(location) ? location : -1;\n }\n\n // Need to avoid chrome bug where buffer that is already bound to a different target\n // cannot be bound to 'TRANSFORM_FEEDBACK_BUFFER' target.\n _bindBuffers() {\n if (this.bindOnUse) {\n for (const bufferIndex in this.buffers) {\n const {buffer, byteSize, byteOffset} = this._getBufferParams(this.buffers[bufferIndex]);\n this._bindBuffer(bufferIndex, buffer, byteOffset, byteSize);\n }\n }\n }\n\n _unbindBuffers() {\n if (this.bindOnUse) {\n for (const bufferIndex in this.buffers) {\n this._bindBuffer(bufferIndex, null);\n }\n }\n }\n\n _bindBuffer(index, buffer, byteOffset = 0, byteSize) {\n const handle = buffer && buffer.handle;\n if (!handle || byteSize === undefined) {\n // @ts-ignore\n this.gl.bindBufferBase(GL.TRANSFORM_FEEDBACK_BUFFER, index, handle);\n } else {\n // @ts-ignore\n this.gl.bindBufferRange(GL.TRANSFORM_FEEDBACK_BUFFER, index, handle, byteOffset, byteSize);\n }\n return this;\n }\n\n // RESOURCE METHODS\n\n _createHandle() {\n // @ts-ignore\n return this.gl.createTransformFeedback();\n }\n\n _deleteHandle() {\n // @ts-ignore\n this.gl.deleteTransformFeedback(this.handle);\n }\n\n _bindHandle(handle) {\n // @ts-ignore\n this.gl.bindTransformFeedback(GL.TRANSFORM_FEEDBACK, this.handle);\n }\n}\n","let channelHandles = 1;\nlet animationHandles = 1;\n\nexport class Timeline {\n constructor() {\n this.time = 0;\n this.channels = new Map();\n this.animations = new Map();\n this.playing = false;\n this.lastEngineTime = -1;\n }\n\n addChannel(props) {\n const {delay = 0, duration = Number.POSITIVE_INFINITY, rate = 1, repeat = 1} = props;\n\n const handle = channelHandles++;\n const channel = {\n time: 0,\n delay,\n duration,\n rate,\n repeat\n };\n this._setChannelTime(channel, this.time);\n this.channels.set(handle, channel);\n\n return handle;\n }\n\n removeChannel(handle) {\n this.channels.delete(handle);\n\n for (const [animationHandle, animation] of this.animations) {\n if (animation.channel === handle) {\n this.detachAnimation(animationHandle);\n }\n }\n }\n\n isFinished(handle) {\n const channel = this.channels.get(handle);\n if (channel === undefined) {\n return false;\n }\n\n return this.time >= channel.delay + channel.duration * channel.repeat;\n }\n\n getTime(handle) {\n if (handle === undefined) {\n return this.time;\n }\n\n const channel = this.channels.get(handle);\n\n if (channel === undefined) {\n return -1;\n }\n\n return channel.time;\n }\n\n setTime(time) {\n this.time = Math.max(0, time);\n\n const channels = this.channels.values();\n for (const channel of channels) {\n this._setChannelTime(channel, this.time);\n }\n\n const animations = this.animations.values();\n for (const animationData of animations) {\n const {animation, channel} = animationData;\n animation.setTime(this.getTime(channel));\n }\n }\n\n play() {\n this.playing = true;\n }\n\n pause() {\n this.playing = false;\n this.lastEngineTime = -1;\n }\n\n reset() {\n this.setTime(0);\n }\n\n attachAnimation(animation, channelHandle) {\n const animationHandle = animationHandles++;\n\n this.animations.set(animationHandle, {\n animation,\n channel: channelHandle\n });\n\n animation.setTime(this.getTime(channelHandle));\n\n return animationHandle;\n }\n\n detachAnimation(handle) {\n this.animations.delete(handle);\n }\n\n update(engineTime) {\n if (this.playing) {\n if (this.lastEngineTime === -1) {\n this.lastEngineTime = engineTime;\n }\n this.setTime(this.time + (engineTime - this.lastEngineTime));\n this.lastEngineTime = engineTime;\n }\n }\n\n _setChannelTime(channel, time) {\n const offsetTime = time - channel.delay;\n const totalDuration = channel.duration * channel.repeat;\n // Note(Tarek): Don't loop on final repeat.\n if (offsetTime >= totalDuration) {\n channel.time = channel.duration * channel.rate;\n } else {\n channel.time = Math.max(0, offsetTime) % channel.duration;\n channel.time *= channel.rate;\n }\n }\n}\n","var EOL = {},\n EOF = {},\n QUOTE = 34,\n NEWLINE = 10,\n RETURN = 13;\n\nfunction objectConverter(columns) {\n return new Function(\"d\", \"return {\" + columns.map(function(name, i) {\n return JSON.stringify(name) + \": d[\" + i + \"] || \\\"\\\"\";\n }).join(\",\") + \"}\");\n}\n\nfunction customConverter(columns, f) {\n var object = objectConverter(columns);\n return function(row, i) {\n return f(object(row), i, columns);\n };\n}\n\n// Compute unique columns in order of discovery.\nfunction inferColumns(rows) {\n var columnSet = Object.create(null),\n columns = [];\n\n rows.forEach(function(row) {\n for (var column in row) {\n if (!(column in columnSet)) {\n columns.push(columnSet[column] = column);\n }\n }\n });\n\n return columns;\n}\n\nfunction pad(value, width) {\n var s = value + \"\", length = s.length;\n return length < width ? new Array(width - length + 1).join(0) + s : s;\n}\n\nfunction formatYear(year) {\n return year < 0 ? \"-\" + pad(-year, 6)\n : year > 9999 ? \"+\" + pad(year, 6)\n : pad(year, 4);\n}\n\nfunction formatDate(date) {\n var hours = date.getUTCHours(),\n minutes = date.getUTCMinutes(),\n seconds = date.getUTCSeconds(),\n milliseconds = date.getUTCMilliseconds();\n return isNaN(date) ? \"Invalid Date\"\n : formatYear(date.getUTCFullYear(), 4) + \"-\" + pad(date.getUTCMonth() + 1, 2) + \"-\" + pad(date.getUTCDate(), 2)\n + (milliseconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \".\" + pad(milliseconds, 3) + \"Z\"\n : seconds ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \":\" + pad(seconds, 2) + \"Z\"\n : minutes || hours ? \"T\" + pad(hours, 2) + \":\" + pad(minutes, 2) + \"Z\"\n : \"\");\n}\n\nexport default function(delimiter) {\n var reFormat = new RegExp(\"[\\\"\" + delimiter + \"\\n\\r]\"),\n DELIMITER = delimiter.charCodeAt(0);\n\n function parse(text, f) {\n var convert, columns, rows = parseRows(text, function(row, i) {\n if (convert) return convert(row, i - 1);\n columns = row, convert = f ? customConverter(row, f) : objectConverter(row);\n });\n rows.columns = columns || [];\n return rows;\n }\n\n function parseRows(text, f) {\n var rows = [], // output rows\n N = text.length,\n I = 0, // current character index\n n = 0, // current line number\n t, // current token\n eof = N <= 0, // current token followed by EOF?\n eol = false; // current token followed by EOL?\n\n // Strip the trailing newline.\n if (text.charCodeAt(N - 1) === NEWLINE) --N;\n if (text.charCodeAt(N - 1) === RETURN) --N;\n\n function token() {\n if (eof) return EOF;\n if (eol) return eol = false, EOL;\n\n // Unescape quotes.\n var i, j = I, c;\n if (text.charCodeAt(j) === QUOTE) {\n while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);\n if ((i = I) >= N) eof = true;\n else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n return text.slice(j + 1, i - 1).replace(/\"\"/g, \"\\\"\");\n }\n\n // Find next delimiter or newline.\n while (I < N) {\n if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;\n else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }\n else if (c !== DELIMITER) continue;\n return text.slice(j, i);\n }\n\n // Return last token before EOF.\n return eof = true, text.slice(j, N);\n }\n\n while ((t = token()) !== EOF) {\n var row = [];\n while (t !== EOL && t !== EOF) row.push(t), t = token();\n if (f && (row = f(row, n++)) == null) continue;\n rows.push(row);\n }\n\n return rows;\n }\n\n function preformatBody(rows, columns) {\n return rows.map(function(row) {\n return columns.map(function(column) {\n return formatValue(row[column]);\n }).join(delimiter);\n });\n }\n\n function format(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join(\"\\n\");\n }\n\n function formatBody(rows, columns) {\n if (columns == null) columns = inferColumns(rows);\n return preformatBody(rows, columns).join(\"\\n\");\n }\n\n function formatRows(rows) {\n return rows.map(formatRow).join(\"\\n\");\n }\n\n function formatRow(row) {\n return row.map(formatValue).join(delimiter);\n }\n\n function formatValue(value) {\n return value == null ? \"\"\n : value instanceof Date ? formatDate(value)\n : reFormat.test(value += \"\") ? \"\\\"\" + value.replace(/\"/g, \"\\\"\\\"\") + \"\\\"\"\n : value;\n }\n\n return {\n parse: parse,\n parseRows: parseRows,\n format: format,\n formatBody: formatBody,\n formatRows: formatRows,\n formatRow: formatRow,\n formatValue: formatValue\n };\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nvar SIZE = 44;\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-block'\n },\n\n /* Styles applied to the root element if `variant=\"static\"`. */\n static: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {\n animation: '$circular-rotate 1.4s linear infinite'\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the `svg` element. */\n svg: {\n display: 'block' // Keeps the progress centered\n\n },\n\n /* Styles applied to the `circle` svg path. */\n circle: {\n stroke: 'currentColor' // Use butt to follow the specification, by chance, it's already the default CSS value.\n // strokeLinecap: 'butt',\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"static\"`. */\n circleStatic: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"indeterminate\"`. */\n circleIndeterminate: {\n animation: '$circular-dash 1.4s ease-in-out infinite',\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: '0px' // Add the unit to fix a Edge 16 and below bug.\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"determinate\"`. */\n circleDeterminate: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n '@keyframes circular-rotate': {\n '0%': {\n // Fix IE 11 wobbly\n transformOrigin: '50% 50%'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n '@keyframes circular-dash': {\n '0%': {\n strokeDasharray: '1px, 200px',\n strokeDashoffset: '0px'\n },\n '50%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-15px'\n },\n '100%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-125px'\n }\n },\n\n /* Styles applied to the `circle` svg path if `disableShrink={true}`. */\n circleDisableShrink: {\n animation: 'none'\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$disableShrink = props.disableShrink,\n disableShrink = _props$disableShrink === void 0 ? false : _props$disableShrink,\n _props$size = props.size,\n size = _props$size === void 0 ? 40 : _props$size,\n style = props.style,\n _props$thickness = props.thickness,\n thickness = _props$thickness === void 0 ? 3.6 : _props$thickness,\n _props$value = props.value,\n value = _props$value === void 0 ? 0 : _props$value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"disableShrink\", \"size\", \"style\", \"thickness\", \"value\", \"variant\"]);\n\n var circleStyle = {};\n var rootStyle = {};\n var rootProps = {};\n\n if (variant === 'determinate' || variant === 'static') {\n var circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = \"\".concat(((100 - value) / 100 * circumference).toFixed(3), \"px\");\n rootStyle.transform = 'rotate(-90deg)';\n }\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className, color !== 'inherit' && classes[\"color\".concat(capitalize(color))], {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'static': classes.static\n }[variant]),\n style: _extends({\n width: size,\n height: size\n }, rootStyle, style),\n ref: ref,\n role: \"progressbar\"\n }, rootProps, other), /*#__PURE__*/React.createElement(\"svg\", {\n className: classes.svg,\n viewBox: \"\".concat(SIZE / 2, \" \").concat(SIZE / 2, \" \").concat(SIZE, \" \").concat(SIZE)\n }, /*#__PURE__*/React.createElement(\"circle\", {\n className: clsx(classes.circle, disableShrink && classes.circleDisableShrink, {\n 'determinate': classes.circleDeterminate,\n 'indeterminate': classes.circleIndeterminate,\n 'static': classes.circleStatic\n }[variant]),\n style: circleStyle,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n */\n disableShrink: chainPropTypes(PropTypes.bool, function (props) {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('Material-UI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n\n return null;\n }),\n\n /**\n * The size of the circle.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, e.g '3rem'.\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The thickness of the circle.\n */\n thickness: PropTypes.number,\n\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n */\n value: PropTypes.number,\n\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n */\n variant: chainPropTypes(PropTypes.oneOf(['determinate', 'indeterminate', 'static']), function (props) {\n var variant = props.variant;\n\n if (variant === 'static') {\n throw new Error('Material-UI: `variant=\"static\"` was deprecated. Use `variant=\"determinate\"` instead.');\n }\n\n return null;\n })\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCircularProgress',\n flip: false\n})(CircularProgress);","/* eslint-disable no-restricted-syntax */\nexport default function getThemeProps(params) {\n var theme = params.theme,\n name = params.name,\n props = params.props;\n\n if (!theme || !theme.props || !theme.props[name]) {\n return props;\n } // Resolve default props, code borrow from React source.\n // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221\n\n\n var defaultProps = theme.props[name];\n var propName;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport PopperJs from 'popper.js';\nimport { chainPropTypes, refType, HTMLElementType } from '@material-ui/utils';\nimport { useTheme } from '@material-ui/styles';\nimport Portal from '../Portal';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport setRef from '../utils/setRef';\nimport useForkRef from '../utils/useForkRef';\n\nfunction flipPlacement(placement, theme) {\n var direction = theme && theme.direction || 'ltr';\n\n if (direction === 'ltr') {\n return placement;\n }\n\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n\n case 'bottom-start':\n return 'bottom-end';\n\n case 'top-end':\n return 'top-start';\n\n case 'top-start':\n return 'top-end';\n\n default:\n return placement;\n }\n}\n\nfunction getAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar defaultPopperOptions = {};\n/**\n * Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.\n */\n\nvar Popper = /*#__PURE__*/React.forwardRef(function Popper(props, ref) {\n var anchorEl = props.anchorEl,\n children = props.children,\n container = props.container,\n _props$disablePortal = props.disablePortal,\n disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n _props$keepMounted = props.keepMounted,\n keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,\n modifiers = props.modifiers,\n open = props.open,\n _props$placement = props.placement,\n initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement,\n _props$popperOptions = props.popperOptions,\n popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,\n popperRefProp = props.popperRef,\n style = props.style,\n _props$transition = props.transition,\n transition = _props$transition === void 0 ? false : _props$transition,\n other = _objectWithoutProperties(props, [\"anchorEl\", \"children\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"style\", \"transition\"]);\n\n var tooltipRef = React.useRef(null);\n var ownRef = useForkRef(tooltipRef, ref);\n var popperRef = React.useRef(null);\n var handlePopperRef = useForkRef(popperRef, popperRefProp);\n var handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(function () {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, function () {\n return popperRef.current;\n }, []);\n\n var _React$useState = React.useState(true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var theme = useTheme();\n var rtlPlacement = flipPlacement(initialPlacement, theme);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n\n var _React$useState2 = React.useState(rtlPlacement),\n placement = _React$useState2[0],\n setPlacement = _React$useState2[1];\n\n React.useEffect(function () {\n if (popperRef.current) {\n popperRef.current.update();\n }\n });\n var handleOpen = React.useCallback(function () {\n if (!tooltipRef.current || !anchorEl || !open) {\n return;\n }\n\n if (popperRef.current) {\n popperRef.current.destroy();\n handlePopperRefRef.current(null);\n }\n\n var handlePopperUpdate = function handlePopperUpdate(data) {\n setPlacement(data.placement);\n };\n\n var resolvedAnchorEl = getAnchorEl(anchorEl);\n\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n var box = resolvedAnchorEl.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n\n var popper = new PopperJs(getAnchorEl(anchorEl), tooltipRef.current, _extends({\n placement: rtlPlacement\n }, popperOptions, {\n modifiers: _extends({}, disablePortal ? {} : {\n // It's using scrollParent by default, we can use the viewport when using a portal.\n preventOverflow: {\n boundariesElement: 'window'\n }\n }, modifiers, popperOptions.modifiers),\n // We could have been using a custom modifier like react-popper is doing.\n // But it seems this is the best public API for this use case.\n onCreate: createChainedFunction(handlePopperUpdate, popperOptions.onCreate),\n onUpdate: createChainedFunction(handlePopperUpdate, popperOptions.onUpdate)\n }));\n handlePopperRefRef.current(popper);\n }, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]);\n var handleRef = React.useCallback(function (node) {\n setRef(ownRef, node);\n handleOpen();\n }, [ownRef, handleOpen]);\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n var handleClose = function handleClose() {\n if (!popperRef.current) {\n return;\n }\n\n popperRef.current.destroy();\n handlePopperRefRef.current(null);\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n handleClose();\n };\n\n React.useEffect(function () {\n return function () {\n handleClose();\n };\n }, []);\n React.useEffect(function () {\n if (!open && !transition) {\n // Otherwise handleExited will call this.\n handleClose();\n }\n }, [open, transition]);\n\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n var childProps = {\n placement: placement\n };\n\n if (transition) {\n childProps.TransitionProps = {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n };\n }\n\n return /*#__PURE__*/React.createElement(Portal, {\n disablePortal: disablePortal,\n container: container\n }, /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: handleRef,\n role: \"tooltip\"\n }, other, {\n style: _extends({\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display: !open && keepMounted && !transition ? 'none' : null\n }, style)\n }), typeof children === 'function' ? children(childProps) : children));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A HTML element, [referenceObject](https://popper.js.org/docs/v1/#referenceObject),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), function (props) {\n if (props.open) {\n var resolvedAnchorEl = getAnchorEl(props.anchorEl);\n\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n var box = resolvedAnchorEl.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.clientWidth !== 'number' || typeof resolvedAnchorEl.clientHeight !== 'number' || typeof resolvedAnchorEl.getBoundingClientRect !== 'function') {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a referenceObject ', '(https://popper.js.org/docs/v1/#referenceObject).'].join('\\n'));\n }\n }\n\n return null;\n }),\n\n /**\n * Popper render function or node.\n */\n children: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.node, PropTypes.func]).isRequired,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.instanceOf(React.Component), PropTypes.func]),\n\n /**\n * Disable the portal behavior.\n * The children stay within it's parent DOM hierarchy.\n */\n disablePortal: PropTypes.bool,\n\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n */\n keepMounted: PropTypes.bool,\n\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v1/#modifiers).\n */\n modifiers: PropTypes.object,\n\n /**\n * If `true`, the popper is visible.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * Popper placement.\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * Options provided to the [`popper.js`](https://popper.js.org/docs/v1/) instance.\n */\n popperOptions: PropTypes.object,\n\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * Help supporting a react-transition-group/Transition component.\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","import * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport { elementAcceptingRef, exactProp } from '@material-ui/utils';\n\nfunction mapEventPropToEvent(eventProp) {\n return eventProp.substring(2).toLowerCase();\n}\n\nfunction clickedRootScrollbar(event) {\n return document.documentElement.clientWidth < event.clientX || document.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n */\n\n\nfunction ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = React.useRef(false);\n var nodeRef = React.useRef(null);\n var activatedRef = React.useRef(false);\n var syntheticEventRef = React.useRef(false);\n React.useEffect(function () {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(function () {\n activatedRef.current = true;\n }, 0);\n return function () {\n activatedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n nodeRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = useEventCallback(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!activatedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = ownerDocument(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n React.useEffect(function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = ownerDocument(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n React.useEffect(function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = ownerDocument(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.cloneElement(children, childrenProps));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ClickAwayListener.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The wrapped element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n */\n disableReactTree: PropTypes.bool,\n\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n */\n mouseEvent: PropTypes.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),\n\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: PropTypes.func.isRequired,\n\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n */\n touchEvent: PropTypes.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n ClickAwayListener['propTypes' + ''] = exactProp(ClickAwayListener.propTypes);\n}\n\nexport default ClickAwayListener;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport { duration } from '../styles/transitions';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\nvar styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\nvar defaultTimeout = {\n enter: duration.enteringScreen,\n exit: duration.leavingScreen\n};\n/**\n * The Fade transition is used by the [Modal](/components/modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"TransitionComponent\", \"timeout\"]);\n\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var elevations = {};\n theme.shadows.forEach(function (shadow, index) {\n elevations[\"elevation\".concat(index)] = {\n boxShadow: shadow\n };\n });\n return _extends({\n /* Styles applied to the root element. */\n root: {\n backgroundColor: theme.palette.background.paper,\n color: theme.palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n border: \"1px solid \".concat(theme.palette.divider)\n }\n }, elevations);\n};\nvar Paper = /*#__PURE__*/React.forwardRef(function Paper(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 1 : _props$elevation,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'elevation' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"square\", \"elevation\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, variant === 'outlined' ? classes.outlined : classes[\"elevation\".concat(elevation)], !square && classes.rounded),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n */\n elevation: chainPropTypes(PropTypes.number, function (props) {\n var classes = props.classes,\n elevation = props.elevation; // in case `withStyles` fails to inject we don't need this warning\n\n if (classes === undefined) {\n return null;\n }\n\n if (elevation != null && classes[\"elevation\".concat(elevation)] === undefined) {\n return new Error(\"Material-UI: This elevation `\".concat(elevation, \"` is not implemented.\"));\n }\n\n return null;\n }),\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['elevation', 'outlined'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiPaper'\n})(Paper);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nimport { elementTypeAcceptingRef } from '@material-ui/utils';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport useForkRef from '../utils/useForkRef';\nimport Typography from '../Typography';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `underline=\"none\"`. */\n underlineNone: {\n textDecoration: 'none'\n },\n\n /* Styles applied to the root element if `underline=\"hover\"`. */\n underlineHover: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline'\n }\n },\n\n /* Styles applied to the root element if `underline=\"always\"`. */\n underlineAlways: {\n textDecoration: 'underline'\n },\n // Same reset as ButtonBase.root\n\n /* Styles applied to the root element if `component=\"button\"`. */\n button: {\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$focusVisible': {\n outline: 'auto'\n }\n },\n\n /* Pseudo-class applied to the root element if the link is keyboard focused. */\n focusVisible: {}\n};\nvar Link = /*#__PURE__*/React.forwardRef(function Link(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'a' : _props$component,\n onBlur = props.onBlur,\n onFocus = props.onFocus,\n TypographyClasses = props.TypographyClasses,\n _props$underline = props.underline,\n underline = _props$underline === void 0 ? 'hover' : _props$underline,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'inherit' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"component\", \"onBlur\", \"onFocus\", \"TypographyClasses\", \"underline\", \"variant\"]);\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState = React.useState(false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n var handlerRef = useForkRef(ref, focusVisibleRef);\n\n var handleBlur = function handleBlur(event) {\n if (focusVisible) {\n onBlurVisible();\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(Typography, _extends({\n className: clsx(classes.root, classes[\"underline\".concat(capitalize(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button),\n classes: TypographyClasses,\n color: color,\n component: component,\n onBlur: handleBlur,\n onFocus: handleFocus,\n ref: handlerRef,\n variant: variant\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Link.propTypes = {\n /**\n * The content of the link.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the link.\n */\n color: PropTypes.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * `classes` prop applied to the [`Typography`](/api/typography/) element.\n */\n TypographyClasses: PropTypes.object,\n\n /**\n * Controls when the link should have an underline.\n */\n underline: PropTypes.oneOf(['none', 'hover', 'always']),\n\n /**\n * Applies the theme typography styles.\n */\n variant: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiLink'\n})(Link);","import Geometry from '../geometry/geometry';\nimport {uid} from '@luma.gl/webgl';\n\n// prettier-ignore\nconst CUBE_INDICES = new Uint16Array([\n 0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13,\n 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23\n]);\n\n// prettier-ignore\nconst CUBE_POSITIONS = new Float32Array([\n -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1,\n -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, -1,\n -1, 1, -1, -1, 1, 1, 1, 1, 1, 1, 1, -1,\n -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1,\n 1, -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1,\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1\n]);\n\n// TODO - could be Uint8\n// prettier-ignore\nconst CUBE_NORMALS = new Float32Array([\n // Front face\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1,\n // Back face\n 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1,\n // Top face\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0,\n // Bottom face\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0,\n // Right face\n 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0,\n // Left face\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0\n]);\n\n// prettier-ignore\nconst CUBE_TEX_COORDS = new Float32Array([\n // Front face\n 0, 0, 1, 0, 1, 1, 0, 1,\n // Back face\n 1, 0, 1, 1, 0, 1, 0, 0,\n // Top face\n 0, 1, 0, 0, 1, 0, 1, 1,\n // Bottom face\n 1, 1, 0, 1, 0, 0, 1, 0,\n // Right face\n 1, 0, 1, 1, 0, 1, 0, 0,\n // Left face\n 0, 0, 1, 0, 1, 1, 0, 1\n]);\n\nconst ATTRIBUTES = {\n POSITION: {size: 3, value: new Float32Array(CUBE_POSITIONS)},\n NORMAL: {size: 3, value: new Float32Array(CUBE_NORMALS)},\n TEXCOORD_0: {size: 2, value: new Float32Array(CUBE_TEX_COORDS)}\n};\n\nexport default class CubeGeometry extends Geometry {\n constructor(props = {}) {\n const {id = uid('cube-geometry')} = props;\n super({\n ...props,\n id,\n indices: {size: 1, value: new Uint16Array(CUBE_INDICES)},\n attributes: {...ATTRIBUTES, ...props.attributes}\n });\n }\n}\n","// ClipSpace\nimport GL from '@luma.gl/constants';\nimport Model from '../lib/model';\nimport Geometry from '../geometry/geometry';\n\nconst CLIPSPACE_VERTEX_SHADER = `\\\nattribute vec2 aClipSpacePosition;\nattribute vec2 aTexCoord;\nattribute vec2 aCoordinate;\n\nvarying vec2 position;\nvarying vec2 coordinate;\nvarying vec2 uv;\n\nvoid main(void) {\n gl_Position = vec4(aClipSpacePosition, 0., 1.);\n position = aClipSpacePosition;\n coordinate = aCoordinate;\n uv = aTexCoord;\n}\n`;\n\n/* eslint-disable indent, no-multi-spaces */\nconst POSITIONS = [-1, -1, 1, -1, -1, 1, 1, 1];\n\nexport default class ClipSpace extends Model {\n constructor(gl, opts) {\n const TEX_COORDS = POSITIONS.map(coord => (coord === -1 ? 0 : coord));\n\n super(\n gl,\n Object.assign({}, opts, {\n vs: CLIPSPACE_VERTEX_SHADER,\n geometry: new Geometry({\n drawMode: GL.TRIANGLE_STRIP,\n vertexCount: 4,\n attributes: {\n aClipSpacePosition: {size: 2, value: new Float32Array(POSITIONS)},\n aTexCoord: {size: 2, value: new Float32Array(TEX_COORDS)},\n aCoordinate: {size: 2, value: new Float32Array(TEX_COORDS)}\n }\n })\n })\n );\n this.setVertexCount(4);\n }\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n overflowX: 'auto'\n }\n};\nvar TableContainer = /*#__PURE__*/React.forwardRef(function TableContainer(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className)\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableContainer.propTypes = {\n /**\n * The table itself, normally `<Table />`\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableContainer'\n})(TableContainer);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport TableContext from './TableContext';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'table',\n width: '100%',\n borderCollapse: 'collapse',\n borderSpacing: 0,\n '& caption': _extends({}, theme.typography.body2, {\n padding: theme.spacing(2),\n color: theme.palette.text.secondary,\n textAlign: 'left',\n captionSide: 'bottom'\n })\n },\n\n /* Styles applied to the root element if `stickyHeader={true}`. */\n stickyHeader: {\n borderCollapse: 'separate'\n }\n };\n};\nvar defaultComponent = 'table';\nvar Table = /*#__PURE__*/React.forwardRef(function Table(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$padding = props.padding,\n padding = _props$padding === void 0 ? 'normal' : _props$padding,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$stickyHeader = props.stickyHeader,\n stickyHeader = _props$stickyHeader === void 0 ? false : _props$stickyHeader,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"padding\", \"size\", \"stickyHeader\"]);\n\n var table = React.useMemo(function () {\n return {\n padding: padding,\n size: size,\n stickyHeader: stickyHeader\n };\n }, [padding, size, stickyHeader]);\n return /*#__PURE__*/React.createElement(TableContext.Provider, {\n value: table\n }, /*#__PURE__*/React.createElement(Component, _extends({\n role: Component === defaultComponent ? null : 'table',\n ref: ref,\n className: clsx(classes.root, className, stickyHeader && classes.stickyHeader)\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Table.propTypes = {\n /**\n * The content of the table, normally `TableHead` and `TableBody`.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Allows TableCells to inherit padding of the Table.\n * `default` is deprecated, use `normal` instead.\n */\n padding: chainPropTypes(PropTypes.oneOf(['normal', 'checkbox', 'none', 'default']), function (props) {\n if (props.padding === 'default') {\n return new Error('Material-UI: padding=\"default\" was renamed to padding=\"normal\" for consistency.');\n }\n\n return null;\n }),\n\n /**\n * Allows TableCells to inherit size of the Table.\n */\n size: PropTypes.oneOf(['small', 'medium']),\n\n /**\n * Set the header sticky.\n *\n * ⚠️ It doesn't work with IE 11.\n */\n stickyHeader: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTable'\n})(Table);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-row-group'\n }\n};\nvar tablelvl2 = {\n variant: 'body'\n};\nvar defaultComponent = 'tbody';\nvar TableBody = /*#__PURE__*/React.forwardRef(function TableBody(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/React.createElement(Tablelvl2Context.Provider, {\n value: tablelvl2\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableBody.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableBody'\n})(TableBody);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nimport { alpha } from '../styles/colorManipulator';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n '&$hover:hover': {\n backgroundColor: theme.palette.action.hover\n },\n '&$selected, &$selected:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.selectedOpacity)\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `hover={true}`. */\n hover: {},\n\n /* Styles applied to the root element if table variant=\"head\". */\n head: {},\n\n /* Styles applied to the root element if table variant=\"footer\". */\n footer: {}\n };\n};\nvar defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nvar TableRow = /*#__PURE__*/React.forwardRef(function TableRow(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? false : _props$hover,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"hover\", \"selected\"]);\n\n var tablelvl2 = React.useContext(Tablelvl2Context);\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, className, tablelvl2 && {\n 'head': classes.head,\n 'footer': classes.footer\n }[tablelvl2.variant], hover && classes.hover, selected && classes.selected),\n role: Component === defaultComponent ? null : 'row'\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableRow.propTypes = {\n /**\n * Should be valid <tr> children such as `TableCell`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n */\n hover: PropTypes.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n */\n selected: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableRow'\n})(TableRow);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport { darken, alpha, lighten } from '../styles/colorManipulator';\nimport TableContext from '../Table/TableContext';\nimport Tablelvl2Context from '../Table/Tablelvl2Context';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body2, {\n display: 'table-cell',\n verticalAlign: 'inherit',\n // Workaround for a rendering bug with spanned columns in Chrome 62.0.\n // Removes the alpha (sets it to 1), and lightens or darkens the theme color.\n borderBottom: \"1px solid\\n \".concat(theme.palette.type === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),\n textAlign: 'left',\n padding: 16\n }),\n\n /* Styles applied to the root element if `variant=\"head\"` or `context.table.head`. */\n head: {\n color: theme.palette.text.primary,\n lineHeight: theme.typography.pxToRem(24),\n fontWeight: theme.typography.fontWeightMedium\n },\n\n /* Styles applied to the root element if `variant=\"body\"` or `context.table.body`. */\n body: {\n color: theme.palette.text.primary\n },\n\n /* Styles applied to the root element if `variant=\"footer\"` or `context.table.footer`. */\n footer: {\n color: theme.palette.text.secondary,\n lineHeight: theme.typography.pxToRem(21),\n fontSize: theme.typography.pxToRem(12)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: '6px 24px 6px 16px',\n '&:last-child': {\n paddingRight: 16\n },\n '&$paddingCheckbox': {\n width: 24,\n // prevent the checkbox column from growing\n padding: '0 12px 0 16px',\n '&:last-child': {\n paddingLeft: 12,\n paddingRight: 16\n },\n '& > *': {\n padding: 0\n }\n }\n },\n\n /* Styles applied to the root element if `padding=\"checkbox\"`. */\n paddingCheckbox: {\n width: 48,\n // prevent the checkbox column from growing\n padding: '0 0 0 4px',\n '&:last-child': {\n paddingLeft: 0,\n paddingRight: 4\n }\n },\n\n /* Styles applied to the root element if `padding=\"none\"`. */\n paddingNone: {\n padding: 0,\n '&:last-child': {\n padding: 0\n }\n },\n\n /* Styles applied to the root element if `align=\"left\"`. */\n alignLeft: {\n textAlign: 'left'\n },\n\n /* Styles applied to the root element if `align=\"center\"`. */\n alignCenter: {\n textAlign: 'center'\n },\n\n /* Styles applied to the root element if `align=\"right\"`. */\n alignRight: {\n textAlign: 'right',\n flexDirection: 'row-reverse'\n },\n\n /* Styles applied to the root element if `align=\"justify\"`. */\n alignJustify: {\n textAlign: 'justify'\n },\n\n /* Styles applied to the root element if `context.table.stickyHeader={true}`. */\n stickyHeader: {\n position: 'sticky',\n top: 0,\n left: 0,\n zIndex: 2,\n backgroundColor: theme.palette.background.default\n }\n };\n};\n/**\n * The component renders a `<th>` element when the parent context is a header\n * or otherwise a `<td>` element.\n */\n\nvar TableCell = /*#__PURE__*/React.forwardRef(function TableCell(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n component = props.component,\n paddingProp = props.padding,\n scopeProp = props.scope,\n sizeProp = props.size,\n sortDirection = props.sortDirection,\n variantProp = props.variant,\n other = _objectWithoutProperties(props, [\"align\", \"classes\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"]);\n\n var table = React.useContext(TableContext);\n var tablelvl2 = React.useContext(Tablelvl2Context);\n var isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n var role;\n var Component;\n\n if (component) {\n Component = component;\n role = isHeadCell ? 'columnheader' : 'cell';\n } else {\n Component = isHeadCell ? 'th' : 'td';\n }\n\n var scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n var padding = paddingProp || (table && table.padding ? table.padding : 'normal');\n var size = sizeProp || (table && table.size ? table.size : 'medium');\n var variant = variantProp || tablelvl2 && tablelvl2.variant;\n var ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: ref,\n className: clsx(classes.root, classes[variant], className, align !== 'inherit' && classes[\"align\".concat(capitalize(align))], padding !== 'normal' && classes[\"padding\".concat(capitalize(padding))], size !== 'medium' && classes[\"size\".concat(capitalize(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader),\n \"aria-sort\": ariaSort,\n role: role,\n scope: scope\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TableCell.propTypes = {\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n */\n align: PropTypes.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The table cell contents.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Sets the padding applied to the cell.\n * By default, the Table parent component set the value (`normal`).\n * `default` is deprecated, use `normal` instead.\n */\n padding: chainPropTypes(PropTypes.oneOf(['normal', 'checkbox', 'none', 'default']), function (props) {\n if (props.padding === 'default') {\n return new Error('Material-UI: padding=\"default\" was renamed to padding=\"normal\" for consistency.');\n }\n\n return null;\n }),\n\n /**\n * Set scope attribute.\n */\n scope: PropTypes.string,\n\n /**\n * Specify the size of the cell.\n * By default, the Table parent component set the value (`medium`).\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: PropTypes.oneOf(['asc', 'desc', false]),\n\n /**\n * Specify the cell type.\n * By default, the TableHead, TableBody or TableFooter parent component set the value.\n */\n variant: PropTypes.oneOf(['body', 'footer', 'head'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTableCell'\n})(TableCell);","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = _objectWithoutProperties(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, className),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion details.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionDetails'\n})(AccordionDetails);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport ButtonBase from '../ButtonBase';\nimport IconButton from '../IconButton';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from '../Accordion/AccordionContext';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused, &$focusVisible': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focused: {},\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar AccordionSummary = /*#__PURE__*/React.forwardRef(function AccordionSummary(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$IconButtonProp = props.IconButtonProps,\n IconButtonProps = _props$IconButtonProp === void 0 ? {} : _props$IconButtonProp,\n onClick = props.onClick,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"focusVisibleClassName\", \"IconButtonProps\", \"onClick\"]);\n\n var _React$useContext = React.useContext(AccordionContext),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: clsx(classes.root, className, disabled && classes.disabled, expanded && classes.expanded),\n focusVisibleClassName: clsx(classes.focusVisible, classes.focused, focusVisibleClassName),\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/React.createElement(IconButton, _extends({\n className: clsx(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? AccordionSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion summary.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n // Guard against when generation of classes is disabled in the stylesheets (`disableGeneration`).\n // For `disableGeneration` we don't have an accurate warning but `disableGeneration` is an advanced use case anyway.\n if (props.classes.focused !== undefined && props.classes.focused.indexOf(' ') !== -1) {\n return new Error(['Material-UI: The `classes.focused` key is deprecated.', 'Use `classes.focusVisible` instead.', 'The name of the pseudo-class was changed for consistency.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: PropTypes.node,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: PropTypes.object,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordionSummary'\n})(AccordionSummary);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport requirePropFactory from '../utils/requirePropFactory';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nvar SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nvar GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n\nfunction generateGrid(globalStyles, theme, breakpoint) {\n var styles = {};\n GRID_SIZES.forEach(function (size) {\n var key = \"grid-\".concat(breakpoint, \"-\").concat(size);\n\n if (size === true) {\n // For the auto layouting\n styles[key] = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n return;\n }\n\n if (size === 'auto') {\n styles[key] = {\n flexBasis: 'auto',\n flexGrow: 0,\n maxWidth: 'none'\n };\n return;\n } // Keep 7 significant numbers.\n\n\n var width = \"\".concat(Math.round(size / 12 * 10e7) / 10e5, \"%\"); // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n\n styles[key] = {\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n };\n }); // No need for a media query for the first size.\n\n if (breakpoint === 'xs') {\n _extends(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n}\n\nfunction getOffset(val) {\n var div = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var parse = parseFloat(val);\n return \"\".concat(parse / div).concat(String(val).replace(String(parse), '') || 'px');\n}\n\nfunction generateGutter(theme, breakpoint) {\n var styles = {};\n SPACINGS.forEach(function (spacing) {\n var themeSpacing = theme.spacing(spacing);\n\n if (themeSpacing === 0) {\n return;\n }\n\n styles[\"spacing-\".concat(breakpoint, \"-\").concat(spacing)] = {\n margin: \"-\".concat(getOffset(themeSpacing, 2)),\n width: \"calc(100% + \".concat(getOffset(themeSpacing), \")\"),\n '& > $item': {\n padding: getOffset(themeSpacing, 2)\n }\n };\n });\n return styles;\n} // Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\n\n\nexport var styles = function styles(theme) {\n return _extends({\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `container={true}`. */\n container: {\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n },\n\n /* Styles applied to the root element if `item={true}`. */\n item: {\n boxSizing: 'border-box',\n margin: '0' // For instance, it's useful when used with a `figure` element.\n\n },\n\n /* Styles applied to the root element if `zeroMinWidth={true}`. */\n zeroMinWidth: {\n minWidth: 0\n },\n\n /* Styles applied to the root element if `direction=\"column\"`. */\n 'direction-xs-column': {\n flexDirection: 'column'\n },\n\n /* Styles applied to the root element if `direction=\"column-reverse\"`. */\n 'direction-xs-column-reverse': {\n flexDirection: 'column-reverse'\n },\n\n /* Styles applied to the root element if `direction=\"row-reverse\"`. */\n 'direction-xs-row-reverse': {\n flexDirection: 'row-reverse'\n },\n\n /* Styles applied to the root element if `wrap=\"nowrap\"`. */\n 'wrap-xs-nowrap': {\n flexWrap: 'nowrap'\n },\n\n /* Styles applied to the root element if `wrap=\"reverse\"`. */\n 'wrap-xs-wrap-reverse': {\n flexWrap: 'wrap-reverse'\n },\n\n /* Styles applied to the root element if `alignItems=\"center\"`. */\n 'align-items-xs-center': {\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `alignItems=\"flex-start\"`. */\n 'align-items-xs-flex-start': {\n alignItems: 'flex-start'\n },\n\n /* Styles applied to the root element if `alignItems=\"flex-end\"`. */\n 'align-items-xs-flex-end': {\n alignItems: 'flex-end'\n },\n\n /* Styles applied to the root element if `alignItems=\"baseline\"`. */\n 'align-items-xs-baseline': {\n alignItems: 'baseline'\n },\n\n /* Styles applied to the root element if `alignContent=\"center\"`. */\n 'align-content-xs-center': {\n alignContent: 'center'\n },\n\n /* Styles applied to the root element if `alignContent=\"flex-start\"`. */\n 'align-content-xs-flex-start': {\n alignContent: 'flex-start'\n },\n\n /* Styles applied to the root element if `alignContent=\"flex-end\"`. */\n 'align-content-xs-flex-end': {\n alignContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `alignContent=\"space-between\"`. */\n 'align-content-xs-space-between': {\n alignContent: 'space-between'\n },\n\n /* Styles applied to the root element if `alignContent=\"space-around\"`. */\n 'align-content-xs-space-around': {\n alignContent: 'space-around'\n },\n\n /* Styles applied to the root element if `justifyContent=\"center\"`. */\n 'justify-content-xs-center': {\n justifyContent: 'center'\n },\n\n /* Styles applied to the root element if `justifyContent=\"flex-end\"`. */\n 'justify-content-xs-flex-end': {\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `justifyContent=\"space-between\"`. */\n 'justify-content-xs-space-between': {\n justifyContent: 'space-between'\n },\n\n /* Styles applied to the root element if `justifyContent=\"space-around\"`. */\n 'justify-content-xs-space-around': {\n justifyContent: 'space-around'\n },\n\n /* Styles applied to the root element if `justifyContent=\"space-evenly\"`. */\n 'justify-content-xs-space-evenly': {\n justifyContent: 'space-evenly'\n }\n }, generateGutter(theme, 'xs'), theme.breakpoints.keys.reduce(function (accumulator, key) {\n // Use side effect over immutability for better performance.\n generateGrid(accumulator, theme, key);\n return accumulator;\n }, {}));\n};\nvar Grid = /*#__PURE__*/React.forwardRef(function Grid(props, ref) {\n var _props$alignContent = props.alignContent,\n alignContent = _props$alignContent === void 0 ? 'stretch' : _props$alignContent,\n _props$alignItems = props.alignItems,\n alignItems = _props$alignItems === void 0 ? 'stretch' : _props$alignItems,\n classes = props.classes,\n classNameProp = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$container = props.container,\n container = _props$container === void 0 ? false : _props$container,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'row' : _props$direction,\n _props$item = props.item,\n item = _props$item === void 0 ? false : _props$item,\n justify = props.justify,\n _props$justifyContent = props.justifyContent,\n justifyContent = _props$justifyContent === void 0 ? 'flex-start' : _props$justifyContent,\n _props$lg = props.lg,\n lg = _props$lg === void 0 ? false : _props$lg,\n _props$md = props.md,\n md = _props$md === void 0 ? false : _props$md,\n _props$sm = props.sm,\n sm = _props$sm === void 0 ? false : _props$sm,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? 0 : _props$spacing,\n _props$wrap = props.wrap,\n wrap = _props$wrap === void 0 ? 'wrap' : _props$wrap,\n _props$xl = props.xl,\n xl = _props$xl === void 0 ? false : _props$xl,\n _props$xs = props.xs,\n xs = _props$xs === void 0 ? false : _props$xs,\n _props$zeroMinWidth = props.zeroMinWidth,\n zeroMinWidth = _props$zeroMinWidth === void 0 ? false : _props$zeroMinWidth,\n other = _objectWithoutProperties(props, [\"alignContent\", \"alignItems\", \"classes\", \"className\", \"component\", \"container\", \"direction\", \"item\", \"justify\", \"justifyContent\", \"lg\", \"md\", \"sm\", \"spacing\", \"wrap\", \"xl\", \"xs\", \"zeroMinWidth\"]);\n\n var className = clsx(classes.root, classNameProp, container && [classes.container, spacing !== 0 && classes[\"spacing-xs-\".concat(String(spacing))]], item && classes.item, zeroMinWidth && classes.zeroMinWidth, direction !== 'row' && classes[\"direction-xs-\".concat(String(direction))], wrap !== 'wrap' && classes[\"wrap-xs-\".concat(String(wrap))], alignItems !== 'stretch' && classes[\"align-items-xs-\".concat(String(alignItems))], alignContent !== 'stretch' && classes[\"align-content-xs-\".concat(String(alignContent))], (justify || justifyContent) !== 'flex-start' && classes[\"justify-content-xs-\".concat(String(justify || justifyContent))], xs !== false && classes[\"grid-xs-\".concat(String(xs))], sm !== false && classes[\"grid-sm-\".concat(String(sm))], md !== false && classes[\"grid-md-\".concat(String(md))], lg !== false && classes[\"grid-lg-\".concat(String(lg))], xl !== false && classes[\"grid-xl-\".concat(String(xl))]);\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: className,\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Grid.propTypes = {\n /**\n * Defines the `align-content` style property.\n * It's applied for all screen sizes.\n */\n alignContent: PropTypes.oneOf(['stretch', 'center', 'flex-start', 'flex-end', 'space-between', 'space-around']),\n\n /**\n * Defines the `align-items` style property.\n * It's applied for all screen sizes.\n */\n alignItems: PropTypes.oneOf(['flex-start', 'center', 'flex-end', 'stretch', 'baseline']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n */\n container: PropTypes.bool,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n */\n direction: PropTypes.oneOf(['row', 'row-reverse', 'column', 'column-reverse']),\n\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n */\n item: PropTypes.bool,\n\n /**\n * Defines the `justify-content` style property.\n * It is applied for all screen sizes.\n * @deprecated Use `justifyContent` instead, the prop was renamed\n */\n justify: deprecatedPropType(PropTypes.oneOf(['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly']), 'Use `justifyContent` instead, the prop was renamed.'),\n\n /**\n * Defines the `justify-content` style property.\n * It is applied for all screen sizes.\n */\n justifyContent: PropTypes.oneOf(['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n */\n lg: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n */\n md: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n */\n sm: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the space between the type `item` component.\n * It can only be used on a type `container` component.\n */\n spacing: PropTypes.oneOf(SPACINGS),\n\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n */\n wrap: PropTypes.oneOf(['nowrap', 'wrap', 'wrap-reverse']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n */\n xl: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n */\n xs: PropTypes.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n */\n zeroMinWidth: PropTypes.bool\n} : void 0;\nvar StyledGrid = withStyles(styles, {\n name: 'MuiGrid'\n})(Grid);\n\nif (process.env.NODE_ENV !== 'production') {\n var requireProp = requirePropFactory('Grid');\n StyledGrid.propTypes = _extends({}, StyledGrid.propTypes, {\n alignContent: requireProp('container'),\n alignItems: requireProp('container'),\n direction: requireProp('container'),\n justifyContent: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\n\nexport default StyledGrid;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { isFilled, isAdornedStart } from '../InputBase/utils';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport isMuiElement from '../utils/isMuiElement';\nimport FormControlContext from './FormControlContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top' // Fix alignment issue on Safari.\n\n },\n\n /* Styles applied to the root element if `margin=\"normal\"`. */\n marginNormal: {\n marginTop: 16,\n marginBottom: 8\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n marginTop: 8,\n marginBottom: 4\n },\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n }\n};\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * <FormControl>\n * <InputLabel htmlFor=\"my-input\">Email address</InputLabel>\n * <Input id=\"my-input\" aria-describedby=\"my-helper-text\" />\n * <FormHelperText id=\"my-helper-text\">We'll never share your email.</FormHelperText>\n * </FormControl>\n * ```\n *\n * ⚠️Only one input can be used within a FormControl.\n */\n\nvar FormControl = /*#__PURE__*/React.forwardRef(function FormControl(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n visuallyFocused = props.focused,\n _props$hiddenLabel = props.hiddenLabel,\n hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel,\n _props$margin = props.margin,\n margin = _props$margin === void 0 ? 'none' : _props$margin,\n _props$required = props.required,\n required = _props$required === void 0 ? false : _props$required,\n size = props.size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"fullWidth\", \"focused\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"]);\n\n var _React$useState = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialAdornedStart = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n var input = isMuiElement(child, ['Select']) ? child.props.input : child;\n\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n }),\n adornedStart = _React$useState[0],\n setAdornedStart = _React$useState[1];\n\n var _React$useState2 = React.useState(function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialFilled = false;\n\n if (children) {\n React.Children.forEach(children, function (child) {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n\n if (isFilled(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n }),\n filled = _React$useState2[0],\n setFilled = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n _focused = _React$useState3[0],\n setFocused = _React$useState3[1];\n\n var focused = visuallyFocused !== undefined ? visuallyFocused : _focused;\n\n if (disabled && focused) {\n setFocused(false);\n }\n\n var registerEffect;\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var registeredInput = React.useRef(false);\n\n registerEffect = function registerEffect() {\n if (registeredInput.current) {\n console.error(['Material-UI: There are multiple InputBase components inside a FormControl.', 'This is not supported. It might cause infinite rendering loops.', 'Only use one InputBase.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return function () {\n registeredInput.current = false;\n };\n };\n }\n\n var onFilled = React.useCallback(function () {\n setFilled(true);\n }, []);\n var onEmpty = React.useCallback(function () {\n setFilled(false);\n }, []);\n var childContext = {\n adornedStart: adornedStart,\n setAdornedStart: setAdornedStart,\n color: color,\n disabled: disabled,\n error: error,\n filled: filled,\n focused: focused,\n fullWidth: fullWidth,\n hiddenLabel: hiddenLabel,\n margin: (size === 'small' ? 'dense' : undefined) || margin,\n onBlur: function onBlur() {\n setFocused(false);\n },\n onEmpty: onEmpty,\n onFilled: onFilled,\n onFocus: function onFocus() {\n setFocused(true);\n },\n registerEffect: registerEffect,\n required: required,\n variant: variant\n };\n return /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: childContext\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, margin !== 'none' && classes[\"margin\".concat(capitalize(margin))], fullWidth && classes.fullWidth),\n ref: ref\n }, other), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the form control.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the component will be displayed in focused state.\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * If `true`, the label will be hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n */\n hiddenLabel: PropTypes.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the text field.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormControl'\n})(FormControl);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport { alpha } from '../styles/colorManipulator';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, {\n boxSizing: 'border-box',\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.text.primary,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n },\n '&$disabled': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // Ensure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `variant=\"text\"`. */\n text: {\n padding: '6px 8px'\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`. */\n textPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`. */\n textSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n padding: '5px 15px',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabledBackground)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(alpha(theme.palette.primary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.primary.main),\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(alpha(theme.palette.secondary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.secondary.main),\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabled)\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&:active': {\n boxShadow: theme.shadows[8]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"primary\"`. */\n containedPrimary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"secondary\"`. */\n containedSecondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n '&$focusVisible': {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n '&$disabled': {\n boxShadow: 'none'\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit',\n borderColor: 'currentColor'\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"text\"`. */\n textSizeSmall: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"text\"`. */\n textSizeLarge: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"outlined\"`. */\n outlinedSizeSmall: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"outlined\"`. */\n outlinedSizeLarge: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"contained\"`. */\n containedSizeSmall: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"contained\"`. */\n containedSizeLarge: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {},\n\n /* Styles applied to the root element if `size=\"large\"`. */\n sizeLarge: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the startIcon element if supplied. */\n startIcon: {\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n '&$iconSizeSmall': {\n marginLeft: -2\n }\n },\n\n /* Styles applied to the endIcon element if supplied. */\n endIcon: {\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n '&$iconSizeSmall': {\n marginRight: -2\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"small\"`. */\n iconSizeSmall: {\n '& > *:first-child': {\n fontSize: 18\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"medium\"`. */\n iconSizeMedium: {\n '& > *:first-child': {\n fontSize: 20\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"large\"`. */\n iconSizeLarge: {\n '& > *:first-child': {\n fontSize: 22\n }\n }\n };\n};\nvar Button = /*#__PURE__*/React.forwardRef(function Button(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n endIconProp = props.endIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n startIconProp = props.startIcon,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'text' : _props$variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"]);\n\n var startIcon = startIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.startIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, startIconProp);\n var endIcon = endIconProp && /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.endIcon, classes[\"iconSize\".concat(capitalize(size))])\n }, endIconProp);\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n className: clsx(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes[\"\".concat(variant).concat(capitalize(color))], size !== 'medium' && [classes[\"\".concat(variant, \"Size\").concat(capitalize(size))], classes[\"size\".concat(capitalize(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, startIcon, children, endIcon));\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: PropTypes.oneOf(['large', 'medium', 'small']),\n\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['contained', 'outlined', 'text'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiButton'\n})(Button);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nimport unsupportedProp from '../utils/unsupportedProp';\nexport var styles = function styles(theme) {\n var _extends2;\n\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.button, (_extends2 = {\n maxWidth: 264,\n minWidth: 72,\n position: 'relative',\n boxSizing: 'border-box',\n minHeight: 48,\n flexShrink: 0,\n padding: '6px 12px'\n }, _defineProperty(_extends2, theme.breakpoints.up('sm'), {\n padding: '6px 24px'\n }), _defineProperty(_extends2, \"overflow\", 'hidden'), _defineProperty(_extends2, \"whiteSpace\", 'normal'), _defineProperty(_extends2, \"textAlign\", 'center'), _defineProperty(_extends2, theme.breakpoints.up('sm'), {\n minWidth: 160\n }), _extends2)),\n\n /* Styles applied to the root element if both `icon` and `label` are provided. */\n labelIcon: {\n minHeight: 72,\n paddingTop: 9,\n '& $wrapper > *:first-child': {\n marginBottom: 6\n }\n },\n\n /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"inherit\"`. */\n textColorInherit: {\n color: 'inherit',\n opacity: 0.7,\n '&$selected': {\n opacity: 1\n },\n '&$disabled': {\n opacity: 0.5\n }\n },\n\n /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"primary\"`. */\n textColorPrimary: {\n color: theme.palette.text.secondary,\n '&$selected': {\n color: theme.palette.primary.main\n },\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n },\n\n /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"secondary\"`. */\n textColorSecondary: {\n color: theme.palette.text.secondary,\n '&$selected': {\n color: theme.palette.secondary.main\n },\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}` (controlled by the Tabs component). */\n selected: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}` (controlled by the Tabs component). */\n disabled: {},\n\n /* Styles applied to the root element if `fullWidth={true}` (controlled by the Tabs component). */\n fullWidth: {\n flexShrink: 1,\n flexGrow: 1,\n flexBasis: 0,\n maxWidth: 'none'\n },\n\n /* Styles applied to the root element if `wrapped={true}`. */\n wrapped: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.5\n },\n\n /* Styles applied to the `icon` and `label`'s wrapper element. */\n wrapper: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n flexDirection: 'column'\n }\n };\n};\nvar Tab = /*#__PURE__*/React.forwardRef(function Tab(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n fullWidth = props.fullWidth,\n icon = props.icon,\n indicator = props.indicator,\n label = props.label,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n selected = props.selected,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$wrapped = props.wrapped,\n wrapped = _props$wrapped === void 0 ? false : _props$wrapped,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disabled\", \"disableFocusRipple\", \"fullWidth\", \"icon\", \"indicator\", \"label\", \"onChange\", \"onClick\", \"onFocus\", \"selected\", \"selectionFollowsFocus\", \"textColor\", \"value\", \"wrapped\"]);\n\n var handleClick = function handleClick(event) {\n if (onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (selectionFollowsFocus && !selected && onChange) {\n onChange(event, value);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n focusRipple: !disableFocusRipple,\n className: clsx(classes.root, classes[\"textColor\".concat(capitalize(textColor))], className, disabled && classes.disabled, selected && classes.selected, label && icon && classes.labelIcon, fullWidth && classes.fullWidth, wrapped && classes.wrapped),\n ref: ref,\n role: \"tab\",\n \"aria-selected\": selected,\n disabled: disabled,\n onClick: handleClick,\n onFocus: handleFocus,\n tabIndex: selected ? 0 : -1\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.wrapper\n }, icon, label), indicator);\n});\nprocess.env.NODE_ENV !== \"production\" ? Tab.propTypes = {\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the tab will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * @ignore\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The icon element.\n */\n icon: PropTypes.node,\n\n /**\n * @ignore\n * For server-side rendering consideration, we let the selected tab\n * render the indicator.\n */\n indicator: PropTypes.node,\n\n /**\n * The label element.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n selected: PropTypes.bool,\n\n /**\n * @ignore\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * @ignore\n */\n textColor: PropTypes.oneOf(['secondary', 'primary', 'inherit']),\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: PropTypes.any,\n\n /**\n * Tab labels appear in a single row.\n * They can use a second line if needed.\n */\n wrapped: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTab'\n})(Tab);","import interval from \"./interval.js\";\nimport {durationWeek} from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\n\nvar utcDay = interval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n return (end - start) / durationDay;\n}, function(date) {\n return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(function(date) {\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setDate(date.getDate() + step);\n}, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function(date) {\n return date.getDate() - 1;\n});\n\nexport default day;\nexport var days = day.range;\n","import interval from \"./interval.js\";\n\nvar year = interval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function(date) {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;\n","import interval from \"./interval.js\";\n\nvar utcYear = interval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport ThemeContext from '../useTheme/ThemeContext';\nimport useTheme from '../useTheme';\nimport nested from './nested'; // To support composition of theme.\n\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n var mergedTheme = localTheme(outerTheme);\n\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['Material-UI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\\n'));\n }\n }\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, localTheme);\n}\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\n\n\nfunction ThemeProvider(props) {\n var children = props.children,\n localTheme = props.theme;\n var outerTheme = useTheme();\n\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['Material-UI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n\n var theme = React.useMemo(function () {\n var output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, children);\n}\n\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\n\nexport default ThemeProvider;","const EMPTY = {};\nexport default function shallowEqual(a = EMPTY, b = EMPTY) {\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n return a === b || aKeys.length === bKeys.length && aKeys.every(key => a[key] === b[key]);\n}","/*!\n * https://github.com/Starcounter-Jack/JSON-Patch\n * (c) 2017 Joachim Wester\n * MIT license\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\nexport function hasOwnProperty(obj, key) {\n return _hasOwnProperty.call(obj, key);\n}\nexport function _objectKeys(obj) {\n if (Array.isArray(obj)) {\n var keys = new Array(obj.length);\n for (var k = 0; k < keys.length; k++) {\n keys[k] = \"\" + k;\n }\n return keys;\n }\n if (Object.keys) {\n return Object.keys(obj);\n }\n var keys = [];\n for (var i in obj) {\n if (hasOwnProperty(obj, i)) {\n keys.push(i);\n }\n }\n return keys;\n}\n;\n/**\n* Deeply clone the object.\n* https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)\n* @param {any} obj value to clone\n* @return {any} cloned obj\n*/\nexport function _deepClone(obj) {\n switch (typeof obj) {\n case \"object\":\n return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5\n case \"undefined\":\n return null; //this is how JSON.stringify behaves for array items\n default:\n return obj; //no need to clone primitives\n }\n}\n//3x faster than cached /^\\d+$/.test(str)\nexport function isInteger(str) {\n var i = 0;\n var len = str.length;\n var charCode;\n while (i < len) {\n charCode = str.charCodeAt(i);\n if (charCode >= 48 && charCode <= 57) {\n i++;\n continue;\n }\n return false;\n }\n return true;\n}\n/**\n* Escapes a json pointer path\n* @param path The raw pointer\n* @return the Escaped path\n*/\nexport function escapePathComponent(path) {\n if (path.indexOf('/') === -1 && path.indexOf('~') === -1)\n return path;\n return path.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n/**\n * Unescapes a json pointer path\n * @param path The escaped pointer\n * @return The unescaped path\n */\nexport function unescapePathComponent(path) {\n return path.replace(/~1/g, '/').replace(/~0/g, '~');\n}\nexport function _getPathRecursive(root, obj) {\n var found;\n for (var key in root) {\n if (hasOwnProperty(root, key)) {\n if (root[key] === obj) {\n return escapePathComponent(key) + '/';\n }\n else if (typeof root[key] === 'object') {\n found = _getPathRecursive(root[key], obj);\n if (found != '') {\n return escapePathComponent(key) + '/' + found;\n }\n }\n }\n }\n return '';\n}\nexport function getPath(root, obj) {\n if (root === obj) {\n return '/';\n }\n var path = _getPathRecursive(root, obj);\n if (path === '') {\n throw new Error(\"Object not found in root\");\n }\n return '/' + path;\n}\n/**\n* Recursively checks whether an object has any undefined values inside.\n*/\nexport function hasUndefined(obj) {\n if (obj === undefined) {\n return true;\n }\n if (obj) {\n if (Array.isArray(obj)) {\n for (var i = 0, len = obj.length; i < len; i++) {\n if (hasUndefined(obj[i])) {\n return true;\n }\n }\n }\n else if (typeof obj === \"object\") {\n var objKeys = _objectKeys(obj);\n var objKeysLength = objKeys.length;\n for (var i = 0; i < objKeysLength; i++) {\n if (hasUndefined(obj[objKeys[i]])) {\n return true;\n }\n }\n }\n }\n return false;\n}\nfunction patchErrorMessageFormatter(message, args) {\n var messageParts = [message];\n for (var key in args) {\n var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print\n if (typeof value !== 'undefined') {\n messageParts.push(key + \": \" + value);\n }\n }\n return messageParts.join('\\n');\n}\nvar PatchError = /** @class */ (function (_super) {\n __extends(PatchError, _super);\n function PatchError(message, name, index, operation, tree) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;\n _this.name = name;\n _this.index = index;\n _this.operation = operation;\n _this.tree = tree;\n Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359\n _this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });\n return _this;\n }\n return PatchError;\n}(Error));\nexport { PatchError };\n","import { PatchError, _deepClone, isInteger, unescapePathComponent, hasUndefined } from './helpers.mjs';\nexport var JsonPatchError = PatchError;\nexport var deepClone = _deepClone;\n/* We use a Javascript hash to store each\n function. Each hash entry (property) uses\n the operation identifiers specified in rfc6902.\n In this way, we can map each patch operation\n to its dedicated function in efficient way.\n */\n/* The operations applicable to an object */\nvar objOps = {\n add: function (obj, key, document) {\n obj[key] = this.value;\n return { newDocument: document };\n },\n remove: function (obj, key, document) {\n var removed = obj[key];\n delete obj[key];\n return { newDocument: document, removed: removed };\n },\n replace: function (obj, key, document) {\n var removed = obj[key];\n obj[key] = this.value;\n return { newDocument: document, removed: removed };\n },\n move: function (obj, key, document) {\n /* in case move target overwrites an existing value,\n return the removed value, this can be taxing performance-wise,\n and is potentially unneeded */\n var removed = getValueByPointer(document, this.path);\n if (removed) {\n removed = _deepClone(removed);\n }\n var originalValue = applyOperation(document, { op: \"remove\", path: this.from }).removed;\n applyOperation(document, { op: \"add\", path: this.path, value: originalValue });\n return { newDocument: document, removed: removed };\n },\n copy: function (obj, key, document) {\n var valueToCopy = getValueByPointer(document, this.from);\n // enforce copy by value so further operations don't affect source (see issue #177)\n applyOperation(document, { op: \"add\", path: this.path, value: _deepClone(valueToCopy) });\n return { newDocument: document };\n },\n test: function (obj, key, document) {\n return { newDocument: document, test: _areEquals(obj[key], this.value) };\n },\n _get: function (obj, key, document) {\n this.value = obj[key];\n return { newDocument: document };\n }\n};\n/* The operations applicable to an array. Many are the same as for the object */\nvar arrOps = {\n add: function (arr, i, document) {\n if (isInteger(i)) {\n arr.splice(i, 0, this.value);\n }\n else { // array props\n arr[i] = this.value;\n }\n // this may be needed when using '-' in an array\n return { newDocument: document, index: i };\n },\n remove: function (arr, i, document) {\n var removedList = arr.splice(i, 1);\n return { newDocument: document, removed: removedList[0] };\n },\n replace: function (arr, i, document) {\n var removed = arr[i];\n arr[i] = this.value;\n return { newDocument: document, removed: removed };\n },\n move: objOps.move,\n copy: objOps.copy,\n test: objOps.test,\n _get: objOps._get\n};\n/**\n * Retrieves a value from a JSON document by a JSON pointer.\n * Returns the value.\n *\n * @param document The document to get the value from\n * @param pointer an escaped JSON pointer\n * @return The retrieved value\n */\nexport function getValueByPointer(document, pointer) {\n if (pointer == '') {\n return document;\n }\n var getOriginalDestination = { op: \"_get\", path: pointer };\n applyOperation(document, getOriginalDestination);\n return getOriginalDestination.value;\n}\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the {newDocument, result} of the operation.\n * It modifies the `document` and `operation` objects - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyOperation(document, jsonpatch._deepClone(operation))`.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return `{newDocument, result}` after the operation\n */\nexport function applyOperation(document, operation, validateOperation, mutateDocument, banPrototypeModifications, index) {\n if (validateOperation === void 0) { validateOperation = false; }\n if (mutateDocument === void 0) { mutateDocument = true; }\n if (banPrototypeModifications === void 0) { banPrototypeModifications = true; }\n if (index === void 0) { index = 0; }\n if (validateOperation) {\n if (typeof validateOperation == 'function') {\n validateOperation(operation, 0, document, operation.path);\n }\n else {\n validator(operation, 0);\n }\n }\n /* ROOT OPERATIONS */\n if (operation.path === \"\") {\n var returnValue = { newDocument: document };\n if (operation.op === 'add') {\n returnValue.newDocument = operation.value;\n return returnValue;\n }\n else if (operation.op === 'replace') {\n returnValue.newDocument = operation.value;\n returnValue.removed = document; //document we removed\n return returnValue;\n }\n else if (operation.op === 'move' || operation.op === 'copy') { // it's a move or copy to root\n returnValue.newDocument = getValueByPointer(document, operation.from); // get the value by json-pointer in `from` field\n if (operation.op === 'move') { // report removed item\n returnValue.removed = document;\n }\n return returnValue;\n }\n else if (operation.op === 'test') {\n returnValue.test = _areEquals(document, operation.value);\n if (returnValue.test === false) {\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n returnValue.newDocument = document;\n return returnValue;\n }\n else if (operation.op === 'remove') { // a remove on root\n returnValue.removed = document;\n returnValue.newDocument = null;\n return returnValue;\n }\n else if (operation.op === '_get') {\n operation.value = document;\n return returnValue;\n }\n else { /* bad operation */\n if (validateOperation) {\n throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);\n }\n else {\n return returnValue;\n }\n }\n } /* END ROOT OPERATIONS */\n else {\n if (!mutateDocument) {\n document = _deepClone(document);\n }\n var path = operation.path || \"\";\n var keys = path.split('/');\n var obj = document;\n var t = 1; //skip empty element - http://jsperf.com/to-shift-or-not-to-shift\n var len = keys.length;\n var existingPathFragment = undefined;\n var key = void 0;\n var validateFunction = void 0;\n if (typeof validateOperation == 'function') {\n validateFunction = validateOperation;\n }\n else {\n validateFunction = validator;\n }\n while (true) {\n key = keys[t];\n if (key && key.indexOf('~') != -1) {\n key = unescapePathComponent(key);\n }\n if (banPrototypeModifications && key == '__proto__') {\n throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');\n }\n if (validateOperation) {\n if (existingPathFragment === undefined) {\n if (obj[key] === undefined) {\n existingPathFragment = keys.slice(0, t).join('/');\n }\n else if (t == len - 1) {\n existingPathFragment = operation.path;\n }\n if (existingPathFragment !== undefined) {\n validateFunction(operation, 0, document, existingPathFragment);\n }\n }\n }\n t++;\n if (Array.isArray(obj)) {\n if (key === '-') {\n key = obj.length;\n }\n else {\n if (validateOperation && !isInteger(key)) {\n throw new JsonPatchError(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\", \"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\", index, operation, document);\n } // only parse key when it's an integer for `arr.prop` to work\n else if (isInteger(key)) {\n key = ~~key;\n }\n }\n if (t >= len) {\n if (validateOperation && operation.op === \"add\" && key > obj.length) {\n throw new JsonPatchError(\"The specified index MUST NOT be greater than the number of elements in the array\", \"OPERATION_VALUE_OUT_OF_BOUNDS\", index, operation, document);\n }\n var returnValue = arrOps[operation.op].call(operation, obj, key, document); // Apply patch\n if (returnValue.test === false) {\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return returnValue;\n }\n }\n else {\n if (t >= len) {\n var returnValue = objOps[operation.op].call(operation, obj, key, document); // Apply patch\n if (returnValue.test === false) {\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return returnValue;\n }\n }\n obj = obj[key];\n // If we have more keys in the path, but the next value isn't a non-null object,\n // throw an OPERATION_PATH_UNRESOLVABLE error instead of iterating again.\n if (validateOperation && t < len && (!obj || typeof obj !== \"object\")) {\n throw new JsonPatchError('Cannot perform operation at the desired path', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);\n }\n }\n }\n}\n/**\n * Apply a full JSON Patch array on a JSON document.\n * Returns the {newDocument, result} of the patch.\n * It modifies the `document` object and `patch` - it gets the values by reference.\n * If you would like to avoid touching your values, clone them:\n * `jsonpatch.applyPatch(document, jsonpatch._deepClone(patch))`.\n *\n * @param document The document to patch\n * @param patch The patch to apply\n * @param validateOperation `false` is without validation, `true` to use default jsonpatch's validation, or you can pass a `validateOperation` callback to be used for validation.\n * @param mutateDocument Whether to mutate the original document or clone it before applying\n * @param banPrototypeModifications Whether to ban modifications to `__proto__`, defaults to `true`.\n * @return An array of `{newDocument, result}` after the patch\n */\nexport function applyPatch(document, patch, validateOperation, mutateDocument, banPrototypeModifications) {\n if (mutateDocument === void 0) { mutateDocument = true; }\n if (banPrototypeModifications === void 0) { banPrototypeModifications = true; }\n if (validateOperation) {\n if (!Array.isArray(patch)) {\n throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');\n }\n }\n if (!mutateDocument) {\n document = _deepClone(document);\n }\n var results = new Array(patch.length);\n for (var i = 0, length_1 = patch.length; i < length_1; i++) {\n // we don't need to pass mutateDocument argument because if it was true, we already deep cloned the object, we'll just pass `true`\n results[i] = applyOperation(document, patch[i], validateOperation, true, banPrototypeModifications, i);\n document = results[i].newDocument; // in case root was replaced\n }\n results.newDocument = document;\n return results;\n}\n/**\n * Apply a single JSON Patch Operation on a JSON document.\n * Returns the updated document.\n * Suitable as a reducer.\n *\n * @param document The document to patch\n * @param operation The operation to apply\n * @return The updated document\n */\nexport function applyReducer(document, operation, index) {\n var operationResult = applyOperation(document, operation);\n if (operationResult.test === false) { // failed test\n throw new JsonPatchError(\"Test operation failed\", 'TEST_OPERATION_FAILED', index, operation, document);\n }\n return operationResult.newDocument;\n}\n/**\n * Validates a single operation. Called from `jsonpatch.validate`. Throws `JsonPatchError` in case of an error.\n * @param {object} operation - operation object (patch)\n * @param {number} index - index of operation in the sequence\n * @param {object} [document] - object where the operation is supposed to be applied\n * @param {string} [existingPathFragment] - comes along with `document`\n */\nexport function validator(operation, index, document, existingPathFragment) {\n if (typeof operation !== 'object' || operation === null || Array.isArray(operation)) {\n throw new JsonPatchError('Operation is not an object', 'OPERATION_NOT_AN_OBJECT', index, operation, document);\n }\n else if (!objOps[operation.op]) {\n throw new JsonPatchError('Operation `op` property is not one of operations defined in RFC-6902', 'OPERATION_OP_INVALID', index, operation, document);\n }\n else if (typeof operation.path !== 'string') {\n throw new JsonPatchError('Operation `path` property is not a string', 'OPERATION_PATH_INVALID', index, operation, document);\n }\n else if (operation.path.indexOf('/') !== 0 && operation.path.length > 0) {\n // paths that aren't empty string should start with \"/\"\n throw new JsonPatchError('Operation `path` property must start with \"/\"', 'OPERATION_PATH_INVALID', index, operation, document);\n }\n else if ((operation.op === 'move' || operation.op === 'copy') && typeof operation.from !== 'string') {\n throw new JsonPatchError('Operation `from` property is not present (applicable in `move` and `copy` operations)', 'OPERATION_FROM_REQUIRED', index, operation, document);\n }\n else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && operation.value === undefined) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_REQUIRED', index, operation, document);\n }\n else if ((operation.op === 'add' || operation.op === 'replace' || operation.op === 'test') && hasUndefined(operation.value)) {\n throw new JsonPatchError('Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)', 'OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED', index, operation, document);\n }\n else if (document) {\n if (operation.op == \"add\") {\n var pathLen = operation.path.split(\"/\").length;\n var existingPathLen = existingPathFragment.split(\"/\").length;\n if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {\n throw new JsonPatchError('Cannot perform an `add` operation at the desired path', 'OPERATION_PATH_CANNOT_ADD', index, operation, document);\n }\n }\n else if (operation.op === 'replace' || operation.op === 'remove' || operation.op === '_get') {\n if (operation.path !== existingPathFragment) {\n throw new JsonPatchError('Cannot perform the operation at a path that does not exist', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);\n }\n }\n else if (operation.op === 'move' || operation.op === 'copy') {\n var existingValue = { op: \"_get\", path: operation.from, value: undefined };\n var error = validate([existingValue], document);\n if (error && error.name === 'OPERATION_PATH_UNRESOLVABLE') {\n throw new JsonPatchError('Cannot perform the operation from a path that does not exist', 'OPERATION_FROM_UNRESOLVABLE', index, operation, document);\n }\n }\n }\n}\n/**\n * Validates a sequence of operations. If `document` parameter is provided, the sequence is additionally validated against the object document.\n * If error is encountered, returns a JsonPatchError object\n * @param sequence\n * @param document\n * @returns {JsonPatchError|undefined}\n */\nexport function validate(sequence, document, externalValidator) {\n try {\n if (!Array.isArray(sequence)) {\n throw new JsonPatchError('Patch sequence must be an array', 'SEQUENCE_NOT_AN_ARRAY');\n }\n if (document) {\n //clone document and sequence so that we can safely try applying operations\n applyPatch(_deepClone(document), _deepClone(sequence), externalValidator || true);\n }\n else {\n externalValidator = externalValidator || validator;\n for (var i = 0; i < sequence.length; i++) {\n externalValidator(sequence[i], i, document, undefined);\n }\n }\n }\n catch (e) {\n if (e instanceof JsonPatchError) {\n return e;\n }\n else {\n throw e;\n }\n }\n}\n// based on https://github.com/epoberezkin/fast-deep-equal\n// MIT License\n// Copyright (c) 2017 Evgeny Poberezkin\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n// SOFTWARE.\nexport function _areEquals(a, b) {\n if (a === b)\n return true;\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = Array.isArray(a), arrB = Array.isArray(b), i, length, key;\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length)\n return false;\n for (i = length; i-- !== 0;)\n if (!_areEquals(a[i], b[i]))\n return false;\n return true;\n }\n if (arrA != arrB)\n return false;\n var keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length)\n return false;\n for (i = length; i-- !== 0;)\n if (!b.hasOwnProperty(keys[i]))\n return false;\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!_areEquals(a[key], b[key]))\n return false;\n }\n return true;\n }\n return a !== a && b !== b;\n}\n;\n","/*!\n * https://github.com/Starcounter-Jack/JSON-Patch\n * (c) 2017 Joachim Wester\n * MIT license\n */\nimport { _deepClone, _objectKeys, escapePathComponent, hasOwnProperty } from './helpers.mjs';\nimport { applyPatch } from './core.mjs';\nvar beforeDict = new WeakMap();\nvar Mirror = /** @class */ (function () {\n function Mirror(obj) {\n this.observers = new Map();\n this.obj = obj;\n }\n return Mirror;\n}());\nvar ObserverInfo = /** @class */ (function () {\n function ObserverInfo(callback, observer) {\n this.callback = callback;\n this.observer = observer;\n }\n return ObserverInfo;\n}());\nfunction getMirror(obj) {\n return beforeDict.get(obj);\n}\nfunction getObserverFromMirror(mirror, callback) {\n return mirror.observers.get(callback);\n}\nfunction removeObserverFromMirror(mirror, observer) {\n mirror.observers.delete(observer.callback);\n}\n/**\n * Detach an observer from an object\n */\nexport function unobserve(root, observer) {\n observer.unobserve();\n}\n/**\n * Observes changes made to an object, which can then be retrieved using generate\n */\nexport function observe(obj, callback) {\n var patches = [];\n var observer;\n var mirror = getMirror(obj);\n if (!mirror) {\n mirror = new Mirror(obj);\n beforeDict.set(obj, mirror);\n }\n else {\n var observerInfo = getObserverFromMirror(mirror, callback);\n observer = observerInfo && observerInfo.observer;\n }\n if (observer) {\n return observer;\n }\n observer = {};\n mirror.value = _deepClone(obj);\n if (callback) {\n observer.callback = callback;\n observer.next = null;\n var dirtyCheck = function () {\n generate(observer);\n };\n var fastCheck = function () {\n clearTimeout(observer.next);\n observer.next = setTimeout(dirtyCheck);\n };\n if (typeof window !== 'undefined') { //not Node\n window.addEventListener('mouseup', fastCheck);\n window.addEventListener('keyup', fastCheck);\n window.addEventListener('mousedown', fastCheck);\n window.addEventListener('keydown', fastCheck);\n window.addEventListener('change', fastCheck);\n }\n }\n observer.patches = patches;\n observer.object = obj;\n observer.unobserve = function () {\n generate(observer);\n clearTimeout(observer.next);\n removeObserverFromMirror(mirror, observer);\n if (typeof window !== 'undefined') {\n window.removeEventListener('mouseup', fastCheck);\n window.removeEventListener('keyup', fastCheck);\n window.removeEventListener('mousedown', fastCheck);\n window.removeEventListener('keydown', fastCheck);\n window.removeEventListener('change', fastCheck);\n }\n };\n mirror.observers.set(callback, new ObserverInfo(callback, observer));\n return observer;\n}\n/**\n * Generate an array of patches from an observer\n */\nexport function generate(observer, invertible) {\n if (invertible === void 0) { invertible = false; }\n var mirror = beforeDict.get(observer.object);\n _generate(mirror.value, observer.object, observer.patches, \"\", invertible);\n if (observer.patches.length) {\n applyPatch(mirror.value, observer.patches);\n }\n var temp = observer.patches;\n if (temp.length > 0) {\n observer.patches = [];\n if (observer.callback) {\n observer.callback(temp);\n }\n }\n return temp;\n}\n// Dirty check if obj is different from mirror, generate patches and update mirror\nfunction _generate(mirror, obj, patches, path, invertible) {\n if (obj === mirror) {\n return;\n }\n if (typeof obj.toJSON === \"function\") {\n obj = obj.toJSON();\n }\n var newKeys = _objectKeys(obj);\n var oldKeys = _objectKeys(mirror);\n var changed = false;\n var deleted = false;\n //if ever \"move\" operation is implemented here, make sure this test runs OK: \"should not generate the same patch twice (move)\"\n for (var t = oldKeys.length - 1; t >= 0; t--) {\n var key = oldKeys[t];\n var oldVal = mirror[key];\n if (hasOwnProperty(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) {\n var newVal = obj[key];\n if (typeof oldVal == \"object\" && oldVal != null && typeof newVal == \"object\" && newVal != null && Array.isArray(oldVal) === Array.isArray(newVal)) {\n _generate(oldVal, newVal, patches, path + \"/\" + escapePathComponent(key), invertible);\n }\n else {\n if (oldVal !== newVal) {\n changed = true;\n if (invertible) {\n patches.push({ op: \"test\", path: path + \"/\" + escapePathComponent(key), value: _deepClone(oldVal) });\n }\n patches.push({ op: \"replace\", path: path + \"/\" + escapePathComponent(key), value: _deepClone(newVal) });\n }\n }\n }\n else if (Array.isArray(mirror) === Array.isArray(obj)) {\n if (invertible) {\n patches.push({ op: \"test\", path: path + \"/\" + escapePathComponent(key), value: _deepClone(oldVal) });\n }\n patches.push({ op: \"remove\", path: path + \"/\" + escapePathComponent(key) });\n deleted = true; // property has been deleted\n }\n else {\n if (invertible) {\n patches.push({ op: \"test\", path: path, value: mirror });\n }\n patches.push({ op: \"replace\", path: path, value: obj });\n changed = true;\n }\n }\n if (!deleted && newKeys.length == oldKeys.length) {\n return;\n }\n for (var t = 0; t < newKeys.length; t++) {\n var key = newKeys[t];\n if (!hasOwnProperty(mirror, key) && obj[key] !== undefined) {\n patches.push({ op: \"add\", path: path + \"/\" + escapePathComponent(key), value: _deepClone(obj[key]) });\n }\n }\n}\n/**\n * Create an array of patches from the differences in two objects\n */\nexport function compare(tree1, tree2, invertible) {\n if (invertible === void 0) { invertible = false; }\n var patches = [];\n _generate(tree1, tree2, patches, '', invertible);\n return patches;\n}\n","export * from './module/core.mjs';\nexport * from './module/duplex.mjs';\nexport {\n PatchError as JsonPatchError,\n _deepClone as deepClone,\n escapePathComponent,\n unescapePathComponent\n} from './module/helpers.mjs';\n\n\n/**\n * Default export for backwards compat\n */\n\nimport * as core from './module/core.mjs';\nimport * as duplex from './module/duplex.mjs';\nimport {\n PatchError as JsonPatchError,\n _deepClone as deepClone,\n escapePathComponent,\n unescapePathComponent\n} from './module/helpers.mjs';\n\nexport default Object.assign({}, core, duplex, {\n JsonPatchError,\n deepClone,\n escapePathComponent,\n unescapePathComponent\n});","import { identity, array, isFunction, constant, isArray, id, error, truthy, debounce, extend, visitArray, inherits, logger, Error, hasOwnProperty } from 'vega-util';\nimport { read, responseType, loader } from 'vega-loader';\nimport { defaultLocale } from 'vega-format';\n\nfunction UniqueList(idFunc) {\n const $ = idFunc || identity,\n list = [],\n ids = {};\n\n list.add = _ => {\n const id = $(_);\n\n if (!ids[id]) {\n ids[id] = 1;\n list.push(_);\n }\n\n return list;\n };\n\n list.remove = _ => {\n const id = $(_);\n\n if (ids[id]) {\n ids[id] = 0;\n const idx = list.indexOf(_);\n if (idx >= 0) list.splice(idx, 1);\n }\n\n return list;\n };\n\n return list;\n}\n\n/**\n * Invoke and await a potentially async callback function. If\n * an error occurs, trap it and route to Dataflow.error.\n * @param {Dataflow} df - The dataflow instance\n * @param {function} callback - A callback function to invoke\n * and then await. The dataflow will be passed as the single\n * argument to the function.\n */\nasync function asyncCallback (df, callback) {\n try {\n await callback(df);\n } catch (err) {\n df.error(err);\n }\n}\n\nconst TUPLE_ID_KEY = Symbol('vega_id');\nlet TUPLE_ID = 1;\n/**\n * Checks if an input value is a registered tuple.\n * @param {*} t - The value to check.\n * @return {boolean} True if the input is a tuple, false otherwise.\n */\n\nfunction isTuple(t) {\n return !!(t && tupleid(t));\n}\n/**\n * Returns the id of a tuple.\n * @param {object} t - The input tuple.\n * @return {*} the tuple id.\n */\n\nfunction tupleid(t) {\n return t[TUPLE_ID_KEY];\n}\n/**\n * Sets the id of a tuple.\n * @param {object} t - The input tuple.\n * @param {*} id - The id value to set.\n * @return {object} the input tuple.\n */\n\nfunction setid(t, id) {\n t[TUPLE_ID_KEY] = id;\n return t;\n}\n/**\n * Ingest an object or value as a data tuple.\n * If the input value is an object, an id field will be added to it. For\n * efficiency, the input object is modified directly. A copy is not made.\n * If the input value is a literal, it will be wrapped in a new object\n * instance, with the value accessible as the 'data' property.\n * @param datum - The value to ingest.\n * @return {object} The ingested data tuple.\n */\n\n\nfunction ingest$1(datum) {\n const t = datum === Object(datum) ? datum : {\n data: datum\n };\n return tupleid(t) ? t : setid(t, TUPLE_ID++);\n}\n/**\n * Given a source tuple, return a derived copy.\n * @param {object} t - The source tuple.\n * @return {object} The derived tuple.\n */\n\nfunction derive(t) {\n return rederive(t, ingest$1({}));\n}\n/**\n * Rederive a derived tuple by copying values from the source tuple.\n * @param {object} t - The source tuple.\n * @param {object} d - The derived tuple.\n * @return {object} The derived tuple.\n */\n\nfunction rederive(t, d) {\n for (const k in t) d[k] = t[k];\n\n return d;\n}\n/**\n * Replace an existing tuple with a new tuple.\n * @param {object} t - The existing data tuple.\n * @param {object} d - The new tuple that replaces the old.\n * @return {object} The new tuple.\n */\n\nfunction replace(t, d) {\n return setid(d, tupleid(t));\n}\n/**\n * Generate an augmented comparator function that provides stable\n * sorting by tuple id when the given comparator produces ties.\n * @param {function} cmp - The comparator to augment.\n * @param {function} [f] - Optional tuple accessor function.\n * @return {function} An augmented comparator function.\n */\n\nfunction stableCompare(cmp, f) {\n return !cmp ? null : f ? (a, b) => cmp(a, b) || tupleid(f(a)) - tupleid(f(b)) : (a, b) => cmp(a, b) || tupleid(a) - tupleid(b);\n}\n\nfunction isChangeSet(v) {\n return v && v.constructor === changeset;\n}\nfunction changeset() {\n const add = [],\n // insert tuples\n rem = [],\n // remove tuples\n mod = [],\n // modify tuples\n remp = [],\n // remove by predicate\n modp = []; // modify by predicate\n\n let clean = null,\n reflow = false;\n return {\n constructor: changeset,\n\n insert(t) {\n const d = array(t),\n n = d.length;\n\n for (let i = 0; i < n; ++i) add.push(d[i]);\n\n return this;\n },\n\n remove(t) {\n const a = isFunction(t) ? remp : rem,\n d = array(t),\n n = d.length;\n\n for (let i = 0; i < n; ++i) a.push(d[i]);\n\n return this;\n },\n\n modify(t, field, value) {\n const m = {\n field: field,\n value: constant(value)\n };\n\n if (isFunction(t)) {\n m.filter = t;\n modp.push(m);\n } else {\n m.tuple = t;\n mod.push(m);\n }\n\n return this;\n },\n\n encode(t, set) {\n if (isFunction(t)) modp.push({\n filter: t,\n field: set\n });else mod.push({\n tuple: t,\n field: set\n });\n return this;\n },\n\n clean(value) {\n clean = value;\n return this;\n },\n\n reflow() {\n reflow = true;\n return this;\n },\n\n pulse(pulse, tuples) {\n const cur = {},\n out = {};\n let i, n, m, f, t, id; // build lookup table of current tuples\n\n for (i = 0, n = tuples.length; i < n; ++i) {\n cur[tupleid(tuples[i])] = 1;\n } // process individual tuples to remove\n\n\n for (i = 0, n = rem.length; i < n; ++i) {\n t = rem[i];\n cur[tupleid(t)] = -1;\n } // process predicate-based removals\n\n\n for (i = 0, n = remp.length; i < n; ++i) {\n f = remp[i];\n tuples.forEach(t => {\n if (f(t)) cur[tupleid(t)] = -1;\n });\n } // process all add tuples\n\n\n for (i = 0, n = add.length; i < n; ++i) {\n t = add[i];\n id = tupleid(t);\n\n if (cur[id]) {\n // tuple already resides in dataset\n // if flagged for both add and remove, cancel\n cur[id] = 1;\n } else {\n // tuple does not reside in dataset, add\n pulse.add.push(ingest$1(add[i]));\n }\n } // populate pulse rem list\n\n\n for (i = 0, n = tuples.length; i < n; ++i) {\n t = tuples[i];\n if (cur[tupleid(t)] < 0) pulse.rem.push(t);\n } // modify helper method\n\n\n function modify(t, f, v) {\n if (v) {\n t[f] = v(t);\n } else {\n pulse.encode = f;\n }\n\n if (!reflow) out[tupleid(t)] = t;\n } // process individual tuples to modify\n\n\n for (i = 0, n = mod.length; i < n; ++i) {\n m = mod[i];\n t = m.tuple;\n f = m.field;\n id = cur[tupleid(t)];\n\n if (id > 0) {\n modify(t, f, m.value);\n pulse.modifies(f);\n }\n } // process predicate-based modifications\n\n\n for (i = 0, n = modp.length; i < n; ++i) {\n m = modp[i];\n f = m.filter;\n tuples.forEach(t => {\n if (f(t) && cur[tupleid(t)] > 0) {\n modify(t, m.field, m.value);\n }\n });\n pulse.modifies(m.field);\n } // upon reflow request, populate mod with all non-removed tuples\n // otherwise, populate mod with modified tuples only\n\n\n if (reflow) {\n pulse.mod = rem.length || remp.length ? tuples.filter(t => cur[tupleid(t)] > 0) : tuples.slice();\n } else {\n for (id in out) pulse.mod.push(out[id]);\n } // set pulse garbage collection request\n\n\n if (clean || clean == null && (rem.length || remp.length)) {\n pulse.clean(true);\n }\n\n return pulse;\n }\n\n };\n}\n\nconst CACHE = '_:mod:_';\n/**\n * Hash that tracks modifications to assigned values.\n * Callers *must* use the set method to update values.\n */\n\nfunction Parameters() {\n Object.defineProperty(this, CACHE, {\n writable: true,\n value: {}\n });\n}\nParameters.prototype = {\n /**\n * Set a parameter value. If the parameter value changes, the parameter\n * will be recorded as modified.\n * @param {string} name - The parameter name.\n * @param {number} index - The index into an array-value parameter. Ignored if\n * the argument is undefined, null or less than zero.\n * @param {*} value - The parameter value to set.\n * @param {boolean} [force=false] - If true, records the parameter as modified\n * even if the value is unchanged.\n * @return {Parameters} - This parameter object.\n */\n set(name, index, value, force) {\n const o = this,\n v = o[name],\n mod = o[CACHE];\n\n if (index != null && index >= 0) {\n if (v[index] !== value || force) {\n v[index] = value;\n mod[index + ':' + name] = -1;\n mod[name] = -1;\n }\n } else if (v !== value || force) {\n o[name] = value;\n mod[name] = isArray(value) ? 1 + value.length : -1;\n }\n\n return o;\n },\n\n /**\n * Tests if one or more parameters has been modified. If invoked with no\n * arguments, returns true if any parameter value has changed. If the first\n * argument is array, returns trues if any parameter name in the array has\n * changed. Otherwise, tests if the given name and optional array index has\n * changed.\n * @param {string} name - The parameter name to test.\n * @param {number} [index=undefined] - The parameter array index to test.\n * @return {boolean} - Returns true if a queried parameter was modified.\n */\n modified(name, index) {\n const mod = this[CACHE];\n\n if (!arguments.length) {\n for (const k in mod) {\n if (mod[k]) return true;\n }\n\n return false;\n } else if (isArray(name)) {\n for (let k = 0; k < name.length; ++k) {\n if (mod[name[k]]) return true;\n }\n\n return false;\n }\n\n return index != null && index >= 0 ? index + 1 < mod[name] || !!mod[index + ':' + name] : !!mod[name];\n },\n\n /**\n * Clears the modification records. After calling this method,\n * all parameters are considered unmodified.\n */\n clear() {\n this[CACHE] = {};\n return this;\n }\n\n};\n\nlet OP_ID = 0;\nconst PULSE = 'pulse',\n NO_PARAMS = new Parameters(); // Boolean Flags\n\nconst SKIP$1 = 1,\n MODIFIED = 2;\n/**\n * An Operator is a processing node in a dataflow graph.\n * Each operator stores a value and an optional value update function.\n * Operators can accept a hash of named parameters. Parameter values can\n * either be direct (JavaScript literals, arrays, objects) or indirect\n * (other operators whose values will be pulled dynamically). Operators\n * included as parameters will have this operator added as a dependency.\n * @constructor\n * @param {*} [init] - The initial value for this operator.\n * @param {function(object, Pulse)} [update] - An update function. Upon\n * evaluation of this operator, the update function will be invoked and the\n * return value will be used as the new value of this operator.\n * @param {object} [params] - The parameters for this operator.\n * @param {boolean} [react=true] - Flag indicating if this operator should\n * listen for changes to upstream operators included as parameters.\n * @see parameters\n */\n\nfunction Operator(init, update, params, react) {\n this.id = ++OP_ID;\n this.value = init;\n this.stamp = -1;\n this.rank = -1;\n this.qrank = -1;\n this.flags = 0;\n\n if (update) {\n this._update = update;\n }\n\n if (params) this.parameters(params, react);\n}\n\nfunction flag(bit) {\n return function (state) {\n const f = this.flags;\n if (arguments.length === 0) return !!(f & bit);\n this.flags = state ? f | bit : f & ~bit;\n return this;\n };\n}\n\nOperator.prototype = {\n /**\n * Returns a list of target operators dependent on this operator.\n * If this list does not exist, it is created and then returned.\n * @return {UniqueList}\n */\n targets() {\n return this._targets || (this._targets = UniqueList(id));\n },\n\n /**\n * Sets the value of this operator.\n * @param {*} value - the value to set.\n * @return {Number} Returns 1 if the operator value has changed\n * according to strict equality, returns 0 otherwise.\n */\n set(value) {\n if (this.value !== value) {\n this.value = value;\n return 1;\n } else {\n return 0;\n }\n },\n\n /**\n * Indicates that operator evaluation should be skipped on the next pulse.\n * This operator will still propagate incoming pulses, but its update function\n * will not be invoked. The skip flag is reset after every pulse, so calling\n * this method will affect processing of the next pulse only.\n */\n skip: flag(SKIP$1),\n\n /**\n * Indicates that this operator's value has been modified on its most recent\n * pulse. Normally modification is checked via strict equality; however, in\n * some cases it is more efficient to update the internal state of an object.\n * In those cases, the modified flag can be used to trigger propagation. Once\n * set, the modification flag persists across pulses until unset. The flag can\n * be used with the last timestamp to test if a modification is recent.\n */\n modified: flag(MODIFIED),\n\n /**\n * Sets the parameters for this operator. The parameter values are analyzed for\n * operator instances. If found, this operator will be added as a dependency\n * of the parameterizing operator. Operator values are dynamically marshalled\n * from each operator parameter prior to evaluation. If a parameter value is\n * an array, the array will also be searched for Operator instances. However,\n * the search does not recurse into sub-arrays or object properties.\n * @param {object} params - A hash of operator parameters.\n * @param {boolean} [react=true] - A flag indicating if this operator should\n * automatically update (react) when parameter values change. In other words,\n * this flag determines if the operator registers itself as a listener on\n * any upstream operators included in the parameters.\n * @param {boolean} [initonly=false] - A flag indicating if this operator\n * should calculate an update only upon its initiatal evaluation, then\n * deregister dependencies and suppress all future update invocations.\n * @return {Operator[]} - An array of upstream dependencies.\n */\n parameters(params, react, initonly) {\n react = react !== false;\n const argval = this._argval = this._argval || new Parameters(),\n argops = this._argops = this._argops || [],\n deps = [];\n let name, value, n, i;\n\n const add = (name, index, value) => {\n if (value instanceof Operator) {\n if (value !== this) {\n if (react) value.targets().add(this);\n deps.push(value);\n }\n\n argops.push({\n op: value,\n name: name,\n index: index\n });\n } else {\n argval.set(name, index, value);\n }\n };\n\n for (name in params) {\n value = params[name];\n\n if (name === PULSE) {\n array(value).forEach(op => {\n if (!(op instanceof Operator)) {\n error('Pulse parameters must be operator instances.');\n } else if (op !== this) {\n op.targets().add(this);\n deps.push(op);\n }\n });\n this.source = value;\n } else if (isArray(value)) {\n argval.set(name, -1, Array(n = value.length));\n\n for (i = 0; i < n; ++i) add(name, i, value[i]);\n } else {\n add(name, -1, value);\n }\n }\n\n this.marshall().clear(); // initialize values\n\n if (initonly) argops.initonly = true;\n return deps;\n },\n\n /**\n * Internal method for marshalling parameter values.\n * Visits each operator dependency to pull the latest value.\n * @return {Parameters} A Parameters object to pass to the update function.\n */\n marshall(stamp) {\n const argval = this._argval || NO_PARAMS,\n argops = this._argops;\n let item, i, op, mod;\n\n if (argops) {\n const n = argops.length;\n\n for (i = 0; i < n; ++i) {\n item = argops[i];\n op = item.op;\n mod = op.modified() && op.stamp === stamp;\n argval.set(item.name, item.index, op.value, mod);\n }\n\n if (argops.initonly) {\n for (i = 0; i < n; ++i) {\n item = argops[i];\n item.op.targets().remove(this);\n }\n\n this._argops = null;\n this._update = null;\n }\n }\n\n return argval;\n },\n\n /**\n * Detach this operator from the dataflow.\n * Unregisters listeners on upstream dependencies.\n */\n detach() {\n const argops = this._argops;\n let i, n, item, op;\n\n if (argops) {\n for (i = 0, n = argops.length; i < n; ++i) {\n item = argops[i];\n op = item.op;\n\n if (op._targets) {\n op._targets.remove(this);\n }\n }\n } // remove references to the source and pulse object,\n // if present, to prevent memory leaks of old data.\n\n\n this.pulse = null;\n this.source = null;\n },\n\n /**\n * Delegate method to perform operator processing.\n * Subclasses can override this method to perform custom processing.\n * By default, it marshalls parameters and calls the update function\n * if that function is defined. If the update function does not\n * change the operator value then StopPropagation is returned.\n * If no update function is defined, this method does nothing.\n * @param {Pulse} pulse - the current dataflow pulse.\n * @return The output pulse or StopPropagation. A falsy return value\n * (including undefined) will let the input pulse pass through.\n */\n evaluate(pulse) {\n const update = this._update;\n\n if (update) {\n const params = this.marshall(pulse.stamp),\n v = update.call(this, params, pulse);\n params.clear();\n\n if (v !== this.value) {\n this.value = v;\n } else if (!this.modified()) {\n return pulse.StopPropagation;\n }\n }\n },\n\n /**\n * Run this operator for the current pulse. If this operator has already\n * been run at (or after) the pulse timestamp, returns StopPropagation.\n * Internally, this method calls {@link evaluate} to perform processing.\n * If {@link evaluate} returns a falsy value, the input pulse is returned.\n * This method should NOT be overridden, instead overrride {@link evaluate}.\n * @param {Pulse} pulse - the current dataflow pulse.\n * @return the output pulse for this operator (or StopPropagation)\n */\n run(pulse) {\n if (pulse.stamp < this.stamp) return pulse.StopPropagation;\n let rv;\n\n if (this.skip()) {\n this.skip(false);\n rv = 0;\n } else {\n rv = this.evaluate(pulse);\n }\n\n return this.pulse = rv || pulse;\n }\n\n};\n\n/**\n * Add an operator to the dataflow graph. This function accepts a\n * variety of input argument types. The basic signature supports an\n * initial value, update function and parameters. If the first parameter\n * is an Operator instance, it will be added directly. If it is a\n * constructor for an Operator subclass, a new instance will be instantiated.\n * Otherwise, if the first parameter is a function instance, it will be used\n * as the update function and a null initial value is assumed.\n * @param {*} init - One of: the operator to add, the initial value of\n * the operator, an operator class to instantiate, or an update function.\n * @param {function} [update] - The operator update function.\n * @param {object} [params] - The operator parameters.\n * @param {boolean} [react=true] - Flag indicating if this operator should\n * listen for changes to upstream operators included as parameters.\n * @return {Operator} - The added operator.\n */\n\nfunction add (init, update, params, react) {\n let shift = 1,\n op;\n\n if (init instanceof Operator) {\n op = init;\n } else if (init && init.prototype instanceof Operator) {\n op = new init();\n } else if (isFunction(init)) {\n op = new Operator(null, init);\n } else {\n shift = 0;\n op = new Operator(init, update);\n }\n\n this.rank(op);\n\n if (shift) {\n react = params;\n params = update;\n }\n\n if (params) this.connect(op, op.parameters(params, react));\n this.touch(op);\n return op;\n}\n\n/**\n * Connect a target operator as a dependent of source operators.\n * If necessary, this method will rerank the target operator and its\n * dependents to ensure propagation proceeds in a topologically sorted order.\n * @param {Operator} target - The target operator.\n * @param {Array<Operator>} - The source operators that should propagate\n * to the target operator.\n */\nfunction connect (target, sources) {\n const targetRank = target.rank,\n n = sources.length;\n\n for (let i = 0; i < n; ++i) {\n if (targetRank < sources[i].rank) {\n this.rerank(target);\n return;\n }\n }\n}\n\nlet STREAM_ID = 0;\n/**\n * Models an event stream.\n * @constructor\n * @param {function(Object, number): boolean} [filter] - Filter predicate.\n * Events pass through when truthy, events are suppressed when falsy.\n * @param {function(Object): *} [apply] - Applied to input events to produce\n * new event values.\n * @param {function(Object)} [receive] - Event callback function to invoke\n * upon receipt of a new event. Use to override standard event processing.\n */\n\nfunction EventStream(filter, apply, receive) {\n this.id = ++STREAM_ID;\n this.value = null;\n if (receive) this.receive = receive;\n if (filter) this._filter = filter;\n if (apply) this._apply = apply;\n}\n/**\n * Creates a new event stream instance with the provided\n * (optional) filter, apply and receive functions.\n * @param {function(Object, number): boolean} [filter] - Filter predicate.\n * Events pass through when truthy, events are suppressed when falsy.\n * @param {function(Object): *} [apply] - Applied to input events to produce\n * new event values.\n * @see EventStream\n */\n\nfunction stream(filter, apply, receive) {\n return new EventStream(filter, apply, receive);\n}\nEventStream.prototype = {\n _filter: truthy,\n _apply: identity,\n\n targets() {\n return this._targets || (this._targets = UniqueList(id));\n },\n\n consume(_) {\n if (!arguments.length) return !!this._consume;\n this._consume = !!_;\n return this;\n },\n\n receive(evt) {\n if (this._filter(evt)) {\n const val = this.value = this._apply(evt),\n trg = this._targets,\n n = trg ? trg.length : 0;\n\n for (let i = 0; i < n; ++i) trg[i].receive(val);\n\n if (this._consume) {\n evt.preventDefault();\n evt.stopPropagation();\n }\n }\n },\n\n filter(filter) {\n const s = stream(filter);\n this.targets().add(s);\n return s;\n },\n\n apply(apply) {\n const s = stream(null, apply);\n this.targets().add(s);\n return s;\n },\n\n merge() {\n const s = stream();\n this.targets().add(s);\n\n for (let i = 0, n = arguments.length; i < n; ++i) {\n arguments[i].targets().add(s);\n }\n\n return s;\n },\n\n throttle(pause) {\n let t = -1;\n return this.filter(() => {\n const now = Date.now();\n\n if (now - t > pause) {\n t = now;\n return 1;\n } else {\n return 0;\n }\n });\n },\n\n debounce(delay) {\n const s = stream();\n this.targets().add(stream(null, null, debounce(delay, e => {\n const df = e.dataflow;\n s.receive(e);\n if (df && df.run) df.run();\n })));\n return s;\n },\n\n between(a, b) {\n let active = false;\n a.targets().add(stream(null, null, () => active = true));\n b.targets().add(stream(null, null, () => active = false));\n return this.filter(() => active);\n },\n\n detach() {\n // ensures compatibility with operators (#2753)\n // remove references to other streams and filter functions that may\n // be bound to subcontexts that need to be garbage collected.\n this._filter = truthy;\n this._targets = null;\n }\n\n};\n\n/**\n * Create a new event stream from an event source.\n * @param {object} source - The event source to monitor. The input must\n * support the addEventListener method.\n * @param {string} type - The event type.\n * @param {function(object): boolean} [filter] - Event filter function.\n * @param {function(object): *} [apply] - Event application function.\n * If provided, this function will be invoked and the result will be\n * used as the downstream event value.\n * @return {EventStream}\n */\n\nfunction events (source, type, filter, apply) {\n const df = this,\n s = stream(filter, apply),\n send = function (e) {\n e.dataflow = df;\n\n try {\n s.receive(e);\n } catch (error) {\n df.error(error);\n } finally {\n df.run();\n }\n };\n\n let sources;\n\n if (typeof source === 'string' && typeof document !== 'undefined') {\n sources = document.querySelectorAll(source);\n } else {\n sources = array(source);\n }\n\n const n = sources.length;\n\n for (let i = 0; i < n; ++i) {\n sources[i].addEventListener(type, send);\n }\n\n return s;\n}\n\nfunction parse(data, format) {\n const locale = this.locale();\n return read(data, format, locale.timeParse, locale.utcParse);\n}\n/**\n * Ingests new data into the dataflow. First parses the data using the\n * vega-loader read method, then pulses a changeset to the target operator.\n * @param {Operator} target - The Operator to target with ingested data,\n * typically a Collect transform instance.\n * @param {*} data - The input data, prior to parsing. For JSON this may\n * be a string or an object. For CSV, TSV, etc should be a string.\n * @param {object} format - The data format description for parsing\n * loaded data. This object is passed to the vega-loader read method.\n * @returns {Dataflow}\n */\n\nfunction ingest(target, data, format) {\n data = this.parse(data, format);\n return this.pulse(target, this.changeset().insert(data));\n}\n/**\n * Request data from an external source, parse it, and return a Promise.\n * @param {string} url - The URL from which to load the data. This string\n * is passed to the vega-loader load method.\n * @param {object} [format] - The data format description for parsing\n * loaded data. This object is passed to the vega-loader read method.\n * @return {Promise} A Promise that resolves upon completion of the request.\n * The resolved object contains the following properties:\n * - data: an array of parsed data (or null upon error)\n * - status: a code for success (0), load fail (-1), or parse fail (-2)\n */\n\nasync function request(url, format) {\n const df = this;\n let status = 0,\n data;\n\n try {\n data = await df.loader().load(url, {\n context: 'dataflow',\n response: responseType(format && format.type)\n });\n\n try {\n data = df.parse(data, format);\n } catch (err) {\n status = -2;\n df.warn('Data ingestion failed', url, err);\n }\n } catch (err) {\n status = -1;\n df.warn('Loading failed', url, err);\n }\n\n return {\n data,\n status\n };\n}\nasync function preload(target, url, format) {\n const df = this,\n pending = df._pending || loadPending(df);\n pending.requests += 1;\n const res = await df.request(url, format);\n df.pulse(target, df.changeset().remove(truthy).insert(res.data || []));\n pending.done();\n return res;\n}\n\nfunction loadPending(df) {\n let accept;\n const pending = new Promise(a => accept = a);\n pending.requests = 0;\n\n pending.done = () => {\n if (--pending.requests === 0) {\n df._pending = null;\n accept(df);\n }\n };\n\n return df._pending = pending;\n}\n\nconst SKIP = {\n skip: true\n};\n/**\n * Perform operator updates in response to events. Applies an\n * update function to compute a new operator value. If the update function\n * returns a {@link ChangeSet}, the operator will be pulsed with those tuple\n * changes. Otherwise, the operator value will be updated to the return value.\n * @param {EventStream|Operator} source - The event source to react to.\n * This argument can be either an EventStream or an Operator.\n * @param {Operator|function(object):Operator} target - The operator to update.\n * This argument can either be an Operator instance or (if the source\n * argument is an EventStream), a function that accepts an event object as\n * input and returns an Operator to target.\n * @param {function(Parameters,Event): *} [update] - Optional update function\n * to compute the new operator value, or a literal value to set. Update\n * functions expect to receive a parameter object and event as arguments.\n * This function can either return a new operator value or (if the source\n * argument is an EventStream) a {@link ChangeSet} instance to pulse\n * the target operator with tuple changes.\n * @param {object} [params] - The update function parameters.\n * @param {object} [options] - Additional options hash. If not overridden,\n * updated operators will be skipped by default.\n * @param {boolean} [options.skip] - If true, the operator will\n * be skipped: it will not be evaluated, but its dependents will be.\n * @param {boolean} [options.force] - If true, the operator will\n * be re-evaluated even if its value has not changed.\n * @return {Dataflow}\n */\n\nfunction on (source, target, update, params, options) {\n const fn = source instanceof Operator ? onOperator : onStream;\n fn(this, source, target, update, params, options);\n return this;\n}\n\nfunction onStream(df, stream, target, update, params, options) {\n const opt = extend({}, options, SKIP);\n let func, op;\n if (!isFunction(target)) target = constant(target);\n\n if (update === undefined) {\n func = e => df.touch(target(e));\n } else if (isFunction(update)) {\n op = new Operator(null, update, params, false);\n\n func = e => {\n op.evaluate(e);\n const t = target(e),\n v = op.value;\n isChangeSet(v) ? df.pulse(t, v, options) : df.update(t, v, opt);\n };\n } else {\n func = e => df.update(target(e), update, opt);\n }\n\n stream.apply(func);\n}\n\nfunction onOperator(df, source, target, update, params, options) {\n if (update === undefined) {\n source.targets().add(target);\n } else {\n const opt = options || {},\n op = new Operator(null, updater(target, update), params, false);\n op.modified(opt.force);\n op.rank = source.rank; // immediately follow source\n\n source.targets().add(op); // add dependency\n\n if (target) {\n op.skip(true); // skip first invocation\n\n op.value = target.value; // initialize value\n\n op.targets().add(target); // chain dependencies\n\n df.connect(target, [op]); // rerank as needed, #1672\n }\n }\n}\n\nfunction updater(target, update) {\n update = isFunction(update) ? update : constant(update);\n return target ? function (_, pulse) {\n const value = update(_, pulse);\n\n if (!target.skip()) {\n target.skip(value !== this.value).value = value;\n }\n\n return value;\n } : update;\n}\n\n/**\n * Assigns a rank to an operator. Ranks are assigned in increasing order\n * by incrementing an internal rank counter.\n * @param {Operator} op - The operator to assign a rank.\n */\n\nfunction rank(op) {\n op.rank = ++this._rank;\n}\n/**\n * Re-ranks an operator and all downstream target dependencies. This\n * is necessary when upstream dependencies of higher rank are added to\n * a target operator.\n * @param {Operator} op - The operator to re-rank.\n */\n\nfunction rerank(op) {\n const queue = [op];\n let cur, list, i;\n\n while (queue.length) {\n this.rank(cur = queue.pop());\n\n if (list = cur._targets) {\n for (i = list.length; --i >= 0;) {\n queue.push(cur = list[i]);\n if (cur === op) error('Cycle detected in dataflow graph.');\n }\n }\n }\n}\n\n/**\n * Sentinel value indicating pulse propagation should stop.\n */\n\nconst StopPropagation = {}; // Pulse visit type flags\n\nconst ADD = 1 << 0,\n REM = 1 << 1,\n MOD = 1 << 2,\n ADD_REM = ADD | REM,\n ADD_MOD = ADD | MOD,\n ALL = ADD | REM | MOD,\n REFLOW = 1 << 3,\n SOURCE = 1 << 4,\n NO_SOURCE = 1 << 5,\n NO_FIELDS = 1 << 6;\n/**\n * A Pulse enables inter-operator communication during a run of the\n * dataflow graph. In addition to the current timestamp, a pulse may also\n * contain a change-set of added, removed or modified data tuples, as well as\n * a pointer to a full backing data source. Tuple change sets may not\n * be fully materialized; for example, to prevent needless array creation\n * a change set may include larger arrays and corresponding filter functions.\n * The pulse provides a {@link visit} method to enable proper and efficient\n * iteration over requested data tuples.\n *\n * In addition, each pulse can track modification flags for data tuple fields.\n * Responsible transform operators should call the {@link modifies} method to\n * indicate changes to data fields. The {@link modified} method enables\n * querying of this modification state.\n *\n * @constructor\n * @param {Dataflow} dataflow - The backing dataflow instance.\n * @param {number} stamp - The current propagation timestamp.\n * @param {string} [encode] - An optional encoding set name, which is then\n * accessible as Pulse.encode. Operators can respond to (or ignore) this\n * setting as appropriate. This parameter can be used in conjunction with\n * the Encode transform in the vega-encode module.\n */\n\nfunction Pulse(dataflow, stamp, encode) {\n this.dataflow = dataflow;\n this.stamp = stamp == null ? -1 : stamp;\n this.add = [];\n this.rem = [];\n this.mod = [];\n this.fields = null;\n this.encode = encode || null;\n}\n\nfunction materialize(data, filter) {\n const out = [];\n visitArray(data, filter, _ => out.push(_));\n return out;\n}\n\nfunction filter(pulse, flags) {\n const map = {};\n pulse.visit(flags, t => {\n map[tupleid(t)] = 1;\n });\n return t => map[tupleid(t)] ? null : t;\n}\n\nfunction addFilter(a, b) {\n return a ? (t, i) => a(t, i) && b(t, i) : b;\n}\n\nPulse.prototype = {\n /**\n * Sentinel value indicating pulse propagation should stop.\n */\n StopPropagation,\n\n /**\n * Boolean flag indicating ADD (added) tuples.\n */\n ADD,\n\n /**\n * Boolean flag indicating REM (removed) tuples.\n */\n REM,\n\n /**\n * Boolean flag indicating MOD (modified) tuples.\n */\n MOD,\n\n /**\n * Boolean flag indicating ADD (added) and REM (removed) tuples.\n */\n ADD_REM,\n\n /**\n * Boolean flag indicating ADD (added) and MOD (modified) tuples.\n */\n ADD_MOD,\n\n /**\n * Boolean flag indicating ADD, REM and MOD tuples.\n */\n ALL,\n\n /**\n * Boolean flag indicating all tuples in a data source\n * except for the ADD, REM and MOD tuples.\n */\n REFLOW,\n\n /**\n * Boolean flag indicating a 'pass-through' to a\n * backing data source, ignoring ADD, REM and MOD tuples.\n */\n SOURCE,\n\n /**\n * Boolean flag indicating that source data should be\n * suppressed when creating a forked pulse.\n */\n NO_SOURCE,\n\n /**\n * Boolean flag indicating that field modifications should be\n * suppressed when creating a forked pulse.\n */\n NO_FIELDS,\n\n /**\n * Creates a new pulse based on the values of this pulse.\n * The dataflow, time stamp and field modification values are copied over.\n * By default, new empty ADD, REM and MOD arrays are created.\n * @param {number} flags - Integer of boolean flags indicating which (if any)\n * tuple arrays should be copied to the new pulse. The supported flag values\n * are ADD, REM and MOD. Array references are copied directly: new array\n * instances are not created.\n * @return {Pulse} - The forked pulse instance.\n * @see init\n */\n fork(flags) {\n return new Pulse(this.dataflow).init(this, flags);\n },\n\n /**\n * Creates a copy of this pulse with new materialized array\n * instances for the ADD, REM, MOD, and SOURCE arrays.\n * The dataflow, time stamp and field modification values are copied over.\n * @return {Pulse} - The cloned pulse instance.\n * @see init\n */\n clone() {\n const p = this.fork(ALL);\n p.add = p.add.slice();\n p.rem = p.rem.slice();\n p.mod = p.mod.slice();\n if (p.source) p.source = p.source.slice();\n return p.materialize(ALL | SOURCE);\n },\n\n /**\n * Returns a pulse that adds all tuples from a backing source. This is\n * useful for cases where operators are added to a dataflow after an\n * upstream data pipeline has already been processed, ensuring that\n * new operators can observe all tuples within a stream.\n * @return {Pulse} - A pulse instance with all source tuples included\n * in the add array. If the current pulse already has all source\n * tuples in its add array, it is returned directly. If the current\n * pulse does not have a backing source, it is returned directly.\n */\n addAll() {\n let p = this;\n const reuse = !p.source || p.add === p.rem // special case for indexed set (e.g., crossfilter)\n || !p.rem.length && p.source.length === p.add.length;\n\n if (reuse) {\n return p;\n } else {\n p = new Pulse(this.dataflow).init(this);\n p.add = p.source;\n p.rem = []; // new operators can ignore rem #2769\n\n return p;\n }\n },\n\n /**\n * Initialize this pulse based on the values of another pulse. This method\n * is used internally by {@link fork} to initialize a new forked tuple.\n * The dataflow, time stamp and field modification values are copied over.\n * By default, new empty ADD, REM and MOD arrays are created.\n * @param {Pulse} src - The source pulse to copy from.\n * @param {number} flags - Integer of boolean flags indicating which (if any)\n * tuple arrays should be copied to the new pulse. The supported flag values\n * are ADD, REM and MOD. Array references are copied directly: new array\n * instances are not created. By default, source data arrays are copied\n * to the new pulse. Use the NO_SOURCE flag to enforce a null source.\n * @return {Pulse} - Returns this Pulse instance.\n */\n init(src, flags) {\n const p = this;\n p.stamp = src.stamp;\n p.encode = src.encode;\n\n if (src.fields && !(flags & NO_FIELDS)) {\n p.fields = src.fields;\n }\n\n if (flags & ADD) {\n p.addF = src.addF;\n p.add = src.add;\n } else {\n p.addF = null;\n p.add = [];\n }\n\n if (flags & REM) {\n p.remF = src.remF;\n p.rem = src.rem;\n } else {\n p.remF = null;\n p.rem = [];\n }\n\n if (flags & MOD) {\n p.modF = src.modF;\n p.mod = src.mod;\n } else {\n p.modF = null;\n p.mod = [];\n }\n\n if (flags & NO_SOURCE) {\n p.srcF = null;\n p.source = null;\n } else {\n p.srcF = src.srcF;\n p.source = src.source;\n if (src.cleans) p.cleans = src.cleans;\n }\n\n return p;\n },\n\n /**\n * Schedules a function to run after pulse propagation completes.\n * @param {function} func - The function to run.\n */\n runAfter(func) {\n this.dataflow.runAfter(func);\n },\n\n /**\n * Indicates if tuples have been added, removed or modified.\n * @param {number} [flags] - The tuple types (ADD, REM or MOD) to query.\n * Defaults to ALL, returning true if any tuple type has changed.\n * @return {boolean} - Returns true if one or more queried tuple types have\n * changed, false otherwise.\n */\n changed(flags) {\n const f = flags || ALL;\n return f & ADD && this.add.length || f & REM && this.rem.length || f & MOD && this.mod.length;\n },\n\n /**\n * Forces a \"reflow\" of tuple values, such that all tuples in the backing\n * source are added to the MOD set, unless already present in the ADD set.\n * @param {boolean} [fork=false] - If true, returns a forked copy of this\n * pulse, and invokes reflow on that derived pulse.\n * @return {Pulse} - The reflowed pulse instance.\n */\n reflow(fork) {\n if (fork) return this.fork(ALL).reflow();\n const len = this.add.length,\n src = this.source && this.source.length;\n\n if (src && src !== len) {\n this.mod = this.source;\n if (len) this.filter(MOD, filter(this, ADD));\n }\n\n return this;\n },\n\n /**\n * Get/set metadata to pulse requesting garbage collection\n * to reclaim currently unused resources.\n */\n clean(value) {\n if (arguments.length) {\n this.cleans = !!value;\n return this;\n } else {\n return this.cleans;\n }\n },\n\n /**\n * Marks one or more data field names as modified to assist dependency\n * tracking and incremental processing by transform operators.\n * @param {string|Array<string>} _ - The field(s) to mark as modified.\n * @return {Pulse} - This pulse instance.\n */\n modifies(_) {\n const hash = this.fields || (this.fields = {});\n\n if (isArray(_)) {\n _.forEach(f => hash[f] = true);\n } else {\n hash[_] = true;\n }\n\n return this;\n },\n\n /**\n * Checks if one or more data fields have been modified during this pulse\n * propagation timestamp.\n * @param {string|Array<string>} _ - The field(s) to check for modified.\n * @param {boolean} nomod - If true, will check the modified flag even if\n * no mod tuples exist. If false (default), mod tuples must be present.\n * @return {boolean} - Returns true if any of the provided fields has been\n * marked as modified, false otherwise.\n */\n modified(_, nomod) {\n const fields = this.fields;\n return !((nomod || this.mod.length) && fields) ? false : !arguments.length ? !!fields : isArray(_) ? _.some(f => fields[f]) : fields[_];\n },\n\n /**\n * Adds a filter function to one more tuple sets. Filters are applied to\n * backing tuple arrays, to determine the actual set of tuples considered\n * added, removed or modified. They can be used to delay materialization of\n * a tuple set in order to avoid expensive array copies. In addition, the\n * filter functions can serve as value transformers: unlike standard predicate\n * function (which return boolean values), Pulse filters should return the\n * actual tuple value to process. If a tuple set is already filtered, the\n * new filter function will be appended into a conjuntive ('and') query.\n * @param {number} flags - Flags indicating the tuple set(s) to filter.\n * @param {function(*):object} filter - Filter function that will be applied\n * to the tuple set array, and should return a data tuple if the value\n * should be included in the tuple set, and falsy (or null) otherwise.\n * @return {Pulse} - Returns this pulse instance.\n */\n filter(flags, filter) {\n const p = this;\n if (flags & ADD) p.addF = addFilter(p.addF, filter);\n if (flags & REM) p.remF = addFilter(p.remF, filter);\n if (flags & MOD) p.modF = addFilter(p.modF, filter);\n if (flags & SOURCE) p.srcF = addFilter(p.srcF, filter);\n return p;\n },\n\n /**\n * Materialize one or more tuple sets in this pulse. If the tuple set(s) have\n * a registered filter function, it will be applied and the tuple set(s) will\n * be replaced with materialized tuple arrays.\n * @param {number} flags - Flags indicating the tuple set(s) to materialize.\n * @return {Pulse} - Returns this pulse instance.\n */\n materialize(flags) {\n flags = flags || ALL;\n const p = this;\n\n if (flags & ADD && p.addF) {\n p.add = materialize(p.add, p.addF);\n p.addF = null;\n }\n\n if (flags & REM && p.remF) {\n p.rem = materialize(p.rem, p.remF);\n p.remF = null;\n }\n\n if (flags & MOD && p.modF) {\n p.mod = materialize(p.mod, p.modF);\n p.modF = null;\n }\n\n if (flags & SOURCE && p.srcF) {\n p.source = p.source.filter(p.srcF);\n p.srcF = null;\n }\n\n return p;\n },\n\n /**\n * Visit one or more tuple sets in this pulse.\n * @param {number} flags - Flags indicating the tuple set(s) to visit.\n * Legal values are ADD, REM, MOD and SOURCE (if a backing data source\n * has been set).\n * @param {function(object):*} - Visitor function invoked per-tuple.\n * @return {Pulse} - Returns this pulse instance.\n */\n visit(flags, visitor) {\n const p = this,\n v = visitor;\n\n if (flags & SOURCE) {\n visitArray(p.source, p.srcF, v);\n return p;\n }\n\n if (flags & ADD) visitArray(p.add, p.addF, v);\n if (flags & REM) visitArray(p.rem, p.remF, v);\n if (flags & MOD) visitArray(p.mod, p.modF, v);\n const src = p.source;\n\n if (flags & REFLOW && src) {\n const sum = p.add.length + p.mod.length;\n\n if (sum === src.length) ; else if (sum) {\n visitArray(src, filter(p, ADD_MOD), v);\n } else {\n // if no add/rem/mod tuples, visit source\n visitArray(src, p.srcF, v);\n }\n }\n\n return p;\n }\n\n};\n\n/**\n * Represents a set of multiple pulses. Used as input for operators\n * that accept multiple pulses at a time. Contained pulses are\n * accessible via the public \"pulses\" array property. This pulse doe\n * not carry added, removed or modified tuples directly. However,\n * the visit method can be used to traverse all such tuples contained\n * in sub-pulses with a timestamp matching this parent multi-pulse.\n * @constructor\n * @param {Dataflow} dataflow - The backing dataflow instance.\n * @param {number} stamp - The timestamp.\n * @param {Array<Pulse>} pulses - The sub-pulses for this multi-pulse.\n */\n\nfunction MultiPulse(dataflow, stamp, pulses, encode) {\n const p = this,\n n = pulses.length;\n let c = 0;\n this.dataflow = dataflow;\n this.stamp = stamp;\n this.fields = null;\n this.encode = encode || null;\n this.pulses = pulses;\n\n for (let i = 0; i < n; ++i) {\n const pulse = pulses[i];\n if (pulse.stamp !== stamp) continue;\n\n if (pulse.fields) {\n const hash = p.fields || (p.fields = {});\n\n for (const f in pulse.fields) {\n hash[f] = 1;\n }\n }\n\n if (pulse.changed(p.ADD)) c |= p.ADD;\n if (pulse.changed(p.REM)) c |= p.REM;\n if (pulse.changed(p.MOD)) c |= p.MOD;\n }\n\n this.changes = c;\n}\ninherits(MultiPulse, Pulse, {\n /**\n * Creates a new pulse based on the values of this pulse.\n * The dataflow, time stamp and field modification values are copied over.\n * @return {Pulse}\n */\n fork(flags) {\n const p = new Pulse(this.dataflow).init(this, flags & this.NO_FIELDS);\n\n if (flags !== undefined) {\n if (flags & p.ADD) this.visit(p.ADD, t => p.add.push(t));\n if (flags & p.REM) this.visit(p.REM, t => p.rem.push(t));\n if (flags & p.MOD) this.visit(p.MOD, t => p.mod.push(t));\n }\n\n return p;\n },\n\n changed(flags) {\n return this.changes & flags;\n },\n\n modified(_) {\n const p = this,\n fields = p.fields;\n return !(fields && p.changes & p.MOD) ? 0 : isArray(_) ? _.some(f => fields[f]) : fields[_];\n },\n\n filter() {\n error('MultiPulse does not support filtering.');\n },\n\n materialize() {\n error('MultiPulse does not support materialization.');\n },\n\n visit(flags, visitor) {\n const p = this,\n pulses = p.pulses,\n n = pulses.length;\n let i = 0;\n\n if (flags & p.SOURCE) {\n for (; i < n; ++i) {\n pulses[i].visit(flags, visitor);\n }\n } else {\n for (; i < n; ++i) {\n if (pulses[i].stamp === p.stamp) {\n pulses[i].visit(flags, visitor);\n }\n }\n }\n\n return p;\n }\n\n});\n\n/* eslint-disable require-atomic-updates */\n/**\n * Evaluates the dataflow and returns a Promise that resolves when pulse\n * propagation completes. This method will increment the current timestamp\n * and process all updated, pulsed and touched operators. When invoked for\n * the first time, all registered operators will be processed. This method\n * should not be invoked by third-party clients, use {@link runAsync} or\n * {@link run} instead.\n * @param {string} [encode] - The name of an encoding set to invoke during\n * propagation. This value is added to generated Pulse instances;\n * operators can then respond to (or ignore) this setting as appropriate.\n * This parameter can be used in conjunction with the Encode transform in\n * the vega-encode package.\n * @param {function} [prerun] - An optional callback function to invoke\n * immediately before dataflow evaluation commences.\n * @param {function} [postrun] - An optional callback function to invoke\n * after dataflow evaluation completes. The callback will be invoked\n * after those registered via {@link runAfter}.\n * @return {Promise} - A promise that resolves to this dataflow after\n * evaluation completes.\n */\n\nasync function evaluate(encode, prerun, postrun) {\n const df = this,\n async = []; // if the pulse value is set, this is a re-entrant call\n\n if (df._pulse) return reentrant(df); // wait for pending datasets to load\n\n if (df._pending) await df._pending; // invoke prerun function, if provided\n\n if (prerun) await asyncCallback(df, prerun); // exit early if there are no updates\n\n if (!df._touched.length) {\n df.debug('Dataflow invoked, but nothing to do.');\n return df;\n } // increment timestamp clock\n\n\n const stamp = ++df._clock; // set the current pulse\n\n df._pulse = new Pulse(df, stamp, encode); // initialize priority queue, reset touched operators\n\n df._touched.forEach(op => df._enqueue(op, true));\n\n df._touched = UniqueList(id);\n let count = 0,\n op,\n next,\n error;\n\n try {\n while (df._heap.size() > 0) {\n // dequeue operator with highest priority\n op = df._heap.pop(); // re-queue if rank changed\n\n if (op.rank !== op.qrank) {\n df._enqueue(op, true);\n\n continue;\n } // otherwise, evaluate the operator\n\n\n next = op.run(df._getPulse(op, encode));\n\n if (next.then) {\n // await if operator returns a promise directly\n next = await next;\n } else if (next.async) {\n // queue parallel asynchronous execution\n async.push(next.async);\n next = StopPropagation;\n } // propagate evaluation, enqueue dependent operators\n\n\n if (next !== StopPropagation) {\n if (op._targets) op._targets.forEach(op => df._enqueue(op));\n } // increment visit counter\n\n\n ++count;\n }\n } catch (err) {\n df._heap.clear();\n\n error = err;\n } // reset pulse map\n\n\n df._input = {};\n df._pulse = null;\n df.debug(`Pulse ${stamp}: ${count} operators`);\n\n if (error) {\n df._postrun = [];\n df.error(error);\n } // invoke callbacks queued via runAfter\n\n\n if (df._postrun.length) {\n const pr = df._postrun.sort((a, b) => b.priority - a.priority);\n\n df._postrun = [];\n\n for (let i = 0; i < pr.length; ++i) {\n await asyncCallback(df, pr[i].callback);\n }\n } // invoke postrun function, if provided\n\n\n if (postrun) await asyncCallback(df, postrun); // handle non-blocking asynchronous callbacks\n\n if (async.length) {\n Promise.all(async).then(cb => df.runAsync(null, () => {\n cb.forEach(f => {\n try {\n f(df);\n } catch (err) {\n df.error(err);\n }\n });\n }));\n }\n\n return df;\n}\n/**\n * Queues dataflow evaluation to run once any other queued evaluations have\n * completed and returns a Promise that resolves when the queued pulse\n * propagation completes. If provided, a callback function will be invoked\n * immediately before evaluation commences. This method will ensure a\n * separate evaluation is invoked for each time it is called.\n * @param {string} [encode] - The name of an encoding set to invoke during\n * propagation. This value is added to generated Pulse instances;\n * operators can then respond to (or ignore) this setting as appropriate.\n * This parameter can be used in conjunction with the Encode transform in\n * the vega-encode package.\n * @param {function} [prerun] - An optional callback function to invoke\n * immediately before dataflow evaluation commences.\n * @param {function} [postrun] - An optional callback function to invoke\n * after dataflow evaluation completes. The callback will be invoked\n * after those registered via {@link runAfter}.\n * @return {Promise} - A promise that resolves to this dataflow after\n * evaluation completes.\n */\n\nasync function runAsync(encode, prerun, postrun) {\n // await previously queued functions\n while (this._running) await this._running; // run dataflow, manage running promise\n\n\n const clear = () => this._running = null;\n\n (this._running = this.evaluate(encode, prerun, postrun)).then(clear, clear);\n return this._running;\n}\n/**\n * Requests dataflow evaluation and the immediately returns this dataflow\n * instance. If there are pending data loading or other asynchronous\n * operations, the dataflow will evaluate asynchronously after this method\n * has been invoked. To track when dataflow evaluation completes, use the\n * {@link runAsync} method instead. This method will raise an error if\n * invoked while the dataflow is already in the midst of evaluation.\n * @param {string} [encode] - The name of an encoding set to invoke during\n * propagation. This value is added to generated Pulse instances;\n * operators can then respond to (or ignore) this setting as appropriate.\n * This parameter can be used in conjunction with the Encode transform in\n * the vega-encode module.\n * @param {function} [prerun] - An optional callback function to invoke\n * immediately before dataflow evaluation commences.\n * @param {function} [postrun] - An optional callback function to invoke\n * after dataflow evaluation completes. The callback will be invoked\n * after those registered via {@link runAfter}.\n * @return {Dataflow} - This dataflow instance.\n */\n\nfunction run(encode, prerun, postrun) {\n return this._pulse ? reentrant(this) : (this.evaluate(encode, prerun, postrun), this);\n}\n/**\n * Schedules a callback function to be invoked after the current pulse\n * propagation completes. If no propagation is currently occurring,\n * the function is invoked immediately. Callbacks scheduled via runAfter\n * are invoked immediately upon completion of the current cycle, before\n * any request queued via runAsync. This method is primarily intended for\n * internal use. Third-party callers using runAfter to schedule a callback\n * that invokes {@link run} or {@link runAsync} should not use this method,\n * but instead use {@link runAsync} with prerun or postrun arguments.\n * @param {function(Dataflow)} callback - The callback function to run.\n * The callback will be invoked with this Dataflow instance as its\n * sole argument.\n * @param {boolean} enqueue - A boolean flag indicating that the\n * callback should be queued up to run after the next propagation\n * cycle, suppressing immediate invocation when propagation is not\n * currently occurring.\n * @param {number} [priority] - A priority value used to sort registered\n * callbacks to determine execution order. This argument is intended\n * for internal Vega use only.\n */\n\nfunction runAfter(callback, enqueue, priority) {\n if (this._pulse || enqueue) {\n // pulse propagation is currently running, queue to run after\n this._postrun.push({\n priority: priority || 0,\n callback: callback\n });\n } else {\n // pulse propagation already complete, invoke immediately\n try {\n callback(this);\n } catch (err) {\n this.error(err);\n }\n }\n}\n/**\n * Raise an error for re-entrant dataflow evaluation.\n */\n\nfunction reentrant(df) {\n df.error('Dataflow already running. Use runAsync() to chain invocations.');\n return df;\n}\n/**\n * Enqueue an operator into the priority queue for evaluation. The operator\n * will be enqueued if it has no registered pulse for the current cycle, or if\n * the force argument is true. Upon enqueue, this method also sets the\n * operator's qrank to the current rank value.\n * @param {Operator} op - The operator to enqueue.\n * @param {boolean} [force] - A flag indicating if the operator should be\n * forceably added to the queue, even if it has already been previously\n * enqueued during the current pulse propagation. This is useful when the\n * dataflow graph is dynamically modified and the operator rank changes.\n */\n\n\nfunction enqueue(op, force) {\n const q = op.stamp < this._clock;\n if (q) op.stamp = this._clock;\n\n if (q || force) {\n op.qrank = op.rank;\n\n this._heap.push(op);\n }\n}\n/**\n * Provide a correct pulse for evaluating an operator. If the operator has an\n * explicit source operator, we will try to pull the pulse(s) from it.\n * If there is an array of source operators, we build a multi-pulse.\n * Otherwise, we return a current pulse with correct source data.\n * If the pulse is the pulse map has an explicit target set, we use that.\n * Else if the pulse on the upstream source operator is current, we use that.\n * Else we use the pulse from the pulse map, but copy the source tuple array.\n * @param {Operator} op - The operator for which to get an input pulse.\n * @param {string} [encode] - An (optional) encoding set name with which to\n * annotate the returned pulse. See {@link run} for more information.\n */\n\nfunction getPulse(op, encode) {\n const s = op.source,\n stamp = this._clock;\n return s && isArray(s) ? new MultiPulse(this, stamp, s.map(_ => _.pulse), encode) : this._input[op.id] || singlePulse(this._pulse, s && s.pulse);\n}\n\nfunction singlePulse(p, s) {\n if (s && s.stamp === p.stamp) {\n return s;\n }\n\n p = p.fork();\n\n if (s && s !== StopPropagation) {\n p.source = s.source;\n }\n\n return p;\n}\n\nconst NO_OPT = {\n skip: false,\n force: false\n};\n/**\n * Touches an operator, scheduling it to be evaluated. If invoked outside of\n * a pulse propagation, the operator will be evaluated the next time this\n * dataflow is run. If invoked in the midst of pulse propagation, the operator\n * will be queued for evaluation if and only if the operator has not yet been\n * evaluated on the current propagation timestamp.\n * @param {Operator} op - The operator to touch.\n * @param {object} [options] - Additional options hash.\n * @param {boolean} [options.skip] - If true, the operator will\n * be skipped: it will not be evaluated, but its dependents will be.\n * @return {Dataflow}\n */\n\nfunction touch(op, options) {\n const opt = options || NO_OPT;\n\n if (this._pulse) {\n // if in midst of propagation, add to priority queue\n this._enqueue(op);\n } else {\n // otherwise, queue for next propagation\n this._touched.add(op);\n }\n\n if (opt.skip) op.skip(true);\n return this;\n}\n/**\n * Updates the value of the given operator.\n * @param {Operator} op - The operator to update.\n * @param {*} value - The value to set.\n * @param {object} [options] - Additional options hash.\n * @param {boolean} [options.force] - If true, the operator will\n * be re-evaluated even if its value has not changed.\n * @param {boolean} [options.skip] - If true, the operator will\n * be skipped: it will not be evaluated, but its dependents will be.\n * @return {Dataflow}\n */\n\nfunction update(op, value, options) {\n const opt = options || NO_OPT;\n\n if (op.set(value) || opt.force) {\n this.touch(op, opt);\n }\n\n return this;\n}\n/**\n * Pulses an operator with a changeset of tuples. If invoked outside of\n * a pulse propagation, the pulse will be applied the next time this\n * dataflow is run. If invoked in the midst of pulse propagation, the pulse\n * will be added to the set of active pulses and will be applied if and\n * only if the target operator has not yet been evaluated on the current\n * propagation timestamp.\n * @param {Operator} op - The operator to pulse.\n * @param {ChangeSet} value - The tuple changeset to apply.\n * @param {object} [options] - Additional options hash.\n * @param {boolean} [options.skip] - If true, the operator will\n * be skipped: it will not be evaluated, but its dependents will be.\n * @return {Dataflow}\n */\n\nfunction pulse(op, changeset, options) {\n this.touch(op, options || NO_OPT);\n const p = new Pulse(this, this._clock + (this._pulse ? 0 : 1)),\n t = op.pulse && op.pulse.source || [];\n p.target = op;\n this._input[op.id] = changeset.pulse(p, t);\n return this;\n}\n\nfunction Heap(cmp) {\n let nodes = [];\n return {\n clear: () => nodes = [],\n size: () => nodes.length,\n peek: () => nodes[0],\n push: x => {\n nodes.push(x);\n return siftdown(nodes, 0, nodes.length - 1, cmp);\n },\n pop: () => {\n const last = nodes.pop();\n let item;\n\n if (nodes.length) {\n item = nodes[0];\n nodes[0] = last;\n siftup(nodes, 0, cmp);\n } else {\n item = last;\n }\n\n return item;\n }\n };\n}\n\nfunction siftdown(array, start, idx, cmp) {\n let parent, pidx;\n const item = array[idx];\n\n while (idx > start) {\n pidx = idx - 1 >> 1;\n parent = array[pidx];\n\n if (cmp(item, parent) < 0) {\n array[idx] = parent;\n idx = pidx;\n continue;\n }\n\n break;\n }\n\n return array[idx] = item;\n}\n\nfunction siftup(array, idx, cmp) {\n const start = idx,\n end = array.length,\n item = array[idx];\n let cidx = (idx << 1) + 1,\n ridx;\n\n while (cidx < end) {\n ridx = cidx + 1;\n\n if (ridx < end && cmp(array[cidx], array[ridx]) >= 0) {\n cidx = ridx;\n }\n\n array[idx] = array[cidx];\n idx = cidx;\n cidx = (idx << 1) + 1;\n }\n\n array[idx] = item;\n return siftdown(array, start, idx, cmp);\n}\n\n/**\n * A dataflow graph for reactive processing of data streams.\n * @constructor\n */\n\nfunction Dataflow() {\n this.logger(logger());\n this.logLevel(Error);\n this._clock = 0;\n this._rank = 0;\n this._locale = defaultLocale();\n\n try {\n this._loader = loader();\n } catch (e) {// do nothing if loader module is unavailable\n }\n\n this._touched = UniqueList(id);\n this._input = {};\n this._pulse = null;\n this._heap = Heap((a, b) => a.qrank - b.qrank);\n this._postrun = [];\n}\n\nfunction logMethod(method) {\n return function () {\n return this._log[method].apply(this, arguments);\n };\n}\n\nDataflow.prototype = {\n /**\n * The current timestamp of this dataflow. This value reflects the\n * timestamp of the previous dataflow run. The dataflow is initialized\n * with a stamp value of 0. The initial run of the dataflow will have\n * a timestap of 1, and so on. This value will match the\n * {@link Pulse.stamp} property.\n * @return {number} - The current timestamp value.\n */\n stamp() {\n return this._clock;\n },\n\n /**\n * Gets or sets the loader instance to use for data file loading. A\n * loader object must provide a \"load\" method for loading files and a\n * \"sanitize\" method for checking URL/filename validity. Both methods\n * should accept a URI and options hash as arguments, and return a Promise\n * that resolves to the loaded file contents (load) or a hash containing\n * sanitized URI data with the sanitized url assigned to the \"href\" property\n * (sanitize).\n * @param {object} _ - The loader instance to use.\n * @return {object|Dataflow} - If no arguments are provided, returns\n * the current loader instance. Otherwise returns this Dataflow instance.\n */\n loader(_) {\n if (arguments.length) {\n this._loader = _;\n return this;\n } else {\n return this._loader;\n }\n },\n\n /**\n * Gets or sets the locale instance to use for formatting and parsing\n * string values. The locale object should be provided by the\n * vega-format library, and include methods such as format, timeFormat,\n * utcFormat, timeParse, and utcParse.\n * @param {object} _ - The locale instance to use.\n * @return {object|Dataflow} - If no arguments are provided, returns\n * the current locale instance. Otherwise returns this Dataflow instance.\n */\n locale(_) {\n if (arguments.length) {\n this._locale = _;\n return this;\n } else {\n return this._locale;\n }\n },\n\n /**\n * Get or set the logger instance used to log messages. If no arguments are\n * provided, returns the current logger instance. Otherwise, sets the logger\n * and return this Dataflow instance. Provided loggers must support the full\n * API of logger objects generated by the vega-util logger method. Note that\n * by default the log level of the new logger will be used; use the logLevel\n * method to adjust the log level as needed.\n */\n logger(logger) {\n if (arguments.length) {\n this._log = logger;\n return this;\n } else {\n return this._log;\n }\n },\n\n /**\n * Logs an error message. By default, logged messages are written to console\n * output. The message will only be logged if the current log level is high\n * enough to permit error messages.\n */\n error: logMethod('error'),\n\n /**\n * Logs a warning message. By default, logged messages are written to console\n * output. The message will only be logged if the current log level is high\n * enough to permit warning messages.\n */\n warn: logMethod('warn'),\n\n /**\n * Logs a information message. By default, logged messages are written to\n * console output. The message will only be logged if the current log level is\n * high enough to permit information messages.\n */\n info: logMethod('info'),\n\n /**\n * Logs a debug message. By default, logged messages are written to console\n * output. The message will only be logged if the current log level is high\n * enough to permit debug messages.\n */\n debug: logMethod('debug'),\n\n /**\n * Get or set the current log level. If an argument is provided, it\n * will be used as the new log level.\n * @param {number} [level] - Should be one of None, Warn, Info\n * @return {number} - The current log level.\n */\n logLevel: logMethod('level'),\n\n /**\n * Empty entry threshold for garbage cleaning. Map data structures will\n * perform cleaning once the number of empty entries exceeds this value.\n */\n cleanThreshold: 1e4,\n // OPERATOR REGISTRATION\n add,\n connect,\n rank,\n rerank,\n // OPERATOR UPDATES\n pulse,\n touch,\n update,\n changeset,\n // DATA LOADING\n ingest,\n parse,\n preload,\n request,\n // EVENT HANDLING\n events,\n on,\n // PULSE PROPAGATION\n evaluate,\n run,\n runAsync,\n runAfter,\n _enqueue: enqueue,\n _getPulse: getPulse\n};\n\n/**\n * Abstract class for operators that process data tuples.\n * Subclasses must provide a {@link transform} method for operator processing.\n * @constructor\n * @param {*} [init] - The initial value for this operator.\n * @param {object} [params] - The parameters for this operator.\n * @param {Operator} [source] - The operator from which to receive pulses.\n */\n\nfunction Transform(init, params) {\n Operator.call(this, init, null, params);\n}\ninherits(Transform, Operator, {\n /**\n * Overrides {@link Operator.evaluate} for transform operators.\n * Internally, this method calls {@link evaluate} to perform processing.\n * If {@link evaluate} returns a falsy value, the input pulse is returned.\n * This method should NOT be overridden, instead overrride {@link evaluate}.\n * @param {Pulse} pulse - the current dataflow pulse.\n * @return the output pulse for this operator (or StopPropagation)\n */\n run(pulse) {\n if (pulse.stamp < this.stamp) return pulse.StopPropagation;\n let rv;\n\n if (this.skip()) {\n this.skip(false);\n } else {\n rv = this.evaluate(pulse);\n }\n\n rv = rv || pulse;\n\n if (rv.then) {\n rv = rv.then(_ => this.pulse = _);\n } else if (rv !== pulse.StopPropagation) {\n this.pulse = rv;\n }\n\n return rv;\n },\n\n /**\n * Overrides {@link Operator.evaluate} for transform operators.\n * Marshalls parameter values and then invokes {@link transform}.\n * @param {Pulse} pulse - the current dataflow pulse.\n * @return {Pulse} The output pulse (or StopPropagation). A falsy return\n value (including undefined) will let the input pulse pass through.\n */\n evaluate(pulse) {\n const params = this.marshall(pulse.stamp),\n out = this.transform(params, pulse);\n params.clear();\n return out;\n },\n\n /**\n * Process incoming pulses.\n * Subclasses should override this method to implement transforms.\n * @param {Parameters} _ - The operator parameter values.\n * @param {Pulse} pulse - The current dataflow pulse.\n * @return {Pulse} The output pulse (or StopPropagation). A falsy return\n * value (including undefined) will let the input pulse pass through.\n */\n transform() {}\n\n});\n\nconst transforms = {};\nfunction definition(type) {\n const t = transform(type);\n return t && t.Definition || null;\n}\nfunction transform(type) {\n type = type && type.toLowerCase();\n return hasOwnProperty(transforms, type) ? transforms[type] : null;\n}\n\nexport { Dataflow, EventStream, MultiPulse, Operator, Parameters, Pulse, Transform, UniqueList, asyncCallback, changeset, definition, derive, ingest$1 as ingest, isChangeSet, isTuple, rederive, replace, stableCompare, transform, transforms, tupleid };\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","import ascending from \"./ascending.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) {\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselect(array, k, newLeft, newRight, compare);\n }\n\n const t = array[k];\n let i = left;\n let j = right;\n\n swap(array, left, k);\n if (compare(array[right], t) > 0) swap(array, left, right);\n\n while (i < j) {\n swap(array, i, j), ++i, --j;\n while (compare(array[i], t) < 0) ++i;\n while (compare(array[j], t) > 0) --j;\n }\n\n if (compare(array[left], t) === 0) swap(array, left, j);\n else ++j, swap(array, j, right);\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n return array;\n}\n\nfunction swap(array, i, j) {\n const t = array[i];\n array[i] = array[j];\n array[j] = t;\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","import max from \"./max.js\";\nimport min from \"./min.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n","import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n const v = variance(values, valueof);\n return v ? Math.sqrt(v) : v;\n}\n","export default function variance(values, valueof) {\n let count = 0;\n let delta;\n let mean = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n }\n if (count > 1) return sum / (count - 1);\n}\n","import quantile from \"./quantile.js\";\n\nexport default function(values, valueof) {\n return quantile(values, 0.5, valueof);\n}\n","import { ascending, quantileSorted, deviation, quantile, median } from 'd3-array';\n\nfunction* numbers (values, valueof) {\n if (valueof == null) {\n for (let value of values) {\n if (value != null && value !== '' && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n\n for (let value of values) {\n value = valueof(value, ++index, values);\n\n if (value != null && value !== '' && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n\nfunction quantiles (array, p, f) {\n const values = Float64Array.from(numbers(array, f)); // don't depend on return value from typed array sort call\n // protects against undefined sort results in Safari (vega/vega-lite#4964)\n\n values.sort(ascending);\n return p.map(_ => quantileSorted(values, _));\n}\n\nfunction quartiles (array, f) {\n return quantiles(array, [0.25, 0.50, 0.75], f);\n}\n\n// Theory, Practice, and Visualization. Wiley.\n\nfunction estimateBandwidth (array, f) {\n const n = array.length,\n d = deviation(array, f),\n q = quartiles(array, f),\n h = (q[2] - q[0]) / 1.34,\n v = Math.min(d, h) || d || Math.abs(q[0]) || 1;\n return 1.06 * v * Math.pow(n, -0.2);\n}\n\nfunction bin (_) {\n // determine range\n const maxb = _.maxbins || 20,\n base = _.base || 10,\n logb = Math.log(base),\n div = _.divide || [5, 2];\n let min = _.extent[0],\n max = _.extent[1],\n step,\n level,\n minstep,\n v,\n i,\n n;\n const span = _.span || max - min || Math.abs(min) || 1;\n\n if (_.step) {\n // if step size is explicitly given, use that\n step = _.step;\n } else if (_.steps) {\n // if provided, limit choice to acceptable step sizes\n v = span / maxb;\n\n for (i = 0, n = _.steps.length; i < n && _.steps[i] < v; ++i);\n\n step = _.steps[Math.max(0, i - 1)];\n } else {\n // else use span to determine step size\n level = Math.ceil(Math.log(maxb) / logb);\n minstep = _.minstep || 0;\n step = Math.max(minstep, Math.pow(base, Math.round(Math.log(span) / logb) - level)); // increase step size if too many bins\n\n while (Math.ceil(span / step) > maxb) {\n step *= base;\n } // decrease step size if allowed\n\n\n for (i = 0, n = div.length; i < n; ++i) {\n v = step / div[i];\n if (v >= minstep && span / v <= maxb) step = v;\n }\n } // update precision, min and max\n\n\n v = Math.log(step);\n const precision = v >= 0 ? 0 : ~~(-v / logb) + 1,\n eps = Math.pow(base, -precision - 1);\n\n if (_.nice || _.nice === undefined) {\n v = Math.floor(min / step + eps) * step;\n min = min < v ? v - step : v;\n max = Math.ceil(max / step) * step;\n }\n\n return {\n start: min,\n stop: max === min ? min + step : max,\n step: step\n };\n}\n\nvar random = Math.random;\nfunction setRandom(r) {\n random = r;\n}\n\nfunction bootstrapCI (array, samples, alpha, f) {\n if (!array.length) return [undefined, undefined];\n const values = Float64Array.from(numbers(array, f)),\n n = values.length,\n m = samples;\n let a, i, j, mu;\n\n for (j = 0, mu = Array(m); j < m; ++j) {\n for (a = 0, i = 0; i < n; ++i) {\n a += values[~~(random() * n)];\n }\n\n mu[j] = a / n;\n }\n\n mu.sort(ascending);\n return [quantile(mu, alpha / 2), quantile(mu, 1 - alpha / 2)];\n}\n\n// Dot density binning for dot plot construction.\n// Based on Leland Wilkinson, Dot Plots, The American Statistician, 1999.\n// https://www.cs.uic.edu/~wilkinson/Publications/dotplots.pdf\nfunction dotbin (array, step, smooth, f) {\n f = f || (_ => _);\n\n const n = array.length,\n v = new Float64Array(n);\n let i = 0,\n j = 1,\n a = f(array[0]),\n b = a,\n w = a + step,\n x;\n\n for (; j < n; ++j) {\n x = f(array[j]);\n\n if (x >= w) {\n b = (a + b) / 2;\n\n for (; i < j; ++i) v[i] = b;\n\n w = x + step;\n a = x;\n }\n\n b = x;\n }\n\n b = (a + b) / 2;\n\n for (; i < j; ++i) v[i] = b;\n\n return smooth ? smoothing(v, step + step / 4) : v;\n} // perform smoothing to reduce variance\n// swap points between \"adjacent\" stacks\n// Wilkinson defines adjacent as within step/4 units\n\nfunction smoothing(v, thresh) {\n const n = v.length;\n let a = 0,\n b = 1,\n c,\n d; // get left stack\n\n while (v[a] === v[b]) ++b;\n\n while (b < n) {\n // get right stack\n c = b + 1;\n\n while (v[b] === v[c]) ++c; // are stacks adjacent?\n // if so, compare sizes and swap as needed\n\n\n if (v[b] - v[b - 1] < thresh) {\n d = b + (a + c - b - b >> 1);\n\n while (d < b) v[d++] = v[b];\n\n while (d > b) v[d--] = v[a];\n } // update left stack indices\n\n\n a = b;\n b = c;\n }\n\n return v;\n}\n\nfunction lcg (seed) {\n // Random numbers using a Linear Congruential Generator with seed value\n // Uses glibc values from https://en.wikipedia.org/wiki/Linear_congruential_generator\n return function () {\n seed = (1103515245 * seed + 12345) % 2147483647;\n return seed / 2147483647;\n };\n}\n\nfunction integer (min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n\n let a, b, d;\n const dist = {\n min(_) {\n if (arguments.length) {\n a = _ || 0;\n d = b - a;\n return dist;\n } else {\n return a;\n }\n },\n\n max(_) {\n if (arguments.length) {\n b = _ || 0;\n d = b - a;\n return dist;\n } else {\n return b;\n }\n },\n\n sample() {\n return a + Math.floor(d * random());\n },\n\n pdf(x) {\n return x === Math.floor(x) && x >= a && x < b ? 1 / d : 0;\n },\n\n cdf(x) {\n const v = Math.floor(x);\n return v < a ? 0 : v >= b ? 1 : (v - a + 1) / d;\n },\n\n icdf(p) {\n return p >= 0 && p <= 1 ? a - 1 + Math.floor(p * d) : NaN;\n }\n\n };\n return dist.min(min).max(max);\n}\n\nconst SQRT2PI = Math.sqrt(2 * Math.PI);\nconst SQRT2 = Math.SQRT2;\n\nlet nextSample = NaN;\nfunction sampleNormal(mean, stdev) {\n mean = mean || 0;\n stdev = stdev == null ? 1 : stdev;\n let x = 0,\n y = 0,\n rds,\n c;\n\n if (nextSample === nextSample) {\n x = nextSample;\n nextSample = NaN;\n } else {\n do {\n x = random() * 2 - 1;\n y = random() * 2 - 1;\n rds = x * x + y * y;\n } while (rds === 0 || rds > 1);\n\n c = Math.sqrt(-2 * Math.log(rds) / rds); // Box-Muller transform\n\n x *= c;\n nextSample = y * c;\n }\n\n return mean + x * stdev;\n}\nfunction densityNormal(value, mean, stdev) {\n stdev = stdev == null ? 1 : stdev;\n const z = (value - (mean || 0)) / stdev;\n return Math.exp(-0.5 * z * z) / (stdev * SQRT2PI);\n} // Approximation from West (2009)\n// Better Approximations to Cumulative Normal Functions\n\nfunction cumulativeNormal(value, mean, stdev) {\n mean = mean || 0;\n stdev = stdev == null ? 1 : stdev;\n const z = (value - mean) / stdev,\n Z = Math.abs(z);\n let cd;\n\n if (Z > 37) {\n cd = 0;\n } else {\n const exp = Math.exp(-Z * Z / 2);\n let sum;\n\n if (Z < 7.07106781186547) {\n sum = 3.52624965998911e-02 * Z + 0.700383064443688;\n sum = sum * Z + 6.37396220353165;\n sum = sum * Z + 33.912866078383;\n sum = sum * Z + 112.079291497871;\n sum = sum * Z + 221.213596169931;\n sum = sum * Z + 220.206867912376;\n cd = exp * sum;\n sum = 8.83883476483184e-02 * Z + 1.75566716318264;\n sum = sum * Z + 16.064177579207;\n sum = sum * Z + 86.7807322029461;\n sum = sum * Z + 296.564248779674;\n sum = sum * Z + 637.333633378831;\n sum = sum * Z + 793.826512519948;\n sum = sum * Z + 440.413735824752;\n cd = cd / sum;\n } else {\n sum = Z + 0.65;\n sum = Z + 4 / sum;\n sum = Z + 3 / sum;\n sum = Z + 2 / sum;\n sum = Z + 1 / sum;\n cd = exp / sum / 2.506628274631;\n }\n }\n\n return z > 0 ? 1 - cd : cd;\n} // Approximation of Probit function using inverse error function.\n\nfunction quantileNormal(p, mean, stdev) {\n if (p < 0 || p > 1) return NaN;\n return (mean || 0) + (stdev == null ? 1 : stdev) * SQRT2 * erfinv(2 * p - 1);\n} // Approximate inverse error function. Implementation from \"Approximating\n// the erfinv function\" by Mike Giles, GPU Computing Gems, volume 2, 2010.\n// Ported from Apache Commons Math, http://www.apache.org/licenses/LICENSE-2.0\n\nfunction erfinv(x) {\n // beware that the logarithm argument must be\n // commputed as (1.0 - x) * (1.0 + x),\n // it must NOT be simplified as 1.0 - x * x as this\n // would induce rounding errors near the boundaries +/-1\n let w = -Math.log((1 - x) * (1 + x)),\n p;\n\n if (w < 6.25) {\n w -= 3.125;\n p = -3.6444120640178196996e-21;\n p = -1.685059138182016589e-19 + p * w;\n p = 1.2858480715256400167e-18 + p * w;\n p = 1.115787767802518096e-17 + p * w;\n p = -1.333171662854620906e-16 + p * w;\n p = 2.0972767875968561637e-17 + p * w;\n p = 6.6376381343583238325e-15 + p * w;\n p = -4.0545662729752068639e-14 + p * w;\n p = -8.1519341976054721522e-14 + p * w;\n p = 2.6335093153082322977e-12 + p * w;\n p = -1.2975133253453532498e-11 + p * w;\n p = -5.4154120542946279317e-11 + p * w;\n p = 1.051212273321532285e-09 + p * w;\n p = -4.1126339803469836976e-09 + p * w;\n p = -2.9070369957882005086e-08 + p * w;\n p = 4.2347877827932403518e-07 + p * w;\n p = -1.3654692000834678645e-06 + p * w;\n p = -1.3882523362786468719e-05 + p * w;\n p = 0.0001867342080340571352 + p * w;\n p = -0.00074070253416626697512 + p * w;\n p = -0.0060336708714301490533 + p * w;\n p = 0.24015818242558961693 + p * w;\n p = 1.6536545626831027356 + p * w;\n } else if (w < 16.0) {\n w = Math.sqrt(w) - 3.25;\n p = 2.2137376921775787049e-09;\n p = 9.0756561938885390979e-08 + p * w;\n p = -2.7517406297064545428e-07 + p * w;\n p = 1.8239629214389227755e-08 + p * w;\n p = 1.5027403968909827627e-06 + p * w;\n p = -4.013867526981545969e-06 + p * w;\n p = 2.9234449089955446044e-06 + p * w;\n p = 1.2475304481671778723e-05 + p * w;\n p = -4.7318229009055733981e-05 + p * w;\n p = 6.8284851459573175448e-05 + p * w;\n p = 2.4031110387097893999e-05 + p * w;\n p = -0.0003550375203628474796 + p * w;\n p = 0.00095328937973738049703 + p * w;\n p = -0.0016882755560235047313 + p * w;\n p = 0.0024914420961078508066 + p * w;\n p = -0.0037512085075692412107 + p * w;\n p = 0.005370914553590063617 + p * w;\n p = 1.0052589676941592334 + p * w;\n p = 3.0838856104922207635 + p * w;\n } else if (Number.isFinite(w)) {\n w = Math.sqrt(w) - 5.0;\n p = -2.7109920616438573243e-11;\n p = -2.5556418169965252055e-10 + p * w;\n p = 1.5076572693500548083e-09 + p * w;\n p = -3.7894654401267369937e-09 + p * w;\n p = 7.6157012080783393804e-09 + p * w;\n p = -1.4960026627149240478e-08 + p * w;\n p = 2.9147953450901080826e-08 + p * w;\n p = -6.7711997758452339498e-08 + p * w;\n p = 2.2900482228026654717e-07 + p * w;\n p = -9.9298272942317002539e-07 + p * w;\n p = 4.5260625972231537039e-06 + p * w;\n p = -1.9681778105531670567e-05 + p * w;\n p = 7.5995277030017761139e-05 + p * w;\n p = -0.00021503011930044477347 + p * w;\n p = -0.00013871931833623122026 + p * w;\n p = 1.0103004648645343977 + p * w;\n p = 4.8499064014085844221 + p * w;\n } else {\n p = Infinity;\n }\n\n return p * x;\n}\n\nfunction gaussian (mean, stdev) {\n let mu, sigma;\n const dist = {\n mean(_) {\n if (arguments.length) {\n mu = _ || 0;\n return dist;\n } else {\n return mu;\n }\n },\n\n stdev(_) {\n if (arguments.length) {\n sigma = _ == null ? 1 : _;\n return dist;\n } else {\n return sigma;\n }\n },\n\n sample: () => sampleNormal(mu, sigma),\n pdf: value => densityNormal(value, mu, sigma),\n cdf: value => cumulativeNormal(value, mu, sigma),\n icdf: p => quantileNormal(p, mu, sigma)\n };\n return dist.mean(mean).stdev(stdev);\n}\n\nfunction kde (support, bandwidth) {\n const kernel = gaussian();\n let n = 0;\n const dist = {\n data(_) {\n if (arguments.length) {\n support = _;\n n = _ ? _.length : 0;\n return dist.bandwidth(bandwidth);\n } else {\n return support;\n }\n },\n\n bandwidth(_) {\n if (!arguments.length) return bandwidth;\n bandwidth = _;\n if (!bandwidth && support) bandwidth = estimateBandwidth(support);\n return dist;\n },\n\n sample() {\n return support[~~(random() * n)] + bandwidth * kernel.sample();\n },\n\n pdf(x) {\n let y = 0,\n i = 0;\n\n for (; i < n; ++i) {\n y += kernel.pdf((x - support[i]) / bandwidth);\n }\n\n return y / bandwidth / n;\n },\n\n cdf(x) {\n let y = 0,\n i = 0;\n\n for (; i < n; ++i) {\n y += kernel.cdf((x - support[i]) / bandwidth);\n }\n\n return y / n;\n },\n\n icdf() {\n throw Error('KDE icdf not supported.');\n }\n\n };\n return dist.data(support);\n}\n\nfunction sampleLogNormal(mean, stdev) {\n mean = mean || 0;\n stdev = stdev == null ? 1 : stdev;\n return Math.exp(mean + sampleNormal() * stdev);\n}\nfunction densityLogNormal(value, mean, stdev) {\n if (value <= 0) return 0;\n mean = mean || 0;\n stdev = stdev == null ? 1 : stdev;\n const z = (Math.log(value) - mean) / stdev;\n return Math.exp(-0.5 * z * z) / (stdev * SQRT2PI * value);\n}\nfunction cumulativeLogNormal(value, mean, stdev) {\n return cumulativeNormal(Math.log(value), mean, stdev);\n}\nfunction quantileLogNormal(p, mean, stdev) {\n return Math.exp(quantileNormal(p, mean, stdev));\n}\nfunction lognormal (mean, stdev) {\n let mu, sigma;\n const dist = {\n mean(_) {\n if (arguments.length) {\n mu = _ || 0;\n return dist;\n } else {\n return mu;\n }\n },\n\n stdev(_) {\n if (arguments.length) {\n sigma = _ == null ? 1 : _;\n return dist;\n } else {\n return sigma;\n }\n },\n\n sample: () => sampleLogNormal(mu, sigma),\n pdf: value => densityLogNormal(value, mu, sigma),\n cdf: value => cumulativeLogNormal(value, mu, sigma),\n icdf: p => quantileLogNormal(p, mu, sigma)\n };\n return dist.mean(mean).stdev(stdev);\n}\n\nfunction mixture (dists, weights) {\n let m = 0,\n w;\n\n function normalize(x) {\n const w = [];\n let sum = 0,\n i;\n\n for (i = 0; i < m; ++i) {\n sum += w[i] = x[i] == null ? 1 : +x[i];\n }\n\n for (i = 0; i < m; ++i) {\n w[i] /= sum;\n }\n\n return w;\n }\n\n const dist = {\n weights(_) {\n if (arguments.length) {\n w = normalize(weights = _ || []);\n return dist;\n }\n\n return weights;\n },\n\n distributions(_) {\n if (arguments.length) {\n if (_) {\n m = _.length;\n dists = _;\n } else {\n m = 0;\n dists = [];\n }\n\n return dist.weights(weights);\n }\n\n return dists;\n },\n\n sample() {\n const r = random();\n let d = dists[m - 1],\n v = w[0],\n i = 0; // first select distribution\n\n for (; i < m - 1; v += w[++i]) {\n if (r < v) {\n d = dists[i];\n break;\n }\n } // then sample from it\n\n\n return d.sample();\n },\n\n pdf(x) {\n let p = 0,\n i = 0;\n\n for (; i < m; ++i) {\n p += w[i] * dists[i].pdf(x);\n }\n\n return p;\n },\n\n cdf(x) {\n let p = 0,\n i = 0;\n\n for (; i < m; ++i) {\n p += w[i] * dists[i].cdf(x);\n }\n\n return p;\n },\n\n icdf() {\n throw Error('Mixture icdf not supported.');\n }\n\n };\n return dist.distributions(dists).weights(weights);\n}\n\nfunction sampleUniform(min, max) {\n if (max == null) {\n max = min == null ? 1 : min;\n min = 0;\n }\n\n return min + (max - min) * random();\n}\nfunction densityUniform(value, min, max) {\n if (max == null) {\n max = min == null ? 1 : min;\n min = 0;\n }\n\n return value >= min && value <= max ? 1 / (max - min) : 0;\n}\nfunction cumulativeUniform(value, min, max) {\n if (max == null) {\n max = min == null ? 1 : min;\n min = 0;\n }\n\n return value < min ? 0 : value > max ? 1 : (value - min) / (max - min);\n}\nfunction quantileUniform(p, min, max) {\n if (max == null) {\n max = min == null ? 1 : min;\n min = 0;\n }\n\n return p >= 0 && p <= 1 ? min + p * (max - min) : NaN;\n}\nfunction uniform (min, max) {\n let a, b;\n const dist = {\n min(_) {\n if (arguments.length) {\n a = _ || 0;\n return dist;\n } else {\n return a;\n }\n },\n\n max(_) {\n if (arguments.length) {\n b = _ == null ? 1 : _;\n return dist;\n } else {\n return b;\n }\n },\n\n sample: () => sampleUniform(a, b),\n pdf: value => densityUniform(value, a, b),\n cdf: value => cumulativeUniform(value, a, b),\n icdf: p => quantileUniform(p, a, b)\n };\n\n if (max == null) {\n max = min == null ? 1 : min;\n min = 0;\n }\n\n return dist.min(min).max(max);\n}\n\n// Ordinary Least Squares\nfunction ols (uX, uY, uXY, uX2) {\n const delta = uX2 - uX * uX,\n slope = Math.abs(delta) < 1e-24 ? 0 : (uXY - uX * uY) / delta,\n intercept = uY - slope * uX;\n return [intercept, slope];\n}\n\nfunction points(data, x, y, sort) {\n data = data.filter(d => {\n let u = x(d),\n v = y(d);\n return u != null && (u = +u) >= u && v != null && (v = +v) >= v;\n });\n\n if (sort) {\n data.sort((a, b) => x(a) - x(b));\n }\n\n const n = data.length,\n X = new Float64Array(n),\n Y = new Float64Array(n); // extract values, calculate means\n\n let i = 0,\n ux = 0,\n uy = 0,\n xv,\n yv,\n d;\n\n for (d of data) {\n X[i] = xv = +x(d);\n Y[i] = yv = +y(d);\n ++i;\n ux += (xv - ux) / i;\n uy += (yv - uy) / i;\n } // mean center the data\n\n\n for (i = 0; i < n; ++i) {\n X[i] -= ux;\n Y[i] -= uy;\n }\n\n return [X, Y, ux, uy];\n}\nfunction visitPoints(data, x, y, callback) {\n let i = -1,\n u,\n v;\n\n for (const d of data) {\n u = x(d);\n v = y(d);\n\n if (u != null && (u = +u) >= u && v != null && (v = +v) >= v) {\n callback(u, v, ++i);\n }\n }\n}\n\n// License: https://github.com/HarryStevens/d3-regression/blob/master/LICENSE\n\nfunction rSquared (data, x, y, uY, predict) {\n let SSE = 0,\n SST = 0;\n visitPoints(data, x, y, (dx, dy) => {\n const sse = dy - predict(dx),\n sst = dy - uY;\n SSE += sse * sse;\n SST += sst * sst;\n });\n return 1 - SSE / SST;\n}\n\n// License: https://github.com/HarryStevens/d3-regression/blob/master/LICENSE\n\nfunction linear (data, x, y) {\n let X = 0,\n Y = 0,\n XY = 0,\n X2 = 0,\n n = 0;\n visitPoints(data, x, y, (dx, dy) => {\n ++n;\n X += (dx - X) / n;\n Y += (dy - Y) / n;\n XY += (dx * dy - XY) / n;\n X2 += (dx * dx - X2) / n;\n });\n\n const coef = ols(X, Y, XY, X2),\n predict = x => coef[0] + coef[1] * x;\n\n return {\n coef: coef,\n predict: predict,\n rSquared: rSquared(data, x, y, Y, predict)\n };\n}\n\n// License: https://github.com/HarryStevens/d3-regression/blob/master/LICENSE\n\nfunction log (data, x, y) {\n let X = 0,\n Y = 0,\n XY = 0,\n X2 = 0,\n n = 0;\n visitPoints(data, x, y, (dx, dy) => {\n ++n;\n dx = Math.log(dx);\n X += (dx - X) / n;\n Y += (dy - Y) / n;\n XY += (dx * dy - XY) / n;\n X2 += (dx * dx - X2) / n;\n });\n\n const coef = ols(X, Y, XY, X2),\n predict = x => coef[0] + coef[1] * Math.log(x);\n\n return {\n coef: coef,\n predict: predict,\n rSquared: rSquared(data, x, y, Y, predict)\n };\n}\n\nfunction exp (data, x, y) {\n // eslint-disable-next-line no-unused-vars\n const [xv, yv, ux, uy] = points(data, x, y);\n let YL = 0,\n XY = 0,\n XYL = 0,\n X2Y = 0,\n n = 0,\n dx,\n ly,\n xy;\n visitPoints(data, x, y, (_, dy) => {\n dx = xv[n++];\n ly = Math.log(dy);\n xy = dx * dy;\n YL += (dy * ly - YL) / n;\n XY += (xy - XY) / n;\n XYL += (xy * ly - XYL) / n;\n X2Y += (dx * xy - X2Y) / n;\n });\n\n const [c0, c1] = ols(XY / uy, YL / uy, XYL / uy, X2Y / uy),\n predict = x => Math.exp(c0 + c1 * (x - ux));\n\n return {\n coef: [Math.exp(c0 - c1 * ux), c1],\n predict: predict,\n rSquared: rSquared(data, x, y, uy, predict)\n };\n}\n\n// License: https://github.com/HarryStevens/d3-regression/blob/master/LICENSE\n\nfunction pow (data, x, y) {\n let X = 0,\n Y = 0,\n XY = 0,\n X2 = 0,\n YS = 0,\n n = 0;\n visitPoints(data, x, y, (dx, dy) => {\n const lx = Math.log(dx),\n ly = Math.log(dy);\n ++n;\n X += (lx - X) / n;\n Y += (ly - Y) / n;\n XY += (lx * ly - XY) / n;\n X2 += (lx * lx - X2) / n;\n YS += (dy - YS) / n;\n });\n\n const coef = ols(X, Y, XY, X2),\n predict = x => coef[0] * Math.pow(x, coef[1]);\n\n coef[0] = Math.exp(coef[0]);\n return {\n coef: coef,\n predict: predict,\n rSquared: rSquared(data, x, y, YS, predict)\n };\n}\n\nfunction quad (data, x, y) {\n const [xv, yv, ux, uy] = points(data, x, y),\n n = xv.length;\n let X2 = 0,\n X3 = 0,\n X4 = 0,\n XY = 0,\n X2Y = 0,\n i,\n dx,\n dy,\n x2;\n\n for (i = 0; i < n;) {\n dx = xv[i];\n dy = yv[i++];\n x2 = dx * dx;\n X2 += (x2 - X2) / i;\n X3 += (x2 * dx - X3) / i;\n X4 += (x2 * x2 - X4) / i;\n XY += (dx * dy - XY) / i;\n X2Y += (x2 * dy - X2Y) / i;\n }\n\n const X2X2 = X4 - X2 * X2,\n d = X2 * X2X2 - X3 * X3,\n a = (X2Y * X2 - XY * X3) / d,\n b = (XY * X2X2 - X2Y * X3) / d,\n c = -a * X2,\n predict = x => {\n x = x - ux;\n return a * x * x + b * x + c + uy;\n }; // transform coefficients back from mean-centered space\n\n\n return {\n coef: [c - b * ux + a * ux * ux + uy, b - 2 * a * ux, a],\n predict: predict,\n rSquared: rSquared(data, x, y, uy, predict)\n };\n}\n\n// License: https://github.com/HarryStevens/d3-regression/blob/master/LICENSE\n// ... which was adapted from regression-js by Tom Alexander\n// Source: https://github.com/Tom-Alexander/regression-js/blob/master/src/regression.js#L246\n// License: https://github.com/Tom-Alexander/regression-js/blob/master/LICENSE\n\nfunction poly (data, x, y, order) {\n // use more efficient methods for lower orders\n if (order === 1) return linear(data, x, y);\n if (order === 2) return quad(data, x, y);\n const [xv, yv, ux, uy] = points(data, x, y),\n n = xv.length,\n lhs = [],\n rhs = [],\n k = order + 1;\n let i, j, l, v, c;\n\n for (i = 0; i < k; ++i) {\n for (l = 0, v = 0; l < n; ++l) {\n v += Math.pow(xv[l], i) * yv[l];\n }\n\n lhs.push(v);\n c = new Float64Array(k);\n\n for (j = 0; j < k; ++j) {\n for (l = 0, v = 0; l < n; ++l) {\n v += Math.pow(xv[l], i + j);\n }\n\n c[j] = v;\n }\n\n rhs.push(c);\n }\n\n rhs.push(lhs);\n\n const coef = gaussianElimination(rhs),\n predict = x => {\n x -= ux;\n let y = uy + coef[0] + coef[1] * x + coef[2] * x * x;\n\n for (i = 3; i < k; ++i) y += coef[i] * Math.pow(x, i);\n\n return y;\n };\n\n return {\n coef: uncenter(k, coef, -ux, uy),\n predict: predict,\n rSquared: rSquared(data, x, y, uy, predict)\n };\n}\n\nfunction uncenter(k, a, x, y) {\n const z = Array(k);\n let i, j, v, c; // initialize to zero\n\n for (i = 0; i < k; ++i) z[i] = 0; // polynomial expansion\n\n\n for (i = k - 1; i >= 0; --i) {\n v = a[i];\n c = 1;\n z[i] += v;\n\n for (j = 1; j <= i; ++j) {\n c *= (i + 1 - j) / j; // binomial coefficent\n\n z[i - j] += v * Math.pow(x, j) * c;\n }\n } // bias term\n\n\n z[0] += y;\n return z;\n} // Given an array for a two-dimensional matrix and the polynomial order,\n// solve A * x = b using Gaussian elimination.\n\n\nfunction gaussianElimination(matrix) {\n const n = matrix.length - 1,\n coef = [];\n let i, j, k, r, t;\n\n for (i = 0; i < n; ++i) {\n r = i; // max row\n\n for (j = i + 1; j < n; ++j) {\n if (Math.abs(matrix[i][j]) > Math.abs(matrix[i][r])) {\n r = j;\n }\n }\n\n for (k = i; k < n + 1; ++k) {\n t = matrix[k][i];\n matrix[k][i] = matrix[k][r];\n matrix[k][r] = t;\n }\n\n for (j = i + 1; j < n; ++j) {\n for (k = n; k >= i; k--) {\n matrix[k][j] -= matrix[k][i] * matrix[i][j] / matrix[i][i];\n }\n }\n }\n\n for (j = n - 1; j >= 0; --j) {\n t = 0;\n\n for (k = j + 1; k < n; ++k) {\n t += matrix[k][j] * coef[k];\n }\n\n coef[j] = (matrix[n][j] - t) / matrix[j][j];\n }\n\n return coef;\n}\n\nconst maxiters = 2,\n epsilon = 1e-12; // Adapted from science.js by Jason Davies\n// Source: https://github.com/jasondavies/science.js/blob/master/src/stats/loess.js\n// License: https://github.com/jasondavies/science.js/blob/master/LICENSE\n\nfunction loess (data, x, y, bandwidth) {\n const [xv, yv, ux, uy] = points(data, x, y, true),\n n = xv.length,\n bw = Math.max(2, ~~(bandwidth * n)),\n // # nearest neighbors\n yhat = new Float64Array(n),\n residuals = new Float64Array(n),\n robustWeights = new Float64Array(n).fill(1);\n\n for (let iter = -1; ++iter <= maxiters;) {\n const interval = [0, bw - 1];\n\n for (let i = 0; i < n; ++i) {\n const dx = xv[i],\n i0 = interval[0],\n i1 = interval[1],\n edge = dx - xv[i0] > xv[i1] - dx ? i0 : i1;\n let W = 0,\n X = 0,\n Y = 0,\n XY = 0,\n X2 = 0;\n const denom = 1 / Math.abs(xv[edge] - dx || 1); // avoid singularity!\n\n for (let k = i0; k <= i1; ++k) {\n const xk = xv[k],\n yk = yv[k],\n w = tricube(Math.abs(dx - xk) * denom) * robustWeights[k],\n xkw = xk * w;\n W += w;\n X += xkw;\n Y += yk * w;\n XY += yk * xkw;\n X2 += xk * xkw;\n } // linear regression fit\n\n\n const [a, b] = ols(X / W, Y / W, XY / W, X2 / W);\n yhat[i] = a + b * dx;\n residuals[i] = Math.abs(yv[i] - yhat[i]);\n updateInterval(xv, i + 1, interval);\n }\n\n if (iter === maxiters) {\n break;\n }\n\n const medianResidual = median(residuals);\n if (Math.abs(medianResidual) < epsilon) break;\n\n for (let i = 0, arg, w; i < n; ++i) {\n arg = residuals[i] / (6 * medianResidual); // default to epsilon (rather than zero) for large deviations\n // keeping weights tiny but non-zero prevents singularites\n\n robustWeights[i] = arg >= 1 ? epsilon : (w = 1 - arg * arg) * w;\n }\n }\n\n return output(xv, yhat, ux, uy);\n} // weighting kernel for local regression\n\nfunction tricube(x) {\n return (x = 1 - x * x * x) * x * x;\n} // advance sliding window interval of nearest neighbors\n\n\nfunction updateInterval(xv, i, interval) {\n const val = xv[i];\n let left = interval[0],\n right = interval[1] + 1;\n if (right >= xv.length) return; // step right if distance to new right edge is <= distance to old left edge\n // step when distance is equal to ensure movement over duplicate x values\n\n while (i > left && xv[right] - val <= val - xv[left]) {\n interval[0] = ++left;\n interval[1] = right;\n ++right;\n }\n} // generate smoothed output points\n// average points with repeated x values\n\n\nfunction output(xv, yhat, ux, uy) {\n const n = xv.length,\n out = [];\n let i = 0,\n cnt = 0,\n prev = [],\n v;\n\n for (; i < n; ++i) {\n v = xv[i] + ux;\n\n if (prev[0] === v) {\n // average output values via online update\n prev[1] += (yhat[i] - prev[1]) / ++cnt;\n } else {\n // add new output point\n cnt = 0;\n prev[1] += uy;\n prev = [v, yhat[i]];\n out.push(prev);\n }\n }\n\n prev[1] += uy;\n return out;\n}\n\n// subdivide up to accuracy of 0.5 degrees\nconst MIN_RADIANS = 0.5 * Math.PI / 180; // Adaptively sample an interpolated function over a domain extent\n\nfunction sampleCurve (f, extent, minSteps, maxSteps) {\n minSteps = minSteps || 25;\n maxSteps = Math.max(minSteps, maxSteps || 200);\n\n const point = x => [x, f(x)],\n minX = extent[0],\n maxX = extent[1],\n span = maxX - minX,\n stop = span / maxSteps,\n prev = [point(minX)],\n next = [];\n\n if (minSteps === maxSteps) {\n // no adaptation, sample uniform grid directly and return\n for (let i = 1; i < maxSteps; ++i) {\n prev.push(point(minX + i / minSteps * span));\n }\n\n prev.push(point(maxX));\n return prev;\n } else {\n // sample minimum points on uniform grid\n // then move on to perform adaptive refinement\n next.push(point(maxX));\n\n for (let i = minSteps; --i > 0;) {\n next.push(point(minX + i / minSteps * span));\n }\n }\n\n let p0 = prev[0];\n let p1 = next[next.length - 1];\n const sx = 1 / span;\n const sy = scaleY(p0[1], next);\n\n while (p1) {\n // midpoint for potential curve subdivision\n const pm = point((p0[0] + p1[0]) / 2);\n const dx = pm[0] - p0[0] >= stop;\n\n if (dx && angleDelta(p0, pm, p1, sx, sy) > MIN_RADIANS) {\n // maximum resolution has not yet been met, and\n // subdivision midpoint is sufficiently different from endpoint\n // save subdivision, push midpoint onto the visitation stack\n next.push(pm);\n } else {\n // subdivision midpoint sufficiently similar to endpoint\n // skip subdivision, store endpoint, move to next point on the stack\n p0 = p1;\n prev.push(p1);\n next.pop();\n }\n\n p1 = next[next.length - 1];\n }\n\n return prev;\n}\n\nfunction scaleY(init, points) {\n let ymin = init;\n let ymax = init;\n const n = points.length;\n\n for (let i = 0; i < n; ++i) {\n const y = points[i][1];\n if (y < ymin) ymin = y;\n if (y > ymax) ymax = y;\n }\n\n return 1 / (ymax - ymin);\n}\n\nfunction angleDelta(p, q, r, sx, sy) {\n const a0 = Math.atan2(sy * (r[1] - p[1]), sx * (r[0] - p[0])),\n a1 = Math.atan2(sy * (q[1] - p[1]), sx * (q[0] - p[0]));\n return Math.abs(a0 - a1);\n}\n\nexport { estimateBandwidth as bandwidthNRD, bin, bootstrapCI, cumulativeLogNormal, cumulativeNormal, cumulativeUniform, densityLogNormal, densityNormal, densityUniform, dotbin, quantileLogNormal, quantileNormal, quantileUniform, quantiles, quartiles, random, integer as randomInteger, kde as randomKDE, lcg as randomLCG, lognormal as randomLogNormal, mixture as randomMixture, gaussian as randomNormal, uniform as randomUniform, exp as regressionExp, linear as regressionLinear, loess as regressionLoess, log as regressionLog, poly as regressionPoly, pow as regressionPow, quad as regressionQuad, sampleCurve, sampleLogNormal, sampleNormal, sampleUniform, setRandom };\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) {\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselect(array, k, newLeft, newRight, compare);\n }\n\n const t = array[k];\n let i = left;\n let j = right;\n\n swap(array, left, k);\n if (compare(array[right], t) > 0) swap(array, left, right);\n\n while (i < j) {\n swap(array, i, j), ++i, --j;\n while (compare(array[i], t) < 0) ++i;\n while (compare(array[j], t) > 0) --j;\n }\n\n if (compare(array[left], t) === 0) swap(array, left, j);\n else ++j, swap(array, j, right);\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n return array;\n}\n\nfunction swap(array, i, j) {\n const t = array[i];\n array[i] = array[j];\n array[j] = t;\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","import max from \"./max.js\";\nimport min from \"./min.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n","import { extend, identity, field, hasOwnProperty, extentIndex, inherits, array, accessorName, error, accessorFields, accessor, toNumber, merge, compare, truthy, extent, span, fastmap, isArray, key, ascending, peek, zero, constant } from 'vega-util';\nimport { tupleid, Transform, replace, ingest, stableCompare, Operator, derive, rederive } from 'vega-dataflow';\nimport { quartiles, bootstrapCI, bin, randomKDE, randomMixture, randomNormal, randomLogNormal, randomUniform, sampleCurve, dotbin, quantiles, random } from 'vega-statistics';\nimport { median, mean, min, max, range, bisector } from 'd3-array';\nimport { TIME_UNITS, utcInterval, timeInterval, timeBin, timeUnits, utcFloor, timeFloor } from 'vega-time';\n\nfunction multikey(f) {\n return x => {\n const n = f.length;\n let i = 1,\n k = String(f[0](x));\n\n for (; i < n; ++i) {\n k += '|' + f[i](x);\n }\n\n return k;\n };\n}\nfunction groupkey(fields) {\n return !fields || !fields.length ? function () {\n return '';\n } : fields.length === 1 ? fields[0] : multikey(fields);\n}\n\nfunction measureName(op, field, as) {\n return as || op + (!field ? '' : '_' + field);\n}\n\nconst noop = () => {};\n\nconst base_op = {\n init: noop,\n add: noop,\n rem: noop,\n idx: 0\n};\nconst AggregateOps = {\n values: {\n init: m => m.cell.store = true,\n value: m => m.cell.data.values(),\n idx: -1\n },\n count: {\n value: m => m.cell.num\n },\n __count__: {\n value: m => m.missing + m.valid\n },\n missing: {\n value: m => m.missing\n },\n valid: {\n value: m => m.valid\n },\n sum: {\n init: m => m.sum = 0,\n value: m => m.sum,\n add: (m, v) => m.sum += +v,\n rem: (m, v) => m.sum -= v\n },\n product: {\n init: m => m.product = 1,\n value: m => m.valid ? m.product : undefined,\n add: (m, v) => m.product *= v,\n rem: (m, v) => m.product /= v\n },\n mean: {\n init: m => m.mean = 0,\n value: m => m.valid ? m.mean : undefined,\n add: (m, v) => (m.mean_d = v - m.mean, m.mean += m.mean_d / m.valid),\n rem: (m, v) => (m.mean_d = v - m.mean, m.mean -= m.valid ? m.mean_d / m.valid : m.mean)\n },\n average: {\n value: m => m.valid ? m.mean : undefined,\n req: ['mean'],\n idx: 1\n },\n variance: {\n init: m => m.dev = 0,\n value: m => m.valid > 1 ? m.dev / (m.valid - 1) : undefined,\n add: (m, v) => m.dev += m.mean_d * (v - m.mean),\n rem: (m, v) => m.dev -= m.mean_d * (v - m.mean),\n req: ['mean'],\n idx: 1\n },\n variancep: {\n value: m => m.valid > 1 ? m.dev / m.valid : undefined,\n req: ['variance'],\n idx: 2\n },\n stdev: {\n value: m => m.valid > 1 ? Math.sqrt(m.dev / (m.valid - 1)) : undefined,\n req: ['variance'],\n idx: 2\n },\n stdevp: {\n value: m => m.valid > 1 ? Math.sqrt(m.dev / m.valid) : undefined,\n req: ['variance'],\n idx: 2\n },\n stderr: {\n value: m => m.valid > 1 ? Math.sqrt(m.dev / (m.valid * (m.valid - 1))) : undefined,\n req: ['variance'],\n idx: 2\n },\n distinct: {\n value: m => m.cell.data.distinct(m.get),\n req: ['values'],\n idx: 3\n },\n ci0: {\n value: m => m.cell.data.ci0(m.get),\n req: ['values'],\n idx: 3\n },\n ci1: {\n value: m => m.cell.data.ci1(m.get),\n req: ['values'],\n idx: 3\n },\n median: {\n value: m => m.cell.data.q2(m.get),\n req: ['values'],\n idx: 3\n },\n q1: {\n value: m => m.cell.data.q1(m.get),\n req: ['values'],\n idx: 3\n },\n q3: {\n value: m => m.cell.data.q3(m.get),\n req: ['values'],\n idx: 3\n },\n min: {\n init: m => m.min = undefined,\n value: m => m.min = Number.isNaN(m.min) ? m.cell.data.min(m.get) : m.min,\n add: (m, v) => {\n if (v < m.min || m.min === undefined) m.min = v;\n },\n rem: (m, v) => {\n if (v <= m.min) m.min = NaN;\n },\n req: ['values'],\n idx: 4\n },\n max: {\n init: m => m.max = undefined,\n value: m => m.max = Number.isNaN(m.max) ? m.cell.data.max(m.get) : m.max,\n add: (m, v) => {\n if (v > m.max || m.max === undefined) m.max = v;\n },\n rem: (m, v) => {\n if (v >= m.max) m.max = NaN;\n },\n req: ['values'],\n idx: 4\n },\n argmin: {\n init: m => m.argmin = undefined,\n value: m => m.argmin || m.cell.data.argmin(m.get),\n add: (m, v, t) => {\n if (v < m.min) m.argmin = t;\n },\n rem: (m, v) => {\n if (v <= m.min) m.argmin = undefined;\n },\n req: ['min', 'values'],\n idx: 3\n },\n argmax: {\n init: m => m.argmax = undefined,\n value: m => m.argmax || m.cell.data.argmax(m.get),\n add: (m, v, t) => {\n if (v > m.max) m.argmax = t;\n },\n rem: (m, v) => {\n if (v >= m.max) m.argmax = undefined;\n },\n req: ['max', 'values'],\n idx: 3\n }\n};\nconst ValidAggregateOps = Object.keys(AggregateOps);\n\nfunction measure(key, value) {\n return out => extend({\n name: key,\n out: out || key\n }, base_op, value);\n}\n\nValidAggregateOps.forEach(key => {\n AggregateOps[key] = measure(key, AggregateOps[key]);\n});\nfunction createMeasure(op, name) {\n return AggregateOps[op](name);\n}\n\nfunction compareIndex(a, b) {\n return a.idx - b.idx;\n}\n\nfunction resolve(agg) {\n const map = {};\n agg.forEach(a => map[a.name] = a);\n\n const getreqs = a => {\n if (!a.req) return;\n a.req.forEach(key => {\n if (!map[key]) getreqs(map[key] = AggregateOps[key]());\n });\n };\n\n agg.forEach(getreqs);\n return Object.values(map).sort(compareIndex);\n}\n\nfunction init() {\n this.valid = 0;\n this.missing = 0;\n\n this._ops.forEach(op => op.init(this));\n}\n\nfunction add(v, t) {\n if (v == null || v === '') {\n ++this.missing;\n return;\n }\n\n if (v !== v) return;\n ++this.valid;\n\n this._ops.forEach(op => op.add(this, v, t));\n}\n\nfunction rem(v, t) {\n if (v == null || v === '') {\n --this.missing;\n return;\n }\n\n if (v !== v) return;\n --this.valid;\n\n this._ops.forEach(op => op.rem(this, v, t));\n}\n\nfunction set(t) {\n this._out.forEach(op => t[op.out] = op.value(this));\n\n return t;\n}\n\nfunction compileMeasures(agg, field) {\n const get = field || identity,\n ops = resolve(agg),\n out = agg.slice().sort(compareIndex);\n\n function ctr(cell) {\n this._ops = ops;\n this._out = out;\n this.cell = cell;\n this.init();\n }\n\n ctr.prototype.init = init;\n ctr.prototype.add = add;\n ctr.prototype.rem = rem;\n ctr.prototype.set = set;\n ctr.prototype.get = get;\n ctr.fields = agg.map(op => op.out);\n return ctr;\n}\n\nfunction TupleStore(key) {\n this._key = key ? field(key) : tupleid;\n this.reset();\n}\nconst prototype$1 = TupleStore.prototype;\n\nprototype$1.reset = function () {\n this._add = [];\n this._rem = [];\n this._ext = null;\n this._get = null;\n this._q = null;\n};\n\nprototype$1.add = function (v) {\n this._add.push(v);\n};\n\nprototype$1.rem = function (v) {\n this._rem.push(v);\n};\n\nprototype$1.values = function () {\n this._get = null;\n if (this._rem.length === 0) return this._add;\n const a = this._add,\n r = this._rem,\n k = this._key,\n n = a.length,\n m = r.length,\n x = Array(n - m),\n map = {};\n let i, j, v; // use unique key field to clear removed values\n\n for (i = 0; i < m; ++i) {\n map[k(r[i])] = 1;\n }\n\n for (i = 0, j = 0; i < n; ++i) {\n if (map[k(v = a[i])]) {\n map[k(v)] = 0;\n } else {\n x[j++] = v;\n }\n }\n\n this._rem = [];\n return this._add = x;\n}; // memoizing statistics methods\n\n\nprototype$1.distinct = function (get) {\n const v = this.values(),\n map = {};\n let n = v.length,\n count = 0,\n s;\n\n while (--n >= 0) {\n s = get(v[n]) + '';\n\n if (!hasOwnProperty(map, s)) {\n map[s] = 1;\n ++count;\n }\n }\n\n return count;\n};\n\nprototype$1.extent = function (get) {\n if (this._get !== get || !this._ext) {\n const v = this.values(),\n i = extentIndex(v, get);\n this._ext = [v[i[0]], v[i[1]]];\n this._get = get;\n }\n\n return this._ext;\n};\n\nprototype$1.argmin = function (get) {\n return this.extent(get)[0] || {};\n};\n\nprototype$1.argmax = function (get) {\n return this.extent(get)[1] || {};\n};\n\nprototype$1.min = function (get) {\n const m = this.extent(get)[0];\n return m != null ? get(m) : undefined;\n};\n\nprototype$1.max = function (get) {\n const m = this.extent(get)[1];\n return m != null ? get(m) : undefined;\n};\n\nprototype$1.quartile = function (get) {\n if (this._get !== get || !this._q) {\n this._q = quartiles(this.values(), get);\n this._get = get;\n }\n\n return this._q;\n};\n\nprototype$1.q1 = function (get) {\n return this.quartile(get)[0];\n};\n\nprototype$1.q2 = function (get) {\n return this.quartile(get)[1];\n};\n\nprototype$1.q3 = function (get) {\n return this.quartile(get)[2];\n};\n\nprototype$1.ci = function (get) {\n if (this._get !== get || !this._ci) {\n this._ci = bootstrapCI(this.values(), 1000, 0.05, get);\n this._get = get;\n }\n\n return this._ci;\n};\n\nprototype$1.ci0 = function (get) {\n return this.ci(get)[0];\n};\n\nprototype$1.ci1 = function (get) {\n return this.ci(get)[1];\n};\n\n/**\n * Group-by aggregation operator.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors to groupby.\n * @param {Array<function(object): *>} [params.fields] - An array of accessors to aggregate.\n * @param {Array<string>} [params.ops] - An array of strings indicating aggregation operations.\n * @param {Array<string>} [params.as] - An array of output field names for aggregated values.\n * @param {boolean} [params.cross=false] - A flag indicating that the full\n * cross-product of groupby values should be generated, including empty cells.\n * If true, the drop parameter is ignored and empty cells are retained.\n * @param {boolean} [params.drop=true] - A flag indicating if empty cells should be removed.\n */\n\nfunction Aggregate(params) {\n Transform.call(this, null, params);\n this._adds = []; // array of added output tuples\n\n this._mods = []; // array of modified output tuples\n\n this._alen = 0; // number of active added tuples\n\n this._mlen = 0; // number of active modified tuples\n\n this._drop = true; // should empty aggregation cells be removed\n\n this._cross = false; // produce full cross-product of group-by values\n\n this._dims = []; // group-by dimension accessors\n\n this._dnames = []; // group-by dimension names\n\n this._measures = []; // collection of aggregation monoids\n\n this._countOnly = false; // flag indicating only count aggregation\n\n this._counts = null; // collection of count fields\n\n this._prev = null; // previous aggregation cells\n\n this._inputs = null; // array of dependent input tuple field names\n\n this._outputs = null; // array of output tuple field names\n}\nAggregate.Definition = {\n 'type': 'Aggregate',\n 'metadata': {\n 'generates': true,\n 'changes': true\n },\n 'params': [{\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'ops',\n 'type': 'enum',\n 'array': true,\n 'values': ValidAggregateOps\n }, {\n 'name': 'fields',\n 'type': 'field',\n 'null': true,\n 'array': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'null': true,\n 'array': true\n }, {\n 'name': 'drop',\n 'type': 'boolean',\n 'default': true\n }, {\n 'name': 'cross',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'key',\n 'type': 'field'\n }]\n};\ninherits(Aggregate, Transform, {\n transform(_, pulse) {\n const aggr = this,\n out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n mod = _.modified();\n\n aggr.stamp = out.stamp;\n\n if (aggr.value && (mod || pulse.modified(aggr._inputs, true))) {\n aggr._prev = aggr.value;\n aggr.value = mod ? aggr.init(_) : {};\n pulse.visit(pulse.SOURCE, t => aggr.add(t));\n } else {\n aggr.value = aggr.value || aggr.init(_);\n pulse.visit(pulse.REM, t => aggr.rem(t));\n pulse.visit(pulse.ADD, t => aggr.add(t));\n } // Indicate output fields and return aggregate tuples.\n\n\n out.modifies(aggr._outputs); // Should empty cells be dropped?\n\n aggr._drop = _.drop !== false; // If domain cross-product requested, generate empty cells as needed\n // and ensure that empty cells are not dropped\n\n if (_.cross && aggr._dims.length > 1) {\n aggr._drop = false;\n aggr.cross();\n }\n\n if (pulse.clean() && aggr._drop) {\n out.clean(true).runAfter(() => this.clean());\n }\n\n return aggr.changes(out);\n },\n\n cross() {\n const aggr = this,\n curr = aggr.value,\n dims = aggr._dnames,\n vals = dims.map(() => ({})),\n n = dims.length; // collect all group-by domain values\n\n function collect(cells) {\n let key, i, t, v;\n\n for (key in cells) {\n t = cells[key].tuple;\n\n for (i = 0; i < n; ++i) {\n vals[i][v = t[dims[i]]] = v;\n }\n }\n }\n\n collect(aggr._prev);\n collect(curr); // iterate over key cross-product, create cells as needed\n\n function generate(base, tuple, index) {\n const name = dims[index],\n v = vals[index++];\n\n for (const k in v) {\n const key = base ? base + '|' + k : k;\n tuple[name] = v[k];\n if (index < n) generate(key, tuple, index);else if (!curr[key]) aggr.cell(key, tuple);\n }\n }\n\n generate('', {}, 0);\n },\n\n init(_) {\n // initialize input and output fields\n const inputs = this._inputs = [],\n outputs = this._outputs = [],\n inputMap = {};\n\n function inputVisit(get) {\n const fields = array(accessorFields(get)),\n n = fields.length;\n let i = 0,\n f;\n\n for (; i < n; ++i) {\n if (!inputMap[f = fields[i]]) {\n inputMap[f] = 1;\n inputs.push(f);\n }\n }\n } // initialize group-by dimensions\n\n\n this._dims = array(_.groupby);\n this._dnames = this._dims.map(d => {\n const dname = accessorName(d);\n inputVisit(d);\n outputs.push(dname);\n return dname;\n });\n this.cellkey = _.key ? _.key : groupkey(this._dims); // initialize aggregate measures\n\n this._countOnly = true;\n this._counts = [];\n this._measures = [];\n const fields = _.fields || [null],\n ops = _.ops || ['count'],\n as = _.as || [],\n n = fields.length,\n map = {};\n let field, op, m, mname, outname, i;\n\n if (n !== ops.length) {\n error('Unmatched number of fields and aggregate ops.');\n }\n\n for (i = 0; i < n; ++i) {\n field = fields[i];\n op = ops[i];\n\n if (field == null && op !== 'count') {\n error('Null aggregate field specified.');\n }\n\n mname = accessorName(field);\n outname = measureName(op, mname, as[i]);\n outputs.push(outname);\n\n if (op === 'count') {\n this._counts.push(outname);\n\n continue;\n }\n\n m = map[mname];\n\n if (!m) {\n inputVisit(field);\n m = map[mname] = [];\n m.field = field;\n\n this._measures.push(m);\n }\n\n if (op !== 'count') this._countOnly = false;\n m.push(createMeasure(op, outname));\n }\n\n this._measures = this._measures.map(m => compileMeasures(m, m.field));\n return {}; // aggregation cells (this.value)\n },\n\n // -- Cell Management -----\n cellkey: groupkey(),\n\n cell(key, t) {\n let cell = this.value[key];\n\n if (!cell) {\n cell = this.value[key] = this.newcell(key, t);\n this._adds[this._alen++] = cell;\n } else if (cell.num === 0 && this._drop && cell.stamp < this.stamp) {\n cell.stamp = this.stamp;\n this._adds[this._alen++] = cell;\n } else if (cell.stamp < this.stamp) {\n cell.stamp = this.stamp;\n this._mods[this._mlen++] = cell;\n }\n\n return cell;\n },\n\n newcell(key, t) {\n const cell = {\n key: key,\n num: 0,\n agg: null,\n tuple: this.newtuple(t, this._prev && this._prev[key]),\n stamp: this.stamp,\n store: false\n };\n\n if (!this._countOnly) {\n const measures = this._measures,\n n = measures.length;\n cell.agg = Array(n);\n\n for (let i = 0; i < n; ++i) {\n cell.agg[i] = new measures[i](cell);\n }\n }\n\n if (cell.store) {\n cell.data = new TupleStore();\n }\n\n return cell;\n },\n\n newtuple(t, p) {\n const names = this._dnames,\n dims = this._dims,\n n = dims.length,\n x = {};\n\n for (let i = 0; i < n; ++i) {\n x[names[i]] = dims[i](t);\n }\n\n return p ? replace(p.tuple, x) : ingest(x);\n },\n\n clean() {\n const cells = this.value;\n\n for (const key in cells) {\n if (cells[key].num === 0) {\n delete cells[key];\n }\n }\n },\n\n // -- Process Tuples -----\n add(t) {\n const key = this.cellkey(t),\n cell = this.cell(key, t);\n cell.num += 1;\n if (this._countOnly) return;\n if (cell.store) cell.data.add(t);\n const agg = cell.agg;\n\n for (let i = 0, n = agg.length; i < n; ++i) {\n agg[i].add(agg[i].get(t), t);\n }\n },\n\n rem(t) {\n const key = this.cellkey(t),\n cell = this.cell(key, t);\n cell.num -= 1;\n if (this._countOnly) return;\n if (cell.store) cell.data.rem(t);\n const agg = cell.agg;\n\n for (let i = 0, n = agg.length; i < n; ++i) {\n agg[i].rem(agg[i].get(t), t);\n }\n },\n\n celltuple(cell) {\n const tuple = cell.tuple,\n counts = this._counts; // consolidate stored values\n\n if (cell.store) {\n cell.data.values();\n } // update tuple properties\n\n\n for (let i = 0, n = counts.length; i < n; ++i) {\n tuple[counts[i]] = cell.num;\n }\n\n if (!this._countOnly) {\n const agg = cell.agg;\n\n for (let i = 0, n = agg.length; i < n; ++i) {\n agg[i].set(tuple);\n }\n }\n\n return tuple;\n },\n\n changes(out) {\n const adds = this._adds,\n mods = this._mods,\n prev = this._prev,\n drop = this._drop,\n add = out.add,\n rem = out.rem,\n mod = out.mod;\n let cell, key, i, n;\n if (prev) for (key in prev) {\n cell = prev[key];\n if (!drop || cell.num) rem.push(cell.tuple);\n }\n\n for (i = 0, n = this._alen; i < n; ++i) {\n add.push(this.celltuple(adds[i]));\n adds[i] = null; // for garbage collection\n }\n\n for (i = 0, n = this._mlen; i < n; ++i) {\n cell = mods[i];\n (cell.num === 0 && drop ? rem : mod).push(this.celltuple(cell));\n mods[i] = null; // for garbage collection\n }\n\n this._alen = this._mlen = 0; // reset list of active cells\n\n this._prev = null;\n return out;\n }\n\n});\n\nconst EPSILON$1 = 1e-14;\n/**\n * Generates a binning function for discretizing data.\n * @constructor\n * @param {object} params - The parameters for this operator. The\n * provided values should be valid options for the {@link bin} function.\n * @param {function(object): *} params.field - The data field to bin.\n */\n\nfunction Bin(params) {\n Transform.call(this, null, params);\n}\nBin.Definition = {\n 'type': 'Bin',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'interval',\n 'type': 'boolean',\n 'default': true\n }, {\n 'name': 'anchor',\n 'type': 'number'\n }, {\n 'name': 'maxbins',\n 'type': 'number',\n 'default': 20\n }, {\n 'name': 'base',\n 'type': 'number',\n 'default': 10\n }, {\n 'name': 'divide',\n 'type': 'number',\n 'array': true,\n 'default': [5, 2]\n }, {\n 'name': 'extent',\n 'type': 'number',\n 'array': true,\n 'length': 2,\n 'required': true\n }, {\n 'name': 'span',\n 'type': 'number'\n }, {\n 'name': 'step',\n 'type': 'number'\n }, {\n 'name': 'steps',\n 'type': 'number',\n 'array': true\n }, {\n 'name': 'minstep',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'nice',\n 'type': 'boolean',\n 'default': true\n }, {\n 'name': 'name',\n 'type': 'string'\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': ['bin0', 'bin1']\n }]\n};\ninherits(Bin, Transform, {\n transform(_, pulse) {\n const band = _.interval !== false,\n bins = this._bins(_),\n start = bins.start,\n step = bins.step,\n as = _.as || ['bin0', 'bin1'],\n b0 = as[0],\n b1 = as[1];\n\n let flag;\n\n if (_.modified()) {\n pulse = pulse.reflow(true);\n flag = pulse.SOURCE;\n } else {\n flag = pulse.modified(accessorFields(_.field)) ? pulse.ADD_MOD : pulse.ADD;\n }\n\n pulse.visit(flag, band ? t => {\n const v = bins(t); // minimum bin value (inclusive)\n\n t[b0] = v; // maximum bin value (exclusive)\n // use convoluted math for better floating point agreement\n // see https://github.com/vega/vega/issues/830\n // infinite values propagate through this formula! #2227\n\n t[b1] = v == null ? null : start + step * (1 + (v - start) / step);\n } : t => t[b0] = bins(t));\n return pulse.modifies(band ? as : b0);\n },\n\n _bins(_) {\n if (this.value && !_.modified()) {\n return this.value;\n }\n\n const field = _.field,\n bins = bin(_),\n step = bins.step;\n let start = bins.start,\n stop = start + Math.ceil((bins.stop - start) / step) * step,\n a,\n d;\n\n if ((a = _.anchor) != null) {\n d = a - (start + step * Math.floor((a - start) / step));\n start += d;\n stop += d;\n }\n\n const f = function (t) {\n let v = toNumber(field(t));\n return v == null ? null : v < start ? -Infinity : v > stop ? +Infinity : (v = Math.max(start, Math.min(v, stop - step)), start + step * Math.floor(EPSILON$1 + (v - start) / step));\n };\n\n f.start = start;\n f.stop = bins.stop;\n f.step = step;\n return this.value = accessor(f, accessorFields(field), _.name || 'bin_' + accessorName(field));\n }\n\n});\n\nfunction SortedList (idFunc, source, input) {\n const $ = idFunc;\n let data = source || [],\n add = input || [],\n rem = {},\n cnt = 0;\n return {\n add: t => add.push(t),\n remove: t => rem[$(t)] = ++cnt,\n size: () => data.length,\n data: (compare, resort) => {\n if (cnt) {\n data = data.filter(t => !rem[$(t)]);\n rem = {};\n cnt = 0;\n }\n\n if (resort && compare) {\n data.sort(compare);\n }\n\n if (add.length) {\n data = compare ? merge(compare, data, add.sort(compare)) : data.concat(add);\n add = [];\n }\n\n return data;\n }\n };\n}\n\n/**\n * Collects all data tuples that pass through this operator.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(*,*): number} [params.sort] - An optional\n * comparator function for additionally sorting the collected tuples.\n */\n\nfunction Collect(params) {\n Transform.call(this, [], params);\n}\nCollect.Definition = {\n 'type': 'Collect',\n 'metadata': {\n 'source': true\n },\n 'params': [{\n 'name': 'sort',\n 'type': 'compare'\n }]\n};\ninherits(Collect, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.ALL),\n list = SortedList(tupleid, this.value, out.materialize(out.ADD).add),\n sort = _.sort,\n mod = pulse.changed() || sort && (_.modified('sort') || pulse.modified(sort.fields));\n out.visit(out.REM, list.remove);\n this.modified(mod);\n this.value = out.source = list.data(stableCompare(sort), mod); // propagate tree root if defined\n\n if (pulse.source && pulse.source.root) {\n this.value.root = pulse.source.root;\n }\n\n return out;\n }\n\n});\n\n/**\n * Generates a comparator function.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<string|function>} params.fields - The fields to compare.\n * @param {Array<string>} [params.orders] - The sort orders.\n * Each entry should be one of \"ascending\" (default) or \"descending\".\n */\n\nfunction Compare(params) {\n Operator.call(this, null, update$5, params);\n}\ninherits(Compare, Operator);\n\nfunction update$5(_) {\n return this.value && !_.modified() ? this.value : compare(_.fields, _.orders);\n}\n\n/**\n * Count regexp-defined pattern occurrences in a text field.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - An accessor for the text field.\n * @param {string} [params.pattern] - RegExp string defining the text pattern.\n * @param {string} [params.case] - One of 'lower', 'upper' or null (mixed) case.\n * @param {string} [params.stopwords] - RegExp string of words to ignore.\n */\n\nfunction CountPattern(params) {\n Transform.call(this, null, params);\n}\nCountPattern.Definition = {\n 'type': 'CountPattern',\n 'metadata': {\n 'generates': true,\n 'changes': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'case',\n 'type': 'enum',\n 'values': ['upper', 'lower', 'mixed'],\n 'default': 'mixed'\n }, {\n 'name': 'pattern',\n 'type': 'string',\n 'default': '[\\\\w\"]+'\n }, {\n 'name': 'stopwords',\n 'type': 'string',\n 'default': ''\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': ['text', 'count']\n }]\n};\n\nfunction tokenize(text, tcase, match) {\n switch (tcase) {\n case 'upper':\n text = text.toUpperCase();\n break;\n\n case 'lower':\n text = text.toLowerCase();\n break;\n }\n\n return text.match(match);\n}\n\ninherits(CountPattern, Transform, {\n transform(_, pulse) {\n const process = update => tuple => {\n var tokens = tokenize(get(tuple), _.case, match) || [],\n t;\n\n for (var i = 0, n = tokens.length; i < n; ++i) {\n if (!stop.test(t = tokens[i])) update(t);\n }\n };\n\n const init = this._parameterCheck(_, pulse),\n counts = this._counts,\n match = this._match,\n stop = this._stop,\n get = _.field,\n as = _.as || ['text', 'count'],\n add = process(t => counts[t] = 1 + (counts[t] || 0)),\n rem = process(t => counts[t] -= 1);\n\n if (init) {\n pulse.visit(pulse.SOURCE, add);\n } else {\n pulse.visit(pulse.ADD, add);\n pulse.visit(pulse.REM, rem);\n }\n\n return this._finish(pulse, as); // generate output tuples\n },\n\n _parameterCheck(_, pulse) {\n let init = false;\n\n if (_.modified('stopwords') || !this._stop) {\n this._stop = new RegExp('^' + (_.stopwords || '') + '$', 'i');\n init = true;\n }\n\n if (_.modified('pattern') || !this._match) {\n this._match = new RegExp(_.pattern || '[\\\\w\\']+', 'g');\n init = true;\n }\n\n if (_.modified('field') || pulse.modified(_.field.fields)) {\n init = true;\n }\n\n if (init) this._counts = {};\n return init;\n },\n\n _finish(pulse, as) {\n const counts = this._counts,\n tuples = this._tuples || (this._tuples = {}),\n text = as[0],\n count = as[1],\n out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);\n let w, t, c;\n\n for (w in counts) {\n t = tuples[w];\n c = counts[w] || 0;\n\n if (!t && c) {\n tuples[w] = t = ingest({});\n t[text] = w;\n t[count] = c;\n out.add.push(t);\n } else if (c === 0) {\n if (t) out.rem.push(t);\n counts[w] = null;\n tuples[w] = null;\n } else if (t[count] !== c) {\n t[count] = c;\n out.mod.push(t);\n }\n }\n\n return out.modifies(as);\n }\n\n});\n\n/**\n * Perform a cross-product of a tuple stream with itself.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object):boolean} [params.filter] - An optional filter\n * function for selectively including tuples in the cross product.\n * @param {Array<string>} [params.as] - The names of the output fields.\n */\n\nfunction Cross(params) {\n Transform.call(this, null, params);\n}\nCross.Definition = {\n 'type': 'Cross',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'filter',\n 'type': 'expr'\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': ['a', 'b']\n }]\n};\ninherits(Cross, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE),\n as = _.as || ['a', 'b'],\n a = as[0],\n b = as[1],\n reset = !this.value || pulse.changed(pulse.ADD_REM) || _.modified('as') || _.modified('filter');\n\n let data = this.value;\n\n if (reset) {\n if (data) out.rem = data;\n data = pulse.materialize(pulse.SOURCE).source;\n out.add = this.value = cross(data, a, b, _.filter || truthy);\n } else {\n out.mod = data;\n }\n\n out.source = this.value;\n return out.modifies(as);\n }\n\n});\n\nfunction cross(input, a, b, filter) {\n var data = [],\n t = {},\n n = input.length,\n i = 0,\n j,\n left;\n\n for (; i < n; ++i) {\n t[a] = left = input[i];\n\n for (j = 0; j < n; ++j) {\n t[b] = input[j];\n\n if (filter(t)) {\n data.push(ingest(t));\n t = {};\n t[a] = left;\n }\n }\n }\n\n return data;\n}\n\nconst Distributions = {\n kde: randomKDE,\n mixture: randomMixture,\n normal: randomNormal,\n lognormal: randomLogNormal,\n uniform: randomUniform\n};\nconst DISTRIBUTIONS = 'distributions',\n FUNCTION = 'function',\n FIELD = 'field';\n/**\n * Parse a parameter object for a probability distribution.\n * @param {object} def - The distribution parameter object.\n * @param {function():Array<object>} - A method for requesting\n * source data. Used for distributions (such as KDE) that\n * require sample data points. This method will only be\n * invoked if the 'from' parameter for a target data source\n * is not provided. Typically this method returns backing\n * source data for a Pulse object.\n * @return {object} - The output distribution object.\n */\n\nfunction parse(def, data) {\n const func = def[FUNCTION];\n\n if (!hasOwnProperty(Distributions, func)) {\n error('Unknown distribution function: ' + func);\n }\n\n const d = Distributions[func]();\n\n for (const name in def) {\n // if data field, extract values\n if (name === FIELD) {\n d.data((def.from || data()).map(def[name]));\n } // if distribution mixture, recurse to parse each definition\n else if (name === DISTRIBUTIONS) {\n d[name](def[name].map(_ => parse(_, data)));\n } // otherwise, simply set the parameter\n else if (typeof d[name] === FUNCTION) {\n d[name](def[name]);\n }\n }\n\n return d;\n}\n\n/**\n * Grid sample points for a probability density. Given a distribution and\n * a sampling extent, will generate points suitable for plotting either\n * PDF (probability density function) or CDF (cumulative distribution\n * function) curves.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {object} params.distribution - The probability distribution. This\n * is an object parameter dependent on the distribution type.\n * @param {string} [params.method='pdf'] - The distribution method to sample.\n * One of 'pdf' or 'cdf'.\n * @param {Array<number>} [params.extent] - The [min, max] extent over which\n * to sample the distribution. This argument is required in most cases, but\n * can be omitted if the distribution (e.g., 'kde') supports a 'data' method\n * that returns numerical sample points from which the extent can be deduced.\n * @param {number} [params.minsteps=25] - The minimum number of curve samples\n * for plotting the density.\n * @param {number} [params.maxsteps=200] - The maximum number of curve samples\n * for plotting the density.\n * @param {number} [params.steps] - The exact number of curve samples for\n * plotting the density. If specified, overrides both minsteps and maxsteps\n * to set an exact number of uniform samples. Useful in conjunction with\n * a fixed extent to ensure consistent sample points for stacked densities.\n */\n\nfunction Density(params) {\n Transform.call(this, null, params);\n}\nconst distributions = [{\n 'key': {\n 'function': 'normal'\n },\n 'params': [{\n 'name': 'mean',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'stdev',\n 'type': 'number',\n 'default': 1\n }]\n}, {\n 'key': {\n 'function': 'lognormal'\n },\n 'params': [{\n 'name': 'mean',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'stdev',\n 'type': 'number',\n 'default': 1\n }]\n}, {\n 'key': {\n 'function': 'uniform'\n },\n 'params': [{\n 'name': 'min',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'max',\n 'type': 'number',\n 'default': 1\n }]\n}, {\n 'key': {\n 'function': 'kde'\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'from',\n 'type': 'data'\n }, {\n 'name': 'bandwidth',\n 'type': 'number',\n 'default': 0\n }]\n}];\nconst mixture = {\n 'key': {\n 'function': 'mixture'\n },\n 'params': [{\n 'name': 'distributions',\n 'type': 'param',\n 'array': true,\n 'params': distributions\n }, {\n 'name': 'weights',\n 'type': 'number',\n 'array': true\n }]\n};\nDensity.Definition = {\n 'type': 'Density',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'extent',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'steps',\n 'type': 'number'\n }, {\n 'name': 'minsteps',\n 'type': 'number',\n 'default': 25\n }, {\n 'name': 'maxsteps',\n 'type': 'number',\n 'default': 200\n }, {\n 'name': 'method',\n 'type': 'string',\n 'default': 'pdf',\n 'values': ['pdf', 'cdf']\n }, {\n 'name': 'distribution',\n 'type': 'param',\n 'params': distributions.concat(mixture)\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'default': ['value', 'density']\n }]\n};\ninherits(Density, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);\n\n if (!this.value || pulse.changed() || _.modified()) {\n const dist = parse(_.distribution, source(pulse)),\n minsteps = _.steps || _.minsteps || 25,\n maxsteps = _.steps || _.maxsteps || 200;\n let method = _.method || 'pdf';\n\n if (method !== 'pdf' && method !== 'cdf') {\n error('Invalid density method: ' + method);\n }\n\n if (!_.extent && !dist.data) {\n error('Missing density extent parameter.');\n }\n\n method = dist[method];\n const as = _.as || ['value', 'density'],\n domain = _.extent || extent(dist.data()),\n values = sampleCurve(method, domain, minsteps, maxsteps).map(v => {\n const tuple = {};\n tuple[as[0]] = v[0];\n tuple[as[1]] = v[1];\n return ingest(tuple);\n });\n if (this.value) out.rem = this.value;\n this.value = out.add = out.source = values;\n }\n\n return out;\n }\n\n});\n\nfunction source(pulse) {\n return () => pulse.materialize(pulse.SOURCE).source;\n}\n\nfunction fieldNames(fields, as) {\n if (!fields) return null;\n return fields.map((f, i) => as[i] || accessorName(f));\n}\nfunction partition$1(data, groupby, field) {\n const groups = [],\n get = f => f(t);\n\n let map, i, n, t, k, g; // partition data points into groups\n\n if (groupby == null) {\n groups.push(data.map(field));\n } else {\n for (map = {}, i = 0, n = data.length; i < n; ++i) {\n t = data[i];\n k = groupby.map(get);\n g = map[k];\n\n if (!g) {\n map[k] = g = [];\n g.dims = k;\n groups.push(g);\n }\n\n g.push(field(t));\n }\n }\n\n return groups;\n}\n\nconst Output = 'bin';\n/**\n * Dot density binning for dot plot construction.\n * Based on Leland Wilkinson, Dot Plots, The American Statistician, 1999.\n * https://www.cs.uic.edu/~wilkinson/Publications/dotplots.pdf\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The value field to bin.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors to groupby.\n * @param {number} [params.step] - The step size (bin width) within which dots should be\n * stacked. Defaults to 1/30 of the extent of the data *field*.\n * @param {boolean} [params.smooth=false] - A boolean flag indicating if dot density\n * stacks should be smoothed to reduce variance.\n */\n\nfunction DotBin(params) {\n Transform.call(this, null, params);\n}\nDotBin.Definition = {\n 'type': 'DotBin',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'step',\n 'type': 'number'\n }, {\n 'name': 'smooth',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': Output\n }]\n};\n\nconst autostep = (data, field) => span(extent(data, field)) / 30;\n\ninherits(DotBin, Transform, {\n transform(_, pulse) {\n if (this.value && !(_.modified() || pulse.changed())) {\n return pulse; // early exit\n }\n\n const source = pulse.materialize(pulse.SOURCE).source,\n groups = partition$1(pulse.source, _.groupby, identity),\n smooth = _.smooth || false,\n field = _.field,\n step = _.step || autostep(source, field),\n sort = stableCompare((a, b) => field(a) - field(b)),\n as = _.as || Output,\n n = groups.length; // compute dotplot bins per group\n\n let min = Infinity,\n max = -Infinity,\n i = 0,\n j;\n\n for (; i < n; ++i) {\n const g = groups[i].sort(sort);\n j = -1;\n\n for (const v of dotbin(g, step, smooth, field)) {\n if (v < min) min = v;\n if (v > max) max = v;\n g[++j][as] = v;\n }\n }\n\n this.value = {\n start: min,\n stop: max,\n step: step\n };\n return pulse.reflow(true).modifies(as);\n }\n\n});\n\n/**\n * Wraps an expression function with access to external parameters.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function} params.expr - The expression function. The\n * function should accept both a datum and a parameter object.\n * This operator's value will be a new function that wraps the\n * expression function with access to this operator's parameters.\n */\n\nfunction Expression(params) {\n Operator.call(this, null, update$4, params);\n this.modified(true);\n}\ninherits(Expression, Operator);\n\nfunction update$4(_) {\n const expr = _.expr;\n return this.value && !_.modified('expr') ? this.value : accessor(datum => expr(datum, _), accessorFields(expr), accessorName(expr));\n}\n\n/**\n * Computes extents (min/max) for a data field.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The field over which to compute extends.\n */\n\nfunction Extent(params) {\n Transform.call(this, [undefined, undefined], params);\n}\nExtent.Definition = {\n 'type': 'Extent',\n 'metadata': {},\n 'params': [{\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }]\n};\ninherits(Extent, Transform, {\n transform(_, pulse) {\n const extent = this.value,\n field = _.field,\n mod = pulse.changed() || pulse.modified(field.fields) || _.modified('field');\n\n let min = extent[0],\n max = extent[1];\n\n if (mod || min == null) {\n min = +Infinity;\n max = -Infinity;\n }\n\n pulse.visit(mod ? pulse.SOURCE : pulse.ADD, t => {\n const v = toNumber(field(t));\n\n if (v != null) {\n // NaNs will fail all comparisons!\n if (v < min) min = v;\n if (v > max) max = v;\n }\n });\n\n if (!Number.isFinite(min) || !Number.isFinite(max)) {\n let name = accessorName(field);\n if (name) name = ` for field \"${name}\"`;\n pulse.dataflow.warn(`Infinite extent${name}: [${min}, ${max}]`);\n min = max = undefined;\n }\n\n this.value = [min, max];\n }\n\n});\n\n/**\n * Provides a bridge between a parent transform and a target subflow that\n * consumes only a subset of the tuples that pass through the parent.\n * @constructor\n * @param {Pulse} pulse - A pulse to use as the value of this operator.\n * @param {Transform} parent - The parent transform (typically a Facet instance).\n */\n\nfunction Subflow(pulse, parent) {\n Operator.call(this, pulse);\n this.parent = parent;\n this.count = 0;\n}\ninherits(Subflow, Operator, {\n /**\n * Routes pulses from this subflow to a target transform.\n * @param {Transform} target - A transform that receives the subflow of tuples.\n */\n connect(target) {\n this.detachSubflow = target.detachSubflow;\n this.targets().add(target);\n return target.source = this;\n },\n\n /**\n * Add an 'add' tuple to the subflow pulse.\n * @param {Tuple} t - The tuple being added.\n */\n add(t) {\n this.count += 1;\n this.value.add.push(t);\n },\n\n /**\n * Add a 'rem' tuple to the subflow pulse.\n * @param {Tuple} t - The tuple being removed.\n */\n rem(t) {\n this.count -= 1;\n this.value.rem.push(t);\n },\n\n /**\n * Add a 'mod' tuple to the subflow pulse.\n * @param {Tuple} t - The tuple being modified.\n */\n mod(t) {\n this.value.mod.push(t);\n },\n\n /**\n * Re-initialize this operator's pulse value.\n * @param {Pulse} pulse - The pulse to copy from.\n * @see Pulse.init\n */\n init(pulse) {\n this.value.init(pulse, pulse.NO_SOURCE);\n },\n\n /**\n * Evaluate this operator. This method overrides the\n * default behavior to simply return the contained pulse value.\n * @return {Pulse}\n */\n evaluate() {\n // assert: this.value.stamp === pulse.stamp\n return this.value;\n }\n\n});\n\n/**\n * Facets a dataflow into a set of subflows based on a key.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(Dataflow, string): Operator} params.subflow - A function\n * that generates a subflow of operators and returns its root operator.\n * @param {function(object): *} params.key - The key field to facet by.\n */\n\nfunction Facet(params) {\n Transform.call(this, {}, params);\n this._keys = fastmap(); // cache previously calculated key values\n // keep track of active subflows, use as targets array for listeners\n // this allows us to limit propagation to only updated subflows\n\n const a = this._targets = [];\n a.active = 0;\n\n a.forEach = f => {\n for (let i = 0, n = a.active; i < n; ++i) {\n f(a[i], i, a);\n }\n };\n}\ninherits(Facet, Transform, {\n activate(flow) {\n this._targets[this._targets.active++] = flow;\n },\n\n // parent argument provided by PreFacet subclass\n subflow(key, flow, pulse, parent) {\n const flows = this.value;\n let sf = hasOwnProperty(flows, key) && flows[key],\n df,\n p;\n\n if (!sf) {\n p = parent || (p = this._group[key]) && p.tuple;\n df = pulse.dataflow;\n sf = new Subflow(pulse.fork(pulse.NO_SOURCE), this);\n df.add(sf).connect(flow(df, key, p));\n flows[key] = sf;\n this.activate(sf);\n } else if (sf.value.stamp < pulse.stamp) {\n sf.init(pulse);\n this.activate(sf);\n }\n\n return sf;\n },\n\n clean() {\n const flows = this.value;\n let detached = 0;\n\n for (const key in flows) {\n if (flows[key].count === 0) {\n const detach = flows[key].detachSubflow;\n if (detach) detach();\n delete flows[key];\n ++detached;\n }\n } // remove inactive targets from the active targets array\n\n\n if (detached) {\n const active = this._targets.filter(sf => sf && sf.count > 0);\n\n this.initTargets(active);\n }\n },\n\n initTargets(act) {\n const a = this._targets,\n n = a.length,\n m = act ? act.length : 0;\n let i = 0;\n\n for (; i < m; ++i) {\n a[i] = act[i];\n }\n\n for (; i < n && a[i] != null; ++i) {\n a[i] = null; // ensure old flows can be garbage collected\n }\n\n a.active = m;\n },\n\n transform(_, pulse) {\n const df = pulse.dataflow,\n key = _.key,\n flow = _.subflow,\n cache = this._keys,\n rekey = _.modified('key'),\n subflow = key => this.subflow(key, flow, pulse);\n\n this._group = _.group || {};\n this.initTargets(); // reset list of active subflows\n\n pulse.visit(pulse.REM, t => {\n const id = tupleid(t),\n k = cache.get(id);\n\n if (k !== undefined) {\n cache.delete(id);\n subflow(k).rem(t);\n }\n });\n pulse.visit(pulse.ADD, t => {\n const k = key(t);\n cache.set(tupleid(t), k);\n subflow(k).add(t);\n });\n\n if (rekey || pulse.modified(key.fields)) {\n pulse.visit(pulse.MOD, t => {\n const id = tupleid(t),\n k0 = cache.get(id),\n k1 = key(t);\n\n if (k0 === k1) {\n subflow(k1).mod(t);\n } else {\n cache.set(id, k1);\n subflow(k0).rem(t);\n subflow(k1).add(t);\n }\n });\n } else if (pulse.changed(pulse.MOD)) {\n pulse.visit(pulse.MOD, t => {\n subflow(cache.get(tupleid(t))).mod(t);\n });\n }\n\n if (rekey) {\n pulse.visit(pulse.REFLOW, t => {\n const id = tupleid(t),\n k0 = cache.get(id),\n k1 = key(t);\n\n if (k0 !== k1) {\n cache.set(id, k1);\n subflow(k0).rem(t);\n subflow(k1).add(t);\n }\n });\n }\n\n if (pulse.clean()) {\n df.runAfter(() => {\n this.clean();\n cache.clean();\n });\n } else if (cache.empty > df.cleanThreshold) {\n df.runAfter(cache.clean);\n }\n\n return pulse;\n }\n\n});\n\n/**\n * Generates one or more field accessor functions.\n * If the 'name' parameter is an array, an array of field accessors\n * will be created and the 'as' parameter will be ignored.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {string} params.name - The field name(s) to access.\n * @param {string} params.as - The accessor function name.\n */\n\nfunction Field(params) {\n Operator.call(this, null, update$3, params);\n}\ninherits(Field, Operator);\n\nfunction update$3(_) {\n return this.value && !_.modified() ? this.value : isArray(_.name) ? array(_.name).map(f => field(f)) : field(_.name, _.as);\n}\n\n/**\n * Filters data tuples according to a predicate function.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.expr - The predicate expression function\n * that determines a tuple's filter status. Truthy values pass the filter.\n */\n\nfunction Filter(params) {\n Transform.call(this, fastmap(), params);\n}\nFilter.Definition = {\n 'type': 'Filter',\n 'metadata': {\n 'changes': true\n },\n 'params': [{\n 'name': 'expr',\n 'type': 'expr',\n 'required': true\n }]\n};\ninherits(Filter, Transform, {\n transform(_, pulse) {\n const df = pulse.dataflow,\n cache = this.value,\n // cache ids of filtered tuples\n output = pulse.fork(),\n add = output.add,\n rem = output.rem,\n mod = output.mod,\n test = _.expr;\n let isMod = true;\n pulse.visit(pulse.REM, t => {\n const id = tupleid(t);\n if (!cache.has(id)) rem.push(t);else cache.delete(id);\n });\n pulse.visit(pulse.ADD, t => {\n if (test(t, _)) add.push(t);else cache.set(tupleid(t), 1);\n });\n\n function revisit(t) {\n const id = tupleid(t),\n b = test(t, _),\n s = cache.get(id);\n\n if (b && s) {\n cache.delete(id);\n add.push(t);\n } else if (!b && !s) {\n cache.set(id, 1);\n rem.push(t);\n } else if (isMod && b && !s) {\n mod.push(t);\n }\n }\n\n pulse.visit(pulse.MOD, revisit);\n\n if (_.modified()) {\n isMod = false;\n pulse.visit(pulse.REFLOW, revisit);\n }\n\n if (cache.empty > df.cleanThreshold) df.runAfter(cache.clean);\n return output;\n }\n\n});\n\n/**\n * Flattens array-typed field values into new data objects.\n * If multiple fields are specified, they are treated as parallel arrays,\n * with output values included for each matching index (or null if missing).\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<function(object): *>} params.fields - An array of field\n * accessors for the tuple fields that should be flattened.\n * @param {string} [params.index] - Optional output field name for index\n * value. If unspecified, no index field is included in the output.\n * @param {Array<string>} [params.as] - Output field names for flattened\n * array fields. Any unspecified fields will use the field name provided\n * by the fields accessors.\n */\n\nfunction Flatten(params) {\n Transform.call(this, [], params);\n}\nFlatten.Definition = {\n 'type': 'Flatten',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'fields',\n 'type': 'field',\n 'array': true,\n 'required': true\n }, {\n 'name': 'index',\n 'type': 'string'\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true\n }]\n};\ninherits(Flatten, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE),\n fields = _.fields,\n as = fieldNames(fields, _.as || []),\n index = _.index || null,\n m = as.length; // remove any previous results\n\n out.rem = this.value; // generate flattened tuples\n\n pulse.visit(pulse.SOURCE, t => {\n const arrays = fields.map(f => f(t)),\n maxlen = arrays.reduce((l, a) => Math.max(l, a.length), 0);\n let i = 0,\n j,\n d,\n v;\n\n for (; i < maxlen; ++i) {\n d = derive(t);\n\n for (j = 0; j < m; ++j) {\n d[as[j]] = (v = arrays[j][i]) == null ? null : v;\n }\n\n if (index) {\n d[index] = i;\n }\n\n out.add.push(d);\n }\n });\n this.value = out.source = out.add;\n if (index) out.modifies(index);\n return out.modifies(as);\n }\n\n});\n\n/**\n * Folds one more tuple fields into multiple tuples in which the field\n * name and values are available under new 'key' and 'value' fields.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.fields - An array of field accessors\n * for the tuple fields that should be folded.\n * @param {Array<string>} [params.as] - Output field names for folded key\n * and value fields, defaults to ['key', 'value'].\n */\n\nfunction Fold(params) {\n Transform.call(this, [], params);\n}\nFold.Definition = {\n 'type': 'Fold',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'fields',\n 'type': 'field',\n 'array': true,\n 'required': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': ['key', 'value']\n }]\n};\ninherits(Fold, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE),\n fields = _.fields,\n fnames = fields.map(accessorName),\n as = _.as || ['key', 'value'],\n k = as[0],\n v = as[1],\n n = fields.length;\n out.rem = this.value;\n pulse.visit(pulse.SOURCE, t => {\n for (let i = 0, d; i < n; ++i) {\n d = derive(t);\n d[k] = fnames[i];\n d[v] = fields[i](t);\n out.add.push(d);\n }\n });\n this.value = out.source = out.add;\n return out.modifies(as);\n }\n\n});\n\n/**\n * Invokes a function for each data tuple and saves the results as a new field.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.expr - The formula function to invoke for each tuple.\n * @param {string} params.as - The field name under which to save the result.\n * @param {boolean} [params.initonly=false] - If true, the formula is applied to\n * added tuples only, and does not update in response to modifications.\n */\n\nfunction Formula(params) {\n Transform.call(this, null, params);\n}\nFormula.Definition = {\n 'type': 'Formula',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'expr',\n 'type': 'expr',\n 'required': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'required': true\n }, {\n 'name': 'initonly',\n 'type': 'boolean'\n }]\n};\ninherits(Formula, Transform, {\n transform(_, pulse) {\n const func = _.expr,\n as = _.as,\n mod = _.modified(),\n flag = _.initonly ? pulse.ADD : mod ? pulse.SOURCE : pulse.modified(func.fields) || pulse.modified(as) ? pulse.ADD_MOD : pulse.ADD;\n\n if (mod) {\n // parameters updated, need to reflow\n pulse = pulse.materialize().reflow(true);\n }\n\n if (!_.initonly) {\n pulse.modifies(as);\n }\n\n return pulse.visit(flag, t => t[as] = func(t, _));\n }\n\n});\n\n/**\n * Generates data tuples using a provided generator function.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(Parameters): object} params.generator - A tuple generator\n * function. This function is given the operator parameters as input.\n * Changes to any additional parameters will not trigger re-calculation\n * of previously generated tuples. Only future tuples are affected.\n * @param {number} params.size - The number of tuples to produce.\n */\n\nfunction Generate(params) {\n Transform.call(this, [], params);\n}\ninherits(Generate, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.ALL),\n gen = _.generator;\n let data = this.value,\n num = _.size - data.length,\n add,\n rem,\n t;\n\n if (num > 0) {\n // need more tuples, generate and add\n for (add = []; --num >= 0;) {\n add.push(t = ingest(gen(_)));\n data.push(t);\n }\n\n out.add = out.add.length ? out.materialize(out.ADD).add.concat(add) : add;\n } else {\n // need fewer tuples, remove\n rem = data.slice(0, -num);\n out.rem = out.rem.length ? out.materialize(out.REM).rem.concat(rem) : rem;\n data = data.slice(-num);\n }\n\n out.source = this.value = data;\n return out;\n }\n\n});\n\nconst Methods = {\n value: 'value',\n median: median,\n mean: mean,\n min: min,\n max: max\n};\nconst Empty = [];\n/**\n * Impute missing values.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The value field to impute.\n * @param {Array<function(object): *>} [params.groupby] - An array of\n * accessors to determine series within which to perform imputation.\n * @param {function(object): *} params.key - An accessor for a key value.\n * Each key value should be unique within a group. New tuples will be\n * imputed for any key values that are not found within a group.\n * @param {Array<*>} [params.keyvals] - Optional array of required key\n * values. New tuples will be imputed for any key values that are not\n * found within a group. In addition, these values will be automatically\n * augmented with the key values observed in the input data.\n * @param {string} [method='value'] - The imputation method to use. One of\n * 'value', 'mean', 'median', 'max', 'min'.\n * @param {*} [value=0] - The constant value to use for imputation\n * when using method 'value'.\n */\n\nfunction Impute(params) {\n Transform.call(this, [], params);\n}\nImpute.Definition = {\n 'type': 'Impute',\n 'metadata': {\n 'changes': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'key',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'keyvals',\n 'array': true\n }, {\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'method',\n 'type': 'enum',\n 'default': 'value',\n 'values': ['value', 'mean', 'median', 'max', 'min']\n }, {\n 'name': 'value',\n 'default': 0\n }]\n};\n\nfunction getValue(_) {\n var m = _.method || Methods.value,\n v;\n\n if (Methods[m] == null) {\n error('Unrecognized imputation method: ' + m);\n } else if (m === Methods.value) {\n v = _.value !== undefined ? _.value : 0;\n return () => v;\n } else {\n return Methods[m];\n }\n}\n\nfunction getField(_) {\n const f = _.field;\n return t => t ? f(t) : NaN;\n}\n\ninherits(Impute, Transform, {\n transform(_, pulse) {\n var out = pulse.fork(pulse.ALL),\n impute = getValue(_),\n field = getField(_),\n fName = accessorName(_.field),\n kName = accessorName(_.key),\n gNames = (_.groupby || []).map(accessorName),\n groups = partition(pulse.source, _.groupby, _.key, _.keyvals),\n curr = [],\n prev = this.value,\n m = groups.domain.length,\n group,\n value,\n gVals,\n kVal,\n g,\n i,\n j,\n l,\n n,\n t;\n\n for (g = 0, l = groups.length; g < l; ++g) {\n group = groups[g];\n gVals = group.values;\n value = NaN; // add tuples for missing values\n\n for (j = 0; j < m; ++j) {\n if (group[j] != null) continue;\n kVal = groups.domain[j];\n t = {\n _impute: true\n };\n\n for (i = 0, n = gVals.length; i < n; ++i) t[gNames[i]] = gVals[i];\n\n t[kName] = kVal;\n t[fName] = Number.isNaN(value) ? value = impute(group, field) : value;\n curr.push(ingest(t));\n }\n } // update pulse with imputed tuples\n\n\n if (curr.length) out.add = out.materialize(out.ADD).add.concat(curr);\n if (prev.length) out.rem = out.materialize(out.REM).rem.concat(prev);\n this.value = curr;\n return out;\n }\n\n});\n\nfunction partition(data, groupby, key, keyvals) {\n var get = f => f(t),\n groups = [],\n domain = keyvals ? keyvals.slice() : [],\n kMap = {},\n gMap = {},\n gVals,\n gKey,\n group,\n i,\n j,\n k,\n n,\n t;\n\n domain.forEach((k, i) => kMap[k] = i + 1);\n\n for (i = 0, n = data.length; i < n; ++i) {\n t = data[i];\n k = key(t);\n j = kMap[k] || (kMap[k] = domain.push(k));\n gKey = (gVals = groupby ? groupby.map(get) : Empty) + '';\n\n if (!(group = gMap[gKey])) {\n group = gMap[gKey] = [];\n groups.push(group);\n group.values = gVals;\n }\n\n group[j - 1] = t;\n }\n\n groups.domain = domain;\n return groups;\n}\n\n/**\n * Extend input tuples with aggregate values.\n * Calcuates aggregate values and joins them with the input stream.\n * @constructor\n */\n\nfunction JoinAggregate(params) {\n Aggregate.call(this, params);\n}\nJoinAggregate.Definition = {\n 'type': 'JoinAggregate',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'fields',\n 'type': 'field',\n 'null': true,\n 'array': true\n }, {\n 'name': 'ops',\n 'type': 'enum',\n 'array': true,\n 'values': ValidAggregateOps\n }, {\n 'name': 'as',\n 'type': 'string',\n 'null': true,\n 'array': true\n }, {\n 'name': 'key',\n 'type': 'field'\n }]\n};\ninherits(JoinAggregate, Aggregate, {\n transform(_, pulse) {\n const aggr = this,\n mod = _.modified();\n\n let cells; // process all input tuples to calculate aggregates\n\n if (aggr.value && (mod || pulse.modified(aggr._inputs, true))) {\n cells = aggr.value = mod ? aggr.init(_) : {};\n pulse.visit(pulse.SOURCE, t => aggr.add(t));\n } else {\n cells = aggr.value = aggr.value || this.init(_);\n pulse.visit(pulse.REM, t => aggr.rem(t));\n pulse.visit(pulse.ADD, t => aggr.add(t));\n } // update aggregation cells\n\n\n aggr.changes(); // write aggregate values to input tuples\n\n pulse.visit(pulse.SOURCE, t => {\n extend(t, cells[aggr.cellkey(t)].tuple);\n });\n return pulse.reflow(mod).modifies(this._outputs);\n },\n\n changes() {\n const adds = this._adds,\n mods = this._mods;\n let i, n;\n\n for (i = 0, n = this._alen; i < n; ++i) {\n this.celltuple(adds[i]);\n adds[i] = null; // for garbage collection\n }\n\n for (i = 0, n = this._mlen; i < n; ++i) {\n this.celltuple(mods[i]);\n mods[i] = null; // for garbage collection\n }\n\n this._alen = this._mlen = 0; // reset list of active cells\n }\n\n});\n\n/**\n * Compute kernel density estimates (KDE) for one or more data groups.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors\n * to groupby.\n * @param {function(object): *} params.field - An accessor for the data field\n * to estimate.\n * @param {number} [params.bandwidth=0] - The KDE kernel bandwidth.\n * If zero or unspecified, the bandwidth is automatically determined.\n * @param {boolean} [params.counts=false] - A boolean flag indicating if the\n * output values should be probability estimates (false, default) or\n * smoothed counts (true).\n * @param {string} [params.cumulative=false] - A boolean flag indicating if a\n * density (false) or cumulative distribution (true) should be generated.\n * @param {Array<number>} [params.extent] - The domain extent over which to\n * plot the density. If unspecified, the [min, max] data extent is used.\n * @param {string} [params.resolve='independent'] - Indicates how parameters for\n * multiple densities should be resolved. If \"independent\" (the default), each\n * density may have its own domain extent and dynamic number of curve sample\n * steps. If \"shared\", the KDE transform will ensure that all densities are\n * defined over a shared domain and curve steps, enabling stacking.\n * @param {number} [params.minsteps=25] - The minimum number of curve samples\n * for plotting the density.\n * @param {number} [params.maxsteps=200] - The maximum number of curve samples\n * for plotting the density.\n * @param {number} [params.steps] - The exact number of curve samples for\n * plotting the density. If specified, overrides both minsteps and maxsteps\n * to set an exact number of uniform samples. Useful in conjunction with\n * a fixed extent to ensure consistent sample points for stacked densities.\n */\n\nfunction KDE(params) {\n Transform.call(this, null, params);\n}\nKDE.Definition = {\n 'type': 'KDE',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'cumulative',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'counts',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'bandwidth',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'extent',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'resolve',\n 'type': 'enum',\n 'values': ['shared', 'independent'],\n 'default': 'independent'\n }, {\n 'name': 'steps',\n 'type': 'number'\n }, {\n 'name': 'minsteps',\n 'type': 'number',\n 'default': 25\n }, {\n 'name': 'maxsteps',\n 'type': 'number',\n 'default': 200\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'default': ['value', 'density']\n }]\n};\ninherits(KDE, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);\n\n if (!this.value || pulse.changed() || _.modified()) {\n const source = pulse.materialize(pulse.SOURCE).source,\n groups = partition$1(source, _.groupby, _.field),\n names = (_.groupby || []).map(accessorName),\n bandwidth = _.bandwidth,\n method = _.cumulative ? 'cdf' : 'pdf',\n as = _.as || ['value', 'density'],\n values = [];\n let domain = _.extent,\n minsteps = _.steps || _.minsteps || 25,\n maxsteps = _.steps || _.maxsteps || 200;\n\n if (method !== 'pdf' && method !== 'cdf') {\n error('Invalid density method: ' + method);\n }\n\n if (_.resolve === 'shared') {\n if (!domain) domain = extent(source, _.field);\n minsteps = maxsteps = _.steps || maxsteps;\n }\n\n groups.forEach(g => {\n const density = randomKDE(g, bandwidth)[method],\n scale = _.counts ? g.length : 1,\n local = domain || extent(g);\n sampleCurve(density, local, minsteps, maxsteps).forEach(v => {\n const t = {};\n\n for (let i = 0; i < names.length; ++i) {\n t[names[i]] = g.dims[i];\n }\n\n t[as[0]] = v[0];\n t[as[1]] = v[1] * scale;\n values.push(ingest(t));\n });\n });\n if (this.value) out.rem = this.value;\n this.value = out.add = out.source = values;\n }\n\n return out;\n }\n\n});\n\n/**\n * Generates a key function.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<string>} params.fields - The field name(s) for the key function.\n * @param {boolean} params.flat - A boolean flag indicating if the field names\n * should be treated as flat property names, side-stepping nested field\n * lookups normally indicated by dot or bracket notation.\n */\n\nfunction Key(params) {\n Operator.call(this, null, update$2, params);\n}\ninherits(Key, Operator);\n\nfunction update$2(_) {\n return this.value && !_.modified() ? this.value : key(_.fields, _.flat);\n}\n\n/**\n * Load and parse data from an external source. Marshalls parameter\n * values and then invokes the Dataflow request method.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {string} params.url - The URL to load from.\n * @param {object} params.format - The data format options.\n */\n\nfunction Load(params) {\n Transform.call(this, [], params);\n this._pending = null;\n}\ninherits(Load, Transform, {\n transform(_, pulse) {\n const df = pulse.dataflow;\n\n if (this._pending) {\n // update state and return pulse\n return output(this, pulse, this._pending);\n }\n\n if (stop(_)) return pulse.StopPropagation;\n\n if (_.values) {\n // parse and ingest values, return output pulse\n return output(this, pulse, df.parse(_.values, _.format));\n } else if (_.async) {\n // return promise for non-blocking async loading\n const p = df.request(_.url, _.format).then(res => {\n this._pending = array(res.data);\n return df => df.touch(this);\n });\n return {\n async: p\n };\n } else {\n // return promise for synchronous loading\n return df.request(_.url, _.format).then(res => output(this, pulse, array(res.data)));\n }\n }\n\n});\n\nfunction stop(_) {\n return _.modified('async') && !(_.modified('values') || _.modified('url') || _.modified('format'));\n}\n\nfunction output(op, pulse, data) {\n data.forEach(ingest);\n const out = pulse.fork(pulse.NO_FIELDS & pulse.NO_SOURCE);\n out.rem = op.value;\n op.value = out.source = out.add = data;\n op._pending = null;\n if (out.rem.length) out.clean(true);\n return out;\n}\n\n/**\n * Extend tuples by joining them with values from a lookup table.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Map} params.index - The lookup table map.\n * @param {Array<function(object): *} params.fields - The fields to lookup.\n * @param {Array<string>} params.as - Output field names for each lookup value.\n * @param {*} [params.default] - A default value to use if lookup fails.\n */\n\nfunction Lookup(params) {\n Transform.call(this, {}, params);\n}\nLookup.Definition = {\n 'type': 'Lookup',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'index',\n 'type': 'index',\n 'params': [{\n 'name': 'from',\n 'type': 'data',\n 'required': true\n }, {\n 'name': 'key',\n 'type': 'field',\n 'required': true\n }]\n }, {\n 'name': 'values',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'fields',\n 'type': 'field',\n 'array': true,\n 'required': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true\n }, {\n 'name': 'default',\n 'default': null\n }]\n};\ninherits(Lookup, Transform, {\n transform(_, pulse) {\n const keys = _.fields,\n index = _.index,\n values = _.values,\n defaultValue = _.default == null ? null : _.default,\n reset = _.modified(),\n n = keys.length;\n\n let flag = reset ? pulse.SOURCE : pulse.ADD,\n out = pulse,\n as = _.as,\n set,\n m,\n mods;\n\n if (values) {\n m = values.length;\n\n if (n > 1 && !as) {\n error('Multi-field lookup requires explicit \"as\" parameter.');\n }\n\n if (as && as.length !== n * m) {\n error('The \"as\" parameter has too few output field names.');\n }\n\n as = as || values.map(accessorName);\n\n set = function (t) {\n for (var i = 0, k = 0, j, v; i < n; ++i) {\n v = index.get(keys[i](t));\n if (v == null) for (j = 0; j < m; ++j, ++k) t[as[k]] = defaultValue;else for (j = 0; j < m; ++j, ++k) t[as[k]] = values[j](v);\n }\n };\n } else {\n if (!as) {\n error('Missing output field names.');\n }\n\n set = function (t) {\n for (var i = 0, v; i < n; ++i) {\n v = index.get(keys[i](t));\n t[as[i]] = v == null ? defaultValue : v;\n }\n };\n }\n\n if (reset) {\n out = pulse.reflow(true);\n } else {\n mods = keys.some(k => pulse.modified(k.fields));\n flag |= mods ? pulse.MOD : 0;\n }\n\n pulse.visit(flag, set);\n return out.modifies(as);\n }\n\n});\n\n/**\n * Computes global min/max extents over a collection of extents.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<Array<number>>} params.extents - The input extents.\n */\n\nfunction MultiExtent(params) {\n Operator.call(this, null, update$1, params);\n}\ninherits(MultiExtent, Operator);\n\nfunction update$1(_) {\n if (this.value && !_.modified()) {\n return this.value;\n }\n\n const ext = _.extents,\n n = ext.length;\n let min = +Infinity,\n max = -Infinity,\n i,\n e;\n\n for (i = 0; i < n; ++i) {\n e = ext[i];\n if (e[0] < min) min = e[0];\n if (e[1] > max) max = e[1];\n }\n\n return [min, max];\n}\n\n/**\n * Merge a collection of value arrays.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<Array<*>>} params.values - The input value arrrays.\n */\n\nfunction MultiValues(params) {\n Operator.call(this, null, update, params);\n}\ninherits(MultiValues, Operator);\n\nfunction update(_) {\n return this.value && !_.modified() ? this.value : _.values.reduce((data, _) => data.concat(_), []);\n}\n\n/**\n * Operator whose value is simply its parameter hash. This operator is\n * useful for enabling reactive updates to values of nested objects.\n * @constructor\n * @param {object} params - The parameters for this operator.\n */\n\nfunction Params(params) {\n Transform.call(this, null, params);\n}\ninherits(Params, Transform, {\n transform(_, pulse) {\n this.modified(_.modified());\n this.value = _;\n return pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS); // do not pass tuples\n }\n\n});\n\n/**\n * Aggregate and pivot selected field values to become new fields.\n * This operator is useful to construction cross-tabulations.\n * @constructor\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors\n * to groupby. These fields act just like groupby fields of an Aggregate transform.\n * @param {function(object): *} params.field - The field to pivot on. The unique\n * values of this field become new field names in the output stream.\n * @param {function(object): *} params.value - The field to populate pivoted fields.\n * The aggregate values of this field become the values of the new pivoted fields.\n * @param {string} [params.op] - The aggregation operation for the value field,\n * applied per cell in the output stream. The default is \"sum\".\n * @param {number} [params.limit] - An optional parameter indicating the maximum\n * number of pivoted fields to generate. The pivoted field names are sorted in\n * ascending order prior to enforcing the limit.\n */\n\nfunction Pivot(params) {\n Aggregate.call(this, params);\n}\nPivot.Definition = {\n 'type': 'Pivot',\n 'metadata': {\n 'generates': true,\n 'changes': true\n },\n 'params': [{\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'value',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'op',\n 'type': 'enum',\n 'values': ValidAggregateOps,\n 'default': 'sum'\n }, {\n 'name': 'limit',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'key',\n 'type': 'field'\n }]\n};\ninherits(Pivot, Aggregate, {\n _transform: Aggregate.prototype.transform,\n\n transform(_, pulse) {\n return this._transform(aggregateParams(_, pulse), pulse);\n }\n\n}); // Shoehorn a pivot transform into an aggregate transform!\n// First collect all unique pivot field values.\n// Then generate aggregate fields for each output pivot field.\n\nfunction aggregateParams(_, pulse) {\n const key = _.field,\n value = _.value,\n op = (_.op === 'count' ? '__count__' : _.op) || 'sum',\n fields = accessorFields(key).concat(accessorFields(value)),\n keys = pivotKeys(key, _.limit || 0, pulse); // if data stream content changes, pivot fields may change\n // flag parameter modification to ensure re-initialization\n\n if (pulse.changed()) _.set('__pivot__', null, null, true);\n return {\n key: _.key,\n groupby: _.groupby,\n ops: keys.map(() => op),\n fields: keys.map(k => get(k, key, value, fields)),\n as: keys.map(k => k + ''),\n modified: _.modified.bind(_)\n };\n} // Generate aggregate field accessor.\n// Output NaN for non-existent values; aggregator will ignore!\n\n\nfunction get(k, key, value, fields) {\n return accessor(d => key(d) === k ? value(d) : NaN, fields, k + '');\n} // Collect (and optionally limit) all unique pivot values.\n\n\nfunction pivotKeys(key, limit, pulse) {\n const map = {},\n list = [];\n pulse.visit(pulse.SOURCE, t => {\n const k = key(t);\n\n if (!map[k]) {\n map[k] = 1;\n list.push(k);\n }\n });\n list.sort(ascending);\n return limit ? list.slice(0, limit) : list;\n}\n\n/**\n * Partitions pre-faceted data into tuple subflows.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(Dataflow, string): Operator} params.subflow - A function\n * that generates a subflow of operators and returns its root operator.\n * @param {function(object): Array<object>} params.field - The field\n * accessor for an array of subflow tuple objects.\n */\n\nfunction PreFacet(params) {\n Facet.call(this, params);\n}\ninherits(PreFacet, Facet, {\n transform(_, pulse) {\n const flow = _.subflow,\n field = _.field,\n subflow = t => this.subflow(tupleid(t), flow, pulse, t);\n\n if (_.modified('field') || field && pulse.modified(accessorFields(field))) {\n error('PreFacet does not support field modification.');\n }\n\n this.initTargets(); // reset list of active subflows\n\n if (field) {\n pulse.visit(pulse.MOD, t => {\n const sf = subflow(t);\n field(t).forEach(_ => sf.mod(_));\n });\n pulse.visit(pulse.ADD, t => {\n const sf = subflow(t);\n field(t).forEach(_ => sf.add(ingest(_)));\n });\n pulse.visit(pulse.REM, t => {\n const sf = subflow(t);\n field(t).forEach(_ => sf.rem(_));\n });\n } else {\n pulse.visit(pulse.MOD, t => subflow(t).mod(t));\n pulse.visit(pulse.ADD, t => subflow(t).add(t));\n pulse.visit(pulse.REM, t => subflow(t).rem(t));\n }\n\n if (pulse.clean()) {\n pulse.runAfter(() => this.clean());\n }\n\n return pulse;\n }\n\n});\n\n/**\n * Performs a relational projection, copying selected fields from source\n * tuples to a new set of derived tuples.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<function(object): *} params.fields - The fields to project,\n * as an array of field accessors. If unspecified, all fields will be\n * copied with names unchanged.\n * @param {Array<string>} [params.as] - Output field names for each projected\n * field. Any unspecified fields will use the field name provided by\n * the field accessor.\n */\n\nfunction Project(params) {\n Transform.call(this, null, params);\n}\nProject.Definition = {\n 'type': 'Project',\n 'metadata': {\n 'generates': true,\n 'changes': true\n },\n 'params': [{\n 'name': 'fields',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'null': true,\n 'array': true\n }]\n};\ninherits(Project, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE),\n fields = _.fields,\n as = fieldNames(_.fields, _.as || []),\n derive = fields ? (s, t) => project(s, t, fields, as) : rederive;\n let lut;\n\n if (this.value) {\n lut = this.value;\n } else {\n pulse = pulse.addAll();\n lut = this.value = {};\n }\n\n pulse.visit(pulse.REM, t => {\n const id = tupleid(t);\n out.rem.push(lut[id]);\n lut[id] = null;\n });\n pulse.visit(pulse.ADD, t => {\n const dt = derive(t, ingest({}));\n lut[tupleid(t)] = dt;\n out.add.push(dt);\n });\n pulse.visit(pulse.MOD, t => {\n out.mod.push(derive(t, lut[tupleid(t)]));\n });\n return out;\n }\n\n});\n\nfunction project(s, t, fields, as) {\n for (let i = 0, n = fields.length; i < n; ++i) {\n t[as[i]] = fields[i](s);\n }\n\n return t;\n}\n\n/**\n * Proxy the value of another operator as a pure signal value.\n * Ensures no tuples are propagated.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {*} params.value - The value to proxy, becomes the value of this operator.\n */\n\nfunction Proxy(params) {\n Transform.call(this, null, params);\n}\ninherits(Proxy, Transform, {\n transform(_, pulse) {\n this.value = _.value;\n return _.modified('value') ? pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS) : pulse.StopPropagation;\n }\n\n});\n\n/**\n * Generates sample quantile values from an input data stream.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - An accessor for the data field\n * over which to calculate quantile values.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors\n * to groupby.\n * @param {Array<number>} [params.probs] - An array of probabilities in\n * the range (0, 1) for which to compute quantile values. If not specified,\n * the *step* parameter will be used.\n * @param {Array<number>} [params.step=0.01] - A probability step size for\n * sampling quantile values. All values from one-half the step size up to\n * 1 (exclusive) will be sampled. This parameter is only used if the\n * *quantiles* parameter is not provided.\n */\n\nfunction Quantile(params) {\n Transform.call(this, null, params);\n}\nQuantile.Definition = {\n 'type': 'Quantile',\n 'metadata': {\n 'generates': true,\n 'changes': true\n },\n 'params': [{\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'probs',\n 'type': 'number',\n 'array': true\n }, {\n 'name': 'step',\n 'type': 'number',\n 'default': 0.01\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'default': ['prob', 'value']\n }]\n};\nconst EPSILON = 1e-14;\ninherits(Quantile, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n as = _.as || ['prob', 'value'];\n\n if (this.value && !_.modified() && !pulse.changed()) {\n out.source = this.value;\n return out;\n }\n\n const source = pulse.materialize(pulse.SOURCE).source,\n groups = partition$1(source, _.groupby, _.field),\n names = (_.groupby || []).map(accessorName),\n values = [],\n step = _.step || 0.01,\n p = _.probs || range(step / 2, 1 - EPSILON, step),\n n = p.length;\n groups.forEach(g => {\n const q = quantiles(g, p);\n\n for (let i = 0; i < n; ++i) {\n const t = {};\n\n for (let i = 0; i < names.length; ++i) {\n t[names[i]] = g.dims[i];\n }\n\n t[as[0]] = p[i];\n t[as[1]] = q[i];\n values.push(ingest(t));\n }\n });\n if (this.value) out.rem = this.value;\n this.value = out.add = out.source = values;\n return out;\n }\n\n});\n\n/**\n * Relays a data stream between data processing pipelines.\n * If the derive parameter is set, this transform will create derived\n * copies of observed tuples. This provides derived data streams in which\n * modifications to the tuples do not pollute an upstream data source.\n * @param {object} params - The parameters for this operator.\n * @param {number} [params.derive=false] - Boolean flag indicating if\n * the transform should make derived copies of incoming tuples.\n * @constructor\n */\n\nfunction Relay(params) {\n Transform.call(this, null, params);\n}\ninherits(Relay, Transform, {\n transform(_, pulse) {\n let out, lut;\n\n if (this.value) {\n lut = this.value;\n } else {\n out = pulse = pulse.addAll();\n lut = this.value = {};\n }\n\n if (_.derive) {\n out = pulse.fork(pulse.NO_SOURCE);\n pulse.visit(pulse.REM, t => {\n const id = tupleid(t);\n out.rem.push(lut[id]);\n lut[id] = null;\n });\n pulse.visit(pulse.ADD, t => {\n const dt = derive(t);\n lut[tupleid(t)] = dt;\n out.add.push(dt);\n });\n pulse.visit(pulse.MOD, t => {\n const dt = lut[tupleid(t)];\n\n for (const k in t) {\n dt[k] = t[k]; // down stream writes may overwrite re-derived tuples\n // conservatively mark all source fields as modified\n\n out.modifies(k);\n }\n\n out.mod.push(dt);\n });\n }\n\n return out;\n }\n\n});\n\n/**\n * Samples tuples passing through this operator.\n * Uses reservoir sampling to maintain a representative sample.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {number} [params.size=1000] - The maximum number of samples.\n */\n\nfunction Sample(params) {\n Transform.call(this, [], params);\n this.count = 0;\n}\nSample.Definition = {\n 'type': 'Sample',\n 'metadata': {},\n 'params': [{\n 'name': 'size',\n 'type': 'number',\n 'default': 1000\n }]\n};\ninherits(Sample, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE),\n mod = _.modified('size'),\n num = _.size,\n map = this.value.reduce((m, t) => (m[tupleid(t)] = 1, m), {});\n\n let res = this.value,\n cnt = this.count,\n cap = 0; // sample reservoir update function\n\n function update(t) {\n let p, idx;\n\n if (res.length < num) {\n res.push(t);\n } else {\n idx = ~~((cnt + 1) * random());\n\n if (idx < res.length && idx >= cap) {\n p = res[idx];\n if (map[tupleid(p)]) out.rem.push(p); // eviction\n\n res[idx] = t;\n }\n }\n\n ++cnt;\n }\n\n if (pulse.rem.length) {\n // find all tuples that should be removed, add to output\n pulse.visit(pulse.REM, t => {\n const id = tupleid(t);\n\n if (map[id]) {\n map[id] = -1;\n out.rem.push(t);\n }\n\n --cnt;\n }); // filter removed tuples out of the sample reservoir\n\n res = res.filter(t => map[tupleid(t)] !== -1);\n }\n\n if ((pulse.rem.length || mod) && res.length < num && pulse.source) {\n // replenish sample if backing data source is available\n cap = cnt = res.length;\n pulse.visit(pulse.SOURCE, t => {\n // update, but skip previously sampled tuples\n if (!map[tupleid(t)]) update(t);\n });\n cap = -1;\n }\n\n if (mod && res.length > num) {\n const n = res.length - num;\n\n for (let i = 0; i < n; ++i) {\n map[tupleid(res[i])] = -1;\n out.rem.push(res[i]);\n }\n\n res = res.slice(n);\n }\n\n if (pulse.mod.length) {\n // propagate modified tuples in the sample reservoir\n pulse.visit(pulse.MOD, t => {\n if (map[tupleid(t)]) out.mod.push(t);\n });\n }\n\n if (pulse.add.length) {\n // update sample reservoir\n pulse.visit(pulse.ADD, update);\n }\n\n if (pulse.add.length || cap < 0) {\n // output newly added tuples\n out.add = res.filter(t => !map[tupleid(t)]);\n }\n\n this.count = cnt;\n this.value = out.source = res;\n return out;\n }\n\n});\n\n/**\n * Generates data tuples for a specified sequence range of numbers.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {number} params.start - The first number in the sequence.\n * @param {number} params.stop - The last number (exclusive) in the sequence.\n * @param {number} [params.step=1] - The step size between numbers in the sequence.\n */\n\nfunction Sequence(params) {\n Transform.call(this, null, params);\n}\nSequence.Definition = {\n 'type': 'Sequence',\n 'metadata': {\n 'generates': true,\n 'changes': true\n },\n 'params': [{\n 'name': 'start',\n 'type': 'number',\n 'required': true\n }, {\n 'name': 'stop',\n 'type': 'number',\n 'required': true\n }, {\n 'name': 'step',\n 'type': 'number',\n 'default': 1\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': 'data'\n }]\n};\ninherits(Sequence, Transform, {\n transform(_, pulse) {\n if (this.value && !_.modified()) return;\n const out = pulse.materialize().fork(pulse.MOD),\n as = _.as || 'data';\n out.rem = this.value ? pulse.rem.concat(this.value) : pulse.rem;\n this.value = range(_.start, _.stop, _.step || 1).map(v => {\n const t = {};\n t[as] = v;\n return ingest(t);\n });\n out.add = pulse.add.concat(this.value);\n return out;\n }\n\n});\n\n/**\n * Propagates a new pulse without any tuples so long as the input\n * pulse contains some added, removed or modified tuples.\n * @param {object} params - The parameters for this operator.\n * @constructor\n */\n\nfunction Sieve(params) {\n Transform.call(this, null, params);\n this.modified(true); // always treat as modified\n}\ninherits(Sieve, Transform, {\n transform(_, pulse) {\n this.value = pulse.source;\n return pulse.changed() ? pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS) : pulse.StopPropagation;\n }\n\n});\n\n/**\n * Discretize dates to specific time units.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The data field containing date/time values.\n */\n\nfunction TimeUnit(params) {\n Transform.call(this, null, params);\n}\nconst OUTPUT = ['unit0', 'unit1'];\nTimeUnit.Definition = {\n 'type': 'TimeUnit',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'interval',\n 'type': 'boolean',\n 'default': true\n }, {\n 'name': 'units',\n 'type': 'enum',\n 'values': TIME_UNITS,\n 'array': true\n }, {\n 'name': 'step',\n 'type': 'number',\n 'default': 1\n }, {\n 'name': 'maxbins',\n 'type': 'number',\n 'default': 40\n }, {\n 'name': 'extent',\n 'type': 'date',\n 'array': true\n }, {\n 'name': 'timezone',\n 'type': 'enum',\n 'default': 'local',\n 'values': ['local', 'utc']\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': OUTPUT\n }]\n};\ninherits(TimeUnit, Transform, {\n transform(_, pulse) {\n const field = _.field,\n band = _.interval !== false,\n utc = _.timezone === 'utc',\n floor = this._floor(_, pulse),\n offset = (utc ? utcInterval : timeInterval)(floor.unit).offset,\n as = _.as || OUTPUT,\n u0 = as[0],\n u1 = as[1],\n step = floor.step;\n\n let min = floor.start || Infinity,\n max = floor.stop || -Infinity,\n flag = pulse.ADD;\n\n if (_.modified() || pulse.modified(accessorFields(field))) {\n pulse = pulse.reflow(true);\n flag = pulse.SOURCE;\n min = Infinity;\n max = -Infinity;\n }\n\n pulse.visit(flag, t => {\n const v = field(t);\n let a, b;\n\n if (v == null) {\n t[u0] = null;\n if (band) t[u1] = null;\n } else {\n t[u0] = a = b = floor(v);\n if (band) t[u1] = b = offset(a, step);\n if (a < min) min = a;\n if (b > max) max = b;\n }\n });\n floor.start = min;\n floor.stop = max;\n return pulse.modifies(band ? as : u0);\n },\n\n _floor(_, pulse) {\n const utc = _.timezone === 'utc'; // get parameters\n\n const {\n units,\n step\n } = _.units ? {\n units: _.units,\n step: _.step || 1\n } : timeBin({\n extent: _.extent || extent(pulse.materialize(pulse.SOURCE).source, _.field),\n maxbins: _.maxbins\n }); // check / standardize time units\n\n const tunits = timeUnits(units),\n prev = this.value || {},\n floor = (utc ? utcFloor : timeFloor)(tunits, step);\n floor.unit = peek(tunits);\n floor.units = tunits;\n floor.step = step;\n floor.start = prev.start;\n floor.stop = prev.stop;\n return this.value = floor;\n }\n\n});\n\n/**\n * An index that maps from unique, string-coerced, field values to tuples.\n * Assumes that the field serves as a unique key with no duplicate values.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The field accessor to index.\n */\n\nfunction TupleIndex(params) {\n Transform.call(this, fastmap(), params);\n}\ninherits(TupleIndex, Transform, {\n transform(_, pulse) {\n const df = pulse.dataflow,\n field = _.field,\n index = this.value,\n set = t => index.set(field(t), t);\n\n let mod = true;\n\n if (_.modified('field') || pulse.modified(field.fields)) {\n index.clear();\n pulse.visit(pulse.SOURCE, set);\n } else if (pulse.changed()) {\n pulse.visit(pulse.REM, t => index.delete(field(t)));\n pulse.visit(pulse.ADD, set);\n } else {\n mod = false;\n }\n\n this.modified(mod);\n if (index.empty > df.cleanThreshold) df.runAfter(index.clean);\n return pulse.fork();\n }\n\n});\n\n/**\n * Extracts an array of values. Assumes the source data has already been\n * reduced as needed (e.g., by an upstream Aggregate transform).\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The domain field to extract.\n * @param {function(*,*): number} [params.sort] - An optional\n * comparator function for sorting the values. The comparator will be\n * applied to backing tuples prior to value extraction.\n */\n\nfunction Values(params) {\n Transform.call(this, null, params);\n}\ninherits(Values, Transform, {\n transform(_, pulse) {\n const run = !this.value || _.modified('field') || _.modified('sort') || pulse.changed() || _.sort && pulse.modified(_.sort.fields);\n\n if (run) {\n this.value = (_.sort ? pulse.source.slice().sort(stableCompare(_.sort)) : pulse.source).map(_.field);\n }\n }\n\n});\n\nfunction WindowOp(op, field, param, as) {\n const fn = WindowOps[op](field, param);\n return {\n init: fn.init || zero,\n update: function (w, t) {\n t[as] = fn.next(w);\n }\n };\n}\nconst WindowOps = {\n row_number: function () {\n return {\n next: w => w.index + 1\n };\n },\n rank: function () {\n let rank;\n return {\n init: () => rank = 1,\n next: w => {\n const i = w.index,\n data = w.data;\n return i && w.compare(data[i - 1], data[i]) ? rank = i + 1 : rank;\n }\n };\n },\n dense_rank: function () {\n let drank;\n return {\n init: () => drank = 1,\n next: w => {\n const i = w.index,\n d = w.data;\n return i && w.compare(d[i - 1], d[i]) ? ++drank : drank;\n }\n };\n },\n percent_rank: function () {\n const rank = WindowOps.rank(),\n next = rank.next;\n return {\n init: rank.init,\n next: w => (next(w) - 1) / (w.data.length - 1)\n };\n },\n cume_dist: function () {\n let cume;\n return {\n init: () => cume = 0,\n next: w => {\n const d = w.data,\n c = w.compare;\n let i = w.index;\n\n if (cume < i) {\n while (i + 1 < d.length && !c(d[i], d[i + 1])) ++i;\n\n cume = i;\n }\n\n return (1 + cume) / d.length;\n }\n };\n },\n ntile: function (field, num) {\n num = +num;\n if (!(num > 0)) error('ntile num must be greater than zero.');\n const cume = WindowOps.cume_dist(),\n next = cume.next;\n return {\n init: cume.init,\n next: w => Math.ceil(num * next(w))\n };\n },\n lag: function (field, offset) {\n offset = +offset || 1;\n return {\n next: w => {\n const i = w.index - offset;\n return i >= 0 ? field(w.data[i]) : null;\n }\n };\n },\n lead: function (field, offset) {\n offset = +offset || 1;\n return {\n next: w => {\n const i = w.index + offset,\n d = w.data;\n return i < d.length ? field(d[i]) : null;\n }\n };\n },\n first_value: function (field) {\n return {\n next: w => field(w.data[w.i0])\n };\n },\n last_value: function (field) {\n return {\n next: w => field(w.data[w.i1 - 1])\n };\n },\n nth_value: function (field, nth) {\n nth = +nth;\n if (!(nth > 0)) error('nth_value nth must be greater than zero.');\n return {\n next: w => {\n const i = w.i0 + (nth - 1);\n return i < w.i1 ? field(w.data[i]) : null;\n }\n };\n },\n prev_value: function (field) {\n let prev;\n return {\n init: () => prev = null,\n next: w => {\n const v = field(w.data[w.index]);\n return v != null ? prev = v : prev;\n }\n };\n },\n next_value: function (field) {\n let v, i;\n return {\n init: () => (v = null, i = -1),\n next: w => {\n const d = w.data;\n return w.index <= i ? v : (i = find(field, d, w.index)) < 0 ? (i = d.length, v = null) : v = field(d[i]);\n }\n };\n }\n};\n\nfunction find(field, data, index) {\n for (let n = data.length; index < n; ++index) {\n const v = field(data[index]);\n if (v != null) return index;\n }\n\n return -1;\n}\n\nconst ValidWindowOps = Object.keys(WindowOps);\n\nfunction WindowState(_) {\n const ops = array(_.ops),\n fields = array(_.fields),\n params = array(_.params),\n as = array(_.as),\n outputs = this.outputs = [],\n windows = this.windows = [],\n inputs = {},\n map = {},\n counts = [],\n measures = [];\n let countOnly = true;\n\n function visitInputs(f) {\n array(accessorFields(f)).forEach(_ => inputs[_] = 1);\n }\n\n visitInputs(_.sort);\n ops.forEach((op, i) => {\n const field = fields[i],\n mname = accessorName(field),\n name = measureName(op, mname, as[i]);\n visitInputs(field);\n outputs.push(name); // Window operation\n\n if (hasOwnProperty(WindowOps, op)) {\n windows.push(WindowOp(op, fields[i], params[i], name));\n } // Aggregate operation\n else {\n if (field == null && op !== 'count') {\n error('Null aggregate field specified.');\n }\n\n if (op === 'count') {\n counts.push(name);\n return;\n }\n\n countOnly = false;\n let m = map[mname];\n\n if (!m) {\n m = map[mname] = [];\n m.field = field;\n measures.push(m);\n }\n\n m.push(createMeasure(op, name));\n }\n });\n\n if (counts.length || measures.length) {\n this.cell = cell(measures, counts, countOnly);\n }\n\n this.inputs = Object.keys(inputs);\n}\nconst prototype = WindowState.prototype;\n\nprototype.init = function () {\n this.windows.forEach(_ => _.init());\n if (this.cell) this.cell.init();\n};\n\nprototype.update = function (w, t) {\n const cell = this.cell,\n wind = this.windows,\n data = w.data,\n m = wind && wind.length;\n let j;\n\n if (cell) {\n for (j = w.p0; j < w.i0; ++j) cell.rem(data[j]);\n\n for (j = w.p1; j < w.i1; ++j) cell.add(data[j]);\n\n cell.set(t);\n }\n\n for (j = 0; j < m; ++j) wind[j].update(w, t);\n};\n\nfunction cell(measures, counts, countOnly) {\n measures = measures.map(m => compileMeasures(m, m.field));\n const cell = {\n num: 0,\n agg: null,\n store: false,\n count: counts\n };\n\n if (!countOnly) {\n var n = measures.length,\n a = cell.agg = Array(n),\n i = 0;\n\n for (; i < n; ++i) a[i] = new measures[i](cell);\n }\n\n if (cell.store) {\n var store = cell.data = new TupleStore();\n }\n\n cell.add = function (t) {\n cell.num += 1;\n if (countOnly) return;\n if (store) store.add(t);\n\n for (let i = 0; i < n; ++i) {\n a[i].add(a[i].get(t), t);\n }\n };\n\n cell.rem = function (t) {\n cell.num -= 1;\n if (countOnly) return;\n if (store) store.rem(t);\n\n for (let i = 0; i < n; ++i) {\n a[i].rem(a[i].get(t), t);\n }\n };\n\n cell.set = function (t) {\n let i, n; // consolidate stored values\n\n if (store) store.values(); // update tuple properties\n\n for (i = 0, n = counts.length; i < n; ++i) t[counts[i]] = cell.num;\n\n if (!countOnly) for (i = 0, n = a.length; i < n; ++i) a[i].set(t);\n };\n\n cell.init = function () {\n cell.num = 0;\n if (store) store.reset();\n\n for (let i = 0; i < n; ++i) a[i].init();\n };\n\n return cell;\n}\n\n/**\n * Perform window calculations and write results to the input stream.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(*,*): number} [params.sort] - A comparator function for sorting tuples within a window.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors by which to partition tuples into separate windows.\n * @param {Array<string>} params.ops - An array of strings indicating window operations to perform.\n * @param {Array<function(object): *>} [params.fields] - An array of accessors\n * for data fields to use as inputs to window operations.\n * @param {Array<*>} [params.params] - An array of parameter values for window operations.\n * @param {Array<string>} [params.as] - An array of output field names for window operations.\n * @param {Array<number>} [params.frame] - Window frame definition as two-element array.\n * @param {boolean} [params.ignorePeers=false] - If true, base window frame boundaries on row\n * number alone, ignoring peers with identical sort values. If false (default),\n * the window boundaries will be adjusted to include peer values.\n */\n\nfunction Window(params) {\n Transform.call(this, {}, params);\n this._mlen = 0;\n this._mods = [];\n}\nWindow.Definition = {\n 'type': 'Window',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'sort',\n 'type': 'compare'\n }, {\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'ops',\n 'type': 'enum',\n 'array': true,\n 'values': ValidWindowOps.concat(ValidAggregateOps)\n }, {\n 'name': 'params',\n 'type': 'number',\n 'null': true,\n 'array': true\n }, {\n 'name': 'fields',\n 'type': 'field',\n 'null': true,\n 'array': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'null': true,\n 'array': true\n }, {\n 'name': 'frame',\n 'type': 'number',\n 'null': true,\n 'array': true,\n 'length': 2,\n 'default': [null, 0]\n }, {\n 'name': 'ignorePeers',\n 'type': 'boolean',\n 'default': false\n }]\n};\ninherits(Window, Transform, {\n transform(_, pulse) {\n this.stamp = pulse.stamp;\n\n const mod = _.modified(),\n cmp = stableCompare(_.sort),\n key = groupkey(_.groupby),\n group = t => this.group(key(t)); // initialize window state\n\n\n let state = this.state;\n\n if (!state || mod) {\n state = this.state = new WindowState(_);\n } // partition input tuples\n\n\n if (mod || pulse.modified(state.inputs)) {\n this.value = {};\n pulse.visit(pulse.SOURCE, t => group(t).add(t));\n } else {\n pulse.visit(pulse.REM, t => group(t).remove(t));\n pulse.visit(pulse.ADD, t => group(t).add(t));\n } // perform window calculations for each modified partition\n\n\n for (let i = 0, n = this._mlen; i < n; ++i) {\n processPartition(this._mods[i], state, cmp, _);\n }\n\n this._mlen = 0;\n this._mods = []; // TODO don't reflow everything?\n\n return pulse.reflow(mod).modifies(state.outputs);\n },\n\n group(key) {\n let group = this.value[key];\n\n if (!group) {\n group = this.value[key] = SortedList(tupleid);\n group.stamp = -1;\n }\n\n if (group.stamp < this.stamp) {\n group.stamp = this.stamp;\n this._mods[this._mlen++] = group;\n }\n\n return group;\n }\n\n});\n\nfunction processPartition(list, state, cmp, _) {\n const sort = _.sort,\n range = sort && !_.ignorePeers,\n frame = _.frame || [null, 0],\n data = list.data(cmp),\n // use cmp for stable sort\n n = data.length,\n b = range ? bisector(sort) : null,\n w = {\n i0: 0,\n i1: 0,\n p0: 0,\n p1: 0,\n index: 0,\n data: data,\n compare: sort || constant(-1)\n };\n state.init();\n\n for (let i = 0; i < n; ++i) {\n setWindow(w, frame, i, n);\n if (range) adjustRange(w, b);\n state.update(w, data[i]);\n }\n}\n\nfunction setWindow(w, f, i, n) {\n w.p0 = w.i0;\n w.p1 = w.i1;\n w.i0 = f[0] == null ? 0 : Math.max(0, i - Math.abs(f[0]));\n w.i1 = f[1] == null ? n : Math.min(n, i + Math.abs(f[1]) + 1);\n w.index = i;\n} // if frame type is 'range', adjust window for peer values\n\n\nfunction adjustRange(w, bisect) {\n const r0 = w.i0,\n r1 = w.i1 - 1,\n c = w.compare,\n d = w.data,\n n = d.length - 1;\n if (r0 > 0 && !c(d[r0], d[r0 - 1])) w.i0 = bisect.left(d, d[r0]);\n if (r1 < n && !c(d[r1], d[r1 + 1])) w.i1 = bisect.right(d, d[r1]);\n}\n\nexport { Aggregate as aggregate, Bin as bin, Collect as collect, Compare as compare, CountPattern as countpattern, Cross as cross, Density as density, DotBin as dotbin, Expression as expression, Extent as extent, Facet as facet, Field as field, Filter as filter, Flatten as flatten, Fold as fold, Formula as formula, Generate as generate, Impute as impute, JoinAggregate as joinaggregate, KDE as kde, Key as key, Load as load, Lookup as lookup, MultiExtent as multiextent, MultiValues as multivalues, Params as params, Pivot as pivot, PreFacet as prefacet, Project as project, Proxy as proxy, Quantile as quantile, Relay as relay, Sample as sample, Sequence as sequence, Sieve as sieve, Subflow as subflow, TimeUnit as timeunit, TupleIndex as tupleindex, Values as values, Window as window };\n","import quantile from \"./quantile.js\";\n\nexport default function(values, valueof) {\n return quantile(values, 0.5, valueof);\n}\n","export default function mean(values, valueof) {\n let count = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n }\n if (count) return sum / count;\n}\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // proceed\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","export default function() {}\n","import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\n\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","const pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","export var slice = Array.prototype.slice;\n\nexport default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import {path} from \"d3-path\";\nimport array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x, y) {\n var defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n x = typeof x === \"function\" ? x : (x === undefined) ? pointX : constant(x);\n y = typeof y === \"function\" ? y : (y === undefined) ? pointY : constant(y);\n\n function line(data) {\n var i,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import {path} from \"d3-path\";\nimport array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function(x0, y0, y1) {\n var x1 = null,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n x0 = typeof x0 === \"function\" ? x0 : (x0 === undefined) ? pointX : constant(+x0);\n y0 = typeof y0 === \"function\" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0);\n y1 = typeof y1 === \"function\" ? y1 : (y1 === undefined) ? pointY : constant(+y1);\n\n function area(data) {\n var i,\n j,\n k,\n n = (data = array(data)).length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","import {pi, tau} from \"../math.js\";\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","import {pi, tau} from \"../math.js\";\n\nvar ka = 0.89081309152928522810,\n kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n kx = Math.sin(tau / 10) * kr,\n ky = -Math.cos(tau / 10) * kr;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size * ka),\n x = kx * r,\n y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a = tau * i / 5,\n c = Math.cos(a),\n s = Math.sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","var tan30 = Math.sqrt(1 / 3),\n tan30_2 = tan30 * 2;\n\nexport default {\n draw: function(context, size) {\n var y = Math.sqrt(size / tan30_2),\n x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","var sqrt3 = Math.sqrt(3);\n\nexport default {\n draw: function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","var c = -0.5,\n s = Math.sqrt(3) / 2,\n k = 1 / Math.sqrt(12),\n a = (k / 2 + 1) * 3;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / a),\n x0 = r / 2,\n y0 = r * k,\n x1 = x0,\n y1 = r * k + r,\n x2 = -x1,\n y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","export function domCanvas(w, h) {\n if (typeof document !== 'undefined' && document.createElement) {\n const c = document.createElement('canvas');\n if (c && c.getContext) {\n c.width = w;\n c.height = h;\n return c;\n }\n }\n return null;\n}\n\nexport const domImage = () =>\n typeof Image !== 'undefined' ? Image : null;\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","export function initRange(domain, range) {\n switch (arguments.length) {\n case 0: break;\n case 1: this.range(domain); break;\n default: this.range(range).domain(domain); break;\n }\n return this;\n}\n\nexport function initInterpolator(domain, interpolator) {\n switch (arguments.length) {\n case 0: break;\n case 1: {\n if (typeof domain === \"function\") this.interpolator(domain);\n else this.range(domain);\n break;\n }\n default: {\n this.domain(domain);\n if (typeof interpolator === \"function\") this.interpolator(interpolator);\n else this.range(interpolator);\n break;\n }\n }\n return this;\n}\n","import {initRange} from \"./init.js\";\n\nexport const implicit = Symbol(\"implicit\");\n\nexport default function ordinal() {\n var index = new Map(),\n domain = [],\n range = [],\n unknown = implicit;\n\n function scale(d) {\n var key = d + \"\", i = index.get(key);\n if (!i) {\n if (unknown !== implicit) return unknown;\n index.set(key, i = domain.push(d));\n }\n return range[(i - 1) % range.length];\n }\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [], index = new Map();\n for (const value of _) {\n const key = value + \"\";\n if (index.has(key)) continue;\n index.set(key, domain.push(value));\n }\n return scale;\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), scale) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return ordinal(domain, range).unknown(unknown);\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n if (r0 * step < start) ++r0;\n if (r1 * step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) * step;\n } else {\n step = -step;\n let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n if (r0 / step < start) ++r0;\n if (r1 / step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\n\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\n\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function() {\n return this.fill\n + this.align\n + this.sign\n + this.symbol\n + (this.zero ? \"0\" : \"\")\n + (this.width === undefined ? \"\" : Math.max(1, this.width | 0))\n + (this.comma ? \",\" : \"\")\n + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0))\n + (this.trim ? \"~\" : \"\")\n + this.type;\n};\n","// Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimal(1.23) returns [\"123\", 0].\nexport default function(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n var i, coefficient = x.slice(0, i);\n\n // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n return [\n coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,\n +x.slice(i + 1)\n ];\n}\n","import formatDecimal from \"./formatDecimal.js\";\n\nexport var prefixExponent;\n\nexport default function(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient\n : i > n ? coefficient + new Array(i - n + 1).join(\"0\")\n : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i)\n : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var format;\nexport var formatPrefix;\n\ndefaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}\n","import formatDecimal from \"./formatDecimal.js\";\n\nexport default function(x) {\n return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN;\n}\n","import formatDecimal from \"./formatDecimal.js\";\n\nexport default function(x, p) {\n var d = formatDecimal(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient\n : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1)\n : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}\n","import formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\n\nexport default {\n \"%\": function(x, p) { return (x * 100).toFixed(p); },\n \"b\": function(x) { return Math.round(x).toString(2); },\n \"c\": function(x) { return x + \"\"; },\n \"d\": function(x) { return Math.round(x).toString(10); },\n \"e\": function(x, p) { return x.toExponential(p); },\n \"f\": function(x, p) { return x.toFixed(p); },\n \"g\": function(x, p) { return x.toPrecision(p); },\n \"o\": function(x) { return Math.round(x).toString(8); },\n \"p\": function(x, p) { return formatRounded(x * 100, p); },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function(x) { return Math.round(x).toString(16).toUpperCase(); },\n \"x\": function(x) { return Math.round(x).toString(16); }\n};\n","export default function(x) {\n return x;\n}\n","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport {prefixExponent} from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\n\nvar map = Array.prototype.map,\n prefixes = [\"y\",\"z\",\"a\",\"f\",\"p\",\"n\",\"µ\",\"m\",\"\",\"k\",\"M\",\"G\",\"T\",\"P\",\"E\",\"Z\",\"Y\"];\n\nexport default function(locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type;\n\n // The \"n\" type is an alias for \",g\".\n if (type === \"n\") comma = true, type = \"g\";\n\n // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\";\n\n // If zero fill is specified, padding goes after sign and before digits.\n if (zero || (fill === \"0\" && align === \"=\")) zero = true, fill = \"0\", align = \"=\";\n\n // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\";\n\n // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type);\n\n // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n precision = precision === undefined ? 6\n : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))\n : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i, n, c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value;\n\n // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n var valueNegative = value < 0 || 1 / value < 0;\n\n // Perform the initial formatting.\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision);\n\n // Trim insignificant zeros.\n if (trim) value = formatTrim(value);\n\n // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false;\n\n // Compute the prefix and suffix.\n valuePrefix = (valueNegative ? (sign === \"(\" ? sign : minus) : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\");\n\n // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n if (maybeSuffix) {\n i = -1, n = value.length;\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n }\n\n // If the fill character is not \"0\", grouping is applied before padding.\n if (comma && !zero) value = group(value, Infinity);\n\n // Compute the padding.\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\";\n\n // If the fill character is \"0\", grouping is applied after padding.\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\";\n\n // Reconstruct the final output based on the desired alignment.\n switch (align) {\n case \"<\": value = valuePrefix + value + valueSuffix + padding; break;\n case \"=\": value = valuePrefix + padding + value + valueSuffix; break;\n case \"^\": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;\n default: value = padding + valuePrefix + value + valueSuffix; break;\n }\n\n return numerals(value);\n }\n\n format.toString = function() {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function(value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}\n","export default function(grouping, thousands) {\n return function(value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}\n","export default function(numerals) {\n return function(value) {\n return value.replace(/[0-9]/g, function(i) {\n return numerals[+i];\n });\n };\n}\n","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function(s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\": i0 = i1 = i; break;\n case \"0\": if (i0 === 0) i0 = i; i1 = i; break;\n default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break;\n }\n }\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}\n","import {tickStep} from \"d3-array\";\nimport {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from \"d3-format\";\n\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n switch (specifier.type) {\n case \"s\": {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\": {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n case \"f\":\n case \"%\": {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n return format(specifier);\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}\n","import exponent from \"./exponent.js\";\n\nexport default function(step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? new Rgb(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? new Rgb((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","export default function number(x) {\n return +x;\n}\n","import {bisect} from \"d3-array\";\nimport {interpolate as interpolateValue, interpolateNumber, interpolateRound} from \"d3-interpolate\";\nimport constant from \"./constant.js\";\nimport number from \"./number.js\";\n\nvar unit = [0, 1];\n\nexport function identity(x) {\n return x;\n}\n\nfunction normalize(a, b) {\n return (b -= (a = +a))\n ? function(x) { return (x - a) / b; }\n : constant(isNaN(b) ? NaN : 0.5);\n}\n\nfunction clamper(a, b) {\n var t;\n if (a > b) t = a, a = b, b = t;\n return function(x) { return Math.max(a, Math.min(b, x)); };\n}\n\n// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].\n// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].\nfunction bimap(domain, range, interpolate) {\n var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];\n if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);\n else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);\n return function(x) { return r0(d0(x)); };\n}\n\nfunction polymap(domain, range, interpolate) {\n var j = Math.min(domain.length, range.length) - 1,\n d = new Array(j),\n r = new Array(j),\n i = -1;\n\n // Reverse descending domains.\n if (domain[j] < domain[0]) {\n domain = domain.slice().reverse();\n range = range.slice().reverse();\n }\n\n while (++i < j) {\n d[i] = normalize(domain[i], domain[i + 1]);\n r[i] = interpolate(range[i], range[i + 1]);\n }\n\n return function(x) {\n var i = bisect(domain, x, 1, j) - 1;\n return r[i](d[i](x));\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .range(source.range())\n .interpolate(source.interpolate())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport function transformer() {\n var domain = unit,\n range = unit,\n interpolate = interpolateValue,\n transform,\n untransform,\n unknown,\n clamp = identity,\n piecewise,\n output,\n input;\n\n function rescale() {\n var n = Math.min(domain.length, range.length);\n if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]);\n piecewise = n > 2 ? polymap : bimap;\n output = input = null;\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));\n }\n\n scale.invert = function(y) {\n return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.rangeRound = function(_) {\n return range = Array.from(_), interpolate = interpolateRound, rescale();\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity;\n };\n\n scale.interpolate = function(_) {\n return arguments.length ? (interpolate = _, rescale()) : interpolate;\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t, u) {\n transform = t, untransform = u;\n return rescale();\n };\n}\n\nexport default function continuous() {\n return transformer()(identity, identity);\n}\n","export default function constants(x) {\n return function() {\n return x;\n };\n}\n","import {ticks, tickIncrement} from \"d3-array\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\n\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function(count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function(count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function(count) {\n if (count == null) count = 10;\n\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n \n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n if (step === prestep) {\n d[i0] = start\n d[i1] = stop\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\n\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function() {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n\n return linearish(scale);\n}\n","export default function nice(domain, interval) {\n domain = domain.slice();\n\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}\n","import {ticks} from \"d3-array\";\nimport {format} from \"d3-format\";\nimport nice from \"./nice.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10\n : base === Math.E ? Math.exp\n : function(x) { return Math.pow(base, x); };\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log\n : base === 10 && Math.log10\n || base === 2 && Math.log2\n || (base = Math.log(base), function(x) { return Math.log(x) / base; });\n}\n\nfunction reflect(f) {\n return function(x) {\n return -f(-x);\n };\n}\n\nexport function loggish(transform) {\n var scale = transform(transformLog, transformExp),\n domain = scale.domain,\n base = 10,\n logs,\n pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n return scale;\n }\n\n scale.base = function(_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function(_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = function(count) {\n var d = domain(),\n u = d[0],\n v = d[d.length - 1],\n r;\n\n if (r = v < u) i = u, u = v, v = i;\n\n var i = logs(u),\n j = logs(v),\n p,\n k,\n t,\n n = count == null ? 10 : +count,\n z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.floor(i), j = Math.ceil(j);\n if (u > 0) for (; i <= j; ++i) {\n for (k = 1, p = pows(i); k < base; ++k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i <= j; ++i) {\n for (k = base - 1, p = pows(i); k >= 1; --k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n if (z.length * 2 < n) z = ticks(u, v, n);\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = function(count, specifier) {\n if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n if (typeof specifier !== \"function\") specifier = format(specifier);\n if (count === Infinity) return specifier;\n if (count == null) count = 10;\n var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n return function(d) {\n var i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = function() {\n return domain(nice(domain(), {\n floor: function(x) { return pows(Math.floor(logs(x))); },\n ceil: function(x) { return pows(Math.ceil(logs(x))); }\n }));\n };\n\n return scale;\n}\n\nexport default function log() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, log()).base(scale.base());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, identity, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformPow(exponent) {\n return function(x) {\n return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n };\n}\n\nfunction transformSqrt(x) {\n return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);\n}\n\nfunction transformSquare(x) {\n return x < 0 ? -x * x : x * x;\n}\n\nexport function powish(transform) {\n var scale = transform(identity, identity),\n exponent = 1;\n\n function rescale() {\n return exponent === 1 ? transform(identity, identity)\n : exponent === 0.5 ? transform(transformSqrt, transformSquare)\n : transform(transformPow(exponent), transformPow(1 / exponent));\n }\n\n scale.exponent = function(_) {\n return arguments.length ? (exponent = +_, rescale()) : exponent;\n };\n\n return linearish(scale);\n}\n\nexport default function pow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, pow()).exponent(scale.exponent());\n };\n\n initRange.apply(scale, arguments);\n\n return scale;\n}\n\nexport function sqrt() {\n return pow.apply(null, arguments).exponent(0.5);\n}\n","import {linearish} from \"./linear.js\";\nimport {copy, transformer} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\n\nfunction transformSymlog(c) {\n return function(x) {\n return Math.sign(x) * Math.log1p(Math.abs(x / c));\n };\n}\n\nfunction transformSymexp(c) {\n return function(x) {\n return Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n };\n}\n\nexport function symlogish(transform) {\n var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));\n\n scale.constant = function(_) {\n return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;\n };\n\n return linearish(scale);\n}\n\nexport default function symlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, symlog()).constant(scale.constant());\n };\n\n return initRange.apply(scale, arguments);\n}\n","export const durationSecond = 1000;\nexport const durationMinute = durationSecond * 60;\nexport const durationHour = durationMinute * 60;\nexport const durationDay = durationHour * 24;\nexport const durationWeek = durationDay * 7;\nexport const durationMonth = durationDay * 30;\nexport const durationYear = durationDay * 365;\n","var t0 = new Date,\n t1 = new Date;\n\nexport default function newInterval(floori, offseti, count, field) {\n\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;\n }\n\n interval.floor = function(date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function(date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function(date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function(date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function(start, stop, step) {\n var range = [], previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n do range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n while (previous < start && start < stop);\n return range;\n };\n\n interval.filter = function(test) {\n return newInterval(function(date) {\n if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);\n }, function(date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n }\n }\n });\n };\n\n if (count) {\n interval.count = function(start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function(step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null\n : !(step > 1) ? interval\n : interval.filter(field\n ? function(d) { return field(d) % step === 0; }\n : function(d) { return interval.count(0, d) % step === 0; });\n };\n }\n\n return interval;\n}\n","import interval from \"./interval.js\";\n\nvar millisecond = interval(function() {\n // noop\n}, function(date, step) {\n date.setTime(+date + step);\n}, function(start, end) {\n return end - start;\n});\n\n// An optimized implementation for this simple case.\nmillisecond.every = function(k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function(date) {\n date.setTime(Math.floor(date / k) * k);\n }, function(date, step) {\n date.setTime(+date + step * k);\n }, function(start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;\n","import interval from \"./interval.js\";\nimport {durationSecond} from \"./duration.js\";\n\nvar second = interval(function(date) {\n date.setTime(date - date.getMilliseconds());\n}, function(date, step) {\n date.setTime(+date + step * durationSecond);\n}, function(start, end) {\n return (end - start) / durationSecond;\n}, function(date) {\n return date.getUTCSeconds();\n});\n\nexport default second;\nexport var seconds = second.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationSecond} from \"./duration.js\";\n\nvar minute = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getMinutes();\n});\n\nexport default minute;\nexport var minutes = minute.range;\n","import interval from \"./interval.js\";\nimport {durationHour, durationMinute, durationSecond} from \"./duration.js\";\n\nvar hour = interval(function(date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getHours();\n});\n\nexport default hour;\nexport var hours = hour.range;\n","import interval from \"./interval.js\";\nimport {durationDay, durationMinute} from \"./duration.js\";\n\nvar day = interval(\n date => date.setHours(0, 0, 0, 0),\n (date, step) => date.setDate(date.getDate() + step),\n (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,\n date => date.getDate() - 1\n);\n\nexport default day;\nexport var days = day.range;\n","import interval from \"./interval.js\";\nimport {durationMinute, durationWeek} from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function(date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function(start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\n\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;\n","import interval from \"./interval.js\";\n\nvar month = interval(function(date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setMonth(date.getMonth() + step);\n}, function(start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function(date) {\n return date.getMonth();\n});\n\nexport default month;\nexport var months = month.range;\n","import interval from \"./interval.js\";\n\nvar year = interval(function(date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function(start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function(date) {\n return date.getFullYear();\n});\n\n// An optimized implementation for this simple case.\nyear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;\n","import interval from \"./interval.js\";\nimport {durationMinute} from \"./duration.js\";\n\nvar utcMinute = interval(function(date) {\n date.setUTCSeconds(0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationMinute);\n}, function(start, end) {\n return (end - start) / durationMinute;\n}, function(date) {\n return date.getUTCMinutes();\n});\n\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;\n","import interval from \"./interval.js\";\nimport {durationHour} from \"./duration.js\";\n\nvar utcHour = interval(function(date) {\n date.setUTCMinutes(0, 0, 0);\n}, function(date, step) {\n date.setTime(+date + step * durationHour);\n}, function(start, end) {\n return (end - start) / durationHour;\n}, function(date) {\n return date.getUTCHours();\n});\n\nexport default utcHour;\nexport var utcHours = utcHour.range;\n","import interval from \"./interval.js\";\nimport {durationDay} from \"./duration.js\";\n\nvar utcDay = interval(function(date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function(start, end) {\n return (end - start) / durationDay;\n}, function(date) {\n return date.getUTCDate() - 1;\n});\n\nexport default utcDay;\nexport var utcDays = utcDay.range;\n","import interval from \"./interval.js\";\nimport {durationWeek} from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function(date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function(start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\n\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;\n","import interval from \"./interval.js\";\n\nvar utcMonth = interval(function(date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function(start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function(date) {\n return date.getUTCMonth();\n});\n\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;\n","import interval from \"./interval.js\";\n\nvar utcYear = interval(function(date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function(start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function(date) {\n return date.getUTCFullYear();\n});\n\n// An optimized implementation for this simple case.\nutcYear.every = function(k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function(date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;\n","import {bisector, tickStep} from \"d3-array\";\nimport {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from \"./duration.js\";\nimport millisecond from \"./millisecond.js\";\nimport second from \"./second.js\";\nimport minute from \"./minute.js\";\nimport hour from \"./hour.js\";\nimport day from \"./day.js\";\nimport {sunday as week} from \"./week.js\";\nimport month from \"./month.js\";\nimport year from \"./year.js\";\nimport utcMinute from \"./utcMinute.js\";\nimport utcHour from \"./utcHour.js\";\nimport utcDay from \"./utcDay.js\";\nimport {utcSunday as utcWeek} from \"./utcWeek.js\";\nimport utcMonth from \"./utcMonth.js\";\nimport utcYear from \"./utcYear.js\";\n\nfunction ticker(year, month, week, day, hour, minute) {\n\n const tickIntervals = [\n [second, 1, durationSecond],\n [second, 5, 5 * durationSecond],\n [second, 15, 15 * durationSecond],\n [second, 30, 30 * durationSecond],\n [minute, 1, durationMinute],\n [minute, 5, 5 * durationMinute],\n [minute, 15, 15 * durationMinute],\n [minute, 30, 30 * durationMinute],\n [ hour, 1, durationHour ],\n [ hour, 3, 3 * durationHour ],\n [ hour, 6, 6 * durationHour ],\n [ hour, 12, 12 * durationHour ],\n [ day, 1, durationDay ],\n [ day, 2, 2 * durationDay ],\n [ week, 1, durationWeek ],\n [ month, 1, durationMonth ],\n [ month, 3, 3 * durationMonth ],\n [ year, 1, durationYear ]\n ];\n\n function ticks(start, stop, count) {\n const reverse = stop < start;\n if (reverse) [start, stop] = [stop, start];\n const interval = count && typeof count.range === \"function\" ? count : tickInterval(start, stop, count);\n const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop\n return reverse ? ticks.reverse() : ticks;\n }\n\n function tickInterval(start, stop, count) {\n const target = Math.abs(stop - start) / count;\n const i = bisector(([,, step]) => step).right(tickIntervals, target);\n if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));\n if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));\n const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];\n return t.every(step);\n }\n\n return [ticks, tickInterval];\n}\n\nconst [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute);\nconst [timeTicks, timeTickInterval] = ticker(year, month, week, day, hour, minute);\n\nexport {utcTicks, utcTickInterval, timeTicks, timeTickInterval};\n","import {\n timeDay,\n timeSunday,\n timeMonday,\n timeThursday,\n timeYear,\n utcDay,\n utcSunday,\n utcMonday,\n utcThursday,\n utcYear\n} from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n };\n\n // These recursive directive definitions must be deferred.\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function(date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);\n else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function(string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week, day;\n if (i != string.length) return null;\n\n // If a UNIX timestamp is specified, return it.\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0));\n\n // If this is utcParse, never use the local timezone.\n if (Z && !(\"Z\" in d)) d.Z = 0;\n\n // The am-pm flag is 0 for AM, and 1 for PM.\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12;\n\n // If the month was not specified, inherit from the quarter.\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0;\n\n // Convert day-of-week and week-of-year to day-of-year.\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n }\n\n // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n }\n\n // Otherwise, all fields are in local time.\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || ((j = parse(d, string, j)) < 0)) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function(specifier) {\n var f = newFormat(specifier += \"\", formats);\n f.toString = function() { return specifier; };\n return f;\n },\n parse: function(specifier) {\n var p = newParse(specifier += \"\", false);\n p.toString = function() { return specifier; };\n return p;\n },\n utcFormat: function(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n f.toString = function() { return specifier; };\n return f;\n },\n utcParse: function(specifier) {\n var p = newParse(specifier += \"\", true);\n p.toString = function() { return specifier; };\n return p;\n }\n };\n}\n\nvar pads = {\"-\": \"\", \"_\": \" \", \"0\": \"0\"},\n numberRe = /^\\s*\\d+/, // note: ignores next directive\n percentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {}, i = -1, n = names.length;\n while (++i < n) map[names[i].toLowerCase()] = i;\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatWeekNumberISO(d, p) {\n var day = d.getDay();\n d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\"))\n + pad(z / 60 | 0, \"0\", 2)\n + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n var day = d.getUTCDay();\n d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}\n","import formatLocale from \"./locale.js\";\n\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\n\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\n\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}\n","import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeTicks, timeTickInterval} from \"d3-time\";\nimport {timeFormat} from \"d3-time-format\";\nimport continuous, {copy} from \"./continuous.js\";\nimport {initRange} from \"./init.js\";\nimport nice from \"./nice.js\";\n\nfunction date(t) {\n return new Date(t);\n}\n\nfunction number(t) {\n return t instanceof Date ? +t : +new Date(+t);\n}\n\nexport function calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format) {\n var scale = continuous(),\n invert = scale.invert,\n domain = scale.domain;\n\n var formatMillisecond = format(\".%L\"),\n formatSecond = format(\":%S\"),\n formatMinute = format(\"%I:%M\"),\n formatHour = format(\"%I %p\"),\n formatDay = format(\"%a %d\"),\n formatWeek = format(\"%b %d\"),\n formatMonth = format(\"%B\"),\n formatYear = format(\"%Y\");\n\n function tickFormat(date) {\n return (second(date) < date ? formatMillisecond\n : minute(date) < date ? formatSecond\n : hour(date) < date ? formatMinute\n : day(date) < date ? formatHour\n : month(date) < date ? (week(date) < date ? formatDay : formatWeek)\n : year(date) < date ? formatMonth\n : formatYear)(date);\n }\n\n scale.invert = function(y) {\n return new Date(invert(y));\n };\n\n scale.domain = function(_) {\n return arguments.length ? domain(Array.from(_, number)) : domain().map(date);\n };\n\n scale.ticks = function(interval) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], interval == null ? 10 : interval);\n };\n\n scale.tickFormat = function(count, specifier) {\n return specifier == null ? tickFormat : format(specifier);\n };\n\n scale.nice = function(interval) {\n var d = domain();\n if (!interval || typeof interval.range !== \"function\") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);\n return interval ? domain(nice(d, interval)) : scale;\n };\n\n scale.copy = function() {\n return copy(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));\n };\n\n return scale;\n}\n\nexport default function time() {\n return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);\n}\n","import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 1,\n t0,\n t1,\n k10,\n transform,\n interpolator = identity,\n clamp = false,\n unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1;\n return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n return scale;\n };\n}\n\nexport function copy(source, target) {\n return target\n .domain(source.domain())\n .interpolator(source.interpolator())\n .clamp(source.clamp())\n .unknown(source.unknown());\n}\n\nexport default function sequential() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, sequential());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function() {\n return copy(scale, sequentialLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, sequentialPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","import {default as value} from \"./value.js\";\n\nexport default function piecewise(interpolate, values) {\n if (values === undefined) values = interpolate, interpolate = value;\n var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);\n while (i < n) I[i] = interpolate(v, v = values[++i]);\n return function(t) {\n var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));\n return I[i](t - i);\n };\n}\n","import {interpolate, interpolateRound, piecewise} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {copy} from \"./sequential.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n var x0 = 0,\n x1 = 0.5,\n x2 = 1,\n s = 1,\n t0,\n t1,\n t2,\n k10,\n k21,\n interpolator = identity,\n transform,\n clamp = false,\n unknown;\n\n function scale(x) {\n return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2];\n };\n\n scale.clamp = function(_) {\n return arguments.length ? (clamp = !!_, scale) : clamp;\n };\n\n scale.interpolator = function(_) {\n return arguments.length ? (interpolator = _, scale) : interpolator;\n };\n\n function range(interpolate) {\n return function(_) {\n var r0, r1, r2;\n return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)];\n };\n }\n\n scale.range = range(interpolate);\n\n scale.rangeRound = range(interpolateRound);\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n return function(t) {\n transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1;\n return scale;\n };\n}\n\nexport default function diverging() {\n var scale = linearish(transformer()(identity));\n\n scale.copy = function() {\n return copy(scale, diverging());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingLog() {\n var scale = loggish(transformer()).domain([0.1, 1, 10]);\n\n scale.copy = function() {\n return copy(scale, divergingLog()).base(scale.base());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSymlog() {\n var scale = symlogish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingSymlog()).constant(scale.constant());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingPow() {\n var scale = powish(transformer());\n\n scale.copy = function() {\n return copy(scale, divergingPow()).exponent(scale.exponent());\n };\n\n return initInterpolator.apply(scale, arguments);\n}\n\nexport function divergingSqrt() {\n return divergingPow.apply(null, arguments).exponent(0.5);\n}\n","import max from \"./max.js\";\nimport min from \"./min.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n","export default function(range) {\n var n = range.length;\n return function(t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","import {hue} from \"./color.js\";\n\nexport default function(a, b) {\n var i = hue(+a, +b);\n return function(t) {\n var x = i(t);\n return x - 360 * Math.floor(x / 360);\n };\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","import {hsl as colorHsl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hsl(hue) {\n return function(start, end) {\n var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hsl(hue);\nexport var hslLong = hsl(color);\n","export var deg2rad = Math.PI / 180;\nexport var rad2deg = 180 / Math.PI;\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {deg2rad, rad2deg} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nvar K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter: function(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker: function(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb: function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * rad2deg;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * deg2rad;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter: function(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker: function(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb: function() {\n return hcl2lab(this).rgb();\n }\n}));\n","import {lab as colorLab} from \"d3-color\";\nimport color from \"./color.js\";\n\nexport default function lab(start, end) {\n var l = color((start = colorLab(start)).l, (end = colorLab(end)).l),\n a = color(start.a, end.a),\n b = color(start.b, end.b),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.l = l(t);\n start.a = a(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n}\n","import {hcl as colorHcl} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction hcl(hue) {\n return function(start, end) {\n var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h),\n c = color(start.c, end.c),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.c = c(t);\n start.l = l(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n}\n\nexport default hcl(hue);\nexport var hclLong = hcl(color);\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb, darker, brighter} from \"./color.js\";\nimport {deg2rad, rad2deg} from \"./math.js\";\n\nvar A = -0.14861,\n B = +1.78277,\n C = -0.29227,\n D = -0.90649,\n E = +1.97294,\n ED = E * D,\n EB = E * B,\n BC_DA = B * C - D * A;\n\nfunction cubehelixConvert(o) {\n if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),\n bl = b - l,\n k = (E * (g - l) - C * bl) / D,\n s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1\n h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN;\n return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);\n}\n\nexport default function cubehelix(h, s, l, opacity) {\n return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);\n}\n\nexport function Cubehelix(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Cubehelix, cubehelix, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Cubehelix(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad,\n l = +this.l,\n a = isNaN(this.s) ? 0 : this.s * l * (1 - l),\n cosh = Math.cos(h),\n sinh = Math.sin(h);\n return new Rgb(\n 255 * (l + a * (A * cosh + B * sinh)),\n 255 * (l + a * (C * cosh + D * sinh)),\n 255 * (l + a * (E * cosh)),\n this.opacity\n );\n }\n}));\n","import {cubehelix as colorCubehelix} from \"d3-color\";\nimport color, {hue} from \"./color.js\";\n\nfunction cubehelix(hue) {\n return (function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function(t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n\n return cubehelix;\n })(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);\n","export default function(interpolator, n) {\n var samples = new Array(n);\n for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));\n return samples;\n}\n","import { toNumber, peek, hasOwnProperty, toSet, array, constant, isNumber, span, isObject, isString, error, isArray } from 'vega-util';\nimport { bisectRight, range, bisect } from 'd3-array';\nimport { scaleOrdinal, tickFormat as tickFormat$1, scaleIdentity, scaleLinear, scaleLog, scalePow, scaleSqrt, scaleSymlog, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, scaleQuantile, scaleQuantize, scaleThreshold } from 'd3-scale';\nexport { scaleImplicit } from 'd3-scale';\nimport * as $ from 'd3-interpolate';\nimport { piecewise } from 'd3-interpolate';\nimport { timeInterval, utcInterval } from 'vega-time';\n\nfunction bandSpace (count, paddingInner, paddingOuter) {\n const space = count - paddingInner + paddingOuter * 2;\n return count ? space > 0 ? space : 1 : 0;\n}\n\nconst Identity = 'identity';\nconst Linear = 'linear';\nconst Log = 'log';\nconst Pow = 'pow';\nconst Sqrt = 'sqrt';\nconst Symlog = 'symlog';\nconst Time = 'time';\nconst UTC = 'utc';\nconst Sequential = 'sequential';\nconst Diverging = 'diverging';\nconst Quantile = 'quantile';\nconst Quantize = 'quantize';\nconst Threshold = 'threshold';\nconst Ordinal = 'ordinal';\nconst Point = 'point';\nconst Band = 'band';\nconst BinOrdinal = 'bin-ordinal'; // categories\n\nconst Continuous = 'continuous';\nconst Discrete = 'discrete';\nconst Discretizing = 'discretizing';\nconst Interpolating = 'interpolating';\nconst Temporal = 'temporal';\n\nfunction invertRange (scale) {\n return function (_) {\n let lo = _[0],\n hi = _[1],\n t;\n\n if (hi < lo) {\n t = lo;\n lo = hi;\n hi = t;\n }\n\n return [scale.invert(lo), scale.invert(hi)];\n };\n}\n\nfunction invertRangeExtent (scale) {\n return function (_) {\n const range = scale.range();\n let lo = _[0],\n hi = _[1],\n min = -1,\n max,\n t,\n i,\n n;\n\n if (hi < lo) {\n t = lo;\n lo = hi;\n hi = t;\n }\n\n for (i = 0, n = range.length; i < n; ++i) {\n if (range[i] >= lo && range[i] <= hi) {\n if (min < 0) min = i;\n max = i;\n }\n }\n\n if (min < 0) return undefined;\n lo = scale.invertExtent(range[min]);\n hi = scale.invertExtent(range[max]);\n return [lo[0] === undefined ? lo[1] : lo[0], hi[1] === undefined ? hi[0] : hi[1]];\n };\n}\n\nfunction band() {\n const scale = scaleOrdinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range;\n let range$1 = [0, 1],\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n delete scale.unknown;\n\n function rescale() {\n const n = domain().length,\n reverse = range$1[1] < range$1[0],\n stop = range$1[1 - reverse],\n space = bandSpace(n, paddingInner, paddingOuter);\n let start = range$1[reverse - 0];\n step = (stop - start) / (space || 1);\n\n if (round) {\n step = Math.floor(step);\n }\n\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n\n if (round) {\n start = Math.round(start);\n bandwidth = Math.round(bandwidth);\n }\n\n const values = range(n).map(i => start + step * i);\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function (_) {\n if (arguments.length) {\n domain(_);\n return rescale();\n } else {\n return domain();\n }\n };\n\n scale.range = function (_) {\n if (arguments.length) {\n range$1 = [+_[0], +_[1]];\n return rescale();\n } else {\n return range$1.slice();\n }\n };\n\n scale.rangeRound = function (_) {\n range$1 = [+_[0], +_[1]];\n round = true;\n return rescale();\n };\n\n scale.bandwidth = function () {\n return bandwidth;\n };\n\n scale.step = function () {\n return step;\n };\n\n scale.round = function (_) {\n if (arguments.length) {\n round = !!_;\n return rescale();\n } else {\n return round;\n }\n };\n\n scale.padding = function (_) {\n if (arguments.length) {\n paddingOuter = Math.max(0, Math.min(1, _));\n paddingInner = paddingOuter;\n return rescale();\n } else {\n return paddingInner;\n }\n };\n\n scale.paddingInner = function (_) {\n if (arguments.length) {\n paddingInner = Math.max(0, Math.min(1, _));\n return rescale();\n } else {\n return paddingInner;\n }\n };\n\n scale.paddingOuter = function (_) {\n if (arguments.length) {\n paddingOuter = Math.max(0, Math.min(1, _));\n return rescale();\n } else {\n return paddingOuter;\n }\n };\n\n scale.align = function (_) {\n if (arguments.length) {\n align = Math.max(0, Math.min(1, _));\n return rescale();\n } else {\n return align;\n }\n };\n\n scale.invertRange = function (_) {\n // bail if range has null or undefined values\n if (_[0] == null || _[1] == null) return;\n const reverse = range$1[1] < range$1[0],\n values = reverse ? ordinalRange().reverse() : ordinalRange(),\n n = values.length - 1;\n let lo = +_[0],\n hi = +_[1],\n a,\n b,\n t; // bail if either range endpoint is invalid\n\n if (lo !== lo || hi !== hi) return; // order range inputs, bail if outside of scale range\n\n if (hi < lo) {\n t = lo;\n lo = hi;\n hi = t;\n }\n\n if (hi < values[0] || lo > range$1[1 - reverse]) return; // binary search to index into scale range\n\n a = Math.max(0, bisectRight(values, lo) - 1);\n b = lo === hi ? a : bisectRight(values, hi) - 1; // increment index a if lo is within padding gap\n\n if (lo - values[a] > bandwidth + 1e-10) ++a;\n\n if (reverse) {\n // map + swap\n t = a;\n a = n - b;\n b = n - t;\n }\n\n return a > b ? undefined : domain().slice(a, b + 1);\n };\n\n scale.invert = function (_) {\n const value = scale.invertRange([_, _]);\n return value ? value[0] : value;\n };\n\n scale.copy = function () {\n return band().domain(domain()).range(range$1).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);\n };\n\n return rescale();\n}\n\nfunction pointish(scale) {\n const copy = scale.copy;\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n\n scale.copy = function () {\n return pointish(copy());\n };\n\n return scale;\n}\n\nfunction point() {\n return pointish(band().paddingInner(1));\n}\n\nvar map = Array.prototype.map;\nfunction numbers(_) {\n return map.call(_, toNumber);\n}\n\nconst slice = Array.prototype.slice;\n\nfunction scaleBinOrdinal() {\n let domain = [],\n range = [];\n\n function scale(x) {\n return x == null || x !== x ? undefined : range[(bisect(domain, x) - 1) % range.length];\n }\n\n scale.domain = function (_) {\n if (arguments.length) {\n domain = numbers(_);\n return scale;\n } else {\n return domain.slice();\n }\n };\n\n scale.range = function (_) {\n if (arguments.length) {\n range = slice.call(_);\n return scale;\n } else {\n return range.slice();\n }\n };\n\n scale.tickFormat = function (count, specifier) {\n return tickFormat$1(domain[0], peek(domain), count == null ? 10 : count, specifier);\n };\n\n scale.copy = function () {\n return scaleBinOrdinal().domain(scale.domain()).range(scale.range());\n };\n\n return scale;\n}\n\nconst scales = {};\n/**\n * Augment scales with their type and needed inverse methods.\n */\n\nfunction create(type, constructor, metadata) {\n const ctr = function scale() {\n const s = constructor();\n\n if (!s.invertRange) {\n s.invertRange = s.invert ? invertRange(s) : s.invertExtent ? invertRangeExtent(s) : undefined;\n }\n\n s.type = type;\n return s;\n };\n\n ctr.metadata = toSet(array(metadata));\n return ctr;\n}\n\nfunction scale(type, scale, metadata) {\n if (arguments.length > 1) {\n scales[type] = create(type, scale, metadata);\n return this;\n } else {\n return isValidScaleType(type) ? scales[type] : undefined;\n }\n} // identity scale\n\nscale(Identity, scaleIdentity); // continuous scales\n\nscale(Linear, scaleLinear, Continuous);\nscale(Log, scaleLog, [Continuous, Log]);\nscale(Pow, scalePow, Continuous);\nscale(Sqrt, scaleSqrt, Continuous);\nscale(Symlog, scaleSymlog, Continuous);\nscale(Time, scaleTime, [Continuous, Temporal]);\nscale(UTC, scaleUtc, [Continuous, Temporal]); // sequential scales\n\nscale(Sequential, scaleSequential, [Continuous, Interpolating]); // backwards compat\n\nscale(\"\".concat(Sequential, \"-\").concat(Linear), scaleSequential, [Continuous, Interpolating]);\nscale(\"\".concat(Sequential, \"-\").concat(Log), scaleSequentialLog, [Continuous, Interpolating, Log]);\nscale(\"\".concat(Sequential, \"-\").concat(Pow), scaleSequentialPow, [Continuous, Interpolating]);\nscale(\"\".concat(Sequential, \"-\").concat(Sqrt), scaleSequentialSqrt, [Continuous, Interpolating]);\nscale(\"\".concat(Sequential, \"-\").concat(Symlog), scaleSequentialSymlog, [Continuous, Interpolating]); // diverging scales\n\nscale(\"\".concat(Diverging, \"-\").concat(Linear), scaleDiverging, [Continuous, Interpolating]);\nscale(\"\".concat(Diverging, \"-\").concat(Log), scaleDivergingLog, [Continuous, Interpolating, Log]);\nscale(\"\".concat(Diverging, \"-\").concat(Pow), scaleDivergingPow, [Continuous, Interpolating]);\nscale(\"\".concat(Diverging, \"-\").concat(Sqrt), scaleDivergingSqrt, [Continuous, Interpolating]);\nscale(\"\".concat(Diverging, \"-\").concat(Symlog), scaleDivergingSymlog, [Continuous, Interpolating]); // discretizing scales\n\nscale(Quantile, scaleQuantile, [Discretizing, Quantile]);\nscale(Quantize, scaleQuantize, Discretizing);\nscale(Threshold, scaleThreshold, Discretizing); // discrete scales\n\nscale(BinOrdinal, scaleBinOrdinal, [Discrete, Discretizing]);\nscale(Ordinal, scaleOrdinal, Discrete);\nscale(Band, band, Discrete);\nscale(Point, point, Discrete);\nfunction isValidScaleType(type) {\n return hasOwnProperty(scales, type);\n}\n\nfunction hasType(key, type) {\n const s = scales[key];\n return s && s.metadata[type];\n}\n\nfunction isContinuous(key) {\n return hasType(key, Continuous);\n}\nfunction isDiscrete(key) {\n return hasType(key, Discrete);\n}\nfunction isDiscretizing(key) {\n return hasType(key, Discretizing);\n}\nfunction isLogarithmic(key) {\n return hasType(key, Log);\n}\nfunction isTemporal(key) {\n return hasType(key, Temporal);\n}\nfunction isInterpolating(key) {\n return hasType(key, Interpolating);\n}\nfunction isQuantile(key) {\n return hasType(key, Quantile);\n}\n\nconst scaleProps = ['clamp', 'base', 'constant', 'exponent'];\nfunction interpolateRange(interpolator, range) {\n const start = range[0],\n span = peek(range) - start;\n return function (i) {\n return interpolator(start + i * span);\n };\n}\nfunction interpolateColors(colors, type, gamma) {\n return piecewise(interpolate(type || 'rgb', gamma), colors);\n}\nfunction quantizeInterpolator(interpolator, count) {\n const samples = new Array(count),\n n = count + 1;\n\n for (let i = 0; i < count;) samples[i] = interpolator(++i / n);\n\n return samples;\n}\nfunction scaleCopy(scale) {\n const t = scale.type,\n s = scale.copy();\n s.type = t;\n return s;\n}\nfunction scaleFraction(scale$1, min, max) {\n const delta = max - min;\n let i, t, s;\n\n if (!delta || !Number.isFinite(delta)) {\n return constant(0.5);\n } else {\n i = (t = scale$1.type).indexOf('-');\n t = i < 0 ? t : t.slice(i + 1);\n s = scale(t)().domain([min, max]).range([0, 1]);\n scaleProps.forEach(m => scale$1[m] ? s[m](scale$1[m]()) : 0);\n return s;\n }\n}\nfunction interpolate(type, gamma) {\n const interp = $[method(type)];\n return gamma != null && interp && interp.gamma ? interp.gamma(gamma) : interp;\n}\n\nfunction method(type) {\n return 'interpolate' + type.toLowerCase().split('-').map(s => s[0].toUpperCase() + s.slice(1)).join('');\n}\n\nconst continuous = {\n blues: 'cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90',\n greens: 'd3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429',\n greys: 'e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e',\n oranges: 'fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303',\n purples: 'e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c',\n reds: 'fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13',\n blueGreen: 'd5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429',\n bluePurple: 'ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71',\n greenBlue: 'd3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1',\n orangeRed: 'fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403',\n purpleBlue: 'dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281',\n purpleBlueGreen: 'dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353',\n purpleRed: 'dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a',\n redPurple: 'fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174',\n yellowGreen: 'e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034',\n yellowOrangeBrown: 'feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204',\n yellowOrangeRed: 'fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225',\n blueOrange: '134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07',\n brownBlueGreen: '704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147',\n purpleGreen: '5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29',\n purpleOrange: '4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07',\n redBlue: '8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85',\n redGrey: '8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434',\n yellowGreenBlue: 'eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185',\n redYellowBlue: 'a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695',\n redYellowGreen: 'a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837',\n pinkYellowGreen: '8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419',\n spectral: '9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2',\n viridis: '440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725',\n magma: '0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf',\n inferno: '0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4',\n plasma: '0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921',\n cividis: '00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647',\n rainbow: '6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa',\n sinebow: 'ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040',\n turbo: '23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00',\n browns: 'eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632',\n tealBlues: 'bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985',\n teals: 'bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667',\n warmGreys: 'dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e',\n goldGreen: 'f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36',\n goldOrange: 'f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26',\n goldRed: 'f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e',\n lightGreyRed: 'efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b',\n lightGreyTeal: 'e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc',\n lightMulti: 'e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c',\n lightOrange: 'f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b',\n lightTealBlue: 'e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988',\n darkBlue: '3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff',\n darkGold: '3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff',\n darkGreen: '3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa',\n darkMulti: '3737371f5287197d8c29a86995ce3fffe800ffffff',\n darkRed: '3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c'\n};\nconst discrete = {\n category10: '1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf',\n category20: '1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5',\n category20b: '393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6',\n category20c: '3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9',\n tableau10: '4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac',\n tableau20: '4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5',\n accent: '7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666',\n dark2: '1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666',\n paired: 'a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928',\n pastel1: 'fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2',\n pastel2: 'b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc',\n set1: 'e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999',\n set2: '66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3',\n set3: '8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f'\n};\n\nfunction colors(palette) {\n const n = palette.length / 6 | 0,\n c = new Array(n);\n\n for (let i = 0; i < n;) {\n c[i] = '#' + palette.slice(i * 6, ++i * 6);\n }\n\n return c;\n}\n\nfunction apply(_, f) {\n for (const k in _) scheme(k, f(_[k]));\n}\n\nconst schemes = {};\napply(discrete, colors);\napply(continuous, _ => interpolateColors(colors(_)));\nfunction scheme(name, scheme) {\n name = name && name.toLowerCase();\n\n if (arguments.length > 1) {\n schemes[name] = scheme;\n return this;\n } else {\n return schemes[name];\n }\n}\n\nconst SymbolLegend = 'symbol';\nconst DiscreteLegend = 'discrete';\nconst GradientLegend = 'gradient';\n\nconst defaultFormatter = value => isArray(value) ? value.map(v => String(v)) : String(value);\n\nconst ascending = (a, b) => a[1] - b[1];\n\nconst descending = (a, b) => b[1] - a[1];\n/**\n * Determine the tick count or interval function.\n * @param {Scale} scale - The scale for which to generate tick values.\n * @param {*} count - The desired tick count or interval specifier.\n * @param {number} minStep - The desired minimum step between tick values.\n * @return {*} - The tick count or interval function.\n */\n\n\nfunction tickCount(scale, count, minStep) {\n let step;\n\n if (isNumber(count)) {\n if (scale.bins) {\n count = Math.max(count, scale.bins.length);\n }\n\n if (minStep != null) {\n count = Math.min(count, Math.floor(span(scale.domain()) / minStep || 1));\n }\n }\n\n if (isObject(count)) {\n step = count.step;\n count = count.interval;\n }\n\n if (isString(count)) {\n count = scale.type === Time ? timeInterval(count) : scale.type == UTC ? utcInterval(count) : error('Only time and utc scales accept interval strings.');\n if (step) count = count.every(step);\n }\n\n return count;\n}\n/**\n * Filter a set of candidate tick values, ensuring that only tick values\n * that lie within the scale range are included.\n * @param {Scale} scale - The scale for which to generate tick values.\n * @param {Array<*>} ticks - The candidate tick values.\n * @param {*} count - The tick count or interval function.\n * @return {Array<*>} - The filtered tick values.\n */\n\nfunction validTicks(scale, ticks, count) {\n let range = scale.range(),\n lo = range[0],\n hi = peek(range),\n cmp = ascending;\n\n if (lo > hi) {\n range = hi;\n hi = lo;\n lo = range;\n cmp = descending;\n }\n\n lo = Math.floor(lo);\n hi = Math.ceil(hi); // filter ticks to valid values within the range\n // additionally sort ticks in range order (#2579)\n\n ticks = ticks.map(v => [v, scale(v)]).filter(_ => lo <= _[1] && _[1] <= hi).sort(cmp).map(_ => _[0]);\n\n if (count > 0 && ticks.length > 1) {\n const endpoints = [ticks[0], peek(ticks)];\n\n while (ticks.length > count && ticks.length >= 3) {\n ticks = ticks.filter((_, i) => !(i % 2));\n }\n\n if (ticks.length < 3) {\n ticks = endpoints;\n }\n }\n\n return ticks;\n}\n/**\n * Generate tick values for the given scale and approximate tick count or\n * interval value. If the scale has a 'ticks' method, it will be used to\n * generate the ticks, with the count argument passed as a parameter. If the\n * scale lacks a 'ticks' method, the full scale domain will be returned.\n * @param {Scale} scale - The scale for which to generate tick values.\n * @param {*} [count] - The approximate number of desired ticks.\n * @return {Array<*>} - The generated tick values.\n */\n\nfunction tickValues(scale, count) {\n return scale.bins ? validTicks(scale, scale.bins) : scale.ticks ? scale.ticks(count) : scale.domain();\n}\n/**\n * Generate a label format function for a scale. If the scale has a\n * 'tickFormat' method, it will be used to generate the formatter, with the\n * count and specifier arguments passed as parameters. If the scale lacks a\n * 'tickFormat' method, the returned formatter performs simple string coercion.\n * If the input scale is a logarithmic scale and the format specifier does not\n * indicate a desired decimal precision, a special variable precision formatter\n * that automatically trims trailing zeroes will be generated.\n * @param {Scale} scale - The scale for which to generate the label formatter.\n * @param {*} [count] - The approximate number of desired ticks.\n * @param {string} [specifier] - The format specifier. Must be a legal d3\n * specifier string (see https://github.com/d3/d3-format#formatSpecifier) or\n * time multi-format specifier object.\n * @return {function(*):string} - The generated label formatter.\n */\n\nfunction tickFormat(locale, scale, count, specifier, formatType, noSkip) {\n const type = scale.type;\n let format = defaultFormatter;\n\n if (type === Time || formatType === Time) {\n format = locale.timeFormat(specifier);\n } else if (type === UTC || formatType === UTC) {\n format = locale.utcFormat(specifier);\n } else if (isLogarithmic(type)) {\n const varfmt = locale.formatFloat(specifier);\n\n if (noSkip || scale.bins) {\n format = varfmt;\n } else {\n const test = tickLog(scale, count, false);\n\n format = _ => test(_) ? varfmt(_) : '';\n }\n } else if (scale.tickFormat) {\n // if d3 scale has tickFormat, it must be continuous\n const d = scale.domain();\n format = locale.formatSpan(d[0], d[d.length - 1], count, specifier);\n } else if (specifier) {\n format = locale.format(specifier);\n }\n\n return format;\n}\nfunction tickLog(scale, count, values) {\n const ticks = tickValues(scale, count),\n base = scale.base(),\n logb = Math.log(base),\n k = Math.max(1, base * count / ticks.length); // apply d3-scale's log format filter criteria\n\n const test = d => {\n let i = d / Math.pow(base, Math.round(Math.log(d) / logb));\n if (i * base < base - 0.5) i *= base;\n return i <= k;\n };\n\n return values ? ticks.filter(test) : test;\n}\n\nconst symbols = {\n [Quantile]: 'quantiles',\n [Quantize]: 'thresholds',\n [Threshold]: 'domain'\n};\nconst formats = {\n [Quantile]: 'quantiles',\n [Quantize]: 'domain'\n};\nfunction labelValues(scale, count) {\n return scale.bins ? binValues(scale.bins) : scale.type === Log ? tickLog(scale, count, true) : symbols[scale.type] ? thresholdValues(scale[symbols[scale.type]]()) : tickValues(scale, count);\n}\nfunction thresholdFormat(locale, scale, specifier) {\n const _ = scale[formats[scale.type]](),\n n = _.length;\n\n let d = n > 1 ? _[1] - _[0] : _[0],\n i;\n\n for (i = 1; i < n; ++i) {\n d = Math.min(d, _[i] - _[i - 1]);\n } // tickCount = 3 ticks times 10 for increased resolution\n\n\n return locale.formatSpan(0, d, 3 * 10, specifier);\n}\n\nfunction thresholdValues(thresholds) {\n const values = [-Infinity].concat(thresholds);\n values.max = +Infinity;\n return values;\n}\n\nfunction binValues(bins) {\n const values = bins.slice(0, -1);\n values.max = peek(bins);\n return values;\n}\n\nconst isDiscreteRange = scale => symbols[scale.type] || scale.bins;\n\nfunction labelFormat(locale, scale, count, type, specifier, formatType, noSkip) {\n const format = formats[scale.type] && formatType !== Time && formatType !== UTC ? thresholdFormat(locale, scale, specifier) : tickFormat(locale, scale, count, specifier, formatType, noSkip);\n return type === SymbolLegend && isDiscreteRange(scale) ? formatRange(format) : type === DiscreteLegend ? formatDiscrete(format) : formatPoint(format);\n}\n\nconst formatRange = format => (value, index, array) => {\n const limit = get(array[index + 1], get(array.max, +Infinity)),\n lo = formatValue(value, format),\n hi = formatValue(limit, format);\n return lo && hi ? lo + ' \\u2013 ' + hi : hi ? '< ' + hi : '\\u2265 ' + lo;\n};\n\nconst get = (value, dflt) => value != null ? value : dflt;\n\nconst formatDiscrete = format => (value, index) => index ? format(value) : null;\n\nconst formatPoint = format => value => format(value);\n\nconst formatValue = (value, format) => Number.isFinite(value) ? format(value) : null;\n\nfunction labelFraction(scale) {\n const domain = scale.domain(),\n count = domain.length - 1;\n let lo = +domain[0],\n hi = +peek(domain),\n span = hi - lo;\n\n if (scale.type === Threshold) {\n const adjust = count ? span / count : 0.1;\n lo -= adjust;\n hi += adjust;\n span = hi - lo;\n }\n\n return value => (value - lo) / span;\n}\n\nfunction format(locale, scale, specifier, formatType) {\n const type = formatType || scale.type; // replace abbreviated time specifiers to improve screen reader experience\n\n if (isString(specifier) && isTemporal(type)) {\n specifier = specifier.replace(/%a/g, '%A').replace(/%b/g, '%B');\n }\n\n return !specifier && type === Time ? locale.timeFormat('%A, %d %B %Y, %X') : !specifier && type === UTC ? locale.utcFormat('%A, %d %B %Y, %X UTC') : labelFormat(locale, scale, 5, null, specifier, formatType, true);\n}\n\nfunction domainCaption(locale, scale, opt) {\n opt = opt || {};\n const max = Math.max(3, opt.maxlen || 7),\n fmt = format(locale, scale, opt.format, opt.formatType); // if scale breaks domain into bins, describe boundaries\n\n if (isDiscretizing(scale.type)) {\n const v = labelValues(scale).slice(1).map(fmt),\n n = v.length;\n return \"\".concat(n, \" boundar\").concat(n === 1 ? 'y' : 'ies', \": \").concat(v.join(', '));\n } // if scale domain is discrete, list values\n else if (isDiscrete(scale.type)) {\n const d = scale.domain(),\n n = d.length,\n v = n > max ? d.slice(0, max - 2).map(fmt).join(', ') + ', ending with ' + d.slice(-1).map(fmt) : d.map(fmt).join(', ');\n return \"\".concat(n, \" value\").concat(n === 1 ? '' : 's', \": \").concat(v);\n } // if scale domain is continuous, describe value range\n else {\n const d = scale.domain();\n return \"values from \".concat(fmt(d[0]), \" to \").concat(fmt(peek(d)));\n }\n}\n\nexport { Band, BinOrdinal, DiscreteLegend, Diverging, GradientLegend, Identity, Linear, Log, Ordinal, Point, Pow, Quantile, Quantize, Sequential, Sqrt, SymbolLegend, Symlog, Threshold, Time, UTC, bandSpace, domainCaption, interpolate, interpolateColors, interpolateRange, isContinuous, isDiscrete, isDiscretizing, isInterpolating, isLogarithmic, isQuantile, isTemporal, isValidScaleType, labelFormat, labelFraction, labelValues, quantizeInterpolator, scale, scaleCopy, scaleFraction, scheme, tickCount, tickFormat, tickValues, validTicks };\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import {linearish} from \"./linear.js\";\nimport number from \"./number.js\";\n\nexport default function identity(domain) {\n var unknown;\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : x;\n }\n\n scale.invert = scale;\n\n scale.domain = scale.range = function(_) {\n return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return identity(domain).unknown(unknown);\n };\n\n domain = arguments.length ? Array.from(domain, number) : [0, 1];\n\n return linearish(scale);\n}\n","import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcTicks, utcTickInterval} from \"d3-time\";\nimport {utcFormat} from \"d3-time-format\";\nimport {calendar} from \"./time.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function utcTime() {\n return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);\n}\n","import {ascending, bisect, quantileSorted as threshold} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantile() {\n var domain = [],\n range = [],\n thresholds = [],\n unknown;\n\n function rescale() {\n var i = 0, n = Math.max(1, range.length);\n thresholds = new Array(n - 1);\n while (++i < n) thresholds[i - 1] = threshold(domain, i / n);\n return scale;\n }\n\n function scale(x) {\n return x == null || isNaN(x = +x) ? unknown : range[bisect(thresholds, x)];\n }\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN] : [\n i > 0 ? thresholds[i - 1] : domain[0],\n i < thresholds.length ? thresholds[i] : domain[domain.length - 1]\n ];\n };\n\n scale.domain = function(_) {\n if (!arguments.length) return domain.slice();\n domain = [];\n for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d);\n domain.sort(ascending);\n return rescale();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), rescale()) : range.slice();\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.quantiles = function() {\n return thresholds.slice();\n };\n\n scale.copy = function() {\n return quantile()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {linearish} from \"./linear.js\";\nimport {initRange} from \"./init.js\";\n\nexport default function quantize() {\n var x0 = 0,\n x1 = 1,\n n = 1,\n domain = [0.5],\n range = [0, 1],\n unknown;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n function rescale() {\n var i = -1;\n domain = new Array(n);\n while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);\n return scale;\n }\n\n scale.domain = function(_) {\n return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1];\n };\n\n scale.range = function(_) {\n return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return i < 0 ? [NaN, NaN]\n : i < 1 ? [x0, domain[0]]\n : i >= n ? [domain[n - 1], x1]\n : [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : scale;\n };\n\n scale.thresholds = function() {\n return domain.slice();\n };\n\n scale.copy = function() {\n return quantize()\n .domain([x0, x1])\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(linearish(scale), arguments);\n}\n","import {bisect} from \"d3-array\";\nimport {initRange} from \"./init.js\";\n\nexport default function threshold() {\n var domain = [0.5],\n range = [0, 1],\n unknown,\n n = 1;\n\n function scale(x) {\n return x != null && x <= x ? range[bisect(domain, x, 0, n)] : unknown;\n }\n\n scale.domain = function(_) {\n return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();\n };\n\n scale.range = function(_) {\n return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();\n };\n\n scale.invertExtent = function(y) {\n var i = range.indexOf(y);\n return [domain[i - 1], domain[i]];\n };\n\n scale.unknown = function(_) {\n return arguments.length ? (unknown = _, scale) : unknown;\n };\n\n scale.copy = function() {\n return threshold()\n .domain(domain)\n .range(range)\n .unknown(unknown);\n };\n\n return initRange.apply(scale, arguments);\n}\n","import { hasOwnProperty, isFunction, inherits, truthy, lruCache, isArray, error, toSet, array, peek, extend, isNumber, isObject } from 'vega-util';\nimport { curveBasis, curveBasisClosed, curveBasisOpen, curveBundle, curveCardinal, curveCardinalOpen, curveCardinalClosed, curveCatmullRom, curveCatmullRomClosed, curveCatmullRomOpen, curveLinear, curveLinearClosed, curveMonotoneY, curveMonotoneX, curveNatural, curveStep, curveStepAfter, curveStepBefore, arc as arc$2, area as area$2, line as line$2, symbol as symbol$2 } from 'd3-shape';\nimport { path as path$3 } from 'd3-path';\nimport { image as image$1, canvas } from 'vega-canvas';\nimport { loader } from 'vega-loader';\nimport { isDiscrete, domainCaption } from 'vega-scale';\n\nlet gradient_id = 0;\nfunction resetSVGGradientId() {\n gradient_id = 0;\n}\nconst patternPrefix = 'p_';\nfunction isGradient(value) {\n return value && value.gradient;\n}\nfunction gradientRef(g, defs, base) {\n const type = g.gradient;\n let id = g.id,\n prefix = type === 'radial' ? patternPrefix : ''; // check id, assign default values as needed\n\n if (!id) {\n id = g.id = 'gradient_' + gradient_id++;\n\n if (type === 'radial') {\n g.x1 = get(g.x1, 0.5);\n g.y1 = get(g.y1, 0.5);\n g.r1 = get(g.r1, 0);\n g.x2 = get(g.x2, 0.5);\n g.y2 = get(g.y2, 0.5);\n g.r2 = get(g.r2, 0.5);\n prefix = patternPrefix;\n } else {\n g.x1 = get(g.x1, 0);\n g.y1 = get(g.y1, 0);\n g.x2 = get(g.x2, 1);\n g.y2 = get(g.y2, 0);\n }\n } // register definition\n\n\n defs[id] = g; // return url reference\n\n return 'url(' + (base || '') + '#' + prefix + id + ')';\n}\n\nfunction get(val, def) {\n return val != null ? val : def;\n}\n\nfunction Gradient (p0, p1) {\n var stops = [],\n gradient;\n return gradient = {\n gradient: 'linear',\n x1: p0 ? p0[0] : 0,\n y1: p0 ? p0[1] : 0,\n x2: p1 ? p1[0] : 1,\n y2: p1 ? p1[1] : 0,\n stops: stops,\n stop: function (offset, color) {\n stops.push({\n offset: offset,\n color: color\n });\n return gradient;\n }\n };\n}\n\nconst lookup = {\n 'basis': {\n curve: curveBasis\n },\n 'basis-closed': {\n curve: curveBasisClosed\n },\n 'basis-open': {\n curve: curveBasisOpen\n },\n 'bundle': {\n curve: curveBundle,\n tension: 'beta',\n value: 0.85\n },\n 'cardinal': {\n curve: curveCardinal,\n tension: 'tension',\n value: 0\n },\n 'cardinal-open': {\n curve: curveCardinalOpen,\n tension: 'tension',\n value: 0\n },\n 'cardinal-closed': {\n curve: curveCardinalClosed,\n tension: 'tension',\n value: 0\n },\n 'catmull-rom': {\n curve: curveCatmullRom,\n tension: 'alpha',\n value: 0.5\n },\n 'catmull-rom-closed': {\n curve: curveCatmullRomClosed,\n tension: 'alpha',\n value: 0.5\n },\n 'catmull-rom-open': {\n curve: curveCatmullRomOpen,\n tension: 'alpha',\n value: 0.5\n },\n 'linear': {\n curve: curveLinear\n },\n 'linear-closed': {\n curve: curveLinearClosed\n },\n 'monotone': {\n horizontal: curveMonotoneY,\n vertical: curveMonotoneX\n },\n 'natural': {\n curve: curveNatural\n },\n 'step': {\n curve: curveStep\n },\n 'step-after': {\n curve: curveStepAfter\n },\n 'step-before': {\n curve: curveStepBefore\n }\n};\nfunction curves(type, orientation, tension) {\n var entry = hasOwnProperty(lookup, type) && lookup[type],\n curve = null;\n\n if (entry) {\n curve = entry.curve || entry[orientation || 'vertical'];\n\n if (entry.tension && tension != null) {\n curve = curve[entry.tension](tension);\n }\n }\n\n return curve;\n}\n\n// Path parsing and rendering code adapted from fabric.js -- Thanks!\nconst cmdlen = {\n m: 2,\n l: 2,\n h: 1,\n v: 1,\n c: 6,\n s: 4,\n q: 4,\n t: 2,\n a: 7\n},\n regexp = [/([MLHVCSQTAZmlhvcsqtaz])/g, /###/, /(\\.\\d+)(\\.\\d)/g, /(\\d)([-+])/g, /\\s|,|###/];\nfunction pathParse (pathstr) {\n const result = [];\n let curr, chunks, parsed, param, cmd, len, i, j, n, m; // First, break path into command sequence\n\n const path = pathstr.slice().replace(regexp[0], '###$1').split(regexp[1]).slice(1); // Next, parse each command in turn\n\n for (i = 0, n = path.length; i < n; ++i) {\n curr = path[i];\n chunks = curr.slice(1).trim().replace(regexp[2], '$1###$2').replace(regexp[3], '$1###$2').split(regexp[4]);\n cmd = curr.charAt(0);\n parsed = [cmd];\n\n for (j = 0, m = chunks.length; j < m; ++j) {\n if ((param = +chunks[j]) === param) {\n // not NaN\n parsed.push(param);\n }\n }\n\n len = cmdlen[cmd.toLowerCase()];\n\n if (parsed.length - 1 > len) {\n const m = parsed.length;\n j = 1;\n result.push([cmd].concat(parsed.slice(j, j += len))); // handle implicit lineTo (#2803)\n\n cmd = cmd === 'M' ? 'L' : cmd === 'm' ? 'l' : cmd;\n\n for (; j < m; j += len) {\n result.push([cmd].concat(parsed.slice(j, j + len)));\n }\n } else {\n result.push(parsed);\n }\n }\n\n return result;\n}\n\nconst DegToRad = Math.PI / 180;\nconst Epsilon = 1e-14;\nconst HalfPi = Math.PI / 2;\nconst Tau = Math.PI * 2;\nconst HalfSqrt3 = Math.sqrt(3) / 2;\n\nvar segmentCache = {};\nvar bezierCache = {};\nvar join = [].join; // Copied from Inkscape svgtopdf, thanks!\n\nfunction segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {\n const key = join.call(arguments);\n\n if (segmentCache[key]) {\n return segmentCache[key];\n }\n\n const th = rotateX * DegToRad;\n const sin_th = Math.sin(th);\n const cos_th = Math.cos(th);\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n const px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;\n const py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;\n let pl = px * px / (rx * rx) + py * py / (ry * ry);\n\n if (pl > 1) {\n pl = Math.sqrt(pl);\n rx *= pl;\n ry *= pl;\n }\n\n const a00 = cos_th / rx;\n const a01 = sin_th / rx;\n const a10 = -sin_th / ry;\n const a11 = cos_th / ry;\n const x0 = a00 * ox + a01 * oy;\n const y0 = a10 * ox + a11 * oy;\n const x1 = a00 * x + a01 * y;\n const y1 = a10 * x + a11 * y;\n const d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);\n let sfactor_sq = 1 / d - 0.25;\n if (sfactor_sq < 0) sfactor_sq = 0;\n let sfactor = Math.sqrt(sfactor_sq);\n if (sweep == large) sfactor = -sfactor;\n const xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);\n const yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);\n const th0 = Math.atan2(y0 - yc, x0 - xc);\n const th1 = Math.atan2(y1 - yc, x1 - xc);\n let th_arc = th1 - th0;\n\n if (th_arc < 0 && sweep === 1) {\n th_arc += Tau;\n } else if (th_arc > 0 && sweep === 0) {\n th_arc -= Tau;\n }\n\n const segs = Math.ceil(Math.abs(th_arc / (HalfPi + 0.001)));\n const result = [];\n\n for (let i = 0; i < segs; ++i) {\n const th2 = th0 + i * th_arc / segs;\n const th3 = th0 + (i + 1) * th_arc / segs;\n result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th];\n }\n\n return segmentCache[key] = result;\n}\nfunction bezier(params) {\n const key = join.call(params);\n\n if (bezierCache[key]) {\n return bezierCache[key];\n }\n\n var cx = params[0],\n cy = params[1],\n th0 = params[2],\n th1 = params[3],\n rx = params[4],\n ry = params[5],\n sin_th = params[6],\n cos_th = params[7];\n const a00 = cos_th * rx;\n const a01 = -sin_th * ry;\n const a10 = sin_th * rx;\n const a11 = cos_th * ry;\n const cos_th0 = Math.cos(th0);\n const sin_th0 = Math.sin(th0);\n const cos_th1 = Math.cos(th1);\n const sin_th1 = Math.sin(th1);\n const th_half = 0.5 * (th1 - th0);\n const sin_th_h2 = Math.sin(th_half * 0.5);\n const t = 8 / 3 * sin_th_h2 * sin_th_h2 / Math.sin(th_half);\n const x1 = cx + cos_th0 - t * sin_th0;\n const y1 = cy + sin_th0 + t * cos_th0;\n const x3 = cx + cos_th1;\n const y3 = cy + sin_th1;\n const x2 = x3 + t * sin_th1;\n const y2 = y3 - t * cos_th1;\n return bezierCache[key] = [a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3];\n}\n\nconst temp = ['l', 0, 0, 0, 0, 0, 0, 0];\n\nfunction scale$1(current, sX, sY) {\n const c = temp[0] = current[0];\n\n if (c === 'a' || c === 'A') {\n temp[1] = sX * current[1];\n temp[2] = sY * current[2];\n temp[3] = current[3];\n temp[4] = current[4];\n temp[5] = current[5];\n temp[6] = sX * current[6];\n temp[7] = sY * current[7];\n } else if (c === 'h' || c === 'H') {\n temp[1] = sX * current[1];\n } else if (c === 'v' || c === 'V') {\n temp[1] = sY * current[1];\n } else {\n for (var i = 1, n = current.length; i < n; ++i) {\n temp[i] = (i % 2 == 1 ? sX : sY) * current[i];\n }\n }\n\n return temp;\n}\n\nfunction pathRender (context, path, l, t, sX, sY) {\n var current,\n // current instruction\n previous = null,\n x = 0,\n // current x\n y = 0,\n // current y\n controlX = 0,\n // current control point x\n controlY = 0,\n // current control point y\n tempX,\n tempY,\n tempControlX,\n tempControlY;\n if (l == null) l = 0;\n if (t == null) t = 0;\n if (sX == null) sX = 1;\n if (sY == null) sY = sX;\n if (context.beginPath) context.beginPath();\n\n for (var i = 0, len = path.length; i < len; ++i) {\n current = path[i];\n\n if (sX !== 1 || sY !== 1) {\n current = scale$1(current, sX, sY);\n }\n\n switch (current[0]) {\n // first letter\n case 'l':\n // lineto, relative\n x += current[1];\n y += current[2];\n context.lineTo(x + l, y + t);\n break;\n\n case 'L':\n // lineto, absolute\n x = current[1];\n y = current[2];\n context.lineTo(x + l, y + t);\n break;\n\n case 'h':\n // horizontal lineto, relative\n x += current[1];\n context.lineTo(x + l, y + t);\n break;\n\n case 'H':\n // horizontal lineto, absolute\n x = current[1];\n context.lineTo(x + l, y + t);\n break;\n\n case 'v':\n // vertical lineto, relative\n y += current[1];\n context.lineTo(x + l, y + t);\n break;\n\n case 'V':\n // verical lineto, absolute\n y = current[1];\n context.lineTo(x + l, y + t);\n break;\n\n case 'm':\n // moveTo, relative\n x += current[1];\n y += current[2];\n context.moveTo(x + l, y + t);\n break;\n\n case 'M':\n // moveTo, absolute\n x = current[1];\n y = current[2];\n context.moveTo(x + l, y + t);\n break;\n\n case 'c':\n // bezierCurveTo, relative\n tempX = x + current[5];\n tempY = y + current[6];\n controlX = x + current[3];\n controlY = y + current[4];\n context.bezierCurveTo(x + current[1] + l, // x1\n y + current[2] + t, // y1\n controlX + l, // x2\n controlY + t, // y2\n tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'C':\n // bezierCurveTo, absolute\n x = current[5];\n y = current[6];\n controlX = current[3];\n controlY = current[4];\n context.bezierCurveTo(current[1] + l, current[2] + t, controlX + l, controlY + t, x + l, y + t);\n break;\n\n case 's':\n // shorthand cubic bezierCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[3];\n tempY = y + current[4]; // calculate reflection of previous control points\n\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n context.bezierCurveTo(controlX + l, controlY + t, x + current[1] + l, y + current[2] + t, tempX + l, tempY + t); // set control point to 2nd one of this command\n // the first control point is assumed to be the reflection of\n // the second control point on the previous command relative\n // to the current point.\n\n controlX = x + current[1];\n controlY = y + current[2];\n x = tempX;\n y = tempY;\n break;\n\n case 'S':\n // shorthand cubic bezierCurveTo, absolute\n tempX = current[3];\n tempY = current[4]; // calculate reflection of previous control points\n\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n context.bezierCurveTo(controlX + l, controlY + t, current[1] + l, current[2] + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY; // set control point to 2nd one of this command\n // the first control point is assumed to be the reflection of\n // the second control point on the previous command relative\n // to the current point.\n\n controlX = current[1];\n controlY = current[2];\n break;\n\n case 'q':\n // quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[3];\n tempY = y + current[4];\n controlX = x + current[1];\n controlY = y + current[2];\n context.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'Q':\n // quadraticCurveTo, absolute\n tempX = current[3];\n tempY = current[4];\n context.quadraticCurveTo(current[1] + l, current[2] + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n controlX = current[1];\n controlY = current[2];\n break;\n\n case 't':\n // shorthand quadraticCurveTo, relative\n // transform to absolute x,y\n tempX = x + current[1];\n tempY = y + current[2];\n\n if (previous[0].match(/[QqTt]/) === null) {\n // If there is no previous command or if the previous command was not a Q, q, T or t,\n // assume the control point is coincident with the current point\n controlX = x;\n controlY = y;\n } else if (previous[0] === 't') {\n // calculate reflection of previous control points for t\n controlX = 2 * x - tempControlX;\n controlY = 2 * y - tempControlY;\n } else if (previous[0] === 'q') {\n // calculate reflection of previous control points for q\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n }\n\n tempControlX = controlX;\n tempControlY = controlY;\n context.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n controlX = x + current[1];\n controlY = y + current[2];\n break;\n\n case 'T':\n tempX = current[1];\n tempY = current[2]; // calculate reflection of previous control points\n\n controlX = 2 * x - controlX;\n controlY = 2 * y - controlY;\n context.quadraticCurveTo(controlX + l, controlY + t, tempX + l, tempY + t);\n x = tempX;\n y = tempY;\n break;\n\n case 'a':\n drawArc(context, x + l, y + t, [current[1], current[2], current[3], current[4], current[5], current[6] + x + l, current[7] + y + t]);\n x += current[6];\n y += current[7];\n break;\n\n case 'A':\n drawArc(context, x + l, y + t, [current[1], current[2], current[3], current[4], current[5], current[6] + l, current[7] + t]);\n x = current[6];\n y = current[7];\n break;\n\n case 'z':\n case 'Z':\n context.closePath();\n break;\n }\n\n previous = current;\n }\n}\n\nfunction drawArc(context, x, y, coords) {\n const seg = segments(coords[5], // end x\n coords[6], // end y\n coords[0], // radius x\n coords[1], // radius y\n coords[3], // large flag\n coords[4], // sweep flag\n coords[2], // rotation\n x, y);\n\n for (let i = 0; i < seg.length; ++i) {\n const bez = bezier(seg[i]);\n context.bezierCurveTo(bez[0], bez[1], bez[2], bez[3], bez[4], bez[5]);\n }\n}\n\nconst Tan30 = 0.5773502691896257;\nconst builtins = {\n 'circle': {\n draw: function (context, size) {\n const r = Math.sqrt(size) / 2;\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, Tau);\n }\n },\n 'cross': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n s = r / 2.5;\n context.moveTo(-r, -s);\n context.lineTo(-r, s);\n context.lineTo(-s, s);\n context.lineTo(-s, r);\n context.lineTo(s, r);\n context.lineTo(s, s);\n context.lineTo(r, s);\n context.lineTo(r, -s);\n context.lineTo(s, -s);\n context.lineTo(s, -r);\n context.lineTo(-s, -r);\n context.lineTo(-s, -s);\n context.closePath();\n }\n },\n 'diamond': {\n draw: function (context, size) {\n const r = Math.sqrt(size) / 2;\n context.moveTo(-r, 0);\n context.lineTo(0, -r);\n context.lineTo(r, 0);\n context.lineTo(0, r);\n context.closePath();\n }\n },\n 'square': {\n draw: function (context, size) {\n var w = Math.sqrt(size),\n x = -w / 2;\n context.rect(x, x, w, w);\n }\n },\n 'arrow': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n s = r / 7,\n t = r / 2.5,\n v = r / 8;\n context.moveTo(-s, r);\n context.lineTo(s, r);\n context.lineTo(s, -v);\n context.lineTo(t, -v);\n context.lineTo(0, -r);\n context.lineTo(-t, -v);\n context.lineTo(-s, -v);\n context.closePath();\n }\n },\n 'wedge': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n h = HalfSqrt3 * r,\n o = h - r * Tan30,\n b = r / 4;\n context.moveTo(0, -h - o);\n context.lineTo(-b, h - o);\n context.lineTo(b, h - o);\n context.closePath();\n }\n },\n 'triangle': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n h = HalfSqrt3 * r,\n o = h - r * Tan30;\n context.moveTo(0, -h - o);\n context.lineTo(-r, h - o);\n context.lineTo(r, h - o);\n context.closePath();\n }\n },\n 'triangle-up': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n h = HalfSqrt3 * r;\n context.moveTo(0, -h);\n context.lineTo(-r, h);\n context.lineTo(r, h);\n context.closePath();\n }\n },\n 'triangle-down': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n h = HalfSqrt3 * r;\n context.moveTo(0, h);\n context.lineTo(-r, -h);\n context.lineTo(r, -h);\n context.closePath();\n }\n },\n 'triangle-right': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n h = HalfSqrt3 * r;\n context.moveTo(h, 0);\n context.lineTo(-h, -r);\n context.lineTo(-h, r);\n context.closePath();\n }\n },\n 'triangle-left': {\n draw: function (context, size) {\n var r = Math.sqrt(size) / 2,\n h = HalfSqrt3 * r;\n context.moveTo(-h, 0);\n context.lineTo(h, -r);\n context.lineTo(h, r);\n context.closePath();\n }\n },\n 'stroke': {\n draw: function (context, size) {\n const r = Math.sqrt(size) / 2;\n context.moveTo(-r, 0);\n context.lineTo(r, 0);\n }\n }\n};\nfunction symbols(_) {\n return hasOwnProperty(builtins, _) ? builtins[_] : customSymbol(_);\n}\nvar custom = {};\n\nfunction customSymbol(path) {\n if (!hasOwnProperty(custom, path)) {\n const parsed = pathParse(path);\n custom[path] = {\n draw: function (context, size) {\n pathRender(context, parsed, 0, 0, Math.sqrt(size) / 2);\n }\n };\n }\n\n return custom[path];\n}\n\nconst C = 0.448084975506; // C = 1 - c\n\nfunction rectangleX(d) {\n return d.x;\n}\n\nfunction rectangleY(d) {\n return d.y;\n}\n\nfunction rectangleWidth(d) {\n return d.width;\n}\n\nfunction rectangleHeight(d) {\n return d.height;\n}\n\nfunction number(_) {\n return typeof _ === 'function' ? _ : () => +_;\n}\n\nfunction clamp(value, min, max) {\n return Math.max(min, Math.min(value, max));\n}\n\nfunction vg_rect () {\n var x = rectangleX,\n y = rectangleY,\n width = rectangleWidth,\n height = rectangleHeight,\n crTL = number(0),\n crTR = crTL,\n crBL = crTL,\n crBR = crTL,\n context = null;\n\n function rectangle(_, x0, y0) {\n var buffer,\n x1 = x0 != null ? x0 : +x.call(this, _),\n y1 = y0 != null ? y0 : +y.call(this, _),\n w = +width.call(this, _),\n h = +height.call(this, _),\n s = Math.min(w, h) / 2,\n tl = clamp(+crTL.call(this, _), 0, s),\n tr = clamp(+crTR.call(this, _), 0, s),\n bl = clamp(+crBL.call(this, _), 0, s),\n br = clamp(+crBR.call(this, _), 0, s);\n if (!context) context = buffer = path$3();\n\n if (tl <= 0 && tr <= 0 && bl <= 0 && br <= 0) {\n context.rect(x1, y1, w, h);\n } else {\n var x2 = x1 + w,\n y2 = y1 + h;\n context.moveTo(x1 + tl, y1);\n context.lineTo(x2 - tr, y1);\n context.bezierCurveTo(x2 - C * tr, y1, x2, y1 + C * tr, x2, y1 + tr);\n context.lineTo(x2, y2 - br);\n context.bezierCurveTo(x2, y2 - C * br, x2 - C * br, y2, x2 - br, y2);\n context.lineTo(x1 + bl, y2);\n context.bezierCurveTo(x1 + C * bl, y2, x1, y2 - C * bl, x1, y2 - bl);\n context.lineTo(x1, y1 + tl);\n context.bezierCurveTo(x1, y1 + C * tl, x1 + C * tl, y1, x1 + tl, y1);\n context.closePath();\n }\n\n if (buffer) {\n context = null;\n return buffer + '' || null;\n }\n }\n\n rectangle.x = function (_) {\n if (arguments.length) {\n x = number(_);\n return rectangle;\n } else {\n return x;\n }\n };\n\n rectangle.y = function (_) {\n if (arguments.length) {\n y = number(_);\n return rectangle;\n } else {\n return y;\n }\n };\n\n rectangle.width = function (_) {\n if (arguments.length) {\n width = number(_);\n return rectangle;\n } else {\n return width;\n }\n };\n\n rectangle.height = function (_) {\n if (arguments.length) {\n height = number(_);\n return rectangle;\n } else {\n return height;\n }\n };\n\n rectangle.cornerRadius = function (tl, tr, br, bl) {\n if (arguments.length) {\n crTL = number(tl);\n crTR = tr != null ? number(tr) : crTL;\n crBR = br != null ? number(br) : crTL;\n crBL = bl != null ? number(bl) : crTR;\n return rectangle;\n } else {\n return crTL;\n }\n };\n\n rectangle.context = function (_) {\n if (arguments.length) {\n context = _ == null ? null : _;\n return rectangle;\n } else {\n return context;\n }\n };\n\n return rectangle;\n}\n\nfunction vg_trail () {\n var x,\n y,\n size,\n defined,\n context = null,\n ready,\n x1,\n y1,\n r1;\n\n function point(x2, y2, w2) {\n const r2 = w2 / 2;\n\n if (ready) {\n var ux = y1 - y2,\n uy = x2 - x1;\n\n if (ux || uy) {\n // get normal vector\n var ud = Math.sqrt(ux * ux + uy * uy),\n rx = (ux /= ud) * r1,\n ry = (uy /= ud) * r1,\n t = Math.atan2(uy, ux); // draw segment\n\n context.moveTo(x1 - rx, y1 - ry);\n context.lineTo(x2 - ux * r2, y2 - uy * r2);\n context.arc(x2, y2, r2, t - Math.PI, t);\n context.lineTo(x1 + rx, y1 + ry);\n context.arc(x1, y1, r1, t, t + Math.PI);\n } else {\n context.arc(x2, y2, r2, 0, Tau);\n }\n\n context.closePath();\n } else {\n ready = 1;\n }\n\n x1 = x2;\n y1 = y2;\n r1 = r2;\n }\n\n function trail(data) {\n var i,\n n = data.length,\n d,\n defined0 = false,\n buffer;\n if (context == null) context = buffer = path$3();\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) ready = 0;\n }\n\n if (defined0) point(+x(d, i, data), +y(d, i, data), +size(d, i, data));\n }\n\n if (buffer) {\n context = null;\n return buffer + '' || null;\n }\n }\n\n trail.x = function (_) {\n if (arguments.length) {\n x = _;\n return trail;\n } else {\n return x;\n }\n };\n\n trail.y = function (_) {\n if (arguments.length) {\n y = _;\n return trail;\n } else {\n return y;\n }\n };\n\n trail.size = function (_) {\n if (arguments.length) {\n size = _;\n return trail;\n } else {\n return size;\n }\n };\n\n trail.defined = function (_) {\n if (arguments.length) {\n defined = _;\n return trail;\n } else {\n return defined;\n }\n };\n\n trail.context = function (_) {\n if (arguments.length) {\n if (_ == null) {\n context = null;\n } else {\n context = _;\n }\n\n return trail;\n } else {\n return context;\n }\n };\n\n return trail;\n}\n\nfunction value$1(a, b) {\n return a != null ? a : b;\n}\n\nconst x = item => item.x || 0,\n y = item => item.y || 0,\n w = item => item.width || 0,\n h = item => item.height || 0,\n xw = item => (item.x || 0) + (item.width || 0),\n yh = item => (item.y || 0) + (item.height || 0),\n sa = item => item.startAngle || 0,\n ea = item => item.endAngle || 0,\n pa = item => item.padAngle || 0,\n ir = item => item.innerRadius || 0,\n or = item => item.outerRadius || 0,\n cr = item => item.cornerRadius || 0,\n tl = item => value$1(item.cornerRadiusTopLeft, item.cornerRadius) || 0,\n tr = item => value$1(item.cornerRadiusTopRight, item.cornerRadius) || 0,\n br = item => value$1(item.cornerRadiusBottomRight, item.cornerRadius) || 0,\n bl = item => value$1(item.cornerRadiusBottomLeft, item.cornerRadius) || 0,\n sz = item => value$1(item.size, 64),\n ts = item => item.size || 1,\n def = item => !(item.defined === false),\n type = item => symbols(item.shape || 'circle');\n\nconst arcShape = arc$2().startAngle(sa).endAngle(ea).padAngle(pa).innerRadius(ir).outerRadius(or).cornerRadius(cr),\n areavShape = area$2().x(x).y1(y).y0(yh).defined(def),\n areahShape = area$2().y(y).x1(x).x0(xw).defined(def),\n lineShape = line$2().x(x).y(y).defined(def),\n rectShape = vg_rect().x(x).y(y).width(w).height(h).cornerRadius(tl, tr, br, bl),\n symbolShape = symbol$2().type(type).size(sz),\n trailShape = vg_trail().x(x).y(y).defined(def).size(ts);\nfunction hasCornerRadius(item) {\n return item.cornerRadius || item.cornerRadiusTopLeft || item.cornerRadiusTopRight || item.cornerRadiusBottomRight || item.cornerRadiusBottomLeft;\n}\nfunction arc$1(context, item) {\n return arcShape.context(context)(item);\n}\nfunction area$1(context, items) {\n const item = items[0],\n interp = item.interpolate || 'linear';\n return (item.orient === 'horizontal' ? areahShape : areavShape).curve(curves(interp, item.orient, item.tension)).context(context)(items);\n}\nfunction line$1(context, items) {\n const item = items[0],\n interp = item.interpolate || 'linear';\n return lineShape.curve(curves(interp, item.orient, item.tension)).context(context)(items);\n}\nfunction rectangle(context, item, x, y) {\n return rectShape.context(context)(item, x, y);\n}\nfunction shape$1(context, item) {\n return (item.mark.shape || item.shape).context(context)(item);\n}\nfunction symbol$1(context, item) {\n return symbolShape.context(context)(item);\n}\nfunction trail$1(context, items) {\n return trailShape.context(context)(items);\n}\n\nvar clip_id = 1;\nfunction resetSVGClipId() {\n clip_id = 1;\n}\nfunction clip$1 (renderer, item, size) {\n var clip = item.clip,\n defs = renderer._defs,\n id = item.clip_id || (item.clip_id = 'clip' + clip_id++),\n c = defs.clipping[id] || (defs.clipping[id] = {\n id: id\n });\n\n if (isFunction(clip)) {\n c.path = clip(null);\n } else if (hasCornerRadius(size)) {\n c.path = rectangle(null, size, 0, 0);\n } else {\n c.width = size.width || 0;\n c.height = size.height || 0;\n }\n\n return 'url(#' + id + ')';\n}\n\nfunction Bounds(b) {\n this.clear();\n if (b) this.union(b);\n}\nBounds.prototype = {\n clone() {\n return new Bounds(this);\n },\n\n clear() {\n this.x1 = +Number.MAX_VALUE;\n this.y1 = +Number.MAX_VALUE;\n this.x2 = -Number.MAX_VALUE;\n this.y2 = -Number.MAX_VALUE;\n return this;\n },\n\n empty() {\n return this.x1 === +Number.MAX_VALUE && this.y1 === +Number.MAX_VALUE && this.x2 === -Number.MAX_VALUE && this.y2 === -Number.MAX_VALUE;\n },\n\n equals(b) {\n return this.x1 === b.x1 && this.y1 === b.y1 && this.x2 === b.x2 && this.y2 === b.y2;\n },\n\n set(x1, y1, x2, y2) {\n if (x2 < x1) {\n this.x2 = x1;\n this.x1 = x2;\n } else {\n this.x1 = x1;\n this.x2 = x2;\n }\n\n if (y2 < y1) {\n this.y2 = y1;\n this.y1 = y2;\n } else {\n this.y1 = y1;\n this.y2 = y2;\n }\n\n return this;\n },\n\n add(x, y) {\n if (x < this.x1) this.x1 = x;\n if (y < this.y1) this.y1 = y;\n if (x > this.x2) this.x2 = x;\n if (y > this.y2) this.y2 = y;\n return this;\n },\n\n expand(d) {\n this.x1 -= d;\n this.y1 -= d;\n this.x2 += d;\n this.y2 += d;\n return this;\n },\n\n round() {\n this.x1 = Math.floor(this.x1);\n this.y1 = Math.floor(this.y1);\n this.x2 = Math.ceil(this.x2);\n this.y2 = Math.ceil(this.y2);\n return this;\n },\n\n scale(s) {\n this.x1 *= s;\n this.y1 *= s;\n this.x2 *= s;\n this.y2 *= s;\n return this;\n },\n\n translate(dx, dy) {\n this.x1 += dx;\n this.x2 += dx;\n this.y1 += dy;\n this.y2 += dy;\n return this;\n },\n\n rotate(angle, x, y) {\n const p = this.rotatedPoints(angle, x, y);\n return this.clear().add(p[0], p[1]).add(p[2], p[3]).add(p[4], p[5]).add(p[6], p[7]);\n },\n\n rotatedPoints(angle, x, y) {\n var {\n x1,\n y1,\n x2,\n y2\n } = this,\n cos = Math.cos(angle),\n sin = Math.sin(angle),\n cx = x - x * cos + y * sin,\n cy = y - x * sin - y * cos;\n return [cos * x1 - sin * y1 + cx, sin * x1 + cos * y1 + cy, cos * x1 - sin * y2 + cx, sin * x1 + cos * y2 + cy, cos * x2 - sin * y1 + cx, sin * x2 + cos * y1 + cy, cos * x2 - sin * y2 + cx, sin * x2 + cos * y2 + cy];\n },\n\n union(b) {\n if (b.x1 < this.x1) this.x1 = b.x1;\n if (b.y1 < this.y1) this.y1 = b.y1;\n if (b.x2 > this.x2) this.x2 = b.x2;\n if (b.y2 > this.y2) this.y2 = b.y2;\n return this;\n },\n\n intersect(b) {\n if (b.x1 > this.x1) this.x1 = b.x1;\n if (b.y1 > this.y1) this.y1 = b.y1;\n if (b.x2 < this.x2) this.x2 = b.x2;\n if (b.y2 < this.y2) this.y2 = b.y2;\n return this;\n },\n\n encloses(b) {\n return b && this.x1 <= b.x1 && this.x2 >= b.x2 && this.y1 <= b.y1 && this.y2 >= b.y2;\n },\n\n alignsWith(b) {\n return b && (this.x1 == b.x1 || this.x2 == b.x2 || this.y1 == b.y1 || this.y2 == b.y2);\n },\n\n intersects(b) {\n return b && !(this.x2 < b.x1 || this.x1 > b.x2 || this.y2 < b.y1 || this.y1 > b.y2);\n },\n\n contains(x, y) {\n return !(x < this.x1 || x > this.x2 || y < this.y1 || y > this.y2);\n },\n\n width() {\n return this.x2 - this.x1;\n },\n\n height() {\n return this.y2 - this.y1;\n }\n\n};\n\nfunction Item(mark) {\n this.mark = mark;\n this.bounds = this.bounds || new Bounds();\n}\n\nfunction GroupItem(mark) {\n Item.call(this, mark);\n this.items = this.items || [];\n}\ninherits(GroupItem, Item);\n\nfunction ResourceLoader(customLoader) {\n this._pending = 0;\n this._loader = customLoader || loader();\n}\n\nfunction increment(loader) {\n loader._pending += 1;\n}\n\nfunction decrement(loader) {\n loader._pending -= 1;\n}\n\nResourceLoader.prototype = {\n pending() {\n return this._pending;\n },\n\n sanitizeURL(uri) {\n const loader = this;\n increment(loader);\n return loader._loader.sanitize(uri, {\n context: 'href'\n }).then(opt => {\n decrement(loader);\n return opt;\n }).catch(() => {\n decrement(loader);\n return null;\n });\n },\n\n loadImage(uri) {\n const loader = this,\n Image = image$1();\n increment(loader);\n return loader._loader.sanitize(uri, {\n context: 'image'\n }).then(opt => {\n const url = opt.href;\n if (!url || !Image) throw {\n url: url\n };\n const img = new Image(); // set crossOrigin only if cors is defined; empty string sets anonymous mode\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin\n\n const cors = hasOwnProperty(opt, 'crossOrigin') ? opt.crossOrigin : 'anonymous';\n if (cors != null) img.crossOrigin = cors; // attempt to load image resource\n\n img.onload = () => decrement(loader);\n\n img.onerror = () => decrement(loader);\n\n img.src = url;\n return img;\n }).catch(e => {\n decrement(loader);\n return {\n complete: false,\n width: 0,\n height: 0,\n src: e && e.url || ''\n };\n });\n },\n\n ready() {\n const loader = this;\n return new Promise(accept => {\n function poll(value) {\n if (!loader.pending()) accept(value);else setTimeout(() => {\n poll(true);\n }, 10);\n }\n\n poll(false);\n });\n }\n\n};\n\nfunction boundStroke (bounds, item, miter) {\n if (item.stroke && item.opacity !== 0 && item.strokeOpacity !== 0) {\n const sw = item.strokeWidth != null ? +item.strokeWidth : 1;\n bounds.expand(sw + (miter ? miterAdjustment(item, sw) : 0));\n }\n\n return bounds;\n}\n\nfunction miterAdjustment(item, strokeWidth) {\n // TODO: more sophisticated adjustment? Or miter support in boundContext?\n return item.strokeJoin && item.strokeJoin !== 'miter' ? 0 : strokeWidth;\n}\n\nconst circleThreshold = Tau - 1e-8;\nlet bounds, lx, ly, rot, ma, mb, mc, md;\n\nconst add = (x, y) => bounds.add(x, y);\n\nconst addL = (x, y) => add(lx = x, ly = y);\n\nconst addX = x => add(x, bounds.y1);\n\nconst addY = y => add(bounds.x1, y);\n\nconst px = (x, y) => ma * x + mc * y;\n\nconst py = (x, y) => mb * x + md * y;\n\nconst addp = (x, y) => add(px(x, y), py(x, y));\n\nconst addpL = (x, y) => addL(px(x, y), py(x, y));\n\nfunction boundContext (_, deg) {\n bounds = _;\n\n if (deg) {\n rot = deg * DegToRad;\n ma = md = Math.cos(rot);\n mb = Math.sin(rot);\n mc = -mb;\n } else {\n ma = md = 1;\n rot = mb = mc = 0;\n }\n\n return context$1;\n}\nconst context$1 = {\n beginPath() {},\n\n closePath() {},\n\n moveTo: addpL,\n lineTo: addpL,\n\n rect(x, y, w, h) {\n if (rot) {\n addp(x + w, y);\n addp(x + w, y + h);\n addp(x, y + h);\n addpL(x, y);\n } else {\n add(x + w, y + h);\n addL(x, y);\n }\n },\n\n quadraticCurveTo(x1, y1, x2, y2) {\n const px1 = px(x1, y1),\n py1 = py(x1, y1),\n px2 = px(x2, y2),\n py2 = py(x2, y2);\n quadExtrema(lx, px1, px2, addX);\n quadExtrema(ly, py1, py2, addY);\n addL(px2, py2);\n },\n\n bezierCurveTo(x1, y1, x2, y2, x3, y3) {\n const px1 = px(x1, y1),\n py1 = py(x1, y1),\n px2 = px(x2, y2),\n py2 = py(x2, y2),\n px3 = px(x3, y3),\n py3 = py(x3, y3);\n cubicExtrema(lx, px1, px2, px3, addX);\n cubicExtrema(ly, py1, py2, py3, addY);\n addL(px3, py3);\n },\n\n arc(cx, cy, r, sa, ea, ccw) {\n sa += rot;\n ea += rot; // store last point on path\n\n lx = r * Math.cos(ea) + cx;\n ly = r * Math.sin(ea) + cy;\n\n if (Math.abs(ea - sa) > circleThreshold) {\n // treat as full circle\n add(cx - r, cy - r);\n add(cx + r, cy + r);\n } else {\n const update = a => add(r * Math.cos(a) + cx, r * Math.sin(a) + cy);\n\n let s, i; // sample end points\n\n update(sa);\n update(ea); // sample interior points aligned with 90 degrees\n\n if (ea !== sa) {\n sa = sa % Tau;\n if (sa < 0) sa += Tau;\n ea = ea % Tau;\n if (ea < 0) ea += Tau;\n\n if (ea < sa) {\n ccw = !ccw; // flip direction\n\n s = sa;\n sa = ea;\n ea = s; // swap end-points\n }\n\n if (ccw) {\n ea -= Tau;\n s = sa - sa % HalfPi;\n\n for (i = 0; i < 4 && s > ea; ++i, s -= HalfPi) update(s);\n } else {\n s = sa - sa % HalfPi + HalfPi;\n\n for (i = 0; i < 4 && s < ea; ++i, s = s + HalfPi) update(s);\n }\n }\n }\n }\n\n};\n\nfunction quadExtrema(x0, x1, x2, cb) {\n const t = (x0 - x1) / (x0 + x2 - 2 * x1);\n if (0 < t && t < 1) cb(x0 + (x1 - x0) * t);\n}\n\nfunction cubicExtrema(x0, x1, x2, x3, cb) {\n const a = x3 - x0 + 3 * x1 - 3 * x2,\n b = x0 + x2 - 2 * x1,\n c = x0 - x1;\n let t0 = 0,\n t1 = 0,\n r; // solve for parameter t\n\n if (Math.abs(a) > Epsilon) {\n // quadratic equation\n r = b * b + c * a;\n\n if (r >= 0) {\n r = Math.sqrt(r);\n t0 = (-b + r) / a;\n t1 = (-b - r) / a;\n }\n } else {\n // linear equation\n t0 = 0.5 * c / b;\n } // calculate position\n\n\n if (0 < t0 && t0 < 1) cb(cubic(t0, x0, x1, x2, x3));\n if (0 < t1 && t1 < 1) cb(cubic(t1, x0, x1, x2, x3));\n}\n\nfunction cubic(t, x0, x1, x2, x3) {\n const s = 1 - t,\n s2 = s * s,\n t2 = t * t;\n return s2 * s * x0 + 3 * s2 * t * x1 + 3 * s * t2 * x2 + t2 * t * x3;\n}\n\nvar context = (context = canvas(1, 1)) ? context.getContext('2d') : null;\n\nconst b = new Bounds();\nfunction intersectPath(draw) {\n return function (item, brush) {\n // rely on (inaccurate) bounds intersection if no context\n if (!context) return true; // add path to offscreen graphics context\n\n draw(context, item); // get bounds intersection region\n\n b.clear().union(item.bounds).intersect(brush).round();\n const {\n x1,\n y1,\n x2,\n y2\n } = b; // iterate over intersection region\n // perform fine grained inclusion test\n\n for (let y = y1; y <= y2; ++y) {\n for (let x = x1; x <= x2; ++x) {\n if (context.isPointInPath(x, y)) {\n return true;\n }\n }\n } // false if no hits in intersection region\n\n\n return false;\n };\n}\nfunction intersectPoint(item, box) {\n return box.contains(item.x || 0, item.y || 0);\n}\nfunction intersectRect(item, box) {\n const x = item.x || 0,\n y = item.y || 0,\n w = item.width || 0,\n h = item.height || 0;\n return box.intersects(b.set(x, y, x + w, y + h));\n}\nfunction intersectRule(item, box) {\n const x = item.x || 0,\n y = item.y || 0,\n x2 = item.x2 != null ? item.x2 : x,\n y2 = item.y2 != null ? item.y2 : y;\n return intersectBoxLine(box, x, y, x2, y2);\n}\nfunction intersectBoxLine(box, x, y, u, v) {\n const {\n x1,\n y1,\n x2,\n y2\n } = box,\n dx = u - x,\n dy = v - y;\n let t0 = 0,\n t1 = 1,\n p,\n q,\n r,\n e;\n\n for (e = 0; e < 4; ++e) {\n if (e === 0) {\n p = -dx;\n q = -(x1 - x);\n }\n\n if (e === 1) {\n p = dx;\n q = x2 - x;\n }\n\n if (e === 2) {\n p = -dy;\n q = -(y1 - y);\n }\n\n if (e === 3) {\n p = dy;\n q = y2 - y;\n }\n\n if (Math.abs(p) < 1e-10 && q < 0) return false;\n r = q / p;\n\n if (p < 0) {\n if (r > t1) return false;else if (r > t0) t0 = r;\n } else if (p > 0) {\n if (r < t0) return false;else if (r < t1) t1 = r;\n }\n }\n\n return true;\n}\n\nfunction blend (context, item) {\n context.globalCompositeOperation = item.blend || 'source-over';\n}\n\nfunction value (value, dflt) {\n return value == null ? dflt : value;\n}\n\nfunction addStops(gradient, stops) {\n const n = stops.length;\n\n for (let i = 0; i < n; ++i) {\n gradient.addColorStop(stops[i].offset, stops[i].color);\n }\n\n return gradient;\n}\n\nfunction gradient (context, spec, bounds) {\n const w = bounds.width(),\n h = bounds.height();\n let gradient;\n\n if (spec.gradient === 'radial') {\n gradient = context.createRadialGradient(bounds.x1 + value(spec.x1, 0.5) * w, bounds.y1 + value(spec.y1, 0.5) * h, Math.max(w, h) * value(spec.r1, 0), bounds.x1 + value(spec.x2, 0.5) * w, bounds.y1 + value(spec.y2, 0.5) * h, Math.max(w, h) * value(spec.r2, 0.5));\n } else {\n // linear gradient\n const x1 = value(spec.x1, 0),\n y1 = value(spec.y1, 0),\n x2 = value(spec.x2, 1),\n y2 = value(spec.y2, 0);\n\n if (x1 === x2 || y1 === y2 || w === h) {\n // axis aligned: use normal gradient\n gradient = context.createLinearGradient(bounds.x1 + x1 * w, bounds.y1 + y1 * h, bounds.x1 + x2 * w, bounds.y1 + y2 * h);\n } else {\n // not axis aligned: render gradient into a pattern (#2365)\n // this allows us to use normalized bounding box coordinates\n const image = canvas(Math.ceil(w), Math.ceil(h)),\n ictx = image.getContext('2d');\n ictx.scale(w, h);\n ictx.fillStyle = addStops(ictx.createLinearGradient(x1, y1, x2, y2), spec.stops);\n ictx.fillRect(0, 0, w, h);\n return context.createPattern(image, 'no-repeat');\n }\n }\n\n return addStops(gradient, spec.stops);\n}\n\nfunction color (context, item, value) {\n return isGradient(value) ? gradient(context, value, item.bounds) : value;\n}\n\nfunction fill (context, item, opacity) {\n opacity *= item.fillOpacity == null ? 1 : item.fillOpacity;\n\n if (opacity > 0) {\n context.globalAlpha = opacity;\n context.fillStyle = color(context, item, item.fill);\n return true;\n } else {\n return false;\n }\n}\n\nvar Empty = [];\nfunction stroke (context, item, opacity) {\n var lw = (lw = item.strokeWidth) != null ? lw : 1;\n if (lw <= 0) return false;\n opacity *= item.strokeOpacity == null ? 1 : item.strokeOpacity;\n\n if (opacity > 0) {\n context.globalAlpha = opacity;\n context.strokeStyle = color(context, item, item.stroke);\n context.lineWidth = lw;\n context.lineCap = item.strokeCap || 'butt';\n context.lineJoin = item.strokeJoin || 'miter';\n context.miterLimit = item.strokeMiterLimit || 10;\n\n if (context.setLineDash) {\n context.setLineDash(item.strokeDash || Empty);\n context.lineDashOffset = item.strokeDashOffset || 0;\n }\n\n return true;\n } else {\n return false;\n }\n}\n\nfunction compare(a, b) {\n return a.zindex - b.zindex || a.index - b.index;\n}\n\nfunction zorder(scene) {\n if (!scene.zdirty) return scene.zitems;\n var items = scene.items,\n output = [],\n item,\n i,\n n;\n\n for (i = 0, n = items.length; i < n; ++i) {\n item = items[i];\n item.index = i;\n if (item.zindex) output.push(item);\n }\n\n scene.zdirty = false;\n return scene.zitems = output.sort(compare);\n}\nfunction visit(scene, visitor) {\n var items = scene.items,\n i,\n n;\n if (!items || !items.length) return;\n const zitems = zorder(scene);\n\n if (zitems && zitems.length) {\n for (i = 0, n = items.length; i < n; ++i) {\n if (!items[i].zindex) visitor(items[i]);\n }\n\n items = zitems;\n }\n\n for (i = 0, n = items.length; i < n; ++i) {\n visitor(items[i]);\n }\n}\nfunction pickVisit(scene, visitor) {\n var items = scene.items,\n hit,\n i;\n if (!items || !items.length) return null;\n const zitems = zorder(scene);\n if (zitems && zitems.length) items = zitems;\n\n for (i = items.length; --i >= 0;) {\n if (hit = visitor(items[i])) return hit;\n }\n\n if (items === zitems) {\n for (items = scene.items, i = items.length; --i >= 0;) {\n if (!items[i].zindex) {\n if (hit = visitor(items[i])) return hit;\n }\n }\n }\n\n return null;\n}\n\nfunction drawAll(path) {\n return function (context, scene, bounds) {\n visit(scene, item => {\n if (!bounds || bounds.intersects(item.bounds)) {\n drawPath(path, context, item, item);\n }\n });\n };\n}\nfunction drawOne(path) {\n return function (context, scene, bounds) {\n if (scene.items.length && (!bounds || bounds.intersects(scene.bounds))) {\n drawPath(path, context, scene.items[0], scene.items);\n }\n };\n}\n\nfunction drawPath(path, context, item, items) {\n var opacity = item.opacity == null ? 1 : item.opacity;\n if (opacity === 0) return;\n if (path(context, items)) return;\n blend(context, item);\n\n if (item.fill && fill(context, item, opacity)) {\n context.fill();\n }\n\n if (item.stroke && stroke(context, item, opacity)) {\n context.stroke();\n }\n}\n\nfunction pick$1(test) {\n test = test || truthy;\n return function (context, scene, x, y, gx, gy) {\n x *= context.pixelRatio;\n y *= context.pixelRatio;\n return pickVisit(scene, item => {\n const b = item.bounds; // first hit test against bounding box\n\n if (b && !b.contains(gx, gy) || !b) return; // if in bounding box, perform more careful test\n\n if (test(context, item, x, y, gx, gy)) return item;\n });\n };\n}\nfunction hitPath(path, filled) {\n return function (context, o, x, y) {\n var item = Array.isArray(o) ? o[0] : o,\n fill = filled == null ? item.fill : filled,\n stroke = item.stroke && context.isPointInStroke,\n lw,\n lc;\n\n if (stroke) {\n lw = item.strokeWidth;\n lc = item.strokeCap;\n context.lineWidth = lw != null ? lw : 1;\n context.lineCap = lc != null ? lc : 'butt';\n }\n\n return path(context, o) ? false : fill && context.isPointInPath(x, y) || stroke && context.isPointInStroke(x, y);\n };\n}\nfunction pickPath(path) {\n return pick$1(hitPath(path));\n}\n\nfunction translate(x, y) {\n return 'translate(' + x + ',' + y + ')';\n}\nfunction rotate(a) {\n return 'rotate(' + a + ')';\n}\nfunction scale(scaleX, scaleY) {\n return 'scale(' + scaleX + ',' + scaleY + ')';\n}\nfunction translateItem(item) {\n return translate(item.x || 0, item.y || 0);\n}\nfunction rotateItem(item) {\n return translate(item.x || 0, item.y || 0) + (item.angle ? ' ' + rotate(item.angle) : '');\n}\nfunction transformItem(item) {\n return translate(item.x || 0, item.y || 0) + (item.angle ? ' ' + rotate(item.angle) : '') + (item.scaleX || item.scaleY ? ' ' + scale(item.scaleX || 1, item.scaleY || 1) : '');\n}\n\nfunction markItemPath (type, shape, isect) {\n function attr(emit, item) {\n emit('transform', rotateItem(item));\n emit('d', shape(null, item));\n }\n\n function bound(bounds, item) {\n shape(boundContext(bounds, item.angle), item);\n return boundStroke(bounds, item).translate(item.x || 0, item.y || 0);\n }\n\n function draw(context, item) {\n var x = item.x || 0,\n y = item.y || 0,\n a = item.angle || 0;\n context.translate(x, y);\n if (a) context.rotate(a *= DegToRad);\n context.beginPath();\n shape(context, item);\n if (a) context.rotate(-a);\n context.translate(-x, -y);\n }\n\n return {\n type: type,\n tag: 'path',\n nested: false,\n attr: attr,\n bound: bound,\n draw: drawAll(draw),\n pick: pickPath(draw),\n isect: isect || intersectPath(draw)\n };\n}\n\nvar arc = markItemPath('arc', arc$1);\n\nfunction pickArea(a, p) {\n var v = a[0].orient === 'horizontal' ? p[1] : p[0],\n z = a[0].orient === 'horizontal' ? 'y' : 'x',\n i = a.length,\n min = +Infinity,\n hit,\n d;\n\n while (--i >= 0) {\n if (a[i].defined === false) continue;\n d = Math.abs(a[i][z] - v);\n\n if (d < min) {\n min = d;\n hit = a[i];\n }\n }\n\n return hit;\n}\nfunction pickLine(a, p) {\n var t = Math.pow(a[0].strokeWidth || 1, 2),\n i = a.length,\n dx,\n dy,\n dd;\n\n while (--i >= 0) {\n if (a[i].defined === false) continue;\n dx = a[i].x - p[0];\n dy = a[i].y - p[1];\n dd = dx * dx + dy * dy;\n if (dd < t) return a[i];\n }\n\n return null;\n}\nfunction pickTrail(a, p) {\n var i = a.length,\n dx,\n dy,\n dd;\n\n while (--i >= 0) {\n if (a[i].defined === false) continue;\n dx = a[i].x - p[0];\n dy = a[i].y - p[1];\n dd = dx * dx + dy * dy;\n dx = a[i].size || 1;\n if (dd < dx * dx) return a[i];\n }\n\n return null;\n}\n\nfunction markMultiItemPath (type, shape, tip) {\n function attr(emit, item) {\n var items = item.mark.items;\n if (items.length) emit('d', shape(null, items));\n }\n\n function bound(bounds, mark) {\n var items = mark.items;\n\n if (items.length === 0) {\n return bounds;\n } else {\n shape(boundContext(bounds), items);\n return boundStroke(bounds, items[0]);\n }\n }\n\n function draw(context, items) {\n context.beginPath();\n shape(context, items);\n }\n\n const hit = hitPath(draw);\n\n function pick(context, scene, x, y, gx, gy) {\n var items = scene.items,\n b = scene.bounds;\n\n if (!items || !items.length || b && !b.contains(gx, gy)) {\n return null;\n }\n\n x *= context.pixelRatio;\n y *= context.pixelRatio;\n return hit(context, items, x, y) ? items[0] : null;\n }\n\n return {\n type: type,\n tag: 'path',\n nested: true,\n attr: attr,\n bound: bound,\n draw: drawOne(draw),\n pick: pick,\n isect: intersectPoint,\n tip: tip\n };\n}\n\nvar area = markMultiItemPath('area', area$1, pickArea);\n\nfunction clip (context, scene) {\n var clip = scene.clip;\n context.save();\n\n if (isFunction(clip)) {\n context.beginPath();\n clip(context);\n context.clip();\n } else {\n clipGroup(context, scene.group);\n }\n}\nfunction clipGroup(context, group) {\n context.beginPath();\n hasCornerRadius(group) ? rectangle(context, group, 0, 0) : context.rect(0, 0, group.width || 0, group.height || 0);\n context.clip();\n}\n\nfunction offset$1(item) {\n const sw = value(item.strokeWidth, 1);\n return item.strokeOffset != null ? item.strokeOffset : item.stroke && sw > 0.5 && sw < 1.5 ? 0.5 - Math.abs(sw - 1) : 0;\n}\n\nfunction attr$5(emit, item) {\n emit('transform', translateItem(item));\n}\n\nfunction emitRectangle(emit, item) {\n const off = offset$1(item);\n emit('d', rectangle(null, item, off, off));\n}\n\nfunction background(emit, item) {\n emit('class', 'background');\n emit('aria-hidden', true);\n emitRectangle(emit, item);\n}\n\nfunction foreground(emit, item) {\n emit('class', 'foreground');\n emit('aria-hidden', true);\n\n if (item.strokeForeground) {\n emitRectangle(emit, item);\n } else {\n emit('d', '');\n }\n}\n\nfunction content(emit, item, renderer) {\n const url = item.clip ? clip$1(renderer, item, item) : null;\n emit('clip-path', url);\n}\n\nfunction bound$5(bounds, group) {\n if (!group.clip && group.items) {\n const items = group.items,\n m = items.length;\n\n for (let j = 0; j < m; ++j) {\n bounds.union(items[j].bounds);\n }\n }\n\n if ((group.clip || group.width || group.height) && !group.noBound) {\n bounds.add(0, 0).add(group.width || 0, group.height || 0);\n }\n\n boundStroke(bounds, group);\n return bounds.translate(group.x || 0, group.y || 0);\n}\n\nfunction rectanglePath(context, group, x, y) {\n const off = offset$1(group);\n context.beginPath();\n rectangle(context, group, (x || 0) + off, (y || 0) + off);\n}\n\nconst hitBackground = hitPath(rectanglePath);\nconst hitForeground = hitPath(rectanglePath, false);\nconst hitCorner = hitPath(rectanglePath, true);\n\nfunction draw$4(context, scene, bounds) {\n visit(scene, group => {\n const gx = group.x || 0,\n gy = group.y || 0,\n fore = group.strokeForeground,\n opacity = group.opacity == null ? 1 : group.opacity; // draw group background\n\n if ((group.stroke || group.fill) && opacity) {\n rectanglePath(context, group, gx, gy);\n blend(context, group);\n\n if (group.fill && fill(context, group, opacity)) {\n context.fill();\n }\n\n if (group.stroke && !fore && stroke(context, group, opacity)) {\n context.stroke();\n }\n } // setup graphics context, set clip and bounds\n\n\n context.save();\n context.translate(gx, gy);\n if (group.clip) clipGroup(context, group);\n if (bounds) bounds.translate(-gx, -gy); // draw group contents\n\n visit(group, item => {\n this.draw(context, item, bounds);\n }); // restore graphics context\n\n if (bounds) bounds.translate(gx, gy);\n context.restore(); // draw group foreground\n\n if (fore && group.stroke && opacity) {\n rectanglePath(context, group, gx, gy);\n blend(context, group);\n\n if (stroke(context, group, opacity)) {\n context.stroke();\n }\n }\n });\n}\n\nfunction pick(context, scene, x, y, gx, gy) {\n if (scene.bounds && !scene.bounds.contains(gx, gy) || !scene.items) {\n return null;\n }\n\n const cx = x * context.pixelRatio,\n cy = y * context.pixelRatio;\n return pickVisit(scene, group => {\n let hit, dx, dy; // first hit test bounding box\n\n const b = group.bounds;\n if (b && !b.contains(gx, gy)) return; // passed bounds check, test rectangular clip\n\n dx = group.x || 0;\n dy = group.y || 0;\n const dw = dx + (group.width || 0),\n dh = dy + (group.height || 0),\n c = group.clip;\n if (c && (gx < dx || gx > dw || gy < dy || gy > dh)) return; // adjust coordinate system\n\n context.save();\n context.translate(dx, dy);\n dx = gx - dx;\n dy = gy - dy; // test background for rounded corner clip\n\n if (c && hasCornerRadius(group) && !hitCorner(context, group, cx, cy)) {\n context.restore();\n return null;\n }\n\n const fore = group.strokeForeground,\n ix = scene.interactive !== false; // hit test against group foreground\n\n if (ix && fore && group.stroke && hitForeground(context, group, cx, cy)) {\n context.restore();\n return group;\n } // hit test against contained marks\n\n\n hit = pickVisit(group, mark => pickMark(mark, dx, dy) ? this.pick(mark, x, y, dx, dy) : null); // hit test against group background\n\n if (!hit && ix && (group.fill || !fore && group.stroke) && hitBackground(context, group, cx, cy)) {\n hit = group;\n } // restore state and return\n\n\n context.restore();\n return hit || null;\n });\n}\n\nfunction pickMark(mark, x, y) {\n return (mark.interactive !== false || mark.marktype === 'group') && mark.bounds && mark.bounds.contains(x, y);\n}\n\nvar group = {\n type: 'group',\n tag: 'g',\n nested: false,\n attr: attr$5,\n bound: bound$5,\n draw: draw$4,\n pick: pick,\n isect: intersectRect,\n content: content,\n background: background,\n foreground: foreground\n};\n\nvar metadata = {\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'xmlns:xlink': 'http://www.w3.org/1999/xlink',\n 'version': '1.1'\n};\n\nfunction getImage(item, renderer) {\n var image = item.image;\n\n if (!image || item.url && item.url !== image.url) {\n image = {\n complete: false,\n width: 0,\n height: 0\n };\n renderer.loadImage(item.url).then(image => {\n item.image = image;\n item.image.url = item.url;\n });\n }\n\n return image;\n}\n\nfunction imageWidth(item, image) {\n return item.width != null ? item.width : !image || !image.width ? 0 : item.aspect !== false && item.height ? item.height * image.width / image.height : image.width;\n}\n\nfunction imageHeight(item, image) {\n return item.height != null ? item.height : !image || !image.height ? 0 : item.aspect !== false && item.width ? item.width * image.height / image.width : image.height;\n}\n\nfunction imageXOffset(align, w) {\n return align === 'center' ? w / 2 : align === 'right' ? w : 0;\n}\n\nfunction imageYOffset(baseline, h) {\n return baseline === 'middle' ? h / 2 : baseline === 'bottom' ? h : 0;\n}\n\nfunction attr$4(emit, item, renderer) {\n const img = getImage(item, renderer),\n w = imageWidth(item, img),\n h = imageHeight(item, img),\n x = (item.x || 0) - imageXOffset(item.align, w),\n y = (item.y || 0) - imageYOffset(item.baseline, h),\n i = !img.src && img.toDataURL ? img.toDataURL() : img.src || '';\n emit('href', i, metadata['xmlns:xlink'], 'xlink:href');\n emit('transform', translate(x, y));\n emit('width', w);\n emit('height', h);\n emit('preserveAspectRatio', item.aspect === false ? 'none' : 'xMidYMid');\n}\n\nfunction bound$4(bounds, item) {\n const img = item.image,\n w = imageWidth(item, img),\n h = imageHeight(item, img),\n x = (item.x || 0) - imageXOffset(item.align, w),\n y = (item.y || 0) - imageYOffset(item.baseline, h);\n return bounds.set(x, y, x + w, y + h);\n}\n\nfunction draw$3(context, scene, bounds) {\n visit(scene, item => {\n if (bounds && !bounds.intersects(item.bounds)) return; // bounds check\n\n const img = getImage(item, this);\n let w = imageWidth(item, img);\n let h = imageHeight(item, img);\n if (w === 0 || h === 0) return; // early exit\n\n let x = (item.x || 0) - imageXOffset(item.align, w),\n y = (item.y || 0) - imageYOffset(item.baseline, h),\n opacity,\n ar0,\n ar1,\n t;\n\n if (item.aspect !== false) {\n ar0 = img.width / img.height;\n ar1 = item.width / item.height;\n\n if (ar0 === ar0 && ar1 === ar1 && ar0 !== ar1) {\n if (ar1 < ar0) {\n t = w / ar0;\n y += (h - t) / 2;\n h = t;\n } else {\n t = h * ar0;\n x += (w - t) / 2;\n w = t;\n }\n }\n }\n\n if (img.complete || img.toDataURL) {\n blend(context, item);\n context.globalAlpha = (opacity = item.opacity) != null ? opacity : 1;\n context.imageSmoothingEnabled = item.smooth !== false;\n context.drawImage(img, x, y, w, h);\n }\n });\n}\n\nvar image = {\n type: 'image',\n tag: 'image',\n nested: false,\n attr: attr$4,\n bound: bound$4,\n draw: draw$3,\n pick: pick$1(),\n isect: truthy,\n // bounds check is sufficient\n get: getImage,\n xOffset: imageXOffset,\n yOffset: imageYOffset\n};\n\nvar line = markMultiItemPath('line', line$1, pickLine);\n\nfunction attr$3(emit, item) {\n var sx = item.scaleX || 1,\n sy = item.scaleY || 1;\n\n if (sx !== 1 || sy !== 1) {\n emit('vector-effect', 'non-scaling-stroke');\n }\n\n emit('transform', transformItem(item));\n emit('d', item.path);\n}\n\nfunction path$1(context, item) {\n var path = item.path;\n if (path == null) return true;\n var x = item.x || 0,\n y = item.y || 0,\n sx = item.scaleX || 1,\n sy = item.scaleY || 1,\n a = (item.angle || 0) * DegToRad,\n cache = item.pathCache;\n\n if (!cache || cache.path !== path) {\n (item.pathCache = cache = pathParse(path)).path = path;\n }\n\n if (a && context.rotate && context.translate) {\n context.translate(x, y);\n context.rotate(a);\n pathRender(context, cache, 0, 0, sx, sy);\n context.rotate(-a);\n context.translate(-x, -y);\n } else {\n pathRender(context, cache, x, y, sx, sy);\n }\n}\n\nfunction bound$3(bounds, item) {\n return path$1(boundContext(bounds, item.angle), item) ? bounds.set(0, 0, 0, 0) : boundStroke(bounds, item, true);\n}\n\nvar path$2 = {\n type: 'path',\n tag: 'path',\n nested: false,\n attr: attr$3,\n bound: bound$3,\n draw: drawAll(path$1),\n pick: pickPath(path$1),\n isect: intersectPath(path$1)\n};\n\nfunction attr$2(emit, item) {\n emit('d', rectangle(null, item));\n}\n\nfunction bound$2(bounds, item) {\n var x, y;\n return boundStroke(bounds.set(x = item.x || 0, y = item.y || 0, x + item.width || 0, y + item.height || 0), item);\n}\n\nfunction draw$2(context, item) {\n context.beginPath();\n rectangle(context, item);\n}\n\nvar rect = {\n type: 'rect',\n tag: 'path',\n nested: false,\n attr: attr$2,\n bound: bound$2,\n draw: drawAll(draw$2),\n pick: pickPath(draw$2),\n isect: intersectRect\n};\n\nfunction attr$1(emit, item) {\n emit('transform', translateItem(item));\n emit('x2', item.x2 != null ? item.x2 - (item.x || 0) : 0);\n emit('y2', item.y2 != null ? item.y2 - (item.y || 0) : 0);\n}\n\nfunction bound$1(bounds, item) {\n var x1, y1;\n return boundStroke(bounds.set(x1 = item.x || 0, y1 = item.y || 0, item.x2 != null ? item.x2 : x1, item.y2 != null ? item.y2 : y1), item);\n}\n\nfunction path(context, item, opacity) {\n var x1, y1, x2, y2;\n\n if (item.stroke && stroke(context, item, opacity)) {\n x1 = item.x || 0;\n y1 = item.y || 0;\n x2 = item.x2 != null ? item.x2 : x1;\n y2 = item.y2 != null ? item.y2 : y1;\n context.beginPath();\n context.moveTo(x1, y1);\n context.lineTo(x2, y2);\n return true;\n }\n\n return false;\n}\n\nfunction draw$1(context, scene, bounds) {\n visit(scene, item => {\n if (bounds && !bounds.intersects(item.bounds)) return; // bounds check\n\n var opacity = item.opacity == null ? 1 : item.opacity;\n\n if (opacity && path(context, item, opacity)) {\n blend(context, item);\n context.stroke();\n }\n });\n}\n\nfunction hit$1(context, item, x, y) {\n if (!context.isPointInStroke) return false;\n return path(context, item, 1) && context.isPointInStroke(x, y);\n}\n\nvar rule = {\n type: 'rule',\n tag: 'line',\n nested: false,\n attr: attr$1,\n bound: bound$1,\n draw: draw$1,\n pick: pick$1(hit$1),\n isect: intersectRule\n};\n\nvar shape = markItemPath('shape', shape$1);\n\nvar symbol = markItemPath('symbol', symbol$1, intersectPoint);\n\nconst widthCache = lruCache();\nvar textMetrics = {\n height: fontSize,\n measureWidth: measureWidth,\n estimateWidth: estimateWidth,\n width: estimateWidth,\n canvas: useCanvas\n};\nuseCanvas(true);\n\nfunction useCanvas(use) {\n textMetrics.width = use && context ? measureWidth : estimateWidth;\n} // make simple estimate if no canvas is available\n\n\nfunction estimateWidth(item, text) {\n return _estimateWidth(textValue(item, text), fontSize(item));\n}\n\nfunction _estimateWidth(text, currentFontHeight) {\n return ~~(0.8 * text.length * currentFontHeight);\n} // measure text width if canvas is available\n\n\nfunction measureWidth(item, text) {\n return fontSize(item) <= 0 || !(text = textValue(item, text)) ? 0 : _measureWidth(text, font(item));\n}\n\nfunction _measureWidth(text, currentFont) {\n const key = `(${currentFont}) ${text}`;\n let width = widthCache.get(key);\n\n if (width === undefined) {\n context.font = currentFont;\n width = context.measureText(text).width;\n widthCache.set(key, width);\n }\n\n return width;\n}\n\nfunction fontSize(item) {\n return item.fontSize != null ? +item.fontSize || 0 : 11;\n}\nfunction lineHeight(item) {\n return item.lineHeight != null ? item.lineHeight : fontSize(item) + 2;\n}\n\nfunction lineArray(_) {\n return isArray(_) ? _.length > 1 ? _ : _[0] : _;\n}\n\nfunction textLines(item) {\n return lineArray(item.lineBreak && item.text && !isArray(item.text) ? item.text.split(item.lineBreak) : item.text);\n}\nfunction multiLineOffset(item) {\n const tl = textLines(item);\n return (isArray(tl) ? tl.length - 1 : 0) * lineHeight(item);\n}\nfunction textValue(item, line) {\n const text = line == null ? '' : (line + '').trim();\n return item.limit > 0 && text.length ? truncate(item, text) : text;\n}\n\nfunction widthGetter(item) {\n if (textMetrics.width === measureWidth) {\n // we are using canvas\n const currentFont = font(item);\n return text => _measureWidth(text, currentFont);\n } else {\n // we are relying on estimates\n const currentFontHeight = fontSize(item);\n return text => _estimateWidth(text, currentFontHeight);\n }\n}\n\nfunction truncate(item, text) {\n var limit = +item.limit,\n width = widthGetter(item);\n if (width(text) < limit) return text;\n var ellipsis = item.ellipsis || '\\u2026',\n rtl = item.dir === 'rtl',\n lo = 0,\n hi = text.length,\n mid;\n limit -= width(ellipsis);\n\n if (rtl) {\n while (lo < hi) {\n mid = lo + hi >>> 1;\n if (width(text.slice(mid)) > limit) lo = mid + 1;else hi = mid;\n }\n\n return ellipsis + text.slice(lo);\n } else {\n while (lo < hi) {\n mid = 1 + (lo + hi >>> 1);\n if (width(text.slice(0, mid)) < limit) lo = mid;else hi = mid - 1;\n }\n\n return text.slice(0, lo) + ellipsis;\n }\n}\n\nfunction fontFamily(item, quote) {\n var font = item.font;\n return (quote && font ? String(font).replace(/\"/g, '\\'') : font) || 'sans-serif';\n}\nfunction font(item, quote) {\n return '' + (item.fontStyle ? item.fontStyle + ' ' : '') + (item.fontVariant ? item.fontVariant + ' ' : '') + (item.fontWeight ? item.fontWeight + ' ' : '') + fontSize(item) + 'px ' + fontFamily(item, quote);\n}\nfunction offset(item) {\n // perform our own font baseline calculation\n // why? not all browsers support SVG 1.1 'alignment-baseline' :(\n // this also ensures consistent layout across renderers\n var baseline = item.baseline,\n h = fontSize(item);\n return Math.round(baseline === 'top' ? 0.79 * h : baseline === 'middle' ? 0.30 * h : baseline === 'bottom' ? -0.21 * h : baseline === 'line-top' ? 0.29 * h + 0.5 * lineHeight(item) : baseline === 'line-bottom' ? 0.29 * h - 0.5 * lineHeight(item) : 0);\n}\n\nconst textAlign = {\n 'left': 'start',\n 'center': 'middle',\n 'right': 'end'\n};\nconst tempBounds = new Bounds();\n\nfunction anchorPoint(item) {\n var x = item.x || 0,\n y = item.y || 0,\n r = item.radius || 0,\n t;\n\n if (r) {\n t = (item.theta || 0) - HalfPi;\n x += r * Math.cos(t);\n y += r * Math.sin(t);\n }\n\n tempBounds.x1 = x;\n tempBounds.y1 = y;\n return tempBounds;\n}\n\nfunction attr(emit, item) {\n var dx = item.dx || 0,\n dy = (item.dy || 0) + offset(item),\n p = anchorPoint(item),\n x = p.x1,\n y = p.y1,\n a = item.angle || 0,\n t;\n emit('text-anchor', textAlign[item.align] || 'start');\n\n if (a) {\n t = translate(x, y) + ' ' + rotate(a);\n if (dx || dy) t += ' ' + translate(dx, dy);\n } else {\n t = translate(x + dx, y + dy);\n }\n\n emit('transform', t);\n}\n\nfunction bound(bounds, item, mode) {\n var h = textMetrics.height(item),\n a = item.align,\n p = anchorPoint(item),\n x = p.x1,\n y = p.y1,\n dx = item.dx || 0,\n dy = (item.dy || 0) + offset(item) - Math.round(0.8 * h),\n // use 4/5 offset\n tl = textLines(item),\n w; // get dimensions\n\n if (isArray(tl)) {\n // multi-line text\n h += lineHeight(item) * (tl.length - 1);\n w = tl.reduce((w, t) => Math.max(w, textMetrics.width(item, t)), 0);\n } else {\n // single-line text\n w = textMetrics.width(item, tl);\n } // horizontal alignment\n\n\n if (a === 'center') {\n dx -= w / 2;\n } else if (a === 'right') {\n dx -= w;\n } else ;\n\n bounds.set(dx += x, dy += y, dx + w, dy + h);\n\n if (item.angle && !mode) {\n bounds.rotate(item.angle * DegToRad, x, y);\n } else if (mode === 2) {\n return bounds.rotatedPoints(item.angle * DegToRad, x, y);\n }\n\n return bounds;\n}\n\nfunction draw(context, scene, bounds) {\n visit(scene, item => {\n var opacity = item.opacity == null ? 1 : item.opacity,\n p,\n x,\n y,\n i,\n lh,\n tl,\n str;\n if (bounds && !bounds.intersects(item.bounds) || // bounds check\n opacity === 0 || item.fontSize <= 0 || item.text == null || item.text.length === 0) return;\n context.font = font(item);\n context.textAlign = item.align || 'left';\n p = anchorPoint(item);\n x = p.x1, y = p.y1;\n\n if (item.angle) {\n context.save();\n context.translate(x, y);\n context.rotate(item.angle * DegToRad);\n x = y = 0; // reset x, y\n }\n\n x += item.dx || 0;\n y += (item.dy || 0) + offset(item);\n tl = textLines(item);\n blend(context, item);\n\n if (isArray(tl)) {\n lh = lineHeight(item);\n\n for (i = 0; i < tl.length; ++i) {\n str = textValue(item, tl[i]);\n\n if (item.fill && fill(context, item, opacity)) {\n context.fillText(str, x, y);\n }\n\n if (item.stroke && stroke(context, item, opacity)) {\n context.strokeText(str, x, y);\n }\n\n y += lh;\n }\n } else {\n str = textValue(item, tl);\n\n if (item.fill && fill(context, item, opacity)) {\n context.fillText(str, x, y);\n }\n\n if (item.stroke && stroke(context, item, opacity)) {\n context.strokeText(str, x, y);\n }\n }\n\n if (item.angle) context.restore();\n });\n}\n\nfunction hit(context, item, x, y, gx, gy) {\n if (item.fontSize <= 0) return false;\n if (!item.angle) return true; // bounds sufficient if no rotation\n // project point into space of unrotated bounds\n\n var p = anchorPoint(item),\n ax = p.x1,\n ay = p.y1,\n b = bound(tempBounds, item, 1),\n a = -item.angle * DegToRad,\n cos = Math.cos(a),\n sin = Math.sin(a),\n px = cos * gx - sin * gy + (ax - cos * ax + sin * ay),\n py = sin * gx + cos * gy + (ay - sin * ax - cos * ay);\n return b.contains(px, py);\n}\n\nfunction intersectText(item, box) {\n const p = bound(tempBounds, item, 2);\n return intersectBoxLine(box, p[0], p[1], p[2], p[3]) || intersectBoxLine(box, p[0], p[1], p[4], p[5]) || intersectBoxLine(box, p[4], p[5], p[6], p[7]) || intersectBoxLine(box, p[2], p[3], p[6], p[7]);\n}\n\nvar text = {\n type: 'text',\n tag: 'text',\n nested: false,\n attr: attr,\n bound: bound,\n draw: draw,\n pick: pick$1(hit),\n isect: intersectText\n};\n\nvar trail = markMultiItemPath('trail', trail$1, pickTrail);\n\nvar Marks = {\n arc: arc,\n area: area,\n group: group,\n image: image,\n line: line,\n path: path$2,\n rect: rect,\n rule: rule,\n shape: shape,\n symbol: symbol,\n text: text,\n trail: trail\n};\n\nfunction boundItem (item, func, opt) {\n var type = Marks[item.mark.marktype],\n bound = func || type.bound;\n if (type.nested) item = item.mark;\n return bound(item.bounds || (item.bounds = new Bounds()), item, opt);\n}\n\nvar DUMMY = {\n mark: null\n};\nfunction boundMark (mark, bounds, opt) {\n var type = Marks[mark.marktype],\n bound = type.bound,\n items = mark.items,\n hasItems = items && items.length,\n i,\n n,\n item,\n b;\n\n if (type.nested) {\n if (hasItems) {\n item = items[0];\n } else {\n // no items, fake it\n DUMMY.mark = mark;\n item = DUMMY;\n }\n\n b = boundItem(item, bound, opt);\n bounds = bounds && bounds.union(b) || b;\n return bounds;\n }\n\n bounds = bounds || mark.bounds && mark.bounds.clear() || new Bounds();\n\n if (hasItems) {\n for (i = 0, n = items.length; i < n; ++i) {\n bounds.union(boundItem(items[i], bound, opt));\n }\n }\n\n return mark.bounds = bounds;\n}\n\nconst keys = ['marktype', 'name', 'role', 'interactive', 'clip', 'items', 'zindex', 'x', 'y', 'width', 'height', 'align', 'baseline', // layout\n'fill', 'fillOpacity', 'opacity', 'blend', // fill\n'stroke', 'strokeOpacity', 'strokeWidth', 'strokeCap', // stroke\n'strokeDash', 'strokeDashOffset', // stroke dash\n'strokeForeground', 'strokeOffset', // group\n'startAngle', 'endAngle', 'innerRadius', 'outerRadius', // arc\n'cornerRadius', 'padAngle', // arc, rect\n'cornerRadiusTopLeft', 'cornerRadiusTopRight', // rect, group\n'cornerRadiusBottomLeft', 'cornerRadiusBottomRight', 'interpolate', 'tension', 'orient', 'defined', // area, line\n'url', 'aspect', 'smooth', // image\n'path', 'scaleX', 'scaleY', // path\n'x2', 'y2', // rule\n'size', 'shape', // symbol\n'text', 'angle', 'theta', 'radius', 'dir', 'dx', 'dy', // text\n'ellipsis', 'limit', 'lineBreak', 'lineHeight', 'font', 'fontSize', 'fontWeight', 'fontStyle', 'fontVariant', // font\n'description', 'aria', 'ariaRole', 'ariaRoleDescription' // aria\n];\nfunction sceneToJSON(scene, indent) {\n return JSON.stringify(scene, keys, indent);\n}\nfunction sceneFromJSON(json) {\n const scene = typeof json === 'string' ? JSON.parse(json) : json;\n return initialize(scene);\n}\n\nfunction initialize(scene) {\n var type = scene.marktype,\n items = scene.items,\n parent,\n i,\n n;\n\n if (items) {\n for (i = 0, n = items.length; i < n; ++i) {\n parent = type ? 'mark' : 'group';\n items[i][parent] = scene;\n if (items[i].zindex) items[i][parent].zdirty = true;\n if ('group' === (type || parent)) initialize(items[i]);\n }\n }\n\n if (type) boundMark(scene);\n return scene;\n}\n\nfunction Scenegraph(scene) {\n if (arguments.length) {\n this.root = sceneFromJSON(scene);\n } else {\n this.root = createMark({\n marktype: 'group',\n name: 'root',\n role: 'frame'\n });\n this.root.items = [new GroupItem(this.root)];\n }\n}\nScenegraph.prototype = {\n toJSON(indent) {\n return sceneToJSON(this.root, indent || 0);\n },\n\n mark(markdef, group, index) {\n group = group || this.root.items[0];\n const mark = createMark(markdef, group);\n group.items[index] = mark;\n if (mark.zindex) mark.group.zdirty = true;\n return mark;\n }\n\n};\n\nfunction createMark(def, group) {\n const mark = {\n bounds: new Bounds(),\n clip: !!def.clip,\n group: group,\n interactive: def.interactive === false ? false : true,\n items: [],\n marktype: def.marktype,\n name: def.name || undefined,\n role: def.role || undefined,\n zindex: def.zindex || 0\n }; // add accessibility properties if defined\n\n if (def.aria != null) {\n mark.aria = def.aria;\n }\n\n if (def.description) {\n mark.description = def.description;\n }\n\n return mark;\n}\n\n// create a new DOM element\nfunction domCreate(doc, tag, ns) {\n if (!doc && typeof document !== 'undefined' && document.createElement) {\n doc = document;\n }\n\n return doc ? ns ? doc.createElementNS(ns, tag) : doc.createElement(tag) : null;\n} // find first child element with matching tag\n\nfunction domFind(el, tag) {\n tag = tag.toLowerCase();\n var nodes = el.childNodes,\n i = 0,\n n = nodes.length;\n\n for (; i < n; ++i) if (nodes[i].tagName.toLowerCase() === tag) {\n return nodes[i];\n }\n} // retrieve child element at given index\n// create & insert if doesn't exist or if tags do not match\n\nfunction domChild(el, index, tag, ns) {\n var a = el.childNodes[index],\n b;\n\n if (!a || a.tagName.toLowerCase() !== tag.toLowerCase()) {\n b = a || null;\n a = domCreate(el.ownerDocument, tag, ns);\n el.insertBefore(a, b);\n }\n\n return a;\n} // remove all child elements at or above the given index\n\nfunction domClear(el, index) {\n var nodes = el.childNodes,\n curr = nodes.length;\n\n while (curr > index) el.removeChild(nodes[--curr]);\n\n return el;\n} // generate css class name for mark\n\nfunction cssClass(mark) {\n return 'mark-' + mark.marktype + (mark.role ? ' role-' + mark.role : '') + (mark.name ? ' ' + mark.name : '');\n}\n\nfunction point (event, el) {\n const rect = el.getBoundingClientRect();\n return [event.clientX - rect.left - (el.clientLeft || 0), event.clientY - rect.top - (el.clientTop || 0)];\n}\n\nfunction resolveItem (item, event, el, origin) {\n var mark = item && item.mark,\n mdef,\n p;\n\n if (mark && (mdef = Marks[mark.marktype]).tip) {\n p = point(event, el);\n p[0] -= origin[0];\n p[1] -= origin[1];\n\n while (item = item.mark.group) {\n p[0] -= item.x || 0;\n p[1] -= item.y || 0;\n }\n\n item = mdef.tip(mark.items, p);\n }\n\n return item;\n}\n\n/**\n * Create a new Handler instance.\n * @param {object} [customLoader] - Optional loader instance for\n * href URL sanitization. If not specified, a standard loader\n * instance will be generated.\n * @param {function} [customTooltip] - Optional tooltip handler\n * function for custom tooltip display.\n * @constructor\n */\n\nfunction Handler(customLoader, customTooltip) {\n this._active = null;\n this._handlers = {};\n this._loader = customLoader || loader();\n this._tooltip = customTooltip || defaultTooltip;\n} // The default tooltip display handler.\n// Sets the HTML title attribute on the visualization container.\n\nfunction defaultTooltip(handler, event, item, value) {\n handler.element().setAttribute('title', value || '');\n}\n\nHandler.prototype = {\n /**\n * Initialize a new Handler instance.\n * @param {DOMElement} el - The containing DOM element for the display.\n * @param {Array<number>} origin - The origin of the display, in pixels.\n * The coordinate system will be translated to this point.\n * @param {object} [obj] - Optional context object that should serve as\n * the \"this\" context for event callbacks.\n * @return {Handler} - This handler instance.\n */\n initialize(el, origin, obj) {\n this._el = el;\n this._obj = obj || null;\n return this.origin(origin);\n },\n\n /**\n * Returns the parent container element for a visualization.\n * @return {DOMElement} - The containing DOM element.\n */\n element() {\n return this._el;\n },\n\n /**\n * Returns the scene element (e.g., canvas or SVG) of the visualization\n * Subclasses must override if the first child is not the scene element.\n * @return {DOMElement} - The scene (e.g., canvas or SVG) element.\n */\n canvas() {\n return this._el && this._el.firstChild;\n },\n\n /**\n * Get / set the origin coordinates of the visualization.\n */\n origin(origin) {\n if (arguments.length) {\n this._origin = origin || [0, 0];\n return this;\n } else {\n return this._origin.slice();\n }\n },\n\n /**\n * Get / set the scenegraph root.\n */\n scene(scene) {\n if (!arguments.length) return this._scene;\n this._scene = scene;\n return this;\n },\n\n /**\n * Add an event handler. Subclasses should override this method.\n */\n on()\n /*type, handler*/\n {},\n\n /**\n * Remove an event handler. Subclasses should override this method.\n */\n off()\n /*type, handler*/\n {},\n\n /**\n * Utility method for finding the array index of an event handler.\n * @param {Array} h - An array of registered event handlers.\n * @param {string} type - The event type.\n * @param {function} handler - The event handler instance to find.\n * @return {number} - The handler's array index or -1 if not registered.\n */\n _handlerIndex(h, type, handler) {\n for (let i = h ? h.length : 0; --i >= 0;) {\n if (h[i].type === type && (!handler || h[i].handler === handler)) {\n return i;\n }\n }\n\n return -1;\n },\n\n /**\n * Returns an array with registered event handlers.\n * @param {string} [type] - The event type to query. Any annotations\n * are ignored; for example, for the argument \"click.foo\", \".foo\" will\n * be ignored and the method returns all \"click\" handlers. If type is\n * null or unspecified, this method returns handlers for all types.\n * @return {Array} - A new array containing all registered event handlers.\n */\n handlers(type) {\n const h = this._handlers,\n a = [];\n\n if (type) {\n a.push(...h[this.eventName(type)]);\n } else {\n for (const k in h) {\n a.push(...h[k]);\n }\n }\n\n return a;\n },\n\n /**\n * Parses an event name string to return the specific event type.\n * For example, given \"click.foo\" returns \"click\"\n * @param {string} name - The input event type string.\n * @return {string} - A string with the event type only.\n */\n eventName(name) {\n const i = name.indexOf('.');\n return i < 0 ? name : name.slice(0, i);\n },\n\n /**\n * Handle hyperlink navigation in response to an item.href value.\n * @param {Event} event - The event triggering hyperlink navigation.\n * @param {Item} item - The scenegraph item.\n * @param {string} href - The URL to navigate to.\n */\n handleHref(event, item, href) {\n this._loader.sanitize(href, {\n context: 'href'\n }).then(opt => {\n const e = new MouseEvent(event.type, event),\n a = domCreate(null, 'a');\n\n for (const name in opt) a.setAttribute(name, opt[name]);\n\n a.dispatchEvent(e);\n }).catch(() => {\n /* do nothing */\n });\n },\n\n /**\n * Handle tooltip display in response to an item.tooltip value.\n * @param {Event} event - The event triggering tooltip display.\n * @param {Item} item - The scenegraph item.\n * @param {boolean} show - A boolean flag indicating whether\n * to show or hide a tooltip for the given item.\n */\n handleTooltip(event, item, show) {\n if (item && item.tooltip != null) {\n item = resolveItem(item, event, this.canvas(), this._origin);\n const value = show && item && item.tooltip || null;\n\n this._tooltip.call(this._obj, this, event, item, value);\n }\n },\n\n /**\n * Returns the size of a scenegraph item and its position relative\n * to the viewport.\n * @param {Item} item - The scenegraph item.\n * @return {object} - A bounding box object (compatible with the\n * DOMRect type) consisting of x, y, width, heigh, top, left,\n * right, and bottom properties.\n */\n getItemBoundingClientRect(item) {\n const el = this.canvas();\n if (!el) return;\n const rect = el.getBoundingClientRect(),\n origin = this._origin,\n bounds = item.bounds,\n width = bounds.width(),\n height = bounds.height();\n let x = bounds.x1 + origin[0] + rect.left,\n y = bounds.y1 + origin[1] + rect.top; // translate coordinate for each parent group\n\n while (item.mark && (item = item.mark.group)) {\n x += item.x || 0;\n y += item.y || 0;\n } // return DOMRect-compatible bounding box\n\n\n return {\n x,\n y,\n width,\n height,\n left: x,\n top: y,\n right: x + width,\n bottom: y + height\n };\n }\n\n};\n\n/**\n * Create a new Renderer instance.\n * @param {object} [loader] - Optional loader instance for\n * image and href URL sanitization. If not specified, a\n * standard loader instance will be generated.\n * @constructor\n */\n\nfunction Renderer(loader) {\n this._el = null;\n this._bgcolor = null;\n this._loader = new ResourceLoader(loader);\n}\nRenderer.prototype = {\n /**\n * Initialize a new Renderer instance.\n * @param {DOMElement} el - The containing DOM element for the display.\n * @param {number} width - The coordinate width of the display, in pixels.\n * @param {number} height - The coordinate height of the display, in pixels.\n * @param {Array<number>} origin - The origin of the display, in pixels.\n * The coordinate system will be translated to this point.\n * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply\n * the width and height to determine the final pixel size.\n * @return {Renderer} - This renderer instance.\n */\n initialize(el, width, height, origin, scaleFactor) {\n this._el = el;\n return this.resize(width, height, origin, scaleFactor);\n },\n\n /**\n * Returns the parent container element for a visualization.\n * @return {DOMElement} - The containing DOM element.\n */\n element() {\n return this._el;\n },\n\n /**\n * Returns the scene element (e.g., canvas or SVG) of the visualization\n * Subclasses must override if the first child is not the scene element.\n * @return {DOMElement} - The scene (e.g., canvas or SVG) element.\n */\n canvas() {\n return this._el && this._el.firstChild;\n },\n\n /**\n * Get / set the background color.\n */\n background(bgcolor) {\n if (arguments.length === 0) return this._bgcolor;\n this._bgcolor = bgcolor;\n return this;\n },\n\n /**\n * Resize the display.\n * @param {number} width - The new coordinate width of the display, in pixels.\n * @param {number} height - The new coordinate height of the display, in pixels.\n * @param {Array<number>} origin - The new origin of the display, in pixels.\n * The coordinate system will be translated to this point.\n * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply\n * the width and height to determine the final pixel size.\n * @return {Renderer} - This renderer instance;\n */\n resize(width, height, origin, scaleFactor) {\n this._width = width;\n this._height = height;\n this._origin = origin || [0, 0];\n this._scale = scaleFactor || 1;\n return this;\n },\n\n /**\n * Report a dirty item whose bounds should be redrawn.\n * This base class method does nothing. Subclasses that perform\n * incremental should implement this method.\n * @param {Item} item - The dirty item whose bounds should be redrawn.\n */\n dirty()\n /*item*/\n {},\n\n /**\n * Render an input scenegraph, potentially with a set of dirty items.\n * This method will perform an immediate rendering with available resources.\n * The renderer may also need to perform image loading to perform a complete\n * render. This process can lead to asynchronous re-rendering of the scene\n * after this method returns. To receive notification when rendering is\n * complete, use the renderAsync method instead.\n * @param {object} scene - The root mark of a scenegraph to render.\n * @return {Renderer} - This renderer instance.\n */\n render(scene) {\n const r = this; // bind arguments into a render call, and cache it\n // this function may be subsequently called for async redraw\n\n r._call = function () {\n r._render(scene);\n }; // invoke the renderer\n\n\n r._call(); // clear the cached call for garbage collection\n // async redraws will stash their own copy\n\n\n r._call = null;\n return r;\n },\n\n /**\n * Internal rendering method. Renderer subclasses should override this\n * method to actually perform rendering.\n * @param {object} scene - The root mark of a scenegraph to render.\n */\n _render()\n /*scene*/\n {// subclasses to override\n },\n\n /**\n * Asynchronous rendering method. Similar to render, but returns a Promise\n * that resolves when all rendering is completed. Sometimes a renderer must\n * perform image loading to get a complete rendering. The returned\n * Promise will not resolve until this process completes.\n * @param {object} scene - The root mark of a scenegraph to render.\n * @return {Promise} - A Promise that resolves when rendering is complete.\n */\n renderAsync(scene) {\n const r = this.render(scene);\n return this._ready ? this._ready.then(() => r) : Promise.resolve(r);\n },\n\n /**\n * Internal method for asynchronous resource loading.\n * Proxies method calls to the ImageLoader, and tracks loading\n * progress to invoke a re-render once complete.\n * @param {string} method - The method name to invoke on the ImageLoader.\n * @param {string} uri - The URI for the requested resource.\n * @return {Promise} - A Promise that resolves to the requested resource.\n */\n _load(method, uri) {\n var r = this,\n p = r._loader[method](uri);\n\n if (!r._ready) {\n // re-render the scene when loading completes\n const call = r._call;\n r._ready = r._loader.ready().then(redraw => {\n if (redraw) call();\n r._ready = null;\n });\n }\n\n return p;\n },\n\n /**\n * Sanitize a URL to include as a hyperlink in the rendered scene.\n * This method proxies a call to ImageLoader.sanitizeURL, but also tracks\n * image loading progress and invokes a re-render once complete.\n * @param {string} uri - The URI string to sanitize.\n * @return {Promise} - A Promise that resolves to the sanitized URL.\n */\n sanitizeURL(uri) {\n return this._load('sanitizeURL', uri);\n },\n\n /**\n * Requests an image to include in the rendered scene.\n * This method proxies a call to ImageLoader.loadImage, but also tracks\n * image loading progress and invokes a re-render once complete.\n * @param {string} uri - The URI string of the image.\n * @return {Promise} - A Promise that resolves to the loaded Image.\n */\n loadImage(uri) {\n return this._load('loadImage', uri);\n }\n\n};\n\nconst KeyDownEvent = 'keydown';\nconst KeyPressEvent = 'keypress';\nconst KeyUpEvent = 'keyup';\nconst DragEnterEvent = 'dragenter';\nconst DragLeaveEvent = 'dragleave';\nconst DragOverEvent = 'dragover';\nconst MouseDownEvent = 'mousedown';\nconst MouseUpEvent = 'mouseup';\nconst MouseMoveEvent = 'mousemove';\nconst MouseOutEvent = 'mouseout';\nconst MouseOverEvent = 'mouseover';\nconst ClickEvent = 'click';\nconst DoubleClickEvent = 'dblclick';\nconst WheelEvent = 'wheel';\nconst MouseWheelEvent = 'mousewheel';\nconst TouchStartEvent = 'touchstart';\nconst TouchMoveEvent = 'touchmove';\nconst TouchEndEvent = 'touchend';\nconst Events = [KeyDownEvent, KeyPressEvent, KeyUpEvent, DragEnterEvent, DragLeaveEvent, DragOverEvent, MouseDownEvent, MouseUpEvent, MouseMoveEvent, MouseOutEvent, MouseOverEvent, ClickEvent, DoubleClickEvent, WheelEvent, MouseWheelEvent, TouchStartEvent, TouchMoveEvent, TouchEndEvent];\nconst TooltipShowEvent = MouseMoveEvent;\nconst TooltipHideEvent = MouseOutEvent;\nconst HrefEvent = ClickEvent;\n\nfunction CanvasHandler(loader, tooltip) {\n Handler.call(this, loader, tooltip);\n this._down = null;\n this._touch = null;\n this._first = true;\n this._events = {};\n}\n\nconst eventBundle = type => type === TouchStartEvent || type === TouchMoveEvent || type === TouchEndEvent ? [TouchStartEvent, TouchMoveEvent, TouchEndEvent] : [type]; // lazily add listeners to the canvas as needed\n\n\nfunction eventListenerCheck(handler, type) {\n eventBundle(type).forEach(_ => addEventListener(handler, _));\n}\n\nfunction addEventListener(handler, type) {\n const canvas = handler.canvas();\n\n if (canvas && !handler._events[type]) {\n handler._events[type] = 1;\n canvas.addEventListener(type, handler[type] ? evt => handler[type](evt) : evt => handler.fire(type, evt));\n }\n}\n\nfunction move(moveEvent, overEvent, outEvent) {\n return function (evt) {\n const a = this._active,\n p = this.pickEvent(evt);\n\n if (p === a) {\n // active item and picked item are the same\n this.fire(moveEvent, evt); // fire move\n } else {\n // active item and picked item are different\n if (!a || !a.exit) {\n // fire out for prior active item\n // suppress if active item was removed from scene\n this.fire(outEvent, evt);\n }\n\n this._active = p; // set new active item\n\n this.fire(overEvent, evt); // fire over for new active item\n\n this.fire(moveEvent, evt); // fire move for new active item\n }\n };\n}\n\nfunction inactive(type) {\n return function (evt) {\n this.fire(type, evt);\n this._active = null;\n };\n}\n\ninherits(CanvasHandler, Handler, {\n initialize(el, origin, obj) {\n this._canvas = el && domFind(el, 'canvas'); // add minimal events required for proper state management\n\n [ClickEvent, MouseDownEvent, MouseMoveEvent, MouseOutEvent, DragLeaveEvent].forEach(type => eventListenerCheck(this, type));\n return Handler.prototype.initialize.call(this, el, origin, obj);\n },\n\n // return the backing canvas instance\n canvas() {\n return this._canvas;\n },\n\n // retrieve the current canvas context\n context() {\n return this._canvas.getContext('2d');\n },\n\n // supported events\n events: Events,\n\n // to keep old versions of firefox happy\n DOMMouseScroll(evt) {\n this.fire(MouseWheelEvent, evt);\n },\n\n mousemove: move(MouseMoveEvent, MouseOverEvent, MouseOutEvent),\n dragover: move(DragOverEvent, DragEnterEvent, DragLeaveEvent),\n mouseout: inactive(MouseOutEvent),\n dragleave: inactive(DragLeaveEvent),\n\n mousedown(evt) {\n this._down = this._active;\n this.fire(MouseDownEvent, evt);\n },\n\n click(evt) {\n if (this._down === this._active) {\n this.fire(ClickEvent, evt);\n this._down = null;\n }\n },\n\n touchstart(evt) {\n this._touch = this.pickEvent(evt.changedTouches[0]);\n\n if (this._first) {\n this._active = this._touch;\n this._first = false;\n }\n\n this.fire(TouchStartEvent, evt, true);\n },\n\n touchmove(evt) {\n this.fire(TouchMoveEvent, evt, true);\n },\n\n touchend(evt) {\n this.fire(TouchEndEvent, evt, true);\n this._touch = null;\n },\n\n // fire an event\n fire(type, evt, touch) {\n const a = touch ? this._touch : this._active,\n h = this._handlers[type]; // set event type relative to scenegraph items\n\n evt.vegaType = type; // handle hyperlinks and tooltips first\n\n if (type === HrefEvent && a && a.href) {\n this.handleHref(evt, a, a.href);\n } else if (type === TooltipShowEvent || type === TooltipHideEvent) {\n this.handleTooltip(evt, a, type !== TooltipHideEvent);\n } // invoke all registered handlers\n\n\n if (h) {\n for (let i = 0, len = h.length; i < len; ++i) {\n h[i].handler.call(this._obj, evt, a);\n }\n }\n },\n\n // add an event handler\n on(type, handler) {\n const name = this.eventName(type),\n h = this._handlers,\n i = this._handlerIndex(h[name], type, handler);\n\n if (i < 0) {\n eventListenerCheck(this, type);\n (h[name] || (h[name] = [])).push({\n type: type,\n handler: handler\n });\n }\n\n return this;\n },\n\n // remove an event handler\n off(type, handler) {\n const name = this.eventName(type),\n h = this._handlers[name],\n i = this._handlerIndex(h, type, handler);\n\n if (i >= 0) {\n h.splice(i, 1);\n }\n\n return this;\n },\n\n pickEvent(evt) {\n const p = point(evt, this._canvas),\n o = this._origin;\n return this.pick(this._scene, p[0], p[1], p[0] - o[0], p[1] - o[1]);\n },\n\n // find the scenegraph item at the current mouse position\n // x, y -- the absolute x, y mouse coordinates on the canvas element\n // gx, gy -- the relative coordinates within the current group\n pick(scene, x, y, gx, gy) {\n const g = this.context(),\n mark = Marks[scene.marktype];\n return mark.pick.call(this, g, scene, x, y, gx, gy);\n }\n\n});\n\nfunction devicePixelRatio() {\n return typeof window !== 'undefined' ? window.devicePixelRatio || 1 : 1;\n}\n\nvar pixelRatio = devicePixelRatio();\nfunction resize (canvas, width, height, origin, scaleFactor, opt) {\n const inDOM = typeof HTMLElement !== 'undefined' && canvas instanceof HTMLElement && canvas.parentNode != null,\n context = canvas.getContext('2d'),\n ratio = inDOM ? pixelRatio : scaleFactor;\n canvas.width = width * ratio;\n canvas.height = height * ratio;\n\n for (const key in opt) {\n context[key] = opt[key];\n }\n\n if (inDOM && ratio !== 1) {\n canvas.style.width = width + 'px';\n canvas.style.height = height + 'px';\n }\n\n context.pixelRatio = ratio;\n context.setTransform(ratio, 0, 0, ratio, ratio * origin[0], ratio * origin[1]);\n return canvas;\n}\n\nfunction CanvasRenderer(loader) {\n Renderer.call(this, loader);\n this._options = {};\n this._redraw = false;\n this._dirty = new Bounds();\n this._tempb = new Bounds();\n}\nconst base$1 = Renderer.prototype;\n\nconst viewBounds = (origin, width, height) => new Bounds().set(0, 0, width, height).translate(-origin[0], -origin[1]);\n\nfunction clipToBounds(g, b, origin) {\n // expand bounds by 1 pixel, then round to pixel boundaries\n b.expand(1).round(); // align to base pixel grid in case of non-integer scaling (#2425)\n\n if (g.pixelRatio % 1) {\n b.scale(g.pixelRatio).round().scale(1 / g.pixelRatio);\n } // to avoid artifacts translate if origin has fractional pixels\n\n\n b.translate(-(origin[0] % 1), -(origin[1] % 1)); // set clip path\n\n g.beginPath();\n g.rect(b.x1, b.y1, b.width(), b.height());\n g.clip();\n return b;\n}\n\ninherits(CanvasRenderer, Renderer, {\n initialize(el, width, height, origin, scaleFactor, options) {\n this._options = options || {};\n this._canvas = this._options.externalContext ? null : canvas(1, 1, this._options.type); // instantiate a small canvas\n\n if (el && this._canvas) {\n domClear(el, 0).appendChild(this._canvas);\n\n this._canvas.setAttribute('class', 'marks');\n } // this method will invoke resize to size the canvas appropriately\n\n\n return base$1.initialize.call(this, el, width, height, origin, scaleFactor);\n },\n\n resize(width, height, origin, scaleFactor) {\n base$1.resize.call(this, width, height, origin, scaleFactor);\n\n if (this._canvas) {\n // configure canvas size and transform\n resize(this._canvas, this._width, this._height, this._origin, this._scale, this._options.context);\n } else {\n // external context needs to be scaled and positioned to origin\n const ctx = this._options.externalContext;\n if (!ctx) error('CanvasRenderer is missing a valid canvas or context');\n ctx.scale(this._scale, this._scale);\n ctx.translate(this._origin[0], this._origin[1]);\n }\n\n this._redraw = true;\n return this;\n },\n\n canvas() {\n return this._canvas;\n },\n\n context() {\n return this._options.externalContext || (this._canvas ? this._canvas.getContext('2d') : null);\n },\n\n dirty(item) {\n const b = this._tempb.clear().union(item.bounds);\n\n let g = item.mark.group;\n\n while (g) {\n b.translate(g.x || 0, g.y || 0);\n g = g.mark.group;\n }\n\n this._dirty.union(b);\n },\n\n _render(scene) {\n const g = this.context(),\n o = this._origin,\n w = this._width,\n h = this._height,\n db = this._dirty,\n vb = viewBounds(o, w, h); // setup\n\n g.save();\n const b = this._redraw || db.empty() ? (this._redraw = false, vb.expand(1)) : clipToBounds(g, vb.intersect(db), o);\n this.clear(-o[0], -o[1], w, h); // render\n\n this.draw(g, scene, b); // takedown\n\n g.restore();\n db.clear();\n return this;\n },\n\n draw(ctx, scene, bounds) {\n const mark = Marks[scene.marktype];\n if (scene.clip) clip(ctx, scene);\n mark.draw.call(this, ctx, scene, bounds);\n if (scene.clip) ctx.restore();\n },\n\n clear(x, y, w, h) {\n const opt = this._options,\n g = this.context();\n\n if (opt.type !== 'pdf' && !opt.externalContext) {\n // calling clear rect voids vector output in pdf mode\n // and could remove external context content (#2615)\n g.clearRect(x, y, w, h);\n }\n\n if (this._bgcolor != null) {\n g.fillStyle = this._bgcolor;\n g.fillRect(x, y, w, h);\n }\n }\n\n});\n\nfunction SVGHandler(loader, tooltip) {\n Handler.call(this, loader, tooltip);\n const h = this;\n h._hrefHandler = listener(h, (evt, item) => {\n if (item && item.href) h.handleHref(evt, item, item.href);\n });\n h._tooltipHandler = listener(h, (evt, item) => {\n h.handleTooltip(evt, item, evt.type !== TooltipHideEvent);\n });\n} // wrap an event listener for the SVG DOM\n\nconst listener = (context, handler) => evt => {\n let item = evt.target.__data__;\n item = Array.isArray(item) ? item[0] : item;\n evt.vegaType = evt.type;\n handler.call(context._obj, evt, item);\n};\n\ninherits(SVGHandler, Handler, {\n initialize(el, origin, obj) {\n let svg = this._svg;\n\n if (svg) {\n svg.removeEventListener(HrefEvent, this._hrefHandler);\n svg.removeEventListener(TooltipShowEvent, this._tooltipHandler);\n svg.removeEventListener(TooltipHideEvent, this._tooltipHandler);\n }\n\n this._svg = svg = el && domFind(el, 'svg');\n\n if (svg) {\n svg.addEventListener(HrefEvent, this._hrefHandler);\n svg.addEventListener(TooltipShowEvent, this._tooltipHandler);\n svg.addEventListener(TooltipHideEvent, this._tooltipHandler);\n }\n\n return Handler.prototype.initialize.call(this, el, origin, obj);\n },\n\n canvas() {\n return this._svg;\n },\n\n // add an event handler\n on(type, handler) {\n const name = this.eventName(type),\n h = this._handlers,\n i = this._handlerIndex(h[name], type, handler);\n\n if (i < 0) {\n const x = {\n type,\n handler,\n listener: listener(this, handler)\n };\n (h[name] || (h[name] = [])).push(x);\n\n if (this._svg) {\n this._svg.addEventListener(name, x.listener);\n }\n }\n\n return this;\n },\n\n // remove an event handler\n off(type, handler) {\n const name = this.eventName(type),\n h = this._handlers[name],\n i = this._handlerIndex(h, type, handler);\n\n if (i >= 0) {\n if (this._svg) {\n this._svg.removeEventListener(name, h[i].listener);\n }\n\n h.splice(i, 1);\n }\n\n return this;\n }\n\n});\n\nconst ARIA_HIDDEN = 'aria-hidden';\nconst ARIA_LABEL = 'aria-label';\nconst ARIA_ROLE = 'role';\nconst ARIA_ROLEDESCRIPTION = 'aria-roledescription';\nconst GRAPHICS_OBJECT = 'graphics-object';\nconst GRAPHICS_SYMBOL = 'graphics-symbol';\n\nconst bundle = (role, roledesc, label) => ({\n [ARIA_ROLE]: role,\n [ARIA_ROLEDESCRIPTION]: roledesc,\n [ARIA_LABEL]: label || undefined\n}); // these roles are covered by related roles\n// we can ignore them, no need to generate attributes\n\n\nconst AriaIgnore = toSet(['axis-domain', 'axis-grid', 'axis-label', 'axis-tick', 'axis-title', 'legend-band', 'legend-entry', 'legend-gradient', 'legend-label', 'legend-title', 'legend-symbol', 'title']); // aria attribute generators for guide roles\n\nconst AriaGuides = {\n 'axis': {\n desc: 'axis',\n caption: axisCaption\n },\n 'legend': {\n desc: 'legend',\n caption: legendCaption\n },\n 'title-text': {\n desc: 'title',\n caption: item => `Title text '${titleCaption(item)}'`\n },\n 'title-subtitle': {\n desc: 'subtitle',\n caption: item => `Subtitle text '${titleCaption(item)}'`\n }\n}; // aria properties generated for mark item encoding channels\n\nconst AriaEncode = {\n ariaRole: ARIA_ROLE,\n ariaRoleDescription: ARIA_ROLEDESCRIPTION,\n description: ARIA_LABEL\n};\nfunction ariaItemAttributes(emit, item) {\n const hide = item.aria === false;\n emit(ARIA_HIDDEN, hide || undefined);\n\n if (hide || item.description == null) {\n for (const prop in AriaEncode) {\n emit(AriaEncode[prop], undefined);\n }\n } else {\n const type = item.mark.marktype;\n emit(ARIA_LABEL, item.description);\n emit(ARIA_ROLE, item.ariaRole || (type === 'group' ? GRAPHICS_OBJECT : GRAPHICS_SYMBOL));\n emit(ARIA_ROLEDESCRIPTION, item.ariaRoleDescription || `${type} mark`);\n }\n}\nfunction ariaMarkAttributes(mark) {\n return mark.aria === false ? {\n [ARIA_HIDDEN]: true\n } : AriaIgnore[mark.role] ? null : AriaGuides[mark.role] ? ariaGuide(mark, AriaGuides[mark.role]) : ariaMark(mark);\n}\n\nfunction ariaMark(mark) {\n const type = mark.marktype;\n const recurse = type === 'group' || type === 'text' || mark.items.some(_ => _.description != null && _.aria !== false);\n return bundle(recurse ? GRAPHICS_OBJECT : GRAPHICS_SYMBOL, `${type} mark container`, mark.description);\n}\n\nfunction ariaGuide(mark, opt) {\n try {\n const item = mark.items[0],\n caption = opt.caption || (() => '');\n\n return bundle(opt.role || GRAPHICS_SYMBOL, opt.desc, item.description || caption(item));\n } catch (err) {\n return null;\n }\n}\n\nfunction titleCaption(item) {\n return array(item.text).join(' ');\n}\n\nfunction axisCaption(item) {\n const datum = item.datum,\n orient = item.orient,\n title = datum.title ? extractTitle(item) : null,\n ctx = item.context,\n scale = ctx.scales[datum.scale].value,\n locale = ctx.dataflow.locale(),\n type = scale.type,\n xy = orient === 'left' || orient === 'right' ? 'Y' : 'X';\n return `${xy}-axis` + (title ? ` titled '${title}'` : '') + ` for a ${isDiscrete(type) ? 'discrete' : type} scale` + ` with ${domainCaption(locale, scale, item)}`;\n}\n\nfunction legendCaption(item) {\n const datum = item.datum,\n title = datum.title ? extractTitle(item) : null,\n type = `${datum.type || ''} legend`.trim(),\n scales = datum.scales,\n props = Object.keys(scales),\n ctx = item.context,\n scale = ctx.scales[scales[props[0]]].value,\n locale = ctx.dataflow.locale();\n return capitalize(type) + (title ? ` titled '${title}'` : '') + ` for ${channelCaption(props)}` + ` with ${domainCaption(locale, scale, item)}`;\n}\n\nfunction extractTitle(item) {\n try {\n return array(peek(item.items).items[0].text).join(' ');\n } catch (err) {\n return null;\n }\n}\n\nfunction channelCaption(props) {\n props = props.map(p => p + (p === 'fill' || p === 'stroke' ? ' color' : ''));\n return props.length < 2 ? props[0] : props.slice(0, -1).join(', ') + ' and ' + peek(props);\n}\n\nfunction capitalize(s) {\n return s.length ? s[0].toUpperCase() + s.slice(1) : s;\n}\n\nconst innerText = val => (val + '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n\nconst attrText = val => innerText(val).replace(/\"/g, '&quot;').replace(/\\t/g, '&#x9;').replace(/\\n/g, '&#xA;').replace(/\\r/g, '&#xD;');\n\nfunction markup() {\n let buf = '',\n outer = '',\n inner = '';\n\n const stack = [],\n clear = () => outer = inner = '',\n push = tag => {\n if (outer) {\n buf += `${outer}>${inner}`;\n clear();\n }\n\n stack.push(tag);\n },\n attr = (name, value) => {\n if (value != null) outer += ` ${name}=\"${attrText(value)}\"`;\n return m;\n },\n m = {\n open(tag, ...attrs) {\n push(tag);\n outer = '<' + tag;\n\n for (const set of attrs) {\n for (const key in set) attr(key, set[key]);\n }\n\n return m;\n },\n\n close() {\n const tag = stack.pop();\n\n if (outer) {\n buf += outer + (inner ? `>${inner}</${tag}>` : '/>');\n } else {\n buf += `</${tag}>`;\n }\n\n clear();\n return m;\n },\n\n attr,\n text: t => (inner += innerText(t), m),\n toString: () => buf\n };\n\n return m;\n}\nconst serializeXML = node => _serialize(markup(), node) + '';\n\nfunction _serialize(m, node) {\n m.open(node.tagName);\n\n if (node.hasAttributes()) {\n const attrs = node.attributes,\n n = attrs.length;\n\n for (let i = 0; i < n; ++i) {\n m.attr(attrs[i].name, attrs[i].value);\n }\n }\n\n if (node.hasChildNodes()) {\n const children = node.childNodes,\n n = children.length;\n\n for (let i = 0; i < n; i++) {\n const child = children[i];\n child.nodeType === 3 // text node\n ? m.text(child.nodeValue) : _serialize(m, child);\n }\n }\n\n return m.close();\n}\n\nconst styles = {\n fill: 'fill',\n fillOpacity: 'fill-opacity',\n stroke: 'stroke',\n strokeOpacity: 'stroke-opacity',\n strokeWidth: 'stroke-width',\n strokeCap: 'stroke-linecap',\n strokeJoin: 'stroke-linejoin',\n strokeDash: 'stroke-dasharray',\n strokeDashOffset: 'stroke-dashoffset',\n strokeMiterLimit: 'stroke-miterlimit',\n opacity: 'opacity',\n blend: 'mix-blend-mode'\n}; // ensure miter limit default is consistent with canvas (#2498)\n\nconst rootAttributes = {\n 'fill': 'none',\n 'stroke-miterlimit': 10\n};\n\nconst RootIndex = 0,\n xmlns = 'http://www.w3.org/2000/xmlns/',\n svgns = metadata.xmlns;\nfunction SVGRenderer(loader) {\n Renderer.call(this, loader);\n this._dirtyID = 0;\n this._dirty = [];\n this._svg = null;\n this._root = null;\n this._defs = null;\n}\nconst base = Renderer.prototype;\ninherits(SVGRenderer, Renderer, {\n /**\n * Initialize a new SVGRenderer instance.\n * @param {DOMElement} el - The containing DOM element for the display.\n * @param {number} width - The coordinate width of the display, in pixels.\n * @param {number} height - The coordinate height of the display, in pixels.\n * @param {Array<number>} origin - The origin of the display, in pixels.\n * The coordinate system will be translated to this point.\n * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply\n * the width and height to determine the final pixel size.\n * @return {SVGRenderer} - This renderer instance.\n */\n initialize(el, width, height, origin, scaleFactor) {\n // create the svg definitions cache\n this._defs = {};\n\n this._clearDefs();\n\n if (el) {\n this._svg = domChild(el, 0, 'svg', svgns);\n\n this._svg.setAttributeNS(xmlns, 'xmlns', svgns);\n\n this._svg.setAttributeNS(xmlns, 'xmlns:xlink', metadata['xmlns:xlink']);\n\n this._svg.setAttribute('version', metadata['version']);\n\n this._svg.setAttribute('class', 'marks');\n\n domClear(el, 1); // set the svg root group\n\n this._root = domChild(this._svg, RootIndex, 'g', svgns);\n setAttributes(this._root, rootAttributes); // ensure no additional child elements\n\n domClear(this._svg, RootIndex + 1);\n } // set background color if defined\n\n\n this.background(this._bgcolor);\n return base.initialize.call(this, el, width, height, origin, scaleFactor);\n },\n\n /**\n * Get / set the background color.\n */\n background(bgcolor) {\n if (arguments.length && this._svg) {\n this._svg.style.setProperty('background-color', bgcolor);\n }\n\n return base.background.apply(this, arguments);\n },\n\n /**\n * Resize the display.\n * @param {number} width - The new coordinate width of the display, in pixels.\n * @param {number} height - The new coordinate height of the display, in pixels.\n * @param {Array<number>} origin - The new origin of the display, in pixels.\n * The coordinate system will be translated to this point.\n * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply\n * the width and height to determine the final pixel size.\n * @return {SVGRenderer} - This renderer instance;\n */\n resize(width, height, origin, scaleFactor) {\n base.resize.call(this, width, height, origin, scaleFactor);\n\n if (this._svg) {\n setAttributes(this._svg, {\n width: this._width * this._scale,\n height: this._height * this._scale,\n viewBox: `0 0 ${this._width} ${this._height}`\n });\n\n this._root.setAttribute('transform', `translate(${this._origin})`);\n }\n\n this._dirty = [];\n return this;\n },\n\n /**\n * Returns the SVG element of the visualization.\n * @return {DOMElement} - The SVG element.\n */\n canvas() {\n return this._svg;\n },\n\n /**\n * Returns an SVG text string for the rendered content,\n * or null if this renderer is currently headless.\n */\n svg() {\n const svg = this._svg,\n bg = this._bgcolor;\n if (!svg) return null;\n let node;\n\n if (bg) {\n svg.removeAttribute('style');\n node = domChild(svg, RootIndex, 'rect', svgns);\n setAttributes(node, {\n width: this._width,\n height: this._height,\n fill: bg\n });\n }\n\n const text = serializeXML(svg);\n\n if (bg) {\n svg.removeChild(node);\n\n this._svg.style.setProperty('background-color', bg);\n }\n\n return text;\n },\n\n /**\n * Internal rendering method.\n * @param {object} scene - The root mark of a scenegraph to render.\n */\n _render(scene) {\n // perform spot updates and re-render markup\n if (this._dirtyCheck()) {\n if (this._dirtyAll) this._clearDefs();\n this.mark(this._root, scene);\n domClear(this._root, 1);\n }\n\n this.defs();\n this._dirty = [];\n ++this._dirtyID;\n return this;\n },\n\n // -- Manage rendering of items marked as dirty --\n\n /**\n * Flag a mark item as dirty.\n * @param {Item} item - The mark item.\n */\n dirty(item) {\n if (item.dirty !== this._dirtyID) {\n item.dirty = this._dirtyID;\n\n this._dirty.push(item);\n }\n },\n\n /**\n * Check if a mark item is considered dirty.\n * @param {Item} item - The mark item.\n */\n isDirty(item) {\n return this._dirtyAll || !item._svg || item.dirty === this._dirtyID;\n },\n\n /**\n * Internal method to check dirty status and, if possible,\n * make targetted updates without a full rendering pass.\n */\n _dirtyCheck() {\n this._dirtyAll = true;\n const items = this._dirty;\n if (!items.length || !this._dirtyID) return true;\n const id = ++this._dirtyID;\n let item, mark, type, mdef, i, n, o;\n\n for (i = 0, n = items.length; i < n; ++i) {\n item = items[i];\n mark = item.mark;\n\n if (mark.marktype !== type) {\n // memoize mark instance lookup\n type = mark.marktype;\n mdef = Marks[type];\n }\n\n if (mark.zdirty && mark.dirty !== id) {\n this._dirtyAll = false;\n dirtyParents(item, id);\n mark.items.forEach(i => {\n i.dirty = id;\n });\n }\n\n if (mark.zdirty) continue; // handle in standard drawing pass\n\n if (item.exit) {\n // EXIT\n if (mdef.nested && mark.items.length) {\n // if nested mark with remaining points, update instead\n o = mark.items[0];\n if (o._svg) this._update(mdef, o._svg, o);\n } else if (item._svg) {\n // otherwise remove from DOM\n o = item._svg.parentNode;\n if (o) o.removeChild(item._svg);\n }\n\n item._svg = null;\n continue;\n }\n\n item = mdef.nested ? mark.items[0] : item;\n if (item._update === id) continue; // already visited\n\n if (!item._svg || !item._svg.ownerSVGElement) {\n // ENTER\n this._dirtyAll = false;\n dirtyParents(item, id);\n } else {\n // IN-PLACE UPDATE\n this._update(mdef, item._svg, item);\n }\n\n item._update = id;\n }\n\n return !this._dirtyAll;\n },\n\n // -- Construct & maintain scenegraph to SVG mapping ---\n\n /**\n * Render a set of mark items.\n * @param {SVGElement} el - The parent element in the SVG tree.\n * @param {object} scene - The mark parent to render.\n * @param {SVGElement} prev - The previous sibling in the SVG tree.\n */\n mark(el, scene, prev) {\n if (!this.isDirty(scene)) return scene._svg;\n const svg = this._svg,\n mdef = Marks[scene.marktype],\n events = scene.interactive === false ? 'none' : null,\n isGroup = mdef.tag === 'g';\n let sibling = null,\n i = 0;\n const parent = bind(scene, el, prev, 'g', svg);\n parent.setAttribute('class', cssClass(scene)); // apply aria attributes to parent container element\n\n const aria = ariaMarkAttributes(scene);\n\n for (const key in aria) setAttribute(parent, key, aria[key]);\n\n if (!isGroup) {\n setAttribute(parent, 'pointer-events', events);\n }\n\n setAttribute(parent, 'clip-path', scene.clip ? clip$1(this, scene, scene.group) : null);\n\n const process = item => {\n const dirty = this.isDirty(item),\n node = bind(item, parent, sibling, mdef.tag, svg);\n\n if (dirty) {\n this._update(mdef, node, item);\n\n if (isGroup) recurse(this, node, item);\n }\n\n sibling = node;\n ++i;\n };\n\n if (mdef.nested) {\n if (scene.items.length) process(scene.items[0]);\n } else {\n visit(scene, process);\n }\n\n domClear(parent, i);\n return parent;\n },\n\n /**\n * Update the attributes of an SVG element for a mark item.\n * @param {object} mdef - The mark definition object\n * @param {SVGElement} el - The SVG element.\n * @param {Item} item - The mark item.\n */\n _update(mdef, el, item) {\n // set dom element and values cache\n // provides access to emit method\n element = el;\n values = el.__values__; // apply aria-specific properties\n\n ariaItemAttributes(emit, item); // apply svg attributes\n\n mdef.attr(emit, item, this); // some marks need special treatment\n\n const extra = mark_extras[mdef.type];\n if (extra) extra.call(this, mdef, el, item); // apply svg style attributes\n // note: element state may have been modified by 'extra' method\n\n if (element) this.style(element, item);\n },\n\n /**\n * Update the presentation attributes of an SVG element for a mark item.\n * @param {SVGElement} el - The SVG element.\n * @param {Item} item - The mark item.\n */\n style(el, item) {\n if (item == null) return;\n\n for (const prop in styles) {\n let value = prop === 'font' ? fontFamily(item) : item[prop];\n if (value === values[prop]) continue;\n const name = styles[prop];\n\n if (value == null) {\n el.removeAttribute(name);\n } else {\n if (isGradient(value)) {\n value = gradientRef(value, this._defs.gradient, href());\n }\n\n el.setAttribute(name, value + '');\n }\n\n values[prop] = value;\n }\n },\n\n /**\n * Render SVG defs, as needed.\n * Must be called *after* marks have been processed to ensure the\n * collected state is current and accurate.\n */\n defs() {\n const svg = this._svg,\n defs = this._defs;\n let el = defs.el,\n index = 0;\n\n for (const id in defs.gradient) {\n if (!el) defs.el = el = domChild(svg, RootIndex + 1, 'defs', svgns);\n index = updateGradient(el, defs.gradient[id], index);\n }\n\n for (const id in defs.clipping) {\n if (!el) defs.el = el = domChild(svg, RootIndex + 1, 'defs', svgns);\n index = updateClipping(el, defs.clipping[id], index);\n } // clean-up\n\n\n if (el) {\n index === 0 ? (svg.removeChild(el), defs.el = null) : domClear(el, index);\n }\n },\n\n /**\n * Clear defs caches.\n */\n _clearDefs() {\n const def = this._defs;\n def.gradient = {};\n def.clipping = {};\n }\n\n}); // mark ancestor chain with a dirty id\n\nfunction dirtyParents(item, id) {\n for (; item && item.dirty !== id; item = item.mark.group) {\n item.dirty = id;\n\n if (item.mark && item.mark.dirty !== id) {\n item.mark.dirty = id;\n } else return;\n }\n} // update gradient definitions\n\n\nfunction updateGradient(el, grad, index) {\n let i, n, stop;\n\n if (grad.gradient === 'radial') {\n // SVG radial gradients automatically transform to normalized bbox\n // coordinates, in a way that is cumbersome to replicate in canvas.\n // We wrap the radial gradient in a pattern element, allowing us to\n // maintain a circular gradient that matches what canvas provides.\n let pt = domChild(el, index++, 'pattern', svgns);\n setAttributes(pt, {\n id: patternPrefix + grad.id,\n viewBox: '0,0,1,1',\n width: '100%',\n height: '100%',\n preserveAspectRatio: 'xMidYMid slice'\n });\n pt = domChild(pt, 0, 'rect', svgns);\n setAttributes(pt, {\n width: 1,\n height: 1,\n fill: `url(${href()}#${grad.id})`\n });\n el = domChild(el, index++, 'radialGradient', svgns);\n setAttributes(el, {\n id: grad.id,\n fx: grad.x1,\n fy: grad.y1,\n fr: grad.r1,\n cx: grad.x2,\n cy: grad.y2,\n r: grad.r2\n });\n } else {\n el = domChild(el, index++, 'linearGradient', svgns);\n setAttributes(el, {\n id: grad.id,\n x1: grad.x1,\n x2: grad.x2,\n y1: grad.y1,\n y2: grad.y2\n });\n }\n\n for (i = 0, n = grad.stops.length; i < n; ++i) {\n stop = domChild(el, i, 'stop', svgns);\n stop.setAttribute('offset', grad.stops[i].offset);\n stop.setAttribute('stop-color', grad.stops[i].color);\n }\n\n domClear(el, i);\n return index;\n} // update clipping path definitions\n\n\nfunction updateClipping(el, clip, index) {\n let mask;\n el = domChild(el, index, 'clipPath', svgns);\n el.setAttribute('id', clip.id);\n\n if (clip.path) {\n mask = domChild(el, 0, 'path', svgns);\n mask.setAttribute('d', clip.path);\n } else {\n mask = domChild(el, 0, 'rect', svgns);\n setAttributes(mask, {\n x: 0,\n y: 0,\n width: clip.width,\n height: clip.height\n });\n }\n\n domClear(el, 1);\n return index + 1;\n} // Recursively process group contents.\n\n\nfunction recurse(renderer, el, group) {\n el = el.lastChild.previousSibling;\n let prev,\n idx = 0;\n visit(group, item => {\n prev = renderer.mark(el, item, prev);\n ++idx;\n }); // remove any extraneous DOM elements\n\n domClear(el, 1 + idx);\n} // Bind a scenegraph item to an SVG DOM element.\n// Create new SVG elements as needed.\n\n\nfunction bind(item, el, sibling, tag, svg) {\n let node = item._svg,\n doc; // create a new dom node if needed\n\n if (!node) {\n doc = el.ownerDocument;\n node = domCreate(doc, tag, svgns);\n item._svg = node;\n\n if (item.mark) {\n node.__data__ = item;\n node.__values__ = {\n fill: 'default'\n }; // if group, create background, content, and foreground elements\n\n if (tag === 'g') {\n const bg = domCreate(doc, 'path', svgns);\n node.appendChild(bg);\n bg.__data__ = item;\n const cg = domCreate(doc, 'g', svgns);\n node.appendChild(cg);\n cg.__data__ = item;\n const fg = domCreate(doc, 'path', svgns);\n node.appendChild(fg);\n fg.__data__ = item;\n fg.__values__ = {\n fill: 'default'\n };\n }\n }\n } // (re-)insert if (a) not contained in SVG or (b) sibling order has changed\n\n\n if (node.ownerSVGElement !== svg || siblingCheck(node, sibling)) {\n el.insertBefore(node, sibling ? sibling.nextSibling : el.firstChild);\n }\n\n return node;\n} // check if two nodes are ordered siblings\n\n\nfunction siblingCheck(node, sibling) {\n return node.parentNode && node.parentNode.childNodes.length > 1 && node.previousSibling != sibling; // treat null/undefined the same\n} // -- Set attributes & styles on SVG elements ---\n\n\nlet element = null,\n // temp var for current SVG element\nvalues = null; // temp var for current values hash\n// Extra configuration for certain mark types\n\nconst mark_extras = {\n group(mdef, el, item) {\n const fg = element = el.childNodes[2];\n values = fg.__values__;\n mdef.foreground(emit, item, this);\n values = el.__values__; // use parent's values hash\n\n element = el.childNodes[1];\n mdef.content(emit, item, this);\n const bg = element = el.childNodes[0];\n mdef.background(emit, item, this);\n const value = item.mark.interactive === false ? 'none' : null;\n\n if (value !== values.events) {\n setAttribute(fg, 'pointer-events', value);\n setAttribute(bg, 'pointer-events', value);\n values.events = value;\n }\n\n if (item.strokeForeground && item.stroke) {\n const fill = item.fill;\n setAttribute(fg, 'display', null); // set style of background\n\n this.style(bg, item);\n setAttribute(bg, 'stroke', null); // set style of foreground\n\n if (fill) item.fill = null;\n values = fg.__values__;\n this.style(fg, item);\n if (fill) item.fill = fill; // leave element null to prevent downstream styling\n\n element = null;\n } else {\n // ensure foreground is ignored\n setAttribute(fg, 'display', 'none');\n }\n },\n\n image(mdef, el, item) {\n if (item.smooth === false) {\n setStyle(el, 'image-rendering', 'optimizeSpeed');\n setStyle(el, 'image-rendering', 'pixelated');\n } else {\n setStyle(el, 'image-rendering', null);\n }\n },\n\n text(mdef, el, item) {\n const tl = textLines(item);\n let key, value, doc, lh;\n\n if (isArray(tl)) {\n // multi-line text\n value = tl.map(_ => textValue(item, _));\n key = value.join('\\n'); // content cache key\n\n if (key !== values.text) {\n domClear(el, 0);\n doc = el.ownerDocument;\n lh = lineHeight(item);\n value.forEach((t, i) => {\n const ts = domCreate(doc, 'tspan', svgns);\n ts.__data__ = item; // data binding\n\n ts.textContent = t;\n\n if (i) {\n ts.setAttribute('x', 0);\n ts.setAttribute('dy', lh);\n }\n\n el.appendChild(ts);\n });\n values.text = key;\n }\n } else {\n // single-line text\n value = textValue(item, tl);\n\n if (value !== values.text) {\n el.textContent = value;\n values.text = value;\n }\n }\n\n setAttribute(el, 'font-family', fontFamily(item));\n setAttribute(el, 'font-size', fontSize(item) + 'px');\n setAttribute(el, 'font-style', item.fontStyle);\n setAttribute(el, 'font-variant', item.fontVariant);\n setAttribute(el, 'font-weight', item.fontWeight);\n }\n\n};\n\nfunction emit(name, value, ns) {\n // early exit if value is unchanged\n if (value === values[name]) return; // use appropriate method given namespace (ns)\n\n if (ns) {\n setAttributeNS(element, name, value, ns);\n } else {\n setAttribute(element, name, value);\n } // note current value for future comparison\n\n\n values[name] = value;\n}\n\nfunction setStyle(el, name, value) {\n if (value !== values[name]) {\n if (value == null) {\n el.style.removeProperty(name);\n } else {\n el.style.setProperty(name, value + '');\n }\n\n values[name] = value;\n }\n}\n\nfunction setAttributes(el, attrs) {\n for (const key in attrs) {\n setAttribute(el, key, attrs[key]);\n }\n}\n\nfunction setAttribute(el, name, value) {\n if (value != null) {\n // if value is provided, update DOM attribute\n el.setAttribute(name, value);\n } else {\n // else remove DOM attribute\n el.removeAttribute(name);\n }\n}\n\nfunction setAttributeNS(el, name, value, ns) {\n if (value != null) {\n // if value is provided, update DOM attribute\n el.setAttributeNS(ns, name, value);\n } else {\n // else remove DOM attribute\n el.removeAttributeNS(ns, name);\n }\n}\n\nfunction href() {\n let loc;\n return typeof window === 'undefined' ? '' : (loc = window.location).hash ? loc.href.slice(0, -loc.hash.length) : loc.href;\n}\n\nfunction SVGStringRenderer(loader) {\n Renderer.call(this, loader);\n this._text = null;\n this._defs = {\n gradient: {},\n clipping: {}\n };\n}\ninherits(SVGStringRenderer, Renderer, {\n /**\n * Returns the rendered SVG text string,\n * or null if rendering has not yet occurred.\n */\n svg() {\n return this._text;\n },\n\n /**\n * Internal rendering method.\n * @param {object} scene - The root mark of a scenegraph to render.\n */\n _render(scene) {\n const m = markup(); // svg tag\n\n m.open('svg', extend({}, metadata, {\n class: 'marks',\n width: this._width * this._scale,\n height: this._height * this._scale,\n viewBox: `0 0 ${this._width} ${this._height}`\n })); // background, if defined\n\n const bg = this._bgcolor;\n\n if (bg && bg !== 'transparent' && bg !== 'none') {\n m.open('rect', {\n width: this._width,\n height: this._height,\n fill: bg\n }).close();\n } // root content group\n\n\n m.open('g', rootAttributes, {\n transform: 'translate(' + this._origin + ')'\n });\n this.mark(m, scene);\n m.close(); // </g>\n // defs\n\n this.defs(m); // get SVG text string\n\n this._text = m.close() + '';\n return this;\n },\n\n /**\n * Render a set of mark items.\n * @param {object} m - The markup context.\n * @param {object} scene - The mark parent to render.\n */\n mark(m, scene) {\n const mdef = Marks[scene.marktype],\n tag = mdef.tag,\n attrList = [ariaItemAttributes, mdef.attr]; // render opening group tag\n\n m.open('g', {\n 'class': cssClass(scene),\n 'clip-path': scene.clip ? clip$1(this, scene, scene.group) : null\n }, ariaMarkAttributes(scene), {\n 'pointer-events': tag !== 'g' && scene.interactive === false ? 'none' : null\n }); // render contained elements\n\n const process = item => {\n const href = this.href(item);\n if (href) m.open('a', href);\n m.open(tag, this.attr(scene, item, attrList, tag !== 'g' ? tag : null));\n\n if (tag === 'text') {\n const tl = textLines(item);\n\n if (isArray(tl)) {\n // multi-line text\n const attrs = {\n x: 0,\n dy: lineHeight(item)\n };\n\n for (let i = 0; i < tl.length; ++i) {\n m.open('tspan', i ? attrs : null).text(textValue(item, tl[i])).close();\n }\n } else {\n // single-line text\n m.text(textValue(item, tl));\n }\n } else if (tag === 'g') {\n const fore = item.strokeForeground,\n fill = item.fill,\n stroke = item.stroke;\n\n if (fore && stroke) {\n item.stroke = null;\n }\n\n m.open('path', this.attr(scene, item, mdef.background, 'bgrect')).close(); // recurse for group content\n\n m.open('g', this.attr(scene, item, mdef.content));\n visit(item, scene => this.mark(m, scene));\n m.close();\n\n if (fore && stroke) {\n if (fill) item.fill = null;\n item.stroke = stroke;\n m.open('path', this.attr(scene, item, mdef.foreground, 'bgrect')).close();\n if (fill) item.fill = fill;\n } else {\n m.open('path', this.attr(scene, item, mdef.foreground, 'bgfore')).close();\n }\n }\n\n m.close(); // </tag>\n\n if (href) m.close(); // </a>\n };\n\n if (mdef.nested) {\n if (scene.items && scene.items.length) process(scene.items[0]);\n } else {\n visit(scene, process);\n } // render closing group tag\n\n\n return m.close(); // </g>\n },\n\n /**\n * Get href attributes for a hyperlinked mark item.\n * @param {Item} item - The mark item.\n */\n href(item) {\n const href = item.href;\n let attr;\n\n if (href) {\n if (attr = this._hrefs && this._hrefs[href]) {\n return attr;\n } else {\n this.sanitizeURL(href).then(attr => {\n // rewrite to use xlink namespace\n attr['xlink:href'] = attr.href;\n attr.href = null;\n (this._hrefs || (this._hrefs = {}))[href] = attr;\n });\n }\n }\n\n return null;\n },\n\n /**\n * Get an object of SVG attributes for a mark item.\n * @param {object} scene - The mark parent.\n * @param {Item} item - The mark item.\n * @param {array|function} attrs - One or more attribute emitters.\n * @param {string} tag - The tag being rendered.\n */\n attr(scene, item, attrs, tag) {\n const object = {},\n emit = (name, value, ns, prefixed) => {\n object[prefixed || name] = value;\n }; // apply mark specific attributes\n\n\n if (Array.isArray(attrs)) {\n attrs.forEach(fn => fn(emit, item, this));\n } else {\n attrs(emit, item, this);\n } // apply style attributes\n\n\n if (tag) {\n style(object, item, scene, tag, this._defs);\n }\n\n return object;\n },\n\n /**\n * Render SVG defs, as needed.\n * Must be called *after* marks have been processed to ensure the\n * collected state is current and accurate.\n * @param {object} m - The markup context.\n */\n defs(m) {\n const gradient = this._defs.gradient,\n clipping = this._defs.clipping,\n count = Object.keys(gradient).length + Object.keys(clipping).length;\n if (count === 0) return; // nothing to do\n\n m.open('defs');\n\n for (const id in gradient) {\n const def = gradient[id],\n stops = def.stops;\n\n if (def.gradient === 'radial') {\n // SVG radial gradients automatically transform to normalized bbox\n // coordinates, in a way that is cumbersome to replicate in canvas.\n // We wrap the radial gradient in a pattern element, allowing us to\n // maintain a circular gradient that matches what canvas provides.\n m.open('pattern', {\n id: patternPrefix + id,\n viewBox: '0,0,1,1',\n width: '100%',\n height: '100%',\n preserveAspectRatio: 'xMidYMid slice'\n });\n m.open('rect', {\n width: '1',\n height: '1',\n fill: 'url(#' + id + ')'\n }).close();\n m.close(); // </pattern>\n\n m.open('radialGradient', {\n id: id,\n fx: def.x1,\n fy: def.y1,\n fr: def.r1,\n cx: def.x2,\n cy: def.y2,\n r: def.r2\n });\n } else {\n m.open('linearGradient', {\n id: id,\n x1: def.x1,\n x2: def.x2,\n y1: def.y1,\n y2: def.y2\n });\n }\n\n for (let i = 0; i < stops.length; ++i) {\n m.open('stop', {\n offset: stops[i].offset,\n 'stop-color': stops[i].color\n }).close();\n }\n\n m.close();\n }\n\n for (const id in clipping) {\n const def = clipping[id];\n m.open('clipPath', {\n id: id\n });\n\n if (def.path) {\n m.open('path', {\n d: def.path\n }).close();\n } else {\n m.open('rect', {\n x: 0,\n y: 0,\n width: def.width,\n height: def.height\n }).close();\n }\n\n m.close();\n }\n\n m.close();\n }\n\n}); // Helper function for attr for style presentation attributes\n\nfunction style(s, item, scene, tag, defs) {\n if (item == null) return s;\n\n if (tag === 'bgrect' && scene.interactive === false) {\n s['pointer-events'] = 'none';\n }\n\n if (tag === 'bgfore') {\n if (scene.interactive === false) {\n s['pointer-events'] = 'none';\n }\n\n s.display = 'none';\n if (item.fill !== null) return s;\n }\n\n if (tag === 'image' && item.smooth === false) {\n s.style = 'image-rendering: optimizeSpeed; image-rendering: pixelated;';\n }\n\n if (tag === 'text') {\n s['font-family'] = fontFamily(item);\n s['font-size'] = fontSize(item) + 'px';\n s['font-style'] = item.fontStyle;\n s['font-variant'] = item.fontVariant;\n s['font-weight'] = item.fontWeight;\n }\n\n for (const prop in styles) {\n let value = item[prop];\n const name = styles[prop];\n\n if (value === 'transparent' && (name === 'fill' || name === 'stroke')) ; else if (value != null) {\n if (isGradient(value)) {\n value = gradientRef(value, defs.gradient, '');\n }\n\n s[name] = value;\n }\n }\n\n return s;\n}\n\nconst Canvas = 'canvas';\nconst PNG = 'png';\nconst SVG = 'svg';\nconst None = 'none';\nconst RenderType = {\n Canvas: Canvas,\n PNG: PNG,\n SVG: SVG,\n None: None\n};\nconst modules = {};\nmodules[Canvas] = modules[PNG] = {\n renderer: CanvasRenderer,\n headless: CanvasRenderer,\n handler: CanvasHandler\n};\nmodules[SVG] = {\n renderer: SVGRenderer,\n headless: SVGStringRenderer,\n handler: SVGHandler\n};\nmodules[None] = {};\nfunction renderModule(name, _) {\n name = String(name || '').toLowerCase();\n\n if (arguments.length > 1) {\n modules[name] = _;\n return this;\n } else {\n return modules[name];\n }\n}\n\nfunction intersect(scene, bounds, filter) {\n const hits = [],\n // intersection results\n box = new Bounds().union(bounds),\n // defensive copy\n type = scene.marktype;\n return type ? intersectMark(scene, box, filter, hits) : type === 'group' ? intersectGroup(scene, box, filter, hits) : error('Intersect scene must be mark node or group item.');\n}\n\nfunction intersectMark(mark, box, filter, hits) {\n if (visitMark(mark, box, filter)) {\n const items = mark.items,\n type = mark.marktype,\n n = items.length;\n let i = 0;\n\n if (type === 'group') {\n for (; i < n; ++i) {\n intersectGroup(items[i], box, filter, hits);\n }\n } else {\n for (const test = Marks[type].isect; i < n; ++i) {\n const item = items[i];\n if (intersectItem(item, box, test)) hits.push(item);\n }\n }\n }\n\n return hits;\n}\n\nfunction visitMark(mark, box, filter) {\n // process if bounds intersect and if\n // (1) mark is a group mark (so we must recurse), or\n // (2) mark is interactive and passes filter\n return mark.bounds && box.intersects(mark.bounds) && (mark.marktype === 'group' || mark.interactive !== false && (!filter || filter(mark)));\n}\n\nfunction intersectGroup(group, box, filter, hits) {\n // test intersect against group\n // skip groups by default unless filter says otherwise\n if (filter && filter(group.mark) && intersectItem(group, box, Marks.group.isect)) {\n hits.push(group);\n } // recursively test children marks\n // translate box to group coordinate space\n\n\n const marks = group.items,\n n = marks && marks.length;\n\n if (n) {\n const x = group.x || 0,\n y = group.y || 0;\n box.translate(-x, -y);\n\n for (let i = 0; i < n; ++i) {\n intersectMark(marks[i], box, filter, hits);\n }\n\n box.translate(x, y);\n }\n\n return hits;\n}\n\nfunction intersectItem(item, box, test) {\n // test bounds enclosure, bounds intersection, then detailed test\n const bounds = item.bounds;\n return box.encloses(bounds) || box.intersects(bounds) && test(item, box);\n}\n\nconst clipBounds = new Bounds();\nfunction boundClip (mark) {\n const clip = mark.clip;\n\n if (isFunction(clip)) {\n clip(boundContext(clipBounds.clear()));\n } else if (clip) {\n clipBounds.set(0, 0, mark.group.width, mark.group.height);\n } else return;\n\n mark.bounds.intersect(clipBounds);\n}\n\nconst TOLERANCE = 1e-9;\nfunction sceneEqual(a, b, key) {\n return a === b ? true : key === 'path' ? pathEqual(a, b) : a instanceof Date && b instanceof Date ? +a === +b : isNumber(a) && isNumber(b) ? Math.abs(a - b) <= TOLERANCE : !a || !b || !isObject(a) && !isObject(b) ? a == b : objectEqual(a, b);\n}\nfunction pathEqual(a, b) {\n return sceneEqual(pathParse(a), pathParse(b));\n}\n\nfunction objectEqual(a, b) {\n var ka = Object.keys(a),\n kb = Object.keys(b),\n key,\n i;\n if (ka.length !== kb.length) return false;\n ka.sort();\n kb.sort();\n\n for (i = ka.length - 1; i >= 0; i--) {\n if (ka[i] != kb[i]) return false;\n }\n\n for (i = ka.length - 1; i >= 0; i--) {\n key = ka[i];\n if (!sceneEqual(a[key], b[key], key)) return false;\n }\n\n return typeof a === typeof b;\n}\n\nfunction resetSVGDefIds() {\n resetSVGClipId();\n resetSVGGradientId();\n}\n\nexport { Bounds, CanvasHandler, CanvasRenderer, Gradient, GroupItem, Handler, Item, Marks, RenderType, Renderer, ResourceLoader, SVGHandler, SVGRenderer, SVGStringRenderer, Scenegraph, boundClip, boundContext, boundItem, boundMark, boundStroke, domChild, domClear, domCreate, domFind, font, fontFamily, fontSize, intersect, intersectBoxLine, intersectPath, intersectPoint, intersectRule, lineHeight, markup, multiLineOffset, curves as pathCurves, pathEqual, pathParse, vg_rect as pathRectangle, pathRender, symbols as pathSymbols, vg_trail as pathTrail, point, renderModule, resetSVGClipId, resetSVGDefIds, sceneEqual, sceneFromJSON, pickVisit as scenePickVisit, sceneToJSON, visit as sceneVisit, zorder as sceneZOrder, serializeXML, textMetrics };\n","import {path} from \"d3-path\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport star from \"./symbol/star.js\";\nimport square from \"./symbol/square.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport wye from \"./symbol/wye.js\";\nimport constant from \"./constant.js\";\n\nexport var symbols = [\n circle,\n cross,\n diamond,\n square,\n star,\n triangle,\n wye\n];\n\nexport default function(type, size) {\n var context = null;\n type = typeof type === \"function\" ? type : constant(type || circle);\n size = typeof size === \"function\" ? size : constant(size === undefined ? 64 : +size);\n\n function symbol() {\n var buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n\n return symbol;\n}\n","import { Transform } from 'vega-dataflow';\nimport { Marks, boundClip, GroupItem, Item, Bounds, multiLineOffset, boundStroke } from 'vega-scenegraph';\nimport { inherits, peek, isObject } from 'vega-util';\n\nconst Top = 'top';\nconst Left = 'left';\nconst Right = 'right';\nconst Bottom = 'bottom';\nconst TopLeft = 'top-left';\nconst TopRight = 'top-right';\nconst BottomLeft = 'bottom-left';\nconst BottomRight = 'bottom-right';\nconst Start = 'start';\nconst Middle = 'middle';\nconst End = 'end';\nconst X = 'x';\nconst Y = 'y';\nconst Group = 'group';\nconst AxisRole = 'axis';\nconst TitleRole = 'title';\nconst FrameRole = 'frame';\nconst ScopeRole = 'scope';\nconst LegendRole = 'legend';\nconst RowHeader = 'row-header';\nconst RowFooter = 'row-footer';\nconst RowTitle = 'row-title';\nconst ColHeader = 'column-header';\nconst ColFooter = 'column-footer';\nconst ColTitle = 'column-title';\nconst Padding = 'padding';\nconst Symbols = 'symbol';\nconst Fit = 'fit';\nconst FitX = 'fit-x';\nconst FitY = 'fit-y';\nconst Pad = 'pad';\nconst None = 'none';\nconst All = 'all';\nconst Each = 'each';\nconst Flush = 'flush';\nconst Column = 'column';\nconst Row = 'row';\n\n/**\n * Calculate bounding boxes for scenegraph items.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {object} params.mark - The scenegraph mark instance to bound.\n */\n\nfunction Bound(params) {\n Transform.call(this, null, params);\n}\ninherits(Bound, Transform, {\n transform(_, pulse) {\n const view = pulse.dataflow,\n mark = _.mark,\n type = mark.marktype,\n entry = Marks[type],\n bound = entry.bound;\n let markBounds = mark.bounds,\n rebound;\n\n if (entry.nested) {\n // multi-item marks have a single bounds instance\n if (mark.items.length) view.dirty(mark.items[0]);\n markBounds = boundItem(mark, bound);\n mark.items.forEach(item => {\n item.bounds.clear().union(markBounds);\n });\n } else if (type === Group || _.modified()) {\n // operator parameters modified -> re-bound all items\n // updates group bounds in response to modified group content\n pulse.visit(pulse.MOD, item => view.dirty(item));\n markBounds.clear();\n mark.items.forEach(item => markBounds.union(boundItem(item, bound))); // force reflow for axes/legends/titles to propagate any layout changes\n\n switch (mark.role) {\n case AxisRole:\n case LegendRole:\n case TitleRole:\n pulse.reflow();\n }\n } else {\n // incrementally update bounds, re-bound mark as needed\n rebound = pulse.changed(pulse.REM);\n pulse.visit(pulse.ADD, item => {\n markBounds.union(boundItem(item, bound));\n });\n pulse.visit(pulse.MOD, item => {\n rebound = rebound || markBounds.alignsWith(item.bounds);\n view.dirty(item);\n markBounds.union(boundItem(item, bound));\n });\n\n if (rebound) {\n markBounds.clear();\n mark.items.forEach(item => markBounds.union(item.bounds));\n }\n } // ensure mark bounds do not exceed any clipping region\n\n\n boundClip(mark);\n return pulse.modifies('bounds');\n }\n\n});\n\nfunction boundItem(item, bound, opt) {\n return bound(item.bounds.clear(), item, opt);\n}\n\nconst COUNTER_NAME = ':vega_identifier:';\n/**\n * Adds a unique identifier to all added tuples.\n * This transform creates a new signal that serves as an id counter.\n * As a result, the id counter is shared across all instances of this\n * transform, generating unique ids across multiple data streams. In\n * addition, this signal value can be included in a snapshot of the\n * dataflow state, enabling correct resumption of id allocation.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {string} params.as - The field name for the generated identifier.\n */\n\nfunction Identifier(params) {\n Transform.call(this, 0, params);\n}\nIdentifier.Definition = {\n 'type': 'Identifier',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'as',\n 'type': 'string',\n 'required': true\n }]\n};\ninherits(Identifier, Transform, {\n transform(_, pulse) {\n const counter = getCounter(pulse.dataflow),\n as = _.as;\n let id = counter.value;\n pulse.visit(pulse.ADD, t => t[as] = t[as] || ++id);\n counter.set(this.value = id);\n return pulse;\n }\n\n});\n\nfunction getCounter(view) {\n return view._signals[COUNTER_NAME] || (view._signals[COUNTER_NAME] = view.add(0));\n}\n\n/**\n * Bind scenegraph items to a scenegraph mark instance.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {object} params.markdef - The mark definition for creating the mark.\n * This is an object of legal scenegraph mark properties which *must* include\n * the 'marktype' property.\n */\n\nfunction Mark(params) {\n Transform.call(this, null, params);\n}\ninherits(Mark, Transform, {\n transform(_, pulse) {\n let mark = this.value; // acquire mark on first invocation, bind context and group\n\n if (!mark) {\n mark = pulse.dataflow.scenegraph().mark(_.markdef, lookup(_), _.index);\n mark.group.context = _.context;\n if (!_.context.group) _.context.group = mark.group;\n mark.source = this.source; // point to upstream collector\n\n mark.clip = _.clip;\n mark.interactive = _.interactive;\n this.value = mark;\n } // initialize entering items\n\n\n const Init = mark.marktype === Group ? GroupItem : Item;\n pulse.visit(pulse.ADD, item => Init.call(item, mark)); // update clipping and/or interactive status\n\n if (_.modified('clip') || _.modified('interactive')) {\n mark.clip = _.clip;\n mark.interactive = !!_.interactive;\n mark.zdirty = true; // force scenegraph re-eval\n\n pulse.reflow();\n } // bind items array to scenegraph mark\n\n\n mark.items = pulse.source;\n return pulse;\n }\n\n});\n\nfunction lookup(_) {\n const g = _.groups,\n p = _.parent;\n return g && g.size === 1 ? g.get(Object.keys(g.object)[0]) : g && p ? g.lookup(p) : null;\n}\n\n/**\n * Analyze items for overlap, changing opacity to hide items with\n * overlapping bounding boxes. This transform will preserve at least\n * two items (e.g., first and last) even if overlap persists.\n * @param {object} params - The parameters for this operator.\n * @param {function(*,*): number} [params.sort] - A comparator\n * function for sorting items.\n * @param {object} [params.method] - The overlap removal method to apply.\n * One of 'parity' (default, hide every other item until there is no\n * more overlap) or 'greedy' (sequentially scan and hide and items that\n * overlap with the last visible item).\n * @param {object} [params.boundScale] - A scale whose range should be used\n * to bound the items. Items exceeding the bounds of the scale range\n * will be treated as overlapping. If null or undefined, no bounds check\n * will be applied.\n * @param {object} [params.boundOrient] - The orientation of the scale\n * (top, bottom, left, or right) used to bound items. This parameter is\n * ignored if boundScale is null or undefined.\n * @param {object} [params.boundTolerance] - The tolerance in pixels for\n * bound inclusion testing (default 1). This specifies by how many pixels\n * an item's bounds may exceed the scale range bounds and not be culled.\n * @constructor\n */\n\nfunction Overlap(params) {\n Transform.call(this, null, params);\n}\nconst methods = {\n parity: items => items.filter((item, i) => i % 2 ? item.opacity = 0 : 1),\n greedy: (items, sep) => {\n let a;\n return items.filter((b, i) => !i || !intersect(a.bounds, b.bounds, sep) ? (a = b, 1) : b.opacity = 0);\n }\n}; // compute bounding box intersection\n// including padding pixels of separation\n\nconst intersect = (a, b, sep) => sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);\n\nconst hasOverlap = (items, pad) => {\n for (var i = 1, n = items.length, a = items[0].bounds, b; i < n; a = b, ++i) {\n if (intersect(a, b = items[i].bounds, pad)) return true;\n }\n};\n\nconst hasBounds = item => {\n const b = item.bounds;\n return b.width() > 1 && b.height() > 1;\n};\n\nconst boundTest = (scale, orient, tolerance) => {\n var range = scale.range(),\n b = new Bounds();\n\n if (orient === Top || orient === Bottom) {\n b.set(range[0], -Infinity, range[1], +Infinity);\n } else {\n b.set(-Infinity, range[0], +Infinity, range[1]);\n }\n\n b.expand(tolerance || 1);\n return item => b.encloses(item.bounds);\n}; // reset all items to be fully opaque\n\n\nconst reset = source => {\n source.forEach(item => item.opacity = 1);\n return source;\n}; // add all tuples to mod, fork pulse if parameters were modified\n// fork prevents cross-stream tuple pollution (e.g., pulse from scale)\n\n\nconst reflow = (pulse, _) => pulse.reflow(_.modified()).modifies('opacity');\n\ninherits(Overlap, Transform, {\n transform(_, pulse) {\n const reduce = methods[_.method] || methods.parity,\n sep = _.separation || 0;\n let source = pulse.materialize(pulse.SOURCE).source,\n items,\n test;\n if (!source || !source.length) return;\n\n if (!_.method) {\n // early exit if method is falsy\n if (_.modified('method')) {\n reset(source);\n pulse = reflow(pulse, _);\n }\n\n return pulse;\n } // skip labels with no content\n\n\n source = source.filter(hasBounds); // early exit, nothing to do\n\n if (!source.length) return;\n\n if (_.sort) {\n source = source.slice().sort(_.sort);\n }\n\n items = reset(source);\n pulse = reflow(pulse, _);\n\n if (items.length >= 3 && hasOverlap(items, sep)) {\n do {\n items = reduce(items, sep);\n } while (items.length >= 3 && hasOverlap(items, sep));\n\n if (items.length < 3 && !peek(source).opacity) {\n if (items.length > 1) peek(items).opacity = 0;\n peek(source).opacity = 1;\n }\n }\n\n if (_.boundScale && _.boundTolerance >= 0) {\n test = boundTest(_.boundScale, _.boundOrient, +_.boundTolerance);\n source.forEach(item => {\n if (!test(item)) item.opacity = 0;\n });\n } // re-calculate mark bounds\n\n\n const bounds = items[0].mark.bounds.clear();\n source.forEach(item => {\n if (item.opacity) bounds.union(item.bounds);\n });\n return pulse;\n }\n\n});\n\n/**\n * Queue modified scenegraph items for rendering.\n * @constructor\n */\n\nfunction Render(params) {\n Transform.call(this, null, params);\n}\ninherits(Render, Transform, {\n transform(_, pulse) {\n const view = pulse.dataflow;\n pulse.visit(pulse.ALL, item => view.dirty(item)); // set z-index dirty flag as needed\n\n if (pulse.fields && pulse.fields['zindex']) {\n const item = pulse.source && pulse.source[0];\n if (item) item.mark.zdirty = true;\n }\n }\n\n});\n\nconst tempBounds = new Bounds();\nfunction set(item, property, value) {\n return item[property] === value ? 0 : (item[property] = value, 1);\n}\n\nfunction isYAxis(mark) {\n var orient = mark.items[0].orient;\n return orient === Left || orient === Right;\n}\n\nfunction axisIndices(datum) {\n let index = +datum.grid;\n return [datum.ticks ? index++ : -1, // ticks index\n datum.labels ? index++ : -1, // labels index\n index + +datum.domain // title index\n ];\n}\n\nfunction axisLayout(view, axis, width, height) {\n var item = axis.items[0],\n datum = item.datum,\n delta = item.translate != null ? item.translate : 0.5,\n orient = item.orient,\n indices = axisIndices(datum),\n range = item.range,\n offset = item.offset,\n position = item.position,\n minExtent = item.minExtent,\n maxExtent = item.maxExtent,\n title = datum.title && item.items[indices[2]].items[0],\n titlePadding = item.titlePadding,\n bounds = item.bounds,\n dl = title && multiLineOffset(title),\n x = 0,\n y = 0,\n i,\n s;\n tempBounds.clear().union(bounds);\n bounds.clear();\n if ((i = indices[0]) > -1) bounds.union(item.items[i].bounds);\n if ((i = indices[1]) > -1) bounds.union(item.items[i].bounds); // position axis group and title\n\n switch (orient) {\n case Top:\n x = position || 0;\n y = -offset;\n s = Math.max(minExtent, Math.min(maxExtent, -bounds.y1));\n bounds.add(0, -s).add(range, 0);\n if (title) axisTitleLayout(view, title, s, titlePadding, dl, 0, -1, bounds);\n break;\n\n case Left:\n x = -offset;\n y = position || 0;\n s = Math.max(minExtent, Math.min(maxExtent, -bounds.x1));\n bounds.add(-s, 0).add(0, range);\n if (title) axisTitleLayout(view, title, s, titlePadding, dl, 1, -1, bounds);\n break;\n\n case Right:\n x = width + offset;\n y = position || 0;\n s = Math.max(minExtent, Math.min(maxExtent, bounds.x2));\n bounds.add(0, 0).add(s, range);\n if (title) axisTitleLayout(view, title, s, titlePadding, dl, 1, 1, bounds);\n break;\n\n case Bottom:\n x = position || 0;\n y = height + offset;\n s = Math.max(minExtent, Math.min(maxExtent, bounds.y2));\n bounds.add(0, 0).add(range, s);\n if (title) axisTitleLayout(view, title, s, titlePadding, 0, 0, 1, bounds);\n break;\n\n default:\n x = item.x;\n y = item.y;\n } // update bounds\n\n\n boundStroke(bounds.translate(x, y), item);\n\n if (set(item, 'x', x + delta) | set(item, 'y', y + delta)) {\n item.bounds = tempBounds;\n view.dirty(item);\n item.bounds = bounds;\n view.dirty(item);\n }\n\n return item.mark.bounds.clear().union(bounds);\n}\n\nfunction axisTitleLayout(view, title, offset, pad, dl, isYAxis, sign, bounds) {\n const b = title.bounds;\n\n if (title.auto) {\n const v = sign * (offset + dl + pad);\n let dx = 0,\n dy = 0;\n view.dirty(title);\n isYAxis ? dx = (title.x || 0) - (title.x = v) : dy = (title.y || 0) - (title.y = v);\n title.mark.bounds.clear().union(b.translate(-dx, -dy));\n view.dirty(title);\n }\n\n bounds.union(b);\n}\n\nconst min = (a, b) => Math.floor(Math.min(a, b));\n\nconst max = (a, b) => Math.ceil(Math.max(a, b));\n\nfunction gridLayoutGroups(group) {\n var groups = group.items,\n n = groups.length,\n i = 0,\n mark,\n items;\n const views = {\n marks: [],\n rowheaders: [],\n rowfooters: [],\n colheaders: [],\n colfooters: [],\n rowtitle: null,\n coltitle: null\n }; // layout axes, gather legends, collect bounds\n\n for (; i < n; ++i) {\n mark = groups[i];\n items = mark.items;\n\n if (mark.marktype === Group) {\n switch (mark.role) {\n case AxisRole:\n case LegendRole:\n case TitleRole:\n break;\n\n case RowHeader:\n views.rowheaders.push(...items);\n break;\n\n case RowFooter:\n views.rowfooters.push(...items);\n break;\n\n case ColHeader:\n views.colheaders.push(...items);\n break;\n\n case ColFooter:\n views.colfooters.push(...items);\n break;\n\n case RowTitle:\n views.rowtitle = items[0];\n break;\n\n case ColTitle:\n views.coltitle = items[0];\n break;\n\n default:\n views.marks.push(...items);\n }\n }\n }\n\n return views;\n}\n\nfunction bboxFlush(item) {\n return new Bounds().set(0, 0, item.width || 0, item.height || 0);\n}\n\nfunction bboxFull(item) {\n const b = item.bounds.clone();\n return b.empty() ? b.set(0, 0, 0, 0) : b.translate(-(item.x || 0), -(item.y || 0));\n}\n\nfunction get(opt, key, d) {\n const v = isObject(opt) ? opt[key] : opt;\n return v != null ? v : d !== undefined ? d : 0;\n}\n\nfunction offsetValue(v) {\n return v < 0 ? Math.ceil(-v) : 0;\n}\n\nfunction gridLayout(view, groups, opt) {\n var dirty = !opt.nodirty,\n bbox = opt.bounds === Flush ? bboxFlush : bboxFull,\n bounds = tempBounds.set(0, 0, 0, 0),\n alignCol = get(opt.align, Column),\n alignRow = get(opt.align, Row),\n padCol = get(opt.padding, Column),\n padRow = get(opt.padding, Row),\n ncols = opt.columns || groups.length,\n nrows = ncols <= 0 ? 1 : Math.ceil(groups.length / ncols),\n n = groups.length,\n xOffset = Array(n),\n xExtent = Array(ncols),\n xMax = 0,\n yOffset = Array(n),\n yExtent = Array(nrows),\n yMax = 0,\n dx = Array(n),\n dy = Array(n),\n boxes = Array(n),\n m,\n i,\n c,\n r,\n b,\n g,\n px,\n py,\n x,\n y,\n offset;\n\n for (i = 0; i < ncols; ++i) xExtent[i] = 0;\n\n for (i = 0; i < nrows; ++i) yExtent[i] = 0; // determine offsets for each group\n\n\n for (i = 0; i < n; ++i) {\n g = groups[i];\n b = boxes[i] = bbox(g);\n g.x = g.x || 0;\n dx[i] = 0;\n g.y = g.y || 0;\n dy[i] = 0;\n c = i % ncols;\n r = ~~(i / ncols);\n xMax = Math.max(xMax, px = Math.ceil(b.x2));\n yMax = Math.max(yMax, py = Math.ceil(b.y2));\n xExtent[c] = Math.max(xExtent[c], px);\n yExtent[r] = Math.max(yExtent[r], py);\n xOffset[i] = padCol + offsetValue(b.x1);\n yOffset[i] = padRow + offsetValue(b.y1);\n if (dirty) view.dirty(groups[i]);\n } // set initial alignment offsets\n\n\n for (i = 0; i < n; ++i) {\n if (i % ncols === 0) xOffset[i] = 0;\n if (i < ncols) yOffset[i] = 0;\n } // enforce column alignment constraints\n\n\n if (alignCol === Each) {\n for (c = 1; c < ncols; ++c) {\n for (offset = 0, i = c; i < n; i += ncols) {\n if (offset < xOffset[i]) offset = xOffset[i];\n }\n\n for (i = c; i < n; i += ncols) {\n xOffset[i] = offset + xExtent[c - 1];\n }\n }\n } else if (alignCol === All) {\n for (offset = 0, i = 0; i < n; ++i) {\n if (i % ncols && offset < xOffset[i]) offset = xOffset[i];\n }\n\n for (i = 0; i < n; ++i) {\n if (i % ncols) xOffset[i] = offset + xMax;\n }\n } else {\n for (alignCol = false, c = 1; c < ncols; ++c) {\n for (i = c; i < n; i += ncols) {\n xOffset[i] += xExtent[c - 1];\n }\n }\n } // enforce row alignment constraints\n\n\n if (alignRow === Each) {\n for (r = 1; r < nrows; ++r) {\n for (offset = 0, i = r * ncols, m = i + ncols; i < m; ++i) {\n if (offset < yOffset[i]) offset = yOffset[i];\n }\n\n for (i = r * ncols; i < m; ++i) {\n yOffset[i] = offset + yExtent[r - 1];\n }\n }\n } else if (alignRow === All) {\n for (offset = 0, i = ncols; i < n; ++i) {\n if (offset < yOffset[i]) offset = yOffset[i];\n }\n\n for (i = ncols; i < n; ++i) {\n yOffset[i] = offset + yMax;\n }\n } else {\n for (alignRow = false, r = 1; r < nrows; ++r) {\n for (i = r * ncols, m = i + ncols; i < m; ++i) {\n yOffset[i] += yExtent[r - 1];\n }\n }\n } // perform horizontal grid layout\n\n\n for (x = 0, i = 0; i < n; ++i) {\n x = xOffset[i] + (i % ncols ? x : 0);\n dx[i] += x - groups[i].x;\n } // perform vertical grid layout\n\n\n for (c = 0; c < ncols; ++c) {\n for (y = 0, i = c; i < n; i += ncols) {\n y += yOffset[i];\n dy[i] += y - groups[i].y;\n }\n } // perform horizontal centering\n\n\n if (alignCol && get(opt.center, Column) && nrows > 1) {\n for (i = 0; i < n; ++i) {\n b = alignCol === All ? xMax : xExtent[i % ncols];\n x = b - boxes[i].x2 - groups[i].x - dx[i];\n if (x > 0) dx[i] += x / 2;\n }\n } // perform vertical centering\n\n\n if (alignRow && get(opt.center, Row) && ncols !== 1) {\n for (i = 0; i < n; ++i) {\n b = alignRow === All ? yMax : yExtent[~~(i / ncols)];\n y = b - boxes[i].y2 - groups[i].y - dy[i];\n if (y > 0) dy[i] += y / 2;\n }\n } // position grid relative to anchor\n\n\n for (i = 0; i < n; ++i) {\n bounds.union(boxes[i].translate(dx[i], dy[i]));\n }\n\n x = get(opt.anchor, X);\n y = get(opt.anchor, Y);\n\n switch (get(opt.anchor, Column)) {\n case End:\n x -= bounds.width();\n break;\n\n case Middle:\n x -= bounds.width() / 2;\n }\n\n switch (get(opt.anchor, Row)) {\n case End:\n y -= bounds.height();\n break;\n\n case Middle:\n y -= bounds.height() / 2;\n }\n\n x = Math.round(x);\n y = Math.round(y); // update mark positions, bounds, dirty\n\n bounds.clear();\n\n for (i = 0; i < n; ++i) {\n groups[i].mark.bounds.clear();\n }\n\n for (i = 0; i < n; ++i) {\n g = groups[i];\n g.x += dx[i] += x;\n g.y += dy[i] += y;\n bounds.union(g.mark.bounds.union(g.bounds.translate(dx[i], dy[i])));\n if (dirty) view.dirty(g);\n }\n\n return bounds;\n}\nfunction trellisLayout(view, group, opt) {\n var views = gridLayoutGroups(group),\n groups = views.marks,\n bbox = opt.bounds === Flush ? boundFlush : boundFull,\n off = opt.offset,\n ncols = opt.columns || groups.length,\n nrows = ncols <= 0 ? 1 : Math.ceil(groups.length / ncols),\n cells = nrows * ncols,\n x,\n y,\n x2,\n y2,\n anchor,\n band,\n offset; // -- initial grid layout\n\n const bounds = gridLayout(view, groups, opt);\n if (bounds.empty()) bounds.set(0, 0, 0, 0); // empty grid\n // -- layout grid headers and footers --\n // perform row header layout\n\n if (views.rowheaders) {\n band = get(opt.headerBand, Row, null);\n x = layoutHeaders(view, views.rowheaders, groups, ncols, nrows, -get(off, 'rowHeader'), min, 0, bbox, 'x1', 0, ncols, 1, band);\n } // perform column header layout\n\n\n if (views.colheaders) {\n band = get(opt.headerBand, Column, null);\n y = layoutHeaders(view, views.colheaders, groups, ncols, ncols, -get(off, 'columnHeader'), min, 1, bbox, 'y1', 0, 1, ncols, band);\n } // perform row footer layout\n\n\n if (views.rowfooters) {\n band = get(opt.footerBand, Row, null);\n x2 = layoutHeaders(view, views.rowfooters, groups, ncols, nrows, get(off, 'rowFooter'), max, 0, bbox, 'x2', ncols - 1, ncols, 1, band);\n } // perform column footer layout\n\n\n if (views.colfooters) {\n band = get(opt.footerBand, Column, null);\n y2 = layoutHeaders(view, views.colfooters, groups, ncols, ncols, get(off, 'columnFooter'), max, 1, bbox, 'y2', cells - ncols, 1, ncols, band);\n } // perform row title layout\n\n\n if (views.rowtitle) {\n anchor = get(opt.titleAnchor, Row);\n offset = get(off, 'rowTitle');\n offset = anchor === End ? x2 + offset : x - offset;\n band = get(opt.titleBand, Row, 0.5);\n layoutTitle(view, views.rowtitle, offset, 0, bounds, band);\n } // perform column title layout\n\n\n if (views.coltitle) {\n anchor = get(opt.titleAnchor, Column);\n offset = get(off, 'columnTitle');\n offset = anchor === End ? y2 + offset : y - offset;\n band = get(opt.titleBand, Column, 0.5);\n layoutTitle(view, views.coltitle, offset, 1, bounds, band);\n }\n}\n\nfunction boundFlush(item, field) {\n return field === 'x1' ? item.x || 0 : field === 'y1' ? item.y || 0 : field === 'x2' ? (item.x || 0) + (item.width || 0) : field === 'y2' ? (item.y || 0) + (item.height || 0) : undefined;\n}\n\nfunction boundFull(item, field) {\n return item.bounds[field];\n}\n\nfunction layoutHeaders(view, headers, groups, ncols, limit, offset, agg, isX, bound, bf, start, stride, back, band) {\n var n = groups.length,\n init = 0,\n edge = 0,\n i,\n j,\n k,\n m,\n b,\n h,\n g,\n x,\n y; // if no groups, early exit and return 0\n\n if (!n) return init; // compute margin\n\n for (i = start; i < n; i += stride) {\n if (groups[i]) init = agg(init, bound(groups[i], bf));\n } // if no headers, return margin calculation\n\n\n if (!headers.length) return init; // check if number of headers exceeds number of rows or columns\n\n if (headers.length > limit) {\n view.warn('Grid headers exceed limit: ' + limit);\n headers = headers.slice(0, limit);\n } // apply offset\n\n\n init += offset; // clear mark bounds for all headers\n\n for (j = 0, m = headers.length; j < m; ++j) {\n view.dirty(headers[j]);\n headers[j].mark.bounds.clear();\n } // layout each header\n\n\n for (i = start, j = 0, m = headers.length; j < m; ++j, i += stride) {\n h = headers[j];\n b = h.mark.bounds; // search for nearest group to align to\n // necessary if table has empty cells\n\n for (k = i; k >= 0 && (g = groups[k]) == null; k -= back); // assign coordinates and update bounds\n\n\n if (isX) {\n x = band == null ? g.x : Math.round(g.bounds.x1 + band * g.bounds.width());\n y = init;\n } else {\n x = init;\n y = band == null ? g.y : Math.round(g.bounds.y1 + band * g.bounds.height());\n }\n\n b.union(h.bounds.translate(x - (h.x || 0), y - (h.y || 0)));\n h.x = x;\n h.y = y;\n view.dirty(h); // update current edge of layout bounds\n\n edge = agg(edge, b[bf]);\n }\n\n return edge;\n}\n\nfunction layoutTitle(view, g, offset, isX, bounds, band) {\n if (!g) return;\n view.dirty(g); // compute title coordinates\n\n var x = offset,\n y = offset;\n isX ? x = Math.round(bounds.x1 + band * bounds.width()) : y = Math.round(bounds.y1 + band * bounds.height()); // assign coordinates and update bounds\n\n g.bounds.translate(x - (g.x || 0), y - (g.y || 0));\n g.mark.bounds.clear().union(g.bounds);\n g.x = x;\n g.y = y; // queue title for redraw\n\n view.dirty(g);\n}\n\nfunction lookup$1(config, orient) {\n const opt = config[orient] || {};\n return (key, d) => opt[key] != null ? opt[key] : config[key] != null ? config[key] : d;\n} // if legends specify offset directly, use the maximum specified value\n\n\nfunction offsets(legends, value) {\n let max = -Infinity;\n legends.forEach(item => {\n if (item.offset != null) max = Math.max(max, item.offset);\n });\n return max > -Infinity ? max : value;\n}\n\nfunction legendParams(g, orient, config, xb, yb, w, h) {\n const _ = lookup$1(config, orient),\n offset = offsets(g, _('offset', 0)),\n anchor = _('anchor', Start),\n mult = anchor === End ? 1 : anchor === Middle ? 0.5 : 0;\n\n const p = {\n align: Each,\n bounds: _('bounds', Flush),\n columns: _('direction') === 'vertical' ? 1 : g.length,\n padding: _('margin', 8),\n center: _('center'),\n nodirty: true\n };\n\n switch (orient) {\n case Left:\n p.anchor = {\n x: Math.floor(xb.x1) - offset,\n column: End,\n y: mult * (h || xb.height() + 2 * xb.y1),\n row: anchor\n };\n break;\n\n case Right:\n p.anchor = {\n x: Math.ceil(xb.x2) + offset,\n y: mult * (h || xb.height() + 2 * xb.y1),\n row: anchor\n };\n break;\n\n case Top:\n p.anchor = {\n y: Math.floor(yb.y1) - offset,\n row: End,\n x: mult * (w || yb.width() + 2 * yb.x1),\n column: anchor\n };\n break;\n\n case Bottom:\n p.anchor = {\n y: Math.ceil(yb.y2) + offset,\n x: mult * (w || yb.width() + 2 * yb.x1),\n column: anchor\n };\n break;\n\n case TopLeft:\n p.anchor = {\n x: offset,\n y: offset\n };\n break;\n\n case TopRight:\n p.anchor = {\n x: w - offset,\n y: offset,\n column: End\n };\n break;\n\n case BottomLeft:\n p.anchor = {\n x: offset,\n y: h - offset,\n row: End\n };\n break;\n\n case BottomRight:\n p.anchor = {\n x: w - offset,\n y: h - offset,\n column: End,\n row: End\n };\n break;\n }\n\n return p;\n}\nfunction legendLayout(view, legend) {\n var item = legend.items[0],\n datum = item.datum,\n orient = item.orient,\n bounds = item.bounds,\n x = item.x,\n y = item.y,\n w,\n h; // cache current bounds for later comparison\n\n item._bounds ? item._bounds.clear().union(bounds) : item._bounds = bounds.clone();\n bounds.clear(); // adjust legend to accommodate padding and title\n\n legendGroupLayout(view, item, item.items[0].items[0]); // aggregate bounds to determine size, and include origin\n\n bounds = legendBounds(item, bounds);\n w = 2 * item.padding;\n h = 2 * item.padding;\n\n if (!bounds.empty()) {\n w = Math.ceil(bounds.width() + w);\n h = Math.ceil(bounds.height() + h);\n }\n\n if (datum.type === Symbols) {\n legendEntryLayout(item.items[0].items[0].items[0].items);\n }\n\n if (orient !== None) {\n item.x = x = 0;\n item.y = y = 0;\n }\n\n item.width = w;\n item.height = h;\n boundStroke(bounds.set(x, y, x + w, y + h), item);\n item.mark.bounds.clear().union(bounds);\n return item;\n}\n\nfunction legendBounds(item, b) {\n // aggregate item bounds\n item.items.forEach(_ => b.union(_.bounds)); // anchor to legend origin\n\n b.x1 = item.padding;\n b.y1 = item.padding;\n return b;\n}\n\nfunction legendGroupLayout(view, item, entry) {\n var pad = item.padding,\n ex = pad - entry.x,\n ey = pad - entry.y;\n\n if (!item.datum.title) {\n if (ex || ey) translate(view, entry, ex, ey);\n } else {\n var title = item.items[1].items[0],\n anchor = title.anchor,\n tpad = item.titlePadding || 0,\n tx = pad - title.x,\n ty = pad - title.y;\n\n switch (title.orient) {\n case Left:\n ex += Math.ceil(title.bounds.width()) + tpad;\n break;\n\n case Right:\n case Bottom:\n break;\n\n default:\n ey += title.bounds.height() + tpad;\n }\n\n if (ex || ey) translate(view, entry, ex, ey);\n\n switch (title.orient) {\n case Left:\n ty += legendTitleOffset(item, entry, title, anchor, 1, 1);\n break;\n\n case Right:\n tx += legendTitleOffset(item, entry, title, End, 0, 0) + tpad;\n ty += legendTitleOffset(item, entry, title, anchor, 1, 1);\n break;\n\n case Bottom:\n tx += legendTitleOffset(item, entry, title, anchor, 0, 0);\n ty += legendTitleOffset(item, entry, title, End, -1, 0, 1) + tpad;\n break;\n\n default:\n tx += legendTitleOffset(item, entry, title, anchor, 0, 0);\n }\n\n if (tx || ty) translate(view, title, tx, ty); // translate legend if title pushes into negative coordinates\n\n if ((tx = Math.round(title.bounds.x1 - pad)) < 0) {\n translate(view, entry, -tx, 0);\n translate(view, title, -tx, 0);\n }\n }\n}\n\nfunction legendTitleOffset(item, entry, title, anchor, y, lr, noBar) {\n const grad = item.datum.type !== 'symbol',\n vgrad = title.datum.vgrad,\n e = grad && (lr || !vgrad) && !noBar ? entry.items[0] : entry,\n s = e.bounds[y ? 'y2' : 'x2'] - item.padding,\n u = vgrad && lr ? s : 0,\n v = vgrad && lr ? 0 : s,\n o = y <= 0 ? 0 : multiLineOffset(title);\n return Math.round(anchor === Start ? u : anchor === End ? v - o : 0.5 * (s - o));\n}\n\nfunction translate(view, item, dx, dy) {\n item.x += dx;\n item.y += dy;\n item.bounds.translate(dx, dy);\n item.mark.bounds.translate(dx, dy);\n view.dirty(item);\n}\n\nfunction legendEntryLayout(entries) {\n // get max widths for each column\n const widths = entries.reduce((w, g) => {\n w[g.column] = Math.max(g.bounds.x2 - g.x, w[g.column] || 0);\n return w;\n }, {}); // set dimensions of legend entry groups\n\n entries.forEach(g => {\n g.width = widths[g.column];\n g.height = g.bounds.y2 - g.y;\n });\n}\n\nfunction titleLayout(view, mark, width, height, viewBounds) {\n var group = mark.items[0],\n frame = group.frame,\n orient = group.orient,\n anchor = group.anchor,\n offset = group.offset,\n padding = group.padding,\n title = group.items[0].items[0],\n subtitle = group.items[1] && group.items[1].items[0],\n end = orient === Left || orient === Right ? height : width,\n start = 0,\n x = 0,\n y = 0,\n sx = 0,\n sy = 0,\n pos;\n\n if (frame !== Group) {\n orient === Left ? (start = viewBounds.y2, end = viewBounds.y1) : orient === Right ? (start = viewBounds.y1, end = viewBounds.y2) : (start = viewBounds.x1, end = viewBounds.x2);\n } else if (orient === Left) {\n start = height, end = 0;\n }\n\n pos = anchor === Start ? start : anchor === End ? end : (start + end) / 2;\n\n if (subtitle && subtitle.text) {\n // position subtitle\n switch (orient) {\n case Top:\n case Bottom:\n sy = title.bounds.height() + padding;\n break;\n\n case Left:\n sx = title.bounds.width() + padding;\n break;\n\n case Right:\n sx = -title.bounds.width() - padding;\n break;\n }\n\n tempBounds.clear().union(subtitle.bounds);\n tempBounds.translate(sx - (subtitle.x || 0), sy - (subtitle.y || 0));\n\n if (set(subtitle, 'x', sx) | set(subtitle, 'y', sy)) {\n view.dirty(subtitle);\n subtitle.bounds.clear().union(tempBounds);\n subtitle.mark.bounds.clear().union(tempBounds);\n view.dirty(subtitle);\n }\n\n tempBounds.clear().union(subtitle.bounds);\n } else {\n tempBounds.clear();\n }\n\n tempBounds.union(title.bounds); // position title group\n\n switch (orient) {\n case Top:\n x = pos;\n y = viewBounds.y1 - tempBounds.height() - offset;\n break;\n\n case Left:\n x = viewBounds.x1 - tempBounds.width() - offset;\n y = pos;\n break;\n\n case Right:\n x = viewBounds.x2 + tempBounds.width() + offset;\n y = pos;\n break;\n\n case Bottom:\n x = pos;\n y = viewBounds.y2 + offset;\n break;\n\n default:\n x = group.x;\n y = group.y;\n }\n\n if (set(group, 'x', x) | set(group, 'y', y)) {\n tempBounds.translate(x, y);\n view.dirty(group);\n group.bounds.clear().union(tempBounds);\n mark.bounds.clear().union(tempBounds);\n view.dirty(group);\n }\n\n return group.bounds;\n}\n\n/**\n * Layout view elements such as axes and legends.\n * Also performs size adjustments.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {object} params.mark - Scenegraph mark of groups to layout.\n */\n\nfunction ViewLayout(params) {\n Transform.call(this, null, params);\n}\ninherits(ViewLayout, Transform, {\n transform(_, pulse) {\n const view = pulse.dataflow;\n\n _.mark.items.forEach(group => {\n if (_.layout) trellisLayout(view, group, _.layout);\n layoutGroup(view, group, _);\n });\n\n return shouldReflow(_.mark.group) ? pulse.reflow() : pulse;\n }\n\n});\n\nfunction shouldReflow(group) {\n // We typically should reflow if layout is invoked (#2568), as child items\n // may have resized and reflow ensures group bounds are re-calculated.\n // However, legend entries have a special exception to avoid instability.\n // For example, if a selected legend symbol gains a stroke on hover,\n // we don't want to re-position subsequent elements in the legend.\n return group && group.mark.role !== 'legend-entry';\n}\n\nfunction layoutGroup(view, group, _) {\n var items = group.items,\n width = Math.max(0, group.width || 0),\n height = Math.max(0, group.height || 0),\n viewBounds = new Bounds().set(0, 0, width, height),\n xBounds = viewBounds.clone(),\n yBounds = viewBounds.clone(),\n legends = [],\n title,\n mark,\n orient,\n b,\n i,\n n; // layout axes, gather legends, collect bounds\n\n for (i = 0, n = items.length; i < n; ++i) {\n mark = items[i];\n\n switch (mark.role) {\n case AxisRole:\n b = isYAxis(mark) ? xBounds : yBounds;\n b.union(axisLayout(view, mark, width, height));\n break;\n\n case TitleRole:\n title = mark;\n break;\n\n case LegendRole:\n legends.push(legendLayout(view, mark));\n break;\n\n case FrameRole:\n case ScopeRole:\n case RowHeader:\n case RowFooter:\n case RowTitle:\n case ColHeader:\n case ColFooter:\n case ColTitle:\n xBounds.union(mark.bounds);\n yBounds.union(mark.bounds);\n break;\n\n default:\n viewBounds.union(mark.bounds);\n }\n } // layout legends, adjust viewBounds\n\n\n if (legends.length) {\n // group legends by orient\n const l = {};\n legends.forEach(item => {\n orient = item.orient || Right;\n if (orient !== None) (l[orient] || (l[orient] = [])).push(item);\n }); // perform grid layout for each orient group\n\n for (const orient in l) {\n const g = l[orient];\n gridLayout(view, g, legendParams(g, orient, _.legends, xBounds, yBounds, width, height));\n } // update view bounds\n\n\n legends.forEach(item => {\n const b = item.bounds;\n\n if (!b.equals(item._bounds)) {\n item.bounds = item._bounds;\n view.dirty(item); // dirty previous location\n\n item.bounds = b;\n view.dirty(item);\n }\n\n if (_.autosize && _.autosize.type === Fit) {\n // For autosize fit, incorporate the orthogonal dimension only.\n // Legends that overrun the chart area will then be clipped;\n // otherwise the chart area gets reduced to nothing!\n switch (item.orient) {\n case Left:\n case Right:\n viewBounds.add(b.x1, 0).add(b.x2, 0);\n break;\n\n case Top:\n case Bottom:\n viewBounds.add(0, b.y1).add(0, b.y2);\n }\n } else {\n viewBounds.union(b);\n }\n });\n } // combine bounding boxes\n\n\n viewBounds.union(xBounds).union(yBounds); // layout title, adjust bounds\n\n if (title) {\n viewBounds.union(titleLayout(view, title, width, height, viewBounds));\n } // override aggregated view bounds if content is clipped\n\n\n if (group.clip) {\n viewBounds.set(0, 0, group.width || 0, group.height || 0);\n } // perform size adjustment\n\n\n viewSizeLayout(view, group, viewBounds, _);\n}\n\nfunction viewSizeLayout(view, group, viewBounds, _) {\n const auto = _.autosize || {},\n type = auto.type;\n if (view._autosize < 1 || !type) return;\n let viewWidth = view._width,\n viewHeight = view._height,\n width = Math.max(0, group.width || 0),\n left = Math.max(0, Math.ceil(-viewBounds.x1)),\n height = Math.max(0, group.height || 0),\n top = Math.max(0, Math.ceil(-viewBounds.y1));\n const right = Math.max(0, Math.ceil(viewBounds.x2 - width)),\n bottom = Math.max(0, Math.ceil(viewBounds.y2 - height));\n\n if (auto.contains === Padding) {\n const padding = view.padding();\n viewWidth -= padding.left + padding.right;\n viewHeight -= padding.top + padding.bottom;\n }\n\n if (type === None) {\n left = 0;\n top = 0;\n width = viewWidth;\n height = viewHeight;\n } else if (type === Fit) {\n width = Math.max(0, viewWidth - left - right);\n height = Math.max(0, viewHeight - top - bottom);\n } else if (type === FitX) {\n width = Math.max(0, viewWidth - left - right);\n viewHeight = height + top + bottom;\n } else if (type === FitY) {\n viewWidth = width + left + right;\n height = Math.max(0, viewHeight - top - bottom);\n } else if (type === Pad) {\n viewWidth = width + left + right;\n viewHeight = height + top + bottom;\n }\n\n view._resizeView(viewWidth, viewHeight, width, height, [left, top], auto.resize);\n}\n\nexport { Bound as bound, Identifier as identifier, Mark as mark, Overlap as overlap, Render as render, ViewLayout as viewlayout };\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","import { Transform, ingest, tupleid, stableCompare } from 'vega-dataflow';\nimport { tickCount, tickFormat, validTicks, tickValues, SymbolLegend, labelFormat, labelValues, GradientLegend, scaleFraction, labelFraction, scale, isContinuous, Sequential, Linear, Time, UTC, Pow, Sqrt, Ordinal, scaleImplicit, Log, Symlog, isLogarithmic, BinOrdinal, bandSpace, isInterpolating, interpolateRange, quantizeInterpolator, interpolateColors, interpolate, Band, Point, scheme, Threshold, Quantile, Quantize, Diverging } from 'vega-scale';\nimport { inherits, isArray, error, fastmap, falsy, isFunction, constant, peek, one, toSet, isString, zoomLog, zoomPow, zoomSymlog, zoomLinear, stringValue } from 'vega-util';\nimport { sum, range } from 'd3-array';\nimport { interpolateRound, interpolate as interpolate$1 } from 'd3-interpolate';\n\n/**\n * Generates axis ticks for visualizing a spatial scale.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Scale} params.scale - The scale to generate ticks for.\n * @param {*} [params.count=10] - The approximate number of ticks, or\n * desired tick interval, to use.\n * @param {Array<*>} [params.values] - The exact tick values to use.\n * These must be legal domain values for the provided scale.\n * If provided, the count argument is ignored.\n * @param {function(*):string} [params.formatSpecifier] - A format specifier\n * to use in conjunction with scale.tickFormat. Legal values are\n * any valid d3 4.0 format specifier.\n * @param {function(*):string} [params.format] - The format function to use.\n * If provided, the formatSpecifier argument is ignored.\n */\n\nfunction AxisTicks(params) {\n Transform.call(this, null, params);\n}\ninherits(AxisTicks, Transform, {\n transform(_, pulse) {\n if (this.value && !_.modified()) {\n return pulse.StopPropagation;\n }\n\n var locale = pulse.dataflow.locale(),\n out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n ticks = this.value,\n scale = _.scale,\n tally = _.count == null ? _.values ? _.values.length : 10 : _.count,\n count = tickCount(scale, tally, _.minstep),\n format = _.format || tickFormat(locale, scale, count, _.formatSpecifier, _.formatType, !!_.values),\n values = _.values ? validTicks(scale, _.values, count) : tickValues(scale, count);\n if (ticks) out.rem = ticks;\n ticks = values.map((value, i) => ingest({\n index: i / (values.length - 1 || 1),\n value: value,\n label: format(value)\n }));\n\n if (_.extra && ticks.length) {\n // add an extra tick pegged to the initial domain value\n // this is used to generate axes with 'binned' domains\n ticks.push(ingest({\n index: -1,\n extra: {\n value: ticks[0].value\n },\n label: ''\n }));\n }\n\n out.source = ticks;\n out.add = ticks;\n this.value = ticks;\n return out;\n }\n\n});\n\n/**\n * Joins a set of data elements against a set of visual items.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): object} [params.item] - An item generator function.\n * @param {function(object): *} [params.key] - The key field associating data and visual items.\n */\n\nfunction DataJoin(params) {\n Transform.call(this, null, params);\n}\n\nfunction defaultItemCreate() {\n return ingest({});\n}\n\nfunction newMap(key) {\n const map = fastmap().test(t => t.exit);\n\n map.lookup = t => map.get(key(t));\n\n return map;\n}\n\ninherits(DataJoin, Transform, {\n transform(_, pulse) {\n var df = pulse.dataflow,\n out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n item = _.item || defaultItemCreate,\n key = _.key || tupleid,\n map = this.value; // prevent transient (e.g., hover) requests from\n // cascading across marks derived from marks\n\n if (isArray(out.encode)) {\n out.encode = null;\n }\n\n if (map && (_.modified('key') || pulse.modified(key))) {\n error('DataJoin does not support modified key function or fields.');\n }\n\n if (!map) {\n pulse = pulse.addAll();\n this.value = map = newMap(key);\n }\n\n pulse.visit(pulse.ADD, t => {\n const k = key(t);\n let x = map.get(k);\n\n if (x) {\n if (x.exit) {\n map.empty--;\n out.add.push(x);\n } else {\n out.mod.push(x);\n }\n } else {\n x = item(t);\n map.set(k, x);\n out.add.push(x);\n }\n\n x.datum = t;\n x.exit = false;\n });\n pulse.visit(pulse.MOD, t => {\n const k = key(t),\n x = map.get(k);\n\n if (x) {\n x.datum = t;\n out.mod.push(x);\n }\n });\n pulse.visit(pulse.REM, t => {\n const k = key(t),\n x = map.get(k);\n\n if (t === x.datum && !x.exit) {\n out.rem.push(x);\n x.exit = true;\n ++map.empty;\n }\n });\n if (pulse.changed(pulse.ADD_MOD)) out.modifies('datum');\n\n if (pulse.clean() || _.clean && map.empty > df.cleanThreshold) {\n df.runAfter(map.clean);\n }\n\n return out;\n }\n\n});\n\n/**\n * Invokes encoding functions for visual items.\n * @constructor\n * @param {object} params - The parameters to the encoding functions. This\n * parameter object will be passed through to all invoked encoding functions.\n * @param {object} [params.mod=false] - Flag indicating if tuples in the input\n * mod set that are unmodified by encoders should be included in the output.\n * @param {object} param.encoders - The encoding functions\n * @param {function(object, object): boolean} [param.encoders.update] - Update encoding set\n * @param {function(object, object): boolean} [param.encoders.enter] - Enter encoding set\n * @param {function(object, object): boolean} [param.encoders.exit] - Exit encoding set\n */\n\nfunction Encode(params) {\n Transform.call(this, null, params);\n}\ninherits(Encode, Transform, {\n transform(_, pulse) {\n var out = pulse.fork(pulse.ADD_REM),\n fmod = _.mod || false,\n encoders = _.encoders,\n encode = pulse.encode; // if an array, the encode directive includes additional sets\n // that must be defined in order for the primary set to be invoked\n // e.g., only run the update set if the hover set is defined\n\n if (isArray(encode)) {\n if (out.changed() || encode.every(e => encoders[e])) {\n encode = encode[0];\n out.encode = null; // consume targeted encode directive\n } else {\n return pulse.StopPropagation;\n }\n } // marshall encoder functions\n\n\n var reenter = encode === 'enter',\n update = encoders.update || falsy,\n enter = encoders.enter || falsy,\n exit = encoders.exit || falsy,\n set = (encode && !reenter ? encoders[encode] : update) || falsy;\n\n if (pulse.changed(pulse.ADD)) {\n pulse.visit(pulse.ADD, t => {\n enter(t, _);\n update(t, _);\n });\n out.modifies(enter.output);\n out.modifies(update.output);\n\n if (set !== falsy && set !== update) {\n pulse.visit(pulse.ADD, t => {\n set(t, _);\n });\n out.modifies(set.output);\n }\n }\n\n if (pulse.changed(pulse.REM) && exit !== falsy) {\n pulse.visit(pulse.REM, t => {\n exit(t, _);\n });\n out.modifies(exit.output);\n }\n\n if (reenter || set !== falsy) {\n const flag = pulse.MOD | (_.modified() ? pulse.REFLOW : 0);\n\n if (reenter) {\n pulse.visit(flag, t => {\n const mod = enter(t, _) || fmod;\n if (set(t, _) || mod) out.mod.push(t);\n });\n if (out.mod.length) out.modifies(enter.output);\n } else {\n pulse.visit(flag, t => {\n if (set(t, _) || fmod) out.mod.push(t);\n });\n }\n\n if (out.mod.length) out.modifies(set.output);\n }\n\n return out.changed() ? out : pulse.StopPropagation;\n }\n\n});\n\n/**\n * Generates legend entries for visualizing a scale.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Scale} params.scale - The scale to generate items for.\n * @param {*} [params.count=5] - The approximate number of items, or\n * desired tick interval, to use.\n * @param {*} [params.limit] - The maximum number of entries to\n * include in a symbol legend.\n * @param {Array<*>} [params.values] - The exact tick values to use.\n * These must be legal domain values for the provided scale.\n * If provided, the count argument is ignored.\n * @param {string} [params.formatSpecifier] - A format specifier\n * to use in conjunction with scale.tickFormat. Legal values are\n * any valid D3 format specifier string.\n * @param {function(*):string} [params.format] - The format function to use.\n * If provided, the formatSpecifier argument is ignored.\n */\n\nfunction LegendEntries(params) {\n Transform.call(this, [], params);\n}\ninherits(LegendEntries, Transform, {\n transform(_, pulse) {\n if (this.value != null && !_.modified()) {\n return pulse.StopPropagation;\n }\n\n var locale = pulse.dataflow.locale(),\n out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n items = this.value,\n type = _.type || SymbolLegend,\n scale = _.scale,\n limit = +_.limit,\n count = tickCount(scale, _.count == null ? 5 : _.count, _.minstep),\n lskip = !!_.values || type === SymbolLegend,\n format = _.format || labelFormat(locale, scale, count, type, _.formatSpecifier, _.formatType, lskip),\n values = _.values || labelValues(scale, count),\n domain,\n fraction,\n size,\n offset,\n ellipsis;\n if (items) out.rem = items;\n\n if (type === SymbolLegend) {\n if (limit && values.length > limit) {\n pulse.dataflow.warn('Symbol legend count exceeds limit, filtering items.');\n items = values.slice(0, limit - 1);\n ellipsis = true;\n } else {\n items = values;\n }\n\n if (isFunction(size = _.size)) {\n // if first value maps to size zero, remove from list (vega#717)\n if (!_.values && scale(items[0]) === 0) {\n items = items.slice(1);\n } // compute size offset for legend entries\n\n\n offset = items.reduce((max, value) => Math.max(max, size(value, _)), 0);\n } else {\n size = constant(offset = size || 8);\n }\n\n items = items.map((value, index) => ingest({\n index: index,\n label: format(value, index, items),\n value: value,\n offset: offset,\n size: size(value, _)\n }));\n\n if (ellipsis) {\n ellipsis = values[items.length];\n items.push(ingest({\n index: items.length,\n label: \"\\u2026\".concat(values.length - items.length, \" entries\"),\n value: ellipsis,\n offset: offset,\n size: size(ellipsis, _)\n }));\n }\n } else if (type === GradientLegend) {\n domain = scale.domain(), fraction = scaleFraction(scale, domain[0], peek(domain)); // if automatic label generation produces 2 or fewer values,\n // use the domain end points instead (fixes vega/vega#1364)\n\n if (values.length < 3 && !_.values && domain[0] !== peek(domain)) {\n values = [domain[0], peek(domain)];\n }\n\n items = values.map((value, index) => ingest({\n index: index,\n label: format(value, index, values),\n value: value,\n perc: fraction(value)\n }));\n } else {\n size = values.length - 1;\n fraction = labelFraction(scale);\n items = values.map((value, index) => ingest({\n index: index,\n label: format(value, index, values),\n value: value,\n perc: index ? fraction(value) : 0,\n perc2: index === size ? 1 : fraction(values[index + 1])\n }));\n }\n\n out.source = items;\n out.add = items;\n this.value = items;\n return out;\n }\n\n});\n\nconst sourceX = t => t.source.x;\n\nconst sourceY = t => t.source.y;\n\nconst targetX = t => t.target.x;\n\nconst targetY = t => t.target.y;\n/**\n * Layout paths linking source and target elements.\n * @constructor\n * @param {object} params - The parameters for this operator.\n */\n\n\nfunction LinkPath(params) {\n Transform.call(this, {}, params);\n}\nLinkPath.Definition = {\n 'type': 'LinkPath',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'sourceX',\n 'type': 'field',\n 'default': 'source.x'\n }, {\n 'name': 'sourceY',\n 'type': 'field',\n 'default': 'source.y'\n }, {\n 'name': 'targetX',\n 'type': 'field',\n 'default': 'target.x'\n }, {\n 'name': 'targetY',\n 'type': 'field',\n 'default': 'target.y'\n }, {\n 'name': 'orient',\n 'type': 'enum',\n 'default': 'vertical',\n 'values': ['horizontal', 'vertical', 'radial']\n }, {\n 'name': 'shape',\n 'type': 'enum',\n 'default': 'line',\n 'values': ['line', 'arc', 'curve', 'diagonal', 'orthogonal']\n }, {\n 'name': 'require',\n 'type': 'signal'\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': 'path'\n }]\n};\ninherits(LinkPath, Transform, {\n transform(_, pulse) {\n var sx = _.sourceX || sourceX,\n sy = _.sourceY || sourceY,\n tx = _.targetX || targetX,\n ty = _.targetY || targetY,\n as = _.as || 'path',\n orient = _.orient || 'vertical',\n shape = _.shape || 'line',\n path = Paths.get(shape + '-' + orient) || Paths.get(shape);\n\n if (!path) {\n error('LinkPath unsupported type: ' + _.shape + (_.orient ? '-' + _.orient : ''));\n }\n\n pulse.visit(pulse.SOURCE, t => {\n t[as] = path(sx(t), sy(t), tx(t), ty(t));\n });\n return pulse.reflow(_.modified()).modifies(as);\n }\n\n});\n\nconst line = (sx, sy, tx, ty) => 'M' + sx + ',' + sy + 'L' + tx + ',' + ty;\n\nconst lineR = (sa, sr, ta, tr) => line(sr * Math.cos(sa), sr * Math.sin(sa), tr * Math.cos(ta), tr * Math.sin(ta));\n\nconst arc = (sx, sy, tx, ty) => {\n var dx = tx - sx,\n dy = ty - sy,\n rr = Math.sqrt(dx * dx + dy * dy) / 2,\n ra = 180 * Math.atan2(dy, dx) / Math.PI;\n return 'M' + sx + ',' + sy + 'A' + rr + ',' + rr + ' ' + ra + ' 0 1' + ' ' + tx + ',' + ty;\n};\n\nconst arcR = (sa, sr, ta, tr) => arc(sr * Math.cos(sa), sr * Math.sin(sa), tr * Math.cos(ta), tr * Math.sin(ta));\n\nconst curve = (sx, sy, tx, ty) => {\n const dx = tx - sx,\n dy = ty - sy,\n ix = 0.2 * (dx + dy),\n iy = 0.2 * (dy - dx);\n return 'M' + sx + ',' + sy + 'C' + (sx + ix) + ',' + (sy + iy) + ' ' + (tx + iy) + ',' + (ty - ix) + ' ' + tx + ',' + ty;\n};\n\nconst curveR = (sa, sr, ta, tr) => curve(sr * Math.cos(sa), sr * Math.sin(sa), tr * Math.cos(ta), tr * Math.sin(ta));\n\nconst orthoX = (sx, sy, tx, ty) => 'M' + sx + ',' + sy + 'V' + ty + 'H' + tx;\n\nconst orthoY = (sx, sy, tx, ty) => 'M' + sx + ',' + sy + 'H' + tx + 'V' + ty;\n\nconst orthoR = (sa, sr, ta, tr) => {\n const sc = Math.cos(sa),\n ss = Math.sin(sa),\n tc = Math.cos(ta),\n ts = Math.sin(ta),\n sf = Math.abs(ta - sa) > Math.PI ? ta <= sa : ta > sa;\n return 'M' + sr * sc + ',' + sr * ss + 'A' + sr + ',' + sr + ' 0 0,' + (sf ? 1 : 0) + ' ' + sr * tc + ',' + sr * ts + 'L' + tr * tc + ',' + tr * ts;\n};\n\nconst diagonalX = (sx, sy, tx, ty) => {\n const m = (sx + tx) / 2;\n return 'M' + sx + ',' + sy + 'C' + m + ',' + sy + ' ' + m + ',' + ty + ' ' + tx + ',' + ty;\n};\n\nconst diagonalY = (sx, sy, tx, ty) => {\n const m = (sy + ty) / 2;\n return 'M' + sx + ',' + sy + 'C' + sx + ',' + m + ' ' + tx + ',' + m + ' ' + tx + ',' + ty;\n};\n\nconst diagonalR = (sa, sr, ta, tr) => {\n const sc = Math.cos(sa),\n ss = Math.sin(sa),\n tc = Math.cos(ta),\n ts = Math.sin(ta),\n mr = (sr + tr) / 2;\n return 'M' + sr * sc + ',' + sr * ss + 'C' + mr * sc + ',' + mr * ss + ' ' + mr * tc + ',' + mr * ts + ' ' + tr * tc + ',' + tr * ts;\n};\n\nconst Paths = fastmap({\n 'line': line,\n 'line-radial': lineR,\n 'arc': arc,\n 'arc-radial': arcR,\n 'curve': curve,\n 'curve-radial': curveR,\n 'orthogonal-horizontal': orthoX,\n 'orthogonal-vertical': orthoY,\n 'orthogonal-radial': orthoR,\n 'diagonal-horizontal': diagonalX,\n 'diagonal-vertical': diagonalY,\n 'diagonal-radial': diagonalR\n});\n\n/**\n * Pie and donut chart layout.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The value field to size pie segments.\n * @param {number} [params.startAngle=0] - The start angle (in radians) of the layout.\n * @param {number} [params.endAngle=2π] - The end angle (in radians) of the layout.\n * @param {boolean} [params.sort] - Boolean flag for sorting sectors by value.\n */\n\nfunction Pie(params) {\n Transform.call(this, null, params);\n}\nPie.Definition = {\n 'type': 'Pie',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'startAngle',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'endAngle',\n 'type': 'number',\n 'default': 6.283185307179586\n }, {\n 'name': 'sort',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': ['startAngle', 'endAngle']\n }]\n};\ninherits(Pie, Transform, {\n transform(_, pulse) {\n var as = _.as || ['startAngle', 'endAngle'],\n startAngle = as[0],\n endAngle = as[1],\n field = _.field || one,\n start = _.startAngle || 0,\n stop = _.endAngle != null ? _.endAngle : 2 * Math.PI,\n data = pulse.source,\n values = data.map(field),\n n = values.length,\n a = start,\n k = (stop - start) / sum(values),\n index = range(n),\n i,\n t,\n v;\n\n if (_.sort) {\n index.sort((a, b) => values[a] - values[b]);\n }\n\n for (i = 0; i < n; ++i) {\n v = values[index[i]];\n t = data[index[i]];\n t[startAngle] = a;\n t[endAngle] = a += v * k;\n }\n\n this.value = values;\n return pulse.reflow(_.modified()).modifies(as);\n }\n\n});\n\nconst DEFAULT_COUNT = 5;\n\nfunction includeZero(scale) {\n const type = scale.type;\n return !scale.bins && (type === Linear || type === Pow || type === Sqrt);\n}\n\nfunction includePad(type) {\n return isContinuous(type) && type !== Sequential;\n}\n\nconst SKIP = toSet(['set', 'modified', 'clear', 'type', 'scheme', 'schemeExtent', 'schemeCount', 'domain', 'domainMin', 'domainMid', 'domainMax', 'domainRaw', 'domainImplicit', 'nice', 'zero', 'bins', 'range', 'rangeStep', 'round', 'reverse', 'interpolate', 'interpolateGamma']);\n/**\n * Maintains a scale function mapping data values to visual channels.\n * @constructor\n * @param {object} params - The parameters for this operator.\n */\n\nfunction Scale(params) {\n Transform.call(this, null, params);\n this.modified(true); // always treat as modified\n}\ninherits(Scale, Transform, {\n transform(_, pulse) {\n var df = pulse.dataflow,\n scale$1 = this.value,\n key = scaleKey(_);\n\n if (!scale$1 || key !== scale$1.type) {\n this.value = scale$1 = scale(key)();\n }\n\n for (key in _) if (!SKIP[key]) {\n // padding is a scale property for band/point but not others\n if (key === 'padding' && includePad(scale$1.type)) continue; // invoke scale property setter, raise warning if not found\n\n isFunction(scale$1[key]) ? scale$1[key](_[key]) : df.warn('Unsupported scale property: ' + key);\n }\n\n configureRange(scale$1, _, configureBins(scale$1, _, configureDomain(scale$1, _, df)));\n return pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);\n }\n\n});\n\nfunction scaleKey(_) {\n var t = _.type,\n d = '',\n n; // backwards compatibility pre Vega 5.\n\n if (t === Sequential) return Sequential + '-' + Linear;\n\n if (isContinuousColor(_)) {\n n = _.rawDomain ? _.rawDomain.length : _.domain ? _.domain.length + +(_.domainMid != null) : 0;\n d = n === 2 ? Sequential + '-' : n === 3 ? Diverging + '-' : '';\n }\n\n return (d + t || Linear).toLowerCase();\n}\n\nfunction isContinuousColor(_) {\n const t = _.type;\n return isContinuous(t) && t !== Time && t !== UTC && (_.scheme || _.range && _.range.length && _.range.every(isString));\n}\n\nfunction configureDomain(scale, _, df) {\n // check raw domain, if provided use that and exit early\n const raw = rawDomain(scale, _.domainRaw, df);\n if (raw > -1) return raw;\n var domain = _.domain,\n type = scale.type,\n zero = _.zero || _.zero === undefined && includeZero(scale),\n n,\n mid;\n if (!domain) return 0; // adjust continuous domain for minimum pixel padding\n\n if (includePad(type) && _.padding && domain[0] !== peek(domain)) {\n domain = padDomain(type, domain, _.range, _.padding, _.exponent, _.constant);\n } // adjust domain based on zero, min, max settings\n\n\n if (zero || _.domainMin != null || _.domainMax != null || _.domainMid != null) {\n n = (domain = domain.slice()).length - 1 || 1;\n\n if (zero) {\n if (domain[0] > 0) domain[0] = 0;\n if (domain[n] < 0) domain[n] = 0;\n }\n\n if (_.domainMin != null) domain[0] = _.domainMin;\n if (_.domainMax != null) domain[n] = _.domainMax;\n\n if (_.domainMid != null) {\n mid = _.domainMid;\n const i = mid > domain[n] ? n + 1 : mid < domain[0] ? 0 : n;\n if (i !== n) df.warn('Scale domainMid exceeds domain min or max.', mid);\n domain.splice(i, 0, mid);\n }\n } // set the scale domain\n\n\n scale.domain(domainCheck(type, domain, df)); // if ordinal scale domain is defined, prevent implicit\n // domain construction as side-effect of scale lookup\n\n if (type === Ordinal) {\n scale.unknown(_.domainImplicit ? scaleImplicit : undefined);\n } // perform 'nice' adjustment as requested\n\n\n if (_.nice && scale.nice) {\n scale.nice(_.nice !== true && tickCount(scale, _.nice) || null);\n } // return the cardinality of the domain\n\n\n return domain.length;\n}\n\nfunction rawDomain(scale, raw, df) {\n if (raw) {\n scale.domain(domainCheck(scale.type, raw, df));\n return raw.length;\n } else {\n return -1;\n }\n}\n\nfunction padDomain(type, domain, range, pad, exponent, constant) {\n var span = Math.abs(peek(range) - range[0]),\n frac = span / (span - 2 * pad),\n d = type === Log ? zoomLog(domain, null, frac) : type === Sqrt ? zoomPow(domain, null, frac, 0.5) : type === Pow ? zoomPow(domain, null, frac, exponent || 1) : type === Symlog ? zoomSymlog(domain, null, frac, constant || 1) : zoomLinear(domain, null, frac);\n domain = domain.slice();\n domain[0] = d[0];\n domain[domain.length - 1] = d[1];\n return domain;\n}\n\nfunction domainCheck(type, domain, df) {\n if (isLogarithmic(type)) {\n // sum signs of domain values\n // if all pos or all neg, abs(sum) === domain.length\n var s = Math.abs(domain.reduce((s, v) => s + (v < 0 ? -1 : v > 0 ? 1 : 0), 0));\n\n if (s !== domain.length) {\n df.warn('Log scale domain includes zero: ' + stringValue(domain));\n }\n }\n\n return domain;\n}\n\nfunction configureBins(scale, _, count) {\n let bins = _.bins;\n\n if (bins && !isArray(bins)) {\n // generate bin boundary array\n const domain = scale.domain(),\n lo = domain[0],\n hi = peek(domain),\n step = bins.step;\n let start = bins.start == null ? lo : bins.start,\n stop = bins.stop == null ? hi : bins.stop;\n if (!step) error('Scale bins parameter missing step property.');\n if (start < lo) start = step * Math.ceil(lo / step);\n if (stop > hi) stop = step * Math.floor(hi / step);\n bins = range(start, stop + step / 2, step);\n }\n\n if (bins) {\n // assign bin boundaries to scale instance\n scale.bins = bins;\n } else if (scale.bins) {\n // no current bins, remove bins if previously set\n delete scale.bins;\n } // special handling for bin-ordinal scales\n\n\n if (scale.type === BinOrdinal) {\n if (!bins) {\n // the domain specifies the bins\n scale.bins = scale.domain();\n } else if (!_.domain && !_.domainRaw) {\n // the bins specify the domain\n scale.domain(bins);\n count = bins.length;\n }\n } // return domain cardinality\n\n\n return count;\n}\n\nfunction configureRange(scale, _, count) {\n var type = scale.type,\n round = _.round || false,\n range = _.range; // if range step specified, calculate full range extent\n\n if (_.rangeStep != null) {\n range = configureRangeStep(type, _, count);\n } // else if a range scheme is defined, use that\n else if (_.scheme) {\n range = configureScheme(type, _, count);\n\n if (isFunction(range)) {\n if (scale.interpolator) {\n return scale.interpolator(range);\n } else {\n error(\"Scale type \".concat(type, \" does not support interpolating color schemes.\"));\n }\n }\n } // given a range array for an interpolating scale, convert to interpolator\n\n\n if (range && isInterpolating(type)) {\n return scale.interpolator(interpolateColors(flip(range, _.reverse), _.interpolate, _.interpolateGamma));\n } // configure rounding / interpolation\n\n\n if (range && _.interpolate && scale.interpolate) {\n scale.interpolate(interpolate(_.interpolate, _.interpolateGamma));\n } else if (isFunction(scale.round)) {\n scale.round(round);\n } else if (isFunction(scale.rangeRound)) {\n scale.interpolate(round ? interpolateRound : interpolate$1);\n }\n\n if (range) scale.range(flip(range, _.reverse));\n}\n\nfunction configureRangeStep(type, _, count) {\n if (type !== Band && type !== Point) {\n error('Only band and point scales support rangeStep.');\n } // calculate full range based on requested step size and padding\n\n\n var outer = (_.paddingOuter != null ? _.paddingOuter : _.padding) || 0,\n inner = type === Point ? 1 : (_.paddingInner != null ? _.paddingInner : _.padding) || 0;\n return [0, _.rangeStep * bandSpace(count, inner, outer)];\n}\n\nfunction configureScheme(type, _, count) {\n var extent = _.schemeExtent,\n name,\n scheme$1;\n\n if (isArray(_.scheme)) {\n scheme$1 = interpolateColors(_.scheme, _.interpolate, _.interpolateGamma);\n } else {\n name = _.scheme.toLowerCase();\n scheme$1 = scheme(name);\n if (!scheme$1) error(\"Unrecognized scheme name: \".concat(_.scheme));\n } // determine size for potential discrete range\n\n\n count = type === Threshold ? count + 1 : type === BinOrdinal ? count - 1 : type === Quantile || type === Quantize ? +_.schemeCount || DEFAULT_COUNT : count; // adjust and/or quantize scheme as appropriate\n\n return isInterpolating(type) ? adjustScheme(scheme$1, extent, _.reverse) : isFunction(scheme$1) ? quantizeInterpolator(adjustScheme(scheme$1, extent), count) : type === Ordinal ? scheme$1 : scheme$1.slice(0, count);\n}\n\nfunction adjustScheme(scheme, extent, reverse) {\n return isFunction(scheme) && (extent || reverse) ? interpolateRange(scheme, flip(extent || [0, 1], reverse)) : scheme;\n}\n\nfunction flip(array, reverse) {\n return reverse ? array.slice().reverse() : array;\n}\n\n/**\n * Sorts scenegraph items in the pulse source array.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(*,*): number} [params.sort] - A comparator\n * function for sorting tuples.\n */\n\nfunction SortItems(params) {\n Transform.call(this, null, params);\n}\ninherits(SortItems, Transform, {\n transform(_, pulse) {\n const mod = _.modified('sort') || pulse.changed(pulse.ADD) || pulse.modified(_.sort.fields) || pulse.modified('datum');\n if (mod) pulse.source.sort(stableCompare(_.sort));\n this.modified(mod);\n return pulse;\n }\n\n});\n\nconst Zero = 'zero',\n Center = 'center',\n Normalize = 'normalize',\n DefOutput = ['y0', 'y1'];\n/**\n * Stack layout for visualization elements.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The value field to stack.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors to groupby.\n * @param {function(object,object): number} [params.sort] - A comparator for stack sorting.\n * @param {string} [offset='zero'] - Stack baseline offset. One of 'zero', 'center', 'normalize'.\n */\n\nfunction Stack(params) {\n Transform.call(this, null, params);\n}\nStack.Definition = {\n 'type': 'Stack',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'sort',\n 'type': 'compare'\n }, {\n 'name': 'offset',\n 'type': 'enum',\n 'default': Zero,\n 'values': [Zero, Center, Normalize]\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': DefOutput\n }]\n};\ninherits(Stack, Transform, {\n transform(_, pulse) {\n var as = _.as || DefOutput,\n y0 = as[0],\n y1 = as[1],\n sort = stableCompare(_.sort),\n field = _.field || one,\n stack = _.offset === Center ? stackCenter : _.offset === Normalize ? stackNormalize : stackZero,\n groups,\n i,\n n,\n max; // partition, sum, and sort the stack groups\n\n groups = partition(pulse.source, _.groupby, sort, field); // compute stack layouts per group\n\n for (i = 0, n = groups.length, max = groups.max; i < n; ++i) {\n stack(groups[i], max, field, y0, y1);\n }\n\n return pulse.reflow(_.modified()).modifies(as);\n }\n\n});\n\nfunction stackCenter(group, max, field, y0, y1) {\n var last = (max - group.sum) / 2,\n m = group.length,\n j = 0,\n t;\n\n for (; j < m; ++j) {\n t = group[j];\n t[y0] = last;\n t[y1] = last += Math.abs(field(t));\n }\n}\n\nfunction stackNormalize(group, max, field, y0, y1) {\n var scale = 1 / group.sum,\n last = 0,\n m = group.length,\n j = 0,\n v = 0,\n t;\n\n for (; j < m; ++j) {\n t = group[j];\n t[y0] = last;\n t[y1] = last = scale * (v += Math.abs(field(t)));\n }\n}\n\nfunction stackZero(group, max, field, y0, y1) {\n var lastPos = 0,\n lastNeg = 0,\n m = group.length,\n j = 0,\n v,\n t;\n\n for (; j < m; ++j) {\n t = group[j];\n v = +field(t);\n\n if (v < 0) {\n t[y0] = lastNeg;\n t[y1] = lastNeg += v;\n } else {\n t[y0] = lastPos;\n t[y1] = lastPos += v;\n }\n }\n}\n\nfunction partition(data, groupby, sort, field) {\n var groups = [],\n get = f => f(t),\n map,\n i,\n n,\n m,\n t,\n k,\n g,\n s,\n max; // partition data points into stack groups\n\n\n if (groupby == null) {\n groups.push(data.slice());\n } else {\n for (map = {}, i = 0, n = data.length; i < n; ++i) {\n t = data[i];\n k = groupby.map(get);\n g = map[k];\n\n if (!g) {\n map[k] = g = [];\n groups.push(g);\n }\n\n g.push(t);\n }\n } // compute sums of groups, sort groups as needed\n\n\n for (k = 0, max = 0, m = groups.length; k < m; ++k) {\n g = groups[k];\n\n for (i = 0, s = 0, n = g.length; i < n; ++i) {\n s += Math.abs(field(g[i]));\n }\n\n g.sum = s;\n if (s > max) max = s;\n if (sort) g.sort(sort);\n }\n\n groups.max = max;\n return groups;\n}\n\nexport { AxisTicks as axisticks, DataJoin as datajoin, Encode as encode, LegendEntries as legendentries, LinkPath as linkpath, Pie as pie, Scale as scale, SortItems as sortitems, Stack as stack };\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n if (r0 * step < start) ++r0;\n if (r1 * step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) * step;\n } else {\n step = -step;\n let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n if (r0 / step < start) ++r0;\n if (r1 / step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default x => x;\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","import {Adder} from \"d3-array\";\nimport {abs} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar areaSum = new Adder(),\n areaRingSum = new Adder(),\n x00,\n y00,\n x0,\n y0;\n\nvar areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop;\n areaSum.add(abs(areaRingSum));\n areaRingSum = new Adder();\n },\n result: function() {\n var area = areaSum / 2;\n areaSum = new Adder();\n return area;\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaPointFirst(x, y) {\n areaStream.point = areaPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction areaPoint(x, y) {\n areaRingSum.add(y0 * x - x0 * y);\n x0 = x, y0 = y;\n}\n\nfunction areaRingEnd() {\n areaPoint(x00, y00);\n}\n\nexport default areaStream;\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {sqrt} from \"../math.js\";\n\n// TODO Enforce positive area for exterior, negative area for interior?\n\nvar X0 = 0,\n Y0 = 0,\n Z0 = 0,\n X1 = 0,\n Y1 = 0,\n Z1 = 0,\n X2 = 0,\n Y2 = 0,\n Z2 = 0,\n x00,\n y00,\n x0,\n y0;\n\nvar centroidStream = {\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.point = centroidPoint;\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n },\n result: function() {\n var centroid = Z2 ? [X2 / Z2, Y2 / Z2]\n : Z1 ? [X1 / Z1, Y1 / Z1]\n : Z0 ? [X0 / Z0, Y0 / Z0]\n : [NaN, NaN];\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 =\n X2 = Y2 = Z2 = 0;\n return centroid;\n }\n};\n\nfunction centroidPoint(x, y) {\n X0 += x;\n Y0 += y;\n ++Z0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidPointFirstLine;\n}\n\nfunction centroidPointFirstLine(x, y) {\n centroidStream.point = centroidPointLine;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidPointLine(x, y) {\n var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy);\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n centroidPoint(x0 = x, y0 = y);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingStart() {\n centroidStream.point = centroidPointFirstRing;\n}\n\nfunction centroidRingEnd() {\n centroidPointRing(x00, y00);\n}\n\nfunction centroidPointFirstRing(x, y) {\n centroidStream.point = centroidPointRing;\n centroidPoint(x00 = x0 = x, y00 = y0 = y);\n}\n\nfunction centroidPointRing(x, y) {\n var dx = x - x0,\n dy = y - y0,\n z = sqrt(dx * dx + dy * dy);\n\n X1 += z * (x0 + x) / 2;\n Y1 += z * (y0 + y) / 2;\n Z1 += z;\n\n z = y0 * x - x0 * y;\n X2 += z * (x0 + x);\n Y2 += z * (y0 + y);\n Z2 += z * 3;\n centroidPoint(x0 = x, y0 = y);\n}\n\nexport default centroidStream;\n","import {tau} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nexport default function PathContext(context) {\n this._context = context;\n}\n\nPathContext.prototype = {\n _radius: 4.5,\n pointRadius: function(_) {\n return this._radius = _, this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._context.closePath();\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._context.moveTo(x, y);\n this._point = 1;\n break;\n }\n case 1: {\n this._context.lineTo(x, y);\n break;\n }\n default: {\n this._context.moveTo(x + this._radius, y);\n this._context.arc(x, y, this._radius, 0, tau);\n break;\n }\n }\n },\n result: noop\n};\n","import {Adder} from \"d3-array\";\nimport {sqrt} from \"../math.js\";\nimport noop from \"../noop.js\";\n\nvar lengthSum = new Adder(),\n lengthRing,\n x00,\n y00,\n x0,\n y0;\n\nvar lengthStream = {\n point: noop,\n lineStart: function() {\n lengthStream.point = lengthPointFirst;\n },\n lineEnd: function() {\n if (lengthRing) lengthPoint(x00, y00);\n lengthStream.point = noop;\n },\n polygonStart: function() {\n lengthRing = true;\n },\n polygonEnd: function() {\n lengthRing = null;\n },\n result: function() {\n var length = +lengthSum;\n lengthSum = new Adder();\n return length;\n }\n};\n\nfunction lengthPointFirst(x, y) {\n lengthStream.point = lengthPoint;\n x00 = x0 = x, y00 = y0 = y;\n}\n\nfunction lengthPoint(x, y) {\n x0 -= x, y0 -= y;\n lengthSum.add(sqrt(x0 * x0 + y0 * y0));\n x0 = x, y0 = y;\n}\n\nexport default lengthStream;\n","export default function PathString() {\n this._string = [];\n}\n\nPathString.prototype = {\n _radius: 4.5,\n _circle: circle(4.5),\n pointRadius: function(_) {\n if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;\n return this;\n },\n polygonStart: function() {\n this._line = 0;\n },\n polygonEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line === 0) this._string.push(\"Z\");\n this._point = NaN;\n },\n point: function(x, y) {\n switch (this._point) {\n case 0: {\n this._string.push(\"M\", x, \",\", y);\n this._point = 1;\n break;\n }\n case 1: {\n this._string.push(\"L\", x, \",\", y);\n break;\n }\n default: {\n if (this._circle == null) this._circle = circle(this._radius);\n this._string.push(\"M\", x, \",\", y, this._circle);\n break;\n }\n }\n },\n result: function() {\n if (this._string.length) {\n var result = this._string.join(\"\");\n this._string = [];\n return result;\n } else {\n return null;\n }\n }\n};\n\nfunction circle(radius) {\n return \"m0,\" + radius\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + -2 * radius\n + \"a\" + radius + \",\" + radius + \" 0 1,1 0,\" + 2 * radius\n + \"z\";\n}\n","import identity from \"../identity.js\";\nimport stream from \"../stream.js\";\nimport pathArea from \"./area.js\";\nimport pathBounds from \"./bounds.js\";\nimport pathCentroid from \"./centroid.js\";\nimport PathContext from \"./context.js\";\nimport pathMeasure from \"./measure.js\";\nimport PathString from \"./string.js\";\n\nexport default function(projection, context) {\n var pointRadius = 4.5,\n projectionStream,\n contextStream;\n\n function path(object) {\n if (object) {\n if (typeof pointRadius === \"function\") contextStream.pointRadius(+pointRadius.apply(this, arguments));\n stream(object, projectionStream(contextStream));\n }\n return contextStream.result();\n }\n\n path.area = function(object) {\n stream(object, projectionStream(pathArea));\n return pathArea.result();\n };\n\n path.measure = function(object) {\n stream(object, projectionStream(pathMeasure));\n return pathMeasure.result();\n };\n\n path.bounds = function(object) {\n stream(object, projectionStream(pathBounds));\n return pathBounds.result();\n };\n\n path.centroid = function(object) {\n stream(object, projectionStream(pathCentroid));\n return pathCentroid.result();\n };\n\n path.projection = function(_) {\n return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection;\n };\n\n path.context = function(_) {\n if (!arguments.length) return context;\n contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _);\n if (typeof pointRadius !== \"function\") contextStream.pointRadius(pointRadius);\n return path;\n };\n\n path.pointRadius = function(_) {\n if (!arguments.length) return pointRadius;\n pointRadius = typeof _ === \"function\" ? _ : (contextStream.pointRadius(+_), +_);\n return path;\n };\n\n return path.projection(projection).context(context);\n}\n","import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n if (abs(point[0]) <= pi)\n return point[0];\n else\n return sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(6),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n var cr = cos(radius),\n delta = 6 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n point1[2] = 1;\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function(b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n return fit(projection, function(b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n return fit(projection, function(b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n","import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","import {degrees, pi, radians} from \"../math.js\";\nimport {projectionMutator} from \"./index.js\";\n\nexport function conicProjection(projectAt) {\n var phi0 = 0,\n phi1 = pi / 3,\n m = projectionMutator(projectAt),\n p = m(phi0, phi1);\n\n p.parallels = function(_) {\n return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees];\n };\n\n return p;\n}\n","import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {cylindricalEqualAreaRaw} from \"./cylindricalEqualArea.js\";\n\nexport function conicEqualAreaRaw(y0, y1) {\n var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2;\n\n // Are the parallels symmetrical around the Equator?\n if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0);\n\n var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n;\n\n function project(x, y) {\n var r = sqrt(c - 2 * n * sin(y)) / n;\n return [r * sin(x *= n), r0 - r * cos(x)];\n }\n\n project.invert = function(x, y) {\n var r0y = r0 - y,\n l = atan2(x, abs(r0y)) * sign(r0y);\n if (r0y * n < 0)\n l -= pi * sign(x) * sign(r0y);\n return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEqualAreaRaw)\n .scale(155.424)\n .center([0, 33.6442]);\n}\n","import {asin, cos, sin} from \"../math.js\";\n\nexport function cylindricalEqualAreaRaw(phi0) {\n var cosPhi0 = cos(phi0);\n\n function forward(lambda, phi) {\n return [lambda * cosPhi0, sin(phi) / cosPhi0];\n }\n\n forward.invert = function(x, y) {\n return [x / cosPhi0, asin(y * cosPhi0)];\n };\n\n return forward;\n}\n","import conicEqualArea from \"./conicEqualArea.js\";\n\nexport default function() {\n return conicEqualArea()\n .parallels([29.5, 45.5])\n .scale(1070)\n .translate([480, 250])\n .rotate([96, 0])\n .center([-0.6, 38.7]);\n}\n","import {asin, atan2, cos, sin, sqrt} from \"../math.js\";\n\nexport function azimuthalRaw(scale) {\n return function(x, y) {\n var cx = cos(x),\n cy = cos(y),\n k = scale(cx * cy);\n if (k === Infinity) return [2, 0];\n return [\n k * cy * sin(x),\n k * sin(y)\n ];\n }\n}\n\nexport function azimuthalInvert(angle) {\n return function(x, y) {\n var z = sqrt(x * x + y * y),\n c = angle(z),\n sc = sin(c),\n cc = cos(c);\n return [\n atan2(x * sc, z * cc),\n asin(z && y * sc / z)\n ];\n }\n}\n","import {asin, sqrt} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) {\n return sqrt(2 / (1 + cxcy));\n});\n\nazimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) {\n return 2 * asin(z / 2);\n});\n\nexport default function() {\n return projection(azimuthalEqualAreaRaw)\n .scale(124.75)\n .clipAngle(180 - 1e-3);\n}\n","import {acos, sin} from \"../math.js\";\nimport {azimuthalRaw, azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport var azimuthalEquidistantRaw = azimuthalRaw(function(c) {\n return (c = acos(c)) && c / sin(c);\n});\n\nazimuthalEquidistantRaw.invert = azimuthalInvert(function(z) {\n return z;\n});\n\nexport default function() {\n return projection(azimuthalEquidistantRaw)\n .scale(79.4188)\n .clipAngle(180 - 1e-3);\n}\n","import {atan, exp, halfPi, log, pi, tan, tau} from \"../math.js\";\nimport rotation from \"../rotation.js\";\nimport projection from \"./index.js\";\n\nexport function mercatorRaw(lambda, phi) {\n return [lambda, log(tan((halfPi + phi) / 2))];\n}\n\nmercatorRaw.invert = function(x, y) {\n return [x, 2 * atan(exp(y)) - halfPi];\n};\n\nexport default function() {\n return mercatorProjection(mercatorRaw)\n .scale(961 / tau);\n}\n\nexport function mercatorProjection(project) {\n var m = projection(project),\n center = m.center,\n scale = m.scale,\n translate = m.translate,\n clipExtent = m.clipExtent,\n x0 = null, y0, x1, y1; // clip extent\n\n m.scale = function(_) {\n return arguments.length ? (scale(_), reclip()) : scale();\n };\n\n m.translate = function(_) {\n return arguments.length ? (translate(_), reclip()) : translate();\n };\n\n m.center = function(_) {\n return arguments.length ? (center(_), reclip()) : center();\n };\n\n m.clipExtent = function(_) {\n return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n function reclip() {\n var k = pi * scale(),\n t = m(rotation(m.rotate()).invert([0, 0]));\n return clipExtent(x0 == null\n ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw\n ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]\n : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);\n }\n\n return reclip();\n}\n","import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {mercatorRaw} from \"./mercator.js\";\n\nfunction tany(y) {\n return tan((halfPi + y) / 2);\n}\n\nexport function conicConformalRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)),\n f = cy0 * pow(tany(y0), n) / n;\n\n if (!n) return mercatorRaw;\n\n function project(x, y) {\n if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; }\n else { if (y > halfPi - epsilon) y = halfPi - epsilon; }\n var r = f / pow(tany(y), n);\n return [r * sin(n * x), f - r * cos(n * x)];\n }\n\n project.invert = function(x, y) {\n var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy),\n l = atan2(x, abs(fy)) * sign(fy);\n if (fy * n < 0)\n l -= pi * sign(x) * sign(fy);\n return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicConformalRaw)\n .scale(109.5)\n .parallels([30, 30]);\n}\n","import projection from \"./index.js\";\n\nexport function equirectangularRaw(lambda, phi) {\n return [lambda, phi];\n}\n\nequirectangularRaw.invert = equirectangularRaw;\n\nexport default function() {\n return projection(equirectangularRaw)\n .scale(152.63);\n}\n","import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from \"../math.js\";\nimport {conicProjection} from \"./conic.js\";\nimport {equirectangularRaw} from \"./equirectangular.js\";\n\nexport function conicEquidistantRaw(y0, y1) {\n var cy0 = cos(y0),\n n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0),\n g = cy0 / n + y0;\n\n if (abs(n) < epsilon) return equirectangularRaw;\n\n function project(x, y) {\n var gy = g - y, nx = n * x;\n return [gy * sin(nx), g - gy * cos(nx)];\n }\n\n project.invert = function(x, y) {\n var gy = g - y,\n l = atan2(x, abs(gy)) * sign(gy);\n if (gy * n < 0)\n l -= pi * sign(x) * sign(gy);\n return [l / n, g - sign(n) * sqrt(x * x + gy * gy)];\n };\n\n return project;\n}\n\nexport default function() {\n return conicProjection(conicEquidistantRaw)\n .scale(131.154)\n .center([0, 13.9389]);\n}\n","import projection from \"./index.js\";\nimport {abs, asin, cos, epsilon2, sin, sqrt} from \"../math.js\";\n\nvar A1 = 1.340264,\n A2 = -0.081106,\n A3 = 0.000893,\n A4 = 0.003796,\n M = sqrt(3) / 2,\n iterations = 12;\n\nexport function equalEarthRaw(lambda, phi) {\n var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2;\n return [\n lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),\n l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))\n ];\n}\n\nequalEarthRaw.invert = function(x, y) {\n var l = y, l2 = l * l, l6 = l2 * l2 * l2;\n for (var i = 0, delta, fy, fpy; i < iterations; ++i) {\n fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;\n fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);\n l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;\n if (abs(delta) < epsilon2) break;\n }\n return [\n M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l),\n asin(sin(l) / M)\n ];\n};\n\nexport default function() {\n return projection(equalEarthRaw)\n .scale(177.158);\n}\n","import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function gnomonicRaw(x, y) {\n var cy = cos(y), k = cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\ngnomonicRaw.invert = azimuthalInvert(atan);\n\nexport default function() {\n return projection(gnomonicRaw)\n .scale(144.049)\n .clipAngle(60);\n}\n","import projection from \"./index.js\";\nimport {abs, epsilon} from \"../math.js\";\n\nexport function naturalEarth1Raw(lambda, phi) {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n return [\n lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),\n phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))\n ];\n}\n\nnaturalEarth1Raw.invert = function(x, y) {\n var phi = y, i = 25, delta;\n do {\n var phi2 = phi * phi, phi4 = phi2 * phi2;\n phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /\n (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));\n } while (abs(delta) > epsilon && --i > 0);\n return [\n x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),\n phi\n ];\n};\n\nexport default function() {\n return projection(naturalEarth1Raw)\n .scale(175.295);\n}\n","import {asin, cos, epsilon, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function orthographicRaw(x, y) {\n return [cos(y) * sin(x), sin(y)];\n}\n\northographicRaw.invert = azimuthalInvert(asin);\n\nexport default function() {\n return projection(orthographicRaw)\n .scale(249.5)\n .clipAngle(90 + epsilon);\n}\n","import {atan, cos, sin} from \"../math.js\";\nimport {azimuthalInvert} from \"./azimuthal.js\";\nimport projection from \"./index.js\";\n\nexport function stereographicRaw(x, y) {\n var cy = cos(y), k = 1 + cos(x) * cy;\n return [cy * sin(x) / k, sin(y) / k];\n}\n\nstereographicRaw.invert = azimuthalInvert(function(z) {\n return 2 * atan(z);\n});\n\nexport default function() {\n return projection(stereographicRaw)\n .scale(250)\n .clipAngle(142);\n}\n","import {atan, exp, halfPi, log, tan} from \"../math.js\";\nimport {mercatorProjection} from \"./mercator.js\";\n\nexport function transverseMercatorRaw(lambda, phi) {\n return [log(tan((halfPi + phi) / 2)), -lambda];\n}\n\ntransverseMercatorRaw.invert = function(x, y) {\n return [-y, 2 * atan(exp(x)) - halfPi];\n};\n\nexport default function() {\n var m = mercatorProjection(transverseMercatorRaw),\n center = m.center,\n rotate = m.rotate;\n\n m.center = function(_) {\n return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);\n };\n\n m.rotate = function(_) {\n return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);\n };\n\n return rotate([0, 0, 90])\n .scale(159.155);\n}\n","export default function noop() {}\n","import noop from \"../noop.js\";\n\nexport default function() {\n var lines = [],\n line;\n return {\n point: function(x, y, m) {\n line.push([x, y, m]);\n },\n lineStart: function() {\n lines.push(line = []);\n },\n lineEnd: noop,\n rejoin: function() {\n if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));\n },\n result: function() {\n var result = lines;\n lines = [];\n line = null;\n return result;\n }\n };\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","import {abs, epsilon} from \"./math.js\";\n\nexport default function(a, b) {\n return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon;\n}\n","import pointEqual from \"../pointEqual.js\";\nimport {epsilon} from \"../math.js\";\n\nfunction Intersection(point, points, other, entry) {\n this.x = point;\n this.z = points;\n this.o = other; // another intersection\n this.e = entry; // is an entry?\n this.v = false; // visited\n this.n = this.p = null; // next & previous\n}\n\n// A generalized polygon clipping algorithm: given a polygon that has been cut\n// into its visible line segments, and rejoins the segments by interpolating\n// along the clip edge.\nexport default function(segments, compareIntersection, startInside, interpolate, stream) {\n var subject = [],\n clip = [],\n i,\n n;\n\n segments.forEach(function(segment) {\n if ((n = segment.length - 1) <= 0) return;\n var n, p0 = segment[0], p1 = segment[n], x;\n\n if (pointEqual(p0, p1)) {\n if (!p0[2] && !p1[2]) {\n stream.lineStart();\n for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);\n stream.lineEnd();\n return;\n }\n // handle degenerate cases by moving the point\n p1[0] += 2 * epsilon;\n }\n\n subject.push(x = new Intersection(p0, segment, null, true));\n clip.push(x.o = new Intersection(p0, null, x, false));\n subject.push(x = new Intersection(p1, segment, null, false));\n clip.push(x.o = new Intersection(p1, null, x, true));\n });\n\n if (!subject.length) return;\n\n clip.sort(compareIntersection);\n link(subject);\n link(clip);\n\n for (i = 0, n = clip.length; i < n; ++i) {\n clip[i].e = startInside = !startInside;\n }\n\n var start = subject[0],\n points,\n point;\n\n while (1) {\n // Find first unvisited intersection.\n var current = start,\n isSubject = true;\n while (current.v) if ((current = current.n) === start) return;\n points = current.z;\n stream.lineStart();\n do {\n current.v = current.o.v = true;\n if (current.e) {\n if (isSubject) {\n for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.n.x, 1, stream);\n }\n current = current.n;\n } else {\n if (isSubject) {\n points = current.p.z;\n for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);\n } else {\n interpolate(current.x, current.p.x, -1, stream);\n }\n current = current.p;\n }\n current = current.o;\n points = current.z;\n isSubject = !isSubject;\n } while (!current.v);\n stream.lineEnd();\n }\n}\n\nfunction link(array) {\n if (!(n = array.length)) return;\n var n,\n i = 0,\n a = array[0],\n b;\n while (++i < n) {\n a.n = b = array[i];\n b.p = a;\n a = b;\n }\n a.n = b = array[0];\n b.p = a;\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import {Adder} from \"d3-array\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace} from \"./cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from \"./math.js\";\n\nfunction longitude(point) {\n if (abs(point[0]) <= pi)\n return point[0];\n else\n return sign(point[0]) * ((abs(point[0]) + pi) % tau - pi);\n}\n\nexport default function(polygon, point) {\n var lambda = longitude(point),\n phi = point[1],\n sinPhi = sin(phi),\n normal = [sin(lambda), -cos(lambda), 0],\n angle = 0,\n winding = 0;\n\n var sum = new Adder();\n\n if (sinPhi === 1) phi = halfPi + epsilon;\n else if (sinPhi === -1) phi = -halfPi - epsilon;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n if (!(m = (ring = polygon[i]).length)) continue;\n var ring,\n m,\n point0 = ring[m - 1],\n lambda0 = longitude(point0),\n phi0 = point0[1] / 2 + quarterPi,\n sinPhi0 = sin(phi0),\n cosPhi0 = cos(phi0);\n\n for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {\n var point1 = ring[j],\n lambda1 = longitude(point1),\n phi1 = point1[1] / 2 + quarterPi,\n sinPhi1 = sin(phi1),\n cosPhi1 = cos(phi1),\n delta = lambda1 - lambda0,\n sign = delta >= 0 ? 1 : -1,\n absDelta = sign * delta,\n antimeridian = absDelta > pi,\n k = sinPhi0 * sinPhi1;\n\n sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta)));\n angle += antimeridian ? delta + sign * tau : delta;\n\n // Are the longitudes either side of the point’s meridian (lambda),\n // and are the latitudes smaller than the parallel (phi)?\n if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {\n var arc = cartesianCross(cartesian(point0), cartesian(point1));\n cartesianNormalizeInPlace(arc);\n var intersection = cartesianCross(normal, arc);\n cartesianNormalizeInPlace(intersection);\n var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]);\n if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {\n winding += antimeridian ^ delta >= 0 ? 1 : -1;\n }\n }\n }\n }\n\n // First, determine whether the South pole is inside or outside:\n //\n // It is inside if:\n // * the polygon winds around it in a clockwise direction.\n // * the polygon does not (cumulatively) wind around it, but has a negative\n // (counter-clockwise) area.\n //\n // Second, count the (signed) number of times a segment crosses a lambda\n // from the point to the South pole. If it is zero, then the point is the\n // same side as the South pole.\n\n return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1);\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","import clipBuffer from \"./buffer.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {epsilon, halfPi} from \"../math.js\";\nimport polygonContains from \"../polygonContains.js\";\nimport {merge} from \"d3-array\";\n\nexport default function(pointVisible, clipLine, interpolate, start) {\n return function(sink) {\n var line = clipLine(sink),\n ringBuffer = clipBuffer(),\n ringSink = clipLine(ringBuffer),\n polygonStarted = false,\n polygon,\n segments,\n ring;\n\n var clip = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() {\n clip.point = pointRing;\n clip.lineStart = ringStart;\n clip.lineEnd = ringEnd;\n segments = [];\n polygon = [];\n },\n polygonEnd: function() {\n clip.point = point;\n clip.lineStart = lineStart;\n clip.lineEnd = lineEnd;\n segments = merge(segments);\n var startInside = polygonContains(polygon, start);\n if (segments.length) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n clipRejoin(segments, compareIntersection, startInside, interpolate, sink);\n } else if (startInside) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n }\n if (polygonStarted) sink.polygonEnd(), polygonStarted = false;\n segments = polygon = null;\n },\n sphere: function() {\n sink.polygonStart();\n sink.lineStart();\n interpolate(null, null, 1, sink);\n sink.lineEnd();\n sink.polygonEnd();\n }\n };\n\n function point(lambda, phi) {\n if (pointVisible(lambda, phi)) sink.point(lambda, phi);\n }\n\n function pointLine(lambda, phi) {\n line.point(lambda, phi);\n }\n\n function lineStart() {\n clip.point = pointLine;\n line.lineStart();\n }\n\n function lineEnd() {\n clip.point = point;\n line.lineEnd();\n }\n\n function pointRing(lambda, phi) {\n ring.push([lambda, phi]);\n ringSink.point(lambda, phi);\n }\n\n function ringStart() {\n ringSink.lineStart();\n ring = [];\n }\n\n function ringEnd() {\n pointRing(ring[0][0], ring[0][1]);\n ringSink.lineEnd();\n\n var clean = ringSink.clean(),\n ringSegments = ringBuffer.result(),\n i, n = ringSegments.length, m,\n segment,\n point;\n\n ring.pop();\n polygon.push(ring);\n ring = null;\n\n if (!n) return;\n\n // No intersections.\n if (clean & 1) {\n segment = ringSegments[0];\n if ((m = segment.length - 1) > 0) {\n if (!polygonStarted) sink.polygonStart(), polygonStarted = true;\n sink.lineStart();\n for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);\n sink.lineEnd();\n }\n return;\n }\n\n // Rejoin connected segments.\n // TODO reuse ringBuffer.rejoin()?\n if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));\n\n segments.push(ringSegments.filter(validSegment));\n }\n\n return clip;\n };\n}\n\nfunction validSegment(segment) {\n return segment.length > 1;\n}\n\n// Intersections are sorted along the clip edge. For both antimeridian cutting\n// and circle clipping, the same comparison is used.\nfunction compareIntersection(a, b) {\n return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1])\n - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]);\n}\n","import clip from \"./index.js\";\nimport {abs, atan, cos, epsilon, halfPi, pi, sin} from \"../math.js\";\n\nexport default clip(\n function() { return true; },\n clipAntimeridianLine,\n clipAntimeridianInterpolate,\n [-pi, -halfPi]\n);\n\n// Takes a line and cuts into visible segments. Return values: 0 - there were\n// intersections or the line was empty; 1 - no intersections; 2 - there were\n// intersections, and the first and last segments should be rejoined.\nfunction clipAntimeridianLine(stream) {\n var lambda0 = NaN,\n phi0 = NaN,\n sign0 = NaN,\n clean; // no intersections\n\n return {\n lineStart: function() {\n stream.lineStart();\n clean = 1;\n },\n point: function(lambda1, phi1) {\n var sign1 = lambda1 > 0 ? pi : -pi,\n delta = abs(lambda1 - lambda0);\n if (abs(delta - pi) < epsilon) { // line crosses a pole\n stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n stream.point(lambda1, phi0);\n clean = 0;\n } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian\n if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies\n if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon;\n phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);\n stream.point(sign0, phi0);\n stream.lineEnd();\n stream.lineStart();\n stream.point(sign1, phi0);\n clean = 0;\n }\n stream.point(lambda0 = lambda1, phi0 = phi1);\n sign0 = sign1;\n },\n lineEnd: function() {\n stream.lineEnd();\n lambda0 = phi0 = NaN;\n },\n clean: function() {\n return 2 - clean; // if intersections, rejoin first and last segments\n }\n };\n}\n\nfunction clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {\n var cosPhi0,\n cosPhi1,\n sinLambda0Lambda1 = sin(lambda0 - lambda1);\n return abs(sinLambda0Lambda1) > epsilon\n ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1)\n - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0))\n / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))\n : (phi0 + phi1) / 2;\n}\n\nfunction clipAntimeridianInterpolate(from, to, direction, stream) {\n var phi;\n if (from == null) {\n phi = direction * halfPi;\n stream.point(-pi, phi);\n stream.point(0, phi);\n stream.point(pi, phi);\n stream.point(pi, 0);\n stream.point(pi, -phi);\n stream.point(0, -phi);\n stream.point(-pi, -phi);\n stream.point(-pi, 0);\n stream.point(-pi, phi);\n } else if (abs(from[0] - to[0]) > epsilon) {\n var lambda = from[0] < to[0] ? pi : -pi;\n phi = direction * lambda / 2;\n stream.point(-lambda, phi);\n stream.point(0, phi);\n stream.point(lambda, phi);\n } else {\n stream.point(to[0], to[1]);\n }\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(a, b) {\n\n function compose(x, y) {\n return x = a(x, y), b(x[0], x[1]);\n }\n\n if (a.invert && b.invert) compose.invert = function(x, y) {\n return x = b.invert(x, y), x && a.invert(x[0], x[1]);\n };\n\n return compose;\n}\n","import compose from \"./compose.js\";\nimport {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from \"./math.js\";\n\nfunction rotationIdentity(lambda, phi) {\n return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi];\n}\n\nrotationIdentity.invert = rotationIdentity;\n\nexport function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {\n return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))\n : rotationLambda(deltaLambda))\n : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)\n : rotationIdentity);\n}\n\nfunction forwardRotationLambda(deltaLambda) {\n return function(lambda, phi) {\n return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi];\n };\n}\n\nfunction rotationLambda(deltaLambda) {\n var rotation = forwardRotationLambda(deltaLambda);\n rotation.invert = forwardRotationLambda(-deltaLambda);\n return rotation;\n}\n\nfunction rotationPhiGamma(deltaPhi, deltaGamma) {\n var cosDeltaPhi = cos(deltaPhi),\n sinDeltaPhi = sin(deltaPhi),\n cosDeltaGamma = cos(deltaGamma),\n sinDeltaGamma = sin(deltaGamma);\n\n function rotation(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaPhi + x * sinDeltaPhi;\n return [\n atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),\n asin(k * cosDeltaGamma + y * sinDeltaGamma)\n ];\n }\n\n rotation.invert = function(lambda, phi) {\n var cosPhi = cos(phi),\n x = cos(lambda) * cosPhi,\n y = sin(lambda) * cosPhi,\n z = sin(phi),\n k = z * cosDeltaGamma - y * sinDeltaGamma;\n return [\n atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),\n asin(k * cosDeltaPhi - x * sinDeltaPhi)\n ];\n };\n\n return rotation;\n}\n\nexport default function(rotate) {\n rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0);\n\n function forward(coordinates) {\n coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n }\n\n forward.invert = function(coordinates) {\n coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians);\n return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates;\n };\n\n return forward;\n}\n","import {cartesian, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport constant from \"./constant.js\";\nimport {acos, cos, degrees, epsilon, radians, sin, tau} from \"./math.js\";\nimport {rotateRadians} from \"./rotation.js\";\n\n// Generates a circle centered at [0°, 0°], with a given radius and precision.\nexport function circleStream(stream, radius, delta, direction, t0, t1) {\n if (!delta) return;\n var cosRadius = cos(radius),\n sinRadius = sin(radius),\n step = direction * delta;\n if (t0 == null) {\n t0 = radius + direction * tau;\n t1 = radius - step / 2;\n } else {\n t0 = circleRadius(cosRadius, t0);\n t1 = circleRadius(cosRadius, t1);\n if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau;\n }\n for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {\n point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]);\n stream.point(point[0], point[1]);\n }\n}\n\n// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].\nfunction circleRadius(cosRadius, point) {\n point = cartesian(point), point[0] -= cosRadius;\n cartesianNormalizeInPlace(point);\n var radius = acos(-point[1]);\n return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau;\n}\n\nexport default function() {\n var center = constant([0, 0]),\n radius = constant(90),\n precision = constant(6),\n ring,\n rotate,\n stream = {point: point};\n\n function point(x, y) {\n ring.push(x = rotate(x, y));\n x[0] *= degrees, x[1] *= degrees;\n }\n\n function circle() {\n var c = center.apply(this, arguments),\n r = radius.apply(this, arguments) * radians,\n p = precision.apply(this, arguments) * radians;\n ring = [];\n rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert;\n circleStream(stream, r, p, 1);\n c = {type: \"Polygon\", coordinates: [ring]};\n ring = rotate = null;\n return c;\n }\n\n circle.center = function(_) {\n return arguments.length ? (center = typeof _ === \"function\" ? _ : constant([+_[0], +_[1]]), circle) : center;\n };\n\n circle.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), circle) : radius;\n };\n\n circle.precision = function(_) {\n return arguments.length ? (precision = typeof _ === \"function\" ? _ : constant(+_), circle) : precision;\n };\n\n return circle;\n}\n","import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from \"../cartesian.js\";\nimport {circleStream} from \"../circle.js\";\nimport {abs, cos, epsilon, pi, radians, sqrt} from \"../math.js\";\nimport pointEqual from \"../pointEqual.js\";\nimport clip from \"./index.js\";\n\nexport default function(radius) {\n var cr = cos(radius),\n delta = 6 * radians,\n smallRadius = cr > 0,\n notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case\n\n function interpolate(from, to, direction, stream) {\n circleStream(stream, radius, delta, direction, from, to);\n }\n\n function visible(lambda, phi) {\n return cos(lambda) * cos(phi) > cr;\n }\n\n // Takes a line and cuts into visible segments. Return values used for polygon\n // clipping: 0 - there were intersections or the line was empty; 1 - no\n // intersections 2 - there were intersections, and the first and last segments\n // should be rejoined.\n function clipLine(stream) {\n var point0, // previous point\n c0, // code for previous point\n v0, // visibility of previous point\n v00, // visibility of first point\n clean; // no intersections\n return {\n lineStart: function() {\n v00 = v0 = false;\n clean = 1;\n },\n point: function(lambda, phi) {\n var point1 = [lambda, phi],\n point2,\n v = visible(lambda, phi),\n c = smallRadius\n ? v ? 0 : code(lambda, phi)\n : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0;\n if (!point0 && (v00 = v0 = v)) stream.lineStart();\n if (v !== v0) {\n point2 = intersect(point0, point1);\n if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2))\n point1[2] = 1;\n }\n if (v !== v0) {\n clean = 0;\n if (v) {\n // outside going in\n stream.lineStart();\n point2 = intersect(point1, point0);\n stream.point(point2[0], point2[1]);\n } else {\n // inside going out\n point2 = intersect(point0, point1);\n stream.point(point2[0], point2[1], 2);\n stream.lineEnd();\n }\n point0 = point2;\n } else if (notHemisphere && point0 && smallRadius ^ v) {\n var t;\n // If the codes for two points are different, or are both zero,\n // and there this segment intersects with the small circle.\n if (!(c & c0) && (t = intersect(point1, point0, true))) {\n clean = 0;\n if (smallRadius) {\n stream.lineStart();\n stream.point(t[0][0], t[0][1]);\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n } else {\n stream.point(t[1][0], t[1][1]);\n stream.lineEnd();\n stream.lineStart();\n stream.point(t[0][0], t[0][1], 3);\n }\n }\n }\n if (v && (!point0 || !pointEqual(point0, point1))) {\n stream.point(point1[0], point1[1]);\n }\n point0 = point1, v0 = v, c0 = c;\n },\n lineEnd: function() {\n if (v0) stream.lineEnd();\n point0 = null;\n },\n // Rejoin first and last segments if there were intersections and the first\n // and last points were visible.\n clean: function() {\n return clean | ((v00 && v0) << 1);\n }\n };\n }\n\n // Intersects the great circle between a and b with the clip circle.\n function intersect(a, b, two) {\n var pa = cartesian(a),\n pb = cartesian(b);\n\n // We have two planes, n1.p = d1 and n2.p = d2.\n // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).\n var n1 = [1, 0, 0], // normal\n n2 = cartesianCross(pa, pb),\n n2n2 = cartesianDot(n2, n2),\n n1n2 = n2[0], // cartesianDot(n1, n2),\n determinant = n2n2 - n1n2 * n1n2;\n\n // Two polar points.\n if (!determinant) return !two && a;\n\n var c1 = cr * n2n2 / determinant,\n c2 = -cr * n1n2 / determinant,\n n1xn2 = cartesianCross(n1, n2),\n A = cartesianScale(n1, c1),\n B = cartesianScale(n2, c2);\n cartesianAddInPlace(A, B);\n\n // Solve |p(t)|^2 = 1.\n var u = n1xn2,\n w = cartesianDot(A, u),\n uu = cartesianDot(u, u),\n t2 = w * w - uu * (cartesianDot(A, A) - 1);\n\n if (t2 < 0) return;\n\n var t = sqrt(t2),\n q = cartesianScale(u, (-w - t) / uu);\n cartesianAddInPlace(q, A);\n q = spherical(q);\n\n if (!two) return q;\n\n // Two intersection points.\n var lambda0 = a[0],\n lambda1 = b[0],\n phi0 = a[1],\n phi1 = b[1],\n z;\n\n if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;\n\n var delta = lambda1 - lambda0,\n polar = abs(delta - pi) < epsilon,\n meridian = polar || delta < epsilon;\n\n if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;\n\n // Check that the first point is between a and b.\n if (meridian\n ? polar\n ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1)\n : phi0 <= q[1] && q[1] <= phi1\n : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) {\n var q1 = cartesianScale(u, (-w + t) / uu);\n cartesianAddInPlace(q1, A);\n return [q, spherical(q1)];\n }\n }\n\n // Generates a 4-bit vector representing the location of a point relative to\n // the small circle's bounding box.\n function code(lambda, phi) {\n var r = smallRadius ? radius : pi - radius,\n code = 0;\n if (lambda < -r) code |= 1; // left\n else if (lambda > r) code |= 2; // right\n if (phi < -r) code |= 4; // below\n else if (phi > r) code |= 8; // above\n return code;\n }\n\n return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]);\n}\n","import {abs, epsilon} from \"../math.js\";\nimport clipBuffer from \"./buffer.js\";\nimport clipLine from \"./line.js\";\nimport clipRejoin from \"./rejoin.js\";\nimport {merge} from \"d3-array\";\n\nvar clipMax = 1e9, clipMin = -clipMax;\n\n// TODO Use d3-polygon’s polygonContains here for the ring check?\n// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?\n\nexport default function clipRectangle(x0, y0, x1, y1) {\n\n function visible(x, y) {\n return x0 <= x && x <= x1 && y0 <= y && y <= y1;\n }\n\n function interpolate(from, to, direction, stream) {\n var a = 0, a1 = 0;\n if (from == null\n || (a = corner(from, direction)) !== (a1 = corner(to, direction))\n || comparePoint(from, to) < 0 ^ direction > 0) {\n do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);\n while ((a = (a + direction + 4) % 4) !== a1);\n } else {\n stream.point(to[0], to[1]);\n }\n }\n\n function corner(p, direction) {\n return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3\n : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1\n : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0\n : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon\n }\n\n function compareIntersection(a, b) {\n return comparePoint(a.x, b.x);\n }\n\n function comparePoint(a, b) {\n var ca = corner(a, 1),\n cb = corner(b, 1);\n return ca !== cb ? ca - cb\n : ca === 0 ? b[1] - a[1]\n : ca === 1 ? a[0] - b[0]\n : ca === 2 ? a[1] - b[1]\n : b[0] - a[0];\n }\n\n return function(stream) {\n var activeStream = stream,\n bufferStream = clipBuffer(),\n segments,\n polygon,\n ring,\n x__, y__, v__, // first point\n x_, y_, v_, // previous point\n first,\n clean;\n\n var clipStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: polygonStart,\n polygonEnd: polygonEnd\n };\n\n function point(x, y) {\n if (visible(x, y)) activeStream.point(x, y);\n }\n\n function polygonInside() {\n var winding = 0;\n\n for (var i = 0, n = polygon.length; i < n; ++i) {\n for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {\n a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];\n if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }\n else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }\n }\n }\n\n return winding;\n }\n\n // Buffer geometry within a polygon and then clip it en masse.\n function polygonStart() {\n activeStream = bufferStream, segments = [], polygon = [], clean = true;\n }\n\n function polygonEnd() {\n var startInside = polygonInside(),\n cleanInside = clean && startInside,\n visible = (segments = merge(segments)).length;\n if (cleanInside || visible) {\n stream.polygonStart();\n if (cleanInside) {\n stream.lineStart();\n interpolate(null, null, 1, stream);\n stream.lineEnd();\n }\n if (visible) {\n clipRejoin(segments, compareIntersection, startInside, interpolate, stream);\n }\n stream.polygonEnd();\n }\n activeStream = stream, segments = polygon = ring = null;\n }\n\n function lineStart() {\n clipStream.point = linePoint;\n if (polygon) polygon.push(ring = []);\n first = true;\n v_ = false;\n x_ = y_ = NaN;\n }\n\n // TODO rather than special-case polygons, simply handle them separately.\n // Ideally, coincident intersection points should be jittered to avoid\n // clipping issues.\n function lineEnd() {\n if (segments) {\n linePoint(x__, y__);\n if (v__ && v_) bufferStream.rejoin();\n segments.push(bufferStream.result());\n }\n clipStream.point = point;\n if (v_) activeStream.lineEnd();\n }\n\n function linePoint(x, y) {\n var v = visible(x, y);\n if (polygon) ring.push([x, y]);\n if (first) {\n x__ = x, y__ = y, v__ = v;\n first = false;\n if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n }\n } else {\n if (v && v_) activeStream.point(x, y);\n else {\n var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],\n b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];\n if (clipLine(a, b, x0, y0, x1, y1)) {\n if (!v_) {\n activeStream.lineStart();\n activeStream.point(a[0], a[1]);\n }\n activeStream.point(b[0], b[1]);\n if (!v) activeStream.lineEnd();\n clean = false;\n } else if (v) {\n activeStream.lineStart();\n activeStream.point(x, y);\n clean = false;\n }\n }\n }\n x_ = x, y_ = y, v_ = v;\n }\n\n return clipStream;\n };\n}\n","export default function(a, b, x0, y0, x1, y1) {\n var ax = a[0],\n ay = a[1],\n bx = b[0],\n by = b[1],\n t0 = 0,\n t1 = 1,\n dx = bx - ax,\n dy = by - ay,\n r;\n\n r = x0 - ax;\n if (!dx && r > 0) return;\n r /= dx;\n if (dx < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dx > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = x1 - ax;\n if (!dx && r < 0) return;\n r /= dx;\n if (dx < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dx > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n r = y0 - ay;\n if (!dy && r > 0) return;\n r /= dy;\n if (dy < 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n } else if (dy > 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n }\n\n r = y1 - ay;\n if (!dy && r < 0) return;\n r /= dy;\n if (dy < 0) {\n if (r > t1) return;\n if (r > t0) t0 = r;\n } else if (dy > 0) {\n if (r < t0) return;\n if (r < t1) t1 = r;\n }\n\n if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;\n if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;\n return true;\n}\n","export default x => x;\n","export default function(methods) {\n return {\n stream: transformer(methods)\n };\n}\n\nexport function transformer(methods) {\n return function(stream) {\n var s = new TransformStream;\n for (var key in methods) s[key] = methods[key];\n s.stream = stream;\n return s;\n };\n}\n\nfunction TransformStream() {}\n\nTransformStream.prototype = {\n constructor: TransformStream,\n point: function(x, y) { this.stream.point(x, y); },\n sphere: function() { this.stream.sphere(); },\n lineStart: function() { this.stream.lineStart(); },\n lineEnd: function() { this.stream.lineEnd(); },\n polygonStart: function() { this.stream.polygonStart(); },\n polygonEnd: function() { this.stream.polygonEnd(); }\n};\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","import noop from \"../noop.js\";\n\nvar x0 = Infinity,\n y0 = x0,\n x1 = -x0,\n y1 = x1;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: noop,\n polygonEnd: noop,\n result: function() {\n var bounds = [[x0, y0], [x1, y1]];\n x1 = y1 = -(y0 = x0 = Infinity);\n return bounds;\n }\n};\n\nfunction boundsPoint(x, y) {\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n}\n\nexport default boundsStream;\n","import {default as geoStream} from \"../stream.js\";\nimport boundsStream from \"../path/bounds.js\";\n\nfunction fit(projection, fitBounds, object) {\n var clip = projection.clipExtent && projection.clipExtent();\n projection.scale(150).translate([0, 0]);\n if (clip != null) projection.clipExtent(null);\n geoStream(object, projection.stream(boundsStream));\n fitBounds(boundsStream.result());\n if (clip != null) projection.clipExtent(clip);\n return projection;\n}\n\nexport function fitExtent(projection, extent, object) {\n return fit(projection, function(b) {\n var w = extent[1][0] - extent[0][0],\n h = extent[1][1] - extent[0][1],\n k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),\n x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,\n y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitSize(projection, size, object) {\n return fitExtent(projection, [[0, 0], size], object);\n}\n\nexport function fitWidth(projection, width, object) {\n return fit(projection, function(b) {\n var w = +width,\n k = w / (b[1][0] - b[0][0]),\n x = (w - k * (b[1][0] + b[0][0])) / 2,\n y = -k * b[0][1];\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n\nexport function fitHeight(projection, height, object) {\n return fit(projection, function(b) {\n var h = +height,\n k = h / (b[1][1] - b[0][1]),\n x = -k * b[0][0],\n y = (h - k * (b[1][1] + b[0][1])) / 2;\n projection.scale(150 * k).translate([x, y]);\n }, object);\n}\n","import {cartesian} from \"../cartesian.js\";\nimport {abs, asin, atan2, cos, epsilon, radians, sqrt} from \"../math.js\";\nimport {transformer} from \"../transform.js\";\n\nvar maxDepth = 16, // maximum depth of subdivision\n cosMinDistance = cos(30 * radians); // cos(minimum angular distance)\n\nexport default function(project, delta2) {\n return +delta2 ? resample(project, delta2) : resampleNone(project);\n}\n\nfunction resampleNone(project) {\n return transformer({\n point: function(x, y) {\n x = project(x, y);\n this.stream.point(x[0], x[1]);\n }\n });\n}\n\nfunction resample(project, delta2) {\n\n function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {\n var dx = x1 - x0,\n dy = y1 - y0,\n d2 = dx * dx + dy * dy;\n if (d2 > 4 * delta2 && depth--) {\n var a = a0 + a1,\n b = b0 + b1,\n c = c0 + c1,\n m = sqrt(a * a + b * b + c * c),\n phi2 = asin(c /= m),\n lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a),\n p = project(lambda2, phi2),\n x2 = p[0],\n y2 = p[1],\n dx2 = x2 - x0,\n dy2 = y2 - y0,\n dz = dy * dx2 - dx * dy2;\n if (dz * dz / d2 > delta2 // perpendicular projected distance\n || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end\n || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);\n stream.point(x2, y2);\n resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);\n }\n }\n }\n return function(stream) {\n var lambda00, x00, y00, a00, b00, c00, // first point\n lambda0, x0, y0, a0, b0, c0; // previous point\n\n var resampleStream = {\n point: point,\n lineStart: lineStart,\n lineEnd: lineEnd,\n polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },\n polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }\n };\n\n function point(x, y) {\n x = project(x, y);\n stream.point(x[0], x[1]);\n }\n\n function lineStart() {\n x0 = NaN;\n resampleStream.point = linePoint;\n stream.lineStart();\n }\n\n function linePoint(lambda, phi) {\n var c = cartesian([lambda, phi]), p = project(lambda, phi);\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);\n stream.point(x0, y0);\n }\n\n function lineEnd() {\n resampleStream.point = point;\n stream.lineEnd();\n }\n\n function ringStart() {\n lineStart();\n resampleStream.point = ringPoint;\n resampleStream.lineEnd = ringEnd;\n }\n\n function ringPoint(lambda, phi) {\n linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;\n resampleStream.point = linePoint;\n }\n\n function ringEnd() {\n resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);\n resampleStream.lineEnd = lineEnd;\n lineEnd();\n }\n\n return resampleStream;\n };\n}\n","import clipAntimeridian from \"../clip/antimeridian.js\";\nimport clipCircle from \"../clip/circle.js\";\nimport clipRectangle from \"../clip/rectangle.js\";\nimport compose from \"../compose.js\";\nimport identity from \"../identity.js\";\nimport {cos, degrees, radians, sin, sqrt} from \"../math.js\";\nimport {rotateRadians} from \"../rotation.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport resample from \"./resample.js\";\n\nvar transformRadians = transformer({\n point: function(x, y) {\n this.stream.point(x * radians, y * radians);\n }\n});\n\nfunction transformRotate(rotate) {\n return transformer({\n point: function(x, y) {\n var r = rotate(x, y);\n return this.stream.point(r[0], r[1]);\n }\n });\n}\n\nfunction scaleTranslate(k, dx, dy, sx, sy) {\n function transform(x, y) {\n x *= sx; y *= sy;\n return [dx + k * x, dy - k * y];\n }\n transform.invert = function(x, y) {\n return [(x - dx) / k * sx, (dy - y) / k * sy];\n };\n return transform;\n}\n\nfunction scaleTranslateRotate(k, dx, dy, sx, sy, alpha) {\n if (!alpha) return scaleTranslate(k, dx, dy, sx, sy);\n var cosAlpha = cos(alpha),\n sinAlpha = sin(alpha),\n a = cosAlpha * k,\n b = sinAlpha * k,\n ai = cosAlpha / k,\n bi = sinAlpha / k,\n ci = (sinAlpha * dy - cosAlpha * dx) / k,\n fi = (sinAlpha * dx + cosAlpha * dy) / k;\n function transform(x, y) {\n x *= sx; y *= sy;\n return [a * x - b * y + dx, dy - b * x - a * y];\n }\n transform.invert = function(x, y) {\n return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)];\n };\n return transform;\n}\n\nexport default function projection(project) {\n return projectionMutator(function() { return project; })();\n}\n\nexport function projectionMutator(projectAt) {\n var project,\n k = 150, // scale\n x = 480, y = 250, // translate\n lambda = 0, phi = 0, // center\n deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate\n alpha = 0, // post-rotate angle\n sx = 1, // reflectX\n sy = 1, // reflectX\n theta = null, preclip = clipAntimeridian, // pre-clip angle\n x0 = null, y0, x1, y1, postclip = identity, // post-clip extent\n delta2 = 0.5, // precision\n projectResample,\n projectTransform,\n projectRotateTransform,\n cache,\n cacheStream;\n\n function projection(point) {\n return projectRotateTransform(point[0] * radians, point[1] * radians);\n }\n\n function invert(point) {\n point = projectRotateTransform.invert(point[0], point[1]);\n return point && [point[0] * degrees, point[1] * degrees];\n }\n\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));\n };\n\n projection.preclip = function(_) {\n return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;\n };\n\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n\n projection.clipAngle = function(_) {\n return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees;\n };\n\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n\n projection.scale = function(_) {\n return arguments.length ? (k = +_, recenter()) : k;\n };\n\n projection.translate = function(_) {\n return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];\n };\n\n projection.center = function(_) {\n return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees];\n };\n\n projection.rotate = function(_) {\n return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees];\n };\n\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees;\n };\n\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0;\n };\n\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0;\n };\n\n projection.precision = function(_) {\n return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);\n };\n\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n function recenter() {\n var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)),\n transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha);\n rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);\n projectTransform = compose(project, transform);\n projectRotateTransform = compose(rotate, projectTransform);\n projectResample = resample(projectTransform, delta2);\n return reset();\n }\n\n function reset() {\n cache = cacheStream = null;\n return projection;\n }\n\n return function() {\n project = projectAt.apply(this, arguments);\n projection.invert = project.invert && invert;\n return recenter();\n };\n}\n","export var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var ceil = Math.ceil;\nexport var cos = Math.cos;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var log = Math.log;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var pow = Math.pow;\nexport var round = Math.round;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sin = Math.sin;\nexport var tan = Math.tan;\n\nexport var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var sqrt1_2 = Math.SQRT1_2;\nexport var sqrt2 = sqrt(2);\nexport var sqrtPi = sqrt(pi);\nexport var tau = pi * 2;\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport function sinci(x) {\n return x ? x / Math.sin(x) : 1;\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function sqrt(x) {\n return x > 0 ? Math.sqrt(x) : 0;\n}\n\nexport function tanh(x) {\n x = exp(2 * x);\n return (x - 1) / (x + 1);\n}\n\nexport function sinh(x) {\n return (exp(x) - exp(-x)) / 2;\n}\n\nexport function cosh(x) {\n return (exp(x) + exp(-x)) / 2;\n}\n\nexport function arsinh(x) {\n return log(x + sqrt(x * x + 1));\n}\n\nexport function arcosh(x) {\n return log(x + sqrt(x * x - 1));\n}\n","import {geoProjection as projection} from \"d3-geo\";\nimport {abs, asin, cos, epsilon, halfPi, pi, sin, sqrt2} from \"./math.js\";\n\nexport function mollweideBromleyTheta(cp, phi) {\n var cpsinPhi = cp * sin(phi), i = 30, delta;\n do phi -= delta = (phi + sin(phi) - cpsinPhi) / (1 + cos(phi));\n while (abs(delta) > epsilon && --i > 0);\n return phi / 2;\n}\n\nexport function mollweideBromleyRaw(cx, cy, cp) {\n\n function forward(lambda, phi) {\n return [cx * lambda * cos(phi = mollweideBromleyTheta(cp, phi)), cy * sin(phi)];\n }\n\n forward.invert = function(x, y) {\n return y = asin(y / cy), [x / (cx * cos(y)), asin((2 * y + sin(2 * y)) / cp)];\n };\n\n return forward;\n}\n\nexport var mollweideRaw = mollweideBromleyRaw(sqrt2 / halfPi, sqrt2, pi);\n\nexport default function() {\n return projection(mollweideRaw)\n .scale(169.529);\n}\n","import { geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEquidistant, geoConicConformal, geoConicEqualArea, geoConicEquidistant, geoEqualEarth, geoEquirectangular, geoGnomonic, geoIdentity, geoMercator, geoNaturalEarth1, geoOrthographic, geoStereographic, geoTransverseMercator } from 'd3-geo';\nimport { geoMollweide } from 'd3-geo-projection';\n\nconst defaultPath = geoPath();\nconst projectionProperties = [// standard properties in d3-geo\n'clipAngle', 'clipExtent', 'scale', 'translate', 'center', 'rotate', 'parallels', 'precision', 'reflectX', 'reflectY', // extended properties in d3-geo-projections\n'coefficient', 'distance', 'fraction', 'lobes', 'parallel', 'radius', 'ratio', 'spacing', 'tilt'];\n/**\n * Augment projections with their type and a copy method.\n */\n\nfunction create(type, constructor) {\n return function projection() {\n const p = constructor();\n p.type = type;\n p.path = geoPath().projection(p);\n\n p.copy = p.copy || function () {\n const c = projection();\n projectionProperties.forEach(prop => {\n if (p[prop]) c[prop](p[prop]());\n });\n c.path.pointRadius(p.path.pointRadius());\n return c;\n };\n\n return p;\n };\n}\n\nfunction projection(type, proj) {\n if (!type || typeof type !== 'string') {\n throw new Error('Projection type must be a name string.');\n }\n\n type = type.toLowerCase();\n\n if (arguments.length > 1) {\n projections[type] = create(type, proj);\n return this;\n } else {\n return projections[type] || null;\n }\n}\nfunction getProjectionPath(proj) {\n return proj && proj.path || defaultPath;\n}\nconst projections = {\n // base d3-geo projection types\n albers: geoAlbers,\n albersusa: geoAlbersUsa,\n azimuthalequalarea: geoAzimuthalEqualArea,\n azimuthalequidistant: geoAzimuthalEquidistant,\n conicconformal: geoConicConformal,\n conicequalarea: geoConicEqualArea,\n conicequidistant: geoConicEquidistant,\n equalEarth: geoEqualEarth,\n equirectangular: geoEquirectangular,\n gnomonic: geoGnomonic,\n identity: geoIdentity,\n mercator: geoMercator,\n mollweide: geoMollweide,\n naturalEarth1: geoNaturalEarth1,\n orthographic: geoOrthographic,\n stereographic: geoStereographic,\n transversemercator: geoTransverseMercator\n};\n\nfor (const key in projections) {\n projection(key, projections[key]);\n}\n\nexport { getProjectionPath, projection, projectionProperties };\n","import {epsilon} from \"../math.js\";\nimport albers from \"./albers.js\";\nimport conicEqualArea from \"./conicEqualArea.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\n\n// The projections must have mutually exclusive clip regions on the sphere,\n// as this will avoid emitting interleaving lines and polygons.\nfunction multiplex(streams) {\n var n = streams.length;\n return {\n point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },\n sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },\n lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },\n lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },\n polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },\n polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }\n };\n}\n\n// A composite projection for the United States, configured by default for\n// 960×500. The projection also works quite well at 960×600 if you change the\n// scale to 1285 and adjust the translate accordingly. The set of standard\n// parallels for each region comes from USGS, which is published here:\n// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers\nexport default function() {\n var cache,\n cacheStream,\n lower48 = albers(), lower48Point,\n alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338\n hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007\n point, pointStream = {point: function(x, y) { point = [x, y]; }};\n\n function albersUsa(coordinates) {\n var x = coordinates[0], y = coordinates[1];\n return point = null,\n (lower48Point.point(x, y), point)\n || (alaskaPoint.point(x, y), point)\n || (hawaiiPoint.point(x, y), point);\n }\n\n albersUsa.invert = function(coordinates) {\n var k = lower48.scale(),\n t = lower48.translate(),\n x = (coordinates[0] - t[0]) / k,\n y = (coordinates[1] - t[1]) / k;\n return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska\n : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii\n : lower48).invert(coordinates);\n };\n\n albersUsa.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);\n };\n\n albersUsa.precision = function(_) {\n if (!arguments.length) return lower48.precision();\n lower48.precision(_), alaska.precision(_), hawaii.precision(_);\n return reset();\n };\n\n albersUsa.scale = function(_) {\n if (!arguments.length) return lower48.scale();\n lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);\n return albersUsa.translate(lower48.translate());\n };\n\n albersUsa.translate = function(_) {\n if (!arguments.length) return lower48.translate();\n var k = lower48.scale(), x = +_[0], y = +_[1];\n\n lower48Point = lower48\n .translate(_)\n .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])\n .stream(pointStream);\n\n alaskaPoint = alaska\n .translate([x - 0.307 * k, y + 0.201 * k])\n .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n hawaiiPoint = hawaii\n .translate([x - 0.205 * k, y + 0.212 * k])\n .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]])\n .stream(pointStream);\n\n return reset();\n };\n\n albersUsa.fitExtent = function(extent, object) {\n return fitExtent(albersUsa, extent, object);\n };\n\n albersUsa.fitSize = function(size, object) {\n return fitSize(albersUsa, size, object);\n };\n\n albersUsa.fitWidth = function(width, object) {\n return fitWidth(albersUsa, width, object);\n };\n\n albersUsa.fitHeight = function(height, object) {\n return fitHeight(albersUsa, height, object);\n };\n\n function reset() {\n cache = cacheStream = null;\n return albersUsa;\n }\n\n return albersUsa.scale(1070);\n}\n","import clipRectangle from \"../clip/rectangle.js\";\nimport identity from \"../identity.js\";\nimport {transformer} from \"../transform.js\";\nimport {fitExtent, fitSize, fitWidth, fitHeight} from \"./fit.js\";\nimport {cos, degrees, radians, sin} from \"../math.js\";\n\nexport default function() {\n var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect\n alpha = 0, ca, sa, // angle\n x0 = null, y0, x1, y1, // clip extent\n kx = 1, ky = 1,\n transform = transformer({\n point: function(x, y) {\n var p = projection([x, y])\n this.stream.point(p[0], p[1]);\n }\n }),\n postclip = identity,\n cache,\n cacheStream;\n\n function reset() {\n kx = k * sx;\n ky = k * sy;\n cache = cacheStream = null;\n return projection;\n }\n\n function projection (p) {\n var x = p[0] * kx, y = p[1] * ky;\n if (alpha) {\n var t = y * ca - x * sa;\n x = x * ca + y * sa;\n y = t;\n } \n return [x + tx, y + ty];\n }\n projection.invert = function(p) {\n var x = p[0] - tx, y = p[1] - ty;\n if (alpha) {\n var t = y * ca + x * sa;\n x = x * ca - y * sa;\n y = t;\n }\n return [x / kx, y / ky];\n };\n projection.stream = function(stream) {\n return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));\n };\n projection.postclip = function(_) {\n return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;\n };\n projection.clipExtent = function(_) {\n return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];\n };\n projection.scale = function(_) {\n return arguments.length ? (k = +_, reset()) : k;\n };\n projection.translate = function(_) {\n return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty];\n }\n projection.angle = function(_) {\n return arguments.length ? (alpha = _ % 360 * radians, sa = sin(alpha), ca = cos(alpha), reset()) : alpha * degrees;\n };\n projection.reflectX = function(_) {\n return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0;\n };\n projection.reflectY = function(_) {\n return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0;\n };\n projection.fitExtent = function(extent, object) {\n return fitExtent(projection, extent, object);\n };\n projection.fitSize = function(size, object) {\n return fitSize(projection, size, object);\n };\n projection.fitWidth = function(width, object) {\n return fitWidth(projection, width, object);\n };\n projection.fitHeight = function(height, object) {\n return fitHeight(projection, height, object);\n };\n\n return projection;\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","import {range} from \"d3-array\";\nimport {abs, ceil, epsilon} from \"./math.js\";\n\nfunction graticuleX(y0, y1, dy) {\n var y = range(y0, y1 - epsilon, dy).concat(y1);\n return function(x) { return y.map(function(y) { return [x, y]; }); };\n}\n\nfunction graticuleY(x0, x1, dx) {\n var x = range(x0, x1 - epsilon, dx).concat(x1);\n return function(y) { return x.map(function(x) { return [x, y]; }); };\n}\n\nexport default function graticule() {\n var x1, x0, X1, X0,\n y1, y0, Y1, Y0,\n dx = 10, dy = dx, DX = 90, DY = 360,\n x, y, X, Y,\n precision = 2.5;\n\n function graticule() {\n return {type: \"MultiLineString\", coordinates: lines()};\n }\n\n function lines() {\n return range(ceil(X0 / DX) * DX, X1, DX).map(X)\n .concat(range(ceil(Y0 / DY) * DY, Y1, DY).map(Y))\n .concat(range(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon; }).map(x))\n .concat(range(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon; }).map(y));\n }\n\n graticule.lines = function() {\n return lines().map(function(coordinates) { return {type: \"LineString\", coordinates: coordinates}; });\n };\n\n graticule.outline = function() {\n return {\n type: \"Polygon\",\n coordinates: [\n X(X0).concat(\n Y(Y1).slice(1),\n X(X1).reverse().slice(1),\n Y(Y0).reverse().slice(1))\n ]\n };\n };\n\n graticule.extent = function(_) {\n if (!arguments.length) return graticule.extentMinor();\n return graticule.extentMajor(_).extentMinor(_);\n };\n\n graticule.extentMajor = function(_) {\n if (!arguments.length) return [[X0, Y0], [X1, Y1]];\n X0 = +_[0][0], X1 = +_[1][0];\n Y0 = +_[0][1], Y1 = +_[1][1];\n if (X0 > X1) _ = X0, X0 = X1, X1 = _;\n if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.extentMinor = function(_) {\n if (!arguments.length) return [[x0, y0], [x1, y1]];\n x0 = +_[0][0], x1 = +_[1][0];\n y0 = +_[0][1], y1 = +_[1][1];\n if (x0 > x1) _ = x0, x0 = x1, x1 = _;\n if (y0 > y1) _ = y0, y0 = y1, y1 = _;\n return graticule.precision(precision);\n };\n\n graticule.step = function(_) {\n if (!arguments.length) return graticule.stepMinor();\n return graticule.stepMajor(_).stepMinor(_);\n };\n\n graticule.stepMajor = function(_) {\n if (!arguments.length) return [DX, DY];\n DX = +_[0], DY = +_[1];\n return graticule;\n };\n\n graticule.stepMinor = function(_) {\n if (!arguments.length) return [dx, dy];\n dx = +_[0], dy = +_[1];\n return graticule;\n };\n\n graticule.precision = function(_) {\n if (!arguments.length) return precision;\n precision = +_;\n x = graticuleX(y0, y1, 90);\n y = graticuleY(x0, x1, precision);\n X = graticuleX(Y0, Y1, 90);\n Y = graticuleY(X0, X1, precision);\n return graticule;\n };\n\n return graticule\n .extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]])\n .extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]);\n}\n\nexport function graticule10() {\n return graticule()();\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","import { Transform, rederive, ingest, replace } from 'vega-dataflow';\nimport { error, extent, inherits, identity, isArray, isFunction, isNumber, constant, array, one, accessorName, accessorFields, field, extend, toSet, zero } from 'vega-util';\nimport { range, tickStep, max, sum } from 'd3-array';\nimport { bandwidthNRD } from 'vega-statistics';\nimport { getProjectionPath, projectionProperties, projection } from 'vega-projection';\nimport { geoGraticule } from 'd3-geo';\nimport { rgb } from 'd3-color';\nimport { canvas } from 'vega-canvas';\n\nfunction noop() {}\n\nconst cases = [[], [[[1.0, 1.5], [0.5, 1.0]]], [[[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [0.5, 1.0]]], [[[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], [[[1.0, 0.5], [1.0, 1.5]]], [[[1.0, 0.5], [0.5, 1.0]]], [[[0.5, 1.0], [1.0, 0.5]]], [[[1.0, 1.5], [1.0, 0.5]]], [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], [[[1.5, 1.0], [1.0, 0.5]]], [[[0.5, 1.0], [1.5, 1.0]]], [[[1.0, 1.5], [1.5, 1.0]]], [[[0.5, 1.0], [1.0, 1.5]]], []]; // Implementation adapted from d3/d3-contour. Thanks!\n\nfunction contours () {\n var dx = 1,\n dy = 1,\n smooth = smoothLinear;\n\n function contours(values, tz) {\n return tz.map(value => contour(values, value));\n } // Accumulate, smooth contour rings, assign holes to exterior rings.\n // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js\n\n\n function contour(values, value) {\n var polygons = [],\n holes = [];\n isorings(values, value, ring => {\n smooth(ring, values, value);\n if (area(ring) > 0) polygons.push([ring]);else holes.push(ring);\n });\n holes.forEach(hole => {\n for (var i = 0, n = polygons.length, polygon; i < n; ++i) {\n if (contains((polygon = polygons[i])[0], hole) !== -1) {\n polygon.push(hole);\n return;\n }\n }\n });\n return {\n type: 'MultiPolygon',\n value: value,\n coordinates: polygons\n };\n } // Marching squares with isolines stitched into rings.\n // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js\n\n\n function isorings(values, value, callback) {\n var fragmentByStart = new Array(),\n fragmentByEnd = new Array(),\n x,\n y,\n t0,\n t1,\n t2,\n t3; // Special case for the first row (y = -1, t2 = t3 = 0).\n\n x = y = -1;\n t1 = values[0] >= value;\n cases[t1 << 1].forEach(stitch);\n\n while (++x < dx - 1) {\n t0 = t1, t1 = values[x + 1] >= value;\n cases[t0 | t1 << 1].forEach(stitch);\n }\n\n cases[t1 << 0].forEach(stitch); // General case for the intermediate rows.\n\n while (++y < dy - 1) {\n x = -1;\n t1 = values[y * dx + dx] >= value;\n t2 = values[y * dx] >= value;\n cases[t1 << 1 | t2 << 2].forEach(stitch);\n\n while (++x < dx - 1) {\n t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;\n t3 = t2, t2 = values[y * dx + x + 1] >= value;\n cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);\n }\n\n cases[t1 | t2 << 3].forEach(stitch);\n } // Special case for the last row (y = dy - 1, t0 = t1 = 0).\n\n\n x = -1;\n t2 = values[y * dx] >= value;\n cases[t2 << 2].forEach(stitch);\n\n while (++x < dx - 1) {\n t3 = t2, t2 = values[y * dx + x + 1] >= value;\n cases[t2 << 2 | t3 << 3].forEach(stitch);\n }\n\n cases[t2 << 3].forEach(stitch);\n\n function stitch(line) {\n var start = [line[0][0] + x, line[0][1] + y],\n end = [line[1][0] + x, line[1][1] + y],\n startIndex = index(start),\n endIndex = index(end),\n f,\n g;\n\n if (f = fragmentByEnd[startIndex]) {\n if (g = fragmentByStart[endIndex]) {\n delete fragmentByEnd[f.end];\n delete fragmentByStart[g.start];\n\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[f.start] = fragmentByEnd[g.end] = {\n start: f.start,\n end: g.end,\n ring: f.ring.concat(g.ring)\n };\n }\n } else {\n delete fragmentByEnd[f.end];\n f.ring.push(end);\n fragmentByEnd[f.end = endIndex] = f;\n }\n } else if (f = fragmentByStart[endIndex]) {\n if (g = fragmentByEnd[startIndex]) {\n delete fragmentByStart[f.start];\n delete fragmentByEnd[g.end];\n\n if (f === g) {\n f.ring.push(end);\n callback(f.ring);\n } else {\n fragmentByStart[g.start] = fragmentByEnd[f.end] = {\n start: g.start,\n end: f.end,\n ring: g.ring.concat(f.ring)\n };\n }\n } else {\n delete fragmentByStart[f.start];\n f.ring.unshift(start);\n fragmentByStart[f.start = startIndex] = f;\n }\n } else {\n fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {\n start: startIndex,\n end: endIndex,\n ring: [start, end]\n };\n }\n }\n }\n\n function index(point) {\n return point[0] * 2 + point[1] * (dx + 1) * 4;\n }\n\n function smoothLinear(ring, values, value) {\n ring.forEach(point => {\n var x = point[0],\n y = point[1],\n xt = x | 0,\n yt = y | 0,\n v0,\n v1 = values[yt * dx + xt];\n\n if (x > 0 && x < dx && xt === x) {\n v0 = values[yt * dx + xt - 1];\n point[0] = x + (value - v0) / (v1 - v0) - 0.5;\n }\n\n if (y > 0 && y < dy && yt === y) {\n v0 = values[(yt - 1) * dx + xt];\n point[1] = y + (value - v0) / (v1 - v0) - 0.5;\n }\n });\n }\n\n contours.contour = contour;\n\n contours.size = function (_) {\n if (!arguments.length) return [dx, dy];\n\n var _0 = Math.floor(_[0]),\n _1 = Math.floor(_[1]);\n\n if (!(_0 >= 0 && _1 >= 0)) error('invalid size');\n return dx = _0, dy = _1, contours;\n };\n\n contours.smooth = function (_) {\n return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear;\n };\n\n return contours;\n}\n\nfunction area(ring) {\n var i = 0,\n n = ring.length,\n area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];\n\n while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];\n\n return area;\n}\n\nfunction contains(ring, hole) {\n var i = -1,\n n = hole.length,\n c;\n\n while (++i < n) if (c = ringContains(ring, hole[i])) return c;\n\n return 0;\n}\n\nfunction ringContains(ring, point) {\n var x = point[0],\n y = point[1],\n contains = -1;\n\n for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {\n var pi = ring[i],\n xi = pi[0],\n yi = pi[1],\n pj = ring[j],\n xj = pj[0],\n yj = pj[1];\n if (segmentContains(pi, pj, point)) return 0;\n if (yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi) contains = -contains;\n }\n\n return contains;\n}\n\nfunction segmentContains(a, b, c) {\n var i;\n return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);\n}\n\nfunction collinear(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);\n}\n\nfunction within(p, q, r) {\n return p <= q && q <= r || r <= q && q <= p;\n}\n\nfunction quantize (k, nice, zero) {\n return function (values) {\n var ex = extent(values),\n start = zero ? Math.min(ex[0], 0) : ex[0],\n stop = ex[1],\n span = stop - start,\n step = nice ? tickStep(start, stop, k) : span / (k + 1);\n return range(start + step, stop, step);\n };\n}\n\n/**\n * Generate isocontours (level sets) based on input raster grid data.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} [params.field] - The field with raster grid\n * data. If unspecified, the tuple itself is interpreted as a raster grid.\n * @param {Array<number>} [params.thresholds] - Contour threshold array. If\n * specified, the levels, nice, resolve, and zero parameters are ignored.\n * @param {number} [params.levels] - The desired number of contour levels.\n * @param {boolean} [params.nice] - Boolean flag indicating if the contour\n * threshold values should be automatically aligned to \"nice\"\n * human-friendly values. Setting this flag may cause the number of\n * thresholds to deviate from the specified levels.\n * @param {string} [params.resolve] - The method for resolving thresholds\n * across multiple input grids. If 'independent' (the default), threshold\n * calculation will be performed separately for each grid. If 'shared', a\n * single set of threshold values will be used for all input grids.\n * @param {boolean} [params.zero] - Boolean flag indicating if the contour\n * threshold values should include zero.\n * @param {boolean} [params.smooth] - Boolean flag indicating if the contour\n * polygons should be smoothed using linear interpolation. The default is\n * true. The parameter is ignored when using density estimation.\n * @param {boolean} [params.scale] - Optional numerical value by which to\n * scale the output isocontour coordinates. This parameter can be useful\n * to scale the contours to match a desired output resolution.\n * @param {string} [params.as='contour'] - The output field in which to store\n * the generated isocontour data (default 'contour').\n */\n\nfunction Isocontour(params) {\n Transform.call(this, null, params);\n}\nIsocontour.Definition = {\n 'type': 'Isocontour',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'thresholds',\n 'type': 'number',\n 'array': true\n }, {\n 'name': 'levels',\n 'type': 'number'\n }, {\n 'name': 'nice',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'resolve',\n 'type': 'enum',\n 'values': ['shared', 'independent'],\n 'default': 'independent'\n }, {\n 'name': 'zero',\n 'type': 'boolean',\n 'default': true\n }, {\n 'name': 'smooth',\n 'type': 'boolean',\n 'default': true\n }, {\n 'name': 'scale',\n 'type': 'number',\n 'expr': true\n }, {\n 'name': 'translate',\n 'type': 'number',\n 'array': true,\n 'expr': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'null': true,\n 'default': 'contour'\n }]\n};\ninherits(Isocontour, Transform, {\n transform(_, pulse) {\n if (this.value && !pulse.changed() && !_.modified()) {\n return pulse.StopPropagation;\n }\n\n var out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n source = pulse.materialize(pulse.SOURCE).source,\n field = _.field || identity,\n contour = contours().smooth(_.smooth !== false),\n tz = _.thresholds || levels(source, field, _),\n as = _.as === null ? null : _.as || 'contour',\n values = [];\n source.forEach(t => {\n const grid = field(t); // generate contour paths in GeoJSON format\n\n const paths = contour.size([grid.width, grid.height])(grid.values, isArray(tz) ? tz : tz(grid.values)); // adjust contour path coordinates as needed\n\n transformPaths(paths, grid, t, _); // ingest; copy source data properties to output\n\n paths.forEach(p => {\n values.push(rederive(t, ingest(as != null ? {\n [as]: p\n } : p)));\n });\n });\n if (this.value) out.rem = this.value;\n this.value = out.source = out.add = values;\n return out;\n }\n\n});\n\nfunction levels(values, f, _) {\n const q = quantize(_.levels || 10, _.nice, _.zero !== false);\n return _.resolve !== 'shared' ? q : q(values.map(t => max(f(t).values)));\n}\n\nfunction transformPaths(paths, grid, datum, _) {\n let s = _.scale || grid.scale,\n t = _.translate || grid.translate;\n if (isFunction(s)) s = s(datum, _);\n if (isFunction(t)) t = t(datum, _);\n if ((s === 1 || s == null) && !t) return;\n const sx = (isNumber(s) ? s : s[0]) || 1,\n sy = (isNumber(s) ? s : s[1]) || 1,\n tx = t && t[0] || 0,\n ty = t && t[1] || 0;\n paths.forEach(transform(grid, sx, sy, tx, ty));\n}\n\nfunction transform(grid, sx, sy, tx, ty) {\n const x1 = grid.x1 || 0,\n y1 = grid.y1 || 0,\n flip = sx * sy < 0;\n\n function transformPolygon(coordinates) {\n coordinates.forEach(transformRing);\n }\n\n function transformRing(coordinates) {\n if (flip) coordinates.reverse(); // maintain winding order\n\n coordinates.forEach(transformPoint);\n }\n\n function transformPoint(coordinates) {\n coordinates[0] = (coordinates[0] - x1) * sx + tx;\n coordinates[1] = (coordinates[1] - y1) * sy + ty;\n }\n\n return function (geometry) {\n geometry.coordinates.forEach(transformPolygon);\n return geometry;\n };\n}\n\nfunction radius(bw, data, f) {\n const v = bw >= 0 ? bw : bandwidthNRD(data, f);\n return Math.round((Math.sqrt(4 * v * v + 1) - 1) / 2);\n}\n\nfunction number(_) {\n return isFunction(_) ? _ : constant(+_);\n} // Implementation adapted from d3/d3-contour. Thanks!\n\n\nfunction density2D () {\n var x = d => d[0],\n y = d => d[1],\n weight = one,\n bandwidth = [-1, -1],\n dx = 960,\n dy = 500,\n k = 2; // log2(cellSize)\n\n\n function density(data, counts) {\n const rx = radius(bandwidth[0], data, x) >> k,\n // blur x-radius\n ry = radius(bandwidth[1], data, y) >> k,\n // blur y-radius\n ox = rx ? rx + 2 : 0,\n // x-offset padding for blur\n oy = ry ? ry + 2 : 0,\n // y-offset padding for blur\n n = 2 * ox + (dx >> k),\n // grid width\n m = 2 * oy + (dy >> k),\n // grid height\n values0 = new Float32Array(n * m),\n values1 = new Float32Array(n * m);\n let values = values0;\n data.forEach(d => {\n const xi = ox + (+x(d) >> k),\n yi = oy + (+y(d) >> k);\n\n if (xi >= 0 && xi < n && yi >= 0 && yi < m) {\n values0[xi + yi * n] += +weight(d);\n }\n });\n\n if (rx > 0 && ry > 0) {\n blurX(n, m, values0, values1, rx);\n blurY(n, m, values1, values0, ry);\n blurX(n, m, values0, values1, rx);\n blurY(n, m, values1, values0, ry);\n blurX(n, m, values0, values1, rx);\n blurY(n, m, values1, values0, ry);\n } else if (rx > 0) {\n blurX(n, m, values0, values1, rx);\n blurX(n, m, values1, values0, rx);\n blurX(n, m, values0, values1, rx);\n values = values1;\n } else if (ry > 0) {\n blurY(n, m, values0, values1, ry);\n blurY(n, m, values1, values0, ry);\n blurY(n, m, values0, values1, ry);\n values = values1;\n } // scale density estimates\n // density in points per square pixel or probability density\n\n\n const s = counts ? Math.pow(2, -2 * k) : 1 / sum(values);\n\n for (let i = 0, sz = n * m; i < sz; ++i) values[i] *= s;\n\n return {\n values: values,\n scale: 1 << k,\n width: n,\n height: m,\n x1: ox,\n y1: oy,\n x2: ox + (dx >> k),\n y2: oy + (dy >> k)\n };\n }\n\n density.x = function (_) {\n return arguments.length ? (x = number(_), density) : x;\n };\n\n density.y = function (_) {\n return arguments.length ? (y = number(_), density) : y;\n };\n\n density.weight = function (_) {\n return arguments.length ? (weight = number(_), density) : weight;\n };\n\n density.size = function (_) {\n if (!arguments.length) return [dx, dy];\n\n var _0 = +_[0],\n _1 = +_[1];\n\n if (!(_0 >= 0 && _1 >= 0)) error('invalid size');\n return dx = _0, dy = _1, density;\n };\n\n density.cellSize = function (_) {\n if (!arguments.length) return 1 << k;\n if (!((_ = +_) >= 1)) error('invalid cell size');\n k = Math.floor(Math.log(_) / Math.LN2);\n return density;\n };\n\n density.bandwidth = function (_) {\n if (!arguments.length) return bandwidth;\n _ = array(_);\n if (_.length === 1) _ = [+_[0], +_[0]];\n if (_.length !== 2) error('invalid bandwidth');\n return bandwidth = _, density;\n };\n\n return density;\n}\n\nfunction blurX(n, m, source, target, r) {\n const w = (r << 1) + 1;\n\n for (let j = 0; j < m; ++j) {\n for (let i = 0, sr = 0; i < n + r; ++i) {\n if (i < n) {\n sr += source[i + j * n];\n }\n\n if (i >= r) {\n if (i >= w) {\n sr -= source[i - w + j * n];\n }\n\n target[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);\n }\n }\n }\n}\n\nfunction blurY(n, m, source, target, r) {\n const w = (r << 1) + 1;\n\n for (let i = 0; i < n; ++i) {\n for (let j = 0, sr = 0; j < m + r; ++j) {\n if (j < m) {\n sr += source[i + j * n];\n }\n\n if (j >= r) {\n if (j >= w) {\n sr -= source[i + (j - w) * n];\n }\n\n target[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);\n }\n }\n }\n}\n\n/**\n * Perform 2D kernel-density estimation of point data.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<number>} params.size - The [width, height] extent (in\n * units of input pixels) over which to perform density estimation.\n * @param {function(object): number} params.x - The x-coordinate accessor.\n * @param {function(object): number} params.y - The y-coordinate accessor.\n * @param {function(object): number} [params.weight] - The weight accessor.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors\n * to groupby.\n * @param {number} [params.cellSize] - Contour density calculation cell size.\n * This parameter determines the level of spatial approximation. For example,\n * the default value of 4 maps to 2x reductions in both x- and y- dimensions.\n * A value of 1 will result in an output raster grid whose dimensions exactly\n * matches the size parameter.\n * @param {Array<number>} [params.bandwidth] - The KDE kernel bandwidths,\n * in pixels. The input can be a two-element array specifying separate\n * x and y bandwidths, or a single-element array specifying both. If the\n * bandwidth is unspecified or less than zero, the bandwidth will be\n * automatically determined.\n * @param {boolean} [params.counts=false] - A boolean flag indicating if the\n * output values should be probability estimates (false, default) or\n * smoothed counts (true).\n * @param {string} [params.as='grid'] - The output field in which to store\n * the generated raster grid (default 'grid').\n */\n\nfunction KDE2D(params) {\n Transform.call(this, null, params);\n}\nKDE2D.Definition = {\n 'type': 'KDE2D',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2,\n 'required': true\n }, {\n 'name': 'x',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'y',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'weight',\n 'type': 'field'\n }, {\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'cellSize',\n 'type': 'number'\n }, {\n 'name': 'bandwidth',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'counts',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': 'grid'\n }]\n};\nconst PARAMS = ['x', 'y', 'weight', 'size', 'cellSize', 'bandwidth'];\nfunction params(obj, _) {\n PARAMS.forEach(param => _[param] != null ? obj[param](_[param]) : 0);\n return obj;\n}\ninherits(KDE2D, Transform, {\n transform(_, pulse) {\n if (this.value && !pulse.changed() && !_.modified()) return pulse.StopPropagation;\n var out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n source = pulse.materialize(pulse.SOURCE).source,\n groups = partition(source, _.groupby),\n names = (_.groupby || []).map(accessorName),\n kde = params(density2D(), _),\n as = _.as || 'grid',\n values = [];\n\n function set(t, vals) {\n for (let i = 0; i < names.length; ++i) t[names[i]] = vals[i];\n\n return t;\n } // generate density raster grids\n\n\n values = groups.map(g => ingest(set({\n [as]: kde(g, _.counts)\n }, g.dims)));\n if (this.value) out.rem = this.value;\n this.value = out.source = out.add = values;\n return out;\n }\n\n});\nfunction partition(data, groupby) {\n var groups = [],\n get = f => f(t),\n map,\n i,\n n,\n t,\n k,\n g; // partition data points into groups\n\n\n if (groupby == null) {\n groups.push(data);\n } else {\n for (map = {}, i = 0, n = data.length; i < n; ++i) {\n t = data[i];\n k = groupby.map(get);\n g = map[k];\n\n if (!g) {\n map[k] = g = [];\n g.dims = k;\n groups.push(g);\n }\n\n g.push(t);\n }\n }\n\n return groups;\n}\n\n/**\n * Generate contours based on kernel-density estimation of point data.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<number>} params.size - The dimensions [width, height] over which to compute contours.\n * If the values parameter is provided, this must be the dimensions of the input data.\n * If density estimation is performed, this is the output view dimensions in pixels.\n * @param {Array<number>} [params.values] - An array of numeric values representing an\n * width x height grid of values over which to compute contours. If unspecified, this\n * transform will instead attempt to compute contours for the kernel density estimate\n * using values drawn from data tuples in the input pulse.\n * @param {function(object): number} [params.x] - The pixel x-coordinate accessor for density estimation.\n * @param {function(object): number} [params.y] - The pixel y-coordinate accessor for density estimation.\n * @param {function(object): number} [params.weight] - The data point weight accessor for density estimation.\n * @param {number} [params.cellSize] - Contour density calculation cell size.\n * @param {number} [params.bandwidth] - Kernel density estimation bandwidth.\n * @param {Array<number>} [params.thresholds] - Contour threshold array. If\n * this parameter is set, the count and nice parameters will be ignored.\n * @param {number} [params.count] - The desired number of contours.\n * @param {boolean} [params.nice] - Boolean flag indicating if the contour\n * threshold values should be automatically aligned to \"nice\"\n * human-friendly values. Setting this flag may cause the number of\n * thresholds to deviate from the specified count.\n * @param {boolean} [params.smooth] - Boolean flag indicating if the contour\n * polygons should be smoothed using linear interpolation. The default is\n * true. The parameter is ignored when using density estimation.\n */\n\nfunction Contour(params) {\n Transform.call(this, null, params);\n}\nContour.Definition = {\n 'type': 'Contour',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2,\n 'required': true\n }, {\n 'name': 'values',\n 'type': 'number',\n 'array': true\n }, {\n 'name': 'x',\n 'type': 'field'\n }, {\n 'name': 'y',\n 'type': 'field'\n }, {\n 'name': 'weight',\n 'type': 'field'\n }, {\n 'name': 'cellSize',\n 'type': 'number'\n }, {\n 'name': 'bandwidth',\n 'type': 'number'\n }, {\n 'name': 'count',\n 'type': 'number'\n }, {\n 'name': 'nice',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'thresholds',\n 'type': 'number',\n 'array': true\n }, {\n 'name': 'smooth',\n 'type': 'boolean',\n 'default': true\n }]\n};\ninherits(Contour, Transform, {\n transform(_, pulse) {\n if (this.value && !pulse.changed() && !_.modified()) {\n return pulse.StopPropagation;\n }\n\n var out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS),\n contour = contours().smooth(_.smooth !== false),\n values = _.values,\n thresh = _.thresholds || quantize(_.count || 10, _.nice, !!values),\n size = _.size,\n grid,\n post;\n\n if (!values) {\n values = pulse.materialize(pulse.SOURCE).source;\n grid = params(density2D(), _)(values, true);\n post = transform(grid, grid.scale || 1, grid.scale || 1, 0, 0);\n size = [grid.width, grid.height];\n values = grid.values;\n }\n\n thresh = isArray(thresh) ? thresh : thresh(values);\n values = contour.size(size)(values, thresh);\n if (post) values.forEach(post);\n if (this.value) out.rem = this.value;\n this.value = out.source = out.add = (values || []).map(ingest);\n return out;\n }\n\n});\n\nconst Feature = 'Feature';\nconst FeatureCollection = 'FeatureCollection';\nconst MultiPoint = 'MultiPoint';\n\n/**\n * Consolidate an array of [longitude, latitude] points or GeoJSON features\n * into a combined GeoJSON object. This transform is particularly useful for\n * combining geo data for a Projection's fit argument. The resulting GeoJSON\n * data is available as this transform's value. Input pulses are unchanged.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<function(object): *>} [params.fields] - A two-element array\n * of field accessors for the longitude and latitude values.\n * @param {function(object): *} params.geojson - A field accessor for\n * retrieving GeoJSON feature data.\n */\n\nfunction GeoJSON(params) {\n Transform.call(this, null, params);\n}\nGeoJSON.Definition = {\n 'type': 'GeoJSON',\n 'metadata': {},\n 'params': [{\n 'name': 'fields',\n 'type': 'field',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'geojson',\n 'type': 'field'\n }]\n};\ninherits(GeoJSON, Transform, {\n transform(_, pulse) {\n var features = this._features,\n points = this._points,\n fields = _.fields,\n lon = fields && fields[0],\n lat = fields && fields[1],\n geojson = _.geojson || !fields && identity,\n flag = pulse.ADD,\n mod;\n mod = _.modified() || pulse.changed(pulse.REM) || pulse.modified(accessorFields(geojson)) || lon && pulse.modified(accessorFields(lon)) || lat && pulse.modified(accessorFields(lat));\n\n if (!this.value || mod) {\n flag = pulse.SOURCE;\n this._features = features = [];\n this._points = points = [];\n }\n\n if (geojson) {\n pulse.visit(flag, t => features.push(geojson(t)));\n }\n\n if (lon && lat) {\n pulse.visit(flag, t => {\n var x = lon(t),\n y = lat(t);\n\n if (x != null && y != null && (x = +x) === x && (y = +y) === y) {\n points.push([x, y]);\n }\n });\n features = features.concat({\n type: Feature,\n geometry: {\n type: MultiPoint,\n coordinates: points\n }\n });\n }\n\n this.value = {\n type: FeatureCollection,\n features: features\n };\n }\n\n});\n\n/**\n * Map GeoJSON data to an SVG path string.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(number, number): *} params.projection - The cartographic\n * projection to apply.\n * @param {function(object): *} [params.field] - The field with GeoJSON data,\n * or null if the tuple itself is a GeoJSON feature.\n * @param {string} [params.as='path'] - The output field in which to store\n * the generated path data (default 'path').\n */\n\nfunction GeoPath(params) {\n Transform.call(this, null, params);\n}\nGeoPath.Definition = {\n 'type': 'GeoPath',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'projection',\n 'type': 'projection'\n }, {\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'pointRadius',\n 'type': 'number',\n 'expr': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': 'path'\n }]\n};\ninherits(GeoPath, Transform, {\n transform(_, pulse) {\n var out = pulse.fork(pulse.ALL),\n path = this.value,\n field = _.field || identity,\n as = _.as || 'path',\n flag = out.SOURCE;\n\n if (!path || _.modified()) {\n // parameters updated, reset and reflow\n this.value = path = getProjectionPath(_.projection);\n out.materialize().reflow();\n } else {\n flag = field === identity || pulse.modified(field.fields) ? out.ADD_MOD : out.ADD;\n }\n\n const prev = initPath(path, _.pointRadius);\n out.visit(flag, t => t[as] = path(field(t)));\n path.pointRadius(prev);\n return out.modifies(as);\n }\n\n});\n\nfunction initPath(path, pointRadius) {\n const prev = path.pointRadius();\n path.context(null);\n\n if (pointRadius != null) {\n path.pointRadius(pointRadius);\n }\n\n return prev;\n}\n\n/**\n * Geo-code a longitude/latitude point to an x/y coordinate.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(number, number): *} params.projection - The cartographic\n * projection to apply.\n * @param {Array<function(object): *>} params.fields - A two-element array of\n * field accessors for the longitude and latitude values.\n * @param {Array<string>} [params.as] - A two-element array of field names\n * under which to store the result. Defaults to ['x','y'].\n */\n\nfunction GeoPoint(params) {\n Transform.call(this, null, params);\n}\nGeoPoint.Definition = {\n 'type': 'GeoPoint',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'projection',\n 'type': 'projection',\n 'required': true\n }, {\n 'name': 'fields',\n 'type': 'field',\n 'array': true,\n 'required': true,\n 'length': 2\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 2,\n 'default': ['x', 'y']\n }]\n};\ninherits(GeoPoint, Transform, {\n transform(_, pulse) {\n var proj = _.projection,\n lon = _.fields[0],\n lat = _.fields[1],\n as = _.as || ['x', 'y'],\n x = as[0],\n y = as[1],\n mod;\n\n function set(t) {\n const xy = proj([lon(t), lat(t)]);\n\n if (xy) {\n t[x] = xy[0];\n t[y] = xy[1];\n } else {\n t[x] = undefined;\n t[y] = undefined;\n }\n }\n\n if (_.modified()) {\n // parameters updated, reflow\n pulse = pulse.materialize().reflow(true).visit(pulse.SOURCE, set);\n } else {\n mod = pulse.modified(lon.fields) || pulse.modified(lat.fields);\n pulse.visit(mod ? pulse.ADD_MOD : pulse.ADD, set);\n }\n\n return pulse.modifies(as);\n }\n\n});\n\n/**\n * Annotate items with a geopath shape generator.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(number, number): *} params.projection - The cartographic\n * projection to apply.\n * @param {function(object): *} [params.field] - The field with GeoJSON data,\n * or null if the tuple itself is a GeoJSON feature.\n * @param {string} [params.as='shape'] - The output field in which to store\n * the generated path data (default 'shape').\n */\n\nfunction GeoShape(params) {\n Transform.call(this, null, params);\n}\nGeoShape.Definition = {\n 'type': 'GeoShape',\n 'metadata': {\n 'modifies': true,\n 'nomod': true\n },\n 'params': [{\n 'name': 'projection',\n 'type': 'projection'\n }, {\n 'name': 'field',\n 'type': 'field',\n 'default': 'datum'\n }, {\n 'name': 'pointRadius',\n 'type': 'number',\n 'expr': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': 'shape'\n }]\n};\ninherits(GeoShape, Transform, {\n transform(_, pulse) {\n var out = pulse.fork(pulse.ALL),\n shape = this.value,\n as = _.as || 'shape',\n flag = out.ADD;\n\n if (!shape || _.modified()) {\n // parameters updated, reset and reflow\n this.value = shape = shapeGenerator(getProjectionPath(_.projection), _.field || field('datum'), _.pointRadius);\n out.materialize().reflow();\n flag = out.SOURCE;\n }\n\n out.visit(flag, t => t[as] = shape);\n return out.modifies(as);\n }\n\n});\n\nfunction shapeGenerator(path, field, pointRadius) {\n const shape = pointRadius == null ? _ => path(field(_)) : _ => {\n var prev = path.pointRadius(),\n value = path.pointRadius(pointRadius)(field(_));\n path.pointRadius(prev);\n return value;\n };\n\n shape.context = _ => {\n path.context(_);\n return shape;\n };\n\n return shape;\n}\n\n/**\n * GeoJSON feature generator for creating graticules.\n * @constructor\n */\n\nfunction Graticule(params) {\n Transform.call(this, [], params);\n this.generator = geoGraticule();\n}\nGraticule.Definition = {\n 'type': 'Graticule',\n 'metadata': {\n 'changes': true,\n 'generates': true\n },\n 'params': [{\n 'name': 'extent',\n 'type': 'array',\n 'array': true,\n 'length': 2,\n 'content': {\n 'type': 'number',\n 'array': true,\n 'length': 2\n }\n }, {\n 'name': 'extentMajor',\n 'type': 'array',\n 'array': true,\n 'length': 2,\n 'content': {\n 'type': 'number',\n 'array': true,\n 'length': 2\n }\n }, {\n 'name': 'extentMinor',\n 'type': 'array',\n 'array': true,\n 'length': 2,\n 'content': {\n 'type': 'number',\n 'array': true,\n 'length': 2\n }\n }, {\n 'name': 'step',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'stepMajor',\n 'type': 'number',\n 'array': true,\n 'length': 2,\n 'default': [90, 360]\n }, {\n 'name': 'stepMinor',\n 'type': 'number',\n 'array': true,\n 'length': 2,\n 'default': [10, 10]\n }, {\n 'name': 'precision',\n 'type': 'number',\n 'default': 2.5\n }]\n};\ninherits(Graticule, Transform, {\n transform(_, pulse) {\n var src = this.value,\n gen = this.generator,\n t;\n\n if (!src.length || _.modified()) {\n for (const prop in _) {\n if (isFunction(gen[prop])) {\n gen[prop](_[prop]);\n }\n }\n }\n\n t = gen();\n\n if (src.length) {\n pulse.mod.push(replace(src[0], t));\n } else {\n pulse.add.push(ingest(t));\n }\n\n src[0] = t;\n return pulse;\n }\n\n});\n\n/**\n * Render a heatmap image for input raster grid data.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} [params.field] - The field with raster grid\n * data. If unspecified, the tuple itself is interpreted as a raster grid.\n * @param {string} [params.color] - A constant color value or function for\n * individual pixel color. If a function, it will be invoked with an input\n * object that includes $x, $y, $value, and $max fields for the grid.\n * @param {number} [params.opacity] - A constant opacity value or function for\n * individual pixel opacity. If a function, it will be invoked with an input\n * object that includes $x, $y, $value, and $max fields for the grid.\n * @param {string} [params.resolve] - The method for resolving maximum values\n * across multiple input grids. If 'independent' (the default), maximum\n * calculation will be performed separately for each grid. If 'shared',\n * a single global maximum will be used for all input grids.\n * @param {string} [params.as='image'] - The output field in which to store\n * the generated bitmap canvas images (default 'image').\n */\n\nfunction Heatmap(params) {\n Transform.call(this, null, params);\n}\nHeatmap.Definition = {\n 'type': 'heatmap',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'color',\n 'type': 'string',\n 'expr': true\n }, {\n 'name': 'opacity',\n 'type': 'number',\n 'expr': true\n }, {\n 'name': 'resolve',\n 'type': 'enum',\n 'values': ['shared', 'independent'],\n 'default': 'independent'\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': 'image'\n }]\n};\ninherits(Heatmap, Transform, {\n transform(_, pulse) {\n if (!pulse.changed() && !_.modified()) {\n return pulse.StopPropagation;\n }\n\n var source = pulse.materialize(pulse.SOURCE).source,\n shared = _.resolve === 'shared',\n field = _.field || identity,\n opacity = opacity_(_.opacity, _),\n color = color_(_.color, _),\n as = _.as || 'image',\n obj = {\n $x: 0,\n $y: 0,\n $value: 0,\n $max: shared ? max(source.map(t => max(field(t).values))) : 0\n };\n source.forEach(t => {\n const v = field(t); // build proxy data object\n\n const o = extend({}, t, obj); // set maximum value if not globally shared\n\n if (!shared) o.$max = max(v.values || []); // generate canvas image\n // optimize color/opacity if not pixel-dependent\n\n t[as] = toCanvas(v, o, color.dep ? color : constant(color(o)), opacity.dep ? opacity : constant(opacity(o)));\n });\n return pulse.reflow(true).modifies(as);\n }\n\n}); // get image color function\n\nfunction color_(color, _) {\n let f;\n\n if (isFunction(color)) {\n f = obj => rgb(color(obj, _));\n\n f.dep = dependency(color);\n } else {\n // default to mid-grey\n f = constant(rgb(color || '#888'));\n }\n\n return f;\n} // get image opacity function\n\n\nfunction opacity_(opacity, _) {\n let f;\n\n if (isFunction(opacity)) {\n f = obj => opacity(obj, _);\n\n f.dep = dependency(opacity);\n } else if (opacity) {\n f = constant(opacity);\n } else {\n // default to [0, max] opacity gradient\n f = obj => obj.$value / obj.$max || 0;\n\n f.dep = true;\n }\n\n return f;\n} // check if function depends on individual pixel data\n\n\nfunction dependency(f) {\n if (!isFunction(f)) return false;\n const set = toSet(accessorFields(f));\n return set.$x || set.$y || set.$value || set.$max;\n} // render raster grid to canvas\n\n\nfunction toCanvas(grid, obj, color, opacity) {\n const n = grid.width,\n m = grid.height,\n x1 = grid.x1 || 0,\n y1 = grid.y1 || 0,\n x2 = grid.x2 || n,\n y2 = grid.y2 || m,\n val = grid.values,\n value = val ? i => val[i] : zero,\n can = canvas(x2 - x1, y2 - y1),\n ctx = can.getContext('2d'),\n img = ctx.getImageData(0, 0, x2 - x1, y2 - y1),\n pix = img.data;\n\n for (let j = y1, k = 0; j < y2; ++j) {\n obj.$y = j - y1;\n\n for (let i = x1, r = j * n; i < x2; ++i, k += 4) {\n obj.$x = i - x1;\n obj.$value = value(i + r);\n const v = color(obj);\n pix[k + 0] = v.r;\n pix[k + 1] = v.g;\n pix[k + 2] = v.b;\n pix[k + 3] = ~~(255 * opacity(obj));\n }\n }\n\n ctx.putImageData(img, 0, 0);\n return can;\n}\n\n/**\n * Maintains a cartographic projection.\n * @constructor\n * @param {object} params - The parameters for this operator.\n */\n\nfunction Projection(params) {\n Transform.call(this, null, params);\n this.modified(true); // always treat as modified\n}\ninherits(Projection, Transform, {\n transform(_, pulse) {\n let proj = this.value;\n\n if (!proj || _.modified('type')) {\n this.value = proj = create(_.type);\n projectionProperties.forEach(prop => {\n if (_[prop] != null) set(proj, prop, _[prop]);\n });\n } else {\n projectionProperties.forEach(prop => {\n if (_.modified(prop)) set(proj, prop, _[prop]);\n });\n }\n\n if (_.pointRadius != null) proj.path.pointRadius(_.pointRadius);\n if (_.fit) fit(proj, _);\n return pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);\n }\n\n});\n\nfunction fit(proj, _) {\n const data = collectGeoJSON(_.fit);\n _.extent ? proj.fitExtent(_.extent, data) : _.size ? proj.fitSize(_.size, data) : 0;\n}\n\nfunction create(type) {\n const constructor = projection((type || 'mercator').toLowerCase());\n if (!constructor) error('Unrecognized projection type: ' + type);\n return constructor();\n}\n\nfunction set(proj, key, value) {\n if (isFunction(proj[key])) proj[key](value);\n}\n\nfunction collectGeoJSON(data) {\n data = array(data);\n return data.length === 1 ? data[0] : {\n type: FeatureCollection,\n features: data.reduce((a, f) => a.concat(featurize(f)), [])\n };\n}\n\nfunction featurize(f) {\n return f.type === FeatureCollection ? f.features : array(f).filter(d => d != null).map(d => d.type === Feature ? d : {\n type: Feature,\n geometry: d\n });\n}\n\nexport { Contour as contour, GeoJSON as geojson, GeoPath as geopath, GeoPoint as geopoint, GeoShape as geoshape, Graticule as graticule, Heatmap as heatmap, Isocontour as isocontour, KDE2D as kde2d, Projection as projection };\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","export default function(x, y) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x, sy += node.y;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) {\n node = nodes[i], node.x -= sx, node.y -= sy;\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction x(d) {\n return d.x + d.vx;\n}\n\nfunction y(d) {\n return d.y + d.vy;\n}\n\nexport default function(radius) {\n var nodes,\n radii,\n random,\n strength = 1,\n iterations = 1;\n\n if (typeof radius !== \"function\") radius = constant(radius == null ? 1 : +radius);\n\n function force() {\n var i, n = nodes.length,\n tree,\n node,\n xi,\n yi,\n ri,\n ri2;\n\n for (var k = 0; k < iterations; ++k) {\n tree = quadtree(nodes, x, y).visitAfter(prepare);\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n ri = radii[node.index], ri2 = ri * ri;\n xi = node.x + node.vx;\n yi = node.y + node.vy;\n tree.visit(apply);\n }\n }\n\n function apply(quad, x0, y0, x1, y1) {\n var data = quad.data, rj = quad.r, r = ri + rj;\n if (data) {\n if (data.index > node.index) {\n var x = xi - data.x - data.vx,\n y = yi - data.y - data.vy,\n l = x * x + y * y;\n if (l < r * r) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n l = (r - (l = Math.sqrt(l))) / l * strength;\n node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));\n node.vy += (y *= l) * r;\n data.vx -= x * (r = 1 - r);\n data.vy -= y * r;\n }\n }\n return;\n }\n return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;\n }\n }\n\n function prepare(quad) {\n if (quad.data) return quad.r = radii[quad.data.index];\n for (var i = quad.r = 0; i < 4; ++i) {\n if (quad[i] && quad[i].r > quad.r) {\n quad.r = quad[i].r;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n radii = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n force.radius = function(_) {\n return arguments.length ? (radius = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : radius;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n y = target.y + target.vy - source.y - source.vy || jiggle(random);\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","import { Transform } from 'vega-dataflow';\nimport { inherits, array, isFunction, accessorFields, hasOwnProperty, error } from 'vega-util';\nimport { forceSimulation, forceCenter, forceCollide, forceManyBody, forceLink, forceX, forceY } from 'd3-force';\n\nconst ForceMap = {\n center: forceCenter,\n collide: forceCollide,\n nbody: forceManyBody,\n link: forceLink,\n x: forceX,\n y: forceY\n};\nconst Forces = 'forces',\n ForceParams = ['alpha', 'alphaMin', 'alphaTarget', 'velocityDecay', 'forces'],\n ForceConfig = ['static', 'iterations'],\n ForceOutput = ['x', 'y', 'vx', 'vy'];\n/**\n * Force simulation layout.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<object>} params.forces - The forces to apply.\n */\n\nfunction Force(params) {\n Transform.call(this, null, params);\n}\nForce.Definition = {\n 'type': 'Force',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'static',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'restart',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'iterations',\n 'type': 'number',\n 'default': 300\n }, {\n 'name': 'alpha',\n 'type': 'number',\n 'default': 1\n }, {\n 'name': 'alphaMin',\n 'type': 'number',\n 'default': 0.001\n }, {\n 'name': 'alphaTarget',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'velocityDecay',\n 'type': 'number',\n 'default': 0.4\n }, {\n 'name': 'forces',\n 'type': 'param',\n 'array': true,\n 'params': [{\n 'key': {\n 'force': 'center'\n },\n 'params': [{\n 'name': 'x',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'y',\n 'type': 'number',\n 'default': 0\n }]\n }, {\n 'key': {\n 'force': 'collide'\n },\n 'params': [{\n 'name': 'radius',\n 'type': 'number',\n 'expr': true\n }, {\n 'name': 'strength',\n 'type': 'number',\n 'default': 0.7\n }, {\n 'name': 'iterations',\n 'type': 'number',\n 'default': 1\n }]\n }, {\n 'key': {\n 'force': 'nbody'\n },\n 'params': [{\n 'name': 'strength',\n 'type': 'number',\n 'default': -30\n }, {\n 'name': 'theta',\n 'type': 'number',\n 'default': 0.9\n }, {\n 'name': 'distanceMin',\n 'type': 'number',\n 'default': 1\n }, {\n 'name': 'distanceMax',\n 'type': 'number'\n }]\n }, {\n 'key': {\n 'force': 'link'\n },\n 'params': [{\n 'name': 'links',\n 'type': 'data'\n }, {\n 'name': 'id',\n 'type': 'field'\n }, {\n 'name': 'distance',\n 'type': 'number',\n 'default': 30,\n 'expr': true\n }, {\n 'name': 'strength',\n 'type': 'number',\n 'expr': true\n }, {\n 'name': 'iterations',\n 'type': 'number',\n 'default': 1\n }]\n }, {\n 'key': {\n 'force': 'x'\n },\n 'params': [{\n 'name': 'strength',\n 'type': 'number',\n 'default': 0.1\n }, {\n 'name': 'x',\n 'type': 'field'\n }]\n }, {\n 'key': {\n 'force': 'y'\n },\n 'params': [{\n 'name': 'strength',\n 'type': 'number',\n 'default': 0.1\n }, {\n 'name': 'y',\n 'type': 'field'\n }]\n }]\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'modify': false,\n 'default': ForceOutput\n }]\n};\ninherits(Force, Transform, {\n transform(_, pulse) {\n var sim = this.value,\n change = pulse.changed(pulse.ADD_REM),\n params = _.modified(ForceParams),\n iters = _.iterations || 300; // configure simulation\n\n\n if (!sim) {\n this.value = sim = simulation(pulse.source, _);\n sim.on('tick', rerun(pulse.dataflow, this));\n\n if (!_.static) {\n change = true;\n sim.tick(); // ensure we run on init\n }\n\n pulse.modifies('index');\n } else {\n if (change) {\n pulse.modifies('index');\n sim.nodes(pulse.source);\n }\n\n if (params || pulse.changed(pulse.MOD)) {\n setup(sim, _, 0, pulse);\n }\n } // run simulation\n\n\n if (params || change || _.modified(ForceConfig) || pulse.changed() && _.restart) {\n sim.alpha(Math.max(sim.alpha(), _.alpha || 1)).alphaDecay(1 - Math.pow(sim.alphaMin(), 1 / iters));\n\n if (_.static) {\n for (sim.stop(); --iters >= 0;) sim.tick();\n } else {\n if (sim.stopped()) sim.restart();\n if (!change) return pulse.StopPropagation; // defer to sim ticks\n }\n }\n\n return this.finish(_, pulse);\n },\n\n finish(_, pulse) {\n const dataflow = pulse.dataflow; // inspect dependencies, touch link source data\n\n for (let args = this._argops, j = 0, m = args.length, arg; j < m; ++j) {\n arg = args[j];\n\n if (arg.name !== Forces || arg.op._argval.force !== 'link') {\n continue;\n }\n\n for (var ops = arg.op._argops, i = 0, n = ops.length, op; i < n; ++i) {\n if (ops[i].name === 'links' && (op = ops[i].op.source)) {\n dataflow.pulse(op, dataflow.changeset().reflow());\n break;\n }\n }\n } // reflow all nodes\n\n\n return pulse.reflow(_.modified()).modifies(ForceOutput);\n }\n\n});\n\nfunction rerun(df, op) {\n return () => df.touch(op).run();\n}\n\nfunction simulation(nodes, _) {\n const sim = forceSimulation(nodes),\n stop = sim.stop,\n restart = sim.restart;\n let stopped = false;\n\n sim.stopped = () => stopped;\n\n sim.restart = () => (stopped = false, restart());\n\n sim.stop = () => (stopped = true, stop());\n\n return setup(sim, _, true).on('end', () => stopped = true);\n}\n\nfunction setup(sim, _, init, pulse) {\n var f = array(_.forces),\n i,\n n,\n p,\n name;\n\n for (i = 0, n = ForceParams.length; i < n; ++i) {\n p = ForceParams[i];\n if (p !== Forces && _.modified(p)) sim[p](_[p]);\n }\n\n for (i = 0, n = f.length; i < n; ++i) {\n name = Forces + i;\n p = init || _.modified(Forces, i) ? getForce(f[i]) : pulse && modified(f[i], pulse) ? sim.force(name) : null;\n if (p) sim.force(name, p);\n }\n\n for (n = sim.numForces || 0; i < n; ++i) {\n sim.force(Forces + i, null); // remove\n }\n\n sim.numForces = f.length;\n return sim;\n}\n\nfunction modified(f, pulse) {\n var k, v;\n\n for (k in f) {\n if (isFunction(v = f[k]) && pulse.modified(accessorFields(v))) return 1;\n }\n\n return 0;\n}\n\nfunction getForce(_) {\n var f, p;\n\n if (!hasOwnProperty(ForceMap, _.force)) {\n error('Unrecognized force: ' + _.force);\n }\n\n f = ForceMap[_.force]();\n\n for (p in _) {\n if (isFunction(f[p])) setForceParam(f[p], _[p], _);\n }\n\n return f;\n}\n\nfunction setForceParam(f, v, _) {\n f(isFunction(v) ? d => v(d, _) : v);\n}\n\nexport { Force as force };\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(quad) {\n var strength = 0, q, c, weight = 0, x, y, i;\n\n // For internal nodes, accumulate forces from child quadrants.\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n quad.x = x / weight;\n quad.y = y / weight;\n }\n\n // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n } while (quad = quad.next);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(x) {\n var strength = constant(0.1),\n nodes,\n strengths,\n xz;\n\n if (typeof x !== \"function\") x = constant(x == null ? 0 : +x);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n xz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : x;\n };\n\n return force;\n}\n","import constant from \"./constant.js\";\n\nexport default function(y) {\n var strength = constant(0.1),\n nodes,\n strengths,\n yz;\n\n if (typeof y !== \"function\") y = constant(y == null ? 0 : +y);\n\n function force(alpha) {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;\n }\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length;\n strengths = new Array(n);\n yz = new Array(n);\n for (i = 0; i < n; ++i) {\n strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : y;\n };\n\n return force;\n}\n","function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;\n else while (--i >= 0) sum += children[i].value;\n node.value = sum;\n}\n\nexport default function() {\n return this.eachAfter(count);\n}\n","export default function() {\n var node = this, nodes = [node];\n while (node = node.parent) {\n nodes.push(node);\n }\n return nodes;\n}\n","export default function*() {\n var node = this, current, next = [node], children, i, n;\n do {\n current = next.reverse(), next = [];\n while (node = current.pop()) {\n yield node;\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n }\n } while (next.length);\n}\n","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_find from \"./find.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nimport node_iterator from \"./iterator.js\";\n\nexport default function hierarchy(data, children) {\n if (data instanceof Map) {\n data = [undefined, data];\n if (children === undefined) children = mapChildren;\n } else if (children === undefined) {\n children = objectChildren;\n }\n\n var root = new Node(data),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n\n while (node = nodes.pop()) {\n if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) {\n node.children = childs;\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = childs[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction objectChildren(d) {\n return d.children;\n}\n\nfunction mapChildren(d) {\n return Array.isArray(d) ? d[1] : null;\n}\n\nfunction copyData(node) {\n if (node.data.value !== undefined) node.value = node.data.value;\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n do node.height = height;\n while ((node = node.parent) && (node.height < ++height));\n}\n\nexport function Node(data) {\n this.data = data;\n this.depth =\n this.height = 0;\n this.parent = null;\n}\n\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n find: node_find,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy,\n [Symbol.iterator]: node_iterator\n};\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], next = [], children, i, n, index = -1;\n while (node = nodes.pop()) {\n next.push(node);\n if (children = node.children) {\n for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n }\n while (node = next.pop()) {\n callback.call(that, node, ++index, this);\n }\n return this;\n}\n","export default function(callback, that) {\n var node = this, nodes = [node], children, i, index = -1;\n while (node = nodes.pop()) {\n callback.call(that, node, ++index, this);\n if (children = node.children) {\n for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n }\n return this;\n}\n","export default function(callback, that) {\n let index = -1;\n for (const node of this) {\n if (callback.call(that, node, ++index, this)) {\n return node;\n }\n }\n}\n","export default function(value) {\n return this.eachAfter(function(node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n while (--i >= 0) sum += children[i].value;\n node.value = sum;\n });\n}\n","export default function(compare) {\n return this.eachBefore(function(node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}\n","export default function(end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n var k = nodes.length;\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n return c;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n var leaves = [];\n this.eachBefore(function(node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}\n","export default function() {\n var root = this, links = [];\n root.each(function(node) {\n if (node !== root) { // Don’t include the root’s parent, if any.\n links.push({source: node.parent, target: node});\n }\n });\n return links;\n}\n","import {shuffle} from \"../array.js\";\n\nexport default function(circles) {\n var i = 0, n = (circles = shuffle(Array.from(circles))).length, B = [], p, e;\n\n while (i < n) {\n p = circles[i];\n if (e && enclosesWeak(e, p)) ++i;\n else e = encloseBasis(B = extendBasis(B, p)), i = 0;\n }\n\n return e;\n}\n\nfunction extendBasis(B, p) {\n var i, j;\n\n if (enclosesWeakAll(p, B)) return [p];\n\n // If we get here then B must have at least one element.\n for (i = 0; i < B.length; ++i) {\n if (enclosesNot(p, B[i])\n && enclosesWeakAll(encloseBasis2(B[i], p), B)) {\n return [B[i], p];\n }\n }\n\n // If we get here then B must have at least two elements.\n for (i = 0; i < B.length - 1; ++i) {\n for (j = i + 1; j < B.length; ++j) {\n if (enclosesNot(encloseBasis2(B[i], B[j]), p)\n && enclosesNot(encloseBasis2(B[i], p), B[j])\n && enclosesNot(encloseBasis2(B[j], p), B[i])\n && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {\n return [B[i], B[j], p];\n }\n }\n }\n\n // If we get here then something is very wrong.\n throw new Error;\n}\n\nfunction enclosesNot(a, b) {\n var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;\n return dr < 0 || dr * dr < dx * dx + dy * dy;\n}\n\nfunction enclosesWeak(a, b) {\n var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction enclosesWeakAll(a, B) {\n for (var i = 0; i < B.length; ++i) {\n if (!enclosesWeak(a, B[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction encloseBasis(B) {\n switch (B.length) {\n case 1: return encloseBasis1(B[0]);\n case 2: return encloseBasis2(B[0], B[1]);\n case 3: return encloseBasis3(B[0], B[1], B[2]);\n }\n}\n\nfunction encloseBasis1(a) {\n return {\n x: a.x,\n y: a.y,\n r: a.r\n };\n}\n\nfunction encloseBasis2(a, b) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,\n l = Math.sqrt(x21 * x21 + y21 * y21);\n return {\n x: (x1 + x2 + x21 / l * r21) / 2,\n y: (y1 + y2 + y21 / l * r21) / 2,\n r: (l + r1 + r2) / 2\n };\n}\n\nfunction encloseBasis3(a, b, c) {\n var x1 = a.x, y1 = a.y, r1 = a.r,\n x2 = b.x, y2 = b.y, r2 = b.r,\n x3 = c.x, y3 = c.y, r3 = c.r,\n a2 = x1 - x2,\n a3 = x1 - x3,\n b2 = y1 - y2,\n b3 = y1 - y3,\n c2 = r2 - r1,\n c3 = r3 - r1,\n d1 = x1 * x1 + y1 * y1 - r1 * r1,\n d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,\n d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,\n ab = a3 * b2 - a2 * b3,\n xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,\n xb = (b3 * c2 - b2 * c3) / ab,\n ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,\n yb = (a2 * c3 - a3 * c2) / ab,\n A = xb * xb + yb * yb - 1,\n B = 2 * (r1 + xa * xb + ya * yb),\n C = xa * xa + ya * ya - r1 * r1,\n r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);\n return {\n x: x1 + xa + xb * r,\n y: y1 + ya + yb * r,\n r: r\n };\n}\n","export default function(x) {\n return typeof x === \"object\" && \"length\" in x\n ? x // Array, TypedArray, NodeList, array-like\n : Array.from(x); // Map, Set, iterable, string, or anything else\n}\n\nexport function shuffle(array) {\n var m = array.length,\n t,\n i;\n\n while (m) {\n i = Math.random() * m-- | 0;\n t = array[m];\n array[m] = array[i];\n array[i] = t;\n }\n\n return array;\n}\n","import array from \"../array.js\";\nimport enclose from \"./enclose.js\";\n\nfunction place(b, a, c) {\n var dx = b.x - a.x, x, a2,\n dy = b.y - a.y, y, b2,\n d2 = dx * dx + dy * dy;\n if (d2) {\n a2 = a.r + c.r, a2 *= a2;\n b2 = b.r + c.r, b2 *= b2;\n if (a2 > b2) {\n x = (d2 + b2 - a2) / (2 * d2);\n y = Math.sqrt(Math.max(0, b2 / d2 - x * x));\n c.x = b.x - x * dx - y * dy;\n c.y = b.y - x * dy + y * dx;\n } else {\n x = (d2 + a2 - b2) / (2 * d2);\n y = Math.sqrt(Math.max(0, a2 / d2 - x * x));\n c.x = a.x + x * dx - y * dy;\n c.y = a.y + x * dy + y * dx;\n }\n } else {\n c.x = a.x + c.r;\n c.y = a.y;\n }\n}\n\nfunction intersects(a, b) {\n var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;\n return dr > 0 && dr * dr > dx * dx + dy * dy;\n}\n\nfunction score(node) {\n var a = node._,\n b = node.next._,\n ab = a.r + b.r,\n dx = (a.x * b.r + b.x * a.r) / ab,\n dy = (a.y * b.r + b.y * a.r) / ab;\n return dx * dx + dy * dy;\n}\n\nfunction Node(circle) {\n this._ = circle;\n this.next = null;\n this.previous = null;\n}\n\nexport function packEnclose(circles) {\n if (!(n = (circles = array(circles)).length)) return 0;\n\n var a, b, c, n, aa, ca, i, j, k, sj, sk;\n\n // Place the first circle.\n a = circles[0], a.x = 0, a.y = 0;\n if (!(n > 1)) return a.r;\n\n // Place the second circle.\n b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;\n if (!(n > 2)) return a.r + b.r;\n\n // Place the third circle.\n place(b, a, c = circles[2]);\n\n // Initialize the front-chain using the first three circles a, b and c.\n a = new Node(a), b = new Node(b), c = new Node(c);\n a.next = c.previous = b;\n b.next = a.previous = c;\n c.next = b.previous = a;\n\n // Attempt to place each remaining circle…\n pack: for (i = 3; i < n; ++i) {\n place(a._, b._, c = circles[i]), c = new Node(c);\n\n // Find the closest intersecting circle on the front-chain, if any.\n // “Closeness” is determined by linear distance along the front-chain.\n // “Ahead” or “behind” is likewise determined by linear distance.\n j = b.next, k = a.previous, sj = b._.r, sk = a._.r;\n do {\n if (sj <= sk) {\n if (intersects(j._, c._)) {\n b = j, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sj += j._.r, j = j.next;\n } else {\n if (intersects(k._, c._)) {\n a = k, a.next = b, b.previous = a, --i;\n continue pack;\n }\n sk += k._.r, k = k.previous;\n }\n } while (j !== k.next);\n\n // Success! Insert the new circle c between a and b.\n c.previous = a, c.next = b, a.next = b.previous = b = c;\n\n // Compute the new closest circle pair to the centroid.\n aa = score(a);\n while ((c = c.next) !== b) {\n if ((ca = score(c)) < aa) {\n a = c, aa = ca;\n }\n }\n b = a.next;\n }\n\n // Compute the enclosing circle of the front chain.\n a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = enclose(a);\n\n // Translate the circles to put the enclosing circle around the origin.\n for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;\n\n return c.r;\n}\n\nexport default function(circles) {\n packEnclose(circles);\n return circles;\n}\n","export function optional(f) {\n return f == null ? null : required(f);\n}\n\nexport function required(f) {\n if (typeof f !== \"function\") throw new Error;\n return f;\n}\n","export function constantZero() {\n return 0;\n}\n\nexport default function(x) {\n return function() {\n return x;\n };\n}\n","import {packEnclose} from \"./siblings.js\";\nimport {optional} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nfunction defaultRadius(d) {\n return Math.sqrt(d.value);\n}\n\nexport default function() {\n var radius = null,\n dx = 1,\n dy = 1,\n padding = constantZero;\n\n function pack(root) {\n root.x = dx / 2, root.y = dy / 2;\n if (radius) {\n root.eachBefore(radiusLeaf(radius))\n .eachAfter(packChildren(padding, 0.5))\n .eachBefore(translateChild(1));\n } else {\n root.eachBefore(radiusLeaf(defaultRadius))\n .eachAfter(packChildren(constantZero, 1))\n .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))\n .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));\n }\n return root;\n }\n\n pack.radius = function(x) {\n return arguments.length ? (radius = optional(x), pack) : radius;\n };\n\n pack.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];\n };\n\n pack.padding = function(x) {\n return arguments.length ? (padding = typeof x === \"function\" ? x : constant(+x), pack) : padding;\n };\n\n return pack;\n}\n\nfunction radiusLeaf(radius) {\n return function(node) {\n if (!node.children) {\n node.r = Math.max(0, +radius(node) || 0);\n }\n };\n}\n\nfunction packChildren(padding, k) {\n return function(node) {\n if (children = node.children) {\n var children,\n i,\n n = children.length,\n r = padding(node) * k || 0,\n e;\n\n if (r) for (i = 0; i < n; ++i) children[i].r += r;\n e = packEnclose(children);\n if (r) for (i = 0; i < n; ++i) children[i].r -= r;\n node.r = e + r;\n }\n };\n}\n\nfunction translateChild(k) {\n return function(node) {\n var parent = node.parent;\n node.r *= k;\n if (parent) {\n node.x = parent.x + k * node.x;\n node.y = parent.y + k * node.y;\n }\n };\n}\n","export default function(node) {\n node.x0 = Math.round(node.x0);\n node.y0 = Math.round(node.y0);\n node.x1 = Math.round(node.x1);\n node.y1 = Math.round(node.y1);\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}\n","import {required} from \"./accessors.js\";\nimport {Node, computeHeight} from \"./hierarchy/index.js\";\n\nvar preroot = {depth: -1},\n ambiguous = {};\n\nfunction defaultId(d) {\n return d.id;\n}\n\nfunction defaultParentId(d) {\n return d.parentId;\n}\n\nexport default function() {\n var id = defaultId,\n parentId = defaultParentId;\n\n function stratify(data) {\n var nodes = Array.from(data),\n n = nodes.length,\n d,\n i,\n root,\n parent,\n node,\n nodeId,\n nodeKey,\n nodeByKey = new Map;\n\n for (i = 0; i < n; ++i) {\n d = nodes[i], node = nodes[i] = new Node(d);\n if ((nodeId = id(d, i, data)) != null && (nodeId += \"\")) {\n nodeKey = node.id = nodeId;\n nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node);\n }\n if ((nodeId = parentId(d, i, data)) != null && (nodeId += \"\")) {\n node.parent = nodeId;\n }\n }\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (nodeId = node.parent) {\n parent = nodeByKey.get(nodeId);\n if (!parent) throw new Error(\"missing: \" + nodeId);\n if (parent === ambiguous) throw new Error(\"ambiguous: \" + nodeId);\n if (parent.children) parent.children.push(node);\n else parent.children = [node];\n node.parent = parent;\n } else {\n if (root) throw new Error(\"multiple roots\");\n root = node;\n }\n }\n\n if (!root) throw new Error(\"no root\");\n root.parent = preroot;\n root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight);\n root.parent = null;\n if (n > 0) throw new Error(\"cycle\");\n\n return root;\n }\n\n stratify.id = function(x) {\n return arguments.length ? (id = required(x), stratify) : id;\n };\n\n stratify.parentId = function(x) {\n return arguments.length ? (parentId = required(x), stratify) : parentId;\n };\n\n return stratify;\n}\n","import {Node} from \"./hierarchy/index.js\";\n\nfunction defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\n// function radialSeparation(a, b) {\n// return (a.parent === b.parent ? 1 : 2) / a.depth;\n// }\n\n// This function is used to traverse the left contour of a subtree (or\n// subforest). It returns the successor of v on this contour. This successor is\n// either given by the leftmost child of v or by the thread of v. The function\n// returns null if and only if v is on the highest level of its subtree.\nfunction nextLeft(v) {\n var children = v.children;\n return children ? children[0] : v.t;\n}\n\n// This function works analogously to nextLeft.\nfunction nextRight(v) {\n var children = v.children;\n return children ? children[children.length - 1] : v.t;\n}\n\n// Shifts the current subtree rooted at w+. This is done by increasing\n// prelim(w+) and mod(w+) by shift.\nfunction moveSubtree(wm, wp, shift) {\n var change = shift / (wp.i - wm.i);\n wp.c -= change;\n wp.s += shift;\n wm.c += change;\n wp.z += shift;\n wp.m += shift;\n}\n\n// All other shifts, applied to the smaller subtrees between w- and w+, are\n// performed by this function. To prepare the shifts, we have to adjust\n// change(w+), shift(w+), and change(w-).\nfunction executeShifts(v) {\n var shift = 0,\n change = 0,\n children = v.children,\n i = children.length,\n w;\n while (--i >= 0) {\n w = children[i];\n w.z += shift;\n w.m += shift;\n shift += w.s + (change += w.c);\n }\n}\n\n// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,\n// returns the specified (default) ancestor.\nfunction nextAncestor(vim, v, ancestor) {\n return vim.a.parent === v.parent ? vim.a : ancestor;\n}\n\nfunction TreeNode(node, i) {\n this._ = node;\n this.parent = null;\n this.children = null;\n this.A = null; // default ancestor\n this.a = this; // ancestor\n this.z = 0; // prelim\n this.m = 0; // mod\n this.c = 0; // change\n this.s = 0; // shift\n this.t = null; // thread\n this.i = i; // number\n}\n\nTreeNode.prototype = Object.create(Node.prototype);\n\nfunction treeRoot(root) {\n var tree = new TreeNode(root, 0),\n node,\n nodes = [tree],\n child,\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n if (children = node._.children) {\n node.children = new Array(n = children.length);\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new TreeNode(children[i], i));\n child.parent = node;\n }\n }\n }\n\n (tree.parent = new TreeNode(null, 0)).children = [tree];\n return tree;\n}\n\n// Node-link tree diagram using the Reingold-Tilford \"tidy\" algorithm\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = null;\n\n function tree(root) {\n var t = treeRoot(root);\n\n // Compute the layout using Buchheim et al.’s algorithm.\n t.eachAfter(firstWalk), t.parent.m = -t.z;\n t.eachBefore(secondWalk);\n\n // If a fixed node size is specified, scale x and y.\n if (nodeSize) root.eachBefore(sizeNode);\n\n // If a fixed tree size is specified, scale x and y based on the extent.\n // Compute the left-most, right-most, and depth-most nodes for extents.\n else {\n var left = root,\n right = root,\n bottom = root;\n root.eachBefore(function(node) {\n if (node.x < left.x) left = node;\n if (node.x > right.x) right = node;\n if (node.depth > bottom.depth) bottom = node;\n });\n var s = left === right ? 1 : separation(left, right) / 2,\n tx = s - left.x,\n kx = dx / (right.x + s + tx),\n ky = dy / (bottom.depth || 1);\n root.eachBefore(function(node) {\n node.x = (node.x + tx) * kx;\n node.y = node.depth * ky;\n });\n }\n\n return root;\n }\n\n // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is\n // applied recursively to the children of v, as well as the function\n // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the\n // node v is placed to the midpoint of its outermost children.\n function firstWalk(v) {\n var children = v.children,\n siblings = v.parent.children,\n w = v.i ? siblings[v.i - 1] : null;\n if (children) {\n executeShifts(v);\n var midpoint = (children[0].z + children[children.length - 1].z) / 2;\n if (w) {\n v.z = w.z + separation(v._, w._);\n v.m = v.z - midpoint;\n } else {\n v.z = midpoint;\n }\n } else if (w) {\n v.z = w.z + separation(v._, w._);\n }\n v.parent.A = apportion(v, w, v.parent.A || siblings[0]);\n }\n\n // Computes all real x-coordinates by summing up the modifiers recursively.\n function secondWalk(v) {\n v._.x = v.z + v.parent.m;\n v.m += v.parent.m;\n }\n\n // The core of the algorithm. Here, a new subtree is combined with the\n // previous subtrees. Threads are used to traverse the inside and outside\n // contours of the left and right subtree up to the highest common level. The\n // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the\n // superscript o means outside and i means inside, the subscript - means left\n // subtree and + means right subtree. For summing up the modifiers along the\n // contour, we use respective variables si+, si-, so-, and so+. Whenever two\n // nodes of the inside contours conflict, we compute the left one of the\n // greatest uncommon ancestors using the function ANCESTOR and call MOVE\n // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.\n // Finally, we add a new thread (if necessary).\n function apportion(v, w, ancestor) {\n if (w) {\n var vip = v,\n vop = v,\n vim = w,\n vom = vip.parent.children[0],\n sip = vip.m,\n sop = vop.m,\n sim = vim.m,\n som = vom.m,\n shift;\n while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {\n vom = nextLeft(vom);\n vop = nextRight(vop);\n vop.a = v;\n shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);\n if (shift > 0) {\n moveSubtree(nextAncestor(vim, v, ancestor), v, shift);\n sip += shift;\n sop += shift;\n }\n sim += vim.m;\n sip += vip.m;\n som += vom.m;\n sop += vop.m;\n }\n if (vim && !nextRight(vop)) {\n vop.t = vim;\n vop.m += sim - sop;\n }\n if (vip && !nextLeft(vom)) {\n vom.t = vip;\n vom.m += sip - som;\n ancestor = v;\n }\n }\n return ancestor;\n }\n\n function sizeNode(node) {\n node.x *= dx;\n node.y = node.depth * dy;\n }\n\n tree.separation = function(x) {\n return arguments.length ? (separation = x, tree) : separation;\n };\n\n tree.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);\n };\n\n tree.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);\n };\n\n return tree;\n}\n","function defaultSeparation(a, b) {\n return a.parent === b.parent ? 1 : 2;\n}\n\nfunction meanX(children) {\n return children.reduce(meanXReduce, 0) / children.length;\n}\n\nfunction meanXReduce(x, c) {\n return x + c.x;\n}\n\nfunction maxY(children) {\n return 1 + children.reduce(maxYReduce, 0);\n}\n\nfunction maxYReduce(y, c) {\n return Math.max(y, c.y);\n}\n\nfunction leafLeft(node) {\n var children;\n while (children = node.children) node = children[0];\n return node;\n}\n\nfunction leafRight(node) {\n var children;\n while (children = node.children) node = children[children.length - 1];\n return node;\n}\n\nexport default function() {\n var separation = defaultSeparation,\n dx = 1,\n dy = 1,\n nodeSize = false;\n\n function cluster(root) {\n var previousNode,\n x = 0;\n\n // First walk, computing the initial x & y values.\n root.eachAfter(function(node) {\n var children = node.children;\n if (children) {\n node.x = meanX(children);\n node.y = maxY(children);\n } else {\n node.x = previousNode ? x += separation(node, previousNode) : 0;\n node.y = 0;\n previousNode = node;\n }\n });\n\n var left = leafLeft(root),\n right = leafRight(root),\n x0 = left.x - separation(left, right) / 2,\n x1 = right.x + separation(right, left) / 2;\n\n // Second walk, normalizing x & y to the desired size.\n return root.eachAfter(nodeSize ? function(node) {\n node.x = (node.x - root.x) * dx;\n node.y = (root.y - node.y) * dy;\n } : function(node) {\n node.x = (node.x - x0) / (x1 - x0) * dx;\n node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;\n });\n }\n\n cluster.separation = function(x) {\n return arguments.length ? (separation = x, cluster) : separation;\n };\n\n cluster.size = function(x) {\n return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);\n };\n\n cluster.nodeSize = function(x) {\n return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);\n };\n\n return cluster;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\n\nexport var phi = (1 + Math.sqrt(5)) / 2;\n\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx, dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0;\n\n // Find the next non-empty node.\n do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue);\n\n // Keep adding nodes while the aspect ratio maintains or improves.\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n if (newRatio > minRatio) { sumValue -= nodeValue; break; }\n minRatio = newRatio;\n }\n\n // Position and record the row orientation.\n rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\n\nexport default (function custom(ratio) {\n\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);\n","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport {phi, squarifyRatio} from \"./squarify.js\";\n\nexport default (function custom(ratio) {\n\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && (rows.ratio === ratio)) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);\n else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function(x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);\n","import { Transform, isTuple, ingest, tupleid, stableCompare } from 'vega-dataflow';\nimport { inherits, error, array, one, truthy, hasOwnProperty } from 'vega-util';\nimport { hierarchy, pack, partition, stratify, tree, cluster, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify } from 'd3-hierarchy';\n\n// Build lookup table mapping tuple keys to tree node instances\nfunction lookup (tree, key, filter) {\n const map = {};\n tree.each(node => {\n const t = node.data;\n if (filter(t)) map[key(t)] = node;\n });\n tree.lookup = map;\n return tree;\n}\n\n/**\n * Nest tuples into a tree structure, grouped by key values.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<function(object): *>} params.keys - The key fields to nest by, in order.\n * @param {boolean} [params.generate=false] - A boolean flag indicating if\n * non-leaf nodes generated by this transform should be included in the\n * output. The default (false) includes only the input data (leaf nodes)\n * in the data stream.\n */\n\nfunction Nest(params) {\n Transform.call(this, null, params);\n}\nNest.Definition = {\n 'type': 'Nest',\n 'metadata': {\n 'treesource': true,\n 'changes': true\n },\n 'params': [{\n 'name': 'keys',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'generate',\n 'type': 'boolean'\n }]\n};\n\nconst children = n => n.values;\n\ninherits(Nest, Transform, {\n transform(_, pulse) {\n if (!pulse.source) {\n error('Nest transform requires an upstream data source.');\n }\n\n var gen = _.generate,\n mod = _.modified(),\n out = pulse.clone(),\n tree = this.value;\n\n if (!tree || mod || pulse.changed()) {\n // collect nodes to remove\n if (tree) {\n tree.each(node => {\n if (node.children && isTuple(node.data)) {\n out.rem.push(node.data);\n }\n });\n } // generate new tree structure\n\n\n this.value = tree = hierarchy({\n values: array(_.keys).reduce((n, k) => {\n n.key(k);\n return n;\n }, nest()).entries(out.source)\n }, children); // collect nodes to add\n\n if (gen) {\n tree.each(node => {\n if (node.children) {\n node = ingest(node.data);\n out.add.push(node);\n out.source.push(node);\n }\n });\n } // build lookup table\n\n\n lookup(tree, tupleid, tupleid);\n }\n\n out.source.root = tree;\n return out;\n }\n\n});\n\nfunction nest() {\n const keys = [],\n nest = {\n entries: array => entries(apply(array, 0), 0),\n key: d => (keys.push(d), nest)\n };\n\n function apply(array, depth) {\n if (depth >= keys.length) {\n return array;\n }\n\n const n = array.length,\n key = keys[depth++],\n valuesByKey = {},\n result = {};\n let i = -1,\n keyValue,\n value,\n values;\n\n while (++i < n) {\n keyValue = key(value = array[i]) + '';\n\n if (values = valuesByKey[keyValue]) {\n values.push(value);\n } else {\n valuesByKey[keyValue] = [value];\n }\n }\n\n for (keyValue in valuesByKey) {\n result[keyValue] = apply(valuesByKey[keyValue], depth);\n }\n\n return result;\n }\n\n function entries(map, depth) {\n if (++depth > keys.length) return map;\n const array = [];\n\n for (const key in map) {\n array.push({\n key,\n values: entries(map[key], depth)\n });\n }\n\n return array;\n }\n\n return nest;\n}\n\n/**\n * Abstract class for tree layout.\n * @constructor\n * @param {object} params - The parameters for this operator.\n */\n\nfunction HierarchyLayout(params) {\n Transform.call(this, null, params);\n}\n\nconst defaultSeparation = (a, b) => a.parent === b.parent ? 1 : 2;\n\ninherits(HierarchyLayout, Transform, {\n transform(_, pulse) {\n if (!pulse.source || !pulse.source.root) {\n error(this.constructor.name + ' transform requires a backing tree data source.');\n }\n\n const layout = this.layout(_.method),\n fields = this.fields,\n root = pulse.source.root,\n as = _.as || fields;\n if (_.field) root.sum(_.field);else root.count();\n if (_.sort) root.sort(stableCompare(_.sort, d => d.data));\n setParams(layout, this.params, _);\n\n if (layout.separation) {\n layout.separation(_.separation !== false ? defaultSeparation : one);\n }\n\n try {\n this.value = layout(root);\n } catch (err) {\n error(err);\n }\n\n root.each(node => setFields(node, fields, as));\n return pulse.reflow(_.modified()).modifies(as).modifies('leaf');\n }\n\n});\n\nfunction setParams(layout, params, _) {\n for (let p, i = 0, n = params.length; i < n; ++i) {\n p = params[i];\n if (p in _) layout[p](_[p]);\n }\n}\n\nfunction setFields(node, fields, as) {\n const t = node.data,\n n = fields.length - 1;\n\n for (let i = 0; i < n; ++i) {\n t[as[i]] = node[fields[i]];\n }\n\n t[as[n]] = node.children ? node.children.length : 0;\n}\n\nconst Output = ['x', 'y', 'r', 'depth', 'children'];\n/**\n * Packed circle tree layout.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The value field to size nodes.\n */\n\nfunction Pack(params) {\n HierarchyLayout.call(this, params);\n}\nPack.Definition = {\n 'type': 'Pack',\n 'metadata': {\n 'tree': true,\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'sort',\n 'type': 'compare'\n }, {\n 'name': 'padding',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'radius',\n 'type': 'field',\n 'default': null\n }, {\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': Output.length,\n 'default': Output\n }]\n};\ninherits(Pack, HierarchyLayout, {\n layout: pack,\n params: ['radius', 'size', 'padding'],\n fields: Output\n});\n\nconst Output$1 = ['x0', 'y0', 'x1', 'y1', 'depth', 'children'];\n/**\n * Partition tree layout.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The value field to size nodes.\n */\n\nfunction Partition(params) {\n HierarchyLayout.call(this, params);\n}\nPartition.Definition = {\n 'type': 'Partition',\n 'metadata': {\n 'tree': true,\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'sort',\n 'type': 'compare'\n }, {\n 'name': 'padding',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'round',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': Output$1.length,\n 'default': Output$1\n }]\n};\ninherits(Partition, HierarchyLayout, {\n layout: partition,\n params: ['size', 'round', 'padding'],\n fields: Output$1\n});\n\n/**\n * Stratify a collection of tuples into a tree structure based on\n * id and parent id fields.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.key - Unique key field for each tuple.\n * @param {function(object): *} params.parentKey - Field with key for parent tuple.\n */\n\nfunction Stratify(params) {\n Transform.call(this, null, params);\n}\nStratify.Definition = {\n 'type': 'Stratify',\n 'metadata': {\n 'treesource': true\n },\n 'params': [{\n 'name': 'key',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'parentKey',\n 'type': 'field',\n 'required': true\n }]\n};\ninherits(Stratify, Transform, {\n transform(_, pulse) {\n if (!pulse.source) {\n error('Stratify transform requires an upstream data source.');\n }\n\n let tree = this.value;\n\n const mod = _.modified(),\n out = pulse.fork(pulse.ALL).materialize(pulse.SOURCE),\n run = !tree || mod || pulse.changed(pulse.ADD_REM) || pulse.modified(_.key.fields) || pulse.modified(_.parentKey.fields); // prevent upstream source pollution\n\n\n out.source = out.source.slice();\n\n if (run) {\n tree = out.source.length ? lookup(stratify().id(_.key).parentId(_.parentKey)(out.source), _.key, truthy) : lookup(stratify()([{}]), _.key, _.key);\n }\n\n out.source.root = this.value = tree;\n return out;\n }\n\n});\n\nconst Layouts = {\n tidy: tree,\n cluster: cluster\n};\nconst Output$2 = ['x', 'y', 'depth', 'children'];\n/**\n * Tree layout. Depending on the method parameter, performs either\n * Reingold-Tilford 'tidy' layout or dendrogram 'cluster' layout.\n * @constructor\n * @param {object} params - The parameters for this operator.\n */\n\nfunction Tree(params) {\n HierarchyLayout.call(this, params);\n}\nTree.Definition = {\n 'type': 'Tree',\n 'metadata': {\n 'tree': true,\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'sort',\n 'type': 'compare'\n }, {\n 'name': 'method',\n 'type': 'enum',\n 'default': 'tidy',\n 'values': ['tidy', 'cluster']\n }, {\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'nodeSize',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'separation',\n 'type': 'boolean',\n 'default': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': Output$2.length,\n 'default': Output$2\n }]\n};\ninherits(Tree, HierarchyLayout, {\n /**\n * Tree layout generator. Supports both 'tidy' and 'cluster' layouts.\n */\n layout(method) {\n const m = method || 'tidy';\n if (hasOwnProperty(Layouts, m)) return Layouts[m]();else error('Unrecognized Tree layout method: ' + m);\n },\n\n params: ['size', 'nodeSize'],\n fields: Output$2\n});\n\n/**\n * Generate tuples representing links between tree nodes.\n * The resulting tuples will contain 'source' and 'target' fields,\n * which point to parent and child node tuples, respectively.\n * @constructor\n * @param {object} params - The parameters for this operator.\n */\n\nfunction TreeLinks(params) {\n Transform.call(this, [], params);\n}\nTreeLinks.Definition = {\n 'type': 'TreeLinks',\n 'metadata': {\n 'tree': true,\n 'generates': true,\n 'changes': true\n },\n 'params': []\n};\ninherits(TreeLinks, Transform, {\n transform(_, pulse) {\n const links = this.value,\n tree = pulse.source && pulse.source.root,\n out = pulse.fork(pulse.NO_SOURCE),\n lut = {};\n if (!tree) error('TreeLinks transform requires a tree data source.');\n\n if (pulse.changed(pulse.ADD_REM)) {\n // remove previous links\n out.rem = links; // build lookup table of valid tuples\n\n pulse.visit(pulse.SOURCE, t => lut[tupleid(t)] = 1); // generate links for all edges incident on valid tuples\n\n tree.each(node => {\n const t = node.data,\n p = node.parent && node.parent.data;\n\n if (p && lut[tupleid(t)] && lut[tupleid(p)]) {\n out.add.push(ingest({\n source: p,\n target: t\n }));\n }\n });\n this.value = out.add;\n } else if (pulse.changed(pulse.MOD)) {\n // build lookup table of modified tuples\n pulse.visit(pulse.MOD, t => lut[tupleid(t)] = 1); // gather links incident on modified tuples\n\n links.forEach(link => {\n if (lut[tupleid(link.source)] || lut[tupleid(link.target)]) {\n out.mod.push(link);\n }\n });\n }\n\n return out;\n }\n\n});\n\nconst Tiles = {\n binary: treemapBinary,\n dice: treemapDice,\n slice: treemapSlice,\n slicedice: treemapSliceDice,\n squarify: treemapSquarify,\n resquarify: treemapResquarify\n};\nconst Output$3 = ['x0', 'y0', 'x1', 'y1', 'depth', 'children'];\n/**\n * Treemap layout.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.field - The value field to size nodes.\n */\n\nfunction Treemap(params) {\n HierarchyLayout.call(this, params);\n}\nTreemap.Definition = {\n 'type': 'Treemap',\n 'metadata': {\n 'tree': true,\n 'modifies': true\n },\n 'params': [{\n 'name': 'field',\n 'type': 'field'\n }, {\n 'name': 'sort',\n 'type': 'compare'\n }, {\n 'name': 'method',\n 'type': 'enum',\n 'default': 'squarify',\n 'values': ['squarify', 'resquarify', 'binary', 'dice', 'slice', 'slicedice']\n }, {\n 'name': 'padding',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'paddingInner',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'paddingOuter',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'paddingTop',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'paddingRight',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'paddingBottom',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'paddingLeft',\n 'type': 'number',\n 'default': 0\n }, {\n 'name': 'ratio',\n 'type': 'number',\n 'default': 1.618033988749895\n }, {\n 'name': 'round',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': Output$3.length,\n 'default': Output$3\n }]\n};\ninherits(Treemap, HierarchyLayout, {\n /**\n * Treemap layout generator. Adds 'method' and 'ratio' parameters\n * to configure the underlying tile method.\n */\n layout() {\n const x = treemap();\n\n x.ratio = _ => {\n const t = x.tile();\n if (t.ratio) x.tile(t.ratio(_));\n };\n\n x.method = _ => {\n if (hasOwnProperty(Tiles, _)) x.tile(Tiles[_]);else error('Unrecognized Treemap layout method: ' + _);\n };\n\n return x;\n },\n\n params: ['method', 'ratio', 'size', 'round', 'padding', 'paddingInner', 'paddingOuter', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n fields: Output$3\n});\n\nexport { Nest as nest, Pack as pack, Partition as partition, Stratify as stratify, Tree as tree, TreeLinks as treelinks, Treemap as treemap };\n","import roundNode from \"./treemap/round.js\";\nimport treemapDice from \"./treemap/dice.js\";\n\nexport default function() {\n var dx = 1,\n dy = 1,\n padding = 0,\n round = false;\n\n function partition(root) {\n var n = root.height + 1;\n root.x0 =\n root.y0 = padding;\n root.x1 = dx;\n root.y1 = dy / n;\n root.eachBefore(positionNode(dy, n));\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(dy, n) {\n return function(node) {\n if (node.children) {\n treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);\n }\n var x0 = node.x0,\n y0 = node.y0,\n x1 = node.x1 - padding,\n y1 = node.y1 - padding;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n };\n }\n\n partition.round = function(x) {\n return arguments.length ? (round = !!x, partition) : round;\n };\n\n partition.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];\n };\n\n partition.padding = function(x) {\n return arguments.length ? (padding = +x, partition) : padding;\n };\n\n return partition;\n}\n","export default function(parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n i, n = nodes.length,\n sum, sums = new Array(n + 1);\n\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes[i].value;\n }\n\n partition(0, n, parent.value, x0, y0, x1, y1);\n\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes[i];\n node.x0 = x0, node.y0 = y0;\n node.x1 = x1, node.y1 = y1;\n return;\n }\n\n var valueOffset = sums[i],\n valueTarget = (value / 2) + valueOffset,\n k = i + 1,\n hi = j - 1;\n\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) k = mid + 1;\n else hi = mid;\n }\n\n if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;\n\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n\n if ((x1 - x0) > (y1 - y0)) {\n var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\n }\n}\n","import dice from \"./dice.js\";\nimport slice from \"./slice.js\";\n\nexport default function(parent, x0, y0, x1, y1) {\n (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\n}\n","import roundNode from \"./round.js\";\nimport squarify from \"./squarify.js\";\nimport {required} from \"../accessors.js\";\nimport constant, {constantZero} from \"../constant.js\";\n\nexport default function() {\n var tile = squarify,\n round = false,\n dx = 1,\n dy = 1,\n paddingStack = [0],\n paddingInner = constantZero,\n paddingTop = constantZero,\n paddingRight = constantZero,\n paddingBottom = constantZero,\n paddingLeft = constantZero;\n\n function treemap(root) {\n root.x0 =\n root.y0 = 0;\n root.x1 = dx;\n root.y1 = dy;\n root.eachBefore(positionNode);\n paddingStack = [0];\n if (round) root.eachBefore(roundNode);\n return root;\n }\n\n function positionNode(node) {\n var p = paddingStack[node.depth],\n x0 = node.x0 + p,\n y0 = node.y0 + p,\n x1 = node.x1 - p,\n y1 = node.y1 - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n node.x0 = x0;\n node.y0 = y0;\n node.x1 = x1;\n node.y1 = y1;\n if (node.children) {\n p = paddingStack[node.depth + 1] = paddingInner(node) / 2;\n x0 += paddingLeft(node) - p;\n y0 += paddingTop(node) - p;\n x1 -= paddingRight(node) - p;\n y1 -= paddingBottom(node) - p;\n if (x1 < x0) x0 = x1 = (x0 + x1) / 2;\n if (y1 < y0) y0 = y1 = (y0 + y1) / 2;\n tile(node, x0, y0, x1, y1);\n }\n }\n\n treemap.round = function(x) {\n return arguments.length ? (round = !!x, treemap) : round;\n };\n\n treemap.size = function(x) {\n return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];\n };\n\n treemap.tile = function(x) {\n return arguments.length ? (tile = required(x), treemap) : tile;\n };\n\n treemap.padding = function(x) {\n return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();\n };\n\n treemap.paddingInner = function(x) {\n return arguments.length ? (paddingInner = typeof x === \"function\" ? x : constant(+x), treemap) : paddingInner;\n };\n\n treemap.paddingOuter = function(x) {\n return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();\n };\n\n treemap.paddingTop = function(x) {\n return arguments.length ? (paddingTop = typeof x === \"function\" ? x : constant(+x), treemap) : paddingTop;\n };\n\n treemap.paddingRight = function(x) {\n return arguments.length ? (paddingRight = typeof x === \"function\" ? x : constant(+x), treemap) : paddingRight;\n };\n\n treemap.paddingBottom = function(x) {\n return arguments.length ? (paddingBottom = typeof x === \"function\" ? x : constant(+x), treemap) : paddingBottom;\n };\n\n treemap.paddingLeft = function(x) {\n return arguments.length ? (paddingLeft = typeof x === \"function\" ? x : constant(+x), treemap) : paddingLeft;\n };\n\n return treemap;\n}\n","import { canvas } from 'vega-canvas';\nimport { rederive, Transform } from 'vega-dataflow';\nimport { Marks, textMetrics } from 'vega-scenegraph';\nimport { inherits, isFunction, error, array } from 'vega-util';\n\nconst ALPHA_MASK = 0xff000000; // alpha value equivalent to opacity 0.0625\n\nconst INSIDE_OPACITY_IN_ALPHA = 0x10000000;\nconst INSIDE_OPACITY = 0.0625;\nfunction baseBitmaps($, data) {\n const bitmap = $.bitmap(); // when there is no base mark but data points are to be avoided\n\n (data || []).forEach(d => bitmap.set($(d.boundary[0]), $(d.boundary[3])));\n return [bitmap, undefined];\n}\nfunction markBitmaps($, avoidMarks, labelInside, isGroupArea) {\n // create canvas\n const width = $.width,\n height = $.height,\n border = labelInside || isGroupArea,\n context = canvas(width, height).getContext('2d'); // render all marks to be avoided into canvas\n\n avoidMarks.forEach(items => draw(context, items, border)); // get canvas buffer, create bitmaps\n\n const buffer = new Uint32Array(context.getImageData(0, 0, width, height).data.buffer),\n layer1 = $.bitmap(),\n layer2 = border && $.bitmap(); // populate bitmap layers\n\n let x, y, u, v, alpha;\n\n for (y = 0; y < height; ++y) {\n for (x = 0; x < width; ++x) {\n alpha = buffer[y * width + x] & ALPHA_MASK;\n\n if (alpha) {\n u = $(x);\n v = $(y);\n if (!isGroupArea) layer1.set(u, v); // update interior bitmap\n\n if (border && alpha ^ INSIDE_OPACITY_IN_ALPHA) layer2.set(u, v); // update border bitmap\n }\n }\n }\n\n return [layer1, layer2];\n}\n\nfunction draw(context, items, interior) {\n if (!items.length) return;\n const type = items[0].mark.marktype;\n\n if (type === 'group') {\n items.forEach(group => {\n group.items.forEach(mark => draw(context, mark.items, interior));\n });\n } else {\n Marks[type].draw(context, {\n items: interior ? items.map(prepare) : items\n });\n }\n}\n/**\n * Prepare item before drawing into canvas (setting stroke and opacity)\n * @param {object} source item to be prepared\n * @returns prepared item\n */\n\n\nfunction prepare(source) {\n const item = rederive(source, {});\n\n if (item.stroke) {\n item.strokeOpacity = 1;\n }\n\n if (item.fill) {\n item.fillOpacity = INSIDE_OPACITY;\n item.stroke = '#000';\n item.strokeOpacity = 1;\n item.strokeWidth = 2;\n }\n\n return item;\n}\n\nconst DIV = 5,\n // bit shift from x, y index to bit vector array index\nMOD = 31,\n // bit mask for index lookup within a bit vector\nSIZE = 32,\n // individual bit vector size\nRIGHT0 = new Uint32Array(SIZE + 1),\n // left-anchored bit vectors, full -> 0\nRIGHT1 = new Uint32Array(SIZE + 1); // right-anchored bit vectors, 0 -> full\n\nRIGHT1[0] = 0;\nRIGHT0[0] = ~RIGHT1[0];\n\nfor (let i = 1; i <= SIZE; ++i) {\n RIGHT1[i] = RIGHT1[i - 1] << 1 | 1;\n RIGHT0[i] = ~RIGHT1[i];\n}\n\nfunction Bitmap (w, h) {\n const array = new Uint32Array(~~((w * h + SIZE) / SIZE));\n\n function _set(index, mask) {\n array[index] |= mask;\n }\n\n function _clear(index, mask) {\n array[index] &= mask;\n }\n\n return {\n array: array,\n get: (x, y) => {\n const index = y * w + x;\n return array[index >>> DIV] & 1 << (index & MOD);\n },\n set: (x, y) => {\n const index = y * w + x;\n\n _set(index >>> DIV, 1 << (index & MOD));\n },\n clear: (x, y) => {\n const index = y * w + x;\n\n _clear(index >>> DIV, ~(1 << (index & MOD)));\n },\n getRange: (x, y, x2, y2) => {\n let r = y2,\n start,\n end,\n indexStart,\n indexEnd;\n\n for (; r >= y; --r) {\n start = r * w + x;\n end = r * w + x2;\n indexStart = start >>> DIV;\n indexEnd = end >>> DIV;\n\n if (indexStart === indexEnd) {\n if (array[indexStart] & RIGHT0[start & MOD] & RIGHT1[(end & MOD) + 1]) {\n return true;\n }\n } else {\n if (array[indexStart] & RIGHT0[start & MOD]) return true;\n if (array[indexEnd] & RIGHT1[(end & MOD) + 1]) return true;\n\n for (let i = indexStart + 1; i < indexEnd; ++i) {\n if (array[i]) return true;\n }\n }\n }\n\n return false;\n },\n setRange: (x, y, x2, y2) => {\n let start, end, indexStart, indexEnd, i;\n\n for (; y <= y2; ++y) {\n start = y * w + x;\n end = y * w + x2;\n indexStart = start >>> DIV;\n indexEnd = end >>> DIV;\n\n if (indexStart === indexEnd) {\n _set(indexStart, RIGHT0[start & MOD] & RIGHT1[(end & MOD) + 1]);\n } else {\n _set(indexStart, RIGHT0[start & MOD]);\n\n _set(indexEnd, RIGHT1[(end & MOD) + 1]);\n\n for (i = indexStart + 1; i < indexEnd; ++i) _set(i, 0xffffffff);\n }\n }\n },\n clearRange: (x, y, x2, y2) => {\n let start, end, indexStart, indexEnd, i;\n\n for (; y <= y2; ++y) {\n start = y * w + x;\n end = y * w + x2;\n indexStart = start >>> DIV;\n indexEnd = end >>> DIV;\n\n if (indexStart === indexEnd) {\n _clear(indexStart, RIGHT1[start & MOD] | RIGHT0[(end & MOD) + 1]);\n } else {\n _clear(indexStart, RIGHT1[start & MOD]);\n\n _clear(indexEnd, RIGHT0[(end & MOD) + 1]);\n\n for (i = indexStart + 1; i < indexEnd; ++i) _clear(i, 0);\n }\n }\n },\n outOfBounds: (x, y, x2, y2) => x < 0 || y < 0 || y2 >= h || x2 >= w\n };\n}\n\nfunction scaler (width, height, padding) {\n const ratio = Math.max(1, Math.sqrt(width * height / 1e6)),\n w = ~~((width + 2 * padding + ratio) / ratio),\n h = ~~((height + 2 * padding + ratio) / ratio),\n scale = _ => ~~((_ + padding) / ratio);\n\n scale.invert = _ => _ * ratio - padding;\n\n scale.bitmap = () => Bitmap(w, h);\n\n scale.ratio = ratio;\n scale.padding = padding;\n scale.width = width;\n scale.height = height;\n return scale;\n}\n\nfunction placeAreaLabelNaive ($, bitmaps, avoidBaseMark, markIndex) {\n const width = $.width,\n height = $.height; // try to place a label within an input area mark\n\n return function (d) {\n const items = d.datum.datum.items[markIndex].items,\n // area points\n n = items.length,\n // number of points\n textHeight = d.datum.fontSize,\n // label width\n textWidth = textMetrics.width(d.datum, d.datum.text); // label height\n\n let maxAreaWidth = 0,\n x1,\n x2,\n y1,\n y2,\n x,\n y,\n areaWidth; // for each area sample point\n\n for (let i = 0; i < n; ++i) {\n x1 = items[i].x;\n y1 = items[i].y;\n x2 = items[i].x2 === undefined ? x1 : items[i].x2;\n y2 = items[i].y2 === undefined ? y1 : items[i].y2;\n x = (x1 + x2) / 2;\n y = (y1 + y2) / 2;\n areaWidth = Math.abs(x2 - x1 + y2 - y1);\n\n if (areaWidth >= maxAreaWidth) {\n maxAreaWidth = areaWidth;\n d.x = x;\n d.y = y;\n }\n }\n\n x = textWidth / 2;\n y = textHeight / 2;\n x1 = d.x - x;\n x2 = d.x + x;\n y1 = d.y - y;\n y2 = d.y + y;\n d.align = 'center';\n\n if (x1 < 0 && x2 <= width) {\n d.align = 'left';\n } else if (0 <= x1 && width < x2) {\n d.align = 'right';\n }\n\n d.baseline = 'middle';\n\n if (y1 < 0 && y2 <= height) {\n d.baseline = 'top';\n } else if (0 <= y1 && height < y2) {\n d.baseline = 'bottom';\n }\n\n return true;\n };\n}\n\nfunction outOfBounds(x, y, textWidth, textHeight, width, height) {\n let r = textWidth / 2;\n return x - r < 0 || x + r > width || y - (r = textHeight / 2) < 0 || y + r > height;\n}\n\nfunction _outOfBounds() {\n return false;\n}\n\nfunction collision($, x, y, textHeight, textWidth, h, bm0, bm1) {\n const w = textWidth * h / (textHeight * 2),\n x1 = $(x - w),\n x2 = $(x + w),\n y1 = $(y - (h = h / 2)),\n y2 = $(y + h);\n return bm0.outOfBounds(x1, y1, x2, y2) || bm0.getRange(x1, y1, x2, y2) || bm1 && bm1.getRange(x1, y1, x2, y2);\n}\n\nfunction _collision($, x, y, textHeight, textWidth, h, bm0, bm1) {\n const w = textWidth * h / (textHeight * 2);\n let x1 = $(x - w),\n x2 = $(x + w),\n y1 = $(y - (h = h / 2)),\n y2 = $(y + h);\n x1 = x1 > 0 ? x1 : 0;\n y1 = y1 > 0 ? y1 : 0;\n x2 = x2 < $.width ? x2 : $.width - 1;\n y2 = y2 < $.height ? y2 : $.height - 1;\n return bm0.getRange(x1, y1, x2, y2) || bm1 && bm1.getRange(x1, y1, x2, y2);\n}\n\nfunction getTests(infPadding) {\n return infPadding ? [_collision, _outOfBounds] : [collision, outOfBounds];\n}\n\nfunction placeAreaLabelReducedSearch ($, bitmaps, avoidBaseMark, markIndex, infPadding) {\n const width = $.width,\n height = $.height,\n [collision, outOfBounds] = getTests(infPadding),\n bm0 = bitmaps[0],\n // where labels have been placed\n bm1 = bitmaps[1]; // area outlines\n\n function tryLabel(_x, _y, maxSize, textWidth, textHeight) {\n const x = $.invert(_x),\n y = $.invert(_y);\n let lo = maxSize,\n hi = height,\n mid;\n\n if (!outOfBounds(x, y, textWidth, textHeight, width, height) && !collision($, x, y, textHeight, textWidth, lo, bm0, bm1) && !collision($, x, y, textHeight, textWidth, textHeight, bm0, null)) {\n // if the label fits at the current sample point,\n // perform binary search to find the largest font size that fits\n while (hi - lo >= 1) {\n mid = (lo + hi) / 2;\n\n if (collision($, x, y, textHeight, textWidth, mid, bm0, bm1)) {\n hi = mid;\n } else {\n lo = mid;\n }\n } // place label if current lower bound exceeds prior max font size\n\n\n if (lo > maxSize) {\n return [x, y, lo, true];\n }\n }\n } // try to place a label within an input area mark\n\n\n return function (d) {\n const items = d.datum.datum.items[markIndex].items,\n // area points\n n = items.length,\n // number of points\n textHeight = d.datum.fontSize,\n // label width\n textWidth = textMetrics.width(d.datum, d.datum.text); // label height\n\n let maxSize = avoidBaseMark ? textHeight : 0,\n labelPlaced = false,\n labelPlaced2 = false,\n maxAreaWidth = 0,\n x1,\n x2,\n y1,\n y2,\n x,\n y,\n _x,\n _y,\n _x1,\n _xMid,\n _x2,\n _y1,\n _yMid,\n _y2,\n areaWidth,\n result,\n swapTmp; // for each area sample point\n\n\n for (let i = 0; i < n; ++i) {\n x1 = items[i].x;\n y1 = items[i].y;\n x2 = items[i].x2 === undefined ? x1 : items[i].x2;\n y2 = items[i].y2 === undefined ? y1 : items[i].y2;\n\n if (x1 > x2) {\n swapTmp = x1;\n x1 = x2;\n x2 = swapTmp;\n }\n\n if (y1 > y2) {\n swapTmp = y1;\n y1 = y2;\n y2 = swapTmp;\n }\n\n _x1 = $(x1);\n _x2 = $(x2);\n _xMid = ~~((_x1 + _x2) / 2);\n _y1 = $(y1);\n _y2 = $(y2);\n _yMid = ~~((_y1 + _y2) / 2); // search along the line from mid point between the 2 border to lower border\n\n for (_x = _xMid; _x >= _x1; --_x) {\n for (_y = _yMid; _y >= _y1; --_y) {\n result = tryLabel(_x, _y, maxSize, textWidth, textHeight);\n\n if (result) {\n [d.x, d.y, maxSize, labelPlaced] = result;\n }\n }\n } // search along the line from mid point between the 2 border to upper border\n\n\n for (_x = _xMid; _x <= _x2; ++_x) {\n for (_y = _yMid; _y <= _y2; ++_y) {\n result = tryLabel(_x, _y, maxSize, textWidth, textHeight);\n\n if (result) {\n [d.x, d.y, maxSize, labelPlaced] = result;\n }\n }\n } // place label at slice center if not placed through other means\n // and if we're not avoiding overlap with other areas\n\n\n if (!labelPlaced && !avoidBaseMark) {\n // one span is zero, hence we can add\n areaWidth = Math.abs(x2 - x1 + y2 - y1);\n x = (x1 + x2) / 2;\n y = (y1 + y2) / 2; // place label if it fits and improves the max area width\n\n if (areaWidth >= maxAreaWidth && !outOfBounds(x, y, textWidth, textHeight, width, height) && !collision($, x, y, textHeight, textWidth, textHeight, bm0, null)) {\n maxAreaWidth = areaWidth;\n d.x = x;\n d.y = y;\n labelPlaced2 = true;\n }\n }\n } // record current label placement information, update label bitmap\n\n\n if (labelPlaced || labelPlaced2) {\n x = textWidth / 2;\n y = textHeight / 2;\n bm0.setRange($(d.x - x), $(d.y - y), $(d.x + x), $(d.y + y));\n d.align = 'center';\n d.baseline = 'middle';\n return true;\n } else {\n return false;\n }\n };\n}\n\nconst X_DIR = [-1, -1, 1, 1];\nconst Y_DIR = [-1, 1, -1, 1];\nfunction placeAreaLabelFloodFill ($, bitmaps, avoidBaseMark, markIndex, infPadding) {\n const width = $.width,\n height = $.height,\n [collision, outOfBounds] = getTests(infPadding),\n bm0 = bitmaps[0],\n // where labels have been placed\n bm1 = bitmaps[1],\n // area outlines\n bm2 = $.bitmap(); // flood-fill visitations\n // try to place a label within an input area mark\n\n return function (d) {\n const items = d.datum.datum.items[markIndex].items,\n // area points\n n = items.length,\n // number of points\n textHeight = d.datum.fontSize,\n // label width\n textWidth = textMetrics.width(d.datum, d.datum.text),\n // label height\n stack = []; // flood fill stack\n\n let maxSize = avoidBaseMark ? textHeight : 0,\n labelPlaced = false,\n labelPlaced2 = false,\n maxAreaWidth = 0,\n x1,\n x2,\n y1,\n y2,\n x,\n y,\n _x,\n _y,\n lo,\n hi,\n mid,\n areaWidth; // for each area sample point\n\n\n for (let i = 0; i < n; ++i) {\n x1 = items[i].x;\n y1 = items[i].y;\n x2 = items[i].x2 === undefined ? x1 : items[i].x2;\n y2 = items[i].y2 === undefined ? y1 : items[i].y2; // add scaled center point to stack\n\n stack.push([$((x1 + x2) / 2), $((y1 + y2) / 2)]); // perform flood fill, visit points\n\n while (stack.length) {\n [_x, _y] = stack.pop(); // exit if point already marked\n\n if (bm0.get(_x, _y) || bm1.get(_x, _y) || bm2.get(_x, _y)) continue; // mark point in flood fill bitmap\n // add search points for all (in bound) directions\n\n bm2.set(_x, _y);\n\n for (let j = 0; j < 4; ++j) {\n x = _x + X_DIR[j];\n y = _y + Y_DIR[j];\n if (!bm2.outOfBounds(x, y, x, y)) stack.push([x, y]);\n } // unscale point back to x, y space\n\n\n x = $.invert(_x);\n y = $.invert(_y);\n lo = maxSize;\n hi = height; // TODO: make this bound smaller\n\n if (!outOfBounds(x, y, textWidth, textHeight, width, height) && !collision($, x, y, textHeight, textWidth, lo, bm0, bm1) && !collision($, x, y, textHeight, textWidth, textHeight, bm0, null)) {\n // if the label fits at the current sample point,\n // perform binary search to find the largest font size that fits\n while (hi - lo >= 1) {\n mid = (lo + hi) / 2;\n\n if (collision($, x, y, textHeight, textWidth, mid, bm0, bm1)) {\n hi = mid;\n } else {\n lo = mid;\n }\n } // place label if current lower bound exceeds prior max font size\n\n\n if (lo > maxSize) {\n d.x = x;\n d.y = y;\n maxSize = lo;\n labelPlaced = true;\n }\n }\n } // place label at slice center if not placed through other means\n // and if we're not avoiding overlap with other areas\n\n\n if (!labelPlaced && !avoidBaseMark) {\n // one span is zero, hence we can add\n areaWidth = Math.abs(x2 - x1 + y2 - y1);\n x = (x1 + x2) / 2;\n y = (y1 + y2) / 2; // place label if it fits and improves the max area width\n\n if (areaWidth >= maxAreaWidth && !outOfBounds(x, y, textWidth, textHeight, width, height) && !collision($, x, y, textHeight, textWidth, textHeight, bm0, null)) {\n maxAreaWidth = areaWidth;\n d.x = x;\n d.y = y;\n labelPlaced2 = true;\n }\n }\n } // record current label placement information, update label bitmap\n\n\n if (labelPlaced || labelPlaced2) {\n x = textWidth / 2;\n y = textHeight / 2;\n bm0.setRange($(d.x - x), $(d.y - y), $(d.x + x), $(d.y + y));\n d.align = 'center';\n d.baseline = 'middle';\n return true;\n } else {\n return false;\n }\n };\n}\n\nconst Aligns = ['right', 'center', 'left'],\n Baselines = ['bottom', 'middle', 'top'];\nfunction placeMarkLabel ($, bitmaps, anchors, offsets, infPadding) {\n const width = $.width,\n height = $.height,\n bm0 = bitmaps[0],\n bm1 = bitmaps[1],\n n = offsets.length;\n return function (d) {\n const boundary = d.boundary,\n textHeight = d.datum.fontSize; // can not be placed if the mark is not visible in the graph bound\n\n if (!infPadding && (boundary[2] < 0 || boundary[5] < 0 || boundary[0] > width || boundary[3] > height)) {\n return false;\n }\n\n let textWidth = 0,\n dx,\n dy,\n isInside,\n sizeFactor,\n insideFactor,\n x1,\n x2,\n y1,\n y2,\n xc,\n yc,\n _x1,\n _x2,\n _y1,\n _y2; // for each anchor and offset\n\n\n for (let i = 0; i < n; ++i) {\n dx = (anchors[i] & 0x3) - 1;\n dy = (anchors[i] >>> 0x2 & 0x3) - 1;\n isInside = dx === 0 && dy === 0 || offsets[i] < 0;\n sizeFactor = dx && dy ? Math.SQRT1_2 : 1;\n insideFactor = offsets[i] < 0 ? -1 : 1;\n x1 = boundary[1 + dx] + offsets[i] * dx * sizeFactor;\n yc = boundary[4 + dy] + insideFactor * textHeight * dy / 2 + offsets[i] * dy * sizeFactor;\n y1 = yc - textHeight / 2;\n y2 = yc + textHeight / 2;\n _x1 = $(x1);\n _y1 = $(y1);\n _y2 = $(y2);\n\n if (infPadding) {\n _x1 = _x1 < 0 ? 0 : _x1;\n _y1 = _y1 < 0 ? 0 : _y1;\n _y2 = _y2 >= $.height ? $.height - 1 : _y2;\n }\n\n if (!textWidth) {\n // to avoid finding width of text label,\n if (!test(_x1, _x1, _y1, _y2, bm0, bm1, x1, x1, y1, y2, boundary, isInside)) {\n // skip this anchor/offset option if we fail to place a label with 1px width\n continue;\n } else {\n // Otherwise, find the label width\n textWidth = textMetrics.width(d.datum, d.datum.text);\n }\n }\n\n xc = x1 + insideFactor * textWidth * dx / 2;\n x1 = xc - textWidth / 2;\n x2 = xc + textWidth / 2;\n _x1 = $(x1);\n _x2 = $(x2);\n\n if (infPadding) {\n _x1 = _x1 < 0 ? 0 : _x1;\n _x2 = _x2 >= $.width ? $.width - 1 : _x2;\n }\n\n if (test(_x1, _x2, _y1, _y2, bm0, bm1, x1, x2, y1, y2, boundary, isInside)) {\n // place label if the position is placeable\n d.x = !dx ? xc : dx * insideFactor < 0 ? x2 : x1;\n d.y = !dy ? yc : dy * insideFactor < 0 ? y2 : y1;\n d.align = Aligns[dx * insideFactor + 1];\n d.baseline = Baselines[dy * insideFactor + 1];\n bm0.setRange(_x1, _y1, _x2, _y2);\n return true;\n }\n }\n\n return false;\n };\n} // Test if a label with the given dimensions can be added without overlap\n\nfunction test(_x1, _x2, _y1, _y2, bm0, bm1, x1, x2, y1, y2, boundary, isInside) {\n return !(bm0.outOfBounds(_x1, _y1, _x2, _y2) || (isInside && bm1 ? bm1.getRange(_x1, _y1, _x2, _y2) || !isInMarkBound(x1, y1, x2, y2, boundary) : bm0.getRange(_x1, _y1, _x2, _y2)));\n}\n\nfunction isInMarkBound(x1, y1, x2, y2, boundary) {\n return boundary[0] <= x1 && x2 <= boundary[2] && boundary[3] <= y1 && y2 <= boundary[5];\n}\n\nconst TOP = 0x0,\n MIDDLE = 0x4,\n BOTTOM = 0x8,\n LEFT = 0x0,\n CENTER = 0x1,\n RIGHT = 0x2; // Mapping from text anchor to number representation\n\nconst anchorCode = {\n 'top-left': TOP + LEFT,\n 'top': TOP + CENTER,\n 'top-right': TOP + RIGHT,\n 'left': MIDDLE + LEFT,\n 'middle': MIDDLE + CENTER,\n 'right': MIDDLE + RIGHT,\n 'bottom-left': BOTTOM + LEFT,\n 'bottom': BOTTOM + CENTER,\n 'bottom-right': BOTTOM + RIGHT\n};\nconst placeAreaLabel = {\n 'naive': placeAreaLabelNaive,\n 'reduced-search': placeAreaLabelReducedSearch,\n 'floodfill': placeAreaLabelFloodFill\n};\nfunction labelLayout (texts, size, compare, offset, anchor, avoidMarks, avoidBaseMark, lineAnchor, markIndex, padding, method) {\n // early exit for empty data\n if (!texts.length) return texts;\n const positions = Math.max(offset.length, anchor.length),\n offsets = getOffsets(offset, positions),\n anchors = getAnchors(anchor, positions),\n marktype = markType(texts[0].datum),\n grouptype = marktype === 'group' && texts[0].datum.items[markIndex].marktype,\n isGroupArea = grouptype === 'area',\n boundary = markBoundary(marktype, grouptype, lineAnchor, markIndex),\n infPadding = padding === null || padding === Infinity,\n $ = scaler(size[0], size[1], infPadding ? 0 : padding),\n isNaiveGroupArea = isGroupArea && method === 'naive'; // prepare text mark data for placing\n\n const data = texts.map(d => ({\n datum: d,\n opacity: 0,\n x: undefined,\n y: undefined,\n align: undefined,\n baseline: undefined,\n boundary: boundary(d)\n }));\n let bitmaps;\n\n if (!isNaiveGroupArea) {\n // sort labels in priority order, if comparator is provided\n if (compare) {\n data.sort((a, b) => compare(a.datum, b.datum));\n } // flag indicating if label can be placed inside its base mark\n\n\n let labelInside = false;\n\n for (let i = 0; i < anchors.length && !labelInside; ++i) {\n // label inside if anchor is at center\n // label inside if offset to be inside the mark bound\n labelInside = anchors[i] === 0x5 || offsets[i] < 0;\n } // extract data information from base mark when base mark is to be avoided\n // base mark is implicitly avoided if it is a group area\n\n\n if (marktype && (avoidBaseMark || isGroupArea)) {\n avoidMarks = [texts.map(d => d.datum)].concat(avoidMarks);\n } // generate bitmaps for layout calculation\n\n\n bitmaps = avoidMarks.length ? markBitmaps($, avoidMarks, labelInside, isGroupArea) : baseBitmaps($, avoidBaseMark && data);\n } // generate label placement function\n\n\n const place = isGroupArea ? placeAreaLabel[method]($, bitmaps, avoidBaseMark, markIndex, infPadding) : placeMarkLabel($, bitmaps, anchors, offsets, infPadding); // place all labels\n\n data.forEach(d => d.opacity = +place(d));\n return data;\n}\n\nfunction getOffsets(_, count) {\n const offsets = new Float64Array(count),\n n = _.length;\n\n for (let i = 0; i < n; ++i) offsets[i] = _[i] || 0;\n\n for (let i = n; i < count; ++i) offsets[i] = offsets[n - 1];\n\n return offsets;\n}\n\nfunction getAnchors(_, count) {\n const anchors = new Int8Array(count),\n n = _.length;\n\n for (let i = 0; i < n; ++i) anchors[i] |= anchorCode[_[i]];\n\n for (let i = n; i < count; ++i) anchors[i] = anchors[n - 1];\n\n return anchors;\n}\n\nfunction markType(item) {\n return item && item.mark && item.mark.marktype;\n}\n/**\n * Factory function for function for getting base mark boundary, depending\n * on mark and group type. When mark type is undefined, line or area: boundary\n * is the coordinate of each data point. When base mark is grouped line,\n * boundary is either at the beginning or end of the line depending on the\n * value of lineAnchor. Otherwise, use bounds of base mark.\n */\n\n\nfunction markBoundary(marktype, grouptype, lineAnchor, markIndex) {\n const xy = d => [d.x, d.x, d.x, d.y, d.y, d.y];\n\n if (!marktype) {\n return xy; // no reactive geometry\n } else if (marktype === 'line' || marktype === 'area') {\n return d => xy(d.datum);\n } else if (grouptype === 'line') {\n return d => {\n const items = d.datum.items[markIndex].items;\n return xy(items.length ? items[lineAnchor === 'start' ? 0 : items.length - 1] : {\n x: NaN,\n y: NaN\n });\n };\n } else {\n return d => {\n const b = d.datum.bounds;\n return [b.x1, (b.x1 + b.x2) / 2, b.x2, b.y1, (b.y1 + b.y2) / 2, b.y2];\n };\n }\n}\n\nconst Output = ['x', 'y', 'opacity', 'align', 'baseline'];\nconst Anchors = ['top-left', 'left', 'bottom-left', 'top', 'bottom', 'top-right', 'right', 'bottom-right'];\n/**\n * Compute text label layout to annotate marks.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<number>} params.size - The size of the layout, provided as a [width, height] array.\n * @param {function(*,*): number} [params.sort] - An optional\n * comparator function for sorting label data in priority order.\n * @param {Array<string>} [params.anchor] - Label anchor points relative to the base mark bounding box.\n * The available options are 'top-left', 'left', 'bottom-left', 'top',\n * 'bottom', 'top-right', 'right', 'bottom-right', 'middle'.\n * @param {Array<number>} [params.offset] - Label offsets (in pixels) from the base mark bounding box.\n * This parameter is parallel to the list of anchor points.\n * @param {number | null} [params.padding=0] - The amount (in pixels) that a label may exceed the layout size.\n * If this parameter is null, a label may exceed the layout size without any boundary.\n * @param {string} [params.lineAnchor='end'] - For group line mark labels only, indicates the anchor\n * position for labels. One of 'start' or 'end'.\n * @param {string} [params.markIndex=0] - For group mark labels only, an index indicating\n * which mark within the group should be labeled.\n * @param {Array<number>} [params.avoidMarks] - A list of additional mark names for which the label\n * layout should avoid overlap.\n * @param {boolean} [params.avoidBaseMark=true] - Boolean flag indicating if labels should avoid\n * overlap with the underlying base mark being labeled.\n * @param {string} [params.method='naive'] - For area make labels only, a method for\n * place labels. One of 'naive', 'reduced-search', or 'floodfill'.\n * @param {Array<string>} [params.as] - The output fields written by the transform.\n * The default is ['x', 'y', 'opacity', 'align', 'baseline'].\n */\n\nfunction Label(params) {\n Transform.call(this, null, params);\n}\nLabel.Definition = {\n type: 'Label',\n metadata: {\n modifies: true\n },\n params: [{\n name: 'size',\n type: 'number',\n array: true,\n length: 2,\n required: true\n }, {\n name: 'sort',\n type: 'compare'\n }, {\n name: 'anchor',\n type: 'string',\n array: true,\n default: Anchors\n }, {\n name: 'offset',\n type: 'number',\n array: true,\n default: [1]\n }, {\n name: 'padding',\n type: 'number',\n default: 0,\n null: true\n }, {\n name: 'lineAnchor',\n type: 'string',\n values: ['start', 'end'],\n default: 'end'\n }, {\n name: 'markIndex',\n type: 'number',\n default: 0\n }, {\n name: 'avoidBaseMark',\n type: 'boolean',\n default: true\n }, {\n name: 'avoidMarks',\n type: 'data',\n array: true\n }, {\n name: 'method',\n type: 'string',\n default: 'naive'\n }, {\n name: 'as',\n type: 'string',\n array: true,\n length: Output.length,\n default: Output\n }]\n};\ninherits(Label, Transform, {\n transform(_, pulse) {\n function modp(param) {\n const p = _[param];\n return isFunction(p) && pulse.modified(p.fields);\n }\n\n const mod = _.modified();\n\n if (!(mod || pulse.changed(pulse.ADD_REM) || modp('sort'))) return;\n\n if (!_.size || _.size.length !== 2) {\n error('Size parameter should be specified as a [width, height] array.');\n }\n\n const as = _.as || Output; // run label layout\n\n labelLayout(pulse.materialize(pulse.SOURCE).source || [], _.size, _.sort, array(_.offset == null ? 1 : _.offset), array(_.anchor || Anchors), _.avoidMarks || [], _.avoidBaseMark !== false, _.lineAnchor || 'end', _.markIndex || 0, _.padding === undefined ? 0 : _.padding, _.method || 'naive').forEach(l => {\n // write layout results to data stream\n const t = l.datum;\n t[as[0]] = l.x;\n t[as[1]] = l.y;\n t[as[2]] = l.opacity;\n t[as[3]] = l.align;\n t[as[4]] = l.baseline;\n });\n return pulse.reflow(mod).modifies(as);\n }\n\n});\n\nexport { Label as label };\n","import { regressionLoess, sampleCurve, regressionLinear, regressionLog, regressionExp, regressionPow, regressionQuad, regressionPoly } from 'vega-statistics';\nimport { Transform, ingest } from 'vega-dataflow';\nimport { inherits, accessorName, hasOwnProperty, error, extent } from 'vega-util';\n\nfunction partition (data, groupby) {\n var groups = [],\n get = function (f) {\n return f(t);\n },\n map,\n i,\n n,\n t,\n k,\n g; // partition data points into stack groups\n\n\n if (groupby == null) {\n groups.push(data);\n } else {\n for (map = {}, i = 0, n = data.length; i < n; ++i) {\n t = data[i];\n k = groupby.map(get);\n g = map[k];\n\n if (!g) {\n map[k] = g = [];\n g.dims = k;\n groups.push(g);\n }\n\n g.push(t);\n }\n }\n\n return groups;\n}\n\n/**\n * Compute locally-weighted regression fits for one or more data groups.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.x - An accessor for the predictor data field.\n * @param {function(object): *} params.y - An accessor for the predicted data field.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors to groupby.\n * @param {number} [params.bandwidth=0.3] - The loess bandwidth.\n */\n\nfunction Loess(params) {\n Transform.call(this, null, params);\n}\nLoess.Definition = {\n 'type': 'Loess',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'x',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'y',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'bandwidth',\n 'type': 'number',\n 'default': 0.3\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true\n }]\n};\ninherits(Loess, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);\n\n if (!this.value || pulse.changed() || _.modified()) {\n const source = pulse.materialize(pulse.SOURCE).source,\n groups = partition(source, _.groupby),\n names = (_.groupby || []).map(accessorName),\n m = names.length,\n as = _.as || [accessorName(_.x), accessorName(_.y)],\n values = [];\n groups.forEach(g => {\n regressionLoess(g, _.x, _.y, _.bandwidth || 0.3).forEach(p => {\n const t = {};\n\n for (let i = 0; i < m; ++i) {\n t[names[i]] = g.dims[i];\n }\n\n t[as[0]] = p[0];\n t[as[1]] = p[1];\n values.push(ingest(t));\n });\n });\n if (this.value) out.rem = this.value;\n this.value = out.add = out.source = values;\n }\n\n return out;\n }\n\n});\n\nconst Methods = {\n linear: regressionLinear,\n log: regressionLog,\n exp: regressionExp,\n pow: regressionPow,\n quad: regressionQuad,\n poly: regressionPoly\n};\n\nconst degreesOfFreedom = (method, order) => method === 'poly' ? order : method === 'quad' ? 2 : 1;\n/**\n * Compute regression fits for one or more data groups.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {function(object): *} params.x - An accessor for the predictor data field.\n * @param {function(object): *} params.y - An accessor for the predicted data field.\n * @param {string} [params.method='linear'] - The regression method to apply.\n * @param {Array<function(object): *>} [params.groupby] - An array of accessors to groupby.\n * @param {Array<number>} [params.extent] - The domain extent over which to plot the regression line.\n * @param {number} [params.order=3] - The polynomial order. Only applies to the 'poly' method.\n */\n\n\nfunction Regression(params) {\n Transform.call(this, null, params);\n}\nRegression.Definition = {\n 'type': 'Regression',\n 'metadata': {\n 'generates': true\n },\n 'params': [{\n 'name': 'x',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'y',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'groupby',\n 'type': 'field',\n 'array': true\n }, {\n 'name': 'method',\n 'type': 'string',\n 'default': 'linear',\n 'values': Object.keys(Methods)\n }, {\n 'name': 'order',\n 'type': 'number',\n 'default': 3\n }, {\n 'name': 'extent',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'params',\n 'type': 'boolean',\n 'default': false\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true\n }]\n};\ninherits(Regression, Transform, {\n transform(_, pulse) {\n const out = pulse.fork(pulse.NO_SOURCE | pulse.NO_FIELDS);\n\n if (!this.value || pulse.changed() || _.modified()) {\n const source = pulse.materialize(pulse.SOURCE).source,\n groups = partition(source, _.groupby),\n names = (_.groupby || []).map(accessorName),\n method = _.method || 'linear',\n order = _.order || 3,\n dof = degreesOfFreedom(method, order),\n as = _.as || [accessorName(_.x), accessorName(_.y)],\n fit = Methods[method],\n values = [];\n let domain = _.extent;\n\n if (!hasOwnProperty(Methods, method)) {\n error('Invalid regression method: ' + method);\n }\n\n if (domain != null) {\n if (method === 'log' && domain[0] <= 0) {\n pulse.dataflow.warn('Ignoring extent with values <= 0 for log regression.');\n domain = null;\n }\n }\n\n groups.forEach(g => {\n const n = g.length;\n\n if (n <= dof) {\n pulse.dataflow.warn('Skipping regression with more parameters than data points.');\n return;\n }\n\n const model = fit(g, _.x, _.y, order);\n\n if (_.params) {\n // if parameter vectors requested return those\n values.push(ingest({\n keys: g.dims,\n coef: model.coef,\n rSquared: model.rSquared\n }));\n return;\n }\n\n const dom = domain || extent(g, _.x),\n add = p => {\n const t = {};\n\n for (let i = 0; i < names.length; ++i) {\n t[names[i]] = g.dims[i];\n }\n\n t[as[0]] = p[0];\n t[as[1]] = p[1];\n values.push(ingest(t));\n };\n\n if (method === 'linear') {\n // for linear regression we only need the end points\n dom.forEach(x => add([x, model.predict(x)]));\n } else {\n // otherwise return trend line sample points\n sampleCurve(model.predict, dom, 25, 200).forEach(add);\n }\n });\n if (this.value) out.rem = this.value;\n this.value = out.add = out.source = values;\n }\n\n return out;\n }\n\n});\n\nexport { Loess as loess, Regression as regression };\n","\nconst EPSILON = Math.pow(2, -52);\nconst EDGE_STACK = new Uint32Array(512);\n\nexport default class Delaunator {\n\n static from(points, getX = defaultGetX, getY = defaultGetY) {\n const n = points.length;\n const coords = new Float64Array(n * 2);\n\n for (let i = 0; i < n; i++) {\n const p = points[i];\n coords[2 * i] = getX(p);\n coords[2 * i + 1] = getY(p);\n }\n\n return new Delaunator(coords);\n }\n\n constructor(coords) {\n const n = coords.length >> 1;\n if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');\n\n this.coords = coords;\n\n // arrays that will store the triangulation graph\n const maxTriangles = Math.max(2 * n - 5, 0);\n this._triangles = new Uint32Array(maxTriangles * 3);\n this._halfedges = new Int32Array(maxTriangles * 3);\n\n // temporary arrays for tracking the edges of the advancing convex hull\n this._hashSize = Math.ceil(Math.sqrt(n));\n this._hullPrev = new Uint32Array(n); // edge to prev edge\n this._hullNext = new Uint32Array(n); // edge to next edge\n this._hullTri = new Uint32Array(n); // edge to adjacent triangle\n this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash\n\n // temporary arrays for sorting points\n this._ids = new Uint32Array(n);\n this._dists = new Float64Array(n);\n\n this.update();\n }\n\n update() {\n const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this;\n const n = coords.length >> 1;\n\n // populate an array of point indices; calculate input data bbox\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n\n for (let i = 0; i < n; i++) {\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n this._ids[i] = i;\n }\n const cx = (minX + maxX) / 2;\n const cy = (minY + maxY) / 2;\n\n let minDist = Infinity;\n let i0, i1, i2;\n\n // pick a seed point close to the center\n for (let i = 0; i < n; i++) {\n const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist) {\n i0 = i;\n minDist = d;\n }\n }\n const i0x = coords[2 * i0];\n const i0y = coords[2 * i0 + 1];\n\n minDist = Infinity;\n\n // find the point closest to the seed\n for (let i = 0; i < n; i++) {\n if (i === i0) continue;\n const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]);\n if (d < minDist && d > 0) {\n i1 = i;\n minDist = d;\n }\n }\n let i1x = coords[2 * i1];\n let i1y = coords[2 * i1 + 1];\n\n let minRadius = Infinity;\n\n // find the third point which forms the smallest circumcircle with the first two\n for (let i = 0; i < n; i++) {\n if (i === i0 || i === i1) continue;\n const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]);\n if (r < minRadius) {\n i2 = i;\n minRadius = r;\n }\n }\n let i2x = coords[2 * i2];\n let i2y = coords[2 * i2 + 1];\n\n if (minRadius === Infinity) {\n // order collinear points by dx (or dy if all x are identical)\n // and return the list as a hull\n for (let i = 0; i < n; i++) {\n this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]);\n }\n quicksort(this._ids, this._dists, 0, n - 1);\n const hull = new Uint32Array(n);\n let j = 0;\n for (let i = 0, d0 = -Infinity; i < n; i++) {\n const id = this._ids[i];\n if (this._dists[id] > d0) {\n hull[j++] = id;\n d0 = this._dists[id];\n }\n }\n this.hull = hull.subarray(0, j);\n this.triangles = new Uint32Array(0);\n this.halfedges = new Uint32Array(0);\n return;\n }\n\n // swap the order of the seed points for counter-clockwise orientation\n if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) {\n const i = i1;\n const x = i1x;\n const y = i1y;\n i1 = i2;\n i1x = i2x;\n i1y = i2y;\n i2 = i;\n i2x = x;\n i2y = y;\n }\n\n const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);\n this._cx = center.x;\n this._cy = center.y;\n\n for (let i = 0; i < n; i++) {\n this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y);\n }\n\n // sort the points by distance from the seed triangle circumcenter\n quicksort(this._ids, this._dists, 0, n - 1);\n\n // set up the seed triangle as the starting hull\n this._hullStart = i0;\n let hullSize = 3;\n\n hullNext[i0] = hullPrev[i2] = i1;\n hullNext[i1] = hullPrev[i0] = i2;\n hullNext[i2] = hullPrev[i1] = i0;\n\n hullTri[i0] = 0;\n hullTri[i1] = 1;\n hullTri[i2] = 2;\n\n hullHash.fill(-1);\n hullHash[this._hashKey(i0x, i0y)] = i0;\n hullHash[this._hashKey(i1x, i1y)] = i1;\n hullHash[this._hashKey(i2x, i2y)] = i2;\n\n this.trianglesLen = 0;\n this._addTriangle(i0, i1, i2, -1, -1, -1);\n\n for (let k = 0, xp, yp; k < this._ids.length; k++) {\n const i = this._ids[k];\n const x = coords[2 * i];\n const y = coords[2 * i + 1];\n\n // skip near-duplicate points\n if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue;\n xp = x;\n yp = y;\n\n // skip seed triangle points\n if (i === i0 || i === i1 || i === i2) continue;\n\n // find a visible edge on the convex hull using edge hash\n let start = 0;\n for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) {\n start = hullHash[(key + j) % this._hashSize];\n if (start !== -1 && start !== hullNext[start]) break;\n }\n\n start = hullPrev[start];\n let e = start, q;\n while (q = hullNext[e], !orient(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) {\n e = q;\n if (e === start) {\n e = -1;\n break;\n }\n }\n if (e === -1) continue; // likely a near-duplicate point; skip it\n\n // add the first triangle from the point\n let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]);\n\n // recursively flip triangles from the point until they satisfy the Delaunay condition\n hullTri[i] = this._legalize(t + 2);\n hullTri[e] = t; // keep track of boundary triangles on the hull\n hullSize++;\n\n // walk forward through the hull, adding more triangles and flipping recursively\n let n = hullNext[e];\n while (q = hullNext[n], orient(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1])) {\n t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]);\n hullTri[i] = this._legalize(t + 2);\n hullNext[n] = n; // mark as removed\n hullSize--;\n n = q;\n }\n\n // walk backward from the other side, adding more triangles and flipping\n if (e === start) {\n while (q = hullPrev[e], orient(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) {\n t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]);\n this._legalize(t + 2);\n hullTri[q] = t;\n hullNext[e] = e; // mark as removed\n hullSize--;\n e = q;\n }\n }\n\n // update the hull indices\n this._hullStart = hullPrev[i] = e;\n hullNext[e] = hullPrev[n] = i;\n hullNext[i] = n;\n\n // save the two new edges in the hash table\n hullHash[this._hashKey(x, y)] = i;\n hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;\n }\n\n this.hull = new Uint32Array(hullSize);\n for (let i = 0, e = this._hullStart; i < hullSize; i++) {\n this.hull[i] = e;\n e = hullNext[e];\n }\n\n // trim typed triangle mesh arrays\n this.triangles = this._triangles.subarray(0, this.trianglesLen);\n this.halfedges = this._halfedges.subarray(0, this.trianglesLen);\n }\n\n _hashKey(x, y) {\n return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;\n }\n\n _legalize(a) {\n const {_triangles: triangles, _halfedges: halfedges, coords} = this;\n\n let i = 0;\n let ar = 0;\n\n // recursion eliminated with a fixed-size stack\n while (true) {\n const b = halfedges[a];\n\n /* if the pair of triangles doesn't satisfy the Delaunay condition\n * (p1 is inside the circumcircle of [p0, pl, pr]), flip them,\n * then do the same check/flip recursively for the new pair of triangles\n *\n * pl pl\n * /||\\ / \\\n * al/ || \\bl al/ \\a\n * / || \\ / \\\n * / a||b \\ flip /___ar___\\\n * p0\\ || /p1 => p0\\---bl---/p1\n * \\ || / \\ /\n * ar\\ || /br b\\ /br\n * \\||/ \\ /\n * pr pr\n */\n const a0 = a - a % 3;\n ar = a0 + (a + 2) % 3;\n\n if (b === -1) { // convex hull edge\n if (i === 0) break;\n a = EDGE_STACK[--i];\n continue;\n }\n\n const b0 = b - b % 3;\n const al = a0 + (a + 1) % 3;\n const bl = b0 + (b + 2) % 3;\n\n const p0 = triangles[ar];\n const pr = triangles[a];\n const pl = triangles[al];\n const p1 = triangles[bl];\n\n const illegal = inCircle(\n coords[2 * p0], coords[2 * p0 + 1],\n coords[2 * pr], coords[2 * pr + 1],\n coords[2 * pl], coords[2 * pl + 1],\n coords[2 * p1], coords[2 * p1 + 1]);\n\n if (illegal) {\n triangles[a] = p1;\n triangles[b] = p0;\n\n const hbl = halfedges[bl];\n\n // edge swapped on the other side of the hull (rare); fix the halfedge reference\n if (hbl === -1) {\n let e = this._hullStart;\n do {\n if (this._hullTri[e] === bl) {\n this._hullTri[e] = a;\n break;\n }\n e = this._hullPrev[e];\n } while (e !== this._hullStart);\n }\n this._link(a, hbl);\n this._link(b, halfedges[ar]);\n this._link(ar, bl);\n\n const br = b0 + (b + 1) % 3;\n\n // don't worry about hitting the cap: it can only happen on extremely degenerate input\n if (i < EDGE_STACK.length) {\n EDGE_STACK[i++] = br;\n }\n } else {\n if (i === 0) break;\n a = EDGE_STACK[--i];\n }\n }\n\n return ar;\n }\n\n _link(a, b) {\n this._halfedges[a] = b;\n if (b !== -1) this._halfedges[b] = a;\n }\n\n // add a new triangle given vertex indices and adjacent half-edge ids\n _addTriangle(i0, i1, i2, a, b, c) {\n const t = this.trianglesLen;\n\n this._triangles[t] = i0;\n this._triangles[t + 1] = i1;\n this._triangles[t + 2] = i2;\n\n this._link(t, a);\n this._link(t + 1, b);\n this._link(t + 2, c);\n\n this.trianglesLen += 3;\n\n return t;\n }\n}\n\n// monotonically increases with real angle, but doesn't need expensive trigonometry\nfunction pseudoAngle(dx, dy) {\n const p = dx / (Math.abs(dx) + Math.abs(dy));\n return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]\n}\n\nfunction dist(ax, ay, bx, by) {\n const dx = ax - bx;\n const dy = ay - by;\n return dx * dx + dy * dy;\n}\n\n// return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check\nfunction orientIfSure(px, py, rx, ry, qx, qy) {\n const l = (ry - py) * (qx - px);\n const r = (rx - px) * (qy - py);\n return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0;\n}\n\n// a more robust orientation test that's stable in a given triangle (to fix robustness issues)\nfunction orient(rx, ry, qx, qy, px, py) {\n const sign = orientIfSure(px, py, rx, ry, qx, qy) ||\n orientIfSure(rx, ry, qx, qy, px, py) ||\n orientIfSure(qx, qy, px, py, rx, ry);\n return sign < 0;\n}\n\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n const dx = ax - px;\n const dy = ay - py;\n const ex = bx - px;\n const ey = by - py;\n const fx = cx - px;\n const fy = cy - py;\n\n const ap = dx * dx + dy * dy;\n const bp = ex * ex + ey * ey;\n const cp = fx * fx + fy * fy;\n\n return dx * (ey * cp - bp * fy) -\n dy * (ex * cp - bp * fx) +\n ap * (ex * fy - ey * fx) < 0;\n}\n\nfunction circumradius(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = (ey * bl - dy * cl) * d;\n const y = (dx * cl - ex * bl) * d;\n\n return x * x + y * y;\n}\n\nfunction circumcenter(ax, ay, bx, by, cx, cy) {\n const dx = bx - ax;\n const dy = by - ay;\n const ex = cx - ax;\n const ey = cy - ay;\n\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const d = 0.5 / (dx * ey - dy * ex);\n\n const x = ax + (ey * bl - dy * cl) * d;\n const y = ay + (dx * cl - ex * bl) * d;\n\n return {x, y};\n}\n\nfunction quicksort(ids, dists, left, right) {\n if (right - left <= 20) {\n for (let i = left + 1; i <= right; i++) {\n const temp = ids[i];\n const tempDist = dists[temp];\n let j = i - 1;\n while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--];\n ids[j + 1] = temp;\n }\n } else {\n const median = (left + right) >> 1;\n let i = left + 1;\n let j = right;\n swap(ids, median, i);\n if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);\n if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right);\n if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i);\n\n const temp = ids[i];\n const tempDist = dists[temp];\n while (true) {\n do i++; while (dists[ids[i]] < tempDist);\n do j--; while (dists[ids[j]] > tempDist);\n if (j < i) break;\n swap(ids, i, j);\n }\n ids[left + 1] = ids[j];\n ids[j] = temp;\n\n if (right - i + 1 >= j - left) {\n quicksort(ids, dists, i, right);\n quicksort(ids, dists, left, j - 1);\n } else {\n quicksort(ids, dists, left, j - 1);\n quicksort(ids, dists, i, right);\n }\n }\n}\n\nfunction swap(arr, i, j) {\n const tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultGetX(p) {\n return p[0];\n}\nfunction defaultGetY(p) {\n return p[1];\n}\n","const epsilon = 1e-6;\n\nexport default class Path {\n constructor() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n }\n moveTo(x, y) {\n this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`;\n }\n closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n }\n lineTo(x, y) {\n this._ += `L${this._x1 = +x},${this._y1 = +y}`;\n }\n arc(x, y, r) {\n x = +x, y = +y, r = +r;\n const x0 = x + r;\n const y0 = y;\n if (r < 0) throw new Error(\"negative radius\");\n if (this._x1 === null) this._ += `M${x0},${y0}`;\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += \"L\" + x0 + \",\" + y0;\n if (!r) return;\n this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`;\n }\n rect(x, y, w, h) {\n this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`;\n }\n value() {\n return this._ || null;\n }\n}\n","export default class Polygon {\n constructor() {\n this._ = [];\n }\n moveTo(x, y) {\n this._.push([x, y]);\n }\n closePath() {\n this._.push(this._[0].slice());\n }\n lineTo(x, y) {\n this._.push([x, y]);\n }\n value() {\n return this._.length ? this._ : null;\n }\n}\n","import Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\n\nexport default class Voronoi {\n constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) {\n if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error(\"invalid bounds\");\n this.delaunay = delaunay;\n this._circumcenters = new Float64Array(delaunay.points.length * 2);\n this.vectors = new Float64Array(delaunay.points.length * 2);\n this.xmax = xmax, this.xmin = xmin;\n this.ymax = ymax, this.ymin = ymin;\n this._init();\n }\n update() {\n this.delaunay.update();\n this._init();\n return this;\n }\n _init() {\n const {delaunay: {points, hull, triangles}, vectors} = this;\n\n // Compute circumcenters.\n const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);\n for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {\n const t1 = triangles[i] * 2;\n const t2 = triangles[i + 1] * 2;\n const t3 = triangles[i + 2] * 2;\n const x1 = points[t1];\n const y1 = points[t1 + 1];\n const x2 = points[t2];\n const y2 = points[t2 + 1];\n const x3 = points[t3];\n const y3 = points[t3 + 1];\n\n const dx = x2 - x1;\n const dy = y2 - y1;\n const ex = x3 - x1;\n const ey = y3 - y1;\n const bl = dx * dx + dy * dy;\n const cl = ex * ex + ey * ey;\n const ab = (dx * ey - dy * ex) * 2;\n\n if (!ab) {\n // degenerate case (collinear diagram)\n x = (x1 + x3) / 2 - 1e8 * ey;\n y = (y1 + y3) / 2 + 1e8 * ex;\n }\n else if (Math.abs(ab) < 1e-8) {\n // almost equal points (degenerate triangle)\n x = (x1 + x3) / 2;\n y = (y1 + y3) / 2;\n } else {\n const d = 1 / ab;\n x = x1 + (ey * bl - dy * cl) * d;\n y = y1 + (dx * cl - ex * bl) * d;\n }\n circumcenters[j] = x;\n circumcenters[j + 1] = y;\n }\n\n // Compute exterior cell rays.\n let h = hull[hull.length - 1];\n let p0, p1 = h * 4;\n let x0, x1 = points[2 * h];\n let y0, y1 = points[2 * h + 1];\n vectors.fill(0);\n for (let i = 0; i < hull.length; ++i) {\n h = hull[i];\n p0 = p1, x0 = x1, y0 = y1;\n p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1];\n vectors[p0 + 2] = vectors[p1] = y0 - y1;\n vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0;\n }\n }\n render(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this;\n if (hull.length <= 1) return null;\n for (let i = 0, n = halfedges.length; i < n; ++i) {\n const j = halfedges[i];\n if (j < i) continue;\n const ti = Math.floor(i / 3) * 2;\n const tj = Math.floor(j / 3) * 2;\n const xi = circumcenters[ti];\n const yi = circumcenters[ti + 1];\n const xj = circumcenters[tj];\n const yj = circumcenters[tj + 1];\n this._renderSegment(xi, yi, xj, yj, context);\n }\n let h0, h1 = hull[hull.length - 1];\n for (let i = 0; i < hull.length; ++i) {\n h0 = h1, h1 = hull[i];\n const t = Math.floor(inedges[h1] / 3) * 2;\n const x = circumcenters[t];\n const y = circumcenters[t + 1];\n const v = h0 * 4;\n const p = this._project(x, y, vectors[v + 2], vectors[v + 3]);\n if (p) this._renderSegment(x, y, p[0], p[1], context);\n }\n return buffer && buffer.value();\n }\n renderBounds(context) {\n const buffer = context == null ? context = new Path : undefined;\n context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin);\n return buffer && buffer.value();\n }\n renderCell(i, context) {\n const buffer = context == null ? context = new Path : undefined;\n const points = this._clip(i);\n if (points === null || !points.length) return;\n context.moveTo(points[0], points[1]);\n let n = points.length;\n while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2;\n for (let i = 2; i < n; i += 2) {\n if (points[i] !== points[i-2] || points[i+1] !== points[i-1])\n context.lineTo(points[i], points[i + 1]);\n }\n context.closePath();\n return buffer && buffer.value();\n }\n *cellPolygons() {\n const {delaunay: {points}} = this;\n for (let i = 0, n = points.length / 2; i < n; ++i) {\n const cell = this.cellPolygon(i);\n if (cell) cell.index = i, yield cell;\n }\n }\n cellPolygon(i) {\n const polygon = new Polygon;\n this.renderCell(i, polygon);\n return polygon.value();\n }\n _renderSegment(x0, y0, x1, y1, context) {\n let S;\n const c0 = this._regioncode(x0, y0);\n const c1 = this._regioncode(x1, y1);\n if (c0 === 0 && c1 === 0) {\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) {\n context.moveTo(S[0], S[1]);\n context.lineTo(S[2], S[3]);\n }\n }\n contains(i, x, y) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return false;\n return this.delaunay._step(i, x, y) === i;\n }\n *neighbors(i) {\n const ci = this._clip(i);\n if (ci) for (const j of this.delaunay.neighbors(i)) {\n const cj = this._clip(j);\n // find the common edge\n if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) {\n for (let aj = 0, lj = cj.length; aj < lj; aj += 2) {\n if (ci[ai] == cj[aj]\n && ci[ai + 1] == cj[aj + 1]\n && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj]\n && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj]\n ) {\n yield j;\n break loop;\n }\n }\n }\n }\n }\n _cell(i) {\n const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this;\n const e0 = inedges[i];\n if (e0 === -1) return null; // coincident point\n const points = [];\n let e = e0;\n do {\n const t = Math.floor(e / 3);\n points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]);\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n e = halfedges[e];\n } while (e !== e0 && e !== -1);\n return points;\n }\n _clip(i) {\n // degenerate case (1 valid point: return the box)\n if (i === 0 && this.delaunay.hull.length === 1) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n const points = this._cell(i);\n if (points === null) return null;\n const {vectors: V} = this;\n const v = i * 4;\n return V[v] || V[v + 1]\n ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3])\n : this._clipFinite(i, points);\n }\n _clipFinite(i, points) {\n const n = points.length;\n let P = null;\n let x0, y0, x1 = points[n - 2], y1 = points[n - 1];\n let c0, c1 = this._regioncode(x1, y1);\n let e0, e1;\n for (let j = 0; j < n; j += 2) {\n x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1];\n c0 = c1, c1 = this._regioncode(x1, y1);\n if (c0 === 0 && c1 === 0) {\n e0 = e1, e1 = 0;\n if (P) P.push(x1, y1);\n else P = [x1, y1];\n } else {\n let S, sx0, sy0, sx1, sy1;\n if (c0 === 0) {\n if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue;\n [sx0, sy0, sx1, sy1] = S;\n } else {\n if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue;\n [sx1, sy1, sx0, sy0] = S;\n e0 = e1, e1 = this._edgecode(sx0, sy0);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx0, sy0);\n else P = [sx0, sy0];\n }\n e0 = e1, e1 = this._edgecode(sx1, sy1);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx1, sy1);\n else P = [sx1, sy1];\n }\n }\n if (P) {\n e0 = e1, e1 = this._edgecode(P[0], P[1]);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n return P;\n }\n _clipSegment(x0, y0, x1, y1, c0, c1) {\n while (true) {\n if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1];\n if (c0 & c1) return null;\n let x, y, c = c0 || c1;\n if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;\n else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;\n else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;\n else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin;\n if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);\n else x1 = x, y1 = y, c1 = this._regioncode(x1, y1);\n }\n }\n _clipInfinite(i, points, vx0, vy0, vxn, vyn) {\n let P = Array.from(points), p;\n if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]);\n if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]);\n if (P = this._clipFinite(i, P)) {\n for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {\n c0 = c1, c1 = this._edgecode(P[j], P[j + 1]);\n if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length;\n }\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax];\n }\n return P;\n }\n _edge(i, e0, e1, P, j) {\n while (e0 !== e1) {\n let x, y;\n switch (e0) {\n case 0b0101: e0 = 0b0100; continue; // top-left\n case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top\n case 0b0110: e0 = 0b0010; continue; // top-right\n case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right\n case 0b1010: e0 = 0b1000; continue; // bottom-right\n case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom\n case 0b1001: e0 = 0b0001; continue; // bottom-left\n case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left\n }\n if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) {\n P.splice(j, 0, x, y), j += 2;\n }\n }\n if (P.length > 4) {\n for (let i = 0; i < P.length; i+= 2) {\n const j = (i + 2) % P.length, k = (i + 4) % P.length;\n if (P[i] === P[j] && P[j] === P[k]\n || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1])\n P.splice(j, 2), i -= 2;\n }\n }\n return j;\n }\n _project(x0, y0, vx, vy) {\n let t = Infinity, c, x, y;\n if (vy < 0) { // top\n if (y0 <= this.ymin) return null;\n if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx;\n } else if (vy > 0) { // bottom\n if (y0 >= this.ymax) return null;\n if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx;\n }\n if (vx > 0) { // right\n if (x0 >= this.xmax) return null;\n if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy;\n } else if (vx < 0) { // left\n if (x0 <= this.xmin) return null;\n if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy;\n }\n return [x, y];\n }\n _edgecode(x, y) {\n return (x === this.xmin ? 0b0001\n : x === this.xmax ? 0b0010 : 0b0000)\n | (y === this.ymin ? 0b0100\n : y === this.ymax ? 0b1000 : 0b0000);\n }\n _regioncode(x, y) {\n return (x < this.xmin ? 0b0001\n : x > this.xmax ? 0b0010 : 0b0000)\n | (y < this.ymin ? 0b0100\n : y > this.ymax ? 0b1000 : 0b0000);\n }\n}\n","import Delaunator from \"delaunator\";\nimport Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\nimport Voronoi from \"./voronoi.js\";\n\nconst tau = 2 * Math.PI, pow = Math.pow;\n\nfunction pointX(p) {\n return p[0];\n}\n\nfunction pointY(p) {\n return p[1];\n}\n\n// A triangulation is collinear if all its triangles have a non-null area\nfunction collinear(d) {\n const {triangles, coords} = d;\n for (let i = 0; i < triangles.length; i += 3) {\n const a = 2 * triangles[i],\n b = 2 * triangles[i + 1],\n c = 2 * triangles[i + 2],\n cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1])\n - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]);\n if (cross > 1e-10) return false;\n }\n return true;\n}\n\nfunction jitter(x, y, r) {\n return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];\n}\n\nexport default class Delaunay {\n static from(points, fx = pointX, fy = pointY, that) {\n return new Delaunay(\"length\" in points\n ? flatArray(points, fx, fy, that)\n : Float64Array.from(flatIterable(points, fx, fy, that)));\n }\n constructor(points) {\n this._delaunator = new Delaunator(points);\n this.inedges = new Int32Array(points.length / 2);\n this._hullIndex = new Int32Array(points.length / 2);\n this.points = this._delaunator.coords;\n this._init();\n }\n update() {\n this._delaunator.update();\n this._init();\n return this;\n }\n _init() {\n const d = this._delaunator, points = this.points;\n\n // check for collinear\n if (d.hull && d.hull.length > 2 && collinear(d)) {\n this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i)\n .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors\n const e = this.collinear[0], f = this.collinear[this.collinear.length - 1],\n bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ],\n r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);\n for (let i = 0, n = points.length / 2; i < n; ++i) {\n const p = jitter(points[2 * i], points[2 * i + 1], r);\n points[2 * i] = p[0];\n points[2 * i + 1] = p[1];\n }\n this._delaunator = new Delaunator(points);\n } else {\n delete this.collinear;\n }\n\n const halfedges = this.halfedges = this._delaunator.halfedges;\n const hull = this.hull = this._delaunator.hull;\n const triangles = this.triangles = this._delaunator.triangles;\n const inedges = this.inedges.fill(-1);\n const hullIndex = this._hullIndex.fill(-1);\n\n // Compute an index from each point to an (arbitrary) incoming halfedge\n // Used to give the first neighbor of each point; for this reason,\n // on the hull we give priority to exterior halfedges\n for (let e = 0, n = halfedges.length; e < n; ++e) {\n const p = triangles[e % 3 === 2 ? e - 2 : e + 1];\n if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e;\n }\n for (let i = 0, n = hull.length; i < n; ++i) {\n hullIndex[hull[i]] = i;\n }\n\n // degenerate case: 1 or 2 (distinct) points\n if (hull.length <= 2 && hull.length > 0) {\n this.triangles = new Int32Array(3).fill(-1);\n this.halfedges = new Int32Array(3).fill(-1);\n this.triangles[0] = hull[0];\n this.triangles[1] = hull[1];\n this.triangles[2] = hull[1];\n inedges[hull[0]] = 1;\n if (hull.length === 2) inedges[hull[1]] = 0;\n }\n }\n voronoi(bounds) {\n return new Voronoi(this, bounds);\n }\n *neighbors(i) {\n const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this;\n\n // degenerate case with several collinear points\n if (collinear) {\n const l = collinear.indexOf(i);\n if (l > 0) yield collinear[l - 1];\n if (l < collinear.length - 1) yield collinear[l + 1];\n return;\n }\n\n const e0 = inedges[i];\n if (e0 === -1) return; // coincident point\n let e = e0, p0 = -1;\n do {\n yield p0 = triangles[e];\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) return; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n const p = hull[(_hullIndex[i] + 1) % hull.length];\n if (p !== p0) yield p;\n return;\n }\n } while (e !== e0);\n }\n find(x, y, i = 0) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;\n const i0 = i;\n let c;\n while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c;\n return c;\n }\n _step(i, x, y) {\n const {inedges, hull, _hullIndex, halfedges, triangles, points} = this;\n if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);\n let c = i;\n let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);\n const e0 = inedges[i];\n let e = e0;\n do {\n let t = triangles[e];\n const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);\n if (dt < dc) dc = dt, c = t;\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n e = halfedges[e];\n if (e === -1) {\n e = hull[(_hullIndex[i] + 1) % hull.length];\n if (e !== t) {\n if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e;\n }\n break;\n }\n } while (e !== e0);\n return c;\n }\n render(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, halfedges, triangles} = this;\n for (let i = 0, n = halfedges.length; i < n; ++i) {\n const j = halfedges[i];\n if (j < i) continue;\n const ti = triangles[i] * 2;\n const tj = triangles[j] * 2;\n context.moveTo(points[ti], points[ti + 1]);\n context.lineTo(points[tj], points[tj + 1]);\n }\n this.renderHull(context);\n return buffer && buffer.value();\n }\n renderPoints(context, r = 2) {\n const buffer = context == null ? context = new Path : undefined;\n const {points} = this;\n for (let i = 0, n = points.length; i < n; i += 2) {\n const x = points[i], y = points[i + 1];\n context.moveTo(x + r, y);\n context.arc(x, y, r, 0, tau);\n }\n return buffer && buffer.value();\n }\n renderHull(context) {\n const buffer = context == null ? context = new Path : undefined;\n const {hull, points} = this;\n const h = hull[0] * 2, n = hull.length;\n context.moveTo(points[h], points[h + 1]);\n for (let i = 1; i < n; ++i) {\n const h = 2 * hull[i];\n context.lineTo(points[h], points[h + 1]);\n }\n context.closePath();\n return buffer && buffer.value();\n }\n hullPolygon() {\n const polygon = new Polygon;\n this.renderHull(polygon);\n return polygon.value();\n }\n renderTriangle(i, context) {\n const buffer = context == null ? context = new Path : undefined;\n const {points, triangles} = this;\n const t0 = triangles[i *= 3] * 2;\n const t1 = triangles[i + 1] * 2;\n const t2 = triangles[i + 2] * 2;\n context.moveTo(points[t0], points[t0 + 1]);\n context.lineTo(points[t1], points[t1 + 1]);\n context.lineTo(points[t2], points[t2 + 1]);\n context.closePath();\n return buffer && buffer.value();\n }\n *trianglePolygons() {\n const {triangles} = this;\n for (let i = 0, n = triangles.length / 3; i < n; ++i) {\n yield this.trianglePolygon(i);\n }\n }\n trianglePolygon(i) {\n const polygon = new Polygon;\n this.renderTriangle(i, polygon);\n return polygon.value();\n }\n}\n\nfunction flatArray(points, fx, fy, that) {\n const n = points.length;\n const array = new Float64Array(n * 2);\n for (let i = 0; i < n; ++i) {\n const p = points[i];\n array[i * 2] = fx.call(that, p, i, points);\n array[i * 2 + 1] = fy.call(that, p, i, points);\n }\n return array;\n}\n\nfunction* flatIterable(points, fx, fy, that) {\n let i = 0;\n for (const p of points) {\n yield fx.call(that, p, i, points);\n yield fy.call(that, p, i, points);\n ++i;\n }\n}\n","import { Transform } from 'vega-dataflow';\nimport { inherits } from 'vega-util';\nimport { Delaunay } from 'd3-delaunay';\n\nfunction Voronoi(params) {\n Transform.call(this, null, params);\n}\nVoronoi.Definition = {\n 'type': 'Voronoi',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'x',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'y',\n 'type': 'field',\n 'required': true\n }, {\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'extent',\n 'type': 'array',\n 'array': true,\n 'length': 2,\n 'default': [[-1e5, -1e5], [1e5, 1e5]],\n 'content': {\n 'type': 'number',\n 'array': true,\n 'length': 2\n }\n }, {\n 'name': 'as',\n 'type': 'string',\n 'default': 'path'\n }]\n};\nconst defaultExtent = [-1e5, -1e5, 1e5, 1e5];\ninherits(Voronoi, Transform, {\n transform(_, pulse) {\n const as = _.as || 'path',\n data = pulse.source; // nothing to do if no data\n\n if (!data || !data.length) return pulse; // configure and construct voronoi diagram\n\n let s = _.size;\n s = s ? [0, 0, s[0], s[1]] : (s = _.extent) ? [s[0][0], s[0][1], s[1][0], s[1][1]] : defaultExtent;\n const voronoi = this.value = Delaunay.from(data, _.x, _.y).voronoi(s); // map polygons to paths\n\n for (let i = 0, n = data.length; i < n; ++i) {\n const polygon = voronoi.cellPolygon(i);\n data[i][as] = polygon ? toPathString(polygon) : null;\n }\n\n return pulse.reflow(_.modified()).modifies(as);\n }\n\n}); // suppress duplicated end point vertices\n\nfunction toPathString(p) {\n const x = p[0][0],\n y = p[0][1];\n let n = p.length - 1;\n\n for (; p[n][0] === x && p[n][1] === y; --n);\n\n return 'M' + p.slice(0, n + 1).join('L') + 'Z';\n}\n\nexport { Voronoi as voronoi };\n","import { canvas } from 'vega-canvas';\nimport { Transform } from 'vega-dataflow';\nimport { inherits, error, isFunction, constant, extent } from 'vega-util';\nimport { scale } from 'vega-scale';\nimport { random } from 'vega-statistics';\n\n/*\nCopyright (c) 2013, Jason Davies.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n * The name Jason Davies may not be used to endorse or promote products\n derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL JASON DAVIES BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\nOR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\nADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n// Word cloud layout by Jason Davies, https://www.jasondavies.com/wordcloud/\n// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf\n\nvar cloudRadians = Math.PI / 180,\n cw = 1 << 11 >> 5,\n ch = 1 << 11;\nfunction cloud () {\n var size = [256, 256],\n text,\n font,\n fontSize,\n fontStyle,\n fontWeight,\n rotate,\n padding,\n spiral = archimedeanSpiral,\n words = [],\n random = Math.random,\n cloud = {};\n\n cloud.layout = function () {\n var contextAndRatio = getContext(canvas()),\n board = zeroArray((size[0] >> 5) * size[1]),\n bounds = null,\n n = words.length,\n i = -1,\n tags = [],\n data = words.map(d => ({\n text: text(d),\n font: font(d),\n style: fontStyle(d),\n weight: fontWeight(d),\n rotate: rotate(d),\n size: ~~(fontSize(d) + 1e-14),\n padding: padding(d),\n xoff: 0,\n yoff: 0,\n x1: 0,\n y1: 0,\n x0: 0,\n y0: 0,\n hasText: false,\n sprite: null,\n datum: d\n })).sort((a, b) => b.size - a.size);\n\n while (++i < n) {\n var d = data[i];\n d.x = size[0] * (random() + .5) >> 1;\n d.y = size[1] * (random() + .5) >> 1;\n cloudSprite(contextAndRatio, d, data, i);\n\n if (d.hasText && place(board, d, bounds)) {\n tags.push(d);\n if (bounds) cloudBounds(bounds, d);else bounds = [{\n x: d.x + d.x0,\n y: d.y + d.y0\n }, {\n x: d.x + d.x1,\n y: d.y + d.y1\n }]; // Temporary hack\n\n d.x -= size[0] >> 1;\n d.y -= size[1] >> 1;\n }\n }\n\n return tags;\n };\n\n function getContext(canvas) {\n canvas.width = canvas.height = 1;\n var ratio = Math.sqrt(canvas.getContext('2d').getImageData(0, 0, 1, 1).data.length >> 2);\n canvas.width = (cw << 5) / ratio;\n canvas.height = ch / ratio;\n var context = canvas.getContext('2d');\n context.fillStyle = context.strokeStyle = 'red';\n context.textAlign = 'center';\n return {\n context: context,\n ratio: ratio\n };\n }\n\n function place(board, tag, bounds) {\n var startX = tag.x,\n startY = tag.y,\n maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),\n s = spiral(size),\n dt = random() < .5 ? 1 : -1,\n t = -dt,\n dxdy,\n dx,\n dy;\n\n while (dxdy = s(t += dt)) {\n dx = ~~dxdy[0];\n dy = ~~dxdy[1];\n if (Math.min(Math.abs(dx), Math.abs(dy)) >= maxDelta) break;\n tag.x = startX + dx;\n tag.y = startY + dy;\n if (tag.x + tag.x0 < 0 || tag.y + tag.y0 < 0 || tag.x + tag.x1 > size[0] || tag.y + tag.y1 > size[1]) continue; // TODO only check for collisions within current bounds.\n\n if (!bounds || !cloudCollide(tag, board, size[0])) {\n if (!bounds || collideRects(tag, bounds)) {\n var sprite = tag.sprite,\n w = tag.width >> 5,\n sw = size[0] >> 5,\n lx = tag.x - (w << 4),\n sx = lx & 0x7f,\n msx = 32 - sx,\n h = tag.y1 - tag.y0,\n x = (tag.y + tag.y0) * sw + (lx >> 5),\n last;\n\n for (var j = 0; j < h; j++) {\n last = 0;\n\n for (var i = 0; i <= w; i++) {\n board[x + i] |= last << msx | (i < w ? (last = sprite[j * w + i]) >>> sx : 0);\n }\n\n x += sw;\n }\n\n tag.sprite = null;\n return true;\n }\n }\n }\n\n return false;\n }\n\n cloud.words = function (_) {\n if (arguments.length) {\n words = _;\n return cloud;\n } else {\n return words;\n }\n };\n\n cloud.size = function (_) {\n if (arguments.length) {\n size = [+_[0], +_[1]];\n return cloud;\n } else {\n return size;\n }\n };\n\n cloud.font = function (_) {\n if (arguments.length) {\n font = functor(_);\n return cloud;\n } else {\n return font;\n }\n };\n\n cloud.fontStyle = function (_) {\n if (arguments.length) {\n fontStyle = functor(_);\n return cloud;\n } else {\n return fontStyle;\n }\n };\n\n cloud.fontWeight = function (_) {\n if (arguments.length) {\n fontWeight = functor(_);\n return cloud;\n } else {\n return fontWeight;\n }\n };\n\n cloud.rotate = function (_) {\n if (arguments.length) {\n rotate = functor(_);\n return cloud;\n } else {\n return rotate;\n }\n };\n\n cloud.text = function (_) {\n if (arguments.length) {\n text = functor(_);\n return cloud;\n } else {\n return text;\n }\n };\n\n cloud.spiral = function (_) {\n if (arguments.length) {\n spiral = spirals[_] || _;\n return cloud;\n } else {\n return spiral;\n }\n };\n\n cloud.fontSize = function (_) {\n if (arguments.length) {\n fontSize = functor(_);\n return cloud;\n } else {\n return fontSize;\n }\n };\n\n cloud.padding = function (_) {\n if (arguments.length) {\n padding = functor(_);\n return cloud;\n } else {\n return padding;\n }\n };\n\n cloud.random = function (_) {\n if (arguments.length) {\n random = _;\n return cloud;\n } else {\n return random;\n }\n };\n\n return cloud;\n} // Fetches a monochrome sprite bitmap for the specified text.\n// Load in batches for speed.\n\nfunction cloudSprite(contextAndRatio, d, data, di) {\n if (d.sprite) return;\n var c = contextAndRatio.context,\n ratio = contextAndRatio.ratio;\n c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);\n var x = 0,\n y = 0,\n maxh = 0,\n n = data.length,\n w,\n w32,\n h,\n i,\n j;\n --di;\n\n while (++di < n) {\n d = data[di];\n c.save();\n c.font = d.style + ' ' + d.weight + ' ' + ~~((d.size + 1) / ratio) + 'px ' + d.font;\n w = c.measureText(d.text + 'm').width * ratio;\n h = d.size << 1;\n\n if (d.rotate) {\n var sr = Math.sin(d.rotate * cloudRadians),\n cr = Math.cos(d.rotate * cloudRadians),\n wcr = w * cr,\n wsr = w * sr,\n hcr = h * cr,\n hsr = h * sr;\n w = Math.max(Math.abs(wcr + hsr), Math.abs(wcr - hsr)) + 0x1f >> 5 << 5;\n h = ~~Math.max(Math.abs(wsr + hcr), Math.abs(wsr - hcr));\n } else {\n w = w + 0x1f >> 5 << 5;\n }\n\n if (h > maxh) maxh = h;\n\n if (x + w >= cw << 5) {\n x = 0;\n y += maxh;\n maxh = 0;\n }\n\n if (y + h >= ch) break;\n c.translate((x + (w >> 1)) / ratio, (y + (h >> 1)) / ratio);\n if (d.rotate) c.rotate(d.rotate * cloudRadians);\n c.fillText(d.text, 0, 0);\n\n if (d.padding) {\n c.lineWidth = 2 * d.padding;\n c.strokeText(d.text, 0, 0);\n }\n\n c.restore();\n d.width = w;\n d.height = h;\n d.xoff = x;\n d.yoff = y;\n d.x1 = w >> 1;\n d.y1 = h >> 1;\n d.x0 = -d.x1;\n d.y0 = -d.y1;\n d.hasText = true;\n x += w;\n }\n\n var pixels = c.getImageData(0, 0, (cw << 5) / ratio, ch / ratio).data,\n sprite = [];\n\n while (--di >= 0) {\n d = data[di];\n if (!d.hasText) continue;\n w = d.width;\n w32 = w >> 5;\n h = d.y1 - d.y0; // Zero the buffer\n\n for (i = 0; i < h * w32; i++) sprite[i] = 0;\n\n x = d.xoff;\n if (x == null) return;\n y = d.yoff;\n var seen = 0,\n seenRow = -1;\n\n for (j = 0; j < h; j++) {\n for (i = 0; i < w; i++) {\n var k = w32 * j + (i >> 5),\n m = pixels[(y + j) * (cw << 5) + (x + i) << 2] ? 1 << 31 - i % 32 : 0;\n sprite[k] |= m;\n seen |= m;\n }\n\n if (seen) seenRow = j;else {\n d.y0++;\n h--;\n j--;\n y++;\n }\n }\n\n d.y1 = d.y0 + seenRow;\n d.sprite = sprite.slice(0, (d.y1 - d.y0) * w32);\n }\n} // Use mask-based collision detection.\n\n\nfunction cloudCollide(tag, board, sw) {\n sw >>= 5;\n var sprite = tag.sprite,\n w = tag.width >> 5,\n lx = tag.x - (w << 4),\n sx = lx & 0x7f,\n msx = 32 - sx,\n h = tag.y1 - tag.y0,\n x = (tag.y + tag.y0) * sw + (lx >> 5),\n last;\n\n for (var j = 0; j < h; j++) {\n last = 0;\n\n for (var i = 0; i <= w; i++) {\n if ((last << msx | (i < w ? (last = sprite[j * w + i]) >>> sx : 0)) & board[x + i]) return true;\n }\n\n x += sw;\n }\n\n return false;\n}\n\nfunction cloudBounds(bounds, d) {\n var b0 = bounds[0],\n b1 = bounds[1];\n if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;\n if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;\n if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;\n if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;\n}\n\nfunction collideRects(a, b) {\n return a.x + a.x1 > b[0].x && a.x + a.x0 < b[1].x && a.y + a.y1 > b[0].y && a.y + a.y0 < b[1].y;\n}\n\nfunction archimedeanSpiral(size) {\n var e = size[0] / size[1];\n return function (t) {\n return [e * (t *= .1) * Math.cos(t), t * Math.sin(t)];\n };\n}\n\nfunction rectangularSpiral(size) {\n var dy = 4,\n dx = dy * size[0] / size[1],\n x = 0,\n y = 0;\n return function (t) {\n var sign = t < 0 ? -1 : 1; // See triangular numbers: T_n = n * (n + 1) / 2.\n\n switch (Math.sqrt(1 + 4 * sign * t) - sign & 3) {\n case 0:\n x += dx;\n break;\n\n case 1:\n y += dy;\n break;\n\n case 2:\n x -= dx;\n break;\n\n default:\n y -= dy;\n break;\n }\n\n return [x, y];\n };\n} // TODO reuse arrays?\n\n\nfunction zeroArray(n) {\n var a = [],\n i = -1;\n\n while (++i < n) a[i] = 0;\n\n return a;\n}\n\nfunction functor(d) {\n return typeof d === 'function' ? d : function () {\n return d;\n };\n}\n\nvar spirals = {\n archimedean: archimedeanSpiral,\n rectangular: rectangularSpiral\n};\n\nconst Output = ['x', 'y', 'font', 'fontSize', 'fontStyle', 'fontWeight', 'angle'];\nconst Params = ['text', 'font', 'rotate', 'fontSize', 'fontStyle', 'fontWeight'];\nfunction Wordcloud(params) {\n Transform.call(this, cloud(), params);\n}\nWordcloud.Definition = {\n 'type': 'Wordcloud',\n 'metadata': {\n 'modifies': true\n },\n 'params': [{\n 'name': 'size',\n 'type': 'number',\n 'array': true,\n 'length': 2\n }, {\n 'name': 'font',\n 'type': 'string',\n 'expr': true,\n 'default': 'sans-serif'\n }, {\n 'name': 'fontStyle',\n 'type': 'string',\n 'expr': true,\n 'default': 'normal'\n }, {\n 'name': 'fontWeight',\n 'type': 'string',\n 'expr': true,\n 'default': 'normal'\n }, {\n 'name': 'fontSize',\n 'type': 'number',\n 'expr': true,\n 'default': 14\n }, {\n 'name': 'fontSizeRange',\n 'type': 'number',\n 'array': 'nullable',\n 'default': [10, 50]\n }, {\n 'name': 'rotate',\n 'type': 'number',\n 'expr': true,\n 'default': 0\n }, {\n 'name': 'text',\n 'type': 'field'\n }, {\n 'name': 'spiral',\n 'type': 'string',\n 'values': ['archimedean', 'rectangular']\n }, {\n 'name': 'padding',\n 'type': 'number',\n 'expr': true\n }, {\n 'name': 'as',\n 'type': 'string',\n 'array': true,\n 'length': 7,\n 'default': Output\n }]\n};\ninherits(Wordcloud, Transform, {\n transform(_, pulse) {\n if (_.size && !(_.size[0] && _.size[1])) {\n error('Wordcloud size dimensions must be non-zero.');\n }\n\n function modp(param) {\n const p = _[param];\n return isFunction(p) && pulse.modified(p.fields);\n }\n\n const mod = _.modified();\n\n if (!(mod || pulse.changed(pulse.ADD_REM) || Params.some(modp))) return;\n const data = pulse.materialize(pulse.SOURCE).source,\n layout = this.value,\n as = _.as || Output;\n let fontSize = _.fontSize || 14,\n range;\n isFunction(fontSize) ? range = _.fontSizeRange : fontSize = constant(fontSize); // create font size scaling function as needed\n\n if (range) {\n const fsize = fontSize,\n sizeScale = scale('sqrt')().domain(extent(data, fsize)).range(range);\n\n fontSize = x => sizeScale(fsize(x));\n }\n\n data.forEach(t => {\n t[as[0]] = NaN;\n t[as[1]] = NaN;\n t[as[3]] = 0;\n }); // configure layout\n\n const words = layout.words(data).text(_.text).size(_.size || [500, 500]).padding(_.padding || 1).spiral(_.spiral || 'archimedean').rotate(_.rotate || 0).font(_.font || 'sans-serif').fontStyle(_.fontStyle || 'normal').fontWeight(_.fontWeight || 'normal').fontSize(fontSize).random(random).layout();\n const size = layout.size(),\n dx = size[0] >> 1,\n dy = size[1] >> 1,\n n = words.length;\n\n for (let i = 0, w, t; i < n; ++i) {\n w = words[i];\n t = w.datum;\n t[as[0]] = w.x + dx;\n t[as[1]] = w.y + dy;\n t[as[2]] = w.font;\n t[as[3]] = w.size;\n t[as[4]] = w.style;\n t[as[5]] = w.weight;\n t[as[6]] = w.rotate;\n }\n\n return pulse.reflow(mod).modifies(as);\n }\n\n});\n\nexport { Wordcloud as wordcloud };\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","import { permute, bisectLeft, bisectRight } from 'd3-array';\nimport { Transform } from 'vega-dataflow';\nimport { inherits } from 'vega-util';\n\nconst array8 = n => new Uint8Array(n);\nconst array16 = n => new Uint16Array(n);\nconst array32 = n => new Uint32Array(n);\n\n/**\n * Maintains CrossFilter state.\n */\n\nfunction Bitmaps() {\n let width = 8,\n data = [],\n seen = array32(0),\n curr = array(0, width),\n prev = array(0, width);\n return {\n data: () => data,\n seen: () => seen = lengthen(seen, data.length),\n\n add(array) {\n for (let i = 0, j = data.length, n = array.length, t; i < n; ++i) {\n t = array[i];\n t._index = j++;\n data.push(t);\n }\n },\n\n remove(num, map) {\n // map: index -> boolean (true => remove)\n const n = data.length,\n copy = Array(n - num),\n reindex = data; // reuse old data array for index map\n\n let t, i, j; // seek forward to first removal\n\n for (i = 0; !map[i] && i < n; ++i) {\n copy[i] = data[i];\n reindex[i] = i;\n } // condense arrays\n\n\n for (j = i; i < n; ++i) {\n t = data[i];\n\n if (!map[i]) {\n reindex[i] = j;\n curr[j] = curr[i];\n prev[j] = prev[i];\n copy[j] = t;\n t._index = j++;\n } else {\n reindex[i] = -1;\n }\n\n curr[i] = 0; // clear unused bits\n }\n\n data = copy;\n return reindex;\n },\n\n size: () => data.length,\n curr: () => curr,\n prev: () => prev,\n reset: k => prev[k] = curr[k],\n all: () => width < 0x101 ? 0xff : width < 0x10001 ? 0xffff : 0xffffffff,\n\n set(k, one) {\n curr[k] |= one;\n },\n\n clear(k, one) {\n curr[k] &= ~one;\n },\n\n resize(n, m) {\n const k = curr.length;\n\n if (n > k || m > width) {\n width = Math.max(m, width);\n curr = array(n, width, curr);\n prev = array(n, width);\n }\n }\n\n };\n}\n\nfunction lengthen(array, length, copy) {\n if (array.length >= length) return array;\n copy = copy || new array.constructor(length);\n copy.set(array);\n return copy;\n}\n\nfunction array(n, m, array) {\n const copy = (m < 0x101 ? array8 : m < 0x10001 ? array16 : array32)(n);\n if (array) copy.set(array);\n return copy;\n}\n\nfunction Dimension (index, i, query) {\n const bit = 1 << i;\n return {\n one: bit,\n zero: ~bit,\n range: query.slice(),\n bisect: index.bisect,\n index: index.index,\n size: index.size,\n\n onAdd(added, curr) {\n const dim = this,\n range = dim.bisect(dim.range, added.value),\n idx = added.index,\n lo = range[0],\n hi = range[1],\n n1 = idx.length;\n let i;\n\n for (i = 0; i < lo; ++i) curr[idx[i]] |= bit;\n\n for (i = hi; i < n1; ++i) curr[idx[i]] |= bit;\n\n return dim;\n }\n\n };\n}\n\n/**\n * Maintains a list of values, sorted by key.\n */\n\nfunction SortedIndex() {\n let index = array32(0),\n value = [],\n size = 0;\n\n function insert(key, data, base) {\n if (!data.length) return [];\n const n0 = size,\n n1 = data.length,\n addi = array32(n1);\n let addv = Array(n1),\n oldv,\n oldi,\n i;\n\n for (i = 0; i < n1; ++i) {\n addv[i] = key(data[i]);\n addi[i] = i;\n }\n\n addv = sort(addv, addi);\n\n if (n0) {\n oldv = value;\n oldi = index;\n value = Array(n0 + n1);\n index = array32(n0 + n1);\n merge(base, oldv, oldi, n0, addv, addi, n1, value, index);\n } else {\n if (base > 0) for (i = 0; i < n1; ++i) {\n addi[i] += base;\n }\n value = addv;\n index = addi;\n }\n\n size = n0 + n1;\n return {\n index: addi,\n value: addv\n };\n }\n\n function remove(num, map) {\n // map: index -> remove\n const n = size;\n let idx, i, j; // seek forward to first removal\n\n for (i = 0; !map[index[i]] && i < n; ++i); // condense index and value arrays\n\n\n for (j = i; i < n; ++i) {\n if (!map[idx = index[i]]) {\n index[j] = idx;\n value[j] = value[i];\n ++j;\n }\n }\n\n size = n - num;\n }\n\n function reindex(map) {\n for (let i = 0, n = size; i < n; ++i) {\n index[i] = map[index[i]];\n }\n }\n\n function bisect(range, array) {\n let n;\n\n if (array) {\n n = array.length;\n } else {\n array = value;\n n = size;\n }\n\n return [bisectLeft(array, range[0], 0, n), bisectRight(array, range[1], 0, n)];\n }\n\n return {\n insert: insert,\n remove: remove,\n bisect: bisect,\n reindex: reindex,\n index: () => index,\n size: () => size\n };\n}\n\nfunction sort(values, index) {\n values.sort.call(index, (a, b) => {\n const x = values[a],\n y = values[b];\n return x < y ? -1 : x > y ? 1 : 0;\n });\n return permute(values, index);\n}\n\nfunction merge(base, value0, index0, n0, value1, index1, n1, value, index) {\n let i0 = 0,\n i1 = 0,\n i;\n\n for (i = 0; i0 < n0 && i1 < n1; ++i) {\n if (value0[i0] < value1[i1]) {\n value[i] = value0[i0];\n index[i] = index0[i0++];\n } else {\n value[i] = value1[i1];\n index[i] = index1[i1++] + base;\n }\n }\n\n for (; i0 < n0; ++i0, ++i) {\n value[i] = value0[i0];\n index[i] = index0[i0];\n }\n\n for (; i1 < n1; ++i1, ++i) {\n value[i] = value1[i1];\n index[i] = index1[i1] + base;\n }\n}\n\n/**\n * An indexed multi-dimensional filter.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {Array<function(object): *>} params.fields - An array of dimension accessors to filter.\n * @param {Array} params.query - An array of per-dimension range queries.\n */\n\nfunction CrossFilter(params) {\n Transform.call(this, Bitmaps(), params);\n this._indices = null;\n this._dims = null;\n}\nCrossFilter.Definition = {\n 'type': 'CrossFilter',\n 'metadata': {},\n 'params': [{\n 'name': 'fields',\n 'type': 'field',\n 'array': true,\n 'required': true\n }, {\n 'name': 'query',\n 'type': 'array',\n 'array': true,\n 'required': true,\n 'content': {\n 'type': 'number',\n 'array': true,\n 'length': 2\n }\n }]\n};\ninherits(CrossFilter, Transform, {\n transform(_, pulse) {\n if (!this._dims) {\n return this.init(_, pulse);\n } else {\n var init = _.modified('fields') || _.fields.some(f => pulse.modified(f.fields));\n\n return init ? this.reinit(_, pulse) : this.eval(_, pulse);\n }\n },\n\n init(_, pulse) {\n const fields = _.fields,\n query = _.query,\n indices = this._indices = {},\n dims = this._dims = [],\n m = query.length;\n let i = 0,\n key,\n index; // instantiate indices and dimensions\n\n for (; i < m; ++i) {\n key = fields[i].fname;\n index = indices[key] || (indices[key] = SortedIndex());\n dims.push(Dimension(index, i, query[i]));\n }\n\n return this.eval(_, pulse);\n },\n\n reinit(_, pulse) {\n const output = pulse.materialize().fork(),\n fields = _.fields,\n query = _.query,\n indices = this._indices,\n dims = this._dims,\n bits = this.value,\n curr = bits.curr(),\n prev = bits.prev(),\n all = bits.all(),\n out = output.rem = output.add,\n mod = output.mod,\n m = query.length,\n adds = {};\n let add, index, key, mods, remMap, modMap, i, n, f; // set prev to current state\n\n prev.set(curr); // if pulse has remove tuples, process them first\n\n if (pulse.rem.length) {\n remMap = this.remove(_, pulse, output);\n } // if pulse has added tuples, add them to state\n\n\n if (pulse.add.length) {\n bits.add(pulse.add);\n } // if pulse has modified tuples, create an index map\n\n\n if (pulse.mod.length) {\n modMap = {};\n\n for (mods = pulse.mod, i = 0, n = mods.length; i < n; ++i) {\n modMap[mods[i]._index] = 1;\n }\n } // re-initialize indices as needed, update curr bitmap\n\n\n for (i = 0; i < m; ++i) {\n f = fields[i];\n\n if (!dims[i] || _.modified('fields', i) || pulse.modified(f.fields)) {\n key = f.fname;\n\n if (!(add = adds[key])) {\n indices[key] = index = SortedIndex();\n adds[key] = add = index.insert(f, pulse.source, 0);\n }\n\n dims[i] = Dimension(index, i, query[i]).onAdd(add, curr);\n }\n } // visit each tuple\n // if filter state changed, push index to add/rem\n // else if in mod and passes a filter, push index to mod\n\n\n for (i = 0, n = bits.data().length; i < n; ++i) {\n if (remMap[i]) {\n // skip if removed tuple\n continue;\n } else if (prev[i] !== curr[i]) {\n // add if state changed\n out.push(i);\n } else if (modMap[i] && curr[i] !== all) {\n // otherwise, pass mods through\n mod.push(i);\n }\n }\n\n bits.mask = (1 << m) - 1;\n return output;\n },\n\n eval(_, pulse) {\n const output = pulse.materialize().fork(),\n m = this._dims.length;\n let mask = 0;\n\n if (pulse.rem.length) {\n this.remove(_, pulse, output);\n mask |= (1 << m) - 1;\n }\n\n if (_.modified('query') && !_.modified('fields')) {\n mask |= this.update(_, pulse, output);\n }\n\n if (pulse.add.length) {\n this.insert(_, pulse, output);\n mask |= (1 << m) - 1;\n }\n\n if (pulse.mod.length) {\n this.modify(pulse, output);\n mask |= (1 << m) - 1;\n }\n\n this.value.mask = mask;\n return output;\n },\n\n insert(_, pulse, output) {\n const tuples = pulse.add,\n bits = this.value,\n dims = this._dims,\n indices = this._indices,\n fields = _.fields,\n adds = {},\n out = output.add,\n n = bits.size() + tuples.length,\n m = dims.length;\n let k = bits.size(),\n j,\n key,\n add; // resize bitmaps and add tuples as needed\n\n bits.resize(n, m);\n bits.add(tuples);\n const curr = bits.curr(),\n prev = bits.prev(),\n all = bits.all(); // add to dimensional indices\n\n for (j = 0; j < m; ++j) {\n key = fields[j].fname;\n add = adds[key] || (adds[key] = indices[key].insert(fields[j], tuples, k));\n dims[j].onAdd(add, curr);\n } // set previous filters, output if passes at least one filter\n\n\n for (; k < n; ++k) {\n prev[k] = all;\n if (curr[k] !== all) out.push(k);\n }\n },\n\n modify(pulse, output) {\n const out = output.mod,\n bits = this.value,\n curr = bits.curr(),\n all = bits.all(),\n tuples = pulse.mod;\n let i, n, k;\n\n for (i = 0, n = tuples.length; i < n; ++i) {\n k = tuples[i]._index;\n if (curr[k] !== all) out.push(k);\n }\n },\n\n remove(_, pulse, output) {\n const indices = this._indices,\n bits = this.value,\n curr = bits.curr(),\n prev = bits.prev(),\n all = bits.all(),\n map = {},\n out = output.rem,\n tuples = pulse.rem;\n let i, n, k, f; // process tuples, output if passes at least one filter\n\n for (i = 0, n = tuples.length; i < n; ++i) {\n k = tuples[i]._index;\n map[k] = 1; // build index map\n\n prev[k] = f = curr[k];\n curr[k] = all;\n if (f !== all) out.push(k);\n } // remove from dimensional indices\n\n\n for (k in indices) {\n indices[k].remove(n, map);\n }\n\n this.reindex(pulse, n, map);\n return map;\n },\n\n // reindex filters and indices after propagation completes\n reindex(pulse, num, map) {\n const indices = this._indices,\n bits = this.value;\n pulse.runAfter(() => {\n const indexMap = bits.remove(num, map);\n\n for (const key in indices) indices[key].reindex(indexMap);\n });\n },\n\n update(_, pulse, output) {\n const dims = this._dims,\n query = _.query,\n stamp = pulse.stamp,\n m = dims.length;\n let mask = 0,\n i,\n q; // survey how many queries have changed\n\n output.filters = 0;\n\n for (q = 0; q < m; ++q) {\n if (_.modified('query', q)) {\n i = q;\n ++mask;\n }\n }\n\n if (mask === 1) {\n // only one query changed, use more efficient update\n mask = dims[i].one;\n this.incrementOne(dims[i], query[i], output.add, output.rem);\n } else {\n // multiple queries changed, perform full record keeping\n for (q = 0, mask = 0; q < m; ++q) {\n if (!_.modified('query', q)) continue;\n mask |= dims[q].one;\n this.incrementAll(dims[q], query[q], stamp, output.add);\n output.rem = output.add; // duplicate add/rem for downstream resolve\n }\n }\n\n return mask;\n },\n\n incrementAll(dim, query, stamp, out) {\n const bits = this.value,\n seen = bits.seen(),\n curr = bits.curr(),\n prev = bits.prev(),\n index = dim.index(),\n old = dim.bisect(dim.range),\n range = dim.bisect(query),\n lo1 = range[0],\n hi1 = range[1],\n lo0 = old[0],\n hi0 = old[1],\n one = dim.one;\n let i, j, k; // Fast incremental update based on previous lo index.\n\n if (lo1 < lo0) {\n for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {\n k = index[i];\n\n if (seen[k] !== stamp) {\n prev[k] = curr[k];\n seen[k] = stamp;\n out.push(k);\n }\n\n curr[k] ^= one;\n }\n } else if (lo1 > lo0) {\n for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {\n k = index[i];\n\n if (seen[k] !== stamp) {\n prev[k] = curr[k];\n seen[k] = stamp;\n out.push(k);\n }\n\n curr[k] ^= one;\n }\n } // Fast incremental update based on previous hi index.\n\n\n if (hi1 > hi0) {\n for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {\n k = index[i];\n\n if (seen[k] !== stamp) {\n prev[k] = curr[k];\n seen[k] = stamp;\n out.push(k);\n }\n\n curr[k] ^= one;\n }\n } else if (hi1 < hi0) {\n for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {\n k = index[i];\n\n if (seen[k] !== stamp) {\n prev[k] = curr[k];\n seen[k] = stamp;\n out.push(k);\n }\n\n curr[k] ^= one;\n }\n }\n\n dim.range = query.slice();\n },\n\n incrementOne(dim, query, add, rem) {\n const bits = this.value,\n curr = bits.curr(),\n index = dim.index(),\n old = dim.bisect(dim.range),\n range = dim.bisect(query),\n lo1 = range[0],\n hi1 = range[1],\n lo0 = old[0],\n hi0 = old[1],\n one = dim.one;\n let i, j, k; // Fast incremental update based on previous lo index.\n\n if (lo1 < lo0) {\n for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {\n k = index[i];\n curr[k] ^= one;\n add.push(k);\n }\n } else if (lo1 > lo0) {\n for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {\n k = index[i];\n curr[k] ^= one;\n rem.push(k);\n }\n } // Fast incremental update based on previous hi index.\n\n\n if (hi1 > hi0) {\n for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {\n k = index[i];\n curr[k] ^= one;\n add.push(k);\n }\n } else if (hi1 < hi0) {\n for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {\n k = index[i];\n curr[k] ^= one;\n rem.push(k);\n }\n }\n\n dim.range = query.slice();\n }\n\n});\n\n/**\n * Selectively filters tuples by resolving against a filter bitmap.\n * Useful for processing the output of a cross-filter transform.\n * @constructor\n * @param {object} params - The parameters for this operator.\n * @param {object} params.ignore - A bit mask indicating which filters to ignore.\n * @param {object} params.filter - The per-tuple filter bitmaps. Typically this\n * parameter value is a reference to a {@link CrossFilter} transform.\n */\n\nfunction ResolveFilter(params) {\n Transform.call(this, null, params);\n}\nResolveFilter.Definition = {\n 'type': 'ResolveFilter',\n 'metadata': {},\n 'params': [{\n 'name': 'ignore',\n 'type': 'number',\n 'required': true,\n 'description': 'A bit mask indicating which filters to ignore.'\n }, {\n 'name': 'filter',\n 'type': 'object',\n 'required': true,\n 'description': 'Per-tuple filter bitmaps from a CrossFilter transform.'\n }]\n};\ninherits(ResolveFilter, Transform, {\n transform(_, pulse) {\n const ignore = ~(_.ignore || 0),\n // bit mask where zeros -> dims to ignore\n bitmap = _.filter,\n mask = bitmap.mask; // exit early if no relevant filter changes\n\n if ((mask & ignore) === 0) return pulse.StopPropagation;\n\n const output = pulse.fork(pulse.ALL),\n data = bitmap.data(),\n curr = bitmap.curr(),\n prev = bitmap.prev(),\n pass = k => !(curr[k] & ignore) ? data[k] : null; // propagate all mod tuples that pass the filter\n\n\n output.filter(output.MOD, pass); // determine add & rem tuples via filter functions\n // for efficiency, we do *not* populate new arrays,\n // instead we add filter functions applied downstream\n\n if (!(mask & mask - 1)) {\n // only one filter changed\n output.filter(output.ADD, pass);\n output.filter(output.REM, k => (curr[k] & ignore) === mask ? data[k] : null);\n } else {\n // multiple filters changed\n output.filter(output.ADD, k => {\n const c = curr[k] & ignore,\n f = !c && c ^ prev[k] & ignore;\n return f ? data[k] : null;\n });\n output.filter(output.REM, k => {\n const c = curr[k] & ignore,\n f = c && !(c ^ (c ^ prev[k] & ignore));\n return f ? data[k] : null;\n });\n } // add filter to source data in case of reflow...\n\n\n return output.filter(output.SOURCE, t => pass(t._index));\n }\n\n});\n\nexport { CrossFilter as crossfilter, ResolveFilter as resolvefilter };\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export default function(source, keys) {\n return Array.from(keys, key => source[key]);\n}\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n let r0 = Math.round(start / step), r1 = Math.round(stop / step);\n if (r0 * step < start) ++r0;\n if (r1 * step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) * step;\n } else {\n step = -step;\n let r0 = Math.round(start * step), r1 = Math.round(stop * step);\n if (r0 / step < start) ++r0;\n if (r1 / step > stop) --r1;\n ticks = new Array(n = r1 - r0 + 1);\n while (++i < n) ticks[i] = (r0 + i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","import { error, toSet, isFunction, isString, hasOwnProperty } from 'vega-util';\n\nconst RawCode = 'RawCode';\nconst Literal = 'Literal';\nconst Property = 'Property';\nconst Identifier = 'Identifier';\nconst ArrayExpression = 'ArrayExpression';\nconst BinaryExpression = 'BinaryExpression';\nconst CallExpression = 'CallExpression';\nconst ConditionalExpression = 'ConditionalExpression';\nconst LogicalExpression = 'LogicalExpression';\nconst MemberExpression = 'MemberExpression';\nconst ObjectExpression = 'ObjectExpression';\nconst UnaryExpression = 'UnaryExpression';\nfunction ASTNode(type) {\n this.type = type;\n}\n\nASTNode.prototype.visit = function (visitor) {\n let c, i, n;\n if (visitor(this)) return 1;\n\n for (c = children(this), i = 0, n = c.length; i < n; ++i) {\n if (c[i].visit(visitor)) return 1;\n }\n};\n\nfunction children(node) {\n switch (node.type) {\n case ArrayExpression:\n return node.elements;\n\n case BinaryExpression:\n case LogicalExpression:\n return [node.left, node.right];\n\n case CallExpression:\n return [node.callee].concat(node.arguments);\n\n case ConditionalExpression:\n return [node.test, node.consequent, node.alternate];\n\n case MemberExpression:\n return [node.object, node.property];\n\n case ObjectExpression:\n return node.properties;\n\n case Property:\n return [node.key, node.value];\n\n case UnaryExpression:\n return [node.argument];\n\n case Identifier:\n case Literal:\n case RawCode:\n default:\n return [];\n }\n}\n\n/*\n The following expression parser is based on Esprima (http://esprima.org/).\n Original header comment and license for Esprima is included here:\n\n Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>\n Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>\n Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>\n Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>\n Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>\n Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>\n Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>\n Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>\n Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>\n Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nvar TokenName, source, index, length, lookahead;\nvar TokenBooleanLiteral = 1,\n TokenEOF = 2,\n TokenIdentifier = 3,\n TokenKeyword = 4,\n TokenNullLiteral = 5,\n TokenNumericLiteral = 6,\n TokenPunctuator = 7,\n TokenStringLiteral = 8,\n TokenRegularExpression = 9;\nTokenName = {};\nTokenName[TokenBooleanLiteral] = 'Boolean';\nTokenName[TokenEOF] = '<end>';\nTokenName[TokenIdentifier] = 'Identifier';\nTokenName[TokenKeyword] = 'Keyword';\nTokenName[TokenNullLiteral] = 'Null';\nTokenName[TokenNumericLiteral] = 'Numeric';\nTokenName[TokenPunctuator] = 'Punctuator';\nTokenName[TokenStringLiteral] = 'String';\nTokenName[TokenRegularExpression] = 'RegularExpression';\nvar SyntaxArrayExpression = 'ArrayExpression',\n SyntaxBinaryExpression = 'BinaryExpression',\n SyntaxCallExpression = 'CallExpression',\n SyntaxConditionalExpression = 'ConditionalExpression',\n SyntaxIdentifier = 'Identifier',\n SyntaxLiteral = 'Literal',\n SyntaxLogicalExpression = 'LogicalExpression',\n SyntaxMemberExpression = 'MemberExpression',\n SyntaxObjectExpression = 'ObjectExpression',\n SyntaxProperty = 'Property',\n SyntaxUnaryExpression = 'UnaryExpression'; // Error messages should be identical to V8.\n\nvar MessageUnexpectedToken = 'Unexpected token %0',\n MessageUnexpectedNumber = 'Unexpected number',\n MessageUnexpectedString = 'Unexpected string',\n MessageUnexpectedIdentifier = 'Unexpected identifier',\n MessageUnexpectedReserved = 'Unexpected reserved word',\n MessageUnexpectedEOS = 'Unexpected end of input',\n MessageInvalidRegExp = 'Invalid regular expression',\n MessageUnterminatedRegExp = 'Invalid regular expression: missing /',\n MessageStrictOctalLiteral = 'Octal literals are not allowed in strict mode.',\n MessageStrictDuplicateProperty = 'Duplicate data property in object literal not allowed in strict mode';\nvar ILLEGAL = 'ILLEGAL',\n DISABLED = 'Disabled.'; // See also tools/generate-unicode-regex.py.\n\nvar RegexNonAsciiIdentifierStart = new RegExp('[\\\\xAA\\\\xB5\\\\xBA\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\u02C1\\\\u02C6-\\\\u02D1\\\\u02E0-\\\\u02E4\\\\u02EC\\\\u02EE\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037A-\\\\u037D\\\\u037F\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03F5\\\\u03F7-\\\\u0481\\\\u048A-\\\\u052F\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u05D0-\\\\u05EA\\\\u05F0-\\\\u05F2\\\\u0620-\\\\u064A\\\\u066E\\\\u066F\\\\u0671-\\\\u06D3\\\\u06D5\\\\u06E5\\\\u06E6\\\\u06EE\\\\u06EF\\\\u06FA-\\\\u06FC\\\\u06FF\\\\u0710\\\\u0712-\\\\u072F\\\\u074D-\\\\u07A5\\\\u07B1\\\\u07CA-\\\\u07EA\\\\u07F4\\\\u07F5\\\\u07FA\\\\u0800-\\\\u0815\\\\u081A\\\\u0824\\\\u0828\\\\u0840-\\\\u0858\\\\u08A0-\\\\u08B2\\\\u0904-\\\\u0939\\\\u093D\\\\u0950\\\\u0958-\\\\u0961\\\\u0971-\\\\u0980\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\\\u09BD\\\\u09CE\\\\u09DC\\\\u09DD\\\\u09DF-\\\\u09E1\\\\u09F0\\\\u09F1\\\\u0A05-\\\\u0A0A\\\\u0A0F\\\\u0A10\\\\u0A13-\\\\u0A28\\\\u0A2A-\\\\u0A30\\\\u0A32\\\\u0A33\\\\u0A35\\\\u0A36\\\\u0A38\\\\u0A39\\\\u0A59-\\\\u0A5C\\\\u0A5E\\\\u0A72-\\\\u0A74\\\\u0A85-\\\\u0A8D\\\\u0A8F-\\\\u0A91\\\\u0A93-\\\\u0AA8\\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A3\\\\u0EA5\\\\u0EA7\\\\u0EAA\\\\u0EAB\\\\u0EAD-\\\\u0EB0\\\\u0EB2\\\\u0EB3\\\\u0EBD\\\\u0EC0-\\\\u0EC4\\\\u0EC6\\\\u0EDC-\\\\u0EDF\\\\u0F00\\\\u0F40-\\\\u0F47\\\\u0F49-\\\\u0F6C\\\\u0F88-\\\\u0F8C\\\\u1000-\\\\u102A\\\\u103F\\\\u1050-\\\\u1055\\\\u105A-\\\\u105D\\\\u1061\\\\u1065\\\\u1066\\\\u106E-\\\\u1070\\\\u1075-\\\\u1081\\\\u108E\\\\u10A0-\\\\u10C5\\\\u10C7\\\\u10CD\\\\u10D0-\\\\u10FA\\\\u10FC-\\\\u1248\\\\u124A-\\\\u124D\\\\u1250-\\\\u1256\\\\u1258\\\\u125A-\\\\u125D\\\\u1260-\\\\u1288\\\\u128A-\\\\u128D\\\\u1290-\\\\u12B0\\\\u12B2-\\\\u12B5\\\\u12B8-\\\\u12BE\\\\u12C0\\\\u12C2-\\\\u12C5\\\\u12C8-\\\\u12D6\\\\u12D8-\\\\u1310\\\\u1312-\\\\u1315\\\\u1318-\\\\u135A\\\\u1380-\\\\u138F\\\\u13A0-\\\\u13F4\\\\u1401-\\\\u166C\\\\u166F-\\\\u167F\\\\u1681-\\\\u169A\\\\u16A0-\\\\u16EA\\\\u16EE-\\\\u16F8\\\\u1700-\\\\u170C\\\\u170E-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176C\\\\u176E-\\\\u1770\\\\u1780-\\\\u17B3\\\\u17D7\\\\u17DC\\\\u1820-\\\\u1877\\\\u1880-\\\\u18A8\\\\u18AA\\\\u18B0-\\\\u18F5\\\\u1900-\\\\u191E\\\\u1950-\\\\u196D\\\\u1970-\\\\u1974\\\\u1980-\\\\u19AB\\\\u19C1-\\\\u19C7\\\\u1A00-\\\\u1A16\\\\u1A20-\\\\u1A54\\\\u1AA7\\\\u1B05-\\\\u1B33\\\\u1B45-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\\\\u3007\\\\u3021-\\\\u3029\\\\u3031-\\\\u3035\\\\u3038-\\\\u303C\\\\u3041-\\\\u3096\\\\u309D-\\\\u309F\\\\u30A1-\\\\u30FA\\\\u30FC-\\\\u30FF\\\\u3105-\\\\u312D\\\\u3131-\\\\u318E\\\\u31A0-\\\\u31BA\\\\u31F0-\\\\u31FF\\\\u3400-\\\\u4DB5\\\\u4E00-\\\\u9FCC\\\\uA000-\\\\uA48C\\\\uA4D0-\\\\uA4FD\\\\uA500-\\\\uA60C\\\\uA610-\\\\uA61F\\\\uA62A\\\\uA62B\\\\uA640-\\\\uA66E\\\\uA67F-\\\\uA69D\\\\uA6A0-\\\\uA6EF\\\\uA717-\\\\uA71F\\\\uA722-\\\\uA788\\\\uA78B-\\\\uA78E\\\\uA790-\\\\uA7AD\\\\uA7B0\\\\uA7B1\\\\uA7F7-\\\\uA801\\\\uA803-\\\\uA805\\\\uA807-\\\\uA80A\\\\uA80C-\\\\uA822\\\\uA840-\\\\uA873\\\\uA882-\\\\uA8B3\\\\uA8F2-\\\\uA8F7\\\\uA8FB\\\\uA90A-\\\\uA925\\\\uA930-\\\\uA946\\\\uA960-\\\\uA97C\\\\uA984-\\\\uA9B2\\\\uA9CF\\\\uA9E0-\\\\uA9E4\\\\uA9E6-\\\\uA9EF\\\\uA9FA-\\\\uA9FE\\\\uAA00-\\\\uAA28\\\\uAA40-\\\\uAA42\\\\uAA44-\\\\uAA4B\\\\uAA60-\\\\uAA76\\\\uAA7A\\\\uAA7E-\\\\uAAAF\\\\uAAB1\\\\uAAB5\\\\uAAB6\\\\uAAB9-\\\\uAABD\\\\uAAC0\\\\uAAC2\\\\uAADB-\\\\uAADD\\\\uAAE0-\\\\uAAEA\\\\uAAF2-\\\\uAAF4\\\\uAB01-\\\\uAB06\\\\uAB09-\\\\uAB0E\\\\uAB11-\\\\uAB16\\\\uAB20-\\\\uAB26\\\\uAB28-\\\\uAB2E\\\\uAB30-\\\\uAB5A\\\\uAB5C-\\\\uAB5F\\\\uAB64\\\\uAB65\\\\uABC0-\\\\uABE2\\\\uAC00-\\\\uD7A3\\\\uD7B0-\\\\uD7C6\\\\uD7CB-\\\\uD7FB\\\\uF900-\\\\uFA6D\\\\uFA70-\\\\uFAD9\\\\uFB00-\\\\uFB06\\\\uFB13-\\\\uFB17\\\\uFB1D\\\\uFB1F-\\\\uFB28\\\\uFB2A-\\\\uFB36\\\\uFB38-\\\\uFB3C\\\\uFB3E\\\\uFB40\\\\uFB41\\\\uFB43\\\\uFB44\\\\uFB46-\\\\uFBB1\\\\uFBD3-\\\\uFD3D\\\\uFD50-\\\\uFD8F\\\\uFD92-\\\\uFDC7\\\\uFDF0-\\\\uFDFB\\\\uFE70-\\\\uFE74\\\\uFE76-\\\\uFEFC\\\\uFF21-\\\\uFF3A\\\\uFF41-\\\\uFF5A\\\\uFF66-\\\\uFFBE\\\\uFFC2-\\\\uFFC7\\\\uFFCA-\\\\uFFCF\\\\uFFD2-\\\\uFFD7\\\\uFFDA-\\\\uFFDC]'),\n // eslint-disable-next-line no-misleading-character-class\nRegexNonAsciiIdentifierPart = new RegExp('[\\\\xAA\\\\xB5\\\\xBA\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\u02C1\\\\u02C6-\\\\u02D1\\\\u02E0-\\\\u02E4\\\\u02EC\\\\u02EE\\\\u0300-\\\\u0374\\\\u0376\\\\u0377\\\\u037A-\\\\u037D\\\\u037F\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03F5\\\\u03F7-\\\\u0481\\\\u0483-\\\\u0487\\\\u048A-\\\\u052F\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u0591-\\\\u05BD\\\\u05BF\\\\u05C1\\\\u05C2\\\\u05C4\\\\u05C5\\\\u05C7\\\\u05D0-\\\\u05EA\\\\u05F0-\\\\u05F2\\\\u0610-\\\\u061A\\\\u0620-\\\\u0669\\\\u066E-\\\\u06D3\\\\u06D5-\\\\u06DC\\\\u06DF-\\\\u06E8\\\\u06EA-\\\\u06FC\\\\u06FF\\\\u0710-\\\\u074A\\\\u074D-\\\\u07B1\\\\u07C0-\\\\u07F5\\\\u07FA\\\\u0800-\\\\u082D\\\\u0840-\\\\u085B\\\\u08A0-\\\\u08B2\\\\u08E4-\\\\u0963\\\\u0966-\\\\u096F\\\\u0971-\\\\u0983\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\\\u09BC-\\\\u09C4\\\\u09C7\\\\u09C8\\\\u09CB-\\\\u09CE\\\\u09D7\\\\u09DC\\\\u09DD\\\\u09DF-\\\\u09E3\\\\u09E6-\\\\u09F1\\\\u0A01-\\\\u0A03\\\\u0A05-\\\\u0A0A\\\\u0A0F\\\\u0A10\\\\u0A13-\\\\u0A28\\\\u0A2A-\\\\u0A30\\\\u0A32\\\\u0A33\\\\u0A35\\\\u0A36\\\\u0A38\\\\u0A39\\\\u0A3C\\\\u0A3E-\\\\u0A42\\\\u0A47\\\\u0A48\\\\u0A4B-\\\\u0A4D\\\\u0A51\\\\u0A59-\\\\u0A5C\\\\u0A5E\\\\u0A66-\\\\u0A75\\\\u0A81-\\\\u0A83\\\\u0A85-\\\\u0A8D\\\\u0A8F-\\\\u0A91\\\\u0A93-\\\\u0AA8\\\\u0AAA-\\\\u0AB0\\\\u0AB2\\\\u0AB3\\\\u0AB5-\\\\u0AB9\\\\u0ABC-\\\\u0AC5\\\\u0AC7-\\\\u0AC9\\\\u0ACB-\\\\u0ACD\\\\u0AD0\\\\u0AE0-\\\\u0AE3\\\\u0AE6-\\\\u0AEF\\\\u0B01-\\\\u0B03\\\\u0B05-\\\\u0B0C\\\\u0B0F\\\\u0B10\\\\u0B13-\\\\u0B28\\\\u0B2A-\\\\u0B30\\\\u0B32\\\\u0B33\\\\u0B35-\\\\u0B39\\\\u0B3C-\\\\u0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\\\u13A0-\\\\u13F4\\\\u1401-\\\\u166C\\\\u166F-\\\\u167F\\\\u1681-\\\\u169A\\\\u16A0-\\\\u16EA\\\\u16EE-\\\\u16F8\\\\u1700-\\\\u170C\\\\u170E-\\\\u1714\\\\u1720-\\\\u1734\\\\u1740-\\\\u1753\\\\u1760-\\\\u176C\\\\u176E-\\\\u1770\\\\u1772\\\\u1773\\\\u1780-\\\\u17D3\\\\u17D7\\\\u17DC\\\\u17DD\\\\u17E0-\\\\u17E9\\\\u180B-\\\\u180D\\\\u1810-\\\\u1819\\\\u1820-\\\\u1877\\\\u1880-\\\\u18AA\\\\u18B0-\\\\u18F5\\\\u1900-\\\\u191E\\\\u1920-\\\\u192B\\\\u1930-\\\\u193B\\\\u1946-\\\\u196D\\\\u1970-\\\\u1974\\\\u1980-\\\\u19AB\\\\u19B0-\\\\u19C9\\\\u19D0-\\\\u19D9\\\\u1A00-\\\\u1A1B\\\\u1A20-\\\\u1A5E\\\\u1A60-\\\\u1A7C\\\\u1A7F-\\\\u1A89\\\\u1A90-\\\\u1A99\\\\u1AA7\\\\u1AB0-\\\\u1ABD\\\\u1B00-\\\\u1B4B\\\\u1B50-\\\\u1B59\\\\u1B6B-\\\\u1B73\\\\u1B80-\\\\u1BF3\\\\u1C00-\\\\u1C37\\\\u1C40-\\\\u1C49\\\\u1C4D-\\\\u1C7D\\\\u1CD0-\\\\u1CD2\\\\u1CD4-\\\\u1CF6\\\\u1CF8\\\\u1CF9\\\\u1D00-\\\\u1DF5\\\\u1DFC-\\\\u1F15\\\\u1F18-\\\\u1F1D\\\\u1F20-\\\\u1F45\\\\u1F48-\\\\u1F4D\\\\u1F50-\\\\u1F57\\\\u1F59\\\\u1F5B\\\\u1F5D\\\\u1F5F-\\\\u1F7D\\\\u1F80-\\\\u1FB4\\\\u1FB6-\\\\u1FBC\\\\u1FBE\\\\u1FC2-\\\\u1FC4\\\\u1FC6-\\\\u1FCC\\\\u1FD0-\\\\u1FD3\\\\u1FD6-\\\\u1FDB\\\\u1FE0-\\\\u1FEC\\\\u1FF2-\\\\u1FF4\\\\u1FF6-\\\\u1FFC\\\\u200C\\\\u200D\\\\u203F\\\\u2040\\\\u2054\\\\u2071\\\\u207F\\\\u2090-\\\\u209C\\\\u20D0-\\\\u20DC\\\\u20E1\\\\u20E5-\\\\u20F0\\\\u2102\\\\u2107\\\\u210A-\\\\u2113\\\\u2115\\\\u2119-\\\\u211D\\\\u2124\\\\u2126\\\\u2128\\\\u212A-\\\\u212D\\\\u212F-\\\\u2139\\\\u213C-\\\\u213F\\\\u2145-\\\\u2149\\\\u214E\\\\u2160-\\\\u2188\\\\u2C00-\\\\u2C2E\\\\u2C30-\\\\u2C5E\\\\u2C60-\\\\u2CE4\\\\u2CEB-\\\\u2CF3\\\\u2D00-\\\\u2D25\\\\u2D27\\\\u2D2D\\\\u2D30-\\\\u2D67\\\\u2D6F\\\\u2D7F-\\\\u2D96\\\\u2DA0-\\\\u2DA6\\\\u2DA8-\\\\u2DAE\\\\u2DB0-\\\\u2DB6\\\\u2DB8-\\\\u2DBE\\\\u2DC0-\\\\u2DC6\\\\u2DC8-\\\\u2DCE\\\\u2DD0-\\\\u2DD6\\\\u2DD8-\\\\u2DDE\\\\u2DE0-\\\\u2DFF\\\\u2E2F\\\\u3005-\\\\u3007\\\\u3021-\\\\u302F\\\\u3031-\\\\u3035\\\\u3038-\\\\u303C\\\\u3041-\\\\u3096\\\\u3099\\\\u309A\\\\u309D-\\\\u309F\\\\u30A1-\\\\u30FA\\\\u30FC-\\\\u30FF\\\\u3105-\\\\u312D\\\\u3131-\\\\u318E\\\\u31A0-\\\\u31BA\\\\u31F0-\\\\u31FF\\\\u3400-\\\\u4DB5\\\\u4E00-\\\\u9FCC\\\\uA000-\\\\uA48C\\\\uA4D0-\\\\uA4FD\\\\uA500-\\\\uA60C\\\\uA610-\\\\uA62B\\\\uA640-\\\\uA66F\\\\uA674-\\\\uA67D\\\\uA67F-\\\\uA69D\\\\uA69F-\\\\uA6F1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\\uFEFC\\\\uFF10-\\\\uFF19\\\\uFF21-\\\\uFF3A\\\\uFF3F\\\\uFF41-\\\\uFF5A\\\\uFF66-\\\\uFFBE\\\\uFFC2-\\\\uFFC7\\\\uFFCA-\\\\uFFCF\\\\uFFD2-\\\\uFFD7\\\\uFFDA-\\\\uFFDC]'); // Ensure the condition is true, otherwise throw an error.\n// This is only to have a better contract semantic, i.e. another safety net\n// to catch a logic error. The condition shall be fulfilled in normal case.\n// Do NOT use this to enforce a certain condition on any user input.\n\nfunction assert(condition, message) {\n /* istanbul ignore next */\n if (!condition) {\n throw new Error('ASSERT: ' + message);\n }\n}\n\nfunction isDecimalDigit(ch) {\n return ch >= 0x30 && ch <= 0x39; // 0..9\n}\n\nfunction isHexDigit(ch) {\n return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;\n}\n\nfunction isOctalDigit(ch) {\n return '01234567'.indexOf(ch) >= 0;\n} // 7.2 White Space\n\n\nfunction isWhiteSpace(ch) {\n return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0;\n} // 7.3 Line Terminators\n\n\nfunction isLineTerminator(ch) {\n return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;\n} // 7.6 Identifier Names and Identifiers\n\n\nfunction isIdentifierStart(ch) {\n return ch === 0x24 || ch === 0x5F || ch >= 0x41 && ch <= 0x5A || ch >= 0x61 && ch <= 0x7A || ch === 0x5C || ch >= 0x80 && RegexNonAsciiIdentifierStart.test(String.fromCharCode(ch));\n}\n\nfunction isIdentifierPart(ch) {\n return ch === 0x24 || ch === 0x5F || ch >= 0x41 && ch <= 0x5A || ch >= 0x61 && ch <= 0x7A || ch >= 0x30 && ch <= 0x39 || ch === 0x5C || ch >= 0x80 && RegexNonAsciiIdentifierPart.test(String.fromCharCode(ch));\n} // 7.6.1.1 Keywords\n\n\nconst keywords = {\n 'if': 1,\n 'in': 1,\n 'do': 1,\n 'var': 1,\n 'for': 1,\n 'new': 1,\n 'try': 1,\n 'let': 1,\n 'this': 1,\n 'else': 1,\n 'case': 1,\n 'void': 1,\n 'with': 1,\n 'enum': 1,\n 'while': 1,\n 'break': 1,\n 'catch': 1,\n 'throw': 1,\n 'const': 1,\n 'yield': 1,\n 'class': 1,\n 'super': 1,\n 'return': 1,\n 'typeof': 1,\n 'delete': 1,\n 'switch': 1,\n 'export': 1,\n 'import': 1,\n 'public': 1,\n 'static': 1,\n 'default': 1,\n 'finally': 1,\n 'extends': 1,\n 'package': 1,\n 'private': 1,\n 'function': 1,\n 'continue': 1,\n 'debugger': 1,\n 'interface': 1,\n 'protected': 1,\n 'instanceof': 1,\n 'implements': 1\n};\n\nfunction skipComment() {\n while (index < length) {\n const ch = source.charCodeAt(index);\n\n if (isWhiteSpace(ch) || isLineTerminator(ch)) {\n ++index;\n } else {\n break;\n }\n }\n}\n\nfunction scanHexEscape(prefix) {\n var i,\n len,\n ch,\n code = 0;\n len = prefix === 'u' ? 4 : 2;\n\n for (i = 0; i < len; ++i) {\n if (index < length && isHexDigit(source[index])) {\n ch = source[index++];\n code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());\n } else {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n }\n\n return String.fromCharCode(code);\n}\n\nfunction scanUnicodeCodePointEscape() {\n var ch, code, cu1, cu2;\n ch = source[index];\n code = 0; // At least, one hex digit is required.\n\n if (ch === '}') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n while (index < length) {\n ch = source[index++];\n\n if (!isHexDigit(ch)) {\n break;\n }\n\n code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());\n }\n\n if (code > 0x10FFFF || ch !== '}') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n } // UTF-16 Encoding\n\n\n if (code <= 0xFFFF) {\n return String.fromCharCode(code);\n }\n\n cu1 = (code - 0x10000 >> 10) + 0xD800;\n cu2 = (code - 0x10000 & 1023) + 0xDC00;\n return String.fromCharCode(cu1, cu2);\n}\n\nfunction getEscapedIdentifier() {\n var ch, id;\n ch = source.charCodeAt(index++);\n id = String.fromCharCode(ch); // '\\u' (U+005C, U+0075) denotes an escaped character.\n\n if (ch === 0x5C) {\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n ++index;\n ch = scanHexEscape('u');\n\n if (!ch || ch === '\\\\' || !isIdentifierStart(ch.charCodeAt(0))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n id = ch;\n }\n\n while (index < length) {\n ch = source.charCodeAt(index);\n\n if (!isIdentifierPart(ch)) {\n break;\n }\n\n ++index;\n id += String.fromCharCode(ch); // '\\u' (U+005C, U+0075) denotes an escaped character.\n\n if (ch === 0x5C) {\n id = id.substr(0, id.length - 1);\n\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n ++index;\n ch = scanHexEscape('u');\n\n if (!ch || ch === '\\\\' || !isIdentifierPart(ch.charCodeAt(0))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n id += ch;\n }\n }\n\n return id;\n}\n\nfunction getIdentifier() {\n var start, ch;\n start = index++;\n\n while (index < length) {\n ch = source.charCodeAt(index);\n\n if (ch === 0x5C) {\n // Blackslash (U+005C) marks Unicode escape sequence.\n index = start;\n return getEscapedIdentifier();\n }\n\n if (isIdentifierPart(ch)) {\n ++index;\n } else {\n break;\n }\n }\n\n return source.slice(start, index);\n}\n\nfunction scanIdentifier() {\n var start, id, type;\n start = index; // Backslash (U+005C) starts an escaped character.\n\n id = source.charCodeAt(index) === 0x5C ? getEscapedIdentifier() : getIdentifier(); // There is no keyword or literal with only one character.\n // Thus, it must be an identifier.\n\n if (id.length === 1) {\n type = TokenIdentifier;\n } else if (keywords.hasOwnProperty(id)) {\n // eslint-disable-line no-prototype-builtins\n type = TokenKeyword;\n } else if (id === 'null') {\n type = TokenNullLiteral;\n } else if (id === 'true' || id === 'false') {\n type = TokenBooleanLiteral;\n } else {\n type = TokenIdentifier;\n }\n\n return {\n type: type,\n value: id,\n start: start,\n end: index\n };\n} // 7.7 Punctuators\n\n\nfunction scanPunctuator() {\n var start = index,\n code = source.charCodeAt(index),\n code2,\n ch1 = source[index],\n ch2,\n ch3,\n ch4;\n\n switch (code) {\n // Check for most common single-character punctuators.\n case 0x2E: // . dot\n\n case 0x28: // ( open bracket\n\n case 0x29: // ) close bracket\n\n case 0x3B: // ; semicolon\n\n case 0x2C: // , comma\n\n case 0x7B: // { open curly brace\n\n case 0x7D: // } close curly brace\n\n case 0x5B: // [\n\n case 0x5D: // ]\n\n case 0x3A: // :\n\n case 0x3F: // ?\n\n case 0x7E:\n // ~\n ++index;\n return {\n type: TokenPunctuator,\n value: String.fromCharCode(code),\n start: start,\n end: index\n };\n\n default:\n code2 = source.charCodeAt(index + 1); // '=' (U+003D) marks an assignment or comparison operator.\n\n if (code2 === 0x3D) {\n switch (code) {\n case 0x2B: // +\n\n case 0x2D: // -\n\n case 0x2F: // /\n\n case 0x3C: // <\n\n case 0x3E: // >\n\n case 0x5E: // ^\n\n case 0x7C: // |\n\n case 0x25: // %\n\n case 0x26: // &\n\n case 0x2A:\n // *\n index += 2;\n return {\n type: TokenPunctuator,\n value: String.fromCharCode(code) + String.fromCharCode(code2),\n start: start,\n end: index\n };\n\n case 0x21: // !\n\n case 0x3D:\n // =\n index += 2; // !== and ===\n\n if (source.charCodeAt(index) === 0x3D) {\n ++index;\n }\n\n return {\n type: TokenPunctuator,\n value: source.slice(start, index),\n start: start,\n end: index\n };\n }\n }\n\n } // 4-character punctuator: >>>=\n\n\n ch4 = source.substr(index, 4);\n\n if (ch4 === '>>>=') {\n index += 4;\n return {\n type: TokenPunctuator,\n value: ch4,\n start: start,\n end: index\n };\n } // 3-character punctuators: === !== >>> <<= >>=\n\n\n ch3 = ch4.substr(0, 3);\n\n if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') {\n index += 3;\n return {\n type: TokenPunctuator,\n value: ch3,\n start: start,\n end: index\n };\n } // Other 2-character punctuators: ++ -- << >> && ||\n\n\n ch2 = ch3.substr(0, 2);\n\n if (ch1 === ch2[1] && '+-<>&|'.indexOf(ch1) >= 0 || ch2 === '=>') {\n index += 2;\n return {\n type: TokenPunctuator,\n value: ch2,\n start: start,\n end: index\n };\n }\n\n if (ch2 === '//') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n } // 1-character punctuators: < > = ! + - * % & | ^ /\n\n\n if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {\n ++index;\n return {\n type: TokenPunctuator,\n value: ch1,\n start: start,\n end: index\n };\n }\n\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n} // 7.8.3 Numeric Literals\n\n\nfunction scanHexLiteral(start) {\n let number = '';\n\n while (index < length) {\n if (!isHexDigit(source[index])) {\n break;\n }\n\n number += source[index++];\n }\n\n if (number.length === 0) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenNumericLiteral,\n value: parseInt('0x' + number, 16),\n start: start,\n end: index\n };\n}\n\nfunction scanOctalLiteral(start) {\n let number = '0' + source[index++];\n\n while (index < length) {\n if (!isOctalDigit(source[index])) {\n break;\n }\n\n number += source[index++];\n }\n\n if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenNumericLiteral,\n value: parseInt(number, 8),\n octal: true,\n start: start,\n end: index\n };\n}\n\nfunction scanNumericLiteral() {\n var number, start, ch;\n ch = source[index];\n assert(isDecimalDigit(ch.charCodeAt(0)) || ch === '.', 'Numeric literal must start with a decimal digit or a decimal point');\n start = index;\n number = '';\n\n if (ch !== '.') {\n number = source[index++];\n ch = source[index]; // Hex number starts with '0x'.\n // Octal number starts with '0'.\n\n if (number === '0') {\n if (ch === 'x' || ch === 'X') {\n ++index;\n return scanHexLiteral(start);\n }\n\n if (isOctalDigit(ch)) {\n return scanOctalLiteral(start);\n } // decimal number starts with '0' such as '09' is illegal.\n\n\n if (ch && isDecimalDigit(ch.charCodeAt(0))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n }\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n\n ch = source[index];\n }\n\n if (ch === '.') {\n number += source[index++];\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n\n ch = source[index];\n }\n\n if (ch === 'e' || ch === 'E') {\n number += source[index++];\n ch = source[index];\n\n if (ch === '+' || ch === '-') {\n number += source[index++];\n }\n\n if (isDecimalDigit(source.charCodeAt(index))) {\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n } else {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenNumericLiteral,\n value: parseFloat(number),\n start: start,\n end: index\n };\n} // 7.8.4 String Literals\n\n\nfunction scanStringLiteral() {\n var str = '',\n quote,\n start,\n ch,\n code,\n octal = false;\n quote = source[index];\n assert(quote === '\\'' || quote === '\"', 'String literal must starts with a quote');\n start = index;\n ++index;\n\n while (index < length) {\n ch = source[index++];\n\n if (ch === quote) {\n quote = '';\n break;\n } else if (ch === '\\\\') {\n ch = source[index++];\n\n if (!ch || !isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n str += scanUnicodeCodePointEscape();\n } else {\n str += scanHexEscape(ch);\n }\n\n break;\n\n case 'n':\n str += '\\n';\n break;\n\n case 'r':\n str += '\\r';\n break;\n\n case 't':\n str += '\\t';\n break;\n\n case 'b':\n str += '\\b';\n break;\n\n case 'f':\n str += '\\f';\n break;\n\n case 'v':\n str += '\\x0B';\n break;\n\n default:\n if (isOctalDigit(ch)) {\n code = '01234567'.indexOf(ch); // \\0 is not octal escape sequence\n\n if (code !== 0) {\n octal = true;\n }\n\n if (index < length && isOctalDigit(source[index])) {\n octal = true;\n code = code * 8 + '01234567'.indexOf(source[index++]); // 3 digits are only allowed when string starts\n // with 0, 1, 2, 3\n\n if ('0123'.indexOf(ch) >= 0 && index < length && isOctalDigit(source[index])) {\n code = code * 8 + '01234567'.indexOf(source[index++]);\n }\n }\n\n str += String.fromCharCode(code);\n } else {\n str += ch;\n }\n\n break;\n }\n } else {\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n break;\n } else {\n str += ch;\n }\n }\n\n if (quote !== '') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenStringLiteral,\n value: str,\n octal: octal,\n start: start,\n end: index\n };\n}\n\nfunction testRegExp(pattern, flags) {\n let tmp = pattern;\n\n if (flags.indexOf('u') >= 0) {\n // Replace each astral symbol and every Unicode code point\n // escape sequence with a single ASCII symbol to avoid throwing on\n // regular expressions that are only valid in combination with the\n // `/u` flag.\n // Note: replacing with the ASCII symbol `x` might cause false\n // negatives in unlikely scenarios. For example, `[\\u{61}-b]` is a\n // perfectly valid pattern that is equivalent to `[a-b]`, but it\n // would be replaced by `[x-b]` which throws an error.\n tmp = tmp.replace(/\\\\u\\{([0-9a-fA-F]+)\\}/g, ($0, $1) => {\n if (parseInt($1, 16) <= 0x10FFFF) {\n return 'x';\n }\n\n throwError({}, MessageInvalidRegExp);\n }).replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, 'x');\n } // First, detect invalid regular expressions.\n\n\n try {\n new RegExp(tmp);\n } catch (e) {\n throwError({}, MessageInvalidRegExp);\n } // Return a regular expression object for this pattern-flag pair, or\n // `null` in case the current environment doesn't support the flags it\n // uses.\n\n\n try {\n return new RegExp(pattern, flags);\n } catch (exception) {\n return null;\n }\n}\n\nfunction scanRegExpBody() {\n var ch, str, classMarker, terminated, body;\n ch = source[index];\n assert(ch === '/', 'Regular expression literal must start with a slash');\n str = source[index++];\n classMarker = false;\n terminated = false;\n\n while (index < length) {\n ch = source[index++];\n str += ch;\n\n if (ch === '\\\\') {\n ch = source[index++]; // ECMA-262 7.8.5\n\n if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, MessageUnterminatedRegExp);\n }\n\n str += ch;\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, MessageUnterminatedRegExp);\n } else if (classMarker) {\n if (ch === ']') {\n classMarker = false;\n }\n } else {\n if (ch === '/') {\n terminated = true;\n break;\n } else if (ch === '[') {\n classMarker = true;\n }\n }\n }\n\n if (!terminated) {\n throwError({}, MessageUnterminatedRegExp);\n } // Exclude leading and trailing slash.\n\n\n body = str.substr(1, str.length - 2);\n return {\n value: body,\n literal: str\n };\n}\n\nfunction scanRegExpFlags() {\n var ch, str, flags;\n str = '';\n flags = '';\n\n while (index < length) {\n ch = source[index];\n\n if (!isIdentifierPart(ch.charCodeAt(0))) {\n break;\n }\n\n ++index;\n\n if (ch === '\\\\' && index < length) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n } else {\n flags += ch;\n str += ch;\n }\n }\n\n if (flags.search(/[^gimuy]/g) >= 0) {\n throwError({}, MessageInvalidRegExp, flags);\n }\n\n return {\n value: flags,\n literal: str\n };\n}\n\nfunction scanRegExp() {\n var start, body, flags, value;\n lookahead = null;\n skipComment();\n start = index;\n body = scanRegExpBody();\n flags = scanRegExpFlags();\n value = testRegExp(body.value, flags.value);\n return {\n literal: body.literal + flags.literal,\n value: value,\n regex: {\n pattern: body.value,\n flags: flags.value\n },\n start: start,\n end: index\n };\n}\n\nfunction isIdentifierName(token) {\n return token.type === TokenIdentifier || token.type === TokenKeyword || token.type === TokenBooleanLiteral || token.type === TokenNullLiteral;\n}\n\nfunction advance() {\n skipComment();\n\n if (index >= length) {\n return {\n type: TokenEOF,\n start: index,\n end: index\n };\n }\n\n const ch = source.charCodeAt(index);\n\n if (isIdentifierStart(ch)) {\n return scanIdentifier();\n } // Very common: ( and ) and ;\n\n\n if (ch === 0x28 || ch === 0x29 || ch === 0x3B) {\n return scanPunctuator();\n } // String literal starts with single quote (U+0027) or double quote (U+0022).\n\n\n if (ch === 0x27 || ch === 0x22) {\n return scanStringLiteral();\n } // Dot (.) U+002E can also start a floating-point number, hence the need\n // to check the next character.\n\n\n if (ch === 0x2E) {\n if (isDecimalDigit(source.charCodeAt(index + 1))) {\n return scanNumericLiteral();\n }\n\n return scanPunctuator();\n }\n\n if (isDecimalDigit(ch)) {\n return scanNumericLiteral();\n }\n\n return scanPunctuator();\n}\n\nfunction lex() {\n const token = lookahead;\n index = token.end;\n lookahead = advance();\n index = token.end;\n return token;\n}\n\nfunction peek() {\n const pos = index;\n lookahead = advance();\n index = pos;\n}\n\nfunction finishArrayExpression(elements) {\n const node = new ASTNode(SyntaxArrayExpression);\n node.elements = elements;\n return node;\n}\n\nfunction finishBinaryExpression(operator, left, right) {\n const node = new ASTNode(operator === '||' || operator === '&&' ? SyntaxLogicalExpression : SyntaxBinaryExpression);\n node.operator = operator;\n node.left = left;\n node.right = right;\n return node;\n}\n\nfunction finishCallExpression(callee, args) {\n const node = new ASTNode(SyntaxCallExpression);\n node.callee = callee;\n node.arguments = args;\n return node;\n}\n\nfunction finishConditionalExpression(test, consequent, alternate) {\n const node = new ASTNode(SyntaxConditionalExpression);\n node.test = test;\n node.consequent = consequent;\n node.alternate = alternate;\n return node;\n}\n\nfunction finishIdentifier(name) {\n const node = new ASTNode(SyntaxIdentifier);\n node.name = name;\n return node;\n}\n\nfunction finishLiteral(token) {\n const node = new ASTNode(SyntaxLiteral);\n node.value = token.value;\n node.raw = source.slice(token.start, token.end);\n\n if (token.regex) {\n if (node.raw === '//') {\n node.raw = '/(?:)/';\n }\n\n node.regex = token.regex;\n }\n\n return node;\n}\n\nfunction finishMemberExpression(accessor, object, property) {\n const node = new ASTNode(SyntaxMemberExpression);\n node.computed = accessor === '[';\n node.object = object;\n node.property = property;\n if (!node.computed) property.member = true;\n return node;\n}\n\nfunction finishObjectExpression(properties) {\n const node = new ASTNode(SyntaxObjectExpression);\n node.properties = properties;\n return node;\n}\n\nfunction finishProperty(kind, key, value) {\n const node = new ASTNode(SyntaxProperty);\n node.key = key;\n node.value = value;\n node.kind = kind;\n return node;\n}\n\nfunction finishUnaryExpression(operator, argument) {\n const node = new ASTNode(SyntaxUnaryExpression);\n node.operator = operator;\n node.argument = argument;\n node.prefix = true;\n return node;\n} // Throw an exception\n\n\nfunction throwError(token, messageFormat) {\n var error,\n args = Array.prototype.slice.call(arguments, 2),\n msg = messageFormat.replace(/%(\\d)/g, (whole, index) => {\n assert(index < args.length, 'Message reference must be in range');\n return args[index];\n });\n error = new Error(msg);\n error.index = index;\n error.description = msg;\n throw error;\n} // Throw an exception because of the token.\n\n\nfunction throwUnexpected(token) {\n if (token.type === TokenEOF) {\n throwError(token, MessageUnexpectedEOS);\n }\n\n if (token.type === TokenNumericLiteral) {\n throwError(token, MessageUnexpectedNumber);\n }\n\n if (token.type === TokenStringLiteral) {\n throwError(token, MessageUnexpectedString);\n }\n\n if (token.type === TokenIdentifier) {\n throwError(token, MessageUnexpectedIdentifier);\n }\n\n if (token.type === TokenKeyword) {\n throwError(token, MessageUnexpectedReserved);\n } // BooleanLiteral, NullLiteral, or Punctuator.\n\n\n throwError(token, MessageUnexpectedToken, token.value);\n} // Expect the next token to match the specified punctuator.\n// If not, an exception will be thrown.\n\n\nfunction expect(value) {\n const token = lex();\n\n if (token.type !== TokenPunctuator || token.value !== value) {\n throwUnexpected(token);\n }\n} // Return true if the next token matches the specified punctuator.\n\n\nfunction match(value) {\n return lookahead.type === TokenPunctuator && lookahead.value === value;\n} // Return true if the next token matches the specified keyword\n\n\nfunction matchKeyword(keyword) {\n return lookahead.type === TokenKeyword && lookahead.value === keyword;\n} // 11.1.4 Array Initialiser\n\n\nfunction parseArrayInitialiser() {\n const elements = [];\n index = lookahead.start;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n elements.push(parseConditionalExpression());\n\n if (!match(']')) {\n expect(',');\n }\n }\n }\n\n lex();\n return finishArrayExpression(elements);\n} // 11.1.5 Object Initialiser\n\n\nfunction parseObjectPropertyKey() {\n index = lookahead.start;\n const token = lex(); // Note: This function is called only from parseObjectProperty(), where\n // EOF and Punctuator tokens are already filtered out.\n\n if (token.type === TokenStringLiteral || token.type === TokenNumericLiteral) {\n if (token.octal) {\n throwError(token, MessageStrictOctalLiteral);\n }\n\n return finishLiteral(token);\n }\n\n return finishIdentifier(token.value);\n}\n\nfunction parseObjectProperty() {\n var token, key, id, value;\n index = lookahead.start;\n token = lookahead;\n\n if (token.type === TokenIdentifier) {\n id = parseObjectPropertyKey();\n expect(':');\n value = parseConditionalExpression();\n return finishProperty('init', id, value);\n }\n\n if (token.type === TokenEOF || token.type === TokenPunctuator) {\n throwUnexpected(token);\n } else {\n key = parseObjectPropertyKey();\n expect(':');\n value = parseConditionalExpression();\n return finishProperty('init', key, value);\n }\n}\n\nfunction parseObjectInitialiser() {\n var properties = [],\n property,\n name,\n key,\n map = {},\n toString = String;\n index = lookahead.start;\n expect('{');\n\n while (!match('}')) {\n property = parseObjectProperty();\n\n if (property.key.type === SyntaxIdentifier) {\n name = property.key.name;\n } else {\n name = toString(property.key.value);\n }\n\n key = '$' + name;\n\n if (Object.prototype.hasOwnProperty.call(map, key)) {\n throwError({}, MessageStrictDuplicateProperty);\n } else {\n map[key] = true;\n }\n\n properties.push(property);\n\n if (!match('}')) {\n expect(',');\n }\n }\n\n expect('}');\n return finishObjectExpression(properties);\n} // 11.1.6 The Grouping Operator\n\n\nfunction parseGroupExpression() {\n expect('(');\n const expr = parseExpression();\n expect(')');\n return expr;\n} // 11.1 Primary Expressions\n\n\nconst legalKeywords = {\n 'if': 1\n};\n\nfunction parsePrimaryExpression() {\n var type, token, expr;\n\n if (match('(')) {\n return parseGroupExpression();\n }\n\n if (match('[')) {\n return parseArrayInitialiser();\n }\n\n if (match('{')) {\n return parseObjectInitialiser();\n }\n\n type = lookahead.type;\n index = lookahead.start;\n\n if (type === TokenIdentifier || legalKeywords[lookahead.value]) {\n expr = finishIdentifier(lex().value);\n } else if (type === TokenStringLiteral || type === TokenNumericLiteral) {\n if (lookahead.octal) {\n throwError(lookahead, MessageStrictOctalLiteral);\n }\n\n expr = finishLiteral(lex());\n } else if (type === TokenKeyword) {\n throw new Error(DISABLED);\n } else if (type === TokenBooleanLiteral) {\n token = lex();\n token.value = token.value === 'true';\n expr = finishLiteral(token);\n } else if (type === TokenNullLiteral) {\n token = lex();\n token.value = null;\n expr = finishLiteral(token);\n } else if (match('/') || match('/=')) {\n expr = finishLiteral(scanRegExp());\n peek();\n } else {\n throwUnexpected(lex());\n }\n\n return expr;\n} // 11.2 Left-Hand-Side Expressions\n\n\nfunction parseArguments() {\n const args = [];\n expect('(');\n\n if (!match(')')) {\n while (index < length) {\n args.push(parseConditionalExpression());\n\n if (match(')')) {\n break;\n }\n\n expect(',');\n }\n }\n\n expect(')');\n return args;\n}\n\nfunction parseNonComputedProperty() {\n index = lookahead.start;\n const token = lex();\n\n if (!isIdentifierName(token)) {\n throwUnexpected(token);\n }\n\n return finishIdentifier(token.value);\n}\n\nfunction parseNonComputedMember() {\n expect('.');\n return parseNonComputedProperty();\n}\n\nfunction parseComputedMember() {\n expect('[');\n const expr = parseExpression();\n expect(']');\n return expr;\n}\n\nfunction parseLeftHandSideExpressionAllowCall() {\n var expr, args, property;\n expr = parsePrimaryExpression();\n\n for (;;) {\n if (match('.')) {\n property = parseNonComputedMember();\n expr = finishMemberExpression('.', expr, property);\n } else if (match('(')) {\n args = parseArguments();\n expr = finishCallExpression(expr, args);\n } else if (match('[')) {\n property = parseComputedMember();\n expr = finishMemberExpression('[', expr, property);\n } else {\n break;\n }\n }\n\n return expr;\n} // 11.3 Postfix Expressions\n\n\nfunction parsePostfixExpression() {\n const expr = parseLeftHandSideExpressionAllowCall();\n\n if (lookahead.type === TokenPunctuator) {\n if (match('++') || match('--')) {\n throw new Error(DISABLED);\n }\n }\n\n return expr;\n} // 11.4 Unary Operators\n\n\nfunction parseUnaryExpression() {\n var token, expr;\n\n if (lookahead.type !== TokenPunctuator && lookahead.type !== TokenKeyword) {\n expr = parsePostfixExpression();\n } else if (match('++') || match('--')) {\n throw new Error(DISABLED);\n } else if (match('+') || match('-') || match('~') || match('!')) {\n token = lex();\n expr = parseUnaryExpression();\n expr = finishUnaryExpression(token.value, expr);\n } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {\n throw new Error(DISABLED);\n } else {\n expr = parsePostfixExpression();\n }\n\n return expr;\n}\n\nfunction binaryPrecedence(token) {\n let prec = 0;\n\n if (token.type !== TokenPunctuator && token.type !== TokenKeyword) {\n return 0;\n }\n\n switch (token.value) {\n case '||':\n prec = 1;\n break;\n\n case '&&':\n prec = 2;\n break;\n\n case '|':\n prec = 3;\n break;\n\n case '^':\n prec = 4;\n break;\n\n case '&':\n prec = 5;\n break;\n\n case '==':\n case '!=':\n case '===':\n case '!==':\n prec = 6;\n break;\n\n case '<':\n case '>':\n case '<=':\n case '>=':\n case 'instanceof':\n case 'in':\n prec = 7;\n break;\n\n case '<<':\n case '>>':\n case '>>>':\n prec = 8;\n break;\n\n case '+':\n case '-':\n prec = 9;\n break;\n\n case '*':\n case '/':\n case '%':\n prec = 11;\n break;\n }\n\n return prec;\n} // 11.5 Multiplicative Operators\n// 11.6 Additive Operators\n// 11.7 Bitwise Shift Operators\n// 11.8 Relational Operators\n// 11.9 Equality Operators\n// 11.10 Binary Bitwise Operators\n// 11.11 Binary Logical Operators\n\n\nfunction parseBinaryExpression() {\n var marker, markers, expr, token, prec, stack, right, operator, left, i;\n marker = lookahead;\n left = parseUnaryExpression();\n token = lookahead;\n prec = binaryPrecedence(token);\n\n if (prec === 0) {\n return left;\n }\n\n token.prec = prec;\n lex();\n markers = [marker, lookahead];\n right = parseUnaryExpression();\n stack = [left, token, right];\n\n while ((prec = binaryPrecedence(lookahead)) > 0) {\n // Reduce: make a binary expression from the three topmost entries.\n while (stack.length > 2 && prec <= stack[stack.length - 2].prec) {\n right = stack.pop();\n operator = stack.pop().value;\n left = stack.pop();\n markers.pop();\n expr = finishBinaryExpression(operator, left, right);\n stack.push(expr);\n } // Shift.\n\n\n token = lex();\n token.prec = prec;\n stack.push(token);\n markers.push(lookahead);\n expr = parseUnaryExpression();\n stack.push(expr);\n } // Final reduce to clean-up the stack.\n\n\n i = stack.length - 1;\n expr = stack[i];\n markers.pop();\n\n while (i > 1) {\n markers.pop();\n expr = finishBinaryExpression(stack[i - 1].value, stack[i - 2], expr);\n i -= 2;\n }\n\n return expr;\n} // 11.12 Conditional Operator\n\n\nfunction parseConditionalExpression() {\n var expr, consequent, alternate;\n expr = parseBinaryExpression();\n\n if (match('?')) {\n lex();\n consequent = parseConditionalExpression();\n expect(':');\n alternate = parseConditionalExpression();\n expr = finishConditionalExpression(expr, consequent, alternate);\n }\n\n return expr;\n} // 11.14 Comma Operator\n\n\nfunction parseExpression() {\n const expr = parseConditionalExpression();\n\n if (match(',')) {\n throw new Error(DISABLED); // no sequence expressions\n }\n\n return expr;\n}\n\nfunction parser (code) {\n source = code;\n index = 0;\n length = source.length;\n lookahead = null;\n peek();\n const expr = parseExpression();\n\n if (lookahead.type !== TokenEOF) {\n throw new Error('Unexpect token after expression.');\n }\n\n return expr;\n}\n\nvar Constants = {\n NaN: 'NaN',\n E: 'Math.E',\n LN2: 'Math.LN2',\n LN10: 'Math.LN10',\n LOG2E: 'Math.LOG2E',\n LOG10E: 'Math.LOG10E',\n PI: 'Math.PI',\n SQRT1_2: 'Math.SQRT1_2',\n SQRT2: 'Math.SQRT2',\n MIN_VALUE: 'Number.MIN_VALUE',\n MAX_VALUE: 'Number.MAX_VALUE'\n};\n\nfunction Functions (codegen) {\n function fncall(name, args, cast, type) {\n let obj = codegen(args[0]);\n\n if (cast) {\n obj = cast + '(' + obj + ')';\n if (cast.lastIndexOf('new ', 0) === 0) obj = '(' + obj + ')';\n }\n\n return obj + '.' + name + (type < 0 ? '' : type === 0 ? '()' : '(' + args.slice(1).map(codegen).join(',') + ')');\n }\n\n function fn(name, cast, type) {\n return args => fncall(name, args, cast, type);\n }\n\n const DATE = 'new Date',\n STRING = 'String',\n REGEXP = 'RegExp';\n return {\n // MATH functions\n isNaN: 'Number.isNaN',\n isFinite: 'Number.isFinite',\n abs: 'Math.abs',\n acos: 'Math.acos',\n asin: 'Math.asin',\n atan: 'Math.atan',\n atan2: 'Math.atan2',\n ceil: 'Math.ceil',\n cos: 'Math.cos',\n exp: 'Math.exp',\n floor: 'Math.floor',\n log: 'Math.log',\n max: 'Math.max',\n min: 'Math.min',\n pow: 'Math.pow',\n random: 'Math.random',\n round: 'Math.round',\n sin: 'Math.sin',\n sqrt: 'Math.sqrt',\n tan: 'Math.tan',\n clamp: function (args) {\n if (args.length < 3) error('Missing arguments to clamp function.');\n if (args.length > 3) error('Too many arguments to clamp function.');\n const a = args.map(codegen);\n return 'Math.max(' + a[1] + ', Math.min(' + a[2] + ',' + a[0] + '))';\n },\n // DATE functions\n now: 'Date.now',\n utc: 'Date.UTC',\n datetime: DATE,\n date: fn('getDate', DATE, 0),\n day: fn('getDay', DATE, 0),\n year: fn('getFullYear', DATE, 0),\n month: fn('getMonth', DATE, 0),\n hours: fn('getHours', DATE, 0),\n minutes: fn('getMinutes', DATE, 0),\n seconds: fn('getSeconds', DATE, 0),\n milliseconds: fn('getMilliseconds', DATE, 0),\n time: fn('getTime', DATE, 0),\n timezoneoffset: fn('getTimezoneOffset', DATE, 0),\n utcdate: fn('getUTCDate', DATE, 0),\n utcday: fn('getUTCDay', DATE, 0),\n utcyear: fn('getUTCFullYear', DATE, 0),\n utcmonth: fn('getUTCMonth', DATE, 0),\n utchours: fn('getUTCHours', DATE, 0),\n utcminutes: fn('getUTCMinutes', DATE, 0),\n utcseconds: fn('getUTCSeconds', DATE, 0),\n utcmilliseconds: fn('getUTCMilliseconds', DATE, 0),\n // sequence functions\n length: fn('length', null, -1),\n // STRING functions\n parseFloat: 'parseFloat',\n parseInt: 'parseInt',\n upper: fn('toUpperCase', STRING, 0),\n lower: fn('toLowerCase', STRING, 0),\n substring: fn('substring', STRING),\n split: fn('split', STRING),\n trim: fn('trim', STRING, 0),\n // REGEXP functions\n regexp: REGEXP,\n test: fn('test', REGEXP),\n // Control Flow functions\n if: function (args) {\n if (args.length < 3) error('Missing arguments to if function.');\n if (args.length > 3) error('Too many arguments to if function.');\n const a = args.map(codegen);\n return '(' + a[0] + '?' + a[1] + ':' + a[2] + ')';\n }\n };\n}\n\nfunction stripQuotes(s) {\n const n = s && s.length - 1;\n return n && (s[0] === '\"' && s[n] === '\"' || s[0] === '\\'' && s[n] === '\\'') ? s.slice(1, -1) : s;\n}\n\nfunction codegen (opt) {\n opt = opt || {};\n const allowed = opt.allowed ? toSet(opt.allowed) : {},\n forbidden = opt.forbidden ? toSet(opt.forbidden) : {},\n constants = opt.constants || Constants,\n functions = (opt.functions || Functions)(visit),\n globalvar = opt.globalvar,\n fieldvar = opt.fieldvar,\n outputGlobal = isFunction(globalvar) ? globalvar : id => `${globalvar}[\"${id}\"]`;\n let globals = {},\n fields = {},\n memberDepth = 0;\n\n function visit(ast) {\n if (isString(ast)) return ast;\n const generator = Generators[ast.type];\n if (generator == null) error('Unsupported type: ' + ast.type);\n return generator(ast);\n }\n\n const Generators = {\n Literal: n => n.raw,\n Identifier: n => {\n const id = n.name;\n\n if (memberDepth > 0) {\n return id;\n } else if (hasOwnProperty(forbidden, id)) {\n return error('Illegal identifier: ' + id);\n } else if (hasOwnProperty(constants, id)) {\n return constants[id];\n } else if (hasOwnProperty(allowed, id)) {\n return id;\n } else {\n globals[id] = 1;\n return outputGlobal(id);\n }\n },\n MemberExpression: n => {\n const d = !n.computed,\n o = visit(n.object);\n if (d) memberDepth += 1;\n const p = visit(n.property);\n\n if (o === fieldvar) {\n // strip quotes to sanitize field name (#1653)\n fields[stripQuotes(p)] = 1;\n }\n\n if (d) memberDepth -= 1;\n return o + (d ? '.' + p : '[' + p + ']');\n },\n CallExpression: n => {\n if (n.callee.type !== 'Identifier') {\n error('Illegal callee type: ' + n.callee.type);\n }\n\n const callee = n.callee.name,\n args = n.arguments,\n fn = hasOwnProperty(functions, callee) && functions[callee];\n if (!fn) error('Unrecognized function: ' + callee);\n return isFunction(fn) ? fn(args) : fn + '(' + args.map(visit).join(',') + ')';\n },\n ArrayExpression: n => '[' + n.elements.map(visit).join(',') + ']',\n BinaryExpression: n => '(' + visit(n.left) + ' ' + n.operator + ' ' + visit(n.right) + ')',\n UnaryExpression: n => '(' + n.operator + visit(n.argument) + ')',\n ConditionalExpression: n => '(' + visit(n.test) + '?' + visit(n.consequent) + ':' + visit(n.alternate) + ')',\n LogicalExpression: n => '(' + visit(n.left) + n.operator + visit(n.right) + ')',\n ObjectExpression: n => '{' + n.properties.map(visit).join(',') + '}',\n Property: n => {\n memberDepth += 1;\n const k = visit(n.key);\n memberDepth -= 1;\n return k + ':' + visit(n.value);\n }\n };\n\n function codegen(ast) {\n const result = {\n code: visit(ast),\n globals: Object.keys(globals),\n fields: Object.keys(fields)\n };\n globals = {};\n fields = {};\n return result;\n }\n\n codegen.functions = functions;\n codegen.constants = constants;\n return codegen;\n}\n\nexport { ASTNode, ArrayExpression, BinaryExpression, CallExpression, ConditionalExpression, Identifier, Literal, LogicalExpression, MemberExpression, ObjectExpression, Property, RawCode, UnaryExpression, codegen as codegenExpression, Constants as constants, Functions as functions, parser as parseExpression };\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport function fsum(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n\nexport function fcumsum(values, valueof) {\n const adder = new Adder();\n let index = -1;\n return Float64Array.from(values, valueof === undefined\n ? v => adder.add(+v || 0)\n : v => adder.add(+valueof(v, ++index, values) || 0)\n );\n}\n","export var epsilon = 1e-6;\nexport var epsilon2 = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var quarterPi = pi / 4;\nexport var tau = pi * 2;\n\nexport var degrees = 180 / pi;\nexport var radians = pi / 180;\n\nexport var abs = Math.abs;\nexport var atan = Math.atan;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var ceil = Math.ceil;\nexport var exp = Math.exp;\nexport var floor = Math.floor;\nexport var hypot = Math.hypot;\nexport var log = Math.log;\nexport var pow = Math.pow;\nexport var sin = Math.sin;\nexport var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };\nexport var sqrt = Math.sqrt;\nexport var tan = Math.tan;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);\n}\n\nexport function haversin(x) {\n return (x = sin(x / 2)) * x;\n}\n","export default function noop() {}\n","function streamGeometry(geometry, stream) {\n if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {\n streamGeometryType[geometry.type](geometry, stream);\n }\n}\n\nvar streamObjectType = {\n Feature: function(object, stream) {\n streamGeometry(object.geometry, stream);\n },\n FeatureCollection: function(object, stream) {\n var features = object.features, i = -1, n = features.length;\n while (++i < n) streamGeometry(features[i].geometry, stream);\n }\n};\n\nvar streamGeometryType = {\n Sphere: function(object, stream) {\n stream.sphere();\n },\n Point: function(object, stream) {\n object = object.coordinates;\n stream.point(object[0], object[1], object[2]);\n },\n MultiPoint: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);\n },\n LineString: function(object, stream) {\n streamLine(object.coordinates, stream, 0);\n },\n MultiLineString: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamLine(coordinates[i], stream, 0);\n },\n Polygon: function(object, stream) {\n streamPolygon(object.coordinates, stream);\n },\n MultiPolygon: function(object, stream) {\n var coordinates = object.coordinates, i = -1, n = coordinates.length;\n while (++i < n) streamPolygon(coordinates[i], stream);\n },\n GeometryCollection: function(object, stream) {\n var geometries = object.geometries, i = -1, n = geometries.length;\n while (++i < n) streamGeometry(geometries[i], stream);\n }\n};\n\nfunction streamLine(coordinates, stream, closed) {\n var i = -1, n = coordinates.length - closed, coordinate;\n stream.lineStart();\n while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);\n stream.lineEnd();\n}\n\nfunction streamPolygon(coordinates, stream) {\n var i = -1, n = coordinates.length;\n stream.polygonStart();\n while (++i < n) streamLine(coordinates[i], stream, 1);\n stream.polygonEnd();\n}\n\nexport default function(object, stream) {\n if (object && streamObjectType.hasOwnProperty(object.type)) {\n streamObjectType[object.type](object, stream);\n } else {\n streamGeometry(object, stream);\n }\n}\n","import {Adder} from \"d3-array\";\nimport {atan2, cos, quarterPi, radians, sin, tau} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nexport var areaRingSum = new Adder();\n\n// hello?\n\nvar areaSum = new Adder(),\n lambda00,\n phi00,\n lambda0,\n cosPhi0,\n sinPhi0;\n\nexport var areaStream = {\n point: noop,\n lineStart: noop,\n lineEnd: noop,\n polygonStart: function() {\n areaRingSum = new Adder();\n areaStream.lineStart = areaRingStart;\n areaStream.lineEnd = areaRingEnd;\n },\n polygonEnd: function() {\n var areaRing = +areaRingSum;\n areaSum.add(areaRing < 0 ? tau + areaRing : areaRing);\n this.lineStart = this.lineEnd = this.point = noop;\n },\n sphere: function() {\n areaSum.add(tau);\n }\n};\n\nfunction areaRingStart() {\n areaStream.point = areaPointFirst;\n}\n\nfunction areaRingEnd() {\n areaPoint(lambda00, phi00);\n}\n\nfunction areaPointFirst(lambda, phi) {\n areaStream.point = areaPoint;\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi);\n}\n\nfunction areaPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n phi = phi / 2 + quarterPi; // half the angular distance from south pole\n\n // Spherical excess E for a spherical triangle with vertices: south pole,\n // previous point, current point. Uses a formula derived from Cagnoli’s\n // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).\n var dLambda = lambda - lambda0,\n sdLambda = dLambda >= 0 ? 1 : -1,\n adLambda = sdLambda * dLambda,\n cosPhi = cos(phi),\n sinPhi = sin(phi),\n k = sinPhi0 * sinPhi,\n u = cosPhi0 * cosPhi + k * cos(adLambda),\n v = k * sdLambda * sin(adLambda);\n areaRingSum.add(atan2(v, u));\n\n // Advance the previous points.\n lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;\n}\n\nexport default function(object) {\n areaSum = new Adder();\n stream(object, areaStream);\n return areaSum * 2;\n}\n","import {Adder} from \"d3-array\";\nimport {areaStream, areaRingSum} from \"./area.js\";\nimport {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from \"./cartesian.js\";\nimport {abs, degrees, epsilon, radians} from \"./math.js\";\nimport stream from \"./stream.js\";\n\nvar lambda0, phi0, lambda1, phi1, // bounds\n lambda2, // previous lambda-coordinate\n lambda00, phi00, // first point\n p0, // previous 3D point\n deltaSum,\n ranges,\n range;\n\nvar boundsStream = {\n point: boundsPoint,\n lineStart: boundsLineStart,\n lineEnd: boundsLineEnd,\n polygonStart: function() {\n boundsStream.point = boundsRingPoint;\n boundsStream.lineStart = boundsRingStart;\n boundsStream.lineEnd = boundsRingEnd;\n deltaSum = new Adder();\n areaStream.polygonStart();\n },\n polygonEnd: function() {\n areaStream.polygonEnd();\n boundsStream.point = boundsPoint;\n boundsStream.lineStart = boundsLineStart;\n boundsStream.lineEnd = boundsLineEnd;\n if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n else if (deltaSum > epsilon) phi1 = 90;\n else if (deltaSum < -epsilon) phi0 = -90;\n range[0] = lambda0, range[1] = lambda1;\n },\n sphere: function() {\n lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);\n }\n};\n\nfunction boundsPoint(lambda, phi) {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n}\n\nfunction linePoint(lambda, phi) {\n var p = cartesian([lambda * radians, phi * radians]);\n if (p0) {\n var normal = cartesianCross(p0, p),\n equatorial = [normal[1], -normal[0], 0],\n inflection = cartesianCross(equatorial, normal);\n cartesianNormalizeInPlace(inflection);\n inflection = spherical(inflection);\n var delta = lambda - lambda2,\n sign = delta > 0 ? 1 : -1,\n lambdai = inflection[0] * degrees * sign,\n phii,\n antimeridian = abs(delta) > 180;\n if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = inflection[1] * degrees;\n if (phii > phi1) phi1 = phii;\n } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {\n phii = -inflection[1] * degrees;\n if (phii < phi0) phi0 = phii;\n } else {\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n }\n if (antimeridian) {\n if (lambda < lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n } else {\n if (lambda1 >= lambda0) {\n if (lambda < lambda0) lambda0 = lambda;\n if (lambda > lambda1) lambda1 = lambda;\n } else {\n if (lambda > lambda2) {\n if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;\n } else {\n if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;\n }\n }\n }\n } else {\n ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);\n }\n if (phi < phi0) phi0 = phi;\n if (phi > phi1) phi1 = phi;\n p0 = p, lambda2 = lambda;\n}\n\nfunction boundsLineStart() {\n boundsStream.point = linePoint;\n}\n\nfunction boundsLineEnd() {\n range[0] = lambda0, range[1] = lambda1;\n boundsStream.point = boundsPoint;\n p0 = null;\n}\n\nfunction boundsRingPoint(lambda, phi) {\n if (p0) {\n var delta = lambda - lambda2;\n deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);\n } else {\n lambda00 = lambda, phi00 = phi;\n }\n areaStream.point(lambda, phi);\n linePoint(lambda, phi);\n}\n\nfunction boundsRingStart() {\n areaStream.lineStart();\n}\n\nfunction boundsRingEnd() {\n boundsRingPoint(lambda00, phi00);\n areaStream.lineEnd();\n if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180);\n range[0] = lambda0, range[1] = lambda1;\n p0 = null;\n}\n\n// Finds the left-right distance between two longitudes.\n// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want\n// the distance between ±180° to be 360°.\nfunction angle(lambda0, lambda1) {\n return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;\n}\n\nfunction rangeCompare(a, b) {\n return a[0] - b[0];\n}\n\nfunction rangeContains(range, x) {\n return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;\n}\n\nexport default function(feature) {\n var i, n, a, b, merged, deltaMax, delta;\n\n phi1 = lambda1 = -(lambda0 = phi0 = Infinity);\n ranges = [];\n stream(feature, boundsStream);\n\n // First, sort ranges by their minimum longitudes.\n if (n = ranges.length) {\n ranges.sort(rangeCompare);\n\n // Then, merge any ranges that overlap.\n for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {\n b = ranges[i];\n if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {\n if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];\n if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];\n } else {\n merged.push(a = b);\n }\n }\n\n // Finally, find the largest gap between the merged ranges.\n // The final bounding box will be the inverse of this gap.\n for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {\n b = merged[i];\n if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];\n }\n }\n\n ranges = range = null;\n\n return lambda0 === Infinity || phi0 === Infinity\n ? [[NaN, NaN], [NaN, NaN]]\n : [[lambda0, phi0], [lambda1, phi1]];\n}\n","import {asin, atan2, cos, sin, sqrt} from \"./math.js\";\n\nexport function spherical(cartesian) {\n return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])];\n}\n\nexport function cartesian(spherical) {\n var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi);\n return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)];\n}\n\nexport function cartesianDot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n}\n\nexport function cartesianCross(a, b) {\n return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\n}\n\n// TODO return a\nexport function cartesianAddInPlace(a, b) {\n a[0] += b[0], a[1] += b[1], a[2] += b[2];\n}\n\nexport function cartesianScale(vector, k) {\n return [vector[0] * k, vector[1] * k, vector[2] * k];\n}\n\n// TODO return d\nexport function cartesianNormalizeInPlace(d) {\n var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);\n d[0] /= l, d[1] /= l, d[2] /= l;\n}\n","import {Adder} from \"d3-array\";\nimport {asin, atan2, cos, degrees, epsilon, epsilon2, hypot, radians, sin, sqrt} from \"./math.js\";\nimport noop from \"./noop.js\";\nimport stream from \"./stream.js\";\n\nvar W0, W1,\n X0, Y0, Z0,\n X1, Y1, Z1,\n X2, Y2, Z2,\n lambda00, phi00, // first point\n x0, y0, z0; // previous point\n\nvar centroidStream = {\n sphere: noop,\n point: centroidPoint,\n lineStart: centroidLineStart,\n lineEnd: centroidLineEnd,\n polygonStart: function() {\n centroidStream.lineStart = centroidRingStart;\n centroidStream.lineEnd = centroidRingEnd;\n },\n polygonEnd: function() {\n centroidStream.lineStart = centroidLineStart;\n centroidStream.lineEnd = centroidLineEnd;\n }\n};\n\n// Arithmetic mean of Cartesian vectors.\nfunction centroidPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi));\n}\n\nfunction centroidPointCartesian(x, y, z) {\n ++W0;\n X0 += (x - X0) / W0;\n Y0 += (y - Y0) / W0;\n Z0 += (z - Z0) / W0;\n}\n\nfunction centroidLineStart() {\n centroidStream.point = centroidLinePointFirst;\n}\n\nfunction centroidLinePointFirst(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidStream.point = centroidLinePoint;\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLinePoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidLineEnd() {\n centroidStream.point = centroidPoint;\n}\n\n// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,\n// J. Applied Mechanics 42, 239 (1975).\nfunction centroidRingStart() {\n centroidStream.point = centroidRingPointFirst;\n}\n\nfunction centroidRingEnd() {\n centroidRingPoint(lambda00, phi00);\n centroidStream.point = centroidPoint;\n}\n\nfunction centroidRingPointFirst(lambda, phi) {\n lambda00 = lambda, phi00 = phi;\n lambda *= radians, phi *= radians;\n centroidStream.point = centroidRingPoint;\n var cosPhi = cos(phi);\n x0 = cosPhi * cos(lambda);\n y0 = cosPhi * sin(lambda);\n z0 = sin(phi);\n centroidPointCartesian(x0, y0, z0);\n}\n\nfunction centroidRingPoint(lambda, phi) {\n lambda *= radians, phi *= radians;\n var cosPhi = cos(phi),\n x = cosPhi * cos(lambda),\n y = cosPhi * sin(lambda),\n z = sin(phi),\n cx = y0 * z - z0 * y,\n cy = z0 * x - x0 * z,\n cz = x0 * y - y0 * x,\n m = hypot(cx, cy, cz),\n w = asin(m), // line weight = angle\n v = m && -w / m; // area weight multiplier\n X2.add(v * cx);\n Y2.add(v * cy);\n Z2.add(v * cz);\n W1 += w;\n X1 += w * (x0 + (x0 = x));\n Y1 += w * (y0 + (y0 = y));\n Z1 += w * (z0 + (z0 = z));\n centroidPointCartesian(x0, y0, z0);\n}\n\nexport default function(object) {\n W0 = W1 =\n X0 = Y0 = Z0 =\n X1 = Y1 = Z1 = 0;\n X2 = new Adder();\n Y2 = new Adder();\n Z2 = new Adder();\n stream(object, centroidStream);\n\n var x = +X2,\n y = +Y2,\n z = +Z2,\n m = hypot(x, y, z);\n\n // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.\n if (m < epsilon2) {\n x = X1, y = Y1, z = Z1;\n // If the feature has zero length, fall back to arithmetic mean of point vectors.\n if (W1 < epsilon) x = X0, y = Y0, z = Z0;\n m = hypot(x, y, z);\n // If the feature still has an undefined ccentroid, then return.\n if (m < epsilon2) return [NaN, NaN];\n }\n\n return [atan2(y, x) * degrees, asin(z / m) * degrees];\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?\\\\d*\\\\.?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(\"^rgb\\\\(\" + [reI, reI, reI] + \"\\\\)$\"),\n reRgbPercent = new RegExp(\"^rgb\\\\(\" + [reP, reP, reP] + \"\\\\)$\"),\n reRgbaInteger = new RegExp(\"^rgba\\\\(\" + [reI, reI, reI, reN] + \"\\\\)$\"),\n reRgbaPercent = new RegExp(\"^rgba\\\\(\" + [reP, reP, reP, reN] + \"\\\\)$\"),\n reHslPercent = new RegExp(\"^hsl\\\\(\" + [reN, reP, reP] + \"\\\\)$\"),\n reHslaPercent = new RegExp(\"^hsla\\\\(\" + [reN, reP, reP, reN] + \"\\\\)$\");\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy: function(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable: function() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb: function() {\n return this;\n },\n displayable: function() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return \"#\" + hex(this.r) + hex(this.g) + hex(this.b);\n}\n\nfunction rgb_formatRgb() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"rgb(\" : \"rgba(\")\n + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + \", \"\n + Math.max(0, Math.min(255, Math.round(this.b) || 0))\n + (a === 1 ? \")\" : \", \" + a + \")\");\n}\n\nfunction hex(value) {\n value = Math.max(0, Math.min(255, Math.round(value) || 0));\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter: function(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker: function(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb: function() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n displayable: function() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl: function() {\n var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));\n return (a === 1 ? \"hsl(\" : \"hsla(\")\n + (this.h || 0) + \", \"\n + (this.s || 0) * 100 + \"%, \"\n + (this.l || 0) * 100 + \"%\"\n + (a === 1 ? \")\" : \", \" + a + \")\");\n }\n}));\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export const radians = Math.PI / 180;\nexport const degrees = 180 / Math.PI;\n","import define, {extend} from \"./define.js\";\nimport {Color, rgbConvert, Rgb} from \"./color.js\";\nimport {degrees, radians} from \"./math.js\";\n\n// https://observablehq.com/@mbostock/lab-and-rgb\nconst K = 18,\n Xn = 0.96422,\n Yn = 1,\n Zn = 0.82521,\n t0 = 4 / 29,\n t1 = 6 / 29,\n t2 = 3 * t1 * t1,\n t3 = t1 * t1 * t1;\n\nfunction labConvert(o) {\n if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);\n if (o instanceof Hcl) return hcl2lab(o);\n if (!(o instanceof Rgb)) o = rgbConvert(o);\n var r = rgb2lrgb(o.r),\n g = rgb2lrgb(o.g),\n b = rgb2lrgb(o.b),\n y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;\n if (r === g && g === b) x = z = y; else {\n x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);\n z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);\n }\n return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);\n}\n\nexport function gray(l, opacity) {\n return new Lab(l, 0, 0, opacity == null ? 1 : opacity);\n}\n\nexport default function lab(l, a, b, opacity) {\n return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);\n}\n\nexport function Lab(l, a, b, opacity) {\n this.l = +l;\n this.a = +a;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Lab, lab, extend(Color, {\n brighter: function(k) {\n return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n darker: function(k) {\n return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);\n },\n rgb: function() {\n var y = (this.l + 16) / 116,\n x = isNaN(this.a) ? y : y + this.a / 500,\n z = isNaN(this.b) ? y : y - this.b / 200;\n x = Xn * lab2xyz(x);\n y = Yn * lab2xyz(y);\n z = Zn * lab2xyz(z);\n return new Rgb(\n lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),\n lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),\n lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),\n this.opacity\n );\n }\n}));\n\nfunction xyz2lab(t) {\n return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;\n}\n\nfunction lab2xyz(t) {\n return t > t1 ? t * t * t : t2 * (t - t0);\n}\n\nfunction lrgb2rgb(x) {\n return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);\n}\n\nfunction rgb2lrgb(x) {\n return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);\n}\n\nfunction hclConvert(o) {\n if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);\n if (!(o instanceof Lab)) o = labConvert(o);\n if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);\n var h = Math.atan2(o.b, o.a) * degrees;\n return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);\n}\n\nexport function lch(l, c, h, opacity) {\n return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function hcl(h, c, l, opacity) {\n return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);\n}\n\nexport function Hcl(h, c, l, opacity) {\n this.h = +h;\n this.c = +c;\n this.l = +l;\n this.opacity = +opacity;\n}\n\nfunction hcl2lab(o) {\n if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);\n var h = o.h * radians;\n return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);\n}\n\ndefine(Hcl, hcl, extend(Color, {\n brighter: function(k) {\n return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);\n },\n darker: function(k) {\n return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);\n },\n rgb: function() {\n return hcl2lab(this).rgb();\n }\n}));\n","import { field, isDate, toNumber, isArray, inrange, extend, array, error, peek, hasOwnProperty } from 'vega-util';\nimport { Literal } from 'vega-expression';\n\nfunction ascending (a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n\nfunction bisector (f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n\n while (lo < hi) {\n const mid = lo + hi >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;else hi = mid;\n }\n\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n\n while (lo < hi) {\n const mid = lo + hi >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;else lo = mid + 1;\n }\n\n return lo;\n }\n\n function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {\n left,\n center,\n right\n };\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n\nconst Intersect = 'intersect';\nconst Union = 'union';\nconst VlMulti = 'vlMulti';\nconst VlPoint = 'vlPoint';\nconst Or = 'or';\nconst And = 'and';\n\nconst SELECTION_ID = '_vgsid_',\n TYPE_ENUM = 'E',\n TYPE_RANGE_INC = 'R',\n TYPE_RANGE_EXC = 'R-E',\n TYPE_RANGE_LE = 'R-LE',\n TYPE_RANGE_RE = 'R-RE',\n UNIT_INDEX = 'index:unit'; // TODO: revisit date coercion?\n\nfunction testPoint(datum, entry) {\n var fields = entry.fields,\n values = entry.values,\n n = fields.length,\n i = 0,\n dval,\n f;\n\n for (; i < n; ++i) {\n f = fields[i];\n f.getter = field.getter || field(f.field);\n dval = f.getter(datum);\n if (isDate(dval)) dval = toNumber(dval);\n if (isDate(values[i])) values[i] = toNumber(values[i]);\n if (isDate(values[i][0])) values[i] = values[i].map(toNumber);\n\n if (f.type === TYPE_ENUM) {\n // Enumerated fields can either specify individual values (single/multi selections)\n // or an array of values (interval selections).\n if (isArray(values[i]) ? values[i].indexOf(dval) < 0 : dval !== values[i]) {\n return false;\n }\n } else {\n if (f.type === TYPE_RANGE_INC) {\n if (!inrange(dval, values[i])) return false;\n } else if (f.type === TYPE_RANGE_RE) {\n // Discrete selection of bins test within the range [bin_start, bin_end).\n if (!inrange(dval, values[i], true, false)) return false;\n } else if (f.type === TYPE_RANGE_EXC) {\n // 'R-E'/'R-LE' included for completeness.\n if (!inrange(dval, values[i], false, false)) return false;\n } else if (f.type === TYPE_RANGE_LE) {\n if (!inrange(dval, values[i], false, true)) return false;\n }\n }\n }\n\n return true;\n}\n/**\n * Tests if a tuple is contained within an interactive selection.\n * @param {string} name - The name of the data set representing the selection.\n * Tuples in the dataset are of the form\n * {unit: string, fields: array<fielddef>, values: array<*>}.\n * Fielddef is of the form\n * {field: string, channel: string, type: 'E' | 'R'} where\n * 'type' identifies whether tuples in the dataset enumerate\n * values for the field, or specify a continuous range.\n * @param {object} datum - The tuple to test for inclusion.\n * @param {string} op - The set operation for combining selections.\n * One of 'intersect' or 'union' (default).\n * @return {boolean} - True if the datum is in the selection, false otherwise.\n */\n\n\nfunction selectionTest(name, datum, op) {\n var data = this.context.data[name],\n entries = data ? data.values.value : [],\n unitIdx = data ? data[UNIT_INDEX] && data[UNIT_INDEX].value : undefined,\n intersect = op === Intersect,\n n = entries.length,\n i = 0,\n entry,\n miss,\n count,\n unit,\n b;\n\n for (; i < n; ++i) {\n entry = entries[i];\n\n if (unitIdx && intersect) {\n // multi selections union within the same unit and intersect across units.\n miss = miss || {};\n count = miss[unit = entry.unit] || 0; // if we've already matched this unit, skip.\n\n if (count === -1) continue;\n b = testPoint(datum, entry);\n miss[unit] = b ? -1 : ++count; // if we match and there are no other units return true\n // if we've missed against all tuples in this unit return false\n\n if (b && unitIdx.size === 1) return true;\n if (!b && count === unitIdx.get(unit).count) return false;\n } else {\n b = testPoint(datum, entry); // if we find a miss and we do require intersection return false\n // if we find a match and we don't require intersection return true\n\n if (intersect ^ b) return b;\n }\n } // if intersecting and we made it here, then we saw no misses\n // if not intersecting, then we saw no matches\n // if no active selections, return false\n\n\n return n && intersect;\n}\nconst selectionId = field(SELECTION_ID),\n bisect = bisector(selectionId),\n bisectLeft = bisect.left,\n bisectRight = bisect.right;\nfunction selectionIdTest(name, datum, op) {\n const data = this.context.data[name],\n entries = data ? data.values.value : [],\n unitIdx = data ? data[UNIT_INDEX] && data[UNIT_INDEX].value : undefined,\n intersect = op === Intersect,\n value = selectionId(datum),\n index = bisectLeft(entries, value);\n if (index === entries.length) return false;\n if (selectionId(entries[index]) !== value) return false;\n\n if (unitIdx && intersect) {\n if (unitIdx.size === 1) return true;\n if (bisectRight(entries, value) - index < unitIdx.size) return false;\n }\n\n return true;\n}\n\n/**\n * Maps an array of scene graph items to an array of selection tuples.\n * @param {string} name - The name of the dataset representing the selection.\n * @param {string} unit - The name of the unit view.\n *\n * @returns {array} An array of selection entries for the given unit.\n */\n\nfunction selectionTuples(array, base) {\n return array.map(x => extend({\n values: base.fields.map(f => (f.getter || (f.getter = field(f.field)))(x.datum))\n }, base));\n}\n\n/**\n * Resolves selection for use as a scale domain or reads via the API.\n * @param {string} name - The name of the dataset representing the selection\n * @param {string} [op='union'] - The set operation for combining selections.\n * One of 'intersect' or 'union' (default).\n * @param {boolean} isMulti - Identifies a \"multi\" selection to perform more\n * expensive resolution computation.\n * @param {boolean} vl5 - With Vega-Lite v5, \"multi\" selections are now called \"point\"\n * selections, and thus the resolved tuple should reflect this name.\n * This parameter allows us to reflect this change without triggering\n * a major version bump for Vega.\n * @returns {object} An object of selected fields and values.\n */\n\nfunction selectionResolve(name, op, isMulti, vl5) {\n var data = this.context.data[name],\n entries = data ? data.values.value : [],\n resolved = {},\n multiRes = {},\n types = {},\n entry,\n fields,\n values,\n unit,\n field,\n res,\n resUnit,\n type,\n union,\n n = entries.length,\n i = 0,\n j,\n m; // First union all entries within the same unit.\n\n for (; i < n; ++i) {\n entry = entries[i];\n unit = entry.unit;\n fields = entry.fields;\n values = entry.values;\n\n for (j = 0, m = fields.length; j < m; ++j) {\n field = fields[j];\n res = resolved[field.field] || (resolved[field.field] = {});\n resUnit = res[unit] || (res[unit] = []);\n types[field.field] = type = field.type.charAt(0);\n union = ops[type + '_union'];\n res[unit] = union(resUnit, array(values[j]));\n } // If the same multi-selection is repeated over views and projected over\n // an encoding, it may operate over different fields making it especially\n // tricky to reliably resolve it. At best, we can de-dupe identical entries\n // but doing so may be more computationally expensive than it is worth.\n // Instead, for now, we simply transform our store representation into\n // a more human-friendly one.\n\n\n if (isMulti) {\n resUnit = multiRes[unit] || (multiRes[unit] = []);\n resUnit.push(array(values).reduce((obj, curr, j) => (obj[fields[j].field] = curr, obj), {}));\n }\n } // Then resolve fields across units as per the op.\n\n\n op = op || Union;\n Object.keys(resolved).forEach(field => {\n resolved[field] = Object.keys(resolved[field]).map(unit => resolved[field][unit]).reduce((acc, curr) => acc === undefined ? curr : ops[types[field] + '_' + op](acc, curr));\n });\n entries = Object.keys(multiRes);\n\n if (isMulti && entries.length) {\n const key = vl5 ? VlPoint : VlMulti;\n resolved[key] = op === Union ? {\n [Or]: entries.reduce((acc, k) => (acc.push(...multiRes[k]), acc), [])\n } : {\n [And]: entries.map(k => ({\n [Or]: multiRes[k]\n }))\n };\n }\n\n return resolved;\n}\nvar ops = {\n E_union: function (base, value) {\n if (!base.length) return value;\n var i = 0,\n n = value.length;\n\n for (; i < n; ++i) if (base.indexOf(value[i]) < 0) base.push(value[i]);\n\n return base;\n },\n E_intersect: function (base, value) {\n return !base.length ? value : base.filter(v => value.indexOf(v) >= 0);\n },\n R_union: function (base, value) {\n var lo = toNumber(value[0]),\n hi = toNumber(value[1]);\n\n if (lo > hi) {\n lo = value[1];\n hi = value[0];\n }\n\n if (!base.length) return [lo, hi];\n if (base[0] > lo) base[0] = lo;\n if (base[1] < hi) base[1] = hi;\n return base;\n },\n R_intersect: function (base, value) {\n var lo = toNumber(value[0]),\n hi = toNumber(value[1]);\n\n if (lo > hi) {\n lo = value[1];\n hi = value[0];\n }\n\n if (!base.length) return [lo, hi];\n\n if (hi < base[0] || base[1] < lo) {\n return [];\n } else {\n if (base[0] < lo) base[0] = lo;\n if (base[1] > hi) base[1] = hi;\n }\n\n return base;\n }\n};\n\nconst DataPrefix = ':',\n IndexPrefix = '@';\nfunction selectionVisitor(name, args, scope, params) {\n if (args[0].type !== Literal) error('First argument to selection functions must be a string literal.');\n const data = args[0].value,\n op = args.length >= 2 && peek(args).value,\n field = 'unit',\n indexName = IndexPrefix + field,\n dataName = DataPrefix + data; // eslint-disable-next-line no-prototype-builtins\n\n if (op === Intersect && !hasOwnProperty(params, indexName)) {\n params[indexName] = scope.getData(data).indataRef(scope, field);\n } // eslint-disable-next-line no-prototype-builtins\n\n\n if (!hasOwnProperty(params, dataName)) {\n params[dataName] = scope.getData(data).tuplesRef();\n }\n}\n\nexport { selectionIdTest, selectionResolve, selectionTest, selectionTuples, selectionVisitor };\n","import { truthy, error, hasOwnProperty, isFunction, isString, stringValue, extend, isArray, isObject, field, peek, identity, array as array$1, isBoolean, isDate, isNumber, isRegExp, toBoolean, toDate, toNumber, toString, flush, lerp, pad, span, inrange, truncate, quarter, utcquarter, extent, clampRange, panLinear, panLog, panPow, panSymlog, zoomLinear, zoomLog, zoomPow, zoomSymlog } from 'vega-util';\nimport { Literal, codegenExpression, constants, functions, parseExpression, CallExpression } from 'vega-expression';\nimport { geoBounds as geoBounds$1, geoCentroid as geoCentroid$1, geoArea as geoArea$1 } from 'd3-geo';\nimport { rgb, lab, hcl, hsl } from 'd3-color';\nimport { isTuple } from 'vega-dataflow';\nimport { bandSpace, scale as scale$1, scaleFraction } from 'vega-scale';\nimport { Gradient, pathRender, pathParse, Bounds, intersect as intersect$1 } from 'vega-scenegraph';\nimport { selectionVisitor, selectionTest, selectionIdTest, selectionResolve, selectionTuples } from 'vega-selections';\nimport { random, cumulativeNormal, cumulativeLogNormal, cumulativeUniform, densityNormal, densityLogNormal, densityUniform, quantileNormal, quantileLogNormal, quantileUniform, sampleNormal, sampleLogNormal, sampleUniform } from 'vega-statistics';\nimport { utcOffset, utcSequence, timeOffset, timeSequence, timeUnitSpecifier, week, utcweek, dayofyear, utcdayofyear } from 'vega-time';\nimport { range as range$1 } from 'd3-array';\n\nfunction data(name) {\n const data = this.context.data[name];\n return data ? data.values.value : [];\n}\nfunction indata(name, field, value) {\n const index = this.context.data[name]['index:' + field],\n entry = index ? index.value.get(value) : undefined;\n return entry ? entry.count : entry;\n}\nfunction setdata(name, tuples) {\n const df = this.context.dataflow,\n data = this.context.data[name],\n input = data.input;\n df.pulse(input, df.changeset().remove(truthy).insert(tuples));\n return 1;\n}\n\nfunction encode (item, name, retval) {\n if (item) {\n const df = this.context.dataflow,\n target = item.mark.source;\n df.pulse(target, df.changeset().encode(item, name));\n }\n\n return retval !== undefined ? retval : item;\n}\n\nconst wrap = method => function (value, spec) {\n const locale = this.context.dataflow.locale();\n return locale[method](spec)(value);\n};\n\nconst format = wrap('format');\nconst timeFormat = wrap('timeFormat');\nconst utcFormat = wrap('utcFormat');\nconst timeParse = wrap('timeParse');\nconst utcParse = wrap('utcParse');\nconst dateObj = new Date(2000, 0, 1);\n\nfunction time(month, day, specifier) {\n if (!Number.isInteger(month) || !Number.isInteger(day)) return '';\n dateObj.setYear(2000);\n dateObj.setMonth(month);\n dateObj.setDate(day);\n return timeFormat.call(this, dateObj, specifier);\n}\n\nfunction monthFormat(month) {\n return time.call(this, month, 1, '%B');\n}\nfunction monthAbbrevFormat(month) {\n return time.call(this, month, 1, '%b');\n}\nfunction dayFormat(day) {\n return time.call(this, 0, 2 + day, '%A');\n}\nfunction dayAbbrevFormat(day) {\n return time.call(this, 0, 2 + day, '%a');\n}\n\nconst DataPrefix = ':';\nconst IndexPrefix = '@';\nconst ScalePrefix = '%';\nconst SignalPrefix = '$';\n\nfunction dataVisitor(name, args, scope, params) {\n if (args[0].type !== Literal) {\n error('First argument to data functions must be a string literal.');\n }\n\n const data = args[0].value,\n dataName = DataPrefix + data;\n\n if (!hasOwnProperty(dataName, params)) {\n try {\n params[dataName] = scope.getData(data).tuplesRef();\n } catch (err) {// if data set does not exist, there's nothing to track\n }\n }\n}\nfunction indataVisitor(name, args, scope, params) {\n if (args[0].type !== Literal) error('First argument to indata must be a string literal.');\n if (args[1].type !== Literal) error('Second argument to indata must be a string literal.');\n const data = args[0].value,\n field = args[1].value,\n indexName = IndexPrefix + field;\n\n if (!hasOwnProperty(indexName, params)) {\n params[indexName] = scope.getData(data).indataRef(scope, field);\n }\n}\nfunction scaleVisitor(name, args, scope, params) {\n if (args[0].type === Literal) {\n // add scale dependency\n addScaleDependency(scope, params, args[0].value);\n } else {\n // indirect scale lookup; add all scales as parameters\n for (name in scope.scales) {\n addScaleDependency(scope, params, name);\n }\n }\n}\n\nfunction addScaleDependency(scope, params, name) {\n const scaleName = ScalePrefix + name;\n\n if (!hasOwnProperty(params, scaleName)) {\n try {\n params[scaleName] = scope.scaleRef(name);\n } catch (err) {// TODO: error handling? warning?\n }\n }\n}\n\nfunction getScale(name, ctx) {\n let s;\n return isFunction(name) ? name : isString(name) ? (s = ctx.scales[name]) && s.value : undefined;\n}\nfunction internalScaleFunctions(codegen, fnctx, visitors) {\n // add helper method to the 'this' expression function context\n fnctx.__bandwidth = s => s && s.bandwidth ? s.bandwidth() : 0; // register AST visitors for internal scale functions\n\n\n visitors._bandwidth = scaleVisitor;\n visitors._range = scaleVisitor;\n visitors._scale = scaleVisitor; // resolve scale reference directly to the signal hash argument\n\n const ref = arg => '_[' + (arg.type === Literal ? stringValue(ScalePrefix + arg.value) : stringValue(ScalePrefix) + '+' + codegen(arg)) + ']'; // define and return internal scale function code generators\n // these internal functions are called by mark encoders\n\n\n return {\n _bandwidth: args => `this.__bandwidth(${ref(args[0])})`,\n _range: args => `${ref(args[0])}.range()`,\n _scale: args => `${ref(args[0])}(${codegen(args[1])})`\n };\n}\n\nfunction geoMethod(methodName, globalMethod) {\n return function (projection, geojson, group) {\n if (projection) {\n // projection defined, use it\n const p = getScale(projection, (group || this).context);\n return p && p.path[methodName](geojson);\n } else {\n // projection undefined, use global method\n return globalMethod(geojson);\n }\n };\n}\n\nconst geoArea = geoMethod('area', geoArea$1);\nconst geoBounds = geoMethod('bounds', geoBounds$1);\nconst geoCentroid = geoMethod('centroid', geoCentroid$1);\n\nfunction inScope (item) {\n const group = this.context.group;\n let value = false;\n if (group) while (item) {\n if (item === group) {\n value = true;\n break;\n }\n\n item = item.mark.group;\n }\n return value;\n}\n\nfunction log(df, method, args) {\n try {\n df[method].apply(df, ['EXPRESSION'].concat([].slice.call(args)));\n } catch (err) {\n df.warn(err);\n }\n\n return args[args.length - 1];\n}\n\nfunction warn() {\n return log(this.context.dataflow, 'warn', arguments);\n}\nfunction info() {\n return log(this.context.dataflow, 'info', arguments);\n}\nfunction debug() {\n return log(this.context.dataflow, 'debug', arguments);\n}\n\nfunction channel_luminance_value(channelValue) {\n const val = channelValue / 255;\n\n if (val <= 0.03928) {\n return val / 12.92;\n }\n\n return Math.pow((val + 0.055) / 1.055, 2.4);\n}\n\nfunction luminance(color) {\n const c = rgb(color),\n r = channel_luminance_value(c.r),\n g = channel_luminance_value(c.g),\n b = channel_luminance_value(c.b);\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n} // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef\n\nfunction contrast(color1, color2) {\n const lum1 = luminance(color1),\n lum2 = luminance(color2),\n lumL = Math.max(lum1, lum2),\n lumD = Math.min(lum1, lum2);\n return (lumL + 0.05) / (lumD + 0.05);\n}\n\nfunction merge () {\n const args = [].slice.call(arguments);\n args.unshift({});\n return extend(...args);\n}\n\nfunction equal(a, b) {\n return a === b || a !== a && b !== b ? true : isArray(a) ? isArray(b) && a.length === b.length ? equalArray(a, b) : false : isObject(a) && isObject(b) ? equalObject(a, b) : false;\n}\n\nfunction equalArray(a, b) {\n for (let i = 0, n = a.length; i < n; ++i) {\n if (!equal(a[i], b[i])) return false;\n }\n\n return true;\n}\n\nfunction equalObject(a, b) {\n for (const key in a) {\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n}\n\nfunction removePredicate(props) {\n return _ => equalObject(props, _);\n}\n\nfunction modify (name, insert, remove, toggle, modify, values) {\n const df = this.context.dataflow,\n data = this.context.data[name],\n input = data.input,\n stamp = df.stamp();\n let changes = data.changes,\n predicate,\n key;\n\n if (df._trigger === false || !(input.value.length || insert || toggle)) {\n // nothing to do!\n return 0;\n }\n\n if (!changes || changes.stamp < stamp) {\n data.changes = changes = df.changeset();\n changes.stamp = stamp;\n df.runAfter(() => {\n data.modified = true;\n df.pulse(input, changes).run();\n }, true, 1);\n }\n\n if (remove) {\n predicate = remove === true ? truthy : isArray(remove) || isTuple(remove) ? remove : removePredicate(remove);\n changes.remove(predicate);\n }\n\n if (insert) {\n changes.insert(insert);\n }\n\n if (toggle) {\n predicate = removePredicate(toggle);\n\n if (input.value.some(predicate)) {\n changes.remove(predicate);\n } else {\n changes.insert(toggle);\n }\n }\n\n if (modify) {\n for (key in values) {\n changes.modify(modify, key, values[key]);\n }\n }\n\n return 1;\n}\n\nfunction pinchDistance(event) {\n const t = event.touches,\n dx = t[0].clientX - t[1].clientX,\n dy = t[0].clientY - t[1].clientY;\n return Math.sqrt(dx * dx + dy * dy);\n}\nfunction pinchAngle(event) {\n const t = event.touches;\n return Math.atan2(t[0].clientY - t[1].clientY, t[0].clientX - t[1].clientX);\n}\n\nconst accessors = {};\nfunction pluck (data, name) {\n const accessor = accessors[name] || (accessors[name] = field(name));\n return isArray(data) ? data.map(accessor) : accessor(data);\n}\n\nfunction array(seq) {\n return isArray(seq) || ArrayBuffer.isView(seq) ? seq : null;\n}\n\nfunction sequence(seq) {\n return array(seq) || (isString(seq) ? seq : null);\n}\n\nfunction join(seq, ...args) {\n return array(seq).join(...args);\n}\nfunction indexof(seq, ...args) {\n return sequence(seq).indexOf(...args);\n}\nfunction lastindexof(seq, ...args) {\n return sequence(seq).lastIndexOf(...args);\n}\nfunction slice(seq, ...args) {\n return sequence(seq).slice(...args);\n}\nfunction replace(str, pattern, repl) {\n if (isFunction(repl)) error('Function argument passed to replace.');\n return String(str).replace(pattern, repl);\n}\nfunction reverse(seq) {\n return array(seq).slice().reverse();\n}\n\nfunction bandspace(count, paddingInner, paddingOuter) {\n return bandSpace(count || 0, paddingInner || 0, paddingOuter || 0);\n}\nfunction bandwidth(name, group) {\n const s = getScale(name, (group || this).context);\n return s && s.bandwidth ? s.bandwidth() : 0;\n}\nfunction copy(name, group) {\n const s = getScale(name, (group || this).context);\n return s ? s.copy() : undefined;\n}\nfunction domain(name, group) {\n const s = getScale(name, (group || this).context);\n return s ? s.domain() : [];\n}\nfunction invert(name, range, group) {\n const s = getScale(name, (group || this).context);\n return !s ? undefined : isArray(range) ? (s.invertRange || s.invert)(range) : (s.invert || s.invertExtent)(range);\n}\nfunction range(name, group) {\n const s = getScale(name, (group || this).context);\n return s && s.range ? s.range() : [];\n}\nfunction scale(name, value, group) {\n const s = getScale(name, (group || this).context);\n return s ? s(value) : undefined;\n}\n\nfunction scaleGradient (scale, p0, p1, count, group) {\n scale = getScale(scale, (group || this).context);\n const gradient = Gradient(p0, p1);\n let stops = scale.domain(),\n min = stops[0],\n max = peek(stops),\n fraction = identity;\n\n if (!(max - min)) {\n // expand scale if domain has zero span, fix #1479\n scale = (scale.interpolator ? scale$1('sequential')().interpolator(scale.interpolator()) : scale$1('linear')().interpolate(scale.interpolate()).range(scale.range())).domain([min = 0, max = 1]);\n } else {\n fraction = scaleFraction(scale, min, max);\n }\n\n if (scale.ticks) {\n stops = scale.ticks(+count || 15);\n if (min !== stops[0]) stops.unshift(min);\n if (max !== peek(stops)) stops.push(max);\n }\n\n stops.forEach(_ => gradient.stop(fraction(_), scale(_)));\n return gradient;\n}\n\nfunction geoShape(projection, geojson, group) {\n const p = getScale(projection, (group || this).context);\n return function (context) {\n return p ? p.path.context(context)(geojson) : '';\n };\n}\nfunction pathShape(path) {\n let p = null;\n return function (context) {\n return context ? pathRender(context, p = p || pathParse(path)) : path;\n };\n}\n\nconst datum = d => d.data;\n\nfunction treeNodes(name, context) {\n const tree = data.call(context, name);\n return tree.root && tree.root.lookup || {};\n}\n\nfunction treePath(name, source, target) {\n const nodes = treeNodes(name, this),\n s = nodes[source],\n t = nodes[target];\n return s && t ? s.path(t).map(datum) : undefined;\n}\nfunction treeAncestors(name, node) {\n const n = treeNodes(name, this)[node];\n return n ? n.ancestors().map(datum) : undefined;\n}\n\nconst _window = () => typeof window !== 'undefined' && window || null;\n\nfunction screen() {\n const w = _window();\n\n return w ? w.screen : {};\n}\nfunction windowSize() {\n const w = _window();\n\n return w ? [w.innerWidth, w.innerHeight] : [undefined, undefined];\n}\nfunction containerSize() {\n const view = this.context.dataflow,\n el = view.container && view.container();\n return el ? [el.clientWidth, el.clientHeight] : [undefined, undefined];\n}\n\nfunction intersect (b, opt, group) {\n if (!b) return [];\n const [u, v] = b,\n box = new Bounds().set(u[0], u[1], v[0], v[1]),\n scene = group || this.context.dataflow.scenegraph().root;\n return intersect$1(scene, box, filter(opt));\n}\n\nfunction filter(opt) {\n let p = null;\n\n if (opt) {\n const types = array$1(opt.marktype),\n names = array$1(opt.markname);\n\n p = _ => (!types.length || types.some(t => _.marktype === t)) && (!names.length || names.some(s => _.name === s));\n }\n\n return p;\n}\n\nconst functionContext = {\n random() {\n return random();\n },\n\n // override default\n cumulativeNormal,\n cumulativeLogNormal,\n cumulativeUniform,\n densityNormal,\n densityLogNormal,\n densityUniform,\n quantileNormal,\n quantileLogNormal,\n quantileUniform,\n sampleNormal,\n sampleLogNormal,\n sampleUniform,\n isArray,\n isBoolean,\n isDate,\n\n isDefined(_) {\n return _ !== undefined;\n },\n\n isNumber,\n isObject,\n isRegExp,\n isString,\n isTuple,\n\n isValid(_) {\n return _ != null && _ === _;\n },\n\n toBoolean,\n toDate,\n toNumber,\n toString,\n indexof,\n join,\n lastindexof,\n replace,\n reverse,\n slice,\n flush,\n lerp,\n merge,\n pad,\n peek,\n pluck,\n span,\n inrange,\n truncate,\n rgb,\n lab,\n hcl,\n hsl,\n luminance,\n contrast,\n sequence: range$1,\n format,\n utcFormat,\n utcParse,\n utcOffset,\n utcSequence,\n timeFormat,\n timeParse,\n timeOffset,\n timeSequence,\n timeUnitSpecifier,\n monthFormat,\n monthAbbrevFormat,\n dayFormat,\n dayAbbrevFormat,\n quarter,\n utcquarter,\n week,\n utcweek,\n dayofyear,\n utcdayofyear,\n warn,\n info,\n debug,\n extent,\n inScope,\n intersect,\n clampRange,\n pinchDistance,\n pinchAngle,\n screen,\n containerSize,\n windowSize,\n bandspace,\n setdata,\n pathShape,\n panLinear,\n panLog,\n panPow,\n panSymlog,\n zoomLinear,\n zoomLog,\n zoomPow,\n zoomSymlog,\n encode,\n modify\n};\nconst eventFunctions = ['view', 'item', 'group', 'xy', 'x', 'y'],\n // event functions\neventPrefix = 'event.vega.',\n // event function prefix\nthisPrefix = 'this.',\n // function context prefix\nastVisitors = {}; // AST visitors for dependency analysis\n// export code generator parameters\n\nconst codegenParams = {\n forbidden: ['_'],\n allowed: ['datum', 'event', 'item'],\n fieldvar: 'datum',\n globalvar: id => `_[${stringValue(SignalPrefix + id)}]`,\n functions: buildFunctions,\n constants: constants,\n visitors: astVisitors\n}; // export code generator\n\nconst codeGenerator = codegenExpression(codegenParams); // Build expression function registry\n\nfunction buildFunctions(codegen) {\n const fn = functions(codegen);\n eventFunctions.forEach(name => fn[name] = eventPrefix + name);\n\n for (const name in functionContext) {\n fn[name] = thisPrefix + name;\n }\n\n extend(fn, internalScaleFunctions(codegen, functionContext, astVisitors));\n return fn;\n} // Register an expression function\n\n\nfunction expressionFunction(name, fn, visitor) {\n if (arguments.length === 1) {\n return functionContext[name];\n } // register with the functionContext\n\n\n functionContext[name] = fn; // if there is an astVisitor register that, too\n\n if (visitor) astVisitors[name] = visitor; // if the code generator has already been initialized,\n // we need to also register the function with it\n\n if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;\n return this;\n} // register expression functions with ast visitors\n\nexpressionFunction('bandwidth', bandwidth, scaleVisitor);\nexpressionFunction('copy', copy, scaleVisitor);\nexpressionFunction('domain', domain, scaleVisitor);\nexpressionFunction('range', range, scaleVisitor);\nexpressionFunction('invert', invert, scaleVisitor);\nexpressionFunction('scale', scale, scaleVisitor);\nexpressionFunction('gradient', scaleGradient, scaleVisitor);\nexpressionFunction('geoArea', geoArea, scaleVisitor);\nexpressionFunction('geoBounds', geoBounds, scaleVisitor);\nexpressionFunction('geoCentroid', geoCentroid, scaleVisitor);\nexpressionFunction('geoShape', geoShape, scaleVisitor);\nexpressionFunction('indata', indata, indataVisitor);\nexpressionFunction('data', data, dataVisitor);\nexpressionFunction('treePath', treePath, dataVisitor);\nexpressionFunction('treeAncestors', treeAncestors, dataVisitor); // register Vega-Lite selection functions\n\nexpressionFunction('vlSelectionTest', selectionTest, selectionVisitor);\nexpressionFunction('vlSelectionIdTest', selectionIdTest, selectionVisitor);\nexpressionFunction('vlSelectionResolve', selectionResolve, selectionVisitor);\nexpressionFunction('vlSelectionTuples', selectionTuples);\n\nfunction parser (expr, scope) {\n const params = {}; // parse the expression to an abstract syntax tree (ast)\n\n let ast;\n\n try {\n expr = isString(expr) ? expr : stringValue(expr) + '';\n ast = parseExpression(expr);\n } catch (err) {\n error('Expression parse error: ' + expr);\n } // analyze ast function calls for dependencies\n\n\n ast.visit(node => {\n if (node.type !== CallExpression) return;\n const name = node.callee.name,\n visit = codegenParams.visitors[name];\n if (visit) visit(name, node.arguments, scope, params);\n }); // perform code generation\n\n const gen = codeGenerator(ast); // collect signal dependencies\n\n gen.globals.forEach(name => {\n const signalName = SignalPrefix + name;\n\n if (!hasOwnProperty(params, signalName) && scope.getSignal(name)) {\n params[signalName] = scope.signalRef(name);\n }\n }); // return generated expression code and dependencies\n\n return {\n $expr: extend({\n code: gen.code\n }, scope.options.ast ? {\n ast\n } : null),\n $fields: gen.fields,\n $params: params\n };\n}\n\nexport { DataPrefix, IndexPrefix, ScalePrefix, SignalPrefix, bandspace, bandwidth, codeGenerator, codegenParams, containerSize, contrast, copy, data, dataVisitor, dayAbbrevFormat, dayFormat, debug, domain, encode, expressionFunction, format, functionContext, geoArea, geoBounds, geoCentroid, geoShape, inScope, indata, indataVisitor, indexof, info, invert, join, lastindexof, luminance, merge, modify, monthAbbrevFormat, monthFormat, parser as parseExpression, pathShape, pinchAngle, pinchDistance, pluck, range, replace, reverse, scale, scaleGradient, scaleVisitor, screen, setdata, slice, timeFormat, timeParse, treeAncestors, treePath, utcFormat, utcParse, warn, windowSize };\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","import { toSet, stringValue, error, isArray, isObject, hasOwnProperty, accessor, key, field, array, compare, truthy } from 'vega-util';\nimport { tupleid } from 'vega-dataflow';\n\n/**\n * Parse a serialized dataflow specification.\n */\nfunction parse (spec) {\n const ctx = this,\n operators = spec.operators || []; // parse background\n\n if (spec.background) {\n ctx.background = spec.background;\n } // parse event configuration\n\n\n if (spec.eventConfig) {\n ctx.eventConfig = spec.eventConfig;\n } // parse locale configuration\n\n\n if (spec.locale) {\n ctx.locale = spec.locale;\n } // parse operators\n\n\n operators.forEach(entry => ctx.parseOperator(entry)); // parse operator parameters\n\n operators.forEach(entry => ctx.parseOperatorParameters(entry)); // parse streams\n\n (spec.streams || []).forEach(entry => ctx.parseStream(entry)); // parse updates\n\n (spec.updates || []).forEach(entry => ctx.parseUpdate(entry));\n return ctx.resolve();\n}\n\nconst Skip = toSet(['rule']),\n Swap = toSet(['group', 'image', 'rect']);\nfunction adjustSpatial(encode, marktype) {\n let code = '';\n if (Skip[marktype]) return code;\n\n if (encode.x2) {\n if (encode.x) {\n if (Swap[marktype]) {\n code += 'if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;';\n }\n\n code += 'o.width=o.x2-o.x;';\n } else {\n code += 'o.x=o.x2-(o.width||0);';\n }\n }\n\n if (encode.xc) {\n code += 'o.x=o.xc-(o.width||0)/2;';\n }\n\n if (encode.y2) {\n if (encode.y) {\n if (Swap[marktype]) {\n code += 'if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;';\n }\n\n code += 'o.height=o.y2-o.y;';\n } else {\n code += 'o.y=o.y2-(o.height||0);';\n }\n }\n\n if (encode.yc) {\n code += 'o.y=o.yc-(o.height||0)/2;';\n }\n\n return code;\n}\nfunction canonicalType(type) {\n return (type + '').toLowerCase();\n}\nfunction isOperator(type) {\n return canonicalType(type) === 'operator';\n}\nfunction isCollect(type) {\n return canonicalType(type) === 'collect';\n}\n\nfunction expression(ctx, args, code) {\n // wrap code in return statement if expression does not terminate\n if (code[code.length - 1] !== ';') {\n code = 'return(' + code + ');';\n }\n\n const fn = Function(...args.concat(code));\n return ctx && ctx.functions ? fn.bind(ctx.functions) : fn;\n} // generate code for comparing a single field\n\n\nfunction _compare(u, v, lt, gt) {\n return \"((u = \".concat(u, \") < (v = \").concat(v, \") || u == null) && v != null ? \").concat(lt, \"\\n : (u > v || v == null) && u != null ? \").concat(gt, \"\\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? \").concat(lt, \"\\n : v !== v && u === u ? \").concat(gt, \" : \");\n}\n\nvar expressionCodegen = {\n /**\n * Parse an expression used to update an operator value.\n */\n operator: (ctx, expr) => expression(ctx, ['_'], expr.code),\n\n /**\n * Parse an expression provided as an operator parameter value.\n */\n parameter: (ctx, expr) => expression(ctx, ['datum', '_'], expr.code),\n\n /**\n * Parse an expression applied to an event stream.\n */\n event: (ctx, expr) => expression(ctx, ['event'], expr.code),\n\n /**\n * Parse an expression used to handle an event-driven operator update.\n */\n handler: (ctx, expr) => {\n const code = \"var datum=event.item&&event.item.datum;return \".concat(expr.code, \";\");\n return expression(ctx, ['_', 'event'], code);\n },\n\n /**\n * Parse an expression that performs visual encoding.\n */\n encode: (ctx, encode) => {\n const {\n marktype,\n channels\n } = encode;\n let code = 'var o=item,datum=o.datum,m=0,$;';\n\n for (const name in channels) {\n const o = 'o[' + stringValue(name) + ']';\n code += \"$=\".concat(channels[name].code, \";if(\").concat(o, \"!==$)\").concat(o, \"=$,m=1;\");\n }\n\n code += adjustSpatial(channels, marktype);\n code += 'return m;';\n return expression(ctx, ['item', '_'], code);\n },\n\n /**\n * Optimized code generators for access and comparison.\n */\n codegen: {\n get(path) {\n const ref = \"[\".concat(path.map(stringValue).join(']['), \"]\");\n const get = Function('_', \"return _\".concat(ref, \";\"));\n get.path = ref;\n return get;\n },\n\n comparator(fields, orders) {\n let t;\n\n const map = (f, i) => {\n const o = orders[i];\n let u, v;\n\n if (f.path) {\n u = \"a\".concat(f.path);\n v = \"b\".concat(f.path);\n } else {\n (t = t || {})['f' + i] = f;\n u = \"this.f\".concat(i, \"(a)\");\n v = \"this.f\".concat(i, \"(b)\");\n }\n\n return _compare(u, v, -o, o);\n };\n\n const fn = Function('a', 'b', 'var u, v; return ' + fields.map(map).join('') + '0;');\n return t ? fn.bind(t) : fn;\n }\n\n }\n};\n\n/**\n * Parse a dataflow operator.\n */\n\nfunction parseOperator(spec) {\n const ctx = this;\n\n if (isOperator(spec.type) || !spec.type) {\n ctx.operator(spec, spec.update ? ctx.operatorExpression(spec.update) : null);\n } else {\n ctx.transform(spec, spec.type);\n }\n}\n/**\n * Parse and assign operator parameters.\n */\n\nfunction parseOperatorParameters(spec) {\n const ctx = this;\n\n if (spec.params) {\n const op = ctx.get(spec.id);\n if (!op) error('Invalid operator id: ' + spec.id);\n ctx.dataflow.connect(op, op.parameters(ctx.parseParameters(spec.params), spec.react, spec.initonly));\n }\n}\n\n/**\n * Parse a set of operator parameters.\n */\n\nfunction parseParameters(spec, params) {\n params = params || {};\n const ctx = this;\n\n for (const key in spec) {\n const value = spec[key];\n params[key] = isArray(value) ? value.map(v => parseParameter(v, ctx, params)) : parseParameter(value, ctx, params);\n }\n\n return params;\n}\n/**\n * Parse a single parameter.\n */\n\nfunction parseParameter(spec, ctx, params) {\n if (!spec || !isObject(spec)) return spec;\n\n for (let i = 0, n = PARSERS.length, p; i < n; ++i) {\n p = PARSERS[i];\n\n if (hasOwnProperty(spec, p.key)) {\n return p.parse(spec, ctx, params);\n }\n }\n\n return spec;\n}\n/** Reference parsers. */\n\n\nvar PARSERS = [{\n key: '$ref',\n parse: getOperator\n}, {\n key: '$key',\n parse: getKey\n}, {\n key: '$expr',\n parse: getExpression\n}, {\n key: '$field',\n parse: getField\n}, {\n key: '$encode',\n parse: getEncode\n}, {\n key: '$compare',\n parse: getCompare\n}, {\n key: '$context',\n parse: getContext\n}, {\n key: '$subflow',\n parse: getSubflow\n}, {\n key: '$tupleid',\n parse: getTupleId\n}];\n/**\n * Resolve an operator reference.\n */\n\nfunction getOperator(_, ctx) {\n return ctx.get(_.$ref) || error('Operator not defined: ' + _.$ref);\n}\n/**\n * Resolve an expression reference.\n */\n\n\nfunction getExpression(_, ctx, params) {\n if (_.$params) {\n // parse expression parameters\n ctx.parseParameters(_.$params, params);\n }\n\n const k = 'e:' + _.$expr.code + '_' + _.$name;\n return ctx.fn[k] || (ctx.fn[k] = accessor(ctx.parameterExpression(_.$expr), _.$fields, _.$name));\n}\n/**\n * Resolve a key accessor reference.\n */\n\n\nfunction getKey(_, ctx) {\n const k = 'k:' + _.$key + '_' + !!_.$flat;\n return ctx.fn[k] || (ctx.fn[k] = key(_.$key, _.$flat, ctx.expr.codegen));\n}\n/**\n * Resolve a field accessor reference.\n */\n\n\nfunction getField(_, ctx) {\n if (!_.$field) return null;\n const k = 'f:' + _.$field + '_' + _.$name;\n return ctx.fn[k] || (ctx.fn[k] = field(_.$field, _.$name, ctx.expr.codegen));\n}\n/**\n * Resolve a comparator function reference.\n */\n\n\nfunction getCompare(_, ctx) {\n // As of Vega 5.5.3, $tupleid sort is no longer used.\n // Keep here for now for backwards compatibility.\n const k = 'c:' + _.$compare + '_' + _.$order,\n c = array(_.$compare).map(_ => _ && _.$tupleid ? tupleid : _);\n return ctx.fn[k] || (ctx.fn[k] = compare(c, _.$order, ctx.expr.codegen));\n}\n/**\n * Resolve an encode operator reference.\n */\n\n\nfunction getEncode(_, ctx) {\n const spec = _.$encode,\n encode = {};\n\n for (const name in spec) {\n const enc = spec[name];\n encode[name] = accessor(ctx.encodeExpression(enc.$expr), enc.$fields);\n encode[name].output = enc.$output;\n }\n\n return encode;\n}\n/**\n * Resolve a context reference.\n */\n\n\nfunction getContext(_, ctx) {\n return ctx;\n}\n/**\n * Resolve a recursive subflow specification.\n */\n\n\nfunction getSubflow(_, ctx) {\n const spec = _.$subflow;\n return function (dataflow, key, parent) {\n const subctx = ctx.fork().parse(spec),\n op = subctx.get(spec.operators[0].id),\n p = subctx.signals.parent;\n if (p) p.set(parent);\n\n op.detachSubflow = () => ctx.detach(subctx);\n\n return op;\n };\n}\n/**\n * Resolve a tuple id reference.\n */\n\n\nfunction getTupleId() {\n return tupleid;\n}\n\n/**\n * Parse an event stream specification.\n */\n\nfunction parseStream (spec) {\n var ctx = this,\n filter = spec.filter != null ? ctx.eventExpression(spec.filter) : undefined,\n stream = spec.stream != null ? ctx.get(spec.stream) : undefined,\n args;\n\n if (spec.source) {\n stream = ctx.events(spec.source, spec.type, filter);\n } else if (spec.merge) {\n args = spec.merge.map(_ => ctx.get(_));\n stream = args[0].merge.apply(args[0], args.slice(1));\n }\n\n if (spec.between) {\n args = spec.between.map(_ => ctx.get(_));\n stream = stream.between(args[0], args[1]);\n }\n\n if (spec.filter) {\n stream = stream.filter(filter);\n }\n\n if (spec.throttle != null) {\n stream = stream.throttle(+spec.throttle);\n }\n\n if (spec.debounce != null) {\n stream = stream.debounce(+spec.debounce);\n }\n\n if (stream == null) {\n error('Invalid stream definition: ' + JSON.stringify(spec));\n }\n\n if (spec.consume) stream.consume(true);\n ctx.stream(spec, stream);\n}\n\n/**\n * Parse an event-driven operator update.\n */\n\nfunction parseUpdate (spec) {\n var ctx = this,\n srcid = isObject(srcid = spec.source) ? srcid.$ref : srcid,\n source = ctx.get(srcid),\n target = null,\n update = spec.update,\n params = undefined;\n if (!source) error('Source not defined: ' + spec.source);\n target = spec.target && spec.target.$expr ? ctx.eventExpression(spec.target.$expr) : ctx.get(spec.target);\n\n if (update && update.$expr) {\n if (update.$params) {\n params = ctx.parseParameters(update.$params);\n }\n\n update = ctx.handlerExpression(update.$expr);\n }\n\n ctx.update(spec, source, target, update, params);\n}\n\nconst SKIP = {\n skip: true\n};\nfunction getState(options) {\n var ctx = this,\n state = {};\n\n if (options.signals) {\n var signals = state.signals = {};\n Object.keys(ctx.signals).forEach(key => {\n const op = ctx.signals[key];\n\n if (options.signals(key, op)) {\n signals[key] = op.value;\n }\n });\n }\n\n if (options.data) {\n var data = state.data = {};\n Object.keys(ctx.data).forEach(key => {\n const dataset = ctx.data[key];\n\n if (options.data(key, dataset)) {\n data[key] = dataset.input.value;\n }\n });\n }\n\n if (ctx.subcontext && options.recurse !== false) {\n state.subcontext = ctx.subcontext.map(ctx => ctx.getState(options));\n }\n\n return state;\n}\nfunction setState(state) {\n var ctx = this,\n df = ctx.dataflow,\n data = state.data,\n signals = state.signals;\n Object.keys(signals || {}).forEach(key => {\n df.update(ctx.signals[key], signals[key], SKIP);\n });\n Object.keys(data || {}).forEach(key => {\n df.pulse(ctx.data[key].input, df.changeset().remove(truthy).insert(data[key]));\n });\n (state.subcontext || []).forEach((substate, i) => {\n const subctx = ctx.subcontext[i];\n if (subctx) subctx.setState(substate);\n });\n}\n\n/**\n * Context objects store the current parse state.\n * Enables lookup of parsed operators, event streams, accessors, etc.\n * Provides a 'fork' method for creating child contexts for subflows.\n */\n\nfunction context (df, transforms, functions, expr) {\n return new Context(df, transforms, functions, expr);\n}\n\nfunction Context(df, transforms, functions, expr) {\n this.dataflow = df;\n this.transforms = transforms;\n this.events = df.events.bind(df);\n this.expr = expr || expressionCodegen, this.signals = {};\n this.scales = {};\n this.nodes = {};\n this.data = {};\n this.fn = {};\n\n if (functions) {\n this.functions = Object.create(functions);\n this.functions.context = this;\n }\n}\n\nfunction Subcontext(ctx) {\n this.dataflow = ctx.dataflow;\n this.transforms = ctx.transforms;\n this.events = ctx.events;\n this.expr = ctx.expr;\n this.signals = Object.create(ctx.signals);\n this.scales = Object.create(ctx.scales);\n this.nodes = Object.create(ctx.nodes);\n this.data = Object.create(ctx.data);\n this.fn = Object.create(ctx.fn);\n\n if (ctx.functions) {\n this.functions = Object.create(ctx.functions);\n this.functions.context = this;\n }\n}\n\nContext.prototype = Subcontext.prototype = {\n fork() {\n const ctx = new Subcontext(this);\n (this.subcontext || (this.subcontext = [])).push(ctx);\n return ctx;\n },\n\n detach(ctx) {\n this.subcontext = this.subcontext.filter(c => c !== ctx); // disconnect all nodes in the subcontext\n // wipe out targets first for better efficiency\n\n const keys = Object.keys(ctx.nodes);\n\n for (const key of keys) ctx.nodes[key]._targets = null;\n\n for (const key of keys) ctx.nodes[key].detach();\n\n ctx.nodes = null;\n },\n\n get(id) {\n return this.nodes[id];\n },\n\n set(id, node) {\n return this.nodes[id] = node;\n },\n\n add(spec, op) {\n const ctx = this,\n df = ctx.dataflow,\n data = spec.value;\n ctx.set(spec.id, op);\n\n if (isCollect(spec.type) && data) {\n if (data.$ingest) {\n df.ingest(op, data.$ingest, data.$format);\n } else if (data.$request) {\n df.preload(op, data.$request, data.$format);\n } else {\n df.pulse(op, df.changeset().insert(data));\n }\n }\n\n if (spec.root) {\n ctx.root = op;\n }\n\n if (spec.parent) {\n let p = ctx.get(spec.parent.$ref);\n\n if (p) {\n df.connect(p, [op]);\n op.targets().add(p);\n } else {\n (ctx.unresolved = ctx.unresolved || []).push(() => {\n p = ctx.get(spec.parent.$ref);\n df.connect(p, [op]);\n op.targets().add(p);\n });\n }\n }\n\n if (spec.signal) {\n ctx.signals[spec.signal] = op;\n }\n\n if (spec.scale) {\n ctx.scales[spec.scale] = op;\n }\n\n if (spec.data) {\n for (const name in spec.data) {\n const data = ctx.data[name] || (ctx.data[name] = {});\n spec.data[name].forEach(role => data[role] = op);\n }\n }\n },\n\n resolve() {\n (this.unresolved || []).forEach(fn => fn());\n delete this.unresolved;\n return this;\n },\n\n operator(spec, update) {\n this.add(spec, this.dataflow.add(spec.value, update));\n },\n\n transform(spec, type) {\n this.add(spec, this.dataflow.add(this.transforms[canonicalType(type)]));\n },\n\n stream(spec, stream) {\n this.set(spec.id, stream);\n },\n\n update(spec, stream, target, update, params) {\n this.dataflow.on(stream, target, update, params, spec.options);\n },\n\n // expression parsing\n operatorExpression(expr) {\n return this.expr.operator(this, expr);\n },\n\n parameterExpression(expr) {\n return this.expr.parameter(this, expr);\n },\n\n eventExpression(expr) {\n return this.expr.event(this, expr);\n },\n\n handlerExpression(expr) {\n return this.expr.handler(this, expr);\n },\n\n encodeExpression(encode) {\n return this.expr.encode(this, encode);\n },\n\n // parse methods\n parse,\n parseOperator,\n parseOperatorParameters,\n parseParameters,\n parseStream,\n parseUpdate,\n // state methods\n getState,\n setState\n};\n\nexport { context };\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(null, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","import { isString, hasOwnProperty, error, truthy, constant, extend, isArray, toSet, array, isObject, debounce, isDate, inherits, stringValue } from 'vega-util';\nimport { changeset, isChangeSet, EventStream, transforms, Dataflow, asyncCallback } from 'vega-dataflow';\nimport { point, renderModule, CanvasHandler, RenderType, Scenegraph } from 'vega-scenegraph';\nimport { tickStep } from 'd3-array';\nimport { functionContext } from 'vega-functions';\nimport { context } from 'vega-runtime';\nimport { interval } from 'd3-timer';\nimport { locale } from 'vega-format';\n\n// initialize aria role and label attributes\nfunction initializeAria(view) {\n const el = view.container();\n\n if (el) {\n el.setAttribute('role', 'graphics-document');\n el.setAttribute('aria-roleDescription', 'visualization');\n ariaLabel(el, view.description());\n }\n} // update aria-label if we have a DOM container element\n\nfunction ariaLabel(el, desc) {\n if (el) desc == null ? el.removeAttribute('aria-label') : el.setAttribute('aria-label', desc);\n}\n\nfunction background (view) {\n // respond to background signal\n view.add(null, _ => {\n view._background = _.bg;\n view._resize = 1;\n return _.bg;\n }, {\n bg: view._signals.background\n });\n}\n\nconst Default = 'default';\nfunction cursor (view) {\n // get cursor signal, add to dataflow if needed\n const cursor = view._signals.cursor || (view._signals.cursor = view.add({\n user: Default,\n item: null\n })); // evaluate cursor on each mousemove event\n\n view.on(view.events('view', 'mousemove'), cursor, (_, event) => {\n const value = cursor.value,\n user = value ? isString(value) ? value : value.user : Default,\n item = event.item && event.item.cursor || null;\n return value && user === value.user && item == value.item ? value : {\n user: user,\n item: item\n };\n }); // when cursor signal updates, set visible cursor\n\n view.add(null, function (_) {\n let user = _.cursor,\n item = this.value;\n\n if (!isString(user)) {\n item = user.item;\n user = user.user;\n }\n\n setCursor(view, user && user !== Default ? user : item || user);\n return item;\n }, {\n cursor: cursor\n });\n}\nfunction setCursor(view, cursor) {\n const el = view.globalCursor() ? typeof document !== 'undefined' && document.body : view.container();\n\n if (el) {\n return cursor == null ? el.style.removeProperty('cursor') : el.style.cursor = cursor;\n }\n}\n\nfunction dataref(view, name) {\n var data = view._runtime.data;\n\n if (!hasOwnProperty(data, name)) {\n error('Unrecognized data set: ' + name);\n }\n\n return data[name];\n}\nfunction data(name, values) {\n return arguments.length < 2 ? dataref(this, name).values.value : change.call(this, name, changeset().remove(truthy).insert(values));\n}\nfunction change(name, changes) {\n if (!isChangeSet(changes)) {\n error('Second argument to changes must be a changeset.');\n }\n\n const dataset = dataref(this, name);\n dataset.modified = true;\n return this.pulse(dataset.input, changes);\n}\nfunction insert(name, _) {\n return change.call(this, name, changeset().insert(_));\n}\nfunction remove(name, _) {\n return change.call(this, name, changeset().remove(_));\n}\n\nfunction width(view) {\n var padding = view.padding();\n return Math.max(0, view._viewWidth + padding.left + padding.right);\n}\nfunction height(view) {\n var padding = view.padding();\n return Math.max(0, view._viewHeight + padding.top + padding.bottom);\n}\nfunction offset(view) {\n var padding = view.padding(),\n origin = view._origin;\n return [padding.left + origin[0], padding.top + origin[1]];\n}\nfunction resizeRenderer(view) {\n var origin = offset(view),\n w = width(view),\n h = height(view);\n\n view._renderer.background(view.background());\n\n view._renderer.resize(w, h, origin);\n\n view._handler.origin(origin);\n\n view._resizeListeners.forEach(handler => {\n try {\n handler(w, h);\n } catch (error) {\n view.error(error);\n }\n });\n}\n\n/**\n * Extend an event with additional view-specific methods.\n * Adds a new property ('vega') to an event that provides a number\n * of methods for querying information about the current interaction.\n * The vega object provides the following methods:\n * view - Returns the backing View instance.\n * item - Returns the currently active scenegraph item (if any).\n * group - Returns the currently active scenegraph group (if any).\n * This method accepts a single string-typed argument indicating the name\n * of the desired parent group. The scenegraph will be traversed from\n * the item up towards the root to search for a matching group. If no\n * argument is provided the enclosing group for the active item is\n * returned, unless the item it itself a group, in which case it is\n * returned directly.\n * xy - Returns a two-element array containing the x and y coordinates for\n * mouse or touch events. For touch events, this is based on the first\n * elements in the changedTouches array. This method accepts a single\n * argument: either an item instance or mark name that should serve as\n * the reference coordinate system. If no argument is provided the\n * top-level view coordinate system is assumed.\n * x - Returns the current x-coordinate, accepts the same arguments as xy.\n * y - Returns the current y-coordinate, accepts the same arguments as xy.\n * @param {Event} event - The input event to extend.\n * @param {Item} item - The currently active scenegraph item (if any).\n * @return {Event} - The extended input event.\n */\n\nfunction eventExtend (view, event, item) {\n var r = view._renderer,\n el = r && r.canvas(),\n p,\n e,\n translate;\n\n if (el) {\n translate = offset(view);\n e = event.changedTouches ? event.changedTouches[0] : event;\n p = point(e, el);\n p[0] -= translate[0];\n p[1] -= translate[1];\n }\n\n event.dataflow = view;\n event.item = item;\n event.vega = extension(view, item, p);\n return event;\n}\n\nfunction extension(view, item, point) {\n const itemGroup = item ? item.mark.marktype === 'group' ? item : item.mark.group : null;\n\n function group(name) {\n var g = itemGroup,\n i;\n if (name) for (i = item; i; i = i.mark.group) {\n if (i.mark.name === name) {\n g = i;\n break;\n }\n }\n return g && g.mark && g.mark.interactive ? g : {};\n }\n\n function xy(item) {\n if (!item) return point;\n if (isString(item)) item = group(item);\n const p = point.slice();\n\n while (item) {\n p[0] -= item.x || 0;\n p[1] -= item.y || 0;\n item = item.mark && item.mark.group;\n }\n\n return p;\n }\n\n return {\n view: constant(view),\n item: constant(item || {}),\n group: group,\n xy: xy,\n x: item => xy(item)[0],\n y: item => xy(item)[1]\n };\n}\n\nconst VIEW = 'view',\n TIMER = 'timer',\n WINDOW = 'window',\n NO_TRAP = {\n trap: false\n};\n/**\n * Initialize event handling configuration.\n * @param {object} config - The configuration settings.\n * @return {object}\n */\n\nfunction initializeEventConfig(config) {\n const events = extend({\n defaults: {}\n }, config);\n\n const unpack = (obj, keys) => {\n keys.forEach(k => {\n if (isArray(obj[k])) obj[k] = toSet(obj[k]);\n });\n };\n\n unpack(events.defaults, ['prevent', 'allow']);\n unpack(events, ['view', 'window', 'selector']);\n return events;\n}\nfunction trackEventListener(view, sources, type, handler) {\n view._eventListeners.push({\n type: type,\n sources: array(sources),\n handler: handler\n });\n}\n\nfunction prevent(view, type) {\n var def = view._eventConfig.defaults,\n prevent = def.prevent,\n allow = def.allow;\n return prevent === false || allow === true ? false : prevent === true || allow === false ? true : prevent ? prevent[type] : allow ? !allow[type] : view.preventDefault();\n}\n\nfunction permit(view, key, type) {\n const rule = view._eventConfig && view._eventConfig[key];\n\n if (rule === false || isObject(rule) && !rule[type]) {\n view.warn(`Blocked ${key} ${type} event listener.`);\n return false;\n }\n\n return true;\n}\n/**\n * Create a new event stream from an event source.\n * @param {object} source - The event source to monitor.\n * @param {string} type - The event type.\n * @param {function(object): boolean} [filter] - Event filter function.\n * @return {EventStream}\n */\n\n\nfunction events(source, type, filter) {\n var view = this,\n s = new EventStream(filter),\n send = function (e, item) {\n view.runAsync(null, () => {\n if (source === VIEW && prevent(view, type)) {\n e.preventDefault();\n }\n\n s.receive(eventExtend(view, e, item));\n });\n },\n sources;\n\n if (source === TIMER) {\n if (permit(view, 'timer', type)) {\n view.timer(send, type);\n }\n } else if (source === VIEW) {\n if (permit(view, 'view', type)) {\n // send traps errors, so use {trap: false} option\n view.addEventListener(type, send, NO_TRAP);\n }\n } else {\n if (source === WINDOW) {\n if (permit(view, 'window', type) && typeof window !== 'undefined') {\n sources = [window];\n }\n } else if (typeof document !== 'undefined') {\n if (permit(view, 'selector', type)) {\n sources = document.querySelectorAll(source);\n }\n }\n\n if (!sources) {\n view.warn('Can not resolve event source: ' + source);\n } else {\n for (var i = 0, n = sources.length; i < n; ++i) {\n sources[i].addEventListener(type, send);\n }\n\n trackEventListener(view, sources, type, send);\n }\n }\n\n return s;\n}\n\nfunction itemFilter(event) {\n return event.item;\n}\n\nfunction markTarget(event) {\n // grab upstream collector feeding the mark operator\n return event.item.mark.source;\n}\n\nfunction invoke(name) {\n return function (_, event) {\n return event.vega.view().changeset().encode(event.item, name);\n };\n}\n\nfunction hover (hoverSet, leaveSet) {\n hoverSet = [hoverSet || 'hover'];\n leaveSet = [leaveSet || 'update', hoverSet[0]]; // invoke hover set upon mouseover\n\n this.on(this.events('view', 'mouseover', itemFilter), markTarget, invoke(hoverSet)); // invoke leave set upon mouseout\n\n this.on(this.events('view', 'mouseout', itemFilter), markTarget, invoke(leaveSet));\n return this;\n}\n\n/**\n * Finalize a View instance that is being removed.\n * Cancel any running timers.\n * Remove all external event listeners.\n * Remove any currently displayed tooltip.\n */\nfunction finalize () {\n var tooltip = this._tooltip,\n timers = this._timers,\n listeners = this._eventListeners,\n n,\n m,\n e;\n n = timers.length;\n\n while (--n >= 0) {\n timers[n].stop();\n }\n\n n = listeners.length;\n\n while (--n >= 0) {\n e = listeners[n];\n m = e.sources.length;\n\n while (--m >= 0) {\n e.sources[m].removeEventListener(e.type, e.handler);\n }\n }\n\n if (tooltip) {\n tooltip.call(this, this._handler, null, null, null);\n }\n\n return this;\n}\n\nfunction element (tag, attr, text) {\n const el = document.createElement(tag);\n\n for (const key in attr) el.setAttribute(key, attr[key]);\n\n if (text != null) el.textContent = text;\n return el;\n}\n\nconst BindClass = 'vega-bind',\n NameClass = 'vega-bind-name',\n RadioClass = 'vega-bind-radio';\n/**\n * Bind a signal to an external HTML input element. The resulting two-way\n * binding will propagate input changes to signals, and propagate signal\n * changes to the input element state. If this view instance has no parent\n * element, we assume the view is headless and no bindings are created.\n * @param {Element|string} el - The parent DOM element to which the input\n * element should be appended as a child. If string-valued, this argument\n * will be treated as a CSS selector. If null or undefined, the parent\n * element of this view will be used as the element.\n * @param {object} param - The binding parameters which specify the signal\n * to bind to, the input element type, and type-specific configuration.\n * @return {View} - This view instance.\n */\n\nfunction bind (view, el, binding) {\n if (!el) return;\n const param = binding.param;\n let bind = binding.state;\n\n if (!bind) {\n bind = binding.state = {\n elements: null,\n active: false,\n set: null,\n update: value => {\n if (value != view.signal(param.signal)) {\n view.runAsync(null, () => {\n bind.source = true;\n view.signal(param.signal, value);\n });\n }\n }\n };\n\n if (param.debounce) {\n bind.update = debounce(param.debounce, bind.update);\n }\n }\n\n const create = param.input == null && param.element ? target : generate;\n create(bind, el, param, view);\n\n if (!bind.active) {\n view.on(view._signals[param.signal], null, () => {\n bind.source ? bind.source = false : bind.set(view.signal(param.signal));\n });\n bind.active = true;\n }\n\n return bind;\n}\n/**\n * Bind the signal to an external EventTarget.\n */\n\nfunction target(bind, node, param, view) {\n const type = param.event || 'input';\n\n const handler = () => bind.update(node.value); // initialize signal value to external input value\n\n\n view.signal(param.signal, node.value); // listen for changes on the element\n\n node.addEventListener(type, handler); // register with view, so we can remove it upon finalization\n\n trackEventListener(view, node, type, handler); // propagate change to element\n\n bind.set = value => {\n node.value = value;\n node.dispatchEvent(event(type));\n };\n}\n\nfunction event(type) {\n return typeof Event !== 'undefined' ? new Event(type) : {\n type\n };\n}\n/**\n * Generate an HTML input form element and bind it to a signal.\n */\n\n\nfunction generate(bind, el, param, view) {\n const value = view.signal(param.signal);\n const div = element('div', {\n 'class': BindClass\n });\n const wrapper = param.input === 'radio' ? div : div.appendChild(element('label'));\n wrapper.appendChild(element('span', {\n 'class': NameClass\n }, param.name || param.signal));\n el.appendChild(div);\n let input = form;\n\n switch (param.input) {\n case 'checkbox':\n input = checkbox;\n break;\n\n case 'select':\n input = select;\n break;\n\n case 'radio':\n input = radio;\n break;\n\n case 'range':\n input = range;\n break;\n }\n\n input(bind, wrapper, param, value);\n}\n/**\n * Generates an arbitrary input form element.\n * The input type is controlled via user-provided parameters.\n */\n\n\nfunction form(bind, el, param, value) {\n const node = element('input');\n\n for (const key in param) {\n if (key !== 'signal' && key !== 'element') {\n node.setAttribute(key === 'input' ? 'type' : key, param[key]);\n }\n }\n\n node.setAttribute('name', param.signal);\n node.value = value;\n el.appendChild(node);\n node.addEventListener('input', () => bind.update(node.value));\n bind.elements = [node];\n\n bind.set = value => node.value = value;\n}\n/**\n * Generates a checkbox input element.\n */\n\n\nfunction checkbox(bind, el, param, value) {\n const attr = {\n type: 'checkbox',\n name: param.signal\n };\n if (value) attr.checked = true;\n const node = element('input', attr);\n el.appendChild(node);\n node.addEventListener('change', () => bind.update(node.checked));\n bind.elements = [node];\n\n bind.set = value => node.checked = !!value || null;\n}\n/**\n * Generates a selection list input element.\n */\n\n\nfunction select(bind, el, param, value) {\n const node = element('select', {\n name: param.signal\n }),\n labels = param.labels || [];\n param.options.forEach((option, i) => {\n const attr = {\n value: option\n };\n if (valuesEqual(option, value)) attr.selected = true;\n node.appendChild(element('option', attr, (labels[i] || option) + ''));\n });\n el.appendChild(node);\n node.addEventListener('change', () => {\n bind.update(param.options[node.selectedIndex]);\n });\n bind.elements = [node];\n\n bind.set = value => {\n for (let i = 0, n = param.options.length; i < n; ++i) {\n if (valuesEqual(param.options[i], value)) {\n node.selectedIndex = i;\n return;\n }\n }\n };\n}\n/**\n * Generates a radio button group.\n */\n\n\nfunction radio(bind, el, param, value) {\n const group = element('span', {\n 'class': RadioClass\n }),\n labels = param.labels || [];\n el.appendChild(group);\n bind.elements = param.options.map((option, i) => {\n const attr = {\n type: 'radio',\n name: param.signal,\n value: option\n };\n if (valuesEqual(option, value)) attr.checked = true;\n const input = element('input', attr);\n input.addEventListener('change', () => bind.update(option));\n const label = element('label', {}, (labels[i] || option) + '');\n label.prepend(input);\n group.appendChild(label);\n return input;\n });\n\n bind.set = value => {\n const nodes = bind.elements,\n n = nodes.length;\n\n for (let i = 0; i < n; ++i) {\n if (valuesEqual(nodes[i].value, value)) nodes[i].checked = true;\n }\n };\n}\n/**\n * Generates a slider input element.\n */\n\n\nfunction range(bind, el, param, value) {\n value = value !== undefined ? value : (+param.max + +param.min) / 2;\n const max = param.max != null ? param.max : Math.max(100, +value) || 100,\n min = param.min || Math.min(0, max, +value) || 0,\n step = param.step || tickStep(min, max, 100);\n const node = element('input', {\n type: 'range',\n name: param.signal,\n min: min,\n max: max,\n step: step\n });\n node.value = value;\n const span = element('span', {}, +value);\n el.appendChild(node);\n el.appendChild(span);\n\n const update = () => {\n span.textContent = node.value;\n bind.update(+node.value);\n }; // subscribe to both input and change\n\n\n node.addEventListener('input', update);\n node.addEventListener('change', update);\n bind.elements = [node];\n\n bind.set = value => {\n node.value = value;\n span.textContent = value;\n };\n}\n\nfunction valuesEqual(a, b) {\n return a === b || a + '' === b + '';\n}\n\nfunction initializeRenderer (view, r, el, constructor, scaleFactor, opt) {\n r = r || new constructor(view.loader());\n return r.initialize(el, width(view), height(view), offset(view), scaleFactor, opt).background(view.background());\n}\n\nfunction trap (view, fn) {\n return !fn ? null : function () {\n try {\n fn.apply(this, arguments);\n } catch (error) {\n view.error(error);\n }\n };\n}\n\nfunction initializeHandler (view, prevHandler, el, constructor) {\n // instantiate scenegraph handler\n const handler = new constructor(view.loader(), trap(view, view.tooltip())).scene(view.scenegraph().root).initialize(el, offset(view), view); // transfer event handlers\n\n if (prevHandler) {\n prevHandler.handlers().forEach(h => {\n handler.on(h.type, h.handler);\n });\n }\n\n return handler;\n}\n\nfunction initialize (el, elBind) {\n const view = this,\n type = view._renderType,\n config = view._eventConfig.bind,\n module = renderModule(type); // containing dom element\n\n el = view._el = el ? lookup(view, el, true) : null; // initialize aria attributes\n\n initializeAria(view); // select appropriate renderer & handler\n\n if (!module) view.error('Unrecognized renderer type: ' + type);\n const Handler = module.handler || CanvasHandler,\n Renderer = el ? module.renderer : module.headless; // initialize renderer and input handler\n\n view._renderer = !Renderer ? null : initializeRenderer(view, view._renderer, el, Renderer);\n view._handler = initializeHandler(view, view._handler, el, Handler);\n view._redraw = true; // initialize signal bindings\n\n if (el && config !== 'none') {\n elBind = elBind ? view._elBind = lookup(view, elBind, true) : el.appendChild(element('form', {\n 'class': 'vega-bindings'\n }));\n\n view._bind.forEach(_ => {\n if (_.param.element && config !== 'container') {\n _.element = lookup(view, _.param.element, !!_.param.input);\n }\n });\n\n view._bind.forEach(_ => {\n bind(view, _.element || elBind, _);\n });\n }\n\n return view;\n}\n\nfunction lookup(view, el, clear) {\n if (typeof el === 'string') {\n if (typeof document !== 'undefined') {\n el = document.querySelector(el);\n\n if (!el) {\n view.error('Signal bind element not found: ' + el);\n return null;\n }\n } else {\n view.error('DOM document instance not found.');\n return null;\n }\n }\n\n if (el && clear) {\n try {\n el.innerHTML = '';\n } catch (e) {\n el = null;\n view.error(e);\n }\n }\n\n return el;\n}\n\nconst number = _ => +_ || 0;\n\nconst paddingObject = _ => ({\n top: _,\n bottom: _,\n left: _,\n right: _\n});\n\nfunction padding (_) {\n return isObject(_) ? {\n top: number(_.top),\n bottom: number(_.bottom),\n left: number(_.left),\n right: number(_.right)\n } : paddingObject(number(_));\n}\n\n/**\n * Render the current scene in a headless fashion.\n * This method is asynchronous, returning a Promise instance.\n * @return {Promise} - A Promise that resolves to a renderer.\n */\n\nasync function renderHeadless (view, type, scaleFactor, opt) {\n const module = renderModule(type),\n ctr = module && module.headless;\n if (!ctr) error('Unrecognized renderer type: ' + type);\n await view.runAsync();\n return initializeRenderer(view, null, null, ctr, scaleFactor, opt).renderAsync(view._scenegraph.root);\n}\n\n/**\n * Produce an image URL for the visualization. Depending on the type\n * parameter, the generated URL contains data for either a PNG or SVG image.\n * The URL can be used (for example) to download images of the visualization.\n * This method is asynchronous, returning a Promise instance.\n * @param {string} type - The image type. One of 'svg', 'png' or 'canvas'.\n * The 'canvas' and 'png' types are synonyms for a PNG image.\n * @return {Promise} - A promise that resolves to an image URL.\n */\n\nasync function renderToImageURL (type, scaleFactor) {\n if (type !== RenderType.Canvas && type !== RenderType.SVG && type !== RenderType.PNG) {\n error('Unrecognized image type: ' + type);\n }\n\n const r = await renderHeadless(this, type, scaleFactor);\n return type === RenderType.SVG ? toBlobURL(r.svg(), 'image/svg+xml') : r.canvas().toDataURL('image/png');\n}\n\nfunction toBlobURL(data, mime) {\n const blob = new Blob([data], {\n type: mime\n });\n return window.URL.createObjectURL(blob);\n}\n\n/**\n * Produce a Canvas instance containing a rendered visualization.\n * This method is asynchronous, returning a Promise instance.\n * @return {Promise} - A promise that resolves to a Canvas instance.\n */\n\nasync function renderToCanvas (scaleFactor, opt) {\n const r = await renderHeadless(this, RenderType.Canvas, scaleFactor, opt);\n return r.canvas();\n}\n\n/**\n * Produce a rendered SVG string of the visualization.\n * This method is asynchronous, returning a Promise instance.\n * @return {Promise} - A promise that resolves to an SVG string.\n */\n\nasync function renderToSVG (scaleFactor) {\n const r = await renderHeadless(this, RenderType.SVG, scaleFactor);\n return r.svg();\n}\n\nfunction runtime (view, spec, expr) {\n return context(view, transforms, functionContext, expr).parse(spec);\n}\n\nfunction scale(name) {\n var scales = this._runtime.scales;\n\n if (!hasOwnProperty(scales, name)) {\n error('Unrecognized scale or projection: ' + name);\n }\n\n return scales[name].value;\n}\n\nvar Width = 'width',\n Height = 'height',\n Padding = 'padding',\n Skip = {\n skip: true\n};\nfunction viewWidth(view, width) {\n var a = view.autosize(),\n p = view.padding();\n return width - (a && a.contains === Padding ? p.left + p.right : 0);\n}\nfunction viewHeight(view, height) {\n var a = view.autosize(),\n p = view.padding();\n return height - (a && a.contains === Padding ? p.top + p.bottom : 0);\n}\nfunction initializeResize(view) {\n var s = view._signals,\n w = s[Width],\n h = s[Height],\n p = s[Padding];\n\n function resetSize() {\n view._autosize = view._resize = 1;\n } // respond to width signal\n\n\n view._resizeWidth = view.add(null, _ => {\n view._width = _.size;\n view._viewWidth = viewWidth(view, _.size);\n resetSize();\n }, {\n size: w\n }); // respond to height signal\n\n view._resizeHeight = view.add(null, _ => {\n view._height = _.size;\n view._viewHeight = viewHeight(view, _.size);\n resetSize();\n }, {\n size: h\n }); // respond to padding signal\n\n const resizePadding = view.add(null, resetSize, {\n pad: p\n }); // set rank to run immediately after source signal\n\n view._resizeWidth.rank = w.rank + 1;\n view._resizeHeight.rank = h.rank + 1;\n resizePadding.rank = p.rank + 1;\n}\nfunction resizeView(viewWidth, viewHeight, width, height, origin, auto) {\n this.runAfter(view => {\n let rerun = 0; // reset autosize flag\n\n view._autosize = 0; // width value changed: update signal, skip resize op\n\n if (view.width() !== width) {\n rerun = 1;\n view.signal(Width, width, Skip); // set width, skip update calc\n\n view._resizeWidth.skip(true); // skip width resize handler\n\n } // height value changed: update signal, skip resize op\n\n\n if (view.height() !== height) {\n rerun = 1;\n view.signal(Height, height, Skip); // set height, skip update calc\n\n view._resizeHeight.skip(true); // skip height resize handler\n\n } // view width changed: update view property, set resize flag\n\n\n if (view._viewWidth !== viewWidth) {\n view._resize = 1;\n view._viewWidth = viewWidth;\n } // view height changed: update view property, set resize flag\n\n\n if (view._viewHeight !== viewHeight) {\n view._resize = 1;\n view._viewHeight = viewHeight;\n } // origin changed: update view property, set resize flag\n\n\n if (view._origin[0] !== origin[0] || view._origin[1] !== origin[1]) {\n view._resize = 1;\n view._origin = origin;\n } // run dataflow on width/height signal change\n\n\n if (rerun) view.run('enter');\n if (auto) view.runAfter(v => v.resize());\n }, false, 1);\n}\n\n/**\n * Get the current view state, consisting of signal values and/or data sets.\n * @param {object} [options] - Options flags indicating which state to export.\n * If unspecified, all signals and data sets will be exported.\n * @param {function(string, Operator):boolean} [options.signals] - Optional\n * predicate function for testing if a signal should be included in the\n * exported state. If unspecified, all signals will be included, except for\n * those named 'parent' or those which refer to a Transform value.\n * @param {function(string, object):boolean} [options.data] - Optional\n * predicate function for testing if a data set's input should be included\n * in the exported state. If unspecified, all data sets that have been\n * explicitly modified will be included.\n * @param {boolean} [options.recurse=true] - Flag indicating if the exported\n * state should recursively include state from group mark sub-contexts.\n * @return {object} - An object containing the exported state values.\n */\n\nfunction getState(options) {\n return this._runtime.getState(options || {\n data: dataTest,\n signals: signalTest,\n recurse: true\n });\n}\n\nfunction dataTest(name, data) {\n return data.modified && isArray(data.input.value) && name.indexOf('_:vega:_');\n}\n\nfunction signalTest(name, op) {\n return !(name === 'parent' || op instanceof transforms.proxy);\n}\n/**\n * Sets the current view state and updates the view by invoking run.\n * @param {object} state - A state object containing signal and/or\n * data set values, following the format used by the getState method.\n * @return {View} - This view instance.\n */\n\n\nfunction setState(state) {\n this.runAsync(null, v => {\n v._trigger = false;\n\n v._runtime.setState(state);\n }, v => {\n v._trigger = true;\n });\n return this;\n}\n\nfunction timer (callback, delay) {\n function tick(elapsed) {\n callback({\n timestamp: Date.now(),\n elapsed: elapsed\n });\n }\n\n this._timers.push(interval(tick, delay));\n}\n\nfunction defaultTooltip (handler, event, item, value) {\n const el = handler.element();\n if (el) el.setAttribute('title', formatTooltip(value));\n}\n\nfunction formatTooltip(value) {\n return value == null ? '' : isArray(value) ? formatArray(value) : isObject(value) && !isDate(value) ? formatObject(value) : value + '';\n}\n\nfunction formatObject(obj) {\n return Object.keys(obj).map(key => {\n const v = obj[key];\n return key + ': ' + (isArray(v) ? formatArray(v) : formatValue(v));\n }).join('\\n');\n}\n\nfunction formatArray(value) {\n return '[' + value.map(formatValue).join(', ') + ']';\n}\n\nfunction formatValue(value) {\n return isArray(value) ? '[\\u2026]' : isObject(value) && !isDate(value) ? '{\\u2026}' : value;\n}\n\n/**\n * Create a new View instance from a Vega dataflow runtime specification.\n * The generated View will not immediately be ready for display. Callers\n * should also invoke the initialize method (e.g., to set the parent\n * DOM element in browser-based deployment) and then invoke the run\n * method to evaluate the dataflow graph. Rendering will automatically\n * be performed upon dataflow runs.\n * @constructor\n * @param {object} spec - The Vega dataflow runtime specification.\n */\n\nfunction View(spec, options) {\n const view = this;\n options = options || {};\n Dataflow.call(view);\n if (options.loader) view.loader(options.loader);\n if (options.logger) view.logger(options.logger);\n if (options.logLevel != null) view.logLevel(options.logLevel);\n\n if (options.locale || spec.locale) {\n const loc = extend({}, spec.locale, options.locale);\n view.locale(locale(loc.number, loc.time));\n }\n\n view._el = null;\n view._elBind = null;\n view._renderType = options.renderer || RenderType.Canvas;\n view._scenegraph = new Scenegraph();\n const root = view._scenegraph.root; // initialize renderer, handler and event management\n\n view._renderer = null;\n view._tooltip = options.tooltip || defaultTooltip, view._redraw = true;\n view._handler = new CanvasHandler().scene(root);\n view._globalCursor = false;\n view._preventDefault = false;\n view._timers = [];\n view._eventListeners = [];\n view._resizeListeners = []; // initialize event configuration\n\n view._eventConfig = initializeEventConfig(spec.eventConfig);\n view.globalCursor(view._eventConfig.globalCursor); // initialize dataflow graph\n\n const ctx = runtime(view, spec, options.expr);\n view._runtime = ctx;\n view._signals = ctx.signals;\n view._bind = (spec.bindings || []).map(_ => ({\n state: null,\n param: extend({}, _)\n })); // initialize scenegraph\n\n if (ctx.root) ctx.root.set(root);\n root.source = ctx.data.root.input;\n view.pulse(ctx.data.root.input, view.changeset().insert(root.items)); // initialize view size\n\n view._width = view.width();\n view._height = view.height();\n view._viewWidth = viewWidth(view, view._width);\n view._viewHeight = viewHeight(view, view._height);\n view._origin = [0, 0];\n view._resize = 0;\n view._autosize = 1;\n initializeResize(view); // initialize background color\n\n background(view); // initialize cursor\n\n cursor(view); // initialize view description\n\n view.description(spec.description); // initialize hover proessing, if requested\n\n if (options.hover) view.hover(); // initialize DOM container(s) and renderer\n\n if (options.container) view.initialize(options.container, options.bind);\n}\n\nfunction lookupSignal(view, name) {\n return hasOwnProperty(view._signals, name) ? view._signals[name] : error('Unrecognized signal name: ' + stringValue(name));\n}\n\nfunction findOperatorHandler(op, handler) {\n const h = (op._targets || []).filter(op => op._update && op._update.handler === handler);\n return h.length ? h[0] : null;\n}\n\nfunction addOperatorListener(view, name, op, handler) {\n let h = findOperatorHandler(op, handler);\n\n if (!h) {\n h = trap(view, () => handler(name, op.value));\n h.handler = handler;\n view.on(op, null, h);\n }\n\n return view;\n}\n\nfunction removeOperatorListener(view, op, handler) {\n const h = findOperatorHandler(op, handler);\n if (h) op._targets.remove(h);\n return view;\n}\n\ninherits(View, Dataflow, {\n // -- DATAFLOW / RENDERING ----\n async evaluate(encode, prerun, postrun) {\n // evaluate dataflow and prerun\n await Dataflow.prototype.evaluate.call(this, encode, prerun); // render as needed\n\n if (this._redraw || this._resize) {\n try {\n if (this._renderer) {\n if (this._resize) {\n this._resize = 0;\n resizeRenderer(this);\n }\n\n await this._renderer.renderAsync(this._scenegraph.root);\n }\n\n this._redraw = false;\n } catch (e) {\n this.error(e);\n }\n } // evaluate postrun\n\n\n if (postrun) asyncCallback(this, postrun);\n return this;\n },\n\n dirty(item) {\n this._redraw = true;\n this._renderer && this._renderer.dirty(item);\n },\n\n // -- GET / SET ----\n description(text) {\n if (arguments.length) {\n const desc = text != null ? text + '' : null;\n if (desc !== this._desc) ariaLabel(this._el, this._desc = desc);\n return this;\n }\n\n return this._desc;\n },\n\n container() {\n return this._el;\n },\n\n scenegraph() {\n return this._scenegraph;\n },\n\n origin() {\n return this._origin.slice();\n },\n\n signal(name, value, options) {\n const op = lookupSignal(this, name);\n return arguments.length === 1 ? op.value : this.update(op, value, options);\n },\n\n width(_) {\n return arguments.length ? this.signal('width', _) : this.signal('width');\n },\n\n height(_) {\n return arguments.length ? this.signal('height', _) : this.signal('height');\n },\n\n padding(_) {\n return arguments.length ? this.signal('padding', padding(_)) : padding(this.signal('padding'));\n },\n\n autosize(_) {\n return arguments.length ? this.signal('autosize', _) : this.signal('autosize');\n },\n\n background(_) {\n return arguments.length ? this.signal('background', _) : this.signal('background');\n },\n\n renderer(type) {\n if (!arguments.length) return this._renderType;\n if (!renderModule(type)) error('Unrecognized renderer type: ' + type);\n\n if (type !== this._renderType) {\n this._renderType = type;\n\n this._resetRenderer();\n }\n\n return this;\n },\n\n tooltip(handler) {\n if (!arguments.length) return this._tooltip;\n\n if (handler !== this._tooltip) {\n this._tooltip = handler;\n\n this._resetRenderer();\n }\n\n return this;\n },\n\n loader(loader) {\n if (!arguments.length) return this._loader;\n\n if (loader !== this._loader) {\n Dataflow.prototype.loader.call(this, loader);\n\n this._resetRenderer();\n }\n\n return this;\n },\n\n resize() {\n // set flag to perform autosize\n this._autosize = 1; // touch autosize signal to ensure top-level ViewLayout runs\n\n return this.touch(lookupSignal(this, 'autosize'));\n },\n\n _resetRenderer() {\n if (this._renderer) {\n this._renderer = null;\n this.initialize(this._el, this._elBind);\n }\n },\n\n // -- SIZING ----\n _resizeView: resizeView,\n\n // -- EVENT HANDLING ----\n addEventListener(type, handler, options) {\n let callback = handler;\n\n if (!(options && options.trap === false)) {\n // wrap callback in error handler\n callback = trap(this, handler);\n callback.raw = handler;\n }\n\n this._handler.on(type, callback);\n\n return this;\n },\n\n removeEventListener(type, handler) {\n var handlers = this._handler.handlers(type),\n i = handlers.length,\n h,\n t; // search registered handlers, remove if match found\n\n\n while (--i >= 0) {\n t = handlers[i].type;\n h = handlers[i].handler;\n\n if (type === t && (handler === h || handler === h.raw)) {\n this._handler.off(t, h);\n\n break;\n }\n }\n\n return this;\n },\n\n addResizeListener(handler) {\n const l = this._resizeListeners;\n\n if (l.indexOf(handler) < 0) {\n // add handler if it isn't already registered\n // note: error trapping handled elsewhere, so\n // no need to wrap handlers here\n l.push(handler);\n }\n\n return this;\n },\n\n removeResizeListener(handler) {\n var l = this._resizeListeners,\n i = l.indexOf(handler);\n\n if (i >= 0) {\n l.splice(i, 1);\n }\n\n return this;\n },\n\n addSignalListener(name, handler) {\n return addOperatorListener(this, name, lookupSignal(this, name), handler);\n },\n\n removeSignalListener(name, handler) {\n return removeOperatorListener(this, lookupSignal(this, name), handler);\n },\n\n addDataListener(name, handler) {\n return addOperatorListener(this, name, dataref(this, name).values, handler);\n },\n\n removeDataListener(name, handler) {\n return removeOperatorListener(this, dataref(this, name).values, handler);\n },\n\n globalCursor(_) {\n if (arguments.length) {\n if (this._globalCursor !== !!_) {\n const prev = setCursor(this, null); // clear previous cursor\n\n this._globalCursor = !!_;\n if (prev) setCursor(this, prev); // swap cursor\n }\n\n return this;\n } else {\n return this._globalCursor;\n }\n },\n\n preventDefault(_) {\n if (arguments.length) {\n this._preventDefault = _;\n return this;\n } else {\n return this._preventDefault;\n }\n },\n\n timer,\n events,\n finalize,\n hover,\n // -- DATA ----\n data,\n change,\n insert,\n remove,\n // -- SCALES --\n scale,\n // -- INITIALIZATION ----\n initialize,\n // -- HEADLESS RENDERING ----\n toImageURL: renderToImageURL,\n toCanvas: renderToCanvas,\n toSVG: renderToSVG,\n // -- SAVE / RESTORE STATE ----\n getState,\n setState\n});\n\nexport { View };\n","import {Timer, now} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer, total = delay;\n if (delay == null) return t.restart(callback, delay, time), t;\n t._restart = t.restart;\n t.restart = function(callback, delay, time) {\n delay = +delay, time = time == null ? now() : +time;\n t._restart(function tick(elapsed) {\n elapsed += total;\n t._restart(tick, total += delay, time);\n callback(elapsed);\n }, delay, time);\n }\n t.restart(callback, delay, time);\n return t;\n}\n","const VIEW = 'view',\n LBRACK = '[',\n RBRACK = ']',\n LBRACE = '{',\n RBRACE = '}',\n COLON = ':',\n COMMA = ',',\n NAME = '@',\n GT = '>',\n ILLEGAL = /[[\\]{}]/,\n DEFAULT_MARKS = {\n '*': 1,\n arc: 1,\n area: 1,\n group: 1,\n image: 1,\n line: 1,\n path: 1,\n rect: 1,\n rule: 1,\n shape: 1,\n symbol: 1,\n text: 1,\n trail: 1\n};\nlet DEFAULT_SOURCE, MARKS;\n/**\n * Parse an event selector string.\n * Returns an array of event stream definitions.\n */\n\nfunction eventSelector (selector, source, marks) {\n DEFAULT_SOURCE = source || VIEW;\n MARKS = marks || DEFAULT_MARKS;\n return parseMerge(selector.trim()).map(parseSelector);\n}\n\nfunction isMarkType(type) {\n return MARKS[type];\n}\n\nfunction find(s, i, endChar, pushChar, popChar) {\n const n = s.length;\n let count = 0,\n c;\n\n for (; i < n; ++i) {\n c = s[i];\n if (!count && c === endChar) return i;else if (popChar && popChar.indexOf(c) >= 0) --count;else if (pushChar && pushChar.indexOf(c) >= 0) ++count;\n }\n\n return i;\n}\n\nfunction parseMerge(s) {\n const output = [],\n n = s.length;\n let start = 0,\n i = 0;\n\n while (i < n) {\n i = find(s, i, COMMA, LBRACK + LBRACE, RBRACK + RBRACE);\n output.push(s.substring(start, i).trim());\n start = ++i;\n }\n\n if (output.length === 0) {\n throw 'Empty event selector: ' + s;\n }\n\n return output;\n}\n\nfunction parseSelector(s) {\n return s[0] === '[' ? parseBetween(s) : parseStream(s);\n}\n\nfunction parseBetween(s) {\n const n = s.length;\n let i = 1,\n b;\n i = find(s, i, RBRACK, LBRACK, RBRACK);\n\n if (i === n) {\n throw 'Empty between selector: ' + s;\n }\n\n b = parseMerge(s.substring(1, i));\n\n if (b.length !== 2) {\n throw 'Between selector must have two elements: ' + s;\n }\n\n s = s.slice(i + 1).trim();\n\n if (s[0] !== GT) {\n throw 'Expected \\'>\\' after between selector: ' + s;\n }\n\n b = b.map(parseSelector);\n const stream = parseSelector(s.slice(1).trim());\n\n if (stream.between) {\n return {\n between: b,\n stream: stream\n };\n } else {\n stream.between = b;\n }\n\n return stream;\n}\n\nfunction parseStream(s) {\n const stream = {\n source: DEFAULT_SOURCE\n },\n source = [];\n let throttle = [0, 0],\n markname = 0,\n start = 0,\n n = s.length,\n i = 0,\n j,\n filter; // extract throttle from end\n\n if (s[n - 1] === RBRACE) {\n i = s.lastIndexOf(LBRACE);\n\n if (i >= 0) {\n try {\n throttle = parseThrottle(s.substring(i + 1, n - 1));\n } catch (e) {\n throw 'Invalid throttle specification: ' + s;\n }\n\n s = s.slice(0, i).trim();\n n = s.length;\n } else throw 'Unmatched right brace: ' + s;\n\n i = 0;\n }\n\n if (!n) throw s; // set name flag based on first char\n\n if (s[0] === NAME) markname = ++i; // extract first part of multi-part stream selector\n\n j = find(s, i, COLON);\n\n if (j < n) {\n source.push(s.substring(start, j).trim());\n start = i = ++j;\n } // extract remaining part of stream selector\n\n\n i = find(s, i, LBRACK);\n\n if (i === n) {\n source.push(s.substring(start, n).trim());\n } else {\n source.push(s.substring(start, i).trim());\n filter = [];\n start = ++i;\n if (start === n) throw 'Unmatched left bracket: ' + s;\n } // extract filters\n\n\n while (i < n) {\n i = find(s, i, RBRACK);\n if (i === n) throw 'Unmatched left bracket: ' + s;\n filter.push(s.substring(start, i).trim());\n if (i < n - 1 && s[++i] !== LBRACK) throw 'Expected left bracket: ' + s;\n start = ++i;\n } // marshall event stream specification\n\n\n if (!(n = source.length) || ILLEGAL.test(source[n - 1])) {\n throw 'Invalid event selector: ' + s;\n }\n\n if (n > 1) {\n stream.type = source[1];\n\n if (markname) {\n stream.markname = source[0].slice(1);\n } else if (isMarkType(source[0])) {\n stream.marktype = source[0];\n } else {\n stream.source = source[0];\n }\n } else {\n stream.type = source[0];\n }\n\n if (stream.type.slice(-1) === '!') {\n stream.consume = true;\n stream.type = stream.type.slice(0, -1);\n }\n\n if (filter != null) stream.filter = filter;\n if (throttle[0]) stream.throttle = throttle[0];\n if (throttle[1]) stream.debounce = throttle[1];\n return stream;\n}\n\nfunction parseThrottle(s) {\n const a = s.split(COMMA);\n if (!s.length || a.length > 2) throw s;\n return a.map(_ => {\n const x = +_;\n if (x !== x) throw s;\n return x;\n });\n}\n\nexport { eventSelector as parseSelector };\n","import { isObject, isArray, extend, hasOwnProperty, array, stringValue, peek, isString, error, splitAccessPath, mergeConfig } from 'vega-util';\nimport { parseExpression } from 'vega-functions';\nimport { parseSelector } from 'vega-event-selector';\nimport { isValidScaleType, isDiscrete, isQuantile, isDiscretizing, isContinuous } from 'vega-scale';\nimport { definition as definition$1 } from 'vega-dataflow';\n\nfunction parseAutosize (spec) {\n return isObject(spec) ? spec : {\n type: spec || 'pad'\n };\n}\n\nconst number = _ => +_ || 0;\n\nconst paddingObject = _ => ({\n top: _,\n bottom: _,\n left: _,\n right: _\n});\n\nfunction parsePadding (spec) {\n return !isObject(spec) ? paddingObject(number(spec)) : spec.signal ? spec : {\n top: number(spec.top),\n bottom: number(spec.bottom),\n left: number(spec.left),\n right: number(spec.right)\n };\n}\n\nconst encoder = _ => isObject(_) && !isArray(_) ? extend({}, _) : {\n value: _\n};\nfunction addEncode(object, name, value, set) {\n if (value != null) {\n const isEncoder = isObject(value) && !isArray(value) || isArray(value) && value.length && isObject(value[0]); // Always assign signal to update, even if the signal is from the enter block\n\n if (isEncoder) {\n object.update[name] = value;\n } else {\n object[set || 'enter'][name] = {\n value: value\n };\n }\n\n return 1;\n } else {\n return 0;\n }\n}\nfunction addEncoders(object, enter, update) {\n for (const name in enter) {\n addEncode(object, name, enter[name]);\n }\n\n for (const name in update) {\n addEncode(object, name, update[name], 'update');\n }\n}\nfunction extendEncode(encode, extra, skip) {\n for (const name in extra) {\n if (skip && hasOwnProperty(skip, name)) continue;\n encode[name] = extend(encode[name] || {}, extra[name]);\n }\n\n return encode;\n}\nfunction has(key, encode) {\n return encode && (encode.enter && encode.enter[key] || encode.update && encode.update[key]);\n}\n\nconst MarkRole = 'mark';\nconst FrameRole = 'frame';\nconst ScopeRole = 'scope';\nconst AxisRole = 'axis';\nconst AxisDomainRole = 'axis-domain';\nconst AxisGridRole = 'axis-grid';\nconst AxisLabelRole = 'axis-label';\nconst AxisTickRole = 'axis-tick';\nconst AxisTitleRole = 'axis-title';\nconst LegendRole = 'legend';\nconst LegendBandRole = 'legend-band';\nconst LegendEntryRole = 'legend-entry';\nconst LegendGradientRole = 'legend-gradient';\nconst LegendLabelRole = 'legend-label';\nconst LegendSymbolRole = 'legend-symbol';\nconst LegendTitleRole = 'legend-title';\nconst TitleRole = 'title';\nconst TitleTextRole = 'title-text';\nconst TitleSubtitleRole = 'title-subtitle';\n\nfunction applyDefaults (encode, type, role, style, config) {\n const defaults = {},\n enter = {};\n let update, key, skip, props; // if text mark, apply global lineBreak settings (#2370)\n\n key = 'lineBreak';\n\n if (type === 'text' && config[key] != null && !has(key, encode)) {\n applyDefault(defaults, key, config[key]);\n } // ignore legend and axis roles\n\n\n if (role == 'legend' || String(role).startsWith('axis')) {\n role = null;\n } // resolve mark config\n\n\n props = role === FrameRole ? config.group : role === MarkRole ? extend({}, config.mark, config[type]) : null;\n\n for (key in props) {\n // do not apply defaults if relevant fields are defined\n skip = has(key, encode) || (key === 'fill' || key === 'stroke') && (has('fill', encode) || has('stroke', encode));\n if (!skip) applyDefault(defaults, key, props[key]);\n } // resolve styles, apply with increasing precedence\n\n\n array(style).forEach(name => {\n const props = config.style && config.style[name];\n\n for (const key in props) {\n if (!has(key, encode)) {\n applyDefault(defaults, key, props[key]);\n }\n }\n });\n encode = extend({}, encode); // defensive copy\n\n for (key in defaults) {\n props = defaults[key];\n\n if (props.signal) {\n (update = update || {})[key] = props;\n } else {\n enter[key] = props;\n }\n }\n\n encode.enter = extend(enter, encode.enter);\n if (update) encode.update = extend(update, encode.update);\n return encode;\n}\n\nfunction applyDefault(defaults, key, value) {\n defaults[key] = value && value.signal ? {\n signal: value.signal\n } : {\n value: value\n };\n}\n\nconst scaleRef = scale => isString(scale) ? stringValue(scale) : scale.signal ? `(${scale.signal})` : field(scale);\n\nfunction entry$1(enc) {\n if (enc.gradient != null) {\n return gradient(enc);\n }\n\n let value = enc.signal ? `(${enc.signal})` : enc.color ? color(enc.color) : enc.field != null ? field(enc.field) : enc.value !== undefined ? stringValue(enc.value) : undefined;\n\n if (enc.scale != null) {\n value = scale(enc, value);\n }\n\n if (value === undefined) {\n value = null;\n }\n\n if (enc.exponent != null) {\n value = `pow(${value},${property(enc.exponent)})`;\n }\n\n if (enc.mult != null) {\n value += `*${property(enc.mult)}`;\n }\n\n if (enc.offset != null) {\n value += `+${property(enc.offset)}`;\n }\n\n if (enc.round) {\n value = `round(${value})`;\n }\n\n return value;\n}\n\nconst _color = (type, x, y, z) => `(${type}(${[x, y, z].map(entry$1).join(',')})+'')`;\n\nfunction color(enc) {\n return enc.c ? _color('hcl', enc.h, enc.c, enc.l) : enc.h || enc.s ? _color('hsl', enc.h, enc.s, enc.l) : enc.l || enc.a ? _color('lab', enc.l, enc.a, enc.b) : enc.r || enc.g || enc.b ? _color('rgb', enc.r, enc.g, enc.b) : null;\n}\n\nfunction gradient(enc) {\n // map undefined to null; expression lang does not allow undefined\n const args = [enc.start, enc.stop, enc.count].map(_ => _ == null ? null : stringValue(_)); // trim null inputs from the end\n\n while (args.length && peek(args) == null) args.pop();\n\n args.unshift(scaleRef(enc.gradient));\n return `gradient(${args.join(',')})`;\n}\n\nfunction property(property) {\n return isObject(property) ? '(' + entry$1(property) + ')' : property;\n}\n\nfunction field(ref) {\n return resolveField(isObject(ref) ? ref : {\n datum: ref\n });\n}\n\nfunction resolveField(ref) {\n let object, level, field;\n\n if (ref.signal) {\n object = 'datum';\n field = ref.signal;\n } else if (ref.group || ref.parent) {\n level = Math.max(1, ref.level || 1);\n object = 'item';\n\n while (level-- > 0) {\n object += '.mark.group';\n }\n\n if (ref.parent) {\n field = ref.parent;\n object += '.datum';\n } else {\n field = ref.group;\n }\n } else if (ref.datum) {\n object = 'datum';\n field = ref.datum;\n } else {\n error('Invalid field reference: ' + stringValue(ref));\n }\n\n if (!ref.signal) {\n field = isString(field) ? splitAccessPath(field).map(stringValue).join('][') : resolveField(field);\n }\n\n return object + '[' + field + ']';\n}\n\nfunction scale(enc, value) {\n const scale = scaleRef(enc.scale);\n\n if (enc.range != null) {\n // pull value from scale range\n value = `lerp(_range(${scale}), ${+enc.range})`;\n } else {\n // run value through scale and/or pull scale bandwidth\n if (value !== undefined) value = `_scale(${scale}, ${value})`;\n\n if (enc.band) {\n value = (value ? value + '+' : '') + `_bandwidth(${scale})` + (+enc.band === 1 ? '' : '*' + property(enc.band));\n\n if (enc.extra) {\n // include logic to handle extraneous elements\n value = `(datum.extra ? _scale(${scale}, datum.extra.value) : ${value})`;\n }\n }\n\n if (value == null) value = '0';\n }\n\n return value;\n}\n\nfunction rule (enc) {\n let code = '';\n enc.forEach(rule => {\n const value = entry$1(rule);\n code += rule.test ? `(${rule.test})?${value}:` : value;\n }); // if no else clause, terminate with null (#1366)\n\n if (peek(code) === ':') {\n code += 'null';\n }\n\n return code;\n}\n\nfunction parseEncode (encode, type, role, style, scope, params) {\n const enc = {};\n params = params || {};\n params.encoders = {\n $encode: enc\n };\n encode = applyDefaults(encode, type, role, style, scope.config);\n\n for (const key in encode) {\n enc[key] = parseBlock(encode[key], type, params, scope);\n }\n\n return params;\n}\n\nfunction parseBlock(block, marktype, params, scope) {\n const channels = {},\n fields = {};\n\n for (const name in block) {\n if (block[name] != null) {\n // skip any null entries\n channels[name] = parse$1(expr(block[name]), scope, params, fields);\n }\n }\n\n return {\n $expr: {\n marktype,\n channels\n },\n $fields: Object.keys(fields),\n $output: Object.keys(block)\n };\n}\n\nfunction expr(enc) {\n return isArray(enc) ? rule(enc) : entry$1(enc);\n}\n\nfunction parse$1(code, scope, params, fields) {\n const expr = parseExpression(code, scope);\n expr.$fields.forEach(name => fields[name] = 1);\n extend(params, expr.$params);\n return expr.$expr;\n}\n\nconst OUTER = 'outer',\n OUTER_INVALID = ['value', 'update', 'init', 'react', 'bind'];\n\nfunction outerError(prefix, name) {\n error(prefix + ' for \"outer\" push: ' + stringValue(name));\n}\n\nfunction parseSignal (signal, scope) {\n const name = signal.name;\n\n if (signal.push === OUTER) {\n // signal must already be defined, raise error if not\n if (!scope.signals[name]) outerError('No prior signal definition', name); // signal push must not use properties reserved for standard definition\n\n OUTER_INVALID.forEach(prop => {\n if (signal[prop] !== undefined) outerError('Invalid property ', prop);\n });\n } else {\n // define a new signal in the current scope\n const op = scope.addSignal(name, signal.value);\n if (signal.react === false) op.react = false;\n if (signal.bind) scope.addBinding(name, signal.bind);\n }\n}\n\nfunction Entry(type, value, params, parent) {\n this.id = -1;\n this.type = type;\n this.value = value;\n this.params = params;\n if (parent) this.parent = parent;\n}\nfunction entry(type, value, params, parent) {\n return new Entry(type, value, params, parent);\n}\nfunction operator(value, params) {\n return entry('operator', value, params);\n} // -----\n\nfunction ref(op) {\n const ref = {\n $ref: op.id\n }; // if operator not yet registered, cache ref to resolve later\n\n if (op.id < 0) (op.refs = op.refs || []).push(ref);\n return ref;\n}\nfunction fieldRef$1(field, name) {\n return name ? {\n $field: field,\n $name: name\n } : {\n $field: field\n };\n}\nconst keyFieldRef = fieldRef$1('key');\nfunction compareRef(fields, orders) {\n return {\n $compare: fields,\n $order: orders\n };\n}\nfunction keyRef(fields, flat) {\n const ref = {\n $key: fields\n };\n if (flat) ref.$flat = true;\n return ref;\n} // -----\n\nconst Ascending = 'ascending';\nconst Descending = 'descending';\nfunction sortKey(sort) {\n return !isObject(sort) ? '' : (sort.order === Descending ? '-' : '+') + aggrField(sort.op, sort.field);\n}\nfunction aggrField(op, field) {\n return (op && op.signal ? '$' + op.signal : op || '') + (op && field ? '_' : '') + (field && field.signal ? '$' + field.signal : field || '');\n} // -----\n\nconst Scope$1 = 'scope';\nconst View = 'view';\nfunction isSignal(_) {\n return _ && _.signal;\n}\nfunction isExpr$1(_) {\n return _ && _.expr;\n}\nfunction hasSignal(_) {\n if (isSignal(_)) return true;\n if (isObject(_)) for (const key in _) {\n if (hasSignal(_[key])) return true;\n }\n return false;\n}\nfunction value(specValue, defaultValue) {\n return specValue != null ? specValue : defaultValue;\n}\nfunction deref(v) {\n return v && v.signal || v;\n}\n\nconst Timer = 'timer';\nfunction parseStream(stream, scope) {\n const method = stream.merge ? mergeStream : stream.stream ? nestedStream : stream.type ? eventStream : error('Invalid stream specification: ' + stringValue(stream));\n return method(stream, scope);\n}\n\nfunction eventSource(source) {\n return source === Scope$1 ? View : source || View;\n}\n\nfunction mergeStream(stream, scope) {\n const list = stream.merge.map(s => parseStream(s, scope)),\n entry = streamParameters({\n merge: list\n }, stream, scope);\n return scope.addStream(entry).id;\n}\n\nfunction nestedStream(stream, scope) {\n const id = parseStream(stream.stream, scope),\n entry = streamParameters({\n stream: id\n }, stream, scope);\n return scope.addStream(entry).id;\n}\n\nfunction eventStream(stream, scope) {\n let id;\n\n if (stream.type === Timer) {\n id = scope.event(Timer, stream.throttle);\n stream = {\n between: stream.between,\n filter: stream.filter\n };\n } else {\n id = scope.event(eventSource(stream.source), stream.type);\n }\n\n const entry = streamParameters({\n stream: id\n }, stream, scope);\n return Object.keys(entry).length === 1 ? id : scope.addStream(entry).id;\n}\n\nfunction streamParameters(entry, stream, scope) {\n let param = stream.between;\n\n if (param) {\n if (param.length !== 2) {\n error('Stream \"between\" parameter must have 2 entries: ' + stringValue(stream));\n }\n\n entry.between = [parseStream(param[0], scope), parseStream(param[1], scope)];\n }\n\n param = stream.filter ? [].concat(stream.filter) : [];\n\n if (stream.marktype || stream.markname || stream.markrole) {\n // add filter for mark type, name and/or role\n param.push(filterMark(stream.marktype, stream.markname, stream.markrole));\n }\n\n if (stream.source === Scope$1) {\n // add filter to limit events from sub-scope only\n param.push('inScope(event.item)');\n }\n\n if (param.length) {\n entry.filter = parseExpression('(' + param.join(')&&(') + ')', scope).$expr;\n }\n\n if ((param = stream.throttle) != null) {\n entry.throttle = +param;\n }\n\n if ((param = stream.debounce) != null) {\n entry.debounce = +param;\n }\n\n if (stream.consume) {\n entry.consume = true;\n }\n\n return entry;\n}\n\nfunction filterMark(type, name, role) {\n const item = 'event.item';\n return item + (type && type !== '*' ? '&&' + item + '.mark.marktype===\\'' + type + '\\'' : '') + (role ? '&&' + item + '.mark.role===\\'' + role + '\\'' : '') + (name ? '&&' + item + '.mark.name===\\'' + name + '\\'' : '');\n}\n\nconst OP_VALUE_EXPR = {\n code: '_.$value',\n ast: {\n type: 'Identifier',\n value: 'value'\n }\n};\nfunction parseUpdate (spec, scope, target) {\n const encode = spec.encode,\n entry = {\n target: target\n };\n let events = spec.events,\n update = spec.update,\n sources = [];\n\n if (!events) {\n error('Signal update missing events specification.');\n } // interpret as an event selector string\n\n\n if (isString(events)) {\n events = parseSelector(events, scope.isSubscope() ? Scope$1 : View);\n } // separate event streams from signal updates\n\n\n events = array(events).filter(s => s.signal || s.scale ? (sources.push(s), 0) : 1); // merge internal operator listeners\n\n if (sources.length > 1) {\n sources = [mergeSources(sources)];\n } // merge event streams, include as source\n\n\n if (events.length) {\n sources.push(events.length > 1 ? {\n merge: events\n } : events[0]);\n }\n\n if (encode != null) {\n if (update) error('Signal encode and update are mutually exclusive.');\n update = 'encode(item(),' + stringValue(encode) + ')';\n } // resolve update value\n\n\n entry.update = isString(update) ? parseExpression(update, scope) : update.expr != null ? parseExpression(update.expr, scope) : update.value != null ? update.value : update.signal != null ? {\n $expr: OP_VALUE_EXPR,\n $params: {\n $value: scope.signalRef(update.signal)\n }\n } : error('Invalid signal update specification.');\n\n if (spec.force) {\n entry.options = {\n force: true\n };\n }\n\n sources.forEach(source => scope.addUpdate(extend(streamSource(source, scope), entry)));\n}\n\nfunction streamSource(stream, scope) {\n return {\n source: stream.signal ? scope.signalRef(stream.signal) : stream.scale ? scope.scaleRef(stream.scale) : parseStream(stream, scope)\n };\n}\n\nfunction mergeSources(sources) {\n return {\n signal: '[' + sources.map(s => s.scale ? 'scale(\"' + s.scale + '\")' : s.signal) + ']'\n };\n}\n\nfunction parseSignalUpdates (signal, scope) {\n const op = scope.getSignal(signal.name);\n let expr = signal.update;\n\n if (signal.init) {\n if (expr) {\n error('Signals can not include both init and update expressions.');\n } else {\n expr = signal.init;\n op.initonly = true;\n }\n }\n\n if (expr) {\n expr = parseExpression(expr, scope);\n op.update = expr.$expr;\n op.params = expr.$params;\n }\n\n if (signal.on) {\n signal.on.forEach(_ => parseUpdate(_, scope, op.id));\n }\n}\n\nconst transform = name => (params, value, parent) => entry(name, value, params || undefined, parent);\n\nconst Aggregate = transform('aggregate');\nconst AxisTicks = transform('axisticks');\nconst Bound = transform('bound');\nconst Collect = transform('collect');\nconst Compare = transform('compare');\nconst DataJoin = transform('datajoin');\nconst Encode = transform('encode');\nconst Expression = transform('expression');\nconst Facet = transform('facet');\nconst Field = transform('field');\nconst Key = transform('key');\nconst LegendEntries = transform('legendentries');\nconst Load = transform('load');\nconst Mark = transform('mark');\nconst MultiExtent = transform('multiextent');\nconst MultiValues = transform('multivalues');\nconst Overlap = transform('overlap');\nconst Params = transform('params');\nconst PreFacet = transform('prefacet');\nconst Projection = transform('projection');\nconst Proxy = transform('proxy');\nconst Relay = transform('relay');\nconst Render = transform('render');\nconst Scale = transform('scale');\nconst Sieve = transform('sieve');\nconst SortItems = transform('sortitems');\nconst ViewLayout = transform('viewlayout');\nconst Values = transform('values');\n\nlet FIELD_REF_ID = 0;\nconst MULTIDOMAIN_SORT_OPS = {\n min: 'min',\n max: 'max',\n count: 'sum'\n};\nfunction initScale(spec, scope) {\n const type = spec.type || 'linear';\n\n if (!isValidScaleType(type)) {\n error('Unrecognized scale type: ' + stringValue(type));\n }\n\n scope.addScale(spec.name, {\n type,\n domain: undefined\n });\n}\nfunction parseScale(spec, scope) {\n const params = scope.getScale(spec.name).params;\n let key;\n params.domain = parseScaleDomain(spec.domain, spec, scope);\n\n if (spec.range != null) {\n params.range = parseScaleRange(spec, scope, params);\n }\n\n if (spec.interpolate != null) {\n parseScaleInterpolate(spec.interpolate, params);\n }\n\n if (spec.nice != null) {\n params.nice = parseScaleNice(spec.nice);\n }\n\n if (spec.bins != null) {\n params.bins = parseScaleBins(spec.bins, scope);\n }\n\n for (key in spec) {\n if (hasOwnProperty(params, key) || key === 'name') continue;\n params[key] = parseLiteral(spec[key], scope);\n }\n}\n\nfunction parseLiteral(v, scope) {\n return !isObject(v) ? v : v.signal ? scope.signalRef(v.signal) : error('Unsupported object: ' + stringValue(v));\n}\n\nfunction parseArray(v, scope) {\n return v.signal ? scope.signalRef(v.signal) : v.map(v => parseLiteral(v, scope));\n}\n\nfunction dataLookupError(name) {\n error('Can not find data set: ' + stringValue(name));\n} // -- SCALE DOMAIN ----\n\n\nfunction parseScaleDomain(domain, spec, scope) {\n if (!domain) {\n if (spec.domainMin != null || spec.domainMax != null) {\n error('No scale domain defined for domainMin/domainMax to override.');\n }\n\n return; // default domain\n }\n\n return domain.signal ? scope.signalRef(domain.signal) : (isArray(domain) ? explicitDomain : domain.fields ? multipleDomain : singularDomain)(domain, spec, scope);\n}\n\nfunction explicitDomain(domain, spec, scope) {\n return domain.map(v => parseLiteral(v, scope));\n}\n\nfunction singularDomain(domain, spec, scope) {\n const data = scope.getData(domain.data);\n if (!data) dataLookupError(domain.data);\n return isDiscrete(spec.type) ? data.valuesRef(scope, domain.field, parseSort(domain.sort, false)) : isQuantile(spec.type) ? data.domainRef(scope, domain.field) : data.extentRef(scope, domain.field);\n}\n\nfunction multipleDomain(domain, spec, scope) {\n const data = domain.data,\n fields = domain.fields.reduce((dom, d) => {\n d = isString(d) ? {\n data: data,\n field: d\n } : isArray(d) || d.signal ? fieldRef(d, scope) : d;\n dom.push(d);\n return dom;\n }, []);\n return (isDiscrete(spec.type) ? ordinalMultipleDomain : isQuantile(spec.type) ? quantileMultipleDomain : numericMultipleDomain)(domain, scope, fields);\n}\n\nfunction fieldRef(data, scope) {\n const name = '_:vega:_' + FIELD_REF_ID++,\n coll = Collect({});\n\n if (isArray(data)) {\n coll.value = {\n $ingest: data\n };\n } else if (data.signal) {\n const code = 'setdata(' + stringValue(name) + ',' + data.signal + ')';\n coll.params.input = scope.signalRef(code);\n }\n\n scope.addDataPipeline(name, [coll, Sieve({})]);\n return {\n data: name,\n field: 'data'\n };\n}\n\nfunction ordinalMultipleDomain(domain, scope, fields) {\n const sort = parseSort(domain.sort, true);\n let a, v; // get value counts for each domain field\n\n const counts = fields.map(f => {\n const data = scope.getData(f.data);\n if (!data) dataLookupError(f.data);\n return data.countsRef(scope, f.field, sort);\n }); // aggregate the results from each domain field\n\n const p = {\n groupby: keyFieldRef,\n pulse: counts\n };\n\n if (sort) {\n a = sort.op || 'count';\n v = sort.field ? aggrField(a, sort.field) : 'count';\n p.ops = [MULTIDOMAIN_SORT_OPS[a]];\n p.fields = [scope.fieldRef(v)];\n p.as = [v];\n }\n\n a = scope.add(Aggregate(p)); // collect aggregate output\n\n const c = scope.add(Collect({\n pulse: ref(a)\n })); // extract values for combined domain\n\n v = scope.add(Values({\n field: keyFieldRef,\n sort: scope.sortRef(sort),\n pulse: ref(c)\n }));\n return ref(v);\n}\n\nfunction parseSort(sort, multidomain) {\n if (sort) {\n if (!sort.field && !sort.op) {\n if (isObject(sort)) sort.field = 'key';else sort = {\n field: 'key'\n };\n } else if (!sort.field && sort.op !== 'count') {\n error('No field provided for sort aggregate op: ' + sort.op);\n } else if (multidomain && sort.field) {\n if (sort.op && !MULTIDOMAIN_SORT_OPS[sort.op]) {\n error('Multiple domain scales can not be sorted using ' + sort.op);\n }\n }\n }\n\n return sort;\n}\n\nfunction quantileMultipleDomain(domain, scope, fields) {\n // get value arrays for each domain field\n const values = fields.map(f => {\n const data = scope.getData(f.data);\n if (!data) dataLookupError(f.data);\n return data.domainRef(scope, f.field);\n }); // combine value arrays\n\n return ref(scope.add(MultiValues({\n values: values\n })));\n}\n\nfunction numericMultipleDomain(domain, scope, fields) {\n // get extents for each domain field\n const extents = fields.map(f => {\n const data = scope.getData(f.data);\n if (!data) dataLookupError(f.data);\n return data.extentRef(scope, f.field);\n }); // combine extents\n\n return ref(scope.add(MultiExtent({\n extents: extents\n })));\n} // -- SCALE BINS -----\n\n\nfunction parseScaleBins(v, scope) {\n return v.signal || isArray(v) ? parseArray(v, scope) : scope.objectProperty(v);\n} // -- SCALE NICE -----\n\n\nfunction parseScaleNice(nice) {\n return isObject(nice) ? {\n interval: parseLiteral(nice.interval),\n step: parseLiteral(nice.step)\n } : parseLiteral(nice);\n} // -- SCALE INTERPOLATION -----\n\n\nfunction parseScaleInterpolate(interpolate, params) {\n params.interpolate = parseLiteral(interpolate.type || interpolate);\n\n if (interpolate.gamma != null) {\n params.interpolateGamma = parseLiteral(interpolate.gamma);\n }\n} // -- SCALE RANGE -----\n\n\nfunction parseScaleRange(spec, scope, params) {\n const config = scope.config.range;\n let range = spec.range;\n\n if (range.signal) {\n return scope.signalRef(range.signal);\n } else if (isString(range)) {\n if (config && hasOwnProperty(config, range)) {\n spec = extend({}, spec, {\n range: config[range]\n });\n return parseScaleRange(spec, scope, params);\n } else if (range === 'width') {\n range = [0, {\n signal: 'width'\n }];\n } else if (range === 'height') {\n range = isDiscrete(spec.type) ? [0, {\n signal: 'height'\n }] : [{\n signal: 'height'\n }, 0];\n } else {\n error('Unrecognized scale range value: ' + stringValue(range));\n }\n } else if (range.scheme) {\n params.scheme = isArray(range.scheme) ? parseArray(range.scheme, scope) : parseLiteral(range.scheme, scope);\n if (range.extent) params.schemeExtent = parseArray(range.extent, scope);\n if (range.count) params.schemeCount = parseLiteral(range.count, scope);\n return;\n } else if (range.step) {\n params.rangeStep = parseLiteral(range.step, scope);\n return;\n } else if (isDiscrete(spec.type) && !isArray(range)) {\n return parseScaleDomain(range, spec, scope);\n } else if (!isArray(range)) {\n error('Unsupported range type: ' + stringValue(range));\n }\n\n return range.map(v => (isArray(v) ? parseArray : parseLiteral)(v, scope));\n}\n\nfunction parseProjection (proj, scope) {\n const config = scope.config.projection || {},\n params = {};\n\n for (const name in proj) {\n if (name === 'name') continue;\n params[name] = parseParameter$1(proj[name], name, scope);\n } // apply projection defaults from config\n\n\n for (const name in config) {\n if (params[name] == null) {\n params[name] = parseParameter$1(config[name], name, scope);\n }\n }\n\n scope.addProjection(proj.name, params);\n}\n\nfunction parseParameter$1(_, name, scope) {\n return isArray(_) ? _.map(_ => parseParameter$1(_, name, scope)) : !isObject(_) ? _ : _.signal ? scope.signalRef(_.signal) : name === 'fit' ? _ : error('Unsupported parameter object: ' + stringValue(_));\n}\n\nconst Top = 'top';\nconst Left = 'left';\nconst Right = 'right';\nconst Bottom = 'bottom';\nconst Center = 'center';\nconst Vertical = 'vertical';\nconst Start = 'start';\nconst Middle = 'middle';\nconst End = 'end';\nconst Index = 'index';\nconst Label = 'label';\nconst Offset = 'offset';\nconst Perc = 'perc';\nconst Perc2 = 'perc2';\nconst Value = 'value';\nconst GuideLabelStyle = 'guide-label';\nconst GuideTitleStyle = 'guide-title';\nconst GroupTitleStyle = 'group-title';\nconst GroupSubtitleStyle = 'group-subtitle';\nconst Symbols = 'symbol';\nconst Gradient = 'gradient';\nconst Discrete = 'discrete';\nconst Size = 'size';\nconst Shape = 'shape';\nconst Fill = 'fill';\nconst Stroke = 'stroke';\nconst StrokeWidth = 'strokeWidth';\nconst StrokeDash = 'strokeDash';\nconst Opacity = 'opacity'; // Encoding channels supported by legends\n// In priority order of 'canonical' scale\n\nconst LegendScales = [Size, Shape, Fill, Stroke, StrokeWidth, StrokeDash, Opacity];\nconst Skip = {\n name: 1,\n style: 1,\n interactive: 1\n};\nconst zero = {\n value: 0\n};\nconst one = {\n value: 1\n};\n\nconst GroupMark = 'group';\nconst RectMark = 'rect';\nconst RuleMark = 'rule';\nconst SymbolMark = 'symbol';\nconst TextMark = 'text';\n\nfunction guideGroup (mark) {\n mark.type = GroupMark;\n mark.interactive = mark.interactive || false;\n return mark;\n}\n\nfunction lookup(spec, config) {\n const _ = (name, dflt) => value(spec[name], value(config[name], dflt));\n\n _.isVertical = s => Vertical === value(spec.direction, config.direction || (s ? config.symbolDirection : config.gradientDirection));\n\n _.gradientLength = () => value(spec.gradientLength, config.gradientLength || config.gradientWidth);\n\n _.gradientThickness = () => value(spec.gradientThickness, config.gradientThickness || config.gradientHeight);\n\n _.entryColumns = () => value(spec.columns, value(config.columns, +_.isVertical(true)));\n\n return _;\n}\nfunction getEncoding(name, encode) {\n const v = encode && (encode.update && encode.update[name] || encode.enter && encode.enter[name]);\n return v && v.signal ? v : v ? v.value : null;\n}\nfunction getStyle(name, scope, style) {\n const s = scope.config.style[style];\n return s && s[name];\n}\nfunction anchorExpr(s, e, m) {\n return `item.anchor === '${Start}' ? ${s} : item.anchor === '${End}' ? ${e} : ${m}`;\n}\nconst alignExpr$1 = anchorExpr(stringValue(Left), stringValue(Right), stringValue(Center));\nfunction tickBand(_) {\n const v = _('tickBand');\n\n let offset = _('tickOffset'),\n band,\n extra;\n\n if (!v) {\n // if no tick band entry, fall back on other properties\n band = _('bandPosition');\n extra = _('tickExtra');\n } else if (v.signal) {\n // if signal, augment code to interpret values\n band = {\n signal: `(${v.signal}) === 'extent' ? 1 : 0.5`\n };\n extra = {\n signal: `(${v.signal}) === 'extent'`\n };\n\n if (!isObject(offset)) {\n offset = {\n signal: `(${v.signal}) === 'extent' ? 0 : ${offset}`\n };\n }\n } else if (v === 'extent') {\n // if constant, simply set values\n band = 1;\n extra = true;\n offset = 0;\n } else {\n band = 0.5;\n extra = false;\n }\n\n return {\n extra,\n band,\n offset\n };\n}\nfunction extendOffset(value, offset) {\n return !offset ? value : !value ? offset : !isObject(value) ? {\n value,\n offset\n } : Object.assign({}, value, {\n offset: extendOffset(value.offset, offset)\n });\n}\n\nfunction guideMark (mark, extras) {\n if (extras) {\n mark.name = extras.name;\n mark.style = extras.style || mark.style;\n mark.interactive = !!extras.interactive;\n mark.encode = extendEncode(mark.encode, extras, Skip);\n } else {\n mark.interactive = false;\n }\n\n return mark;\n}\n\nfunction legendGradient (spec, scale, config, userEncode) {\n const _ = lookup(spec, config),\n vertical = _.isVertical(),\n thickness = _.gradientThickness(),\n length = _.gradientLength();\n\n let enter, start, stop, width, height;\n\n if (vertical) {\n start = [0, 1];\n stop = [0, 0];\n width = thickness;\n height = length;\n } else {\n start = [0, 0];\n stop = [1, 0];\n width = length;\n height = thickness;\n }\n\n const encode = {\n enter: enter = {\n opacity: zero,\n x: zero,\n y: zero,\n width: encoder(width),\n height: encoder(height)\n },\n update: extend({}, enter, {\n opacity: one,\n fill: {\n gradient: scale,\n start: start,\n stop: stop\n }\n }),\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n stroke: _('gradientStrokeColor'),\n strokeWidth: _('gradientStrokeWidth')\n }, {\n // update\n opacity: _('gradientOpacity')\n });\n return guideMark({\n type: RectMark,\n role: LegendGradientRole,\n encode\n }, userEncode);\n}\n\nfunction legendGradientDiscrete (spec, scale, config, userEncode, dataRef) {\n const _ = lookup(spec, config),\n vertical = _.isVertical(),\n thickness = _.gradientThickness(),\n length = _.gradientLength();\n\n let u,\n v,\n uu,\n vv,\n adjust = '';\n vertical ? (u = 'y', uu = 'y2', v = 'x', vv = 'width', adjust = '1-') : (u = 'x', uu = 'x2', v = 'y', vv = 'height');\n const enter = {\n opacity: zero,\n fill: {\n scale: scale,\n field: Value\n }\n };\n enter[u] = {\n signal: adjust + 'datum.' + Perc,\n mult: length\n };\n enter[v] = zero;\n enter[uu] = {\n signal: adjust + 'datum.' + Perc2,\n mult: length\n };\n enter[vv] = encoder(thickness);\n const encode = {\n enter: enter,\n update: extend({}, enter, {\n opacity: one\n }),\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n stroke: _('gradientStrokeColor'),\n strokeWidth: _('gradientStrokeWidth')\n }, {\n // update\n opacity: _('gradientOpacity')\n });\n return guideMark({\n type: RectMark,\n role: LegendBandRole,\n key: Value,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nconst alignExpr = `datum.${Perc}<=0?\"${Left}\":datum.${Perc}>=1?\"${Right}\":\"${Center}\"`,\n baselineExpr = `datum.${Perc}<=0?\"${Bottom}\":datum.${Perc}>=1?\"${Top}\":\"${Middle}\"`;\nfunction legendGradientLabels (spec, config, userEncode, dataRef) {\n const _ = lookup(spec, config),\n vertical = _.isVertical(),\n thickness = encoder(_.gradientThickness()),\n length = _.gradientLength();\n\n let overlap = _('labelOverlap'),\n enter,\n update,\n u,\n v,\n adjust = '';\n\n const encode = {\n enter: enter = {\n opacity: zero\n },\n update: update = {\n opacity: one,\n text: {\n field: Label\n }\n },\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n fill: _('labelColor'),\n fillOpacity: _('labelOpacity'),\n font: _('labelFont'),\n fontSize: _('labelFontSize'),\n fontStyle: _('labelFontStyle'),\n fontWeight: _('labelFontWeight'),\n limit: value(spec.labelLimit, config.gradientLabelLimit)\n });\n\n if (vertical) {\n enter.align = {\n value: 'left'\n };\n enter.baseline = update.baseline = {\n signal: baselineExpr\n };\n u = 'y';\n v = 'x';\n adjust = '1-';\n } else {\n enter.align = update.align = {\n signal: alignExpr\n };\n enter.baseline = {\n value: 'top'\n };\n u = 'x';\n v = 'y';\n }\n\n enter[u] = update[u] = {\n signal: adjust + 'datum.' + Perc,\n mult: length\n };\n enter[v] = update[v] = thickness;\n thickness.offset = value(spec.labelOffset, config.gradientLabelOffset) || 0;\n overlap = overlap ? {\n separation: _('labelSeparation'),\n method: overlap,\n order: 'datum.' + Index\n } : undefined; // type, role, style, key, dataRef, encode, extras\n\n return guideMark({\n type: TextMark,\n role: LegendLabelRole,\n style: GuideLabelStyle,\n key: Value,\n from: dataRef,\n encode,\n overlap\n }, userEncode);\n}\n\nfunction legendSymbolGroups (spec, config, userEncode, dataRef, columns) {\n const _ = lookup(spec, config),\n entries = userEncode.entries,\n interactive = !!(entries && entries.interactive),\n name = entries ? entries.name : undefined,\n height = _('clipHeight'),\n symbolOffset = _('symbolOffset'),\n valueRef = {\n data: 'value'\n },\n xSignal = `(${columns}) ? datum.${Offset} : datum.${Size}`,\n yEncode = height ? encoder(height) : {\n field: Size\n },\n index = `datum.${Index}`,\n ncols = `max(1, ${columns})`;\n\n let encode, enter, update, nrows, sort;\n yEncode.mult = 0.5; // -- LEGEND SYMBOLS --\n\n encode = {\n enter: enter = {\n opacity: zero,\n x: {\n signal: xSignal,\n mult: 0.5,\n offset: symbolOffset\n },\n y: yEncode\n },\n update: update = {\n opacity: one,\n x: enter.x,\n y: enter.y\n },\n exit: {\n opacity: zero\n }\n };\n let baseFill = null,\n baseStroke = null;\n\n if (!spec.fill) {\n baseFill = config.symbolBaseFillColor;\n baseStroke = config.symbolBaseStrokeColor;\n }\n\n addEncoders(encode, {\n fill: _('symbolFillColor', baseFill),\n shape: _('symbolType'),\n size: _('symbolSize'),\n stroke: _('symbolStrokeColor', baseStroke),\n strokeDash: _('symbolDash'),\n strokeDashOffset: _('symbolDashOffset'),\n strokeWidth: _('symbolStrokeWidth')\n }, {\n // update\n opacity: _('symbolOpacity')\n });\n LegendScales.forEach(scale => {\n if (spec[scale]) {\n update[scale] = enter[scale] = {\n scale: spec[scale],\n field: Value\n };\n }\n });\n const symbols = guideMark({\n type: SymbolMark,\n role: LegendSymbolRole,\n key: Value,\n from: valueRef,\n clip: height ? true : undefined,\n encode\n }, userEncode.symbols); // -- LEGEND LABELS --\n\n const labelOffset = encoder(symbolOffset);\n labelOffset.offset = _('labelOffset');\n encode = {\n enter: enter = {\n opacity: zero,\n x: {\n signal: xSignal,\n offset: labelOffset\n },\n y: yEncode\n },\n update: update = {\n opacity: one,\n text: {\n field: Label\n },\n x: enter.x,\n y: enter.y\n },\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n align: _('labelAlign'),\n baseline: _('labelBaseline'),\n fill: _('labelColor'),\n fillOpacity: _('labelOpacity'),\n font: _('labelFont'),\n fontSize: _('labelFontSize'),\n fontStyle: _('labelFontStyle'),\n fontWeight: _('labelFontWeight'),\n limit: _('labelLimit')\n });\n const labels = guideMark({\n type: TextMark,\n role: LegendLabelRole,\n style: GuideLabelStyle,\n key: Value,\n from: valueRef,\n encode\n }, userEncode.labels); // -- LEGEND ENTRY GROUPS --\n\n encode = {\n enter: {\n noBound: {\n value: !height\n },\n // ignore width/height in bounds calc\n width: zero,\n height: height ? encoder(height) : zero,\n opacity: zero\n },\n exit: {\n opacity: zero\n },\n update: update = {\n opacity: one,\n row: {\n signal: null\n },\n column: {\n signal: null\n }\n }\n }; // annotate and sort groups to ensure correct ordering\n\n if (_.isVertical(true)) {\n nrows = `ceil(item.mark.items.length / ${ncols})`;\n update.row.signal = `${index}%${nrows}`;\n update.column.signal = `floor(${index} / ${nrows})`;\n sort = {\n field: ['row', index]\n };\n } else {\n update.row.signal = `floor(${index} / ${ncols})`;\n update.column.signal = `${index} % ${ncols}`;\n sort = {\n field: index\n };\n } // handle zero column case (implies infinite columns)\n\n\n update.column.signal = `(${columns})?${update.column.signal}:${index}`; // facet legend entries into sub-groups\n\n dataRef = {\n facet: {\n data: dataRef,\n name: 'value',\n groupby: Index\n }\n };\n return guideGroup({\n role: ScopeRole,\n from: dataRef,\n encode: extendEncode(encode, entries, Skip),\n marks: [symbols, labels],\n name,\n interactive,\n sort\n });\n}\nfunction legendSymbolLayout(spec, config) {\n const _ = lookup(spec, config); // layout parameters for legend entries\n\n\n return {\n align: _('gridAlign'),\n columns: _.entryColumns(),\n center: {\n row: true,\n column: false\n },\n padding: {\n row: _('rowPadding'),\n column: _('columnPadding')\n }\n };\n}\n\nconst isL = 'item.orient === \"left\"',\n isR = 'item.orient === \"right\"',\n isLR = `(${isL} || ${isR})`,\n isVG = `datum.vgrad && ${isLR}`,\n baseline = anchorExpr('\"top\"', '\"bottom\"', '\"middle\"'),\n alignFlip = anchorExpr('\"right\"', '\"left\"', '\"center\"'),\n exprAlign = `datum.vgrad && ${isR} ? (${alignFlip}) : (${isLR} && !(datum.vgrad && ${isL})) ? \"left\" : ${alignExpr$1}`,\n exprAnchor = `item._anchor || (${isLR} ? \"middle\" : \"start\")`,\n exprAngle = `${isVG} ? (${isL} ? -90 : 90) : 0`,\n exprBaseline = `${isLR} ? (datum.vgrad ? (${isR} ? \"bottom\" : \"top\") : ${baseline}) : \"top\"`;\nfunction legendTitle (spec, config, userEncode, dataRef) {\n const _ = lookup(spec, config);\n\n const encode = {\n enter: {\n opacity: zero\n },\n update: {\n opacity: one,\n x: {\n field: {\n group: 'padding'\n }\n },\n y: {\n field: {\n group: 'padding'\n }\n }\n },\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n orient: _('titleOrient'),\n _anchor: _('titleAnchor'),\n anchor: {\n signal: exprAnchor\n },\n angle: {\n signal: exprAngle\n },\n align: {\n signal: exprAlign\n },\n baseline: {\n signal: exprBaseline\n },\n text: spec.title,\n fill: _('titleColor'),\n fillOpacity: _('titleOpacity'),\n font: _('titleFont'),\n fontSize: _('titleFontSize'),\n fontStyle: _('titleFontStyle'),\n fontWeight: _('titleFontWeight'),\n limit: _('titleLimit'),\n lineHeight: _('titleLineHeight')\n }, {\n // require update\n align: _('titleAlign'),\n baseline: _('titleBaseline')\n });\n return guideMark({\n type: TextMark,\n role: LegendTitleRole,\n style: GuideTitleStyle,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nfunction clip (clip, scope) {\n let expr;\n\n if (isObject(clip)) {\n if (clip.signal) {\n expr = clip.signal;\n } else if (clip.path) {\n expr = 'pathShape(' + param(clip.path) + ')';\n } else if (clip.sphere) {\n expr = 'geoShape(' + param(clip.sphere) + ', {type: \"Sphere\"})';\n }\n }\n\n return expr ? scope.signalRef(expr) : !!clip;\n}\n\nfunction param(value) {\n return isObject(value) && value.signal ? value.signal : stringValue(value);\n}\n\nfunction getRole (spec) {\n const role = spec.role || '';\n return !role.indexOf('axis') || !role.indexOf('legend') || !role.indexOf('title') ? role : spec.type === GroupMark ? ScopeRole : role || MarkRole;\n}\n\nfunction definition (spec) {\n return {\n marktype: spec.type,\n name: spec.name || undefined,\n role: spec.role || getRole(spec),\n zindex: +spec.zindex || undefined,\n aria: spec.aria,\n description: spec.description\n };\n}\n\nfunction interactive (spec, scope) {\n return spec && spec.signal ? scope.signalRef(spec.signal) : spec === false ? false : true;\n}\n\n/**\n * Parse a data transform specification.\n */\n\nfunction parseTransform (spec, scope) {\n const def = definition$1(spec.type);\n if (!def) error('Unrecognized transform type: ' + stringValue(spec.type));\n const t = entry(def.type.toLowerCase(), null, parseParameters(def, spec, scope));\n if (spec.signal) scope.addSignal(spec.signal, scope.proxy(t));\n t.metadata = def.metadata || {};\n return t;\n}\n/**\n * Parse all parameters of a data transform.\n */\n\nfunction parseParameters(def, spec, scope) {\n const params = {},\n n = def.params.length;\n\n for (let i = 0; i < n; ++i) {\n const pdef = def.params[i];\n params[pdef.name] = parseParameter(pdef, spec, scope);\n }\n\n return params;\n}\n/**\n * Parse a data transform parameter.\n */\n\n\nfunction parseParameter(def, spec, scope) {\n const type = def.type,\n value = spec[def.name];\n\n if (type === 'index') {\n return parseIndexParameter(def, spec, scope);\n } else if (value === undefined) {\n if (def.required) {\n error('Missing required ' + stringValue(spec.type) + ' parameter: ' + stringValue(def.name));\n }\n\n return;\n } else if (type === 'param') {\n return parseSubParameters(def, spec, scope);\n } else if (type === 'projection') {\n return scope.projectionRef(spec[def.name]);\n }\n\n return def.array && !isSignal(value) ? value.map(v => parameterValue(def, v, scope)) : parameterValue(def, value, scope);\n}\n/**\n * Parse a single parameter value.\n */\n\n\nfunction parameterValue(def, value, scope) {\n const type = def.type;\n\n if (isSignal(value)) {\n return isExpr(type) ? error('Expression references can not be signals.') : isField(type) ? scope.fieldRef(value) : isCompare(type) ? scope.compareRef(value) : scope.signalRef(value.signal);\n } else {\n const expr = def.expr || isField(type);\n return expr && outerExpr(value) ? scope.exprRef(value.expr, value.as) : expr && outerField(value) ? fieldRef$1(value.field, value.as) : isExpr(type) ? parseExpression(value, scope) : isData(type) ? ref(scope.getData(value).values) : isField(type) ? fieldRef$1(value) : isCompare(type) ? scope.compareRef(value) : value;\n }\n}\n/**\n * Parse parameter for accessing an index of another data set.\n */\n\n\nfunction parseIndexParameter(def, spec, scope) {\n if (!isString(spec.from)) {\n error('Lookup \"from\" parameter must be a string literal.');\n }\n\n return scope.getData(spec.from).lookupRef(scope, spec.key);\n}\n/**\n * Parse a parameter that contains one or more sub-parameter objects.\n */\n\n\nfunction parseSubParameters(def, spec, scope) {\n const value = spec[def.name];\n\n if (def.array) {\n if (!isArray(value)) {\n // signals not allowed!\n error('Expected an array of sub-parameters. Instead: ' + stringValue(value));\n }\n\n return value.map(v => parseSubParameter(def, v, scope));\n } else {\n return parseSubParameter(def, value, scope);\n }\n}\n/**\n * Parse a sub-parameter object.\n */\n\n\nfunction parseSubParameter(def, value, scope) {\n const n = def.params.length;\n let pdef; // loop over defs to find matching key\n\n for (let i = 0; i < n; ++i) {\n pdef = def.params[i];\n\n for (const k in pdef.key) {\n if (pdef.key[k] !== value[k]) {\n pdef = null;\n break;\n }\n }\n\n if (pdef) break;\n } // raise error if matching key not found\n\n\n if (!pdef) error('Unsupported parameter: ' + stringValue(value)); // parse params, create Params transform, return ref\n\n const params = extend(parseParameters(pdef, value, scope), pdef.key);\n return ref(scope.add(Params(params)));\n} // -- Utilities -----\n\n\nconst outerExpr = _ => _ && _.expr;\nconst outerField = _ => _ && _.field;\nconst isData = _ => _ === 'data';\nconst isExpr = _ => _ === 'expr';\nconst isField = _ => _ === 'field';\nconst isCompare = _ => _ === 'compare';\n\nfunction parseData$1 (from, group, scope) {\n let facet, key, op, dataRef, parent; // if no source data, generate singleton datum\n\n if (!from) {\n dataRef = ref(scope.add(Collect(null, [{}])));\n } // if faceted, process facet specification\n else if (facet = from.facet) {\n if (!group) error('Only group marks can be faceted.'); // use pre-faceted source data, if available\n\n if (facet.field != null) {\n dataRef = parent = getDataRef(facet, scope);\n } else {\n // generate facet aggregates if no direct data specification\n if (!from.data) {\n op = parseTransform(extend({\n type: 'aggregate',\n groupby: array(facet.groupby)\n }, facet.aggregate), scope);\n op.params.key = scope.keyRef(facet.groupby);\n op.params.pulse = getDataRef(facet, scope);\n dataRef = parent = ref(scope.add(op));\n } else {\n parent = ref(scope.getData(from.data).aggregate);\n }\n\n key = scope.keyRef(facet.groupby, true);\n }\n } // if not yet defined, get source data reference\n\n\n if (!dataRef) {\n dataRef = getDataRef(from, scope);\n }\n\n return {\n key: key,\n pulse: dataRef,\n parent: parent\n };\n}\nfunction getDataRef(from, scope) {\n return from.$ref ? from : from.data && from.data.$ref ? from.data : ref(scope.getData(from.data).output);\n}\n\nfunction DataScope(scope, input, output, values, aggr) {\n this.scope = scope; // parent scope object\n\n this.input = input; // first operator in pipeline (tuple input)\n\n this.output = output; // last operator in pipeline (tuple output)\n\n this.values = values; // operator for accessing tuples (but not tuple flow)\n // last aggregate in transform pipeline\n\n this.aggregate = aggr; // lookup table of field indices\n\n this.index = {};\n}\n\nDataScope.fromEntries = function (scope, entries) {\n const n = entries.length,\n values = entries[n - 1],\n output = entries[n - 2];\n let input = entries[0],\n aggr = null,\n i = 1;\n\n if (input && input.type === 'load') {\n input = entries[1];\n } // add operator entries to this scope, wire up pulse chain\n\n\n scope.add(entries[0]);\n\n for (; i < n; ++i) {\n entries[i].params.pulse = ref(entries[i - 1]);\n scope.add(entries[i]);\n if (entries[i].type === 'aggregate') aggr = entries[i];\n }\n\n return new DataScope(scope, input, output, values, aggr);\n};\n\nfunction fieldKey(field) {\n return isString(field) ? field : null;\n}\n\nfunction addSortField(scope, p, sort) {\n const as = aggrField(sort.op, sort.field);\n let s;\n\n if (p.ops) {\n for (let i = 0, n = p.as.length; i < n; ++i) {\n if (p.as[i] === as) return;\n }\n } else {\n p.ops = ['count'];\n p.fields = [null];\n p.as = ['count'];\n }\n\n if (sort.op) {\n p.ops.push((s = sort.op.signal) ? scope.signalRef(s) : sort.op);\n p.fields.push(scope.fieldRef(sort.field));\n p.as.push(as);\n }\n}\n\nfunction cache(scope, ds, name, optype, field, counts, index) {\n const cache = ds[name] || (ds[name] = {}),\n sort = sortKey(counts);\n let k = fieldKey(field),\n v,\n op;\n\n if (k != null) {\n scope = ds.scope;\n k = k + (sort ? '|' + sort : '');\n v = cache[k];\n }\n\n if (!v) {\n const params = counts ? {\n field: keyFieldRef,\n pulse: ds.countsRef(scope, field, counts)\n } : {\n field: scope.fieldRef(field),\n pulse: ref(ds.output)\n };\n if (sort) params.sort = scope.sortRef(counts);\n op = scope.add(entry(optype, undefined, params));\n if (index) ds.index[field] = op;\n v = ref(op);\n if (k != null) cache[k] = v;\n }\n\n return v;\n}\n\nDataScope.prototype = {\n countsRef(scope, field, sort) {\n const ds = this,\n cache = ds.counts || (ds.counts = {}),\n k = fieldKey(field);\n let v, a, p;\n\n if (k != null) {\n scope = ds.scope;\n v = cache[k];\n }\n\n if (!v) {\n p = {\n groupby: scope.fieldRef(field, 'key'),\n pulse: ref(ds.output)\n };\n if (sort && sort.field) addSortField(scope, p, sort);\n a = scope.add(Aggregate(p));\n v = scope.add(Collect({\n pulse: ref(a)\n }));\n v = {\n agg: a,\n ref: ref(v)\n };\n if (k != null) cache[k] = v;\n } else if (sort && sort.field) {\n addSortField(scope, v.agg.params, sort);\n }\n\n return v.ref;\n },\n\n tuplesRef() {\n return ref(this.values);\n },\n\n extentRef(scope, field) {\n return cache(scope, this, 'extent', 'extent', field, false);\n },\n\n domainRef(scope, field) {\n return cache(scope, this, 'domain', 'values', field, false);\n },\n\n valuesRef(scope, field, sort) {\n return cache(scope, this, 'vals', 'values', field, sort || true);\n },\n\n lookupRef(scope, field) {\n return cache(scope, this, 'lookup', 'tupleindex', field, false);\n },\n\n indataRef(scope, field) {\n return cache(scope, this, 'indata', 'tupleindex', field, true, true);\n }\n\n};\n\nfunction parseFacet (spec, scope, group) {\n const facet = spec.from.facet,\n name = facet.name,\n data = getDataRef(facet, scope);\n let op;\n\n if (!facet.name) {\n error('Facet must have a name: ' + stringValue(facet));\n }\n\n if (!facet.data) {\n error('Facet must reference a data set: ' + stringValue(facet));\n }\n\n if (facet.field) {\n op = scope.add(PreFacet({\n field: scope.fieldRef(facet.field),\n pulse: data\n }));\n } else if (facet.groupby) {\n op = scope.add(Facet({\n key: scope.keyRef(facet.groupby),\n group: ref(scope.proxy(group.parent)),\n pulse: data\n }));\n } else {\n error('Facet must specify groupby or field: ' + stringValue(facet));\n } // initialize facet subscope\n\n\n const subscope = scope.fork(),\n source = subscope.add(Collect()),\n values = subscope.add(Sieve({\n pulse: ref(source)\n }));\n subscope.addData(name, new DataScope(subscope, source, source, values));\n subscope.addSignal('parent', null); // parse faceted subflow\n\n op.params.subflow = {\n $subflow: subscope.parse(spec).toRuntime()\n };\n}\n\nfunction parseSubflow (spec, scope, input) {\n const op = scope.add(PreFacet({\n pulse: input.pulse\n })),\n subscope = scope.fork();\n subscope.add(Sieve());\n subscope.addSignal('parent', null); // parse group mark subflow\n\n op.params.subflow = {\n $subflow: subscope.parse(spec).toRuntime()\n };\n}\n\nfunction parseTrigger (spec, scope, name) {\n const remove = spec.remove,\n insert = spec.insert,\n toggle = spec.toggle,\n modify = spec.modify,\n values = spec.values,\n op = scope.add(operator());\n const update = 'if(' + spec.trigger + ',modify(\"' + name + '\",' + [insert, remove, toggle, modify, values].map(_ => _ == null ? 'null' : _).join(',') + '),0)';\n const expr = parseExpression(update, scope);\n op.update = expr.$expr;\n op.params = expr.$params;\n}\n\nfunction parseMark (spec, scope) {\n const role = getRole(spec),\n group = spec.type === GroupMark,\n facet = spec.from && spec.from.facet,\n overlap = spec.overlap;\n let layout = spec.layout || role === ScopeRole || role === FrameRole,\n ops,\n op,\n store,\n enc,\n name,\n layoutRef,\n boundRef;\n const nested = role === MarkRole || layout || facet; // resolve input data\n\n const input = parseData$1(spec.from, group, scope); // data join to map tuples to visual items\n\n op = scope.add(DataJoin({\n key: input.key || (spec.key ? fieldRef$1(spec.key) : undefined),\n pulse: input.pulse,\n clean: !group\n }));\n const joinRef = ref(op); // collect visual items\n\n op = store = scope.add(Collect({\n pulse: joinRef\n })); // connect visual items to scenegraph\n\n op = scope.add(Mark({\n markdef: definition(spec),\n interactive: interactive(spec.interactive, scope),\n clip: clip(spec.clip, scope),\n context: {\n $context: true\n },\n groups: scope.lookup(),\n parent: scope.signals.parent ? scope.signalRef('parent') : null,\n index: scope.markpath(),\n pulse: ref(op)\n }));\n const markRef = ref(op); // add visual encoders\n\n op = enc = scope.add(Encode(parseEncode(spec.encode, spec.type, role, spec.style, scope, {\n mod: false,\n pulse: markRef\n }))); // monitor parent marks to propagate changes\n\n op.params.parent = scope.encode(); // add post-encoding transforms, if defined\n\n if (spec.transform) {\n spec.transform.forEach(_ => {\n const tx = parseTransform(_, scope),\n md = tx.metadata;\n\n if (md.generates || md.changes) {\n error('Mark transforms should not generate new data.');\n }\n\n if (!md.nomod) enc.params.mod = true; // update encode mod handling\n\n tx.params.pulse = ref(op);\n scope.add(op = tx);\n });\n } // if item sort specified, perform post-encoding\n\n\n if (spec.sort) {\n op = scope.add(SortItems({\n sort: scope.compareRef(spec.sort),\n pulse: ref(op)\n }));\n }\n\n const encodeRef = ref(op); // add view layout operator if needed\n\n if (facet || layout) {\n layout = scope.add(ViewLayout({\n layout: scope.objectProperty(spec.layout),\n legends: scope.legends,\n mark: markRef,\n pulse: encodeRef\n }));\n layoutRef = ref(layout);\n } // compute bounding boxes\n\n\n const bound = scope.add(Bound({\n mark: markRef,\n pulse: layoutRef || encodeRef\n }));\n boundRef = ref(bound); // if group mark, recurse to parse nested content\n\n if (group) {\n // juggle layout & bounds to ensure they run *after* any faceting transforms\n if (nested) {\n ops = scope.operators;\n ops.pop();\n if (layout) ops.pop();\n }\n\n scope.pushState(encodeRef, layoutRef || boundRef, joinRef);\n facet ? parseFacet(spec, scope, input) // explicit facet\n : nested ? parseSubflow(spec, scope, input) // standard mark group\n : scope.parse(spec); // guide group, we can avoid nested scopes\n\n scope.popState();\n\n if (nested) {\n if (layout) ops.push(layout);\n ops.push(bound);\n }\n } // if requested, add overlap removal transform\n\n\n if (overlap) {\n boundRef = parseOverlap(overlap, boundRef, scope);\n } // render / sieve items\n\n\n const render = scope.add(Render({\n pulse: boundRef\n })),\n sieve = scope.add(Sieve({\n pulse: ref(render)\n }, undefined, scope.parent())); // if mark is named, make accessible as reactive geometry\n // add trigger updates if defined\n\n if (spec.name != null) {\n name = spec.name;\n scope.addData(name, new DataScope(scope, store, render, sieve));\n if (spec.on) spec.on.forEach(on => {\n if (on.insert || on.remove || on.toggle) {\n error('Marks only support modify triggers.');\n }\n\n parseTrigger(on, scope, name);\n });\n }\n}\n\nfunction parseOverlap(overlap, source, scope) {\n const method = overlap.method,\n bound = overlap.bound,\n sep = overlap.separation;\n const params = {\n separation: isSignal(sep) ? scope.signalRef(sep.signal) : sep,\n method: isSignal(method) ? scope.signalRef(method.signal) : method,\n pulse: source\n };\n\n if (overlap.order) {\n params.sort = scope.compareRef({\n field: overlap.order\n });\n }\n\n if (bound) {\n const tol = bound.tolerance;\n params.boundTolerance = isSignal(tol) ? scope.signalRef(tol.signal) : +tol;\n params.boundScale = scope.scaleRef(bound.scale);\n params.boundOrient = bound.orient;\n }\n\n return ref(scope.add(Overlap(params)));\n}\n\nfunction parseLegend (spec, scope) {\n const config = scope.config.legend,\n encode = spec.encode || {},\n _ = lookup(spec, config),\n legendEncode = encode.legend || {},\n name = legendEncode.name || undefined,\n interactive = legendEncode.interactive,\n style = legendEncode.style,\n scales = {};\n\n let scale = 0,\n entryLayout,\n params,\n children; // resolve scales and 'canonical' scale name\n\n LegendScales.forEach(s => spec[s] ? (scales[s] = spec[s], scale = scale || spec[s]) : 0);\n if (!scale) error('Missing valid scale for legend.'); // resolve legend type (symbol, gradient, or discrete gradient)\n\n const type = legendType(spec, scope.scaleType(scale)); // single-element data source for legend group\n\n const datum = {\n title: spec.title != null,\n scales: scales,\n type: type,\n vgrad: type !== 'symbol' && _.isVertical()\n };\n const dataRef = ref(scope.add(Collect(null, [datum]))); // encoding properties for legend entry sub-group\n\n const entryEncode = {\n enter: {\n x: {\n value: 0\n },\n y: {\n value: 0\n }\n }\n }; // data source for legend values\n\n const entryRef = ref(scope.add(LegendEntries(params = {\n type: type,\n scale: scope.scaleRef(scale),\n count: scope.objectProperty(_('tickCount')),\n limit: scope.property(_('symbolLimit')),\n values: scope.objectProperty(spec.values),\n minstep: scope.property(spec.tickMinStep),\n formatType: scope.property(spec.formatType),\n formatSpecifier: scope.property(spec.format)\n }))); // continuous gradient legend\n\n if (type === Gradient) {\n children = [legendGradient(spec, scale, config, encode.gradient), legendGradientLabels(spec, config, encode.labels, entryRef)]; // adjust default tick count based on the gradient length\n\n params.count = params.count || scope.signalRef(`max(2,2*floor((${deref(_.gradientLength())})/100))`);\n } // discrete gradient legend\n else if (type === Discrete) {\n children = [legendGradientDiscrete(spec, scale, config, encode.gradient, entryRef), legendGradientLabels(spec, config, encode.labels, entryRef)];\n } // symbol legend\n else {\n // determine legend symbol group layout\n entryLayout = legendSymbolLayout(spec, config);\n children = [legendSymbolGroups(spec, config, encode, entryRef, deref(entryLayout.columns))]; // pass symbol size information to legend entry generator\n\n params.size = sizeExpression(spec, scope, children[0].marks);\n } // generate legend marks\n\n\n children = [guideGroup({\n role: LegendEntryRole,\n from: dataRef,\n encode: entryEncode,\n marks: children,\n layout: entryLayout,\n interactive\n })]; // include legend title if defined\n\n if (datum.title) {\n children.push(legendTitle(spec, config, encode.title, dataRef));\n } // parse legend specification\n\n\n return parseMark(guideGroup({\n role: LegendRole,\n from: dataRef,\n encode: extendEncode(buildLegendEncode(_, spec, config), legendEncode, Skip),\n marks: children,\n aria: _('aria'),\n description: _('description'),\n zindex: _('zindex'),\n name,\n interactive,\n style\n }), scope);\n}\n\nfunction legendType(spec, scaleType) {\n let type = spec.type || Symbols;\n\n if (!spec.type && scaleCount(spec) === 1 && (spec.fill || spec.stroke)) {\n type = isContinuous(scaleType) ? Gradient : isDiscretizing(scaleType) ? Discrete : Symbols;\n }\n\n return type !== Gradient ? type : isDiscretizing(scaleType) ? Discrete : Gradient;\n}\n\nfunction scaleCount(spec) {\n return LegendScales.reduce((count, type) => count + (spec[type] ? 1 : 0), 0);\n}\n\nfunction buildLegendEncode(_, spec, config) {\n const encode = {\n enter: {},\n update: {}\n };\n addEncoders(encode, {\n orient: _('orient'),\n offset: _('offset'),\n padding: _('padding'),\n titlePadding: _('titlePadding'),\n cornerRadius: _('cornerRadius'),\n fill: _('fillColor'),\n stroke: _('strokeColor'),\n strokeWidth: config.strokeWidth,\n strokeDash: config.strokeDash,\n x: _('legendX'),\n y: _('legendY'),\n // accessibility support\n format: spec.format,\n formatType: spec.formatType\n });\n return encode;\n}\n\nfunction sizeExpression(spec, scope, marks) {\n const size = deref(getChannel('size', spec, marks)),\n strokeWidth = deref(getChannel('strokeWidth', spec, marks)),\n fontSize = deref(getFontSize(marks[1].encode, scope, GuideLabelStyle));\n return parseExpression(`max(ceil(sqrt(${size})+${strokeWidth}),${fontSize})`, scope);\n}\n\nfunction getChannel(name, spec, marks) {\n return spec[name] ? `scale(\"${spec[name]}\",datum)` : getEncoding(name, marks[0].encode);\n}\n\nfunction getFontSize(encode, scope, style) {\n return getEncoding('fontSize', encode) || getStyle('fontSize', scope, style);\n}\n\nconst angleExpr = `item.orient===\"${Left}\"?-90:item.orient===\"${Right}\"?90:0`;\nfunction parseTitle (spec, scope) {\n spec = isString(spec) ? {\n text: spec\n } : spec;\n\n const _ = lookup(spec, scope.config.title),\n encode = spec.encode || {},\n userEncode = encode.group || {},\n name = userEncode.name || undefined,\n interactive = userEncode.interactive,\n style = userEncode.style,\n children = []; // single-element data source for group title\n\n\n const datum = {},\n dataRef = ref(scope.add(Collect(null, [datum]))); // include title text\n\n children.push(buildTitle(spec, _, titleEncode(spec), dataRef)); // include subtitle text\n\n if (spec.subtitle) {\n children.push(buildSubTitle(spec, _, encode.subtitle, dataRef));\n } // parse title specification\n\n\n return parseMark(guideGroup({\n role: TitleRole,\n from: dataRef,\n encode: groupEncode(_, userEncode),\n marks: children,\n aria: _('aria'),\n description: _('description'),\n zindex: _('zindex'),\n name,\n interactive,\n style\n }), scope);\n} // provide backwards-compatibility for title custom encode;\n// the top-level encode block has been *deprecated*.\n\nfunction titleEncode(spec) {\n const encode = spec.encode;\n return encode && encode.title || extend({\n name: spec.name,\n interactive: spec.interactive,\n style: spec.style\n }, encode);\n}\n\nfunction groupEncode(_, userEncode) {\n const encode = {\n enter: {},\n update: {}\n };\n addEncoders(encode, {\n orient: _('orient'),\n anchor: _('anchor'),\n align: {\n signal: alignExpr$1\n },\n angle: {\n signal: angleExpr\n },\n limit: _('limit'),\n frame: _('frame'),\n offset: _('offset') || 0,\n padding: _('subtitlePadding')\n });\n return extendEncode(encode, userEncode, Skip);\n}\n\nfunction buildTitle(spec, _, userEncode, dataRef) {\n const zero = {\n value: 0\n },\n text = spec.text,\n encode = {\n enter: {\n opacity: zero\n },\n update: {\n opacity: {\n value: 1\n }\n },\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n text: text,\n align: {\n signal: 'item.mark.group.align'\n },\n angle: {\n signal: 'item.mark.group.angle'\n },\n limit: {\n signal: 'item.mark.group.limit'\n },\n baseline: 'top',\n dx: _('dx'),\n dy: _('dy'),\n fill: _('color'),\n font: _('font'),\n fontSize: _('fontSize'),\n fontStyle: _('fontStyle'),\n fontWeight: _('fontWeight'),\n lineHeight: _('lineHeight')\n }, {\n // update\n align: _('align'),\n angle: _('angle'),\n baseline: _('baseline')\n });\n return guideMark({\n type: TextMark,\n role: TitleTextRole,\n style: GroupTitleStyle,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nfunction buildSubTitle(spec, _, userEncode, dataRef) {\n const zero = {\n value: 0\n },\n text = spec.subtitle,\n encode = {\n enter: {\n opacity: zero\n },\n update: {\n opacity: {\n value: 1\n }\n },\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n text: text,\n align: {\n signal: 'item.mark.group.align'\n },\n angle: {\n signal: 'item.mark.group.angle'\n },\n limit: {\n signal: 'item.mark.group.limit'\n },\n baseline: 'top',\n dx: _('dx'),\n dy: _('dy'),\n fill: _('subtitleColor'),\n font: _('subtitleFont'),\n fontSize: _('subtitleFontSize'),\n fontStyle: _('subtitleFontStyle'),\n fontWeight: _('subtitleFontWeight'),\n lineHeight: _('subtitleLineHeight')\n }, {\n // update\n align: _('align'),\n angle: _('angle'),\n baseline: _('baseline')\n });\n return guideMark({\n type: TextMark,\n role: TitleSubtitleRole,\n style: GroupSubtitleStyle,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nfunction parseData(data, scope) {\n const transforms = [];\n\n if (data.transform) {\n data.transform.forEach(tx => {\n transforms.push(parseTransform(tx, scope));\n });\n }\n\n if (data.on) {\n data.on.forEach(on => {\n parseTrigger(on, scope, data.name);\n });\n }\n\n scope.addDataPipeline(data.name, analyze(data, scope, transforms));\n}\n/**\n * Analyze a data pipeline, add needed operators.\n */\n\nfunction analyze(data, scope, ops) {\n const output = [];\n let source = null,\n modify = false,\n generate = false,\n upstream,\n i,\n n,\n t,\n m;\n\n if (data.values) {\n // hard-wired input data set\n if (isSignal(data.values) || hasSignal(data.format)) {\n // if either values is signal or format has signal, use dynamic loader\n output.push(load(scope, data));\n output.push(source = collect());\n } else {\n // otherwise, ingest upon dataflow init\n output.push(source = collect({\n $ingest: data.values,\n $format: data.format\n }));\n }\n } else if (data.url) {\n // load data from external source\n if (hasSignal(data.url) || hasSignal(data.format)) {\n // if either url or format has signal, use dynamic loader\n output.push(load(scope, data));\n output.push(source = collect());\n } else {\n // otherwise, request load upon dataflow init\n output.push(source = collect({\n $request: data.url,\n $format: data.format\n }));\n }\n } else if (data.source) {\n // derives from one or more other data sets\n source = upstream = array(data.source).map(d => ref(scope.getData(d).output));\n output.push(null); // populate later\n } // scan data transforms, add collectors as needed\n\n\n for (i = 0, n = ops.length; i < n; ++i) {\n t = ops[i];\n m = t.metadata;\n\n if (!source && !m.source) {\n output.push(source = collect());\n }\n\n output.push(t);\n if (m.generates) generate = true;\n if (m.modifies && !generate) modify = true;\n if (m.source) source = t;else if (m.changes) source = null;\n }\n\n if (upstream) {\n n = upstream.length - 1;\n output[0] = Relay({\n derive: modify,\n pulse: n ? upstream : upstream[0]\n });\n\n if (modify || n) {\n // collect derived and multi-pulse tuples\n output.splice(1, 0, collect());\n }\n }\n\n if (!source) output.push(collect());\n output.push(Sieve({}));\n return output;\n}\n\nfunction collect(values) {\n const s = Collect({}, values);\n s.metadata = {\n source: true\n };\n return s;\n}\n\nfunction load(scope, data) {\n return Load({\n url: data.url ? scope.property(data.url) : undefined,\n async: data.async ? scope.property(data.async) : undefined,\n values: data.values ? scope.property(data.values) : undefined,\n format: scope.objectProperty(data.format)\n });\n}\n\nconst isX = orient => orient === Bottom || orient === Top; // get sign coefficient based on axis orient\n\n\nconst getSign = (orient, a, b) => isSignal(orient) ? ifLeftTopExpr(orient.signal, a, b) : orient === Left || orient === Top ? a : b; // condition on axis x-direction\n\nconst ifX = (orient, a, b) => isSignal(orient) ? ifXEnc(orient.signal, a, b) : isX(orient) ? a : b; // condition on axis y-direction\n\nconst ifY = (orient, a, b) => isSignal(orient) ? ifYEnc(orient.signal, a, b) : isX(orient) ? b : a;\nconst ifTop = (orient, a, b) => isSignal(orient) ? ifTopExpr(orient.signal, a, b) : orient === Top ? {\n value: a\n} : {\n value: b\n};\nconst ifRight = (orient, a, b) => isSignal(orient) ? ifRightExpr(orient.signal, a, b) : orient === Right ? {\n value: a\n} : {\n value: b\n};\n\nconst ifXEnc = ($orient, a, b) => ifEnc(`${$orient} === '${Top}' || ${$orient} === '${Bottom}'`, a, b);\n\nconst ifYEnc = ($orient, a, b) => ifEnc(`${$orient} !== '${Top}' && ${$orient} !== '${Bottom}'`, a, b);\n\nconst ifLeftTopExpr = ($orient, a, b) => ifExpr(`${$orient} === '${Left}' || ${$orient} === '${Top}'`, a, b);\n\nconst ifTopExpr = ($orient, a, b) => ifExpr(`${$orient} === '${Top}'`, a, b);\n\nconst ifRightExpr = ($orient, a, b) => ifExpr(`${$orient} === '${Right}'`, a, b);\n\nconst ifEnc = (test, a, b) => {\n // ensure inputs are encoder objects (or null)\n a = a != null ? encoder(a) : a;\n b = b != null ? encoder(b) : b;\n\n if (isSimple(a) && isSimple(b)) {\n // if possible generate simple signal expression\n a = a ? a.signal || stringValue(a.value) : null;\n b = b ? b.signal || stringValue(b.value) : null;\n return {\n signal: `${test} ? (${a}) : (${b})`\n };\n } else {\n // otherwise generate rule set\n return [extend({\n test\n }, a)].concat(b || []);\n }\n};\n\nconst isSimple = enc => enc == null || Object.keys(enc).length === 1;\n\nconst ifExpr = (test, a, b) => ({\n signal: `${test} ? (${toExpr(a)}) : (${toExpr(b)})`\n});\n\nconst ifOrient = ($orient, t, b, l, r) => ({\n signal: (l != null ? `${$orient} === '${Left}' ? (${toExpr(l)}) : ` : '') + (b != null ? `${$orient} === '${Bottom}' ? (${toExpr(b)}) : ` : '') + (r != null ? `${$orient} === '${Right}' ? (${toExpr(r)}) : ` : '') + (t != null ? `${$orient} === '${Top}' ? (${toExpr(t)}) : ` : '') + '(null)'\n});\n\nconst toExpr = v => isSignal(v) ? v.signal : v == null ? null : stringValue(v);\n\nconst mult = (sign, value) => value === 0 ? 0 : isSignal(sign) ? {\n signal: `(${sign.signal}) * ${value}`\n} : {\n value: sign * value\n};\nconst patch = (value, base) => {\n const s = value.signal;\n return s && s.endsWith('(null)') ? {\n signal: s.slice(0, -6) + base.signal\n } : value;\n};\n\nfunction fallback(prop, config, axisConfig, style) {\n let styleProp;\n\n if (config && hasOwnProperty(config, prop)) {\n return config[prop];\n } else if (hasOwnProperty(axisConfig, prop)) {\n return axisConfig[prop];\n } else if (prop.startsWith('title')) {\n switch (prop) {\n case 'titleColor':\n styleProp = 'fill';\n break;\n\n case 'titleFont':\n case 'titleFontSize':\n case 'titleFontWeight':\n styleProp = prop[5].toLowerCase() + prop.slice(6);\n }\n\n return style[GuideTitleStyle][styleProp];\n } else if (prop.startsWith('label')) {\n switch (prop) {\n case 'labelColor':\n styleProp = 'fill';\n break;\n\n case 'labelFont':\n case 'labelFontSize':\n styleProp = prop[5].toLowerCase() + prop.slice(6);\n }\n\n return style[GuideLabelStyle][styleProp];\n }\n\n return null;\n}\n\nfunction keys(objects) {\n const map = {};\n\n for (const obj of objects) {\n if (!obj) continue;\n\n for (const key in obj) map[key] = 1;\n }\n\n return Object.keys(map);\n}\n\nfunction axisConfig (spec, scope) {\n var config = scope.config,\n style = config.style,\n axis = config.axis,\n band = scope.scaleType(spec.scale) === 'band' && config.axisBand,\n orient = spec.orient,\n xy,\n or,\n key;\n\n if (isSignal(orient)) {\n const xyKeys = keys([config.axisX, config.axisY]),\n orientKeys = keys([config.axisTop, config.axisBottom, config.axisLeft, config.axisRight]);\n xy = {};\n\n for (key of xyKeys) {\n xy[key] = ifX(orient, fallback(key, config.axisX, axis, style), fallback(key, config.axisY, axis, style));\n }\n\n or = {};\n\n for (key of orientKeys) {\n or[key] = ifOrient(orient.signal, fallback(key, config.axisTop, axis, style), fallback(key, config.axisBottom, axis, style), fallback(key, config.axisLeft, axis, style), fallback(key, config.axisRight, axis, style));\n }\n } else {\n xy = orient === Top || orient === Bottom ? config.axisX : config.axisY;\n or = config['axis' + orient[0].toUpperCase() + orient.slice(1)];\n }\n\n const result = xy || or || band ? extend({}, axis, xy, or, band) : axis;\n return result;\n}\n\nfunction axisDomain (spec, config, userEncode, dataRef) {\n const _ = lookup(spec, config),\n orient = spec.orient;\n\n let enter, update;\n const encode = {\n enter: enter = {\n opacity: zero\n },\n update: update = {\n opacity: one\n },\n exit: {\n opacity: zero\n }\n };\n addEncoders(encode, {\n stroke: _('domainColor'),\n strokeCap: _('domainCap'),\n strokeDash: _('domainDash'),\n strokeDashOffset: _('domainDashOffset'),\n strokeWidth: _('domainWidth'),\n strokeOpacity: _('domainOpacity')\n });\n const pos0 = position(spec, 0);\n const pos1 = position(spec, 1);\n enter.x = update.x = ifX(orient, pos0, zero);\n enter.x2 = update.x2 = ifX(orient, pos1);\n enter.y = update.y = ifY(orient, pos0, zero);\n enter.y2 = update.y2 = ifY(orient, pos1);\n return guideMark({\n type: RuleMark,\n role: AxisDomainRole,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nfunction position(spec, pos) {\n return {\n scale: spec.scale,\n range: pos\n };\n}\n\nfunction axisGrid (spec, config, userEncode, dataRef, band) {\n const _ = lookup(spec, config),\n orient = spec.orient,\n vscale = spec.gridScale,\n sign = getSign(orient, 1, -1),\n offset = offsetValue(spec.offset, sign);\n\n let enter, exit, update;\n const encode = {\n enter: enter = {\n opacity: zero\n },\n update: update = {\n opacity: one\n },\n exit: exit = {\n opacity: zero\n }\n };\n addEncoders(encode, {\n stroke: _('gridColor'),\n strokeCap: _('gridCap'),\n strokeDash: _('gridDash'),\n strokeDashOffset: _('gridDashOffset'),\n strokeOpacity: _('gridOpacity'),\n strokeWidth: _('gridWidth')\n });\n const tickPos = {\n scale: spec.scale,\n field: Value,\n band: band.band,\n extra: band.extra,\n offset: band.offset,\n round: _('tickRound')\n };\n const sz = ifX(orient, {\n signal: 'height'\n }, {\n signal: 'width'\n });\n const gridStart = vscale ? {\n scale: vscale,\n range: 0,\n mult: sign,\n offset: offset\n } : {\n value: 0,\n offset: offset\n };\n const gridEnd = vscale ? {\n scale: vscale,\n range: 1,\n mult: sign,\n offset: offset\n } : extend(sz, {\n mult: sign,\n offset: offset\n });\n enter.x = update.x = ifX(orient, tickPos, gridStart);\n enter.y = update.y = ifY(orient, tickPos, gridStart);\n enter.x2 = update.x2 = ifY(orient, gridEnd);\n enter.y2 = update.y2 = ifX(orient, gridEnd);\n exit.x = ifX(orient, tickPos);\n exit.y = ifY(orient, tickPos);\n return guideMark({\n type: RuleMark,\n role: AxisGridRole,\n key: Value,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nfunction offsetValue(offset, sign) {\n if (sign === 1) ; else if (!isObject(offset)) {\n offset = isSignal(sign) ? {\n signal: `(${sign.signal}) * (${offset || 0})`\n } : sign * (offset || 0);\n } else {\n let entry = offset = extend({}, offset);\n\n while (entry.mult != null) {\n if (!isObject(entry.mult)) {\n entry.mult = isSignal(sign) // no offset if sign === 1\n ? {\n signal: `(${entry.mult}) * (${sign.signal})`\n } : entry.mult * sign;\n return offset;\n } else {\n entry = entry.mult = extend({}, entry.mult);\n }\n }\n\n entry.mult = sign;\n }\n\n return offset;\n}\n\nfunction axisTicks (spec, config, userEncode, dataRef, size, band) {\n const _ = lookup(spec, config),\n orient = spec.orient,\n sign = getSign(orient, -1, 1);\n\n let enter, exit, update;\n const encode = {\n enter: enter = {\n opacity: zero\n },\n update: update = {\n opacity: one\n },\n exit: exit = {\n opacity: zero\n }\n };\n addEncoders(encode, {\n stroke: _('tickColor'),\n strokeCap: _('tickCap'),\n strokeDash: _('tickDash'),\n strokeDashOffset: _('tickDashOffset'),\n strokeOpacity: _('tickOpacity'),\n strokeWidth: _('tickWidth')\n });\n const tickSize = encoder(size);\n tickSize.mult = sign;\n const tickPos = {\n scale: spec.scale,\n field: Value,\n band: band.band,\n extra: band.extra,\n offset: band.offset,\n round: _('tickRound')\n };\n update.y = enter.y = ifX(orient, zero, tickPos);\n update.y2 = enter.y2 = ifX(orient, tickSize);\n exit.x = ifX(orient, tickPos);\n update.x = enter.x = ifY(orient, zero, tickPos);\n update.x2 = enter.x2 = ifY(orient, tickSize);\n exit.y = ifY(orient, tickPos);\n return guideMark({\n type: RuleMark,\n role: AxisTickRole,\n key: Value,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nfunction flushExpr(scale, threshold, a, b, c) {\n return {\n signal: 'flush(range(\"' + scale + '\"), ' + 'scale(\"' + scale + '\", datum.value), ' + threshold + ',' + a + ',' + b + ',' + c + ')'\n };\n}\n\nfunction axisLabels (spec, config, userEncode, dataRef, size, band) {\n const _ = lookup(spec, config),\n orient = spec.orient,\n scale = spec.scale,\n sign = getSign(orient, -1, 1),\n flush = deref(_('labelFlush')),\n flushOffset = deref(_('labelFlushOffset')),\n labelAlign = _('labelAlign'),\n labelBaseline = _('labelBaseline');\n\n let flushOn = flush === 0 || !!flush,\n update;\n const tickSize = encoder(size);\n tickSize.mult = sign;\n tickSize.offset = encoder(_('labelPadding') || 0);\n tickSize.offset.mult = sign;\n const tickPos = {\n scale: scale,\n field: Value,\n band: 0.5,\n offset: extendOffset(band.offset, _('labelOffset'))\n };\n const align = ifX(orient, flushOn ? flushExpr(scale, flush, '\"left\"', '\"right\"', '\"center\"') : {\n value: 'center'\n }, ifRight(orient, 'left', 'right'));\n const baseline = ifX(orient, ifTop(orient, 'bottom', 'top'), flushOn ? flushExpr(scale, flush, '\"top\"', '\"bottom\"', '\"middle\"') : {\n value: 'middle'\n });\n const offsetExpr = flushExpr(scale, flush, `-(${flushOffset})`, flushOffset, 0);\n flushOn = flushOn && flushOffset;\n const enter = {\n opacity: zero,\n x: ifX(orient, tickPos, tickSize),\n y: ifY(orient, tickPos, tickSize)\n };\n const encode = {\n enter: enter,\n update: update = {\n opacity: one,\n text: {\n field: Label\n },\n x: enter.x,\n y: enter.y,\n align,\n baseline\n },\n exit: {\n opacity: zero,\n x: enter.x,\n y: enter.y\n }\n };\n addEncoders(encode, {\n dx: !labelAlign && flushOn ? ifX(orient, offsetExpr) : null,\n dy: !labelBaseline && flushOn ? ifY(orient, offsetExpr) : null\n });\n addEncoders(encode, {\n angle: _('labelAngle'),\n fill: _('labelColor'),\n fillOpacity: _('labelOpacity'),\n font: _('labelFont'),\n fontSize: _('labelFontSize'),\n fontWeight: _('labelFontWeight'),\n fontStyle: _('labelFontStyle'),\n limit: _('labelLimit'),\n lineHeight: _('labelLineHeight')\n }, {\n align: labelAlign,\n baseline: labelBaseline\n });\n\n const bound = _('labelBound');\n\n let overlap = _('labelOverlap'); // if overlap method or bound defined, request label overlap removal\n\n\n overlap = overlap || bound ? {\n separation: _('labelSeparation'),\n method: overlap,\n order: 'datum.index',\n bound: bound ? {\n scale,\n orient,\n tolerance: bound\n } : null\n } : undefined;\n\n if (update.align !== align) {\n update.align = patch(update.align, align);\n }\n\n if (update.baseline !== baseline) {\n update.baseline = patch(update.baseline, baseline);\n }\n\n return guideMark({\n type: TextMark,\n role: AxisLabelRole,\n style: GuideLabelStyle,\n key: Value,\n from: dataRef,\n encode,\n overlap\n }, userEncode);\n}\n\nfunction axisTitle (spec, config, userEncode, dataRef) {\n const _ = lookup(spec, config),\n orient = spec.orient,\n sign = getSign(orient, -1, 1);\n\n let enter, update;\n const encode = {\n enter: enter = {\n opacity: zero,\n anchor: encoder(_('titleAnchor', null)),\n align: {\n signal: alignExpr$1\n }\n },\n update: update = extend({}, enter, {\n opacity: one,\n text: encoder(spec.title)\n }),\n exit: {\n opacity: zero\n }\n };\n const titlePos = {\n signal: `lerp(range(\"${spec.scale}\"), ${anchorExpr(0, 1, 0.5)})`\n };\n update.x = ifX(orient, titlePos);\n update.y = ifY(orient, titlePos);\n enter.angle = ifX(orient, zero, mult(sign, 90));\n enter.baseline = ifX(orient, ifTop(orient, Bottom, Top), {\n value: Bottom\n });\n update.angle = enter.angle;\n update.baseline = enter.baseline;\n addEncoders(encode, {\n fill: _('titleColor'),\n fillOpacity: _('titleOpacity'),\n font: _('titleFont'),\n fontSize: _('titleFontSize'),\n fontStyle: _('titleFontStyle'),\n fontWeight: _('titleFontWeight'),\n limit: _('titleLimit'),\n lineHeight: _('titleLineHeight')\n }, {\n // require update\n align: _('titleAlign'),\n angle: _('titleAngle'),\n baseline: _('titleBaseline')\n });\n autoLayout(_, orient, encode, userEncode);\n encode.update.align = patch(encode.update.align, enter.align);\n encode.update.angle = patch(encode.update.angle, enter.angle);\n encode.update.baseline = patch(encode.update.baseline, enter.baseline);\n return guideMark({\n type: TextMark,\n role: AxisTitleRole,\n style: GuideTitleStyle,\n from: dataRef,\n encode\n }, userEncode);\n}\n\nfunction autoLayout(_, orient, encode, userEncode) {\n const auto = (value, dim) => value != null ? (encode.update[dim] = patch(encoder(value), encode.update[dim]), false) : !has(dim, userEncode) ? true : false;\n\n const autoY = auto(_('titleX'), 'x'),\n autoX = auto(_('titleY'), 'y');\n encode.enter.auto = autoX === autoY ? encoder(autoX) : ifX(orient, encoder(autoX), encoder(autoY));\n}\n\nfunction parseAxis (spec, scope) {\n const config = axisConfig(spec, scope),\n encode = spec.encode || {},\n axisEncode = encode.axis || {},\n name = axisEncode.name || undefined,\n interactive = axisEncode.interactive,\n style = axisEncode.style,\n _ = lookup(spec, config),\n band = tickBand(_); // single-element data source for axis group\n\n\n const datum = {\n scale: spec.scale,\n ticks: !!_('ticks'),\n labels: !!_('labels'),\n grid: !!_('grid'),\n domain: !!_('domain'),\n title: spec.title != null\n };\n const dataRef = ref(scope.add(Collect({}, [datum]))); // data source for axis ticks\n\n const ticksRef = ref(scope.add(AxisTicks({\n scale: scope.scaleRef(spec.scale),\n extra: scope.property(band.extra),\n count: scope.objectProperty(spec.tickCount),\n values: scope.objectProperty(spec.values),\n minstep: scope.property(spec.tickMinStep),\n formatType: scope.property(spec.formatType),\n formatSpecifier: scope.property(spec.format)\n }))); // generate axis marks\n\n const children = [];\n let size; // include axis gridlines if requested\n\n if (datum.grid) {\n children.push(axisGrid(spec, config, encode.grid, ticksRef, band));\n } // include axis ticks if requested\n\n\n if (datum.ticks) {\n size = _('tickSize');\n children.push(axisTicks(spec, config, encode.ticks, ticksRef, size, band));\n } // include axis labels if requested\n\n\n if (datum.labels) {\n size = datum.ticks ? size : 0;\n children.push(axisLabels(spec, config, encode.labels, ticksRef, size, band));\n } // include axis domain path if requested\n\n\n if (datum.domain) {\n children.push(axisDomain(spec, config, encode.domain, dataRef));\n } // include axis title if defined\n\n\n if (datum.title) {\n children.push(axisTitle(spec, config, encode.title, dataRef));\n } // parse axis specification\n\n\n return parseMark(guideGroup({\n role: AxisRole,\n from: dataRef,\n encode: extendEncode(buildAxisEncode(_, spec), axisEncode, Skip),\n marks: children,\n aria: _('aria'),\n description: _('description'),\n zindex: _('zindex'),\n name,\n interactive,\n style\n }), scope);\n}\n\nfunction buildAxisEncode(_, spec) {\n const encode = {\n enter: {},\n update: {}\n };\n addEncoders(encode, {\n orient: _('orient'),\n offset: _('offset') || 0,\n position: value(spec.position, 0),\n titlePadding: _('titlePadding'),\n minExtent: _('minExtent'),\n maxExtent: _('maxExtent'),\n range: {\n signal: `abs(span(range(\"${spec.scale}\")))`\n },\n translate: _('translate'),\n // accessibility support\n format: spec.format,\n formatType: spec.formatType\n });\n return encode;\n}\n\nfunction parseScope (spec, scope, preprocessed) {\n const signals = array(spec.signals),\n scales = array(spec.scales); // parse signal definitions, if not already preprocessed\n\n if (!preprocessed) signals.forEach(_ => parseSignal(_, scope)); // parse cartographic projection definitions\n\n array(spec.projections).forEach(_ => parseProjection(_, scope)); // initialize scale references\n\n scales.forEach(_ => initScale(_, scope)); // parse data sources\n\n array(spec.data).forEach(_ => parseData(_, scope)); // parse scale definitions\n\n scales.forEach(_ => parseScale(_, scope)); // parse signal updates\n\n (preprocessed || signals).forEach(_ => parseSignalUpdates(_, scope)); // parse axis definitions\n\n array(spec.axes).forEach(_ => parseAxis(_, scope)); // parse mark definitions\n\n array(spec.marks).forEach(_ => parseMark(_, scope)); // parse legend definitions\n\n array(spec.legends).forEach(_ => parseLegend(_, scope)); // parse title, if defined\n\n if (spec.title) parseTitle(spec.title, scope); // parse collected lambda (anonymous) expressions\n\n scope.parseLambdas();\n return scope;\n}\n\nconst rootEncode = spec => extendEncode({\n enter: {\n x: {\n value: 0\n },\n y: {\n value: 0\n }\n },\n update: {\n width: {\n signal: 'width'\n },\n height: {\n signal: 'height'\n }\n }\n}, spec);\n\nfunction parseView(spec, scope) {\n const config = scope.config; // add scenegraph root\n\n const root = ref(scope.root = scope.add(operator())); // parse top-level signal definitions\n\n const signals = collectSignals(spec, config);\n signals.forEach(_ => parseSignal(_, scope)); // assign description, event, legend, and locale configuration\n\n scope.description = spec.description || config.description;\n scope.eventConfig = config.events;\n scope.legends = scope.objectProperty(config.legend && config.legend.layout);\n scope.locale = config.locale; // store root group item\n\n const input = scope.add(Collect()); // encode root group item\n\n const encode = scope.add(Encode(parseEncode(rootEncode(spec.encode), GroupMark, FrameRole, spec.style, scope, {\n pulse: ref(input)\n }))); // perform view layout\n\n const parent = scope.add(ViewLayout({\n layout: scope.objectProperty(spec.layout),\n legends: scope.legends,\n autosize: scope.signalRef('autosize'),\n mark: root,\n pulse: ref(encode)\n }));\n scope.operators.pop(); // parse remainder of specification\n\n scope.pushState(ref(encode), ref(parent), null);\n parseScope(spec, scope, signals);\n scope.operators.push(parent); // bound / render / sieve root item\n\n let op = scope.add(Bound({\n mark: root,\n pulse: ref(parent)\n }));\n op = scope.add(Render({\n pulse: ref(op)\n }));\n op = scope.add(Sieve({\n pulse: ref(op)\n })); // track metadata for root item\n\n scope.addData('root', new DataScope(scope, input, input, op));\n return scope;\n}\n\nfunction signalObject(name, value) {\n return value && value.signal ? {\n name,\n update: value.signal\n } : {\n name,\n value\n };\n}\n/**\n * Collect top-level signals, merging values as needed. Signals\n * defined in the config signals arrays are added only if that\n * signal is not explicitly defined in the specification.\n * Built-in signals (autosize, background, padding, width, height)\n * receive special treatment. They are initialized using the\n * top-level spec property, or, if undefined in the spec, using\n * the corresponding top-level config property. If this property\n * is a signal reference object, the signal expression maps to the\n * signal 'update' property. If the spec's top-level signal array\n * contains an entry that matches a built-in signal, that entry\n * will be merged with the built-in specification, potentially\n * overwriting existing 'value' or 'update' properties.\n */\n\n\nfunction collectSignals(spec, config) {\n const _ = name => value(spec[name], config[name]),\n signals = [signalObject('background', _('background')), signalObject('autosize', parseAutosize(_('autosize'))), signalObject('padding', parsePadding(_('padding'))), signalObject('width', _('width') || 0), signalObject('height', _('height') || 0)],\n pre = signals.reduce((p, s) => (p[s.name] = s, p), {}),\n map = {}; // add spec signal array\n\n\n array(spec.signals).forEach(s => {\n if (hasOwnProperty(pre, s.name)) {\n // merge if built-in signal\n s = extend(pre[s.name], s);\n } else {\n // otherwise add to signal list\n signals.push(s);\n }\n\n map[s.name] = s;\n }); // add config signal array\n\n array(config.signals).forEach(s => {\n if (!hasOwnProperty(map, s.name) && !hasOwnProperty(pre, s.name)) {\n // add to signal list if not already defined\n signals.push(s);\n }\n });\n return signals;\n}\n\nfunction Scope(config, options) {\n this.config = config || {};\n this.options = options || {};\n this.bindings = [];\n this.field = {};\n this.signals = {};\n this.lambdas = {};\n this.scales = {};\n this.events = {};\n this.data = {};\n this.streams = [];\n this.updates = [];\n this.operators = [];\n this.eventConfig = null;\n this.locale = null;\n this._id = 0;\n this._subid = 0;\n this._nextsub = [0];\n this._parent = [];\n this._encode = [];\n this._lookup = [];\n this._markpath = [];\n}\n\nfunction Subscope(scope) {\n this.config = scope.config;\n this.options = scope.options;\n this.legends = scope.legends;\n this.field = Object.create(scope.field);\n this.signals = Object.create(scope.signals);\n this.lambdas = Object.create(scope.lambdas);\n this.scales = Object.create(scope.scales);\n this.events = Object.create(scope.events);\n this.data = Object.create(scope.data);\n this.streams = [];\n this.updates = [];\n this.operators = [];\n this._id = 0;\n this._subid = ++scope._nextsub[0];\n this._nextsub = scope._nextsub;\n this._parent = scope._parent.slice();\n this._encode = scope._encode.slice();\n this._lookup = scope._lookup.slice();\n this._markpath = scope._markpath;\n}\n\nScope.prototype = Subscope.prototype = {\n parse(spec) {\n return parseScope(spec, this);\n },\n\n fork() {\n return new Subscope(this);\n },\n\n isSubscope() {\n return this._subid > 0;\n },\n\n toRuntime() {\n this.finish();\n return {\n description: this.description,\n operators: this.operators,\n streams: this.streams,\n updates: this.updates,\n bindings: this.bindings,\n eventConfig: this.eventConfig,\n locale: this.locale\n };\n },\n\n id() {\n return (this._subid ? this._subid + ':' : 0) + this._id++;\n },\n\n add(op) {\n this.operators.push(op);\n op.id = this.id(); // if pre-registration references exist, resolve them now\n\n if (op.refs) {\n op.refs.forEach(ref => {\n ref.$ref = op.id;\n });\n op.refs = null;\n }\n\n return op;\n },\n\n proxy(op) {\n const vref = op instanceof Entry ? ref(op) : op;\n return this.add(Proxy({\n value: vref\n }));\n },\n\n addStream(stream) {\n this.streams.push(stream);\n stream.id = this.id();\n return stream;\n },\n\n addUpdate(update) {\n this.updates.push(update);\n return update;\n },\n\n // Apply metadata\n finish() {\n let name, ds; // annotate root\n\n if (this.root) this.root.root = true; // annotate signals\n\n for (name in this.signals) {\n this.signals[name].signal = name;\n } // annotate scales\n\n\n for (name in this.scales) {\n this.scales[name].scale = name;\n } // annotate data sets\n\n\n function annotate(op, name, type) {\n let data, list;\n\n if (op) {\n data = op.data || (op.data = {});\n list = data[name] || (data[name] = []);\n list.push(type);\n }\n }\n\n for (name in this.data) {\n ds = this.data[name];\n annotate(ds.input, name, 'input');\n annotate(ds.output, name, 'output');\n annotate(ds.values, name, 'values');\n\n for (const field in ds.index) {\n annotate(ds.index[field], name, 'index:' + field);\n }\n }\n\n return this;\n },\n\n // ----\n pushState(encode, parent, lookup) {\n this._encode.push(ref(this.add(Sieve({\n pulse: encode\n }))));\n\n this._parent.push(parent);\n\n this._lookup.push(lookup ? ref(this.proxy(lookup)) : null);\n\n this._markpath.push(-1);\n },\n\n popState() {\n this._encode.pop();\n\n this._parent.pop();\n\n this._lookup.pop();\n\n this._markpath.pop();\n },\n\n parent() {\n return peek(this._parent);\n },\n\n encode() {\n return peek(this._encode);\n },\n\n lookup() {\n return peek(this._lookup);\n },\n\n markpath() {\n const p = this._markpath;\n return ++p[p.length - 1];\n },\n\n // ----\n fieldRef(field, name) {\n if (isString(field)) return fieldRef$1(field, name);\n\n if (!field.signal) {\n error('Unsupported field reference: ' + stringValue(field));\n }\n\n const s = field.signal;\n let f = this.field[s];\n\n if (!f) {\n const params = {\n name: this.signalRef(s)\n };\n if (name) params.as = name;\n this.field[s] = f = ref(this.add(Field(params)));\n }\n\n return f;\n },\n\n compareRef(cmp) {\n let signal = false;\n\n const check = _ => isSignal(_) ? (signal = true, this.signalRef(_.signal)) : isExpr$1(_) ? (signal = true, this.exprRef(_.expr)) : _;\n\n const fields = array(cmp.field).map(check),\n orders = array(cmp.order).map(check);\n return signal ? ref(this.add(Compare({\n fields: fields,\n orders: orders\n }))) : compareRef(fields, orders);\n },\n\n keyRef(fields, flat) {\n let signal = false;\n\n const check = _ => isSignal(_) ? (signal = true, ref(sig[_.signal])) : _;\n\n const sig = this.signals;\n fields = array(fields).map(check);\n return signal ? ref(this.add(Key({\n fields: fields,\n flat: flat\n }))) : keyRef(fields, flat);\n },\n\n sortRef(sort) {\n if (!sort) return sort; // including id ensures stable sorting\n\n const a = aggrField(sort.op, sort.field),\n o = sort.order || Ascending;\n return o.signal ? ref(this.add(Compare({\n fields: a,\n orders: this.signalRef(o.signal)\n }))) : compareRef(a, o);\n },\n\n // ----\n event(source, type) {\n const key = source + ':' + type;\n\n if (!this.events[key]) {\n const id = this.id();\n this.streams.push({\n id: id,\n source: source,\n type: type\n });\n this.events[key] = id;\n }\n\n return this.events[key];\n },\n\n // ----\n hasOwnSignal(name) {\n return hasOwnProperty(this.signals, name);\n },\n\n addSignal(name, value) {\n if (this.hasOwnSignal(name)) {\n error('Duplicate signal name: ' + stringValue(name));\n }\n\n const op = value instanceof Entry ? value : this.add(operator(value));\n return this.signals[name] = op;\n },\n\n getSignal(name) {\n if (!this.signals[name]) {\n error('Unrecognized signal name: ' + stringValue(name));\n }\n\n return this.signals[name];\n },\n\n signalRef(s) {\n if (this.signals[s]) {\n return ref(this.signals[s]);\n } else if (!hasOwnProperty(this.lambdas, s)) {\n this.lambdas[s] = this.add(operator(null));\n }\n\n return ref(this.lambdas[s]);\n },\n\n parseLambdas() {\n const code = Object.keys(this.lambdas);\n\n for (let i = 0, n = code.length; i < n; ++i) {\n const s = code[i],\n e = parseExpression(s, this),\n op = this.lambdas[s];\n op.params = e.$params;\n op.update = e.$expr;\n }\n },\n\n property(spec) {\n return spec && spec.signal ? this.signalRef(spec.signal) : spec;\n },\n\n objectProperty(spec) {\n return !spec || !isObject(spec) ? spec : this.signalRef(spec.signal || propertyLambda(spec));\n },\n\n exprRef(code, name) {\n const params = {\n expr: parseExpression(code, this)\n };\n if (name) params.expr.$name = name;\n return ref(this.add(Expression(params)));\n },\n\n addBinding(name, bind) {\n if (!this.bindings) {\n error('Nested signals do not support binding: ' + stringValue(name));\n }\n\n this.bindings.push(extend({\n signal: name\n }, bind));\n },\n\n // ----\n addScaleProj(name, transform) {\n if (hasOwnProperty(this.scales, name)) {\n error('Duplicate scale or projection name: ' + stringValue(name));\n }\n\n this.scales[name] = this.add(transform);\n },\n\n addScale(name, params) {\n this.addScaleProj(name, Scale(params));\n },\n\n addProjection(name, params) {\n this.addScaleProj(name, Projection(params));\n },\n\n getScale(name) {\n if (!this.scales[name]) {\n error('Unrecognized scale name: ' + stringValue(name));\n }\n\n return this.scales[name];\n },\n\n scaleRef(name) {\n return ref(this.getScale(name));\n },\n\n scaleType(name) {\n return this.getScale(name).params.type;\n },\n\n projectionRef(name) {\n return this.scaleRef(name);\n },\n\n projectionType(name) {\n return this.scaleType(name);\n },\n\n // ----\n addData(name, dataScope) {\n if (hasOwnProperty(this.data, name)) {\n error('Duplicate data set name: ' + stringValue(name));\n }\n\n return this.data[name] = dataScope;\n },\n\n getData(name) {\n if (!this.data[name]) {\n error('Undefined data set name: ' + stringValue(name));\n }\n\n return this.data[name];\n },\n\n addDataPipeline(name, entries) {\n if (hasOwnProperty(this.data, name)) {\n error('Duplicate data set name: ' + stringValue(name));\n }\n\n return this.addData(name, DataScope.fromEntries(this, entries));\n }\n\n};\n\nfunction propertyLambda(spec) {\n return (isArray(spec) ? arrayLambda : objectLambda)(spec);\n}\n\nfunction arrayLambda(array) {\n const n = array.length;\n let code = '[';\n\n for (let i = 0; i < n; ++i) {\n const value = array[i];\n code += (i > 0 ? ',' : '') + (isObject(value) ? value.signal || propertyLambda(value) : stringValue(value));\n }\n\n return code + ']';\n}\n\nfunction objectLambda(obj) {\n let code = '{',\n i = 0,\n key,\n value;\n\n for (key in obj) {\n value = obj[key];\n code += (++i > 1 ? ',' : '') + stringValue(key) + ':' + (isObject(value) ? value.signal || propertyLambda(value) : stringValue(value));\n }\n\n return code + '}';\n}\n\n/**\n * Standard configuration defaults for Vega specification parsing.\n * Users can provide their own (sub-)set of these default values\n * by passing in a config object to the top-level parse method.\n */\nfunction defaults () {\n const defaultFont = 'sans-serif',\n defaultSymbolSize = 30,\n defaultStrokeWidth = 2,\n defaultColor = '#4c78a8',\n black = '#000',\n gray = '#888',\n lightGray = '#ddd';\n return {\n // default visualization description\n description: 'Vega visualization',\n // default padding around visualization\n padding: 0,\n // default for automatic sizing; options: 'none', 'pad', 'fit'\n // or provide an object (e.g., {'type': 'pad', 'resize': true})\n autosize: 'pad',\n // default view background color\n // covers the entire view component\n background: null,\n // default event handling configuration\n // preventDefault for view-sourced event types except 'wheel'\n events: {\n defaults: {\n allow: ['wheel']\n }\n },\n // defaults for top-level group marks\n // accepts mark properties (fill, stroke, etc)\n // covers the data rectangle within group width/height\n group: null,\n // defaults for basic mark types\n // each subset accepts mark properties (fill, stroke, etc)\n mark: null,\n arc: {\n fill: defaultColor\n },\n area: {\n fill: defaultColor\n },\n image: null,\n line: {\n stroke: defaultColor,\n strokeWidth: defaultStrokeWidth\n },\n path: {\n stroke: defaultColor\n },\n rect: {\n fill: defaultColor\n },\n rule: {\n stroke: black\n },\n shape: {\n stroke: defaultColor\n },\n symbol: {\n fill: defaultColor,\n size: 64\n },\n text: {\n fill: black,\n font: defaultFont,\n fontSize: 11\n },\n trail: {\n fill: defaultColor,\n size: defaultStrokeWidth\n },\n // style definitions\n style: {\n // axis & legend labels\n 'guide-label': {\n fill: black,\n font: defaultFont,\n fontSize: 10\n },\n // axis & legend titles\n 'guide-title': {\n fill: black,\n font: defaultFont,\n fontSize: 11,\n fontWeight: 'bold'\n },\n // headers, including chart title\n 'group-title': {\n fill: black,\n font: defaultFont,\n fontSize: 13,\n fontWeight: 'bold'\n },\n // chart subtitle\n 'group-subtitle': {\n fill: black,\n font: defaultFont,\n fontSize: 12\n },\n // defaults for styled point marks in Vega-Lite\n point: {\n size: defaultSymbolSize,\n strokeWidth: defaultStrokeWidth,\n shape: 'circle'\n },\n circle: {\n size: defaultSymbolSize,\n strokeWidth: defaultStrokeWidth\n },\n square: {\n size: defaultSymbolSize,\n strokeWidth: defaultStrokeWidth,\n shape: 'square'\n },\n // defaults for styled group marks in Vega-Lite\n cell: {\n fill: 'transparent',\n stroke: lightGray\n }\n },\n // defaults for title\n title: {\n orient: 'top',\n anchor: 'middle',\n offset: 4,\n subtitlePadding: 3\n },\n // defaults for axes\n axis: {\n minExtent: 0,\n maxExtent: 200,\n bandPosition: 0.5,\n domain: true,\n domainWidth: 1,\n domainColor: gray,\n grid: false,\n gridWidth: 1,\n gridColor: lightGray,\n labels: true,\n labelAngle: 0,\n labelLimit: 180,\n labelOffset: 0,\n labelPadding: 2,\n ticks: true,\n tickColor: gray,\n tickOffset: 0,\n tickRound: true,\n tickSize: 5,\n tickWidth: 1,\n titlePadding: 4\n },\n // correction for centering bias\n axisBand: {\n tickOffset: -0.5\n },\n // defaults for cartographic projection\n projection: {\n type: 'mercator'\n },\n // defaults for legends\n legend: {\n orient: 'right',\n padding: 0,\n gridAlign: 'each',\n columnPadding: 10,\n rowPadding: 2,\n symbolDirection: 'vertical',\n gradientDirection: 'vertical',\n gradientLength: 200,\n gradientThickness: 16,\n gradientStrokeColor: lightGray,\n gradientStrokeWidth: 0,\n gradientLabelOffset: 2,\n labelAlign: 'left',\n labelBaseline: 'middle',\n labelLimit: 160,\n labelOffset: 4,\n labelOverlap: true,\n symbolLimit: 30,\n symbolType: 'circle',\n symbolSize: 100,\n symbolOffset: 0,\n symbolStrokeWidth: 1.5,\n symbolBaseFillColor: 'transparent',\n symbolBaseStrokeColor: gray,\n titleLimit: 180,\n titleOrient: 'top',\n titlePadding: 5,\n layout: {\n offset: 18,\n direction: 'horizontal',\n left: {\n direction: 'vertical'\n },\n right: {\n direction: 'vertical'\n }\n }\n },\n // defaults for scale ranges\n range: {\n category: {\n scheme: 'tableau10'\n },\n ordinal: {\n scheme: 'blues'\n },\n heatmap: {\n scheme: 'yellowgreenblue'\n },\n ramp: {\n scheme: 'blues'\n },\n diverging: {\n scheme: 'blueorange',\n extent: [1, 0]\n },\n symbol: ['circle', 'square', 'triangle-up', 'cross', 'diamond', 'triangle-right', 'triangle-down', 'triangle-left']\n }\n };\n}\n\nfunction parse (spec, config, options) {\n if (!isObject(spec)) {\n error('Input Vega specification must be an object.');\n }\n\n config = mergeConfig(defaults(), config, spec.config);\n return parseView(spec, new Scope(config, options)).toRuntime();\n}\n\nexport { AxisDomainRole, AxisGridRole, AxisLabelRole, AxisRole, AxisTickRole, AxisTitleRole, DataScope, FrameRole, LegendEntryRole, LegendLabelRole, LegendRole, LegendSymbolRole, LegendTitleRole, MarkRole, Scope, ScopeRole, defaults as config, parse, parseSignal as signal, parseSignalUpdates as signalUpdates, parseStream as stream };\n","import { extend } from 'vega-util';\nexport * from 'vega-util';\nimport { transforms } from 'vega-dataflow';\nexport { Dataflow, EventStream, MultiPulse, Operator, Parameters, Pulse, Transform, changeset, definition, ingest, isTuple, transform, transforms, tupleid } from 'vega-dataflow';\nimport * as tx from 'vega-transforms';\nimport * as vtx from 'vega-view-transforms';\nimport * as encode from 'vega-encode';\nimport * as geo from 'vega-geo';\nimport * as force from 'vega-force';\nimport * as tree from 'vega-hierarchy';\nimport * as label from 'vega-label';\nimport * as reg from 'vega-regression';\nimport * as voronoi from 'vega-voronoi';\nimport * as wordcloud from 'vega-wordcloud';\nimport * as xf from 'vega-crossfilter';\nexport * from 'vega-statistics';\nexport * from 'vega-time';\nexport * from 'vega-loader';\nexport * from 'vega-scenegraph';\nexport { interpolate, interpolateColors, interpolateRange, quantizeInterpolator, scale, scheme } from 'vega-scale';\nexport { projection } from 'vega-projection';\nexport { View } from 'vega-view';\nexport { defaultLocale, numberFormatDefaultLocale as formatLocale, locale, resetDefaultLocale, timeFormatDefaultLocale as timeFormatLocale } from 'vega-format';\nexport { expressionFunction } from 'vega-functions';\nexport { parse } from 'vega-parser';\nexport { context as runtimeContext } from 'vega-runtime';\nexport { codegenExpression, parseExpression } from 'vega-expression';\nexport { parseSelector } from 'vega-event-selector';\n\nvar name = \"vega\";\nvar version$1 = \"5.21.0\";\nvar description = \"The Vega visualization grammar.\";\nvar keywords = [\n\t\"vega\",\n\t\"visualization\",\n\t\"interaction\",\n\t\"dataflow\",\n\t\"library\",\n\t\"data\",\n\t\"d3\"\n];\nvar license = \"BSD-3-Clause\";\nvar author = \"UW Interactive Data Lab (http://idl.cs.washington.edu)\";\nvar main = \"build/vega-node.js\";\nvar module = \"build/vega.module.js\";\nvar unpkg = \"build/vega.min.js\";\nvar jsdelivr = \"build/vega.min.js\";\nvar types = \"index.d.ts\";\nvar repository = \"vega/vega\";\nvar scripts = {\n\tbundle: \"rollup -c --config-bundle\",\n\tprebuild: \"rimraf build && rimraf build-es5\",\n\tbuild: \"rollup -c --config-core --config-bundle --config-ie\",\n\tpostbuild: \"node schema-copy\",\n\tpretest: \"yarn build --config-test\",\n\ttest: \"TZ=America/Los_Angeles tape 'test/**/*-test.js'\",\n\tprepublishOnly: \"yarn test && yarn build\",\n\tpostpublish: \"./schema-deploy.sh\"\n};\nvar dependencies = {\n\t\"vega-crossfilter\": \"~4.0.5\",\n\t\"vega-dataflow\": \"~5.7.4\",\n\t\"vega-encode\": \"~4.8.3\",\n\t\"vega-event-selector\": \"~3.0.0\",\n\t\"vega-expression\": \"~5.0.0\",\n\t\"vega-force\": \"~4.0.7\",\n\t\"vega-format\": \"~1.0.4\",\n\t\"vega-functions\": \"~5.12.1\",\n\t\"vega-geo\": \"~4.3.8\",\n\t\"vega-hierarchy\": \"~4.0.9\",\n\t\"vega-label\": \"~1.1.0\",\n\t\"vega-loader\": \"~4.4.1\",\n\t\"vega-parser\": \"~6.1.4\",\n\t\"vega-projection\": \"~1.4.5\",\n\t\"vega-regression\": \"~1.0.9\",\n\t\"vega-runtime\": \"~6.1.3\",\n\t\"vega-scale\": \"~7.1.1\",\n\t\"vega-scenegraph\": \"~4.9.4\",\n\t\"vega-statistics\": \"~1.7.10\",\n\t\"vega-time\": \"~2.0.4\",\n\t\"vega-transforms\": \"~4.9.4\",\n\t\"vega-typings\": \"~0.22.0\",\n\t\"vega-util\": \"~1.17.0\",\n\t\"vega-view\": \"~5.10.1\",\n\t\"vega-view-transforms\": \"~4.5.8\",\n\t\"vega-voronoi\": \"~4.1.5\",\n\t\"vega-wordcloud\": \"~4.1.3\"\n};\nvar devDependencies = {\n\t\"vega-schema\": \"*\"\n};\nvar gitHead = \"774165e29850b66ec8b79ba52a7955f1ab936ea6\";\nvar pkg = {\n\tname: name,\n\tversion: version$1,\n\tdescription: description,\n\tkeywords: keywords,\n\tlicense: license,\n\tauthor: author,\n\tmain: main,\n\tmodule: module,\n\tunpkg: unpkg,\n\tjsdelivr: jsdelivr,\n\ttypes: types,\n\trepository: repository,\n\tscripts: scripts,\n\tdependencies: dependencies,\n\tdevDependencies: devDependencies,\n\tgitHead: gitHead\n};\n\n// -- Transforms -----\nextend(transforms, tx, vtx, encode, geo, force, label, tree, reg, voronoi, wordcloud, xf); // -- Exports -----\n\nconst version = pkg.version;\n\nexport { version };\n","function adjustSpatial (item, encode, swap) {\n let t;\n\n if (encode.x2) {\n if (encode.x) {\n if (swap && item.x > item.x2) {\n t = item.x;\n item.x = item.x2;\n item.x2 = t;\n }\n\n item.width = item.x2 - item.x;\n } else {\n item.x = item.x2 - (item.width || 0);\n }\n }\n\n if (encode.xc) {\n item.x = item.xc - (item.width || 0) / 2;\n }\n\n if (encode.y2) {\n if (encode.y) {\n if (swap && item.y > item.y2) {\n t = item.y;\n item.y = item.y2;\n item.y2 = t;\n }\n\n item.height = item.y2 - item.y;\n } else {\n item.y = item.y2 - (item.height || 0);\n }\n }\n\n if (encode.yc) {\n item.y = item.yc - (item.height || 0) / 2;\n }\n}\n\nvar Constants = {\n NaN: NaN,\n E: Math.E,\n LN2: Math.LN2,\n LN10: Math.LN10,\n LOG2E: Math.LOG2E,\n LOG10E: Math.LOG10E,\n PI: Math.PI,\n SQRT1_2: Math.SQRT1_2,\n SQRT2: Math.SQRT2,\n MIN_VALUE: Number.MIN_VALUE,\n MAX_VALUE: Number.MAX_VALUE\n};\n\nvar Ops = {\n '*': (a, b) => a * b,\n '+': (a, b) => a + b,\n '-': (a, b) => a - b,\n '/': (a, b) => a / b,\n '%': (a, b) => a % b,\n '>': (a, b) => a > b,\n '<': (a, b) => a < b,\n '<=': (a, b) => a <= b,\n '>=': (a, b) => a >= b,\n '==': (a, b) => a == b,\n '!=': (a, b) => a != b,\n '===': (a, b) => a === b,\n '!==': (a, b) => a !== b,\n '&': (a, b) => a & b,\n '|': (a, b) => a | b,\n '^': (a, b) => a ^ b,\n '<<': (a, b) => a << b,\n '>>': (a, b) => a >> b,\n '>>>': (a, b) => a >>> b\n};\n\nvar Unary = {\n '+': a => +a,\n '-': a => -a,\n '~': a => ~a,\n '!': a => !a\n};\n\nconst slice = Array.prototype.slice;\n\nconst apply = (m, args, cast) => {\n const obj = cast ? cast(args[0]) : args[0];\n return obj[m].apply(obj, slice.call(args, 1));\n};\n\nconst datetime = (y, m, d, H, M, S, ms) => new Date(y, m || 0, d != null ? d : 1, H || 0, M || 0, S || 0, ms || 0);\n\nvar Functions = {\n // math functions\n isNaN: Number.isNaN,\n isFinite: Number.isFinite,\n abs: Math.abs,\n acos: Math.acos,\n asin: Math.asin,\n atan: Math.atan,\n atan2: Math.atan2,\n ceil: Math.ceil,\n cos: Math.cos,\n exp: Math.exp,\n floor: Math.floor,\n log: Math.log,\n max: Math.max,\n min: Math.min,\n pow: Math.pow,\n random: Math.random,\n round: Math.round,\n sin: Math.sin,\n sqrt: Math.sqrt,\n tan: Math.tan,\n clamp: (a, b, c) => Math.max(b, Math.min(c, a)),\n // date functions\n now: Date.now,\n utc: Date.UTC,\n datetime: datetime,\n date: d => new Date(d).getDate(),\n day: d => new Date(d).getDay(),\n year: d => new Date(d).getFullYear(),\n month: d => new Date(d).getMonth(),\n hours: d => new Date(d).getHours(),\n minutes: d => new Date(d).getMinutes(),\n seconds: d => new Date(d).getSeconds(),\n milliseconds: d => new Date(d).getMilliseconds(),\n time: d => new Date(d).getTime(),\n timezoneoffset: d => new Date(d).getTimezoneOffset(),\n utcdate: d => new Date(d).getUTCDate(),\n utcday: d => new Date(d).getUTCDay(),\n utcyear: d => new Date(d).getUTCFullYear(),\n utcmonth: d => new Date(d).getUTCMonth(),\n utchours: d => new Date(d).getUTCHours(),\n utcminutes: d => new Date(d).getUTCMinutes(),\n utcseconds: d => new Date(d).getUTCSeconds(),\n utcmilliseconds: d => new Date(d).getUTCMilliseconds(),\n // sequence functions\n length: x => x.length,\n join: function () {\n return apply('join', arguments);\n },\n indexof: function () {\n return apply('indexOf', arguments);\n },\n lastindexof: function () {\n return apply('lastIndexOf', arguments);\n },\n slice: function () {\n return apply('slice', arguments);\n },\n reverse: x => x.slice().reverse(),\n // string functions\n parseFloat: parseFloat,\n parseInt: parseInt,\n upper: x => String(x).toUpperCase(),\n lower: x => String(x).toLowerCase(),\n substring: function () {\n return apply('substring', arguments, String);\n },\n split: function () {\n return apply('split', arguments, String);\n },\n replace: function () {\n return apply('replace', arguments, String);\n },\n trim: x => String(x).trim(),\n // regexp functions\n regexp: RegExp,\n test: (r, t) => RegExp(r).test(t)\n};\n\nconst EventFunctions = ['view', 'item', 'group', 'xy', 'x', 'y'];\nconst Visitors = {\n Literal: ($, n) => n.value,\n Identifier: ($, n) => {\n const id = n.name;\n return $.memberDepth > 0 ? id : id === 'datum' ? $.datum : id === 'event' ? $.event : id === 'item' ? $.item : Constants[id] || $.params['$' + id];\n },\n MemberExpression: ($, n) => {\n const d = !n.computed,\n o = $(n.object);\n if (d) $.memberDepth += 1;\n const p = $(n.property);\n if (d) $.memberDepth -= 1;\n return o[p];\n },\n CallExpression: ($, n) => {\n const args = n.arguments;\n let name = n.callee.name; // handle special internal functions used by encoders\n // re-route to corresponding standard function\n\n if (name.startsWith('_')) {\n name = name.slice(1);\n } // special case \"if\" due to conditional evaluation of branches\n\n\n return name === 'if' ? $(args[0]) ? $(args[1]) : $(args[2]) : ($.fn[name] || Functions[name]).apply($.fn, args.map($));\n },\n ArrayExpression: ($, n) => n.elements.map($),\n BinaryExpression: ($, n) => Ops[n.operator]($(n.left), $(n.right)),\n UnaryExpression: ($, n) => Unary[n.operator]($(n.argument)),\n ConditionalExpression: ($, n) => $(n.test) ? $(n.consequent) : $(n.alternate),\n LogicalExpression: ($, n) => n.operator === '&&' ? $(n.left) && $(n.right) : $(n.left) || $(n.right),\n ObjectExpression: ($, n) => n.properties.reduce((o, p) => {\n $.memberDepth += 1;\n const k = $(p.key);\n $.memberDepth -= 1;\n o[k] = $(p.value);\n return o;\n }, {})\n};\nfunction interpret (ast, fn, params, datum, event, item) {\n const $ = n => Visitors[n.type]($, n);\n\n $.memberDepth = 0;\n $.fn = Object.create(fn);\n $.params = params;\n $.datum = datum;\n $.event = event;\n $.item = item; // route event functions to annotated vega event context\n\n EventFunctions.forEach(f => $.fn[f] = (...args) => event.vega[f](...args));\n return $(ast);\n}\n\nvar expression = {\n /**\n * Parse an expression used to update an operator value.\n */\n operator(ctx, expr) {\n const ast = expr.ast,\n fn = ctx.functions;\n return _ => interpret(ast, fn, _);\n },\n\n /**\n * Parse an expression provided as an operator parameter value.\n */\n parameter(ctx, expr) {\n const ast = expr.ast,\n fn = ctx.functions;\n return (datum, _) => interpret(ast, fn, _, datum);\n },\n\n /**\n * Parse an expression applied to an event stream.\n */\n event(ctx, expr) {\n const ast = expr.ast,\n fn = ctx.functions;\n return event => interpret(ast, fn, undefined, undefined, event);\n },\n\n /**\n * Parse an expression used to handle an event-driven operator update.\n */\n handler(ctx, expr) {\n const ast = expr.ast,\n fn = ctx.functions;\n return (_, event) => {\n const datum = event.item && event.item.datum;\n return interpret(ast, fn, _, datum, event);\n };\n },\n\n /**\n * Parse an expression that performs visual encoding.\n */\n encode(ctx, encode) {\n const {\n marktype,\n channels\n } = encode,\n fn = ctx.functions,\n swap = marktype === 'group' || marktype === 'image' || marktype === 'rect';\n return (item, _) => {\n const datum = item.datum;\n let m = 0,\n v;\n\n for (const name in channels) {\n v = interpret(channels[name].ast, fn, _, datum, undefined, item);\n\n if (item[name] !== v) {\n item[name] = v;\n m = 1;\n }\n }\n\n if (marktype !== 'rule') {\n adjustSpatial(item, channels, swap);\n }\n\n return m;\n };\n }\n\n};\n\nexport { expression as expressionInterpreter };\n","function accessor (fn, fields, name) {\n fn.fields = fields || [];\n fn.fname = name;\n return fn;\n}\nfunction accessorName(fn) {\n return fn == null ? null : fn.fname;\n}\nfunction accessorFields(fn) {\n return fn == null ? null : fn.fields;\n}\n\nfunction getter (path) {\n return path.length === 1 ? get1(path[0]) : getN(path);\n}\n\nconst get1 = field => function (obj) {\n return obj[field];\n};\n\nconst getN = path => {\n const len = path.length;\n return function (obj) {\n for (let i = 0; i < len; ++i) {\n obj = obj[path[i]];\n }\n\n return obj;\n };\n};\n\nfunction error (message) {\n throw Error(message);\n}\n\nfunction splitAccessPath (p) {\n const path = [],\n n = p.length;\n let q = null,\n b = 0,\n s = '',\n i,\n j,\n c;\n p = p + '';\n\n function push() {\n path.push(s + p.substring(i, j));\n s = '';\n i = j + 1;\n }\n\n for (i = j = 0; j < n; ++j) {\n c = p[j];\n\n if (c === '\\\\') {\n s += p.substring(i, j);\n s += p.substring(++j, ++j);\n i = j;\n } else if (c === q) {\n push();\n q = null;\n b = -1;\n } else if (q) {\n continue;\n } else if (i === b && c === '\"') {\n i = j + 1;\n q = c;\n } else if (i === b && c === \"'\") {\n i = j + 1;\n q = c;\n } else if (c === '.' && !b) {\n if (j > i) {\n push();\n } else {\n i = j + 1;\n }\n } else if (c === '[') {\n if (j > i) push();\n b = i = j + 1;\n } else if (c === ']') {\n if (!b) error('Access path missing open bracket: ' + p);\n if (b > 0) push();\n b = 0;\n i = j + 1;\n }\n }\n\n if (b) error('Access path missing closing bracket: ' + p);\n if (q) error('Access path missing closing quote: ' + p);\n\n if (j > i) {\n j++;\n push();\n }\n\n return path;\n}\n\nfunction field (field, name, opt) {\n const path = splitAccessPath(field);\n field = path.length === 1 ? path[0] : field;\n return accessor((opt && opt.get || getter)(path), [field], name || field);\n}\n\nconst id = field('id');\nconst identity = accessor(_ => _, [], 'identity');\nconst zero = accessor(() => 0, [], 'zero');\nconst one = accessor(() => 1, [], 'one');\nconst truthy = accessor(() => true, [], 'true');\nconst falsy = accessor(() => false, [], 'false');\n\nfunction log$1(method, level, input) {\n const args = [level].concat([].slice.call(input));\n console[method].apply(console, args); // eslint-disable-line no-console\n}\n\nconst None = 0;\nconst Error$1 = 1;\nconst Warn = 2;\nconst Info = 3;\nconst Debug = 4;\nfunction logger (_, method) {\n let level = _ || None;\n return {\n level(_) {\n if (arguments.length) {\n level = +_;\n return this;\n } else {\n return level;\n }\n },\n\n error() {\n if (level >= Error$1) log$1(method || 'error', 'ERROR', arguments);\n return this;\n },\n\n warn() {\n if (level >= Warn) log$1(method || 'warn', 'WARN', arguments);\n return this;\n },\n\n info() {\n if (level >= Info) log$1(method || 'log', 'INFO', arguments);\n return this;\n },\n\n debug() {\n if (level >= Debug) log$1(method || 'log', 'DEBUG', arguments);\n return this;\n }\n\n };\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (_) {\n return _ === Object(_);\n}\n\nconst isLegalKey = key => key !== '__proto__';\n\nfunction mergeConfig(...configs) {\n return configs.reduce((out, source) => {\n for (const key in source) {\n if (key === 'signals') {\n // for signals, we merge the signals arrays\n // source signals take precedence over\n // existing signals with the same name\n out.signals = mergeNamed(out.signals, source.signals);\n } else {\n // otherwise, merge objects subject to recursion constraints\n // for legend block, recurse for the layout entry only\n // for style block, recurse for all properties\n // otherwise, no recursion: objects overwrite, no merging\n const r = key === 'legend' ? {\n layout: 1\n } : key === 'style' ? true : null;\n writeConfig(out, key, source[key], r);\n }\n }\n\n return out;\n }, {});\n}\nfunction writeConfig(output, key, value, recurse) {\n if (!isLegalKey(key)) return;\n let k, o;\n\n if (isObject(value) && !isArray(value)) {\n o = isObject(output[key]) ? output[key] : output[key] = {};\n\n for (k in value) {\n if (recurse && (recurse === true || recurse[k])) {\n writeConfig(o, k, value[k]);\n } else if (isLegalKey(k)) {\n o[k] = value[k];\n }\n }\n } else {\n output[key] = value;\n }\n}\n\nfunction mergeNamed(a, b) {\n if (a == null) return b;\n const map = {},\n out = [];\n\n function add(_) {\n if (!map[_.name]) {\n map[_.name] = 1;\n out.push(_);\n }\n }\n\n b.forEach(add);\n a.forEach(add);\n return out;\n}\n\nfunction peek (array) {\n return array[array.length - 1];\n}\n\nfunction toNumber (_) {\n return _ == null || _ === '' ? null : +_;\n}\n\nconst exp = sign => x => sign * Math.exp(x);\n\nconst log = sign => x => Math.log(sign * x);\n\nconst symlog = c => x => Math.sign(x) * Math.log1p(Math.abs(x / c));\n\nconst symexp = c => x => Math.sign(x) * Math.expm1(Math.abs(x)) * c;\n\nconst pow = exponent => x => x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);\n\nfunction pan(domain, delta, lift, ground) {\n const d0 = lift(domain[0]),\n d1 = lift(peek(domain)),\n dd = (d1 - d0) * delta;\n return [ground(d0 - dd), ground(d1 - dd)];\n}\n\nfunction panLinear(domain, delta) {\n return pan(domain, delta, toNumber, identity);\n}\nfunction panLog(domain, delta) {\n var sign = Math.sign(domain[0]);\n return pan(domain, delta, log(sign), exp(sign));\n}\nfunction panPow(domain, delta, exponent) {\n return pan(domain, delta, pow(exponent), pow(1 / exponent));\n}\nfunction panSymlog(domain, delta, constant) {\n return pan(domain, delta, symlog(constant), symexp(constant));\n}\n\nfunction zoom(domain, anchor, scale, lift, ground) {\n const d0 = lift(domain[0]),\n d1 = lift(peek(domain)),\n da = anchor != null ? lift(anchor) : (d0 + d1) / 2;\n return [ground(da + (d0 - da) * scale), ground(da + (d1 - da) * scale)];\n}\n\nfunction zoomLinear(domain, anchor, scale) {\n return zoom(domain, anchor, scale, toNumber, identity);\n}\nfunction zoomLog(domain, anchor, scale) {\n const sign = Math.sign(domain[0]);\n return zoom(domain, anchor, scale, log(sign), exp(sign));\n}\nfunction zoomPow(domain, anchor, scale, exponent) {\n return zoom(domain, anchor, scale, pow(exponent), pow(1 / exponent));\n}\nfunction zoomSymlog(domain, anchor, scale, constant) {\n return zoom(domain, anchor, scale, symlog(constant), symexp(constant));\n}\n\nfunction quarter(date) {\n return 1 + ~~(new Date(date).getMonth() / 3);\n}\nfunction utcquarter(date) {\n return 1 + ~~(new Date(date).getUTCMonth() / 3);\n}\n\nfunction array (_) {\n return _ != null ? isArray(_) ? _ : [_] : [];\n}\n\n/**\n * Span-preserving range clamp. If the span of the input range is less\n * than (max - min) and an endpoint exceeds either the min or max value,\n * the range is translated such that the span is preserved and one\n * endpoint touches the boundary of the min/max range.\n * If the span exceeds (max - min), the range [min, max] is returned.\n */\nfunction clampRange (range, min, max) {\n let lo = range[0],\n hi = range[1],\n span;\n\n if (hi < lo) {\n span = hi;\n hi = lo;\n lo = span;\n }\n\n span = hi - lo;\n return span >= max - min ? [min, max] : [lo = Math.min(Math.max(lo, min), max - span), lo + span];\n}\n\nfunction isFunction (_) {\n return typeof _ === 'function';\n}\n\nconst DESCENDING = 'descending';\nfunction compare (fields, orders, opt) {\n opt = opt || {};\n orders = array(orders) || [];\n const ord = [],\n get = [],\n fmap = {},\n gen = opt.comparator || comparator;\n array(fields).forEach((f, i) => {\n if (f == null) return;\n ord.push(orders[i] === DESCENDING ? -1 : 1);\n get.push(f = isFunction(f) ? f : field(f, null, opt));\n (accessorFields(f) || []).forEach(_ => fmap[_] = 1);\n });\n return get.length === 0 ? null : accessor(gen(get, ord), Object.keys(fmap));\n}\nconst ascending = (u, v) => (u < v || u == null) && v != null ? -1 : (u > v || v == null) && u != null ? 1 : (v = v instanceof Date ? +v : v, u = u instanceof Date ? +u : u) !== u && v === v ? -1 : v !== v && u === u ? 1 : 0;\n\nconst comparator = (fields, orders) => fields.length === 1 ? compare1(fields[0], orders[0]) : compareN(fields, orders, fields.length);\n\nconst compare1 = (field, order) => function (a, b) {\n return ascending(field(a), field(b)) * order;\n};\n\nconst compareN = (fields, orders, n) => {\n orders.push(0); // pad zero for convenient lookup\n\n return function (a, b) {\n let f,\n c = 0,\n i = -1;\n\n while (c === 0 && ++i < n) {\n f = fields[i];\n c = ascending(f(a), f(b));\n }\n\n return c * orders[i];\n };\n};\n\nfunction constant (_) {\n return isFunction(_) ? _ : () => _;\n}\n\nfunction debounce (delay, handler) {\n let tid;\n return e => {\n if (tid) clearTimeout(tid);\n tid = setTimeout(() => (handler(e), tid = null), delay);\n };\n}\n\nfunction extend (_) {\n for (let x, k, i = 1, len = arguments.length; i < len; ++i) {\n x = arguments[i];\n\n for (k in x) {\n _[k] = x[k];\n }\n }\n\n return _;\n}\n\n/**\n * Return an array with minimum and maximum values, in the\n * form [min, max]. Ignores null, undefined, and NaN values.\n */\nfunction extent (array, f) {\n let i = 0,\n n,\n v,\n min,\n max;\n\n if (array && (n = array.length)) {\n if (f == null) {\n // find first valid value\n for (v = array[i]; i < n && (v == null || v !== v); v = array[++i]);\n\n min = max = v; // visit all other values\n\n for (; i < n; ++i) {\n v = array[i]; // skip null/undefined; NaN will fail all comparisons\n\n if (v != null) {\n if (v < min) min = v;\n if (v > max) max = v;\n }\n }\n } else {\n // find first valid value\n for (v = f(array[i]); i < n && (v == null || v !== v); v = f(array[++i]));\n\n min = max = v; // visit all other values\n\n for (; i < n; ++i) {\n v = f(array[i]); // skip null/undefined; NaN will fail all comparisons\n\n if (v != null) {\n if (v < min) min = v;\n if (v > max) max = v;\n }\n }\n }\n }\n\n return [min, max];\n}\n\nfunction extentIndex (array, f) {\n const n = array.length;\n let i = -1,\n a,\n b,\n c,\n u,\n v;\n\n if (f == null) {\n while (++i < n) {\n b = array[i];\n\n if (b != null && b >= b) {\n a = c = b;\n break;\n }\n }\n\n if (i === n) return [-1, -1];\n u = v = i;\n\n while (++i < n) {\n b = array[i];\n\n if (b != null) {\n if (a > b) {\n a = b;\n u = i;\n }\n\n if (c < b) {\n c = b;\n v = i;\n }\n }\n }\n } else {\n while (++i < n) {\n b = f(array[i], i, array);\n\n if (b != null && b >= b) {\n a = c = b;\n break;\n }\n }\n\n if (i === n) return [-1, -1];\n u = v = i;\n\n while (++i < n) {\n b = f(array[i], i, array);\n\n if (b != null) {\n if (a > b) {\n a = b;\n u = i;\n }\n\n if (c < b) {\n c = b;\n v = i;\n }\n }\n }\n }\n\n return [u, v];\n}\n\nconst hop = Object.prototype.hasOwnProperty;\nfunction has (object, property) {\n return hop.call(object, property);\n}\n\nconst NULL = {};\nfunction fastmap (input) {\n let obj = {},\n test;\n\n function has$1(key) {\n return has(obj, key) && obj[key] !== NULL;\n }\n\n const map = {\n size: 0,\n empty: 0,\n object: obj,\n has: has$1,\n\n get(key) {\n return has$1(key) ? obj[key] : undefined;\n },\n\n set(key, value) {\n if (!has$1(key)) {\n ++map.size;\n if (obj[key] === NULL) --map.empty;\n }\n\n obj[key] = value;\n return this;\n },\n\n delete(key) {\n if (has$1(key)) {\n --map.size;\n ++map.empty;\n obj[key] = NULL;\n }\n\n return this;\n },\n\n clear() {\n map.size = map.empty = 0;\n map.object = obj = {};\n },\n\n test(_) {\n if (arguments.length) {\n test = _;\n return map;\n } else {\n return test;\n }\n },\n\n clean() {\n const next = {};\n let size = 0;\n\n for (const key in obj) {\n const value = obj[key];\n\n if (value !== NULL && (!test || !test(value))) {\n next[key] = value;\n ++size;\n }\n }\n\n map.size = size;\n map.empty = 0;\n map.object = obj = next;\n }\n\n };\n if (input) Object.keys(input).forEach(key => {\n map.set(key, input[key]);\n });\n return map;\n}\n\nfunction flush (range, value, threshold, left, right, center) {\n if (!threshold && threshold !== 0) return center;\n const t = +threshold;\n let a = range[0],\n b = peek(range),\n l; // swap endpoints if range is reversed\n\n if (b < a) {\n l = a;\n a = b;\n b = l;\n } // compare value to endpoints\n\n\n l = Math.abs(value - a);\n const r = Math.abs(b - value); // adjust if value is within threshold distance of endpoint\n\n return l < r && l <= t ? left : r <= t ? right : center;\n}\n\nfunction inherits (child, parent, members) {\n const proto = child.prototype = Object.create(parent.prototype);\n Object.defineProperty(proto, 'constructor', {\n value: child,\n writable: true,\n enumerable: true,\n configurable: true\n });\n return extend(proto, members);\n}\n\n/**\n * Predicate that returns true if the value lies within the span\n * of the given range. The left and right flags control the use\n * of inclusive (true) or exclusive (false) comparisons.\n */\nfunction inrange (value, range, left, right) {\n let r0 = range[0],\n r1 = range[range.length - 1],\n t;\n\n if (r0 > r1) {\n t = r0;\n r0 = r1;\n r1 = t;\n }\n\n left = left === undefined || left;\n right = right === undefined || right;\n return (left ? r0 <= value : r0 < value) && (right ? value <= r1 : value < r1);\n}\n\nfunction isBoolean (_) {\n return typeof _ === 'boolean';\n}\n\nfunction isDate (_) {\n return Object.prototype.toString.call(_) === '[object Date]';\n}\n\nfunction isIterable (_) {\n return _ && isFunction(_[Symbol.iterator]);\n}\n\nfunction isNumber (_) {\n return typeof _ === 'number';\n}\n\nfunction isRegExp (_) {\n return Object.prototype.toString.call(_) === '[object RegExp]';\n}\n\nfunction isString (_) {\n return typeof _ === 'string';\n}\n\nfunction key (fields, flat, opt) {\n if (fields) {\n fields = flat ? array(fields).map(f => f.replace(/\\\\(.)/g, '$1')) : array(fields);\n }\n\n const len = fields && fields.length,\n gen = opt && opt.get || getter,\n map = f => gen(flat ? [f] : splitAccessPath(f));\n\n let fn;\n\n if (!len) {\n fn = function () {\n return '';\n };\n } else if (len === 1) {\n const get = map(fields[0]);\n\n fn = function (_) {\n return '' + get(_);\n };\n } else {\n const get = fields.map(map);\n\n fn = function (_) {\n let s = '' + get[0](_),\n i = 0;\n\n while (++i < len) s += '|' + get[i](_);\n\n return s;\n };\n }\n\n return accessor(fn, fields, 'key');\n}\n\nfunction lerp (array, frac) {\n const lo = array[0],\n hi = peek(array),\n f = +frac;\n return !f ? lo : f === 1 ? hi : lo + f * (hi - lo);\n}\n\nconst DEFAULT_MAX_SIZE = 10000; // adapted from https://github.com/dominictarr/hashlru/ (MIT License)\n\nfunction lruCache (maxsize) {\n maxsize = +maxsize || DEFAULT_MAX_SIZE;\n let curr, prev, size;\n\n const clear = () => {\n curr = {};\n prev = {};\n size = 0;\n };\n\n const update = (key, value) => {\n if (++size > maxsize) {\n prev = curr;\n curr = {};\n size = 1;\n }\n\n return curr[key] = value;\n };\n\n clear();\n return {\n clear,\n has: key => has(curr, key) || has(prev, key),\n get: key => has(curr, key) ? curr[key] : has(prev, key) ? update(key, prev[key]) : undefined,\n set: (key, value) => has(curr, key) ? curr[key] = value : update(key, value)\n };\n}\n\nfunction merge (compare, array0, array1, output) {\n const n0 = array0.length,\n n1 = array1.length;\n if (!n1) return array0;\n if (!n0) return array1;\n const merged = output || new array0.constructor(n0 + n1);\n let i0 = 0,\n i1 = 0,\n i = 0;\n\n for (; i0 < n0 && i1 < n1; ++i) {\n merged[i] = compare(array0[i0], array1[i1]) > 0 ? array1[i1++] : array0[i0++];\n }\n\n for (; i0 < n0; ++i0, ++i) {\n merged[i] = array0[i0];\n }\n\n for (; i1 < n1; ++i1, ++i) {\n merged[i] = array1[i1];\n }\n\n return merged;\n}\n\nfunction repeat (str, reps) {\n let s = '';\n\n while (--reps >= 0) s += str;\n\n return s;\n}\n\nfunction pad (str, length, padchar, align) {\n const c = padchar || ' ',\n s = str + '',\n n = length - s.length;\n return n <= 0 ? s : align === 'left' ? repeat(c, n) + s : align === 'center' ? repeat(c, ~~(n / 2)) + s + repeat(c, Math.ceil(n / 2)) : s + repeat(c, n);\n}\n\n/**\n * Return the numerical span of an array: the difference between\n * the last and first values.\n */\n\nfunction span (array) {\n return array && peek(array) - array[0] || 0;\n}\n\nfunction $(x) {\n return isArray(x) ? '[' + x.map($) + ']' : isObject(x) || isString(x) ? // Output valid JSON and JS source strings.\n // See http://timelessrepo.com/json-isnt-a-javascript-subset\n JSON.stringify(x).replace('\\u2028', '\\\\u2028').replace('\\u2029', '\\\\u2029') : x;\n}\n\nfunction toBoolean (_) {\n return _ == null || _ === '' ? null : !_ || _ === 'false' || _ === '0' ? false : !!_;\n}\n\nconst defaultParser = _ => isNumber(_) ? _ : isDate(_) ? _ : Date.parse(_);\n\nfunction toDate (_, parser) {\n parser = parser || defaultParser;\n return _ == null || _ === '' ? null : parser(_);\n}\n\nfunction toString (_) {\n return _ == null || _ === '' ? null : _ + '';\n}\n\nfunction toSet (_) {\n const s = {},\n n = _.length;\n\n for (let i = 0; i < n; ++i) s[_[i]] = true;\n\n return s;\n}\n\nfunction truncate (str, length, align, ellipsis) {\n const e = ellipsis != null ? ellipsis : '\\u2026',\n s = str + '',\n n = s.length,\n l = Math.max(0, length - e.length);\n return n <= length ? s : align === 'left' ? e + s.slice(n - l) : align === 'center' ? s.slice(0, Math.ceil(l / 2)) + e + s.slice(n - ~~(l / 2)) : s.slice(0, l) + e;\n}\n\nfunction visitArray (array, filter, visitor) {\n if (array) {\n if (filter) {\n const n = array.length;\n\n for (let i = 0; i < n; ++i) {\n const t = filter(array[i]);\n if (t) visitor(t, i, array);\n }\n } else {\n array.forEach(visitor);\n }\n }\n}\n\nexport { Debug, Error$1 as Error, Info, None, Warn, accessor, accessorFields, accessorName, array, ascending, clampRange, compare, constant, debounce, error, extend, extent, extentIndex, falsy, fastmap, field, flush, has as hasOwnProperty, id, identity, inherits, inrange, isArray, isBoolean, isDate, isFunction, isIterable, isNumber, isObject, isRegExp, isString, key, lerp, logger, lruCache, merge, mergeConfig, one, pad, panLinear, panLog, panPow, panSymlog, peek, quarter, repeat, span, splitAccessPath, $ as stringValue, toBoolean, toDate, toNumber, toSet, toString, truncate, truthy, utcquarter, visitArray, writeConfig, zero, zoomLinear, zoomLog, zoomPow, zoomSymlog };\n","export function isLogicalOr(op) {\n return !!op.or;\n}\nexport function isLogicalAnd(op) {\n return !!op.and;\n}\nexport function isLogicalNot(op) {\n return !!op.not;\n}\nexport function forEachLeaf(op, fn) {\n if (isLogicalNot(op)) {\n forEachLeaf(op.not, fn);\n }\n else if (isLogicalAnd(op)) {\n for (const subop of op.and) {\n forEachLeaf(subop, fn);\n }\n }\n else if (isLogicalOr(op)) {\n for (const subop of op.or) {\n forEachLeaf(subop, fn);\n }\n }\n else {\n fn(op);\n }\n}\nexport function normalizeLogicalComposition(op, normalizer) {\n if (isLogicalNot(op)) {\n return { not: normalizeLogicalComposition(op.not, normalizer) };\n }\n else if (isLogicalAnd(op)) {\n return { and: op.and.map(o => normalizeLogicalComposition(o, normalizer)) };\n }\n else if (isLogicalOr(op)) {\n return { or: op.or.map(o => normalizeLogicalComposition(o, normalizer)) };\n }\n else {\n return normalizer(op);\n }\n}\n//# sourceMappingURL=logical.js.map","/*\n * Constants and utilities for encoding channels (Visual variables)\n * such as 'x', 'y', 'color'.\n */\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { keys } from './util';\n// Facet\nexport const ROW = 'row';\nexport const COLUMN = 'column';\nexport const FACET = 'facet';\n// Position\nexport const X = 'x';\nexport const Y = 'y';\nexport const X2 = 'x2';\nexport const Y2 = 'y2';\n// Arc-Position\nexport const RADIUS = 'radius';\nexport const RADIUS2 = 'radius2';\nexport const THETA = 'theta';\nexport const THETA2 = 'theta2';\n// Geo Position\nexport const LATITUDE = 'latitude';\nexport const LONGITUDE = 'longitude';\nexport const LATITUDE2 = 'latitude2';\nexport const LONGITUDE2 = 'longitude2';\n// Mark property with scale\nexport const COLOR = 'color';\nexport const FILL = 'fill';\nexport const STROKE = 'stroke';\nexport const SHAPE = 'shape';\nexport const SIZE = 'size';\nexport const ANGLE = 'angle';\nexport const OPACITY = 'opacity';\nexport const FILLOPACITY = 'fillOpacity';\nexport const STROKEOPACITY = 'strokeOpacity';\nexport const STROKEWIDTH = 'strokeWidth';\nexport const STROKEDASH = 'strokeDash';\n// Non-scale channel\nexport const TEXT = 'text';\nexport const ORDER = 'order';\nexport const DETAIL = 'detail';\nexport const KEY = 'key';\nexport const TOOLTIP = 'tooltip';\nexport const HREF = 'href';\nexport const URL = 'url';\nexport const DESCRIPTION = 'description';\nconst POSITION_CHANNEL_INDEX = {\n x: 1,\n y: 1,\n x2: 1,\n y2: 1\n};\nconst POLAR_POSITION_CHANNEL_INDEX = {\n theta: 1,\n theta2: 1,\n radius: 1,\n radius2: 1\n};\nexport function isPolarPositionChannel(c) {\n return c in POLAR_POSITION_CHANNEL_INDEX;\n}\nconst GEO_POSIITON_CHANNEL_INDEX = {\n longitude: 1,\n longitude2: 1,\n latitude: 1,\n latitude2: 1\n};\nexport function getPositionChannelFromLatLong(channel) {\n switch (channel) {\n case LATITUDE:\n return 'y';\n case LATITUDE2:\n return 'y2';\n case LONGITUDE:\n return 'x';\n case LONGITUDE2:\n return 'x2';\n }\n}\nexport function isGeoPositionChannel(c) {\n return c in GEO_POSIITON_CHANNEL_INDEX;\n}\nexport const GEOPOSITION_CHANNELS = keys(GEO_POSIITON_CHANNEL_INDEX);\nconst UNIT_CHANNEL_INDEX = Object.assign(Object.assign(Object.assign(Object.assign({}, POSITION_CHANNEL_INDEX), POLAR_POSITION_CHANNEL_INDEX), GEO_POSIITON_CHANNEL_INDEX), { \n // color\n color: 1, fill: 1, stroke: 1, \n // other non-position with scale\n opacity: 1, fillOpacity: 1, strokeOpacity: 1, strokeWidth: 1, strokeDash: 1, size: 1, angle: 1, shape: 1, \n // channels without scales\n order: 1, text: 1, detail: 1, key: 1, tooltip: 1, href: 1, url: 1, description: 1 });\nexport function isColorChannel(channel) {\n return channel === COLOR || channel === FILL || channel === STROKE;\n}\nconst FACET_CHANNEL_INDEX = {\n row: 1,\n column: 1,\n facet: 1\n};\nexport const FACET_CHANNELS = keys(FACET_CHANNEL_INDEX);\nconst CHANNEL_INDEX = Object.assign(Object.assign({}, UNIT_CHANNEL_INDEX), FACET_CHANNEL_INDEX);\nexport const CHANNELS = keys(CHANNEL_INDEX);\nconst { order: _o, detail: _d, tooltip: _tt1 } = CHANNEL_INDEX, SINGLE_DEF_CHANNEL_INDEX = __rest(CHANNEL_INDEX, [\"order\", \"detail\", \"tooltip\"]);\nconst { row: _r, column: _c, facet: _f } = SINGLE_DEF_CHANNEL_INDEX, SINGLE_DEF_UNIT_CHANNEL_INDEX = __rest(SINGLE_DEF_CHANNEL_INDEX, [\"row\", \"column\", \"facet\"]);\n/**\n * Channels that cannot have an array of channelDef.\n * model.fieldDef, getFieldDef only work for these channels.\n *\n * (The only two channels that can have an array of channelDefs are \"detail\" and \"order\".\n * Since there can be multiple fieldDefs for detail and order, getFieldDef/model.fieldDef\n * are not applicable for them. Similarly, selection projection won't work with \"detail\" and \"order\".)\n */\nexport const SINGLE_DEF_CHANNELS = keys(SINGLE_DEF_CHANNEL_INDEX);\nexport const SINGLE_DEF_UNIT_CHANNELS = keys(SINGLE_DEF_UNIT_CHANNEL_INDEX);\nexport function isSingleDefUnitChannel(str) {\n return !!SINGLE_DEF_UNIT_CHANNEL_INDEX[str];\n}\nexport function isChannel(str) {\n return !!CHANNEL_INDEX[str];\n}\nexport const SECONDARY_RANGE_CHANNEL = [X2, Y2, LATITUDE2, LONGITUDE2, THETA2, RADIUS2];\nexport function isSecondaryRangeChannel(c) {\n const main = getMainRangeChannel(c);\n return main !== c;\n}\n/**\n * Get the main channel for a range channel. E.g. `x` for `x2`.\n */\nexport function getMainRangeChannel(channel) {\n switch (channel) {\n case X2:\n return X;\n case Y2:\n return Y;\n case LATITUDE2:\n return LATITUDE;\n case LONGITUDE2:\n return LONGITUDE;\n case THETA2:\n return THETA;\n case RADIUS2:\n return RADIUS;\n }\n return channel;\n}\nexport function getVgPositionChannel(channel) {\n if (isPolarPositionChannel(channel)) {\n switch (channel) {\n case THETA:\n return 'startAngle';\n case THETA2:\n return 'endAngle';\n case RADIUS:\n return 'outerRadius';\n case RADIUS2:\n return 'innerRadius';\n }\n }\n return channel;\n}\n/**\n * Get the main channel for a range channel. E.g. `x` for `x2`.\n */\nexport function getSecondaryRangeChannel(channel) {\n switch (channel) {\n case X:\n return X2;\n case Y:\n return Y2;\n case LATITUDE:\n return LATITUDE2;\n case LONGITUDE:\n return LONGITUDE2;\n case THETA:\n return THETA2;\n case RADIUS:\n return RADIUS2;\n }\n return undefined;\n}\nexport function getSizeChannel(channel) {\n switch (channel) {\n case X:\n case X2:\n return 'width';\n case Y:\n case Y2:\n return 'height';\n }\n return undefined;\n}\n/**\n * Get the main channel for a range channel. E.g. `x` for `x2`.\n */\nexport function getOffsetChannel(channel) {\n switch (channel) {\n case X:\n return 'xOffset';\n case Y:\n return 'yOffset';\n case X2:\n return 'x2Offset';\n case Y2:\n return 'y2Offset';\n case THETA:\n return 'thetaOffset';\n case RADIUS:\n return 'radiusOffset';\n case THETA2:\n return 'theta2Offset';\n case RADIUS2:\n return 'radius2Offset';\n }\n return undefined;\n}\n// CHANNELS without COLUMN, ROW\nexport const UNIT_CHANNELS = keys(UNIT_CHANNEL_INDEX);\n// NONPOSITION_CHANNELS = UNIT_CHANNELS without X, Y, X2, Y2;\nconst { x: _x, y: _y, \n// x2 and y2 share the same scale as x and y\nx2: _x2, y2: _y2, latitude: _latitude, longitude: _longitude, latitude2: _latitude2, longitude2: _longitude2, theta: _theta, theta2: _theta2, radius: _radius, radius2: _radius2 } = UNIT_CHANNEL_INDEX, \n// The rest of unit channels then have scale\nNONPOSITION_CHANNEL_INDEX = __rest(UNIT_CHANNEL_INDEX, [\"x\", \"y\", \"x2\", \"y2\", \"latitude\", \"longitude\", \"latitude2\", \"longitude2\", \"theta\", \"theta2\", \"radius\", \"radius2\"]);\nexport const NONPOSITION_CHANNELS = keys(NONPOSITION_CHANNEL_INDEX);\nexport const POSITION_SCALE_CHANNEL_INDEX = {\n x: 1,\n y: 1\n};\nexport const POSITION_SCALE_CHANNELS = keys(POSITION_SCALE_CHANNEL_INDEX);\nexport function isXorY(channel) {\n return channel in POSITION_SCALE_CHANNEL_INDEX;\n}\nexport const POLAR_POSITION_SCALE_CHANNEL_INDEX = {\n theta: 1,\n radius: 1\n};\nexport const POLAR_POSITION_SCALE_CHANNELS = keys(POLAR_POSITION_SCALE_CHANNEL_INDEX);\nexport function getPositionScaleChannel(sizeType) {\n return sizeType === 'width' ? X : Y;\n}\n// NON_POSITION_SCALE_CHANNEL = SCALE_CHANNELS without X, Y\nconst { \n// x2 and y2 share the same scale as x and y\n// text and tooltip have format instead of scale,\n// href has neither format, nor scale\ntext: _t, tooltip: _tt, href: _hr, url: _u, description: _al, \n// detail and order have no scale\ndetail: _dd, key: _k, order: _oo } = NONPOSITION_CHANNEL_INDEX, NONPOSITION_SCALE_CHANNEL_INDEX = __rest(NONPOSITION_CHANNEL_INDEX, [\"text\", \"tooltip\", \"href\", \"url\", \"description\", \"detail\", \"key\", \"order\"]);\nexport const NONPOSITION_SCALE_CHANNELS = keys(NONPOSITION_SCALE_CHANNEL_INDEX);\nexport function isNonPositionScaleChannel(channel) {\n return !!NONPOSITION_CHANNEL_INDEX[channel];\n}\n/**\n * @returns whether Vega supports legends for a particular channel\n */\nexport function supportLegend(channel) {\n switch (channel) {\n case COLOR:\n case FILL:\n case STROKE:\n case SIZE:\n case SHAPE:\n case OPACITY:\n case STROKEWIDTH:\n case STROKEDASH:\n return true;\n case FILLOPACITY:\n case STROKEOPACITY:\n case ANGLE:\n return false;\n }\n}\n// Declare SCALE_CHANNEL_INDEX\nconst SCALE_CHANNEL_INDEX = Object.assign(Object.assign(Object.assign({}, POSITION_SCALE_CHANNEL_INDEX), POLAR_POSITION_SCALE_CHANNEL_INDEX), NONPOSITION_SCALE_CHANNEL_INDEX);\n/** List of channels with scales */\nexport const SCALE_CHANNELS = keys(SCALE_CHANNEL_INDEX);\nexport function isScaleChannel(channel) {\n return !!SCALE_CHANNEL_INDEX[channel];\n}\n/**\n * Return whether a channel supports a particular mark type.\n * @param channel channel name\n * @param mark the mark type\n * @return whether the mark supports the channel\n */\nexport function supportMark(channel, mark) {\n return getSupportedMark(channel)[mark];\n}\nconst ALL_MARKS = {\n // all marks\n arc: 'always',\n area: 'always',\n bar: 'always',\n circle: 'always',\n geoshape: 'always',\n image: 'always',\n line: 'always',\n rule: 'always',\n point: 'always',\n rect: 'always',\n square: 'always',\n trail: 'always',\n text: 'always',\n tick: 'always'\n};\nconst { geoshape: _g } = ALL_MARKS, ALL_MARKS_EXCEPT_GEOSHAPE = __rest(ALL_MARKS, [\"geoshape\"]);\n/**\n * Return a dictionary showing whether a channel supports mark type.\n * @param channel\n * @return A dictionary mapping mark types to 'always', 'binned', or undefined\n */\nfunction getSupportedMark(channel) {\n switch (channel) {\n case COLOR:\n case FILL:\n case STROKE:\n // falls through\n case DESCRIPTION:\n case DETAIL:\n case KEY:\n case TOOLTIP:\n case HREF:\n case ORDER: // TODO: revise (order might not support rect, which is not stackable?)\n case OPACITY:\n case FILLOPACITY:\n case STROKEOPACITY:\n case STROKEWIDTH:\n // falls through\n case FACET:\n case ROW: // falls through\n case COLUMN:\n return ALL_MARKS;\n case X:\n case Y:\n case LATITUDE:\n case LONGITUDE:\n // all marks except geoshape. geoshape does not use X, Y -- it uses a projection\n return ALL_MARKS_EXCEPT_GEOSHAPE;\n case X2:\n case Y2:\n case LATITUDE2:\n case LONGITUDE2:\n return {\n area: 'always',\n bar: 'always',\n image: 'always',\n rect: 'always',\n rule: 'always',\n circle: 'binned',\n point: 'binned',\n square: 'binned',\n tick: 'binned',\n line: 'binned',\n trail: 'binned'\n };\n case SIZE:\n return {\n point: 'always',\n tick: 'always',\n rule: 'always',\n circle: 'always',\n square: 'always',\n bar: 'always',\n text: 'always',\n line: 'always',\n trail: 'always'\n };\n case STROKEDASH:\n return {\n line: 'always',\n point: 'always',\n tick: 'always',\n rule: 'always',\n circle: 'always',\n square: 'always',\n bar: 'always',\n geoshape: 'always'\n };\n case SHAPE:\n return { point: 'always', geoshape: 'always' };\n case TEXT:\n return { text: 'always' };\n case ANGLE:\n return { point: 'always', square: 'always', text: 'always' };\n case URL:\n return { image: 'always' };\n case THETA:\n return { text: 'always', arc: 'always' };\n case RADIUS:\n return { text: 'always', arc: 'always' };\n case THETA2:\n case RADIUS2:\n return { arc: 'always' };\n }\n}\nexport function rangeType(channel) {\n switch (channel) {\n case X:\n case Y:\n case THETA:\n case RADIUS:\n case SIZE:\n case ANGLE:\n case STROKEWIDTH:\n case OPACITY:\n case FILLOPACITY:\n case STROKEOPACITY:\n // X2 and Y2 use X and Y scales, so they similarly have continuous range. [falls through]\n case X2:\n case Y2:\n case THETA2:\n case RADIUS2:\n return undefined;\n case FACET:\n case ROW:\n case COLUMN:\n case SHAPE:\n case STROKEDASH:\n // TEXT, TOOLTIP, URL, and HREF have no scale but have discrete output [falls through]\n case TEXT:\n case TOOLTIP:\n case HREF:\n case URL:\n case DESCRIPTION:\n return 'discrete';\n // Color can be either continuous or discrete, depending on scale type.\n case COLOR:\n case FILL:\n case STROKE:\n return 'flexible';\n // No scale, no range type.\n case LATITUDE:\n case LONGITUDE:\n case LATITUDE2:\n case LONGITUDE2:\n case DETAIL:\n case KEY:\n case ORDER:\n return undefined;\n }\n}\n//# sourceMappingURL=channel.js.map","import { isString, toSet } from 'vega-util';\nimport { contains, keys } from './util';\nconst AGGREGATE_OP_INDEX = {\n argmax: 1,\n argmin: 1,\n average: 1,\n count: 1,\n distinct: 1,\n product: 1,\n max: 1,\n mean: 1,\n median: 1,\n min: 1,\n missing: 1,\n q1: 1,\n q3: 1,\n ci0: 1,\n ci1: 1,\n stderr: 1,\n stdev: 1,\n stdevp: 1,\n sum: 1,\n valid: 1,\n values: 1,\n variance: 1,\n variancep: 1\n};\nexport const MULTIDOMAIN_SORT_OP_INDEX = {\n count: 1,\n min: 1,\n max: 1\n};\nexport function isArgminDef(a) {\n return !!a && !!a['argmin'];\n}\nexport function isArgmaxDef(a) {\n return !!a && !!a['argmax'];\n}\nexport const AGGREGATE_OPS = keys(AGGREGATE_OP_INDEX);\nexport function isAggregateOp(a) {\n return isString(a) && !!AGGREGATE_OP_INDEX[a];\n}\nexport const COUNTING_OPS = ['count', 'valid', 'missing', 'distinct'];\nexport function isCountingAggregateOp(aggregate) {\n return isString(aggregate) && contains(COUNTING_OPS, aggregate);\n}\nexport function isMinMaxOp(aggregate) {\n return isString(aggregate) && contains(['min', 'max'], aggregate);\n}\n/** Additive-based aggregation operations. These can be applied to stack. */\nexport const SUM_OPS = ['count', 'sum', 'distinct', 'valid', 'missing'];\n/**\n * Aggregation operators that always produce values within the range [domainMin, domainMax].\n */\nexport const SHARED_DOMAIN_OPS = ['mean', 'average', 'median', 'q1', 'q3', 'min', 'max'];\nexport const SHARED_DOMAIN_OP_INDEX = toSet(SHARED_DOMAIN_OPS);\n//# sourceMappingURL=aggregate.js.map","import { isBoolean, isObject } from 'vega-util';\nimport { COLOR, COLUMN, FILL, FILLOPACITY, OPACITY, ROW, SHAPE, SIZE, STROKE, STROKEDASH, STROKEOPACITY, STROKEWIDTH } from './channel';\nimport { normalizeBin } from './channeldef';\nimport { entries, keys, varName } from './util';\n/**\n * Create a key for the bin configuration. Not for prebinned bin.\n */\nexport function binToString(bin) {\n if (isBoolean(bin)) {\n bin = normalizeBin(bin, undefined);\n }\n return ('bin' +\n keys(bin)\n .map(p => (isParameterExtent(bin[p]) ? varName(`_${p}_${entries(bin[p])}`) : varName(`_${p}_${bin[p]}`)))\n .join(''));\n}\n/**\n * Vega-Lite should bin the data.\n */\nexport function isBinning(bin) {\n return bin === true || (isBinParams(bin) && !bin.binned);\n}\n/**\n * The data is already binned and so Vega-Lite should not bin it again.\n */\nexport function isBinned(bin) {\n return bin === 'binned' || (isBinParams(bin) && bin.binned === true);\n}\nexport function isBinParams(bin) {\n return isObject(bin);\n}\nexport function isParameterExtent(extent) {\n return extent === null || extent === void 0 ? void 0 : extent['param'];\n}\nexport function autoMaxBins(channel) {\n switch (channel) {\n case ROW:\n case COLUMN:\n case SIZE:\n case COLOR:\n case FILL:\n case STROKE:\n case STROKEWIDTH:\n case OPACITY:\n case FILLOPACITY:\n case STROKEOPACITY:\n // Facets and Size shouldn't have too many bins\n // We choose 6 like shape to simplify the rule [falls through]\n case SHAPE:\n return 6; // Vega's \"shape\" has 6 distinct values\n case STROKEDASH:\n return 4; // We only provide 5 different stroke dash values (but 4 is more effective)\n default:\n return 10;\n }\n}\n//# sourceMappingURL=bin.js.map","import { signalRefOrValue } from './compile/common';\nimport { keys } from './util';\nexport function isExprRef(o) {\n return o && !!o['expr'];\n}\nexport function replaceExprRef(index) {\n const props = keys(index || {});\n const newIndex = {};\n for (const prop of props) {\n newIndex[prop] = signalRefOrValue(index[prop]);\n }\n return newIndex;\n}\n//# sourceMappingURL=expr.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isArray, isString } from 'vega-util';\nimport { pick } from './util';\nexport function extractTitleConfig(titleConfig) {\n const { \n // These are non-mark title config that need to be hardcoded\n anchor, frame, offset, orient, angle, limit, \n // color needs to be redirect to fill\n color, \n // subtitle properties\n subtitleColor, subtitleFont, subtitleFontSize, subtitleFontStyle, subtitleFontWeight, subtitleLineHeight, subtitlePadding } = titleConfig, \n // The rest are mark config.\n rest = __rest(titleConfig, [\"anchor\", \"frame\", \"offset\", \"orient\", \"angle\", \"limit\", \"color\", \"subtitleColor\", \"subtitleFont\", \"subtitleFontSize\", \"subtitleFontStyle\", \"subtitleFontWeight\", \"subtitleLineHeight\", \"subtitlePadding\"]);\n const titleMarkConfig = Object.assign(Object.assign({}, rest), (color ? { fill: color } : {}));\n // These are non-mark title config that need to be hardcoded\n const nonMarkTitleProperties = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (anchor ? { anchor } : {})), (frame ? { frame } : {})), (offset ? { offset } : {})), (orient ? { orient } : {})), (angle !== undefined ? { angle } : {})), (limit !== undefined ? { limit } : {}));\n // subtitle part can stay in config.title since header titles do not use subtitle\n const subtitle = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (subtitleColor ? { subtitleColor } : {})), (subtitleFont ? { subtitleFont } : {})), (subtitleFontSize ? { subtitleFontSize } : {})), (subtitleFontStyle ? { subtitleFontStyle } : {})), (subtitleFontWeight ? { subtitleFontWeight } : {})), (subtitleLineHeight ? { subtitleLineHeight } : {})), (subtitlePadding ? { subtitlePadding } : {}));\n const subtitleMarkConfig = pick(titleConfig, ['align', 'baseline', 'dx', 'dy', 'limit']);\n return { titleMarkConfig, subtitleMarkConfig, nonMarkTitleProperties: nonMarkTitleProperties, subtitle };\n}\nexport function isText(v) {\n return isString(v) || (isArray(v) && isString(v[0]));\n}\n//# sourceMappingURL=title.js.map","import { isArray } from 'vega-util';\nimport { keys } from './util';\nexport function isSignalRef(o) {\n return o && !!o['signal'];\n}\nexport function isVgRangeStep(range) {\n return !!range['step'];\n}\nexport function isDataRefUnionedDomain(domain) {\n if (!isArray(domain)) {\n return 'fields' in domain && !('data' in domain);\n }\n return false;\n}\nexport function isFieldRefUnionDomain(domain) {\n if (!isArray(domain)) {\n return 'fields' in domain && 'data' in domain;\n }\n return false;\n}\nexport function isDataRefDomain(domain) {\n if (!isArray(domain)) {\n return 'field' in domain && 'data' in domain;\n }\n return false;\n}\nconst VG_MARK_CONFIG_INDEX = {\n aria: 1,\n description: 1,\n ariaRole: 1,\n ariaRoleDescription: 1,\n blend: 1,\n opacity: 1,\n fill: 1,\n fillOpacity: 1,\n stroke: 1,\n strokeCap: 1,\n strokeWidth: 1,\n strokeOpacity: 1,\n strokeDash: 1,\n strokeDashOffset: 1,\n strokeJoin: 1,\n strokeOffset: 1,\n strokeMiterLimit: 1,\n startAngle: 1,\n endAngle: 1,\n padAngle: 1,\n innerRadius: 1,\n outerRadius: 1,\n size: 1,\n shape: 1,\n interpolate: 1,\n tension: 1,\n orient: 1,\n align: 1,\n baseline: 1,\n text: 1,\n dir: 1,\n dx: 1,\n dy: 1,\n ellipsis: 1,\n limit: 1,\n radius: 1,\n theta: 1,\n angle: 1,\n font: 1,\n fontSize: 1,\n fontWeight: 1,\n fontStyle: 1,\n lineBreak: 1,\n lineHeight: 1,\n cursor: 1,\n href: 1,\n tooltip: 1,\n cornerRadius: 1,\n cornerRadiusTopLeft: 1,\n cornerRadiusTopRight: 1,\n cornerRadiusBottomLeft: 1,\n cornerRadiusBottomRight: 1,\n aspect: 1,\n width: 1,\n height: 1,\n url: 1,\n smooth: 1\n // commented below are vg channel that do not have mark config.\n // x: 1,\n // y: 1,\n // x2: 1,\n // y2: 1,\n // xc'|'yc'\n // clip: 1,\n // path: 1,\n // url: 1,\n};\nexport const VG_MARK_CONFIGS = keys(VG_MARK_CONFIG_INDEX);\nexport const VG_MARK_INDEX = {\n arc: 1,\n area: 1,\n group: 1,\n image: 1,\n line: 1,\n path: 1,\n rect: 1,\n rule: 1,\n shape: 1,\n symbol: 1,\n text: 1,\n trail: 1\n};\n// Vega's cornerRadius channels.\nexport const VG_CORNERRADIUS_CHANNELS = [\n 'cornerRadius',\n 'cornerRadiusTopLeft',\n 'cornerRadiusTopRight',\n 'cornerRadiusBottomLeft',\n 'cornerRadiusBottomRight'\n];\n//# sourceMappingURL=vega.schema.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { array, isArray, stringValue } from 'vega-util';\nimport { vgField } from '../channeldef';\nimport { isExprRef } from '../expr';\nimport { isText } from '../title';\nimport { deepEqual, getFirstDefined } from '../util';\nimport { isSignalRef } from '../vega.schema';\nexport const BIN_RANGE_DELIMITER = ' \\u2013 ';\nexport function signalOrValueRefWithCondition(val) {\n const condition = isArray(val.condition)\n ? val.condition.map(conditionalSignalRefOrValue)\n : conditionalSignalRefOrValue(val.condition);\n return Object.assign(Object.assign({}, signalRefOrValue(val)), { condition });\n}\nexport function signalRefOrValue(value) {\n if (isExprRef(value)) {\n const { expr } = value, rest = __rest(value, [\"expr\"]);\n return Object.assign({ signal: expr }, rest);\n }\n return value;\n}\nexport function conditionalSignalRefOrValue(value) {\n if (isExprRef(value)) {\n const { expr } = value, rest = __rest(value, [\"expr\"]);\n return Object.assign({ signal: expr }, rest);\n }\n return value;\n}\nexport function signalOrValueRef(value) {\n if (isExprRef(value)) {\n const { expr } = value, rest = __rest(value, [\"expr\"]);\n return Object.assign({ signal: expr }, rest);\n }\n if (isSignalRef(value)) {\n return value;\n }\n return value !== undefined ? { value } : undefined;\n}\nexport function exprFromValueOrSignalRef(ref) {\n if (isSignalRef(ref)) {\n return ref.signal;\n }\n return stringValue(ref.value);\n}\nexport function signalOrStringValue(v) {\n if (isSignalRef(v)) {\n return v.signal;\n }\n return v == null ? null : stringValue(v);\n}\nexport function applyMarkConfig(e, model, propsList) {\n for (const property of propsList) {\n const value = getMarkConfig(property, model.markDef, model.config);\n if (value !== undefined) {\n e[property] = signalOrValueRef(value);\n }\n }\n return e;\n}\nexport function getStyles(mark) {\n var _a;\n return [].concat(mark.type, (_a = mark.style) !== null && _a !== void 0 ? _a : []);\n}\nexport function getMarkPropOrConfig(channel, mark, config, opt = {}) {\n const { vgChannel, ignoreVgConfig } = opt;\n if (vgChannel && mark[vgChannel] !== undefined) {\n return mark[vgChannel];\n }\n else if (mark[channel] !== undefined) {\n return mark[channel];\n }\n else if (ignoreVgConfig && (!vgChannel || vgChannel === channel)) {\n return undefined;\n }\n return getMarkConfig(channel, mark, config, opt);\n}\n/**\n * Return property value from style or mark specific config property if exists.\n * Otherwise, return general mark specific config.\n */\nexport function getMarkConfig(channel, mark, config, { vgChannel } = {}) {\n return getFirstDefined(\n // style config has highest precedence\n vgChannel ? getMarkStyleConfig(channel, mark, config.style) : undefined, getMarkStyleConfig(channel, mark, config.style), \n // then mark-specific config\n vgChannel ? config[mark.type][vgChannel] : undefined, config[mark.type][channel], // Need to cast because MarkDef doesn't perfectly match with AnyMarkConfig, but if the type isn't available, we'll get nothing here, which is fine\n // If there is vgChannel, skip vl channel.\n // For example, vl size for text is vg fontSize, but config.mark.size is only for point size.\n vgChannel ? config.mark[vgChannel] : config.mark[channel] // Need to cast for the same reason as above\n );\n}\nexport function getMarkStyleConfig(prop, mark, styleConfigIndex) {\n return getStyleConfig(prop, getStyles(mark), styleConfigIndex);\n}\nexport function getStyleConfig(p, styles, styleConfigIndex) {\n styles = array(styles);\n let value;\n for (const style of styles) {\n const styleConfig = styleConfigIndex[style];\n if (styleConfig && styleConfig[p] !== undefined) {\n value = styleConfig[p];\n }\n }\n return value;\n}\n/**\n * Return Vega sort parameters (tuple of field and order).\n */\nexport function sortParams(orderDef, fieldRefOption) {\n return array(orderDef).reduce((s, orderChannelDef) => {\n var _a;\n s.field.push(vgField(orderChannelDef, fieldRefOption));\n s.order.push((_a = orderChannelDef.sort) !== null && _a !== void 0 ? _a : 'ascending');\n return s;\n }, { field: [], order: [] });\n}\nexport function mergeTitleFieldDefs(f1, f2) {\n const merged = [...f1];\n f2.forEach(fdToMerge => {\n for (const fieldDef1 of merged) {\n // If already exists, no need to append to merged array\n if (deepEqual(fieldDef1, fdToMerge)) {\n return;\n }\n }\n merged.push(fdToMerge);\n });\n return merged;\n}\nexport function mergeTitle(title1, title2) {\n if (deepEqual(title1, title2) || !title2) {\n // if titles are the same or title2 is falsy\n return title1;\n }\n else if (!title1) {\n // if title1 is falsy\n return title2;\n }\n else {\n return [...array(title1), ...array(title2)].join(', ');\n }\n}\nexport function mergeTitleComponent(v1, v2) {\n const v1Val = v1.value;\n const v2Val = v2.value;\n if (v1Val == null || v2Val === null) {\n return {\n explicit: v1.explicit,\n value: null\n };\n }\n else if ((isText(v1Val) || isSignalRef(v1Val)) && (isText(v2Val) || isSignalRef(v2Val))) {\n return {\n explicit: v1.explicit,\n value: mergeTitle(v1Val, v2Val)\n };\n }\n else if (isText(v1Val) || isSignalRef(v1Val)) {\n return {\n explicit: v1.explicit,\n value: v1Val\n };\n }\n else if (isText(v2Val) || isSignalRef(v2Val)) {\n return {\n explicit: v1.explicit,\n value: v2Val\n };\n }\n else if (!isText(v1Val) && !isSignalRef(v1Val) && !isText(v2Val) && !isSignalRef(v2Val)) {\n return {\n explicit: v1.explicit,\n value: mergeTitleFieldDefs(v1Val, v2Val)\n };\n }\n /* istanbul ignore next: Condition should not happen -- only for warning in development. */\n throw new Error('It should never reach here');\n}\n//# sourceMappingURL=common.js.map","import { getSizeChannel } from '../channel';\nimport { stringify } from '../util';\nexport function invalidSpec(spec) {\n return `Invalid specification ${stringify(spec)}. Make sure the specification includes at least one of the following properties: \"mark\", \"layer\", \"facet\", \"hconcat\", \"vconcat\", \"concat\", or \"repeat\".`;\n}\n// FIT\nexport const FIT_NON_SINGLE = 'Autosize \"fit\" only works for single views and layered views.';\nexport function containerSizeNonSingle(name) {\n const uName = name == 'width' ? 'Width' : 'Height';\n return `${uName} \"container\" only works for single views and layered views.`;\n}\nexport function containerSizeNotCompatibleWithAutosize(name) {\n const uName = name == 'width' ? 'Width' : 'Height';\n const fitDirection = name == 'width' ? 'x' : 'y';\n return `${uName} \"container\" only works well with autosize \"fit\" or \"fit-${fitDirection}\".`;\n}\nexport function droppingFit(channel) {\n return channel\n ? `Dropping \"fit-${channel}\" because spec has discrete ${getSizeChannel(channel)}.`\n : `Dropping \"fit\" because spec has discrete size.`;\n}\n// VIEW SIZE\nexport function unknownField(channel) {\n return `Unknown field for ${channel}. Cannot calculate view size.`;\n}\n// SELECTION\nexport function cannotProjectOnChannelWithoutField(channel) {\n return `Cannot project a selection on encoding channel \"${channel}\", which has no field.`;\n}\nexport function cannotProjectAggregate(channel, aggregate) {\n return `Cannot project a selection on encoding channel \"${channel}\" as it uses an aggregate function (\"${aggregate}\").`;\n}\nexport function nearestNotSupportForContinuous(mark) {\n return `The \"nearest\" transform is not supported for ${mark} marks.`;\n}\nexport function selectionNotSupported(mark) {\n return `Selection not supported for ${mark} yet.`;\n}\nexport function selectionNotFound(name) {\n return `Cannot find a selection named \"${name}\".`;\n}\nexport const SCALE_BINDINGS_CONTINUOUS = 'Scale bindings are currently only supported for scales with unbinned, continuous domains.';\nexport const LEGEND_BINDINGS_MUST_HAVE_PROJECTION = 'Legend bindings are only supported for selections over an individual field or encoding channel.';\nexport function cannotLookupVariableParameter(name) {\n return `Lookups can only be performed on selection parameters. \"${name}\" is a variable parameter.`;\n}\nexport function noSameUnitLookup(name) {\n return (`Cannot define and lookup the \"${name}\" selection in the same view. ` +\n `Try moving the lookup into a second, layered view?`);\n}\nexport const NEEDS_SAME_SELECTION = 'The same selection must be used to override scale domains in a layered view.';\nexport const INTERVAL_INITIALIZED_WITH_X_Y = 'Interval selections should be initialized using \"x\" and/or \"y\" keys.';\n// REPEAT\nexport function noSuchRepeatedValue(field) {\n return `Unknown repeated value \"${field}\".`;\n}\nexport function columnsNotSupportByRowCol(type) {\n return `The \"columns\" property cannot be used when \"${type}\" has nested row/column.`;\n}\n// CONCAT / REPEAT\nexport const CONCAT_CANNOT_SHARE_AXIS = 'Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).';\n// DATA\nexport function unrecognizedParse(p) {\n return `Unrecognized parse \"${p}\".`;\n}\nexport function differentParse(field, local, ancestor) {\n return `An ancestor parsed field \"${field}\" as ${ancestor} but a child wants to parse the field as ${local}.`;\n}\nexport const ADD_SAME_CHILD_TWICE = 'Attempt to add the same child twice.';\n// TRANSFORMS\nexport function invalidTransformIgnored(transform) {\n return `Ignoring an invalid transform: ${stringify(transform)}.`;\n}\nexport const NO_FIELDS_NEEDS_AS = 'If \"from.fields\" is not specified, \"as\" has to be a string that specifies the key to be used for the data from the secondary source.';\n// ENCODING & FACET\nexport function customFormatTypeNotAllowed(channel) {\n return `Config.customFormatTypes is not true, thus custom format type and format for channel ${channel} are dropped.`;\n}\nexport function projectionOverridden(opt) {\n const { parentProjection, projection } = opt;\n return `Layer's shared projection ${stringify(parentProjection)} is overridden by a child projection ${stringify(projection)}.`;\n}\nexport const REPLACE_ANGLE_WITH_THETA = 'Arc marks uses theta channel rather than angle, replacing angle with theta.';\nexport function primitiveChannelDef(channel, type, value) {\n return `Channel ${channel} is a ${type}. Converted to {value: ${stringify(value)}}.`;\n}\nexport function invalidFieldType(type) {\n return `Invalid field type \"${type}\".`;\n}\nexport function invalidFieldTypeForCountAggregate(type, aggregate) {\n return `Invalid field type \"${type}\" for aggregate: \"${aggregate}\", using \"quantitative\" instead.`;\n}\nexport function invalidAggregate(aggregate) {\n return `Invalid aggregation operator \"${aggregate}\".`;\n}\nexport function missingFieldType(channel, newType) {\n return `Missing type for channel \"${channel}\", using \"${newType}\" instead.`;\n}\nexport function droppingColor(type, opt) {\n const { fill, stroke } = opt;\n return `Dropping color ${type} as the plot also has ${fill && stroke ? 'fill and stroke' : fill ? 'fill' : 'stroke'}.`;\n}\nexport function relativeBandSizeNotSupported(sizeChannel) {\n return `Position range does not support relative band size for ${sizeChannel}.`;\n}\nexport function emptyFieldDef(fieldDef, channel) {\n return `Dropping ${stringify(fieldDef)} from channel \"${channel}\" since it does not contain any data field, datum, value, or signal.`;\n}\nexport const LINE_WITH_VARYING_SIZE = 'Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.';\nexport function incompatibleChannel(channel, markOrFacet, when) {\n return `${channel} dropped as it is incompatible with \"${markOrFacet}\"${when ? ` when ${when}` : ''}.`;\n}\nexport function invalidEncodingChannel(channel) {\n return `${channel}-encoding is dropped as ${channel} is not a valid encoding channel.`;\n}\nexport function channelShouldBeDiscrete(channel) {\n return `${channel} encoding should be discrete (ordinal / nominal / binned).`;\n}\nexport function channelShouldBeDiscreteOrDiscretizing(channel) {\n return `${channel} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`;\n}\nexport function facetChannelDropped(channels) {\n return `Facet encoding dropped as ${channels.join(' and ')} ${channels.length > 1 ? 'are' : 'is'} also specified.`;\n}\nexport function discreteChannelCannotEncode(channel, type) {\n return `Using discrete channel \"${channel}\" to encode \"${type}\" field can be misleading as it does not encode ${type === 'ordinal' ? 'order' : 'magnitude'}.`;\n}\n// MARK\nexport function rangeMarkAlignmentCannotBeExpression(align) {\n return `The ${align} for range marks cannot be an expression`;\n}\nexport function lineWithRange(hasX2, hasY2) {\n const channels = hasX2 && hasY2 ? 'x2 and y2' : hasX2 ? 'x2' : 'y2';\n return `Line mark is for continuous lines and thus cannot be used with ${channels}. We will use the rule mark (line segments) instead.`;\n}\nexport function orientOverridden(original, actual) {\n return `Specified orient \"${original}\" overridden with \"${actual}\".`;\n}\n// SCALE\nexport const CANNOT_UNION_CUSTOM_DOMAIN_WITH_FIELD_DOMAIN = 'Custom domain scale cannot be unioned with default field-based domain.';\nexport function cannotUseScalePropertyWithNonColor(prop) {\n return `Cannot use the scale property \"${prop}\" with non-color channel.`;\n}\nexport function cannotUseRelativeBandSizeWithNonBandScale(scaleType) {\n return `Cannot use the relative band size with ${scaleType} scale.`;\n}\nexport function unaggregateDomainHasNoEffectForRawField(fieldDef) {\n return `Using unaggregated domain with raw field has no effect (${stringify(fieldDef)}).`;\n}\nexport function unaggregateDomainWithNonSharedDomainOp(aggregate) {\n return `Unaggregated domain not applicable for \"${aggregate}\" since it produces values outside the origin domain of the source data.`;\n}\nexport function unaggregatedDomainWithLogScale(fieldDef) {\n return `Unaggregated domain is currently unsupported for log scale (${stringify(fieldDef)}).`;\n}\nexport function cannotApplySizeToNonOrientedMark(mark) {\n return `Cannot apply size to non-oriented mark \"${mark}\".`;\n}\nexport function scaleTypeNotWorkWithChannel(channel, scaleType, defaultScaleType) {\n return `Channel \"${channel}\" does not work with \"${scaleType}\" scale. We are using \"${defaultScaleType}\" scale instead.`;\n}\nexport function scaleTypeNotWorkWithFieldDef(scaleType, defaultScaleType) {\n return `FieldDef does not work with \"${scaleType}\" scale. We are using \"${defaultScaleType}\" scale instead.`;\n}\nexport function scalePropertyNotWorkWithScaleType(scaleType, propName, channel) {\n return `${channel}-scale's \"${propName}\" is dropped as it does not work with ${scaleType} scale.`;\n}\nexport function scaleTypeNotWorkWithMark(mark, scaleType) {\n return `Scale type \"${scaleType}\" does not work with mark \"${mark}\".`;\n}\nexport function stepDropped(channel) {\n return `The step for \"${channel}\" is dropped because the ${channel === 'width' ? 'x' : 'y'} is continuous.`;\n}\nexport function mergeConflictingProperty(property, propertyOf, v1, v2) {\n return `Conflicting ${propertyOf.toString()} property \"${property.toString()}\" (${stringify(v1)} and ${stringify(v2)}). Using ${stringify(v1)}.`;\n}\nexport function mergeConflictingDomainProperty(property, propertyOf, v1, v2) {\n return `Conflicting ${propertyOf.toString()} property \"${property.toString()}\" (${stringify(v1)} and ${stringify(v2)}). Using the union of the two domains.`;\n}\nexport function independentScaleMeansIndependentGuide(channel) {\n return `Setting the scale to be independent for \"${channel}\" means we also have to set the guide (axis or legend) to be independent.`;\n}\nexport function domainSortDropped(sort) {\n return `Dropping sort property ${stringify(sort)} as unioned domains only support boolean or op \"count\", \"min\", and \"max\".`;\n}\nexport const MORE_THAN_ONE_SORT = 'Domains that should be unioned has conflicting sort properties. Sort will be set to true.';\nexport const FACETED_INDEPENDENT_DIFFERENT_SOURCES = 'Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.';\nexport const FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES = 'Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.';\nexport const FACETED_INDEPENDENT_SAME_SOURCE = 'Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.';\n// AXIS\nexport const INVALID_CHANNEL_FOR_AXIS = 'Invalid channel for axis.';\n// STACK\nexport function cannotStackRangedMark(channel) {\n return `Cannot stack \"${channel}\" if there is already \"${channel}2\".`;\n}\nexport function cannotStackNonLinearScale(scaleType) {\n return `Cannot stack non-linear scale (${scaleType}).`;\n}\nexport function stackNonSummativeAggregate(aggregate) {\n return `Stacking is applied even though the aggregate function is non-summative (\"${aggregate}\").`;\n}\n// TIMEUNIT\nexport function invalidTimeUnit(unitName, value) {\n return `Invalid ${unitName}: ${stringify(value)}.`;\n}\nexport function droppedDay(d) {\n return `Dropping day from datetime ${stringify(d)} as day cannot be combined with other units.`;\n}\nexport function errorBarCenterAndExtentAreNotNeeded(center, extent) {\n return `${extent ? 'extent ' : ''}${extent && center ? 'and ' : ''}${center ? 'center ' : ''}${extent && center ? 'are ' : 'is '}not needed when data are aggregated.`;\n}\nexport function errorBarCenterIsUsedWithWrongExtent(center, extent, mark) {\n return `${center} is not usually used with ${extent} for ${mark}.`;\n}\nexport function errorBarContinuousAxisHasCustomizedAggregate(aggregate, compositeMark) {\n return `Continuous axis should not have customized aggregation function ${aggregate}; ${compositeMark} already agregates the axis.`;\n}\nexport function errorBand1DNotSupport(property) {\n return `1D error band does not support ${property}.`;\n}\n// CHANNEL\nexport function channelRequiredForBinned(channel) {\n return `Channel ${channel} is required for \"binned\" bin.`;\n}\nexport function channelShouldNotBeUsedForBinned(channel) {\n return `Channel ${channel} should not be used with \"binned\" bin.`;\n}\nexport function domainRequiredForThresholdScale(channel) {\n return `Domain for ${channel} is required for threshold scale.`;\n}\n//# sourceMappingURL=message.js.map","/**\n * Vega-Lite's singleton logger utility.\n */\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _LocalLogger_level;\nimport { Debug, Error as ErrorLevel, Info, logger, Warn } from 'vega-util';\nimport * as message_1 from './message';\nexport { message_1 as message };\n/**\n * Main (default) Vega Logger instance for Vega-Lite.\n */\nconst main = logger(Warn);\nlet current = main;\n/**\n * Logger tool for checking if the code throws correct warning.\n */\nexport class LocalLogger {\n constructor() {\n this.warns = [];\n this.infos = [];\n this.debugs = [];\n _LocalLogger_level.set(this, Warn);\n }\n level(_) {\n if (_) {\n __classPrivateFieldSet(this, _LocalLogger_level, _, \"f\");\n return this;\n }\n return __classPrivateFieldGet(this, _LocalLogger_level, \"f\");\n }\n warn(...args) {\n if (__classPrivateFieldGet(this, _LocalLogger_level, \"f\") >= Warn)\n this.warns.push(...args);\n return this;\n }\n info(...args) {\n if (__classPrivateFieldGet(this, _LocalLogger_level, \"f\") >= Info)\n this.infos.push(...args);\n return this;\n }\n debug(...args) {\n if (__classPrivateFieldGet(this, _LocalLogger_level, \"f\") >= Debug)\n this.debugs.push(...args);\n return this;\n }\n error(...args) {\n if (__classPrivateFieldGet(this, _LocalLogger_level, \"f\") >= ErrorLevel)\n throw Error(...args);\n return this;\n }\n}\n_LocalLogger_level = new WeakMap();\nexport function wrap(f) {\n return () => {\n current = new LocalLogger();\n f(current);\n reset();\n };\n}\n/**\n * Set the singleton logger to be a custom logger.\n */\nexport function set(newLogger) {\n current = newLogger;\n return current;\n}\n/**\n * Reset the main logger to use the default Vega Logger.\n */\nexport function reset() {\n current = main;\n return current;\n}\nexport function error(...args) {\n current.error(...args);\n}\nexport function warn(...args) {\n current.warn(...args);\n}\nexport function info(...args) {\n current.info(...args);\n}\nexport function debug(...args) {\n current.debug(...args);\n}\n//# sourceMappingURL=index.js.map","// DateTime definition object\nimport { isNumber, isObject } from 'vega-util';\nimport * as log from './log';\nimport { TIMEUNIT_PARTS } from './timeunit';\nimport { duplicate, isNumeric, keys } from './util';\nexport function isDateTime(o) {\n if (o && isObject(o)) {\n for (const part of TIMEUNIT_PARTS) {\n if (part in o) {\n return true;\n }\n }\n }\n return false;\n}\nexport const MONTHS = [\n 'january',\n 'february',\n 'march',\n 'april',\n 'may',\n 'june',\n 'july',\n 'august',\n 'september',\n 'october',\n 'november',\n 'december'\n];\nexport const SHORT_MONTHS = MONTHS.map(m => m.substr(0, 3));\nexport const DAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];\nexport const SHORT_DAYS = DAYS.map(d => d.substr(0, 3));\nfunction normalizeQuarter(q) {\n if (isNumeric(q)) {\n q = +q;\n }\n if (isNumber(q)) {\n if (q > 4) {\n log.warn(log.message.invalidTimeUnit('quarter', q));\n }\n // We accept 1-based quarter, so need to readjust to 0-based quarter\n return q - 1;\n }\n else {\n // Invalid quarter\n throw new Error(log.message.invalidTimeUnit('quarter', q));\n }\n}\nfunction normalizeMonth(m) {\n if (isNumeric(m)) {\n m = +m;\n }\n if (isNumber(m)) {\n // We accept 1-based month, so need to readjust to 0-based month\n return m - 1;\n }\n else {\n const lowerM = m.toLowerCase();\n const monthIndex = MONTHS.indexOf(lowerM);\n if (monthIndex !== -1) {\n return monthIndex; // 0 for january, ...\n }\n const shortM = lowerM.substr(0, 3);\n const shortMonthIndex = SHORT_MONTHS.indexOf(shortM);\n if (shortMonthIndex !== -1) {\n return shortMonthIndex;\n }\n // Invalid month\n throw new Error(log.message.invalidTimeUnit('month', m));\n }\n}\nfunction normalizeDay(d) {\n if (isNumeric(d)) {\n d = +d;\n }\n if (isNumber(d)) {\n // mod so that this can be both 0-based where 0 = sunday\n // and 1-based where 7=sunday\n return d % 7;\n }\n else {\n const lowerD = d.toLowerCase();\n const dayIndex = DAYS.indexOf(lowerD);\n if (dayIndex !== -1) {\n return dayIndex; // 0 for january, ...\n }\n const shortD = lowerD.substr(0, 3);\n const shortDayIndex = SHORT_DAYS.indexOf(shortD);\n if (shortDayIndex !== -1) {\n return shortDayIndex;\n }\n // Invalid day\n throw new Error(log.message.invalidTimeUnit('day', d));\n }\n}\n/**\n * @param d the date.\n * @param normalize whether to normalize quarter, month, day. This should probably be true if d is a DateTime.\n * @returns array of date time parts [year, month, day, hours, minutes, seconds, milliseconds]\n */\nfunction dateTimeParts(d, normalize) {\n const parts = [];\n if (normalize && d.day !== undefined) {\n if (keys(d).length > 1) {\n log.warn(log.message.droppedDay(d));\n d = duplicate(d);\n delete d.day;\n }\n }\n if (d.year !== undefined) {\n parts.push(d.year);\n }\n else {\n // Just like Vega's timeunit transform, set default year to 2012, so domain conversion will be compatible with Vega\n // Note: 2012 is a leap year (and so the date February 29 is respected) that begins on a Sunday (and so days of the week will order properly at the beginning of the year).\n parts.push(2012);\n }\n if (d.month !== undefined) {\n const month = normalize ? normalizeMonth(d.month) : d.month;\n parts.push(month);\n }\n else if (d.quarter !== undefined) {\n const quarter = normalize ? normalizeQuarter(d.quarter) : d.quarter;\n parts.push(isNumber(quarter) ? quarter * 3 : `${quarter}*3`);\n }\n else {\n parts.push(0); // months start at zero in JS\n }\n if (d.date !== undefined) {\n parts.push(d.date);\n }\n else if (d.day !== undefined) {\n // HACK: Day only works as a standalone unit\n // This is only correct because we always set year to 2006 for day\n const day = normalize ? normalizeDay(d.day) : d.day;\n parts.push(isNumber(day) ? day + 1 : `${day}+1`);\n }\n else {\n parts.push(1); // Date starts at 1 in JS\n }\n // Note: can't use TimeUnit enum here as importing it will create\n // circular dependency problem!\n for (const timeUnit of ['hours', 'minutes', 'seconds', 'milliseconds']) {\n const unit = d[timeUnit];\n parts.push(typeof unit === 'undefined' ? 0 : unit);\n }\n return parts;\n}\n/**\n * Return Vega expression for a date time.\n *\n * @param d the date time.\n * @returns the Vega expression.\n */\nexport function dateTimeToExpr(d) {\n const parts = dateTimeParts(d, true);\n const string = parts.join(', ');\n if (d.utc) {\n return `utc(${string})`;\n }\n else {\n return `datetime(${string})`;\n }\n}\n/**\n * Return Vega expression for a date time expression.\n *\n * @param d the internal date time object with expression.\n * @returns the Vega expression.\n */\nexport function dateTimeExprToExpr(d) {\n const parts = dateTimeParts(d, false);\n const string = parts.join(', ');\n if (d.utc) {\n return `utc(${string})`;\n }\n else {\n return `datetime(${string})`;\n }\n}\n/**\n * @param d the date time.\n * @returns the timestamp.\n */\nexport function dateTimeToTimestamp(d) {\n const parts = dateTimeParts(d, true);\n if (d.utc) {\n return +new Date(Date.UTC(...parts));\n }\n else {\n return +new Date(...parts);\n }\n}\n//# sourceMappingURL=datetime.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isObject, isString } from 'vega-util';\nimport { dateTimeExprToExpr } from './datetime';\nimport { accessPathWithDatum, keys, stringify, varName } from './util';\n/** Time Unit that only corresponds to only one part of Date objects. */\nexport const LOCAL_SINGLE_TIMEUNIT_INDEX = {\n year: 1,\n quarter: 1,\n month: 1,\n week: 1,\n day: 1,\n dayofyear: 1,\n date: 1,\n hours: 1,\n minutes: 1,\n seconds: 1,\n milliseconds: 1\n};\nexport const TIMEUNIT_PARTS = keys(LOCAL_SINGLE_TIMEUNIT_INDEX);\nexport function isLocalSingleTimeUnit(timeUnit) {\n return !!LOCAL_SINGLE_TIMEUNIT_INDEX[timeUnit];\n}\nexport const UTC_SINGLE_TIMEUNIT_INDEX = {\n utcyear: 1,\n utcquarter: 1,\n utcmonth: 1,\n utcweek: 1,\n utcday: 1,\n utcdayofyear: 1,\n utcdate: 1,\n utchours: 1,\n utcminutes: 1,\n utcseconds: 1,\n utcmilliseconds: 1\n};\nexport const LOCAL_MULTI_TIMEUNIT_INDEX = {\n yearquarter: 1,\n yearquartermonth: 1,\n yearmonth: 1,\n yearmonthdate: 1,\n yearmonthdatehours: 1,\n yearmonthdatehoursminutes: 1,\n yearmonthdatehoursminutesseconds: 1,\n yearweek: 1,\n yearweekday: 1,\n yearweekdayhours: 1,\n yearweekdayhoursminutes: 1,\n yearweekdayhoursminutesseconds: 1,\n yeardayofyear: 1,\n quartermonth: 1,\n monthdate: 1,\n monthdatehours: 1,\n monthdatehoursminutes: 1,\n monthdatehoursminutesseconds: 1,\n weekday: 1,\n weeksdayhours: 1,\n weekdayhoursminutes: 1,\n weekdayhoursminutesseconds: 1,\n dayhours: 1,\n dayhoursminutes: 1,\n dayhoursminutesseconds: 1,\n hoursminutes: 1,\n hoursminutesseconds: 1,\n minutesseconds: 1,\n secondsmilliseconds: 1\n};\nexport const UTC_MULTI_TIMEUNIT_INDEX = {\n utcyearquarter: 1,\n utcyearquartermonth: 1,\n utcyearmonth: 1,\n utcyearmonthdate: 1,\n utcyearmonthdatehours: 1,\n utcyearmonthdatehoursminutes: 1,\n utcyearmonthdatehoursminutesseconds: 1,\n utcyearweek: 1,\n utcyearweekday: 1,\n utcyearweekdayhours: 1,\n utcyearweekdayhoursminutes: 1,\n utcyearweekdayhoursminutesseconds: 1,\n utcyeardayofyear: 1,\n utcquartermonth: 1,\n utcmonthdate: 1,\n utcmonthdatehours: 1,\n utcmonthdatehoursminutes: 1,\n utcmonthdatehoursminutesseconds: 1,\n utcweekday: 1,\n utcweeksdayhours: 1,\n utcweekdayhoursminutes: 1,\n utcweekdayhoursminutesseconds: 1,\n utcdayhours: 1,\n utcdayhoursminutes: 1,\n utcdayhoursminutesseconds: 1,\n utchoursminutes: 1,\n utchoursminutesseconds: 1,\n utcminutesseconds: 1,\n utcsecondsmilliseconds: 1\n};\nexport function isUTCTimeUnit(t) {\n return t.startsWith('utc');\n}\nexport function getLocalTimeUnit(t) {\n return t.substr(3);\n}\n// In order of increasing specificity\nexport const VEGALITE_TIMEFORMAT = {\n 'year-month': '%b %Y ',\n 'year-month-date': '%b %d, %Y '\n};\nexport function getTimeUnitParts(timeUnit) {\n return TIMEUNIT_PARTS.filter(part => containsTimeUnit(timeUnit, part));\n}\n/** Returns true if fullTimeUnit contains the timeUnit, false otherwise. */\nexport function containsTimeUnit(fullTimeUnit, timeUnit) {\n const index = fullTimeUnit.indexOf(timeUnit);\n if (index < 0) {\n return false;\n }\n // exclude milliseconds\n if (index > 0 && timeUnit === 'seconds' && fullTimeUnit.charAt(index - 1) === 'i') {\n return false;\n }\n // exclude dayofyear\n if (fullTimeUnit.length > index + 3 && timeUnit === 'day' && fullTimeUnit.charAt(index + 3) === 'o') {\n return false;\n }\n if (index > 0 && timeUnit === 'year' && fullTimeUnit.charAt(index - 1) === 'f') {\n return false;\n }\n return true;\n}\n/**\n * Returns Vega expression for a given timeUnit and fieldRef\n */\nexport function fieldExpr(fullTimeUnit, field, { end } = { end: false }) {\n const fieldRef = accessPathWithDatum(field);\n const utc = isUTCTimeUnit(fullTimeUnit) ? 'utc' : '';\n function func(timeUnit) {\n if (timeUnit === 'quarter') {\n // quarter starting at 0 (0,3,6,9).\n return `(${utc}quarter(${fieldRef})-1)`;\n }\n else {\n return `${utc}${timeUnit}(${fieldRef})`;\n }\n }\n let lastTimeUnit;\n const dateExpr = {};\n for (const part of TIMEUNIT_PARTS) {\n if (containsTimeUnit(fullTimeUnit, part)) {\n dateExpr[part] = func(part);\n lastTimeUnit = part;\n }\n }\n if (end) {\n dateExpr[lastTimeUnit] += '+1';\n }\n return dateTimeExprToExpr(dateExpr);\n}\nexport function timeUnitSpecifierExpression(timeUnit) {\n if (!timeUnit) {\n return undefined;\n }\n const timeUnitParts = getTimeUnitParts(timeUnit);\n return `timeUnitSpecifier(${stringify(timeUnitParts)}, ${stringify(VEGALITE_TIMEFORMAT)})`;\n}\n/**\n * Returns the signal expression used for axis labels for a time unit.\n */\nexport function formatExpression(timeUnit, field, isUTCScale) {\n if (!timeUnit) {\n return undefined;\n }\n const expr = timeUnitSpecifierExpression(timeUnit);\n // We only use utcFormat for utc scale\n // For utc time units, the data is already converted as a part of timeUnit transform.\n // Thus, utc time units should use timeFormat to avoid shifting the time twice.\n const utc = isUTCScale || isUTCTimeUnit(timeUnit);\n return `${utc ? 'utc' : 'time'}Format(${field}, ${expr})`;\n}\nexport function normalizeTimeUnit(timeUnit) {\n if (!timeUnit) {\n return undefined;\n }\n let params;\n if (isString(timeUnit)) {\n params = {\n unit: timeUnit\n };\n }\n else if (isObject(timeUnit)) {\n params = Object.assign(Object.assign({}, timeUnit), (timeUnit.unit ? { unit: timeUnit.unit } : {}));\n }\n if (isUTCTimeUnit(params.unit)) {\n params.utc = true;\n params.unit = getLocalTimeUnit(params.unit);\n }\n return params;\n}\nexport function timeUnitToString(tu) {\n const _a = normalizeTimeUnit(tu), { utc } = _a, rest = __rest(_a, [\"utc\"]);\n if (rest.unit) {\n return ((utc ? 'utc' : '') +\n keys(rest)\n .map(p => varName(`${p === 'unit' ? '' : `_${p}_`}${rest[p]}`))\n .join(''));\n }\n else {\n // when maxbins is specified instead of units\n return ((utc ? 'utc' : '') +\n 'timeunit' +\n keys(rest)\n .map(p => varName(`_${p}_${rest[p]}`))\n .join(''));\n }\n}\n//# sourceMappingURL=timeunit.js.map","import { isArray } from 'vega-util';\nimport { valueExpr, vgField } from './channeldef';\nimport { fieldExpr as timeUnitFieldExpr, normalizeTimeUnit } from './timeunit';\nimport { stringify } from './util';\nimport { isSignalRef } from './vega.schema';\nexport function isSelectionPredicate(predicate) {\n return predicate === null || predicate === void 0 ? void 0 : predicate['param'];\n}\nexport function isFieldEqualPredicate(predicate) {\n return predicate && !!predicate.field && predicate.equal !== undefined;\n}\nexport function isFieldLTPredicate(predicate) {\n return predicate && !!predicate.field && predicate.lt !== undefined;\n}\nexport function isFieldLTEPredicate(predicate) {\n return predicate && !!predicate.field && predicate.lte !== undefined;\n}\nexport function isFieldGTPredicate(predicate) {\n return predicate && !!predicate.field && predicate.gt !== undefined;\n}\nexport function isFieldGTEPredicate(predicate) {\n return predicate && !!predicate.field && predicate.gte !== undefined;\n}\nexport function isFieldRangePredicate(predicate) {\n if (predicate === null || predicate === void 0 ? void 0 : predicate.field) {\n if (isArray(predicate.range) && predicate.range.length === 2) {\n return true;\n }\n else if (isSignalRef(predicate.range)) {\n return true;\n }\n }\n return false;\n}\nexport function isFieldOneOfPredicate(predicate) {\n return (predicate && !!predicate.field && (isArray(predicate.oneOf) || isArray(predicate.in)) // backward compatibility\n );\n}\nexport function isFieldValidPredicate(predicate) {\n return predicate && !!predicate.field && predicate.valid !== undefined;\n}\nexport function isFieldPredicate(predicate) {\n return (isFieldOneOfPredicate(predicate) ||\n isFieldEqualPredicate(predicate) ||\n isFieldRangePredicate(predicate) ||\n isFieldLTPredicate(predicate) ||\n isFieldGTPredicate(predicate) ||\n isFieldLTEPredicate(predicate) ||\n isFieldGTEPredicate(predicate));\n}\nfunction predicateValueExpr(v, timeUnit) {\n return valueExpr(v, { timeUnit, wrapTime: true });\n}\nfunction predicateValuesExpr(vals, timeUnit) {\n return vals.map(v => predicateValueExpr(v, timeUnit));\n}\n// This method is used by Voyager. Do not change its behavior without changing Voyager.\nexport function fieldFilterExpression(predicate, useInRange = true) {\n var _a;\n const { field } = predicate;\n const timeUnit = (_a = normalizeTimeUnit(predicate.timeUnit)) === null || _a === void 0 ? void 0 : _a.unit;\n const fieldExpr = timeUnit\n ? // For timeUnit, cast into integer with time() so we can use ===, inrange, indexOf to compare values directly.\n // TODO: We calculate timeUnit on the fly here. Consider if we would like to consolidate this with timeUnit pipeline\n // TODO: support utc\n `time(${timeUnitFieldExpr(timeUnit, field)})`\n : vgField(predicate, { expr: 'datum' });\n if (isFieldEqualPredicate(predicate)) {\n return `${fieldExpr}===${predicateValueExpr(predicate.equal, timeUnit)}`;\n }\n else if (isFieldLTPredicate(predicate)) {\n const upper = predicate.lt;\n return `${fieldExpr}<${predicateValueExpr(upper, timeUnit)}`;\n }\n else if (isFieldGTPredicate(predicate)) {\n const lower = predicate.gt;\n return `${fieldExpr}>${predicateValueExpr(lower, timeUnit)}`;\n }\n else if (isFieldLTEPredicate(predicate)) {\n const upper = predicate.lte;\n return `${fieldExpr}<=${predicateValueExpr(upper, timeUnit)}`;\n }\n else if (isFieldGTEPredicate(predicate)) {\n const lower = predicate.gte;\n return `${fieldExpr}>=${predicateValueExpr(lower, timeUnit)}`;\n }\n else if (isFieldOneOfPredicate(predicate)) {\n return `indexof([${predicateValuesExpr(predicate.oneOf, timeUnit).join(',')}], ${fieldExpr}) !== -1`;\n }\n else if (isFieldValidPredicate(predicate)) {\n return fieldValidPredicate(fieldExpr, predicate.valid);\n }\n else if (isFieldRangePredicate(predicate)) {\n const { range } = predicate;\n const lower = isSignalRef(range) ? { signal: `${range.signal}[0]` } : range[0];\n const upper = isSignalRef(range) ? { signal: `${range.signal}[1]` } : range[1];\n if (lower !== null && upper !== null && useInRange) {\n return ('inrange(' +\n fieldExpr +\n ', [' +\n predicateValueExpr(lower, timeUnit) +\n ', ' +\n predicateValueExpr(upper, timeUnit) +\n '])');\n }\n const exprs = [];\n if (lower !== null) {\n exprs.push(`${fieldExpr} >= ${predicateValueExpr(lower, timeUnit)}`);\n }\n if (upper !== null) {\n exprs.push(`${fieldExpr} <= ${predicateValueExpr(upper, timeUnit)}`);\n }\n return exprs.length > 0 ? exprs.join(' && ') : 'true';\n }\n /* istanbul ignore next: it should never reach here */\n throw new Error(`Invalid field predicate: ${stringify(predicate)}`);\n}\nexport function fieldValidPredicate(fieldExpr, valid = true) {\n if (valid) {\n return `isValid(${fieldExpr}) && isFinite(+${fieldExpr})`;\n }\n else {\n return `!isValid(${fieldExpr}) || !isFinite(+${fieldExpr})`;\n }\n}\nexport function normalizePredicate(f) {\n var _a;\n if (isFieldPredicate(f) && f.timeUnit) {\n return Object.assign(Object.assign({}, f), { timeUnit: (_a = normalizeTimeUnit(f.timeUnit)) === null || _a === void 0 ? void 0 : _a.unit });\n }\n return f;\n}\n//# sourceMappingURL=predicate.js.map","import { keys } from './util';\n/**\n * Data type based on level of measurement\n */\nexport const Type = {\n quantitative: 'quantitative',\n ordinal: 'ordinal',\n temporal: 'temporal',\n nominal: 'nominal',\n geojson: 'geojson'\n};\nexport function isType(t) {\n return t in Type;\n}\nexport const QUANTITATIVE = Type.quantitative;\nexport const ORDINAL = Type.ordinal;\nexport const TEMPORAL = Type.temporal;\nexport const NOMINAL = Type.nominal;\nexport const GEOJSON = Type.geojson;\nexport const TYPES = keys(Type);\n/**\n * Get full, lowercase type name for a given type.\n * @param type\n * @return Full type name.\n */\nexport function getFullName(type) {\n if (type) {\n type = type.toLowerCase();\n switch (type) {\n case 'q':\n case QUANTITATIVE:\n return 'quantitative';\n case 't':\n case TEMPORAL:\n return 'temporal';\n case 'o':\n case ORDINAL:\n return 'ordinal';\n case 'n':\n case NOMINAL:\n return 'nominal';\n case GEOJSON:\n return 'geojson';\n }\n }\n // If we get invalid input, return undefined type.\n return undefined;\n}\n//# sourceMappingURL=type.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isObject } from 'vega';\nimport { isString, toSet } from 'vega-util';\nimport * as CHANNEL from './channel';\nimport { isColorChannel } from './channel';\nimport * as log from './log';\nimport { NOMINAL, ORDINAL, QUANTITATIVE, TEMPORAL } from './type';\nimport { contains, keys } from './util';\nexport const ScaleType = {\n // Continuous - Quantitative\n LINEAR: 'linear',\n LOG: 'log',\n POW: 'pow',\n SQRT: 'sqrt',\n SYMLOG: 'symlog',\n IDENTITY: 'identity',\n SEQUENTIAL: 'sequential',\n // Continuous - Time\n TIME: 'time',\n UTC: 'utc',\n // Discretizing scales\n QUANTILE: 'quantile',\n QUANTIZE: 'quantize',\n THRESHOLD: 'threshold',\n BIN_ORDINAL: 'bin-ordinal',\n // Discrete scales\n ORDINAL: 'ordinal',\n POINT: 'point',\n BAND: 'band'\n};\n/**\n * Index for scale categories -- only scale of the same categories can be merged together.\n * Current implementation is trying to be conservative and avoid merging scale type that might not work together\n */\nexport const SCALE_CATEGORY_INDEX = {\n linear: 'numeric',\n log: 'numeric',\n pow: 'numeric',\n sqrt: 'numeric',\n symlog: 'numeric',\n identity: 'numeric',\n sequential: 'numeric',\n time: 'time',\n utc: 'time',\n ordinal: 'ordinal',\n 'bin-ordinal': 'bin-ordinal',\n point: 'ordinal-position',\n band: 'ordinal-position',\n quantile: 'discretizing',\n quantize: 'discretizing',\n threshold: 'discretizing'\n};\nexport const SCALE_TYPES = keys(SCALE_CATEGORY_INDEX);\n/**\n * Whether the two given scale types can be merged together.\n */\nexport function scaleCompatible(scaleType1, scaleType2) {\n const scaleCategory1 = SCALE_CATEGORY_INDEX[scaleType1];\n const scaleCategory2 = SCALE_CATEGORY_INDEX[scaleType2];\n return (scaleCategory1 === scaleCategory2 ||\n (scaleCategory1 === 'ordinal-position' && scaleCategory2 === 'time') ||\n (scaleCategory2 === 'ordinal-position' && scaleCategory1 === 'time'));\n}\n/**\n * Index for scale precedence -- high score = higher priority for merging.\n */\nconst SCALE_PRECEDENCE_INDEX = {\n // numeric\n linear: 0,\n log: 1,\n pow: 1,\n sqrt: 1,\n symlog: 1,\n identity: 1,\n sequential: 1,\n // time\n time: 0,\n utc: 0,\n // ordinal-position -- these have higher precedence than continuous scales as they support more types of data\n point: 10,\n band: 11,\n // non grouped types\n ordinal: 0,\n 'bin-ordinal': 0,\n quantile: 0,\n quantize: 0,\n threshold: 0\n};\n/**\n * Return scale categories -- only scale of the same categories can be merged together.\n */\nexport function scaleTypePrecedence(scaleType) {\n return SCALE_PRECEDENCE_INDEX[scaleType];\n}\nexport const CONTINUOUS_TO_CONTINUOUS_SCALES = ['linear', 'log', 'pow', 'sqrt', 'symlog', 'time', 'utc'];\nconst CONTINUOUS_TO_CONTINUOUS_INDEX = toSet(CONTINUOUS_TO_CONTINUOUS_SCALES);\nexport const QUANTITATIVE_SCALES = ['linear', 'log', 'pow', 'sqrt', 'symlog'];\nconst QUANTITATIVE_SCALES_INDEX = toSet(QUANTITATIVE_SCALES);\nexport function isQuantitative(type) {\n return type in QUANTITATIVE_SCALES_INDEX;\n}\nexport const CONTINUOUS_TO_DISCRETE_SCALES = ['quantile', 'quantize', 'threshold'];\nconst CONTINUOUS_TO_DISCRETE_INDEX = toSet(CONTINUOUS_TO_DISCRETE_SCALES);\nexport const CONTINUOUS_DOMAIN_SCALES = CONTINUOUS_TO_CONTINUOUS_SCALES.concat([\n 'quantile',\n 'quantize',\n 'threshold',\n 'sequential',\n 'identity'\n]);\nconst CONTINUOUS_DOMAIN_INDEX = toSet(CONTINUOUS_DOMAIN_SCALES);\nexport const DISCRETE_DOMAIN_SCALES = ['ordinal', 'bin-ordinal', 'point', 'band'];\nconst DISCRETE_DOMAIN_INDEX = toSet(DISCRETE_DOMAIN_SCALES);\nexport const TIME_SCALE_TYPES = ['time', 'utc'];\nexport function hasDiscreteDomain(type) {\n return type in DISCRETE_DOMAIN_INDEX;\n}\nexport function hasContinuousDomain(type) {\n return type in CONTINUOUS_DOMAIN_INDEX;\n}\nexport function isContinuousToContinuous(type) {\n return type in CONTINUOUS_TO_CONTINUOUS_INDEX;\n}\nexport function isContinuousToDiscrete(type) {\n return type in CONTINUOUS_TO_DISCRETE_INDEX;\n}\nexport const defaultScaleConfig = {\n pointPadding: 0.5,\n barBandPaddingInner: 0.1,\n rectBandPaddingInner: 0,\n minBandSize: 2,\n minFontSize: 8,\n maxFontSize: 40,\n minOpacity: 0.3,\n maxOpacity: 0.8,\n // FIXME: revise if these *can* become ratios of width/height step\n minSize: 9,\n minStrokeWidth: 1,\n maxStrokeWidth: 4,\n quantileCount: 4,\n quantizeCount: 4\n};\nexport function isExtendedScheme(scheme) {\n return !isString(scheme) && !!scheme['name'];\n}\nexport function isParameterDomain(domain) {\n return domain === null || domain === void 0 ? void 0 : domain['param'];\n}\nexport function isDomainUnionWith(domain) {\n return domain && domain['unionWith'];\n}\nexport function isFieldRange(range) {\n return isObject(range) && 'field' in range;\n}\nconst SCALE_PROPERTY_INDEX = {\n type: 1,\n domain: 1,\n domainMax: 1,\n domainMin: 1,\n domainMid: 1,\n align: 1,\n range: 1,\n rangeMax: 1,\n rangeMin: 1,\n scheme: 1,\n bins: 1,\n // Other properties\n reverse: 1,\n round: 1,\n // quantitative / time\n clamp: 1,\n nice: 1,\n // quantitative\n base: 1,\n exponent: 1,\n constant: 1,\n interpolate: 1,\n zero: 1,\n // band/point\n padding: 1,\n paddingInner: 1,\n paddingOuter: 1\n};\nexport const SCALE_PROPERTIES = keys(SCALE_PROPERTY_INDEX);\nconst { type, domain, range, rangeMax, rangeMin, scheme } = SCALE_PROPERTY_INDEX, NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTY_INDEX = __rest(SCALE_PROPERTY_INDEX, [\"type\", \"domain\", \"range\", \"rangeMax\", \"rangeMin\", \"scheme\"]);\nexport const NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES = keys(NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTY_INDEX);\nexport function scaleTypeSupportProperty(scaleType, propName) {\n switch (propName) {\n case 'type':\n case 'domain':\n case 'reverse':\n case 'range':\n return true;\n case 'scheme':\n case 'interpolate':\n return !['point', 'band', 'identity'].includes(scaleType);\n case 'bins':\n return !['point', 'band', 'identity', 'ordinal'].includes(scaleType);\n case 'round':\n return isContinuousToContinuous(scaleType) || scaleType === 'band' || scaleType === 'point';\n case 'padding':\n case 'rangeMin':\n case 'rangeMax':\n return isContinuousToContinuous(scaleType) || ['point', 'band'].includes(scaleType);\n case 'paddingOuter':\n case 'align':\n return ['point', 'band'].includes(scaleType);\n case 'paddingInner':\n return scaleType === 'band';\n case 'domainMax':\n case 'domainMid':\n case 'domainMin':\n case 'clamp':\n return isContinuousToContinuous(scaleType);\n case 'nice':\n return isContinuousToContinuous(scaleType) || scaleType === 'quantize' || scaleType === 'threshold';\n case 'exponent':\n return scaleType === 'pow';\n case 'base':\n return scaleType === 'log';\n case 'constant':\n return scaleType === 'symlog';\n case 'zero':\n return (hasContinuousDomain(scaleType) &&\n !contains([\n 'log',\n 'time',\n 'utc',\n 'threshold',\n 'quantile' // quantile depends on distribution so zero does not matter\n ], scaleType));\n }\n}\n/**\n * Returns undefined if the input channel supports the input scale property name\n */\nexport function channelScalePropertyIncompatability(channel, propName) {\n switch (propName) {\n case 'interpolate':\n case 'scheme':\n case 'domainMid':\n if (!isColorChannel(channel)) {\n return log.message.cannotUseScalePropertyWithNonColor(channel);\n }\n return undefined;\n case 'align':\n case 'type':\n case 'bins':\n case 'domain':\n case 'domainMax':\n case 'domainMin':\n case 'range':\n case 'base':\n case 'exponent':\n case 'constant':\n case 'nice':\n case 'padding':\n case 'paddingInner':\n case 'paddingOuter':\n case 'rangeMax':\n case 'rangeMin':\n case 'reverse':\n case 'round':\n case 'clamp':\n case 'zero':\n return undefined; // GOOD!\n }\n}\nexport function scaleTypeSupportDataType(specifiedType, fieldDefType) {\n if (contains([ORDINAL, NOMINAL], fieldDefType)) {\n return specifiedType === undefined || hasDiscreteDomain(specifiedType);\n }\n else if (fieldDefType === TEMPORAL) {\n return contains([ScaleType.TIME, ScaleType.UTC, undefined], specifiedType);\n }\n else if (fieldDefType === QUANTITATIVE) {\n return contains([\n ScaleType.LOG,\n ScaleType.POW,\n ScaleType.SQRT,\n ScaleType.SYMLOG,\n ScaleType.QUANTILE,\n ScaleType.QUANTIZE,\n ScaleType.THRESHOLD,\n ScaleType.LINEAR,\n undefined\n ], specifiedType);\n }\n return true;\n}\nexport function channelSupportScaleType(channel, scaleType) {\n if (!CHANNEL.isScaleChannel(channel)) {\n return false;\n }\n switch (channel) {\n case CHANNEL.X:\n case CHANNEL.Y:\n case CHANNEL.THETA:\n case CHANNEL.RADIUS:\n return isContinuousToContinuous(scaleType) || contains(['band', 'point'], scaleType);\n case CHANNEL.SIZE: // TODO: size and opacity can support ordinal with more modification\n case CHANNEL.STROKEWIDTH:\n case CHANNEL.OPACITY:\n case CHANNEL.FILLOPACITY:\n case CHANNEL.STROKEOPACITY:\n case CHANNEL.ANGLE:\n // Although it generally doesn't make sense to use band with size and opacity,\n // it can also work since we use band: 0.5 to get midpoint.\n return (isContinuousToContinuous(scaleType) ||\n isContinuousToDiscrete(scaleType) ||\n contains(['band', 'point', 'ordinal'], scaleType));\n case CHANNEL.COLOR:\n case CHANNEL.FILL:\n case CHANNEL.STROKE:\n return scaleType !== 'band'; // band does not make sense with color\n case CHANNEL.STROKEDASH:\n case CHANNEL.SHAPE:\n return scaleType === 'ordinal' || isContinuousToDiscrete(scaleType);\n }\n}\n//# sourceMappingURL=scale.js.map","import { toSet } from 'vega-util';\nimport { keys } from './util';\n/**\n * All types of primitive marks.\n */\nexport const Mark = {\n arc: 'arc',\n area: 'area',\n bar: 'bar',\n image: 'image',\n line: 'line',\n point: 'point',\n rect: 'rect',\n rule: 'rule',\n text: 'text',\n tick: 'tick',\n trail: 'trail',\n circle: 'circle',\n square: 'square',\n geoshape: 'geoshape'\n};\nexport const ARC = Mark.arc;\nexport const AREA = Mark.area;\nexport const BAR = Mark.bar;\nexport const IMAGE = Mark.image;\nexport const LINE = Mark.line;\nexport const POINT = Mark.point;\nexport const RECT = Mark.rect;\nexport const RULE = Mark.rule;\nexport const TEXT = Mark.text;\nexport const TICK = Mark.tick;\nexport const TRAIL = Mark.trail;\nexport const CIRCLE = Mark.circle;\nexport const SQUARE = Mark.square;\nexport const GEOSHAPE = Mark.geoshape;\nexport function isMark(m) {\n return m in Mark;\n}\nexport function isPathMark(m) {\n return ['line', 'area', 'trail'].includes(m);\n}\nexport function isRectBasedMark(m) {\n return ['rect', 'bar', 'image', 'arc' /* arc is rect/interval in polar coordinate */].includes(m);\n}\nexport const PRIMITIVE_MARKS = keys(Mark);\nexport function isMarkDef(mark) {\n return mark['type'];\n}\nconst PRIMITIVE_MARK_INDEX = toSet(PRIMITIVE_MARKS);\nexport function isPrimitiveMark(mark) {\n const markType = isMarkDef(mark) ? mark.type : mark;\n return markType in PRIMITIVE_MARK_INDEX;\n}\nexport const STROKE_CONFIG = [\n 'stroke',\n 'strokeWidth',\n 'strokeDash',\n 'strokeDashOffset',\n 'strokeOpacity',\n 'strokeJoin',\n 'strokeMiterLimit'\n];\nexport const FILL_CONFIG = ['fill', 'fillOpacity'];\nexport const FILL_STROKE_CONFIG = [...STROKE_CONFIG, ...FILL_CONFIG];\nconst VL_ONLY_MARK_CONFIG_INDEX = {\n color: 1,\n filled: 1,\n invalid: 1,\n order: 1,\n radius2: 1,\n theta2: 1,\n timeUnitBandSize: 1,\n timeUnitBandPosition: 1\n};\nexport const VL_ONLY_MARK_CONFIG_PROPERTIES = keys(VL_ONLY_MARK_CONFIG_INDEX);\nexport const VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX = {\n area: ['line', 'point'],\n bar: ['binSpacing', 'continuousBandSize', 'discreteBandSize'],\n rect: ['binSpacing', 'continuousBandSize', 'discreteBandSize'],\n line: ['point'],\n tick: ['bandSize', 'thickness']\n};\nexport const defaultMarkConfig = {\n color: '#4c78a8',\n invalid: 'filter',\n timeUnitBandSize: 1\n};\nconst MARK_CONFIG_INDEX = {\n mark: 1,\n arc: 1,\n area: 1,\n bar: 1,\n circle: 1,\n image: 1,\n line: 1,\n point: 1,\n rect: 1,\n rule: 1,\n square: 1,\n text: 1,\n tick: 1,\n trail: 1,\n geoshape: 1\n};\nexport const MARK_CONFIGS = keys(MARK_CONFIG_INDEX);\nexport function isRelativeBandSize(o) {\n return o && o['band'] != undefined;\n}\nexport const BAR_CORNER_RADIUS_INDEX = {\n horizontal: ['cornerRadiusTopRight', 'cornerRadiusBottomRight'],\n vertical: ['cornerRadiusTopLeft', 'cornerRadiusTopRight']\n};\nconst DEFAULT_RECT_BAND_SIZE = 5;\nexport const defaultBarConfig = {\n binSpacing: 1,\n continuousBandSize: DEFAULT_RECT_BAND_SIZE,\n timeUnitBandPosition: 0.5\n};\nexport const defaultRectConfig = {\n binSpacing: 0,\n continuousBandSize: DEFAULT_RECT_BAND_SIZE,\n timeUnitBandPosition: 0.5\n};\nexport const defaultTickConfig = {\n thickness: 1\n};\nexport function getMarkType(m) {\n return isMarkDef(m) ? m.type : m;\n}\n//# sourceMappingURL=mark.js.map","import { isFunction, isString } from 'vega-util';\nimport { isCountingAggregateOp } from '../../../aggregate';\nimport { isBinned, isBinning } from '../../../bin';\nimport { getMainRangeChannel, X, X2, Y2 } from '../../../channel';\nimport { binRequiresRange, getBandPosition, isDatumDef, isFieldDef, isFieldOrDatumDef, isTypedFieldDef, isValueDef, vgField } from '../../../channeldef';\nimport { dateTimeToExpr, isDateTime } from '../../../datetime';\nimport { isExprRef } from '../../../expr';\nimport * as log from '../../../log';\nimport { isPathMark } from '../../../mark';\nimport { fieldValidPredicate } from '../../../predicate';\nimport { hasDiscreteDomain, isContinuousToContinuous } from '../../../scale';\nimport { TEMPORAL } from '../../../type';\nimport { contains, stringify } from '../../../util';\nimport { isSignalRef } from '../../../vega.schema';\nimport { getMarkPropOrConfig, signalOrValueRef } from '../../common';\nexport function midPointRefWithPositionInvalidTest(params) {\n const { channel, channelDef, markDef, scale, config } = params;\n const ref = midPoint(params);\n // Wrap to check if the positional value is invalid, if so, plot the point on the min value\n if (\n // Only this for field def without counting aggregate (as count wouldn't be null)\n isFieldDef(channelDef) &&\n !isCountingAggregateOp(channelDef.aggregate) &&\n // and only for continuous scale without zero (otherwise, null / invalid will be interpreted as zero, which doesn't cause layout problem)\n scale &&\n isContinuousToContinuous(scale.get('type')) &&\n scale.get('zero') === false) {\n return wrapPositionInvalidTest({\n fieldDef: channelDef,\n channel,\n markDef,\n ref,\n config\n });\n }\n return ref;\n}\nexport function wrapPositionInvalidTest({ fieldDef, channel, markDef, ref, config }) {\n if (isPathMark(markDef.type)) {\n // path mark already use defined to skip points, no need to do it here.\n return ref;\n }\n const invalid = getMarkPropOrConfig('invalid', markDef, config);\n if (invalid === null) {\n // if there is no invalid filter, don't do the invalid test\n return ref;\n }\n return [fieldInvalidTestValueRef(fieldDef, channel), ref];\n}\nexport function fieldInvalidTestValueRef(fieldDef, channel) {\n const test = fieldInvalidPredicate(fieldDef, true);\n const mainChannel = getMainRangeChannel(channel); // we can cast here as the output can't be other things.\n const zeroValueRef = mainChannel === 'y'\n ? { field: { group: 'height' } }\n : // x / angle / radius can all use 0\n { value: 0 };\n return Object.assign({ test }, zeroValueRef);\n}\nexport function fieldInvalidPredicate(field, invalid = true) {\n return fieldValidPredicate(isString(field) ? field : vgField(field, { expr: 'datum' }), !invalid);\n}\nexport function datumDefToExpr(datumDef) {\n const { datum } = datumDef;\n if (isDateTime(datum)) {\n return dateTimeToExpr(datum);\n }\n return `${stringify(datum)}`;\n}\nexport function valueRefForFieldOrDatumDef(fieldDef, scaleName, opt, encode) {\n const ref = {};\n if (scaleName) {\n ref.scale = scaleName;\n }\n if (isDatumDef(fieldDef)) {\n const { datum } = fieldDef;\n if (isDateTime(datum)) {\n ref.signal = dateTimeToExpr(datum);\n }\n else if (isSignalRef(datum)) {\n ref.signal = datum.signal;\n }\n else if (isExprRef(datum)) {\n ref.signal = datum.expr;\n }\n else {\n ref.value = datum;\n }\n }\n else {\n ref.field = vgField(fieldDef, opt);\n }\n if (encode) {\n const { offset, band } = encode;\n if (offset) {\n ref.offset = offset;\n }\n if (band) {\n ref.band = band;\n }\n }\n return ref;\n}\n/**\n * Signal that returns the middle of a bin from start and end field. Should only be used with x and y.\n */\nexport function interpolatedSignalRef({ scaleName, fieldOrDatumDef, fieldOrDatumDef2, offset, startSuffix, bandPosition = 0.5 }) {\n const expr = 0 < bandPosition && bandPosition < 1 ? 'datum' : undefined;\n const start = vgField(fieldOrDatumDef, { expr, suffix: startSuffix });\n const end = fieldOrDatumDef2 !== undefined\n ? vgField(fieldOrDatumDef2, { expr })\n : vgField(fieldOrDatumDef, { suffix: 'end', expr });\n const ref = {};\n if (bandPosition === 0 || bandPosition === 1) {\n ref.scale = scaleName;\n const val = bandPosition === 0 ? start : end;\n ref.field = val;\n }\n else {\n const datum = isSignalRef(bandPosition)\n ? `${bandPosition.signal} * ${start} + (1-${bandPosition.signal}) * ${end}`\n : `${bandPosition} * ${start} + ${1 - bandPosition} * ${end}`;\n ref.signal = `scale(\"${scaleName}\", ${datum})`;\n }\n if (offset) {\n ref.offset = offset;\n }\n return ref;\n}\n/**\n * @returns {VgValueRef} Value Ref for xc / yc or mid point for other channels.\n */\nexport function midPoint({ channel, channelDef, channel2Def, markDef, config, scaleName, scale, stack, offset, defaultRef, bandPosition }) {\n var _a;\n // TODO: datum support\n if (channelDef) {\n /* istanbul ignore else */\n if (isFieldOrDatumDef(channelDef)) {\n if (isTypedFieldDef(channelDef)) {\n bandPosition !== null && bandPosition !== void 0 ? bandPosition : (bandPosition = getBandPosition({\n fieldDef: channelDef,\n fieldDef2: channel2Def,\n markDef,\n config\n }));\n const { bin, timeUnit, type } = channelDef;\n if (isBinning(bin) || (bandPosition && timeUnit && type === TEMPORAL)) {\n // Use middle only for x an y to place marks in the center between start and end of the bin range.\n // We do not use the mid point for other channels (e.g. size) so that properties of legends and marks match.\n if (stack === null || stack === void 0 ? void 0 : stack.impute) {\n // For stack, we computed bin_mid so we can impute.\n return valueRefForFieldOrDatumDef(channelDef, scaleName, { binSuffix: 'mid' }, { offset });\n }\n if (bandPosition) {\n // if band = 0, no need to call interpolation\n // For non-stack, we can just calculate bin mid on the fly using signal.\n return interpolatedSignalRef({ scaleName, fieldOrDatumDef: channelDef, bandPosition, offset });\n }\n return valueRefForFieldOrDatumDef(channelDef, scaleName, binRequiresRange(channelDef, channel) ? { binSuffix: 'range' } : {}, {\n offset\n });\n }\n else if (isBinned(bin)) {\n if (isFieldDef(channel2Def)) {\n return interpolatedSignalRef({\n scaleName,\n fieldOrDatumDef: channelDef,\n fieldOrDatumDef2: channel2Def,\n bandPosition,\n offset\n });\n }\n else {\n const channel2 = channel === X ? X2 : Y2;\n log.warn(log.message.channelRequiredForBinned(channel2));\n }\n }\n }\n const scaleType = scale === null || scale === void 0 ? void 0 : scale.get('type');\n return valueRefForFieldOrDatumDef(channelDef, scaleName, hasDiscreteDomain(scaleType) ? { binSuffix: 'range' } : {}, // no need for bin suffix if there is no scale\n {\n offset,\n // For band, to get mid point, need to offset by half of the band\n band: scaleType === 'band' ? (_a = bandPosition !== null && bandPosition !== void 0 ? bandPosition : channelDef.bandPosition) !== null && _a !== void 0 ? _a : 0.5 : undefined\n });\n }\n else if (isValueDef(channelDef)) {\n const value = channelDef.value;\n const offsetMixins = offset ? { offset } : {};\n return Object.assign(Object.assign({}, widthHeightValueOrSignalRef(channel, value)), offsetMixins);\n }\n // If channelDef is neither field def or value def, it's a condition-only def.\n // In such case, we will use default ref.\n }\n if (isFunction(defaultRef)) {\n defaultRef = defaultRef();\n }\n if (defaultRef) {\n // for non-position, ref could be undefined.\n return Object.assign(Object.assign({}, defaultRef), (offset ? { offset } : {}));\n }\n return defaultRef;\n}\n/**\n * Convert special \"width\" and \"height\" values in Vega-Lite into Vega value ref.\n */\nexport function widthHeightValueOrSignalRef(channel, value) {\n if (contains(['x', 'x2'], channel) && value === 'width') {\n return { field: { group: 'width' } };\n }\n else if (contains(['y', 'y2'], channel) && value === 'height') {\n return { field: { group: 'height' } };\n }\n return signalOrValueRef(value);\n}\n//# sourceMappingURL=valueref.js.map","import { isString } from 'vega-util';\nimport { isBinning } from '../bin';\nimport { channelDefType, isFieldDef, isFieldOrDatumDefForTimeFormat, isScaleFieldDef, vgField } from '../channeldef';\nimport { fieldValidPredicate } from '../predicate';\nimport { ScaleType } from '../scale';\nimport { formatExpression, normalizeTimeUnit, timeUnitSpecifierExpression } from '../timeunit';\nimport { QUANTITATIVE } from '../type';\nimport { stringify } from '../util';\nimport { isSignalRef } from '../vega.schema';\nimport { datumDefToExpr } from './mark/encode/valueref';\nexport function isCustomFormatType(formatType) {\n return formatType && formatType !== 'number' && formatType !== 'time';\n}\nfunction customFormatExpr(formatType, field, format) {\n return `${formatType}(${field}${format ? `, ${stringify(format)}` : ''})`;\n}\nexport const BIN_RANGE_DELIMITER = ' \\u2013 ';\nexport function formatSignalRef({ fieldOrDatumDef, format, formatType, expr, normalizeStack, config }) {\n var _a, _b;\n if (isCustomFormatType(formatType)) {\n return formatCustomType({\n fieldOrDatumDef,\n format,\n formatType,\n expr,\n config\n });\n }\n const field = fieldToFormat(fieldOrDatumDef, expr, normalizeStack);\n if (isFieldOrDatumDefForTimeFormat(fieldOrDatumDef)) {\n const signal = timeFormatExpression(field, isFieldDef(fieldOrDatumDef) ? (_a = normalizeTimeUnit(fieldOrDatumDef.timeUnit)) === null || _a === void 0 ? void 0 : _a.unit : undefined, format, config.timeFormat, isScaleFieldDef(fieldOrDatumDef) && ((_b = fieldOrDatumDef.scale) === null || _b === void 0 ? void 0 : _b.type) === ScaleType.UTC);\n return signal ? { signal } : undefined;\n }\n format = numberFormat(channelDefType(fieldOrDatumDef), format, config);\n if (isFieldDef(fieldOrDatumDef) && isBinning(fieldOrDatumDef.bin)) {\n const endField = vgField(fieldOrDatumDef, { expr, binSuffix: 'end' });\n return {\n signal: binFormatExpression(field, endField, format, formatType, config)\n };\n }\n else if (format || channelDefType(fieldOrDatumDef) === 'quantitative') {\n return {\n signal: `${formatExpr(field, format)}`\n };\n }\n else {\n return { signal: `isValid(${field}) ? ${field} : \"\"+${field}` };\n }\n}\nfunction fieldToFormat(fieldOrDatumDef, expr, normalizeStack) {\n if (isFieldDef(fieldOrDatumDef)) {\n if (normalizeStack) {\n return `${vgField(fieldOrDatumDef, { expr, suffix: 'end' })}-${vgField(fieldOrDatumDef, {\n expr,\n suffix: 'start'\n })}`;\n }\n else {\n return vgField(fieldOrDatumDef, { expr });\n }\n }\n else {\n return datumDefToExpr(fieldOrDatumDef);\n }\n}\nexport function formatCustomType({ fieldOrDatumDef, format, formatType, expr, normalizeStack, config, field }) {\n field !== null && field !== void 0 ? field : (field = fieldToFormat(fieldOrDatumDef, expr, normalizeStack));\n if (isFieldDef(fieldOrDatumDef) && isBinning(fieldOrDatumDef.bin)) {\n const endField = vgField(fieldOrDatumDef, { expr, binSuffix: 'end' });\n return {\n signal: binFormatExpression(field, endField, format, formatType, config)\n };\n }\n return { signal: customFormatExpr(formatType, field, format) };\n}\nexport function guideFormat(fieldOrDatumDef, type, format, formatType, config, omitTimeFormatConfig // axis doesn't use config.timeFormat\n) {\n var _a;\n if (isCustomFormatType(formatType)) {\n return undefined; // handled in encode block\n }\n if (isFieldOrDatumDefForTimeFormat(fieldOrDatumDef)) {\n const timeUnit = isFieldDef(fieldOrDatumDef) ? (_a = normalizeTimeUnit(fieldOrDatumDef.timeUnit)) === null || _a === void 0 ? void 0 : _a.unit : undefined;\n return timeFormat(format, timeUnit, config, omitTimeFormatConfig);\n }\n return numberFormat(type, format, config);\n}\nexport function guideFormatType(formatType, fieldOrDatumDef, scaleType) {\n if (formatType && (isSignalRef(formatType) || formatType === 'number' || formatType === 'time')) {\n return formatType;\n }\n if (isFieldOrDatumDefForTimeFormat(fieldOrDatumDef) && scaleType !== 'time' && scaleType !== 'utc') {\n return 'time';\n }\n return undefined;\n}\n/**\n * Returns number format for a fieldDef.\n */\nexport function numberFormat(type, specifiedFormat, config) {\n // Specified format in axis/legend has higher precedence than fieldDef.format\n if (isString(specifiedFormat)) {\n return specifiedFormat;\n }\n if (type === QUANTITATIVE) {\n // we only apply the default if the field is quantitative\n return config.numberFormat;\n }\n return undefined;\n}\n/**\n * Returns time format for a fieldDef for use in guides.\n */\nexport function timeFormat(specifiedFormat, timeUnit, config, omitTimeFormatConfig) {\n if (specifiedFormat) {\n return specifiedFormat;\n }\n if (timeUnit) {\n return {\n signal: timeUnitSpecifierExpression(timeUnit)\n };\n }\n return omitTimeFormatConfig ? undefined : config.timeFormat;\n}\nfunction formatExpr(field, format) {\n return `format(${field}, \"${format || ''}\")`;\n}\nfunction binNumberFormatExpr(field, format, formatType, config) {\n var _a;\n if (isCustomFormatType(formatType)) {\n return customFormatExpr(formatType, field, format);\n }\n return formatExpr(field, (_a = (isString(format) ? format : undefined)) !== null && _a !== void 0 ? _a : config.numberFormat);\n}\nexport function binFormatExpression(startField, endField, format, formatType, config) {\n const start = binNumberFormatExpr(startField, format, formatType, config);\n const end = binNumberFormatExpr(endField, format, formatType, config);\n return `${fieldValidPredicate(startField, false)} ? \"null\" : ${start} + \"${BIN_RANGE_DELIMITER}\" + ${end}`;\n}\n/**\n * Returns the time expression used for axis/legend labels or text mark for a temporal field\n */\nexport function timeFormatExpression(field, timeUnit, format, rawTimeFormat, // should be provided only for actual text and headers, not axis/legend labels\nisUTCScale) {\n if (!timeUnit || format) {\n // If there is no time unit, or if user explicitly specifies format for axis/legend/text.\n format = isString(format) ? format : rawTimeFormat; // only use provided timeFormat if there is no timeUnit.\n return `${isUTCScale ? 'utc' : 'time'}Format(${field}, '${format}')`;\n }\n else {\n return formatExpression(timeUnit, field, isUTCScale);\n }\n}\n//# sourceMappingURL=format.js.map","import { isArray } from 'vega-util';\nexport const DEFAULT_SORT_OP = 'min';\nconst SORT_BY_CHANNEL_INDEX = {\n x: 1,\n y: 1,\n color: 1,\n fill: 1,\n stroke: 1,\n strokeWidth: 1,\n size: 1,\n shape: 1,\n fillOpacity: 1,\n strokeOpacity: 1,\n opacity: 1,\n text: 1\n};\nexport function isSortByChannel(c) {\n return c in SORT_BY_CHANNEL_INDEX;\n}\nexport function isSortByEncoding(sort) {\n return !!sort && !!sort['encoding'];\n}\nexport function isSortField(sort) {\n return !!sort && (sort['op'] === 'count' || !!sort['field']);\n}\nexport function isSortArray(sort) {\n return !!sort && isArray(sort);\n}\n//# sourceMappingURL=sort.js.map","export function isFacetMapping(f) {\n return 'row' in f || 'column' in f;\n}\nexport function isFacetFieldDef(channelDef) {\n return !!channelDef && 'header' in channelDef;\n}\nexport function isFacetSpec(spec) {\n return 'facet' in spec;\n}\n//# sourceMappingURL=facet.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isArray, isBoolean, isNumber, isString } from 'vega-util';\nimport { isAggregateOp, isArgmaxDef, isArgminDef, isCountingAggregateOp } from './aggregate';\nimport { autoMaxBins, binToString, isBinned, isBinning } from './bin';\nimport { ANGLE, COLOR, COLUMN, DESCRIPTION, DETAIL, FACET, FILL, FILLOPACITY, getSizeChannel, HREF, isScaleChannel, isSecondaryRangeChannel, isXorY, KEY, LATITUDE, LATITUDE2, LONGITUDE, LONGITUDE2, OPACITY, ORDER, RADIUS, RADIUS2, ROW, SHAPE, SIZE, STROKE, STROKEDASH, STROKEOPACITY, STROKEWIDTH, TEXT, THETA, THETA2, TOOLTIP, URL, X, X2, Y, Y2 } from './channel';\nimport { getMarkConfig, getMarkPropOrConfig } from './compile/common';\nimport { isCustomFormatType } from './compile/format';\nimport { dateTimeToExpr, isDateTime } from './datetime';\nimport { isExprRef } from './expr';\nimport * as log from './log';\nimport { isRectBasedMark } from './mark';\nimport { hasDiscreteDomain, isContinuousToDiscrete, SCALE_CATEGORY_INDEX } from './scale';\nimport { isSortByChannel } from './sort';\nimport { isFacetFieldDef } from './spec/facet';\nimport { getTimeUnitParts, isLocalSingleTimeUnit, normalizeTimeUnit, timeUnitToString } from './timeunit';\nimport { getFullName, QUANTITATIVE } from './type';\nimport { flatAccessWithDatum, getFirstDefined, internalField, omit, removePathFromField, replacePathInField, stringify, titleCase } from './util';\nimport { isSignalRef } from './vega.schema';\nexport function isConditionalParameter(c) {\n return c['param'];\n}\nexport function isRepeatRef(field) {\n return field && !isString(field) && 'repeat' in field;\n}\nexport function toFieldDefBase(fieldDef) {\n const { field, timeUnit, bin, aggregate } = fieldDef;\n return Object.assign(Object.assign(Object.assign(Object.assign({}, (timeUnit ? { timeUnit } : {})), (bin ? { bin } : {})), (aggregate ? { aggregate } : {})), { field });\n}\nexport function isSortableFieldDef(fieldDef) {\n return 'sort' in fieldDef;\n}\nexport function getBandPosition({ fieldDef, fieldDef2, markDef: mark, config }) {\n if (isFieldOrDatumDef(fieldDef) && fieldDef.bandPosition !== undefined) {\n return fieldDef.bandPosition;\n }\n if (isFieldDef(fieldDef)) {\n const { timeUnit, bin } = fieldDef;\n if (timeUnit && !fieldDef2) {\n return isRectBasedMark(mark.type) ? 0 : getMarkConfig('timeUnitBandPosition', mark, config);\n }\n else if (isBinning(bin)) {\n return 0.5;\n }\n }\n return undefined;\n}\nexport function getBandSize({ channel, fieldDef, fieldDef2, markDef: mark, config, scaleType, useVlSizeChannel }) {\n var _a, _b, _c;\n const sizeChannel = getSizeChannel(channel);\n const size = getMarkPropOrConfig(useVlSizeChannel ? 'size' : sizeChannel, mark, config, {\n vgChannel: sizeChannel\n });\n if (size !== undefined) {\n return size;\n }\n if (isFieldDef(fieldDef)) {\n const { timeUnit, bin } = fieldDef;\n if (timeUnit && !fieldDef2) {\n return { band: getMarkConfig('timeUnitBandSize', mark, config) };\n }\n else if (isBinning(bin) && !hasDiscreteDomain(scaleType)) {\n return { band: 1 };\n }\n }\n if (isRectBasedMark(mark.type)) {\n if (scaleType) {\n if (hasDiscreteDomain(scaleType)) {\n return ((_a = config[mark.type]) === null || _a === void 0 ? void 0 : _a.discreteBandSize) || { band: 1 };\n }\n else {\n return (_b = config[mark.type]) === null || _b === void 0 ? void 0 : _b.continuousBandSize;\n }\n }\n return (_c = config[mark.type]) === null || _c === void 0 ? void 0 : _c.discreteBandSize;\n }\n return undefined;\n}\nexport function hasBandEnd(fieldDef, fieldDef2, markDef, config) {\n if (isBinning(fieldDef.bin) || (fieldDef.timeUnit && isTypedFieldDef(fieldDef) && fieldDef.type === 'temporal')) {\n // Need to check bandPosition because non-rect marks (e.g., point) with timeUnit\n // doesn't have to use bandEnd if there is no bandPosition.\n return getBandPosition({ fieldDef, fieldDef2, markDef, config }) !== undefined;\n }\n return false;\n}\nexport function isConditionalDef(channelDef) {\n return channelDef && 'condition' in channelDef;\n}\n/**\n * Return if a channelDef is a ConditionalValueDef with ConditionFieldDef\n */\nexport function hasConditionalFieldDef(channelDef) {\n const condition = channelDef && channelDef['condition'];\n return !!condition && !isArray(condition) && isFieldDef(condition);\n}\nexport function hasConditionalFieldOrDatumDef(channelDef) {\n const condition = channelDef && channelDef['condition'];\n return !!condition && !isArray(condition) && isFieldOrDatumDef(condition);\n}\nexport function hasConditionalValueDef(channelDef) {\n const condition = channelDef && channelDef['condition'];\n return !!condition && (isArray(condition) || isValueDef(condition));\n}\nexport function isFieldDef(channelDef) {\n // TODO: we can't use field in channelDef here as it's somehow failing runtime test\n return channelDef && (!!channelDef['field'] || channelDef['aggregate'] === 'count');\n}\nexport function channelDefType(channelDef) {\n return channelDef && channelDef['type'];\n}\nexport function isDatumDef(channelDef) {\n return channelDef && 'datum' in channelDef;\n}\nexport function isContinuousFieldOrDatumDef(cd) {\n // TODO: make datum support DateTime object\n return (isTypedFieldDef(cd) && !isDiscrete(cd)) || isNumericDataDef(cd);\n}\nexport function isQuantitativeFieldOrDatumDef(cd) {\n // TODO: make datum support DateTime object\n return channelDefType(cd) === 'quantitative' || isNumericDataDef(cd);\n}\nexport function isNumericDataDef(cd) {\n return isDatumDef(cd) && isNumber(cd.datum);\n}\nexport function isFieldOrDatumDef(channelDef) {\n return isFieldDef(channelDef) || isDatumDef(channelDef);\n}\nexport function isTypedFieldDef(channelDef) {\n return channelDef && ('field' in channelDef || channelDef['aggregate'] === 'count') && 'type' in channelDef;\n}\nexport function isValueDef(channelDef) {\n return channelDef && 'value' in channelDef && 'value' in channelDef;\n}\nexport function isScaleFieldDef(channelDef) {\n return channelDef && ('scale' in channelDef || 'sort' in channelDef);\n}\nexport function isPositionFieldOrDatumDef(channelDef) {\n return channelDef && ('axis' in channelDef || 'stack' in channelDef || 'impute' in channelDef);\n}\nexport function isMarkPropFieldOrDatumDef(channelDef) {\n return channelDef && 'legend' in channelDef;\n}\nexport function isStringFieldOrDatumDef(channelDef) {\n return channelDef && ('format' in channelDef || 'formatType' in channelDef);\n}\nexport function toStringFieldDef(fieldDef) {\n // omit properties that don't exist in string field defs\n return omit(fieldDef, ['legend', 'axis', 'header', 'scale']);\n}\nfunction isOpFieldDef(fieldDef) {\n return 'op' in fieldDef;\n}\n/**\n * Get a Vega field reference from a Vega-Lite field def.\n */\nexport function vgField(fieldDef, opt = {}) {\n var _a, _b, _c;\n let field = fieldDef.field;\n const prefix = opt.prefix;\n let suffix = opt.suffix;\n let argAccessor = ''; // for accessing argmin/argmax field at the end without getting escaped\n if (isCount(fieldDef)) {\n field = internalField('count');\n }\n else {\n let fn;\n if (!opt.nofn) {\n if (isOpFieldDef(fieldDef)) {\n fn = fieldDef.op;\n }\n else {\n const { bin, aggregate, timeUnit } = fieldDef;\n if (isBinning(bin)) {\n fn = binToString(bin);\n suffix = ((_a = opt.binSuffix) !== null && _a !== void 0 ? _a : '') + ((_b = opt.suffix) !== null && _b !== void 0 ? _b : '');\n }\n else if (aggregate) {\n if (isArgmaxDef(aggregate)) {\n argAccessor = `[\"${field}\"]`;\n field = `argmax_${aggregate.argmax}`;\n }\n else if (isArgminDef(aggregate)) {\n argAccessor = `[\"${field}\"]`;\n field = `argmin_${aggregate.argmin}`;\n }\n else {\n fn = String(aggregate);\n }\n }\n else if (timeUnit) {\n fn = timeUnitToString(timeUnit);\n suffix = ((!['range', 'mid'].includes(opt.binSuffix) && opt.binSuffix) || '') + ((_c = opt.suffix) !== null && _c !== void 0 ? _c : '');\n }\n }\n }\n if (fn) {\n field = field ? `${fn}_${field}` : fn;\n }\n }\n if (suffix) {\n field = `${field}_${suffix}`;\n }\n if (prefix) {\n field = `${prefix}_${field}`;\n }\n if (opt.forAs) {\n return removePathFromField(field);\n }\n else if (opt.expr) {\n // Expression to access flattened field. No need to escape dots.\n return flatAccessWithDatum(field, opt.expr) + argAccessor;\n }\n else {\n // We flattened all fields so paths should have become dot.\n return replacePathInField(field) + argAccessor;\n }\n}\nexport function isDiscrete(def) {\n switch (def.type) {\n case 'nominal':\n case 'ordinal':\n case 'geojson':\n return true;\n case 'quantitative':\n return isFieldDef(def) && !!def.bin;\n case 'temporal':\n return false;\n }\n throw new Error(log.message.invalidFieldType(def.type));\n}\nexport function isDiscretizing(def) {\n var _a;\n return isScaleFieldDef(def) && isContinuousToDiscrete((_a = def.scale) === null || _a === void 0 ? void 0 : _a.type);\n}\nexport function isCount(fieldDef) {\n return fieldDef.aggregate === 'count';\n}\nexport function verbalTitleFormatter(fieldDef, config) {\n var _a;\n const { field, bin, timeUnit, aggregate } = fieldDef;\n if (aggregate === 'count') {\n return config.countTitle;\n }\n else if (isBinning(bin)) {\n return `${field} (binned)`;\n }\n else if (timeUnit) {\n const unit = (_a = normalizeTimeUnit(timeUnit)) === null || _a === void 0 ? void 0 : _a.unit;\n if (unit) {\n return `${field} (${getTimeUnitParts(unit).join('-')})`;\n }\n }\n else if (aggregate) {\n if (isArgmaxDef(aggregate)) {\n return `${field} for max ${aggregate.argmax}`;\n }\n else if (isArgminDef(aggregate)) {\n return `${field} for min ${aggregate.argmin}`;\n }\n else {\n return `${titleCase(aggregate)} of ${field}`;\n }\n }\n return field;\n}\nexport function functionalTitleFormatter(fieldDef) {\n const { aggregate, bin, timeUnit, field } = fieldDef;\n if (isArgmaxDef(aggregate)) {\n return `${field} for argmax(${aggregate.argmax})`;\n }\n else if (isArgminDef(aggregate)) {\n return `${field} for argmin(${aggregate.argmin})`;\n }\n const timeUnitParams = normalizeTimeUnit(timeUnit);\n const fn = aggregate || (timeUnitParams === null || timeUnitParams === void 0 ? void 0 : timeUnitParams.unit) || ((timeUnitParams === null || timeUnitParams === void 0 ? void 0 : timeUnitParams.maxbins) && 'timeunit') || (isBinning(bin) && 'bin');\n if (fn) {\n return `${fn.toUpperCase()}(${field})`;\n }\n else {\n return field;\n }\n}\nexport const defaultTitleFormatter = (fieldDef, config) => {\n switch (config.fieldTitle) {\n case 'plain':\n return fieldDef.field;\n case 'functional':\n return functionalTitleFormatter(fieldDef);\n default:\n return verbalTitleFormatter(fieldDef, config);\n }\n};\nlet titleFormatter = defaultTitleFormatter;\nexport function setTitleFormatter(formatter) {\n titleFormatter = formatter;\n}\nexport function resetTitleFormatter() {\n setTitleFormatter(defaultTitleFormatter);\n}\nexport function title(fieldOrDatumDef, config, { allowDisabling, includeDefault = true }) {\n var _a, _b;\n const guideTitle = (_a = getGuide(fieldOrDatumDef)) === null || _a === void 0 ? void 0 : _a.title;\n if (!isFieldDef(fieldOrDatumDef)) {\n return guideTitle;\n }\n const fieldDef = fieldOrDatumDef;\n const def = includeDefault ? defaultTitle(fieldDef, config) : undefined;\n if (allowDisabling) {\n return getFirstDefined(guideTitle, fieldDef.title, def);\n }\n else {\n return (_b = guideTitle !== null && guideTitle !== void 0 ? guideTitle : fieldDef.title) !== null && _b !== void 0 ? _b : def;\n }\n}\nexport function getGuide(fieldDef) {\n if (isPositionFieldOrDatumDef(fieldDef) && fieldDef.axis) {\n return fieldDef.axis;\n }\n else if (isMarkPropFieldOrDatumDef(fieldDef) && fieldDef.legend) {\n return fieldDef.legend;\n }\n else if (isFacetFieldDef(fieldDef) && fieldDef.header) {\n return fieldDef.header;\n }\n return undefined;\n}\nexport function defaultTitle(fieldDef, config) {\n return titleFormatter(fieldDef, config);\n}\nexport function getFormatMixins(fieldDef) {\n var _a;\n if (isStringFieldOrDatumDef(fieldDef)) {\n const { format, formatType } = fieldDef;\n return { format, formatType };\n }\n else {\n const guide = (_a = getGuide(fieldDef)) !== null && _a !== void 0 ? _a : {};\n const { format, formatType } = guide;\n return { format, formatType };\n }\n}\nexport function defaultType(fieldDef, channel) {\n var _a;\n switch (channel) {\n case 'latitude':\n case 'longitude':\n return 'quantitative';\n case 'row':\n case 'column':\n case 'facet':\n case 'shape':\n case 'strokeDash':\n return 'nominal';\n case 'order':\n return 'ordinal';\n }\n if (isSortableFieldDef(fieldDef) && isArray(fieldDef.sort)) {\n return 'ordinal';\n }\n const { aggregate, bin, timeUnit } = fieldDef;\n if (timeUnit) {\n return 'temporal';\n }\n if (bin || (aggregate && !isArgmaxDef(aggregate) && !isArgminDef(aggregate))) {\n return 'quantitative';\n }\n if (isScaleFieldDef(fieldDef) && ((_a = fieldDef.scale) === null || _a === void 0 ? void 0 : _a.type)) {\n switch (SCALE_CATEGORY_INDEX[fieldDef.scale.type]) {\n case 'numeric':\n case 'discretizing':\n return 'quantitative';\n case 'time':\n return 'temporal';\n }\n }\n return 'nominal';\n}\n/**\n * Returns the fieldDef -- either from the outer channelDef or from the condition of channelDef.\n * @param channelDef\n */\nexport function getFieldDef(channelDef) {\n if (isFieldDef(channelDef)) {\n return channelDef;\n }\n else if (hasConditionalFieldDef(channelDef)) {\n return channelDef.condition;\n }\n return undefined;\n}\nexport function getFieldOrDatumDef(channelDef) {\n if (isFieldOrDatumDef(channelDef)) {\n return channelDef;\n }\n else if (hasConditionalFieldOrDatumDef(channelDef)) {\n return channelDef.condition;\n }\n return undefined;\n}\n/**\n * Convert type to full, lowercase type, or augment the fieldDef with a default type if missing.\n */\nexport function initChannelDef(channelDef, channel, config, opt = {}) {\n if (isString(channelDef) || isNumber(channelDef) || isBoolean(channelDef)) {\n const primitiveType = isString(channelDef) ? 'string' : isNumber(channelDef) ? 'number' : 'boolean';\n log.warn(log.message.primitiveChannelDef(channel, primitiveType, channelDef));\n return { value: channelDef };\n }\n // If a fieldDef contains a field, we need type.\n if (isFieldOrDatumDef(channelDef)) {\n return initFieldOrDatumDef(channelDef, channel, config, opt);\n }\n else if (hasConditionalFieldOrDatumDef(channelDef)) {\n return Object.assign(Object.assign({}, channelDef), { \n // Need to cast as normalizeFieldDef normally return FieldDef, but here we know that it is definitely Condition<FieldDef>\n condition: initFieldOrDatumDef(channelDef.condition, channel, config, opt) });\n }\n return channelDef;\n}\nexport function initFieldOrDatumDef(fd, channel, config, opt) {\n if (isStringFieldOrDatumDef(fd)) {\n const { format, formatType } = fd, rest = __rest(fd, [\"format\", \"formatType\"]);\n if (isCustomFormatType(formatType) && !config.customFormatTypes) {\n log.warn(log.message.customFormatTypeNotAllowed(channel));\n return initFieldOrDatumDef(rest, channel, config, opt);\n }\n }\n else {\n const guideType = isPositionFieldOrDatumDef(fd)\n ? 'axis'\n : isMarkPropFieldOrDatumDef(fd)\n ? 'legend'\n : isFacetFieldDef(fd)\n ? 'header'\n : null;\n if (guideType && fd[guideType]) {\n const _a = fd[guideType], { format, formatType } = _a, newGuide = __rest(_a, [\"format\", \"formatType\"]);\n if (isCustomFormatType(formatType) && !config.customFormatTypes) {\n log.warn(log.message.customFormatTypeNotAllowed(channel));\n return initFieldOrDatumDef(Object.assign(Object.assign({}, fd), { [guideType]: newGuide }), channel, config, opt);\n }\n }\n }\n if (isFieldDef(fd)) {\n return initFieldDef(fd, channel, opt);\n }\n return initDatumDef(fd);\n}\nfunction initDatumDef(datumDef) {\n let type = datumDef['type'];\n if (type) {\n return datumDef;\n }\n const { datum } = datumDef;\n type = isNumber(datum) ? 'quantitative' : isString(datum) ? 'nominal' : isDateTime(datum) ? 'temporal' : undefined;\n return Object.assign(Object.assign({}, datumDef), { type });\n}\nexport function initFieldDef(fd, channel, { compositeMark = false } = {}) {\n const { aggregate, timeUnit, bin, field } = fd;\n const fieldDef = Object.assign({}, fd);\n // Drop invalid aggregate\n if (!compositeMark && aggregate && !isAggregateOp(aggregate) && !isArgmaxDef(aggregate) && !isArgminDef(aggregate)) {\n log.warn(log.message.invalidAggregate(aggregate));\n delete fieldDef.aggregate;\n }\n // Normalize Time Unit\n if (timeUnit) {\n fieldDef.timeUnit = normalizeTimeUnit(timeUnit);\n }\n if (field) {\n fieldDef.field = `${field}`;\n }\n // Normalize bin\n if (isBinning(bin)) {\n fieldDef.bin = normalizeBin(bin, channel);\n }\n if (isBinned(bin) && !isXorY(channel)) {\n log.warn(log.message.channelShouldNotBeUsedForBinned(channel));\n }\n // Normalize Type\n if (isTypedFieldDef(fieldDef)) {\n const { type } = fieldDef;\n const fullType = getFullName(type);\n if (type !== fullType) {\n // convert short type to full type\n fieldDef.type = fullType;\n }\n if (type !== 'quantitative') {\n if (isCountingAggregateOp(aggregate)) {\n log.warn(log.message.invalidFieldTypeForCountAggregate(type, aggregate));\n fieldDef.type = 'quantitative';\n }\n }\n }\n else if (!isSecondaryRangeChannel(channel)) {\n // If type is empty / invalid, then augment with default type\n const newType = defaultType(fieldDef, channel);\n fieldDef['type'] = newType;\n }\n if (isTypedFieldDef(fieldDef)) {\n const { compatible, warning } = channelCompatibility(fieldDef, channel) || {};\n if (compatible === false) {\n log.warn(warning);\n }\n }\n if (isSortableFieldDef(fieldDef) && isString(fieldDef.sort)) {\n const { sort } = fieldDef;\n if (isSortByChannel(sort)) {\n return Object.assign(Object.assign({}, fieldDef), { sort: { encoding: sort } });\n }\n const sub = sort.substr(1);\n if (sort.charAt(0) === '-' && isSortByChannel(sub)) {\n return Object.assign(Object.assign({}, fieldDef), { sort: { encoding: sub, order: 'descending' } });\n }\n }\n if (isFacetFieldDef(fieldDef)) {\n const { header } = fieldDef;\n if (header) {\n const { orient } = header, rest = __rest(header, [\"orient\"]);\n if (orient) {\n return Object.assign(Object.assign({}, fieldDef), { header: Object.assign(Object.assign({}, rest), { labelOrient: header.labelOrient || orient, titleOrient: header.titleOrient || orient }) });\n }\n }\n }\n return fieldDef;\n}\nexport function normalizeBin(bin, channel) {\n if (isBoolean(bin)) {\n return { maxbins: autoMaxBins(channel) };\n }\n else if (bin === 'binned') {\n return {\n binned: true\n };\n }\n else if (!bin.maxbins && !bin.step) {\n return Object.assign(Object.assign({}, bin), { maxbins: autoMaxBins(channel) });\n }\n else {\n return bin;\n }\n}\nconst COMPATIBLE = { compatible: true };\nexport function channelCompatibility(fieldDef, channel) {\n const type = fieldDef.type;\n if (type === 'geojson' && channel !== 'shape') {\n return {\n compatible: false,\n warning: `Channel ${channel} should not be used with a geojson data.`\n };\n }\n switch (channel) {\n case ROW:\n case COLUMN:\n case FACET:\n if (!isDiscrete(fieldDef)) {\n return {\n compatible: false,\n warning: log.message.channelShouldBeDiscrete(channel)\n };\n }\n return COMPATIBLE;\n case X:\n case Y:\n case COLOR:\n case FILL:\n case STROKE:\n case TEXT:\n case DETAIL:\n case KEY:\n case TOOLTIP:\n case HREF:\n case URL:\n case ANGLE:\n case THETA:\n case RADIUS:\n case DESCRIPTION:\n return COMPATIBLE;\n case LONGITUDE:\n case LONGITUDE2:\n case LATITUDE:\n case LATITUDE2:\n if (type !== QUANTITATIVE) {\n return {\n compatible: false,\n warning: `Channel ${channel} should be used with a quantitative field only, not ${fieldDef.type} field.`\n };\n }\n return COMPATIBLE;\n case OPACITY:\n case FILLOPACITY:\n case STROKEOPACITY:\n case STROKEWIDTH:\n case SIZE:\n case THETA2:\n case RADIUS2:\n case X2:\n case Y2:\n if (type === 'nominal' && !fieldDef['sort']) {\n return {\n compatible: false,\n warning: `Channel ${channel} should not be used with an unsorted discrete field.`\n };\n }\n return COMPATIBLE;\n case SHAPE:\n case STROKEDASH:\n if (!isDiscrete(fieldDef) && !isDiscretizing(fieldDef)) {\n return {\n compatible: false,\n warning: log.message.channelShouldBeDiscreteOrDiscretizing(channel)\n };\n }\n return COMPATIBLE;\n case ORDER:\n if (fieldDef.type === 'nominal' && !('sort' in fieldDef)) {\n return {\n compatible: false,\n warning: `Channel order is inappropriate for nominal field, which has no inherent order.`\n };\n }\n return COMPATIBLE;\n }\n}\n/**\n * Check if the field def uses a time format or does not use any format but is temporal\n * (this does not cover field defs that are temporal but use a number format).\n */\nexport function isFieldOrDatumDefForTimeFormat(fieldOrDatumDef) {\n const { formatType } = getFormatMixins(fieldOrDatumDef);\n return formatType === 'time' || (!formatType && isTimeFieldDef(fieldOrDatumDef));\n}\n/**\n * Check if field def has type `temporal`. If you want to also cover field defs that use a time format, use `isTimeFormatFieldDef`.\n */\nexport function isTimeFieldDef(def) {\n return def && (def['type'] === 'temporal' || (isFieldDef(def) && !!def.timeUnit));\n}\n/**\n * Getting a value associated with a fielddef.\n * Convert the value to Vega expression if applicable (for datetime object, or string if the field def is temporal or has timeUnit)\n */\nexport function valueExpr(v, { timeUnit, type, wrapTime, undefinedIfExprNotRequired }) {\n var _a;\n const unit = timeUnit && ((_a = normalizeTimeUnit(timeUnit)) === null || _a === void 0 ? void 0 : _a.unit);\n let isTime = unit || type === 'temporal';\n let expr;\n if (isExprRef(v)) {\n expr = v.expr;\n }\n else if (isSignalRef(v)) {\n expr = v.signal;\n }\n else if (isDateTime(v)) {\n isTime = true;\n expr = dateTimeToExpr(v);\n }\n else if (isString(v) || isNumber(v)) {\n if (isTime) {\n expr = `datetime(${stringify(v)})`;\n if (isLocalSingleTimeUnit(unit)) {\n // for single timeUnit, we will use dateTimeToExpr to convert number/string to match the timeUnit\n if ((isNumber(v) && v < 10000) || (isString(v) && isNaN(Date.parse(v)))) {\n expr = dateTimeToExpr({ [unit]: v });\n }\n }\n }\n }\n if (expr) {\n return wrapTime && isTime ? `time(${expr})` : expr;\n }\n // number or boolean or normal string\n return undefinedIfExprNotRequired ? undefined : stringify(v);\n}\n/**\n * Standardize value array -- convert each value to Vega expression if applicable\n */\nexport function valueArray(fieldOrDatumDef, values) {\n const { type } = fieldOrDatumDef;\n return values.map(v => {\n const expr = valueExpr(v, {\n timeUnit: isFieldDef(fieldOrDatumDef) ? fieldOrDatumDef.timeUnit : undefined,\n type,\n undefinedIfExprNotRequired: true\n });\n // return signal for the expression if we need an expression\n if (expr !== undefined) {\n return { signal: expr };\n }\n // otherwise just return the original value\n return v;\n });\n}\n/**\n * Checks whether a fieldDef for a particular channel requires a computed bin range.\n */\nexport function binRequiresRange(fieldDef, channel) {\n if (!isBinning(fieldDef.bin)) {\n console.warn('Only call this method for binned field defs.');\n return false;\n }\n // We need the range only when the user explicitly forces a binned field to be use discrete scale. In this case, bin range is used in axis and legend labels.\n // We could check whether the axis or legend exists (not disabled) but that seems overkill.\n return isScaleChannel(channel) && ['ordinal', 'nominal'].includes(fieldDef.type);\n}\n//# sourceMappingURL=channeldef.js.map","import { keys } from './util';\nexport const CONDITIONAL_AXIS_PROP_INDEX = {\n labelAlign: {\n part: 'labels',\n vgProp: 'align'\n },\n labelBaseline: {\n part: 'labels',\n vgProp: 'baseline'\n },\n labelColor: {\n part: 'labels',\n vgProp: 'fill'\n },\n labelFont: {\n part: 'labels',\n vgProp: 'font'\n },\n labelFontSize: {\n part: 'labels',\n vgProp: 'fontSize'\n },\n labelFontStyle: {\n part: 'labels',\n vgProp: 'fontStyle'\n },\n labelFontWeight: {\n part: 'labels',\n vgProp: 'fontWeight'\n },\n labelOpacity: {\n part: 'labels',\n vgProp: 'opacity'\n },\n labelOffset: null,\n labelPadding: null,\n gridColor: {\n part: 'grid',\n vgProp: 'stroke'\n },\n gridDash: {\n part: 'grid',\n vgProp: 'strokeDash'\n },\n gridDashOffset: {\n part: 'grid',\n vgProp: 'strokeDashOffset'\n },\n gridOpacity: {\n part: 'grid',\n vgProp: 'opacity'\n },\n gridWidth: {\n part: 'grid',\n vgProp: 'strokeWidth'\n },\n tickColor: {\n part: 'ticks',\n vgProp: 'stroke'\n },\n tickDash: {\n part: 'ticks',\n vgProp: 'strokeDash'\n },\n tickDashOffset: {\n part: 'ticks',\n vgProp: 'strokeDashOffset'\n },\n tickOpacity: {\n part: 'ticks',\n vgProp: 'opacity'\n },\n tickSize: null,\n tickWidth: {\n part: 'ticks',\n vgProp: 'strokeWidth'\n }\n};\nexport function isConditionalAxisValue(v) {\n return v && v['condition'];\n}\nexport const AXIS_PARTS = ['domain', 'grid', 'labels', 'ticks', 'title'];\n/**\n * A dictionary listing whether a certain axis property is applicable for only main axes or only grid axes.\n */\nexport const AXIS_PROPERTY_TYPE = {\n grid: 'grid',\n gridCap: 'grid',\n gridColor: 'grid',\n gridDash: 'grid',\n gridDashOffset: 'grid',\n gridOpacity: 'grid',\n gridScale: 'grid',\n gridWidth: 'grid',\n orient: 'main',\n bandPosition: 'both',\n aria: 'main',\n description: 'main',\n domain: 'main',\n domainCap: 'main',\n domainColor: 'main',\n domainDash: 'main',\n domainDashOffset: 'main',\n domainOpacity: 'main',\n domainWidth: 'main',\n format: 'main',\n formatType: 'main',\n labelAlign: 'main',\n labelAngle: 'main',\n labelBaseline: 'main',\n labelBound: 'main',\n labelColor: 'main',\n labelFlush: 'main',\n labelFlushOffset: 'main',\n labelFont: 'main',\n labelFontSize: 'main',\n labelFontStyle: 'main',\n labelFontWeight: 'main',\n labelLimit: 'main',\n labelLineHeight: 'main',\n labelOffset: 'main',\n labelOpacity: 'main',\n labelOverlap: 'main',\n labelPadding: 'main',\n labels: 'main',\n labelSeparation: 'main',\n maxExtent: 'main',\n minExtent: 'main',\n offset: 'both',\n position: 'main',\n tickCap: 'main',\n tickColor: 'main',\n tickDash: 'main',\n tickDashOffset: 'main',\n tickMinStep: 'both',\n tickOffset: 'both',\n tickOpacity: 'main',\n tickRound: 'both',\n ticks: 'main',\n tickSize: 'main',\n tickWidth: 'both',\n title: 'main',\n titleAlign: 'main',\n titleAnchor: 'main',\n titleAngle: 'main',\n titleBaseline: 'main',\n titleColor: 'main',\n titleFont: 'main',\n titleFontSize: 'main',\n titleFontStyle: 'main',\n titleFontWeight: 'main',\n titleLimit: 'main',\n titleLineHeight: 'main',\n titleOpacity: 'main',\n titlePadding: 'main',\n titleX: 'main',\n titleY: 'main',\n encode: 'both',\n scale: 'both',\n tickBand: 'both',\n tickCount: 'both',\n tickExtra: 'both',\n translate: 'both',\n values: 'both',\n zindex: 'both' // this is actually set afterward, so it doesn't matter\n};\nexport const COMMON_AXIS_PROPERTIES_INDEX = {\n orient: 1,\n aria: 1,\n bandPosition: 1,\n description: 1,\n domain: 1,\n domainCap: 1,\n domainColor: 1,\n domainDash: 1,\n domainDashOffset: 1,\n domainOpacity: 1,\n domainWidth: 1,\n format: 1,\n formatType: 1,\n grid: 1,\n gridCap: 1,\n gridColor: 1,\n gridDash: 1,\n gridDashOffset: 1,\n gridOpacity: 1,\n gridWidth: 1,\n labelAlign: 1,\n labelAngle: 1,\n labelBaseline: 1,\n labelBound: 1,\n labelColor: 1,\n labelFlush: 1,\n labelFlushOffset: 1,\n labelFont: 1,\n labelFontSize: 1,\n labelFontStyle: 1,\n labelFontWeight: 1,\n labelLimit: 1,\n labelLineHeight: 1,\n labelOffset: 1,\n labelOpacity: 1,\n labelOverlap: 1,\n labelPadding: 1,\n labels: 1,\n labelSeparation: 1,\n maxExtent: 1,\n minExtent: 1,\n offset: 1,\n position: 1,\n tickBand: 1,\n tickCap: 1,\n tickColor: 1,\n tickCount: 1,\n tickDash: 1,\n tickDashOffset: 1,\n tickExtra: 1,\n tickMinStep: 1,\n tickOffset: 1,\n tickOpacity: 1,\n tickRound: 1,\n ticks: 1,\n tickSize: 1,\n tickWidth: 1,\n title: 1,\n titleAlign: 1,\n titleAnchor: 1,\n titleAngle: 1,\n titleBaseline: 1,\n titleColor: 1,\n titleFont: 1,\n titleFontSize: 1,\n titleFontStyle: 1,\n titleFontWeight: 1,\n titleLimit: 1,\n titleLineHeight: 1,\n titleOpacity: 1,\n titlePadding: 1,\n titleX: 1,\n titleY: 1,\n translate: 1,\n values: 1,\n zindex: 1\n};\nconst AXIS_PROPERTIES_INDEX = Object.assign(Object.assign({}, COMMON_AXIS_PROPERTIES_INDEX), { style: 1, labelExpr: 1, encoding: 1 });\nexport function isAxisProperty(prop) {\n return !!AXIS_PROPERTIES_INDEX[prop];\n}\n// Export for dependent projects\nexport const AXIS_PROPERTIES = keys(AXIS_PROPERTIES_INDEX);\nconst AXIS_CONFIGS_INDEX = {\n axis: 1,\n axisBand: 1,\n axisBottom: 1,\n axisDiscrete: 1,\n axisLeft: 1,\n axisPoint: 1,\n axisQuantitative: 1,\n axisRight: 1,\n axisTemporal: 1,\n axisTop: 1,\n axisX: 1,\n axisXBand: 1,\n axisXDiscrete: 1,\n axisXPoint: 1,\n axisXQuantitative: 1,\n axisXTemporal: 1,\n axisY: 1,\n axisYBand: 1,\n axisYDiscrete: 1,\n axisYPoint: 1,\n axisYQuantitative: 1,\n axisYTemporal: 1\n};\nexport const AXIS_CONFIGS = keys(AXIS_CONFIGS_INDEX);\n//# sourceMappingURL=axis.js.map","export function isUnitSpec(spec) {\n return 'mark' in spec;\n}\n//# sourceMappingURL=unit.js.map","import { getMarkType } from '../mark';\nimport { isUnitSpec } from '../spec/unit';\nexport class CompositeMarkNormalizer {\n constructor(name, run) {\n this.name = name;\n this.run = run;\n }\n hasMatchingType(spec) {\n if (isUnitSpec(spec)) {\n return getMarkType(spec.mark) === this.name;\n }\n return false;\n }\n}\n//# sourceMappingURL=base.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { array, isArray } from 'vega-util';\nimport { isArgmaxDef, isArgminDef } from './aggregate';\nimport { isBinned, isBinning } from './bin';\nimport { ANGLE, CHANNELS, COLOR, DESCRIPTION, DETAIL, FILL, FILLOPACITY, HREF, isChannel, isNonPositionScaleChannel, isSecondaryRangeChannel, isXorY, KEY, LATITUDE, LATITUDE2, LONGITUDE, LONGITUDE2, OPACITY, ORDER, RADIUS, RADIUS2, SHAPE, SIZE, STROKE, STROKEDASH, STROKEOPACITY, STROKEWIDTH, supportMark, TEXT, THETA, THETA2, TOOLTIP, URL, X, X2, Y, Y2 } from './channel';\nimport { binRequiresRange, getFieldDef, getGuide, hasConditionalFieldDef, initChannelDef, initFieldDef, isConditionalDef, isDatumDef, isFieldDef, isTypedFieldDef, isValueDef, title, vgField } from './channeldef';\nimport * as log from './log';\nimport { QUANTITATIVE, TEMPORAL } from './type';\nimport { keys, some } from './util';\nimport { isSignalRef } from './vega.schema';\nexport function channelHasField(encoding, channel) {\n const channelDef = encoding && encoding[channel];\n if (channelDef) {\n if (isArray(channelDef)) {\n return some(channelDef, fieldDef => !!fieldDef.field);\n }\n else {\n return isFieldDef(channelDef) || hasConditionalFieldDef(channelDef);\n }\n }\n return false;\n}\nexport function isAggregate(encoding) {\n return some(CHANNELS, channel => {\n if (channelHasField(encoding, channel)) {\n const channelDef = encoding[channel];\n if (isArray(channelDef)) {\n return some(channelDef, fieldDef => !!fieldDef.aggregate);\n }\n else {\n const fieldDef = getFieldDef(channelDef);\n return fieldDef && !!fieldDef.aggregate;\n }\n }\n return false;\n });\n}\nexport function extractTransformsFromEncoding(oldEncoding, config) {\n const groupby = [];\n const bins = [];\n const timeUnits = [];\n const aggregate = [];\n const encoding = {};\n forEach(oldEncoding, (channelDef, channel) => {\n // Extract potential embedded transformations along with remaining properties\n if (isFieldDef(channelDef)) {\n const { field, aggregate: aggOp, bin, timeUnit } = channelDef, remaining = __rest(channelDef, [\"field\", \"aggregate\", \"bin\", \"timeUnit\"]);\n if (aggOp || timeUnit || bin) {\n const guide = getGuide(channelDef);\n const isTitleDefined = guide === null || guide === void 0 ? void 0 : guide.title;\n let newField = vgField(channelDef, { forAs: true });\n const newFieldDef = Object.assign(Object.assign(Object.assign({}, (isTitleDefined ? [] : { title: title(channelDef, config, { allowDisabling: true }) })), remaining), { \n // Always overwrite field\n field: newField });\n if (aggOp) {\n let op;\n if (isArgmaxDef(aggOp)) {\n op = 'argmax';\n newField = vgField({ op: 'argmax', field: aggOp.argmax }, { forAs: true });\n newFieldDef.field = `${newField}.${field}`;\n }\n else if (isArgminDef(aggOp)) {\n op = 'argmin';\n newField = vgField({ op: 'argmin', field: aggOp.argmin }, { forAs: true });\n newFieldDef.field = `${newField}.${field}`;\n }\n else if (aggOp !== 'boxplot' && aggOp !== 'errorbar' && aggOp !== 'errorband') {\n op = aggOp;\n }\n if (op) {\n const aggregateEntry = {\n op,\n as: newField\n };\n if (field) {\n aggregateEntry.field = field;\n }\n aggregate.push(aggregateEntry);\n }\n }\n else {\n groupby.push(newField);\n if (isTypedFieldDef(channelDef) && isBinning(bin)) {\n bins.push({ bin, field, as: newField });\n // Add additional groupbys for range and end of bins\n groupby.push(vgField(channelDef, { binSuffix: 'end' }));\n if (binRequiresRange(channelDef, channel)) {\n groupby.push(vgField(channelDef, { binSuffix: 'range' }));\n }\n // Create accompanying 'x2' or 'y2' field if channel is 'x' or 'y' respectively\n if (isXorY(channel)) {\n const secondaryChannel = {\n field: `${newField}_end`\n };\n encoding[`${channel}2`] = secondaryChannel;\n }\n newFieldDef.bin = 'binned';\n if (!isSecondaryRangeChannel(channel)) {\n newFieldDef['type'] = QUANTITATIVE;\n }\n }\n else if (timeUnit) {\n timeUnits.push({\n timeUnit,\n field,\n as: newField\n });\n // define the format type for later compilation\n const formatType = isTypedFieldDef(channelDef) && channelDef.type !== TEMPORAL && 'time';\n if (formatType) {\n if (channel === TEXT || channel === TOOLTIP) {\n newFieldDef['formatType'] = formatType;\n }\n else if (isNonPositionScaleChannel(channel)) {\n newFieldDef['legend'] = Object.assign({ formatType }, newFieldDef['legend']);\n }\n else if (isXorY(channel)) {\n newFieldDef['axis'] = Object.assign({ formatType }, newFieldDef['axis']);\n }\n }\n }\n }\n // now the field should refer to post-transformed field instead\n encoding[channel] = newFieldDef;\n }\n else {\n groupby.push(field);\n encoding[channel] = oldEncoding[channel];\n }\n }\n else {\n // For value def / signal ref / datum def, just copy\n encoding[channel] = oldEncoding[channel];\n }\n });\n return {\n bins,\n timeUnits,\n aggregate,\n groupby,\n encoding\n };\n}\nexport function markChannelCompatible(encoding, channel, mark) {\n const markSupported = supportMark(channel, mark);\n if (!markSupported) {\n return false;\n }\n else if (markSupported === 'binned') {\n const primaryFieldDef = encoding[channel === X2 ? X : Y];\n // circle, point, square and tick only support x2/y2 when their corresponding x/y fieldDef\n // has \"binned\" data and thus need x2/y2 to specify the bin-end field.\n if (isFieldDef(primaryFieldDef) && isFieldDef(encoding[channel]) && isBinned(primaryFieldDef.bin)) {\n return true;\n }\n else {\n return false;\n }\n }\n return true;\n}\nexport function initEncoding(encoding, mark, filled, config) {\n return keys(encoding).reduce((normalizedEncoding, channel) => {\n if (!isChannel(channel)) {\n // Drop invalid channel\n log.warn(log.message.invalidEncodingChannel(channel));\n return normalizedEncoding;\n }\n const channelDef = encoding[channel];\n if (channel === 'angle' && mark === 'arc' && !encoding.theta) {\n log.warn(log.message.REPLACE_ANGLE_WITH_THETA);\n channel = THETA;\n }\n if (!markChannelCompatible(encoding, channel, mark)) {\n // Drop unsupported channel\n log.warn(log.message.incompatibleChannel(channel, mark));\n return normalizedEncoding;\n }\n // Drop line's size if the field is aggregated.\n if (channel === SIZE && mark === 'line') {\n const fieldDef = getFieldDef(encoding[channel]);\n if (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.aggregate) {\n log.warn(log.message.LINE_WITH_VARYING_SIZE);\n return normalizedEncoding;\n }\n }\n // Drop color if either fill or stroke is specified\n if (channel === COLOR && (filled ? 'fill' in encoding : 'stroke' in encoding)) {\n log.warn(log.message.droppingColor('encoding', { fill: 'fill' in encoding, stroke: 'stroke' in encoding }));\n return normalizedEncoding;\n }\n if (channel === DETAIL ||\n (channel === ORDER && !isArray(channelDef) && !isValueDef(channelDef)) ||\n (channel === TOOLTIP && isArray(channelDef))) {\n if (channelDef) {\n // Array of fieldDefs for detail channel (or production rule)\n normalizedEncoding[channel] = array(channelDef).reduce((defs, fieldDef) => {\n if (!isFieldDef(fieldDef)) {\n log.warn(log.message.emptyFieldDef(fieldDef, channel));\n }\n else {\n defs.push(initFieldDef(fieldDef, channel));\n }\n return defs;\n }, []);\n }\n }\n else {\n if (channel === TOOLTIP && channelDef === null) {\n // Preserve null so we can use it to disable tooltip\n normalizedEncoding[channel] = null;\n }\n else if (!isFieldDef(channelDef) &&\n !isDatumDef(channelDef) &&\n !isValueDef(channelDef) &&\n !isConditionalDef(channelDef) &&\n !isSignalRef(channelDef)) {\n log.warn(log.message.emptyFieldDef(channelDef, channel));\n return normalizedEncoding;\n }\n normalizedEncoding[channel] = initChannelDef(channelDef, channel, config);\n }\n return normalizedEncoding;\n }, {});\n}\n/**\n * For composite marks, we have to call initChannelDef during init so we can infer types earlier.\n */\nexport function normalizeEncoding(encoding, config) {\n const normalizedEncoding = {};\n for (const channel of keys(encoding)) {\n const newChannelDef = initChannelDef(encoding[channel], channel, config, { compositeMark: true });\n normalizedEncoding[channel] = newChannelDef;\n }\n return normalizedEncoding;\n}\nexport function fieldDefs(encoding) {\n const arr = [];\n for (const channel of keys(encoding)) {\n if (channelHasField(encoding, channel)) {\n const channelDef = encoding[channel];\n const channelDefArray = array(channelDef);\n for (const def of channelDefArray) {\n if (isFieldDef(def)) {\n arr.push(def);\n }\n else if (hasConditionalFieldDef(def)) {\n arr.push(def.condition);\n }\n }\n }\n }\n return arr;\n}\nexport function forEach(mapping, f, thisArg) {\n if (!mapping) {\n return;\n }\n for (const channel of keys(mapping)) {\n const el = mapping[channel];\n if (isArray(el)) {\n for (const channelDef of el) {\n f.call(thisArg, channelDef, channel);\n }\n }\n else {\n f.call(thisArg, el, channel);\n }\n }\n}\nexport function reduce(mapping, f, init, thisArg) {\n if (!mapping) {\n return init;\n }\n return keys(mapping).reduce((r, channel) => {\n const map = mapping[channel];\n if (isArray(map)) {\n return map.reduce((r1, channelDef) => {\n return f.call(thisArg, r1, channelDef, channel);\n }, r);\n }\n else {\n return f.call(thisArg, r, map, channel);\n }\n }, init);\n}\n/**\n * Returns list of path grouping fields for the given encoding\n */\nexport function pathGroupingFields(mark, encoding) {\n return keys(encoding).reduce((details, channel) => {\n switch (channel) {\n // x, y, x2, y2, lat, long, lat1, long2, order, tooltip, href, aria label, cursor should not cause lines to group\n case X:\n case Y:\n case HREF:\n case DESCRIPTION:\n case URL:\n case X2:\n case Y2:\n case THETA:\n case THETA2:\n case RADIUS:\n case RADIUS2:\n // falls through\n case LATITUDE:\n case LONGITUDE:\n case LATITUDE2:\n case LONGITUDE2:\n // TODO: case 'cursor':\n // text, shape, shouldn't be a part of line/trail/area [falls through]\n case TEXT:\n case SHAPE:\n case ANGLE:\n // falls through\n // tooltip fields should not be added to group by [falls through]\n case TOOLTIP:\n return details;\n case ORDER:\n // order should not group line / trail\n if (mark === 'line' || mark === 'trail') {\n return details;\n }\n // but order should group area for stacking (falls through)\n case DETAIL:\n case KEY: {\n const channelDef = encoding[channel];\n if (isArray(channelDef) || isFieldDef(channelDef)) {\n for (const fieldDef of array(channelDef)) {\n if (!fieldDef.aggregate) {\n details.push(vgField(fieldDef, {}));\n }\n }\n }\n return details;\n }\n case SIZE:\n if (mark === 'trail') {\n // For trail, size should not group trail lines.\n return details;\n }\n // For line, size should group lines.\n // falls through\n case COLOR:\n case FILL:\n case STROKE:\n case OPACITY:\n case FILLOPACITY:\n case STROKEOPACITY:\n case STROKEDASH:\n case STROKEWIDTH: {\n // TODO strokeDashOffset:\n // falls through\n const fieldDef = getFieldDef(encoding[channel]);\n if (fieldDef && !fieldDef.aggregate) {\n details.push(vgField(fieldDef, {}));\n }\n return details;\n }\n }\n }, []);\n}\n//# sourceMappingURL=encoding.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isArray, isBoolean, isString } from 'vega-util';\nimport { isContinuousFieldOrDatumDef, isFieldDef, isFieldOrDatumDefForTimeFormat } from '../channeldef';\nimport { fieldDefs } from '../encoding';\nimport * as log from '../log';\nimport { isMarkDef } from '../mark';\nimport { getFirstDefined, hash, unique } from '../util';\nimport { isSignalRef } from '../vega.schema';\nimport { toStringFieldDef } from './../channeldef';\nexport function filterTooltipWithAggregatedField(oldEncoding) {\n const { tooltip } = oldEncoding, filteredEncoding = __rest(oldEncoding, [\"tooltip\"]);\n if (!tooltip) {\n return { filteredEncoding };\n }\n let customTooltipWithAggregatedField;\n let customTooltipWithoutAggregatedField;\n if (isArray(tooltip)) {\n for (const t of tooltip) {\n if (t.aggregate) {\n if (!customTooltipWithAggregatedField) {\n customTooltipWithAggregatedField = [];\n }\n customTooltipWithAggregatedField.push(t);\n }\n else {\n if (!customTooltipWithoutAggregatedField) {\n customTooltipWithoutAggregatedField = [];\n }\n customTooltipWithoutAggregatedField.push(t);\n }\n }\n if (customTooltipWithAggregatedField) {\n filteredEncoding.tooltip = customTooltipWithAggregatedField;\n }\n }\n else {\n if (tooltip['aggregate']) {\n filteredEncoding.tooltip = tooltip;\n }\n else {\n customTooltipWithoutAggregatedField = tooltip;\n }\n }\n if (isArray(customTooltipWithoutAggregatedField) && customTooltipWithoutAggregatedField.length === 1) {\n customTooltipWithoutAggregatedField = customTooltipWithoutAggregatedField[0];\n }\n return { customTooltipWithoutAggregatedField, filteredEncoding };\n}\nexport function getCompositeMarkTooltip(tooltipSummary, continuousAxisChannelDef, encodingWithoutContinuousAxis, withFieldName = true) {\n if ('tooltip' in encodingWithoutContinuousAxis) {\n return { tooltip: encodingWithoutContinuousAxis.tooltip };\n }\n const fiveSummaryTooltip = tooltipSummary.map(({ fieldPrefix, titlePrefix }) => {\n const mainTitle = withFieldName ? ` of ${getTitle(continuousAxisChannelDef)}` : '';\n return {\n field: fieldPrefix + continuousAxisChannelDef.field,\n type: continuousAxisChannelDef.type,\n title: isSignalRef(titlePrefix) ? { signal: `${titlePrefix}\"${escape(mainTitle)}\"` } : titlePrefix + mainTitle\n };\n });\n const tooltipFieldDefs = fieldDefs(encodingWithoutContinuousAxis).map(toStringFieldDef);\n return {\n tooltip: [\n ...fiveSummaryTooltip,\n // need to cast because TextFieldDef supports fewer types of bin\n ...unique(tooltipFieldDefs, hash)\n ]\n };\n}\nexport function getTitle(continuousAxisChannelDef) {\n const { title, field } = continuousAxisChannelDef;\n return getFirstDefined(title, field);\n}\nexport function makeCompositeAggregatePartFactory(compositeMarkDef, continuousAxis, continuousAxisChannelDef, sharedEncoding, compositeMarkConfig) {\n const { scale, axis } = continuousAxisChannelDef;\n return ({ partName, mark, positionPrefix, endPositionPrefix = undefined, extraEncoding = {} }) => {\n const title = getTitle(continuousAxisChannelDef);\n return partLayerMixins(compositeMarkDef, partName, compositeMarkConfig, {\n mark,\n encoding: Object.assign(Object.assign(Object.assign({ [continuousAxis]: Object.assign(Object.assign(Object.assign({ field: `${positionPrefix}_${continuousAxisChannelDef.field}`, type: continuousAxisChannelDef.type }, (title !== undefined ? { title } : {})), (scale !== undefined ? { scale } : {})), (axis !== undefined ? { axis } : {})) }, (isString(endPositionPrefix)\n ? {\n [`${continuousAxis}2`]: {\n field: `${endPositionPrefix}_${continuousAxisChannelDef.field}`\n }\n }\n : {})), sharedEncoding), extraEncoding)\n });\n };\n}\nexport function partLayerMixins(markDef, part, compositeMarkConfig, partBaseSpec) {\n const { clip, color, opacity } = markDef;\n const mark = markDef.type;\n if (markDef[part] || (markDef[part] === undefined && compositeMarkConfig[part])) {\n return [\n Object.assign(Object.assign({}, partBaseSpec), { mark: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, compositeMarkConfig[part]), (clip ? { clip } : {})), (color ? { color } : {})), (opacity ? { opacity } : {})), (isMarkDef(partBaseSpec.mark) ? partBaseSpec.mark : { type: partBaseSpec.mark })), { style: `${mark}-${part}` }), (isBoolean(markDef[part]) ? {} : markDef[part])) })\n ];\n }\n return [];\n}\nexport function compositeMarkContinuousAxis(spec, orient, compositeMark) {\n const { encoding } = spec;\n const continuousAxis = orient === 'vertical' ? 'y' : 'x';\n const continuousAxisChannelDef = encoding[continuousAxis]; // Safe to cast because if x is not continuous fielddef, the orient would not be horizontal.\n const continuousAxisChannelDef2 = encoding[`${continuousAxis}2`];\n const continuousAxisChannelDefError = encoding[`${continuousAxis}Error`];\n const continuousAxisChannelDefError2 = encoding[`${continuousAxis}Error2`];\n return {\n continuousAxisChannelDef: filterAggregateFromChannelDef(continuousAxisChannelDef, compositeMark),\n continuousAxisChannelDef2: filterAggregateFromChannelDef(continuousAxisChannelDef2, compositeMark),\n continuousAxisChannelDefError: filterAggregateFromChannelDef(continuousAxisChannelDefError, compositeMark),\n continuousAxisChannelDefError2: filterAggregateFromChannelDef(continuousAxisChannelDefError2, compositeMark),\n continuousAxis\n };\n}\nfunction filterAggregateFromChannelDef(continuousAxisChannelDef, compositeMark) {\n if (continuousAxisChannelDef === null || continuousAxisChannelDef === void 0 ? void 0 : continuousAxisChannelDef.aggregate) {\n const { aggregate } = continuousAxisChannelDef, continuousAxisWithoutAggregate = __rest(continuousAxisChannelDef, [\"aggregate\"]);\n if (aggregate !== compositeMark) {\n log.warn(log.message.errorBarContinuousAxisHasCustomizedAggregate(aggregate, compositeMark));\n }\n return continuousAxisWithoutAggregate;\n }\n else {\n return continuousAxisChannelDef;\n }\n}\nexport function compositeMarkOrient(spec, compositeMark) {\n const { mark, encoding } = spec;\n const { x, y } = encoding;\n if (isMarkDef(mark) && mark.orient) {\n return mark.orient;\n }\n if (isContinuousFieldOrDatumDef(x)) {\n // x is continuous\n if (isContinuousFieldOrDatumDef(y)) {\n // both x and y are continuous\n const xAggregate = isFieldDef(x) && x.aggregate;\n const yAggregate = isFieldDef(y) && y.aggregate;\n if (!xAggregate && yAggregate === compositeMark) {\n return 'vertical';\n }\n else if (!yAggregate && xAggregate === compositeMark) {\n return 'horizontal';\n }\n else if (xAggregate === compositeMark && yAggregate === compositeMark) {\n throw new Error('Both x and y cannot have aggregate');\n }\n else {\n if (isFieldOrDatumDefForTimeFormat(y) && !isFieldOrDatumDefForTimeFormat(x)) {\n // y is temporal but x is not\n return 'horizontal';\n }\n // default orientation for two continuous\n return 'vertical';\n }\n }\n return 'horizontal';\n }\n else if (isContinuousFieldOrDatumDef(y)) {\n // y is continuous but x is not\n return 'vertical';\n }\n else {\n // Neither x nor y is continuous.\n throw new Error(`Need a valid continuous axis for ${compositeMark}s`);\n }\n}\n//# sourceMappingURL=common.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isNumber, isObject } from 'vega-util';\nimport { getMarkPropOrConfig } from '../compile/common';\nimport { extractTransformsFromEncoding, normalizeEncoding } from '../encoding';\nimport * as log from '../log';\nimport { isMarkDef } from '../mark';\nimport { isEmpty, omit } from '../util';\nimport { CompositeMarkNormalizer } from './base';\nimport { compositeMarkContinuousAxis, compositeMarkOrient, filterTooltipWithAggregatedField, getCompositeMarkTooltip, getTitle, makeCompositeAggregatePartFactory, partLayerMixins } from './common';\nexport const BOXPLOT = 'boxplot';\nexport const BOXPLOT_PARTS = ['box', 'median', 'outliers', 'rule', 'ticks'];\nexport const boxPlotNormalizer = new CompositeMarkNormalizer(BOXPLOT, normalizeBoxPlot);\nexport function getBoxPlotType(extent) {\n if (isNumber(extent)) {\n return 'tukey';\n }\n // Ham: If we ever want to, we could add another extent syntax `{kIQR: number}` for the original [Q1-k*IQR, Q3+k*IQR] whisker and call this boxPlotType = `kIQR`. However, I'm not exposing this for now.\n return extent;\n}\nexport function normalizeBoxPlot(spec, { config }) {\n var _a, _b;\n // Need to initEncoding first so we can infer type\n spec = Object.assign(Object.assign({}, spec), { encoding: normalizeEncoding(spec.encoding, config) });\n const { mark, encoding: _encoding, params, projection: _p } = spec, outerSpec = __rest(spec, [\"mark\", \"encoding\", \"params\", \"projection\"]);\n const markDef = isMarkDef(mark) ? mark : { type: mark };\n // TODO(https://github.com/vega/vega-lite/issues/3702): add selection support\n if (params) {\n log.warn(log.message.selectionNotSupported('boxplot'));\n }\n const extent = (_a = markDef.extent) !== null && _a !== void 0 ? _a : config.boxplot.extent;\n const sizeValue = getMarkPropOrConfig('size', markDef, // TODO: https://github.com/vega/vega-lite/issues/6245\n config);\n const boxPlotType = getBoxPlotType(extent);\n const { bins, timeUnits, transform, continuousAxisChannelDef, continuousAxis, groupby, aggregate, encodingWithoutContinuousAxis, ticksOrient, boxOrient, customTooltipWithoutAggregatedField } = boxParams(spec, extent, config);\n const { color, size } = encodingWithoutContinuousAxis, encodingWithoutSizeColorAndContinuousAxis = __rest(encodingWithoutContinuousAxis, [\"color\", \"size\"]);\n const makeBoxPlotPart = (sharedEncoding) => {\n return makeCompositeAggregatePartFactory(markDef, continuousAxis, continuousAxisChannelDef, sharedEncoding, config.boxplot);\n };\n const makeBoxPlotExtent = makeBoxPlotPart(encodingWithoutSizeColorAndContinuousAxis);\n const makeBoxPlotBox = makeBoxPlotPart(encodingWithoutContinuousAxis);\n const makeBoxPlotMidTick = makeBoxPlotPart(Object.assign(Object.assign({}, encodingWithoutSizeColorAndContinuousAxis), (size ? { size } : {})));\n const fiveSummaryTooltipEncoding = getCompositeMarkTooltip([\n { fieldPrefix: boxPlotType === 'min-max' ? 'upper_whisker_' : 'max_', titlePrefix: 'Max' },\n { fieldPrefix: 'upper_box_', titlePrefix: 'Q3' },\n { fieldPrefix: 'mid_box_', titlePrefix: 'Median' },\n { fieldPrefix: 'lower_box_', titlePrefix: 'Q1' },\n { fieldPrefix: boxPlotType === 'min-max' ? 'lower_whisker_' : 'min_', titlePrefix: 'Min' }\n ], continuousAxisChannelDef, encodingWithoutContinuousAxis);\n // ## Whisker Layers\n const endTick = { type: 'tick', color: 'black', opacity: 1, orient: ticksOrient, invalid: null, aria: false };\n const whiskerTooltipEncoding = boxPlotType === 'min-max'\n ? fiveSummaryTooltipEncoding // for min-max, show five-summary tooltip for whisker\n : // for tukey / k-IQR, just show upper/lower-whisker\n getCompositeMarkTooltip([\n { fieldPrefix: 'upper_whisker_', titlePrefix: 'Upper Whisker' },\n { fieldPrefix: 'lower_whisker_', titlePrefix: 'Lower Whisker' }\n ], continuousAxisChannelDef, encodingWithoutContinuousAxis);\n const whiskerLayers = [\n ...makeBoxPlotExtent({\n partName: 'rule',\n mark: { type: 'rule', invalid: null, aria: false },\n positionPrefix: 'lower_whisker',\n endPositionPrefix: 'lower_box',\n extraEncoding: whiskerTooltipEncoding\n }),\n ...makeBoxPlotExtent({\n partName: 'rule',\n mark: { type: 'rule', invalid: null, aria: false },\n positionPrefix: 'upper_box',\n endPositionPrefix: 'upper_whisker',\n extraEncoding: whiskerTooltipEncoding\n }),\n ...makeBoxPlotExtent({\n partName: 'ticks',\n mark: endTick,\n positionPrefix: 'lower_whisker',\n extraEncoding: whiskerTooltipEncoding\n }),\n ...makeBoxPlotExtent({\n partName: 'ticks',\n mark: endTick,\n positionPrefix: 'upper_whisker',\n extraEncoding: whiskerTooltipEncoding\n })\n ];\n // ## Box Layers\n // TODO: support hiding certain mark parts\n const boxLayers = [\n ...(boxPlotType !== 'tukey' ? whiskerLayers : []),\n ...makeBoxPlotBox({\n partName: 'box',\n mark: Object.assign(Object.assign({ type: 'bar' }, (sizeValue ? { size: sizeValue } : {})), { orient: boxOrient, invalid: null, ariaRoleDescription: 'box' }),\n positionPrefix: 'lower_box',\n endPositionPrefix: 'upper_box',\n extraEncoding: fiveSummaryTooltipEncoding\n }),\n ...makeBoxPlotMidTick({\n partName: 'median',\n mark: Object.assign(Object.assign(Object.assign({ type: 'tick', invalid: null }, (isObject(config.boxplot.median) && config.boxplot.median.color ? { color: config.boxplot.median.color } : {})), (sizeValue ? { size: sizeValue } : {})), { orient: ticksOrient, aria: false }),\n positionPrefix: 'mid_box',\n extraEncoding: fiveSummaryTooltipEncoding\n })\n ];\n if (boxPlotType === 'min-max') {\n return Object.assign(Object.assign({}, outerSpec), { transform: ((_b = outerSpec.transform) !== null && _b !== void 0 ? _b : []).concat(transform), layer: boxLayers });\n }\n // Tukey Box Plot\n const lowerBoxExpr = `datum[\"lower_box_${continuousAxisChannelDef.field}\"]`;\n const upperBoxExpr = `datum[\"upper_box_${continuousAxisChannelDef.field}\"]`;\n const iqrExpr = `(${upperBoxExpr} - ${lowerBoxExpr})`;\n const lowerWhiskerExpr = `${lowerBoxExpr} - ${extent} * ${iqrExpr}`;\n const upperWhiskerExpr = `${upperBoxExpr} + ${extent} * ${iqrExpr}`;\n const fieldExpr = `datum[\"${continuousAxisChannelDef.field}\"]`;\n const joinaggregateTransform = {\n joinaggregate: boxParamsQuartiles(continuousAxisChannelDef.field),\n groupby\n };\n const filteredWhiskerSpec = {\n transform: [\n {\n filter: `(${lowerWhiskerExpr} <= ${fieldExpr}) && (${fieldExpr} <= ${upperWhiskerExpr})`\n },\n {\n aggregate: [\n {\n op: 'min',\n field: continuousAxisChannelDef.field,\n as: `lower_whisker_${continuousAxisChannelDef.field}`\n },\n {\n op: 'max',\n field: continuousAxisChannelDef.field,\n as: `upper_whisker_${continuousAxisChannelDef.field}`\n },\n // preserve lower_box / upper_box\n {\n op: 'min',\n field: `lower_box_${continuousAxisChannelDef.field}`,\n as: `lower_box_${continuousAxisChannelDef.field}`\n },\n {\n op: 'max',\n field: `upper_box_${continuousAxisChannelDef.field}`,\n as: `upper_box_${continuousAxisChannelDef.field}`\n },\n ...aggregate\n ],\n groupby\n }\n ],\n layer: whiskerLayers\n };\n const { tooltip } = encodingWithoutSizeColorAndContinuousAxis, encodingWithoutSizeColorContinuousAxisAndTooltip = __rest(encodingWithoutSizeColorAndContinuousAxis, [\"tooltip\"]);\n const { scale, axis } = continuousAxisChannelDef;\n const title = getTitle(continuousAxisChannelDef);\n const axisWithoutTitle = omit(axis, ['title']);\n const outlierLayersMixins = partLayerMixins(markDef, 'outliers', config.boxplot, {\n transform: [{ filter: `(${fieldExpr} < ${lowerWhiskerExpr}) || (${fieldExpr} > ${upperWhiskerExpr})` }],\n mark: 'point',\n encoding: Object.assign(Object.assign(Object.assign({ [continuousAxis]: Object.assign(Object.assign(Object.assign({ field: continuousAxisChannelDef.field, type: continuousAxisChannelDef.type }, (title !== undefined ? { title } : {})), (scale !== undefined ? { scale } : {})), (isEmpty(axisWithoutTitle) ? {} : { axis: axisWithoutTitle })) }, encodingWithoutSizeColorContinuousAxisAndTooltip), (color ? { color } : {})), (customTooltipWithoutAggregatedField ? { tooltip: customTooltipWithoutAggregatedField } : {}))\n })[0];\n let filteredLayersMixins;\n const filteredLayersMixinsTransforms = [...bins, ...timeUnits, joinaggregateTransform];\n if (outlierLayersMixins) {\n filteredLayersMixins = {\n transform: filteredLayersMixinsTransforms,\n layer: [outlierLayersMixins, filteredWhiskerSpec]\n };\n }\n else {\n filteredLayersMixins = filteredWhiskerSpec;\n filteredLayersMixins.transform.unshift(...filteredLayersMixinsTransforms);\n }\n return Object.assign(Object.assign({}, outerSpec), { layer: [\n filteredLayersMixins,\n {\n // boxplot\n transform,\n layer: boxLayers\n }\n ] });\n}\nfunction boxParamsQuartiles(continousAxisField) {\n return [\n {\n op: 'q1',\n field: continousAxisField,\n as: `lower_box_${continousAxisField}`\n },\n {\n op: 'q3',\n field: continousAxisField,\n as: `upper_box_${continousAxisField}`\n }\n ];\n}\nfunction boxParams(spec, extent, config) {\n const orient = compositeMarkOrient(spec, BOXPLOT);\n const { continuousAxisChannelDef, continuousAxis } = compositeMarkContinuousAxis(spec, orient, BOXPLOT);\n const continuousFieldName = continuousAxisChannelDef.field;\n const boxPlotType = getBoxPlotType(extent);\n const boxplotSpecificAggregate = [\n ...boxParamsQuartiles(continuousFieldName),\n {\n op: 'median',\n field: continuousFieldName,\n as: `mid_box_${continuousFieldName}`\n },\n {\n op: 'min',\n field: continuousFieldName,\n as: (boxPlotType === 'min-max' ? 'lower_whisker_' : 'min_') + continuousFieldName\n },\n {\n op: 'max',\n field: continuousFieldName,\n as: (boxPlotType === 'min-max' ? 'upper_whisker_' : 'max_') + continuousFieldName\n }\n ];\n const postAggregateCalculates = boxPlotType === 'min-max' || boxPlotType === 'tukey'\n ? []\n : [\n // This is for the original k-IQR, which we do not expose\n {\n calculate: `datum[\"upper_box_${continuousFieldName}\"] - datum[\"lower_box_${continuousFieldName}\"]`,\n as: `iqr_${continuousFieldName}`\n },\n {\n calculate: `min(datum[\"upper_box_${continuousFieldName}\"] + datum[\"iqr_${continuousFieldName}\"] * ${extent}, datum[\"max_${continuousFieldName}\"])`,\n as: `upper_whisker_${continuousFieldName}`\n },\n {\n calculate: `max(datum[\"lower_box_${continuousFieldName}\"] - datum[\"iqr_${continuousFieldName}\"] * ${extent}, datum[\"min_${continuousFieldName}\"])`,\n as: `lower_whisker_${continuousFieldName}`\n }\n ];\n const _a = spec.encoding, _b = continuousAxis, oldContinuousAxisChannelDef = _a[_b], oldEncodingWithoutContinuousAxis = __rest(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\n const { customTooltipWithoutAggregatedField, filteredEncoding } = filterTooltipWithAggregatedField(oldEncodingWithoutContinuousAxis);\n const { bins, timeUnits, aggregate, groupby, encoding: encodingWithoutContinuousAxis } = extractTransformsFromEncoding(filteredEncoding, config);\n const ticksOrient = orient === 'vertical' ? 'horizontal' : 'vertical';\n const boxOrient = orient;\n const transform = [\n ...bins,\n ...timeUnits,\n {\n aggregate: [...aggregate, ...boxplotSpecificAggregate],\n groupby\n },\n ...postAggregateCalculates\n ];\n return {\n bins,\n timeUnits,\n transform,\n groupby,\n aggregate,\n continuousAxisChannelDef,\n continuousAxis,\n encodingWithoutContinuousAxis,\n ticksOrient,\n boxOrient,\n customTooltipWithoutAggregatedField\n };\n}\n//# sourceMappingURL=boxplot.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isContinuousFieldOrDatumDef, isFieldOrDatumDef, title } from '../channeldef';\nimport { extractTransformsFromEncoding, normalizeEncoding } from '../encoding';\nimport * as log from '../log';\nimport { isMarkDef } from '../mark';\nimport { replaceAll, titleCase } from '../util';\nimport { CompositeMarkNormalizer } from './base';\nimport { compositeMarkContinuousAxis, compositeMarkOrient, getCompositeMarkTooltip, makeCompositeAggregatePartFactory } from './common';\nexport const ERRORBAR = 'errorbar';\nexport const ERRORBAR_PARTS = ['ticks', 'rule'];\nexport const errorBarNormalizer = new CompositeMarkNormalizer(ERRORBAR, normalizeErrorBar);\nexport function normalizeErrorBar(spec, { config }) {\n // Need to initEncoding first so we can infer type\n spec = Object.assign(Object.assign({}, spec), { encoding: normalizeEncoding(spec.encoding, config) });\n const { transform, continuousAxisChannelDef, continuousAxis, encodingWithoutContinuousAxis, ticksOrient, markDef, outerSpec, tooltipEncoding } = errorBarParams(spec, ERRORBAR, config);\n delete encodingWithoutContinuousAxis['size'];\n const makeErrorBarPart = makeCompositeAggregatePartFactory(markDef, continuousAxis, continuousAxisChannelDef, encodingWithoutContinuousAxis, config.errorbar);\n const thickness = markDef.thickness;\n const size = markDef.size;\n const tick = Object.assign(Object.assign({ type: 'tick', orient: ticksOrient, aria: false }, (thickness !== undefined ? { thickness } : {})), (size !== undefined ? { size } : {}));\n const layer = [\n ...makeErrorBarPart({\n partName: 'ticks',\n mark: tick,\n positionPrefix: 'lower',\n extraEncoding: tooltipEncoding\n }),\n ...makeErrorBarPart({\n partName: 'ticks',\n mark: tick,\n positionPrefix: 'upper',\n extraEncoding: tooltipEncoding\n }),\n ...makeErrorBarPart({\n partName: 'rule',\n mark: Object.assign({ type: 'rule', ariaRoleDescription: 'errorbar' }, (thickness !== undefined ? { size: thickness } : {})),\n positionPrefix: 'lower',\n endPositionPrefix: 'upper',\n extraEncoding: tooltipEncoding\n })\n ];\n return Object.assign(Object.assign(Object.assign({}, outerSpec), { transform }), (layer.length > 1 ? { layer } : Object.assign({}, layer[0])));\n}\nfunction errorBarOrientAndInputType(spec, compositeMark) {\n const { encoding } = spec;\n if (errorBarIsInputTypeRaw(encoding)) {\n return {\n orient: compositeMarkOrient(spec, compositeMark),\n inputType: 'raw'\n };\n }\n const isTypeAggregatedUpperLower = errorBarIsInputTypeAggregatedUpperLower(encoding);\n const isTypeAggregatedError = errorBarIsInputTypeAggregatedError(encoding);\n const x = encoding.x;\n const y = encoding.y;\n if (isTypeAggregatedUpperLower) {\n // type is aggregated-upper-lower\n if (isTypeAggregatedError) {\n throw new Error(`${compositeMark} cannot be both type aggregated-upper-lower and aggregated-error`);\n }\n const x2 = encoding.x2;\n const y2 = encoding.y2;\n if (isFieldOrDatumDef(x2) && isFieldOrDatumDef(y2)) {\n // having both x, x2 and y, y2\n throw new Error(`${compositeMark} cannot have both x2 and y2`);\n }\n else if (isFieldOrDatumDef(x2)) {\n if (isContinuousFieldOrDatumDef(x)) {\n // having x, x2 quantitative and field y, y2 are not specified\n return { orient: 'horizontal', inputType: 'aggregated-upper-lower' };\n }\n else {\n // having x, x2 that are not both quantitative\n throw new Error(`Both x and x2 have to be quantitative in ${compositeMark}`);\n }\n }\n else if (isFieldOrDatumDef(y2)) {\n // y2 is a FieldDef\n if (isContinuousFieldOrDatumDef(y)) {\n // having y, y2 quantitative and field x, x2 are not specified\n return { orient: 'vertical', inputType: 'aggregated-upper-lower' };\n }\n else {\n // having y, y2 that are not both quantitative\n throw new Error(`Both y and y2 have to be quantitative in ${compositeMark}`);\n }\n }\n throw new Error('No ranged axis');\n }\n else {\n // type is aggregated-error\n const xError = encoding.xError;\n const xError2 = encoding.xError2;\n const yError = encoding.yError;\n const yError2 = encoding.yError2;\n if (isFieldOrDatumDef(xError2) && !isFieldOrDatumDef(xError)) {\n // having xError2 without xError\n throw new Error(`${compositeMark} cannot have xError2 without xError`);\n }\n if (isFieldOrDatumDef(yError2) && !isFieldOrDatumDef(yError)) {\n // having yError2 without yError\n throw new Error(`${compositeMark} cannot have yError2 without yError`);\n }\n if (isFieldOrDatumDef(xError) && isFieldOrDatumDef(yError)) {\n // having both xError and yError\n throw new Error(`${compositeMark} cannot have both xError and yError with both are quantiative`);\n }\n else if (isFieldOrDatumDef(xError)) {\n if (isContinuousFieldOrDatumDef(x)) {\n // having x and xError that are all quantitative\n return { orient: 'horizontal', inputType: 'aggregated-error' };\n }\n else {\n // having x, xError, and xError2 that are not all quantitative\n throw new Error('All x, xError, and xError2 (if exist) have to be quantitative');\n }\n }\n else if (isFieldOrDatumDef(yError)) {\n if (isContinuousFieldOrDatumDef(y)) {\n // having y and yError that are all quantitative\n return { orient: 'vertical', inputType: 'aggregated-error' };\n }\n else {\n // having y, yError, and yError2 that are not all quantitative\n throw new Error('All y, yError, and yError2 (if exist) have to be quantitative');\n }\n }\n throw new Error('No ranged axis');\n }\n}\nfunction errorBarIsInputTypeRaw(encoding) {\n return ((isFieldOrDatumDef(encoding.x) || isFieldOrDatumDef(encoding.y)) &&\n !isFieldOrDatumDef(encoding.x2) &&\n !isFieldOrDatumDef(encoding.y2) &&\n !isFieldOrDatumDef(encoding.xError) &&\n !isFieldOrDatumDef(encoding.xError2) &&\n !isFieldOrDatumDef(encoding.yError) &&\n !isFieldOrDatumDef(encoding.yError2));\n}\nfunction errorBarIsInputTypeAggregatedUpperLower(encoding) {\n return isFieldOrDatumDef(encoding.x2) || isFieldOrDatumDef(encoding.y2);\n}\nfunction errorBarIsInputTypeAggregatedError(encoding) {\n return (isFieldOrDatumDef(encoding.xError) ||\n isFieldOrDatumDef(encoding.xError2) ||\n isFieldOrDatumDef(encoding.yError) ||\n isFieldOrDatumDef(encoding.yError2));\n}\nexport function errorBarParams(spec, compositeMark, config) {\n var _a;\n // TODO: use selection\n const { mark, encoding, params, projection: _p } = spec, outerSpec = __rest(spec, [\"mark\", \"encoding\", \"params\", \"projection\"]);\n const markDef = isMarkDef(mark) ? mark : { type: mark };\n // TODO(https://github.com/vega/vega-lite/issues/3702): add selection support\n if (params) {\n log.warn(log.message.selectionNotSupported(compositeMark));\n }\n const { orient, inputType } = errorBarOrientAndInputType(spec, compositeMark);\n const { continuousAxisChannelDef, continuousAxisChannelDef2, continuousAxisChannelDefError, continuousAxisChannelDefError2, continuousAxis } = compositeMarkContinuousAxis(spec, orient, compositeMark);\n const { errorBarSpecificAggregate, postAggregateCalculates, tooltipSummary, tooltipTitleWithFieldName } = errorBarAggregationAndCalculation(markDef, continuousAxisChannelDef, continuousAxisChannelDef2, continuousAxisChannelDefError, continuousAxisChannelDefError2, inputType, compositeMark, config);\n const _b = encoding, _c = continuousAxis, oldContinuousAxisChannelDef = _b[_c], _d = continuousAxis === 'x' ? 'x2' : 'y2', oldContinuousAxisChannelDef2 = _b[_d], _e = continuousAxis === 'x' ? 'xError' : 'yError', oldContinuousAxisChannelDefError = _b[_e], _f = continuousAxis === 'x' ? 'xError2' : 'yError2', oldContinuousAxisChannelDefError2 = _b[_f], oldEncodingWithoutContinuousAxis = __rest(_b, [typeof _c === \"symbol\" ? _c : _c + \"\", typeof _d === \"symbol\" ? _d : _d + \"\", typeof _e === \"symbol\" ? _e : _e + \"\", typeof _f === \"symbol\" ? _f : _f + \"\"]);\n const { bins, timeUnits, aggregate: oldAggregate, groupby: oldGroupBy, encoding: encodingWithoutContinuousAxis } = extractTransformsFromEncoding(oldEncodingWithoutContinuousAxis, config);\n const aggregate = [...oldAggregate, ...errorBarSpecificAggregate];\n const groupby = inputType !== 'raw' ? [] : oldGroupBy;\n const tooltipEncoding = getCompositeMarkTooltip(tooltipSummary, continuousAxisChannelDef, encodingWithoutContinuousAxis, tooltipTitleWithFieldName);\n return {\n transform: [\n ...((_a = outerSpec.transform) !== null && _a !== void 0 ? _a : []),\n ...bins,\n ...timeUnits,\n ...(aggregate.length === 0 ? [] : [{ aggregate, groupby }]),\n ...postAggregateCalculates\n ],\n groupby,\n continuousAxisChannelDef,\n continuousAxis,\n encodingWithoutContinuousAxis,\n ticksOrient: orient === 'vertical' ? 'horizontal' : 'vertical',\n markDef,\n outerSpec,\n tooltipEncoding\n };\n}\nfunction errorBarAggregationAndCalculation(markDef, continuousAxisChannelDef, continuousAxisChannelDef2, continuousAxisChannelDefError, continuousAxisChannelDefError2, inputType, compositeMark, config) {\n let errorBarSpecificAggregate = [];\n let postAggregateCalculates = [];\n const continuousFieldName = continuousAxisChannelDef.field;\n let tooltipSummary;\n let tooltipTitleWithFieldName = false;\n if (inputType === 'raw') {\n const center = markDef.center\n ? markDef.center\n : markDef.extent\n ? markDef.extent === 'iqr'\n ? 'median'\n : 'mean'\n : config.errorbar.center;\n const extent = markDef.extent ? markDef.extent : center === 'mean' ? 'stderr' : 'iqr';\n if ((center === 'median') !== (extent === 'iqr')) {\n log.warn(log.message.errorBarCenterIsUsedWithWrongExtent(center, extent, compositeMark));\n }\n if (extent === 'stderr' || extent === 'stdev') {\n errorBarSpecificAggregate = [\n { op: extent, field: continuousFieldName, as: `extent_${continuousFieldName}` },\n { op: center, field: continuousFieldName, as: `center_${continuousFieldName}` }\n ];\n postAggregateCalculates = [\n {\n calculate: `datum[\"center_${continuousFieldName}\"] + datum[\"extent_${continuousFieldName}\"]`,\n as: `upper_${continuousFieldName}`\n },\n {\n calculate: `datum[\"center_${continuousFieldName}\"] - datum[\"extent_${continuousFieldName}\"]`,\n as: `lower_${continuousFieldName}`\n }\n ];\n tooltipSummary = [\n { fieldPrefix: 'center_', titlePrefix: titleCase(center) },\n { fieldPrefix: 'upper_', titlePrefix: getTitlePrefix(center, extent, '+') },\n { fieldPrefix: 'lower_', titlePrefix: getTitlePrefix(center, extent, '-') }\n ];\n tooltipTitleWithFieldName = true;\n }\n else {\n let centerOp;\n let lowerExtentOp;\n let upperExtentOp;\n if (extent === 'ci') {\n centerOp = 'mean';\n lowerExtentOp = 'ci0';\n upperExtentOp = 'ci1';\n }\n else {\n centerOp = 'median';\n lowerExtentOp = 'q1';\n upperExtentOp = 'q3';\n }\n errorBarSpecificAggregate = [\n { op: lowerExtentOp, field: continuousFieldName, as: `lower_${continuousFieldName}` },\n { op: upperExtentOp, field: continuousFieldName, as: `upper_${continuousFieldName}` },\n { op: centerOp, field: continuousFieldName, as: `center_${continuousFieldName}` }\n ];\n tooltipSummary = [\n {\n fieldPrefix: 'upper_',\n titlePrefix: title({ field: continuousFieldName, aggregate: upperExtentOp, type: 'quantitative' }, config, {\n allowDisabling: false\n })\n },\n {\n fieldPrefix: 'lower_',\n titlePrefix: title({ field: continuousFieldName, aggregate: lowerExtentOp, type: 'quantitative' }, config, {\n allowDisabling: false\n })\n },\n {\n fieldPrefix: 'center_',\n titlePrefix: title({ field: continuousFieldName, aggregate: centerOp, type: 'quantitative' }, config, {\n allowDisabling: false\n })\n }\n ];\n }\n }\n else {\n if (markDef.center || markDef.extent) {\n log.warn(log.message.errorBarCenterAndExtentAreNotNeeded(markDef.center, markDef.extent));\n }\n if (inputType === 'aggregated-upper-lower') {\n tooltipSummary = [];\n postAggregateCalculates = [\n { calculate: `datum[\"${continuousAxisChannelDef2.field}\"]`, as: `upper_${continuousFieldName}` },\n { calculate: `datum[\"${continuousFieldName}\"]`, as: `lower_${continuousFieldName}` }\n ];\n }\n else if (inputType === 'aggregated-error') {\n tooltipSummary = [{ fieldPrefix: '', titlePrefix: continuousFieldName }];\n postAggregateCalculates = [\n {\n calculate: `datum[\"${continuousFieldName}\"] + datum[\"${continuousAxisChannelDefError.field}\"]`,\n as: `upper_${continuousFieldName}`\n }\n ];\n if (continuousAxisChannelDefError2) {\n postAggregateCalculates.push({\n calculate: `datum[\"${continuousFieldName}\"] + datum[\"${continuousAxisChannelDefError2.field}\"]`,\n as: `lower_${continuousFieldName}`\n });\n }\n else {\n postAggregateCalculates.push({\n calculate: `datum[\"${continuousFieldName}\"] - datum[\"${continuousAxisChannelDefError.field}\"]`,\n as: `lower_${continuousFieldName}`\n });\n }\n }\n for (const postAggregateCalculate of postAggregateCalculates) {\n tooltipSummary.push({\n fieldPrefix: postAggregateCalculate.as.substring(0, 6),\n titlePrefix: replaceAll(replaceAll(postAggregateCalculate.calculate, 'datum[\"', ''), '\"]', '')\n });\n }\n }\n return { postAggregateCalculates, errorBarSpecificAggregate, tooltipSummary, tooltipTitleWithFieldName };\n}\nfunction getTitlePrefix(center, extent, operation) {\n return `${titleCase(center)} ${operation} ${extent}`;\n}\n//# sourceMappingURL=errorbar.js.map","import { normalizeEncoding } from '../encoding';\nimport * as log from '../log';\nimport { CompositeMarkNormalizer } from './base';\nimport { makeCompositeAggregatePartFactory } from './common';\nimport { errorBarParams } from './errorbar';\nexport const ERRORBAND = 'errorband';\nexport const ERRORBAND_PARTS = ['band', 'borders'];\nexport const errorBandNormalizer = new CompositeMarkNormalizer(ERRORBAND, normalizeErrorBand);\nexport function normalizeErrorBand(spec, { config }) {\n // Need to initEncoding first so we can infer type\n spec = Object.assign(Object.assign({}, spec), { encoding: normalizeEncoding(spec.encoding, config) });\n const { transform, continuousAxisChannelDef, continuousAxis, encodingWithoutContinuousAxis, markDef, outerSpec, tooltipEncoding } = errorBarParams(spec, ERRORBAND, config);\n const errorBandDef = markDef;\n const makeErrorBandPart = makeCompositeAggregatePartFactory(errorBandDef, continuousAxis, continuousAxisChannelDef, encodingWithoutContinuousAxis, config.errorband);\n const is2D = spec.encoding.x !== undefined && spec.encoding.y !== undefined;\n let bandMark = { type: is2D ? 'area' : 'rect' };\n let bordersMark = { type: is2D ? 'line' : 'rule' };\n const interpolate = Object.assign(Object.assign({}, (errorBandDef.interpolate ? { interpolate: errorBandDef.interpolate } : {})), (errorBandDef.tension && errorBandDef.interpolate ? { tension: errorBandDef.tension } : {}));\n if (is2D) {\n bandMark = Object.assign(Object.assign(Object.assign({}, bandMark), interpolate), { ariaRoleDescription: 'errorband' });\n bordersMark = Object.assign(Object.assign(Object.assign({}, bordersMark), interpolate), { aria: false });\n }\n else if (errorBandDef.interpolate) {\n log.warn(log.message.errorBand1DNotSupport('interpolate'));\n }\n else if (errorBandDef.tension) {\n log.warn(log.message.errorBand1DNotSupport('tension'));\n }\n return Object.assign(Object.assign({}, outerSpec), { transform, layer: [\n ...makeErrorBandPart({\n partName: 'band',\n mark: bandMark,\n positionPrefix: 'lower',\n endPositionPrefix: 'upper',\n extraEncoding: tooltipEncoding\n }),\n ...makeErrorBandPart({\n partName: 'borders',\n mark: bordersMark,\n positionPrefix: 'lower',\n extraEncoding: tooltipEncoding\n }),\n ...makeErrorBandPart({\n partName: 'borders',\n mark: bordersMark,\n positionPrefix: 'upper',\n extraEncoding: tooltipEncoding\n })\n ] });\n}\n//# sourceMappingURL=errorband.js.map","import { keys } from '../util';\nimport { CompositeMarkNormalizer } from './base';\nimport { BOXPLOT, BOXPLOT_PARTS, normalizeBoxPlot } from './boxplot';\nimport { ERRORBAND, ERRORBAND_PARTS, normalizeErrorBand } from './errorband';\nimport { ERRORBAR, ERRORBAR_PARTS, normalizeErrorBar } from './errorbar';\n/**\n * Registry index for all composite mark's normalizer\n */\nconst compositeMarkRegistry = {};\nexport function add(mark, run, parts) {\n const normalizer = new CompositeMarkNormalizer(mark, run);\n compositeMarkRegistry[mark] = { normalizer, parts };\n}\nexport function remove(mark) {\n delete compositeMarkRegistry[mark];\n}\nexport function getAllCompositeMarks() {\n return keys(compositeMarkRegistry);\n}\nadd(BOXPLOT, normalizeBoxPlot, BOXPLOT_PARTS);\nadd(ERRORBAR, normalizeErrorBar, ERRORBAR_PARTS);\nadd(ERRORBAND, normalizeErrorBand, ERRORBAND_PARTS);\n//# sourceMappingURL=index.js.map","export const VL_ONLY_LEGEND_CONFIG = [\n 'gradientHorizontalMaxLength',\n 'gradientHorizontalMinLength',\n 'gradientVerticalMaxLength',\n 'gradientVerticalMinLength',\n 'unselectedOpacity'\n];\n//# sourceMappingURL=guide.js.map","import { keys } from './util';\nexport const HEADER_TITLE_PROPERTIES_MAP = {\n titleAlign: 'align',\n titleAnchor: 'anchor',\n titleAngle: 'angle',\n titleBaseline: 'baseline',\n titleColor: 'color',\n titleFont: 'font',\n titleFontSize: 'fontSize',\n titleFontStyle: 'fontStyle',\n titleFontWeight: 'fontWeight',\n titleLimit: 'limit',\n titleLineHeight: 'lineHeight',\n titleOrient: 'orient',\n titlePadding: 'offset'\n};\nexport const HEADER_LABEL_PROPERTIES_MAP = {\n labelAlign: 'align',\n labelAnchor: 'anchor',\n labelAngle: 'angle',\n labelBaseline: 'baseline',\n labelColor: 'color',\n labelFont: 'font',\n labelFontSize: 'fontSize',\n labelFontStyle: 'fontStyle',\n labelFontWeight: 'fontWeight',\n labelLimit: 'limit',\n labelLineHeight: 'lineHeight',\n labelOrient: 'orient',\n labelPadding: 'offset'\n};\nexport const HEADER_TITLE_PROPERTIES = keys(HEADER_TITLE_PROPERTIES_MAP);\nexport const HEADER_LABEL_PROPERTIES = keys(HEADER_LABEL_PROPERTIES_MAP);\nconst HEADER_CONFIGS_INDEX = {\n header: 1,\n headerRow: 1,\n headerColumn: 1,\n headerFacet: 1\n};\nexport const HEADER_CONFIGS = keys(HEADER_CONFIGS_INDEX);\n//# sourceMappingURL=header.js.map","import { keys } from './util';\nexport const LEGEND_SCALE_CHANNELS = [\n 'size',\n 'shape',\n 'fill',\n 'stroke',\n 'strokeDash',\n 'strokeWidth',\n 'opacity'\n];\nexport const defaultLegendConfig = {\n gradientHorizontalMaxLength: 200,\n gradientHorizontalMinLength: 100,\n gradientVerticalMaxLength: 200,\n gradientVerticalMinLength: 64,\n unselectedOpacity: 0.35\n};\nexport const COMMON_LEGEND_PROPERTY_INDEX = {\n aria: 1,\n clipHeight: 1,\n columnPadding: 1,\n columns: 1,\n cornerRadius: 1,\n description: 1,\n direction: 1,\n fillColor: 1,\n format: 1,\n formatType: 1,\n gradientLength: 1,\n gradientOpacity: 1,\n gradientStrokeColor: 1,\n gradientStrokeWidth: 1,\n gradientThickness: 1,\n gridAlign: 1,\n labelAlign: 1,\n labelBaseline: 1,\n labelColor: 1,\n labelFont: 1,\n labelFontSize: 1,\n labelFontStyle: 1,\n labelFontWeight: 1,\n labelLimit: 1,\n labelOffset: 1,\n labelOpacity: 1,\n labelOverlap: 1,\n labelPadding: 1,\n labelSeparation: 1,\n legendX: 1,\n legendY: 1,\n offset: 1,\n orient: 1,\n padding: 1,\n rowPadding: 1,\n strokeColor: 1,\n symbolDash: 1,\n symbolDashOffset: 1,\n symbolFillColor: 1,\n symbolLimit: 1,\n symbolOffset: 1,\n symbolOpacity: 1,\n symbolSize: 1,\n symbolStrokeColor: 1,\n symbolStrokeWidth: 1,\n symbolType: 1,\n tickCount: 1,\n tickMinStep: 1,\n title: 1,\n titleAlign: 1,\n titleAnchor: 1,\n titleBaseline: 1,\n titleColor: 1,\n titleFont: 1,\n titleFontSize: 1,\n titleFontStyle: 1,\n titleFontWeight: 1,\n titleLimit: 1,\n titleLineHeight: 1,\n titleOpacity: 1,\n titleOrient: 1,\n titlePadding: 1,\n type: 1,\n values: 1,\n zindex: 1\n};\nexport const LEGEND_PROPERTIES = keys(COMMON_LEGEND_PROPERTY_INDEX);\n//# sourceMappingURL=legend.js.map","import { isObject } from 'vega-util';\nexport const SELECTION_ID = '_vgsid_';\nexport const defaultConfig = {\n point: {\n on: 'click',\n fields: [SELECTION_ID],\n toggle: 'event.shiftKey',\n resolve: 'global',\n clear: 'dblclick'\n },\n interval: {\n on: '[mousedown, window:mouseup] > window:mousemove!',\n encodings: ['x', 'y'],\n translate: '[mousedown, window:mouseup] > window:mousemove!',\n zoom: 'wheel!',\n mark: { fill: '#333', fillOpacity: 0.125, stroke: 'white' },\n resolve: 'global',\n clear: 'dblclick'\n }\n};\nexport function isLegendBinding(bind) {\n return !!bind && (bind === 'legend' || !!bind.legend);\n}\nexport function isLegendStreamBinding(bind) {\n return isLegendBinding(bind) && isObject(bind);\n}\nexport function isSelectionParameter(param) {\n return !!param['select'];\n}\n//# sourceMappingURL=selection.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isSelectionParameter } from './selection';\nexport function assembleParameterSignals(params) {\n const signals = [];\n for (const param of params || []) {\n // Selection parameters are handled separately via assembleSelectionTopLevelSignals\n // and assembleSignals methods registered on the Model.\n if (isSelectionParameter(param))\n continue;\n const { expr, bind } = param, rest = __rest(param, [\"expr\", \"bind\"]);\n if (bind && expr) {\n // Vega's InitSignal -- apply expr to \"init\"\n const signal = Object.assign(Object.assign({}, rest), { bind, init: expr });\n signals.push(signal);\n }\n else {\n const signal = Object.assign(Object.assign(Object.assign({}, rest), (expr ? { update: expr } : {})), (bind ? { bind } : {}));\n signals.push(signal);\n }\n }\n return signals;\n}\n//# sourceMappingURL=parameter.js.map","export function isAnyConcatSpec(spec) {\n return isVConcatSpec(spec) || isHConcatSpec(spec) || isConcatSpec(spec);\n}\nexport function isConcatSpec(spec) {\n return 'concat' in spec;\n}\nexport function isVConcatSpec(spec) {\n return 'vconcat' in spec;\n}\nexport function isHConcatSpec(spec) {\n return 'hconcat' in spec;\n}\n//# sourceMappingURL=concat.js.map","import { isNumber, isObject } from 'vega-util';\nimport { keys } from '../util';\nimport { isConcatSpec, isVConcatSpec } from './concat';\nimport { isFacetMapping, isFacetSpec } from './facet';\nexport function isStep(size) {\n return isObject(size) && size['step'] !== undefined;\n}\nexport function isFrameMixins(o) {\n return o['view'] || o['width'] || o['height'];\n}\nexport const DEFAULT_SPACING = 20;\nconst COMPOSITION_LAYOUT_INDEX = {\n align: 1,\n bounds: 1,\n center: 1,\n columns: 1,\n spacing: 1\n};\nconst COMPOSITION_LAYOUT_PROPERTIES = keys(COMPOSITION_LAYOUT_INDEX);\nexport function extractCompositionLayout(spec, specType, config) {\n var _a, _b;\n const compositionConfig = config[specType];\n const layout = {};\n // Apply config first\n const { spacing: spacingConfig, columns } = compositionConfig;\n if (spacingConfig !== undefined) {\n layout.spacing = spacingConfig;\n }\n if (columns !== undefined) {\n if ((isFacetSpec(spec) && !isFacetMapping(spec.facet)) || isConcatSpec(spec)) {\n layout.columns = columns;\n }\n }\n if (isVConcatSpec(spec)) {\n layout.columns = 1;\n }\n // Then copy properties from the spec\n for (const prop of COMPOSITION_LAYOUT_PROPERTIES) {\n if (spec[prop] !== undefined) {\n if (prop === 'spacing') {\n const spacing = spec[prop];\n layout[prop] = isNumber(spacing)\n ? spacing\n : {\n row: (_a = spacing.row) !== null && _a !== void 0 ? _a : spacingConfig,\n column: (_b = spacing.column) !== null && _b !== void 0 ? _b : spacingConfig\n };\n }\n else {\n layout[prop] = spec[prop];\n }\n }\n }\n return layout;\n}\n//# sourceMappingURL=base.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { writeConfig } from 'vega';\nimport { isObject, mergeConfig } from 'vega-util';\nimport { AXIS_CONFIGS, isConditionalAxisValue } from './axis';\nimport { signalOrValueRefWithCondition, signalRefOrValue } from './compile/common';\nimport { getAllCompositeMarks } from './compositemark';\nimport { replaceExprRef } from './expr';\nimport { VL_ONLY_LEGEND_CONFIG } from './guide';\nimport { HEADER_CONFIGS } from './header';\nimport { defaultLegendConfig } from './legend';\nimport * as mark from './mark';\nimport { MARK_CONFIGS, PRIMITIVE_MARKS, VL_ONLY_MARK_CONFIG_PROPERTIES, VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX } from './mark';\nimport { assembleParameterSignals } from './parameter';\nimport { defaultScaleConfig } from './scale';\nimport { defaultConfig as defaultSelectionConfig } from './selection';\nimport { DEFAULT_SPACING, isStep } from './spec/base';\nimport { extractTitleConfig } from './title';\nimport { duplicate, getFirstDefined, isEmpty, keys, omit } from './util';\nexport function getViewConfigContinuousSize(viewConfig, channel) {\n var _a;\n return (_a = viewConfig[channel]) !== null && _a !== void 0 ? _a : viewConfig[channel === 'width' ? 'continuousWidth' : 'continuousHeight']; // get width/height for backwards compatibility\n}\nexport function getViewConfigDiscreteStep(viewConfig, channel) {\n const size = getViewConfigDiscreteSize(viewConfig, channel);\n return isStep(size) ? size.step : DEFAULT_STEP;\n}\nexport function getViewConfigDiscreteSize(viewConfig, channel) {\n var _a;\n const size = (_a = viewConfig[channel]) !== null && _a !== void 0 ? _a : viewConfig[channel === 'width' ? 'discreteWidth' : 'discreteHeight']; // get width/height for backwards compatibility\n return getFirstDefined(size, { step: viewConfig.step });\n}\nexport const DEFAULT_STEP = 20;\nexport const defaultViewConfig = {\n continuousWidth: 200,\n continuousHeight: 200,\n step: DEFAULT_STEP\n};\nexport function isVgScheme(rangeScheme) {\n return rangeScheme && !!rangeScheme['scheme'];\n}\nexport const defaultConfig = {\n background: 'white',\n padding: 5,\n timeFormat: '%b %d, %Y',\n countTitle: 'Count of Records',\n view: defaultViewConfig,\n mark: mark.defaultMarkConfig,\n arc: {},\n area: {},\n bar: mark.defaultBarConfig,\n circle: {},\n geoshape: {},\n image: {},\n line: {},\n point: {},\n rect: mark.defaultRectConfig,\n rule: { color: 'black' },\n square: {},\n text: { color: 'black' },\n tick: mark.defaultTickConfig,\n trail: {},\n boxplot: {\n size: 14,\n extent: 1.5,\n box: {},\n median: { color: 'white' },\n outliers: {},\n rule: {},\n ticks: null\n },\n errorbar: {\n center: 'mean',\n rule: true,\n ticks: false\n },\n errorband: {\n band: {\n opacity: 0.3\n },\n borders: false\n },\n scale: defaultScaleConfig,\n projection: {},\n legend: defaultLegendConfig,\n header: { titlePadding: 10, labelPadding: 10 },\n headerColumn: {},\n headerRow: {},\n headerFacet: {},\n selection: defaultSelectionConfig,\n style: {},\n title: {},\n facet: { spacing: DEFAULT_SPACING },\n concat: { spacing: DEFAULT_SPACING }\n};\n// Tableau10 color palette, copied from `vegaScale.scheme('tableau10')`\nconst tab10 = [\n '#4c78a8',\n '#f58518',\n '#e45756',\n '#72b7b2',\n '#54a24b',\n '#eeca3b',\n '#b279a2',\n '#ff9da6',\n '#9d755d',\n '#bab0ac'\n];\nexport const DEFAULT_FONT_SIZE = {\n text: 11,\n guideLabel: 10,\n guideTitle: 11,\n groupTitle: 13,\n groupSubtitle: 12\n};\nexport const DEFAULT_COLOR = {\n blue: tab10[0],\n orange: tab10[1],\n red: tab10[2],\n teal: tab10[3],\n green: tab10[4],\n yellow: tab10[5],\n purple: tab10[6],\n pink: tab10[7],\n brown: tab10[8],\n gray0: '#000',\n gray1: '#111',\n gray2: '#222',\n gray3: '#333',\n gray4: '#444',\n gray5: '#555',\n gray6: '#666',\n gray7: '#777',\n gray8: '#888',\n gray9: '#999',\n gray10: '#aaa',\n gray11: '#bbb',\n gray12: '#ccc',\n gray13: '#ddd',\n gray14: '#eee',\n gray15: '#fff'\n};\nexport function colorSignalConfig(color = {}) {\n return {\n signals: [\n {\n name: 'color',\n value: isObject(color) ? Object.assign(Object.assign({}, DEFAULT_COLOR), color) : DEFAULT_COLOR\n }\n ],\n mark: { color: { signal: 'color.blue' } },\n rule: { color: { signal: 'color.gray0' } },\n text: {\n color: { signal: 'color.gray0' }\n },\n style: {\n 'guide-label': {\n fill: { signal: 'color.gray0' }\n },\n 'guide-title': {\n fill: { signal: 'color.gray0' }\n },\n 'group-title': {\n fill: { signal: 'color.gray0' }\n },\n 'group-subtitle': {\n fill: { signal: 'color.gray0' }\n },\n cell: {\n stroke: { signal: 'color.gray8' }\n }\n },\n axis: {\n domainColor: { signal: 'color.gray13' },\n gridColor: { signal: 'color.gray8' },\n tickColor: { signal: 'color.gray13' }\n },\n range: {\n category: [\n { signal: 'color.blue' },\n { signal: 'color.orange' },\n { signal: 'color.red' },\n { signal: 'color.teal' },\n { signal: 'color.green' },\n { signal: 'color.yellow' },\n { signal: 'color.purple' },\n { signal: 'color.pink' },\n { signal: 'color.brown' },\n { signal: 'color.grey8' }\n ]\n }\n };\n}\nexport function fontSizeSignalConfig(fontSize) {\n return {\n signals: [\n {\n name: 'fontSize',\n value: isObject(fontSize) ? Object.assign(Object.assign({}, DEFAULT_FONT_SIZE), fontSize) : DEFAULT_FONT_SIZE\n }\n ],\n text: {\n fontSize: { signal: 'fontSize.text' }\n },\n style: {\n 'guide-label': {\n fontSize: { signal: 'fontSize.guideLabel' }\n },\n 'guide-title': {\n fontSize: { signal: 'fontSize.guideTitle' }\n },\n 'group-title': {\n fontSize: { signal: 'fontSize.groupTitle' }\n },\n 'group-subtitle': {\n fontSize: { signal: 'fontSize.groupSubtitle' }\n }\n }\n };\n}\nexport function fontConfig(font) {\n return {\n text: { font },\n style: {\n 'guide-label': { font },\n 'guide-title': { font },\n 'group-title': { font },\n 'group-subtitle': { font }\n }\n };\n}\nfunction getAxisConfigInternal(axisConfig) {\n const props = keys(axisConfig || {});\n const axisConfigInternal = {};\n for (const prop of props) {\n const val = axisConfig[prop];\n axisConfigInternal[prop] = isConditionalAxisValue(val)\n ? signalOrValueRefWithCondition(val)\n : signalRefOrValue(val);\n }\n return axisConfigInternal;\n}\nfunction getStyleConfigInternal(styleConfig) {\n const props = keys(styleConfig);\n const styleConfigInternal = {};\n for (const prop of props) {\n // We need to cast to cheat a bit here since styleConfig can be either mark config or axis config\n styleConfigInternal[prop] = getAxisConfigInternal(styleConfig[prop]);\n }\n return styleConfigInternal;\n}\nconst configPropsWithExpr = [\n ...MARK_CONFIGS,\n ...AXIS_CONFIGS,\n ...HEADER_CONFIGS,\n 'background',\n 'padding',\n 'legend',\n 'lineBreak',\n 'scale',\n 'style',\n 'title',\n 'view'\n];\n/**\n * Merge specified config with default config and config for the `color` flag,\n * then replace all expressions with signals\n */\nexport function initConfig(specifiedConfig = {}) {\n const { color, font, fontSize, selection } = specifiedConfig, restConfig = __rest(specifiedConfig, [\"color\", \"font\", \"fontSize\", \"selection\"]);\n const mergedConfig = mergeConfig({}, duplicate(defaultConfig), font ? fontConfig(font) : {}, color ? colorSignalConfig(color) : {}, fontSize ? fontSizeSignalConfig(fontSize) : {}, restConfig || {});\n // mergeConfig doesn't recurse and overrides object values.\n if (selection) {\n writeConfig(mergedConfig, 'selection', selection, true);\n }\n const outputConfig = omit(mergedConfig, configPropsWithExpr);\n for (const prop of ['background', 'lineBreak', 'padding']) {\n if (mergedConfig[prop]) {\n outputConfig[prop] = signalRefOrValue(mergedConfig[prop]);\n }\n }\n for (const markConfigType of mark.MARK_CONFIGS) {\n if (mergedConfig[markConfigType]) {\n // FIXME: outputConfig[markConfigType] expects that types are replaced recursively but replaceExprRef only replaces one level deep\n outputConfig[markConfigType] = replaceExprRef(mergedConfig[markConfigType]);\n }\n }\n for (const axisConfigType of AXIS_CONFIGS) {\n if (mergedConfig[axisConfigType]) {\n outputConfig[axisConfigType] = getAxisConfigInternal(mergedConfig[axisConfigType]);\n }\n }\n for (const headerConfigType of HEADER_CONFIGS) {\n if (mergedConfig[headerConfigType]) {\n outputConfig[headerConfigType] = replaceExprRef(mergedConfig[headerConfigType]);\n }\n }\n if (mergedConfig.legend) {\n outputConfig.legend = replaceExprRef(mergedConfig.legend);\n }\n if (mergedConfig.scale) {\n outputConfig.scale = replaceExprRef(mergedConfig.scale);\n }\n if (mergedConfig.style) {\n outputConfig.style = getStyleConfigInternal(mergedConfig.style);\n }\n if (mergedConfig.title) {\n outputConfig.title = replaceExprRef(mergedConfig.title);\n }\n if (mergedConfig.view) {\n outputConfig.view = replaceExprRef(mergedConfig.view);\n }\n return outputConfig;\n}\nconst MARK_STYLES = ['view', ...PRIMITIVE_MARKS];\nconst VL_ONLY_CONFIG_PROPERTIES = [\n 'color',\n 'fontSize',\n 'background',\n 'padding',\n 'facet',\n 'concat',\n 'numberFormat',\n 'timeFormat',\n 'countTitle',\n 'header',\n 'axisQuantitative',\n 'axisTemporal',\n 'axisDiscrete',\n 'axisPoint',\n 'axisXBand',\n 'axisXPoint',\n 'axisXDiscrete',\n 'axisXQuantitative',\n 'axisXTemporal',\n 'axisYBand',\n 'axisYPoint',\n 'axisYDiscrete',\n 'axisYQuantitative',\n 'axisYTemporal',\n 'scale',\n 'selection',\n 'overlay' // FIXME: Redesign and unhide this\n];\nconst VL_ONLY_ALL_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX = Object.assign({ view: ['continuousWidth', 'continuousHeight', 'discreteWidth', 'discreteHeight', 'step'] }, VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX);\nexport function stripAndRedirectConfig(config) {\n config = duplicate(config);\n for (const prop of VL_ONLY_CONFIG_PROPERTIES) {\n delete config[prop];\n }\n if (config.axis) {\n // delete condition axis config\n for (const prop in config.axis) {\n if (isConditionalAxisValue(config.axis[prop])) {\n delete config.axis[prop];\n }\n }\n }\n if (config.legend) {\n for (const prop of VL_ONLY_LEGEND_CONFIG) {\n delete config.legend[prop];\n }\n }\n // Remove Vega-Lite only generic mark config\n if (config.mark) {\n for (const prop of VL_ONLY_MARK_CONFIG_PROPERTIES) {\n delete config.mark[prop];\n }\n if (config.mark.tooltip && isObject(config.mark.tooltip)) {\n delete config.mark.tooltip;\n }\n }\n if (config.params) {\n config.signals = (config.signals || []).concat(assembleParameterSignals(config.params));\n delete config.params;\n }\n for (const markType of MARK_STYLES) {\n // Remove Vega-Lite-only mark config\n for (const prop of VL_ONLY_MARK_CONFIG_PROPERTIES) {\n delete config[markType][prop];\n }\n // Remove Vega-Lite only mark-specific config\n const vlOnlyMarkSpecificConfigs = VL_ONLY_ALL_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX[markType];\n if (vlOnlyMarkSpecificConfigs) {\n for (const prop of vlOnlyMarkSpecificConfigs) {\n delete config[markType][prop];\n }\n }\n // Redirect mark config to config.style so that mark config only affect its own mark type\n // without affecting other marks that share the same underlying Vega marks.\n // For example, config.rect should not affect bar marks.\n redirectConfigToStyleConfig(config, markType);\n }\n for (const m of getAllCompositeMarks()) {\n // Clean up the composite mark config as we don't need them in the output specs anymore\n delete config[m];\n }\n redirectTitleConfig(config);\n // Remove empty config objects.\n for (const prop in config) {\n if (isObject(config[prop]) && isEmpty(config[prop])) {\n delete config[prop];\n }\n }\n return isEmpty(config) ? undefined : config;\n}\n/**\n *\n * Redirect config.title -- so that title config do not affect header labels,\n * which also uses `title` directive to implement.\n *\n * For subtitle configs in config.title, keep them in config.title as header titles never have subtitles.\n */\nfunction redirectTitleConfig(config) {\n const { titleMarkConfig, subtitleMarkConfig, subtitle } = extractTitleConfig(config.title);\n // set config.style if title/subtitleMarkConfig is not an empty object\n if (!isEmpty(titleMarkConfig)) {\n config.style['group-title'] = Object.assign(Object.assign({}, config.style['group-title']), titleMarkConfig // config.title has higher precedence than config.style.group-title in Vega\n );\n }\n if (!isEmpty(subtitleMarkConfig)) {\n config.style['group-subtitle'] = Object.assign(Object.assign({}, config.style['group-subtitle']), subtitleMarkConfig);\n }\n // subtitle part can stay in config.title since header titles do not use subtitle\n if (!isEmpty(subtitle)) {\n config.title = subtitle;\n }\n else {\n delete config.title;\n }\n}\nfunction redirectConfigToStyleConfig(config, prop, // string = composite mark\ntoProp, compositeMarkPart) {\n const propConfig = compositeMarkPart ? config[prop][compositeMarkPart] : config[prop];\n if (prop === 'view') {\n toProp = 'cell'; // View's default style is \"cell\"\n }\n const style = Object.assign(Object.assign({}, propConfig), config.style[toProp !== null && toProp !== void 0 ? toProp : prop]);\n // set config.style if it is not an empty object\n if (!isEmpty(style)) {\n config.style[toProp !== null && toProp !== void 0 ? toProp : prop] = style;\n }\n if (!compositeMarkPart) {\n // For composite mark, so don't delete the whole config yet as we have to do multiple redirections.\n delete config[prop];\n }\n}\n//# sourceMappingURL=config.js.map","export function isLayerSpec(spec) {\n return 'layer' in spec;\n}\n//# sourceMappingURL=layer.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as log from '../log';\nimport { isConcatSpec, isHConcatSpec, isVConcatSpec } from './concat';\nimport { isFacetSpec } from './facet';\nimport { isLayerSpec } from './layer';\nimport { isRepeatSpec } from './repeat';\nimport { isUnitSpec } from './unit';\nexport class SpecMapper {\n map(spec, params) {\n if (isFacetSpec(spec)) {\n return this.mapFacet(spec, params);\n }\n else if (isRepeatSpec(spec)) {\n return this.mapRepeat(spec, params);\n }\n else if (isHConcatSpec(spec)) {\n return this.mapHConcat(spec, params);\n }\n else if (isVConcatSpec(spec)) {\n return this.mapVConcat(spec, params);\n }\n else if (isConcatSpec(spec)) {\n return this.mapConcat(spec, params);\n }\n else {\n return this.mapLayerOrUnit(spec, params);\n }\n }\n mapLayerOrUnit(spec, params) {\n if (isLayerSpec(spec)) {\n return this.mapLayer(spec, params);\n }\n else if (isUnitSpec(spec)) {\n return this.mapUnit(spec, params);\n }\n throw new Error(log.message.invalidSpec(spec));\n }\n mapLayer(spec, params) {\n return Object.assign(Object.assign({}, spec), { layer: spec.layer.map(subspec => this.mapLayerOrUnit(subspec, params)) });\n }\n mapHConcat(spec, params) {\n return Object.assign(Object.assign({}, spec), { hconcat: spec.hconcat.map(subspec => this.map(subspec, params)) });\n }\n mapVConcat(spec, params) {\n return Object.assign(Object.assign({}, spec), { vconcat: spec.vconcat.map(subspec => this.map(subspec, params)) });\n }\n mapConcat(spec, params) {\n const { concat } = spec, rest = __rest(spec, [\"concat\"]);\n return Object.assign(Object.assign({}, rest), { concat: concat.map(subspec => this.map(subspec, params)) });\n }\n mapFacet(spec, params) {\n return Object.assign(Object.assign({}, spec), { \n // TODO: remove \"any\" once we support all facet listed in https://github.com/vega/vega-lite/issues/2760\n spec: this.map(spec.spec, params) });\n }\n mapRepeat(spec, params) {\n return Object.assign(Object.assign({}, spec), { \n // as any is required here since TS cannot infer that the output type satisfies the input type\n spec: this.map(spec.spec, params) });\n }\n}\n//# sourceMappingURL=map.js.map","import { isArray } from 'vega-util';\nexport function isRepeatSpec(spec) {\n return 'repeat' in spec;\n}\nexport function isLayerRepeatSpec(spec) {\n return !isArray(spec.repeat) && spec.repeat['layer'];\n}\n//# sourceMappingURL=repeat.js.map","import { array, isBoolean } from 'vega-util';\nimport { SUM_OPS } from './aggregate';\nimport { getSecondaryRangeChannel, NONPOSITION_CHANNELS } from './channel';\nimport { channelDefType, getFieldDef, isFieldDef, isFieldOrDatumDef, vgField } from './channeldef';\nimport { channelHasField, isAggregate } from './encoding';\nimport * as log from './log';\nimport { ARC, AREA, BAR, CIRCLE, isMarkDef, isPathMark, LINE, POINT, RULE, SQUARE, TEXT, TICK } from './mark';\nimport { ScaleType } from './scale';\nimport { contains } from './util';\nconst STACK_OFFSET_INDEX = {\n zero: 1,\n center: 1,\n normalize: 1\n};\nexport function isStackOffset(s) {\n return s in STACK_OFFSET_INDEX;\n}\nexport const STACKABLE_MARKS = new Set([ARC, BAR, AREA, RULE, POINT, CIRCLE, SQUARE, LINE, TEXT, TICK]);\nexport const STACK_BY_DEFAULT_MARKS = new Set([BAR, AREA, ARC]);\nfunction isUnbinnedQuantitative(channelDef) {\n return isFieldDef(channelDef) && channelDefType(channelDef) === 'quantitative' && !channelDef.bin;\n}\nfunction potentialStackedChannel(encoding, x) {\n var _a, _b;\n const y = x === 'x' ? 'y' : 'radius';\n const xDef = encoding[x];\n const yDef = encoding[y];\n if (isFieldDef(xDef) && isFieldDef(yDef)) {\n if (isUnbinnedQuantitative(xDef) && isUnbinnedQuantitative(yDef)) {\n if (xDef.stack) {\n return x;\n }\n else if (yDef.stack) {\n return y;\n }\n const xAggregate = isFieldDef(xDef) && !!xDef.aggregate;\n const yAggregate = isFieldDef(yDef) && !!yDef.aggregate;\n // if there is no explicit stacking, only apply stack if there is only one aggregate for x or y\n if (xAggregate !== yAggregate) {\n return xAggregate ? x : y;\n }\n else {\n const xScale = (_a = xDef.scale) === null || _a === void 0 ? void 0 : _a.type;\n const yScale = (_b = yDef.scale) === null || _b === void 0 ? void 0 : _b.type;\n if (xScale && xScale !== 'linear') {\n return y;\n }\n else if (yScale && yScale !== 'linear') {\n return x;\n }\n }\n }\n else if (isUnbinnedQuantitative(xDef)) {\n return x;\n }\n else if (isUnbinnedQuantitative(yDef)) {\n return y;\n }\n }\n else if (isUnbinnedQuantitative(xDef)) {\n return x;\n }\n else if (isUnbinnedQuantitative(yDef)) {\n return y;\n }\n return undefined;\n}\nfunction getDimensionChannel(channel) {\n switch (channel) {\n case 'x':\n return 'y';\n case 'y':\n return 'x';\n case 'theta':\n return 'radius';\n case 'radius':\n return 'theta';\n }\n}\n// Note: CompassQL uses this method and only pass in required properties of each argument object.\n// If required properties change, make sure to update CompassQL.\nexport function stack(m, encoding, opt = {}) {\n var _a, _b;\n const mark = isMarkDef(m) ? m.type : m;\n // Should have stackable mark\n if (!STACKABLE_MARKS.has(mark)) {\n return null;\n }\n // Run potential stacked twice, one for Cartesian and another for Polar,\n // so text marks can be stacked in any of the coordinates.\n // Note: The logic here is not perfectly correct. If we want to support stacked dot plots where each dot is a pie chart with label, we have to change the stack logic here to separate Cartesian stacking for polar stacking.\n // However, since we probably never want to do that, let's just note the limitation here.\n const fieldChannel = potentialStackedChannel(encoding, 'x') || potentialStackedChannel(encoding, 'theta');\n if (!fieldChannel) {\n return null;\n }\n const stackedFieldDef = encoding[fieldChannel];\n const stackedField = isFieldDef(stackedFieldDef) ? vgField(stackedFieldDef, {}) : undefined;\n let dimensionChannel = getDimensionChannel(fieldChannel);\n let dimensionDef = encoding[dimensionChannel];\n let dimensionField = isFieldDef(dimensionDef) ? vgField(dimensionDef, {}) : undefined;\n // avoid grouping by the stacked field\n if (dimensionField === stackedField) {\n dimensionField = undefined;\n dimensionDef = undefined;\n dimensionChannel = undefined;\n }\n // Should have grouping level of detail that is different from the dimension field\n const stackBy = NONPOSITION_CHANNELS.reduce((sc, channel) => {\n // Ignore tooltip in stackBy (https://github.com/vega/vega-lite/issues/4001)\n if (channel !== 'tooltip' && channelHasField(encoding, channel)) {\n const channelDef = encoding[channel];\n for (const cDef of array(channelDef)) {\n const fieldDef = getFieldDef(cDef);\n if (fieldDef.aggregate) {\n continue;\n }\n // Check whether the channel's field is identical to x/y's field or if the channel is a repeat\n const f = vgField(fieldDef, {});\n if (\n // if fielddef is a repeat, just include it in the stack by\n !f ||\n // otherwise, the field must be different from x and y fields.\n f !== dimensionField) {\n sc.push({ channel, fieldDef });\n }\n }\n }\n return sc;\n }, []);\n // Automatically determine offset\n let offset;\n if (stackedFieldDef.stack !== undefined) {\n if (isBoolean(stackedFieldDef.stack)) {\n offset = stackedFieldDef.stack ? 'zero' : null;\n }\n else {\n offset = stackedFieldDef.stack;\n }\n }\n else if (STACK_BY_DEFAULT_MARKS.has(mark)) {\n offset = 'zero';\n }\n if (!offset || !isStackOffset(offset)) {\n return null;\n }\n if (isAggregate(encoding) && stackBy.length === 0) {\n return null;\n }\n // warn when stacking non-linear\n if (((_a = stackedFieldDef === null || stackedFieldDef === void 0 ? void 0 : stackedFieldDef.scale) === null || _a === void 0 ? void 0 : _a.type) && ((_b = stackedFieldDef === null || stackedFieldDef === void 0 ? void 0 : stackedFieldDef.scale) === null || _b === void 0 ? void 0 : _b.type) !== ScaleType.LINEAR) {\n if (opt.disallowNonLinearStack) {\n return null;\n }\n else {\n log.warn(log.message.cannotStackNonLinearScale(stackedFieldDef.scale.type));\n }\n }\n // Check if it is a ranged mark\n if (isFieldOrDatumDef(encoding[getSecondaryRangeChannel(fieldChannel)])) {\n if (stackedFieldDef.stack !== undefined) {\n log.warn(log.message.cannotStackRangedMark(fieldChannel));\n }\n return null;\n }\n // Warn if stacking non-summative aggregate\n if (isFieldDef(stackedFieldDef) && stackedFieldDef.aggregate && !contains(SUM_OPS, stackedFieldDef.aggregate)) {\n log.warn(log.message.stackNonSummativeAggregate(stackedFieldDef.aggregate));\n }\n return {\n groupbyChannel: dimensionDef ? dimensionChannel : undefined,\n groupbyField: dimensionField,\n fieldChannel,\n impute: stackedFieldDef.impute === null ? false : isPathMark(mark),\n stackBy,\n offset\n };\n}\n//# sourceMappingURL=stack.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isObject } from 'vega-util';\nimport { normalizeEncoding } from '../encoding';\nimport { isMarkDef } from '../mark';\nimport { isUnitSpec } from '../spec/unit';\nimport { stack } from '../stack';\nimport { keys, omit, pick } from '../util';\nfunction dropLineAndPoint(markDef) {\n const { point: _point, line: _line } = markDef, mark = __rest(markDef, [\"point\", \"line\"]);\n return keys(mark).length > 1 ? mark : mark.type;\n}\nfunction dropLineAndPointFromConfig(config) {\n for (const mark of ['line', 'area', 'rule', 'trail']) {\n if (config[mark]) {\n config = Object.assign(Object.assign({}, config), { \n // TODO: remove as any\n [mark]: omit(config[mark], ['point', 'line']) });\n }\n }\n return config;\n}\nfunction getPointOverlay(markDef, markConfig = {}, encoding) {\n if (markDef.point === 'transparent') {\n return { opacity: 0 };\n }\n else if (markDef.point) {\n // truthy : true or object\n return isObject(markDef.point) ? markDef.point : {};\n }\n else if (markDef.point !== undefined) {\n // false or null\n return null;\n }\n else {\n // undefined (not disabled)\n if (markConfig.point || encoding.shape) {\n // enable point overlay if config[mark].point is truthy or if encoding.shape is provided\n return isObject(markConfig.point) ? markConfig.point : {};\n }\n // markDef.point is defined as falsy\n return undefined;\n }\n}\nfunction getLineOverlay(markDef, markConfig = {}) {\n if (markDef.line) {\n // true or object\n return markDef.line === true ? {} : markDef.line;\n }\n else if (markDef.line !== undefined) {\n // false or null\n return null;\n }\n else {\n // undefined (not disabled)\n if (markConfig.line) {\n // enable line overlay if config[mark].line is truthy\n return markConfig.line === true ? {} : markConfig.line;\n }\n // markDef.point is defined as falsy\n return undefined;\n }\n}\nexport class PathOverlayNormalizer {\n constructor() {\n this.name = 'path-overlay';\n }\n hasMatchingType(spec, config) {\n if (isUnitSpec(spec)) {\n const { mark, encoding } = spec;\n const markDef = isMarkDef(mark) ? mark : { type: mark };\n switch (markDef.type) {\n case 'line':\n case 'rule':\n case 'trail':\n return !!getPointOverlay(markDef, config[markDef.type], encoding);\n case 'area':\n return (\n // false / null are also included as we want to remove the properties\n !!getPointOverlay(markDef, config[markDef.type], encoding) ||\n !!getLineOverlay(markDef, config[markDef.type]));\n }\n }\n return false;\n }\n run(spec, normParams, normalize) {\n const { config } = normParams;\n const { params, projection, mark, encoding: e } = spec, outerSpec = __rest(spec, [\"params\", \"projection\", \"mark\", \"encoding\"]);\n // Need to call normalizeEncoding because we need the inferred types to correctly determine stack\n const encoding = normalizeEncoding(e, config);\n const markDef = isMarkDef(mark) ? mark : { type: mark };\n const pointOverlay = getPointOverlay(markDef, config[markDef.type], encoding);\n const lineOverlay = markDef.type === 'area' && getLineOverlay(markDef, config[markDef.type]);\n const layer = [\n Object.assign(Object.assign({}, (params ? { params } : {})), { mark: dropLineAndPoint(Object.assign(Object.assign({}, (markDef.type === 'area' && markDef.opacity === undefined && markDef.fillOpacity === undefined\n ? { opacity: 0.7 }\n : {})), markDef)), \n // drop shape from encoding as this might be used to trigger point overlay\n encoding: omit(encoding, ['shape']) })\n ];\n // FIXME: determine rules for applying selections.\n // Need to copy stack config to overlayed layer\n const stackProps = stack(markDef, encoding);\n let overlayEncoding = encoding;\n if (stackProps) {\n const { fieldChannel: stackFieldChannel, offset } = stackProps;\n overlayEncoding = Object.assign(Object.assign({}, encoding), { [stackFieldChannel]: Object.assign(Object.assign({}, encoding[stackFieldChannel]), (offset ? { stack: offset } : {})) });\n }\n if (lineOverlay) {\n layer.push(Object.assign(Object.assign({}, (projection ? { projection } : {})), { mark: Object.assign(Object.assign({ type: 'line' }, pick(markDef, ['clip', 'interpolate', 'tension', 'tooltip'])), lineOverlay), encoding: overlayEncoding }));\n }\n if (pointOverlay) {\n layer.push(Object.assign(Object.assign({}, (projection ? { projection } : {})), { mark: Object.assign(Object.assign({ type: 'point', opacity: 1, filled: true }, pick(markDef, ['clip', 'tooltip'])), pointOverlay), encoding: overlayEncoding }));\n }\n return normalize(Object.assign(Object.assign({}, outerSpec), { layer }), Object.assign(Object.assign({}, normParams), { config: dropLineAndPointFromConfig(config) }));\n }\n}\n//# sourceMappingURL=pathoverlay.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { hasOwnProperty, isArray } from 'vega-util';\nimport { hasConditionalFieldOrDatumDef, isConditionalDef, isFieldDef, isFieldOrDatumDef, isRepeatRef, isSortableFieldDef } from '../channeldef';\nimport * as log from '../log';\nimport { isSortField } from '../sort';\nimport { isFacetMapping } from '../spec/facet';\nexport function replaceRepeaterInFacet(facet, repeater) {\n if (!repeater) {\n return facet;\n }\n if (isFacetMapping(facet)) {\n return replaceRepeaterInMapping(facet, repeater);\n }\n return replaceRepeaterInFieldDef(facet, repeater);\n}\nexport function replaceRepeaterInEncoding(encoding, repeater) {\n if (!repeater) {\n return encoding;\n }\n return replaceRepeaterInMapping(encoding, repeater);\n}\n/**\n * Replaces repeated value and returns if the repeated value is valid.\n */\nfunction replaceRepeatInProp(prop, o, repeater) {\n const val = o[prop];\n if (isRepeatRef(val)) {\n if (val.repeat in repeater) {\n return Object.assign(Object.assign({}, o), { [prop]: repeater[val.repeat] });\n }\n else {\n log.warn(log.message.noSuchRepeatedValue(val.repeat));\n return undefined;\n }\n }\n return o;\n}\n/**\n * Replace repeater values in a field def with the concrete field name.\n */\nfunction replaceRepeaterInFieldDef(fieldDef, repeater) {\n fieldDef = replaceRepeatInProp('field', fieldDef, repeater);\n if (fieldDef === undefined) {\n // the field def should be ignored\n return undefined;\n }\n else if (fieldDef === null) {\n return null;\n }\n if (isSortableFieldDef(fieldDef) && isSortField(fieldDef.sort)) {\n const sort = replaceRepeatInProp('field', fieldDef.sort, repeater);\n fieldDef = Object.assign(Object.assign({}, fieldDef), (sort ? { sort } : {}));\n }\n return fieldDef;\n}\nfunction replaceRepeaterInFieldOrDatumDef(def, repeater) {\n if (isFieldDef(def)) {\n return replaceRepeaterInFieldDef(def, repeater);\n }\n else {\n const datumDef = replaceRepeatInProp('datum', def, repeater);\n if (datumDef !== def && !datumDef.type) {\n datumDef.type = 'nominal';\n }\n return datumDef;\n }\n}\nfunction replaceRepeaterInChannelDef(channelDef, repeater) {\n if (isFieldOrDatumDef(channelDef)) {\n const fd = replaceRepeaterInFieldOrDatumDef(channelDef, repeater);\n if (fd) {\n return fd;\n }\n else if (isConditionalDef(channelDef)) {\n return { condition: channelDef.condition };\n }\n }\n else {\n if (hasConditionalFieldOrDatumDef(channelDef)) {\n const fd = replaceRepeaterInFieldOrDatumDef(channelDef.condition, repeater);\n if (fd) {\n return Object.assign(Object.assign({}, channelDef), { condition: fd });\n }\n else {\n const { condition } = channelDef, channelDefWithoutCondition = __rest(channelDef, [\"condition\"]);\n return channelDefWithoutCondition;\n }\n }\n return channelDef;\n }\n return undefined;\n}\nfunction replaceRepeaterInMapping(mapping, repeater) {\n const out = {};\n for (const channel in mapping) {\n if (hasOwnProperty(mapping, channel)) {\n const channelDef = mapping[channel];\n if (isArray(channelDef)) {\n // array cannot have condition\n out[channel] = channelDef // somehow we need to cast it here\n .map(cd => replaceRepeaterInChannelDef(cd, repeater))\n .filter(cd => cd);\n }\n else {\n const cd = replaceRepeaterInChannelDef(channelDef, repeater);\n if (cd !== undefined) {\n out[channel] = cd;\n }\n }\n }\n }\n return out;\n}\n//# sourceMappingURL=repeater.js.map","import { isObject } from 'vega-util';\nimport { isBinned } from '../bin';\nimport { getMainRangeChannel, SECONDARY_RANGE_CHANNEL } from '../channel';\nimport { isDatumDef, isFieldDef } from '../channeldef';\nimport * as log from '../log';\nimport { isMarkDef } from '../mark';\nimport { isUnitSpec } from '../spec/unit';\nexport class RuleForRangedLineNormalizer {\n constructor() {\n this.name = 'RuleForRangedLine';\n }\n hasMatchingType(spec) {\n if (isUnitSpec(spec)) {\n const { encoding, mark } = spec;\n if (mark === 'line' || (isMarkDef(mark) && mark.type === 'line')) {\n for (const channel of SECONDARY_RANGE_CHANNEL) {\n const mainChannel = getMainRangeChannel(channel);\n const mainChannelDef = encoding[mainChannel];\n if (encoding[channel]) {\n if ((isFieldDef(mainChannelDef) && !isBinned(mainChannelDef.bin)) || isDatumDef(mainChannelDef)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n run(spec, params, normalize) {\n const { encoding, mark } = spec;\n log.warn(log.message.lineWithRange(!!encoding.x2, !!encoding.y2));\n return normalize(Object.assign(Object.assign({}, spec), { mark: isObject(mark) ? Object.assign(Object.assign({}, mark), { type: 'rule' }) : 'rule' }), params);\n }\n}\n//# sourceMappingURL=ruleforrangedline.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isArray } from 'vega-util';\nimport { COLUMN, FACET, ROW } from '../channel';\nimport { hasConditionalFieldOrDatumDef, isFieldOrDatumDef, isValueDef } from '../channeldef';\nimport { boxPlotNormalizer } from '../compositemark/boxplot';\nimport { errorBandNormalizer } from '../compositemark/errorband';\nimport { errorBarNormalizer } from '../compositemark/errorbar';\nimport { channelHasField } from '../encoding';\nimport * as log from '../log';\nimport { isFacetMapping } from '../spec/facet';\nimport { SpecMapper } from '../spec/map';\nimport { isLayerRepeatSpec } from '../spec/repeat';\nimport { isUnitSpec } from '../spec/unit';\nimport { isEmpty, keys, omit, varName } from '../util';\nimport { isSignalRef } from '../vega.schema';\nimport { PathOverlayNormalizer } from './pathoverlay';\nimport { replaceRepeaterInEncoding, replaceRepeaterInFacet } from './repeater';\nimport { RuleForRangedLineNormalizer } from './ruleforrangedline';\nexport class CoreNormalizer extends SpecMapper {\n constructor() {\n super(...arguments);\n this.nonFacetUnitNormalizers = [\n boxPlotNormalizer,\n errorBarNormalizer,\n errorBandNormalizer,\n new PathOverlayNormalizer(),\n new RuleForRangedLineNormalizer()\n ];\n }\n map(spec, params) {\n // Special handling for a faceted unit spec as it can return a facet spec, not just a layer or unit spec like a normal unit spec.\n if (isUnitSpec(spec)) {\n const hasRow = channelHasField(spec.encoding, ROW);\n const hasColumn = channelHasField(spec.encoding, COLUMN);\n const hasFacet = channelHasField(spec.encoding, FACET);\n if (hasRow || hasColumn || hasFacet) {\n return this.mapFacetedUnit(spec, params);\n }\n }\n return super.map(spec, params);\n }\n // This is for normalizing non-facet unit\n mapUnit(spec, params) {\n const { parentEncoding, parentProjection } = params;\n const encoding = replaceRepeaterInEncoding(spec.encoding, params.repeater);\n const specWithReplacedEncoding = Object.assign(Object.assign({}, spec), (encoding ? { encoding } : {}));\n if (parentEncoding || parentProjection) {\n return this.mapUnitWithParentEncodingOrProjection(specWithReplacedEncoding, params);\n }\n const normalizeLayerOrUnit = this.mapLayerOrUnit.bind(this);\n for (const unitNormalizer of this.nonFacetUnitNormalizers) {\n if (unitNormalizer.hasMatchingType(specWithReplacedEncoding, params.config)) {\n return unitNormalizer.run(specWithReplacedEncoding, params, normalizeLayerOrUnit);\n }\n }\n return specWithReplacedEncoding;\n }\n mapRepeat(spec, params) {\n if (isLayerRepeatSpec(spec)) {\n return this.mapLayerRepeat(spec, params);\n }\n else {\n return this.mapNonLayerRepeat(spec, params);\n }\n }\n mapLayerRepeat(spec, params) {\n const { repeat, spec: childSpec } = spec, rest = __rest(spec, [\"repeat\", \"spec\"]);\n const { row, column, layer } = repeat;\n const { repeater = {}, repeaterPrefix = '' } = params;\n if (row || column) {\n return this.mapRepeat(Object.assign(Object.assign({}, spec), { repeat: Object.assign(Object.assign({}, (row ? { row } : {})), (column ? { column } : {})), spec: {\n repeat: { layer },\n spec: childSpec\n } }), params);\n }\n else {\n return Object.assign(Object.assign({}, rest), { layer: layer.map(layerValue => {\n const childRepeater = Object.assign(Object.assign({}, repeater), { layer: layerValue });\n const childName = `${(childSpec.name || '') + repeaterPrefix}child__layer_${varName(layerValue)}`;\n const child = this.mapLayerOrUnit(childSpec, Object.assign(Object.assign({}, params), { repeater: childRepeater, repeaterPrefix: childName }));\n child.name = childName;\n return child;\n }) });\n }\n }\n mapNonLayerRepeat(spec, params) {\n var _a;\n const { repeat, spec: childSpec, data } = spec, remainingProperties = __rest(spec, [\"repeat\", \"spec\", \"data\"]);\n if (!isArray(repeat) && spec.columns) {\n // is repeat with row/column\n spec = omit(spec, ['columns']);\n log.warn(log.message.columnsNotSupportByRowCol('repeat'));\n }\n const concat = [];\n const { repeater = {}, repeaterPrefix = '' } = params;\n const row = (!isArray(repeat) && repeat.row) || [repeater ? repeater.row : null];\n const column = (!isArray(repeat) && repeat.column) || [repeater ? repeater.column : null];\n const repeatValues = (isArray(repeat) && repeat) || [repeater ? repeater.repeat : null];\n // cross product\n for (const repeatValue of repeatValues) {\n for (const rowValue of row) {\n for (const columnValue of column) {\n const childRepeater = {\n repeat: repeatValue,\n row: rowValue,\n column: columnValue,\n layer: repeater.layer\n };\n const childName = (childSpec.name || '') +\n repeaterPrefix +\n 'child__' +\n (isArray(repeat)\n ? `${varName(repeatValue)}`\n : (repeat.row ? `row_${varName(rowValue)}` : '') +\n (repeat.column ? `column_${varName(columnValue)}` : ''));\n const child = this.map(childSpec, Object.assign(Object.assign({}, params), { repeater: childRepeater, repeaterPrefix: childName }));\n child.name = childName;\n // we move data up\n concat.push(omit(child, ['data']));\n }\n }\n }\n const columns = isArray(repeat) ? spec.columns : repeat.column ? repeat.column.length : 1;\n return Object.assign(Object.assign({ data: (_a = childSpec.data) !== null && _a !== void 0 ? _a : data, align: 'all' }, remainingProperties), { columns,\n concat });\n }\n mapFacet(spec, params) {\n const { facet } = spec;\n if (isFacetMapping(facet) && spec.columns) {\n // is facet with row/column\n spec = omit(spec, ['columns']);\n log.warn(log.message.columnsNotSupportByRowCol('facet'));\n }\n return super.mapFacet(spec, params);\n }\n mapUnitWithParentEncodingOrProjection(spec, params) {\n const { encoding, projection } = spec;\n const { parentEncoding, parentProjection, config } = params;\n const mergedProjection = mergeProjection({ parentProjection, projection });\n const mergedEncoding = mergeEncoding({\n parentEncoding,\n encoding: replaceRepeaterInEncoding(encoding, params.repeater)\n });\n return this.mapUnit(Object.assign(Object.assign(Object.assign({}, spec), (mergedProjection ? { projection: mergedProjection } : {})), (mergedEncoding ? { encoding: mergedEncoding } : {})), { config });\n }\n mapFacetedUnit(spec, normParams) {\n // New encoding in the inside spec should not contain row / column\n // as row/column should be moved to facet\n const _a = spec.encoding, { row, column, facet } = _a, encoding = __rest(_a, [\"row\", \"column\", \"facet\"]);\n // Mark and encoding should be moved into the inner spec\n const { mark, width, projection, height, view, params, encoding: _ } = spec, outerSpec = __rest(spec, [\"mark\", \"width\", \"projection\", \"height\", \"view\", \"params\", \"encoding\"]);\n const { facetMapping, layout } = this.getFacetMappingAndLayout({ row, column, facet }, normParams);\n const newEncoding = replaceRepeaterInEncoding(encoding, normParams.repeater);\n return this.mapFacet(Object.assign(Object.assign(Object.assign({}, outerSpec), layout), { \n // row / column has higher precedence than facet\n facet: facetMapping, spec: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (width ? { width } : {})), (height ? { height } : {})), (view ? { view } : {})), (projection ? { projection } : {})), { mark, encoding: newEncoding }), (params ? { params } : {})) }), normParams);\n }\n getFacetMappingAndLayout(facets, params) {\n var _a;\n const { row, column, facet } = facets;\n if (row || column) {\n if (facet) {\n log.warn(log.message.facetChannelDropped([...(row ? [ROW] : []), ...(column ? [COLUMN] : [])]));\n }\n const facetMapping = {};\n const layout = {};\n for (const channel of [ROW, COLUMN]) {\n const def = facets[channel];\n if (def) {\n const { align, center, spacing, columns } = def, defWithoutLayout = __rest(def, [\"align\", \"center\", \"spacing\", \"columns\"]);\n facetMapping[channel] = defWithoutLayout;\n for (const prop of ['align', 'center', 'spacing']) {\n if (def[prop] !== undefined) {\n (_a = layout[prop]) !== null && _a !== void 0 ? _a : (layout[prop] = {});\n layout[prop][channel] = def[prop];\n }\n }\n }\n }\n return { facetMapping, layout };\n }\n else {\n const { align, center, spacing, columns } = facet, facetMapping = __rest(facet, [\"align\", \"center\", \"spacing\", \"columns\"]);\n return {\n facetMapping: replaceRepeaterInFacet(facetMapping, params.repeater),\n layout: Object.assign(Object.assign(Object.assign(Object.assign({}, (align ? { align } : {})), (center ? { center } : {})), (spacing ? { spacing } : {})), (columns ? { columns } : {}))\n };\n }\n }\n mapLayer(spec, _a) {\n // Special handling for extended layer spec\n var { parentEncoding, parentProjection } = _a, otherParams = __rest(_a, [\"parentEncoding\", \"parentProjection\"]);\n const { encoding, projection } = spec, rest = __rest(spec, [\"encoding\", \"projection\"]);\n const params = Object.assign(Object.assign({}, otherParams), { parentEncoding: mergeEncoding({ parentEncoding, encoding, layer: true }), parentProjection: mergeProjection({ parentProjection, projection }) });\n return super.mapLayer(rest, params);\n }\n}\nfunction mergeEncoding({ parentEncoding, encoding = {}, layer }) {\n let merged = {};\n if (parentEncoding) {\n const channels = new Set([...keys(parentEncoding), ...keys(encoding)]);\n for (const channel of channels) {\n const channelDef = encoding[channel];\n const parentChannelDef = parentEncoding[channel];\n if (isFieldOrDatumDef(channelDef)) {\n // Field/Datum Def can inherit properties from its parent\n // Note that parentChannelDef doesn't have to be a field/datum def if the channelDef is already one.\n const mergedChannelDef = Object.assign(Object.assign({}, parentChannelDef), channelDef);\n merged[channel] = mergedChannelDef;\n }\n else if (hasConditionalFieldOrDatumDef(channelDef)) {\n merged[channel] = Object.assign(Object.assign({}, channelDef), { condition: Object.assign(Object.assign({}, parentChannelDef), channelDef.condition) });\n }\n else if (channelDef || channelDef === null) {\n merged[channel] = channelDef;\n }\n else if (layer ||\n isValueDef(parentChannelDef) ||\n isSignalRef(parentChannelDef) ||\n isFieldOrDatumDef(parentChannelDef) ||\n isArray(parentChannelDef)) {\n merged[channel] = parentChannelDef;\n }\n }\n }\n else {\n merged = encoding;\n }\n return !merged || isEmpty(merged) ? undefined : merged;\n}\nfunction mergeProjection(opt) {\n const { parentProjection, projection } = opt;\n if (parentProjection && projection) {\n log.warn(log.message.projectionOverridden({ parentProjection, projection }));\n }\n return projection !== null && projection !== void 0 ? projection : parentProjection;\n}\n//# sourceMappingURL=core.js.map","import { normalizeLogicalComposition } from './logical';\nimport { normalizePredicate } from './predicate';\nexport function isFilter(t) {\n return 'filter' in t;\n}\nexport function isImputeSequence(t) {\n return (t === null || t === void 0 ? void 0 : t['stop']) !== undefined;\n}\nexport function isLookup(t) {\n return 'lookup' in t;\n}\nexport function isLookupData(from) {\n return 'data' in from;\n}\nexport function isLookupSelection(from) {\n return 'param' in from;\n}\nexport function isPivot(t) {\n return 'pivot' in t;\n}\nexport function isDensity(t) {\n return 'density' in t;\n}\nexport function isQuantile(t) {\n return 'quantile' in t;\n}\nexport function isRegression(t) {\n return 'regression' in t;\n}\nexport function isLoess(t) {\n return 'loess' in t;\n}\nexport function isSample(t) {\n return 'sample' in t;\n}\nexport function isWindow(t) {\n return 'window' in t;\n}\nexport function isJoinAggregate(t) {\n return 'joinaggregate' in t;\n}\nexport function isFlatten(t) {\n return 'flatten' in t;\n}\nexport function isCalculate(t) {\n return 'calculate' in t;\n}\nexport function isBin(t) {\n return 'bin' in t;\n}\nexport function isImpute(t) {\n return 'impute' in t;\n}\nexport function isTimeUnit(t) {\n return 'timeUnit' in t;\n}\nexport function isAggregate(t) {\n return 'aggregate' in t;\n}\nexport function isStack(t) {\n return 'stack' in t;\n}\nexport function isFold(t) {\n return 'fold' in t;\n}\nexport function normalizeTransform(transform) {\n return transform.map(t => {\n if (isFilter(t)) {\n return {\n filter: normalizeLogicalComposition(t.filter, normalizePredicate)\n };\n }\n return t;\n });\n}\n//# sourceMappingURL=transform.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isArray } from 'vega';\nimport { isBinParams } from '../bin';\nimport { isConditionalDef, isFieldDef, isScaleFieldDef } from '../channeldef';\nimport { normalizeLogicalComposition } from '../logical';\nimport { SpecMapper } from '../spec/map';\nimport { isBin, isFilter, isLookup } from '../transform';\nimport { duplicate, entries, vals } from '../util';\nexport class SelectionCompatibilityNormalizer extends SpecMapper {\n map(spec, normParams) {\n var _a, _b;\n (_a = normParams.emptySelections) !== null && _a !== void 0 ? _a : (normParams.emptySelections = {});\n (_b = normParams.selectionPredicates) !== null && _b !== void 0 ? _b : (normParams.selectionPredicates = {});\n spec = normalizeTransforms(spec, normParams);\n return super.map(spec, normParams);\n }\n mapLayerOrUnit(spec, normParams) {\n spec = normalizeTransforms(spec, normParams);\n if (spec.encoding) {\n const encoding = {};\n for (const [channel, enc] of entries(spec.encoding)) {\n encoding[channel] = normalizeChannelDef(enc, normParams);\n }\n spec = Object.assign(Object.assign({}, spec), { encoding });\n }\n return super.mapLayerOrUnit(spec, normParams);\n }\n mapUnit(spec, normParams) {\n const _a = spec, { selection } = _a, rest = __rest(_a, [\"selection\"]);\n if (selection) {\n return Object.assign(Object.assign({}, rest), { params: entries(selection).map(([name, selDef]) => {\n var _a;\n const _b = selDef, { init: value, bind, empty } = _b, select = __rest(_b, [\"init\", \"bind\", \"empty\"]);\n if (select.type === 'single') {\n select.type = 'point';\n select.toggle = false;\n }\n else if (select.type === 'multi') {\n select.type = 'point';\n }\n // Propagate emptiness forwards and backwards\n normParams.emptySelections[name] = empty !== 'none';\n for (const pred of vals((_a = normParams.selectionPredicates[name]) !== null && _a !== void 0 ? _a : {})) {\n pred.empty = empty !== 'none';\n }\n return { name, value, select, bind };\n }) });\n }\n return spec;\n }\n}\nfunction normalizeTransforms(spec, normParams) {\n const { transform: tx } = spec, rest = __rest(spec, [\"transform\"]);\n if (tx) {\n const transform = tx.map((t) => {\n if (isFilter(t)) {\n return { filter: normalizePredicate(t, normParams) };\n }\n else if (isBin(t) && isBinParams(t.bin)) {\n return Object.assign(Object.assign({}, t), { bin: normalizeBinExtent(t.bin) });\n }\n else if (isLookup(t)) {\n const _a = t.from, { selection: param } = _a, from = __rest(_a, [\"selection\"]);\n return param\n ? Object.assign(Object.assign({}, t), { from: Object.assign({ param }, from) }) : t;\n }\n return t;\n });\n return Object.assign(Object.assign({}, rest), { transform });\n }\n return spec;\n}\nfunction normalizeChannelDef(obj, normParams) {\n var _a, _b;\n const enc = duplicate(obj);\n if (isFieldDef(enc) && isBinParams(enc.bin)) {\n enc.bin = normalizeBinExtent(enc.bin);\n }\n if (isScaleFieldDef(enc) && ((_b = (_a = enc.scale) === null || _a === void 0 ? void 0 : _a.domain) === null || _b === void 0 ? void 0 : _b.selection)) {\n const _c = enc.scale.domain, { selection: param } = _c, domain = __rest(_c, [\"selection\"]);\n enc.scale.domain = Object.assign(Object.assign({}, domain), (param ? { param } : {}));\n }\n if (isConditionalDef(enc)) {\n if (isArray(enc.condition)) {\n enc.condition = enc.condition.map((c) => {\n const { selection, param, test } = c, cond = __rest(c, [\"selection\", \"param\", \"test\"]);\n return param ? c : Object.assign(Object.assign({}, cond), { test: normalizePredicate(c, normParams) });\n });\n }\n else {\n const _d = normalizeChannelDef(enc.condition, normParams), { selection, param, test } = _d, cond = __rest(_d, [\"selection\", \"param\", \"test\"]);\n enc.condition = param\n ? enc.condition\n : Object.assign(Object.assign({}, cond), { test: normalizePredicate(enc.condition, normParams) });\n }\n }\n return enc;\n}\nfunction normalizeBinExtent(bin) {\n const ext = bin.extent;\n if (ext === null || ext === void 0 ? void 0 : ext.selection) {\n const { selection: param } = ext, rest = __rest(ext, [\"selection\"]);\n return Object.assign(Object.assign({}, bin), { extent: Object.assign(Object.assign({}, rest), { param }) });\n }\n return bin;\n}\nfunction normalizePredicate(op, normParams) {\n // Normalize old compositions of selection names (e.g., selection: {and: [\"one\", \"two\"]})\n const normalizeSelectionComposition = (o) => {\n return normalizeLogicalComposition(o, param => {\n var _a, _b;\n var _c;\n const empty = (_a = normParams.emptySelections[param]) !== null && _a !== void 0 ? _a : true;\n const pred = { param, empty };\n (_b = (_c = normParams.selectionPredicates)[param]) !== null && _b !== void 0 ? _b : (_c[param] = []);\n normParams.selectionPredicates[param].push(pred);\n return pred;\n });\n };\n return op.selection\n ? normalizeSelectionComposition(op.selection)\n : normalizeLogicalComposition(op.test || op.filter, o => o.selection ? normalizeSelectionComposition(o.selection) : o);\n}\n//# sourceMappingURL=selectioncompat.js.map","import { isArray, isString } from 'vega';\nimport { isSelectionParameter } from '../selection';\nimport { isUnitSpec } from '../spec';\nimport { SpecMapper } from '../spec/map';\nexport class TopLevelSelectionsNormalizer extends SpecMapper {\n map(spec, normParams) {\n var _a;\n const selections = (_a = normParams.selections) !== null && _a !== void 0 ? _a : [];\n if (spec.params && !isUnitSpec(spec)) {\n const params = [];\n for (const param of spec.params) {\n if (isSelectionParameter(param)) {\n selections.push(param);\n }\n else {\n params.push(param);\n }\n }\n spec.params = params;\n }\n normParams.selections = selections;\n return super.map(spec, addSpecNameToParams(spec, normParams));\n }\n mapUnit(spec, normParams) {\n var _a;\n const selections = normParams.selections;\n if (!selections || !selections.length)\n return spec;\n const path = ((_a = normParams.path) !== null && _a !== void 0 ? _a : []).concat(spec.name);\n const params = [];\n for (const selection of selections) {\n // By default, apply selections to all unit views.\n if (!selection.views || !selection.views.length) {\n params.push(selection);\n }\n else {\n for (const view of selection.views) {\n // view is either a specific unit name, or a partial path through the spec tree.\n if ((isString(view) && (view === spec.name || path.indexOf(view) >= 0)) ||\n (isArray(view) &&\n view.map(v => path.indexOf(v)).every((v, i, arr) => v !== -1 && (i === 0 || v > arr[i - 1])))) {\n params.push(selection);\n }\n }\n }\n }\n if (params.length)\n spec.params = params;\n return spec;\n }\n}\nfor (const method of ['mapFacet', 'mapRepeat', 'mapHConcat', 'mapVConcat', 'mapLayer']) {\n const proto = TopLevelSelectionsNormalizer.prototype[method];\n TopLevelSelectionsNormalizer.prototype[method] = function (spec, params) {\n return proto.call(this, spec, addSpecNameToParams(spec, params));\n };\n}\nfunction addSpecNameToParams(spec, params) {\n var _a;\n return spec.name\n ? Object.assign(Object.assign({}, params), { path: ((_a = params.path) !== null && _a !== void 0 ? _a : []).concat(spec.name) }) : params;\n}\n//# sourceMappingURL=toplevelselection.js.map","import { isString } from 'vega-util';\nimport { initConfig } from '../config';\nimport * as log from '../log';\nimport { isLayerSpec, isUnitSpec } from '../spec';\nimport { deepEqual } from '../util';\nimport { CoreNormalizer } from './core';\nimport { SelectionCompatibilityNormalizer } from './selectioncompat';\nimport { TopLevelSelectionsNormalizer } from './toplevelselection';\nexport function normalize(spec, config) {\n if (config === undefined) {\n config = initConfig(spec.config);\n }\n const normalizedSpec = normalizeGenericSpec(spec, config);\n const { width, height } = spec;\n const autosize = normalizeAutoSize(normalizedSpec, { width, height, autosize: spec.autosize }, config);\n return Object.assign(Object.assign({}, normalizedSpec), (autosize ? { autosize } : {}));\n}\nconst coreNormalizer = new CoreNormalizer();\nconst selectionCompatNormalizer = new SelectionCompatibilityNormalizer();\nconst topLevelSelectionNormalizer = new TopLevelSelectionsNormalizer();\n/**\n * Decompose extended unit specs into composition of pure unit specs.\n * And push top-level selection definitions down to unit specs.\n */\nfunction normalizeGenericSpec(spec, config = {}) {\n const normParams = { config };\n return topLevelSelectionNormalizer.map(coreNormalizer.map(selectionCompatNormalizer.map(spec, normParams), normParams), normParams);\n}\nfunction _normalizeAutoSize(autosize) {\n return isString(autosize) ? { type: autosize } : autosize !== null && autosize !== void 0 ? autosize : {};\n}\n/**\n * Normalize autosize and deal with width or height == \"container\".\n */\nexport function normalizeAutoSize(spec, sizeInfo, config) {\n let { width, height } = sizeInfo;\n const isFitCompatible = isUnitSpec(spec) || isLayerSpec(spec);\n const autosizeDefault = {};\n if (!isFitCompatible) {\n // If spec is not compatible with autosize == \"fit\", discard width/height == container\n if (width == 'container') {\n log.warn(log.message.containerSizeNonSingle('width'));\n width = undefined;\n }\n if (height == 'container') {\n log.warn(log.message.containerSizeNonSingle('height'));\n height = undefined;\n }\n }\n else {\n // Default autosize parameters to fit when width/height is \"container\"\n if (width == 'container' && height == 'container') {\n autosizeDefault.type = 'fit';\n autosizeDefault.contains = 'padding';\n }\n else if (width == 'container') {\n autosizeDefault.type = 'fit-x';\n autosizeDefault.contains = 'padding';\n }\n else if (height == 'container') {\n autosizeDefault.type = 'fit-y';\n autosizeDefault.contains = 'padding';\n }\n }\n const autosize = Object.assign(Object.assign(Object.assign({ type: 'pad' }, autosizeDefault), (config ? _normalizeAutoSize(config.autosize) : {})), _normalizeAutoSize(spec.autosize));\n if (autosize.type === 'fit' && !isFitCompatible) {\n log.warn(log.message.FIT_NON_SINGLE);\n autosize.type = 'pad';\n }\n if (width == 'container' && !(autosize.type == 'fit' || autosize.type == 'fit-x')) {\n log.warn(log.message.containerSizeNotCompatibleWithAutosize('width'));\n }\n if (height == 'container' && !(autosize.type == 'fit' || autosize.type == 'fit-y')) {\n log.warn(log.message.containerSizeNotCompatibleWithAutosize('height'));\n }\n // Delete autosize property if it's Vega's default\n if (deepEqual(autosize, { type: 'pad' })) {\n return undefined;\n }\n return autosize;\n}\n//# sourceMappingURL=index.js.map","import { getPositionScaleChannel } from '../channel';\nimport { signalRefOrValue } from '../compile/common';\nexport function isFitType(autoSizeType) {\n return autoSizeType === 'fit' || autoSizeType === 'fit-x' || autoSizeType === 'fit-y';\n}\nexport function getFitType(sizeType) {\n return sizeType ? `fit-${getPositionScaleChannel(sizeType)}` : 'fit';\n}\nconst TOP_LEVEL_PROPERTIES = [\n 'background',\n 'padding'\n // We do not include \"autosize\" here as it is supported by only unit and layer specs and thus need to be normalized\n];\nexport function extractTopLevelProperties(t, includeParams) {\n const o = {};\n for (const p of TOP_LEVEL_PROPERTIES) {\n if (t && t[p] !== undefined) {\n o[p] = signalRefOrValue(t[p]);\n }\n }\n if (includeParams) {\n o.params = t.params;\n }\n return o;\n}\n//# sourceMappingURL=toplevel.js.map","import * as log from '../log';\nimport { deepEqual, duplicate, getFirstDefined, keys } from '../util';\n/**\n * Generic class for storing properties that are explicitly specified\n * and implicitly determined by the compiler.\n * This is important for scale/axis/legend merging as\n * we want to prioritize properties that users explicitly specified.\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport class Split {\n constructor(explicit = {}, implicit = {}) {\n this.explicit = explicit;\n this.implicit = implicit;\n }\n clone() {\n return new Split(duplicate(this.explicit), duplicate(this.implicit));\n }\n combine() {\n return Object.assign(Object.assign({}, this.explicit), this.implicit);\n }\n get(key) {\n // Explicit has higher precedence\n return getFirstDefined(this.explicit[key], this.implicit[key]);\n }\n getWithExplicit(key) {\n // Explicit has higher precedence\n if (this.explicit[key] !== undefined) {\n return { explicit: true, value: this.explicit[key] };\n }\n else if (this.implicit[key] !== undefined) {\n return { explicit: false, value: this.implicit[key] };\n }\n return { explicit: false, value: undefined };\n }\n setWithExplicit(key, { value, explicit }) {\n if (value !== undefined) {\n this.set(key, value, explicit);\n }\n }\n set(key, value, explicit) {\n delete this[explicit ? 'implicit' : 'explicit'][key];\n this[explicit ? 'explicit' : 'implicit'][key] = value;\n return this;\n }\n copyKeyFromSplit(key, { explicit, implicit }) {\n // Explicit has higher precedence\n if (explicit[key] !== undefined) {\n this.set(key, explicit[key], true);\n }\n else if (implicit[key] !== undefined) {\n this.set(key, implicit[key], false);\n }\n }\n copyKeyFromObject(key, s) {\n // Explicit has higher precedence\n if (s[key] !== undefined) {\n this.set(key, s[key], true);\n }\n }\n /**\n * Merge split object into this split object. Properties from the other split\n * overwrite properties from this split.\n */\n copyAll(other) {\n for (const key of keys(other.combine())) {\n const val = other.getWithExplicit(key);\n this.setWithExplicit(key, val);\n }\n }\n}\nexport function makeExplicit(value) {\n return {\n explicit: true,\n value\n };\n}\nexport function makeImplicit(value) {\n return {\n explicit: false,\n value\n };\n}\nexport function tieBreakByComparing(compare) {\n return (v1, v2, property, propertyOf) => {\n const diff = compare(v1.value, v2.value);\n if (diff > 0) {\n return v1;\n }\n else if (diff < 0) {\n return v2;\n }\n return defaultTieBreaker(v1, v2, property, propertyOf);\n };\n}\nexport function defaultTieBreaker(v1, v2, property, propertyOf) {\n if (v1.explicit && v2.explicit) {\n log.warn(log.message.mergeConflictingProperty(property, propertyOf, v1.value, v2.value));\n }\n // If equal score, prefer v1.\n return v1;\n}\nexport function mergeValuesWithExplicit(v1, v2, property, propertyOf, tieBreaker = defaultTieBreaker) {\n if (v1 === undefined || v1.value === undefined) {\n // For first run\n return v2;\n }\n if (v1.explicit && !v2.explicit) {\n return v1;\n }\n else if (v2.explicit && !v1.explicit) {\n return v2;\n }\n else if (deepEqual(v1.value, v2.value)) {\n return v1;\n }\n else {\n return tieBreaker(v1, v2, property, propertyOf);\n }\n}\n//# sourceMappingURL=split.js.map","import { Split } from '../split';\n/**\n * Class to track interesting properties (see https://15721.courses.cs.cmu.edu/spring2016/papers/graefe-ieee1995.pdf)\n * about how fields have been parsed or whether they have been derived in a transform. We use this to not parse the\n * same field again (or differently).\n */\nexport class AncestorParse extends Split {\n constructor(explicit = {}, implicit = {}, parseNothing = false) {\n super(explicit, implicit);\n this.explicit = explicit;\n this.implicit = implicit;\n this.parseNothing = parseNothing;\n }\n clone() {\n const clone = super.clone();\n clone.parseNothing = this.parseNothing;\n return clone;\n }\n}\n//# sourceMappingURL=index.js.map","export function isUrlData(data) {\n return 'url' in data;\n}\nexport function isInlineData(data) {\n return 'values' in data;\n}\nexport function isNamedData(data) {\n return 'name' in data && !isUrlData(data) && !isInlineData(data) && !isGenerator(data);\n}\nexport function isGenerator(data) {\n return data && (isSequenceGenerator(data) || isSphereGenerator(data) || isGraticuleGenerator(data));\n}\nexport function isSequenceGenerator(data) {\n return 'sequence' in data;\n}\nexport function isSphereGenerator(data) {\n return 'sphere' in data;\n}\nexport function isGraticuleGenerator(data) {\n return 'graticule' in data;\n}\nexport var DataSourceType;\n(function (DataSourceType) {\n DataSourceType[DataSourceType[\"Raw\"] = 0] = \"Raw\";\n DataSourceType[DataSourceType[\"Main\"] = 1] = \"Main\";\n DataSourceType[DataSourceType[\"Row\"] = 2] = \"Row\";\n DataSourceType[DataSourceType[\"Column\"] = 3] = \"Column\";\n DataSourceType[DataSourceType[\"Lookup\"] = 4] = \"Lookup\";\n})(DataSourceType || (DataSourceType = {}));\n//# sourceMappingURL=data.js.map","const VIEW = 'view',\n LBRACK = '[',\n RBRACK = ']',\n LBRACE = '{',\n RBRACE = '}',\n COLON = ':',\n COMMA = ',',\n NAME = '@',\n GT = '>',\n ILLEGAL = /[[\\]{}]/,\n DEFAULT_MARKS = {\n '*': 1,\n arc: 1,\n area: 1,\n group: 1,\n image: 1,\n line: 1,\n path: 1,\n rect: 1,\n rule: 1,\n shape: 1,\n symbol: 1,\n text: 1,\n trail: 1\n};\nlet DEFAULT_SOURCE, MARKS;\n/**\n * Parse an event selector string.\n * Returns an array of event stream definitions.\n */\n\nfunction eventSelector (selector, source, marks) {\n DEFAULT_SOURCE = source || VIEW;\n MARKS = marks || DEFAULT_MARKS;\n return parseMerge(selector.trim()).map(parseSelector);\n}\n\nfunction isMarkType(type) {\n return MARKS[type];\n}\n\nfunction find(s, i, endChar, pushChar, popChar) {\n const n = s.length;\n let count = 0,\n c;\n\n for (; i < n; ++i) {\n c = s[i];\n if (!count && c === endChar) return i;else if (popChar && popChar.indexOf(c) >= 0) --count;else if (pushChar && pushChar.indexOf(c) >= 0) ++count;\n }\n\n return i;\n}\n\nfunction parseMerge(s) {\n const output = [],\n n = s.length;\n let start = 0,\n i = 0;\n\n while (i < n) {\n i = find(s, i, COMMA, LBRACK + LBRACE, RBRACK + RBRACE);\n output.push(s.substring(start, i).trim());\n start = ++i;\n }\n\n if (output.length === 0) {\n throw 'Empty event selector: ' + s;\n }\n\n return output;\n}\n\nfunction parseSelector(s) {\n return s[0] === '[' ? parseBetween(s) : parseStream(s);\n}\n\nfunction parseBetween(s) {\n const n = s.length;\n let i = 1,\n b;\n i = find(s, i, RBRACK, LBRACK, RBRACK);\n\n if (i === n) {\n throw 'Empty between selector: ' + s;\n }\n\n b = parseMerge(s.substring(1, i));\n\n if (b.length !== 2) {\n throw 'Between selector must have two elements: ' + s;\n }\n\n s = s.slice(i + 1).trim();\n\n if (s[0] !== GT) {\n throw 'Expected \\'>\\' after between selector: ' + s;\n }\n\n b = b.map(parseSelector);\n const stream = parseSelector(s.slice(1).trim());\n\n if (stream.between) {\n return {\n between: b,\n stream: stream\n };\n } else {\n stream.between = b;\n }\n\n return stream;\n}\n\nfunction parseStream(s) {\n const stream = {\n source: DEFAULT_SOURCE\n },\n source = [];\n let throttle = [0, 0],\n markname = 0,\n start = 0,\n n = s.length,\n i = 0,\n j,\n filter; // extract throttle from end\n\n if (s[n - 1] === RBRACE) {\n i = s.lastIndexOf(LBRACE);\n\n if (i >= 0) {\n try {\n throttle = parseThrottle(s.substring(i + 1, n - 1));\n } catch (e) {\n throw 'Invalid throttle specification: ' + s;\n }\n\n s = s.slice(0, i).trim();\n n = s.length;\n } else throw 'Unmatched right brace: ' + s;\n\n i = 0;\n }\n\n if (!n) throw s; // set name flag based on first char\n\n if (s[0] === NAME) markname = ++i; // extract first part of multi-part stream selector\n\n j = find(s, i, COLON);\n\n if (j < n) {\n source.push(s.substring(start, j).trim());\n start = i = ++j;\n } // extract remaining part of stream selector\n\n\n i = find(s, i, LBRACK);\n\n if (i === n) {\n source.push(s.substring(start, n).trim());\n } else {\n source.push(s.substring(start, i).trim());\n filter = [];\n start = ++i;\n if (start === n) throw 'Unmatched left bracket: ' + s;\n } // extract filters\n\n\n while (i < n) {\n i = find(s, i, RBRACK);\n if (i === n) throw 'Unmatched left bracket: ' + s;\n filter.push(s.substring(start, i).trim());\n if (i < n - 1 && s[++i] !== LBRACK) throw 'Expected left bracket: ' + s;\n start = ++i;\n } // marshall event stream specification\n\n\n if (!(n = source.length) || ILLEGAL.test(source[n - 1])) {\n throw 'Invalid event selector: ' + s;\n }\n\n if (n > 1) {\n stream.type = source[1];\n\n if (markname) {\n stream.markname = source[0].slice(1);\n } else if (isMarkType(source[0])) {\n stream.marktype = source[0];\n } else {\n stream.source = source[0];\n }\n } else {\n stream.type = source[0];\n }\n\n if (stream.type.slice(-1) === '!') {\n stream.consume = true;\n stream.type = stream.type.slice(0, -1);\n }\n\n if (filter != null) stream.filter = filter;\n if (throttle[0]) stream.throttle = throttle[0];\n if (throttle[1]) stream.debounce = throttle[1];\n return stream;\n}\n\nfunction parseThrottle(s) {\n const a = s.split(COMMA);\n if (!s.length || a.length > 2) throw s;\n return a.map(_ => {\n const x = +_;\n if (x !== x) throw s;\n return x;\n });\n}\n\nexport { eventSelector as selector };\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { selector as parseSelector } from 'vega-event-selector';\nimport { identity, isArray, stringValue } from 'vega-util';\nimport { MODIFY, STORE, unitName, VL_SELECTION_RESOLVE, TUPLE, selectionCompilers } from '.';\nimport { dateTimeToExpr, isDateTime, dateTimeToTimestamp } from '../../datetime';\nimport { hasContinuousDomain } from '../../scale';\nimport { keys, stringify, vals } from '../../util';\nimport { isUnitModel } from '../model';\nimport { parseSelectionExtent } from './parse';\nexport function assembleInit(init, isExpr = true, wrap = identity) {\n if (isArray(init)) {\n const assembled = init.map(v => assembleInit(v, isExpr, wrap));\n return isExpr ? `[${assembled.join(', ')}]` : assembled;\n }\n else if (isDateTime(init)) {\n if (isExpr) {\n return wrap(dateTimeToExpr(init));\n }\n else {\n return wrap(dateTimeToTimestamp(init));\n }\n }\n return isExpr ? wrap(stringify(init)) : init;\n}\nexport function assembleUnitSelectionSignals(model, signals) {\n var _a;\n for (const selCmpt of vals((_a = model.component.selection) !== null && _a !== void 0 ? _a : {})) {\n const name = selCmpt.name;\n let modifyExpr = `${name}${TUPLE}, ${selCmpt.resolve === 'global' ? 'true' : `{unit: ${unitName(model)}}`}`;\n for (const c of selectionCompilers) {\n if (!c.defined(selCmpt))\n continue;\n if (c.signals)\n signals = c.signals(model, selCmpt, signals);\n if (c.modifyExpr)\n modifyExpr = c.modifyExpr(model, selCmpt, modifyExpr);\n }\n signals.push({\n name: name + MODIFY,\n on: [\n {\n events: { signal: selCmpt.name + TUPLE },\n update: `modify(${stringValue(selCmpt.name + STORE)}, ${modifyExpr})`\n }\n ]\n });\n }\n return cleanupEmptyOnArray(signals);\n}\nexport function assembleFacetSignals(model, signals) {\n if (model.component.selection && keys(model.component.selection).length) {\n const name = stringValue(model.getName('cell'));\n signals.unshift({\n name: 'facet',\n value: {},\n on: [\n {\n events: parseSelector('mousemove', 'scope'),\n update: `isTuple(facet) ? facet : group(${name}).datum`\n }\n ]\n });\n }\n return cleanupEmptyOnArray(signals);\n}\nexport function assembleTopLevelSignals(model, signals) {\n var _a;\n let hasSelections = false;\n for (const selCmpt of vals((_a = model.component.selection) !== null && _a !== void 0 ? _a : {})) {\n const name = selCmpt.name;\n const store = stringValue(name + STORE);\n const hasSg = signals.filter(s => s.name === name);\n if (hasSg.length === 0) {\n const resolve = selCmpt.resolve === 'global' ? 'union' : selCmpt.resolve;\n const isPoint = selCmpt.type === 'point' ? ', true, true)' : ')';\n signals.push({\n name: selCmpt.name,\n update: `${VL_SELECTION_RESOLVE}(${store}, ${stringValue(resolve)}${isPoint}`\n });\n }\n hasSelections = true;\n for (const c of selectionCompilers) {\n if (c.defined(selCmpt) && c.topLevelSignals) {\n signals = c.topLevelSignals(model, selCmpt, signals);\n }\n }\n }\n if (hasSelections) {\n const hasUnit = signals.filter(s => s.name === 'unit');\n if (hasUnit.length === 0) {\n signals.unshift({\n name: 'unit',\n value: {},\n on: [{ events: 'mousemove', update: 'isTuple(group()) ? group() : unit' }]\n });\n }\n }\n return cleanupEmptyOnArray(signals);\n}\nexport function assembleUnitSelectionData(model, data) {\n var _a;\n const dataCopy = [...data];\n for (const selCmpt of vals((_a = model.component.selection) !== null && _a !== void 0 ? _a : {})) {\n const init = { name: selCmpt.name + STORE };\n if (selCmpt.init) {\n const fields = selCmpt.project.items.map(proj => {\n const { signals } = proj, rest = __rest(proj, [\"signals\"]);\n return rest;\n });\n init.values = selCmpt.init.map(i => ({\n unit: unitName(model, { escape: false }),\n fields,\n values: assembleInit(i, false)\n }));\n }\n const contains = dataCopy.filter(d => d.name === selCmpt.name + STORE);\n if (!contains.length) {\n dataCopy.push(init);\n }\n }\n return dataCopy;\n}\nexport function assembleUnitSelectionMarks(model, marks) {\n var _a;\n for (const selCmpt of vals((_a = model.component.selection) !== null && _a !== void 0 ? _a : {})) {\n for (const c of selectionCompilers) {\n if (c.defined(selCmpt) && c.marks) {\n marks = c.marks(model, selCmpt, marks);\n }\n }\n }\n return marks;\n}\nexport function assembleLayerSelectionMarks(model, marks) {\n for (const child of model.children) {\n if (isUnitModel(child)) {\n marks = assembleUnitSelectionMarks(child, marks);\n }\n }\n return marks;\n}\nexport function assembleSelectionScaleDomain(model, extent, scaleCmpt, domain) {\n const parsedExtent = parseSelectionExtent(model, extent.param, extent);\n return {\n signal: hasContinuousDomain(scaleCmpt.get('type')) && isArray(domain) && domain[0] > domain[1]\n ? `isValid(${parsedExtent}) && reverse(${parsedExtent})`\n : parsedExtent\n };\n}\nfunction cleanupEmptyOnArray(signals) {\n return signals.map(s => {\n if (s.on && !s.on.length)\n delete s.on;\n return s;\n });\n}\n//# sourceMappingURL=assemble.js.map","import * as log from '../../log';\nimport { uniqueId } from '../../util';\n/**\n * A node in the dataflow tree.\n */\nexport class DataFlowNode {\n constructor(parent, debugName) {\n this.debugName = debugName;\n this._children = [];\n this._parent = null;\n if (parent) {\n this.parent = parent;\n }\n }\n /**\n * Clone this node with a deep copy but don't clone links to children or parents.\n */\n clone() {\n throw new Error('Cannot clone node');\n }\n get parent() {\n return this._parent;\n }\n /**\n * Set the parent of the node and also add this node to the parent's children.\n */\n set parent(parent) {\n this._parent = parent;\n if (parent) {\n parent.addChild(this);\n }\n }\n get children() {\n return this._children;\n }\n numChildren() {\n return this._children.length;\n }\n addChild(child, loc) {\n // do not add the same child twice\n if (this._children.includes(child)) {\n log.warn(log.message.ADD_SAME_CHILD_TWICE);\n return;\n }\n if (loc !== undefined) {\n this._children.splice(loc, 0, child);\n }\n else {\n this._children.push(child);\n }\n }\n removeChild(oldChild) {\n const loc = this._children.indexOf(oldChild);\n this._children.splice(loc, 1);\n return loc;\n }\n /**\n * Remove node from the dataflow.\n */\n remove() {\n let loc = this._parent.removeChild(this);\n for (const child of this._children) {\n // do not use the set method because we want to insert at a particular location\n child._parent = this._parent;\n this._parent.addChild(child, loc++);\n }\n }\n /**\n * Insert another node as a parent of this node.\n */\n insertAsParentOf(other) {\n const parent = other.parent;\n parent.removeChild(this);\n this.parent = parent;\n other.parent = this;\n }\n swapWithParent() {\n const parent = this._parent;\n const newParent = parent.parent;\n // reconnect the children\n for (const child of this._children) {\n child.parent = parent;\n }\n // remove old links\n this._children = []; // equivalent to removing every child link one by one\n parent.removeChild(this);\n parent.parent.removeChild(parent);\n // swap two nodes\n this.parent = newParent;\n parent.parent = this;\n }\n}\nexport class OutputNode extends DataFlowNode {\n /**\n * @param source The name of the source. Will change in assemble.\n * @param type The type of the output node.\n * @param refCounts A global ref counter map.\n */\n constructor(parent, source, type, refCounts) {\n super(parent, source);\n this.type = type;\n this.refCounts = refCounts;\n this._source = this._name = source;\n if (this.refCounts && !(this._name in this.refCounts)) {\n this.refCounts[this._name] = 0;\n }\n }\n clone() {\n const cloneObj = new this.constructor();\n cloneObj.debugName = `clone_${this.debugName}`;\n cloneObj._source = this._source;\n cloneObj._name = `clone_${this._name}`;\n cloneObj.type = this.type;\n cloneObj.refCounts = this.refCounts;\n cloneObj.refCounts[cloneObj._name] = 0;\n return cloneObj;\n }\n dependentFields() {\n return new Set();\n }\n producedFields() {\n return new Set();\n }\n hash() {\n if (this._hash === undefined) {\n this._hash = `Output ${uniqueId()}`;\n }\n return this._hash;\n }\n /**\n * Request the datasource name and increase the ref counter.\n *\n * During the parsing phase, this will return the simple name such as 'main' or 'raw'.\n * It is crucial to request the name from an output node to mark it as a required node.\n * If nobody ever requests the name, this datasource will not be instantiated in the assemble phase.\n *\n * In the assemble phase, this will return the correct name.\n */\n getSource() {\n this.refCounts[this._name]++;\n return this._source;\n }\n isRequired() {\n return !!this.refCounts[this._name];\n }\n setSource(source) {\n this._source = source;\n }\n}\n//# sourceMappingURL=dataflow.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { vgField } from '../../channeldef';\nimport { getTimeUnitParts, normalizeTimeUnit } from '../../timeunit';\nimport { duplicate, entries, hash, isEmpty, replacePathInField, vals } from '../../util';\nimport { DataFlowNode } from './dataflow';\nexport class TimeUnitNode extends DataFlowNode {\n constructor(parent, formula) {\n super(parent);\n this.formula = formula;\n }\n clone() {\n return new TimeUnitNode(null, duplicate(this.formula));\n }\n static makeFromEncoding(parent, model) {\n const formula = model.reduceFieldDef((timeUnitComponent, fieldDef) => {\n const { field, timeUnit } = fieldDef;\n if (timeUnit) {\n const as = vgField(fieldDef, { forAs: true });\n timeUnitComponent[hash({\n as,\n field,\n timeUnit\n })] = {\n as,\n field,\n timeUnit\n };\n }\n return timeUnitComponent;\n }, {});\n if (isEmpty(formula)) {\n return null;\n }\n return new TimeUnitNode(parent, formula);\n }\n static makeFromTransform(parent, t) {\n const _a = Object.assign({}, t), { timeUnit } = _a, other = __rest(_a, [\"timeUnit\"]);\n const normalizedTimeUnit = normalizeTimeUnit(timeUnit);\n const component = Object.assign(Object.assign({}, other), { timeUnit: normalizedTimeUnit });\n return new TimeUnitNode(parent, {\n [hash(component)]: component\n });\n }\n /**\n * Merge together TimeUnitNodes assigning the children of `other` to `this`\n * and removing `other`.\n */\n merge(other) {\n this.formula = Object.assign({}, this.formula);\n // if the same hash happen twice, merge\n for (const key in other.formula) {\n if (!this.formula[key]) {\n // copy if it's not a duplicate\n this.formula[key] = other.formula[key];\n }\n }\n for (const child of other.children) {\n other.removeChild(child);\n child.parent = this;\n }\n other.remove();\n }\n /**\n * Remove time units coming from the other node.\n */\n removeFormulas(fields) {\n const newFormula = {};\n for (const [key, timeUnit] of entries(this.formula)) {\n if (!fields.has(timeUnit.as)) {\n newFormula[key] = timeUnit;\n }\n }\n this.formula = newFormula;\n }\n producedFields() {\n return new Set(vals(this.formula).map(f => f.as));\n }\n dependentFields() {\n return new Set(vals(this.formula).map(f => f.field));\n }\n hash() {\n return `TimeUnit ${hash(this.formula)}`;\n }\n assemble() {\n const transforms = [];\n for (const f of vals(this.formula)) {\n const { field, as, timeUnit } = f;\n const _a = normalizeTimeUnit(timeUnit), { unit, utc } = _a, params = __rest(_a, [\"unit\", \"utc\"]);\n transforms.push(Object.assign(Object.assign(Object.assign(Object.assign({ field: replacePathInField(field), type: 'timeunit' }, (unit ? { units: getTimeUnitParts(unit) } : {})), (utc ? { timezone: 'utc' } : {})), params), { as: [as, `${as}_end`] }));\n }\n return transforms;\n }\n}\n//# sourceMappingURL=timeunit.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { array, isObject } from 'vega-util';\nimport { isSingleDefUnitChannel } from '../../channel';\nimport * as log from '../../log';\nimport { hasContinuousDomain } from '../../scale';\nimport { hash, keys, replacePathInField, varName, isEmpty } from '../../util';\nimport { TimeUnitNode } from '../data/timeunit';\nexport const TUPLE_FIELDS = '_tuple_fields';\nexport class SelectionProjectionComponent {\n constructor(...items) {\n this.items = items;\n this.hasChannel = {};\n this.hasField = {};\n }\n}\nconst project = {\n defined: () => {\n return true; // This transform handles its own defaults, so always run parse.\n },\n parse: (model, selCmpt, selDef) => {\n var _a;\n const name = selCmpt.name;\n const proj = ((_a = selCmpt.project) !== null && _a !== void 0 ? _a : (selCmpt.project = new SelectionProjectionComponent()));\n const parsed = {};\n const timeUnits = {};\n const signals = new Set();\n const signalName = (p, range) => {\n const suffix = range === 'visual' ? p.channel : p.field;\n let sg = varName(`${name}_${suffix}`);\n for (let counter = 1; signals.has(sg); counter++) {\n sg = varName(`${name}_${suffix}_${counter}`);\n }\n signals.add(sg);\n return { [range]: sg };\n };\n const type = selCmpt.type;\n const cfg = model.config.selection[type];\n const init = selDef.value !== undefined\n ? array(selDef.value)\n : null;\n // If no explicit projection (either fields or encodings) is specified, set some defaults.\n // If an initial value is set, try to infer projections.\n let { fields, encodings } = (isObject(selDef.select) ? selDef.select : {});\n if (!fields && !encodings && init) {\n for (const initVal of init) {\n // initVal may be a scalar value to smoothen varParam -> pointSelection gradient.\n if (!isObject(initVal)) {\n continue;\n }\n for (const key of keys(initVal)) {\n if (isSingleDefUnitChannel(key)) {\n (encodings || (encodings = [])).push(key);\n }\n else {\n if (type === 'interval') {\n log.warn(log.message.INTERVAL_INITIALIZED_WITH_X_Y);\n encodings = cfg.encodings;\n }\n else {\n (fields || (fields = [])).push(key);\n }\n }\n }\n }\n }\n // If no initial value is specified, use the default configuration.\n // We break this out as a separate if block (instead of an else condition)\n // to account for unprojected point selections that have scalar initial values\n if (!fields && !encodings) {\n encodings = cfg.encodings;\n if ('fields' in cfg) {\n fields = cfg.fields;\n }\n }\n for (const channel of encodings !== null && encodings !== void 0 ? encodings : []) {\n const fieldDef = model.fieldDef(channel);\n if (fieldDef) {\n let field = fieldDef.field;\n if (fieldDef.aggregate) {\n log.warn(log.message.cannotProjectAggregate(channel, fieldDef.aggregate));\n continue;\n }\n else if (!field) {\n log.warn(log.message.cannotProjectOnChannelWithoutField(channel));\n continue;\n }\n if (fieldDef.timeUnit) {\n field = model.vgField(channel);\n // Construct TimeUnitComponents which will be combined into a\n // TimeUnitNode. This node may need to be inserted into the\n // dataflow if the selection is used across views that do not\n // have these time units defined.\n const component = {\n timeUnit: fieldDef.timeUnit,\n as: field,\n field: fieldDef.field\n };\n timeUnits[hash(component)] = component;\n }\n // Prevent duplicate projections on the same field.\n // TODO: what if the same field is bound to multiple channels (e.g., SPLOM diag).\n if (!parsed[field]) {\n // Determine whether the tuple will store enumerated or ranged values.\n // Interval selections store ranges for continuous scales, and enumerations otherwise.\n // Single/multi selections store ranges for binned fields, and enumerations otherwise.\n let tplType = 'E';\n if (type === 'interval') {\n const scaleType = model.getScaleComponent(channel).get('type');\n if (hasContinuousDomain(scaleType)) {\n tplType = 'R';\n }\n }\n else if (fieldDef.bin) {\n tplType = 'R-RE';\n }\n const p = { field, channel, type: tplType };\n p.signals = Object.assign(Object.assign({}, signalName(p, 'data')), signalName(p, 'visual'));\n proj.items.push((parsed[field] = p));\n proj.hasField[field] = proj.hasChannel[channel] = parsed[field];\n }\n }\n else {\n log.warn(log.message.cannotProjectOnChannelWithoutField(channel));\n }\n }\n for (const field of fields !== null && fields !== void 0 ? fields : []) {\n if (proj.hasField[field])\n continue;\n const p = { type: 'E', field };\n p.signals = Object.assign({}, signalName(p, 'data'));\n proj.items.push(p);\n proj.hasField[field] = p;\n }\n if (init) {\n selCmpt.init = init.map((v) => {\n // Selections can be initialized either with a full object that maps projections to values\n // or scalar values to smoothen the abstraction gradient from variable params to point selections.\n return proj.items.map(p => (isObject(v) ? (v[p.channel] !== undefined ? v[p.channel] : v[p.field]) : v));\n });\n }\n if (!isEmpty(timeUnits)) {\n proj.timeUnit = new TimeUnitNode(null, timeUnits);\n }\n },\n signals: (model, selCmpt, allSignals) => {\n const name = selCmpt.name + TUPLE_FIELDS;\n const hasSignal = allSignals.filter(s => s.name === name);\n return hasSignal.length > 0\n ? allSignals\n : allSignals.concat({\n name,\n value: selCmpt.project.items.map(proj => {\n const { signals, hasLegend } = proj, rest = __rest(proj, [\"signals\", \"hasLegend\"]);\n rest.field = replacePathInField(rest.field);\n return rest;\n })\n });\n }\n};\nexport default project;\n//# sourceMappingURL=project.js.map","import { stringValue } from 'vega-util';\nimport { VL_SELECTION_RESOLVE } from '.';\nimport { isScaleChannel } from '../../channel';\nimport * as log from '../../log';\nimport { hasContinuousDomain } from '../../scale';\nimport { isLayerModel } from '../model';\nimport { replacePathInField } from '../../util';\nconst scaleBindings = {\n defined: selCmpt => {\n return selCmpt.type === 'interval' && selCmpt.resolve === 'global' && selCmpt.bind && selCmpt.bind === 'scales';\n },\n parse: (model, selCmpt) => {\n const bound = (selCmpt.scales = []);\n for (const proj of selCmpt.project.items) {\n const channel = proj.channel;\n if (!isScaleChannel(channel)) {\n continue;\n }\n const scale = model.getScaleComponent(channel);\n const scaleType = scale ? scale.get('type') : undefined;\n if (!scale || !hasContinuousDomain(scaleType)) {\n log.warn(log.message.SCALE_BINDINGS_CONTINUOUS);\n continue;\n }\n scale.set('selectionExtent', { param: selCmpt.name, field: proj.field }, true);\n bound.push(proj);\n }\n },\n topLevelSignals: (model, selCmpt, signals) => {\n const bound = selCmpt.scales.filter(proj => signals.filter(s => s.name === proj.signals.data).length === 0);\n // Top-level signals are only needed for multiview displays and if this\n // view's top-level signals haven't already been generated.\n if (!model.parent || isTopLevelLayer(model) || bound.length === 0) {\n return signals;\n }\n // vlSelectionResolve does not account for the behavior of bound scales in\n // multiview displays. Each unit view adds a tuple to the store, but the\n // state of the selection is the unit selection most recently updated. This\n // state is captured by the top-level signals that we insert and \"push\n // outer\" to from within the units. We need to reassemble this state into\n // the top-level named signal, except no single selCmpt has a global view.\n const namedSg = signals.filter(s => s.name === selCmpt.name)[0];\n let update = namedSg.update;\n if (update.indexOf(VL_SELECTION_RESOLVE) >= 0) {\n namedSg.update = `{${bound\n .map(proj => `${stringValue(replacePathInField(proj.field))}: ${proj.signals.data}`)\n .join(', ')}}`;\n }\n else {\n for (const proj of bound) {\n const mapping = `${stringValue(replacePathInField(proj.field))}: ${proj.signals.data}`;\n if (!update.includes(mapping)) {\n update = `${update.substring(0, update.length - 1)}, ${mapping}}`;\n }\n }\n namedSg.update = update;\n }\n return signals.concat(bound.map(proj => ({ name: proj.signals.data })));\n },\n signals: (model, selCmpt, signals) => {\n // Nested signals need only push to top-level signals with multiview displays.\n if (model.parent && !isTopLevelLayer(model)) {\n for (const proj of selCmpt.scales) {\n const signal = signals.filter(s => s.name === proj.signals.data)[0];\n signal.push = 'outer';\n delete signal.value;\n delete signal.update;\n }\n }\n return signals;\n }\n};\nexport default scaleBindings;\nexport function domain(model, channel) {\n const scale = stringValue(model.scaleName(channel));\n return `domain(${scale})`;\n}\nfunction isTopLevelLayer(model) {\n var _a;\n return model.parent && isLayerModel(model.parent) && ((_a = !model.parent.parent) !== null && _a !== void 0 ? _a : isTopLevelLayer(model.parent.parent));\n}\n//# sourceMappingURL=scales.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { array, stringValue } from 'vega-util';\nimport { STORE, TUPLE, unitName } from '.';\nimport { X, Y } from '../../channel';\nimport { warn } from '../../log';\nimport { hasContinuousDomain } from '../../scale';\nimport { keys } from '../../util';\nimport { assembleInit } from './assemble';\nimport { TUPLE_FIELDS } from './project';\nimport scales from './scales';\nexport const BRUSH = '_brush';\nexport const SCALE_TRIGGER = '_scale_trigger';\nconst interval = {\n defined: selCmpt => selCmpt.type === 'interval',\n signals: (model, selCmpt, signals) => {\n const name = selCmpt.name;\n const fieldsSg = name + TUPLE_FIELDS;\n const hasScales = scales.defined(selCmpt);\n const init = selCmpt.init ? selCmpt.init[0] : null;\n const dataSignals = [];\n const scaleTriggers = [];\n if (selCmpt.translate && !hasScales) {\n const filterExpr = `!event.item || event.item.mark.name !== ${stringValue(name + BRUSH)}`;\n events(selCmpt, (on, evt) => {\n var _a;\n var _b;\n const filters = array(((_a = (_b = evt.between[0]).filter) !== null && _a !== void 0 ? _a : (_b.filter = [])));\n if (!filters.includes(filterExpr)) {\n filters.push(filterExpr);\n }\n return on;\n });\n }\n selCmpt.project.items.forEach((proj, i) => {\n const channel = proj.channel;\n if (channel !== X && channel !== Y) {\n warn('Interval selections only support x and y encoding channels.');\n return;\n }\n const val = init ? init[i] : null;\n const cs = channelSignals(model, selCmpt, proj, val);\n const dname = proj.signals.data;\n const vname = proj.signals.visual;\n const scaleName = stringValue(model.scaleName(channel));\n const scaleType = model.getScaleComponent(channel).get('type');\n const toNum = hasContinuousDomain(scaleType) ? '+' : '';\n signals.push(...cs);\n dataSignals.push(dname);\n scaleTriggers.push({\n scaleName: model.scaleName(channel),\n expr: `(!isArray(${dname}) || ` +\n `(${toNum}invert(${scaleName}, ${vname})[0] === ${toNum}${dname}[0] && ` +\n `${toNum}invert(${scaleName}, ${vname})[1] === ${toNum}${dname}[1]))`\n });\n });\n // Proxy scale reactions to ensure that an infinite loop doesn't occur\n // when an interval selection filter touches the scale.\n if (!hasScales && scaleTriggers.length) {\n signals.push({\n name: name + SCALE_TRIGGER,\n value: {},\n on: [\n {\n events: scaleTriggers.map(t => ({ scale: t.scaleName })),\n update: `${scaleTriggers.map(t => t.expr).join(' && ')} ? ${name + SCALE_TRIGGER} : {}`\n }\n ]\n });\n }\n // Only add an interval to the store if it has valid data extents. Data extents\n // are set to null if pixel extents are equal to account for intervals over\n // ordinal/nominal domains which, when inverted, will still produce a valid datum.\n const update = `unit: ${unitName(model)}, fields: ${fieldsSg}, values`;\n return signals.concat(Object.assign(Object.assign({ name: name + TUPLE }, (init ? { init: `{${update}: ${assembleInit(init)}}` } : {})), (dataSignals.length\n ? {\n on: [\n {\n events: [{ signal: dataSignals.join(' || ') }],\n update: `${dataSignals.join(' && ')} ? {${update}: [${dataSignals}]} : null`\n }\n ]\n }\n : {})));\n },\n marks: (model, selCmpt, marks) => {\n const name = selCmpt.name;\n const { x, y } = selCmpt.project.hasChannel;\n const xvname = x && x.signals.visual;\n const yvname = y && y.signals.visual;\n const store = `data(${stringValue(selCmpt.name + STORE)})`;\n // Do not add a brush if we're binding to scales\n // or we don't have a valid interval projection\n if (scales.defined(selCmpt) || (!x && !y)) {\n return marks;\n }\n const update = {\n x: x !== undefined ? { signal: `${xvname}[0]` } : { value: 0 },\n y: y !== undefined ? { signal: `${yvname}[0]` } : { value: 0 },\n x2: x !== undefined ? { signal: `${xvname}[1]` } : { field: { group: 'width' } },\n y2: y !== undefined ? { signal: `${yvname}[1]` } : { field: { group: 'height' } }\n };\n // If the selection is resolved to global, only a single interval is in\n // the store. Wrap brush mark's encodings with a production rule to test\n // this based on the `unit` property. Hide the brush mark if it corresponds\n // to a unit different from the one in the store.\n if (selCmpt.resolve === 'global') {\n for (const key of keys(update)) {\n update[key] = [\n Object.assign({ test: `${store}.length && ${store}[0].unit === ${unitName(model)}` }, update[key]),\n { value: 0 }\n ];\n }\n }\n // Two brush marks ensure that fill colors and other aesthetic choices do\n // not interefere with the core marks, but that the brushed region can still\n // be interacted with (e.g., dragging it around).\n const _a = selCmpt.mark, { fill, fillOpacity, cursor } = _a, stroke = __rest(_a, [\"fill\", \"fillOpacity\", \"cursor\"]);\n const vgStroke = keys(stroke).reduce((def, k) => {\n def[k] = [\n {\n test: [x !== undefined && `${xvname}[0] !== ${xvname}[1]`, y !== undefined && `${yvname}[0] !== ${yvname}[1]`]\n .filter(t => t)\n .join(' && '),\n value: stroke[k]\n },\n { value: null }\n ];\n return def;\n }, {});\n return [\n {\n name: `${name + BRUSH}_bg`,\n type: 'rect',\n clip: true,\n encode: {\n enter: {\n fill: { value: fill },\n fillOpacity: { value: fillOpacity }\n },\n update: update\n }\n },\n ...marks,\n {\n name: name + BRUSH,\n type: 'rect',\n clip: true,\n encode: {\n enter: Object.assign(Object.assign({}, (cursor ? { cursor: { value: cursor } } : {})), { fill: { value: 'transparent' } }),\n update: Object.assign(Object.assign({}, update), vgStroke)\n }\n }\n ];\n }\n};\nexport default interval;\n/**\n * Returns the visual and data signals for an interval selection.\n */\nfunction channelSignals(model, selCmpt, proj, init) {\n const channel = proj.channel;\n const vname = proj.signals.visual;\n const dname = proj.signals.data;\n const hasScales = scales.defined(selCmpt);\n const scaleName = stringValue(model.scaleName(channel));\n const scale = model.getScaleComponent(channel);\n const scaleType = scale ? scale.get('type') : undefined;\n const scaled = (str) => `scale(${scaleName}, ${str})`;\n const size = model.getSizeSignalRef(channel === X ? 'width' : 'height').signal;\n const coord = `${channel}(unit)`;\n const on = events(selCmpt, (def, evt) => {\n return [\n ...def,\n { events: evt.between[0], update: `[${coord}, ${coord}]` },\n { events: evt, update: `[${vname}[0], clamp(${coord}, 0, ${size})]` } // Brush End\n ];\n });\n // React to pan/zooms of continuous scales. Non-continuous scales\n // (band, point) cannot be pan/zoomed and any other changes\n // to their domains (e.g., filtering) should clear the brushes.\n on.push({\n events: { signal: selCmpt.name + SCALE_TRIGGER },\n update: hasContinuousDomain(scaleType) ? `[${scaled(`${dname}[0]`)}, ${scaled(`${dname}[1]`)}]` : `[0, 0]`\n });\n return hasScales\n ? [{ name: dname, on: [] }]\n : [\n Object.assign(Object.assign({ name: vname }, (init ? { init: assembleInit(init, true, scaled) } : { value: [] })), { on: on }),\n Object.assign(Object.assign({ name: dname }, (init ? { init: assembleInit(init) } : {})), { on: [\n {\n events: { signal: vname },\n update: `${vname}[0] === ${vname}[1] ? null : invert(${scaleName}, ${vname})`\n }\n ] })\n ];\n}\nfunction events(selCmpt, cb) {\n return selCmpt.events.reduce((on, evt) => {\n if (!evt.between) {\n warn(`${evt} is not an ordered event stream for interval selections.`);\n return on;\n }\n return cb(on, evt);\n }, []);\n}\n//# sourceMappingURL=interval.js.map","import { stringValue } from 'vega-util';\nimport { TUPLE, unitName } from '.';\nimport { vals } from '../../util';\nimport { BRUSH } from './interval';\nimport { TUPLE_FIELDS } from './project';\nconst point = {\n defined: selCmpt => selCmpt.type === 'point',\n signals: (model, selCmpt, signals) => {\n var _a;\n const name = selCmpt.name;\n const fieldsSg = name + TUPLE_FIELDS;\n const project = selCmpt.project;\n const datum = '(item().isVoronoi ? datum.datum : datum)';\n const values = project.items\n .map(p => {\n const fieldDef = model.fieldDef(p.channel);\n // Binned fields should capture extents, for a range test against the raw field.\n return (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.bin)\n ? `[${datum}[${stringValue(model.vgField(p.channel, {}))}], ` +\n `${datum}[${stringValue(model.vgField(p.channel, { binSuffix: 'end' }))}]]`\n : `${datum}[${stringValue(p.field)}]`;\n })\n .join(', ');\n // Only add a discrete selection to the store if a datum is present _and_\n // the interaction isn't occurring on a group mark. This guards against\n // polluting interactive state with invalid values in faceted displays\n // as the group marks are also data-driven. We force the update to account\n // for constant null states but varying toggles (e.g., shift-click in\n // whitespace followed by a click in whitespace; the store should only\n // be cleared on the second click).\n const update = `unit: ${unitName(model)}, fields: ${fieldsSg}, values`;\n const events = selCmpt.events;\n const brushes = vals((_a = model.component.selection) !== null && _a !== void 0 ? _a : {})\n .reduce((acc, cmpt) => {\n return cmpt.type === 'interval' ? acc.concat(cmpt.name + BRUSH) : acc;\n }, [])\n .map(b => `indexof(item().mark.name, '${b}') < 0`)\n .join(' && ');\n const test = `datum && item().mark.marktype !== 'group'` + (brushes ? ` && ${brushes}` : '');\n return signals.concat([\n {\n name: name + TUPLE,\n on: events\n ? [\n {\n events,\n update: `${test} ? {${update}: [${values}]} : null`,\n force: true\n }\n ]\n : []\n }\n ]);\n }\n};\nexport default point;\n//# sourceMappingURL=point.js.map","import { array } from 'vega-util';\nimport { isConditionalDef, isConditionalParameter } from '../../../channeldef';\nimport { expression } from '../../predicate';\nimport { parseSelectionPredicate } from '../../selection/parse';\n/**\n * Return a mixin that includes a Vega production rule for a Vega-Lite conditional channel definition\n * or a simple mixin if channel def has no condition.\n */\nexport function wrapCondition(model, channelDef, vgChannel, refFn) {\n const condition = isConditionalDef(channelDef) && channelDef.condition;\n const valueRef = refFn(channelDef);\n if (condition) {\n const conditions = array(condition);\n const vgConditions = conditions.map(c => {\n const conditionValueRef = refFn(c);\n if (isConditionalParameter(c)) {\n const { param, empty } = c;\n const test = parseSelectionPredicate(model, { param, empty });\n return Object.assign({ test }, conditionValueRef);\n }\n else {\n const test = expression(model, c.test); // FIXME: remove casting once TS is no longer dumb about it\n return Object.assign({ test }, conditionValueRef);\n }\n });\n return {\n [vgChannel]: [...vgConditions, ...(valueRef !== undefined ? [valueRef] : [])]\n };\n }\n else {\n return valueRef !== undefined ? { [vgChannel]: valueRef } : {};\n }\n}\n//# sourceMappingURL=conditional.js.map","import { getFormatMixins, isFieldOrDatumDef, isValueDef } from '../../../channeldef';\nimport { signalOrValueRef } from '../../common';\nimport { formatSignalRef } from '../../format';\nimport { wrapCondition } from './conditional';\nexport function text(model, channel = 'text') {\n const channelDef = model.encoding[channel];\n return wrapCondition(model, channelDef, channel, cDef => textRef(cDef, model.config));\n}\nexport function textRef(channelDef, config, expr = 'datum') {\n // text\n if (channelDef) {\n if (isValueDef(channelDef)) {\n return signalOrValueRef(channelDef.value);\n }\n if (isFieldOrDatumDef(channelDef)) {\n const { format, formatType } = getFormatMixins(channelDef);\n return formatSignalRef({ fieldOrDatumDef: channelDef, format, formatType, expr, config });\n }\n }\n return undefined;\n}\n//# sourceMappingURL=text.js.map","import { array, isArray, isObject, isString } from 'vega-util';\nimport { isBinned } from '../../../bin';\nimport { getMainRangeChannel, isXorY } from '../../../channel';\nimport { defaultTitle, getFieldDef, getFormatMixins, hasConditionalFieldDef, isFieldDef, isTypedFieldDef, vgField } from '../../../channeldef';\nimport { forEach } from '../../../encoding';\nimport { entries } from '../../../util';\nimport { isSignalRef } from '../../../vega.schema';\nimport { getMarkPropOrConfig } from '../../common';\nimport { binFormatExpression, formatSignalRef } from '../../format';\nimport { wrapCondition } from './conditional';\nimport { textRef } from './text';\nexport function tooltip(model, opt = {}) {\n const { encoding, markDef, config, stack } = model;\n const channelDef = encoding.tooltip;\n if (isArray(channelDef)) {\n return { tooltip: tooltipRefForEncoding({ tooltip: channelDef }, stack, config, opt) };\n }\n else {\n const datum = opt.reactiveGeom ? 'datum.datum' : 'datum';\n return wrapCondition(model, channelDef, 'tooltip', cDef => {\n // use valueRef based on channelDef first\n const tooltipRefFromChannelDef = textRef(cDef, config, datum);\n if (tooltipRefFromChannelDef) {\n return tooltipRefFromChannelDef;\n }\n if (cDef === null) {\n // Allow using encoding.tooltip = null to disable tooltip\n return undefined;\n }\n let markTooltip = getMarkPropOrConfig('tooltip', markDef, config);\n if (markTooltip === true) {\n markTooltip = { content: 'encoding' };\n }\n if (isString(markTooltip)) {\n return { value: markTooltip };\n }\n else if (isObject(markTooltip)) {\n // `tooltip` is `{fields: 'encodings' | 'fields'}`\n if (isSignalRef(markTooltip)) {\n return markTooltip;\n }\n else if (markTooltip.content === 'encoding') {\n return tooltipRefForEncoding(encoding, stack, config, opt);\n }\n else {\n return { signal: datum };\n }\n }\n return undefined;\n });\n }\n}\nexport function tooltipData(encoding, stack, config, { reactiveGeom } = {}) {\n const toSkip = {};\n const expr = reactiveGeom ? 'datum.datum' : 'datum';\n const tuples = [];\n function add(fDef, channel) {\n const mainChannel = getMainRangeChannel(channel);\n const fieldDef = isTypedFieldDef(fDef)\n ? fDef\n : Object.assign(Object.assign({}, fDef), { type: encoding[mainChannel].type // for secondary field def, copy type from main channel\n });\n const title = fieldDef.title || defaultTitle(fieldDef, config);\n const key = array(title).join(', ');\n let value;\n if (isXorY(channel)) {\n const channel2 = channel === 'x' ? 'x2' : 'y2';\n const fieldDef2 = getFieldDef(encoding[channel2]);\n if (isBinned(fieldDef.bin) && fieldDef2) {\n const startField = vgField(fieldDef, { expr });\n const endField = vgField(fieldDef2, { expr });\n const { format, formatType } = getFormatMixins(fieldDef);\n value = binFormatExpression(startField, endField, format, formatType, config);\n toSkip[channel2] = true;\n }\n else if (stack && stack.fieldChannel === channel && stack.offset === 'normalize') {\n const { format, formatType } = getFormatMixins(fieldDef);\n value = formatSignalRef({\n fieldOrDatumDef: fieldDef,\n format,\n formatType,\n expr,\n config,\n normalizeStack: true\n }).signal;\n }\n }\n value !== null && value !== void 0 ? value : (value = textRef(fieldDef, config, expr).signal);\n tuples.push({ channel, key, value });\n }\n forEach(encoding, (channelDef, channel) => {\n if (isFieldDef(channelDef)) {\n add(channelDef, channel);\n }\n else if (hasConditionalFieldDef(channelDef)) {\n add(channelDef.condition, channel);\n }\n });\n const out = {};\n for (const { channel, key, value } of tuples) {\n if (!toSkip[channel] && !out[key]) {\n out[key] = value;\n }\n }\n return out;\n}\nexport function tooltipRefForEncoding(encoding, stack, config, { reactiveGeom } = {}) {\n const data = tooltipData(encoding, stack, config, { reactiveGeom });\n const keyValues = entries(data).map(([key, value]) => `\"${key}\": ${value}`);\n return keyValues.length > 0 ? { signal: `{${keyValues.join(', ')}}` } : undefined;\n}\n//# sourceMappingURL=tooltip.js.map","import { entries, isEmpty } from '../../../util';\nimport { getMarkPropOrConfig, signalOrValueRef } from '../../common';\nimport { VG_MARK_INDEX } from './../../../vega.schema';\nimport { wrapCondition } from './conditional';\nimport { textRef } from './text';\nimport { tooltipData } from './tooltip';\nexport function aria(model) {\n const { markDef, config } = model;\n const enableAria = getMarkPropOrConfig('aria', markDef, config);\n // We can ignore other aria properties if ariaHidden is true.\n if (enableAria === false) {\n // getMarkGroups sets aria to false already so we don't have to set it in the encode block\n return {};\n }\n return Object.assign(Object.assign(Object.assign({}, (enableAria ? { aria: enableAria } : {})), ariaRoleDescription(model)), description(model));\n}\nfunction ariaRoleDescription(model) {\n const { mark, markDef, config } = model;\n if (config.aria === false) {\n return {};\n }\n const ariaRoleDesc = getMarkPropOrConfig('ariaRoleDescription', markDef, config);\n if (ariaRoleDesc != null) {\n return { ariaRoleDescription: { value: ariaRoleDesc } };\n }\n return mark in VG_MARK_INDEX ? {} : { ariaRoleDescription: { value: mark } };\n}\nexport function description(model) {\n const { encoding, markDef, config, stack } = model;\n const channelDef = encoding.description;\n if (channelDef) {\n return wrapCondition(model, channelDef, 'description', cDef => textRef(cDef, model.config));\n }\n // Use default from mark def or config if defined.\n // Functions in encode usually just return undefined but since we are defining a default below, we need to check the default here.\n const descriptionValue = getMarkPropOrConfig('description', markDef, config);\n if (descriptionValue != null) {\n return {\n description: signalOrValueRef(descriptionValue)\n };\n }\n if (config.aria === false) {\n return {};\n }\n const data = tooltipData(encoding, stack, config);\n if (isEmpty(data)) {\n return undefined;\n }\n return {\n description: {\n signal: entries(data)\n .map(([key, value], index) => `\"${index > 0 ? '; ' : ''}${key}: \" + (${value})`)\n .join(' + ')\n }\n };\n}\n//# sourceMappingURL=aria.js.map","import { getMarkPropOrConfig, signalOrValueRef } from '../../common';\nimport { wrapCondition } from './conditional';\nimport * as ref from './valueref';\n/**\n * Return encode for non-positional channels with scales. (Text doesn't have scale.)\n */\nexport function nonPosition(channel, model, opt = {}) {\n const { markDef, encoding, config } = model;\n const { vgChannel } = opt;\n let { defaultRef, defaultValue } = opt;\n if (defaultRef === undefined) {\n // prettier-ignore\n defaultValue !== null && defaultValue !== void 0 ? defaultValue : (defaultValue = getMarkPropOrConfig(channel, markDef, config, { vgChannel, ignoreVgConfig: true }));\n if (defaultValue !== undefined) {\n defaultRef = signalOrValueRef(defaultValue);\n }\n }\n const channelDef = encoding[channel];\n return wrapCondition(model, channelDef, vgChannel !== null && vgChannel !== void 0 ? vgChannel : channel, cDef => {\n return ref.midPoint({\n channel,\n channelDef: cDef,\n markDef,\n config,\n scaleName: model.scaleName(channel),\n scale: model.getScaleComponent(channel),\n stack: null,\n defaultRef\n });\n });\n}\n//# sourceMappingURL=nonposition.js.map","import * as log from '../../../log';\nimport { contains } from '../../../util';\nimport { getMarkPropOrConfig, signalOrValueRef } from '../../common';\nimport { nonPosition } from './nonposition';\nexport function color(model, opt = { filled: undefined }) {\n var _a, _b, _c, _d;\n const { markDef, encoding, config } = model;\n const { type: markType } = markDef;\n // Allow filled to be overridden (for trail's \"filled\")\n const filled = (_a = opt.filled) !== null && _a !== void 0 ? _a : getMarkPropOrConfig('filled', markDef, config);\n const transparentIfNeeded = contains(['bar', 'point', 'circle', 'square', 'geoshape'], markType)\n ? 'transparent'\n : undefined;\n const defaultFill = (_c = (_b = getMarkPropOrConfig(filled === true ? 'color' : undefined, markDef, config, { vgChannel: 'fill' })) !== null && _b !== void 0 ? _b : \n // need to add this manually as getMarkConfig normally drops config.mark[channel] if vgChannel is specified\n config.mark[filled === true && 'color']) !== null && _c !== void 0 ? _c : \n // If there is no fill, always fill symbols, bar, geoshape\n // with transparent fills https://github.com/vega/vega-lite/issues/1316\n transparentIfNeeded;\n const defaultStroke = (_d = getMarkPropOrConfig(filled === false ? 'color' : undefined, markDef, config, { vgChannel: 'stroke' })) !== null && _d !== void 0 ? _d : \n // need to add this manually as getMarkConfig normally drops config.mark[channel] if vgChannel is specified\n config.mark[filled === false && 'color'];\n const colorVgChannel = filled ? 'fill' : 'stroke';\n const fillStrokeMarkDefAndConfig = Object.assign(Object.assign({}, (defaultFill ? { fill: signalOrValueRef(defaultFill) } : {})), (defaultStroke ? { stroke: signalOrValueRef(defaultStroke) } : {}));\n if (markDef.color && (filled ? markDef.fill : markDef.stroke)) {\n log.warn(log.message.droppingColor('property', { fill: 'fill' in markDef, stroke: 'stroke' in markDef }));\n }\n return Object.assign(Object.assign(Object.assign(Object.assign({}, fillStrokeMarkDefAndConfig), nonPosition('color', model, {\n vgChannel: colorVgChannel,\n defaultValue: filled ? defaultFill : defaultStroke\n })), nonPosition('fill', model, {\n // if there is encoding.fill, include default fill just in case we have conditional-only fill encoding\n defaultValue: encoding.fill ? defaultFill : undefined\n })), nonPosition('stroke', model, {\n // if there is encoding.stroke, include default fill just in case we have conditional-only stroke encoding\n defaultValue: encoding.stroke ? defaultStroke : undefined\n }));\n}\n//# sourceMappingURL=color.js.map","import { getOffsetChannel } from '../../../channel';\nexport function getOffset(channel, markDef) {\n const offsetChannel = getOffsetChannel(channel);\n // TODO: in the future read from encoding channel too\n const markDefOffsetValue = markDef[offsetChannel];\n if (markDefOffsetValue) {\n return markDefOffsetValue;\n }\n return undefined;\n}\n//# sourceMappingURL=offset.js.map","import { getMainRangeChannel, getSecondaryRangeChannel, getSizeChannel, getVgPositionChannel, isXorY } from '../../../channel';\nimport { isFieldDef, isFieldOrDatumDef } from '../../../channeldef';\nimport { ScaleType } from '../../../scale';\nimport { contains } from '../../../util';\nimport { getMarkPropOrConfig } from '../../common';\nimport { getOffset } from './offset';\nimport * as ref from './valueref';\n/**\n * Return encode for point (non-band) position channels.\n */\nexport function pointPosition(channel, model, { defaultPos, vgChannel }) {\n const { encoding, markDef, config, stack } = model;\n const channelDef = encoding[channel];\n const channel2Def = encoding[getSecondaryRangeChannel(channel)];\n const scaleName = model.scaleName(channel);\n const scale = model.getScaleComponent(channel);\n const offset = getOffset(channel, markDef);\n // Get default position or position from mark def\n const defaultRef = pointPositionDefaultRef({\n model,\n defaultPos,\n channel,\n scaleName,\n scale\n });\n const valueRef = !channelDef && isXorY(channel) && (encoding.latitude || encoding.longitude)\n ? // use geopoint output if there are lat/long and there is no point position overriding lat/long.\n { field: model.getName(channel) }\n : positionRef({\n channel,\n channelDef,\n channel2Def,\n markDef,\n config,\n scaleName,\n scale,\n stack,\n offset,\n defaultRef\n });\n return valueRef ? { [vgChannel || channel]: valueRef } : undefined;\n}\n// TODO: we need to find a way to refactor these so that scaleName is a part of scale\n// but that's complicated. For now, this is a huge step moving forward.\n/**\n * @return Vega ValueRef for normal x- or y-position without projection\n */\nexport function positionRef(params) {\n const { channel, channelDef, scaleName, stack, offset, markDef } = params;\n // This isn't a part of midPoint because we use midPoint for non-position too\n if (isFieldOrDatumDef(channelDef) && stack && channel === stack.fieldChannel) {\n if (isFieldDef(channelDef)) {\n let bandPosition = channelDef.bandPosition;\n if (bandPosition === undefined && markDef.type === 'text' && (channel === 'radius' || channel === 'theta')) {\n // theta and radius of text mark should use bandPosition = 0.5 by default\n // so that labels for arc marks are centered automatically\n bandPosition = 0.5;\n }\n if (bandPosition !== undefined) {\n return ref.interpolatedSignalRef({\n scaleName,\n fieldOrDatumDef: channelDef,\n startSuffix: 'start',\n bandPosition,\n offset\n });\n }\n }\n // x or y use stack_end so that stacked line's point mark use stack_end too.\n return ref.valueRefForFieldOrDatumDef(channelDef, scaleName, { suffix: 'end' }, { offset });\n }\n return ref.midPointRefWithPositionInvalidTest(params);\n}\nexport function pointPositionDefaultRef({ model, defaultPos, channel, scaleName, scale }) {\n const { markDef, config } = model;\n return () => {\n const mainChannel = getMainRangeChannel(channel);\n const vgChannel = getVgPositionChannel(channel);\n const definedValueOrConfig = getMarkPropOrConfig(channel, markDef, config, { vgChannel });\n if (definedValueOrConfig !== undefined) {\n return ref.widthHeightValueOrSignalRef(channel, definedValueOrConfig);\n }\n switch (defaultPos) {\n case 'zeroOrMin':\n case 'zeroOrMax':\n if (scaleName) {\n const scaleType = scale.get('type');\n if (contains([ScaleType.LOG, ScaleType.TIME, ScaleType.UTC], scaleType)) {\n // Log scales cannot have zero.\n // Zero in time scale is arbitrary, and does not affect ratio.\n // (Time is an interval level of measurement, not ratio).\n // See https://en.wikipedia.org/wiki/Level_of_measurement for more info.\n }\n else {\n if (scale.domainDefinitelyIncludesZero()) {\n return {\n scale: scaleName,\n value: 0\n };\n }\n }\n }\n if (defaultPos === 'zeroOrMin') {\n return mainChannel === 'y' ? { field: { group: 'height' } } : { value: 0 };\n }\n else {\n // zeroOrMax\n switch (mainChannel) {\n case 'radius':\n // max of radius is min(width, height) / 2\n return {\n signal: `min(${model.width.signal},${model.height.signal})/2`\n };\n case 'theta':\n return { signal: '2*PI' };\n case 'x':\n return { field: { group: 'width' } };\n case 'y':\n return { value: 0 };\n }\n }\n break;\n case 'mid': {\n const sizeRef = model[getSizeChannel(channel)];\n return Object.assign(Object.assign({}, sizeRef), { mult: 0.5 });\n }\n }\n // defaultPos === null\n return undefined;\n };\n}\n//# sourceMappingURL=position-point.js.map","import { getVgPositionChannel } from '../../../channel';\nimport * as log from '../../../log';\nimport { isSignalRef } from '../../../vega.schema';\nimport { getMarkPropOrConfig } from '../../common';\nconst ALIGNED_X_CHANNEL = {\n left: 'x',\n center: 'xc',\n right: 'x2'\n};\nconst BASELINED_Y_CHANNEL = {\n top: 'y',\n middle: 'yc',\n bottom: 'y2'\n};\nexport function vgAlignedPositionChannel(channel, markDef, config, defaultAlign = 'middle') {\n if (channel === 'radius' || channel === 'theta') {\n return getVgPositionChannel(channel);\n }\n const alignChannel = channel === 'x' ? 'align' : 'baseline';\n const align = getMarkPropOrConfig(alignChannel, markDef, config);\n let alignExcludingSignal;\n if (isSignalRef(align)) {\n log.warn(log.message.rangeMarkAlignmentCannotBeExpression(alignChannel));\n alignExcludingSignal = undefined;\n }\n else {\n alignExcludingSignal = align;\n }\n if (channel === 'x') {\n return ALIGNED_X_CHANNEL[alignExcludingSignal || (defaultAlign === 'top' ? 'left' : 'center')];\n }\n else {\n return BASELINED_Y_CHANNEL[alignExcludingSignal || defaultAlign];\n }\n}\n//# sourceMappingURL=position-align.js.map","import { getMainRangeChannel, getSecondaryRangeChannel, getSizeChannel, getVgPositionChannel } from '../../../channel';\nimport { isFieldOrDatumDef } from '../../../channeldef';\nimport * as log from '../../../log';\nimport { isRelativeBandSize } from '../../../mark';\nimport { getMarkStyleConfig } from '../../common';\nimport { getOffset } from './offset';\nimport { vgAlignedPositionChannel } from './position-align';\nimport { pointPosition, pointPositionDefaultRef } from './position-point';\nimport * as ref from './valueref';\n/**\n * Utility for area/rule position, which can be either point or range.\n * (One of the axes should be point and the other should be range.)\n */\nexport function pointOrRangePosition(channel, model, { defaultPos, defaultPos2, range }) {\n if (range) {\n return rangePosition(channel, model, { defaultPos, defaultPos2 });\n }\n return pointPosition(channel, model, { defaultPos });\n}\nexport function rangePosition(channel, model, { defaultPos, defaultPos2 }) {\n const { markDef, config } = model;\n const channel2 = getSecondaryRangeChannel(channel);\n const sizeChannel = getSizeChannel(channel);\n const pos2Mixins = pointPosition2OrSize(model, defaultPos2, channel2);\n const vgChannel = pos2Mixins[sizeChannel]\n ? // If there is width/height, we need to position the marks based on the alignment.\n vgAlignedPositionChannel(channel, markDef, config)\n : // Otherwise, make sure to apply to the right Vg Channel (for arc mark)\n getVgPositionChannel(channel);\n return Object.assign(Object.assign({}, pointPosition(channel, model, { defaultPos, vgChannel })), pos2Mixins);\n}\n/**\n * Return encode for x2, y2.\n * If channel is not specified, return one channel based on orientation.\n */\nfunction pointPosition2OrSize(model, defaultPos, channel) {\n const { encoding, mark, markDef, stack, config } = model;\n const baseChannel = getMainRangeChannel(channel);\n const sizeChannel = getSizeChannel(channel);\n const vgChannel = getVgPositionChannel(channel);\n const channelDef = encoding[baseChannel];\n const scaleName = model.scaleName(baseChannel);\n const scale = model.getScaleComponent(baseChannel);\n const offset = channel in encoding || channel in markDef\n ? getOffset(channel, model.markDef)\n : getOffset(baseChannel, model.markDef);\n if (!channelDef && (channel === 'x2' || channel === 'y2') && (encoding.latitude || encoding.longitude)) {\n const vgSizeChannel = getSizeChannel(channel);\n const size = model.markDef[vgSizeChannel];\n if (size != null) {\n return {\n [vgSizeChannel]: { value: size }\n };\n }\n else {\n return {\n [vgChannel]: { field: model.getName(channel) }\n };\n }\n }\n const valueRef = position2Ref({\n channel,\n channelDef,\n channel2Def: encoding[channel],\n markDef,\n config,\n scaleName,\n scale,\n stack,\n offset,\n defaultRef: undefined\n });\n if (valueRef !== undefined) {\n return { [vgChannel]: valueRef };\n }\n // TODO: check width/height encoding here once we add them\n // no x2/y2 encoding, then try to read x2/y2 or width/height based on precedence:\n // markDef > config.style > mark-specific config (config[mark]) > general mark config (config.mark)\n return (position2orSize(channel, markDef) ||\n position2orSize(channel, {\n [channel]: getMarkStyleConfig(channel, markDef, config.style),\n [sizeChannel]: getMarkStyleConfig(sizeChannel, markDef, config.style)\n }) ||\n position2orSize(channel, config[mark]) ||\n position2orSize(channel, config.mark) || {\n [vgChannel]: pointPositionDefaultRef({\n model,\n defaultPos,\n channel,\n scaleName,\n scale\n })()\n });\n}\nexport function position2Ref({ channel, channelDef, channel2Def, markDef, config, scaleName, scale, stack, offset, defaultRef }) {\n if (isFieldOrDatumDef(channelDef) &&\n stack &&\n // If fieldChannel is X and channel is X2 (or Y and Y2)\n channel.charAt(0) === stack.fieldChannel.charAt(0)) {\n return ref.valueRefForFieldOrDatumDef(channelDef, scaleName, { suffix: 'start' }, { offset });\n }\n return ref.midPointRefWithPositionInvalidTest({\n channel,\n channelDef: channel2Def,\n scaleName,\n scale,\n stack,\n markDef,\n config,\n offset,\n defaultRef\n });\n}\nfunction position2orSize(channel, markDef) {\n const sizeChannel = getSizeChannel(channel);\n const vgChannel = getVgPositionChannel(channel);\n if (markDef[vgChannel] !== undefined) {\n return { [vgChannel]: ref.widthHeightValueOrSignalRef(channel, markDef[vgChannel]) };\n }\n else if (markDef[channel] !== undefined) {\n return { [vgChannel]: ref.widthHeightValueOrSignalRef(channel, markDef[channel]) };\n }\n else if (markDef[sizeChannel]) {\n const dimensionSize = markDef[sizeChannel];\n if (isRelativeBandSize(dimensionSize)) {\n log.warn(log.message.relativeBandSizeNotSupported(sizeChannel));\n }\n else {\n return { [sizeChannel]: ref.widthHeightValueOrSignalRef(channel, dimensionSize) };\n }\n }\n return undefined;\n}\n//# sourceMappingURL=position-range.js.map","import { isArray, isNumber } from 'vega-util';\nimport { isBinned, isBinning, isBinParams } from '../../../bin';\nimport { getSecondaryRangeChannel, getSizeChannel, getVgPositionChannel, isPolarPositionChannel, isXorY } from '../../../channel';\nimport { getBandSize, isFieldDef, isFieldOrDatumDef, vgField } from '../../../channeldef';\nimport { getViewConfigDiscreteStep } from '../../../config';\nimport * as log from '../../../log';\nimport { isRelativeBandSize } from '../../../mark';\nimport { hasDiscreteDomain } from '../../../scale';\nimport { isSignalRef, isVgRangeStep } from '../../../vega.schema';\nimport { getMarkPropOrConfig, signalOrStringValue, signalOrValueRef } from '../../common';\nimport { nonPosition } from './nonposition';\nimport { getOffset } from './offset';\nimport { vgAlignedPositionChannel } from './position-align';\nimport { pointPositionDefaultRef } from './position-point';\nimport { rangePosition } from './position-range';\nimport * as ref from './valueref';\nexport function rectPosition(model, channel, mark) {\n var _a, _b, _c, _d;\n const { config, encoding, markDef } = model;\n const channel2 = getSecondaryRangeChannel(channel);\n const sizeChannel = getSizeChannel(channel);\n const channelDef = encoding[channel];\n const channelDef2 = encoding[channel2];\n const scale = model.getScaleComponent(channel);\n const scaleType = scale ? scale.get('type') : undefined;\n const scaleName = model.scaleName(channel);\n const orient = markDef.orient;\n const hasSizeDef = (_b = (_a = encoding[sizeChannel]) !== null && _a !== void 0 ? _a : encoding.size) !== null && _b !== void 0 ? _b : getMarkPropOrConfig('size', markDef, config, { vgChannel: sizeChannel });\n const isBarBand = mark === 'bar' && (channel === 'x' ? orient === 'vertical' : orient === 'horizontal');\n // x, x2, and width -- we must specify two of these in all conditions\n if (isFieldDef(channelDef) &&\n (isBinning(channelDef.bin) || isBinned(channelDef.bin) || (channelDef.timeUnit && !channelDef2)) &&\n !(hasSizeDef && !isRelativeBandSize(hasSizeDef)) &&\n !hasDiscreteDomain(scaleType)) {\n const bandSize = getBandSize({ channel, fieldDef: channelDef, markDef, config, scaleType });\n const axis = (_c = model.component.axes[channel]) === null || _c === void 0 ? void 0 : _c[0];\n const axisTranslate = (_d = axis === null || axis === void 0 ? void 0 : axis.get('translate')) !== null && _d !== void 0 ? _d : 0.5; // vega default is 0.5\n return rectBinPosition({\n fieldDef: channelDef,\n fieldDef2: channelDef2,\n channel,\n markDef,\n scaleName,\n bandSize,\n axisTranslate,\n spacing: isXorY(channel) ? getMarkPropOrConfig('binSpacing', markDef, config) : undefined,\n reverse: scale.get('reverse'),\n config\n });\n }\n else if (((isFieldOrDatumDef(channelDef) && hasDiscreteDomain(scaleType)) || isBarBand) && !channelDef2) {\n return positionAndSize(channelDef, channel, model);\n }\n else {\n return rangePosition(channel, model, { defaultPos: 'zeroOrMax', defaultPos2: 'zeroOrMin' });\n }\n}\nfunction defaultSizeRef(sizeChannel, scaleName, scale, config, bandSize) {\n if (isRelativeBandSize(bandSize)) {\n if (scale) {\n const scaleType = scale.get('type');\n if (scaleType === 'band') {\n return { scale: scaleName, band: bandSize.band };\n }\n else if (bandSize.band !== 1) {\n log.warn(log.message.cannotUseRelativeBandSizeWithNonBandScale(scaleType));\n bandSize = undefined;\n }\n }\n else {\n return {\n mult: bandSize.band,\n field: { group: sizeChannel }\n };\n }\n }\n else if (isSignalRef(bandSize)) {\n return bandSize;\n }\n else if (bandSize) {\n return { value: bandSize };\n }\n // no valid band size\n if (scale) {\n const scaleRange = scale.get('range');\n if (isVgRangeStep(scaleRange) && isNumber(scaleRange.step)) {\n return { value: scaleRange.step - 2 };\n }\n }\n const defaultStep = getViewConfigDiscreteStep(config.view, sizeChannel);\n return { value: defaultStep - 2 };\n}\n/**\n * Output position encoding and its size encoding for continuous, point, and band scales.\n */\nfunction positionAndSize(fieldDef, channel, model) {\n const { markDef, encoding, config, stack } = model;\n const orient = markDef.orient;\n const scaleName = model.scaleName(channel);\n const scale = model.getScaleComponent(channel);\n const vgSizeChannel = getSizeChannel(channel);\n const channel2 = getSecondaryRangeChannel(channel);\n // use \"size\" channel for bars, if there is orient and the channel matches the right orientation\n const useVlSizeChannel = (orient === 'horizontal' && channel === 'y') || (orient === 'vertical' && channel === 'x');\n // Use size encoding / mark property / config if it exists\n let sizeMixins;\n if (encoding.size || markDef.size) {\n if (useVlSizeChannel) {\n sizeMixins = nonPosition('size', model, {\n vgChannel: vgSizeChannel,\n defaultRef: signalOrValueRef(markDef.size)\n });\n }\n else {\n log.warn(log.message.cannotApplySizeToNonOrientedMark(markDef.type));\n }\n }\n // Otherwise, apply default value\n const bandSize = getBandSize({ channel, fieldDef, markDef, config, scaleType: scale === null || scale === void 0 ? void 0 : scale.get('type'), useVlSizeChannel });\n sizeMixins = sizeMixins || { [vgSizeChannel]: defaultSizeRef(vgSizeChannel, scaleName, scale, config, bandSize) };\n /*\n Band scales with size value and all point scales, use xc/yc + band=0.5\n \n Otherwise (band scales that has size based on a band ref), use x/y with position band = (1 - size_band) / 2.\n In this case, size_band is the band specified in the x/y-encoding.\n By default band is 1, so `(1 - band) / 2` = 0.\n If band is 0.6, the the x/y position in such case should be `(1 - band) / 2` = 0.2\n */\n const defaultBandAlign = (scale === null || scale === void 0 ? void 0 : scale.get('type')) !== 'band' || !('band' in sizeMixins[vgSizeChannel]) ? 'middle' : 'top';\n const vgChannel = vgAlignedPositionChannel(channel, markDef, config, defaultBandAlign);\n const center = vgChannel === 'xc' || vgChannel === 'yc';\n const offset = getOffset(channel, markDef);\n const posRef = ref.midPointRefWithPositionInvalidTest({\n channel,\n channelDef: fieldDef,\n markDef,\n config,\n scaleName,\n scale,\n stack,\n offset,\n defaultRef: pointPositionDefaultRef({ model, defaultPos: 'mid', channel, scaleName, scale }),\n bandPosition: center\n ? 0.5\n : isSignalRef(bandSize)\n ? { signal: `(1-${bandSize})/2` }\n : isRelativeBandSize(bandSize)\n ? (1 - bandSize.band) / 2\n : 0\n });\n if (vgSizeChannel) {\n return Object.assign({ [vgChannel]: posRef }, sizeMixins);\n }\n else {\n // otherwise, we must simulate size by setting position2 = position + size\n // (for theta/radius since Vega doesn't have thetaWidth/radiusWidth)\n const vgChannel2 = getVgPositionChannel(channel2);\n const sizeRef = sizeMixins[vgSizeChannel];\n const sizeOffset = offset ? Object.assign(Object.assign({}, sizeRef), { offset }) : sizeRef;\n return {\n [vgChannel]: posRef,\n // posRef might be an array that wraps position invalid test\n [vgChannel2]: isArray(posRef)\n ? [posRef[0], Object.assign(Object.assign({}, posRef[1]), { offset: sizeOffset })]\n : Object.assign(Object.assign({}, posRef), { offset: sizeOffset })\n };\n }\n}\nfunction getBinSpacing(channel, spacing, reverse, translate, offset) {\n if (isPolarPositionChannel(channel)) {\n return 0;\n }\n const spacingOffset = channel === 'x' || channel === 'y2' ? -spacing / 2 : spacing / 2;\n if (isSignalRef(reverse) || isSignalRef(offset) || isSignalRef(translate)) {\n const reverseExpr = signalOrStringValue(reverse);\n const offsetExpr = signalOrStringValue(offset);\n const translateExpr = signalOrStringValue(translate);\n const t = translateExpr ? `${translateExpr} + ` : '';\n const r = reverseExpr ? `(${reverseExpr} ? -1 : 1) * ` : '';\n const o = offsetExpr ? `(${offsetExpr} + ${spacingOffset})` : spacingOffset;\n return {\n signal: t + r + o\n };\n }\n else {\n offset = offset || 0;\n return translate + (reverse ? -offset - spacingOffset : +offset + spacingOffset);\n }\n}\nexport function rectBinPosition({ fieldDef, fieldDef2, channel, bandSize, scaleName, markDef, spacing = 0, axisTranslate, reverse, config }) {\n const channel2 = getSecondaryRangeChannel(channel);\n const vgChannel = getVgPositionChannel(channel);\n const vgChannel2 = getVgPositionChannel(channel2);\n const offset = getOffset(channel, markDef);\n const bandPosition = isSignalRef(bandSize)\n ? { signal: `(1-${bandSize.signal})/2` }\n : isRelativeBandSize(bandSize)\n ? (1 - bandSize.band) / 2\n : 0.5;\n if (isBinning(fieldDef.bin) || fieldDef.timeUnit) {\n return {\n [vgChannel2]: rectBinRef({\n channel,\n fieldDef,\n scaleName,\n markDef,\n bandPosition,\n offset: getBinSpacing(channel2, spacing, reverse, axisTranslate, offset),\n config\n }),\n [vgChannel]: rectBinRef({\n channel,\n fieldDef,\n scaleName,\n markDef,\n bandPosition: isSignalRef(bandPosition) ? { signal: `1-${bandPosition.signal}` } : 1 - bandPosition,\n offset: getBinSpacing(channel, spacing, reverse, axisTranslate, offset),\n config\n })\n };\n }\n else if (isBinned(fieldDef.bin)) {\n const startRef = ref.valueRefForFieldOrDatumDef(fieldDef, scaleName, {}, { offset: getBinSpacing(channel2, spacing, reverse, axisTranslate, offset) });\n if (isFieldDef(fieldDef2)) {\n return {\n [vgChannel2]: startRef,\n [vgChannel]: ref.valueRefForFieldOrDatumDef(fieldDef2, scaleName, {}, { offset: getBinSpacing(channel, spacing, reverse, axisTranslate, offset) })\n };\n }\n else if (isBinParams(fieldDef.bin) && fieldDef.bin.step) {\n return {\n [vgChannel2]: startRef,\n [vgChannel]: {\n signal: `scale(\"${scaleName}\", ${vgField(fieldDef, { expr: 'datum' })} + ${fieldDef.bin.step})`,\n offset: getBinSpacing(channel, spacing, reverse, axisTranslate, offset)\n }\n };\n }\n }\n log.warn(log.message.channelRequiredForBinned(channel2));\n return undefined;\n}\n/**\n * Value Ref for binned fields\n */\nexport function rectBinRef({ channel, fieldDef, scaleName, markDef, bandPosition, offset, config }) {\n const r = ref.interpolatedSignalRef({\n scaleName,\n fieldOrDatumDef: fieldDef,\n bandPosition,\n offset\n });\n return ref.wrapPositionInvalidTest({\n fieldDef,\n channel,\n markDef,\n ref: r,\n config\n });\n}\n//# sourceMappingURL=position-rect.js.map","import { array } from 'vega-util';\nimport { SCALE_CHANNELS } from '../../../channel';\nimport { isPathMark } from '../../../mark';\nimport { hasContinuousDomain } from '../../../scale';\nimport { keys } from '../../../util';\nimport { VG_MARK_CONFIGS } from '../../../vega.schema';\nimport { getMarkPropOrConfig, signalOrValueRef } from '../../common';\nimport { aria } from './aria';\nimport { color } from './color';\nimport { nonPosition } from './nonposition';\nimport { text } from './text';\nimport { tooltip } from './tooltip';\nimport { fieldInvalidPredicate } from './valueref';\nimport { zindex } from './zindex';\nexport { color } from './color';\nexport { wrapCondition } from './conditional';\nexport { nonPosition } from './nonposition';\nexport { pointPosition } from './position-point';\nexport { pointOrRangePosition, rangePosition } from './position-range';\nexport { rectPosition } from './position-rect';\nexport { text } from './text';\nexport { tooltip } from './tooltip';\nconst ALWAYS_IGNORE = new Set(['aria', 'width', 'height']);\nexport function baseEncodeEntry(model, ignore) {\n const { fill = undefined, stroke = undefined } = ignore.color === 'include' ? color(model) : {};\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, markDefProperties(model.markDef, ignore)), wrapAllFieldsInvalid(model, 'fill', fill)), wrapAllFieldsInvalid(model, 'stroke', stroke)), nonPosition('opacity', model)), nonPosition('fillOpacity', model)), nonPosition('strokeOpacity', model)), nonPosition('strokeWidth', model)), nonPosition('strokeDash', model)), zindex(model)), tooltip(model)), text(model, 'href')), aria(model));\n}\n// TODO: mark VgValueRef[] as readonly after https://github.com/vega/vega/pull/1987\nfunction wrapAllFieldsInvalid(model, channel, valueRef) {\n const { config, mark, markDef } = model;\n const invalid = getMarkPropOrConfig('invalid', markDef, config);\n if (invalid === 'hide' && valueRef && !isPathMark(mark)) {\n // For non-path marks, we have to exclude invalid values (null and NaN) for scales with continuous domains.\n // For path marks, we will use \"defined\" property and skip these values instead.\n const test = allFieldsInvalidPredicate(model, { invalid: true, channels: SCALE_CHANNELS });\n if (test) {\n return {\n [channel]: [\n // prepend the invalid case\n // TODO: support custom value\n { test, value: null },\n ...array(valueRef)\n ]\n };\n }\n }\n return valueRef ? { [channel]: valueRef } : {};\n}\nfunction markDefProperties(mark, ignore) {\n return VG_MARK_CONFIGS.reduce((m, prop) => {\n if (!ALWAYS_IGNORE.has(prop) && mark[prop] !== undefined && ignore[prop] !== 'ignore') {\n m[prop] = signalOrValueRef(mark[prop]);\n }\n return m;\n }, {});\n}\nfunction allFieldsInvalidPredicate(model, { invalid = false, channels }) {\n const filterIndex = channels.reduce((aggregator, channel) => {\n const scaleComponent = model.getScaleComponent(channel);\n if (scaleComponent) {\n const scaleType = scaleComponent.get('type');\n const field = model.vgField(channel, { expr: 'datum' });\n // While discrete domain scales can handle invalid values, continuous scales can't.\n if (field && hasContinuousDomain(scaleType)) {\n aggregator[field] = true;\n }\n }\n return aggregator;\n }, {});\n const fields = keys(filterIndex);\n if (fields.length > 0) {\n const op = invalid ? '||' : '&&';\n return fields.map(field => fieldInvalidPredicate(field, invalid)).join(` ${op} `);\n }\n return undefined;\n}\n//# sourceMappingURL=base.js.map","import { isValueDef } from '../../../channeldef';\nimport { isPathMark } from '../../../mark';\nimport { signalOrValueRef } from '../../common';\nimport { wrapCondition } from './conditional';\nexport function zindex(model) {\n const { encoding, mark } = model;\n const order = encoding.order;\n if (!isPathMark(mark) && isValueDef(order)) {\n return wrapCondition(model, order, 'zindex', cd => signalOrValueRef(cd.value));\n }\n return {};\n}\n//# sourceMappingURL=zindex.js.map","import { POSITION_SCALE_CHANNELS } from '../../../channel';\nimport { hasContinuousDomain } from '../../../scale';\nimport { keys } from '../../../util';\nimport { getMarkPropOrConfig, signalOrValueRef } from '../../common';\nimport { fieldInvalidPredicate } from './valueref';\nexport function defined(model) {\n const { config, markDef } = model;\n const invalid = getMarkPropOrConfig('invalid', markDef, config);\n if (invalid) {\n const signal = allFieldsInvalidPredicate(model, { channels: POSITION_SCALE_CHANNELS });\n if (signal) {\n return { defined: { signal } };\n }\n }\n return {};\n}\nfunction allFieldsInvalidPredicate(model, { invalid = false, channels }) {\n const filterIndex = channels.reduce((aggregator, channel) => {\n const scaleComponent = model.getScaleComponent(channel);\n if (scaleComponent) {\n const scaleType = scaleComponent.get('type');\n const field = model.vgField(channel, { expr: 'datum' });\n // While discrete domain scales can handle invalid values, continuous scales can't.\n if (field && hasContinuousDomain(scaleType)) {\n aggregator[field] = true;\n }\n }\n return aggregator;\n }, {});\n const fields = keys(filterIndex);\n if (fields.length > 0) {\n const op = invalid ? '||' : '&&';\n return fields.map(field => fieldInvalidPredicate(field, invalid)).join(` ${op} `);\n }\n return undefined;\n}\nexport function valueIfDefined(prop, value) {\n if (value !== undefined) {\n return { [prop]: signalOrValueRef(value) };\n }\n return undefined;\n}\n//# sourceMappingURL=defined.js.map","import * as log from '../../log';\nimport { isPathMark } from '../../mark';\nimport { tooltip } from '../mark/encode';\nconst VORONOI = 'voronoi';\nconst nearest = {\n defined: selCmpt => {\n return selCmpt.type === 'point' && selCmpt.nearest;\n },\n parse: (model, selCmpt) => {\n // Scope selection events to the voronoi mark to prevent capturing\n // events that occur on the group mark (https://github.com/vega/vega/issues/2112).\n if (selCmpt.events) {\n for (const s of selCmpt.events) {\n s.markname = model.getName(VORONOI);\n }\n }\n },\n marks: (model, selCmpt, marks) => {\n const { x, y } = selCmpt.project.hasChannel;\n const markType = model.mark;\n if (isPathMark(markType)) {\n log.warn(log.message.nearestNotSupportForContinuous(markType));\n return marks;\n }\n const cellDef = {\n name: model.getName(VORONOI),\n type: 'path',\n interactive: true,\n from: { data: model.getName('marks') },\n encode: {\n update: Object.assign({ fill: { value: 'transparent' }, strokeWidth: { value: 0.35 }, stroke: { value: 'transparent' }, isVoronoi: { value: true } }, tooltip(model, { reactiveGeom: true }))\n },\n transform: [\n {\n type: 'voronoi',\n x: { expr: x || !y ? 'datum.datum.x || 0' : '0' },\n y: { expr: y || !x ? 'datum.datum.y || 0' : '0' },\n size: [model.getSizeSignalRef('width'), model.getSizeSignalRef('height')]\n }\n ]\n };\n let index = 0;\n let exists = false;\n marks.forEach((mark, i) => {\n var _a;\n const name = (_a = mark.name) !== null && _a !== void 0 ? _a : '';\n if (name === model.component.mark[0].name) {\n index = i;\n }\n else if (name.indexOf(VORONOI) >= 0) {\n exists = true;\n }\n });\n if (!exists) {\n marks.splice(index + 1, 0, cellDef);\n }\n return marks;\n }\n};\nexport default nearest;\n//# sourceMappingURL=nearest.js.map","import { stringValue } from 'vega-util';\nimport { disableDirectManipulation, TUPLE } from '.';\nimport { varName } from '../../util';\nimport { assembleInit } from './assemble';\nimport nearest from './nearest';\nimport { TUPLE_FIELDS } from './project';\nimport { isLegendBinding } from '../../selection';\nconst inputBindings = {\n defined: selCmpt => {\n return (selCmpt.type === 'point' &&\n selCmpt.resolve === 'global' &&\n selCmpt.bind &&\n selCmpt.bind !== 'scales' &&\n !isLegendBinding(selCmpt.bind));\n },\n parse: (model, selCmpt, selDef) => disableDirectManipulation(selCmpt, selDef),\n topLevelSignals: (model, selCmpt, signals) => {\n const name = selCmpt.name;\n const proj = selCmpt.project;\n const bind = selCmpt.bind;\n const init = selCmpt.init && selCmpt.init[0]; // Can only exist on single selections (one initial value).\n const datum = nearest.defined(selCmpt) ? '(item().isVoronoi ? datum.datum : datum)' : 'datum';\n proj.items.forEach((p, i) => {\n var _a, _b;\n const sgname = varName(`${name}_${p.field}`);\n const hasSignal = signals.filter(s => s.name === sgname);\n if (!hasSignal.length) {\n signals.unshift(Object.assign(Object.assign({ name: sgname }, (init ? { init: assembleInit(init[i]) } : { value: null })), { on: selCmpt.events\n ? [\n {\n events: selCmpt.events,\n update: `datum && item().mark.marktype !== 'group' ? ${datum}[${stringValue(p.field)}] : null`\n }\n ]\n : [], bind: (_b = (_a = bind[p.field]) !== null && _a !== void 0 ? _a : bind[p.channel]) !== null && _b !== void 0 ? _b : bind }));\n }\n });\n return signals;\n },\n signals: (model, selCmpt, signals) => {\n const name = selCmpt.name;\n const proj = selCmpt.project;\n const signal = signals.filter(s => s.name === name + TUPLE)[0];\n const fields = name + TUPLE_FIELDS;\n const values = proj.items.map(p => varName(`${name}_${p.field}`));\n const valid = values.map(v => `${v} !== null`).join(' && ');\n if (values.length) {\n signal.update = `${valid} ? {fields: ${fields}, values: [${values.join(', ')}]} : null`;\n }\n delete signal.value;\n delete signal.on;\n return signals;\n }\n};\nexport default inputBindings;\n//# sourceMappingURL=inputs.js.map","import { TUPLE, unitName } from '.';\nexport const TOGGLE = '_toggle';\nconst toggle = {\n defined: selCmpt => {\n return selCmpt.type === 'point' && !!selCmpt.toggle;\n },\n signals: (model, selCmpt, signals) => {\n return signals.concat({\n name: selCmpt.name + TOGGLE,\n value: false,\n on: [{ events: selCmpt.events, update: selCmpt.toggle }]\n });\n },\n modifyExpr: (model, selCmpt) => {\n const tpl = selCmpt.name + TUPLE;\n const signal = selCmpt.name + TOGGLE;\n return (`${signal} ? null : ${tpl}, ` +\n (selCmpt.resolve === 'global' ? `${signal} ? null : true, ` : `${signal} ? null : {unit: ${unitName(model)}}, `) +\n `${signal} ? ${tpl} : null`);\n }\n};\nexport default toggle;\n//# sourceMappingURL=toggle.js.map","import { selector as parseSelector } from 'vega-event-selector';\nimport { isString } from 'vega-util';\nimport { TUPLE } from '.';\nimport { varName } from '../../util';\nimport inputBindings from './inputs';\nimport toggle, { TOGGLE } from './toggle';\nconst clear = {\n defined: selCmpt => {\n return selCmpt.clear !== undefined && selCmpt.clear !== false;\n },\n parse: (model, selCmpt) => {\n if (selCmpt.clear) {\n selCmpt.clear = isString(selCmpt.clear) ? parseSelector(selCmpt.clear, 'view') : selCmpt.clear;\n }\n },\n topLevelSignals: (model, selCmpt, signals) => {\n if (inputBindings.defined(selCmpt)) {\n for (const proj of selCmpt.project.items) {\n const idx = signals.findIndex(n => n.name === varName(`${selCmpt.name}_${proj.field}`));\n if (idx !== -1) {\n signals[idx].on.push({ events: selCmpt.clear, update: 'null' });\n }\n }\n }\n return signals;\n },\n signals: (model, selCmpt, signals) => {\n function addClear(idx, update) {\n if (idx !== -1 && signals[idx].on) {\n signals[idx].on.push({ events: selCmpt.clear, update });\n }\n }\n // Be as minimalist as possible when adding clear triggers to minimize dataflow execution.\n if (selCmpt.type === 'interval') {\n for (const proj of selCmpt.project.items) {\n const vIdx = signals.findIndex(n => n.name === proj.signals.visual);\n addClear(vIdx, '[0, 0]');\n if (vIdx === -1) {\n const dIdx = signals.findIndex(n => n.name === proj.signals.data);\n addClear(dIdx, 'null');\n }\n }\n }\n else {\n let tIdx = signals.findIndex(n => n.name === selCmpt.name + TUPLE);\n addClear(tIdx, 'null');\n if (toggle.defined(selCmpt)) {\n tIdx = signals.findIndex(n => n.name === selCmpt.name + TOGGLE);\n addClear(tIdx, 'false');\n }\n }\n return signals;\n }\n};\nexport default clear;\n//# sourceMappingURL=clear.js.map","import { isObject } from 'vega';\nimport { selector as parseSelector } from 'vega-event-selector';\nimport { array, isString } from 'vega-util';\nimport { disableDirectManipulation, TUPLE } from '.';\nimport * as log from '../../log';\nimport { isLegendBinding, isLegendStreamBinding, SELECTION_ID } from '../../selection';\nimport { duplicate, vals, varName } from '../../util';\nimport { TUPLE_FIELDS } from './project';\nimport { TOGGLE } from './toggle';\nconst legendBindings = {\n defined: selCmpt => {\n const spec = selCmpt.resolve === 'global' && selCmpt.bind && isLegendBinding(selCmpt.bind);\n const projLen = selCmpt.project.items.length === 1 && selCmpt.project.items[0].field !== SELECTION_ID;\n if (spec && !projLen) {\n log.warn(log.message.LEGEND_BINDINGS_MUST_HAVE_PROJECTION);\n }\n return spec && projLen;\n },\n parse: (model, selCmpt, selDef) => {\n var _a;\n // Allow legend items to be toggleable by default even though direct manipulation is disabled.\n const selDef_ = duplicate(selDef);\n selDef_.select = isString(selDef_.select)\n ? { type: selDef_.select, toggle: selCmpt.toggle }\n : Object.assign(Object.assign({}, selDef_.select), { toggle: selCmpt.toggle });\n disableDirectManipulation(selCmpt, selDef_);\n if (isObject(selDef.select) && (selDef.select.on || selDef.select.clear)) {\n const legendFilter = 'event.item && indexof(event.item.mark.role, \"legend\") < 0';\n for (const evt of selCmpt.events) {\n evt.filter = array((_a = evt.filter) !== null && _a !== void 0 ? _a : []);\n if (!evt.filter.includes(legendFilter)) {\n evt.filter.push(legendFilter);\n }\n }\n }\n const evt = isLegendStreamBinding(selCmpt.bind) ? selCmpt.bind.legend : 'click';\n const stream = isString(evt) ? parseSelector(evt, 'view') : array(evt);\n selCmpt.bind = { legend: { merge: stream } };\n },\n topLevelSignals: (model, selCmpt, signals) => {\n const selName = selCmpt.name;\n const stream = isLegendStreamBinding(selCmpt.bind) && selCmpt.bind.legend;\n const markName = (name) => (s) => {\n const ds = duplicate(s);\n ds.markname = name;\n return ds;\n };\n for (const proj of selCmpt.project.items) {\n if (!proj.hasLegend)\n continue;\n const prefix = `${varName(proj.field)}_legend`;\n const sgName = `${selName}_${prefix}`;\n const hasSignal = signals.filter(s => s.name === sgName);\n if (hasSignal.length === 0) {\n const events = stream.merge\n .map(markName(`${prefix}_symbols`))\n .concat(stream.merge.map(markName(`${prefix}_labels`)))\n .concat(stream.merge.map(markName(`${prefix}_entries`)));\n signals.unshift(Object.assign(Object.assign({ name: sgName }, (!selCmpt.init ? { value: null } : {})), { on: [\n // Legend entries do not store values, so we need to walk the scenegraph to the symbol datum.\n { events, update: 'datum.value || item().items[0].items[0].datum.value', force: true },\n { events: stream.merge, update: `!event.item || !datum ? null : ${sgName}`, force: true }\n ] }));\n }\n }\n return signals;\n },\n signals: (model, selCmpt, signals) => {\n const name = selCmpt.name;\n const proj = selCmpt.project;\n const tuple = signals.find(s => s.name === name + TUPLE);\n const fields = name + TUPLE_FIELDS;\n const values = proj.items.filter(p => p.hasLegend).map(p => varName(`${name}_${varName(p.field)}_legend`));\n const valid = values.map(v => `${v} !== null`).join(' && ');\n const update = `${valid} ? {fields: ${fields}, values: [${values.join(', ')}]} : null`;\n if (selCmpt.events && values.length > 0) {\n tuple.on.push({\n events: values.map(signal => ({ signal })),\n update\n });\n }\n else if (values.length > 0) {\n tuple.update = update;\n delete tuple.value;\n delete tuple.on;\n }\n const toggle = signals.find(s => s.name === name + TOGGLE);\n const events = isLegendStreamBinding(selCmpt.bind) && selCmpt.bind.legend;\n if (toggle) {\n if (!selCmpt.events)\n toggle.on[0].events = events;\n else\n toggle.on.push(Object.assign(Object.assign({}, toggle.on[0]), { events }));\n }\n return signals;\n }\n};\nexport default legendBindings;\nexport function parseInteractiveLegend(model, channel, legendCmpt) {\n var _a, _b, _c, _d;\n const field = (_a = model.fieldDef(channel)) === null || _a === void 0 ? void 0 : _a.field;\n for (const selCmpt of vals((_b = model.component.selection) !== null && _b !== void 0 ? _b : {})) {\n const proj = (_c = selCmpt.project.hasField[field]) !== null && _c !== void 0 ? _c : selCmpt.project.hasChannel[channel];\n if (proj && legendBindings.defined(selCmpt)) {\n const legendSelections = (_d = legendCmpt.get('selections')) !== null && _d !== void 0 ? _d : [];\n legendSelections.push(selCmpt.name);\n legendCmpt.set('selections', legendSelections, false);\n proj.hasLegend = true;\n }\n }\n}\n//# sourceMappingURL=legends.js.map","import { selector as parseSelector } from 'vega-event-selector';\nimport { X, Y } from '../../channel';\nimport { BRUSH as INTERVAL_BRUSH } from './interval';\nimport scalesCompiler, { domain } from './scales';\nconst ANCHOR = '_translate_anchor';\nconst DELTA = '_translate_delta';\nconst translate = {\n defined: selCmpt => {\n return selCmpt.type === 'interval' && selCmpt.translate;\n },\n signals: (model, selCmpt, signals) => {\n const name = selCmpt.name;\n const hasScales = scalesCompiler.defined(selCmpt);\n const anchor = name + ANCHOR;\n const { x, y } = selCmpt.project.hasChannel;\n let events = parseSelector(selCmpt.translate, 'scope');\n if (!hasScales) {\n events = events.map(e => ((e.between[0].markname = name + INTERVAL_BRUSH), e));\n }\n signals.push({\n name: anchor,\n value: {},\n on: [\n {\n events: events.map(e => e.between[0]),\n update: '{x: x(unit), y: y(unit)' +\n (x !== undefined ? `, extent_x: ${hasScales ? domain(model, X) : `slice(${x.signals.visual})`}` : '') +\n (y !== undefined ? `, extent_y: ${hasScales ? domain(model, Y) : `slice(${y.signals.visual})`}` : '') +\n '}'\n }\n ]\n }, {\n name: name + DELTA,\n value: {},\n on: [\n {\n events: events,\n update: `{x: ${anchor}.x - x(unit), y: ${anchor}.y - y(unit)}`\n }\n ]\n });\n if (x !== undefined) {\n onDelta(model, selCmpt, x, 'width', signals);\n }\n if (y !== undefined) {\n onDelta(model, selCmpt, y, 'height', signals);\n }\n return signals;\n }\n};\nexport default translate;\nfunction onDelta(model, selCmpt, proj, size, signals) {\n var _a, _b;\n const name = selCmpt.name;\n const anchor = name + ANCHOR;\n const delta = name + DELTA;\n const channel = proj.channel;\n const hasScales = scalesCompiler.defined(selCmpt);\n const signal = signals.filter(s => s.name === proj.signals[hasScales ? 'data' : 'visual'])[0];\n const sizeSg = model.getSizeSignalRef(size).signal;\n const scaleCmpt = model.getScaleComponent(channel);\n const scaleType = scaleCmpt.get('type');\n const reversed = scaleCmpt.get('reverse'); // scale parsing sets this flag for fieldDef.sort\n const sign = !hasScales ? '' : channel === X ? (reversed ? '' : '-') : reversed ? '-' : '';\n const extent = `${anchor}.extent_${channel}`;\n const offset = `${sign}${delta}.${channel} / ${hasScales ? `${sizeSg}` : `span(${extent})`}`;\n const panFn = !hasScales\n ? 'panLinear'\n : scaleType === 'log'\n ? 'panLog'\n : scaleType === 'symlog'\n ? 'panSymlog'\n : scaleType === 'pow'\n ? 'panPow'\n : 'panLinear';\n const arg = !hasScales\n ? ''\n : scaleType === 'pow'\n ? `, ${(_a = scaleCmpt.get('exponent')) !== null && _a !== void 0 ? _a : 1}`\n : scaleType === 'symlog'\n ? `, ${(_b = scaleCmpt.get('constant')) !== null && _b !== void 0 ? _b : 1}`\n : '';\n const update = `${panFn}(${extent}, ${offset}${arg})`;\n signal.on.push({\n events: { signal: delta },\n update: hasScales ? update : `clampRange(${update}, 0, ${sizeSg})`\n });\n}\n//# sourceMappingURL=translate.js.map","import { selector as parseSelector } from 'vega-event-selector';\nimport { stringValue } from 'vega-util';\nimport { X, Y } from '../../channel';\nimport { BRUSH as INTERVAL_BRUSH } from './interval';\nimport { default as scalesCompiler, domain } from './scales';\nconst ANCHOR = '_zoom_anchor';\nconst DELTA = '_zoom_delta';\nconst zoom = {\n defined: selCmpt => {\n return selCmpt.type === 'interval' && selCmpt.zoom;\n },\n signals: (model, selCmpt, signals) => {\n const name = selCmpt.name;\n const hasScales = scalesCompiler.defined(selCmpt);\n const delta = name + DELTA;\n const { x, y } = selCmpt.project.hasChannel;\n const sx = stringValue(model.scaleName(X));\n const sy = stringValue(model.scaleName(Y));\n let events = parseSelector(selCmpt.zoom, 'scope');\n if (!hasScales) {\n events = events.map(e => ((e.markname = name + INTERVAL_BRUSH), e));\n }\n signals.push({\n name: name + ANCHOR,\n on: [\n {\n events: events,\n update: !hasScales\n ? `{x: x(unit), y: y(unit)}`\n : '{' +\n [sx ? `x: invert(${sx}, x(unit))` : '', sy ? `y: invert(${sy}, y(unit))` : '']\n .filter(expr => !!expr)\n .join(', ') +\n '}'\n }\n ]\n }, {\n name: delta,\n on: [\n {\n events: events,\n force: true,\n update: 'pow(1.001, event.deltaY * pow(16, event.deltaMode))'\n }\n ]\n });\n if (x !== undefined) {\n onDelta(model, selCmpt, x, 'width', signals);\n }\n if (y !== undefined) {\n onDelta(model, selCmpt, y, 'height', signals);\n }\n return signals;\n }\n};\nexport default zoom;\nfunction onDelta(model, selCmpt, proj, size, signals) {\n var _a, _b;\n const name = selCmpt.name;\n const channel = proj.channel;\n const hasScales = scalesCompiler.defined(selCmpt);\n const signal = signals.filter(s => s.name === proj.signals[hasScales ? 'data' : 'visual'])[0];\n const sizeSg = model.getSizeSignalRef(size).signal;\n const scaleCmpt = model.getScaleComponent(channel);\n const scaleType = scaleCmpt.get('type');\n const base = hasScales ? domain(model, channel) : signal.name;\n const delta = name + DELTA;\n const anchor = `${name}${ANCHOR}.${channel}`;\n const zoomFn = !hasScales\n ? 'zoomLinear'\n : scaleType === 'log'\n ? 'zoomLog'\n : scaleType === 'symlog'\n ? 'zoomSymlog'\n : scaleType === 'pow'\n ? 'zoomPow'\n : 'zoomLinear';\n const arg = !hasScales\n ? ''\n : scaleType === 'pow'\n ? `, ${(_a = scaleCmpt.get('exponent')) !== null && _a !== void 0 ? _a : 1}`\n : scaleType === 'symlog'\n ? `, ${(_b = scaleCmpt.get('constant')) !== null && _b !== void 0 ? _b : 1}`\n : '';\n const update = `${zoomFn}(${base}, ${anchor}, ${delta}${arg})`;\n signal.on.push({\n events: { signal: delta },\n update: hasScales ? update : `clampRange(${update}, 0, ${sizeSg})`\n });\n}\n//# sourceMappingURL=zoom.js.map","import { isString } from 'vega';\nimport { stringValue } from 'vega-util';\nimport { FACET_CHANNELS } from '../../channel';\nimport { SELECTION_ID } from '../../selection';\nimport { vals } from '../../util';\nimport { isFacetModel } from '../model';\nimport interval from './interval';\nimport point from './point';\nimport clear from './clear';\nimport inputs from './inputs';\nimport nearest from './nearest';\nimport project from './project';\nimport scales from './scales';\nimport legends from './legends';\nimport toggle from './toggle';\nimport translate from './translate';\nimport zoom from './zoom';\nexport const STORE = '_store';\nexport const TUPLE = '_tuple';\nexport const MODIFY = '_modify';\nexport const SELECTION_DOMAIN = '_selection_domain_';\nexport const VL_SELECTION_RESOLVE = 'vlSelectionResolve';\n// Order matters for parsing and assembly.\nexport const selectionCompilers = [\n point,\n interval,\n project,\n toggle,\n // Bindings may disable direct manipulation.\n inputs,\n scales,\n legends,\n clear,\n translate,\n zoom,\n nearest\n];\nfunction getFacetModel(model) {\n let parent = model.parent;\n while (parent) {\n if (isFacetModel(parent))\n break;\n parent = parent.parent;\n }\n return parent;\n}\nexport function unitName(model, { escape } = { escape: true }) {\n let name = escape ? stringValue(model.name) : model.name;\n const facetModel = getFacetModel(model);\n if (facetModel) {\n const { facet } = facetModel;\n for (const channel of FACET_CHANNELS) {\n if (facet[channel]) {\n name += ` + '__facet_${channel}_' + (facet[${stringValue(facetModel.vgField(channel))}])`;\n }\n }\n }\n return name;\n}\nexport function requiresSelectionId(model) {\n var _a;\n return vals((_a = model.component.selection) !== null && _a !== void 0 ? _a : {}).reduce((identifier, selCmpt) => {\n return identifier || selCmpt.project.items.some(proj => proj.field === SELECTION_ID);\n }, false);\n}\n// Binding a point selection to query widgets or legends disables default direct manipulation interaction.\n// A user can choose to re-enable it by explicitly specifying triggering input events.\nexport function disableDirectManipulation(selCmpt, selDef) {\n if (isString(selDef.select) || !selDef.select.on)\n delete selCmpt.events;\n if (isString(selDef.select) || !selDef.select.clear)\n delete selCmpt.clear;\n if (isString(selDef.select) || !selDef.select.toggle)\n delete selCmpt.toggle;\n}\n//# sourceMappingURL=index.js.map","import { error, toSet, isFunction, isString, hasOwnProperty } from 'vega-util';\n\nconst RawCode = 'RawCode';\nconst Literal = 'Literal';\nconst Property = 'Property';\nconst Identifier = 'Identifier';\nconst ArrayExpression = 'ArrayExpression';\nconst BinaryExpression = 'BinaryExpression';\nconst CallExpression = 'CallExpression';\nconst ConditionalExpression = 'ConditionalExpression';\nconst LogicalExpression = 'LogicalExpression';\nconst MemberExpression = 'MemberExpression';\nconst ObjectExpression = 'ObjectExpression';\nconst UnaryExpression = 'UnaryExpression';\nfunction ASTNode(type) {\n this.type = type;\n}\n\nASTNode.prototype.visit = function (visitor) {\n let c, i, n;\n if (visitor(this)) return 1;\n\n for (c = children(this), i = 0, n = c.length; i < n; ++i) {\n if (c[i].visit(visitor)) return 1;\n }\n};\n\nfunction children(node) {\n switch (node.type) {\n case ArrayExpression:\n return node.elements;\n\n case BinaryExpression:\n case LogicalExpression:\n return [node.left, node.right];\n\n case CallExpression:\n return [node.callee].concat(node.arguments);\n\n case ConditionalExpression:\n return [node.test, node.consequent, node.alternate];\n\n case MemberExpression:\n return [node.object, node.property];\n\n case ObjectExpression:\n return node.properties;\n\n case Property:\n return [node.key, node.value];\n\n case UnaryExpression:\n return [node.argument];\n\n case Identifier:\n case Literal:\n case RawCode:\n default:\n return [];\n }\n}\n\n/*\n The following expression parser is based on Esprima (http://esprima.org/).\n Original header comment and license for Esprima is included here:\n\n Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>\n Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>\n Copyright (C) 2013 Mathias Bynens <mathias@qiwi.be>\n Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>\n Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>\n Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>\n Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>\n Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>\n Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>\n Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\nvar TokenName, source, index, length, lookahead;\nvar TokenBooleanLiteral = 1,\n TokenEOF = 2,\n TokenIdentifier = 3,\n TokenKeyword = 4,\n TokenNullLiteral = 5,\n TokenNumericLiteral = 6,\n TokenPunctuator = 7,\n TokenStringLiteral = 8,\n TokenRegularExpression = 9;\nTokenName = {};\nTokenName[TokenBooleanLiteral] = 'Boolean';\nTokenName[TokenEOF] = '<end>';\nTokenName[TokenIdentifier] = 'Identifier';\nTokenName[TokenKeyword] = 'Keyword';\nTokenName[TokenNullLiteral] = 'Null';\nTokenName[TokenNumericLiteral] = 'Numeric';\nTokenName[TokenPunctuator] = 'Punctuator';\nTokenName[TokenStringLiteral] = 'String';\nTokenName[TokenRegularExpression] = 'RegularExpression';\nvar SyntaxArrayExpression = 'ArrayExpression',\n SyntaxBinaryExpression = 'BinaryExpression',\n SyntaxCallExpression = 'CallExpression',\n SyntaxConditionalExpression = 'ConditionalExpression',\n SyntaxIdentifier = 'Identifier',\n SyntaxLiteral = 'Literal',\n SyntaxLogicalExpression = 'LogicalExpression',\n SyntaxMemberExpression = 'MemberExpression',\n SyntaxObjectExpression = 'ObjectExpression',\n SyntaxProperty = 'Property',\n SyntaxUnaryExpression = 'UnaryExpression'; // Error messages should be identical to V8.\n\nvar MessageUnexpectedToken = 'Unexpected token %0',\n MessageUnexpectedNumber = 'Unexpected number',\n MessageUnexpectedString = 'Unexpected string',\n MessageUnexpectedIdentifier = 'Unexpected identifier',\n MessageUnexpectedReserved = 'Unexpected reserved word',\n MessageUnexpectedEOS = 'Unexpected end of input',\n MessageInvalidRegExp = 'Invalid regular expression',\n MessageUnterminatedRegExp = 'Invalid regular expression: missing /',\n MessageStrictOctalLiteral = 'Octal literals are not allowed in strict mode.',\n MessageStrictDuplicateProperty = 'Duplicate data property in object literal not allowed in strict mode';\nvar ILLEGAL = 'ILLEGAL',\n DISABLED = 'Disabled.'; // See also tools/generate-unicode-regex.py.\n\nvar RegexNonAsciiIdentifierStart = new RegExp('[\\\\xAA\\\\xB5\\\\xBA\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\u02C1\\\\u02C6-\\\\u02D1\\\\u02E0-\\\\u02E4\\\\u02EC\\\\u02EE\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037A-\\\\u037D\\\\u037F\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03F5\\\\u03F7-\\\\u0481\\\\u048A-\\\\u052F\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u05D0-\\\\u05EA\\\\u05F0-\\\\u05F2\\\\u0620-\\\\u064A\\\\u066E\\\\u066F\\\\u0671-\\\\u06D3\\\\u06D5\\\\u06E5\\\\u06E6\\\\u06EE\\\\u06EF\\\\u06FA-\\\\u06FC\\\\u06FF\\\\u0710\\\\u0712-\\\\u072F\\\\u074D-\\\\u07A5\\\\u07B1\\\\u07CA-\\\\u07EA\\\\u07F4\\\\u07F5\\\\u07FA\\\\u0800-\\\\u0815\\\\u081A\\\\u0824\\\\u0828\\\\u0840-\\\\u0858\\\\u08A0-\\\\u08B2\\\\u0904-\\\\u0939\\\\u093D\\\\u0950\\\\u0958-\\\\u0961\\\\u0971-\\\\u0980\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\\\u09BD\\\\u09CE\\\\u09DC\\\\u09DD\\\\u09DF-\\\\u09E1\\\\u09F0\\\\u09F1\\\\u0A05-\\\\u0A0A\\\\u0A0F\\\\u0A10\\\\u0A13-\\\\u0A28\\\\u0A2A-\\\\u0A30\\\\u0A32\\\\u0A33\\\\u0A35\\\\u0A36\\\\u0A38\\\\u0A39\\\\u0A59-\\\\u0A5C\\\\u0A5E\\\\u0A72-\\\\u0A74\\\\u0A85-\\\\u0A8D\\\\u0A8F-\\\\u0A91\\\\u0A93-\\\\u0AA8\\\\u0AAA-\\\\u0AB0\\\\u0AB2\\\\u0AB3\\\\u0AB5-\\\\u0AB9\\\\u0ABD\\\\u0AD0\\\\u0AE0\\\\u0AE1\\\\u0B05-\\\\u0B0C\\\\u0B0F\\\\u0B10\\\\u0B13-\\\\u0B28\\\\u0B2A-\\\\u0B30\\\\u0B32\\\\u0B33\\\\u0B35-\\\\u0B39\\\\u0B3D\\\\u0B5C\\\\u0B5D\\\\u0B5F-\\\\u0B61\\\\u0B71\\\\u0B83\\\\u0B85-\\\\u0B8A\\\\u0B8E-\\\\u0B90\\\\u0B92-\\\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\\\\u10A0-\\\\u10C5\\\\u10C7\\\\u10CD\\\\u10D0-\\\\u10FA\\\\u10FC-\\\\u1248\\\\u124A-\\\\u124D\\\\u1250-\\\\u1256\\\\u1258\\\\u125A-\\\\u125D\\\\u1260-\\\\u1288\\\\u128A-\\\\u128D\\\\u1290-\\\\u12B0\\\\u12B2-\\\\u12B5\\\\u12B8-\\\\u12BE\\\\u12C0\\\\u12C2-\\\\u12C5\\\\u12C8-\\\\u12D6\\\\u12D8-\\\\u1310\\\\u1312-\\\\u1315\\\\u1318-\\\\u135A\\\\u1380-\\\\u138F\\\\u13A0-\\\\u13F4\\\\u1401-\\\\u166C\\\\u166F-\\\\u167F\\\\u1681-\\\\u169A\\\\u16A0-\\\\u16EA\\\\u16EE-\\\\u16F8\\\\u1700-\\\\u170C\\\\u170E-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176C\\\\u176E-\\\\u1770\\\\u1780-\\\\u17B3\\\\u17D7\\\\u17DC\\\\u1820-\\\\u1877\\\\u1880-\\\\u18A8\\\\u18AA\\\\u18B0-\\\\u18F5\\\\u1900-\\\\u191E\\\\u1950-\\\\u196D\\\\u1970-\\\\u1974\\\\u1980-\\\\u19AB\\\\u19C1-\\\\u19C7\\\\u1A00-\\\\u1A16\\\\u1A20-\\\\u1A54\\\\u1AA7\\\\u1B05-\\\\u1B33\\\\u1B45-\\\\u1B4B\\\\u1B83-\\\\u1BA0\\\\u1BAE\\\\u1BAF\\\\u1BBA-\\\\u1BE5\\\\u1C00-\\\\u1C23\\\\u1C4D-\\\\u1C4F\\\\u1C5A-\\\\u1C7D\\\\u1CE9-\\\\u1CEC\\\\u1CEE-\\\\u1CF1\\\\u1CF5\\\\u1CF6\\\\u1D00-\\\\u1DBF\\\\u1E00-\\\\u1F15\\\\u1F18-\\\\u1F1D\\\\u1F20-\\\\u1F45\\\\u1F48-\\\\u1F4D\\\\u1F50-\\\\u1F57\\\\u1F59\\\\u1F5B\\\\u1F5D\\\\u1F5F-\\\\u1F7D\\\\u1F80-\\\\u1FB4\\\\u1FB6-\\\\u1FBC\\\\u1FBE\\\\u1FC2-\\\\u1FC4\\\\u1FC6-\\\\u1FCC\\\\u1FD0-\\\\u1FD3\\\\u1FD6-\\\\u1FDB\\\\u1FE0-\\\\u1FEC\\\\u1FF2-\\\\u1FF4\\\\u1FF6-\\\\u1FFC\\\\u2071\\\\u207F\\\\u2090-\\\\u209C\\\\u2102\\\\u2107\\\\u210A-\\\\u2113\\\\u2115\\\\u2119-\\\\u211D\\\\u2124\\\\u2126\\\\u2128\\\\u212A-\\\\u212D\\\\u212F-\\\\u2139\\\\u213C-\\\\u213F\\\\u2145-\\\\u2149\\\\u214E\\\\u2160-\\\\u2188\\\\u2C00-\\\\u2C2E\\\\u2C30-\\\\u2C5E\\\\u2C60-\\\\u2CE4\\\\u2CEB-\\\\u2CEE\\\\u2CF2\\\\u2CF3\\\\u2D00-\\\\u2D25\\\\u2D27\\\\u2D2D\\\\u2D30-\\\\u2D67\\\\u2D6F\\\\u2D80-\\\\u2D96\\\\u2DA0-\\\\u2DA6\\\\u2DA8-\\\\u2DAE\\\\u2DB0-\\\\u2DB6\\\\u2DB8-\\\\u2DBE\\\\u2DC0-\\\\u2DC6\\\\u2DC8-\\\\u2DCE\\\\u2DD0-\\\\u2DD6\\\\u2DD8-\\\\u2DDE\\\\u2E2F\\\\u3005-\\\\u3007\\\\u3021-\\\\u3029\\\\u3031-\\\\u3035\\\\u3038-\\\\u303C\\\\u3041-\\\\u3096\\\\u309D-\\\\u309F\\\\u30A1-\\\\u30FA\\\\u30FC-\\\\u30FF\\\\u3105-\\\\u312D\\\\u3131-\\\\u318E\\\\u31A0-\\\\u31BA\\\\u31F0-\\\\u31FF\\\\u3400-\\\\u4DB5\\\\u4E00-\\\\u9FCC\\\\uA000-\\\\uA48C\\\\uA4D0-\\\\uA4FD\\\\uA500-\\\\uA60C\\\\uA610-\\\\uA61F\\\\uA62A\\\\uA62B\\\\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\\\uFD50-\\\\uFD8F\\\\uFD92-\\\\uFDC7\\\\uFDF0-\\\\uFDFB\\\\uFE70-\\\\uFE74\\\\uFE76-\\\\uFEFC\\\\uFF21-\\\\uFF3A\\\\uFF41-\\\\uFF5A\\\\uFF66-\\\\uFFBE\\\\uFFC2-\\\\uFFC7\\\\uFFCA-\\\\uFFCF\\\\uFFD2-\\\\uFFD7\\\\uFFDA-\\\\uFFDC]'),\n // eslint-disable-next-line no-misleading-character-class\nRegexNonAsciiIdentifierPart = new RegExp('[\\\\xAA\\\\xB5\\\\xBA\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\u02C1\\\\u02C6-\\\\u02D1\\\\u02E0-\\\\u02E4\\\\u02EC\\\\u02EE\\\\u0300-\\\\u0374\\\\u0376\\\\u0377\\\\u037A-\\\\u037D\\\\u037F\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03F5\\\\u03F7-\\\\u0481\\\\u0483-\\\\u0487\\\\u048A-\\\\u052F\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u0591-\\\\u05BD\\\\u05BF\\\\u05C1\\\\u05C2\\\\u05C4\\\\u05C5\\\\u05C7\\\\u05D0-\\\\u05EA\\\\u05F0-\\\\u05F2\\\\u0610-\\\\u061A\\\\u0620-\\\\u0669\\\\u066E-\\\\u06D3\\\\u06D5-\\\\u06DC\\\\u06DF-\\\\u06E8\\\\u06EA-\\\\u06FC\\\\u06FF\\\\u0710-\\\\u074A\\\\u074D-\\\\u07B1\\\\u07C0-\\\\u07F5\\\\u07FA\\\\u0800-\\\\u082D\\\\u0840-\\\\u085B\\\\u08A0-\\\\u08B2\\\\u08E4-\\\\u0963\\\\u0966-\\\\u096F\\\\u0971-\\\\u0983\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\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\\\\u0E94-\\\\u0E97\\\\u0E99-\\\\u0E9F\\\\u0EA1-\\\\u0EA3\\\\u0EA5\\\\u0EA7\\\\u0EAA\\\\u0EAB\\\\u0EAD-\\\\u0EB9\\\\u0EBB-\\\\u0EBD\\\\u0EC0-\\\\u0EC4\\\\u0EC6\\\\u0EC8-\\\\u0ECD\\\\u0ED0-\\\\u0ED9\\\\u0EDC-\\\\u0EDF\\\\u0F00\\\\u0F18\\\\u0F19\\\\u0F20-\\\\u0F29\\\\u0F35\\\\u0F37\\\\u0F39\\\\u0F3E-\\\\u0F47\\\\u0F49-\\\\u0F6C\\\\u0F71-\\\\u0F84\\\\u0F86-\\\\u0F97\\\\u0F99-\\\\u0FBC\\\\u0FC6\\\\u1000-\\\\u1049\\\\u1050-\\\\u109D\\\\u10A0-\\\\u10C5\\\\u10C7\\\\u10CD\\\\u10D0-\\\\u10FA\\\\u10FC-\\\\u1248\\\\u124A-\\\\u124D\\\\u1250-\\\\u1256\\\\u1258\\\\u125A-\\\\u125D\\\\u1260-\\\\u1288\\\\u128A-\\\\u128D\\\\u1290-\\\\u12B0\\\\u12B2-\\\\u12B5\\\\u12B8-\\\\u12BE\\\\u12C0\\\\u12C2-\\\\u12C5\\\\u12C8-\\\\u12D6\\\\u12D8-\\\\u1310\\\\u1312-\\\\u1315\\\\u1318-\\\\u135A\\\\u135D-\\\\u135F\\\\u1380-\\\\u138F\\\\u13A0-\\\\u13F4\\\\u1401-\\\\u166C\\\\u166F-\\\\u167F\\\\u1681-\\\\u169A\\\\u16A0-\\\\u16EA\\\\u16EE-\\\\u16F8\\\\u1700-\\\\u170C\\\\u170E-\\\\u1714\\\\u1720-\\\\u1734\\\\u1740-\\\\u1753\\\\u1760-\\\\u176C\\\\u176E-\\\\u1770\\\\u1772\\\\u1773\\\\u1780-\\\\u17D3\\\\u17D7\\\\u17DC\\\\u17DD\\\\u17E0-\\\\u17E9\\\\u180B-\\\\u180D\\\\u1810-\\\\u1819\\\\u1820-\\\\u1877\\\\u1880-\\\\u18AA\\\\u18B0-\\\\u18F5\\\\u1900-\\\\u191E\\\\u1920-\\\\u192B\\\\u1930-\\\\u193B\\\\u1946-\\\\u196D\\\\u1970-\\\\u1974\\\\u1980-\\\\u19AB\\\\u19B0-\\\\u19C9\\\\u19D0-\\\\u19D9\\\\u1A00-\\\\u1A1B\\\\u1A20-\\\\u1A5E\\\\u1A60-\\\\u1A7C\\\\u1A7F-\\\\u1A89\\\\u1A90-\\\\u1A99\\\\u1AA7\\\\u1AB0-\\\\u1ABD\\\\u1B00-\\\\u1B4B\\\\u1B50-\\\\u1B59\\\\u1B6B-\\\\u1B73\\\\u1B80-\\\\u1BF3\\\\u1C00-\\\\u1C37\\\\u1C40-\\\\u1C49\\\\u1C4D-\\\\u1C7D\\\\u1CD0-\\\\u1CD2\\\\u1CD4-\\\\u1CF6\\\\u1CF8\\\\u1CF9\\\\u1D00-\\\\u1DF5\\\\u1DFC-\\\\u1F15\\\\u1F18-\\\\u1F1D\\\\u1F20-\\\\u1F45\\\\u1F48-\\\\u1F4D\\\\u1F50-\\\\u1F57\\\\u1F59\\\\u1F5B\\\\u1F5D\\\\u1F5F-\\\\u1F7D\\\\u1F80-\\\\u1FB4\\\\u1FB6-\\\\u1FBC\\\\u1FBE\\\\u1FC2-\\\\u1FC4\\\\u1FC6-\\\\u1FCC\\\\u1FD0-\\\\u1FD3\\\\u1FD6-\\\\u1FDB\\\\u1FE0-\\\\u1FEC\\\\u1FF2-\\\\u1FF4\\\\u1FF6-\\\\u1FFC\\\\u200C\\\\u200D\\\\u203F\\\\u2040\\\\u2054\\\\u2071\\\\u207F\\\\u2090-\\\\u209C\\\\u20D0-\\\\u20DC\\\\u20E1\\\\u20E5-\\\\u20F0\\\\u2102\\\\u2107\\\\u210A-\\\\u2113\\\\u2115\\\\u2119-\\\\u211D\\\\u2124\\\\u2126\\\\u2128\\\\u212A-\\\\u212D\\\\u212F-\\\\u2139\\\\u213C-\\\\u213F\\\\u2145-\\\\u2149\\\\u214E\\\\u2160-\\\\u2188\\\\u2C00-\\\\u2C2E\\\\u2C30-\\\\u2C5E\\\\u2C60-\\\\u2CE4\\\\u2CEB-\\\\u2CF3\\\\u2D00-\\\\u2D25\\\\u2D27\\\\u2D2D\\\\u2D30-\\\\u2D67\\\\u2D6F\\\\u2D7F-\\\\u2D96\\\\u2DA0-\\\\u2DA6\\\\u2DA8-\\\\u2DAE\\\\u2DB0-\\\\u2DB6\\\\u2DB8-\\\\u2DBE\\\\u2DC0-\\\\u2DC6\\\\u2DC8-\\\\u2DCE\\\\u2DD0-\\\\u2DD6\\\\u2DD8-\\\\u2DDE\\\\u2DE0-\\\\u2DFF\\\\u2E2F\\\\u3005-\\\\u3007\\\\u3021-\\\\u302F\\\\u3031-\\\\u3035\\\\u3038-\\\\u303C\\\\u3041-\\\\u3096\\\\u3099\\\\u309A\\\\u309D-\\\\u309F\\\\u30A1-\\\\u30FA\\\\u30FC-\\\\u30FF\\\\u3105-\\\\u312D\\\\u3131-\\\\u318E\\\\u31A0-\\\\u31BA\\\\u31F0-\\\\u31FF\\\\u3400-\\\\u4DB5\\\\u4E00-\\\\u9FCC\\\\uA000-\\\\uA48C\\\\uA4D0-\\\\uA4FD\\\\uA500-\\\\uA60C\\\\uA610-\\\\uA62B\\\\uA640-\\\\uA66F\\\\uA674-\\\\uA67D\\\\uA67F-\\\\uA69D\\\\uA69F-\\\\uA6F1\\\\uA717-\\\\uA71F\\\\uA722-\\\\uA788\\\\uA78B-\\\\uA78E\\\\uA790-\\\\uA7AD\\\\uA7B0\\\\uA7B1\\\\uA7F7-\\\\uA827\\\\uA840-\\\\uA873\\\\uA880-\\\\uA8C4\\\\uA8D0-\\\\uA8D9\\\\uA8E0-\\\\uA8F7\\\\uA8FB\\\\uA900-\\\\uA92D\\\\uA930-\\\\uA953\\\\uA960-\\\\uA97C\\\\uA980-\\\\uA9C0\\\\uA9CF-\\\\uA9D9\\\\uA9E0-\\\\uA9FE\\\\uAA00-\\\\uAA36\\\\uAA40-\\\\uAA4D\\\\uAA50-\\\\uAA59\\\\uAA60-\\\\uAA76\\\\uAA7A-\\\\uAAC2\\\\uAADB-\\\\uAADD\\\\uAAE0-\\\\uAAEF\\\\uAAF2-\\\\uAAF6\\\\uAB01-\\\\uAB06\\\\uAB09-\\\\uAB0E\\\\uAB11-\\\\uAB16\\\\uAB20-\\\\uAB26\\\\uAB28-\\\\uAB2E\\\\uAB30-\\\\uAB5A\\\\uAB5C-\\\\uAB5F\\\\uAB64\\\\uAB65\\\\uABC0-\\\\uABEA\\\\uABEC\\\\uABED\\\\uABF0-\\\\uABF9\\\\uAC00-\\\\uD7A3\\\\uD7B0-\\\\uD7C6\\\\uD7CB-\\\\uD7FB\\\\uF900-\\\\uFA6D\\\\uFA70-\\\\uFAD9\\\\uFB00-\\\\uFB06\\\\uFB13-\\\\uFB17\\\\uFB1D-\\\\uFB28\\\\uFB2A-\\\\uFB36\\\\uFB38-\\\\uFB3C\\\\uFB3E\\\\uFB40\\\\uFB41\\\\uFB43\\\\uFB44\\\\uFB46-\\\\uFBB1\\\\uFBD3-\\\\uFD3D\\\\uFD50-\\\\uFD8F\\\\uFD92-\\\\uFDC7\\\\uFDF0-\\\\uFDFB\\\\uFE00-\\\\uFE0F\\\\uFE20-\\\\uFE2D\\\\uFE33\\\\uFE34\\\\uFE4D-\\\\uFE4F\\\\uFE70-\\\\uFE74\\\\uFE76-\\\\uFEFC\\\\uFF10-\\\\uFF19\\\\uFF21-\\\\uFF3A\\\\uFF3F\\\\uFF41-\\\\uFF5A\\\\uFF66-\\\\uFFBE\\\\uFFC2-\\\\uFFC7\\\\uFFCA-\\\\uFFCF\\\\uFFD2-\\\\uFFD7\\\\uFFDA-\\\\uFFDC]'); // Ensure the condition is true, otherwise throw an error.\n// This is only to have a better contract semantic, i.e. another safety net\n// to catch a logic error. The condition shall be fulfilled in normal case.\n// Do NOT use this to enforce a certain condition on any user input.\n\nfunction assert(condition, message) {\n /* istanbul ignore next */\n if (!condition) {\n throw new Error('ASSERT: ' + message);\n }\n}\n\nfunction isDecimalDigit(ch) {\n return ch >= 0x30 && ch <= 0x39; // 0..9\n}\n\nfunction isHexDigit(ch) {\n return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;\n}\n\nfunction isOctalDigit(ch) {\n return '01234567'.indexOf(ch) >= 0;\n} // 7.2 White Space\n\n\nfunction isWhiteSpace(ch) {\n return ch === 0x20 || ch === 0x09 || ch === 0x0B || ch === 0x0C || ch === 0xA0 || ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0;\n} // 7.3 Line Terminators\n\n\nfunction isLineTerminator(ch) {\n return ch === 0x0A || ch === 0x0D || ch === 0x2028 || ch === 0x2029;\n} // 7.6 Identifier Names and Identifiers\n\n\nfunction isIdentifierStart(ch) {\n return ch === 0x24 || ch === 0x5F || // $ (dollar) and _ (underscore)\n ch >= 0x41 && ch <= 0x5A || // A..Z\n ch >= 0x61 && ch <= 0x7A || // a..z\n ch === 0x5C || // \\ (backslash)\n ch >= 0x80 && RegexNonAsciiIdentifierStart.test(String.fromCharCode(ch));\n}\n\nfunction isIdentifierPart(ch) {\n return ch === 0x24 || ch === 0x5F || // $ (dollar) and _ (underscore)\n ch >= 0x41 && ch <= 0x5A || // A..Z\n ch >= 0x61 && ch <= 0x7A || // a..z\n ch >= 0x30 && ch <= 0x39 || // 0..9\n ch === 0x5C || // \\ (backslash)\n ch >= 0x80 && RegexNonAsciiIdentifierPart.test(String.fromCharCode(ch));\n} // 7.6.1.1 Keywords\n\n\nconst keywords = {\n 'if': 1,\n 'in': 1,\n 'do': 1,\n 'var': 1,\n 'for': 1,\n 'new': 1,\n 'try': 1,\n 'let': 1,\n 'this': 1,\n 'else': 1,\n 'case': 1,\n 'void': 1,\n 'with': 1,\n 'enum': 1,\n 'while': 1,\n 'break': 1,\n 'catch': 1,\n 'throw': 1,\n 'const': 1,\n 'yield': 1,\n 'class': 1,\n 'super': 1,\n 'return': 1,\n 'typeof': 1,\n 'delete': 1,\n 'switch': 1,\n 'export': 1,\n 'import': 1,\n 'public': 1,\n 'static': 1,\n 'default': 1,\n 'finally': 1,\n 'extends': 1,\n 'package': 1,\n 'private': 1,\n 'function': 1,\n 'continue': 1,\n 'debugger': 1,\n 'interface': 1,\n 'protected': 1,\n 'instanceof': 1,\n 'implements': 1\n};\n\nfunction skipComment() {\n while (index < length) {\n const ch = source.charCodeAt(index);\n\n if (isWhiteSpace(ch) || isLineTerminator(ch)) {\n ++index;\n } else {\n break;\n }\n }\n}\n\nfunction scanHexEscape(prefix) {\n var i,\n len,\n ch,\n code = 0;\n len = prefix === 'u' ? 4 : 2;\n\n for (i = 0; i < len; ++i) {\n if (index < length && isHexDigit(source[index])) {\n ch = source[index++];\n code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());\n } else {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n }\n\n return String.fromCharCode(code);\n}\n\nfunction scanUnicodeCodePointEscape() {\n var ch, code, cu1, cu2;\n ch = source[index];\n code = 0; // At least, one hex digit is required.\n\n if (ch === '}') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n while (index < length) {\n ch = source[index++];\n\n if (!isHexDigit(ch)) {\n break;\n }\n\n code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());\n }\n\n if (code > 0x10FFFF || ch !== '}') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n } // UTF-16 Encoding\n\n\n if (code <= 0xFFFF) {\n return String.fromCharCode(code);\n }\n\n cu1 = (code - 0x10000 >> 10) + 0xD800;\n cu2 = (code - 0x10000 & 1023) + 0xDC00;\n return String.fromCharCode(cu1, cu2);\n}\n\nfunction getEscapedIdentifier() {\n var ch, id;\n ch = source.charCodeAt(index++);\n id = String.fromCharCode(ch); // '\\u' (U+005C, U+0075) denotes an escaped character.\n\n if (ch === 0x5C) {\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n ++index;\n ch = scanHexEscape('u');\n\n if (!ch || ch === '\\\\' || !isIdentifierStart(ch.charCodeAt(0))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n id = ch;\n }\n\n while (index < length) {\n ch = source.charCodeAt(index);\n\n if (!isIdentifierPart(ch)) {\n break;\n }\n\n ++index;\n id += String.fromCharCode(ch); // '\\u' (U+005C, U+0075) denotes an escaped character.\n\n if (ch === 0x5C) {\n id = id.substr(0, id.length - 1);\n\n if (source.charCodeAt(index) !== 0x75) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n ++index;\n ch = scanHexEscape('u');\n\n if (!ch || ch === '\\\\' || !isIdentifierPart(ch.charCodeAt(0))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n id += ch;\n }\n }\n\n return id;\n}\n\nfunction getIdentifier() {\n var start, ch;\n start = index++;\n\n while (index < length) {\n ch = source.charCodeAt(index);\n\n if (ch === 0x5C) {\n // Blackslash (U+005C) marks Unicode escape sequence.\n index = start;\n return getEscapedIdentifier();\n }\n\n if (isIdentifierPart(ch)) {\n ++index;\n } else {\n break;\n }\n }\n\n return source.slice(start, index);\n}\n\nfunction scanIdentifier() {\n var start, id, type;\n start = index; // Backslash (U+005C) starts an escaped character.\n\n id = source.charCodeAt(index) === 0x5C ? getEscapedIdentifier() : getIdentifier(); // There is no keyword or literal with only one character.\n // Thus, it must be an identifier.\n\n if (id.length === 1) {\n type = TokenIdentifier;\n } else if (keywords.hasOwnProperty(id)) {\n // eslint-disable-line no-prototype-builtins\n type = TokenKeyword;\n } else if (id === 'null') {\n type = TokenNullLiteral;\n } else if (id === 'true' || id === 'false') {\n type = TokenBooleanLiteral;\n } else {\n type = TokenIdentifier;\n }\n\n return {\n type: type,\n value: id,\n start: start,\n end: index\n };\n} // 7.7 Punctuators\n\n\nfunction scanPunctuator() {\n var start = index,\n code = source.charCodeAt(index),\n code2,\n ch1 = source[index],\n ch2,\n ch3,\n ch4;\n\n switch (code) {\n // Check for most common single-character punctuators.\n case 0x2E: // . dot\n\n case 0x28: // ( open bracket\n\n case 0x29: // ) close bracket\n\n case 0x3B: // ; semicolon\n\n case 0x2C: // , comma\n\n case 0x7B: // { open curly brace\n\n case 0x7D: // } close curly brace\n\n case 0x5B: // [\n\n case 0x5D: // ]\n\n case 0x3A: // :\n\n case 0x3F: // ?\n\n case 0x7E:\n // ~\n ++index;\n return {\n type: TokenPunctuator,\n value: String.fromCharCode(code),\n start: start,\n end: index\n };\n\n default:\n code2 = source.charCodeAt(index + 1); // '=' (U+003D) marks an assignment or comparison operator.\n\n if (code2 === 0x3D) {\n switch (code) {\n case 0x2B: // +\n\n case 0x2D: // -\n\n case 0x2F: // /\n\n case 0x3C: // <\n\n case 0x3E: // >\n\n case 0x5E: // ^\n\n case 0x7C: // |\n\n case 0x25: // %\n\n case 0x26: // &\n\n case 0x2A:\n // *\n index += 2;\n return {\n type: TokenPunctuator,\n value: String.fromCharCode(code) + String.fromCharCode(code2),\n start: start,\n end: index\n };\n\n case 0x21: // !\n\n case 0x3D:\n // =\n index += 2; // !== and ===\n\n if (source.charCodeAt(index) === 0x3D) {\n ++index;\n }\n\n return {\n type: TokenPunctuator,\n value: source.slice(start, index),\n start: start,\n end: index\n };\n }\n }\n\n } // 4-character punctuator: >>>=\n\n\n ch4 = source.substr(index, 4);\n\n if (ch4 === '>>>=') {\n index += 4;\n return {\n type: TokenPunctuator,\n value: ch4,\n start: start,\n end: index\n };\n } // 3-character punctuators: === !== >>> <<= >>=\n\n\n ch3 = ch4.substr(0, 3);\n\n if (ch3 === '>>>' || ch3 === '<<=' || ch3 === '>>=') {\n index += 3;\n return {\n type: TokenPunctuator,\n value: ch3,\n start: start,\n end: index\n };\n } // Other 2-character punctuators: ++ -- << >> && ||\n\n\n ch2 = ch3.substr(0, 2);\n\n if (ch1 === ch2[1] && '+-<>&|'.indexOf(ch1) >= 0 || ch2 === '=>') {\n index += 2;\n return {\n type: TokenPunctuator,\n value: ch2,\n start: start,\n end: index\n };\n }\n\n if (ch2 === '//') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n } // 1-character punctuators: < > = ! + - * % & | ^ /\n\n\n if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {\n ++index;\n return {\n type: TokenPunctuator,\n value: ch1,\n start: start,\n end: index\n };\n }\n\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n} // 7.8.3 Numeric Literals\n\n\nfunction scanHexLiteral(start) {\n let number = '';\n\n while (index < length) {\n if (!isHexDigit(source[index])) {\n break;\n }\n\n number += source[index++];\n }\n\n if (number.length === 0) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenNumericLiteral,\n value: parseInt('0x' + number, 16),\n start: start,\n end: index\n };\n}\n\nfunction scanOctalLiteral(start) {\n let number = '0' + source[index++];\n\n while (index < length) {\n if (!isOctalDigit(source[index])) {\n break;\n }\n\n number += source[index++];\n }\n\n if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenNumericLiteral,\n value: parseInt(number, 8),\n octal: true,\n start: start,\n end: index\n };\n}\n\nfunction scanNumericLiteral() {\n var number, start, ch;\n ch = source[index];\n assert(isDecimalDigit(ch.charCodeAt(0)) || ch === '.', 'Numeric literal must start with a decimal digit or a decimal point');\n start = index;\n number = '';\n\n if (ch !== '.') {\n number = source[index++];\n ch = source[index]; // Hex number starts with '0x'.\n // Octal number starts with '0'.\n\n if (number === '0') {\n if (ch === 'x' || ch === 'X') {\n ++index;\n return scanHexLiteral(start);\n }\n\n if (isOctalDigit(ch)) {\n return scanOctalLiteral(start);\n } // decimal number starts with '0' such as '09' is illegal.\n\n\n if (ch && isDecimalDigit(ch.charCodeAt(0))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n }\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n\n ch = source[index];\n }\n\n if (ch === '.') {\n number += source[index++];\n\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n\n ch = source[index];\n }\n\n if (ch === 'e' || ch === 'E') {\n number += source[index++];\n ch = source[index];\n\n if (ch === '+' || ch === '-') {\n number += source[index++];\n }\n\n if (isDecimalDigit(source.charCodeAt(index))) {\n while (isDecimalDigit(source.charCodeAt(index))) {\n number += source[index++];\n }\n } else {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n }\n\n if (isIdentifierStart(source.charCodeAt(index))) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenNumericLiteral,\n value: parseFloat(number),\n start: start,\n end: index\n };\n} // 7.8.4 String Literals\n\n\nfunction scanStringLiteral() {\n var str = '',\n quote,\n start,\n ch,\n code,\n octal = false;\n quote = source[index];\n assert(quote === '\\'' || quote === '\"', 'String literal must starts with a quote');\n start = index;\n ++index;\n\n while (index < length) {\n ch = source[index++];\n\n if (ch === quote) {\n quote = '';\n break;\n } else if (ch === '\\\\') {\n ch = source[index++];\n\n if (!ch || !isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'u':\n case 'x':\n if (source[index] === '{') {\n ++index;\n str += scanUnicodeCodePointEscape();\n } else {\n str += scanHexEscape(ch);\n }\n\n break;\n\n case 'n':\n str += '\\n';\n break;\n\n case 'r':\n str += '\\r';\n break;\n\n case 't':\n str += '\\t';\n break;\n\n case 'b':\n str += '\\b';\n break;\n\n case 'f':\n str += '\\f';\n break;\n\n case 'v':\n str += '\\x0B';\n break;\n\n default:\n if (isOctalDigit(ch)) {\n code = '01234567'.indexOf(ch); // \\0 is not octal escape sequence\n\n if (code !== 0) {\n octal = true;\n }\n\n if (index < length && isOctalDigit(source[index])) {\n octal = true;\n code = code * 8 + '01234567'.indexOf(source[index++]); // 3 digits are only allowed when string starts\n // with 0, 1, 2, 3\n\n if ('0123'.indexOf(ch) >= 0 && index < length && isOctalDigit(source[index])) {\n code = code * 8 + '01234567'.indexOf(source[index++]);\n }\n }\n\n str += String.fromCharCode(code);\n } else {\n str += ch;\n }\n\n break;\n }\n } else {\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n }\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n break;\n } else {\n str += ch;\n }\n }\n\n if (quote !== '') {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n }\n\n return {\n type: TokenStringLiteral,\n value: str,\n octal: octal,\n start: start,\n end: index\n };\n}\n\nfunction testRegExp(pattern, flags) {\n let tmp = pattern;\n\n if (flags.indexOf('u') >= 0) {\n // Replace each astral symbol and every Unicode code point\n // escape sequence with a single ASCII symbol to avoid throwing on\n // regular expressions that are only valid in combination with the\n // `/u` flag.\n // Note: replacing with the ASCII symbol `x` might cause false\n // negatives in unlikely scenarios. For example, `[\\u{61}-b]` is a\n // perfectly valid pattern that is equivalent to `[a-b]`, but it\n // would be replaced by `[x-b]` which throws an error.\n tmp = tmp.replace(/\\\\u\\{([0-9a-fA-F]+)\\}/g, ($0, $1) => {\n if (parseInt($1, 16) <= 0x10FFFF) {\n return 'x';\n }\n\n throwError({}, MessageInvalidRegExp);\n }).replace(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g, 'x');\n } // First, detect invalid regular expressions.\n\n\n try {\n new RegExp(tmp);\n } catch (e) {\n throwError({}, MessageInvalidRegExp);\n } // Return a regular expression object for this pattern-flag pair, or\n // `null` in case the current environment doesn't support the flags it\n // uses.\n\n\n try {\n return new RegExp(pattern, flags);\n } catch (exception) {\n return null;\n }\n}\n\nfunction scanRegExpBody() {\n var ch, str, classMarker, terminated, body;\n ch = source[index];\n assert(ch === '/', 'Regular expression literal must start with a slash');\n str = source[index++];\n classMarker = false;\n terminated = false;\n\n while (index < length) {\n ch = source[index++];\n str += ch;\n\n if (ch === '\\\\') {\n ch = source[index++]; // ECMA-262 7.8.5\n\n if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, MessageUnterminatedRegExp);\n }\n\n str += ch;\n } else if (isLineTerminator(ch.charCodeAt(0))) {\n throwError({}, MessageUnterminatedRegExp);\n } else if (classMarker) {\n if (ch === ']') {\n classMarker = false;\n }\n } else {\n if (ch === '/') {\n terminated = true;\n break;\n } else if (ch === '[') {\n classMarker = true;\n }\n }\n }\n\n if (!terminated) {\n throwError({}, MessageUnterminatedRegExp);\n } // Exclude leading and trailing slash.\n\n\n body = str.substr(1, str.length - 2);\n return {\n value: body,\n literal: str\n };\n}\n\nfunction scanRegExpFlags() {\n var ch, str, flags;\n str = '';\n flags = '';\n\n while (index < length) {\n ch = source[index];\n\n if (!isIdentifierPart(ch.charCodeAt(0))) {\n break;\n }\n\n ++index;\n\n if (ch === '\\\\' && index < length) {\n throwError({}, MessageUnexpectedToken, ILLEGAL);\n } else {\n flags += ch;\n str += ch;\n }\n }\n\n if (flags.search(/[^gimuy]/g) >= 0) {\n throwError({}, MessageInvalidRegExp, flags);\n }\n\n return {\n value: flags,\n literal: str\n };\n}\n\nfunction scanRegExp() {\n var start, body, flags, value;\n lookahead = null;\n skipComment();\n start = index;\n body = scanRegExpBody();\n flags = scanRegExpFlags();\n value = testRegExp(body.value, flags.value);\n return {\n literal: body.literal + flags.literal,\n value: value,\n regex: {\n pattern: body.value,\n flags: flags.value\n },\n start: start,\n end: index\n };\n}\n\nfunction isIdentifierName(token) {\n return token.type === TokenIdentifier || token.type === TokenKeyword || token.type === TokenBooleanLiteral || token.type === TokenNullLiteral;\n}\n\nfunction advance() {\n skipComment();\n\n if (index >= length) {\n return {\n type: TokenEOF,\n start: index,\n end: index\n };\n }\n\n const ch = source.charCodeAt(index);\n\n if (isIdentifierStart(ch)) {\n return scanIdentifier();\n } // Very common: ( and ) and ;\n\n\n if (ch === 0x28 || ch === 0x29 || ch === 0x3B) {\n return scanPunctuator();\n } // String literal starts with single quote (U+0027) or double quote (U+0022).\n\n\n if (ch === 0x27 || ch === 0x22) {\n return scanStringLiteral();\n } // Dot (.) U+002E can also start a floating-point number, hence the need\n // to check the next character.\n\n\n if (ch === 0x2E) {\n if (isDecimalDigit(source.charCodeAt(index + 1))) {\n return scanNumericLiteral();\n }\n\n return scanPunctuator();\n }\n\n if (isDecimalDigit(ch)) {\n return scanNumericLiteral();\n }\n\n return scanPunctuator();\n}\n\nfunction lex() {\n const token = lookahead;\n index = token.end;\n lookahead = advance();\n index = token.end;\n return token;\n}\n\nfunction peek() {\n const pos = index;\n lookahead = advance();\n index = pos;\n}\n\nfunction finishArrayExpression(elements) {\n const node = new ASTNode(SyntaxArrayExpression);\n node.elements = elements;\n return node;\n}\n\nfunction finishBinaryExpression(operator, left, right) {\n const node = new ASTNode(operator === '||' || operator === '&&' ? SyntaxLogicalExpression : SyntaxBinaryExpression);\n node.operator = operator;\n node.left = left;\n node.right = right;\n return node;\n}\n\nfunction finishCallExpression(callee, args) {\n const node = new ASTNode(SyntaxCallExpression);\n node.callee = callee;\n node.arguments = args;\n return node;\n}\n\nfunction finishConditionalExpression(test, consequent, alternate) {\n const node = new ASTNode(SyntaxConditionalExpression);\n node.test = test;\n node.consequent = consequent;\n node.alternate = alternate;\n return node;\n}\n\nfunction finishIdentifier(name) {\n const node = new ASTNode(SyntaxIdentifier);\n node.name = name;\n return node;\n}\n\nfunction finishLiteral(token) {\n const node = new ASTNode(SyntaxLiteral);\n node.value = token.value;\n node.raw = source.slice(token.start, token.end);\n\n if (token.regex) {\n if (node.raw === '//') {\n node.raw = '/(?:)/';\n }\n\n node.regex = token.regex;\n }\n\n return node;\n}\n\nfunction finishMemberExpression(accessor, object, property) {\n const node = new ASTNode(SyntaxMemberExpression);\n node.computed = accessor === '[';\n node.object = object;\n node.property = property;\n if (!node.computed) property.member = true;\n return node;\n}\n\nfunction finishObjectExpression(properties) {\n const node = new ASTNode(SyntaxObjectExpression);\n node.properties = properties;\n return node;\n}\n\nfunction finishProperty(kind, key, value) {\n const node = new ASTNode(SyntaxProperty);\n node.key = key;\n node.value = value;\n node.kind = kind;\n return node;\n}\n\nfunction finishUnaryExpression(operator, argument) {\n const node = new ASTNode(SyntaxUnaryExpression);\n node.operator = operator;\n node.argument = argument;\n node.prefix = true;\n return node;\n} // Throw an exception\n\n\nfunction throwError(token, messageFormat) {\n var error,\n args = Array.prototype.slice.call(arguments, 2),\n msg = messageFormat.replace(/%(\\d)/g, (whole, index) => {\n assert(index < args.length, 'Message reference must be in range');\n return args[index];\n });\n error = new Error(msg);\n error.index = index;\n error.description = msg;\n throw error;\n} // Throw an exception because of the token.\n\n\nfunction throwUnexpected(token) {\n if (token.type === TokenEOF) {\n throwError(token, MessageUnexpectedEOS);\n }\n\n if (token.type === TokenNumericLiteral) {\n throwError(token, MessageUnexpectedNumber);\n }\n\n if (token.type === TokenStringLiteral) {\n throwError(token, MessageUnexpectedString);\n }\n\n if (token.type === TokenIdentifier) {\n throwError(token, MessageUnexpectedIdentifier);\n }\n\n if (token.type === TokenKeyword) {\n throwError(token, MessageUnexpectedReserved);\n } // BooleanLiteral, NullLiteral, or Punctuator.\n\n\n throwError(token, MessageUnexpectedToken, token.value);\n} // Expect the next token to match the specified punctuator.\n// If not, an exception will be thrown.\n\n\nfunction expect(value) {\n const token = lex();\n\n if (token.type !== TokenPunctuator || token.value !== value) {\n throwUnexpected(token);\n }\n} // Return true if the next token matches the specified punctuator.\n\n\nfunction match(value) {\n return lookahead.type === TokenPunctuator && lookahead.value === value;\n} // Return true if the next token matches the specified keyword\n\n\nfunction matchKeyword(keyword) {\n return lookahead.type === TokenKeyword && lookahead.value === keyword;\n} // 11.1.4 Array Initialiser\n\n\nfunction parseArrayInitialiser() {\n const elements = [];\n index = lookahead.start;\n expect('[');\n\n while (!match(']')) {\n if (match(',')) {\n lex();\n elements.push(null);\n } else {\n elements.push(parseConditionalExpression());\n\n if (!match(']')) {\n expect(',');\n }\n }\n }\n\n lex();\n return finishArrayExpression(elements);\n} // 11.1.5 Object Initialiser\n\n\nfunction parseObjectPropertyKey() {\n index = lookahead.start;\n const token = lex(); // Note: This function is called only from parseObjectProperty(), where\n // EOF and Punctuator tokens are already filtered out.\n\n if (token.type === TokenStringLiteral || token.type === TokenNumericLiteral) {\n if (token.octal) {\n throwError(token, MessageStrictOctalLiteral);\n }\n\n return finishLiteral(token);\n }\n\n return finishIdentifier(token.value);\n}\n\nfunction parseObjectProperty() {\n var token, key, id, value;\n index = lookahead.start;\n token = lookahead;\n\n if (token.type === TokenIdentifier) {\n id = parseObjectPropertyKey();\n expect(':');\n value = parseConditionalExpression();\n return finishProperty('init', id, value);\n }\n\n if (token.type === TokenEOF || token.type === TokenPunctuator) {\n throwUnexpected(token);\n } else {\n key = parseObjectPropertyKey();\n expect(':');\n value = parseConditionalExpression();\n return finishProperty('init', key, value);\n }\n}\n\nfunction parseObjectInitialiser() {\n var properties = [],\n property,\n name,\n key,\n map = {},\n toString = String;\n index = lookahead.start;\n expect('{');\n\n while (!match('}')) {\n property = parseObjectProperty();\n\n if (property.key.type === SyntaxIdentifier) {\n name = property.key.name;\n } else {\n name = toString(property.key.value);\n }\n\n key = '$' + name;\n\n if (Object.prototype.hasOwnProperty.call(map, key)) {\n throwError({}, MessageStrictDuplicateProperty);\n } else {\n map[key] = true;\n }\n\n properties.push(property);\n\n if (!match('}')) {\n expect(',');\n }\n }\n\n expect('}');\n return finishObjectExpression(properties);\n} // 11.1.6 The Grouping Operator\n\n\nfunction parseGroupExpression() {\n expect('(');\n const expr = parseExpression();\n expect(')');\n return expr;\n} // 11.1 Primary Expressions\n\n\nconst legalKeywords = {\n 'if': 1\n};\n\nfunction parsePrimaryExpression() {\n var type, token, expr;\n\n if (match('(')) {\n return parseGroupExpression();\n }\n\n if (match('[')) {\n return parseArrayInitialiser();\n }\n\n if (match('{')) {\n return parseObjectInitialiser();\n }\n\n type = lookahead.type;\n index = lookahead.start;\n\n if (type === TokenIdentifier || legalKeywords[lookahead.value]) {\n expr = finishIdentifier(lex().value);\n } else if (type === TokenStringLiteral || type === TokenNumericLiteral) {\n if (lookahead.octal) {\n throwError(lookahead, MessageStrictOctalLiteral);\n }\n\n expr = finishLiteral(lex());\n } else if (type === TokenKeyword) {\n throw new Error(DISABLED);\n } else if (type === TokenBooleanLiteral) {\n token = lex();\n token.value = token.value === 'true';\n expr = finishLiteral(token);\n } else if (type === TokenNullLiteral) {\n token = lex();\n token.value = null;\n expr = finishLiteral(token);\n } else if (match('/') || match('/=')) {\n expr = finishLiteral(scanRegExp());\n peek();\n } else {\n throwUnexpected(lex());\n }\n\n return expr;\n} // 11.2 Left-Hand-Side Expressions\n\n\nfunction parseArguments() {\n const args = [];\n expect('(');\n\n if (!match(')')) {\n while (index < length) {\n args.push(parseConditionalExpression());\n\n if (match(')')) {\n break;\n }\n\n expect(',');\n }\n }\n\n expect(')');\n return args;\n}\n\nfunction parseNonComputedProperty() {\n index = lookahead.start;\n const token = lex();\n\n if (!isIdentifierName(token)) {\n throwUnexpected(token);\n }\n\n return finishIdentifier(token.value);\n}\n\nfunction parseNonComputedMember() {\n expect('.');\n return parseNonComputedProperty();\n}\n\nfunction parseComputedMember() {\n expect('[');\n const expr = parseExpression();\n expect(']');\n return expr;\n}\n\nfunction parseLeftHandSideExpressionAllowCall() {\n var expr, args, property;\n expr = parsePrimaryExpression();\n\n for (;;) {\n if (match('.')) {\n property = parseNonComputedMember();\n expr = finishMemberExpression('.', expr, property);\n } else if (match('(')) {\n args = parseArguments();\n expr = finishCallExpression(expr, args);\n } else if (match('[')) {\n property = parseComputedMember();\n expr = finishMemberExpression('[', expr, property);\n } else {\n break;\n }\n }\n\n return expr;\n} // 11.3 Postfix Expressions\n\n\nfunction parsePostfixExpression() {\n const expr = parseLeftHandSideExpressionAllowCall();\n\n if (lookahead.type === TokenPunctuator) {\n if (match('++') || match('--')) {\n throw new Error(DISABLED);\n }\n }\n\n return expr;\n} // 11.4 Unary Operators\n\n\nfunction parseUnaryExpression() {\n var token, expr;\n\n if (lookahead.type !== TokenPunctuator && lookahead.type !== TokenKeyword) {\n expr = parsePostfixExpression();\n } else if (match('++') || match('--')) {\n throw new Error(DISABLED);\n } else if (match('+') || match('-') || match('~') || match('!')) {\n token = lex();\n expr = parseUnaryExpression();\n expr = finishUnaryExpression(token.value, expr);\n } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {\n throw new Error(DISABLED);\n } else {\n expr = parsePostfixExpression();\n }\n\n return expr;\n}\n\nfunction binaryPrecedence(token) {\n let prec = 0;\n\n if (token.type !== TokenPunctuator && token.type !== TokenKeyword) {\n return 0;\n }\n\n switch (token.value) {\n case '||':\n prec = 1;\n break;\n\n case '&&':\n prec = 2;\n break;\n\n case '|':\n prec = 3;\n break;\n\n case '^':\n prec = 4;\n break;\n\n case '&':\n prec = 5;\n break;\n\n case '==':\n case '!=':\n case '===':\n case '!==':\n prec = 6;\n break;\n\n case '<':\n case '>':\n case '<=':\n case '>=':\n case 'instanceof':\n case 'in':\n prec = 7;\n break;\n\n case '<<':\n case '>>':\n case '>>>':\n prec = 8;\n break;\n\n case '+':\n case '-':\n prec = 9;\n break;\n\n case '*':\n case '/':\n case '%':\n prec = 11;\n break;\n }\n\n return prec;\n} // 11.5 Multiplicative Operators\n// 11.6 Additive Operators\n// 11.7 Bitwise Shift Operators\n// 11.8 Relational Operators\n// 11.9 Equality Operators\n// 11.10 Binary Bitwise Operators\n// 11.11 Binary Logical Operators\n\n\nfunction parseBinaryExpression() {\n var marker, markers, expr, token, prec, stack, right, operator, left, i;\n marker = lookahead;\n left = parseUnaryExpression();\n token = lookahead;\n prec = binaryPrecedence(token);\n\n if (prec === 0) {\n return left;\n }\n\n token.prec = prec;\n lex();\n markers = [marker, lookahead];\n right = parseUnaryExpression();\n stack = [left, token, right];\n\n while ((prec = binaryPrecedence(lookahead)) > 0) {\n // Reduce: make a binary expression from the three topmost entries.\n while (stack.length > 2 && prec <= stack[stack.length - 2].prec) {\n right = stack.pop();\n operator = stack.pop().value;\n left = stack.pop();\n markers.pop();\n expr = finishBinaryExpression(operator, left, right);\n stack.push(expr);\n } // Shift.\n\n\n token = lex();\n token.prec = prec;\n stack.push(token);\n markers.push(lookahead);\n expr = parseUnaryExpression();\n stack.push(expr);\n } // Final reduce to clean-up the stack.\n\n\n i = stack.length - 1;\n expr = stack[i];\n markers.pop();\n\n while (i > 1) {\n markers.pop();\n expr = finishBinaryExpression(stack[i - 1].value, stack[i - 2], expr);\n i -= 2;\n }\n\n return expr;\n} // 11.12 Conditional Operator\n\n\nfunction parseConditionalExpression() {\n var expr, consequent, alternate;\n expr = parseBinaryExpression();\n\n if (match('?')) {\n lex();\n consequent = parseConditionalExpression();\n expect(':');\n alternate = parseConditionalExpression();\n expr = finishConditionalExpression(expr, consequent, alternate);\n }\n\n return expr;\n} // 11.14 Comma Operator\n\n\nfunction parseExpression() {\n const expr = parseConditionalExpression();\n\n if (match(',')) {\n throw new Error(DISABLED); // no sequence expressions\n }\n\n return expr;\n}\n\nfunction parser (code) {\n source = code;\n index = 0;\n length = source.length;\n lookahead = null;\n peek();\n const expr = parseExpression();\n\n if (lookahead.type !== TokenEOF) {\n throw new Error('Unexpect token after expression.');\n }\n\n return expr;\n}\n\nvar Constants = {\n NaN: 'NaN',\n E: 'Math.E',\n LN2: 'Math.LN2',\n LN10: 'Math.LN10',\n LOG2E: 'Math.LOG2E',\n LOG10E: 'Math.LOG10E',\n PI: 'Math.PI',\n SQRT1_2: 'Math.SQRT1_2',\n SQRT2: 'Math.SQRT2',\n MIN_VALUE: 'Number.MIN_VALUE',\n MAX_VALUE: 'Number.MAX_VALUE'\n};\n\nfunction Functions (codegen) {\n function fncall(name, args, cast, type) {\n let obj = codegen(args[0]);\n\n if (cast) {\n obj = cast + '(' + obj + ')';\n if (cast.lastIndexOf('new ', 0) === 0) obj = '(' + obj + ')';\n }\n\n return obj + '.' + name + (type < 0 ? '' : type === 0 ? '()' : '(' + args.slice(1).map(codegen).join(',') + ')');\n }\n\n function fn(name, cast, type) {\n return args => fncall(name, args, cast, type);\n }\n\n const DATE = 'new Date',\n STRING = 'String',\n REGEXP = 'RegExp';\n return {\n // MATH functions\n isNaN: 'Number.isNaN',\n isFinite: 'Number.isFinite',\n abs: 'Math.abs',\n acos: 'Math.acos',\n asin: 'Math.asin',\n atan: 'Math.atan',\n atan2: 'Math.atan2',\n ceil: 'Math.ceil',\n cos: 'Math.cos',\n exp: 'Math.exp',\n floor: 'Math.floor',\n log: 'Math.log',\n max: 'Math.max',\n min: 'Math.min',\n pow: 'Math.pow',\n random: 'Math.random',\n round: 'Math.round',\n sin: 'Math.sin',\n sqrt: 'Math.sqrt',\n tan: 'Math.tan',\n clamp: function (args) {\n if (args.length < 3) error('Missing arguments to clamp function.');\n if (args.length > 3) error('Too many arguments to clamp function.');\n const a = args.map(codegen);\n return 'Math.max(' + a[1] + ', Math.min(' + a[2] + ',' + a[0] + '))';\n },\n // DATE functions\n now: 'Date.now',\n utc: 'Date.UTC',\n datetime: DATE,\n date: fn('getDate', DATE, 0),\n day: fn('getDay', DATE, 0),\n year: fn('getFullYear', DATE, 0),\n month: fn('getMonth', DATE, 0),\n hours: fn('getHours', DATE, 0),\n minutes: fn('getMinutes', DATE, 0),\n seconds: fn('getSeconds', DATE, 0),\n milliseconds: fn('getMilliseconds', DATE, 0),\n time: fn('getTime', DATE, 0),\n timezoneoffset: fn('getTimezoneOffset', DATE, 0),\n utcdate: fn('getUTCDate', DATE, 0),\n utcday: fn('getUTCDay', DATE, 0),\n utcyear: fn('getUTCFullYear', DATE, 0),\n utcmonth: fn('getUTCMonth', DATE, 0),\n utchours: fn('getUTCHours', DATE, 0),\n utcminutes: fn('getUTCMinutes', DATE, 0),\n utcseconds: fn('getUTCSeconds', DATE, 0),\n utcmilliseconds: fn('getUTCMilliseconds', DATE, 0),\n // sequence functions\n length: fn('length', null, -1),\n // STRING functions\n parseFloat: 'parseFloat',\n parseInt: 'parseInt',\n upper: fn('toUpperCase', STRING, 0),\n lower: fn('toLowerCase', STRING, 0),\n substring: fn('substring', STRING),\n split: fn('split', STRING),\n trim: fn('trim', STRING, 0),\n // REGEXP functions\n regexp: REGEXP,\n test: fn('test', REGEXP),\n // Control Flow functions\n if: function (args) {\n if (args.length < 3) error('Missing arguments to if function.');\n if (args.length > 3) error('Too many arguments to if function.');\n const a = args.map(codegen);\n return '(' + a[0] + '?' + a[1] + ':' + a[2] + ')';\n }\n };\n}\n\nfunction stripQuotes(s) {\n const n = s && s.length - 1;\n return n && (s[0] === '\"' && s[n] === '\"' || s[0] === '\\'' && s[n] === '\\'') ? s.slice(1, -1) : s;\n}\n\nfunction codegen (opt) {\n opt = opt || {};\n const allowed = opt.allowed ? toSet(opt.allowed) : {},\n forbidden = opt.forbidden ? toSet(opt.forbidden) : {},\n constants = opt.constants || Constants,\n functions = (opt.functions || Functions)(visit),\n globalvar = opt.globalvar,\n fieldvar = opt.fieldvar,\n outputGlobal = isFunction(globalvar) ? globalvar : id => \"\".concat(globalvar, \"[\\\"\").concat(id, \"\\\"]\");\n let globals = {},\n fields = {},\n memberDepth = 0;\n\n function visit(ast) {\n if (isString(ast)) return ast;\n const generator = Generators[ast.type];\n if (generator == null) error('Unsupported type: ' + ast.type);\n return generator(ast);\n }\n\n const Generators = {\n Literal: n => n.raw,\n Identifier: n => {\n const id = n.name;\n\n if (memberDepth > 0) {\n return id;\n } else if (hasOwnProperty(forbidden, id)) {\n return error('Illegal identifier: ' + id);\n } else if (hasOwnProperty(constants, id)) {\n return constants[id];\n } else if (hasOwnProperty(allowed, id)) {\n return id;\n } else {\n globals[id] = 1;\n return outputGlobal(id);\n }\n },\n MemberExpression: n => {\n const d = !n.computed,\n o = visit(n.object);\n if (d) memberDepth += 1;\n const p = visit(n.property);\n\n if (o === fieldvar) {\n // strip quotes to sanitize field name (#1653)\n fields[stripQuotes(p)] = 1;\n }\n\n if (d) memberDepth -= 1;\n return o + (d ? '.' + p : '[' + p + ']');\n },\n CallExpression: n => {\n if (n.callee.type !== 'Identifier') {\n error('Illegal callee type: ' + n.callee.type);\n }\n\n const callee = n.callee.name,\n args = n.arguments,\n fn = hasOwnProperty(functions, callee) && functions[callee];\n if (!fn) error('Unrecognized function: ' + callee);\n return isFunction(fn) ? fn(args) : fn + '(' + args.map(visit).join(',') + ')';\n },\n ArrayExpression: n => '[' + n.elements.map(visit).join(',') + ']',\n BinaryExpression: n => '(' + visit(n.left) + ' ' + n.operator + ' ' + visit(n.right) + ')',\n UnaryExpression: n => '(' + n.operator + visit(n.argument) + ')',\n ConditionalExpression: n => '(' + visit(n.test) + '?' + visit(n.consequent) + ':' + visit(n.alternate) + ')',\n LogicalExpression: n => '(' + visit(n.left) + n.operator + visit(n.right) + ')',\n ObjectExpression: n => '{' + n.properties.map(visit).join(',') + '}',\n Property: n => {\n memberDepth += 1;\n const k = visit(n.key);\n memberDepth -= 1;\n return k + ':' + visit(n.value);\n }\n };\n\n function codegen(ast) {\n const result = {\n code: visit(ast),\n globals: Object.keys(globals),\n fields: Object.keys(fields)\n };\n globals = {};\n fields = {};\n return result;\n }\n\n codegen.functions = functions;\n codegen.constants = constants;\n return codegen;\n}\n\nexport { ASTNode, ArrayExpression, BinaryExpression, CallExpression, ConditionalExpression, Identifier, Literal, LogicalExpression, MemberExpression, ObjectExpression, Property, RawCode, UnaryExpression, codegen, Constants as constants, Functions as functions, parser as parse };\n","import { parse } from 'vega-expression';\nfunction getName(node) {\n const name = [];\n if (node.type === 'Identifier') {\n return [node.name];\n }\n if (node.type === 'Literal') {\n return [node.value];\n }\n if (node.type === 'MemberExpression') {\n name.push(...getName(node.object));\n name.push(...getName(node.property));\n }\n return name;\n}\nfunction startsWithDatum(node) {\n if (node.object.type === 'MemberExpression') {\n return startsWithDatum(node.object);\n }\n return node.object.name === 'datum';\n}\nexport function getDependentFields(expression) {\n const ast = parse(expression);\n const dependents = new Set();\n ast.visit((node) => {\n if (node.type === 'MemberExpression' && startsWithDatum(node)) {\n dependents.add(getName(node).slice(1).join('.'));\n }\n });\n return dependents;\n}\n//# sourceMappingURL=expressions.js.map","import { duplicate } from '../../util';\nimport { expression } from '../predicate';\nimport { DataFlowNode } from './dataflow';\nimport { getDependentFields } from './expressions';\nexport class FilterNode extends DataFlowNode {\n constructor(parent, model, filter) {\n super(parent);\n this.model = model;\n this.filter = filter;\n // TODO: refactor this to not take a node and\n // then add a static function makeFromOperand and make the constructor take only an expression\n this.expr = expression(this.model, this.filter, this);\n this._dependentFields = getDependentFields(this.expr);\n }\n clone() {\n return new FilterNode(null, this.model, duplicate(this.filter));\n }\n dependentFields() {\n return this._dependentFields;\n }\n producedFields() {\n return new Set(); // filter does not produce any new fields\n }\n assemble() {\n return {\n type: 'filter',\n expr: this.expr\n };\n }\n hash() {\n return `Filter ${this.expr}`;\n }\n}\n//# sourceMappingURL=filter.js.map","import { selector as parseSelector } from 'vega-event-selector';\nimport { array, isObject, isString, stringValue } from 'vega-util';\nimport { selectionCompilers, STORE } from '.';\nimport { warn } from '../../log';\nimport { duplicate, entries, replacePathInField, varName } from '../../util';\nimport { OutputNode } from '../data/dataflow';\nimport { FilterNode } from '../data/filter';\nimport { DataSourceType } from '../../data';\nexport function parseUnitSelection(model, selDefs) {\n var _a;\n const selCmpts = {};\n const selectionConfig = model.config.selection;\n if (!selDefs || !selDefs.length)\n return selCmpts;\n for (const def of selDefs) {\n const name = varName(def.name);\n const selDef = def.select;\n const type = isString(selDef) ? selDef : selDef.type;\n const defaults = isObject(selDef) ? duplicate(selDef) : { type };\n // Set default values from config if a property hasn't been specified,\n // or if it is true. E.g., \"translate\": true should use the default\n // event handlers for translate. However, true may be a valid value for\n // a property (e.g., \"nearest\": true).\n const cfg = selectionConfig[type];\n for (const key in cfg) {\n // Project transform applies its defaults.\n if (key === 'fields' || key === 'encodings') {\n continue;\n }\n if (key === 'mark') {\n defaults[key] = Object.assign(Object.assign({}, cfg[key]), defaults[key]);\n }\n if (defaults[key] === undefined || defaults[key] === true) {\n defaults[key] = (_a = cfg[key]) !== null && _a !== void 0 ? _a : defaults[key];\n }\n }\n const selCmpt = (selCmpts[name] = Object.assign(Object.assign({}, defaults), { name,\n type, init: def.value, bind: def.bind, events: isString(defaults.on) ? parseSelector(defaults.on, 'scope') : array(duplicate(defaults.on)) }));\n for (const c of selectionCompilers) {\n if (c.defined(selCmpt) && c.parse) {\n c.parse(model, selCmpt, def);\n }\n }\n }\n return selCmpts;\n}\nexport function parseSelectionPredicate(model, pred, dfnode, datum = 'datum') {\n const name = isString(pred) ? pred : pred.param;\n const vname = varName(name);\n const store = stringValue(vname + STORE);\n let selCmpt;\n try {\n selCmpt = model.getSelectionComponent(vname, name);\n }\n catch (e) {\n // If a selection isn't found, treat as a variable parameter and coerce to boolean.\n return `!!${vname}`;\n }\n if (selCmpt.project.timeUnit) {\n const child = dfnode !== null && dfnode !== void 0 ? dfnode : model.component.data.raw;\n const tunode = selCmpt.project.timeUnit.clone();\n if (child.parent) {\n tunode.insertAsParentOf(child);\n }\n else {\n child.parent = tunode;\n }\n }\n const test = `vlSelectionTest(${store}, ${datum}${selCmpt.resolve === 'global' ? ')' : `, ${stringValue(selCmpt.resolve)})`}`;\n const length = `length(data(${store}))`;\n return pred.empty === false ? `${length} && ${test}` : `!${length} || ${test}`;\n}\nexport function parseSelectionExtent(model, name, extent) {\n const vname = varName(name);\n const encoding = extent['encoding'];\n let field = extent['field'];\n let selCmpt;\n try {\n selCmpt = model.getSelectionComponent(vname, name);\n }\n catch (e) {\n // If a selection isn't found, treat it as a variable parameter.\n return vname;\n }\n if (!encoding && !field) {\n field = selCmpt.project.items[0].field;\n if (selCmpt.project.items.length > 1) {\n warn('A \"field\" or \"encoding\" must be specified when using a selection as a scale domain. ' +\n `Using \"field\": ${stringValue(field)}.`);\n }\n }\n else if (encoding && !field) {\n const encodings = selCmpt.project.items.filter(p => p.channel === encoding);\n if (!encodings.length || encodings.length > 1) {\n field = selCmpt.project.items[0].field;\n warn((!encodings.length ? 'No ' : 'Multiple ') +\n `matching ${stringValue(encoding)} encoding found for selection ${stringValue(extent.param)}. ` +\n `Using \"field\": ${stringValue(field)}.`);\n }\n else {\n field = encodings[0].field;\n }\n }\n return `${selCmpt.name}[${stringValue(replacePathInField(field))}]`;\n}\nexport function materializeSelections(model, main) {\n var _a;\n for (const [selection, selCmpt] of entries((_a = model.component.selection) !== null && _a !== void 0 ? _a : {})) {\n const lookupName = model.getName(`lookup_${selection}`);\n model.component.data.outputNodes[lookupName] = selCmpt.materialized = new OutputNode(new FilterNode(main, model, { param: selection }), lookupName, DataSourceType.Lookup, model.component.data.outputNodeRefCounts);\n }\n}\n//# sourceMappingURL=parse.js.map","import { isString } from 'vega-util';\nimport { fieldFilterExpression, isSelectionPredicate } from '../predicate';\nimport { logicalExpr } from '../util';\nimport { parseSelectionPredicate } from './selection/parse';\n/**\n * Converts a predicate into an expression.\n */\n// model is only used for selection filters.\nexport function expression(model, filterOp, node) {\n return logicalExpr(filterOp, (predicate) => {\n if (isString(predicate)) {\n return predicate;\n }\n else if (isSelectionPredicate(predicate)) {\n return parseSelectionPredicate(model, predicate, node);\n }\n else {\n // Filter Object\n return fieldFilterExpression(predicate);\n }\n });\n}\n//# sourceMappingURL=predicate.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { array, isArray } from 'vega-util';\nimport { AXIS_PARTS, AXIS_PROPERTY_TYPE, CONDITIONAL_AXIS_PROP_INDEX, isConditionalAxisValue } from '../../axis';\nimport { POSITION_SCALE_CHANNELS } from '../../channel';\nimport { defaultTitle } from '../../channeldef';\nimport { isText } from '../../title';\nimport { contains, getFirstDefined, isEmpty, replaceAll } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { exprFromValueOrSignalRef } from '../common';\nimport { expression } from '../predicate';\nfunction assembleTitle(title, config) {\n if (!title) {\n return undefined;\n }\n if (isArray(title) && !isText(title)) {\n return title.map(fieldDef => defaultTitle(fieldDef, config)).join(', ');\n }\n return title;\n}\nfunction setAxisEncode(axis, part, vgProp, vgRef) {\n var _a, _b, _c;\n var _d, _e;\n (_a = axis.encode) !== null && _a !== void 0 ? _a : (axis.encode = {});\n (_b = (_d = axis.encode)[part]) !== null && _b !== void 0 ? _b : (_d[part] = {});\n (_c = (_e = axis.encode[part]).update) !== null && _c !== void 0 ? _c : (_e.update = {});\n // TODO: remove as any after https://github.com/prisma/nexus-prisma/issues/291\n axis.encode[part].update[vgProp] = vgRef;\n}\nexport function assembleAxis(axisCmpt, kind, config, opt = { header: false }) {\n var _a, _b;\n const _c = axisCmpt.combine(), { disable, orient, scale, labelExpr, title, zindex } = _c, axis = __rest(_c, [\"disable\", \"orient\", \"scale\", \"labelExpr\", \"title\", \"zindex\"]);\n if (disable) {\n return undefined;\n }\n for (const prop in axis) {\n const propType = AXIS_PROPERTY_TYPE[prop];\n const propValue = axis[prop];\n if (propType && propType !== kind && propType !== 'both') {\n // Remove properties that are not valid for this kind of axis\n delete axis[prop];\n }\n else if (isConditionalAxisValue(propValue)) {\n // deal with conditional axis value\n const { condition } = propValue, valueOrSignalRef = __rest(propValue, [\"condition\"]);\n const conditions = array(condition);\n const propIndex = CONDITIONAL_AXIS_PROP_INDEX[prop];\n if (propIndex) {\n const { vgProp, part } = propIndex;\n // If there is a corresponding Vega property for the channel,\n // use Vega's custom axis encoding and delete the original axis property to avoid conflicts\n const vgRef = [\n ...conditions.map(c => {\n const { test } = c, valueOrSignalCRef = __rest(c, [\"test\"]);\n return Object.assign({ test: expression(null, test) }, valueOrSignalCRef);\n }),\n valueOrSignalRef\n ];\n setAxisEncode(axis, part, vgProp, vgRef);\n delete axis[prop];\n }\n else if (propIndex === null) {\n // If propIndex is null, this means we support conditional axis property by converting the condition to signal instead.\n const signalRef = {\n signal: conditions\n .map(c => {\n const { test } = c, valueOrSignalCRef = __rest(c, [\"test\"]);\n return `${expression(null, test)} ? ${exprFromValueOrSignalRef(valueOrSignalCRef)} : `;\n })\n .join('') + exprFromValueOrSignalRef(valueOrSignalRef)\n };\n axis[prop] = signalRef;\n }\n }\n else if (isSignalRef(propValue)) {\n const propIndex = CONDITIONAL_AXIS_PROP_INDEX[prop];\n if (propIndex) {\n const { vgProp, part } = propIndex;\n setAxisEncode(axis, part, vgProp, propValue);\n delete axis[prop];\n } // else do nothing since the property already supports signal\n }\n // Do not pass labelAlign/Baseline = null to Vega since it won't pass the schema\n // Note that we need to use null so the default labelAlign is preserved.\n if (contains(['labelAlign', 'labelBaseline'], prop) && axis[prop] === null) {\n delete axis[prop];\n }\n }\n if (kind === 'grid') {\n if (!axis.grid) {\n return undefined;\n }\n // Remove unnecessary encode block\n if (axis.encode) {\n // Only need to keep encode block for grid\n const { grid } = axis.encode;\n axis.encode = Object.assign({}, (grid ? { grid } : {}));\n if (isEmpty(axis.encode)) {\n delete axis.encode;\n }\n }\n return Object.assign(Object.assign({ scale,\n orient }, axis), { domain: false, labels: false, aria: false, \n // Always set min/maxExtent to 0 to ensure that `config.axis*.minExtent` and `config.axis*.maxExtent`\n // would not affect gridAxis\n maxExtent: 0, minExtent: 0, ticks: false, zindex: getFirstDefined(zindex, 0) // put grid behind marks by default\n });\n }\n else {\n // kind === 'main'\n if (!opt.header && axisCmpt.mainExtracted) {\n // if mainExtracted has been extracted to a separate facet\n return undefined;\n }\n if (labelExpr !== undefined) {\n let expr = labelExpr;\n if (((_b = (_a = axis.encode) === null || _a === void 0 ? void 0 : _a.labels) === null || _b === void 0 ? void 0 : _b.update) && isSignalRef(axis.encode.labels.update.text)) {\n expr = replaceAll(labelExpr, 'datum.label', axis.encode.labels.update.text.signal);\n }\n setAxisEncode(axis, 'labels', 'text', { signal: expr });\n }\n if (axis.labelAlign === null) {\n delete axis.labelAlign;\n }\n // Remove unnecessary encode block\n if (axis.encode) {\n for (const part of AXIS_PARTS) {\n if (!axisCmpt.hasAxisPart(part)) {\n delete axis.encode[part];\n }\n }\n if (isEmpty(axis.encode)) {\n delete axis.encode;\n }\n }\n const titleString = assembleTitle(title, config);\n return Object.assign(Object.assign(Object.assign(Object.assign({ scale,\n orient, grid: false }, (titleString ? { title: titleString } : {})), axis), (config.aria === false ? { aria: false } : {})), { zindex: getFirstDefined(zindex, 0) // put axis line above marks by default\n });\n }\n}\n/**\n * Add axis signals so grid line works correctly\n * (Fix https://github.com/vega/vega-lite/issues/4226)\n */\nexport function assembleAxisSignals(model) {\n const { axes } = model.component;\n const signals = [];\n for (const channel of POSITION_SCALE_CHANNELS) {\n if (axes[channel]) {\n for (const axis of axes[channel]) {\n if (!axis.get('disable') && !axis.get('gridScale')) {\n // If there is x-axis but no y-scale for gridScale, need to set height/width so x-axis can draw the grid with the right height. Same for y-axis and width.\n const sizeType = channel === 'x' ? 'height' : 'width';\n const update = model.getSizeSignalRef(sizeType).signal;\n if (sizeType !== update) {\n signals.push({\n name: sizeType,\n update: update\n });\n }\n }\n }\n }\n }\n return signals;\n}\nexport function assembleAxes(axisComponents, config) {\n const { x = [], y = [] } = axisComponents;\n return [\n ...x.map(a => assembleAxis(a, 'grid', config)),\n ...y.map(a => assembleAxis(a, 'grid', config)),\n ...x.map(a => assembleAxis(a, 'main', config)),\n ...y.map(a => assembleAxis(a, 'main', config))\n ].filter(a => a); // filter undefined\n}\n//# sourceMappingURL=assemble.js.map","import { array } from 'vega-util';\nimport { isQuantitative } from '../../scale';\nimport { keys, titleCase } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { getStyleConfig, signalOrStringValue } from '../common';\nfunction getAxisConfigFromConfigTypes(configTypes, config, channel, orient) {\n // TODO: add special casing to add conditional value based on orient signal\n return Object.assign.apply(null, [\n {},\n ...configTypes.map(configType => {\n if (configType === 'axisOrient') {\n const orient1 = channel === 'x' ? 'bottom' : 'left';\n const orientConfig1 = config[channel === 'x' ? 'axisBottom' : 'axisLeft'] || {};\n const orientConfig2 = config[channel === 'x' ? 'axisTop' : 'axisRight'] || {};\n const props = new Set([...keys(orientConfig1), ...keys(orientConfig2)]);\n const conditionalOrientAxisConfig = {};\n for (const prop of props.values()) {\n conditionalOrientAxisConfig[prop] = {\n // orient is surely signal in this case\n signal: `${orient['signal']} === \"${orient1}\" ? ${signalOrStringValue(orientConfig1[prop])} : ${signalOrStringValue(orientConfig2[prop])}`\n };\n }\n return conditionalOrientAxisConfig;\n }\n return config[configType];\n })\n ]);\n}\nexport function getAxisConfigs(channel, scaleType, orient, config) {\n const typeBasedConfigTypes = scaleType === 'band'\n ? ['axisDiscrete', 'axisBand']\n : scaleType === 'point'\n ? ['axisDiscrete', 'axisPoint']\n : isQuantitative(scaleType)\n ? ['axisQuantitative']\n : scaleType === 'time' || scaleType === 'utc'\n ? ['axisTemporal']\n : [];\n const axisChannel = channel === 'x' ? 'axisX' : 'axisY';\n const axisOrient = isSignalRef(orient) ? 'axisOrient' : `axis${titleCase(orient)}`; // axisTop, axisBottom, ...\n const vlOnlyConfigTypes = [\n // technically Vega does have axisBand, but if we make another separation here,\n // it will further introduce complexity in the code\n ...typeBasedConfigTypes,\n ...typeBasedConfigTypes.map(c => axisChannel + c.substr(4))\n ];\n const vgConfigTypes = ['axis', axisOrient, axisChannel];\n return {\n vlOnlyAxisConfig: getAxisConfigFromConfigTypes(vlOnlyConfigTypes, config, channel, orient),\n vgAxisConfig: getAxisConfigFromConfigTypes(vgConfigTypes, config, channel, orient),\n axisConfigStyle: getAxisConfigStyle([...vgConfigTypes, ...vlOnlyConfigTypes], config)\n };\n}\nexport function getAxisConfigStyle(axisConfigTypes, config) {\n var _a;\n const toMerge = [{}];\n for (const configType of axisConfigTypes) {\n // TODO: add special casing to add conditional value based on orient signal\n let style = (_a = config[configType]) === null || _a === void 0 ? void 0 : _a.style;\n if (style) {\n style = array(style);\n for (const s of style) {\n toMerge.push(config.style[s]);\n }\n }\n }\n return Object.assign.apply(null, toMerge);\n}\nexport function getAxisConfig(property, styleConfigIndex, style, axisConfigs = {}) {\n var _a;\n const styleConfig = getStyleConfig(property, style, styleConfigIndex);\n if (styleConfig !== undefined) {\n return {\n configFrom: 'style',\n configValue: styleConfig\n };\n }\n for (const configFrom of ['vlOnlyAxisConfig', 'vgAxisConfig', 'axisConfigStyle']) {\n if (((_a = axisConfigs[configFrom]) === null || _a === void 0 ? void 0 : _a[property]) !== undefined) {\n return { configFrom, configValue: axisConfigs[configFrom][property] };\n }\n }\n return {};\n}\n//# sourceMappingURL=config.js.map","import { isArray, isObject } from 'vega-util';\nimport { isBinned, isBinning } from '../../bin';\nimport { X } from '../../channel';\nimport { isDiscrete, isFieldDef, toFieldDefBase, valueArray } from '../../channeldef';\nimport { hasDiscreteDomain } from '../../scale';\nimport { normalizeTimeUnit } from '../../timeunit';\nimport { NOMINAL, ORDINAL } from '../../type';\nimport { contains, normalizeAngle } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { mergeTitle, mergeTitleFieldDefs } from '../common';\nimport { guideFormat, guideFormatType } from '../format';\nimport { getAxisConfig } from './config';\nexport const axisRules = {\n scale: ({ model, channel }) => model.scaleName(channel),\n format: ({ fieldOrDatumDef, config, axis }) => {\n const { format, formatType } = axis;\n return guideFormat(fieldOrDatumDef, fieldOrDatumDef.type, format, formatType, config, true);\n },\n formatType: ({ axis, fieldOrDatumDef, scaleType }) => {\n const { formatType } = axis;\n return guideFormatType(formatType, fieldOrDatumDef, scaleType);\n },\n grid: ({ fieldOrDatumDef, axis, scaleType }) => { var _a; return (_a = axis.grid) !== null && _a !== void 0 ? _a : defaultGrid(scaleType, fieldOrDatumDef); },\n gridScale: ({ model, channel }) => gridScale(model, channel),\n labelAlign: ({ axis, labelAngle, orient, channel }) => axis.labelAlign || defaultLabelAlign(labelAngle, orient, channel),\n labelAngle: ({ labelAngle }) => labelAngle,\n labelBaseline: ({ axis, labelAngle, orient, channel }) => axis.labelBaseline || defaultLabelBaseline(labelAngle, orient, channel),\n labelFlush: ({ axis, fieldOrDatumDef, channel }) => { var _a; return (_a = axis.labelFlush) !== null && _a !== void 0 ? _a : defaultLabelFlush(fieldOrDatumDef.type, channel); },\n labelOverlap: ({ axis, fieldOrDatumDef, scaleType }) => {\n var _a;\n return (_a = axis.labelOverlap) !== null && _a !== void 0 ? _a : defaultLabelOverlap(fieldOrDatumDef.type, scaleType, isFieldDef(fieldOrDatumDef) && !!fieldOrDatumDef.timeUnit, isFieldDef(fieldOrDatumDef) ? fieldOrDatumDef.sort : undefined);\n },\n // we already calculate orient in parse\n orient: ({ orient }) => orient,\n tickCount: ({ channel, model, axis, fieldOrDatumDef, scaleType }) => {\n var _a;\n const sizeType = channel === 'x' ? 'width' : channel === 'y' ? 'height' : undefined;\n const size = sizeType ? model.getSizeSignalRef(sizeType) : undefined;\n return (_a = axis.tickCount) !== null && _a !== void 0 ? _a : defaultTickCount({ fieldOrDatumDef, scaleType, size, values: axis.values });\n },\n title: ({ axis, model, channel }) => {\n if (axis.title !== undefined) {\n return axis.title;\n }\n const fieldDefTitle = getFieldDefTitle(model, channel);\n if (fieldDefTitle !== undefined) {\n return fieldDefTitle;\n }\n const fieldDef = model.typedFieldDef(channel);\n const channel2 = channel === 'x' ? 'x2' : 'y2';\n const fieldDef2 = model.fieldDef(channel2);\n // If title not specified, store base parts of fieldDef (and fieldDef2 if exists)\n return mergeTitleFieldDefs(fieldDef ? [toFieldDefBase(fieldDef)] : [], isFieldDef(fieldDef2) ? [toFieldDefBase(fieldDef2)] : []);\n },\n values: ({ axis, fieldOrDatumDef }) => values(axis, fieldOrDatumDef),\n zindex: ({ axis, fieldOrDatumDef, mark }) => { var _a; return (_a = axis.zindex) !== null && _a !== void 0 ? _a : defaultZindex(mark, fieldOrDatumDef); }\n};\n// TODO: we need to refactor this method after we take care of config refactoring\n/**\n * Default rules for whether to show a grid should be shown for a channel.\n * If `grid` is unspecified, the default value is `true` for ordinal scales that are not binned\n */\nexport function defaultGrid(scaleType, fieldDef) {\n return !hasDiscreteDomain(scaleType) && isFieldDef(fieldDef) && !isBinning(fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.bin) && !isBinned(fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.bin);\n}\nexport function gridScale(model, channel) {\n const gridChannel = channel === 'x' ? 'y' : 'x';\n if (model.getScaleComponent(gridChannel)) {\n return model.scaleName(gridChannel);\n }\n return undefined;\n}\nexport function getLabelAngle(fieldOrDatumDef, axis, channel, styleConfig, axisConfigs) {\n const labelAngle = axis === null || axis === void 0 ? void 0 : axis.labelAngle;\n // try axis value\n if (labelAngle !== undefined) {\n return isSignalRef(labelAngle) ? labelAngle : normalizeAngle(labelAngle);\n }\n else {\n // try axis config value\n const { configValue: angle } = getAxisConfig('labelAngle', styleConfig, axis === null || axis === void 0 ? void 0 : axis.style, axisConfigs);\n if (angle !== undefined) {\n return normalizeAngle(angle);\n }\n else {\n // get default value\n if (channel === X &&\n contains([NOMINAL, ORDINAL], fieldOrDatumDef.type) &&\n !(isFieldDef(fieldOrDatumDef) && fieldOrDatumDef.timeUnit)) {\n return 270;\n }\n // no default\n return undefined;\n }\n }\n}\nexport function normalizeAngleExpr(angle) {\n return `(((${angle.signal} % 360) + 360) % 360)`;\n}\nexport function defaultLabelBaseline(angle, orient, channel, alwaysIncludeMiddle) {\n if (angle !== undefined) {\n if (channel === 'x') {\n if (isSignalRef(angle)) {\n const a = normalizeAngleExpr(angle);\n const orientIsTop = isSignalRef(orient) ? `(${orient.signal} === \"top\")` : orient === 'top';\n return {\n signal: `(45 < ${a} && ${a} < 135) || (225 < ${a} && ${a} < 315) ? \"middle\" :` +\n `(${a} <= 45 || 315 <= ${a}) === ${orientIsTop} ? \"bottom\" : \"top\"`\n };\n }\n if ((45 < angle && angle < 135) || (225 < angle && angle < 315)) {\n return 'middle';\n }\n if (isSignalRef(orient)) {\n const op = angle <= 45 || 315 <= angle ? '===' : '!==';\n return { signal: `${orient.signal} ${op} \"top\" ? \"bottom\" : \"top\"` };\n }\n return (angle <= 45 || 315 <= angle) === (orient === 'top') ? 'bottom' : 'top';\n }\n else {\n if (isSignalRef(angle)) {\n const a = normalizeAngleExpr(angle);\n const orientIsLeft = isSignalRef(orient) ? `(${orient.signal} === \"left\")` : orient === 'left';\n const middle = alwaysIncludeMiddle ? '\"middle\"' : 'null';\n return {\n signal: `${a} <= 45 || 315 <= ${a} || (135 <= ${a} && ${a} <= 225) ? ${middle} : (45 <= ${a} && ${a} <= 135) === ${orientIsLeft} ? \"top\" : \"bottom\"`\n };\n }\n if (angle <= 45 || 315 <= angle || (135 <= angle && angle <= 225)) {\n return alwaysIncludeMiddle ? 'middle' : null;\n }\n if (isSignalRef(orient)) {\n const op = 45 <= angle && angle <= 135 ? '===' : '!==';\n return { signal: `${orient.signal} ${op} \"left\" ? \"top\" : \"bottom\"` };\n }\n return (45 <= angle && angle <= 135) === (orient === 'left') ? 'top' : 'bottom';\n }\n }\n return undefined;\n}\nexport function defaultLabelAlign(angle, orient, channel) {\n if (angle === undefined) {\n return undefined;\n }\n const isX = channel === 'x';\n const startAngle = isX ? 0 : 90;\n const mainOrient = isX ? 'bottom' : 'left';\n if (isSignalRef(angle)) {\n const a = normalizeAngleExpr(angle);\n const orientIsMain = isSignalRef(orient) ? `(${orient.signal} === \"${mainOrient}\")` : orient === mainOrient;\n return {\n signal: `(${startAngle ? `(${a} + 90)` : a} % 180 === 0) ? ${isX ? null : '\"center\"'} :` +\n `(${startAngle} < ${a} && ${a} < ${180 + startAngle}) === ${orientIsMain} ? \"left\" : \"right\"`\n };\n }\n if ((angle + startAngle) % 180 === 0) {\n // For bottom, use default label align so label flush still works\n return isX ? null : 'center';\n }\n if (isSignalRef(orient)) {\n const op = startAngle < angle && angle < 180 + startAngle ? '===' : '!==';\n const orientIsMain = `${orient.signal} ${op} \"${mainOrient}\"`;\n return {\n signal: `${orientIsMain} ? \"left\" : \"right\"`\n };\n }\n if ((startAngle < angle && angle < 180 + startAngle) === (orient === mainOrient)) {\n return 'left';\n }\n return 'right';\n}\nexport function defaultLabelFlush(type, channel) {\n if (channel === 'x' && contains(['quantitative', 'temporal'], type)) {\n return true;\n }\n return undefined;\n}\nexport function defaultLabelOverlap(type, scaleType, hasTimeUnit, sort) {\n // do not prevent overlap for nominal data because there is no way to infer what the missing labels are\n if ((hasTimeUnit && !isObject(sort)) || (type !== 'nominal' && type !== 'ordinal')) {\n if (scaleType === 'log' || scaleType === 'symlog') {\n return 'greedy';\n }\n return true;\n }\n return undefined;\n}\nexport function defaultOrient(channel) {\n return channel === 'x' ? 'bottom' : 'left';\n}\nexport function defaultTickCount({ fieldOrDatumDef, scaleType, size, values: vals }) {\n var _a;\n if (!vals && !hasDiscreteDomain(scaleType) && scaleType !== 'log') {\n if (isFieldDef(fieldOrDatumDef)) {\n if (isBinning(fieldOrDatumDef.bin)) {\n // for binned data, we don't want more ticks than maxbins\n return { signal: `ceil(${size.signal}/10)` };\n }\n if (fieldOrDatumDef.timeUnit &&\n contains(['month', 'hours', 'day', 'quarter'], (_a = normalizeTimeUnit(fieldOrDatumDef.timeUnit)) === null || _a === void 0 ? void 0 : _a.unit)) {\n return undefined;\n }\n }\n return { signal: `ceil(${size.signal}/40)` };\n }\n return undefined;\n}\nexport function getFieldDefTitle(model, channel) {\n const channel2 = channel === 'x' ? 'x2' : 'y2';\n const fieldDef = model.fieldDef(channel);\n const fieldDef2 = model.fieldDef(channel2);\n const title1 = fieldDef ? fieldDef.title : undefined;\n const title2 = fieldDef2 ? fieldDef2.title : undefined;\n if (title1 && title2) {\n return mergeTitle(title1, title2);\n }\n else if (title1) {\n return title1;\n }\n else if (title2) {\n return title2;\n }\n else if (title1 !== undefined) {\n // falsy value to disable config\n return title1;\n }\n else if (title2 !== undefined) {\n // falsy value to disable config\n return title2;\n }\n return undefined;\n}\nexport function values(axis, fieldOrDatumDef) {\n const vals = axis.values;\n if (isArray(vals)) {\n return valueArray(fieldOrDatumDef, vals);\n }\n else if (isSignalRef(vals)) {\n return vals;\n }\n return undefined;\n}\nexport function defaultZindex(mark, fieldDef) {\n if (mark === 'rect' && isDiscrete(fieldDef)) {\n return 1;\n }\n return 0;\n}\n//# sourceMappingURL=properties.js.map","import { isScaleFieldDef, vgField } from '../../channeldef';\nimport { fieldFilterExpression } from '../../predicate';\nimport { isSortArray } from '../../sort';\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\nimport { getDependentFields } from './expressions';\nexport class CalculateNode extends DataFlowNode {\n constructor(parent, transform) {\n super(parent);\n this.transform = transform;\n this._dependentFields = getDependentFields(this.transform.calculate);\n }\n clone() {\n return new CalculateNode(null, duplicate(this.transform));\n }\n static parseAllForSortIndex(parent, model) {\n // get all the encoding with sort fields from model\n model.forEachFieldDef((fieldDef, channel) => {\n if (!isScaleFieldDef(fieldDef)) {\n return;\n }\n if (isSortArray(fieldDef.sort)) {\n const { field, timeUnit } = fieldDef;\n const sort = fieldDef.sort;\n // generate `datum[\"a\"] === val0 ? 0 : datum[\"a\"] === val1 ? 1 : ... : n` via FieldEqualPredicate\n const calculate = sort\n .map((sortValue, i) => {\n return `${fieldFilterExpression({ field, timeUnit, equal: sortValue })} ? ${i} : `;\n })\n .join('') + sort.length;\n parent = new CalculateNode(parent, {\n calculate,\n as: sortArrayIndexField(fieldDef, channel, { forAs: true })\n });\n }\n });\n return parent;\n }\n producedFields() {\n return new Set([this.transform.as]);\n }\n dependentFields() {\n return this._dependentFields;\n }\n assemble() {\n return {\n type: 'formula',\n expr: this.transform.calculate,\n as: this.transform.as\n };\n }\n hash() {\n return `Calculate ${hash(this.transform)}`;\n }\n}\nexport function sortArrayIndexField(fieldDef, channel, opt) {\n return vgField(fieldDef, Object.assign({ prefix: channel, suffix: 'sort_index' }, (opt !== null && opt !== void 0 ? opt : {})));\n}\n//# sourceMappingURL=calculate.js.map","import { contains, getFirstDefined } from '../../util';\n/**\n * Get header channel, which can be different from facet channel when orient is specified or when the facet channel is facet.\n */\nexport function getHeaderChannel(channel, orient) {\n if (contains(['top', 'bottom'], orient)) {\n return 'column';\n }\n else if (contains(['left', 'right'], orient)) {\n return 'row';\n }\n return channel === 'row' ? 'row' : 'column';\n}\nexport function getHeaderProperty(prop, header, config, channel) {\n const headerSpecificConfig = channel === 'row' ? config.headerRow : channel === 'column' ? config.headerColumn : config.headerFacet;\n return getFirstDefined((header || {})[prop], headerSpecificConfig[prop], config.header[prop]);\n}\nexport function getHeaderProperties(properties, header, config, channel) {\n const props = {};\n for (const prop of properties) {\n const value = getHeaderProperty(prop, header || {}, config, channel);\n if (value !== undefined) {\n props[prop] = value;\n }\n }\n return props;\n}\n//# sourceMappingURL=common.js.map","export const HEADER_CHANNELS = ['row', 'column'];\nexport const HEADER_TYPES = ['header', 'footer'];\n//# sourceMappingURL=component.js.map","/**\n * Utility for generating row / column headers\n */\nimport { isArray } from 'vega-util';\nimport { FACET_CHANNELS } from '../../channel';\nimport { vgField } from '../../channeldef';\nimport { HEADER_LABEL_PROPERTIES, HEADER_LABEL_PROPERTIES_MAP, HEADER_TITLE_PROPERTIES, HEADER_TITLE_PROPERTIES_MAP } from '../../header';\nimport { isSortField } from '../../sort';\nimport { isFacetMapping } from '../../spec/facet';\nimport { contains, isEmpty, normalizeAngle, replaceAll } from '../../util';\nimport { defaultLabelAlign, defaultLabelBaseline } from '../axis/properties';\nimport { sortArrayIndexField } from '../data/calculate';\nimport { formatSignalRef } from '../format';\nimport { isFacetModel } from '../model';\nimport { getHeaderChannel, getHeaderProperties, getHeaderProperty } from './common';\nimport { HEADER_TYPES } from './component';\n// TODO: rename to assembleHeaderTitleGroup\nexport function assembleTitleGroup(model, channel) {\n const title = model.component.layoutHeaders[channel].title;\n const config = model.config ? model.config : undefined;\n const facetFieldDef = model.component.layoutHeaders[channel].facetFieldDef\n ? model.component.layoutHeaders[channel].facetFieldDef\n : undefined;\n const { titleAnchor, titleAngle: ta, titleOrient } = getHeaderProperties(['titleAnchor', 'titleAngle', 'titleOrient'], facetFieldDef.header, config, channel);\n const headerChannel = getHeaderChannel(channel, titleOrient);\n const titleAngle = normalizeAngle(ta);\n return {\n name: `${channel}-title`,\n type: 'group',\n role: `${headerChannel}-title`,\n title: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ text: title }, (channel === 'row' ? { orient: 'left' } : {})), { style: 'guide-title' }), defaultHeaderGuideBaseline(titleAngle, headerChannel)), defaultHeaderGuideAlign(headerChannel, titleAngle, titleAnchor)), assembleHeaderProperties(config, facetFieldDef, channel, HEADER_TITLE_PROPERTIES, HEADER_TITLE_PROPERTIES_MAP))\n };\n}\nexport function defaultHeaderGuideAlign(headerChannel, angle, anchor = 'middle') {\n switch (anchor) {\n case 'start':\n return { align: 'left' };\n case 'end':\n return { align: 'right' };\n }\n const align = defaultLabelAlign(angle, headerChannel === 'row' ? 'left' : 'top', headerChannel === 'row' ? 'y' : 'x');\n return align ? { align } : {};\n}\nexport function defaultHeaderGuideBaseline(angle, channel) {\n const baseline = defaultLabelBaseline(angle, channel === 'row' ? 'left' : 'top', channel === 'row' ? 'y' : 'x', true);\n return baseline ? { baseline } : {};\n}\nexport function assembleHeaderGroups(model, channel) {\n const layoutHeader = model.component.layoutHeaders[channel];\n const groups = [];\n for (const headerType of HEADER_TYPES) {\n if (layoutHeader[headerType]) {\n for (const headerComponent of layoutHeader[headerType]) {\n const group = assembleHeaderGroup(model, channel, headerType, layoutHeader, headerComponent);\n if (group != null) {\n groups.push(group);\n }\n }\n }\n }\n return groups;\n}\nfunction getSort(facetFieldDef, channel) {\n var _a;\n const { sort } = facetFieldDef;\n if (isSortField(sort)) {\n return {\n field: vgField(sort, { expr: 'datum' }),\n order: (_a = sort.order) !== null && _a !== void 0 ? _a : 'ascending'\n };\n }\n else if (isArray(sort)) {\n return {\n field: sortArrayIndexField(facetFieldDef, channel, { expr: 'datum' }),\n order: 'ascending'\n };\n }\n else {\n return {\n field: vgField(facetFieldDef, { expr: 'datum' }),\n order: sort !== null && sort !== void 0 ? sort : 'ascending'\n };\n }\n}\nexport function assembleLabelTitle(facetFieldDef, channel, config) {\n const { format, formatType, labelAngle, labelAnchor, labelOrient, labelExpr } = getHeaderProperties(['format', 'formatType', 'labelAngle', 'labelAnchor', 'labelOrient', 'labelExpr'], facetFieldDef.header, config, channel);\n const titleTextExpr = formatSignalRef({\n fieldOrDatumDef: facetFieldDef,\n format,\n formatType,\n expr: 'parent',\n config\n }).signal;\n const headerChannel = getHeaderChannel(channel, labelOrient);\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ text: {\n signal: labelExpr\n ? replaceAll(replaceAll(labelExpr, 'datum.label', titleTextExpr), 'datum.value', vgField(facetFieldDef, { expr: 'parent' }))\n : titleTextExpr\n } }, (channel === 'row' ? { orient: 'left' } : {})), { style: 'guide-label', frame: 'group' }), defaultHeaderGuideBaseline(labelAngle, headerChannel)), defaultHeaderGuideAlign(headerChannel, labelAngle, labelAnchor)), assembleHeaderProperties(config, facetFieldDef, channel, HEADER_LABEL_PROPERTIES, HEADER_LABEL_PROPERTIES_MAP));\n}\nexport function assembleHeaderGroup(model, channel, headerType, layoutHeader, headerComponent) {\n if (headerComponent) {\n let title = null;\n const { facetFieldDef } = layoutHeader;\n const config = model.config ? model.config : undefined;\n if (facetFieldDef && headerComponent.labels) {\n const { labelOrient } = getHeaderProperties(['labelOrient'], facetFieldDef.header, config, channel);\n // Include label title in the header if orient aligns with the channel\n if ((channel === 'row' && !contains(['top', 'bottom'], labelOrient)) ||\n (channel === 'column' && !contains(['left', 'right'], labelOrient))) {\n title = assembleLabelTitle(facetFieldDef, channel, config);\n }\n }\n const isFacetWithoutRowCol = isFacetModel(model) && !isFacetMapping(model.facet);\n const axes = headerComponent.axes;\n const hasAxes = (axes === null || axes === void 0 ? void 0 : axes.length) > 0;\n if (title || hasAxes) {\n const sizeChannel = channel === 'row' ? 'height' : 'width';\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name: model.getName(`${channel}_${headerType}`), type: 'group', role: `${channel}-${headerType}` }, (layoutHeader.facetFieldDef\n ? {\n from: { data: model.getName(`${channel}_domain`) },\n sort: getSort(facetFieldDef, channel)\n }\n : {})), (hasAxes && isFacetWithoutRowCol\n ? {\n from: { data: model.getName(`facet_domain_${channel}`) }\n }\n : {})), (title ? { title } : {})), (headerComponent.sizeSignal\n ? {\n encode: {\n update: {\n [sizeChannel]: headerComponent.sizeSignal\n }\n }\n }\n : {})), (hasAxes ? { axes } : {}));\n }\n }\n return null;\n}\nconst LAYOUT_TITLE_BAND = {\n column: {\n start: 0,\n end: 1\n },\n row: {\n start: 1,\n end: 0\n }\n};\nexport function getLayoutTitleBand(titleAnchor, headerChannel) {\n return LAYOUT_TITLE_BAND[headerChannel][titleAnchor];\n}\nexport function assembleLayoutTitleBand(headerComponentIndex, config) {\n const titleBand = {};\n for (const channel of FACET_CHANNELS) {\n const headerComponent = headerComponentIndex[channel];\n if (headerComponent === null || headerComponent === void 0 ? void 0 : headerComponent.facetFieldDef) {\n const { titleAnchor, titleOrient } = getHeaderProperties(['titleAnchor', 'titleOrient'], headerComponent.facetFieldDef.header, config, channel);\n const headerChannel = getHeaderChannel(channel, titleOrient);\n const band = getLayoutTitleBand(titleAnchor, headerChannel);\n if (band !== undefined) {\n titleBand[headerChannel] = band;\n }\n }\n }\n return isEmpty(titleBand) ? undefined : titleBand;\n}\nexport function assembleHeaderProperties(config, facetFieldDef, channel, properties, propertiesMap) {\n const props = {};\n for (const prop of properties) {\n if (!propertiesMap[prop]) {\n continue;\n }\n const value = getHeaderProperty(prop, facetFieldDef === null || facetFieldDef === void 0 ? void 0 : facetFieldDef.header, config, channel);\n if (value !== undefined) {\n props[propertiesMap[prop]] = value;\n }\n }\n return props;\n}\n//# sourceMappingURL=assemble.js.map","import { getViewConfigContinuousSize } from '../../config';\nimport { hasDiscreteDomain } from '../../scale';\nimport { getFirstDefined } from '../../util';\nimport { isVgRangeStep } from '../../vega.schema';\nimport { signalOrStringValue } from '../common';\nimport { isFacetModel } from '../model';\nexport function assembleLayoutSignals(model) {\n return [\n ...sizeSignals(model, 'width'),\n ...sizeSignals(model, 'height'),\n ...sizeSignals(model, 'childWidth'),\n ...sizeSignals(model, 'childHeight')\n ];\n}\nexport function sizeSignals(model, sizeType) {\n const channel = sizeType === 'width' ? 'x' : 'y';\n const size = model.component.layoutSize.get(sizeType);\n if (!size || size === 'merged') {\n return [];\n }\n // Read size signal name from name map, just in case it is the top-level size signal that got renamed.\n const name = model.getSizeSignalRef(sizeType).signal;\n if (size === 'step') {\n const scaleComponent = model.getScaleComponent(channel);\n if (scaleComponent) {\n const type = scaleComponent.get('type');\n const range = scaleComponent.get('range');\n if (hasDiscreteDomain(type) && isVgRangeStep(range)) {\n const scaleName = model.scaleName(channel);\n if (isFacetModel(model.parent)) {\n // If parent is facet and this is an independent scale, return only signal signal\n // as the width/height will be calculated using the cardinality from\n // facet's aggregate rather than reading from scale domain\n const parentResolve = model.parent.component.resolve;\n if (parentResolve.scale[channel] === 'independent') {\n return [stepSignal(scaleName, range)];\n }\n }\n return [\n stepSignal(scaleName, range),\n {\n name,\n update: sizeExpr(scaleName, scaleComponent, `domain('${scaleName}').length`)\n }\n ];\n }\n }\n /* istanbul ignore next: Condition should not happen -- only for warning in development. */\n throw new Error('layout size is step although width/height is not step.');\n }\n else if (size == 'container') {\n const isWidth = name.endsWith('width');\n const expr = isWidth ? 'containerSize()[0]' : 'containerSize()[1]';\n const defaultValue = getViewConfigContinuousSize(model.config.view, isWidth ? 'width' : 'height');\n const safeExpr = `isFinite(${expr}) ? ${expr} : ${defaultValue}`;\n return [{ name, init: safeExpr, on: [{ update: safeExpr, events: 'window:resize' }] }];\n }\n else {\n return [\n {\n name,\n value: size\n }\n ];\n }\n}\nfunction stepSignal(scaleName, range) {\n return {\n name: `${scaleName}_step`,\n value: range.step\n };\n}\nexport function sizeExpr(scaleName, scaleComponent, cardinality) {\n const type = scaleComponent.get('type');\n const padding = scaleComponent.get('padding');\n const paddingOuter = getFirstDefined(scaleComponent.get('paddingOuter'), padding);\n let paddingInner = scaleComponent.get('paddingInner');\n paddingInner =\n type === 'band'\n ? // only band has real paddingInner\n paddingInner !== undefined\n ? paddingInner\n : padding\n : // For point, as calculated in https://github.com/vega/vega-scale/blob/master/src/band.js#L128,\n // it's equivalent to have paddingInner = 1 since there is only n-1 steps between n points.\n 1;\n return `bandspace(${cardinality}, ${signalOrStringValue(paddingInner)}, ${signalOrStringValue(paddingOuter)}) * ${scaleName}_step`;\n}\n//# sourceMappingURL=assemble.js.map","export function getSizeTypeFromLayoutSizeType(layoutSizeType) {\n return layoutSizeType === 'childWidth' ? 'width' : layoutSizeType === 'childHeight' ? 'height' : layoutSizeType;\n}\n//# sourceMappingURL=component.js.map","import { keys } from '../util';\nimport { signalOrValueRef } from './common';\nimport { wrapCondition } from './mark/encode';\nexport function guideEncodeEntry(encoding, model) {\n return keys(encoding).reduce((encode, channel) => {\n const valueDef = encoding[channel];\n return Object.assign(Object.assign({}, encode), wrapCondition(model, valueDef, channel, def => signalOrValueRef(def.value)));\n }, {});\n}\n//# sourceMappingURL=guide.js.map","import { isXorY } from '../channel';\nimport * as log from '../log';\nimport { isConcatModel, isFacetModel, isLayerModel } from './model';\nexport function defaultScaleResolve(channel, model) {\n if (isFacetModel(model)) {\n return channel === 'theta' ? 'independent' : 'shared';\n }\n else if (isLayerModel(model)) {\n return 'shared';\n }\n else if (isConcatModel(model)) {\n return isXorY(channel) || channel === 'theta' || channel === 'radius' ? 'independent' : 'shared';\n }\n /* istanbul ignore next: should never reach here. */\n throw new Error('invalid model type for resolve');\n}\nexport function parseGuideResolve(resolve, channel) {\n const channelScaleResolve = resolve.scale[channel];\n const guide = isXorY(channel) ? 'axis' : 'legend';\n if (channelScaleResolve === 'independent') {\n if (resolve[guide][channel] === 'shared') {\n log.warn(log.message.independentScaleMeansIndependentGuide(channel));\n }\n return 'independent';\n }\n return resolve[guide][channel] || 'shared';\n}\n//# sourceMappingURL=resolve.js.map","import { COMMON_LEGEND_PROPERTY_INDEX } from '../../legend';\nimport { keys } from '../../util';\nimport { Split } from '../split';\nconst LEGEND_COMPONENT_PROPERTY_INDEX = Object.assign(Object.assign({}, COMMON_LEGEND_PROPERTY_INDEX), { disable: 1, labelExpr: 1, selections: 1, \n // channel scales\n opacity: 1, shape: 1, stroke: 1, fill: 1, size: 1, strokeWidth: 1, strokeDash: 1, \n // encode\n encode: 1 });\nexport const LEGEND_COMPONENT_PROPERTIES = keys(LEGEND_COMPONENT_PROPERTY_INDEX);\nexport class LegendComponent extends Split {\n}\n//# sourceMappingURL=component.js.map","import { array, isArray, stringValue } from 'vega-util';\nimport { COLOR, OPACITY } from '../../channel';\nimport { hasConditionalValueDef, isFieldDef, isValueDef } from '../../channeldef';\nimport { FILL_STROKE_CONFIG } from '../../mark';\nimport { getFirstDefined, isEmpty, varName } from '../../util';\nimport { applyMarkConfig, signalOrValueRef } from '../common';\nimport { formatCustomType, isCustomFormatType } from '../format';\nimport * as mixins from '../mark/encode';\nimport { STORE } from '../selection';\nexport const legendEncodeRules = {\n symbols,\n gradient,\n labels,\n entries\n};\nexport function symbols(symbolsSpec, { fieldOrDatumDef, model, channel, legendCmpt, legendType }) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n if (legendType !== 'symbol') {\n return undefined;\n }\n const { markDef, encoding, config, mark } = model;\n const filled = markDef.filled && mark !== 'trail';\n let out = Object.assign(Object.assign({}, applyMarkConfig({}, model, FILL_STROKE_CONFIG)), mixins.color(model, { filled })); // FIXME: remove this when VgEncodeEntry is compatible with SymbolEncodeEntry\n const symbolOpacity = (_a = legendCmpt.get('symbolOpacity')) !== null && _a !== void 0 ? _a : config.legend.symbolOpacity;\n const symbolFillColor = (_b = legendCmpt.get('symbolFillColor')) !== null && _b !== void 0 ? _b : config.legend.symbolFillColor;\n const symbolStrokeColor = (_c = legendCmpt.get('symbolStrokeColor')) !== null && _c !== void 0 ? _c : config.legend.symbolStrokeColor;\n const opacity = symbolOpacity === undefined ? (_d = getMaxValue(encoding.opacity)) !== null && _d !== void 0 ? _d : markDef.opacity : undefined;\n if (out.fill) {\n // for fill legend, we don't want any fill in symbol\n if (channel === 'fill' || (filled && channel === COLOR)) {\n delete out.fill;\n }\n else {\n if (out.fill['field']) {\n // For others, set fill to some opaque value (or nothing if a color is already set)\n if (symbolFillColor) {\n delete out.fill;\n }\n else {\n out.fill = signalOrValueRef((_e = config.legend.symbolBaseFillColor) !== null && _e !== void 0 ? _e : 'black');\n out.fillOpacity = signalOrValueRef(opacity !== null && opacity !== void 0 ? opacity : 1);\n }\n }\n else if (isArray(out.fill)) {\n const fill = (_h = (_g = getFirstConditionValue((_f = encoding.fill) !== null && _f !== void 0 ? _f : encoding.color)) !== null && _g !== void 0 ? _g : markDef.fill) !== null && _h !== void 0 ? _h : (filled && markDef.color);\n if (fill) {\n out.fill = signalOrValueRef(fill);\n }\n }\n }\n }\n if (out.stroke) {\n if (channel === 'stroke' || (!filled && channel === COLOR)) {\n delete out.stroke;\n }\n else {\n if (out.stroke['field'] || symbolStrokeColor) {\n // For others, remove stroke field\n delete out.stroke;\n }\n else if (isArray(out.stroke)) {\n const stroke = getFirstDefined(getFirstConditionValue(encoding.stroke || encoding.color), markDef.stroke, filled ? markDef.color : undefined);\n if (stroke) {\n out.stroke = { value: stroke };\n }\n }\n }\n }\n if (channel !== OPACITY) {\n const condition = isFieldDef(fieldOrDatumDef) && selectedCondition(model, legendCmpt, fieldOrDatumDef);\n if (condition) {\n out.opacity = [\n Object.assign({ test: condition }, signalOrValueRef(opacity !== null && opacity !== void 0 ? opacity : 1)),\n signalOrValueRef(config.legend.unselectedOpacity)\n ];\n }\n else if (opacity) {\n out.opacity = signalOrValueRef(opacity);\n }\n }\n out = Object.assign(Object.assign({}, out), symbolsSpec);\n return isEmpty(out) ? undefined : out;\n}\nexport function gradient(gradientSpec, { model, legendType, legendCmpt }) {\n var _a;\n if (legendType !== 'gradient') {\n return undefined;\n }\n const { config, markDef, encoding } = model;\n let out = {};\n const gradientOpacity = (_a = legendCmpt.get('gradientOpacity')) !== null && _a !== void 0 ? _a : config.legend.gradientOpacity;\n const opacity = gradientOpacity === undefined ? getMaxValue(encoding.opacity) || markDef.opacity : undefined;\n if (opacity) {\n // only apply opacity if it is neither zero or undefined\n out.opacity = signalOrValueRef(opacity);\n }\n out = Object.assign(Object.assign({}, out), gradientSpec);\n return isEmpty(out) ? undefined : out;\n}\nexport function labels(specifiedlabelsSpec, { fieldOrDatumDef, model, channel, legendCmpt }) {\n const legend = model.legend(channel) || {};\n const config = model.config;\n const condition = isFieldDef(fieldOrDatumDef) ? selectedCondition(model, legendCmpt, fieldOrDatumDef) : undefined;\n const opacity = condition ? [{ test: condition, value: 1 }, { value: config.legend.unselectedOpacity }] : undefined;\n const { format, formatType } = legend;\n const text = isCustomFormatType(formatType)\n ? formatCustomType({\n fieldOrDatumDef,\n field: 'datum.value',\n format,\n formatType,\n config\n })\n : undefined;\n const labelsSpec = Object.assign(Object.assign(Object.assign({}, (opacity ? { opacity } : {})), (text ? { text } : {})), specifiedlabelsSpec);\n return isEmpty(labelsSpec) ? undefined : labelsSpec;\n}\nexport function entries(entriesSpec, { legendCmpt }) {\n const selections = legendCmpt.get('selections');\n return (selections === null || selections === void 0 ? void 0 : selections.length) ? Object.assign(Object.assign({}, entriesSpec), { fill: { value: 'transparent' } }) : entriesSpec;\n}\nfunction getMaxValue(channelDef) {\n return getConditionValue(channelDef, (v, conditionalDef) => Math.max(v, conditionalDef.value));\n}\nexport function getFirstConditionValue(channelDef) {\n return getConditionValue(channelDef, (v, conditionalDef) => {\n return getFirstDefined(v, conditionalDef.value);\n });\n}\nfunction getConditionValue(channelDef, reducer) {\n if (hasConditionalValueDef(channelDef)) {\n return array(channelDef.condition).reduce(reducer, channelDef.value);\n }\n else if (isValueDef(channelDef)) {\n return channelDef.value;\n }\n return undefined;\n}\nfunction selectedCondition(model, legendCmpt, fieldDef) {\n const selections = legendCmpt.get('selections');\n if (!(selections === null || selections === void 0 ? void 0 : selections.length))\n return undefined;\n const field = stringValue(fieldDef.field);\n return selections\n .map(name => {\n const store = stringValue(varName(name) + STORE);\n return `(!length(data(${store})) || (${name}[${field}] && indexof(${name}[${field}], datum.value) >= 0))`;\n })\n .join(' || ');\n}\n//# sourceMappingURL=encode.js.map","import { isArray } from 'vega-util';\nimport { isColorChannel } from '../../channel';\nimport { title as fieldDefTitle, valueArray } from '../../channeldef';\nimport { isContinuousToContinuous } from '../../scale';\nimport { contains, getFirstDefined } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { guideFormat, guideFormatType } from '../format';\nimport { getFirstConditionValue } from './encode';\nexport const legendRules = {\n direction: ({ direction }) => direction,\n format: ({ fieldOrDatumDef, legend, config }) => {\n const { format, formatType } = legend;\n return guideFormat(fieldOrDatumDef, fieldOrDatumDef.type, format, formatType, config, false);\n },\n formatType: ({ legend, fieldOrDatumDef, scaleType }) => {\n const { formatType } = legend;\n return guideFormatType(formatType, fieldOrDatumDef, scaleType);\n },\n gradientLength: params => {\n var _a, _b;\n const { legend, legendConfig } = params;\n return (_b = (_a = legend.gradientLength) !== null && _a !== void 0 ? _a : legendConfig.gradientLength) !== null && _b !== void 0 ? _b : defaultGradientLength(params);\n },\n labelOverlap: ({ legend, legendConfig, scaleType }) => { var _a, _b; return (_b = (_a = legend.labelOverlap) !== null && _a !== void 0 ? _a : legendConfig.labelOverlap) !== null && _b !== void 0 ? _b : defaultLabelOverlap(scaleType); },\n symbolType: ({ legend, markDef, channel, encoding }) => { var _a; return (_a = legend.symbolType) !== null && _a !== void 0 ? _a : defaultSymbolType(markDef.type, channel, encoding.shape, markDef.shape); },\n title: ({ fieldOrDatumDef, config }) => fieldDefTitle(fieldOrDatumDef, config, { allowDisabling: true }),\n type: ({ legendType, scaleType, channel }) => {\n if (isColorChannel(channel) && isContinuousToContinuous(scaleType)) {\n if (legendType === 'gradient') {\n return undefined;\n }\n }\n else if (legendType === 'symbol') {\n return undefined;\n }\n return legendType;\n },\n values: ({ fieldOrDatumDef, legend }) => values(legend, fieldOrDatumDef)\n};\nexport function values(legend, fieldOrDatumDef) {\n const vals = legend.values;\n if (isArray(vals)) {\n return valueArray(fieldOrDatumDef, vals);\n }\n else if (isSignalRef(vals)) {\n return vals;\n }\n return undefined;\n}\nexport function defaultSymbolType(mark, channel, shapeChannelDef, markShape) {\n var _a;\n if (channel !== 'shape') {\n // use the value from the shape encoding or the mark config if they exist\n const shape = (_a = getFirstConditionValue(shapeChannelDef)) !== null && _a !== void 0 ? _a : markShape;\n if (shape) {\n return shape;\n }\n }\n switch (mark) {\n case 'bar':\n case 'rect':\n case 'image':\n case 'square':\n return 'square';\n case 'line':\n case 'trail':\n case 'rule':\n return 'stroke';\n case 'arc':\n case 'point':\n case 'circle':\n case 'tick':\n case 'geoshape':\n case 'area':\n case 'text':\n return 'circle';\n }\n}\nexport function clipHeight(legendType) {\n if (legendType === 'gradient') {\n return 20;\n }\n return undefined;\n}\nexport function getLegendType(params) {\n const { legend } = params;\n return getFirstDefined(legend.type, defaultType(params));\n}\nexport function defaultType({ channel, timeUnit, scaleType }) {\n // Following the logic in https://github.com/vega/vega-parser/blob/master/src/parsers/legend.js\n if (isColorChannel(channel)) {\n if (contains(['quarter', 'month', 'day'], timeUnit)) {\n return 'symbol';\n }\n if (isContinuousToContinuous(scaleType)) {\n return 'gradient';\n }\n }\n return 'symbol';\n}\nexport function getDirection({ legendConfig, legendType, orient, legend }) {\n var _a, _b;\n return ((_b = (_a = legend.direction) !== null && _a !== void 0 ? _a : legendConfig[legendType ? 'gradientDirection' : 'symbolDirection']) !== null && _b !== void 0 ? _b : defaultDirection(orient, legendType));\n}\nexport function defaultDirection(orient, legendType) {\n switch (orient) {\n case 'top':\n case 'bottom':\n return 'horizontal';\n case 'left':\n case 'right':\n case 'none':\n case undefined: // undefined = \"right\" in Vega\n return undefined; // vertical is Vega's default\n default:\n // top-left / ...\n // For inner legend, uses compact layout like Tableau\n return legendType === 'gradient' ? 'horizontal' : undefined;\n }\n}\nexport function defaultGradientLength({ legendConfig, model, direction, orient, scaleType }) {\n const { gradientHorizontalMaxLength, gradientHorizontalMinLength, gradientVerticalMaxLength, gradientVerticalMinLength } = legendConfig;\n if (isContinuousToContinuous(scaleType)) {\n if (direction === 'horizontal') {\n if (orient === 'top' || orient === 'bottom') {\n return gradientLengthSignal(model, 'width', gradientHorizontalMinLength, gradientHorizontalMaxLength);\n }\n else {\n return gradientHorizontalMinLength;\n }\n }\n else {\n // vertical / undefined (Vega uses vertical by default)\n return gradientLengthSignal(model, 'height', gradientVerticalMinLength, gradientVerticalMaxLength);\n }\n }\n return undefined;\n}\nfunction gradientLengthSignal(model, sizeType, min, max) {\n const sizeSignal = model.getSizeSignalRef(sizeType).signal;\n return { signal: `clamp(${sizeSignal}, ${min}, ${max})` };\n}\nexport function defaultLabelOverlap(scaleType) {\n if (contains(['quantile', 'threshold', 'log', 'symlog'], scaleType)) {\n return 'greedy';\n }\n return undefined;\n}\n//# sourceMappingURL=properties.js.map","import { COLOR, SHAPE } from '../../channel';\nimport { getFieldOrDatumDef, isFieldDef } from '../../channeldef';\nimport { LEGEND_SCALE_CHANNELS } from '../../legend';\nimport { normalizeTimeUnit } from '../../timeunit';\nimport { GEOJSON } from '../../type';\nimport { deleteNestedProperty, isEmpty, keys, varName } from '../../util';\nimport { mergeTitleComponent } from '../common';\nimport { guideEncodeEntry } from '../guide';\nimport { isUnitModel } from '../model';\nimport { parseGuideResolve } from '../resolve';\nimport { parseInteractiveLegend } from '../selection/legends';\nimport { defaultTieBreaker, makeImplicit, mergeValuesWithExplicit } from '../split';\nimport { LegendComponent, LEGEND_COMPONENT_PROPERTIES } from './component';\nimport { legendEncodeRules } from './encode';\nimport { getDirection, getLegendType, legendRules } from './properties';\nexport function parseLegend(model) {\n const legendComponent = isUnitModel(model) ? parseUnitLegend(model) : parseNonUnitLegend(model);\n model.component.legends = legendComponent;\n return legendComponent;\n}\nfunction parseUnitLegend(model) {\n const { encoding } = model;\n const legendComponent = {};\n for (const channel of [COLOR, ...LEGEND_SCALE_CHANNELS]) {\n const def = getFieldOrDatumDef(encoding[channel]);\n if (!def || !model.getScaleComponent(channel)) {\n continue;\n }\n if (channel === SHAPE && isFieldDef(def) && def.type === GEOJSON) {\n continue;\n }\n legendComponent[channel] = parseLegendForChannel(model, channel);\n }\n return legendComponent;\n}\nfunction getLegendDefWithScale(model, channel) {\n const scale = model.scaleName(channel);\n if (model.mark === 'trail') {\n if (channel === 'color') {\n // trail is a filled mark, but its default symbolType (\"stroke\") should use \"stroke\"\n return { stroke: scale };\n }\n else if (channel === 'size') {\n return { strokeWidth: scale };\n }\n }\n if (channel === 'color') {\n return model.markDef.filled ? { fill: scale } : { stroke: scale };\n }\n return { [channel]: scale };\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isExplicit(value, property, legend, fieldDef) {\n switch (property) {\n case 'disable':\n return legend !== undefined; // if axis is specified or null/false, then its enable/disable state is explicit\n case 'values':\n // specified legend.values is already respected, but may get transformed.\n return !!(legend === null || legend === void 0 ? void 0 : legend.values);\n case 'title':\n // title can be explicit if fieldDef.title is set\n if (property === 'title' && value === (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.title)) {\n return true;\n }\n }\n // Otherwise, things are explicit if the returned value matches the specified property\n return value === (legend || {})[property];\n}\nexport function parseLegendForChannel(model, channel) {\n var _a, _b, _c;\n let legend = model.legend(channel);\n const { markDef, encoding, config } = model;\n const legendConfig = config.legend;\n const legendCmpt = new LegendComponent({}, getLegendDefWithScale(model, channel));\n parseInteractiveLegend(model, channel, legendCmpt);\n const disable = legend !== undefined ? !legend : legendConfig.disable;\n legendCmpt.set('disable', disable, legend !== undefined);\n if (disable) {\n return legendCmpt;\n }\n legend = legend || {};\n const scaleType = model.getScaleComponent(channel).get('type');\n const fieldOrDatumDef = getFieldOrDatumDef(encoding[channel]);\n const timeUnit = isFieldDef(fieldOrDatumDef) ? (_a = normalizeTimeUnit(fieldOrDatumDef.timeUnit)) === null || _a === void 0 ? void 0 : _a.unit : undefined;\n const orient = legend.orient || config.legend.orient || 'right';\n const legendType = getLegendType({ legend, channel, timeUnit, scaleType });\n const direction = getDirection({ legend, legendType, orient, legendConfig });\n const ruleParams = {\n legend,\n channel,\n model,\n markDef,\n encoding,\n fieldOrDatumDef,\n legendConfig,\n config,\n scaleType,\n orient,\n legendType,\n direction\n };\n for (const property of LEGEND_COMPONENT_PROPERTIES) {\n if ((legendType === 'gradient' && property.startsWith('symbol')) ||\n (legendType === 'symbol' && property.startsWith('gradient'))) {\n continue;\n }\n const value = property in legendRules ? legendRules[property](ruleParams) : legend[property];\n if (value !== undefined) {\n const explicit = isExplicit(value, property, legend, model.fieldDef(channel));\n if (explicit || config.legend[property] === undefined) {\n legendCmpt.set(property, value, explicit);\n }\n }\n }\n const legendEncoding = (_b = legend === null || legend === void 0 ? void 0 : legend.encoding) !== null && _b !== void 0 ? _b : {};\n const selections = legendCmpt.get('selections');\n const legendEncode = {};\n const legendEncodeParams = { fieldOrDatumDef, model, channel, legendCmpt, legendType };\n for (const part of ['labels', 'legend', 'title', 'symbols', 'gradient', 'entries']) {\n const legendEncodingPart = guideEncodeEntry((_c = legendEncoding[part]) !== null && _c !== void 0 ? _c : {}, model);\n const value = part in legendEncodeRules\n ? legendEncodeRules[part](legendEncodingPart, legendEncodeParams) // apply rule\n : legendEncodingPart; // no rule -- just default values\n if (value !== undefined && !isEmpty(value)) {\n legendEncode[part] = Object.assign(Object.assign(Object.assign({}, ((selections === null || selections === void 0 ? void 0 : selections.length) && isFieldDef(fieldOrDatumDef)\n ? { name: `${varName(fieldOrDatumDef.field)}_legend_${part}` }\n : {})), ((selections === null || selections === void 0 ? void 0 : selections.length) ? { interactive: !!selections } : {})), { update: value });\n }\n }\n if (!isEmpty(legendEncode)) {\n legendCmpt.set('encode', legendEncode, !!(legend === null || legend === void 0 ? void 0 : legend.encoding));\n }\n return legendCmpt;\n}\nfunction parseNonUnitLegend(model) {\n const { legends, resolve } = model.component;\n for (const child of model.children) {\n parseLegend(child);\n for (const channel of keys(child.component.legends)) {\n resolve.legend[channel] = parseGuideResolve(model.component.resolve, channel);\n if (resolve.legend[channel] === 'shared') {\n // If the resolve says shared (and has not been overridden)\n // We will try to merge and see if there is a conflict\n legends[channel] = mergeLegendComponent(legends[channel], child.component.legends[channel]);\n if (!legends[channel]) {\n // If merge returns nothing, there is a conflict so we cannot make the legend shared.\n // Thus, mark legend as independent and remove the legend component.\n resolve.legend[channel] = 'independent';\n delete legends[channel];\n }\n }\n }\n }\n for (const channel of keys(legends)) {\n for (const child of model.children) {\n if (!child.component.legends[channel]) {\n // skip if the child does not have a particular legend\n continue;\n }\n if (resolve.legend[channel] === 'shared') {\n // After merging shared legend, make sure to remove legend from child\n delete child.component.legends[channel];\n }\n }\n }\n return legends;\n}\nexport function mergeLegendComponent(mergedLegend, childLegend) {\n var _a, _b, _c, _d;\n if (!mergedLegend) {\n return childLegend.clone();\n }\n const mergedOrient = mergedLegend.getWithExplicit('orient');\n const childOrient = childLegend.getWithExplicit('orient');\n if (mergedOrient.explicit && childOrient.explicit && mergedOrient.value !== childOrient.value) {\n // TODO: throw warning if resolve is explicit (We don't have info about explicit/implicit resolve yet.)\n // Cannot merge due to inconsistent orient\n return undefined;\n }\n let typeMerged = false;\n // Otherwise, let's merge\n for (const prop of LEGEND_COMPONENT_PROPERTIES) {\n const mergedValueWithExplicit = mergeValuesWithExplicit(mergedLegend.getWithExplicit(prop), childLegend.getWithExplicit(prop), prop, 'legend', \n // Tie breaker function\n (v1, v2) => {\n switch (prop) {\n case 'symbolType':\n return mergeSymbolType(v1, v2);\n case 'title':\n return mergeTitleComponent(v1, v2);\n case 'type':\n // There are only two types. If we have different types, then prefer symbol over gradient.\n typeMerged = true;\n return makeImplicit('symbol');\n }\n return defaultTieBreaker(v1, v2, prop, 'legend');\n });\n mergedLegend.setWithExplicit(prop, mergedValueWithExplicit);\n }\n if (typeMerged) {\n if ((_b = (_a = mergedLegend.implicit) === null || _a === void 0 ? void 0 : _a.encode) === null || _b === void 0 ? void 0 : _b.gradient) {\n deleteNestedProperty(mergedLegend.implicit, ['encode', 'gradient']);\n }\n if ((_d = (_c = mergedLegend.explicit) === null || _c === void 0 ? void 0 : _c.encode) === null || _d === void 0 ? void 0 : _d.gradient) {\n deleteNestedProperty(mergedLegend.explicit, ['encode', 'gradient']);\n }\n }\n return mergedLegend;\n}\nfunction mergeSymbolType(st1, st2) {\n if (st2.value === 'circle') {\n // prefer \"circle\" over \"stroke\"\n return st2;\n }\n return st1;\n}\n//# sourceMappingURL=parse.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { LEGEND_SCALE_CHANNELS } from '../../legend';\nimport { keys, replaceAll, stringify, vals } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { mergeLegendComponent } from './parse';\nfunction setLegendEncode(legend, part, vgProp, vgRef) {\n var _a, _b, _c;\n var _d, _e;\n (_a = legend.encode) !== null && _a !== void 0 ? _a : (legend.encode = {});\n (_b = (_d = legend.encode)[part]) !== null && _b !== void 0 ? _b : (_d[part] = {});\n (_c = (_e = legend.encode[part]).update) !== null && _c !== void 0 ? _c : (_e.update = {});\n // TODO: remove as any after https://github.com/prisma/nexus-prisma/issues/291\n legend.encode[part].update[vgProp] = vgRef;\n}\nexport function assembleLegends(model) {\n const legendComponentIndex = model.component.legends;\n const legendByDomain = {};\n for (const channel of keys(legendComponentIndex)) {\n const scaleComponent = model.getScaleComponent(channel);\n const domainHash = stringify(scaleComponent.get('domains'));\n if (legendByDomain[domainHash]) {\n for (const mergedLegendComponent of legendByDomain[domainHash]) {\n const merged = mergeLegendComponent(mergedLegendComponent, legendComponentIndex[channel]);\n if (!merged) {\n // If cannot merge, need to add this legend separately\n legendByDomain[domainHash].push(legendComponentIndex[channel]);\n }\n }\n }\n else {\n legendByDomain[domainHash] = [legendComponentIndex[channel].clone()];\n }\n }\n const legends = vals(legendByDomain)\n .flat()\n .map(l => assembleLegend(l, model.config))\n .filter(l => l !== undefined);\n return legends;\n}\nexport function assembleLegend(legendCmpt, config) {\n var _a, _b, _c;\n const _d = legendCmpt.combine(), { disable, labelExpr, selections } = _d, legend = __rest(_d, [\"disable\", \"labelExpr\", \"selections\"]);\n if (disable) {\n return undefined;\n }\n if (config.aria === false && legend.aria == undefined) {\n legend.aria = false;\n }\n if ((_a = legend.encode) === null || _a === void 0 ? void 0 : _a.symbols) {\n const out = legend.encode.symbols.update;\n if (out.fill && out.fill['value'] !== 'transparent' && !out.stroke && !legend.stroke) {\n // For non color channel's legend, we need to override symbol stroke config from Vega config if stroke channel is not used.\n out.stroke = { value: 'transparent' };\n }\n // Remove properties that the legend is encoding.\n for (const property of LEGEND_SCALE_CHANNELS) {\n if (legend[property]) {\n delete out[property];\n }\n }\n }\n if (!legend.title) {\n // title schema doesn't include null, ''\n delete legend.title;\n }\n if (labelExpr !== undefined) {\n let expr = labelExpr;\n if (((_c = (_b = legend.encode) === null || _b === void 0 ? void 0 : _b.labels) === null || _c === void 0 ? void 0 : _c.update) && isSignalRef(legend.encode.labels.update.text)) {\n expr = replaceAll(labelExpr, 'datum.label', legend.encode.labels.update.text.signal);\n }\n setLegendEncode(legend, 'labels', 'text', { signal: expr });\n }\n return legend;\n}\n//# sourceMappingURL=assemble.js.map","import { contains } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { isConcatModel, isLayerModel } from '../model';\nexport function assembleProjections(model) {\n if (isLayerModel(model) || isConcatModel(model)) {\n return assembleProjectionsForModelAndChildren(model);\n }\n else {\n return assembleProjectionForModel(model);\n }\n}\nexport function assembleProjectionsForModelAndChildren(model) {\n return model.children.reduce((projections, child) => {\n return projections.concat(child.assembleProjections());\n }, assembleProjectionForModel(model));\n}\nexport function assembleProjectionForModel(model) {\n const component = model.component.projection;\n if (!component || component.merged) {\n return [];\n }\n const projection = component.combine();\n const { name } = projection; // we need to extract name so that it is always present in the output and pass TS type validation\n if (!component.data) {\n // generate custom projection, no automatic fitting\n return [\n Object.assign(Object.assign({ name }, { translate: { signal: '[width / 2, height / 2]' } }), projection)\n ];\n }\n else {\n // generate projection that uses extent fitting\n const size = {\n signal: `[${component.size.map(ref => ref.signal).join(', ')}]`\n };\n const fits = component.data.reduce((sources, data) => {\n const source = isSignalRef(data) ? data.signal : `data('${model.lookupDataSource(data)}')`;\n if (!contains(sources, source)) {\n // build a unique list of sources\n sources.push(source);\n }\n return sources;\n }, []);\n if (fits.length <= 0) {\n throw new Error(\"Projection's fit didn't find any data sources\");\n }\n return [\n Object.assign({ name,\n size, fit: {\n signal: fits.length > 1 ? `[${fits.join(', ')}]` : fits[0]\n } }, projection)\n ];\n }\n}\n//# sourceMappingURL=assemble.js.map","export const PROJECTION_PROPERTIES = [\n 'type',\n 'clipAngle',\n 'clipExtent',\n 'center',\n 'rotate',\n 'precision',\n 'reflectX',\n 'reflectY',\n 'coefficient',\n 'distance',\n 'fraction',\n 'lobes',\n 'parallel',\n 'radius',\n 'ratio',\n 'spacing',\n 'tilt'\n];\n//# sourceMappingURL=projection.js.map","import { Split } from '../split';\nexport class ProjectionComponent extends Split {\n constructor(name, specifiedProjection, size, data) {\n super(Object.assign({}, specifiedProjection), // all explicit properties of projection\n { name } // name as initial implicit property\n );\n this.specifiedProjection = specifiedProjection;\n this.size = size;\n this.data = data;\n this.merged = false;\n }\n /**\n * Whether the projection parameters should fit provided data.\n */\n get isFit() {\n return !!this.data;\n }\n}\n//# sourceMappingURL=component.js.map","import { hasOwnProperty } from 'vega-util';\nimport { LATITUDE, LATITUDE2, LONGITUDE, LONGITUDE2, SHAPE } from '../../channel';\nimport { getFieldOrDatumDef } from '../../channeldef';\nimport { DataSourceType } from '../../data';\nimport { replaceExprRef } from '../../expr';\nimport { PROJECTION_PROPERTIES } from '../../projection';\nimport { GEOJSON } from '../../type';\nimport { deepEqual, duplicate, every } from '../../util';\nimport { isUnitModel } from '../model';\nimport { ProjectionComponent } from './component';\nexport function parseProjection(model) {\n model.component.projection = isUnitModel(model) ? parseUnitProjection(model) : parseNonUnitProjections(model);\n}\nfunction parseUnitProjection(model) {\n var _a;\n if (model.hasProjection) {\n const proj = replaceExprRef(model.specifiedProjection);\n const fit = !(proj && (proj.scale != null || proj.translate != null));\n const size = fit ? [model.getSizeSignalRef('width'), model.getSizeSignalRef('height')] : undefined;\n const data = fit ? gatherFitData(model) : undefined;\n const projComp = new ProjectionComponent(model.projectionName(true), Object.assign(Object.assign({}, ((_a = replaceExprRef(model.config.projection)) !== null && _a !== void 0 ? _a : {})), (proj !== null && proj !== void 0 ? proj : {})), size, data);\n if (!projComp.get('type')) {\n projComp.set('type', 'equalEarth', false);\n }\n return projComp;\n }\n return undefined;\n}\nfunction gatherFitData(model) {\n const data = [];\n const { encoding } = model;\n for (const posssiblePair of [\n [LONGITUDE, LATITUDE],\n [LONGITUDE2, LATITUDE2]\n ]) {\n if (getFieldOrDatumDef(encoding[posssiblePair[0]]) || getFieldOrDatumDef(encoding[posssiblePair[1]])) {\n data.push({\n signal: model.getName(`geojson_${data.length}`)\n });\n }\n }\n if (model.channelHasField(SHAPE) && model.typedFieldDef(SHAPE).type === GEOJSON) {\n data.push({\n signal: model.getName(`geojson_${data.length}`)\n });\n }\n if (data.length === 0) {\n // main source is geojson, so we can just use that\n data.push(model.requestDataName(DataSourceType.Main));\n }\n return data;\n}\nfunction mergeIfNoConflict(first, second) {\n const allPropertiesShared = every(PROJECTION_PROPERTIES, prop => {\n // neither has the property\n if (!hasOwnProperty(first.explicit, prop) && !hasOwnProperty(second.explicit, prop)) {\n return true;\n }\n // both have property and an equal value for property\n if (hasOwnProperty(first.explicit, prop) &&\n hasOwnProperty(second.explicit, prop) &&\n // some properties might be signals or objects and require hashing for comparison\n deepEqual(first.get(prop), second.get(prop))) {\n return true;\n }\n return false;\n });\n const size = deepEqual(first.size, second.size);\n if (size) {\n if (allPropertiesShared) {\n return first;\n }\n else if (deepEqual(first.explicit, {})) {\n return second;\n }\n else if (deepEqual(second.explicit, {})) {\n return first;\n }\n }\n // if all properties don't match, let each unit spec have its own projection\n return null;\n}\nfunction parseNonUnitProjections(model) {\n if (model.children.length === 0) {\n return undefined;\n }\n let nonUnitProjection;\n // parse all children first\n for (const child of model.children) {\n parseProjection(child);\n }\n // analyze parsed projections, attempt to merge\n const mergable = every(model.children, child => {\n const projection = child.component.projection;\n if (!projection) {\n // child layer does not use a projection\n return true;\n }\n else if (!nonUnitProjection) {\n // cached 'projection' is null, cache this one\n nonUnitProjection = projection;\n return true;\n }\n else {\n const merge = mergeIfNoConflict(nonUnitProjection, projection);\n if (merge) {\n nonUnitProjection = merge;\n }\n return !!merge;\n }\n });\n // if cached one and all other children share the same projection,\n if (nonUnitProjection && mergable) {\n // so we can elevate it to the layer level\n const name = model.projectionName(true);\n const modelProjection = new ProjectionComponent(name, nonUnitProjection.specifiedProjection, nonUnitProjection.size, duplicate(nonUnitProjection.data));\n // rename and assign all others as merged\n for (const child of model.children) {\n const projection = child.component.projection;\n if (projection) {\n if (projection.isFit) {\n modelProjection.data.push(...child.component.projection.data);\n }\n child.renameProjection(projection.get('name'), name);\n projection.merged = true;\n }\n }\n return modelProjection;\n }\n return undefined;\n}\n//# sourceMappingURL=parse.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isString } from 'vega-util';\nimport { binToString, isBinning, isParameterExtent } from '../../bin';\nimport { binRequiresRange, isTypedFieldDef, normalizeBin, vgField } from '../../channeldef';\nimport { duplicate, hash, isEmpty, keys, replacePathInField, unique, vals } from '../../util';\nimport { binFormatExpression } from '../format';\nimport { isUnitModel } from '../model';\nimport { parseSelectionExtent } from '../selection/parse';\nimport { DataFlowNode } from './dataflow';\nfunction rangeFormula(model, fieldDef, channel, config) {\n var _a, _b;\n if (binRequiresRange(fieldDef, channel)) {\n // read format from axis or legend, if there is no format then use config.numberFormat\n const guide = isUnitModel(model)\n ? (_b = (_a = model.axis(channel)) !== null && _a !== void 0 ? _a : model.legend(channel)) !== null && _b !== void 0 ? _b : {}\n : {};\n const startField = vgField(fieldDef, { expr: 'datum' });\n const endField = vgField(fieldDef, { expr: 'datum', binSuffix: 'end' });\n return {\n formulaAs: vgField(fieldDef, { binSuffix: 'range', forAs: true }),\n formula: binFormatExpression(startField, endField, guide.format, guide.formatType, config)\n };\n }\n return {};\n}\nfunction binKey(bin, field) {\n return `${binToString(bin)}_${field}`;\n}\nfunction getSignalsFromModel(model, key) {\n return {\n signal: model.getName(`${key}_bins`),\n extentSignal: model.getName(`${key}_extent`)\n };\n}\nexport function getBinSignalName(model, field, bin) {\n var _a;\n const normalizedBin = (_a = normalizeBin(bin, undefined)) !== null && _a !== void 0 ? _a : {};\n const key = binKey(normalizedBin, field);\n return model.getName(`${key}_bins`);\n}\nfunction isBinTransform(t) {\n return 'as' in t;\n}\nfunction createBinComponent(t, bin, model) {\n let as;\n let span;\n if (isBinTransform(t)) {\n as = isString(t.as) ? [t.as, `${t.as}_end`] : [t.as[0], t.as[1]];\n }\n else {\n as = [vgField(t, { forAs: true }), vgField(t, { binSuffix: 'end', forAs: true })];\n }\n const normalizedBin = Object.assign({}, normalizeBin(bin, undefined));\n const key = binKey(normalizedBin, t.field);\n const { signal, extentSignal } = getSignalsFromModel(model, key);\n if (isParameterExtent(normalizedBin.extent)) {\n const ext = normalizedBin.extent;\n span = parseSelectionExtent(model, ext.param, ext);\n delete normalizedBin.extent; // Vega-Lite selection extent map to Vega's span property.\n }\n const binComponent = Object.assign(Object.assign(Object.assign({ bin: normalizedBin, field: t.field, as: [as] }, (signal ? { signal } : {})), (extentSignal ? { extentSignal } : {})), (span ? { span } : {}));\n return { key, binComponent };\n}\nexport class BinNode extends DataFlowNode {\n constructor(parent, bins) {\n super(parent);\n this.bins = bins;\n }\n clone() {\n return new BinNode(null, duplicate(this.bins));\n }\n static makeFromEncoding(parent, model) {\n const bins = model.reduceFieldDef((binComponentIndex, fieldDef, channel) => {\n if (isTypedFieldDef(fieldDef) && isBinning(fieldDef.bin)) {\n const { key, binComponent } = createBinComponent(fieldDef, fieldDef.bin, model);\n binComponentIndex[key] = Object.assign(Object.assign(Object.assign({}, binComponent), binComponentIndex[key]), rangeFormula(model, fieldDef, channel, model.config));\n }\n return binComponentIndex;\n }, {});\n if (isEmpty(bins)) {\n return null;\n }\n return new BinNode(parent, bins);\n }\n /**\n * Creates a bin node from BinTransform.\n * The optional parameter should provide\n */\n static makeFromTransform(parent, t, model) {\n const { key, binComponent } = createBinComponent(t, t.bin, model);\n return new BinNode(parent, {\n [key]: binComponent\n });\n }\n /**\n * Merge bin nodes. This method either integrates the bin config from the other node\n * or if this node already has a bin config, renames the corresponding signal in the model.\n */\n merge(other, renameSignal) {\n for (const key of keys(other.bins)) {\n if (key in this.bins) {\n renameSignal(other.bins[key].signal, this.bins[key].signal);\n // Ensure that we don't have duplicate names for signal pairs\n this.bins[key].as = unique([...this.bins[key].as, ...other.bins[key].as], hash);\n }\n else {\n this.bins[key] = other.bins[key];\n }\n }\n for (const child of other.children) {\n other.removeChild(child);\n child.parent = this;\n }\n other.remove();\n }\n producedFields() {\n return new Set(vals(this.bins)\n .map(c => c.as)\n .flat(2));\n }\n dependentFields() {\n return new Set(vals(this.bins).map(c => c.field));\n }\n hash() {\n return `Bin ${hash(this.bins)}`;\n }\n assemble() {\n return vals(this.bins).flatMap(bin => {\n const transform = [];\n const [binAs, ...remainingAs] = bin.as;\n const _a = bin.bin, { extent } = _a, params = __rest(_a, [\"extent\"]);\n const binTrans = Object.assign(Object.assign(Object.assign({ type: 'bin', field: replacePathInField(bin.field), as: binAs, signal: bin.signal }, (!isParameterExtent(extent) ? { extent } : { extent: null })), (bin.span ? { span: { signal: `span(${bin.span})` } } : {})), params);\n if (!extent && bin.extentSignal) {\n transform.push({\n type: 'extent',\n field: replacePathInField(bin.field),\n signal: bin.extentSignal\n });\n binTrans.extent = { signal: bin.extentSignal };\n }\n transform.push(binTrans);\n for (const as of remainingAs) {\n for (let i = 0; i < 2; i++) {\n transform.push({\n type: 'formula',\n expr: vgField({ field: binAs[i] }, { expr: 'datum' }),\n as: as[i]\n });\n }\n }\n if (bin.formula) {\n transform.push({\n type: 'formula',\n expr: bin.formula,\n as: bin.formulaAs\n });\n }\n return transform;\n });\n }\n}\n//# sourceMappingURL=bin.js.map","import { isArgmaxDef, isArgminDef } from '../../aggregate';\nimport { getPositionChannelFromLatLong, getSecondaryRangeChannel, isGeoPositionChannel, isScaleChannel } from '../../channel';\nimport { binRequiresRange, hasBandEnd, isScaleFieldDef, isTypedFieldDef, vgField } from '../../channeldef';\nimport * as log from '../../log';\nimport { isFieldRange } from '../../scale';\nimport { duplicate, hash, keys, replacePathInField, setEqual } from '../../util';\nimport { isUnitModel } from '../model';\nimport { DataFlowNode } from './dataflow';\nfunction addDimension(dims, channel, fieldDef, model) {\n var _a;\n const channelDef2 = isUnitModel(model) ? model.encoding[getSecondaryRangeChannel(channel)] : undefined;\n if (isTypedFieldDef(fieldDef) &&\n isUnitModel(model) &&\n hasBandEnd(fieldDef, channelDef2, model.markDef, model.config)) {\n dims.add(vgField(fieldDef, {}));\n dims.add(vgField(fieldDef, { suffix: 'end' }));\n if (fieldDef.bin && binRequiresRange(fieldDef, channel)) {\n dims.add(vgField(fieldDef, { binSuffix: 'range' }));\n }\n }\n else if (isGeoPositionChannel(channel)) {\n const posChannel = getPositionChannelFromLatLong(channel);\n dims.add(model.getName(posChannel));\n }\n else {\n dims.add(vgField(fieldDef));\n }\n if (isScaleFieldDef(fieldDef) && isFieldRange((_a = fieldDef.scale) === null || _a === void 0 ? void 0 : _a.range)) {\n dims.add(fieldDef.scale.range.field);\n }\n return dims;\n}\nfunction mergeMeasures(parentMeasures, childMeasures) {\n var _a;\n for (const field of keys(childMeasures)) {\n // when we merge a measure, we either have to add an aggregation operator or even a new field\n const ops = childMeasures[field];\n for (const op of keys(ops)) {\n if (field in parentMeasures) {\n // add operator to existing measure field\n parentMeasures[field][op] = new Set([...((_a = parentMeasures[field][op]) !== null && _a !== void 0 ? _a : []), ...ops[op]]);\n }\n else {\n parentMeasures[field] = { [op]: ops[op] };\n }\n }\n }\n}\nexport class AggregateNode extends DataFlowNode {\n /**\n * @param dimensions string set for dimensions\n * @param measures dictionary mapping field name => dict of aggregation functions and names to use\n */\n constructor(parent, dimensions, measures) {\n super(parent);\n this.dimensions = dimensions;\n this.measures = measures;\n }\n clone() {\n return new AggregateNode(null, new Set(this.dimensions), duplicate(this.measures));\n }\n get groupBy() {\n return this.dimensions;\n }\n static makeFromEncoding(parent, model) {\n let isAggregate = false;\n model.forEachFieldDef(fd => {\n if (fd.aggregate) {\n isAggregate = true;\n }\n });\n const meas = {};\n const dims = new Set();\n if (!isAggregate) {\n // no need to create this node if the model has no aggregation\n return null;\n }\n model.forEachFieldDef((fieldDef, channel) => {\n var _a, _b, _c, _d;\n const { aggregate, field } = fieldDef;\n if (aggregate) {\n if (aggregate === 'count') {\n (_a = meas['*']) !== null && _a !== void 0 ? _a : (meas['*'] = {});\n meas['*']['count'] = new Set([vgField(fieldDef, { forAs: true })]);\n }\n else {\n if (isArgminDef(aggregate) || isArgmaxDef(aggregate)) {\n const op = isArgminDef(aggregate) ? 'argmin' : 'argmax';\n const argField = aggregate[op];\n (_b = meas[argField]) !== null && _b !== void 0 ? _b : (meas[argField] = {});\n meas[argField][op] = new Set([vgField({ op, field: argField }, { forAs: true })]);\n }\n else {\n (_c = meas[field]) !== null && _c !== void 0 ? _c : (meas[field] = {});\n meas[field][aggregate] = new Set([vgField(fieldDef, { forAs: true })]);\n }\n // For scale channel with domain === 'unaggregated', add min/max so we can use their union as unaggregated domain\n if (isScaleChannel(channel) && model.scaleDomain(channel) === 'unaggregated') {\n (_d = meas[field]) !== null && _d !== void 0 ? _d : (meas[field] = {});\n meas[field]['min'] = new Set([vgField({ field, aggregate: 'min' }, { forAs: true })]);\n meas[field]['max'] = new Set([vgField({ field, aggregate: 'max' }, { forAs: true })]);\n }\n }\n }\n else {\n addDimension(dims, channel, fieldDef, model);\n }\n });\n if (dims.size + keys(meas).length === 0) {\n return null;\n }\n return new AggregateNode(parent, dims, meas);\n }\n static makeFromTransform(parent, t) {\n var _a, _b, _c;\n const dims = new Set();\n const meas = {};\n for (const s of t.aggregate) {\n const { op, field, as } = s;\n if (op) {\n if (op === 'count') {\n (_a = meas['*']) !== null && _a !== void 0 ? _a : (meas['*'] = {});\n meas['*']['count'] = new Set([as ? as : vgField(s, { forAs: true })]);\n }\n else {\n (_b = meas[field]) !== null && _b !== void 0 ? _b : (meas[field] = {});\n meas[field][op] = new Set([as ? as : vgField(s, { forAs: true })]);\n }\n }\n }\n for (const s of (_c = t.groupby) !== null && _c !== void 0 ? _c : []) {\n dims.add(s);\n }\n if (dims.size + keys(meas).length === 0) {\n return null;\n }\n return new AggregateNode(parent, dims, meas);\n }\n merge(other) {\n if (setEqual(this.dimensions, other.dimensions)) {\n mergeMeasures(this.measures, other.measures);\n return true;\n }\n else {\n log.debug('different dimensions, cannot merge');\n return false;\n }\n }\n addDimensions(fields) {\n fields.forEach(this.dimensions.add, this.dimensions);\n }\n dependentFields() {\n return new Set([...this.dimensions, ...keys(this.measures)]);\n }\n producedFields() {\n const out = new Set();\n for (const field of keys(this.measures)) {\n for (const op of keys(this.measures[field])) {\n const m = this.measures[field][op];\n if (m.size === 0) {\n out.add(`${op}_${field}`);\n }\n else {\n m.forEach(out.add, out);\n }\n }\n }\n return out;\n }\n hash() {\n return `Aggregate ${hash({ dimensions: this.dimensions, measures: this.measures })}`;\n }\n assemble() {\n const ops = [];\n const fields = [];\n const as = [];\n for (const field of keys(this.measures)) {\n for (const op of keys(this.measures[field])) {\n for (const alias of this.measures[field][op]) {\n as.push(alias);\n ops.push(op);\n fields.push(field === '*' ? null : replacePathInField(field));\n }\n }\n }\n const result = {\n type: 'aggregate',\n groupby: [...this.dimensions].map(replacePathInField),\n ops,\n fields,\n as\n };\n return result;\n }\n}\n//# sourceMappingURL=aggregate.js.map","import { isArray } from 'vega-util';\nimport { isBinning } from '../../bin';\nimport { COLUMN, FACET_CHANNELS, POSITION_SCALE_CHANNELS, ROW } from '../../channel';\nimport { vgField } from '../../channeldef';\nimport * as log from '../../log';\nimport { hasDiscreteDomain } from '../../scale';\nimport { DEFAULT_SORT_OP, isSortField } from '../../sort';\nimport { hash } from '../../util';\nimport { isVgRangeStep } from '../../vega.schema';\nimport { HEADER_CHANNELS, HEADER_TYPES } from '../header/component';\nimport { assembleDomain, getFieldFromDomain } from '../scale/domain';\nimport { sortArrayIndexField } from './calculate';\nimport { DataFlowNode } from './dataflow';\n/**\n * A node that helps us track what fields we are faceting by.\n */\nexport class FacetNode extends DataFlowNode {\n /**\n * @param model The facet model.\n * @param name The name that this facet source will have.\n * @param data The source data for this facet data.\n */\n constructor(parent, model, name, data) {\n super(parent);\n this.model = model;\n this.name = name;\n this.data = data;\n for (const channel of FACET_CHANNELS) {\n const fieldDef = model.facet[channel];\n if (fieldDef) {\n const { bin, sort } = fieldDef;\n this[channel] = Object.assign({ name: model.getName(`${channel}_domain`), fields: [vgField(fieldDef), ...(isBinning(bin) ? [vgField(fieldDef, { binSuffix: 'end' })] : [])] }, (isSortField(sort)\n ? { sortField: sort }\n : isArray(sort)\n ? { sortIndexField: sortArrayIndexField(fieldDef, channel) }\n : {}));\n }\n }\n this.childModel = model.child;\n }\n hash() {\n let out = `Facet`;\n for (const channel of FACET_CHANNELS) {\n if (this[channel]) {\n out += ` ${channel.charAt(0)}:${hash(this[channel])}`;\n }\n }\n return out;\n }\n get fields() {\n var _a;\n const f = [];\n for (const channel of FACET_CHANNELS) {\n if ((_a = this[channel]) === null || _a === void 0 ? void 0 : _a.fields) {\n f.push(...this[channel].fields);\n }\n }\n return f;\n }\n dependentFields() {\n const depFields = new Set(this.fields);\n for (const channel of FACET_CHANNELS) {\n if (this[channel]) {\n if (this[channel].sortField) {\n depFields.add(this[channel].sortField.field);\n }\n if (this[channel].sortIndexField) {\n depFields.add(this[channel].sortIndexField);\n }\n }\n }\n return depFields;\n }\n producedFields() {\n return new Set(); // facet does not produce any new fields\n }\n /**\n * The name to reference this source is its name.\n */\n getSource() {\n return this.name;\n }\n getChildIndependentFieldsWithStep() {\n const childIndependentFieldsWithStep = {};\n for (const channel of POSITION_SCALE_CHANNELS) {\n const childScaleComponent = this.childModel.component.scales[channel];\n if (childScaleComponent && !childScaleComponent.merged) {\n // independent scale\n const type = childScaleComponent.get('type');\n const range = childScaleComponent.get('range');\n if (hasDiscreteDomain(type) && isVgRangeStep(range)) {\n const domain = assembleDomain(this.childModel, channel);\n const field = getFieldFromDomain(domain);\n if (field) {\n childIndependentFieldsWithStep[channel] = field;\n }\n else {\n log.warn(log.message.unknownField(channel));\n }\n }\n }\n }\n return childIndependentFieldsWithStep;\n }\n assembleRowColumnHeaderData(channel, crossedDataName, childIndependentFieldsWithStep) {\n const childChannel = { row: 'y', column: 'x', facet: undefined }[channel];\n const fields = [];\n const ops = [];\n const as = [];\n if (childChannel && childIndependentFieldsWithStep && childIndependentFieldsWithStep[childChannel]) {\n if (crossedDataName) {\n // If there is a crossed data, calculate max\n fields.push(`distinct_${childIndependentFieldsWithStep[childChannel]}`);\n ops.push('max');\n }\n else {\n // If there is no crossed data, just calculate distinct\n fields.push(childIndependentFieldsWithStep[childChannel]);\n ops.push('distinct');\n }\n // Although it is technically a max, just name it distinct so it's easier to refer to it\n as.push(`distinct_${childIndependentFieldsWithStep[childChannel]}`);\n }\n const { sortField, sortIndexField } = this[channel];\n if (sortField) {\n const { op = DEFAULT_SORT_OP, field } = sortField;\n fields.push(field);\n ops.push(op);\n as.push(vgField(sortField, { forAs: true }));\n }\n else if (sortIndexField) {\n fields.push(sortIndexField);\n ops.push('max');\n as.push(sortIndexField);\n }\n return {\n name: this[channel].name,\n // Use data from the crossed one if it exist\n source: crossedDataName !== null && crossedDataName !== void 0 ? crossedDataName : this.data,\n transform: [\n Object.assign({ type: 'aggregate', groupby: this[channel].fields }, (fields.length\n ? {\n fields,\n ops,\n as\n }\n : {}))\n ]\n };\n }\n assembleFacetHeaderData(childIndependentFieldsWithStep) {\n var _a, _b;\n const { columns } = this.model.layout;\n const { layoutHeaders } = this.model.component;\n const data = [];\n const hasSharedAxis = {};\n for (const headerChannel of HEADER_CHANNELS) {\n for (const headerType of HEADER_TYPES) {\n const headers = (_a = (layoutHeaders[headerChannel] && layoutHeaders[headerChannel][headerType])) !== null && _a !== void 0 ? _a : [];\n for (const header of headers) {\n if (((_b = header.axes) === null || _b === void 0 ? void 0 : _b.length) > 0) {\n hasSharedAxis[headerChannel] = true;\n break;\n }\n }\n }\n if (hasSharedAxis[headerChannel]) {\n const cardinality = `length(data(\"${this.facet.name}\"))`;\n const stop = headerChannel === 'row'\n ? columns\n ? { signal: `ceil(${cardinality} / ${columns})` }\n : 1\n : columns\n ? { signal: `min(${cardinality}, ${columns})` }\n : { signal: cardinality };\n data.push({\n name: `${this.facet.name}_${headerChannel}`,\n transform: [\n {\n type: 'sequence',\n start: 0,\n stop\n }\n ]\n });\n }\n }\n const { row, column } = hasSharedAxis;\n if (row || column) {\n data.unshift(this.assembleRowColumnHeaderData('facet', null, childIndependentFieldsWithStep));\n }\n return data;\n }\n assemble() {\n var _a, _b;\n const data = [];\n let crossedDataName = null;\n const childIndependentFieldsWithStep = this.getChildIndependentFieldsWithStep();\n const { column, row, facet } = this;\n if (column && row && (childIndependentFieldsWithStep.x || childIndependentFieldsWithStep.y)) {\n // Need to create a cross dataset to correctly calculate cardinality\n crossedDataName = `cross_${this.column.name}_${this.row.name}`;\n const fields = [].concat((_a = childIndependentFieldsWithStep.x) !== null && _a !== void 0 ? _a : [], (_b = childIndependentFieldsWithStep.y) !== null && _b !== void 0 ? _b : []);\n const ops = fields.map(() => 'distinct');\n data.push({\n name: crossedDataName,\n source: this.data,\n transform: [\n {\n type: 'aggregate',\n groupby: this.fields,\n fields,\n ops\n }\n ]\n });\n }\n for (const channel of [COLUMN, ROW]) {\n if (this[channel]) {\n data.push(this.assembleRowColumnHeaderData(channel, crossedDataName, childIndependentFieldsWithStep));\n }\n }\n if (facet) {\n const facetData = this.assembleFacetHeaderData(childIndependentFieldsWithStep);\n if (facetData) {\n data.push(...facetData);\n }\n }\n return data;\n }\n}\n//# sourceMappingURL=facet.js.map","import { isNumber, isString } from 'vega-util';\nimport { isMinMaxOp } from '../../aggregate';\nimport { getMainRangeChannel } from '../../channel';\nimport { isFieldDef, isFieldOrDatumDefForTimeFormat, isScaleFieldDef, isTypedFieldDef } from '../../channeldef';\nimport { isGenerator } from '../../data';\nimport { isDateTime } from '../../datetime';\nimport * as log from '../../log';\nimport { forEachLeaf } from '../../logical';\nimport { isPathMark } from '../../mark';\nimport { isFieldEqualPredicate, isFieldGTEPredicate, isFieldGTPredicate, isFieldLTEPredicate, isFieldLTPredicate, isFieldOneOfPredicate, isFieldPredicate, isFieldRangePredicate } from '../../predicate';\nimport { isSortField } from '../../sort';\nimport { accessPathDepth, accessPathWithDatum, duplicate, hash, keys, removePathFromField } from '../../util';\nimport { signalRefOrValue } from '../common';\nimport { isFacetModel, isUnitModel } from '../model';\nimport { Split } from '../split';\nimport { DataFlowNode } from './dataflow';\n/**\n * Remove quotes from a string.\n */\nfunction unquote(pattern) {\n if ((pattern[0] === \"'\" && pattern[pattern.length - 1] === \"'\") ||\n (pattern[0] === '\"' && pattern[pattern.length - 1] === '\"')) {\n return pattern.slice(1, -1);\n }\n return pattern;\n}\n/**\n * @param field The field.\n * @param parse What to parse the field as.\n */\nfunction parseExpression(field, parse) {\n const f = accessPathWithDatum(field);\n if (parse === 'number') {\n return `toNumber(${f})`;\n }\n else if (parse === 'boolean') {\n return `toBoolean(${f})`;\n }\n else if (parse === 'string') {\n return `toString(${f})`;\n }\n else if (parse === 'date') {\n return `toDate(${f})`;\n }\n else if (parse === 'flatten') {\n return f;\n }\n else if (parse.startsWith('date:')) {\n const specifier = unquote(parse.slice(5, parse.length));\n return `timeParse(${f},'${specifier}')`;\n }\n else if (parse.startsWith('utc:')) {\n const specifier = unquote(parse.slice(4, parse.length));\n return `utcParse(${f},'${specifier}')`;\n }\n else {\n log.warn(log.message.unrecognizedParse(parse));\n return null;\n }\n}\nexport function getImplicitFromFilterTransform(transform) {\n const implicit = {};\n forEachLeaf(transform.filter, filter => {\n var _a;\n if (isFieldPredicate(filter)) {\n // Automatically add a parse node for filters with filter objects\n let val = null;\n // For EqualFilter, just use the equal property.\n // For RangeFilter and OneOfFilter, all array members should have\n // the same type, so we only use the first one.\n if (isFieldEqualPredicate(filter)) {\n val = signalRefOrValue(filter.equal);\n }\n else if (isFieldLTEPredicate(filter)) {\n val = signalRefOrValue(filter.lte);\n }\n else if (isFieldLTPredicate(filter)) {\n val = signalRefOrValue(filter.lt);\n }\n else if (isFieldGTPredicate(filter)) {\n val = signalRefOrValue(filter.gt);\n }\n else if (isFieldGTEPredicate(filter)) {\n val = signalRefOrValue(filter.gte);\n }\n else if (isFieldRangePredicate(filter)) {\n val = filter.range[0];\n }\n else if (isFieldOneOfPredicate(filter)) {\n val = ((_a = filter.oneOf) !== null && _a !== void 0 ? _a : filter['in'])[0];\n } // else -- for filter expression, we can't infer anything\n if (val) {\n if (isDateTime(val)) {\n implicit[filter.field] = 'date';\n }\n else if (isNumber(val)) {\n implicit[filter.field] = 'number';\n }\n else if (isString(val)) {\n implicit[filter.field] = 'string';\n }\n }\n if (filter.timeUnit) {\n implicit[filter.field] = 'date';\n }\n }\n });\n return implicit;\n}\n/**\n * Creates a parse node for implicit parsing from a model and updates ancestorParse.\n */\nexport function getImplicitFromEncoding(model) {\n const implicit = {};\n function add(fieldDef) {\n if (isFieldOrDatumDefForTimeFormat(fieldDef)) {\n implicit[fieldDef.field] = 'date';\n }\n else if (fieldDef.type === 'quantitative' &&\n isMinMaxOp(fieldDef.aggregate) // we need to parse numbers to support correct min and max\n ) {\n implicit[fieldDef.field] = 'number';\n }\n else if (accessPathDepth(fieldDef.field) > 1) {\n // For non-date/non-number (strings and booleans), derive a flattened field for a referenced nested field.\n // (Parsing numbers / dates already flattens numeric and temporal fields.)\n if (!(fieldDef.field in implicit)) {\n implicit[fieldDef.field] = 'flatten';\n }\n }\n else if (isScaleFieldDef(fieldDef) && isSortField(fieldDef.sort) && accessPathDepth(fieldDef.sort.field) > 1) {\n // Flatten fields that we sort by but that are not otherwise flattened.\n if (!(fieldDef.sort.field in implicit)) {\n implicit[fieldDef.sort.field] = 'flatten';\n }\n }\n }\n if (isUnitModel(model) || isFacetModel(model)) {\n // Parse encoded fields\n model.forEachFieldDef((fieldDef, channel) => {\n if (isTypedFieldDef(fieldDef)) {\n add(fieldDef);\n }\n else {\n const mainChannel = getMainRangeChannel(channel);\n const mainFieldDef = model.fieldDef(mainChannel);\n add(Object.assign(Object.assign({}, fieldDef), { type: mainFieldDef.type }));\n }\n });\n }\n // Parse quantitative dimension fields of path marks as numbers so that we sort them correctly.\n if (isUnitModel(model)) {\n const { mark, markDef, encoding } = model;\n if (isPathMark(mark) &&\n // No need to sort by dimension if we have a connected scatterplot (order channel is present)\n !model.encoding.order) {\n const dimensionChannel = markDef.orient === 'horizontal' ? 'y' : 'x';\n const dimensionChannelDef = encoding[dimensionChannel];\n if (isFieldDef(dimensionChannelDef) &&\n dimensionChannelDef.type === 'quantitative' &&\n !(dimensionChannelDef.field in implicit)) {\n implicit[dimensionChannelDef.field] = 'number';\n }\n }\n }\n return implicit;\n}\n/**\n * Creates a parse node for implicit parsing from a model and updates ancestorParse.\n */\nexport function getImplicitFromSelection(model) {\n const implicit = {};\n if (isUnitModel(model) && model.component.selection) {\n for (const name of keys(model.component.selection)) {\n const selCmpt = model.component.selection[name];\n for (const proj of selCmpt.project.items) {\n if (!proj.channel && accessPathDepth(proj.field) > 1) {\n implicit[proj.field] = 'flatten';\n }\n }\n }\n }\n return implicit;\n}\nexport class ParseNode extends DataFlowNode {\n constructor(parent, parse) {\n super(parent);\n this._parse = parse;\n }\n clone() {\n return new ParseNode(null, duplicate(this._parse));\n }\n hash() {\n return `Parse ${hash(this._parse)}`;\n }\n /**\n * Creates a parse node from a data.format.parse and updates ancestorParse.\n */\n static makeExplicit(parent, model, ancestorParse) {\n var _a;\n // Custom parse\n let explicit = {};\n const data = model.data;\n if (!isGenerator(data) && ((_a = data === null || data === void 0 ? void 0 : data.format) === null || _a === void 0 ? void 0 : _a.parse)) {\n explicit = data.format.parse;\n }\n return this.makeWithAncestors(parent, explicit, {}, ancestorParse);\n }\n /**\n * Creates a parse node from \"explicit\" parse and \"implicit\" parse and updates ancestorParse.\n */\n static makeWithAncestors(parent, explicit, implicit, ancestorParse) {\n // We should not parse what has already been parsed in a parent (explicitly or implicitly) or what has been derived (maked as \"derived\"). We also don't need to flatten a field that has already been parsed.\n for (const field of keys(implicit)) {\n const parsedAs = ancestorParse.getWithExplicit(field);\n if (parsedAs.value !== undefined) {\n // We always ignore derived fields even if they are implicitly defined because we expect users to create the right types.\n if (parsedAs.explicit ||\n parsedAs.value === implicit[field] ||\n parsedAs.value === 'derived' ||\n implicit[field] === 'flatten') {\n delete implicit[field];\n }\n else {\n log.warn(log.message.differentParse(field, implicit[field], parsedAs.value));\n }\n }\n }\n for (const field of keys(explicit)) {\n const parsedAs = ancestorParse.get(field);\n if (parsedAs !== undefined) {\n // Don't parse a field again if it has been parsed with the same type already.\n if (parsedAs === explicit[field]) {\n delete explicit[field];\n }\n else {\n log.warn(log.message.differentParse(field, explicit[field], parsedAs));\n }\n }\n }\n const parse = new Split(explicit, implicit);\n // add the format parse from this model so that children don't parse the same field again\n ancestorParse.copyAll(parse);\n // copy only non-null parses\n const p = {};\n for (const key of keys(parse.combine())) {\n const val = parse.get(key);\n if (val !== null) {\n p[key] = val;\n }\n }\n if (keys(p).length === 0 || ancestorParse.parseNothing) {\n return null;\n }\n return new ParseNode(parent, p);\n }\n get parse() {\n return this._parse;\n }\n merge(other) {\n this._parse = Object.assign(Object.assign({}, this._parse), other.parse);\n other.remove();\n }\n /**\n * Assemble an object for Vega's format.parse property.\n */\n assembleFormatParse() {\n const formatParse = {};\n for (const field of keys(this._parse)) {\n const p = this._parse[field];\n if (accessPathDepth(field) === 1) {\n formatParse[field] = p;\n }\n }\n return formatParse;\n }\n // format parse depends and produces all fields in its parse\n producedFields() {\n return new Set(keys(this._parse));\n }\n dependentFields() {\n return new Set(keys(this._parse));\n }\n assembleTransforms(onlyNested = false) {\n return keys(this._parse)\n .filter(field => (onlyNested ? accessPathDepth(field) > 1 : true))\n .map(field => {\n const expr = parseExpression(field, this._parse[field]);\n if (!expr) {\n return null;\n }\n const formula = {\n type: 'formula',\n expr,\n as: removePathFromField(field) // Vega output is always flattened\n };\n return formula;\n })\n .filter(t => t !== null);\n }\n}\n//# sourceMappingURL=formatparse.js.map","import { SELECTION_ID } from '../../selection';\nimport { DataFlowNode } from './dataflow';\nexport class IdentifierNode extends DataFlowNode {\n clone() {\n return new IdentifierNode(null);\n }\n constructor(parent) {\n super(parent);\n }\n dependentFields() {\n return new Set();\n }\n producedFields() {\n return new Set([SELECTION_ID]);\n }\n hash() {\n return 'Identifier';\n }\n assemble() {\n return { type: 'identifier', as: SELECTION_ID };\n }\n}\n//# sourceMappingURL=identifier.js.map","import { hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\nexport class GraticuleNode extends DataFlowNode {\n constructor(parent, params) {\n super(parent);\n this.params = params;\n }\n clone() {\n return new GraticuleNode(null, this.params);\n }\n dependentFields() {\n return new Set();\n }\n producedFields() {\n return undefined; // there should never be a node before graticule\n }\n hash() {\n return `Graticule ${hash(this.params)}`;\n }\n assemble() {\n return Object.assign({ type: 'graticule' }, (this.params === true ? {} : this.params));\n }\n}\n//# sourceMappingURL=graticule.js.map","import { hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\nexport class SequenceNode extends DataFlowNode {\n constructor(parent, params) {\n super(parent);\n this.params = params;\n }\n clone() {\n return new SequenceNode(null, this.params);\n }\n dependentFields() {\n return new Set();\n }\n producedFields() {\n var _a;\n return new Set([(_a = this.params.as) !== null && _a !== void 0 ? _a : 'data']);\n }\n hash() {\n return `Hash ${hash(this.params)}`;\n }\n assemble() {\n return Object.assign({ type: 'sequence' }, this.params);\n }\n}\n//# sourceMappingURL=sequence.js.map","import { isGenerator, isInlineData, isNamedData, isSphereGenerator, isUrlData } from '../../data';\nimport { contains, isEmpty, omit } from '../../util';\nimport { DataFlowNode } from './dataflow';\nexport class SourceNode extends DataFlowNode {\n constructor(data) {\n super(null); // source cannot have parent\n data !== null && data !== void 0 ? data : (data = { name: 'source' });\n let format;\n if (!isGenerator(data)) {\n format = data.format ? Object.assign({}, omit(data.format, ['parse'])) : {};\n }\n if (isInlineData(data)) {\n this._data = { values: data.values };\n }\n else if (isUrlData(data)) {\n this._data = { url: data.url };\n if (!format.type) {\n // Extract extension from URL using snippet from\n // http://stackoverflow.com/questions/680929/how-to-extract-extension-from-filename-string-in-javascript\n let defaultExtension = /(?:\\.([^.]+))?$/.exec(data.url)[1];\n if (!contains(['json', 'csv', 'tsv', 'dsv', 'topojson'], defaultExtension)) {\n defaultExtension = 'json';\n }\n // defaultExtension has type string but we ensure that it is DataFormatType above\n format.type = defaultExtension;\n }\n }\n else if (isSphereGenerator(data)) {\n // hardwire GeoJSON sphere data into output specification\n this._data = { values: [{ type: 'Sphere' }] };\n }\n else if (isNamedData(data) || isGenerator(data)) {\n this._data = {};\n }\n // set flag to check if generator\n this._generator = isGenerator(data);\n // any dataset can be named\n if (data.name) {\n this._name = data.name;\n }\n if (format && !isEmpty(format)) {\n this._data.format = format;\n }\n }\n dependentFields() {\n return new Set();\n }\n producedFields() {\n return undefined; // we don't know what this source produces\n }\n get data() {\n return this._data;\n }\n hasName() {\n return !!this._name;\n }\n get isGenerator() {\n return this._generator;\n }\n get dataName() {\n return this._name;\n }\n set dataName(name) {\n this._name = name;\n }\n set parent(parent) {\n throw new Error('Source nodes have to be roots.');\n }\n remove() {\n throw new Error('Source nodes are roots and cannot be removed.');\n }\n hash() {\n throw new Error('Cannot hash sources');\n }\n assemble() {\n return Object.assign(Object.assign({ name: this._name }, this._data), { transform: [] });\n }\n}\n//# sourceMappingURL=source.js.map","var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n};\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _Optimizer_modified;\nimport { GraticuleNode } from './graticule';\nimport { SequenceNode } from './sequence';\nimport { SourceNode } from './source';\n/**\n * Whether this dataflow node is the source of the dataflow that produces data i.e. a source or a generator.\n */\nexport function isDataSourceNode(node) {\n return node instanceof SourceNode || node instanceof GraticuleNode || node instanceof SequenceNode;\n}\n/**\n * Abstract base class for Dataflow optimizers.\n * Contains only mutation handling logic. Subclasses need to implement iteration logic.\n */\nexport class Optimizer {\n constructor() {\n _Optimizer_modified.set(this, void 0);\n __classPrivateFieldSet(this, _Optimizer_modified, false, \"f\");\n }\n // Once true, #modified is never set to false\n setModified() {\n __classPrivateFieldSet(this, _Optimizer_modified, true, \"f\");\n }\n get modifiedFlag() {\n return __classPrivateFieldGet(this, _Optimizer_modified, \"f\");\n }\n}\n_Optimizer_modified = new WeakMap();\n/**\n * Starts from a node and runs the optimization function (the \"run\" method) upwards to the root,\n * depending on the continue and modified flag values returned by the optimization function.\n */\nexport class BottomUpOptimizer extends Optimizer {\n /**\n * Compute a map of node depths that we can use to determine a topological sort order.\n */\n getNodeDepths(node, depth, depths) {\n depths.set(node, depth);\n for (const child of node.children) {\n this.getNodeDepths(child, depth + 1, depths);\n }\n return depths;\n }\n /**\n * Run the optimizer on all nodes starting from the leaves.\n */\n optimize(node) {\n const depths = this.getNodeDepths(node, 0, new Map());\n const topologicalSort = [...depths.entries()].sort((a, b) => b[1] - a[1]);\n for (const tuple of topologicalSort) {\n this.run(tuple[0]);\n }\n return this.modifiedFlag;\n }\n}\n/**\n * The optimizer function (the \"run\" method), is invoked on the given node and then continues recursively.\n */\nexport class TopDownOptimizer extends Optimizer {\n /**\n * Run the optimizer depth first on all nodes starting from the roots.\n */\n optimize(node) {\n this.run(node);\n for (const child of node.children) {\n this.optimize(child);\n }\n return this.modifiedFlag;\n }\n}\n//# sourceMappingURL=optimizer.js.map","import { fieldIntersection, hash, hasIntersection, isEmpty, keys, some } from '../../util';\nimport { requiresSelectionId } from '../selection';\nimport { AggregateNode } from './aggregate';\nimport { BinNode } from './bin';\nimport { OutputNode } from './dataflow';\nimport { FacetNode } from './facet';\nimport { FilterNode } from './filter';\nimport { ParseNode } from './formatparse';\nimport { IdentifierNode } from './identifier';\nimport { BottomUpOptimizer, isDataSourceNode, Optimizer, TopDownOptimizer } from './optimizer';\nimport { SourceNode } from './source';\nimport { TimeUnitNode } from './timeunit';\n/**\n * Merge identical nodes at forks by comparing hashes.\n *\n * Does not need to iterate from leaves so we implement this with recursion as it's a bit simpler.\n */\nexport class MergeIdenticalNodes extends TopDownOptimizer {\n mergeNodes(parent, nodes) {\n const mergedNode = nodes.shift();\n for (const node of nodes) {\n parent.removeChild(node);\n node.parent = mergedNode;\n node.remove();\n }\n }\n run(node) {\n const hashes = node.children.map(x => x.hash());\n const buckets = {};\n for (let i = 0; i < hashes.length; i++) {\n if (buckets[hashes[i]] === undefined) {\n buckets[hashes[i]] = [node.children[i]];\n }\n else {\n buckets[hashes[i]].push(node.children[i]);\n }\n }\n for (const k of keys(buckets)) {\n if (buckets[k].length > 1) {\n this.setModified();\n this.mergeNodes(node, buckets[k]);\n }\n }\n }\n}\n/**\n * Optimizer that removes identifier nodes that are not needed for selections.\n */\nexport class RemoveUnnecessaryIdentifierNodes extends TopDownOptimizer {\n constructor(model) {\n super();\n this.requiresSelectionId = model && requiresSelectionId(model);\n }\n run(node) {\n if (node instanceof IdentifierNode) {\n // Only preserve IdentifierNodes if we have default discrete selections\n // in our model tree, and if the nodes come after tuple producing nodes.\n if (!(this.requiresSelectionId &&\n (isDataSourceNode(node.parent) || node.parent instanceof AggregateNode || node.parent instanceof ParseNode))) {\n this.setModified();\n node.remove();\n }\n }\n }\n}\n/**\n * Removes duplicate time unit nodes (as determined by the name of the output field) that may be generated due to\n * selections projected over time units. Only keeps the first time unit in any branch.\n *\n * This optimizer is a custom top down optimizer that keep track of produced fields in a branch.\n */\nexport class RemoveDuplicateTimeUnits extends Optimizer {\n optimize(node) {\n this.run(node, new Set());\n return this.modifiedFlag;\n }\n run(node, timeUnitFields) {\n let producedFields = new Set();\n if (node instanceof TimeUnitNode) {\n producedFields = node.producedFields();\n if (hasIntersection(producedFields, timeUnitFields)) {\n this.setModified();\n node.removeFormulas(timeUnitFields);\n if (node.producedFields.length === 0) {\n node.remove();\n }\n }\n }\n for (const child of node.children) {\n this.run(child, new Set([...timeUnitFields, ...producedFields]));\n }\n }\n}\n/**\n * Remove output nodes that are not required.\n */\nexport class RemoveUnnecessaryOutputNodes extends TopDownOptimizer {\n constructor() {\n super();\n }\n run(node) {\n if (node instanceof OutputNode && !node.isRequired()) {\n this.setModified();\n node.remove();\n }\n }\n}\n/**\n * Move parse nodes up to forks and merges them if possible.\n */\nexport class MoveParseUp extends BottomUpOptimizer {\n run(node) {\n if (isDataSourceNode(node)) {\n return;\n }\n if (node.numChildren() > 1) {\n // Don't move parse further up but continue with parent.\n return;\n }\n for (const child of node.children) {\n if (child instanceof ParseNode) {\n if (node instanceof ParseNode) {\n this.setModified();\n node.merge(child);\n }\n else {\n // Don't swap with nodes that produce something that the parse node depends on (e.g. lookup).\n if (fieldIntersection(node.producedFields(), child.dependentFields())) {\n continue;\n }\n this.setModified();\n child.swapWithParent();\n }\n }\n }\n return;\n }\n}\n/**\n * Inserts an intermediate ParseNode containing all non-conflicting parse fields and removes the empty ParseNodes.\n *\n * We assume that dependent paths that do not have a parse node can be just merged.\n */\nexport class MergeParse extends BottomUpOptimizer {\n run(node) {\n const originalChildren = [...node.children];\n const parseChildren = node.children.filter((child) => child instanceof ParseNode);\n if (node.numChildren() > 1 && parseChildren.length >= 1) {\n const commonParse = {};\n const conflictingParse = new Set();\n for (const parseNode of parseChildren) {\n const parse = parseNode.parse;\n for (const k of keys(parse)) {\n if (!(k in commonParse)) {\n commonParse[k] = parse[k];\n }\n else if (commonParse[k] !== parse[k]) {\n conflictingParse.add(k);\n }\n }\n }\n for (const field of conflictingParse) {\n delete commonParse[field];\n }\n if (!isEmpty(commonParse)) {\n this.setModified();\n const mergedParseNode = new ParseNode(node, commonParse);\n for (const childNode of originalChildren) {\n if (childNode instanceof ParseNode) {\n for (const key of keys(commonParse)) {\n delete childNode.parse[key];\n }\n }\n node.removeChild(childNode);\n childNode.parent = mergedParseNode;\n // remove empty parse nodes\n if (childNode instanceof ParseNode && keys(childNode.parse).length === 0) {\n childNode.remove();\n }\n }\n }\n }\n }\n}\n/**\n * Repeatedly remove leaf nodes that are not output or facet nodes.\n * The reason is that we don't need subtrees that don't have any output nodes.\n * Facet nodes are needed for the row or column domains.\n */\nexport class RemoveUnusedSubtrees extends BottomUpOptimizer {\n run(node) {\n if (node instanceof OutputNode || node.numChildren() > 0 || node instanceof FacetNode) {\n // no need to continue with parent because it is output node or will have children (there was a fork)\n }\n else if (node instanceof SourceNode) {\n // ignore empty unused sources as they will be removed in optimizationDataflowHelper\n }\n else {\n this.setModified();\n node.remove();\n }\n }\n}\n/**\n * Merge adjacent time unit nodes.\n */\nexport class MergeTimeUnits extends BottomUpOptimizer {\n run(node) {\n const timeUnitChildren = node.children.filter((x) => x instanceof TimeUnitNode);\n const combination = timeUnitChildren.pop();\n for (const timeUnit of timeUnitChildren) {\n this.setModified();\n combination.merge(timeUnit);\n }\n }\n}\nexport class MergeAggregates extends BottomUpOptimizer {\n run(node) {\n const aggChildren = node.children.filter((child) => child instanceof AggregateNode);\n // Object which we'll use to map the fields which an aggregate is grouped by to\n // the set of aggregates with that grouping. This is useful as only aggregates\n // with the same group by can be merged\n const groupedAggregates = {};\n // Build groupedAggregates\n for (const agg of aggChildren) {\n const groupBys = hash(agg.groupBy);\n if (!(groupBys in groupedAggregates)) {\n groupedAggregates[groupBys] = [];\n }\n groupedAggregates[groupBys].push(agg);\n }\n // Merge aggregateNodes with same key in groupedAggregates\n for (const group of keys(groupedAggregates)) {\n const mergeableAggs = groupedAggregates[group];\n if (mergeableAggs.length > 1) {\n const mergedAggs = mergeableAggs.pop();\n for (const agg of mergeableAggs) {\n if (mergedAggs.merge(agg)) {\n node.removeChild(agg);\n agg.parent = mergedAggs;\n agg.remove();\n this.setModified();\n }\n }\n }\n }\n }\n}\n/**\n * Merge bin nodes and move them up through forks. Stop at filters, parse, identifier as we want them to stay before the bin node.\n */\nexport class MergeBins extends BottomUpOptimizer {\n constructor(model) {\n super();\n this.model = model;\n }\n run(node) {\n const moveBinsUp = !(isDataSourceNode(node) ||\n node instanceof FilterNode ||\n node instanceof ParseNode ||\n node instanceof IdentifierNode);\n const promotableBins = [];\n const remainingBins = [];\n for (const child of node.children) {\n if (child instanceof BinNode) {\n if (moveBinsUp && !fieldIntersection(node.producedFields(), child.dependentFields())) {\n promotableBins.push(child);\n }\n else {\n remainingBins.push(child);\n }\n }\n }\n if (promotableBins.length > 0) {\n const promotedBin = promotableBins.pop();\n for (const bin of promotableBins) {\n promotedBin.merge(bin, this.model.renameSignal.bind(this.model));\n }\n this.setModified();\n if (node instanceof BinNode) {\n node.merge(promotedBin, this.model.renameSignal.bind(this.model));\n }\n else {\n promotedBin.swapWithParent();\n }\n }\n if (remainingBins.length > 1) {\n const remainingBin = remainingBins.pop();\n for (const bin of remainingBins) {\n remainingBin.merge(bin, this.model.renameSignal.bind(this.model));\n }\n this.setModified();\n }\n }\n}\n/**\n * This optimizer takes output nodes that are at a fork and moves them before the fork.\n *\n * The algorithm iterates over the children and tries to find the last output node in a chain of output nodes.\n * It then moves all output nodes before that main output node. All other children (and the children of the output nodes)\n * are inserted after the main output node.\n */\nexport class MergeOutputs extends BottomUpOptimizer {\n run(node) {\n const children = [...node.children];\n const hasOutputChild = some(children, child => child instanceof OutputNode);\n if (!hasOutputChild || node.numChildren() <= 1) {\n return;\n }\n const otherChildren = [];\n // The output node we will connect all other nodes to.\n // Output nodes will be added before the new node, other nodes after.\n let mainOutput;\n for (const child of children) {\n if (child instanceof OutputNode) {\n let lastOutput = child;\n while (lastOutput.numChildren() === 1) {\n const [theChild] = lastOutput.children;\n if (theChild instanceof OutputNode) {\n lastOutput = theChild;\n }\n else {\n break;\n }\n }\n otherChildren.push(...lastOutput.children);\n if (mainOutput) {\n // Move the output nodes before the mainOutput. We do this by setting\n // the parent of the first not to the parent of the main output and\n // the main output's parent to the last output.\n // note: the child is the first output\n node.removeChild(child);\n child.parent = mainOutput.parent;\n mainOutput.parent.removeChild(mainOutput);\n mainOutput.parent = lastOutput;\n this.setModified();\n }\n else {\n mainOutput = lastOutput;\n }\n }\n else {\n otherChildren.push(child);\n }\n }\n if (otherChildren.length) {\n this.setModified();\n for (const child of otherChildren) {\n child.parent.removeChild(child);\n child.parent = mainOutput;\n }\n }\n }\n}\n//# sourceMappingURL=optimizers.js.map","import { vgField } from '../../channeldef';\nimport { duplicate, hash } from '../../util';\nimport { unique } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for the join aggregate transform nodes.\n */\nexport class JoinAggregateTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n super(parent);\n this.transform = transform;\n }\n clone() {\n return new JoinAggregateTransformNode(null, duplicate(this.transform));\n }\n addDimensions(fields) {\n this.transform.groupby = unique(this.transform.groupby.concat(fields), d => d);\n }\n dependentFields() {\n const out = new Set();\n if (this.transform.groupby) {\n this.transform.groupby.forEach(out.add, out);\n }\n this.transform.joinaggregate\n .map(w => w.field)\n .filter(f => f !== undefined)\n .forEach(out.add, out);\n return out;\n }\n producedFields() {\n return new Set(this.transform.joinaggregate.map(this.getDefaultName));\n }\n getDefaultName(joinAggregateFieldDef) {\n var _a;\n return (_a = joinAggregateFieldDef.as) !== null && _a !== void 0 ? _a : vgField(joinAggregateFieldDef);\n }\n hash() {\n return `JoinAggregateTransform ${hash(this.transform)}`;\n }\n assemble() {\n const fields = [];\n const ops = [];\n const as = [];\n for (const joinaggregate of this.transform.joinaggregate) {\n ops.push(joinaggregate.op);\n as.push(this.getDefaultName(joinaggregate));\n fields.push(joinaggregate.field === undefined ? null : joinaggregate.field);\n }\n const groupby = this.transform.groupby;\n return Object.assign({ type: 'joinaggregate', as,\n ops,\n fields }, (groupby !== undefined ? { groupby } : {}));\n }\n}\n//# sourceMappingURL=joinaggregate.js.map","import { isArray, isString } from 'vega-util';\nimport { getFieldDef, isFieldDef, vgField } from '../../channeldef';\nimport { duplicate, getFirstDefined, hash } from '../../util';\nimport { sortParams } from '../common';\nimport { DataFlowNode } from './dataflow';\nfunction getStackByFields(model) {\n return model.stack.stackBy.reduce((fields, by) => {\n const fieldDef = by.fieldDef;\n const _field = vgField(fieldDef);\n if (_field) {\n fields.push(_field);\n }\n return fields;\n }, []);\n}\nfunction isValidAsArray(as) {\n return isArray(as) && as.every(s => isString(s)) && as.length > 1;\n}\nexport class StackNode extends DataFlowNode {\n constructor(parent, stack) {\n super(parent);\n this._stack = stack;\n }\n clone() {\n return new StackNode(null, duplicate(this._stack));\n }\n static makeFromTransform(parent, stackTransform) {\n const { stack, groupby, as, offset = 'zero' } = stackTransform;\n const sortFields = [];\n const sortOrder = [];\n if (stackTransform.sort !== undefined) {\n for (const sortField of stackTransform.sort) {\n sortFields.push(sortField.field);\n sortOrder.push(getFirstDefined(sortField.order, 'ascending'));\n }\n }\n const sort = {\n field: sortFields,\n order: sortOrder\n };\n let normalizedAs;\n if (isValidAsArray(as)) {\n normalizedAs = as;\n }\n else if (isString(as)) {\n normalizedAs = [as, `${as}_end`];\n }\n else {\n normalizedAs = [`${stackTransform.stack}_start`, `${stackTransform.stack}_end`];\n }\n return new StackNode(parent, {\n stackField: stack,\n groupby,\n offset,\n sort,\n facetby: [],\n as: normalizedAs\n });\n }\n static makeFromEncoding(parent, model) {\n const stackProperties = model.stack;\n const { encoding } = model;\n if (!stackProperties) {\n return null;\n }\n const { groupbyChannel, fieldChannel, offset, impute } = stackProperties;\n let dimensionFieldDef;\n if (groupbyChannel) {\n const cDef = encoding[groupbyChannel];\n dimensionFieldDef = getFieldDef(cDef); // Fair to cast as groupByChannel is always either x or y\n }\n const stackby = getStackByFields(model);\n const orderDef = model.encoding.order;\n let sort;\n if (isArray(orderDef) || isFieldDef(orderDef)) {\n sort = sortParams(orderDef);\n }\n else {\n // default = descending by stackFields\n // FIXME is the default here correct for binned fields?\n sort = stackby.reduce((s, field) => {\n s.field.push(field);\n s.order.push(fieldChannel === 'y' ? 'descending' : 'ascending');\n return s;\n }, { field: [], order: [] });\n }\n return new StackNode(parent, {\n dimensionFieldDef,\n stackField: model.vgField(fieldChannel),\n facetby: [],\n stackby,\n sort,\n offset,\n impute,\n as: [\n model.vgField(fieldChannel, { suffix: 'start', forAs: true }),\n model.vgField(fieldChannel, { suffix: 'end', forAs: true })\n ]\n });\n }\n get stack() {\n return this._stack;\n }\n addDimensions(fields) {\n this._stack.facetby.push(...fields);\n }\n dependentFields() {\n const out = new Set();\n out.add(this._stack.stackField);\n this.getGroupbyFields().forEach(out.add, out);\n this._stack.facetby.forEach(out.add, out);\n this._stack.sort.field.forEach(out.add, out);\n return out;\n }\n producedFields() {\n return new Set(this._stack.as);\n }\n hash() {\n return `Stack ${hash(this._stack)}`;\n }\n getGroupbyFields() {\n const { dimensionFieldDef, impute, groupby } = this._stack;\n if (dimensionFieldDef) {\n if (dimensionFieldDef.bin) {\n if (impute) {\n // For binned group by field with impute, we calculate bin_mid\n // as we cannot impute two fields simultaneously\n return [vgField(dimensionFieldDef, { binSuffix: 'mid' })];\n }\n return [\n // For binned group by field without impute, we need both bin (start) and bin_end\n vgField(dimensionFieldDef, {}),\n vgField(dimensionFieldDef, { binSuffix: 'end' })\n ];\n }\n return [vgField(dimensionFieldDef)];\n }\n return groupby !== null && groupby !== void 0 ? groupby : [];\n }\n assemble() {\n const transform = [];\n const { facetby, dimensionFieldDef, stackField: field, stackby, sort, offset, impute, as } = this._stack;\n // Impute\n if (impute && dimensionFieldDef) {\n const { bandPosition = 0.5, bin } = dimensionFieldDef;\n if (bin) {\n // As we can only impute one field at a time, we need to calculate\n // mid point for a binned field\n transform.push({\n type: 'formula',\n expr: `${bandPosition}*` +\n vgField(dimensionFieldDef, { expr: 'datum' }) +\n `+${1 - bandPosition}*` +\n vgField(dimensionFieldDef, { expr: 'datum', binSuffix: 'end' }),\n as: vgField(dimensionFieldDef, { binSuffix: 'mid', forAs: true })\n });\n }\n transform.push({\n type: 'impute',\n field,\n groupby: [...stackby, ...facetby],\n key: vgField(dimensionFieldDef, { binSuffix: 'mid' }),\n method: 'value',\n value: 0\n });\n }\n // Stack\n transform.push({\n type: 'stack',\n groupby: [...this.getGroupbyFields(), ...facetby],\n field,\n sort,\n as,\n offset\n });\n return transform;\n }\n}\n//# sourceMappingURL=stack.js.map","import { isAggregateOp } from '../../aggregate';\nimport { vgField } from '../../channeldef';\nimport { duplicate, hash } from '../../util';\nimport { unique } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for the window transform nodes\n */\nexport class WindowTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n super(parent);\n this.transform = transform;\n }\n clone() {\n return new WindowTransformNode(null, duplicate(this.transform));\n }\n addDimensions(fields) {\n this.transform.groupby = unique(this.transform.groupby.concat(fields), d => d);\n }\n dependentFields() {\n var _a, _b;\n const out = new Set();\n ((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : []).forEach(out.add, out);\n ((_b = this.transform.sort) !== null && _b !== void 0 ? _b : []).forEach(m => out.add(m.field));\n this.transform.window\n .map(w => w.field)\n .filter(f => f !== undefined)\n .forEach(out.add, out);\n return out;\n }\n producedFields() {\n return new Set(this.transform.window.map(this.getDefaultName));\n }\n getDefaultName(windowFieldDef) {\n var _a;\n return (_a = windowFieldDef.as) !== null && _a !== void 0 ? _a : vgField(windowFieldDef);\n }\n hash() {\n return `WindowTransform ${hash(this.transform)}`;\n }\n assemble() {\n var _a;\n const fields = [];\n const ops = [];\n const as = [];\n const params = [];\n for (const window of this.transform.window) {\n ops.push(window.op);\n as.push(this.getDefaultName(window));\n params.push(window.param === undefined ? null : window.param);\n fields.push(window.field === undefined ? null : window.field);\n }\n const frame = this.transform.frame;\n const groupby = this.transform.groupby;\n if (frame && frame[0] === null && frame[1] === null && ops.every(o => isAggregateOp(o))) {\n // when the window does not rely on any particular window ops or frame, switch to a simpler and more efficient joinaggregate\n return Object.assign({ type: 'joinaggregate', as, ops: ops, fields }, (groupby !== undefined ? { groupby } : {}));\n }\n const sortFields = [];\n const sortOrder = [];\n if (this.transform.sort !== undefined) {\n for (const sortField of this.transform.sort) {\n sortFields.push(sortField.field);\n sortOrder.push((_a = sortField.order) !== null && _a !== void 0 ? _a : 'ascending');\n }\n }\n const sort = {\n field: sortFields,\n order: sortOrder\n };\n const ignorePeers = this.transform.ignorePeers;\n return Object.assign(Object.assign(Object.assign({ type: 'window', params,\n as,\n ops,\n fields,\n sort }, (ignorePeers !== undefined ? { ignorePeers } : {})), (groupby !== undefined ? { groupby } : {})), (frame !== undefined ? { frame } : {}));\n }\n}\n//# sourceMappingURL=window.js.map","import { DataSourceType } from '../../data';\nimport { AggregateNode } from './aggregate';\nimport { OutputNode } from './dataflow';\nimport { FacetNode } from './facet';\nimport { JoinAggregateTransformNode } from './joinaggregate';\nimport { FACET_SCALE_PREFIX } from './optimize';\nimport { StackNode } from './stack';\nimport { WindowTransformNode } from './window';\n/**\n * Clones the subtree and ignores output nodes except for the leaves, which are renamed.\n */\nfunction cloneSubtree(facet) {\n function clone(node) {\n if (!(node instanceof FacetNode)) {\n const copy = node.clone();\n if (copy instanceof OutputNode) {\n const newName = FACET_SCALE_PREFIX + copy.getSource();\n copy.setSource(newName);\n facet.model.component.data.outputNodes[newName] = copy;\n }\n else if (copy instanceof AggregateNode ||\n copy instanceof StackNode ||\n copy instanceof WindowTransformNode ||\n copy instanceof JoinAggregateTransformNode) {\n copy.addDimensions(facet.fields);\n }\n for (const n of node.children.flatMap(clone)) {\n n.parent = copy;\n }\n return [copy];\n }\n return node.children.flatMap(clone);\n }\n return clone;\n}\n/**\n * Move facet nodes down to the next fork or output node. Also pull the main output with the facet node.\n * After moving down the facet node, make a copy of the subtree and make it a child of the main output.\n */\nexport function moveFacetDown(node) {\n if (node instanceof FacetNode) {\n if (node.numChildren() === 1 && !(node.children[0] instanceof OutputNode)) {\n // move down until we hit a fork or output node\n const child = node.children[0];\n if (child instanceof AggregateNode ||\n child instanceof StackNode ||\n child instanceof WindowTransformNode ||\n child instanceof JoinAggregateTransformNode) {\n child.addDimensions(node.fields);\n }\n child.swapWithParent();\n moveFacetDown(node);\n }\n else {\n // move main to facet\n const facetMain = node.model.component.data.main;\n moveMainDownToFacet(facetMain);\n // replicate the subtree and place it before the facet's main node\n const cloner = cloneSubtree(node);\n const copy = node.children.map(cloner).flat();\n for (const c of copy) {\n c.parent = facetMain;\n }\n }\n }\n else {\n node.children.map(moveFacetDown);\n }\n}\nfunction moveMainDownToFacet(node) {\n if (node instanceof OutputNode && node.type === DataSourceType.Main) {\n if (node.numChildren() === 1) {\n const child = node.children[0];\n if (!(child instanceof FacetNode)) {\n child.swapWithParent();\n moveMainDownToFacet(node);\n }\n }\n }\n}\n//# sourceMappingURL=subtree.js.map","import * as log from '../../log';\nimport * as optimizers from './optimizers';\nimport { moveFacetDown } from './subtree';\nexport const FACET_SCALE_PREFIX = 'scale_';\nexport const MAX_OPTIMIZATION_RUNS = 5;\n/**\n * Iterates over a dataflow graph and checks whether all links are consistent.\n */\nexport function checkLinks(nodes) {\n for (const node of nodes) {\n for (const child of node.children) {\n if (child.parent !== node) {\n // log.error('Dataflow graph is inconsistent.', node, child);\n return false;\n }\n }\n if (!checkLinks(node.children)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Run the specified optimizer on the provided nodes.\n *\n * @param optimizer The optimizer instance to run.\n * @param nodes A set of nodes to optimize.\n */\nfunction runOptimizer(optimizer, nodes) {\n let modified = false;\n for (const node of nodes) {\n modified = optimizer.optimize(node) || modified;\n }\n return modified;\n}\nfunction optimizationDataflowHelper(dataComponent, model, firstPass) {\n let roots = dataComponent.sources;\n let modified = false;\n modified = runOptimizer(new optimizers.RemoveUnnecessaryOutputNodes(), roots) || modified;\n modified = runOptimizer(new optimizers.RemoveUnnecessaryIdentifierNodes(model), roots) || modified;\n // remove source nodes that don't have any children because they also don't have output nodes\n roots = roots.filter(r => r.numChildren() > 0);\n modified = runOptimizer(new optimizers.RemoveUnusedSubtrees(), roots) || modified;\n roots = roots.filter(r => r.numChildren() > 0);\n if (!firstPass) {\n // Only run these optimizations after the optimizer has moved down the facet node.\n // With this change, we can be more aggressive in the optimizations.\n modified = runOptimizer(new optimizers.MoveParseUp(), roots) || modified;\n modified = runOptimizer(new optimizers.MergeBins(model), roots) || modified;\n modified = runOptimizer(new optimizers.RemoveDuplicateTimeUnits(), roots) || modified;\n modified = runOptimizer(new optimizers.MergeParse(), roots) || modified;\n modified = runOptimizer(new optimizers.MergeAggregates(), roots) || modified;\n modified = runOptimizer(new optimizers.MergeTimeUnits(), roots) || modified;\n modified = runOptimizer(new optimizers.MergeIdenticalNodes(), roots) || modified;\n modified = runOptimizer(new optimizers.MergeOutputs(), roots) || modified;\n }\n dataComponent.sources = roots;\n return modified;\n}\n/**\n * Optimizes the dataflow of the passed in data component.\n */\nexport function optimizeDataflow(data, model) {\n // check before optimizations\n checkLinks(data.sources);\n let firstPassCounter = 0;\n let secondPassCounter = 0;\n for (let i = 0; i < MAX_OPTIMIZATION_RUNS; i++) {\n if (!optimizationDataflowHelper(data, model, true)) {\n break;\n }\n firstPassCounter++;\n }\n // move facets down and make a copy of the subtree so that we can have scales at the top level\n data.sources.map(moveFacetDown);\n for (let i = 0; i < MAX_OPTIMIZATION_RUNS; i++) {\n if (!optimizationDataflowHelper(data, model, false)) {\n break;\n }\n secondPassCounter++;\n }\n // check after optimizations\n checkLinks(data.sources);\n if (Math.max(firstPassCounter, secondPassCounter) === MAX_OPTIMIZATION_RUNS) {\n log.warn(`Maximum optimization runs(${MAX_OPTIMIZATION_RUNS}) reached.`);\n }\n}\n//# sourceMappingURL=optimize.js.map","/**\n * A class that behaves like a SignalRef but lazily generates the signal.\n * The provided generator function should use `Model.getSignalName` to use the correct signal name.\n */\nexport class SignalRefWrapper {\n constructor(exprGenerator) {\n Object.defineProperty(this, 'signal', {\n enumerable: true,\n get: exprGenerator\n });\n }\n static fromName(rename, signalName) {\n return new SignalRefWrapper(() => rename(signalName));\n }\n}\n//# sourceMappingURL=signal.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isObject, isString } from 'vega-util';\nimport { isAggregateOp, isArgmaxDef, isArgminDef, MULTIDOMAIN_SORT_OP_INDEX as UNIONDOMAIN_SORT_OP_INDEX, SHARED_DOMAIN_OP_INDEX } from '../../aggregate';\nimport { isBinning, isBinParams, isParameterExtent } from '../../bin';\nimport { getSecondaryRangeChannel, isScaleChannel } from '../../channel';\nimport { binRequiresRange, getFieldOrDatumDef, hasBandEnd, isDatumDef, isFieldDef, valueExpr, vgField } from '../../channeldef';\nimport { DataSourceType } from '../../data';\nimport * as log from '../../log';\nimport { hasDiscreteDomain, isDomainUnionWith, isParameterDomain } from '../../scale';\nimport { DEFAULT_SORT_OP, isSortArray, isSortByEncoding, isSortField } from '../../sort';\nimport { normalizeTimeUnit } from '../../timeunit';\nimport * as util from '../../util';\nimport { isDataRefDomain, isDataRefUnionedDomain, isFieldRefUnionDomain, isSignalRef } from '../../vega.schema';\nimport { getBinSignalName } from '../data/bin';\nimport { sortArrayIndexField } from '../data/calculate';\nimport { FACET_SCALE_PREFIX } from '../data/optimize';\nimport { isFacetModel, isUnitModel } from '../model';\nimport { SignalRefWrapper } from '../signal';\nimport { makeExplicit, makeImplicit, mergeValuesWithExplicit } from '../split';\nexport function parseScaleDomain(model) {\n if (isUnitModel(model)) {\n parseUnitScaleDomain(model);\n }\n else {\n parseNonUnitScaleDomain(model);\n }\n}\nfunction parseUnitScaleDomain(model) {\n const localScaleComponents = model.component.scales;\n for (const channel of util.keys(localScaleComponents)) {\n const domains = parseDomainForChannel(model, channel);\n const localScaleCmpt = localScaleComponents[channel];\n localScaleCmpt.setWithExplicit('domains', domains);\n parseSelectionDomain(model, channel);\n if (model.component.data.isFaceted) {\n // get resolve from closest facet parent as this decides whether we need to refer to cloned subtree or not\n let facetParent = model;\n while (!isFacetModel(facetParent) && facetParent.parent) {\n facetParent = facetParent.parent;\n }\n const resolve = facetParent.component.resolve.scale[channel];\n if (resolve === 'shared') {\n for (const domain of domains.value) {\n // Replace the scale domain with data output from a cloned subtree after the facet.\n if (isDataRefDomain(domain)) {\n // use data from cloned subtree (which is the same as data but with a prefix added once)\n domain.data = FACET_SCALE_PREFIX + domain.data.replace(FACET_SCALE_PREFIX, '');\n }\n }\n }\n }\n }\n}\nfunction parseNonUnitScaleDomain(model) {\n for (const child of model.children) {\n parseScaleDomain(child);\n }\n const localScaleComponents = model.component.scales;\n for (const channel of util.keys(localScaleComponents)) {\n let domains;\n let selectionExtent = null;\n for (const child of model.children) {\n const childComponent = child.component.scales[channel];\n if (childComponent) {\n if (domains === undefined) {\n domains = childComponent.getWithExplicit('domains');\n }\n else {\n domains = mergeValuesWithExplicit(domains, childComponent.getWithExplicit('domains'), 'domains', 'scale', domainsTieBreaker);\n }\n const se = childComponent.get('selectionExtent');\n if (selectionExtent && se && selectionExtent.param !== se.param) {\n log.warn(log.message.NEEDS_SAME_SELECTION);\n }\n selectionExtent = se;\n }\n }\n localScaleComponents[channel].setWithExplicit('domains', domains);\n if (selectionExtent) {\n localScaleComponents[channel].set('selectionExtent', selectionExtent, true);\n }\n }\n}\n/**\n * Remove unaggregated domain if it is not applicable\n * Add unaggregated domain if domain is not specified and config.scale.useUnaggregatedDomain is true.\n */\nfunction normalizeUnaggregatedDomain(domain, fieldDef, scaleType, scaleConfig) {\n if (domain === 'unaggregated') {\n const { valid, reason } = canUseUnaggregatedDomain(fieldDef, scaleType);\n if (!valid) {\n log.warn(reason);\n return undefined;\n }\n }\n else if (domain === undefined && scaleConfig.useUnaggregatedDomain) {\n // Apply config if domain is not specified.\n const { valid } = canUseUnaggregatedDomain(fieldDef, scaleType);\n if (valid) {\n return 'unaggregated';\n }\n }\n return domain;\n}\nexport function parseDomainForChannel(model, channel) {\n const scaleType = model.getScaleComponent(channel).get('type');\n const { encoding } = model;\n const domain = normalizeUnaggregatedDomain(model.scaleDomain(channel), model.typedFieldDef(channel), scaleType, model.config.scale);\n if (domain !== model.scaleDomain(channel)) {\n model.specifiedScales[channel] = Object.assign(Object.assign({}, model.specifiedScales[channel]), { domain });\n }\n // If channel is either X or Y then union them with X2 & Y2 if they exist\n if (channel === 'x' && getFieldOrDatumDef(encoding.x2)) {\n if (getFieldOrDatumDef(encoding.x)) {\n return mergeValuesWithExplicit(parseSingleChannelDomain(scaleType, domain, model, 'x'), parseSingleChannelDomain(scaleType, domain, model, 'x2'), 'domain', 'scale', domainsTieBreaker);\n }\n else {\n return parseSingleChannelDomain(scaleType, domain, model, 'x2');\n }\n }\n else if (channel === 'y' && getFieldOrDatumDef(encoding.y2)) {\n if (getFieldOrDatumDef(encoding.y)) {\n return mergeValuesWithExplicit(parseSingleChannelDomain(scaleType, domain, model, 'y'), parseSingleChannelDomain(scaleType, domain, model, 'y2'), 'domain', 'scale', domainsTieBreaker);\n }\n else {\n return parseSingleChannelDomain(scaleType, domain, model, 'y2');\n }\n }\n return parseSingleChannelDomain(scaleType, domain, model, channel);\n}\nfunction mapDomainToDataSignal(domain, type, timeUnit) {\n return domain.map(v => {\n const data = valueExpr(v, { timeUnit, type });\n return { signal: `{data: ${data}}` };\n });\n}\nfunction convertDomainIfItIsDateTime(domain, type, timeUnit) {\n var _a;\n // explicit value\n const normalizedTimeUnit = (_a = normalizeTimeUnit(timeUnit)) === null || _a === void 0 ? void 0 : _a.unit;\n if (type === 'temporal' || normalizedTimeUnit) {\n return mapDomainToDataSignal(domain, type, normalizedTimeUnit);\n }\n return [domain]; // Date time won't make sense\n}\nfunction parseSingleChannelDomain(scaleType, domain, model, channel) {\n const { encoding } = model;\n const fieldOrDatumDef = getFieldOrDatumDef(encoding[channel]);\n const { type } = fieldOrDatumDef;\n const timeUnit = fieldOrDatumDef['timeUnit'];\n if (isDomainUnionWith(domain)) {\n const defaultDomain = parseSingleChannelDomain(scaleType, undefined, model, channel);\n const unionWith = convertDomainIfItIsDateTime(domain.unionWith, type, timeUnit);\n return makeExplicit([...defaultDomain.value, ...unionWith]);\n }\n else if (isSignalRef(domain)) {\n return makeExplicit([domain]);\n }\n else if (domain && domain !== 'unaggregated' && !isParameterDomain(domain)) {\n return makeExplicit(convertDomainIfItIsDateTime(domain, type, timeUnit));\n }\n const stack = model.stack;\n if (stack && channel === stack.fieldChannel) {\n if (stack.offset === 'normalize') {\n return makeImplicit([[0, 1]]);\n }\n const data = model.requestDataName(DataSourceType.Main);\n return makeImplicit([\n {\n data,\n field: model.vgField(channel, { suffix: 'start' })\n },\n {\n data,\n field: model.vgField(channel, { suffix: 'end' })\n }\n ]);\n }\n const sort = isScaleChannel(channel) && isFieldDef(fieldOrDatumDef) ? domainSort(model, channel, scaleType) : undefined;\n if (isDatumDef(fieldOrDatumDef)) {\n const d = convertDomainIfItIsDateTime([fieldOrDatumDef.datum], type, timeUnit);\n return makeImplicit(d);\n }\n const fieldDef = fieldOrDatumDef; // now we can be sure it's a fieldDef\n if (domain === 'unaggregated') {\n const data = model.requestDataName(DataSourceType.Main);\n const { field } = fieldOrDatumDef;\n return makeImplicit([\n {\n data,\n field: vgField({ field, aggregate: 'min' })\n },\n {\n data,\n field: vgField({ field, aggregate: 'max' })\n }\n ]);\n }\n else if (isBinning(fieldDef.bin)) {\n if (hasDiscreteDomain(scaleType)) {\n if (scaleType === 'bin-ordinal') {\n // we can omit the domain as it is inferred from the `bins` property\n return makeImplicit([]);\n }\n // ordinal bin scale takes domain from bin_range, ordered by bin start\n // This is useful for both axis-based scale (x/y) and legend-based scale (other channels).\n return makeImplicit([\n {\n // If sort by aggregation of a specified sort field, we need to use RAW table,\n // so we can aggregate values for the scale independently from the main aggregation.\n data: util.isBoolean(sort)\n ? model.requestDataName(DataSourceType.Main)\n : model.requestDataName(DataSourceType.Raw),\n // Use range if we added it and the scale does not support computing a range as a signal.\n field: model.vgField(channel, binRequiresRange(fieldDef, channel) ? { binSuffix: 'range' } : {}),\n // we have to use a sort object if sort = true to make the sort correct by bin start\n sort: sort === true || !isObject(sort)\n ? {\n field: model.vgField(channel, {}),\n op: 'min' // min or max doesn't matter since we sort by the start of the bin range\n }\n : sort\n }\n ]);\n }\n else {\n // continuous scales\n const { bin } = fieldDef;\n if (isBinning(bin)) {\n const binSignal = getBinSignalName(model, fieldDef.field, bin);\n return makeImplicit([\n new SignalRefWrapper(() => {\n const signal = model.getSignalName(binSignal);\n return `[${signal}.start, ${signal}.stop]`;\n })\n ]);\n }\n else {\n return makeImplicit([\n {\n data: model.requestDataName(DataSourceType.Main),\n field: model.vgField(channel, {})\n }\n ]);\n }\n }\n }\n else if (fieldDef.timeUnit &&\n util.contains(['time', 'utc'], scaleType) &&\n hasBandEnd(fieldDef, isUnitModel(model) ? model.encoding[getSecondaryRangeChannel(channel)] : undefined, model.markDef, model.config)) {\n const data = model.requestDataName(DataSourceType.Main);\n return makeImplicit([\n {\n data,\n field: model.vgField(channel)\n },\n {\n data,\n field: model.vgField(channel, { suffix: 'end' })\n }\n ]);\n }\n else if (sort) {\n return makeImplicit([\n {\n // If sort by aggregation of a specified sort field, we need to use RAW table,\n // so we can aggregate values for the scale independently from the main aggregation.\n data: util.isBoolean(sort)\n ? model.requestDataName(DataSourceType.Main)\n : model.requestDataName(DataSourceType.Raw),\n field: model.vgField(channel),\n sort: sort\n }\n ]);\n }\n else {\n return makeImplicit([\n {\n data: model.requestDataName(DataSourceType.Main),\n field: model.vgField(channel)\n }\n ]);\n }\n}\nfunction normalizeSortField(sort, isStackedMeasure) {\n const { op, field, order } = sort;\n return Object.assign(Object.assign({ \n // Apply default op\n op: op !== null && op !== void 0 ? op : (isStackedMeasure ? 'sum' : DEFAULT_SORT_OP) }, (field ? { field: util.replacePathInField(field) } : {})), (order ? { order } : {}));\n}\nfunction parseSelectionDomain(model, channel) {\n var _a;\n const scale = model.component.scales[channel];\n const spec = model.specifiedScales[channel].domain;\n const bin = (_a = model.fieldDef(channel)) === null || _a === void 0 ? void 0 : _a.bin;\n const domain = isParameterDomain(spec) && spec;\n const extent = isBinParams(bin) && isParameterExtent(bin.extent) && bin.extent;\n if (domain || extent) {\n // As scale parsing occurs before selection parsing, we cannot set\n // domainRaw directly. So instead, we store the selectionExtent on\n // the scale component, and then add domainRaw during scale assembly.\n scale.set('selectionExtent', domain !== null && domain !== void 0 ? domain : extent, true);\n }\n}\nexport function domainSort(model, channel, scaleType) {\n if (!hasDiscreteDomain(scaleType)) {\n return undefined;\n }\n // save to cast as the only exception is the geojson type for shape, which would not generate a scale\n const fieldDef = model.fieldDef(channel);\n const sort = fieldDef.sort;\n // if the sort is specified with array, use the derived sort index field\n if (isSortArray(sort)) {\n return {\n op: 'min',\n field: sortArrayIndexField(fieldDef, channel),\n order: 'ascending'\n };\n }\n const { stack } = model;\n const stackDimensions = stack\n ? [...(stack.groupbyField ? [stack.groupbyField] : []), ...stack.stackBy.map(s => s.fieldDef.field)]\n : undefined;\n // Sorted based on an aggregate calculation over a specified sort field (only for ordinal scale)\n if (isSortField(sort)) {\n const isStackedMeasure = stack && !util.contains(stackDimensions, sort.field);\n return normalizeSortField(sort, isStackedMeasure);\n }\n else if (isSortByEncoding(sort)) {\n const { encoding, order } = sort;\n const fieldDefToSortBy = model.fieldDef(encoding);\n const { aggregate, field } = fieldDefToSortBy;\n const isStackedMeasure = stack && !util.contains(stackDimensions, field);\n if (isArgminDef(aggregate) || isArgmaxDef(aggregate)) {\n return normalizeSortField({\n field: vgField(fieldDefToSortBy),\n order\n }, isStackedMeasure);\n }\n else if (isAggregateOp(aggregate) || !aggregate) {\n return normalizeSortField({\n op: aggregate,\n field,\n order\n }, isStackedMeasure);\n }\n }\n else if (sort === 'descending') {\n return {\n op: 'min',\n field: model.vgField(channel),\n order: 'descending'\n };\n }\n else if (util.contains(['ascending', undefined /* default =ascending*/], sort)) {\n return true;\n }\n // sort == null\n return undefined;\n}\n/**\n * Determine if a scale can use unaggregated domain.\n * @return {Boolean} Returns true if all of the following conditions apply:\n * 1. `scale.domain` is `unaggregated`\n * 2. Aggregation function is not `count` or `sum`\n * 3. The scale is quantitative or time scale.\n */\nexport function canUseUnaggregatedDomain(fieldDef, scaleType) {\n const { aggregate, type } = fieldDef;\n if (!aggregate) {\n return {\n valid: false,\n reason: log.message.unaggregateDomainHasNoEffectForRawField(fieldDef)\n };\n }\n if (isString(aggregate) && !SHARED_DOMAIN_OP_INDEX[aggregate]) {\n return {\n valid: false,\n reason: log.message.unaggregateDomainWithNonSharedDomainOp(aggregate)\n };\n }\n if (type === 'quantitative') {\n if (scaleType === 'log') {\n return {\n valid: false,\n reason: log.message.unaggregatedDomainWithLogScale(fieldDef)\n };\n }\n }\n return { valid: true };\n}\n/**\n * Tie breaker for mergeValuesWithExplicit for domains. We concat the specified values.\n */\nfunction domainsTieBreaker(v1, v2, property, propertyOf) {\n if (v1.explicit && v2.explicit) {\n log.warn(log.message.mergeConflictingDomainProperty(property, propertyOf, v1.value, v2.value));\n }\n // If equal score, concat the domains so that we union them later.\n return { explicit: v1.explicit, value: [...v1.value, ...v2.value] };\n}\n/**\n * Converts an array of domains to a single Vega scale domain.\n */\nexport function mergeDomains(domains) {\n const uniqueDomains = util.unique(domains.map(domain => {\n // ignore sort property when computing the unique domains\n if (isDataRefDomain(domain)) {\n const { sort: _s } = domain, domainWithoutSort = __rest(domain, [\"sort\"]);\n return domainWithoutSort;\n }\n return domain;\n }), util.hash);\n const sorts = util.unique(domains\n .map(d => {\n if (isDataRefDomain(d)) {\n const s = d.sort;\n if (s !== undefined && !util.isBoolean(s)) {\n if ('op' in s && s.op === 'count') {\n // let's make sure that if op is count, we don't use a field\n delete s.field;\n }\n if (s.order === 'ascending') {\n // drop order: ascending as it is the default\n delete s.order;\n }\n }\n return s;\n }\n return undefined;\n })\n .filter(s => s !== undefined), util.hash);\n if (uniqueDomains.length === 0) {\n return undefined;\n }\n else if (uniqueDomains.length === 1) {\n const domain = domains[0];\n if (isDataRefDomain(domain) && sorts.length > 0) {\n let sort = sorts[0];\n if (sorts.length > 1) {\n log.warn(log.message.MORE_THAN_ONE_SORT);\n sort = true;\n }\n else {\n // Simplify domain sort by removing field and op when the field is the same as the domain field.\n if (isObject(sort) && 'field' in sort) {\n const sortField = sort.field;\n if (domain.field === sortField) {\n sort = sort.order ? { order: sort.order } : true;\n }\n }\n }\n return Object.assign(Object.assign({}, domain), { sort });\n }\n return domain;\n }\n // only keep sort properties that work with unioned domains\n const unionDomainSorts = util.unique(sorts.map(s => {\n if (util.isBoolean(s) || !('op' in s) || (isString(s.op) && s.op in UNIONDOMAIN_SORT_OP_INDEX)) {\n return s;\n }\n log.warn(log.message.domainSortDropped(s));\n return true;\n }), util.hash);\n let sort;\n if (unionDomainSorts.length === 1) {\n sort = unionDomainSorts[0];\n }\n else if (unionDomainSorts.length > 1) {\n log.warn(log.message.MORE_THAN_ONE_SORT);\n sort = true;\n }\n const allData = util.unique(domains.map(d => {\n if (isDataRefDomain(d)) {\n return d.data;\n }\n return null;\n }), x => x);\n if (allData.length === 1 && allData[0] !== null) {\n // create a union domain of different fields with a single data source\n const domain = Object.assign({ data: allData[0], fields: uniqueDomains.map(d => d.field) }, (sort ? { sort } : {}));\n return domain;\n }\n return Object.assign({ fields: uniqueDomains }, (sort ? { sort } : {}));\n}\n/**\n * Return a field if a scale uses a single field.\n * Return `undefined` otherwise.\n */\nexport function getFieldFromDomain(domain) {\n if (isDataRefDomain(domain) && isString(domain.field)) {\n return domain.field;\n }\n else if (isDataRefUnionedDomain(domain)) {\n let field;\n for (const nonUnionDomain of domain.fields) {\n if (isDataRefDomain(nonUnionDomain) && isString(nonUnionDomain.field)) {\n if (!field) {\n field = nonUnionDomain.field;\n }\n else if (field !== nonUnionDomain.field) {\n log.warn(log.message.FACETED_INDEPENDENT_DIFFERENT_SOURCES);\n return field;\n }\n }\n }\n log.warn(log.message.FACETED_INDEPENDENT_SAME_FIELDS_DIFFERENT_SOURCES);\n return field;\n }\n else if (isFieldRefUnionDomain(domain)) {\n log.warn(log.message.FACETED_INDEPENDENT_SAME_SOURCE);\n const field = domain.fields[0];\n return isString(field) ? field : undefined;\n }\n return undefined;\n}\nexport function assembleDomain(model, channel) {\n const scaleComponent = model.component.scales[channel];\n const domains = scaleComponent.get('domains').map((domain) => {\n // Correct references to data as the original domain's data was determined\n // in parseScale, which happens before parseData. Thus the original data\n // reference can be incorrect.\n if (isDataRefDomain(domain)) {\n domain.data = model.lookupDataSource(domain.data);\n }\n return domain;\n });\n // domains is an array that has to be merged into a single vega domain\n return mergeDomains(domains);\n}\n//# sourceMappingURL=domain.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isObject } from 'vega-util';\nimport { isXorY } from '../../channel';\nimport { keys } from '../../util';\nimport { isDataRefDomain, isVgRangeStep } from '../../vega.schema';\nimport { isConcatModel, isLayerModel } from '../model';\nimport { assembleSelectionScaleDomain } from '../selection/assemble';\nimport { assembleDomain } from './domain';\nexport function assembleScales(model) {\n if (isLayerModel(model) || isConcatModel(model)) {\n // For concat and layer, include scales of children too\n return model.children.reduce((scales, child) => {\n return scales.concat(assembleScales(child));\n }, assembleScalesForModel(model));\n }\n else {\n // For facet, child scales would not be included in the parent's scope.\n // For unit, there is no child.\n return assembleScalesForModel(model);\n }\n}\nexport function assembleScalesForModel(model) {\n return keys(model.component.scales).reduce((scales, channel) => {\n const scaleComponent = model.component.scales[channel];\n if (scaleComponent.merged) {\n // Skipped merged scales\n return scales;\n }\n const scale = scaleComponent.combine();\n const { name, type, selectionExtent, domains: _d, range: _r, reverse } = scale, otherScaleProps = __rest(scale, [\"name\", \"type\", \"selectionExtent\", \"domains\", \"range\", \"reverse\"]);\n const range = assembleScaleRange(scale.range, name, channel, model);\n const domain = assembleDomain(model, channel);\n const domainRaw = selectionExtent\n ? assembleSelectionScaleDomain(model, selectionExtent, scaleComponent, domain)\n : null;\n scales.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name,\n type }, (domain ? { domain } : {})), (domainRaw ? { domainRaw } : {})), { range }), (reverse !== undefined ? { reverse: reverse } : {})), otherScaleProps));\n return scales;\n }, []);\n}\nexport function assembleScaleRange(scaleRange, scaleName, channel, model) {\n // add signals to x/y range\n if (isXorY(channel)) {\n if (isVgRangeStep(scaleRange)) {\n // For width/height step, use a signal created in layout assemble instead of a constant step.\n return {\n step: { signal: `${scaleName}_step` }\n };\n }\n }\n else if (isObject(scaleRange) && isDataRefDomain(scaleRange)) {\n return Object.assign(Object.assign({}, scaleRange), { data: model.lookupDataSource(scaleRange.data) });\n }\n return scaleRange;\n}\n//# sourceMappingURL=assemble.js.map","import { isArray } from 'vega-util';\nimport { some } from '../../util';\nimport { Split } from '../split';\nexport class ScaleComponent extends Split {\n constructor(name, typeWithExplicit) {\n super({}, // no initial explicit property\n { name } // name as initial implicit property\n );\n this.merged = false;\n this.setWithExplicit('type', typeWithExplicit);\n }\n /**\n * Whether the scale definitely includes zero in the domain\n */\n domainDefinitelyIncludesZero() {\n if (this.get('zero') !== false) {\n return true;\n }\n return some(this.get('domains'), d => isArray(d) && d.length === 2 && d[0] <= 0 && d[1] >= 0);\n }\n}\n//# sourceMappingURL=component.js.map","import { isArray, isNumber, isObject } from 'vega-util';\nimport { isBinning } from '../../bin';\nimport { ANGLE, COLOR, FILL, FILLOPACITY, isXorY, OPACITY, RADIUS, SCALE_CHANNELS, SHAPE, SIZE, STROKE, STROKEDASH, STROKEOPACITY, STROKEWIDTH, THETA, X, Y } from '../../channel';\nimport { getFieldOrDatumDef } from '../../channeldef';\nimport { getViewConfigDiscreteSize, getViewConfigDiscreteStep } from '../../config';\nimport { DataSourceType } from '../../data';\nimport * as log from '../../log';\nimport { channelScalePropertyIncompatability, hasContinuousDomain, hasDiscreteDomain, isContinuousToDiscrete, isExtendedScheme, scaleTypeSupportProperty } from '../../scale';\nimport { isStep } from '../../spec/base';\nimport * as util from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { signalOrStringValue } from '../common';\nimport { getBinSignalName } from '../data/bin';\nimport { SignalRefWrapper } from '../signal';\nimport { makeExplicit, makeImplicit } from '../split';\nexport const RANGE_PROPERTIES = ['range', 'scheme'];\nfunction getSizeChannel(channel) {\n return channel === 'x' ? 'width' : channel === 'y' ? 'height' : undefined;\n}\nexport function parseUnitScaleRange(model) {\n const localScaleComponents = model.component.scales;\n // use SCALE_CHANNELS instead of scales[channel] to ensure that x, y come first!\n for (const channel of SCALE_CHANNELS) {\n const localScaleCmpt = localScaleComponents[channel];\n if (!localScaleCmpt) {\n continue;\n }\n const rangeWithExplicit = parseRangeForChannel(channel, model);\n localScaleCmpt.setWithExplicit('range', rangeWithExplicit);\n }\n}\nfunction getBinStepSignal(model, channel) {\n const fieldDef = model.fieldDef(channel);\n if (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.bin) {\n const { bin, field } = fieldDef;\n const sizeType = getSizeChannel(channel);\n const sizeSignal = model.getName(sizeType);\n if (isObject(bin) && bin.binned && bin.step !== undefined) {\n return new SignalRefWrapper(() => {\n const scaleName = model.scaleName(channel);\n const binCount = `(domain(\"${scaleName}\")[1] - domain(\"${scaleName}\")[0]) / ${bin.step}`;\n return `${model.getSignalName(sizeSignal)} / (${binCount})`;\n });\n }\n else if (isBinning(bin)) {\n const binSignal = getBinSignalName(model, field, bin);\n // TODO: extract this to be range step signal\n return new SignalRefWrapper(() => {\n const updatedName = model.getSignalName(binSignal);\n const binCount = `(${updatedName}.stop - ${updatedName}.start) / ${updatedName}.step`;\n return `${model.getSignalName(sizeSignal)} / (${binCount})`;\n });\n }\n }\n return undefined;\n}\n/**\n * Return mixins that includes one of the Vega range types (explicit range, range.step, range.scheme).\n */\nexport function parseRangeForChannel(channel, model) {\n const specifiedScale = model.specifiedScales[channel];\n const { size } = model;\n const mergedScaleCmpt = model.getScaleComponent(channel);\n const scaleType = mergedScaleCmpt.get('type');\n // Check if any of the range properties is specified.\n // If so, check if it is compatible and make sure that we only output one of the properties\n for (const property of RANGE_PROPERTIES) {\n if (specifiedScale[property] !== undefined) {\n const supportedByScaleType = scaleTypeSupportProperty(scaleType, property);\n const channelIncompatability = channelScalePropertyIncompatability(channel, property);\n if (!supportedByScaleType) {\n log.warn(log.message.scalePropertyNotWorkWithScaleType(scaleType, property, channel));\n }\n else if (channelIncompatability) {\n // channel\n log.warn(channelIncompatability);\n }\n else {\n switch (property) {\n case 'range': {\n const range = specifiedScale.range;\n if (isArray(range)) {\n if (isXorY(channel)) {\n return makeExplicit(range.map(v => {\n if (v === 'width' || v === 'height') {\n // get signal for width/height\n // Just like default range logic below, we use SignalRefWrapper to account for potential merges and renames.\n const sizeSignal = model.getName(v);\n const getSignalName = model.getSignalName.bind(model);\n return SignalRefWrapper.fromName(getSignalName, sizeSignal);\n }\n return v;\n }));\n }\n }\n else if (isObject(range)) {\n return makeExplicit({\n data: model.requestDataName(DataSourceType.Main),\n field: range.field,\n sort: { op: 'min', field: model.vgField(channel) }\n });\n }\n return makeExplicit(range);\n }\n case 'scheme':\n return makeExplicit(parseScheme(specifiedScale[property]));\n }\n }\n }\n }\n if (channel === X || channel === Y) {\n const sizeChannel = channel === X ? 'width' : 'height';\n const sizeValue = size[sizeChannel];\n if (isStep(sizeValue)) {\n if (hasDiscreteDomain(scaleType)) {\n return makeExplicit({ step: sizeValue.step });\n }\n else {\n log.warn(log.message.stepDropped(sizeChannel));\n }\n }\n }\n const { rangeMin, rangeMax } = specifiedScale;\n const d = defaultRange(channel, model);\n if ((rangeMin !== undefined || rangeMax !== undefined) &&\n // it's ok to check just rangeMin's compatibility since rangeMin/rangeMax are the same\n scaleTypeSupportProperty(scaleType, 'rangeMin') &&\n isArray(d) &&\n d.length === 2) {\n return makeExplicit([rangeMin !== null && rangeMin !== void 0 ? rangeMin : d[0], rangeMax !== null && rangeMax !== void 0 ? rangeMax : d[1]]);\n }\n return makeImplicit(d);\n}\nfunction parseScheme(scheme) {\n if (isExtendedScheme(scheme)) {\n return Object.assign({ scheme: scheme.name }, util.omit(scheme, ['name']));\n }\n return { scheme: scheme };\n}\nfunction defaultRange(channel, model) {\n const { size, config, mark, encoding } = model;\n const getSignalName = model.getSignalName.bind(model);\n const { type } = getFieldOrDatumDef(encoding[channel]);\n const mergedScaleCmpt = model.getScaleComponent(channel);\n const scaleType = mergedScaleCmpt.get('type');\n const { domain, domainMid } = model.specifiedScales[channel];\n switch (channel) {\n case X:\n case Y: {\n // If there is no explicit width/height for discrete x/y scales\n if (util.contains(['point', 'band'], scaleType)) {\n if (channel === X && !size.width) {\n const w = getViewConfigDiscreteSize(config.view, 'width');\n if (isStep(w)) {\n return w;\n }\n }\n else if (channel === Y && !size.height) {\n const h = getViewConfigDiscreteSize(config.view, 'height');\n if (isStep(h)) {\n return h;\n }\n }\n }\n // If step is null, use zero to width or height.\n // Note that we use SignalRefWrapper to account for potential merges and renames.\n const sizeType = getSizeChannel(channel);\n const sizeSignal = model.getName(sizeType);\n if (channel === Y && hasContinuousDomain(scaleType)) {\n // For y continuous scale, we have to start from the height as the bottom part has the max value.\n return [SignalRefWrapper.fromName(getSignalName, sizeSignal), 0];\n }\n else {\n return [0, SignalRefWrapper.fromName(getSignalName, sizeSignal)];\n }\n }\n case SIZE: {\n // TODO: support custom rangeMin, rangeMax\n const zero = model.component.scales[channel].get('zero');\n const rangeMin = sizeRangeMin(mark, zero, config);\n const rangeMax = sizeRangeMax(mark, size, model, config);\n if (isContinuousToDiscrete(scaleType)) {\n return interpolateRange(rangeMin, rangeMax, defaultContinuousToDiscreteCount(scaleType, config, domain, channel));\n }\n else {\n return [rangeMin, rangeMax];\n }\n }\n case THETA:\n return [0, Math.PI * 2];\n case ANGLE:\n // TODO: add config.scale.min/maxAngleDegree (for point and text) and config.scale.min/maxAngleRadian (for arc) once we add arc marks.\n // (It's weird to add just config.scale.min/maxAngleDegree for now)\n return [0, 360];\n case RADIUS: {\n // max radius = half od min(width,height)\n return [\n 0,\n new SignalRefWrapper(() => {\n const w = model.getSignalName('width');\n const h = model.getSignalName('height');\n return `min(${w},${h})/2`;\n })\n ];\n }\n case STROKEWIDTH:\n // TODO: support custom rangeMin, rangeMax\n return [config.scale.minStrokeWidth, config.scale.maxStrokeWidth];\n case STROKEDASH:\n return [\n // TODO: add this to Vega's config.range?\n [1, 0],\n [4, 2],\n [2, 1],\n [1, 1],\n [1, 2, 4, 2]\n ];\n case SHAPE:\n return 'symbol';\n case COLOR:\n case FILL:\n case STROKE:\n if (scaleType === 'ordinal') {\n // Only nominal data uses ordinal scale by default\n return type === 'nominal' ? 'category' : 'ordinal';\n }\n else {\n if (domainMid !== undefined) {\n return 'diverging';\n }\n else {\n return mark === 'rect' || mark === 'geoshape' ? 'heatmap' : 'ramp';\n }\n }\n case OPACITY:\n case FILLOPACITY:\n case STROKEOPACITY:\n // TODO: support custom rangeMin, rangeMax\n return [config.scale.minOpacity, config.scale.maxOpacity];\n }\n /* istanbul ignore next: should never reach here */\n throw new Error(`Scale range undefined for channel ${channel}`);\n}\nexport function defaultContinuousToDiscreteCount(scaleType, config, domain, channel) {\n switch (scaleType) {\n case 'quantile':\n return config.scale.quantileCount;\n case 'quantize':\n return config.scale.quantizeCount;\n case 'threshold':\n if (domain !== undefined && isArray(domain)) {\n return domain.length + 1;\n }\n else {\n log.warn(log.message.domainRequiredForThresholdScale(channel));\n // default threshold boundaries for threshold scale since domain has cardinality of 2\n return 3;\n }\n }\n}\n/**\n * Returns the linear interpolation of the range according to the cardinality\n *\n * @param rangeMin start of the range\n * @param rangeMax end of the range\n * @param cardinality number of values in the output range\n */\nexport function interpolateRange(rangeMin, rangeMax, cardinality) {\n // always return a signal since it's better to compute the sequence in Vega later\n const f = () => {\n const rMax = signalOrStringValue(rangeMax);\n const rMin = signalOrStringValue(rangeMin);\n const step = `(${rMax} - ${rMin}) / (${cardinality} - 1)`;\n return `sequence(${rMin}, ${rMax} + ${step}, ${step})`;\n };\n if (isSignalRef(rangeMax)) {\n return new SignalRefWrapper(f);\n }\n else {\n return { signal: f() };\n }\n}\nfunction sizeRangeMin(mark, zero, config) {\n if (zero) {\n if (isSignalRef(zero)) {\n return { signal: `${zero.signal} ? 0 : ${sizeRangeMin(mark, false, config)}` };\n }\n else {\n return 0;\n }\n }\n switch (mark) {\n case 'bar':\n case 'tick':\n return config.scale.minBandSize;\n case 'line':\n case 'trail':\n case 'rule':\n return config.scale.minStrokeWidth;\n case 'text':\n return config.scale.minFontSize;\n case 'point':\n case 'square':\n case 'circle':\n return config.scale.minSize;\n }\n /* istanbul ignore next: should never reach here */\n // sizeRangeMin not implemented for the mark\n throw new Error(log.message.incompatibleChannel('size', mark));\n}\nexport const MAX_SIZE_RANGE_STEP_RATIO = 0.95;\nfunction sizeRangeMax(mark, size, model, config) {\n const xyStepSignals = {\n x: getBinStepSignal(model, 'x'),\n y: getBinStepSignal(model, 'y')\n };\n switch (mark) {\n case 'bar':\n case 'tick': {\n if (config.scale.maxBandSize !== undefined) {\n return config.scale.maxBandSize;\n }\n const min = minXYStep(size, xyStepSignals, config.view);\n if (isNumber(min)) {\n return min - 1;\n }\n else {\n return new SignalRefWrapper(() => `${min.signal} - 1`);\n }\n }\n case 'line':\n case 'trail':\n case 'rule':\n return config.scale.maxStrokeWidth;\n case 'text':\n return config.scale.maxFontSize;\n case 'point':\n case 'square':\n case 'circle': {\n if (config.scale.maxSize) {\n return config.scale.maxSize;\n }\n const pointStep = minXYStep(size, xyStepSignals, config.view);\n if (isNumber(pointStep)) {\n return Math.pow(MAX_SIZE_RANGE_STEP_RATIO * pointStep, 2);\n }\n else {\n return new SignalRefWrapper(() => `pow(${MAX_SIZE_RANGE_STEP_RATIO} * ${pointStep.signal}, 2)`);\n }\n }\n }\n /* istanbul ignore next: should never reach here */\n // sizeRangeMax not implemented for the mark\n throw new Error(log.message.incompatibleChannel('size', mark));\n}\n/**\n * @returns {number} Range step of x or y or minimum between the two if both are ordinal scale.\n */\nfunction minXYStep(size, xyStepSignals, viewConfig) {\n const widthStep = isStep(size.width) ? size.width.step : getViewConfigDiscreteStep(viewConfig, 'width');\n const heightStep = isStep(size.height) ? size.height.step : getViewConfigDiscreteStep(viewConfig, 'height');\n if (xyStepSignals.x || xyStepSignals.y) {\n return new SignalRefWrapper(() => {\n const exprs = [\n xyStepSignals.x ? xyStepSignals.x.signal : widthStep,\n xyStepSignals.y ? xyStepSignals.y.signal : heightStep\n ];\n return `min(${exprs.join(', ')})`;\n });\n }\n return Math.min(widthStep, heightStep);\n}\n//# sourceMappingURL=range.js.map","import { isArray } from 'vega-util';\nimport { isBinned, isBinning, isBinParams } from '../../bin';\nimport { COLOR, FILL, POLAR_POSITION_SCALE_CHANNELS, POSITION_SCALE_CHANNELS, POSITION_SCALE_CHANNEL_INDEX, STROKE } from '../../channel';\nimport { getFieldDef, getFieldOrDatumDef, isFieldDef, valueExpr } from '../../channeldef';\nimport { isDateTime } from '../../datetime';\nimport * as log from '../../log';\nimport { channelScalePropertyIncompatability, hasContinuousDomain, isContinuousToContinuous, isContinuousToDiscrete, ScaleType, scaleTypeSupportProperty } from '../../scale';\nimport * as util from '../../util';\nimport { contains, getFirstDefined, keys } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { getBinSignalName } from '../data/bin';\nimport { isUnitModel } from '../model';\nimport { SignalRefWrapper } from '../signal';\nimport { mergeValuesWithExplicit, tieBreakByComparing } from '../split';\nimport { parseUnitScaleRange } from './range';\nexport function parseScaleProperty(model, property) {\n if (isUnitModel(model)) {\n parseUnitScaleProperty(model, property);\n }\n else {\n parseNonUnitScaleProperty(model, property);\n }\n}\nfunction parseUnitScaleProperty(model, property) {\n const localScaleComponents = model.component.scales;\n const { config, encoding, markDef, specifiedScales } = model;\n for (const channel of keys(localScaleComponents)) {\n const specifiedScale = specifiedScales[channel];\n const localScaleCmpt = localScaleComponents[channel];\n const mergedScaleCmpt = model.getScaleComponent(channel);\n const fieldOrDatumDef = getFieldOrDatumDef(encoding[channel]);\n const specifiedValue = specifiedScale[property];\n const scaleType = mergedScaleCmpt.get('type');\n const scalePadding = mergedScaleCmpt.get('padding');\n const scalePaddingInner = mergedScaleCmpt.get('paddingInner');\n const supportedByScaleType = scaleTypeSupportProperty(scaleType, property);\n const channelIncompatability = channelScalePropertyIncompatability(channel, property);\n if (specifiedValue !== undefined) {\n // If there is a specified value, check if it is compatible with scale type and channel\n if (!supportedByScaleType) {\n log.warn(log.message.scalePropertyNotWorkWithScaleType(scaleType, property, channel));\n }\n else if (channelIncompatability) {\n // channel\n log.warn(channelIncompatability);\n }\n }\n if (supportedByScaleType && channelIncompatability === undefined) {\n if (specifiedValue !== undefined) {\n const timeUnit = fieldOrDatumDef['timeUnit'];\n const type = fieldOrDatumDef.type;\n switch (property) {\n // domainMax/Min to signal if the value is a datetime object\n case 'domainMax':\n case 'domainMin':\n if (isDateTime(specifiedScale[property]) || type === 'temporal' || timeUnit) {\n localScaleCmpt.set(property, { signal: valueExpr(specifiedScale[property], { type, timeUnit }) }, true);\n }\n else {\n localScaleCmpt.set(property, specifiedScale[property], true);\n }\n break;\n default:\n localScaleCmpt.copyKeyFromObject(property, specifiedScale);\n }\n }\n else {\n const value = property in scaleRules\n ? scaleRules[property]({\n model,\n channel,\n fieldOrDatumDef,\n scaleType,\n scalePadding,\n scalePaddingInner,\n domain: specifiedScale.domain,\n markDef,\n config\n })\n : config.scale[property];\n if (value !== undefined) {\n localScaleCmpt.set(property, value, false);\n }\n }\n }\n }\n}\nexport const scaleRules = {\n bins: ({ model, fieldOrDatumDef }) => (isFieldDef(fieldOrDatumDef) ? bins(model, fieldOrDatumDef) : undefined),\n interpolate: ({ channel, fieldOrDatumDef }) => interpolate(channel, fieldOrDatumDef.type),\n nice: ({ scaleType, channel, domain, fieldOrDatumDef }) => nice(scaleType, channel, domain, fieldOrDatumDef),\n padding: ({ channel, scaleType, fieldOrDatumDef, markDef, config }) => padding(channel, scaleType, config.scale, fieldOrDatumDef, markDef, config.bar),\n paddingInner: ({ scalePadding, channel, markDef, config }) => paddingInner(scalePadding, channel, markDef.type, config.scale),\n paddingOuter: ({ scalePadding, channel, scaleType, markDef, scalePaddingInner, config }) => paddingOuter(scalePadding, channel, scaleType, markDef.type, scalePaddingInner, config.scale),\n reverse: ({ fieldOrDatumDef, scaleType, channel, config }) => {\n const sort = isFieldDef(fieldOrDatumDef) ? fieldOrDatumDef.sort : undefined;\n return reverse(scaleType, sort, channel, config.scale);\n },\n zero: ({ channel, fieldOrDatumDef, domain, markDef, scaleType }) => zero(channel, fieldOrDatumDef, domain, markDef, scaleType)\n};\n// This method is here rather than in range.ts to avoid circular dependency.\nexport function parseScaleRange(model) {\n if (isUnitModel(model)) {\n parseUnitScaleRange(model);\n }\n else {\n parseNonUnitScaleProperty(model, 'range');\n }\n}\nexport function parseNonUnitScaleProperty(model, property) {\n const localScaleComponents = model.component.scales;\n for (const child of model.children) {\n if (property === 'range') {\n parseScaleRange(child);\n }\n else {\n parseScaleProperty(child, property);\n }\n }\n for (const channel of keys(localScaleComponents)) {\n let valueWithExplicit;\n for (const child of model.children) {\n const childComponent = child.component.scales[channel];\n if (childComponent) {\n const childValueWithExplicit = childComponent.getWithExplicit(property);\n valueWithExplicit = mergeValuesWithExplicit(valueWithExplicit, childValueWithExplicit, property, 'scale', tieBreakByComparing((v1, v2) => {\n switch (property) {\n case 'range':\n // For step, prefer larger step\n if (v1.step && v2.step) {\n return v1.step - v2.step;\n }\n return 0;\n // TODO: precedence rule for other properties\n }\n return 0;\n }));\n }\n }\n localScaleComponents[channel].setWithExplicit(property, valueWithExplicit);\n }\n}\nexport function bins(model, fieldDef) {\n const bin = fieldDef.bin;\n if (isBinning(bin)) {\n const binSignal = getBinSignalName(model, fieldDef.field, bin);\n return new SignalRefWrapper(() => {\n return model.getSignalName(binSignal);\n });\n }\n else if (isBinned(bin) && isBinParams(bin) && bin.step !== undefined) {\n // start and stop will be determined from the scale domain\n return {\n step: bin.step\n };\n }\n return undefined;\n}\nexport function interpolate(channel, type) {\n if (contains([COLOR, FILL, STROKE], channel) && type !== 'nominal') {\n return 'hcl';\n }\n return undefined;\n}\nexport function nice(scaleType, channel, specifiedDomain, fieldOrDatumDef) {\n var _a;\n if (((_a = getFieldDef(fieldOrDatumDef)) === null || _a === void 0 ? void 0 : _a.bin) ||\n isArray(specifiedDomain) ||\n util.contains([ScaleType.TIME, ScaleType.UTC], scaleType)) {\n return undefined;\n }\n return channel in POSITION_SCALE_CHANNEL_INDEX ? true : undefined;\n}\nexport function padding(channel, scaleType, scaleConfig, fieldOrDatumDef, markDef, barConfig) {\n if (channel in POSITION_SCALE_CHANNEL_INDEX) {\n if (isContinuousToContinuous(scaleType)) {\n if (scaleConfig.continuousPadding !== undefined) {\n return scaleConfig.continuousPadding;\n }\n const { type, orient } = markDef;\n if (type === 'bar' && !(isFieldDef(fieldOrDatumDef) && (fieldOrDatumDef.bin || fieldOrDatumDef.timeUnit))) {\n if ((orient === 'vertical' && channel === 'x') || (orient === 'horizontal' && channel === 'y')) {\n return barConfig.continuousBandSize;\n }\n }\n }\n if (scaleType === ScaleType.POINT) {\n return scaleConfig.pointPadding;\n }\n }\n return undefined;\n}\nexport function paddingInner(paddingValue, channel, mark, scaleConfig) {\n if (paddingValue !== undefined) {\n // If user has already manually specified \"padding\", no need to add default paddingInner.\n return undefined;\n }\n if (channel in POSITION_SCALE_CHANNEL_INDEX) {\n // Padding is only set for X and Y by default.\n // Basically it doesn't make sense to add padding for color and size.\n // paddingOuter would only be called if it's a band scale, just return the default for bandScale.\n const { bandPaddingInner, barBandPaddingInner, rectBandPaddingInner } = scaleConfig;\n return getFirstDefined(bandPaddingInner, mark === 'bar' ? barBandPaddingInner : rectBandPaddingInner);\n }\n return undefined;\n}\nexport function paddingOuter(paddingValue, channel, scaleType, mark, paddingInnerValue, scaleConfig) {\n if (paddingValue !== undefined) {\n // If user has already manually specified \"padding\", no need to add default paddingOuter.\n return undefined;\n }\n if (channel in POSITION_SCALE_CHANNEL_INDEX) {\n // Padding is only set for X and Y by default.\n // Basically it doesn't make sense to add padding for color and size.\n if (scaleType === ScaleType.BAND) {\n const { bandPaddingOuter } = scaleConfig;\n return getFirstDefined(bandPaddingOuter, \n /* By default, paddingOuter is paddingInner / 2. The reason is that\n size (width/height) = step * (cardinality - paddingInner + 2 * paddingOuter).\n and we want the width/height to be integer by default.\n Note that step (by default) and cardinality are integers.) */\n isSignalRef(paddingInnerValue) ? { signal: `${paddingInnerValue.signal}/2` } : paddingInnerValue / 2);\n }\n }\n return undefined;\n}\nexport function reverse(scaleType, sort, channel, scaleConfig) {\n if (channel === 'x' && scaleConfig.xReverse !== undefined) {\n if (hasContinuousDomain(scaleType) && sort === 'descending') {\n if (isSignalRef(scaleConfig.xReverse)) {\n return { signal: `!${scaleConfig.xReverse.signal}` };\n }\n else {\n return !scaleConfig.xReverse;\n }\n }\n return scaleConfig.xReverse;\n }\n if (hasContinuousDomain(scaleType) && sort === 'descending') {\n // For continuous domain scales, Vega does not support domain sort.\n // Thus, we reverse range instead if sort is descending\n return true;\n }\n return undefined;\n}\nexport function zero(channel, fieldDef, specifiedDomain, markDef, scaleType) {\n // If users explicitly provide a domain, we should not augment zero as that will be unexpected.\n const hasCustomDomain = !!specifiedDomain && specifiedDomain !== 'unaggregated';\n if (hasCustomDomain) {\n if (hasContinuousDomain(scaleType)) {\n if (isArray(specifiedDomain)) {\n const first = specifiedDomain[0];\n const last = specifiedDomain[specifiedDomain.length - 1];\n if (first <= 0 && last >= 0) {\n // if the domain includes zero, make zero remains true\n return true;\n }\n }\n return false;\n }\n }\n // If there is no custom domain, return true only for the following cases:\n // 1) using quantitative field with size\n // While this can be either ratio or interval fields, our assumption is that\n // ratio are more common. However, if the scaleType is discretizing scale, we want to return\n // false so that range doesn't start at zero\n if (channel === 'size' && fieldDef.type === 'quantitative' && !isContinuousToDiscrete(scaleType)) {\n return true;\n }\n // 2) non-binned, quantitative x-scale or y-scale\n // (For binning, we should not include zero by default because binning are calculated without zero.)\n if (!(isFieldDef(fieldDef) && fieldDef.bin) &&\n util.contains([...POSITION_SCALE_CHANNELS, ...POLAR_POSITION_SCALE_CHANNELS], channel)) {\n const { orient, type } = markDef;\n if (contains(['bar', 'area', 'line', 'trail'], type)) {\n if ((orient === 'horizontal' && channel === 'y') || (orient === 'vertical' && channel === 'x')) {\n return false;\n }\n }\n return true;\n }\n return false;\n}\n//# sourceMappingURL=properties.js.map","import { isBinning } from '../../bin';\nimport { getSizeChannel, isColorChannel, isScaleChannel, rangeType } from '../../channel';\nimport { isFieldDef, isPositionFieldOrDatumDef } from '../../channeldef';\nimport * as log from '../../log';\nimport { isRelativeBandSize } from '../../mark';\nimport { channelSupportScaleType, scaleTypeSupportDataType } from '../../scale';\nimport { normalizeTimeUnit } from '../../timeunit';\nimport * as util from '../../util';\nimport { POLAR_POSITION_SCALE_CHANNEL_INDEX, POSITION_SCALE_CHANNEL_INDEX } from './../../channel';\n/**\n * Determine if there is a specified scale type and if it is appropriate,\n * or determine default type if type is unspecified or inappropriate.\n */\n// NOTE: CompassQL uses this method.\nexport function scaleType(specifiedScale, channel, fieldDef, mark) {\n const defaultScaleType = defaultType(channel, fieldDef, mark);\n const { type } = specifiedScale;\n if (!isScaleChannel(channel)) {\n // There is no scale for these channels\n return null;\n }\n if (type !== undefined) {\n // Check if explicitly specified scale type is supported by the channel\n if (!channelSupportScaleType(channel, type)) {\n log.warn(log.message.scaleTypeNotWorkWithChannel(channel, type, defaultScaleType));\n return defaultScaleType;\n }\n // Check if explicitly specified scale type is supported by the data type\n if (isFieldDef(fieldDef) && !scaleTypeSupportDataType(type, fieldDef.type)) {\n log.warn(log.message.scaleTypeNotWorkWithFieldDef(type, defaultScaleType));\n return defaultScaleType;\n }\n return type;\n }\n return defaultScaleType;\n}\n/**\n * Determine appropriate default scale type.\n */\n// NOTE: Voyager uses this method.\nfunction defaultType(channel, fieldDef, mark) {\n var _a;\n switch (fieldDef.type) {\n case 'nominal':\n case 'ordinal': {\n if (isColorChannel(channel) || rangeType(channel) === 'discrete') {\n if (channel === 'shape' && fieldDef.type === 'ordinal') {\n log.warn(log.message.discreteChannelCannotEncode(channel, 'ordinal'));\n }\n return 'ordinal';\n }\n if (channel in POSITION_SCALE_CHANNEL_INDEX) {\n if (util.contains(['rect', 'bar', 'image', 'rule'], mark.type)) {\n // The rect/bar mark should fit into a band.\n // For rule, using band scale to make rule align with axis ticks better https://github.com/vega/vega-lite/issues/3429\n return 'band';\n }\n }\n else if (mark.type === 'arc' && channel in POLAR_POSITION_SCALE_CHANNEL_INDEX) {\n return 'band';\n }\n const dimensionSize = mark[getSizeChannel(channel)];\n if (isRelativeBandSize(dimensionSize)) {\n return 'band';\n }\n if (isPositionFieldOrDatumDef(fieldDef) && ((_a = fieldDef.axis) === null || _a === void 0 ? void 0 : _a.tickBand)) {\n return 'band';\n }\n // Otherwise, use ordinal point scale so we can easily get center positions of the marks.\n return 'point';\n }\n case 'temporal':\n if (isColorChannel(channel)) {\n return 'time';\n }\n else if (rangeType(channel) === 'discrete') {\n log.warn(log.message.discreteChannelCannotEncode(channel, 'temporal'));\n // TODO: consider using quantize (equivalent to binning) once we have it\n return 'ordinal';\n }\n else if (isFieldDef(fieldDef) && fieldDef.timeUnit && normalizeTimeUnit(fieldDef.timeUnit).utc) {\n return 'utc';\n }\n return 'time';\n case 'quantitative':\n if (isColorChannel(channel)) {\n if (isFieldDef(fieldDef) && isBinning(fieldDef.bin)) {\n return 'bin-ordinal';\n }\n return 'linear';\n }\n else if (rangeType(channel) === 'discrete') {\n log.warn(log.message.discreteChannelCannotEncode(channel, 'quantitative'));\n // TODO: consider using quantize (equivalent to binning) once we have it\n return 'ordinal';\n }\n return 'linear';\n case 'geojson':\n return undefined;\n }\n /* istanbul ignore next: should never reach this */\n throw new Error(log.message.invalidFieldType(fieldDef.type));\n}\n//# sourceMappingURL=type.js.map","import { SCALE_CHANNELS, SHAPE } from '../../channel';\nimport { getFieldOrDatumDef } from '../../channeldef';\nimport { GEOSHAPE } from '../../mark';\nimport { NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES, scaleCompatible, scaleTypePrecedence } from '../../scale';\nimport { GEOJSON } from '../../type';\nimport { keys } from '../../util';\nimport { isUnitModel } from '../model';\nimport { defaultScaleResolve } from '../resolve';\nimport { mergeValuesWithExplicit, tieBreakByComparing } from '../split';\nimport { ScaleComponent } from './component';\nimport { parseScaleDomain } from './domain';\nimport { parseScaleProperty, parseScaleRange } from './properties';\nimport { scaleType } from './type';\nexport function parseScales(model, { ignoreRange } = {}) {\n parseScaleCore(model);\n parseScaleDomain(model);\n for (const prop of NON_TYPE_DOMAIN_RANGE_VEGA_SCALE_PROPERTIES) {\n parseScaleProperty(model, prop);\n }\n if (!ignoreRange) {\n // range depends on zero\n parseScaleRange(model);\n }\n}\nexport function parseScaleCore(model) {\n if (isUnitModel(model)) {\n model.component.scales = parseUnitScaleCore(model);\n }\n else {\n model.component.scales = parseNonUnitScaleCore(model);\n }\n}\n/**\n * Parse scales for all channels of a model.\n */\nfunction parseUnitScaleCore(model) {\n const { encoding, mark, markDef } = model;\n return SCALE_CHANNELS.reduce((scaleComponents, channel) => {\n const fieldOrDatumDef = getFieldOrDatumDef(encoding[channel]); // must be typed def to have scale\n // Don't generate scale for shape of geoshape\n if (fieldOrDatumDef && mark === GEOSHAPE && channel === SHAPE && fieldOrDatumDef.type === GEOJSON) {\n return scaleComponents;\n }\n let specifiedScale = fieldOrDatumDef && fieldOrDatumDef['scale'];\n if (fieldOrDatumDef && specifiedScale !== null && specifiedScale !== false) {\n specifiedScale !== null && specifiedScale !== void 0 ? specifiedScale : (specifiedScale = {});\n const sType = scaleType(specifiedScale, channel, fieldOrDatumDef, markDef);\n scaleComponents[channel] = new ScaleComponent(model.scaleName(`${channel}`, true), {\n value: sType,\n explicit: specifiedScale.type === sType\n });\n }\n return scaleComponents;\n }, {});\n}\nconst scaleTypeTieBreaker = tieBreakByComparing((st1, st2) => scaleTypePrecedence(st1) - scaleTypePrecedence(st2));\nfunction parseNonUnitScaleCore(model) {\n var _a;\n var _b;\n const scaleComponents = (model.component.scales = {});\n const scaleTypeWithExplicitIndex = {};\n const resolve = model.component.resolve;\n // Parse each child scale and determine if a particular channel can be merged.\n for (const child of model.children) {\n parseScaleCore(child);\n // Instead of always merging right away -- check if it is compatible to merge first!\n for (const channel of keys(child.component.scales)) {\n // if resolve is undefined, set default first\n (_a = (_b = resolve.scale)[channel]) !== null && _a !== void 0 ? _a : (_b[channel] = defaultScaleResolve(channel, model));\n if (resolve.scale[channel] === 'shared') {\n const explicitScaleType = scaleTypeWithExplicitIndex[channel];\n const childScaleType = child.component.scales[channel].getWithExplicit('type');\n if (explicitScaleType) {\n if (scaleCompatible(explicitScaleType.value, childScaleType.value)) {\n // merge scale component if type are compatible\n scaleTypeWithExplicitIndex[channel] = mergeValuesWithExplicit(explicitScaleType, childScaleType, 'type', 'scale', scaleTypeTieBreaker);\n }\n else {\n // Otherwise, update conflicting channel to be independent\n resolve.scale[channel] = 'independent';\n // Remove from the index so they don't get merged\n delete scaleTypeWithExplicitIndex[channel];\n }\n }\n else {\n scaleTypeWithExplicitIndex[channel] = childScaleType;\n }\n }\n }\n }\n // Merge each channel listed in the index\n for (const channel of keys(scaleTypeWithExplicitIndex)) {\n // Create new merged scale component\n const name = model.scaleName(channel, true);\n const typeWithExplicit = scaleTypeWithExplicitIndex[channel];\n scaleComponents[channel] = new ScaleComponent(name, typeWithExplicit);\n // rename each child and mark them as merged\n for (const child of model.children) {\n const childScale = child.component.scales[channel];\n if (childScale) {\n child.renameScale(childScale.get('name'), name);\n childScale.merged = true;\n }\n }\n }\n return scaleComponents;\n}\n//# sourceMappingURL=parse.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { FACET_CHANNELS, getPositionScaleChannel, isChannel, isScaleChannel } from '../channel';\nimport { getFieldDef, vgField } from '../channeldef';\nimport { DataSourceType } from '../data';\nimport { forEach, reduce } from '../encoding';\nimport { replaceExprRef } from '../expr';\nimport * as log from '../log';\nimport { hasDiscreteDomain } from '../scale';\nimport { isFacetSpec } from '../spec';\nimport { extractCompositionLayout } from '../spec/base';\nimport { extractTitleConfig, isText } from '../title';\nimport { normalizeTransform } from '../transform';\nimport { contains, duplicate, isEmpty, keys, varName } from '../util';\nimport { isVgRangeStep } from '../vega.schema';\nimport { assembleAxes } from './axis/assemble';\nimport { signalOrValueRef } from './common';\nimport { assembleHeaderGroups, assembleLayoutTitleBand, assembleTitleGroup } from './header/assemble';\nimport { HEADER_CHANNELS } from './header/component';\nimport { sizeExpr } from './layoutsize/assemble';\nimport { getSizeTypeFromLayoutSizeType } from './layoutsize/component';\nimport { assembleLegends } from './legend/assemble';\nimport { parseLegend } from './legend/parse';\nimport { assembleProjections } from './projection/assemble';\nimport { parseProjection } from './projection/parse';\nimport { assembleScales } from './scale/assemble';\nimport { assembleDomain, getFieldFromDomain } from './scale/domain';\nimport { parseScales } from './scale/parse';\nimport { Split } from './split';\nexport class NameMap {\n constructor() {\n this.nameMap = {};\n }\n rename(oldName, newName) {\n this.nameMap[oldName] = newName;\n }\n has(name) {\n return this.nameMap[name] !== undefined;\n }\n get(name) {\n // If the name appears in the _nameMap, we need to read its new name.\n // We have to loop over the dict just in case the new name also gets renamed.\n while (this.nameMap[name] && name !== this.nameMap[name]) {\n name = this.nameMap[name];\n }\n return name;\n }\n}\n/*\n We use type guards instead of `instanceof` as `instanceof` makes\n different parts of the compiler depend on the actual implementation of\n the model classes, which in turn depend on different parts of the compiler.\n Thus, `instanceof` leads to circular dependency problems.\n\n On the other hand, type guards only make different parts of the compiler\n depend on the type of the model classes, but not the actual implementation.\n*/\nexport function isUnitModel(model) {\n return (model === null || model === void 0 ? void 0 : model.type) === 'unit';\n}\nexport function isFacetModel(model) {\n return (model === null || model === void 0 ? void 0 : model.type) === 'facet';\n}\nexport function isConcatModel(model) {\n return (model === null || model === void 0 ? void 0 : model.type) === 'concat';\n}\nexport function isLayerModel(model) {\n return (model === null || model === void 0 ? void 0 : model.type) === 'layer';\n}\nexport class Model {\n constructor(spec, type, parent, parentGivenName, config, resolve, view) {\n var _a, _b;\n this.type = type;\n this.parent = parent;\n this.config = config;\n /**\n * Corrects the data references in marks after assemble.\n */\n this.correctDataNames = (mark) => {\n // TODO: make this correct\n var _a, _b, _c;\n // for normal data references\n if ((_a = mark.from) === null || _a === void 0 ? void 0 : _a.data) {\n mark.from.data = this.lookupDataSource(mark.from.data);\n }\n // for access to facet data\n if ((_c = (_b = mark.from) === null || _b === void 0 ? void 0 : _b.facet) === null || _c === void 0 ? void 0 : _c.data) {\n mark.from.facet.data = this.lookupDataSource(mark.from.facet.data);\n }\n return mark;\n };\n this.parent = parent;\n this.config = config;\n this.view = replaceExprRef(view);\n // If name is not provided, always use parent's givenName to avoid name conflicts.\n this.name = (_a = spec.name) !== null && _a !== void 0 ? _a : parentGivenName;\n this.title = isText(spec.title) ? { text: spec.title } : spec.title ? replaceExprRef(spec.title) : undefined;\n // Shared name maps\n this.scaleNameMap = parent ? parent.scaleNameMap : new NameMap();\n this.projectionNameMap = parent ? parent.projectionNameMap : new NameMap();\n this.signalNameMap = parent ? parent.signalNameMap : new NameMap();\n this.data = spec.data;\n this.description = spec.description;\n this.transforms = normalizeTransform((_b = spec.transform) !== null && _b !== void 0 ? _b : []);\n this.layout = type === 'layer' || type === 'unit' ? {} : extractCompositionLayout(spec, type, config);\n this.component = {\n data: {\n sources: parent ? parent.component.data.sources : [],\n outputNodes: parent ? parent.component.data.outputNodes : {},\n outputNodeRefCounts: parent ? parent.component.data.outputNodeRefCounts : {},\n // data is faceted if the spec is a facet spec or the parent has faceted data and data is undefined\n isFaceted: isFacetSpec(spec) || (parent && parent.component.data.isFaceted && spec.data === undefined)\n },\n layoutSize: new Split(),\n layoutHeaders: { row: {}, column: {}, facet: {} },\n mark: null,\n resolve: Object.assign({ scale: {}, axis: {}, legend: {} }, (resolve ? duplicate(resolve) : {})),\n selection: null,\n scales: null,\n projection: null,\n axes: {},\n legends: {}\n };\n }\n get width() {\n return this.getSizeSignalRef('width');\n }\n get height() {\n return this.getSizeSignalRef('height');\n }\n parse() {\n this.parseScale();\n this.parseLayoutSize(); // depends on scale\n this.renameTopLevelLayoutSizeSignal();\n this.parseSelections();\n this.parseProjection();\n this.parseData(); // (pathorder) depends on markDef; selection filters depend on parsed selections; depends on projection because some transforms require the finalized projection name.\n this.parseAxesAndHeaders(); // depends on scale and layout size\n this.parseLegends(); // depends on scale, markDef\n this.parseMarkGroup(); // depends on data name, scale, layout size, axisGroup, and children's scale, axis, legend and mark.\n }\n parseScale() {\n parseScales(this);\n }\n parseProjection() {\n parseProjection(this);\n }\n /**\n * Rename top-level spec's size to be just width / height, ignoring model name.\n * This essentially merges the top-level spec's width/height signals with the width/height signals\n * to help us reduce redundant signals declaration.\n */\n renameTopLevelLayoutSizeSignal() {\n if (this.getName('width') !== 'width') {\n this.renameSignal(this.getName('width'), 'width');\n }\n if (this.getName('height') !== 'height') {\n this.renameSignal(this.getName('height'), 'height');\n }\n }\n parseLegends() {\n parseLegend(this);\n }\n assembleEncodeFromView(view) {\n // Exclude \"style\"\n const { style: _ } = view, baseView = __rest(view, [\"style\"]);\n const e = {};\n for (const property of keys(baseView)) {\n const value = baseView[property];\n if (value !== undefined) {\n e[property] = signalOrValueRef(value);\n }\n }\n return e;\n }\n assembleGroupEncodeEntry(isTopLevel) {\n let encodeEntry = {};\n if (this.view) {\n encodeEntry = this.assembleEncodeFromView(this.view);\n }\n if (!isTopLevel) {\n // Descriptions are already added to the top-level description so we only need to add them to the inner views.\n if (this.description) {\n encodeEntry['description'] = signalOrValueRef(this.description);\n }\n // For top-level spec, we can set the global width and height signal to adjust the group size.\n // For other child specs, we have to manually set width and height in the encode entry.\n if (this.type === 'unit' || this.type === 'layer') {\n return Object.assign({ width: this.getSizeSignalRef('width'), height: this.getSizeSignalRef('height') }, (encodeEntry !== null && encodeEntry !== void 0 ? encodeEntry : {}));\n }\n }\n return isEmpty(encodeEntry) ? undefined : encodeEntry;\n }\n assembleLayout() {\n if (!this.layout) {\n return undefined;\n }\n const _a = this.layout, { spacing } = _a, layout = __rest(_a, [\"spacing\"]);\n const { component, config } = this;\n const titleBand = assembleLayoutTitleBand(component.layoutHeaders, config);\n return Object.assign(Object.assign(Object.assign({ padding: spacing }, this.assembleDefaultLayout()), layout), (titleBand ? { titleBand } : {}));\n }\n assembleDefaultLayout() {\n return {};\n }\n assembleHeaderMarks() {\n const { layoutHeaders } = this.component;\n let headerMarks = [];\n for (const channel of FACET_CHANNELS) {\n if (layoutHeaders[channel].title) {\n headerMarks.push(assembleTitleGroup(this, channel));\n }\n }\n for (const channel of HEADER_CHANNELS) {\n headerMarks = headerMarks.concat(assembleHeaderGroups(this, channel));\n }\n return headerMarks;\n }\n assembleAxes() {\n return assembleAxes(this.component.axes, this.config);\n }\n assembleLegends() {\n return assembleLegends(this);\n }\n assembleProjections() {\n return assembleProjections(this);\n }\n assembleTitle() {\n var _a, _b, _c;\n const _d = (_a = this.title) !== null && _a !== void 0 ? _a : {}, { encoding } = _d, titleNoEncoding = __rest(_d, [\"encoding\"]);\n const title = Object.assign(Object.assign(Object.assign({}, extractTitleConfig(this.config.title).nonMarkTitleProperties), titleNoEncoding), (encoding ? { encode: { update: encoding } } : {}));\n if (title.text) {\n if (contains(['unit', 'layer'], this.type)) {\n // Unit/Layer\n if (contains(['middle', undefined], title.anchor)) {\n (_b = title.frame) !== null && _b !== void 0 ? _b : (title.frame = 'group');\n }\n }\n else {\n // composition with Vega layout\n // Set title = \"start\" by default for composition as \"middle\" does not look nice\n // https://github.com/vega/vega/issues/960#issuecomment-471360328\n (_c = title.anchor) !== null && _c !== void 0 ? _c : (title.anchor = 'start');\n }\n return isEmpty(title) ? undefined : title;\n }\n return undefined;\n }\n /**\n * Assemble the mark group for this model. We accept optional `signals` so that we can include concat top-level signals with the top-level model's local signals.\n */\n assembleGroup(signals = []) {\n const group = {};\n signals = signals.concat(this.assembleSignals());\n if (signals.length > 0) {\n group.signals = signals;\n }\n const layout = this.assembleLayout();\n if (layout) {\n group.layout = layout;\n }\n group.marks = [].concat(this.assembleHeaderMarks(), this.assembleMarks());\n // Only include scales if this spec is top-level or if parent is facet.\n // (Otherwise, it will be merged with upper-level's scope.)\n const scales = !this.parent || isFacetModel(this.parent) ? assembleScales(this) : [];\n if (scales.length > 0) {\n group.scales = scales;\n }\n const axes = this.assembleAxes();\n if (axes.length > 0) {\n group.axes = axes;\n }\n const legends = this.assembleLegends();\n if (legends.length > 0) {\n group.legends = legends;\n }\n return group;\n }\n getName(text) {\n return varName((this.name ? `${this.name}_` : '') + text);\n }\n getDataName(type) {\n return this.getName(DataSourceType[type].toLowerCase());\n }\n /**\n * Request a data source name for the given data source type and mark that data source as required.\n * This method should be called in parse, so that all used data source can be correctly instantiated in assembleData().\n * You can lookup the correct dataset name in assemble with `lookupDataSource`.\n */\n requestDataName(name) {\n const fullName = this.getDataName(name);\n // Increase ref count. This is critical because otherwise we won't create a data source.\n // We also increase the ref counts on OutputNode.getSource() calls.\n const refCounts = this.component.data.outputNodeRefCounts;\n refCounts[fullName] = (refCounts[fullName] || 0) + 1;\n return fullName;\n }\n getSizeSignalRef(layoutSizeType) {\n if (isFacetModel(this.parent)) {\n const sizeType = getSizeTypeFromLayoutSizeType(layoutSizeType);\n const channel = getPositionScaleChannel(sizeType);\n const scaleComponent = this.component.scales[channel];\n if (scaleComponent && !scaleComponent.merged) {\n // independent scale\n const type = scaleComponent.get('type');\n const range = scaleComponent.get('range');\n if (hasDiscreteDomain(type) && isVgRangeStep(range)) {\n const scaleName = scaleComponent.get('name');\n const domain = assembleDomain(this, channel);\n const field = getFieldFromDomain(domain);\n if (field) {\n const fieldRef = vgField({ aggregate: 'distinct', field }, { expr: 'datum' });\n return {\n signal: sizeExpr(scaleName, scaleComponent, fieldRef)\n };\n }\n else {\n log.warn(log.message.unknownField(channel));\n return null;\n }\n }\n }\n }\n return {\n signal: this.signalNameMap.get(this.getName(layoutSizeType))\n };\n }\n /**\n * Lookup the name of the datasource for an output node. You probably want to call this in assemble.\n */\n lookupDataSource(name) {\n const node = this.component.data.outputNodes[name];\n if (!node) {\n // Name not found in map so let's just return what we got.\n // This can happen if we already have the correct name.\n return name;\n }\n return node.getSource();\n }\n getSignalName(oldSignalName) {\n return this.signalNameMap.get(oldSignalName);\n }\n renameSignal(oldName, newName) {\n this.signalNameMap.rename(oldName, newName);\n }\n renameScale(oldName, newName) {\n this.scaleNameMap.rename(oldName, newName);\n }\n renameProjection(oldName, newName) {\n this.projectionNameMap.rename(oldName, newName);\n }\n /**\n * @return scale name for a given channel after the scale has been parsed and named.\n */\n scaleName(originalScaleName, parse) {\n if (parse) {\n // During the parse phase always return a value\n // No need to refer to rename map because a scale can't be renamed\n // before it has the original name.\n return this.getName(originalScaleName);\n }\n // If there is a scale for the channel, it should either\n // be in the scale component or exist in the name map\n if (\n // If there is a scale for the channel, there should be a local scale component for it\n (isChannel(originalScaleName) && isScaleChannel(originalScaleName) && this.component.scales[originalScaleName]) ||\n // in the scale name map (the scale get merged by its parent)\n this.scaleNameMap.has(this.getName(originalScaleName))) {\n return this.scaleNameMap.get(this.getName(originalScaleName));\n }\n return undefined;\n }\n /**\n * @return projection name after the projection has been parsed and named.\n */\n projectionName(parse) {\n if (parse) {\n // During the parse phase always return a value\n // No need to refer to rename map because a projection can't be renamed\n // before it has the original name.\n return this.getName('projection');\n }\n if ((this.component.projection && !this.component.projection.merged) ||\n this.projectionNameMap.has(this.getName('projection'))) {\n return this.projectionNameMap.get(this.getName('projection'));\n }\n return undefined;\n }\n /**\n * Traverse a model's hierarchy to get the scale component for a particular channel.\n */\n getScaleComponent(channel) {\n /* istanbul ignore next: This is warning for debugging test */\n if (!this.component.scales) {\n throw new Error('getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().');\n }\n const localScaleComponent = this.component.scales[channel];\n if (localScaleComponent && !localScaleComponent.merged) {\n return localScaleComponent;\n }\n return this.parent ? this.parent.getScaleComponent(channel) : undefined;\n }\n /**\n * Traverse a model's hierarchy to get a particular selection component.\n */\n getSelectionComponent(variableName, origName) {\n let sel = this.component.selection[variableName];\n if (!sel && this.parent) {\n sel = this.parent.getSelectionComponent(variableName, origName);\n }\n if (!sel) {\n throw new Error(log.message.selectionNotFound(origName));\n }\n return sel;\n }\n /**\n * Returns true if the model has a signalRef for an axis orient.\n */\n hasAxisOrientSignalRef() {\n var _a, _b;\n return (((_a = this.component.axes.x) === null || _a === void 0 ? void 0 : _a.some(a => a.hasOrientSignalRef())) ||\n ((_b = this.component.axes.y) === null || _b === void 0 ? void 0 : _b.some(a => a.hasOrientSignalRef())));\n }\n}\n/** Abstract class for UnitModel and FacetModel. Both of which can contain fieldDefs as a part of its own specification. */\nexport class ModelWithField extends Model {\n /** Get \"field\" reference for Vega */\n vgField(channel, opt = {}) {\n const fieldDef = this.fieldDef(channel);\n if (!fieldDef) {\n return undefined;\n }\n return vgField(fieldDef, opt);\n }\n reduceFieldDef(f, init) {\n return reduce(this.getMapping(), (acc, cd, c) => {\n const fieldDef = getFieldDef(cd);\n if (fieldDef) {\n return f(acc, fieldDef, c);\n }\n return acc;\n }, init);\n }\n forEachFieldDef(f, t) {\n forEach(this.getMapping(), (cd, c) => {\n const fieldDef = getFieldDef(cd);\n if (fieldDef) {\n f(fieldDef, c);\n }\n }, t);\n }\n}\n//# sourceMappingURL=model.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for density transform nodes\n */\nexport class DensityTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n var _a, _b, _c;\n super(parent);\n this.transform = transform;\n this.transform = duplicate(transform); // duplicate to prevent side effects\n const specifiedAs = (_a = this.transform.as) !== null && _a !== void 0 ? _a : [undefined, undefined];\n this.transform.as = [(_b = specifiedAs[0]) !== null && _b !== void 0 ? _b : 'value', (_c = specifiedAs[1]) !== null && _c !== void 0 ? _c : 'density'];\n }\n clone() {\n return new DensityTransformNode(null, duplicate(this.transform));\n }\n dependentFields() {\n var _a;\n return new Set([this.transform.density, ...((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : [])]);\n }\n producedFields() {\n return new Set(this.transform.as);\n }\n hash() {\n return `DensityTransform ${hash(this.transform)}`;\n }\n assemble() {\n const _a = this.transform, { density } = _a, rest = __rest(_a, [\"density\"]);\n const result = Object.assign({ type: 'kde', field: density }, rest);\n return result;\n }\n}\n//# sourceMappingURL=density.js.map","import { isScaleChannel } from '../../channel';\nimport { vgField as fieldRef } from '../../channeldef';\nimport { isPathMark } from '../../mark';\nimport { hasContinuousDomain } from '../../scale';\nimport { hash, keys } from '../../util';\nimport { getMarkPropOrConfig } from '../common';\nimport { DataFlowNode } from './dataflow';\nexport class FilterInvalidNode extends DataFlowNode {\n constructor(parent, filter) {\n super(parent);\n this.filter = filter;\n }\n clone() {\n return new FilterInvalidNode(null, Object.assign({}, this.filter));\n }\n static make(parent, model) {\n const { config, mark, markDef } = model;\n const invalid = getMarkPropOrConfig('invalid', markDef, config);\n if (invalid !== 'filter') {\n return null;\n }\n const filter = model.reduceFieldDef((aggregator, fieldDef, channel) => {\n const scaleComponent = isScaleChannel(channel) && model.getScaleComponent(channel);\n if (scaleComponent) {\n const scaleType = scaleComponent.get('type');\n // While discrete domain scales can handle invalid values, continuous scales can't.\n // Thus, for non-path marks, we have to filter null for scales with continuous domains.\n // (For path marks, we will use \"defined\" property and skip these values instead.)\n if (hasContinuousDomain(scaleType) && fieldDef.aggregate !== 'count' && !isPathMark(mark)) {\n aggregator[fieldDef.field] = fieldDef; // we know that the fieldDef is a typed field def\n }\n }\n return aggregator;\n }, {});\n if (!keys(filter).length) {\n return null;\n }\n return new FilterInvalidNode(parent, filter);\n }\n dependentFields() {\n return new Set(keys(this.filter));\n }\n producedFields() {\n return new Set(); // filter does not produce any new fields\n }\n hash() {\n return `FilterInvalid ${hash(this.filter)}`;\n }\n /**\n * Create the VgTransforms for each of the filtered fields.\n */\n assemble() {\n const filters = keys(this.filter).reduce((vegaFilters, field) => {\n const fieldDef = this.filter[field];\n const ref = fieldRef(fieldDef, { expr: 'datum' });\n if (fieldDef !== null) {\n if (fieldDef.type === 'temporal') {\n vegaFilters.push(`(isDate(${ref}) || (isValid(${ref}) && isFinite(+${ref})))`);\n }\n else if (fieldDef.type === 'quantitative') {\n vegaFilters.push(`isValid(${ref})`);\n vegaFilters.push(`isFinite(+${ref})`);\n }\n else {\n // should never get here\n }\n }\n return vegaFilters;\n }, []);\n return filters.length > 0\n ? {\n type: 'filter',\n expr: filters.join(' && ')\n }\n : null;\n }\n}\n//# sourceMappingURL=filterinvalid.js.map","import { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for flatten transform nodes\n */\nexport class FlattenTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n super(parent);\n this.transform = transform;\n this.transform = duplicate(transform); // duplicate to prevent side effects\n const { flatten, as = [] } = this.transform;\n this.transform.as = flatten.map((f, i) => { var _a; return (_a = as[i]) !== null && _a !== void 0 ? _a : f; });\n }\n clone() {\n return new FlattenTransformNode(this.parent, duplicate(this.transform));\n }\n dependentFields() {\n return new Set(this.transform.flatten);\n }\n producedFields() {\n return new Set(this.transform.as);\n }\n hash() {\n return `FlattenTransform ${hash(this.transform)}`;\n }\n assemble() {\n const { flatten: fields, as } = this.transform;\n const result = {\n type: 'flatten',\n fields,\n as\n };\n return result;\n }\n}\n//# sourceMappingURL=flatten.js.map","import { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for flatten transform nodes\n */\nexport class FoldTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n var _a, _b, _c;\n super(parent);\n this.transform = transform;\n this.transform = duplicate(transform); // duplicate to prevent side effects\n const specifiedAs = (_a = this.transform.as) !== null && _a !== void 0 ? _a : [undefined, undefined];\n this.transform.as = [(_b = specifiedAs[0]) !== null && _b !== void 0 ? _b : 'key', (_c = specifiedAs[1]) !== null && _c !== void 0 ? _c : 'value'];\n }\n clone() {\n return new FoldTransformNode(null, duplicate(this.transform));\n }\n dependentFields() {\n return new Set(this.transform.fold);\n }\n producedFields() {\n return new Set(this.transform.as);\n }\n hash() {\n return `FoldTransform ${hash(this.transform)}`;\n }\n assemble() {\n const { fold, as } = this.transform;\n const result = {\n type: 'fold',\n fields: fold,\n as\n };\n return result;\n }\n}\n//# sourceMappingURL=fold.js.map","import { isString } from 'vega-util';\nimport { LATITUDE, LATITUDE2, LONGITUDE, LONGITUDE2, SHAPE } from '../../channel';\nimport { getFieldOrDatumDef, isDatumDef, isFieldDef, isValueDef } from '../../channeldef';\nimport { GEOJSON } from '../../type';\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\nexport class GeoJSONNode extends DataFlowNode {\n constructor(parent, fields, geojson, signal) {\n super(parent);\n this.fields = fields;\n this.geojson = geojson;\n this.signal = signal;\n }\n clone() {\n return new GeoJSONNode(null, duplicate(this.fields), this.geojson, this.signal);\n }\n static parseAll(parent, model) {\n if (model.component.projection && !model.component.projection.isFit) {\n return parent;\n }\n let geoJsonCounter = 0;\n for (const coordinates of [\n [LONGITUDE, LATITUDE],\n [LONGITUDE2, LATITUDE2]\n ]) {\n const pair = coordinates.map(channel => {\n const def = getFieldOrDatumDef(model.encoding[channel]);\n return isFieldDef(def)\n ? def.field\n : isDatumDef(def)\n ? { expr: `${def.datum}` }\n : isValueDef(def)\n ? { expr: `${def['value']}` }\n : undefined;\n });\n if (pair[0] || pair[1]) {\n parent = new GeoJSONNode(parent, pair, null, model.getName(`geojson_${geoJsonCounter++}`));\n }\n }\n if (model.channelHasField(SHAPE)) {\n const fieldDef = model.typedFieldDef(SHAPE);\n if (fieldDef.type === GEOJSON) {\n parent = new GeoJSONNode(parent, null, fieldDef.field, model.getName(`geojson_${geoJsonCounter++}`));\n }\n }\n return parent;\n }\n dependentFields() {\n var _a;\n const fields = ((_a = this.fields) !== null && _a !== void 0 ? _a : []).filter(isString);\n return new Set([...(this.geojson ? [this.geojson] : []), ...fields]);\n }\n producedFields() {\n return new Set();\n }\n hash() {\n return `GeoJSON ${this.geojson} ${this.signal} ${hash(this.fields)}`;\n }\n assemble() {\n return [\n ...(this.geojson\n ? [\n {\n type: 'filter',\n expr: `isValid(datum[\"${this.geojson}\"])`\n }\n ]\n : []),\n Object.assign(Object.assign(Object.assign({ type: 'geojson' }, (this.fields ? { fields: this.fields } : {})), (this.geojson ? { geojson: this.geojson } : {})), { signal: this.signal })\n ];\n }\n}\n//# sourceMappingURL=geojson.js.map","import { isString } from 'vega-util';\nimport { LATITUDE, LATITUDE2, LONGITUDE, LONGITUDE2 } from '../../channel';\nimport { getFieldOrDatumDef, isDatumDef, isFieldDef, isValueDef } from '../../channeldef';\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\nexport class GeoPointNode extends DataFlowNode {\n constructor(parent, projection, fields, as) {\n super(parent);\n this.projection = projection;\n this.fields = fields;\n this.as = as;\n }\n clone() {\n return new GeoPointNode(null, this.projection, duplicate(this.fields), duplicate(this.as));\n }\n static parseAll(parent, model) {\n if (!model.projectionName()) {\n return parent;\n }\n for (const coordinates of [\n [LONGITUDE, LATITUDE],\n [LONGITUDE2, LATITUDE2]\n ]) {\n const pair = coordinates.map(channel => {\n const def = getFieldOrDatumDef(model.encoding[channel]);\n return isFieldDef(def)\n ? def.field\n : isDatumDef(def)\n ? { expr: `${def.datum}` }\n : isValueDef(def)\n ? { expr: `${def['value']}` }\n : undefined;\n });\n const suffix = coordinates[0] === LONGITUDE2 ? '2' : '';\n if (pair[0] || pair[1]) {\n parent = new GeoPointNode(parent, model.projectionName(), pair, [\n model.getName(`x${suffix}`),\n model.getName(`y${suffix}`)\n ]);\n }\n }\n return parent;\n }\n dependentFields() {\n return new Set(this.fields.filter(isString));\n }\n producedFields() {\n return new Set(this.as);\n }\n hash() {\n return `Geopoint ${this.projection} ${hash(this.fields)} ${hash(this.as)}`;\n }\n assemble() {\n return {\n type: 'geopoint',\n projection: this.projection,\n fields: this.fields,\n as: this.as\n };\n }\n}\n//# sourceMappingURL=geopoint.js.map","import { isFieldDef } from '../../channeldef';\nimport { pathGroupingFields } from '../../encoding';\nimport { isImputeSequence } from '../../transform';\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\nexport class ImputeNode extends DataFlowNode {\n constructor(parent, transform) {\n super(parent);\n this.transform = transform;\n }\n clone() {\n return new ImputeNode(null, duplicate(this.transform));\n }\n dependentFields() {\n var _a;\n return new Set([this.transform.impute, this.transform.key, ...((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : [])]);\n }\n producedFields() {\n return new Set([this.transform.impute]);\n }\n processSequence(keyvals) {\n const { start = 0, stop, step } = keyvals;\n const result = [start, stop, ...(step ? [step] : [])].join(',');\n return { signal: `sequence(${result})` };\n }\n static makeFromTransform(parent, imputeTransform) {\n return new ImputeNode(parent, imputeTransform);\n }\n static makeFromEncoding(parent, model) {\n const encoding = model.encoding;\n const xDef = encoding.x;\n const yDef = encoding.y;\n if (isFieldDef(xDef) && isFieldDef(yDef)) {\n const imputedChannel = xDef.impute ? xDef : yDef.impute ? yDef : undefined;\n if (imputedChannel === undefined) {\n return undefined;\n }\n const keyChannel = xDef.impute ? yDef : yDef.impute ? xDef : undefined;\n const { method, value, frame, keyvals } = imputedChannel.impute;\n const groupbyFields = pathGroupingFields(model.mark, encoding);\n return new ImputeNode(parent, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ impute: imputedChannel.field, key: keyChannel.field }, (method ? { method } : {})), (value !== undefined ? { value } : {})), (frame ? { frame } : {})), (keyvals !== undefined ? { keyvals } : {})), (groupbyFields.length ? { groupby: groupbyFields } : {})));\n }\n return null;\n }\n hash() {\n return `Impute ${hash(this.transform)}`;\n }\n assemble() {\n const { impute, key, keyvals, method, groupby, value, frame = [null, null] } = this.transform;\n const imputeTransform = Object.assign(Object.assign(Object.assign(Object.assign({ type: 'impute', field: impute, key }, (keyvals ? { keyvals: isImputeSequence(keyvals) ? this.processSequence(keyvals) : keyvals } : {})), { method: 'value' }), (groupby ? { groupby } : {})), { value: !method || method === 'value' ? value : null });\n if (method && method !== 'value') {\n const deriveNewField = Object.assign({ type: 'window', as: [`imputed_${impute}_value`], ops: [method], fields: [impute], frame, ignorePeers: false }, (groupby ? { groupby } : {}));\n const replaceOriginal = {\n type: 'formula',\n expr: `datum.${impute} === null ? datum.imputed_${impute}_value : datum.${impute}`,\n as: impute\n };\n return [imputeTransform, deriveNewField, replaceOriginal];\n }\n else {\n return [imputeTransform];\n }\n }\n}\n//# sourceMappingURL=impute.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for loess transform nodes\n */\nexport class LoessTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n var _a, _b, _c;\n super(parent);\n this.transform = transform;\n this.transform = duplicate(transform); // duplicate to prevent side effects\n const specifiedAs = (_a = this.transform.as) !== null && _a !== void 0 ? _a : [undefined, undefined];\n this.transform.as = [(_b = specifiedAs[0]) !== null && _b !== void 0 ? _b : transform.on, (_c = specifiedAs[1]) !== null && _c !== void 0 ? _c : transform.loess];\n }\n clone() {\n return new LoessTransformNode(null, duplicate(this.transform));\n }\n dependentFields() {\n var _a;\n return new Set([this.transform.loess, this.transform.on, ...((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : [])]);\n }\n producedFields() {\n return new Set(this.transform.as);\n }\n hash() {\n return `LoessTransform ${hash(this.transform)}`;\n }\n assemble() {\n const _a = this.transform, { loess, on } = _a, rest = __rest(_a, [\"loess\", \"on\"]);\n const result = Object.assign({ type: 'loess', x: on, y: loess }, rest);\n return result;\n }\n}\n//# sourceMappingURL=loess.js.map","import { array, isString } from 'vega-util';\nimport * as log from '../../log';\nimport { isLookupData, isLookupSelection } from '../../transform';\nimport { duplicate, hash, varName } from '../../util';\nimport { DataFlowNode, OutputNode } from './dataflow';\nimport { findSource } from './parse';\nimport { SourceNode } from './source';\nimport { DataSourceType } from '../../data';\nexport class LookupNode extends DataFlowNode {\n constructor(parent, transform, secondary) {\n super(parent);\n this.transform = transform;\n this.secondary = secondary;\n }\n clone() {\n return new LookupNode(null, duplicate(this.transform), this.secondary);\n }\n static make(parent, model, transform, counter) {\n const sources = model.component.data.sources;\n const { from } = transform;\n let fromOutputNode = null;\n if (isLookupData(from)) {\n let fromSource = findSource(from.data, sources);\n if (!fromSource) {\n fromSource = new SourceNode(from.data);\n sources.push(fromSource);\n }\n const fromOutputName = model.getName(`lookup_${counter}`);\n fromOutputNode = new OutputNode(fromSource, fromOutputName, DataSourceType.Lookup, model.component.data.outputNodeRefCounts);\n model.component.data.outputNodes[fromOutputName] = fromOutputNode;\n }\n else if (isLookupSelection(from)) {\n const selName = from.param;\n transform = Object.assign({ as: selName }, transform);\n let selCmpt;\n try {\n selCmpt = model.getSelectionComponent(varName(selName), selName);\n }\n catch (e) {\n throw new Error(log.message.cannotLookupVariableParameter(selName));\n }\n fromOutputNode = selCmpt.materialized;\n if (!fromOutputNode) {\n throw new Error(log.message.noSameUnitLookup(selName));\n }\n }\n return new LookupNode(parent, transform, fromOutputNode.getSource());\n }\n dependentFields() {\n return new Set([this.transform.lookup]);\n }\n producedFields() {\n return new Set(this.transform.as ? array(this.transform.as) : this.transform.from.fields);\n }\n hash() {\n return `Lookup ${hash({ transform: this.transform, secondary: this.secondary })}`;\n }\n assemble() {\n let foreign;\n if (this.transform.from.fields) {\n // lookup a few fields and add create a flat output\n foreign = Object.assign({ values: this.transform.from.fields }, (this.transform.as ? { as: array(this.transform.as) } : {}));\n }\n else {\n // lookup full record and nest it\n let asName = this.transform.as;\n if (!isString(asName)) {\n log.warn(log.message.NO_FIELDS_NEEDS_AS);\n asName = '_lookup';\n }\n foreign = {\n as: [asName]\n };\n }\n return Object.assign(Object.assign({ type: 'lookup', from: this.secondary, key: this.transform.from.key, fields: [this.transform.lookup] }, foreign), (this.transform.default ? { default: this.transform.default } : {}));\n }\n}\n//# sourceMappingURL=lookup.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for quantile transform nodes\n */\nexport class QuantileTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n var _a, _b, _c;\n super(parent);\n this.transform = transform;\n this.transform = duplicate(transform); // duplicate to prevent side effects\n const specifiedAs = (_a = this.transform.as) !== null && _a !== void 0 ? _a : [undefined, undefined];\n this.transform.as = [(_b = specifiedAs[0]) !== null && _b !== void 0 ? _b : 'prob', (_c = specifiedAs[1]) !== null && _c !== void 0 ? _c : 'value'];\n }\n clone() {\n return new QuantileTransformNode(null, duplicate(this.transform));\n }\n dependentFields() {\n var _a;\n return new Set([this.transform.quantile, ...((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : [])]);\n }\n producedFields() {\n return new Set(this.transform.as);\n }\n hash() {\n return `QuantileTransform ${hash(this.transform)}`;\n }\n assemble() {\n const _a = this.transform, { quantile } = _a, rest = __rest(_a, [\"quantile\"]);\n const result = Object.assign({ type: 'quantile', field: quantile }, rest);\n return result;\n }\n}\n//# sourceMappingURL=quantile.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for regression transform nodes\n */\nexport class RegressionTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n var _a, _b, _c;\n super(parent);\n this.transform = transform;\n this.transform = duplicate(transform); // duplicate to prevent side effects\n const specifiedAs = (_a = this.transform.as) !== null && _a !== void 0 ? _a : [undefined, undefined];\n this.transform.as = [(_b = specifiedAs[0]) !== null && _b !== void 0 ? _b : transform.on, (_c = specifiedAs[1]) !== null && _c !== void 0 ? _c : transform.regression];\n }\n clone() {\n return new RegressionTransformNode(null, duplicate(this.transform));\n }\n dependentFields() {\n var _a;\n return new Set([this.transform.regression, this.transform.on, ...((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : [])]);\n }\n producedFields() {\n return new Set(this.transform.as);\n }\n hash() {\n return `RegressionTransform ${hash(this.transform)}`;\n }\n assemble() {\n const _a = this.transform, { regression, on } = _a, rest = __rest(_a, [\"regression\", \"on\"]);\n const result = Object.assign({ type: 'regression', x: on, y: regression }, rest);\n return result;\n }\n}\n//# sourceMappingURL=regression.js.map","import { duplicate, hash, unique } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for pivot transform nodes.\n */\nexport class PivotTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n super(parent);\n this.transform = transform;\n }\n clone() {\n return new PivotTransformNode(null, duplicate(this.transform));\n }\n addDimensions(fields) {\n var _a;\n this.transform.groupby = unique(((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : []).concat(fields), d => d);\n }\n producedFields() {\n return undefined; // return undefined so that potentially everything can depend on the pivot\n }\n dependentFields() {\n var _a;\n return new Set([this.transform.pivot, this.transform.value, ...((_a = this.transform.groupby) !== null && _a !== void 0 ? _a : [])]);\n }\n hash() {\n return `PivotTransform ${hash(this.transform)}`;\n }\n assemble() {\n const { pivot, value, groupby, limit, op } = this.transform;\n return Object.assign(Object.assign(Object.assign({ type: 'pivot', field: pivot, value }, (limit !== undefined ? { limit } : {})), (op !== undefined ? { op } : {})), (groupby !== undefined ? { groupby } : {}));\n }\n}\n//# sourceMappingURL=pivot.js.map","import { duplicate, hash } from '../../util';\nimport { DataFlowNode } from './dataflow';\n/**\n * A class for the sample transform nodes\n */\nexport class SampleTransformNode extends DataFlowNode {\n constructor(parent, transform) {\n super(parent);\n this.transform = transform;\n }\n clone() {\n return new SampleTransformNode(null, duplicate(this.transform));\n }\n dependentFields() {\n return new Set();\n }\n producedFields() {\n return new Set();\n }\n hash() {\n return `SampleTransform ${hash(this.transform)}`;\n }\n assemble() {\n return {\n type: 'sample',\n size: this.transform.sample\n };\n }\n}\n//# sourceMappingURL=sample.js.map","import { isUrlData } from '../../data';\nimport { AggregateNode } from './aggregate';\nimport { BinNode } from './bin';\nimport { CalculateNode } from './calculate';\nimport { OutputNode } from './dataflow';\nimport { DensityTransformNode } from './density';\nimport { FacetNode } from './facet';\nimport { FilterNode } from './filter';\nimport { FilterInvalidNode } from './filterinvalid';\nimport { FlattenTransformNode } from './flatten';\nimport { FoldTransformNode } from './fold';\nimport { ParseNode } from './formatparse';\nimport { GeoJSONNode } from './geojson';\nimport { GeoPointNode } from './geopoint';\nimport { GraticuleNode } from './graticule';\nimport { IdentifierNode } from './identifier';\nimport { ImputeNode } from './impute';\nimport { JoinAggregateTransformNode } from './joinaggregate';\nimport { LoessTransformNode } from './loess';\nimport { LookupNode } from './lookup';\nimport { QuantileTransformNode } from './quantile';\nimport { RegressionTransformNode } from './regression';\nimport { PivotTransformNode } from './pivot';\nimport { SampleTransformNode } from './sample';\nimport { SequenceNode } from './sequence';\nimport { SourceNode } from './source';\nimport { StackNode } from './stack';\nimport { TimeUnitNode } from './timeunit';\nimport { WindowTransformNode } from './window';\nfunction makeWalkTree(data) {\n // to name datasources\n let datasetIndex = 0;\n /**\n * Recursively walk down the tree.\n */\n function walkTree(node, dataSource) {\n var _a;\n if (node instanceof SourceNode) {\n // If the source is a named data source or a data source with values, we need\n // to put it in a different data source. Otherwise, Vega may override the data.\n if (!node.isGenerator && !isUrlData(node.data)) {\n data.push(dataSource);\n const newData = {\n name: null,\n source: dataSource.name,\n transform: []\n };\n dataSource = newData;\n }\n }\n if (node instanceof ParseNode) {\n if (node.parent instanceof SourceNode && !dataSource.source) {\n // If node's parent is a root source and the data source does not refer to another data source, use normal format parse\n dataSource.format = Object.assign(Object.assign({}, ((_a = dataSource.format) !== null && _a !== void 0 ? _a : {})), { parse: node.assembleFormatParse() });\n // add calculates for all nested fields\n dataSource.transform.push(...node.assembleTransforms(true));\n }\n else {\n // Otherwise use Vega expression to parse\n dataSource.transform.push(...node.assembleTransforms());\n }\n }\n if (node instanceof FacetNode) {\n if (!dataSource.name) {\n dataSource.name = `data_${datasetIndex++}`;\n }\n if (!dataSource.source || dataSource.transform.length > 0) {\n data.push(dataSource);\n node.data = dataSource.name;\n }\n else {\n node.data = dataSource.source;\n }\n data.push(...node.assemble());\n // break here because the rest of the tree has to be taken care of by the facet.\n return;\n }\n if (node instanceof GraticuleNode ||\n node instanceof SequenceNode ||\n node instanceof FilterInvalidNode ||\n node instanceof FilterNode ||\n node instanceof CalculateNode ||\n node instanceof GeoPointNode ||\n node instanceof AggregateNode ||\n node instanceof LookupNode ||\n node instanceof WindowTransformNode ||\n node instanceof JoinAggregateTransformNode ||\n node instanceof FoldTransformNode ||\n node instanceof FlattenTransformNode ||\n node instanceof DensityTransformNode ||\n node instanceof LoessTransformNode ||\n node instanceof QuantileTransformNode ||\n node instanceof RegressionTransformNode ||\n node instanceof IdentifierNode ||\n node instanceof SampleTransformNode ||\n node instanceof PivotTransformNode) {\n dataSource.transform.push(node.assemble());\n }\n if (node instanceof BinNode ||\n node instanceof TimeUnitNode ||\n node instanceof ImputeNode ||\n node instanceof StackNode ||\n node instanceof GeoJSONNode) {\n dataSource.transform.push(...node.assemble());\n }\n if (node instanceof OutputNode) {\n if (dataSource.source && dataSource.transform.length === 0) {\n node.setSource(dataSource.source);\n }\n else if (node.parent instanceof OutputNode) {\n // Note that an output node may be required but we still do not assemble a\n // separate data source for it.\n node.setSource(dataSource.name);\n }\n else {\n if (!dataSource.name) {\n dataSource.name = `data_${datasetIndex++}`;\n }\n // Here we set the name of the datasource we generated. From now on\n // other assemblers can use it.\n node.setSource(dataSource.name);\n // if this node has more than one child, we will add a datasource automatically\n if (node.numChildren() === 1) {\n data.push(dataSource);\n const newData = {\n name: null,\n source: dataSource.name,\n transform: []\n };\n dataSource = newData;\n }\n }\n }\n switch (node.numChildren()) {\n case 0:\n // done\n if (node instanceof OutputNode && (!dataSource.source || dataSource.transform.length > 0)) {\n // do not push empty datasources that are simply references\n data.push(dataSource);\n }\n break;\n case 1:\n walkTree(node.children[0], dataSource);\n break;\n default: {\n if (!dataSource.name) {\n dataSource.name = `data_${datasetIndex++}`;\n }\n let source = dataSource.name;\n if (!dataSource.source || dataSource.transform.length > 0) {\n data.push(dataSource);\n }\n else {\n source = dataSource.source;\n }\n for (const child of node.children) {\n const newData = {\n name: null,\n source: source,\n transform: []\n };\n walkTree(child, newData);\n }\n break;\n }\n }\n }\n return walkTree;\n}\n/**\n * Assemble data sources that are derived from faceted data.\n */\nexport function assembleFacetData(root) {\n const data = [];\n const walkTree = makeWalkTree(data);\n for (const child of root.children) {\n walkTree(child, {\n source: root.name,\n name: null,\n transform: []\n });\n }\n return data;\n}\n/**\n * Create Vega data array from a given compiled model and append all of them to the given array\n *\n * @param model\n * @param data array\n * @return modified data array\n */\nexport function assembleRootData(dataComponent, datasets) {\n var _a, _b;\n const data = [];\n // dataComponent.sources.forEach(debug);\n // draw(dataComponent.sources);\n const walkTree = makeWalkTree(data);\n let sourceIndex = 0;\n for (const root of dataComponent.sources) {\n // assign a name if the source does not have a name yet\n if (!root.hasName()) {\n root.dataName = `source_${sourceIndex++}`;\n }\n const newData = root.assemble();\n walkTree(root, newData);\n }\n // remove empty transform arrays for cleaner output\n for (const d of data) {\n if (d.transform.length === 0) {\n delete d.transform;\n }\n }\n // move sources without transforms (the ones that are potentially used in lookups) to the beginning\n let whereTo = 0;\n for (const [i, d] of data.entries()) {\n if (((_a = d.transform) !== null && _a !== void 0 ? _a : []).length === 0 && !d.source) {\n data.splice(whereTo++, 0, data.splice(i, 1)[0]);\n }\n }\n // now fix the from references in lookup transforms\n for (const d of data) {\n for (const t of (_b = d.transform) !== null && _b !== void 0 ? _b : []) {\n if (t.type === 'lookup') {\n t.from = dataComponent.outputNodes[t.from].getSource();\n }\n }\n }\n // inline values for datasets that are in the datastore\n for (const d of data) {\n if (d.name in datasets) {\n d.values = datasets[d.name];\n }\n }\n return data;\n}\n//# sourceMappingURL=assemble.js.map","import { isArray } from 'vega-util';\nimport { FACET_CHANNELS } from '../../channel';\nimport { title as fieldDefTitle } from '../../channeldef';\nimport { contains, getFirstDefined } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { assembleAxis } from '../axis/assemble';\nimport { parseGuideResolve } from '../resolve';\nimport { getHeaderProperty } from './common';\nexport function getHeaderType(orient) {\n if (orient === 'top' || orient === 'left' || isSignalRef(orient)) {\n // we always use header for orient signal since we can't dynamically make header becomes footer\n return 'header';\n }\n return 'footer';\n}\nexport function parseFacetHeaders(model) {\n for (const channel of FACET_CHANNELS) {\n parseFacetHeader(model, channel);\n }\n mergeChildAxis(model, 'x');\n mergeChildAxis(model, 'y');\n}\nfunction parseFacetHeader(model, channel) {\n var _a;\n const { facet, config, child, component } = model;\n if (model.channelHasField(channel)) {\n const fieldDef = facet[channel];\n const titleConfig = getHeaderProperty('title', null, config, channel);\n let title = fieldDefTitle(fieldDef, config, {\n allowDisabling: true,\n includeDefault: titleConfig === undefined || !!titleConfig\n });\n if (child.component.layoutHeaders[channel].title) {\n // TODO: better handle multiline titles\n title = isArray(title) ? title.join(', ') : title;\n // merge title with child to produce \"Title / Subtitle / Sub-subtitle\"\n title += ` / ${child.component.layoutHeaders[channel].title}`;\n child.component.layoutHeaders[channel].title = null;\n }\n const labelOrient = getHeaderProperty('labelOrient', fieldDef.header, config, channel);\n const labels = fieldDef.header !== null ? getFirstDefined((_a = fieldDef.header) === null || _a === void 0 ? void 0 : _a.labels, config.header.labels, true) : false;\n const headerType = contains(['bottom', 'right'], labelOrient) ? 'footer' : 'header';\n component.layoutHeaders[channel] = {\n title: fieldDef.header !== null ? title : null,\n facetFieldDef: fieldDef,\n [headerType]: channel === 'facet' ? [] : [makeHeaderComponent(model, channel, labels)]\n };\n }\n}\nfunction makeHeaderComponent(model, channel, labels) {\n const sizeType = channel === 'row' ? 'height' : 'width';\n return {\n labels,\n sizeSignal: model.child.component.layoutSize.get(sizeType) ? model.child.getSizeSignalRef(sizeType) : undefined,\n axes: []\n };\n}\nfunction mergeChildAxis(model, channel) {\n var _a;\n const { child } = model;\n if (child.component.axes[channel]) {\n const { layoutHeaders, resolve } = model.component;\n resolve.axis[channel] = parseGuideResolve(resolve, channel);\n if (resolve.axis[channel] === 'shared') {\n // For shared axis, move the axes to facet's header or footer\n const headerChannel = channel === 'x' ? 'column' : 'row';\n const layoutHeader = layoutHeaders[headerChannel];\n for (const axisComponent of child.component.axes[channel]) {\n const headerType = getHeaderType(axisComponent.get('orient'));\n (_a = layoutHeader[headerType]) !== null && _a !== void 0 ? _a : (layoutHeader[headerType] = [makeHeaderComponent(model, headerChannel, false)]);\n // FIXME: assemble shouldn't be called here, but we do it this way so we only extract the main part of the axes\n const mainAxis = assembleAxis(axisComponent, 'main', model.config, { header: true });\n if (mainAxis) {\n // LayoutHeader no longer keep track of property precedence, thus let's combine.\n layoutHeader[headerType][0].axes.push(mainAxis);\n }\n axisComponent.mainExtracted = true;\n }\n }\n else {\n // Otherwise do nothing for independent axes\n }\n }\n}\n//# sourceMappingURL=parse.js.map","import { getPositionScaleChannel, getSizeChannel, POSITION_SCALE_CHANNELS } from '../../channel';\nimport { getViewConfigContinuousSize, getViewConfigDiscreteSize } from '../../config';\nimport { hasDiscreteDomain } from '../../scale';\nimport { isStep } from '../../spec/base';\nimport { isVgRangeStep } from '../../vega.schema';\nimport { defaultScaleResolve } from '../resolve';\nimport { mergeValuesWithExplicit } from '../split';\nimport { getSizeTypeFromLayoutSizeType } from './component';\nexport function parseLayerLayoutSize(model) {\n parseChildrenLayoutSize(model);\n parseNonUnitLayoutSizeForChannel(model, 'width');\n parseNonUnitLayoutSizeForChannel(model, 'height');\n}\nexport function parseConcatLayoutSize(model) {\n parseChildrenLayoutSize(model);\n // for columns === 1 (vconcat), we can completely merge width. Otherwise, we can treat merged width as childWidth.\n const widthType = model.layout.columns === 1 ? 'width' : 'childWidth';\n // for columns === undefined (hconcat), we can completely merge height. Otherwise, we can treat merged height as childHeight.\n const heightType = model.layout.columns === undefined ? 'height' : 'childHeight';\n parseNonUnitLayoutSizeForChannel(model, widthType);\n parseNonUnitLayoutSizeForChannel(model, heightType);\n}\nexport function parseChildrenLayoutSize(model) {\n for (const child of model.children) {\n child.parseLayoutSize();\n }\n}\n/**\n * Merge child layout size (width or height).\n */\nfunction parseNonUnitLayoutSizeForChannel(model, layoutSizeType) {\n var _a;\n /*\n * For concat, the parent width or height might not be the same as the children's shared height.\n * For example, hconcat's subviews may share width, but the shared width is not the hconcat view's width.\n *\n * layoutSizeType represents the output of the view (could be childWidth/childHeight/width/height)\n * while the sizeType represents the properties of the child.\n */\n const sizeType = getSizeTypeFromLayoutSizeType(layoutSizeType);\n const channel = getPositionScaleChannel(sizeType);\n const resolve = model.component.resolve;\n const layoutSizeCmpt = model.component.layoutSize;\n let mergedSize;\n // Try to merge layout size\n for (const child of model.children) {\n const childSize = child.component.layoutSize.getWithExplicit(sizeType);\n const scaleResolve = (_a = resolve.scale[channel]) !== null && _a !== void 0 ? _a : defaultScaleResolve(channel, model);\n if (scaleResolve === 'independent' && childSize.value === 'step') {\n // Do not merge independent scales with range-step as their size depends\n // on the scale domains, which can be different between scales.\n mergedSize = undefined;\n break;\n }\n if (mergedSize) {\n if (scaleResolve === 'independent' && mergedSize.value !== childSize.value) {\n // For independent scale, only merge if all the sizes are the same.\n // If the values are different, abandon the merge!\n mergedSize = undefined;\n break;\n }\n mergedSize = mergeValuesWithExplicit(mergedSize, childSize, sizeType, '');\n }\n else {\n mergedSize = childSize;\n }\n }\n if (mergedSize) {\n // If merged, rename size and set size of all children.\n for (const child of model.children) {\n model.renameSignal(child.getName(sizeType), model.getName(layoutSizeType));\n child.component.layoutSize.set(sizeType, 'merged', false);\n }\n layoutSizeCmpt.setWithExplicit(layoutSizeType, mergedSize);\n }\n else {\n layoutSizeCmpt.setWithExplicit(layoutSizeType, {\n explicit: false,\n value: undefined\n });\n }\n}\nexport function parseUnitLayoutSize(model) {\n const { size, component } = model;\n for (const channel of POSITION_SCALE_CHANNELS) {\n const sizeType = getSizeChannel(channel);\n if (size[sizeType]) {\n const specifiedSize = size[sizeType];\n component.layoutSize.set(sizeType, isStep(specifiedSize) ? 'step' : specifiedSize, true);\n }\n else {\n const defaultSize = defaultUnitSize(model, sizeType);\n component.layoutSize.set(sizeType, defaultSize, false);\n }\n }\n}\nfunction defaultUnitSize(model, sizeType) {\n const channel = sizeType === 'width' ? 'x' : 'y';\n const config = model.config;\n const scaleComponent = model.getScaleComponent(channel);\n if (scaleComponent) {\n const scaleType = scaleComponent.get('type');\n const range = scaleComponent.get('range');\n if (hasDiscreteDomain(scaleType)) {\n const size = getViewConfigDiscreteSize(config.view, sizeType);\n if (isVgRangeStep(range) || isStep(size)) {\n // For discrete domain with range.step, use dynamic width/height\n return 'step';\n }\n else {\n return size;\n }\n }\n else {\n return getViewConfigContinuousSize(config.view, sizeType);\n }\n }\n else if (model.hasProjection || model.mark === 'arc') {\n // arc should use continuous size by default otherwise the pie is extremely small\n return getViewConfigContinuousSize(config.view, sizeType);\n }\n else {\n const size = getViewConfigDiscreteSize(config.view, sizeType);\n return isStep(size) ? size.step : size;\n }\n}\n//# sourceMappingURL=parse.js.map","import { isArray } from 'vega-util';\nimport { isBinning } from '../bin';\nimport { COLUMN, FACET_CHANNELS, POSITION_SCALE_CHANNELS, ROW } from '../channel';\nimport { initFieldDef, vgField } from '../channeldef';\nimport { replaceExprRef } from '../expr';\nimport * as log from '../log';\nimport { hasDiscreteDomain } from '../scale';\nimport { DEFAULT_SORT_OP, isSortField } from '../sort';\nimport { isFacetMapping } from '../spec/facet';\nimport { keys } from '../util';\nimport { isVgRangeStep } from '../vega.schema';\nimport { buildModel } from './buildmodel';\nimport { assembleFacetData } from './data/assemble';\nimport { sortArrayIndexField } from './data/calculate';\nimport { parseData } from './data/parse';\nimport { assembleLabelTitle } from './header/assemble';\nimport { getHeaderChannel, getHeaderProperty } from './header/common';\nimport { HEADER_CHANNELS, HEADER_TYPES } from './header/component';\nimport { parseFacetHeaders } from './header/parse';\nimport { parseChildrenLayoutSize } from './layoutsize/parse';\nimport { ModelWithField } from './model';\nimport { assembleDomain, getFieldFromDomain } from './scale/domain';\nimport { assembleFacetSignals } from './selection/assemble';\nexport function facetSortFieldName(fieldDef, sort, opt) {\n return vgField(sort, Object.assign({ suffix: `by_${vgField(fieldDef)}` }, (opt !== null && opt !== void 0 ? opt : {})));\n}\nexport class FacetModel extends ModelWithField {\n constructor(spec, parent, parentGivenName, config) {\n super(spec, 'facet', parent, parentGivenName, config, spec.resolve);\n this.child = buildModel(spec.spec, this, this.getName('child'), undefined, config);\n this.children = [this.child];\n this.facet = this.initFacet(spec.facet);\n }\n initFacet(facet) {\n // clone to prevent side effect to the original spec\n if (!isFacetMapping(facet)) {\n return { facet: this.initFacetFieldDef(facet, 'facet') };\n }\n const channels = keys(facet);\n const normalizedFacet = {};\n for (const channel of channels) {\n if (![ROW, COLUMN].includes(channel)) {\n // Drop unsupported channel\n log.warn(log.message.incompatibleChannel(channel, 'facet'));\n break;\n }\n const fieldDef = facet[channel];\n if (fieldDef.field === undefined) {\n log.warn(log.message.emptyFieldDef(fieldDef, channel));\n break;\n }\n normalizedFacet[channel] = this.initFacetFieldDef(fieldDef, channel);\n }\n return normalizedFacet;\n }\n initFacetFieldDef(fieldDef, channel) {\n // Cast because we call initFieldDef, which assumes general FieldDef.\n // However, FacetFieldDef is a bit more constrained than the general FieldDef\n const facetFieldDef = initFieldDef(fieldDef, channel);\n if (facetFieldDef.header) {\n facetFieldDef.header = replaceExprRef(facetFieldDef.header);\n }\n else if (facetFieldDef.header === null) {\n facetFieldDef.header = null;\n }\n return facetFieldDef;\n }\n channelHasField(channel) {\n return !!this.facet[channel];\n }\n fieldDef(channel) {\n return this.facet[channel];\n }\n parseData() {\n this.component.data = parseData(this);\n this.child.parseData();\n }\n parseLayoutSize() {\n parseChildrenLayoutSize(this);\n }\n parseSelections() {\n // As a facet has a single child, the selection components are the same.\n // The child maintains its selections to assemble signals, which remain\n // within its unit.\n this.child.parseSelections();\n this.component.selection = this.child.component.selection;\n }\n parseMarkGroup() {\n this.child.parseMarkGroup();\n }\n parseAxesAndHeaders() {\n this.child.parseAxesAndHeaders();\n parseFacetHeaders(this);\n }\n assembleSelectionTopLevelSignals(signals) {\n return this.child.assembleSelectionTopLevelSignals(signals);\n }\n assembleSignals() {\n this.child.assembleSignals();\n return [];\n }\n assembleSelectionData(data) {\n return this.child.assembleSelectionData(data);\n }\n getHeaderLayoutMixins() {\n var _a, _b, _c;\n const layoutMixins = {};\n for (const channel of FACET_CHANNELS) {\n for (const headerType of HEADER_TYPES) {\n const layoutHeaderComponent = this.component.layoutHeaders[channel];\n const headerComponent = layoutHeaderComponent[headerType];\n const { facetFieldDef } = layoutHeaderComponent;\n if (facetFieldDef) {\n const titleOrient = getHeaderProperty('titleOrient', facetFieldDef.header, this.config, channel);\n if (['right', 'bottom'].includes(titleOrient)) {\n const headerChannel = getHeaderChannel(channel, titleOrient);\n (_a = layoutMixins.titleAnchor) !== null && _a !== void 0 ? _a : (layoutMixins.titleAnchor = {});\n layoutMixins.titleAnchor[headerChannel] = 'end';\n }\n }\n if (headerComponent === null || headerComponent === void 0 ? void 0 : headerComponent[0]) {\n // set header/footerBand\n const sizeType = channel === 'row' ? 'height' : 'width';\n const bandType = headerType === 'header' ? 'headerBand' : 'footerBand';\n if (channel !== 'facet' && !this.child.component.layoutSize.get(sizeType)) {\n // If facet child does not have size signal, then apply headerBand\n (_b = layoutMixins[bandType]) !== null && _b !== void 0 ? _b : (layoutMixins[bandType] = {});\n layoutMixins[bandType][channel] = 0.5;\n }\n if (layoutHeaderComponent.title) {\n (_c = layoutMixins.offset) !== null && _c !== void 0 ? _c : (layoutMixins.offset = {});\n layoutMixins.offset[channel === 'row' ? 'rowTitle' : 'columnTitle'] = 10;\n }\n }\n }\n }\n return layoutMixins;\n }\n assembleDefaultLayout() {\n const { column, row } = this.facet;\n const columns = column ? this.columnDistinctSignal() : row ? 1 : undefined;\n let align = 'all';\n // Do not align the cells if the scale corresponding to the direction is indepent.\n // We always align when we facet into both row and column.\n if (!row && this.component.resolve.scale.x === 'independent') {\n align = 'none';\n }\n else if (!column && this.component.resolve.scale.y === 'independent') {\n align = 'none';\n }\n return Object.assign(Object.assign(Object.assign({}, this.getHeaderLayoutMixins()), (columns ? { columns } : {})), { bounds: 'full', align });\n }\n assembleLayoutSignals() {\n // FIXME(https://github.com/vega/vega-lite/issues/1193): this can be incorrect if we have independent scales.\n return this.child.assembleLayoutSignals();\n }\n columnDistinctSignal() {\n if (this.parent && this.parent instanceof FacetModel) {\n // For nested facet, we will add columns to group mark instead\n // See discussion in https://github.com/vega/vega/issues/952\n // and https://github.com/vega/vega-view/releases/tag/v1.2.6\n return undefined;\n }\n else {\n // In facetNode.assemble(), the name is always this.getName('column') + '_layout'.\n const facetLayoutDataName = this.getName('column_domain');\n return { signal: `length(data('${facetLayoutDataName}'))` };\n }\n }\n assembleGroupStyle() {\n return undefined;\n }\n assembleGroup(signals) {\n if (this.parent && this.parent instanceof FacetModel) {\n // Provide number of columns for layout.\n // See discussion in https://github.com/vega/vega/issues/952\n // and https://github.com/vega/vega-view/releases/tag/v1.2.6\n return Object.assign(Object.assign({}, (this.channelHasField('column')\n ? {\n encode: {\n update: {\n // TODO(https://github.com/vega/vega-lite/issues/2759):\n // Correct the signal for facet of concat of facet_column\n columns: { field: vgField(this.facet.column, { prefix: 'distinct' }) }\n }\n }\n }\n : {})), super.assembleGroup(signals));\n }\n return super.assembleGroup(signals);\n }\n /**\n * Aggregate cardinality for calculating size\n */\n getCardinalityAggregateForChild() {\n const fields = [];\n const ops = [];\n const as = [];\n if (this.child instanceof FacetModel) {\n if (this.child.channelHasField('column')) {\n const field = vgField(this.child.facet.column);\n fields.push(field);\n ops.push('distinct');\n as.push(`distinct_${field}`);\n }\n }\n else {\n for (const channel of POSITION_SCALE_CHANNELS) {\n const childScaleComponent = this.child.component.scales[channel];\n if (childScaleComponent && !childScaleComponent.merged) {\n const type = childScaleComponent.get('type');\n const range = childScaleComponent.get('range');\n if (hasDiscreteDomain(type) && isVgRangeStep(range)) {\n const domain = assembleDomain(this.child, channel);\n const field = getFieldFromDomain(domain);\n if (field) {\n fields.push(field);\n ops.push('distinct');\n as.push(`distinct_${field}`);\n }\n else {\n log.warn(log.message.unknownField(channel));\n }\n }\n }\n }\n }\n return { fields, ops, as };\n }\n assembleFacet() {\n const { name, data } = this.component.data.facetRoot;\n const { row, column } = this.facet;\n const { fields, ops, as } = this.getCardinalityAggregateForChild();\n const groupby = [];\n for (const channel of FACET_CHANNELS) {\n const fieldDef = this.facet[channel];\n if (fieldDef) {\n groupby.push(vgField(fieldDef));\n const { bin, sort } = fieldDef;\n if (isBinning(bin)) {\n groupby.push(vgField(fieldDef, { binSuffix: 'end' }));\n }\n if (isSortField(sort)) {\n const { field, op = DEFAULT_SORT_OP } = sort;\n const outputName = facetSortFieldName(fieldDef, sort);\n if (row && column) {\n // For crossed facet, use pre-calculate field as it requires a different groupby\n // For each calculated field, apply max and assign them to the same name as\n // all values of the same group should be the same anyway.\n fields.push(outputName);\n ops.push('max');\n as.push(outputName);\n }\n else {\n fields.push(field);\n ops.push(op);\n as.push(outputName);\n }\n }\n else if (isArray(sort)) {\n const outputName = sortArrayIndexField(fieldDef, channel);\n fields.push(outputName);\n ops.push('max');\n as.push(outputName);\n }\n }\n }\n const cross = !!row && !!column;\n return Object.assign({ name,\n data,\n groupby }, (cross || fields.length > 0\n ? {\n aggregate: Object.assign(Object.assign({}, (cross ? { cross } : {})), (fields.length ? { fields, ops, as } : {}))\n }\n : {}));\n }\n facetSortFields(channel) {\n const { facet } = this;\n const fieldDef = facet[channel];\n if (fieldDef) {\n if (isSortField(fieldDef.sort)) {\n return [facetSortFieldName(fieldDef, fieldDef.sort, { expr: 'datum' })];\n }\n else if (isArray(fieldDef.sort)) {\n return [sortArrayIndexField(fieldDef, channel, { expr: 'datum' })];\n }\n return [vgField(fieldDef, { expr: 'datum' })];\n }\n return [];\n }\n facetSortOrder(channel) {\n const { facet } = this;\n const fieldDef = facet[channel];\n if (fieldDef) {\n const { sort } = fieldDef;\n const order = (isSortField(sort) ? sort.order : !isArray(sort) && sort) || 'ascending';\n return [order];\n }\n return [];\n }\n assembleLabelTitle() {\n var _a;\n const { facet, config } = this;\n if (facet.facet) {\n // Facet always uses title to display labels\n return assembleLabelTitle(facet.facet, 'facet', config);\n }\n const ORTHOGONAL_ORIENT = {\n row: ['top', 'bottom'],\n column: ['left', 'right']\n };\n for (const channel of HEADER_CHANNELS) {\n if (facet[channel]) {\n const labelOrient = getHeaderProperty('labelOrient', (_a = facet[channel]) === null || _a === void 0 ? void 0 : _a.header, config, channel);\n if (ORTHOGONAL_ORIENT[channel].includes(labelOrient)) {\n // Row/Column with orthogonal labelOrient must use title to display labels\n return assembleLabelTitle(facet[channel], channel, config);\n }\n }\n }\n return undefined;\n }\n assembleMarks() {\n const { child } = this;\n // If we facet by two dimensions, we need to add a cross operator to the aggregation\n // so that we create all groups\n const facetRoot = this.component.data.facetRoot;\n const data = assembleFacetData(facetRoot);\n const encodeEntry = child.assembleGroupEncodeEntry(false);\n const title = this.assembleLabelTitle() || child.assembleTitle();\n const style = child.assembleGroupStyle();\n const markGroup = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name: this.getName('cell'), type: 'group' }, (title ? { title } : {})), (style ? { style } : {})), { from: {\n facet: this.assembleFacet()\n }, \n // TODO: move this to after data\n sort: {\n field: FACET_CHANNELS.map(c => this.facetSortFields(c)).flat(),\n order: FACET_CHANNELS.map(c => this.facetSortOrder(c)).flat()\n } }), (data.length > 0 ? { data: data } : {})), (encodeEntry ? { encode: { update: encodeEntry } } : {})), child.assembleGroup(assembleFacetSignals(this, [])));\n return [markGroup];\n }\n getMapping() {\n return this.facet;\n }\n}\n//# sourceMappingURL=facet.js.map","import { AncestorParse } from '.';\nimport { isGenerator, isGraticuleGenerator, isInlineData, isNamedData, isSequenceGenerator, isUrlData, DataSourceType } from '../../data';\nimport * as log from '../../log';\nimport { isAggregate, isBin, isCalculate, isDensity, isFilter, isFlatten, isFold, isImpute, isJoinAggregate, isLoess, isLookup, isPivot, isQuantile, isRegression, isSample, isStack, isTimeUnit, isWindow } from '../../transform';\nimport { deepEqual, mergeDeep } from '../../util';\nimport { isFacetModel, isLayerModel, isUnitModel } from '../model';\nimport { requiresSelectionId } from '../selection';\nimport { materializeSelections } from '../selection/parse';\nimport { AggregateNode } from './aggregate';\nimport { BinNode } from './bin';\nimport { CalculateNode } from './calculate';\nimport { OutputNode } from './dataflow';\nimport { DensityTransformNode } from './density';\nimport { FacetNode } from './facet';\nimport { FilterNode } from './filter';\nimport { FilterInvalidNode } from './filterinvalid';\nimport { FlattenTransformNode } from './flatten';\nimport { FoldTransformNode } from './fold';\nimport { getImplicitFromEncoding, getImplicitFromFilterTransform, getImplicitFromSelection, ParseNode } from './formatparse';\nimport { GeoJSONNode } from './geojson';\nimport { GeoPointNode } from './geopoint';\nimport { GraticuleNode } from './graticule';\nimport { IdentifierNode } from './identifier';\nimport { ImputeNode } from './impute';\nimport { JoinAggregateTransformNode } from './joinaggregate';\nimport { makeJoinAggregateFromFacet } from './joinaggregatefacet';\nimport { LoessTransformNode } from './loess';\nimport { LookupNode } from './lookup';\nimport { PivotTransformNode } from './pivot';\nimport { QuantileTransformNode } from './quantile';\nimport { RegressionTransformNode } from './regression';\nimport { SampleTransformNode } from './sample';\nimport { SequenceNode } from './sequence';\nimport { SourceNode } from './source';\nimport { StackNode } from './stack';\nimport { TimeUnitNode } from './timeunit';\nimport { WindowTransformNode } from './window';\nexport function findSource(data, sources) {\n var _a, _b, _c, _d;\n for (const other of sources) {\n const otherData = other.data;\n // if both datasets have a name defined, we cannot merge\n if (data.name && other.hasName() && data.name !== other.dataName) {\n continue;\n }\n const formatMesh = (_a = data['format']) === null || _a === void 0 ? void 0 : _a.mesh;\n const otherFeature = (_b = otherData.format) === null || _b === void 0 ? void 0 : _b.feature;\n // feature and mesh are mutually exclusive\n if (formatMesh && otherFeature) {\n continue;\n }\n // we have to extract the same feature or mesh\n const formatFeature = (_c = data['format']) === null || _c === void 0 ? void 0 : _c.feature;\n if ((formatFeature || otherFeature) && formatFeature !== otherFeature) {\n continue;\n }\n const otherMesh = (_d = otherData.format) === null || _d === void 0 ? void 0 : _d.mesh;\n if ((formatMesh || otherMesh) && formatMesh !== otherMesh) {\n continue;\n }\n if (isInlineData(data) && isInlineData(otherData)) {\n if (deepEqual(data.values, otherData.values)) {\n return other;\n }\n }\n else if (isUrlData(data) && isUrlData(otherData)) {\n if (data.url === otherData.url) {\n return other;\n }\n }\n else if (isNamedData(data)) {\n if (data.name === other.dataName) {\n return other;\n }\n }\n }\n return null;\n}\nfunction parseRoot(model, sources) {\n if (model.data || !model.parent) {\n // if the model defines a data source or is the root, create a source node\n if (model.data === null) {\n // data: null means we should ignore the parent's data so we just create a new data source\n const source = new SourceNode({ values: [] });\n sources.push(source);\n return source;\n }\n const existingSource = findSource(model.data, sources);\n if (existingSource) {\n if (!isGenerator(model.data)) {\n existingSource.data.format = mergeDeep({}, model.data.format, existingSource.data.format);\n }\n // if the new source has a name but the existing one does not, we can set it\n if (!existingSource.hasName() && model.data.name) {\n existingSource.dataName = model.data.name;\n }\n return existingSource;\n }\n else {\n const source = new SourceNode(model.data);\n sources.push(source);\n return source;\n }\n }\n else {\n // If we don't have a source defined (overriding parent's data), use the parent's facet root or main.\n return model.parent.component.data.facetRoot\n ? model.parent.component.data.facetRoot\n : model.parent.component.data.main;\n }\n}\n/**\n * Parses a transform array into a chain of connected dataflow nodes.\n */\nexport function parseTransformArray(head, model, ancestorParse) {\n var _a, _b;\n let lookupCounter = 0;\n for (const t of model.transforms) {\n let derivedType = undefined;\n let transformNode;\n if (isCalculate(t)) {\n transformNode = head = new CalculateNode(head, t);\n derivedType = 'derived';\n }\n else if (isFilter(t)) {\n const implicit = getImplicitFromFilterTransform(t);\n transformNode = head = (_a = ParseNode.makeWithAncestors(head, {}, implicit, ancestorParse)) !== null && _a !== void 0 ? _a : head;\n head = new FilterNode(head, model, t.filter);\n }\n else if (isBin(t)) {\n transformNode = head = BinNode.makeFromTransform(head, t, model);\n derivedType = 'number';\n }\n else if (isTimeUnit(t)) {\n derivedType = 'date';\n const parsedAs = ancestorParse.getWithExplicit(t.field);\n // Create parse node because the input to time unit is always date.\n if (parsedAs.value === undefined) {\n head = new ParseNode(head, { [t.field]: derivedType });\n ancestorParse.set(t.field, derivedType, false);\n }\n transformNode = head = TimeUnitNode.makeFromTransform(head, t);\n }\n else if (isAggregate(t)) {\n transformNode = head = AggregateNode.makeFromTransform(head, t);\n derivedType = 'number';\n if (requiresSelectionId(model)) {\n head = new IdentifierNode(head);\n }\n }\n else if (isLookup(t)) {\n transformNode = head = LookupNode.make(head, model, t, lookupCounter++);\n derivedType = 'derived';\n }\n else if (isWindow(t)) {\n transformNode = head = new WindowTransformNode(head, t);\n derivedType = 'number';\n }\n else if (isJoinAggregate(t)) {\n transformNode = head = new JoinAggregateTransformNode(head, t);\n derivedType = 'number';\n }\n else if (isStack(t)) {\n transformNode = head = StackNode.makeFromTransform(head, t);\n derivedType = 'derived';\n }\n else if (isFold(t)) {\n transformNode = head = new FoldTransformNode(head, t);\n derivedType = 'derived';\n }\n else if (isFlatten(t)) {\n transformNode = head = new FlattenTransformNode(head, t);\n derivedType = 'derived';\n }\n else if (isPivot(t)) {\n transformNode = head = new PivotTransformNode(head, t);\n derivedType = 'derived';\n }\n else if (isSample(t)) {\n head = new SampleTransformNode(head, t);\n }\n else if (isImpute(t)) {\n transformNode = head = ImputeNode.makeFromTransform(head, t);\n derivedType = 'derived';\n }\n else if (isDensity(t)) {\n transformNode = head = new DensityTransformNode(head, t);\n derivedType = 'derived';\n }\n else if (isQuantile(t)) {\n transformNode = head = new QuantileTransformNode(head, t);\n derivedType = 'derived';\n }\n else if (isRegression(t)) {\n transformNode = head = new RegressionTransformNode(head, t);\n derivedType = 'derived';\n }\n else if (isLoess(t)) {\n transformNode = head = new LoessTransformNode(head, t);\n derivedType = 'derived';\n }\n else {\n log.warn(log.message.invalidTransformIgnored(t));\n continue;\n }\n if (transformNode && derivedType !== undefined) {\n for (const field of (_b = transformNode.producedFields()) !== null && _b !== void 0 ? _b : []) {\n ancestorParse.set(field, derivedType, false);\n }\n }\n }\n return head;\n}\n/*\nDescription of the dataflow (http://asciiflow.com/):\n +--------+\n | Source |\n +---+----+\n |\n v\n FormatParse\n (explicit)\n |\n v\n Transforms\n(Filter, Calculate, Binning, TimeUnit, Aggregate, Window, ...)\n |\n v\n FormatParse\n (implicit)\n |\n v\n Binning (in `encoding`)\n |\n v\n Timeunit (in `encoding`)\n |\n v\nFormula From Sort Array\n |\n v\n +--+--+\n | Raw |\n +-----+\n |\n v\n Aggregate (in `encoding`)\n |\n v\n Stack (in `encoding`)\n |\n v\n Invalid Filter\n |\n v\n +----------+\n | Main |\n +----------+\n |\n v\n +-------+\n | Facet |----> \"column\", \"column-layout\", and \"row\"\n +-------+\n |\n v\n ...Child data...\n*/\nexport function parseData(model) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\n let head = parseRoot(model, model.component.data.sources);\n const { outputNodes, outputNodeRefCounts } = model.component.data;\n const data = model.data;\n const newData = data && (isGenerator(data) || isUrlData(data) || isInlineData(data));\n const ancestorParse = !newData && model.parent ? model.parent.component.data.ancestorParse.clone() : new AncestorParse();\n if (isGenerator(data)) {\n // insert generator transform\n if (isSequenceGenerator(data)) {\n head = new SequenceNode(head, data.sequence);\n }\n else if (isGraticuleGenerator(data)) {\n head = new GraticuleNode(head, data.graticule);\n }\n // no parsing necessary for generator\n ancestorParse.parseNothing = true;\n }\n else if (((_a = data === null || data === void 0 ? void 0 : data.format) === null || _a === void 0 ? void 0 : _a.parse) === null) {\n // format.parse: null means disable parsing\n ancestorParse.parseNothing = true;\n }\n head = (_b = ParseNode.makeExplicit(head, model, ancestorParse)) !== null && _b !== void 0 ? _b : head;\n // Default discrete selections require an identifer transform to\n // uniquely identify data points. Add this transform at the head of\n // the pipeline such that the identifier field is available for all\n // subsequent datasets. During optimization, we will remove this\n // transform if it proves to be unnecessary. Additional identifier\n // transforms will be necessary when new tuples are constructed\n // (e.g., post-aggregation).\n head = new IdentifierNode(head);\n // HACK: This is equivalent for merging bin extent for union scale.\n // FIXME(https://github.com/vega/vega-lite/issues/2270): Correctly merge extent / bin node for shared bin scale\n const parentIsLayer = model.parent && isLayerModel(model.parent);\n if (isUnitModel(model) || isFacetModel(model)) {\n if (parentIsLayer) {\n head = (_c = BinNode.makeFromEncoding(head, model)) !== null && _c !== void 0 ? _c : head;\n }\n }\n if (model.transforms.length > 0) {\n head = parseTransformArray(head, model, ancestorParse);\n }\n // create parse nodes for fields that need to be parsed (or flattened) implicitly\n const implicitSelection = getImplicitFromSelection(model);\n const implicitEncoding = getImplicitFromEncoding(model);\n head = (_d = ParseNode.makeWithAncestors(head, {}, Object.assign(Object.assign({}, implicitSelection), implicitEncoding), ancestorParse)) !== null && _d !== void 0 ? _d : head;\n if (isUnitModel(model)) {\n head = GeoJSONNode.parseAll(head, model);\n head = GeoPointNode.parseAll(head, model);\n }\n if (isUnitModel(model) || isFacetModel(model)) {\n if (!parentIsLayer) {\n head = (_e = BinNode.makeFromEncoding(head, model)) !== null && _e !== void 0 ? _e : head;\n }\n head = (_f = TimeUnitNode.makeFromEncoding(head, model)) !== null && _f !== void 0 ? _f : head;\n head = CalculateNode.parseAllForSortIndex(head, model);\n }\n // add an output node pre aggregation\n const rawName = model.getDataName(DataSourceType.Raw);\n const raw = new OutputNode(head, rawName, DataSourceType.Raw, outputNodeRefCounts);\n outputNodes[rawName] = raw;\n head = raw;\n if (isUnitModel(model)) {\n const agg = AggregateNode.makeFromEncoding(head, model);\n if (agg) {\n head = agg;\n if (requiresSelectionId(model)) {\n head = new IdentifierNode(head);\n }\n }\n head = (_g = ImputeNode.makeFromEncoding(head, model)) !== null && _g !== void 0 ? _g : head;\n head = (_h = StackNode.makeFromEncoding(head, model)) !== null && _h !== void 0 ? _h : head;\n }\n if (isUnitModel(model)) {\n head = (_j = FilterInvalidNode.make(head, model)) !== null && _j !== void 0 ? _j : head;\n }\n // output node for marks\n const mainName = model.getDataName(DataSourceType.Main);\n const main = new OutputNode(head, mainName, DataSourceType.Main, outputNodeRefCounts);\n outputNodes[mainName] = main;\n head = main;\n if (isUnitModel(model)) {\n materializeSelections(model, main);\n }\n // add facet marker\n let facetRoot = null;\n if (isFacetModel(model)) {\n const facetName = model.getName('facet');\n // Derive new aggregate for facet's sort field\n // augment data source with new fields for crossed facet\n head = (_k = makeJoinAggregateFromFacet(head, model.facet)) !== null && _k !== void 0 ? _k : head;\n facetRoot = new FacetNode(head, model, facetName, main.getSource());\n outputNodes[facetName] = facetRoot;\n }\n return Object.assign(Object.assign({}, model.component.data), { outputNodes,\n outputNodeRefCounts,\n raw,\n main,\n facetRoot,\n ancestorParse });\n}\n//# sourceMappingURL=parse.js.map","import { vgField } from '../../channeldef';\nimport { DEFAULT_SORT_OP, isSortField } from '../../sort';\nimport { facetSortFieldName } from '../facet';\nimport { JoinAggregateTransformNode } from './joinaggregate';\nexport function makeJoinAggregateFromFacet(parent, facet) {\n const { row, column } = facet;\n if (row && column) {\n let newParent = null;\n // only need to make one for crossed facet\n for (const fieldDef of [row, column]) {\n if (isSortField(fieldDef.sort)) {\n const { field, op = DEFAULT_SORT_OP } = fieldDef.sort;\n parent = newParent = new JoinAggregateTransformNode(parent, {\n joinaggregate: [\n {\n op,\n field,\n as: facetSortFieldName(fieldDef, fieldDef.sort, { forAs: true })\n }\n ],\n groupby: [vgField(fieldDef)]\n });\n }\n }\n return newParent;\n }\n return null;\n}\n//# sourceMappingURL=joinaggregatefacet.js.map","import * as log from '../log';\nimport { isHConcatSpec, isVConcatSpec } from '../spec';\nimport { keys } from '../util';\nimport { buildModel } from './buildmodel';\nimport { parseData } from './data/parse';\nimport { assembleLayoutSignals } from './layoutsize/assemble';\nimport { parseConcatLayoutSize } from './layoutsize/parse';\nimport { Model } from './model';\nexport class ConcatModel extends Model {\n constructor(spec, parent, parentGivenName, config) {\n var _a, _b, _c, _d;\n super(spec, 'concat', parent, parentGivenName, config, spec.resolve);\n if (((_b = (_a = spec.resolve) === null || _a === void 0 ? void 0 : _a.axis) === null || _b === void 0 ? void 0 : _b.x) === 'shared' || ((_d = (_c = spec.resolve) === null || _c === void 0 ? void 0 : _c.axis) === null || _d === void 0 ? void 0 : _d.y) === 'shared') {\n log.warn(log.message.CONCAT_CANNOT_SHARE_AXIS);\n }\n this.children = this.getChildren(spec).map((child, i) => {\n return buildModel(child, this, this.getName(`concat_${i}`), undefined, config);\n });\n }\n parseData() {\n this.component.data = parseData(this);\n for (const child of this.children) {\n child.parseData();\n }\n }\n parseSelections() {\n // Merge selections up the hierarchy so that they may be referenced\n // across unit specs. Persist their definitions within each child\n // to assemble signals which remain within output Vega unit groups.\n this.component.selection = {};\n for (const child of this.children) {\n child.parseSelections();\n for (const key of keys(child.component.selection)) {\n this.component.selection[key] = child.component.selection[key];\n }\n }\n }\n parseMarkGroup() {\n for (const child of this.children) {\n child.parseMarkGroup();\n }\n }\n parseAxesAndHeaders() {\n for (const child of this.children) {\n child.parseAxesAndHeaders();\n }\n // TODO(#2415): support shared axes\n }\n getChildren(spec) {\n if (isVConcatSpec(spec)) {\n return spec.vconcat;\n }\n else if (isHConcatSpec(spec)) {\n return spec.hconcat;\n }\n return spec.concat;\n }\n parseLayoutSize() {\n parseConcatLayoutSize(this);\n }\n parseAxisGroup() {\n return null;\n }\n assembleSelectionTopLevelSignals(signals) {\n return this.children.reduce((sg, child) => child.assembleSelectionTopLevelSignals(sg), signals);\n }\n assembleSignals() {\n this.children.forEach(child => child.assembleSignals());\n return [];\n }\n assembleLayoutSignals() {\n const layoutSignals = assembleLayoutSignals(this);\n for (const child of this.children) {\n layoutSignals.push(...child.assembleLayoutSignals());\n }\n return layoutSignals;\n }\n assembleSelectionData(data) {\n return this.children.reduce((db, child) => child.assembleSelectionData(db), data);\n }\n assembleMarks() {\n // only children have marks\n return this.children.map(child => {\n const title = child.assembleTitle();\n const style = child.assembleGroupStyle();\n const encodeEntry = child.assembleGroupEncodeEntry(false);\n return Object.assign(Object.assign(Object.assign(Object.assign({ type: 'group', name: child.getName('group') }, (title ? { title } : {})), (style ? { style } : {})), (encodeEntry ? { encode: { update: encodeEntry } } : {})), child.assembleGroup());\n });\n }\n assembleGroupStyle() {\n return undefined;\n }\n assembleDefaultLayout() {\n const columns = this.layout.columns;\n return Object.assign(Object.assign({}, (columns != null ? { columns: columns } : {})), { bounds: 'full', \n // Use align each so it can work with multiple plots with different size\n align: 'each' });\n }\n}\n//# sourceMappingURL=concat.js.map","import { COMMON_AXIS_PROPERTIES_INDEX } from '../../axis';\nimport { duplicate, keys } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { Split } from '../split';\nfunction isFalseOrNull(v) {\n return v === false || v === null;\n}\nconst AXIS_COMPONENT_PROPERTIES_INDEX = Object.assign(Object.assign({ disable: 1, gridScale: 1, scale: 1 }, COMMON_AXIS_PROPERTIES_INDEX), { labelExpr: 1, encode: 1 });\nexport const AXIS_COMPONENT_PROPERTIES = keys(AXIS_COMPONENT_PROPERTIES_INDEX);\nexport class AxisComponent extends Split {\n constructor(explicit = {}, implicit = {}, mainExtracted = false) {\n super();\n this.explicit = explicit;\n this.implicit = implicit;\n this.mainExtracted = mainExtracted;\n }\n clone() {\n return new AxisComponent(duplicate(this.explicit), duplicate(this.implicit), this.mainExtracted);\n }\n hasAxisPart(part) {\n // FIXME(https://github.com/vega/vega-lite/issues/2552) this method can be wrong if users use a Vega theme.\n if (part === 'axis') {\n // always has the axis container part\n return true;\n }\n if (part === 'grid' || part === 'title') {\n return !!this.get(part);\n }\n // Other parts are enabled by default, so they should not be false or null.\n return !isFalseOrNull(this.get(part));\n }\n hasOrientSignalRef() {\n return isSignalRef(this.explicit.orient);\n }\n}\n//# sourceMappingURL=component.js.map","import { AXIS_PARTS, isAxisProperty, isConditionalAxisValue } from '../../axis';\nimport { POSITION_SCALE_CHANNELS } from '../../channel';\nimport { getFieldOrDatumDef } from '../../channeldef';\nimport { getFirstDefined, isEmpty, keys, normalizeAngle } from '../../util';\nimport { isSignalRef } from '../../vega.schema';\nimport { mergeTitleComponent } from '../common';\nimport { guideEncodeEntry } from '../guide';\nimport { parseGuideResolve } from '../resolve';\nimport { defaultTieBreaker, mergeValuesWithExplicit } from '../split';\nimport { AxisComponent, AXIS_COMPONENT_PROPERTIES } from './component';\nimport { getAxisConfig, getAxisConfigs } from './config';\nimport * as encode from './encode';\nimport { axisRules, defaultOrient, getFieldDefTitle, getLabelAngle } from './properties';\nexport function parseUnitAxes(model) {\n return POSITION_SCALE_CHANNELS.reduce((axis, channel) => {\n if (model.component.scales[channel]) {\n axis[channel] = [parseAxis(channel, model)];\n }\n return axis;\n }, {});\n}\nconst OPPOSITE_ORIENT = {\n bottom: 'top',\n top: 'bottom',\n left: 'right',\n right: 'left'\n};\nexport function parseLayerAxes(model) {\n var _a;\n const { axes, resolve } = model.component;\n const axisCount = { top: 0, bottom: 0, right: 0, left: 0 };\n for (const child of model.children) {\n child.parseAxesAndHeaders();\n for (const channel of keys(child.component.axes)) {\n resolve.axis[channel] = parseGuideResolve(model.component.resolve, channel);\n if (resolve.axis[channel] === 'shared') {\n // If the resolve says shared (and has not been overridden)\n // We will try to merge and see if there is a conflict\n axes[channel] = mergeAxisComponents(axes[channel], child.component.axes[channel]);\n if (!axes[channel]) {\n // If merge returns nothing, there is a conflict so we cannot make the axis shared.\n // Thus, mark axis as independent and remove the axis component.\n resolve.axis[channel] = 'independent';\n delete axes[channel];\n }\n }\n }\n }\n // Move axes to layer's axis component and merge shared axes\n for (const channel of POSITION_SCALE_CHANNELS) {\n for (const child of model.children) {\n if (!child.component.axes[channel]) {\n // skip if the child does not have a particular axis\n continue;\n }\n if (resolve.axis[channel] === 'independent') {\n // If axes are independent, concat the axisComponent array.\n axes[channel] = ((_a = axes[channel]) !== null && _a !== void 0 ? _a : []).concat(child.component.axes[channel]);\n // Automatically adjust orient\n for (const axisComponent of child.component.axes[channel]) {\n const { value: orient, explicit } = axisComponent.getWithExplicit('orient');\n if (isSignalRef(orient)) {\n continue;\n }\n if (axisCount[orient] > 0 && !explicit) {\n // Change axis orient if the number do not match\n const oppositeOrient = OPPOSITE_ORIENT[orient];\n if (axisCount[orient] > axisCount[oppositeOrient]) {\n axisComponent.set('orient', oppositeOrient, false);\n }\n }\n axisCount[orient]++;\n // TODO(https://github.com/vega/vega-lite/issues/2634): automatically add extra offset?\n }\n }\n // After merging, make sure to remove axes from child\n delete child.component.axes[channel];\n }\n // Suppress grid lines for dual axis charts (https://github.com/vega/vega-lite/issues/4676)\n if (resolve.axis[channel] === 'independent' && axes[channel] && axes[channel].length > 1) {\n for (const axisCmpt of axes[channel]) {\n if (!!axisCmpt.get('grid') && !axisCmpt.explicit.grid) {\n axisCmpt.implicit.grid = false;\n }\n }\n }\n }\n}\nfunction mergeAxisComponents(mergedAxisCmpts, childAxisCmpts) {\n if (mergedAxisCmpts) {\n // FIXME: this is a bit wrong once we support multiple axes\n if (mergedAxisCmpts.length !== childAxisCmpts.length) {\n return undefined; // Cannot merge axis component with different number of axes.\n }\n const length = mergedAxisCmpts.length;\n for (let i = 0; i < length; i++) {\n const merged = mergedAxisCmpts[i];\n const child = childAxisCmpts[i];\n if (!!merged !== !!child) {\n return undefined;\n }\n else if (merged && child) {\n const mergedOrient = merged.getWithExplicit('orient');\n const childOrient = child.getWithExplicit('orient');\n if (mergedOrient.explicit && childOrient.explicit && mergedOrient.value !== childOrient.value) {\n // TODO: throw warning if resolve is explicit (We don't have info about explicit/implicit resolve yet.)\n // Cannot merge due to inconsistent orient\n return undefined;\n }\n else {\n mergedAxisCmpts[i] = mergeAxisComponent(merged, child);\n }\n }\n }\n }\n else {\n // For first one, return a copy of the child\n return childAxisCmpts.map(axisComponent => axisComponent.clone());\n }\n return mergedAxisCmpts;\n}\nfunction mergeAxisComponent(merged, child) {\n for (const prop of AXIS_COMPONENT_PROPERTIES) {\n const mergedValueWithExplicit = mergeValuesWithExplicit(merged.getWithExplicit(prop), child.getWithExplicit(prop), prop, 'axis', \n // Tie breaker function\n (v1, v2) => {\n switch (prop) {\n case 'title':\n return mergeTitleComponent(v1, v2);\n case 'gridScale':\n return {\n explicit: v1.explicit,\n value: getFirstDefined(v1.value, v2.value)\n };\n }\n return defaultTieBreaker(v1, v2, prop, 'axis');\n });\n merged.setWithExplicit(prop, mergedValueWithExplicit);\n }\n return merged;\n}\nfunction isExplicit(value, property, axis, model, channel) {\n if (property === 'disable') {\n return axis !== undefined; // if axis is specified or null/false, then its enable/disable state is explicit\n }\n axis = axis || {};\n switch (property) {\n case 'titleAngle':\n case 'labelAngle':\n return value === (isSignalRef(axis.labelAngle) ? axis.labelAngle : normalizeAngle(axis.labelAngle));\n case 'values':\n return !!axis.values;\n // specified axis.values is already respected, but may get transformed.\n case 'encode':\n // both VL axis.encoding and axis.labelAngle affect VG axis.encode\n return !!axis.encoding || !!axis.labelAngle;\n case 'title':\n // title can be explicit if fieldDef.title is set\n if (value === getFieldDefTitle(model, channel)) {\n return true;\n }\n }\n // Otherwise, things are explicit if the returned value matches the specified property\n return value === axis[property];\n}\n/**\n * Properties to always include values from config\n */\nconst propsToAlwaysIncludeConfig = new Set([\n 'grid',\n 'translate',\n // the rest are not axis configs in Vega, but are in VL, so we need to set too.\n 'format',\n 'formatType',\n 'orient',\n 'labelExpr',\n 'tickCount',\n 'position',\n 'tickMinStep'\n]);\nfunction parseAxis(channel, model) {\n var _a, _b, _c;\n let axis = model.axis(channel);\n const axisComponent = new AxisComponent();\n const fieldOrDatumDef = getFieldOrDatumDef(model.encoding[channel]);\n const { mark, config } = model;\n const orient = (axis === null || axis === void 0 ? void 0 : axis.orient) ||\n ((_a = config[channel === 'x' ? 'axisX' : 'axisY']) === null || _a === void 0 ? void 0 : _a.orient) ||\n ((_b = config.axis) === null || _b === void 0 ? void 0 : _b.orient) ||\n defaultOrient(channel);\n const scaleType = model.getScaleComponent(channel).get('type');\n const axisConfigs = getAxisConfigs(channel, scaleType, orient, model.config);\n const disable = axis !== undefined ? !axis : getAxisConfig('disable', config.style, axis === null || axis === void 0 ? void 0 : axis.style, axisConfigs).configValue;\n axisComponent.set('disable', disable, axis !== undefined);\n if (disable) {\n return axisComponent;\n }\n axis = axis || {};\n const labelAngle = getLabelAngle(fieldOrDatumDef, axis, channel, config.style, axisConfigs);\n const ruleParams = {\n fieldOrDatumDef,\n axis,\n channel,\n model,\n scaleType,\n orient,\n labelAngle,\n mark,\n config\n };\n // 1.2. Add properties\n for (const property of AXIS_COMPONENT_PROPERTIES) {\n const value = property in axisRules ? axisRules[property](ruleParams) : isAxisProperty(property) ? axis[property] : undefined;\n const hasValue = value !== undefined;\n const explicit = isExplicit(value, property, axis, model, channel);\n if (hasValue && explicit) {\n axisComponent.set(property, value, explicit);\n }\n else {\n const { configValue = undefined, configFrom = undefined } = isAxisProperty(property) && property !== 'values'\n ? getAxisConfig(property, config.style, axis.style, axisConfigs)\n : {};\n const hasConfigValue = configValue !== undefined;\n if (hasValue && !hasConfigValue) {\n // only set property if it is explicitly set or has no config value (otherwise we will accidentally override config)\n axisComponent.set(property, value, explicit);\n }\n else if (\n // Cases need implicit values\n // 1. Axis config that aren't available in Vega\n !(configFrom === 'vgAxisConfig') ||\n // 2. Certain properties are always included (see `propsToAlwaysIncludeConfig`'s declaration for more details)\n (propsToAlwaysIncludeConfig.has(property) && hasConfigValue) ||\n // 3. Conditional axis values and signals\n isConditionalAxisValue(configValue) ||\n isSignalRef(configValue)) {\n // If a config is specified and is conditional, copy conditional value from axis config\n axisComponent.set(property, configValue, false);\n }\n }\n }\n // 2) Add guide encode definition groups\n const axisEncoding = (_c = axis.encoding) !== null && _c !== void 0 ? _c : {};\n const axisEncode = AXIS_PARTS.reduce((e, part) => {\n var _a;\n if (!axisComponent.hasAxisPart(part)) {\n // No need to create encode for a disabled part.\n return e;\n }\n const axisEncodingPart = guideEncodeEntry((_a = axisEncoding[part]) !== null && _a !== void 0 ? _a : {}, model);\n const value = part === 'labels' ? encode.labels(model, channel, axisEncodingPart) : axisEncodingPart;\n if (value !== undefined && !isEmpty(value)) {\n e[part] = { update: value };\n }\n return e;\n }, {});\n // FIXME: By having encode as one property, we won't have fine grained encode merging.\n if (!isEmpty(axisEncode)) {\n axisComponent.set('encode', axisEncode, !!axis.encoding || axis.labelAngle !== undefined);\n }\n return axisComponent;\n}\n//# sourceMappingURL=parse.js.map","import { getSecondaryRangeChannel } from '../../channel';\nimport { getFieldOrDatumDef } from '../../channeldef';\nimport { formatCustomType, isCustomFormatType } from '../format';\nexport function labels(model, channel, specifiedLabelsSpec) {\n var _a;\n const { encoding, config } = model;\n const fieldOrDatumDef = (_a = getFieldOrDatumDef(encoding[channel])) !== null && _a !== void 0 ? _a : getFieldOrDatumDef(encoding[getSecondaryRangeChannel(channel)]);\n const axis = model.axis(channel) || {};\n const { format, formatType } = axis;\n if (isCustomFormatType(formatType)) {\n return Object.assign({ text: formatCustomType({\n fieldOrDatumDef,\n field: 'datum.value',\n format,\n formatType,\n config\n }) }, specifiedLabelsSpec);\n }\n return specifiedLabelsSpec;\n}\n//# sourceMappingURL=encode.js.map","import { getSizeChannel, POSITION_SCALE_CHANNELS } from '../../channel';\nimport { isContinuousFieldOrDatumDef } from '../../channeldef';\nimport * as log from '../../log';\nimport { isStep } from '../../spec/base';\nexport function initLayoutSize({ encoding, size }) {\n for (const channel of POSITION_SCALE_CHANNELS) {\n const sizeType = getSizeChannel(channel);\n if (isStep(size[sizeType])) {\n if (isContinuousFieldOrDatumDef(encoding[channel])) {\n delete size[sizeType];\n log.warn(log.message.stepDropped(sizeType));\n }\n }\n }\n return size;\n}\n//# sourceMappingURL=init.js.map","import { isBinned, isBinning } from '../../bin';\nimport { isContinuousFieldOrDatumDef, isFieldDef, isNumericDataDef } from '../../channeldef';\nimport { isAggregate } from '../../encoding';\nimport { replaceExprRef } from '../../expr';\nimport * as log from '../../log';\nimport { AREA, BAR, BAR_CORNER_RADIUS_INDEX as BAR_CORNER_RADIUS_END_INDEX, CIRCLE, IMAGE, LINE, POINT, RECT, RULE, SQUARE, TEXT, TICK } from '../../mark';\nimport { QUANTITATIVE, TEMPORAL } from '../../type';\nimport { contains, getFirstDefined } from '../../util';\nimport { getMarkConfig, getMarkPropOrConfig } from '../common';\nexport function initMarkdef(originalMarkDef, encoding, config) {\n // FIXME: markDef expects that exprRefs are replaced recursively but replaceExprRef only replaces the top level\n const markDef = replaceExprRef(originalMarkDef);\n // set orient, which can be overridden by rules as sometimes the specified orient is invalid.\n const specifiedOrient = getMarkPropOrConfig('orient', markDef, config);\n markDef.orient = orient(markDef.type, encoding, specifiedOrient);\n if (specifiedOrient !== undefined && specifiedOrient !== markDef.orient) {\n log.warn(log.message.orientOverridden(markDef.orient, specifiedOrient));\n }\n if (markDef.type === 'bar' && markDef.orient) {\n const cornerRadiusEnd = getMarkPropOrConfig('cornerRadiusEnd', markDef, config);\n if (cornerRadiusEnd !== undefined) {\n const newProps = (markDef.orient === 'horizontal' && encoding.x2) || (markDef.orient === 'vertical' && encoding.y2)\n ? ['cornerRadius']\n : BAR_CORNER_RADIUS_END_INDEX[markDef.orient];\n for (const newProp of newProps) {\n markDef[newProp] = cornerRadiusEnd;\n }\n if (markDef.cornerRadiusEnd !== undefined) {\n delete markDef.cornerRadiusEnd; // no need to keep the original cap cornerRadius\n }\n }\n }\n // set opacity and filled if not specified in mark config\n const specifiedOpacity = getMarkPropOrConfig('opacity', markDef, config);\n if (specifiedOpacity === undefined) {\n markDef.opacity = opacity(markDef.type, encoding);\n }\n // set cursor, which should be pointer if href channel is present unless otherwise specified\n const specifiedCursor = getMarkPropOrConfig('cursor', markDef, config);\n if (specifiedCursor === undefined) {\n markDef.cursor = cursor(markDef, encoding, config);\n }\n return markDef;\n}\nfunction cursor(markDef, encoding, config) {\n if (encoding.href || markDef.href || getMarkPropOrConfig('href', markDef, config)) {\n return 'pointer';\n }\n return markDef.cursor;\n}\nfunction opacity(mark, encoding) {\n if (contains([POINT, TICK, CIRCLE, SQUARE], mark)) {\n // point-based marks\n if (!isAggregate(encoding)) {\n return 0.7;\n }\n }\n return undefined;\n}\nexport function defaultFilled(markDef, config, { graticule }) {\n if (graticule) {\n return false;\n }\n const filledConfig = getMarkConfig('filled', markDef, config);\n const mark = markDef.type;\n return getFirstDefined(filledConfig, mark !== POINT && mark !== LINE && mark !== RULE);\n}\nfunction orient(mark, encoding, specifiedOrient) {\n switch (mark) {\n case POINT:\n case CIRCLE:\n case SQUARE:\n case TEXT:\n case RECT:\n case IMAGE:\n // orient is meaningless for these marks.\n return undefined;\n }\n const { x, y, x2, y2 } = encoding;\n switch (mark) {\n case BAR:\n if (isFieldDef(x) && (isBinned(x.bin) || (isFieldDef(y) && y.aggregate && !x.aggregate))) {\n return 'vertical';\n }\n if (isFieldDef(y) && (isBinned(y.bin) || (isFieldDef(x) && x.aggregate && !y.aggregate))) {\n return 'horizontal';\n }\n if (y2 || x2) {\n // Ranged bar does not always have clear orientation, so we allow overriding\n if (specifiedOrient) {\n return specifiedOrient;\n }\n // If y is range and x is non-range, non-bin Q, y is likely a prebinned field\n if (!x2) {\n if ((isFieldDef(x) && x.type === QUANTITATIVE && !isBinning(x.bin)) || isNumericDataDef(x)) {\n return 'horizontal';\n }\n }\n // If x is range and y is non-range, non-bin Q, x is likely a prebinned field\n if (!y2) {\n if ((isFieldDef(y) && y.type === QUANTITATIVE && !isBinning(y.bin)) || isNumericDataDef(y)) {\n return 'vertical';\n }\n }\n }\n // falls through\n case RULE:\n // return undefined for line segment rule and bar with both axis ranged\n // we have to ignore the case that the data are already binned\n if (x2 && !(isFieldDef(x) && isBinned(x.bin)) && y2 && !(isFieldDef(y) && isBinned(y.bin))) {\n return undefined;\n }\n // falls through\n case AREA:\n // If there are range for both x and y, y (vertical) has higher precedence.\n if (y2) {\n if (isFieldDef(y) && isBinned(y.bin)) {\n return 'horizontal';\n }\n else {\n return 'vertical';\n }\n }\n else if (x2) {\n if (isFieldDef(x) && isBinned(x.bin)) {\n return 'vertical';\n }\n else {\n return 'horizontal';\n }\n }\n else if (mark === RULE) {\n if (x && !y) {\n return 'vertical';\n }\n else if (y && !x) {\n return 'horizontal';\n }\n }\n // falls through\n case LINE:\n case TICK: {\n // Tick is opposite to bar, line, area and never have ranged mark.\n const xIsContinuous = isContinuousFieldOrDatumDef(x);\n const yIsContinuous = isContinuousFieldOrDatumDef(y);\n if (specifiedOrient) {\n return specifiedOrient;\n }\n else if (xIsContinuous && !yIsContinuous) {\n return mark !== 'tick' ? 'horizontal' : 'vertical';\n }\n else if (!xIsContinuous && yIsContinuous) {\n return mark !== 'tick' ? 'vertical' : 'horizontal';\n }\n else if (xIsContinuous && yIsContinuous) {\n const xDef = x; // we can cast here since they are surely fieldDef\n const yDef = y;\n const xIsTemporal = xDef.type === TEMPORAL;\n const yIsTemporal = yDef.type === TEMPORAL;\n // temporal without timeUnit is considered continuous, but better serves as dimension\n if (xIsTemporal && !yIsTemporal) {\n return mark !== 'tick' ? 'vertical' : 'horizontal';\n }\n else if (!xIsTemporal && yIsTemporal) {\n return mark !== 'tick' ? 'horizontal' : 'vertical';\n }\n if (!xDef.aggregate && yDef.aggregate) {\n return mark !== 'tick' ? 'vertical' : 'horizontal';\n }\n else if (xDef.aggregate && !yDef.aggregate) {\n return mark !== 'tick' ? 'horizontal' : 'vertical';\n }\n return 'vertical';\n }\n else {\n return undefined;\n }\n }\n }\n return 'vertical';\n}\n//# sourceMappingURL=init.js.map","import * as encode from './encode';\nfunction encodeEntry(model, fixedShape) {\n const { config } = model;\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n size: 'include',\n orient: 'ignore',\n theta: 'ignore'\n })), encode.pointPosition('x', model, { defaultPos: 'mid' })), encode.pointPosition('y', model, { defaultPos: 'mid' })), encode.nonPosition('size', model)), encode.nonPosition('angle', model)), shapeMixins(model, config, fixedShape));\n}\nexport function shapeMixins(model, config, fixedShape) {\n if (fixedShape) {\n return { shape: { value: fixedShape } };\n }\n return encode.nonPosition('shape', model);\n}\nexport const point = {\n vgMark: 'symbol',\n encodeEntry: (model) => {\n return encodeEntry(model);\n }\n};\nexport const circle = {\n vgMark: 'symbol',\n encodeEntry: (model) => {\n return encodeEntry(model, 'circle');\n }\n};\nexport const square = {\n vgMark: 'symbol',\n encodeEntry: (model) => {\n return encodeEntry(model, 'square');\n }\n};\n//# sourceMappingURL=point.js.map","import { isNumber } from 'vega-util';\nimport { getViewConfigDiscreteStep } from '../../config';\nimport { isVgRangeStep } from '../../vega.schema';\nimport { getMarkPropOrConfig, signalOrValueRef } from '../common';\nimport * as encode from './encode';\nexport const tick = {\n vgMark: 'rect',\n encodeEntry: (model) => {\n const { config, markDef } = model;\n const orient = markDef.orient;\n const vgSizeChannel = orient === 'horizontal' ? 'width' : 'height';\n const vgThicknessChannel = orient === 'horizontal' ? 'height' : 'width';\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n orient: 'ignore',\n size: 'ignore',\n theta: 'ignore'\n })), encode.pointPosition('x', model, { defaultPos: 'mid', vgChannel: 'xc' })), encode.pointPosition('y', model, { defaultPos: 'mid', vgChannel: 'yc' })), encode.nonPosition('size', model, {\n defaultValue: defaultSize(model),\n vgChannel: vgSizeChannel\n })), { [vgThicknessChannel]: signalOrValueRef(getMarkPropOrConfig('thickness', markDef, config)) });\n }\n};\nfunction defaultSize(model) {\n var _a;\n const { config, markDef } = model;\n const { orient } = markDef;\n const vgSizeChannel = orient === 'horizontal' ? 'width' : 'height';\n const scale = model.getScaleComponent(orient === 'horizontal' ? 'x' : 'y');\n const markPropOrConfig = (_a = getMarkPropOrConfig('size', markDef, config, { vgChannel: vgSizeChannel })) !== null && _a !== void 0 ? _a : config.tick.bandSize;\n if (markPropOrConfig !== undefined) {\n return markPropOrConfig;\n }\n else {\n const scaleRange = scale ? scale.get('range') : undefined;\n if (scaleRange && isVgRangeStep(scaleRange) && isNumber(scaleRange.step)) {\n return (scaleRange.step * 3) / 4;\n }\n const defaultViewStep = getViewConfigDiscreteStep(config.view, vgSizeChannel);\n return (defaultViewStep * 3) / 4;\n }\n}\n//# sourceMappingURL=tick.js.map","import { isArray } from 'vega-util';\nimport { isFieldDef, isValueDef, vgField } from '../../channeldef';\nimport { DataSourceType } from '../../data';\nimport { isAggregate, pathGroupingFields } from '../../encoding';\nimport { AREA, BAR, isPathMark, LINE, TRAIL } from '../../mark';\nimport { isSortByEncoding, isSortField } from '../../sort';\nimport { contains, getFirstDefined, isNullOrFalse, keys, omit, pick } from '../../util';\nimport { VG_CORNERRADIUS_CHANNELS } from '../../vega.schema';\nimport { getMarkConfig, getMarkPropOrConfig, getStyles, signalOrValueRef, sortParams } from '../common';\nimport { arc } from './arc';\nimport { area } from './area';\nimport { bar } from './bar';\nimport { geoshape } from './geoshape';\nimport { image } from './image';\nimport { line, trail } from './line';\nimport { circle, point, square } from './point';\nimport { rect } from './rect';\nimport { rule } from './rule';\nimport { text } from './text';\nimport { tick } from './tick';\nconst markCompiler = {\n arc,\n area,\n bar,\n circle,\n geoshape,\n image,\n line,\n point,\n rect,\n rule,\n square,\n text,\n tick,\n trail\n};\nexport function parseMarkGroups(model) {\n if (contains([LINE, AREA, TRAIL], model.mark)) {\n const details = pathGroupingFields(model.mark, model.encoding);\n if (details.length > 0) {\n return getPathGroups(model, details);\n }\n // otherwise use standard mark groups\n }\n else if (model.mark === BAR) {\n const hasCornerRadius = VG_CORNERRADIUS_CHANNELS.some(prop => getMarkPropOrConfig(prop, model.markDef, model.config));\n if (model.stack && !model.fieldDef('size') && hasCornerRadius) {\n return getGroupsForStackedBarWithCornerRadius(model);\n }\n }\n return getMarkGroup(model);\n}\nconst FACETED_PATH_PREFIX = 'faceted_path_';\nfunction getPathGroups(model, details) {\n // TODO: for non-stacked plot, map order to zindex. (Maybe rename order for layer to zindex?)\n return [\n {\n name: model.getName('pathgroup'),\n type: 'group',\n from: {\n facet: {\n name: FACETED_PATH_PREFIX + model.requestDataName(DataSourceType.Main),\n data: model.requestDataName(DataSourceType.Main),\n groupby: details\n }\n },\n encode: {\n update: {\n width: { field: { group: 'width' } },\n height: { field: { group: 'height' } }\n }\n },\n // With subfacet for line/area group, need to use faceted data from above.\n marks: getMarkGroup(model, { fromPrefix: FACETED_PATH_PREFIX })\n }\n ];\n}\nconst STACK_GROUP_PREFIX = 'stack_group_';\n/**\n * We need to put stacked bars into groups in order to enable cornerRadius for stacks.\n * If stack is used and the model doesn't have size encoding, we put the mark into groups,\n * and apply cornerRadius properties at the group.\n */\nfunction getGroupsForStackedBarWithCornerRadius(model) {\n // Generate the mark\n const [mark] = getMarkGroup(model, { fromPrefix: STACK_GROUP_PREFIX });\n // Get the scale for the stacked field\n const fieldScale = model.scaleName(model.stack.fieldChannel);\n const stackField = (opt = {}) => model.vgField(model.stack.fieldChannel, opt);\n // Find the min/max of the pixel value on the stacked direction\n const stackFieldGroup = (func, expr) => {\n const vgFieldMinMax = [\n stackField({ prefix: 'min', suffix: 'start', expr }),\n stackField({ prefix: 'max', suffix: 'start', expr }),\n stackField({ prefix: 'min', suffix: 'end', expr }),\n stackField({ prefix: 'max', suffix: 'end', expr })\n ];\n return `${func}(${vgFieldMinMax.map(field => `scale('${fieldScale}',${field})`).join(',')})`;\n };\n let groupUpdate;\n let innerGroupUpdate;\n // Build the encoding for group and an inner group\n if (model.stack.fieldChannel === 'x') {\n // Move cornerRadius, y/yc/y2/height properties to group\n // Group x/x2 should be the min/max of the marks within\n groupUpdate = Object.assign(Object.assign({}, pick(mark.encode.update, ['y', 'yc', 'y2', 'height', ...VG_CORNERRADIUS_CHANNELS])), { x: { signal: stackFieldGroup('min', 'datum') }, x2: { signal: stackFieldGroup('max', 'datum') }, clip: { value: true } });\n // Inner group should revert the x translation, and pass height through\n innerGroupUpdate = {\n x: { field: { group: 'x' }, mult: -1 },\n height: { field: { group: 'height' } }\n };\n // The marks should use the same height as group, without y/yc/y2 properties (because it's already done by group)\n // This is why size encoding is not supported yet\n mark.encode.update = Object.assign(Object.assign({}, omit(mark.encode.update, ['y', 'yc', 'y2'])), { height: { field: { group: 'height' } } });\n }\n else {\n groupUpdate = Object.assign(Object.assign({}, pick(mark.encode.update, ['x', 'xc', 'x2', 'width'])), { y: { signal: stackFieldGroup('min', 'datum') }, y2: { signal: stackFieldGroup('max', 'datum') }, clip: { value: true } });\n innerGroupUpdate = {\n y: { field: { group: 'y' }, mult: -1 },\n width: { field: { group: 'width' } }\n };\n mark.encode.update = Object.assign(Object.assign({}, omit(mark.encode.update, ['x', 'xc', 'x2'])), { width: { field: { group: 'width' } } });\n }\n // Deal with cornerRadius properties\n for (const key of VG_CORNERRADIUS_CHANNELS) {\n const configValue = getMarkConfig(key, model.markDef, model.config);\n // Move from mark to group\n if (mark.encode.update[key]) {\n groupUpdate[key] = mark.encode.update[key];\n delete mark.encode.update[key];\n }\n else if (configValue) {\n groupUpdate[key] = signalOrValueRef(configValue);\n }\n // Overwrite any cornerRadius on mark set by config --- they are already moved to the group\n if (configValue) {\n mark.encode.update[key] = { value: 0 };\n }\n }\n const groupby = [];\n if (model.stack.groupbyChannel) {\n // For bin and time unit, we have to add bin/timeunit -end channels.\n const groupByField = model.fieldDef(model.stack.groupbyChannel);\n const field = vgField(groupByField);\n if (field) {\n groupby.push(field);\n }\n if ((groupByField === null || groupByField === void 0 ? void 0 : groupByField.bin) || (groupByField === null || groupByField === void 0 ? void 0 : groupByField.timeUnit)) {\n groupby.push(vgField(groupByField, { binSuffix: 'end' }));\n }\n }\n const strokeProperties = [\n 'stroke',\n 'strokeWidth',\n 'strokeJoin',\n 'strokeCap',\n 'strokeDash',\n 'strokeDashOffset',\n 'strokeMiterLimit',\n 'strokeOpacity'\n ];\n // Generate stroke properties for the group\n groupUpdate = strokeProperties.reduce((encode, prop) => {\n if (mark.encode.update[prop]) {\n return Object.assign(Object.assign({}, encode), { [prop]: mark.encode.update[prop] });\n }\n else {\n const configValue = getMarkConfig(prop, model.markDef, model.config);\n if (configValue !== undefined) {\n return Object.assign(Object.assign({}, encode), { [prop]: signalOrValueRef(configValue) });\n }\n else {\n return encode;\n }\n }\n }, groupUpdate);\n // Apply strokeForeground and strokeOffset if stroke is used\n if (groupUpdate.stroke) {\n groupUpdate.strokeForeground = { value: true };\n groupUpdate.strokeOffset = { value: 0 };\n }\n return [\n {\n type: 'group',\n from: {\n facet: {\n data: model.requestDataName(DataSourceType.Main),\n name: STACK_GROUP_PREFIX + model.requestDataName(DataSourceType.Main),\n groupby,\n aggregate: {\n fields: [\n stackField({ suffix: 'start' }),\n stackField({ suffix: 'start' }),\n stackField({ suffix: 'end' }),\n stackField({ suffix: 'end' })\n ],\n ops: ['min', 'max', 'min', 'max']\n }\n }\n },\n encode: {\n update: groupUpdate\n },\n marks: [\n {\n type: 'group',\n encode: { update: innerGroupUpdate },\n marks: [mark]\n }\n ]\n }\n ];\n}\nexport function getSort(model) {\n var _a;\n const { encoding, stack, mark, markDef, config } = model;\n const order = encoding.order;\n if ((!isArray(order) && isValueDef(order) && isNullOrFalse(order.value)) ||\n (!order && isNullOrFalse(getMarkPropOrConfig('order', markDef, config)))) {\n return undefined;\n }\n else if ((isArray(order) || isFieldDef(order)) && !stack) {\n // Sort by the order field if it is specified and the field is not stacked. (For stacked field, order specify stack order.)\n return sortParams(order, { expr: 'datum' });\n }\n else if (isPathMark(mark)) {\n // For both line and area, we sort values based on dimension by default\n const dimensionChannel = markDef.orient === 'horizontal' ? 'y' : 'x';\n const dimensionChannelDef = encoding[dimensionChannel];\n if (isFieldDef(dimensionChannelDef)) {\n const s = dimensionChannelDef.sort;\n if (isArray(s)) {\n return {\n field: vgField(dimensionChannelDef, { prefix: dimensionChannel, suffix: 'sort_index', expr: 'datum' })\n };\n }\n else if (isSortField(s)) {\n return {\n field: vgField({\n // FIXME: this op might not already exist?\n // FIXME: what if dimensionChannel (x or y) contains custom domain?\n aggregate: isAggregate(model.encoding) ? s.op : undefined,\n field: s.field\n }, { expr: 'datum' })\n };\n }\n else if (isSortByEncoding(s)) {\n const fieldDefToSort = model.fieldDef(s.encoding);\n return {\n field: vgField(fieldDefToSort, { expr: 'datum' }),\n order: s.order\n };\n }\n else if (s === null) {\n return undefined;\n }\n else {\n return {\n field: vgField(dimensionChannelDef, {\n // For stack with imputation, we only have bin_mid\n binSuffix: ((_a = model.stack) === null || _a === void 0 ? void 0 : _a.impute) ? 'mid' : undefined,\n expr: 'datum'\n })\n };\n }\n }\n return undefined;\n }\n return undefined;\n}\nfunction getMarkGroup(model, opt = { fromPrefix: '' }) {\n const { mark, markDef, encoding, config } = model;\n const clip = getFirstDefined(markDef.clip, scaleClip(model), projectionClip(model));\n const style = getStyles(markDef);\n const key = encoding.key;\n const sort = getSort(model);\n const interactive = interactiveFlag(model);\n const aria = getMarkPropOrConfig('aria', markDef, config);\n const postEncodingTransform = markCompiler[mark].postEncodingTransform\n ? markCompiler[mark].postEncodingTransform(model)\n : null;\n return [\n Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name: model.getName('marks'), type: markCompiler[mark].vgMark }, (clip ? { clip: true } : {})), (style ? { style } : {})), (key ? { key: key.field } : {})), (sort ? { sort } : {})), (interactive ? interactive : {})), (aria === false ? { aria } : {})), { from: { data: opt.fromPrefix + model.requestDataName(DataSourceType.Main) }, encode: {\n update: markCompiler[mark].encodeEntry(model)\n } }), (postEncodingTransform\n ? {\n transform: postEncodingTransform\n }\n : {}))\n ];\n}\n/**\n * If scales are bound to interval selections, we want to automatically clip\n * marks to account for panning/zooming interactions. We identify bound scales\n * by the selectionExtent property, which gets added during scale parsing.\n */\nfunction scaleClip(model) {\n const xScale = model.getScaleComponent('x');\n const yScale = model.getScaleComponent('y');\n return (xScale && xScale.get('selectionExtent')) || (yScale && yScale.get('selectionExtent')) ? true : undefined;\n}\n/**\n * If we use a custom projection with auto-fitting to the geodata extent,\n * we need to clip to ensure the chart size doesn't explode.\n */\nfunction projectionClip(model) {\n const projection = model.component.projection;\n return projection && !projection.isFit ? true : undefined;\n}\n/**\n * Only output interactive flags if we have selections defined somewhere in our model hierarchy.\n */\nfunction interactiveFlag(model) {\n if (!model.component.selection)\n return null;\n const unitCount = keys(model.component.selection).length;\n let parentCount = unitCount;\n let parent = model.parent;\n while (parent && parentCount === 0) {\n parentCount = keys(parent.component.selection).length;\n parent = parent.parent;\n }\n return parentCount\n ? {\n interactive: unitCount > 0 || !!model.encoding.tooltip\n }\n : null;\n}\n//# sourceMappingURL=mark.js.map","import * as encode from './encode';\nexport const arc = {\n vgMark: 'arc',\n encodeEntry: (model) => {\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n size: 'ignore',\n orient: 'ignore',\n theta: 'ignore'\n })), encode.pointPosition('x', model, { defaultPos: 'mid' })), encode.pointPosition('y', model, { defaultPos: 'mid' })), encode.rectPosition(model, 'radius', 'arc')), encode.rectPosition(model, 'theta', 'arc'));\n }\n};\n//# sourceMappingURL=arc.js.map","import * as encode from './encode';\nexport const area = {\n vgMark: 'area',\n encodeEntry: (model) => {\n return Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n orient: 'include',\n size: 'ignore',\n theta: 'ignore'\n })), encode.pointOrRangePosition('x', model, {\n defaultPos: 'zeroOrMin',\n defaultPos2: 'zeroOrMin',\n range: model.markDef.orient === 'horizontal'\n })), encode.pointOrRangePosition('y', model, {\n defaultPos: 'zeroOrMin',\n defaultPos2: 'zeroOrMin',\n range: model.markDef.orient === 'vertical'\n })), encode.defined(model));\n }\n};\n//# sourceMappingURL=area.js.map","import * as encode from './encode';\nexport const bar = {\n vgMark: 'rect',\n encodeEntry: (model) => {\n return Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n orient: 'ignore',\n size: 'ignore',\n theta: 'ignore'\n })), encode.rectPosition(model, 'x', 'bar')), encode.rectPosition(model, 'y', 'bar'));\n }\n};\n//# sourceMappingURL=bar.js.map","import { isFieldDef, vgField } from '../../channeldef';\nimport { GEOJSON } from '../../type';\nimport * as encode from './encode';\nexport const geoshape = {\n vgMark: 'shape',\n encodeEntry: (model) => {\n return Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n size: 'ignore',\n orient: 'ignore',\n theta: 'ignore'\n }));\n },\n postEncodingTransform: (model) => {\n const { encoding } = model;\n const shapeDef = encoding.shape;\n const transform = Object.assign({ type: 'geoshape', projection: model.projectionName() }, (shapeDef && isFieldDef(shapeDef) && shapeDef.type === GEOJSON\n ? { field: vgField(shapeDef, { expr: 'datum' }) }\n : {}));\n return [transform];\n }\n};\n//# sourceMappingURL=geoshape.js.map","import * as encode from './encode';\nexport const image = {\n vgMark: 'image',\n encodeEntry: (model) => {\n return Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'ignore',\n orient: 'ignore',\n size: 'ignore',\n theta: 'ignore'\n })), encode.rectPosition(model, 'x', 'image')), encode.rectPosition(model, 'y', 'image')), encode.text(model, 'url'));\n }\n};\n//# sourceMappingURL=image.js.map","import * as encode from './encode';\nexport const line = {\n vgMark: 'line',\n encodeEntry: (model) => {\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n size: 'ignore',\n orient: 'ignore',\n theta: 'ignore'\n })), encode.pointPosition('x', model, { defaultPos: 'mid' })), encode.pointPosition('y', model, { defaultPos: 'mid' })), encode.nonPosition('size', model, {\n vgChannel: 'strokeWidth' // VL's line size is strokeWidth\n })), encode.defined(model));\n }\n};\nexport const trail = {\n vgMark: 'trail',\n encodeEntry: (model) => {\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n size: 'include',\n orient: 'ignore',\n theta: 'ignore'\n })), encode.pointPosition('x', model, { defaultPos: 'mid' })), encode.pointPosition('y', model, { defaultPos: 'mid' })), encode.nonPosition('size', model)), encode.defined(model));\n }\n};\n//# sourceMappingURL=line.js.map","import * as encode from './encode';\nexport const rect = {\n vgMark: 'rect',\n encodeEntry: (model) => {\n return Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n orient: 'ignore',\n size: 'ignore',\n theta: 'ignore'\n })), encode.rectPosition(model, 'x', 'rect')), encode.rectPosition(model, 'y', 'rect'));\n }\n};\n//# sourceMappingURL=rect.js.map","import * as encode from './encode';\nexport const rule = {\n vgMark: 'rule',\n encodeEntry: (model) => {\n const { markDef } = model;\n const orient = markDef.orient;\n if (!model.encoding.x && !model.encoding.y && !model.encoding.latitude && !model.encoding.longitude) {\n // Show nothing if we have none of x, y, lat, and long.\n return {};\n }\n return Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'ignore',\n baseline: 'ignore',\n color: 'include',\n orient: 'ignore',\n size: 'ignore',\n theta: 'ignore'\n })), encode.pointOrRangePosition('x', model, {\n defaultPos: orient === 'horizontal' ? 'zeroOrMax' : 'mid',\n defaultPos2: 'zeroOrMin',\n range: orient !== 'vertical' // include x2 for horizontal or line segment rule\n })), encode.pointOrRangePosition('y', model, {\n defaultPos: orient === 'vertical' ? 'zeroOrMax' : 'mid',\n defaultPos2: 'zeroOrMin',\n range: orient !== 'horizontal' // include y2 for vertical or line segment rule\n })), encode.nonPosition('size', model, {\n vgChannel: 'strokeWidth' // VL's rule size is strokeWidth\n }));\n }\n};\n//# sourceMappingURL=rule.js.map","import { getMarkPropOrConfig } from '../common';\nimport * as encode from './encode';\nexport const text = {\n vgMark: 'text',\n encodeEntry: (model) => {\n const { config, encoding } = model;\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, encode.baseEncodeEntry(model, {\n align: 'include',\n baseline: 'include',\n color: 'include',\n size: 'ignore',\n orient: 'ignore',\n theta: 'include'\n })), encode.pointPosition('x', model, { defaultPos: 'mid' })), encode.pointPosition('y', model, { defaultPos: 'mid' })), encode.text(model)), encode.nonPosition('size', model, {\n vgChannel: 'fontSize' // VL's text size is fontSize\n })), encode.nonPosition('angle', model)), encode.valueIfDefined('align', align(model.markDef, encoding, config))), encode.valueIfDefined('baseline', baseline(model.markDef, encoding, config))), encode.pointPosition('radius', model, { defaultPos: null })), encode.pointPosition('theta', model, { defaultPos: null }));\n }\n};\nfunction align(markDef, encoding, config) {\n const a = getMarkPropOrConfig('align', markDef, config);\n if (a === undefined) {\n return 'center';\n }\n // If there is a config, Vega-parser will process this already.\n return undefined;\n}\nfunction baseline(markDef, encoding, config) {\n const b = getMarkPropOrConfig('baseline', markDef, config);\n if (b === undefined) {\n return 'middle';\n }\n // If there is a config, Vega-parser will process this already.\n return undefined;\n}\n//# sourceMappingURL=text.js.map","import { isArray } from 'vega-util';\nimport { isConditionalAxisValue } from '../axis';\nimport { GEOPOSITION_CHANNELS, NONPOSITION_SCALE_CHANNELS, POSITION_SCALE_CHANNELS, SCALE_CHANNELS, supportLegend, X, Y } from '../channel';\nimport { getFieldDef, getFieldOrDatumDef, isFieldOrDatumDef, isTypedFieldDef } from '../channeldef';\nimport { isGraticuleGenerator } from '../data';\nimport * as vlEncoding from '../encoding';\nimport { initEncoding } from '../encoding';\nimport { replaceExprRef } from '../expr';\nimport { GEOSHAPE, isMarkDef } from '../mark';\nimport { isSelectionParameter } from '../selection';\nimport { isFrameMixins } from '../spec/base';\nimport { stack } from '../stack';\nimport { keys } from '../util';\nimport { assembleAxisSignals } from './axis/assemble';\nimport { parseUnitAxes } from './axis/parse';\nimport { signalOrValueRefWithCondition, signalRefOrValue } from './common';\nimport { parseData } from './data/parse';\nimport { assembleLayoutSignals } from './layoutsize/assemble';\nimport { initLayoutSize } from './layoutsize/init';\nimport { parseUnitLayoutSize } from './layoutsize/parse';\nimport { defaultFilled, initMarkdef } from './mark/init';\nimport { parseMarkGroups } from './mark/mark';\nimport { isLayerModel, ModelWithField } from './model';\nimport { assembleTopLevelSignals, assembleUnitSelectionData, assembleUnitSelectionMarks, assembleUnitSelectionSignals } from './selection/assemble';\nimport { parseUnitSelection } from './selection/parse';\n/**\n * Internal model of Vega-Lite specification for the compiler.\n */\nexport class UnitModel extends ModelWithField {\n constructor(spec, parent, parentGivenName, parentGivenSize = {}, config) {\n var _a;\n super(spec, 'unit', parent, parentGivenName, config, undefined, isFrameMixins(spec) ? spec.view : undefined);\n this.specifiedScales = {};\n this.specifiedAxes = {};\n this.specifiedLegends = {};\n this.specifiedProjection = {};\n this.selection = [];\n this.children = [];\n const markDef = isMarkDef(spec.mark) ? Object.assign({}, spec.mark) : { type: spec.mark };\n const mark = markDef.type;\n // Need to init filled before other mark properties because encoding depends on filled but other mark properties depend on types inside encoding\n if (markDef.filled === undefined) {\n markDef.filled = defaultFilled(markDef, config, {\n graticule: spec.data && isGraticuleGenerator(spec.data)\n });\n }\n const encoding = (this.encoding = initEncoding(spec.encoding || {}, mark, markDef.filled, config));\n this.markDef = initMarkdef(markDef, encoding, config);\n this.size = initLayoutSize({\n encoding: encoding,\n size: isFrameMixins(spec)\n ? Object.assign(Object.assign(Object.assign({}, parentGivenSize), (spec.width ? { width: spec.width } : {})), (spec.height ? { height: spec.height } : {})) : parentGivenSize\n });\n // calculate stack properties\n this.stack = stack(mark, encoding);\n this.specifiedScales = this.initScales(mark, encoding);\n this.specifiedAxes = this.initAxes(encoding);\n this.specifiedLegends = this.initLegends(encoding);\n this.specifiedProjection = spec.projection;\n // Selections will be initialized upon parse.\n this.selection = ((_a = spec.params) !== null && _a !== void 0 ? _a : []).filter(p => isSelectionParameter(p));\n }\n get hasProjection() {\n const { encoding } = this;\n const isGeoShapeMark = this.mark === GEOSHAPE;\n const hasGeoPosition = encoding && GEOPOSITION_CHANNELS.some(channel => isFieldOrDatumDef(encoding[channel]));\n return isGeoShapeMark || hasGeoPosition;\n }\n /**\n * Return specified Vega-Lite scale domain for a particular channel\n * @param channel\n */\n scaleDomain(channel) {\n const scale = this.specifiedScales[channel];\n return scale ? scale.domain : undefined;\n }\n axis(channel) {\n return this.specifiedAxes[channel];\n }\n legend(channel) {\n return this.specifiedLegends[channel];\n }\n initScales(mark, encoding) {\n return SCALE_CHANNELS.reduce((scales, channel) => {\n var _a;\n const fieldOrDatumDef = getFieldOrDatumDef(encoding[channel]);\n if (fieldOrDatumDef) {\n scales[channel] = this.initScale((_a = fieldOrDatumDef.scale) !== null && _a !== void 0 ? _a : {});\n }\n return scales;\n }, {});\n }\n initScale(scale) {\n const { domain, range } = scale;\n // TODO: we could simplify this function if we had a recursive replace function\n const scaleInternal = replaceExprRef(scale);\n if (isArray(domain)) {\n scaleInternal.domain = domain.map(signalRefOrValue);\n }\n if (isArray(range)) {\n scaleInternal.range = range.map(signalRefOrValue);\n }\n return scaleInternal;\n }\n initAxes(encoding) {\n return POSITION_SCALE_CHANNELS.reduce((_axis, channel) => {\n // Position Axis\n // TODO: handle ConditionFieldDef\n const channelDef = encoding[channel];\n if (isFieldOrDatumDef(channelDef) ||\n (channel === X && isFieldOrDatumDef(encoding.x2)) ||\n (channel === Y && isFieldOrDatumDef(encoding.y2))) {\n const axisSpec = isFieldOrDatumDef(channelDef) ? channelDef.axis : undefined;\n _axis[channel] = axisSpec\n ? this.initAxis(Object.assign({}, axisSpec)) // convert truthy value to object\n : axisSpec;\n }\n return _axis;\n }, {});\n }\n initAxis(axis) {\n const props = keys(axis);\n const axisInternal = {};\n for (const prop of props) {\n const val = axis[prop];\n axisInternal[prop] = isConditionalAxisValue(val)\n ? signalOrValueRefWithCondition(val)\n : signalRefOrValue(val);\n }\n return axisInternal;\n }\n initLegends(encoding) {\n return NONPOSITION_SCALE_CHANNELS.reduce((_legend, channel) => {\n const fieldOrDatumDef = getFieldOrDatumDef(encoding[channel]);\n if (fieldOrDatumDef && supportLegend(channel)) {\n const legend = fieldOrDatumDef.legend;\n _legend[channel] = legend\n ? replaceExprRef(legend) // convert truthy value to object\n : legend;\n }\n return _legend;\n }, {});\n }\n parseData() {\n this.component.data = parseData(this);\n }\n parseLayoutSize() {\n parseUnitLayoutSize(this);\n }\n parseSelections() {\n this.component.selection = parseUnitSelection(this, this.selection);\n }\n parseMarkGroup() {\n this.component.mark = parseMarkGroups(this);\n }\n parseAxesAndHeaders() {\n this.component.axes = parseUnitAxes(this);\n }\n assembleSelectionTopLevelSignals(signals) {\n return assembleTopLevelSignals(this, signals);\n }\n assembleSignals() {\n return [...assembleAxisSignals(this), ...assembleUnitSelectionSignals(this, [])];\n }\n assembleSelectionData(data) {\n return assembleUnitSelectionData(this, data);\n }\n assembleLayout() {\n return null;\n }\n assembleLayoutSignals() {\n return assembleLayoutSignals(this);\n }\n assembleMarks() {\n var _a;\n let marks = (_a = this.component.mark) !== null && _a !== void 0 ? _a : [];\n // If this unit is part of a layer, selections should augment\n // all in concert rather than each unit individually. This\n // ensures correct interleaving of clipping and brushed marks.\n if (!this.parent || !isLayerModel(this.parent)) {\n marks = assembleUnitSelectionMarks(this, marks);\n }\n return marks.map(this.correctDataNames);\n }\n assembleGroupStyle() {\n const { style } = this.view || {};\n if (style !== undefined) {\n return style;\n }\n if (this.encoding.x || this.encoding.y) {\n return 'cell';\n }\n else {\n return undefined;\n }\n }\n getMapping() {\n return this.encoding;\n }\n get mark() {\n return this.markDef.type;\n }\n channelHasField(channel) {\n return vlEncoding.channelHasField(this.encoding, channel);\n }\n fieldDef(channel) {\n const channelDef = this.encoding[channel];\n return getFieldDef(channelDef);\n }\n typedFieldDef(channel) {\n const fieldDef = this.fieldDef(channel);\n if (isTypedFieldDef(fieldDef)) {\n return fieldDef;\n }\n return null;\n }\n}\n//# sourceMappingURL=unit.js.map","import { array } from 'vega-util';\nimport * as log from '../log';\nimport { isLayerSpec, isUnitSpec } from '../spec';\nimport { keys } from '../util';\nimport { assembleAxisSignals } from './axis/assemble';\nimport { parseLayerAxes } from './axis/parse';\nimport { parseData } from './data/parse';\nimport { assembleLayoutSignals } from './layoutsize/assemble';\nimport { parseLayerLayoutSize } from './layoutsize/parse';\nimport { assembleLegends } from './legend/assemble';\nimport { Model } from './model';\nimport { assembleLayerSelectionMarks } from './selection/assemble';\nimport { UnitModel } from './unit';\nexport class LayerModel extends Model {\n constructor(spec, parent, parentGivenName, parentGivenSize, config) {\n super(spec, 'layer', parent, parentGivenName, config, spec.resolve, spec.view);\n const layoutSize = Object.assign(Object.assign(Object.assign({}, parentGivenSize), (spec.width ? { width: spec.width } : {})), (spec.height ? { height: spec.height } : {}));\n this.children = spec.layer.map((layer, i) => {\n if (isLayerSpec(layer)) {\n return new LayerModel(layer, this, this.getName(`layer_${i}`), layoutSize, config);\n }\n else if (isUnitSpec(layer)) {\n return new UnitModel(layer, this, this.getName(`layer_${i}`), layoutSize, config);\n }\n throw new Error(log.message.invalidSpec(layer));\n });\n }\n parseData() {\n this.component.data = parseData(this);\n for (const child of this.children) {\n child.parseData();\n }\n }\n parseLayoutSize() {\n parseLayerLayoutSize(this);\n }\n parseSelections() {\n // Merge selections up the hierarchy so that they may be referenced\n // across unit specs. Persist their definitions within each child\n // to assemble signals which remain within output Vega unit groups.\n this.component.selection = {};\n for (const child of this.children) {\n child.parseSelections();\n for (const key of keys(child.component.selection)) {\n this.component.selection[key] = child.component.selection[key];\n }\n }\n }\n parseMarkGroup() {\n for (const child of this.children) {\n child.parseMarkGroup();\n }\n }\n parseAxesAndHeaders() {\n parseLayerAxes(this);\n }\n assembleSelectionTopLevelSignals(signals) {\n return this.children.reduce((sg, child) => child.assembleSelectionTopLevelSignals(sg), signals);\n }\n // TODO: Support same named selections across children.\n assembleSignals() {\n return this.children.reduce((signals, child) => {\n return signals.concat(child.assembleSignals());\n }, assembleAxisSignals(this));\n }\n assembleLayoutSignals() {\n return this.children.reduce((signals, child) => {\n return signals.concat(child.assembleLayoutSignals());\n }, assembleLayoutSignals(this));\n }\n assembleSelectionData(data) {\n return this.children.reduce((db, child) => child.assembleSelectionData(db), data);\n }\n assembleGroupStyle() {\n const uniqueStyles = new Set();\n for (const child of this.children) {\n for (const style of array(child.assembleGroupStyle())) {\n uniqueStyles.add(style);\n }\n }\n const styles = Array.from(uniqueStyles);\n return styles.length > 1 ? styles : styles.length === 1 ? styles[0] : undefined;\n }\n assembleTitle() {\n let title = super.assembleTitle();\n if (title) {\n return title;\n }\n // If title does not provide layer, look into children\n for (const child of this.children) {\n title = child.assembleTitle();\n if (title) {\n return title;\n }\n }\n return undefined;\n }\n assembleLayout() {\n return null;\n }\n assembleMarks() {\n return assembleLayerSelectionMarks(this, this.children.flatMap(child => {\n return child.assembleMarks();\n }));\n }\n assembleLegends() {\n return this.children.reduce((legends, child) => {\n return legends.concat(child.assembleLegends());\n }, assembleLegends(this));\n }\n}\n//# sourceMappingURL=layer.js.map","import * as log from '../log';\nimport { isAnyConcatSpec, isFacetSpec, isLayerSpec, isUnitSpec } from '../spec';\nimport { ConcatModel } from './concat';\nimport { FacetModel } from './facet';\nimport { LayerModel } from './layer';\nimport { UnitModel } from './unit';\nexport function buildModel(spec, parent, parentGivenName, unitSize, config) {\n if (isFacetSpec(spec)) {\n return new FacetModel(spec, parent, parentGivenName, config);\n }\n else if (isLayerSpec(spec)) {\n return new LayerModel(spec, parent, parentGivenName, unitSize, config);\n }\n else if (isUnitSpec(spec)) {\n return new UnitModel(spec, parent, parentGivenName, unitSize, config);\n }\n else if (isAnyConcatSpec(spec)) {\n return new ConcatModel(spec, parent, parentGivenName, config);\n }\n throw new Error(log.message.invalidSpec(spec));\n}\n//# sourceMappingURL=buildmodel.js.map","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { isString, mergeConfig } from 'vega-util';\nimport { getPositionScaleChannel } from '../channel';\nimport * as vlFieldDef from '../channeldef';\nimport { initConfig, stripAndRedirectConfig } from '../config';\nimport * as log from '../log';\nimport { normalize } from '../normalize';\nimport { assembleParameterSignals } from '../parameter';\nimport { extractTopLevelProperties, getFitType, isFitType } from '../spec/toplevel';\nimport { keys } from '../util';\nimport { buildModel } from './buildmodel';\nimport { assembleRootData } from './data/assemble';\nimport { optimizeDataflow } from './data/optimize';\n/**\n * Vega-Lite's main function, for compiling Vega-Lite spec into Vega spec.\n *\n * At a high-level, we make the following transformations in different phases:\n *\n * Input spec\n * |\n * | (Normalization)\n * v\n * Normalized Spec (Row/Column channels in single-view specs becomes faceted specs, composite marks becomes layered specs.)\n * |\n * | (Build Model)\n * v\n * A model tree of the spec\n * |\n * | (Parse)\n * v\n * A model tree with parsed components (intermediate structure of visualization primitives in a format that can be easily merged)\n * |\n * | (Optimize)\n * v\n * A model tree with parsed components with the data component optimized\n * |\n * | (Assemble)\n * v\n * Vega spec\n *\n * @param inputSpec The Vega-Lite specification.\n * @param opt Optional arguments passed to the Vega-Lite compiler.\n * @returns An object containing the compiled Vega spec and normalized Vega-Lite spec.\n */\nexport function compile(inputSpec, opt = {}) {\n // 0. Augment opt with default opts\n if (opt.logger) {\n // set the singleton logger to the provided logger\n log.set(opt.logger);\n }\n if (opt.fieldTitle) {\n // set the singleton field title formatter\n vlFieldDef.setTitleFormatter(opt.fieldTitle);\n }\n try {\n // 1. Initialize config by deep merging default config with the config provided via option and the input spec.\n const config = initConfig(mergeConfig(opt.config, inputSpec.config));\n // 2. Normalize: Convert input spec -> normalized spec\n // - Decompose all extended unit specs into composition of unit spec. For example, a box plot get expanded into multiple layers of bars, ticks, and rules. The shorthand row/column channel is also expanded to a facet spec.\n // - Normalize autosize and width or height spec\n const spec = normalize(inputSpec, config);\n // 3. Build Model: normalized spec -> Model (a tree structure)\n // This phases instantiates the models with default config by doing a top-down traversal. This allows us to pass properties that child models derive from their parents via their constructors.\n // See the abstract `Model` class and its children (UnitModel, LayerModel, FacetModel, ConcatModel) for different types of models.\n const model = buildModel(spec, null, '', undefined, config);\n // 4 Parse: Model --> Model with components\n // Note that components = intermediate representations that are equivalent to Vega specs.\n // We need these intermediate representation because we need to merge many visualization \"components\" like projections, scales, axes, and legends.\n // We will later convert these components into actual Vega specs in the assemble phase.\n // In this phase, we do a bottom-up traversal over the whole tree to\n // parse for each type of components once (e.g., data, layout, mark, scale).\n // By doing bottom-up traversal, we start parsing components of unit specs and\n // then merge child components of parent composite specs.\n //\n // Please see inside model.parse() for order of different components parsed.\n model.parse();\n // drawDataflow(model.component.data.sources);\n // 5. Optimize the dataflow. This will modify the data component of the model.\n optimizeDataflow(model.component.data, model);\n // drawDataflow(model.component.data.sources);\n // 6. Assemble: convert model components --> Vega Spec.\n const vgSpec = assembleTopLevelModel(model, getTopLevelProperties(inputSpec, spec.autosize, config, model), inputSpec.datasets, inputSpec.usermeta);\n return {\n spec: vgSpec,\n normalized: spec\n };\n }\n finally {\n // Reset the singleton logger if a logger is provided\n if (opt.logger) {\n log.reset();\n }\n // Reset the singleton field title formatter if provided\n if (opt.fieldTitle) {\n vlFieldDef.resetTitleFormatter();\n }\n }\n}\nfunction getTopLevelProperties(inputSpec, autosize, config, model) {\n const width = model.component.layoutSize.get('width');\n const height = model.component.layoutSize.get('height');\n if (autosize === undefined) {\n autosize = { type: 'pad' };\n if (model.hasAxisOrientSignalRef()) {\n autosize.resize = true;\n }\n }\n else if (isString(autosize)) {\n autosize = { type: autosize };\n }\n if (width && height && isFitType(autosize.type)) {\n if (width === 'step' && height === 'step') {\n log.warn(log.message.droppingFit());\n autosize.type = 'pad';\n }\n else if (width === 'step' || height === 'step') {\n // effectively XOR, because else if\n // get step dimension\n const sizeType = width === 'step' ? 'width' : 'height';\n // log that we're dropping fit for respective channel\n log.warn(log.message.droppingFit(getPositionScaleChannel(sizeType)));\n // setting type to inverse fit (so if we dropped fit-x, type is now fit-y)\n const inverseSizeType = sizeType === 'width' ? 'height' : 'width';\n autosize.type = getFitType(inverseSizeType);\n }\n }\n return Object.assign(Object.assign(Object.assign({}, (keys(autosize).length === 1 && autosize.type\n ? autosize.type === 'pad'\n ? {}\n : { autosize: autosize.type }\n : { autosize })), extractTopLevelProperties(config, false)), extractTopLevelProperties(inputSpec, true));\n}\n/*\n * Assemble the top-level model to a Vega spec.\n *\n * Note: this couldn't be `model.assemble()` since the top-level model\n * needs some special treatment to generate top-level properties.\n */\nfunction assembleTopLevelModel(model, topLevelProperties, datasets = {}, usermeta) {\n // Config with Vega-Lite only config removed.\n const vgConfig = model.config ? stripAndRedirectConfig(model.config) : undefined;\n const data = [].concat(model.assembleSelectionData([]), \n // only assemble data in the root\n assembleRootData(model.component.data, datasets));\n const projections = model.assembleProjections();\n const title = model.assembleTitle();\n const style = model.assembleGroupStyle();\n const encodeEntry = model.assembleGroupEncodeEntry(true);\n let layoutSignals = model.assembleLayoutSignals();\n // move width and height signals with values to top level\n layoutSignals = layoutSignals.filter(signal => {\n if ((signal.name === 'width' || signal.name === 'height') && signal.value !== undefined) {\n topLevelProperties[signal.name] = +signal.value;\n return false;\n }\n return true;\n });\n const { params } = topLevelProperties, otherTopLevelProps = __rest(topLevelProperties, [\"params\"]);\n return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ $schema: 'https://vega.github.io/schema/vega/v5.json' }, (model.description ? { description: model.description } : {})), otherTopLevelProps), (title ? { title } : {})), (style ? { style } : {})), (encodeEntry ? { encode: { update: encodeEntry } } : {})), { data }), (projections.length > 0 ? { projections: projections } : {})), model.assembleGroup([\n ...layoutSignals,\n ...model.assembleSelectionTopLevelSignals([]),\n ...assembleParameterSignals(params)\n ])), (vgConfig ? { config: vgConfig } : {})), (usermeta ? { usermeta } : {}));\n}\n//# sourceMappingURL=compile.js.map","/**\n * Parse a vega schema url into library and version.\n */\nexport default function(url: string) {\n const regex = /schema\\/([\\w-]+)\\/([\\w\\.\\-]+)\\.json$/g;\n const [library, version] = regex.exec(url)!.slice(1, 3);\n return {library: library as 'vega' | 'vega-lite', version};\n}\n","var name = \"vega-themes\";\nvar version = \"2.10.0\";\nvar description = \"Themes for stylized Vega and Vega-Lite visualizations.\";\nvar keywords = [\n\t\"vega\",\n\t\"vega-lite\",\n\t\"themes\",\n\t\"style\"\n];\nvar license = \"BSD-3-Clause\";\nvar author = {\n\tname: \"UW Interactive Data Lab\",\n\turl: \"https://idl.cs.washington.edu\"\n};\nvar contributors = [\n\t{\n\t\tname: \"Emily Gu\",\n\t\turl: \"https://github.com/emilygu\"\n\t},\n\t{\n\t\tname: \"Arvind Satyanarayan\",\n\t\turl: \"http://arvindsatya.com\"\n\t},\n\t{\n\t\tname: \"Jeffrey Heer\",\n\t\turl: \"https://idl.cs.washington.edu\"\n\t},\n\t{\n\t\tname: \"Dominik Moritz\",\n\t\turl: \"https://www.domoritz.de\"\n\t}\n];\nvar main = \"build/vega-themes.js\";\nvar module = \"build/vega-themes.module.js\";\nvar unpkg = \"build/vega-themes.min.js\";\nvar jsdelivr = \"build/vega-themes.min.js\";\nvar types = \"build/vega-themes.module.d.ts\";\nvar repository = {\n\ttype: \"git\",\n\turl: \"https://github.com/vega/vega-themes.git\"\n};\nvar files = [\n\t\"src\",\n\t\"build\"\n];\nvar scripts = {\n\tprebuild: \"yarn clean\",\n\tbuild: \"rollup -c\",\n\tclean: \"rimraf build && rimraf examples/build\",\n\t\"copy:data\": \"rsync -r node_modules/vega-datasets/data/* examples/data\",\n\t\"copy:build\": \"rsync -r build/* examples/build\",\n\t\"deploy:gh\": \"yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples\",\n\tprepublishOnly: \"yarn clean && yarn build\",\n\tpreversion: \"yarn lint\",\n\tserve: \"browser-sync start -s -f build examples --serveStatic examples\",\n\tstart: \"yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'\",\n\tprepare: \"beemo create-config\",\n\teslintbase: \"beemo eslint .\",\n\tformat: \"yarn eslintbase --fix\",\n\tlint: \"yarn eslintbase\"\n};\nvar devDependencies = {\n\t\"@rollup/plugin-json\": \"^4.1.0\",\n\t\"@rollup/plugin-node-resolve\": \"^11.2.0\",\n\t\"@wessberg/rollup-plugin-ts\": \"^1.3.8\",\n\t\"browser-sync\": \"^2.26.14\",\n\tconcurrently: \"^6.0.0\",\n\t\"gh-pages\": \"^3.1.0\",\n\trollup: \"^2.39.1\",\n\t\"rollup-plugin-bundle-size\": \"^1.0.3\",\n\t\"rollup-plugin-terser\": \"^7.0.2\",\n\ttypescript: \"^4.2.2\",\n\tvega: \"^5.19.1\",\n\t\"vega-lite\": \"^5.0.0\",\n\t\"vega-lite-dev-config\": \"^0.16.1\"\n};\nvar peerDependencies = {\n\tvega: \"*\",\n\t\"vega-lite\": \"*\"\n};\nvar pkg = {\n\tname: name,\n\tversion: version,\n\tdescription: description,\n\tkeywords: keywords,\n\tlicense: license,\n\tauthor: author,\n\tcontributors: contributors,\n\tmain: main,\n\tmodule: module,\n\tunpkg: unpkg,\n\tjsdelivr: jsdelivr,\n\ttypes: types,\n\trepository: repository,\n\tfiles: files,\n\tscripts: scripts,\n\tdevDependencies: devDependencies,\n\tpeerDependencies: peerDependencies\n};\n\nconst lightColor = '#fff';\nconst medColor = '#888';\nconst darkTheme = {\n background: '#333',\n title: {\n color: lightColor,\n subtitleColor: lightColor\n },\n style: {\n 'guide-label': {\n fill: lightColor,\n },\n 'guide-title': {\n fill: lightColor,\n },\n },\n axis: {\n domainColor: lightColor,\n gridColor: medColor,\n tickColor: lightColor,\n },\n};\n\nconst markColor = '#4572a7';\nconst excelTheme = {\n background: '#fff',\n arc: { fill: markColor },\n area: { fill: markColor },\n line: { stroke: markColor, strokeWidth: 2 },\n path: { stroke: markColor },\n rect: { fill: markColor },\n shape: { stroke: markColor },\n symbol: { fill: markColor, strokeWidth: 1.5, size: 50 },\n axis: {\n bandPosition: 0.5,\n grid: true,\n gridColor: '#000000',\n gridOpacity: 1,\n gridWidth: 0.5,\n labelPadding: 10,\n tickSize: 5,\n tickWidth: 0.5,\n },\n axisBand: {\n grid: false,\n tickExtra: true,\n },\n legend: {\n labelBaseline: 'middle',\n labelFontSize: 11,\n symbolSize: 50,\n symbolType: 'square',\n },\n range: {\n category: [\n '#4572a7',\n '#aa4643',\n '#8aa453',\n '#71598e',\n '#4598ae',\n '#d98445',\n '#94aace',\n '#d09393',\n '#b9cc98',\n '#a99cbc',\n ],\n },\n};\n\nconst markColor$1 = '#30a2da';\nconst axisColor = '#cbcbcb';\nconst guideLabelColor = '#999';\nconst guideTitleColor = '#333';\nconst backgroundColor = '#f0f0f0';\nconst blackTitle = '#333';\nconst fiveThirtyEightTheme = {\n arc: { fill: markColor$1 },\n area: { fill: markColor$1 },\n axis: {\n domainColor: axisColor,\n grid: true,\n gridColor: axisColor,\n gridWidth: 1,\n labelColor: guideLabelColor,\n labelFontSize: 10,\n titleColor: guideTitleColor,\n tickColor: axisColor,\n tickSize: 10,\n titleFontSize: 14,\n titlePadding: 10,\n labelPadding: 4,\n },\n axisBand: {\n grid: false,\n },\n background: backgroundColor,\n group: {\n fill: backgroundColor,\n },\n legend: {\n labelColor: blackTitle,\n labelFontSize: 11,\n padding: 1,\n symbolSize: 30,\n symbolType: 'square',\n titleColor: blackTitle,\n titleFontSize: 14,\n titlePadding: 10,\n },\n line: {\n stroke: markColor$1,\n strokeWidth: 2,\n },\n path: { stroke: markColor$1, strokeWidth: 0.5 },\n rect: { fill: markColor$1 },\n range: {\n category: [\n '#30a2da',\n '#fc4f30',\n '#e5ae38',\n '#6d904f',\n '#8b8b8b',\n '#b96db8',\n '#ff9e27',\n '#56cc60',\n '#52d2ca',\n '#52689e',\n '#545454',\n '#9fe4f8',\n ],\n diverging: ['#cc0020', '#e77866', '#f6e7e1', '#d6e8ed', '#91bfd9', '#1d78b5'],\n heatmap: ['#d6e8ed', '#cee0e5', '#91bfd9', '#549cc6', '#1d78b5'],\n },\n point: {\n filled: true,\n shape: 'circle',\n },\n shape: { stroke: markColor$1 },\n bar: {\n binSpacing: 2,\n fill: markColor$1,\n stroke: null,\n },\n title: {\n anchor: 'start',\n fontSize: 24,\n fontWeight: 600,\n offset: 20,\n },\n};\n\nconst markColor$2 = '#000';\nconst ggplot2Theme = {\n group: {\n fill: '#e5e5e5',\n },\n arc: { fill: markColor$2 },\n area: { fill: markColor$2 },\n line: { stroke: markColor$2 },\n path: { stroke: markColor$2 },\n rect: { fill: markColor$2 },\n shape: { stroke: markColor$2 },\n symbol: { fill: markColor$2, size: 40 },\n axis: {\n domain: false,\n grid: true,\n gridColor: '#FFFFFF',\n gridOpacity: 1,\n labelColor: '#7F7F7F',\n labelPadding: 4,\n tickColor: '#7F7F7F',\n tickSize: 5.67,\n titleFontSize: 16,\n titleFontWeight: 'normal',\n },\n legend: {\n labelBaseline: 'middle',\n labelFontSize: 11,\n symbolSize: 40,\n },\n range: {\n category: [\n '#000000',\n '#7F7F7F',\n '#1A1A1A',\n '#999999',\n '#333333',\n '#B0B0B0',\n '#4D4D4D',\n '#C9C9C9',\n '#666666',\n '#DCDCDC',\n ],\n },\n};\n\nconst headlineFontSize = 22;\nconst headlineFontWeight = 'normal';\nconst labelFont = 'Benton Gothic, sans-serif';\nconst labelFontSize = 11.5;\nconst labelFontWeight = 'normal';\nconst markColor$3 = '#82c6df';\n// const markHighlight = '#006d8f';\n// const markDemocrat = '#5789b8';\n// const markRepublican = '#d94f54';\nconst titleFont = 'Benton Gothic Bold, sans-serif';\nconst titleFontWeight = 'normal';\nconst titleFontSize = 13;\nconst colorSchemes = {\n 'category-6': ['#ec8431', '#829eb1', '#c89d29', '#3580b1', '#adc839', '#ab7fb4'],\n 'fire-7': ['#fbf2c7', '#f9e39c', '#f8d36e', '#f4bb6a', '#e68a4f', '#d15a40', '#ab4232'],\n 'fireandice-6': ['#e68a4f', '#f4bb6a', '#f9e39c', '#dadfe2', '#a6b7c6', '#849eae'],\n 'ice-7': ['#edefee', '#dadfe2', '#c4ccd2', '#a6b7c6', '#849eae', '#607785', '#47525d'],\n};\nconst latimesTheme = {\n background: '#ffffff',\n title: {\n anchor: 'start',\n color: '#000000',\n font: titleFont,\n fontSize: headlineFontSize,\n fontWeight: headlineFontWeight,\n },\n arc: { fill: markColor$3 },\n area: { fill: markColor$3 },\n line: { stroke: markColor$3, strokeWidth: 2 },\n path: { stroke: markColor$3 },\n rect: { fill: markColor$3 },\n shape: { stroke: markColor$3 },\n symbol: { fill: markColor$3, size: 30 },\n axis: {\n labelFont,\n labelFontSize,\n labelFontWeight,\n titleFont,\n titleFontSize,\n titleFontWeight,\n },\n axisX: {\n labelAngle: 0,\n labelPadding: 4,\n tickSize: 3,\n },\n axisY: {\n labelBaseline: 'middle',\n maxExtent: 45,\n minExtent: 45,\n tickSize: 2,\n titleAlign: 'left',\n titleAngle: 0,\n titleX: -45,\n titleY: -11,\n },\n legend: {\n labelFont,\n labelFontSize,\n symbolType: 'square',\n titleFont,\n titleFontSize,\n titleFontWeight,\n },\n range: {\n category: colorSchemes['category-6'],\n diverging: colorSchemes['fireandice-6'],\n heatmap: colorSchemes['fire-7'],\n ordinal: colorSchemes['fire-7'],\n ramp: colorSchemes['fire-7'],\n },\n};\n\nconst markColor$4 = '#ab5787';\nconst axisColor$1 = '#979797';\nconst quartzTheme = {\n background: '#f9f9f9',\n arc: { fill: markColor$4 },\n area: { fill: markColor$4 },\n line: { stroke: markColor$4 },\n path: { stroke: markColor$4 },\n rect: { fill: markColor$4 },\n shape: { stroke: markColor$4 },\n symbol: { fill: markColor$4, size: 30 },\n axis: {\n domainColor: axisColor$1,\n domainWidth: 0.5,\n gridWidth: 0.2,\n labelColor: axisColor$1,\n tickColor: axisColor$1,\n tickWidth: 0.2,\n titleColor: axisColor$1,\n },\n axisBand: {\n grid: false,\n },\n axisX: {\n grid: true,\n tickSize: 10,\n },\n axisY: {\n domain: false,\n grid: true,\n tickSize: 0,\n },\n legend: {\n labelFontSize: 11,\n padding: 1,\n symbolSize: 30,\n symbolType: 'square',\n },\n range: {\n category: [\n '#ab5787',\n '#51b2e5',\n '#703c5c',\n '#168dd9',\n '#d190b6',\n '#00609f',\n '#d365ba',\n '#154866',\n '#666666',\n '#c4c4c4',\n ],\n },\n};\n\nconst markColor$5 = '#3e5c69';\nconst voxTheme = {\n background: '#fff',\n arc: { fill: markColor$5 },\n area: { fill: markColor$5 },\n line: { stroke: markColor$5 },\n path: { stroke: markColor$5 },\n rect: { fill: markColor$5 },\n shape: { stroke: markColor$5 },\n symbol: { fill: markColor$5 },\n axis: {\n domainWidth: 0.5,\n grid: true,\n labelPadding: 2,\n tickSize: 5,\n tickWidth: 0.5,\n titleFontWeight: 'normal',\n },\n axisBand: {\n grid: false,\n },\n axisX: {\n gridWidth: 0.2,\n },\n axisY: {\n gridDash: [3],\n gridWidth: 0.4,\n },\n legend: {\n labelFontSize: 11,\n padding: 1,\n symbolType: 'square',\n },\n range: {\n category: ['#3e5c69', '#6793a6', '#182429', '#0570b0', '#3690c0', '#74a9cf', '#a6bddb', '#e2ddf2'],\n },\n};\n\nconst markColor$6 = '#1696d2';\nconst axisColor$2 = '#000000';\nconst backgroundColor$1 = '#FFFFFF';\nconst font = 'Lato';\nconst labelFont$1 = 'Lato';\nconst sourceFont = 'Lato';\nconst gridColor = '#DEDDDD';\nconst titleFontSize$1 = 18;\nconst colorSchemes$1 = {\n 'main-colors': ['#1696d2', '#d2d2d2', '#000000', '#fdbf11', '#ec008b', '#55b748', '#5c5859', '#db2b27'],\n 'shades-blue': ['#CFE8F3', '#A2D4EC', '#73BFE2', '#46ABDB', '#1696D2', '#12719E', '#0A4C6A', '#062635'],\n 'shades-gray': ['#F5F5F5', '#ECECEC', '#E3E3E3', '#DCDBDB', '#D2D2D2', '#9D9D9D', '#696969', '#353535'],\n 'shades-yellow': ['#FFF2CF', '#FCE39E', '#FDD870', '#FCCB41', '#FDBF11', '#E88E2D', '#CA5800', '#843215'],\n 'shades-magenta': ['#F5CBDF', '#EB99C2', '#E46AA7', '#E54096', '#EC008B', '#AF1F6B', '#761548', '#351123'],\n 'shades-green': ['#DCEDD9', '#BCDEB4', '#98CF90', '#78C26D', '#55B748', '#408941', '#2C5C2D', '#1A2E19'],\n 'shades-black': ['#D5D5D4', '#ADABAC', '#848081', '#5C5859', '#332D2F', '#262223', '#1A1717', '#0E0C0D'],\n 'shades-red': ['#F8D5D4', '#F1AAA9', '#E9807D', '#E25552', '#DB2B27', '#A4201D', '#6E1614', '#370B0A'],\n 'one-group': ['#1696d2', '#000000'],\n 'two-groups-cat-1': ['#1696d2', '#000000'],\n 'two-groups-cat-2': ['#1696d2', '#fdbf11'],\n 'two-groups-cat-3': ['#1696d2', '#db2b27'],\n 'two-groups-seq': ['#a2d4ec', '#1696d2'],\n 'three-groups-cat': ['#1696d2', '#fdbf11', '#000000'],\n 'three-groups-seq': ['#a2d4ec', '#1696d2', '#0a4c6a'],\n 'four-groups-cat-1': ['#000000', '#d2d2d2', '#fdbf11', '#1696d2'],\n 'four-groups-cat-2': ['#1696d2', '#ec0008b', '#fdbf11', '#5c5859'],\n 'four-groups-seq': ['#cfe8f3', '#73bf42', '#1696d2', '#0a4c6a'],\n 'five-groups-cat-1': ['#1696d2', '#fdbf11', '#d2d2d2', '#ec008b', '#000000'],\n 'five-groups-cat-2': ['#1696d2', '#0a4c6a', '#d2d2d2', '#fdbf11', '#332d2f'],\n 'five-groups-seq': ['#cfe8f3', '#73bf42', '#1696d2', '#0a4c6a', '#000000'],\n 'six-groups-cat-1': ['#1696d2', '#ec008b', '#fdbf11', '#000000', '#d2d2d2', '#55b748'],\n 'six-groups-cat-2': ['#1696d2', '#d2d2d2', '#ec008b', '#fdbf11', '#332d2f', '#0a4c6a'],\n 'six-groups-seq': ['#cfe8f3', '#a2d4ec', '#73bfe2', '#46abdb', '#1696d2', '#12719e'],\n 'diverging-colors': ['#ca5800', '#fdbf11', '#fdd870', '#fff2cf', '#cfe8f3', '#73bfe2', '#1696d2', '#0a4c6a'],\n};\nconst urbanInstituteTheme = {\n background: backgroundColor$1,\n title: {\n anchor: 'start',\n fontSize: titleFontSize$1,\n font: font,\n },\n axisX: {\n domain: true,\n domainColor: axisColor$2,\n domainWidth: 1,\n grid: false,\n labelFontSize: 12,\n labelFont: labelFont$1,\n labelAngle: 0,\n tickColor: axisColor$2,\n tickSize: 5,\n titleFontSize: 12,\n titlePadding: 10,\n titleFont: font,\n },\n axisY: {\n domain: false,\n domainWidth: 1,\n grid: true,\n gridColor: gridColor,\n gridWidth: 1,\n labelFontSize: 12,\n labelFont: labelFont$1,\n labelPadding: 8,\n ticks: false,\n titleFontSize: 12,\n titlePadding: 10,\n titleFont: font,\n titleAngle: 0,\n titleY: -10,\n titleX: 18,\n },\n legend: {\n labelFontSize: 12,\n labelFont: labelFont$1,\n symbolSize: 100,\n titleFontSize: 12,\n titlePadding: 10,\n titleFont: font,\n orient: 'right',\n offset: 10,\n },\n view: {\n stroke: 'transparent',\n },\n range: {\n category: colorSchemes$1['six-groups-cat-1'],\n diverging: colorSchemes$1['diverging-colors'],\n heatmap: colorSchemes$1['diverging-colors'],\n ordinal: colorSchemes$1['six-groups-seq'],\n ramp: colorSchemes$1['shades-blue'],\n },\n area: {\n fill: markColor$6,\n },\n rect: {\n fill: markColor$6,\n },\n line: {\n color: markColor$6,\n stroke: markColor$6,\n strokeWidth: 5,\n },\n trail: {\n color: markColor$6,\n stroke: markColor$6,\n strokeWidth: 0,\n size: 1,\n },\n path: {\n stroke: markColor$6,\n strokeWidth: 0.5,\n },\n point: {\n filled: true,\n },\n text: {\n font: sourceFont,\n color: markColor$6,\n fontSize: 11,\n align: 'center',\n fontWeight: 400,\n size: 11,\n },\n style: {\n bar: {\n fill: markColor$6,\n stroke: null,\n },\n },\n arc: { fill: markColor$6 },\n shape: { stroke: markColor$6 },\n symbol: { fill: markColor$6, size: 30 },\n};\n\n/**\n * Copyright 2020 Google LLC.\n *\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file or at\n * https://developers.google.com/open-source/licenses/bsd\n */\nconst markColor$7 = '#3366CC';\nconst gridColor$1 = '#ccc';\nconst defaultFont = 'Arial, sans-serif';\nconst googlechartsTheme = {\n arc: { fill: markColor$7 },\n area: { fill: markColor$7 },\n path: { stroke: markColor$7 },\n rect: { fill: markColor$7 },\n shape: { stroke: markColor$7 },\n symbol: { stroke: markColor$7 },\n circle: { fill: markColor$7 },\n background: '#fff',\n padding: {\n top: 10,\n right: 10,\n bottom: 10,\n left: 10,\n },\n style: {\n 'guide-label': {\n font: defaultFont,\n fontSize: 12,\n },\n 'guide-title': {\n font: defaultFont,\n fontSize: 12,\n },\n 'group-title': {\n font: defaultFont,\n fontSize: 12,\n },\n },\n title: {\n font: defaultFont,\n fontSize: 14,\n fontWeight: 'bold',\n dy: -3,\n anchor: 'start',\n },\n axis: {\n gridColor: gridColor$1,\n tickColor: gridColor$1,\n domain: false,\n grid: true,\n },\n range: {\n category: [\n '#4285F4',\n '#DB4437',\n '#F4B400',\n '#0F9D58',\n '#AB47BC',\n '#00ACC1',\n '#FF7043',\n '#9E9D24',\n '#5C6BC0',\n '#F06292',\n '#00796B',\n '#C2185B',\n ],\n heatmap: ['#c6dafc', '#5e97f6', '#2a56c6'],\n },\n};\n\nconst version$1 = pkg.version;\n\nexport { darkTheme as dark, excelTheme as excel, fiveThirtyEightTheme as fivethirtyeight, ggplot2Theme as ggplot2, googlechartsTheme as googlecharts, latimesTheme as latimes, quartzTheme as quartz, urbanInstituteTheme as urbaninstitute, version$1 as version, voxTheme as vox };\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\"use strict\";\n\nvar Op = Object.prototype;\nvar hasOwn = Op.hasOwnProperty;\nvar undefined; // More compressible than void 0.\nvar $Symbol = typeof Symbol === \"function\" ? Symbol : {};\nvar iteratorSymbol = $Symbol.iterator || \"@@iterator\";\nvar asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\nvar toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\nfunction wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n}\n\n// Try/catch helper to minimize deoptimizations. Returns a completion\n// record like context.tryEntries[i].completion. This interface could\n// have been (and was previously) designed to take a closure to be\n// invoked without arguments, but in all the cases we care about we\n// already have an existing method we want to call, so there's no need\n// to create a new function object. We can even get away with assuming\n// the method takes exactly one argument, since that happens to be true\n// in every case, so we don't have to touch the arguments object. The\n// only additional allocation required is the completion record, which\n// has a stable shape and so hopefully should be cheap to allocate.\nfunction tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n}\n\nvar GenStateSuspendedStart = \"suspendedStart\";\nvar GenStateSuspendedYield = \"suspendedYield\";\nvar GenStateExecuting = \"executing\";\nvar GenStateCompleted = \"completed\";\n\n// Returning this object from the innerFn has the same effect as\n// breaking out of the dispatch switch statement.\nvar ContinueSentinel = {};\n\n// Dummy constructor functions that we use as the .constructor and\n// .constructor.prototype properties for functions that return Generator\n// objects. For full spec compliance, you may wish to configure your\n// minifier not to mangle the names of these two functions.\nfunction Generator() {}\nfunction GeneratorFunction() {}\nfunction GeneratorFunctionPrototype() {}\n\n// This is a polyfill for %IteratorPrototype% for environments that\n// don't natively support it.\nvar IteratorPrototype = {};\nIteratorPrototype[iteratorSymbol] = function () {\n return this;\n};\n\nvar getProto = Object.getPrototypeOf;\nvar NativeIteratorPrototype = getProto && getProto(getProto(values([])));\nif (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n}\n\nvar Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\nGeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\nGeneratorFunctionPrototype.constructor = GeneratorFunction;\nGeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n// Helper for defining the .next, .throw, and .return methods of the\n// Iterator interface in terms of a single ._invoke method.\nfunction defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n}\n\nfunction isGeneratorFunction (genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n};\n\nfunction mark (genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n};\n\n// Within the body of any async function, `await x` is transformed to\n// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n// `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n// meant to be awaited.\nfunction awrap (arg) {\n return { __await: arg };\n};\n\nfunction AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n}\n\ndefineIteratorMethods(AsyncIterator.prototype);\nAsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n};\n\n// Note that simple async functions are implemented on top of\n// AsyncIterator objects; they just return a Promise for the value of\n// the final result produced by the iterator.\n function async (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n};\n\nfunction makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n}\n\n// Call delegate.iterator[context.method](context.arg) and handle the\n// result, either by returning a { value, done } result from the\n// delegate iterator, or by modifying context.method and context.arg,\n// setting context.delegate to null, and returning the ContinueSentinel.\nfunction maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n}\n\n// Define Generator.prototype.{next,throw,return} in terms of the\n// unified ._invoke helper method.\ndefineIteratorMethods(Gp);\n\nGp[toStringTagSymbol] = \"Generator\";\n\n// A Generator should always return itself as the iterator object when the\n// @@iterator function is called on it. Some browsers' implementations of the\n// iterator prototype chain incorrectly implement this, causing the Generator\n// object to not be returned from this call. This ensures that doesn't happen.\n// See https://github.com/facebook/regenerator/issues/274 for more details.\nGp[iteratorSymbol] = function() {\n return this;\n};\n\nGp.toString = function() {\n return \"[object Generator]\";\n};\n\nfunction pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n}\n\nfunction resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n}\n\nfunction Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n}\n\nfunction keys (object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n};\n\nfunction values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n}\n\nfunction doneResult() {\n return { value: undefined, done: true };\n}\n\nContext.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n};\n\n// Export a default namespace that plays well with Rollup\nexport default {\n wrap,\n isGeneratorFunction,\n AsyncIterator,\n mark,\n awrap,\n async,\n keys,\n values\n};\n","import {MessageData} from './types';\n\n/**\n * Open editor url in a new window, and pass a message.\n */\nexport default function (window: Window, url: string, data: MessageData) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const editor = window.open(url)!;\n const wait = 10000;\n const step = 250;\n const {origin} = new URL(url);\n // eslint-disable-next-line no-bitwise\n let count = ~~(wait / step);\n\n function listen(evt: MessageEvent) {\n if (evt.source === editor) {\n count = 0;\n window.removeEventListener('message', listen, false);\n }\n }\n window.addEventListener('message', listen, false);\n\n // send message\n // periodically resend until ack received or timeout\n function send() {\n if (count <= 0) {\n return;\n }\n editor.postMessage(data, origin);\n setTimeout(send, step);\n count -= 1;\n }\n setTimeout(send, step);\n}\n","import {applyPatch, Operation} from 'fast-json-patch';\nimport stringify from 'json-stringify-pretty-compact';\nimport {satisfies} from 'semver';\nimport * as vegaImport from 'vega';\nimport {\n AutoSize,\n Config as VgConfig,\n EncodeEntryName,\n isBoolean,\n isString,\n Loader,\n LoaderOptions,\n mergeConfig,\n Renderers,\n Spec as VgSpec,\n TooltipHandler,\n View,\n} from 'vega';\nimport {expressionInterpreter} from 'vega-interpreter';\nimport * as vegaLiteImport from 'vega-lite';\nimport {Config as VlConfig, TopLevelSpec as VlSpec} from 'vega-lite';\nimport schemaParser from 'vega-schema-url-parser';\nimport * as themes from 'vega-themes';\nimport {Handler, Options as TooltipOptions} from 'vega-tooltip';\nimport post from './post';\nimport embedStyle from './style';\nimport {Config, Mode} from './types';\nimport {mergeDeep} from './util';\nimport pkg from '../package.json';\n\nexport const version = pkg.version;\n\nexport * from './types';\n\nexport const vega = vegaImport;\nexport let vegaLite = vegaLiteImport;\n\n// For backwards compatibility with Vega-Lite before v4.\nconst w = (typeof window !== 'undefined' ? window : undefined) as any;\nif (vegaLite === undefined && w?.['vl']?.compile) {\n vegaLite = w['vl'];\n}\n\nexport interface Actions {\n export?: boolean | {svg?: boolean; png?: boolean};\n source?: boolean;\n compiled?: boolean;\n editor?: boolean;\n}\n\nexport const DEFAULT_ACTIONS = {export: {svg: true, png: true}, source: true, compiled: true, editor: true};\n\nexport interface Hover {\n hoverSet?: EncodeEntryName;\n updateSet?: EncodeEntryName;\n}\n\nexport type PatchFunc = (spec: VgSpec) => VgSpec;\n\nconst I18N = {\n CLICK_TO_VIEW_ACTIONS: 'Click to view actions',\n COMPILED_ACTION: 'View Compiled Vega',\n EDITOR_ACTION: 'Open in Vega Editor',\n PNG_ACTION: 'Save as PNG',\n SOURCE_ACTION: 'View Source',\n SVG_ACTION: 'Save as SVG',\n};\n\nexport interface EmbedOptions<S = string, R = Renderers> {\n bind?: HTMLElement | string;\n actions?: boolean | Actions;\n mode?: Mode;\n theme?: 'excel' | 'ggplot2' | 'quartz' | 'vox' | 'dark';\n defaultStyle?: boolean | string;\n logLevel?: number;\n loader?: Loader | LoaderOptions;\n renderer?: R;\n tooltip?: TooltipHandler | TooltipOptions | boolean;\n patch?: S | PatchFunc | Operation[];\n width?: number;\n height?: number;\n padding?: number | {left?: number; right?: number; top?: number; bottom?: number};\n scaleFactor?: number;\n config?: S | Config;\n sourceHeader?: string;\n sourceFooter?: string;\n editorUrl?: string;\n hover?: boolean | Hover;\n i18n?: Partial<typeof I18N>;\n downloadFileName?: string;\n formatLocale?: Record<string, unknown>;\n timeFormatLocale?: Record<string, unknown>;\n ast?: boolean;\n expr?: typeof expressionInterpreter;\n viewClass?: typeof View;\n}\n\nconst NAMES: {[key in Mode]: string} = {\n vega: 'Vega',\n 'vega-lite': 'Vega-Lite',\n};\n\nconst VERSION = {\n vega: vega.version,\n 'vega-lite': vegaLite ? vegaLite.version : 'not available',\n};\n\nconst PREPROCESSOR: {[mode in Mode]: (spec: any, config?: Config) => VgSpec} = {\n vega: (vgSpec: VgSpec) => vgSpec,\n 'vega-lite': (vlSpec, config) => vegaLite.compile(vlSpec as VlSpec, {config: config as VlConfig}).spec,\n};\n\nconst SVG_CIRCLES = `\n<svg viewBox=\"0 0 16 16\" fill=\"currentColor\" stroke=\"none\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle r=\"2\" cy=\"8\" cx=\"2\"></circle>\n <circle r=\"2\" cy=\"8\" cx=\"8\"></circle>\n <circle r=\"2\" cy=\"8\" cx=\"14\"></circle>\n</svg>`;\n\nconst CHART_WRAPPER_CLASS = 'chart-wrapper';\n\nexport type VisualizationSpec = VlSpec | VgSpec;\n\nexport interface Result {\n /** The Vega view. */\n view: View;\n\n /** The input specification. */\n spec: VisualizationSpec;\n\n /** The compiled and patched Vega specification. */\n vgSpec: VgSpec;\n\n /** Removes references to unwanted behaviors and memory leaks. Calls Vega's `view.finalize`. */\n finalize: () => void;\n}\n\nfunction isTooltipHandler(h?: boolean | TooltipOptions | TooltipHandler): h is TooltipHandler {\n return typeof h === 'function';\n}\n\nfunction viewSource(source: string, sourceHeader: string, sourceFooter: string, mode: Mode) {\n const header = `<html><head>${sourceHeader}</head><body><pre><code class=\"json\">`;\n const footer = `</code></pre>${sourceFooter}</body></html>`;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const win = window.open('')!;\n win.document.write(header + source + footer);\n win.document.title = `${NAMES[mode]} JSON Source`;\n}\n\n/**\n * Try to guess the type of spec.\n *\n * @param spec Vega or Vega-Lite spec.\n */\nexport function guessMode(spec: VisualizationSpec, providedMode?: Mode): Mode {\n // Decide mode\n if (spec.$schema) {\n const parsed = schemaParser(spec.$schema);\n if (providedMode && providedMode !== parsed.library) {\n console.warn(\n `The given visualization spec is written in ${NAMES[parsed.library]}, but mode argument sets ${\n NAMES[providedMode] ?? providedMode\n }.`\n );\n }\n\n const mode = parsed.library as Mode;\n\n if (!satisfies(VERSION[mode], `^${parsed.version.slice(1)}`)) {\n console.warn(\n `The input spec uses ${NAMES[mode]} ${parsed.version}, but the current version of ${NAMES[mode]} is v${VERSION[mode]}.`\n );\n }\n\n return mode;\n }\n\n // try to guess from the provided spec\n if (\n 'mark' in spec ||\n 'encoding' in spec ||\n 'layer' in spec ||\n 'hconcat' in spec ||\n 'vconcat' in spec ||\n 'facet' in spec ||\n 'repeat' in spec\n ) {\n return 'vega-lite';\n }\n\n if ('marks' in spec || 'signals' in spec || 'scales' in spec || 'axes' in spec) {\n return 'vega';\n }\n\n return providedMode ?? 'vega';\n}\n\nfunction isLoader(o?: LoaderOptions | Loader): o is Loader {\n return !!(o && 'load' in o);\n}\n\nfunction createLoader(opts?: Loader | LoaderOptions) {\n return isLoader(opts) ? opts : vega.loader(opts);\n}\n\nfunction embedOptionsFromUsermeta(parsedSpec: VisualizationSpec) {\n return (parsedSpec.usermeta && (parsedSpec.usermeta as any)['embedOptions']) ?? {};\n}\n\n/**\n * Embed a Vega visualization component in a web page. This function returns a promise.\n *\n * @param el DOM element in which to place component (DOM node or CSS selector).\n * @param spec String : A URL string from which to load the Vega specification.\n * Object : The Vega/Vega-Lite specification as a parsed JSON object.\n * @param opts A JavaScript object containing options for embedding.\n */\nexport default async function embed(\n el: HTMLElement | string,\n spec: VisualizationSpec | string,\n opts: EmbedOptions = {}\n): Promise<Result> {\n let parsedSpec: VisualizationSpec;\n let loader: Loader | undefined;\n\n if (isString(spec)) {\n loader = createLoader(opts.loader);\n parsedSpec = JSON.parse(await loader.load(spec));\n } else {\n parsedSpec = spec;\n }\n\n const usermetaLoader = embedOptionsFromUsermeta(parsedSpec).loader;\n\n // either create the loader for the first time or create a new loader if the spec has new loader options\n if (!loader || usermetaLoader) {\n loader = createLoader(opts.loader ?? usermetaLoader);\n }\n\n const usermetaOpts = await loadOpts(embedOptionsFromUsermeta(parsedSpec), loader);\n const parsedOpts = await loadOpts(opts, loader);\n\n const mergedOpts = {\n ...mergeDeep(parsedOpts, usermetaOpts),\n config: mergeConfig(parsedOpts.config ?? {}, usermetaOpts.config ?? {}),\n };\n\n return await _embed(el, parsedSpec, mergedOpts, loader);\n}\n\nasync function loadOpts(opt: EmbedOptions, loader: Loader): Promise<EmbedOptions<never>> {\n const config: Config = isString(opt.config) ? JSON.parse(await loader.load(opt.config)) : opt.config ?? {};\n const patch: PatchFunc | Operation[] = isString(opt.patch) ? JSON.parse(await loader.load(opt.patch)) : opt.patch;\n return {\n ...(opt as any),\n ...(patch ? {patch} : {}),\n ...(config ? {config} : {}),\n };\n}\n\nfunction getRoot(el: Element) {\n const possibleRoot = el.getRootNode ? el.getRootNode() : document;\n if (possibleRoot instanceof ShadowRoot) {\n return {root: possibleRoot, rootContainer: possibleRoot};\n } else {\n return {root: document, rootContainer: document.head ?? document.body};\n }\n}\n\nasync function _embed(\n el: HTMLElement | string,\n spec: VisualizationSpec,\n opts: EmbedOptions<never> = {},\n loader: Loader\n): Promise<Result> {\n const config = opts.theme ? mergeConfig(themes[opts.theme], opts.config ?? {}) : opts.config;\n\n const actions = isBoolean(opts.actions) ? opts.actions : mergeDeep<Actions>({}, DEFAULT_ACTIONS, opts.actions ?? {});\n const i18n = {...I18N, ...opts.i18n};\n\n const renderer = opts.renderer ?? 'canvas';\n const logLevel = opts.logLevel ?? vega.Warn;\n const downloadFileName = opts.downloadFileName ?? 'visualization';\n\n const element = typeof el === 'string' ? document.querySelector(el) : el;\n if (!element) {\n throw new Error(`${el} does not exist`);\n }\n\n if (opts.defaultStyle !== false) {\n // Add a default stylesheet to the head of the document.\n const ID = 'vega-embed-style';\n const {root, rootContainer} = getRoot(element);\n if (!root.getElementById(ID)) {\n const style = document.createElement('style');\n style.id = ID;\n style.innerText =\n opts.defaultStyle === undefined || opts.defaultStyle === true\n ? (embedStyle ?? '').toString()\n : opts.defaultStyle;\n rootContainer.appendChild(style);\n }\n }\n\n const mode = guessMode(spec, opts.mode);\n\n let vgSpec: VgSpec = PREPROCESSOR[mode](spec, config);\n\n if (mode === 'vega-lite') {\n if (vgSpec.$schema) {\n const parsed = schemaParser(vgSpec.$schema);\n\n if (!satisfies(VERSION.vega, `^${parsed.version.slice(1)}`)) {\n console.warn(`The compiled spec uses Vega ${parsed.version}, but current version is v${VERSION.vega}.`);\n }\n }\n }\n\n element.classList.add('vega-embed');\n if (actions) {\n element.classList.add('has-actions');\n }\n element.innerHTML = ''; // clear container\n\n let container = element;\n if (actions) {\n const chartWrapper = document.createElement('div');\n chartWrapper.classList.add(CHART_WRAPPER_CLASS);\n element.appendChild(chartWrapper);\n container = chartWrapper;\n }\n\n const patch = opts.patch;\n if (patch) {\n if (patch instanceof Function) {\n vgSpec = patch(vgSpec);\n } else {\n vgSpec = applyPatch(vgSpec, patch, true, false).newDocument;\n }\n }\n\n // Set locale. Note that this is a global setting.\n if (opts.formatLocale) {\n vega.formatLocale(opts.formatLocale);\n }\n\n if (opts.timeFormatLocale) {\n vega.timeFormatLocale(opts.timeFormatLocale);\n }\n\n const {ast} = opts;\n\n // Do not apply the config to Vega when we have already applied it to Vega-Lite.\n // This call may throw an Error if parsing fails.\n const runtime = vega.parse(vgSpec, mode === 'vega-lite' ? {} : (config as VgConfig), {ast});\n\n const view = new (opts.viewClass || vega.View)(runtime, {\n loader,\n logLevel,\n renderer,\n ...(ast ? {expr: (vega as any).expressionInterpreter ?? opts.expr ?? expressionInterpreter} : {}),\n });\n\n view.addSignalListener('autosize', (_, autosize: Exclude<AutoSize, string>) => {\n const {type} = autosize;\n if (type == 'fit-x') {\n container.classList.add('fit-x');\n container.classList.remove('fit-y');\n } else if (type == 'fit-y') {\n container.classList.remove('fit-x');\n container.classList.add('fit-y');\n } else if (type == 'fit') {\n container.classList.add('fit-x', 'fit-y');\n } else {\n container.classList.remove('fit-x', 'fit-y');\n }\n });\n\n if (opts.tooltip !== false) {\n let handler: TooltipHandler;\n if (isTooltipHandler(opts.tooltip)) {\n handler = opts.tooltip;\n } else {\n // user provided boolean true or tooltip options\n handler = new Handler(opts.tooltip === true ? {} : opts.tooltip).call;\n }\n\n view.tooltip(handler);\n }\n\n let {hover} = opts;\n\n if (hover === undefined) {\n hover = mode === 'vega';\n }\n\n if (hover) {\n const {hoverSet, updateSet} = (typeof hover === 'boolean' ? {} : hover) as Hover;\n\n view.hover(hoverSet, updateSet);\n }\n\n if (opts) {\n if (opts.width != null) {\n view.width(opts.width);\n }\n if (opts.height != null) {\n view.height(opts.height);\n }\n if (opts.padding != null) {\n view.padding(opts.padding);\n }\n }\n\n await view.initialize(container, opts.bind).runAsync();\n\n let documentClickHandler: ((this: Document, ev: MouseEvent) => void) | undefined;\n\n if (actions !== false) {\n let wrapper = element;\n\n if (opts.defaultStyle !== false) {\n const details = document.createElement('details');\n details.title = i18n.CLICK_TO_VIEW_ACTIONS;\n element.append(details);\n\n wrapper = details;\n const summary = document.createElement('summary');\n summary.innerHTML = SVG_CIRCLES;\n\n details.append(summary);\n\n documentClickHandler = (ev: MouseEvent) => {\n if (!details.contains(ev.target as any)) {\n details.removeAttribute('open');\n }\n };\n document.addEventListener('click', documentClickHandler);\n }\n\n const ctrl = document.createElement('div');\n wrapper.append(ctrl);\n ctrl.classList.add('vega-actions');\n\n // add 'Export' action\n if (actions === true || actions.export !== false) {\n for (const ext of ['svg', 'png'] as const) {\n if (actions === true || actions.export === true || (actions.export as {svg?: boolean; png?: boolean})[ext]) {\n const i18nExportAction = (i18n as {[key: string]: string})[`${ext.toUpperCase()}_ACTION`];\n const exportLink = document.createElement('a');\n\n exportLink.text = i18nExportAction;\n exportLink.href = '#';\n exportLink.target = '_blank';\n exportLink.download = `${downloadFileName}.${ext}`;\n // add link on mousedown so that it's correct when the click happens\n exportLink.addEventListener('mousedown', async function (this, e) {\n e.preventDefault();\n const url = await view.toImageURL(ext, opts.scaleFactor);\n this.href = url;\n });\n\n ctrl.append(exportLink);\n }\n }\n }\n\n // add 'View Source' action\n if (actions === true || actions.source !== false) {\n const viewSourceLink = document.createElement('a');\n\n viewSourceLink.text = i18n.SOURCE_ACTION;\n viewSourceLink.href = '#';\n viewSourceLink.addEventListener('click', function (this, e) {\n viewSource(stringify(spec), opts.sourceHeader ?? '', opts.sourceFooter ?? '', mode);\n e.preventDefault();\n });\n\n ctrl.append(viewSourceLink);\n }\n\n // add 'View Compiled' action\n if (mode === 'vega-lite' && (actions === true || actions.compiled !== false)) {\n const compileLink = document.createElement('a');\n\n compileLink.text = i18n.COMPILED_ACTION;\n compileLink.href = '#';\n compileLink.addEventListener('click', function (this, e) {\n viewSource(stringify(vgSpec), opts.sourceHeader ?? '', opts.sourceFooter ?? '', 'vega');\n e.preventDefault();\n });\n\n ctrl.append(compileLink);\n }\n\n // add 'Open in Vega Editor' action\n if (actions === true || actions.editor !== false) {\n const editorUrl = opts.editorUrl ?? 'https://vega.github.io/editor/';\n const editorLink = document.createElement('a');\n\n editorLink.text = i18n.EDITOR_ACTION;\n editorLink.href = '#';\n editorLink.addEventListener('click', function (this, e) {\n post(window, editorUrl, {\n config: config as Config,\n mode,\n renderer,\n spec: stringify(spec),\n });\n e.preventDefault();\n });\n\n ctrl.append(editorLink);\n }\n }\n\n function finalize() {\n if (documentClickHandler) {\n document.removeEventListener('click', documentClickHandler);\n }\n view.finalize();\n }\n\n return {view, spec, vgSpec, finalize};\n}\n","import updateSingleDatasetInView from './updateSingleDatasetInView';\nexport default function updateMultipleDatasetsInView(view, data) {\n Object.keys(data).forEach(name => {\n updateSingleDatasetInView(view, name, data[name]);\n });\n}","import { vega } from 'vega-embed';\nimport isFunction from './isFunction';\nexport default function updateSingleDatasetInView(view, name, value) {\n if (value) {\n if (isFunction(value)) {\n value(view.data(name));\n } else {\n view.change(name, vega.changeset().remove(() => true).insert(value));\n }\n }\n}","export default function isFunction(functionToCheck) {\n const getType = {};\n return !!functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}","export default function getUniqueFieldNames(objects) {\n const fields = new Set();\n objects.forEach(o => {\n Object.keys(o).forEach(field => {\n fields.add(field);\n });\n });\n return fields;\n}","// eslint-disable-next-line import/prefer-default-export\nexport const NOOP = () => {};","export default function addSignalListenersToView(view, signalListeners) {\n const signalNames = Object.keys(signalListeners);\n signalNames.forEach(signalName => {\n try {\n view.addSignalListener(signalName, signalListeners[signalName]);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('Cannot add invalid signal listener.', error);\n }\n });\n return signalNames.length > 0;\n}","export default function removeSignalListenersFromView(view, signalListeners) {\n const signalNames = Object.keys(signalListeners);\n signalNames.forEach(signalName => {\n try {\n view.removeSignalListener(signalName, signalListeners[signalName]);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn('Cannot remove invalid signal listener.', error);\n }\n });\n return signalNames.length > 0;\n}","export default function combineSpecWithDimension(props) {\n const {\n spec,\n width,\n height\n } = props;\n\n if (typeof width !== 'undefined' && typeof height !== 'undefined') {\n return { ...spec,\n width,\n height\n };\n }\n\n if (typeof width !== 'undefined') {\n return { ...spec,\n width\n };\n }\n\n if (typeof height !== 'undefined') {\n return { ...spec,\n height\n };\n }\n\n return spec;\n}","import _pt from \"prop-types\";\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport React from 'react';\nimport vegaEmbed from 'vega-embed';\nimport shallowEqual from './utils/shallowEqual';\nimport getUniqueFieldNames from './utils/getUniqueFieldNames';\nimport { NOOP } from './constants';\nimport addSignalListenersToView from './utils/addSignalListenersToView';\nimport computeSpecChanges from './utils/computeSpecChanges';\nimport removeSignalListenersFromView from './utils/removeSignalListenersFromView';\nimport combineSpecWithDimension from './utils/combineSpecWithDimension';\nexport default class VegaEmbed extends React.PureComponent {\n constructor(...args) {\n super(...args);\n\n _defineProperty(this, \"containerRef\", /*#__PURE__*/React.createRef());\n\n _defineProperty(this, \"resultPromise\", void 0);\n\n _defineProperty(this, \"handleError\", error => {\n const {\n onError = NOOP\n } = this.props;\n onError(error); // eslint-disable-next-line no-console\n\n console.warn(error);\n return undefined;\n });\n\n _defineProperty(this, \"modifyView\", action => {\n if (this.resultPromise) {\n this.resultPromise.then(result => {\n if (result) {\n action(result.view);\n }\n\n return true;\n }).catch(this.handleError);\n }\n });\n }\n\n componentDidMount() {\n this.createView();\n }\n\n componentDidUpdate(prevProps) {\n const fieldSet = getUniqueFieldNames([this.props, prevProps]);\n fieldSet.delete('className');\n fieldSet.delete('signalListeners');\n fieldSet.delete('spec');\n fieldSet.delete('style');\n fieldSet.delete('width');\n fieldSet.delete('height'); // Only create a new view if necessary\n\n if (Array.from(fieldSet).some(f => this.props[f] !== prevProps[f])) {\n this.clearView();\n this.createView();\n } else {\n const specChanges = computeSpecChanges(combineSpecWithDimension(this.props), combineSpecWithDimension(prevProps));\n const {\n signalListeners: newSignalListeners\n } = this.props;\n const {\n signalListeners: oldSignalListeners\n } = prevProps;\n\n if (specChanges) {\n if (specChanges.isExpensive) {\n this.clearView();\n this.createView();\n } else {\n const areSignalListenersChanged = !shallowEqual(newSignalListeners, oldSignalListeners);\n this.modifyView(view => {\n if (specChanges.width !== false) {\n view.width(specChanges.width);\n }\n\n if (specChanges.height !== false) {\n view.height(specChanges.height);\n }\n\n if (areSignalListenersChanged) {\n if (oldSignalListeners) {\n removeSignalListenersFromView(view, oldSignalListeners);\n }\n\n if (newSignalListeners) {\n addSignalListenersToView(view, newSignalListeners);\n }\n }\n\n view.run();\n });\n }\n } else if (!shallowEqual(newSignalListeners, oldSignalListeners)) {\n this.modifyView(view => {\n if (oldSignalListeners) {\n removeSignalListenersFromView(view, oldSignalListeners);\n }\n\n if (newSignalListeners) {\n addSignalListenersToView(view, newSignalListeners);\n }\n\n view.run();\n });\n }\n }\n }\n\n componentWillUnmount() {\n this.clearView();\n }\n\n createView() {\n const {\n spec,\n onNewView,\n signalListeners = {},\n width,\n height,\n ...options\n } = this.props;\n\n if (this.containerRef.current) {\n const finalSpec = combineSpecWithDimension(this.props);\n this.resultPromise = vegaEmbed(this.containerRef.current, finalSpec, options).then(result => {\n if (result) {\n const {\n view\n } = result;\n\n if (addSignalListenersToView(view, signalListeners)) {\n view.run();\n }\n }\n\n return result;\n }).catch(this.handleError);\n\n if (onNewView) {\n this.modifyView(onNewView);\n }\n }\n }\n\n clearView() {\n if (this.resultPromise) {\n this.resultPromise.then(result => {\n if (result) {\n result.finalize();\n }\n }).catch(this.handleError);\n }\n\n this.resultPromise = undefined;\n return this;\n }\n\n render() {\n const {\n className,\n style\n } = this.props; // Create the container Vega draws inside\n\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: this.containerRef,\n className: className,\n style: style\n });\n }\n\n}\n\n_defineProperty(VegaEmbed, \"propTypes\", {\n className: _pt.string,\n onError: _pt.func\n});","import equal from 'fast-deep-equal';\nimport getUniqueFieldNames from './getUniqueFieldNames';\nexport default function computeSpecChanges(newSpec, oldSpec) {\n if (newSpec === oldSpec) return false;\n const changes = {\n width: false,\n height: false,\n isExpensive: false\n };\n const fieldNames = getUniqueFieldNames([newSpec, oldSpec]);\n\n if (fieldNames.has('width') && (!('width' in newSpec) || !('width' in oldSpec) || newSpec.width !== oldSpec.width)) {\n if ('width' in newSpec && typeof newSpec.width === 'number') {\n changes.width = newSpec.width;\n } else {\n changes.isExpensive = true;\n }\n }\n\n if (fieldNames.has('height') && (!('height' in newSpec) || !('height' in oldSpec) || newSpec.height !== oldSpec.height)) {\n if ('height' in newSpec && typeof newSpec.height === 'number') {\n changes.height = newSpec.height;\n } else {\n changes.isExpensive = true;\n }\n } // Delete cheap fields\n\n\n fieldNames.delete('width');\n fieldNames.delete('height');\n\n if ([...fieldNames].some(field => !(field in newSpec) || !(field in oldSpec) || !equal(newSpec[field], oldSpec[field]))) {\n changes.isExpensive = true;\n }\n\n return changes.width !== false || changes.height !== false || changes.isExpensive ? changes : false;\n}","import _pt from \"prop-types\";\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport React from 'react';\nimport shallowEqual from './utils/shallowEqual';\nimport updateMultipleDatasetsInView from './utils/updateMultipleDatasetsInView';\nimport VegaEmbed from './VegaEmbed';\nimport { NOOP } from './constants';\nconst EMPTY = {};\nexport default class Vega extends React.PureComponent {\n constructor(...args) {\n super(...args);\n\n _defineProperty(this, \"vegaEmbed\", /*#__PURE__*/React.createRef());\n\n _defineProperty(this, \"handleNewView\", view => {\n this.update();\n const {\n onNewView = NOOP\n } = this.props;\n onNewView(view);\n });\n }\n\n componentDidMount() {\n this.update();\n }\n\n componentDidUpdate(prevProps) {\n if (!shallowEqual(this.props.data, prevProps.data)) {\n this.update();\n }\n }\n\n update() {\n const {\n data\n } = this.props;\n\n if (this.vegaEmbed.current && data && Object.keys(data).length > 0) {\n this.vegaEmbed.current.modifyView(view => {\n updateMultipleDatasetsInView(view, data);\n view.resize().run();\n });\n }\n }\n\n render() {\n const {\n data,\n ...restProps\n } = this.props;\n return /*#__PURE__*/React.createElement(VegaEmbed, _extends({\n ref: this.vegaEmbed\n }, restProps, {\n onNewView: this.handleNewView\n }));\n }\n\n}\n\n_defineProperty(Vega, \"defaultProps\", {\n data: EMPTY\n});","export var DEFAULT_CONFIG = {\n // minimum relative difference between two compared values,\n // used by all comparison functions\n epsilon: 1e-12,\n // type of default matrix output. Choose 'matrix' (default) or 'array'\n matrix: 'Matrix',\n // type of default number output. Choose 'number' (default) 'BigNumber', or 'Fraction\n number: 'number',\n // number of significant digits in BigNumbers\n precision: 64,\n // predictable output type of functions. When true, output type depends only\n // on the input types. When false (default), output type can vary depending\n // on input values. For example `math.sqrt(-4)` returns `complex('2i')` when\n // predictable is false, and returns `NaN` when true.\n predictable: false,\n // random seed for seeded pseudo random number generation\n // null = randomly seed\n randomSeed: null\n};","// type checks for all known types\n//\n// note that:\n//\n// - check by duck-typing on a property like `isUnit`, instead of checking instanceof.\n// instanceof cannot be used because that would not allow to pass data from\n// one instance of math.js to another since each has it's own instance of Unit.\n// - check the `isUnit` property via the constructor, so there will be no\n// matches for \"fake\" instances like plain objects with a property `isUnit`.\n// That is important for security reasons.\n// - It must not be possible to override the type checks used internally,\n// for security reasons, so these functions are not exposed in the expression\n// parser.\nexport function isNumber(x) {\n return typeof x === 'number';\n}\nexport function isBigNumber(x) {\n return x && x.constructor.prototype.isBigNumber === true || false;\n}\nexport function isComplex(x) {\n return x && typeof x === 'object' && Object.getPrototypeOf(x).isComplex === true || false;\n}\nexport function isFraction(x) {\n return x && typeof x === 'object' && Object.getPrototypeOf(x).isFraction === true || false;\n}\nexport function isUnit(x) {\n return x && x.constructor.prototype.isUnit === true || false;\n}\nexport function isString(x) {\n return typeof x === 'string';\n}\nexport var isArray = Array.isArray;\nexport function isMatrix(x) {\n return x && x.constructor.prototype.isMatrix === true || false;\n}\n/**\n * Test whether a value is a collection: an Array or Matrix\n * @param {*} x\n * @returns {boolean} isCollection\n */\n\nexport function isCollection(x) {\n return Array.isArray(x) || isMatrix(x);\n}\nexport function isDenseMatrix(x) {\n return x && x.isDenseMatrix && x.constructor.prototype.isMatrix === true || false;\n}\nexport function isSparseMatrix(x) {\n return x && x.isSparseMatrix && x.constructor.prototype.isMatrix === true || false;\n}\nexport function isRange(x) {\n return x && x.constructor.prototype.isRange === true || false;\n}\nexport function isIndex(x) {\n return x && x.constructor.prototype.isIndex === true || false;\n}\nexport function isBoolean(x) {\n return typeof x === 'boolean';\n}\nexport function isResultSet(x) {\n return x && x.constructor.prototype.isResultSet === true || false;\n}\nexport function isHelp(x) {\n return x && x.constructor.prototype.isHelp === true || false;\n}\nexport function isFunction(x) {\n return typeof x === 'function';\n}\nexport function isDate(x) {\n return x instanceof Date;\n}\nexport function isRegExp(x) {\n return x instanceof RegExp;\n}\nexport function isObject(x) {\n return !!(x && typeof x === 'object' && x.constructor === Object && !isComplex(x) && !isFraction(x));\n}\nexport function isNull(x) {\n return x === null;\n}\nexport function isUndefined(x) {\n return x === undefined;\n}\nexport function isAccessorNode(x) {\n return x && x.isAccessorNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isArrayNode(x) {\n return x && x.isArrayNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isAssignmentNode(x) {\n return x && x.isAssignmentNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isBlockNode(x) {\n return x && x.isBlockNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isConditionalNode(x) {\n return x && x.isConditionalNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isConstantNode(x) {\n return x && x.isConstantNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isFunctionAssignmentNode(x) {\n return x && x.isFunctionAssignmentNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isFunctionNode(x) {\n return x && x.isFunctionNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isIndexNode(x) {\n return x && x.isIndexNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isNode(x) {\n return x && x.isNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isObjectNode(x) {\n return x && x.isObjectNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isOperatorNode(x) {\n return x && x.isOperatorNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isParenthesisNode(x) {\n return x && x.isParenthesisNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isRangeNode(x) {\n return x && x.isRangeNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isSymbolNode(x) {\n return x && x.isSymbolNode === true && x.constructor.prototype.isNode === true || false;\n}\nexport function isChain(x) {\n return x && x.constructor.prototype.isChain === true || false;\n}\nexport function typeOf(x) {\n var t = typeof x;\n\n if (t === 'object') {\n // JavaScript types\n if (x === null) return 'null';\n if (Array.isArray(x)) return 'Array';\n if (x instanceof Date) return 'Date';\n if (x instanceof RegExp) return 'RegExp'; // math.js types\n\n if (isBigNumber(x)) return 'BigNumber';\n if (isComplex(x)) return 'Complex';\n if (isFraction(x)) return 'Fraction';\n if (isMatrix(x)) return 'Matrix';\n if (isUnit(x)) return 'Unit';\n if (isIndex(x)) return 'Index';\n if (isRange(x)) return 'Range';\n if (isResultSet(x)) return 'ResultSet';\n if (isNode(x)) return x.type;\n if (isChain(x)) return 'Chain';\n if (isHelp(x)) return 'Help';\n return 'Object';\n }\n\n if (t === 'function') return 'Function';\n return t; // can be 'string', 'number', 'boolean', ...\n}","import { isBigNumber } from './is.js';\n/**\n * Clone an object\n *\n * clone(x)\n *\n * Can clone any primitive type, array, and object.\n * If x has a function clone, this function will be invoked to clone the object.\n *\n * @param {*} x\n * @return {*} clone\n */\n\nexport function clone(x) {\n var type = typeof x; // immutable primitive types\n\n if (type === 'number' || type === 'string' || type === 'boolean' || x === null || x === undefined) {\n return x;\n } // use clone function of the object when available\n\n\n if (typeof x.clone === 'function') {\n return x.clone();\n } // array\n\n\n if (Array.isArray(x)) {\n return x.map(function (value) {\n return clone(value);\n });\n }\n\n if (x instanceof Date) return new Date(x.valueOf());\n if (isBigNumber(x)) return x; // bignumbers are immutable\n\n if (x instanceof RegExp) throw new TypeError('Cannot clone ' + x); // TODO: clone a RegExp\n // object\n\n return mapObject(x, clone);\n}\n/**\n * Apply map to all properties of an object\n * @param {Object} object\n * @param {function} callback\n * @return {Object} Returns a copy of the object with mapped properties\n */\n\nexport function mapObject(object, callback) {\n var clone = {};\n\n for (var key in object) {\n if (hasOwnProperty(object, key)) {\n clone[key] = callback(object[key]);\n }\n }\n\n return clone;\n}\n/**\n * Extend object a with the properties of object b\n * @param {Object} a\n * @param {Object} b\n * @return {Object} a\n */\n\nexport function extend(a, b) {\n for (var prop in b) {\n if (hasOwnProperty(b, prop)) {\n a[prop] = b[prop];\n }\n }\n\n return a;\n}\n/**\n * Deep extend an object a with the properties of object b\n * @param {Object} a\n * @param {Object} b\n * @returns {Object}\n */\n\nexport function deepExtend(a, b) {\n // TODO: add support for Arrays to deepExtend\n if (Array.isArray(b)) {\n throw new TypeError('Arrays are not supported by deepExtend');\n }\n\n for (var prop in b) {\n // We check against prop not being in Object.prototype or Function.prototype\n // to prevent polluting for example Object.__proto__.\n if (hasOwnProperty(b, prop) && !(prop in Object.prototype) && !(prop in Function.prototype)) {\n if (b[prop] && b[prop].constructor === Object) {\n if (a[prop] === undefined) {\n a[prop] = {};\n }\n\n if (a[prop] && a[prop].constructor === Object) {\n deepExtend(a[prop], b[prop]);\n } else {\n a[prop] = b[prop];\n }\n } else if (Array.isArray(b[prop])) {\n throw new TypeError('Arrays are not supported by deepExtend');\n } else {\n a[prop] = b[prop];\n }\n }\n }\n\n return a;\n}\n/**\n * Deep test equality of all fields in two pairs of arrays or objects.\n * Compares values and functions strictly (ie. 2 is not the same as '2').\n * @param {Array | Object} a\n * @param {Array | Object} b\n * @returns {boolean}\n */\n\nexport function deepStrictEqual(a, b) {\n var prop, i, len;\n\n if (Array.isArray(a)) {\n if (!Array.isArray(b)) {\n return false;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (i = 0, len = a.length; i < len; i++) {\n if (!deepStrictEqual(a[i], b[i])) {\n return false;\n }\n }\n\n return true;\n } else if (typeof a === 'function') {\n return a === b;\n } else if (a instanceof Object) {\n if (Array.isArray(b) || !(b instanceof Object)) {\n return false;\n }\n\n for (prop in a) {\n // noinspection JSUnfilteredForInLoop\n if (!(prop in b) || !deepStrictEqual(a[prop], b[prop])) {\n return false;\n }\n }\n\n for (prop in b) {\n // noinspection JSUnfilteredForInLoop\n if (!(prop in a) || !deepStrictEqual(a[prop], b[prop])) {\n return false;\n }\n }\n\n return true;\n } else {\n return a === b;\n }\n}\n/**\n * Recursively flatten a nested object.\n * @param {Object} nestedObject\n * @return {Object} Returns the flattened object\n */\n\nexport function deepFlatten(nestedObject) {\n var flattenedObject = {};\n\n _deepFlatten(nestedObject, flattenedObject);\n\n return flattenedObject;\n} // helper function used by deepFlatten\n\nfunction _deepFlatten(nestedObject, flattenedObject) {\n for (var prop in nestedObject) {\n if (hasOwnProperty(nestedObject, prop)) {\n var value = nestedObject[prop];\n\n if (typeof value === 'object' && value !== null) {\n _deepFlatten(value, flattenedObject);\n } else {\n flattenedObject[prop] = value;\n }\n }\n }\n}\n/**\n * Test whether the current JavaScript engine supports Object.defineProperty\n * @returns {boolean} returns true if supported\n */\n\n\nexport function canDefineProperty() {\n // test needed for broken IE8 implementation\n try {\n if (Object.defineProperty) {\n Object.defineProperty({}, 'x', {\n get: function get() {}\n });\n return true;\n }\n } catch (e) {}\n\n return false;\n}\n/**\n * Attach a lazy loading property to a constant.\n * The given function `fn` is called once when the property is first requested.\n *\n * @param {Object} object Object where to add the property\n * @param {string} prop Property name\n * @param {Function} valueResolver Function returning the property value. Called\n * without arguments.\n */\n\nexport function lazy(object, prop, valueResolver) {\n var _uninitialized = true;\n\n var _value;\n\n Object.defineProperty(object, prop, {\n get: function get() {\n if (_uninitialized) {\n _value = valueResolver();\n _uninitialized = false;\n }\n\n return _value;\n },\n set: function set(value) {\n _value = value;\n _uninitialized = false;\n },\n configurable: true,\n enumerable: true\n });\n}\n/**\n * Traverse a path into an object.\n * When a namespace is missing, it will be created\n * @param {Object} object\n * @param {string | string[]} path A dot separated string like 'name.space'\n * @return {Object} Returns the object at the end of the path\n */\n\nexport function traverse(object, path) {\n if (path && typeof path === 'string') {\n return traverse(object, path.split('.'));\n }\n\n var obj = object;\n\n if (path) {\n for (var i = 0; i < path.length; i++) {\n var key = path[i];\n\n if (!(key in obj)) {\n obj[key] = {};\n }\n\n obj = obj[key];\n }\n }\n\n return obj;\n}\n/**\n * A safe hasOwnProperty\n * @param {Object} object\n * @param {string} property\n */\n\nexport function hasOwnProperty(object, property) {\n return object && Object.hasOwnProperty.call(object, property);\n}\n/**\n * Test whether an object is a factory. a factory has fields:\n *\n * - factory: function (type: Object, config: Object, load: function, typed: function [, math: Object]) (required)\n * - name: string (optional)\n * - path: string A dot separated path (optional)\n * - math: boolean If true (false by default), the math namespace is passed\n * as fifth argument of the factory function\n *\n * @param {*} object\n * @returns {boolean}\n */\n\nexport function isLegacyFactory(object) {\n return object && typeof object.factory === 'function';\n}\n/**\n * Get a nested property from an object\n * @param {Object} object\n * @param {string | string[]} path\n * @returns {Object}\n */\n\nexport function get(object, path) {\n if (typeof path === 'string') {\n if (isPath(path)) {\n return get(object, path.split('.'));\n } else {\n return object[path];\n }\n }\n\n var child = object;\n\n for (var i = 0; i < path.length; i++) {\n var key = path[i];\n child = child ? child[key] : undefined;\n }\n\n return child;\n}\n/**\n * Set a nested property in an object\n * Mutates the object itself\n * If the path doesn't exist, it will be created\n * @param {Object} object\n * @param {string | string[]} path\n * @param {*} value\n * @returns {Object}\n */\n\nexport function set(object, path, value) {\n if (typeof path === 'string') {\n if (isPath(path)) {\n return set(object, path.split('.'), value);\n } else {\n object[path] = value;\n return object;\n }\n }\n\n var child = object;\n\n for (var i = 0; i < path.length - 1; i++) {\n var key = path[i];\n\n if (child[key] === undefined) {\n child[key] = {};\n }\n\n child = child[key];\n }\n\n if (path.length > 0) {\n var lastKey = path[path.length - 1];\n child[lastKey] = value;\n }\n\n return object;\n}\n/**\n * Create an object composed of the picked object properties\n * @param {Object} object\n * @param {string[]} properties\n * @param {function} [transform] Optional value to transform a value when picking it\n * @return {Object}\n */\n\nexport function pick(object, properties, transform) {\n var copy = {};\n\n for (var i = 0; i < properties.length; i++) {\n var key = properties[i];\n var value = get(object, key);\n\n if (value !== undefined) {\n set(copy, key, transform ? transform(value, key) : value);\n }\n }\n\n return copy;\n}\n/**\n * Shallow version of pick, creating an object composed of the picked object properties\n * but not for nested properties\n * @param {Object} object\n * @param {string[]} properties\n * @return {Object}\n */\n\nexport function pickShallow(object, properties) {\n var copy = {};\n\n for (var i = 0; i < properties.length; i++) {\n var key = properties[i];\n var value = object[key];\n\n if (value !== undefined) {\n copy[key] = value;\n }\n }\n\n return copy;\n}\nexport function values(object) {\n return Object.keys(object).map(key => object[key]);\n} // helper function to test whether a string contains a path like 'user.name'\n\nfunction isPath(str) {\n return str.indexOf('.') !== -1;\n}","import { clone, mapObject, deepExtend } from '../../utils/object.js';\nimport { DEFAULT_CONFIG } from '../config.js';\nexport var MATRIX_OPTIONS = ['Matrix', 'Array']; // valid values for option matrix\n\nexport var NUMBER_OPTIONS = ['number', 'BigNumber', 'Fraction']; // valid values for option number\n\nexport function configFactory(config, emit) {\n /**\n * Set configuration options for math.js, and get current options.\n * Will emit a 'config' event, with arguments (curr, prev, changes).\n *\n * This function is only available on a mathjs instance created using `create`.\n *\n * Syntax:\n *\n * math.config(config: Object): Object\n *\n * Examples:\n *\n *\n * import { create, all } from 'mathjs'\n *\n * // create a mathjs instance\n * const math = create(all)\n *\n * math.config().number // outputs 'number'\n * math.evaluate('0.4') // outputs number 0.4\n * math.config({number: 'Fraction'})\n * math.evaluate('0.4') // outputs Fraction 2/5\n *\n * @param {Object} [options] Available options:\n * {number} epsilon\n * Minimum relative difference between two\n * compared values, used by all comparison functions.\n * {string} matrix\n * A string 'Matrix' (default) or 'Array'.\n * {string} number\n * A string 'number' (default), 'BigNumber', or 'Fraction'\n * {number} precision\n * The number of significant digits for BigNumbers.\n * Not applicable for Numbers.\n * {string} parenthesis\n * How to display parentheses in LaTeX and string\n * output.\n * {string} randomSeed\n * Random seed for seeded pseudo random number generator.\n * Set to null to randomly seed.\n * @return {Object} Returns the current configuration\n */\n function _config(options) {\n if (options) {\n var prev = mapObject(config, clone); // validate some of the options\n\n validateOption(options, 'matrix', MATRIX_OPTIONS);\n validateOption(options, 'number', NUMBER_OPTIONS); // merge options\n\n deepExtend(config, options);\n var curr = mapObject(config, clone);\n var changes = mapObject(options, clone); // emit 'config' event\n\n emit('config', curr, prev, changes);\n return curr;\n } else {\n return mapObject(config, clone);\n }\n } // attach the valid options to the function so they can be extended\n\n\n _config.MATRIX_OPTIONS = MATRIX_OPTIONS;\n _config.NUMBER_OPTIONS = NUMBER_OPTIONS; // attach the config properties as readonly properties to the config function\n\n Object.keys(DEFAULT_CONFIG).forEach(key => {\n Object.defineProperty(_config, key, {\n get: () => config[key],\n enumerable: true,\n configurable: true\n });\n });\n return _config;\n}\n/**\n * Test whether an Array contains a specific item.\n * @param {Array.<string>} array\n * @param {string} item\n * @return {boolean}\n */\n\nfunction contains(array, item) {\n return array.indexOf(item) !== -1;\n}\n/**\n * Validate an option\n * @param {Object} options Object with options\n * @param {string} name Name of the option to validate\n * @param {Array.<string>} values Array with valid values for this option\n */\n\n\nfunction validateOption(options, name, values) {\n if (options[name] !== undefined && !contains(values, options[name])) {\n // unknown value\n console.warn('Warning: Unknown value \"' + options[name] + '\" for configuration option \"' + name + '\". ' + 'Available options: ' + values.map(value => JSON.stringify(value)).join(', ') + '.');\n }\n}","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport { DEFAULT_CONFIG } from '../core/config.js';\nimport { MATRIX_OPTIONS, NUMBER_OPTIONS } from '../core/function/config.js'; // create a read-only version of config\n\nexport var config = /* #__PURE__ */function config(options) {\n if (options) {\n throw new Error('The global config is readonly. \\n' + 'Please create a mathjs instance if you want to change the default configuration. \\n' + 'Example:\\n' + '\\n' + ' import { create, all } from \\'mathjs\\';\\n' + ' const mathjs = create(all);\\n' + ' mathjs.config({ number: \\'BigNumber\\' });\\n');\n }\n\n return Object.freeze(DEFAULT_CONFIG);\n};\n\n_extends(config, DEFAULT_CONFIG, {\n MATRIX_OPTIONS,\n NUMBER_OPTIONS\n});","import { isNumber } from './is.js';\n/**\n * @typedef {{sign: '+' | '-' | '', coefficients: number[], exponent: number}} SplitValue\n */\n\n/**\n * Check if a number is integer\n * @param {number | boolean} value\n * @return {boolean} isInteger\n */\n\nexport function isInteger(value) {\n if (typeof value === 'boolean') {\n return true;\n }\n\n return isFinite(value) ? value === Math.round(value) : false;\n}\n/**\n * Calculate the sign of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var sign = /* #__PURE__ */Math.sign || function (x) {\n if (x > 0) {\n return 1;\n } else if (x < 0) {\n return -1;\n } else {\n return 0;\n }\n};\n/**\n * Calculate the base-2 logarithm of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var log2 = /* #__PURE__ */Math.log2 || function log2(x) {\n return Math.log(x) / Math.LN2;\n};\n/**\n * Calculate the base-10 logarithm of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var log10 = /* #__PURE__ */Math.log10 || function log10(x) {\n return Math.log(x) / Math.LN10;\n};\n/**\n * Calculate the natural logarithm of a number + 1\n * @param {number} x\n * @returns {number}\n */\n\nexport var log1p = /* #__PURE__ */Math.log1p || function (x) {\n return Math.log(x + 1);\n};\n/**\n * Calculate cubic root for a number\n *\n * Code from es6-shim.js:\n * https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js#L1564-L1577\n *\n * @param {number} x\n * @returns {number} Returns the cubic root of x\n */\n\nexport var cbrt = /* #__PURE__ */Math.cbrt || function cbrt(x) {\n if (x === 0) {\n return x;\n }\n\n var negate = x < 0;\n var result;\n\n if (negate) {\n x = -x;\n }\n\n if (isFinite(x)) {\n result = Math.exp(Math.log(x) / 3); // from https://en.wikipedia.org/wiki/Cube_root#Numerical_methods\n\n result = (x / (result * result) + 2 * result) / 3;\n } else {\n result = x;\n }\n\n return negate ? -result : result;\n};\n/**\n * Calculates exponentiation minus 1\n * @param {number} x\n * @return {number} res\n */\n\nexport var expm1 = /* #__PURE__ */Math.expm1 || function expm1(x) {\n return x >= 2e-4 || x <= -2e-4 ? Math.exp(x) - 1 : x + x * x / 2 + x * x * x / 6;\n};\n/**\n * Formats a number in a given base\n * @param {number} n\n * @param {number} base\n * @param {number} size\n * @returns {string}\n */\n\nfunction formatNumberToBase(n, base, size) {\n var prefixes = {\n 2: '0b',\n 8: '0o',\n 16: '0x'\n };\n var prefix = prefixes[base];\n var suffix = '';\n\n if (size) {\n if (size < 1) {\n throw new Error('size must be in greater than 0');\n }\n\n if (!isInteger(size)) {\n throw new Error('size must be an integer');\n }\n\n if (n > 2 ** (size - 1) - 1 || n < -(2 ** (size - 1))) {\n throw new Error(\"Value must be in range [-2^\".concat(size - 1, \", 2^\").concat(size - 1, \"-1]\"));\n }\n\n if (!isInteger(n)) {\n throw new Error('Value must be an integer');\n }\n\n if (n < 0) {\n n = n + 2 ** size;\n }\n\n suffix = \"i\".concat(size);\n }\n\n var sign = '';\n\n if (n < 0) {\n n = -n;\n sign = '-';\n }\n\n return \"\".concat(sign).concat(prefix).concat(n.toString(base)).concat(suffix);\n}\n/**\n * Convert a number to a formatted string representation.\n *\n * Syntax:\n *\n * format(value)\n * format(value, options)\n * format(value, precision)\n * format(value, fn)\n *\n * Where:\n *\n * {number} value The value to be formatted\n * {Object} options An object with formatting options. Available options:\n * {string} notation\n * Number notation. Choose from:\n * 'fixed' Always use regular number notation.\n * For example '123.40' and '14000000'\n * 'exponential' Always use exponential notation.\n * For example '1.234e+2' and '1.4e+7'\n * 'engineering' Always use engineering notation.\n * For example '123.4e+0' and '14.0e+6'\n * 'auto' (default) Regular number notation for numbers\n * having an absolute value between\n * `lowerExp` and `upperExp` bounds, and\n * uses exponential notation elsewhere.\n * Lower bound is included, upper bound\n * is excluded.\n * For example '123.4' and '1.4e7'.\n * 'bin', 'oct, or\n * 'hex' Format the number using binary, octal,\n * or hexadecimal notation.\n * For example '0b1101' and '0x10fe'.\n * {number} wordSize The word size in bits to use for formatting\n * in binary, octal, or hexadecimal notation.\n * To be used only with 'bin', 'oct', or 'hex'\n * values for 'notation' option. When this option\n * is defined the value is formatted as a signed\n * twos complement integer of the given word size\n * and the size suffix is appended to the output.\n * For example\n * format(-1, {notation: 'hex', wordSize: 8}) === '0xffi8'.\n * Default value is undefined.\n * {number} precision A number between 0 and 16 to round\n * the digits of the number.\n * In case of notations 'exponential',\n * 'engineering', and 'auto',\n * `precision` defines the total\n * number of significant digits returned.\n * In case of notation 'fixed',\n * `precision` defines the number of\n * significant digits after the decimal\n * point.\n * `precision` is undefined by default,\n * not rounding any digits.\n * {number} lowerExp Exponent determining the lower boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `-3`.\n * {number} upperExp Exponent determining the upper boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `5`.\n * {Function} fn A custom formatting function. Can be used to override the\n * built-in notations. Function `fn` is called with `value` as\n * parameter and must return a string. Is useful for example to\n * format all values inside a matrix in a particular way.\n *\n * Examples:\n *\n * format(6.4) // '6.4'\n * format(1240000) // '1.24e6'\n * format(1/3) // '0.3333333333333333'\n * format(1/3, 3) // '0.333'\n * format(21385, 2) // '21000'\n * format(12.071, {notation: 'fixed'}) // '12'\n * format(2.3, {notation: 'fixed', precision: 2}) // '2.30'\n * format(52.8, {notation: 'exponential'}) // '5.28e+1'\n * format(12345678, {notation: 'engineering'}) // '12.345678e+6'\n *\n * @param {number} value\n * @param {Object | Function | number} [options]\n * @return {string} str The formatted value\n */\n\n\nexport function format(value, options) {\n if (typeof options === 'function') {\n // handle format(value, fn)\n return options(value);\n } // handle special cases\n\n\n if (value === Infinity) {\n return 'Infinity';\n } else if (value === -Infinity) {\n return '-Infinity';\n } else if (isNaN(value)) {\n return 'NaN';\n } // default values for options\n\n\n var notation = 'auto';\n var precision;\n var wordSize;\n\n if (options) {\n // determine notation from options\n if (options.notation) {\n notation = options.notation;\n } // determine precision from options\n\n\n if (isNumber(options)) {\n precision = options;\n } else if (isNumber(options.precision)) {\n precision = options.precision;\n }\n\n if (options.wordSize) {\n wordSize = options.wordSize;\n\n if (typeof wordSize !== 'number') {\n throw new Error('Option \"wordSize\" must be a number');\n }\n }\n } // handle the various notations\n\n\n switch (notation) {\n case 'fixed':\n return toFixed(value, precision);\n\n case 'exponential':\n return toExponential(value, precision);\n\n case 'engineering':\n return toEngineering(value, precision);\n\n case 'bin':\n return formatNumberToBase(value, 2, wordSize);\n\n case 'oct':\n return formatNumberToBase(value, 8, wordSize);\n\n case 'hex':\n return formatNumberToBase(value, 16, wordSize);\n\n case 'auto':\n // remove trailing zeros after the decimal point\n return toPrecision(value, precision, options && options).replace(/((\\.\\d*?)(0+))($|e)/, function () {\n var digits = arguments[2];\n var e = arguments[4];\n return digits !== '.' ? digits + e : e;\n });\n\n default:\n throw new Error('Unknown notation \"' + notation + '\". ' + 'Choose \"auto\", \"exponential\", \"fixed\", \"bin\", \"oct\", or \"hex.');\n }\n}\n/**\n * Split a number into sign, coefficients, and exponent\n * @param {number | string} value\n * @return {SplitValue}\n * Returns an object containing sign, coefficients, and exponent\n */\n\nexport function splitNumber(value) {\n // parse the input value\n var match = String(value).toLowerCase().match(/^0*?(-?)(\\d+\\.?\\d*)(e([+-]?\\d+))?$/);\n\n if (!match) {\n throw new SyntaxError('Invalid number ' + value);\n }\n\n var sign = match[1];\n var digits = match[2];\n var exponent = parseFloat(match[4] || '0');\n var dot = digits.indexOf('.');\n exponent += dot !== -1 ? dot - 1 : digits.length - 1;\n var coefficients = digits.replace('.', '') // remove the dot (must be removed before removing leading zeros)\n .replace(/^0*/, function (zeros) {\n // remove leading zeros, add their count to the exponent\n exponent -= zeros.length;\n return '';\n }).replace(/0*$/, '') // remove trailing zeros\n .split('').map(function (d) {\n return parseInt(d);\n });\n\n if (coefficients.length === 0) {\n coefficients.push(0);\n exponent++;\n }\n\n return {\n sign: sign,\n coefficients: coefficients,\n exponent: exponent\n };\n}\n/**\n * Format a number in engineering notation. Like '1.23e+6', '2.3e+0', '3.500e-3'\n * @param {number | string} value\n * @param {number} [precision] Optional number of significant figures to return.\n */\n\nexport function toEngineering(value, precision) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n }\n\n var split = splitNumber(value);\n var rounded = roundDigits(split, precision);\n var e = rounded.exponent;\n var c = rounded.coefficients; // find nearest lower multiple of 3 for exponent\n\n var newExp = e % 3 === 0 ? e : e < 0 ? e - 3 - e % 3 : e - e % 3;\n\n if (isNumber(precision)) {\n // add zeroes to give correct sig figs\n while (precision > c.length || e - newExp + 1 > c.length) {\n c.push(0);\n }\n } else {\n // concatenate coefficients with necessary zeros\n // add zeros if necessary (for example: 1e+8 -> 100e+6)\n var missingZeros = Math.abs(e - newExp) - (c.length - 1);\n\n for (var i = 0; i < missingZeros; i++) {\n c.push(0);\n }\n } // find difference in exponents\n\n\n var expDiff = Math.abs(e - newExp);\n var decimalIdx = 1; // push decimal index over by expDiff times\n\n while (expDiff > 0) {\n decimalIdx++;\n expDiff--;\n } // if all coefficient values are zero after the decimal point and precision is unset, don't add a decimal value.\n // otherwise concat with the rest of the coefficients\n\n\n var decimals = c.slice(decimalIdx).join('');\n var decimalVal = isNumber(precision) && decimals.length || decimals.match(/[1-9]/) ? '.' + decimals : '';\n var str = c.slice(0, decimalIdx).join('') + decimalVal + 'e' + (e >= 0 ? '+' : '') + newExp.toString();\n return rounded.sign + str;\n}\n/**\n * Format a number with fixed notation.\n * @param {number | string} value\n * @param {number} [precision=undefined] Optional number of decimals after the\n * decimal point. null by default.\n */\n\nexport function toFixed(value, precision) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n }\n\n var splitValue = splitNumber(value);\n var rounded = typeof precision === 'number' ? roundDigits(splitValue, splitValue.exponent + 1 + precision) : splitValue;\n var c = rounded.coefficients;\n var p = rounded.exponent + 1; // exponent may have changed\n // append zeros if needed\n\n var pp = p + (precision || 0);\n\n if (c.length < pp) {\n c = c.concat(zeros(pp - c.length));\n } // prepend zeros if needed\n\n\n if (p < 0) {\n c = zeros(-p + 1).concat(c);\n p = 1;\n } // insert a dot if needed\n\n\n if (p < c.length) {\n c.splice(p, 0, p === 0 ? '0.' : '.');\n }\n\n return rounded.sign + c.join('');\n}\n/**\n * Format a number in exponential notation. Like '1.23e+5', '2.3e+0', '3.500e-3'\n * @param {number | string} value\n * @param {number} [precision] Number of digits in formatted output.\n * If not provided, the maximum available digits\n * is used.\n */\n\nexport function toExponential(value, precision) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n } // round if needed, else create a clone\n\n\n var split = splitNumber(value);\n var rounded = precision ? roundDigits(split, precision) : split;\n var c = rounded.coefficients;\n var e = rounded.exponent; // append zeros if needed\n\n if (c.length < precision) {\n c = c.concat(zeros(precision - c.length));\n } // format as `C.CCCe+EEE` or `C.CCCe-EEE`\n\n\n var first = c.shift();\n return rounded.sign + first + (c.length > 0 ? '.' + c.join('') : '') + 'e' + (e >= 0 ? '+' : '') + e;\n}\n/**\n * Format a number with a certain precision\n * @param {number | string} value\n * @param {number} [precision=undefined] Optional number of digits.\n * @param {{lowerExp: number | undefined, upperExp: number | undefined}} [options]\n * By default:\n * lowerExp = -3 (incl)\n * upper = +5 (excl)\n * @return {string}\n */\n\nexport function toPrecision(value, precision, options) {\n if (isNaN(value) || !isFinite(value)) {\n return String(value);\n } // determine lower and upper bound for exponential notation.\n\n\n var lowerExp = options && options.lowerExp !== undefined ? options.lowerExp : -3;\n var upperExp = options && options.upperExp !== undefined ? options.upperExp : 5;\n var split = splitNumber(value);\n var rounded = precision ? roundDigits(split, precision) : split;\n\n if (rounded.exponent < lowerExp || rounded.exponent >= upperExp) {\n // exponential notation\n return toExponential(value, precision);\n } else {\n var c = rounded.coefficients;\n var e = rounded.exponent; // append trailing zeros\n\n if (c.length < precision) {\n c = c.concat(zeros(precision - c.length));\n } // append trailing zeros\n // TODO: simplify the next statement\n\n\n c = c.concat(zeros(e - c.length + 1 + (c.length < precision ? precision - c.length : 0))); // prepend zeros\n\n c = zeros(-e).concat(c);\n var dot = e > 0 ? e : 0;\n\n if (dot < c.length - 1) {\n c.splice(dot + 1, 0, '.');\n }\n\n return rounded.sign + c.join('');\n }\n}\n/**\n * Round the number of digits of a number *\n * @param {SplitValue} split A value split with .splitNumber(value)\n * @param {number} precision A positive integer\n * @return {SplitValue}\n * Returns an object containing sign, coefficients, and exponent\n * with rounded digits\n */\n\nexport function roundDigits(split, precision) {\n // create a clone\n var rounded = {\n sign: split.sign,\n coefficients: split.coefficients,\n exponent: split.exponent\n };\n var c = rounded.coefficients; // prepend zeros if needed\n\n while (precision <= 0) {\n c.unshift(0);\n rounded.exponent++;\n precision++;\n }\n\n if (c.length > precision) {\n var removed = c.splice(precision, c.length - precision);\n\n if (removed[0] >= 5) {\n var i = precision - 1;\n c[i]++;\n\n while (c[i] === 10) {\n c.pop();\n\n if (i === 0) {\n c.unshift(0);\n rounded.exponent++;\n i++;\n }\n\n i--;\n c[i]++;\n }\n }\n }\n\n return rounded;\n}\n/**\n * Create an array filled with zeros.\n * @param {number} length\n * @return {Array}\n */\n\nfunction zeros(length) {\n var arr = [];\n\n for (var i = 0; i < length; i++) {\n arr.push(0);\n }\n\n return arr;\n}\n/**\n * Count the number of significant digits of a number.\n *\n * For example:\n * 2.34 returns 3\n * 0.0034 returns 2\n * 120.5e+30 returns 4\n *\n * @param {number} value\n * @return {number} digits Number of significant digits\n */\n\n\nexport function digits(value) {\n return value.toExponential().replace(/e.*$/, '') // remove exponential notation\n .replace(/^0\\.?0*|\\./, '') // remove decimal point and leading zeros\n .length;\n}\n/**\n * Minimum number added to one that makes the result different than one\n */\n\nexport var DBL_EPSILON = Number.EPSILON || 2.2204460492503130808472633361816E-16;\n/**\n * Compares two floating point numbers.\n * @param {number} x First value to compare\n * @param {number} y Second value to compare\n * @param {number} [epsilon] The maximum relative difference between x and y\n * If epsilon is undefined or null, the function will\n * test whether x and y are exactly equal.\n * @return {boolean} whether the two numbers are nearly equal\n*/\n\nexport function nearlyEqual(x, y, epsilon) {\n // if epsilon is null or undefined, test whether x and y are exactly equal\n if (epsilon === null || epsilon === undefined) {\n return x === y;\n }\n\n if (x === y) {\n return true;\n } // NaN\n\n\n if (isNaN(x) || isNaN(y)) {\n return false;\n } // at this point x and y should be finite\n\n\n if (isFinite(x) && isFinite(y)) {\n // check numbers are very close, needed when comparing numbers near zero\n var diff = Math.abs(x - y);\n\n if (diff < DBL_EPSILON) {\n return true;\n } else {\n // use relative error\n return diff <= Math.max(Math.abs(x), Math.abs(y)) * epsilon;\n }\n } // Infinite and Number or negative Infinite and positive Infinite cases\n\n\n return false;\n}\n/**\n * Calculate the hyperbolic arccos of a number\n * @param {number} x\n * @return {number}\n */\n\nexport var acosh = Math.acosh || function (x) {\n return Math.log(Math.sqrt(x * x - 1) + x);\n};\nexport var asinh = Math.asinh || function (x) {\n return Math.log(Math.sqrt(x * x + 1) + x);\n};\n/**\n * Calculate the hyperbolic arctangent of a number\n * @param {number} x\n * @return {number}\n */\n\nexport var atanh = Math.atanh || function (x) {\n return Math.log((1 + x) / (1 - x)) / 2;\n};\n/**\n * Calculate the hyperbolic cosine of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var cosh = Math.cosh || function (x) {\n return (Math.exp(x) + Math.exp(-x)) / 2;\n};\n/**\n * Calculate the hyperbolic sine of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var sinh = Math.sinh || function (x) {\n return (Math.exp(x) - Math.exp(-x)) / 2;\n};\n/**\n * Calculate the hyperbolic tangent of a number\n * @param {number} x\n * @returns {number}\n */\n\nexport var tanh = Math.tanh || function (x) {\n var e = Math.exp(2 * x);\n return (e - 1) / (e + 1);\n};","import { isInteger } from '../number.js';\n/**\n * Formats a BigNumber in a given base\n * @param {BigNumber} n\n * @param {number} base\n * @param {number} size\n * @returns {string}\n */\n\nfunction formatBigNumberToBase(n, base, size) {\n var BigNumberCtor = n.constructor;\n var big2 = new BigNumberCtor(2);\n var suffix = '';\n\n if (size) {\n if (size < 1) {\n throw new Error('size must be in greater than 0');\n }\n\n if (!isInteger(size)) {\n throw new Error('size must be an integer');\n }\n\n if (n.greaterThan(big2.pow(size - 1).sub(1)) || n.lessThan(big2.pow(size - 1).mul(-1))) {\n throw new Error(\"Value must be in range [-2^\".concat(size - 1, \", 2^\").concat(size - 1, \"-1]\"));\n }\n\n if (!n.isInteger()) {\n throw new Error('Value must be an integer');\n }\n\n if (n.lessThan(0)) {\n n = n.add(big2.pow(size));\n }\n\n suffix = \"i\".concat(size);\n }\n\n switch (base) {\n case 2:\n return \"\".concat(n.toBinary()).concat(suffix);\n\n case 8:\n return \"\".concat(n.toOctal()).concat(suffix);\n\n case 16:\n return \"\".concat(n.toHexadecimal()).concat(suffix);\n\n default:\n throw new Error(\"Base \".concat(base, \" not supported \"));\n }\n}\n/**\n * Convert a BigNumber to a formatted string representation.\n *\n * Syntax:\n *\n * format(value)\n * format(value, options)\n * format(value, precision)\n * format(value, fn)\n *\n * Where:\n *\n * {number} value The value to be formatted\n * {Object} options An object with formatting options. Available options:\n * {string} notation\n * Number notation. Choose from:\n * 'fixed' Always use regular number notation.\n * For example '123.40' and '14000000'\n * 'exponential' Always use exponential notation.\n * For example '1.234e+2' and '1.4e+7'\n * 'auto' (default) Regular number notation for numbers\n * having an absolute value between\n * `lower` and `upper` bounds, and uses\n * exponential notation elsewhere.\n * Lower bound is included, upper bound\n * is excluded.\n * For example '123.4' and '1.4e7'.\n * 'bin', 'oct, or\n * 'hex' Format the number using binary, octal,\n * or hexadecimal notation.\n * For example '0b1101' and '0x10fe'.\n * {number} wordSize The word size in bits to use for formatting\n * in binary, octal, or hexadecimal notation.\n * To be used only with 'bin', 'oct', or 'hex'\n * values for 'notation' option. When this option\n * is defined the value is formatted as a signed\n * twos complement integer of the given word size\n * and the size suffix is appended to the output.\n * For example\n * format(-1, {notation: 'hex', wordSize: 8}) === '0xffi8'.\n * Default value is undefined.\n * {number} precision A number between 0 and 16 to round\n * the digits of the number.\n * In case of notations 'exponential',\n * 'engineering', and 'auto',\n * `precision` defines the total\n * number of significant digits returned.\n * In case of notation 'fixed',\n * `precision` defines the number of\n * significant digits after the decimal\n * point.\n * `precision` is undefined by default.\n * {number} lowerExp Exponent determining the lower boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `-3`.\n * {number} upperExp Exponent determining the upper boundary\n * for formatting a value with an exponent\n * when `notation='auto`.\n * Default value is `5`.\n * {Function} fn A custom formatting function. Can be used to override the\n * built-in notations. Function `fn` is called with `value` as\n * parameter and must return a string. Is useful for example to\n * format all values inside a matrix in a particular way.\n *\n * Examples:\n *\n * format(6.4) // '6.4'\n * format(1240000) // '1.24e6'\n * format(1/3) // '0.3333333333333333'\n * format(1/3, 3) // '0.333'\n * format(21385, 2) // '21000'\n * format(12e8, {notation: 'fixed'}) // returns '1200000000'\n * format(2.3, {notation: 'fixed', precision: 4}) // returns '2.3000'\n * format(52.8, {notation: 'exponential'}) // returns '5.28e+1'\n * format(12400, {notation: 'engineering'}) // returns '12.400e+3'\n *\n * @param {BigNumber} value\n * @param {Object | Function | number} [options]\n * @return {string} str The formatted value\n */\n\n\nexport function format(value, options) {\n if (typeof options === 'function') {\n // handle format(value, fn)\n return options(value);\n } // handle special cases\n\n\n if (!value.isFinite()) {\n return value.isNaN() ? 'NaN' : value.gt(0) ? 'Infinity' : '-Infinity';\n } // default values for options\n\n\n var notation = 'auto';\n var precision;\n var wordSize;\n\n if (options !== undefined) {\n // determine notation from options\n if (options.notation) {\n notation = options.notation;\n } // determine precision from options\n\n\n if (typeof options === 'number') {\n precision = options;\n } else if (options.precision) {\n precision = options.precision;\n }\n\n if (options.wordSize) {\n wordSize = options.wordSize;\n\n if (typeof wordSize !== 'number') {\n throw new Error('Option \"wordSize\" must be a number');\n }\n }\n } // handle the various notations\n\n\n switch (notation) {\n case 'fixed':\n return toFixed(value, precision);\n\n case 'exponential':\n return toExponential(value, precision);\n\n case 'engineering':\n return toEngineering(value, precision);\n\n case 'bin':\n return formatBigNumberToBase(value, 2, wordSize);\n\n case 'oct':\n return formatBigNumberToBase(value, 8, wordSize);\n\n case 'hex':\n return formatBigNumberToBase(value, 16, wordSize);\n\n case 'auto':\n {\n // determine lower and upper bound for exponential notation.\n // TODO: implement support for upper and lower to be BigNumbers themselves\n var lowerExp = options && options.lowerExp !== undefined ? options.lowerExp : -3;\n var upperExp = options && options.upperExp !== undefined ? options.upperExp : 5; // handle special case zero\n\n if (value.isZero()) return '0'; // determine whether or not to output exponential notation\n\n var str;\n var rounded = value.toSignificantDigits(precision);\n var exp = rounded.e;\n\n if (exp >= lowerExp && exp < upperExp) {\n // normal number notation\n str = rounded.toFixed();\n } else {\n // exponential notation\n str = toExponential(value, precision);\n } // remove trailing zeros after the decimal point\n\n\n return str.replace(/((\\.\\d*?)(0+))($|e)/, function () {\n var digits = arguments[2];\n var e = arguments[4];\n return digits !== '.' ? digits + e : e;\n });\n }\n\n default:\n throw new Error('Unknown notation \"' + notation + '\". ' + 'Choose \"auto\", \"exponential\", \"fixed\", \"bin\", \"oct\", or \"hex.');\n }\n}\n/**\n * Format a BigNumber in engineering notation. Like '1.23e+6', '2.3e+0', '3.500e-3'\n * @param {BigNumber | string} value\n * @param {number} [precision] Optional number of significant figures to return.\n */\n\nexport function toEngineering(value, precision) {\n // find nearest lower multiple of 3 for exponent\n var e = value.e;\n var newExp = e % 3 === 0 ? e : e < 0 ? e - 3 - e % 3 : e - e % 3; // find difference in exponents, and calculate the value without exponent\n\n var valueWithoutExp = value.mul(Math.pow(10, -newExp));\n var valueStr = valueWithoutExp.toPrecision(precision);\n\n if (valueStr.indexOf('e') !== -1) {\n valueStr = valueWithoutExp.toString();\n }\n\n return valueStr + 'e' + (e >= 0 ? '+' : '') + newExp.toString();\n}\n/**\n * Format a number in exponential notation. Like '1.23e+5', '2.3e+0', '3.500e-3'\n * @param {BigNumber} value\n * @param {number} [precision] Number of digits in formatted output.\n * If not provided, the maximum available digits\n * is used.\n * @returns {string} str\n */\n\nexport function toExponential(value, precision) {\n if (precision !== undefined) {\n return value.toExponential(precision - 1); // Note the offset of one\n } else {\n return value.toExponential();\n }\n}\n/**\n * Format a number with fixed notation.\n * @param {BigNumber} value\n * @param {number} [precision=undefined] Optional number of decimals after the\n * decimal point. Undefined by default.\n */\n\nexport function toFixed(value, precision) {\n return value.toFixed(precision);\n}","import { isBigNumber, isString, typeOf } from './is.js';\nimport { format as formatNumber } from './number.js';\nimport { format as formatBigNumber } from './bignumber/formatter.js';\n/**\n * Check if a text ends with a certain string.\n * @param {string} text\n * @param {string} search\n */\n\nexport function endsWith(text, search) {\n var start = text.length - search.length;\n var end = text.length;\n return text.substring(start, end) === search;\n}\n/**\n * Format a value of any type into a string.\n *\n * Usage:\n * math.format(value)\n * math.format(value, precision)\n *\n * When value is a function:\n *\n * - When the function has a property `syntax`, it returns this\n * syntax description.\n * - In other cases, a string `'function'` is returned.\n *\n * When `value` is an Object:\n *\n * - When the object contains a property `format` being a function, this\n * function is invoked as `value.format(options)` and the result is returned.\n * - When the object has its own `toString` method, this method is invoked\n * and the result is returned.\n * - In other cases the function will loop over all object properties and\n * return JSON object notation like '{\"a\": 2, \"b\": 3}'.\n *\n * Example usage:\n * math.format(2/7) // '0.2857142857142857'\n * math.format(math.pi, 3) // '3.14'\n * math.format(new Complex(2, 3)) // '2 + 3i'\n * math.format('hello') // '\"hello\"'\n *\n * @param {*} value Value to be stringified\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @return {string} str\n */\n\nexport function format(value, options) {\n if (typeof value === 'number') {\n return formatNumber(value, options);\n }\n\n if (isBigNumber(value)) {\n return formatBigNumber(value, options);\n } // note: we use unsafe duck-typing here to check for Fractions, this is\n // ok here since we're only invoking toString or concatenating its values\n\n\n if (looksLikeFraction(value)) {\n if (!options || options.fraction !== 'decimal') {\n // output as ratio, like '1/3'\n return value.s * value.n + '/' + value.d;\n } else {\n // output as decimal, like '0.(3)'\n return value.toString();\n }\n }\n\n if (Array.isArray(value)) {\n return formatArray(value, options);\n }\n\n if (isString(value)) {\n return '\"' + value + '\"';\n }\n\n if (typeof value === 'function') {\n return value.syntax ? String(value.syntax) : 'function';\n }\n\n if (value && typeof value === 'object') {\n if (typeof value.format === 'function') {\n return value.format(options);\n } else if (value && value.toString(options) !== {}.toString()) {\n // this object has a non-native toString method, use that one\n return value.toString(options);\n } else {\n var entries = Object.keys(value).map(key => {\n return '\"' + key + '\": ' + format(value[key], options);\n });\n return '{' + entries.join(', ') + '}';\n }\n }\n\n return String(value);\n}\n/**\n * Stringify a value into a string enclosed in double quotes.\n * Unescaped double quotes and backslashes inside the value are escaped.\n * @param {*} value\n * @return {string}\n */\n\nexport function stringify(value) {\n var text = String(value);\n var escaped = '';\n var i = 0;\n\n while (i < text.length) {\n var c = text.charAt(i);\n\n if (c === '\\\\') {\n escaped += c;\n i++;\n c = text.charAt(i);\n\n if (c === '' || '\"\\\\/bfnrtu'.indexOf(c) === -1) {\n escaped += '\\\\'; // no valid escape character -> escape it\n }\n\n escaped += c;\n } else if (c === '\"') {\n escaped += '\\\\\"';\n } else {\n escaped += c;\n }\n\n i++;\n }\n\n return '\"' + escaped + '\"';\n}\n/**\n * Escape special HTML characters\n * @param {*} value\n * @return {string}\n */\n\nexport function escape(value) {\n var text = String(value);\n text = text.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n return text;\n}\n/**\n * Recursively format an n-dimensional matrix\n * Example output: \"[[1, 2], [3, 4]]\"\n * @param {Array} array\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @returns {string} str\n */\n\nfunction formatArray(array, options) {\n if (Array.isArray(array)) {\n var str = '[';\n var len = array.length;\n\n for (var i = 0; i < len; i++) {\n if (i !== 0) {\n str += ', ';\n }\n\n str += formatArray(array[i], options);\n }\n\n str += ']';\n return str;\n } else {\n return format(array, options);\n }\n}\n/**\n * Check whether a value looks like a Fraction (unsafe duck-type check)\n * @param {*} value\n * @return {boolean}\n */\n\n\nfunction looksLikeFraction(value) {\n return value && typeof value === 'object' && typeof value.s === 'number' && typeof value.n === 'number' && typeof value.d === 'number' || false;\n}\n/**\n * Compare two strings\n * @param {string} x\n * @param {string} y\n * @returns {number}\n */\n\n\nexport function compareText(x, y) {\n // we don't want to convert numbers to string, only accept string input\n if (!isString(x)) {\n throw new TypeError('Unexpected type of argument in function compareText ' + '(expected: string or Array or Matrix, actual: ' + typeOf(x) + ', index: 0)');\n }\n\n if (!isString(y)) {\n throw new TypeError('Unexpected type of argument in function compareText ' + '(expected: string or Array or Matrix, actual: ' + typeOf(y) + ', index: 1)');\n }\n\n return x === y ? 0 : x > y ? 1 : -1;\n}","/**\n * Create a range error with the message:\n * 'Dimension mismatch (<actual size> != <expected size>)'\n * @param {number | number[]} actual The actual size\n * @param {number | number[]} expected The expected size\n * @param {string} [relation='!='] Optional relation between actual\n * and expected size: '!=', '<', etc.\n * @extends RangeError\n */\nexport function DimensionError(actual, expected, relation) {\n if (!(this instanceof DimensionError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.actual = actual;\n this.expected = expected;\n this.relation = relation;\n this.message = 'Dimension mismatch (' + (Array.isArray(actual) ? '[' + actual.join(', ') + ']' : actual) + ' ' + (this.relation || '!=') + ' ' + (Array.isArray(expected) ? '[' + expected.join(', ') + ']' : expected) + ')';\n this.stack = new Error().stack;\n}\nDimensionError.prototype = new RangeError();\nDimensionError.prototype.constructor = RangeError;\nDimensionError.prototype.name = 'DimensionError';\nDimensionError.prototype.isDimensionError = true;","/**\n * Create a range error with the message:\n * 'Index out of range (index < min)'\n * 'Index out of range (index < max)'\n *\n * @param {number} index The actual index\n * @param {number} [min=0] Minimum index (included)\n * @param {number} [max] Maximum index (excluded)\n * @extends RangeError\n */\nexport function IndexError(index, min, max) {\n if (!(this instanceof IndexError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.index = index;\n\n if (arguments.length < 3) {\n this.min = 0;\n this.max = min;\n } else {\n this.min = min;\n this.max = max;\n }\n\n if (this.min !== undefined && this.index < this.min) {\n this.message = 'Index out of range (' + this.index + ' < ' + this.min + ')';\n } else if (this.max !== undefined && this.index >= this.max) {\n this.message = 'Index out of range (' + this.index + ' > ' + (this.max - 1) + ')';\n } else {\n this.message = 'Index out of range (' + this.index + ')';\n }\n\n this.stack = new Error().stack;\n}\nIndexError.prototype = new RangeError();\nIndexError.prototype.constructor = RangeError;\nIndexError.prototype.name = 'IndexError';\nIndexError.prototype.isIndexError = true;","import { isInteger } from './number.js';\nimport { isNumber } from './is.js';\nimport { format } from './string.js';\nimport { DimensionError } from '../error/DimensionError.js';\nimport { IndexError } from '../error/IndexError.js';\n/**\n * Calculate the size of a multi dimensional array.\n * This function checks the size of the first entry, it does not validate\n * whether all dimensions match. (use function `validate` for that)\n * @param {Array} x\n * @Return {Number[]} size\n */\n\nexport function arraySize(x) {\n var s = [];\n\n while (Array.isArray(x)) {\n s.push(x.length);\n x = x[0];\n }\n\n return s;\n}\n/**\n * Recursively validate whether each element in a multi dimensional array\n * has a size corresponding to the provided size array.\n * @param {Array} array Array to be validated\n * @param {number[]} size Array with the size of each dimension\n * @param {number} dim Current dimension\n * @throws DimensionError\n * @private\n */\n\nfunction _validate(array, size, dim) {\n var i;\n var len = array.length;\n\n if (len !== size[dim]) {\n throw new DimensionError(len, size[dim]);\n }\n\n if (dim < size.length - 1) {\n // recursively validate each child array\n var dimNext = dim + 1;\n\n for (i = 0; i < len; i++) {\n var child = array[i];\n\n if (!Array.isArray(child)) {\n throw new DimensionError(size.length - 1, size.length, '<');\n }\n\n _validate(array[i], size, dimNext);\n }\n } else {\n // last dimension. none of the childs may be an array\n for (i = 0; i < len; i++) {\n if (Array.isArray(array[i])) {\n throw new DimensionError(size.length + 1, size.length, '>');\n }\n }\n }\n}\n/**\n * Validate whether each element in a multi dimensional array has\n * a size corresponding to the provided size array.\n * @param {Array} array Array to be validated\n * @param {number[]} size Array with the size of each dimension\n * @throws DimensionError\n */\n\n\nexport function validate(array, size) {\n var isScalar = size.length === 0;\n\n if (isScalar) {\n // scalar\n if (Array.isArray(array)) {\n throw new DimensionError(array.length, 0);\n }\n } else {\n // array\n _validate(array, size, 0);\n }\n}\n/**\n * Test whether index is an integer number with index >= 0 and index < length\n * when length is provided\n * @param {number} index Zero-based index\n * @param {number} [length] Length of the array\n */\n\nexport function validateIndex(index, length) {\n if (!isNumber(index) || !isInteger(index)) {\n throw new TypeError('Index must be an integer (value: ' + index + ')');\n }\n\n if (index < 0 || typeof length === 'number' && index >= length) {\n throw new IndexError(index, length);\n }\n}\n/**\n * Resize a multi dimensional array. The resized array is returned.\n * @param {Array} array Array to be resized\n * @param {Array.<number>} size Array with the size of each dimension\n * @param {*} [defaultValue=0] Value to be filled in in new entries,\n * zero by default. Specify for example `null`,\n * to clearly see entries that are not explicitly\n * set.\n * @return {Array} array The resized array\n */\n\nexport function resize(array, size, defaultValue) {\n // TODO: add support for scalars, having size=[] ?\n // check the type of the arguments\n if (!Array.isArray(array) || !Array.isArray(size)) {\n throw new TypeError('Array expected');\n }\n\n if (size.length === 0) {\n throw new Error('Resizing to scalar is not supported');\n } // check whether size contains positive integers\n\n\n size.forEach(function (value) {\n if (!isNumber(value) || !isInteger(value) || value < 0) {\n throw new TypeError('Invalid size, must contain positive integers ' + '(size: ' + format(size) + ')');\n }\n }); // recursively resize the array\n\n var _defaultValue = defaultValue !== undefined ? defaultValue : 0;\n\n _resize(array, size, 0, _defaultValue);\n\n return array;\n}\n/**\n * Recursively resize a multi dimensional array\n * @param {Array} array Array to be resized\n * @param {number[]} size Array with the size of each dimension\n * @param {number} dim Current dimension\n * @param {*} [defaultValue] Value to be filled in in new entries,\n * undefined by default.\n * @private\n */\n\nfunction _resize(array, size, dim, defaultValue) {\n var i;\n var elem;\n var oldLen = array.length;\n var newLen = size[dim];\n var minLen = Math.min(oldLen, newLen); // apply new length\n\n array.length = newLen;\n\n if (dim < size.length - 1) {\n // non-last dimension\n var dimNext = dim + 1; // resize existing child arrays\n\n for (i = 0; i < minLen; i++) {\n // resize child array\n elem = array[i];\n\n if (!Array.isArray(elem)) {\n elem = [elem]; // add a dimension\n\n array[i] = elem;\n }\n\n _resize(elem, size, dimNext, defaultValue);\n } // create new child arrays\n\n\n for (i = minLen; i < newLen; i++) {\n // get child array\n elem = [];\n array[i] = elem; // resize new child array\n\n _resize(elem, size, dimNext, defaultValue);\n }\n } else {\n // last dimension\n // remove dimensions of existing values\n for (i = 0; i < minLen; i++) {\n while (Array.isArray(array[i])) {\n array[i] = array[i][0];\n }\n } // fill new elements with the default value\n\n\n for (i = minLen; i < newLen; i++) {\n array[i] = defaultValue;\n }\n }\n}\n/**\n * Re-shape a multi dimensional array to fit the specified dimensions\n * @param {Array} array Array to be reshaped\n * @param {Array.<number>} sizes List of sizes for each dimension\n * @returns {Array} Array whose data has been formatted to fit the\n * specified dimensions\n *\n * @throws {DimensionError} If the product of the new dimension sizes does\n * not equal that of the old ones\n */\n\n\nexport function reshape(array, sizes) {\n var flatArray = flatten(array);\n var currentLength = flatArray.length;\n\n if (!Array.isArray(array) || !Array.isArray(sizes)) {\n throw new TypeError('Array expected');\n }\n\n if (sizes.length === 0) {\n throw new DimensionError(0, currentLength, '!=');\n }\n\n sizes = processSizesWildcard(sizes, currentLength);\n var newLength = product(sizes);\n\n if (currentLength !== newLength) {\n throw new DimensionError(newLength, currentLength, '!=');\n }\n\n try {\n return _reshape(flatArray, sizes);\n } catch (e) {\n if (e instanceof DimensionError) {\n throw new DimensionError(newLength, currentLength, '!=');\n }\n\n throw e;\n }\n}\n/**\n * Replaces the wildcard -1 in the sizes array.\n * @param {Array.<number>} sizes List of sizes for each dimension. At most on wildcard.\n * @param {number} currentLength Number of elements in the array.\n * @throws {Error} If more than one wildcard or unable to replace it.\n * @returns {Array.<number>} The sizes array with wildcard replaced.\n */\n\nexport function processSizesWildcard(sizes, currentLength) {\n var newLength = product(sizes);\n var processedSizes = sizes.slice();\n var WILDCARD = -1;\n var wildCardIndex = sizes.indexOf(WILDCARD);\n var isMoreThanOneWildcard = sizes.indexOf(WILDCARD, wildCardIndex + 1) >= 0;\n\n if (isMoreThanOneWildcard) {\n throw new Error('More than one wildcard in sizes');\n }\n\n var hasWildcard = wildCardIndex >= 0;\n var canReplaceWildcard = currentLength % newLength === 0;\n\n if (hasWildcard) {\n if (canReplaceWildcard) {\n processedSizes[wildCardIndex] = -currentLength / newLength;\n } else {\n throw new Error('Could not replace wildcard, since ' + currentLength + ' is no multiple of ' + -newLength);\n }\n }\n\n return processedSizes;\n}\n/**\n * Computes the product of all array elements.\n * @param {Array<number>} array Array of factors\n * @returns {number} Product of all elements\n */\n\nfunction product(array) {\n return array.reduce((prev, curr) => prev * curr, 1);\n}\n/**\n * Iteratively re-shape a multi dimensional array to fit the specified dimensions\n * @param {Array} array Array to be reshaped\n * @param {Array.<number>} sizes List of sizes for each dimension\n * @returns {Array} Array whose data has been formatted to fit the\n * specified dimensions\n */\n\n\nfunction _reshape(array, sizes) {\n // testing if there are enough elements for the requested shape\n var tmpArray = array;\n var tmpArray2; // for each dimensions starting by the last one and ignoring the first one\n\n for (var sizeIndex = sizes.length - 1; sizeIndex > 0; sizeIndex--) {\n var size = sizes[sizeIndex];\n tmpArray2 = []; // aggregate the elements of the current tmpArray in elements of the requested size\n\n var length = tmpArray.length / size;\n\n for (var i = 0; i < length; i++) {\n tmpArray2.push(tmpArray.slice(i * size, (i + 1) * size));\n } // set it as the new tmpArray for the next loop turn or for return\n\n\n tmpArray = tmpArray2;\n }\n\n return tmpArray;\n}\n/**\n * Squeeze a multi dimensional array\n * @param {Array} array\n * @param {Array} [size]\n * @returns {Array} returns the array itself\n */\n\n\nexport function squeeze(array, size) {\n var s = size || arraySize(array); // squeeze outer dimensions\n\n while (Array.isArray(array) && array.length === 1) {\n array = array[0];\n s.shift();\n } // find the first dimension to be squeezed\n\n\n var dims = s.length;\n\n while (s[dims - 1] === 1) {\n dims--;\n } // squeeze inner dimensions\n\n\n if (dims < s.length) {\n array = _squeeze(array, dims, 0);\n s.length = dims;\n }\n\n return array;\n}\n/**\n * Recursively squeeze a multi dimensional array\n * @param {Array} array\n * @param {number} dims Required number of dimensions\n * @param {number} dim Current dimension\n * @returns {Array | *} Returns the squeezed array\n * @private\n */\n\nfunction _squeeze(array, dims, dim) {\n var i, ii;\n\n if (dim < dims) {\n var next = dim + 1;\n\n for (i = 0, ii = array.length; i < ii; i++) {\n array[i] = _squeeze(array[i], dims, next);\n }\n } else {\n while (Array.isArray(array)) {\n array = array[0];\n }\n }\n\n return array;\n}\n/**\n * Unsqueeze a multi dimensional array: add dimensions when missing\n *\n * Paramter `size` will be mutated to match the new, unqueezed matrix size.\n *\n * @param {Array} array\n * @param {number} dims Desired number of dimensions of the array\n * @param {number} [outer] Number of outer dimensions to be added\n * @param {Array} [size] Current size of array.\n * @returns {Array} returns the array itself\n * @private\n */\n\n\nexport function unsqueeze(array, dims, outer, size) {\n var s = size || arraySize(array); // unsqueeze outer dimensions\n\n if (outer) {\n for (var i = 0; i < outer; i++) {\n array = [array];\n s.unshift(1);\n }\n } // unsqueeze inner dimensions\n\n\n array = _unsqueeze(array, dims, 0);\n\n while (s.length < dims) {\n s.push(1);\n }\n\n return array;\n}\n/**\n * Recursively unsqueeze a multi dimensional array\n * @param {Array} array\n * @param {number} dims Required number of dimensions\n * @param {number} dim Current dimension\n * @returns {Array | *} Returns the squeezed array\n * @private\n */\n\nfunction _unsqueeze(array, dims, dim) {\n var i, ii;\n\n if (Array.isArray(array)) {\n var next = dim + 1;\n\n for (i = 0, ii = array.length; i < ii; i++) {\n array[i] = _unsqueeze(array[i], dims, next);\n }\n } else {\n for (var d = dim; d < dims; d++) {\n array = [array];\n }\n }\n\n return array;\n}\n/**\n * Flatten a multi dimensional array, put all elements in a one dimensional\n * array\n * @param {Array} array A multi dimensional array\n * @return {Array} The flattened array (1 dimensional)\n */\n\n\nexport function flatten(array) {\n if (!Array.isArray(array)) {\n // if not an array, return as is\n return array;\n }\n\n var flat = [];\n array.forEach(function callback(value) {\n if (Array.isArray(value)) {\n value.forEach(callback); // traverse through sub-arrays recursively\n } else {\n flat.push(value);\n }\n });\n return flat;\n}\n/**\n * A safe map\n * @param {Array} array\n * @param {function} callback\n */\n\nexport function map(array, callback) {\n return Array.prototype.map.call(array, callback);\n}\n/**\n * A safe forEach\n * @param {Array} array\n * @param {function} callback\n */\n\nexport function forEach(array, callback) {\n Array.prototype.forEach.call(array, callback);\n}\n/**\n * A safe filter\n * @param {Array} array\n * @param {function} callback\n */\n\nexport function filter(array, callback) {\n if (arraySize(array).length !== 1) {\n throw new Error('Only one dimensional matrices supported');\n }\n\n return Array.prototype.filter.call(array, callback);\n}\n/**\n * Filter values in a callback given a regular expression\n * @param {Array} array\n * @param {RegExp} regexp\n * @return {Array} Returns the filtered array\n * @private\n */\n\nexport function filterRegExp(array, regexp) {\n if (arraySize(array).length !== 1) {\n throw new Error('Only one dimensional matrices supported');\n }\n\n return Array.prototype.filter.call(array, entry => regexp.test(entry));\n}\n/**\n * A safe join\n * @param {Array} array\n * @param {string} separator\n */\n\nexport function join(array, separator) {\n return Array.prototype.join.call(array, separator);\n}\n/**\n * Assign a numeric identifier to every element of a sorted array\n * @param {Array} a An array\n * @return {Array} An array of objects containing the original value and its identifier\n */\n\nexport function identify(a) {\n if (!Array.isArray(a)) {\n throw new TypeError('Array input expected');\n }\n\n if (a.length === 0) {\n return a;\n }\n\n var b = [];\n var count = 0;\n b[0] = {\n value: a[0],\n identifier: 0\n };\n\n for (var i = 1; i < a.length; i++) {\n if (a[i] === a[i - 1]) {\n count++;\n } else {\n count = 0;\n }\n\n b.push({\n value: a[i],\n identifier: count\n });\n }\n\n return b;\n}\n/**\n * Remove the numeric identifier from the elements\n * @param {array} a An array\n * @return {array} An array of values without identifiers\n */\n\nexport function generalize(a) {\n if (!Array.isArray(a)) {\n throw new TypeError('Array input expected');\n }\n\n if (a.length === 0) {\n return a;\n }\n\n var b = [];\n\n for (var i = 0; i < a.length; i++) {\n b.push(a[i].value);\n }\n\n return b;\n}\n/**\n * Check the datatype of a given object\n * This is a low level implementation that should only be used by\n * parent Matrix classes such as SparseMatrix or DenseMatrix\n * This method does not validate Array Matrix shape\n * @param {Array} array\n * @param {function} typeOf Callback function to use to determine the type of a value\n * @return string\n */\n\nexport function getArrayDataType(array, typeOf) {\n var type; // to hold type info\n\n var length = 0; // to hold length value to ensure it has consistent sizes\n\n for (var i = 0; i < array.length; i++) {\n var item = array[i];\n var isArray = Array.isArray(item); // Saving the target matrix row size\n\n if (i === 0 && isArray) {\n length = item.length;\n } // If the current item is an array but the length does not equal the targetVectorSize\n\n\n if (isArray && item.length !== length) {\n return undefined;\n }\n\n var itemType = isArray ? getArrayDataType(item, typeOf) // recurse into a nested array\n : typeOf(item);\n\n if (type === undefined) {\n type = itemType; // first item\n } else if (type !== itemType) {\n return 'mixed';\n } else {// we're good, everything has the same type so far\n }\n }\n\n return type;\n}\n/**\n * Return the last item from an array\n * @param array\n * @returns {*}\n */\n\nexport function last(array) {\n return array[array.length - 1];\n}\n/**\n * Get all but the last element of array.\n */\n\nexport function initial(array) {\n return array.slice(0, array.length - 1);\n}\n/**\n * Test whether an array or string contains an item\n * @param {Array | string} array\n * @param {*} item\n * @return {boolean}\n */\n\nexport function contains(array, item) {\n return array.indexOf(item) !== -1;\n}","import { contains } from './array.js';\nimport { pickShallow } from './object.js';\n/**\n * Create a factory function, which can be used to inject dependencies.\n *\n * The created functions are memoized, a consecutive call of the factory\n * with the exact same inputs will return the same function instance.\n * The memoized cache is exposed on `factory.cache` and can be cleared\n * if needed.\n *\n * Example:\n *\n * const name = 'log'\n * const dependencies = ['config', 'typed', 'divideScalar', 'Complex']\n *\n * export const createLog = factory(name, dependencies, ({ typed, config, divideScalar, Complex }) => {\n * // ... create the function log here and return it\n * }\n *\n * @param {string} name Name of the function to be created\n * @param {string[]} dependencies The names of all required dependencies\n * @param {function} create Callback function called with an object with all dependencies\n * @param {Object} [meta] Optional object with meta information that will be attached\n * to the created factory function as property `meta`.\n * @returns {function}\n */\n\nexport function factory(name, dependencies, create, meta) {\n function assertAndCreate(scope) {\n // we only pass the requested dependencies to the factory function\n // to prevent functions to rely on dependencies that are not explicitly\n // requested.\n var deps = pickShallow(scope, dependencies.map(stripOptionalNotation));\n assertDependencies(name, dependencies, scope);\n return create(deps);\n }\n\n assertAndCreate.isFactory = true;\n assertAndCreate.fn = name;\n assertAndCreate.dependencies = dependencies.slice().sort();\n\n if (meta) {\n assertAndCreate.meta = meta;\n }\n\n return assertAndCreate;\n}\n/**\n * Sort all factories such that when loading in order, the dependencies are resolved.\n *\n * @param {Array} factories\n * @returns {Array} Returns a new array with the sorted factories.\n */\n\nexport function sortFactories(factories) {\n var factoriesByName = {};\n factories.forEach(factory => {\n factoriesByName[factory.fn] = factory;\n });\n\n function containsDependency(factory, dependency) {\n // TODO: detect circular references\n if (isFactory(factory)) {\n if (contains(factory.dependencies, dependency.fn || dependency.name)) {\n return true;\n }\n\n if (factory.dependencies.some(d => containsDependency(factoriesByName[d], dependency))) {\n return true;\n }\n }\n\n return false;\n }\n\n var sorted = [];\n\n function addFactory(factory) {\n var index = 0;\n\n while (index < sorted.length && !containsDependency(sorted[index], factory)) {\n index++;\n }\n\n sorted.splice(index, 0, factory);\n } // sort regular factory functions\n\n\n factories.filter(isFactory).forEach(addFactory); // sort legacy factory functions AFTER the regular factory functions\n\n factories.filter(factory => !isFactory(factory)).forEach(addFactory);\n return sorted;\n} // TODO: comment or cleanup if unused in the end\n\nexport function create(factories) {\n var scope = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n sortFactories(factories).forEach(factory => factory(scope));\n return scope;\n}\n/**\n * Test whether an object is a factory. This is the case when it has\n * properties name, dependencies, and a function create.\n * @param {*} obj\n * @returns {boolean}\n */\n\nexport function isFactory(obj) {\n return typeof obj === 'function' && typeof obj.fn === 'string' && Array.isArray(obj.dependencies);\n}\n/**\n * Assert that all dependencies of a list with dependencies are available in the provided scope.\n *\n * Will throw an exception when there are dependencies missing.\n *\n * @param {string} name Name for the function to be created. Used to generate a useful error message\n * @param {string[]} dependencies\n * @param {Object} scope\n */\n\nexport function assertDependencies(name, dependencies, scope) {\n var allDefined = dependencies.filter(dependency => !isOptionalDependency(dependency)) // filter optionals\n .every(dependency => scope[dependency] !== undefined);\n\n if (!allDefined) {\n var missingDependencies = dependencies.filter(dependency => scope[dependency] === undefined); // TODO: create a custom error class for this, a MathjsError or something like that\n\n throw new Error(\"Cannot create function \\\"\".concat(name, \"\\\", \") + \"some dependencies are missing: \".concat(missingDependencies.map(d => \"\\\"\".concat(d, \"\\\"\")).join(', '), \".\"));\n }\n}\nexport function isOptionalDependency(dependency) {\n return dependency && dependency[0] === '?';\n}\nexport function stripOptionalNotation(dependency) {\n return dependency && dependency[0] === '?' ? dependency.slice(1) : dependency;\n}","import { factory } from '../../utils/factory.js';\nvar name = 'ResultSet';\nvar dependencies = [];\nexport var createResultSet = /* #__PURE__ */factory(name, dependencies, () => {\n /**\n * A ResultSet contains a list or results\n * @class ResultSet\n * @param {Array} entries\n * @constructor ResultSet\n */\n function ResultSet(entries) {\n if (!(this instanceof ResultSet)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.entries = entries || [];\n }\n /**\n * Attach type information\n */\n\n\n ResultSet.prototype.type = 'ResultSet';\n ResultSet.prototype.isResultSet = true;\n /**\n * Returns the array with results hold by this ResultSet\n * @memberof ResultSet\n * @returns {Array} entries\n */\n\n ResultSet.prototype.valueOf = function () {\n return this.entries;\n };\n /**\n * Returns the stringified results of the ResultSet\n * @memberof ResultSet\n * @returns {string} string\n */\n\n\n ResultSet.prototype.toString = function () {\n return '[' + this.entries.join(', ') + ']';\n };\n /**\n * Get a JSON representation of the ResultSet\n * @memberof ResultSet\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"ResultSet\", \"entries\": [...]}`\n */\n\n\n ResultSet.prototype.toJSON = function () {\n return {\n mathjs: 'ResultSet',\n entries: this.entries\n };\n };\n /**\n * Instantiate a ResultSet from a JSON object\n * @memberof ResultSet\n * @param {Object} json A JSON object structured as:\n * `{\"mathjs\": \"ResultSet\", \"entries\": [...]}`\n * @return {ResultSet}\n */\n\n\n ResultSet.fromJSON = function (json) {\n return new ResultSet(json.entries);\n };\n\n return ResultSet;\n}, {\n isClass: true\n});","import Complex from 'complex.js';\nimport { format } from '../../utils/number.js';\nimport { isNumber, isUnit } from '../../utils/is.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'Complex';\nvar dependencies = [];\nexport var createComplexClass = /* #__PURE__ */factory(name, dependencies, () => {\n /**\n * Attach type information\n */\n Complex.prototype.type = 'Complex';\n Complex.prototype.isComplex = true;\n /**\n * Get a JSON representation of the complex number\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"Complex\", \"re\": 2, \"im\": 3}`\n */\n\n Complex.prototype.toJSON = function () {\n return {\n mathjs: 'Complex',\n re: this.re,\n im: this.im\n };\n };\n /*\n * Return the value of the complex number in polar notation\n * The angle phi will be set in the interval of [-pi, pi].\n * @return {{r: number, phi: number}} Returns and object with properties r and phi.\n */\n\n\n Complex.prototype.toPolar = function () {\n return {\n r: this.abs(),\n phi: this.arg()\n };\n };\n /**\n * Get a string representation of the complex number,\n * with optional formatting options.\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @return {string} str\n */\n\n\n Complex.prototype.format = function (options) {\n var str = '';\n var im = this.im;\n var re = this.re;\n var strRe = format(this.re, options);\n var strIm = format(this.im, options); // round either re or im when smaller than the configured precision\n\n var precision = isNumber(options) ? options : options ? options.precision : null;\n\n if (precision !== null) {\n var epsilon = Math.pow(10, -precision);\n\n if (Math.abs(re / im) < epsilon) {\n re = 0;\n }\n\n if (Math.abs(im / re) < epsilon) {\n im = 0;\n }\n }\n\n if (im === 0) {\n // real value\n str = strRe;\n } else if (re === 0) {\n // purely complex value\n if (im === 1) {\n str = 'i';\n } else if (im === -1) {\n str = '-i';\n } else {\n str = strIm + 'i';\n }\n } else {\n // complex value\n if (im < 0) {\n if (im === -1) {\n str = strRe + ' - i';\n } else {\n str = strRe + ' - ' + strIm.substring(1) + 'i';\n }\n } else {\n if (im === 1) {\n str = strRe + ' + i';\n } else {\n str = strRe + ' + ' + strIm + 'i';\n }\n }\n }\n\n return str;\n };\n /**\n * Create a complex number from polar coordinates\n *\n * Usage:\n *\n * Complex.fromPolar(r: number, phi: number) : Complex\n * Complex.fromPolar({r: number, phi: number}) : Complex\n *\n * @param {*} args...\n * @return {Complex}\n */\n\n\n Complex.fromPolar = function (args) {\n switch (arguments.length) {\n case 1:\n {\n var arg = arguments[0];\n\n if (typeof arg === 'object') {\n return Complex(arg);\n } else {\n throw new TypeError('Input has to be an object with r and phi keys.');\n }\n }\n\n case 2:\n {\n var r = arguments[0];\n var phi = arguments[1];\n\n if (isNumber(r)) {\n if (isUnit(phi) && phi.hasBase('ANGLE')) {\n // convert unit to a number in radians\n phi = phi.toNumber('rad');\n }\n\n if (isNumber(phi)) {\n return new Complex({\n r: r,\n phi: phi\n });\n }\n\n throw new TypeError('Phi is not a number nor an angle unit.');\n } else {\n throw new TypeError('Radius r is not a number.');\n }\n }\n\n default:\n throw new SyntaxError('Wrong number of arguments in function fromPolar');\n }\n };\n\n Complex.prototype.valueOf = Complex.prototype.toString;\n /**\n * Create a Complex number from a JSON object\n * @param {Object} json A JSON Object structured as\n * {\"mathjs\": \"Complex\", \"re\": 2, \"im\": 3}\n * All properties are optional, default values\n * for `re` and `im` are 0.\n * @return {Complex} Returns a new Complex number\n */\n\n Complex.fromJSON = function (json) {\n return new Complex(json);\n };\n /**\n * Compare two complex numbers, `a` and `b`:\n *\n * - Returns 1 when the real part of `a` is larger than the real part of `b`\n * - Returns -1 when the real part of `a` is smaller than the real part of `b`\n * - Returns 1 when the real parts are equal\n * and the imaginary part of `a` is larger than the imaginary part of `b`\n * - Returns -1 when the real parts are equal\n * and the imaginary part of `a` is smaller than the imaginary part of `b`\n * - Returns 0 when both real and imaginary parts are equal.\n *\n * @params {Complex} a\n * @params {Complex} b\n * @returns {number} Returns the comparison result: -1, 0, or 1\n */\n\n\n Complex.compare = function (a, b) {\n if (a.re > b.re) {\n return 1;\n }\n\n if (a.re < b.re) {\n return -1;\n }\n\n if (a.im > b.im) {\n return 1;\n }\n\n if (a.im < b.im) {\n return -1;\n }\n\n return 0;\n };\n\n return Complex;\n}, {\n isClass: true\n});","// (c) 2018, Mariusz Nowak\n// SPDX-License-Identifier: ISC\n// Derived from https://github.com/medikoo/lru-queue\nexport function lruQueue(limit) {\n var size = 0;\n var base = 1;\n var queue = Object.create(null);\n var map = Object.create(null);\n var index = 0;\n\n var del = function del(id) {\n var oldIndex = map[id];\n if (!oldIndex) return;\n delete queue[oldIndex];\n delete map[id];\n --size;\n if (base !== oldIndex) return;\n\n if (!size) {\n index = 0;\n base = 1;\n return;\n }\n\n while (!hasOwnProperty.call(queue, ++base)) {\n continue;\n }\n };\n\n limit = Math.abs(limit);\n return {\n hit: function hit(id) {\n var oldIndex = map[id];\n var nuIndex = ++index;\n queue[nuIndex] = id;\n map[id] = nuIndex;\n\n if (!oldIndex) {\n ++size;\n if (size <= limit) return undefined;\n id = queue[base];\n del(id);\n return id;\n }\n\n delete queue[oldIndex];\n if (base !== oldIndex) return undefined;\n\n while (!hasOwnProperty.call(queue, ++base)) {\n continue;\n }\n\n return undefined;\n },\n delete: del,\n clear: function clear() {\n size = index = 0;\n base = 1;\n queue = Object.create(null);\n map = Object.create(null);\n }\n };\n}\n;","// function utils\nimport { lruQueue } from './lruQueue.js';\n/**\n * Memoize a given function by caching the computed result.\n * The cache of a memoized function can be cleared by deleting the `cache`\n * property of the function.\n *\n * @param {function} fn The function to be memoized.\n * Must be a pure function.\n * @param {Object} [options]\n * @param {function(args: Array): string} [options.hasher]\n * A custom hash builder. Is JSON.stringify by default.\n * @param {number | undefined} [options.limit]\n * Maximum number of values that may be cached. Undefined indicates\n * unlimited (default)\n * @return {function} Returns the memoized function\n */\n\nexport function memoize(fn) {\n var {\n hasher,\n limit\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n limit = limit == null ? Number.POSITIVE_INFINITY : limit;\n hasher = hasher == null ? JSON.stringify : hasher;\n return function memoize() {\n if (typeof memoize.cache !== 'object') {\n memoize.cache = {\n values: new Map(),\n lru: lruQueue(limit || Number.POSITIVE_INFINITY)\n };\n }\n\n var args = [];\n\n for (var i = 0; i < arguments.length; i++) {\n args[i] = arguments[i];\n }\n\n var hash = hasher(args);\n\n if (memoize.cache.values.has(hash)) {\n memoize.cache.lru.hit(hash);\n return memoize.cache.values.get(hash);\n }\n\n var newVal = fn.apply(fn, args);\n memoize.cache.values.set(hash, newVal);\n memoize.cache.values.delete(memoize.cache.lru.hit(hash));\n return newVal;\n };\n}\n/**\n * Memoize a given function by caching all results and the arguments,\n * and comparing against the arguments of previous results before\n * executing again.\n * This is less performant than `memoize` which calculates a hash,\n * which is very fast to compare. Use `memoizeCompare` only when it is\n * not possible to create a unique serializable hash from the function\n * arguments.\n * The isEqual function must compare two sets of arguments\n * and return true when equal (can be a deep equality check for example).\n * @param {function} fn\n * @param {function(a: *, b: *) : boolean} isEqual\n * @returns {function}\n */\n\nexport function memoizeCompare(fn, isEqual) {\n var memoize = function memoize() {\n var args = [];\n\n for (var i = 0; i < arguments.length; i++) {\n args[i] = arguments[i];\n }\n\n for (var c = 0; c < memoize.cache.length; c++) {\n var cached = memoize.cache[c];\n\n if (isEqual(args, cached.args)) {\n // TODO: move this cache entry to the top so recently used entries move up?\n return cached.res;\n }\n }\n\n var res = fn.apply(fn, args);\n memoize.cache.unshift({\n args,\n res\n });\n return res;\n };\n\n memoize.cache = [];\n return memoize;\n}\n/**\n * Find the maximum number of arguments expected by a typed function.\n * @param {function} fn A typed function\n * @return {number} Returns the maximum number of expected arguments.\n * Returns -1 when no signatures where found on the function.\n */\n\nexport function maxArgumentCount(fn) {\n return Object.keys(fn.signatures || {}).reduce(function (args, signature) {\n var count = (signature.match(/,/g) || []).length + 1;\n return Math.max(args, count);\n }, -1);\n}","import { memoize } from '../function.js';\n/**\n * Calculate BigNumber e\n * @param {function} BigNumber BigNumber constructor\n * @returns {BigNumber} Returns e\n */\n\nexport var createBigNumberE = memoize(function (BigNumber) {\n return new BigNumber(1).exp();\n}, {\n hasher\n});\n/**\n * Calculate BigNumber golden ratio, phi = (1+sqrt(5))/2\n * @param {function} BigNumber BigNumber constructor\n * @returns {BigNumber} Returns phi\n */\n\nexport var createBigNumberPhi = memoize(function (BigNumber) {\n return new BigNumber(1).plus(new BigNumber(5).sqrt()).div(2);\n}, {\n hasher\n});\n/**\n * Calculate BigNumber pi.\n * @param {function} BigNumber BigNumber constructor\n * @returns {BigNumber} Returns pi\n */\n\nexport var createBigNumberPi = memoize(function (BigNumber) {\n return BigNumber.acos(-1);\n}, {\n hasher\n});\n/**\n * Calculate BigNumber tau, tau = 2 * pi\n * @param {function} BigNumber BigNumber constructor\n * @returns {BigNumber} Returns tau\n */\n\nexport var createBigNumberTau = memoize(function (BigNumber) {\n return createBigNumberPi(BigNumber).times(2);\n}, {\n hasher\n});\n/**\n * Create a hash for a BigNumber constructor function. The created has is\n * the configured precision\n * @param {Array} args Supposed to contain a single entry with\n * a BigNumber constructor\n * @return {number} precision\n * @private\n */\n\nfunction hasher(args) {\n return args[0].precision;\n}","export var pi = Math.PI;\nexport var tau = 2 * Math.PI;\nexport var e = Math.E;\nexport var phi = 1.6180339887498948; // eslint-disable-line no-loss-of-precision","import Decimal from 'decimal.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'BigNumber';\nvar dependencies = ['?on', 'config'];\nexport var createBigNumberClass = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n on,\n config\n } = _ref;\n var EUCLID = 9; // Use euclidian division for mod calculation\n\n var BigNumber = Decimal.clone({\n precision: config.precision,\n modulo: EUCLID\n });\n /**\n * Attach type information\n */\n\n BigNumber.prototype.type = 'BigNumber';\n BigNumber.prototype.isBigNumber = true;\n /**\n * Get a JSON representation of a BigNumber containing\n * type information\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n */\n\n BigNumber.prototype.toJSON = function () {\n return {\n mathjs: 'BigNumber',\n value: this.toString()\n };\n };\n /**\n * Instantiate a BigNumber from a JSON object\n * @param {Object} json a JSON object structured as:\n * `{\"mathjs\": \"BigNumber\", \"value\": \"0.2\"}`\n * @return {BigNumber}\n */\n\n\n BigNumber.fromJSON = function (json) {\n return new BigNumber(json.value);\n };\n\n if (on) {\n // listen for changed in the configuration, automatically apply changed precision\n on('config', function (curr, prev) {\n if (curr.precision !== prev.precision) {\n BigNumber.config({\n precision: curr.precision\n });\n }\n });\n }\n\n return BigNumber;\n}, {\n isClass: true\n});","import { factory } from '../../utils/factory.js';\nvar name = 'Matrix';\nvar dependencies = [];\nexport var createMatrixClass = /* #__PURE__ */factory(name, dependencies, () => {\n /**\n * @constructor Matrix\n *\n * A Matrix is a wrapper around an Array. A matrix can hold a multi dimensional\n * array. A matrix can be constructed as:\n *\n * let matrix = math.matrix(data)\n *\n * Matrix contains the functions to resize, get and set values, get the size,\n * clone the matrix and to convert the matrix to a vector, array, or scalar.\n * Furthermore, one can iterate over the matrix using map and forEach.\n * The internal Array of the Matrix can be accessed using the function valueOf.\n *\n * Example usage:\n *\n * let matrix = math.matrix([[1, 2], [3, 4]])\n * matix.size() // [2, 2]\n * matrix.resize([3, 2], 5)\n * matrix.valueOf() // [[1, 2], [3, 4], [5, 5]]\n * matrix.subset([1,2]) // 3 (indexes are zero-based)\n *\n */\n function Matrix() {\n if (!(this instanceof Matrix)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n }\n /**\n * Attach type information\n */\n\n\n Matrix.prototype.type = 'Matrix';\n Matrix.prototype.isMatrix = true;\n /**\n * Get the storage format used by the matrix.\n *\n * Usage:\n * const format = matrix.storage() // retrieve storage format\n *\n * @return {string} The storage format.\n */\n\n Matrix.prototype.storage = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke storage on a Matrix interface');\n };\n /**\n * Get the datatype of the data stored in the matrix.\n *\n * Usage:\n * const format = matrix.datatype() // retrieve matrix datatype\n *\n * @return {string} The datatype.\n */\n\n\n Matrix.prototype.datatype = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke datatype on a Matrix interface');\n };\n /**\n * Create a new Matrix With the type of the current matrix instance\n * @param {Array | Object} data\n * @param {string} [datatype]\n */\n\n\n Matrix.prototype.create = function (data, datatype) {\n throw new Error('Cannot invoke create on a Matrix interface');\n };\n /**\n * Get a subset of the matrix, or replace a subset of the matrix.\n *\n * Usage:\n * const subset = matrix.subset(index) // retrieve subset\n * const value = matrix.subset(index, replacement) // replace subset\n *\n * @param {Index} index\n * @param {Array | Matrix | *} [replacement]\n * @param {*} [defaultValue=0] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be filled with zeros.\n */\n\n\n Matrix.prototype.subset = function (index, replacement, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke subset on a Matrix interface');\n };\n /**\n * Get a single element from the matrix.\n * @param {number[]} index Zero-based index\n * @return {*} value\n */\n\n\n Matrix.prototype.get = function (index) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke get on a Matrix interface');\n };\n /**\n * Replace a single element in the matrix.\n * @param {number[]} index Zero-based index\n * @param {*} value\n * @param {*} [defaultValue] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be left undefined.\n * @return {Matrix} self\n */\n\n\n Matrix.prototype.set = function (index, value, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke set on a Matrix interface');\n };\n /**\n * Resize the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (resize in place).\n *\n * @param {number[]} size The new size the matrix should have.\n * @param {*} [defaultValue=0] Default value, filled in on new entries.\n * If not provided, the matrix elements will\n * be filled with zeros.\n * @param {boolean} [copy] Return a resized copy of the matrix\n *\n * @return {Matrix} The resized matrix\n */\n\n\n Matrix.prototype.resize = function (size, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke resize on a Matrix interface');\n };\n /**\n * Reshape the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (reshape in place).\n *\n * @param {number[]} size The new size the matrix should have.\n * @param {boolean} [copy] Return a reshaped copy of the matrix\n *\n * @return {Matrix} The reshaped matrix\n */\n\n\n Matrix.prototype.reshape = function (size, defaultValue) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke reshape on a Matrix interface');\n };\n /**\n * Create a clone of the matrix\n * @return {Matrix} clone\n */\n\n\n Matrix.prototype.clone = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke clone on a Matrix interface');\n };\n /**\n * Retrieve the size of the matrix.\n * @returns {number[]} size\n */\n\n\n Matrix.prototype.size = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke size on a Matrix interface');\n };\n /**\n * Create a new matrix with the results of the callback function executed on\n * each entry of the matrix.\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n * @param {boolean} [skipZeros] Invoke callback function for non-zero values only.\n *\n * @return {Matrix} matrix\n */\n\n\n Matrix.prototype.map = function (callback, skipZeros) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke map on a Matrix interface');\n };\n /**\n * Execute a callback function on each entry of the matrix.\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n */\n\n\n Matrix.prototype.forEach = function (callback) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke forEach on a Matrix interface');\n };\n /**\n * Create an Array with a copy of the data of the Matrix\n * @returns {Array} array\n */\n\n\n Matrix.prototype.toArray = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke toArray on a Matrix interface');\n };\n /**\n * Get the primitive value of the Matrix: a multidimensional array\n * @returns {Array} array\n */\n\n\n Matrix.prototype.valueOf = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke valueOf on a Matrix interface');\n };\n /**\n * Get a string representation of the matrix, with optional formatting options.\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @returns {string} str\n */\n\n\n Matrix.prototype.format = function (options) {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke format on a Matrix interface');\n };\n /**\n * Get a string representation of the matrix\n * @returns {string} str\n */\n\n\n Matrix.prototype.toString = function () {\n // must be implemented by each of the Matrix implementations\n throw new Error('Cannot invoke toString on a Matrix interface');\n };\n\n return Matrix;\n}, {\n isClass: true\n});","import { factory } from '../../utils/factory.js'; // Source: https://en.wikipedia.org/wiki/Physical_constant\n// Universal constants\n\nexport var createSpeedOfLight = /* #__PURE__ */unitFactory('speedOfLight', '299792458', 'm s^-1');\nexport var createGravitationConstant = /* #__PURE__ */unitFactory('gravitationConstant', '6.67430e-11', 'm^3 kg^-1 s^-2');\nexport var createPlanckConstant = /* #__PURE__ */unitFactory('planckConstant', '6.62607015e-34', 'J s');\nexport var createReducedPlanckConstant = /* #__PURE__ */unitFactory('reducedPlanckConstant', '1.0545718176461565e-34', 'J s'); // Electromagnetic constants\n\nexport var createMagneticConstant = /* #__PURE__ */unitFactory('magneticConstant', '1.25663706212e-6', 'N A^-2');\nexport var createElectricConstant = /* #__PURE__ */unitFactory('electricConstant', '8.8541878128e-12', 'F m^-1');\nexport var createVacuumImpedance = /* #__PURE__ */unitFactory('vacuumImpedance', '376.730313667', 'ohm');\nexport var createCoulomb = /* #__PURE__ */unitFactory('coulomb', '8.987551792261171e9', 'N m^2 C^-2');\nexport var createElementaryCharge = /* #__PURE__ */unitFactory('elementaryCharge', '1.602176634e-19', 'C');\nexport var createBohrMagneton = /* #__PURE__ */unitFactory('bohrMagneton', '9.2740100783e-24', 'J T^-1');\nexport var createConductanceQuantum = /* #__PURE__ */unitFactory('conductanceQuantum', '7.748091729863649e-5', 'S');\nexport var createInverseConductanceQuantum = /* #__PURE__ */unitFactory('inverseConductanceQuantum', '12906.403729652257', 'ohm');\nexport var createMagneticFluxQuantum = /* #__PURE__ */unitFactory('magneticFluxQuantum', '2.0678338484619295e-15', 'Wb');\nexport var createNuclearMagneton = /* #__PURE__ */unitFactory('nuclearMagneton', '5.0507837461e-27', 'J T^-1');\nexport var createKlitzing = /* #__PURE__ */unitFactory('klitzing', '25812.807459304513', 'ohm');\nexport var createJosephson = /* #__PURE__ */unitFactory('josephson', '4.835978484169836e14 Hz V', 'Hz V^-1'); // TODO: support for Hz needed\n// Atomic and nuclear constants\n\nexport var createBohrRadius = /* #__PURE__ */unitFactory('bohrRadius', '5.29177210903e-11', 'm');\nexport var createClassicalElectronRadius = /* #__PURE__ */unitFactory('classicalElectronRadius', '2.8179403262e-15', 'm');\nexport var createElectronMass = /* #__PURE__ */unitFactory('electronMass', '9.1093837015e-31', 'kg');\nexport var createFermiCoupling = /* #__PURE__ */unitFactory('fermiCoupling', '1.1663787e-5', 'GeV^-2');\nexport var createFineStructure = numberFactory('fineStructure', 7.2973525693e-3);\nexport var createHartreeEnergy = /* #__PURE__ */unitFactory('hartreeEnergy', '4.3597447222071e-18', 'J');\nexport var createProtonMass = /* #__PURE__ */unitFactory('protonMass', '1.67262192369e-27', 'kg');\nexport var createDeuteronMass = /* #__PURE__ */unitFactory('deuteronMass', '3.3435830926e-27', 'kg');\nexport var createNeutronMass = /* #__PURE__ */unitFactory('neutronMass', '1.6749271613e-27', 'kg');\nexport var createQuantumOfCirculation = /* #__PURE__ */unitFactory('quantumOfCirculation', '3.6369475516e-4', 'm^2 s^-1');\nexport var createRydberg = /* #__PURE__ */unitFactory('rydberg', '10973731.568160', 'm^-1');\nexport var createThomsonCrossSection = /* #__PURE__ */unitFactory('thomsonCrossSection', '6.6524587321e-29', 'm^2');\nexport var createWeakMixingAngle = numberFactory('weakMixingAngle', 0.22290);\nexport var createEfimovFactor = numberFactory('efimovFactor', 22.7); // Physico-chemical constants\n\nexport var createAtomicMass = /* #__PURE__ */unitFactory('atomicMass', '1.66053906660e-27', 'kg');\nexport var createAvogadro = /* #__PURE__ */unitFactory('avogadro', '6.02214076e23', 'mol^-1');\nexport var createBoltzmann = /* #__PURE__ */unitFactory('boltzmann', '1.380649e-23', 'J K^-1');\nexport var createFaraday = /* #__PURE__ */unitFactory('faraday', '96485.33212331001', 'C mol^-1');\nexport var createFirstRadiation = /* #__PURE__ */unitFactory('firstRadiation', '3.7417718521927573e-16', 'W m^2'); // export const createSpectralRadiance = /* #__PURE__ */ unitFactory('spectralRadiance', '1.1910429723971881e-16', 'W m^2 sr^-1') // TODO spectralRadiance\n\nexport var createLoschmidt = /* #__PURE__ */unitFactory('loschmidt', '2.686780111798444e25', 'm^-3');\nexport var createGasConstant = /* #__PURE__ */unitFactory('gasConstant', '8.31446261815324', 'J K^-1 mol^-1');\nexport var createMolarPlanckConstant = /* #__PURE__ */unitFactory('molarPlanckConstant', '3.990312712893431e-10', 'J s mol^-1');\nexport var createMolarVolume = /* #__PURE__ */unitFactory('molarVolume', '0.022413969545014137', 'm^3 mol^-1');\nexport var createSackurTetrode = numberFactory('sackurTetrode', -1.16487052358);\nexport var createSecondRadiation = /* #__PURE__ */unitFactory('secondRadiation', '0.014387768775039337', 'm K');\nexport var createStefanBoltzmann = /* #__PURE__ */unitFactory('stefanBoltzmann', '5.67037441918443e-8', 'W m^-2 K^-4');\nexport var createWienDisplacement = /* #__PURE__ */unitFactory('wienDisplacement', '2.897771955e-3', 'm K'); // Adopted values\n\nexport var createMolarMass = /* #__PURE__ */unitFactory('molarMass', '0.99999999965e-3', 'kg mol^-1');\nexport var createMolarMassC12 = /* #__PURE__ */unitFactory('molarMassC12', '11.9999999958e-3', 'kg mol^-1');\nexport var createGravity = /* #__PURE__ */unitFactory('gravity', '9.80665', 'm s^-2'); // atm is defined in Unit.js\n// Natural units\n\nexport var createPlanckLength = /* #__PURE__ */unitFactory('planckLength', '1.616255e-35', 'm');\nexport var createPlanckMass = /* #__PURE__ */unitFactory('planckMass', '2.176435e-8', 'kg');\nexport var createPlanckTime = /* #__PURE__ */unitFactory('planckTime', '5.391245e-44', 's');\nexport var createPlanckCharge = /* #__PURE__ */unitFactory('planckCharge', '1.87554603778e-18', 'C');\nexport var createPlanckTemperature = /* #__PURE__ */unitFactory('planckTemperature', '1.416785e+32', 'K'); // helper function to create a factory function which creates a physical constant,\n// a Unit with either a number value or a BigNumber value depending on the configuration\n\nfunction unitFactory(name, valueStr, unitStr) {\n var dependencies = ['config', 'Unit', 'BigNumber'];\n return factory(name, dependencies, (_ref) => {\n var {\n config,\n Unit,\n BigNumber\n } = _ref;\n // Note that we can parse into number or BigNumber.\n // We do not parse into Fractions as that doesn't make sense: we would lose precision of the values\n // Therefore we dont use Unit.parse()\n var value = config.number === 'BigNumber' ? new BigNumber(valueStr) : parseFloat(valueStr);\n var unit = new Unit(value, unitStr);\n unit.fixPrefix = true;\n return unit;\n });\n} // helper function to create a factory function which creates a numeric constant,\n// either a number or BigNumber depending on the configuration\n\n\nfunction numberFactory(name, value) {\n var dependencies = ['config', 'BigNumber'];\n return factory(name, dependencies, (_ref2) => {\n var {\n config,\n BigNumber\n } = _ref2;\n return config.number === 'BigNumber' ? new BigNumber(value) : value;\n });\n}","import Fraction from 'fraction.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'Fraction';\nvar dependencies = [];\nexport var createFractionClass = /* #__PURE__ */factory(name, dependencies, () => {\n /**\n * Attach type information\n */\n Fraction.prototype.type = 'Fraction';\n Fraction.prototype.isFraction = true;\n /**\n * Get a JSON representation of a Fraction containing type information\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"Fraction\", \"n\": 3, \"d\": 8}`\n */\n\n Fraction.prototype.toJSON = function () {\n return {\n mathjs: 'Fraction',\n n: this.s * this.n,\n d: this.d\n };\n };\n /**\n * Instantiate a Fraction from a JSON object\n * @param {Object} json a JSON object structured as:\n * `{\"mathjs\": \"Fraction\", \"n\": 3, \"d\": 8}`\n * @return {BigNumber}\n */\n\n\n Fraction.fromJSON = function (json) {\n return new Fraction(json);\n };\n\n return Fraction;\n}, {\n isClass: true\n});","import { isArray, isBigNumber, isCollection, isIndex, isMatrix, isNumber, isString, typeOf } from '../../utils/is.js';\nimport { arraySize, getArrayDataType, processSizesWildcard, reshape, resize, unsqueeze, validate, validateIndex } from '../../utils/array.js';\nimport { format } from '../../utils/string.js';\nimport { isInteger } from '../../utils/number.js';\nimport { clone, deepStrictEqual } from '../../utils/object.js';\nimport { DimensionError } from '../../error/DimensionError.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'DenseMatrix';\nvar dependencies = ['Matrix'];\nexport var createDenseMatrixClass = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n Matrix\n } = _ref;\n\n /**\n * Dense Matrix implementation. A regular, dense matrix, supporting multi-dimensional matrices. This is the default matrix type.\n * @class DenseMatrix\n */\n function DenseMatrix(data, datatype) {\n if (!(this instanceof DenseMatrix)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n if (datatype && !isString(datatype)) {\n throw new Error('Invalid datatype: ' + datatype);\n }\n\n if (isMatrix(data)) {\n // check data is a DenseMatrix\n if (data.type === 'DenseMatrix') {\n // clone data & size\n this._data = clone(data._data);\n this._size = clone(data._size);\n this._datatype = datatype || data._datatype;\n } else {\n // build data from existing matrix\n this._data = data.toArray();\n this._size = data.size();\n this._datatype = datatype || data._datatype;\n }\n } else if (data && isArray(data.data) && isArray(data.size)) {\n // initialize fields from JSON representation\n this._data = data.data;\n this._size = data.size; // verify the dimensions of the array\n\n validate(this._data, this._size);\n this._datatype = datatype || data.datatype;\n } else if (isArray(data)) {\n // replace nested Matrices with Arrays\n this._data = preprocess(data); // get the dimensions of the array\n\n this._size = arraySize(this._data); // verify the dimensions of the array, TODO: compute size while processing array\n\n validate(this._data, this._size); // data type unknown\n\n this._datatype = datatype;\n } else if (data) {\n // unsupported type\n throw new TypeError('Unsupported type of data (' + typeOf(data) + ')');\n } else {\n // nothing provided\n this._data = [];\n this._size = [0];\n this._datatype = datatype;\n }\n }\n\n DenseMatrix.prototype = new Matrix();\n /**\n * Create a new DenseMatrix\n */\n\n DenseMatrix.prototype.createDenseMatrix = function (data, datatype) {\n return new DenseMatrix(data, datatype);\n };\n /**\n * Attach type information\n */\n\n\n DenseMatrix.prototype.type = 'DenseMatrix';\n DenseMatrix.prototype.isDenseMatrix = true;\n /**\n * Get the matrix type\n *\n * Usage:\n * const matrixType = matrix.getDataType() // retrieves the matrix type\n *\n * @memberOf DenseMatrix\n * @return {string} type information; if multiple types are found from the Matrix, it will return \"mixed\"\n */\n\n DenseMatrix.prototype.getDataType = function () {\n return getArrayDataType(this._data, typeOf);\n };\n /**\n * Get the storage format used by the matrix.\n *\n * Usage:\n * const format = matrix.storage() // retrieve storage format\n *\n * @memberof DenseMatrix\n * @return {string} The storage format.\n */\n\n\n DenseMatrix.prototype.storage = function () {\n return 'dense';\n };\n /**\n * Get the datatype of the data stored in the matrix.\n *\n * Usage:\n * const format = matrix.datatype() // retrieve matrix datatype\n *\n * @memberof DenseMatrix\n * @return {string} The datatype.\n */\n\n\n DenseMatrix.prototype.datatype = function () {\n return this._datatype;\n };\n /**\n * Create a new DenseMatrix\n * @memberof DenseMatrix\n * @param {Array} data\n * @param {string} [datatype]\n */\n\n\n DenseMatrix.prototype.create = function (data, datatype) {\n return new DenseMatrix(data, datatype);\n };\n /**\n * Get a subset of the matrix, or replace a subset of the matrix.\n *\n * Usage:\n * const subset = matrix.subset(index) // retrieve subset\n * const value = matrix.subset(index, replacement) // replace subset\n *\n * @memberof DenseMatrix\n * @param {Index} index\n * @param {Array | Matrix | *} [replacement]\n * @param {*} [defaultValue=0] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be filled with zeros.\n */\n\n\n DenseMatrix.prototype.subset = function (index, replacement, defaultValue) {\n switch (arguments.length) {\n case 1:\n return _get(this, index);\n // intentional fall through\n\n case 2:\n case 3:\n return _set(this, index, replacement, defaultValue);\n\n default:\n throw new SyntaxError('Wrong number of arguments');\n }\n };\n /**\n * Get a single element from the matrix.\n * @memberof DenseMatrix\n * @param {number[]} index Zero-based index\n * @return {*} value\n */\n\n\n DenseMatrix.prototype.get = function (index) {\n if (!isArray(index)) {\n throw new TypeError('Array expected');\n }\n\n if (index.length !== this._size.length) {\n throw new DimensionError(index.length, this._size.length);\n } // check index\n\n\n for (var x = 0; x < index.length; x++) {\n validateIndex(index[x], this._size[x]);\n }\n\n var data = this._data;\n\n for (var i = 0, ii = index.length; i < ii; i++) {\n var indexI = index[i];\n validateIndex(indexI, data.length);\n data = data[indexI];\n }\n\n return data;\n };\n /**\n * Replace a single element in the matrix.\n * @memberof DenseMatrix\n * @param {number[]} index Zero-based index\n * @param {*} value\n * @param {*} [defaultValue] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be left undefined.\n * @return {DenseMatrix} self\n */\n\n\n DenseMatrix.prototype.set = function (index, value, defaultValue) {\n if (!isArray(index)) {\n throw new TypeError('Array expected');\n }\n\n if (index.length < this._size.length) {\n throw new DimensionError(index.length, this._size.length, '<');\n }\n\n var i, ii, indexI; // enlarge matrix when needed\n\n var size = index.map(function (i) {\n return i + 1;\n });\n\n _fit(this, size, defaultValue); // traverse over the dimensions\n\n\n var data = this._data;\n\n for (i = 0, ii = index.length - 1; i < ii; i++) {\n indexI = index[i];\n validateIndex(indexI, data.length);\n data = data[indexI];\n } // set new value\n\n\n indexI = index[index.length - 1];\n validateIndex(indexI, data.length);\n data[indexI] = value;\n return this;\n };\n /**\n * Get a submatrix of this matrix\n * @memberof DenseMatrix\n * @param {DenseMatrix} matrix\n * @param {Index} index Zero-based index\n * @private\n */\n\n\n function _get(matrix, index) {\n if (!isIndex(index)) {\n throw new TypeError('Invalid index');\n }\n\n var isScalar = index.isScalar();\n\n if (isScalar) {\n // return a scalar\n return matrix.get(index.min());\n } else {\n // validate dimensions\n var size = index.size();\n\n if (size.length !== matrix._size.length) {\n throw new DimensionError(size.length, matrix._size.length);\n } // validate if any of the ranges in the index is out of range\n\n\n var min = index.min();\n var max = index.max();\n\n for (var i = 0, ii = matrix._size.length; i < ii; i++) {\n validateIndex(min[i], matrix._size[i]);\n validateIndex(max[i], matrix._size[i]);\n } // retrieve submatrix\n // TODO: more efficient when creating an empty matrix and setting _data and _size manually\n\n\n return new DenseMatrix(_getSubmatrix(matrix._data, index, size.length, 0), matrix._datatype);\n }\n }\n /**\n * Recursively get a submatrix of a multi dimensional matrix.\n * Index is not checked for correct number or length of dimensions.\n * @memberof DenseMatrix\n * @param {Array} data\n * @param {Index} index\n * @param {number} dims Total number of dimensions\n * @param {number} dim Current dimension\n * @return {Array} submatrix\n * @private\n */\n\n\n function _getSubmatrix(data, index, dims, dim) {\n var last = dim === dims - 1;\n var range = index.dimension(dim);\n\n if (last) {\n return range.map(function (i) {\n validateIndex(i, data.length);\n return data[i];\n }).valueOf();\n } else {\n return range.map(function (i) {\n validateIndex(i, data.length);\n var child = data[i];\n return _getSubmatrix(child, index, dims, dim + 1);\n }).valueOf();\n }\n }\n /**\n * Replace a submatrix in this matrix\n * Indexes are zero-based.\n * @memberof DenseMatrix\n * @param {DenseMatrix} matrix\n * @param {Index} index\n * @param {DenseMatrix | Array | *} submatrix\n * @param {*} defaultValue Default value, filled in on new entries when\n * the matrix is resized.\n * @return {DenseMatrix} matrix\n * @private\n */\n\n\n function _set(matrix, index, submatrix, defaultValue) {\n if (!index || index.isIndex !== true) {\n throw new TypeError('Invalid index');\n } // get index size and check whether the index contains a single value\n\n\n var iSize = index.size();\n var isScalar = index.isScalar(); // calculate the size of the submatrix, and convert it into an Array if needed\n\n var sSize;\n\n if (isMatrix(submatrix)) {\n sSize = submatrix.size();\n submatrix = submatrix.valueOf();\n } else {\n sSize = arraySize(submatrix);\n }\n\n if (isScalar) {\n // set a scalar\n // check whether submatrix is a scalar\n if (sSize.length !== 0) {\n throw new TypeError('Scalar expected');\n }\n\n matrix.set(index.min(), submatrix, defaultValue);\n } else {\n // set a submatrix\n // validate dimensions\n if (iSize.length < matrix._size.length) {\n throw new DimensionError(iSize.length, matrix._size.length, '<');\n }\n\n if (sSize.length < iSize.length) {\n // calculate number of missing outer dimensions\n var i = 0;\n var outer = 0;\n\n while (iSize[i] === 1 && sSize[i] === 1) {\n i++;\n }\n\n while (iSize[i] === 1) {\n outer++;\n i++;\n } // unsqueeze both outer and inner dimensions\n\n\n submatrix = unsqueeze(submatrix, iSize.length, outer, sSize);\n } // check whether the size of the submatrix matches the index size\n\n\n if (!deepStrictEqual(iSize, sSize)) {\n throw new DimensionError(iSize, sSize, '>');\n } // enlarge matrix when needed\n\n\n var size = index.max().map(function (i) {\n return i + 1;\n });\n\n _fit(matrix, size, defaultValue); // insert the sub matrix\n\n\n var dims = iSize.length;\n var dim = 0;\n\n _setSubmatrix(matrix._data, index, submatrix, dims, dim);\n }\n\n return matrix;\n }\n /**\n * Replace a submatrix of a multi dimensional matrix.\n * @memberof DenseMatrix\n * @param {Array} data\n * @param {Index} index\n * @param {Array} submatrix\n * @param {number} dims Total number of dimensions\n * @param {number} dim\n * @private\n */\n\n\n function _setSubmatrix(data, index, submatrix, dims, dim) {\n var last = dim === dims - 1;\n var range = index.dimension(dim);\n\n if (last) {\n range.forEach(function (dataIndex, subIndex) {\n validateIndex(dataIndex);\n data[dataIndex] = submatrix[subIndex[0]];\n });\n } else {\n range.forEach(function (dataIndex, subIndex) {\n validateIndex(dataIndex);\n\n _setSubmatrix(data[dataIndex], index, submatrix[subIndex[0]], dims, dim + 1);\n });\n }\n }\n /**\n * Resize the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (resize in place).\n *\n * @memberof DenseMatrix\n * @param {number[] || Matrix} size The new size the matrix should have.\n * @param {*} [defaultValue=0] Default value, filled in on new entries.\n * If not provided, the matrix elements will\n * be filled with zeros.\n * @param {boolean} [copy] Return a resized copy of the matrix\n *\n * @return {Matrix} The resized matrix\n */\n\n\n DenseMatrix.prototype.resize = function (size, defaultValue, copy) {\n // validate arguments\n if (!isCollection(size)) {\n throw new TypeError('Array or Matrix expected');\n } // SparseMatrix input is always 2d, flatten this into 1d if it's indeed a vector\n\n\n var sizeArray = size.valueOf().map(value => {\n return Array.isArray(value) && value.length === 1 ? value[0] : value;\n }); // matrix to resize\n\n var m = copy ? this.clone() : this; // resize matrix\n\n return _resize(m, sizeArray, defaultValue);\n };\n\n function _resize(matrix, size, defaultValue) {\n // check size\n if (size.length === 0) {\n // first value in matrix\n var v = matrix._data; // go deep\n\n while (isArray(v)) {\n v = v[0];\n }\n\n return v;\n } // resize matrix\n\n\n matrix._size = size.slice(0); // copy the array\n\n matrix._data = resize(matrix._data, matrix._size, defaultValue); // return matrix\n\n return matrix;\n }\n /**\n * Reshape the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (reshape in place).\n *\n * NOTE: This might be better suited to copy by default, instead of modifying\n * in place. For now, it operates in place to remain consistent with\n * resize().\n *\n * @memberof DenseMatrix\n * @param {number[]} size The new size the matrix should have.\n * @param {boolean} [copy] Return a reshaped copy of the matrix\n *\n * @return {Matrix} The reshaped matrix\n */\n\n\n DenseMatrix.prototype.reshape = function (size, copy) {\n var m = copy ? this.clone() : this;\n m._data = reshape(m._data, size);\n\n var currentLength = m._size.reduce((length, size) => length * size);\n\n m._size = processSizesWildcard(size, currentLength);\n return m;\n };\n /**\n * Enlarge the matrix when it is smaller than given size.\n * If the matrix is larger or equal sized, nothing is done.\n * @memberof DenseMatrix\n * @param {DenseMatrix} matrix The matrix to be resized\n * @param {number[]} size\n * @param {*} defaultValue Default value, filled in on new entries.\n * @private\n */\n\n\n function _fit(matrix, size, defaultValue) {\n var // copy the array\n newSize = matrix._size.slice(0);\n\n var changed = false; // add dimensions when needed\n\n while (newSize.length < size.length) {\n newSize.push(0);\n changed = true;\n } // enlarge size when needed\n\n\n for (var i = 0, ii = size.length; i < ii; i++) {\n if (size[i] > newSize[i]) {\n newSize[i] = size[i];\n changed = true;\n }\n }\n\n if (changed) {\n // resize only when size is changed\n _resize(matrix, newSize, defaultValue);\n }\n }\n /**\n * Create a clone of the matrix\n * @memberof DenseMatrix\n * @return {DenseMatrix} clone\n */\n\n\n DenseMatrix.prototype.clone = function () {\n var m = new DenseMatrix({\n data: clone(this._data),\n size: clone(this._size),\n datatype: this._datatype\n });\n return m;\n };\n /**\n * Retrieve the size of the matrix.\n * @memberof DenseMatrix\n * @returns {number[]} size\n */\n\n\n DenseMatrix.prototype.size = function () {\n return this._size.slice(0); // return a clone of _size\n };\n /**\n * Create a new matrix with the results of the callback function executed on\n * each entry of the matrix.\n * @memberof DenseMatrix\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n *\n * @return {DenseMatrix} matrix\n */\n\n\n DenseMatrix.prototype.map = function (callback) {\n // matrix instance\n var me = this;\n\n var recurse = function recurse(value, index) {\n if (isArray(value)) {\n return value.map(function (child, i) {\n return recurse(child, index.concat(i));\n });\n } else {\n return callback(value, index, me);\n }\n }; // determine the new datatype when the original matrix has datatype defined\n // TODO: should be done in matrix constructor instead\n\n\n var data = recurse(this._data, []);\n var datatype = this._datatype !== undefined ? getArrayDataType(data, typeOf) : undefined;\n return new DenseMatrix(data, datatype);\n };\n /**\n * Execute a callback function on each entry of the matrix.\n * @memberof DenseMatrix\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n */\n\n\n DenseMatrix.prototype.forEach = function (callback) {\n // matrix instance\n var me = this;\n\n var recurse = function recurse(value, index) {\n if (isArray(value)) {\n value.forEach(function (child, i) {\n recurse(child, index.concat(i));\n });\n } else {\n callback(value, index, me);\n }\n };\n\n recurse(this._data, []);\n };\n /**\n * Create an Array with a copy of the data of the DenseMatrix\n * @memberof DenseMatrix\n * @returns {Array} array\n */\n\n\n DenseMatrix.prototype.toArray = function () {\n return clone(this._data);\n };\n /**\n * Get the primitive value of the DenseMatrix: a multidimensional array\n * @memberof DenseMatrix\n * @returns {Array} array\n */\n\n\n DenseMatrix.prototype.valueOf = function () {\n return this._data;\n };\n /**\n * Get a string representation of the matrix, with optional formatting options.\n * @memberof DenseMatrix\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @returns {string} str\n */\n\n\n DenseMatrix.prototype.format = function (options) {\n return format(this._data, options);\n };\n /**\n * Get a string representation of the matrix\n * @memberof DenseMatrix\n * @returns {string} str\n */\n\n\n DenseMatrix.prototype.toString = function () {\n return format(this._data);\n };\n /**\n * Get a JSON representation of the matrix\n * @memberof DenseMatrix\n * @returns {Object}\n */\n\n\n DenseMatrix.prototype.toJSON = function () {\n return {\n mathjs: 'DenseMatrix',\n data: this._data,\n size: this._size,\n datatype: this._datatype\n };\n };\n /**\n * Get the kth Matrix diagonal.\n *\n * @memberof DenseMatrix\n * @param {number | BigNumber} [k=0] The kth diagonal where the vector will retrieved.\n *\n * @returns {Matrix} The matrix with the diagonal values.\n */\n\n\n DenseMatrix.prototype.diagonal = function (k) {\n // validate k if any\n if (k) {\n // convert BigNumber to a number\n if (isBigNumber(k)) {\n k = k.toNumber();\n } // is must be an integer\n\n\n if (!isNumber(k) || !isInteger(k)) {\n throw new TypeError('The parameter k must be an integer number');\n }\n } else {\n // default value\n k = 0;\n }\n\n var kSuper = k > 0 ? k : 0;\n var kSub = k < 0 ? -k : 0; // rows & columns\n\n var rows = this._size[0];\n var columns = this._size[1]; // number diagonal values\n\n var n = Math.min(rows - kSub, columns - kSuper); // x is a matrix get diagonal from matrix\n\n var data = []; // loop rows\n\n for (var i = 0; i < n; i++) {\n data[i] = this._data[i + kSub][i + kSuper];\n } // create DenseMatrix\n\n\n return new DenseMatrix({\n data: data,\n size: [n],\n datatype: this._datatype\n });\n };\n /**\n * Create a diagonal matrix.\n *\n * @memberof DenseMatrix\n * @param {Array} size The matrix size.\n * @param {number | Matrix | Array } value The values for the diagonal.\n * @param {number | BigNumber} [k=0] The kth diagonal where the vector will be filled in.\n * @param {number} [defaultValue] The default value for non-diagonal\n * @param {string} [datatype] The datatype for the diagonal\n *\n * @returns {DenseMatrix}\n */\n\n\n DenseMatrix.diagonal = function (size, value, k, defaultValue) {\n if (!isArray(size)) {\n throw new TypeError('Array expected, size parameter');\n }\n\n if (size.length !== 2) {\n throw new Error('Only two dimensions matrix are supported');\n } // map size & validate\n\n\n size = size.map(function (s) {\n // check it is a big number\n if (isBigNumber(s)) {\n // convert it\n s = s.toNumber();\n } // validate arguments\n\n\n if (!isNumber(s) || !isInteger(s) || s < 1) {\n throw new Error('Size values must be positive integers');\n }\n\n return s;\n }); // validate k if any\n\n if (k) {\n // convert BigNumber to a number\n if (isBigNumber(k)) {\n k = k.toNumber();\n } // is must be an integer\n\n\n if (!isNumber(k) || !isInteger(k)) {\n throw new TypeError('The parameter k must be an integer number');\n }\n } else {\n // default value\n k = 0;\n }\n\n var kSuper = k > 0 ? k : 0;\n var kSub = k < 0 ? -k : 0; // rows and columns\n\n var rows = size[0];\n var columns = size[1]; // number of non-zero items\n\n var n = Math.min(rows - kSub, columns - kSuper); // value extraction function\n\n var _value; // check value\n\n\n if (isArray(value)) {\n // validate array\n if (value.length !== n) {\n // number of values in array must be n\n throw new Error('Invalid value array length');\n } // define function\n\n\n _value = function _value(i) {\n // return value @ i\n return value[i];\n };\n } else if (isMatrix(value)) {\n // matrix size\n var ms = value.size(); // validate matrix\n\n if (ms.length !== 1 || ms[0] !== n) {\n // number of values in array must be n\n throw new Error('Invalid matrix length');\n } // define function\n\n\n _value = function _value(i) {\n // return value @ i\n return value.get([i]);\n };\n } else {\n // define function\n _value = function _value() {\n // return value\n return value;\n };\n } // discover default value if needed\n\n\n if (!defaultValue) {\n // check first value in array\n defaultValue = isBigNumber(_value(0)) ? _value(0).mul(0) // trick to create a BigNumber with value zero\n : 0;\n } // empty array\n\n\n var data = []; // check we need to resize array\n\n if (size.length > 0) {\n // resize array\n data = resize(data, size, defaultValue); // fill diagonal\n\n for (var d = 0; d < n; d++) {\n data[d + kSub][d + kSuper] = _value(d);\n }\n } // create DenseMatrix\n\n\n return new DenseMatrix({\n data: data,\n size: [rows, columns]\n });\n };\n /**\n * Generate a matrix from a JSON object\n * @memberof DenseMatrix\n * @param {Object} json An object structured like\n * `{\"mathjs\": \"DenseMatrix\", data: [], size: []}`,\n * where mathjs is optional\n * @returns {DenseMatrix}\n */\n\n\n DenseMatrix.fromJSON = function (json) {\n return new DenseMatrix(json);\n };\n /**\n * Swap rows i and j in Matrix.\n *\n * @memberof DenseMatrix\n * @param {number} i Matrix row index 1\n * @param {number} j Matrix row index 2\n *\n * @return {Matrix} The matrix reference\n */\n\n\n DenseMatrix.prototype.swapRows = function (i, j) {\n // check index\n if (!isNumber(i) || !isInteger(i) || !isNumber(j) || !isInteger(j)) {\n throw new Error('Row index must be positive integers');\n } // check dimensions\n\n\n if (this._size.length !== 2) {\n throw new Error('Only two dimensional matrix is supported');\n } // validate index\n\n\n validateIndex(i, this._size[0]);\n validateIndex(j, this._size[0]); // swap rows\n\n DenseMatrix._swapRows(i, j, this._data); // return current instance\n\n\n return this;\n };\n /**\n * Swap rows i and j in Dense Matrix data structure.\n *\n * @param {number} i Matrix row index 1\n * @param {number} j Matrix row index 2\n * @param {Array} data Matrix data\n */\n\n\n DenseMatrix._swapRows = function (i, j, data) {\n // swap values i <-> j\n var vi = data[i];\n data[i] = data[j];\n data[j] = vi;\n };\n /**\n * Preprocess data, which can be an Array or DenseMatrix with nested Arrays and\n * Matrices. Replaces all nested Matrices with Arrays\n * @memberof DenseMatrix\n * @param {Array} data\n * @return {Array} data\n */\n\n\n function preprocess(data) {\n for (var i = 0, ii = data.length; i < ii; i++) {\n var elem = data[i];\n\n if (isArray(elem)) {\n data[i] = preprocess(elem);\n } else if (elem && elem.isMatrix === true) {\n data[i] = preprocess(elem.valueOf());\n }\n }\n\n return data;\n }\n\n return DenseMatrix;\n}, {\n isClass: true\n});","/**\n * Create a typed-function which checks the types of the arguments and\n * can match them against multiple provided signatures. The typed-function\n * automatically converts inputs in order to find a matching signature.\n * Typed functions throw informative errors in case of wrong input arguments.\n *\n * See the library [typed-function](https://github.com/josdejong/typed-function)\n * for detailed documentation.\n *\n * Syntax:\n *\n * math.typed(name, signatures) : function\n * math.typed(signatures) : function\n *\n * Examples:\n *\n * // create a typed function with multiple types per argument (type union)\n * const fn2 = typed({\n * 'number | boolean': function (b) {\n * return 'b is a number or boolean'\n * },\n * 'string, number | boolean': function (a, b) {\n * return 'a is a string, b is a number or boolean'\n * }\n * })\n *\n * // create a typed function with an any type argument\n * const log = typed({\n * 'string, any': function (event, data) {\n * console.log('event: ' + event + ', data: ' + JSON.stringify(data))\n * }\n * })\n *\n * @param {string} [name] Optional name for the typed-function\n * @param {Object<string, function>} signatures Object with one or multiple function signatures\n * @returns {function} The created typed-function.\n */\nimport { isAccessorNode, isArray, isArrayNode, isAssignmentNode, isBigNumber, isBlockNode, isBoolean, isChain, isComplex, isConditionalNode, isConstantNode, isDate, isDenseMatrix, isFraction, isFunction, isFunctionAssignmentNode, isFunctionNode, isHelp, isIndex, isIndexNode, isMatrix, isNode, isNull, isNumber, isObject, isObjectNode, isOperatorNode, isParenthesisNode, isRange, isRangeNode, isRegExp, isResultSet, isSparseMatrix, isString, isSymbolNode, isUndefined, isUnit } from '../../utils/is.js';\nimport typedFunction from 'typed-function';\nimport { digits } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js'; // returns a new instance of typed-function\n\nvar _createTyped2 = function _createTyped() {\n // initially, return the original instance of typed-function\n // consecutively, return a new instance from typed.create.\n _createTyped2 = typedFunction.create;\n return typedFunction;\n};\n\nvar dependencies = ['?BigNumber', '?Complex', '?DenseMatrix', '?Fraction'];\n/**\n * Factory function for creating a new typed instance\n * @param {Object} dependencies Object with data types like Complex and BigNumber\n * @returns {Function}\n */\n\nexport var createTyped = /* #__PURE__ */factory('typed', dependencies, function createTyped(_ref) {\n var {\n BigNumber,\n Complex,\n DenseMatrix,\n Fraction\n } = _ref;\n\n // TODO: typed-function must be able to silently ignore signatures with unknown data types\n // get a new instance of typed-function\n var typed = _createTyped2(); // define all types. The order of the types determines in which order function\n // arguments are type-checked (so for performance it's important to put the\n // most used types first).\n\n\n typed.types = [{\n name: 'number',\n test: isNumber\n }, {\n name: 'Complex',\n test: isComplex\n }, {\n name: 'BigNumber',\n test: isBigNumber\n }, {\n name: 'Fraction',\n test: isFraction\n }, {\n name: 'Unit',\n test: isUnit\n }, {\n name: 'string',\n test: isString\n }, {\n name: 'Chain',\n test: isChain\n }, {\n name: 'Array',\n test: isArray\n }, {\n name: 'Matrix',\n test: isMatrix\n }, {\n name: 'DenseMatrix',\n test: isDenseMatrix\n }, {\n name: 'SparseMatrix',\n test: isSparseMatrix\n }, {\n name: 'Range',\n test: isRange\n }, {\n name: 'Index',\n test: isIndex\n }, {\n name: 'boolean',\n test: isBoolean\n }, {\n name: 'ResultSet',\n test: isResultSet\n }, {\n name: 'Help',\n test: isHelp\n }, {\n name: 'function',\n test: isFunction\n }, {\n name: 'Date',\n test: isDate\n }, {\n name: 'RegExp',\n test: isRegExp\n }, {\n name: 'null',\n test: isNull\n }, {\n name: 'undefined',\n test: isUndefined\n }, {\n name: 'AccessorNode',\n test: isAccessorNode\n }, {\n name: 'ArrayNode',\n test: isArrayNode\n }, {\n name: 'AssignmentNode',\n test: isAssignmentNode\n }, {\n name: 'BlockNode',\n test: isBlockNode\n }, {\n name: 'ConditionalNode',\n test: isConditionalNode\n }, {\n name: 'ConstantNode',\n test: isConstantNode\n }, {\n name: 'FunctionNode',\n test: isFunctionNode\n }, {\n name: 'FunctionAssignmentNode',\n test: isFunctionAssignmentNode\n }, {\n name: 'IndexNode',\n test: isIndexNode\n }, {\n name: 'Node',\n test: isNode\n }, {\n name: 'ObjectNode',\n test: isObjectNode\n }, {\n name: 'OperatorNode',\n test: isOperatorNode\n }, {\n name: 'ParenthesisNode',\n test: isParenthesisNode\n }, {\n name: 'RangeNode',\n test: isRangeNode\n }, {\n name: 'SymbolNode',\n test: isSymbolNode\n }, {\n name: 'Object',\n test: isObject\n } // order 'Object' last, it matches on other classes too\n ];\n typed.conversions = [{\n from: 'number',\n to: 'BigNumber',\n convert: function convert(x) {\n if (!BigNumber) {\n throwNoBignumber(x);\n } // note: conversion from number to BigNumber can fail if x has >15 digits\n\n\n if (digits(x) > 15) {\n throw new TypeError('Cannot implicitly convert a number with >15 significant digits to BigNumber ' + '(value: ' + x + '). ' + 'Use function bignumber(x) to convert to BigNumber.');\n }\n\n return new BigNumber(x);\n }\n }, {\n from: 'number',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n return new Complex(x, 0);\n }\n }, {\n from: 'number',\n to: 'string',\n convert: function convert(x) {\n return x + '';\n }\n }, {\n from: 'BigNumber',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n return new Complex(x.toNumber(), 0);\n }\n }, {\n from: 'Fraction',\n to: 'BigNumber',\n convert: function convert(x) {\n throw new TypeError('Cannot implicitly convert a Fraction to BigNumber or vice versa. ' + 'Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.');\n }\n }, {\n from: 'Fraction',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n return new Complex(x.valueOf(), 0);\n }\n }, {\n from: 'number',\n to: 'Fraction',\n convert: function convert(x) {\n if (!Fraction) {\n throwNoFraction(x);\n }\n\n var f = new Fraction(x);\n\n if (f.valueOf() !== x) {\n throw new TypeError('Cannot implicitly convert a number to a Fraction when there will be a loss of precision ' + '(value: ' + x + '). ' + 'Use function fraction(x) to convert to Fraction.');\n }\n\n return f;\n }\n }, {\n // FIXME: add conversion from Fraction to number, for example for `sqrt(fraction(1,3))`\n // from: 'Fraction',\n // to: 'number',\n // convert: function (x) {\n // return x.valueOf()\n // }\n // }, {\n from: 'string',\n to: 'number',\n convert: function convert(x) {\n var n = Number(x);\n\n if (isNaN(n)) {\n throw new Error('Cannot convert \"' + x + '\" to a number');\n }\n\n return n;\n }\n }, {\n from: 'string',\n to: 'BigNumber',\n convert: function convert(x) {\n if (!BigNumber) {\n throwNoBignumber(x);\n }\n\n try {\n return new BigNumber(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to BigNumber');\n }\n }\n }, {\n from: 'string',\n to: 'Fraction',\n convert: function convert(x) {\n if (!Fraction) {\n throwNoFraction(x);\n }\n\n try {\n return new Fraction(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to Fraction');\n }\n }\n }, {\n from: 'string',\n to: 'Complex',\n convert: function convert(x) {\n if (!Complex) {\n throwNoComplex(x);\n }\n\n try {\n return new Complex(x);\n } catch (err) {\n throw new Error('Cannot convert \"' + x + '\" to Complex');\n }\n }\n }, {\n from: 'boolean',\n to: 'number',\n convert: function convert(x) {\n return +x;\n }\n }, {\n from: 'boolean',\n to: 'BigNumber',\n convert: function convert(x) {\n if (!BigNumber) {\n throwNoBignumber(x);\n }\n\n return new BigNumber(+x);\n }\n }, {\n from: 'boolean',\n to: 'Fraction',\n convert: function convert(x) {\n if (!Fraction) {\n throwNoFraction(x);\n }\n\n return new Fraction(+x);\n }\n }, {\n from: 'boolean',\n to: 'string',\n convert: function convert(x) {\n return String(x);\n }\n }, {\n from: 'Array',\n to: 'Matrix',\n convert: function convert(array) {\n if (!DenseMatrix) {\n throwNoMatrix();\n }\n\n return new DenseMatrix(array);\n }\n }, {\n from: 'Matrix',\n to: 'Array',\n convert: function convert(matrix) {\n return matrix.valueOf();\n }\n }];\n return typed;\n});\n\nfunction throwNoBignumber(x) {\n throw new Error(\"Cannot convert value \".concat(x, \" into a BigNumber: no class 'BigNumber' provided\"));\n}\n\nfunction throwNoComplex(x) {\n throw new Error(\"Cannot convert value \".concat(x, \" into a Complex number: no class 'Complex' provided\"));\n}\n\nfunction throwNoMatrix() {\n throw new Error('Cannot convert array into a Matrix: no class \\'DenseMatrix\\' provided');\n}\n\nfunction throwNoFraction(x) {\n throw new Error(\"Cannot convert value \".concat(x, \" into a Fraction, no class 'Fraction' provided.\"));\n}","import { isCollection, isMatrix } from './is.js';\nimport { IndexError } from '../error/IndexError.js';\nimport { arraySize } from './array.js';\n/**\n * Test whether an array contains collections\n * @param {Array} array\n * @returns {boolean} Returns true when the array contains one or multiple\n * collections (Arrays or Matrices). Returns false otherwise.\n */\n\nexport function containsCollections(array) {\n for (var i = 0; i < array.length; i++) {\n if (isCollection(array[i])) {\n return true;\n }\n }\n\n return false;\n}\n/**\n * Recursively loop over all elements in a given multi dimensional array\n * and invoke the callback on each of the elements.\n * @param {Array | Matrix} array\n * @param {Function} callback The callback method is invoked with one\n * parameter: the current element in the array\n */\n\nexport function deepForEach(array, callback) {\n if (isMatrix(array)) {\n array = array.valueOf();\n }\n\n for (var i = 0, ii = array.length; i < ii; i++) {\n var value = array[i];\n\n if (Array.isArray(value)) {\n deepForEach(value, callback);\n } else {\n callback(value);\n }\n }\n}\n/**\n * Execute the callback function element wise for each element in array and any\n * nested array\n * Returns an array with the results\n * @param {Array | Matrix} array\n * @param {Function} callback The callback is called with two parameters:\n * value1 and value2, which contain the current\n * element of both arrays.\n * @param {boolean} [skipZeros] Invoke callback function for non-zero values only.\n *\n * @return {Array | Matrix} res\n */\n\nexport function deepMap(array, callback, skipZeros) {\n if (array && typeof array.map === 'function') {\n // TODO: replace array.map with a for loop to improve performance\n return array.map(function (x) {\n return deepMap(x, callback, skipZeros);\n });\n } else {\n return callback(array);\n }\n}\n/**\n * Reduce a given matrix or array to a new matrix or\n * array with one less dimension, applying the given\n * callback in the selected dimension.\n * @param {Array | Matrix} mat\n * @param {number} dim\n * @param {Function} callback\n * @return {Array | Matrix} res\n */\n\nexport function reduce(mat, dim, callback) {\n var size = Array.isArray(mat) ? arraySize(mat) : mat.size();\n\n if (dim < 0 || dim >= size.length) {\n // TODO: would be more clear when throwing a DimensionError here\n throw new IndexError(dim, size.length);\n }\n\n if (isMatrix(mat)) {\n return mat.create(_reduce(mat.valueOf(), dim, callback));\n } else {\n return _reduce(mat, dim, callback);\n }\n}\n/**\n * Recursively reduce a matrix\n * @param {Array} mat\n * @param {number} dim\n * @param {Function} callback\n * @returns {Array} ret\n * @private\n */\n\nfunction _reduce(mat, dim, callback) {\n var i, ret, val, tran;\n\n if (dim <= 0) {\n if (!Array.isArray(mat[0])) {\n val = mat[0];\n\n for (i = 1; i < mat.length; i++) {\n val = callback(val, mat[i]);\n }\n\n return val;\n } else {\n tran = _switch(mat);\n ret = [];\n\n for (i = 0; i < tran.length; i++) {\n ret[i] = _reduce(tran[i], dim - 1, callback);\n }\n\n return ret;\n }\n } else {\n ret = [];\n\n for (i = 0; i < mat.length; i++) {\n ret[i] = _reduce(mat[i], dim - 1, callback);\n }\n\n return ret;\n }\n}\n/**\n * Transpose a matrix\n * @param {Array} mat\n * @returns {Array} ret\n * @private\n */\n\n\nfunction _switch(mat) {\n var I = mat.length;\n var J = mat[0].length;\n var i, j;\n var ret = [];\n\n for (j = 0; j < J; j++) {\n var tmp = [];\n\n for (i = 0; i < I; i++) {\n tmp.push(mat[i][j]);\n }\n\n ret.push(tmp);\n }\n\n return ret;\n} // TODO: document function scatter\n\n\nexport function scatter(a, j, w, x, u, mark, cindex, f, inverse, update, value) {\n // a arrays\n var avalues = a._values;\n var aindex = a._index;\n var aptr = a._ptr; // vars\n\n var k, k0, k1, i; // check we need to process values (pattern matrix)\n\n if (x) {\n // values in j\n for (k0 = aptr[j], k1 = aptr[j + 1], k = k0; k < k1; k++) {\n // row\n i = aindex[k]; // check value exists in current j\n\n if (w[i] !== mark) {\n // i is new entry in j\n w[i] = mark; // add i to pattern of C\n\n cindex.push(i); // x(i) = A, check we need to call function this time\n\n if (update) {\n // copy value to workspace calling callback function\n x[i] = inverse ? f(avalues[k], value) : f(value, avalues[k]); // function was called on current row\n\n u[i] = mark;\n } else {\n // copy value to workspace\n x[i] = avalues[k];\n }\n } else {\n // i exists in C already\n x[i] = inverse ? f(avalues[k], x[i]) : f(x[i], avalues[k]); // function was called on current row\n\n u[i] = mark;\n }\n }\n } else {\n // values in j\n for (k0 = aptr[j], k1 = aptr[j + 1], k = k0; k < k1; k++) {\n // row\n i = aindex[k]; // check value exists in current j\n\n if (w[i] !== mark) {\n // i is new entry in j\n w[i] = mark; // add i to pattern of C\n\n cindex.push(i);\n } else {\n // indicate function was called on current row\n u[i] = mark;\n }\n }\n }\n}","import { deepMap } from '../../utils/collection.js';\nimport { isInteger as isIntegerNumber } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'isInteger';\nvar dependencies = ['typed'];\nexport var createIsInteger = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Test whether a value is an integer number.\n * The function supports `number`, `BigNumber`, and `Fraction`.\n *\n * The function is evaluated element-wise in case of Array or Matrix input.\n *\n * Syntax:\n *\n * math.isInteger(x)\n *\n * Examples:\n *\n * math.isInteger(2) // returns true\n * math.isInteger(0) // returns true\n * math.isInteger(0.5) // returns false\n * math.isInteger(math.bignumber(500)) // returns true\n * math.isInteger(math.fraction(4)) // returns true\n * math.isInteger('3') // returns true\n * math.isInteger([3, 0.5, -2]) // returns [true, false, true]\n * math.isInteger(math.complex('2-4i') // throws an error\n *\n * See also:\n *\n * isNumeric, isPositive, isNegative, isZero\n *\n * @param {number | BigNumber | Fraction | Array | Matrix} x Value to be tested\n * @return {boolean} Returns true when `x` contains a numeric, integer value.\n * Throws an error in case of an unknown data type.\n */\n return typed(name, {\n number: isIntegerNumber,\n // TODO: what to do with isInteger(add(0.1, 0.2)) ?\n BigNumber: function BigNumber(x) {\n return x.isInt();\n },\n Fraction: function Fraction(x) {\n return x.d === 1 && isFinite(x.n);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n });\n});","import { deepMap } from '../../utils/collection.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'isNumeric';\nvar dependencies = ['typed'];\nexport var createIsNumeric = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Test whether a value is an numeric value.\n *\n * The function is evaluated element-wise in case of Array or Matrix input.\n *\n * Syntax:\n *\n * math.isNumeric(x)\n *\n * Examples:\n *\n * math.isNumeric(2) // returns true\n * math.isNumeric('2') // returns false\n * math.hasNumericValue('2') // returns true\n * math.isNumeric(0) // returns true\n * math.isNumeric(math.bignumber(500)) // returns true\n * math.isNumeric(math.fraction(4)) // returns true\n * math.isNumeric(math.complex('2-4i') // returns false\n * math.isNumeric([2.3, 'foo', false]) // returns [true, false, true]\n *\n * See also:\n *\n * isZero, isPositive, isNegative, isInteger, hasNumericValue\n *\n * @param {*} x Value to be tested\n * @return {boolean} Returns true when `x` is a `number`, `BigNumber`,\n * `Fraction`, or `boolean`. Returns false for other types.\n * Throws an error in case of unknown types.\n */\n return typed(name, {\n 'number | BigNumber | Fraction | boolean': function numberBigNumberFractionBoolean() {\n return true;\n },\n 'Complex | Unit | string | null | undefined | Node': function ComplexUnitStringNullUndefinedNode() {\n return false;\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n });\n});","import { isInteger } from '../../utils/number.js';\nvar n1 = 'number';\nexport function isIntegerNumber(x) {\n return isInteger(x);\n}\nisIntegerNumber.signature = n1;\nexport function isNegativeNumber(x) {\n return x < 0;\n}\nisNegativeNumber.signature = n1;\nexport function isPositiveNumber(x) {\n return x > 0;\n}\nisPositiveNumber.signature = n1;\nexport function isZeroNumber(x) {\n return x === 0;\n}\nisZeroNumber.signature = n1;\nexport function isNaNNumber(x) {\n return Number.isNaN(x);\n}\nisNaNNumber.signature = n1;","/**\n * Compares two BigNumbers.\n * @param {BigNumber} x First value to compare\n * @param {BigNumber} y Second value to compare\n * @param {number} [epsilon] The maximum relative difference between x and y\n * If epsilon is undefined or null, the function will\n * test whether x and y are exactly equal.\n * @return {boolean} whether the two numbers are nearly equal\n */\nexport function nearlyEqual(x, y, epsilon) {\n // if epsilon is null or undefined, test whether x and y are exactly equal\n if (epsilon === null || epsilon === undefined) {\n return x.eq(y);\n } // use \"==\" operator, handles infinities\n\n\n if (x.eq(y)) {\n return true;\n } // NaN\n\n\n if (x.isNaN() || y.isNaN()) {\n return false;\n } // at this point x and y should be finite\n\n\n if (x.isFinite() && y.isFinite()) {\n // check numbers are very close, needed when comparing numbers near zero\n var diff = x.minus(y).abs();\n\n if (diff.isZero()) {\n return true;\n } else {\n // use relative error\n var max = x.constructor.max(x.abs(), y.abs());\n return diff.lte(max.times(epsilon));\n }\n } // Infinite and Number or negative Infinite and positive Infinite cases\n\n\n return false;\n}","import { nearlyEqual as bigNearlyEqual } from '../../utils/bignumber/nearlyEqual.js';\nimport { nearlyEqual } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nimport { complexEquals } from '../../utils/complex.js';\nvar name = 'equalScalar';\nvar dependencies = ['typed', 'config'];\nexport var createEqualScalar = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config\n } = _ref;\n\n /**\n * Test whether two scalar values are nearly equal.\n *\n * @param {number | BigNumber | Fraction | boolean | Complex | Unit} x First value to compare\n * @param {number | BigNumber | Fraction | boolean | Complex} y Second value to compare\n * @return {boolean} Returns true when the compared values are equal, else returns false\n * @private\n */\n return typed(name, {\n 'boolean, boolean': function booleanBoolean(x, y) {\n return x === y;\n },\n 'number, number': function numberNumber(x, y) {\n return nearlyEqual(x, y, config.epsilon);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return x.eq(y) || bigNearlyEqual(x, y, config.epsilon);\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return x.equals(y);\n },\n 'Complex, Complex': function ComplexComplex(x, y) {\n return complexEquals(x, y, config.epsilon);\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n if (!x.equalBase(y)) {\n throw new Error('Cannot compare units with different base');\n }\n\n return this(x.value, y.value);\n }\n });\n});\nexport var createEqualScalarNumber = factory(name, ['typed', 'config'], (_ref2) => {\n var {\n typed,\n config\n } = _ref2;\n return typed(name, {\n 'number, number': function numberNumber(x, y) {\n return nearlyEqual(x, y, config.epsilon);\n }\n });\n});","import { nearlyEqual } from './number.js';\n/**\n * Test whether two complex values are equal provided a given epsilon.\n * Does not use or change the global Complex.EPSILON setting\n * @param {Complex} x\n * @param {Complex} y\n * @param {number} epsilon\n * @returns {boolean}\n */\n\nexport function complexEquals(x, y, epsilon) {\n return nearlyEqual(x.re, y.re, epsilon) && nearlyEqual(x.im, y.im, epsilon);\n}","import { factory } from '../utils/factory.js';\nimport { deepMap } from '../utils/collection.js';\nvar name = 'number';\nvar dependencies = ['typed'];\nexport var createNumber = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Create a number or convert a string, boolean, or unit to a number.\n * When value is a matrix, all elements will be converted to number.\n *\n * Syntax:\n *\n * math.number(value)\n * math.number(unit, valuelessUnit)\n *\n * Examples:\n *\n * math.number(2) // returns number 2\n * math.number('7.2') // returns number 7.2\n * math.number(true) // returns number 1\n * math.number([true, false, true, true]) // returns [1, 0, 1, 1]\n * math.number(math.unit('52cm'), 'm') // returns 0.52\n *\n * See also:\n *\n * bignumber, boolean, complex, index, matrix, string, unit\n *\n * @param {string | number | BigNumber | Fraction | boolean | Array | Matrix | Unit | null} [value] Value to be converted\n * @param {Unit | string} [valuelessUnit] A valueless unit, used to convert a unit to a number\n * @return {number | Array | Matrix} The created number\n */\n var number = typed('number', {\n '': function _() {\n return 0;\n },\n number: function number(x) {\n return x;\n },\n string: function string(x) {\n if (x === 'NaN') return NaN;\n var size = 0;\n var boxMatch = x.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);\n\n if (boxMatch) {\n // x includes a size suffix like 0xffffi32, so we extract\n // the suffix and remove it from x\n size = Number(boxMatch[2]);\n x = boxMatch[1];\n }\n\n var num = Number(x);\n\n if (isNaN(num)) {\n throw new SyntaxError('String \"' + x + '\" is no valid number');\n }\n\n if (boxMatch) {\n // x is a signed bin, oct, or hex literal\n // num is the value of string x if x is interpreted as unsigned\n if (num > 2 ** size - 1) {\n // literal is too large for size suffix\n throw new SyntaxError(\"String \\\"\".concat(x, \"\\\" is out of range\"));\n } // check if the bit at index size - 1 is set and if so do the twos complement\n\n\n if (num >= 2 ** (size - 1)) {\n num = num - 2 ** size;\n }\n }\n\n return num;\n },\n BigNumber: function BigNumber(x) {\n return x.toNumber();\n },\n Fraction: function Fraction(x) {\n return x.valueOf();\n },\n Unit: function Unit(x) {\n throw new Error('Second argument with valueless unit expected');\n },\n null: function _null(x) {\n return 0;\n },\n 'Unit, string | Unit': function UnitStringUnit(unit, valuelessUnit) {\n return unit.toNumber(valuelessUnit);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n }); // reviver function to parse a JSON object like:\n //\n // {\"mathjs\":\"number\",\"value\":\"2.3\"}\n //\n // into a number 2.3\n\n number.fromJSON = function (json) {\n return parseFloat(json.value);\n };\n\n return number;\n});","import { isInteger, log2, log10, cbrt, expm1, sign, toFixed, log1p } from '../../utils/number.js';\nvar n1 = 'number';\nvar n2 = 'number, number';\nexport function absNumber(a) {\n return Math.abs(a);\n}\nabsNumber.signature = n1;\nexport function addNumber(a, b) {\n return a + b;\n}\naddNumber.signature = n2;\nexport function subtractNumber(a, b) {\n return a - b;\n}\nsubtractNumber.signature = n2;\nexport function multiplyNumber(a, b) {\n return a * b;\n}\nmultiplyNumber.signature = n2;\nexport function divideNumber(a, b) {\n return a / b;\n}\ndivideNumber.signature = n2;\nexport function unaryMinusNumber(x) {\n return -x;\n}\nunaryMinusNumber.signature = n1;\nexport function unaryPlusNumber(x) {\n return x;\n}\nunaryPlusNumber.signature = n1;\nexport function cbrtNumber(x) {\n return cbrt(x);\n}\ncbrtNumber.signature = n1;\nexport function ceilNumber(x) {\n return Math.ceil(x);\n}\nceilNumber.signature = n1;\nexport function cubeNumber(x) {\n return x * x * x;\n}\ncubeNumber.signature = n1;\nexport function expNumber(x) {\n return Math.exp(x);\n}\nexpNumber.signature = n1;\nexport function expm1Number(x) {\n return expm1(x);\n}\nexpm1Number.signature = n1;\nexport function fixNumber(x) {\n return x > 0 ? Math.floor(x) : Math.ceil(x);\n}\nfixNumber.signature = n1;\nexport function floorNumber(x) {\n return Math.floor(x);\n}\nfloorNumber.signature = n1;\n/**\n * Calculate gcd for numbers\n * @param {number} a\n * @param {number} b\n * @returns {number} Returns the greatest common denominator of a and b\n */\n\nexport function gcdNumber(a, b) {\n if (!isInteger(a) || !isInteger(b)) {\n throw new Error('Parameters in function gcd must be integer numbers');\n } // https://en.wikipedia.org/wiki/Euclidean_algorithm\n\n\n var r;\n\n while (b !== 0) {\n r = a % b;\n a = b;\n b = r;\n }\n\n return a < 0 ? -a : a;\n}\ngcdNumber.signature = n2;\n/**\n * Calculate lcm for two numbers\n * @param {number} a\n * @param {number} b\n * @returns {number} Returns the least common multiple of a and b\n */\n\nexport function lcmNumber(a, b) {\n if (!isInteger(a) || !isInteger(b)) {\n throw new Error('Parameters in function lcm must be integer numbers');\n }\n\n if (a === 0 || b === 0) {\n return 0;\n } // https://en.wikipedia.org/wiki/Euclidean_algorithm\n // evaluate lcm here inline to reduce overhead\n\n\n var t;\n var prod = a * b;\n\n while (b !== 0) {\n t = b;\n b = a % t;\n a = t;\n }\n\n return Math.abs(prod / a);\n}\nlcmNumber.signature = n2;\n/**\n * Calculate the logarithm of a value.\n * @param {number} x\n * @return {number}\n */\n\nexport function logNumber(x) {\n return Math.log(x);\n}\nlogNumber.signature = n1;\n/**\n * Calculate the 10-base logarithm of a number\n * @param {number} x\n * @return {number}\n */\n\nexport function log10Number(x) {\n return log10(x);\n}\nlog10Number.signature = n1;\n/**\n * Calculate the 2-base logarithm of a number\n * @param {number} x\n * @return {number}\n */\n\nexport function log2Number(x) {\n return log2(x);\n}\nlog2Number.signature = n1;\n/**\n * Calculate the natural logarithm of a `number+1`\n * @param {number} x\n * @returns {number}\n */\n\nexport function log1pNumber(x) {\n return log1p(x);\n}\nlog1pNumber.signature = n1;\n/**\n * Calculate the modulus of two numbers\n * @param {number} x\n * @param {number} y\n * @returns {number} res\n * @private\n */\n\nexport function modNumber(x, y) {\n if (y > 0) {\n // We don't use JavaScript's % operator here as this doesn't work\n // correctly for x < 0 and x === 0\n // see https://en.wikipedia.org/wiki/Modulo_operation\n return x - y * Math.floor(x / y);\n } else if (y === 0) {\n return x;\n } else {\n // y < 0\n // TODO: implement mod for a negative divisor\n throw new Error('Cannot calculate mod for a negative divisor');\n }\n}\nmodNumber.signature = n2;\n/**\n * Calculate the nth root of a, solve x^root == a\n * http://rosettacode.org/wiki/Nth_root#JavaScript\n * @param {number} a\n * @param {number} root\n * @private\n */\n\nexport function nthRootNumber(a, root) {\n var inv = root < 0;\n\n if (inv) {\n root = -root;\n }\n\n if (root === 0) {\n throw new Error('Root must be non-zero');\n }\n\n if (a < 0 && Math.abs(root) % 2 !== 1) {\n throw new Error('Root must be odd when a is negative.');\n } // edge cases zero and infinity\n\n\n if (a === 0) {\n return inv ? Infinity : 0;\n }\n\n if (!isFinite(a)) {\n return inv ? 0 : a;\n }\n\n var x = Math.pow(Math.abs(a), 1 / root); // If a < 0, we require that root is an odd integer,\n // so (-1) ^ (1/root) = -1\n\n x = a < 0 ? -x : x;\n return inv ? 1 / x : x; // Very nice algorithm, but fails with nthRoot(-2, 3).\n // Newton's method has some well-known problems at times:\n // https://en.wikipedia.org/wiki/Newton%27s_method#Failure_analysis\n\n /*\n let x = 1 // Initial guess\n let xPrev = 1\n let i = 0\n const iMax = 10000\n do {\n const delta = (a / Math.pow(x, root - 1) - x) / root\n xPrev = x\n x = x + delta\n i++\n }\n while (xPrev !== x && i < iMax)\n if (xPrev !== x) {\n throw new Error('Function nthRoot failed to converge')\n }\n return inv ? 1 / x : x\n */\n}\nnthRootNumber.signature = n2;\nexport function signNumber(x) {\n return sign(x);\n}\nsignNumber.signature = n1;\nexport function sqrtNumber(x) {\n return Math.sqrt(x);\n}\nsqrtNumber.signature = n1;\nexport function squareNumber(x) {\n return x * x;\n}\nsquareNumber.signature = n1;\n/**\n * Calculate xgcd for two numbers\n * @param {number} a\n * @param {number} b\n * @return {number} result\n * @private\n */\n\nexport function xgcdNumber(a, b) {\n // source: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm\n var t; // used to swap two variables\n\n var q; // quotient\n\n var r; // remainder\n\n var x = 0;\n var lastx = 1;\n var y = 1;\n var lasty = 0;\n\n if (!isInteger(a) || !isInteger(b)) {\n throw new Error('Parameters in function xgcd must be integer numbers');\n }\n\n while (b) {\n q = Math.floor(a / b);\n r = a - q * b;\n t = x;\n x = lastx - q * x;\n lastx = t;\n t = y;\n y = lasty - q * y;\n lasty = t;\n a = b;\n b = r;\n }\n\n var res;\n\n if (a < 0) {\n res = [-a, -lastx, -lasty];\n } else {\n res = [a, a ? lastx : 0, lasty];\n }\n\n return res;\n}\nxgcdNumber.signature = n2;\n/**\n * Calculates the power of x to y, x^y, for two numbers.\n * @param {number} x\n * @param {number} y\n * @return {number} res\n */\n\nexport function powNumber(x, y) {\n // x^Infinity === 0 if -1 < x < 1\n // A real number 0 is returned instead of complex(0)\n if (x * x < 1 && y === Infinity || x * x > 1 && y === -Infinity) {\n return 0;\n }\n\n return Math.pow(x, y);\n}\npowNumber.signature = n2;\n/**\n * round a number to the given number of decimals, or to zero if decimals is\n * not provided\n * @param {number} value\n * @param {number} decimals number of decimals, between 0 and 15 (0 by default)\n * @return {number} roundedValue\n */\n\nexport function roundNumber(value) {\n var decimals = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return parseFloat(toFixed(value, decimals));\n}\nroundNumber.signature = n2;\n/**\n * Calculate the norm of a number, the absolute value.\n * @param {number} x\n * @return {number}\n */\n\nexport function normNumber(x) {\n return Math.abs(x);\n}\nnormNumber.signature = n1;","import { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nimport { cubeNumber } from '../../plain/number/index.js';\nvar name = 'cube';\nvar dependencies = ['typed'];\nexport var createCube = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Compute the cube of a value, `x * x * x`.\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.cube(x)\n *\n * Examples:\n *\n * math.cube(2) // returns number 8\n * math.pow(2, 3) // returns number 8\n * math.cube(4) // returns number 64\n * 4 * 4 * 4 // returns number 64\n *\n * math.cube([1, 2, 3, 4]) // returns Array [1, 8, 27, 64]\n *\n * See also:\n *\n * multiply, square, pow, cbrt\n *\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix | Unit} x Number for which to calculate the cube\n * @return {number | BigNumber | Fraction | Complex | Array | Matrix | Unit} Cube of x\n */\n return typed(name, {\n number: cubeNumber,\n Complex: function Complex(x) {\n return x.mul(x).mul(x); // Is faster than pow(x, 3)\n },\n BigNumber: function BigNumber(x) {\n return x.times(x).times(x);\n },\n Fraction: function Fraction(x) {\n return x.pow(3); // Is faster than mul()mul()mul()\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since cube(0) = 0\n return deepMap(x, this, true);\n },\n Unit: function Unit(x) {\n return x.pow(3);\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { multiplyNumber } from '../../plain/number/index.js';\nvar name = 'multiplyScalar';\nvar dependencies = ['typed'];\nexport var createMultiplyScalar = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Multiply two scalar values, `x * y`.\n * This function is meant for internal use: it is used by the public function\n * `multiply`\n *\n * This function does not support collections (Array or Matrix).\n *\n * @param {number | BigNumber | Fraction | Complex | Unit} x First value to multiply\n * @param {number | BigNumber | Fraction | Complex} y Second value to multiply\n * @return {number | BigNumber | Fraction | Complex | Unit} Multiplication of `x` and `y`\n * @private\n */\n return typed('multiplyScalar', {\n 'number, number': multiplyNumber,\n 'Complex, Complex': function ComplexComplex(x, y) {\n return x.mul(y);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return x.times(y);\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return x.mul(y);\n },\n 'number | Fraction | BigNumber | Complex, Unit': function numberFractionBigNumberComplexUnit(x, y) {\n var res = y.clone();\n res.value = res.value === null ? res._normalize(x) : this(res.value, x);\n return res;\n },\n 'Unit, number | Fraction | BigNumber | Complex': function UnitNumberFractionBigNumberComplex(x, y) {\n var res = x.clone();\n res.value = res.value === null ? res._normalize(y) : this(res.value, y);\n return res;\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n return x.multiply(y);\n }\n });\n});","import { isInteger } from '../../utils/number.js';\nvar n1 = 'number';\nvar n2 = 'number, number';\nexport function bitAndNumber(x, y) {\n if (!isInteger(x) || !isInteger(y)) {\n throw new Error('Integers expected in function bitAnd');\n }\n\n return x & y;\n}\nbitAndNumber.signature = n2;\nexport function bitNotNumber(x) {\n if (!isInteger(x)) {\n throw new Error('Integer expected in function bitNot');\n }\n\n return ~x;\n}\nbitNotNumber.signature = n1;\nexport function bitOrNumber(x, y) {\n if (!isInteger(x) || !isInteger(y)) {\n throw new Error('Integers expected in function bitOr');\n }\n\n return x | y;\n}\nbitOrNumber.signature = n2;\nexport function bitXorNumber(x, y) {\n if (!isInteger(x) || !isInteger(y)) {\n throw new Error('Integers expected in function bitXor');\n }\n\n return x ^ y;\n}\nbitXorNumber.signature = n2;\nexport function leftShiftNumber(x, y) {\n if (!isInteger(x) || !isInteger(y)) {\n throw new Error('Integers expected in function leftShift');\n }\n\n return x << y;\n}\nleftShiftNumber.signature = n2;\nexport function rightArithShiftNumber(x, y) {\n if (!isInteger(x) || !isInteger(y)) {\n throw new Error('Integers expected in function rightArithShift');\n }\n\n return x >> y;\n}\nrightArithShiftNumber.signature = n2;\nexport function rightLogShiftNumber(x, y) {\n if (!isInteger(x) || !isInteger(y)) {\n throw new Error('Integers expected in function rightLogShift');\n }\n\n return x >>> y;\n}\nrightLogShiftNumber.signature = n2;","var n1 = 'number';\nvar n2 = 'number, number';\nexport function notNumber(x) {\n return !x;\n}\nnotNumber.signature = n1;\nexport function orNumber(x, y) {\n return !!(x || y);\n}\norNumber.signature = n2;\nexport function xorNumber(x, y) {\n return !!x !== !!y;\n}\nxorNumber.signature = n2;\nexport function andNumber(x, y) {\n return !!(x && y);\n}\nandNumber.signature = n2;","/* eslint-disable no-loss-of-precision */\nimport { deepMap } from '../../utils/collection.js';\nimport { sign } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'erf';\nvar dependencies = ['typed'];\nexport var createErf = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Compute the erf function of a value using a rational Chebyshev\n * approximations for different intervals of x.\n *\n * This is a translation of W. J. Cody's Fortran implementation from 1987\n * ( https://www.netlib.org/specfun/erf ). See the AMS publication\n * \"Rational Chebyshev Approximations for the Error Function\" by W. J. Cody\n * for an explanation of this process.\n *\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.erf(x)\n *\n * Examples:\n *\n * math.erf(0.2) // returns 0.22270258921047847\n * math.erf(-0.5) // returns -0.5204998778130465\n * math.erf(4) // returns 0.9999999845827421\n *\n * @param {number | Array | Matrix} x A real number\n * @return {number | Array | Matrix} The erf of `x`\n */\n return typed('name', {\n number: function number(x) {\n var y = Math.abs(x);\n\n if (y >= MAX_NUM) {\n return sign(x);\n }\n\n if (y <= THRESH) {\n return sign(x) * erf1(y);\n }\n\n if (y <= 4.0) {\n return sign(x) * (1 - erfc2(y));\n }\n\n return sign(x) * (1 - erfc3(y));\n },\n 'Array | Matrix': function ArrayMatrix(n) {\n return deepMap(n, this);\n } // TODO: For complex numbers, use the approximation for the Faddeeva function\n // from \"More Efficient Computation of the Complex Error Function\" (AMS)\n\n });\n /**\n * Approximates the error function erf() for x <= 0.46875 using this function:\n * n\n * erf(x) = x * sum (p_j * x^(2j)) / (q_j * x^(2j))\n * j=0\n */\n\n function erf1(y) {\n var ysq = y * y;\n var xnum = P[0][4] * ysq;\n var xden = ysq;\n var i;\n\n for (i = 0; i < 3; i += 1) {\n xnum = (xnum + P[0][i]) * ysq;\n xden = (xden + Q[0][i]) * ysq;\n }\n\n return y * (xnum + P[0][3]) / (xden + Q[0][3]);\n }\n /**\n * Approximates the complement of the error function erfc() for\n * 0.46875 <= x <= 4.0 using this function:\n * n\n * erfc(x) = e^(-x^2) * sum (p_j * x^j) / (q_j * x^j)\n * j=0\n */\n\n\n function erfc2(y) {\n var xnum = P[1][8] * y;\n var xden = y;\n var i;\n\n for (i = 0; i < 7; i += 1) {\n xnum = (xnum + P[1][i]) * y;\n xden = (xden + Q[1][i]) * y;\n }\n\n var result = (xnum + P[1][7]) / (xden + Q[1][7]);\n var ysq = parseInt(y * 16) / 16;\n var del = (y - ysq) * (y + ysq);\n return Math.exp(-ysq * ysq) * Math.exp(-del) * result;\n }\n /**\n * Approximates the complement of the error function erfc() for x > 4.0 using\n * this function:\n *\n * erfc(x) = (e^(-x^2) / x) * [ 1/sqrt(pi) +\n * n\n * 1/(x^2) * sum (p_j * x^(-2j)) / (q_j * x^(-2j)) ]\n * j=0\n */\n\n\n function erfc3(y) {\n var ysq = 1 / (y * y);\n var xnum = P[2][5] * ysq;\n var xden = ysq;\n var i;\n\n for (i = 0; i < 4; i += 1) {\n xnum = (xnum + P[2][i]) * ysq;\n xden = (xden + Q[2][i]) * ysq;\n }\n\n var result = ysq * (xnum + P[2][4]) / (xden + Q[2][4]);\n result = (SQRPI - result) / y;\n ysq = parseInt(y * 16) / 16;\n var del = (y - ysq) * (y + ysq);\n return Math.exp(-ysq * ysq) * Math.exp(-del) * result;\n }\n});\n/**\n * Upper bound for the first approximation interval, 0 <= x <= THRESH\n * @constant\n */\n\nvar THRESH = 0.46875;\n/**\n * Constant used by W. J. Cody's Fortran77 implementation to denote sqrt(pi)\n * @constant\n */\n\nvar SQRPI = 5.6418958354775628695e-1;\n/**\n * Coefficients for each term of the numerator sum (p_j) for each approximation\n * interval (see W. J. Cody's paper for more details)\n * @constant\n */\n\nvar P = [[3.16112374387056560e00, 1.13864154151050156e02, 3.77485237685302021e02, 3.20937758913846947e03, 1.85777706184603153e-1], [5.64188496988670089e-1, 8.88314979438837594e00, 6.61191906371416295e01, 2.98635138197400131e02, 8.81952221241769090e02, 1.71204761263407058e03, 2.05107837782607147e03, 1.23033935479799725e03, 2.15311535474403846e-8], [3.05326634961232344e-1, 3.60344899949804439e-1, 1.25781726111229246e-1, 1.60837851487422766e-2, 6.58749161529837803e-4, 1.63153871373020978e-2]];\n/**\n * Coefficients for each term of the denominator sum (q_j) for each approximation\n * interval (see W. J. Cody's paper for more details)\n * @constant\n */\n\nvar Q = [[2.36012909523441209e01, 2.44024637934444173e02, 1.28261652607737228e03, 2.84423683343917062e03], [1.57449261107098347e01, 1.17693950891312499e02, 5.37181101862009858e02, 1.62138957456669019e03, 3.29079923573345963e03, 4.36261909014324716e03, 3.43936767414372164e03, 1.23033935480374942e03], [2.56852019228982242e00, 1.87295284992346047e00, 5.27905102951428412e-1, 6.05183413124413191e-2, 2.33520497626869185e-3]];\n/**\n * Maximum/minimum safe numbers to input to erf() (in ES6+, this number is\n * Number.[MAX|MIN]_SAFE_INTEGER). erf() for all numbers beyond this limit will\n * return 1\n */\n\nvar MAX_NUM = Math.pow(2, 53);","import { format as formatString } from '../../utils/string.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'format';\nvar dependencies = ['typed'];\nexport var createFormat = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Format a value of any type into a string.\n *\n * Syntax:\n *\n * math.format(value)\n * math.format(value, options)\n * math.format(value, precision)\n * math.format(value, callback)\n *\n * Where:\n *\n * - `value: *`\n * The value to be formatted\n * - `options: Object`\n * An object with formatting options. Available options:\n * - `notation: string`\n * Number notation. Choose from:\n * - 'fixed'\n * Always use regular number notation.\n * For example '123.40' and '14000000'\n * - 'exponential'\n * Always use exponential notation.\n * For example '1.234e+2' and '1.4e+7'\n * - 'engineering'\n * Always use engineering notation: always have exponential notation,\n * and select the exponent to be a multiple of 3.\n * For example '123.4e+0' and '14.0e+6'\n * - 'auto' (default)\n * Regular number notation for numbers having an absolute value between\n * `lower` and `upper` bounds, and uses exponential notation elsewhere.\n * Lower bound is included, upper bound is excluded.\n * For example '123.4' and '1.4e7'.\n * - 'bin', 'oct, or 'hex'\n * Format the number using binary, octal, or hexadecimal notation.\n * For example '0b1101' and '0x10fe'.\n * - `wordSize: number`\n * The word size in bits to use for formatting in binary, octal, or\n * hexadecimal notation. To be used only with 'bin', 'oct', or 'hex'\n * values for 'notation' option. When this option is defined the value\n * is formatted as a signed twos complement integer of the given word\n * size and the size suffix is appended to the output.\n * For example format(-1, {notation: 'hex', wordSize: 8}) === '0xffi8'.\n * Default value is undefined.\n * - `precision: number`\n * A number between 0 and 16 to round the digits of the number. In case\n * of notations 'exponential', 'engineering', and 'auto', `precision`\n * defines the total number of significant digits returned.\n * In case of notation 'fixed', `precision` defines the number of\n * significant digits after the decimal point.\n * `precision` is undefined by default.\n * - `lowerExp: number`\n * Exponent determining the lower boundary for formatting a value with\n * an exponent when `notation='auto`. Default value is `-3`.\n * - `upperExp: number`\n * Exponent determining the upper boundary for formatting a value with\n * an exponent when `notation='auto`. Default value is `5`.\n * - `fraction: string`. Available values: 'ratio' (default) or 'decimal'.\n * For example `format(fraction(1, 3))` will output '1/3' when 'ratio' is\n * configured, and will output `0.(3)` when 'decimal' is configured.\n * - `callback: function`\n * A custom formatting function, invoked for all numeric elements in `value`,\n * for example all elements of a matrix, or the real and imaginary\n * parts of a complex number. This callback can be used to override the\n * built-in numeric notation with any type of formatting. Function `callback`\n * is called with `value` as parameter and must return a string.\n *\n * When `value` is an Object:\n *\n * - When the object contains a property `format` being a function, this function\n * is invoked as `value.format(options)` and the result is returned.\n * - When the object has its own `toString` method, this method is invoked\n * and the result is returned.\n * - In other cases the function will loop over all object properties and\n * return JSON object notation like '{\"a\": 2, \"b\": 3}'.\n *\n * When value is a function:\n *\n * - When the function has a property `syntax`, it returns this\n * syntax description.\n * - In other cases, a string `'function'` is returned.\n *\n * Examples:\n *\n * math.format(6.4) // returns '6.4'\n * math.format(1240000) // returns '1.24e6'\n * math.format(1/3) // returns '0.3333333333333333'\n * math.format(1/3, 3) // returns '0.333'\n * math.format(21385, 2) // returns '21000'\n * math.format(12e8, {notation: 'fixed'}) // returns '1200000000'\n * math.format(2.3, {notation: 'fixed', precision: 4}) // returns '2.3000'\n * math.format(52.8, {notation: 'exponential'}) // returns '5.28e+1'\n * math.format(12400,{notation: 'engineering'}) // returns '12.400e+3'\n * math.format(2000, {lowerExp: -2, upperExp: 2}) // returns '2e+3'\n *\n * function formatCurrency(value) {\n * // return currency notation with two digits:\n * return '$' + value.toFixed(2)\n *\n * // you could also use math.format inside the callback:\n * // return '$' + math.format(value, {notation: 'fixed', precision: 2})\n * }\n * math.format([2.1, 3, 0.016], formatCurrency} // returns '[$2.10, $3.00, $0.02]'\n *\n * See also:\n *\n * print\n *\n * @param {*} value Value to be stringified\n * @param {Object | Function | number} [options] Formatting options\n * @return {string} The formatted value\n */\n return typed(name, {\n any: formatString,\n 'any, Object | function | number': formatString\n });\n});","import { factory } from '../../utils/factory.js';\nvar name = 'oct';\nvar dependencies = ['typed', 'format'];\n/**\n * Format a number as octal.\n *\n * Syntax:\n *\n * math.oct(value)\n *\n * Examples:\n *\n * //the following outputs \"0o70\"\n * math.oct(56)\n *\n * See also:\n *\n * bin\n * hex\n *\n * @param {number} value Value to be stringified\n * @param {number} wordSize Optional word size (see `format`)\n * @return {string} The formatted value\n */\n\nexport var createOct = factory(name, dependencies, (_ref) => {\n var {\n typed,\n format\n } = _ref;\n return typed(name, {\n 'number | BigNumber': function numberBigNumber(n) {\n return format(n, {\n notation: 'oct'\n });\n },\n 'number | BigNumber, number': function numberBigNumberNumber(n, wordSize) {\n return format(n, {\n notation: 'oct',\n wordSize: wordSize\n });\n }\n });\n});","import { acosh, asinh, atanh, cosh, sign, sinh, tanh } from '../../utils/number.js';\nvar n1 = 'number';\nvar n2 = 'number, number';\nexport function acosNumber(x) {\n return Math.acos(x);\n}\nacosNumber.signature = n1;\nexport function acoshNumber(x) {\n return acosh(x);\n}\nacoshNumber.signature = n1;\nexport function acotNumber(x) {\n return Math.atan(1 / x);\n}\nacotNumber.signature = n1;\nexport function acothNumber(x) {\n return isFinite(x) ? (Math.log((x + 1) / x) + Math.log(x / (x - 1))) / 2 : 0;\n}\nacothNumber.signature = n1;\nexport function acscNumber(x) {\n return Math.asin(1 / x);\n}\nacscNumber.signature = n1;\nexport function acschNumber(x) {\n var xInv = 1 / x;\n return Math.log(xInv + Math.sqrt(xInv * xInv + 1));\n}\nacschNumber.signature = n1;\nexport function asecNumber(x) {\n return Math.acos(1 / x);\n}\nasecNumber.signature = n1;\nexport function asechNumber(x) {\n var xInv = 1 / x;\n var ret = Math.sqrt(xInv * xInv - 1);\n return Math.log(ret + xInv);\n}\nasechNumber.signature = n1;\nexport function asinNumber(x) {\n return Math.asin(x);\n}\nasinNumber.signature = n1;\nexport function asinhNumber(x) {\n return asinh(x);\n}\nasinhNumber.signature = n1;\nexport function atanNumber(x) {\n return Math.atan(x);\n}\natanNumber.signature = n1;\nexport function atan2Number(y, x) {\n return Math.atan2(y, x);\n}\natan2Number.signature = n2;\nexport function atanhNumber(x) {\n return atanh(x);\n}\natanhNumber.signature = n1;\nexport function cosNumber(x) {\n return Math.cos(x);\n}\ncosNumber.signature = n1;\nexport function coshNumber(x) {\n return cosh(x);\n}\ncoshNumber.signature = n1;\nexport function cotNumber(x) {\n return 1 / Math.tan(x);\n}\ncotNumber.signature = n1;\nexport function cothNumber(x) {\n var e = Math.exp(2 * x);\n return (e + 1) / (e - 1);\n}\ncothNumber.signature = n1;\nexport function cscNumber(x) {\n return 1 / Math.sin(x);\n}\ncscNumber.signature = n1;\nexport function cschNumber(x) {\n // consider values close to zero (+/-)\n if (x === 0) {\n return Number.POSITIVE_INFINITY;\n } else {\n return Math.abs(2 / (Math.exp(x) - Math.exp(-x))) * sign(x);\n }\n}\ncschNumber.signature = n1;\nexport function secNumber(x) {\n return 1 / Math.cos(x);\n}\nsecNumber.signature = n1;\nexport function sechNumber(x) {\n return 2 / (Math.exp(x) + Math.exp(-x));\n}\nsechNumber.signature = n1;\nexport function sinNumber(x) {\n return Math.sin(x);\n}\nsinNumber.signature = n1;\nexport function sinhNumber(x) {\n return sinh(x);\n}\nsinhNumber.signature = n1;\nexport function tanNumber(x) {\n return Math.tan(x);\n}\ntanNumber.signature = n1;\nexport function tanhNumber(x) {\n return tanh(x);\n}\ntanhNumber.signature = n1;","/** @param {number} i\n * @param {number} n\n * @returns {number} product of i to n\n */\nexport function product(i, n) {\n if (n < i) {\n return 1;\n }\n\n if (n === i) {\n return n;\n }\n\n var half = n + i >> 1; // divide (n + i) by 2 and truncate to integer\n\n return product(i, half) * product(half + 1, n);\n}","import { isInteger } from '../../utils/number.js';\nimport { product } from '../../utils/product.js';\nexport function combinationsNumber(n, k) {\n if (!isInteger(n) || n < 0) {\n throw new TypeError('Positive integer value expected in function combinations');\n }\n\n if (!isInteger(k) || k < 0) {\n throw new TypeError('Positive integer value expected in function combinations');\n }\n\n if (k > n) {\n throw new TypeError('k must be less than or equal to n');\n }\n\n var nMinusk = n - k;\n var prodrange;\n\n if (k < nMinusk) {\n prodrange = product(nMinusk + 1, n);\n return prodrange / product(1, k);\n }\n\n prodrange = product(k + 1, n);\n return prodrange / product(1, nMinusk);\n}\ncombinationsNumber.signature = 'number, number';","import seedrandom from 'seedrandom';\nvar singletonRandom = /* #__PURE__ */seedrandom(Date.now());\nexport function createRng(randomSeed) {\n var random; // create a new random generator with given seed\n\n function setSeed(seed) {\n random = seed === null ? singletonRandom : seedrandom(String(seed));\n } // initialize a seeded pseudo random number generator with config's random seed\n\n\n setSeed(randomSeed); // wrapper function so the rng can be updated via generator\n\n function rng() {\n return random();\n }\n\n return rng;\n}","import { factory } from '../../utils/factory.js';\nimport { randomMatrix } from './util/randomMatrix.js';\nimport { createRng } from './util/seededRNG.js';\nimport { isMatrix } from '../../utils/is.js';\nvar name = 'randomInt';\nvar dependencies = ['typed', 'config', '?on'];\nexport var createRandomInt = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n on\n } = _ref;\n // seeded pseudo random number generator\n var rng = createRng(config.randomSeed);\n\n if (on) {\n on('config', function (curr, prev) {\n if (curr.randomSeed !== prev.randomSeed) {\n rng = createRng(curr.randomSeed);\n }\n });\n }\n /**\n * Return a random integer number larger or equal to `min` and smaller than `max`\n * using a uniform distribution.\n *\n * Syntax:\n *\n * math.randomInt() // generate a random integer between 0 and 1\n * math.randomInt(max) // generate a random integer between 0 and max\n * math.randomInt(min, max) // generate a random integer between min and max\n * math.randomInt(size) // generate a matrix with random integer between 0 and 1\n * math.randomInt(size, max) // generate a matrix with random integer between 0 and max\n * math.randomInt(size, min, max) // generate a matrix with random integer between min and max\n *\n * Examples:\n *\n * math.randomInt(100) // returns a random integer between 0 and 100\n * math.randomInt(30, 40) // returns a random integer between 30 and 40\n * math.randomInt([2, 3]) // returns a 2x3 matrix with random integers between 0 and 1\n *\n * See also:\n *\n * random, pickRandom\n *\n * @param {Array | Matrix} [size] If provided, an array or matrix with given\n * size and filled with random values is returned\n * @param {number} [min] Minimum boundary for the random value, included\n * @param {number} [max] Maximum boundary for the random value, excluded\n * @return {number | Array | Matrix} A random integer value\n */\n\n\n return typed(name, {\n '': () => _randomInt(0, 1),\n number: max => _randomInt(0, max),\n 'number, number': (min, max) => _randomInt(min, max),\n 'Array | Matrix': size => _randomIntMatrix(size, 0, 1),\n 'Array | Matrix, number': (size, max) => _randomIntMatrix(size, 0, max),\n 'Array | Matrix, number, number': (size, min, max) => _randomIntMatrix(size, min, max)\n });\n\n function _randomIntMatrix(size, min, max) {\n var res = randomMatrix(size.valueOf(), () => _randomInt(min, max));\n return isMatrix(size) ? size.create(res) : res;\n }\n\n function _randomInt(min, max) {\n return Math.floor(min + rng() * (max - min));\n }\n});","import { factory } from '../../../utils/factory.js';\nimport { deepMap } from '../../../utils/collection.js';\nvar name = 'fraction';\nvar dependencies = ['typed', 'Fraction'];\nexport var createFraction = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n Fraction\n } = _ref;\n\n /**\n * Create a fraction convert a value to a fraction.\n *\n * Syntax:\n * math.fraction(numerator, denominator)\n * math.fraction({n: numerator, d: denominator})\n * math.fraction(matrix: Array | Matrix) Turn all matrix entries\n * into fractions\n *\n * Examples:\n *\n * math.fraction(1, 3)\n * math.fraction('2/3')\n * math.fraction({n: 2, d: 3})\n * math.fraction([0.2, 0.25, 1.25])\n *\n * See also:\n *\n * bignumber, number, string, unit\n *\n * @param {number | string | Fraction | BigNumber | Array | Matrix} [args]\n * Arguments specifying the numerator and denominator of\n * the fraction\n * @return {Fraction | Array | Matrix} Returns a fraction\n */\n return typed('fraction', {\n number: function number(x) {\n if (!isFinite(x) || isNaN(x)) {\n throw new Error(x + ' cannot be represented as a fraction');\n }\n\n return new Fraction(x);\n },\n string: function string(x) {\n return new Fraction(x);\n },\n 'number, number': function numberNumber(numerator, denominator) {\n return new Fraction(numerator, denominator);\n },\n null: function _null(x) {\n return new Fraction(0);\n },\n BigNumber: function BigNumber(x) {\n return new Fraction(x.toString());\n },\n Fraction: function Fraction(x) {\n return x; // fractions are immutable\n },\n Object: function Object(x) {\n return new Fraction(x);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nimport { unaryMinusNumber } from '../../plain/number/index.js';\nvar name = 'unaryMinus';\nvar dependencies = ['typed'];\nexport var createUnaryMinus = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Inverse the sign of a value, apply a unary minus operation.\n *\n * For matrices, the function is evaluated element wise. Boolean values and\n * strings will be converted to a number. For complex numbers, both real and\n * complex value are inverted.\n *\n * Syntax:\n *\n * math.unaryMinus(x)\n *\n * Examples:\n *\n * math.unaryMinus(3.5) // returns -3.5\n * math.unaryMinus(-4.2) // returns 4.2\n *\n * See also:\n *\n * add, subtract, unaryPlus\n *\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} x Number to be inverted.\n * @return {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} Returns the value with inverted sign.\n */\n return typed(name, {\n number: unaryMinusNumber,\n Complex: function Complex(x) {\n return x.neg();\n },\n BigNumber: function BigNumber(x) {\n return x.neg();\n },\n Fraction: function Fraction(x) {\n return x.neg();\n },\n Unit: function Unit(x) {\n var res = x.clone();\n res.value = this(x.value);\n return res;\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since unaryMinus(0) = 0\n return deepMap(x, this, true);\n } // TODO: add support for string\n\n });\n});","import { factory } from '../../utils/factory.js';\nimport { addNumber } from '../../plain/number/index.js';\nvar name = 'addScalar';\nvar dependencies = ['typed'];\nexport var createAddScalar = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Add two scalar values, `x + y`.\n * This function is meant for internal use: it is used by the public function\n * `add`\n *\n * This function does not support collections (Array or Matrix).\n *\n * @param {number | BigNumber | Fraction | Complex | Unit} x First value to add\n * @param {number | BigNumber | Fraction | Complex} y Second value to add\n * @return {number | BigNumber | Fraction | Complex | Unit} Sum of `x` and `y`\n * @private\n */\n return typed(name, {\n 'number, number': addNumber,\n 'Complex, Complex': function ComplexComplex(x, y) {\n return x.add(y);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return x.plus(y);\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return x.add(y);\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n if (x.value === null || x.value === undefined) throw new Error('Parameter x contains a unit with undefined value');\n if (y.value === null || y.value === undefined) throw new Error('Parameter y contains a unit with undefined value');\n if (!x.equalBase(y)) throw new Error('Units do not match');\n var res = x.clone();\n res.value = this(res.value, y.value);\n res.fixPrefix = false;\n return res;\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nvar name = 'conj';\nvar dependencies = ['typed'];\nexport var createConj = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Compute the complex conjugate of a complex value.\n * If `x = a+bi`, the complex conjugate of `x` is `a - bi`.\n *\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.conj(x)\n *\n * Examples:\n *\n * math.conj(math.complex('2 + 3i')) // returns Complex 2 - 3i\n * math.conj(math.complex('2 - 3i')) // returns Complex 2 + 3i\n * math.conj(math.complex('-5.2i')) // returns Complex 5.2i\n *\n * See also:\n *\n * re, im, arg, abs\n *\n * @param {number | BigNumber | Complex | Array | Matrix} x\n * A complex number or array with complex numbers\n * @return {number | BigNumber | Complex | Array | Matrix}\n * The complex conjugate of x\n */\n return typed(name, {\n number: function number(x) {\n return x;\n },\n BigNumber: function BigNumber(x) {\n return x;\n },\n Complex: function Complex(x) {\n return x.conjugate();\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n });\n});","import { factory } from '../../utils/factory.js';\nvar name = 'bin';\nvar dependencies = ['typed', 'format'];\n/**\n * Format a number as binary.\n *\n * Syntax:\n *\n * math.bin(value)\n *\n * Examples:\n *\n * //the following outputs \"0b10\"\n * math.bin(2)\n *\n * See also:\n *\n * oct\n * hex\n *\n * @param {number} value Value to be stringified\n * @param {number} wordSize Optional word size (see `format`)\n * @return {string} The formatted value\n */\n\nexport var createBin = factory(name, dependencies, (_ref) => {\n var {\n typed,\n format\n } = _ref;\n return typed(name, {\n 'number | BigNumber': function numberBigNumber(n) {\n return format(n, {\n notation: 'bin'\n });\n },\n 'number | BigNumber, number': function numberBigNumberNumber(n, wordSize) {\n return format(n, {\n notation: 'bin',\n wordSize: wordSize\n });\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { isMatrix } from '../../utils/is.js';\nimport { createRng } from './util/seededRNG.js';\nimport { randomMatrix } from './util/randomMatrix.js';\nvar name = 'random';\nvar dependencies = ['typed', 'config', '?on'];\nexport var createRandom = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n on\n } = _ref;\n // seeded pseudo random number generator\n var rng = createRng(config.randomSeed);\n\n if (on) {\n on('config', function (curr, prev) {\n if (curr.randomSeed !== prev.randomSeed) {\n rng = createRng(curr.randomSeed);\n }\n });\n }\n /**\n * Return a random number larger or equal to `min` and smaller than `max`\n * using a uniform distribution.\n *\n * Syntax:\n *\n * math.random() // generate a random number between 0 and 1\n * math.random(max) // generate a random number between 0 and max\n * math.random(min, max) // generate a random number between min and max\n * math.random(size) // generate a matrix with random numbers between 0 and 1\n * math.random(size, max) // generate a matrix with random numbers between 0 and max\n * math.random(size, min, max) // generate a matrix with random numbers between min and max\n *\n * Examples:\n *\n * math.random() // returns a random number between 0 and 1\n * math.random(100) // returns a random number between 0 and 100\n * math.random(30, 40) // returns a random number between 30 and 40\n * math.random([2, 3]) // returns a 2x3 matrix with random numbers between 0 and 1\n *\n * See also:\n *\n * randomInt, pickRandom\n *\n * @param {Array | Matrix} [size] If provided, an array or matrix with given\n * size and filled with random values is returned\n * @param {number} [min] Minimum boundary for the random value, included\n * @param {number} [max] Maximum boundary for the random value, excluded\n * @return {number | Array | Matrix} A random number\n */\n\n\n return typed(name, {\n '': () => _random(0, 1),\n number: max => _random(0, max),\n 'number, number': (min, max) => _random(min, max),\n 'Array | Matrix': size => _randomMatrix(size, 0, 1),\n 'Array | Matrix, number': (size, max) => _randomMatrix(size, 0, max),\n 'Array | Matrix, number, number': (size, min, max) => _randomMatrix(size, min, max)\n });\n\n function _randomMatrix(size, min, max) {\n var res = randomMatrix(size.valueOf(), () => _random(min, max));\n return isMatrix(size) ? size.create(res) : res;\n }\n\n function _random(min, max) {\n return min + rng() * (max - min);\n }\n}); // number only implementation of random, no matrix support\n// TODO: there is quite some duplicate code in both createRandom and createRandomNumber, can we improve that?\n\nexport var createRandomNumber = /* #__PURE__ */factory(name, ['typed', 'config', '?on'], (_ref2) => {\n var {\n typed,\n config,\n on,\n matrix\n } = _ref2;\n // seeded pseudo random number generator1\n var rng = createRng(config.randomSeed);\n\n if (on) {\n on('config', function (curr, prev) {\n if (curr.randomSeed !== prev.randomSeed) {\n rng = createRng(curr.randomSeed);\n }\n });\n }\n\n return typed(name, {\n '': () => _random(0, 1),\n number: max => _random(0, max),\n 'number, number': (min, max) => _random(min, max)\n });\n\n function _random(min, max) {\n return min + rng() * (max - min);\n }\n});","import { isArray, isBigNumber, isCollection, isIndex, isMatrix, isNumber, isString, typeOf } from '../../utils/is.js';\nimport { isInteger } from '../../utils/number.js';\nimport { format } from '../../utils/string.js';\nimport { clone, deepStrictEqual } from '../../utils/object.js';\nimport { arraySize, getArrayDataType, processSizesWildcard, unsqueeze, validateIndex } from '../../utils/array.js';\nimport { factory } from '../../utils/factory.js';\nimport { DimensionError } from '../../error/DimensionError.js';\nvar name = 'SparseMatrix';\nvar dependencies = ['typed', 'equalScalar', 'Matrix'];\nexport var createSparseMatrixClass = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n equalScalar,\n Matrix\n } = _ref;\n\n /**\n * Sparse Matrix implementation. This type implements a Compressed Column Storage format\n * for sparse matrices.\n * @class SparseMatrix\n */\n function SparseMatrix(data, datatype) {\n if (!(this instanceof SparseMatrix)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n if (datatype && !isString(datatype)) {\n throw new Error('Invalid datatype: ' + datatype);\n }\n\n if (isMatrix(data)) {\n // create from matrix\n _createFromMatrix(this, data, datatype);\n } else if (data && isArray(data.index) && isArray(data.ptr) && isArray(data.size)) {\n // initialize fields\n this._values = data.values;\n this._index = data.index;\n this._ptr = data.ptr;\n this._size = data.size;\n this._datatype = datatype || data.datatype;\n } else if (isArray(data)) {\n // create from array\n _createFromArray(this, data, datatype);\n } else if (data) {\n // unsupported type\n throw new TypeError('Unsupported type of data (' + typeOf(data) + ')');\n } else {\n // nothing provided\n this._values = [];\n this._index = [];\n this._ptr = [0];\n this._size = [0, 0];\n this._datatype = datatype;\n }\n }\n\n function _createFromMatrix(matrix, source, datatype) {\n // check matrix type\n if (source.type === 'SparseMatrix') {\n // clone arrays\n matrix._values = source._values ? clone(source._values) : undefined;\n matrix._index = clone(source._index);\n matrix._ptr = clone(source._ptr);\n matrix._size = clone(source._size);\n matrix._datatype = datatype || source._datatype;\n } else {\n // build from matrix data\n _createFromArray(matrix, source.valueOf(), datatype || source._datatype);\n }\n }\n\n function _createFromArray(matrix, data, datatype) {\n // initialize fields\n matrix._values = [];\n matrix._index = [];\n matrix._ptr = [];\n matrix._datatype = datatype; // discover rows & columns, do not use math.size() to avoid looping array twice\n\n var rows = data.length;\n var columns = 0; // equal signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0;\n\n if (isString(datatype)) {\n // find signature that matches (datatype, datatype)\n eq = typed.find(equalScalar, [datatype, datatype]) || equalScalar; // convert 0 to the same datatype\n\n zero = typed.convert(0, datatype);\n } // check we have rows (empty array)\n\n\n if (rows > 0) {\n // column index\n var j = 0;\n\n do {\n // store pointer to values index\n matrix._ptr.push(matrix._index.length); // loop rows\n\n\n for (var i = 0; i < rows; i++) {\n // current row\n var row = data[i]; // check row is an array\n\n if (isArray(row)) {\n // update columns if needed (only on first column)\n if (j === 0 && columns < row.length) {\n columns = row.length;\n } // check row has column\n\n\n if (j < row.length) {\n // value\n var v = row[j]; // check value != 0\n\n if (!eq(v, zero)) {\n // store value\n matrix._values.push(v); // index\n\n\n matrix._index.push(i);\n }\n }\n } else {\n // update columns if needed (only on first column)\n if (j === 0 && columns < 1) {\n columns = 1;\n } // check value != 0 (row is a scalar)\n\n\n if (!eq(row, zero)) {\n // store value\n matrix._values.push(row); // index\n\n\n matrix._index.push(i);\n }\n }\n } // increment index\n\n\n j++;\n } while (j < columns);\n } // store number of values in ptr\n\n\n matrix._ptr.push(matrix._index.length); // size\n\n\n matrix._size = [rows, columns];\n }\n\n SparseMatrix.prototype = new Matrix();\n /**\n * Create a new SparseMatrix\n */\n\n SparseMatrix.prototype.createSparseMatrix = function (data, datatype) {\n return new SparseMatrix(data, datatype);\n };\n /**\n * Attach type information\n */\n\n\n SparseMatrix.prototype.type = 'SparseMatrix';\n SparseMatrix.prototype.isSparseMatrix = true;\n /**\n * Get the matrix type\n *\n * Usage:\n * const matrixType = matrix.getDataType() // retrieves the matrix type\n *\n * @memberOf SparseMatrix\n * @return {string} type information; if multiple types are found from the Matrix, it will return \"mixed\"\n */\n\n SparseMatrix.prototype.getDataType = function () {\n return getArrayDataType(this._values, typeOf);\n };\n /**\n * Get the storage format used by the matrix.\n *\n * Usage:\n * const format = matrix.storage() // retrieve storage format\n *\n * @memberof SparseMatrix\n * @return {string} The storage format.\n */\n\n\n SparseMatrix.prototype.storage = function () {\n return 'sparse';\n };\n /**\n * Get the datatype of the data stored in the matrix.\n *\n * Usage:\n * const format = matrix.datatype() // retrieve matrix datatype\n *\n * @memberof SparseMatrix\n * @return {string} The datatype.\n */\n\n\n SparseMatrix.prototype.datatype = function () {\n return this._datatype;\n };\n /**\n * Create a new SparseMatrix\n * @memberof SparseMatrix\n * @param {Array} data\n * @param {string} [datatype]\n */\n\n\n SparseMatrix.prototype.create = function (data, datatype) {\n return new SparseMatrix(data, datatype);\n };\n /**\n * Get the matrix density.\n *\n * Usage:\n * const density = matrix.density() // retrieve matrix density\n *\n * @memberof SparseMatrix\n * @return {number} The matrix density.\n */\n\n\n SparseMatrix.prototype.density = function () {\n // rows & columns\n var rows = this._size[0];\n var columns = this._size[1]; // calculate density\n\n return rows !== 0 && columns !== 0 ? this._index.length / (rows * columns) : 0;\n };\n /**\n * Get a subset of the matrix, or replace a subset of the matrix.\n *\n * Usage:\n * const subset = matrix.subset(index) // retrieve subset\n * const value = matrix.subset(index, replacement) // replace subset\n *\n * @memberof SparseMatrix\n * @param {Index} index\n * @param {Array | Matrix | *} [replacement]\n * @param {*} [defaultValue=0] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be filled with zeros.\n */\n\n\n SparseMatrix.prototype.subset = function (index, replacement, defaultValue) {\n // check it is a pattern matrix\n if (!this._values) {\n throw new Error('Cannot invoke subset on a Pattern only matrix');\n } // check arguments\n\n\n switch (arguments.length) {\n case 1:\n return _getsubset(this, index);\n // intentional fall through\n\n case 2:\n case 3:\n return _setsubset(this, index, replacement, defaultValue);\n\n default:\n throw new SyntaxError('Wrong number of arguments');\n }\n };\n\n function _getsubset(matrix, idx) {\n // check idx\n if (!isIndex(idx)) {\n throw new TypeError('Invalid index');\n }\n\n var isScalar = idx.isScalar();\n\n if (isScalar) {\n // return a scalar\n return matrix.get(idx.min());\n } // validate dimensions\n\n\n var size = idx.size();\n\n if (size.length !== matrix._size.length) {\n throw new DimensionError(size.length, matrix._size.length);\n } // vars\n\n\n var i, ii, k, kk; // validate if any of the ranges in the index is out of range\n\n var min = idx.min();\n var max = idx.max();\n\n for (i = 0, ii = matrix._size.length; i < ii; i++) {\n validateIndex(min[i], matrix._size[i]);\n validateIndex(max[i], matrix._size[i]);\n } // matrix arrays\n\n\n var mvalues = matrix._values;\n var mindex = matrix._index;\n var mptr = matrix._ptr; // rows & columns dimensions for result matrix\n\n var rows = idx.dimension(0);\n var columns = idx.dimension(1); // workspace & permutation vector\n\n var w = [];\n var pv = []; // loop rows in resulting matrix\n\n rows.forEach(function (i, r) {\n // update permutation vector\n pv[i] = r[0]; // mark i in workspace\n\n w[i] = true;\n }); // result matrix arrays\n\n var values = mvalues ? [] : undefined;\n var index = [];\n var ptr = []; // loop columns in result matrix\n\n columns.forEach(function (j) {\n // update ptr\n ptr.push(index.length); // loop values in column j\n\n for (k = mptr[j], kk = mptr[j + 1]; k < kk; k++) {\n // row\n i = mindex[k]; // check row is in result matrix\n\n if (w[i] === true) {\n // push index\n index.push(pv[i]); // check we need to process values\n\n if (values) {\n values.push(mvalues[k]);\n }\n }\n }\n }); // update ptr\n\n ptr.push(index.length); // return matrix\n\n return new SparseMatrix({\n values: values,\n index: index,\n ptr: ptr,\n size: size,\n datatype: matrix._datatype\n });\n }\n\n function _setsubset(matrix, index, submatrix, defaultValue) {\n // check index\n if (!index || index.isIndex !== true) {\n throw new TypeError('Invalid index');\n } // get index size and check whether the index contains a single value\n\n\n var iSize = index.size();\n var isScalar = index.isScalar(); // calculate the size of the submatrix, and convert it into an Array if needed\n\n var sSize;\n\n if (isMatrix(submatrix)) {\n // submatrix size\n sSize = submatrix.size(); // use array representation\n\n submatrix = submatrix.toArray();\n } else {\n // get submatrix size (array, scalar)\n sSize = arraySize(submatrix);\n } // check index is a scalar\n\n\n if (isScalar) {\n // verify submatrix is a scalar\n if (sSize.length !== 0) {\n throw new TypeError('Scalar expected');\n } // set value\n\n\n matrix.set(index.min(), submatrix, defaultValue);\n } else {\n // validate dimensions, index size must be one or two dimensions\n if (iSize.length !== 1 && iSize.length !== 2) {\n throw new DimensionError(iSize.length, matrix._size.length, '<');\n } // check submatrix and index have the same dimensions\n\n\n if (sSize.length < iSize.length) {\n // calculate number of missing outer dimensions\n var i = 0;\n var outer = 0;\n\n while (iSize[i] === 1 && sSize[i] === 1) {\n i++;\n }\n\n while (iSize[i] === 1) {\n outer++;\n i++;\n } // unsqueeze both outer and inner dimensions\n\n\n submatrix = unsqueeze(submatrix, iSize.length, outer, sSize);\n } // check whether the size of the submatrix matches the index size\n\n\n if (!deepStrictEqual(iSize, sSize)) {\n throw new DimensionError(iSize, sSize, '>');\n } // offsets\n\n\n var x0 = index.min()[0];\n var y0 = index.min()[1]; // submatrix rows and columns\n\n var m = sSize[0];\n var n = sSize[1]; // loop submatrix\n\n for (var x = 0; x < m; x++) {\n // loop columns\n for (var y = 0; y < n; y++) {\n // value at i, j\n var v = submatrix[x][y]; // invoke set (zero value will remove entry from matrix)\n\n matrix.set([x + x0, y + y0], v, defaultValue);\n }\n }\n }\n\n return matrix;\n }\n /**\n * Get a single element from the matrix.\n * @memberof SparseMatrix\n * @param {number[]} index Zero-based index\n * @return {*} value\n */\n\n\n SparseMatrix.prototype.get = function (index) {\n if (!isArray(index)) {\n throw new TypeError('Array expected');\n }\n\n if (index.length !== this._size.length) {\n throw new DimensionError(index.length, this._size.length);\n } // check it is a pattern matrix\n\n\n if (!this._values) {\n throw new Error('Cannot invoke get on a Pattern only matrix');\n } // row and column\n\n\n var i = index[0];\n var j = index[1]; // check i, j are valid\n\n validateIndex(i, this._size[0]);\n validateIndex(j, this._size[1]); // find value index\n\n var k = _getValueIndex(i, this._ptr[j], this._ptr[j + 1], this._index); // check k is prior to next column k and it is in the correct row\n\n\n if (k < this._ptr[j + 1] && this._index[k] === i) {\n return this._values[k];\n }\n\n return 0;\n };\n /**\n * Replace a single element in the matrix.\n * @memberof SparseMatrix\n * @param {number[]} index Zero-based index\n * @param {*} v\n * @param {*} [defaultValue] Default value, filled in on new entries when\n * the matrix is resized. If not provided,\n * new matrix elements will be set to zero.\n * @return {SparseMatrix} self\n */\n\n\n SparseMatrix.prototype.set = function (index, v, defaultValue) {\n if (!isArray(index)) {\n throw new TypeError('Array expected');\n }\n\n if (index.length !== this._size.length) {\n throw new DimensionError(index.length, this._size.length);\n } // check it is a pattern matrix\n\n\n if (!this._values) {\n throw new Error('Cannot invoke set on a Pattern only matrix');\n } // row and column\n\n\n var i = index[0];\n var j = index[1]; // rows & columns\n\n var rows = this._size[0];\n var columns = this._size[1]; // equal signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0;\n\n if (isString(this._datatype)) {\n // find signature that matches (datatype, datatype)\n eq = typed.find(equalScalar, [this._datatype, this._datatype]) || equalScalar; // convert 0 to the same datatype\n\n zero = typed.convert(0, this._datatype);\n } // check we need to resize matrix\n\n\n if (i > rows - 1 || j > columns - 1) {\n // resize matrix\n _resize(this, Math.max(i + 1, rows), Math.max(j + 1, columns), defaultValue); // update rows & columns\n\n\n rows = this._size[0];\n columns = this._size[1];\n } // check i, j are valid\n\n\n validateIndex(i, rows);\n validateIndex(j, columns); // find value index\n\n var k = _getValueIndex(i, this._ptr[j], this._ptr[j + 1], this._index); // check k is prior to next column k and it is in the correct row\n\n\n if (k < this._ptr[j + 1] && this._index[k] === i) {\n // check value != 0\n if (!eq(v, zero)) {\n // update value\n this._values[k] = v;\n } else {\n // remove value from matrix\n _remove(k, j, this._values, this._index, this._ptr);\n }\n } else {\n // insert value @ (i, j)\n _insert(k, i, j, v, this._values, this._index, this._ptr);\n }\n\n return this;\n };\n\n function _getValueIndex(i, top, bottom, index) {\n // check row is on the bottom side\n if (bottom - top === 0) {\n return bottom;\n } // loop rows [top, bottom[\n\n\n for (var r = top; r < bottom; r++) {\n // check we found value index\n if (index[r] === i) {\n return r;\n }\n } // we did not find row\n\n\n return top;\n }\n\n function _remove(k, j, values, index, ptr) {\n // remove value @ k\n values.splice(k, 1);\n index.splice(k, 1); // update pointers\n\n for (var x = j + 1; x < ptr.length; x++) {\n ptr[x]--;\n }\n }\n\n function _insert(k, i, j, v, values, index, ptr) {\n // insert value\n values.splice(k, 0, v); // update row for k\n\n index.splice(k, 0, i); // update column pointers\n\n for (var x = j + 1; x < ptr.length; x++) {\n ptr[x]++;\n }\n }\n /**\n * Resize the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (resize in place).\n *\n * @memberof SparseMatrix\n * @param {number[] | Matrix} size The new size the matrix should have.\n * @param {*} [defaultValue=0] Default value, filled in on new entries.\n * If not provided, the matrix elements will\n * be filled with zeros.\n * @param {boolean} [copy] Return a resized copy of the matrix\n *\n * @return {Matrix} The resized matrix\n */\n\n\n SparseMatrix.prototype.resize = function (size, defaultValue, copy) {\n // validate arguments\n if (!isCollection(size)) {\n throw new TypeError('Array or Matrix expected');\n } // SparseMatrix input is always 2d, flatten this into 1d if it's indeed a vector\n\n\n var sizeArray = size.valueOf().map(value => {\n return Array.isArray(value) && value.length === 1 ? value[0] : value;\n });\n\n if (sizeArray.length !== 2) {\n throw new Error('Only two dimensions matrix are supported');\n } // check sizes\n\n\n sizeArray.forEach(function (value) {\n if (!isNumber(value) || !isInteger(value) || value < 0) {\n throw new TypeError('Invalid size, must contain positive integers ' + '(size: ' + format(sizeArray) + ')');\n }\n }); // matrix to resize\n\n var m = copy ? this.clone() : this; // resize matrix\n\n return _resize(m, sizeArray[0], sizeArray[1], defaultValue);\n };\n\n function _resize(matrix, rows, columns, defaultValue) {\n // value to insert at the time of growing matrix\n var value = defaultValue || 0; // equal signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0;\n\n if (isString(matrix._datatype)) {\n // find signature that matches (datatype, datatype)\n eq = typed.find(equalScalar, [matrix._datatype, matrix._datatype]) || equalScalar; // convert 0 to the same datatype\n\n zero = typed.convert(0, matrix._datatype); // convert value to the same datatype\n\n value = typed.convert(value, matrix._datatype);\n } // should we insert the value?\n\n\n var ins = !eq(value, zero); // old columns and rows\n\n var r = matrix._size[0];\n var c = matrix._size[1];\n var i, j, k; // check we need to increase columns\n\n if (columns > c) {\n // loop new columns\n for (j = c; j < columns; j++) {\n // update matrix._ptr for current column\n matrix._ptr[j] = matrix._values.length; // check we need to insert matrix._values\n\n if (ins) {\n // loop rows\n for (i = 0; i < r; i++) {\n // add new matrix._values\n matrix._values.push(value); // update matrix._index\n\n\n matrix._index.push(i);\n }\n }\n } // store number of matrix._values in matrix._ptr\n\n\n matrix._ptr[columns] = matrix._values.length;\n } else if (columns < c) {\n // truncate matrix._ptr\n matrix._ptr.splice(columns + 1, c - columns); // truncate matrix._values and matrix._index\n\n\n matrix._values.splice(matrix._ptr[columns], matrix._values.length);\n\n matrix._index.splice(matrix._ptr[columns], matrix._index.length);\n } // update columns\n\n\n c = columns; // check we need to increase rows\n\n if (rows > r) {\n // check we have to insert values\n if (ins) {\n // inserts\n var n = 0; // loop columns\n\n for (j = 0; j < c; j++) {\n // update matrix._ptr for current column\n matrix._ptr[j] = matrix._ptr[j] + n; // where to insert matrix._values\n\n k = matrix._ptr[j + 1] + n; // pointer\n\n var p = 0; // loop new rows, initialize pointer\n\n for (i = r; i < rows; i++, p++) {\n // add value\n matrix._values.splice(k + p, 0, value); // update matrix._index\n\n\n matrix._index.splice(k + p, 0, i); // increment inserts\n\n\n n++;\n }\n } // store number of matrix._values in matrix._ptr\n\n\n matrix._ptr[c] = matrix._values.length;\n }\n } else if (rows < r) {\n // deletes\n var d = 0; // loop columns\n\n for (j = 0; j < c; j++) {\n // update matrix._ptr for current column\n matrix._ptr[j] = matrix._ptr[j] - d; // where matrix._values start for next column\n\n var k0 = matrix._ptr[j];\n var k1 = matrix._ptr[j + 1] - d; // loop matrix._index\n\n for (k = k0; k < k1; k++) {\n // row\n i = matrix._index[k]; // check we need to delete value and matrix._index\n\n if (i > rows - 1) {\n // remove value\n matrix._values.splice(k, 1); // remove item from matrix._index\n\n\n matrix._index.splice(k, 1); // increase deletes\n\n\n d++;\n }\n }\n } // update matrix._ptr for current column\n\n\n matrix._ptr[j] = matrix._values.length;\n } // update matrix._size\n\n\n matrix._size[0] = rows;\n matrix._size[1] = columns; // return matrix\n\n return matrix;\n }\n /**\n * Reshape the matrix to the given size. Returns a copy of the matrix when\n * `copy=true`, otherwise return the matrix itself (reshape in place).\n *\n * NOTE: This might be better suited to copy by default, instead of modifying\n * in place. For now, it operates in place to remain consistent with\n * resize().\n *\n * @memberof SparseMatrix\n * @param {number[]} sizes The new size the matrix should have.\n * @param {boolean} [copy] Return a reshaped copy of the matrix\n *\n * @return {Matrix} The reshaped matrix\n */\n\n\n SparseMatrix.prototype.reshape = function (sizes, copy) {\n // validate arguments\n if (!isArray(sizes)) {\n throw new TypeError('Array expected');\n }\n\n if (sizes.length !== 2) {\n throw new Error('Sparse matrices can only be reshaped in two dimensions');\n } // check sizes\n\n\n sizes.forEach(function (value) {\n if (!isNumber(value) || !isInteger(value) || value <= -2 || value === 0) {\n throw new TypeError('Invalid size, must contain positive integers or -1 ' + '(size: ' + format(sizes) + ')');\n }\n });\n var currentLength = this._size[0] * this._size[1];\n sizes = processSizesWildcard(sizes, currentLength);\n var newLength = sizes[0] * sizes[1]; // m * n must not change\n\n if (currentLength !== newLength) {\n throw new Error('Reshaping sparse matrix will result in the wrong number of elements');\n } // matrix to reshape\n\n\n var m = copy ? this.clone() : this; // return unchanged if the same shape\n\n if (this._size[0] === sizes[0] && this._size[1] === sizes[1]) {\n return m;\n } // Convert to COO format (generate a column index)\n\n\n var colIndex = [];\n\n for (var i = 0; i < m._ptr.length; i++) {\n for (var j = 0; j < m._ptr[i + 1] - m._ptr[i]; j++) {\n colIndex.push(i);\n }\n } // Clone the values array\n\n\n var values = m._values.slice(); // Clone the row index array\n\n\n var rowIndex = m._index.slice(); // Transform the (row, column) indices\n\n\n for (var _i = 0; _i < m._index.length; _i++) {\n var r1 = rowIndex[_i];\n var c1 = colIndex[_i];\n var flat = r1 * m._size[1] + c1;\n colIndex[_i] = flat % sizes[1];\n rowIndex[_i] = Math.floor(flat / sizes[1]);\n } // Now reshaping is supposed to preserve the row-major order, BUT these sparse matrices are stored\n // in column-major order, so we have to reorder the value array now. One option is to use a multisort,\n // sorting several arrays based on some other array.\n // OR, we could easily just:\n // 1. Remove all values from the matrix\n\n\n m._values.length = 0;\n m._index.length = 0;\n m._ptr.length = sizes[1] + 1;\n m._size = sizes.slice();\n\n for (var _i2 = 0; _i2 < m._ptr.length; _i2++) {\n m._ptr[_i2] = 0;\n } // 2. Re-insert all elements in the proper order (simplified code from SparseMatrix.prototype.set)\n // This step is probably the most time-consuming\n\n\n for (var h = 0; h < values.length; h++) {\n var _i3 = rowIndex[h];\n var _j = colIndex[h];\n var v = values[h];\n\n var k = _getValueIndex(_i3, m._ptr[_j], m._ptr[_j + 1], m._index);\n\n _insert(k, _i3, _j, v, m._values, m._index, m._ptr);\n } // The value indices are inserted out of order, but apparently that's... still OK?\n\n\n return m;\n };\n /**\n * Create a clone of the matrix\n * @memberof SparseMatrix\n * @return {SparseMatrix} clone\n */\n\n\n SparseMatrix.prototype.clone = function () {\n var m = new SparseMatrix({\n values: this._values ? clone(this._values) : undefined,\n index: clone(this._index),\n ptr: clone(this._ptr),\n size: clone(this._size),\n datatype: this._datatype\n });\n return m;\n };\n /**\n * Retrieve the size of the matrix.\n * @memberof SparseMatrix\n * @returns {number[]} size\n */\n\n\n SparseMatrix.prototype.size = function () {\n return this._size.slice(0); // copy the Array\n };\n /**\n * Create a new matrix with the results of the callback function executed on\n * each entry of the matrix.\n * @memberof SparseMatrix\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n * @param {boolean} [skipZeros] Invoke callback function for non-zero values only.\n *\n * @return {SparseMatrix} matrix\n */\n\n\n SparseMatrix.prototype.map = function (callback, skipZeros) {\n // check it is a pattern matrix\n if (!this._values) {\n throw new Error('Cannot invoke map on a Pattern only matrix');\n } // matrix instance\n\n\n var me = this; // rows and columns\n\n var rows = this._size[0];\n var columns = this._size[1]; // invoke callback\n\n var invoke = function invoke(v, i, j) {\n // invoke callback\n return callback(v, [i, j], me);\n }; // invoke _map\n\n\n return _map(this, 0, rows - 1, 0, columns - 1, invoke, skipZeros);\n };\n /**\n * Create a new matrix with the results of the callback function executed on the interval\n * [minRow..maxRow, minColumn..maxColumn].\n */\n\n\n function _map(matrix, minRow, maxRow, minColumn, maxColumn, callback, skipZeros) {\n // result arrays\n var values = [];\n var index = [];\n var ptr = []; // equal signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0;\n\n if (isString(matrix._datatype)) {\n // find signature that matches (datatype, datatype)\n eq = typed.find(equalScalar, [matrix._datatype, matrix._datatype]) || equalScalar; // convert 0 to the same datatype\n\n zero = typed.convert(0, matrix._datatype);\n } // invoke callback\n\n\n var invoke = function invoke(v, x, y) {\n // invoke callback\n v = callback(v, x, y); // check value != 0\n\n if (!eq(v, zero)) {\n // store value\n values.push(v); // index\n\n index.push(x);\n }\n }; // loop columns\n\n\n for (var j = minColumn; j <= maxColumn; j++) {\n // store pointer to values index\n ptr.push(values.length); // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]\n\n var k0 = matrix._ptr[j];\n var k1 = matrix._ptr[j + 1];\n\n if (skipZeros) {\n // loop k within [k0, k1[\n for (var k = k0; k < k1; k++) {\n // row index\n var i = matrix._index[k]; // check i is in range\n\n if (i >= minRow && i <= maxRow) {\n // value @ k\n invoke(matrix._values[k], i - minRow, j - minColumn);\n }\n }\n } else {\n // create a cache holding all defined values\n var _values = {};\n\n for (var _k = k0; _k < k1; _k++) {\n var _i4 = matrix._index[_k];\n _values[_i4] = matrix._values[_k];\n } // loop over all rows (indexes can be unordered so we can't use that),\n // and either read the value or zero\n\n\n for (var _i5 = minRow; _i5 <= maxRow; _i5++) {\n var value = _i5 in _values ? _values[_i5] : 0;\n invoke(value, _i5 - minRow, j - minColumn);\n }\n }\n } // store number of values in ptr\n\n\n ptr.push(values.length); // return sparse matrix\n\n return new SparseMatrix({\n values: values,\n index: index,\n ptr: ptr,\n size: [maxRow - minRow + 1, maxColumn - minColumn + 1]\n });\n }\n /**\n * Execute a callback function on each entry of the matrix.\n * @memberof SparseMatrix\n * @param {Function} callback The callback function is invoked with three\n * parameters: the value of the element, the index\n * of the element, and the Matrix being traversed.\n * @param {boolean} [skipZeros] Invoke callback function for non-zero values only.\n */\n\n\n SparseMatrix.prototype.forEach = function (callback, skipZeros) {\n // check it is a pattern matrix\n if (!this._values) {\n throw new Error('Cannot invoke forEach on a Pattern only matrix');\n } // matrix instance\n\n\n var me = this; // rows and columns\n\n var rows = this._size[0];\n var columns = this._size[1]; // loop columns\n\n for (var j = 0; j < columns; j++) {\n // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]\n var k0 = this._ptr[j];\n var k1 = this._ptr[j + 1];\n\n if (skipZeros) {\n // loop k within [k0, k1[\n for (var k = k0; k < k1; k++) {\n // row index\n var i = this._index[k]; // value @ k\n\n callback(this._values[k], [i, j], me);\n }\n } else {\n // create a cache holding all defined values\n var values = {};\n\n for (var _k2 = k0; _k2 < k1; _k2++) {\n var _i6 = this._index[_k2];\n values[_i6] = this._values[_k2];\n } // loop over all rows (indexes can be unordered so we can't use that),\n // and either read the value or zero\n\n\n for (var _i7 = 0; _i7 < rows; _i7++) {\n var value = _i7 in values ? values[_i7] : 0;\n callback(value, [_i7, j], me);\n }\n }\n }\n };\n /**\n * Create an Array with a copy of the data of the SparseMatrix\n * @memberof SparseMatrix\n * @returns {Array} array\n */\n\n\n SparseMatrix.prototype.toArray = function () {\n return _toArray(this._values, this._index, this._ptr, this._size, true);\n };\n /**\n * Get the primitive value of the SparseMatrix: a two dimensions array\n * @memberof SparseMatrix\n * @returns {Array} array\n */\n\n\n SparseMatrix.prototype.valueOf = function () {\n return _toArray(this._values, this._index, this._ptr, this._size, false);\n };\n\n function _toArray(values, index, ptr, size, copy) {\n // rows and columns\n var rows = size[0];\n var columns = size[1]; // result\n\n var a = []; // vars\n\n var i, j; // initialize array\n\n for (i = 0; i < rows; i++) {\n a[i] = [];\n\n for (j = 0; j < columns; j++) {\n a[i][j] = 0;\n }\n } // loop columns\n\n\n for (j = 0; j < columns; j++) {\n // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]\n var k0 = ptr[j];\n var k1 = ptr[j + 1]; // loop k within [k0, k1[\n\n for (var k = k0; k < k1; k++) {\n // row index\n i = index[k]; // set value (use one for pattern matrix)\n\n a[i][j] = values ? copy ? clone(values[k]) : values[k] : 1;\n }\n }\n\n return a;\n }\n /**\n * Get a string representation of the matrix, with optional formatting options.\n * @memberof SparseMatrix\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @returns {string} str\n */\n\n\n SparseMatrix.prototype.format = function (options) {\n // rows and columns\n var rows = this._size[0];\n var columns = this._size[1]; // density\n\n var density = this.density(); // rows & columns\n\n var str = 'Sparse Matrix [' + format(rows, options) + ' x ' + format(columns, options) + '] density: ' + format(density, options) + '\\n'; // loop columns\n\n for (var j = 0; j < columns; j++) {\n // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]\n var k0 = this._ptr[j];\n var k1 = this._ptr[j + 1]; // loop k within [k0, k1[\n\n for (var k = k0; k < k1; k++) {\n // row index\n var i = this._index[k]; // append value\n\n str += '\\n (' + format(i, options) + ', ' + format(j, options) + ') ==> ' + (this._values ? format(this._values[k], options) : 'X');\n }\n }\n\n return str;\n };\n /**\n * Get a string representation of the matrix\n * @memberof SparseMatrix\n * @returns {string} str\n */\n\n\n SparseMatrix.prototype.toString = function () {\n return format(this.toArray());\n };\n /**\n * Get a JSON representation of the matrix\n * @memberof SparseMatrix\n * @returns {Object}\n */\n\n\n SparseMatrix.prototype.toJSON = function () {\n return {\n mathjs: 'SparseMatrix',\n values: this._values,\n index: this._index,\n ptr: this._ptr,\n size: this._size,\n datatype: this._datatype\n };\n };\n /**\n * Get the kth Matrix diagonal.\n *\n * @memberof SparseMatrix\n * @param {number | BigNumber} [k=0] The kth diagonal where the vector will retrieved.\n *\n * @returns {Matrix} The matrix vector with the diagonal values.\n */\n\n\n SparseMatrix.prototype.diagonal = function (k) {\n // validate k if any\n if (k) {\n // convert BigNumber to a number\n if (isBigNumber(k)) {\n k = k.toNumber();\n } // is must be an integer\n\n\n if (!isNumber(k) || !isInteger(k)) {\n throw new TypeError('The parameter k must be an integer number');\n }\n } else {\n // default value\n k = 0;\n }\n\n var kSuper = k > 0 ? k : 0;\n var kSub = k < 0 ? -k : 0; // rows & columns\n\n var rows = this._size[0];\n var columns = this._size[1]; // number diagonal values\n\n var n = Math.min(rows - kSub, columns - kSuper); // diagonal arrays\n\n var values = [];\n var index = [];\n var ptr = []; // initial ptr value\n\n ptr[0] = 0; // loop columns\n\n for (var j = kSuper; j < columns && values.length < n; j++) {\n // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]\n var k0 = this._ptr[j];\n var k1 = this._ptr[j + 1]; // loop x within [k0, k1[\n\n for (var x = k0; x < k1; x++) {\n // row index\n var i = this._index[x]; // check row\n\n if (i === j - kSuper + kSub) {\n // value on this column\n values.push(this._values[x]); // store row\n\n index[values.length - 1] = i - kSub; // exit loop\n\n break;\n }\n }\n } // close ptr\n\n\n ptr.push(values.length); // return matrix\n\n return new SparseMatrix({\n values: values,\n index: index,\n ptr: ptr,\n size: [n, 1]\n });\n };\n /**\n * Generate a matrix from a JSON object\n * @memberof SparseMatrix\n * @param {Object} json An object structured like\n * `{\"mathjs\": \"SparseMatrix\", \"values\": [], \"index\": [], \"ptr\": [], \"size\": []}`,\n * where mathjs is optional\n * @returns {SparseMatrix}\n */\n\n\n SparseMatrix.fromJSON = function (json) {\n return new SparseMatrix(json);\n };\n /**\n * Create a diagonal matrix.\n *\n * @memberof SparseMatrix\n * @param {Array} size The matrix size.\n * @param {number | Array | Matrix } value The values for the diagonal.\n * @param {number | BigNumber} [k=0] The kth diagonal where the vector will be filled in.\n * @param {number} [defaultValue] The default value for non-diagonal\n * @param {string} [datatype] The Matrix datatype, values must be of this datatype.\n *\n * @returns {SparseMatrix}\n */\n\n\n SparseMatrix.diagonal = function (size, value, k, defaultValue, datatype) {\n if (!isArray(size)) {\n throw new TypeError('Array expected, size parameter');\n }\n\n if (size.length !== 2) {\n throw new Error('Only two dimensions matrix are supported');\n } // map size & validate\n\n\n size = size.map(function (s) {\n // check it is a big number\n if (isBigNumber(s)) {\n // convert it\n s = s.toNumber();\n } // validate arguments\n\n\n if (!isNumber(s) || !isInteger(s) || s < 1) {\n throw new Error('Size values must be positive integers');\n }\n\n return s;\n }); // validate k if any\n\n if (k) {\n // convert BigNumber to a number\n if (isBigNumber(k)) {\n k = k.toNumber();\n } // is must be an integer\n\n\n if (!isNumber(k) || !isInteger(k)) {\n throw new TypeError('The parameter k must be an integer number');\n }\n } else {\n // default value\n k = 0;\n } // equal signature to use\n\n\n var eq = equalScalar; // zero value\n\n var zero = 0;\n\n if (isString(datatype)) {\n // find signature that matches (datatype, datatype)\n eq = typed.find(equalScalar, [datatype, datatype]) || equalScalar; // convert 0 to the same datatype\n\n zero = typed.convert(0, datatype);\n }\n\n var kSuper = k > 0 ? k : 0;\n var kSub = k < 0 ? -k : 0; // rows and columns\n\n var rows = size[0];\n var columns = size[1]; // number of non-zero items\n\n var n = Math.min(rows - kSub, columns - kSuper); // value extraction function\n\n var _value; // check value\n\n\n if (isArray(value)) {\n // validate array\n if (value.length !== n) {\n // number of values in array must be n\n throw new Error('Invalid value array length');\n } // define function\n\n\n _value = function _value(i) {\n // return value @ i\n return value[i];\n };\n } else if (isMatrix(value)) {\n // matrix size\n var ms = value.size(); // validate matrix\n\n if (ms.length !== 1 || ms[0] !== n) {\n // number of values in array must be n\n throw new Error('Invalid matrix length');\n } // define function\n\n\n _value = function _value(i) {\n // return value @ i\n return value.get([i]);\n };\n } else {\n // define function\n _value = function _value() {\n // return value\n return value;\n };\n } // create arrays\n\n\n var values = [];\n var index = [];\n var ptr = []; // loop items\n\n for (var j = 0; j < columns; j++) {\n // number of rows with value\n ptr.push(values.length); // diagonal index\n\n var i = j - kSuper; // check we need to set diagonal value\n\n if (i >= 0 && i < n) {\n // get value @ i\n var v = _value(i); // check for zero\n\n\n if (!eq(v, zero)) {\n // column\n index.push(i + kSub); // add value\n\n values.push(v);\n }\n }\n } // last value should be number of values\n\n\n ptr.push(values.length); // create SparseMatrix\n\n return new SparseMatrix({\n values: values,\n index: index,\n ptr: ptr,\n size: [rows, columns]\n });\n };\n /**\n * Swap rows i and j in Matrix.\n *\n * @memberof SparseMatrix\n * @param {number} i Matrix row index 1\n * @param {number} j Matrix row index 2\n *\n * @return {Matrix} The matrix reference\n */\n\n\n SparseMatrix.prototype.swapRows = function (i, j) {\n // check index\n if (!isNumber(i) || !isInteger(i) || !isNumber(j) || !isInteger(j)) {\n throw new Error('Row index must be positive integers');\n } // check dimensions\n\n\n if (this._size.length !== 2) {\n throw new Error('Only two dimensional matrix is supported');\n } // validate index\n\n\n validateIndex(i, this._size[0]);\n validateIndex(j, this._size[0]); // swap rows\n\n SparseMatrix._swapRows(i, j, this._size[1], this._values, this._index, this._ptr); // return current instance\n\n\n return this;\n };\n /**\n * Loop rows with data in column j.\n *\n * @param {number} j Column\n * @param {Array} values Matrix values\n * @param {Array} index Matrix row indeces\n * @param {Array} ptr Matrix column pointers\n * @param {Function} callback Callback function invoked for every row in column j\n */\n\n\n SparseMatrix._forEachRow = function (j, values, index, ptr, callback) {\n // indeces for column j\n var k0 = ptr[j];\n var k1 = ptr[j + 1]; // loop\n\n for (var k = k0; k < k1; k++) {\n // invoke callback\n callback(index[k], values[k]);\n }\n };\n /**\n * Swap rows x and y in Sparse Matrix data structures.\n *\n * @param {number} x Matrix row index 1\n * @param {number} y Matrix row index 2\n * @param {number} columns Number of columns in matrix\n * @param {Array} values Matrix values\n * @param {Array} index Matrix row indeces\n * @param {Array} ptr Matrix column pointers\n */\n\n\n SparseMatrix._swapRows = function (x, y, columns, values, index, ptr) {\n // loop columns\n for (var j = 0; j < columns; j++) {\n // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]\n var k0 = ptr[j];\n var k1 = ptr[j + 1]; // find value index @ x\n\n var kx = _getValueIndex(x, k0, k1, index); // find value index @ x\n\n\n var ky = _getValueIndex(y, k0, k1, index); // check both rows exist in matrix\n\n\n if (kx < k1 && ky < k1 && index[kx] === x && index[ky] === y) {\n // swap values (check for pattern matrix)\n if (values) {\n var v = values[kx];\n values[kx] = values[ky];\n values[ky] = v;\n } // next column\n\n\n continue;\n } // check x row exist & no y row\n\n\n if (kx < k1 && index[kx] === x && (ky >= k1 || index[ky] !== y)) {\n // value @ x (check for pattern matrix)\n var vx = values ? values[kx] : undefined; // insert value @ y\n\n index.splice(ky, 0, y);\n\n if (values) {\n values.splice(ky, 0, vx);\n } // remove value @ x (adjust array index if needed)\n\n\n index.splice(ky <= kx ? kx + 1 : kx, 1);\n\n if (values) {\n values.splice(ky <= kx ? kx + 1 : kx, 1);\n } // next column\n\n\n continue;\n } // check y row exist & no x row\n\n\n if (ky < k1 && index[ky] === y && (kx >= k1 || index[kx] !== x)) {\n // value @ y (check for pattern matrix)\n var vy = values ? values[ky] : undefined; // insert value @ x\n\n index.splice(kx, 0, x);\n\n if (values) {\n values.splice(kx, 0, vy);\n } // remove value @ y (adjust array index if needed)\n\n\n index.splice(kx <= ky ? ky + 1 : ky, 1);\n\n if (values) {\n values.splice(kx <= ky ? ky + 1 : ky, 1);\n }\n }\n }\n };\n\n return SparseMatrix;\n}, {\n isClass: true\n});","import { factory } from '../../../utils/factory.js';\nvar name = 'matrix';\nvar dependencies = ['typed', 'Matrix', 'DenseMatrix', 'SparseMatrix'];\nexport var createMatrix = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n Matrix,\n DenseMatrix,\n SparseMatrix\n } = _ref;\n\n /**\n * Create a Matrix. The function creates a new `math.Matrix` object from\n * an `Array`. A Matrix has utility functions to manipulate the data in the\n * matrix, like getting the size and getting or setting values in the matrix.\n * Supported storage formats are 'dense' and 'sparse'.\n *\n * Syntax:\n *\n * math.matrix() // creates an empty matrix using default storage format (dense).\n * math.matrix(data) // creates a matrix with initial data using default storage format (dense).\n * math.matrix('dense') // creates an empty matrix using the given storage format.\n * math.matrix(data, 'dense') // creates a matrix with initial data using the given storage format.\n * math.matrix(data, 'sparse') // creates a sparse matrix with initial data.\n * math.matrix(data, 'sparse', 'number') // creates a sparse matrix with initial data, number data type.\n *\n * Examples:\n *\n * let m = math.matrix([[1, 2], [3, 4]])\n * m.size() // Array [2, 2]\n * m.resize([3, 2], 5)\n * m.valueOf() // Array [[1, 2], [3, 4], [5, 5]]\n * m.get([1, 0]) // number 3\n *\n * See also:\n *\n * bignumber, boolean, complex, index, number, string, unit, sparse\n *\n * @param {Array | Matrix} [data] A multi dimensional array\n * @param {string} [format] The Matrix storage format\n *\n * @return {Matrix} The created matrix\n */\n return typed(name, {\n '': function _() {\n return _create([]);\n },\n string: function string(format) {\n return _create([], format);\n },\n 'string, string': function stringString(format, datatype) {\n return _create([], format, datatype);\n },\n Array: function Array(data) {\n return _create(data);\n },\n Matrix: function Matrix(data) {\n return _create(data, data.storage());\n },\n 'Array | Matrix, string': _create,\n 'Array | Matrix, string, string': _create\n });\n /**\n * Create a new Matrix with given storage format\n * @param {Array} data\n * @param {string} [format]\n * @param {string} [datatype]\n * @returns {Matrix} Returns a new Matrix\n * @private\n */\n\n function _create(data, format, datatype) {\n // get storage format constructor\n if (format === 'dense' || format === 'default' || format === undefined) {\n return new DenseMatrix(data, datatype);\n }\n\n if (format === 'sparse') {\n return new SparseMatrix(data, datatype);\n }\n\n throw new TypeError('Unknown matrix type ' + JSON.stringify(format) + '.');\n }\n});","import { factory } from '../../../utils/factory.js';\nimport { DimensionError } from '../../../error/DimensionError.js';\nvar name = 'algorithm01';\nvar dependencies = ['typed'];\nexport var createAlgorithm01 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Iterates over SparseMatrix nonzero items and invokes the callback function f(Dij, Sij).\n * Callback function invoked NNZ times (number of nonzero items in SparseMatrix).\n *\n *\n * ┌ f(Dij, Sij) ; S(i,j) !== 0\n * C(i,j) = ┤\n * └ Dij ; otherwise\n *\n *\n * @param {Matrix} denseMatrix The DenseMatrix instance (D)\n * @param {Matrix} sparseMatrix The SparseMatrix instance (S)\n * @param {Function} callback The f(Dij,Sij) operation to invoke, where Dij = DenseMatrix(i,j) and Sij = SparseMatrix(i,j)\n * @param {boolean} inverse A true value indicates callback should be invoked f(Sij,Dij)\n *\n * @return {Matrix} DenseMatrix (C)\n *\n * see https://github.com/josdejong/mathjs/pull/346#issuecomment-97477571\n */\n return function algorithm1(denseMatrix, sparseMatrix, callback, inverse) {\n // dense matrix arrays\n var adata = denseMatrix._data;\n var asize = denseMatrix._size;\n var adt = denseMatrix._datatype; // sparse matrix arrays\n\n var bvalues = sparseMatrix._values;\n var bindex = sparseMatrix._index;\n var bptr = sparseMatrix._ptr;\n var bsize = sparseMatrix._size;\n var bdt = sparseMatrix._datatype; // validate dimensions\n\n if (asize.length !== bsize.length) {\n throw new DimensionError(asize.length, bsize.length);\n } // check rows & columns\n\n\n if (asize[0] !== bsize[0] || asize[1] !== bsize[1]) {\n throw new RangeError('Dimension mismatch. Matrix A (' + asize + ') must match Matrix B (' + bsize + ')');\n } // sparse matrix cannot be a Pattern matrix\n\n\n if (!bvalues) {\n throw new Error('Cannot perform operation on Dense Matrix and Pattern Sparse Matrix');\n } // rows & columns\n\n\n var rows = asize[0];\n var columns = asize[1]; // process data types\n\n var dt = typeof adt === 'string' && adt === bdt ? adt : undefined; // callback function\n\n var cf = dt ? typed.find(callback, [dt, dt]) : callback; // vars\n\n var i, j; // result (DenseMatrix)\n\n var cdata = []; // initialize c\n\n for (i = 0; i < rows; i++) {\n cdata[i] = [];\n } // workspace\n\n\n var x = []; // marks indicating we have a value in x for a given column\n\n var w = []; // loop columns in b\n\n for (j = 0; j < columns; j++) {\n // column mark\n var mark = j + 1; // values in column j\n\n for (var k0 = bptr[j], k1 = bptr[j + 1], k = k0; k < k1; k++) {\n // row\n i = bindex[k]; // update workspace\n\n x[i] = inverse ? cf(bvalues[k], adata[i][j]) : cf(adata[i][j], bvalues[k]); // mark i as updated\n\n w[i] = mark;\n } // loop rows\n\n\n for (i = 0; i < rows; i++) {\n // check row is in workspace\n if (w[i] === mark) {\n // c[i][j] was already calculated\n cdata[i][j] = x[i];\n } else {\n // item does not exist in S\n cdata[i][j] = adata[i][j];\n }\n }\n } // return dense matrix\n\n\n return denseMatrix.createDenseMatrix({\n data: cdata,\n size: [rows, columns],\n datatype: dt\n });\n };\n});","import { factory } from '../../../utils/factory.js';\nvar name = 'algorithm10';\nvar dependencies = ['typed', 'DenseMatrix'];\nexport var createAlgorithm10 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n DenseMatrix\n } = _ref;\n\n /**\n * Iterates over SparseMatrix S nonzero items and invokes the callback function f(Sij, b).\n * Callback function invoked NZ times (number of nonzero items in S).\n *\n *\n * ┌ f(Sij, b) ; S(i,j) !== 0\n * C(i,j) = ┤\n * └ b ; otherwise\n *\n *\n * @param {Matrix} s The SparseMatrix instance (S)\n * @param {Scalar} b The Scalar value\n * @param {Function} callback The f(Aij,b) operation to invoke\n * @param {boolean} inverse A true value indicates callback should be invoked f(b,Sij)\n *\n * @return {Matrix} DenseMatrix (C)\n *\n * https://github.com/josdejong/mathjs/pull/346#issuecomment-97626813\n */\n return function algorithm10(s, b, callback, inverse) {\n // sparse matrix arrays\n var avalues = s._values;\n var aindex = s._index;\n var aptr = s._ptr;\n var asize = s._size;\n var adt = s._datatype; // sparse matrix cannot be a Pattern matrix\n\n if (!avalues) {\n throw new Error('Cannot perform operation on Pattern Sparse Matrix and Scalar value');\n } // rows & columns\n\n\n var rows = asize[0];\n var columns = asize[1]; // datatype\n\n var dt; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string') {\n // datatype\n dt = adt; // convert b to the same datatype\n\n b = typed.convert(b, dt); // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // result arrays\n\n\n var cdata = []; // workspaces\n\n var x = []; // marks indicating we have a value in x for a given column\n\n var w = []; // loop columns\n\n for (var j = 0; j < columns; j++) {\n // columns mark\n var mark = j + 1; // values in j\n\n for (var k0 = aptr[j], k1 = aptr[j + 1], k = k0; k < k1; k++) {\n // row\n var r = aindex[k]; // update workspace\n\n x[r] = avalues[k];\n w[r] = mark;\n } // loop rows\n\n\n for (var i = 0; i < rows; i++) {\n // initialize C on first column\n if (j === 0) {\n // create row array\n cdata[i] = [];\n } // check sparse matrix has a value @ i,j\n\n\n if (w[i] === mark) {\n // invoke callback, update C\n cdata[i][j] = inverse ? cf(b, x[i]) : cf(x[i], b);\n } else {\n // dense matrix value @ i, j\n cdata[i][j] = b;\n }\n }\n } // return dense matrix\n\n\n return new DenseMatrix({\n data: cdata,\n size: [rows, columns],\n datatype: dt\n });\n };\n});","import { factory } from '../../../utils/factory.js';\nimport { DimensionError } from '../../../error/DimensionError.js';\nvar name = 'algorithm13';\nvar dependencies = ['typed'];\nexport var createAlgorithm13 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Iterates over DenseMatrix items and invokes the callback function f(Aij..z, Bij..z).\n * Callback function invoked MxN times.\n *\n * C(i,j,...z) = f(Aij..z, Bij..z)\n *\n * @param {Matrix} a The DenseMatrix instance (A)\n * @param {Matrix} b The DenseMatrix instance (B)\n * @param {Function} callback The f(Aij..z,Bij..z) operation to invoke\n *\n * @return {Matrix} DenseMatrix (C)\n *\n * https://github.com/josdejong/mathjs/pull/346#issuecomment-97658658\n */\n return function algorithm13(a, b, callback) {\n // a arrays\n var adata = a._data;\n var asize = a._size;\n var adt = a._datatype; // b arrays\n\n var bdata = b._data;\n var bsize = b._size;\n var bdt = b._datatype; // c arrays\n\n var csize = []; // validate dimensions\n\n if (asize.length !== bsize.length) {\n throw new DimensionError(asize.length, bsize.length);\n } // validate each one of the dimension sizes\n\n\n for (var s = 0; s < asize.length; s++) {\n // must match\n if (asize[s] !== bsize[s]) {\n throw new RangeError('Dimension mismatch. Matrix A (' + asize + ') must match Matrix B (' + bsize + ')');\n } // update dimension in c\n\n\n csize[s] = asize[s];\n } // datatype\n\n\n var dt; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string' && adt === bdt) {\n // datatype\n dt = adt; // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // populate cdata, iterate through dimensions\n\n\n var cdata = csize.length > 0 ? _iterate(cf, 0, csize, csize[0], adata, bdata) : []; // c matrix\n\n return a.createDenseMatrix({\n data: cdata,\n size: csize,\n datatype: dt\n });\n }; // recursive function\n\n function _iterate(f, level, s, n, av, bv) {\n // initialize array for this level\n var cv = []; // check we reach the last level\n\n if (level === s.length - 1) {\n // loop arrays in last level\n for (var i = 0; i < n; i++) {\n // invoke callback and store value\n cv[i] = f(av[i], bv[i]);\n }\n } else {\n // iterate current level\n for (var j = 0; j < n; j++) {\n // iterate next level\n cv[j] = _iterate(f, level + 1, s, s[level + 1], av[j], bv[j]);\n }\n }\n\n return cv;\n }\n});","import { factory } from '../../../utils/factory.js';\nimport { clone } from '../../../utils/object.js';\nvar name = 'algorithm14';\nvar dependencies = ['typed'];\nexport var createAlgorithm14 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Iterates over DenseMatrix items and invokes the callback function f(Aij..z, b).\n * Callback function invoked MxN times.\n *\n * C(i,j,...z) = f(Aij..z, b)\n *\n * @param {Matrix} a The DenseMatrix instance (A)\n * @param {Scalar} b The Scalar value\n * @param {Function} callback The f(Aij..z,b) operation to invoke\n * @param {boolean} inverse A true value indicates callback should be invoked f(b,Aij..z)\n *\n * @return {Matrix} DenseMatrix (C)\n *\n * https://github.com/josdejong/mathjs/pull/346#issuecomment-97659042\n */\n return function algorithm14(a, b, callback, inverse) {\n // a arrays\n var adata = a._data;\n var asize = a._size;\n var adt = a._datatype; // datatype\n\n var dt; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string') {\n // datatype\n dt = adt; // convert b to the same datatype\n\n b = typed.convert(b, dt); // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // populate cdata, iterate through dimensions\n\n\n var cdata = asize.length > 0 ? _iterate(cf, 0, asize, asize[0], adata, b, inverse) : []; // c matrix\n\n return a.createDenseMatrix({\n data: cdata,\n size: clone(asize),\n datatype: dt\n });\n }; // recursive function\n\n function _iterate(f, level, s, n, av, bv, inverse) {\n // initialize array for this level\n var cv = []; // check we reach the last level\n\n if (level === s.length - 1) {\n // loop arrays in last level\n for (var i = 0; i < n; i++) {\n // invoke callback and store value\n cv[i] = inverse ? f(bv, av[i]) : f(av[i], bv);\n }\n } else {\n // iterate current level\n for (var j = 0; j < n; j++) {\n // iterate next level\n cv[j] = _iterate(f, level + 1, s, s[level + 1], av[j], bv, inverse);\n }\n }\n\n return cv;\n }\n});","import { factory } from '../../../utils/factory.js';\nimport { DimensionError } from '../../../error/DimensionError.js';\nvar name = 'algorithm03';\nvar dependencies = ['typed'];\nexport var createAlgorithm03 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Iterates over SparseMatrix items and invokes the callback function f(Dij, Sij).\n * Callback function invoked M*N times.\n *\n *\n * ┌ f(Dij, Sij) ; S(i,j) !== 0\n * C(i,j) = ┤\n * └ f(Dij, 0) ; otherwise\n *\n *\n * @param {Matrix} denseMatrix The DenseMatrix instance (D)\n * @param {Matrix} sparseMatrix The SparseMatrix instance (C)\n * @param {Function} callback The f(Dij,Sij) operation to invoke, where Dij = DenseMatrix(i,j) and Sij = SparseMatrix(i,j)\n * @param {boolean} inverse A true value indicates callback should be invoked f(Sij,Dij)\n *\n * @return {Matrix} DenseMatrix (C)\n *\n * see https://github.com/josdejong/mathjs/pull/346#issuecomment-97477571\n */\n return function algorithm03(denseMatrix, sparseMatrix, callback, inverse) {\n // dense matrix arrays\n var adata = denseMatrix._data;\n var asize = denseMatrix._size;\n var adt = denseMatrix._datatype; // sparse matrix arrays\n\n var bvalues = sparseMatrix._values;\n var bindex = sparseMatrix._index;\n var bptr = sparseMatrix._ptr;\n var bsize = sparseMatrix._size;\n var bdt = sparseMatrix._datatype; // validate dimensions\n\n if (asize.length !== bsize.length) {\n throw new DimensionError(asize.length, bsize.length);\n } // check rows & columns\n\n\n if (asize[0] !== bsize[0] || asize[1] !== bsize[1]) {\n throw new RangeError('Dimension mismatch. Matrix A (' + asize + ') must match Matrix B (' + bsize + ')');\n } // sparse matrix cannot be a Pattern matrix\n\n\n if (!bvalues) {\n throw new Error('Cannot perform operation on Dense Matrix and Pattern Sparse Matrix');\n } // rows & columns\n\n\n var rows = asize[0];\n var columns = asize[1]; // datatype\n\n var dt; // zero value\n\n var zero = 0; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string' && adt === bdt) {\n // datatype\n dt = adt; // convert 0 to the same datatype\n\n zero = typed.convert(0, dt); // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // result (DenseMatrix)\n\n\n var cdata = []; // initialize dense matrix\n\n for (var z = 0; z < rows; z++) {\n // initialize row\n cdata[z] = [];\n } // workspace\n\n\n var x = []; // marks indicating we have a value in x for a given column\n\n var w = []; // loop columns in b\n\n for (var j = 0; j < columns; j++) {\n // column mark\n var mark = j + 1; // values in column j\n\n for (var k0 = bptr[j], k1 = bptr[j + 1], k = k0; k < k1; k++) {\n // row\n var i = bindex[k]; // update workspace\n\n x[i] = inverse ? cf(bvalues[k], adata[i][j]) : cf(adata[i][j], bvalues[k]);\n w[i] = mark;\n } // process workspace\n\n\n for (var y = 0; y < rows; y++) {\n // check we have a calculated value for current row\n if (w[y] === mark) {\n // use calculated value\n cdata[y][j] = x[y];\n } else {\n // calculate value\n cdata[y][j] = inverse ? cf(zero, adata[y][j]) : cf(adata[y][j], zero);\n }\n }\n } // return dense matrix\n\n\n return denseMatrix.createDenseMatrix({\n data: cdata,\n size: [rows, columns],\n datatype: dt\n });\n };\n});","import { factory } from '../../../utils/factory.js';\nimport { DimensionError } from '../../../error/DimensionError.js';\nvar name = 'algorithm05';\nvar dependencies = ['typed', 'equalScalar'];\nexport var createAlgorithm05 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n equalScalar\n } = _ref;\n\n /**\n * Iterates over SparseMatrix A and SparseMatrix B nonzero items and invokes the callback function f(Aij, Bij).\n * Callback function invoked MAX(NNZA, NNZB) times\n *\n *\n * ┌ f(Aij, Bij) ; A(i,j) !== 0 || B(i,j) !== 0\n * C(i,j) = ┤\n * └ 0 ; otherwise\n *\n *\n * @param {Matrix} a The SparseMatrix instance (A)\n * @param {Matrix} b The SparseMatrix instance (B)\n * @param {Function} callback The f(Aij,Bij) operation to invoke\n *\n * @return {Matrix} SparseMatrix (C)\n *\n * see https://github.com/josdejong/mathjs/pull/346#issuecomment-97620294\n */\n return function algorithm05(a, b, callback) {\n // sparse matrix arrays\n var avalues = a._values;\n var aindex = a._index;\n var aptr = a._ptr;\n var asize = a._size;\n var adt = a._datatype; // sparse matrix arrays\n\n var bvalues = b._values;\n var bindex = b._index;\n var bptr = b._ptr;\n var bsize = b._size;\n var bdt = b._datatype; // validate dimensions\n\n if (asize.length !== bsize.length) {\n throw new DimensionError(asize.length, bsize.length);\n } // check rows & columns\n\n\n if (asize[0] !== bsize[0] || asize[1] !== bsize[1]) {\n throw new RangeError('Dimension mismatch. Matrix A (' + asize + ') must match Matrix B (' + bsize + ')');\n } // rows & columns\n\n\n var rows = asize[0];\n var columns = asize[1]; // datatype\n\n var dt; // equal signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string' && adt === bdt) {\n // datatype\n dt = adt; // find signature that matches (dt, dt)\n\n eq = typed.find(equalScalar, [dt, dt]); // convert 0 to the same datatype\n\n zero = typed.convert(0, dt); // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // result arrays\n\n\n var cvalues = avalues && bvalues ? [] : undefined;\n var cindex = [];\n var cptr = []; // workspaces\n\n var xa = cvalues ? [] : undefined;\n var xb = cvalues ? [] : undefined; // marks indicating we have a value in x for a given column\n\n var wa = [];\n var wb = []; // vars\n\n var i, j, k, k1; // loop columns\n\n for (j = 0; j < columns; j++) {\n // update cptr\n cptr[j] = cindex.length; // columns mark\n\n var mark = j + 1; // loop values A(:,j)\n\n for (k = aptr[j], k1 = aptr[j + 1]; k < k1; k++) {\n // row\n i = aindex[k]; // push index\n\n cindex.push(i); // update workspace\n\n wa[i] = mark; // check we need to process values\n\n if (xa) {\n xa[i] = avalues[k];\n }\n } // loop values B(:,j)\n\n\n for (k = bptr[j], k1 = bptr[j + 1]; k < k1; k++) {\n // row\n i = bindex[k]; // check row existed in A\n\n if (wa[i] !== mark) {\n // push index\n cindex.push(i);\n } // update workspace\n\n\n wb[i] = mark; // check we need to process values\n\n if (xb) {\n xb[i] = bvalues[k];\n }\n } // check we need to process values (non pattern matrix)\n\n\n if (cvalues) {\n // initialize first index in j\n k = cptr[j]; // loop index in j\n\n while (k < cindex.length) {\n // row\n i = cindex[k]; // marks\n\n var wai = wa[i];\n var wbi = wb[i]; // check Aij or Bij are nonzero\n\n if (wai === mark || wbi === mark) {\n // matrix values @ i,j\n var va = wai === mark ? xa[i] : zero;\n var vb = wbi === mark ? xb[i] : zero; // Cij\n\n var vc = cf(va, vb); // check for zero\n\n if (!eq(vc, zero)) {\n // push value\n cvalues.push(vc); // increment pointer\n\n k++;\n } else {\n // remove value @ i, do not increment pointer\n cindex.splice(k, 1);\n }\n }\n }\n }\n } // update cptr\n\n\n cptr[columns] = cindex.length; // return sparse matrix\n\n return a.createSparseMatrix({\n values: cvalues,\n index: cindex,\n ptr: cptr,\n size: [rows, columns],\n datatype: dt\n });\n };\n});","import { factory } from '../../../utils/factory.js';\nvar name = 'algorithm11';\nvar dependencies = ['typed', 'equalScalar'];\nexport var createAlgorithm11 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n equalScalar\n } = _ref;\n\n /**\n * Iterates over SparseMatrix S nonzero items and invokes the callback function f(Sij, b).\n * Callback function invoked NZ times (number of nonzero items in S).\n *\n *\n * ┌ f(Sij, b) ; S(i,j) !== 0\n * C(i,j) = ┤\n * └ 0 ; otherwise\n *\n *\n * @param {Matrix} s The SparseMatrix instance (S)\n * @param {Scalar} b The Scalar value\n * @param {Function} callback The f(Aij,b) operation to invoke\n * @param {boolean} inverse A true value indicates callback should be invoked f(b,Sij)\n *\n * @return {Matrix} SparseMatrix (C)\n *\n * https://github.com/josdejong/mathjs/pull/346#issuecomment-97626813\n */\n return function algorithm11(s, b, callback, inverse) {\n // sparse matrix arrays\n var avalues = s._values;\n var aindex = s._index;\n var aptr = s._ptr;\n var asize = s._size;\n var adt = s._datatype; // sparse matrix cannot be a Pattern matrix\n\n if (!avalues) {\n throw new Error('Cannot perform operation on Pattern Sparse Matrix and Scalar value');\n } // rows & columns\n\n\n var rows = asize[0];\n var columns = asize[1]; // datatype\n\n var dt; // equal signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string') {\n // datatype\n dt = adt; // find signature that matches (dt, dt)\n\n eq = typed.find(equalScalar, [dt, dt]); // convert 0 to the same datatype\n\n zero = typed.convert(0, dt); // convert b to the same datatype\n\n b = typed.convert(b, dt); // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // result arrays\n\n\n var cvalues = [];\n var cindex = [];\n var cptr = []; // loop columns\n\n for (var j = 0; j < columns; j++) {\n // initialize ptr\n cptr[j] = cindex.length; // values in j\n\n for (var k0 = aptr[j], k1 = aptr[j + 1], k = k0; k < k1; k++) {\n // row\n var i = aindex[k]; // invoke callback\n\n var v = inverse ? cf(b, avalues[k]) : cf(avalues[k], b); // check value is zero\n\n if (!eq(v, zero)) {\n // push index & value\n cindex.push(i);\n cvalues.push(v);\n }\n }\n } // update ptr\n\n\n cptr[columns] = cindex.length; // return sparse matrix\n\n return s.createSparseMatrix({\n values: cvalues,\n index: cindex,\n ptr: cptr,\n size: [rows, columns],\n datatype: dt\n });\n };\n});","import { factory } from '../../../utils/factory.js';\nvar name = 'algorithm12';\nvar dependencies = ['typed', 'DenseMatrix'];\nexport var createAlgorithm12 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n DenseMatrix\n } = _ref;\n\n /**\n * Iterates over SparseMatrix S nonzero items and invokes the callback function f(Sij, b).\n * Callback function invoked MxN times.\n *\n *\n * ┌ f(Sij, b) ; S(i,j) !== 0\n * C(i,j) = ┤\n * └ f(0, b) ; otherwise\n *\n *\n * @param {Matrix} s The SparseMatrix instance (S)\n * @param {Scalar} b The Scalar value\n * @param {Function} callback The f(Aij,b) operation to invoke\n * @param {boolean} inverse A true value indicates callback should be invoked f(b,Sij)\n *\n * @return {Matrix} DenseMatrix (C)\n *\n * https://github.com/josdejong/mathjs/pull/346#issuecomment-97626813\n */\n return function algorithm12(s, b, callback, inverse) {\n // sparse matrix arrays\n var avalues = s._values;\n var aindex = s._index;\n var aptr = s._ptr;\n var asize = s._size;\n var adt = s._datatype; // sparse matrix cannot be a Pattern matrix\n\n if (!avalues) {\n throw new Error('Cannot perform operation on Pattern Sparse Matrix and Scalar value');\n } // rows & columns\n\n\n var rows = asize[0];\n var columns = asize[1]; // datatype\n\n var dt; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string') {\n // datatype\n dt = adt; // convert b to the same datatype\n\n b = typed.convert(b, dt); // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // result arrays\n\n\n var cdata = []; // workspaces\n\n var x = []; // marks indicating we have a value in x for a given column\n\n var w = []; // loop columns\n\n for (var j = 0; j < columns; j++) {\n // columns mark\n var mark = j + 1; // values in j\n\n for (var k0 = aptr[j], k1 = aptr[j + 1], k = k0; k < k1; k++) {\n // row\n var r = aindex[k]; // update workspace\n\n x[r] = avalues[k];\n w[r] = mark;\n } // loop rows\n\n\n for (var i = 0; i < rows; i++) {\n // initialize C on first column\n if (j === 0) {\n // create row array\n cdata[i] = [];\n } // check sparse matrix has a value @ i,j\n\n\n if (w[i] === mark) {\n // invoke callback, update C\n cdata[i][j] = inverse ? cf(b, x[i]) : cf(x[i], b);\n } else {\n // dense matrix value @ i, j\n cdata[i][j] = inverse ? cf(b, 0) : cf(0, b);\n }\n }\n } // return dense matrix\n\n\n return new DenseMatrix({\n data: cdata,\n size: [rows, columns],\n datatype: dt\n });\n };\n});","import { factory } from '../../../utils/factory.js';\nimport { DimensionError } from '../../../error/DimensionError.js';\nvar name = 'algorithm07';\nvar dependencies = ['typed', 'DenseMatrix'];\nexport var createAlgorithm07 = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n DenseMatrix\n } = _ref;\n\n /**\n * Iterates over SparseMatrix A and SparseMatrix B items (zero and nonzero) and invokes the callback function f(Aij, Bij).\n * Callback function invoked MxN times.\n *\n * C(i,j) = f(Aij, Bij)\n *\n * @param {Matrix} a The SparseMatrix instance (A)\n * @param {Matrix} b The SparseMatrix instance (B)\n * @param {Function} callback The f(Aij,Bij) operation to invoke\n *\n * @return {Matrix} DenseMatrix (C)\n *\n * see https://github.com/josdejong/mathjs/pull/346#issuecomment-97620294\n */\n return function algorithm07(a, b, callback) {\n // sparse matrix arrays\n var asize = a._size;\n var adt = a._datatype; // sparse matrix arrays\n\n var bsize = b._size;\n var bdt = b._datatype; // validate dimensions\n\n if (asize.length !== bsize.length) {\n throw new DimensionError(asize.length, bsize.length);\n } // check rows & columns\n\n\n if (asize[0] !== bsize[0] || asize[1] !== bsize[1]) {\n throw new RangeError('Dimension mismatch. Matrix A (' + asize + ') must match Matrix B (' + bsize + ')');\n } // rows & columns\n\n\n var rows = asize[0];\n var columns = asize[1]; // datatype\n\n var dt; // zero value\n\n var zero = 0; // callback signature to use\n\n var cf = callback; // process data types\n\n if (typeof adt === 'string' && adt === bdt) {\n // datatype\n dt = adt; // convert 0 to the same datatype\n\n zero = typed.convert(0, dt); // callback\n\n cf = typed.find(callback, [dt, dt]);\n } // vars\n\n\n var i, j; // result arrays\n\n var cdata = []; // initialize c\n\n for (i = 0; i < rows; i++) {\n cdata[i] = [];\n } // workspaces\n\n\n var xa = [];\n var xb = []; // marks indicating we have a value in x for a given column\n\n var wa = [];\n var wb = []; // loop columns\n\n for (j = 0; j < columns; j++) {\n // columns mark\n var mark = j + 1; // scatter the values of A(:,j) into workspace\n\n _scatter(a, j, wa, xa, mark); // scatter the values of B(:,j) into workspace\n\n\n _scatter(b, j, wb, xb, mark); // loop rows\n\n\n for (i = 0; i < rows; i++) {\n // matrix values @ i,j\n var va = wa[i] === mark ? xa[i] : zero;\n var vb = wb[i] === mark ? xb[i] : zero; // invoke callback\n\n cdata[i][j] = cf(va, vb);\n }\n } // return dense matrix\n\n\n return new DenseMatrix({\n data: cdata,\n size: [rows, columns],\n datatype: dt\n });\n };\n\n function _scatter(m, j, w, x, mark) {\n // a arrays\n var values = m._values;\n var index = m._index;\n var ptr = m._ptr; // loop values in column j\n\n for (var k = ptr[j], k1 = ptr[j + 1]; k < k1; k++) {\n // row\n var i = index[k]; // update workspace\n\n w[i] = mark;\n x[i] = values[k];\n }\n }\n});","import { isMatrix } from '../../utils/is.js';\nimport { arraySize } from '../../utils/array.js';\nimport { isInteger } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'diag';\nvar dependencies = ['typed', 'matrix', 'DenseMatrix', 'SparseMatrix'];\nexport var createDiag = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n DenseMatrix,\n SparseMatrix\n } = _ref;\n\n /**\n * Create a diagonal matrix or retrieve the diagonal of a matrix\n *\n * When `x` is a vector, a matrix with vector `x` on the diagonal will be returned.\n * When `x` is a two dimensional matrix, the matrixes `k`th diagonal will be returned as vector.\n * When k is positive, the values are placed on the super diagonal.\n * When k is negative, the values are placed on the sub diagonal.\n *\n * Syntax:\n *\n * math.diag(X)\n * math.diag(X, format)\n * math.diag(X, k)\n * math.diag(X, k, format)\n *\n * Examples:\n *\n * // create a diagonal matrix\n * math.diag([1, 2, 3]) // returns [[1, 0, 0], [0, 2, 0], [0, 0, 3]]\n * math.diag([1, 2, 3], 1) // returns [[0, 1, 0, 0], [0, 0, 2, 0], [0, 0, 0, 3]]\n * math.diag([1, 2, 3], -1) // returns [[0, 0, 0], [1, 0, 0], [0, 2, 0], [0, 0, 3]]\n *\n * // retrieve the diagonal from a matrix\n * const a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\n * math.diag(a) // returns [1, 5, 9]\n *\n * See also:\n *\n * ones, zeros, identity\n *\n * @param {Matrix | Array} x A two dimensional matrix or a vector\n * @param {number | BigNumber} [k=0] The diagonal where the vector will be filled\n * in or retrieved.\n * @param {string} [format='dense'] The matrix storage format.\n *\n * @returns {Matrix | Array} Diagonal matrix from input vector, or diagonal from input matrix.\n */\n return typed(name, {\n // FIXME: simplify this huge amount of signatures as soon as typed-function supports optional arguments\n Array: function Array(x) {\n return _diag(x, 0, arraySize(x), null);\n },\n 'Array, number': function ArrayNumber(x, k) {\n return _diag(x, k, arraySize(x), null);\n },\n 'Array, BigNumber': function ArrayBigNumber(x, k) {\n return _diag(x, k.toNumber(), arraySize(x), null);\n },\n 'Array, string': function ArrayString(x, format) {\n return _diag(x, 0, arraySize(x), format);\n },\n 'Array, number, string': function ArrayNumberString(x, k, format) {\n return _diag(x, k, arraySize(x), format);\n },\n 'Array, BigNumber, string': function ArrayBigNumberString(x, k, format) {\n return _diag(x, k.toNumber(), arraySize(x), format);\n },\n Matrix: function Matrix(x) {\n return _diag(x, 0, x.size(), x.storage());\n },\n 'Matrix, number': function MatrixNumber(x, k) {\n return _diag(x, k, x.size(), x.storage());\n },\n 'Matrix, BigNumber': function MatrixBigNumber(x, k) {\n return _diag(x, k.toNumber(), x.size(), x.storage());\n },\n 'Matrix, string': function MatrixString(x, format) {\n return _diag(x, 0, x.size(), format);\n },\n 'Matrix, number, string': function MatrixNumberString(x, k, format) {\n return _diag(x, k, x.size(), format);\n },\n 'Matrix, BigNumber, string': function MatrixBigNumberString(x, k, format) {\n return _diag(x, k.toNumber(), x.size(), format);\n }\n });\n /**\n * Creeate diagonal matrix from a vector or vice versa\n * @param {Array | Matrix} x\n * @param {number} k\n * @param {string} format Storage format for matrix. If null,\n * an Array is returned\n * @returns {Array | Matrix}\n * @private\n */\n\n function _diag(x, k, size, format) {\n if (!isInteger(k)) {\n throw new TypeError('Second parameter in function diag must be an integer');\n }\n\n var kSuper = k > 0 ? k : 0;\n var kSub = k < 0 ? -k : 0; // check dimensions\n\n switch (size.length) {\n case 1:\n return _createDiagonalMatrix(x, k, format, size[0], kSub, kSuper);\n\n case 2:\n return _getDiagonal(x, k, format, size, kSub, kSuper);\n }\n\n throw new RangeError('Matrix for function diag must be 2 dimensional');\n }\n\n function _createDiagonalMatrix(x, k, format, l, kSub, kSuper) {\n // matrix size\n var ms = [l + kSub, l + kSuper];\n\n if (format && format !== 'sparse' && format !== 'dense') {\n throw new TypeError(\"Unknown matrix type \".concat(format, \"\\\"\"));\n } // create diagonal matrix\n\n\n var m = format === 'sparse' ? SparseMatrix.diagonal(ms, x, k) : DenseMatrix.diagonal(ms, x, k); // check we need to return a matrix\n\n return format !== null ? m : m.valueOf();\n }\n\n function _getDiagonal(x, k, format, s, kSub, kSuper) {\n // check x is a Matrix\n if (isMatrix(x)) {\n // get diagonal matrix\n var dm = x.diagonal(k); // check we need to return a matrix\n\n if (format !== null) {\n // check we need to change matrix format\n if (format !== dm.storage()) {\n return matrix(dm, format);\n }\n\n return dm;\n }\n\n return dm.valueOf();\n } // vector size\n\n\n var n = Math.min(s[0] - kSub, s[1] - kSuper); // diagonal values\n\n var vector = []; // loop diagonal\n\n for (var i = 0; i < n; i++) {\n vector[i] = x[i + kSub][i + kSuper];\n } // check we need to return a matrix\n\n\n return format !== null ? matrix(vector) : vector;\n }\n});","import { isBigNumber } from '../../utils/is.js';\nimport { resize } from '../../utils/array.js';\nimport { isInteger } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'identity';\nvar dependencies = ['typed', 'config', 'matrix', 'BigNumber', 'DenseMatrix', 'SparseMatrix'];\nexport var createIdentity = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n matrix,\n BigNumber,\n DenseMatrix,\n SparseMatrix\n } = _ref;\n\n /**\n * Create a 2-dimensional identity matrix with size m x n or n x n.\n * The matrix has ones on the diagonal and zeros elsewhere.\n *\n * Syntax:\n *\n * math.identity(n)\n * math.identity(n, format)\n * math.identity(m, n)\n * math.identity(m, n, format)\n * math.identity([m, n])\n * math.identity([m, n], format)\n *\n * Examples:\n *\n * math.identity(3) // returns [[1, 0, 0], [0, 1, 0], [0, 0, 1]]\n * math.identity(3, 2) // returns [[1, 0], [0, 1], [0, 0]]\n *\n * const A = [[1, 2, 3], [4, 5, 6]]\n * math.identity(math.size(A)) // returns [[1, 0, 0], [0, 1, 0]]\n *\n * See also:\n *\n * diag, ones, zeros, size, range\n *\n * @param {...number | Matrix | Array} size The size for the matrix\n * @param {string} [format] The Matrix storage format\n *\n * @return {Matrix | Array | number} A matrix with ones on the diagonal.\n */\n return typed(name, {\n '': function _() {\n return config.matrix === 'Matrix' ? matrix([]) : [];\n },\n string: function string(format) {\n return matrix(format);\n },\n 'number | BigNumber': function numberBigNumber(rows) {\n return _identity(rows, rows, config.matrix === 'Matrix' ? 'dense' : undefined);\n },\n 'number | BigNumber, string': function numberBigNumberString(rows, format) {\n return _identity(rows, rows, format);\n },\n 'number | BigNumber, number | BigNumber': function numberBigNumberNumberBigNumber(rows, cols) {\n return _identity(rows, cols, config.matrix === 'Matrix' ? 'dense' : undefined);\n },\n 'number | BigNumber, number | BigNumber, string': function numberBigNumberNumberBigNumberString(rows, cols, format) {\n return _identity(rows, cols, format);\n },\n Array: function Array(size) {\n return _identityVector(size);\n },\n 'Array, string': function ArrayString(size, format) {\n return _identityVector(size, format);\n },\n Matrix: function Matrix(size) {\n return _identityVector(size.valueOf(), size.storage());\n },\n 'Matrix, string': function MatrixString(size, format) {\n return _identityVector(size.valueOf(), format);\n }\n });\n\n function _identityVector(size, format) {\n switch (size.length) {\n case 0:\n return format ? matrix(format) : [];\n\n case 1:\n return _identity(size[0], size[0], format);\n\n case 2:\n return _identity(size[0], size[1], format);\n\n default:\n throw new Error('Vector containing two values expected');\n }\n }\n /**\n * Create an identity matrix\n * @param {number | BigNumber} rows\n * @param {number | BigNumber} cols\n * @param {string} [format]\n * @returns {Matrix}\n * @private\n */\n\n\n function _identity(rows, cols, format) {\n // BigNumber constructor with the right precision\n var Big = isBigNumber(rows) || isBigNumber(cols) ? BigNumber : null;\n if (isBigNumber(rows)) rows = rows.toNumber();\n if (isBigNumber(cols)) cols = cols.toNumber();\n\n if (!isInteger(rows) || rows < 1) {\n throw new Error('Parameters in function identity must be positive integers');\n }\n\n if (!isInteger(cols) || cols < 1) {\n throw new Error('Parameters in function identity must be positive integers');\n }\n\n var one = Big ? new BigNumber(1) : 1;\n var defaultValue = Big ? new Big(0) : 0;\n var size = [rows, cols]; // check we need to return a matrix\n\n if (format) {\n // create diagonal matrix (use optimized implementation for storage format)\n if (format === 'sparse') {\n return SparseMatrix.diagonal(size, one, 0, defaultValue);\n }\n\n if (format === 'dense') {\n return DenseMatrix.diagonal(size, one, 0, defaultValue);\n }\n\n throw new TypeError(\"Unknown matrix type \\\"\".concat(format, \"\\\"\"));\n } // create and resize array\n\n\n var res = resize([], size, defaultValue); // fill in ones on the diagonal\n\n var minimum = rows < cols ? rows : cols; // fill diagonal\n\n for (var d = 0; d < minimum; d++) {\n res[d][d] = one;\n }\n\n return res;\n }\n});","export function noBignumber() {\n throw new Error('No \"bignumber\" implementation available');\n}\nexport function noFraction() {\n throw new Error('No \"fraction\" implementation available');\n}\nexport function noMatrix() {\n throw new Error('No \"matrix\" implementation available');\n}\nexport function noIndex() {\n throw new Error('No \"index\" implementation available');\n}\nexport function noSubset() {\n throw new Error('No \"matrix\" implementation available');\n}","import { arraySize } from '../../utils/array.js';\nimport { factory } from '../../utils/factory.js';\nimport { noMatrix } from '../../utils/noop.js';\nvar name = 'size';\nvar dependencies = ['typed', 'config', '?matrix'];\nexport var createSize = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n matrix\n } = _ref;\n\n /**\n * Calculate the size of a matrix or scalar.\n *\n * Syntax:\n *\n * math.size(x)\n *\n * Examples:\n *\n * math.size(2.3) // returns []\n * math.size('hello world') // returns [11]\n *\n * const A = [[1, 2, 3], [4, 5, 6]]\n * math.size(A) // returns [2, 3]\n * math.size(math.range(1,6)) // returns [5]\n *\n * See also:\n *\n * count, resize, squeeze, subset\n *\n * @param {boolean | number | Complex | Unit | string | Array | Matrix} x A matrix\n * @return {Array | Matrix} A vector with size of `x`.\n */\n return typed(name, {\n Matrix: function Matrix(x) {\n return x.create(x.size());\n },\n Array: arraySize,\n string: function string(x) {\n return config.matrix === 'Array' ? [x.length] : matrix([x.length]);\n },\n 'number | Complex | BigNumber | Unit | boolean | null': function numberComplexBigNumberUnitBooleanNull(x) {\n // scalar\n return config.matrix === 'Array' ? [] : matrix ? matrix([]) : noMatrix();\n }\n });\n});","import { isBigNumber } from '../../utils/is.js';\nimport { isInteger } from '../../utils/number.js';\nimport { resize } from '../../utils/array.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'zeros';\nvar dependencies = ['typed', 'config', 'matrix', 'BigNumber'];\nexport var createZeros = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n matrix,\n BigNumber\n } = _ref;\n\n /**\n * Create a matrix filled with zeros. The created matrix can have one or\n * multiple dimensions.\n *\n * Syntax:\n *\n * math.zeros(m)\n * math.zeros(m, format)\n * math.zeros(m, n)\n * math.zeros(m, n, format)\n * math.zeros([m, n])\n * math.zeros([m, n], format)\n *\n * Examples:\n *\n * math.zeros(3) // returns [0, 0, 0]\n * math.zeros(3, 2) // returns [[0, 0], [0, 0], [0, 0]]\n * math.zeros(3, 'dense') // returns [0, 0, 0]\n *\n * const A = [[1, 2, 3], [4, 5, 6]]\n * math.zeros(math.size(A)) // returns [[0, 0, 0], [0, 0, 0]]\n *\n * See also:\n *\n * ones, identity, size, range\n *\n * @param {...number | Array} size The size of each dimension of the matrix\n * @param {string} [format] The Matrix storage format\n *\n * @return {Array | Matrix} A matrix filled with zeros\n */\n return typed(name, {\n '': function _() {\n return config.matrix === 'Array' ? _zeros([]) : _zeros([], 'default');\n },\n // math.zeros(m, n, p, ..., format)\n // TODO: more accurate signature '...number | BigNumber, string' as soon as typed-function supports this\n '...number | BigNumber | string': function numberBigNumberString(size) {\n var last = size[size.length - 1];\n\n if (typeof last === 'string') {\n var format = size.pop();\n return _zeros(size, format);\n } else if (config.matrix === 'Array') {\n return _zeros(size);\n } else {\n return _zeros(size, 'default');\n }\n },\n Array: _zeros,\n Matrix: function Matrix(size) {\n var format = size.storage();\n return _zeros(size.valueOf(), format);\n },\n 'Array | Matrix, string': function ArrayMatrixString(size, format) {\n return _zeros(size.valueOf(), format);\n }\n });\n /**\n * Create an Array or Matrix with zeros\n * @param {Array} size\n * @param {string} [format='default']\n * @return {Array | Matrix}\n * @private\n */\n\n function _zeros(size, format) {\n var hasBigNumbers = _normalize(size);\n\n var defaultValue = hasBigNumbers ? new BigNumber(0) : 0;\n\n _validate(size);\n\n if (format) {\n // return a matrix\n var m = matrix(format);\n\n if (size.length > 0) {\n return m.resize(size, defaultValue);\n }\n\n return m;\n } else {\n // return an Array\n var arr = [];\n\n if (size.length > 0) {\n return resize(arr, size, defaultValue);\n }\n\n return arr;\n }\n } // replace BigNumbers with numbers, returns true if size contained BigNumbers\n\n\n function _normalize(size) {\n var hasBigNumbers = false;\n size.forEach(function (value, index, arr) {\n if (isBigNumber(value)) {\n hasBigNumbers = true;\n arr[index] = value.toNumber();\n }\n });\n return hasBigNumbers;\n } // validate arguments\n\n\n function _validate(size) {\n size.forEach(function (value) {\n if (typeof value !== 'number' || !isInteger(value) || value < 0) {\n throw new Error('Parameters in function zeros must be positive integers');\n }\n });\n }\n}); // TODO: zeros contains almost the same code as ones. Reuse this?","import { factory } from '../../utils/factory.js';\nvar name = 'hex';\nvar dependencies = ['typed', 'format'];\n/**\n * Format a number as hexadecimal.\n *\n * Syntax:\n *\n * math.hex(value)\n *\n * Examples:\n *\n * //the following outputs \"0xF0\"\n * math.hex(240)\n *\n * See also:\n *\n * oct\n * bin\n *\n * @param {number} value Value to be stringified\n * @param {number} wordSize Optional word size (see `format`)\n * @return {string} The formatted value\n */\n\nexport var createHex = factory(name, dependencies, (_ref) => {\n var {\n typed,\n format\n } = _ref;\n return typed(name, {\n 'number | BigNumber': function numberBigNumber(n) {\n return format(n, {\n notation: 'hex'\n });\n },\n 'number | BigNumber, number': function numberBigNumberNumber(n, wordSize) {\n return format(n, {\n notation: 'hex',\n wordSize: wordSize\n });\n }\n });\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nimport { isInteger } from '../../utils/number.js';\nimport { createAlgorithm11 } from '../../type/matrix/utils/algorithm11.js';\nimport { createAlgorithm12 } from '../../type/matrix/utils/algorithm12.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nimport { roundNumber } from '../../plain/number/index.js';\nvar NO_INT = 'Number of decimals in function round must be an integer';\nvar name = 'round';\nvar dependencies = ['typed', 'matrix', 'equalScalar', 'zeros', 'BigNumber', 'DenseMatrix'];\nexport var createRound = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n equalScalar,\n zeros,\n BigNumber,\n DenseMatrix\n } = _ref;\n var algorithm11 = createAlgorithm11({\n typed,\n equalScalar\n });\n var algorithm12 = createAlgorithm12({\n typed,\n DenseMatrix\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Round a value towards the nearest integer.\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.round(x)\n * math.round(x, n)\n *\n * Examples:\n *\n * math.round(3.22) // returns number 3\n * math.round(3.82) // returns number 4\n * math.round(-4.2) // returns number -4\n * math.round(-4.7) // returns number -5\n * math.round(3.22, 1) // returns number 3.2\n * math.round(3.88, 1) // returns number 3.9\n * math.round(-4.21, 1) // returns number -4.2\n * math.round(-4.71, 1) // returns number -4.7\n * math.round(math.pi, 3) // returns number 3.142\n * math.round(123.45678, 2) // returns number 123.46\n *\n * const c = math.complex(3.2, -2.7)\n * math.round(c) // returns Complex 3 - 3i\n *\n * math.round([3.2, 3.8, -4.7]) // returns Array [3, 4, -5]\n *\n * See also:\n *\n * ceil, fix, floor\n *\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix} x Number to be rounded\n * @param {number | BigNumber | Array} [n=0] Number of decimals\n * @return {number | BigNumber | Fraction | Complex | Array | Matrix} Rounded value\n */\n\n return typed(name, _objectSpread(_objectSpread({}, roundNumberSignatures), {}, {\n Complex: function Complex(x) {\n return x.round();\n },\n 'Complex, number': function ComplexNumber(x, n) {\n if (n % 1) {\n throw new TypeError(NO_INT);\n }\n\n return x.round(n);\n },\n 'Complex, BigNumber': function ComplexBigNumber(x, n) {\n if (!n.isInteger()) {\n throw new TypeError(NO_INT);\n }\n\n var _n = n.toNumber();\n\n return x.round(_n);\n },\n 'number, BigNumber': function numberBigNumber(x, n) {\n if (!n.isInteger()) {\n throw new TypeError(NO_INT);\n }\n\n return new BigNumber(x).toDecimalPlaces(n.toNumber());\n },\n BigNumber: function BigNumber(x) {\n return x.toDecimalPlaces(0);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, n) {\n if (!n.isInteger()) {\n throw new TypeError(NO_INT);\n }\n\n return x.toDecimalPlaces(n.toNumber());\n },\n Fraction: function Fraction(x) {\n return x.round();\n },\n 'Fraction, number': function FractionNumber(x, n) {\n if (n % 1) {\n throw new TypeError(NO_INT);\n }\n\n return x.round(n);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since round(0) = 0\n return deepMap(x, this, true);\n },\n 'SparseMatrix, number | BigNumber': function SparseMatrixNumberBigNumber(x, y) {\n return algorithm11(x, y, this, false);\n },\n 'DenseMatrix, number | BigNumber': function DenseMatrixNumberBigNumber(x, y) {\n return algorithm14(x, y, this, false);\n },\n 'number | Complex | BigNumber, SparseMatrix': function numberComplexBigNumberSparseMatrix(x, y) {\n // check scalar is zero\n if (equalScalar(x, 0)) {\n // do not execute algorithm, result will be a zero matrix\n return zeros(y.size(), y.storage());\n }\n\n return algorithm12(y, x, this, true);\n },\n 'number | Complex | BigNumber, DenseMatrix': function numberComplexBigNumberDenseMatrix(x, y) {\n // check scalar is zero\n if (equalScalar(x, 0)) {\n // do not execute algorithm, result will be a zero matrix\n return zeros(y.size(), y.storage());\n }\n\n return algorithm14(y, x, this, true);\n },\n 'Array, number | BigNumber': function ArrayNumberBigNumber(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, this, false).valueOf();\n },\n 'number | Complex | BigNumber, Array': function numberComplexBigNumberArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n }));\n});\nvar roundNumberSignatures = {\n number: roundNumber,\n 'number, number': function numberNumber(x, n) {\n if (!isInteger(n)) {\n throw new TypeError(NO_INT);\n }\n\n if (n < 0 || n > 15) {\n throw new Error('Number of decimals in function round must be in te range of 0-15');\n }\n\n return roundNumber(x, n);\n }\n};\nexport var createRoundNumber = /* #__PURE__ */factory(name, ['typed'], (_ref2) => {\n var {\n typed\n } = _ref2;\n return typed(name, roundNumberSignatures);\n});","import { nearlyEqual as bigNearlyEqual } from '../../utils/bignumber/nearlyEqual.js';\nimport { nearlyEqual } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nimport { createAlgorithm03 } from '../../type/matrix/utils/algorithm03.js';\nimport { createAlgorithm12 } from '../../type/matrix/utils/algorithm12.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nimport { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';\nimport { createAlgorithm05 } from '../../type/matrix/utils/algorithm05.js';\nvar name = 'compare';\nvar dependencies = ['typed', 'config', 'matrix', 'equalScalar', 'BigNumber', 'Fraction', 'DenseMatrix'];\nexport var createCompare = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n equalScalar,\n matrix,\n BigNumber,\n Fraction,\n DenseMatrix\n } = _ref;\n var algorithm03 = createAlgorithm03({\n typed\n });\n var algorithm05 = createAlgorithm05({\n typed,\n equalScalar\n });\n var algorithm12 = createAlgorithm12({\n typed,\n DenseMatrix\n });\n var algorithm13 = createAlgorithm13({\n typed\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.\n *\n * x and y are considered equal when the relative difference between x and y\n * is smaller than the configured epsilon. The function cannot be used to\n * compare values smaller than approximately 2.22e-16.\n *\n * For matrices, the function is evaluated element wise.\n * Strings are compared by their numerical value.\n *\n * Syntax:\n *\n * math.compare(x, y)\n *\n * Examples:\n *\n * math.compare(6, 1) // returns 1\n * math.compare(2, 3) // returns -1\n * math.compare(7, 7) // returns 0\n * math.compare('10', '2') // returns 1\n * math.compare('1000', '1e3') // returns 0\n *\n * const a = math.unit('5 cm')\n * const b = math.unit('40 mm')\n * math.compare(a, b) // returns 1\n *\n * math.compare(2, [1, 2, 3]) // returns [1, 0, -1]\n *\n * See also:\n *\n * equal, unequal, smaller, smallerEq, larger, largerEq, compareNatural, compareText\n *\n * @param {number | BigNumber | Fraction | Unit | string | Array | Matrix} x First value to compare\n * @param {number | BigNumber | Fraction | Unit | string | Array | Matrix} y Second value to compare\n * @return {number | BigNumber | Fraction | Array | Matrix} Returns the result of the comparison:\n * 1 when x > y, -1 when x < y, and 0 when x == y.\n */\n\n return typed(name, {\n 'boolean, boolean': function booleanBoolean(x, y) {\n return x === y ? 0 : x > y ? 1 : -1;\n },\n 'number, number': function numberNumber(x, y) {\n return nearlyEqual(x, y, config.epsilon) ? 0 : x > y ? 1 : -1;\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return bigNearlyEqual(x, y, config.epsilon) ? new BigNumber(0) : new BigNumber(x.cmp(y));\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return new Fraction(x.compare(y));\n },\n 'Complex, Complex': function ComplexComplex() {\n throw new TypeError('No ordering relation is defined for complex numbers');\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n if (!x.equalBase(y)) {\n throw new Error('Cannot compare units with different base');\n }\n\n return this(x.value, y.value);\n },\n 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {\n return algorithm05(x, y, this);\n },\n 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {\n return algorithm03(y, x, this, true);\n },\n 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {\n return algorithm03(x, y, this, false);\n },\n 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {\n return algorithm13(x, y, this);\n },\n 'Array, Array': function ArrayArray(x, y) {\n // use matrix implementation\n return this(matrix(x), matrix(y)).valueOf();\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use matrix implementation\n return this(matrix(x), y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use matrix implementation\n return this(x, matrix(y));\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm12(x, y, this, false);\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, this, false);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm12(y, x, this, true);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, this, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, this, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n });\n});\nexport var createCompareNumber = /* #__PURE__ */factory(name, ['typed', 'config'], (_ref2) => {\n var {\n typed,\n config\n } = _ref2;\n return typed(name, {\n 'number, number': function numberNumber(x, y) {\n return nearlyEqual(x, y, config.epsilon) ? 0 : x > y ? 1 : -1;\n }\n });\n});","import { nearlyEqual as bigNearlyEqual } from '../../utils/bignumber/nearlyEqual.js';\nimport { nearlyEqual } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nimport { createAlgorithm03 } from '../../type/matrix/utils/algorithm03.js';\nimport { createAlgorithm07 } from '../../type/matrix/utils/algorithm07.js';\nimport { createAlgorithm12 } from '../../type/matrix/utils/algorithm12.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nimport { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';\nvar name = 'smaller';\nvar dependencies = ['typed', 'config', 'matrix', 'DenseMatrix'];\nexport var createSmaller = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n matrix,\n DenseMatrix\n } = _ref;\n var algorithm03 = createAlgorithm03({\n typed\n });\n var algorithm07 = createAlgorithm07({\n typed,\n DenseMatrix\n });\n var algorithm12 = createAlgorithm12({\n typed,\n DenseMatrix\n });\n var algorithm13 = createAlgorithm13({\n typed\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Test whether value x is smaller than y.\n *\n * The function returns true when x is smaller than y and the relative\n * difference between x and y is smaller than the configured epsilon. The\n * function cannot be used to compare values smaller than approximately 2.22e-16.\n *\n * For matrices, the function is evaluated element wise.\n * Strings are compared by their numerical value.\n *\n * Syntax:\n *\n * math.smaller(x, y)\n *\n * Examples:\n *\n * math.smaller(2, 3) // returns true\n * math.smaller(5, 2 * 2) // returns false\n *\n * const a = math.unit('5 cm')\n * const b = math.unit('2 inch')\n * math.smaller(a, b) // returns true\n *\n * See also:\n *\n * equal, unequal, smallerEq, smaller, smallerEq, compare\n *\n * @param {number | BigNumber | Fraction | boolean | Unit | string | Array | Matrix} x First value to compare\n * @param {number | BigNumber | Fraction | boolean | Unit | string | Array | Matrix} y Second value to compare\n * @return {boolean | Array | Matrix} Returns true when the x is smaller than y, else returns false\n */\n\n return typed(name, {\n 'boolean, boolean': function booleanBoolean(x, y) {\n return x < y;\n },\n 'number, number': function numberNumber(x, y) {\n return x < y && !nearlyEqual(x, y, config.epsilon);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return x.lt(y) && !bigNearlyEqual(x, y, config.epsilon);\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return x.compare(y) === -1;\n },\n 'Complex, Complex': function ComplexComplex(x, y) {\n throw new TypeError('No ordering relation is defined for complex numbers');\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n if (!x.equalBase(y)) {\n throw new Error('Cannot compare units with different base');\n }\n\n return this(x.value, y.value);\n },\n 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {\n return algorithm07(x, y, this);\n },\n 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {\n return algorithm03(y, x, this, true);\n },\n 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {\n return algorithm03(x, y, this, false);\n },\n 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {\n return algorithm13(x, y, this);\n },\n 'Array, Array': function ArrayArray(x, y) {\n // use matrix implementation\n return this(matrix(x), matrix(y)).valueOf();\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use matrix implementation\n return this(matrix(x), y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use matrix implementation\n return this(x, matrix(y));\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm12(x, y, this, false);\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, this, false);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm12(y, x, this, true);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, this, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, this, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n });\n});\nexport var createSmallerNumber = /* #__PURE__ */factory(name, ['typed', 'config'], (_ref2) => {\n var {\n typed,\n config\n } = _ref2;\n return typed(name, {\n 'number, number': function numberNumber(x, y) {\n return x < y && !nearlyEqual(x, y, config.epsilon);\n }\n });\n});","import { nearlyEqual as bigNearlyEqual } from '../../utils/bignumber/nearlyEqual.js';\nimport { nearlyEqual } from '../../utils/number.js';\nimport { factory } from '../../utils/factory.js';\nimport { createAlgorithm03 } from '../../type/matrix/utils/algorithm03.js';\nimport { createAlgorithm07 } from '../../type/matrix/utils/algorithm07.js';\nimport { createAlgorithm12 } from '../../type/matrix/utils/algorithm12.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nimport { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';\nvar name = 'larger';\nvar dependencies = ['typed', 'config', 'matrix', 'DenseMatrix'];\nexport var createLarger = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n matrix,\n DenseMatrix\n } = _ref;\n var algorithm03 = createAlgorithm03({\n typed\n });\n var algorithm07 = createAlgorithm07({\n typed,\n DenseMatrix\n });\n var algorithm12 = createAlgorithm12({\n typed,\n DenseMatrix\n });\n var algorithm13 = createAlgorithm13({\n typed\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Test whether value x is larger than y.\n *\n * The function returns true when x is larger than y and the relative\n * difference between x and y is larger than the configured epsilon. The\n * function cannot be used to compare values smaller than approximately 2.22e-16.\n *\n * For matrices, the function is evaluated element wise.\n * Strings are compared by their numerical value.\n *\n * Syntax:\n *\n * math.larger(x, y)\n *\n * Examples:\n *\n * math.larger(2, 3) // returns false\n * math.larger(5, 2 + 2) // returns true\n *\n * const a = math.unit('5 cm')\n * const b = math.unit('2 inch')\n * math.larger(a, b) // returns false\n *\n * See also:\n *\n * equal, unequal, smaller, smallerEq, largerEq, compare\n *\n * @param {number | BigNumber | Fraction | boolean | Unit | string | Array | Matrix} x First value to compare\n * @param {number | BigNumber | Fraction | boolean | Unit | string | Array | Matrix} y Second value to compare\n * @return {boolean | Array | Matrix} Returns true when the x is larger than y, else returns false\n */\n\n return typed(name, {\n 'boolean, boolean': function booleanBoolean(x, y) {\n return x > y;\n },\n 'number, number': function numberNumber(x, y) {\n return x > y && !nearlyEqual(x, y, config.epsilon);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return x.gt(y) && !bigNearlyEqual(x, y, config.epsilon);\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return x.compare(y) === 1;\n },\n 'Complex, Complex': function ComplexComplex() {\n throw new TypeError('No ordering relation is defined for complex numbers');\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n if (!x.equalBase(y)) {\n throw new Error('Cannot compare units with different base');\n }\n\n return this(x.value, y.value);\n },\n 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {\n return algorithm07(x, y, this);\n },\n 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {\n return algorithm03(y, x, this, true);\n },\n 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {\n return algorithm03(x, y, this, false);\n },\n 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {\n return algorithm13(x, y, this);\n },\n 'Array, Array': function ArrayArray(x, y) {\n // use matrix implementation\n return this(matrix(x), matrix(y)).valueOf();\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use matrix implementation\n return this(matrix(x), y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use matrix implementation\n return this(x, matrix(y));\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm12(x, y, this, false);\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, this, false);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm12(y, x, this, true);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, this, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, this, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n });\n});\nexport var createLargerNumber = /* #__PURE__ */factory(name, ['typed', 'config'], (_ref2) => {\n var {\n typed,\n config\n } = _ref2;\n return typed(name, {\n 'number, number': function numberNumber(x, y) {\n return x > y && !nearlyEqual(x, y, config.epsilon);\n }\n });\n});","import { factory } from '../../utils/factory.js';\nvar name = 'FibonacciHeap';\nvar dependencies = ['smaller', 'larger'];\nexport var createFibonacciHeapClass = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n smaller,\n larger\n } = _ref;\n var oneOverLogPhi = 1.0 / Math.log((1.0 + Math.sqrt(5.0)) / 2.0);\n /**\n * Fibonacci Heap implementation, used interally for Matrix math.\n * @class FibonacciHeap\n * @constructor FibonacciHeap\n */\n\n function FibonacciHeap() {\n if (!(this instanceof FibonacciHeap)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // initialize fields\n\n\n this._minimum = null;\n this._size = 0;\n }\n /**\n * Attach type information\n */\n\n\n FibonacciHeap.prototype.type = 'FibonacciHeap';\n FibonacciHeap.prototype.isFibonacciHeap = true;\n /**\n * Inserts a new data element into the heap. No heap consolidation is\n * performed at this time, the new node is simply inserted into the root\n * list of this heap. Running time: O(1) actual.\n * @memberof FibonacciHeap\n */\n\n FibonacciHeap.prototype.insert = function (key, value) {\n // create node\n var node = {\n key: key,\n value: value,\n degree: 0\n }; // check we have a node in the minimum\n\n if (this._minimum) {\n // minimum node\n var minimum = this._minimum; // update left & right of node\n\n node.left = minimum;\n node.right = minimum.right;\n minimum.right = node;\n node.right.left = node; // update minimum node in heap if needed\n\n if (smaller(key, minimum.key)) {\n // node has a smaller key, use it as minimum\n this._minimum = node;\n }\n } else {\n // set left & right\n node.left = node;\n node.right = node; // this is the first node\n\n this._minimum = node;\n } // increment number of nodes in heap\n\n\n this._size++; // return node\n\n return node;\n };\n /**\n * Returns the number of nodes in heap. Running time: O(1) actual.\n * @memberof FibonacciHeap\n */\n\n\n FibonacciHeap.prototype.size = function () {\n return this._size;\n };\n /**\n * Removes all elements from this heap.\n * @memberof FibonacciHeap\n */\n\n\n FibonacciHeap.prototype.clear = function () {\n this._minimum = null;\n this._size = 0;\n };\n /**\n * Returns true if the heap is empty, otherwise false.\n * @memberof FibonacciHeap\n */\n\n\n FibonacciHeap.prototype.isEmpty = function () {\n return this._size === 0;\n };\n /**\n * Extracts the node with minimum key from heap. Amortized running\n * time: O(log n).\n * @memberof FibonacciHeap\n */\n\n\n FibonacciHeap.prototype.extractMinimum = function () {\n // node to remove\n var node = this._minimum; // check we have a minimum\n\n if (node === null) {\n return node;\n } // current minimum\n\n\n var minimum = this._minimum; // get number of children\n\n var numberOfChildren = node.degree; // pointer to the first child\n\n var x = node.child; // for each child of node do...\n\n while (numberOfChildren > 0) {\n // store node in right side\n var tempRight = x.right; // remove x from child list\n\n x.left.right = x.right;\n x.right.left = x.left; // add x to root list of heap\n\n x.left = minimum;\n x.right = minimum.right;\n minimum.right = x;\n x.right.left = x; // set Parent[x] to null\n\n x.parent = null;\n x = tempRight;\n numberOfChildren--;\n } // remove node from root list of heap\n\n\n node.left.right = node.right;\n node.right.left = node.left; // update minimum\n\n if (node === node.right) {\n // empty\n minimum = null;\n } else {\n // update minimum\n minimum = node.right; // we need to update the pointer to the root with minimum key\n\n minimum = _findMinimumNode(minimum, this._size);\n } // decrement size of heap\n\n\n this._size--; // update minimum\n\n this._minimum = minimum; // return node\n\n return node;\n };\n /**\n * Removes a node from the heap given the reference to the node. The trees\n * in the heap will be consolidated, if necessary. This operation may fail\n * to remove the correct element if there are nodes with key value -Infinity.\n * Running time: O(log n) amortized.\n * @memberof FibonacciHeap\n */\n\n\n FibonacciHeap.prototype.remove = function (node) {\n // decrease key value\n this._minimum = _decreaseKey(this._minimum, node, -1); // remove the smallest\n\n this.extractMinimum();\n };\n /**\n * Decreases the key value for a heap node, given the new value to take on.\n * The structure of the heap may be changed and will not be consolidated.\n * Running time: O(1) amortized.\n * @memberof FibonacciHeap\n */\n\n\n function _decreaseKey(minimum, node, key) {\n // set node key\n node.key = key; // get parent node\n\n var parent = node.parent;\n\n if (parent && smaller(node.key, parent.key)) {\n // remove node from parent\n _cut(minimum, node, parent); // remove all nodes from parent to the root parent\n\n\n _cascadingCut(minimum, parent);\n } // update minimum node if needed\n\n\n if (smaller(node.key, minimum.key)) {\n minimum = node;\n } // return minimum\n\n\n return minimum;\n }\n /**\n * The reverse of the link operation: removes node from the child list of parent.\n * This method assumes that min is non-null. Running time: O(1).\n * @memberof FibonacciHeap\n */\n\n\n function _cut(minimum, node, parent) {\n // remove node from parent children and decrement Degree[parent]\n node.left.right = node.right;\n node.right.left = node.left;\n parent.degree--; // reset y.child if necessary\n\n if (parent.child === node) {\n parent.child = node.right;\n } // remove child if degree is 0\n\n\n if (parent.degree === 0) {\n parent.child = null;\n } // add node to root list of heap\n\n\n node.left = minimum;\n node.right = minimum.right;\n minimum.right = node;\n node.right.left = node; // set parent[node] to null\n\n node.parent = null; // set mark[node] to false\n\n node.mark = false;\n }\n /**\n * Performs a cascading cut operation. This cuts node from its parent and then\n * does the same for its parent, and so on up the tree.\n * Running time: O(log n); O(1) excluding the recursion.\n * @memberof FibonacciHeap\n */\n\n\n function _cascadingCut(minimum, node) {\n // store parent node\n var parent = node.parent; // if there's a parent...\n\n if (!parent) {\n return;\n } // if node is unmarked, set it marked\n\n\n if (!node.mark) {\n node.mark = true;\n } else {\n // it's marked, cut it from parent\n _cut(minimum, node, parent); // cut its parent as well\n\n\n _cascadingCut(parent);\n }\n }\n /**\n * Make the first node a child of the second one. Running time: O(1) actual.\n * @memberof FibonacciHeap\n */\n\n\n var _linkNodes = function _linkNodes(node, parent) {\n // remove node from root list of heap\n node.left.right = node.right;\n node.right.left = node.left; // make node a Child of parent\n\n node.parent = parent;\n\n if (!parent.child) {\n parent.child = node;\n node.right = node;\n node.left = node;\n } else {\n node.left = parent.child;\n node.right = parent.child.right;\n parent.child.right = node;\n node.right.left = node;\n } // increase degree[parent]\n\n\n parent.degree++; // set mark[node] false\n\n node.mark = false;\n };\n\n function _findMinimumNode(minimum, size) {\n // to find trees of the same degree efficiently we use an array of length O(log n) in which we keep a pointer to one root of each degree\n var arraySize = Math.floor(Math.log(size) * oneOverLogPhi) + 1; // create list with initial capacity\n\n var array = new Array(arraySize); // find the number of root nodes.\n\n var numRoots = 0;\n var x = minimum;\n\n if (x) {\n numRoots++;\n x = x.right;\n\n while (x !== minimum) {\n numRoots++;\n x = x.right;\n }\n } // vars\n\n\n var y; // For each node in root list do...\n\n while (numRoots > 0) {\n // access this node's degree..\n var d = x.degree; // get next node\n\n var next = x.right; // check if there is a node already in array with the same degree\n\n while (true) {\n // get node with the same degree is any\n y = array[d];\n\n if (!y) {\n break;\n } // make one node with the same degree a child of the other, do this based on the key value.\n\n\n if (larger(x.key, y.key)) {\n var temp = y;\n y = x;\n x = temp;\n } // make y a child of x\n\n\n _linkNodes(y, x); // we have handled this degree, go to next one.\n\n\n array[d] = null;\n d++;\n } // save this node for later when we might encounter another of the same degree.\n\n\n array[d] = x; // move forward through list.\n\n x = next;\n numRoots--;\n } // Set min to null (effectively losing the root list) and reconstruct the root list from the array entries in array[].\n\n\n minimum = null; // loop nodes in array\n\n for (var i = 0; i < arraySize; i++) {\n // get current node\n y = array[i];\n\n if (!y) {\n continue;\n } // check if we have a linked list\n\n\n if (minimum) {\n // First remove node from root list.\n y.left.right = y.right;\n y.right.left = y.left; // now add to root list, again.\n\n y.left = minimum;\n y.right = minimum.right;\n minimum.right = y;\n y.right.left = y; // check if this is a new min.\n\n if (smaller(y.key, minimum.key)) {\n minimum = y;\n }\n } else {\n minimum = y;\n }\n }\n\n return minimum;\n }\n\n return FibonacciHeap;\n}, {\n isClass: true\n});","import { factory } from '../../utils/factory.js';\nimport { createAlgorithm03 } from '../../type/matrix/utils/algorithm03.js';\nimport { createAlgorithm07 } from '../../type/matrix/utils/algorithm07.js';\nimport { createAlgorithm12 } from '../../type/matrix/utils/algorithm12.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nimport { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';\nvar name = 'unequal';\nvar dependencies = ['typed', 'config', 'equalScalar', 'matrix', 'DenseMatrix'];\nexport var createUnequal = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n equalScalar,\n matrix,\n DenseMatrix\n } = _ref;\n var algorithm03 = createAlgorithm03({\n typed\n });\n var algorithm07 = createAlgorithm07({\n typed,\n DenseMatrix\n });\n var algorithm12 = createAlgorithm12({\n typed,\n DenseMatrix\n });\n var algorithm13 = createAlgorithm13({\n typed\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Test whether two values are unequal.\n *\n * The function tests whether the relative difference between x and y is\n * larger than the configured epsilon. The function cannot be used to compare\n * values smaller than approximately 2.22e-16.\n *\n * For matrices, the function is evaluated element wise.\n * In case of complex numbers, x.re must unequal y.re, or x.im must unequal y.im.\n * Strings are compared by their numerical value.\n *\n * Values `null` and `undefined` are compared strictly, thus `null` is unequal\n * with everything except `null`, and `undefined` is unequal with everything\n * except `undefined`.\n *\n * Syntax:\n *\n * math.unequal(x, y)\n *\n * Examples:\n *\n * math.unequal(2 + 2, 3) // returns true\n * math.unequal(2 + 2, 4) // returns false\n *\n * const a = math.unit('50 cm')\n * const b = math.unit('5 m')\n * math.unequal(a, b) // returns false\n *\n * const c = [2, 5, 1]\n * const d = [2, 7, 1]\n *\n * math.unequal(c, d) // returns [false, true, false]\n * math.deepEqual(c, d) // returns false\n *\n * math.unequal(0, null) // returns true\n * See also:\n *\n * equal, deepEqual, smaller, smallerEq, larger, largerEq, compare\n *\n * @param {number | BigNumber | Fraction | boolean | Complex | Unit | string | Array | Matrix | undefined} x First value to compare\n * @param {number | BigNumber | Fraction | boolean | Complex | Unit | string | Array | Matrix | undefined} y Second value to compare\n * @return {boolean | Array | Matrix} Returns true when the compared values are unequal, else returns false\n */\n\n return typed('unequal', {\n 'any, any': function anyAny(x, y) {\n // strict equality for null and undefined?\n if (x === null) {\n return y !== null;\n }\n\n if (y === null) {\n return x !== null;\n }\n\n if (x === undefined) {\n return y !== undefined;\n }\n\n if (y === undefined) {\n return x !== undefined;\n }\n\n return _unequal(x, y);\n },\n 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {\n return algorithm07(x, y, _unequal);\n },\n 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {\n return algorithm03(y, x, _unequal, true);\n },\n 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {\n return algorithm03(x, y, _unequal, false);\n },\n 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {\n return algorithm13(x, y, _unequal);\n },\n 'Array, Array': function ArrayArray(x, y) {\n // use matrix implementation\n return this(matrix(x), matrix(y)).valueOf();\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use matrix implementation\n return this(matrix(x), y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use matrix implementation\n return this(x, matrix(y));\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm12(x, y, _unequal, false);\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, _unequal, false);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm12(y, x, _unequal, true);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, _unequal, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, _unequal, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, _unequal, true).valueOf();\n }\n });\n\n function _unequal(x, y) {\n return !equalScalar(x, y);\n }\n});\nexport var createUnequalNumber = factory(name, ['typed', 'equalScalar'], (_ref2) => {\n var {\n typed,\n equalScalar\n } = _ref2;\n return typed(name, {\n 'any, any': function anyAny(x, y) {\n // strict equality for null and undefined?\n if (x === null) {\n return y !== null;\n }\n\n if (y === null) {\n return x !== null;\n }\n\n if (x === undefined) {\n return y !== undefined;\n }\n\n if (y === undefined) {\n return x !== undefined;\n }\n\n return !equalScalar(x, y);\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { isMatrix } from '../../utils/is.js';\nvar name = 'dot';\nvar dependencies = ['typed', 'addScalar', 'multiplyScalar', 'conj', 'size'];\nexport var createDot = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n addScalar,\n multiplyScalar,\n conj,\n size\n } = _ref;\n\n /**\n * Calculate the dot product of two vectors. The dot product of\n * `A = [a1, a2, ..., an]` and `B = [b1, b2, ..., bn]` is defined as:\n *\n * dot(A, B) = conj(a1) * b1 + conj(a2) * b2 + ... + conj(an) * bn\n *\n * Syntax:\n *\n * math.dot(x, y)\n *\n * Examples:\n *\n * math.dot([2, 4, 1], [2, 2, 3]) // returns number 15\n * math.multiply([2, 4, 1], [2, 2, 3]) // returns number 15\n *\n * See also:\n *\n * multiply, cross\n *\n * @param {Array | Matrix} x First vector\n * @param {Array | Matrix} y Second vector\n * @return {number} Returns the dot product of `x` and `y`\n */\n return typed(name, {\n 'Array | DenseMatrix, Array | DenseMatrix': _denseDot,\n 'SparseMatrix, SparseMatrix': _sparseDot\n });\n\n function _validateDim(x, y) {\n var xSize = _size(x);\n\n var ySize = _size(y);\n\n var xLen, yLen;\n\n if (xSize.length === 1) {\n xLen = xSize[0];\n } else if (xSize.length === 2 && xSize[1] === 1) {\n xLen = xSize[0];\n } else {\n throw new RangeError('Expected a column vector, instead got a matrix of size (' + xSize.join(', ') + ')');\n }\n\n if (ySize.length === 1) {\n yLen = ySize[0];\n } else if (ySize.length === 2 && ySize[1] === 1) {\n yLen = ySize[0];\n } else {\n throw new RangeError('Expected a column vector, instead got a matrix of size (' + ySize.join(', ') + ')');\n }\n\n if (xLen !== yLen) throw new RangeError('Vectors must have equal length (' + xLen + ' != ' + yLen + ')');\n if (xLen === 0) throw new RangeError('Cannot calculate the dot product of empty vectors');\n return xLen;\n }\n\n function _denseDot(a, b) {\n var N = _validateDim(a, b);\n\n var adata = isMatrix(a) ? a._data : a;\n var adt = isMatrix(a) ? a._datatype : undefined;\n var bdata = isMatrix(b) ? b._data : b;\n var bdt = isMatrix(b) ? b._datatype : undefined; // are these 2-dimensional column vectors? (as opposed to 1-dimensional vectors)\n\n var aIsColumn = _size(a).length === 2;\n var bIsColumn = _size(b).length === 2;\n var add = addScalar;\n var mul = multiplyScalar; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n var dt = adt; // find signatures that matches (dt, dt)\n\n add = typed.find(addScalar, [dt, dt]);\n mul = typed.find(multiplyScalar, [dt, dt]);\n } // both vectors 1-dimensional\n\n\n if (!aIsColumn && !bIsColumn) {\n var c = mul(conj(adata[0]), bdata[0]);\n\n for (var i = 1; i < N; i++) {\n c = add(c, mul(conj(adata[i]), bdata[i]));\n }\n\n return c;\n } // a is 1-dim, b is column\n\n\n if (!aIsColumn && bIsColumn) {\n var _c = mul(conj(adata[0]), bdata[0][0]);\n\n for (var _i = 1; _i < N; _i++) {\n _c = add(_c, mul(conj(adata[_i]), bdata[_i][0]));\n }\n\n return _c;\n } // a is column, b is 1-dim\n\n\n if (aIsColumn && !bIsColumn) {\n var _c2 = mul(conj(adata[0][0]), bdata[0]);\n\n for (var _i2 = 1; _i2 < N; _i2++) {\n _c2 = add(_c2, mul(conj(adata[_i2][0]), bdata[_i2]));\n }\n\n return _c2;\n } // both vectors are column\n\n\n if (aIsColumn && bIsColumn) {\n var _c3 = mul(conj(adata[0][0]), bdata[0][0]);\n\n for (var _i3 = 1; _i3 < N; _i3++) {\n _c3 = add(_c3, mul(conj(adata[_i3][0]), bdata[_i3][0]));\n }\n\n return _c3;\n }\n }\n\n function _sparseDot(x, y) {\n _validateDim(x, y);\n\n var xindex = x._index;\n var xvalues = x._values;\n var yindex = y._index;\n var yvalues = y._values; // TODO optimize add & mul using datatype\n\n var c = 0;\n var add = addScalar;\n var mul = multiplyScalar;\n var i = 0;\n var j = 0;\n\n while (i < xindex.length && j < yindex.length) {\n var I = xindex[i];\n var J = yindex[j];\n\n if (I < J) {\n i++;\n continue;\n }\n\n if (I > J) {\n j++;\n continue;\n }\n\n if (I === J) {\n c = add(c, mul(xvalues[i], yvalues[j]));\n i++;\n j++;\n }\n }\n\n return c;\n } // TODO remove this once #1771 is fixed\n\n\n function _size(x) {\n return isMatrix(x) ? x.size() : size(x);\n }\n});","import { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nimport { absNumber } from '../../plain/number/index.js';\nvar name = 'abs';\nvar dependencies = ['typed'];\nexport var createAbs = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed\n } = _ref;\n\n /**\n * Calculate the absolute value of a number. For matrices, the function is\n * evaluated element wise.\n *\n * Syntax:\n *\n * math.abs(x)\n *\n * Examples:\n *\n * math.abs(3.5) // returns number 3.5\n * math.abs(-4.2) // returns number 4.2\n *\n * math.abs([3, -5, -1, 0, 2]) // returns Array [3, 5, 1, 0, 2]\n *\n * See also:\n *\n * sign\n *\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix | Unit} x\n * A number or matrix for which to get the absolute value\n * @return {number | BigNumber | Fraction | Complex | Array | Matrix | Unit}\n * Absolute value of `x`\n */\n return typed(name, {\n number: absNumber,\n Complex: function Complex(x) {\n return x.abs();\n },\n BigNumber: function BigNumber(x) {\n return x.abs();\n },\n Fraction: function Fraction(x) {\n return x.abs();\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since abs(0) = 0\n return deepMap(x, this, true);\n },\n Unit: function Unit(x) {\n return x.abs();\n }\n });\n});","import Decimal from 'decimal.js';\nimport { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nimport { nearlyEqual } from '../../utils/number.js';\nimport { nearlyEqual as bigNearlyEqual } from '../../utils/bignumber/nearlyEqual.js';\nimport { createAlgorithm11 } from '../../type/matrix/utils/algorithm11.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nvar name = 'floor';\nvar dependencies = ['typed', 'config', 'round', 'matrix', 'equalScalar'];\nexport var createFloor = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n round,\n matrix,\n equalScalar\n } = _ref;\n var algorithm11 = createAlgorithm11({\n typed,\n equalScalar\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Round a value towards minus infinity.\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.floor(x)\n * math.floor(x, n)\n *\n * Examples:\n *\n * math.floor(3.2) // returns number 3\n * math.floor(3.8) // returns number 3\n * math.floor(-4.2) // returns number -5\n * math.floor(-4.7) // returns number -5\n *\n * math.floor(3.212, 2) // returns number 3.21\n * math.floor(3.288, 2) // returns number 3.28\n * math.floor(-4.212, 2) // returns number -4.22\n * math.floor(-4.782, 2) // returns number -4.79\n *\n * const c = math.complex(3.24, -2.71)\n * math.floor(c) // returns Complex 3 - 3i\n * math.floor(c, 1) // returns Complex 3.2 - 2.8i\n *\n * math.floor([3.2, 3.8, -4.7]) // returns Array [3, 3, -5]\n * math.floor([3.21, 3.82, -4.71], 1) // returns Array [3.2, 3.8, -4.8]\n *\n * See also:\n *\n * ceil, fix, round\n *\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix} x Number to be rounded\n * @param {number | BigNumber | Array} [n=0] Number of decimals\n * @return {number | BigNumber | Fraction | Complex | Array | Matrix} Rounded value\n */\n\n return typed('floor', {\n number: function number(x) {\n if (nearlyEqual(x, round(x), config.epsilon)) {\n return round(x);\n } else {\n return Math.floor(x);\n }\n },\n 'number, number': function numberNumber(x, n) {\n if (nearlyEqual(x, round(x, n), config.epsilon)) {\n return round(x, n);\n } else {\n var [number, exponent] = \"\".concat(x, \"e\").split('e');\n var result = Math.floor(Number(\"\".concat(number, \"e\").concat(Number(exponent) + n)));\n [number, exponent] = \"\".concat(result, \"e\").split('e');\n return Number(\"\".concat(number, \"e\").concat(Number(exponent) - n));\n }\n },\n Complex: function Complex(x) {\n return x.floor();\n },\n 'Complex, number': function ComplexNumber(x, n) {\n return x.floor(n);\n },\n BigNumber: function BigNumber(x) {\n if (bigNearlyEqual(x, round(x), config.epsilon)) {\n return round(x);\n } else {\n return x.floor();\n }\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, n) {\n if (bigNearlyEqual(x, round(x, n), config.epsilon)) {\n return round(x, n);\n } else {\n return x.toDecimalPlaces(n.toNumber(), Decimal.ROUND_FLOOR);\n }\n },\n Fraction: function Fraction(x) {\n return x.floor();\n },\n 'Fraction, number': function FractionNumber(x, n) {\n return x.floor(n);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since floor(0) = 0\n return deepMap(x, this, true);\n },\n 'Array | Matrix, number': function ArrayMatrixNumber(x, n) {\n // deep map collection, skip zeros since ceil(0) = 0\n return deepMap(x, i => this(i, n), true);\n },\n 'SparseMatrix, number | BigNumber': function SparseMatrixNumberBigNumber(x, y) {\n return algorithm11(x, y, this, false);\n },\n 'DenseMatrix, number | BigNumber': function DenseMatrixNumberBigNumber(x, y) {\n return algorithm14(x, y, this, false);\n },\n 'number | Complex | BigNumber, Array': function numberComplexBigNumberArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { isMatrix } from '../../utils/is.js';\nimport { extend } from '../../utils/object.js';\nimport { arraySize } from '../../utils/array.js';\nimport { createAlgorithm11 } from '../../type/matrix/utils/algorithm11.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nvar name = 'multiply';\nvar dependencies = ['typed', 'matrix', 'addScalar', 'multiplyScalar', 'equalScalar', 'dot'];\nexport var createMultiply = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n addScalar,\n multiplyScalar,\n equalScalar,\n dot\n } = _ref;\n var algorithm11 = createAlgorithm11({\n typed,\n equalScalar\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n\n function _validateMatrixDimensions(size1, size2) {\n // check left operand dimensions\n switch (size1.length) {\n case 1:\n // check size2\n switch (size2.length) {\n case 1:\n // Vector x Vector\n if (size1[0] !== size2[0]) {\n // throw error\n throw new RangeError('Dimension mismatch in multiplication. Vectors must have the same length');\n }\n\n break;\n\n case 2:\n // Vector x Matrix\n if (size1[0] !== size2[0]) {\n // throw error\n throw new RangeError('Dimension mismatch in multiplication. Vector length (' + size1[0] + ') must match Matrix rows (' + size2[0] + ')');\n }\n\n break;\n\n default:\n throw new Error('Can only multiply a 1 or 2 dimensional matrix (Matrix B has ' + size2.length + ' dimensions)');\n }\n\n break;\n\n case 2:\n // check size2\n switch (size2.length) {\n case 1:\n // Matrix x Vector\n if (size1[1] !== size2[0]) {\n // throw error\n throw new RangeError('Dimension mismatch in multiplication. Matrix columns (' + size1[1] + ') must match Vector length (' + size2[0] + ')');\n }\n\n break;\n\n case 2:\n // Matrix x Matrix\n if (size1[1] !== size2[0]) {\n // throw error\n throw new RangeError('Dimension mismatch in multiplication. Matrix A columns (' + size1[1] + ') must match Matrix B rows (' + size2[0] + ')');\n }\n\n break;\n\n default:\n throw new Error('Can only multiply a 1 or 2 dimensional matrix (Matrix B has ' + size2.length + ' dimensions)');\n }\n\n break;\n\n default:\n throw new Error('Can only multiply a 1 or 2 dimensional matrix (Matrix A has ' + size1.length + ' dimensions)');\n }\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a Dense Vector (N)\n * @param {Matrix} b Dense Vector (N)\n *\n * @return {number} Scalar value\n */\n\n\n function _multiplyVectorVector(a, b, n) {\n // check empty vector\n if (n === 0) {\n throw new Error('Cannot multiply two empty vectors');\n }\n\n return dot(a, b);\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a Dense Vector (M)\n * @param {Matrix} b Matrix (MxN)\n *\n * @return {Matrix} Dense Vector (N)\n */\n\n\n function _multiplyVectorMatrix(a, b) {\n // process storage\n if (b.storage() !== 'dense') {\n throw new Error('Support for SparseMatrix not implemented');\n }\n\n return _multiplyVectorDenseMatrix(a, b);\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a Dense Vector (M)\n * @param {Matrix} b Dense Matrix (MxN)\n *\n * @return {Matrix} Dense Vector (N)\n */\n\n\n function _multiplyVectorDenseMatrix(a, b) {\n // a dense\n var adata = a._data;\n var asize = a._size;\n var adt = a._datatype; // b dense\n\n var bdata = b._data;\n var bsize = b._size;\n var bdt = b._datatype; // rows & columns\n\n var alength = asize[0];\n var bcolumns = bsize[1]; // datatype\n\n var dt; // addScalar signature to use\n\n var af = addScalar; // multiplyScalar signature to use\n\n var mf = multiplyScalar; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n // datatype\n dt = adt; // find signatures that matches (dt, dt)\n\n af = typed.find(addScalar, [dt, dt]);\n mf = typed.find(multiplyScalar, [dt, dt]);\n } // result\n\n\n var c = []; // loop matrix columns\n\n for (var j = 0; j < bcolumns; j++) {\n // sum (do not initialize it with zero)\n var sum = mf(adata[0], bdata[0][j]); // loop vector\n\n for (var i = 1; i < alength; i++) {\n // multiply & accumulate\n sum = af(sum, mf(adata[i], bdata[i][j]));\n }\n\n c[j] = sum;\n } // return matrix\n\n\n return a.createDenseMatrix({\n data: c,\n size: [bcolumns],\n datatype: dt\n });\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a Matrix (MxN)\n * @param {Matrix} b Dense Vector (N)\n *\n * @return {Matrix} Dense Vector (M)\n */\n\n\n var _multiplyMatrixVector = typed('_multiplyMatrixVector', {\n 'DenseMatrix, any': _multiplyDenseMatrixVector,\n 'SparseMatrix, any': _multiplySparseMatrixVector\n });\n /**\n * C = A * B\n *\n * @param {Matrix} a Matrix (MxN)\n * @param {Matrix} b Matrix (NxC)\n *\n * @return {Matrix} Matrix (MxC)\n */\n\n\n var _multiplyMatrixMatrix = typed('_multiplyMatrixMatrix', {\n 'DenseMatrix, DenseMatrix': _multiplyDenseMatrixDenseMatrix,\n 'DenseMatrix, SparseMatrix': _multiplyDenseMatrixSparseMatrix,\n 'SparseMatrix, DenseMatrix': _multiplySparseMatrixDenseMatrix,\n 'SparseMatrix, SparseMatrix': _multiplySparseMatrixSparseMatrix\n });\n /**\n * C = A * B\n *\n * @param {Matrix} a DenseMatrix (MxN)\n * @param {Matrix} b Dense Vector (N)\n *\n * @return {Matrix} Dense Vector (M)\n */\n\n\n function _multiplyDenseMatrixVector(a, b) {\n // a dense\n var adata = a._data;\n var asize = a._size;\n var adt = a._datatype; // b dense\n\n var bdata = b._data;\n var bdt = b._datatype; // rows & columns\n\n var arows = asize[0];\n var acolumns = asize[1]; // datatype\n\n var dt; // addScalar signature to use\n\n var af = addScalar; // multiplyScalar signature to use\n\n var mf = multiplyScalar; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n // datatype\n dt = adt; // find signatures that matches (dt, dt)\n\n af = typed.find(addScalar, [dt, dt]);\n mf = typed.find(multiplyScalar, [dt, dt]);\n } // result\n\n\n var c = []; // loop matrix a rows\n\n for (var i = 0; i < arows; i++) {\n // current row\n var row = adata[i]; // sum (do not initialize it with zero)\n\n var sum = mf(row[0], bdata[0]); // loop matrix a columns\n\n for (var j = 1; j < acolumns; j++) {\n // multiply & accumulate\n sum = af(sum, mf(row[j], bdata[j]));\n }\n\n c[i] = sum;\n } // return matrix\n\n\n return a.createDenseMatrix({\n data: c,\n size: [arows],\n datatype: dt\n });\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a DenseMatrix (MxN)\n * @param {Matrix} b DenseMatrix (NxC)\n *\n * @return {Matrix} DenseMatrix (MxC)\n */\n\n\n function _multiplyDenseMatrixDenseMatrix(a, b) {\n // a dense\n var adata = a._data;\n var asize = a._size;\n var adt = a._datatype; // b dense\n\n var bdata = b._data;\n var bsize = b._size;\n var bdt = b._datatype; // rows & columns\n\n var arows = asize[0];\n var acolumns = asize[1];\n var bcolumns = bsize[1]; // datatype\n\n var dt; // addScalar signature to use\n\n var af = addScalar; // multiplyScalar signature to use\n\n var mf = multiplyScalar; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n // datatype\n dt = adt; // find signatures that matches (dt, dt)\n\n af = typed.find(addScalar, [dt, dt]);\n mf = typed.find(multiplyScalar, [dt, dt]);\n } // result\n\n\n var c = []; // loop matrix a rows\n\n for (var i = 0; i < arows; i++) {\n // current row\n var row = adata[i]; // initialize row array\n\n c[i] = []; // loop matrix b columns\n\n for (var j = 0; j < bcolumns; j++) {\n // sum (avoid initializing sum to zero)\n var sum = mf(row[0], bdata[0][j]); // loop matrix a columns\n\n for (var x = 1; x < acolumns; x++) {\n // multiply & accumulate\n sum = af(sum, mf(row[x], bdata[x][j]));\n }\n\n c[i][j] = sum;\n }\n } // return matrix\n\n\n return a.createDenseMatrix({\n data: c,\n size: [arows, bcolumns],\n datatype: dt\n });\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a DenseMatrix (MxN)\n * @param {Matrix} b SparseMatrix (NxC)\n *\n * @return {Matrix} SparseMatrix (MxC)\n */\n\n\n function _multiplyDenseMatrixSparseMatrix(a, b) {\n // a dense\n var adata = a._data;\n var asize = a._size;\n var adt = a._datatype; // b sparse\n\n var bvalues = b._values;\n var bindex = b._index;\n var bptr = b._ptr;\n var bsize = b._size;\n var bdt = b._datatype; // validate b matrix\n\n if (!bvalues) {\n throw new Error('Cannot multiply Dense Matrix times Pattern only Matrix');\n } // rows & columns\n\n\n var arows = asize[0];\n var bcolumns = bsize[1]; // datatype\n\n var dt; // addScalar signature to use\n\n var af = addScalar; // multiplyScalar signature to use\n\n var mf = multiplyScalar; // equalScalar signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n // datatype\n dt = adt; // find signatures that matches (dt, dt)\n\n af = typed.find(addScalar, [dt, dt]);\n mf = typed.find(multiplyScalar, [dt, dt]);\n eq = typed.find(equalScalar, [dt, dt]); // convert 0 to the same datatype\n\n zero = typed.convert(0, dt);\n } // result\n\n\n var cvalues = [];\n var cindex = [];\n var cptr = []; // c matrix\n\n var c = b.createSparseMatrix({\n values: cvalues,\n index: cindex,\n ptr: cptr,\n size: [arows, bcolumns],\n datatype: dt\n }); // loop b columns\n\n for (var jb = 0; jb < bcolumns; jb++) {\n // update ptr\n cptr[jb] = cindex.length; // indeces in column jb\n\n var kb0 = bptr[jb];\n var kb1 = bptr[jb + 1]; // do not process column jb if no data exists\n\n if (kb1 > kb0) {\n // last row mark processed\n var last = 0; // loop a rows\n\n for (var i = 0; i < arows; i++) {\n // column mark\n var mark = i + 1; // C[i, jb]\n\n var cij = void 0; // values in b column j\n\n for (var kb = kb0; kb < kb1; kb++) {\n // row\n var ib = bindex[kb]; // check value has been initialized\n\n if (last !== mark) {\n // first value in column jb\n cij = mf(adata[i][ib], bvalues[kb]); // update mark\n\n last = mark;\n } else {\n // accumulate value\n cij = af(cij, mf(adata[i][ib], bvalues[kb]));\n }\n } // check column has been processed and value != 0\n\n\n if (last === mark && !eq(cij, zero)) {\n // push row & value\n cindex.push(i);\n cvalues.push(cij);\n }\n }\n }\n } // update ptr\n\n\n cptr[bcolumns] = cindex.length; // return sparse matrix\n\n return c;\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a SparseMatrix (MxN)\n * @param {Matrix} b Dense Vector (N)\n *\n * @return {Matrix} SparseMatrix (M, 1)\n */\n\n\n function _multiplySparseMatrixVector(a, b) {\n // a sparse\n var avalues = a._values;\n var aindex = a._index;\n var aptr = a._ptr;\n var adt = a._datatype; // validate a matrix\n\n if (!avalues) {\n throw new Error('Cannot multiply Pattern only Matrix times Dense Matrix');\n } // b dense\n\n\n var bdata = b._data;\n var bdt = b._datatype; // rows & columns\n\n var arows = a._size[0];\n var brows = b._size[0]; // result\n\n var cvalues = [];\n var cindex = [];\n var cptr = []; // datatype\n\n var dt; // addScalar signature to use\n\n var af = addScalar; // multiplyScalar signature to use\n\n var mf = multiplyScalar; // equalScalar signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n // datatype\n dt = adt; // find signatures that matches (dt, dt)\n\n af = typed.find(addScalar, [dt, dt]);\n mf = typed.find(multiplyScalar, [dt, dt]);\n eq = typed.find(equalScalar, [dt, dt]); // convert 0 to the same datatype\n\n zero = typed.convert(0, dt);\n } // workspace\n\n\n var x = []; // vector with marks indicating a value x[i] exists in a given column\n\n var w = []; // update ptr\n\n cptr[0] = 0; // rows in b\n\n for (var ib = 0; ib < brows; ib++) {\n // b[ib]\n var vbi = bdata[ib]; // check b[ib] != 0, avoid loops\n\n if (!eq(vbi, zero)) {\n // A values & index in ib column\n for (var ka0 = aptr[ib], ka1 = aptr[ib + 1], ka = ka0; ka < ka1; ka++) {\n // a row\n var ia = aindex[ka]; // check value exists in current j\n\n if (!w[ia]) {\n // ia is new entry in j\n w[ia] = true; // add i to pattern of C\n\n cindex.push(ia); // x(ia) = A\n\n x[ia] = mf(vbi, avalues[ka]);\n } else {\n // i exists in C already\n x[ia] = af(x[ia], mf(vbi, avalues[ka]));\n }\n }\n }\n } // copy values from x to column jb of c\n\n\n for (var p1 = cindex.length, p = 0; p < p1; p++) {\n // row\n var ic = cindex[p]; // copy value\n\n cvalues[p] = x[ic];\n } // update ptr\n\n\n cptr[1] = cindex.length; // return sparse matrix\n\n return a.createSparseMatrix({\n values: cvalues,\n index: cindex,\n ptr: cptr,\n size: [arows, 1],\n datatype: dt\n });\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a SparseMatrix (MxN)\n * @param {Matrix} b DenseMatrix (NxC)\n *\n * @return {Matrix} SparseMatrix (MxC)\n */\n\n\n function _multiplySparseMatrixDenseMatrix(a, b) {\n // a sparse\n var avalues = a._values;\n var aindex = a._index;\n var aptr = a._ptr;\n var adt = a._datatype; // validate a matrix\n\n if (!avalues) {\n throw new Error('Cannot multiply Pattern only Matrix times Dense Matrix');\n } // b dense\n\n\n var bdata = b._data;\n var bdt = b._datatype; // rows & columns\n\n var arows = a._size[0];\n var brows = b._size[0];\n var bcolumns = b._size[1]; // datatype\n\n var dt; // addScalar signature to use\n\n var af = addScalar; // multiplyScalar signature to use\n\n var mf = multiplyScalar; // equalScalar signature to use\n\n var eq = equalScalar; // zero value\n\n var zero = 0; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n // datatype\n dt = adt; // find signatures that matches (dt, dt)\n\n af = typed.find(addScalar, [dt, dt]);\n mf = typed.find(multiplyScalar, [dt, dt]);\n eq = typed.find(equalScalar, [dt, dt]); // convert 0 to the same datatype\n\n zero = typed.convert(0, dt);\n } // result\n\n\n var cvalues = [];\n var cindex = [];\n var cptr = []; // c matrix\n\n var c = a.createSparseMatrix({\n values: cvalues,\n index: cindex,\n ptr: cptr,\n size: [arows, bcolumns],\n datatype: dt\n }); // workspace\n\n var x = []; // vector with marks indicating a value x[i] exists in a given column\n\n var w = []; // loop b columns\n\n for (var jb = 0; jb < bcolumns; jb++) {\n // update ptr\n cptr[jb] = cindex.length; // mark in workspace for current column\n\n var mark = jb + 1; // rows in jb\n\n for (var ib = 0; ib < brows; ib++) {\n // b[ib, jb]\n var vbij = bdata[ib][jb]; // check b[ib, jb] != 0, avoid loops\n\n if (!eq(vbij, zero)) {\n // A values & index in ib column\n for (var ka0 = aptr[ib], ka1 = aptr[ib + 1], ka = ka0; ka < ka1; ka++) {\n // a row\n var ia = aindex[ka]; // check value exists in current j\n\n if (w[ia] !== mark) {\n // ia is new entry in j\n w[ia] = mark; // add i to pattern of C\n\n cindex.push(ia); // x(ia) = A\n\n x[ia] = mf(vbij, avalues[ka]);\n } else {\n // i exists in C already\n x[ia] = af(x[ia], mf(vbij, avalues[ka]));\n }\n }\n }\n } // copy values from x to column jb of c\n\n\n for (var p0 = cptr[jb], p1 = cindex.length, p = p0; p < p1; p++) {\n // row\n var ic = cindex[p]; // copy value\n\n cvalues[p] = x[ic];\n }\n } // update ptr\n\n\n cptr[bcolumns] = cindex.length; // return sparse matrix\n\n return c;\n }\n /**\n * C = A * B\n *\n * @param {Matrix} a SparseMatrix (MxN)\n * @param {Matrix} b SparseMatrix (NxC)\n *\n * @return {Matrix} SparseMatrix (MxC)\n */\n\n\n function _multiplySparseMatrixSparseMatrix(a, b) {\n // a sparse\n var avalues = a._values;\n var aindex = a._index;\n var aptr = a._ptr;\n var adt = a._datatype; // b sparse\n\n var bvalues = b._values;\n var bindex = b._index;\n var bptr = b._ptr;\n var bdt = b._datatype; // rows & columns\n\n var arows = a._size[0];\n var bcolumns = b._size[1]; // flag indicating both matrices (a & b) contain data\n\n var values = avalues && bvalues; // datatype\n\n var dt; // addScalar signature to use\n\n var af = addScalar; // multiplyScalar signature to use\n\n var mf = multiplyScalar; // process data types\n\n if (adt && bdt && adt === bdt && typeof adt === 'string') {\n // datatype\n dt = adt; // find signatures that matches (dt, dt)\n\n af = typed.find(addScalar, [dt, dt]);\n mf = typed.find(multiplyScalar, [dt, dt]);\n } // result\n\n\n var cvalues = values ? [] : undefined;\n var cindex = [];\n var cptr = []; // c matrix\n\n var c = a.createSparseMatrix({\n values: cvalues,\n index: cindex,\n ptr: cptr,\n size: [arows, bcolumns],\n datatype: dt\n }); // workspace\n\n var x = values ? [] : undefined; // vector with marks indicating a value x[i] exists in a given column\n\n var w = []; // variables\n\n var ka, ka0, ka1, kb, kb0, kb1, ia, ib; // loop b columns\n\n for (var jb = 0; jb < bcolumns; jb++) {\n // update ptr\n cptr[jb] = cindex.length; // mark in workspace for current column\n\n var mark = jb + 1; // B values & index in j\n\n for (kb0 = bptr[jb], kb1 = bptr[jb + 1], kb = kb0; kb < kb1; kb++) {\n // b row\n ib = bindex[kb]; // check we need to process values\n\n if (values) {\n // loop values in a[:,ib]\n for (ka0 = aptr[ib], ka1 = aptr[ib + 1], ka = ka0; ka < ka1; ka++) {\n // row\n ia = aindex[ka]; // check value exists in current j\n\n if (w[ia] !== mark) {\n // ia is new entry in j\n w[ia] = mark; // add i to pattern of C\n\n cindex.push(ia); // x(ia) = A\n\n x[ia] = mf(bvalues[kb], avalues[ka]);\n } else {\n // i exists in C already\n x[ia] = af(x[ia], mf(bvalues[kb], avalues[ka]));\n }\n }\n } else {\n // loop values in a[:,ib]\n for (ka0 = aptr[ib], ka1 = aptr[ib + 1], ka = ka0; ka < ka1; ka++) {\n // row\n ia = aindex[ka]; // check value exists in current j\n\n if (w[ia] !== mark) {\n // ia is new entry in j\n w[ia] = mark; // add i to pattern of C\n\n cindex.push(ia);\n }\n }\n }\n } // check we need to process matrix values (pattern matrix)\n\n\n if (values) {\n // copy values from x to column jb of c\n for (var p0 = cptr[jb], p1 = cindex.length, p = p0; p < p1; p++) {\n // row\n var ic = cindex[p]; // copy value\n\n cvalues[p] = x[ic];\n }\n }\n } // update ptr\n\n\n cptr[bcolumns] = cindex.length; // return sparse matrix\n\n return c;\n }\n /**\n * Multiply two or more values, `x * y`.\n * For matrices, the matrix product is calculated.\n *\n * Syntax:\n *\n * math.multiply(x, y)\n * math.multiply(x, y, z, ...)\n *\n * Examples:\n *\n * math.multiply(4, 5.2) // returns number 20.8\n * math.multiply(2, 3, 4) // returns number 24\n *\n * const a = math.complex(2, 3)\n * const b = math.complex(4, 1)\n * math.multiply(a, b) // returns Complex 5 + 14i\n *\n * const c = [[1, 2], [4, 3]]\n * const d = [[1, 2, 3], [3, -4, 7]]\n * math.multiply(c, d) // returns Array [[7, -6, 17], [13, -4, 33]]\n *\n * const e = math.unit('2.1 km')\n * math.multiply(3, e) // returns Unit 6.3 km\n *\n * See also:\n *\n * divide, prod, cross, dot\n *\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} x First value to multiply\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} y Second value to multiply\n * @return {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} Multiplication of `x` and `y`\n */\n\n\n return typed(name, extend({\n // we extend the signatures of multiplyScalar with signatures dealing with matrices\n 'Array, Array': function ArrayArray(x, y) {\n // check dimensions\n _validateMatrixDimensions(arraySize(x), arraySize(y)); // use dense matrix implementation\n\n\n var m = this(matrix(x), matrix(y)); // return array or scalar\n\n return isMatrix(m) ? m.valueOf() : m;\n },\n 'Matrix, Matrix': function MatrixMatrix(x, y) {\n // dimensions\n var xsize = x.size();\n var ysize = y.size(); // check dimensions\n\n _validateMatrixDimensions(xsize, ysize); // process dimensions\n\n\n if (xsize.length === 1) {\n // process y dimensions\n if (ysize.length === 1) {\n // Vector * Vector\n return _multiplyVectorVector(x, y, xsize[0]);\n } // Vector * Matrix\n\n\n return _multiplyVectorMatrix(x, y);\n } // process y dimensions\n\n\n if (ysize.length === 1) {\n // Matrix * Vector\n return _multiplyMatrixVector(x, y);\n } // Matrix * Matrix\n\n\n return _multiplyMatrixMatrix(x, y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use Matrix * Matrix implementation\n return this(x, matrix(y));\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use Matrix * Matrix implementation\n return this(matrix(x, y.storage()), y);\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm11(x, y, multiplyScalar, false);\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, multiplyScalar, false);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm11(y, x, multiplyScalar, true);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, multiplyScalar, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, multiplyScalar, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, multiplyScalar, true).valueOf();\n },\n 'any, any': multiplyScalar,\n 'any, any, ...any': function anyAnyAny(x, y, rest) {\n var result = this(x, y);\n\n for (var i = 0; i < rest.length; i++) {\n result = this(result, rest[i]);\n }\n\n return result;\n }\n }, multiplyScalar.signatures));\n});","/**\n * Create a syntax error with the message:\n * 'Wrong number of arguments in function <fn> (<count> provided, <min>-<max> expected)'\n * @param {string} fn Function name\n * @param {number} count Actual argument count\n * @param {number} min Minimum required argument count\n * @param {number} [max] Maximum required argument count\n * @extends Error\n */\nexport function ArgumentsError(fn, count, min, max) {\n if (!(this instanceof ArgumentsError)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n }\n\n this.fn = fn;\n this.count = count;\n this.min = min;\n this.max = max;\n this.message = 'Wrong number of arguments in function ' + fn + ' (' + count + ' provided, ' + min + (max !== undefined && max !== null ? '-' + max : '') + ' expected)';\n this.stack = new Error().stack;\n}\nArgumentsError.prototype = new Error();\nArgumentsError.prototype.constructor = Error;\nArgumentsError.prototype.name = 'ArgumentsError';\nArgumentsError.prototype.isArgumentsError = true;","import { isBigNumber, isMatrix } from '../../utils/is.js';\nimport { DimensionError } from '../../error/DimensionError.js';\nimport { ArgumentsError } from '../../error/ArgumentsError.js';\nimport { isInteger } from '../../utils/number.js';\nimport { format } from '../../utils/string.js';\nimport { clone } from '../../utils/object.js';\nimport { resize as arrayResize } from '../../utils/array.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'resize';\nvar dependencies = ['config', 'matrix'];\nexport var createResize = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n config,\n matrix\n } = _ref;\n\n /**\n * Resize a matrix\n *\n * Syntax:\n *\n * math.resize(x, size)\n * math.resize(x, size, defaultValue)\n *\n * Examples:\n *\n * math.resize([1, 2, 3, 4, 5], [3]) // returns Array [1, 2, 3]\n * math.resize([1, 2, 3], [5], 0) // returns Array [1, 2, 3, 0, 0]\n * math.resize(2, [2, 3], 0) // returns Matrix [[2, 0, 0], [0, 0, 0]]\n * math.resize(\"hello\", [8], \"!\") // returns string 'hello!!!'\n *\n * See also:\n *\n * size, squeeze, subset, reshape\n *\n * @param {Array | Matrix | *} x Matrix to be resized\n * @param {Array | Matrix} size One dimensional array with numbers\n * @param {number | string} [defaultValue=0] Zero by default, except in\n * case of a string, in that case\n * defaultValue = ' '\n * @return {* | Array | Matrix} A resized clone of matrix `x`\n */\n // TODO: rework resize to a typed-function\n return function resize(x, size, defaultValue) {\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw new ArgumentsError('resize', arguments.length, 2, 3);\n }\n\n if (isMatrix(size)) {\n size = size.valueOf(); // get Array\n }\n\n if (isBigNumber(size[0])) {\n // convert bignumbers to numbers\n size = size.map(function (value) {\n return !isBigNumber(value) ? value : value.toNumber();\n });\n } // check x is a Matrix\n\n\n if (isMatrix(x)) {\n // use optimized matrix implementation, return copy\n return x.resize(size, defaultValue, true);\n }\n\n if (typeof x === 'string') {\n // resize string\n return _resizeString(x, size, defaultValue);\n } // check result should be a matrix\n\n\n var asMatrix = Array.isArray(x) ? false : config.matrix !== 'Array';\n\n if (size.length === 0) {\n // output a scalar\n while (Array.isArray(x)) {\n x = x[0];\n }\n\n return clone(x);\n } else {\n // output an array/matrix\n if (!Array.isArray(x)) {\n x = [x];\n }\n\n x = clone(x);\n var res = arrayResize(x, size, defaultValue);\n return asMatrix ? matrix(res) : res;\n }\n };\n /**\n * Resize a string\n * @param {string} str\n * @param {number[]} size\n * @param {string} [defaultChar=' ']\n * @private\n */\n\n function _resizeString(str, size, defaultChar) {\n if (defaultChar !== undefined) {\n if (typeof defaultChar !== 'string' || defaultChar.length !== 1) {\n throw new TypeError('Single character expected as defaultValue');\n }\n } else {\n defaultChar = ' ';\n }\n\n if (size.length !== 1) {\n throw new DimensionError(size.length, 1);\n }\n\n var len = size[0];\n\n if (typeof len !== 'number' || !isInteger(len)) {\n throw new TypeError('Invalid size, must contain positive integers ' + '(size: ' + format(size) + ')');\n }\n\n if (str.length > len) {\n return str.substring(0, len);\n } else if (str.length < len) {\n var res = str;\n\n for (var i = 0, ii = len - str.length; i < ii; i++) {\n res += defaultChar;\n }\n\n return res;\n } else {\n return str;\n }\n }\n});","import { factory } from '../../utils/factory.js';\nimport { isInteger } from '../../utils/number.js';\nimport { arraySize as size } from '../../utils/array.js';\nimport { powNumber } from '../../plain/number/index.js';\nvar name = 'pow';\nvar dependencies = ['typed', 'config', 'identity', 'multiply', 'matrix', 'fraction', 'number', 'Complex'];\nexport var createPow = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n identity,\n multiply,\n matrix,\n number,\n fraction,\n Complex\n } = _ref;\n\n /**\n * Calculates the power of x to y, `x ^ y`.\n * Matrix exponentiation is supported for square matrices `x`, and positive\n * integer exponents `y`.\n *\n * For cubic roots of negative numbers, the function returns the principal\n * root by default. In order to let the function return the real root,\n * math.js can be configured with `math.config({predictable: true})`.\n * To retrieve all cubic roots of a value, use `math.cbrt(x, true)`.\n *\n * Syntax:\n *\n * math.pow(x, y)\n *\n * Examples:\n *\n * math.pow(2, 3) // returns number 8\n *\n * const a = math.complex(2, 3)\n * math.pow(a, 2) // returns Complex -5 + 12i\n *\n * const b = [[1, 2], [4, 3]]\n * math.pow(b, 2) // returns Array [[9, 8], [16, 17]]\n *\n * See also:\n *\n * multiply, sqrt, cbrt, nthRoot\n *\n * @param {number | BigNumber | Complex | Unit | Array | Matrix} x The base\n * @param {number | BigNumber | Complex} y The exponent\n * @return {number | BigNumber | Complex | Array | Matrix} The value of `x` to the power `y`\n */\n return typed(name, {\n 'number, number': _pow,\n 'Complex, Complex': function ComplexComplex(x, y) {\n return x.pow(y);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n if (y.isInteger() || x >= 0 || config.predictable) {\n return x.pow(y);\n } else {\n return new Complex(x.toNumber(), 0).pow(y.toNumber(), 0);\n }\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n if (y.d !== 1) {\n if (config.predictable) {\n throw new Error('Function pow does not support non-integer exponents for fractions.');\n } else {\n return _pow(x.valueOf(), y.valueOf());\n }\n } else {\n return x.pow(y);\n }\n },\n 'Array, number': _powArray,\n 'Array, BigNumber': function ArrayBigNumber(x, y) {\n return _powArray(x, y.toNumber());\n },\n 'Matrix, number': _powMatrix,\n 'Matrix, BigNumber': function MatrixBigNumber(x, y) {\n return _powMatrix(x, y.toNumber());\n },\n 'Unit, number | BigNumber': function UnitNumberBigNumber(x, y) {\n return x.pow(y);\n }\n });\n /**\n * Calculates the power of x to y, x^y, for two numbers.\n * @param {number} x\n * @param {number} y\n * @return {number | Complex} res\n * @private\n */\n\n function _pow(x, y) {\n // Alternatively could define a 'realmode' config option or something, but\n // 'predictable' will work for now\n if (config.predictable && !isInteger(y) && x < 0) {\n // Check to see if y can be represented as a fraction\n try {\n var yFrac = fraction(y);\n var yNum = number(yFrac);\n\n if (y === yNum || Math.abs((y - yNum) / y) < 1e-14) {\n if (yFrac.d % 2 === 1) {\n return (yFrac.n % 2 === 0 ? 1 : -1) * Math.pow(-x, y);\n }\n }\n } catch (ex) {// fraction() throws an error if y is Infinity, etc.\n } // Unable to express y as a fraction, so continue on\n\n } // **for predictable mode** x^Infinity === NaN if x < -1\n // N.B. this behavour is different from `Math.pow` which gives\n // (-2)^Infinity === Infinity\n\n\n if (config.predictable && (x < -1 && y === Infinity || x > -1 && x < 0 && y === -Infinity)) {\n return NaN;\n }\n\n if (isInteger(y) || x >= 0 || config.predictable) {\n return powNumber(x, y);\n } else {\n // TODO: the following infinity checks are duplicated from powNumber. Deduplicate this somehow\n // x^Infinity === 0 if -1 < x < 1\n // A real number 0 is returned instead of complex(0)\n if (x * x < 1 && y === Infinity || x * x > 1 && y === -Infinity) {\n return 0;\n }\n\n return new Complex(x, 0).pow(y, 0);\n }\n }\n /**\n * Calculate the power of a 2d array\n * @param {Array} x must be a 2 dimensional, square matrix\n * @param {number} y a positive, integer value\n * @returns {Array}\n * @private\n */\n\n\n function _powArray(x, y) {\n if (!isInteger(y) || y < 0) {\n throw new TypeError('For A^b, b must be a positive integer (value is ' + y + ')');\n } // verify that A is a 2 dimensional square matrix\n\n\n var s = size(x);\n\n if (s.length !== 2) {\n throw new Error('For A^b, A must be 2 dimensional (A has ' + s.length + ' dimensions)');\n }\n\n if (s[0] !== s[1]) {\n throw new Error('For A^b, A must be square (size is ' + s[0] + 'x' + s[1] + ')');\n }\n\n var res = identity(s[0]).valueOf();\n var px = x;\n\n while (y >= 1) {\n if ((y & 1) === 1) {\n res = multiply(px, res);\n }\n\n y >>= 1;\n px = multiply(px, px);\n }\n\n return res;\n }\n /**\n * Calculate the power of a 2d matrix\n * @param {Matrix} x must be a 2 dimensional, square matrix\n * @param {number} y a positive, integer value\n * @returns {Matrix}\n * @private\n */\n\n\n function _powMatrix(x, y) {\n return matrix(_powArray(x.valueOf(), y));\n }\n});","/* eslint-disable no-loss-of-precision */\nimport { isInteger } from '../../utils/number.js';\nimport { product } from '../../utils/product.js';\nexport function gammaNumber(n) {\n var x;\n\n if (isInteger(n)) {\n if (n <= 0) {\n return isFinite(n) ? Infinity : NaN;\n }\n\n if (n > 171) {\n return Infinity; // Will overflow\n }\n\n return product(1, n - 1);\n }\n\n if (n < 0.5) {\n return Math.PI / (Math.sin(Math.PI * n) * gammaNumber(1 - n));\n }\n\n if (n >= 171.35) {\n return Infinity; // will overflow\n }\n\n if (n > 85.0) {\n // Extended Stirling Approx\n var twoN = n * n;\n var threeN = twoN * n;\n var fourN = threeN * n;\n var fiveN = fourN * n;\n return Math.sqrt(2 * Math.PI / n) * Math.pow(n / Math.E, n) * (1 + 1 / (12 * n) + 1 / (288 * twoN) - 139 / (51840 * threeN) - 571 / (2488320 * fourN) + 163879 / (209018880 * fiveN) + 5246819 / (75246796800 * fiveN * n));\n }\n\n --n;\n x = gammaP[0];\n\n for (var i = 1; i < gammaP.length; ++i) {\n x += gammaP[i] / (n + i);\n }\n\n var t = n + gammaG + 0.5;\n return Math.sqrt(2 * Math.PI) * Math.pow(t, n + 0.5) * Math.exp(-t) * x;\n}\ngammaNumber.signature = 'number'; // TODO: comment on the variables g and p\n\nexport var gammaG = 4.7421875;\nexport var gammaP = [0.99999999999999709182, 57.156235665862923517, -59.597960355475491248, 14.136097974741747174, -0.49191381609762019978, 0.33994649984811888699e-4, 0.46523628927048575665e-4, -0.98374475304879564677e-4, 0.15808870322491248884e-3, -0.21026444172410488319e-3, 0.21743961811521264320e-3, -0.16431810653676389022e-3, 0.84418223983852743293e-4, -0.26190838401581408670e-4, 0.36899182659531622704e-5];","import { factory } from '../../../utils/factory.js';\nimport { deepMap } from '../../../utils/collection.js';\nvar name = 'bignumber';\nvar dependencies = ['typed', 'BigNumber'];\nexport var createBignumber = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n BigNumber\n } = _ref;\n\n /**\n * Create a BigNumber, which can store numbers with arbitrary precision.\n * When a matrix is provided, all elements will be converted to BigNumber.\n *\n * Syntax:\n *\n * math.bignumber(x)\n *\n * Examples:\n *\n * 0.1 + 0.2 // returns number 0.30000000000000004\n * math.bignumber(0.1) + math.bignumber(0.2) // returns BigNumber 0.3\n *\n *\n * 7.2e500 // returns number Infinity\n * math.bignumber('7.2e500') // returns BigNumber 7.2e500\n *\n * See also:\n *\n * boolean, complex, index, matrix, string, unit\n *\n * @param {number | string | Fraction | BigNumber | Array | Matrix | boolean | null} [value] Value for the big number,\n * 0 by default.\n * @returns {BigNumber} The created bignumber\n */\n return typed('bignumber', {\n '': function _() {\n return new BigNumber(0);\n },\n number: function number(x) {\n // convert to string to prevent errors in case of >15 digits\n return new BigNumber(x + '');\n },\n string: function string(x) {\n var match = x.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);\n\n if (match) {\n // x has a word size suffix\n var size = match[2];\n var n = BigNumber(match[1]);\n var twoPowSize = new BigNumber(2).pow(Number(size));\n\n if (n.gt(twoPowSize.sub(1))) {\n throw new SyntaxError(\"String \\\"\".concat(x, \"\\\" is out of range\"));\n }\n\n var twoPowSizeSubOne = new BigNumber(2).pow(Number(size) - 1);\n\n if (n.gte(twoPowSizeSubOne)) {\n return n.sub(twoPowSize);\n } else {\n return n;\n }\n }\n\n return new BigNumber(x);\n },\n BigNumber: function BigNumber(x) {\n // we assume a BigNumber is immutable\n return x;\n },\n Fraction: function Fraction(x) {\n return new BigNumber(x.n).div(x.d).times(x.s);\n },\n null: function _null(x) {\n return new BigNumber(0);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n });\n});","import { typeOf } from '../../utils/is.js';\nimport { factory } from '../../utils/factory.js';\nimport { noBignumber, noFraction } from '../../utils/noop.js';\nvar name = 'numeric';\nvar dependencies = ['number', '?bignumber', '?fraction'];\nexport var createNumeric = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n number: _number,\n bignumber,\n fraction\n } = _ref;\n var validInputTypes = {\n string: true,\n number: true,\n BigNumber: true,\n Fraction: true\n }; // Load the conversion functions for each output type\n\n var validOutputTypes = {\n number: x => _number(x),\n BigNumber: bignumber ? x => bignumber(x) : noBignumber,\n Fraction: fraction ? x => fraction(x) : noFraction\n };\n /**\n * Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.\n *\n * Syntax:\n *\n * math.numeric(x)\n *\n * Examples:\n *\n * math.numeric('4') // returns number 4\n * math.numeric('4', 'number') // returns number 4\n * math.numeric('4', 'BigNumber') // returns BigNumber 4\n * math.numeric('4', 'Fraction') // returns Fraction 4\n * math.numeric(4, 'Fraction') // returns Fraction 4\n * math.numeric(math.fraction(2, 5), 'number') // returns number 0.4\n *\n * See also:\n *\n * number, fraction, bignumber, string, format\n *\n * @param {string | number | BigNumber | Fraction } value\n * A numeric value or a string containing a numeric value\n * @param {string} outputType\n * Desired numeric output type.\n * Available values: 'number', 'BigNumber', or 'Fraction'\n * @return {number | BigNumber | Fraction}\n * Returns an instance of the numeric in the requested type\n */\n\n return function numeric(value, outputType) {\n var inputType = typeOf(value);\n\n if (!(inputType in validInputTypes)) {\n throw new TypeError('Cannot convert ' + value + ' of type \"' + inputType + '\"; valid input types are ' + Object.keys(validInputTypes).join(', '));\n }\n\n if (!(outputType in validOutputTypes)) {\n throw new TypeError('Cannot convert ' + value + ' to type \"' + outputType + '\"; valid output types are ' + Object.keys(validOutputTypes).join(', '));\n }\n\n if (outputType === inputType) {\n return value;\n } else {\n return validOutputTypes[outputType](value);\n }\n };\n});","import Decimal from 'decimal.js';\nimport { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nimport { nearlyEqual } from '../../utils/number.js';\nimport { nearlyEqual as bigNearlyEqual } from '../../utils/bignumber/nearlyEqual.js';\nimport { ceilNumber } from '../../plain/number/index.js';\nimport { createAlgorithm11 } from '../../type/matrix/utils/algorithm11.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nvar name = 'ceil';\nvar dependencies = ['typed', 'config', 'round', 'matrix', 'equalScalar'];\nexport var createCeil = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n config,\n round,\n matrix,\n equalScalar\n } = _ref;\n var algorithm11 = createAlgorithm11({\n typed,\n equalScalar\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Round a value towards plus infinity\n * If `x` is complex, both real and imaginary part are rounded towards plus infinity.\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.ceil(x)\n * math.ceil(x, n)\n *\n * Examples:\n *\n * math.ceil(3.2) // returns number 4\n * math.ceil(3.8) // returns number 4\n * math.ceil(-4.2) // returns number -4\n * math.ceil(-4.7) // returns number -4\n *\n * math.ceil(3.212, 2) // returns number 3.22\n * math.ceil(3.288, 2) // returns number 3.29\n * math.ceil(-4.212, 2) // returns number -4.21\n * math.ceil(-4.782, 2) // returns number -4.78\n *\n * const c = math.complex(3.24, -2.71)\n * math.ceil(c) // returns Complex 4 - 2i\n * math.ceil(c, 1) // returns Complex 3.3 - 2.7i\n *\n * math.ceil([3.2, 3.8, -4.7]) // returns Array [4, 4, -4]\n * math.ceil([3.21, 3.82, -4.71], 1) // returns Array [3.3, 3.9, -4.7]\n *\n * See also:\n *\n * floor, fix, round\n *\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix} x Number to be rounded\n * @param {number | BigNumber | Array} [n=0] Number of decimals\n * @return {number | BigNumber | Fraction | Complex | Array | Matrix} Rounded value\n */\n\n return typed('ceil', {\n number: function number(x) {\n if (nearlyEqual(x, round(x), config.epsilon)) {\n return round(x);\n } else {\n return ceilNumber(x);\n }\n },\n 'number, number': function numberNumber(x, n) {\n if (nearlyEqual(x, round(x, n), config.epsilon)) {\n return round(x, n);\n } else {\n var [number, exponent] = \"\".concat(x, \"e\").split('e');\n var result = Math.ceil(Number(\"\".concat(number, \"e\").concat(Number(exponent) + n)));\n [number, exponent] = \"\".concat(result, \"e\").split('e');\n return Number(\"\".concat(number, \"e\").concat(Number(exponent) - n));\n }\n },\n Complex: function Complex(x) {\n return x.ceil();\n },\n 'Complex, number': function ComplexNumber(x, n) {\n return x.ceil(n);\n },\n BigNumber: function BigNumber(x) {\n if (bigNearlyEqual(x, round(x), config.epsilon)) {\n return round(x);\n } else {\n return x.ceil();\n }\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, n) {\n if (bigNearlyEqual(x, round(x, n), config.epsilon)) {\n return round(x, n);\n } else {\n return x.toDecimalPlaces(n.toNumber(), Decimal.ROUND_CEIL);\n }\n },\n Fraction: function Fraction(x) {\n return x.ceil();\n },\n 'Fraction, number': function FractionNumber(x, n) {\n return x.ceil(n);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since ceil(0) = 0\n return deepMap(x, this, true);\n },\n 'Array | Matrix, number': function ArrayMatrixNumber(x, n) {\n // deep map collection, skip zeros since ceil(0) = 0\n return deepMap(x, i => this(i, n), true);\n },\n 'SparseMatrix, number | BigNumber': function SparseMatrixNumberBigNumber(x, y) {\n return algorithm11(x, y, this, false);\n },\n 'DenseMatrix, number | BigNumber': function DenseMatrixNumberBigNumber(x, y) {\n return algorithm14(x, y, this, false);\n },\n 'number | Complex | BigNumber, Array': function numberComplexBigNumberArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { DimensionError } from '../../error/DimensionError.js';\nimport { createAlgorithm01 } from '../../type/matrix/utils/algorithm01.js';\nimport { createAlgorithm03 } from '../../type/matrix/utils/algorithm03.js';\nimport { createAlgorithm05 } from '../../type/matrix/utils/algorithm05.js';\nimport { createAlgorithm10 } from '../../type/matrix/utils/algorithm10.js';\nimport { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nvar name = 'subtract';\nvar dependencies = ['typed', 'matrix', 'equalScalar', 'addScalar', 'unaryMinus', 'DenseMatrix'];\nexport var createSubtract = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n equalScalar,\n addScalar,\n unaryMinus,\n DenseMatrix\n } = _ref;\n // TODO: split function subtract in two: subtract and subtractScalar\n var algorithm01 = createAlgorithm01({\n typed\n });\n var algorithm03 = createAlgorithm03({\n typed\n });\n var algorithm05 = createAlgorithm05({\n typed,\n equalScalar\n });\n var algorithm10 = createAlgorithm10({\n typed,\n DenseMatrix\n });\n var algorithm13 = createAlgorithm13({\n typed\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Subtract two values, `x - y`.\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.subtract(x, y)\n *\n * Examples:\n *\n * math.subtract(5.3, 2) // returns number 3.3\n *\n * const a = math.complex(2, 3)\n * const b = math.complex(4, 1)\n * math.subtract(a, b) // returns Complex -2 + 2i\n *\n * math.subtract([5, 7, 4], 4) // returns Array [1, 3, 0]\n *\n * const c = math.unit('2.1 km')\n * const d = math.unit('500m')\n * math.subtract(c, d) // returns Unit 1.6 km\n *\n * See also:\n *\n * add\n *\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} x\n * Initial value\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} y\n * Value to subtract from `x`\n * @return {number | BigNumber | Fraction | Complex | Unit | Array | Matrix}\n * Subtraction of `x` and `y`\n */\n\n return typed(name, {\n 'number, number': function numberNumber(x, y) {\n return x - y;\n },\n 'Complex, Complex': function ComplexComplex(x, y) {\n return x.sub(y);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return x.minus(y);\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return x.sub(y);\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n if (x.value === null) {\n throw new Error('Parameter x contains a unit with undefined value');\n }\n\n if (y.value === null) {\n throw new Error('Parameter y contains a unit with undefined value');\n }\n\n if (!x.equalBase(y)) {\n throw new Error('Units do not match');\n }\n\n var res = x.clone();\n res.value = this(res.value, y.value);\n res.fixPrefix = false;\n return res;\n },\n 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {\n checkEqualDimensions(x, y);\n return algorithm05(x, y, this);\n },\n 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {\n checkEqualDimensions(x, y);\n return algorithm03(y, x, this, true);\n },\n 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {\n checkEqualDimensions(x, y);\n return algorithm01(x, y, this, false);\n },\n 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {\n checkEqualDimensions(x, y);\n return algorithm13(x, y, this);\n },\n 'Array, Array': function ArrayArray(x, y) {\n // use matrix implementation\n return this(matrix(x), matrix(y)).valueOf();\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use matrix implementation\n return this(matrix(x), y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use matrix implementation\n return this(x, matrix(y));\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm10(x, unaryMinus(y), addScalar);\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, this);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm10(y, x, this, true);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, this, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, this, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n });\n});\n/**\n * Check whether matrix x and y have the same number of dimensions.\n * Throws a DimensionError when dimensions are not equal\n * @param {Matrix} x\n * @param {Matrix} y\n */\n\nfunction checkEqualDimensions(x, y) {\n var xsize = x.size();\n var ysize = y.size();\n\n if (xsize.length !== ysize.length) {\n throw new DimensionError(xsize.length, ysize.length);\n }\n}","import { arraySize, squeeze } from '../../utils/array.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'cross';\nvar dependencies = ['typed', 'matrix', 'subtract', 'multiply'];\nexport var createCross = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n subtract,\n multiply\n } = _ref;\n\n /**\n * Calculate the cross product for two vectors in three dimensional space.\n * The cross product of `A = [a1, a2, a3]` and `B = [b1, b2, b3]` is defined\n * as:\n *\n * cross(A, B) = [\n * a2 * b3 - a3 * b2,\n * a3 * b1 - a1 * b3,\n * a1 * b2 - a2 * b1\n * ]\n *\n * If one of the input vectors has a dimension greater than 1, the output\n * vector will be a 1x3 (2-dimensional) matrix.\n *\n * Syntax:\n *\n * math.cross(x, y)\n *\n * Examples:\n *\n * math.cross([1, 1, 0], [0, 1, 1]) // Returns [1, -1, 1]\n * math.cross([3, -3, 1], [4, 9, 2]) // Returns [-15, -2, 39]\n * math.cross([2, 3, 4], [5, 6, 7]) // Returns [-3, 6, -3]\n * math.cross([[1, 2, 3]], [[4], [5], [6]]) // Returns [[-3, 6, -3]]\n *\n * See also:\n *\n * dot, multiply\n *\n * @param {Array | Matrix} x First vector\n * @param {Array | Matrix} y Second vector\n * @return {Array | Matrix} Returns the cross product of `x` and `y`\n */\n return typed(name, {\n 'Matrix, Matrix': function MatrixMatrix(x, y) {\n return matrix(_cross(x.toArray(), y.toArray()));\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n return matrix(_cross(x.toArray(), y));\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n return matrix(_cross(x, y.toArray()));\n },\n 'Array, Array': _cross\n });\n /**\n * Calculate the cross product for two arrays\n * @param {Array} x First vector\n * @param {Array} y Second vector\n * @returns {Array} Returns the cross product of x and y\n * @private\n */\n\n function _cross(x, y) {\n var highestDimension = Math.max(arraySize(x).length, arraySize(y).length);\n x = squeeze(x);\n y = squeeze(y);\n var xSize = arraySize(x);\n var ySize = arraySize(y);\n\n if (xSize.length !== 1 || ySize.length !== 1 || xSize[0] !== 3 || ySize[0] !== 3) {\n throw new RangeError('Vectors with length 3 expected ' + '(Size A = [' + xSize.join(', ') + '], B = [' + ySize.join(', ') + '])');\n }\n\n var product = [subtract(multiply(x[1], y[2]), multiply(x[2], y[1])), subtract(multiply(x[2], y[0]), multiply(x[0], y[2])), subtract(multiply(x[0], y[1]), multiply(x[1], y[0]))];\n\n if (highestDimension > 1) {\n return [product];\n } else {\n return product;\n }\n }\n});","import { factory } from '../../utils/factory.js';\nimport { createAlgorithm03 } from '../../type/matrix/utils/algorithm03.js';\nimport { createAlgorithm07 } from '../../type/matrix/utils/algorithm07.js';\nimport { createAlgorithm12 } from '../../type/matrix/utils/algorithm12.js';\nimport { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nvar name = 'equal';\nvar dependencies = ['typed', 'matrix', 'equalScalar', 'DenseMatrix'];\nexport var createEqual = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n equalScalar,\n DenseMatrix\n } = _ref;\n var algorithm03 = createAlgorithm03({\n typed\n });\n var algorithm07 = createAlgorithm07({\n typed,\n DenseMatrix\n });\n var algorithm12 = createAlgorithm12({\n typed,\n DenseMatrix\n });\n var algorithm13 = createAlgorithm13({\n typed\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Test whether two values are equal.\n *\n * The function tests whether the relative difference between x and y is\n * smaller than the configured epsilon. The function cannot be used to\n * compare values smaller than approximately 2.22e-16.\n *\n * For matrices, the function is evaluated element wise.\n * In case of complex numbers, x.re must equal y.re, and x.im must equal y.im.\n *\n * Values `null` and `undefined` are compared strictly, thus `null` is only\n * equal to `null` and nothing else, and `undefined` is only equal to\n * `undefined` and nothing else. Strings are compared by their numerical value.\n *\n * Syntax:\n *\n * math.equal(x, y)\n *\n * Examples:\n *\n * math.equal(2 + 2, 3) // returns false\n * math.equal(2 + 2, 4) // returns true\n *\n * const a = math.unit('50 cm')\n * const b = math.unit('5 m')\n * math.equal(a, b) // returns true\n *\n * const c = [2, 5, 1]\n * const d = [2, 7, 1]\n *\n * math.equal(c, d) // returns [true, false, true]\n * math.deepEqual(c, d) // returns false\n *\n * math.equal(\"1000\", \"1e3\") // returns true\n * math.equal(0, null) // returns false\n *\n * See also:\n *\n * unequal, smaller, smallerEq, larger, largerEq, compare, deepEqual, equalText\n *\n * @param {number | BigNumber | boolean | Complex | Unit | string | Array | Matrix} x First value to compare\n * @param {number | BigNumber | boolean | Complex | Unit | string | Array | Matrix} y Second value to compare\n * @return {boolean | Array | Matrix} Returns true when the compared values are equal, else returns false\n */\n\n return typed(name, {\n 'any, any': function anyAny(x, y) {\n // strict equality for null and undefined?\n if (x === null) {\n return y === null;\n }\n\n if (y === null) {\n return x === null;\n }\n\n if (x === undefined) {\n return y === undefined;\n }\n\n if (y === undefined) {\n return x === undefined;\n }\n\n return equalScalar(x, y);\n },\n 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {\n return algorithm07(x, y, equalScalar);\n },\n 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {\n return algorithm03(y, x, equalScalar, true);\n },\n 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {\n return algorithm03(x, y, equalScalar, false);\n },\n 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {\n return algorithm13(x, y, equalScalar);\n },\n 'Array, Array': function ArrayArray(x, y) {\n // use matrix implementation\n return this(matrix(x), matrix(y)).valueOf();\n },\n 'Array, Matrix': function ArrayMatrix(x, y) {\n // use matrix implementation\n return this(matrix(x), y);\n },\n 'Matrix, Array': function MatrixArray(x, y) {\n // use matrix implementation\n return this(x, matrix(y));\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm12(x, y, equalScalar, false);\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, equalScalar, false);\n },\n 'any, SparseMatrix': function anySparseMatrix(x, y) {\n return algorithm12(y, x, equalScalar, true);\n },\n 'any, DenseMatrix': function anyDenseMatrix(x, y) {\n return algorithm14(y, x, equalScalar, true);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, equalScalar, false).valueOf();\n },\n 'any, Array': function anyArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, equalScalar, true).valueOf();\n }\n });\n});\nexport var createEqualNumber = factory(name, ['typed', 'equalScalar'], (_ref2) => {\n var {\n typed,\n equalScalar\n } = _ref2;\n return typed(name, {\n 'any, any': function anyAny(x, y) {\n // strict equality for null and undefined?\n if (x === null) {\n return y === null;\n }\n\n if (y === null) {\n return x === null;\n }\n\n if (x === undefined) {\n return y === undefined;\n }\n\n if (y === undefined) {\n return x === undefined;\n }\n\n return equalScalar(x, y);\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { deepMap } from '../../utils/collection.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nvar name = 'fix';\nvar dependencies = ['typed', 'Complex', 'matrix', 'ceil', 'floor'];\nexport var createFix = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n Complex: _Complex,\n matrix,\n ceil,\n floor\n } = _ref;\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Round a value towards zero.\n * For matrices, the function is evaluated element wise.\n *\n * Syntax:\n *\n * math.fix(x)\n *\n * Examples:\n *\n * math.fix(3.2) // returns number 3\n * math.fix(3.8) // returns number 3\n * math.fix(-4.2) // returns number -4\n * math.fix(-4.7) // returns number -4\n *\n * math.fix(3.12, 1) // returns number 3.1\n * math.fix(3.18, 1) // returns number 3.1\n * math.fix(-4.12, 1) // returns number -4.1\n * math.fix(-4.17, 1) // returns number -4.1\n *\n * const c = math.complex(3.22, -2.78)\n * math.fix(c) // returns Complex 3 - 2i\n * math.fix(c, 1) // returns Complex 3.2 - 2.7i\n *\n * math.fix([3.2, 3.8, -4.7]) // returns Array [3, 3, -4]\n * math.fix([3.2, 3.8, -4.7], 1) // returns Array [3.2, 3.8, -4.7]\n *\n * See also:\n *\n * ceil, floor, round\n *\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix} x Number to be rounded\n * @param {number | BigNumber | Array} [n=0] Number of decimals\n * @return {number | BigNumber | Fraction | Complex | Array | Matrix} Rounded value\n */\n\n return typed('fix', {\n number: function number(x) {\n return x > 0 ? floor(x) : ceil(x);\n },\n 'number, number | BigNumber': function numberNumberBigNumber(x, n) {\n return x > 0 ? floor(x, n) : ceil(x, n);\n },\n Complex: function Complex(x) {\n return new _Complex(x.re > 0 ? Math.floor(x.re) : Math.ceil(x.re), x.im > 0 ? Math.floor(x.im) : Math.ceil(x.im));\n },\n 'Complex, number | BigNumber': function ComplexNumberBigNumber(x, n) {\n return new _Complex(x.re > 0 ? floor(x.re, n) : ceil(x.re, n), x.im > 0 ? floor(x.im, n) : ceil(x.im, n));\n },\n BigNumber: function BigNumber(x) {\n return x.isNegative() ? ceil(x) : floor(x);\n },\n 'BigNumber, number | BigNumber': function BigNumberNumberBigNumber(x, n) {\n return x.isNegative() ? ceil(x, n) : floor(x, n);\n },\n Fraction: function Fraction(x) {\n return x.s < 0 ? x.ceil() : x.floor();\n },\n 'Fraction, number | BigNumber': function FractionNumberBigNumber(x, n) {\n return x.s < 0 ? x.ceil(n) : x.floor(n);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n // deep map collection, skip zeros since fix(0) = 0\n return deepMap(x, this, true);\n },\n 'Array | Matrix, number | BigNumber': function ArrayMatrixNumberBigNumber(x, n) {\n // deep map collection, skip zeros since fix(0) = 0\n return deepMap(x, i => this(i, n), true);\n },\n 'number | Complex | BigNumber, Array': function numberComplexBigNumberArray(x, y) {\n // use matrix implementation\n return algorithm14(matrix(y), x, this, true).valueOf();\n }\n });\n});","import { factory } from '../../utils/factory.js';\nimport { typeOf } from '../../utils/is.js';\nvar name = 'divideScalar';\nvar dependencies = ['typed', 'numeric'];\nexport var createDivideScalar = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n numeric\n } = _ref;\n\n /**\n * Divide two scalar values, `x / y`.\n * This function is meant for internal use: it is used by the public functions\n * `divide` and `inv`.\n *\n * This function does not support collections (Array or Matrix).\n *\n * @param {number | BigNumber | Fraction | Complex | Unit} x Numerator\n * @param {number | BigNumber | Fraction | Complex} y Denominator\n * @return {number | BigNumber | Fraction | Complex | Unit} Quotient, `x / y`\n * @private\n */\n return typed(name, {\n 'number, number': function numberNumber(x, y) {\n return x / y;\n },\n 'Complex, Complex': function ComplexComplex(x, y) {\n return x.div(y);\n },\n 'BigNumber, BigNumber': function BigNumberBigNumber(x, y) {\n return x.div(y);\n },\n 'Fraction, Fraction': function FractionFraction(x, y) {\n return x.div(y);\n },\n 'Unit, number | Fraction | BigNumber': function UnitNumberFractionBigNumber(x, y) {\n var res = x.clone(); // TODO: move the divide function to Unit.js, it uses internals of Unit\n\n var one = numeric(1, typeOf(y));\n res.value = this(res.value === null ? res._normalize(one) : res.value, y);\n return res;\n },\n 'number | Fraction | BigNumber, Unit': function numberFractionBigNumberUnit(x, y) {\n var res = y.clone();\n res = res.pow(-1); // TODO: move the divide function to Unit.js, it uses internals of Unit\n\n var one = numeric(1, typeOf(x));\n res.value = this(x, y.value === null ? y._normalize(one) : y.value);\n return res;\n },\n 'Unit, Unit': function UnitUnit(x, y) {\n return x.divide(y);\n }\n });\n});","import { factory } from '../../../utils/factory.js';\nimport { createSolveValidation } from './utils/solveValidation.js';\nvar name = 'lsolve';\nvar dependencies = ['typed', 'matrix', 'divideScalar', 'multiplyScalar', 'subtract', 'equalScalar', 'DenseMatrix'];\nexport var createLsolve = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n divideScalar,\n multiplyScalar,\n subtract,\n equalScalar,\n DenseMatrix\n } = _ref;\n var solveValidation = createSolveValidation({\n DenseMatrix\n });\n /**\n * Finds one solution of a linear equation system by forwards substitution. Matrix must be a lower triangular matrix. Throws an error if there's no solution.\n *\n * `L * x = b`\n *\n * Syntax:\n *\n * math.lsolve(L, b)\n *\n * Examples:\n *\n * const a = [[-2, 3], [2, 1]]\n * const b = [11, 9]\n * const x = lsolve(a, b) // [[-5.5], [20]]\n *\n * See also:\n *\n * lsolveAll, lup, slu, usolve, lusolve\n *\n * @param {Matrix, Array} L A N x N matrix or array (L)\n * @param {Matrix, Array} b A column vector with the b values\n *\n * @return {DenseMatrix | Array} A column vector with the linear system solution (x)\n */\n\n return typed(name, {\n 'SparseMatrix, Array | Matrix': function SparseMatrixArrayMatrix(m, b) {\n return _sparseForwardSubstitution(m, b);\n },\n 'DenseMatrix, Array | Matrix': function DenseMatrixArrayMatrix(m, b) {\n return _denseForwardSubstitution(m, b);\n },\n 'Array, Array | Matrix': function ArrayArrayMatrix(a, b) {\n var m = matrix(a);\n\n var r = _denseForwardSubstitution(m, b);\n\n return r.valueOf();\n }\n });\n\n function _denseForwardSubstitution(m, b) {\n // validate matrix and vector, return copy of column vector b\n b = solveValidation(m, b, true);\n var bdata = b._data;\n var rows = m._size[0];\n var columns = m._size[1]; // result\n\n var x = [];\n var mdata = m._data; // loop columns\n\n for (var j = 0; j < columns; j++) {\n var bj = bdata[j][0] || 0;\n var xj = void 0;\n\n if (!equalScalar(bj, 0)) {\n // non-degenerate row, find solution\n var vjj = mdata[j][j];\n\n if (equalScalar(vjj, 0)) {\n throw new Error('Linear system cannot be solved since matrix is singular');\n }\n\n xj = divideScalar(bj, vjj); // loop rows\n\n for (var i = j + 1; i < rows; i++) {\n bdata[i] = [subtract(bdata[i][0] || 0, multiplyScalar(xj, mdata[i][j]))];\n }\n } else {\n // degenerate row, we can choose any value\n xj = 0;\n }\n\n x[j] = [xj];\n }\n\n return new DenseMatrix({\n data: x,\n size: [rows, 1]\n });\n }\n\n function _sparseForwardSubstitution(m, b) {\n // validate matrix and vector, return copy of column vector b\n b = solveValidation(m, b, true);\n var bdata = b._data;\n var rows = m._size[0];\n var columns = m._size[1];\n var values = m._values;\n var index = m._index;\n var ptr = m._ptr; // result\n\n var x = []; // loop columns\n\n for (var j = 0; j < columns; j++) {\n var bj = bdata[j][0] || 0;\n\n if (!equalScalar(bj, 0)) {\n // non-degenerate row, find solution\n var vjj = 0; // matrix values & indices (column j)\n\n var jValues = [];\n var jIndices = []; // first and last index in the column\n\n var firstIndex = ptr[j];\n var lastIndex = ptr[j + 1]; // values in column, find value at [j, j]\n\n for (var k = firstIndex; k < lastIndex; k++) {\n var i = index[k]; // check row (rows are not sorted!)\n\n if (i === j) {\n vjj = values[k];\n } else if (i > j) {\n // store lower triangular\n jValues.push(values[k]);\n jIndices.push(i);\n }\n } // at this point we must have a value in vjj\n\n\n if (equalScalar(vjj, 0)) {\n throw new Error('Linear system cannot be solved since matrix is singular');\n }\n\n var xj = divideScalar(bj, vjj);\n\n for (var _k = 0, l = jIndices.length; _k < l; _k++) {\n var _i = jIndices[_k];\n bdata[_i] = [subtract(bdata[_i][0] || 0, multiplyScalar(xj, jValues[_k]))];\n }\n\n x[j] = [xj];\n } else {\n // degenerate row, we can choose any value\n x[j] = [0];\n }\n }\n\n return new DenseMatrix({\n data: x,\n size: [rows, 1]\n });\n }\n});","import { factory } from '../../utils/factory.js';\nvar name = 'Spa';\nvar dependencies = ['addScalar', 'equalScalar', 'FibonacciHeap'];\nexport var createSpaClass = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n addScalar,\n equalScalar,\n FibonacciHeap\n } = _ref;\n\n /**\n * An ordered Sparse Accumulator is a representation for a sparse vector that includes a dense array\n * of the vector elements and an ordered list of non-zero elements.\n */\n function Spa() {\n if (!(this instanceof Spa)) {\n throw new SyntaxError('Constructor must be called with the new operator');\n } // allocate vector, TODO use typed arrays\n\n\n this._values = [];\n this._heap = new FibonacciHeap();\n }\n /**\n * Attach type information\n */\n\n\n Spa.prototype.type = 'Spa';\n Spa.prototype.isSpa = true;\n /**\n * Set the value for index i.\n *\n * @param {number} i The index\n * @param {number | BigNumber | Complex} The value at index i\n */\n\n Spa.prototype.set = function (i, v) {\n // check we have a value @ i\n if (!this._values[i]) {\n // insert in heap\n var node = this._heap.insert(i, v); // set the value @ i\n\n\n this._values[i] = node;\n } else {\n // update the value @ i\n this._values[i].value = v;\n }\n };\n\n Spa.prototype.get = function (i) {\n var node = this._values[i];\n\n if (node) {\n return node.value;\n }\n\n return 0;\n };\n\n Spa.prototype.accumulate = function (i, v) {\n // node @ i\n var node = this._values[i];\n\n if (!node) {\n // insert in heap\n node = this._heap.insert(i, v); // initialize value\n\n this._values[i] = node;\n } else {\n // accumulate value\n node.value = addScalar(node.value, v);\n }\n };\n\n Spa.prototype.forEach = function (from, to, callback) {\n // references\n var heap = this._heap;\n var values = this._values; // nodes\n\n var nodes = []; // node with minimum key, save it\n\n var node = heap.extractMinimum();\n\n if (node) {\n nodes.push(node);\n } // extract nodes from heap (ordered)\n\n\n while (node && node.key <= to) {\n // check it is in range\n if (node.key >= from) {\n // check value is not zero\n if (!equalScalar(node.value, 0)) {\n // invoke callback\n callback(node.key, node.value, this);\n }\n } // extract next node, save it\n\n\n node = heap.extractMinimum();\n\n if (node) {\n nodes.push(node);\n }\n } // reinsert all nodes in heap\n\n\n for (var i = 0; i < nodes.length; i++) {\n // current node\n var n = nodes[i]; // insert node in heap\n\n node = heap.insert(n.key, n.value); // update values\n\n values[node.key] = node;\n }\n };\n\n Spa.prototype.swap = function (i, j) {\n // node @ i and j\n var nodei = this._values[i];\n var nodej = this._values[j]; // check we need to insert indeces\n\n if (!nodei && nodej) {\n // insert in heap\n nodei = this._heap.insert(i, nodej.value); // remove from heap\n\n this._heap.remove(nodej); // set values\n\n\n this._values[i] = nodei;\n this._values[j] = undefined;\n } else if (nodei && !nodej) {\n // insert in heap\n nodej = this._heap.insert(j, nodei.value); // remove from heap\n\n this._heap.remove(nodei); // set values\n\n\n this._values[j] = nodej;\n this._values[i] = undefined;\n } else if (nodei && nodej) {\n // swap values\n var v = nodei.value;\n nodei.value = nodej.value;\n nodej.value = v;\n }\n };\n\n return Spa;\n}, {\n isClass: true\n});","import { clone } from '../../../utils/object.js';\nimport { factory } from '../../../utils/factory.js';\nvar name = 'lup';\nvar dependencies = ['typed', 'matrix', 'abs', 'addScalar', 'divideScalar', 'multiplyScalar', 'subtract', 'larger', 'equalScalar', 'unaryMinus', 'DenseMatrix', 'SparseMatrix', 'Spa'];\nexport var createLup = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n abs,\n addScalar,\n divideScalar,\n multiplyScalar,\n subtract,\n larger,\n equalScalar,\n unaryMinus,\n DenseMatrix,\n SparseMatrix,\n Spa\n } = _ref;\n\n /**\n * Calculate the Matrix LU decomposition with partial pivoting. Matrix `A` is decomposed in two matrices (`L`, `U`) and a\n * row permutation vector `p` where `A[p,:] = L * U`\n *\n * Syntax:\n *\n * math.lup(A)\n *\n * Example:\n *\n * const m = [[2, 1], [1, 4]]\n * const r = math.lup(m)\n * // r = {\n * // L: [[1, 0], [0.5, 1]],\n * // U: [[2, 1], [0, 3.5]],\n * // P: [0, 1]\n * // }\n *\n * See also:\n *\n * slu, lsolve, lusolve, usolve\n *\n * @param {Matrix | Array} A A two dimensional matrix or array for which to get the LUP decomposition.\n *\n * @return {{L: Array | Matrix, U: Array | Matrix, P: Array.<number>}} The lower triangular matrix, the upper triangular matrix and the permutation matrix.\n */\n return typed(name, {\n DenseMatrix: function DenseMatrix(m) {\n return _denseLUP(m);\n },\n SparseMatrix: function SparseMatrix(m) {\n return _sparseLUP(m);\n },\n Array: function Array(a) {\n // create dense matrix from array\n var m = matrix(a); // lup, use matrix implementation\n\n var r = _denseLUP(m); // result\n\n\n return {\n L: r.L.valueOf(),\n U: r.U.valueOf(),\n p: r.p\n };\n }\n });\n\n function _denseLUP(m) {\n // rows & columns\n var rows = m._size[0];\n var columns = m._size[1]; // minimum rows and columns\n\n var n = Math.min(rows, columns); // matrix array, clone original data\n\n var data = clone(m._data); // l matrix arrays\n\n var ldata = [];\n var lsize = [rows, n]; // u matrix arrays\n\n var udata = [];\n var usize = [n, columns]; // vars\n\n var i, j, k; // permutation vector\n\n var p = [];\n\n for (i = 0; i < rows; i++) {\n p[i] = i;\n } // loop columns\n\n\n for (j = 0; j < columns; j++) {\n // skip first column in upper triangular matrix\n if (j > 0) {\n // loop rows\n for (i = 0; i < rows; i++) {\n // min i,j\n var min = Math.min(i, j); // v[i, j]\n\n var s = 0; // loop up to min\n\n for (k = 0; k < min; k++) {\n // s = l[i, k] - data[k, j]\n s = addScalar(s, multiplyScalar(data[i][k], data[k][j]));\n }\n\n data[i][j] = subtract(data[i][j], s);\n }\n } // row with larger value in cvector, row >= j\n\n\n var pi = j;\n var pabsv = 0;\n var vjj = 0; // loop rows\n\n for (i = j; i < rows; i++) {\n // data @ i, j\n var v = data[i][j]; // absolute value\n\n var absv = abs(v); // value is greater than pivote value\n\n if (larger(absv, pabsv)) {\n // store row\n pi = i; // update max value\n\n pabsv = absv; // value @ [j, j]\n\n vjj = v;\n }\n } // swap rows (j <-> pi)\n\n\n if (j !== pi) {\n // swap values j <-> pi in p\n p[j] = [p[pi], p[pi] = p[j]][0]; // swap j <-> pi in data\n\n DenseMatrix._swapRows(j, pi, data);\n } // check column is in lower triangular matrix\n\n\n if (j < rows) {\n // loop rows (lower triangular matrix)\n for (i = j + 1; i < rows; i++) {\n // value @ i, j\n var vij = data[i][j];\n\n if (!equalScalar(vij, 0)) {\n // update data\n data[i][j] = divideScalar(data[i][j], vjj);\n }\n }\n }\n } // loop columns\n\n\n for (j = 0; j < columns; j++) {\n // loop rows\n for (i = 0; i < rows; i++) {\n // initialize row in arrays\n if (j === 0) {\n // check row exists in upper triangular matrix\n if (i < columns) {\n // U\n udata[i] = [];\n } // L\n\n\n ldata[i] = [];\n } // check we are in the upper triangular matrix\n\n\n if (i < j) {\n // check row exists in upper triangular matrix\n if (i < columns) {\n // U\n udata[i][j] = data[i][j];\n } // check column exists in lower triangular matrix\n\n\n if (j < rows) {\n // L\n ldata[i][j] = 0;\n }\n\n continue;\n } // diagonal value\n\n\n if (i === j) {\n // check row exists in upper triangular matrix\n if (i < columns) {\n // U\n udata[i][j] = data[i][j];\n } // check column exists in lower triangular matrix\n\n\n if (j < rows) {\n // L\n ldata[i][j] = 1;\n }\n\n continue;\n } // check row exists in upper triangular matrix\n\n\n if (i < columns) {\n // U\n udata[i][j] = 0;\n } // check column exists in lower triangular matrix\n\n\n if (j < rows) {\n // L\n ldata[i][j] = data[i][j];\n }\n }\n } // l matrix\n\n\n var l = new DenseMatrix({\n data: ldata,\n size: lsize\n }); // u matrix\n\n var u = new DenseMatrix({\n data: udata,\n size: usize\n }); // p vector\n\n var pv = [];\n\n for (i = 0, n = p.length; i < n; i++) {\n pv[p[i]] = i;\n } // return matrices\n\n\n return {\n L: l,\n U: u,\n p: pv,\n toString: function toString() {\n return 'L: ' + this.L.toString() + '\\nU: ' + this.U.toString() + '\\nP: ' + this.p;\n }\n };\n }\n\n function _sparseLUP(m) {\n // rows & columns\n var rows = m._size[0];\n var columns = m._size[1]; // minimum rows and columns\n\n var n = Math.min(rows, columns); // matrix arrays (will not be modified, thanks to permutation vector)\n\n var values = m._values;\n var index = m._index;\n var ptr = m._ptr; // l matrix arrays\n\n var lvalues = [];\n var lindex = [];\n var lptr = [];\n var lsize = [rows, n]; // u matrix arrays\n\n var uvalues = [];\n var uindex = [];\n var uptr = [];\n var usize = [n, columns]; // vars\n\n var i, j, k; // permutation vectors, (current index -> original index) and (original index -> current index)\n\n var pvCo = [];\n var pvOc = [];\n\n for (i = 0; i < rows; i++) {\n pvCo[i] = i;\n pvOc[i] = i;\n } // swap indices in permutation vectors (condition x < y)!\n\n\n var swapIndeces = function swapIndeces(x, y) {\n // find pv indeces getting data from x and y\n var kx = pvOc[x];\n var ky = pvOc[y]; // update permutation vector current -> original\n\n pvCo[kx] = y;\n pvCo[ky] = x; // update permutation vector original -> current\n\n pvOc[x] = ky;\n pvOc[y] = kx;\n }; // loop columns\n\n\n var _loop = function _loop() {\n // sparse accumulator\n var spa = new Spa(); // check lower triangular matrix has a value @ column j\n\n if (j < rows) {\n // update ptr\n lptr.push(lvalues.length); // first value in j column for lower triangular matrix\n\n lvalues.push(1);\n lindex.push(j);\n } // update ptr\n\n\n uptr.push(uvalues.length); // k0 <= k < k1 where k0 = _ptr[j] && k1 = _ptr[j+1]\n\n var k0 = ptr[j];\n var k1 = ptr[j + 1]; // copy column j into sparse accumulator\n\n for (k = k0; k < k1; k++) {\n // row\n i = index[k]; // copy column values into sparse accumulator (use permutation vector)\n\n spa.set(pvCo[i], values[k]);\n } // skip first column in upper triangular matrix\n\n\n if (j > 0) {\n // loop rows in column j (above diagonal)\n spa.forEach(0, j - 1, function (k, vkj) {\n // loop rows in column k (L)\n SparseMatrix._forEachRow(k, lvalues, lindex, lptr, function (i, vik) {\n // check row is below k\n if (i > k) {\n // update spa value\n spa.accumulate(i, unaryMinus(multiplyScalar(vik, vkj)));\n }\n });\n });\n } // row with larger value in spa, row >= j\n\n\n var pi = j;\n var vjj = spa.get(j);\n var pabsv = abs(vjj); // loop values in spa (order by row, below diagonal)\n\n spa.forEach(j + 1, rows - 1, function (x, v) {\n // absolute value\n var absv = abs(v); // value is greater than pivote value\n\n if (larger(absv, pabsv)) {\n // store row\n pi = x; // update max value\n\n pabsv = absv; // value @ [j, j]\n\n vjj = v;\n }\n }); // swap rows (j <-> pi)\n\n if (j !== pi) {\n // swap values j <-> pi in L\n SparseMatrix._swapRows(j, pi, lsize[1], lvalues, lindex, lptr); // swap values j <-> pi in U\n\n\n SparseMatrix._swapRows(j, pi, usize[1], uvalues, uindex, uptr); // swap values in spa\n\n\n spa.swap(j, pi); // update permutation vector (swap values @ j, pi)\n\n swapIndeces(j, pi);\n } // loop values in spa (order by row)\n\n\n spa.forEach(0, rows - 1, function (x, v) {\n // check we are above diagonal\n if (x <= j) {\n // update upper triangular matrix\n uvalues.push(v);\n uindex.push(x);\n } else {\n // update value\n v = divideScalar(v, vjj); // check value is non zero\n\n if (!equalScalar(v, 0)) {\n // update lower triangular matrix\n lvalues.push(v);\n lindex.push(x);\n }\n }\n });\n };\n\n for (j = 0; j < columns; j++) {\n _loop();\n } // update ptrs\n\n\n uptr.push(uvalues.length);\n lptr.push(lvalues.length); // return matrices\n\n return {\n L: new SparseMatrix({\n values: lvalues,\n index: lindex,\n ptr: lptr,\n size: lsize\n }),\n U: new SparseMatrix({\n values: uvalues,\n index: uindex,\n ptr: uptr,\n size: usize\n }),\n p: pvCo,\n toString: function toString() {\n return 'L: ' + this.L.toString() + '\\nU: ' + this.U.toString() + '\\nP: ' + this.p;\n }\n };\n }\n});","import { csReach } from './csReach.js';\nimport { factory } from '../../../utils/factory.js';\nvar name = 'csSpsolve';\nvar dependencies = ['divideScalar', 'multiply', 'subtract'];\nexport var createCsSpsolve = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n divideScalar,\n multiply,\n subtract\n } = _ref;\n\n /**\n * The function csSpsolve() computes the solution to G * x = bk, where bk is the\n * kth column of B. When lo is true, the function assumes G = L is lower triangular with the\n * diagonal entry as the first entry in each column. When lo is true, the function assumes G = U\n * is upper triangular with the diagonal entry as the last entry in each column.\n *\n * @param {Matrix} g The G matrix\n * @param {Matrix} b The B matrix\n * @param {Number} k The kth column in B\n * @param {Array} xi The nonzero pattern xi[top] .. xi[n - 1], an array of size = 2 * n\n * The first n entries is the nonzero pattern, the last n entries is the stack\n * @param {Array} x The soluton to the linear system G * x = b\n * @param {Array} pinv The inverse row permutation vector, must be null for L * x = b\n * @param {boolean} lo The lower (true) upper triangular (false) flag\n *\n * @return {Number} The index for the nonzero pattern\n *\n * Reference: http://faculty.cse.tamu.edu/davis/publications.html\n */\n return function csSpsolve(g, b, k, xi, x, pinv, lo) {\n // g arrays\n var gvalues = g._values;\n var gindex = g._index;\n var gptr = g._ptr;\n var gsize = g._size; // columns\n\n var n = gsize[1]; // b arrays\n\n var bvalues = b._values;\n var bindex = b._index;\n var bptr = b._ptr; // vars\n\n var p, p0, p1, q; // xi[top..n-1] = csReach(B(:,k))\n\n var top = csReach(g, b, k, xi, pinv); // clear x\n\n for (p = top; p < n; p++) {\n x[xi[p]] = 0;\n } // scatter b\n\n\n for (p0 = bptr[k], p1 = bptr[k + 1], p = p0; p < p1; p++) {\n x[bindex[p]] = bvalues[p];\n } // loop columns\n\n\n for (var px = top; px < n; px++) {\n // x array index for px\n var j = xi[px]; // apply permutation vector (U x = b), j maps to column J of G\n\n var J = pinv ? pinv[j] : j; // check column J is empty\n\n if (J < 0) {\n continue;\n } // column value indeces in G, p0 <= p < p1\n\n\n p0 = gptr[J];\n p1 = gptr[J + 1]; // x(j) /= G(j,j)\n\n x[j] = divideScalar(x[j], gvalues[lo ? p0 : p1 - 1]); // first entry L(j,j)\n\n p = lo ? p0 + 1 : p0;\n q = lo ? p1 : p1 - 1; // loop\n\n for (; p < q; p++) {\n // row\n var i = gindex[p]; // x(i) -= G(i,j) * x(j)\n\n x[i] = subtract(x[i], multiply(gvalues[p], x[j]));\n }\n } // return top of stack\n\n\n return top;\n };\n});","import { isMatrix } from '../../utils/is.js';\nimport { clone } from '../../utils/object.js';\nimport { format } from '../../utils/string.js';\nimport { factory } from '../../utils/factory.js';\nvar name = 'det';\nvar dependencies = ['typed', 'matrix', 'subtract', 'multiply', 'unaryMinus', 'lup'];\nexport var createDet = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n subtract,\n multiply,\n unaryMinus,\n lup\n } = _ref;\n\n /**\n * Calculate the determinant of a matrix.\n *\n * Syntax:\n *\n * math.det(x)\n *\n * Examples:\n *\n * math.det([[1, 2], [3, 4]]) // returns -2\n *\n * const A = [\n * [-2, 2, 3],\n * [-1, 1, 3],\n * [2, 0, -1]\n * ]\n * math.det(A) // returns 6\n *\n * See also:\n *\n * inv\n *\n * @param {Array | Matrix} x A matrix\n * @return {number} The determinant of `x`\n */\n return typed(name, {\n any: function any(x) {\n return clone(x);\n },\n 'Array | Matrix': function det(x) {\n var size;\n\n if (isMatrix(x)) {\n size = x.size();\n } else if (Array.isArray(x)) {\n x = matrix(x);\n size = x.size();\n } else {\n // a scalar\n size = [];\n }\n\n switch (size.length) {\n case 0:\n // scalar\n return clone(x);\n\n case 1:\n // vector\n if (size[0] === 1) {\n return clone(x.valueOf()[0]);\n } else {\n throw new RangeError('Matrix must be square ' + '(size: ' + format(size) + ')');\n }\n\n case 2:\n {\n // two dimensional array\n var rows = size[0];\n var cols = size[1];\n\n if (rows === cols) {\n return _det(x.clone().valueOf(), rows, cols);\n } else {\n throw new RangeError('Matrix must be square ' + '(size: ' + format(size) + ')');\n }\n }\n\n default:\n // multi dimensional array\n throw new RangeError('Matrix must be two dimensional ' + '(size: ' + format(size) + ')');\n }\n }\n });\n /**\n * Calculate the determinant of a matrix\n * @param {Array[]} matrix A square, two dimensional matrix\n * @param {number} rows Number of rows of the matrix (zero-based)\n * @param {number} cols Number of columns of the matrix (zero-based)\n * @returns {number} det\n * @private\n */\n\n function _det(matrix, rows, cols) {\n if (rows === 1) {\n // this is a 1 x 1 matrix\n return clone(matrix[0][0]);\n } else if (rows === 2) {\n // this is a 2 x 2 matrix\n // the determinant of [a11,a12;a21,a22] is det = a11*a22-a21*a12\n return subtract(multiply(matrix[0][0], matrix[1][1]), multiply(matrix[1][0], matrix[0][1]));\n } else {\n // Compute the LU decomposition\n var decomp = lup(matrix); // The determinant is the product of the diagonal entries of U (and those of L, but they are all 1)\n\n var det = decomp.U[0][0];\n\n for (var _i = 1; _i < rows; _i++) {\n det = multiply(det, decomp.U[_i][_i]);\n } // The determinant will be multiplied by 1 or -1 depending on the parity of the permutation matrix.\n // This can be determined by counting the cycles. This is roughly a linear time algorithm.\n\n\n var evenCycles = 0;\n var i = 0;\n var visited = [];\n\n while (true) {\n while (visited[i]) {\n i++;\n }\n\n if (i >= rows) break;\n var j = i;\n var cycleLen = 0;\n\n while (!visited[decomp.p[j]]) {\n visited[decomp.p[j]] = true;\n j = decomp.p[j];\n cycleLen++;\n }\n\n if (cycleLen % 2 === 0) {\n evenCycles++;\n }\n }\n\n return evenCycles % 2 === 0 ? det : unaryMinus(det);\n }\n }\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport { factory } from '../../../utils/factory.js';\nvar name = 'qr';\nvar dependencies = ['typed', 'matrix', 'zeros', 'identity', 'isZero', 'equal', 'sign', 'sqrt', 'conj', 'unaryMinus', 'addScalar', 'divideScalar', 'multiplyScalar', 'subtract', 'complex'];\nexport var createQr = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n zeros,\n identity,\n isZero,\n equal,\n sign,\n sqrt,\n conj,\n unaryMinus,\n addScalar,\n divideScalar,\n multiplyScalar,\n subtract,\n complex\n } = _ref;\n\n /**\n * Calculate the Matrix QR decomposition. Matrix `A` is decomposed in\n * two matrices (`Q`, `R`) where `Q` is an\n * orthogonal matrix and `R` is an upper triangular matrix.\n *\n * Syntax:\n *\n * math.qr(A)\n *\n * Example:\n *\n * const m = [\n * [1, -1, 4],\n * [1, 4, -2],\n * [1, 4, 2],\n * [1, -1, 0]\n * ]\n * const result = math.qr(m)\n * // r = {\n * // Q: [\n * // [0.5, -0.5, 0.5],\n * // [0.5, 0.5, -0.5],\n * // [0.5, 0.5, 0.5],\n * // [0.5, -0.5, -0.5],\n * // ],\n * // R: [\n * // [2, 3, 2],\n * // [0, 5, -2],\n * // [0, 0, 4],\n * // [0, 0, 0]\n * // ]\n * // }\n *\n * See also:\n *\n * lup, lusolve\n *\n * @param {Matrix | Array} A A two dimensional matrix or array\n * for which to get the QR decomposition.\n *\n * @return {{Q: Array | Matrix, R: Array | Matrix}} Q: the orthogonal\n * matrix and R: the upper triangular matrix\n */\n return _extends(typed(name, {\n DenseMatrix: function DenseMatrix(m) {\n return _denseQR(m);\n },\n SparseMatrix: function SparseMatrix(m) {\n return _sparseQR(m);\n },\n Array: function Array(a) {\n // create dense matrix from array\n var m = matrix(a); // lup, use matrix implementation\n\n var r = _denseQR(m); // result\n\n\n return {\n Q: r.Q.valueOf(),\n R: r.R.valueOf()\n };\n }\n }), {\n _denseQRimpl\n });\n\n function _denseQRimpl(m) {\n // rows & columns (m x n)\n var rows = m._size[0]; // m\n\n var cols = m._size[1]; // n\n\n var Q = identity([rows], 'dense');\n var Qdata = Q._data;\n var R = m.clone();\n var Rdata = R._data; // vars\n\n var i, j, k;\n var w = zeros([rows], '');\n\n for (k = 0; k < Math.min(cols, rows); ++k) {\n /*\n * **k-th Household matrix**\n *\n * The matrix I - 2*v*transpose(v)\n * x = first column of A\n * x1 = first element of x\n * alpha = x1 / |x1| * |x|\n * e1 = tranpose([1, 0, 0, ...])\n * u = x - alpha * e1\n * v = u / |u|\n *\n * Household matrix = I - 2 * v * tranpose(v)\n *\n * * Initially Q = I and R = A.\n * * Household matrix is a reflection in a plane normal to v which\n * will zero out all but the top right element in R.\n * * Appplying reflection to both Q and R will not change product.\n * * Repeat this process on the (1,1) minor to get R as an upper\n * triangular matrix.\n * * Reflections leave the magnitude of the columns of Q unchanged\n * so Q remains othoganal.\n *\n */\n var pivot = Rdata[k][k];\n var sgn = unaryMinus(equal(pivot, 0) ? 1 : sign(pivot));\n var conjSgn = conj(sgn);\n var alphaSquared = 0;\n\n for (i = k; i < rows; i++) {\n alphaSquared = addScalar(alphaSquared, multiplyScalar(Rdata[i][k], conj(Rdata[i][k])));\n }\n\n var alpha = multiplyScalar(sgn, sqrt(alphaSquared));\n\n if (!isZero(alpha)) {\n // first element in vector u\n var u1 = subtract(pivot, alpha); // w = v * u1 / |u| (only elements k to (rows-1) are used)\n\n w[k] = 1;\n\n for (i = k + 1; i < rows; i++) {\n w[i] = divideScalar(Rdata[i][k], u1);\n } // tau = - conj(u1 / alpha)\n\n\n var tau = unaryMinus(conj(divideScalar(u1, alpha)));\n var s = void 0;\n /*\n * tau and w have been choosen so that\n *\n * 2 * v * tranpose(v) = tau * w * tranpose(w)\n */\n\n /*\n * -- calculate R = R - tau * w * tranpose(w) * R --\n * Only do calculation with rows k to (rows-1)\n * Additionally columns 0 to (k-1) will not be changed by this\n * multiplication so do not bother recalculating them\n */\n\n for (j = k; j < cols; j++) {\n s = 0.0; // calculate jth element of [tranpose(w) * R]\n\n for (i = k; i < rows; i++) {\n s = addScalar(s, multiplyScalar(conj(w[i]), Rdata[i][j]));\n } // calculate the jth element of [tau * transpose(w) * R]\n\n\n s = multiplyScalar(s, tau);\n\n for (i = k; i < rows; i++) {\n Rdata[i][j] = multiplyScalar(subtract(Rdata[i][j], multiplyScalar(w[i], s)), conjSgn);\n }\n }\n /*\n * -- calculate Q = Q - tau * Q * w * transpose(w) --\n * Q is a square matrix (rows x rows)\n * Only do calculation with columns k to (rows-1)\n * Additionally rows 0 to (k-1) will not be changed by this\n * multiplication so do not bother recalculating them\n */\n\n\n for (i = 0; i < rows; i++) {\n s = 0.0; // calculate ith element of [Q * w]\n\n for (j = k; j < rows; j++) {\n s = addScalar(s, multiplyScalar(Qdata[i][j], w[j]));\n } // calculate the ith element of [tau * Q * w]\n\n\n s = multiplyScalar(s, tau);\n\n for (j = k; j < rows; ++j) {\n Qdata[i][j] = divideScalar(subtract(Qdata[i][j], multiplyScalar(s, conj(w[j]))), conjSgn);\n }\n }\n }\n } // return matrices\n\n\n return {\n Q: Q,\n R: R,\n toString: function toString() {\n return 'Q: ' + this.Q.toString() + '\\nR: ' + this.R.toString();\n }\n };\n }\n\n function _denseQR(m) {\n var ret = _denseQRimpl(m);\n\n var Rdata = ret.R._data;\n\n if (m._data.length > 0) {\n var zero = Rdata[0][0].type === 'Complex' ? complex(0) : 0;\n\n for (var i = 0; i < Rdata.length; ++i) {\n for (var j = 0; j < i && j < (Rdata[0] || []).length; ++j) {\n Rdata[i][j] = zero;\n }\n }\n }\n\n return ret;\n }\n\n function _sparseQR(m) {\n throw new Error('qr not implemented for sparse matrices yet');\n }\n});","import { isMatrix } from '../../utils/is.js';\nimport { arraySize } from '../../utils/array.js';\nimport { factory } from '../../utils/factory.js';\nimport { format } from '../../utils/string.js';\nvar name = 'inv';\nvar dependencies = ['typed', 'matrix', 'divideScalar', 'addScalar', 'multiply', 'unaryMinus', 'det', 'identity', 'abs'];\nexport var createInv = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n divideScalar,\n addScalar,\n multiply,\n unaryMinus,\n det,\n identity,\n abs\n } = _ref;\n\n /**\n * Calculate the inverse of a square matrix.\n *\n * Syntax:\n *\n * math.inv(x)\n *\n * Examples:\n *\n * math.inv([[1, 2], [3, 4]]) // returns [[-2, 1], [1.5, -0.5]]\n * math.inv(4) // returns 0.25\n * 1 / 4 // returns 0.25\n *\n * See also:\n *\n * det, transpose\n *\n * @param {number | Complex | Array | Matrix} x Matrix to be inversed\n * @return {number | Complex | Array | Matrix} The inverse of `x`.\n */\n return typed(name, {\n 'Array | Matrix': function ArrayMatrix(x) {\n var size = isMatrix(x) ? x.size() : arraySize(x);\n\n switch (size.length) {\n case 1:\n // vector\n if (size[0] === 1) {\n if (isMatrix(x)) {\n return matrix([divideScalar(1, x.valueOf()[0])]);\n } else {\n return [divideScalar(1, x[0])];\n }\n } else {\n throw new RangeError('Matrix must be square ' + '(size: ' + format(size) + ')');\n }\n\n case 2:\n // two dimensional array\n {\n var rows = size[0];\n var cols = size[1];\n\n if (rows === cols) {\n if (isMatrix(x)) {\n return matrix(_inv(x.valueOf(), rows, cols), x.storage());\n } else {\n // return an Array\n return _inv(x, rows, cols);\n }\n } else {\n throw new RangeError('Matrix must be square ' + '(size: ' + format(size) + ')');\n }\n }\n\n default:\n // multi dimensional array\n throw new RangeError('Matrix must be two dimensional ' + '(size: ' + format(size) + ')');\n }\n },\n any: function any(x) {\n // scalar\n return divideScalar(1, x); // FIXME: create a BigNumber one when configured for bignumbers\n }\n });\n /**\n * Calculate the inverse of a square matrix\n * @param {Array[]} mat A square matrix\n * @param {number} rows Number of rows\n * @param {number} cols Number of columns, must equal rows\n * @return {Array[]} inv Inverse matrix\n * @private\n */\n\n function _inv(mat, rows, cols) {\n var r, s, f, value, temp;\n\n if (rows === 1) {\n // this is a 1 x 1 matrix\n value = mat[0][0];\n\n if (value === 0) {\n throw Error('Cannot calculate inverse, determinant is zero');\n }\n\n return [[divideScalar(1, value)]];\n } else if (rows === 2) {\n // this is a 2 x 2 matrix\n var d = det(mat);\n\n if (d === 0) {\n throw Error('Cannot calculate inverse, determinant is zero');\n }\n\n return [[divideScalar(mat[1][1], d), divideScalar(unaryMinus(mat[0][1]), d)], [divideScalar(unaryMinus(mat[1][0]), d), divideScalar(mat[0][0], d)]];\n } else {\n // this is a matrix of 3 x 3 or larger\n // calculate inverse using gauss-jordan elimination\n // https://en.wikipedia.org/wiki/Gaussian_elimination\n // http://mathworld.wolfram.com/MatrixInverse.html\n // http://math.uww.edu/~mcfarlat/inverse.htm\n // make a copy of the matrix (only the arrays, not of the elements)\n var A = mat.concat();\n\n for (r = 0; r < rows; r++) {\n A[r] = A[r].concat();\n } // create an identity matrix which in the end will contain the\n // matrix inverse\n\n\n var B = identity(rows).valueOf(); // loop over all columns, and perform row reductions\n\n for (var c = 0; c < cols; c++) {\n // Pivoting: Swap row c with row r, where row r contains the largest element A[r][c]\n var ABig = abs(A[c][c]);\n var rBig = c;\n r = c + 1;\n\n while (r < rows) {\n if (abs(A[r][c]) > ABig) {\n ABig = abs(A[r][c]);\n rBig = r;\n }\n\n r++;\n }\n\n if (ABig === 0) {\n throw Error('Cannot calculate inverse, determinant is zero');\n }\n\n r = rBig;\n\n if (r !== c) {\n temp = A[c];\n A[c] = A[r];\n A[r] = temp;\n temp = B[c];\n B[c] = B[r];\n B[r] = temp;\n } // eliminate non-zero values on the other rows at column c\n\n\n var Ac = A[c];\n var Bc = B[c];\n\n for (r = 0; r < rows; r++) {\n var Ar = A[r];\n var Br = B[r];\n\n if (r !== c) {\n // eliminate value at column c and row r\n if (Ar[c] !== 0) {\n f = divideScalar(unaryMinus(Ar[c]), Ac[c]); // add (f * row c) to row r to eliminate the value\n // at column c\n\n for (s = c; s < cols; s++) {\n Ar[s] = addScalar(Ar[s], multiply(f, Ac[s]));\n }\n\n for (s = 0; s < cols; s++) {\n Br[s] = addScalar(Br[s], multiply(f, Bc[s]));\n }\n }\n } else {\n // normalize value at Acc to 1,\n // divide each value on row r with the value at Acc\n f = Ac[c];\n\n for (s = c; s < cols; s++) {\n Ar[s] = divideScalar(Ar[s], f);\n }\n\n for (s = 0; s < cols; s++) {\n Br[s] = divideScalar(Br[s], f);\n }\n }\n }\n }\n\n return B;\n }\n }\n});","import { factory } from '../../utils/factory.js';\nimport { extend } from '../../utils/object.js';\nimport { createAlgorithm11 } from '../../type/matrix/utils/algorithm11.js';\nimport { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';\nvar name = 'divide';\nvar dependencies = ['typed', 'matrix', 'multiply', 'equalScalar', 'divideScalar', 'inv'];\nexport var createDivide = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n multiply,\n equalScalar,\n divideScalar,\n inv\n } = _ref;\n var algorithm11 = createAlgorithm11({\n typed,\n equalScalar\n });\n var algorithm14 = createAlgorithm14({\n typed\n });\n /**\n * Divide two values, `x / y`.\n * To divide matrices, `x` is multiplied with the inverse of `y`: `x * inv(y)`.\n *\n * Syntax:\n *\n * math.divide(x, y)\n *\n * Examples:\n *\n * math.divide(2, 3) // returns number 0.6666666666666666\n *\n * const a = math.complex(5, 14)\n * const b = math.complex(4, 1)\n * math.divide(a, b) // returns Complex 2 + 3i\n *\n * const c = [[7, -6], [13, -4]]\n * const d = [[1, 2], [4, 3]]\n * math.divide(c, d) // returns Array [[-9, 4], [-11, 6]]\n *\n * const e = math.unit('18 km')\n * math.divide(e, 4.5) // returns Unit 4 km\n *\n * See also:\n *\n * multiply\n *\n * @param {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} x Numerator\n * @param {number | BigNumber | Fraction | Complex | Array | Matrix} y Denominator\n * @return {number | BigNumber | Fraction | Complex | Unit | Array | Matrix} Quotient, `x / y`\n */\n\n return typed('divide', extend({\n // we extend the signatures of divideScalar with signatures dealing with matrices\n 'Array | Matrix, Array | Matrix': function ArrayMatrixArrayMatrix(x, y) {\n // TODO: implement matrix right division using pseudo inverse\n // https://www.mathworks.nl/help/matlab/ref/mrdivide.html\n // https://www.gnu.org/software/octave/doc/interpreter/Arithmetic-Ops.html\n // https://stackoverflow.com/questions/12263932/how-does-gnu-octave-matrix-division-work-getting-unexpected-behaviour\n return multiply(x, inv(y));\n },\n 'DenseMatrix, any': function DenseMatrixAny(x, y) {\n return algorithm14(x, y, divideScalar, false);\n },\n 'SparseMatrix, any': function SparseMatrixAny(x, y) {\n return algorithm11(x, y, divideScalar, false);\n },\n 'Array, any': function ArrayAny(x, y) {\n // use matrix implementation\n return algorithm14(matrix(x), y, divideScalar, false).valueOf();\n },\n 'any, Array | Matrix': function anyArrayMatrix(x, y) {\n return multiply(x, inv(y));\n }\n }, divideScalar.signatures));\n});","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { isComplex, isUnit, typeOf } from '../../utils/is.js';\nimport { factory } from '../../utils/factory.js';\nimport { memoize } from '../../utils/function.js';\nimport { endsWith } from '../../utils/string.js';\nimport { clone, hasOwnProperty } from '../../utils/object.js';\nimport { createBigNumberPi as createPi } from '../../utils/bignumber/constants.js';\nvar name = 'Unit';\nvar dependencies = ['?on', 'config', 'addScalar', 'subtract', 'multiplyScalar', 'divideScalar', 'pow', 'abs', 'fix', 'round', 'equal', 'isNumeric', 'format', 'number', 'Complex', 'BigNumber', 'Fraction'];\nexport var createUnitClass = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n on,\n config,\n addScalar,\n subtract,\n multiplyScalar,\n divideScalar,\n pow,\n abs,\n fix,\n round,\n equal,\n isNumeric,\n format,\n number,\n Complex,\n BigNumber: _BigNumber,\n Fraction: _Fraction\n } = _ref;\n var toNumber = number;\n /**\n * A unit can be constructed in the following ways:\n *\n * const a = new Unit(value, name)\n * const b = new Unit(null, name)\n * const c = Unit.parse(str)\n *\n * Example usage:\n *\n * const a = new Unit(5, 'cm') // 50 mm\n * const b = Unit.parse('23 kg') // 23 kg\n * const c = math.in(a, new Unit(null, 'm') // 0.05 m\n * const d = new Unit(9.81, \"m/s^2\") // 9.81 m/s^2\n *\n * @class Unit\n * @constructor Unit\n * @param {number | BigNumber | Fraction | Complex | boolean} [value] A value like 5.2\n * @param {string} [name] A unit name like \"cm\" or \"inch\", or a derived unit of the form: \"u1[^ex1] [u2[^ex2] ...] [/ u3[^ex3] [u4[^ex4]]]\", such as \"kg m^2/s^2\", where each unit appearing after the forward slash is taken to be in the denominator. \"kg m^2 s^-2\" is a synonym and is also acceptable. Any of the units can include a prefix.\n */\n\n function Unit(value, name) {\n if (!(this instanceof Unit)) {\n throw new Error('Constructor must be called with the new operator');\n }\n\n if (!(value === null || value === undefined || isNumeric(value) || isComplex(value))) {\n throw new TypeError('First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined');\n }\n\n if (name !== undefined && (typeof name !== 'string' || name === '')) {\n throw new TypeError('Second parameter in Unit constructor must be a string');\n }\n\n if (name !== undefined) {\n var u = Unit.parse(name);\n this.units = u.units;\n this.dimensions = u.dimensions;\n } else {\n this.units = [{\n unit: UNIT_NONE,\n prefix: PREFIXES.NONE,\n // link to a list with supported prefixes\n power: 0\n }];\n this.dimensions = [];\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n this.dimensions[i] = 0;\n }\n }\n\n this.value = value !== undefined && value !== null ? this._normalize(value) : null;\n this.fixPrefix = false; // if true, function format will not search for the\n // best prefix but leave it as initially provided.\n // fixPrefix is set true by the method Unit.to\n // The justification behind this is that if the constructor is explicitly called,\n // the caller wishes the units to be returned exactly as he supplied.\n\n this.skipAutomaticSimplification = true;\n }\n /**\n * Attach type information\n */\n\n\n Unit.prototype.type = 'Unit';\n Unit.prototype.isUnit = true; // private variables and functions for the Unit parser\n\n var text, index, c;\n\n function skipWhitespace() {\n while (c === ' ' || c === '\\t') {\n next();\n }\n }\n\n function isDigitDot(c) {\n return c >= '0' && c <= '9' || c === '.';\n }\n\n function isDigit(c) {\n return c >= '0' && c <= '9';\n }\n\n function next() {\n index++;\n c = text.charAt(index);\n }\n\n function revert(oldIndex) {\n index = oldIndex;\n c = text.charAt(index);\n }\n\n function parseNumber() {\n var number = '';\n var oldIndex = index;\n\n if (c === '+') {\n next();\n } else if (c === '-') {\n number += c;\n next();\n }\n\n if (!isDigitDot(c)) {\n // a + or - must be followed by a digit\n revert(oldIndex);\n return null;\n } // get number, can have a single dot\n\n\n if (c === '.') {\n number += c;\n next();\n\n if (!isDigit(c)) {\n // this is no legal number, it is just a dot\n revert(oldIndex);\n return null;\n }\n } else {\n while (isDigit(c)) {\n number += c;\n next();\n }\n\n if (c === '.') {\n number += c;\n next();\n }\n }\n\n while (isDigit(c)) {\n number += c;\n next();\n } // check for exponential notation like \"2.3e-4\" or \"1.23e50\"\n\n\n if (c === 'E' || c === 'e') {\n // The grammar branches here. This could either be part of an exponent or the start of a unit that begins with the letter e, such as \"4exabytes\"\n var tentativeNumber = '';\n var tentativeIndex = index;\n tentativeNumber += c;\n next();\n\n if (c === '+' || c === '-') {\n tentativeNumber += c;\n next();\n } // Scientific notation MUST be followed by an exponent (otherwise we assume it is not scientific notation)\n\n\n if (!isDigit(c)) {\n // The e or E must belong to something else, so return the number without the e or E.\n revert(tentativeIndex);\n return number;\n } // We can now safely say that this is scientific notation.\n\n\n number = number + tentativeNumber;\n\n while (isDigit(c)) {\n number += c;\n next();\n }\n }\n\n return number;\n }\n\n function parseUnit() {\n var unitName = ''; // Alphanumeric characters only; matches [a-zA-Z0-9]\n\n while (isDigit(c) || Unit.isValidAlpha(c)) {\n unitName += c;\n next();\n } // Must begin with [a-zA-Z]\n\n\n var firstC = unitName.charAt(0);\n\n if (Unit.isValidAlpha(firstC)) {\n return unitName;\n } else {\n return null;\n }\n }\n\n function parseCharacter(toFind) {\n if (c === toFind) {\n next();\n return toFind;\n } else {\n return null;\n }\n }\n /**\n * Parse a string into a unit. The value of the unit is parsed as number,\n * BigNumber, or Fraction depending on the math.js config setting `number`.\n *\n * Throws an exception if the provided string does not contain a valid unit or\n * cannot be parsed.\n * @memberof Unit\n * @param {string} str A string like \"5.2 inch\", \"4e2 cm/s^2\"\n * @return {Unit} unit\n */\n\n\n Unit.parse = function (str, options) {\n options = options || {};\n text = str;\n index = -1;\n c = '';\n\n if (typeof text !== 'string') {\n throw new TypeError('Invalid argument in Unit.parse, string expected');\n }\n\n var unit = new Unit();\n unit.units = [];\n var powerMultiplierCurrent = 1;\n var expectingUnit = false; // A unit should follow this pattern:\n // [number] ...[ [*/] unit[^number] ]\n // unit[^number] ... [ [*/] unit[^number] ]\n // Rules:\n // number is any floating point number.\n // unit is any alphanumeric string beginning with an alpha. Units with names like e3 should be avoided because they look like the exponent of a floating point number!\n // The string may optionally begin with a number.\n // Each unit may optionally be followed by ^number.\n // Whitespace or a forward slash is recommended between consecutive units, although the following technically is parseable:\n // 2m^2kg/s^2\n // it is not good form. If a unit starts with e, then it could be confused as a floating point number:\n // 4erg\n\n next();\n skipWhitespace(); // Optional number at the start of the string\n\n var valueStr = parseNumber();\n var value = null;\n\n if (valueStr) {\n if (config.number === 'BigNumber') {\n value = new _BigNumber(valueStr);\n } else if (config.number === 'Fraction') {\n try {\n // not all numbers can be turned in Fractions, for example very small numbers not\n value = new _Fraction(valueStr);\n } catch (err) {\n value = parseFloat(valueStr);\n }\n } else {\n // number\n value = parseFloat(valueStr);\n }\n\n skipWhitespace(); // Whitespace is not required here\n // handle multiplication or division right after the value, like '1/s'\n\n if (parseCharacter('*')) {\n powerMultiplierCurrent = 1;\n expectingUnit = true;\n } else if (parseCharacter('/')) {\n powerMultiplierCurrent = -1;\n expectingUnit = true;\n }\n } // Stack to keep track of powerMultipliers applied to each parentheses group\n\n\n var powerMultiplierStack = []; // Running product of all elements in powerMultiplierStack\n\n var powerMultiplierStackProduct = 1;\n\n while (true) {\n skipWhitespace(); // Check for and consume opening parentheses, pushing powerMultiplierCurrent to the stack\n // A '(' will always appear directly before a unit.\n\n while (c === '(') {\n powerMultiplierStack.push(powerMultiplierCurrent);\n powerMultiplierStackProduct *= powerMultiplierCurrent;\n powerMultiplierCurrent = 1;\n next();\n skipWhitespace();\n } // Is there something here?\n\n\n var uStr = void 0;\n\n if (c) {\n var oldC = c;\n uStr = parseUnit();\n\n if (uStr === null) {\n throw new SyntaxError('Unexpected \"' + oldC + '\" in \"' + text + '\" at index ' + index.toString());\n }\n } else {\n // End of input.\n break;\n } // Verify the unit exists and get the prefix (if any)\n\n\n var res = _findUnit(uStr);\n\n if (res === null) {\n // Unit not found.\n throw new SyntaxError('Unit \"' + uStr + '\" not found.');\n }\n\n var power = powerMultiplierCurrent * powerMultiplierStackProduct; // Is there a \"^ number\"?\n\n skipWhitespace();\n\n if (parseCharacter('^')) {\n skipWhitespace();\n var p = parseNumber();\n\n if (p === null) {\n // No valid number found for the power!\n throw new SyntaxError('In \"' + str + '\", \"^\" must be followed by a floating-point number');\n }\n\n power *= p;\n } // Add the unit to the list\n\n\n unit.units.push({\n unit: res.unit,\n prefix: res.prefix,\n power: power\n });\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n unit.dimensions[i] += (res.unit.dimensions[i] || 0) * power;\n } // Check for and consume closing parentheses, popping from the stack.\n // A ')' will always follow a unit.\n\n\n skipWhitespace();\n\n while (c === ')') {\n if (powerMultiplierStack.length === 0) {\n throw new SyntaxError('Unmatched \")\" in \"' + text + '\" at index ' + index.toString());\n }\n\n powerMultiplierStackProduct /= powerMultiplierStack.pop();\n next();\n skipWhitespace();\n } // \"*\" and \"/\" should mean we are expecting something to come next.\n // Is there a forward slash? If so, negate powerMultiplierCurrent. The next unit or paren group is in the denominator.\n\n\n expectingUnit = false;\n\n if (parseCharacter('*')) {\n // explicit multiplication\n powerMultiplierCurrent = 1;\n expectingUnit = true;\n } else if (parseCharacter('/')) {\n // division\n powerMultiplierCurrent = -1;\n expectingUnit = true;\n } else {\n // implicit multiplication\n powerMultiplierCurrent = 1;\n } // Replace the unit into the auto unit system\n\n\n if (res.unit.base) {\n var baseDim = res.unit.base.key;\n UNIT_SYSTEMS.auto[baseDim] = {\n unit: res.unit,\n prefix: res.prefix\n };\n }\n } // Has the string been entirely consumed?\n\n\n skipWhitespace();\n\n if (c) {\n throw new SyntaxError('Could not parse: \"' + str + '\"');\n } // Is there a trailing slash?\n\n\n if (expectingUnit) {\n throw new SyntaxError('Trailing characters: \"' + str + '\"');\n } // Is the parentheses stack empty?\n\n\n if (powerMultiplierStack.length !== 0) {\n throw new SyntaxError('Unmatched \"(\" in \"' + text + '\"');\n } // Are there any units at all?\n\n\n if (unit.units.length === 0 && !options.allowNoUnits) {\n throw new SyntaxError('\"' + str + '\" contains no units');\n }\n\n unit.value = value !== undefined ? unit._normalize(value) : null;\n return unit;\n };\n /**\n * create a copy of this unit\n * @memberof Unit\n * @return {Unit} Returns a cloned version of the unit\n */\n\n\n Unit.prototype.clone = function () {\n var unit = new Unit();\n unit.fixPrefix = this.fixPrefix;\n unit.skipAutomaticSimplification = this.skipAutomaticSimplification;\n unit.value = clone(this.value);\n unit.dimensions = this.dimensions.slice(0);\n unit.units = [];\n\n for (var i = 0; i < this.units.length; i++) {\n unit.units[i] = {};\n\n for (var p in this.units[i]) {\n if (hasOwnProperty(this.units[i], p)) {\n unit.units[i][p] = this.units[i][p];\n }\n }\n }\n\n return unit;\n };\n /**\n * Return whether the unit is derived (such as m/s, or cm^2, but not N)\n * @memberof Unit\n * @return {boolean} True if the unit is derived\n */\n\n\n Unit.prototype._isDerived = function () {\n if (this.units.length === 0) {\n return false;\n }\n\n return this.units.length > 1 || Math.abs(this.units[0].power - 1.0) > 1e-15;\n };\n /**\n * Normalize a value, based on its currently set unit(s)\n * @memberof Unit\n * @param {number | BigNumber | Fraction | boolean} value\n * @return {number | BigNumber | Fraction | boolean} normalized value\n * @private\n */\n\n\n Unit.prototype._normalize = function (value) {\n var unitValue, unitOffset, unitPower, unitPrefixValue;\n var convert;\n\n if (value === null || value === undefined || this.units.length === 0) {\n return value;\n } else if (this._isDerived()) {\n // This is a derived unit, so do not apply offsets.\n // For example, with J kg^-1 degC^-1 you would NOT want to apply the offset.\n var res = value;\n convert = Unit._getNumberConverter(typeOf(value)); // convert to Fraction or BigNumber if needed\n\n for (var i = 0; i < this.units.length; i++) {\n unitValue = convert(this.units[i].unit.value);\n unitPrefixValue = convert(this.units[i].prefix.value);\n unitPower = convert(this.units[i].power);\n res = multiplyScalar(res, pow(multiplyScalar(unitValue, unitPrefixValue), unitPower));\n }\n\n return res;\n } else {\n // This is a single unit of power 1, like kg or degC\n convert = Unit._getNumberConverter(typeOf(value)); // convert to Fraction or BigNumber if needed\n\n unitValue = convert(this.units[0].unit.value);\n unitOffset = convert(this.units[0].unit.offset);\n unitPrefixValue = convert(this.units[0].prefix.value);\n return multiplyScalar(addScalar(value, unitOffset), multiplyScalar(unitValue, unitPrefixValue));\n }\n };\n /**\n * Denormalize a value, based on its currently set unit(s)\n * @memberof Unit\n * @param {number} value\n * @param {number} [prefixValue] Optional prefix value to be used (ignored if this is a derived unit)\n * @return {number} denormalized value\n * @private\n */\n\n\n Unit.prototype._denormalize = function (value, prefixValue) {\n var unitValue, unitOffset, unitPower, unitPrefixValue;\n var convert;\n\n if (value === null || value === undefined || this.units.length === 0) {\n return value;\n } else if (this._isDerived()) {\n // This is a derived unit, so do not apply offsets.\n // For example, with J kg^-1 degC^-1 you would NOT want to apply the offset.\n // Also, prefixValue is ignored--but we will still use the prefix value stored in each unit, since kg is usually preferable to g unless the user decides otherwise.\n var res = value;\n convert = Unit._getNumberConverter(typeOf(value)); // convert to Fraction or BigNumber if needed\n\n for (var i = 0; i < this.units.length; i++) {\n unitValue = convert(this.units[i].unit.value);\n unitPrefixValue = convert(this.units[i].prefix.value);\n unitPower = convert(this.units[i].power);\n res = divideScalar(res, pow(multiplyScalar(unitValue, unitPrefixValue), unitPower));\n }\n\n return res;\n } else {\n // This is a single unit of power 1, like kg or degC\n convert = Unit._getNumberConverter(typeOf(value)); // convert to Fraction or BigNumber if needed\n\n unitValue = convert(this.units[0].unit.value);\n unitPrefixValue = convert(this.units[0].prefix.value);\n unitOffset = convert(this.units[0].unit.offset);\n\n if (prefixValue === undefined || prefixValue === null) {\n return subtract(divideScalar(divideScalar(value, unitValue), unitPrefixValue), unitOffset);\n } else {\n return subtract(divideScalar(divideScalar(value, unitValue), prefixValue), unitOffset);\n }\n }\n };\n /**\n * Find a unit from a string\n * @memberof Unit\n * @param {string} str A string like 'cm' or 'inch'\n * @returns {Object | null} result When found, an object with fields unit and\n * prefix is returned. Else, null is returned.\n * @private\n */\n\n\n var _findUnit = memoize(str => {\n // First, match units names exactly. For example, a user could define 'mm' as 10^-4 m, which is silly, but then we would want 'mm' to match the user-defined unit.\n if (hasOwnProperty(UNITS, str)) {\n var unit = UNITS[str];\n var prefix = unit.prefixes[''];\n return {\n unit,\n prefix\n };\n }\n\n for (var _name in UNITS) {\n if (hasOwnProperty(UNITS, _name)) {\n if (endsWith(str, _name)) {\n var _unit = UNITS[_name];\n var prefixLen = str.length - _name.length;\n var prefixName = str.substring(0, prefixLen);\n\n var _prefix = hasOwnProperty(_unit.prefixes, prefixName) ? _unit.prefixes[prefixName] : undefined;\n\n if (_prefix !== undefined) {\n // store unit, prefix, and value\n return {\n unit: _unit,\n prefix: _prefix\n };\n }\n }\n }\n }\n\n return null;\n }, {\n hasher: args => args[0],\n limit: 100\n });\n /**\n * Test if the given expression is a unit.\n * The unit can have a prefix but cannot have a value.\n * @memberof Unit\n * @param {string} name A string to be tested whether it is a value less unit.\n * The unit can have prefix, like \"cm\"\n * @return {boolean} true if the given string is a unit\n */\n\n\n Unit.isValuelessUnit = function (name) {\n return _findUnit(name) !== null;\n };\n /**\n * check if this unit has given base unit\n * If this unit is a derived unit, this will ALWAYS return false, since by definition base units are not derived.\n * @memberof Unit\n * @param {BASE_UNITS | string | undefined} base\n */\n\n\n Unit.prototype.hasBase = function (base) {\n if (typeof base === 'string') {\n base = BASE_UNITS[base];\n }\n\n if (!base) {\n return false;\n } // All dimensions must be the same\n\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n if (Math.abs((this.dimensions[i] || 0) - (base.dimensions[i] || 0)) > 1e-12) {\n return false;\n }\n }\n\n return true;\n };\n /**\n * Check if this unit has a base or bases equal to another base or bases\n * For derived units, the exponent on each base also must match\n * @memberof Unit\n * @param {Unit} other\n * @return {boolean} true if equal base\n */\n\n\n Unit.prototype.equalBase = function (other) {\n // All dimensions must be the same\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n if (Math.abs((this.dimensions[i] || 0) - (other.dimensions[i] || 0)) > 1e-12) {\n return false;\n }\n }\n\n return true;\n };\n /**\n * Check if this unit equals another unit\n * @memberof Unit\n * @param {Unit} other\n * @return {boolean} true if both units are equal\n */\n\n\n Unit.prototype.equals = function (other) {\n return this.equalBase(other) && equal(this.value, other.value);\n };\n /**\n * Multiply this unit with another one\n * @memberof Unit\n * @param {Unit} other\n * @return {Unit} product of this unit and the other unit\n */\n\n\n Unit.prototype.multiply = function (other) {\n var res = this.clone();\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n // Dimensions arrays may be of different lengths. Default to 0.\n res.dimensions[i] = (this.dimensions[i] || 0) + (other.dimensions[i] || 0);\n } // Append other's units list onto res\n\n\n for (var _i = 0; _i < other.units.length; _i++) {\n // Make a shallow copy of every unit\n var inverted = _objectSpread({}, other.units[_i]);\n\n res.units.push(inverted);\n } // If at least one operand has a value, then the result should also have a value\n\n\n if (this.value !== null || other.value !== null) {\n var valThis = this.value === null ? this._normalize(1) : this.value;\n var valOther = other.value === null ? other._normalize(1) : other.value;\n res.value = multiplyScalar(valThis, valOther);\n } else {\n res.value = null;\n }\n\n res.skipAutomaticSimplification = false;\n return getNumericIfUnitless(res);\n };\n /**\n * Divide this unit by another one\n * @memberof Unit\n * @param {Unit} other\n * @return {Unit} result of dividing this unit by the other unit\n */\n\n\n Unit.prototype.divide = function (other) {\n var res = this.clone();\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n // Dimensions arrays may be of different lengths. Default to 0.\n res.dimensions[i] = (this.dimensions[i] || 0) - (other.dimensions[i] || 0);\n } // Invert and append other's units list onto res\n\n\n for (var _i2 = 0; _i2 < other.units.length; _i2++) {\n // Make a shallow copy of every unit\n var inverted = _objectSpread(_objectSpread({}, other.units[_i2]), {}, {\n power: -other.units[_i2].power\n });\n\n res.units.push(inverted);\n } // If at least one operand has a value, the result should have a value\n\n\n if (this.value !== null || other.value !== null) {\n var valThis = this.value === null ? this._normalize(1) : this.value;\n var valOther = other.value === null ? other._normalize(1) : other.value;\n res.value = divideScalar(valThis, valOther);\n } else {\n res.value = null;\n }\n\n res.skipAutomaticSimplification = false;\n return getNumericIfUnitless(res);\n };\n /**\n * Calculate the power of a unit\n * @memberof Unit\n * @param {number | Fraction | BigNumber} p\n * @returns {Unit} The result: this^p\n */\n\n\n Unit.prototype.pow = function (p) {\n var res = this.clone();\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n // Dimensions arrays may be of different lengths. Default to 0.\n res.dimensions[i] = (this.dimensions[i] || 0) * p;\n } // Adjust the power of each unit in the list\n\n\n for (var _i3 = 0; _i3 < res.units.length; _i3++) {\n res.units[_i3].power *= p;\n }\n\n if (res.value !== null) {\n res.value = pow(res.value, p); // only allow numeric output, we don't want to return a Complex number\n // if (!isNumeric(res.value)) {\n // res.value = NaN\n // }\n // Update: Complex supported now\n } else {\n res.value = null;\n }\n\n res.skipAutomaticSimplification = false;\n return getNumericIfUnitless(res);\n };\n /**\n * Return the numeric value of this unit if it is dimensionless, has a value, and config.predictable == false; or the original unit otherwise\n * @param {Unit} unit\n * @returns {number | Fraction | BigNumber | Unit} The numeric value of the unit if conditions are met, or the original unit otherwise\n */\n\n\n function getNumericIfUnitless(unit) {\n if (unit.equalBase(BASE_UNITS.NONE) && unit.value !== null && !config.predictable) {\n return unit.value;\n } else {\n return unit;\n }\n }\n /**\n * Calculate the absolute value of a unit\n * @memberof Unit\n * @param {number | Fraction | BigNumber} x\n * @returns {Unit} The result: |x|, absolute value of x\n */\n\n\n Unit.prototype.abs = function () {\n // This gives correct, but unexpected, results for units with an offset.\n // For example, abs(-283.15 degC) = -263.15 degC !!!\n var ret = this.clone();\n ret.value = ret.value !== null ? abs(ret.value) : null;\n\n for (var i in ret.units) {\n if (ret.units[i].unit.name === 'VA' || ret.units[i].unit.name === 'VAR') {\n ret.units[i].unit = UNITS.W;\n }\n }\n\n return ret;\n };\n /**\n * Convert the unit to a specific unit name.\n * @memberof Unit\n * @param {string | Unit} valuelessUnit A unit without value. Can have prefix, like \"cm\"\n * @returns {Unit} Returns a clone of the unit with a fixed prefix and unit.\n */\n\n\n Unit.prototype.to = function (valuelessUnit) {\n var other;\n var value = this.value === null ? this._normalize(1) : this.value;\n\n if (typeof valuelessUnit === 'string') {\n // other = new Unit(null, valuelessUnit)\n other = Unit.parse(valuelessUnit);\n\n if (!this.equalBase(other)) {\n throw new Error(\"Units do not match ('\".concat(other.toString(), \"' != '\").concat(this.toString(), \"')\"));\n }\n\n if (other.value !== null) {\n throw new Error('Cannot convert to a unit with a value');\n }\n\n other.value = clone(value);\n other.fixPrefix = true;\n other.skipAutomaticSimplification = true;\n return other;\n } else if (isUnit(valuelessUnit)) {\n if (!this.equalBase(valuelessUnit)) {\n throw new Error(\"Units do not match ('\".concat(valuelessUnit.toString(), \"' != '\").concat(this.toString(), \"')\"));\n }\n\n if (valuelessUnit.value !== null) {\n throw new Error('Cannot convert to a unit with a value');\n }\n\n other = valuelessUnit.clone();\n other.value = clone(value);\n other.fixPrefix = true;\n other.skipAutomaticSimplification = true;\n return other;\n } else {\n throw new Error('String or Unit expected as parameter');\n }\n };\n /**\n * Return the value of the unit when represented with given valueless unit\n * @memberof Unit\n * @param {string | Unit} valuelessUnit For example 'cm' or 'inch'\n * @return {number} Returns the unit value as number.\n */\n // TODO: deprecate Unit.toNumber? It's always better to use toNumeric\n\n\n Unit.prototype.toNumber = function (valuelessUnit) {\n return toNumber(this.toNumeric(valuelessUnit));\n };\n /**\n * Return the value of the unit in the original numeric type\n * @memberof Unit\n * @param {string | Unit} valuelessUnit For example 'cm' or 'inch'\n * @return {number | BigNumber | Fraction} Returns the unit value\n */\n\n\n Unit.prototype.toNumeric = function (valuelessUnit) {\n var other;\n\n if (valuelessUnit) {\n // Allow getting the numeric value without converting to a different unit\n other = this.to(valuelessUnit);\n } else {\n other = this.clone();\n }\n\n if (other._isDerived() || other.units.length === 0) {\n return other._denormalize(other.value);\n } else {\n return other._denormalize(other.value, other.units[0].prefix.value);\n }\n };\n /**\n * Get a string representation of the unit.\n * @memberof Unit\n * @return {string}\n */\n\n\n Unit.prototype.toString = function () {\n return this.format();\n };\n /**\n * Get a JSON representation of the unit\n * @memberof Unit\n * @returns {Object} Returns a JSON object structured as:\n * `{\"mathjs\": \"Unit\", \"value\": 2, \"unit\": \"cm\", \"fixPrefix\": false}`\n */\n\n\n Unit.prototype.toJSON = function () {\n return {\n mathjs: 'Unit',\n value: this._denormalize(this.value),\n unit: this.formatUnits(),\n fixPrefix: this.fixPrefix\n };\n };\n /**\n * Instantiate a Unit from a JSON object\n * @memberof Unit\n * @param {Object} json A JSON object structured as:\n * `{\"mathjs\": \"Unit\", \"value\": 2, \"unit\": \"cm\", \"fixPrefix\": false}`\n * @return {Unit}\n */\n\n\n Unit.fromJSON = function (json) {\n var unit = new Unit(json.value, json.unit);\n unit.fixPrefix = json.fixPrefix || false;\n return unit;\n };\n /**\n * Returns the string representation of the unit.\n * @memberof Unit\n * @return {string}\n */\n\n\n Unit.prototype.valueOf = Unit.prototype.toString;\n /**\n * Simplify this Unit's unit list and return a new Unit with the simplified list.\n * The returned Unit will contain a list of the \"best\" units for formatting.\n */\n\n Unit.prototype.simplify = function () {\n var ret = this.clone();\n var proposedUnitList = []; // Search for a matching base\n\n var matchingBase;\n\n for (var key in currentUnitSystem) {\n if (hasOwnProperty(currentUnitSystem, key)) {\n if (ret.hasBase(BASE_UNITS[key])) {\n matchingBase = key;\n break;\n }\n }\n }\n\n if (matchingBase === 'NONE') {\n ret.units = [];\n } else {\n var matchingUnit;\n\n if (matchingBase) {\n // Does the unit system have a matching unit?\n if (hasOwnProperty(currentUnitSystem, matchingBase)) {\n matchingUnit = currentUnitSystem[matchingBase];\n }\n }\n\n if (matchingUnit) {\n ret.units = [{\n unit: matchingUnit.unit,\n prefix: matchingUnit.prefix,\n power: 1.0\n }];\n } else {\n // Multiple units or units with powers are formatted like this:\n // 5 (kg m^2) / (s^3 mol)\n // Build an representation from the base units of the current unit system\n var missingBaseDim = false;\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n var baseDim = BASE_DIMENSIONS[i];\n\n if (Math.abs(ret.dimensions[i] || 0) > 1e-12) {\n if (hasOwnProperty(currentUnitSystem, baseDim)) {\n proposedUnitList.push({\n unit: currentUnitSystem[baseDim].unit,\n prefix: currentUnitSystem[baseDim].prefix,\n power: ret.dimensions[i] || 0\n });\n } else {\n missingBaseDim = true;\n }\n }\n } // Is the proposed unit list \"simpler\" than the existing one?\n\n\n if (proposedUnitList.length < ret.units.length && !missingBaseDim) {\n // Replace this unit list with the proposed list\n ret.units = proposedUnitList;\n }\n }\n }\n\n return ret;\n };\n /**\n * Returns a new Unit in the SI system with the same value as this one\n */\n\n\n Unit.prototype.toSI = function () {\n var ret = this.clone();\n var proposedUnitList = []; // Multiple units or units with powers are formatted like this:\n // 5 (kg m^2) / (s^3 mol)\n // Build an representation from the base units of the SI unit system\n\n for (var i = 0; i < BASE_DIMENSIONS.length; i++) {\n var baseDim = BASE_DIMENSIONS[i];\n\n if (Math.abs(ret.dimensions[i] || 0) > 1e-12) {\n if (hasOwnProperty(UNIT_SYSTEMS.si, baseDim)) {\n proposedUnitList.push({\n unit: UNIT_SYSTEMS.si[baseDim].unit,\n prefix: UNIT_SYSTEMS.si[baseDim].prefix,\n power: ret.dimensions[i] || 0\n });\n } else {\n throw new Error('Cannot express custom unit ' + baseDim + ' in SI units');\n }\n }\n } // Replace this unit list with the proposed list\n\n\n ret.units = proposedUnitList;\n ret.fixPrefix = true;\n ret.skipAutomaticSimplification = true;\n return ret;\n };\n /**\n * Get a string representation of the units of this Unit, without the value. The unit list is formatted as-is without first being simplified.\n * @memberof Unit\n * @return {string}\n */\n\n\n Unit.prototype.formatUnits = function () {\n var strNum = '';\n var strDen = '';\n var nNum = 0;\n var nDen = 0;\n\n for (var i = 0; i < this.units.length; i++) {\n if (this.units[i].power > 0) {\n nNum++;\n strNum += ' ' + this.units[i].prefix.name + this.units[i].unit.name;\n\n if (Math.abs(this.units[i].power - 1.0) > 1e-15) {\n strNum += '^' + this.units[i].power;\n }\n } else if (this.units[i].power < 0) {\n nDen++;\n }\n }\n\n if (nDen > 0) {\n for (var _i4 = 0; _i4 < this.units.length; _i4++) {\n if (this.units[_i4].power < 0) {\n if (nNum > 0) {\n strDen += ' ' + this.units[_i4].prefix.name + this.units[_i4].unit.name;\n\n if (Math.abs(this.units[_i4].power + 1.0) > 1e-15) {\n strDen += '^' + -this.units[_i4].power;\n }\n } else {\n strDen += ' ' + this.units[_i4].prefix.name + this.units[_i4].unit.name;\n strDen += '^' + this.units[_i4].power;\n }\n }\n }\n } // Remove leading \" \"\n\n\n strNum = strNum.substr(1);\n strDen = strDen.substr(1); // Add parans for better copy/paste back into evaluate, for example, or for better pretty print formatting\n\n if (nNum > 1 && nDen > 0) {\n strNum = '(' + strNum + ')';\n }\n\n if (nDen > 1 && nNum > 0) {\n strDen = '(' + strDen + ')';\n }\n\n var str = strNum;\n\n if (nNum > 0 && nDen > 0) {\n str += ' / ';\n }\n\n str += strDen;\n return str;\n };\n /**\n * Get a string representation of the Unit, with optional formatting options.\n * @memberof Unit\n * @param {Object | number | Function} [options] Formatting options. See\n * lib/utils/number:format for a\n * description of the available\n * options.\n * @return {string}\n */\n\n\n Unit.prototype.format = function (options) {\n // Simplfy the unit list, unless it is valueless or was created directly in the\n // constructor or as the result of to or toSI\n var simp = this.skipAutomaticSimplification || this.value === null ? this.clone() : this.simplify(); // Apply some custom logic for handling VA and VAR. The goal is to express the value of the unit as a real value, if possible. Otherwise, use a real-valued unit instead of a complex-valued one.\n\n var isImaginary = false;\n\n if (typeof simp.value !== 'undefined' && simp.value !== null && isComplex(simp.value)) {\n // TODO: Make this better, for example, use relative magnitude of re and im rather than absolute\n isImaginary = Math.abs(simp.value.re) < 1e-14;\n }\n\n for (var i in simp.units) {\n if (hasOwnProperty(simp.units, i)) {\n if (simp.units[i].unit) {\n if (simp.units[i].unit.name === 'VA' && isImaginary) {\n simp.units[i].unit = UNITS.VAR;\n } else if (simp.units[i].unit.name === 'VAR' && !isImaginary) {\n simp.units[i].unit = UNITS.VA;\n }\n }\n }\n } // Now apply the best prefix\n // Units must have only one unit and not have the fixPrefix flag set\n\n\n if (simp.units.length === 1 && !simp.fixPrefix) {\n // Units must have integer powers, otherwise the prefix will change the\n // outputted value by not-an-integer-power-of-ten\n if (Math.abs(simp.units[0].power - Math.round(simp.units[0].power)) < 1e-14) {\n // Apply the best prefix\n simp.units[0].prefix = simp._bestPrefix();\n }\n }\n\n var value = simp._denormalize(simp.value);\n\n var str = simp.value !== null ? format(value, options || {}) : '';\n var unitStr = simp.formatUnits();\n\n if (simp.value && isComplex(simp.value)) {\n str = '(' + str + ')'; // Surround complex values with ( ) to enable better parsing\n }\n\n if (unitStr.length > 0 && str.length > 0) {\n str += ' ';\n }\n\n str += unitStr;\n return str;\n };\n /**\n * Calculate the best prefix using current value.\n * @memberof Unit\n * @returns {Object} prefix\n * @private\n */\n\n\n Unit.prototype._bestPrefix = function () {\n if (this.units.length !== 1) {\n throw new Error('Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!');\n }\n\n if (Math.abs(this.units[0].power - Math.round(this.units[0].power)) >= 1e-14) {\n throw new Error('Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!');\n } // find the best prefix value (resulting in the value of which\n // the absolute value of the log10 is closest to zero,\n // though with a little offset of 1.2 for nicer values: you get a\n // sequence 1mm 100mm 500mm 0.6m 1m 10m 100m 500m 0.6km 1km ...\n // Note: the units value can be any numeric type, but to find the best\n // prefix it's enough to work with limited precision of a regular number\n // Update: using mathjs abs since we also allow complex numbers\n\n\n var absValue = this.value !== null ? abs(this.value) : 0;\n var absUnitValue = abs(this.units[0].unit.value);\n var bestPrefix = this.units[0].prefix;\n\n if (absValue === 0) {\n return bestPrefix;\n }\n\n var power = this.units[0].power;\n var bestDiff = Math.log(absValue / Math.pow(bestPrefix.value * absUnitValue, power)) / Math.LN10 - 1.2;\n if (bestDiff > -2.200001 && bestDiff < 1.800001) return bestPrefix; // Allow the original prefix\n\n bestDiff = Math.abs(bestDiff);\n var prefixes = this.units[0].unit.prefixes;\n\n for (var p in prefixes) {\n if (hasOwnProperty(prefixes, p)) {\n var prefix = prefixes[p];\n\n if (prefix.scientific) {\n var diff = Math.abs(Math.log(absValue / Math.pow(prefix.value * absUnitValue, power)) / Math.LN10 - 1.2);\n\n if (diff < bestDiff || diff === bestDiff && prefix.name.length < bestPrefix.name.length) {\n // choose the prefix with the smallest diff, or if equal, choose the one\n // with the shortest name (can happen with SHORTLONG for example)\n bestPrefix = prefix;\n bestDiff = diff;\n }\n }\n }\n }\n\n return bestPrefix;\n };\n /**\n * Returns an array of units whose sum is equal to this unit\n * @memberof Unit\n * @param {Array} [parts] An array of strings or valueless units.\n *\n * Example:\n *\n * const u = new Unit(1, 'm')\n * u.splitUnit(['feet', 'inch'])\n * [ 3 feet, 3.3700787401575 inch ]\n *\n * @return {Array} An array of units.\n */\n\n\n Unit.prototype.splitUnit = function (parts) {\n var x = this.clone();\n var ret = [];\n\n for (var i = 0; i < parts.length; i++) {\n // Convert x to the requested unit\n x = x.to(parts[i]);\n if (i === parts.length - 1) break; // Get the numeric value of this unit\n\n var xNumeric = x.toNumeric(); // Check to see if xNumeric is nearly equal to an integer,\n // since fix can incorrectly round down if there is round-off error\n\n var xRounded = round(xNumeric);\n var xFixed = void 0;\n var isNearlyEqual = equal(xRounded, xNumeric);\n\n if (isNearlyEqual) {\n xFixed = xRounded;\n } else {\n xFixed = fix(x.toNumeric());\n }\n\n var y = new Unit(xFixed, parts[i].toString());\n ret.push(y);\n x = subtract(x, y);\n } // This little bit fixes a bug where the remainder should be 0 but is a little bit off.\n // But instead of comparing x, the remainder, with zero--we will compare the sum of\n // all the parts so far with the original value. If they are nearly equal,\n // we set the remainder to 0.\n\n\n var testSum = 0;\n\n for (var _i5 = 0; _i5 < ret.length; _i5++) {\n testSum = addScalar(testSum, ret[_i5].value);\n }\n\n if (equal(testSum, this.value)) {\n x.value = 0;\n }\n\n ret.push(x);\n return ret;\n };\n\n var PREFIXES = {\n NONE: {\n '': {\n name: '',\n value: 1,\n scientific: true\n }\n },\n SHORT: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n da: {\n name: 'da',\n value: 1e1,\n scientific: false\n },\n h: {\n name: 'h',\n value: 1e2,\n scientific: false\n },\n k: {\n name: 'k',\n value: 1e3,\n scientific: true\n },\n M: {\n name: 'M',\n value: 1e6,\n scientific: true\n },\n G: {\n name: 'G',\n value: 1e9,\n scientific: true\n },\n T: {\n name: 'T',\n value: 1e12,\n scientific: true\n },\n P: {\n name: 'P',\n value: 1e15,\n scientific: true\n },\n E: {\n name: 'E',\n value: 1e18,\n scientific: true\n },\n Z: {\n name: 'Z',\n value: 1e21,\n scientific: true\n },\n Y: {\n name: 'Y',\n value: 1e24,\n scientific: true\n },\n d: {\n name: 'd',\n value: 1e-1,\n scientific: false\n },\n c: {\n name: 'c',\n value: 1e-2,\n scientific: false\n },\n m: {\n name: 'm',\n value: 1e-3,\n scientific: true\n },\n u: {\n name: 'u',\n value: 1e-6,\n scientific: true\n },\n n: {\n name: 'n',\n value: 1e-9,\n scientific: true\n },\n p: {\n name: 'p',\n value: 1e-12,\n scientific: true\n },\n f: {\n name: 'f',\n value: 1e-15,\n scientific: true\n },\n a: {\n name: 'a',\n value: 1e-18,\n scientific: true\n },\n z: {\n name: 'z',\n value: 1e-21,\n scientific: true\n },\n y: {\n name: 'y',\n value: 1e-24,\n scientific: true\n }\n },\n LONG: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n deca: {\n name: 'deca',\n value: 1e1,\n scientific: false\n },\n hecto: {\n name: 'hecto',\n value: 1e2,\n scientific: false\n },\n kilo: {\n name: 'kilo',\n value: 1e3,\n scientific: true\n },\n mega: {\n name: 'mega',\n value: 1e6,\n scientific: true\n },\n giga: {\n name: 'giga',\n value: 1e9,\n scientific: true\n },\n tera: {\n name: 'tera',\n value: 1e12,\n scientific: true\n },\n peta: {\n name: 'peta',\n value: 1e15,\n scientific: true\n },\n exa: {\n name: 'exa',\n value: 1e18,\n scientific: true\n },\n zetta: {\n name: 'zetta',\n value: 1e21,\n scientific: true\n },\n yotta: {\n name: 'yotta',\n value: 1e24,\n scientific: true\n },\n deci: {\n name: 'deci',\n value: 1e-1,\n scientific: false\n },\n centi: {\n name: 'centi',\n value: 1e-2,\n scientific: false\n },\n milli: {\n name: 'milli',\n value: 1e-3,\n scientific: true\n },\n micro: {\n name: 'micro',\n value: 1e-6,\n scientific: true\n },\n nano: {\n name: 'nano',\n value: 1e-9,\n scientific: true\n },\n pico: {\n name: 'pico',\n value: 1e-12,\n scientific: true\n },\n femto: {\n name: 'femto',\n value: 1e-15,\n scientific: true\n },\n atto: {\n name: 'atto',\n value: 1e-18,\n scientific: true\n },\n zepto: {\n name: 'zepto',\n value: 1e-21,\n scientific: true\n },\n yocto: {\n name: 'yocto',\n value: 1e-24,\n scientific: true\n }\n },\n SQUARED: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n da: {\n name: 'da',\n value: 1e2,\n scientific: false\n },\n h: {\n name: 'h',\n value: 1e4,\n scientific: false\n },\n k: {\n name: 'k',\n value: 1e6,\n scientific: true\n },\n M: {\n name: 'M',\n value: 1e12,\n scientific: true\n },\n G: {\n name: 'G',\n value: 1e18,\n scientific: true\n },\n T: {\n name: 'T',\n value: 1e24,\n scientific: true\n },\n P: {\n name: 'P',\n value: 1e30,\n scientific: true\n },\n E: {\n name: 'E',\n value: 1e36,\n scientific: true\n },\n Z: {\n name: 'Z',\n value: 1e42,\n scientific: true\n },\n Y: {\n name: 'Y',\n value: 1e48,\n scientific: true\n },\n d: {\n name: 'd',\n value: 1e-2,\n scientific: false\n },\n c: {\n name: 'c',\n value: 1e-4,\n scientific: false\n },\n m: {\n name: 'm',\n value: 1e-6,\n scientific: true\n },\n u: {\n name: 'u',\n value: 1e-12,\n scientific: true\n },\n n: {\n name: 'n',\n value: 1e-18,\n scientific: true\n },\n p: {\n name: 'p',\n value: 1e-24,\n scientific: true\n },\n f: {\n name: 'f',\n value: 1e-30,\n scientific: true\n },\n a: {\n name: 'a',\n value: 1e-36,\n scientific: true\n },\n z: {\n name: 'z',\n value: 1e-42,\n scientific: true\n },\n y: {\n name: 'y',\n value: 1e-48,\n scientific: true\n }\n },\n CUBIC: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n da: {\n name: 'da',\n value: 1e3,\n scientific: false\n },\n h: {\n name: 'h',\n value: 1e6,\n scientific: false\n },\n k: {\n name: 'k',\n value: 1e9,\n scientific: true\n },\n M: {\n name: 'M',\n value: 1e18,\n scientific: true\n },\n G: {\n name: 'G',\n value: 1e27,\n scientific: true\n },\n T: {\n name: 'T',\n value: 1e36,\n scientific: true\n },\n P: {\n name: 'P',\n value: 1e45,\n scientific: true\n },\n E: {\n name: 'E',\n value: 1e54,\n scientific: true\n },\n Z: {\n name: 'Z',\n value: 1e63,\n scientific: true\n },\n Y: {\n name: 'Y',\n value: 1e72,\n scientific: true\n },\n d: {\n name: 'd',\n value: 1e-3,\n scientific: false\n },\n c: {\n name: 'c',\n value: 1e-6,\n scientific: false\n },\n m: {\n name: 'm',\n value: 1e-9,\n scientific: true\n },\n u: {\n name: 'u',\n value: 1e-18,\n scientific: true\n },\n n: {\n name: 'n',\n value: 1e-27,\n scientific: true\n },\n p: {\n name: 'p',\n value: 1e-36,\n scientific: true\n },\n f: {\n name: 'f',\n value: 1e-45,\n scientific: true\n },\n a: {\n name: 'a',\n value: 1e-54,\n scientific: true\n },\n z: {\n name: 'z',\n value: 1e-63,\n scientific: true\n },\n y: {\n name: 'y',\n value: 1e-72,\n scientific: true\n }\n },\n BINARY_SHORT_SI: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n k: {\n name: 'k',\n value: 1e3,\n scientific: true\n },\n M: {\n name: 'M',\n value: 1e6,\n scientific: true\n },\n G: {\n name: 'G',\n value: 1e9,\n scientific: true\n },\n T: {\n name: 'T',\n value: 1e12,\n scientific: true\n },\n P: {\n name: 'P',\n value: 1e15,\n scientific: true\n },\n E: {\n name: 'E',\n value: 1e18,\n scientific: true\n },\n Z: {\n name: 'Z',\n value: 1e21,\n scientific: true\n },\n Y: {\n name: 'Y',\n value: 1e24,\n scientific: true\n }\n },\n BINARY_SHORT_IEC: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n Ki: {\n name: 'Ki',\n value: 1024,\n scientific: true\n },\n Mi: {\n name: 'Mi',\n value: Math.pow(1024, 2),\n scientific: true\n },\n Gi: {\n name: 'Gi',\n value: Math.pow(1024, 3),\n scientific: true\n },\n Ti: {\n name: 'Ti',\n value: Math.pow(1024, 4),\n scientific: true\n },\n Pi: {\n name: 'Pi',\n value: Math.pow(1024, 5),\n scientific: true\n },\n Ei: {\n name: 'Ei',\n value: Math.pow(1024, 6),\n scientific: true\n },\n Zi: {\n name: 'Zi',\n value: Math.pow(1024, 7),\n scientific: true\n },\n Yi: {\n name: 'Yi',\n value: Math.pow(1024, 8),\n scientific: true\n }\n },\n BINARY_LONG_SI: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n kilo: {\n name: 'kilo',\n value: 1e3,\n scientific: true\n },\n mega: {\n name: 'mega',\n value: 1e6,\n scientific: true\n },\n giga: {\n name: 'giga',\n value: 1e9,\n scientific: true\n },\n tera: {\n name: 'tera',\n value: 1e12,\n scientific: true\n },\n peta: {\n name: 'peta',\n value: 1e15,\n scientific: true\n },\n exa: {\n name: 'exa',\n value: 1e18,\n scientific: true\n },\n zetta: {\n name: 'zetta',\n value: 1e21,\n scientific: true\n },\n yotta: {\n name: 'yotta',\n value: 1e24,\n scientific: true\n }\n },\n BINARY_LONG_IEC: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n kibi: {\n name: 'kibi',\n value: 1024,\n scientific: true\n },\n mebi: {\n name: 'mebi',\n value: Math.pow(1024, 2),\n scientific: true\n },\n gibi: {\n name: 'gibi',\n value: Math.pow(1024, 3),\n scientific: true\n },\n tebi: {\n name: 'tebi',\n value: Math.pow(1024, 4),\n scientific: true\n },\n pebi: {\n name: 'pebi',\n value: Math.pow(1024, 5),\n scientific: true\n },\n exi: {\n name: 'exi',\n value: Math.pow(1024, 6),\n scientific: true\n },\n zebi: {\n name: 'zebi',\n value: Math.pow(1024, 7),\n scientific: true\n },\n yobi: {\n name: 'yobi',\n value: Math.pow(1024, 8),\n scientific: true\n }\n },\n BTU: {\n '': {\n name: '',\n value: 1,\n scientific: true\n },\n MM: {\n name: 'MM',\n value: 1e6,\n scientific: true\n }\n }\n };\n PREFIXES.SHORTLONG = _extends({}, PREFIXES.SHORT, PREFIXES.LONG);\n PREFIXES.BINARY_SHORT = _extends({}, PREFIXES.BINARY_SHORT_SI, PREFIXES.BINARY_SHORT_IEC);\n PREFIXES.BINARY_LONG = _extends({}, PREFIXES.BINARY_LONG_SI, PREFIXES.BINARY_LONG_IEC);\n /* Internally, each unit is represented by a value and a dimension array. The elements of the dimensions array have the following meaning:\n * Index Dimension\n * ----- ---------\n * 0 Length\n * 1 Mass\n * 2 Time\n * 3 Current\n * 4 Temperature\n * 5 Luminous intensity\n * 6 Amount of substance\n * 7 Angle\n * 8 Bit (digital)\n * For example, the unit \"298.15 K\" is a pure temperature and would have a value of 298.15 and a dimension array of [0, 0, 0, 0, 1, 0, 0, 0, 0]. The unit \"1 cal / (gm °C)\" can be written in terms of the 9 fundamental dimensions as [length^2] / ([time^2] * [temperature]), and would a value of (after conversion to SI) 4184.0 and a dimensions array of [2, 0, -2, 0, -1, 0, 0, 0, 0].\n *\n */\n\n var BASE_DIMENSIONS = ['MASS', 'LENGTH', 'TIME', 'CURRENT', 'TEMPERATURE', 'LUMINOUS_INTENSITY', 'AMOUNT_OF_SUBSTANCE', 'ANGLE', 'BIT'];\n var BASE_UNITS = {\n NONE: {\n dimensions: [0, 0, 0, 0, 0, 0, 0, 0, 0]\n },\n MASS: {\n dimensions: [1, 0, 0, 0, 0, 0, 0, 0, 0]\n },\n LENGTH: {\n dimensions: [0, 1, 0, 0, 0, 0, 0, 0, 0]\n },\n TIME: {\n dimensions: [0, 0, 1, 0, 0, 0, 0, 0, 0]\n },\n CURRENT: {\n dimensions: [0, 0, 0, 1, 0, 0, 0, 0, 0]\n },\n TEMPERATURE: {\n dimensions: [0, 0, 0, 0, 1, 0, 0, 0, 0]\n },\n LUMINOUS_INTENSITY: {\n dimensions: [0, 0, 0, 0, 0, 1, 0, 0, 0]\n },\n AMOUNT_OF_SUBSTANCE: {\n dimensions: [0, 0, 0, 0, 0, 0, 1, 0, 0]\n },\n FORCE: {\n dimensions: [1, 1, -2, 0, 0, 0, 0, 0, 0]\n },\n SURFACE: {\n dimensions: [0, 2, 0, 0, 0, 0, 0, 0, 0]\n },\n VOLUME: {\n dimensions: [0, 3, 0, 0, 0, 0, 0, 0, 0]\n },\n ENERGY: {\n dimensions: [1, 2, -2, 0, 0, 0, 0, 0, 0]\n },\n POWER: {\n dimensions: [1, 2, -3, 0, 0, 0, 0, 0, 0]\n },\n PRESSURE: {\n dimensions: [1, -1, -2, 0, 0, 0, 0, 0, 0]\n },\n ELECTRIC_CHARGE: {\n dimensions: [0, 0, 1, 1, 0, 0, 0, 0, 0]\n },\n ELECTRIC_CAPACITANCE: {\n dimensions: [-1, -2, 4, 2, 0, 0, 0, 0, 0]\n },\n ELECTRIC_POTENTIAL: {\n dimensions: [1, 2, -3, -1, 0, 0, 0, 0, 0]\n },\n ELECTRIC_RESISTANCE: {\n dimensions: [1, 2, -3, -2, 0, 0, 0, 0, 0]\n },\n ELECTRIC_INDUCTANCE: {\n dimensions: [1, 2, -2, -2, 0, 0, 0, 0, 0]\n },\n ELECTRIC_CONDUCTANCE: {\n dimensions: [-1, -2, 3, 2, 0, 0, 0, 0, 0]\n },\n MAGNETIC_FLUX: {\n dimensions: [1, 2, -2, -1, 0, 0, 0, 0, 0]\n },\n MAGNETIC_FLUX_DENSITY: {\n dimensions: [1, 0, -2, -1, 0, 0, 0, 0, 0]\n },\n FREQUENCY: {\n dimensions: [0, 0, -1, 0, 0, 0, 0, 0, 0]\n },\n ANGLE: {\n dimensions: [0, 0, 0, 0, 0, 0, 0, 1, 0]\n },\n BIT: {\n dimensions: [0, 0, 0, 0, 0, 0, 0, 0, 1]\n }\n };\n\n for (var key in BASE_UNITS) {\n if (hasOwnProperty(BASE_UNITS, key)) {\n BASE_UNITS[key].key = key;\n }\n }\n\n var BASE_UNIT_NONE = {};\n var UNIT_NONE = {\n name: '',\n base: BASE_UNIT_NONE,\n value: 1,\n offset: 0,\n dimensions: BASE_DIMENSIONS.map(x => 0)\n };\n var UNITS = {\n // length\n meter: {\n name: 'meter',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n inch: {\n name: 'inch',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.0254,\n offset: 0\n },\n foot: {\n name: 'foot',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.3048,\n offset: 0\n },\n yard: {\n name: 'yard',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.9144,\n offset: 0\n },\n mile: {\n name: 'mile',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 1609.344,\n offset: 0\n },\n link: {\n name: 'link',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.201168,\n offset: 0\n },\n rod: {\n name: 'rod',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 5.0292,\n offset: 0\n },\n chain: {\n name: 'chain',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 20.1168,\n offset: 0\n },\n angstrom: {\n name: 'angstrom',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 1e-10,\n offset: 0\n },\n m: {\n name: 'm',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n in: {\n name: 'in',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.0254,\n offset: 0\n },\n ft: {\n name: 'ft',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.3048,\n offset: 0\n },\n yd: {\n name: 'yd',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.9144,\n offset: 0\n },\n mi: {\n name: 'mi',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 1609.344,\n offset: 0\n },\n li: {\n name: 'li',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.201168,\n offset: 0\n },\n rd: {\n name: 'rd',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 5.029210,\n offset: 0\n },\n ch: {\n name: 'ch',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 20.1168,\n offset: 0\n },\n mil: {\n name: 'mil',\n base: BASE_UNITS.LENGTH,\n prefixes: PREFIXES.NONE,\n value: 0.0000254,\n offset: 0\n },\n // 1/1000 inch\n // Surface\n m2: {\n name: 'm2',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.SQUARED,\n value: 1,\n offset: 0\n },\n sqin: {\n name: 'sqin',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 0.00064516,\n offset: 0\n },\n // 645.16 mm2\n sqft: {\n name: 'sqft',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 0.09290304,\n offset: 0\n },\n // 0.09290304 m2\n sqyd: {\n name: 'sqyd',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 0.83612736,\n offset: 0\n },\n // 0.83612736 m2\n sqmi: {\n name: 'sqmi',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 2589988.110336,\n offset: 0\n },\n // 2.589988110336 km2\n sqrd: {\n name: 'sqrd',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 25.29295,\n offset: 0\n },\n // 25.29295 m2\n sqch: {\n name: 'sqch',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 404.6873,\n offset: 0\n },\n // 404.6873 m2\n sqmil: {\n name: 'sqmil',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 6.4516e-10,\n offset: 0\n },\n // 6.4516 * 10^-10 m2\n acre: {\n name: 'acre',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 4046.86,\n offset: 0\n },\n // 4046.86 m2\n hectare: {\n name: 'hectare',\n base: BASE_UNITS.SURFACE,\n prefixes: PREFIXES.NONE,\n value: 10000,\n offset: 0\n },\n // 10000 m2\n // Volume\n m3: {\n name: 'm3',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.CUBIC,\n value: 1,\n offset: 0\n },\n L: {\n name: 'L',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.SHORT,\n value: 0.001,\n offset: 0\n },\n // litre\n l: {\n name: 'l',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.SHORT,\n value: 0.001,\n offset: 0\n },\n // litre\n litre: {\n name: 'litre',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.LONG,\n value: 0.001,\n offset: 0\n },\n cuin: {\n name: 'cuin',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 1.6387064e-5,\n offset: 0\n },\n // 1.6387064e-5 m3\n cuft: {\n name: 'cuft',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.028316846592,\n offset: 0\n },\n // 28.316 846 592 L\n cuyd: {\n name: 'cuyd',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.764554857984,\n offset: 0\n },\n // 764.554 857 984 L\n teaspoon: {\n name: 'teaspoon',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.000005,\n offset: 0\n },\n // 5 mL\n tablespoon: {\n name: 'tablespoon',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.000015,\n offset: 0\n },\n // 15 mL\n // {name: 'cup', base: BASE_UNITS.VOLUME, prefixes: PREFIXES.NONE, value: 0.000240, offset: 0}, // 240 mL // not possible, we have already another cup\n drop: {\n name: 'drop',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 5e-8,\n offset: 0\n },\n // 0.05 mL = 5e-8 m3\n gtt: {\n name: 'gtt',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 5e-8,\n offset: 0\n },\n // 0.05 mL = 5e-8 m3\n // Liquid volume\n minim: {\n name: 'minim',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.00000006161152,\n offset: 0\n },\n // 0.06161152 mL\n fluiddram: {\n name: 'fluiddram',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0000036966911,\n offset: 0\n },\n // 3.696691 mL\n fluidounce: {\n name: 'fluidounce',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.00002957353,\n offset: 0\n },\n // 29.57353 mL\n gill: {\n name: 'gill',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0001182941,\n offset: 0\n },\n // 118.2941 mL\n cc: {\n name: 'cc',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 1e-6,\n offset: 0\n },\n // 1e-6 L\n cup: {\n name: 'cup',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0002365882,\n offset: 0\n },\n // 236.5882 mL\n pint: {\n name: 'pint',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0004731765,\n offset: 0\n },\n // 473.1765 mL\n quart: {\n name: 'quart',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0009463529,\n offset: 0\n },\n // 946.3529 mL\n gallon: {\n name: 'gallon',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.003785412,\n offset: 0\n },\n // 3.785412 L\n beerbarrel: {\n name: 'beerbarrel',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.1173478,\n offset: 0\n },\n // 117.3478 L\n oilbarrel: {\n name: 'oilbarrel',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.1589873,\n offset: 0\n },\n // 158.9873 L\n hogshead: {\n name: 'hogshead',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.2384810,\n offset: 0\n },\n // 238.4810 L\n // {name: 'min', base: BASE_UNITS.VOLUME, prefixes: PREFIXES.NONE, value: 0.00000006161152, offset: 0}, // 0.06161152 mL // min is already in use as minute\n fldr: {\n name: 'fldr',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0000036966911,\n offset: 0\n },\n // 3.696691 mL\n floz: {\n name: 'floz',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.00002957353,\n offset: 0\n },\n // 29.57353 mL\n gi: {\n name: 'gi',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0001182941,\n offset: 0\n },\n // 118.2941 mL\n cp: {\n name: 'cp',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0002365882,\n offset: 0\n },\n // 236.5882 mL\n pt: {\n name: 'pt',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0004731765,\n offset: 0\n },\n // 473.1765 mL\n qt: {\n name: 'qt',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.0009463529,\n offset: 0\n },\n // 946.3529 mL\n gal: {\n name: 'gal',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.003785412,\n offset: 0\n },\n // 3.785412 L\n bbl: {\n name: 'bbl',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.1173478,\n offset: 0\n },\n // 117.3478 L\n obl: {\n name: 'obl',\n base: BASE_UNITS.VOLUME,\n prefixes: PREFIXES.NONE,\n value: 0.1589873,\n offset: 0\n },\n // 158.9873 L\n // {name: 'hogshead', base: BASE_UNITS.VOLUME, prefixes: PREFIXES.NONE, value: 0.2384810, offset: 0}, // 238.4810 L // TODO: hh?\n // Mass\n g: {\n name: 'g',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.SHORT,\n value: 0.001,\n offset: 0\n },\n gram: {\n name: 'gram',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.LONG,\n value: 0.001,\n offset: 0\n },\n ton: {\n name: 'ton',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.SHORT,\n value: 907.18474,\n offset: 0\n },\n t: {\n name: 't',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.SHORT,\n value: 1000,\n offset: 0\n },\n tonne: {\n name: 'tonne',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.LONG,\n value: 1000,\n offset: 0\n },\n grain: {\n name: 'grain',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 64.79891e-6,\n offset: 0\n },\n dram: {\n name: 'dram',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 1.7718451953125e-3,\n offset: 0\n },\n ounce: {\n name: 'ounce',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 28.349523125e-3,\n offset: 0\n },\n poundmass: {\n name: 'poundmass',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 453.59237e-3,\n offset: 0\n },\n hundredweight: {\n name: 'hundredweight',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 45.359237,\n offset: 0\n },\n stick: {\n name: 'stick',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 115e-3,\n offset: 0\n },\n stone: {\n name: 'stone',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 6.35029318,\n offset: 0\n },\n gr: {\n name: 'gr',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 64.79891e-6,\n offset: 0\n },\n dr: {\n name: 'dr',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 1.7718451953125e-3,\n offset: 0\n },\n oz: {\n name: 'oz',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 28.349523125e-3,\n offset: 0\n },\n lbm: {\n name: 'lbm',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 453.59237e-3,\n offset: 0\n },\n cwt: {\n name: 'cwt',\n base: BASE_UNITS.MASS,\n prefixes: PREFIXES.NONE,\n value: 45.359237,\n offset: 0\n },\n // Time\n s: {\n name: 's',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n min: {\n name: 'min',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 60,\n offset: 0\n },\n h: {\n name: 'h',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 3600,\n offset: 0\n },\n second: {\n name: 'second',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n sec: {\n name: 'sec',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n minute: {\n name: 'minute',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 60,\n offset: 0\n },\n hour: {\n name: 'hour',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 3600,\n offset: 0\n },\n day: {\n name: 'day',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 86400,\n offset: 0\n },\n week: {\n name: 'week',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 7 * 86400,\n offset: 0\n },\n month: {\n name: 'month',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 2629800,\n // 1/12th of Julian year\n offset: 0\n },\n year: {\n name: 'year',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 31557600,\n // Julian year\n offset: 0\n },\n decade: {\n name: 'decade',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 315576000,\n // Julian decade\n offset: 0\n },\n century: {\n name: 'century',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 3155760000,\n // Julian century\n offset: 0\n },\n millennium: {\n name: 'millennium',\n base: BASE_UNITS.TIME,\n prefixes: PREFIXES.NONE,\n value: 31557600000,\n // Julian millennium\n offset: 0\n },\n // Frequency\n hertz: {\n name: 'Hertz',\n base: BASE_UNITS.FREQUENCY,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0,\n reciprocal: true\n },\n Hz: {\n name: 'Hz',\n base: BASE_UNITS.FREQUENCY,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0,\n reciprocal: true\n },\n // Angle\n rad: {\n name: 'rad',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n radian: {\n name: 'radian',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n // deg = rad / (2*pi) * 360 = rad / 0.017453292519943295769236907684888\n deg: {\n name: 'deg',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.SHORT,\n value: null,\n // will be filled in by calculateAngleValues()\n offset: 0\n },\n degree: {\n name: 'degree',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.LONG,\n value: null,\n // will be filled in by calculateAngleValues()\n offset: 0\n },\n // grad = rad / (2*pi) * 400 = rad / 0.015707963267948966192313216916399\n grad: {\n name: 'grad',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.SHORT,\n value: null,\n // will be filled in by calculateAngleValues()\n offset: 0\n },\n gradian: {\n name: 'gradian',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.LONG,\n value: null,\n // will be filled in by calculateAngleValues()\n offset: 0\n },\n // cycle = rad / (2*pi) = rad / 6.2831853071795864769252867665793\n cycle: {\n name: 'cycle',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.NONE,\n value: null,\n // will be filled in by calculateAngleValues()\n offset: 0\n },\n // arcsec = rad / (3600 * (360 / 2 * pi)) = rad / 0.0000048481368110953599358991410235795\n arcsec: {\n name: 'arcsec',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.NONE,\n value: null,\n // will be filled in by calculateAngleValues()\n offset: 0\n },\n // arcmin = rad / (60 * (360 / 2 * pi)) = rad / 0.00029088820866572159615394846141477\n arcmin: {\n name: 'arcmin',\n base: BASE_UNITS.ANGLE,\n prefixes: PREFIXES.NONE,\n value: null,\n // will be filled in by calculateAngleValues()\n offset: 0\n },\n // Electric current\n A: {\n name: 'A',\n base: BASE_UNITS.CURRENT,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n ampere: {\n name: 'ampere',\n base: BASE_UNITS.CURRENT,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n // Temperature\n // K(C) = °C + 273.15\n // K(F) = (°F + 459.67) / 1.8\n // K(R) = °R / 1.8\n K: {\n name: 'K',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1,\n offset: 0\n },\n degC: {\n name: 'degC',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1,\n offset: 273.15\n },\n degF: {\n name: 'degF',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1 / 1.8,\n offset: 459.67\n },\n degR: {\n name: 'degR',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1 / 1.8,\n offset: 0\n },\n kelvin: {\n name: 'kelvin',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1,\n offset: 0\n },\n celsius: {\n name: 'celsius',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1,\n offset: 273.15\n },\n fahrenheit: {\n name: 'fahrenheit',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1 / 1.8,\n offset: 459.67\n },\n rankine: {\n name: 'rankine',\n base: BASE_UNITS.TEMPERATURE,\n prefixes: PREFIXES.NONE,\n value: 1 / 1.8,\n offset: 0\n },\n // amount of substance\n mol: {\n name: 'mol',\n base: BASE_UNITS.AMOUNT_OF_SUBSTANCE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n mole: {\n name: 'mole',\n base: BASE_UNITS.AMOUNT_OF_SUBSTANCE,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n // luminous intensity\n cd: {\n name: 'cd',\n base: BASE_UNITS.LUMINOUS_INTENSITY,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n candela: {\n name: 'candela',\n base: BASE_UNITS.LUMINOUS_INTENSITY,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n // TODO: units STERADIAN\n // {name: 'sr', base: BASE_UNITS.STERADIAN, prefixes: PREFIXES.NONE, value: 1, offset: 0},\n // {name: 'steradian', base: BASE_UNITS.STERADIAN, prefixes: PREFIXES.NONE, value: 1, offset: 0},\n // Force\n N: {\n name: 'N',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n newton: {\n name: 'newton',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n dyn: {\n name: 'dyn',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.SHORT,\n value: 0.00001,\n offset: 0\n },\n dyne: {\n name: 'dyne',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.LONG,\n value: 0.00001,\n offset: 0\n },\n lbf: {\n name: 'lbf',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.NONE,\n value: 4.4482216152605,\n offset: 0\n },\n poundforce: {\n name: 'poundforce',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.NONE,\n value: 4.4482216152605,\n offset: 0\n },\n kip: {\n name: 'kip',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.LONG,\n value: 4448.2216,\n offset: 0\n },\n kilogramforce: {\n name: 'kilogramforce',\n base: BASE_UNITS.FORCE,\n prefixes: PREFIXES.NONE,\n value: 9.80665,\n offset: 0\n },\n // Energy\n J: {\n name: 'J',\n base: BASE_UNITS.ENERGY,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n joule: {\n name: 'joule',\n base: BASE_UNITS.ENERGY,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n erg: {\n name: 'erg',\n base: BASE_UNITS.ENERGY,\n prefixes: PREFIXES.NONE,\n value: 1e-7,\n offset: 0\n },\n Wh: {\n name: 'Wh',\n base: BASE_UNITS.ENERGY,\n prefixes: PREFIXES.SHORT,\n value: 3600,\n offset: 0\n },\n BTU: {\n name: 'BTU',\n base: BASE_UNITS.ENERGY,\n prefixes: PREFIXES.BTU,\n value: 1055.05585262,\n offset: 0\n },\n eV: {\n name: 'eV',\n base: BASE_UNITS.ENERGY,\n prefixes: PREFIXES.SHORT,\n value: 1.602176565e-19,\n offset: 0\n },\n electronvolt: {\n name: 'electronvolt',\n base: BASE_UNITS.ENERGY,\n prefixes: PREFIXES.LONG,\n value: 1.602176565e-19,\n offset: 0\n },\n // Power\n W: {\n name: 'W',\n base: BASE_UNITS.POWER,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n watt: {\n name: 'watt',\n base: BASE_UNITS.POWER,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n hp: {\n name: 'hp',\n base: BASE_UNITS.POWER,\n prefixes: PREFIXES.NONE,\n value: 745.6998715386,\n offset: 0\n },\n // Electrical power units\n VAR: {\n name: 'VAR',\n base: BASE_UNITS.POWER,\n prefixes: PREFIXES.SHORT,\n value: Complex.I,\n offset: 0\n },\n VA: {\n name: 'VA',\n base: BASE_UNITS.POWER,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Pressure\n Pa: {\n name: 'Pa',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n psi: {\n name: 'psi',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.NONE,\n value: 6894.75729276459,\n offset: 0\n },\n atm: {\n name: 'atm',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.NONE,\n value: 101325,\n offset: 0\n },\n bar: {\n name: 'bar',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.SHORTLONG,\n value: 100000,\n offset: 0\n },\n torr: {\n name: 'torr',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.NONE,\n value: 133.322,\n offset: 0\n },\n mmHg: {\n name: 'mmHg',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.NONE,\n value: 133.322,\n offset: 0\n },\n mmH2O: {\n name: 'mmH2O',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.NONE,\n value: 9.80665,\n offset: 0\n },\n cmH2O: {\n name: 'cmH2O',\n base: BASE_UNITS.PRESSURE,\n prefixes: PREFIXES.NONE,\n value: 98.0665,\n offset: 0\n },\n // Electric charge\n coulomb: {\n name: 'coulomb',\n base: BASE_UNITS.ELECTRIC_CHARGE,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n C: {\n name: 'C',\n base: BASE_UNITS.ELECTRIC_CHARGE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Electric capacitance\n farad: {\n name: 'farad',\n base: BASE_UNITS.ELECTRIC_CAPACITANCE,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n F: {\n name: 'F',\n base: BASE_UNITS.ELECTRIC_CAPACITANCE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Electric potential\n volt: {\n name: 'volt',\n base: BASE_UNITS.ELECTRIC_POTENTIAL,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n V: {\n name: 'V',\n base: BASE_UNITS.ELECTRIC_POTENTIAL,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Electric resistance\n ohm: {\n name: 'ohm',\n base: BASE_UNITS.ELECTRIC_RESISTANCE,\n prefixes: PREFIXES.SHORTLONG,\n // Both Mohm and megaohm are acceptable\n value: 1,\n offset: 0\n },\n\n /*\n * Unicode breaks in browsers if charset is not specified\n Ω: {\n name: 'Ω',\n base: BASE_UNITS.ELECTRIC_RESISTANCE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n */\n // Electric inductance\n henry: {\n name: 'henry',\n base: BASE_UNITS.ELECTRIC_INDUCTANCE,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n H: {\n name: 'H',\n base: BASE_UNITS.ELECTRIC_INDUCTANCE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Electric conductance\n siemens: {\n name: 'siemens',\n base: BASE_UNITS.ELECTRIC_CONDUCTANCE,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n S: {\n name: 'S',\n base: BASE_UNITS.ELECTRIC_CONDUCTANCE,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Magnetic flux\n weber: {\n name: 'weber',\n base: BASE_UNITS.MAGNETIC_FLUX,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n Wb: {\n name: 'Wb',\n base: BASE_UNITS.MAGNETIC_FLUX,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Magnetic flux density\n tesla: {\n name: 'tesla',\n base: BASE_UNITS.MAGNETIC_FLUX_DENSITY,\n prefixes: PREFIXES.LONG,\n value: 1,\n offset: 0\n },\n T: {\n name: 'T',\n base: BASE_UNITS.MAGNETIC_FLUX_DENSITY,\n prefixes: PREFIXES.SHORT,\n value: 1,\n offset: 0\n },\n // Binary\n b: {\n name: 'b',\n base: BASE_UNITS.BIT,\n prefixes: PREFIXES.BINARY_SHORT,\n value: 1,\n offset: 0\n },\n bits: {\n name: 'bits',\n base: BASE_UNITS.BIT,\n prefixes: PREFIXES.BINARY_LONG,\n value: 1,\n offset: 0\n },\n B: {\n name: 'B',\n base: BASE_UNITS.BIT,\n prefixes: PREFIXES.BINARY_SHORT,\n value: 8,\n offset: 0\n },\n bytes: {\n name: 'bytes',\n base: BASE_UNITS.BIT,\n prefixes: PREFIXES.BINARY_LONG,\n value: 8,\n offset: 0\n }\n }; // aliases (formerly plurals)\n\n var ALIASES = {\n meters: 'meter',\n inches: 'inch',\n feet: 'foot',\n yards: 'yard',\n miles: 'mile',\n links: 'link',\n rods: 'rod',\n chains: 'chain',\n angstroms: 'angstrom',\n lt: 'l',\n litres: 'litre',\n liter: 'litre',\n liters: 'litre',\n teaspoons: 'teaspoon',\n tablespoons: 'tablespoon',\n minims: 'minim',\n fluiddrams: 'fluiddram',\n fluidounces: 'fluidounce',\n gills: 'gill',\n cups: 'cup',\n pints: 'pint',\n quarts: 'quart',\n gallons: 'gallon',\n beerbarrels: 'beerbarrel',\n oilbarrels: 'oilbarrel',\n hogsheads: 'hogshead',\n gtts: 'gtt',\n grams: 'gram',\n tons: 'ton',\n tonnes: 'tonne',\n grains: 'grain',\n drams: 'dram',\n ounces: 'ounce',\n poundmasses: 'poundmass',\n hundredweights: 'hundredweight',\n sticks: 'stick',\n lb: 'lbm',\n lbs: 'lbm',\n kips: 'kip',\n kgf: 'kilogramforce',\n acres: 'acre',\n hectares: 'hectare',\n sqfeet: 'sqft',\n sqyard: 'sqyd',\n sqmile: 'sqmi',\n sqmiles: 'sqmi',\n mmhg: 'mmHg',\n mmh2o: 'mmH2O',\n cmh2o: 'cmH2O',\n seconds: 'second',\n secs: 'second',\n minutes: 'minute',\n mins: 'minute',\n hours: 'hour',\n hr: 'hour',\n hrs: 'hour',\n days: 'day',\n weeks: 'week',\n months: 'month',\n years: 'year',\n decades: 'decade',\n centuries: 'century',\n millennia: 'millennium',\n hertz: 'hertz',\n radians: 'radian',\n degrees: 'degree',\n gradians: 'gradian',\n cycles: 'cycle',\n arcsecond: 'arcsec',\n arcseconds: 'arcsec',\n arcminute: 'arcmin',\n arcminutes: 'arcmin',\n BTUs: 'BTU',\n watts: 'watt',\n joules: 'joule',\n amperes: 'ampere',\n coulombs: 'coulomb',\n volts: 'volt',\n ohms: 'ohm',\n farads: 'farad',\n webers: 'weber',\n teslas: 'tesla',\n electronvolts: 'electronvolt',\n moles: 'mole',\n bit: 'bits',\n byte: 'bytes'\n };\n /**\n * Calculate the values for the angle units.\n * Value is calculated as number or BigNumber depending on the configuration\n * @param {{number: 'number' | 'BigNumber'}} config\n */\n\n function calculateAngleValues(config) {\n if (config.number === 'BigNumber') {\n var pi = createPi(_BigNumber);\n UNITS.rad.value = new _BigNumber(1);\n UNITS.deg.value = pi.div(180); // 2 * pi / 360\n\n UNITS.grad.value = pi.div(200); // 2 * pi / 400\n\n UNITS.cycle.value = pi.times(2); // 2 * pi\n\n UNITS.arcsec.value = pi.div(648000); // 2 * pi / 360 / 3600\n\n UNITS.arcmin.value = pi.div(10800); // 2 * pi / 360 / 60\n } else {\n // number\n UNITS.rad.value = 1;\n UNITS.deg.value = Math.PI / 180; // 2 * pi / 360\n\n UNITS.grad.value = Math.PI / 200; // 2 * pi / 400\n\n UNITS.cycle.value = Math.PI * 2; // 2 * pi\n\n UNITS.arcsec.value = Math.PI / 648000; // 2 * pi / 360 / 3600\n\n UNITS.arcmin.value = Math.PI / 10800; // 2 * pi / 360 / 60\n } // copy to the full names of the angles\n\n\n UNITS.radian.value = UNITS.rad.value;\n UNITS.degree.value = UNITS.deg.value;\n UNITS.gradian.value = UNITS.grad.value;\n } // apply the angle values now\n\n\n calculateAngleValues(config);\n\n if (on) {\n // recalculate the values on change of configuration\n on('config', function (curr, prev) {\n if (curr.number !== prev.number) {\n calculateAngleValues(curr);\n }\n });\n }\n /**\n * A unit system is a set of dimensionally independent base units plus a set of derived units, formed by multiplication and division of the base units, that are by convention used with the unit system.\n * A user perhaps could issue a command to select a preferred unit system, or use the default (see below).\n * Auto unit system: The default unit system is updated on the fly anytime a unit is parsed. The corresponding unit in the default unit system is updated, so that answers are given in the same units the user supplies.\n */\n\n\n var UNIT_SYSTEMS = {\n si: {\n // Base units\n NONE: {\n unit: UNIT_NONE,\n prefix: PREFIXES.NONE['']\n },\n LENGTH: {\n unit: UNITS.m,\n prefix: PREFIXES.SHORT['']\n },\n MASS: {\n unit: UNITS.g,\n prefix: PREFIXES.SHORT.k\n },\n TIME: {\n unit: UNITS.s,\n prefix: PREFIXES.SHORT['']\n },\n CURRENT: {\n unit: UNITS.A,\n prefix: PREFIXES.SHORT['']\n },\n TEMPERATURE: {\n unit: UNITS.K,\n prefix: PREFIXES.SHORT['']\n },\n LUMINOUS_INTENSITY: {\n unit: UNITS.cd,\n prefix: PREFIXES.SHORT['']\n },\n AMOUNT_OF_SUBSTANCE: {\n unit: UNITS.mol,\n prefix: PREFIXES.SHORT['']\n },\n ANGLE: {\n unit: UNITS.rad,\n prefix: PREFIXES.SHORT['']\n },\n BIT: {\n unit: UNITS.bits,\n prefix: PREFIXES.SHORT['']\n },\n // Derived units\n FORCE: {\n unit: UNITS.N,\n prefix: PREFIXES.SHORT['']\n },\n ENERGY: {\n unit: UNITS.J,\n prefix: PREFIXES.SHORT['']\n },\n POWER: {\n unit: UNITS.W,\n prefix: PREFIXES.SHORT['']\n },\n PRESSURE: {\n unit: UNITS.Pa,\n prefix: PREFIXES.SHORT['']\n },\n ELECTRIC_CHARGE: {\n unit: UNITS.C,\n prefix: PREFIXES.SHORT['']\n },\n ELECTRIC_CAPACITANCE: {\n unit: UNITS.F,\n prefix: PREFIXES.SHORT['']\n },\n ELECTRIC_POTENTIAL: {\n unit: UNITS.V,\n prefix: PREFIXES.SHORT['']\n },\n ELECTRIC_RESISTANCE: {\n unit: UNITS.ohm,\n prefix: PREFIXES.SHORT['']\n },\n ELECTRIC_INDUCTANCE: {\n unit: UNITS.H,\n prefix: PREFIXES.SHORT['']\n },\n ELECTRIC_CONDUCTANCE: {\n unit: UNITS.S,\n prefix: PREFIXES.SHORT['']\n },\n MAGNETIC_FLUX: {\n unit: UNITS.Wb,\n prefix: PREFIXES.SHORT['']\n },\n MAGNETIC_FLUX_DENSITY: {\n unit: UNITS.T,\n prefix: PREFIXES.SHORT['']\n },\n FREQUENCY: {\n unit: UNITS.Hz,\n prefix: PREFIXES.SHORT['']\n }\n }\n }; // Clone to create the other unit systems\n\n UNIT_SYSTEMS.cgs = JSON.parse(JSON.stringify(UNIT_SYSTEMS.si));\n UNIT_SYSTEMS.cgs.LENGTH = {\n unit: UNITS.m,\n prefix: PREFIXES.SHORT.c\n };\n UNIT_SYSTEMS.cgs.MASS = {\n unit: UNITS.g,\n prefix: PREFIXES.SHORT['']\n };\n UNIT_SYSTEMS.cgs.FORCE = {\n unit: UNITS.dyn,\n prefix: PREFIXES.SHORT['']\n };\n UNIT_SYSTEMS.cgs.ENERGY = {\n unit: UNITS.erg,\n prefix: PREFIXES.NONE['']\n }; // there are wholly 4 unique cgs systems for electricity and magnetism,\n // so let's not worry about it unless somebody complains\n\n UNIT_SYSTEMS.us = JSON.parse(JSON.stringify(UNIT_SYSTEMS.si));\n UNIT_SYSTEMS.us.LENGTH = {\n unit: UNITS.ft,\n prefix: PREFIXES.NONE['']\n };\n UNIT_SYSTEMS.us.MASS = {\n unit: UNITS.lbm,\n prefix: PREFIXES.NONE['']\n };\n UNIT_SYSTEMS.us.TEMPERATURE = {\n unit: UNITS.degF,\n prefix: PREFIXES.NONE['']\n };\n UNIT_SYSTEMS.us.FORCE = {\n unit: UNITS.lbf,\n prefix: PREFIXES.NONE['']\n };\n UNIT_SYSTEMS.us.ENERGY = {\n unit: UNITS.BTU,\n prefix: PREFIXES.BTU['']\n };\n UNIT_SYSTEMS.us.POWER = {\n unit: UNITS.hp,\n prefix: PREFIXES.NONE['']\n };\n UNIT_SYSTEMS.us.PRESSURE = {\n unit: UNITS.psi,\n prefix: PREFIXES.NONE['']\n }; // Add additional unit systems here.\n // Choose a unit system to seed the auto unit system.\n\n UNIT_SYSTEMS.auto = JSON.parse(JSON.stringify(UNIT_SYSTEMS.si)); // Set the current unit system\n\n var currentUnitSystem = UNIT_SYSTEMS.auto;\n /**\n * Set a unit system for formatting derived units.\n * @param {string} [name] The name of the unit system.\n */\n\n Unit.setUnitSystem = function (name) {\n if (hasOwnProperty(UNIT_SYSTEMS, name)) {\n currentUnitSystem = UNIT_SYSTEMS[name];\n } else {\n throw new Error('Unit system ' + name + ' does not exist. Choices are: ' + Object.keys(UNIT_SYSTEMS).join(', '));\n }\n };\n /**\n * Return the current unit system.\n * @return {string} The current unit system.\n */\n\n\n Unit.getUnitSystem = function () {\n for (var _key in UNIT_SYSTEMS) {\n if (hasOwnProperty(UNIT_SYSTEMS, _key)) {\n if (UNIT_SYSTEMS[_key] === currentUnitSystem) {\n return _key;\n }\n }\n }\n };\n /**\n * Converters to convert from number to an other numeric type like BigNumber\n * or Fraction\n */\n\n\n Unit.typeConverters = {\n BigNumber: function BigNumber(x) {\n return new _BigNumber(x + ''); // stringify to prevent constructor error\n },\n Fraction: function Fraction(x) {\n return new _Fraction(x);\n },\n Complex: function Complex(x) {\n return x;\n },\n number: function number(x) {\n return x;\n }\n };\n /**\n * Retrieve the right convertor function corresponding with the type\n * of provided exampleValue.\n *\n * @param {string} type A string 'number', 'BigNumber', or 'Fraction'\n * In case of an unknown type,\n * @return {Function}\n */\n\n Unit._getNumberConverter = function (type) {\n if (!Unit.typeConverters[type]) {\n throw new TypeError('Unsupported type \"' + type + '\"');\n }\n\n return Unit.typeConverters[type];\n }; // Add dimensions to each built-in unit\n\n\n for (var _key2 in UNITS) {\n if (hasOwnProperty(UNITS, _key2)) {\n var unit = UNITS[_key2];\n unit.dimensions = unit.base.dimensions;\n }\n } // Create aliases\n\n\n for (var _name2 in ALIASES) {\n if (hasOwnProperty(ALIASES, _name2)) {\n var _unit2 = UNITS[ALIASES[_name2]];\n var alias = {};\n\n for (var _key3 in _unit2) {\n if (hasOwnProperty(_unit2, _key3)) {\n alias[_key3] = _unit2[_key3];\n }\n }\n\n alias.name = _name2;\n UNITS[_name2] = alias;\n }\n }\n /**\n * Checks if a character is a valid latin letter (upper or lower case).\n * Note that this function can be overridden, for example to allow support of other alphabets.\n * @param {string} c Tested character\n */\n\n\n Unit.isValidAlpha = function isValidAlpha(c) {\n return /^[a-zA-Z]$/.test(c);\n };\n\n function assertUnitNameIsValid(name) {\n for (var i = 0; i < name.length; i++) {\n c = name.charAt(i);\n\n if (i === 0 && !Unit.isValidAlpha(c)) {\n throw new Error('Invalid unit name (must begin with alpha character): \"' + name + '\"');\n }\n\n if (i > 0 && !(Unit.isValidAlpha(c) || isDigit(c))) {\n throw new Error('Invalid unit name (only alphanumeric characters are allowed): \"' + name + '\"');\n }\n }\n }\n /**\n * Wrapper around createUnitSingle.\n * Example:\n * createUnit({\n * foo: { },\n * bar: {\n * definition: 'kg/foo',\n * aliases: ['ba', 'barr', 'bars'],\n * offset: 200\n * },\n * baz: '4 bar'\n * },\n * {\n * override: true\n * })\n * @param {object} obj Object map. Each key becomes a unit which is defined by its value.\n * @param {object} options\n */\n\n\n Unit.createUnit = function (obj, options) {\n if (typeof obj !== 'object') {\n throw new TypeError(\"createUnit expects first parameter to be of type 'Object'\");\n } // Remove all units and aliases we are overriding\n\n\n if (options && options.override) {\n for (var _key4 in obj) {\n if (hasOwnProperty(obj, _key4)) {\n Unit.deleteUnit(_key4);\n }\n\n if (obj[_key4].aliases) {\n for (var i = 0; i < obj[_key4].aliases.length; i++) {\n Unit.deleteUnit(obj[_key4].aliases[i]);\n }\n }\n }\n } // TODO: traverse multiple times until all units have been added\n\n\n var lastUnit;\n\n for (var _key5 in obj) {\n if (hasOwnProperty(obj, _key5)) {\n lastUnit = Unit.createUnitSingle(_key5, obj[_key5]);\n }\n }\n\n return lastUnit;\n };\n /**\n * Create a user-defined unit and register it with the Unit type.\n * Example:\n * createUnitSingle('knot', '0.514444444 m/s')\n * createUnitSingle('acre', new Unit(43560, 'ft^2'))\n *\n * @param {string} name The name of the new unit. Must be unique. Example: 'knot'\n * @param {string, Unit, Object} definition Definition of the unit in terms\n * of existing units. For example, '0.514444444 m / s'. Can be a Unit, a string,\n * or an Object. If an Object, may have the following properties:\n * - definition {string|Unit} The definition of this unit.\n * - prefixes {string} \"none\", \"short\", \"long\", \"binary_short\", or \"binary_long\".\n * The default is \"none\".\n * - aliases {Array} Array of strings. Example: ['knots', 'kt', 'kts']\n * - offset {Numeric} An offset to apply when converting from the unit. For\n * example, the offset for celsius is 273.15 and the offset for farhenheit\n * is 459.67. Default is 0.\n * - baseName {string} If the unit's dimension does not match that of any other\n * base unit, the name of the newly create base unit. Otherwise, this property\n * has no effect.\n *\n * @param {Object} options (optional) An object containing any of the following\n * properties:\n * - override {boolean} Whether this unit should be allowed to override existing\n * units.\n *\n * @return {Unit}\n */\n\n\n Unit.createUnitSingle = function (name, obj, options) {\n if (typeof obj === 'undefined' || obj === null) {\n obj = {};\n }\n\n if (typeof name !== 'string') {\n throw new TypeError(\"createUnitSingle expects first parameter to be of type 'string'\");\n } // Check collisions with existing units\n\n\n if (hasOwnProperty(UNITS, name)) {\n throw new Error('Cannot create unit \"' + name + '\": a unit with that name already exists');\n } // TODO: Validate name for collisions with other built-in functions (like abs or cos, for example), and for acceptable variable names. For example, '42' is probably not a valid unit. Nor is '%', since it is also an operator.\n\n\n assertUnitNameIsValid(name);\n var defUnit = null; // The Unit from which the new unit will be created.\n\n var aliases = [];\n var offset = 0;\n var definition;\n var prefixes;\n var baseName;\n\n if (obj && obj.type === 'Unit') {\n defUnit = obj.clone();\n } else if (typeof obj === 'string') {\n if (obj !== '') {\n definition = obj;\n }\n } else if (typeof obj === 'object') {\n definition = obj.definition;\n prefixes = obj.prefixes;\n offset = obj.offset;\n baseName = obj.baseName;\n\n if (obj.aliases) {\n aliases = obj.aliases.valueOf(); // aliases could be a Matrix, so convert to Array\n }\n } else {\n throw new TypeError('Cannot create unit \"' + name + '\" from \"' + obj.toString() + '\": expecting \"string\" or \"Unit\" or \"Object\"');\n }\n\n if (aliases) {\n for (var i = 0; i < aliases.length; i++) {\n if (hasOwnProperty(UNITS, aliases[i])) {\n throw new Error('Cannot create alias \"' + aliases[i] + '\": a unit with that name already exists');\n }\n }\n }\n\n if (definition && typeof definition === 'string' && !defUnit) {\n try {\n defUnit = Unit.parse(definition, {\n allowNoUnits: true\n });\n } catch (ex) {\n ex.message = 'Could not create unit \"' + name + '\" from \"' + definition + '\": ' + ex.message;\n throw ex;\n }\n } else if (definition && definition.type === 'Unit') {\n defUnit = definition.clone();\n }\n\n aliases = aliases || [];\n offset = offset || 0;\n\n if (prefixes && prefixes.toUpperCase) {\n prefixes = PREFIXES[prefixes.toUpperCase()] || PREFIXES.NONE;\n } else {\n prefixes = PREFIXES.NONE;\n } // If defUnit is null, it is because the user did not\n // specify a defintion. So create a new base dimension.\n\n\n var newUnit = {};\n\n if (!defUnit) {\n // Add a new base dimension\n baseName = baseName || name + '_STUFF'; // foo --> foo_STUFF, or the essence of foo\n\n if (BASE_DIMENSIONS.indexOf(baseName) >= 0) {\n throw new Error('Cannot create new base unit \"' + name + '\": a base unit with that name already exists (and cannot be overridden)');\n }\n\n BASE_DIMENSIONS.push(baseName); // Push 0 onto existing base units\n\n for (var b in BASE_UNITS) {\n if (hasOwnProperty(BASE_UNITS, b)) {\n BASE_UNITS[b].dimensions[BASE_DIMENSIONS.length - 1] = 0;\n }\n } // Add the new base unit\n\n\n var newBaseUnit = {\n dimensions: []\n };\n\n for (var _i6 = 0; _i6 < BASE_DIMENSIONS.length; _i6++) {\n newBaseUnit.dimensions[_i6] = 0;\n }\n\n newBaseUnit.dimensions[BASE_DIMENSIONS.length - 1] = 1;\n newBaseUnit.key = baseName;\n BASE_UNITS[baseName] = newBaseUnit;\n newUnit = {\n name: name,\n value: 1,\n dimensions: BASE_UNITS[baseName].dimensions.slice(0),\n prefixes: prefixes,\n offset: offset,\n base: BASE_UNITS[baseName]\n };\n currentUnitSystem[baseName] = {\n unit: newUnit,\n prefix: PREFIXES.NONE['']\n };\n } else {\n newUnit = {\n name: name,\n value: defUnit.value,\n dimensions: defUnit.dimensions.slice(0),\n prefixes: prefixes,\n offset: offset\n }; // Create a new base if no matching base exists\n\n var anyMatch = false;\n\n for (var _i7 in BASE_UNITS) {\n if (hasOwnProperty(BASE_UNITS, _i7)) {\n var match = true;\n\n for (var j = 0; j < BASE_DIMENSIONS.length; j++) {\n if (Math.abs((newUnit.dimensions[j] || 0) - (BASE_UNITS[_i7].dimensions[j] || 0)) > 1e-12) {\n match = false;\n break;\n }\n }\n\n if (match) {\n anyMatch = true;\n newUnit.base = BASE_UNITS[_i7];\n break;\n }\n }\n }\n\n if (!anyMatch) {\n baseName = baseName || name + '_STUFF'; // foo --> foo_STUFF, or the essence of foo\n // Add the new base unit\n\n var _newBaseUnit = {\n dimensions: defUnit.dimensions.slice(0)\n };\n _newBaseUnit.key = baseName;\n BASE_UNITS[baseName] = _newBaseUnit;\n currentUnitSystem[baseName] = {\n unit: newUnit,\n prefix: PREFIXES.NONE['']\n };\n newUnit.base = BASE_UNITS[baseName];\n }\n }\n\n Unit.UNITS[name] = newUnit;\n\n for (var _i8 = 0; _i8 < aliases.length; _i8++) {\n var aliasName = aliases[_i8];\n var _alias = {};\n\n for (var _key6 in newUnit) {\n if (hasOwnProperty(newUnit, _key6)) {\n _alias[_key6] = newUnit[_key6];\n }\n }\n\n _alias.name = aliasName;\n Unit.UNITS[aliasName] = _alias;\n } // delete the memoization cache, since adding a new unit to the array\n // invalidates all old results\n\n\n delete _findUnit.cache;\n return new Unit(null, name);\n };\n\n Unit.deleteUnit = function (name) {\n delete Unit.UNITS[name];\n }; // expose arrays with prefixes, dimensions, units, systems\n\n\n Unit.PREFIXES = PREFIXES;\n Unit.BASE_DIMENSIONS = BASE_DIMENSIONS;\n Unit.BASE_UNITS = BASE_UNITS;\n Unit.UNIT_SYSTEMS = UNIT_SYSTEMS;\n Unit.UNITS = UNITS;\n return Unit;\n}, {\n isClass: true\n});","import { isArray, isMatrix } from '../../../utils/is.js';\nimport { factory } from '../../../utils/factory.js';\nimport { createSolveValidation } from './utils/solveValidation.js';\nimport { csIpvec } from '../sparse/csIpvec.js';\nvar name = 'lusolve';\nvar dependencies = ['typed', 'matrix', 'lup', 'slu', 'usolve', 'lsolve', 'DenseMatrix'];\nexport var createLusolve = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n matrix,\n lup,\n slu,\n usolve,\n lsolve,\n DenseMatrix\n } = _ref;\n var solveValidation = createSolveValidation({\n DenseMatrix\n });\n /**\n * Solves the linear system `A * x = b` where `A` is an [n x n] matrix and `b` is a [n] column vector.\n *\n * Syntax:\n *\n * math.lusolve(A, b) // returns column vector with the solution to the linear system A * x = b\n * math.lusolve(lup, b) // returns column vector with the solution to the linear system A * x = b, lup = math.lup(A)\n *\n * Examples:\n *\n * const m = [[1, 0, 0, 0], [0, 2, 0, 0], [0, 0, 3, 0], [0, 0, 0, 4]]\n *\n * const x = math.lusolve(m, [-1, -1, -1, -1]) // x = [[-1], [-0.5], [-1/3], [-0.25]]\n *\n * const f = math.lup(m)\n * const x1 = math.lusolve(f, [-1, -1, -1, -1]) // x1 = [[-1], [-0.5], [-1/3], [-0.25]]\n * const x2 = math.lusolve(f, [1, 2, 1, -1]) // x2 = [[1], [1], [1/3], [-0.25]]\n *\n * const a = [[-2, 3], [2, 1]]\n * const b = [11, 9]\n * const x = math.lusolve(a, b) // [[2], [5]]\n *\n * See also:\n *\n * lup, slu, lsolve, usolve\n *\n * @param {Matrix | Array | Object} A Invertible Matrix or the Matrix LU decomposition\n * @param {Matrix | Array} b Column Vector\n * @param {number} [order] The Symbolic Ordering and Analysis order, see slu for details. Matrix must be a SparseMatrix\n * @param {Number} [threshold] Partial pivoting threshold (1 for partial pivoting), see slu for details. Matrix must be a SparseMatrix.\n *\n * @return {DenseMatrix | Array} Column vector with the solution to the linear system A * x = b\n */\n\n return typed(name, {\n 'Array, Array | Matrix': function ArrayArrayMatrix(a, b) {\n a = matrix(a);\n var d = lup(a);\n\n var x = _lusolve(d.L, d.U, d.p, null, b);\n\n return x.valueOf();\n },\n 'DenseMatrix, Array | Matrix': function DenseMatrixArrayMatrix(a, b) {\n var d = lup(a);\n return _lusolve(d.L, d.U, d.p, null, b);\n },\n 'SparseMatrix, Array | Matrix': function SparseMatrixArrayMatrix(a, b) {\n var d = lup(a);\n return _lusolve(d.L, d.U, d.p, null, b);\n },\n 'SparseMatrix, Array | Matrix, number, number': function SparseMatrixArrayMatrixNumberNumber(a, b, order, threshold) {\n var d = slu(a, order, threshold);\n return _lusolve(d.L, d.U, d.p, d.q, b);\n },\n 'Object, Array | Matrix': function ObjectArrayMatrix(d, b) {\n return _lusolve(d.L, d.U, d.p, d.q, b);\n }\n });\n\n function _toMatrix(a) {\n if (isMatrix(a)) {\n return a;\n }\n\n if (isArray(a)) {\n return matrix(a);\n }\n\n throw new TypeError('Invalid Matrix LU decomposition');\n }\n\n function _lusolve(l, u, p, q, b) {\n // verify decomposition\n l = _toMatrix(l);\n u = _toMatrix(u); // apply row permutations if needed (b is a DenseMatrix)\n\n if (p) {\n b = solveValidation(l, b, true);\n b._data = csIpvec(p, b._data);\n } // use forward substitution to resolve L * y = b\n\n\n var y = lsolve(l, b); // use backward substitution to resolve U * x = y\n\n var x = usolve(u, y); // apply column permutations if needed (x is a DenseMatrix)\n\n if (q) {\n x._data = csIpvec(q, x._data);\n }\n\n return x;\n }\n});","import { factory } from '../../../utils/factory.js';\nimport { deepMap } from '../../../utils/collection.js';\nvar name = 'unit';\nvar dependencies = ['typed', 'Unit']; // This function is named createUnitFunction to prevent a naming conflict with createUnit\n\nexport var createUnitFunction = /* #__PURE__ */factory(name, dependencies, (_ref) => {\n var {\n typed,\n Unit\n } = _ref;\n\n /**\n * Create a unit. Depending on the passed arguments, the function\n * will create and return a new math.Unit object.\n * When a matrix is provided, all elements will be converted to units.\n *\n * Syntax:\n *\n * math.unit(unit : string)\n * math.unit(value : number, unit : string)\n *\n * Examples:\n *\n * const a = math.unit(5, 'cm') // returns Unit 50 mm\n * const b = math.unit('23 kg') // returns Unit 23 kg\n * a.to('m') // returns Unit 0.05 m\n *\n * See also:\n *\n * bignumber, boolean, complex, index, matrix, number, string, createUnit\n *\n * @param {* | Array | Matrix} args A number and unit.\n * @return {Unit | Array | Matrix} The created unit\n */\n return typed(name, {\n Unit: function Unit(x) {\n return x.clone();\n },\n string: function string(x) {\n if (Unit.isValuelessUnit(x)) {\n return new Unit(null, x); // a pure unit\n }\n\n return Unit.parse(x, {\n allowNoUnits: true\n }); // a unit with value, like '5cm'\n },\n 'number | BigNumber | Fraction | Complex, string': function numberBigNumberFractionComplexString(value, unit) {\n return new Unit(value, unit);\n },\n 'Array | Matrix': function ArrayMatrix(x) {\n return deepMap(x, this);\n }\n });\n});","/**\n * THIS FILE IS AUTO-GENERATED\n * DON'T MAKE CHANGES HERE\n */\nimport { config } from './configReadonly.js';\nimport { createResultSet, createComplexClass, createRangeClass, createFalse, createNull, createTrue, createBigNumberClass, createMatrixClass, createReplacer, createI, createLN10, createLOG10E, createNaN, createPi, createSQRT1_2 // eslint-disable-line camelcase\n, createTau, createEfimovFactor, createFineStructure, createSackurTetrode, createWeakMixingAngle, createFractionClass, createE, createInfinity, createLOG2E, createVersion, createDenseMatrixClass, createPhi, createTyped, createIsInteger, createIsNumeric, createIsPositive, createIsNaN, createEqualScalar, createNumber, createBoolean, createComplex, createSplitUnit, createUnaryPlus, createApply, createCube, createExpm1, createLog10, createMultiplyScalar, createSign, createSquare, createBitNot, createArg, createIm, createNot, createFilter, createForEach, createMap, createErf, createFormat, createOct, createPrint, createIsPrime, createAcos, createAcot, createAcsc, createAsec, createAsin, createAtan, createAtanh, createCosh, createCoth, createCsch, createSech, createSinh, createTanh, createCombinations, createPickRandom, createRandomInt, createLN2, createClone, createHasNumericValue, createTypeOf, createString, createFraction, createUnaryMinus, createAddScalar, createExp, createLog2, createSqrt, createConj, createGetMatrixDataType, createMode, createBin, createAcosh, createAcsch, createAsinh, createCos, createCsc, createSin, createCombinationsWithRep, createRandom, createSQRT2, createIsNegative, createSparseMatrixClass, createMatrix, createCbrt, createGcd, createMod, createNthRoot, createXgcd, createBitAnd, createBitXor, createOr, createConcat, createDiag, createIdentity, createOnes, createReshape, createSize, createSubset, createZeros, createHex, createRound, createLeftShift, createRightLogShift, createCompare, createCompareText, createSmaller, createLarger, createUnequal, createImmutableDenseMatrixClass, createFibonacciHeapClass, createSparse, createAcoth, createAtan2, createSec, createAdd, createDot, createComposition, createIsZero, createAbs, createFloor, createMultiply, createDotMultiply, createRe, createFlatten, createResize, createSqueeze, createTo, createPow, createDotPow, createRightArithShift, createCompareNatural, createEqualText, createLargerEq, createPartitionSelect, createIndexClass, createAsech, createTan, createSetDifference, createSetIntersect, createSetMultiplicity, createSetSize, createTrace, createQuantileSeq, createGamma, createBignumber, createLcm, createBitOr, createKron, createTranspose, createNumeric, createAnd, createSmallerEq, createSort, createMin, createCot, createSetDistinct, createSetPowerset, createIndex, createSum, createFactorial, createPermutations, createCeil, createSubtract, createCross, createRange, createRow, createProd, createEqual, createMax, createSetCartesian, createSetSymDifference, createFix, createColumn, createDiff, createCtranspose, createDeepEqual, createSetIsSubset, createXor, createDivideScalar, createNthRoots, createLsolve, createLsolveAll, createSpaClass, createSetUnion, createLup, createSlu, createDet, createDistance, createStirlingS2, createCatalan, createCount, createLog, createDotDivide, createUsolveAll, createHypot, createQr, createInv, createExpm, createDivide, createMean, createVariance, createKldivergence, createBellNumbers, createLog1p, createUnitClass, createCreateUnit, createEigs, createIntersect, createStd, createAtomicMass, createBohrMagneton, createBoltzmann, createConductanceQuantum, createDeuteronMass, createElectronMass, createFaraday, createFirstRadiation, createGravitationConstant, createHartreeEnergy, createKlitzing, createMagneticConstant, createMolarMass, createMolarPlanckConstant, createNeutronMass, createPlanckCharge, createPlanckLength, createPlanckTemperature, createProtonMass, createReducedPlanckConstant, createSecondRadiation, createStefanBoltzmann, createVacuumImpedance, createUsolve, createNorm, createLusolve, createSqrtm, createMultinomial, createAvogadro, createClassicalElectronRadius, createElectricConstant, createFermiCoupling, createGravity, createLoschmidt, createMolarMassC12, createNuclearMagneton, createPlanckMass, createQuantumOfCirculation, createSpeedOfLight, createWienDisplacement, createRotationMatrix, createMedian, createBohrRadius, createElementaryCharge, createInverseConductanceQuantum, createMolarVolume, createPlanckTime, createThomsonCrossSection, createRotate, createMad, createCoulomb, createMagneticFluxQuantum, createRydberg, createUnitFunction, createGasConstant, createPlanckConstant } from '../factoriesAny.js';\nexport var ResultSet = /* #__PURE__ */createResultSet({});\nexport var Complex = /* #__PURE__ */createComplexClass({});\nexport var Range = /* #__PURE__ */createRangeClass({});\nexport var _false = /* #__PURE__ */createFalse({});\nexport var _null = /* #__PURE__ */createNull({});\nexport var _true = /* #__PURE__ */createTrue({});\nexport var BigNumber = /* #__PURE__ */createBigNumberClass({\n config\n});\nexport var Matrix = /* #__PURE__ */createMatrixClass({});\nexport var replacer = /* #__PURE__ */createReplacer({});\nexport var i = /* #__PURE__ */createI({\n Complex\n});\nexport var LN10 = /* #__PURE__ */createLN10({\n BigNumber,\n config\n});\nexport var LOG10E = /* #__PURE__ */createLOG10E({\n BigNumber,\n config\n});\nexport var _NaN = /* #__PURE__ */createNaN({\n BigNumber,\n config\n});\nexport var pi = /* #__PURE__ */createPi({\n BigNumber,\n config\n});\nexport var SQRT1_2 = /* #__PURE__ */createSQRT1_2({\n BigNumber,\n config\n});\nexport var tau = /* #__PURE__ */createTau({\n BigNumber,\n config\n});\nexport var efimovFactor = /* #__PURE__ */createEfimovFactor({\n BigNumber,\n config\n});\nexport var fineStructure = /* #__PURE__ */createFineStructure({\n BigNumber,\n config\n});\nexport var sackurTetrode = /* #__PURE__ */createSackurTetrode({\n BigNumber,\n config\n});\nexport var weakMixingAngle = /* #__PURE__ */createWeakMixingAngle({\n BigNumber,\n config\n});\nexport var Fraction = /* #__PURE__ */createFractionClass({});\nexport var e = /* #__PURE__ */createE({\n BigNumber,\n config\n});\nexport var _Infinity = /* #__PURE__ */createInfinity({\n BigNumber,\n config\n});\nexport var LOG2E = /* #__PURE__ */createLOG2E({\n BigNumber,\n config\n});\nexport var version = /* #__PURE__ */createVersion({});\nexport var DenseMatrix = /* #__PURE__ */createDenseMatrixClass({\n Matrix\n});\nexport var phi = /* #__PURE__ */createPhi({\n BigNumber,\n config\n});\nexport var typed = /* #__PURE__ */createTyped({\n BigNumber,\n Complex,\n DenseMatrix,\n Fraction\n});\nexport var isInteger = /* #__PURE__ */createIsInteger({\n typed\n});\nexport var isNumeric = /* #__PURE__ */createIsNumeric({\n typed\n});\nexport var isPositive = /* #__PURE__ */createIsPositive({\n typed\n});\nexport var isNaN = /* #__PURE__ */createIsNaN({\n typed\n});\nexport var equalScalar = /* #__PURE__ */createEqualScalar({\n config,\n typed\n});\nexport var number = /* #__PURE__ */createNumber({\n typed\n});\nexport var boolean = /* #__PURE__ */createBoolean({\n typed\n});\nexport var complex = /* #__PURE__ */createComplex({\n Complex,\n typed\n});\nexport var splitUnit = /* #__PURE__ */createSplitUnit({\n typed\n});\nexport var unaryPlus = /* #__PURE__ */createUnaryPlus({\n BigNumber,\n config,\n typed\n});\nexport var apply = /* #__PURE__ */createApply({\n isInteger,\n typed\n});\nexport var cube = /* #__PURE__ */createCube({\n typed\n});\nexport var expm1 = /* #__PURE__ */createExpm1({\n Complex,\n typed\n});\nexport var log10 = /* #__PURE__ */createLog10({\n Complex,\n config,\n typed\n});\nexport var multiplyScalar = /* #__PURE__ */createMultiplyScalar({\n typed\n});\nexport var sign = /* #__PURE__ */createSign({\n BigNumber,\n Fraction,\n complex,\n typed\n});\nexport var square = /* #__PURE__ */createSquare({\n typed\n});\nexport var bitNot = /* #__PURE__ */createBitNot({\n typed\n});\nexport var arg = /* #__PURE__ */createArg({\n typed\n});\nexport var im = /* #__PURE__ */createIm({\n typed\n});\nexport var not = /* #__PURE__ */createNot({\n typed\n});\nexport var filter = /* #__PURE__ */createFilter({\n typed\n});\nexport var forEach = /* #__PURE__ */createForEach({\n typed\n});\nexport var map = /* #__PURE__ */createMap({\n typed\n});\nexport var erf = /* #__PURE__ */createErf({\n typed\n});\nexport var format = /* #__PURE__ */createFormat({\n typed\n});\nexport var oct = /* #__PURE__ */createOct({\n format,\n typed\n});\nexport var print = /* #__PURE__ */createPrint({\n typed\n});\nexport var isPrime = /* #__PURE__ */createIsPrime({\n typed\n});\nexport var acos = /* #__PURE__ */createAcos({\n Complex,\n config,\n typed\n});\nexport var acot = /* #__PURE__ */createAcot({\n BigNumber,\n typed\n});\nexport var acsc = /* #__PURE__ */createAcsc({\n BigNumber,\n Complex,\n config,\n typed\n});\nexport var asec = /* #__PURE__ */createAsec({\n BigNumber,\n Complex,\n config,\n typed\n});\nexport var asin = /* #__PURE__ */createAsin({\n Complex,\n config,\n typed\n});\nexport var atan = /* #__PURE__ */createAtan({\n typed\n});\nexport var atanh = /* #__PURE__ */createAtanh({\n Complex,\n config,\n typed\n});\nexport var cosh = /* #__PURE__ */createCosh({\n typed\n});\nexport var coth = /* #__PURE__ */createCoth({\n BigNumber,\n typed\n});\nexport var csch = /* #__PURE__ */createCsch({\n BigNumber,\n typed\n});\nexport var sech = /* #__PURE__ */createSech({\n BigNumber,\n typed\n});\nexport var sinh = /* #__PURE__ */createSinh({\n typed\n});\nexport var tanh = /* #__PURE__ */createTanh({\n typed\n});\nexport var combinations = /* #__PURE__ */createCombinations({\n typed\n});\nexport var pickRandom = /* #__PURE__ */createPickRandom({\n config,\n typed\n});\nexport var randomInt = /* #__PURE__ */createRandomInt({\n config,\n typed\n});\nexport var LN2 = /* #__PURE__ */createLN2({\n BigNumber,\n config\n});\nexport var clone = /* #__PURE__ */createClone({\n typed\n});\nexport var hasNumericValue = /* #__PURE__ */createHasNumericValue({\n isNumeric,\n typed\n});\nexport var typeOf = /* #__PURE__ */createTypeOf({\n typed\n});\nexport var string = /* #__PURE__ */createString({\n typed\n});\nexport var fraction = /* #__PURE__ */createFraction({\n Fraction,\n typed\n});\nexport var unaryMinus = /* #__PURE__ */createUnaryMinus({\n typed\n});\nexport var addScalar = /* #__PURE__ */createAddScalar({\n typed\n});\nexport var exp = /* #__PURE__ */createExp({\n typed\n});\nexport var log2 = /* #__PURE__ */createLog2({\n Complex,\n config,\n typed\n});\nexport var sqrt = /* #__PURE__ */createSqrt({\n Complex,\n config,\n typed\n});\nexport var conj = /* #__PURE__ */createConj({\n typed\n});\nexport var getMatrixDataType = /* #__PURE__ */createGetMatrixDataType({\n typed\n});\nexport var mode = /* #__PURE__ */createMode({\n isNaN,\n isNumeric,\n typed\n});\nexport var bin = /* #__PURE__ */createBin({\n format,\n typed\n});\nexport var acosh = /* #__PURE__ */createAcosh({\n Complex,\n config,\n typed\n});\nexport var acsch = /* #__PURE__ */createAcsch({\n BigNumber,\n typed\n});\nexport var asinh = /* #__PURE__ */createAsinh({\n typed\n});\nexport var cos = /* #__PURE__ */createCos({\n typed\n});\nexport var csc = /* #__PURE__ */createCsc({\n BigNumber,\n typed\n});\nexport var sin = /* #__PURE__ */createSin({\n typed\n});\nexport var combinationsWithRep = /* #__PURE__ */createCombinationsWithRep({\n typed\n});\nexport var random = /* #__PURE__ */createRandom({\n config,\n typed\n});\nexport var SQRT2 = /* #__PURE__ */createSQRT2({\n BigNumber,\n config\n});\nexport var isNegative = /* #__PURE__ */createIsNegative({\n typed\n});\nexport var SparseMatrix = /* #__PURE__ */createSparseMatrixClass({\n Matrix,\n equalScalar,\n typed\n});\nexport var matrix = /* #__PURE__ */createMatrix({\n DenseMatrix,\n Matrix,\n SparseMatrix,\n typed\n});\nexport var cbrt = /* #__PURE__ */createCbrt({\n BigNumber,\n Complex,\n Fraction,\n config,\n isNegative,\n matrix,\n typed,\n unaryMinus\n});\nexport var gcd = /* #__PURE__ */createGcd({\n BigNumber,\n DenseMatrix,\n equalScalar,\n matrix,\n typed\n});\nexport var mod = /* #__PURE__ */createMod({\n DenseMatrix,\n equalScalar,\n matrix,\n typed\n});\nexport var nthRoot = /* #__PURE__ */createNthRoot({\n BigNumber,\n equalScalar,\n matrix,\n typed\n});\nexport var xgcd = /* #__PURE__ */createXgcd({\n BigNumber,\n config,\n matrix,\n typed\n});\nexport var bitAnd = /* #__PURE__ */createBitAnd({\n equalScalar,\n matrix,\n typed\n});\nexport var bitXor = /* #__PURE__ */createBitXor({\n DenseMatrix,\n matrix,\n typed\n});\nexport var or = /* #__PURE__ */createOr({\n DenseMatrix,\n equalScalar,\n matrix,\n typed\n});\nexport var concat = /* #__PURE__ */createConcat({\n isInteger,\n matrix,\n typed\n});\nexport var diag = /* #__PURE__ */createDiag({\n DenseMatrix,\n SparseMatrix,\n matrix,\n typed\n});\nexport var identity = /* #__PURE__ */createIdentity({\n BigNumber,\n DenseMatrix,\n SparseMatrix,\n config,\n matrix,\n typed\n});\nexport var ones = /* #__PURE__ */createOnes({\n BigNumber,\n config,\n matrix,\n typed\n});\nexport var reshape = /* #__PURE__ */createReshape({\n isInteger,\n matrix,\n typed\n});\nexport var size = /* #__PURE__ */createSize({\n matrix,\n config,\n typed\n});\nexport var subset = /* #__PURE__ */createSubset({\n matrix,\n typed\n});\nexport var zeros = /* #__PURE__ */createZeros({\n BigNumber,\n config,\n matrix,\n typed\n});\nexport var hex = /* #__PURE__ */createHex({\n format,\n typed\n});\nexport var round = /* #__PURE__ */createRound({\n BigNumber,\n DenseMatrix,\n equalScalar,\n matrix,\n typed,\n zeros\n});\nexport var leftShift = /* #__PURE__ */createLeftShift({\n DenseMatrix,\n equalScalar,\n matrix,\n typed,\n zeros\n});\nexport var rightLogShift = /* #__PURE__ */createRightLogShift({\n DenseMatrix,\n equalScalar,\n matrix,\n typed,\n zeros\n});\nexport var compare = /* #__PURE__ */createCompare({\n BigNumber,\n DenseMatrix,\n Fraction,\n config,\n equalScalar,\n matrix,\n typed\n});\nexport var compareText = /* #__PURE__ */createCompareText({\n matrix,\n typed\n});\nexport var smaller = /* #__PURE__ */createSmaller({\n DenseMatrix,\n config,\n matrix,\n typed\n});\nexport var larger = /* #__PURE__ */createLarger({\n DenseMatrix,\n config,\n matrix,\n typed\n});\nexport var unequal = /* #__PURE__ */createUnequal({\n DenseMatrix,\n config,\n equalScalar,\n matrix,\n typed\n});\nexport var ImmutableDenseMatrix = /* #__PURE__ */createImmutableDenseMatrixClass({\n DenseMatrix,\n smaller\n});\nexport var FibonacciHeap = /* #__PURE__ */createFibonacciHeapClass({\n larger,\n smaller\n});\nexport var sparse = /* #__PURE__ */createSparse({\n SparseMatrix,\n typed\n});\nexport var acoth = /* #__PURE__ */createAcoth({\n BigNumber,\n Complex,\n config,\n typed\n});\nexport var atan2 = /* #__PURE__ */createAtan2({\n BigNumber,\n DenseMatrix,\n equalScalar,\n matrix,\n typed\n});\nexport var sec = /* #__PURE__ */createSec({\n BigNumber,\n typed\n});\nexport var add = /* #__PURE__ */createAdd({\n DenseMatrix,\n SparseMatrix,\n addScalar,\n equalScalar,\n matrix,\n typed\n});\nexport var dot = /* #__PURE__ */createDot({\n addScalar,\n conj,\n multiplyScalar,\n size,\n typed\n});\nexport var composition = /* #__PURE__ */createComposition({\n addScalar,\n combinations,\n isInteger,\n isNegative,\n isPositive,\n larger,\n typed\n});\nexport var isZero = /* #__PURE__ */createIsZero({\n typed\n});\nexport var abs = /* #__PURE__ */createAbs({\n typed\n});\nexport var floor = /* #__PURE__ */createFloor({\n config,\n equalScalar,\n matrix,\n round,\n typed\n});\nexport var multiply = /* #__PURE__ */createMultiply({\n addScalar,\n dot,\n equalScalar,\n matrix,\n multiplyScalar,\n typed\n});\nexport var dotMultiply = /* #__PURE__ */createDotMultiply({\n equalScalar,\n matrix,\n multiplyScalar,\n typed\n});\nexport var re = /* #__PURE__ */createRe({\n typed\n});\nexport var flatten = /* #__PURE__ */createFlatten({\n matrix,\n typed\n});\nexport var resize = /* #__PURE__ */createResize({\n config,\n matrix\n});\nexport var squeeze = /* #__PURE__ */createSqueeze({\n matrix,\n typed\n});\nexport var to = /* #__PURE__ */createTo({\n matrix,\n typed\n});\nexport var pow = /* #__PURE__ */createPow({\n Complex,\n config,\n fraction,\n identity,\n matrix,\n multiply,\n number,\n typed\n});\nexport var dotPow = /* #__PURE__ */createDotPow({\n DenseMatrix,\n equalScalar,\n matrix,\n pow,\n typed\n});\nexport var rightArithShift = /* #__PURE__ */createRightArithShift({\n DenseMatrix,\n equalScalar,\n matrix,\n typed,\n zeros\n});\nexport var compareNatural = /* #__PURE__ */createCompareNatural({\n compare,\n typed\n});\nexport var equalText = /* #__PURE__ */createEqualText({\n compareText,\n isZero,\n typed\n});\nexport var largerEq = /* #__PURE__ */createLargerEq({\n DenseMatrix,\n config,\n matrix,\n typed\n});\nexport var partitionSelect = /* #__PURE__ */createPartitionSelect({\n compare,\n isNaN,\n isNumeric,\n typed\n});\nexport var Index = /* #__PURE__ */createIndexClass({\n ImmutableDenseMatrix\n});\nexport var asech = /* #__PURE__ */createAsech({\n BigNumber,\n Complex,\n config,\n typed\n});\nexport var tan = /* #__PURE__ */createTan({\n typed\n});\nexport var setDifference = /* #__PURE__ */createSetDifference({\n DenseMatrix,\n Index,\n compareNatural,\n size,\n subset,\n typed\n});\nexport var setIntersect = /* #__PURE__ */createSetIntersect({\n DenseMatrix,\n Index,\n compareNatural,\n size,\n subset,\n typed\n});\nexport var setMultiplicity = /* #__PURE__ */createSetMultiplicity({\n Index,\n compareNatural,\n size,\n subset,\n typed\n});\nexport var setSize = /* #__PURE__ */createSetSize({\n compareNatural,\n typed\n});\nexport var trace = /* #__PURE__ */createTrace({\n add,\n matrix,\n typed\n});\nexport var quantileSeq = /* #__PURE__ */createQuantileSeq({\n add,\n compare,\n multiply,\n partitionSelect,\n typed\n});\nexport var gamma = /* #__PURE__ */createGamma({\n BigNumber,\n Complex,\n config,\n multiplyScalar,\n pow,\n typed\n});\nexport var bignumber = /* #__PURE__ */createBignumber({\n BigNumber,\n typed\n});\nexport var lcm = /* #__PURE__ */createLcm({\n equalScalar,\n matrix,\n typed\n});\nexport var bitOr = /* #__PURE__ */createBitOr({\n DenseMatrix,\n equalScalar,\n matrix,\n typed\n});\nexport var kron = /* #__PURE__ */createKron({\n matrix,\n multiplyScalar,\n typed\n});\nexport var transpose = /* #__PURE__ */createTranspose({\n matrix,\n typed\n});\nexport var numeric = /* #__PURE__ */createNumeric({\n bignumber,\n fraction,\n number\n});\nexport var and = /* #__PURE__ */createAnd({\n equalScalar,\n matrix,\n not,\n typed,\n zeros\n});\nexport var smallerEq = /* #__PURE__ */createSmallerEq({\n DenseMatrix,\n config,\n matrix,\n typed\n});\nexport var sort = /* #__PURE__ */createSort({\n compare,\n compareNatural,\n matrix,\n typed\n});\nexport var min = /* #__PURE__ */createMin({\n config,\n numeric,\n smaller,\n typed\n});\nexport var cot = /* #__PURE__ */createCot({\n BigNumber,\n typed\n});\nexport var setDistinct = /* #__PURE__ */createSetDistinct({\n DenseMatrix,\n Index,\n compareNatural,\n size,\n subset,\n typed\n});\nexport var setPowerset = /* #__PURE__ */createSetPowerset({\n Index,\n compareNatural,\n size,\n subset,\n typed\n});\nexport var index = /* #__PURE__ */createIndex({\n Index,\n typed\n});\nexport var sum = /* #__PURE__ */createSum({\n add,\n config,\n numeric,\n typed\n});\nexport var factorial = /* #__PURE__ */createFactorial({\n gamma,\n typed\n});\nexport var permutations = /* #__PURE__ */createPermutations({\n factorial,\n typed\n});\nexport var ceil = /* #__PURE__ */createCeil({\n config,\n equalScalar,\n matrix,\n round,\n typed\n});\nexport var subtract = /* #__PURE__ */createSubtract({\n DenseMatrix,\n addScalar,\n equalScalar,\n matrix,\n typed,\n unaryMinus\n});\nexport var cross = /* #__PURE__ */createCross({\n matrix,\n multiply,\n subtract,\n typed\n});\nexport var range = /* #__PURE__ */createRange({\n bignumber,\n matrix,\n config,\n larger,\n largerEq,\n smaller,\n smallerEq,\n typed\n});\nexport var row = /* #__PURE__ */createRow({\n Index,\n matrix,\n range,\n typed\n});\nexport var prod = /* #__PURE__ */createProd({\n config,\n multiplyScalar,\n numeric,\n typed\n});\nexport var equal = /* #__PURE__ */createEqual({\n DenseMatrix,\n equalScalar,\n matrix,\n typed\n});\nexport var max = /* #__PURE__ */createMax({\n config,\n larger,\n numeric,\n typed\n});\nexport var setCartesian = /* #__PURE__ */createSetCartesian({\n DenseMatrix,\n Index,\n compareNatural,\n size,\n subset,\n typed\n});\nexport var setSymDifference = /* #__PURE__ */createSetSymDifference({\n Index,\n concat,\n setDifference,\n size,\n subset,\n typed\n});\nexport var fix = /* #__PURE__ */createFix({\n Complex,\n ceil,\n floor,\n matrix,\n typed\n});\nexport var column = /* #__PURE__ */createColumn({\n Index,\n matrix,\n range,\n typed\n});\nexport var diff = /* #__PURE__ */createDiff({\n matrix,\n number,\n subtract,\n typed\n});\nexport var ctranspose = /* #__PURE__ */createCtranspose({\n conj,\n transpose,\n typed\n});\nexport var deepEqual = /* #__PURE__ */createDeepEqual({\n equal,\n typed\n});\nexport var setIsSubset = /* #__PURE__ */createSetIsSubset({\n Index,\n compareNatural,\n size,\n subset,\n typed\n});\nexport var xor = /* #__PURE__ */createXor({\n DenseMatrix,\n matrix,\n typed\n});\nexport var divideScalar = /* #__PURE__ */createDivideScalar({\n numeric,\n typed\n});\nexport var nthRoots = /* #__PURE__ */createNthRoots({\n Complex,\n config,\n divideScalar,\n typed\n});\nexport var lsolve = /* #__PURE__ */createLsolve({\n DenseMatrix,\n divideScalar,\n equalScalar,\n matrix,\n multiplyScalar,\n subtract,\n typed\n});\nexport var lsolveAll = /* #__PURE__ */createLsolveAll({\n DenseMatrix,\n divideScalar,\n equalScalar,\n matrix,\n multiplyScalar,\n subtract,\n typed\n});\nexport var Spa = /* #__PURE__ */createSpaClass({\n FibonacciHeap,\n addScalar,\n equalScalar\n});\nexport var setUnion = /* #__PURE__ */createSetUnion({\n Index,\n concat,\n setIntersect,\n setSymDifference,\n size,\n subset,\n typed\n});\nexport var lup = /* #__PURE__ */createLup({\n DenseMatrix,\n Spa,\n SparseMatrix,\n abs,\n addScalar,\n divideScalar,\n equalScalar,\n larger,\n matrix,\n multiplyScalar,\n subtract,\n typed,\n unaryMinus\n});\nexport var slu = /* #__PURE__ */createSlu({\n SparseMatrix,\n abs,\n add,\n divideScalar,\n larger,\n largerEq,\n multiply,\n subtract,\n transpose,\n typed\n});\nexport var det = /* #__PURE__ */createDet({\n lup,\n matrix,\n multiply,\n subtract,\n typed,\n unaryMinus\n});\nexport var distance = /* #__PURE__ */createDistance({\n abs,\n addScalar,\n divideScalar,\n multiplyScalar,\n sqrt,\n subtract,\n typed,\n unaryMinus\n});\nexport var stirlingS2 = /* #__PURE__ */createStirlingS2({\n addScalar,\n combinations,\n divideScalar,\n factorial,\n isInteger,\n isNegative,\n larger,\n multiplyScalar,\n pow,\n subtract,\n typed\n});\nexport var catalan = /* #__PURE__ */createCatalan({\n addScalar,\n combinations,\n divideScalar,\n isInteger,\n isNegative,\n multiplyScalar,\n typed\n});\nexport var count = /* #__PURE__ */createCount({\n prod,\n size,\n typed\n});\nexport var log = /* #__PURE__ */createLog({\n Complex,\n config,\n divideScalar,\n typed\n});\nexport var dotDivide = /* #__PURE__ */createDotDivide({\n DenseMatrix,\n divideScalar,\n equalScalar,\n matrix,\n typed\n});\nexport var usolveAll = /* #__PURE__ */createUsolveAll({\n DenseMatrix,\n divideScalar,\n equalScalar,\n matrix,\n multiplyScalar,\n subtract,\n typed\n});\nexport var hypot = /* #__PURE__ */createHypot({\n abs,\n addScalar,\n divideScalar,\n isPositive,\n multiplyScalar,\n smaller,\n sqrt,\n typed\n});\nexport var qr = /* #__PURE__ */createQr({\n addScalar,\n complex,\n conj,\n divideScalar,\n equal,\n identity,\n isZero,\n matrix,\n multiplyScalar,\n sign,\n sqrt,\n subtract,\n typed,\n unaryMinus,\n zeros\n});\nexport var inv = /* #__PURE__ */createInv({\n abs,\n addScalar,\n det,\n divideScalar,\n identity,\n matrix,\n multiply,\n typed,\n unaryMinus\n});\nexport var expm = /* #__PURE__ */createExpm({\n abs,\n add,\n identity,\n inv,\n multiply,\n typed\n});\nexport var divide = /* #__PURE__ */createDivide({\n divideScalar,\n equalScalar,\n inv,\n matrix,\n multiply,\n typed\n});\nexport var mean = /* #__PURE__ */createMean({\n add,\n divide,\n typed\n});\nexport var variance = /* #__PURE__ */createVariance({\n add,\n apply,\n divide,\n isNaN,\n multiply,\n subtract,\n typed\n});\nexport var kldivergence = /* #__PURE__ */createKldivergence({\n divide,\n dotDivide,\n isNumeric,\n log,\n matrix,\n multiply,\n sum,\n typed\n});\nexport var bellNumbers = /* #__PURE__ */createBellNumbers({\n addScalar,\n isInteger,\n isNegative,\n stirlingS2,\n typed\n});\nexport var log1p = /* #__PURE__ */createLog1p({\n Complex,\n config,\n divideScalar,\n log,\n typed\n});\nexport var Unit = /* #__PURE__ */createUnitClass({\n BigNumber,\n Complex,\n Fraction,\n abs,\n addScalar,\n config,\n divideScalar,\n equal,\n fix,\n format,\n isNumeric,\n multiplyScalar,\n number,\n pow,\n round,\n subtract\n});\nexport var createUnit = /* #__PURE__ */createCreateUnit({\n Unit,\n typed\n});\nexport var eigs = /* #__PURE__ */createEigs({\n abs,\n add,\n addScalar,\n atan,\n bignumber,\n config,\n cos,\n equal,\n inv,\n matrix,\n multiply,\n multiplyScalar,\n sin,\n subtract,\n typed\n});\nexport var intersect = /* #__PURE__ */createIntersect({\n abs,\n add,\n addScalar,\n config,\n divideScalar,\n equalScalar,\n matrix,\n multiply,\n multiplyScalar,\n smaller,\n subtract,\n typed\n});\nexport var std = /* #__PURE__ */createStd({\n sqrt,\n typed,\n variance\n});\nexport var atomicMass = /* #__PURE__ */createAtomicMass({\n BigNumber,\n Unit,\n config\n});\nexport var bohrMagneton = /* #__PURE__ */createBohrMagneton({\n BigNumber,\n Unit,\n config\n});\nexport var boltzmann = /* #__PURE__ */createBoltzmann({\n BigNumber,\n Unit,\n config\n});\nexport var conductanceQuantum = /* #__PURE__ */createConductanceQuantum({\n BigNumber,\n Unit,\n config\n});\nexport var deuteronMass = /* #__PURE__ */createDeuteronMass({\n BigNumber,\n Unit,\n config\n});\nexport var electronMass = /* #__PURE__ */createElectronMass({\n BigNumber,\n Unit,\n config\n});\nexport var faraday = /* #__PURE__ */createFaraday({\n BigNumber,\n Unit,\n config\n});\nexport var firstRadiation = /* #__PURE__ */createFirstRadiation({\n BigNumber,\n Unit,\n config\n});\nexport var gravitationConstant = /* #__PURE__ */createGravitationConstant({\n BigNumber,\n Unit,\n config\n});\nexport var hartreeEnergy = /* #__PURE__ */createHartreeEnergy({\n BigNumber,\n Unit,\n config\n});\nexport var klitzing = /* #__PURE__ */createKlitzing({\n BigNumber,\n Unit,\n config\n});\nexport var magneticConstant = /* #__PURE__ */createMagneticConstant({\n BigNumber,\n Unit,\n config\n});\nexport var molarMass = /* #__PURE__ */createMolarMass({\n BigNumber,\n Unit,\n config\n});\nexport var molarPlanckConstant = /* #__PURE__ */createMolarPlanckConstant({\n BigNumber,\n Unit,\n config\n});\nexport var neutronMass = /* #__PURE__ */createNeutronMass({\n BigNumber,\n Unit,\n config\n});\nexport var planckCharge = /* #__PURE__ */createPlanckCharge({\n BigNumber,\n Unit,\n config\n});\nexport var planckLength = /* #__PURE__ */createPlanckLength({\n BigNumber,\n Unit,\n config\n});\nexport var planckTemperature = /* #__PURE__ */createPlanckTemperature({\n BigNumber,\n Unit,\n config\n});\nexport var protonMass = /* #__PURE__ */createProtonMass({\n BigNumber,\n Unit,\n config\n});\nexport var reducedPlanckConstant = /* #__PURE__ */createReducedPlanckConstant({\n BigNumber,\n Unit,\n config\n});\nexport var secondRadiation = /* #__PURE__ */createSecondRadiation({\n BigNumber,\n Unit,\n config\n});\nexport var stefanBoltzmann = /* #__PURE__ */createStefanBoltzmann({\n BigNumber,\n Unit,\n config\n});\nexport var vacuumImpedance = /* #__PURE__ */createVacuumImpedance({\n BigNumber,\n Unit,\n config\n});\nexport var usolve = /* #__PURE__ */createUsolve({\n DenseMatrix,\n divideScalar,\n equalScalar,\n matrix,\n multiplyScalar,\n subtract,\n typed\n});\nexport var norm = /* #__PURE__ */createNorm({\n abs,\n add,\n conj,\n ctranspose,\n eigs,\n equalScalar,\n larger,\n matrix,\n multiply,\n pow,\n smaller,\n sqrt,\n typed\n});\nexport var lusolve = /* #__PURE__ */createLusolve({\n DenseMatrix,\n lsolve,\n lup,\n matrix,\n slu,\n typed,\n usolve\n});\nexport var sqrtm = /* #__PURE__ */createSqrtm({\n abs,\n add,\n identity,\n inv,\n max,\n multiply,\n size,\n sqrt,\n subtract,\n typed\n});\nexport var multinomial = /* #__PURE__ */createMultinomial({\n add,\n divide,\n factorial,\n isInteger,\n isPositive,\n multiply,\n typed\n});\nexport var avogadro = /* #__PURE__ */createAvogadro({\n BigNumber,\n Unit,\n config\n});\nexport var classicalElectronRadius = /* #__PURE__ */createClassicalElectronRadius({\n BigNumber,\n Unit,\n config\n});\nexport var electricConstant = /* #__PURE__ */createElectricConstant({\n BigNumber,\n Unit,\n config\n});\nexport var fermiCoupling = /* #__PURE__ */createFermiCoupling({\n BigNumber,\n Unit,\n config\n});\nexport var gravity = /* #__PURE__ */createGravity({\n BigNumber,\n Unit,\n config\n});\nexport var loschmidt = /* #__PURE__ */createLoschmidt({\n BigNumber,\n Unit,\n config\n});\nexport var molarMassC12 = /* #__PURE__ */createMolarMassC12({\n BigNumber,\n Unit,\n config\n});\nexport var nuclearMagneton = /* #__PURE__ */createNuclearMagneton({\n BigNumber,\n Unit,\n config\n});\nexport var planckMass = /* #__PURE__ */createPlanckMass({\n BigNumber,\n Unit,\n config\n});\nexport var quantumOfCirculation = /* #__PURE__ */createQuantumOfCirculation({\n BigNumber,\n Unit,\n config\n});\nexport var speedOfLight = /* #__PURE__ */createSpeedOfLight({\n BigNumber,\n Unit,\n config\n});\nexport var wienDisplacement = /* #__PURE__ */createWienDisplacement({\n BigNumber,\n Unit,\n config\n});\nexport var rotationMatrix = /* #__PURE__ */createRotationMatrix({\n BigNumber,\n DenseMatrix,\n SparseMatrix,\n addScalar,\n config,\n cos,\n matrix,\n multiplyScalar,\n norm,\n sin,\n typed,\n unaryMinus\n});\nexport var median = /* #__PURE__ */createMedian({\n add,\n compare,\n divide,\n partitionSelect,\n typed\n});\nexport var bohrRadius = /* #__PURE__ */createBohrRadius({\n BigNumber,\n Unit,\n config\n});\nexport var elementaryCharge = /* #__PURE__ */createElementaryCharge({\n BigNumber,\n Unit,\n config\n});\nexport var inverseConductanceQuantum = /* #__PURE__ */createInverseConductanceQuantum({\n BigNumber,\n Unit,\n config\n});\nexport var molarVolume = /* #__PURE__ */createMolarVolume({\n BigNumber,\n Unit,\n config\n});\nexport var planckTime = /* #__PURE__ */createPlanckTime({\n BigNumber,\n Unit,\n config\n});\nexport var thomsonCrossSection = /* #__PURE__ */createThomsonCrossSection({\n BigNumber,\n Unit,\n config\n});\nexport var rotate = /* #__PURE__ */createRotate({\n multiply,\n rotationMatrix,\n typed\n});\nexport var mad = /* #__PURE__ */createMad({\n abs,\n map,\n median,\n subtract,\n typed\n});\nexport var coulomb = /* #__PURE__ */createCoulomb({\n BigNumber,\n Unit,\n config\n});\nexport var magneticFluxQuantum = /* #__PURE__ */createMagneticFluxQuantum({\n BigNumber,\n Unit,\n config\n});\nexport var rydberg = /* #__PURE__ */createRydberg({\n BigNumber,\n Unit,\n config\n});\nexport var unit = /* #__PURE__ */createUnitFunction({\n Unit,\n typed\n});\nexport var gasConstant = /* #__PURE__ */createGasConstant({\n BigNumber,\n Unit,\n config\n});\nexport var planckConstant = /* #__PURE__ */createPlanckConstant({\n BigNumber,\n Unit,\n config\n});","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow'; // Is a vertical scrollbar displayed?\n\nfunction isOverflowing(container) {\n var doc = ownerDocument(container);\n\n if (doc.body === container) {\n return ownerWindow(doc).innerWidth > doc.documentElement.clientWidth;\n }\n\n return container.scrollHeight > container.clientHeight;\n}\n\nexport function ariaHidden(node, show) {\n if (show) {\n node.setAttribute('aria-hidden', 'true');\n } else {\n node.removeAttribute('aria-hidden');\n }\n}\n\nfunction getPaddingRight(node) {\n return parseInt(window.getComputedStyle(node)['padding-right'], 10) || 0;\n}\n\nfunction ariaHiddenSiblings(container, mountNode, currentNode) {\n var nodesToExclude = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n var show = arguments.length > 4 ? arguments[4] : undefined;\n var blacklist = [mountNode, currentNode].concat(_toConsumableArray(nodesToExclude));\n var blacklistTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE'];\n [].forEach.call(container.children, function (node) {\n if (node.nodeType === 1 && blacklist.indexOf(node) === -1 && blacklistTagNames.indexOf(node.tagName) === -1) {\n ariaHidden(node, show);\n }\n });\n}\n\nfunction findIndexOf(containerInfo, callback) {\n var idx = -1;\n containerInfo.some(function (item, index) {\n if (callback(item)) {\n idx = index;\n return true;\n }\n\n return false;\n });\n return idx;\n}\n\nfunction handleContainer(containerInfo, props) {\n var restoreStyle = [];\n var restorePaddings = [];\n var container = containerInfo.container;\n var fixedNodes;\n\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n var scrollbarSize = getScrollbarSize();\n restoreStyle.push({\n value: container.style.paddingRight,\n key: 'padding-right',\n el: container\n }); // Use computed style, here to get the real padding to add our scrollbar width.\n\n container.style['padding-right'] = \"\".concat(getPaddingRight(container) + scrollbarSize, \"px\"); // .mui-fixed is a global helper.\n\n fixedNodes = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedNodes, function (node) {\n restorePaddings.push(node.style.paddingRight);\n node.style.paddingRight = \"\".concat(getPaddingRight(node) + scrollbarSize, \"px\");\n });\n } // Improve Gatsby support\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n\n\n var parent = container.parentElement;\n var scrollContainer = parent.nodeName === 'HTML' && window.getComputedStyle(parent)['overflow-y'] === 'scroll' ? parent : container; // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n key: 'overflow',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n\n var restore = function restore() {\n if (fixedNodes) {\n [].forEach.call(fixedNodes, function (node, i) {\n if (restorePaddings[i]) {\n node.style.paddingRight = restorePaddings[i];\n } else {\n node.style.removeProperty('padding-right');\n }\n });\n }\n\n restoreStyle.forEach(function (_ref) {\n var value = _ref.value,\n el = _ref.el,\n key = _ref.key;\n\n if (value) {\n el.style.setProperty(key, value);\n } else {\n el.style.removeProperty(key);\n }\n });\n };\n\n return restore;\n}\n\nfunction getHiddenSiblings(container) {\n var hiddenSiblings = [];\n [].forEach.call(container.children, function (node) {\n if (node.getAttribute && node.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(node);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\n\n\nvar ModalManager = /*#__PURE__*/function () {\n function ModalManager() {\n _classCallCheck(this, ModalManager);\n\n // this.modals[modalIndex] = modal\n this.modals = []; // this.containers[containerIndex] = {\n // modals: [],\n // container,\n // restore: null,\n // }\n\n this.containers = [];\n }\n\n _createClass(ModalManager, [{\n key: \"add\",\n value: function add(modal, container) {\n var modalIndex = this.modals.indexOf(modal);\n\n if (modalIndex !== -1) {\n return modalIndex;\n }\n\n modalIndex = this.modals.length;\n this.modals.push(modal); // If the modal we are adding is already in the DOM.\n\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n\n var hiddenSiblingNodes = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mountNode, modal.modalRef, hiddenSiblingNodes, true);\n var containerIndex = findIndexOf(this.containers, function (item) {\n return item.container === container;\n });\n\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n\n this.containers.push({\n modals: [modal],\n container: container,\n restore: null,\n hiddenSiblingNodes: hiddenSiblingNodes\n });\n return modalIndex;\n }\n }, {\n key: \"mount\",\n value: function mount(modal, props) {\n var containerIndex = findIndexOf(this.containers, function (item) {\n return item.modals.indexOf(modal) !== -1;\n });\n var containerInfo = this.containers[containerIndex];\n\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n }, {\n key: \"remove\",\n value: function remove(modal) {\n var modalIndex = this.modals.indexOf(modal);\n\n if (modalIndex === -1) {\n return modalIndex;\n }\n\n var containerIndex = findIndexOf(this.containers, function (item) {\n return item.modals.indexOf(modal) !== -1;\n });\n var containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1); // If that was the last modal in a container, clean up the container.\n\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, true);\n }\n\n ariaHiddenSiblings(containerInfo.container, modal.mountNode, modal.modalRef, containerInfo.hiddenSiblingNodes, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n var nextTop = containerInfo.modals[containerInfo.modals.length - 1]; // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n\n return modalIndex;\n }\n }, {\n key: \"isTopModal\",\n value: function isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n }]);\n\n return ModalManager;\n}();\n\nexport { ModalManager as default };","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex, camelcase */\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport ownerDocument from '../utils/ownerDocument';\nimport useForkRef from '../utils/useForkRef';\nimport { exactProp } from '@material-ui/utils';\n/**\n * Utility component that locks focus inside the component.\n */\n\nfunction Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = React.useRef();\n var sentinelStart = React.useRef(null);\n var sentinelEnd = React.useRef(null);\n var nodeToRestore = React.useRef();\n var rootRef = React.useRef(null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n rootRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(children.ref, handleOwnRef);\n var prevOpenRef = React.useRef();\n React.useEffect(function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n React.useEffect(function () {\n if (!open) {\n return;\n }\n\n var doc = ownerDocument(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n var rootElement = rootRef.current; // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n\n if (rootElement === null) {\n return;\n }\n\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef\n }), /*#__PURE__*/React.createElement(\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}\n\nprocess.env.NODE_ENV !== \"production\" ? Unstable_TrapFocus.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.node,\n\n /**\n * If `true`, the trap focus will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any trap focus children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the trap focus less\n * accessible to assistive technologies, like screen readers.\n */\n disableAutoFocus: PropTypes.bool,\n\n /**\n * If `true`, the trap focus will not prevent focus from leaving the trap focus while open.\n *\n * Generally this should never be set to `true` as it makes the trap focus less\n * accessible to assistive technologies, like screen readers.\n */\n disableEnforceFocus: PropTypes.bool,\n\n /**\n * If `true`, the trap focus will not restore focus to previously focused element once\n * trap focus is hidden.\n */\n disableRestoreFocus: PropTypes.bool,\n\n /**\n * Return the document to consider.\n * We use it to implement the restore focus between different browser documents.\n */\n getDoc: PropTypes.func.isRequired,\n\n /**\n * Do we still want to enforce the focus?\n * This prop helps nesting TrapFocus elements.\n */\n isEnabled: PropTypes.func.isRequired,\n\n /**\n * If `true`, focus will be locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Unstable_TrapFocus['propTypes' + ''] = exactProp(Unstable_TrapFocus.propTypes);\n}\n\nexport default Unstable_TrapFocus;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n zIndex: -1,\n position: 'fixed',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n },\n\n /* Styles applied to the root element if `invisible={true}`. */\n invisible: {\n backgroundColor: 'transparent'\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SimpleBackdrop = /*#__PURE__*/React.forwardRef(function SimpleBackdrop(props, ref) {\n var _props$invisible = props.invisible,\n invisible = _props$invisible === void 0 ? false : _props$invisible,\n open = props.open,\n other = _objectWithoutProperties(props, [\"invisible\", \"open\"]);\n\n return open ? /*#__PURE__*/React.createElement(\"div\", _extends({\n \"aria-hidden\": true,\n ref: ref\n }, other, {\n style: _extends({}, styles.root, invisible ? styles.invisible : {}, other.style)\n })) : null;\n});\nprocess.env.NODE_ENV !== \"production\" ? SimpleBackdrop.propTypes = {\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n */\n invisible: PropTypes.bool,\n\n /**\n * If `true`, the backdrop is open.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nexport default SimpleBackdrop;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { getThemeProps, useTheme } from '@material-ui/styles';\nimport { elementAcceptingRef, HTMLElementType } from '@material-ui/utils';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport ownerDocument from '../utils/ownerDocument';\nimport Portal from '../Portal';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport useForkRef from '../utils/useForkRef';\nimport useEventCallback from '../utils/useEventCallback';\nimport zIndex from '../styles/zIndex';\nimport ModalManager, { ariaHidden } from './ModalManager';\nimport TrapFocus from '../Unstable_TrapFocus';\nimport SimpleBackdrop from './SimpleBackdrop';\n\nfunction getContainer(container) {\n container = typeof container === 'function' ? container() : container;\n return ReactDOM.findDOMNode(container);\n}\n\nfunction getHasTransition(props) {\n return props.children ? props.children.props.hasOwnProperty('in') : false;\n} // A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\n\n\nvar defaultManager = new ModalManager();\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'fixed',\n zIndex: theme.zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n },\n\n /* Styles applied to the root element if the `Modal` has exited. */\n hidden: {\n visibility: 'hidden'\n }\n };\n};\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/api/dialog/)\n * - [Drawer](/api/drawer/)\n * - [Menu](/api/menu/)\n * - [Popover](/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\n\nvar Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n var theme = useTheme();\n var props = getThemeProps({\n name: 'MuiModal',\n props: _extends({}, inProps),\n theme: theme\n });\n\n var _props$BackdropCompon = props.BackdropComponent,\n BackdropComponent = _props$BackdropCompon === void 0 ? SimpleBackdrop : _props$BackdropCompon,\n BackdropProps = props.BackdropProps,\n children = props.children,\n _props$closeAfterTran = props.closeAfterTransition,\n closeAfterTransition = _props$closeAfterTran === void 0 ? false : _props$closeAfterTran,\n container = props.container,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableBackdro = props.disableBackdropClick,\n disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableEscapeK = props.disableEscapeKeyDown,\n disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK,\n _props$disablePortal = props.disablePortal,\n disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n _props$disableScrollL = props.disableScrollLock,\n disableScrollLock = _props$disableScrollL === void 0 ? false : _props$disableScrollL,\n _props$hideBackdrop = props.hideBackdrop,\n hideBackdrop = _props$hideBackdrop === void 0 ? false : _props$hideBackdrop,\n _props$keepMounted = props.keepMounted,\n keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,\n _props$manager = props.manager,\n manager = _props$manager === void 0 ? defaultManager : _props$manager,\n onBackdropClick = props.onBackdropClick,\n onClose = props.onClose,\n onEscapeKeyDown = props.onEscapeKeyDown,\n onRendered = props.onRendered,\n open = props.open,\n other = _objectWithoutProperties(props, [\"BackdropComponent\", \"BackdropProps\", \"children\", \"closeAfterTransition\", \"container\", \"disableAutoFocus\", \"disableBackdropClick\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"manager\", \"onBackdropClick\", \"onClose\", \"onEscapeKeyDown\", \"onRendered\", \"open\"]);\n\n var _React$useState = React.useState(true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var modal = React.useRef({});\n var mountNodeRef = React.useRef(null);\n var modalRef = React.useRef(null);\n var handleRef = useForkRef(modalRef, ref);\n var hasTransition = getHasTransition(props);\n\n var getDoc = function getDoc() {\n return ownerDocument(mountNodeRef.current);\n };\n\n var getModal = function getModal() {\n modal.current.modalRef = modalRef.current;\n modal.current.mountNode = mountNodeRef.current;\n return modal.current;\n };\n\n var handleMounted = function handleMounted() {\n manager.mount(getModal(), {\n disableScrollLock: disableScrollLock\n }); // Fix a bug on Chrome where the scroll isn't initially 0.\n\n modalRef.current.scrollTop = 0;\n };\n\n var handleOpen = useEventCallback(function () {\n var resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer); // The element was already mounted.\n\n if (modalRef.current) {\n handleMounted();\n }\n });\n var isTopModal = React.useCallback(function () {\n return manager.isTopModal(getModal());\n }, [manager]);\n var handlePortalRef = useEventCallback(function (node) {\n mountNodeRef.current = node;\n\n if (!node) {\n return;\n }\n\n if (onRendered) {\n onRendered();\n }\n\n if (open && isTopModal()) {\n handleMounted();\n } else {\n ariaHidden(modalRef.current, true);\n }\n });\n var handleClose = React.useCallback(function () {\n manager.remove(getModal());\n }, [manager]);\n React.useEffect(function () {\n return function () {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(function () {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n\n if (closeAfterTransition) {\n handleClose();\n }\n };\n\n var handleBackdropClick = function handleBackdropClick(event) {\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (!disableBackdropClick && onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || !isTopModal()) {\n return;\n }\n\n if (onEscapeKeyDown) {\n onEscapeKeyDown(event);\n }\n\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n\n var inlineStyle = styles(theme || {\n zIndex: zIndex\n });\n var childProps = {};\n\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = children.props.tabIndex || '-1';\n } // It's a Transition like component\n\n\n if (hasTransition) {\n childProps.onEnter = createChainedFunction(handleEnter, children.props.onEnter);\n childProps.onExited = createChainedFunction(handleExited, children.props.onExited);\n }\n\n return /*#__PURE__*/React.createElement(Portal, {\n ref: handlePortalRef,\n container: container,\n disablePortal: disablePortal\n }, /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: handleRef,\n onKeyDown: handleKeyDown,\n role: \"presentation\"\n }, other, {\n style: _extends({}, inlineStyle.root, !open && exited ? inlineStyle.hidden : {}, other.style)\n }), hideBackdrop ? null : /*#__PURE__*/React.createElement(BackdropComponent, _extends({\n open: open,\n onClick: handleBackdropClick\n }, BackdropProps)), /*#__PURE__*/React.createElement(TrapFocus, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n getDoc: getDoc,\n isEnabled: isTopModal,\n open: open\n }, /*#__PURE__*/React.cloneElement(children, childProps))));\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes = {\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n */\n BackdropComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Backdrop`](/api/backdrop/) element.\n */\n BackdropProps: PropTypes.object,\n\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n\n /**\n * When set to true the Modal waits until a nested Transition is completed before closing.\n */\n closeAfterTransition: PropTypes.bool,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.instanceOf(React.Component), PropTypes.func]),\n\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n */\n disableAutoFocus: PropTypes.bool,\n\n /**\n * If `true`, clicking the backdrop will not fire `onClose`.\n */\n disableBackdropClick: deprecatedPropType(PropTypes.bool, 'Use the onClose prop with the `reason` argument to filter the `backdropClick` events.'),\n\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n */\n disableEnforceFocus: PropTypes.bool,\n\n /**\n * If `true`, hitting escape will not fire `onClose`.\n */\n disableEscapeKeyDown: PropTypes.bool,\n\n /**\n * Disable the portal behavior.\n * The children stay within it's parent DOM hierarchy.\n */\n disablePortal: PropTypes.bool,\n\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden.\n */\n disableRestoreFocus: PropTypes.bool,\n\n /**\n * Disable the scroll lock behavior.\n */\n disableScrollLock: PropTypes.bool,\n\n /**\n * If `true`, the backdrop is not rendered.\n */\n hideBackdrop: PropTypes.bool,\n\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n */\n keepMounted: PropTypes.bool,\n\n /**\n * @ignore\n */\n manager: PropTypes.object,\n\n /**\n * Callback fired when the backdrop is clicked.\n */\n onBackdropClick: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `backdropClick` events.'),\n\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired when the escape key is pressed,\n * `disableEscapeKeyDown` is false and the modal is in focus.\n */\n onEscapeKeyDown: deprecatedPropType(PropTypes.func, 'Use the onClose prop with the `reason` argument to handle the `escapeKeyDown` events.'),\n\n /**\n * Callback fired once the children has been mounted into the `container`.\n * It signals that the `open={true}` prop took effect.\n *\n * This prop will be removed in v5, the ref can be used instead.\n */\n onRendered: deprecatedPropType(PropTypes.func, 'Use the ref instead.'),\n\n /**\n * If `true`, the modal is open.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nexport default Modal;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport useTheme from '../styles/useTheme';\nimport { reflow, getTransitionProps } from '../transitions/utils';\nimport useForkRef from '../utils/useForkRef';\n\nfunction getScale(value) {\n return \"scale(\".concat(value, \", \").concat(Math.pow(value, 2), \")\");\n}\n\nvar styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n/**\n * The Grow transition is used by the [Tooltip](/components/tooltips/) and\n * [Popover](/components/popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? 'auto' : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var timer = React.useRef();\n var autoTimeout = React.useRef();\n var theme = useTheme();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var foreignRef = useForkRef(children.ref, ref);\n var handleRef = useForkRef(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n reflow(node); // So the animation always start from the start.\n\n var _getTransitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration,\n delay = _getTransitionProps.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay\n })].join(',');\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var _getTransitionProps2 = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration,\n delay = _getTransitionProps2.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333\n })].join(',');\n node.style.opacity = '0';\n node.style.transform = getScale(0.75);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTimeout.current || 0);\n }\n };\n\n React.useEffect(function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n style: _extends({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: PropTypes.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, show the component; triggers the enter or exit animation.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nGrow.muiSupportAuto = true;\nexport default Grow;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport { chainPropTypes, elementTypeAcceptingRef, refType, HTMLElementType } from '@material-ui/utils';\nimport debounce from '../utils/debounce';\nimport clsx from 'clsx';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport createChainedFunction from '../utils/createChainedFunction';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport withStyles from '../styles/withStyles';\nimport Modal from '../Modal';\nimport Grow from '../Grow';\nimport Paper from '../Paper';\nexport function getOffsetTop(rect, vertical) {\n var offset = 0;\n\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n var offset = 0;\n\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n\n return offset;\n}\n\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(function (n) {\n return typeof n === 'number' ? \"\".concat(n, \"px\") : n;\n }).join(' ');\n} // Sum the scrollTop between two elements.\n\n\nfunction getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentElement;\n scrollTop += element.scrollTop;\n }\n\n return scrollTop;\n}\n\nfunction getAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nexport var styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the `Paper` component. */\n paper: {\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n }\n};\nvar Popover = /*#__PURE__*/React.forwardRef(function Popover(props, ref) {\n var action = props.action,\n anchorEl = props.anchorEl,\n _props$anchorOrigin = props.anchorOrigin,\n anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'top',\n horizontal: 'left'\n } : _props$anchorOrigin,\n anchorPosition = props.anchorPosition,\n _props$anchorReferenc = props.anchorReference,\n anchorReference = _props$anchorReferenc === void 0 ? 'anchorEl' : _props$anchorReferenc,\n children = props.children,\n classes = props.classes,\n className = props.className,\n containerProp = props.container,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 8 : _props$elevation,\n getContentAnchorEl = props.getContentAnchorEl,\n _props$marginThreshol = props.marginThreshold,\n marginThreshold = _props$marginThreshol === void 0 ? 16 : _props$marginThreshol,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n _props$transformOrigi = props.transformOrigin,\n transformOrigin = _props$transformOrigi === void 0 ? {\n vertical: 'top',\n horizontal: 'left'\n } : _props$transformOrigi,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n _props$TransitionProp = props.TransitionProps,\n TransitionProps = _props$TransitionProp === void 0 ? {} : _props$TransitionProp,\n other = _objectWithoutProperties(props, [\"action\", \"anchorEl\", \"anchorOrigin\", \"anchorPosition\", \"anchorReference\", \"children\", \"classes\", \"className\", \"container\", \"elevation\", \"getContentAnchorEl\", \"marginThreshold\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"open\", \"PaperProps\", \"transformOrigin\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n var paperRef = React.useRef(); // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n\n var getAnchorOffset = React.useCallback(function (contentAnchorOffset) {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('Material-UI: You need to provide a `anchorPosition` prop when using ' + '<Popover anchorReference=\"anchorPosition\" />.');\n }\n }\n\n return anchorPosition;\n }\n\n var resolvedAnchorEl = getAnchorEl(anchorEl); // If an anchor element wasn't provided, just use the parent body element of this Popover\n\n var anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n var anchorRect = anchorElement.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'production') {\n var box = anchorElement.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n\n var anchorVertical = contentAnchorOffset === 0 ? anchorOrigin.vertical : 'center';\n return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorVertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]); // Returns the vertical offset of inner content to anchor the transform on if provided\n\n var getContentAnchorOffset = React.useCallback(function (element) {\n var contentAnchorOffset = 0;\n\n if (getContentAnchorEl && anchorReference === 'anchorEl') {\n var contentAnchorEl = getContentAnchorEl(element);\n\n if (contentAnchorEl && element.contains(contentAnchorEl)) {\n var scrollTop = getScrollParent(element, contentAnchorEl);\n contentAnchorOffset = contentAnchorEl.offsetTop + contentAnchorEl.clientHeight / 2 - scrollTop || 0;\n } // != the default value\n\n\n if (process.env.NODE_ENV !== 'production') {\n if (anchorOrigin.vertical !== 'top') {\n console.error(['Material-UI: You can not change the default `anchorOrigin.vertical` value ', 'when also providing the `getContentAnchorEl` prop to the popover component.', 'Only use one of the two props.', 'Set `getContentAnchorEl` to `null | undefined`' + ' or leave `anchorOrigin.vertical` unchanged.'].join('\\n'));\n }\n }\n }\n\n return contentAnchorOffset;\n }, [anchorOrigin.vertical, anchorReference, getContentAnchorEl]); // Return the base transform origin using the element\n // and taking the content anchor offset into account if in use\n\n var getTransformOrigin = React.useCallback(function (elemRect) {\n var contentAnchorOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical) + contentAnchorOffset,\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n var getPositioningStyle = React.useCallback(function (element) {\n // Check if the parent has requested anchoring on an inner content node\n var contentAnchorOffset = getContentAnchorOffset(element);\n var elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n }; // Get the transform origin point on the element itself\n\n var elemTransformOrigin = getTransformOrigin(elemRect, contentAnchorOffset);\n\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n } // Get the offset of of the anchoring element\n\n\n var anchorOffset = getAnchorOffset(contentAnchorOffset); // Calculate element positioning\n\n var top = anchorOffset.top - elemTransformOrigin.vertical;\n var left = anchorOffset.left - elemTransformOrigin.horizontal;\n var bottom = top + elemRect.height;\n var right = left + elemRect.width; // Use the parent window of the anchorEl if provided\n\n var containerWindow = ownerWindow(getAnchorEl(anchorEl)); // Window thresholds taking required margin into account\n\n var heightThreshold = containerWindow.innerHeight - marginThreshold;\n var widthThreshold = containerWindow.innerWidth - marginThreshold; // Check if the vertical axis needs shifting\n\n if (top < marginThreshold) {\n var diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (bottom > heightThreshold) {\n var _diff = bottom - heightThreshold;\n\n top -= _diff;\n elemTransformOrigin.vertical += _diff;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['Material-UI: The popover component is too tall.', \"Some part of it can not be seen on the screen (\".concat(elemRect.height - heightThreshold, \"px).\"), 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n } // Check if the horizontal axis needs shifting\n\n\n if (left < marginThreshold) {\n var _diff2 = left - marginThreshold;\n\n left -= _diff2;\n elemTransformOrigin.horizontal += _diff2;\n } else if (right > widthThreshold) {\n var _diff3 = right - widthThreshold;\n\n left -= _diff3;\n elemTransformOrigin.horizontal += _diff3;\n }\n\n return {\n top: \"\".concat(Math.round(top), \"px\"),\n left: \"\".concat(Math.round(left), \"px\"),\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getContentAnchorOffset, getTransformOrigin, marginThreshold]);\n var setPositioningStyles = React.useCallback(function () {\n var element = paperRef.current;\n\n if (!element) {\n return;\n }\n\n var positioning = getPositioningStyle(element);\n\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n\n element.style.transformOrigin = positioning.transformOrigin;\n }, [getPositioningStyle]);\n\n var handleEntering = function handleEntering(element, isAppearing) {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n\n setPositioningStyles();\n };\n\n var handlePaperRef = React.useCallback(function (instance) {\n // #StrictMode ready\n paperRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n React.useEffect(function () {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, function () {\n return open ? {\n updatePosition: function updatePosition() {\n setPositioningStyles();\n }\n } : null;\n }, [open, setPositioningStyles]);\n React.useEffect(function () {\n if (!open) {\n return undefined;\n }\n\n var handleResize = debounce(function () {\n setPositioningStyles();\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [open, setPositioningStyles]);\n var transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n } // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n\n\n var container = containerProp || (anchorEl ? ownerDocument(getAnchorEl(anchorEl)).body : undefined);\n return /*#__PURE__*/React.createElement(Modal, _extends({\n container: container,\n open: open,\n ref: ref,\n BackdropProps: {\n invisible: true\n },\n className: clsx(classes.root, className)\n }, other), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n appear: true,\n in: open,\n onEnter: onEnter,\n onEntered: onEntered,\n onExit: onExit,\n onExited: onExited,\n onExiting: onExiting,\n timeout: transitionDuration\n }, TransitionProps, {\n onEntering: createChainedFunction(handleEntering, TransitionProps.onEntering)\n }), /*#__PURE__*/React.createElement(Paper, _extends({\n elevation: elevation,\n ref: handlePaperRef\n }, PaperProps, {\n className: clsx(classes.paper, PaperProps.className)\n }), children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n\n /**\n * A HTML element, or a function that returns it.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), function (props) {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n var resolvedAnchorEl = getAnchorEl(props.anchorEl);\n\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n var box = resolvedAnchorEl.getBoundingClientRect();\n\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', \"It should be an Element instance but it's `\".concat(resolvedAnchorEl, \"` instead.\")].join('\\n'));\n }\n }\n\n return null;\n }),\n\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n\n /**\n * This is the position that may be used\n * to set the position of the popover.\n * The coordinates are relative to\n * the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n\n /**\n * This determines which anchor prop to refer to to set\n * the position of the popover.\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.instanceOf(React.Component), PropTypes.func]),\n\n /**\n * The elevation of the popover.\n */\n elevation: PropTypes.number,\n\n /**\n * This function is called in order to retrieve the content anchor element.\n * It's the opposite of the `anchorEl` prop.\n * The content anchor element should be an element inside the popover.\n * It's used to correctly scroll and set the position of the popover.\n * The positioning strategy tries to make the content anchor element just above the\n * anchor element.\n */\n getContentAnchorEl: PropTypes.func,\n\n /**\n * Specifies how close to the edge of the window the popover can appear.\n */\n marginThreshold: PropTypes.number,\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the component is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the component has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the component is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired before the component is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the component has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the component is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * If `true`, the popover is visible.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: PropTypes\n /* @typescript-to-proptypes-ignore */\n .shape({\n component: elementTypeAcceptingRef\n }),\n\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiPopover'\n})(Popover);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { HTMLElementType } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport Popover from '../Popover';\nimport MenuList from '../MenuList';\nimport * as ReactDOM from 'react-dom';\nimport setRef from '../utils/setRef';\nimport useTheme from '../styles/useTheme';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nvar RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nvar LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nexport var styles = {\n /* Styles applied to the `Paper` component. */\n paper: {\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tapable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling.\n WebkitOverflowScrolling: 'touch'\n },\n\n /* Styles applied to the `List` component via `MenuList`. */\n list: {\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n }\n};\nvar Menu = /*#__PURE__*/React.forwardRef(function Menu(props, ref) {\n var _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,\n children = props.children,\n classes = props.classes,\n _props$disableAutoFoc = props.disableAutoFocusItem,\n disableAutoFocusItem = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$MenuListProps = props.MenuListProps,\n MenuListProps = _props$MenuListProps === void 0 ? {} : _props$MenuListProps,\n onClose = props.onClose,\n onEnteringProp = props.onEntering,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n PopoverClasses = props.PopoverClasses,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n _props$TransitionProp = props.TransitionProps;\n _props$TransitionProp = _props$TransitionProp === void 0 ? {} : _props$TransitionProp;\n\n var onEntering = _props$TransitionProp.onEntering,\n TransitionProps = _objectWithoutProperties(_props$TransitionProp, [\"onEntering\"]),\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'selectedMenu' : _props$variant,\n other = _objectWithoutProperties(props, [\"autoFocus\", \"children\", \"classes\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"onEntering\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"TransitionProps\", \"variant\"]);\n\n var theme = useTheme();\n var autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n var menuListActionsRef = React.useRef(null);\n var contentAnchorRef = React.useRef(null);\n\n var getContentAnchorEl = function getContentAnchorEl() {\n return contentAnchorRef.current;\n };\n\n var handleEntering = function handleEntering(element, isAppearing) {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n\n if (onEnteringProp) {\n onEnteringProp(element, isAppearing);\n }\n\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n\n var handleListKeyDown = function handleListKeyDown(event) {\n if (event.key === 'Tab') {\n event.preventDefault();\n\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n\n var activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n React.Children.map(children, function (child, index) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant !== \"menu\" && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n var items = React.Children.map(children, function (child, index) {\n if (index === activeItemIndex) {\n return /*#__PURE__*/React.cloneElement(child, {\n ref: function ref(instance) {\n // #StrictMode ready\n contentAnchorRef.current = ReactDOM.findDOMNode(instance);\n setRef(child.ref, instance);\n }\n });\n }\n\n return child;\n });\n return /*#__PURE__*/React.createElement(Popover, _extends({\n getContentAnchorEl: getContentAnchorEl,\n classes: PopoverClasses,\n onClose: onClose,\n TransitionProps: _extends({\n onEntering: handleEntering\n }, TransitionProps),\n anchorOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN,\n transformOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN,\n PaperProps: _extends({}, PaperProps, {\n classes: _extends({}, PaperProps.classes, {\n root: classes.paper\n })\n }),\n open: open,\n ref: ref,\n transitionDuration: transitionDuration\n }, other), /*#__PURE__*/React.createElement(MenuList, _extends({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: clsx(classes.list, MenuListProps.className)\n }), items));\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A HTML element, or a function that returns it.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([HTMLElementType, PropTypes.func]),\n\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Menu contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n */\n disableAutoFocusItem: PropTypes.bool,\n\n /**\n * Props applied to the [`MenuList`](/api/menu-list/) element.\n */\n MenuListProps: PropTypes.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired before the Menu enters.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEnter: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the Menu has entered.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntered: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the Menu is entering.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onEntering: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired before the Menu exits.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExit: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the Menu has exited.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExited: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * Callback fired when the Menu is exiting.\n * @deprecated Use the `TransitionProps` prop instead.\n */\n onExiting: deprecatedPropType(PropTypes.func, 'Use the `TransitionProps` prop instead.'),\n\n /**\n * If `true`, the menu is visible.\n */\n open: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n\n /**\n * `classes` prop applied to the [`Popover`](/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n\n /**\n * The length of the transition in `ms`, or 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.\n */\n TransitionProps: PropTypes.object,\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiMenu'\n})(Menu);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ownerDocument from '../utils/ownerDocument';\nimport capitalize from '../utils/capitalize';\nimport { refType } from '@material-ui/utils';\nimport Menu from '../Menu/Menu';\nimport { isFilled } from '../InputBase/utils';\nimport useForkRef from '../utils/useForkRef';\nimport useControlled from '../utils/useControlled';\n\nfunction areEqualValues(a, b) {\n if (_typeof(b) === 'object' && b !== null) {\n return a === b;\n }\n\n return String(a) === String(b);\n}\n\nfunction isEmpty(display) {\n return display == null || typeof display === 'string' && !display.trim();\n}\n/**\n * @ignore - internal component.\n */\n\n\nvar SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {\n var ariaLabel = props['aria-label'],\n autoFocus = props.autoFocus,\n autoWidth = props.autoWidth,\n children = props.children,\n classes = props.classes,\n className = props.className,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n displayEmpty = props.displayEmpty,\n IconComponent = props.IconComponent,\n inputRefProp = props.inputRef,\n labelId = props.labelId,\n _props$MenuProps = props.MenuProps,\n MenuProps = _props$MenuProps === void 0 ? {} : _props$MenuProps,\n multiple = props.multiple,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClose = props.onClose,\n onFocus = props.onFocus,\n onOpen = props.onOpen,\n openProp = props.open,\n readOnly = props.readOnly,\n renderValue = props.renderValue,\n _props$SelectDisplayP = props.SelectDisplayProps,\n SelectDisplayProps = _props$SelectDisplayP === void 0 ? {} : _props$SelectDisplayP,\n tabIndexProp = props.tabIndex,\n type = props.type,\n valueProp = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"aria-label\", \"autoFocus\", \"autoWidth\", \"children\", \"classes\", \"className\", \"defaultValue\", \"disabled\", \"displayEmpty\", \"IconComponent\", \"inputRef\", \"labelId\", \"MenuProps\", \"multiple\", \"name\", \"onBlur\", \"onChange\", \"onClose\", \"onFocus\", \"onOpen\", \"open\", \"readOnly\", \"renderValue\", \"SelectDisplayProps\", \"tabIndex\", \"type\", \"value\", \"variant\"]);\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Select'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n value = _useControlled2[0],\n setValue = _useControlled2[1];\n\n var inputRef = React.useRef(null);\n\n var _React$useState = React.useState(null),\n displayNode = _React$useState[0],\n setDisplayNode = _React$useState[1];\n\n var _React$useRef = React.useRef(openProp != null),\n isOpenControlled = _React$useRef.current;\n\n var _React$useState2 = React.useState(),\n menuMinWidthState = _React$useState2[0],\n setMenuMinWidthState = _React$useState2[1];\n\n var _React$useState3 = React.useState(false),\n openState = _React$useState3[0],\n setOpenState = _React$useState3[1];\n\n var handleRef = useForkRef(ref, inputRefProp);\n React.useImperativeHandle(handleRef, function () {\n return {\n focus: function focus() {\n displayNode.focus();\n },\n node: inputRef.current,\n value: value\n };\n }, [displayNode, value]);\n React.useEffect(function () {\n if (autoFocus && displayNode) {\n displayNode.focus();\n }\n }, [autoFocus, displayNode]);\n React.useEffect(function () {\n if (displayNode) {\n var label = ownerDocument(displayNode).getElementById(labelId);\n\n if (label) {\n var handler = function handler() {\n if (getSelection().isCollapsed) {\n displayNode.focus();\n }\n };\n\n label.addEventListener('click', handler);\n return function () {\n label.removeEventListener('click', handler);\n };\n }\n }\n\n return undefined;\n }, [labelId, displayNode]);\n\n var update = function update(open, event) {\n if (open) {\n if (onOpen) {\n onOpen(event);\n }\n } else if (onClose) {\n onClose(event);\n }\n\n if (!isOpenControlled) {\n setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);\n setOpenState(open);\n }\n };\n\n var handleMouseDown = function handleMouseDown(event) {\n // Ignore everything but left-click\n if (event.button !== 0) {\n return;\n } // Hijack the default focus behavior.\n\n\n event.preventDefault();\n displayNode.focus();\n update(true, event);\n };\n\n var handleClose = function handleClose(event) {\n update(false, event);\n };\n\n var childrenArray = React.Children.toArray(children); // Support autofill.\n\n var handleChange = function handleChange(event) {\n var index = childrenArray.map(function (child) {\n return child.props.value;\n }).indexOf(event.target.value);\n\n if (index === -1) {\n return;\n }\n\n var child = childrenArray[index];\n setValue(child.props.value);\n\n if (onChange) {\n onChange(event, child);\n }\n };\n\n var handleItemClick = function handleItemClick(child) {\n return function (event) {\n if (!multiple) {\n update(false, event);\n }\n\n var newValue;\n\n if (multiple) {\n newValue = Array.isArray(value) ? value.slice() : [];\n var itemIndex = value.indexOf(child.props.value);\n\n if (itemIndex === -1) {\n newValue.push(child.props.value);\n } else {\n newValue.splice(itemIndex, 1);\n }\n } else {\n newValue = child.props.value;\n }\n\n if (child.props.onClick) {\n child.props.onClick(event);\n }\n\n if (value === newValue) {\n return;\n }\n\n setValue(newValue);\n\n if (onChange) {\n event.persist(); // Preact support, target is read only property on a native event.\n\n Object.defineProperty(event, 'target', {\n writable: true,\n value: {\n value: newValue,\n name: name\n }\n });\n onChange(event, child);\n }\n };\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n if (!readOnly) {\n var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by\n // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html\n 'Enter'];\n\n if (validKeys.indexOf(event.key) !== -1) {\n event.preventDefault();\n update(true, event);\n }\n }\n };\n\n var open = displayNode !== null && (isOpenControlled ? openProp : openState);\n\n var handleBlur = function handleBlur(event) {\n // if open event.stopImmediatePropagation\n if (!open && onBlur) {\n event.persist(); // Preact support, target is read only property on a native event.\n\n Object.defineProperty(event, 'target', {\n writable: true,\n value: {\n value: value,\n name: name\n }\n });\n onBlur(event);\n }\n };\n\n delete other['aria-invalid'];\n var display;\n var displaySingle;\n var displayMultiple = [];\n var computeDisplay = false;\n var foundMatch = false; // No need to display any value if the field is empty.\n\n if (isFilled({\n value: value\n }) || displayEmpty) {\n if (renderValue) {\n display = renderValue(value);\n } else {\n computeDisplay = true;\n }\n }\n\n var items = childrenArray.map(function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Select component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var selected;\n\n if (multiple) {\n if (!Array.isArray(value)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: The `value` prop must be an array when using the `Select` component with `multiple`.\" : _formatMuiErrorMessage(2));\n }\n\n selected = value.some(function (v) {\n return areEqualValues(v, child.props.value);\n });\n\n if (selected && computeDisplay) {\n displayMultiple.push(child.props.children);\n }\n } else {\n selected = areEqualValues(value, child.props.value);\n\n if (selected && computeDisplay) {\n displaySingle = child.props.children;\n }\n }\n\n if (selected) {\n foundMatch = true;\n }\n\n return /*#__PURE__*/React.cloneElement(child, {\n 'aria-selected': selected ? 'true' : undefined,\n onClick: handleItemClick(child),\n onKeyUp: function onKeyUp(event) {\n if (event.key === ' ') {\n // otherwise our MenuItems dispatches a click event\n // it's not behavior of the native <option> and causes\n // the select to close immediately since we open on space keydown\n event.preventDefault();\n }\n\n if (child.props.onKeyUp) {\n child.props.onKeyUp(event);\n }\n },\n role: 'option',\n selected: selected,\n value: undefined,\n // The value is most likely not a valid HTML attribute.\n 'data-value': child.props.value // Instead, we provide it as a data attribute.\n\n });\n });\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(function () {\n if (!foundMatch && !multiple && value !== '') {\n var values = childrenArray.map(function (child) {\n return child.props.value;\n });\n console.warn([\"Material-UI: You have provided an out-of-range value `\".concat(value, \"` for the select \").concat(name ? \"(name=\\\"\".concat(name, \"\\\") \") : '', \"component.\"), \"Consider providing a value that matches one of the available options or ''.\", \"The available values are \".concat(values.filter(function (x) {\n return x != null;\n }).map(function (x) {\n return \"`\".concat(x, \"`\");\n }).join(', ') || '\"\"', \".\")].join('\\n'));\n }\n }, [foundMatch, childrenArray, multiple, name, value]);\n }\n\n if (computeDisplay) {\n display = multiple ? displayMultiple.join(', ') : displaySingle;\n } // Avoid performing a layout computation in the render method.\n\n\n var menuMinWidth = menuMinWidthState;\n\n if (!autoWidth && isOpenControlled && displayNode) {\n menuMinWidth = displayNode.clientWidth;\n }\n\n var tabIndex;\n\n if (typeof tabIndexProp !== 'undefined') {\n tabIndex = tabIndexProp;\n } else {\n tabIndex = disabled ? null : 0;\n }\n\n var buttonId = SelectDisplayProps.id || (name ? \"mui-component-select-\".concat(name) : undefined);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, // TODO v5: merge root and select\n classes.select, classes.selectMenu, classes[variant], className, disabled && classes.disabled),\n ref: setDisplayNode,\n tabIndex: tabIndex,\n role: \"button\",\n \"aria-disabled\": disabled ? 'true' : undefined,\n \"aria-expanded\": open ? 'true' : undefined,\n \"aria-haspopup\": \"listbox\",\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": [labelId, buttonId].filter(Boolean).join(' ') || undefined,\n onKeyDown: handleKeyDown,\n onMouseDown: disabled || readOnly ? null : handleMouseDown,\n onBlur: handleBlur,\n onFocus: onFocus\n }, SelectDisplayProps, {\n // The id is required for proper a11y\n id: buttonId\n }), isEmpty(display) ?\n /*#__PURE__*/\n // eslint-disable-next-line react/no-danger\n React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: '&#8203;'\n }\n }) : display), /*#__PURE__*/React.createElement(\"input\", _extends({\n value: Array.isArray(value) ? value.join(',') : value,\n name: name,\n ref: inputRef,\n \"aria-hidden\": true,\n onChange: handleChange,\n tabIndex: -1,\n className: classes.nativeInput,\n autoFocus: autoFocus\n }, other)), /*#__PURE__*/React.createElement(IconComponent, {\n className: clsx(classes.icon, classes[\"icon\".concat(capitalize(variant))], open && classes.iconOpen, disabled && classes.disabled)\n }), /*#__PURE__*/React.createElement(Menu, _extends({\n id: \"menu-\".concat(name || ''),\n anchorEl: displayNode,\n open: open,\n onClose: handleClose\n }, MenuProps, {\n MenuListProps: _extends({\n 'aria-labelledby': labelId,\n role: 'listbox',\n disableListWrap: true\n }, MenuProps.MenuListProps),\n PaperProps: _extends({}, MenuProps.PaperProps, {\n style: _extends({\n minWidth: menuMinWidth\n }, MenuProps.PaperProps != null ? MenuProps.PaperProps.style : null)\n })\n }), items));\n});\nprocess.env.NODE_ENV !== \"production\" ? SelectInput.propTypes = {\n /**\n * @ignore\n */\n 'aria-label': PropTypes.string,\n\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n */\n autoWidth: PropTypes.bool,\n\n /**\n * The option elements to populate the select with.\n * Can be some `<MenuItem>` elements.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the select will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the selected item is displayed even if its value is empty.\n */\n displayEmpty: PropTypes.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n\n /**\n * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`\n * Equivalent to `ref`\n */\n inputRef: refType,\n\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n\n /**\n * Props applied to the [`Menu`](/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n */\n multiple: PropTypes.bool,\n\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * @param {object} [child] The react element that was selected.\n */\n onChange: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * Control `select` open state.\n */\n open: PropTypes.bool,\n\n /**\n * @ignore\n */\n readOnly: PropTypes.bool,\n\n /**\n * Render the selected value.\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n type: PropTypes.any,\n\n /**\n * The input value.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default SelectInput;","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nimport useForkRef from '../utils/useForkRef';\nimport deprecatedPropType from '../utils/deprecatedPropType';\n\nfunction getStyleValue(computedStyle, property) {\n return parseInt(computedStyle[property], 10) || 0;\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar styles = {\n /* Styles applied to the shadow textarea element. */\n shadow: {\n // Visibility needed to hide the extra text area on iPads\n visibility: 'hidden',\n // Remove from the content flow\n position: 'absolute',\n // Ignore the scrollbar width\n overflow: 'hidden',\n height: 0,\n top: 0,\n left: 0,\n // Create a new layer, increase the isolation of the computed values\n transform: 'translateZ(0)'\n }\n};\nvar TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, ref) {\n var onChange = props.onChange,\n rows = props.rows,\n rowsMax = props.rowsMax,\n rowsMinProp = props.rowsMin,\n maxRowsProp = props.maxRows,\n _props$minRows = props.minRows,\n minRowsProp = _props$minRows === void 0 ? 1 : _props$minRows,\n style = props.style,\n value = props.value,\n other = _objectWithoutProperties(props, [\"onChange\", \"rows\", \"rowsMax\", \"rowsMin\", \"maxRows\", \"minRows\", \"style\", \"value\"]);\n\n var maxRows = maxRowsProp || rowsMax;\n var minRows = rows || rowsMinProp || minRowsProp;\n\n var _React$useRef = React.useRef(value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = React.useRef(null);\n var handleRef = useForkRef(ref, inputRef);\n var shadowRef = React.useRef(null);\n var renders = React.useRef(0);\n\n var _React$useState = React.useState({}),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var syncHeight = React.useCallback(function () {\n var input = inputRef.current;\n var computedStyle = window.getComputedStyle(input);\n var inputShallow = shadowRef.current;\n inputShallow.style.width = computedStyle.width;\n inputShallow.value = input.value || props.placeholder || 'x';\n\n if (inputShallow.value.slice(-1) === '\\n') {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n inputShallow.value += ' ';\n }\n\n var boxSizing = computedStyle['box-sizing'];\n var padding = getStyleValue(computedStyle, 'padding-bottom') + getStyleValue(computedStyle, 'padding-top');\n var border = getStyleValue(computedStyle, 'border-bottom-width') + getStyleValue(computedStyle, 'border-top-width'); // The height of the inner content\n\n var innerHeight = inputShallow.scrollHeight - padding; // Measure height of a textarea with a single row\n\n inputShallow.value = 'x';\n var singleRowHeight = inputShallow.scrollHeight - padding; // The height of the outer content\n\n var outerHeight = innerHeight;\n\n if (minRows) {\n outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n }\n\n if (maxRows) {\n outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n }\n\n outerHeight = Math.max(outerHeight, singleRowHeight); // Take the box sizing into account for applying this value as a style.\n\n var outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n var overflow = Math.abs(outerHeight - innerHeight) <= 1;\n setState(function (prevState) {\n // Need a large enough difference to update the height.\n // This prevents infinite rendering loop.\n if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {\n renders.current += 1;\n return {\n overflow: overflow,\n outerHeightStyle: outerHeightStyle\n };\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (renders.current === 20) {\n console.error(['Material-UI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\\n'));\n }\n }\n\n return prevState;\n });\n }, [maxRows, minRows, props.placeholder]);\n React.useEffect(function () {\n var handleResize = debounce(function () {\n renders.current = 0;\n syncHeight();\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [syncHeight]);\n useEnhancedEffect(function () {\n syncHeight();\n });\n React.useEffect(function () {\n renders.current = 0;\n }, [value]);\n\n var handleChange = function handleChange(event) {\n renders.current = 0;\n\n if (!isControlled) {\n syncHeight();\n }\n\n if (onChange) {\n onChange(event);\n }\n };\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"textarea\", _extends({\n value: value,\n onChange: handleChange,\n ref: handleRef // Apply the rows prop to get a \"correct\" first SSR paint\n ,\n rows: minRows,\n style: _extends({\n height: state.outerHeightStyle,\n // Need a large enough difference to allow scrolling.\n // This prevents infinite rendering loop.\n overflow: state.overflow ? 'hidden' : null\n }, style)\n }, other)), /*#__PURE__*/React.createElement(\"textarea\", {\n \"aria-hidden\": true,\n className: props.className,\n readOnly: true,\n ref: shadowRef,\n tabIndex: -1,\n style: _extends({}, styles.shadow, style)\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TextareaAutosize.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Maximum number of rows to display.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n placeholder: PropTypes.string,\n\n /**\n * Minimum number of rows to display.\n * @deprecated Use `minRows` instead.\n */\n rows: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 'Use `minRows` instead.'),\n\n /**\n * Maximum number of rows to display.\n * @deprecated Use `maxRows` instead.\n */\n rowsMax: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 'Use `maxRows` instead.'),\n\n /**\n * Minimum number of rows to display.\n * @deprecated Use `minRows` instead.\n */\n rowsMin: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 'Use `minRows` instead.'),\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * @ignore\n */\n value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string])\n} : void 0;\nexport default TextareaAutosize;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { formatMuiErrorMessage as _formatMuiErrorMessage } from \"@material-ui/utils\";\n\n/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport formControlState from '../FormControl/formControlState';\nimport FormControlContext, { useFormControl } from '../FormControl/FormControlContext';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nimport useForkRef from '../utils/useForkRef';\nimport TextareaAutosize from '../TextareaAutosize';\nimport { isFilled } from './utils';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n var placeholderHidden = {\n opacity: '0 !important'\n };\n var placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return {\n '@global': {\n '@keyframes mui-auto-fill': {},\n '@keyframes mui-auto-fill-cancel': {}\n },\n\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.1876em',\n // Reset (19px), match the native input line-height\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n '&$disabled': {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n }),\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {},\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {},\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n '&$marginDense': {\n paddingTop: 4 - 1\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the `input` element. */\n input: {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.1876em',\n // Reset (19px), match the native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE 11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE 11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n '-webkit-appearance': 'none'\n },\n // Show and hide the placeholder logic\n 'label[data-shrink=false] + $formControl &': {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE 11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE 11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n '&$disabled': {\n opacity: 1 // Reset iOS opacity\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 4 - 1\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n height: 'auto',\n resize: 'none',\n padding: 0\n },\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {\n // Improve type search style.\n '-moz-appearance': 'textfield',\n '-webkit-appearance': 'textfield'\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {},\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {},\n\n /* Styles applied to the `input` element if `hiddenLabel={true}`. */\n inputHiddenLabel: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\nvar InputBase = /*#__PURE__*/React.forwardRef(function InputBase(props, ref) {\n var ariaDescribedby = props['aria-describedby'],\n autoComplete = props.autoComplete,\n autoFocus = props.autoFocus,\n classes = props.classes,\n className = props.className,\n color = props.color,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n endAdornment = props.endAdornment,\n error = props.error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n id = props.id,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$inputProps = props.inputProps,\n inputPropsProp = _props$inputProps === void 0 ? {} : _props$inputProps,\n inputRefProp = props.inputRef,\n margin = props.margin,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n placeholder = props.placeholder,\n readOnly = props.readOnly,\n renderSuffix = props.renderSuffix,\n rows = props.rows,\n rowsMax = props.rowsMax,\n rowsMin = props.rowsMin,\n maxRows = props.maxRows,\n minRows = props.minRows,\n startAdornment = props.startAdornment,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n valueProp = props.value,\n other = _objectWithoutProperties(props, [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"classes\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"rowsMax\", \"rowsMin\", \"maxRows\", \"minRows\", \"startAdornment\", \"type\", \"value\"]);\n\n var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n\n var _React$useRef = React.useRef(value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = React.useRef();\n var handleInputRefWarning = React.useCallback(function (instance) {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `inputRef` prop.', 'Make sure the `inputRef` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n var handleInputPropsRefProp = useForkRef(inputPropsProp.ref, handleInputRefWarning);\n var handleInputRefProp = useForkRef(inputRefProp, handleInputPropsRefProp);\n var handleInputRef = useForkRef(inputRef, handleInputRefProp);\n\n var _React$useState = React.useState(false),\n focused = _React$useState[0],\n setFocused = _React$useState[1];\n\n var muiFormControl = useFormControl();\n\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(function () {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'margin', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n React.useEffect(function () {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n var onFilled = muiFormControl && muiFormControl.onFilled;\n var onEmpty = muiFormControl && muiFormControl.onEmpty;\n var checkDirty = React.useCallback(function (obj) {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(function () {\n if (isControlled) {\n checkDirty({\n value: value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n var handleFocus = function handleFocus(event) {\n // Fix a bug with IE 11 where the focus/blur events are triggered\n // while the input is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n var handleChange = function handleChange(event) {\n if (!isControlled) {\n var element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? \"Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.\" : _formatMuiErrorMessage(1));\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange.apply(inputPropsProp, [event].concat(args));\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange.apply(void 0, [event].concat(args));\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n React.useEffect(function () {\n checkDirty(inputRef.current);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n var handleClick = function handleClick(event) {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var InputComponent = inputComponent;\n\n var inputProps = _extends({}, inputPropsProp, {\n ref: handleInputRef\n });\n\n if (typeof InputComponent !== 'string') {\n inputProps = _extends({\n // Rename ref to inputRef as we don't know the\n // provided `inputComponent` structure.\n inputRef: handleInputRef,\n type: type\n }, inputProps, {\n ref: null\n });\n } else if (multiline) {\n if (rows && !maxRows && !minRows && !rowsMax && !rowsMin) {\n InputComponent = 'textarea';\n } else {\n inputProps = _extends({\n minRows: rows || minRows,\n rowsMax: rowsMax,\n maxRows: maxRows\n }, inputProps);\n InputComponent = TextareaAutosize;\n }\n } else {\n inputProps = _extends({\n type: type\n }, inputProps);\n }\n\n var handleAutoFill = function handleAutoFill(event) {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n React.useEffect(function () {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fullWidth && classes.fullWidth, fcs.focused && classes.focused, muiFormControl && classes.formControl, multiline && classes.multiline, startAdornment && classes.adornedStart, endAdornment && classes.adornedEnd, fcs.margin === 'dense' && classes.marginDense),\n onClick: handleClick,\n ref: ref\n }, other), startAdornment, /*#__PURE__*/React.createElement(FormControlContext.Provider, {\n value: null\n }, /*#__PURE__*/React.createElement(InputComponent, _extends({\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp\n }, inputProps, {\n className: clsx(classes.input, inputPropsProp.className, fcs.disabled && classes.disabled, multiline && classes.inputMultiline, fcs.hiddenLabel && classes.inputHiddenLabel, startAdornment && classes.inputAdornedStart, endAdornment && classes.inputAdornedEnd, type === 'search' && classes.inputTypeSearch, fcs.margin === 'dense' && classes.inputMarginDense),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))), endAdornment, renderSuffix ? renderSuffix(_extends({}, fcs, {\n startAdornment: startAdornment\n })) : null);\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the input is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Maximum number of rows to display.\n * @deprecated Use `maxRows` instead.\n */\n rowsMax: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Minimum number of rows to display.\n * @deprecated Use `minRows` instead.\n */\n rowsMin: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiInputBase'\n})(InputBase);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport InputBase from '../InputBase';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n 'label + &': {\n marginTop: 16\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:not($disabled):before': {\n borderBottom: \"2px solid \".concat(theme.palette.text.primary),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: \"1px solid \".concat(bottomLineColor)\n }\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {},\n\n /* Styles applied to the `input` element. */\n input: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {},\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {},\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {}\n };\n};\nvar Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = _objectWithoutProperties(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/React.createElement(InputBase, _extends({\n classes: _extends({}, classes, {\n root: clsx(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nInput.muiName = 'Input';\nexport default withStyles(styles, {\n name: 'MuiInput'\n})(Input);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport capitalize from '../utils/capitalize';\n/**\n * @ignore - internal component.\n */\n\nvar NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInput(props, ref) {\n var classes = props.classes,\n className = props.className,\n disabled = props.disabled,\n IconComponent = props.IconComponent,\n inputRef = props.inputRef,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disabled\", \"IconComponent\", \"inputRef\", \"variant\"]);\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"select\", _extends({\n className: clsx(classes.root, // TODO v5: merge root and select\n classes.select, classes[variant], className, disabled && classes.disabled),\n disabled: disabled,\n ref: inputRef || ref\n }, other)), props.multiple ? null : /*#__PURE__*/React.createElement(IconComponent, {\n className: clsx(classes.icon, classes[\"icon\".concat(capitalize(variant))], disabled && classes.disabled)\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelectInput.propTypes = {\n /**\n * The option elements to populate the select with.\n * Can be some `<option>` elements.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the select will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n\n /**\n * Use that prop to pass a ref to the native select element.\n * @deprecated\n */\n inputRef: refType,\n\n /**\n * @ignore\n */\n multiple: PropTypes.bool,\n\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The input value.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default NativeSelectInput;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport NativeSelectInput from './NativeSelectInput';\nimport withStyles from '../styles/withStyles';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the select component `root` class. */\n root: {},\n\n /* Styles applied to the select component `select` class. */\n select: {\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n minWidth: 16,\n // So it doesn't collapse.\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE 11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n '&$disabled': {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n '&&': {\n paddingRight: 24\n }\n },\n\n /* Styles applied to the select component if `variant=\"filled\"`. */\n filled: {\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component if `variant=\"outlined\"`. */\n outlined: {\n borderRadius: theme.shape.borderRadius,\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component `selectMenu` class. */\n selectMenu: {\n height: 'auto',\n // Resets for multpile select with chips\n minHeight: '1.1876em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n\n /* Pseudo-class applied to the select component `disabled` class. */\n disabled: {},\n\n /* Styles applied to the icon component. */\n icon: {\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - 12px)',\n // Center vertically\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the icon component if the popup is open. */\n iconOpen: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the icon component if `variant=\"filled\"`. */\n iconFilled: {\n right: 7\n },\n\n /* Styles applied to the icon component if `variant=\"outlined\"`. */\n iconOutlined: {\n right: 7\n },\n\n /* Styles applied to the underlying native input component. */\n nativeInput: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%'\n }\n };\n};\nvar defaultInput = /*#__PURE__*/React.createElement(Input, null);\n/**\n * An alternative to `<Select native />` with a much smaller bundle size footprint.\n */\n\nvar NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(props, ref) {\n var children = props.children,\n classes = props.classes,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? ArrowDropDownIcon : _props$IconComponent,\n _props$input = props.input,\n input = _props$input === void 0 ? defaultInput : _props$input,\n inputProps = props.inputProps,\n variant = props.variant,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"IconComponent\", \"input\", \"inputProps\", \"variant\"]);\n\n var muiFormControl = useFormControl();\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['variant']\n });\n return /*#__PURE__*/React.cloneElement(input, _extends({\n // Most of the logic is implemented in `NativeSelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent: NativeSelectInput,\n inputProps: _extends({\n children: children,\n classes: classes,\n IconComponent: IconComponent,\n variant: fcs.variant,\n type: undefined\n }, inputProps, input ? input.props.inputProps : {}),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelect.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The option elements to populate the select with.\n * Can be some `<option>` elements.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType,\n\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n */\n input: PropTypes.element,\n\n /**\n * Attributes applied to the `select` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The input value. The DOM API casts this to a string.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nNativeSelect.muiName = 'Select';\nexport default withStyles(styles, {\n name: 'MuiNativeSelect'\n})(NativeSelect);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport InputBase from '../InputBase';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n var backgroundColor = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n backgroundColor: backgroundColor,\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n '&:hover': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.13)' : 'rgba(255, 255, 255, 0.13)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: backgroundColor\n }\n },\n '&$focused': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)'\n },\n '&$disabled': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'\n }\n },\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:before': {\n borderBottom: \"1px solid \".concat(theme.palette.text.primary)\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if the component is focused. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {\n paddingLeft: 12\n },\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {\n paddingRight: 12\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: '27px 12px 10px',\n '&$marginDense': {\n paddingTop: 23,\n paddingBottom: 6\n }\n },\n\n /* Styles applied to the `input` element. */\n input: {\n padding: '27px 12px 10px',\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.type === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.type === 'light' ? null : '#fff',\n caretColor: theme.palette.type === 'light' ? null : '#fff',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 23,\n paddingBottom: 6\n },\n\n /* Styles applied to the `input` if in `<FormControl hiddenLabel />`. */\n inputHiddenLabel: {\n paddingTop: 18,\n paddingBottom: 19,\n '&$inputMarginDense': {\n paddingTop: 10,\n paddingBottom: 11\n }\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n padding: 0\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {\n paddingLeft: 0\n },\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {\n paddingRight: 0\n }\n };\n};\nvar FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = _objectWithoutProperties(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/React.createElement(InputBase, _extends({\n classes: _extends({}, classes, {\n root: clsx(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? FilledInput.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nFilledInput.muiName = 'Input';\nexport default withStyles(styles, {\n name: 'MuiFilledInput'\n})(FilledInput);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n bottom: 0,\n right: 0,\n top: -5,\n left: 0,\n margin: 0,\n padding: '0 8px',\n pointerEvents: 'none',\n borderRadius: 'inherit',\n borderStyle: 'solid',\n borderWidth: 1,\n overflow: 'hidden'\n },\n\n /* Styles applied to the legend element when `labelWidth` is provided. */\n legend: {\n textAlign: 'left',\n padding: 0,\n lineHeight: '11px',\n // sync with `height` in `legend` styles\n transition: theme.transitions.create('width', {\n duration: 150,\n easing: theme.transitions.easing.easeOut\n })\n },\n\n /* Styles applied to the legend element. */\n legendLabelled: {\n display: 'block',\n width: 'auto',\n textAlign: 'left',\n padding: 0,\n height: 11,\n // sync with `lineHeight` in `legend` styles\n fontSize: '0.75em',\n visibility: 'hidden',\n maxWidth: 0.01,\n transition: theme.transitions.create('max-width', {\n duration: 50,\n easing: theme.transitions.easing.easeOut\n }),\n '& > span': {\n paddingLeft: 5,\n paddingRight: 5,\n display: 'inline-block'\n }\n },\n\n /* Styles applied to the legend element is notched. */\n legendNotched: {\n maxWidth: 1000,\n transition: theme.transitions.create('max-width', {\n duration: 100,\n easing: theme.transitions.easing.easeOut,\n delay: 50\n })\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar NotchedOutline = /*#__PURE__*/React.forwardRef(function NotchedOutline(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n label = props.label,\n labelWidthProp = props.labelWidth,\n notched = props.notched,\n style = props.style,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"label\", \"labelWidth\", \"notched\", \"style\"]);\n\n var theme = useTheme();\n var align = theme.direction === 'rtl' ? 'right' : 'left';\n\n if (label !== undefined) {\n return /*#__PURE__*/React.createElement(\"fieldset\", _extends({\n \"aria-hidden\": true,\n className: clsx(classes.root, className),\n ref: ref,\n style: style\n }, other), /*#__PURE__*/React.createElement(\"legend\", {\n className: clsx(classes.legendLabelled, notched && classes.legendNotched)\n }, label ? /*#__PURE__*/React.createElement(\"span\", null, label) : /*#__PURE__*/React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: '&#8203;'\n }\n })));\n }\n\n var labelWidth = labelWidthProp > 0 ? labelWidthProp * 0.75 + 8 : 0.01;\n return /*#__PURE__*/React.createElement(\"fieldset\", _extends({\n \"aria-hidden\": true,\n style: _extends(_defineProperty({}, \"padding\".concat(capitalize(align)), 8), style),\n className: clsx(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"legend\", {\n className: classes.legend,\n style: {\n // IE 11: fieldset with legend does not render\n // a border radius. This maintains consistency\n // by always having a legend rendered\n width: notched ? labelWidth : 0.01\n }\n }, /*#__PURE__*/React.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: '&#8203;'\n }\n })));\n});\nprocess.env.NODE_ENV !== \"production\" ? NotchedOutline.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The label.\n */\n label: PropTypes.node,\n\n /**\n * The width of the label.\n */\n labelWidth: PropTypes.number.isRequired,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool.isRequired,\n\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateNotchedOutline'\n})(NotchedOutline);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport InputBase from '../InputBase';\nimport NotchedOutline from './NotchedOutline';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n var borderColor = theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n borderRadius: theme.shape.borderRadius,\n '&:hover $notchedOutline': {\n borderColor: theme.palette.text.primary\n },\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n '&:hover $notchedOutline': {\n borderColor: borderColor\n }\n },\n '&$focused $notchedOutline': {\n borderColor: theme.palette.primary.main,\n borderWidth: 2\n },\n '&$error $notchedOutline': {\n borderColor: theme.palette.error.main\n },\n '&$disabled $notchedOutline': {\n borderColor: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {\n '&$focused $notchedOutline': {\n borderColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {\n paddingLeft: 14\n },\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {\n paddingRight: 14\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: '18.5px 14px',\n '&$marginDense': {\n paddingTop: 10.5,\n paddingBottom: 10.5\n }\n },\n\n /* Styles applied to the `NotchedOutline` element. */\n notchedOutline: {\n borderColor: borderColor\n },\n\n /* Styles applied to the `input` element. */\n input: {\n padding: '18.5px 14px',\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.type === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.type === 'light' ? null : '#fff',\n caretColor: theme.palette.type === 'light' ? null : '#fff',\n borderRadius: 'inherit'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 10.5,\n paddingBottom: 10.5\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n padding: 0\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {\n paddingLeft: 0\n },\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {\n paddingRight: 0\n }\n };\n};\nvar OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(props, ref) {\n var classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n label = props.label,\n _props$labelWidth = props.labelWidth,\n labelWidth = _props$labelWidth === void 0 ? 0 : _props$labelWidth,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n notched = props.notched,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = _objectWithoutProperties(props, [\"classes\", \"fullWidth\", \"inputComponent\", \"label\", \"labelWidth\", \"multiline\", \"notched\", \"type\"]);\n\n return /*#__PURE__*/React.createElement(InputBase, _extends({\n renderSuffix: function renderSuffix(state) {\n return /*#__PURE__*/React.createElement(NotchedOutline, {\n className: classes.notchedOutline,\n label: label,\n labelWidth: labelWidth,\n notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)\n });\n },\n classes: _extends({}, classes, {\n root: clsx(classes.root, classes.underline),\n notchedOutline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? OutlinedInput.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: PropTypes.bool,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: PropTypes.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * The label of the input. It is only used for layout. The actual labelling\n * is handled by `InputLabel`. If specified `labelWidth` is ignored.\n */\n label: PropTypes.node,\n\n /**\n * The width of the label. Is ignored if `label` is provided. Prefer `label`\n * if the input label appears with a strike through.\n */\n labelWidth: PropTypes.number,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: PropTypes.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: PropTypes.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nOutlinedInput.muiName = 'Input';\nexport default withStyles(styles, {\n name: 'MuiOutlinedInput'\n})(OutlinedInput);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { mergeClasses } from '@material-ui/styles';\nimport SelectInput from './SelectInput';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport Input from '../Input';\nimport { styles as nativeSelectStyles } from '../NativeSelect/NativeSelect';\nimport NativeSelectInput from '../NativeSelect/NativeSelectInput';\nimport FilledInput from '../FilledInput';\nimport OutlinedInput from '../OutlinedInput';\nexport var styles = nativeSelectStyles;\n\nvar _ref = /*#__PURE__*/React.createElement(Input, null);\n\nvar _ref2 = /*#__PURE__*/React.createElement(FilledInput, null);\n\nvar Select = /*#__PURE__*/React.forwardRef(function Select(props, ref) {\n var _props$autoWidth = props.autoWidth,\n autoWidth = _props$autoWidth === void 0 ? false : _props$autoWidth,\n children = props.children,\n classes = props.classes,\n _props$displayEmpty = props.displayEmpty,\n displayEmpty = _props$displayEmpty === void 0 ? false : _props$displayEmpty,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? ArrowDropDownIcon : _props$IconComponent,\n id = props.id,\n input = props.input,\n inputProps = props.inputProps,\n label = props.label,\n labelId = props.labelId,\n _props$labelWidth = props.labelWidth,\n labelWidth = _props$labelWidth === void 0 ? 0 : _props$labelWidth,\n MenuProps = props.MenuProps,\n _props$multiple = props.multiple,\n multiple = _props$multiple === void 0 ? false : _props$multiple,\n _props$native = props.native,\n native = _props$native === void 0 ? false : _props$native,\n onClose = props.onClose,\n onOpen = props.onOpen,\n open = props.open,\n renderValue = props.renderValue,\n SelectDisplayProps = props.SelectDisplayProps,\n _props$variant = props.variant,\n variantProps = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"autoWidth\", \"children\", \"classes\", \"displayEmpty\", \"IconComponent\", \"id\", \"input\", \"inputProps\", \"label\", \"labelId\", \"labelWidth\", \"MenuProps\", \"multiple\", \"native\", \"onClose\", \"onOpen\", \"open\", \"renderValue\", \"SelectDisplayProps\", \"variant\"]);\n\n var inputComponent = native ? NativeSelectInput : SelectInput;\n var muiFormControl = useFormControl();\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['variant']\n });\n var variant = fcs.variant || variantProps;\n var InputComponent = input || {\n standard: _ref,\n outlined: /*#__PURE__*/React.createElement(OutlinedInput, {\n label: label,\n labelWidth: labelWidth\n }),\n filled: _ref2\n }[variant];\n return /*#__PURE__*/React.cloneElement(InputComponent, _extends({\n // Most of the logic is implemented in `SelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent: inputComponent,\n inputProps: _extends({\n children: children,\n IconComponent: IconComponent,\n variant: variant,\n type: undefined,\n // We render a select. We can ignore the type provided by the `Input`.\n multiple: multiple\n }, native ? {\n id: id\n } : {\n autoWidth: autoWidth,\n displayEmpty: displayEmpty,\n labelId: labelId,\n MenuProps: MenuProps,\n onClose: onClose,\n onOpen: onOpen,\n open: open,\n renderValue: renderValue,\n SelectDisplayProps: _extends({\n id: id\n }, SelectDisplayProps)\n }, inputProps, {\n classes: inputProps ? mergeClasses({\n baseClasses: classes,\n newClasses: inputProps.classes,\n Component: Select\n }) : classes\n }, input ? input.props.inputProps : {}),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Select.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n */\n autoWidth: PropTypes.bool,\n\n /**\n * The option elements to populate the select with.\n * Can be some `MenuItem` when `native` is false and `option` when `native` is true.\n *\n * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n\n /**\n * If `true`, a value is displayed even if no items are selected.\n *\n * In order to display a meaningful value, a function should be passed to the `renderValue` prop which returns the value to be displayed when no items are selected.\n * You can only use it when the `native` prop is `false` (default).\n */\n displayEmpty: PropTypes.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType,\n\n /**\n * The `id` of the wrapper element or the `select` element when `native`.\n */\n id: PropTypes.string,\n\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n */\n input: PropTypes.element,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * When `native` is `true`, the attributes are applied on the `select` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * See [OutlinedInput#label](/api/outlined-input/#props)\n */\n label: PropTypes.node,\n\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n\n /**\n * See [OutlinedInput#label](/api/outlined-input/#props)\n */\n labelWidth: PropTypes.number,\n\n /**\n * Props applied to the [`Menu`](/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n */\n multiple: PropTypes.bool,\n\n /**\n * If `true`, the component will be using a native `select` element.\n */\n native: PropTypes.bool,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * @param {object} [child] The react element that was selected when `native` is `false` (default).\n */\n onChange: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n\n /**\n * Control `select` open state.\n * You can only use it when the `native` prop is `false` (default).\n */\n open: PropTypes.bool,\n\n /**\n * Render the selected value.\n * You can only use it when the `native` prop is `false` (default).\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n\n /**\n * The input value. Providing an empty string will select no options.\n * This prop is required when the `native` prop is `false` (default).\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n *\n * If the value is an object it must have reference equality with the option in order to be selected.\n * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.\n */\n value: PropTypes.any,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nSelect.muiName = 'Select';\nexport default withStyles(styles, {\n name: 'MuiSelect'\n})(Select);","export function assert(condition, message) {\n if (!condition) {\n throw new Error(message);\n }\n}\n","// Resolves a relative url against a baseUrl\n// If url is absolute, return it unchanged\nexport function resolveUrl(url, options) {\n // TODO: Use better logic to handle all protocols plus not delay on data\n const absolute = url.startsWith('data:') || url.startsWith('http:') || url.startsWith('https:');\n if (absolute) {\n return url;\n }\n const baseUrl = options.baseUri || options.uri;\n if (!baseUrl) {\n throw new Error(`'baseUri' must be provided to resolve relative url ${url}`);\n }\n return baseUrl.substr(0, baseUrl.lastIndexOf('/') + 1) + url;\n}\n","// TODO - GLTFScenegraph should use these\nimport {assert} from '../utils/assert';\n\n// accepts buffer view index or buffer view object\n// returns a `Uint8Array`\nexport function getTypedArrayForBufferView(json, buffers, bufferViewIndex) {\n const bufferView = json.bufferViews[bufferViewIndex];\n assert(bufferView);\n\n // Get hold of the arrayBuffer\n const bufferIndex = bufferView.buffer;\n const binChunk = buffers[bufferIndex];\n assert(binChunk);\n\n const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;\n return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);\n}\n\n// accepts accessor index or accessor object\n// returns a `Uint8Array`\nexport function getTypedArrayForImageData(json, buffers, imageIndex) {\n const image = json.images[imageIndex];\n const bufferViewIndex = json.bufferViews[image.bufferView];\n return getTypedArrayForBufferView(json, buffers, bufferViewIndex);\n}\n\n/*\n// accepts accessor index or accessor object\n// returns a typed array with type that matches the types\nexport function getTypedArrayForAccessor(accessor) {\n accessor = this.getAccessor(accessor);\n const bufferView = this.getBufferView(accessor.bufferView);\n const buffer = this.getBuffer(bufferView.buffer);\n const arrayBuffer = buffer.data;\n\n // Create a new typed array as a view into the combined buffer\n const {ArrayType, length} = getAccessorArrayTypeAndLength(accessor, bufferView);\n const byteOffset = bufferView.byteOffset + accessor.byteOffset;\n return new ArrayType(arrayBuffer, byteOffset, length);\n}\n*/\n","import {assert} from '../utils/assert';\n\nconst TYPES = ['SCALAR', 'VEC2', 'VEC3', 'VEC4'];\n\ntype TypedArrayConstructor =\n | Int8ArrayConstructor\n | Uint8ArrayConstructor\n | Int16ArrayConstructor\n | Uint16ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Int32ArrayConstructor\n | Uint32ArrayConstructor\n | Float32ArrayConstructor\n | Float64ArrayConstructor;\n\nconst ARRAY_CONSTRUCTOR_TO_WEBGL_CONSTANT: [TypedArrayConstructor, number][] = [\n [Int8Array, 5120],\n [Uint8Array, 5121],\n [Int16Array, 5122],\n [Uint16Array, 5123],\n [Uint32Array, 5125],\n [Float32Array, 5126],\n [Float64Array, 5130]\n];\nconst ARRAY_TO_COMPONENT_TYPE = new Map<TypedArrayConstructor, number>(\n ARRAY_CONSTRUCTOR_TO_WEBGL_CONSTANT\n);\n\nconst ATTRIBUTE_TYPE_TO_COMPONENTS = {\n SCALAR: 1,\n VEC2: 2,\n VEC3: 3,\n VEC4: 4,\n MAT2: 4,\n MAT3: 9,\n MAT4: 16\n};\n\nconst ATTRIBUTE_COMPONENT_TYPE_TO_BYTE_SIZE = {\n 5120: 1,\n 5121: 1,\n 5122: 2,\n 5123: 2,\n 5125: 4,\n 5126: 4\n};\n\nconst ATTRIBUTE_COMPONENT_TYPE_TO_ARRAY = {\n 5120: Int8Array,\n 5121: Uint8Array,\n 5122: Int16Array,\n 5123: Uint16Array,\n 5125: Uint32Array,\n 5126: Float32Array\n};\n\nexport function getAccessorTypeFromSize(size) {\n const type = TYPES[size - 1];\n return type || TYPES[0];\n}\n\nexport function getComponentTypeFromArray(typedArray) {\n const componentType = ARRAY_TO_COMPONENT_TYPE.get(typedArray.constructor);\n if (!componentType) {\n throw new Error('Illegal typed array');\n }\n return componentType;\n}\n\nexport function getAccessorArrayTypeAndLength(accessor, bufferView) {\n const ArrayType = ATTRIBUTE_COMPONENT_TYPE_TO_ARRAY[accessor.componentType];\n const components = ATTRIBUTE_TYPE_TO_COMPONENTS[accessor.type];\n const bytesPerComponent = ATTRIBUTE_COMPONENT_TYPE_TO_BYTE_SIZE[accessor.componentType];\n const length = accessor.count * components;\n const byteLength = accessor.count * components * bytesPerComponent;\n assert(byteLength >= 0 && byteLength <= bufferView.byteLength);\n return {ArrayType, length, byteLength};\n}\n","import type {\n GLTF,\n GLTFScene,\n GLTFNode,\n GLTFMesh,\n GLTFSkin,\n GLTFMaterial,\n GLTFAccessor,\n GLTFSampler,\n GLTFTexture,\n GLTFImage,\n GLTFBuffer,\n GLTFBufferView\n} from '../types/gltf-types';\n\nimport {getBinaryImageMetadata} from '@loaders.gl/images';\nimport {padToNBytes, copyToArray} from '@loaders.gl/loader-utils';\nimport {assert} from '../utils/assert';\nimport {\n getAccessorArrayTypeAndLength,\n getAccessorTypeFromSize,\n getComponentTypeFromArray\n} from '../gltf-utils/gltf-utils';\n\ntype GLTFWithBuffers = {\n json: GLTF;\n buffers: any[];\n binary?: ArrayBuffer;\n};\n\nconst DEFAULT_GLTF_JSON: GLTF = {\n asset: {\n version: '2.0',\n generator: 'loaders.gl'\n },\n buffers: []\n};\n\n/**\n * Class for structured access to GLTF data\n */\nexport default class GLTFScenegraph {\n // internal\n gltf: GLTFWithBuffers;\n sourceBuffers: any[];\n byteLength: number;\n\n constructor(gltf?: {json: GLTF; buffers?: any[]}) {\n // @ts-ignore\n this.gltf = gltf || {\n json: {...DEFAULT_GLTF_JSON},\n buffers: []\n };\n this.sourceBuffers = [];\n this.byteLength = 0;\n\n // Initialize buffers\n if (this.gltf.buffers && this.gltf.buffers[0]) {\n this.byteLength = this.gltf.buffers[0].byteLength;\n this.sourceBuffers = [this.gltf.buffers[0]];\n }\n }\n\n // Accessors\n\n get json(): GLTF {\n return this.gltf.json;\n }\n\n getApplicationData(key: string): {[key: string]: any} {\n // TODO - Data is already unpacked by GLBParser\n const data = this.json[key];\n return data;\n }\n\n getExtraData(key: string): {[key: string]: any} {\n // TODO - Data is already unpacked by GLBParser\n const extras = this.json.extras || {};\n return extras[key];\n }\n\n getExtension(extensionName: string): {[key: string]: any} | null {\n const isExtension = this.getUsedExtensions().find((name) => name === extensionName);\n const extensions = this.json.extensions || {};\n return isExtension ? extensions[extensionName] || true : null;\n }\n\n getRequiredExtension(extensionName: string): {[key: string]: any} | null {\n const isRequired = this.getRequiredExtensions().find((name) => name === extensionName);\n return isRequired ? this.getExtension(extensionName) : null;\n }\n\n getRequiredExtensions(): string[] {\n return this.json.extensionsRequired || [];\n }\n\n getUsedExtensions(): string[] {\n return this.json.extensionsUsed || [];\n }\n\n getObjectExtension(\n object: {[key: string]: any},\n extensionName: string\n ): {[key: string]: any} | null {\n const extensions = object.extensions || {};\n return extensions[extensionName];\n }\n\n getScene(index: number): GLTFScene {\n return this.getObject('scenes', index) as GLTFScene;\n }\n\n getNode(index: number): GLTFNode {\n return this.getObject('nodes', index) as GLTFNode;\n }\n\n getSkin(index: number): GLTFSkin {\n return this.getObject('skins', index) as GLTFSkin;\n }\n\n getMesh(index: number): GLTFMesh {\n return this.getObject('meshes', index) as GLTFMesh;\n }\n\n getMaterial(index: number): GLTFMaterial {\n return this.getObject('materials', index) as GLTFMaterial;\n }\n\n getAccessor(index: number): GLTFAccessor {\n return this.getObject('accessors', index) as GLTFAccessor;\n }\n\n // getCamera(index: number): object | null {\n // return null; // TODO: fix thi: object as null;\n // }\n\n getTexture(index: number): GLTFTexture {\n return this.getObject('textures', index) as GLTFTexture;\n }\n\n getSampler(index: number): GLTFSampler {\n return this.getObject('samplers', index) as GLTFSampler;\n }\n\n getImage(index: number): GLTFImage {\n return this.getObject('images', index) as GLTFImage;\n }\n\n getBufferView(index: number | object): GLTFBufferView {\n return this.getObject('bufferViews', index) as GLTFBufferView;\n }\n\n getBuffer(index: number): GLTFBuffer {\n return this.getObject('buffers', index) as GLTFBuffer;\n }\n\n getObject(array: string, index: number | object): object {\n // check if already resolved\n if (typeof index === 'object') {\n return index;\n }\n const object = this.json[array] && this.json[array][index];\n if (!object) {\n throw new Error(`glTF file error: Could not find ${array}[${index}]`); // eslint-disable-line\n }\n return object;\n }\n\n /**\n * Accepts buffer view index or buffer view object\n * @returns a `Uint8Array`\n */\n getTypedArrayForBufferView(bufferView: number | object): Uint8Array {\n bufferView = this.getBufferView(bufferView);\n // @ts-ignore\n const bufferIndex = bufferView.buffer;\n\n // Get hold of the arrayBuffer\n // const buffer = this.getBuffer(bufferIndex);\n const binChunk = this.gltf.buffers[bufferIndex];\n assert(binChunk);\n\n // @ts-ignore\n const byteOffset = (bufferView.byteOffset || 0) + binChunk.byteOffset;\n // @ts-ignore\n return new Uint8Array(binChunk.arrayBuffer, byteOffset, bufferView.byteLength);\n }\n\n /** Accepts accessor index or accessor object\n * @returns a typed array with type that matches the types\n */\n getTypedArrayForAccessor(accessor: number | object): any {\n // @ts-ignore\n accessor = this.getAccessor(accessor);\n // @ts-ignore\n const bufferView = this.getBufferView(accessor.bufferView);\n const buffer = this.getBuffer(bufferView.buffer);\n // @ts-ignore\n const arrayBuffer = buffer.data;\n\n // Create a new typed array as a view into the combined buffer\n const {ArrayType, length} = getAccessorArrayTypeAndLength(accessor, bufferView);\n // @ts-ignore\n const byteOffset = bufferView.byteOffset + accessor.byteOffset;\n return new ArrayType(arrayBuffer, byteOffset, length);\n }\n\n /** accepts accessor index or accessor object\n * returns a `Uint8Array`\n */\n getTypedArrayForImageData(image: number | object): Uint8Array {\n // @ts-ignore\n image = this.getAccessor(image);\n // @ts-ignore\n const bufferView = this.getBufferView(image.bufferView);\n const buffer = this.getBuffer(bufferView.buffer);\n // @ts-ignore\n const arrayBuffer = buffer.data;\n\n const byteOffset = bufferView.byteOffset || 0;\n return new Uint8Array(arrayBuffer, byteOffset, bufferView.byteLength);\n }\n\n // MODIFERS\n\n /**\n * Add an extra application-defined key to the top-level data structure\n */\n addApplicationData(key: string, data: object): GLTFScenegraph {\n this.json[key] = data;\n return this;\n }\n\n /**\n * `extras` - Standard GLTF field for storing application specific data\n */\n addExtraData(key: string, data: object): GLTFScenegraph {\n this.json.extras = this.json.extras || {};\n this.json.extras[key] = data;\n return this;\n }\n\n addObjectExtension(object: object, extensionName: string, data: object): GLTFScenegraph {\n // @ts-ignore\n object.extensions = object.extensions || {};\n // TODO - clobber or merge?\n // @ts-ignore\n object.extensions[extensionName] = data;\n this.registerUsedExtension(extensionName);\n return this;\n }\n\n setObjectExtension(object: object, extensionName: string, data: object): void {\n // @ts-ignore\n const extensions = object.extensions || {};\n extensions[extensionName] = data;\n // TODO - add to usedExtensions...\n }\n\n removeObjectExtension(object: object, extensionName: string): object {\n // @ts-ignore\n const extensions = object.extensions || {};\n const extension = extensions[extensionName];\n delete extensions[extensionName];\n return extension;\n }\n\n /**\n * Add to standard GLTF top level extension object, mark as used\n */\n addExtension(extensionName: string, extensionData: object = {}): object {\n assert(extensionData);\n this.json.extensions = this.json.extensions || {};\n this.json.extensions[extensionName] = extensionData;\n this.registerUsedExtension(extensionName);\n return extensionData;\n }\n\n /**\n * Standard GLTF top level extension object, mark as used and required\n */\n addRequiredExtension(extensionName, extensionData: object = {}): object {\n assert(extensionData);\n this.addExtension(extensionName, extensionData);\n this.registerRequiredExtension(extensionName);\n return extensionData;\n }\n\n /**\n * Add extensionName to list of used extensions\n */\n registerUsedExtension(extensionName: string): void {\n this.json.extensionsUsed = this.json.extensionsUsed || [];\n if (!this.json.extensionsUsed.find((ext) => ext === extensionName)) {\n this.json.extensionsUsed.push(extensionName);\n }\n }\n\n /**\n * Add extensionName to list of required extensions\n */\n registerRequiredExtension(extensionName: string): void {\n this.registerUsedExtension(extensionName);\n this.json.extensionsRequired = this.json.extensionsRequired || [];\n if (!this.json.extensionsRequired.find((ext) => ext === extensionName)) {\n this.json.extensionsRequired.push(extensionName);\n }\n }\n\n /**\n * Removes an extension from the top-level list\n */\n removeExtension(extensionName: string): void {\n if (this.json.extensionsRequired) {\n this._removeStringFromArray(this.json.extensionsRequired, extensionName);\n }\n if (this.json.extensionsUsed) {\n this._removeStringFromArray(this.json.extensionsUsed, extensionName);\n }\n if (this.json.extensions) {\n delete this.json.extensions[extensionName];\n }\n }\n\n /**\n * Set default scene which is to be displayed at load time\n */\n setDefaultScene(sceneIndex: number): void {\n this.json.scene = sceneIndex;\n }\n\n /**\n * @todo: add more properties for scene initialization:\n * name`, `extensions`, `extras`\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-scene\n */\n addScene(scene: {nodeIndices: number[]}): number {\n const {nodeIndices} = scene;\n this.json.scenes = this.json.scenes || [];\n this.json.scenes.push({nodes: nodeIndices});\n return this.json.scenes.length - 1;\n }\n\n /**\n * @todo: add more properties for node initialization:\n * `name`, `extensions`, `extras`, `camera`, `children`, `skin`, `rotation`, `scale`, `translation`, `weights`\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#node\n */\n addNode(node: {meshIndex: number; matrix: number[]}): number {\n const {meshIndex, matrix} = node;\n this.json.nodes = this.json.nodes || [];\n const nodeData = {mesh: meshIndex};\n if (matrix) {\n // @ts-ignore\n nodeData.matrix = matrix;\n }\n this.json.nodes.push(nodeData);\n return this.json.nodes.length - 1;\n }\n\n /** Adds a mesh to the json part */\n addMesh(mesh: {attributes: object; indices: object; material: number; mode: number}): number {\n const {attributes, indices, material, mode = 4} = mesh;\n const accessors = this._addAttributes(attributes);\n\n const glTFMesh = {\n primitives: [\n {\n attributes: accessors,\n mode\n }\n ]\n };\n\n if (indices) {\n const indicesAccessor = this._addIndices(indices);\n // @ts-ignore\n glTFMesh.primitives[0].indices = indicesAccessor;\n }\n\n if (Number.isFinite(material)) {\n // @ts-ignore\n glTFMesh.primitives[0].material = material;\n }\n\n this.json.meshes = this.json.meshes || [];\n this.json.meshes.push(glTFMesh);\n return this.json.meshes.length - 1;\n }\n\n addPointCloud(attributes: object): number {\n // @ts-ignore\n const accessorIndices = this._addAttributes(attributes);\n\n const glTFMesh = {\n primitives: [\n {\n attributes: accessorIndices,\n mode: 0 // GL.POINTS\n }\n ]\n };\n\n this.json.meshes = this.json.meshes || [];\n this.json.meshes.push(glTFMesh);\n return this.json.meshes.length - 1;\n }\n\n /**\n * Adds a binary image. Builds glTF \"JSON metadata\" and saves buffer reference\n * Buffer will be copied into BIN chunk during \"pack\"\n * Currently encodes as glTF image\n * @param imageData\n * @param mimeType\n */\n addImage(imageData: any, mimeTypeOpt?: string): number {\n // If image is referencing a bufferView instead of URI, mimeType must be defined:\n // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#images\n // \"a reference to a bufferView; in that case mimeType must be defined.\"\n const metadata = getBinaryImageMetadata(imageData);\n const mimeType = mimeTypeOpt || metadata?.mimeType;\n\n const bufferViewIndex = this.addBufferView(imageData);\n\n const glTFImage = {\n bufferView: bufferViewIndex,\n mimeType\n };\n\n this.json.images = this.json.images || [];\n this.json.images.push(glTFImage);\n return this.json.images.length - 1;\n }\n\n /**\n * Add one untyped source buffer, create a matching glTF `bufferView`, and return its index\n * @param buffer\n */\n addBufferView(buffer: any): number {\n const byteLength = buffer.byteLength;\n assert(Number.isFinite(byteLength));\n\n // Add this buffer to the list of buffers to be written to the body.\n this.sourceBuffers = this.sourceBuffers || [];\n this.sourceBuffers.push(buffer);\n\n const glTFBufferView = {\n buffer: 0,\n // Write offset from the start of the binary body\n byteOffset: this.byteLength,\n byteLength\n };\n\n // We've now added the contents to the body, so update the total length\n // Every sub-chunk needs to be 4-byte align ed\n this.byteLength += padToNBytes(byteLength, 4);\n\n // Add a bufferView indicating start and length of this binary sub-chunk\n this.json.bufferViews = this.json.bufferViews || [];\n this.json.bufferViews.push(glTFBufferView);\n return this.json.bufferViews.length - 1;\n }\n\n /**\n * Adds an accessor to a bufferView\n * @param bufferViewIndex\n * @param accessor\n */\n addAccessor(bufferViewIndex: number, accessor: object): number {\n const glTFAccessor = {\n bufferView: bufferViewIndex,\n // @ts-ignore\n type: getAccessorTypeFromSize(accessor.size),\n // @ts-ignore\n componentType: accessor.componentType,\n // @ts-ignore\n count: accessor.count,\n // @ts-ignore\n max: accessor.max,\n // @ts-ignore\n min: accessor.min\n };\n\n this.json.accessors = this.json.accessors || [];\n this.json.accessors.push(glTFAccessor);\n return this.json.accessors.length - 1;\n }\n\n /**\n * Add a binary buffer. Builds glTF \"JSON metadata\" and saves buffer reference\n * Buffer will be copied into BIN chunk during \"pack\"\n * Currently encodes buffers as glTF accessors, but this could be optimized\n * @param sourceBuffer\n * @param accessor\n */\n addBinaryBuffer(sourceBuffer: any, accessor: object = {size: 3}): number {\n const bufferViewIndex = this.addBufferView(sourceBuffer);\n // @ts-ignore\n let minMax = {min: accessor.min, max: accessor.max};\n if (!minMax.min || !minMax.max) {\n // @ts-ignore\n minMax = this._getAccessorMinMax(sourceBuffer, accessor.size);\n }\n\n const accessorDefaults = {\n // @ts-ignore\n size: accessor.size,\n componentType: getComponentTypeFromArray(sourceBuffer),\n // @ts-ignore\n count: Math.round(sourceBuffer.length / accessor.size),\n min: minMax.min,\n max: minMax.max\n };\n\n return this.addAccessor(bufferViewIndex, Object.assign(accessorDefaults, accessor));\n }\n\n /**\n * Adds a texture to the json part\n * @todo: add more properties for texture initialization\n * `sampler`, `name`, `extensions`, `extras`\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#texture\n */\n addTexture(texture: {imageIndex: number}): number {\n const {imageIndex} = texture;\n const glTFTexture = {\n source: imageIndex\n };\n\n this.json.textures = this.json.textures || [];\n this.json.textures.push(glTFTexture);\n return this.json.textures.length - 1;\n }\n\n /** Adds a material to the json part */\n addMaterial(pbrMaterialInfo: Object): number {\n this.json.materials = this.json.materials || [];\n this.json.materials.push(pbrMaterialInfo);\n return this.json.materials.length - 1;\n }\n\n /** Pack the binary chunk */\n createBinaryChunk(): void {\n // Encoder expects this array undefined or empty\n this.gltf.buffers = [];\n\n // Allocate total array\n const totalByteLength = this.byteLength;\n const arrayBuffer = new ArrayBuffer(totalByteLength);\n const targetArray = new Uint8Array(arrayBuffer);\n\n // Copy each array into\n let dstByteOffset = 0;\n for (const sourceBuffer of this.sourceBuffers || []) {\n dstByteOffset = copyToArray(sourceBuffer, targetArray, dstByteOffset);\n }\n\n // Update the glTF BIN CHUNK byte length\n if (this.json?.buffers?.[0]) {\n this.json.buffers[0].byteLength = totalByteLength;\n } else {\n this.json.buffers = [{byteLength: totalByteLength}];\n }\n\n // Save generated arrayBuffer\n this.gltf.binary = arrayBuffer;\n\n // Put arrayBuffer to sourceBuffers for possible additional writing data in the chunk\n this.sourceBuffers = [arrayBuffer];\n }\n\n // PRIVATE\n\n _removeStringFromArray(array, string) {\n let found = true;\n while (found) {\n const index = array.indexOf(string);\n if (index > -1) {\n array.splice(index, 1);\n } else {\n found = false;\n }\n }\n }\n\n /**\n * Add attributes to buffers and create `attributes` object which is part of `mesh`\n */\n _addAttributes(attributes = {}) {\n const result = {};\n for (const attributeKey in attributes) {\n const attributeData = attributes[attributeKey];\n const attrName = this._getGltfAttributeName(attributeKey);\n const accessor = this.addBinaryBuffer(attributeData.value, attributeData);\n result[attrName] = accessor;\n }\n return result;\n }\n\n /**\n * Add indices to buffers\n */\n _addIndices(indices) {\n return this.addBinaryBuffer(indices, {size: 1});\n }\n\n /**\n * Deduce gltf specific attribue name from input attribute name\n */\n _getGltfAttributeName(attributeName) {\n switch (attributeName.toLowerCase()) {\n case 'position':\n case 'positions':\n case 'vertices':\n return 'POSITION';\n case 'normal':\n case 'normals':\n return 'NORMAL';\n case 'color':\n case 'colors':\n return 'COLOR_0';\n case 'texcoord':\n case 'texcoords':\n return 'TEXCOORD_0';\n default:\n return attributeName;\n }\n }\n\n /**\n * Calculate `min` and `max` arrays of accessor according to spec:\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-accessor\n */\n _getAccessorMinMax(buffer, size) {\n const result = {min: null, max: null};\n if (buffer.length < size) {\n return result;\n }\n // @ts-ignore\n result.min = [];\n // @ts-ignore\n result.max = [];\n const initValues = buffer.subarray(0, size);\n for (const value of initValues) {\n // @ts-ignore\n result.min.push(value);\n // @ts-ignore\n result.max.push(value);\n }\n\n for (let index = size; index < buffer.length; index += size) {\n for (let componentIndex = 0; componentIndex < size; componentIndex++) {\n // @ts-ignore\n result.min[0 + componentIndex] = Math.min(\n // @ts-ignore\n result.min[0 + componentIndex],\n buffer[index + componentIndex]\n );\n // @ts-ignore\n result.max[0 + componentIndex] = Math.max(\n // @ts-ignore\n result.max[0 + componentIndex],\n buffer[index + componentIndex]\n );\n }\n }\n return result;\n }\n}\n","// import type {TypedArray} from '../types/loader-utils';\nimport type {GLTFAccessor} from '../types/gltf-types';\n// TODO - remove\nimport {getAccessorTypeFromSize, getComponentTypeFromArray} from './gltf-utils';\n\n// Returns a fresh attributes object with glTF-standardized attributes names\n// Attributes that cannot be identified will not be included\n// Removes `indices` if present, as it should be stored separately from the attributes\nexport function getGLTFAccessors(attributes): {[key: string]: GLTFAccessor} {\n const accessors = {};\n for (const name in attributes) {\n const attribute = attributes[name];\n if (name !== 'indices') {\n const glTFAccessor = getGLTFAccessor(attribute);\n accessors[name] = glTFAccessor;\n }\n }\n return accessors;\n}\n\n// Fix up a single accessor.\n// Input: typed array or a partial accessor object\n// Return: accessor object\nexport function getGLTFAccessor(attribute) {\n const {buffer, size, count} = getAccessorData(attribute);\n\n const glTFAccessor: GLTFAccessor = {\n // glTF Accessor values\n // TODO: Instead of a bufferView index we could have an actual buffer (typed array)\n // bufferView: null,\n // TODO: Deprecate `value` in favor of bufferView?\n // @ts-ignore\n value: buffer,\n size, // Decoded `type` (e.g. SCALAR)\n\n byteOffset: 0,\n count,\n type: getAccessorTypeFromSize(size),\n componentType: getComponentTypeFromArray(buffer)\n };\n\n return glTFAccessor;\n}\n\n// export function getGLTFAttribute(data, gltfAttributeName): GLTFAccessor {\n// return data.attributes[data.glTFAttributeMap[gltfAttributeName]];\n// }\n\nfunction getAccessorData(attribute) {\n let buffer = attribute;\n let size = 1;\n let count = 0;\n\n if (attribute && attribute.value) {\n buffer = attribute.value;\n size = attribute.size || 1;\n }\n\n if (buffer) {\n if (!ArrayBuffer.isView(buffer)) {\n buffer = toTypedArray(buffer, Float32Array);\n }\n count = buffer.length / size;\n }\n\n return {buffer, size, count};\n}\n\n// Convert non-typed arrays to arrays of specified format\nfunction toTypedArray(array, ArrayType, convertTypedArrays = false) {\n if (!array) {\n return null;\n }\n if (Array.isArray(array)) {\n return new ArrayType(array);\n }\n if (convertTypedArrays && !(array instanceof ArrayType)) {\n return new ArrayType(array);\n }\n return array;\n}\n","// https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_draco_mesh_compression\n// Only TRIANGLES: 0x0004 and TRIANGLE_STRIP: 0x0005 are supported\n\n/* eslint-disable camelcase */\nimport type {GLTF, GLTFAccessor, GLTFMeshPrimitive} from '../types/gltf-types';\nimport type {GLTFLoaderOptions} from '../../gltf-loader';\n\nimport type {LoaderContext} from '@loaders.gl/loader-utils';\nimport {DracoLoader} from '@loaders.gl/draco';\nimport {DracoLoaderOptions, DracoMeshData} from '@loaders.gl/draco';\nimport {sliceArrayBuffer} from '@loaders.gl/loader-utils';\nimport {default as Scenegraph} from '../api/gltf-scenegraph';\nimport {KHR_DRACO_MESH_COMPRESSION} from '../gltf-utils/gltf-constants';\nimport {getGLTFAccessors, getGLTFAccessor} from '../gltf-utils/gltf-attribute-utils';\n\n// Note: We have a \"soft dependency\" on DracoWriter to avoid bundling it when not needed\nexport async function decode(\n gltfData: {json: GLTF},\n options: GLTFLoaderOptions,\n context: LoaderContext\n): Promise<void> {\n if (!options?.gltf?.decompressMeshes) {\n return;\n }\n\n const scenegraph = new Scenegraph(gltfData);\n const promises: Promise<void>[] = [];\n for (const primitive of makeMeshPrimitiveIterator(scenegraph)) {\n if (scenegraph.getObjectExtension(primitive, KHR_DRACO_MESH_COMPRESSION)) {\n promises.push(decompressPrimitive(scenegraph, primitive, options, context));\n }\n }\n\n // Decompress meshes in parallel\n await Promise.all(promises);\n\n // We have now decompressed all primitives, so remove the top-level extensions\n scenegraph.removeExtension(KHR_DRACO_MESH_COMPRESSION);\n}\n\nexport function encode(gltfData, options: GLTFLoaderOptions = {}): void {\n const scenegraph = new Scenegraph(gltfData);\n\n for (const mesh of scenegraph.json.meshes || []) {\n // eslint-disable-next-line camelcase\n // @ts-ignore\n compressMesh(mesh, options);\n // NOTE: Only add the extension if something was actually compressed\n scenegraph.addRequiredExtension(KHR_DRACO_MESH_COMPRESSION);\n }\n}\n\n// DECODE\n\n// Unpacks one mesh primitive and removes the extension from the primitive\n// DracoDecoder needs to be imported and registered by app\n// Returns: Promise that resolves when all pending draco decoder jobs for this mesh complete\n\n// TODO - Implement fallback behavior per KHR_DRACO_MESH_COMPRESSION spec\n\nasync function decompressPrimitive(\n scenegraph: Scenegraph,\n primitive: GLTFMeshPrimitive,\n options: GLTFLoaderOptions,\n context: LoaderContext\n): Promise<void> {\n const dracoExtension = scenegraph.getObjectExtension(primitive, KHR_DRACO_MESH_COMPRESSION);\n if (!dracoExtension) {\n return;\n }\n\n const buffer = scenegraph.getTypedArrayForBufferView(dracoExtension.bufferView);\n // TODO - parse does not yet deal well with byte offsets embedded in typed arrays. Copy buffer\n // TODO - remove when `parse` is fixed to handle `byteOffset`s\n const bufferCopy = sliceArrayBuffer(buffer.buffer, buffer.byteOffset); // , buffer.byteLength);\n\n const {parse} = context;\n const dracoOptions: DracoLoaderOptions = {...options};\n\n // TODO - remove hack: The entire tileset might be included, too expensive to serialize\n delete dracoOptions['3d-tiles'];\n const decodedData = (await parse(\n bufferCopy,\n DracoLoader,\n dracoOptions,\n context\n )) as DracoMeshData;\n\n const decodedAttributes: {[key: string]: GLTFAccessor} = getGLTFAccessors(decodedData.attributes);\n\n // Restore min/max values\n for (const [attributeName, decodedAttribute] of Object.entries(decodedAttributes)) {\n if (attributeName in primitive.attributes) {\n const accessorIndex: number = primitive.attributes[attributeName];\n const accessor = scenegraph.getAccessor(accessorIndex);\n if (accessor?.min && accessor?.max) {\n decodedAttribute.min = accessor.min;\n decodedAttribute.max = accessor.max;\n }\n }\n }\n\n // @ts-ignore\n primitive.attributes = decodedAttributes;\n if (decodedData.indices) {\n // @ts-ignore\n primitive.indices = getGLTFAccessor(decodedData.indices);\n }\n\n // Extension has been processed, delete it\n // delete primitive.extensions[KHR_DRACO_MESH_COMPRESSION];\n\n checkPrimitive(primitive);\n}\n\n// ENCODE\n\n// eslint-disable-next-line max-len\n// Only TRIANGLES: 0x0004 and TRIANGLE_STRIP: 0x0005 are supported\nfunction compressMesh(attributes, indices, mode: number = 4, options, context: LoaderContext) {\n if (!options.DracoWriter) {\n throw new Error('options.gltf.DracoWriter not provided');\n }\n\n // TODO - use DracoWriter using encode w/ registered DracoWriter...\n const compressedData = options.DracoWriter.encodeSync({attributes});\n\n // Draco compression may change the order and number of vertices in a mesh.\n // To satisfy the requirement that accessors properties be correct for both\n // compressed and uncompressed data, generators should create uncompressed\n // attributes and indices using data that has been decompressed from the Draco buffer,\n // rather than the original source data.\n // @ts-ignore TODO this needs to be fixed\n const decodedData = context?.parseSync?.({attributes});\n const fauxAccessors = options._addFauxAttributes(decodedData.attributes);\n\n const bufferViewIndex = options.addBufferView(compressedData);\n\n const glTFMesh = {\n primitives: [\n {\n attributes: fauxAccessors, // TODO - verify with spec\n mode, // GL.POINTS\n extensions: {\n [KHR_DRACO_MESH_COMPRESSION]: {\n bufferView: bufferViewIndex,\n attributes: fauxAccessors // TODO - verify with spec\n }\n }\n }\n ]\n };\n\n return glTFMesh;\n}\n\n// UTILS\n\nfunction checkPrimitive(primitive: GLTFMeshPrimitive) {\n if (!primitive.attributes && Object.keys(primitive.attributes).length > 0) {\n throw new Error('glTF: Empty primitive detected: Draco decompression failure?');\n }\n}\n\nfunction* makeMeshPrimitiveIterator(scenegraph) {\n for (const mesh of scenegraph.json.meshes || []) {\n for (const primitive of mesh.primitives) {\n yield primitive;\n }\n }\n}\n","// GLTF 1.0 extensions\nexport const KHR_BINARY_GLTF = 'KHR_binary_glTF';\n\n// GLTF 2.0 extensions\nexport const KHR_DRACO_MESH_COMPRESSION = 'KHR_draco_mesh_compression';\nexport const KHR_LIGHTS_PUNCTUAL = 'KHR_lights_punctual';\nexport const KHR_MATERIALS_UNLIT = 'KHR_materials_unlit';\nexport const KHR_TECHNIQUES_WEBGL = 'KHR_techniques_webgl';\n\n// External extensions\nexport const EXT_MESHOPT_COMPRESSION = 'EXT_meshopt_compression';\n\nconst COMPONENTS = {\n SCALAR: 1,\n VEC2: 2,\n VEC3: 3,\n VEC4: 4,\n MAT2: 4,\n MAT3: 9,\n MAT4: 16\n};\n\nconst BYTES = {\n 5120: 1, // BYTE\n 5121: 1, // UNSIGNED_BYTE\n 5122: 2, // SHORT\n 5123: 2, // UNSIGNED_SHORT\n 5125: 4, // UNSIGNED_INT\n 5126: 4 // FLOAT\n};\n\n// ENUM LOOKUP\n\nexport function getBytesFromComponentType(componentType) {\n return BYTES[componentType];\n}\n\nexport function getSizeFromAccessorType(type) {\n return COMPONENTS[type];\n}\n\nexport function getGLEnumFromSamplerParameter(parameter) {\n const GL_TEXTURE_MAG_FILTER = 0x2800;\n const GL_TEXTURE_MIN_FILTER = 0x2801;\n const GL_TEXTURE_WRAP_S = 0x2802;\n const GL_TEXTURE_WRAP_T = 0x2803;\n\n const PARAMETER_MAP = {\n magFilter: GL_TEXTURE_MAG_FILTER,\n minFilter: GL_TEXTURE_MIN_FILTER,\n wrapS: GL_TEXTURE_WRAP_S,\n wrapT: GL_TEXTURE_WRAP_T\n };\n\n return PARAMETER_MAP[parameter];\n}\n","// GLTF EXTENSION: KHR_materials_unlit\n// https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n\nimport type {GLTF} from '../types/gltf-types';\n\nimport GLTFScenegraph from '../api/gltf-scenegraph';\nimport {KHR_MATERIALS_UNLIT} from '../gltf-utils/gltf-constants';\n\nexport async function decode(gltfData: {json: GLTF}): Promise<void> {\n const gltfScenegraph = new GLTFScenegraph(gltfData);\n const {json} = gltfScenegraph;\n\n // Remove the top-level extension\n gltfScenegraph.removeExtension(KHR_MATERIALS_UNLIT);\n\n // Any nodes that have the extension, add lights field pointing to light object\n // and remove the extension\n for (const material of json.materials || []) {\n const extension = material.extensions && material.extensions.KHR_materials_unlit;\n if (extension) {\n // @ts-ignore TODO\n material.unlit = true;\n }\n gltfScenegraph.removeObjectExtension(material, KHR_MATERIALS_UNLIT);\n }\n}\n\nexport function encode(gltfData) {\n const gltfScenegraph = new GLTFScenegraph(gltfData);\n const {json} = gltfScenegraph;\n\n // Any nodes that have lights field pointing to light object\n // add the extension\n // @ts-ignore\n if (gltfScenegraph.materials) {\n for (const material of json.materials || []) {\n // @ts-ignore\n if (material.unlit) {\n // @ts-ignore\n delete material.unlit;\n gltfScenegraph.addObjectExtension(material, KHR_MATERIALS_UNLIT, {});\n gltfScenegraph.addExtension(KHR_MATERIALS_UNLIT);\n }\n }\n }\n}\n","// GLTF EXTENSION: KHR_lights_punctual\n// https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n\nimport type {GLTF} from '../types/gltf-types';\n\nimport {assert} from '../utils/assert';\nimport GLTFScenegraph from '../api/gltf-scenegraph';\nimport {KHR_LIGHTS_PUNCTUAL} from '../gltf-utils/gltf-constants';\n\nexport async function decode(gltfData: {json: GLTF}): Promise<void> {\n const gltfScenegraph = new GLTFScenegraph(gltfData);\n const {json} = gltfScenegraph;\n\n // Move the light array out of the extension and remove the extension\n const extension = gltfScenegraph.getExtension(KHR_LIGHTS_PUNCTUAL);\n if (extension) {\n // @ts-ignore\n gltfScenegraph.json.lights = extension.lights;\n gltfScenegraph.removeExtension(KHR_LIGHTS_PUNCTUAL);\n }\n\n // Any nodes that have the extension, add lights field pointing to light object\n // and remove the extension\n for (const node of json.nodes || []) {\n const nodeExtension = gltfScenegraph.getObjectExtension(node, KHR_LIGHTS_PUNCTUAL);\n if (nodeExtension) {\n // @ts-ignore\n node.light = nodeExtension.light;\n }\n gltfScenegraph.removeObjectExtension(node, KHR_LIGHTS_PUNCTUAL);\n }\n}\n\n// Move the light ar ray out of the extension and remove the extension\nexport async function encode(gltfData): Promise<void> {\n const gltfScenegraph = new GLTFScenegraph(gltfData);\n const {json} = gltfScenegraph;\n\n // @ts-ignore\n if (json.lights) {\n const extension = gltfScenegraph.addExtension(KHR_LIGHTS_PUNCTUAL);\n // @ts-ignore\n assert(!extension.lights);\n // @ts-ignore\n extension.lights = json.lights;\n // @ts-ignore\n delete json.lights;\n }\n\n // Any nodes that have lights field pointing to light object\n // add the extension\n // @ts-ignore\n if (gltfScenegraph.json.lights) {\n // @ts-ignore\n for (const light of gltfScenegraph.json.lights) {\n const node = light.node;\n gltfScenegraph.addObjectExtension(node, KHR_LIGHTS_PUNCTUAL, light);\n }\n // @ts-ignore\n delete gltfScenegraph.json.lights;\n }\n}\n","// GLTF EXTENSION: KHR_techniques_webgl\n// https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_techniques_webgl\n\nimport type {GLTF} from '../types/gltf-types';\n\nimport GLTFScenegraph from '../api/gltf-scenegraph';\nimport {KHR_TECHNIQUES_WEBGL} from '../gltf-utils/gltf-constants';\n\nexport async function decode(gltfData: {json: GLTF}): Promise<void> {\n const gltfScenegraph = new GLTFScenegraph(gltfData);\n const {json} = gltfScenegraph;\n\n const extension = gltfScenegraph.getExtension(KHR_TECHNIQUES_WEBGL);\n if (extension) {\n const techniques = resolveTechniques(extension, gltfScenegraph);\n\n for (const material of json.materials || []) {\n const materialExtension = gltfScenegraph.getObjectExtension(material, KHR_TECHNIQUES_WEBGL);\n if (materialExtension) {\n // @ts-ignore TODO\n material.technique = Object.assign(\n {},\n materialExtension,\n // @ts-ignore\n techniques[materialExtension.technique]\n );\n // @ts-ignore TODO\n material.technique.values = resolveValues(material.technique, gltfScenegraph);\n }\n gltfScenegraph.removeObjectExtension(material, KHR_TECHNIQUES_WEBGL);\n }\n\n gltfScenegraph.removeExtension(KHR_TECHNIQUES_WEBGL);\n }\n}\n// eslint-disable-next-line\nexport async function encode(gltfData, options): Promise<void> {\n // TODO\n}\n\nfunction resolveTechniques(\n techniquesExtension: {[key: string]: any},\n // programs: {[key: string]: any}[],\n // shaders: {[key: string]: any}[],\n // techniques: {[key: string]: any}[]\n gltfScenegraph\n) {\n const {programs = [], shaders = [], techniques = []} = techniquesExtension;\n const textDecoder = new TextDecoder();\n\n shaders.forEach((shader) => {\n if (Number.isFinite(shader.bufferView)) {\n shader.code = textDecoder.decode(\n gltfScenegraph.getTypedArrayForBufferView(shader.bufferView)\n );\n } else {\n // TODO: handle URI shader\n throw new Error('KHR_techniques_webgl: no shader code');\n }\n });\n\n programs.forEach((program) => {\n program.fragmentShader = shaders[program.fragmentShader];\n program.vertexShader = shaders[program.vertexShader];\n });\n\n techniques.forEach((technique) => {\n technique.program = programs[technique.program];\n });\n\n return techniques;\n}\n\nfunction resolveValues(technique, gltfScenegraph) {\n const values = Object.assign({}, technique.values);\n\n // merge values from uniforms\n Object.keys(technique.uniforms || {}).forEach((uniform) => {\n if (technique.uniforms[uniform].value && !(uniform in values)) {\n values[uniform] = technique.uniforms[uniform].value;\n }\n });\n\n // resolve textures\n Object.keys(values).forEach((uniform) => {\n if (typeof values[uniform] === 'object' && values[uniform].index !== undefined) {\n // Assume this is a texture\n // TODO: find if there are any other types that can be referenced\n values[uniform].texture = gltfScenegraph.getTexture(values[uniform].index);\n }\n });\n\n return values;\n}\n","/* eslint-disable camelcase */\nimport {GLTF} from '../types/gltf-types';\nimport type {GLTFLoaderOptions} from '../../gltf-loader';\n\n// GLTF 1.0 extensions (read only)\n// import * as KHR_binary_gltf from './KHR_draco_mesh_compression';\n\n// GLTF 2.0 extensions (read/write)\nimport * as KHR_draco_mesh_compression from './KHR_draco_mesh_compression';\nimport * as KHR_materials_unlit from './KHR_materials_unlit';\nimport * as KHR_lights_punctual from './KHR_lights_punctual';\nimport * as KHR_techniques_webgl from './KHR_techniques_webgl';\n\ntype GLTFExtensionPlugin = {\n decode: (gltfData: {json: GLTF}, options: GLTFLoaderOptions, context) => Promise<void>;\n\n encode: (gltfData: {json: GLTF}, options: GLTFLoaderOptions) => void;\n};\n\n/**\n * List of extensions processed by the GLTFLoader\n * Note that may extensions can only be handled on the rendering stage and are left out here\n * These are just extensions that can be handled fully or partially during loading.\n */\nexport const EXTENSIONS: {[extensionName: string]: GLTFExtensionPlugin} = {\n // 1.0\n // KHR_binary_gltf is handled separately - must be processed before other parsing starts\n // KHR_binary_gltf,\n\n // 2.0\n KHR_draco_mesh_compression,\n KHR_materials_unlit,\n KHR_lights_punctual,\n KHR_techniques_webgl\n};\n\nexport async function decodeExtensions(gltf, options: GLTFLoaderOptions = {}, context?) {\n for (const extensionName in EXTENSIONS) {\n const excludes = options?.gltf?.excludeExtensions || {};\n const exclude = extensionName in excludes && !excludes[extensionName];\n if (!exclude) {\n const extension = EXTENSIONS[extensionName];\n // Note: We decode async extensions sequentially, this might not be necessary\n // Currently we only have Draco, but when we add Basis we may revisit\n await extension.decode(gltf, options, context);\n }\n }\n}\n","/* eslint-disable camelcase */\nimport * as KHR_binary_glTF from '../extensions/KHR_binary_gltf';\n\n// Binary format changes (mainly implemented by GLBLoader)\n// https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF\n\n// JSON format changes:\n// https://github.com/khronosgroup/gltf/issues/605\n\n// - [x] Top-level JSON objects are arrays now\n// - [ ] Removed indirection from animation: sampler now refers directly to accessors, #712\n// - [ ] material.parameter.value and technique.parameter.value must be an array, #690\n// - [ ] Node can have only one mesh #821\n// - [ ] Added reqs on JSON encoding\n// - [ ] Added reqs on binary data alignment #802 (comment)\n\n// Additions:\n// - [ ] Added accessor.normalized, #691, #706\n// - [ ] Added glExtensionsUsed property and 5125 (UNSIGNED_INT) accessor.componentType value, #619\n// - [ ] Added extensionsRequired property, #720, #721\n// - [ ] Added \"STEP\" as valid animation.sampler.interpolation value, #712\n\n// Removals:\n// - [x] Removed buffer.type, #786, #629\n// - [ ] Removed revision number from profile.version, #709\n// - [ ] Removed technique.functions.scissor and removed 3089 (SCISSOR_TEST) as a valid value for technique.states.enable, #681\n// - [ ] Techniques, programs, and shaders were moved out to KHR_technique_webgl extension.\n\n// Other edits:\n// - [x] asset is now required, #642\n// - [ ] buffer.byteLength and bufferView.byteLength are now required, #560.\n// - [ ] accessor.min and accessor.max are now required, #593, and clarified that the JSON value and binary data must be the same, #628.\n// - [ ] Clarified animation.sampler and animation.channel restrictions, #712\n// - [ ] skin.inverseBindMatrices is now optional, #461.\n// - [ ] Attribute parameters can't have a value defined in the technique or parameter, #563 (comment).\n// - [ ] Only TEXCOORD and COLOR attribute semantics can be written in the form [semantic]_[set_index], #563 (comment).\n// - [ ] TEXCOORD and COLOR attribute semantics must be written in the form [semantic]_[set_index], e.g., just TEXCOORD should be TEXCOORD_0, and just COLOR should be COLOR_0, #649\n// - [ ] camera.perspective.aspectRatio and camera.perspective.yfov must now be > 0, not >= 0, #563 (comment).\n// - [ ] Application-specific parameter semantics must start with an underscore, e.g., _TEMPERATURE and _SIMULATION_TIME, #563 (comment).\n// - [ ] Properties in technique.parameters must be defined in technique.uniforms or technique.attributes,\n\n// #563 (comment).\n// - [ ] technique.parameter.count can only be defined when the semantic is JOINTMATRIX or an application-specific semantic is used. It can never be defined for attribute parameters; only uniforms, d2f6945\n// - [ ] technique.parameter.semantic is required when the parameter is an attribute, 28e113d\n// - [ ] Mesh-only models are allowed, e.g., without materials, #642\n// - [ ] Skeleton hierarchies (nodes containing jointName) must be separated from non-skeleton hierarchies., #647\n// - [ ] technique.states.functions.blendColor and technique.states.functions.depthRange parameters now must match WebGL function min/max, #707\n\nconst GLTF_ARRAYS = {\n accessors: 'accessor',\n animations: 'animation',\n buffers: 'buffer',\n bufferViews: 'bufferView',\n images: 'image',\n materials: 'material',\n meshes: 'mesh',\n nodes: 'node',\n samplers: 'sampler',\n scenes: 'scene',\n skins: 'skin',\n textures: 'texture'\n};\n\nconst GLTF_KEYS = {\n accessor: 'accessors',\n animations: 'animation',\n buffer: 'buffers',\n bufferView: 'bufferViews',\n image: 'images',\n material: 'materials',\n mesh: 'meshes',\n node: 'nodes',\n sampler: 'samplers',\n scene: 'scenes',\n skin: 'skins',\n texture: 'textures'\n};\n\n/**\n * Converts (normalizes) glTF v1 to v2\n */\nclass GLTFV1Normalizer {\n constructor(gltf) {\n this.idToIndexMap = {\n animations: {},\n accessors: {},\n buffers: {},\n bufferViews: {},\n images: {},\n materials: {},\n meshes: {},\n nodes: {},\n samplers: {},\n scenes: {},\n skins: {},\n textures: {}\n };\n }\n\n /**\n * Convert (normalize) glTF < 2.0 to glTF 2.0\n * @param gltf - object with json and binChunks\n * @param options\n * @param options normalize Whether to actually normalize\n */\n normalize(gltf, options) {\n this.json = gltf.json;\n const json = gltf.json;\n\n // Check version\n switch (json.asset && json.asset.version) {\n // We are converting to v2 format. Return if there is nothing to do\n case '2.0':\n return;\n\n // This class is written to convert 1.0\n case undefined:\n case '1.0':\n break;\n\n default:\n // eslint-disable-next-line no-undef, no-console\n console.warn(`glTF: Unknown version ${json.asset.version}`);\n return;\n }\n\n if (!options.normalize) {\n // We are still missing a few conversion tricks, remove once addressed\n throw new Error('glTF v1 is not supported.');\n }\n\n // eslint-disable-next-line no-undef, no-console\n console.warn('Converting glTF v1 to glTF v2 format. This is experimental and may fail.');\n\n this._addAsset(json);\n\n // In glTF2 top-level fields are Arrays not Object maps\n this._convertTopLevelObjectsToArrays(json);\n\n // Extract bufferView indices for images\n // (this extension needs to be invoked early in the normalization process)\n KHR_binary_glTF.decode(gltf);\n\n // Convert object references from ids to indices\n this._convertObjectIdsToArrayIndices(json);\n\n this._updateObjects(json);\n\n this._updateMaterial(json);\n }\n\n // asset is now required, #642 https://github.com/KhronosGroup/glTF/issues/639\n _addAsset(json) {\n json.asset = json.asset || {};\n // We are normalizing to glTF v2, so change version to \"2.0\"\n json.asset.version = '2.0';\n json.asset.generator = json.asset.generator || 'Normalized to glTF 2.0 by loaders.gl';\n }\n\n _convertTopLevelObjectsToArrays(json) {\n // TODO check that all arrays are covered\n for (const arrayName in GLTF_ARRAYS) {\n this._convertTopLevelObjectToArray(json, arrayName);\n }\n }\n\n /** Convert one top level object to array */\n _convertTopLevelObjectToArray(json, mapName) {\n const objectMap = json[mapName];\n if (!objectMap || Array.isArray(objectMap)) {\n return;\n }\n\n // Rewrite the top-level field as an array\n json[mapName] = [];\n // Copy the map key into object.id\n for (const id in objectMap) {\n const object = objectMap[id];\n object.id = object.id || id; // Mutates the loaded object\n const index = json[mapName].length;\n json[mapName].push(object);\n this.idToIndexMap[mapName][id] = index;\n }\n }\n\n /** Go through all objects in all top-level arrays and replace ids with indices */\n _convertObjectIdsToArrayIndices(json) {\n for (const arrayName in GLTF_ARRAYS) {\n this._convertIdsToIndices(json, arrayName);\n }\n if ('scene' in json) {\n json.scene = this._convertIdToIndex(json.scene, 'scene');\n }\n\n // Convert any index references that are not using array names\n\n // texture.source (image)\n for (const texture of json.textures) {\n this._convertTextureIds(texture);\n }\n for (const mesh of json.meshes) {\n this._convertMeshIds(mesh);\n }\n for (const node of json.nodes) {\n this._convertNodeIds(node);\n }\n for (const node of json.scenes) {\n this._convertSceneIds(node);\n }\n }\n\n _convertTextureIds(texture) {\n if (texture.source) {\n texture.source = this._convertIdToIndex(texture.source, 'image');\n }\n }\n\n _convertMeshIds(mesh) {\n for (const primitive of mesh.primitives) {\n const {attributes, indices, material} = primitive;\n for (const attributeName in attributes) {\n attributes[attributeName] = this._convertIdToIndex(attributes[attributeName], 'accessor');\n }\n if (indices) {\n primitive.indices = this._convertIdToIndex(indices, 'accessor');\n }\n if (material) {\n primitive.material = this._convertIdToIndex(material, 'material');\n }\n }\n }\n\n _convertNodeIds(node) {\n if (node.children) {\n node.children = node.children.map((child) => this._convertIdToIndex(child, 'node'));\n }\n if (node.meshes) {\n node.meshes = node.meshes.map((mesh) => this._convertIdToIndex(mesh, 'mesh'));\n }\n }\n\n _convertSceneIds(scene) {\n if (scene.nodes) {\n scene.nodes = scene.nodes.map((node) => this._convertIdToIndex(node, 'node'));\n }\n }\n\n /** Go through all objects in a top-level array and replace ids with indices */\n _convertIdsToIndices(json, topLevelArrayName) {\n if (!json[topLevelArrayName]) {\n console.warn(`gltf v1: json doesn't contain attribute ${topLevelArrayName}`); // eslint-disable-line no-console, no-undef\n json[topLevelArrayName] = [];\n }\n for (const object of json[topLevelArrayName]) {\n for (const key in object) {\n const id = object[key];\n const index = this._convertIdToIndex(id, key);\n object[key] = index;\n }\n }\n }\n\n _convertIdToIndex(id, key) {\n const arrayName = GLTF_KEYS[key];\n if (arrayName in this.idToIndexMap) {\n const index = this.idToIndexMap[arrayName][id];\n if (!Number.isFinite(index)) {\n throw new Error(`gltf v1: failed to resolve ${key} with id ${id}`);\n }\n return index;\n }\n return id;\n }\n\n /**\n *\n * @param {*} json\n */\n _updateObjects(json) {\n for (const buffer of this.json.buffers) {\n // - [x] Removed buffer.type, #786, #629\n delete buffer.type;\n }\n }\n\n /**\n * Update material (set pbrMetallicRoughness)\n * @param {*} json\n */\n _updateMaterial(json) {\n for (const material of json.materials) {\n material.pbrMetallicRoughness = {\n baseColorFactor: [1, 1, 1, 1],\n metallicFactor: 1,\n roughnessFactor: 1\n };\n\n const textureId = material.values && material.values.tex;\n const textureIndex = json.textures.findIndex((texture) => texture.id === textureId);\n if (textureIndex !== -1) {\n material.pbrMetallicRoughness.baseColorTexture = {index: textureIndex};\n }\n }\n }\n}\n\nexport function normalizeGLTFV1(gltf, options = {}) {\n return new GLTFV1Normalizer().normalize(gltf, options);\n}\n","// GLTF 1.0 EXTENSION: KHR_binary_glTF\n// https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF\n\nimport type {GLTF} from '../types/gltf-types';\n\nimport GLTFScenegraph from '../api/gltf-scenegraph';\nimport {KHR_BINARY_GLTF} from '../gltf-utils/gltf-constants';\n\nexport function decode(gltfData: {json: GLTF}): void {\n const gltfScenegraph = new GLTFScenegraph(gltfData);\n const {json} = gltfScenegraph;\n\n // Note: json.buffers.binary_glTF also needs to be replaced\n // This is currently done during gltf normalization\n\n // Image and shader nodes can have the extension\n // https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/schema/image.KHR_binary_glTF.schema.json\n for (const node of json.images || []) {\n const extension = gltfScenegraph.removeObjectExtension(node, KHR_BINARY_GLTF);\n // The data in the extension is valid as glTF 2.0 data inside the object, so just copy it in\n if (extension) {\n Object.assign(node, extension);\n }\n }\n\n // TODO shaders\n // https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/schema/shader.KHR_binary_glTF.schema.json\n\n // glTF v1 one files have a partially formed URI field that is not expected in (and causes problems in) 2.0\n if (json.buffers && json.buffers[0]) {\n delete json.buffers[0].uri;\n }\n\n // Remove the top-level extension as it has now been removed from all nodes\n gltfScenegraph.removeExtension(KHR_BINARY_GLTF);\n}\n\n// KHR_binary_gltf is a 1.0 extension that is supported natively by 2.0\nexport function encode() {\n throw new Error(KHR_BINARY_GLTF);\n}\n","import {assert} from '../utils/assert';\nimport {getAccessorArrayTypeAndLength} from '../gltf-utils/gltf-utils';\n\n// This is a post processor for loaded glTF files\n// The goal is to make the loaded data easier to use in WebGL applications\n//\n// Functions:\n// * Resolve indexed arrays structure of glTF into a linked tree.\n// * Translate stringified enum keys and values into WebGL constants.\n// * Load images (optional)\n\n// ENUM LOOKUP\n\nconst COMPONENTS = {\n SCALAR: 1,\n VEC2: 2,\n VEC3: 3,\n VEC4: 4,\n MAT2: 4,\n MAT3: 9,\n MAT4: 16\n};\n\nconst BYTES = {\n 5120: 1, // BYTE\n 5121: 1, // UNSIGNED_BYTE\n 5122: 2, // SHORT\n 5123: 2, // UNSIGNED_SHORT\n 5125: 4, // UNSIGNED_INT\n 5126: 4 // FLOAT\n};\n\nconst GL_SAMPLER = {\n // Sampler parameters\n TEXTURE_MAG_FILTER: 0x2800,\n TEXTURE_MIN_FILTER: 0x2801,\n TEXTURE_WRAP_S: 0x2802,\n TEXTURE_WRAP_T: 0x2803,\n\n // Sampler default values\n REPEAT: 0x2901,\n LINEAR: 0x2601,\n NEAREST_MIPMAP_LINEAR: 0x2702\n};\n\nconst SAMPLER_PARAMETER_GLTF_TO_GL = {\n magFilter: GL_SAMPLER.TEXTURE_MAG_FILTER,\n minFilter: GL_SAMPLER.TEXTURE_MIN_FILTER,\n wrapS: GL_SAMPLER.TEXTURE_WRAP_S,\n wrapT: GL_SAMPLER.TEXTURE_WRAP_T\n};\n\n// When undefined, a sampler with repeat wrapping and auto filtering should be used.\n// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#texture\nconst DEFAULT_SAMPLER = {\n [GL_SAMPLER.TEXTURE_MAG_FILTER]: GL_SAMPLER.LINEAR,\n [GL_SAMPLER.TEXTURE_MIN_FILTER]: GL_SAMPLER.NEAREST_MIPMAP_LINEAR,\n [GL_SAMPLER.TEXTURE_WRAP_S]: GL_SAMPLER.REPEAT,\n [GL_SAMPLER.TEXTURE_WRAP_]: GL_SAMPLER.REPEAT\n};\n\nfunction getBytesFromComponentType(componentType) {\n return BYTES[componentType];\n}\n\nfunction getSizeFromAccessorType(type) {\n return COMPONENTS[type];\n}\n\nclass GLTFPostProcessor {\n postProcess(gltf, options = {}) {\n const {json, buffers = [], images = [], baseUri = ''} = gltf;\n assert(json);\n\n this.baseUri = baseUri;\n this.json = json;\n this.buffers = buffers;\n this.images = images;\n\n this._resolveTree(this.json, options);\n\n return this.json;\n }\n\n // Convert indexed glTF structure into tree structure\n // cross-link index resolution, enum lookup, convenience calculations\n // eslint-disable-next-line complexity\n _resolveTree(json, options = {}) {\n if (json.bufferViews) {\n json.bufferViews = json.bufferViews.map((bufView, i) => this._resolveBufferView(bufView, i));\n }\n if (json.images) {\n json.images = json.images.map((image, i) => this._resolveImage(image, i));\n }\n if (json.samplers) {\n json.samplers = json.samplers.map((sampler, i) => this._resolveSampler(sampler, i));\n }\n if (json.textures) {\n json.textures = json.textures.map((texture, i) => this._resolveTexture(texture, i));\n }\n if (json.accessors) {\n json.accessors = json.accessors.map((accessor, i) => this._resolveAccessor(accessor, i));\n }\n if (json.materials) {\n json.materials = json.materials.map((material, i) => this._resolveMaterial(material, i));\n }\n if (json.meshes) {\n json.meshes = json.meshes.map((mesh, i) => this._resolveMesh(mesh, i));\n }\n if (json.nodes) {\n json.nodes = json.nodes.map((node, i) => this._resolveNode(node, i));\n }\n if (json.skins) {\n json.skins = json.skins.map((skin, i) => this._resolveSkin(skin, i));\n }\n if (json.scenes) {\n json.scenes = json.scenes.map((scene, i) => this._resolveScene(scene, i));\n }\n if (json.scene !== undefined) {\n json.scene = json.scenes[this.json.scene];\n }\n }\n\n getScene(index) {\n return this._get('scenes', index);\n }\n\n getNode(index) {\n return this._get('nodes', index);\n }\n\n getSkin(index) {\n return this._get('skins', index);\n }\n\n getMesh(index) {\n return this._get('meshes', index);\n }\n\n getMaterial(index) {\n return this._get('materials', index);\n }\n\n getAccessor(index) {\n return this._get('accessors', index);\n }\n\n getCamera(index) {\n return null; // TODO: fix this\n }\n\n getTexture(index) {\n return this._get('textures', index);\n }\n\n getSampler(index) {\n return this._get('samplers', index);\n }\n\n getImage(index) {\n return this._get('images', index);\n }\n\n getBufferView(index) {\n return this._get('bufferViews', index);\n }\n\n getBuffer(index) {\n return this._get('buffers', index);\n }\n\n _get(array, index) {\n // check if already resolved\n if (typeof index === 'object') {\n return index;\n }\n const object = this.json[array] && this.json[array][index];\n if (!object) {\n console.warn(`glTF file error: Could not find ${array}[${index}]`); // eslint-disable-line\n }\n return object;\n }\n\n // PARSING HELPERS\n\n _resolveScene(scene, index) {\n // scene = {...scene};\n scene.id = scene.id || `scene-${index}`;\n scene.nodes = (scene.nodes || []).map((node) => this.getNode(node));\n return scene;\n }\n\n _resolveNode(node, index) {\n // node = {...node};\n node.id = node.id || `node-${index}`;\n if (node.children) {\n node.children = node.children.map((child) => this.getNode(child));\n }\n if (node.mesh !== undefined) {\n node.mesh = this.getMesh(node.mesh);\n } else if (node.meshes !== undefined && node.meshes.length) {\n node.mesh = node.meshes.reduce(\n (accum, meshIndex) => {\n const mesh = this.getMesh(meshIndex);\n accum.id = mesh.id;\n accum.primitives = accum.primitives.concat(mesh.primitives);\n return accum;\n },\n {primitives: []}\n );\n }\n if (node.camera !== undefined) {\n node.camera = this.getCamera(node.camera);\n }\n if (node.skin !== undefined) {\n node.skin = this.getSkin(node.skin);\n }\n return node;\n }\n\n _resolveSkin(skin, index) {\n // skin = {...skin};\n skin.id = skin.id || `skin-${index}`;\n skin.inverseBindMatrices = this.getAccessor(skin.inverseBindMatrices);\n return skin;\n }\n\n _resolveMesh(mesh, index) {\n // mesh = {...mesh};\n mesh.id = mesh.id || `mesh-${index}`;\n if (mesh.primitives) {\n mesh.primitives = mesh.primitives.map((primitive) => {\n primitive = {...primitive};\n const attributes = primitive.attributes;\n primitive.attributes = {};\n for (const attribute in attributes) {\n primitive.attributes[attribute] = this.getAccessor(attributes[attribute]);\n }\n if (primitive.indices !== undefined) {\n primitive.indices = this.getAccessor(primitive.indices);\n }\n if (primitive.material !== undefined) {\n primitive.material = this.getMaterial(primitive.material);\n }\n return primitive;\n });\n }\n return mesh;\n }\n\n _resolveMaterial(material, index) {\n // material = {...material};\n material.id = material.id || `material-${index}`;\n if (material.normalTexture) {\n material.normalTexture = {...material.normalTexture};\n material.normalTexture.texture = this.getTexture(material.normalTexture.index);\n }\n if (material.occlusionTexture) {\n material.occlustionTexture = {...material.occlustionTexture};\n material.occlusionTexture.texture = this.getTexture(material.occlusionTexture.index);\n }\n if (material.emissiveTexture) {\n material.emmisiveTexture = {...material.emmisiveTexture};\n material.emissiveTexture.texture = this.getTexture(material.emissiveTexture.index);\n }\n if (!material.emissiveFactor) {\n material.emissiveFactor = material.emmisiveTexture ? [1, 1, 1] : [0, 0, 0];\n }\n\n if (material.pbrMetallicRoughness) {\n material.pbrMetallicRoughness = {...material.pbrMetallicRoughness};\n const mr = material.pbrMetallicRoughness;\n if (mr.baseColorTexture) {\n mr.baseColorTexture = {...mr.baseColorTexture};\n mr.baseColorTexture.texture = this.getTexture(mr.baseColorTexture.index);\n }\n if (mr.metallicRoughnessTexture) {\n mr.metallicRoughnessTexture = {...mr.metallicRoughnessTexture};\n mr.metallicRoughnessTexture.texture = this.getTexture(mr.metallicRoughnessTexture.index);\n }\n }\n return material;\n }\n\n _resolveAccessor(accessor, index) {\n // accessor = {...accessor};\n accessor.id = accessor.id || `accessor-${index}`;\n if (accessor.bufferView !== undefined) {\n // Draco encoded meshes don't have bufferView\n accessor.bufferView = this.getBufferView(accessor.bufferView);\n }\n\n // Look up enums\n accessor.bytesPerComponent = getBytesFromComponentType(accessor.componentType);\n accessor.components = getSizeFromAccessorType(accessor.type);\n accessor.bytesPerElement = accessor.bytesPerComponent * accessor.components;\n\n // Create TypedArray for the accessor\n // Note: The canonical way to instantiate is to ignore this array and create\n // WebGLBuffer's using the bufferViews.\n if (accessor.bufferView) {\n const buffer = accessor.bufferView.buffer;\n const {ArrayType, byteLength} = getAccessorArrayTypeAndLength(accessor, accessor.bufferView);\n const byteOffset =\n (accessor.bufferView.byteOffset || 0) + (accessor.byteOffset || 0) + buffer.byteOffset;\n const cutBufffer = buffer.arrayBuffer.slice(byteOffset, byteOffset + byteLength);\n accessor.value = new ArrayType(cutBufffer);\n }\n\n return accessor;\n }\n\n _resolveTexture(texture, index) {\n // texture = {...texture};\n texture.id = texture.id || `texture-${index}`;\n texture.sampler = 'sampler' in texture ? this.getSampler(texture.sampler) : DEFAULT_SAMPLER;\n texture.source = this.getImage(texture.source);\n return texture;\n }\n\n _resolveSampler(sampler, index) {\n // sampler = {...sampler};\n sampler.id = sampler.id || `sampler-${index}`;\n // Map textual parameters to GL parameter values\n sampler.parameters = {};\n for (const key in sampler) {\n const glEnum = this._enumSamplerParameter(key);\n if (glEnum !== undefined) {\n sampler.parameters[glEnum] = sampler[key];\n }\n }\n return sampler;\n }\n\n _enumSamplerParameter(key) {\n return SAMPLER_PARAMETER_GLTF_TO_GL[key];\n }\n\n _resolveImage(image, index) {\n // image = {...image};\n image.id = image.id || `image-${index}`;\n if (image.bufferView !== undefined) {\n image.bufferView = this.getBufferView(image.bufferView);\n }\n\n // Check if image has been preloaded by the GLTFLoader\n // If so, link it into the JSON and drop the URI\n const preloadedImage = this.images[index];\n if (preloadedImage) {\n image.image = preloadedImage;\n }\n\n return image;\n }\n\n _resolveBufferView(bufferView, index) {\n // bufferView = {...bufferView};\n bufferView.id = bufferView.id || `bufferView-${index}`;\n const bufferIndex = bufferView.buffer;\n bufferView.buffer = this.buffers[bufferIndex];\n\n const arrayBuffer = this.buffers[bufferIndex].arrayBuffer;\n let byteOffset = this.buffers[bufferIndex].byteOffset || 0;\n\n if ('byteOffset' in bufferView) {\n byteOffset += bufferView.byteOffset;\n }\n\n bufferView.data = new Uint8Array(arrayBuffer, byteOffset, bufferView.byteLength);\n return bufferView;\n }\n\n _resolveCamera(camera, index) {\n camera.id = camera.id || `camera-${index}`;\n // TODO - create 4x4 matrices\n if (camera.perspective) {\n // camera.matrix = createPerspectiveMatrix(camera.perspective);\n }\n if (camera.orthographic) {\n // camera.matrix = createOrthographicMatrix(camera.orthographic);\n }\n return camera;\n }\n}\n\nexport function postProcessGLTF(gltf, options) {\n return new GLTFPostProcessor().postProcess(gltf, options);\n}\n","/* eslint-disable camelcase, max-statements */\n// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#glb-file-format-specification\n// https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF\nimport type {GLB} from '../types/glb-types';\nimport {padToNBytes, assert} from '@loaders.gl/loader-utils';\n\nexport type GLBParseOptions = {\n magic?: number;\n strict?: boolean;\n};\n\nconst MAGIC_glTF = 0x676c5446; // glTF in Big-Endian ASCII\n\nconst GLB_FILE_HEADER_SIZE = 12;\nconst GLB_CHUNK_HEADER_SIZE = 8;\n\nconst GLB_CHUNK_TYPE_JSON = 0x4e4f534a;\nconst GLB_CHUNK_TYPE_BIN = 0x004e4942;\nconst GLB_CHUNK_TYPE_JSON_XVIZ_DEPRECATED = 0; // DEPRECATED - Backward compatibility for old xviz files\nconst GLB_CHUNK_TYPE_BIX_XVIZ_DEPRECATED = 1; // DEPRECATED - Backward compatibility for old xviz files\n\nconst GLB_V1_CONTENT_FORMAT_JSON = 0x0;\n\nconst LE = true; // Binary GLTF is little endian.\n\nfunction getMagicString(dataView, byteOffset = 0) {\n return `\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 0))}\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 1))}\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 2))}\\\n${String.fromCharCode(dataView.getUint8(byteOffset + 3))}`;\n}\n\n// Check if a data view is a GLB\nexport function isGLB(\n arrayBuffer: ArrayBuffer,\n byteOffset: number = 0,\n options: GLBParseOptions = {}\n): boolean {\n const dataView = new DataView(arrayBuffer);\n // Check that GLB Header starts with the magic number\n const {magic = MAGIC_glTF} = options;\n const magic1 = dataView.getUint32(byteOffset, false);\n return magic1 === magic || magic1 === MAGIC_glTF;\n}\n\nexport default function parseGLBSync(\n glb: GLB,\n arrayBuffer: ArrayBuffer,\n byteOffset: number = 0,\n options: GLBParseOptions = {}\n) {\n // Check that GLB Header starts with the magic number\n const dataView = new DataView(arrayBuffer);\n\n // Compare format with GLBLoader documentation\n const type = getMagicString(dataView, byteOffset + 0);\n const version = dataView.getUint32(byteOffset + 4, LE); // Version 2 of binary glTF container format\n const byteLength = dataView.getUint32(byteOffset + 8, LE); // Total byte length of binary file\n\n Object.assign(glb, {\n // Put less important stuff in a header, to avoid clutter\n header: {\n byteOffset, // Byte offset into the initial arrayBuffer\n byteLength,\n hasBinChunk: false\n },\n\n type,\n version,\n\n json: {},\n binChunks: []\n } as GLB);\n\n byteOffset += GLB_FILE_HEADER_SIZE;\n\n switch (glb.version) {\n case 1:\n // eslint-disable-next-line\n return parseGLBV1(glb, dataView, byteOffset);\n case 2:\n // eslint-disable-next-line\n return parseGLBV2(glb, dataView, byteOffset, (options = {}));\n default:\n throw new Error(`Invalid GLB version ${glb.version}. Only supports v1 and v2.`);\n }\n}\n\nfunction parseGLBV1(glb: GLB, dataView: DataView, byteOffset: number): number {\n // Sanity: ensure file is big enough to hold at least the headers\n assert(glb.header.byteLength > GLB_FILE_HEADER_SIZE + GLB_CHUNK_HEADER_SIZE);\n\n // Explanation of GLB structure:\n // https://cloud.githubusercontent.com/assets/3479527/22600725/36b87122-ea55-11e6-9d40-6fd42819fcab.png\n const contentLength = dataView.getUint32(byteOffset + 0, LE); // Byte length of chunk\n const contentFormat = dataView.getUint32(byteOffset + 4, LE); // Chunk format as uint32\n byteOffset += GLB_CHUNK_HEADER_SIZE;\n\n // GLB v1 only supports a single chunk type\n assert(contentFormat === GLB_V1_CONTENT_FORMAT_JSON);\n\n parseJSONChunk(glb, dataView, byteOffset, contentLength);\n // No need to call the function padToBytes() from parseJSONChunk()\n byteOffset += contentLength;\n byteOffset += parseBINChunk(glb, dataView, byteOffset, glb.header.byteLength);\n\n return byteOffset;\n}\n\nfunction parseGLBV2(\n glb: GLB,\n dataView: DataView,\n byteOffset: number,\n options: GLBParseOptions\n): number {\n // Sanity: ensure file is big enough to hold at least the first chunk header\n assert(glb.header.byteLength > GLB_FILE_HEADER_SIZE + GLB_CHUNK_HEADER_SIZE);\n\n parseGLBChunksSync(glb, dataView, byteOffset, options);\n\n return byteOffset + glb.header.byteLength;\n}\n\nfunction parseGLBChunksSync(\n glb: GLB,\n dataView: DataView,\n byteOffset: number,\n options: GLBParseOptions\n) {\n // Per spec we must iterate over chunks, ignoring all except JSON and BIN\n // Iterate as long as there is space left for another chunk header\n while (byteOffset + 8 <= glb.header.byteLength) {\n const chunkLength = dataView.getUint32(byteOffset + 0, LE); // Byte length of chunk\n const chunkFormat = dataView.getUint32(byteOffset + 4, LE); // Chunk format as uint32\n byteOffset += GLB_CHUNK_HEADER_SIZE;\n\n // Per spec we must iterate over chunks, ignoring all except JSON and BIN\n switch (chunkFormat) {\n case GLB_CHUNK_TYPE_JSON:\n parseJSONChunk(glb, dataView, byteOffset, chunkLength);\n break;\n case GLB_CHUNK_TYPE_BIN:\n parseBINChunk(glb, dataView, byteOffset, chunkLength);\n break;\n\n // Backward compatibility for very old xviz files\n case GLB_CHUNK_TYPE_JSON_XVIZ_DEPRECATED:\n if (!options.strict) {\n parseJSONChunk(glb, dataView, byteOffset, chunkLength);\n }\n break;\n case GLB_CHUNK_TYPE_BIX_XVIZ_DEPRECATED:\n if (!options.strict) {\n parseBINChunk(glb, dataView, byteOffset, chunkLength);\n }\n break;\n\n default:\n // Ignore, per spec\n // console.warn(`Unknown GLB chunk type`); // eslint-disable-line\n break;\n }\n\n byteOffset += padToNBytes(chunkLength, 4);\n }\n\n return byteOffset;\n}\n\n// Parse a GLB JSON chunk\nfunction parseJSONChunk(glb: GLB, dataView: DataView, byteOffset: number, chunkLength: number) {\n // 1. Create a \"view\" of the binary encoded JSON data inside the GLB\n const jsonChunk = new Uint8Array(dataView.buffer, byteOffset, chunkLength);\n\n // 2. Decode the JSON binary array into clear text\n const textDecoder = new TextDecoder('utf8');\n const jsonText = textDecoder.decode(jsonChunk);\n\n // 3. Parse the JSON text into a JavaScript data structure\n glb.json = JSON.parse(jsonText);\n\n return padToNBytes(chunkLength, 4);\n}\n\n// Parse a GLB BIN chunk\nfunction parseBINChunk(glb: GLB, dataView, byteOffset, chunkLength) {\n // Note: BIN chunk can be optional\n glb.header.hasBinChunk = true;\n glb.binChunks.push({\n byteOffset,\n byteLength: chunkLength,\n arrayBuffer: dataView.buffer\n // TODO - copy, or create typed array view?\n });\n\n return padToNBytes(chunkLength, 4);\n}\n","/* eslint-disable camelcase, max-statements, no-restricted-globals */\nimport type {LoaderContext} from '@loaders.gl/loader-utils';\nimport type {GLB} from '../types/glb-types';\nimport type {GLBParseOptions} from './parse-glb';\n\nimport {ImageLoader} from '@loaders.gl/images';\nimport {parseJSON, sliceArrayBuffer} from '@loaders.gl/loader-utils';\nimport {assert} from '../utils/assert';\nimport {resolveUrl} from '../gltf-utils/resolve-url';\nimport {getTypedArrayForBufferView} from '../gltf-utils/get-typed-array';\nimport {decodeExtensions} from '../extensions/gltf-extensions';\nimport {normalizeGLTFV1} from '../api/normalize-gltf-v1';\nimport {postProcessGLTF} from '../api/post-process-gltf';\nimport parseGLBSync, {isGLB} from './parse-glb';\n\nexport type GLTFParseOptions = {\n excludeExtensions?: string[];\n decompressMeshes?: boolean;\n normalize?: boolean;\n loadBuffers?: boolean;\n loadImages?: boolean;\n postProcess?: boolean;\n};\n\n// export type GLTFOptions = {\n// gltf?: GLTFParseOptions;\n// };\n\nexport function isGLTF(arrayBuffer, options?): boolean {\n const byteOffset = 0;\n return isGLB(arrayBuffer, byteOffset, options);\n}\n\nexport async function parseGLTF(\n gltf,\n arrayBufferOrString,\n byteOffset = 0,\n options: {\n gltf?: GLTFParseOptions;\n glb?: GLBParseOptions;\n },\n context: LoaderContext\n) {\n parseGLTFContainerSync(gltf, arrayBufferOrString, byteOffset, options);\n\n normalizeGLTFV1(gltf, {normalize: options?.gltf?.normalize});\n\n const promises: Promise<any>[] = [];\n\n // Load linked buffers asynchronously and decodes base64 buffers in parallel\n if (options?.gltf?.loadBuffers && gltf.json.buffers) {\n await loadBuffers(gltf, options, context);\n }\n\n if (options?.gltf?.loadImages) {\n const promise = loadImages(gltf, options, context);\n promises.push(promise);\n }\n\n const promise = decodeExtensions(gltf, options, context);\n promises.push(promise);\n\n // Parallelize image loading and buffer loading/extension decoding\n await Promise.all(promises);\n\n // Post processing resolves indices to objects, buffers\n return options?.gltf?.postProcess ? postProcessGLTF(gltf, options) : gltf;\n}\n\n// `data` - can be ArrayBuffer (GLB), ArrayBuffer (Binary JSON), String (JSON), or Object (parsed JSON)\nfunction parseGLTFContainerSync(gltf, data, byteOffset, options) {\n // Initialize gltf container\n if (options.uri) {\n gltf.baseUri = options.uri;\n }\n\n // If data is binary and starting with magic bytes, assume binary JSON text, convert to string\n if (data instanceof ArrayBuffer && !isGLB(data, byteOffset, options)) {\n const textDecoder = new TextDecoder();\n data = textDecoder.decode(data);\n }\n\n if (typeof data === 'string') {\n // If string, try to parse as JSON\n gltf.json = parseJSON(data);\n } else if (data instanceof ArrayBuffer) {\n // If still ArrayBuffer, parse as GLB container\n const glb: GLB = {} as GLB;\n byteOffset = parseGLBSync(glb, data, byteOffset, options.glb);\n\n assert(glb.type === 'glTF', `Invalid GLB magic string ${glb.type}`);\n\n gltf._glb = glb;\n gltf.json = glb.json;\n } else {\n assert(false, 'GLTF: must be ArrayBuffer or string');\n }\n\n // Populate buffers\n // Create an external buffers array to hold binary data\n const buffers = gltf.json.buffers || [];\n gltf.buffers = new Array(buffers.length).fill(null);\n\n // Populates JSON and some bin chunk info\n if (gltf._glb && gltf._glb.header.hasBinChunk) {\n const {binChunks} = gltf._glb;\n gltf.buffers[0] = {\n arrayBuffer: binChunks[0].arrayBuffer,\n byteOffset: binChunks[0].byteOffset,\n byteLength: binChunks[0].byteLength\n };\n\n // TODO - this modifies JSON and is a post processing thing\n // gltf.json.buffers[0].data = gltf.buffers[0].arrayBuffer;\n // gltf.json.buffers[0].byteOffset = gltf.buffers[0].byteOffset;\n }\n\n // Populate images\n const images = gltf.json.images || [];\n gltf.images = new Array(images.length).fill({});\n}\n\n// Asynchronously fetch and parse buffers, store in buffers array outside of json\nasync function loadBuffers(gltf, options, context: LoaderContext) {\n for (let i = 0; i < gltf.json.buffers.length; ++i) {\n const buffer = gltf.json.buffers[i];\n if (buffer.uri) {\n const {fetch} = context;\n assert(fetch);\n\n const uri = resolveUrl(buffer.uri, options);\n const response = await context?.fetch?.(uri);\n const arrayBuffer = await response?.arrayBuffer?.();\n\n gltf.buffers[i] = {\n arrayBuffer,\n byteOffset: 0,\n byteLength: arrayBuffer.byteLength\n };\n\n delete buffer.uri;\n }\n }\n}\n\nasync function loadImages(gltf, options, context: LoaderContext) {\n const images = gltf.json.images || [];\n\n const promises: Promise<any>[] = [];\n for (let i = 0; i < images.length; ++i) {\n promises.push(loadImage(gltf, images[i], i, options, context));\n }\n\n return await Promise.all(promises);\n}\n\n// Asynchronously fetches and parses one image, store in images array outside of json\nasync function loadImage(gltf, image, index: number, options, context: LoaderContext) {\n const {fetch, parse} = context;\n\n let arrayBuffer;\n\n if (image.uri) {\n const uri = resolveUrl(image.uri, options);\n const response = await fetch(uri);\n arrayBuffer = await response.arrayBuffer();\n }\n\n if (Number.isFinite(image.bufferView)) {\n const array = getTypedArrayForBufferView(gltf.json, gltf.buffers, image.bufferView);\n arrayBuffer = sliceArrayBuffer(array.buffer, array.byteOffset, array.byteLength);\n }\n\n assert(arrayBuffer, 'glTF image has no data');\n\n // Call `parse`\n const parsedImage = await parse(arrayBuffer, ImageLoader, {}, context);\n // TODO making sure ImageLoader is overridable by using array of loaders\n // const parsedImage = await parse(arrayBuffer, [ImageLoader]);\n\n gltf.images[index] = parsedImage;\n}\n","import type {LoaderWithParser, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {DracoLoaderOptions} from '@loaders.gl/draco';\n// import type {ImageLoaderOptions} from '@loaders.gl/images';\n// import type {TextureLoaderOptions} from '@loaders.gl/textures';\nimport type {GLTFParseOptions} from './lib/parsers/parse-gltf';\nimport {VERSION} from './lib/utils/version';\nimport {parseGLTF} from './lib/parsers/parse-gltf';\nimport {GLBLoaderOptions} from './glb-loader';\n\n/**\n * GLTF loader options\n */\nexport type GLTFLoaderOptions = LoaderOptions &\n GLBLoaderOptions &\n DracoLoaderOptions & {\n gltf?: GLTFParseOptions;\n };\n\n/**\n * GLTF loader\n */\nexport const GLTFLoader: LoaderWithParser = {\n name: 'glTF',\n id: 'gltf',\n module: 'gltf',\n version: VERSION,\n extensions: ['gltf', 'glb'],\n mimeTypes: ['model/gltf+json', 'model/gltf-binary'],\n\n text: true,\n binary: true,\n tests: ['glTF'],\n parse,\n\n options: {\n gltf: {\n normalize: true, // Normalize glTF v1 to glTF v2 format (not yet stable)\n loadBuffers: true, // Fetch any linked .BIN buffers, decode base64\n loadImages: true, // Create image objects\n decompressMeshes: true, // Decompress Draco encoded meshes\n postProcess: true // Postprocess glTF and return json structure directly\n },\n\n // common?\n log: console // eslint-disable-line\n },\n deprecatedOptions: {\n fetchImages: 'gltf.loadImages',\n createImages: 'gltf.loadImages',\n decompress: 'gltf.decompressMeshes',\n postProcess: 'gltf.postProcess',\n gltf: {\n decompress: 'gltf.decompressMeshes'\n }\n }\n};\n\nexport async function parse(arrayBuffer, options: GLTFLoaderOptions = {}, context) {\n // Apps can call the parse method directly, we so apply default options here\n options = {...GLTFLoader.options, ...options};\n // @ts-ignore\n options.gltf = {...GLTFLoader.options.gltf, ...options.gltf};\n\n const {byteOffset = 0} = options;\n const gltf = {};\n return await parseGLTF(gltf, arrayBuffer, byteOffset, options, context);\n}\n","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport merge from './merge';\n\nfunction omit(input, fields) {\n var output = {};\n Object.keys(input).forEach(function (prop) {\n if (fields.indexOf(prop) === -1) {\n output[prop] = input[prop];\n }\n });\n return output;\n}\n\nvar warnedOnce = false;\n\nfunction styleFunctionSx(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var output = styleFunction(props);\n\n if (props.css) {\n return _extends({}, merge(output, styleFunction(_extends({\n theme: props.theme\n }, props.css))), omit(props.css, [styleFunction.filterProps]));\n }\n\n if (props.sx) {\n return _extends({}, merge(output, styleFunction(_extends({\n theme: props.theme\n }, props.sx))), omit(props.sx, [styleFunction.filterProps]));\n }\n\n return output;\n };\n\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? _extends({}, styleFunction.propTypes, {\n css: chainPropTypes(PropTypes.object, function (props) {\n if (!warnedOnce && props.css !== undefined) {\n warnedOnce = true;\n return new Error('Material-UI: The `css` prop is deprecated, please use the `sx` prop instead.');\n }\n\n return null;\n }),\n sx: PropTypes.object\n }) : {};\n newStyleFunction.filterProps = ['css', 'sx'].concat(_toConsumableArray(styleFunction.filterProps));\n return newStyleFunction;\n}\n/**\r\n *\r\n * @deprecated\r\n * The css style function is deprecated. Use the `styleFunctionSx` instead.\r\n */\n\n\nexport function css(styleFunction) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn('Material-UI: The `css` function is deprecated. Use the `styleFunctionSx` instead.');\n }\n\n return styleFunctionSx(styleFunction);\n}\nexport default styleFunctionSx;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport merge from './merge';\n\nfunction compose() {\n for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {\n styles[_key] = arguments[_key];\n }\n\n var fn = function fn(props) {\n return styles.reduce(function (acc, style) {\n var output = style(props);\n\n if (output) {\n return merge(acc, output);\n }\n\n return acc;\n }, {});\n }; // Alternative approach that doesn't yield any performance gain.\n // const handlers = styles.reduce((acc, style) => {\n // style.filterProps.forEach(prop => {\n // acc[prop] = style;\n // });\n // return acc;\n // }, {});\n // const fn = props => {\n // return Object.keys(props).reduce((acc, prop) => {\n // if (handlers[prop]) {\n // return merge(acc, handlers[prop](props));\n // }\n // return acc;\n // }, {});\n // };\n\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce(function (acc, style) {\n return _extends(acc, style.propTypes);\n }, {}) : {};\n fn.filterProps = styles.reduce(function (acc, style) {\n return acc.concat(style.filterProps);\n }, []);\n return fn;\n}\n\nexport default compose;","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\n\nfunction getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce(function (acc, item) {\n return acc && acc[item] ? acc[item] : null;\n }, obj);\n}\n\nfunction style(options) {\n var prop = options.prop,\n _options$cssProperty = options.cssProperty,\n cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty,\n themeKey = options.themeKey,\n transform = options.transform;\n\n var fn = function fn(props) {\n if (props[prop] == null) {\n return null;\n }\n\n var propValue = props[prop];\n var theme = props.theme;\n var themeMapping = getPath(theme, themeKey) || {};\n\n var styleFromPropValue = function styleFromPropValue(propValueFinal) {\n var value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || propValueFinal;\n } else {\n value = getPath(themeMapping, propValueFinal) || propValueFinal;\n\n if (transform) {\n value = transform(value);\n }\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return _defineProperty({}, cssProperty, value);\n };\n\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = process.env.NODE_ENV !== 'production' ? _defineProperty({}, prop, responsivePropType) : {};\n fn.filterProps = [prop];\n return fn;\n}\n\nexport default style;","import style from './style';\nimport compose from './compose';\n\nfunction getBorder(value) {\n if (typeof value !== 'number') {\n return value;\n }\n\n return \"\".concat(value, \"px solid\");\n}\n\nexport var border = style({\n prop: 'border',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderTop = style({\n prop: 'borderTop',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderRight = style({\n prop: 'borderRight',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderBottom = style({\n prop: 'borderBottom',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderLeft = style({\n prop: 'borderLeft',\n themeKey: 'borders',\n transform: getBorder\n});\nexport var borderColor = style({\n prop: 'borderColor',\n themeKey: 'palette'\n});\nexport var borderRadius = style({\n prop: 'borderRadius',\n themeKey: 'shape'\n});\nvar borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius);\nexport default borders;","import style from './style';\nimport compose from './compose';\nexport var displayPrint = style({\n prop: 'displayPrint',\n cssProperty: false,\n transform: function transform(value) {\n return {\n '@media print': {\n display: value\n }\n };\n }\n});\nexport var displayRaw = style({\n prop: 'display'\n});\nexport var overflow = style({\n prop: 'overflow'\n});\nexport var textOverflow = style({\n prop: 'textOverflow'\n});\nexport var visibility = style({\n prop: 'visibility'\n});\nexport var whiteSpace = style({\n prop: 'whiteSpace'\n});\nexport default compose(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace);","import style from './style';\nimport compose from './compose';\nexport var flexBasis = style({\n prop: 'flexBasis'\n});\nexport var flexDirection = style({\n prop: 'flexDirection'\n});\nexport var flexWrap = style({\n prop: 'flexWrap'\n});\nexport var justifyContent = style({\n prop: 'justifyContent'\n});\nexport var alignItems = style({\n prop: 'alignItems'\n});\nexport var alignContent = style({\n prop: 'alignContent'\n});\nexport var order = style({\n prop: 'order'\n});\nexport var flex = style({\n prop: 'flex'\n});\nexport var flexGrow = style({\n prop: 'flexGrow'\n});\nexport var flexShrink = style({\n prop: 'flexShrink'\n});\nexport var alignSelf = style({\n prop: 'alignSelf'\n});\nexport var justifyItems = style({\n prop: 'justifyItems'\n});\nexport var justifySelf = style({\n prop: 'justifySelf'\n});\nvar flexbox = compose(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf);\nexport default flexbox;","import style from './style';\nimport compose from './compose';\nexport var gridGap = style({\n prop: 'gridGap'\n});\nexport var gridColumnGap = style({\n prop: 'gridColumnGap'\n});\nexport var gridRowGap = style({\n prop: 'gridRowGap'\n});\nexport var gridColumn = style({\n prop: 'gridColumn'\n});\nexport var gridRow = style({\n prop: 'gridRow'\n});\nexport var gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport var gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport var gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport var gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport var gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport var gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport var gridArea = style({\n prop: 'gridArea'\n});\nvar grid = compose(gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from './style';\nimport compose from './compose';\nexport var position = style({\n prop: 'position'\n});\nexport var zIndex = style({\n prop: 'zIndex',\n themeKey: 'zIndex'\n});\nexport var top = style({\n prop: 'top'\n});\nexport var right = style({\n prop: 'right'\n});\nexport var bottom = style({\n prop: 'bottom'\n});\nexport var left = style({\n prop: 'left'\n});\nexport default compose(position, zIndex, top, right, bottom, left);","import style from './style';\nimport compose from './compose';\nexport var color = style({\n prop: 'color',\n themeKey: 'palette'\n});\nexport var bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette'\n});\nvar palette = compose(color, bgcolor);\nexport default palette;","import style from './style';\nvar boxShadow = style({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\nexport default boxShadow;","import style from './style';\nimport compose from './compose';\n\nfunction transform(value) {\n return value <= 1 ? \"\".concat(value * 100, \"%\") : value;\n}\n\nexport var width = style({\n prop: 'width',\n transform: transform\n});\nexport var maxWidth = style({\n prop: 'maxWidth',\n transform: transform\n});\nexport var minWidth = style({\n prop: 'minWidth',\n transform: transform\n});\nexport var height = style({\n prop: 'height',\n transform: transform\n});\nexport var maxHeight = style({\n prop: 'maxHeight',\n transform: transform\n});\nexport var minHeight = style({\n prop: 'minHeight',\n transform: transform\n});\nexport var sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: transform\n});\nexport var sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: transform\n});\nexport var boxSizing = style({\n prop: 'boxSizing'\n});\nvar sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import style from './style';\nimport compose from './compose';\nexport var fontFamily = style({\n prop: 'fontFamily',\n themeKey: 'typography'\n});\nexport var fontSize = style({\n prop: 'fontSize',\n themeKey: 'typography'\n});\nexport var fontStyle = style({\n prop: 'fontStyle',\n themeKey: 'typography'\n});\nexport var fontWeight = style({\n prop: 'fontWeight',\n themeKey: 'typography'\n});\nexport var letterSpacing = style({\n prop: 'letterSpacing'\n});\nexport var lineHeight = style({\n prop: 'lineHeight'\n});\nexport var textAlign = style({\n prop: 'textAlign'\n});\nvar typography = compose(fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);\nexport default typography;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes, getDisplayName } from '@material-ui/utils';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport makeStyles from '../makeStyles';\n\nfunction omit(input, fields) {\n var output = {};\n Object.keys(input).forEach(function (prop) {\n if (fields.indexOf(prop) === -1) {\n output[prop] = input[prop];\n }\n });\n return output;\n} // styled-components's API removes the mapping between components and styles.\n// Using components as a low-level styling construct can be simpler.\n\n\nexport default function styled(Component) {\n var componentCreator = function componentCreator(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n stylesOptions = _objectWithoutProperties(options, [\"name\"]);\n\n if (process.env.NODE_ENV !== 'production' && Component === undefined) {\n throw new Error(['You are calling styled(Component)(style) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n\n var classNamePrefix = name;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = getDisplayName(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var stylesOrCreator = typeof style === 'function' ? function (theme) {\n return {\n root: function root(props) {\n return style(_extends({\n theme: theme\n }, props));\n }\n };\n } : {\n root: style\n };\n var useStyles = makeStyles(stylesOrCreator, _extends({\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var filterProps;\n var propTypes = {};\n\n if (style.filterProps) {\n filterProps = style.filterProps;\n delete style.filterProps;\n }\n /* eslint-disable react/forbid-foreign-prop-types */\n\n\n if (style.propTypes) {\n propTypes = style.propTypes;\n delete style.propTypes;\n }\n /* eslint-enable react/forbid-foreign-prop-types */\n\n\n var StyledComponent = /*#__PURE__*/React.forwardRef(function StyledComponent(props, ref) {\n var children = props.children,\n classNameProp = props.className,\n clone = props.clone,\n ComponentProp = props.component,\n other = _objectWithoutProperties(props, [\"children\", \"className\", \"clone\", \"component\"]);\n\n var classes = useStyles(props);\n var className = clsx(classes.root, classNameProp);\n var spread = other;\n\n if (filterProps) {\n spread = omit(spread, filterProps);\n }\n\n if (clone) {\n return /*#__PURE__*/React.cloneElement(children, _extends({\n className: clsx(children.props.className, className)\n }, spread));\n }\n\n if (typeof children === 'function') {\n return children(_extends({\n className: className\n }, spread));\n }\n\n var FinalComponent = ComponentProp || Component;\n return /*#__PURE__*/React.createElement(FinalComponent, _extends({\n ref: ref,\n className: className\n }, spread), children);\n });\n process.env.NODE_ENV !== \"production\" ? StyledComponent.propTypes = _extends({\n /**\n * A render function or node.\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the component will recycle it's children HTML element.\n * It's using `React.cloneElement` internally.\n *\n * This prop will be deprecated and removed in v5\n */\n clone: chainPropTypes(PropTypes.bool, function (props) {\n if (props.clone && props.component) {\n return new Error('You can not use the clone and component prop at the same time.');\n }\n\n return null;\n }),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType\n }, propTypes) : void 0;\n\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.displayName = \"Styled(\".concat(classNamePrefix, \")\");\n }\n\n hoistNonReactStatics(StyledComponent, Component);\n return StyledComponent;\n };\n\n return componentCreator;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { styled as styledWithoutDefault } from '@material-ui/styles';\nimport defaultTheme from './defaultTheme';\n\nvar styled = function styled(Component) {\n var componentCreator = styledWithoutDefault(Component);\n return function (style, options) {\n return componentCreator(style, _extends({\n defaultTheme: defaultTheme\n }, options));\n };\n};\n\nexport default styled;","import { borders, compose, display, flexbox, grid, palette, positions, shadows, sizing, spacing, typography, styleFunctionSx } from '@material-ui/system';\nimport styled from '../styles/styled';\nexport var styleFunction = styleFunctionSx(compose(borders, display, flexbox, grid, positions, palette, shadows, sizing, spacing, typography));\n/**\n * @ignore - do not document.\n */\n\nvar Box = styled('div')(styleFunction, {\n name: 'MuiBox'\n});\nexport default Box;","import type {WorkerObject} from '../../types';\nimport {assert} from '../env-utils/assert';\nimport {VERSION} from '../env-utils/version';\n\n/**\n * Check if worker is compatible with this library version\n * @param worker\n * @param libVersion\n * @returns `true` if the two versions are compatible\n */\nexport function validateWorkerVersion(\n worker: WorkerObject,\n coreVersion: string = VERSION\n): boolean {\n assert(worker, 'no worker provided');\n\n const workerVersion = worker.version;\n if (!coreVersion || !workerVersion) {\n return false;\n }\n\n // TODO enable when fix the __version__ injection\n // const coreVersions = parseVersion(coreVersion);\n // const workerVersions = parseVersion(workerVersion);\n // assert(\n // coreVersion.major === workerVersion.major && coreVersion.minor <= workerVersion.minor,\n // `worker: ${worker.name} is not compatible. ${coreVersion.major}.${\n // coreVersion.minor\n // }+ is required.`\n // );\n\n return true;\n}\n\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction parseVersion(version) {\n const parts = version.split('.').map(Number);\n return {major: parts[0], minor: parts[1]};\n}\n","import type {IteratorOptions} from './make-iterator';\n\nconst DEFAULT_CHUNK_SIZE = 256 * 1024;\n\n/**\n * Returns an iterator that breaks a big string into chunks and yields them one-by-one as ArrayBuffers\n * @param blob string to iterate over\n * @param options\n * @param options.chunkSize\n */\nexport function* makeStringIterator(\n string: string,\n options?: IteratorOptions\n): Iterable<ArrayBuffer> {\n const chunkSize = options?.chunkSize || DEFAULT_CHUNK_SIZE;\n\n let offset = 0;\n const textEncoder = new TextEncoder();\n while (offset < string.length) {\n // Create a chunk of the right size\n const chunkLength = Math.min(string.length - offset, chunkSize);\n const chunk = string.slice(offset, offset + chunkLength);\n offset += chunkLength;\n\n // yield an ArrayBuffer chunk\n yield textEncoder.encode(chunk);\n }\n}\n","import type {IteratorOptions} from './make-iterator';\n\nconst DEFAULT_CHUNK_SIZE = 256 * 1024;\n\n/**\n * Returns an iterator that breaks a big ArrayBuffer into chunks and yields them one-by-one\n * @param blob ArrayBuffer to iterate over\n * @param options\n * @param options.chunkSize\n */\nexport function* makeArrayBufferIterator(\n arrayBuffer: ArrayBuffer,\n options: IteratorOptions = {}\n): Iterable<ArrayBuffer> {\n const {chunkSize = DEFAULT_CHUNK_SIZE} = options;\n\n let byteOffset = 0;\n\n while (byteOffset < arrayBuffer.byteLength) {\n // Create a chunk of the right size\n const chunkByteLength = Math.min(arrayBuffer.byteLength - byteOffset, chunkSize);\n const chunk = new ArrayBuffer(chunkByteLength);\n\n // Copy data from the big chunk\n const sourceArray = new Uint8Array(arrayBuffer, byteOffset, chunkByteLength);\n const chunkArray = new Uint8Array(chunk);\n chunkArray.set(sourceArray);\n\n // yield the chunk\n byteOffset += chunkByteLength;\n yield chunk;\n }\n}\n","export default function _AwaitValue(value) {\n this.wrapped = value;\n}","import AwaitValue from \"./AwaitValue\";\nexport default function _awaitAsyncGenerator(value) {\n return new AwaitValue(value);\n}","import AwaitValue from \"./AwaitValue\";\nexport default function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg);\n var value = result.value;\n var wrappedAwait = value instanceof AwaitValue;\n Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {\n if (wrappedAwait) {\n resume(key === \"return\" ? \"return\" : \"next\", arg);\n return;\n }\n\n settle(result.done ? \"return\" : \"normal\", arg);\n }, function (err) {\n resume(\"throw\", err);\n });\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({\n value: value,\n done: true\n });\n break;\n\n case \"throw\":\n front.reject(value);\n break;\n\n default:\n front.resolve({\n value: value,\n done: false\n });\n break;\n }\n\n front = front.next;\n\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n if (typeof gen[\"return\"] !== \"function\") {\n this[\"return\"] = undefined;\n }\n}\n\nif (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () {\n return this;\n };\n}\n\nAsyncGenerator.prototype.next = function (arg) {\n return this._invoke(\"next\", arg);\n};\n\nAsyncGenerator.prototype[\"throw\"] = function (arg) {\n return this._invoke(\"throw\", arg);\n};\n\nAsyncGenerator.prototype[\"return\"] = function (arg) {\n return this._invoke(\"return\", arg);\n};","import AsyncGenerator from \"./AsyncGenerator\";\nexport default function _wrapAsyncGenerator(fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n}","import type {IteratorOptions} from './make-iterator';\n\nconst DEFAULT_CHUNK_SIZE = 1024 * 1024; // 1MB — biggest value that keeps UI responsive\n\n/**\n * Returns an iterator that breaks a big Blob into chunks and yields them one-by-one\n * @param blob Blob or File object\n * @param options\n * @param options.chunkSize\n */\nexport async function* makeBlobIterator(\n blob: Blob,\n options?: IteratorOptions\n): AsyncIterable<ArrayBuffer> {\n const chunkSize = options?.chunkSize || DEFAULT_CHUNK_SIZE;\n\n let offset = 0;\n while (offset < blob.size) {\n const end = offset + chunkSize;\n\n const chunk = await blob.slice(offset, end).arrayBuffer();\n\n offset = end;\n yield chunk;\n }\n}\n","import type {Readable} from 'stream';\nimport {isBrowser, toArrayBuffer} from '@loaders.gl/loader-utils';\n\nexport type StreamIteratorOptions = {\n _streamReadAhead?: boolean;\n};\n\n/**\n * Returns an async iterable that reads from a stream (works in both Node.js and browsers)\n * @param stream stream to iterator over\n */\nexport function makeStreamIterator(\n stream: ReadableStream | Readable,\n options?: StreamIteratorOptions\n): AsyncIterable<ArrayBuffer> {\n return isBrowser\n ? makeBrowserStreamIterator(stream as ReadableStream, options)\n : makeNodeStreamIterator(stream as Readable, options);\n}\n\n/**\n * Returns an async iterable that reads from a DOM (browser) stream\n * @param stream stream to iterate from\n * @see https://jakearchibald.com/2017/async-iterators-and-generators/#making-streams-iterate\n */\nasync function* makeBrowserStreamIterator(\n stream: ReadableStream,\n options?: StreamIteratorOptions\n): AsyncIterable<ArrayBuffer> {\n // WhatWG: stream is supposed to have a `getIterator` method\n // if (typeof stream.getIterator === 'function') {\n // return stream.getIterator();\n // }\n // if (typeof stream[Symbol.asyncIterator] === 'function') {\n // return makeToArrayBufferIterator(stream);\n // }\n\n // In the browser, we first need to get a lock on the stream\n const reader = stream.getReader();\n\n let nextBatchPromise: Promise<{done?: boolean; value?: Uint8Array}> | undefined;\n\n try {\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const currentBatchPromise = nextBatchPromise || reader.read();\n // Issue a read for an additional batch, while we await the next batch\n // Idea is to make fetching happen in parallel with processing / parsing\n if (options?._streamReadAhead) {\n nextBatchPromise = reader.read();\n }\n // Read from the stream\n // value is a Uint8Array\n const {done, value} = await currentBatchPromise;\n // Exit if we're done\n if (done) {\n return;\n }\n // Else yield the chunk\n yield toArrayBuffer(value);\n }\n } catch (error) {\n // TODO - examples makes it look like this should always be called,\n // but that generates exceptions so only call it if we do not reach the end\n reader.releaseLock();\n }\n}\n\n/**\n * Returns an async iterable that reads from a DOM (browser) stream\n * @param stream stream to iterate from\n * @note Requires Node.js >= 10\n */\nasync function* makeNodeStreamIterator(\n stream: Readable,\n options?: StreamIteratorOptions\n): AsyncIterable<ArrayBuffer> {\n // Hacky test for node version to ensure we don't call bad polyfills\n // NODE 10+: stream is an asyncIterator\n for await (const chunk of stream) {\n yield toArrayBuffer(chunk); // Coerce each chunk to ArrayBuffer\n }\n}\n/* TODO - remove NODE < 10\n * @see https://github.com/bustle/streaming-iterables, MIT license\n *\n if (typeof stream[Symbol.asyncIterator] === 'function') {\n return;\n }\n\n // TODO - check if is this ever used in Node 10+?\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const data = stream.read();\n if (data !== null) {\n yield toArrayBuffer(data);\n // eslint-disable-next-line no-continue\n continue;\n }\n if (stream._readableState?.ended) {\n return;\n }\n await onceReadable(stream);\n }\n\nasync function onceReadable(stream: Readable): Promise<any> {\n return new Promise((resolve) => {\n stream.once('readable', resolve);\n });\n}\n */\n","import type {ReadStream} from 'fs';\n\nimport {makeStringIterator} from './make-string-iterator';\nimport {makeArrayBufferIterator} from './make-array-buffer-iterator';\nimport {makeBlobIterator} from './make-blob-iterator';\nimport type {StreamIteratorOptions} from './make-stream-iterator';\nimport {makeStreamIterator} from './make-stream-iterator';\nimport {isBlob, isReadableStream, isResponse} from '../../javascript-utils/is-type';\n\n/**\n * @param [options.chunkSize]\n */\nexport type IteratorOptions = StreamIteratorOptions & {\n chunkSize?: number;\n};\n\n/**\n * Returns an iterator that breaks its input into chunks and yields them one-by-one.\n * @param data\n * @param options\n * @returns\n * This function can e.g. be used to enable data sources that can only be read atomically\n * (such as `Blob` and `File` via `FileReader`) to still be parsed in batches.\n */\nexport function makeIterator(\n data: ArrayBuffer | string | Blob | Response | ReadableStream | ReadStream,\n options?: IteratorOptions\n): AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer> {\n if (typeof data === 'string') {\n // Note: Converts string chunks to binary\n return makeStringIterator(data, options);\n }\n if (data instanceof ArrayBuffer) {\n return makeArrayBufferIterator(data, options);\n }\n if (isBlob(data)) {\n return makeBlobIterator(data as Blob, options);\n }\n if (isReadableStream(data)) {\n return makeStreamIterator(data as ReadableStream, options);\n }\n if (isResponse(data)) {\n const response = data as Response;\n return makeStreamIterator(response.body as ReadableStream, options);\n }\n throw new Error('makeIterator');\n}\n","import type {\n DataType,\n SyncDataType,\n BatchableDataType,\n Loader,\n LoaderOptions\n} from '@loaders.gl/loader-utils';\nimport {concatenateArrayBuffersAsync} from '@loaders.gl/loader-utils';\nimport {\n isResponse,\n isReadableStream,\n isAsyncIterable,\n isIterable,\n isIterator,\n isBlob,\n isBuffer\n} from '../../javascript-utils/is-type';\nimport {makeIterator} from '../../iterators/make-iterator/make-iterator';\nimport {checkResponse, makeResponse} from '../utils/response-utils';\n\nconst ERR_DATA = 'Cannot convert supplied data type';\n\n// eslint-disable-next-line complexity\nexport function getArrayBufferOrStringFromDataSync(\n data: SyncDataType,\n loader: Loader,\n options: LoaderOptions\n): ArrayBuffer | string {\n if (loader.text && typeof data === 'string') {\n return data;\n }\n\n if (isBuffer(data)) {\n // @ts-ignore\n data = data.buffer;\n }\n\n if (data instanceof ArrayBuffer) {\n const arrayBuffer = data;\n if (loader.text && !loader.binary) {\n const textDecoder = new TextDecoder('utf8');\n return textDecoder.decode(arrayBuffer);\n }\n return arrayBuffer;\n }\n\n // We may need to handle offsets\n if (ArrayBuffer.isView(data)) {\n // TextDecoder is invoked on typed arrays and will handle offsets\n if (loader.text && !loader.binary) {\n const textDecoder = new TextDecoder('utf8');\n return textDecoder.decode(data);\n }\n\n let arrayBuffer = data.buffer;\n\n // Since we are returning the underlying arrayBuffer, we must create a new copy\n // if this typed array / Buffer is a partial view into the ArryayBuffer\n // TODO - this is a potentially unnecessary copy\n const byteLength = data.byteLength || data.length;\n if (data.byteOffset !== 0 || byteLength !== arrayBuffer.byteLength) {\n // console.warn(`loaders.gl copying arraybuffer of length ${byteLength}`);\n arrayBuffer = arrayBuffer.slice(data.byteOffset, data.byteOffset + byteLength);\n }\n return arrayBuffer;\n }\n\n throw new Error(ERR_DATA);\n}\n\n// Convert async iterator to a promise\nexport async function getArrayBufferOrStringFromData(\n data: DataType,\n loader: Loader,\n options: LoaderOptions\n): Promise<ArrayBuffer | string> {\n const isArrayBuffer = data instanceof ArrayBuffer || ArrayBuffer.isView(data);\n if (typeof data === 'string' || isArrayBuffer) {\n return getArrayBufferOrStringFromDataSync(data as string | ArrayBuffer, loader, options);\n }\n\n // Blobs and files are FileReader compatible\n if (isBlob(data)) {\n data = await makeResponse(data);\n }\n\n if (isResponse(data)) {\n const response = data as Response;\n await checkResponse(response);\n return loader.binary ? await response.arrayBuffer() : await response.text();\n }\n\n if (isReadableStream(data)) {\n // @ts-expect-error TS2559 options type\n data = makeIterator(data as ReadableStream, options);\n }\n\n if (isIterable(data) || isAsyncIterable(data)) {\n // Assume arrayBuffer iterator - attempt to concatenate\n return concatenateArrayBuffersAsync(data as AsyncIterable<ArrayBuffer>);\n }\n\n throw new Error(ERR_DATA);\n}\n\nexport async function getAsyncIterableFromData(\n data: BatchableDataType,\n options: LoaderOptions\n): Promise<AsyncIterable<ArrayBuffer> | Iterable<ArrayBuffer>> {\n if (isIterator(data)) {\n return data as AsyncIterable<ArrayBuffer>;\n }\n\n if (isResponse(data)) {\n const response = data as Response;\n // Note Since this function is not async, we currently can't load error message, just status\n await checkResponse(response);\n // TODO - bug in polyfill, body can be a Promise under Node.js\n // eslint-disable-next-line @typescript-eslint/await-thenable\n const body = await response.body;\n // TODO - body can be null?\n return makeIterator(body as ReadableStream<Uint8Array>, options as any);\n }\n\n if (isBlob(data) || isReadableStream(data)) {\n return makeIterator(data as Blob | ReadableStream, options as any);\n }\n\n if (isAsyncIterable(data)) {\n return data[Symbol.asyncIterator]();\n }\n\n return getIterableFromData(data);\n}\n\nexport async function getReadableStream(data: BatchableDataType): Promise<ReadableStream> {\n if (isReadableStream(data)) {\n return data as ReadableStream;\n }\n if (isResponse(data)) {\n // @ts-ignore\n return data.body;\n }\n const response = await makeResponse(data);\n // @ts-ignore\n return response.body;\n}\n\n// HELPERS\n\nfunction getIterableFromData(data) {\n // generate an iterator that emits a single chunk\n if (ArrayBuffer.isView(data)) {\n return (function* oneChunk() {\n yield data.buffer;\n })();\n }\n\n if (data instanceof ArrayBuffer) {\n return (function* oneChunk() {\n yield data;\n })();\n }\n\n if (isIterator(data)) {\n return data;\n }\n\n if (isIterable(data)) {\n return data[Symbol.iterator]();\n }\n\n throw new Error(ERR_DATA);\n}\n","import type {Loader, LoaderOptions, LoaderContext} from '@loaders.gl/loader-utils';\nimport {getFetchFunction} from './option-utils';\n\n/**\n * \"sub\" loaders invoked by other loaders get a \"context\" injected on `this`\n * The context will inject core methods like `parse` and contain information\n * about loaders and options passed in to the top-level `parse` call.\n *\n * @param context\n * @param options\n * @param previousContext\n */\nexport function getLoaderContext(\n context: Omit<LoaderContext, 'fetch'> & Partial<Pick<LoaderContext, 'fetch'>>,\n options?: LoaderOptions,\n previousContext: LoaderContext | null = null\n): LoaderContext {\n // For recursive calls, we already have a context\n // TODO - add any additional loaders to context?\n if (previousContext) {\n return previousContext;\n }\n\n const resolvedContext: LoaderContext = {\n fetch: getFetchFunction(options, context),\n ...context\n };\n\n // Recursive loading does not use single loader\n if (!Array.isArray(resolvedContext.loaders)) {\n resolvedContext.loaders = null;\n }\n\n return resolvedContext;\n}\n\n// eslint-disable-next-line complexity\nexport function getLoadersFromContext(\n loaders: Loader[] | Loader | undefined,\n context?: LoaderContext\n) {\n // A single non-array loader is force selected, but only on top-level (context === null)\n if (!context && loaders && !Array.isArray(loaders)) {\n return loaders;\n }\n\n // Create a merged list\n let candidateLoaders;\n if (loaders) {\n candidateLoaders = Array.isArray(loaders) ? loaders : [loaders];\n }\n if (context && context.loaders) {\n const contextLoaders = Array.isArray(context.loaders) ? context.loaders : [context.loaders];\n candidateLoaders = candidateLoaders ? [...candidateLoaders, ...contextLoaders] : contextLoaders;\n }\n // If no loaders, return null to look in globally registered loaders\n return candidateLoaders && candidateLoaders.length ? candidateLoaders : null;\n}\n","import type {LoaderContext, LoaderOptions, Loader} from '@loaders.gl/loader-utils';\nimport {compareArrayBuffers} from '@loaders.gl/loader-utils';\nimport {normalizeLoader} from '../loader-utils/normalize-loader';\nimport {getResourceUrlAndType} from '../utils/resource-utils';\nimport {getRegisteredLoaders} from './register-loaders';\nimport {isBlob} from '../../javascript-utils/is-type';\n\nconst EXT_PATTERN = /\\.([^.]+)$/;\n\n// TODO - Need a variant that peeks at streams for parseInBatches\n// TODO - Detect multiple matching loaders? Use heuristics to grade matches?\n// TODO - Allow apps to pass context to disambiguate between multiple matches (e.g. multiple .json formats)?\n\n/**\n * Find a loader that matches file extension and/or initial file content\n * Search the loaders array argument for a loader that matches url extension or initial data\n * Returns: a normalized loader\n * @param data data to assist\n * @param loaders\n * @param options\n * @param context used internally, applications should not provide this parameter\n */\nexport async function selectLoader(\n data: Response | Blob | ArrayBuffer | string,\n loaders: Loader[] | Loader = [],\n options?: LoaderOptions,\n context?: LoaderContext\n): Promise<Loader | null> {\n if (!validHTTPResponse(data)) {\n return null;\n }\n\n // First make a sync attempt, disabling exceptions\n let loader = selectLoaderSync(data, loaders, {...options, nothrow: true}, context);\n if (loader) {\n return loader;\n }\n\n // For Blobs and Files, try to asynchronously read a small initial slice and test again with that\n // to see if we can detect by initial content\n if (isBlob(data)) {\n data = await (data as Blob).slice(0, 10).arrayBuffer();\n loader = selectLoaderSync(data, loaders, options, context);\n }\n\n // no loader available\n if (!loader && !options?.nothrow) {\n throw new Error(getNoValidLoaderMessage(data));\n }\n\n return loader;\n}\n\n/**\n * Find a loader that matches file extension and/or initial file content\n * Search the loaders array argument for a loader that matches url extension or initial data\n * Returns: a normalized loader\n * @param data data to assist\n * @param loaders\n * @param options\n * @param context used internally, applications should not provide this parameter\n */\nexport function selectLoaderSync(\n data: Response | Blob | ArrayBuffer | string,\n loaders: Loader[] | Loader = [],\n options?: LoaderOptions,\n context?: LoaderContext\n): Loader | null {\n if (!validHTTPResponse(data)) {\n return null;\n }\n\n // eslint-disable-next-line complexity\n // if only a single loader was provided (not as array), force its use\n // TODO - Should this behavior be kept and documented?\n if (loaders && !Array.isArray(loaders)) {\n // TODO - remove support for legacy loaders\n return normalizeLoader(loaders);\n }\n\n // Build list of candidate loaders that will be searched in order for a match\n let candidateLoaders: Loader[] = [];\n // First search supplied loaders\n if (loaders) {\n candidateLoaders = candidateLoaders.concat(loaders);\n }\n // Then fall back to registered loaders\n if (!options?.ignoreRegisteredLoaders) {\n candidateLoaders.push(...getRegisteredLoaders());\n }\n\n // TODO - remove support for legacy loaders\n normalizeLoaders(candidateLoaders);\n\n const loader = selectLoaderInternal(data, candidateLoaders, options, context);\n\n // no loader available\n if (!loader && !options?.nothrow) {\n throw new Error(getNoValidLoaderMessage(data));\n }\n\n return loader;\n}\n\n/** Implements loaders selection logic */\nfunction selectLoaderInternal(\n data: Response | Blob | ArrayBuffer | string,\n loaders: Loader[],\n options?: LoaderOptions,\n context?: LoaderContext\n) {\n const {url, type} = getResourceUrlAndType(data);\n\n const testUrl = url || context?.url;\n\n let loader: Loader | null = null;\n\n // if options.mimeType is supplied, it takes precedence\n if (options?.mimeType) {\n loader = findLoaderByMIMEType(loaders, options?.mimeType);\n }\n // Look up loader by url\n loader = loader || findLoaderByUrl(loaders, testUrl);\n // Look up loader by mime type\n loader = loader || findLoaderByMIMEType(loaders, type);\n // Look for loader via initial bytes (Note: not always accessible (e.g. Response, stream, async iterator)\n loader = loader || findLoaderByInitialBytes(loaders, data);\n // Look up loader by fallback mime type\n loader = loader || findLoaderByMIMEType(loaders, options?.fallbackMimeType);\n\n return loader;\n}\n\n/** Check HTTP Response */\nfunction validHTTPResponse(data: any): boolean {\n // HANDLE HTTP status\n if (data instanceof Response) {\n // 204 - NO CONTENT. This handles cases where e.g. a tile server responds with 204 for a missing tile\n if (data.status === 204) {\n return false;\n }\n }\n return true;\n}\n\nfunction getNoValidLoaderMessage(data): string {\n const {url, type} = getResourceUrlAndType(data);\n\n let message = 'No valid loader found';\n if (data) {\n message += ` data: \"${getFirstCharacters(data)}\", contentType: \"${type}\"`;\n }\n if (url) {\n message += ` url: ${url}`;\n }\n return message;\n}\n\nfunction normalizeLoaders(loaders: Loader[]): void {\n for (const loader of loaders) {\n normalizeLoader(loader);\n }\n}\n\n// TODO - Would be nice to support http://example.com/file.glb?parameter=1\n// E.g: x = new URL('http://example.com/file.glb?load=1'; x.pathname\nfunction findLoaderByUrl(loaders: Loader[], url?: string): Loader | null {\n // Get extension\n const match = url && EXT_PATTERN.exec(url);\n const extension = match && match[1];\n return extension ? findLoaderByExtension(loaders, extension) : null;\n}\n\nfunction findLoaderByExtension(loaders: Loader[], extension: string): Loader | null {\n extension = extension.toLowerCase();\n\n for (const loader of loaders) {\n for (const loaderExtension of loader.extensions) {\n if (loaderExtension.toLowerCase() === extension) {\n return loader;\n }\n }\n }\n return null;\n}\n\nfunction findLoaderByMIMEType(loaders, mimeType) {\n for (const loader of loaders) {\n if (loader.mimeTypes && loader.mimeTypes.includes(mimeType)) {\n return loader;\n }\n\n // Support referring to loaders using the \"unregistered tree\"\n // https://en.wikipedia.org/wiki/Media_type#Unregistered_tree\n if (mimeType === `application/x.${loader.id}`) {\n return loader;\n }\n }\n return null;\n}\n\nfunction findLoaderByInitialBytes(loaders, data) {\n if (!data) {\n return null;\n }\n\n for (const loader of loaders) {\n if (typeof data === 'string') {\n if (testDataAgainstText(data, loader)) {\n return loader;\n }\n } else if (ArrayBuffer.isView(data)) {\n // Typed Arrays can have offsets into underlying buffer\n if (testDataAgainstBinary(data.buffer, data.byteOffset, loader)) {\n return loader;\n }\n } else if (data instanceof ArrayBuffer) {\n const byteOffset = 0;\n if (testDataAgainstBinary(data, byteOffset, loader)) {\n return loader;\n }\n }\n // TODO Handle streaming case (requires creating a new AsyncIterator)\n }\n return null;\n}\n\nfunction testDataAgainstText(data, loader) {\n if (loader.testText) {\n return loader.testText(data);\n }\n\n const tests = Array.isArray(loader.tests) ? loader.tests : [loader.tests];\n return tests.some((test) => data.startsWith(test));\n}\n\nfunction testDataAgainstBinary(data, byteOffset, loader) {\n const tests = Array.isArray(loader.tests) ? loader.tests : [loader.tests];\n return tests.some((test) => testBinary(data, byteOffset, loader, test));\n}\n\nfunction testBinary(data, byteOffset, loader, test) {\n if (test instanceof ArrayBuffer) {\n return compareArrayBuffers(test, data, test.byteLength);\n }\n switch (typeof test) {\n case 'function':\n return test(data, loader);\n\n case 'string':\n // Magic bytes check: If `test` is a string, check if binary data starts with that strings\n const magic = getMagicString(data, byteOffset, test.length);\n return test === magic;\n\n default:\n return false;\n }\n}\n\nfunction getFirstCharacters(data, length = 5) {\n if (typeof data === 'string') {\n return data.slice(0, length);\n } else if (ArrayBuffer.isView(data)) {\n // Typed Arrays can have offsets into underlying buffer\n return getMagicString(data.buffer, data.byteOffset, length);\n } else if (data instanceof ArrayBuffer) {\n const byteOffset = 0;\n return getMagicString(data, byteOffset, length);\n }\n return '';\n}\n\nfunction getMagicString(arrayBuffer, byteOffset, length) {\n if (arrayBuffer.byteLength < byteOffset + length) {\n return '';\n }\n const dataView = new DataView(arrayBuffer);\n let magic = '';\n for (let i = 0; i < length; i++) {\n magic += String.fromCharCode(dataView.getUint8(byteOffset + i));\n }\n return magic;\n}\n","import type {DataType, Loader, LoaderContext, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {assert, validateWorkerVersion} from '@loaders.gl/worker-utils';\nimport {parseWithWorker, canParseWithWorker} from '@loaders.gl/loader-utils';\nimport {isLoaderObject} from '../loader-utils/normalize-loader';\nimport {normalizeOptions} from '../loader-utils/option-utils';\nimport {getArrayBufferOrStringFromData} from '../loader-utils/get-data';\nimport {getLoaderContext, getLoadersFromContext} from '../loader-utils/loader-context';\nimport {getResourceUrlAndType} from '../utils/resource-utils';\nimport {selectLoader} from './select-loader';\n\n/**\n * Parses `data` using a specified loader\n * @param data\n * @param loaders\n * @param options\n * @param context\n */\nexport async function parse(\n data: DataType | Promise<DataType>,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n): Promise<any> {\n assert(!context || typeof context === 'object'); // parse no longer accepts final url\n\n // Signature: parse(data, options, context | url)\n // Uses registered loaders\n if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {\n context = undefined; // context not supported in short signature\n options = loaders as LoaderOptions;\n loaders = undefined;\n }\n\n data = await data; // Resolve any promise\n options = options || {};\n\n // Extract a url for auto detection\n const {url} = getResourceUrlAndType(data);\n\n // Chooses a loader (and normalizes it)\n // Also use any loaders in the context, new loaders take priority\n const typedLoaders = loaders as Loader | Loader[] | undefined;\n const candidateLoaders = getLoadersFromContext(typedLoaders, context);\n // todo hacky type cast\n const loader = await selectLoader(data as ArrayBuffer, candidateLoaders, options);\n // Note: if no loader was found, if so just return null\n if (!loader) {\n return null;\n }\n\n // Normalize options\n options = normalizeOptions(options, loader, candidateLoaders, url);\n\n // Get a context (if already present, will be unchanged)\n context = getLoaderContext({url, parse, loaders: candidateLoaders}, options, context);\n\n return await parseWithLoader(loader, data, options, context);\n}\n\n// TODO: support progress and abort\n// TODO - should accept loader.parseAsyncIterator and concatenate.\nasync function parseWithLoader(loader, data, options, context) {\n validateWorkerVersion(loader);\n\n data = await getArrayBufferOrStringFromData(data, loader, options);\n\n // First check for synchronous text parser, wrap results in promises\n if (loader.parseTextSync && typeof data === 'string') {\n options.dataType = 'text';\n return loader.parseTextSync(data, options, context, loader);\n }\n\n // If we have a workerUrl and the loader can parse the given options efficiently in a worker\n if (canParseWithWorker(loader, options)) {\n return await parseWithWorker(loader, data, options, context, parse);\n }\n\n // Check for asynchronous parser\n if (loader.parseText && typeof data === 'string') {\n return await loader.parseText(data, options, context, loader);\n }\n\n if (loader.parse) {\n return await loader.parse(data, options, context, loader);\n }\n\n // This should not happen, all sync loaders should also offer `parse` function\n assert(!loader.parseSync);\n\n // TBD - If asynchronous parser not available, return null\n throw new Error(`${loader.id} loader - no parser found and worker is disabled`);\n}\n","import type {DataType, Loader, LoaderContext, LoaderOptions} from '@loaders.gl/loader-utils';\nimport {isBlob} from '../../javascript-utils/is-type';\nimport {isLoaderObject} from '../loader-utils/normalize-loader';\nimport {getFetchFunction} from '../loader-utils/option-utils';\n\nimport {parse} from './parse';\n\n/**\n * Parses `data` using a specified loader\n * Note: Load does duplicate a lot of parse.\n * it can also call fetchFile on string urls, which `parse` won't do.\n * @param data\n * @param loaders\n * @param options\n * @param context\n */\n// implementation signature\nexport async function load(\n url: string | DataType,\n loaders?: Loader | Loader[] | LoaderOptions,\n options?: LoaderOptions,\n context?: LoaderContext\n): Promise<any> {\n // Signature: load(url, options)\n if (!Array.isArray(loaders) && !isLoaderObject(loaders)) {\n context = undefined; // context not supported in short signature\n options = loaders as LoaderOptions;\n loaders = undefined;\n }\n\n // Select fetch function\n const fetch = getFetchFunction(options);\n\n // at this point, `url` could be already loaded binary data\n let data = url;\n // url is a string, fetch the url\n if (typeof url === 'string') {\n data = await fetch(url);\n // URL is Blob or File, fetchFile handles it (alt: we could generate ObjectURL here)\n }\n\n if (isBlob(url)) {\n // The fetch response object will contain blob.name\n data = await fetch(url);\n }\n\n // Data is loaded (at least we have a `Response` object) so time to hand over to `parse`\n return await parse(data, loaders, options);\n}\n","export default function(d) {\n var x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","import warning from 'tiny-warning';\nimport { createRule } from 'jss';\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\n\nvar functionPlugin = function functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = createRule(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n }\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (process.env.NODE_ENV === 'development') {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n process.env.NODE_ENV !== \"production\" ? warning(false, '[JSS] Function values inside function rules are not supported.') : void 0;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n};\n\nexport default functionPlugin;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { RuleList } from 'jss';\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new RuleList(_extends({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (rule) this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString() {\n return this.rules.toString();\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, _extends({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n sheet.addRule(name, rules[name], _extends({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule, sheet) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n sheet.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule, sheet) {\n if (rule.type !== 'style' || !sheet) return;\n handleNestedGlobalContainerRule(rule, sheet);\n handlePrefixedGlobalRule(rule, sheet);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\nexport default jssGlobal;\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport warning from 'tiny-warning';\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n return rule.selector;\n }\n\n process.env.NODE_ENV !== \"production\" ? warning(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : void 0;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return _extends({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = _extends({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n container.addRule(selector, style[prop], _extends({}, options, {\n selector: selector\n }));\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options).addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\nexport default jssNested;\n","/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\nexport default hyphenateStyleName\n","import hyphenate from 'hyphenate-style-name';\n\n/**\n * Convert camel cased property names to dash separated.\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : hyphenate(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = hyphenate(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default camelCase;\n","import { hasCSSTOMSupport } from 'jss';\n\nvar px = hasCSSTOMSupport && CSS ? CSS.px : 'px';\nvar ms = hasCSSTOMSupport && CSS ? CSS.ms : 'ms';\nvar percent = hasCSSTOMSupport && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n 'border-block': px,\n 'border-block-end': px,\n 'border-block-end-width': px,\n 'border-block-start': px,\n 'border-block-start-width': px,\n 'border-block-width': px,\n 'border-inline': px,\n 'border-inline-end': px,\n 'border-inline-end-width': px,\n 'border-inline-start': px,\n 'border-inline-start-width': px,\n 'border-inline-width': px,\n 'border-start-start-radius': px,\n 'border-start-end-radius': px,\n 'border-end-start-radius': px,\n 'border-end-end-radius': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n 'margin-block': px,\n 'margin-block-end': px,\n 'margin-block-start': px,\n 'margin-inline': px,\n 'margin-inline-end': px,\n 'margin-inline-start': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n 'padding-block': px,\n 'padding-block-end': px,\n 'padding-block-start': px,\n 'padding-inline': px,\n 'padding-inline-end': px,\n 'padding-inline-start': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n inset: px,\n 'inset-block': px,\n 'inset-block-end': px,\n 'inset-block-start': px,\n 'inset-inline': px,\n 'inset-inline-end': px,\n 'inset-inline-start': px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-decoration-thickness': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n gap: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'row-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\n\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var key in obj) {\n newObj[key] = obj[key];\n newObj[key.replace(regExp, replace)] = obj[key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (value == null) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n } // eslint-disable-next-line no-restricted-globals\n\n } else if (typeof value === 'number' && isNaN(value) === false) {\n var unit = options[prop] || units[prop]; // Add the unit if available, except for the special case of 0px.\n\n if (unit && !(value === 0 && unit === px)) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default defaultUnit;\n","import isInBrowser from 'is-in-browser';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\n\n// Export javascript style and css style vendor prefixes.\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = isInBrowser && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (isInBrowser) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n}\n\n// https://caniuse.com/#search=appearance\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\n\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n}\n\n// but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n};\n\n// See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\n// Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\n\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n};\n\n// https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\n\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n};\n\n// plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, _toConsumableArray(p.noPrefill));\n return a;\n}, []);\n\nvar el;\nvar cache = {};\n\nif (isInBrowser) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n }\n\n // For server-side rendering.\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (isInBrowser) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if (process.env.NODE_ENV !== 'benchmark' && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\nexport { prefix, supportedKeyframes, supportedProperty, supportedValue };\n","import { supportedKeyframes, supportedValue, supportedProperty } from 'css-vendor';\nimport { toCssValue } from 'jss';\n\n/**\n * Add vendor prefix to a property name when needed.\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = supportedKeyframes(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = supportedProperty(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = supportedValue(supportedProp, toCssValue(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return supportedValue(prop, toCssValue(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\nexport default jssVendorPrefixer;\n","/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\nexport default jssPropsSort;\n","import functions from 'jss-plugin-rule-value-function';\nimport global from 'jss-plugin-global';\nimport nested from 'jss-plugin-nested';\nimport camelCase from 'jss-plugin-camel-case';\nimport defaultUnit from 'jss-plugin-default-unit';\nimport vendorPrefixer from 'jss-plugin-vendor-prefixer';\nimport propsSort from 'jss-plugin-props-sort'; // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nexport default function jssPreset() {\n return {\n plugins: [functions(), global(), nested(), camelCase(), defaultUnit(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : vendorPrefixer(), propsSort()]\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@material-ui/utils';\nimport createGenerateClassName from '../createGenerateClassName';\nimport { create } from 'jss';\nimport jssPreset from '../jssPreset'; // Default JSS instance.\n\nvar jss = create(jssPreset()); // Use a singleton or the provided one by the context.\n//\n// The counter-based approach doesn't tolerate any mistake.\n// It's much safer to use the same counter everywhere.\n\nvar generateClassName = createGenerateClassName(); // Exported for test purposes\n\nexport var sheetsManager = new Map();\nvar defaultOptions = {\n disableGeneration: false,\n generateClassName: generateClassName,\n jss: jss,\n sheetsCache: null,\n sheetsManager: sheetsManager,\n sheetsRegistry: null\n};\nexport var StylesContext = React.createContext(defaultOptions);\n\nif (process.env.NODE_ENV !== 'production') {\n StylesContext.displayName = 'StylesContext';\n}\n\nvar injectFirstNode;\nexport default function StylesProvider(props) {\n var children = props.children,\n _props$injectFirst = props.injectFirst,\n injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst,\n _props$disableGenerat = props.disableGeneration,\n disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat,\n localOptions = _objectWithoutProperties(props, [\"children\", \"injectFirst\", \"disableGeneration\"]);\n\n var outerOptions = React.useContext(StylesContext);\n\n var context = _extends({}, outerOptions, {\n disableGeneration: disableGeneration\n }, localOptions);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window === 'undefined' && !context.sheetsManager) {\n console.error('Material-UI: You need to use the ServerStyleSheets API when rendering on the server.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (context.jss.options.insertionPoint && injectFirst) {\n console.error('Material-UI: You cannot use a custom insertionPoint and <StylesContext injectFirst> at the same time.');\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (injectFirst && localOptions.jss) {\n console.error('Material-UI: You cannot use the jss and injectFirst props at the same time.');\n }\n }\n\n if (!context.jss.options.insertionPoint && injectFirst && typeof window !== 'undefined') {\n if (!injectFirstNode) {\n var head = document.head;\n injectFirstNode = document.createComment('mui-inject-first');\n head.insertBefore(injectFirstNode, head.firstChild);\n }\n\n context.jss = create({\n plugins: jssPreset().plugins,\n insertionPoint: injectFirstNode\n });\n }\n\n return /*#__PURE__*/React.createElement(StylesContext.Provider, {\n value: context\n }, children);\n}\nprocess.env.NODE_ENV !== \"production\" ? StylesProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node.isRequired,\n\n /**\n * You can disable the generation of the styles with this option.\n * It can be useful when traversing the React tree outside of the HTML\n * rendering step on the server.\n * Let's say you are using react-apollo to extract all\n * the queries made by the interface server-side - you can significantly speed up the traversal with this prop.\n */\n disableGeneration: PropTypes.bool,\n\n /**\n * JSS's class name generator.\n */\n generateClassName: PropTypes.func,\n\n /**\n * By default, the styles are injected last in the <head> element of the page.\n * As a result, they gain more specificity than any other style sheet.\n * If you want to override Material-UI's styles, set this prop.\n */\n injectFirst: PropTypes.bool,\n\n /**\n * JSS's instance.\n */\n jss: PropTypes.object,\n\n /**\n * @ignore\n */\n serverGenerateClassName: PropTypes.func,\n\n /**\n * @ignore\n *\n * Beta feature.\n *\n * Cache for the sheets.\n */\n sheetsCache: PropTypes.object,\n\n /**\n * @ignore\n *\n * The sheetsManager is used to deduplicate style sheet injection in the page.\n * It's deduplicating using the (theme, styles) couple.\n * On the server, you should provide a new instance for each request.\n */\n sheetsManager: PropTypes.object,\n\n /**\n * @ignore\n *\n * Collect the sheets.\n */\n sheetsRegistry: PropTypes.object\n} : void 0;\n\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? StylesProvider.propTypes = exactProp(StylesProvider.propTypes) : void 0;\n}","import type {ImageTypeEnum} from '../../types';\nimport {global, isBrowser} from '../utils/globals';\n\n// @ts-ignore TS2339: Property does not exist on type\nconst {_parseImageNode} = global;\n\nconst IMAGE_SUPPORTED = typeof Image !== 'undefined'; // NOTE: \"false\" positives if jsdom is installed\nconst IMAGE_BITMAP_SUPPORTED = typeof ImageBitmap !== 'undefined';\nconst NODE_IMAGE_SUPPORTED = Boolean(_parseImageNode);\nconst DATA_SUPPORTED = isBrowser ? true : NODE_IMAGE_SUPPORTED;\n\n/**\n * Checks if a loaders.gl image type is supported\n * @param type image type string\n */\nexport function isImageTypeSupported(type: string): boolean {\n switch (type) {\n case 'auto':\n // Should only ever be false in Node.js, if polyfills have not been installed...\n return IMAGE_BITMAP_SUPPORTED || IMAGE_SUPPORTED || DATA_SUPPORTED;\n\n case 'imagebitmap':\n return IMAGE_BITMAP_SUPPORTED;\n case 'image':\n return IMAGE_SUPPORTED;\n case 'data':\n return DATA_SUPPORTED;\n\n default:\n throw new Error(`@loaders.gl/images: image ${type} not supported in this environment`);\n }\n}\n\n/**\n * Returns the \"most performant\" supported image type on this platform\n * @returns image type string\n */\nexport function getDefaultImageType(): ImageTypeEnum {\n if (IMAGE_BITMAP_SUPPORTED) {\n return 'imagebitmap';\n }\n if (IMAGE_SUPPORTED) {\n return 'image';\n }\n if (DATA_SUPPORTED) {\n return 'data';\n }\n\n // This should only happen in Node.js\n throw new Error('Install \\'@loaders.gl/polyfills\\' to parse images under Node.js');\n}\n","import type {ImageType, ImageTypeEnum, ImageDataType} from '../../types';\n\nexport function isImage(image: ImageType): boolean {\n return Boolean(getImageTypeOrNull(image));\n}\n\nexport function deleteImage(image: ImageType): void {\n switch (getImageType(image)) {\n case 'imagebitmap':\n (image as ImageBitmap).close();\n break;\n default:\n // Nothing to do for images and image data objects\n }\n}\n\nexport function getImageType(image: ImageType): ImageTypeEnum {\n const format = getImageTypeOrNull(image);\n if (!format) {\n throw new Error('Not an image');\n }\n return format;\n}\n\nexport function getImageSize(image: ImageType): {width: number; height: number} {\n return getImageData(image);\n}\n\nexport function getImageData(image: ImageType): ImageDataType | ImageData {\n switch (getImageType(image)) {\n case 'data':\n return image as unknown as ImageData;\n\n case 'image':\n case 'imagebitmap':\n // Extract the image data from the image via a canvas\n const canvas = document.createElement('canvas');\n // TODO - reuse the canvas?\n const context = canvas.getContext('2d');\n if (!context) {\n throw new Error('getImageData');\n }\n // @ts-ignore\n canvas.width = image.width;\n // @ts-ignore\n canvas.height = image.height;\n // @ts-ignore\n context.drawImage(image, 0, 0);\n // @ts-ignore\n return context.getImageData(0, 0, image.width, image.height);\n\n default:\n throw new Error('getImageData');\n }\n}\n\n// PRIVATE\n\n// eslint-disable-next-line complexity\nfunction getImageTypeOrNull(image) {\n if (typeof ImageBitmap !== 'undefined' && image instanceof ImageBitmap) {\n return 'imagebitmap';\n }\n if (typeof Image !== 'undefined' && image instanceof Image) {\n return 'image';\n }\n if (image && typeof image === 'object' && image.data && image.width && image.height) {\n return 'data';\n }\n return null;\n}\n","// SVG parsing has limitations, e.g:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=606319\n\nconst SVG_DATA_URL_PATTERN = /^data:image\\/svg\\+xml/;\nconst SVG_URL_PATTERN = /\\.svg((\\?|#).*)?$/;\n\nexport function isSVG(url) {\n return url && (SVG_DATA_URL_PATTERN.test(url) || SVG_URL_PATTERN.test(url));\n}\n\nexport function getBlobOrSVGDataUrl(arrayBuffer, url) {\n if (isSVG(url)) {\n // Prepare a properly tagged data URL, and load using normal mechanism\n const textDecoder = new TextDecoder();\n let xmlText = textDecoder.decode(arrayBuffer);\n // TODO Escape in browser to support e.g. Chinese characters\n try {\n if (typeof unescape === 'function' && typeof encodeURIComponent === 'function') {\n xmlText = unescape(encodeURIComponent(xmlText));\n }\n } catch (error) {\n throw new Error((error as Error).message);\n }\n // base64 encoding is safer. utf-8 fails in some browsers\n const src = `data:image/svg+xml;base64,${btoa(xmlText)}`;\n return src;\n }\n return getBlob(arrayBuffer, url);\n}\n\nexport function getBlob(arrayBuffer, url) {\n if (isSVG(url)) {\n // https://bugs.chromium.org/p/chromium/issues/detail?id=606319\n // return new Blob([new Uint8Array(arrayBuffer)], {type: 'image/svg+xml'});\n throw new Error('SVG cannot be parsed directly to imagebitmap');\n }\n // TODO - how to determine mime type? Param? Sniff here?\n return new Blob([new Uint8Array(arrayBuffer)]); // MIME type not needed?\n}\n","import {getBlobOrSVGDataUrl} from './svg-utils';\n\n// Parses html image from array buffer\nexport default async function parseToImage(arrayBuffer, options, url) {\n // Note: image parsing requires conversion to Blob (for createObjectURL).\n // Potentially inefficient for not using `response.blob()` (and for File / Blob inputs)...\n // But presumably not worth adding 'blob' flag to loader objects?\n\n const blobOrDataUrl = getBlobOrSVGDataUrl(arrayBuffer, url);\n const URL = self.URL || self.webkitURL;\n const objectUrl = typeof blobOrDataUrl !== 'string' && URL.createObjectURL(blobOrDataUrl);\n try {\n return await loadToImage(objectUrl || blobOrDataUrl, options);\n } finally {\n if (objectUrl) {\n URL.revokeObjectURL(objectUrl);\n }\n }\n}\n\nexport async function loadToImage(url, options) {\n const image = new Image();\n image.src = url;\n\n // The `image.onload()` callback does not guarantee that the image has been decoded\n // so a main thread \"freeze\" can be incurred when using the image for the first time.\n // `Image.decode()` returns a promise that completes when image is decoded.\n\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode\n // Note: When calling `img.decode()`, we do not need to wait for `img.onload()`\n // Note: `HTMLImageElement.decode()` is not available in Edge and IE11\n if (options.image && options.image.decode && image.decode) {\n await image.decode();\n return image;\n }\n\n // Create a promise that tracks onload/onerror callbacks\n return await new Promise((resolve, reject) => {\n try {\n image.onload = () => resolve(image);\n image.onerror = (err) => reject(new Error(`Could not load image ${url}: ${err}`));\n } catch (error) {\n reject(error);\n }\n });\n}\n","import {isSVG, getBlob} from './svg-utils';\nimport parseToImage from './parse-to-image';\n\nconst EMPTY_OBJECT = {};\n\nlet imagebitmapOptionsSupported = true;\n\n/**\n * Asynchronously parses an array buffer into an ImageBitmap - this contains the decoded data\n * ImageBitmaps are supported on worker threads, but not supported on Edge, IE11 and Safari\n * https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap#Browser_compatibility\n *\n * TODO - createImageBitmap supports source rect (5 param overload), pass through?\n */\nexport default async function parseToImageBitmap(arrayBuffer, options, url) {\n let blob;\n\n // Cannot parse SVG directly to ImageBitmap, parse to Image first\n if (isSVG(url)) {\n // Note: this only works on main thread\n const image = await parseToImage(arrayBuffer, options, url);\n blob = image;\n } else {\n // Create blob from the array buffer\n blob = getBlob(arrayBuffer, url);\n }\n\n const imagebitmapOptions = options && options.imagebitmap;\n\n return await safeCreateImageBitmap(blob, imagebitmapOptions);\n}\n\n/**\n * Safely creates an imageBitmap with options\n * *\n * Firefox crashes if imagebitmapOptions is supplied\n * Avoid supplying if not provided or supported, remember if not supported\n */\nasync function safeCreateImageBitmap(blob, imagebitmapOptions = null) {\n if (isEmptyObject(imagebitmapOptions) || !imagebitmapOptionsSupported) {\n imagebitmapOptions = null;\n }\n\n if (imagebitmapOptions) {\n try {\n // @ts-ignore Options\n return await createImageBitmap(blob, imagebitmapOptions);\n } catch (error) {\n console.warn(error); // eslint-disable-line\n imagebitmapOptionsSupported = false;\n }\n }\n\n return await createImageBitmap(blob);\n}\n\nfunction isEmptyObject(object) {\n // @ts-ignore\n for (const key in object || EMPTY_OBJECT) {\n return false;\n }\n return true;\n}\n","import {global} from '../utils/globals';\nimport {assert} from '../utils/assert';\nimport {getBinaryImageMetadata} from '../category-api/binary-image-api';\n\n// Use polyfills if installed to p[arsed image using get-pixels\nexport default function parseToNodeImage(arrayBuffer, options) {\n const {mimeType} = getBinaryImageMetadata(arrayBuffer) || {};\n\n // @ts-ignore\n const {_parseImageNode} = global;\n assert(_parseImageNode); // '@loaders.gl/polyfills not installed'\n\n return _parseImageNode(arrayBuffer, mimeType, options);\n}\n","import {assert} from '../utils/assert';\nimport {isImageTypeSupported, getDefaultImageType} from '../category-api/image-type';\nimport {getImageData} from '../category-api/parsed-image-api';\nimport parseToImage from './parse-to-image';\nimport parseToImageBitmap from './parse-to-image-bitmap';\nimport parseToNodeImage from './parse-to-node-image';\n\n// Parse to platform defined image type (data on node, ImageBitmap or HTMLImage on browser)\n// eslint-disable-next-line complexity\nexport default async function parseImage(arrayBuffer, options, context) {\n options = options || {};\n const imageOptions = options.image || {};\n\n // The user can request a specific output format via `options.image.type`\n const imageType = imageOptions.type || 'auto';\n\n const {url} = context || {};\n\n // Note: For options.image.type === `data`, we may still need to load as `image` or `imagebitmap`\n const loadType = getLoadableImageType(imageType);\n\n let image;\n switch (loadType) {\n case 'imagebitmap':\n image = await parseToImageBitmap(arrayBuffer, options, url);\n break;\n case 'image':\n image = await parseToImage(arrayBuffer, options, url);\n break;\n case 'data':\n // Node.js loads imagedata directly\n image = await parseToNodeImage(arrayBuffer, options);\n break;\n default:\n assert(false);\n }\n\n // Browser: if options.image.type === 'data', we can now extract data from the loaded image\n if (imageType === 'data') {\n image = getImageData(image);\n }\n\n return image;\n}\n\n// Get a loadable image type from image type\nfunction getLoadableImageType(type) {\n switch (type) {\n case 'auto':\n case 'data':\n // Browser: For image data we need still need to load using an image format\n // Node: the default image type is `data`.\n return getDefaultImageType();\n default:\n // Throw an error if not supported\n isImageTypeSupported(type);\n return type;\n }\n}\n","import type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport parseImage from './lib/parsers/parse-image';\nimport {getBinaryImageMetadata} from './lib/category-api/binary-image-api';\n\nconst EXTENSIONS = ['png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp', 'ico', 'svg'];\nconst MIME_TYPES = [\n 'image/png',\n 'image/jpeg',\n 'image/gif',\n 'image/webp',\n 'image/bmp',\n 'image/vnd.microsoft.icon',\n 'image/svg+xml'\n];\n\n/**\n * Loads a platform-specific image type\n * Note: This type can be used as input data to WebGL texture creation\n */\nexport const ImageLoader = {\n id: 'image',\n module: 'images',\n name: 'Images',\n version: VERSION,\n mimeTypes: MIME_TYPES,\n extensions: EXTENSIONS,\n parse: parseImage,\n // TODO: byteOffset, byteLength;\n tests: [(arrayBuffer) => Boolean(getBinaryImageMetadata(new DataView(arrayBuffer)))],\n options: {\n image: {\n type: 'auto',\n decode: true // if format is HTML\n }\n // imagebitmap: {} - passes (platform dependent) parameters to ImageBitmap constructor\n }\n};\n\nexport const _typecheckImageLoader: LoaderWithParser = ImageLoader;\n","// Source from https://github.com/alitaheri/normalize-scroll-left\nvar cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE 11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\n\nexport function detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n var dummy = document.createElement('div');\n var container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n var type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}","function easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};\n var _options$ease = options.ease,\n ease = _options$ease === void 0 ? easeInOutSin : _options$ease,\n _options$duration = options.duration,\n duration = _options$duration === void 0 ? 300 : _options$duration;\n var start = null;\n var from = element[property];\n var cancelled = false;\n\n var cancel = function cancel() {\n cancelled = true;\n };\n\n var step = function step(timestamp) {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n var time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(function () {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nvar styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n var onChange = props.onChange,\n other = _objectWithoutProperties(props, [\"onChange\"]);\n\n var scrollbarHeight = React.useRef();\n var nodeRef = React.useRef(null);\n\n var setMeasurements = function setMeasurements() {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n React.useEffect(function () {\n var handleResize = debounce(function () {\n var prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n React.useEffect(function () {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n style: styles,\n ref: nodeRef\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? ScrollbarSize.propTypes = {\n onChange: PropTypes.func.isRequired\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport capitalize from '../utils/capitalize';\nexport var styles = function styles(theme) {\n return {\n root: {\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n },\n colorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n vertical: {\n height: '100%',\n width: 2,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar TabIndicator = /*#__PURE__*/React.forwardRef(function TabIndicator(props, ref) {\n var classes = props.classes,\n className = props.className,\n color = props.color,\n orientation = props.orientation,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"color\", \"orientation\"]);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? TabIndicator.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n * The color of the tab indicator.\n */\n color: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateTabIndicator'\n})(TabIndicator);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z\"\n}), 'KeyboardArrowLeft');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"\n}), 'KeyboardArrowRight');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n '&$disabled': {\n opacity: 0\n }\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n width: '100%',\n height: 40,\n '& svg': {\n transform: 'rotate(90deg)'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {}\n};\n\nvar _ref = /*#__PURE__*/React.createElement(KeyboardArrowLeft, {\n fontSize: \"small\"\n});\n\nvar _ref2 = /*#__PURE__*/React.createElement(KeyboardArrowRight, {\n fontSize: \"small\"\n});\n\nvar TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(props, ref) {\n var classes = props.classes,\n classNameProp = props.className,\n direction = props.direction,\n orientation = props.orientation,\n disabled = props.disabled,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"direction\", \"orientation\", \"disabled\"]);\n\n return /*#__PURE__*/React.createElement(ButtonBase, _extends({\n component: \"div\",\n className: clsx(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),\n ref: ref,\n role: null,\n tabIndex: null\n }, other), direction === 'left' ? _ref : _ref2);\n});\nprocess.env.NODE_ENV !== \"production\" ? TabScrollButton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * Which direction should the button indicate?\n */\n direction: PropTypes.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the element will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabScrollButton'\n})(TabScrollButton);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport debounce from '../utils/debounce';\nimport ownerWindow from '../utils/ownerWindow';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport withStyles from '../styles/withStyles';\nimport TabIndicator from './TabIndicator';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport useTheme from '../styles/useTheme';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n minHeight: 48,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n display: 'flex'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element. */\n flexContainer: {\n display: 'flex'\n },\n\n /* Styles applied to the flex container element if `orientation=\"vertical\"`. */\n flexContainerVertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element if `centered={true}` & `!variant=\"scrollable\"`. */\n centered: {\n justifyContent: 'center'\n },\n\n /* Styles applied to the tablist element. */\n scroller: {\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the tablist element if `!variant=\"scrollable\"`\b\b\b. */\n fixed: {\n overflowX: 'hidden',\n width: '100%'\n },\n\n /* Styles applied to the tablist element if `variant=\"scrollable\"`. */\n scrollable: {\n overflowX: 'scroll',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n },\n\n /* Styles applied to the `ScrollButtonComponent` component. */\n scrollButtons: {},\n\n /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons=\"auto\"` or scrollButtons=\"desktop\"`. */\n scrollButtonsDesktop: _defineProperty({}, theme.breakpoints.down('xs'), {\n display: 'none'\n }),\n\n /* Styles applied to the `TabIndicator` component. */\n indicator: {}\n };\n};\nvar Tabs = /*#__PURE__*/React.forwardRef(function Tabs(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledBy = props['aria-labelledby'],\n action = props.action,\n _props$centered = props.centered,\n centered = _props$centered === void 0 ? false : _props$centered,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$indicatorColor = props.indicatorColor,\n indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,\n onChange = props.onChange,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$ScrollButtonCo = props.ScrollButtonComponent,\n ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? TabScrollButton : _props$ScrollButtonCo,\n _props$scrollButtons = props.scrollButtons,\n scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$TabIndicatorPr = props.TabIndicatorProps,\n TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,\n TabScrollButtonProps = props.TabScrollButtonProps,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"classes\", \"className\", \"component\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\"]);\n\n var theme = useTheme();\n var scrollable = variant === 'scrollable';\n var isRtl = theme.direction === 'rtl';\n var vertical = orientation === 'vertical';\n var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n var start = vertical ? 'top' : 'left';\n var end = vertical ? 'bottom' : 'right';\n var clientSize = vertical ? 'clientHeight' : 'clientWidth';\n var size = vertical ? 'height' : 'width';\n\n if (process.env.NODE_ENV !== 'production') {\n if (centered && scrollable) {\n console.error('Material-UI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n var _React$useState = React.useState(false),\n mounted = _React$useState[0],\n setMounted = _React$useState[1];\n\n var _React$useState2 = React.useState({}),\n indicatorStyle = _React$useState2[0],\n setIndicatorStyle = _React$useState2[1];\n\n var _React$useState3 = React.useState({\n start: false,\n end: false\n }),\n displayScroll = _React$useState3[0],\n setDisplayScroll = _React$useState3[1];\n\n var _React$useState4 = React.useState({\n overflow: 'hidden',\n marginBottom: null\n }),\n scrollerStyle = _React$useState4[0],\n setScrollerStyle = _React$useState4[1];\n\n var valueToIndex = new Map();\n var tabsRef = React.useRef(null);\n var tabListRef = React.useRef(null);\n\n var getTabsMeta = function getTabsMeta() {\n var tabsNode = tabsRef.current;\n var tabsMeta;\n\n if (tabsNode) {\n var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n var tabMeta;\n\n if (tabsNode && value !== false) {\n var _children = tabListRef.current.children;\n\n if (_children.length > 0) {\n var tab = _children[valueToIndex.get(value)];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!tab) {\n console.error([\"Material-UI: The value provided to the Tabs component is invalid.\", \"None of the Tabs' children match with `\".concat(value, \"`.\"), valueToIndex.keys ? \"You can provide one of the following values: \".concat(Array.from(valueToIndex.keys()).join(', '), \".\") : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n }\n }\n\n return {\n tabsMeta: tabsMeta,\n tabMeta: tabMeta\n };\n };\n\n var updateIndicatorState = useEventCallback(function () {\n var _newIndicatorStyle;\n\n var _getTabsMeta = getTabsMeta(),\n tabsMeta = _getTabsMeta.tabsMeta,\n tabMeta = _getTabsMeta.tabMeta;\n\n var startValue = 0;\n\n if (tabMeta && tabsMeta) {\n if (vertical) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n } else {\n var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = tabMeta.left - tabsMeta.left + correction;\n }\n }\n\n var newIndicatorStyle = (_newIndicatorStyle = {}, _defineProperty(_newIndicatorStyle, start, startValue), _defineProperty(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);\n\n if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);\n var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n var scroll = function scroll(scrollValue) {\n animate(scrollStart, tabsRef.current, scrollValue);\n };\n\n var moveTabsScroll = function moveTabsScroll(delta) {\n var scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n var handleStartScrollClick = function handleStartScrollClick() {\n moveTabsScroll(-tabsRef.current[clientSize]);\n };\n\n var handleEndScrollClick = function handleEndScrollClick() {\n moveTabsScroll(tabsRef.current[clientSize]);\n };\n\n var handleScrollbarSizeChange = React.useCallback(function (scrollbarHeight) {\n setScrollerStyle({\n overflow: null,\n marginBottom: -scrollbarHeight\n });\n }, []);\n\n var getConditionalElements = function getConditionalElements() {\n var conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/React.createElement(ScrollbarSize, {\n className: classes.scrollable,\n onChange: handleScrollbarSizeChange\n }) : null;\n var scrollButtonsActive = displayScroll.start || displayScroll.end;\n var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/React.createElement(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end,\n className: clsx(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n return conditionalElements;\n };\n\n var scrollSelectedIntoView = useEventCallback(function () {\n var _getTabsMeta2 = getTabsMeta(),\n tabsMeta = _getTabsMeta2.tabsMeta,\n tabMeta = _getTabsMeta2.tabMeta;\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart);\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n\n scroll(_nextScrollStart);\n }\n });\n var updateScrollButtonState = useEventCallback(function () {\n if (scrollable && scrollButtons !== 'off') {\n var _tabsRef$current = tabsRef.current,\n scrollTop = _tabsRef$current.scrollTop,\n scrollHeight = _tabsRef$current.scrollHeight,\n clientHeight = _tabsRef$current.clientHeight,\n scrollWidth = _tabsRef$current.scrollWidth,\n clientWidth = _tabsRef$current.clientWidth;\n var showStartScroll;\n var showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n var scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n React.useEffect(function () {\n var handleResize = debounce(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n var win = ownerWindow(tabsRef.current);\n win.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var handleTabsScroll = React.useCallback(debounce(function () {\n updateScrollButtonState();\n }));\n React.useEffect(function () {\n return function () {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n React.useEffect(function () {\n setMounted(true);\n }, []);\n React.useEffect(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n React.useEffect(function () {\n scrollSelectedIntoView();\n }, [scrollSelectedIntoView, indicatorStyle]);\n React.useImperativeHandle(action, function () {\n return {\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var indicator = /*#__PURE__*/React.createElement(TabIndicator, _extends({\n className: classes.indicator,\n orientation: orientation,\n color: indicatorColor\n }, TabIndicatorProps, {\n style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n }));\n var childIndex = 0;\n var children = React.Children.map(childrenProp, function (child) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n var selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/React.cloneElement(child, {\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected: selected,\n selectionFollowsFocus: selectionFollowsFocus,\n onChange: onChange,\n textColor: textColor,\n value: childValue\n });\n });\n\n var handleKeyDown = function handleKeyDown(event) {\n var target = event.target; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n var role = target.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n var newFocusTarget = null;\n var previousItemKey = orientation !== \"vertical\" ? 'ArrowLeft' : 'ArrowUp';\n var nextItemKey = orientation !== \"vertical\" ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation !== \"vertical\" && theme.direction === 'rtl') {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;\n break;\n\n case nextItemKey:\n newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;\n break;\n\n case 'Home':\n newFocusTarget = tabListRef.current.firstChild;\n break;\n\n case 'End':\n newFocusTarget = tabListRef.current.lastChild;\n break;\n\n default:\n break;\n }\n\n if (newFocusTarget !== null) {\n newFocusTarget.focus();\n event.preventDefault();\n }\n };\n\n var conditionalElements = getConditionalElements();\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, vertical && classes.vertical),\n ref: ref\n }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/React.createElement(\"div\", {\n className: clsx(classes.scroller, scrollable ? classes.scrollable : classes.fixed),\n style: scrollerStyle,\n ref: tabsRef,\n onScroll: handleTabsScroll\n }, /*#__PURE__*/React.createElement(\"div\", {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className: clsx(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\"\n }, children), mounted && indicator), conditionalElements.scrollButtonEnd);\n});\nprocess.env.NODE_ENV !== \"production\" ? Tabs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: refType,\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': PropTypes.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * If `true`, the tabs will be centered.\n * This property is intended for large views.\n */\n centered: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Determines the color of the indicator.\n */\n indicatorColor: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback\n * @param {any} value We default to the index of the child (number)\n */\n onChange: PropTypes.func,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n */\n ScrollButtonComponent: PropTypes.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `desktop` will only present them on medium and larger viewports.\n * - `on` will always present them.\n * - `off` will never present them.\n */\n scrollButtons: PropTypes.oneOf(['auto', 'desktop', 'off', 'on']),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * Props applied to the tab indicator element.\n */\n TabIndicatorProps: PropTypes.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n */\n TabScrollButtonProps: PropTypes.object,\n\n /**\n * Determines the color of the `Tab`.\n */\n textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this property to `false`.\n */\n value: PropTypes.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n */\n variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiTabs'\n})(Tabs);","/** @typedef {import('./uniforms')} types */\n\nimport GL from '@luma.gl/constants';\nimport {log} from '@luma.gl/gltools';\n\nimport Framebuffer from './framebuffer';\nimport Renderbuffer from './renderbuffer';\nimport Texture from './texture';\nimport {assert} from '../utils/assert';\n\nconst UNIFORM_SETTERS = {\n // WEBGL1\n\n /* eslint-disable max-len */\n [GL.FLOAT]: getArraySetter.bind(null, 'uniform1fv', toFloatArray, 1, setVectorUniform),\n [GL.FLOAT_VEC2]: getArraySetter.bind(null, 'uniform2fv', toFloatArray, 2, setVectorUniform),\n [GL.FLOAT_VEC3]: getArraySetter.bind(null, 'uniform3fv', toFloatArray, 3, setVectorUniform),\n [GL.FLOAT_VEC4]: getArraySetter.bind(null, 'uniform4fv', toFloatArray, 4, setVectorUniform),\n\n [GL.INT]: getArraySetter.bind(null, 'uniform1iv', toIntArray, 1, setVectorUniform),\n [GL.INT_VEC2]: getArraySetter.bind(null, 'uniform2iv', toIntArray, 2, setVectorUniform),\n [GL.INT_VEC3]: getArraySetter.bind(null, 'uniform3iv', toIntArray, 3, setVectorUniform),\n [GL.INT_VEC4]: getArraySetter.bind(null, 'uniform4iv', toIntArray, 4, setVectorUniform),\n\n [GL.BOOL]: getArraySetter.bind(null, 'uniform1iv', toIntArray, 1, setVectorUniform),\n [GL.BOOL_VEC2]: getArraySetter.bind(null, 'uniform2iv', toIntArray, 2, setVectorUniform),\n [GL.BOOL_VEC3]: getArraySetter.bind(null, 'uniform3iv', toIntArray, 3, setVectorUniform),\n [GL.BOOL_VEC4]: getArraySetter.bind(null, 'uniform4iv', toIntArray, 4, setVectorUniform),\n\n // uniformMatrix(false): don't transpose the matrix\n [GL.FLOAT_MAT2]: getArraySetter.bind(null, 'uniformMatrix2fv', toFloatArray, 4, setMatrixUniform),\n [GL.FLOAT_MAT3]: getArraySetter.bind(null, 'uniformMatrix3fv', toFloatArray, 9, setMatrixUniform),\n [GL.FLOAT_MAT4]: getArraySetter.bind(\n null,\n 'uniformMatrix4fv',\n toFloatArray,\n 16,\n setMatrixUniform\n ),\n\n [GL.SAMPLER_2D]: getSamplerSetter,\n [GL.SAMPLER_CUBE]: getSamplerSetter,\n\n // WEBGL2 - unsigned integers, irregular matrices, additional texture samplers\n\n [GL.UNSIGNED_INT]: getArraySetter.bind(null, 'uniform1uiv', toUIntArray, 1, setVectorUniform),\n [GL.UNSIGNED_INT_VEC2]: getArraySetter.bind(\n null,\n 'uniform2uiv',\n toUIntArray,\n 2,\n setVectorUniform\n ),\n [GL.UNSIGNED_INT_VEC3]: getArraySetter.bind(\n null,\n 'uniform3uiv',\n toUIntArray,\n 3,\n setVectorUniform\n ),\n [GL.UNSIGNED_INT_VEC4]: getArraySetter.bind(\n null,\n 'uniform4uiv',\n toUIntArray,\n 4,\n setVectorUniform\n ),\n\n // uniformMatrix(false): don't transpose the matrix\n [GL.FLOAT_MAT2x3]: getArraySetter.bind(\n null,\n 'uniformMatrix2x3fv',\n toFloatArray,\n 6,\n setMatrixUniform\n ),\n [GL.FLOAT_MAT2x4]: getArraySetter.bind(\n null,\n 'uniformMatrix2x4fv',\n toFloatArray,\n 8,\n setMatrixUniform\n ),\n [GL.FLOAT_MAT3x2]: getArraySetter.bind(\n null,\n 'uniformMatrix3x2fv',\n toFloatArray,\n 6,\n setMatrixUniform\n ),\n [GL.FLOAT_MAT3x4]: getArraySetter.bind(\n null,\n 'uniformMatrix3x4fv',\n toFloatArray,\n 12,\n setMatrixUniform\n ),\n [GL.FLOAT_MAT4x2]: getArraySetter.bind(\n null,\n 'uniformMatrix4x2fv',\n toFloatArray,\n 8,\n setMatrixUniform\n ),\n [GL.FLOAT_MAT4x3]: getArraySetter.bind(\n null,\n 'uniformMatrix4x3fv',\n toFloatArray,\n 12,\n setMatrixUniform\n ),\n\n [GL.SAMPLER_2D]: getSamplerSetter,\n [GL.SAMPLER_CUBE]: getSamplerSetter,\n\n [GL.SAMPLER_3D]: getSamplerSetter,\n [GL.SAMPLER_2D_SHADOW]: getSamplerSetter,\n [GL.SAMPLER_2D_ARRAY]: getSamplerSetter,\n [GL.SAMPLER_2D_ARRAY_SHADOW]: getSamplerSetter,\n [GL.SAMPLER_CUBE_SHADOW]: getSamplerSetter,\n [GL.INT_SAMPLER_2D]: getSamplerSetter,\n [GL.INT_SAMPLER_3D]: getSamplerSetter,\n [GL.INT_SAMPLER_CUBE]: getSamplerSetter,\n [GL.INT_SAMPLER_2D_ARRAY]: getSamplerSetter,\n [GL.UNSIGNED_INT_SAMPLER_2D]: getSamplerSetter,\n [GL.UNSIGNED_INT_SAMPLER_3D]: getSamplerSetter,\n [GL.UNSIGNED_INT_SAMPLER_CUBE]: getSamplerSetter,\n [GL.UNSIGNED_INT_SAMPLER_2D_ARRAY]: getSamplerSetter\n /* eslint-enable max-len */\n};\n\n// Pre-allocated typed arrays for temporary conversion\nconst FLOAT_ARRAY = {};\nconst INT_ARRAY = {};\nconst UINT_ARRAY = {};\n\nconst array1 = [0];\n\n// Functions to ensure the type of uniform values\n// This is done because uniform*v functions\n// are extremely slow when consuming JS arrays directly.\nfunction toTypedArray(value, uniformLength, Type, cache) {\n // convert boolean uniforms to Number\n if (uniformLength === 1 && typeof value === 'boolean') {\n value = value ? 1 : 0;\n }\n if (Number.isFinite(value)) {\n array1[0] = value;\n value = array1;\n }\n const length = value.length;\n if (length % uniformLength) {\n log.warn(`Uniform size should be multiples of ${uniformLength}`, value)();\n }\n\n if (value instanceof Type) {\n return value;\n }\n let result = cache[length];\n if (!result) {\n result = new Type(length);\n cache[length] = result;\n }\n for (let i = 0; i < length; i++) {\n result[i] = value[i];\n }\n return result;\n}\n\nfunction toFloatArray(value, uniformLength) {\n return toTypedArray(value, uniformLength, Float32Array, FLOAT_ARRAY);\n}\n\nfunction toIntArray(value, uniformLength) {\n return toTypedArray(value, uniformLength, Int32Array, INT_ARRAY);\n}\n\nfunction toUIntArray(value, uniformLength) {\n return toTypedArray(value, uniformLength, Uint32Array, UINT_ARRAY);\n} // Returns a Magic Uniform Setter\n\n// PUBLIC API\n\n/** @type {types['getUniformSetter']} */ export function getUniformSetter(gl, location, info) {\n const setter = UNIFORM_SETTERS[info.type];\n if (!setter) {\n throw new Error(`Unknown GLSL uniform type ${info.type}`);\n }\n\n // NOTE(Tarek): This construction is the ensure\n // separate caches for all setters.\n return setter().bind(null, gl, location);\n}\n\n/** @type {types['parseUniformName']} */\nexport function parseUniformName(name) {\n // Shortcut to avoid redundant or bad matches\n if (name[name.length - 1] !== ']') {\n return {\n name,\n length: 1,\n isArray: false\n };\n }\n\n // if array name then clean the array brackets\n const UNIFORM_NAME_REGEXP = /([^[]*)(\\[[0-9]+\\])?/;\n const matches = name.match(UNIFORM_NAME_REGEXP);\n if (!matches || matches.length < 2) {\n throw new Error(`Failed to parse GLSL uniform name ${name}`);\n }\n\n return {\n name: matches[1],\n length: matches[2] || 1,\n isArray: Boolean(matches[2])\n };\n} // To facilitate early detection of e.g. undefined values in JavaScript\n\n// Basic checks of uniform values (with or without knowledge of program)\n\n/** @type {types['checkUniformValues']} */\nexport function checkUniformValues(uniforms, source, uniformMap) {\n for (const uniformName in uniforms) {\n const value = uniforms[uniformName];\n const shouldCheck = !uniformMap || Boolean(uniformMap[uniformName]);\n if (shouldCheck && !checkUniformValue(value)) {\n // Add space to source\n source = source ? `${source} ` : '';\n // Value could be unprintable so write the object on console\n console.error(`${source} Bad uniform ${uniformName}`, value); // eslint-disable-line\n /* eslint-enable no-console */\n throw new Error(`${source} Bad uniform ${uniformName}`);\n }\n }\n return true;\n}\n\n// TODO use type information during validation\nfunction checkUniformValue(value) {\n if (Array.isArray(value) || ArrayBuffer.isView(value)) {\n return checkUniformArray(value);\n }\n\n // Check if single value is a number\n if (isFinite(value)) {\n return true;\n } else if (value === true || value === false) {\n return true;\n } else if (value instanceof Texture) {\n return true;\n } else if (value instanceof Renderbuffer) {\n return true;\n } else if (value instanceof Framebuffer) {\n return Boolean(value.texture);\n }\n return false;\n}\n\n/** @type {types['copyUniform']} */\nexport function copyUniform(uniforms, key, value) {\n if (Array.isArray(value) || ArrayBuffer.isView(value)) {\n if (uniforms[key]) {\n const dest = uniforms[key];\n // @ts-ignore\n for (let i = 0, len = value.length; i < len; ++i) {\n dest[i] = value[i];\n }\n } else {\n // @ts-ignore\n uniforms[key] = value.slice();\n }\n } else {\n uniforms[key] = value;\n }\n}\n\n// HELPERS\n\nfunction checkUniformArray(value) {\n // Check that every element in array is a number, and at least 1 element\n if (value.length === 0) {\n return false;\n }\n\n const checkLength = Math.min(value.length, 16);\n\n for (let i = 0; i < checkLength; ++i) {\n if (!Number.isFinite(value[i])) {\n return false;\n }\n }\n\n return true;\n}\n\n// NOTE(Tarek): Setters maintain a cache\n// of the previously set value, and\n// avoid resetting it if it's the same.\nfunction getSamplerSetter() {\n let cache = null;\n return (gl, location, value) => {\n const update = cache !== value;\n if (update) {\n gl.uniform1i(location, value);\n cache = value;\n }\n\n return update;\n };\n}\n\nfunction getArraySetter(functionName, toArray, size, uniformSetter) {\n let cache = null;\n let cacheLength = null;\n return (gl, location, value) => {\n const arrayValue = toArray(value, size);\n const length = arrayValue.length;\n let update = false;\n if (cache === null) {\n cache = new Float32Array(length);\n cacheLength = length;\n update = true;\n } else {\n assert(cacheLength === length, 'Uniform length cannot change.');\n for (let i = 0; i < length; ++i) {\n if (arrayValue[i] !== cache[i]) {\n update = true;\n break;\n }\n }\n }\n if (update) {\n uniformSetter(gl, functionName, location, arrayValue);\n cache.set(arrayValue);\n }\n\n return update;\n };\n}\n\nfunction setVectorUniform(gl, functionName, location, value) {\n gl[functionName](location, value);\n}\n\nfunction setMatrixUniform(gl, functionName, location, value) {\n gl[functionName](location, false, value);\n}\n","// Supports GLSLIFY style naming of shaders\n// #define SHADER_NAME ...\nexport default function getShaderName(shader, defaultName = 'unnamed') {\n const SHADER_NAME_REGEXP = /#define[\\s*]SHADER_NAME[\\s*]([A-Za-z0-9_-]+)[\\s*]/;\n const match = shader.match(SHADER_NAME_REGEXP);\n return match ? match[1] : defaultName;\n}\n","// TODO - formatGLSLCompilerError should not depend on this\nimport getShaderName from './get-shader-name';\nimport getShaderTypeName from './get-shader-type-name';\n\n// Formats GLSL compiler error log into single string\nexport default function formatGLSLCompilerError(errLog, src, shaderType) {\n const {shaderName, errors, warnings} = parseGLSLCompilerError(errLog, src, shaderType);\n return `GLSL compilation error in ${shaderName}\\n\\n${errors}\\n${warnings}`;\n}\n\n/**\n * Parse a GLSL compiler error log into a string showing the source code around each error.\n * Based on https://github.com/wwwtyro/gl-format-compiler-error (public domain)\n */\n/* eslint-disable no-continue, max-statements */\nexport function parseGLSLCompilerError(errLog, src, shaderType, shaderName) {\n const errorStrings = errLog.split(/\\r?\\n/);\n const errors = {};\n const warnings = {};\n\n // Patch the shader name\n const name = shaderName || getShaderName(src) || '(unnamed)';\n const shaderDescription = `${getShaderTypeName(shaderType)} shader ${name}`;\n\n // Parse the error - note: browser and driver dependent\n for (let i = 0; i < errorStrings.length; i++) {\n const errorString = errorStrings[i];\n if (errorString.length <= 1) {\n continue;\n }\n const segments = errorString.split(':');\n const type = segments[0];\n const line = parseInt(segments[2], 10);\n if (isNaN(line)) {\n throw new Error(`GLSL compilation error in ${shaderDescription}: ${errLog}`);\n }\n if (type !== 'WARNING') {\n errors[line] = errorString;\n } else {\n warnings[line] = errorString;\n }\n }\n\n // Format the error inline with the code\n const lines = addLineNumbers(src);\n\n return {\n shaderName: shaderDescription,\n errors: formatErrors(errors, lines),\n warnings: formatErrors(warnings, lines)\n };\n}\n\n// helper function, outputs annotated errors or warnings\nfunction formatErrors(errors, lines) {\n let message = '';\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n if (!errors[i + 3] && !errors[i + 2] && !errors[i + 1]) {\n continue;\n }\n message += `${line}\\n`;\n if (errors[i + 1]) {\n const error = errors[i + 1];\n const segments = error.split(':', 3);\n const type = segments[0];\n const column = parseInt(segments[1], 10) || 0;\n const err = error.substring(segments.join(':').length + 1).trim();\n message += padLeft(`^^^ ${type}: ${err}\\n\\n`, column);\n }\n }\n return message;\n}\n\n/**\n * Prepends line numbers to each line of a string.\n * The line numbers will be left-padded with spaces to ensure an\n * aligned layout when rendered using monospace fonts.\n * @param {String} string - multi-line string to add line numbers to\n * @param {Number} start=1 - number of spaces to add\n * @param {String} delim =': ' - injected between line number and original line\n * @return {String[]} strings - array of string, one per line, with line numbers added\n */\nfunction addLineNumbers(string, start = 1, delim = ': ') {\n const lines = string.split(/\\r?\\n/);\n const maxDigits = String(lines.length + start - 1).length;\n return lines.map((line, i) => {\n const lineNumber = String(i + start);\n const digits = lineNumber.length;\n const prefix = padLeft(lineNumber, maxDigits - digits);\n return prefix + delim + line;\n });\n}\n\n/**\n * Pads a string with a number of spaces (space characters) to the left\n * @param {String} string - string to pad\n * @param {Number} digits - number of spaces to add\n * @return {String} string - The padded string\n */\nfunction padLeft(string, digits) {\n let result = '';\n for (let i = 0; i < digits; ++i) {\n result += ' ';\n }\n return `${result}${string}`;\n}\n","const GL_FRAGMENT_SHADER = 0x8b30;\nconst GL_VERTEX_SHADER = 0x8b31;\n\nexport default function getShaderTypeName(type) {\n switch (type) {\n case GL_FRAGMENT_SHADER:\n return 'fragment';\n case GL_VERTEX_SHADER:\n return 'vertex';\n default:\n return 'unknown type';\n }\n}\n","import GL from '@luma.gl/constants';\nimport {assertWebGLContext, log} from '@luma.gl/gltools';\nimport {parseGLSLCompilerError, getShaderName} from '../glsl-utils';\nimport {assert} from '../utils/assert';\nimport {uid} from '../utils/utils';\nimport Resource from './resource';\n\nconst ERR_SOURCE = 'Shader: GLSL source code must be a JavaScript string';\n\n// For now this is an internal class\nexport class Shader extends Resource {\n static getTypeName(shaderType) {\n switch (shaderType) {\n case GL.VERTEX_SHADER:\n return 'vertex-shader';\n case GL.FRAGMENT_SHADER:\n return 'fragment-shader';\n default:\n assert(false);\n return 'unknown';\n }\n }\n\n /* eslint-disable max-statements */\n constructor(gl, props) {\n assertWebGLContext(gl);\n\n // Validate arguments\n assert(typeof props.source === 'string', ERR_SOURCE);\n\n // Deduce an id, from shader source, or supplied id, or shader type\n const id =\n getShaderName(props.source, null) ||\n props.id ||\n uid(`unnamed ${Shader.getTypeName(props.shaderType)}`);\n\n super(gl, {id});\n\n this.shaderType = props.shaderType;\n this.source = props.source;\n\n this.initialize(props);\n }\n\n initialize({source}) {\n const shaderName = getShaderName(source, null);\n if (shaderName) {\n this.id = uid(shaderName);\n }\n this._compile(source);\n }\n\n // Accessors\n\n getParameter(pname) {\n return this.gl.getShaderParameter(this.handle, pname);\n }\n\n toString() {\n return `${Shader.getTypeName(this.shaderType)}:${this.id}`;\n }\n\n getName() {\n return getShaderName(this.source) || 'unnamed-shader';\n }\n\n getSource() {\n return this.gl.getShaderSource(this.handle);\n }\n\n // Debug method - Returns translated source if available\n getTranslatedSource() {\n const extension = this.gl.getExtension('WEBGL_debug_shaders');\n return extension\n ? extension.getTranslatedShaderSource(this.handle)\n : 'No translated source available. WEBGL_debug_shaders not implemented';\n }\n\n // PRIVATE METHODS\n _compile(source = this.source) {\n if (!source.startsWith('#version ')) {\n source = `#version 100\\n${source}`;\n }\n this.source = source;\n this.gl.shaderSource(this.handle, this.source);\n this.gl.compileShader(this.handle);\n\n // TODO - For performance reasons, avoid checking shader compilation errors on production?\n // TODO - Load log even when no error reported, to catch warnings?\n // https://gamedev.stackexchange.com/questions/30429/how-to-detect-glsl-warnings\n const compileStatus = this.getParameter(GL.COMPILE_STATUS);\n if (!compileStatus) {\n const infoLog = this.gl.getShaderInfoLog(this.handle);\n const {shaderName, errors, warnings} = parseGLSLCompilerError(\n infoLog,\n this.source,\n this.shaderType,\n this.id\n );\n log.error(`GLSL compilation errors in ${shaderName}\\n${errors}`)();\n log.warn(`GLSL compilation warnings in ${shaderName}\\n${warnings}`)();\n throw new Error(`GLSL compilation errors in ${shaderName}`);\n }\n }\n\n _deleteHandle() {\n this.gl.deleteShader(this.handle);\n }\n\n _getOptsFromHandle() {\n return {\n type: this.getParameter(GL.SHADER_TYPE),\n source: this.getSource()\n };\n }\n}\n\nexport class VertexShader extends Shader {\n constructor(gl, props) {\n // Signature: new VertexShader(gl, source)\n if (typeof props === 'string') {\n props = {source: props};\n }\n super(gl, Object.assign({}, props, {shaderType: GL.VERTEX_SHADER}));\n }\n\n // PRIVATE METHODS\n _createHandle() {\n return this.gl.createShader(GL.VERTEX_SHADER);\n }\n}\n\nexport class FragmentShader extends Shader {\n constructor(gl, props) {\n // Signature: new FragmentShader(gl, source)\n if (typeof props === 'string') {\n props = {source: props};\n }\n\n super(gl, Object.assign({}, props, {shaderType: GL.FRAGMENT_SHADER}));\n }\n\n // PRIVATE METHODS\n _createHandle() {\n return this.gl.createShader(GL.FRAGMENT_SHADER);\n }\n}\n","// Contains metadata describing attribute configurations for a program's shaders\n// Much of this is automatically extracted from shaders after program linking\nimport Accessor from './accessor';\nimport {isWebGL2} from '@luma.gl/gltools';\nimport {decomposeCompositeGLType} from '../webgl-utils/attribute-utils';\n\nexport default class ProgramConfiguration {\n constructor(program) {\n this.id = program.id;\n this.attributeInfos = [];\n this.attributeInfosByName = {};\n\n // Locations may not be contiguous the case of matrix attributes\n // so keep a separate location->attribute map.\n this.attributeInfosByLocation = [];\n this.varyingInfos = [];\n this.varyingInfosByName = {};\n Object.seal(this);\n this._readAttributesFromProgram(program);\n this._readVaryingsFromProgram(program);\n }\n\n getAttributeInfo(locationOrName) {\n const location = Number(locationOrName);\n if (Number.isFinite(location)) {\n return this.attributeInfosByLocation[location];\n }\n return this.attributeInfosByName[locationOrName] || null;\n }\n\n // Resolves an attribute name or index to an index\n getAttributeLocation(locationOrName) {\n const attributeInfo = this.getAttributeInfo(locationOrName);\n return attributeInfo ? attributeInfo.location : -1;\n }\n\n getAttributeAccessor(locationOrName) {\n const attributeInfo = this.getAttributeInfo(locationOrName);\n return attributeInfo ? attributeInfo.accessor : null;\n }\n\n getVaryingInfo(locationOrName) {\n const location = Number(locationOrName);\n if (Number.isFinite(location)) {\n return this.varyingInfos[location];\n }\n return this.varyingInfosByName[locationOrName] || null;\n }\n\n getVaryingIndex(locationOrName) {\n const varying = this.getVaryingInfo();\n return varying ? varying.location : -1;\n }\n\n getVaryingAccessor(locationOrName) {\n const varying = this.getVaryingInfo();\n return varying ? varying.accessor : null;\n }\n\n // PRIVATE METHODS\n\n // linkProgram needs to have been called, although linking does not need to have been successful\n _readAttributesFromProgram(program) {\n const {gl} = program;\n const count = gl.getProgramParameter(program.handle, gl.ACTIVE_ATTRIBUTES);\n\n for (let index = 0; index < count; index++) {\n const {name, type, size} = gl.getActiveAttrib(program.handle, index);\n const location = gl.getAttribLocation(program.handle, name);\n // Add only user provided attributes, for built-in attributes like\n // `gl_InstanceID` locaiton will be < 0\n if (location >= 0) {\n this._addAttribute(location, name, type, size);\n }\n }\n\n this.attributeInfos.sort((a, b) => a.location - b.location);\n }\n\n // linkProgram needs to have been called, although linking does not need to have been successful\n _readVaryingsFromProgram(program) {\n const {gl} = program;\n if (!isWebGL2(gl)) {\n return;\n }\n\n const count = gl.getProgramParameter(program.handle, gl.TRANSFORM_FEEDBACK_VARYINGS);\n for (let location = 0; location < count; location++) {\n const {name, type, size} = gl.getTransformFeedbackVarying(program.handle, location);\n this._addVarying(location, name, type, size);\n }\n\n this.varyingInfos.sort((a, b) => a.location - b.location);\n }\n\n _addAttribute(location, name, compositeType, size) {\n const {type, components} = decomposeCompositeGLType(compositeType);\n const accessor = {type, size: size * components};\n this._inferProperties(location, name, accessor);\n\n const attributeInfo = {location, name, accessor: new Accessor(accessor)}; // Base values\n this.attributeInfos.push(attributeInfo);\n this.attributeInfosByLocation[location] = attributeInfo; // For quick location based lookup\n this.attributeInfosByName[attributeInfo.name] = attributeInfo; // For quick name based lookup\n }\n\n // Extract additional attribute metadata from shader names (based on attribute naming conventions)\n _inferProperties(location, name, accessor) {\n if (/instance/i.test(name)) {\n // Any attribute containing the word \"instance\" will be assumed to be instanced\n accessor.divisor = 1;\n }\n }\n\n _addVarying(location, name, compositeType, size) {\n const {type, components} = decomposeCompositeGLType(compositeType);\n const accessor = new Accessor({type, size: size * components});\n\n const varying = {location, name, accessor}; // Base values\n this.varyingInfos.push(varying);\n this.varyingInfosByName[varying.name] = varying; // For quick name based lookup\n }\n}\n","import GL from '@luma.gl/constants';\n\nimport Resource from './resource';\nimport Texture from './texture';\nimport Framebuffer from './framebuffer';\nimport {parseUniformName, getUniformSetter} from './uniforms';\nimport {VertexShader, FragmentShader} from './shader';\nimport ProgramConfiguration from './program-configuration';\nimport {copyUniform, checkUniformValues} from './uniforms';\n\nimport {isWebGL2, assertWebGL2Context, withParameters, log} from '@luma.gl/gltools';\nimport {getKey} from '../webgl-utils/constants-to-keys';\nimport {getPrimitiveDrawMode} from '../webgl-utils/attribute-utils';\nimport {assert} from '../utils/assert';\nimport {uid} from '../utils/utils';\n\nconst LOG_PROGRAM_PERF_PRIORITY = 4;\n\nconst GL_SEPARATE_ATTRIBS = 0x8c8d;\n\nconst V6_DEPRECATED_METHODS = [\n 'setVertexArray',\n 'setAttributes',\n 'setBuffers',\n 'unsetBuffers',\n\n 'use',\n 'getUniformCount',\n 'getUniformInfo',\n 'getUniformLocation',\n 'getUniformValue',\n\n 'getVarying',\n 'getFragDataLocation',\n 'getAttachedShaders',\n 'getAttributeCount',\n 'getAttributeLocation',\n 'getAttributeInfo'\n];\n\nexport default class Program extends Resource {\n constructor(gl, props = {}) {\n super(gl, props);\n\n this.stubRemovedMethods('Program', 'v6.0', V6_DEPRECATED_METHODS);\n\n // Experimental flag to avoid deleting Program object while it is cached\n this._isCached = false;\n\n this.initialize(props);\n\n Object.seal(this);\n\n this._setId(props.id);\n }\n\n initialize(props = {}) {\n const {hash, vs, fs, varyings, bufferMode = GL_SEPARATE_ATTRIBS} = props;\n\n this.hash = hash || ''; // Used by ProgramManager\n\n // Create shaders if needed\n this.vs =\n typeof vs === 'string' ? new VertexShader(this.gl, {id: `${props.id}-vs`, source: vs}) : vs;\n this.fs =\n typeof fs === 'string' ? new FragmentShader(this.gl, {id: `${props.id}-fs`, source: fs}) : fs;\n assert(this.vs instanceof VertexShader);\n assert(this.fs instanceof FragmentShader);\n\n // uniforms\n this.uniforms = {};\n\n this._textureUniforms = {};\n\n // Setup varyings if supplied\n if (varyings && varyings.length > 0) {\n assertWebGL2Context(this.gl);\n this.varyings = varyings;\n this.gl2.transformFeedbackVaryings(this.handle, varyings, bufferMode);\n }\n\n this._compileAndLink();\n this._readUniformLocationsFromLinkedProgram();\n this.configuration = new ProgramConfiguration(this);\n\n return this.setProps(props);\n }\n\n delete(options = {}) {\n if (this._isCached) {\n // This object is cached, do not delete\n return this;\n }\n return super.delete(options);\n }\n\n setProps(props) {\n if ('uniforms' in props) {\n this.setUniforms(props.uniforms);\n }\n return this;\n }\n\n // A good thing about the WebGL API is that there are so many ways to draw things ;)\n // This function unifies those ways into a single call using common parameters with sane defaults\n draw({\n logPriority, // Probe log priority, enables Model to do more integrated logging\n\n drawMode = GL.TRIANGLES,\n vertexCount,\n offset = 0,\n start,\n end,\n isIndexed = false,\n indexType = GL.UNSIGNED_SHORT,\n instanceCount = 0,\n isInstanced = instanceCount > 0,\n\n vertexArray = null,\n transformFeedback,\n framebuffer,\n parameters = {},\n\n // Deprecated\n uniforms,\n samplers\n }) {\n if (uniforms || samplers) {\n // DEPRECATED: v7.0 (deprecated earlier but warning not properly implemented)\n log.deprecated('Program.draw({uniforms})', 'Program.setUniforms(uniforms)')();\n this.setUniforms(uniforms || {});\n }\n\n if (log.priority >= logPriority) {\n const fb = framebuffer ? framebuffer.id : 'default';\n const message =\n `mode=${getKey(this.gl, drawMode)} verts=${vertexCount} ` +\n `instances=${instanceCount} indexType=${getKey(this.gl, indexType)} ` +\n `isInstanced=${isInstanced} isIndexed=${isIndexed} ` +\n `Framebuffer=${fb}`;\n log.log(logPriority, message)();\n }\n\n // TODO - move vertex array binding and transform feedback binding to withParameters?\n assert(vertexArray);\n\n this.gl.useProgram(this.handle);\n\n if (\n // Note: async textures set as uniforms might still be loading.\n // Now that all uniforms have been updated, check if any texture\n // in the uniforms is not yet initialized, then we don't draw\n !this._areTexturesRenderable() ||\n // Avoid WebGL draw call when not rendering any data\n vertexCount === 0 ||\n (isInstanced && instanceCount === 0)\n ) {\n return false;\n }\n\n vertexArray.bindForDraw(vertexCount, instanceCount, () => {\n if (framebuffer !== undefined) {\n parameters = Object.assign({}, parameters, {framebuffer});\n }\n\n if (transformFeedback) {\n const primitiveMode = getPrimitiveDrawMode(drawMode);\n transformFeedback.begin(primitiveMode);\n }\n\n this._bindTextures();\n\n withParameters(this.gl, parameters, () => {\n // TODO - Use polyfilled WebGL2RenderingContext instead of ANGLE extension\n if (isIndexed && isInstanced) {\n this.gl2.drawElementsInstanced(drawMode, vertexCount, indexType, offset, instanceCount);\n } else if (isIndexed && isWebGL2(this.gl) && !isNaN(start) && !isNaN(end)) {\n this.gl2.drawRangeElements(drawMode, start, end, vertexCount, indexType, offset);\n } else if (isIndexed) {\n this.gl.drawElements(drawMode, vertexCount, indexType, offset);\n } else if (isInstanced) {\n this.gl2.drawArraysInstanced(drawMode, offset, vertexCount, instanceCount);\n } else {\n this.gl.drawArrays(drawMode, offset, vertexCount);\n }\n });\n\n if (transformFeedback) {\n transformFeedback.end();\n }\n });\n\n return true;\n }\n\n setUniforms(uniforms = {}) {\n if (log.priority >= 2) {\n checkUniformValues(uniforms, this.id, this._uniformSetters);\n }\n\n this.gl.useProgram(this.handle);\n\n for (const uniformName in uniforms) {\n const uniform = uniforms[uniformName];\n const uniformSetter = this._uniformSetters[uniformName];\n\n if (uniformSetter) {\n let value = uniform;\n let textureUpdate = false;\n\n if (value instanceof Framebuffer) {\n value = value.texture;\n }\n if (value instanceof Texture) {\n textureUpdate = this.uniforms[uniformName] !== uniform;\n\n if (textureUpdate) {\n // eslint-disable-next-line max-depth\n if (uniformSetter.textureIndex === undefined) {\n uniformSetter.textureIndex = this._textureIndexCounter++;\n }\n\n // Bind texture to index\n const texture = value;\n const {textureIndex} = uniformSetter;\n\n texture.bind(textureIndex);\n value = textureIndex;\n\n this._textureUniforms[uniformName] = texture;\n } else {\n value = uniformSetter.textureIndex;\n }\n } else if (this._textureUniforms[uniformName]) {\n delete this._textureUniforms[uniformName];\n }\n\n // NOTE(Tarek): uniformSetter returns whether\n // value had to be updated or not.\n if (uniformSetter(value) || textureUpdate) {\n copyUniform(this.uniforms, uniformName, uniform);\n }\n }\n }\n\n return this;\n }\n\n // PRIVATE METHODS\n\n // Checks if all texture-values uniforms are renderable (i.e. loaded)\n // Update a texture if needed (e.g. from video)\n // Note: This is currently done before every draw call\n _areTexturesRenderable() {\n let texturesRenderable = true;\n\n for (const uniformName in this._textureUniforms) {\n const texture = this._textureUniforms[uniformName];\n texture.update();\n texturesRenderable = texturesRenderable && texture.loaded;\n }\n\n return texturesRenderable;\n }\n\n // Binds textures\n // Note: This is currently done before every draw call\n _bindTextures() {\n for (const uniformName in this._textureUniforms) {\n const textureIndex = this._uniformSetters[uniformName].textureIndex;\n this._textureUniforms[uniformName].bind(textureIndex);\n }\n }\n\n // RESOURCE METHODS\n\n _createHandle() {\n return this.gl.createProgram();\n }\n\n _deleteHandle() {\n this.gl.deleteProgram(this.handle);\n }\n\n // Extract opts needed to initialize a `Program` from an independently created WebGLProgram handle\n _getOptionsFromHandle(handle) {\n const shaderHandles = this.gl.getAttachedShaders(handle);\n const opts = {};\n for (const shaderHandle of shaderHandles) {\n const type = this.gl.getShaderParameter(this.handle, GL.SHADER_TYPE);\n switch (type) {\n case GL.VERTEX_SHADER:\n // @ts-ignore\n opts.vs = new VertexShader({handle: shaderHandle});\n break;\n case GL.FRAGMENT_SHADER:\n // @ts-ignore\n opts.fs = new FragmentShader({handle: shaderHandle});\n break;\n default:\n }\n }\n return opts;\n }\n\n _getParameter(pname) {\n return this.gl.getProgramParameter(this.handle, pname);\n }\n\n // If program is not named, name it after shader names\n // TODO - this.id will already have been initialized\n _setId(id) {\n if (!id) {\n const programName = this._getName();\n this.id = uid(programName);\n }\n }\n\n // Generate a default name for the program based on names of the shaders\n _getName() {\n let programName = this.vs.getName() || this.fs.getName();\n programName = programName.replace(/shader/i, '');\n programName = programName ? `${programName}-program` : 'program';\n return programName;\n }\n\n _compileAndLink() {\n const {gl} = this;\n gl.attachShader(this.handle, this.vs.handle);\n gl.attachShader(this.handle, this.fs.handle);\n log.time(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this._getName()}`)();\n gl.linkProgram(this.handle);\n log.timeEnd(LOG_PROGRAM_PERF_PRIORITY, `linkProgram for ${this._getName()}`)();\n\n // Avoid checking program linking error in production\n // @ts-ignore\n if (gl.debug || log.level > 0) {\n const linked = gl.getProgramParameter(this.handle, gl.LINK_STATUS);\n if (!linked) {\n throw new Error(`Error linking: ${gl.getProgramInfoLog(this.handle)}`);\n }\n\n gl.validateProgram(this.handle);\n const validated = gl.getProgramParameter(this.handle, gl.VALIDATE_STATUS);\n if (!validated) {\n throw new Error(`Error validating: ${gl.getProgramInfoLog(this.handle)}`);\n }\n }\n }\n\n // query uniform locations and build name to setter map.\n // TODO - This overlaps with ProgramConfiguration?\n _readUniformLocationsFromLinkedProgram() {\n const {gl} = this;\n this._uniformSetters = {};\n this._uniformCount = this._getParameter(GL.ACTIVE_UNIFORMS);\n for (let i = 0; i < this._uniformCount; i++) {\n const info = this.gl.getActiveUniform(this.handle, i);\n const {name} = parseUniformName(info.name);\n let location = gl.getUniformLocation(this.handle, name);\n this._uniformSetters[name] = getUniformSetter(gl, location, info);\n if (info.size > 1) {\n for (let l = 0; l < info.size; l++) {\n location = gl.getUniformLocation(this.handle, `${name}[${l}]`);\n this._uniformSetters[`${name}[${l}]`] = getUniformSetter(gl, location, info);\n }\n }\n }\n this._textureIndexCounter = 0;\n }\n\n // TO BE REMOVED in v7?\n\n // Rretrieves information about active uniforms identifed by their indices (`uniformIndices`)\n // https://\n // developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/getActiveUniforms\n getActiveUniforms(uniformIndices, pname) {\n return this.gl2.getActiveUniforms(this.handle, uniformIndices, pname);\n }\n\n // Retrieves the index of a uniform block\n getUniformBlockIndex(blockName) {\n return this.gl2.getUniformBlockIndex(this.handle, blockName);\n }\n\n // Retrieves information about an active uniform block (`blockIndex`)\n // https://\n // developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/getActiveUniformBlockParameter\n getActiveUniformBlockParameter(blockIndex, pname) {\n return this.gl2.getActiveUniformBlockParameter(this.handle, blockIndex, pname);\n }\n\n // Binds a uniform block (`blockIndex`) to a specific binding point (`blockBinding`)\n uniformBlockBinding(blockIndex, blockBinding) {\n this.gl2.uniformBlockBinding(this.handle, blockIndex, blockBinding);\n }\n}\n","import {assert} from '../utils';\nconst FS100 = `void main() {gl_FragColor = vec4(0);}`;\nconst FS_GLES = `\\\nout vec4 transform_output;\nvoid main() {\n transform_output = vec4(0);\n}`;\nconst FS300 = `#version 300 es\\n${FS_GLES}`;\n\n// Prase given glsl line and return qualifier details or null\nexport function getQualifierDetails(line, qualifiers) {\n qualifiers = Array.isArray(qualifiers) ? qualifiers : [qualifiers];\n const words = line.replace(/^\\s+/, '').split(/\\s+/);\n // TODO add support for precession qualifiers (highp, mediump and lowp)\n const [qualifier, type, definition] = words;\n if (!qualifiers.includes(qualifier) || !type || !definition) {\n return null;\n }\n const name = definition.split(';')[0];\n return {qualifier, type, name};\n}\n\n// Given the shader version, input and output variable names,\n// builds and return a pass through fragment shader.\nexport function getPassthroughFS(options = {}) {\n const {version = 100, input, inputType, output} = options;\n if (!input) {\n if (version === 300) {\n // Fast-path for WebGL 2.0\n return FS300;\n } else if (version > 300) {\n // Use the supplied version for OpenGL/ES 3.2+\n return `#version ${version}\\n${FS_GLES}`;\n }\n // Fast-path for WebGL 1.0\n return FS100;\n }\n const outputValue = convertToVec4(input, inputType);\n if (version >= 300) {\n // If version is 300, assume WebGL 2.0\n return `\\\n#version ${version} ${version === 300 ? 'es' : ''}\nin ${inputType} ${input};\nout vec4 ${output};\nvoid main() {\n ${output} = ${outputValue};\n}`;\n }\n // WebGL 1.0\n return `\\\nvarying ${inputType} ${input};\nvoid main() {\n gl_FragColor = ${outputValue};\n}`;\n}\n\n// convert glsl type to suffix\nexport function typeToChannelSuffix(type) {\n switch (type) {\n case 'float':\n return 'x';\n case 'vec2':\n return 'xy';\n case 'vec3':\n return 'xyz';\n case 'vec4':\n return 'xyzw';\n default:\n assert(false);\n return null;\n }\n}\n\n// convert glsl type to channel count\nexport function typeToChannelCount(type) {\n switch (type) {\n case 'float':\n return 1;\n case 'vec2':\n return 2;\n case 'vec3':\n return 3;\n case 'vec4':\n return 4;\n default:\n assert(false);\n return null;\n }\n}\n\n// Returns glsl instruction for converting to vec4\nexport function convertToVec4(variable, type) {\n switch (type) {\n case 'float':\n return `vec4(${variable}, 0.0, 0.0, 1.0)`;\n case 'vec2':\n return `vec4(${variable}, 0.0, 1.0)`;\n case 'vec3':\n return `vec4(${variable}, 1.0)`;\n case 'vec4':\n return variable;\n default:\n assert(false);\n return null;\n }\n}\n","import {isWebGL2} from '@luma.gl/gltools';\nimport {Buffer, TransformFeedback} from '@luma.gl/webgl';\nimport {assert} from '@luma.gl/webgl';\n\nexport default class BufferTransform {\n constructor(gl, props = {}) {\n this.gl = gl;\n this.currentIndex = 0;\n this.feedbackMap = {};\n this.varyings = null; // varyings array\n this.bindings = []; // each element is an object : {sourceBuffers, feedbackBuffers, transformFeedback}\n\n this.resources = {}; // resources to be deleted\n\n this._initialize(props);\n Object.seal(this);\n }\n\n setupResources(opts) {\n for (const binding of this.bindings) {\n this._setupTransformFeedback(binding, opts);\n }\n }\n\n updateModelProps(props = {}) {\n const {varyings} = this;\n if (varyings.length > 0) {\n props = Object.assign({}, props, {varyings});\n }\n return props;\n }\n\n getDrawOptions(opts = {}) {\n const binding = this.bindings[this.currentIndex];\n const {sourceBuffers, transformFeedback} = binding;\n const attributes = Object.assign({}, sourceBuffers, opts.attributes);\n\n return {attributes, transformFeedback};\n }\n\n swap() {\n if (this.feedbackMap) {\n this.currentIndex = this._getNextIndex();\n return true;\n }\n return false;\n }\n\n // update source and/or feedbackBuffers\n update(opts = {}) {\n this._setupBuffers(opts);\n }\n\n // returns current feedbackBuffer of given name\n getBuffer(varyingName) {\n const {feedbackBuffers} = this.bindings[this.currentIndex];\n const bufferOrParams = varyingName ? feedbackBuffers[varyingName] : null;\n if (!bufferOrParams) {\n return null;\n }\n return bufferOrParams instanceof Buffer ? bufferOrParams : bufferOrParams.buffer;\n }\n\n getData(options = {}) {\n const {varyingName} = options;\n const buffer = this.getBuffer(varyingName);\n if (buffer) {\n return buffer.getData();\n }\n return null;\n }\n\n // Delete owned resources.\n delete() {\n for (const name in this.resources) {\n this.resources[name].delete();\n }\n }\n\n // Private\n\n _initialize(props = {}) {\n this._setupBuffers(props);\n this.varyings = props.varyings || Object.keys(this.bindings[this.currentIndex].feedbackBuffers);\n if (this.varyings.length > 0) {\n // if writting to buffers make sure it is WebGL2\n assert(isWebGL2(this.gl));\n }\n }\n\n // auto create feedback buffers if requested\n _getFeedbackBuffers(props) {\n const {sourceBuffers = {}} = props;\n const feedbackBuffers = {};\n if (this.bindings[this.currentIndex]) {\n // this gurantees a partial feedback buffer set doesn't update\n // previously set buffers during auto creation mode.\n Object.assign(feedbackBuffers, this.bindings[this.currentIndex].feedbackBuffers);\n }\n if (this.feedbackMap) {\n // feedbackMap is defined as sourceBuffer as key and feedbackBuffer name as object\n for (const sourceName in this.feedbackMap) {\n const feedbackName = this.feedbackMap[sourceName];\n if (sourceName in sourceBuffers) {\n feedbackBuffers[feedbackName] = sourceName;\n }\n }\n }\n Object.assign(feedbackBuffers, props.feedbackBuffers);\n for (const bufferName in feedbackBuffers) {\n const bufferOrRef = feedbackBuffers[bufferName];\n if (typeof bufferOrRef === 'string') {\n // Create new buffer with same layout and settings as source buffer\n const sourceBuffer = sourceBuffers[bufferOrRef];\n const {byteLength, usage, accessor} = sourceBuffer;\n feedbackBuffers[bufferName] = this._createNewBuffer(bufferName, {\n byteLength,\n usage,\n accessor\n });\n }\n }\n\n return feedbackBuffers;\n }\n\n _setupBuffers(props = {}) {\n const {sourceBuffers = null} = props;\n Object.assign(this.feedbackMap, props.feedbackMap);\n const feedbackBuffers = this._getFeedbackBuffers(props);\n this._updateBindings({sourceBuffers, feedbackBuffers});\n }\n\n _setupTransformFeedback(binding, {model}) {\n const {program} = model;\n binding.transformFeedback = new TransformFeedback(this.gl, {\n program,\n buffers: binding.feedbackBuffers\n });\n }\n\n _updateBindings(opts) {\n this.bindings[this.currentIndex] = this._updateBinding(this.bindings[this.currentIndex], opts);\n if (this.feedbackMap) {\n const {sourceBuffers, feedbackBuffers} = this._swapBuffers(this.bindings[this.currentIndex]);\n const nextIndex = this._getNextIndex();\n this.bindings[nextIndex] = this._updateBinding(this.bindings[nextIndex], {\n sourceBuffers,\n feedbackBuffers\n });\n }\n }\n\n _updateBinding(binding, opts) {\n if (!binding) {\n return {\n sourceBuffers: Object.assign({}, opts.sourceBuffers),\n feedbackBuffers: Object.assign({}, opts.feedbackBuffers)\n };\n }\n Object.assign(binding.sourceBuffers, opts.sourceBuffers);\n Object.assign(binding.feedbackBuffers, opts.feedbackBuffers);\n if (binding.transformFeedback) {\n binding.transformFeedback.setBuffers(binding.feedbackBuffers);\n }\n return binding;\n }\n\n _swapBuffers(opts) {\n if (!this.feedbackMap) {\n return null;\n }\n const sourceBuffers = Object.assign({}, opts.sourceBuffers);\n const feedbackBuffers = Object.assign({}, opts.feedbackBuffers);\n for (const srcName in this.feedbackMap) {\n const dstName = this.feedbackMap[srcName];\n sourceBuffers[srcName] = opts.feedbackBuffers[dstName];\n feedbackBuffers[dstName] = opts.sourceBuffers[srcName];\n\n // make sure the new destination buffer is a Buffer object\n assert(feedbackBuffers[dstName] instanceof Buffer);\n }\n return {sourceBuffers, feedbackBuffers};\n }\n\n // Create a buffer and add to list of buffers to be deleted.\n _createNewBuffer(name, opts) {\n const buffer = new Buffer(this.gl, opts);\n if (this.resources[name]) {\n this.resources[name].delete();\n }\n this.resources[name] = buffer;\n return buffer;\n }\n\n _getNextIndex() {\n return (this.currentIndex + 1) % 2;\n }\n}\n","// returns GLSL shader version of given shader string\nexport default function getShaderVersion(source) {\n let version = 100;\n const words = source.match(/[^\\s]+/g);\n if (words.length >= 2 && words[0] === '#version') {\n const v = parseInt(words[1], 10);\n if (Number.isFinite(v)) {\n version = v;\n }\n }\n return version;\n}\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nconst vs = `\\\nattribute float transform_elementID;\n\n// returns half of pixel size, used to move the pixel position to center of the pixel.\nvec2 transform_getPixelSizeHalf(vec2 size) {\n return vec2(1.) / (2. * size);\n}\n\n// returns current elements pixel indeces [x, y],\n// where x ranges in [0 to texSize-1] and y ranges in [0 to texSize-1]\nvec2 transform_getPixelIndices(vec2 texSize, vec2 pixelSizeHalf) {\n // Add safe offset (half of pixel height) before doing floor\n float yIndex = floor((transform_elementID / texSize[0]) + pixelSizeHalf[1]);\n float xIndex = transform_elementID - (yIndex * texSize[0]);\n return vec2(xIndex, yIndex);\n}\n\n// returns current elementID's texture co-ordianate\nvec2 transform_getTexCoord(vec2 size) {\n vec2 pixelSizeHalf = transform_getPixelSizeHalf(size);\n vec2 indices = transform_getPixelIndices(size, pixelSizeHalf);\n vec2 coord = indices / size + pixelSizeHalf;\n return coord;\n}\n\n// returns current elementID's position\nvec2 transform_getPos(vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n // Change from [0 1] range to [-1 1]\n vec2 pos = (texCoord * (2.0, 2.0)) - (1., 1.);\n return pos;\n}\n\n// returns current elementID's pixel value\nvec4 transform_getInput(sampler2D texSampler, vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec4 textureColor = texture2D(texSampler, texCoord);\n return textureColor;\n}\n`;\n\n/** @type {ShaderModule} */\nexport const transform = {\n name: 'transform',\n vs,\n fs: null\n};\n","import {assert} from '@luma.gl/webgl';\nimport {combineInjects, getQualifierDetails, typeToChannelSuffix} from '@luma.gl/shadertools';\n\nconst SAMPLER_UNIFORM_PREFIX = 'transform_uSampler_';\nconst SIZE_UNIFORM_PREFIX = 'transform_uSize_';\nconst VS_POS_VARIABLE = 'transform_position';\n\n// Scan provided vertex shader\n// for each texture attribute, inject sampler instructions and build uniforms for sampler\n// for texture target, get varying type and inject position instruction\nexport function updateForTextures({vs, sourceTextureMap, targetTextureVarying, targetTexture}) {\n const texAttributeNames = Object.keys(sourceTextureMap);\n let sourceCount = texAttributeNames.length;\n let targetTextureType = null;\n const samplerTextureMap = {};\n let updatedVs = vs;\n let finalInject = {};\n\n if (sourceCount > 0 || targetTextureVarying) {\n const vsLines = updatedVs.split('\\n');\n const updateVsLines = vsLines.slice();\n vsLines.forEach((line, index, lines) => {\n // TODO add early exit\n if (sourceCount > 0) {\n const updated = processAttributeDefinition(line, sourceTextureMap);\n if (updated) {\n const {updatedLine, inject} = updated;\n updateVsLines[index] = updatedLine;\n // sampleInstructions.push(sampleInstruction);\n finalInject = combineInjects([finalInject, inject]);\n Object.assign(samplerTextureMap, updated.samplerTextureMap);\n sourceCount--;\n }\n }\n if (targetTextureVarying && !targetTextureType) {\n targetTextureType = getVaryingType(line, targetTextureVarying);\n }\n });\n\n if (targetTextureVarying) {\n assert(targetTexture);\n const sizeName = `${SIZE_UNIFORM_PREFIX}${targetTextureVarying}`;\n\n const uniformDeclaration = `uniform vec2 ${sizeName};\\n`;\n const posInstructions = `\\\n vec2 ${VS_POS_VARIABLE} = transform_getPos(${sizeName});\n gl_Position = vec4(${VS_POS_VARIABLE}, 0, 1.);\\n`;\n const inject = {\n 'vs:#decl': uniformDeclaration,\n 'vs:#main-start': posInstructions\n };\n finalInject = combineInjects([finalInject, inject]);\n }\n updatedVs = updateVsLines.join('\\n');\n }\n return {\n // updated vertex shader (commented texture attribute definition)\n vs: updatedVs,\n // type (float, vec2, vec3 of vec4) target texture varying\n targetTextureType,\n // required vertex and fragment shader injects\n inject: finalInject,\n // map of sampler name to texture name, can be used to set attributes\n // usefull when swapping textures, as source and destination texture change when swap is called.\n samplerTextureMap\n };\n}\n\n// builds and returns an object contaning size uniform for each texture\nexport function getSizeUniforms({sourceTextureMap, targetTextureVarying, targetTexture}) {\n const uniforms = {};\n let width;\n let height;\n if (targetTextureVarying) {\n ({width, height} = targetTexture);\n uniforms[`${SIZE_UNIFORM_PREFIX}${targetTextureVarying}`] = [width, height];\n }\n for (const textureName in sourceTextureMap) {\n ({width, height} = sourceTextureMap[textureName]);\n uniforms[`${SIZE_UNIFORM_PREFIX}${textureName}`] = [width, height];\n }\n return uniforms;\n}\n\n// Checks if provided line is defining an attribute, if so returns details otherwise null\nfunction getAttributeDefinition(line) {\n return getQualifierDetails(line, ['attribute', 'in']);\n}\n\nfunction getSamplerDeclerations(textureName) {\n const samplerName = `${SAMPLER_UNIFORM_PREFIX}${textureName}`;\n const sizeName = `${SIZE_UNIFORM_PREFIX}${textureName}`;\n const uniformDeclerations = `\\\n uniform sampler2D ${samplerName};\n uniform vec2 ${sizeName};`;\n return {samplerName, sizeName, uniformDeclerations};\n}\n\n// Return size (float, vec2 etc) of a given varying, null if doens't exist.\nexport function getVaryingType(line, varying) {\n const qualaiferDetails = getQualifierDetails(line, ['varying', 'out']);\n if (!qualaiferDetails) {\n return null;\n }\n return qualaiferDetails.name === varying ? qualaiferDetails.type : null;\n}\n\n// build required definitions, sample instructions for each texture attribute\nexport function processAttributeDefinition(line, textureMap) {\n const samplerTextureMap = {};\n const attributeData = getAttributeDefinition(line);\n if (!attributeData) {\n return null;\n }\n const {type, name} = attributeData;\n if (name && textureMap[name]) {\n // eslint-disable-next-line no-useless-escape\n const updatedLine = `\\// ${line} => Replaced by Transform with a sampler`;\n const {samplerName, sizeName, uniformDeclerations} = getSamplerDeclerations(name);\n\n const channels = typeToChannelSuffix(type);\n const sampleInstruction = ` ${type} ${name} = transform_getInput(${samplerName}, ${sizeName}).${channels};\\n`;\n\n samplerTextureMap[samplerName] = name;\n const inject = {\n 'vs:#decl': uniformDeclerations,\n 'vs:#main-start': sampleInstruction\n };\n\n // samplerNameMap\n return {\n // update vertex shader line.\n updatedLine,\n // inject object with sampler instructions.\n inject,\n // sampler name to texture name map\n samplerTextureMap\n };\n }\n return null;\n}\n","/** @typedef {import('./transform').TransformProps} TransformProps */\nimport GL from '@luma.gl/constants';\n\nimport {\n cloneTextureFrom,\n readPixelsToArray,\n getShaderVersion,\n Buffer,\n Texture2D,\n Framebuffer\n} from '@luma.gl/webgl';\n\nimport {\n _transform as transformModule,\n getPassthroughFS,\n typeToChannelCount,\n combineInjects\n} from '@luma.gl/shadertools';\n\nimport {updateForTextures, getSizeUniforms} from './transform-shader-utils';\n\n// TODO: move these constants to transform-shader-utils\n// Texture parameters needed so sample can precisely pick pixel for given element id.\nconst SRC_TEX_PARAMETER_OVERRIDES = {\n [GL.TEXTURE_MIN_FILTER]: GL.NEAREST,\n [GL.TEXTURE_MAG_FILTER]: GL.NEAREST,\n [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE\n};\nconst FS_OUTPUT_VARIABLE = 'transform_output';\n\nexport default class TextureTransform {\n constructor(gl, props = {}) {\n this.gl = gl;\n this.id = this.currentIndex = 0;\n this._swapTexture = null;\n this.targetTextureVarying = null;\n this.targetTextureType = null;\n this.samplerTextureMap = null;\n this.bindings = []; // each element is an object : {sourceTextures, targetTexture, framebuffer}\n\n this.resources = {}; // resources to be deleted\n\n this._initialize(props);\n Object.seal(this);\n }\n\n updateModelProps(props = {}) {\n const updatedModelProps = this._processVertexShader(props);\n return Object.assign({}, props, updatedModelProps);\n }\n\n getDrawOptions(opts = {}) {\n const {sourceBuffers, sourceTextures, framebuffer, targetTexture} = this.bindings[\n this.currentIndex\n ];\n\n const attributes = Object.assign({}, sourceBuffers, opts.attributes);\n const uniforms = Object.assign({}, opts.uniforms);\n const parameters = Object.assign({}, opts.parameters);\n let discard = opts.discard;\n\n if (this.hasSourceTextures || this.hasTargetTexture) {\n attributes.transform_elementID = this.elementIDBuffer;\n\n for (const sampler in this.samplerTextureMap) {\n const textureName = this.samplerTextureMap[sampler];\n uniforms[sampler] = sourceTextures[textureName];\n }\n this._setSourceTextureParameters();\n // get texture size uniforms\n const sizeUniforms = getSizeUniforms({\n sourceTextureMap: sourceTextures,\n targetTextureVarying: this.targetTextureVarying,\n targetTexture\n });\n Object.assign(uniforms, sizeUniforms);\n }\n\n if (this.hasTargetTexture) {\n discard = false;\n parameters.viewport = [0, 0, framebuffer.width, framebuffer.height];\n }\n\n return {attributes, framebuffer, uniforms, discard, parameters};\n }\n\n swap() {\n if (this._swapTexture) {\n this.currentIndex = this._getNextIndex();\n return true;\n }\n return false;\n }\n\n // update source and/or feedbackBuffers\n update(opts = {}) {\n this._setupTextures(opts);\n }\n\n // returns current target texture\n getTargetTexture() {\n const {targetTexture} = this.bindings[this.currentIndex];\n return targetTexture;\n }\n\n getData({packed = false} = {}) {\n const {framebuffer} = this.bindings[this.currentIndex];\n const pixels = readPixelsToArray(framebuffer);\n\n if (!packed) {\n return pixels;\n }\n\n // readPixels returns 4 elements for each pixel, pack the elements when requested\n const ArrayType = pixels.constructor;\n const channelCount = typeToChannelCount(this.targetTextureType);\n // @ts-ignore\n const packedPixels = new ArrayType((pixels.length * channelCount) / 4);\n let packCount = 0;\n for (let i = 0; i < pixels.length; i += 4) {\n for (let j = 0; j < channelCount; j++) {\n packedPixels[packCount++] = pixels[i + j];\n }\n }\n return packedPixels;\n }\n\n // returns current framebuffer object that is being used.\n getFramebuffer() {\n const currentResources = this.bindings[this.currentIndex];\n return currentResources.framebuffer;\n }\n\n // Delete owned resources.\n delete() {\n if (this.ownTexture) {\n this.ownTexture.delete();\n }\n if (this.elementIDBuffer) {\n this.elementIDBuffer.delete();\n }\n }\n\n // Private\n\n _initialize(props = {}) {\n const {_targetTextureVarying, _swapTexture} = props;\n this._swapTexture = _swapTexture;\n this.targetTextureVarying = _targetTextureVarying;\n this.hasTargetTexture = _targetTextureVarying;\n this._setupTextures(props);\n }\n\n // auto create target texture if requested\n _createTargetTexture(props) {\n const {sourceTextures, textureOrReference} = props;\n if (textureOrReference instanceof Texture2D) {\n return textureOrReference;\n }\n // 'targetTexture' is a reference souce texture.\n const refTexture = sourceTextures[textureOrReference];\n if (!refTexture) {\n return null;\n }\n\n // save reference texture name, when corresponding source texture is updated\n // we also update target texture.\n this._targetRefTexName = textureOrReference;\n\n return this._createNewTexture(refTexture);\n }\n\n /** @param {TransformProps} props */\n _setupTextures(props = {}) {\n const {sourceBuffers, _sourceTextures = {}, _targetTexture} = props;\n const targetTexture = this._createTargetTexture({\n sourceTextures: _sourceTextures,\n textureOrReference: _targetTexture\n });\n this.hasSourceTextures =\n this.hasSourceTextures || (_sourceTextures && Object.keys(_sourceTextures).length > 0);\n this._updateBindings({sourceBuffers, sourceTextures: _sourceTextures, targetTexture});\n if ('elementCount' in props) {\n this._updateElementIDBuffer(props.elementCount);\n }\n }\n\n _updateElementIDBuffer(elementCount) {\n if (typeof elementCount !== 'number' || this.elementCount >= elementCount) {\n return;\n }\n // NOTE: using float so this will work with GLSL 1.0 shaders.\n const elementIds = new Float32Array(elementCount);\n elementIds.forEach((_, index, array) => {\n array[index] = index;\n });\n if (!this.elementIDBuffer) {\n this.elementIDBuffer = new Buffer(this.gl, {\n data: elementIds,\n accessor: {size: 1}\n });\n } else {\n this.elementIDBuffer.setData({data: elementIds});\n }\n this.elementCount = elementCount;\n }\n\n _updateBindings(opts) {\n this.bindings[this.currentIndex] = this._updateBinding(this.bindings[this.currentIndex], opts);\n if (this._swapTexture) {\n const {sourceTextures, targetTexture} = this._swapTextures(this.bindings[this.currentIndex]);\n const nextIndex = this._getNextIndex();\n this.bindings[nextIndex] = this._updateBinding(this.bindings[nextIndex], {\n sourceTextures,\n targetTexture\n });\n }\n }\n\n _updateBinding(binding, opts) {\n const {sourceBuffers, sourceTextures, targetTexture} = opts;\n if (!binding) {\n binding = {\n sourceBuffers: {},\n sourceTextures: {},\n targetTexture: null\n };\n }\n Object.assign(binding.sourceTextures, sourceTextures);\n Object.assign(binding.sourceBuffers, sourceBuffers);\n if (targetTexture) {\n binding.targetTexture = targetTexture;\n\n const {width, height} = targetTexture;\n const {framebuffer} = binding;\n if (framebuffer) {\n // First update texture without re-sizing attachments\n framebuffer.update({\n attachments: {[GL.COLOR_ATTACHMENT0]: targetTexture},\n resizeAttachments: false\n });\n // Resize to new taget texture size\n framebuffer.resize({width, height});\n } else {\n binding.framebuffer = new Framebuffer(this.gl, {\n id: `transform-framebuffer`,\n width,\n height,\n attachments: {\n [GL.COLOR_ATTACHMENT0]: targetTexture\n }\n });\n }\n }\n return binding;\n }\n\n // set texture filtering parameters on source textures.\n _setSourceTextureParameters() {\n const index = this.currentIndex;\n const {sourceTextures} = this.bindings[index];\n for (const name in sourceTextures) {\n sourceTextures[name].setParameters(SRC_TEX_PARAMETER_OVERRIDES);\n }\n }\n\n _swapTextures(opts) {\n if (!this._swapTexture) {\n return null;\n }\n const sourceTextures = Object.assign({}, opts.sourceTextures);\n sourceTextures[this._swapTexture] = opts.targetTexture;\n\n const targetTexture = opts.sourceTextures[this._swapTexture];\n\n return {sourceTextures, targetTexture};\n }\n\n // Create a buffer and add to list of buffers to be deleted.\n _createNewTexture(refTexture) {\n const texture = cloneTextureFrom(refTexture, {\n parameters: {\n [GL.TEXTURE_MIN_FILTER]: GL.NEAREST,\n [GL.TEXTURE_MAG_FILTER]: GL.NEAREST,\n [GL.TEXTURE_WRAP_S]: GL.CLAMP_TO_EDGE,\n [GL.TEXTURE_WRAP_T]: GL.CLAMP_TO_EDGE\n },\n pixelStore: {\n [GL.UNPACK_FLIP_Y_WEBGL]: false\n }\n });\n\n // thre can only be one target texture\n if (this.ownTexture) {\n this.ownTexture.delete();\n }\n this.ownTexture = texture;\n\n return texture;\n }\n\n _getNextIndex() {\n return (this.currentIndex + 1) % 2;\n }\n\n // build and return shader releated parameters\n _processVertexShader(props = {}) {\n const {sourceTextures, targetTexture} = this.bindings[this.currentIndex];\n // @ts-ignore TODO - uniforms is not present\n const {vs, uniforms, targetTextureType, inject, samplerTextureMap} = updateForTextures({\n vs: props.vs,\n sourceTextureMap: sourceTextures,\n targetTextureVarying: this.targetTextureVarying,\n targetTexture\n });\n const combinedInject = combineInjects([props.inject || {}, inject]);\n this.targetTextureType = targetTextureType;\n this.samplerTextureMap = samplerTextureMap;\n const fs =\n props._fs ||\n getPassthroughFS({\n version: getShaderVersion(vs),\n input: this.targetTextureVarying,\n inputType: targetTextureType,\n output: FS_OUTPUT_VARIABLE\n });\n const modules =\n this.hasSourceTextures || this.targetTextureVarying\n ? [transformModule].concat(props.modules || [])\n : props.modules;\n return {vs, fs, modules, uniforms, inject: combinedInject};\n }\n}\n","import GL from '@luma.gl/constants';\nimport {getPassthroughFS} from '@luma.gl/shadertools';\nimport BufferTransform from './buffer-transform';\nimport TextureTransform from './texture-transform';\n\nimport {isWebGL2} from '@luma.gl/gltools';\nimport {assert, isObjectEmpty, getShaderVersion} from '@luma.gl/webgl';\nimport Model from '../lib/model';\n\n// takes source and target buffers/textures and setsup the pipeline\nexport default class Transform {\n static isSupported(gl) {\n // TODO : differentiate writting to buffer vs not\n return isWebGL2(gl);\n }\n\n constructor(gl, props = {}) {\n this.gl = gl;\n this.model = null;\n this.elementCount = 0;\n this.bufferTransform = null;\n this.textureTransform = null;\n this.elementIDBuffer = null;\n this._initialize(props);\n Object.seal(this);\n }\n\n // Delete owned resources.\n delete() {\n const {model, bufferTransform, textureTransform} = this;\n if (model) {\n model.delete();\n }\n if (bufferTransform) {\n bufferTransform.delete();\n }\n if (textureTransform) {\n textureTransform.delete();\n }\n }\n\n // Run one transform loop.\n run(opts = {}) {\n const {clearRenderTarget = true} = opts;\n\n const updatedOpts = this._updateDrawOptions(opts);\n\n if (clearRenderTarget && updatedOpts.framebuffer) {\n updatedOpts.framebuffer.clear({color: true});\n }\n\n this.model.transform(updatedOpts);\n }\n\n // swap resources if a map is provided\n swap() {\n let swapped = false;\n const resourceTransforms = [this.bufferTransform, this.textureTransform].filter(Boolean);\n for (const resourceTransform of resourceTransforms) {\n swapped = swapped || resourceTransform.swap();\n }\n assert(swapped, 'Nothing to swap');\n }\n\n // Return Buffer object for given varying name.\n getBuffer(varyingName = null) {\n return this.bufferTransform && this.bufferTransform.getBuffer(varyingName);\n }\n\n // Return data either from Buffer or from Texture\n getData(opts = {}) {\n const resourceTransforms = [this.bufferTransform, this.textureTransform].filter(Boolean);\n for (const resourceTransform of resourceTransforms) {\n // @ts-ignore\n const data = resourceTransform.getData(opts);\n if (data) {\n return data;\n }\n }\n return null;\n }\n\n // Return framebuffer object if rendering to textures\n getFramebuffer() {\n return this.textureTransform && this.textureTransform.getFramebuffer();\n }\n\n // Update some or all buffer/texture bindings.\n update(opts = {}) {\n if ('elementCount' in opts) {\n // @ts-ignore TODO\n this.model.setVertexCount(opts.elementCount);\n }\n const resourceTransforms = [this.bufferTransform, this.textureTransform].filter(Boolean);\n for (const resourceTransform of resourceTransforms) {\n resourceTransform.update(opts);\n }\n }\n\n // Private\n\n _initialize(props = {}) {\n const {gl} = this;\n this._buildResourceTransforms(gl, props);\n\n props = this._updateModelProps(props);\n this.model = new Model(\n gl,\n Object.assign({}, props, {\n fs: props.fs || getPassthroughFS({version: getShaderVersion(props.vs)}),\n id: props.id || 'transform-model',\n drawMode: props.drawMode || GL.POINTS,\n vertexCount: props.elementCount\n })\n );\n\n /* eslint-disable no-unused-expressions */\n this.bufferTransform && this.bufferTransform.setupResources({model: this.model});\n /* eslint-enable no-unused-expressions */\n }\n\n _updateModelProps(props) {\n let updatedProps = Object.assign({}, props);\n const resourceTransforms = [this.bufferTransform, this.textureTransform].filter(Boolean);\n for (const resourceTransform of resourceTransforms) {\n updatedProps = resourceTransform.updateModelProps(updatedProps);\n }\n return updatedProps;\n }\n\n _buildResourceTransforms(gl, props) {\n if (canCreateBufferTransform(props)) {\n this.bufferTransform = new BufferTransform(gl, props);\n }\n if (canCreateTextureTransform(props)) {\n this.textureTransform = new TextureTransform(gl, props);\n }\n assert(\n this.bufferTransform || this.textureTransform,\n 'must provide source/feedback buffers or source/target textures'\n );\n }\n\n _updateDrawOptions(opts) {\n let updatedOpts = Object.assign({}, opts);\n const resourceTransforms = [this.bufferTransform, this.textureTransform].filter(Boolean);\n for (const resourceTransform of resourceTransforms) {\n updatedOpts = Object.assign(updatedOpts, resourceTransform.getDrawOptions(updatedOpts));\n }\n return updatedOpts;\n }\n}\n\n// Helper Methods\n\nfunction canCreateBufferTransform(props) {\n if (\n !isObjectEmpty(props.feedbackBuffers) ||\n !isObjectEmpty(props.feedbackMap) ||\n (props.varyings && props.varyings.length > 0)\n ) {\n return true;\n }\n return false;\n}\n\nfunction canCreateTextureTransform(props) {\n if (\n !isObjectEmpty(props._sourceTextures) ||\n props._targetTexture ||\n props._targetTextureVarying\n ) {\n return true;\n }\n\n return false;\n}\n","// From https://github.com/streamich/react-use/blob/master/src/useIsomorphicLayoutEffect.ts\n// useLayoutEffect but does not trigger warning in server-side rendering\nimport {useEffect, useLayoutEffect} from 'react';\n\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n\nexport default useIsomorphicLayoutEffect;\n","// Check if one JavaScript class inherits from another\nexport function inheritsFrom(Type, ParentType) {\n while (Type) {\n if (Type === ParentType) {\n return true;\n }\n Type = Object.getPrototypeOf(Type);\n }\n return false;\n}\n","import React, {createElement} from 'react';\nimport {inheritsFrom} from './inherits-from';\nimport {Layer, View} from '@deck.gl/core';\n\n// recursively wrap render callbacks in `View`\nfunction wrapInView(node) {\n if (!node) {\n return node;\n }\n if (typeof node === 'function') {\n // React.Children does not traverse functions.\n // All render callbacks must be protected under a <View>\n return createElement(View, {}, node);\n }\n if (Array.isArray(node)) {\n return node.map(wrapInView);\n }\n if (node.type === React.Fragment) {\n return wrapInView(node.props.children);\n }\n if (inheritsFrom(node.type, View)) {\n return node;\n }\n return node;\n}\n\n// extracts any deck.gl layers masquerading as react elements from props.children\nexport default function extractJSXLayers({children, layers, views}) {\n const reactChildren = []; // extract real react elements (i.e. not deck.gl layers)\n const jsxLayers = []; // extracted layer from react children, will add to deck.gl layer array\n const jsxViews = {};\n\n // React.children\n React.Children.forEach(wrapInView(children), reactElement => {\n if (reactElement) {\n // For some reason Children.forEach doesn't filter out `null`s\n const ElementType = reactElement.type;\n if (inheritsFrom(ElementType, Layer)) {\n const layer = createLayer(ElementType, reactElement.props);\n jsxLayers.push(layer);\n } else {\n reactChildren.push(reactElement);\n }\n\n // empty id => default view\n if (ElementType !== View && inheritsFrom(ElementType, View) && reactElement.props.id) {\n const view = new ElementType(reactElement.props);\n jsxViews[view.id] = view;\n }\n }\n });\n\n // Avoid modifying views if no JSX views were found\n if (Object.keys(jsxViews).length > 0) {\n // If a view is specified in both views prop and JSX, use the one in views\n if (Array.isArray(views)) {\n views.forEach(view => {\n jsxViews[view.id] = view;\n });\n } else if (views) {\n jsxViews[views.id] = views;\n }\n views = Object.values(jsxViews);\n }\n\n // Avoid modifying layers array if no JSX layers were found\n layers = jsxLayers.length > 0 ? [...jsxLayers, ...layers] : layers;\n\n return {layers, children: reactChildren, views};\n}\n\nfunction createLayer(LayerType, reactProps) {\n const props = {};\n // Layer.defaultProps is treated as ReactElement.defaultProps and merged into react props\n // Remove them\n const defaultProps = LayerType.defaultProps || {};\n for (const key in reactProps) {\n if (defaultProps[key] !== reactProps[key]) {\n props[key] = reactProps[key];\n }\n }\n return new LayerType(props);\n}\n","import {cloneElement} from 'react';\n\nconst MAP_STYLE = {position: 'absolute', zIndex: -1};\n\nexport default function evaluateChildren(children, childProps) {\n if (!children) {\n return children;\n }\n if (typeof children === 'function') {\n return children(childProps);\n }\n if (Array.isArray(children)) {\n return children.map(child => evaluateChildren(child, childProps));\n }\n\n // Special treatment for react-map-gl's Map component\n // to support shorthand use case <DeckGL><StaticMap /></DeckGL>\n if (isReactMap(children)) {\n // Place map under the canvas\n childProps.style = MAP_STYLE;\n return cloneElement(children, childProps);\n }\n if (needsDeckGLViewProps(children)) {\n return cloneElement(children, childProps);\n }\n return children;\n}\n\nfunction isReactMap(child) {\n const componentClass = child && child.type;\n const componentProps = componentClass && componentClass.defaultProps;\n return componentProps && componentProps.mapStyle;\n}\n\nfunction needsDeckGLViewProps(child) {\n const componentClass = child && child.type;\n return componentClass && componentClass.deckGLViewProps;\n}\n","const CANVAS_ONLY_STYLES = {\n mixBlendMode: null\n};\n\nexport default function extractStyles({width, height, style}) {\n // This styling is enforced for correct positioning with children\n const containerStyle = {\n position: 'absolute',\n zIndex: 0,\n left: 0,\n top: 0,\n width,\n height\n };\n\n // Fill the container\n const canvasStyle = {\n left: 0,\n top: 0\n };\n\n if (style) {\n for (const key in style) {\n if (key in CANVAS_ONLY_STYLES) {\n // apply style to the canvas, but not deck's children, e.g. mix-blend-mode\n canvasStyle[key] = style[key];\n } else {\n // apply style to the container, e.g. position/flow settings\n containerStyle[key] = style[key];\n }\n }\n }\n\n return {containerStyle, canvasStyle};\n}\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {\n createElement,\n useRef,\n useState,\n useMemo,\n useEffect,\n useImperativeHandle,\n forwardRef\n} from 'react';\nimport PropTypes from 'prop-types';\nimport {Deck} from '@deck.gl/core';\nimport useIsomorphicLayoutEffect from './utils/use-isomorphic-layout-effect';\n\nimport extractJSXLayers from './utils/extract-jsx-layers';\nimport positionChildrenUnderViews from './utils/position-children-under-views';\nimport extractStyles from './utils/extract-styles';\n\n/* eslint-disable max-statements, accessor-pairs */\n\nfunction getRefHandles(thisRef) {\n const handles = {\n pickObject: opts => thisRef.deck.pickObject(opts),\n pickMultipleObjects: opts => thisRef.deck.pickMultipleObjects(opts),\n pickObjects: opts => thisRef.deck.pickObjects(opts)\n };\n Object.defineProperty(handles, 'deck', {\n get: () => thisRef.deck\n });\n return handles;\n}\n\nfunction redrawDeck(thisRef) {\n if (thisRef.redrawReason) {\n // Only redraw if we have received a dirty flag\n thisRef.deck._drawLayers(thisRef.redrawReason);\n thisRef.redrawReason = null;\n }\n}\n\nfunction createDeckInstance(thisRef, props) {\n // Allows a subclass of Deck to be used\n // TODO - update propTypes / defaultProps?\n const DeckClass = props.Deck || Deck;\n const deck = new DeckClass({\n ...props,\n style: null,\n width: '100%',\n height: '100%',\n // The Deck's animation loop is independent from React's render cycle, causing potential\n // synchronization issues. We provide this custom render function to make sure that React\n // and Deck update on the same schedule.\n _customRender: redrawReason => {\n // Save the dirty flag for later\n thisRef.redrawReason = redrawReason;\n\n // Viewport/view state is passed to child components as props.\n // If they have changed, we need to trigger a React rerender to update children props.\n const viewports = deck.viewManager.getViewports();\n if (thisRef.lastRenderedViewports !== viewports) {\n // Viewports have changed, update children props first.\n // This will delay the Deck canvas redraw till after React update (in useLayoutEffect)\n // so that the canvas does not get rendered before the child components update.\n thisRef.forceUpdate(v => v + 1);\n } else {\n redrawDeck(thisRef);\n }\n }\n });\n return deck;\n}\n\nconst DeckGL = forwardRef((props, ref) => {\n // A reference to persistent states\n const _thisRef = useRef({});\n const thisRef = _thisRef.current;\n // A mechanism to force redraw\n const [version, setVersion] = useState(0);\n thisRef.forceUpdate = setVersion;\n // DOM refs\n const containerRef = useRef(null);\n const canvasRef = useRef(null);\n\n // extract any deck.gl layers masquerading as react elements from props.children\n const jsxProps = useMemo(() => extractJSXLayers(props), [\n props.layers,\n props.views,\n props.children\n ]);\n\n // Callbacks\n let inRender = true;\n\n const handleViewStateChange = params => {\n if (inRender && props.viewState) {\n // Callback may invoke a state update. Defer callback to after render() to avoid React error\n // In React StrictMode, render is executed twice and useEffect/useLayoutEffect is executed once\n // Store deferred parameters in ref so that we can access it in another render\n thisRef.viewStateUpdateRequested = params;\n return null;\n }\n thisRef.viewStateUpdateRequested = null;\n return props.onViewStateChange(params);\n };\n\n const handleInteractionStateChange = params => {\n if (inRender) {\n // Callback may invoke a state update. Defer callback to after render() to avoid React error\n // In React StrictMode, render is executed twice and useEffect/useLayoutEffect is executed once\n // Store deferred parameters in ref so that we can access it in another render\n thisRef.interactionStateUpdateRequested = params;\n } else {\n thisRef.interactionStateUpdateRequested = null;\n props.onInteractionStateChange(params);\n }\n };\n\n // Update Deck's props. If Deck needs redraw, this will trigger a call to `_customRender` in\n // the next animation frame.\n // Needs to be called both from initial mount, and when new props are received\n const deckProps = useMemo(\n () => {\n const forwardProps = {\n ...props,\n // Override user styling props. We will set the canvas style in render()\n style: null,\n width: '100%',\n height: '100%',\n layers: jsxProps.layers,\n views: jsxProps.views,\n onViewStateChange: handleViewStateChange,\n onInteractionStateChange: handleInteractionStateChange\n };\n\n if (thisRef.deck) {\n thisRef.deck.setProps(forwardProps);\n }\n\n return forwardProps;\n },\n [props]\n );\n\n useEffect(() => {\n thisRef.deck = createDeckInstance(thisRef, {\n ...deckProps,\n parent: containerRef.current,\n canvas: canvasRef.current\n });\n\n return () => thisRef.deck.finalize();\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n // render has just been called. The children are positioned based on the current view state.\n // Redraw Deck canvas immediately, if necessary, using the current view state, so that it\n // matches the child components.\n redrawDeck(thisRef);\n\n // Execute deferred callbacks\n const {viewStateUpdateRequested, interactionStateUpdateRequested} = thisRef;\n if (viewStateUpdateRequested) {\n handleViewStateChange(viewStateUpdateRequested);\n }\n if (interactionStateUpdateRequested) {\n handleInteractionStateChange(interactionStateUpdateRequested);\n }\n });\n\n useImperativeHandle(ref, () => getRefHandles(thisRef), []);\n\n const {viewManager} = thisRef.deck || {};\n const currentViewports = viewManager && viewManager.getViewports();\n\n const {ContextProvider, width, height, id, style} = props;\n\n const {containerStyle, canvasStyle} = useMemo(() => extractStyles({width, height, style}), [\n width,\n height,\n style\n ]);\n\n // Props changes may lead to 3 types of updates:\n // 1. Only the WebGL canvas - updated in Deck's render cycle (next animation frame)\n // 2. Only the DOM - updated in React's lifecycle (now)\n // 3. Both the WebGL canvas and the DOM - defer React rerender to next animation frame just\n // before Deck redraw to ensure perfect synchronization & avoid excessive redraw\n // This is because multiple changes may happen to Deck between two frames e.g. transition\n if (\n (!thisRef.viewStateUpdateRequested && thisRef.lastRenderedViewports === currentViewports) || // case 2\n thisRef.version !== version // case 3 just before deck redraws\n ) {\n thisRef.lastRenderedViewports = currentViewports;\n thisRef.version = version;\n\n // Render the background elements (typically react-map-gl instances)\n // using the view descriptors\n const childrenUnderViews = positionChildrenUnderViews({\n children: jsxProps.children,\n deck: thisRef.deck,\n ContextProvider\n });\n\n const canvas = createElement('canvas', {\n key: 'canvas',\n id: id || 'deckgl-overlay',\n ref: canvasRef,\n style: canvasStyle\n });\n\n // Render deck.gl as the last child\n thisRef.control = createElement(\n 'div',\n {id: `${id || 'deckgl'}-wrapper`, ref: containerRef, style: containerStyle},\n [canvas, childrenUnderViews]\n );\n }\n\n inRender = false;\n return thisRef.control;\n});\n\nDeckGL.propTypes = Deck.getPropTypes(PropTypes);\nDeckGL.defaultProps = Deck.defaultProps;\n\nexport default DeckGL;\n","import {createElement} from 'react';\nimport {View} from '@deck.gl/core';\nimport {inheritsFrom} from './inherits-from';\nimport evaluateChildren from './evaluate-children';\n\n// Iterate over views and reposition children associated with views\n// TODO - Can we supply a similar function for the non-React case?\nexport default function positionChildrenUnderViews({children, deck, ContextProvider}) {\n const {viewManager} = deck || {};\n\n if (!viewManager || !viewManager.views.length) {\n return [];\n }\n\n const views = {};\n const defaultViewId = viewManager.views[0].id;\n\n // Sort children by view id\n for (const child of children) {\n // Unless child is a View, position / render as part of the default view\n let viewId = defaultViewId;\n let viewChildren = child;\n\n if (inheritsFrom(child.type, View)) {\n viewId = child.props.id || defaultViewId;\n viewChildren = child.props.children;\n }\n\n const viewport = viewManager.getViewport(viewId);\n const viewState = viewManager.getViewState(viewId);\n\n // Drop (auto-hide) elements with viewId that are not matched by any current view\n if (viewport) {\n const {x, y, width, height} = viewport;\n // Resolve potentially relative dimensions using the deck.gl container size\n viewChildren = evaluateChildren(viewChildren, {\n x,\n y,\n width,\n height,\n viewport,\n viewState\n });\n\n if (!views[viewId]) {\n views[viewId] = {\n viewport,\n children: []\n };\n }\n views[viewId].children.push(viewChildren);\n }\n }\n\n // Render views\n return Object.keys(views).map(viewId => {\n const {viewport, children: viewChildren} = views[viewId];\n const {x, y, width, height} = viewport;\n const style = {\n position: 'absolute',\n left: x,\n top: y,\n width,\n height\n };\n\n const key = `view-${viewId}`;\n // If children is passed as an array, React will throw the \"each element in a list needs\n // a key\" warning. Sending each child as separate arguments removes this requirement.\n const viewElement = createElement('div', {key, id: key, style}, ...viewChildren);\n\n if (ContextProvider) {\n const contextValue = {\n viewport,\n container: deck.canvas.offsetParent,\n eventManager: deck.eventManager,\n onViewStateChange: params => {\n params.viewId = viewId;\n deck._onViewStateChange(params);\n }\n };\n return createElement(ContextProvider, {key, value: contextValue}, viewElement);\n }\n\n return viewElement;\n });\n}\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport useControlled from '../utils/useControlled';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport IconButton from '../IconButton';\nexport var styles = {\n root: {\n padding: 9\n },\n checked: {},\n disabled: {},\n input: {\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwitchBase = /*#__PURE__*/React.forwardRef(function SwitchBase(props, ref) {\n var autoFocus = props.autoFocus,\n checkedProp = props.checked,\n checkedIcon = props.checkedIcon,\n classes = props.classes,\n className = props.className,\n defaultChecked = props.defaultChecked,\n disabledProp = props.disabled,\n icon = props.icon,\n id = props.id,\n inputProps = props.inputProps,\n inputRef = props.inputRef,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n readOnly = props.readOnly,\n required = props.required,\n tabIndex = props.tabIndex,\n type = props.type,\n value = props.value,\n other = _objectWithoutProperties(props, [\"autoFocus\", \"checked\", \"checkedIcon\", \"classes\", \"className\", \"defaultChecked\", \"disabled\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"]);\n\n var _useControlled = useControlled({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n checked = _useControlled2[0],\n setCheckedState = _useControlled2[1];\n\n var muiFormControl = useFormControl();\n\n var handleFocus = function handleFocus(event) {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n var handleInputChange = function handleInputChange(event) {\n var newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v5: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n var disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n var hasLabelFor = type === 'checkbox' || type === 'radio';\n return /*#__PURE__*/React.createElement(IconButton, _extends({\n component: \"span\",\n className: clsx(classes.root, className, checked && classes.checked, disabled && classes.disabled),\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ref: ref\n }, other), /*#__PURE__*/React.createElement(\"input\", _extends({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n tabIndex: tabIndex,\n type: type,\n value: value\n }, inputProps)), checked ? checkedIcon : icon);\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\nprocess.env.NODE_ENV !== \"production\" ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * @ignore\n */\n defaultChecked: PropTypes.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /*\n * @ignore\n */\n name: PropTypes.string,\n\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The input component prop `type`.\n */\n type: PropTypes.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'PrivateSwitchBase'\n})(SwitchBase);","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox');","import * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n/**\n * @ignore - internal component.\n */\n\nexport default createSvgIcon( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@material-ui/utils';\nimport SwitchBase from '../internal/SwitchBase';\nimport CheckBoxOutlineBlankIcon from '../internal/svg-icons/CheckBoxOutlineBlank';\nimport CheckBoxIcon from '../internal/svg-icons/CheckBox';\nimport { alpha } from '../styles/colorManipulator';\nimport IndeterminateCheckBoxIcon from '../internal/svg-icons/IndeterminateCheckBox';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `indeterminate={true}`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: alpha(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/React.createElement(CheckBoxIcon, null);\nvar defaultIcon = /*#__PURE__*/React.createElement(CheckBoxOutlineBlankIcon, null);\nvar defaultIndeterminateIcon = /*#__PURE__*/React.createElement(IndeterminateCheckBoxIcon, null);\nvar Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(props, ref) {\n var _props$checkedIcon = props.checkedIcon,\n checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$icon = props.icon,\n iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$indeterminateI = props.indeterminateIcon,\n indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,\n inputProps = props.inputProps,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = _objectWithoutProperties(props, [\"checkedIcon\", \"classes\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"]);\n\n var icon = indeterminate ? indeterminateIconProp : iconProp;\n var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n return /*#__PURE__*/React.createElement(SwitchBase, _extends({\n type: \"checkbox\",\n classes: {\n root: clsx(classes.root, classes[\"color\".concat(capitalize(color))], indeterminate && classes.indeterminate),\n checked: classes.checked,\n disabled: classes.disabled\n },\n color: color,\n inputProps: _extends({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/React.cloneElement(icon, {\n fontSize: icon.props.fontSize === undefined && size === \"small\" ? size : icon.props.fontSize\n }),\n checkedIcon: /*#__PURE__*/React.cloneElement(indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize === undefined && size === \"small\" ? size : indeterminateIcon.props.fontSize\n }),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? Checkbox.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: PropTypes.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the checkbox will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: PropTypes.node,\n\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the input.\n */\n indeterminate: PropTypes.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n */\n indeterminateIcon: PropTypes.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: PropTypes.bool,\n\n /**\n * The size of the checkbox.\n * `small` is equivalent to the dense checkbox styling.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: PropTypes.any\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiCheckbox'\n})(Checkbox);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { chainPropTypes } from '@material-ui/utils';\nimport { Transition } from 'react-transition-group';\nimport withStyles from '../styles/withStyles';\nimport { duration } from '../styles/transitions';\nimport deprecatedPropType from '../utils/deprecatedPropType';\nimport { getTransitionProps } from '../transitions/utils';\nimport useTheme from '../styles/useTheme';\nimport { useForkRef } from '../utils';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 0,\n overflow: 'hidden',\n transition: theme.transitions.create('height')\n },\n\n /* Styles applied to the root element when the transition has entered. */\n entered: {\n height: 'auto',\n overflow: 'visible'\n },\n\n /* Styles applied to the root element when the transition has exited and `collapsedSize` != 0px. */\n hidden: {\n visibility: 'hidden'\n },\n\n /* Styles applied to the outer wrapper element. */\n wrapper: {\n // Hack to get children with a negative margin to not falsify the height computation.\n display: 'flex'\n },\n\n /* Styles applied to the inner wrapper element. */\n wrapperInner: {\n width: '100%'\n }\n };\n};\n/**\n * The Collapse transition is used by the\n * [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Collapse = /*#__PURE__*/React.forwardRef(function Collapse(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n collapsedHeight = props.collapsedHeight,\n _props$collapsedSize = props.collapsedSize,\n collapsedSizeProp = _props$collapsedSize === void 0 ? '0px' : _props$collapsedSize,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? duration.standard : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Transition : _props$TransitionComp,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"collapsedHeight\", \"collapsedSize\", \"component\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var theme = useTheme();\n var timer = React.useRef();\n var wrapperRef = React.useRef(null);\n var autoTransitionDuration = React.useRef();\n var collapsedSize = typeof (collapsedHeight || collapsedSizeProp) === 'number' ? \"\".concat(collapsedHeight || collapsedSizeProp, \"px\") : collapsedHeight || collapsedSizeProp;\n React.useEffect(function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = React.useRef(null);\n var handleRef = useForkRef(ref, enableStrictModeCompat ? nodeRef : undefined);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = _slicedToArray(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n node.style.height = collapsedSize;\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntering = normalizedTransitionCallback(function (node, isAppearing) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n\n var _getTransitionProps = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration;\n\n if (timeout === 'auto') {\n var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight);\n node.style.transitionDuration = \"\".concat(duration2, \"ms\");\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : \"\".concat(transitionDuration, \"ms\");\n }\n\n node.style.height = \"\".concat(wrapperHeight, \"px\");\n\n if (onEntering) {\n onEntering(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(function (node, isAppearing) {\n node.style.height = 'auto';\n\n if (onEntered) {\n onEntered(node, isAppearing);\n }\n });\n var handleExit = normalizedTransitionCallback(function (node) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n node.style.height = \"\".concat(wrapperHeight, \"px\");\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n var handleExiting = normalizedTransitionCallback(function (node) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n\n var _getTransitionProps2 = getTransitionProps({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration;\n\n if (timeout === 'auto') {\n var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight);\n node.style.transitionDuration = \"\".concat(duration2, \"ms\");\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : \"\".concat(transitionDuration, \"ms\");\n }\n\n node.style.height = collapsedSize;\n\n if (onExiting) {\n onExiting(node);\n }\n });\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTransitionDuration.current || 0);\n }\n };\n\n return /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: inProp,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes.container, className, {\n 'entered': classes.entered,\n 'exited': !inProp && collapsedSize === '0px' && classes.hidden\n }[state]),\n style: _extends({\n minHeight: collapsedSize\n }, style),\n ref: handleRef\n }, childProps), /*#__PURE__*/React.createElement(\"div\", {\n className: classes.wrapper,\n ref: wrapperRef\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: classes.wrapperInner\n }, children)));\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Collapse.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content node to be collapsed.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: chainPropTypes(PropTypes.object, function (props) {\n if (props.classes && props.classes.container) {\n throw new Error(['Material-UI: the classes.container key is deprecated.', 'Use `classes.root` instead', 'The name of the pseudo-class was changed for consistency.'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The height of the container when collapsed.\n * @deprecated The prop was renamed to support the addition of horizontal orientation, use `collapsedSize` instead.\n */\n collapsedHeight: deprecatedPropType(PropTypes.oneOfType([PropTypes.number, PropTypes.string]), 'The prop was renamed to support the vertical orientation, use `collapsedSize` instead'),\n\n /**\n * The height of the container when collapsed.\n */\n collapsedSize: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the passed `Component`.\n */\n disableStrictModeCompat: PropTypes.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n\n /**\n * @ignore\n */\n style: PropTypes.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nCollapse.muiSupportAuto = true;\nexport default withStyles(styles, {\n name: 'MuiCollapse'\n})(Collapse);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _toArray from \"@babel/runtime/helpers/esm/toArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport Collapse from '../Collapse';\nimport Paper from '../Paper';\nimport withStyles from '../styles/withStyles';\nimport AccordionContext from './AccordionContext';\nimport useControlled from '../utils/useControlled';\nexport var styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar Accordion = /*#__PURE__*/React.forwardRef(function Accordion(props, ref) {\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? Collapse : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = useControlled({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = React.useCallback(function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = React.Children.toArray(childrenProp),\n _React$Children$toArr2 = _toArray(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = React.useMemo(function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/React.createElement(Paper, _extends({\n className: clsx(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/React.createElement(AccordionContext.Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/React.createElement(TransitionComponent, _extends({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/React.createElement(\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\nprocess.env.NODE_ENV !== \"production\" ? Accordion.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion.\n */\n children: chainPropTypes(PropTypes.node.isRequired, function (props) {\n var summary = React.Children.toArray(props.children)[0];\n\n if (isFragment(summary)) {\n return new Error(\"Material-UI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/React.isValidElement(summary)) {\n return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, expands the accordion by default.\n */\n defaultExpanded: PropTypes.bool,\n\n /**\n * If `true`, the accordion will be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: PropTypes.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: PropTypes.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: PropTypes.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: PropTypes.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiAccordion'\n})(Accordion);","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _toArray(arr) {\n return arrayWithHoles(arr) || iterableToArray(arr) || nonIterableRest();\n}","// WebGL2 Query (also handles disjoint timer extensions)\nimport Resource from './resource';\nimport {FEATURES, hasFeatures} from '../features';\nimport {isWebGL2} from '@luma.gl/gltools';\nimport {assert} from '../utils/assert';\n\nconst GL_QUERY_RESULT = 0x8866; // Returns a GLuint containing the query result.\nconst GL_QUERY_RESULT_AVAILABLE = 0x8867; // whether query result is available.\n\nconst GL_TIME_ELAPSED_EXT = 0x88bf; // Elapsed time (in nanoseconds).\nconst GL_GPU_DISJOINT_EXT = 0x8fbb; // Whether GPU performed any disjoint operation.\n\nconst GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8c88; // #primitives written to feedback buffers\nconst GL_ANY_SAMPLES_PASSED = 0x8c2f; // Occlusion query (if drawing passed depth test)\nconst GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8d6a; // Occlusion query less accurate/faster version\n\nexport default class Query extends Resource {\n // Returns true if Query is supported by the WebGL implementation\n // Can also check whether timestamp queries are available.\n static isSupported(gl, opts = []) {\n const webgl2 = isWebGL2(gl);\n\n // Initial value\n const hasTimerQuery = hasFeatures(gl, FEATURES.TIMER_QUERY);\n let supported = webgl2 || hasTimerQuery;\n\n for (const key of opts) {\n switch (key) {\n case 'queries':\n supported = supported && webgl2;\n break;\n case 'timers':\n supported = supported && hasTimerQuery;\n break;\n default:\n assert(false);\n }\n }\n\n return supported;\n }\n\n // Create a query class\n constructor(gl, opts = {}) {\n super(gl, opts);\n\n this.target = null;\n this._queryPending = false;\n this._pollingPromise = null;\n\n Object.seal(this);\n }\n\n // Shortcut for timer query (dependent on extension in both WebGL1 and 2)\n // Measures GPU time delta between this call and a matching `end` call in the\n // GPU instruction stream.\n beginTimeElapsedQuery() {\n return this.begin(GL_TIME_ELAPSED_EXT);\n }\n\n // Shortcut for occlusion queries\n beginOcclusionQuery({conservative = false} = {}) {\n return this.begin(conservative ? GL_ANY_SAMPLES_PASSED_CONSERVATIVE : GL_ANY_SAMPLES_PASSED);\n }\n\n // Shortcut for transformFeedbackQuery\n beginTransformFeedbackQuery() {\n return this.begin(GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN);\n }\n\n // Due to OpenGL API limitations, after calling `begin()` on one Query\n // instance, `end()` must be called on that same instance before\n // calling `begin()` on another query. While there can be multiple\n // outstanding queries representing disjoint `begin()`/`end()` intervals.\n // It is not possible to interleave or overlap `begin` and `end` calls.\n begin(target) {\n // Don't start a new query if one is already active.\n if (this._queryPending) {\n return this;\n }\n\n this.target = target;\n this.gl2.beginQuery(this.target, this.handle);\n\n return this;\n }\n\n // ends the current query\n end() {\n // Can't end a new query if the last one hasn't been resolved.\n if (this._queryPending) {\n return this;\n }\n\n if (this.target) {\n this.gl2.endQuery(this.target);\n this.target = null;\n this._queryPending = true;\n }\n return this;\n }\n\n // Returns true if the query result is available\n isResultAvailable() {\n if (!this._queryPending) {\n return false;\n }\n\n const resultAvailable = this.gl2.getQueryParameter(this.handle, GL_QUERY_RESULT_AVAILABLE);\n if (resultAvailable) {\n this._queryPending = false;\n }\n return resultAvailable;\n }\n\n // Timing query is disjoint, i.e. results are invalid\n isTimerDisjoint() {\n return this.gl2.getParameter(GL_GPU_DISJOINT_EXT);\n }\n\n // Returns query result.\n getResult() {\n return this.gl2.getQueryParameter(this.handle, GL_QUERY_RESULT);\n }\n\n // Returns the query result, converted to milliseconds to match JavaScript conventions.\n getTimerMilliseconds() {\n return this.getResult() / 1e6;\n }\n\n // Polls the query\n createPoll(limit = Number.POSITIVE_INFINITY) {\n if (this._pollingPromise) {\n return this._pollingPromise;\n }\n\n let counter = 0;\n\n this._pollingPromise = new Promise((resolve, reject) => {\n const poll = () => {\n if (this.isResultAvailable()) {\n resolve(this.getResult());\n this._pollingPromise = null;\n } else if (counter++ > limit) {\n reject('Timed out');\n this._pollingPromise = null;\n } else {\n requestAnimationFrame(poll);\n }\n };\n\n requestAnimationFrame(poll);\n });\n\n return this._pollingPromise;\n }\n\n _createHandle() {\n return Query.isSupported(this.gl) ? this.gl2.createQuery() : null;\n }\n\n _deleteHandle() {\n this.gl2.deleteQuery(this.handle);\n }\n}\n","import {\n isWebGL,\n createGLContext,\n instrumentGLContext,\n resizeGLContext,\n resetParameters\n} from '@luma.gl/gltools';\n\nimport {\n requestAnimationFrame,\n cancelAnimationFrame,\n Query,\n lumaStats,\n // TODO - remove dependency on framebuffer (bundle size impact)\n Framebuffer,\n log,\n assert\n} from '@luma.gl/webgl';\n\nimport {isBrowser} from 'probe.gl/env';\n\nconst isPage = isBrowser() && typeof document !== 'undefined';\n\nlet statIdCounter = 0;\n\nexport default class AnimationLoop {\n /*\n * @param {HTMLCanvasElement} canvas - if provided, width and height will be passed to context\n */\n constructor(props = {}) {\n const {\n onCreateContext = opts => createGLContext(opts),\n onAddHTML = null,\n onInitialize = () => {},\n onRender = () => {},\n onFinalize = () => {},\n onError,\n\n gl = null,\n glOptions = {},\n debug = false,\n\n createFramebuffer = false,\n\n // view parameters\n autoResizeViewport = true,\n autoResizeDrawingBuffer = true,\n stats = lumaStats.get(`animation-loop-${statIdCounter++}`)\n } = props;\n\n let {useDevicePixels = true} = props;\n\n if ('useDevicePixelRatio' in props) {\n log.deprecated('useDevicePixelRatio', 'useDevicePixels')();\n // @ts-ignore\n useDevicePixels = props.useDevicePixelRatio;\n }\n\n this.props = {\n onCreateContext,\n onAddHTML,\n onInitialize,\n onRender,\n onFinalize,\n onError,\n\n gl,\n glOptions,\n debug,\n createFramebuffer\n };\n\n // state\n this.gl = gl;\n this.needsRedraw = null;\n this.timeline = null;\n this.stats = stats;\n this.cpuTime = this.stats.get('CPU Time');\n this.gpuTime = this.stats.get('GPU Time');\n this.frameRate = this.stats.get('Frame Rate');\n\n this._initialized = false;\n this._running = false;\n this._animationFrameId = null;\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n this._cpuStartTime = 0;\n\n this.setProps({\n autoResizeViewport,\n autoResizeDrawingBuffer,\n useDevicePixels\n });\n\n // Bind methods\n this.start = this.start.bind(this);\n this.stop = this.stop.bind(this);\n\n this._pageLoadPromise = null;\n\n this._onMousemove = this._onMousemove.bind(this);\n this._onMouseleave = this._onMouseleave.bind(this);\n }\n\n delete() {\n this.stop();\n this._setDisplay(null);\n }\n\n setNeedsRedraw(reason) {\n assert(typeof reason === 'string');\n this.needsRedraw = this.needsRedraw || reason;\n return this;\n }\n\n setProps(props) {\n if ('autoResizeViewport' in props) {\n this.autoResizeViewport = props.autoResizeViewport;\n }\n if ('autoResizeDrawingBuffer' in props) {\n this.autoResizeDrawingBuffer = props.autoResizeDrawingBuffer;\n }\n if ('useDevicePixels' in props) {\n this.useDevicePixels = props.useDevicePixels;\n }\n return this;\n }\n\n // Starts a render loop if not already running\n // @param {Object} context - contains frame specific info (E.g. tick, width, height, etc)\n start(opts = {}) {\n if (this._running) {\n return this;\n }\n this._running = true;\n // console.debug(`Starting ${this.constructor.name}`);\n // Wait for start promise before rendering frame\n const startPromise = this._getPageLoadPromise()\n .then(() => {\n if (!this._running || this._initialized) {\n return null;\n }\n\n // Create the WebGL context\n this._createWebGLContext(opts);\n this._createFramebuffer();\n this._startEventHandling();\n\n // Initialize the callback data\n this._initializeCallbackData();\n this._updateCallbackData();\n\n // Default viewport setup, in case onInitialize wants to render\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n\n this._gpuTimeQuery = Query.isSupported(this.gl, ['timers']) ? new Query(this.gl) : null;\n\n this._initialized = true;\n\n // Note: onIntialize can return a promise (in case it needs to load resources)\n return this.onInitialize(this.animationProps);\n })\n .then(appContext => {\n if (this._running) {\n this._addCallbackData(appContext || {});\n if (appContext !== false) {\n this._startLoop();\n }\n }\n });\n\n if (this.props.onError) {\n startPromise.catch(this.props.onError);\n }\n\n return this;\n }\n\n // Redraw now\n redraw() {\n if (this.isContextLost()) {\n return this;\n }\n\n this._beginTimers();\n\n this._setupFrame();\n this._updateCallbackData();\n\n this._renderFrame(this.animationProps);\n\n // clear needsRedraw flag\n this._clearNeedsRedraw();\n\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/commit\n // Chrome's offscreen canvas does not require gl.commit\n if (this.offScreen && this.gl.commit) {\n this.gl.commit();\n }\n\n if (this._resolveNextFrame) {\n this._resolveNextFrame(this);\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n }\n\n this._endTimers();\n\n return this;\n }\n\n // Stops a render loop if already running, finalizing\n stop() {\n // console.debug(`Stopping ${this.constructor.name}`);\n if (this._running) {\n this._finalizeCallbackData();\n this._cancelAnimationFrame(this._animationFrameId);\n this._nextFramePromise = null;\n this._resolveNextFrame = null;\n this._animationFrameId = null;\n this._running = false;\n }\n return this;\n }\n\n attachTimeline(timeline) {\n this.timeline = timeline;\n\n return this.timeline;\n }\n\n detachTimeline() {\n this.timeline = null;\n }\n\n waitForRender() {\n this.setNeedsRedraw('waitForRender');\n\n if (!this._nextFramePromise) {\n this._nextFramePromise = new Promise(resolve => {\n this._resolveNextFrame = resolve;\n });\n }\n return this._nextFramePromise;\n }\n\n async toDataURL() {\n this.setNeedsRedraw('toDataURL');\n\n await this.waitForRender();\n\n return this.gl.canvas.toDataURL();\n }\n\n isContextLost() {\n return this.gl.isContextLost();\n }\n\n onCreateContext(...args) {\n return this.props.onCreateContext(...args);\n }\n\n onInitialize(...args) {\n return this.props.onInitialize(...args);\n }\n\n onRender(...args) {\n return this.props.onRender(...args);\n }\n\n onFinalize(...args) {\n return this.props.onFinalize(...args);\n }\n\n // DEPRECATED/REMOVED METHODS\n\n getHTMLControlValue(id, defaultValue = 1) {\n const element = document.getElementById(id);\n // @ts-ignore Not all html elements have value\n return element ? Number(element.value) : defaultValue;\n }\n\n // Update parameters\n setViewParameters() {\n log.removed('AnimationLoop.setViewParameters', 'AnimationLoop.setProps')();\n return this;\n }\n\n // PRIVATE METHODS\n\n _startLoop() {\n const renderFrame = () => {\n if (!this._running) {\n return;\n }\n this.redraw();\n this._animationFrameId = this._requestAnimationFrame(renderFrame);\n };\n\n // cancel any pending renders to ensure only one loop can ever run\n this._cancelAnimationFrame(this._animationFrameId);\n this._animationFrameId = this._requestAnimationFrame(renderFrame);\n }\n\n // PRIVATE METHODS\n\n _getPageLoadPromise() {\n if (!this._pageLoadPromise) {\n this._pageLoadPromise = isPage\n ? new Promise((resolve, reject) => {\n if (isPage && document.readyState === 'complete') {\n resolve(document);\n return;\n }\n window.addEventListener('load', () => {\n resolve(document);\n });\n })\n : Promise.resolve({});\n }\n return this._pageLoadPromise;\n }\n\n _setDisplay(display) {\n if (this.display) {\n this.display.delete();\n this.display.animationLoop = null;\n }\n\n // store animation loop on the display\n if (display) {\n display.animationLoop = this;\n }\n\n this.display = display;\n }\n\n _cancelAnimationFrame(animationFrameId) {\n // E.g. VR display has a separate animation frame to sync with headset\n if (this.display && this.display.cancelAnimationFrame) {\n return this.display.cancelAnimationFrame(animationFrameId);\n }\n\n return cancelAnimationFrame(animationFrameId);\n }\n\n _requestAnimationFrame(renderFrameCallback) {\n if (this._running) {\n // E.g. VR display has a separate animation frame to sync with headset\n if (this.display && this.display.requestAnimationFrame) {\n return this.display.requestAnimationFrame(renderFrameCallback);\n }\n\n return requestAnimationFrame(renderFrameCallback);\n }\n return undefined;\n }\n\n // Called on each frame, can be overridden to call onRender multiple times\n // to support e.g. stereoscopic rendering\n _renderFrame(...args) {\n // Allow e.g. VR display to render multiple frames.\n if (this.display) {\n this.display._renderFrame(...args);\n return;\n }\n\n // call callback\n this.onRender(...args);\n // end callback\n }\n\n _clearNeedsRedraw() {\n this.needsRedraw = null;\n }\n\n _setupFrame() {\n this._resizeCanvasDrawingBuffer();\n this._resizeViewport();\n this._resizeFramebuffer();\n }\n\n // Initialize the object that will be passed to app callbacks\n _initializeCallbackData() {\n this.animationProps = {\n gl: this.gl,\n\n stop: this.stop,\n canvas: this.gl.canvas,\n framebuffer: this.framebuffer,\n\n // Initial values\n useDevicePixels: this.useDevicePixels,\n needsRedraw: null,\n\n // Animation props\n startTime: Date.now(),\n engineTime: 0,\n tick: 0,\n tock: 0,\n\n // Timeline time for back compatibility\n time: 0,\n\n // Experimental\n _timeline: this.timeline,\n _loop: this,\n _animationLoop: this,\n _mousePosition: null // Event props\n };\n }\n\n // Update the context object that will be passed to app callbacks\n _updateCallbackData() {\n const {width, height, aspect} = this._getSizeAndAspect();\n if (width !== this.animationProps.width || height !== this.animationProps.height) {\n this.setNeedsRedraw('drawing buffer resized');\n }\n if (aspect !== this.animationProps.aspect) {\n this.setNeedsRedraw('drawing buffer aspect changed');\n }\n\n this.animationProps.width = width;\n this.animationProps.height = height;\n this.animationProps.aspect = aspect;\n\n this.animationProps.needsRedraw = this.needsRedraw;\n\n // Update time properties\n this.animationProps.engineTime = Date.now() - this.animationProps.startTime;\n\n if (this.timeline) {\n this.timeline.update(this.animationProps.engineTime);\n }\n\n this.animationProps.tick = Math.floor((this.animationProps.time / 1000) * 60);\n this.animationProps.tock++;\n\n // For back compatibility\n this.animationProps.time = this.timeline\n ? this.timeline.getTime()\n : this.animationProps.engineTime;\n\n // experimental\n this.animationProps._offScreen = this.offScreen;\n }\n\n _finalizeCallbackData() {\n // call callback\n this.onFinalize(this.animationProps);\n // end callback\n }\n\n // Add application's data to the app context object\n _addCallbackData(appContext) {\n if (typeof appContext === 'object' && appContext !== null) {\n this.animationProps = Object.assign({}, this.animationProps, appContext);\n }\n }\n\n // Either uses supplied or existing context, or calls provided callback to create one\n _createWebGLContext(opts) {\n this.offScreen =\n opts.canvas &&\n typeof OffscreenCanvas !== 'undefined' &&\n opts.canvas instanceof OffscreenCanvas;\n\n // Create the WebGL context if necessary\n opts = Object.assign({}, opts, this.props.glOptions);\n this.gl = this.props.gl ? instrumentGLContext(this.props.gl, opts) : this.onCreateContext(opts);\n\n if (!isWebGL(this.gl)) {\n throw new Error('AnimationLoop.onCreateContext - illegal context returned');\n }\n\n // Reset the WebGL context.\n resetParameters(this.gl);\n\n this._createInfoDiv();\n }\n\n _createInfoDiv() {\n if (this.gl.canvas && this.props.onAddHTML) {\n const wrapperDiv = document.createElement('div');\n document.body.appendChild(wrapperDiv);\n wrapperDiv.style.position = 'relative';\n const div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '10px';\n div.style.bottom = '10px';\n div.style.width = '300px';\n div.style.background = 'white';\n wrapperDiv.appendChild(this.gl.canvas);\n wrapperDiv.appendChild(div);\n const html = this.props.onAddHTML(div);\n if (html) {\n div.innerHTML = html;\n }\n }\n }\n\n _getSizeAndAspect() {\n // https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html\n const width = this.gl.drawingBufferWidth;\n const height = this.gl.drawingBufferHeight;\n\n // https://webglfundamentals.org/webgl/lessons/webgl-anti-patterns.html\n let aspect = 1;\n const {canvas} = this.gl;\n\n if (canvas && canvas.clientHeight) {\n aspect = canvas.clientWidth / canvas.clientHeight;\n } else if (width > 0 && height > 0) {\n aspect = width / height;\n }\n\n return {width, height, aspect};\n }\n\n // Default viewport setup\n _resizeViewport() {\n if (this.autoResizeViewport) {\n this.gl.viewport(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight);\n }\n }\n\n // Resize the render buffer of the canvas to match canvas client size\n // Optionally multiplying with devicePixel ratio\n _resizeCanvasDrawingBuffer() {\n if (this.autoResizeDrawingBuffer) {\n resizeGLContext(this.gl, {useDevicePixels: this.useDevicePixels});\n }\n }\n\n // TBD - deprecated?\n _createFramebuffer() {\n // Setup default framebuffer\n if (this.props.createFramebuffer) {\n this.framebuffer = new Framebuffer(this.gl);\n }\n }\n\n _resizeFramebuffer() {\n if (this.framebuffer) {\n this.framebuffer.resize({\n width: this.gl.drawingBufferWidth,\n height: this.gl.drawingBufferHeight\n });\n }\n }\n\n _beginTimers() {\n this.frameRate.timeEnd();\n this.frameRate.timeStart();\n\n // Check if timer for last frame has completed.\n // GPU timer results are never available in the same\n // frame they are captured.\n if (\n this._gpuTimeQuery &&\n this._gpuTimeQuery.isResultAvailable() &&\n !this._gpuTimeQuery.isTimerDisjoint()\n ) {\n this.stats.get('GPU Time').addTime(this._gpuTimeQuery.getTimerMilliseconds());\n }\n\n if (this._gpuTimeQuery) {\n // GPU time query start\n this._gpuTimeQuery.beginTimeElapsedQuery();\n }\n\n this.cpuTime.timeStart();\n }\n\n _endTimers() {\n this.cpuTime.timeEnd();\n\n if (this._gpuTimeQuery) {\n // GPU time query end. Results will be available on next frame.\n this._gpuTimeQuery.end();\n }\n }\n\n // Event handling\n\n _startEventHandling() {\n const {canvas} = this.gl;\n if (canvas) {\n canvas.addEventListener('mousemove', this._onMousemove);\n canvas.addEventListener('mouseleave', this._onMouseleave);\n }\n }\n\n _onMousemove(e) {\n this.animationProps._mousePosition = [e.offsetX, e.offsetY];\n }\n _onMouseleave(e) {\n this.animationProps._mousePosition = null;\n }\n}\n","// Node.js polyfills for requestAnimationFrame and cancelAnimationFrame\n\nexport function requestAnimationFrame(callback) {\n return typeof window !== 'undefined' && window.requestAnimationFrame\n ? window.requestAnimationFrame(callback)\n : setTimeout(callback, 1000 / 60);\n}\n\nexport function cancelAnimationFrame(timerId) {\n return typeof window !== 'undefined' && window.cancelAnimationFrame\n ? window.cancelAnimationFrame(timerId)\n : clearTimeout(timerId);\n}\n","/*\n * data filter shader module\n */\nconst vs = `\nuniform DATAFILTER_TYPE filter_min;\nuniform DATAFILTER_TYPE filter_softMin;\nuniform DATAFILTER_TYPE filter_softMax;\nuniform DATAFILTER_TYPE filter_max;\nuniform bool filter_useSoftMargin;\nuniform bool filter_enabled;\nuniform bool filter_transformSize;\n\n#ifdef NON_INSTANCED_MODEL\n #define DATAFILTER_ATTRIB filterValues\n #define DATAFILTER_ATTRIB_64LOW filterValues64Low\n#else\n #define DATAFILTER_ATTRIB instanceFilterValues\n #define DATAFILTER_ATTRIB_64LOW instanceFilterValues64Low\n#endif\n\nattribute DATAFILTER_TYPE DATAFILTER_ATTRIB;\n#ifdef DATAFILTER_DOUBLE\n attribute DATAFILTER_TYPE DATAFILTER_ATTRIB_64LOW;\n\n uniform DATAFILTER_TYPE filter_min64High;\n uniform DATAFILTER_TYPE filter_max64High;\n#endif\n\nvarying float dataFilter_value;\n\nfloat dataFilter_reduceValue(float value) {\n return value;\n}\nfloat dataFilter_reduceValue(vec2 value) {\n return min(value.x, value.y);\n}\nfloat dataFilter_reduceValue(vec3 value) {\n return min(min(value.x, value.y), value.z);\n}\nfloat dataFilter_reduceValue(vec4 value) {\n return min(min(value.x, value.y), min(value.z, value.w));\n}\nvoid dataFilter_setValue(DATAFILTER_TYPE valueFromMin, DATAFILTER_TYPE valueFromMax) {\n if (filter_enabled) {\n if (filter_useSoftMargin) {\n dataFilter_value = dataFilter_reduceValue(\n smoothstep(filter_min, filter_softMin, valueFromMin) *\n (1.0 - smoothstep(filter_softMax, filter_max, valueFromMax))\n );\n } else {\n dataFilter_value = dataFilter_reduceValue(\n step(filter_min, valueFromMin) * step(valueFromMax, filter_max)\n );\n }\n } else {\n dataFilter_value = 1.0;\n }\n}\n`;\n\nconst fs = `\nuniform bool filter_transformColor;\nvarying float dataFilter_value;\n`;\n\nconst getUniforms = opts => {\n if (!opts || !opts.extensions) {\n return {};\n }\n const {\n filterRange = [-1, 1],\n filterEnabled = true,\n filterTransformSize = true,\n filterTransformColor = true\n } = opts;\n const filterSoftRange = opts.filterSoftRange || filterRange;\n\n const uniforms = Number.isFinite(filterRange[0])\n ? {\n filter_min: filterRange[0],\n filter_softMin: filterSoftRange[0],\n filter_softMax: filterSoftRange[1],\n filter_max: filterRange[1]\n }\n : {\n filter_min: filterRange.map(r => r[0]),\n filter_softMin: filterSoftRange.map(r => r[0]),\n filter_softMax: filterSoftRange.map(r => r[1]),\n filter_max: filterRange.map(r => r[1])\n };\n uniforms.filter_enabled = filterEnabled;\n uniforms.filter_useSoftMargin = Boolean(opts.filterSoftRange);\n uniforms.filter_transformSize = filterEnabled && filterTransformSize;\n uniforms.filter_transformColor = filterEnabled && filterTransformColor;\n\n return uniforms;\n};\n\nconst getUniforms64 = opts => {\n if (!opts || !opts.extensions) {\n return {};\n }\n const uniforms = getUniforms(opts);\n if (Number.isFinite(uniforms.filter_min)) {\n const min64High = Math.fround(uniforms.filter_min);\n uniforms.filter_min -= min64High;\n uniforms.filter_softMin -= min64High;\n uniforms.filter_min64High = min64High;\n\n const max64High = Math.fround(uniforms.filter_max);\n uniforms.filter_max -= max64High;\n uniforms.filter_softMax -= max64High;\n uniforms.filter_max64High = max64High;\n } else {\n const min64High = uniforms.filter_min.map(Math.fround);\n uniforms.filter_min = uniforms.filter_min.map((x, i) => x - min64High[i]);\n uniforms.filter_softMin = uniforms.filter_softMin.map((x, i) => x - min64High[i]);\n uniforms.filter_min64High = min64High;\n\n const max64High = uniforms.filter_max.map(Math.fround);\n uniforms.filter_max = uniforms.filter_max.map((x, i) => x - max64High[i]);\n uniforms.filter_softMax = uniforms.filter_softMax.map((x, i) => x - max64High[i]);\n uniforms.filter_max64High = max64High;\n }\n return uniforms;\n};\n\nconst inject = {\n 'vs:#main-start': `\n #ifdef DATAFILTER_DOUBLE\n dataFilter_setValue(\n DATAFILTER_ATTRIB - filter_min64High + DATAFILTER_ATTRIB_64LOW,\n DATAFILTER_ATTRIB - filter_max64High + DATAFILTER_ATTRIB_64LOW\n );\n #else\n dataFilter_setValue(DATAFILTER_ATTRIB, DATAFILTER_ATTRIB);\n #endif\n `,\n\n 'vs:DECKGL_FILTER_SIZE': `\n if (filter_transformSize) {\n size = size * dataFilter_value;\n }\n `,\n\n 'fs:DECKGL_FILTER_COLOR': `\n if (dataFilter_value == 0.0) discard;\n if (filter_transformColor) {\n color.a *= dataFilter_value;\n }\n `\n};\n\nexport const shaderModule = {\n name: 'data-filter',\n vs,\n fs,\n inject,\n getUniforms\n};\n\nexport const shaderModule64 = {\n name: 'data-filter-fp64',\n vs,\n fs,\n inject,\n getUniforms: getUniforms64\n};\n","import {Model, Texture2D, Framebuffer, isWebGL2} from '@luma.gl/core';\r\nimport GL from '@luma.gl/constants';\r\n\r\nconst AGGREGATE_VS = `\\\r\n#define SHADER_NAME data-filter-vertex-shader\r\n\r\n#ifdef FLOAT_TARGET\r\n attribute float filterIndices;\r\n attribute float filterPrevIndices;\r\n#else\r\n attribute vec2 filterIndices;\r\n attribute vec2 filterPrevIndices;\r\n#endif\r\n\r\nvarying vec4 vColor;\r\nconst float component = 1.0 / 255.0;\r\n\r\nvoid main() {\r\n #ifdef FLOAT_TARGET\r\n dataFilter_value *= float(filterIndices != filterPrevIndices);\r\n gl_Position = vec4(0.0, 0.0, 0.0, 1.0);\r\n vColor = vec4(0.0, 0.0, 0.0, 1.0);\r\n #else\r\n // Float texture is not supported: pack result into 4 channels x 256 px x 64px\r\n dataFilter_value *= float(filterIndices.x != filterPrevIndices.x);\r\n float col = filterIndices.x;\r\n float row = filterIndices.y * 4.0;\r\n float channel = floor(row);\r\n row = fract(row);\r\n vColor = component * vec4(bvec4(channel == 0.0, channel == 1.0, channel == 2.0, channel == 3.0));\r\n gl_Position = vec4(col * 2.0 - 1.0, row * 2.0 - 1.0, 0.0, 1.0);\r\n #endif\r\n gl_PointSize = 1.0;\r\n}\r\n`;\r\n\r\nconst AGGREGATE_FS = `\\\r\n#define SHADER_NAME data-filter-fragment-shader\r\nprecision highp float;\r\n\r\nvarying vec4 vColor;\r\n\r\nvoid main() {\r\n if (dataFilter_value < 0.5) {\r\n discard;\r\n }\r\n gl_FragColor = vColor;\r\n}\r\n`;\r\n\r\nexport function supportsFloatTarget(gl) {\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/WebGL_best_practices#Support_for_float_textures_doesnt_mean_you_can_render_into_them!\r\n return (\r\n gl.getExtension('EXT_float_blend') &&\r\n // WebGL 2\r\n (gl.getExtension('EXT_color_buffer_float') ||\r\n // WebGL 1\r\n gl.getExtension('WEBGL_color_buffer_float'))\r\n );\r\n}\r\n\r\n// A 1x1 framebuffer object that encodes the total count of filtered items\r\nexport function getFramebuffer(gl, useFloatTarget) {\r\n if (useFloatTarget) {\r\n return new Framebuffer(gl, {\r\n width: 1,\r\n height: 1,\r\n attachments: {\r\n [GL.COLOR_ATTACHMENT0]: new Texture2D(gl, {\r\n format: isWebGL2(gl) ? GL.RGBA32F : GL.RGBA,\r\n type: GL.FLOAT,\r\n mipmaps: false\r\n })\r\n }\r\n });\r\n }\r\n return new Framebuffer(gl, {\r\n width: 256,\r\n height: 64,\r\n depth: false\r\n });\r\n}\r\n\r\n// Increments the counter based on dataFilter_value\r\nexport function getModel(gl, shaderOptions, useFloatTarget) {\r\n shaderOptions.defines.NON_INSTANCED_MODEL = 1;\r\n if (useFloatTarget) {\r\n shaderOptions.defines.FLOAT_TARGET = 1;\r\n }\r\n\r\n return new Model(gl, {\r\n id: 'data-filter-aggregation-model',\r\n vertexCount: 1,\r\n isInstanced: false,\r\n drawMode: GL.POINTS,\r\n vs: AGGREGATE_VS,\r\n fs: AGGREGATE_FS,\r\n ...shaderOptions\r\n });\r\n}\r\n\r\nexport const parameters = {\r\n blend: true,\r\n blendFunc: [GL.ONE, GL.ONE, GL.ONE, GL.ONE],\r\n blendEquation: [GL.FUNC_ADD, GL.FUNC_ADD],\r\n depthTest: false\r\n};\r\n","// Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nimport {LayerExtension} from '@deck.gl/core';\nimport {shaderModule, shaderModule64} from './shader-module';\nimport * as aggregator from './aggregator';\nimport {readPixelsToArray, clear} from '@luma.gl/core';\nimport GL from '@luma.gl/constants';\n\nconst defaultProps = {\n getFilterValue: {type: 'accessor', value: 0},\n onFilteredItemsChange: {type: 'function', value: null, compare: false},\n\n filterEnabled: true,\n filterRange: [-1, 1],\n filterSoftRange: null,\n filterTransformSize: true,\n filterTransformColor: true\n};\n\nconst DATA_TYPE_FROM_SIZE = {\n 1: 'float',\n 2: 'vec2',\n 3: 'vec3',\n 4: 'vec4'\n};\n\nexport default class DataFilterExtension extends LayerExtension {\n constructor({filterSize = 1, fp64 = false, countItems = false} = {}) {\n if (!DATA_TYPE_FROM_SIZE[filterSize]) {\n throw new Error('filterSize out of range');\n }\n\n super({filterSize, fp64, countItems});\n }\n\n getShaders(extension) {\n const {filterSize, fp64} = extension.opts;\n\n return {\n modules: [fp64 ? shaderModule64 : shaderModule],\n defines: {\n DATAFILTER_TYPE: DATA_TYPE_FROM_SIZE[filterSize],\n DATAFILTER_DOUBLE: Boolean(fp64)\n }\n };\n }\n\n initializeState(context, extension) {\n const attributeManager = this.getAttributeManager();\n if (attributeManager) {\n attributeManager.add({\n filterValues: {\n size: extension.opts.filterSize,\n type: extension.opts.fp64 ? GL.DOUBLE : GL.FLOAT,\n accessor: 'getFilterValue',\n shaderAttributes: {\n filterValues: {\n divisor: 0\n },\n instanceFilterValues: {\n divisor: 1\n }\n }\n }\n });\n }\n\n const {gl} = this.context;\n if (attributeManager && extension.opts.countItems) {\n const useFloatTarget = aggregator.supportsFloatTarget(gl);\n // This attribute is needed for variable-width data, e.g. Path, SolidPolygon, Text\n // The vertex shader checks if a vertex has the same \"index\" as the previous vertex\n // so that we only write one count cross multiple vertices of the same object\n attributeManager.add({\n filterIndices: {\n size: useFloatTarget ? 1 : 2,\n vertexOffset: 1,\n type: GL.UNSIGNED_BYTE,\n normalized: true,\n accessor: (object, {index}) => {\n const i = object && object.__source ? object.__source.index : index;\n return useFloatTarget ? (i + 1) % 255 : [(i + 1) % 255, Math.floor(i / 255) % 255];\n },\n shaderAttributes: {\n filterPrevIndices: {\n vertexOffset: 0\n },\n filterIndices: {\n vertexOffset: 1\n }\n }\n }\n });\n\n const filterFBO = aggregator.getFramebuffer(gl, useFloatTarget);\n const filterModel = aggregator.getModel(gl, extension.getShaders(extension), useFloatTarget);\n this.setState({filterFBO, filterModel});\n }\n }\n\n updateState({props, oldProps}) {\n if (this.state.filterModel) {\n const attributeManager = this.getAttributeManager();\n const filterNeedsUpdate =\n attributeManager.attributes.filterValues.needsUpdate() ||\n props.filterEnabled !== oldProps.filterEnabled ||\n props.filterRange !== oldProps.filterRange ||\n props.filterSoftRange !== oldProps.filterSoftRange;\n if (filterNeedsUpdate) {\n this.setState({filterNeedsUpdate});\n }\n }\n }\n\n draw(params, extension) {\n const {filterFBO, filterModel, filterNeedsUpdate} = this.state;\n const {onFilteredItemsChange} = this.props;\n if (filterNeedsUpdate && onFilteredItemsChange && filterModel) {\n const {\n attributes: {filterValues, filterIndices}\n } = this.getAttributeManager();\n filterModel.setVertexCount(this.getNumInstances());\n\n const {gl} = this.context;\n clear(gl, {framebuffer: filterFBO, color: [0, 0, 0, 0]});\n\n filterModel\n .updateModuleSettings(params.moduleParameters)\n .setAttributes({\n ...filterValues.getShaderAttributes(),\n ...(filterIndices && filterIndices.getShaderAttributes())\n })\n .draw({\n framebuffer: filterFBO,\n parameters: {\n ...aggregator.parameters,\n viewport: [0, 0, filterFBO.width, filterFBO.height]\n }\n });\n const color = readPixelsToArray(filterFBO);\n let count = 0;\n for (let i = 0; i < color.length; i++) {\n count += color[i];\n }\n onFilteredItemsChange({id: this.id, count});\n\n this.state.filterNeedsUpdate = false;\n }\n }\n\n finalizeState() {\n const {filterFBO, filterModel} = this.state;\n if (filterFBO) {\n filterFBO.color.delete();\n filterFBO.delete();\n filterModel.delete();\n }\n }\n}\n\nDataFilterExtension.extensionName = 'DataFilterExtension';\nDataFilterExtension.defaultProps = defaultProps;\n","/** @typedef {import('../../types').ShaderModule} ShaderModule */\n\nimport {lights} from '../lights/lights';\n\nimport vs from './pbr-vertex.glsl';\nimport fs from './pbr-fragment.glsl';\n\n/**\n * @type {ShaderModule}\n * PBR lighting shader module\n */\nexport const pbr = {\n name: 'pbr',\n vs,\n fs,\n defines: {\n LIGHTING_FRAGMENT: 1\n },\n dependencies: [lights]\n};\n","export default `\\\nuniform mat4 u_MVPMatrix;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_NormalMatrix;\n\nvarying vec3 pbr_vPosition;\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n# ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n# else\nvarying vec3 pbr_vNormal;\n# endif\n#endif\n\nvoid pbr_setPositionNormalTangentUV(vec4 position, vec4 normal, vec4 tangent, vec2 uv)\n{\n vec4 pos = u_ModelMatrix * position;\n pbr_vPosition = vec3(pos.xyz) / pos.w;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\n vec3 normalW = normalize(vec3(u_NormalMatrix * vec4(normal.xyz, 0.0)));\n vec3 tangentW = normalize(vec3(u_ModelMatrix * vec4(tangent.xyz, 0.0)));\n vec3 bitangentW = cross(normalW, tangentW) * tangent.w;\n pbr_vTBN = mat3(tangentW, bitangentW, normalW);\n#else // HAS_TANGENTS != 1\n pbr_vNormal = normalize(vec3(u_ModelMatrix * vec4(normal.xyz, 0.0)));\n#endif\n#endif\n\n#ifdef HAS_UV\n pbr_vUV = uv;\n#else\n pbr_vUV = vec2(0.,0.);\n#endif\n}\n`;\n","// This fragment shader defines a reference implementation for Physically Based Shading of\n// a microfacet surface material defined by a glTF model.\n//\n// Attribution:\n// MIT license, Copyright (c) 2016-2017 Mohamad Moneimne and Contributors\n\n// TODO - better do the checks outside of shader\nexport default `\\\n#if defined(USE_TEX_LOD) && !defined(FEATURE_GLSL_TEXTURE_LOD)\n# error PBR fragment shader: Texture LOD is not available\n#endif\n\n#if !defined(HAS_TANGENTS) && !defined(FEATURE_GLSL_DERIVATIVES)\n# error PBR fragment shader: Derivatives are not available\n#endif\n\n// WebGL 1.0 does not support non-constant in for loops\n// This provides an easy way to handle these cases\n// and still take advantage of WebGL 2.0\n#if (__VERSION__ < 300)\n #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL1COND; INCR)\n#else\n #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL2COND; INCR)\n#endif\n\nprecision highp float;\n\nuniform bool pbr_uUnlit;\n\n#ifdef USE_IBL\nuniform samplerCube u_DiffuseEnvSampler;\nuniform samplerCube u_SpecularEnvSampler;\nuniform sampler2D u_brdfLUT;\nuniform vec2 u_ScaleIBLAmbient;\n#endif\n\n#ifdef HAS_BASECOLORMAP\nuniform sampler2D u_BaseColorSampler;\n#endif\n#ifdef HAS_NORMALMAP\nuniform sampler2D u_NormalSampler;\nuniform float u_NormalScale;\n#endif\n#ifdef HAS_EMISSIVEMAP\nuniform sampler2D u_EmissiveSampler;\nuniform vec3 u_EmissiveFactor;\n#endif\n#ifdef HAS_METALROUGHNESSMAP\nuniform sampler2D u_MetallicRoughnessSampler;\n#endif\n#ifdef HAS_OCCLUSIONMAP\nuniform sampler2D u_OcclusionSampler;\nuniform float u_OcclusionStrength;\n#endif\n\n#ifdef ALPHA_CUTOFF\nuniform float u_AlphaCutoff;\n#endif\n\nuniform vec2 u_MetallicRoughnessValues;\nuniform vec4 u_BaseColorFactor;\n\nuniform vec3 u_Camera;\n\n// debugging flags used for shader output of intermediate PBR variables\n#ifdef PBR_DEBUG\nuniform vec4 u_ScaleDiffBaseMR;\nuniform vec4 u_ScaleFGDSpec;\n#endif\n\nvarying vec3 pbr_vPosition;\n\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n#else\nvarying vec3 pbr_vNormal;\n#endif\n#endif\n\n// Encapsulate the various inputs used by the various functions in the shading equation\n// We store values in this struct to simplify the integration of alternative implementations\n// of the shading terms, outlined in the Readme.MD Appendix.\nstruct PBRInfo\n{\n float NdotL; // cos angle between normal and light direction\n float NdotV; // cos angle between normal and view direction\n float NdotH; // cos angle between normal and half vector\n float LdotH; // cos angle between light direction and half vector\n float VdotH; // cos angle between view direction and half vector\n float perceptualRoughness; // roughness value, as authored by the model creator (input to shader)\n float metalness; // metallic value at the surface\n vec3 reflectance0; // full reflectance color (normal incidence angle)\n vec3 reflectance90; // reflectance color at grazing angle\n float alphaRoughness; // roughness mapped to a more linear change in the roughness (proposed by [2])\n vec3 diffuseColor; // color contribution from diffuse lighting\n vec3 specularColor; // color contribution from specular lighting\n vec3 n; // normal at surface point\n vec3 v; // vector from surface point to camera\n};\n\nconst float M_PI = 3.141592653589793;\nconst float c_MinRoughness = 0.04;\n\nvec4 SRGBtoLINEAR(vec4 srgbIn)\n{\n#ifdef MANUAL_SRGB\n#ifdef SRGB_FAST_APPROXIMATION\n vec3 linOut = pow(srgbIn.xyz,vec3(2.2));\n#else //SRGB_FAST_APPROXIMATION\n vec3 bLess = step(vec3(0.04045),srgbIn.xyz);\n vec3 linOut = mix( srgbIn.xyz/vec3(12.92), pow((srgbIn.xyz+vec3(0.055))/vec3(1.055),vec3(2.4)), bLess );\n#endif //SRGB_FAST_APPROXIMATION\n return vec4(linOut,srgbIn.w);;\n#else //MANUAL_SRGB\n return srgbIn;\n#endif //MANUAL_SRGB\n}\n\n// Find the normal for this fragment, pulling either from a predefined normal map\n// or from the interpolated mesh normal and tangent attributes.\nvec3 getNormal()\n{\n // Retrieve the tangent space matrix\n#ifndef HAS_TANGENTS\n vec3 pos_dx = dFdx(pbr_vPosition);\n vec3 pos_dy = dFdy(pbr_vPosition);\n vec3 tex_dx = dFdx(vec3(pbr_vUV, 0.0));\n vec3 tex_dy = dFdy(vec3(pbr_vUV, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n\n#ifdef HAS_NORMALS\n vec3 ng = normalize(pbr_vNormal);\n#else\n vec3 ng = cross(pos_dx, pos_dy);\n#endif\n\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n#else // HAS_TANGENTS\n mat3 tbn = pbr_vTBN;\n#endif\n\n#ifdef HAS_NORMALMAP\n vec3 n = texture2D(u_NormalSampler, pbr_vUV).rgb;\n n = normalize(tbn * ((2.0 * n - 1.0) * vec3(u_NormalScale, u_NormalScale, 1.0)));\n#else\n // The tbn matrix is linearly interpolated, so we need to re-normalize\n vec3 n = normalize(tbn[2].xyz);\n#endif\n\n return n;\n}\n\n// Calculation of the lighting contribution from an optional Image Based Light source.\n// Precomputed Environment Maps are required uniform inputs and are computed as outlined in [1].\n// See our README.md on Environment Maps [3] for additional discussion.\n#ifdef USE_IBL\nvec3 getIBLContribution(PBRInfo pbrInputs, vec3 n, vec3 reflection)\n{\n float mipCount = 9.0; // resolution of 512x512\n float lod = (pbrInputs.perceptualRoughness * mipCount);\n // retrieve a scale and bias to F0. See [1], Figure 3\n vec3 brdf = SRGBtoLINEAR(texture2D(u_brdfLUT,\n vec2(pbrInputs.NdotV, 1.0 - pbrInputs.perceptualRoughness))).rgb;\n vec3 diffuseLight = SRGBtoLINEAR(textureCube(u_DiffuseEnvSampler, n)).rgb;\n\n#ifdef USE_TEX_LOD\n vec3 specularLight = SRGBtoLINEAR(textureCubeLod(u_SpecularEnvSampler, reflection, lod)).rgb;\n#else\n vec3 specularLight = SRGBtoLINEAR(textureCube(u_SpecularEnvSampler, reflection)).rgb;\n#endif\n\n vec3 diffuse = diffuseLight * pbrInputs.diffuseColor;\n vec3 specular = specularLight * (pbrInputs.specularColor * brdf.x + brdf.y);\n\n // For presentation, this allows us to disable IBL terms\n diffuse *= u_ScaleIBLAmbient.x;\n specular *= u_ScaleIBLAmbient.y;\n\n return diffuse + specular;\n}\n#endif\n\n// Basic Lambertian diffuse\n// Implementation from Lambert's Photometria https://archive.org/details/lambertsphotome00lambgoog\n// See also [1], Equation 1\nvec3 diffuse(PBRInfo pbrInputs)\n{\n return pbrInputs.diffuseColor / M_PI;\n}\n\n// The following equation models the Fresnel reflectance term of the spec equation (aka F())\n// Implementation of fresnel from [4], Equation 15\nvec3 specularReflection(PBRInfo pbrInputs)\n{\n return pbrInputs.reflectance0 +\n (pbrInputs.reflectance90 - pbrInputs.reflectance0) *\n pow(clamp(1.0 - pbrInputs.VdotH, 0.0, 1.0), 5.0);\n}\n\n// This calculates the specular geometric attenuation (aka G()),\n// where rougher material will reflect less light back to the viewer.\n// This implementation is based on [1] Equation 4, and we adopt their modifications to\n// alphaRoughness as input as originally proposed in [2].\nfloat geometricOcclusion(PBRInfo pbrInputs)\n{\n float NdotL = pbrInputs.NdotL;\n float NdotV = pbrInputs.NdotV;\n float r = pbrInputs.alphaRoughness;\n\n float attenuationL = 2.0 * NdotL / (NdotL + sqrt(r * r + (1.0 - r * r) * (NdotL * NdotL)));\n float attenuationV = 2.0 * NdotV / (NdotV + sqrt(r * r + (1.0 - r * r) * (NdotV * NdotV)));\n return attenuationL * attenuationV;\n}\n\n// The following equation(s) model the distribution of microfacet normals across\n// the area being drawn (aka D())\n// Implementation from \"Average Irregularity Representation of a Roughened Surface\n// for Ray Reflection\" by T. S. Trowbridge, and K. P. Reitz\n// Follows the distribution function recommended in the SIGGRAPH 2013 course notes\n// from EPIC Games [1], Equation 3.\nfloat microfacetDistribution(PBRInfo pbrInputs)\n{\n float roughnessSq = pbrInputs.alphaRoughness * pbrInputs.alphaRoughness;\n float f = (pbrInputs.NdotH * roughnessSq - pbrInputs.NdotH) * pbrInputs.NdotH + 1.0;\n return roughnessSq / (M_PI * f * f);\n}\n\nvoid PBRInfo_setAmbientLight(inout PBRInfo pbrInputs) {\n pbrInputs.NdotL = 1.0;\n pbrInputs.NdotH = 0.0;\n pbrInputs.LdotH = 0.0;\n pbrInputs.VdotH = 1.0;\n}\n\nvoid PBRInfo_setDirectionalLight(inout PBRInfo pbrInputs, vec3 lightDirection) {\n vec3 n = pbrInputs.n;\n vec3 v = pbrInputs.v;\n vec3 l = normalize(lightDirection); // Vector from surface point to light\n vec3 h = normalize(l+v); // Half vector between both l and v\n\n pbrInputs.NdotL = clamp(dot(n, l), 0.001, 1.0);\n pbrInputs.NdotH = clamp(dot(n, h), 0.0, 1.0);\n pbrInputs.LdotH = clamp(dot(l, h), 0.0, 1.0);\n pbrInputs.VdotH = clamp(dot(v, h), 0.0, 1.0);\n}\n\nvoid PBRInfo_setPointLight(inout PBRInfo pbrInputs, PointLight pointLight) {\n vec3 light_direction = normalize(pointLight.position - pbr_vPosition);\n PBRInfo_setDirectionalLight(pbrInputs, light_direction);\n}\n\nvec3 calculateFinalColor(PBRInfo pbrInputs, vec3 lightColor) {\n // Calculate the shading terms for the microfacet specular shading model\n vec3 F = specularReflection(pbrInputs);\n float G = geometricOcclusion(pbrInputs);\n float D = microfacetDistribution(pbrInputs);\n\n // Calculation of analytical lighting contribution\n vec3 diffuseContrib = (1.0 - F) * diffuse(pbrInputs);\n vec3 specContrib = F * G * D / (4.0 * pbrInputs.NdotL * pbrInputs.NdotV);\n // Obtain final intensity as reflectance (BRDF) scaled by the energy of the light (cosine law)\n return pbrInputs.NdotL * lightColor * (diffuseContrib + specContrib);\n}\n\nvec4 pbr_filterColor(vec4 colorUnused)\n{\n // The albedo may be defined from a base texture or a flat color\n#ifdef HAS_BASECOLORMAP\n vec4 baseColor = SRGBtoLINEAR(texture2D(u_BaseColorSampler, pbr_vUV)) * u_BaseColorFactor;\n#else\n vec4 baseColor = u_BaseColorFactor;\n#endif\n\n#ifdef ALPHA_CUTOFF\n if (baseColor.a < u_AlphaCutoff) {\n discard;\n }\n#endif\n\n vec3 color = vec3(0, 0, 0);\n\n if(pbr_uUnlit){\n color.rgb = baseColor.rgb;\n }\n else{\n // Metallic and Roughness material properties are packed together\n // In glTF, these factors can be specified by fixed scalar values\n // or from a metallic-roughness map\n float perceptualRoughness = u_MetallicRoughnessValues.y;\n float metallic = u_MetallicRoughnessValues.x;\n#ifdef HAS_METALROUGHNESSMAP\n // Roughness is stored in the 'g' channel, metallic is stored in the 'b' channel.\n // This layout intentionally reserves the 'r' channel for (optional) occlusion map data\n vec4 mrSample = texture2D(u_MetallicRoughnessSampler, pbr_vUV);\n perceptualRoughness = mrSample.g * perceptualRoughness;\n metallic = mrSample.b * metallic;\n#endif\n perceptualRoughness = clamp(perceptualRoughness, c_MinRoughness, 1.0);\n metallic = clamp(metallic, 0.0, 1.0);\n // Roughness is authored as perceptual roughness; as is convention,\n // convert to material roughness by squaring the perceptual roughness [2].\n float alphaRoughness = perceptualRoughness * perceptualRoughness;\n\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor.rgb * (vec3(1.0) - f0);\n diffuseColor *= 1.0 - metallic;\n vec3 specularColor = mix(f0, baseColor.rgb, metallic);\n\n // Compute reflectance.\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n\n // For typical incident reflectance range (between 4% to 100%) set the grazing\n // reflectance to 100% for typical fresnel effect.\n // For very low reflectance range on highly diffuse objects (below 4%),\n // incrementally reduce grazing reflecance to 0%.\n float reflectance90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 specularEnvironmentR0 = specularColor.rgb;\n vec3 specularEnvironmentR90 = vec3(1.0, 1.0, 1.0) * reflectance90;\n\n vec3 n = getNormal(); // normal at surface point\n vec3 v = normalize(u_Camera - pbr_vPosition); // Vector from surface point to camera\n\n float NdotV = clamp(abs(dot(n, v)), 0.001, 1.0);\n vec3 reflection = -normalize(reflect(v, n));\n\n PBRInfo pbrInputs = PBRInfo(\n 0.0, // NdotL\n NdotV,\n 0.0, // NdotH\n 0.0, // LdotH\n 0.0, // VdotH\n perceptualRoughness,\n metallic,\n specularEnvironmentR0,\n specularEnvironmentR90,\n alphaRoughness,\n diffuseColor,\n specularColor,\n n,\n v\n );\n\n#ifdef USE_LIGHTS\n // Apply ambient light\n PBRInfo_setAmbientLight(pbrInputs);\n color += calculateFinalColor(pbrInputs, lighting_uAmbientLight.color);\n\n // Apply directional light\n SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uDirectionalLightCount, i++) {\n if (i < lighting_uDirectionalLightCount) {\n PBRInfo_setDirectionalLight(pbrInputs, lighting_uDirectionalLight[i].direction);\n color += calculateFinalColor(pbrInputs, lighting_uDirectionalLight[i].color);\n }\n }\n\n // Apply point light\n SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uPointLightCount, i++) {\n if (i < lighting_uPointLightCount) {\n PBRInfo_setPointLight(pbrInputs, lighting_uPointLight[i]);\n float attenuation = getPointLightAttenuation(lighting_uPointLight[i], distance(lighting_uPointLight[i].position, pbr_vPosition));\n color += calculateFinalColor(pbrInputs, lighting_uPointLight[i].color / attenuation);\n }\n }\n#endif\n\n // Calculate lighting contribution from image based lighting source (IBL)\n#ifdef USE_IBL\n color += getIBLContribution(pbrInputs, n, reflection);\n#endif\n\n // Apply optional PBR terms for additional (optional) shading\n#ifdef HAS_OCCLUSIONMAP\n float ao = texture2D(u_OcclusionSampler, pbr_vUV).r;\n color = mix(color, color * ao, u_OcclusionStrength);\n#endif\n\n#ifdef HAS_EMISSIVEMAP\n vec3 emissive = SRGBtoLINEAR(texture2D(u_EmissiveSampler, pbr_vUV)).rgb * u_EmissiveFactor;\n color += emissive;\n#endif\n\n // This section uses mix to override final color for reference app visualization\n // of various parameters in the lighting equation.\n#ifdef PBR_DEBUG\n // TODO: Figure out how to debug multiple lights\n\n // color = mix(color, F, u_ScaleFGDSpec.x);\n // color = mix(color, vec3(G), u_ScaleFGDSpec.y);\n // color = mix(color, vec3(D), u_ScaleFGDSpec.z);\n // color = mix(color, specContrib, u_ScaleFGDSpec.w);\n\n // color = mix(color, diffuseContrib, u_ScaleDiffBaseMR.x);\n color = mix(color, baseColor.rgb, u_ScaleDiffBaseMR.y);\n color = mix(color, vec3(metallic), u_ScaleDiffBaseMR.z);\n color = mix(color, vec3(perceptualRoughness), u_ScaleDiffBaseMR.w);\n#endif\n\n }\n\n return vec4(pow(color,vec3(1.0/2.2)), baseColor.a);\n}\n`;\n","import { createStyles as createStylesOriginal } from '@material-ui/styles'; // let warnOnce = false;\n// To remove in v5\n\nexport default function createStyles(styles) {\n // warning(\n // warnOnce,\n // [\n // 'Material-UI: createStyles from @material-ui/core/styles is deprecated.',\n // 'Please use @material-ui/styles/createStyles',\n // ].join('\\n'),\n // );\n // warnOnce = true;\n return createStylesOriginal(styles);\n}","import _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport responsivePropType from './responsivePropType';\nimport { handleBreakpoints } from './breakpoints';\nimport merge from './merge';\nimport memoize from './memoize';\nvar properties = {\n m: 'margin',\n p: 'padding'\n};\nvar directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nvar aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n}; // memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\n\nvar getCssProperties = memoize(function (prop) {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n\n var _prop$split = prop.split(''),\n _prop$split2 = _slicedToArray(_prop$split, 2),\n a = _prop$split2[0],\n b = _prop$split2[1];\n\n var property = properties[a];\n var direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(function (dir) {\n return property + dir;\n }) : [property + direction];\n});\nvar spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];\nexport function createUnarySpacing(theme) {\n var themeSpacing = theme.spacing || 8;\n\n if (typeof themeSpacing === 'number') {\n return function (abs) {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof abs !== 'number') {\n console.error(\"Material-UI: Expected spacing argument to be a number, got \".concat(abs, \".\"));\n }\n }\n\n return themeSpacing * abs;\n };\n }\n\n if (Array.isArray(themeSpacing)) {\n return function (abs) {\n if (process.env.NODE_ENV !== 'production') {\n if (abs > themeSpacing.length - 1) {\n console.error([\"Material-UI: The value provided (\".concat(abs, \") overflows.\"), \"The supported values are: \".concat(JSON.stringify(themeSpacing), \".\"), \"\".concat(abs, \" > \").concat(themeSpacing.length - 1, \", you need to add the missing values.\")].join('\\n'));\n }\n }\n\n return themeSpacing[abs];\n };\n }\n\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n console.error([\"Material-UI: The `theme.spacing` value (\".concat(themeSpacing, \") is invalid.\"), 'It should be a number, an array or a function.'].join('\\n'));\n }\n\n return function () {\n return undefined;\n };\n}\n\nfunction getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n\n var abs = Math.abs(propValue);\n var transformed = transformer(abs);\n\n if (propValue >= 0) {\n return transformed;\n }\n\n if (typeof transformed === 'number') {\n return -transformed;\n }\n\n return \"-\".concat(transformed);\n}\n\nfunction getStyleFromPropValue(cssProperties, transformer) {\n return function (propValue) {\n return cssProperties.reduce(function (acc, cssProperty) {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n };\n}\n\nfunction spacing(props) {\n var theme = props.theme;\n var transformer = createUnarySpacing(theme);\n return Object.keys(props).map(function (prop) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (spacingKeys.indexOf(prop) === -1) {\n return null;\n }\n\n var cssProperties = getCssProperties(prop);\n var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n var propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n }).reduce(merge, {});\n}\n\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce(function (obj, key) {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","export default function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n\n return cache[arg];\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport ButtonBase from '../ButtonBase';\nimport isMuiElement from '../utils/isMuiElement';\nimport useForkRef from '../utils/useForkRef';\nimport ListContext from '../List/ListContext';\nimport * as ReactDOM from 'react-dom';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the (normally root) `component` element. May be wrapped by a `container`. */\n root: {\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n width: '100%',\n boxSizing: 'border-box',\n textAlign: 'left',\n paddingTop: 8,\n paddingBottom: 8,\n '&$focusVisible': {\n backgroundColor: theme.palette.action.selected\n },\n '&$selected, &$selected:hover': {\n backgroundColor: theme.palette.action.selected\n },\n '&$disabled': {\n opacity: 0.5\n }\n },\n\n /* Styles applied to the `container` element if `children` includes `ListItemSecondaryAction`. */\n container: {\n position: 'relative'\n },\n\n /* Pseudo-class applied to the `component`'s `focusVisibleClassName` prop if `button={true}`. */\n focusVisible: {},\n\n /* Styles applied to the `component` element if dense. */\n dense: {\n paddingTop: 4,\n paddingBottom: 4\n },\n\n /* Styles applied to the `component` element if `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n alignItems: 'flex-start'\n },\n\n /* Pseudo-class applied to the inner `component` element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the inner `component` element if `divider={true}`. */\n divider: {\n borderBottom: \"1px solid \".concat(theme.palette.divider),\n backgroundClip: 'padding-box'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the inner `component` element if `button={true}`. */\n button: {\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the `component` element if `children` includes `ListItemSecondaryAction`. */\n secondaryAction: {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * Uses an additional container component if `ListItemSecondaryAction` is the last child.\n */\n\nvar ListItem = /*#__PURE__*/React.forwardRef(function ListItem(props, ref) {\n var _props$alignItems = props.alignItems,\n alignItems = _props$alignItems === void 0 ? 'center' : _props$alignItems,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,\n _props$button = props.button,\n button = _props$button === void 0 ? false : _props$button,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n componentProp = props.component,\n _props$ContainerCompo = props.ContainerComponent,\n ContainerComponent = _props$ContainerCompo === void 0 ? 'li' : _props$ContainerCompo,\n _props$ContainerProps = props.ContainerProps;\n _props$ContainerProps = _props$ContainerProps === void 0 ? {} : _props$ContainerProps;\n\n var ContainerClassName = _props$ContainerProps.className,\n ContainerProps = _objectWithoutProperties(_props$ContainerProps, [\"className\"]),\n _props$dense = props.dense,\n dense = _props$dense === void 0 ? false : _props$dense,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$divider = props.divider,\n divider = _props$divider === void 0 ? false : _props$divider,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = _objectWithoutProperties(props, [\"alignItems\", \"autoFocus\", \"button\", \"children\", \"classes\", \"className\", \"component\", \"ContainerComponent\", \"ContainerProps\", \"dense\", \"disabled\", \"disableGutters\", \"divider\", \"focusVisibleClassName\", \"selected\"]);\n\n var context = React.useContext(ListContext);\n var childContext = {\n dense: dense || context.dense || false,\n alignItems: alignItems\n };\n var listItemRef = React.useRef(null);\n useEnhancedEffect(function () {\n if (autoFocus) {\n if (listItemRef.current) {\n listItemRef.current.focus();\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Material-UI: Unable to set focus to a ListItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n var children = React.Children.toArray(childrenProp);\n var hasSecondaryAction = children.length && isMuiElement(children[children.length - 1], ['ListItemSecondaryAction']);\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n listItemRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(handleOwnRef, ref);\n\n var componentProps = _extends({\n className: clsx(classes.root, className, childContext.dense && classes.dense, !disableGutters && classes.gutters, divider && classes.divider, disabled && classes.disabled, button && classes.button, alignItems !== \"center\" && classes.alignItemsFlexStart, hasSecondaryAction && classes.secondaryAction, selected && classes.selected),\n disabled: disabled\n }, other);\n\n var Component = componentProp || 'li';\n\n if (button) {\n componentProps.component = componentProp || 'div';\n componentProps.focusVisibleClassName = clsx(classes.focusVisible, focusVisibleClassName);\n Component = ButtonBase;\n }\n\n if (hasSecondaryAction) {\n // Use div by default.\n Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li.\n\n if (ContainerComponent === 'li') {\n if (Component === 'li') {\n Component = 'div';\n } else if (componentProps.component === 'li') {\n componentProps.component = 'div';\n }\n }\n\n return /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: childContext\n }, /*#__PURE__*/React.createElement(ContainerComponent, _extends({\n className: clsx(classes.container, ContainerClassName),\n ref: handleRef\n }, ContainerProps), /*#__PURE__*/React.createElement(Component, componentProps, children), children.pop()));\n }\n\n return /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: childContext\n }, /*#__PURE__*/React.createElement(Component, _extends({\n ref: handleRef\n }, componentProps), children));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItem.propTypes = {\n /**\n * Defines the `align-items` style property.\n */\n alignItems: PropTypes.oneOf(['flex-start', 'center']),\n\n /**\n * If `true`, the list item will be focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, the list item will be a button (using `ButtonBase`). Props intended\n * for `ButtonBase` can then be applied to `ListItem`.\n */\n button: PropTypes.bool,\n\n /**\n * The content of the component. If a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: chainPropTypes(PropTypes.node, function (props) {\n var children = React.Children.toArray(props.children); // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction)\n\n var secondaryActionIndex = -1;\n\n for (var i = children.length - 1; i >= 0; i -= 1) {\n var child = children[i];\n\n if (isMuiElement(child, ['ListItemSecondaryAction'])) {\n secondaryActionIndex = i;\n break;\n }\n } // is ListItemSecondaryAction the last child of ListItem\n\n\n if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {\n return new Error('Material-UI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n * By default, it's a `li` when `button` is `false` and a `div` when `button` is `true`.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The container component used when a `ListItemSecondaryAction` is the last child.\n */\n ContainerComponent: PropTypes.elementType,\n\n /**\n * Props applied to the container component if used.\n */\n ContainerProps: PropTypes.object,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input will be used.\n */\n dense: PropTypes.bool,\n\n /**\n * If `true`, the list item will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n */\n divider: PropTypes.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n\n /**\n * Use to apply selected styling.\n */\n selected: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiListItem'\n})(ListItem);","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListItem from '../ListItem';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({}, theme.typography.body1, _defineProperty({\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n width: 'auto',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n }, theme.breakpoints.up('sm'), {\n minHeight: 'auto'\n })),\n // TODO v5: remove\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: {},\n\n /* Styles applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Styles applied to the root element if dense. */\n dense: _extends({}, theme.typography.body2, {\n minHeight: 'auto'\n })\n };\n};\nvar MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n ListItemClasses = props.ListItemClasses,\n _props$role = props.role,\n role = _props$role === void 0 ? 'menuitem' : _props$role,\n selected = props.selected,\n tabIndexProp = props.tabIndex,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"ListItemClasses\", \"role\", \"selected\", \"tabIndex\"]);\n\n var tabIndex;\n\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n\n return /*#__PURE__*/React.createElement(ListItem, _extends({\n button: true,\n role: role,\n tabIndex: tabIndex,\n component: component,\n selected: selected,\n disableGutters: disableGutters,\n classes: _extends({\n dense: classes.dense\n }, ListItemClasses),\n className: clsx(classes.root, className, selected && classes.selected, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.propTypes = {\n /**\n * Menu item contents.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input will be used.\n */\n dense: PropTypes.bool,\n\n /**\n * @ignore\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: PropTypes.bool,\n\n /**\n * `classes` prop applied to the [`ListItem`](/api/list-item/) element.\n */\n ListItemClasses: PropTypes.object,\n\n /**\n * @ignore\n */\n role: PropTypes.string,\n\n /**\n * @ignore\n */\n selected: PropTypes.bool,\n\n /**\n * @ignore\n */\n tabIndex: PropTypes.number\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiMenuItem'\n})(MenuItem);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\n\nvar styles = function styles(theme) {\n return {\n thumb: {\n '&$open': {\n '& $offset': {\n transform: 'scale(1) translateY(-10px)'\n }\n }\n },\n open: {},\n offset: _extends({\n zIndex: 1\n }, theme.typography.body2, {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.2,\n transition: theme.transitions.create(['transform'], {\n duration: theme.transitions.duration.shortest\n }),\n top: -34,\n transformOrigin: 'bottom center',\n transform: 'scale(0)',\n position: 'absolute'\n }),\n circle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: '50% 50% 50% 0',\n backgroundColor: 'currentColor',\n transform: 'rotate(-45deg)'\n },\n label: {\n color: theme.palette.primary.contrastText,\n transform: 'rotate(45deg)'\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction ValueLabel(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n open = props.open,\n value = props.value,\n valueLabelDisplay = props.valueLabelDisplay;\n\n if (valueLabelDisplay === 'off') {\n return children;\n }\n\n return /*#__PURE__*/React.cloneElement(children, {\n className: clsx(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: clsx(classes.offset, className)\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.circle\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: classes.label\n }, value))));\n}\n\nexport default withStyles(styles, {\n name: 'PrivateValueLabel'\n})(ValueLabel);","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes } from '@material-ui/utils';\nimport withStyles from '../styles/withStyles';\nimport useTheme from '../styles/useTheme';\nimport { alpha, lighten, darken } from '../styles/colorManipulator';\nimport useIsFocusVisible from '../utils/useIsFocusVisible';\nimport ownerDocument from '../utils/ownerDocument';\nimport useEventCallback from '../utils/useEventCallback';\nimport useForkRef from '../utils/useForkRef';\nimport capitalize from '../utils/capitalize';\nimport useControlled from '../utils/useControlled';\nimport ValueLabel from './ValueLabel';\n\nfunction asc(a, b) {\n return a - b;\n}\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(min, value), max);\n}\n\nfunction findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n\n return closestIndex;\n}\n\nfunction trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n\n return false;\n }\n\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\n\nfunction valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\n\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\n\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\nfunction roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\n\nfunction setValueIndex(_ref) {\n var values = _ref.values,\n source = _ref.source,\n newValue = _ref.newValue,\n index = _ref.index;\n\n // Performance shortcut\n if (values[index] === newValue) {\n return source;\n }\n\n var output = values.slice();\n output[index] = newValue;\n return output;\n}\n\nfunction focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n\n if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) {\n sliderRef.current.querySelector(\"[role=\\\"slider\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\")).focus();\n }\n\n if (setActive) {\n setActive(activeIndex);\n }\n}\n\nvar axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\n\nvar Identity = function Identity(x) {\n return x;\n};\n\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 2,\n width: '100%',\n boxSizing: 'content-box',\n padding: '13px 0',\n display: 'inline-block',\n position: 'relative',\n cursor: 'pointer',\n touchAction: 'none',\n color: theme.palette.primary.main,\n WebkitTapHighlightColor: 'transparent',\n '&$disabled': {\n pointerEvents: 'none',\n cursor: 'default',\n color: theme.palette.grey[400]\n },\n '&$vertical': {\n width: 2,\n height: '100%',\n padding: '0 13px'\n },\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '20px 0',\n '&$vertical': {\n padding: '0 20px'\n }\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `marks` is provided with at least one label. */\n marked: {\n marginBottom: 20,\n '&$vertical': {\n marginBottom: 'auto',\n marginRight: 20\n }\n },\n\n /* Pseudo-class applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Pseudo-class applied to the root and thumb element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the rail element. */\n rail: {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n opacity: 0.38,\n '$vertical &': {\n height: '100%',\n width: 2\n }\n },\n\n /* Styles applied to the track element. */\n track: {\n display: 'block',\n position: 'absolute',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n '$vertical &': {\n width: 2\n }\n },\n\n /* Styles applied to the track element if `track={false}`. */\n trackFalse: {\n '& $track': {\n display: 'none'\n }\n },\n\n /* Styles applied to the track element if `track=\"inverted\"`. */\n trackInverted: {\n '& $track': {\n backgroundColor: // Same logic as the LinearProgress track color\n theme.palette.type === 'light' ? lighten(theme.palette.primary.main, 0.62) : darken(theme.palette.primary.main, 0.5)\n },\n '& $rail': {\n opacity: 1\n }\n },\n\n /* Styles applied to the thumb element. */\n thumb: {\n position: 'absolute',\n width: 12,\n height: 12,\n marginLeft: -6,\n marginTop: -5,\n boxSizing: 'border-box',\n borderRadius: '50%',\n outline: 0,\n backgroundColor: 'currentColor',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: theme.transitions.create(['box-shadow'], {\n duration: theme.transitions.duration.shortest\n }),\n '&::after': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: '50%',\n // reach 42px hit target (2 * 15 + thumb diameter)\n left: -15,\n top: -15,\n right: -15,\n bottom: -15\n },\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.primary.main, 0.16)),\n '@media (hover: none)': {\n boxShadow: 'none'\n }\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.primary.main, 0.16))\n },\n '&$disabled': {\n width: 8,\n height: 8,\n marginLeft: -4,\n marginTop: -3,\n '&:hover': {\n boxShadow: 'none'\n }\n },\n '$vertical &': {\n marginLeft: -5,\n marginBottom: -6\n },\n '$vertical &$disabled': {\n marginLeft: -3,\n marginBottom: -4\n }\n },\n\n /* Styles applied to the thumb element if `color=\"primary\"`. */\n thumbColorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the thumb element if `color=\"secondary\"`. */\n thumbColorSecondary: {\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(alpha(theme.palette.secondary.main, 0.16))\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(alpha(theme.palette.secondary.main, 0.16))\n }\n },\n\n /* Pseudo-class applied to the thumb element if it's active. */\n active: {},\n\n /* Pseudo-class applied to the thumb element if keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the thumb label element. */\n valueLabel: {\n // IE 11 centering bug, to remove from the customization demos once no longer supported\n left: 'calc(-50% - 4px)'\n },\n\n /* Styles applied to the mark element. */\n mark: {\n position: 'absolute',\n width: 2,\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the mark element if active (depending on the value). */\n markActive: {\n backgroundColor: theme.palette.background.paper,\n opacity: 0.8\n },\n\n /* Styles applied to the mark label element. */\n markLabel: _extends({}, theme.typography.body2, {\n color: theme.palette.text.secondary,\n position: 'absolute',\n top: 26,\n transform: 'translateX(-50%)',\n whiteSpace: 'nowrap',\n '$vertical &': {\n top: 'auto',\n left: 26,\n transform: 'translateY(50%)'\n },\n '@media (pointer: coarse)': {\n top: 40,\n '$vertical &': {\n left: 31\n }\n }\n }),\n\n /* Styles applied to the mark label element if active (depending on the value). */\n markLabelActive: {\n color: theme.palette.text.primary\n }\n };\n};\nvar Slider = /*#__PURE__*/React.forwardRef(function Slider(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledby = props['aria-labelledby'],\n ariaValuetext = props['aria-valuetext'],\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n defaultValue = props.defaultValue,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n getAriaLabel = props.getAriaLabel,\n getAriaValueText = props.getAriaValueText,\n _props$marks = props.marks,\n marksProp = _props$marks === void 0 ? false : _props$marks,\n _props$max = props.max,\n max = _props$max === void 0 ? 100 : _props$max,\n _props$min = props.min,\n min = _props$min === void 0 ? 0 : _props$min,\n name = props.name,\n onChange = props.onChange,\n onChangeCommitted = props.onChangeCommitted,\n onMouseDown = props.onMouseDown,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$scale = props.scale,\n scale = _props$scale === void 0 ? Identity : _props$scale,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$ThumbComponent = props.ThumbComponent,\n ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent,\n _props$track = props.track,\n track = _props$track === void 0 ? 'normal' : _props$track,\n valueProp = props.value,\n _props$ValueLabelComp = props.ValueLabelComponent,\n ValueLabelComponent = _props$ValueLabelComp === void 0 ? ValueLabel : _props$ValueLabelComp,\n _props$valueLabelDisp = props.valueLabelDisplay,\n valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,\n _props$valueLabelForm = props.valueLabelFormat,\n valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,\n other = _objectWithoutProperties(props, [\"aria-label\", \"aria-labelledby\", \"aria-valuetext\", \"classes\", \"className\", \"color\", \"component\", \"defaultValue\", \"disabled\", \"getAriaLabel\", \"getAriaValueText\", \"marks\", \"max\", \"min\", \"name\", \"onChange\", \"onChangeCommitted\", \"onMouseDown\", \"orientation\", \"scale\", \"step\", \"ThumbComponent\", \"track\", \"value\", \"ValueLabelComponent\", \"valueLabelDisplay\", \"valueLabelFormat\"]);\n\n var theme = useTheme();\n var touchId = React.useRef(); // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transfered when inversing a range slider.\n\n var _React$useState = React.useState(-1),\n active = _React$useState[0],\n setActive = _React$useState[1];\n\n var _React$useState2 = React.useState(-1),\n open = _React$useState2[0],\n setOpen = _React$useState2[1];\n\n var _useControlled = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Slider'\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(function (value) {\n return clamp(value, min, max);\n });\n var marks = marksProp === true && step !== null ? _toConsumableArray(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) {\n return {\n value: min + step * index\n };\n }) : marksProp || [];\n\n var _useIsFocusVisible = useIsFocusVisible(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = React.useState(-1),\n focusVisible = _React$useState3[0],\n setFocusVisible = _React$useState3[1];\n\n var sliderRef = React.useRef();\n var handleFocusRef = useForkRef(focusVisibleRef, sliderRef);\n var handleRef = useForkRef(ref, handleFocusRef);\n var handleFocus = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n\n if (isFocusVisible(event)) {\n setFocusVisible(index);\n }\n\n setOpen(index);\n });\n var handleBlur = useEventCallback(function () {\n if (focusVisible !== -1) {\n setFocusVisible(-1);\n onBlurVisible();\n }\n\n setOpen(-1);\n });\n var handleMouseOver = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n });\n var handleMouseLeave = useEventCallback(function () {\n setOpen(-1);\n });\n var isRtl = theme.direction === 'rtl';\n var handleKeyDown = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n var value = values[index];\n var tenPercents = (max - min) / 10;\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var marksIndex = marksValues.indexOf(value);\n var newValue;\n var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n switch (event.key) {\n case 'Home':\n newValue = min;\n break;\n\n case 'End':\n newValue = max;\n break;\n\n case 'PageUp':\n if (step) {\n newValue = value + tenPercents;\n }\n\n break;\n\n case 'PageDown':\n if (step) {\n newValue = value - tenPercents;\n }\n\n break;\n\n case increaseKey:\n case 'ArrowUp':\n if (step) {\n newValue = value + step;\n } else {\n newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1];\n }\n\n break;\n\n case decreaseKey:\n case 'ArrowDown':\n if (step) {\n newValue = value - step;\n } else {\n newValue = marksValues[marksIndex - 1] || marksValues[0];\n }\n\n break;\n\n default:\n return;\n } // Prevent scroll of the page\n\n\n event.preventDefault();\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n\n newValue = clamp(newValue, min, max);\n\n if (range) {\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n source: valueDerived,\n newValue: newValue,\n index: index\n }).sort(asc);\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: newValue.indexOf(previousValue)\n });\n }\n\n setValueState(newValue);\n setFocusVisible(index);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n });\n var previousIndex = React.useRef();\n var axis = orientation;\n\n if (isRtl && orientation !== \"vertical\") {\n axis += '-reverse';\n }\n\n var getFingerNewValue = function getFingerNewValue(_ref3) {\n var finger = _ref3.finger,\n _ref3$move = _ref3.move,\n move = _ref3$move === void 0 ? false : _ref3$move,\n values2 = _ref3.values,\n source = _ref3.source;\n var slider = sliderRef.current;\n\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n\n var percent;\n\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n\n var newValue;\n newValue = percentToValue(percent, min, max);\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n source: source,\n newValue: newValue,\n index: activeIndex\n }).sort(asc);\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n };\n\n var handleTouchMove = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue = getFingerNewValue({\n finger: finger,\n move: true,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue.newValue,\n activeIndex = _getFingerNewValue.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n });\n var handleTouchEnd = useEventCallback(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue2 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue2.newValue;\n\n setActive(-1);\n\n if (event.type === 'touchend') {\n setOpen(-1);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n\n touchId.current = undefined;\n var doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n });\n var handleTouchStart = useEventCallback(function (event) {\n // Workaround as Safari has partial support for touchAction: 'none'.\n event.preventDefault();\n var touch = event.changedTouches[0];\n\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue3 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue3.newValue,\n activeIndex = _getFingerNewValue3.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n React.useEffect(function () {\n var slider = sliderRef.current;\n slider.addEventListener('touchstart', handleTouchStart);\n var doc = ownerDocument(slider);\n return function () {\n slider.removeEventListener('touchstart', handleTouchStart);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n };\n }, [handleTouchEnd, handleTouchMove, handleTouchStart]);\n var handleMouseDown = useEventCallback(function (event) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue4 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue4.newValue,\n activeIndex = _getFingerNewValue4.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n });\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n\n var trackStyle = _extends({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));\n\n return /*#__PURE__*/React.createElement(Component, _extends({\n ref: handleRef,\n className: clsx(classes.root, classes[\"color\".concat(capitalize(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) {\n return mark.label;\n }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted),\n onMouseDown: handleMouseDown\n }, other), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.rail\n }), /*#__PURE__*/React.createElement(\"span\", {\n className: classes.track,\n style: trackStyle\n }), /*#__PURE__*/React.createElement(\"input\", {\n value: values.join(','),\n name: name,\n type: \"hidden\"\n }), marks.map(function (mark, index) {\n var percent = valueToPercent(mark.value, min, max);\n var style = axisProps[axis].offset(percent);\n var markActive;\n\n if (track === false) {\n markActive = values.indexOf(mark.value) !== -1;\n } else {\n markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: mark.value\n }, /*#__PURE__*/React.createElement(\"span\", {\n style: style,\n \"data-index\": index,\n className: clsx(classes.mark, markActive && classes.markActive)\n }), mark.label != null ? /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n \"data-index\": index,\n style: style,\n className: clsx(classes.markLabel, markActive && classes.markLabelActive)\n }, mark.label) : null);\n }), values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/React.createElement(ValueLabelComponent, {\n key: index,\n valueLabelFormat: valueLabelFormat,\n valueLabelDisplay: valueLabelDisplay,\n className: classes.valueLabel,\n value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,\n index: index,\n open: open === index || active === index || valueLabelDisplay === 'on',\n disabled: disabled\n }, /*#__PURE__*/React.createElement(ThumbComponent, {\n className: clsx(classes.thumb, classes[\"thumbColor\".concat(capitalize(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible),\n tabIndex: disabled ? null : 0,\n role: \"slider\",\n style: style,\n \"data-index\": index,\n \"aria-label\": getAriaLabel ? getAriaLabel(index) : ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-orientation\": orientation,\n \"aria-valuemax\": scale(max),\n \"aria-valuemin\": scale(min),\n \"aria-valuenow\": scale(value),\n \"aria-valuetext\": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }));\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Slider.propTypes = {\n /**\n * The label of the slider.\n */\n 'aria-label': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-label'] != null) {\n return new Error('Material-UI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * The id of the element containing a label for the slider.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * A string value that provides a user-friendly name for the current value of the slider.\n */\n 'aria-valuetext': chainPropTypes(PropTypes.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-valuetext'] != null) {\n return new Error('Material-UI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * If `true`, the slider will be disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.\n *\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaLabel: PropTypes.func,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.\n *\n * @param {number} value The thumb label's value to format.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaValueText: PropTypes.func,\n\n /**\n * Marks indicate predetermined values to which the user can move the slider.\n * If `true` the marks will be spaced according the value of the `step` prop.\n * If an array, it should contain objects with `value` and an optional `label` keys.\n */\n marks: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),\n\n /**\n * The maximum allowed value of the slider.\n * Should not be equal to min.\n */\n max: PropTypes.number,\n\n /**\n * The minimum allowed value of the slider.\n * Should not be equal to max.\n */\n min: PropTypes.number,\n\n /**\n * Name attribute of the hidden `input` element.\n */\n name: PropTypes.string,\n\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChange: PropTypes.func,\n\n /**\n * Callback function that is fired when the `mouseup` is triggered.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChangeCommitted: PropTypes.func,\n\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n\n /**\n * The slider orientation.\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * A transformation function, to change the scale of the slider.\n */\n scale: PropTypes.func,\n\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.)\n * The `min` prop serves as the origin for the valid values.\n * We recommend (max - min) to be evenly divisible by the step.\n *\n * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.\n */\n step: PropTypes.number,\n\n /**\n * The component used to display the value label.\n */\n ThumbComponent: PropTypes.elementType,\n\n /**\n * The track presentation:\n *\n * - `normal` the track will render a bar representing the slider value.\n * - `inverted` the track will render a bar representing the remaining slider value.\n * - `false` the track will render without a bar.\n */\n track: PropTypes.oneOf(['normal', false, 'inverted']),\n\n /**\n * The value of the slider.\n * For ranged sliders, provide an array with two values.\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.number)]),\n\n /**\n * The value label component.\n */\n ValueLabelComponent: PropTypes.elementType,\n\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n */\n valueLabelDisplay: PropTypes.oneOf(['on', 'auto', 'off']),\n\n /**\n * The format function the value label's value.\n *\n * When a function is provided, it should have the following signature:\n *\n * - {number} value The value label's value to format\n * - {number} index The value label's index to format\n */\n valueLabelFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiSlider'\n})(Slider);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport withStyles from '../styles/withStyles';\nimport ListContext from './ListContext';\nexport var styles = {\n /* Styles applied to the root element. */\n root: {\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative'\n },\n\n /* Styles applied to the root element if `disablePadding={false}`. */\n padding: {\n paddingTop: 8,\n paddingBottom: 8\n },\n\n /* Styles applied to the root element if dense. */\n dense: {},\n\n /* Styles applied to the root element if a `subheader` is provided. */\n subheader: {\n paddingTop: 0\n }\n};\nvar List = /*#__PURE__*/React.forwardRef(function List(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$dense = props.dense,\n dense = _props$dense === void 0 ? false : _props$dense,\n _props$disablePadding = props.disablePadding,\n disablePadding = _props$disablePadding === void 0 ? false : _props$disablePadding,\n subheader = props.subheader,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"component\", \"dense\", \"disablePadding\", \"subheader\"]);\n\n var context = React.useMemo(function () {\n return {\n dense: dense\n };\n }, [dense]);\n return /*#__PURE__*/React.createElement(ListContext.Provider, {\n value: context\n }, /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, className, dense && classes.dense, !disablePadding && classes.padding, subheader && classes.subheader),\n ref: ref\n }, other), subheader, children));\n});\nprocess.env.NODE_ENV !== \"production\" ? List.propTypes = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object.isRequired,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input will be used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n */\n dense: PropTypes.bool,\n\n /**\n * If `true`, vertical padding will be removed from the list.\n */\n disablePadding: PropTypes.bool,\n\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiList'\n})(List);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport * as ReactDOM from 'react-dom';\nimport ownerDocument from '../utils/ownerDocument';\nimport List from '../List';\nimport getScrollbarSize from '../utils/getScrollbarSize';\nimport useForkRef from '../utils/useForkRef';\n\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n\n return disableListWrap ? null : list.firstChild;\n}\n\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n\n return disableListWrap ? null : list.lastChild;\n}\n\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n\n var text = nextFocus.innerText;\n\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n\n text = text.trim().toLowerCase();\n\n if (text.length === 0) {\n return false;\n }\n\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\n\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n var wrappedOnce = false;\n var nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return;\n }\n\n wrappedOnce = true;\n } // Same logic as useAutocomplete.js\n\n\n var nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return;\n }\n }\n}\n\nvar useEnhancedEffect = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;\n/**\n * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.\n * It's exposed to help customization of the [`Menu`](/api/menu/) component. If you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\n\nvar MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n var actions = props.actions,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,\n _props$autoFocusItem = props.autoFocusItem,\n autoFocusItem = _props$autoFocusItem === void 0 ? false : _props$autoFocusItem,\n children = props.children,\n className = props.className,\n _props$disabledItemsF = props.disabledItemsFocusable,\n disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF,\n _props$disableListWra = props.disableListWrap,\n disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra,\n onKeyDown = props.onKeyDown,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'selectedMenu' : _props$variant,\n other = _objectWithoutProperties(props, [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"]);\n\n var listRef = React.useRef(null);\n var textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(function () {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, function () {\n return {\n adjustStyleForScrollbar: function adjustStyleForScrollbar(containerElement, theme) {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n var noExplicitWidth = !listRef.current.style.width;\n\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n var scrollbarSize = \"\".concat(getScrollbarSize(true), \"px\");\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = \"calc(100% + \".concat(scrollbarSize, \")\");\n }\n\n return listRef.current;\n }\n };\n }, []);\n\n var handleKeyDown = function handleKeyDown(event) {\n var list = listRef.current;\n var key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n\n var currentFocus = ownerDocument(list).activeElement;\n\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n var criteria = textCriteriaRef.current;\n var lowerKey = key.toLowerCase();\n var currTime = performance.now();\n\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n var keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n var handleOwnRef = React.useCallback(function (instance) {\n // #StrictMode ready\n listRef.current = ReactDOM.findDOMNode(instance);\n }, []);\n var handleRef = useForkRef(handleOwnRef, ref);\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n var activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n React.Children.forEach(children, function (child, index) {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"Material-UI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n var items = React.Children.map(children, function (child, index) {\n if (index === activeItemIndex) {\n var newChildProps = {};\n\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n\n return child;\n });\n return /*#__PURE__*/React.createElement(List, _extends({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other), items);\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n */\n autoFocus: PropTypes.bool,\n\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n */\n autoFocusItem: PropTypes.bool,\n\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, will allow focus on disabled items.\n */\n disabledItemsFocusable: PropTypes.bool,\n\n /**\n * If `true`, the menu items will not wrap focus.\n */\n disableListWrap: PropTypes.bool,\n\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","import _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport capitalize from '../utils/capitalize';\nimport withStyles from '../styles/withStyles';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: _extends({\n color: theme.palette.text.secondary\n }, theme.typography.body1, {\n lineHeight: 1,\n padding: 0,\n '&$focused': {\n color: theme.palette.primary.main\n },\n '&$disabled': {\n color: theme.palette.text.disabled\n },\n '&$error': {\n color: theme.palette.error.main\n }\n }),\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {\n '&$focused': {\n color: theme.palette.secondary.main\n }\n },\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element if `filled={true}`. */\n filled: {},\n\n /* Pseudo-class applied to the root element if `required={true}`. */\n required: {},\n\n /* Styles applied to the asterisk element. */\n asterisk: {\n '&$error': {\n color: theme.palette.error.main\n }\n }\n };\n};\nvar FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n color = props.color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'label' : _props$component,\n disabled = props.disabled,\n error = props.error,\n filled = props.filled,\n focused = props.focused,\n required = props.required,\n other = _objectWithoutProperties(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"filled\", \"focused\", \"required\"]);\n\n var muiFormControl = useFormControl();\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']\n });\n return /*#__PURE__*/React.createElement(Component, _extends({\n className: clsx(classes.root, classes[\"color\".concat(capitalize(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fcs.filled && classes.filled, fcs.focused && classes.focused, fcs.required && classes.required),\n ref: ref\n }, other), children, fcs.required && /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": true,\n className: clsx(classes.asterisk, fcs.error && classes.error)\n }, \"\\u2009\", '*'));\n});\nprocess.env.NODE_ENV !== \"production\" ? FormLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the label should use filled classes key.\n */\n filled: PropTypes.bool,\n\n /**\n * If `true`, the input of this label is focused (used by `FormGroup` components).\n */\n focused: PropTypes.bool,\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: PropTypes.bool\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiFormLabel'\n})(FormLabel);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport formControlState from '../FormControl/formControlState';\nimport useFormControl from '../FormControl/useFormControl';\nimport withStyles from '../styles/withStyles';\nimport FormLabel from '../FormLabel';\nexport var styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n transformOrigin: 'top left'\n },\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element if `required={true}`. */\n required: {},\n\n /* Pseudo-class applied to the asterisk element. */\n asterisk: {},\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n position: 'absolute',\n left: 0,\n top: 0,\n // slight alteration to spec spacing to match visual spec result\n transform: 'translate(0, 24px) scale(1)'\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n // Compensation for the `Input.inputDense` style.\n transform: 'translate(0, 21px) scale(1)'\n },\n\n /* Styles applied to the `input` element if `shrink={true}`. */\n shrink: {\n transform: 'translate(0, 1.5px) scale(0.75)',\n transformOrigin: 'top left'\n },\n\n /* Styles applied to the `input` element if `disableAnimation={false}`. */\n animated: {\n transition: theme.transitions.create(['color', 'transform'], {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n })\n },\n\n /* Styles applied to the root element if `variant=\"filled\"`. */\n filled: {\n // Chrome's autofill feature gives the input field a yellow background.\n // Since the input field is behind the label in the HTML tree,\n // the input field is drawn last and hides the label with an opaque background color.\n // zIndex: 1 will raise the label above opaque background-colors of input.\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(12px, 20px) scale(1)',\n '&$marginDense': {\n transform: 'translate(12px, 17px) scale(1)'\n },\n '&$shrink': {\n transform: 'translate(12px, 10px) scale(0.75)',\n '&$marginDense': {\n transform: 'translate(12px, 7px) scale(0.75)'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n // see comment above on filled.zIndex\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(14px, 20px) scale(1)',\n '&$marginDense': {\n transform: 'translate(14px, 12px) scale(1)'\n },\n '&$shrink': {\n transform: 'translate(14px, -6px) scale(0.75)'\n }\n }\n };\n};\nvar InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disableAnimati = props.disableAnimation,\n disableAnimation = _props$disableAnimati === void 0 ? false : _props$disableAnimati,\n margin = props.margin,\n shrinkProp = props.shrink,\n variant = props.variant,\n other = _objectWithoutProperties(props, [\"classes\", \"className\", \"disableAnimation\", \"margin\", \"shrink\", \"variant\"]);\n\n var muiFormControl = useFormControl();\n var shrink = shrinkProp;\n\n if (typeof shrink === 'undefined' && muiFormControl) {\n shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;\n }\n\n var fcs = formControlState({\n props: props,\n muiFormControl: muiFormControl,\n states: ['margin', 'variant']\n });\n return /*#__PURE__*/React.createElement(FormLabel, _extends({\n \"data-shrink\": shrink,\n className: clsx(classes.root, className, muiFormControl && classes.formControl, !disableAnimation && classes.animated, shrink && classes.shrink, fcs.margin === 'dense' && classes.marginDense, {\n 'filled': classes.filled,\n 'outlined': classes.outlined\n }[fcs.variant]),\n classes: {\n focused: classes.focused,\n disabled: classes.disabled,\n error: classes.error,\n required: classes.required,\n asterisk: classes.asterisk\n },\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? InputLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the `InputLabel`.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * If `true`, the transition animation is disabled.\n */\n disableAnimation: PropTypes.bool,\n\n /**\n * If `true`, apply disabled class.\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the label will be displayed in an error state.\n */\n error: PropTypes.bool,\n\n /**\n * If `true`, the input of this label is focused.\n */\n focused: PropTypes.bool,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n\n /**\n * if `true`, the label will indicate that the input is required.\n */\n required: PropTypes.bool,\n\n /**\n * If `true`, the label is shrunk.\n */\n shrink: PropTypes.bool,\n\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default withStyles(styles, {\n name: 'MuiInputLabel'\n})(InputLabel);"],"sourceRoot":""}